<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-dict-select-tag dictCode="andon_level" placeholder="请输入安灯等级" v-model="queryParam.andonLevel"></j-dict-select-tag>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="安灯状态">
|
<j-dict-select-tag dictCode="order_status" placeholder="请输入安灯状态" v-model="queryParam.orderStatus"></j-dict-select-tag>
|
</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>
|
<!-- 查询区域-END -->
|
|
<!-- 操作按钮区域 -->
|
<div class="table-operator">
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
</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"
|
:scroll="{x:true}"
|
bordered
|
rowKey="id"
|
:columns="columns"
|
:dataSource="dataSource"
|
:pagination="ipagination"
|
:loading="loading"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
class="j-table-force-nowrap"
|
@change="handleTableChange">
|
|
<template slot="htmlSlot" slot-scope="text">
|
<div v-html="text"></div>
|
</template>
|
<template slot="imgSlot" slot-scope="text,record">
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
</template>
|
<template slot="fileSlot" slot-scope="text">
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
<a-button
|
v-else
|
:ghost="true"
|
type="primary"
|
icon="download"
|
size="small"
|
@click="downloadFile(text)">
|
下载
|
</a-button>
|
</template>
|
|
<span slot="action" slot-scope="text, record">
|
<a @click="handleEdit(record)">编辑</a>
|
|
<a-divider type="vertical" />
|
<a-dropdown>
|
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
|
<a-menu slot="overlay">
|
<a-menu-item>
|
<a @click="handleDetail(record)">详情</a>
|
</a-menu-item>
|
<a-menu-item>
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
<a>删除</a>
|
</a-popconfirm>
|
</a-menu-item>
|
<a-menu-item>
|
<a @click="handleResponse(record)">响应(模拟)</a>
|
</a-menu-item>
|
<a-menu-item>
|
<a @click="handleDispose(record)">处理(模拟)</a>
|
</a-menu-item>
|
</a-menu>
|
</a-dropdown>
|
</span>
|
|
</a-table>
|
</div>
|
|
<andon-order-modal ref="modalForm" @ok="modalFormOk"></andon-order-modal>
|
</a-card>
|
</template>
|
|
<script>
|
|
import '@/assets/less/TableExpand.less'
|
import { mixinDevice } from '@/utils/mixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import AndonOrderModal from './modules/AndonOrderModal'
|
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
import { postAction } from '@api/manage'
|
import store from '@/store'
|
import JSelectFactory from '@comp/jeecgbiz/JSelectFactory.vue'
|
|
export default {
|
name: 'AndonOrderList',
|
mixins:[JeecgListMixin, mixinDevice],
|
components: {
|
JSelectFactory,
|
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: 'factoryId_dictText'
|
},
|
{
|
title:'安灯类型',
|
align:"center",
|
dataIndex: 'buttonId_dictText'
|
},
|
{
|
title:'安灯人',
|
align:"center",
|
dataIndex: 'operator'
|
},
|
{
|
title:'安灯时间',
|
align:"center",
|
dataIndex: 'operateTime'
|
},
|
{
|
title:'安灯等级',
|
align:"center",
|
dataIndex: 'andonLevel_dictText'
|
},
|
{
|
title:'响应人',
|
align:"center",
|
dataIndex: 'responder'
|
},
|
{
|
title:'响应时间',
|
align:"center",
|
dataIndex: 'responseTime'
|
},
|
{
|
title:'处理人',
|
align:"center",
|
dataIndex: 'processor'
|
},
|
{
|
title:'处理完成时间',
|
align:"center",
|
dataIndex: 'processTime'
|
},
|
{
|
title:'安灯状态',
|
align:"center",
|
dataIndex: 'orderStatus_dictText'
|
},
|
{
|
title:'问题描述',
|
align:"center",
|
dataIndex: 'problemDescreption'
|
},
|
{
|
title:'处理结果描述',
|
align:"center",
|
dataIndex: 'resolutionDescreption'
|
},
|
{
|
title:'处理结果图片',
|
align:"center",
|
dataIndex: 'imageFiles',
|
scopedSlots: {customRender: 'imgSlot'}
|
},
|
{
|
title: '操作',
|
dataIndex: 'action',
|
align:"center",
|
fixed:"right",
|
width:147,
|
scopedSlots: { customRender: 'action' }
|
}
|
],
|
url: {
|
list: "/andonorder/andonOrder/list",
|
delete: "/andonorder/andonOrder/delete",
|
deleteBatch: "/andonorder/andonOrder/deleteBatch",
|
exportXlsUrl: "/andonorder/andonOrder/exportXls",
|
importExcelUrl: "andonorder/andonOrder/importExcel",
|
edit:"/andonorder/andonOrder/edit"
|
|
},
|
dictOptions:{},
|
superFieldList:[],
|
}
|
},
|
created() {
|
this.getSuperFieldList();
|
},
|
computed: {
|
importExcelUrl: function(){
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
},
|
},
|
methods: {
|
handleResponse(record){
|
//获取当前时间
|
const now = new Date();
|
const formattedTime = `${now.getFullYear()}-${(now.getMonth()+1).toString().padStart(2,'0')}-${now.getDate().toString().padStart(2,'0')} ${now.getHours().toString().padStart(2,'0')}:${now.getMinutes().toString().padStart(2,'0')}:${now.getSeconds().toString().padStart(2,'0')}`;
|
record.orderStatus = "2"
|
record.andonLevel = "1"
|
record.responseTime = formattedTime
|
record.responder = store.getters.userInfo.username
|
postAction(this.url.edit,record)
|
this.loadData()
|
},
|
handleDispose(record){
|
const now = new Date();
|
const formattedTime = `${now.getFullYear()}-${(now.getMonth()+1).toString().padStart(2,'0')}-${now.getDate().toString().padStart(2,'0')} ${now.getHours().toString().padStart(2,'0')}:${now.getMinutes().toString().padStart(2,'0')}:${now.getSeconds().toString().padStart(2,'0')}`;
|
record.orderStatus = "3"
|
record.andonLevel = "1"
|
record.processTime = formattedTime
|
record.processor = store.getters.userInfo.username
|
postAction(this.url.edit,record)
|
this.loadData()
|
},
|
initDictConfig(){
|
},
|
getSuperFieldList(){
|
let fieldList=[];
|
fieldList.push({type:'int',value:'delFlag',text:'删除标记',dictCode:''})
|
fieldList.push({type:'string',value:'factoryId',text:'产线ID',dictCode:''})
|
fieldList.push({type:'string',value:'buttonId',text:'安灯类型',dictCode:''})
|
fieldList.push({type:'string',value:'operator',text:'安灯人',dictCode:''})
|
fieldList.push({type:'datetime',value:'operateTime',text:'安灯时间'})
|
fieldList.push({type:'string',value:'andonLevel',text:'安灯等级',dictCode:'andon_level'})
|
fieldList.push({type:'string',value:'responder',text:'响应人',dictCode:''})
|
fieldList.push({type:'datetime',value:'responseTime',text:'响应时间'})
|
fieldList.push({type:'string',value:'processor',text:'处理人',dictCode:''})
|
fieldList.push({type:'datetime',value:'processTime',text:'处理完成时间'})
|
fieldList.push({type:'string',value:'orderStatus',text:'安灯状态',dictCode:'order_status'})
|
fieldList.push({type:'string',value:'problemDescreption',text:'问题描述',dictCode:''})
|
fieldList.push({type:'string',value:'resolutionDescreption',text:'处理结果描述',dictCode:''})
|
fieldList.push({type:'Text',value:'imageFiles',text:'处理结果图片',dictCode:''})
|
this.superFieldList = fieldList
|
}
|
}
|
}
|
</script>
|
<style scoped>
|
@import '~@assets/less/common.less';
|
</style>
|