| 1 |
- var te=Object.defineProperty,ae=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var ie=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var N=(a,o,t)=>o in a?te(a,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[o]=t,U=(a,o)=>{for(var t in o||(o={}))ie.call(o,t)&&N(a,t,o[t]);if(E)for(var t of E(o))ne.call(o,t)&&N(a,t,o[t]);return a},V=(a,o)=>ae(a,oe(o));var c=(a,o,t)=>new Promise((p,l)=>{var y=s=>{try{n(t.next(s))}catch(b){l(b)}},D=s=>{try{n(t.throw(s))}catch(b){l(b)}},n=s=>s.done?p(s.value):Promise.resolve(s.value).then(y,D);n((t=t.apply(a,o)).next())});import{u as se,a as le,_ as re}from"./useTable-bf847966.js";import ce from"./formModal-78df5a93.js";import ue from"./maintenanceFormModal-078e286e.js";import de from"./upkeepFormModal-08ee09a3.js";import{aR as pe,b7 as me,aj as he,_ as fe}from"./index.js";import{c as ve,s as _e}from"./data-1a492e24.js";import{c as ye,d as be,e as ge}from"./otherApi-20a1f625.js";import{l as $}from"./index-fe06ec6c.js";import{u as S}from"./index-c733fbf6.js";import{X as Ce}from"./XTTab-9b8140e6.js";import{P as ke}from"./ImportModal.vue_vue_type_style_index_0_scoped_a59c69fa_lang-367be871.js";import{_ as we}from"./componentMap-8020b34e.js";import{u as De}from"./useForm-64bbd444.js";import"./FormItem.vue_vue_type_script_lang-aa52e9e4.js";import{d as xe,R as Me,f,B as Re,a5 as Se,q as Fe,Y as v,Z as k,_,l as u,u as i,n as j,a6 as q,a7 as F,$ as T,a9 as w,E as Te,a1 as ze,a2 as Be}from"./vue-b33f04cb.js";import"./useForm-b1e549d3.js";import"./antd-f204cf77.js";import"./componentMap-5ed4f2d1.js";import"./uuid-31b8b5a4.js";import"./useWindowSizeFn-e2b93e2a.js";import"./onMountedOrActivated-3a1cee4e.js";import"./sortable.esm-4ae27e0b.js";import"./useFormItem-1a9613e7.js";import"./useSortable-764357db.js";import"./download-7fff4f5c.js";import"./index-2f799b33.js";import"./copyTextToClipboard-2136d900.js";import"./index-2f695166.js";import"./TextEditor-6383dadf.js";import"./maintenanceApi-77f76292.js";import"./otherUpkeepApi-bb1609e0.js";const Ee=a=>(ze("data-v-214fe578"),a=a(),Be(),a),Ne={class:"m-4"},Ue={class:"flex justify-between"},Ve=Ee(()=>_("span",null,"新增设备",-1)),$e={class:"flex items-center justify-between my-4"},je={class:"flex"},qe={key:0},Oe={key:1},Pe=["onClick"],Ke=xe({__name:"index",setup(a){const o=Me(),[t,{getFieldsValue:p}]=De({schemas:_e,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),l=f(),y=f(""),D=f([]),n=f(),s=f();Re(()=>c(this,null,function*(){s.value=yield $({dictCode:"od"}),x()}));const[b,{openModal:z}]=S(),[O,{openModal:P}]=S(),[K,{openModal:A}]=S(),B=f([{field:"create_time",direction:"DESC"}]),[L,{reload:C,clearSelectedRowKeys:W}]=se({api:ye,batchDelApi:be,delAuthList:["biz:consumable:remove"],rowKey:"id",columns:ve,showIndexColumn:!0,bordered:!0,actionColumn:{width:200,title:"操作",dataIndex:"action"},beforeFetch:H,sortFn:Y});function X(e){e=="add"&&z(!0,{isUpdate:!1,record:{}})}function Q(e){z(!0,{record:e,isUpdate:!0})}function Y(e){e!=null&&e.order&&(e!=null&&e.columnKey)&&(B.value=[{field:e.columnKey,direction:e.order.replace(/(\w+)(end)/g,"$1").toUpperCase()}])}function Z(e){P(!0,{record:e})}function G(e){A(!0,{record:e})}function H(e){return c(this,null,function*(){return V(U({},e),{orders:B.value,uniqueCode:y.value==""?void 0:y.value,deviceType:l.value=="total"?void 0:l.value})})}function x(){return c(this,null,function*(){n.value=yield $({dictCode:"od"});const e=yield ge();let m=[];yield n.value.splice(0,0,{value:"total",label:"全部"}),n.value.forEach(h=>{let g={};Object.keys(e).forEach(r=>{h.value==r&&(g={key:h.value,label:h.label,value:e[r],hasValue:!0,prefixColor:h.prefixColor,hasBracket:!0},m.push(g))})}),n.value=m,l.value=n.value[0].key})}function M(){return c(this,null,function*(){W(),yield C(),yield x()})}function R(h){return c(this,arguments,function*({isUpdate:e,values:m}){yield C(),yield x()})}function J(e){return c(this,null,function*(){l.value=e.value,yield C()})}function I(){return c(this,null,function*(){D.value=p().shiftDate?p().shiftDate:"",y.value=p().searchNames?p().searchNames:"",yield C()})}function ee(e){o.push({path:"/bizEngineer/otherDetail",query:{id:e.id,name:e.name}})}return(e,m)=>{const h=Se("Icon"),g=Fe("auth");return v(),k("div",Ne,[_("div",null,[_("div",Ue,[u(i(ke),{title:"其他设备"}),_("div",null,[j((v(),q(i(pe),{border:!1,size:"large",type:"primary",onClick:m[0]||(m[0]=r=>X("add"))},{icon:F(()=>[u(h,{icon:"icon-xt-add_default|iconfont",size:18,color:"#fff",class:"mr-1"})]),default:F(()=>[Ve]),_:1})),[[g,["biz:otherDevice:add"]]])])]),_("div",$e,[u(i(Ce),{type:"illness",width:180,selected:l.value,data:n.value,onItemClick:J},null,8,["selected","data"]),_("div",je,[u(i(we),{onRegister:i(t),onFieldValueChange:I,style:{width:"240px"},class:"mr-2"},null,8,["onRegister"])])])]),u(i(re),{onRegister:i(L)},{bodyCell:F(({column:r,record:d})=>[r.key==="isWarranty"?(v(),k("span",qe,T(i(me)(d.isWarranty,0)),1)):w("",!0),r.key==="deviceType"?(v(),k("span",Oe,T(i(he)(s.value,d.deviceType,"label")),1)):w("",!0),r.key==="name"?j((v(),k("a",{key:2,onClick:Ae=>ee(d)},[Te(T(d.name),1)],8,Pe)),[[g,["biz:otherDevice:query"]]]):w("",!0),r.key==="action"?(v(),q(i(le),{key:3,actions:[{label:"编辑",auth:"biz:otherDevice:edit",tooltip:"编辑",onClick:Q.bind(null,d)},{label:"维修",auth:"biz:otherDevice:edit",tooltip:"维修",onClick:Z.bind(null,d)},{label:"保养",auth:"biz:otherDevice:edit",tooltip:"保养",onClick:G.bind(null,d)}]},null,8,["actions"])):w("",!0)]),_:1},8,["onRegister"]),u(ce,{onRegister:i(b),onSuccess:R,onCancel:M},null,8,["onRegister"]),u(ue,{onRegister:i(O),onSuccess:R,onCancel:M},null,8,["onRegister"]),u(de,{onRegister:i(K),onSuccess:R,onCancel:M},null,8,["onRegister"])])}}});const kt=fe(Ke,[["__scopeId","data-v-214fe578"]]);export{kt as default};
|