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/equipmentUnseal/EquipmentUnsealForm.vue | 318 +++++++++++++++++++++++++++++++--------------------- 1 files changed, 189 insertions(+), 129 deletions(-) diff --git a/src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue b/src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue index fc83ac7..f8631a9 100644 --- a/src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue +++ b/src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue @@ -2,29 +2,70 @@ <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="unseal"></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="unseal" + ></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"> + <a-tabs + v-model="activeKey" + @change="handleChangeTabs" + > + <a-tab-pane + tab="璁惧鍚皝鏄庣粏" + :key="refKeys[0]" + :forceRender="true" + > <j-vxe-table keep-source :ref="refKeys[0]" @@ -37,25 +78,43 @@ :rowSelection="true" :toolbar="true" :toolbarConfig="toolbarConfig" + :alwaysEdit='true' + :bordered='true' > - <template slot="toolbarPrefix"> - <a-button type="primary" @click="selectEquipmentList" :disabled="formDisabled">閫夋嫨璁惧 + <a-button + type="primary" + @click="selectEquipmentList" + :disabled="formDisabled" + >閫夋嫨璁惧 </a-button> </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 + :src="getImgView(text)" + :preview="props.rowId" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> + </Tooltip> + </template> --> <template v-slot:action="props"> - <a-popconfirm title="纭畾鍒犻櫎鍚楋紵" @confirm="handleDL(props)"> + <a-popconfirm + title="纭畾鍒犻櫎鍚楋紵" + @confirm="handleDL(props)" + > <a>鍒犻櫎</a> </a-popconfirm> </template> @@ -145,103 +204,33 @@ title: '璁惧ID', key: 'equipmentId', type: JVXETypes.hidden, - defaultValue: '' }, { title: '璁惧缂栫爜', key: 'equipmentNum', type: JVXETypes.normal, - - width: '120px', - // placeholder: '璇疯緭鍏�${title}', - - fixed: 'left' + width: '150px', + align: "center", }, - { - title: '璧勪骇缂栫爜', - key: 'assetNumber', - type: JVXETypes.normal, - - width: '120px', - fixed: 'left', - - defaultValue: '' - }, - { - title: '灏佸瓨鍘熷洜', - key: 'sealReason', - type: JVXETypes.normal, - disabled: true, - width: '200px' - - }, - { - title: '灏佸瓨鏃ユ湡', - key: 'sealDate', - type: JVXETypes.normal, - disabled: true, - width: '120px' - - }, - { - title: '鍚皝鏃ユ湡', - key: 'unsealDate', - type: JVXETypes.datetime, - width: '200px', - placeholder: '璇疯緭鍏�${title}', - defaultValue: '', - validateRules: [ - { - required: true, // 蹇呭~ - message: '${title}涓嶈兘涓虹┖' // 鎻愮ず鐨勬枃鏈� - }] - }, - { - title: '鍚皝鍘熷洜', - key: 'unsealReason', - type: JVXETypes.textarea, - width: '200px', - placeholder: '璇疯緭鍏�${title}', - defaultValue: '', - validateRules: [ - { - required: true, // 蹇呭~ - message: '${title}涓嶈兘涓虹┖' // 鎻愮ず鐨勬枃鏈� - }] - }, - - { - title: '鐗圭璁惧', - key: 'specificEquipment', - type: JVXETypes.hidden, - disabled: true, - - 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: '' }, + // fixed: 'left', { title: '璁惧鍨嬪彿', key: 'model', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '150px', + align: "center", defaultValue: '' }, { @@ -249,17 +238,87 @@ 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.normal, + disabled: true, + width: '200px', + align: "center", + }, + { + title: '灏佸瓨鏃ユ湡', + key: 'sealDate', + type: JVXETypes.normal, + disabled: true, + width: '150px', + align: "center", + }, + { + title: '鍚皝鏃ユ湡', + key: 'unsealDate', + type: JVXETypes.datetime, + width: '150px', + align: "center", + placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + validateRules: [{ + required: true, // 蹇呭~ + message: '${title}涓嶈兘涓虹┖' // 鎻愮ず鐨勬枃鏈� + }] + }, + { + title: '鍚皝鍘熷洜', + key: 'unsealReason', + type: JVXETypes.textarea, + width: '200px', + align: "center", + placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + validateRules: [{ + required: true, // 蹇呭~ + message: '${title}涓嶈兘涓虹┖' // 鎻愮ず鐨勬枃鏈� + }] + }, + { + title: '鐗圭璁惧', + key: 'specificEquipment', + type: JVXETypes.hidden, + disabled: true, + width: '150px', + align: "center", + defaultValue: '' + }, + { + 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: '' }, // { @@ -278,7 +337,8 @@ key: 'technologyStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', + width: '150px', + align: "center", defaultValue: '' }, { @@ -286,15 +346,16 @@ key: 'location', type: JVXETypes.normal, disabled: true, - width: '120px' - + width: '150px', + align: "center", }, { title: '閲嶈搴�', key: 'equipmentImportanceId_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', + width: '150px', + align: "center", // placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -303,23 +364,22 @@ 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: '120px', + // slotName: 'equipmentPhoto' + // }, + // { + // title: '鎿嶄綔', + // key: 'action', + // type: JVXETypes.slot, + // disabled: true, + // width: '100px', + // slotName: 'action', + // }, ] }, url: { @@ -391,8 +451,8 @@ location: data[i].location, equipmentImportanceId_dictText: data[i].equipmentImportanceId_dictText, equipmentImportanceId: data[i].equipmentImportanceId, - sealReason:data[i].sealReason, - sealDate:data[i].sealDate + sealReason: data[i].sealReason, + sealDate: data[i].sealDate } } addRows.push(sealDetail) @@ -400,9 +460,9 @@ this.$refs.equipmentUnsealDetail.pushRows(addRows) }, handleDL(props) { - // 璋冪敤鍒犻櫎鏂规硶 - props.target.removeRows(props.row) - }, + // 璋冪敤鍒犻櫎鏂规硶 + props.target.removeRows(props.row) + }, addBefore() { this.equipmentUnsealDetailTable.dataSource = [] }, @@ -416,7 +476,7 @@ }) // 鍔犺浇瀛愯〃鏁版嵁 if (this.model.id) { - let params = { equipmentChangeId: this.model.id} + let params = { equipmentChangeId: this.model.id } this.requestSubTableData(this.url.equipmentUnsealDetail.list, params, this.equipmentUnsealDetailTable) } }, -- Gitblit v1.9.3