Commit 35589833 by 无尘

fix:修改同步

parent d64ef05b
<!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.83d9e5b430cec2bc3528eb83c7892570.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.44888dcd31b5496ed917.js></script><script type=text/javascript src=./static/js/vendor.e91073f106903eddf860.js></script><script type=text/javascript src=./static/js/app.0f1258cdf1a78a8ecb62.js></script></body></html> <!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.8b9c1da0084f68103f6ec902955c97ca.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.cb26b36c6c01cbc13770.js></script><script type=text/javascript src=./static/js/vendor.e91073f106903eddf860.js></script><script type=text/javascript src=./static/js/app.0f1258cdf1a78a8ecb62.js></script></body></html>
\ No newline at end of file \ 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 c=window.webpackJsonp;window.webpackJsonp=function(a,b,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],f[t]&&u.push(f[t][0]),f[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(c&&c(a,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=d(d.s=n[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 b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,d.nc&&n.setAttribute("nonce",d.nc),n.src=d.p+"static/js/"+e+"."+{0:"dbf05147df3025a8713a",1:"06c4e42e62c1f75191f0",2:"7115b16f94e04565cedf",3:"edbca100e837b95f44a7",4:"eca86cac3c54fcaa8626",5:"ebbb32b343371e807504",6:"b748d7ac73a6d6700725",7:"905c04cf1b259e515073",8:"046fad46a415c0979300",9:"916e0ede46ca141d75b8",10:"8144b2952e608c99c868",11:"e17569badebc0d03b94f",12:"106cadf87efaf0fd28ce",13:"0f01707cee8bf5918701",14:"a034fd161b8c1b267354",15:"fe7adb86092d73ec2e30",16:"97a9b1a559ec27dad923",17:"7446f565455fbad09abd",18:"65b8c661308214b7851e",19:"74ba19395c578980c999",20:"7f3a92bcf5a66089600a",21:"0ec7408bb99f857e7132",22:"cb80178f17dc0f1c1385",23:"0bfefe1fb2943c2d9f63",24:"d38696f55116fb585eae",25:"38258b0c4882cceb6247",26:"839ceddcbb7c83ecd658",27:"d9bc2e42a9916006c06a",28:"8041015221e712dfacfb",29:"a99995fa30469c828e9b",30:"228a3b991afd830e5824",31:"25fdf8d4a8892be0c481",32:"22fcab94d4b8d6c87e72",33:"af03022c94f58809aa77",34:"dce139ae594034f17a52",35:"ed9ebdd61aa7a7301b39",36:"e86539c9400400aeca81",37:"c74e9e3d53219b3ac1ff",38:"424a8230959ada09c944",39:"7dfcaaab2bdeab04f8e8",40:"26ef55c1adb75adce860",41:"409fc320bb5afcd95dbe",42:"6323f9cc051bdb6fd81e",43:"a7cd861dacf5abddd542",44:"894c9353222f503048dd",45:"45e4397c0ca09b32eb25",46:"b8a25437acb57de97830",47:"da9b899d98080bcbc0a4",48:"750f3261e51d2d100d96"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=f[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),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}}([]); !function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,n,r){for(var b,t,o,i=0,u=[];i<a.length;i++)t=a[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(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:"dbf05147df3025a8713a",1:"06c4e42e62c1f75191f0",2:"7115b16f94e04565cedf",3:"edbca100e837b95f44a7",4:"eca86cac3c54fcaa8626",5:"fa01c215121a76bb6d55",6:"b748d7ac73a6d6700725",7:"905c04cf1b259e515073",8:"046fad46a415c0979300",9:"916e0ede46ca141d75b8",10:"8144b2952e608c99c868",11:"e17569badebc0d03b94f",12:"106cadf87efaf0fd28ce",13:"0f01707cee8bf5918701",14:"a034fd161b8c1b267354",15:"fe7adb86092d73ec2e30",16:"97a9b1a559ec27dad923",17:"7446f565455fbad09abd",18:"65b8c661308214b7851e",19:"74ba19395c578980c999",20:"7f3a92bcf5a66089600a",21:"0ec7408bb99f857e7132",22:"cb80178f17dc0f1c1385",23:"0bfefe1fb2943c2d9f63",24:"d38696f55116fb585eae",25:"38258b0c4882cceb6247",26:"839ceddcbb7c83ecd658",27:"d9bc2e42a9916006c06a",28:"8041015221e712dfacfb",29:"a99995fa30469c828e9b",30:"228a3b991afd830e5824",31:"25fdf8d4a8892be0c481",32:"22fcab94d4b8d6c87e72",33:"af03022c94f58809aa77",34:"dce139ae594034f17a52",35:"ed9ebdd61aa7a7301b39",36:"e86539c9400400aeca81",37:"c74e9e3d53219b3ac1ff",38:"424a8230959ada09c944",39:"7dfcaaab2bdeab04f8e8",40:"26ef55c1adb75adce860",41:"409fc320bb5afcd95dbe",42:"6323f9cc051bdb6fd81e",43:"a7cd861dacf5abddd542",44:"894c9353222f503048dd",45:"45e4397c0ca09b32eb25",46:"b8a25437acb57de97830",47:"da9b899d98080bcbc0a4",48:"750f3261e51d2d100d96"}[e]+".js";var b=setTimeout(t,12e4);function t(){r.onerror=r.onload=null,clearTimeout(b);var c=f[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return r.onerror=r.onload=t,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 \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-08-14 16:51:07 * @Date: 2019-08-14 16:51:07
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-03-09 10:10:12 * @LastEditTime: 2020-03-09 10:27:15
--> -->
<!-- <!--
<wx-tree v-model="itemData" ></wx-tree> <wx-tree v-model="itemData" ></wx-tree>
...@@ -167,6 +167,8 @@ export default { ...@@ -167,6 +167,8 @@ export default {
handleAdded(pitem, addFlag) { handleAdded(pitem, addFlag) {
const that = this; const that = this;
pitem.children.forEach((ele, index) => { pitem.children.forEach((ele, index) => {
ele.parentId = pitem.departmentId;
ele.parentDepartmentId = pitem.departmentId;
ele.level = pitem.level + 1; ele.level = pitem.level + 1;
// 如果gic部门移入是多层级的,需要设置子级的 addFlag // 如果gic部门移入是多层级的,需要设置子级的 addFlag
ele.addFlag = !!addFlag ? true : false; ele.addFlag = !!addFlag ? true : false;
...@@ -188,6 +190,8 @@ export default { ...@@ -188,6 +190,8 @@ export default {
that.itemObj.children[index].sort = index; that.itemObj.children[index].sort = index;
if (value[objKey].element.departmentId == that.itemObj.children[index].departmentId) { if (value[objKey].element.departmentId == that.itemObj.children[index].departmentId) {
sort = index; sort = index;
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; that.itemObj.children[index].level = that.itemObj.level + 1;
that.itemObj.children[index].addFlag = that.itemObj.children[index].addFlag ? that.itemObj.children[index].addFlag : objKey == 'added' && !that.itemObj.children[index].wxEnterpriseId ? true : false; that.itemObj.children[index].addFlag = that.itemObj.children[index].addFlag ? that.itemObj.children[index].addFlag : objKey == 'added' && !that.itemObj.children[index].wxEnterpriseId ? true : false;
} }
...@@ -195,6 +199,7 @@ export default { ...@@ -195,6 +199,7 @@ export default {
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)); let newEle = JSON.parse(JSON.stringify(value[objKey].element));
newEle.parentId = that.itemObj.departmentId; newEle.parentId = that.itemObj.departmentId;
newEle.parentDepartmentId = that.itemObj.departmentId; newEle.parentDepartmentId = that.itemObj.departmentId;
...@@ -379,7 +384,7 @@ export default { ...@@ -379,7 +384,7 @@ export default {
*/ */
modChild(item) { modChild(item) {
const that = this; const that = this;
// console.log('修改:', item); console.log('修改:', item);
// item.label = 2222; // item.label = 2222;
that.modItem = item; that.modItem = item;
that.addShow = true; that.addShow = true;
...@@ -398,6 +403,7 @@ export default { ...@@ -398,6 +403,7 @@ export default {
// 如果是新增后又编辑,---属于新增 // 如果是新增后又编辑,---属于新增
if (that.modItem.addFlag) { if (that.modItem.addFlag) {
// 去掉重复的父级 // 去掉重复的父级
console.log('新增后又编辑:',that.$store.state.addDepartment)
let storeAddData = []; let storeAddData = [];
that.$store.state.addDepartment.forEach(ele => { that.$store.state.addDepartment.forEach(ele => {
if (ele.departmentId != that.modItem.departmentId) { if (ele.departmentId != that.modItem.departmentId) {
...@@ -409,7 +415,7 @@ export default { ...@@ -409,7 +415,7 @@ export default {
that.$store.dispatch('saveAddInfo', ele); that.$store.dispatch('saveAddInfo', ele);
}); });
that.$store.dispatch('saveAddInfo', that.modItem); that.$store.dispatch('saveAddInfo', that.modItem);
console.log('新增后又编辑,---属于新增:') console.log('新增后又编辑,---属于新增:',that.modItem)
return false; return false;
} }
that.$store.dispatch('saveEditInfo', that.modItem); that.$store.dispatch('saveEditInfo', that.modItem);
......
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