import{C as z,D as G,w as H,F as K,J as M,P as O,Q as X,R as Y}from"./element-plus.ff90c99c.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import{f as ee,b as te,d as oe}from"./index.872975fb.js";import{u as ae}from"./vue-router.6d4cf914.js";import{u as ie}from"./usePaging.bd7a7dec.js";import{u as le}from"./useDictOptions.09fdf1bc.js";import{g as se}from"./task_template.aba7baf0.js";import{d as R,s as ne,r as k,$,aq as re,o as n,c as me,W as o,Q as a,u as e,U as y,R as F,P as u,a as D,V as pe,j as ue,T as de,n as A}from"./@vue.f8dfc830.js";import"./lodash.3e731b89.js";import{_ as ce,t as _e}from"./edit.vue_vue_type_style_index_0_lang.dbafda0a.js";import{_ as fe}from"./edit_admin.vue_vue_type_style_index_0_lang.4b8b6024.js";import{_ as ye}from"./edit_village.vue_vue_type_style_index_0_lang.9e8de7ee.js";import{d as ve}from"./dict.ee3ff843.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.000fc3bb.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.31b99a49.js";import"./dialog_index_personnel.vue_vue_type_script_setup_true_name_companyLists_lang.61f43597.js";import"./role.a5106d89.js";import"./create_task_template.99b72f55.js";import"./dialog_commodity.vue_vue_type_script_setup_true_name_companyLists_lang.dc8e8244.js";const ke={class:"mt-4"},Fe={class:"flex justify-end mt-4"},we=R({name:"taskTemplateLists"}),Ce=R({...we,setup(be){var h,g,x;const r=ne(),S=k([]),s=k(!1),d=ae(),m=$({id:"",company_id:"",title:"",admin_id:"",money:"",type:"",status:"",content:""}),w=k(10);(h=d.query)!=null&&h.id&&(m.id=d.query.id),(g=d.query)!=null&&g.company_id&&(m.company_id=d.query.company_id),(x=d.query)!=null&&x.company_type&&(w.value=d.query.company_type),$([{id:1,name:"\u663E\u793A"},{id:2,name:"\u9690\u85CF"}]);const C=k([]),T=i=>{C.value=i.map(({id:t})=>t)},{dictData:b}=le(""),{pager:_,getLists:c,resetParams:q,resetPage:P}=ie({fetchFun:_e,params:m}),I=async()=>{var i,t;s.value=!0,await A(),(i=r.value)==null||i.open("add"),(t=r.value)==null||t.setFormData({company_id:m.company_id})},L=async i=>{var t,v;s.value=!0,await A(),(t=r.value)==null||t.open("edit"),i.task_admin_name=i.directorInfo.nickname,(v=r.value)==null||v.setFormData(i)},N=async i=>{await ee.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await se({id:i}),c()};return ve({type_id:10}).then(i=>{S.value=i.lists}),c(),(i,t)=>{const v=z,B=G,f=H,U=K,V=M,j=te,p=O,Q=X,J=Z,E=re("perms"),W=Y;return n(),me("div",null,[o(V,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(U,{class:"mb-[-16px] formtabel",model:e(m),inline:""},{default:a(()=>[o(B,{"label-width":"100px",label:"\u4EFB\u52A1\u540D\u79F0",prop:"title"},{default:a(()=>[o(v,{class:"w-[280px]",modelValue:e(m).title,"onUpdate:modelValue":t[0]||(t[0]=l=>e(m).title=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(B,{"label-width":"100px",label:""},{default:a(()=>[o(f,{class:"el-btn",type:"primary",onClick:e(P)},{default:a(()=>[y("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(f,{onClick:e(q)},{default:a(()=>[y("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),F((n(),u(V,{class:"!border-none",shadow:"never"},{default:a(()=>[F((n(),u(f,{type:"primary",onClick:I},{icon:a(()=>[o(j,{name:"el-icon-Plus"})]),default:a(()=>[y(" \u65B0\u589E ")]),_:1})),[[E,["task_template.task_template/add"]]]),F((n(),u(f,{disabled:!e(C).length,onClick:t[1]||(t[1]=l=>N(e(C)))},{default:a(()=>[y(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[E,["task_template.task_template/delete"]]]),D("div",ke,[o(Q,{data:e(_).lists,onSelectionChange:T},{default:a(()=>[o(p,{type:"selection",width:"55"}),o(p,{label:"ID",width:"80",prop:"id","show-overflow-tooltip":""}),o(p,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),o(p,{label:"\u8D1F\u8D23\u4EBA",prop:"directorInfo.nickname","show-overflow-tooltip":""}),o(p,{label:"\u72B6\u6001","show-overflow-tooltip":""},{default:a(({row:l})=>[D("span",null,pe(l.status==2?"\u663E\u793A":"\u9690\u85CF"),1)]),_:1}),o(p,{label:"\u4EFB\u52A1\u63CF\u8FF0",prop:"content","show-overflow-tooltip":""}),o(p,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[F((n(),u(f,{type:"primary",link:"",onClick:Ee=>L(l)},{default:a(()=>[y(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[E,["task_template.task_template/edit"]]])]),_:1})]),_:1},8,["data"])]),D("div",Fe,[o(J,{modelValue:e(_),"onUpdate:modelValue":t[2]||(t[2]=l=>ue(_)?_.value=l:null),onChange:e(c)},null,8,["modelValue","onChange"])])]),_:1})),[[W,e(_).loading]]),e(s)&&e(w)==16?(n(),u(fe,{key:0,ref_key:"editRef",ref:r,"dict-data":e(b),onSuccess:e(c),onClose:t[3]||(t[3]=l=>s.value=!1)},null,8,["dict-data","onSuccess"])):e(s)&&e(w)==17?(n(),u(ye,{key:1,ref_key:"editRef",ref:r,"dict-data":e(b),onSuccess:e(c),onClose:t[4]||(t[4]=l=>s.value=!1)},null,8,["dict-data","onSuccess"])):e(s)?(n(),u(ce,{key:2,ref_key:"editRef",ref:r,"dict-data":e(b),onSuccess:e(c),onClose:t[5]||(t[5]=l=>s.value=!1)},null,8,["dict-data","onSuccess"])):de("",!0)])}}});const bt=oe(Ce,[["__scopeId","data-v-5840ed09"]]);export{bt as default};