| 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-4417017a.js";import ce from"./formModal-4253e556.js";import ue from"./maintenanceFormModal-7b828b08.js";import de from"./upkeepFormModal-4e2eb843.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-35691dbb.js";import{c as ye,d as be,e as ge}from"./otherApi-20a1f625.js";import{l as $}from"./index-971488e0.js";import{u as S}from"./index-74ee4d87.js";import{X as Ce}from"./XTTab-2f7efd67.js";import{P as ke}from"./ImportModal.vue_vue_type_style_index_0_scoped_a59c69fa_lang-153d3ad5.js";import{_ as we}from"./componentMap-090b9009.js";import{u as De}from"./useForm-2d0613b7.js";import"./FormItem.vue_vue_type_script_lang-d3f182d4.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-8fccce23.js";import"./useForm-bca35dcc.js";import"./antd-d98832c6.js";import"./componentMap-4cfd6e0f.js";import"./uuid-31b8b5a4.js";import"./useWindowSizeFn-e2b93e2a.js";import"./onMountedOrActivated-cb072c10.js";import"./sortable.esm-4ae27e0b.js";import"./useFormItem-9c6d112e.js";import"./useSortable-7338e303.js";import"./download-fac9a150.js";import"./index-7b00e5b4.js";import"./copyTextToClipboard-ba2fd847.js";import"./index-a7810134.js";import"./TextEditor-e80f27f2.js";import"./maintenanceApi-77f76292.js";import"./otherUpkeepApi-bb1609e0.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"},je={class:"flex"},qe={key:0},Oe={key:1},Pe=["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();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 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 R(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=Se("Icon"),g=Fe("auth");return v(),k("div",Ne,[_("div",null,[_("div",Ve,[u(i(ke),{title:"其他设备"}),_("div",null,[j((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",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:p})=>[r.key==="isWarranty"?(v(),k("span",qe,T(i(me)(p.isWarranty,0)),1)):w("",!0),r.key==="deviceType"?(v(),k("span",Oe,T(i(he)(s.value,p.deviceType,"label")),1)):w("",!0),r.key==="name"?j((v(),k("a",{key:2,onClick:Ae=>ee(p)},[Te(T(p.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,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: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};
|