2 lines
3.9 KiB
JavaScript
2 lines
3.9 KiB
JavaScript
import{a7 as V,w as k,G as E,O as S,H as L}from"./element-plus.02c000b8.js";import{e as A}from"./index.7e71cca7.js";import{S as I}from"./sortablejs.412b554c.js";import{d as z,r as f,w as x,o as R,c as U,a as m,X as s,P as r,u as N,V as b,n as F,b7 as O,b6 as $}from"./@vue.ad3a2c51.js";import"./@vueuse.c2fd8b33.js";import"./@element-plus.4b8482d8.js";import"./lodash-es.61686ec6.js";import"./dayjs.c8b8967e.js";import"./axios.136fb7b6.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./memoize-one.4ee5c96d.js";import"./lodash.8effadcb.js";import"./vue-router.93f65f3b.js";import"./pinia.f0255b9b.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.3cb93b94.js";import"./color.0adfd97a.js";import"./clone.4b381e37.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.09754c1e.js";import"./vue-clipboard3.c5f2d3ed.js";import"./clipboard.42524a75.js";import"./echarts.234b3572.js";import"./zrender.8ee1a698.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.0d5173e3.js";import"./vue3-eventbus.c7305b83.js";import"./mitt.d8e3ba72.js";const q=u=>(O("data-v-eb5a43b4"),u=u(),$(),u),G={class:"noflex"},H={class:"flex"},P=b("\u6DFB\u52A0\u65F6\u95F4\u6BB5"),X=b(" \u6279\u91CF\u5220\u9664 "),J=q(()=>m("div",{class:"text-danger text-lg my-2 font-bold"},"\u63D0\u793A\uFF1A\u53EF\u901A\u8FC7\u62D6\u62FD\u6539\u53D8\u65F6\u95F4\u6BB5\u7684\u884C\u6392\u5E8F",-1)),K={class:"mt-2"},M={class:"flex"},Q={class:"flex leading-4"},W=b(" \u5220\u9664 "),Y=z({__name:"customization",props:{orderTimeList:Object},emits:["update:orderTimeList"],setup(u,{emit:y}){const C=u;let o=f([]);const g=({row:t,rowIndex:e})=>t.row_index=e,d=f();let h=null;const D=()=>{if(d.value){const t=d.value.$el.querySelector(".el-table__body tbody");h=I.create(t,{handle:".el-table__row",onEnd:({newIndex:e,oldIndex:n})=>{const i=o.value,a=i.splice(n,1)[0];i.splice(e,0,a),o.value=[],F(()=>{o.value=i})}})}},p=f([]),w=t=>{p.value=t},B=()=>{o.value.push({startTime:"",endTime:""})},v=async(t,e)=>{var n;e=Array.isArray(e)?e:[e];for(let i=o.value.length,a=i-1;a>=0;a--)e.find(_=>_.row_index==a)&&o.value.splice(a,1);(n=d.value)==null||n.clearSelection()};return x(()=>C.orderTimeList,t=>{var e;h||t&&((e=t.orderTimeList)==null?void 0:e.length)!=0&&(o.value=t.orderTimeList,F(()=>{D()}))},{deep:!0,immediate:!0}),x(o.value,t=>{y("update:orderTimeList",{orderTimeList:t,serviceTime:"",endTime:"",intervalTime:"",startTime:""})},{immediate:!0,deep:!0}),(t,e)=>{const n=k,i=E,a=V,T=S,_=L;return R(),U("div",G,[m("div",null,[m("div",H,[s(n,{type:"primary",onClick:B},{default:r(()=>[P]),_:1}),s(n,{onClick:e[0]||(e[0]=l=>v("multiple",p.value)),disabled:!p.value.length},{default:r(()=>[X]),_:1},8,["disabled"])]),J,m("div",K,[s(_,{size:"large",ref_key:"tableDataRef",ref:d,data:N(o),"row-class-name":g,fit:!0,style:{width:"840px"},"row-key":"id",onSelectionChange:w,border:""},{default:r(()=>[s(i,{type:"selection","max-width":"55"}),s(i,{property:"timeDesc",label:"\u65F6\u95F4\u6BB5","min-width":"360"},{default:r(({row:l})=>[m("div",M,[s(a,{modelValue:l.startTime,"onUpdate:modelValue":c=>l.startTime=c,"max-time":l.endTime,class:"mr-2",placeholder:"\u5F00\u59CB\u65F6\u95F4",start:"00:00",step:"00:30",end:"24:00"},null,8,["modelValue","onUpdate:modelValue","max-time"]),s(a,{modelValue:l.endTime,"onUpdate:modelValue":c=>l.endTime=c,"min-time":l.startTime,placeholder:"\u7ED3\u675F\u65F6\u95F4",start:"00:00",step:"00:30",end:"24:00"},null,8,["modelValue","onUpdate:modelValue","min-time"])])]),_:1}),s(i,{label:"\u64CD\u4F5C","min-width":"110",fixed:"right"},{default:r(l=>[m("div",Q,[s(T,{class:"ml-2",type:"danger",underline:!1,onClick:c=>v("single",l.row)},{default:r(()=>[W]),_:2},1032,["onClick"])])]),_:1})]),_:1},8,["data"])])])])}}});const Ae=A(Y,[["__scopeId","data-v-eb5a43b4"]]);export{Ae as default};
|