| 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,V=(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},U=(a,o)=>ae(a,oe(o));var c=(a,o,t)=>new Promise((m,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?m(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-9be8c0ed.js";import ce from"./formModal-af8f28f5.js";import ue from"./maintenanceFormModal-bf9651b9.js";import de from"./upkeepFormModal-9c54d5b9.js";import{aO as pe,b7 as me,ak as he,_ as fe}from"./index.js";import{c as ve,s as _e}from"./data-54cdfbfe.js";import{c as ye,d as be,e as ge}from"./otherApi-b668d959.js";import{l as $}from"./index-a4e1ec38.js";import{u as R}from"./index-4f5bc708.js";import{X as Ce}from"./XTTab-e7882549.js";import{P as ke}from"./ImportModal.vue_vue_type_style_index_0_scoped_375ed303_lang-fdd1625c.js";import{_ as we}from"./componentMap-61ccdbb2.js";import{u as De}from"./useForm-bff27c7a.js";import"./FormItem.vue_vue_type_script_lang-39d09a3e.js";import{d as xe,R as Me,f,B as Se,a5 as Re,q as Fe,Y as v,Z as k,_,l as u,u as i,n as O,a6 as q,a7 as F,$ as T,a9 as w,E as Te,a1 as ze,a2 as Be}from"./vue-aed314e3.js";import"./useForm-c7f42ee0.js";import"./antd-f259b82a.js";import"./componentMap-175d8229.js";import"./uuid-31b8b5a4.js";import"./useWindowSizeFn-6e9d633b.js";import"./onMountedOrActivated-d9097634.js";import"./sortable.esm-4ae27e0b.js";import"./useFormItem-421691fe.js";import"./useSortable-7d2b6665.js";import"./download-2ecc6b15.js";import"./index-7fe9c1e2.js";import"./copyTextToClipboard-328ee3b1.js";import"./index-6811a03f.js";import"./TextEditor-4892fcd0.js";import"./maintenanceApi-d665ebe9.js";import"./otherUpkeepApi-a5a017c9.js";const Ee=a=>(ze("data-v-214fe578"),a=a(),Be(),a),Ne={class:"m-4"},Ve={class:"flex justify-between"},Ue=Ee(()=>_("span",null,"新增设备",-1)),$e={class:"flex items-center justify-between my-4"},Oe={class:"flex"},qe={key:0},Pe={key:1},je=["onClick"],Ke=xe({__name:"index",setup(a){const o=Me(),[t,{getFieldsValue:m}]=De({schemas:_e,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),l=f(),y=f(""),D=f([]),n=f(),s=f();Se(()=>c(this,null,function*(){s.value=yield $({dictCode:"od"}),x()}));const[b,{openModal:z}]=R(),[P,{openModal:j}]=R(),[K,{openModal:A}]=R(),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){j(!0,{record:e})}function G(e){A(!0,{record:e})}function H(e){return c(this,null,function*(){return U(V({},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 d=[];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},d.push(g))})}),n.value=d,l.value=n.value[0].key})}function M(){return c(this,null,function*(){W(),yield C(),yield x()})}function S(h){return c(this,arguments,function*({isUpdate:e,values:d}){console.log(e),console.log(d),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=m().shiftDate?m().shiftDate:"",y.value=m().searchNames?m().searchNames:"",yield C()})}function ee(e){console.log("record::",e),o.push({path:"/bizEngineer/otherDetail",query:{id:e.id,name:e.name}})}return(e,d)=>{const h=Re("Icon"),g=Fe("auth");return v(),k("div",Ne,[_("div",null,[_("div",Ve,[u(i(ke),{title:"其他设备"}),_("div",null,[O((v(),q(i(pe),{border:!1,size:"large",type:"primary",onClick:d[0]||(d[0]=r=>X("add"))},{icon:F(()=>[u(h,{icon:"icon-xt-add_default|iconfont",size:18,color:"#fff",class:"mr-1"})]),default:F(()=>[Ue]),_: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",Oe,[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:p})=>[r.key==="isWarranty"?(v(),k("span",qe,T(i(me)(p.isWarranty,0)),1)):w("",!0),r.key==="deviceType"?(v(),k("span",Pe,T(i(he)(s.value,p.deviceType,"label")),1)):w("",!0),r.key==="name"?O((v(),k("a",{key:2,onClick:Ae=>ee(p)},[Te(T(p.name),1)],8,je)),[[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,p)},{label:"维修",auth:"biz:otherDevice:edit",tooltip:"维修",onClick:Z.bind(null,p)},{label:"保养",auth:"biz:otherDevice:edit",tooltip:"保养",onClick:G.bind(null,p)}]},null,8,["actions"])):w("",!0)]),_:1},8,["onRegister"]),u(ce,{onRegister:i(b),onSuccess:S,onCancel:M},null,8,["onRegister"]),u(ue,{onRegister:i(P),onSuccess:S,onCancel:M},null,8,["onRegister"]),u(de,{onRegister:i(K),onSuccess:S,onCancel:M},null,8,["onRegister"])])}}});const kt=fe(Ke,[["__scopeId","data-v-214fe578"]]);export{kt as default};
|