<template>
|
<a-card :bordered="false">
|
|
<!-- 查询区域 -->
|
<div class="table-page-search-wrapper">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-row :gutter="24">
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="设备编号">
|
<j-input placeholder="请输入设备编号" v-model="queryParam.equipmentId"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="安灯类型">
|
<j-dict-select-tag placeholder="请选择安灯类型" dictCode="andon_type" v-model="queryParam.andonType"
|
allow-clear />
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="安灯状态">
|
<j-dict-select-tag placeholder="请选择安灯状态" dictCode="order_status" v-model="queryParam.orderStatus"
|
allow-clear />
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :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="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
</span>
|
</a-col>
|
|
</a-row>
|
</a-form>
|
</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"
|
class="j-table-force-nowrap"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
@change="handleTableChange">
|
|
<template slot='imageFiles' slot-scope='text, record, index'>
|
<span v-if="!text" style="font-size: 12px;font-style: italic;"> </span>
|
<img v-else :src="getImgView(text)" :preview="record.imageFiles" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
</template>
|
<span slot="action" slot-scope="text, record">
|
<a-popconfirm title="确定响应吗?" @confirm="() =>responseData(record.id)">
|
<a v-if="record.orderStatus === '1'" >响应</a>
|
</a-popconfirm>
|
<a v-if="record.orderStatus === '2'" @click.stop="handleSolve(record)">处理</a>
|
</span>
|
</a-table>
|
</div>
|
<!-- table区域-end -->
|
|
<!-- 表单区域 -->
|
<andonOrder-modal ref="modalForm" @ok="modalFormOk"></andonOrder-modal>
|
</a-card>
|
</template>
|
|
<script>
|
import '@assets/less/TableExpand.less'
|
import AndonOrderModal from './modules/AndonOrderModal.vue'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { deleteAction, getAction, postAction } from '@api/manage'
|
|
export default {
|
name: 'AndonOrderList',
|
mixins: [JeecgListMixin],
|
components: {
|
AndonOrderModal
|
},
|
data() {
|
return {
|
description: '安灯管理页面',
|
// 表头
|
columns: [
|
{
|
title: '#',
|
dataIndex: '',
|
key: 'rowIndex',
|
width: 60,
|
align: 'center',
|
customRender: function(t, r, index) {
|
return parseInt(index) + 1
|
}
|
},
|
{
|
title: '设备编号',
|
align: 'center',
|
dataIndex: 'equipmentId'
|
},
|
{
|
title: '安灯类型',
|
align: 'center',
|
dataIndex: 'andonType_dictText'
|
},
|
{
|
title: '安灯人',
|
align: 'center',
|
dataIndex: 'operator_dictText'
|
},
|
{
|
title: '安灯时间',
|
align: 'center',
|
dataIndex: 'operateTime'
|
},
|
{
|
title: '问题描述',
|
align: 'center',
|
dataIndex: 'callReason'
|
},
|
{
|
title: '安灯状态',
|
align: 'center',
|
dataIndex: 'orderStatus_dictText'
|
},
|
{
|
title: '响应人',
|
align: 'center',
|
dataIndex: 'responder_dictText'
|
},
|
{
|
title: '响应时间',
|
align: 'center',
|
dataIndex: 'responseTime'
|
},
|
{
|
title: '处理人',
|
align: 'center',
|
dataIndex: 'processor_dictText'
|
},
|
{
|
title: '处理完成时间',
|
align: 'center',
|
dataIndex: 'processTime'
|
},
|
{
|
title: '处理结果描述',
|
align: 'center',
|
dataIndex: 'resolutionDescreption'
|
},
|
{
|
title: '处理结果图片',
|
align: 'center',
|
dataIndex: 'imageFiles',
|
scopedSlots: { customRender: 'imageFiles' }
|
},
|
// {
|
// title: '所属厂房',
|
// align:"center",
|
// dataIndex: 'plantName'
|
// },
|
{
|
title: '操作',
|
dataIndex: 'action',
|
align: 'center',
|
width: 150,
|
scopedSlots: { customRender: 'action' }
|
}
|
],
|
url: {
|
list: '/mdc/andonOrder/list',
|
responseData: '/mdc/andonOrder/responseData',
|
delete: '/mdc/andonOrder/delete',
|
deleteBatch: '/mdc/andonOrder/deleteBatch',
|
exportXlsUrl: 'mdc/andonOrder/exportXls',
|
importExcelUrl: 'mdc/andonOrder/importExcel'
|
}
|
}
|
},
|
computed: {
|
importExcelUrl: function() {
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
}
|
},
|
methods: {
|
responseData(id){
|
if(!this.url.responseData){
|
this.$message.error("请设置url.responseData属性!")
|
return
|
}
|
var that = this;
|
getAction(that.url.responseData, {id: id}).then((res) => {
|
if (res.success) {
|
that.$notification.success({
|
message:'消息',
|
description:res.message
|
});
|
that.loadData();
|
} else {
|
that.$notification.warning({
|
message:'消息',
|
description:res.message
|
});
|
}
|
});
|
},
|
handleSolve(record) {
|
this.$refs.modalForm.dealWith(record);
|
this.$refs.modalForm.title = '处理'
|
this.$refs.modalForm.disabledEdit = true
|
}
|
}
|
}
|
</script>
|
<style scoped>
|
@import '~@assets/less/common.less';
|
</style>
|