1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
|
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[8e3],{8027:function(t,e,a){a.d(e,{Z:function(){return u}});var i=function(){var t=this,e=t._self._c;return e("div",[e("el-tag",{attrs:{size:"medium",type:t.tagType}},[t._v(t._s(t.showName))])],1)},r=[],n={name:"statusTag",props:{injectData:{type:Object,default:()=>({})}},data(){return{tagType:"",showName:"",list:JSON.parse(localStorage.getItem("publicList")).enabledVoList}},mounted(){this.init()},methods:{init(){1===this.injectData.enabled?this.tagType="":this.tagType="warning",this.list&&this.list.map((t=>{t.dataCode===this.injectData.enabled&&(this.showName=t.dataName)}))}},watch:{injectData(t,e){e.enabled!==t.enabled&&this.init()}}},s=n,o=a(1001),l=(0,o.Z)(s,i,r,!1,null,null,null),u=l.exports},8e3:function(t,e,a){a.r(e),a.d(e,{default:function(){return Z}});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-box"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH}},[t.tableBtn.length?e("method-btn",{attrs:{slot:"handleBtn",width:120,label:"操作","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),e("pagination",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,total:t.total},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:function(e){return t.getList()}}}),e("base-dialog",{attrs:{dialogTitle:t.addOrEditTitle,dialogVisible:t.centervisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[e("spare-parts-add",{ref:"sparePartsAdd",on:{successSubmit:t.successSubmit}})],1)],1)},r=[],n=function(){var t=this,e=t._self._c;return e("el-form",{ref:"form",attrs:{rules:t.rules,"label-width":"80px",model:t.form}},[e("el-form-item",{attrs:{label:"备件类别",prop:"type"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"备件类别"},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},t._l(t.sparePartsTypeList,(function(t,a){return e("el-option",{key:a,attrs:{label:t.dataName,value:t.dataName}})})),1)],1),e("el-form-item",{attrs:{label:"备件名称",prop:"name"}},[e("el-input",{attrs:{placeholder:"备件名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),e("el-form-item",{attrs:{label:"备件型号",prop:"model"}},[e("el-input",{attrs:{placeholder:"无型号请填写为 /"},model:{value:t.form.model,callback:function(e){t.$set(t.form,"model",e)},expression:"form.model"}})],1),e("el-form-item",{directives:[{name:"show",rawName:"v-show",value:t.isEdit,expression:"isEdit"}],attrs:{label:"状态",prop:"enabled"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"状态"},model:{value:t.form.enabled,callback:function(e){t.$set(t.form,"enabled",e)},expression:"form.enabled"}},t._l(t.stateList,(function(t,a){return e("el-option",{key:a,attrs:{label:t.dataName,value:t.dataCode}})})),1)],1)],1)},s=[],o=a(910),l={name:"SparePartsAdd",data(){return{form:{id:"",type:"",name:"",model:"",enabled:1},sparePartsTypeList:JSON.parse(localStorage.getItem("publicList")).sparePartsTypeList,stateList:JSON.parse(localStorage.getItem("publicList")).enabledVoList,rules:{type:[{required:!0,message:"请选择备件类别",trigger:"change"}],name:[{required:!0,message:"请输入备件名称",trigger:"blur"}],model:[{required:!0,message:"请输入备件型号",trigger:"blur"}]},isEdit:!1}},methods:{init(t){t?(this.form.id=t.id,(0,o.ME)({id:t.id}).then((e=>{0===e.code&&(this.form.type=e.data.type,this.form.name=e.data.name,this.form.model="copy"===t.type?"":e.data.model,this.form.enabled=e.data.enabled)})),"edit"===t.type?this.isEdit=!0:(this.isEdit=!1,this.form.id="")):(this.isEdit=!1,this.form.id="")},submitForm(){this.$refs["form"].validate((t=>{if(!t)return!1;th
|