| | |
| | | <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 |
| | |
| | | :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>--> |
| | |
| | | <!--<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> |
| | |
| | | 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' |
| | | }, |
| | |
| | | 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 |
| | | }, |
| | | |
| | | /** |
| | |
| | | */ |
| | | 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 |
| | | } |
| | | } |