Newer
Older
Nanping_sponge_JXKH / spongePerformanceDist / assets / index.7bfe0467.js
import{u as ve,r as O,aa as Y,y as ge,ad as de,_ as _e,a as be,C as Ce,e as b,D as we,F as me,o as D,c as U,f as a,w as r,m as x,z as A,h as C,p as k,l as F,G as ie,H as ce,L as ye,ab as De,E as Se,v as Re}from"./index.82404a61.js";import{p as Te,g as Ve}from"./examineManage.944deab4.js";/* empty css                                                               */import{v as ke}from"./v4.7b37508e.js";function xe(S,N){const M=ve(),u=O([]),H=O(!1),Q=O({}),z=Y({name:""}),I=O(""),v=Y({width:"0%",level:"",type:"",text:""});let g=[];const G=(t,e,l)=>{if(!(e!=null&&e.nodeCode)||e.nodeCode==="0"){l.value={children:t};return}for(const o of t){if(e.nodeCode===o.nodeCode){l.value=o;break}o.children&&G(o.children,e,l)}},m=(t,e)=>{let l={value:{}};return G(t,e,l),l.value},ue=(t,e)=>{S.$tab.closePage(t),M.push(e)},W=()=>{Q.value={},v.level="",v.type="",v.text="",K(),H.value=!1},K=()=>{S.$refs.dialogFormRef.resetFields()},fe=(t,e)=>{const l=m(u.value,t);q(l,e)},q=(t,e)=>{if(t.status=e,e==="0"?(t.enableTime="",t.stopTime=S.moment().format("YYYY-MM-DD HH:mm:ss")):e==="1"&&(t.enableTime=S.moment().format("YYYY-MM-DD HH:mm:ss"),t.stopTime=""),t.children)for(const l of t.children)l.statusDisabled=e==="0",e==="0"&&q(l,"0")},X=t=>{for(const e of t){const l=e.children||[];e.statusDisabled=!1;for(const o of l){const s=o.children||[];e.status==="0"&&o.status==="0"?o.statusDisabled=!0:o.statusDisabled=!1;for(const f of s)o.status==="0"&&f.status==="0"?f.statusDisabled=!0:f.statusDisabled=!1}}},J=(t,e)=>{const l=m(u.value,t);d(l,e)},d=(t,e)=>{if(t.canOperate=e,t.children)for(const l of t.children)l.canOperateDisabled=e===0,e===0&&d(l,0)},Z=t=>{for(const e of t){const l=e.children||[];e.canOperateDisabled=!1;for(const o of l){const s=o.children||[];e.canOperate===0&&o.canOperate===0?o.canOperateDisabled=!0:o.canOperateDisabled=!1;for(const f of s)o.canOperate===0&&f.canOperate===0?f.canOperateDisabled=!0:f.canOperateDisabled=!1}}},L=t=>{const e=m(u.value,t),l=m(u.value,{nodeCode:t.parentNodeCode});S.$modal.confirm("\u662F\u5426\u786E\u8BA4\u590D\u5236\uFF1F").then(async()=>{const o=l.children.indexOf(e),s=JSON.parse(JSON.stringify(t));s.nodeCode=N(),l.children.splice(o,0,s),l.children.forEach((f,h,y)=>{f.sort=y.length-h}),B(l.nodeCode)}).catch(()=>{})},ee=t=>{const e=m(u.value,t),l=m(u.value,{nodeCode:t.parentNodeCode});S.$modal.confirm("\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F").then(async()=>{const o=l.children.indexOf(e);l.children.splice(o,1),l.children.forEach((s,f,h)=>{s.sort=h.length-f}),B(l.nodeCode)}).catch(()=>{})},te=(t,e)=>{const l=m(u.value,t),o=m(u.value,{nodeCode:t.parentNodeCode}),s=o.children.indexOf(l);return e==="ascending"?s===0:s===o.children.length-1},le=t=>{const e=m(u.value,t),l=m(u.value,{nodeCode:t.parentNodeCode}),o=l.children.indexOf(e),s=l.children[o-1],f=e.sort;e.sort=s.sort,s.sort=f,l.children.sort((h,y)=>y.sort-h.sort)},oe=t=>{const e=m(u.value,t),l=m(u.value,{nodeCode:t.parentNodeCode}),o=l.children.indexOf(e),s=l.children[o+1],f=e.sort;e.sort=s.sort,s.sort=f,l.children.sort((h,y)=>y.sort-h.sort)},ae=()=>{I.value="@#$%^&*",g=[],de(()=>{I.value=z.name,g=[],de(()=>{if(!g.length)return;for(const e of g)R(e.row);const t=Math.min(...g.map(e=>e.index));P(t)})})},E=()=>{S.$refs.ruleForm.resetFields(),I.value="",g=[]},ne=(t,e,l)=>l.replace(new RegExp(I.value,"ig"),function(o){return o&&!g.find(s=>s.nodeCode===t.nodeCode)&&g.push({index:e,row:t}),`<span class="light">${o}</span>`}),R=t=>{const e=m(u.value,{nodeCode:t.parentNodeCode});S.$refs.tableRef.toggleRowExpansion(e,!0),e.parentNodeCode!=="0"&&R(e)},P=t=>{const e=S.$refs.tableRef.$el.querySelector(".el-table__body-wrapper .el-scrollbar .el-scrollbar__wrap"),l=e.querySelectorAll(".el-table__body tbody .el-table__row");let o=0;for(let s=0;s<l.length&&s!==t;s++)o+=l[s].offsetHeight;o>e.offsetHeight&&(e.scrollTop=o)},B=t=>{if(t==="0")return;const e=m(u.value,{nodeCode:t});if(e.level==="0"){const l=e.children.reduce((o,s)=>o+=s.evaluationContentScore*1,0);e.evaluationTypeScore=l>0?l+"":""}else if(e.level==="1"){const l=e.children.reduce((f,h)=>f+=h.evaluationRuleScore*1,0);e.evaluationContentScore=l>0?l+"":"";const o=m(u.value,{nodeCode:e.parentNodeCode}),s=o.children.reduce((f,h)=>f+=h.evaluationContentScore*1,0);o.evaluationTypeScore=s>0?s+"":""}},j=(t,e)=>{t.forEach(l=>{S.$refs.tableRef.toggleRowExpansion(l,e),l.children&&j(l.children,e)})},re=()=>{j(u.value,!0)},c=t=>{let e=!1;for(const l of t){const o=l.children||[];if(!o.length)return e=!0;for(const s of o)if(!(s.children||[]).length)return e=!0}return e},i=t=>{let e=0,l=0;for(const o of t){const s=o.children||[],f=T(s);e+=f;for(const h of s){const y=h.children||[];l+=y.length;for(const $ of y)$.length1=e,$.sum1=f,$.length2=l,$.sum2=y.length}}return t},T=t=>{let e=0;for(const l of t){const o=l.children||[];for(const s of o)e++,s.children&&T(s.children)}return e},V=ge(()=>_(JSON.parse(JSON.stringify(u.value))).filter(e=>e.itemLevel=="3")),_=t=>{let e=[];for(const l of t){const o=l.children;delete l.children,e.push(l),o&&(e=e.concat(_(o)))}return e},w=t=>(t.value.forEach((e,l,o)=>{e[`itemContent${l}`]=e.itemContent,e.children&&w(e.children)}),t.value);return{handleData:w,form:z,treeData:u,visible:H,curRow:Q,operateInfo:v,getTreeCurRow:m,search:ae,resetQuery:E,goBack:ue,close:W,statusChange:fe,setStatusDisabled:X,canOperateChange:J,setCanOperateDisabled:Z,getSortIsDisabled:te,copy:L,del:ee,ascHandle:le,descHandle:oe,formatSearch:ne,computedScore:B,expand:re,checkData:c,setMergeData:i,tableData:V}}const Fe={class:"control","element-loading-text":"\u52A0\u8F7D\u4E2D...","element-loading-background":"rgba(0, 0, 0, 0.6)"},Oe={class:"title"},Ie={class:"body"},$e=["innerHTML"],Ne=["innerHTML"],Me=["innerHTML"],He=["onClick"],Le={class:"dialog-footer"},Ee={__name:"index",setup(S){const N=be(),{proxy:M}=Re(),{controlId:u}=N.params;let{type:H,status:Q,name:z,year:I}=N.query;const{form:v,visible:g,curRow:G,operateInfo:m,getTreeCurRow:ue,goBack:W,expand:K,checkData:fe,setMergeData:q,tableData:X,treeData:J}=xe(M,ke),d=O({evaluationType:"",controlItem:"",evaluationCriterion:""});v.configId=u;const Z=O(!1),L=O(!1),ee=Y([{label:"\u81EA\u52A8",value:"auto"},{label:"\u624B\u586B",value:"manual"}]),te=Y([{label:"\u843D\u5B9E",value:"1"},{label:"\u672A\u843D\u5B9E",value:"0"}]),le=Y({realValue:[{required:!0,trigger:"blur",message:"\u5B9E\u9645\u5B8C\u6210\u4E0D\u80FD\u4E3A\u7A7A"}]}),oe=(c,i,T)=>{console.log(c),d.value=c,m.type=T,g.value=!0};function ae(){v.itemContent="",R({configId:u})}function E(c){return console.log("object",v.itemContent),c.indexOf(v.itemContent)!==-1&&v.itemContent!==""?c.replace(v.itemContent,'<font color="#000" style="background:#ffff00">'+v.itemContent+"</font>"):c}const ne=()=>{console.log(m,d);let c=null;d.value.realScore>0?c=1:c=0,d.value.standardFlag=c,M.$refs.dialogFormRef.validate(async i=>{i&&(m.type==="add"||m.type==="edit"&&(await Te(d.value),R({configId:u})),P(),R(p))})},R=async c=>{L.value=!0;const i=await Ve(c);L.value=!1,(i==null?void 0:i.code)===200&&(J.value=(i==null?void 0:i.data)||[],q(J.value),de(()=>{K()}))},P=()=>{g.value=!1,M.$refs.dialogFormRef.resetFields(),R({configId:u})},B=({row:c,column:i,rowIndex:T,columnIndex:V})=>{if([0,13].includes(V))return{rowspan:c.length1-T===c.sum1?c.sum1:0,colspan:1};if([1,12].includes(V))return{rowspan:c.length2-T===c.sum2?c.sum2:0,colspan:1}};function j(c){return Se.confirm(`\u4E0B\u8F7D\u6B64\u6587\u4EF6: ${c.name}\uFF1F`).then(()=>window.open(c.url),()=>!1)}function re(c){console.log("v",c),c==1?d.value.realScore=d.value.itemScore:d.value.realScore=0}return Ce(()=>{R({configId:u})}),(c,i)=>{const T=b("el-page-header"),V=b("el-input"),_=b("el-form-item"),w=b("el-col"),t=b("el-button"),e=b("el-row"),l=b("el-form"),o=b("el-table-column"),s=b("el-tag"),f=b("el-table"),h=b("el-option"),y=b("el-select"),$=b("el-input-number"),he=b("el-dialog"),pe=we("loading");return me((D(),U("div",Fe,[a(T,{class:"header",onBack:i[0]||(i[0]=n=>C(W)(C(N),"/spongePerformance/examinemanage"))},{content:r(()=>[x("span",Oe,A(C(I))+"\u5E74",1)]),_:1}),x("div",Ie,[a(l,{ref:"ruleForm",model:C(v)},{default:r(()=>[a(e,{gutter:20},{default:r(()=>[a(w,{span:4},{default:r(()=>[a(_,{label:"\u6307\u6807\u540D\u79F0:",prop:"itemContent"},{default:r(()=>[a(V,{style:{width:"240px"},clearable:"",modelValue:C(v).itemContent,"onUpdate:modelValue":i[1]||(i[1]=n=>C(v).itemContent=n),placeholder:"\u8BF7\u8F93\u5165\u6307\u6807\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1}),a(w,{span:3},{default:r(()=>[a(_,null,{default:r(()=>[a(t,{type:"primary",icon:"Search",onClick:i[2]||(i[2]=n=>R({configId:C(u)}))},{default:r(()=>[k(" \u67E5\u8BE2")]),_:1}),a(t,{icon:"Refresh",onClick:ae},{default:r(()=>[k("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),me((D(),F(f,{ref:"tableRef",data:C(X),stripe:"","max-height":670,"element-loading-text":"\u6570\u636E\u52A0\u8F7D\u4E2D...","span-method":B,"row-key":"2"},{default:r(()=>[a(o,{label:"\u4E00\u7EA7\u6307\u6807",prop:"firstItemContent",width:"150","show-overflow-tooltip":""},{default:r(({row:n})=>[x("span",{style:{float:"left"},innerHTML:E(n.firstItemContent)},null,8,$e)]),_:1}),a(o,{label:"\u4E8C\u7EA7\u6307\u6807",prop:"secondItemContent",width:"150","show-overflow-tooltip":""},{default:r(({row:n})=>[x("span",{style:{float:"left"},innerHTML:E(n.secondItemContent)},null,8,Ne)]),_:1}),a(o,{label:"\u4E09\u7EA7\u6307\u6807",prop:"itemContent",width:"150","show-overflow-tooltip":""},{default:r(({row:n})=>[x("span",{style:{float:"left"},innerHTML:E(n.itemContent)},null,8,Me)]),_:1}),a(o,{label:"\u5E74\u4EFD",align:"center",prop:"year","show-overflow-tooltip":""}),a(o,{label:"\u76EE\u6807",align:"center",prop:"itemTarget","show-overflow-tooltip":""}),a(o,{label:"\u8BF4\u660E",align:"center",prop:"itemComment","show-overflow-tooltip":""}),a(o,{label:"\u7B97\u6CD5",align:"center",prop:"itemAlgorithm","show-overflow-tooltip":""},{default:r(({row:n})=>[x("span",null,A(n.itemAlgorithm==="auto"?"\u81EA\u52A8":"\u624B\u52A8"),1)]),_:1}),a(o,{label:"\u5B9E\u9645\u5B8C\u6210\u503C",align:"center",prop:"realValue","show-overflow-tooltip":""}),a(o,{label:"\u5355\u4F4D",align:"center",prop:"itemUnit","show-overflow-tooltip":""}),a(o,{label:"\u662F\u5426\u8FBE\u6807",align:"center",prop:"standardFlag","show-overflow-tooltip":""},{default:r(({row:n})=>[n.standardFlag==""?(D(),F(s,{key:0,type:"warning"},{default:r(()=>[k("\u672A\u586B\u62A5")]),_:1})):(D(),F(s,{key:1,type:n.standardFlag==="1"?"success":"error"},{default:r(()=>[k(A(n.standardFlag==="1"?"\u8FBE\u6807":"\u672A\u8FBE\u6807"),1)]),_:2},1032,["type"]))]),_:1}),a(o,{label:"\u2462\u9884\u4F30\u5206\u503C",align:"center",prop:"realScore","show-overflow-tooltip":""}),a(o,{label:"\u2461\u9884\u4F30\u5206\u503C",align:"center",prop:"secondRealScore","show-overflow-tooltip":""}),a(o,{label:"\u2460\u9884\u4F30\u5206\u503C",align:"center",prop:"firstRealScore","show-overflow-tooltip":""}),a(o,{label:"\u4FEE\u6539\u65E5\u671F",align:"center",prop:"updateTime","show-overflow-tooltip":""}),a(o,{label:"\u8D23\u4EFB\u5355\u4F4D",align:"center",prop:"deptName","show-overflow-tooltip":""}),a(o,{label:"\u4FEE\u6539\u4EBA",align:"center",prop:"updateBy","show-overflow-tooltip":""}),a(o,{label:"\u4F50\u8BC1\u6750\u6599",align:"center",prop:"attachFileList","show-overflow-tooltip":""},{default:r(({row:n})=>[(D(!0),U(ie,null,ce(n==null?void 0:n.attachFileList,se=>(D(),U("span",{onClick:Pe=>j(se),style:{color:"#4285F4"}},A(se.originalName),9,He))),256))]),_:1}),a(o,{label:"\u64CD\u4F5C",align:"center",width:"260",fixed:"right"},{default:r(({row:n})=>[a(t,{type:"primary",link:"",onClick:se=>oe(n,n.itemLevel,"edit"),disabled:C(H)==="view"||n.itemAlgorithm==="auto"},{default:r(()=>[k("\u4FEE\u6539")]),_:2},1032,["onClick","disabled"])]),_:1})]),_:1},8,["data"])),[[pe,L.value]])]),a(he,{modelValue:C(g),"onUpdate:modelValue":i[9]||(i[9]=n=>De(g)?g.value=n:null),title:`${C(m).text}`,"close-on-click-modal":!1,width:"50%","before-close":P,class:"dialog"},ye({default:r(()=>[a(l,{ref:"dialogFormRef",model:d.value,rules:le,"label-width":"auto",disabled:C(m).type==="view"||C(H)==="view"},{default:r(()=>[a(e,{gutter:20},{default:r(()=>[a(w,{span:12},{default:r(()=>[a(_,{label:"\u4E09\u7EA7\u6307\u6807:",prop:"itemContent"},{default:r(()=>[a(V,{modelValue:d.value.itemContent,"onUpdate:modelValue":i[3]||(i[3]=n=>d.value.itemContent=n),placeholder:"\u8BF7\u8F93\u5165\u4E09\u7EA7\u6307\u6807",disabled:""},null,8,["modelValue"])]),_:1})]),_:1}),a(w,{span:12},{default:r(()=>[a(_,{label:"\u76EE\u6807:",prop:"itemTarget"},{default:r(()=>[a(V,{disabled:"",modelValue:d.value.itemTarget,"onUpdate:modelValue":i[4]||(i[4]=n=>d.value.itemTarget=n),placeholder:"\u8BF7\u8F93\u5165\u76EE\u6807"},null,8,["modelValue"])]),_:1})]),_:1}),a(w,{span:12},{default:r(()=>[a(_,{label:"\u7B97\u6CD5:",prop:"itemAlgorithm"},{default:r(()=>[a(y,{disabled:"",modelValue:d.value.itemAlgorithm,"onUpdate:modelValue":i[5]||(i[5]=n=>d.value.itemAlgorithm=n),placeholder:"\u8BF7\u9009\u62E9\u7B97\u6CD5",style:{width:"100%"}},{default:r(()=>[(D(!0),U(ie,null,ce(ee,n=>(D(),F(h,{key:n.value,label:n.label,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(w,{span:12},{default:r(()=>[a(_,{label:"\u5B9E\u9645\u5B8C\u6210:",prop:"realValue"},{default:r(()=>[a(y,{modelValue:d.value.realValue,"onUpdate:modelValue":i[6]||(i[6]=n=>d.value.realValue=n),placeholder:"\u8BF7\u9009\u62E9\u5B9E\u9645\u5B8C\u6210",style:{width:"100%"},onChange:re},{default:r(()=>[(D(!0),U(ie,null,ce(te,n=>(D(),F(h,{key:n.value,label:n.label,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(w,{span:12},{default:r(()=>[a(_,{label:"\u662F\u5426\u8FBE\u6807:",prop:"standardFlag"},{default:r(({row:n})=>[d.value.realValue==""?(D(),F(s,{key:0,type:"warning"},{default:r(()=>[k("\u672A\u586B\u62A5")]),_:1})):(D(),F(s,{key:1,type:d.value.realScore>0?"success":"error"},{default:r(()=>[k(A(d.value.realScore>0?"\u8FBE\u6807":"\u672A\u8FBE\u6807"),1)]),_:1},8,["type"]))]),_:1})]),_:1}),a(w,{span:12},{default:r(()=>[a(_,{label:"\u5206\u503C:",prop:"itemScore"},{default:r(()=>[a(V,{disabled:"",modelValue:d.value.itemScore,"onUpdate:modelValue":i[7]||(i[7]=n=>d.value.itemScore=n),placeholder:"\u5206\u503C"},null,8,["modelValue"])]),_:1})]),_:1}),a(w,{span:12},{default:r(()=>[a(_,{label:"\u5F97\u5206:",prop:"realScore"},{default:r(()=>[a($,{disabled:"",modelValue:d.value.realScore,"onUpdate:modelValue":i[8]||(i[8]=n=>d.value.realScore=n),placeholder:"\u5F97\u5206"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules","disabled"])]),_:2},[C(m).type!=="view"?{name:"footer",fn:r(()=>[x("div",Le,[a(t,{type:"primary",onClick:ne},{default:r(()=>[k("\u4FDD\u5B58")]),_:1}),a(t,{onClick:P},{default:r(()=>[k("\u53D6\u6D88")]),_:1})])]),key:"0"}:void 0]),1032,["modelValue","title"])])),[[pe,Z.value,void 0,{fullscreen:!0,lock:!0}]])}}},qe=_e(Ee,[["__scopeId","data-v-1a97dd43"]]);export{qe as default};