Commit 68467416 by 无尘

fix: 修改模板数据

parent d0b660dc
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.dd217e791769e3b0441d0788958e33b8.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.562754639cbb21a10403.js></script><script type=text/javascript src=./static/js/vendor.a4eb31cddc47b5c14557.js></script><script type=text/javascript src=./static/js/app.9b90a23558282c4c599b.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.6c6689c8043710b5de84c4b905ed1413.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.d4183e0bea72d95102f8.js></script><script type=text/javascript src=./static/js/vendor.a4eb31cddc47b5c14557.js></script><script type=text/javascript src=./static/js/app.9b90a23558282c4c599b.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.
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(n,f,c){for(var o,d,b,i=0,u=[];i<n.length;i++)d=n[i],r[d]&&u.push(r[d][0]),r[d]=0;for(o in f)Object.prototype.hasOwnProperty.call(f,o)&&(e[o]=f[o]);for(a&&a(n,f,c);u.length;)u.shift()();if(c)for(i=0;i<c.length;i++)b=t(t.s=c[i]);return b};var n={},r={32:0};function t(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.e=function(e){var a=r[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var n=new Promise(function(n,t){a=r[e]=[n,t]});a[2]=n;var f=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,t.nc&&c.setAttribute("nonce",t.nc),c.src=t.p+"static/js/"+e+"."+{0:"aabce8f9342722bc3f2f",1:"26fc7c6e9b4ccca95f46",2:"40b08166160f0c236e21",3:"d1c23a8791a51bacaed1",4:"3090f9f51ac2a6d6153a",5:"6bab2c16596dfeda8919",6:"1f821f83de71f205fb49",7:"23bb38d03d9540d0d331",8:"f98480a2e9f07af1c200",9:"181fc9edf7a61804b7ec",10:"efd234e03eae1fa9f9a2",11:"a6597defe4a96fb1006c",12:"9764d4ae699e5614c2a2",13:"56f2783c415a9bee8f54",14:"c9f0ae58b38a47c68653",15:"584904084d983e1f1f83",16:"839e92d6d0b9dddc8118",17:"bb777189e3cf26419057",18:"510599f7144300961720",19:"89578854328b793401e6",20:"efa0a2e8e5ceaa765966",21:"535c4d73365c76ddb8d9",22:"efee25c5eb4b5d4f5fe6",23:"2e8631d136d983aec412",24:"5865910b82f5a71d5eb9",25:"0d3069d544067552953b",26:"72b48eb28c90dbd97585",27:"0e36ae9e3824eafd2bdb",28:"8550f6196994ff79e383",29:"dd94297d78b2276aa0fe"}[e]+".js";var o=setTimeout(d,12e4);function d(){c.onerror=c.onload=null,clearTimeout(o);var a=r[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return c.onerror=c.onload=d,f.appendChild(c),n},t.m=e,t.c=n,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="./",t.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.562754639cbb21a10403.js.map
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(n,f,c){for(var o,d,b,i=0,u=[];i<n.length;i++)d=n[i],r[d]&&u.push(r[d][0]),r[d]=0;for(o in f)Object.prototype.hasOwnProperty.call(f,o)&&(e[o]=f[o]);for(a&&a(n,f,c);u.length;)u.shift()();if(c)for(i=0;i<c.length;i++)b=t(t.s=c[i]);return b};var n={},r={32:0};function t(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.e=function(e){var a=r[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var n=new Promise(function(n,t){a=r[e]=[n,t]});a[2]=n;var f=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,t.nc&&c.setAttribute("nonce",t.nc),c.src=t.p+"static/js/"+e+"."+{0:"aabce8f9342722bc3f2f",1:"26fc7c6e9b4ccca95f46",2:"d1fc633eecd2f92399e8",3:"d1c23a8791a51bacaed1",4:"3090f9f51ac2a6d6153a",5:"6bab2c16596dfeda8919",6:"1f821f83de71f205fb49",7:"23bb38d03d9540d0d331",8:"f98480a2e9f07af1c200",9:"181fc9edf7a61804b7ec",10:"efd234e03eae1fa9f9a2",11:"a6597defe4a96fb1006c",12:"9764d4ae699e5614c2a2",13:"56f2783c415a9bee8f54",14:"c9f0ae58b38a47c68653",15:"584904084d983e1f1f83",16:"839e92d6d0b9dddc8118",17:"bb777189e3cf26419057",18:"510599f7144300961720",19:"89578854328b793401e6",20:"efa0a2e8e5ceaa765966",21:"535c4d73365c76ddb8d9",22:"efee25c5eb4b5d4f5fe6",23:"2e8631d136d983aec412",24:"5865910b82f5a71d5eb9",25:"0d3069d544067552953b",26:"72b48eb28c90dbd97585",27:"0e36ae9e3824eafd2bdb",28:"8550f6196994ff79e383",29:"dd94297d78b2276aa0fe"}[e]+".js";var o=setTimeout(d,12e4);function d(){c.onerror=c.onload=null,clearTimeout(o);var a=r[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return c.onerror=c.onload=d,f.appendChild(c),n},t.m=e,t.c=n,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="./",t.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.d4183e0bea72d95102f8.js.map
\ No newline at end of file
......@@ -423,7 +423,7 @@
:limitClass="'limit-color'"
:inputValue.sync="childItem.fieldOperations.unit"
:holder="''"
:disflag='childItem.fieldEdited'
:disflag='false'
:getByType="'word'"
:maxLength="20">
</limitInput>
......@@ -593,6 +593,9 @@ export default {
fieldDescription: '',
children:[
],
fieldType: "",
staffRecordsIds: [],
status: ''
},
{
parentCode: '0',
......@@ -607,6 +610,9 @@ export default {
fieldDescription: '',
children:[
],
fieldType: "",
staffRecordsIds: [],
status: ''
},
{
parentCode: '0',
......@@ -621,6 +627,9 @@ export default {
fieldDescription: '',
children:[
],
fieldType: "",
staffRecordsIds: [],
status: ''
},
{
parentCode: '0',
......@@ -635,6 +644,9 @@ export default {
fieldDescription: '',
children:[
],
fieldType: "",
staffRecordsIds: [],
status: ''
},
{
parentCode: '0',
......@@ -649,6 +661,9 @@ export default {
fieldDescription: '',
children:[
],
fieldType: "",
staffRecordsIds: [],
status: ''
},
{
parentCode: '0',
......@@ -663,6 +678,9 @@ export default {
fieldDescription: '',
children:[
],
fieldType: "",
staffRecordsIds: [],
status: ''
},
{
parentCode: '0',
......@@ -677,6 +695,9 @@ export default {
fieldDescription: '',
children:[
],
fieldType: "",
staffRecordsIds: [],
status: ''
},
],
......@@ -1095,7 +1116,8 @@ export default {
ele.fieldEdited = ele.fieldEdited === true? 1 : 0;
ele.systemFlag = ele.systemFlag === true? 1 : 0;
ele.fieldTemplateId = ele.fieldTemplateId? ele.fieldTemplateId : that.getUuid();
ele.parentFieldTemplateId = ele.parentFieldTemplateId? ele.parentFieldTemplateId : -1;
ele.fieldTemplateId = ele.fieldTemplateId? ele.fieldTemplateId : -1;
ele.children.forEach(function(el,ind){
el.sort = ind;
......@@ -1116,11 +1138,18 @@ export default {
el.parentCode == ele.fieldCode
}
// 设置 uuid
el.fieldTemplateId = el.fieldTemplateId? el.fieldTemplateId : that.getUuid();
el.fieldTemplateId = el.fieldTemplateId? el.fieldTemplateId : -1;
el.parentFieldTemplateId = ele.fieldTemplateId
data.push(el)
})
})
data.forEach(function(ele,index){
if (ele.hasOwnProperty('children')) {
delete ele.children;
}
})
console.log(JSON.stringify(data))
that.saveAllData(data)
......@@ -1194,6 +1223,8 @@ export default {
ele.systemFlag = true;
ele.fieldOperations = !!ele.fieldOperations? JSON.parse(ele.fieldOperations): {};
ele.staffRecordsIds = !!ele.staffRecordsIds? JSON.parse(ele.staffRecordsIds): [];
that[ele.parentCode].push(ele);
};
......@@ -1236,27 +1267,48 @@ export default {
},
/**
* 简单数组-->父子数组对象
*/
treeData(data){
console.log(data)
let tree = data.filter((father)=>{ //循环所有项
let branchArr = data.filter((child)=>{
return father.fieldCode == child.parentCode; //返回每一项的子级数组
});
if(branchArr.length>0){
father.children = branchArr; //如果存在子级,则给父级添加一个children属性,并赋值
}
return father.parentCode == 0; //返回第一层
});
console.log(tree)
return tree;
},
/**
* 处理已存配置信息
*/
handleGetInfo(result) {
const that = this
let data = JSON.parse(result.templateContent)
let data = JSON.parse(JSON.stringify(result))
that.setParent = [];
data.data.forEach(function(ele,index){
that.setParent.push(ele.systemFieldId);
// 判断子级
if (!!ele.children&&ele.children.length) {
ele.children.forEach(function(el,index){
that.setList.push(el.systemFieldId);
})
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.fieldOperations = !!ele.fieldOperations? JSON.parse(ele.fieldOperations): {};
ele.staffRecordsIds = !!ele.staffRecordsIds? JSON.parse(ele.staffRecordsIds): [];
// 设置禁止拖拽
if (!!ele.systemFlag && ele.parentCode == 0) {
that.setParent.push(ele.fieldCode)
}
if (!!ele.systemFlag && ele.parentCode != 0) {
that.setList.push(ele.fieldCode)
}
})
that.radomKey = data.sumAll;
console.log(data,that.radomKey)
// that.tempaletDataList = data.data
// that.setFixed();
that.tempaletDataList = that.treeData(data)
that.setFixed();
},
/**
......@@ -1267,7 +1319,7 @@ export default {
console.log(that.setParent)
that.setParent.forEach(function(ele,index){
that[ele].forEach(function(obj,key){
if (that.setList.includes(obj.systemFieldId)) {
if (that.setList.includes(obj.fieldCode)) {
obj.fixed = true
}
})
......
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