Commit b22ad54e by 无尘

fix: 修改同步设置

parent 270c2b61
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.24.css><link href=./static/css/app.9d5e419657a441956e60cdab32ac8025.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.03484afa9e67efcc47cb.js></script><script type=text/javascript src=./static/js/vendor.e91073f106903eddf860.js></script><script type=text/javascript src=./static/js/app.a27b284b16025e675856.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 rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.24.css><link href=./static/css/app.e3af313cd4267cdad9607ccd5dabf441.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.f613519c4ab348f101b9.js></script><script type=text/javascript src=./static/js/vendor.e91073f106903eddf860.js></script><script type=text/javascript src=./static/js/app.a27b284b16025e675856.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.
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,n,r){for(var b,t,o,i=0,u=[];i<c.length;i++)t=c[i],f[t]&&u.push(f[t][0]),f[t]=0;for(b in n)Object.prototype.hasOwnProperty.call(n,b)&&(e[b]=n[b]);for(a&&a(c,n,r);u.length;)u.shift()();if(r)for(i=0;i<r.length;i++)o=d(d.s=r[i]);return o};var c={},f={51:0};function d(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,d),f.l=!0,f.exports}d.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,d){a=f[e]=[c,d]});a[2]=c;var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.timeout=12e4,d.nc&&r.setAttribute("nonce",d.nc),r.src=d.p+"static/js/"+e+"."+{0:"b5c2beb958a50f5beadb",1:"06c4e42e62c1f75191f0",2:"6db64b5ffdd29f770da4",3:"e6962450c8d5738c3319",4:"f1674bae959e941960b1",5:"e75b9134f23b114e30b2",6:"b748d7ac73a6d6700725",7:"ee9b4ffcf8a8cc2fde16",8:"bda5789112a4386ac684",9:"5e6b743726e7d8438871",10:"cdc6733af07fe3483e78",11:"529019747940d70381f8",12:"8c2e25b234e6c994122b",13:"f25d0ff003f8a1649b4c",14:"a034fd161b8c1b267354",15:"161afee4880a4b61c3f9",16:"982b6d4cc452775c1826",17:"91e2fe42aacd5fd73d9e",18:"a4c6826038e63e26db84",19:"56fbc2476082c554cb76",20:"7f3a92bcf5a66089600a",21:"857b8bbdd27214a8bc25",22:"9ad786a93be8761b954d",23:"44f8721a4e37849af31a",24:"d38696f55116fb585eae",25:"882138467fb4700637f0",26:"861a130a705ab90f18c9",27:"9b0fe9c79aebb055c7de",28:"544f03cfbdf475ad174b",29:"bc43fde10c870859a8a3",30:"8b6920d460412aedcfde",31:"053210fefb0665c59480",32:"1f767b857ef3d058d56e",33:"40d5132a7fe6147ba9ef",34:"be3b5d7a4cc5e32f0dfd",35:"4a15da14c5a042b2d797",36:"7f1b6adc72a543c5455e",37:"e868e5aa804da0b6eb8b",38:"9823df8050bae6e59dc5",39:"13770623cd0155327e56",40:"f6ef482085cccdca5f67",41:"d2e13a048e460fe7db63",42:"bbfc8147188dfd7ffd12",43:"5d2d83cd76295aac795e",44:"894c9353222f503048dd",45:"e943700ad9539430cc2a",46:"3ebb7632373e949c4784",47:"db2230e175441528fa76",48:"bda5c55f72a191ae99c2"}[e]+".js";var b=setTimeout(t,12e4);function t(){r.onerror=r.onload=null,clearTimeout(b);var a=f[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return r.onerror=r.onload=t,n.appendChild(r),c},d.m=e,d.c=c,d.d=function(e,a,c){d.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},d.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(a,"a",a),a},d.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},d.p="./",d.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,n,r){for(var t,b,o,i=0,u=[];i<a.length;i++)b=a[i],f[b]&&u.push(f[b][0]),f[b]=0;for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);for(c&&c(a,n,r);u.length;)u.shift()();if(r)for(i=0;i<r.length;i++)o=d(d.s=r[i]);return o};var a={},f={51:0};function d(c){if(a[c])return a[c].exports;var f=a[c]={i:c,l:!1,exports:{}};return e[c].call(f.exports,f,f.exports,d),f.l=!0,f.exports}d.e=function(e){var c=f[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,d){c=f[e]=[a,d]});c[2]=a;var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.timeout=12e4,d.nc&&r.setAttribute("nonce",d.nc),r.src=d.p+"static/js/"+e+"."+{0:"b5c2beb958a50f5beadb",1:"06c4e42e62c1f75191f0",2:"6db64b5ffdd29f770da4",3:"e6962450c8d5738c3319",4:"f1674bae959e941960b1",5:"70c17aedc4457511973c",6:"b748d7ac73a6d6700725",7:"ee9b4ffcf8a8cc2fde16",8:"bda5789112a4386ac684",9:"5e6b743726e7d8438871",10:"cdc6733af07fe3483e78",11:"529019747940d70381f8",12:"8c2e25b234e6c994122b",13:"b206981c3a29ab04c807",14:"a034fd161b8c1b267354",15:"161afee4880a4b61c3f9",16:"982b6d4cc452775c1826",17:"91e2fe42aacd5fd73d9e",18:"a4c6826038e63e26db84",19:"56fbc2476082c554cb76",20:"7f3a92bcf5a66089600a",21:"857b8bbdd27214a8bc25",22:"9ad786a93be8761b954d",23:"44f8721a4e37849af31a",24:"d38696f55116fb585eae",25:"882138467fb4700637f0",26:"861a130a705ab90f18c9",27:"9b0fe9c79aebb055c7de",28:"544f03cfbdf475ad174b",29:"bc43fde10c870859a8a3",30:"8b6920d460412aedcfde",31:"053210fefb0665c59480",32:"1f767b857ef3d058d56e",33:"40d5132a7fe6147ba9ef",34:"be3b5d7a4cc5e32f0dfd",35:"4a15da14c5a042b2d797",36:"7f1b6adc72a543c5455e",37:"e868e5aa804da0b6eb8b",38:"9823df8050bae6e59dc5",39:"13770623cd0155327e56",40:"f6ef482085cccdca5f67",41:"d2e13a048e460fe7db63",42:"bbfc8147188dfd7ffd12",43:"5d2d83cd76295aac795e",44:"894c9353222f503048dd",45:"e943700ad9539430cc2a",46:"3ebb7632373e949c4784",47:"db2230e175441528fa76",48:"bda5c55f72a191ae99c2"}[e]+".js";var t=setTimeout(b,12e4);function b(){r.onerror=r.onload=null,clearTimeout(t);var c=f[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return r.onerror=r.onload=b,n.appendChild(r),a},d.m=e,d.c=a,d.d=function(e,c,a){d.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},d.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(c,"a",c),c},d.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},d.p="./",d.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-08-14 16:51:07
* @LastEditors: 无尘
* @LastEditTime: 2020-03-09 18:19:22
* @LastEditTime: 2020-03-10 18:41:33
-->
<!--
<wx-tree v-model="itemData" ></wx-tree>
......@@ -194,7 +194,7 @@ export default {
}
const objKey = !!value['added'] ? 'added' : !!value['moved'] ? 'moved' : 'removed';
if (!!objKey) {
if (!!objKey && objKey != 'removed') {
let sort = '';
for (let index = 0; index < that.itemObj.children.length; index++) {
that.itemObj.children[index].sort = index;
......@@ -203,13 +203,15 @@ export default {
that.itemObj.children[index].parentId = that.itemObj.departmentId;
that.itemObj.children[index].parentDepartmentId = that.itemObj.departmentId;
that.itemObj.children[index].level = that.itemObj.level + 1;
// added 且 wxEnterpriseId 不存在
that.itemObj.children[index].addFlag = that.itemObj.children[index].addFlag ? that.itemObj.children[index].addFlag : objKey == 'added' && !that.itemObj.children[index].wxEnterpriseId ? true : false;
}
if (that.itemObj.children[index].children.length) {
await that.handleAdded(that.itemObj.children[index], that.itemObj.children[index].addFlag ? that.itemObj.children[index].addFlag : objKey == 'added' && !that.itemObj.children[index].wxEnterpriseId);
//await that.handleAdded(that.itemObj.children[index], that.itemObj.children[index].addFlag ? that.itemObj.children[index].addFlag : objKey == 'added' && !that.itemObj.children[index].wxEnterpriseId);
}
}
console.log('父级:', that.itemObj);
let newEle = JSON.parse(JSON.stringify(value[objKey].element));
newEle.parentId = that.itemObj.departmentId;
newEle.parentDepartmentId = that.itemObj.departmentId;
......@@ -222,7 +224,8 @@ export default {
if (newEle.children.length) {
await that.handleAdded(newEle, newEle.addFlag);
}
console.log('移入部门数据:', newEle);
console.log('移入部门数据:', newEle,that.itemObj);
that.$nextTick(() => {
// 同级移动,如果是新增部门同级移动,不用存数据
console.log('同级移动,如果是新增部门同级移动!');
......@@ -265,8 +268,8 @@ export default {
}
// 企业微信跨级移动,如果是新增部门跨级移动,删老数据---属于新增
if (objKey == 'added' && newEle.addFlag && !!newEle.wxEnterpriseId) {
console.log('跨级移动,如果是新增部门跨级移动!,删除老数据');
if (objKey == 'added' && newEle.addFlag && !newEle.wxEnterpriseId) {
console.log('跨级移动,如果是新增部门跨级移动!,删除老数据,--属于新增');
// 去掉重复的父级
let storeEditDataWxAdd = [];
that.$store.state.addDepartment.forEach(ele => {
......@@ -291,7 +294,7 @@ export default {
// 企业微信跨级移动,如果是老部门
if (objKey == 'added' && !newEle.addFlag && !!newEle.wxEnterpriseId) {
if (that.itemData.length) {
console.log(that.itemObj)
console.log('企业微信跨级移动,是老部门:',that.itemObj)
that.itemObj.hasSonNode = true;
}
// 去掉重复的父级
......@@ -331,7 +334,7 @@ export default {
that.$emit('changeParent', that.itemObj, 'edit');
return false;
}
console.log('addFlag:');
console.log('addFlag: gic 移动到企业微信:');
// 父级去重
let storeEditGic = [];
that.$store.state.editDepartment.forEach(ele => {
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-03-09 14:30:48
* @LastEditTime: 2020-03-10 17:49:50
-->
<template>
<div class="my-customer-wrap common-set-wrap">
......@@ -160,6 +160,37 @@ export default {
showMsg.showmsg('暂无修改,无法同步', 'warning');
return false;
}
// 去除重复添加数据
// 1.
if (that.$store.state.addDepartment.length) {
let hash = {};
let arr = JSON.parse(JSON.stringify(that.$store.state.addDepartment));
arr = arr.reduce(function(item, next) {
hash[next.departmentId] ? '' : (hash[next.departmentId] = true && item.push(next));
return item;
}, []);
console.log(arr);
that.$store.dispatch('clearAddData');
arr.forEach(ele => {
that.$store.dispatch('saveAddInfo', ele);
});
}
// 去除重复添加数据
// 1.
if (that.$store.state.editDepartment.length) {
let hash = {};
let arr = JSON.parse(JSON.stringify(that.$store.state.editDepartment));
arr = arr.reduce(function(item, next) {
hash[next.departmentId] ? '' : (hash[next.departmentId] = true && item.push(next));
return item;
}, []);
console.log(arr);
that.$store.dispatch('clearEditData');
arr.forEach(ele => {
that.$store.dispatch('saveEditInfo', ele);
});
}
console.log('同步数据:', that.$store.state.addDepartment, that.$store.state.editDepartment);
that.postSaveData();
}, 300),
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘
* @LastEditTime: 2020-03-10 16:22:09
* @LastEditTime: 2020-03-10 18:23:18
-->
<template>
<div class="login-wrap">
......
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