|
- var Ce=Object.defineProperty,$e=Object.defineProperties;var we=Object.getOwnPropertyDescriptors;var se=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable;var oe=(y,i,d)=>i in y?Ce(y,i,{enumerable:!0,configurable:!0,writable:!0,value:d}):y[i]=d,R=(y,i)=>{for(var d in i||(i={}))Ue.call(i,d)&&oe(y,d,i[d]);if(se)for(var d of se(i))Te.call(i,d)&&oe(y,d,i[d]);return y},Y=(y,i)=>$e(y,we(i));var S=(y,i,d)=>new Promise((A,a)=>{var G=w=>{try{z(d.next(w))}catch(P){a(P)}},H=w=>{try{z(d.throw(w))}catch(P){a(P)}},z=w=>w.done?A(w.value):Promise.resolve(w.value).then(G,H);z((d=d.apply(y,i)).next())});import{_ as je,d as Se,r as N,b as ne,o as Ie,f,a9 as Oe,g as c,h,i as _,w as Ee,K as V,m as l,l as e,p as I,j as g,G as U,L as q,P as Ne,q as qe}from"./index.812d876b.js";import ze from"./tagsManageDialog.346de4e8.js";import Pe from"./expertOpinionTempDialog.a468b82f.js";import{c as Le,a as ue,t as Me}from"./templateConfig.fa6f0cc0.js";import Re from"./expertReviewTemplateConfig.6b4f10dd.js";import"./index.d81d809d.js";import"./reviewTemplateConfig.a98214d4.js";import"./getIsShowRegionTree.c7265b41.js";const Ae={class:"footerPage"},Be={class:"flex justify-between items-center"},Fe={class:"module-box"},Je={class:"flex items-center flexRight h-full"},Ke=["onClick"],Ge={class:"flex items-center flexRight h-full"},He=["onClick"],Qe=["onClick"],We={class:"flex"},Xe={class:"flex items-center flexRight h-full"},Ye=["onClick"],Ze=["onClick"],xe={class:"flex items-center flexRight h-full"},el=["onClick"],ll=["onClick"],al={class:"footer justify-center"},tl=Se({name:"templateConfig"}),sl=Object.assign(tl,{setup(y){const i=N("\u5BA1\u67E5\u6E05\u5355\u914D\u7F6E"),d=N(!1),A=N(),a=N(),G=()=>{a.value.templateDetails.push({name:"",children:[{name:"",children:[{}]}]})},H=o=>{a.value.templateDetails.splice(o,1)},z=o=>{a.value.templateDetails[o].children.push({children:[{}]})},w=(o,n)=>{a.value.templateDetails[o].children.splice(n,1)},P=(o,n)=>{a.value.templateDetails[o].children[n].children.push({})},re=(o,n,u)=>{a.value.templateDetails[o].children[n].children.splice(u,1)},ce=(o,n,u)=>{a.value.templateDetails[o].children[n].children[u].children.push({tagId:void 0,name:"\u5185\u5BB9\u5206\u7C7B",value:{rejectionSituation:"",content:""}})},ie=(o,n,u,D)=>{a.value.templateDetails[o].children[n].children[u].children.splice(D,1)},de=(o,n,u,D)=>S(this,null,function*(){o==="\u5BA1\u67E5\u5185\u5BB9"?a.value.templateDetails[n].children[u].children[D]={type:"\u5BA1\u67E5\u5185\u5BB9",name:"\u5BA1\u67E5\u5185\u5BB9",tagId:void 0,value:{rejectionSituation:"",content:""}}:a.value.templateDetails[n].children[u].children[D]={type:"\u5185\u5BB9\u5206\u7C7B",name:"",children:[{tagId:void 0,name:"\u5185\u5BB9\u5206\u7C7B",value:{rejectionSituation:"",content:""}}]}}),{proxy:pe}=qe(),me=o=>S(this,null,function*(){!o||(yield o.validate(n=>S(this,null,function*(){if(n){d.value=!0;const u=Z(a.value.templateDetails);try{yield Le(u),pe.$message.success("\u4FDD\u5B58\u6210\u529F"),d.value=!1}catch(D){d.value=!1}}})))}),Z=o=>{const n=[];return o.forEach(u=>{var D;n.push(Y(R({},u),{value:u.value?JSON.stringify(u.value):void 0,type:void 0,children:(D=u.children)!=null&&D.length?Z(u.children):void 0}))}),n},B=ne({visible:!1,data:void 0}),ve=()=>{B.visible=!0},fe=()=>S(this,null,function*(){const o=yield ue();F.value=o.data,B.visible=!1}),C=ne({visible:!1,data:void 0,isAll:!1}),x=o=>{o?(C.isAll=!1,C.data=o):(C.isAll=!0,C.data=void 0),C.visible=!0},he=()=>{C.visible=!1},_e=o=>{C.isAll?a.value.templateDetails.forEach(n=>{n.children.forEach(u=>{u.value=R(R({},u.value),o.value)})}):Ne(()=>{Object.entries(o).forEach(n=>{C.data[n[0]]=n[1]})})},F=N(),ge=()=>S(this,null,function*(){const o=yield ue();F.value=o.data,De()}),Q=N(!0),De=()=>S(this,null,function*(){var n;Q.value=!0;const o=yield Me();a.value=(n=o.data)!=null&&n.length?{templateDetails:ee(o.data)}:{templateDetails:[{name:"",children:[{name:"",children:[{}]}]}]},Q.value=!1}),ee=o=>{const n=[];return o.forEach(u=>{var D;n.push(Y(R({},u),{value:u.value?JSON.parse(u.value):void 0,type:u.levelNum===3&&u.name==="\u5BA1\u67E5\u5185\u5BB9"?"\u5BA1\u67E5\u5185\u5BB9":u.levelNum===3&&u.name!=="\u5BA1\u67E5\u5185\u5BB9"?"\u5185\u5BB9\u5206\u7C7B":void 0,children:(D=u.children)!=null&&D.length?ee(u.children):void 0}))}),n};return Ie(()=>{ge()}),(o,n)=>{const u=f("el-tab-pane"),D=f("el-tabs"),L=f("el-button"),T=f("el-input"),$=f("el-form-item"),m=f("el-col"),J=f("Delete"),j=f("el-icon"),O=f("el-row"),W=f("Plus"),le=f("el-radio"),be=f("el-radio-group"),ae=f("el-option"),te=f("el-select"),ye=f("el-form"),Ve=f("el-card"),ke=Oe("loading");return c(),h(U,null,[_("div",Ae,[Ee((c(),V(Ve,{class:"tab-card"},{header:l(()=>[_("div",Be,[e(D,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=E=>i.value=E)},{default:l(()=>[e(u,{name:"\u4E13\u5BB6\u8BC4\u5BA1\u6A21\u677F",label:"\u4E13\u5BB6\u8BC4\u5BA1\u6A21\u677F"}),e(u,{name:"\u5BA1\u67E5\u6E05\u5355\u914D\u7F6E",label:"\u5BA1\u67E5\u6E05\u5355\u914D\u7F6E"})]),_:1},8,["modelValue"]),_("div",null,[e(L,{type:"primary",size:"small",onClick:n[1]||(n[1]=E=>x())},{default:l(()=>[I("\u4E00\u952E\u6DFB\u52A0\u4E13\u5BB6\u610F\u89C1\u6A21\u677F")]),_:1}),e(L,{type:"primary",size:"small",onClick:ve},{default:l(()=>[I("\u6807\u7B7E\u7BA1\u7406")]),_:1})])])]),default:l(()=>[i.value==="\u4E13\u5BB6\u8BC4\u5BA1\u6A21\u677F"?(c(),V(Re,{key:0})):g("v-if",!0),i.value==="\u5BA1\u67E5\u6E05\u5355\u914D\u7F6E"?(c(),V(ye,{key:1,ref_key:"formRef",ref:A,"label-suffix":"\uFF1A",model:a.value,"label-width":"100",class:"tree-template"},{default:l(()=>{var E;return[(c(!0),h(U,null,q((E=a.value)==null?void 0:E.templateDetails,(K,t)=>(c(),h("div",{key:t},[_("div",Fe,[e(O,{class:"mb-16",gutter:16},{default:l(()=>{var M;return[e(m,{span:12},{default:l(()=>[e($,{label:"\u5BA1\u67E5\u7EF4\u5EA6",prop:`templateDetails[${t}].name`,rules:{required:!0,message:"\u8BF7\u8F93\u5165"}},{default:l(()=>[e(T,{modelValue:a.value.templateDetails[t].name,"onUpdate:modelValue":s=>a.value.templateDetails[t].name=s,placeholder:"\u8BF7\u8F93\u5165\u5BA1\u67E5\u7EF4\u5EA6",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),((M=a.value.templateDetails)==null?void 0:M.length)>1?(c(),V(m,{key:0,span:12},{default:l(()=>[_("div",Je,[_("p",{class:"add-icon del",onClick:s=>H(t)},[e(j,{style:{color:"rgb(255,59,48)","font-size":"14px"}},{default:l(()=>[e(J)]),_:1})],8,Ke)])]),_:2},1024)):g("v-if",!0)]}),_:2},1024),(c(!0),h(U,null,q(K.children,(M,s)=>(c(),h("div",{key:s,class:"ml-8 pl-16 sub-item two"},[e(O,{class:"mb-16",gutter:16},{default:l(()=>[e(m,{span:12},{default:l(()=>[e($,{label:"\u5BA1\u67E5\u9879",prop:`templateDetails[${t}].children[${s}].name`,rules:{required:!0,message:"\u8BF7\u8F93\u5165"}},{default:l(()=>[e(T,{modelValue:a.value.templateDetails[t].children[s].name,"onUpdate:modelValue":b=>a.value.templateDetails[t].children[s].name=b,placeholder:"\u8BF7\u8F93\u5165\u5BA1\u67E5\u9879",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:2},1024),e(m,{span:8},{default:l(()=>[e(L,{icon:"Plus",size:"small",type:"primary",plain:"",onClick:b=>x(a.value.templateDetails[t].children[s])},{default:l(()=>[I("\u4E13\u5BB6\u610F\u89C1\u6A21\u677F")]),_:2},1032,["onClick"])]),_:2},1024),e(m,{span:4},{default:l(()=>{var b;return[_("div",Ge,[_("p",{class:"add-icon mr-4",onClick:r=>z(t)},[e(j,{class:"addIcon"},{default:l(()=>[e(W)]),_:1})],8,He),((b=K==null?void 0:K.children)==null?void 0:b.length)>1?(c(),h("p",{key:0,class:"add-icon del",onClick:r=>w(t,s)},[e(j,{style:{color:"rgb(255,59,48)","font-size":"14px"}},{default:l(()=>[e(J)]),_:1})],8,Qe)):g("v-if",!0)])]}),_:2},1024)]),_:2},1024),(c(!0),h(U,null,q(M.children,(b,r)=>(c(),h("div",{key:r,class:"pl-60 sub-item three"},[e(O,{class:"mb-16",gutter:16},{default:l(()=>[e(m,{span:20,class:"mb-16"},{default:l(()=>[_("div",We,[e($,{prop:`templateDetails[${t}].children[${s}].children[${r}].type`,rules:{required:!0,message:"\u8BF7\u9009\u62E9"},"label-width":"0"},{default:l(()=>[e(be,{modelValue:a.value.templateDetails[t].children[s].children[r].type,"onUpdate:modelValue":p=>a.value.templateDetails[t].children[s].children[r].type=p,onChange:p=>de(p,t,s,r)},{default:l(()=>[e(le,{label:"\u5BA1\u67E5\u5185\u5BB9"},{default:l(()=>[I("\u5BA1\u67E5\u5185\u5BB9")]),_:1}),e(le,{label:"\u5185\u5BB9\u5206\u7C7B"},{default:l(()=>[I("\u5185\u5BB9\u5206\u7C7B")]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["prop"]),b.type==="\u5185\u5BB9\u5206\u7C7B"?(c(),V($,{key:0,"label-width":"10"},{default:l(()=>[e(T,{modelValue:a.value.templateDetails[t].children[s].children[r].name,"onUpdate:modelValue":p=>a.value.templateDetails[t].children[s].children[r].name=p},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)):g("v-if",!0)])]),_:2},1024),e(m,{span:4},{default:l(()=>{var p;return[_("div",Xe,[_("p",{class:"add-icon mr-4",onClick:v=>P(t,s)},[e(j,{class:"addIcon"},{default:l(()=>[e(W)]),_:1})],8,Ye),((p=M.children)==null?void 0:p.length)>1?(c(),h("p",{key:0,class:"add-icon del",onClick:v=>re(t,s,r)},[e(j,{style:{color:"rgb(255,59,48)","font-size":"14px"}},{default:l(()=>[e(J)]),_:1})],8,Ze)):g("v-if",!0)])]}),_:2},1024),b.type==="\u5BA1\u67E5\u5185\u5BB9"?(c(),h(U,{key:0},[e(m,{span:12},{default:l(()=>[e($,{label:"\u5BA1\u67E5\u5185\u5BB9",prop:`templateDetails[${t}].children[${s}].children[${r}].value.content`,rules:{required:!0,message:"\u8BF7\u8F93\u5165"}},{default:l(()=>[a.value.templateDetails[t].children[s].children[r].value?(c(),V(T,{key:0,modelValue:a.value.templateDetails[t].children[s].children[r].value.content,"onUpdate:modelValue":p=>a.value.templateDetails[t].children[s].children[r].value.content=p,type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u67E5\u5185\u5BB9",clearable:""},null,8,["modelValue","onUpdate:modelValue"])):g("v-if",!0)]),_:2},1032,["prop"])]),_:2},1024),e(m,{span:12,class:"mb-16"},{default:l(()=>[e($,{label:"\u5426\u51B3\u60C5\u5F62",prop:`templateDetails[${t}].children[${s}].children[${r}].value['rejectionSituation']`,rules:{required:!0,message:"\u8BF7\u8F93\u5165"}},{default:l(()=>[a.value.templateDetails[t].children[s].children[r].value?(c(),V(T,{key:0,modelValue:a.value.templateDetails[t].children[s].children[r].value.rejectionSituation,"onUpdate:modelValue":p=>a.value.templateDetails[t].children[s].children[r].value.rejectionSituation=p,type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5426\u51B3\u60C5\u5F62",clearable:""},null,8,["modelValue","onUpdate:modelValue"])):g("v-if",!0)]),_:2},1032,["prop"])]),_:2},1024),e(m,{span:12},{default:l(()=>[e($,{label:"\u5173\u8054\u6807\u7B7E"},{default:l(()=>[e(te,{modelValue:a.value.templateDetails[t].children[s].children[r].tagId,"onUpdate:modelValue":p=>a.value.templateDetails[t].children[s].children[r].tagId=p,class:"w-full"},{default:l(()=>[(c(!0),h(U,null,q(F.value,(p,v)=>(c(),V(ae,{key:v,value:p.id,label:p.name},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)],64)):g("v-if",!0)]),_:2},1024),b.type==="\u5185\u5BB9\u5206\u7C7B"?(c(!0),h(U,{key:0},q(b.children,(p,v)=>(c(),h("div",{key:v,class:"pl-32 sub-item four"},[e(O,{gutter:4,class:"mb-16"},{default:l(()=>[e(m,{span:20},{default:l(()=>[e(O,{gutter:16},{default:l(()=>[e(m,{span:12},{default:l(()=>[e($,{label:"\u5BA1\u67E5\u5185\u5BB9",prop:`templateDetails[${t}].children[${s}].children[${r}].children[${v}].value.content`,rules:{required:!0,message:"\u8BF7\u8F93\u5165"}},{default:l(()=>[a.value.templateDetails[t].children[s].children[r].children[v].value?(c(),V(T,{key:0,modelValue:a.value.templateDetails[t].children[s].children[r].children[v].value.content,"onUpdate:modelValue":k=>a.value.templateDetails[t].children[s].children[r].children[v].value.content=k,type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u67E5\u5185\u5BB9",clearable:""},null,8,["modelValue","onUpdate:modelValue"])):g("v-if",!0)]),_:2},1032,["prop"])]),_:2},1024),e(m,{span:12,class:"mb-16"},{default:l(()=>[e($,{label:"\u5426\u51B3\u60C5\u5F62",prop:`templateDetails[${t}].children[${s}].children[${r}].children[${v}].value.responseSituation`,rules:{required:!0,message:"\u8BF7\u8F93\u5165"}},{default:l(()=>[a.value.templateDetails[t].children[s].children[r].children[v].value?(c(),V(T,{key:0,modelValue:a.value.templateDetails[t].children[s].children[r].children[v].value.responseSituation,"onUpdate:modelValue":k=>a.value.templateDetails[t].children[s].children[r].children[v].value.responseSituation=k,type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5426\u51B3\u60C5\u5F62",clearable:""},null,8,["modelValue","onUpdate:modelValue"])):g("v-if",!0)]),_:2},1032,["prop"])]),_:2},1024),e(m,{span:12},{default:l(()=>[e($,{label:"\u5173\u8054\u6807\u7B7E"},{default:l(()=>[e(te,{modelValue:a.value.templateDetails[t].children[s].children[r].children[v].tagId,"onUpdate:modelValue":k=>a.value.templateDetails[t].children[s].children[r].children[v].tagId=k,class:"w-full"},{default:l(()=>[(c(!0),h(U,null,q(F.value,(k,X)=>(c(),V(ae,{key:X,value:k.id,label:k.name},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024),e(m,{span:4},{default:l(()=>[e(O,null,{default:l(()=>[e(m,{span:24},{default:l(()=>{var k;return[_("div",xe,[_("p",{class:"add-icon mr-4",onClick:X=>ce(t,s,r)},[e(j,{class:"addIcon"},{default:l(()=>[e(W)]),_:1})],8,el),((k=b==null?void 0:b.children)==null?void 0:k.length)>1?(c(),h("p",{key:0,class:"add-icon del",onClick:X=>ie(t,s,r,v)},[e(j,{style:{color:"rgb(255,59,48)","font-size":"14px"}},{default:l(()=>[e(J)]),_:1})],8,ll)):g("v-if",!0)])]}),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]))),128)):g("v-if",!0)]))),128))]))),128))])]))),128)),e(L,{type:"primary",plain:"",icon:"Plus",size:"small",class:"w-full mb-16",onClick:G},{default:l(()=>[I("\u6DFB\u52A0\u5BA1\u67E5\u7EF4\u5EA6")]),_:1})]}),_:1},8,["model"])):g("v-if",!0)]),_:1})),[[ke,Q.value]]),_("div",al,[i.value==="\u5BA1\u67E5\u6E05\u5355\u914D\u7F6E"?(c(),V(L,{key:0,type:"primary",loading:d.value,onClick:n[2]||(n[2]=E=>me(A.value))},{default:l(()=>[I(" \u4FDD\u5B58\u914D\u7F6E ")]),_:1},8,["loading"])):g("v-if",!0)])]),e(ze,{visible:B.visible,data:B.data,onClose:fe},null,8,["visible","data"]),e(Pe,{visible:C.visible,data:C.data,"onUpdate:data":_e,onClose:he},null,8,["visible","data"])],64)}}}),vl=je(sl,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/systemManage/templateConfig/index.vue"]]);export{vl as default};
|