Commit 892c6204 by 无尘

add: 增加接口

parent 183053d9
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.0786c951cb89487e69b1fc2665cc515c.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.91ef00f840768cd11a25.js></script><script type=text/javascript src=./static/js/vendor.c32d4bd3aa2b8edcfb59.js></script><script type=text/javascript src=./static/js/app.4db5146ebd9486140567.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.25759bb2ec2ae512db9a94969592f6de.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.54478c3b4733f95d1ed3.js></script><script type=text/javascript src=./static/js/vendor.c32d4bd3aa2b8edcfb59.js></script><script type=text/javascript src=./static/js/app.026bba0c3425cdf678da.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -32,108 +32,117 @@
}*/
}
.store-estrutura-container {
display: flex;
.sf-right-container {
height: 690px;
background: #fff;
flex: 1;
padding: 0 24px;
.sf-right-header {
height: 70px;
line-height: 70px;
font-weight: 400;
font-size: 14px;
color: #606266;
.title-span {
color: #303133;
font-size: 20px;
}
.handle-area {
float: right;
.hurdle {
width:1px;
height:16px;
display: inline-block;
background: #DCDFE6;
margin: 0 10px;
vertical-align: sub;
}
}
}
.tab-div {
margin-bottom: 20px;
}
.sf-right-button-box {
padding: 8px 15px;
background: #EBEEF5;
font-size: 0;
.el-select--small {
width: 120px;
margin-right: 10px;
}
.el-button {
margin-right: 10px;
}
}
.pagination {
margin-top: 30px;
text-align: right;
}
.diy-table {
.diy-header {
display: flex;
.name {
width: 130px;
}
.phone, .position {
width: 125px;
}
.status {
width: 100px;
}
}
.clerk-obj-li {
display: flex;
padding: 10px 0;
margin-bottom: 25px;
line-height: 32px;
&:last-child {
margin-bottom: 0;
}
.clerk-name {
width: 130px;
.manager {
display: inline-block;
width: 30px;
height: 15px;
line-height: 16px;
vertical-align: middle;
text-align: center;
background:rgba(247,203,39,1);
border-radius:2px;
color: #fff;
font-size: 10px;
}
}
.clerk-phone, .clerk-position {
width: 125px;
}
.clerk-status {
width: 100px;
.status-icon {
width: 34px;
height: 32px;
line-height: 32px;
text-align: center;
background: #ECF5FF;
border: 1px solid #D9ECFF;
border-radius: 4px;
&.is-active {
color: #409EFF;
}
}
}
.common-frame-container {
display: flex;
.common-right-container {
height: 690px;
background: #fff;
flex: 1;
padding: 0 24px;
.common-right-header {
height: 70px;
line-height: 70px;
font-weight: 400;
font-size: 14px;
color: #606266;
.title-span {
color: #303133;
font-size: 20px;
}
.handle-area {
float: right;
.hurdle {
width:1px;
height:16px;
display: inline-block;
background: #DCDFE6;
margin: 0 10px;
vertical-align: sub;
}
.no-bdr-btn {
background: none;
color: #409EFF;
border: none;
}
.el-button.is-disabled, .el-button.is-disabled:hover, .el-button.is-disabled:focus {
background: none;
color: #c0c4cc;
}
}
}
.tab-div {
margin-bottom: 20px;
}
.common-right-button-box {
padding: 8px 15px;
background: #EBEEF5;
font-size: 0;
.el-select--small {
width: 120px;
margin-right: 10px;
}
.el-button {
margin-right: 10px;
}
}
.pagination {
margin-top: 30px;
text-align: right;
}
.diy-table {
.diy-header {
display: flex;
.name {
width: 130px;
}
.phone, .position {
width: 125px;
}
.status {
width: 100px;
}
}
.clerk-obj-li {
display: flex;
padding: 10px 0;
margin-bottom: 25px;
line-height: 32px;
&:last-child {
margin-bottom: 0;
}
.clerk-name {
width: 130px;
.manager {
display: inline-block;
width: 30px;
height: 15px;
line-height: 16px;
vertical-align: middle;
text-align: center;
background:rgba(247,203,39,1);
border-radius:2px;
color: #fff;
font-size: 10px;
}
}
.clerk-phone, .clerk-position {
width: 125px;
}
.clerk-status {
width: 100px;
.status-icon {
width: 34px;
height: 32px;
line-height: 32px;
text-align: center;
background: #ECF5FF;
border: 1px solid #D9ECFF;
border-radius: 4px;
&.is-active {
color: #409EFF;
}
}
}
}
}
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([10],{I3G8:function(e,t){},IE32:function(e,t){},n7j5:function(e,t,a){"use strict";a("0xDb");var i={name:"select-area",components:{vueSelectEmployee:a("c4uw").a},props:{treeData:{type:Object,default:function(){return{}}},butList:{type:Array,default:function(){return[]}},specialList:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{delCurrent:function(e,t){var a=this[t];console.log(a.indexOf(e)),a.splice(a.indexOf(e),1)},handleSelectedList:function(e){console.log(e),this.butList=e},callSelector:function(e,t){this.$emit("callPerSelector",e,t)}},watch:{treeData:function(e){}}},n={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"select-area"},[a("div",{staticClass:"setting-name"},[e._v("\n 个别员工不设置该权限\n ")]),e._v(" "),a("ul",{staticClass:"particular-list"},[e._l(e.butList,function(t,i){return[t.employeeClerkId?a("li",{key:i+"_"+t.employeeClerkId,staticClass:"item person-item"},[a("img",{attrs:{src:t.headPic}}),e._v(" "),a("p",{staticClass:"name"},[e._v(e._s(t.label))]),e._v(" "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(a){e.delCurrent(t,"butList")}}})]):a("li",{key:i+"_"+t.groupId,staticClass:"item group-item"},[e._v("\n "+e._s(t.label)+"\n "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(a){e.delCurrent(t,"butList")}}})])]}),e._v(" "),a("li",{staticClass:"item J_add-btn",on:{click:function(t){e.callSelector("but",e.butList)}}},[a("i",{staticClass:"el-icon-plus"})])],2),e._v(" "),a("div",{staticClass:"setting-name"},[e._v("\n 允许指定部门/人员可见\n ")]),e._v(" "),a("ul",{staticClass:"particular-list"},[e._l(e.specialList,function(t,i){return[t.employeeClerkId?a("li",{key:i+"_"+t.employeeClerkId,staticClass:"item person-item"},[a("img",{attrs:{src:t.headPic}}),e._v(" "),a("p",{staticClass:"name"},[e._v(e._s(t.label))]),e._v(" "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(a){e.delCurrent(t,"specialList")}}})]):a("li",{key:i+"_"+t.groupId,staticClass:"item group-item"},[e._v("\n "+e._s(t.label)+"\n "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(a){e.delCurrent(t,"specialList")}}})])]}),e._v(" "),a("li",{staticClass:"item J_add-btn",on:{click:function(t){e.callSelector("special",e.specialList)}}},[a("i",{staticClass:"el-icon-plus"})])],2)])},staticRenderFns:[]};var s={name:"permissionSetting",components:{selectArea:a("VU/8")(i,n,!1,function(e){a("oc7k")},null,null).exports},props:{butList:{type:Array,default:function(){return[]}},specialList:{type:Array,default:function(){return[]}},selfButList:{type:Array,default:function(){return[]}},visibleSpecialLsit:{type:Array,default:function(){return[]}},onlySelfApartList:{type:Array,default:function(){return[]}},treeData:{type:Object,default:function(){return{}}},departInfo:{type:Object,default:function(){return{}}}},data:function(){return{visibleThere:!0,visibleSelf:!1}},methods:{switchPermission:function(e,t,a){e&&(this[a]=!e),this.visibleSelf?this.departInfo.type=2:this.visibleThere?this.departInfo.type=1:this.departInfo.type=""},callPerSelector:function(e,t){this.$emit("callPerSelector",e,t)}},mounted:function(){console.log(this.departInfo);var e=this.departInfo.type;this.visibleThere=1==!!e,this.visibleSelf=2==!!e}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"jurisdiction-setting"},[a("div",{staticClass:"only-visivble-there permission-div"},[e._v("\n 本部门员工仅可见本部门员工\n "),a("el-switch",{attrs:{"active-color":"#409EFF","inactive-color":"#DCDFE6"},on:{change:function(t){e.switchPermission(e.visibleThere,"visibleThere","visibleSelf")}},model:{value:e.visibleThere,callback:function(t){e.visibleThere=t},expression:"visibleThere"}}),e._v(" "),e.visibleThere?a("div",{staticClass:"particular-setting"},[a("select-area",{attrs:{treeData:e.treeData,butList:e.butList,specialList:e.specialList},on:{callPerSelector:e.callPerSelector}})],1):e._e()],1),e._v(" "),a("div",{staticClass:"only-visivble-self permission-div"},[e._v("\n 本部门员工仅可见自己\n "),a("el-switch",{attrs:{"active-color":"#409EFF","inactive-color":"#DCDFE6"},on:{change:function(t){e.switchPermission(e.visibleSelf,"visibleSelf","visibleThere")}},model:{value:e.visibleSelf,callback:function(t){e.visibleSelf=t},expression:"visibleSelf"}}),e._v(" "),e.visibleSelf?a("div",{staticClass:"particular-setting"},[a("select-area",{attrs:{treeData:e.treeData,butList:e.selfButList,specialList:e.specialList},on:{callPerSelector:e.callPerSelector}})],1):e._e()],1)])},staticRenderFns:[]};var l=a("VU/8")(s,r,!1,function(e){a("IE32")},null,null);t.a=l.exports},oc7k:function(e,t){},q5Ri:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("n7j5"),n=a("c4uw"),s=a("P9l9"),r={name:"addDepartment",components:{permissionSetting:i.a,vueSelectEmployee:n.a},data:function(){return{departInfo:{name:"",parentName:"",parentId:""},testList:[],treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!0},rules:{name:[{required:!0,message:"请输入部门名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],parentId:[{required:!0,message:"请选择父级部门",trigger:"change"}]},treeData:{},disabled:!0,defaultSelection:[],defaultParent:[],selectorType:"parent",changed:"parent",onlyPerson:!1,onlyGroup:[]}},methods:{getDepartInfo:function(){var e=this,t={groupId:e.$route.query.departmentId};Object(s.a)("/haoban-manage-web/dept/findDeptById",t).then(function(t){if(1==t.data.errorCode){e.departInfo.name=t.data.result.name,e.departInfo.parentId=t.data.result.parentId;var a=t.data.result.chainName.split("/"),i=a.length;e.departInfo.parentName=1==i?"":a[i-2],e.defaultParent=[{label:e.departInfo.parentName,id:t.data.result.parentId,groupId:t.data.result.parentId}]}else e.$message.error({duration:1e3,message:t.data.message})}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},callGroupSelector:function(){this.selectorType="parent",this.defaultSelection=this.defaultParent,this.onlyPerson=!1,this.onlyGroup=[],this.changed="parent",this.treeSet={dialogVisible:!0,isSingle:!0,isSelectPerson:!1}},callPerSelector:function(e,t){this.selectorType=e,this.defaultSelection=t,this.onlyPerson=!0,this.onlyGroup=[this.$route.query.departmentId],console.log(this.$route.query.departmentId),this.changed=e,this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0}},handleSelectedList:function(e){console.log(e),this.departInfo.parentId=e?e.id:"",this.departInfo.parentName=e?e.label:""},saveEdit:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.$refs.departForm.validate(function(a){if(!a)return!1;var i=e,n={parentId:i.departInfo.parentId,name:i.departInfo.name};Object(s.a)("/haoban-manage-web/dept/insert",n).then(function(e){console.log(e),1==e.data.errorCode?(i.$message.success({duration:1e3,message:"操作成功!"}),console.log(t),"continue"==t?(i.departInfo={name:"",parentName:"",parentId:""},i.disabled=!0,i.getGroupData()):window.history.go(-1)):i.$message.error({duration:1e3,message:e.data.message})}).catch(function(e){i.$message.error({duration:1e3,message:e.message})})})},getGroupData:function(){var e=this;Object(s.a)("/haoban-manage-web/dept/deptListForCompany",{isStoreGroup:0}).then(function(t){var a=[],i=[];1==t.data.errorCode&&(a=t.data.result.departmentList||[],i=t.data.result.searchList||[]),e.treeData={treeData:a,personData:i},e.disabled=!1}).catch(function(e){console.log(e,"error")})},cancel:function(){this.$confirm(" 是否确认取消,取消后当前页面信息将丢失 ?","提示",{type:"warning"}).then(function(){window.history.go(-1)}).catch(function(e){console.log(e)})}},beforeMount:function(){this.getGroupData(),this.isAddNew||this.getDepartInfo()},computed:{isAddNew:function(){return!(1!=this.$route.query.addnew)}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"add-department-container"},[a("div",{staticClass:"setting-cell depart-info"},[a("p",{staticClass:"title"},[e._v("部门信息")]),e._v(" "),a("el-form",{ref:"departForm",staticClass:"department-info-form",attrs:{"label-position":"right",rules:e.rules,model:e.departInfo,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"部门名称",prop:"name"}},[a("el-input",{model:{value:e.departInfo.name,callback:function(t){e.$set(e.departInfo,"name",t)},expression:"departInfo.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"部门排序调整",prop:"parentId"}},[a("el-input",{attrs:{disabled:e.disabled,"suffix-icon":"el-icon-arrow-down"},on:{focus:e.callGroupSelector},model:{value:e.departInfo.parentName,callback:function(t){e.$set(e.departInfo,"parentName",t)},expression:"departInfo.parentName"}})],1)],1)],1),e._v(" "),a("vue-select-employee",{attrs:{defaultSelection:e.defaultSelection,treeSet:e.treeSet,treeData:e.treeData},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var o=a("VU/8")(r,l,!1,function(e){a("I3G8")},null,null);t.default=o.exports}});
//# sourceMappingURL=10.2ab72fd3172795e93e23.js.map
\ No newline at end of file
webpackJsonp([12],{I3G8:function(e,t){},IE32:function(e,t){},W2vg:function(e,t){},n7j5:function(e,t,a){"use strict";a("0xDb");var i={name:"select-area",components:{vueSelectEmployee:a("c4uw").a},props:{treeData:{type:Object,default:function(){return{}}},butList:{type:Array,default:function(){return[]}},specialList:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{delCurrent:function(e,t){var a=this[t];console.log(a.indexOf(e)),a.splice(a.indexOf(e),1)},handleSelectedList:function(e){console.log(e),this.butList=e},callSelector:function(e,t){this.$emit("callPerSelector",e,t)}},watch:{treeData:function(e){}}},n={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"select-area"},[a("div",{staticClass:"setting-name"},[e._v("\n 个别员工不设置该权限\n ")]),e._v(" "),a("ul",{staticClass:"particular-list"},[e._l(e.butList,function(t,i){return[t.employeeClerkId?a("li",{key:i+"_"+t.employeeClerkId,staticClass:"item person-item"},[a("img",{attrs:{src:t.headPic}}),e._v(" "),a("p",{staticClass:"name"},[e._v(e._s(t.label))]),e._v(" "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(a){e.delCurrent(t,"butList")}}})]):a("li",{key:i+"_"+t.groupId,staticClass:"item group-item"},[e._v("\n "+e._s(t.label)+"\n "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(a){e.delCurrent(t,"butList")}}})])]}),e._v(" "),a("li",{staticClass:"item J_add-btn",on:{click:function(t){e.callSelector("but",e.butList)}}},[a("i",{staticClass:"el-icon-plus"})])],2),e._v(" "),a("div",{staticClass:"setting-name"},[e._v("\n 允许指定部门/人员可见\n ")]),e._v(" "),a("ul",{staticClass:"particular-list"},[e._l(e.specialList,function(t,i){return[t.employeeClerkId?a("li",{key:i+"_"+t.employeeClerkId,staticClass:"item person-item"},[a("img",{attrs:{src:t.headPic}}),e._v(" "),a("p",{staticClass:"name"},[e._v(e._s(t.label))]),e._v(" "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(a){e.delCurrent(t,"specialList")}}})]):a("li",{key:i+"_"+t.groupId,staticClass:"item group-item"},[e._v("\n "+e._s(t.label)+"\n "),a("i",{staticClass:"el-icon-circle-close",on:{click:function(a){e.delCurrent(t,"specialList")}}})])]}),e._v(" "),a("li",{staticClass:"item J_add-btn",on:{click:function(t){e.callSelector("special",e.specialList)}}},[a("i",{staticClass:"el-icon-plus"})])],2)])},staticRenderFns:[]};var s={name:"permissionSetting",components:{selectArea:a("VU/8")(i,n,!1,function(e){a("W2vg")},null,null).exports},props:{butList:{type:Array,default:function(){return[]}},specialList:{type:Array,default:function(){return[]}},selfButList:{type:Array,default:function(){return[]}},visibleSpecialLsit:{type:Array,default:function(){return[]}},onlySelfApartList:{type:Array,default:function(){return[]}},treeData:{type:Object,default:function(){return{}}},departInfo:{type:Object,default:function(){return{}}}},data:function(){return{visibleThere:!0,visibleSelf:!1}},methods:{switchPermission:function(e,t,a){e&&(this[a]=!e),this.visibleSelf?this.departInfo.type=2:this.visibleThere?this.departInfo.type=1:this.departInfo.type=""},callPerSelector:function(e,t){this.$emit("callPerSelector",e,t)}},mounted:function(){console.log(this.departInfo);var e=this.departInfo.type;this.visibleThere=1==!!e,this.visibleSelf=2==!!e}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"jurisdiction-setting"},[a("div",{staticClass:"only-visivble-there permission-div"},[e._v("\n 本部门员工仅可见本部门员工\n "),a("el-switch",{attrs:{"active-color":"#409EFF","inactive-color":"#DCDFE6"},on:{change:function(t){e.switchPermission(e.visibleThere,"visibleThere","visibleSelf")}},model:{value:e.visibleThere,callback:function(t){e.visibleThere=t},expression:"visibleThere"}}),e._v(" "),e.visibleThere?a("div",{staticClass:"particular-setting"},[a("select-area",{attrs:{treeData:e.treeData,butList:e.butList,specialList:e.specialList},on:{callPerSelector:e.callPerSelector}})],1):e._e()],1),e._v(" "),a("div",{staticClass:"only-visivble-self permission-div"},[e._v("\n 本部门员工仅可见自己\n "),a("el-switch",{attrs:{"active-color":"#409EFF","inactive-color":"#DCDFE6"},on:{change:function(t){e.switchPermission(e.visibleSelf,"visibleSelf","visibleThere")}},model:{value:e.visibleSelf,callback:function(t){e.visibleSelf=t},expression:"visibleSelf"}}),e._v(" "),e.visibleSelf?a("div",{staticClass:"particular-setting"},[a("select-area",{attrs:{treeData:e.treeData,butList:e.selfButList,specialList:e.specialList},on:{callPerSelector:e.callPerSelector}})],1):e._e()],1)])},staticRenderFns:[]};var l=a("VU/8")(s,r,!1,function(e){a("IE32")},null,null);t.a=l.exports},q5Ri:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("n7j5"),n=a("c4uw"),s=a("P9l9"),r={name:"addDepartment",components:{permissionSetting:i.a,vueSelectEmployee:n.a},data:function(){return{departInfo:{name:"",parentName:"",parentId:""},testList:[],treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!0},rules:{name:[{required:!0,message:"请输入部门名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],parentId:[{required:!0,message:"请选择父级部门",trigger:"change"}]},treeData:{},disabled:!0,defaultSelection:[],defaultParent:[],selectorType:"parent",changed:"parent",onlyPerson:!1,onlyGroup:[]}},methods:{getDepartInfo:function(){var e=this,t={groupId:e.$route.query.departmentId};Object(s.a)("/haoban-manage-web/dept/findDeptById",t).then(function(t){if(1==t.data.errorCode){e.departInfo.name=t.data.result.name,e.departInfo.parentId=t.data.result.parentId;var a=t.data.result.chainName.split("/"),i=a.length;e.departInfo.parentName=1==i?"":a[i-2],e.defaultParent=[{label:e.departInfo.parentName,id:t.data.result.parentId,groupId:t.data.result.parentId}]}else e.$message.error({duration:1e3,message:t.data.message})}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},callGroupSelector:function(){this.selectorType="parent",this.defaultSelection=this.defaultParent,this.onlyPerson=!1,this.onlyGroup=[],this.changed="parent",this.treeSet={dialogVisible:!0,isSingle:!0,isSelectPerson:!1}},callPerSelector:function(e,t){this.selectorType=e,this.defaultSelection=t,this.onlyPerson=!0,this.onlyGroup=[this.$route.query.departmentId],console.log(this.$route.query.departmentId),this.changed=e,this.treeSet={dialogVisible:!0,isSingle:!1,isSelectPerson:!0}},handleSelectedList:function(e){console.log(e),this.departInfo.parentId=e?e.id:"",this.departInfo.parentName=e?e.label:""},saveEdit:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.$refs.departForm.validate(function(a){if(!a)return!1;var i=e,n={parentId:i.departInfo.parentId,name:i.departInfo.name};Object(s.a)("/haoban-manage-web/dept/insert",n).then(function(e){console.log(e),1==e.data.errorCode?(i.$message.success({duration:1e3,message:"操作成功!"}),console.log(t),"continue"==t?(i.departInfo={name:"",parentName:"",parentId:""},i.disabled=!0,i.getGroupData()):window.history.go(-1)):i.$message.error({duration:1e3,message:e.data.message})}).catch(function(e){i.$message.error({duration:1e3,message:e.message})})})},getGroupData:function(){var e=this;Object(s.a)("/haoban-manage-web/dept/deptListForCompany",{isStoreGroup:0}).then(function(t){var a=[],i=[];1==t.data.errorCode&&(a=t.data.result.departmentList||[],i=t.data.result.searchList||[]),e.treeData={treeData:a,personData:i},e.disabled=!1}).catch(function(e){console.log(e,"error")})},cancel:function(){this.$confirm(" 是否确认取消,取消后当前页面信息将丢失 ?","提示",{type:"warning"}).then(function(){window.history.go(-1)}).catch(function(e){console.log(e)})}},beforeMount:function(){this.getGroupData(),this.isAddNew||this.getDepartInfo()},computed:{isAddNew:function(){return!(1!=this.$route.query.addnew)}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"add-department-container"},[a("div",{staticClass:"setting-cell depart-info"},[a("p",{staticClass:"title"},[e._v("部门信息")]),e._v(" "),a("el-form",{ref:"departForm",staticClass:"department-info-form",attrs:{"label-position":"right",rules:e.rules,model:e.departInfo,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"部门名称",prop:"name"}},[a("el-input",{model:{value:e.departInfo.name,callback:function(t){e.$set(e.departInfo,"name",t)},expression:"departInfo.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"部门排序调整",prop:"parentId"}},[a("el-input",{attrs:{disabled:e.disabled,"suffix-icon":"el-icon-arrow-down"},on:{focus:e.callGroupSelector},model:{value:e.departInfo.parentName,callback:function(t){e.$set(e.departInfo,"parentName",t)},expression:"departInfo.parentName"}})],1)],1)],1),e._v(" "),a("vue-select-employee",{attrs:{defaultSelection:e.defaultSelection,treeSet:e.treeSet,treeData:e.treeData},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var o=a("VU/8")(r,l,!1,function(e){a("I3G8")},null,null);t.default=o.exports}});
//# sourceMappingURL=12.c865623a1c91d006377a.js.map
\ No newline at end of file
webpackJsonp([15],{"0OOK":function(t,e){},"6p23":function(t,e){},Xwfy:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("3Xzz"),s=(a("Mk6G"),a("3E4D"),a("Ch4/"),a("PI0u")),l=(a("P9l9"),{name:"",props:{imgSrc:{type:String,default:""},field:{type:String,default:""},uploadLimit:{type:Number,default:2},permTitle:{type:String}},data:function(){return{projectName:"",imgShowFlag:!1,imgUrl:"",ruleForm:{radio:"0",visibleAll:[{id:"1",type:"people",name:"张三",img:"http://thirdwx.qlogo.cn/mmopen/j7nX4OeBsXRNyvh6micCywssVEYCaWiaicUZq5Vn2zWktWLAyRvEAH7icQmUhLze8rrQYpM5ptwZ2RL7cX0icyBbiavhYFNTIZhibKu/0"},{id:"1",type:"store",name:"张三"}],storeVisibleAll:[],storeOwnBrand:[],storeOwnStore:[]}}},beforeMount:function(){var t=window.location.origin;console.log("当前host:",t),"-1"!=t.indexOf("localhost")?this.baseUrl="http://gicdev.demogic.com":this.baseUrl=t},methods:{submitForm:Object(s.a)(function(t){this.$refs[t].validate(function(t){if(console.log(t),!t)return!1})},500)},mounted:function(){}}),r={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"permiss-wrap"},[a("el-form",{attrs:{"label-width":"110px",model:t.ruleForm}},[a("el-form-item",{attrs:{label:t.permTitle+"可见权限"}},[a("el-radio",{attrs:{label:"0"},model:{value:t.ruleForm.radio,callback:function(e){t.$set(t.ruleForm,"radio",e)},expression:"ruleForm.radio"}},[t._v("可见所有品牌门店架构和行政架构")])],1),t._v(" "),a("div",{staticClass:"permiss-child-cell"},[a("p",[t._v("允许指定部门/人员可见:")])]),t._v(" "),a("el-form-item",{attrs:{label:" "}},[a("el-radio",{attrs:{label:"1"},model:{value:t.ruleForm.radio,callback:function(e){t.$set(t.ruleForm,"radio",e)},expression:"ruleForm.radio"}},[t._v("可见所在品牌门店架构和行政架构")])],1),t._v(" "),a("el-form-item",{attrs:{label:" "}},[a("el-radio",{attrs:{label:"2"},model:{value:t.ruleForm.radio,callback:function(e){t.$set(t.ruleForm,"radio",e)},expression:"ruleForm.radio"}},[t._v("门店仅可见所有品牌门店架构")])],1),t._v(" "),a("el-form-item",{attrs:{label:" "}},[a("el-radio",{attrs:{label:"3"},model:{value:t.ruleForm.radio,callback:function(e){t.$set(t.ruleForm,"radio",e)},expression:"ruleForm.radio"}},[t._v(" 门店仅可见自己品牌门店架构")])],1),t._v(" "),a("el-form-item",{attrs:{label:" "}},[a("el-radio",{attrs:{label:"4"},model:{value:t.ruleForm.radio,callback:function(e){t.$set(t.ruleForm,"radio",e)},expression:"ruleForm.radio"}},[t._v("门店仅可见自己门店")])],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("ruleForm")}}},[t._v("保存")])],1)],1)],1)},staticRenderFns:[]};var o=a("VU/8")(l,r,!1,function(t){a("6p23")},"data-v-fd073cb6",null).exports,n={name:"storePermission",data:function(){return{navpath:[{name:"首页",path:"/index",relocation:!0},{name:"设置",path:"/companyAddress"},{name:"通讯录信息",path:"/staffDetails"},{name:"门店权限设置",path:""}],activeName:"a",brandList:[{id:"a",name:"A 品牌"},{id:"b",name:"B 品牌"},{id:"c",name:"C 品牌"},{id:"d",name:"D 品牌"}],switchList:{addName:"新增门店成员",addStatus:!1,delName:"删除门店成员",delStatus:!1,modName:"门店信息变更",modStatus:!1}}},computed:{},methods:{handleClick:function(t,e){console.log(t,e)},saveSwitch:function(){console.log(this.switchList)}},mounted:function(){},components:{navCrumb:i.a,setPermiss:o}},c={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"storePermission-wrap common-set-wrap"},[a("nav-crumb",{attrs:{navpath:t.navpath}}),t._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[t._l(t.brandList,function(e,i){return[a("el-tab-pane",{attrs:{label:e.name,name:e.id}},[a("set-permiss",{attrs:{permTitle:"店员"}}),t._v(" "),a("set-permiss",{attrs:{permTitle:"店长"}})],1)]})],2),t._v(" "),a("div",{staticClass:"storePermission-wrap-switch m-t-24"},[a("div",{staticClass:"storePermission-switch-title"},[t._v("\n 门店信息变更是否需要审核\n ")]),t._v(" "),a("div",{staticClass:"storePermission-switch-body"},[a("div",{staticClass:"switch-cell"},[a("el-switch",{attrs:{"inactive-text":t.switchList.addName},model:{value:t.switchList.addStatus,callback:function(e){t.$set(t.switchList,"addStatus",e)},expression:"switchList.addStatus"}})],1),t._v(" "),a("div",{staticClass:"switch-cell"},[a("el-switch",{attrs:{"inactive-text":t.switchList.delName},model:{value:t.switchList.delStatus,callback:function(e){t.$set(t.switchList,"delStatus",e)},expression:"switchList.delStatus"}})],1),t._v(" "),a("div",{staticClass:"switch-cell"},[a("el-switch",{attrs:{"inactive-text":t.switchList.modName},model:{value:t.switchList.modStatus,callback:function(e){t.$set(t.switchList,"modStatus",e)},expression:"switchList.modStatus"}})],1),t._v(" "),a("div",{staticClass:"switch-cell p-l-94"},[a("el-button",{attrs:{type:"primary"},on:{click:t.saveSwitch}},[t._v("保存")])],1)])])],1)]),t._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var m=a("VU/8")(n,c,!1,function(t){a("0OOK")},"data-v-ec10556a",null);e.default=m.exports}});
//# sourceMappingURL=15.282476f58e8ce2e0da33.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(f,r,d){for(var t,o,b,i=0,u=[];i<f.length;i++)o=f[i],a[o]&&u.push(a[o][0]),a[o]=0;for(t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);for(c&&c(f,r,d);u.length;)u.shift()();if(d)for(i=0;i<d.length;i++)b=n(n.s=d[i]);return b};var f={},a={40:0};function n(c){if(f[c])return f[c].exports;var a=f[c]={i:c,l:!1,exports:{}};return e[c].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.e=function(e){var c=a[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var f=new Promise(function(f,n){c=a[e]=[f,n]});c[2]=f;var r=document.getElementsByTagName("head")[0],d=document.createElement("script");d.type="text/javascript",d.charset="utf-8",d.async=!0,d.timeout=12e4,n.nc&&d.setAttribute("nonce",n.nc),d.src=n.p+"static/js/"+e+"."+{0:"d829021c8c194621ba60",1:"26fc7c6e9b4ccca95f46",2:"ee165cd7c3da71f4e1e5",3:"8dc43621cdb43995fa81",4:"4ef13d455e78fb56559e",5:"9fae73be076030f23027",6:"85ded4542bdc06fe1dc8",7:"1d773da64f8d355c7281",8:"e3791ae57d3dfcbeab3f",9:"676022d3fadcd8f4fc91",10:"5a83a112698c5e6e6199",11:"1c3a9e89a43cee6722ad",12:"c865623a1c91d006377a",13:"952beb31da1dca31ffd1",14:"1d74f7b247e8dd6ac194",15:"f4aa88f33402c13e08f2",16:"0b55b8d57afeff43f63f",17:"54b1fdea6bf1c163d4db",18:"20ded4fcaee76d2ec5c0",19:"fa30b19f8f6b906ab779",20:"b875b8cda2152e546a50",21:"b5c1a8410160395d1a49",22:"6dcc57fb20365fbb9c02",23:"5698c5d035e2fff7c162",24:"5d0c9291df4242ffb48b",25:"7eef6df8092c5211625c",26:"93aea3e51cf9af5a8000",27:"604d09f605f84f532aed",28:"ca5af18fa3f8c28f79fd",29:"084b68bd50ee5df0283c",30:"5c3baf1b5c4e15c42acf",31:"c5a44ed34c78fb4fd15e",32:"fa0bfaf946de5f100f36",33:"0c88bc831faa5c7ca4bc",34:"4317f8168ac0d561dc30",35:"dc4debf4138c2a553828",36:"7e634d239c1f1b8b816f",39:"b927f428ce496b8413eb"}[e]+".js";var t=setTimeout(o,12e4);function o(){d.onerror=d.onload=null,clearTimeout(t);var c=a[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),a[e]=void 0)}return d.onerror=d.onload=o,r.appendChild(d),f},n.m=e,n.c=f,n.d=function(e,c,f){n.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:f})},n.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(c,"a",c),c},n.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.54478c3b4733f95d1ed3.js.map
\ No newline at end of file
!function(e){var f=window.webpackJsonp;window.webpackJsonp=function(c,r,t){for(var d,o,b,i=0,u=[];i<c.length;i++)o=c[i],a[o]&&u.push(a[o][0]),a[o]=0;for(d in r)Object.prototype.hasOwnProperty.call(r,d)&&(e[d]=r[d]);for(f&&f(c,r,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)b=n(n.s=t[i]);return b};var c={},a={40:0};function n(f){if(c[f])return c[f].exports;var a=c[f]={i:f,l:!1,exports:{}};return e[f].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.e=function(e){var f=a[e];if(0===f)return new Promise(function(e){e()});if(f)return f[2];var c=new Promise(function(c,n){f=a[e]=[c,n]});f[2]=c;var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,n.nc&&t.setAttribute("nonce",n.nc),t.src=n.p+"static/js/"+e+"."+{0:"d34ced85430f27b10ef6",1:"26fc7c6e9b4ccca95f46",2:"0d7731aaf8fbd975e8f5",3:"f0d45e9cb31edac11335",4:"4ef13d455e78fb56559e",5:"9fae73be076030f23027",6:"e1525c8a575058188065",7:"078e0095140920f6aaf1",8:"15f50e99ddce7fff6916",9:"676022d3fadcd8f4fc91",10:"2ab72fd3172795e93e23",11:"7bcb1b22e9e5cdcd830f",12:"293d32ad8bb821f829d6",13:"2e44af68fb057b84b575",14:"1d74f7b247e8dd6ac194",15:"282476f58e8ce2e0da33",16:"0b55b8d57afeff43f63f",17:"54b1fdea6bf1c163d4db",18:"20ded4fcaee76d2ec5c0",19:"fa30b19f8f6b906ab779",20:"b875b8cda2152e546a50",21:"b5c1a8410160395d1a49",22:"6dcc57fb20365fbb9c02",23:"5698c5d035e2fff7c162",24:"5d0c9291df4242ffb48b",25:"7eef6df8092c5211625c",26:"93aea3e51cf9af5a8000",27:"604d09f605f84f532aed",28:"ca5af18fa3f8c28f79fd",29:"084b68bd50ee5df0283c",30:"5c3baf1b5c4e15c42acf",31:"c5a44ed34c78fb4fd15e",32:"fa0bfaf946de5f100f36",33:"0c88bc831faa5c7ca4bc",34:"4317f8168ac0d561dc30",35:"dc4debf4138c2a553828",36:"7e634d239c1f1b8b816f",39:"b927f428ce496b8413eb"}[e]+".js";var d=setTimeout(o,12e4);function o(){t.onerror=t.onload=null,clearTimeout(d);var f=a[e];0!==f&&(f&&f[1](new Error("Loading chunk "+e+" failed.")),a[e]=void 0)}return t.onerror=t.onload=o,r.appendChild(t),c},n.m=e,n.c=c,n.d=function(e,f,c){n.o(e,f)||Object.defineProperty(e,f,{configurable:!1,enumerable:!0,get:c})},n.n=function(e){var f=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(f,"a",f),f},n.o=function(e,f){return Object.prototype.hasOwnProperty.call(e,f)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.91ef00f840768cd11a25.js.map
\ No newline at end of file
......@@ -69,7 +69,7 @@ export default {
data() {
return {
};
},
methods: {
/**
......@@ -101,7 +101,7 @@ export default {
}
};
</script>
<style lang="scss">
.select-area {
......
......@@ -889,6 +889,7 @@ let defineInfo = [{
parentCode: 'defineInfo',
fieldCode: '-1',
fieldName: '单选框',
systemFlag: false,
fieldEdited: true, // 修改(0:不可修改,1:可修改)
fieldType: '2',
fixed: false,
......@@ -908,6 +909,7 @@ let defineInfo = [{
parentCode: 'defineInfo',
fieldCode: '-1',
fieldName: '多选框',
systemFlag: false,
fieldEdited: true, // 修改(0:不可修改,1:可修改)
fieldType: '3',
fixed: false,
......@@ -927,6 +929,7 @@ let defineInfo = [{
parentCode: 'defineInfo',
fieldCode: '-1',
fieldName: '日期',
systemFlag: false,
fieldEdited: true, // 修改(0:不可修改,1:可修改)
fieldType: '4',
fixed: false,
......@@ -946,6 +949,7 @@ let defineInfo = [{
parentCode: 'defineInfo',
fieldCode: '-1',
fieldName: '日期区间',
systemFlag: false,
fieldEdited: true, // 修改(0:不可修改,1:可修改)
fieldType: '5',
fixed: false,
......
<template>
<div class="select-area">
<div class="setting-name" style="font-size: 14px;color: #606266;">
允许指定部门/人员可见
</div>
<ul class="particular-list">
<template v-for="(li, index) in defaultSelection">
<li class="item person-item" v-if="li.employeeClerkId" :key="index+'_'+li.employeeClerkId">
<img :src="li.headPic">
<p class="name">{{li.label}}</p>
<i class="el-icon-circle-close" @click="delCurrent(index, defaultSelection)"></i>
</li>
<li class="item group-item" v-else :key="index+'_'+li.groupId">
{{li.label}}
<i class="el-icon-circle-close" @click="delCurrent(index, defaultSelection)"></i>
</li>
</template>
<li class="item J_add-btn" @click="showSelector('special', defaultSelection)"><i class="el-icon-plus"></i></li>
</ul>
<vue-select-employee
:defaultSelection="defaultSelection"
:treeSet="treeSet"
:treeData="treeData"
:onlyPerson="onlyPerson"
@handleSelectedList="handleSelectedList">
</vue-select-employee>
</div>
</template>
<script>
import { deepCopy } from '@/utils/index';
import vueSelectEmployee from "@/components/common/vueSelectEmployee";
import strLength from '@/common/js/strlen';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import { _debounce } from "@/common/js/public";
import { getRequest, postRequest, postJson, postForm } from '@/api/api';
export default {
name: "set-permiss-data",
components: {
vueSelectEmployee
},
props: {
value: {
type: [Object, Array],
default() {
return [];
}
},
},
data() {
return {
treeSet: {
isSelectPerson: true, // 控制只能选部门(false)
dialogVisible: false, // 控制显示/隐藏
isSingle: false // 是否单选
},
treeData: {},
defaultSelection: [], // 已选数据
onlyPerson: false, // 控制只能选人(true)
};
},
methods: {
/**
* 删除选中的人
*/
delCurrent(index, list) {
const that = this;
list.splice(index, 1);
},
updateList(data) {
const that = this;
that.$emit('input',data)
console.log(data)
},
/**
* 处理树形控件选择的数据
*/
handleSelectedList(list) {
const that = this;
console.log(list);
// that.defaultSelection = list
// that.$emit('input',list)
that.updateList(list)
},
/**
* 显示弹层
*/
showSelector() {
const that = this;
that.treeSet = {
dialogVisible: true,
isSingle: false,
isSelectPerson: true
};
if (!!that.treeData.hasOwnProperty('treeData')) {
return;
}
that.getDepartData(that.defaultSelection);
},
/**
* 获取行政架构
*/
getDepartData(selData) {
const that = this;
postRequest('/haoban-manage-web/dept/deptListForCompany',{})
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
let resData = res.data;
if (resData.errorCode == 1) {
// showMsg.showmsg('操作成功','success')
if (!!resData.result) {
let treeData = [];
let personData = [];
if (res.data.errorCode == 1) {
treeData = res.data.result.departmentList || [];
personData = res.data.result.searchList || []
}
// _this.formatGroupData(treeData, personData);
that.treeData = {
treeData,
personData
};
that.defaultSelection = selData;
}else {
that.$message.error({
duration: 1000,
message: '暂无数据'
})
}
return;
}
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
},
},
watch: {
value: function(newData,oldData) {
const that = this
// console.log(oldData,newData)
that.defaultSelection = newData
}
}
};
</script>
<style lang="scss">
.select-area {
.setting-name {
.a-href {
font-size: 12px;
margin-left: 10px;
}
}
.particular-list {
display: flex;
flex-wrap: wrap;
margin-bottom: 30px;
.item {
position: relative;
margin-right: 24px;
margin-top: 30px;
width: 40px;
.el-icon-circle-close {
position: absolute;
font-size: 16px;
color: #808995;
right: -8px;
top: -8px;
cursor: pointer;
}
img {
width: 100%;
border-radius: 4px;
}
.name {
font-size: 12px;
text-align: center;
margin-top: 20px;
}
&.group-item {
padding: 0 10px;
width: auto;
height: 30px;
line-height: 32px;
background: rgba(236, 245, 255, 1);
border: 1px solid rgba(217, 236, 255, 1);
border-radius: 4px;
font-size: 12px;
color: rgba(64, 158, 255, 1);
margin-top: 34px;
}
&.J_add-btn {
height: 40px;
background: rgba(251, 253, 255, 1);
border: 1px dashed rgba(192, 204, 218, 1);
border-radius: 50%;
text-align: center;
line-height: 40px;
font-size: 16px;
box-sizing: border-box;
cursor: pointer;
}
}
}
.check-more {
color: #409EFF;
margin: 20px 0;
cursor: pointer;
}
}
</style>
<!--
门店权限设置组件
<set-permiss :permTitle="'店员'"></set-permiss>
<set-permiss :permTitle="'店长'"></set-permiss>
-->
<template>
<div class="permiss-wrap">
<el-form label-width="110px" :model="ruleForm">
<el-form-item :label="permTitle+'可见权限'">
<el-radio v-model="ruleForm.radio" label="0">可见所有品牌门店架构和行政架构</el-radio>
</el-form-item>
<div class="permiss-child-cell">
<p>允许指定部门/人员可见:</p>
<el-form label-width="110px" :model="ruleForm" ref="ruleForm">
<el-radio-group v-model="ruleForm.radio" @change="changeRadio">
<el-form-item :label="permType == 1? '店员可见权限' : '店长可见权限'">
<el-radio :label="0">可见所有品牌门店架构和行政架构</el-radio>
</el-form-item>
<div class="permiss-child-cell" v-if="ruleForm.radio==0">
<setPermissData v-model="ruleForm.visibleAll"></setPermissData>
</div>
<el-form-item label=" ">
<el-radio :label="1">可见所在品牌门店架构和行政架构</el-radio>
</el-form-item>
<div class="permiss-child-cell" v-if="ruleForm.radio==1">
<setPermissData v-model="ruleForm.visibleAll"></setPermissData>
</div>
<el-form-item label=" ">
<el-radio :label="2">门店仅可见所有品牌门店架构</el-radio>
</el-form-item>
<div class="permiss-child-cell" v-if="ruleForm.radio==2">
<setPermissData v-model="ruleForm.visibleAll"></setPermissData>
</div>
<el-form-item label=" ">
<el-radio :label="3"> 门店仅可见自己品牌门店架构</el-radio>
</el-form-item>
<div class="permiss-child-cell" v-if="ruleForm.radio==3">
<setPermissData v-model="ruleForm.visibleAll"></setPermissData>
</div>
<el-form-item label=" ">
<el-radio :label="4">门店仅可见自己门店</el-radio>
</el-form-item>
<div class="permiss-child-cell" v-if="ruleForm.radio==4">
<setPermissData v-model="ruleForm.visibleAll"></setPermissData>
</div>
</el-radio-group>
</div>
<el-form-item label=" ">
<el-radio v-model="ruleForm.radio" label="1">可见所在品牌门店架构和行政架构</el-radio>
</el-form-item>
<el-form-item label=" ">
<el-radio v-model="ruleForm.radio" label="2">门店仅可见所有品牌门店架构</el-radio>
</el-form-item>
<el-form-item label=" ">
<el-radio v-model="ruleForm.radio" label="3"> 门店仅可见自己品牌门店架构</el-radio>
</el-form-item>
<el-form-item label=" ">
<el-radio v-model="ruleForm.radio" label="4">门店仅可见自己门店</el-radio>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
</el-form-item>
......@@ -31,6 +50,7 @@
</div>
</template>
<script>
import setPermissData from "@/components/set/set-permiss-data";
import strLength from '@/common/js/strlen';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
......@@ -39,47 +59,34 @@ import { getRequest, postRequest, postJson, postForm } from '@/api/api';
export default {
name: "",
props: {
imgSrc: {// 传入 input value
type: String,
default: ''
},
field: {
type: String,
default: ''
},
uploadLimit: {
type: Number,
default: 2
authData: {
type: [Object,Array]
},
permTitle: {
type: String
permType: {
type: [Number,String]
}
},
data() {
return {
projectName: '', // 当前项目名
imgShowFlag: false, // 是否弹框显示,true: 显示;false: 不显示
imgUrl: '', // 传递的图片 src
ruleForm: {
radio: '0',
radio: 0,
visibleAll: [
{
id: '1',
type: 'people',
name: '张三',
img: 'http://thirdwx.qlogo.cn/mmopen/j7nX4OeBsXRNyvh6micCywssVEYCaWiaicUZq5Vn2zWktWLAyRvEAH7icQmUhLze8rrQYpM5ptwZ2RL7cX0icyBbiavhYFNTIZhibKu/0'
},
{
id: '1',
type: 'store',
name: '张三',
}
],
storeVisibleAll: [],
storeOwnBrand: [],
storeOwnStore: []
// {
// id: '1',
// type: 'people',
// name: '张三',
// img: 'http://thirdwx.qlogo.cn/mmopen/j7nX4OeBsXRNyvh6micCywssVEYCaWiaicUZq5Vn2zWktWLAyRvEAH7icQmUhLze8rrQYpM5ptwZ2RL7cX0icyBbiavhYFNTIZhibKu/0'
// },
// {
// id: '1',
// type: 'store',
// name: '张三',
// }
]
}
}
},
......@@ -88,13 +95,23 @@ export default {
var host = window.location.origin;
console.log("当前host:",host)
if (host.indexOf('localhost') != '-1') {
that.baseUrl = 'http://gicdev.demogic.com';
that.baseUrl = 'http://www.gicdev.com';
}else {
that.baseUrl = host
}
},
methods: {
/**
* changeRadio
*/
changeRadio(value) {
const that = this;
console.log(value)
that.ruleForm.visibleAll = [];
},
/**
* 保存
*/
......@@ -103,7 +120,7 @@ export default {
that.$refs[formName].validate((valid) => {
console.log(valid)
if (valid) {
console.log(that.ruleForm)
} else {
return false;
}
......@@ -112,12 +129,48 @@ export default {
/**
*
* 门店权限设置
*/
setStoreAuth(data,type) {
const that = this;
let para = {
type: type, // 1: 店员, 2: 店长
brandId: data.brandId,
groupId: data.groupId,
storeEmployeeAuth: data.radio,
storeManagerAuth: data.radio,
allowCherkIds: data.allowCherkIds,
allowDepartIds: data.allowDepartIds
}
postRequest('/haoban-manage-web/brand/saveStoreAuth',para)
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('保存成功','success')
return;
}
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
},
},
mounted() {
const that = this;
},
components: {
setPermissData
},
}
</script>
......@@ -197,6 +250,13 @@ export default {
}
.permiss-wrap {
.permiss-child-cell {
width: 480px;
min-height: 154px;
border-radius: 2px;
background: #F5F7FA;
margin: 32px 0;
padding: 20px 20px 1px;
}
}
</style>
......@@ -1406,10 +1406,10 @@ export default {
let data = JSON.parse(JSON.stringify(result))
that.setParent = [];
data.forEach(function(ele,index){
ele.fixed = parseInt(ele.fixed) === 1? true : false;
ele.isMust = parseInt(ele.isMust) === 1? true : false;
ele.fieldEdited = parseInt(ele.fieldEdited) === 1? true : false;
ele.systemFlag = true;
ele.fixed = Number.parseInt(ele.fixed) === 1? true : false;
ele.isMust = Number.parseInt(ele.isMust) === 1? true : false;
ele.fieldEdited = Number.parseInt(ele.fieldEdited) === 1? true : false;
ele.systemFlag = Number.parseInt(ele.systemFlag) === 1? true : false;
ele.fieldOperations = !!ele.fieldOperations? JSON.parse(ele.fieldOperations): {};
ele.staffRecordsIds = !!ele.staffRecordsIds? JSON.parse(ele.staffRecordsIds): [];
// 设置禁止拖拽
......@@ -1422,7 +1422,10 @@ export default {
})
// console.log(JSON.stringify(that.treeData(data)))
that.tempaletDataList = that.treeData(data)
that.setFixed();
setTimeout(function(){
that.setFixed();
},10)
},
/**
......@@ -1430,7 +1433,7 @@ export default {
*/
setFixed() {
const that = this
// console.log(that.setParent)
// console.log("that.setParent:",that.setParent,that.setList)
that.setParent.forEach(function(ele,index){
that[ele].forEach(function(obj,key){
if (that.setList.includes(obj.fieldCode)) {
......
......@@ -5,10 +5,18 @@
<div class="right-box">
<el-tabs v-model="activeName" @tab-click="handleClick">
<template v-for="(item,index) in brandList">
<el-tab-pane :label="item.name" :name="item.id">
<el-tab-pane :label="item.name" :name="item.groupId">
<!-- {{item.name}} -->
<set-permiss :permTitle="'店员'"></set-permiss>
<set-permiss :permTitle="'店长'"></set-permiss>
<set-permiss
:permTitle="'店员'"
:authData="brandList.clerkData">
</set-permiss>
<set-permiss
:permTitle="'店长'"
:authData="brandList.managerData">
</set-permiss>
</el-tab-pane>
</template>
</el-tabs>
......@@ -19,22 +27,22 @@
<div class="storePermission-switch-body">
<div class="switch-cell">
<el-switch
v-model="switchList.addStatus"
v-model="switchList.addStoreClerkCheck"
:inactive-text="switchList.addName">
</el-switch>
</div>
<div class="switch-cell">
<el-switch
v-model="switchList.delStatus"
v-model="switchList.deleteStoreClerkCheck"
:inactive-text="switchList.delName">
</el-switch>
</div>
<div class="switch-cell">
<!-- <div class="switch-cell">
<el-switch
v-model="switchList.modStatus"
v-model="switchList.storeInformationChangeCheck"
:inactive-text="switchList.modName">
</el-switch>
</div>
</div> -->
<div class="switch-cell p-l-94">
<el-button type="primary" @click="saveSwitch">保存</el-button>
</div>
......@@ -79,34 +87,42 @@ export default {
}
],
// 品牌 tab
activeName: 'a',
activeName: '',// 显示的pannel,也是选择的 groupId
brandList: [
{
id: 'a',
name: 'A 品牌'
},
{
id: 'b',
name: 'B 品牌'
},
{
id: 'c',
name: 'C 品牌'
},
{
id: 'd',
name: 'D 品牌'
}
// {
// id: 'a',
// name: 'A 品牌',
// clerkData: {},
// managerData: {}
// },
// {
// id: 'b',
// name: 'B 品牌',
// clerkData: {},
// managerData: {}
// },
// {
// id: 'c',
// name: 'C 品牌',
// clerkData: {},
// managerData: {}
// },
// {
// id: 'd',
// name: 'D 品牌',
// clerkData: {},
// managerData: {}
// }
],
// 审核开关
switchList: {
addName: '新增门店成员',
addStatus: false,
addStoreClerkCheck: false,
delName: '删除门店成员',
delStatus: false,
deleteStoreClerkCheck: false,
modName: '门店信息变更',
modStatus: false,
storeInformationChangeCheck: false,
}
}
},
......@@ -118,20 +134,146 @@ export default {
* tab clcik
*/
handleClick(tab, event) {
const that = this
console.log(tab, event);
that.getStoreAuth(tab.name)
},
/**
* save
*/
saveSwitch() {
saveSwitch: _debounce(function() {
const that = this
console.log(that.switchList)
let data = JSON.parse(JSON.stringify(that.switchList))
data.addStoreClerkCheck = data.addStoreClerkCheck == true? 1: 0;
data.deleteStoreClerkCheck = data.deleteStoreClerkCheck == true? 1: 0;
data.storeInformationChangeCheck = data.storeInformationChangeCheck == true? 1: 0;
that.setStoreAuth(data)
},600),
/**
* 门店权限设置
*/
setStoreAuth(data) {
const that = this;
let para = {
brandId: data.brandId,
groupId: data.groupId,
addStoreClerkCheck: data.addStoreClerkCheck,
deleteStoreClerkCheck: data.deleteStoreClerkCheck,
storeInformationChangeCheck: data.storeInformationChangeCheck,
}
postRequest('/haoban-manage-web/brand/saveStoreAuth',para)
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('保存成功','success')
return;
}
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
},
/**
* 获取门店权限设置
*/
getStoreAuth(groupId) {
const that = this;
let para = {
groupId: groupId
}
postRequest('/haoban-manage-web/brand/storeAuth',para)
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
let resData = res.data;
if (resData.errorCode == 1) {
// showMsg.showmsg('操作成功','success')
if (!!resData.result) {
that.brandList.clerkData = [];
// 设置开关
let brandDTO = resData.result.brandDTO;
brandDTO.addStoreClerkCheck = brandDTO.addStoreClerkCheck == 1? true: false;
brandDTO.deleteStoreClerkCheck = brandDTO.deleteStoreClerkCheck == 1? true: false;
brandDTO.storeInformationChangeCheck = brandDTO.storeInformationChangeCheck == 1? true: false;
that.switchList = Object.assign(that.switchList,brandDTO);
}else {
that.$message.error({
duration: 1000,
message: '暂无数据'
})
}
return;
}
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
},
/**
* 获取品牌列表
*/
getBrandData() {
const that = this;
postRequest('/haoban-manage-web/brand/list',{})
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
let resData = res.data;
if (resData.errorCode == 1) {
// showMsg.showmsg('操作成功','success')
if (!!resData.result && !!resData.result.length ) {
that.brandList = resData.result
that.activeName = resData.result[0].groupId;
that.getStoreAuth(resData.result[0].groupId)
}else {
that.$message.error({
duration: 1000,
message: '暂无数据'
})
}
return;
}
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
}
},
mounted() {
const that = this
that.getBrandData();
},
components: {
navCrumb,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment