Newer
Older
Nanping_sponge_JXKH / spongePerformanceDist / assets / planningcontrol.d8ffb15c.js
import{M as pe,r as m,aa as de,ae as me,am as ce,C as fe,e as s,D as H,o as c,c as w,F as k,K as Y,h as a,f as e,w as o,k as _e,G as L,H as R,l as F,p as f,ab as q,z as ve,m as ge,v as be,E as he}from"./index.82404a61.js";import{p as ye,a as Te,b as we,c as ke}from"./ManagingPerformance.d78c089a.js";const xe={class:"app-container"},De=["onClick","title"],Ve={class:"dialog-footer"},Fe=pe({name:"planningcontrol"}),Le=Object.assign(Fe,{setup(Ce){const{proxy:_}=be(),{examine_file_type:C,examine_type:O}=_.useDict("examine_file_type","examine_type");console.log(O,"examine_type");const T=m(!1),p=m(!1),x=m(!0),D=m(!0),S=m(0),V=m(""),M=m([]),h=m([]),r=de({publishTime:"",formData:{},queryParams:{pageNum:1,pageSize:10,examineFileType:"",regulationName:"",examineType:"ghgkzd"},formRules:{regulationName:[{required:!0,message:"\u8BF7\u8F93\u5165\u89C4\u5212\u7BA1\u63A7\u5236\u5EA6",trigger:"blur"}],publishTime:[{required:!0,message:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",trigger:"blur"}]}}),{queryParams:i,formData:n,formRules:j}=me(r);function U(){n.value={regulationName:void 0,examineFileType:void 0,publishTime:void 0,fileSaveRequestList:[],examineType:"ghgkzd"},_.resetForm("ruleForm"),h.value=[]}function G(){U(),T.value=!1,p.value=!0,V.value="\u65B0\u589E\u89C4\u5212\u7BA1\u63A7\u5236\u5EA6"}function N(){r.publishTime?(i.value.beginTime=r.publishTime[0],i.value.endTime=r.publishTime[1]):(i.value.beginTime="",i.value.endTime=""),i.value.pageNum=1,v()}function I(){r.publishTime=[],_.resetForm("queryRef"),N()}const Q=m({Authorization:"Bearer "+ce()});function z(u){return console.log(u),he.confirm(`\u4E0B\u8F7D\u6B64\u6587\u4EF6: ${u.name}\uFF1F`).then(()=>window.open(u.url),()=>!1)}const v=async()=>{D.value=!0,D.value=!0,r.publishTime&&(i.value.beginTime=r.publishTime[0],i.value.endTime=r.publishTime[1]);const u=await ye(i.value);M.value=u.data,S.value=u.total,D.value=!1};async function J(){_.$refs.ruleForm.validate(u=>{u&&(h.value.forEach(t=>{t.hasOwnProperty("response")?(t.response.data.refType="ghgkzd",n.value.fileSaveRequestList.push(t.response.data)):n.value.fileSaveRequestList.push(t)}),n.value.id!=null?Te(n.value).then(()=>{console.log(n.value,"formData.value"),_.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F"),p.value=!1,v()}):we(n.value).then(()=>{_.$modal.msgSuccess("\u65B0\u589E\u6210\u529F"),p.value=!1,v()}))})}function W(u){T.value=!1,p.value=!0,V.value="\u4FEE\u6539\u89C4\u5212\u7BA1\u63A7\u5236\u5EA6",n.value={...u},n.value.fileSaveRequestList=[],h.value=u.fileList}function X(u){_.$modal.confirm("\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F").then(async()=>{const t=await ke(u.id);(t==null?void 0:t.code)===200&&(_.$modal.msgSuccess("\u64CD\u4F5C\u6210\u529F\uFF01"),v())}).catch(()=>{})}function Z(u){V.value="\u67E5\u770B\u89C4\u5212\u7BA1\u63A7\u5236\u5EA6",T.value=!0,p.value=!0,n.value={...u},h.value=u.fileList,n.value.fileSaveRequestList=[]}function ee(){p.value=!1,U(),v()}return fe(()=>{v()}),(u,t)=>{const $=s("el-input"),g=s("el-form-item"),P=s("el-option"),B=s("el-select"),E=s("el-date-picker"),d=s("el-button"),K=s("el-form"),le=s("el-col"),ae=s("right-toolbar"),A=s("el-row"),b=s("el-table-column"),te=s("dict-tag"),oe=s("el-table"),ne=s("pagination"),ie=s("el-upload"),ue=s("el-dialog"),se=H("hasPermi"),re=H("loading");return c(),w("div",xe,[k(e(K,{model:a(i),ref:"queryRef",inline:!0},{default:o(()=>[e(g,{label:"\u540D\u79F0:",prop:"regulationName"},{default:o(()=>[e($,{modelValue:a(i).regulationName,"onUpdate:modelValue":t[0]||(t[0]=l=>a(i).regulationName=l),placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57",clearable:"",onKeyup:_e(N,["enter"]),style:{width:"240px"}},null,8,["modelValue","onKeyup"])]),_:1}),e(g,{label:"\u7C7B\u578B:",prop:"examineFileType"},{default:o(()=>[e(B,{clearable:"",modelValue:a(i).examineFileType,"onUpdate:modelValue":t[1]||(t[1]=l=>a(i).examineFileType=l),class:"m-2",placeholder:"\u8BF7\u9009\u62E9",size:"mini"},{default:o(()=>[(c(!0),w(L,null,R(a(C),l=>(c(),F(P,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(g,{label:"\u53D1\u5E03\u65F6\u95F4",prop:"publishTime"},{default:o(()=>[e(E,{style:{width:"240px"},format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",modelValue:a(r).publishTime,"onUpdate:modelValue":t[2]||(t[2]=l=>a(r).publishTime=l),type:"daterange","unlink-panels":"","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4"},null,8,["modelValue"])]),_:1}),e(g,null,{default:o(()=>[e(d,{type:"primary",icon:"Search",onClick:N},{default:o(()=>[f("\u641C\u7D22")]),_:1}),e(d,{icon:"Refresh",onClick:I},{default:o(()=>[f("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"]),[[Y,a(x)]]),e(A,{gutter:10,class:"mb8"},{default:o(()=>[e(le,{span:1.5},{default:o(()=>[k((c(),F(d,{type:"primary",plain:"",icon:"Plus",onClick:G},{default:o(()=>[f("\u65B0\u589E")]),_:1})),[[se,["system:post:add"]]])]),_:1},8,["span"]),e(ae,{showSearch:a(x),"onUpdate:showSearch":t[3]||(t[3]=l=>q(x)?x.value=l:null),onQueryTable:v},null,8,["showSearch"])]),_:1}),k((c(),F(oe,{data:a(M),stripe:"","max-height":600,border:""},{default:o(()=>[e(b,{type:"index",width:"55",label:"\u5E8F\u53F7",fixed:"left"}),e(b,{label:"\u89C4\u5212\u7BA1\u63A7\u5236\u5EA6",prop:"regulationName"}),e(b,{label:"\u7C7B\u578B",prop:"examineFileType","show-overflow-tooltip":""},{default:o(({row:l})=>[e(te,{options:a(C),value:l.examineFileType},null,8,["options","value"])]),_:1}),e(b,{label:"\u53D1\u5E03\u65F6\u95F4",prop:"publishTime"}),e(b,{label:"\u4FEE\u6539\u65F6\u95F4",prop:"updateTime"}),e(b,{label:"\u4FEE\u6539\u4EBA",prop:"updateBy"}),e(b,{label:"\u9644\u4EF6",prop:"fileList","show-overflow-tooltip":""},{default:o(({row:l})=>[(c(!0),w(L,null,R(l.fileList,y=>(c(),w("span",{style:{color:"rgb(16, 142, 233)"},onClick:Se=>z(y),key:y.id,title:y.name},ve(y.name),9,De))),128))]),_:1}),e(b,{label:"\u64CD\u4F5C","show-overflow-tooltip":"",width:"250",fixed:"right"},{default:o(({row:l})=>[e(d,{link:"",icon:"View",type:"primary",onClick:y=>Z(l)},{default:o(()=>[f("\u8BE6\u60C5")]),_:2},1032,["onClick"]),e(d,{link:"",icon:"Edit",type:"warning",onClick:y=>W(l)},{default:o(()=>[f("\u4FEE\u6539")]),_:2},1032,["onClick"]),e(d,{link:"",icon:"Delete",type:"danger",onClick:y=>X(l)},{default:o(()=>[f("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[re,a(D)]]),k(e(ne,{total:a(S),page:a(i).pageNum,"onUpdate:page":t[4]||(t[4]=l=>a(i).pageNum=l),limit:a(i).pageSize,"onUpdate:limit":t[5]||(t[5]=l=>a(i).pageSize=l),onPagination:v},null,8,["total","page","limit"]),[[Y,a(S)>0]]),e(ue,{title:a(V),modelValue:a(p),"onUpdate:modelValue":t[10]||(t[10]=l=>q(p)?p.value=l:null),width:"70%","close-on-click-modal":!1},{footer:o(()=>[ge("div",Ve,[k(e(d,{type:"primary",onClick:J},{default:o(()=>[f("\u4FDD \u5B58")]),_:1},512),[[Y,!a(T)]]),e(d,{onClick:ee},{default:o(()=>[f("\u5173\u95ED")]),_:1})])]),default:o(()=>[e(K,{ref:"ruleForm",model:a(n),rules:a(j),"label-width":"auto",disabled:a(T)},{default:o(()=>[e(A,null,{default:o(()=>[e(g,{label:"\u89C4\u5212\u7BA1\u63A7\u5236\u5EA6:",prop:"regulationName",style:{width:"45%"}},{default:o(()=>[e($,{modelValue:a(n).regulationName,"onUpdate:modelValue":t[6]||(t[6]=l=>a(n).regulationName=l),placeholder:"\u8BF7\u8F93\u5165\u89C4\u5212\u7BA1\u63A7\u5236\u5EA6",clearable:""},null,8,["modelValue"])]),_:1}),e(g,{label:"\u7C7B\u578B:",prop:"examineFileType",style:{width:"45%"}},{default:o(()=>[e(B,{clearable:"",modelValue:a(n).examineFileType,"onUpdate:modelValue":t[7]||(t[7]=l=>a(n).examineFileType=l),class:"m-2",placeholder:"\u8BF7\u9009\u62E9",size:"mini",style:{width:"100%"}},{default:o(()=>[(c(!0),w(L,null,R(a(C),l=>(c(),F(P,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(g,{label:"\u53D1\u5E03\u65F6\u95F4:",prop:"publishTime",style:{width:"45%"}},{default:o(()=>[e(E,{style:{width:"100%"},clearable:"",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",modelValue:a(n).publishTime,"onUpdate:modelValue":t[8]||(t[8]=l=>a(n).publishTime=l),type:"date",placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4"},null,8,["modelValue"])]),_:1}),e(g,{label:"\u9644\u4EF6:",style:{width:"93%"}},{default:o(()=>[e(ie,{"file-list":a(h),"onUpdate:file-list":t[9]||(t[9]=l=>q(h)?h.value=l:null),class:"upload-demo",action:"/prod-api/system/upload",headers:a(Q),multiple:"","on-preview":z},{default:o(()=>[e(d,{type:"primary"},{default:o(()=>[f("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","headers"])]),_:1})]),_:1})]),_:1},8,["model","rules","disabled"])]),_:1},8,["title","modelValue"])])}}});export{Le as default};