2 lines
8.7 KiB
JavaScript
2 lines
8.7 KiB
JavaScript
|
import{C as $,D as L,a4 as Q,F as W,M as z}from"./element-plus.ff90c99c.js";import{u as G}from"./vue-router.6d4cf914.js";import{P as H}from"./index.928157d8.js";import{a as J,b as K}from"./task.bc807280.js";import X from"./list_two.5a7db5e2.js";import{B as C,d as Y}from"./index.69a22209.js";import{d as h,s as Z,r as f,$ as E,o as p,c as ee,W as a,Q as o,P as r,T as n,u as _,U as i,j as te}from"./@vue.f8dfc830.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"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import"./usePaging.bd7a7dec.js";import"./useDictOptions.bbee1576.js";import"./task_template.ca0d9c9e.js";import"./lodash.3e731b89.js";import"./edit.vue_vue_type_style_index_0_lang.8b8634ec.js";import"./map.vue_vue_type_script_setup_true_name_taskTemplateEdit_lang.5be06498.js";import"./dialog_index_personnel.vue_vue_type_script_setup_true_name_companyLists_lang.ea6c5a60.js";import"./role.2b5eea93.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";const le={class:"edit-popup"},ue=h({name:"taskEidt"}),ae=h({...ue,props:{task:{type:Object,defualt:()=>{}},company_id:{type:String,default:""}},emits:["success","close"],setup(w,{expose:k,emit:I}){const A=w,D=G(),B=Z(),s=f("add");f({});const c=f(!1),v=f("\u521B\u5EFA\u65E5\u7A0B\u5B89\u6392"),U=m=>{e.start_time=C(m[0]).split(" ")[0],e.end_time=C(m[1]).split(" ")[0]},e=E({id:"",create_user_id:"",status:"",template_id:"",scheduling_id:"",template_name:"",start_time:"",end_time:"",datetime:"",content:"",templateInfo:{}}),x=E({datetime:{required:!0,message:"\u8BF7\u9009\u62E9\u65F6\u95F4\u8303\u56F4",trigger:"blur"},template_id:{required:!0,message:"\u8BF7\u9009\u62E9\u4EFB\u52A1\u5B89\u6392",trigger:"change"}}),T=E([31,32,33,34,35,45,48,49]),g=m=>!T.includes(m);function R(m){c.value=!1,e.template_id=m.id,e.template_name=m.title}const y=f(null),V=f(!1),j=async(m=null)=>{var t;try{y.value.clearValidate&&((t=y.value)==null||t.clearValidate())}catch(u){console.log(u)}s.value=="show"?(v.value="\u67E5\u770B\u65E5\u7A0B\u5B89\u6392",V.value=!0,Object.keys(e).forEach(u=>{m[u]!=null&&m[u]!=null&&(e[u]=m[u])}),e.datetime=[e.start_time.split(" ")[0],e.end_time.split(" ")[0]]):(V.value=!1,Object.keys(e).forEach(u=>{e[u]=""}))},q=()=>{var m;if(s.value=="show")return(m=B.value)==null?void 0:m.close();y.value.validate(async t=>{var u;if(t){const d={...e};D.query.id&&(d.scheduling_id=D.query.id.toString()),d.start_time=d.start_time.split(" ")[0],d.end_time=d.end_time.split(" ")[0],s.value=="edit"?await J(d):await K(d),(u=B.value)==null||u.close(),I("success")}})},P=(m="add")=>{var t;s.value=m,(t=B.value)==null||t.open()},S=()=>{I("close")};return k({open:P,updatedForm:j}),(m,t)=>{const u=$,d=L,M=Q,N=W,O=z;return p(),ee("div",le,[a(H,{ref_key:"popupRef",ref:B,title:_(v),async:!0,width:"800px",onConfirm:q,onClose:S,clickModalClose:_(s)=="show",button:_(s)!="show"},{default:o(()=>[a(N,{ref_key:"formRef",ref:y,rules:x,class:"formdata",model:e,"label-width":"120px"},{default:o(()=>[e.id?(p(),r(d,{key:0,label:"\u4EFB\u52A1ID",prop:"id"},{default:o(()=>[a(u,{disabled:!0,modelValue:e.id,"onUp
|