2 lines
7.1 KiB
JavaScript
2 lines
7.1 KiB
JavaScript
import{B as W,C as X,M as Y,N as Z,w as ee,D as te,I as le,O as ae,P as oe,Q as ue}from"./element-plus.b64c0a90.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.a080b28e.js";import{f as se,b as ie,d as pe}from"./index.760285cd.js";import{u as de}from"./vue-router.9f65afb1.js";import{u as re}from"./usePaging.2ad8e1e6.js";import{u as me}from"./useDictOptions.b25954a0.js";import{e as ce,a as _e}from"./map.vue_vue_type_script_setup_true_name_taskTemplateEdit_lang.2c5c2b6d.js";import{d as P,s as fe,r as E,$ as U,af as Fe,o as s,c as k,U as e,L as o,u as a,T as $,a7 as L,K as p,R as c,M as F,a as C,S as be,k as ye,Q as ve,n as S}from"./@vue.51d7f2d8.js";import"./lodash.08438971.js";import{_ as Be}from"./edit.vue_vue_type_script_setup_true_name_taskTemplateEdit_lang.9d43592b.js";import{d as we}from"./dict.5489928f.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.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.40d5feba.js";import"./index.8bb6f5eb.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";import"./dialog_index_personnel.vue_vue_type_script_setup_true_name_companyLists_lang.b188432b.js";import"./role.93627cae.js";const Ee={class:"mt-4"},ke={class:"flex mt-4 justify-end"},Ce=P({name:"taskTemplateLists"}),he=P({...Ce,setup(De){var V,x;const _=fe(),h=E([]),b=E(!1),y=de(),u=U({id:"",company_id:"",title:"",admin_id:"",money:"",type:"",status:"",content:""});(V=y.query)!=null&&V.id&&(u.id=y.query.id),(x=y.query)!=null&&x.company_id&&(u.company_id=y.query.company_id);const R=U([{id:1,name:"\u663E\u793A"},{id:2,name:"\u9690\u85CF"}]),w=E([]),q=n=>{w.value=n.map(({id:l})=>l)},{dictData:I}=me(""),{pager:f,getLists:v,resetParams:N,resetPage:M}=re({fetchFun:_e,params:u}),O=async()=>{var n,l;b.value=!0,await S(),(n=_.value)==null||n.open("add"),(l=_.value)==null||l.setFormData({company_id:u.company_id})},Q=async n=>{var l,d;b.value=!0,await S(),(l=_.value)==null||l.open("edit"),(d=_.value)==null||d.setFormData(n)},D=async n=>{await se.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ce({id:n}),v()};return we({type_id:10}).then(n=>{h.value=n.lists}),v(),(n,l)=>{const d=W,r=X,g=Y,A=Z,m=ee,j=te,T=le,K=ie,i=ae,z=oe,G=ne,B=Fe("perms"),H=ue;return s(),k("div",null,[e(T,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(j,{class:"mb-[-16px] formtabel",model:a(u),inline:""},{default:o(()=>[e(r,{"label-width":"100px",label:"\u4EFB\u52A1\u540D\u79F0",prop:"title"},{default:o(()=>[e(d,{class:"w-[280px]",modelValue:a(u).title,"onUpdate:modelValue":l[0]||(l[0]=t=>a(u).title=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(r,{"label-width":"100px",label:"\u521B\u5EFA\u4EBA",prop:"admin_id"},{default:o(()=>[e(d,{class:"w-[280px]",modelValue:a(u).admin_id,"onUpdate:modelValue":l[1]||(l[1]=t=>a(u).admin_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u521B\u5EFA\u4EBA"},null,8,["modelValue"])]),_:1}),e(r,{"label-width":"100px",label:"\u91D1\u989D",prop:"money"},{default:o(()=>[e(d,{class:"w-[280px]",modelValue:a(u).money,"onUpdate:modelValue":l[2]||(l[2]=t=>a(u).money=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u91D1\u989D"},null,8,["modelValue"])]),_:1}),e(r,{"label-width":"100px",label:"\u4EFB\u52A1\u7C7B\u578B",prop:"type"},{default:o(()=>[e(A,{modelValue:a(u).type,"onUpdate:modelValue":l[3]||(l[3]=t=>a(u).type=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u7C7B\u578B"},{default:o(()=>[(s(!0),k($,null,L(a(h),t=>(s(),p(g,{key:t.label,value:t.id,label:t.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(r,{"label-width":"100px",label:"\u72B6\u6001",prop:"status"},{default:o(()=>[e(A,{modelValue:a(u).status,"onUpdate:modelValue":l[4]||(l[4]=t=>a(u).status=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"},{default:o(()=>[(s(!0),k($,null,L(a(R),t=>(s(),p(g,{key:t.label,value:t.id,label:t.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(r,{"label-width":"100px",label:"\u4EFB\u52A1\u63CF\u8FF0",prop:"content"},{default:o(()=>[e(d,{class:"w-[280px]",modelValue:a(u).content,"onUpdate:modelValue":l[5]||(l[5]=t=>a(u).content=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u63CF\u8FF0"},null,8,["modelValue"])]),_:1}),e(r,{"label-width":"100px",label:""},{default:o(()=>[e(m,{class:"el-btn",type:"primary",onClick:a(M)},{default:o(()=>[c("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(m,{onClick:a(N)},{default:o(()=>[c("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),F((s(),p(T,{class:"!border-none",shadow:"never"},{default:o(()=>[F((s(),p(m,{type:"primary",onClick:O},{icon:o(()=>[e(K,{name:"el-icon-Plus"})]),default:o(()=>[c(" \u65B0\u589E ")]),_:1})),[[B,["task_template.task_template/add"]]]),F((s(),p(m,{disabled:!a(w).length,onClick:l[6]||(l[6]=t=>D(a(w)))},{default:o(()=>[c(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[B,["task_template.task_template/delete"]]]),C("div",Ee,[e(z,{data:a(f).lists,onSelectionChange:q},{default:o(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"ID",width:"80",prop:"id","show-overflow-tooltip":""}),e(i,{label:"\u4EFB\u52A1\u540D\u79F0",prop:"title","show-overflow-tooltip":""}),e(i,{label:"\u521B\u5EFA\u4EBA",prop:"admin_name","show-overflow-tooltip":""}),e(i,{label:"\u91D1\u989D",prop:"money","show-overflow-tooltip":""}),e(i,{label:"\u4EFB\u52A1\u7C7B\u578B",prop:"type_name","show-overflow-tooltip":""}),e(i,{label:"\u72B6\u6001","show-overflow-tooltip":""},{default:o(({row:t})=>[C("span",null,be(t.status==1?"\u663E\u793A":"\u9690\u85CF"),1)]),_:1}),e(i,{label:"\u4EFB\u52A1\u63CF\u8FF0",prop:"content","show-overflow-tooltip":""}),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:t})=>[F((s(),p(m,{type:"primary",link:"",onClick:J=>Q(t)},{default:o(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[B,["task_template.task_template/edit"]]]),F((s(),p(m,{type:"danger",link:"",onClick:J=>D(t.id)},{default:o(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[B,["task_template.task_template/delete"]]])]),_:1})]),_:1},8,["data"])]),C("div",ke,[e(G,{modelValue:a(f),"onUpdate:modelValue":l[7]||(l[7]=t=>ye(f)?f.value=t:null),onChange:a(v)},null,8,["modelValue","onChange"])])]),_:1})),[[H,a(f).loading]]),a(b)?(s(),p(Be,{key:0,ref_key:"editRef",ref:_,"dict-data":a(I),onSuccess:a(v),onClose:l[8]||(l[8]=t=>b.value=!1)},null,8,["dict-data","onSuccess"])):ve("",!0)])}}});const bt=pe(he,[["__scopeId","data-v-20d08260"]]);export{bt as default};
|