From 90044289b992e5df6506c70b1e9bb299df321869 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期三, 21 五月 2025 16:22:20 +0800 Subject: [PATCH] 1、全局加载名称调整为MDC智慧车间 2、消息确认页面调整设备异常反馈功能 --- src/views/mdc/base/MdcMessageconfirmationList.vue | 141 ++++++++++++++++++++++++++-------------------- 1 files changed, 80 insertions(+), 61 deletions(-) diff --git a/src/views/mdc/base/MdcMessageconfirmationList.vue b/src/views/mdc/base/MdcMessageconfirmationList.vue index f619525..6ccacad 100644 --- a/src/views/mdc/base/MdcMessageconfirmationList.vue +++ b/src/views/mdc/base/MdcMessageconfirmationList.vue @@ -5,30 +5,46 @@ <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col :span="6"> + <a-col :span="4"> <a-form-item label="璁惧缂栧彿"> <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"></a-input> </a-form-item> </a-col> - <a-col :span="6"> + <a-col :span="4"> <a-form-item label="娑堟伅鐘舵��"> - <a-select v-model='queryParam.msgStatus' placeholder="璇烽�夋嫨娑堟伅鐘舵��"> - <a-select-option v-for="item in msgStatusOptionList" :key="item.value" :value="item.value"> - {{item.title}} - </a-select-option> + <j-dict-select-tag dictCode="mdcMsgStatus" v-model='queryParam.msgStatus' placeholder="璇烽�夋嫨娑堟伅鐘舵��"/> + </a-form-item> + </a-col> + + <a-col :span="4"> + <a-form-item label="寮傚父绫诲瀷"> + <j-dict-select-tag dictCode="mdcMsgType" v-model='queryParam.msgType' placeholder="璇烽�夋嫨寮傚父绫诲瀷"/> + </a-form-item> + </a-col> + + <a-col :span="4"> + <a-form-item label="娑堟伅鏉ユ簮"> + <a-select v-model="queryParam.msgSource" placeholder="璇烽�夋嫨娑堟伅鏉ユ簮"> + <a-select-option key="鎵嬪姩涓婃姤">鎵嬪姩涓婃姤</a-select-option> + <a-select-option key="绯荤粺鐢熸垚">绯荤粺鐢熸垚</a-select-option> </a-select> </a-form-item> </a-col> - <a-col :span="8"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-col :span="6"> + <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> - <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - </span> + <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> + </a-space> </a-col> </a-row> </a-form> + </div> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙路 --> + <div class="table-operator"> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> </div> <a-table @@ -42,11 +58,10 @@ :loading="loading" @change="handleTableChange"> <span slot="action" slot-scope="text, record"> - <a @click="showModal(record,0)">鏌ョ湅</a> + <a @click="showModal(record,1)">鏌ョ湅</a> <a-divider type="vertical" v-if="record.hasProcess||record.hasConfirm"></a-divider> - <a @click="showModal(record,1)" v-if="record.hasProcess">涓婃姤</a> - <a-divider type="vertical" v-if="record.hasConfirm&&record.hasProcess"></a-divider> - <a @click="showModal(record,2)" v-if="record.hasConfirm">纭</a> + <a @click="showModal(record,2)" v-if="record.hasProcess">涓婃姤</a> + <a @click="showModal(record,3)" v-if="record.hasConfirm">纭</a> <!--<a @click="showModal(record,0)">鏌ョ湅</a>--> <!--<a-divider type="vertical"></a-divider>--> <!--<a @click="showModal(record,1)">涓婃姤</a>--> @@ -54,7 +69,8 @@ <!--<a @click="showModal(record,2)">纭</a>--> </span> </a-table> - <mdc-message-approval-modal ref="modalRef" :title="modalTitle" :visible="modalVisible" :buttonId="buttonId" + <mdc-message-approval-modal ref="modalForm" :title="modalTitle" :visible="modalVisible" :buttonId="buttonId" + :disableSubmit="disableSubmit" @closeModal="modalVisible = false" @formHasSubmitted="loadData"/> </a-card> </template> @@ -75,53 +91,63 @@ queryParam: {}, columns: [ { + title: '娑堟伅鏉ユ簮', + align: 'center', + dataIndex: 'msgSource', + width: 150 + }, + { title: '璁惧缂栧彿', align: 'center', - dataIndex: 'equipmentId' + dataIndex: 'equipmentId', + width: 150 + }, + { + title: '寮傚父绫诲瀷', + align: 'center', + dataIndex: 'msgType', + width: 150 }, { title: '鏍囬', align: 'center', dataIndex: 'titile' - }, { + }, + { title: '鍐呭', align: 'center', - dataIndex: 'msgContent', - width: 450 - }, { + dataIndex: 'msgContent' + }, + { title: '鍘熷洜', align: 'center', - dataIndex: 'reportContent', - width: 450 - }, { - title: '澶勭悊浜�', + dataIndex: 'reportContent' + }, + { + title: '鍙嶉浜�', align: 'center', - dataIndex: 'senderNames' - }, { + dataIndex: 'senderNames', + width: 120 + }, + { title: '纭浜�', align: 'center', - dataIndex: 'approverNames' - }, { + dataIndex: 'approverNames', + width: 120 + }, + { title: '鐘舵��', align: 'center', - dataIndex: 'msgStatus', - customRender: function(text) { - if (text == '0') { - return '寰呭鐞�' - } else if (text == '1') { - return '寰呯‘璁�' - } else if (text == '2') { - return '宸茬‘璁�' - } else { - return '宸叉嫆缁�' - } - } - }, { + dataIndex: 'msgStatus_dictText', + width: 120, + }, + { title: '鎿嶄綔', dataIndex: 'action', align: 'center', scopedSlots: { customRender: 'action' } - }], + } + ], url: { list: '/mdc/mdcMessageApproval/list' }, @@ -129,25 +155,17 @@ msgStatusOptionList: [], modalTitle: '', modalVisible: false, + disableSubmit: false, buttonId: null } }, - created() { - this.initDictData('mdcMsgStatus') - }, methods: { - /** - * 璋冪敤鎺ュ彛鑾峰彇鏁版嵁瀛楀吀閰嶇疆msgStatus - * @param dictCode 鏁版嵁瀛楀吀缂栧彿 - */ - initDictData(dictCode) { - //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁� - ajaxGetDictItems(dictCode, null).then((res) => { - if (res.success) { - console.log('res================', res) - this.msgStatusOptionList = res.result - } - }) + handleAdd() { + this.modalTitle = '鏂板' + this.buttonId = null + this.disableSubmit = false + this.$refs.modalForm.formParams = {} + this.modalVisible = true }, /** @@ -157,20 +175,21 @@ */ showModal(record, buttonId) { this.buttonId = buttonId + this.disableSubmit = true switch (buttonId) { - case 0: + case 1: this.modalTitle = '娑堟伅鍐呭' break - case 1: + case 2: this.modalTitle = '涓婃姤鍘熷洜' break - case 2: + case 3: this.modalTitle = '纭娑堟伅' break default: this.modalTitle = '娑堟伅鍐呭' } - this.$refs.modalRef.formParams = Object.assign({}, record) + this.$refs.modalForm.formParams = Object.assign({}, record) this.modalVisible = true } } -- Gitblit v1.9.3