From 8611a1ba1696e76cced04ff5d658ba138a05dafd Mon Sep 17 00:00:00 2001 From: zenglf <18502938215@163.com> Date: 星期六, 19 八月 2023 14:37:32 +0800 Subject: [PATCH] 设备管理前端代码提交 截止 20230819 13:55 分 --- src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue | 390 ++++++++++++++++++++++++++++--------------------------- 1 files changed, 201 insertions(+), 189 deletions(-) diff --git a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue index 385819d..8fc53a6 100644 --- a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue +++ b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue @@ -2,66 +2,121 @@ <a-spin :spinning="confirmLoading"> <j-form-container :disabled="formDisabled"> <!-- 涓昏〃鍗曞尯鍩� --> - <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-form-model + ref="form" + :model="model" + :rules="validatorRules" + slot="detail" + > <a-row> <a-col :span="24"> - <a-form-model-item label="鍗曟嵁鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> - <a-input v-model="model.num" placeholder="璇疯緭鍏ュ崟鎹彿"></a-input> + <a-form-model-item + label="鍗曟嵁鍙�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="num" + > + <a-input + v-model="model.num" + placeholder="璇疯緭鍏ュ崟鎹彿" + ></a-input> </a-form-model-item> </a-col> - <a-col :span="12" :hidden=true> - <a-form-model-item label="鍙樺姩鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="changeMethod"> - <a-input v-model="model.changeMethod" placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�" defaultValue="seal"></a-input> + <a-col + :span="12" + :hidden=true + > + <a-form-model-item + label="鍙樺姩鏂瑰紡" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="changeMethod" + > + <a-input + v-model="model.changeMethod" + placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�" + defaultValue="seal" + ></a-input> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> - <a-textarea v-model="model.remark" rows="4" placeholder="璇疯緭鍏ュ娉�" /> + <a-form-model-item + label="澶囨敞" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="remark" + > + <a-textarea + v-model="model.remark" + rows="4" + placeholder="璇疯緭鍏ュ娉�" + /> </a-form-model-item> </a-col> </a-row> </a-form-model> </j-form-container> <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs v-model="activeKey" @change="handleChangeTabs"> - <a-tab-pane tab="璁惧灏佸瓨鏄庣粏" :key="refKeys[0]" :forceRender="true"> - <j-vxe-table keep-source :ref="refKeys[0]" :loading="equipmentSealDetailTable.loading" - :columns="equipmentSealDetailTable.columns" :dataSource="equipmentSealDetailTable.dataSource" :maxHeight="300" - :disabled="formDisabled" :rowNumber="true" :rowSelection="true" :toolbar="true" :toolbarConfig="toolbarConfig" - :linkage-config="linkageConfig"> + <a-tabs + v-model="activeKey" + @change="handleChangeTabs" + > + <a-tab-pane + tab="璁惧灏佸瓨鏄庣粏" + :key="refKeys[0]" + :forceRender="true" + > + <j-vxe-table + keep-source + :ref="refKeys[0]" + :loading="equipmentSealDetailTable.loading" + :columns="equipmentSealDetailTable.columns" + :dataSource="equipmentSealDetailTable.dataSource" + :maxHeight="300" + :disabled="formDisabled" + :alwaysEdit='true' + :bordered='true' + :rowNumber="true" + :rowSelection="true" + :toolbar="true" + :toolbarConfig="toolbarConfig" + :linkage-config="linkageConfig" + > <template slot="toolbarPrefix"> - <a-button type="primary" @click="selectEquipmentList" :disabled="formDisabled">閫夋嫨璁惧 + <a-button + type="primary" + @click="selectEquipmentList" + :disabled="formDisabled" + >閫夋嫨璁惧 </a-button> </template> - <!-- state.address.regionName --> - <template v-slot:maintenanceStandardId="props"> - <a-form-model ref="form" :model="props.row"> - <a-form-model-item style="margin-bottom: 0;" v-if="props.row.maintenanceAfterUnseal == 'Y'" label="" - :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceStandardId" - :rules="[{ required: true, message: '蹇呭~椤�',trigger: 'change' }]"> - <a-select v-model="props.row.maintenanceStandardId" @change="(e) => handleChange(e, props.row)" - :options="manageList" /> - </a-form-model-item> - <a-form-model-item style="margin-bottom: 0;" v-else label="" :labelCol="labelCol" :wrapperCol="wrapperCol" - prop="maintenanceStandardId"> - <a-select v-model="props.row.maintenanceStandardId" :options="manageList" - @change="(e) => handleChange(e, props.row.maintenanceAfterUnseal)" /> - </a-form-model-item> - </a-form-model> - </template> <!-- 璁惧鍥剧墖鎻掓Ы --> - <template v-slot:equipmentPhoto='props'> + <!-- <template v-slot:equipmentPhoto='props'> <Tooltip - placement="top" - title="棰勮鍥剧墖" - > - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="props.rowId" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> - </Tooltip> - </template> + placement="top" + title="棰勮鍥剧墖" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犲浘鐗�</span> + <img + v-else + :preview="props.equipmentId" + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> + </Tooltip> + </template> --> + <!-- :preview="props.rowId"equipmentId --> <template v-slot:action="props"> - <a-popconfirm title="纭畾鍒犻櫎鍚楋紵" @confirm="handleDL(props)"> + <a-popconfirm + title="纭畾鍒犻櫎鍚楋紵" + @confirm="handleDL(props)" + > <a>鍒犻櫎</a> </a-popconfirm> </template> @@ -79,17 +134,14 @@ import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin' import { randomUUID, randomNumber } from '@/utils/util' - import { validateDuplicateValue } from '@/utils/util' import pick from 'lodash.pick' import { getAction, postAction, requestPut } from '@api/manage' // import EquipmentSelection from '@/components/tools/EquipmentSelection.vue' import EquipmentSelectModal from './EquipmentSelectModal.vue' - import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' import { JVXETypes } from '@comp/jeecg/JVxeTable' import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' - import JFormContainer from '@/components/jeecg/JFormContainer' export default { @@ -116,11 +168,11 @@ xs: { span: 24 }, sm: { span: 16 } }, - manageList: [ - { label: '绌�', value: '' }, - { label: '淇濆吇鏍囧噯涓�', value: '1001' }, - { label: '淇濆吇鏍囧噯浜�', value: '1002' } - ], + // manageList: [ + // { label: '绌�', value: '' }, + // { label: '淇濆吇鏍囧噯涓�', value: '1001' }, + // { label: '淇濆吇鏍囧噯浜�', value: '1002' } + // ], // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁 addDefaultRowNum: 0, model: {}, @@ -156,13 +208,12 @@ key: 'id', type: JVXETypes.hidden, width: '100px', - fixed: 'left' }, + // fixed: 'left' { title: '璁惧鍙樺姩鍗昳d', key: 'equipmentChangeId', type: JVXETypes.hidden, - placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -176,112 +227,18 @@ title: '璁惧缂栫爜', key: 'equipmentNum', type: JVXETypes.normal, - width: '120px', + width: '150px', + align: "center", // placeholder: '璇疯緭鍏�${title}', - fixed: 'left' }, - { - title: '璁惧璧勪骇缂栫爜', - key: 'assetNumber', - type: JVXETypes.normal, - width: '120px', - fixed: 'left', - defaultValue: '' - }, - { - title: '灏佸瓨鍘熷洜', - key: 'sealReason', - type: JVXETypes.input, - width: '200px', - placeholder: '璇疯緭鍏�${title}', - defaultValue: '', - validateRules: [ - { - required: true, // 蹇呭~ - message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� - }] - }, - { - title: '灏佸瓨鏃ユ湡', - key: 'sealDate', - type: JVXETypes.datetime, - width: '100px', - placeholder: '璇烽�夋嫨${title}', - defaultValue: '', - validateRules: [ - { - required: true, // 蹇呭~ - message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� - }] - - }, - { - title: '棰勮鍚皝鏃ユ湡', - key: 'planUnsealDate', - type: JVXETypes.date, - width: '120px', - placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - // { - // title: '寮哄埗鍚皝', - // key: 'isForceUnseal', - // type: JVXETypes.checkbox, - // customValue: ['Y', 'N'], - // width: '120px', - // placeholder: '璇疯緭鍏�${title}', - // defaultValue: '' - // }, - // { - // title: '寮哄埗鍚皝鏃ユ湡', - // key: 'forceUnsealDate', - // type: JVXETypes.date, - // width: '120px', - // placeholder: '璇疯緭鍏�${title}', - // defaultValue: '' - // }, - // { - // title: '寮哄埗鍚皝鍚庝繚鍏�', - // key: 'maintenanceAfterUnseal', - // type: JVXETypes.checkbox, - // customValue: ['Y', 'N'], - // width: '150px', - // placeholder: '璇疯緭鍏�${title}', - // defaultValue: 'N', - - // }, - // { - // title: '淇濆吇鏍囧噯', - // key: 'maintenanceStandardId', - // type: JVXETypes.slot, - // width: '260px', - // slotName: 'maintenanceStandardId' - // }, - - { - title: '鐗圭璁惧', - key: 'specificEquipment', - type: JVXETypes.hidden, - disabled: true, - - placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - { - title: '鐗圭璁惧', - key: 'specificEquipment_dictText', - type: JVXETypes.normal, - disabled: true, - width: '100px', - defaultValue: '' - }, + // fixed: 'left' { title: '璁惧鍚嶇О', key: 'equipmentName', type: JVXETypes.normal, disabled: true, - width: '200px', - + width: '150px', + align: "center", defaultValue: '' }, { @@ -289,7 +246,8 @@ key: 'model', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '150px', + align: "center", defaultValue: '' }, { @@ -297,36 +255,90 @@ key: 'specification', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '150px', + align: "center", placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, + { + title: '璁惧璧勪骇缂栫爜', + key: 'assetNumber', + type: JVXETypes.normal, + width: '150px', + align: "center", + defaultValue: '' + }, + { + title: '灏佸瓨鍘熷洜', + key: 'sealReason', + type: JVXETypes.input, + width: '200px', + align: "center", + placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + validateRules: [{ + required: true, // 蹇呭~ + message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� + }] + }, + { + title: '灏佸瓨鏃ユ湡', + key: 'sealDate', + type: JVXETypes.datetime, + width: '150px', + align: "center", + placeholder: '璇烽�夋嫨${title}', + defaultValue: '', + validateRules: [{ + required: true, // 蹇呭~ + message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� + }] + + }, + { + title: '棰勮鍚皝鏃ユ湡', + key: 'planUnsealDate', + type: JVXETypes.date, + width: '150px', + align: "center", + placeholder: '璇疯緭鍏�${title}', + defaultValue: '' + }, + { + title: '鐗圭璁惧', + key: 'specificEquipment', + type: JVXETypes.hidden, + disabled: true, + placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + width: '150px', + }, + { + title: '鐗圭璁惧', + key: 'specificEquipment_dictText', + type: JVXETypes.normal, + disabled: true, + width: '150px', + align: "center", + defaultValue: '' + }, + { title: '璁惧鐘舵��', key: 'equipmentStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', - // placeholder: '璇疯緭鍏�${title}', + width: '150px', + align: "center", defaultValue: '' }, - // { - // title: '璁惧鐘舵��', - // key: 'equipmentStatus', - // type: JVXETypes.select, - // options: [], - // dictCode: 'equipment_status', - // disabled: true, - // width: '200px', - // // placeholder: '璇疯緭鍏�${title}', - // defaultValue: '' - // }, { title: '鎶�鏈姸鎬�', key: 'technologyStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', + width: '150px', + align: "center", defaultValue: '' }, { @@ -334,16 +346,16 @@ key: 'location', type: JVXETypes.normal, disabled: true, - width: '120px' - + width: '200px', + align: "center", }, { title: '閲嶈搴�', key: 'equipmentImportanceId_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', - // placeholder: '璇疯緭鍏�${title}', + width: '150px', + align: "center", defaultValue: '' }, { @@ -351,23 +363,23 @@ key: 'equipmentImportanceId', type: JVXETypes.hidden }, - { - title: '璁惧鍥剧墖', - key: 'equipmentPhoto', - type: JVXETypes.slot, - disabled: true, - width: '120px', - slotName:'equipmentPhoto' - - }, - { - title: '鎿嶄綔', - key: 'action', - type: JVXETypes.slot, - disabled: true, - width: '100px', - slotName: 'action', - }, + // { + // title: '璁惧鍥剧墖', + // key: 'equipmentPhoto', + // type: JVXETypes.slot, + // disabled: true, + // width: '150px', + // slotName: 'equipmentPhoto' + // }, + // { + // title: '鎿嶄綔', + // key: 'action', + // type: JVXETypes.slot, + // disabled: true, + // width: '150px', + // align: "center", + // slotName: 'action', + // }, ] }, @@ -419,9 +431,9 @@ this.addSelectedEquipments(data) }, handleDL(props) { - // 璋冪敤鍒犻櫎鏂规硶 - props.target.removeRows(props.row) - }, + // 璋冪敤鍒犻櫎鏂规硶 + props.target.removeRows(props.row) + }, //閫夋嫨璁惧 selectEquipmentList() { -- Gitblit v1.9.3