| | |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">其他检查导入</a-button> |
| | | </a-upload> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | | <a-icon type="delete"/> |
| | | 删除 |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> 批量操作 |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- table区域-begin --> |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" @change="handleTableChange"> |
| | | :scroll="{x:'max-content'}" :pagination="ipagination" :loading="loading" @change="handleTableChange"> |
| | | |
| | | <!--是否有安全装置检查--> |
| | | <template slot="hasSafetyEquipmentCheck" slot-scope="text"> |
| | |
| | | <a-popconfirm title="确定提交吗?" @confirm="handleSubmit(record)"> |
| | | <a @click.stop="event=>event.stopPropagation()">提交</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical"/> |
| | | </template> |
| | | <a @click="handleUpgrade(record)" v-if="record.standardStatus=='ENABLE'">升版</a> |
| | | </span> |
| | | |
| | | <template v-if="record.standardStatus=='ENABLE'"> |
| | | <a @click="handleUpgrade(record)">升版</a> |
| | | <a-divider type="vertical"/> |
| | | </template> |
| | | |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </span> |
| | | </a-table> |
| | | |
| | | <!-- table区域-end --> |
| | |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title: '规范状态', |
| | | align: 'center', |
| | | dataIndex: 'standardStatus_dictText', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '规范编码', |
| | | align: 'center', |
| | | dataIndex: 'standardCode' |
| | |
| | | align: 'center', |
| | | dataIndex: 'standardName' |
| | | }, |
| | | // { |
| | | // title: '鉴定周期(年)', |
| | | // align: 'center', |
| | | // dataIndex: 'evaluationPeriod', |
| | | // width: 150 |
| | | // }, |
| | | { |
| | | title: '规范状态', |
| | | align: 'center', |
| | | dataIndex: 'standardStatus_dictText', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '版本', |
| | | align: 'center', |
| | | dataIndex: 'standardVersion', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: '是否有安全装置检查', |
| | | align: 'center', |
| | | dataIndex: 'hasSafetyEquipmentCheck', |
| | | scopedSlots: { customRender: 'hasSafetyEquipmentCheck' }, |
| | | width: 150 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '是否有设备精度检查', |
| | | align: 'center', |
| | | dataIndex: 'hasPrecisionCheck', |
| | | scopedSlots: { customRender: 'hasPrecisionCheck' }, |
| | | width: 150 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '是否有其他检查', |
| | | align: 'center', |
| | | dataIndex: 'hasOtherCheck', |
| | | scopedSlots: { customRender: 'hasOtherCheck' }, |
| | | width: 150 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | |
| | | submit: '/eam/eamTechnicalStatusEvaluationStandard/submit', |
| | | importSafetyEquipmentCheck: 'eam/eamTechnicalStatusEvaluationStandard/importSafetyEquipmentCheck', |
| | | importPrecisionCheck: 'eam/eamTechnicalStatusEvaluationStandard/importPrecisionCheck', |
| | | importOtherCheck: 'eam/eamTechnicalStatusEvaluationStandard/importOtherCheck', |
| | | importOtherCheck: 'eam/eamTechnicalStatusEvaluationStandard/importOtherCheck' |
| | | |
| | | } |
| | | } |
| | |
| | | handleUpgrade(record) { |
| | | this.$refs.modalForm.edit(record, true) |
| | | this.$refs.modalForm.title = '升版' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen centered |
| | | @ok="handleOk" @cancel="handleCancel" cancelText="关闭"> |
| | | @ok="handleOk" @cancel="handleCancel" cancelText="关闭" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"> |
| | | <a-spin :spinning="spinning"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-form-container :disabled="disableSubmit"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | slot="detail"> |
| | | <a-row> |
| | | <a-col :span="8"> |
| | | <a-form-model-item label="规范编码"> |
| | |
| | | |
| | | <a-col :span="8"> |
| | | <a-form-model-item prop="equipmentId" label="统一编码"> |
| | | <lx-search-equipment-select placeholder="请输入统一编码或名称搜索" v-model="model.equipmentId" :disabled="!editable"/> |
| | | <lx-search-equipment-select placeholder="请输入统一编码或名称搜索" v-model="model.equipmentId" |
| | | :disabled="!editable"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-col :span="8" v-for="item in checkList" :key="item.key"> |
| | | <a-form-model-item :label="item.label"> |
| | | <j-dict-select-tag @change="handleCheckListChange($event,item.key)" dict-code="yn" type="radio" |
| | | :disabled="checkList.filter(i=>i.key!=item.key).every(i=>i.value=='0')" |
| | | v-model="model[item.key]"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | |
| | | <a-tabs :activeKey="activeTabKey" @change="handleTabChange"> |
| | | <a-tab-pane tab="安全装置检查" :key="1" v-if="+model.hasSafetyEquipmentCheck"> |
| | | <j-vxe-table ref="editableDetailTable1" rowNumber rowSelection bordered alwaysEdit toolbar |
| | | :toolbarConfig="detail.toolbarConfig" keep-source |
| | | :toolbarConfig="detail.toolbarConfig" keep-source :disabled="disableSubmit" |
| | | :height="300" :dataSource="detail.safetyEquipmentCheckList" :columns="detail.columns"> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane tab="设备精度检查" :key="2" v-if="+model.hasPrecisionCheck" forceRender> |
| | | <j-vxe-table ref="editableDetailTable2" rowNumber rowSelection bordered alwaysEdit toolbar |
| | | :toolbarConfig="detail.toolbarConfig" keep-source |
| | | :height="300" :dataSource="detail.precisionCheckList" :columns="detail.precisionCheckColumns"> |
| | | :toolbarConfig="detail.toolbarConfig" keep-source :disabled="disableSubmit" |
| | | :height="300" :dataSource="detail.precisionCheckList" |
| | | :columns="detail.precisionCheckColumns"> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane tab="其他检查" :key="3" v-if="+model.hasOtherCheck" forceRender> |
| | | <j-vxe-table ref="editableDetailTable3" rowNumber rowSelection bordered alwaysEdit toolbar |
| | | :toolbarConfig="detail.toolbarConfig" keep-source |
| | | :toolbarConfig="detail.toolbarConfig" keep-source :disabled="disableSubmit" |
| | | :height="300" :dataSource="detail.otherCheckList" :columns="detail.columns"> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | |
| | | }, |
| | | spinning: false, |
| | | confirmLoading: false, |
| | | disableSubmit: false, |
| | | editable: true, |
| | | validatorRules: { |
| | | standardName: [{ required: true, message: '请输入规范名称', trigger: 'change' }], |
| | |
| | | order: 3 |
| | | } |
| | | ], |
| | | hasCheckedCheckList: [], |
| | | activeTabKey: 1, |
| | | upgradeFlag: false, |
| | | detail: { |
| | |
| | | */ |
| | | edit(record, upgradeFlag = false) { |
| | | this.upgradeFlag = upgradeFlag |
| | | console.log('upgradeFlag', this.upgradeFlag) |
| | | this.detail.safetyEquipmentCheckList = this.detail.precisionCheckList = this.detail.otherCheckList = [] |
| | | this.model = Object.assign({}, record) |
| | | this.hasCheckedCheckList = [] |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 获取检查明细 |
| | | * @param standardId 规范编号 |
| | | */ |
| | | loadDetail(standardId) { |
| | | this.spinning = true |
| | | getAction(this.url.detail, { standardId }) |
| | |
| | | }, |
| | | |
| | | async handleOk() { |
| | | console.log('tis', this.hasCheckedCheckList) |
| | | if (this.hasCheckedCheckList.findIndex(item => item.value === '1') < 0) { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: '至少选择一项检查' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | // 先校验当前tab下的表格 |
| | | let errMap = await this.$refs['editableDetailTable' + this.activeTabKey].validateTable() |
| | | if (errMap) return false |