Commit 4b9ee995 by 无尘

fix: 修改门店权限

parent 0f7a6e25
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.4403f17cee402eb57d8538bd879500f9.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.b7f866132c3937e83c8c.js></script><script type=text/javascript src=./static/js/vendor.8cde7fbdd64c3f1de5c0.js></script><script type=text/javascript src=./static/js/app.bc774100e8fc38920d8e.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.e8d3f624c87c69cb0bdfc82e422801be.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.7b3b18ce1140013c5a28.js></script><script type=text/javascript src=./static/js/vendor.8cde7fbdd64c3f1de5c0.js></script><script type=text/javascript src=./static/js/app.bc774100e8fc38920d8e.js></script></body></html>
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,r,t){for(var d,o,b,i=0,u=[];i<c.length;i++)o=c[i],f[o]&&u.push(f[o][0]),f[o]=0;for(d in r)Object.prototype.hasOwnProperty.call(r,d)&&(e[d]=r[d]);for(a&&a(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={},f={43:0};function n(a){if(c[a])return c[a].exports;var f=c[a]={i:a,l:!1,exports:{}};return e[a].call(f.exports,f,f.exports,n),f.l=!0,f.exports}n.e=function(e){var a=f[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,n){a=f[e]=[c,n]});a[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:"5b244b4d62fd48c1a7e9",1:"26fc7c6e9b4ccca95f46",2:"ee165cd7c3da71f4e1e5",3:"6bf37852f9ea0f51ef14",4:"c67fe033b6c83b3b883e",5:"c7d53ecd070be55299f2",6:"9fa43789935628147ea9",7:"257dadd901486d2a9fb6",8:"8eb8ad8e264409c8c5f4",9:"7841b6ec061a605454f8",10:"5a83a112698c5e6e6199",11:"1c3a9e89a43cee6722ad",12:"c865623a1c91d006377a",13:"952beb31da1dca31ffd1",14:"1d74f7b247e8dd6ac194",15:"49773f2dbbd1e645ea81",16:"9217d5601aedccc3e6a9",17:"0392e5f15a3db17332b0",18:"bf72547d03e968bea528",19:"e64cbc99542ae36c225d",20:"a13fc30aa8a8b01a5d37",21:"b5c1a8410160395d1a49",22:"246ef46110a7b99a49dd",23:"b6a5caa8c620761c17cb",24:"2a1ef63c5a31f51536f4",25:"3742aa0753861ce59d60",26:"21ec2065edd3463975f6",27:"02ec6ac54d996e59b61e",28:"9eb92e5fdc070dc1965d",29:"99b28c43fee055ca99cc",30:"f94e52609b0ae41cf49e",31:"053bc3cb00fa76689748",32:"441d630be4a90fe2cda8",33:"3ad556d147428ad00563",34:"d4f8d06aa9ce141238a0",35:"cb6535ff833d41835e4f",36:"51d597ce8e1af0e5fa66",37:"f18973f306ce3778dd66",38:"4ce42c1a07e83f31f7d3",39:"5a3033b57a48007ecb21",42:"86aa31ff7beb8e130fd1"}[e]+".js";var d=setTimeout(o,12e4);function o(){t.onerror=t.onload=null,clearTimeout(d);var a=f[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return t.onerror=t.onload=o,r.appendChild(t),c},n.m=e,n.c=c,n.d=function(e,a,c){n.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,"a",a),a},n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.b7f866132c3937e83c8c.js.map
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,r,t){for(var d,o,b,i=0,u=[];i<c.length;i++)o=c[i],f[o]&&u.push(f[o][0]),f[o]=0;for(d in r)Object.prototype.hasOwnProperty.call(r,d)&&(e[d]=r[d]);for(a&&a(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={},f={43:0};function n(a){if(c[a])return c[a].exports;var f=c[a]={i:a,l:!1,exports:{}};return e[a].call(f.exports,f,f.exports,n),f.l=!0,f.exports}n.e=function(e){var a=f[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,n){a=f[e]=[c,n]});a[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:"5b244b4d62fd48c1a7e9",1:"26fc7c6e9b4ccca95f46",2:"ee165cd7c3da71f4e1e5",3:"6bf37852f9ea0f51ef14",4:"c67fe033b6c83b3b883e",5:"c7d53ecd070be55299f2",6:"9fa43789935628147ea9",7:"257dadd901486d2a9fb6",8:"8eb8ad8e264409c8c5f4",9:"7841b6ec061a605454f8",10:"5a83a112698c5e6e6199",11:"1c3a9e89a43cee6722ad",12:"c865623a1c91d006377a",13:"952beb31da1dca31ffd1",14:"1d74f7b247e8dd6ac194",15:"70dc0450b7398ab26f1f",16:"9217d5601aedccc3e6a9",17:"0392e5f15a3db17332b0",18:"bf72547d03e968bea528",19:"e64cbc99542ae36c225d",20:"a13fc30aa8a8b01a5d37",21:"b5c1a8410160395d1a49",22:"246ef46110a7b99a49dd",23:"b6a5caa8c620761c17cb",24:"2a1ef63c5a31f51536f4",25:"3742aa0753861ce59d60",26:"21ec2065edd3463975f6",27:"02ec6ac54d996e59b61e",28:"9eb92e5fdc070dc1965d",29:"99b28c43fee055ca99cc",30:"f94e52609b0ae41cf49e",31:"053bc3cb00fa76689748",32:"441d630be4a90fe2cda8",33:"3ad556d147428ad00563",34:"d4f8d06aa9ce141238a0",35:"cb6535ff833d41835e4f",36:"51d597ce8e1af0e5fa66",37:"f18973f306ce3778dd66",38:"4ce42c1a07e83f31f7d3",39:"5a3033b57a48007ecb21",42:"86aa31ff7beb8e130fd1"}[e]+".js";var d=setTimeout(o,12e4);function o(){t.onerror=t.onload=null,clearTimeout(d);var a=f[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return t.onerror=t.onload=o,r.appendChild(t),c},n.m=e,n.c=c,n.d=function(e,a,c){n.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,"a",a),a},n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.7b3b18ce1140013c5a28.js.map
\ No newline at end of file
......@@ -4,14 +4,14 @@
允许指定部门/人员可见
</div>
<ul class="particular-list">
<template v-for="(li, index) in defaultSelection">
<li class="item person-item" v-if="li.type == 1" :key="index+'_'+li.employeeClerkId">
<img :src="li.headPic">
<p class="name">{{li.name}}</p>
<template v-for="(item, index) in defaultSelection">
<li class="item person-item" v-if="item.type == 1 || item.employeeClerkId" :key="index+'_'+item.employeeClerkId">
<img :src="item.headPic">
<p class="name">{{item.name}}</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.name}}
<li class="item group-item" v-else :key="index+'_'+item.groupId">
{{item.name}}
<i class="el-icon-circle-close" @click="delCurrent(index, defaultSelection)"></i>
</li>
</template>
......
......@@ -142,7 +142,7 @@ export default {
that.$refs[formName].validate((valid) => {
console.log(valid)
if (valid) {
console.log(that.ruleForm)
console.log(that.ruleForm,that.ruleForm.visibleAll)
let data = {
allowCherkIds: [],
allowDepartIds: [],
......@@ -151,7 +151,7 @@ export default {
radio: that.ruleForm.radio
};
if (!that.ruleForm.visibleAll.lenght) {
if (!that.ruleForm.visibleAll.length) {
that.$message.error({
duration: 1000,
message: '请选择指定部门/人员'
......@@ -161,8 +161,12 @@ export default {
that.ruleForm.visibleAll.forEach(function(ele,index){
if (ele.hasOwnProperty('employeeClerkId')) {
data.allowCherkIds.push(ele.employeeClerkId)
}else {
}else if (ele.hasOwnProperty('groupId')) {
data.allowDepartIds.push(ele.groupId)
}else if (Number.parseInt(ele.type) === 1) {
data.allowCherkIds.push(ele.id)
}else if (Number.parseInt(ele.type) === 2){
data.allowDepartIds.push(ele.id)
}
})
that.setStoreAuth(data,that.permType)
......@@ -193,16 +197,12 @@ export default {
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
......@@ -220,11 +220,30 @@ export default {
that.ruleForm.brandId = data.brandId;
that.ruleForm.groupId = data.groupId;
if (Number.parseInt(that.permType) === 1 ) {// && !!data.employeeAuthList.length
if (!!data.employeeAuthList.length) {
data.employeeAuthList.forEach(function(ele,index){
// 组件内参数需要
if (Number.parseInt(ele.type) === 2) {
ele.groupId = ele.id;
}
ele.label = ele.name
})
}
that.ruleForm.visibleAll = data.employeeAuthList;
that.defaultSelection = data.employeeAuthList;
}
if (Number.parseInt(that.permType) === 2 ) { // && !!data.managerAuthList.length
if (!!data.managerAuthList.length) {
data.managerAuthList.forEach(function(ele,index){
// 组件内参数需要
if (Number.parseInt(ele.type) === 2) {
ele.groupId = ele.id;
}
ele.label = ele.name
})
}
that.ruleForm.visibleAll = data.managerAuthList;
that.defaultSelection = data.managerAuthList;
}
......@@ -240,6 +259,7 @@ export default {
isSingle: false,
isSelectPerson: true
};
console.log(that.defaultSelection)
that.defaultSelection = that.ruleForm.visibleAll;
},
......@@ -271,7 +291,6 @@ export default {
treeData = res.data.result.departmentList || [];
personData = res.data.result.searchList || []
}
// _this.formatGroupData(treeData, personData);
that.treeData = {
treeData,
personData
......@@ -305,13 +324,13 @@ export default {
watch: {
authData: function(newData,oldData) {
const that = this
console.log("authData:",oldData,newData)
// console.log("authData:",oldData,newData)
that.handleAuthData(newData)
}
},
mounted() {
const that = this;
console.log(that.authData)
// console.log(that.authData)
that.handleAuthData(that.authData)
that.getDepartData()
},
......
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