From 48280bcd3a6d1d3125dfec1912afa92ae2ff6eee Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期二, 02 九月 2025 16:59:40 +0800 Subject: [PATCH] mdc设备台账修改,设备管理设备台账修改 --- src/views/mdc/base/modules/EquipmentList/UserModal.vue | 69 +++++----------------------------- 1 files changed, 10 insertions(+), 59 deletions(-) diff --git a/src/views/mdc/base/modules/EquipmentList/UserModal.vue b/src/views/mdc/base/modules/EquipmentList/UserModal.vue index aa7a7a5..c8d1a80 100644 --- a/src/views/mdc/base/modules/EquipmentList/UserModal.vue +++ b/src/views/mdc/base/modules/EquipmentList/UserModal.vue @@ -40,7 +40,7 @@ <a-select :disabled="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷" allow-clear :triggerChange="true" v-model="model.equipmentType"> - <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> + <a-select-option v-for='item in equipmentTypeList' :key='item.id' :value='item.equipmentTypeName'> {{item.equipmentTypeName}} </a-select-option> </a-select> @@ -49,9 +49,8 @@ <a-col :span="12"> <a-form-model-item label="杞﹂棿鍒嗛厤" v-show="!productionDisabled" ref="selectedProduction" prop="selectedProduction"> - <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'璇烽�夋嫨杞﹂棿!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>--> <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" - @back="backProductionInfo" :backProduction="true" + @back="backProductionInfo" :backProduction="true" :allowClear="false" :treeProductOpera="true"></j-select-equipment-production> </a-form-model-item> @@ -67,7 +66,7 @@ <a-select :disabled="disableSubmit" placeholder="璇烽�夋嫨璁惧绫诲瀷" :triggerChange="true" v-model="model.equipmentType"> - <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> + <a-select-option v-for='item in equipmentTypeList' :key='item.id' :value='item.equipmentTypeName'> {{item.equipmentTypeName}} </a-select-option> </a-select> @@ -121,8 +120,8 @@ </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="璁惧绾у埆"> - <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绾у埆" dictCode="device_level" v-model="model.deviceLevel" + <a-form-model-item label="閰嶉�佸皬缁�" prop="teamCode"> + <j-dict-select-tag placeholder="璇烽�夋嫨閰嶉�佸皬缁�" dictCode="mdc_staff_team" v-model="model.teamCode" :disabled="disableSubmit"/> </a-form-model-item> </a-col> @@ -130,8 +129,8 @@ <a-row :gutter="24"> <a-col :span="12"> - <a-form-model-item label="璁惧绉嶇被"> - <j-dict-select-tag placeholder="璇烽�夋嫨璁惧绉嶇被" dictCode="device_category" v-model="model.deviceCategory" + <a-form-model-item label="鍗曞厓"> + <j-dict-select-tag placeholder="璇烽�夋嫨鍗曞厓" dictCode="device_category" v-model="model.deviceCategory" :disabled="disableSubmit"/> </a-form-model-item> </a-col> @@ -144,12 +143,6 @@ </a-row> <a-row :gutter="24"> - <a-col :span='12'> - <a-form-model-item label="閰嶉�佸皬缁�" prop="teamCode"> - <j-dict-select-tag placeholder="璇烽�夋嫨閰嶉�佸皬缁�" dictCode="mdc_staff_team" v-model="model.teamCode" - :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> <a-col :span='12'> <a-form-model-item label="璁惧鍥剧墖"> <j-image-upload v-model="model.equipmentImage" :disabled="disableSubmit"/> @@ -204,15 +197,9 @@ <script> import pick from 'lodash.pick' - import moment from 'moment' - import Vue from 'vue' - import { ACCESS_TOKEN } from '@/store/mutation-types' import { getAction } from '@/api/manage' import { addEquipment, editEquipment } from '@/api/api' - import { disabledAuthFilter } from '@/utils/authFilter' - import { duplicateCheck } from '@/api/api' import JSelectEquipmentProduction from '../../../../../components/jeecgbiz/JSelectEquipmentProduction' - import JSelectProduction from '../../../../../components/jeecgbiz/JSelectProduction' import DeviceListModel from './DeviceListModal' import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' import { mapActions } from 'vuex' @@ -220,7 +207,6 @@ export default { name: 'UserModal', components: { - JSelectProduction, JSelectEquipmentDepart, JSelectEquipmentProduction, DeviceListModel @@ -231,13 +217,11 @@ productionDisabled: false, //鏄惁鏄垜鐨勮溅闂磋皟鐢ㄨ椤甸潰 roleDisabled: false, //鏄惁鏄鑹茬淮鎶よ皟鐢ㄨ椤甸潰 modalWidth: 900, - confirmDirty: false, userId: '', //淇濆瓨鐢ㄦ埛id disableSubmit: true, - dateFormat: 'YYYY-MM-DD', form: this.$form.createForm(this), validatorRules: { - equipmentId: [{ required: true, message: '璇烽�夋嫨璁惧缂栧彿!' }], + equipmentId: [{ required: true, message: '璇烽�夋嫨璁惧缂栧彿!', trigger: 'change' }], selectedProduction: [{ required: true, message: '璇烽�夋嫨杞﹂棿' }], teamCode: [{ required: true, message: '璇烽�夋嫨閰嶉�佸皬缁�' }] }, @@ -273,41 +257,27 @@ xs: { span: 24 }, sm: { span: 19 } }, - uploadLoading: false, confirmLoading: false, - headers: {}, systemType: false, systemValue: '3', url: { - fileUpload: window._CONFIG['domianURL'] + '/sys/common/upload', userWithDepart: '/mdc/mdcEquipment/equipmentDepartList', // 寮曞叆涓烘寚瀹氱敤鎴锋煡鐪嬮儴闂ㄤ俊鎭渶瑕佺殑url //寮曞叆涓烘寚瀹氱敤鎴锋煡鐪嬭溅闂翠俊鎭渶瑕佺殑url userProductionList: '/mdc/mdcEquipment/equipmentProductionList', - userId: '/sys/user/generateUserId', // 寮曞叆鐢熸垚娣诲姞鐢ㄦ埛鎯呭喌涓嬬殑url syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//鍚屾鐢ㄦ埛鍒板伐浣滄祦 - queryTenantList: '/sys/tenant/queryList', check: '/sys/duplicate/check', queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType' }, - tenantsOptions: [], - rolesOptions: [], nextDepartOptions: [], nextProductionOptions: [], - selectList: [], + equipmentTypeList: [], isDepartType: '' } }, created() { - const token = Vue.ls.get(ACCESS_TOKEN) - this.headers = { 'X-Access-Token': token } this.queryGroup() this.queryTreeData() this.getAppPlatformName() - }, - computed: { - uploadAction: function() { - return this.url.fileUpload - } }, methods: { ...mapActions(['QueryDepartTree']), @@ -316,13 +286,11 @@ if (res.success) { this.isDepartType = res.result[0].value } else { - // this.$message.warn(res.message) this.$notification.warning({ message: '娑堟伅', description: res.message }) } - }).finally(() => { }) }, getAppPlatformName() { @@ -335,7 +303,7 @@ queryGroup() { getAction(this.url.queryEquipmentType).then(res => { if (res.success) { - this.selectList = res.result + this.equipmentTypeList = res.result } else { this.$notification.warning({ message: '娑堟伅', @@ -347,7 +315,6 @@ }) }, getDeviceRows(val) { - console.log(val) if (val.equipmentid) { this.model.equipmentId = val.equipmentid this.model.equipmentName = val.equipmentname @@ -400,9 +367,6 @@ if (record.hasOwnProperty('id')) { that.getUserDeparts(record.id) } - }, - isDisabledAuth(code) { - return disabledAuthFilter(code) }, // 鏍规嵁灞忓箷鍙樺寲,璁剧疆鎶藉眽灏哄 resetScreenSize() { @@ -486,7 +450,6 @@ this.nextProductionOptions = [] this.departIdShow = false }, - moment, handleSubmit() { const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 @@ -529,18 +492,6 @@ return false } }) - }, - - handleConfirmBlur(e) { - const value = e.target.value - this.confirmDirty = this.confirmDirty || !!value - }, - identityChange(e) { - if (e.target.value === 1) { - this.departIdShow = false - } else { - this.departIdShow = true - } }, /** * 缂栬緫鎴栨煡鐪嬭鎯呮暟鎹椂娓呴櫎鎶藉眽琛ㄥ崟楠岃瘉 -- Gitblit v1.9.3