tft-fe/dist/js/1487.2312df4b.js

1 line
11 KiB
JavaScript
Raw Normal View History

2023-06-30 14:01:06 +08:00
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[1487],{1487:function(t,e,a){a.r(e),a.d(e,{default:function(){return C}});var r=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:80,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("account-add",{ref:"accountList",on:{successSubmit:t.successSubmit}})],1)],1)},i=[],n=a(475),o=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:"account"}},[e("el-input",{attrs:{placeholder:"只能输入字母或数字,不可输入汉字",disabled:t.isEdit},model:{value:t.form.account,callback:function(e){t.$set(t.form,"account",e)},expression:"form.account"}})],1),e("el-form-item",{attrs:{label:"密码",prop:"password"}},[e("el-input",{model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),e("el-form-item",{attrs:{label:"姓名",prop:"name"}},[e("el-input",{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:"proLineId"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"所属产线"},model:{value:t.form.proLineId,callback:function(e){t.$set(t.form,"proLineId",e)},expression:"form.proLineId"}},t._l(t.lineList,(function(t,a){return e("el-option",{key:a,attrs:{label:t.name,value:t.id}})})),1)],1),e("el-form-item",{attrs:{label:"角色",prop:"role"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"角色"},model:{value:t.form.role,callback:function(e){t.$set(t.form,"role",e)},expression:"form.role"}},t._l(t.roleList,(function(t,a){return e("el-option",{key:a,attrs:{label:t.dataName,value:t.dataName}})})),1)],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=[],l=a(910),u={name:"AccountAdd",data(){return{form:{id:"",account:"",password:"123456",name:"",proLineId:"",role:"",enabled:1},isEdit:!1,lineList:JSON.parse(localStorage.getItem("publicList")).proLineVoList,roleList:JSON.parse(localStorage.getItem("publicList")).roleVoList,stateList:JSON.parse(localStorage.getItem("publicList")).enabledVoList,rules:{account:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:3,max:18,message:"长度在 3 到 18 个字符",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],name:[{required:!0,message:"请输入姓名",trigger:"blur"}],proLineId:[{required:!0,message:"请选择所属产线",trigger:"change"}],role:[{required:!0,message:"请选择角色",trigger:"change"}]}}},methods:{init(t){t?(this.isEdit=!0,this.form.id=t,(0,l.D0)({id:t}).then((t=>{0===t.code&&(this.form.account=t.data.account,this.form.password=t.data.password,this.form.name=t.data.name,this.form.proLineId=t.data.proLineId,this.form.role=t.data.role,this.form.enabled=t.da