From ab7007a57d36f2a9cb2f419195e5728349c73497 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期二, 08 七月 2025 17:39:51 +0800 Subject: [PATCH] 技术鉴定规范页面功能开发 --- src/views/eam/base/EamTechnicalStatusEvaluationStandardList.vue | 304 ++++++++++++++++++++++++++----------------------- 1 files changed, 161 insertions(+), 143 deletions(-) diff --git a/src/views/eam/base/EamTechnicalStatusEvaluationStandardList.vue b/src/views/eam/base/EamTechnicalStatusEvaluationStandardList.vue index 01114ca..e10a508 100644 --- a/src/views/eam/base/EamTechnicalStatusEvaluationStandardList.vue +++ b/src/views/eam/base/EamTechnicalStatusEvaluationStandardList.vue @@ -5,45 +5,37 @@ <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> + <a-col :xl="5" :lg="6" :md="8" :sm="24"> + <a-form-item label="缁熶竴缂栫爜"> + <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="queryParam.equipmentId"/> + </a-form-item> + </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鍒犻櫎鏍囪"> - <a-input placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" v-model="queryParam.delFlag"></a-input> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="瑙勮寖鍚嶇О"> - <a-input placeholder="璇疯緭鍏ヨ鑼冨悕绉�" v-model="queryParam.standardName"></a-input> - </a-form-item> - </a-col> - <template v-if="toggleSearchStatus"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="5" :lg="6" :md="8" :sm="24"> <a-form-item label="瑙勮寖缂栫爜"> - <a-input placeholder="璇疯緭鍏ヨ鑼冪紪鐮�" v-model="queryParam.standardCode"></a-input> + <a-input placeholder="璇疯緭鍏ヨ鑼冪紪鐮�" v-model="queryParam.standardCode"/> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="閴村畾鍛ㄦ湡"> - <a-input placeholder="璇疯緭鍏ラ壌瀹氬懆鏈�" v-model="queryParam.evaluationPeriod"></a-input> + + <a-col :xl="5" :lg="6" :md="8" :sm="24"> + <a-form-item label="瑙勮寖鍚嶇О"> + <a-input placeholder="璇疯緭鍏ヨ鑼冨悕绉�" v-model="queryParam.standardName"/> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="璁惧ID"> - <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="queryParam.equipmentId"></a-input> + + <a-col :xl="5" :lg="6" :md="8" :sm="24"> + <a-form-item label="瑙勮寖鐘舵��"> + <j-dict-select-tag dict-code="technical_status_evaluation_standard_status" placeholder="璇烽�夋嫨瑙勮寖鐘舵��" + v-model="queryParam.standardStatus"/> </a-form-item> </a-col> - </template> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + + <a-col :xl="4" :lg="6" :md="8" :sm="24"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - <a @click="handleToggleSearch" style="margin-left: 8px"> - {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> - </a> </span> </a-col> - </a-row> </a-form> </div> @@ -51,75 +43,77 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <a-button type="primary" icon="download" @click="handleExportXls('鎶�鏈姸鎬侀壌瀹氳鑼�')">瀵煎嚭</a-button> - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" + @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-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-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 + <a-icon type="down"/> + </a-button> </a-dropdown> </div> <!-- table鍖哄煙-begin --> - <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� - <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> - </div> + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="ipagination" :loading="loading" @change="handleTableChange"> - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - class="j-table-force-nowrap" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> + <!--鏄惁鏈夊畨鍏ㄨ缃鏌�--> + <template slot="hasSafetyEquipmentCheck" slot-scope="text"> + <a-switch checked-children="鏄�" un-checked-children="鍚�" :checked="Boolean(+text)" disabled/> + </template> - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> + <!--鏄惁鏈夎澶囩簿搴︽鏌�--> + <template slot="hasPrecisionCheck" slot-scope="text"> + <a-switch checked-children="鏄�" un-checked-children="鍚�" :checked="Boolean(+text)" disabled/> + </template> - <a-divider type="vertical" /> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> - <a-menu slot="overlay"> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> + <!--鏄惁鏈夊叾浠栨鏌�--> + <template slot="hasOtherCheck" slot-scope="text"> + <a-switch checked-children="鏄�" un-checked-children="鍚�" :checked="Boolean(+text)" disabled/> + </template> + + + <span slot="action" slot-scope="text, record"> + <template v-if="record.standardStatus=='WAIT_SUBMIT'"> + <a @click="handleEdit(record)">缂栬緫</a> + <a-divider type="vertical"/> + <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="handleSubmit(record)"> + <a @click.stop="event=>event.stopPropagation()">鎻愪氦</a> + </a-popconfirm> + </template> + <a @click="handleUpgrade(record)" v-if="record.standardStatus=='ENABLE'">鍗囩増</a> </span> - </a-table> - </div> + </a-table> + <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> - <eamTechnicalStatusEvaluationStandard-modal ref="modalForm" @ok="modalFormOk"></eamTechnicalStatusEvaluationStandard-modal> + <eamTechnicalStatusEvaluationStandard-modal ref="modalForm" @ok="modalFormOk"/> </a-card> </template> <script> - import '@/assets/less/TableExpand.less' + import { getAction } from '@/api/manage' import EamTechnicalStatusEvaluationStandardModal from './modules/EamTechnicalStatusEvaluationStandardModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' export default { - name: "EamTechnicalStatusEvaluationStandardList", - mixins:[JeecgListMixin], + name: 'EamTechnicalStatusEvaluationStandardList', + mixins: [JeecgListMixin], components: { - EamTechnicalStatusEvaluationStandardModal + EamTechnicalStatusEvaluationStandardModal, + LxSearchEquipmentSelect }, - data () { + data() { return { description: '鎶�鏈姸鎬侀壌瀹氳鑼冪鐞嗛〉闈�', // 琛ㄥご @@ -127,89 +121,113 @@ { title: '#', dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } - }, - { - title: '鍒犻櫎鏍囪', - align:"center", - dataIndex: 'delFlag' - }, - { - title: '瑙勮寖鍚嶇О', - align:"center", - dataIndex: 'standardName' - }, - { + }, + { + title: '缁熶竴缂栫爜', + align: 'center', + dataIndex: 'equipmentCode' + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName' + }, + { + title: '璁惧鍨嬪彿', + align: 'center', + dataIndex: 'equipmentModel' + }, + { title: '瑙勮寖缂栫爜', - align:"center", + align: 'center', dataIndex: 'standardCode' - }, - { - title: '閴村畾鍛ㄦ湡', - align:"center", - dataIndex: 'evaluationPeriod' - }, - { - title: '璁惧ID', - align:"center", - dataIndex: 'equipmentId' - }, - { - title: '瑙勮寖鐘舵��;寰呮彁浜ゃ�佸惎鐢ㄣ�佷綔搴�', - align:"center", - dataIndex: 'standardStatus' - }, - { - title: '鏄惁鏈夊畨鍏ㄨ缃鏌�;鏄惁', - align:"center", - dataIndex: 'hasSafetyEquipmentCheck' - }, - { - title: '鏄惁鏈夎澶囩簿搴︽鏌�;鏄惁', - align:"center", - dataIndex: 'hasPrecisionCheck' - }, - { - title: '鏄惁鏈夊叾浠栨鏌�;鏄惁', - align:"center", - dataIndex: 'hasOtherCheck' - }, - { - title: '澶囨敞', - align:"center", - dataIndex: 'remark' - }, + }, + { + title: '瑙勮寖鍚嶇О', + align: 'center', + dataIndex: 'standardName' + }, + { + title: '閴村畾鍛ㄦ湡锛堝勾锛�', + align: 'center', + dataIndex: 'evaluationPeriod', + width: 150 + }, + { + title: '瑙勮寖鐘舵��', + align: 'center', + dataIndex: 'standardStatus_dictText', + width: 150 + }, + { + title: '鏄惁鏈夊畨鍏ㄨ缃鏌�', + align: 'center', + dataIndex: 'hasSafetyEquipmentCheck', + scopedSlots: { customRender: 'hasSafetyEquipmentCheck' }, + width: 150 + }, + { + title: '鏄惁鏈夎澶囩簿搴︽鏌�', + align: 'center', + dataIndex: 'hasPrecisionCheck', + scopedSlots: { customRender: 'hasPrecisionCheck' }, + width: 150 + }, + { + title: '鏄惁鏈夊叾浠栨鏌�', + align: 'center', + dataIndex: 'hasOtherCheck', + scopedSlots: { customRender: 'hasOtherCheck' }, + width: 150 + }, { title: '鎿嶄綔', dataIndex: 'action', - align:"center", - scopedSlots: { customRender: 'action' }, + align: 'center', + scopedSlots: { customRender: 'action' } } ], - url: { - list: "/eam/eamTechnicalStatusEvaluationStandard/list", - delete: "/eam/eamTechnicalStatusEvaluationStandard/delete", - deleteBatch: "/eam/eamTechnicalStatusEvaluationStandard/deleteBatch", - exportXlsUrl: "eam/eamTechnicalStatusEvaluationStandard/exportXls", - importExcelUrl: "eam/eamTechnicalStatusEvaluationStandard/importExcel", - }, - } - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - } - }, + url: { + list: '/eam/eamTechnicalStatusEvaluationStandard/list', + submit: '/eam/eamTechnicalStatusEvaluationStandard/submit', + importExcelUrl: 'eam/eamTechnicalStatusEvaluationStandard/importExcel' + } + } + }, + computed: { + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } + }, methods: { - + handleSubmit(record) { + getAction(this.url.submit, record) + .then(res => { + if (res.success) { + this.$notification.success({ + message: '娑堟伅', + description: res.message + }) + this.loadData() + } else { + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, + + handleUpgrade(record) { + this.$refs.modalForm.edit(record, true) + this.$refs.modalForm.title = '鍗囩増' + } } } -</script> -<style scoped> - @import '~@assets/less/common.less'; -</style> \ No newline at end of file +</script> \ No newline at end of file -- Gitblit v1.9.3