import{C as Y,D as Z,N as ee,O as te,w as le,F as ae,J as oe,P as ue,Q as ne,R as se}from"./element-plus.ff90c99c.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import{f as pe,b as re,d as de}from"./index.87cea444.js";import{u as me}from"./vue-router.6d4cf914.js";import{u as ce}from"./usePaging.bd7a7dec.js";import{u as _e}from"./useDictOptions.15bfecbd.js";import{g as fe,a as be}from"./task_template.48c330fa.js";import{d as N,s as ye,r as B,$ as q,aq as Fe,o as n,c as V,W as a,Q as o,u as e,F as U,a9 as P,P as i,U as y,R as v,a as D,V as ve,j as we,T as Be,n as L}from"./@vue.f8dfc830.js";import"./lodash.3e731b89.js";import{_ as ke}from"./edit.vue_vue_type_style_index_0_lang.5e66c62f.js";import{_ as Ee}from"./edit_admin.vue_vue_type_style_index_0_lang.b2845507.js";import{_ as Ce}from"./edit_village.vue_vue_type_style_index_0_lang.6f213320.js";import{d as Ve}from"./dict.a50846ba.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./axios.c2babb35.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.79024f1a.js";import"./index.000b2a9c.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./map.vue_vue_type_script_setup_true_name_taskTemplateEdit_lang.6d5531f0.js";import"./dialog_index_personnel.vue_vue_type_script_setup_true_name_companyLists_lang.2d7a6cdf.js";import"./role.fe83a826.js";import"./create_task_template.1d9aeec0.js";import"./dialog_commodity.vue_vue_type_script_setup_true_name_companyLists_lang.1d1a700a.js";const De={class:"mt-4"},xe={class:"flex justify-end mt-4"},he=N({name:"taskTemplateLists"}),ge=N({...he,setup(Ae){var g,A,$;const d=ye(),x=B([]),r=B(!1),_=me(),u=q({id:"",company_id:"",title:"",admin_id:"",money:"",type:"",status:"",content:""}),k=B(10);(g=_.query)!=null&&g.id&&(u.id=_.query.id),(A=_.query)!=null&&A.company_id&&(u.company_id=_.query.company_id),($=_.query)!=null&&$.company_type&&(k.value=_.query.company_type);const I=q([{id:1,name:"\u663E\u793A"},{id:2,name:"\u9690\u85CF"}]),E=B([]),j=s=>{E.value=s.map(({id:t})=>t)},{dictData:C}=_e(""),{pager:F,getLists:f,resetParams:O,resetPage:Q}=ce({fetchFun:be,params:u}),J=async()=>{var s,t;r.value=!0,await L(),(s=d.value)==null||s.open("add"),(t=d.value)==null||t.setFormData({company_id:u.company_id})},W=async s=>{var t,m;r.value=!0,await L(),(t=d.value)==null||t.open("edit"),(m=d.value)==null||m.setFormData(s)},h=async s=>{await pe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await fe({id:s}),f()};return Ve({type_id:10}).then(s=>{x.value=s.lists}),f(),(s,t)=>{const m=Y,c=Z,T=ee,S=te,b=le,z=ae,R=oe,G=re,p=ue,H=ne,K=ie,w=Fe("perms"),M=se;return n(),V("div",null,[a(R,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[a(z,{class:"mb-[-16px] formtabel",model:e(u),inline:""},{default:o(()=>[a(c,{"label-width":"100px",label:"\u4EFB\u52A1\u540D\u79F0",prop:"title"},{default:o(()=>[a(m,{class:"w-[280px]",modelValue:e(u).title,"onUpdate:modelValue":t[0]||(t[0]=l=>e(u).title=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),a(c,{"label-width":"100px",label:"\u521B\u5EFA\u4EBA",prop:"admin_id"},{default:o(()=>[a(m,{class:"w-[280px]",modelValue:e(u).admin_id,"onUpdate:modelValue":t[1]||(t[1]=l=>e(u).admin_id=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u521B\u5EFA\u4EBA"},null,8,["modelValue"])]),_:1}),a(c,{"label-width":"100px",label:"\u91D1\u989D",prop:"money"},{default:o(()=>[a(m,{class:"w-[280px]",modelValue:e(u).money,"onUpdate:modelValue":t[2]||(t[2]=l=>e(u).money=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91D1\u989D"},null,8,["modelValue"])]),_:1}),a(c,{"label-width":"100px",label:"\u4EFB\u52A1\u7C7B\u578B",prop:"type"},{default:o(()=>[a(S,{modelValue:e(u).type,"onUpdate:modelValue":t[3]||(t[3]=l=>e(u).type=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u7C7B\u578B"},{default:o(()=>[(n(!0),V(U,null,P(e(x),l=>(n(),i(T,{key:l.label,value:l.id,label:l.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(c,{"label-width":"100px",label:"\u72B6\u6001",prop:"status"},{default:o(()=>[a(S,{modelValue:e(u).status,"onUpdate:modelValue":t[4]||(t[4]=l=>e(u).status=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"},{default:o(()=>[(n(!0),V(U,null,P(e(I),l=>(n(),i(T,{key:l.label,value:l.id,label:l.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(c,{"label-width":"100px",label:"\u4EFB\u52A1\u63CF\u8FF0",prop:"content"},{default:o(()=>[a(m,{class:"w-[280px]",modelValue:e(u).content,"onUpdate:modelValue":t[5]||(t[5]=l=>e(u).content=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u63CF\u8FF0"},null,8,["modelValue"])]),_:1}),a(c,{"label-width":"100px",label:""},{default:o(()=>[a(b,{class:"el-btn",type:"primary",onClick:e(Q)},{default:o(()=>[y("\u67E5\u8BE2")]),_:1},8,["onClick"]),a(b,{onClick:e(O)},{default:o(()=>[y("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((n(),i(R,{class:"!border-none",shadow:"never"},{default:o(()=>[v((n(),i(b,{type:"primary",onClick:J},{icon:o(()=>[a(G,{name:"el-icon-Plus"})]),default:o(()=>[y(" \u65B0\u589E ")]),_:1})),[[w,["task_template.task_template/add"]]]),v((n(),i(b,{disabled:!e(E).length,onClick:t[6]||(t[6]=l=>h(e(E)))},{default:o(()=>[y(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["task_template.task_template/delete"]]]),D("div",De,[a(H,{data:e(F).lists,onSelectionChange:j},{default:o(()=>[a(p,{type:"selection",width:"55"}),a(p,{label:"ID",width:"80",prop:"id","show-overflow-tooltip":""}),a(p,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),a(p,{label:"\u521B\u5EFA\u4EBA",prop:"admin_name","show-overflow-tooltip":""}),a(p,{label:"\u91D1\u989D",prop:"money","show-overflow-tooltip":""}),a(p,{label:"\u4EFB\u52A1\u7C7B\u578B",prop:"type_name","show-overflow-tooltip":""}),a(p,{label:"\u72B6\u6001","show-overflow-tooltip":""},{default:o(({row:l})=>[D("span",null,ve(l.status==1?"\u663E\u793A":"\u9690\u85CF"),1)]),_:1}),a(p,{label:"\u4EFB\u52A1\u63CF\u8FF0",prop:"content","show-overflow-tooltip":""}),a(p,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:l})=>[v((n(),i(b,{type:"primary",link:"",onClick:X=>W(l)},{default:o(()=>[y(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["task_template.task_template/edit"]]]),v((n(),i(b,{type:"danger",link:"",onClick:X=>h(l.id)},{default:o(()=>[y(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["task_template.task_template/delete"]]])]),_:1})]),_:1},8,["data"])]),D("div",xe,[a(K,{modelValue:e(F),"onUpdate:modelValue":t[7]||(t[7]=l=>we(F)?F.value=l:null),onChange:e(f)},null,8,["modelValue","onChange"])])]),_:1})),[[M,e(F).loading]]),e(r)&&e(k)==16?(n(),i(Ee,{key:0,ref_key:"editRef",ref:d,"dict-data":e(C),onSuccess:e(f),onClose:t[8]||(t[8]=l=>r.value=!1)},null,8,["dict-data","onSuccess"])):e(r)&&e(k)==17?(n(),i(Ce,{key:1,ref_key:"editRef",ref:d,"dict-data":e(C),onSuccess:e(f),onClose:t[9]||(t[9]=l=>r.value=!1)},null,8,["dict-data","onSuccess"])):e(r)?(n(),i(ke,{key:2,ref_key:"editRef",ref:d,"dict-data":e(C),onSuccess:e(f),onClose:t[10]||(t[10]=l=>r.value=!1)},null,8,["dict-data","onSuccess"])):Be("",!0)])}}});const gt=de(ge,[["__scopeId","data-v-ba2b2695"]]);export{gt as default};