From 3457909638c660c0cfcb521b6104ab64c679b914 Mon Sep 17 00:00:00 2001 From: zenglf <18502938215@163.com> Date: 星期二, 19 九月 2023 16:23:16 +0800 Subject: [PATCH] 修改页面左右展示比例 --- src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue | 391 ++++++++++++++++++++++++++----------------------------- 1 files changed, 183 insertions(+), 208 deletions(-) diff --git a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue index 385819d..7504805 100644 --- a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue +++ b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue @@ -2,66 +2,101 @@ <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" + :addDefaultRowNum="0" + > <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'> - <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> <template v-slot:action="props"> - <a-popconfirm title="纭畾鍒犻櫎鍚楋紵" @confirm="handleDL(props)"> + <a-popconfirm + title="纭畾鍒犻櫎鍚楋紵" + @confirm="handleDL(props)" + > <a>鍒犻櫎</a> </a-popconfirm> </template> @@ -69,27 +104,18 @@ </a-tab-pane> </a-tabs> <equipment-select-modal ref="EquipmentSelectModal"></equipment-select-modal> - <!-- <equipment-selection @selectionRows="selectionRows" :equipmentStatus="['2', '3']" - ref="EquipmentSelection"></equipment-selection> --> </a-spin> </template> <script> -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,19 +142,15 @@ xs: { span: 24 }, sm: { span: 16 } }, - manageList: [ - { label: '绌�', value: '' }, - { label: '淇濆吇鏍囧噯涓�', value: '1001' }, - { label: '淇濆吇鏍囧噯浜�', value: '1002' } - ], - // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁 addDefaultRowNum: 0, model: {}, validatorRules: { + num: [ { required: true, message: '璇疯緭鍏ュ崟鎹彿!' }, { validator: (rule, value, callback) => validateDuplicateValue('mom_eam_equipment_change', 'num', value, this.model.id, callback) } ], + remark: [ { required: false, message: '璇疯緭鍏ュ娉�!' } ] @@ -155,14 +177,13 @@ title: '璁惧灏佸瓨鏄庣粏id', key: 'id', type: JVXETypes.hidden, - width: '100px', - fixed: 'left' + width: '100px' }, + // fixed: 'left' { title: '璁惧鍙樺姩鍗昳d', key: 'equipmentChangeId', type: JVXETypes.hidden, - placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -176,112 +197,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 +216,8 @@ key: 'model', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '150px', + align: 'center', defaultValue: '' }, { @@ -297,36 +225,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,40 +316,40 @@ 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: '' }, { title: '閲嶈搴�', 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 +401,9 @@ this.addSelectedEquipments(data) }, handleDL(props) { - // 璋冪敤鍒犻櫎鏂规硶 - props.target.removeRows(props.row) - }, + // 璋冪敤鍒犻櫎鏂规硶 + props.target.removeRows(props.row) + }, //閫夋嫨璁惧 selectEquipmentList() { @@ -519,15 +501,8 @@ </script> <style scoped> -/** tab panel 涓湁涓嬫媺妗�/鏃ユ湡 杩欑被甯︿笅鎷夋晥鏋滅殑锛岄渶瑕佸姞姝ゆ牱寮� */ -::v-deep .jeecg-tabs-top { +/deep/ .jeecg-tabs-top { overflow: visible; -} - -::v-deep .ant-form-explain { - position: absolute; - right: -50px; - top: 12px; } </style> \ No newline at end of file -- Gitblit v1.9.3