|
- var ie=Object.defineProperty,ue=Object.defineProperties;var se=Object.getOwnPropertyDescriptors;var W=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable;var A=(m,d,i)=>d in m?ie(m,d,{enumerable:!0,configurable:!0,writable:!0,value:i}):m[d]=i,L=(m,d)=>{for(var i in d||(d={}))re.call(d,i)&&A(m,i,d[i]);if(W)for(var i of W(d))me.call(d,i)&&A(m,i,d[i]);return m},B=(m,d)=>ue(m,se(d));var x=(m,d,i)=>new Promise((p,g)=>{var N=s=>{try{k(i.next(s))}catch(C){g(C)}},T=s=>{try{k(i.throw(s))}catch(C){g(C)}},k=s=>s.done?p(s.value):Promise.resolve(s.value).then(N,T);k((i=i.apply(m,d)).next())});import{_ as pe,d as fe,D as ve,b as _e,r as c,e as r,f as b,g as S,k as e,l,h as w,F as U,J as H,j as ce,I,m as _,i as Q,a3 as ge,N as xe,p as be}from"./index.11dc4694.js";import{E as Ve}from"./index.0394235d.js";import{j as ye,k as we,l as ke,m as Ce,g as De}from"./indicatorTemplate.96eacb73.js";import Le from"./tagDialog.8a8a87f2.js";const Ne={class:"flex justify-between items-center"},Te=w("span",null,"\u6307\u6807\u5217\u8868",-1),he=["onClick"],Se=["onClick"],Ue=fe({name:"projectTagStore"}),$e=Object.assign(Ue,{setup(m){const{proxy:d}=be(),{indexLevelOptions:i}=ve.dictStore.globalDicts||{},p=_e({regionCode:void 0,indexName:void 0,indexLevel:void 0}),g=c(),N=c(0),T=c([]),k=[{label:"\u5E8F\u53F7",type:"index",width:"60"},{label:"\u6307\u6807\u540D\u79F0",key:"indexName",prop:"indexName",minWidth:"200",showOverflowTooltip:!0},{label:"\u6307\u6807\u7EA7\u522B",key:"indexLevel",prop:"indexLevel",width:"100",render:n=>ge("span",i[n.indexLevel])},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"120",fixed:"right"}],s=(...a)=>x(this,[...a],function*(n=g.value.pageParams){var f;const u=yield ye(L(L({},n),p));T.value=((f=u==null?void 0:u.data)==null?void 0:f.records)||[],N.value=u.data.total||0}),C=()=>{s()},X=()=>{p.indexName=void 0,p.indexLevel=void 0,g.value.pageParams.pageNumber=1,g.value.pageParams.pageSize=10,s()},Y=n=>{p.regionCode=n.regionLevel===3?n.regionCode:void 0,g.value.pageParams.pageNumber=1,s()},$=c(!1),j=c(),o=c({additional:!1}),q=c(),Z={indexName:[{required:!0,message:"\u8BF7\u8F93\u5165"}],indexLevel:[{required:!0,message:"\u8BF7\u9009\u62E9"}],additional:[{required:!0,message:"\u8BF7\u9009\u62E9"}],indexScore:[{required:!0,message:"\u8BF7\u8F93\u5165"}],indexDetail:[{required:!0,message:"\u8BF7\u8F93\u5165"}],gradeDetail:[{required:!0,message:"\u8BF7\u8F93\u5165"}],supportMaterial:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},h=c(!1),M=(n,a)=>x(this,null,function*(){if(te(),a){const u=yield we(a);o.value=B(L({},u.data),{tagIds:u.data.tags.map(f=>f.id)})}j.value=n,$.value=!0,yield xe(),q.value.clearValidate()}),ee=n=>x(this,null,function*(){!n||(yield n.validate(a=>x(this,null,function*(){if(a){h.value=!0;const u=B(L({},o.value),{regionCode:p.regionCode,additional:o.value.indexLevel===3?o.value.additional:void 0});try{yield ke(u),d.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),h.value=!1,z(!0)}catch(f){h.value=!1}}})))}),z=n=>{n&&s(),o.value={},$.value=!1},le=n=>{d.$messageBox.confirm(`\u662F\u5426\u5220\u9664${n.indexName}?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(()=>x(this,null,function*(){yield Ce(n.id),d.$message.success("\u5220\u9664\u6210\u529F\uFF01"),yield s()}))},P=c(!1),ae=()=>{P.value=!1},O=c([]),te=()=>x(this,null,function*(){const n=yield De({pageNumber:1,pageSize:1e3});O.value=n.data.records});return(n,a)=>{const u=r("el-col"),f=r("el-input"),v=r("el-form-item"),R=r("el-option"),E=r("el-select"),V=r("el-button"),F=r("el-row"),G=r("el-form"),J=r("el-card"),oe=r("table-list"),D=r("el-radio"),K=r("el-radio-group"),ne=r("el-input-number"),de=r("el-dialog");return b(),S(U,null,[e(F,{gutter:16},{default:l(()=>[e(u,{style:{"padding-right":"16px"},span:4},{default:l(()=>[e(Ve,{onGetTree:Y})]),_:1}),e(u,{span:20},{default:l(()=>[w("div",null,[e(J,{shadow:"never",class:"search mb-16"},{default:l(()=>[e(G,{"label-suffix":":",model:p,size:"small"},{default:l(()=>[e(F,{gutter:16},{default:l(()=>[e(u,{span:8},{default:l(()=>[e(v,{label:"\u6307\u6807\u540D\u79F0"},{default:l(()=>[e(f,{modelValue:p.indexName,"onUpdate:modelValue":a[0]||(a[0]=t=>p.indexName=t),maxlength:"10",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:8},{default:l(()=>[e(v,{label:"\u6307\u6807\u7EA7\u522B"},{default:l(()=>[e(E,{modelValue:p.indexLevel,"onUpdate:modelValue":a[1]||(a[1]=t=>p.indexLevel=t)},{default:l(()=>[(b(!0),S(U,null,H(ce(i),(t,y)=>(b(),I(R,{key:y,value:y*1,label:t},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(u,{span:8},{default:l(()=>[e(v,{class:"btn"},{default:l(()=>[e(V,{type:"primary",onClick:C},{default:l(()=>[_("\u67E5\u8BE2")]),_:1}),e(V,{onClick:X},{default:l(()=>[_("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(J,{shadow:"never"},{header:l(()=>[w("div",Ne,[Te,w("div",null,[e(V,{type:"primary",size:"small",onClick:a[2]||(a[2]=t=>P.value=!0)},{default:l(()=>[_("\u6307\u6807\u6807\u7B7E\u7BA1\u7406")]),_:1}),e(V,{type:"primary",size:"small",icon:"Plus",onClick:a[3]||(a[3]=t=>M(1))},{default:l(()=>[_("\u65B0\u589E\u6307\u6807")]),_:1})])])]),default:l(()=>[e(oe,{ref_key:"tableListRef",ref:g,column:k,data:T.value,total:N.value,onGetTableData:s},{action:l(({scope:t})=>[w("a",{onClick:y=>M(2,t.row.id)},"\u7F16\u8F91",8,he),w("a",{class:"text-danger",onClick:y=>le(t.row)},"\u5220\u9664",8,Se)]),_:1},8,["data","total"])]),_:1})])]),_:1})]),_:1}),e(de,{title:j.value===1?"\u65B0\u589E\u6307\u6807":"\u7F16\u8F91\u6307\u6807","model-value":$.value,"close-on-click-modal":!1,onClose:z},{footer:l(()=>[e(V,{type:"primary",size:"small",loading:h.value,onClick:a[13]||(a[13]=t=>ee(q.value))},{default:l(()=>[_(" \u4FDD\u5B58 ")]),_:1},8,["loading"]),e(V,{size:"small",onClick:z},{default:l(()=>[_(" \u5173\u95ED ")]),_:1})]),default:l(()=>[e(G,{ref_key:"formRef",ref:q,model:o.value,rules:Z,"label-suffix":"\uFF1A","label-width":"140"},{default:l(()=>[e(v,{label:"\u6307\u6807\u540D\u79F0",prop:"indexName"},{default:l(()=>[e(f,{modelValue:o.value.indexName,"onUpdate:modelValue":a[4]||(a[4]=t=>o.value.indexName=t),maxlength:50,placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1}),e(v,{label:"\u6307\u6807\u7EA7\u522B",prop:"indexLevel"},{default:l(()=>[e(K,{modelValue:o.value.indexLevel,"onUpdate:modelValue":a[5]||(a[5]=t=>o.value.indexLevel=t),disabled:j.value===2},{default:l(()=>[e(D,{label:1},{default:l(()=>[_("\u4E00\u7EA7")]),_:1}),e(D,{label:2},{default:l(()=>[_("\u4E8C\u7EA7")]),_:1}),e(D,{label:3},{default:l(()=>[_("\u4E09\u7EA7")]),_:1})]),_:1},8,["modelValue","disabled"])]),_:1}),o.value.indexLevel===3?(b(),I(v,{key:0,label:"\u662F\u5426\u4E3A\u9644\u52A0\u6307\u6807",prop:"additional"},{default:l(()=>[e(K,{modelValue:o.value.additional,"onUpdate:modelValue":a[6]||(a[6]=t=>o.value.additional=t),onChange:a[7]||(a[7]=t=>o.value.indexScore=void 0)},{default:l(()=>[e(D,{label:!1},{default:l(()=>[_("\u5426")]),_:1}),e(D,{label:!0},{default:l(()=>[_("\u662F")]),_:1})]),_:1},8,["modelValue"])]),_:1})):Q("v-if",!0),e(v,{label:"\u6307\u6807\u6807\u7B7E"},{default:l(()=>[e(E,{modelValue:o.value.tagIds,"onUpdate:modelValue":a[8]||(a[8]=t=>o.value.tagIds=t),multiple:"",class:"w-full",filterable:""},{default:l(()=>[(b(!0),S(U,null,H(O.value,(t,y)=>(b(),I(R,{key:y,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o.value.indexLevel===3?(b(),S(U,{key:1},[e(v,{label:"\u6307\u6807\u5206\u503C",prop:"indexScore"},{default:l(()=>[e(ne,{modelValue:o.value.indexScore,"onUpdate:modelValue":a[9]||(a[9]=t=>o.value.indexScore=t),max:100,min:o.value.additional?void 0:0,precision:2,placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","min"])]),_:1}),e(v,{label:"\u6307\u6807\u7EC6\u5219",prop:"indexDetail"},{default:l(()=>[e(f,{modelValue:o.value.indexDetail,"onUpdate:modelValue":a[10]||(a[10]=t=>o.value.indexDetail=t),maxlength:1e3,type:"textarea","show-word-limit":"",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1}),e(v,{label:"\u8BC4\u5206\u7EC6\u5219",prop:"gradeDetail"},{default:l(()=>[e(f,{modelValue:o.value.gradeDetail,"onUpdate:modelValue":a[11]||(a[11]=t=>o.value.gradeDetail=t),maxlength:1e3,type:"textarea","show-word-limit":"",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1}),e(v,{label:"\u4F50\u8BC1\u6750\u6599",prop:"supportMaterial"},{default:l(()=>[e(f,{modelValue:o.value.supportMaterial,"onUpdate:modelValue":a[12]||(a[12]=t=>o.value.supportMaterial=t),maxlength:1e3,type:"textarea","show-word-limit":"",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})],64)):Q("v-if",!0)]),_:1},8,["model"])]),_:1},8,["title","model-value"]),e(Le,{visible:P.value,onClose:ae},null,8,["visible"])],64)}}}),Ie=pe($e,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/performanceEvaluation/indicatorTemplate/projectTagStore/index.vue"]]);export{Ie as default};
|