221 lines
5.9 KiB
Java
221 lines
5.9 KiB
Java
<template>
|
|
<a-card :bordered="false">
|
|
<div class="table-page-search-wrapper">
|
|
<a-row :gutter="24">
|
|
<a-col :md="6" :sm="8">
|
|
<div class="box-title-text">
|
|
<div class="title-text" :title="$t('standard')">
|
|
<span>{{$t('standard')}}</span>
|
|
</div>
|
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
|
v-model="queryParam.serialNumber"></j-input>
|
|
</div>
|
|
</a-col>
|
|
<a-col :md="6" :sm="8">
|
|
<div class="box-title-text">
|
|
<div class="title-text" :title="$t('title')">
|
|
<span>{{$t('title')}}</span>
|
|
</div>
|
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
|
v-model="queryParam.title"></j-input>
|
|
</div>
|
|
</a-col>
|
|
<a-col :md="6" :sm="8">
|
|
<div class="box-title-text">
|
|
<div class="title-text" style="width: 64px" :title="$t('areaOfResponsibility')">
|
|
<span>{{$t('areaOfResponsibility')}}</span>
|
|
</div>
|
|
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
|
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
|
:type="'select'"
|
|
:triggerChange="false" :dictCode="'duty_territory'"/>
|
|
</div>
|
|
</a-col>
|
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
|
<a-col :md="6" :sm="24">
|
|
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
|
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
|
</a-col>
|
|
</span>
|
|
</a-row>
|
|
</div>
|
|
<div class="table-operator">
|
|
<div @click="handleExport" class="operator-text">
|
|
<a-icon type="export" :rotate="-90"/>
|
|
{{ $t('export') }}
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<a-table
|
|
ref="table"
|
|
size="middle"
|
|
:loading="loading"
|
|
:pagination="false"
|
|
:scroll="{x: true}"
|
|
:data-source="dataSource"
|
|
:columns="columns"
|
|
>
|
|
</a-table>
|
|
</div>
|
|
<div class="page" v-if="dataSource.length > 0">
|
|
<a-pagination
|
|
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
|
show-quick-jumper
|
|
show-size-changer
|
|
:page-size.sync="pageSize"
|
|
:total="total"
|
|
@change="pageOnChange"
|
|
@showSizeChange="SizeChange"
|
|
/>
|
|
</div>
|
|
</a-card>
|
|
</template>
|
|
|
|
<script>
|
|
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
|
|
|
export default {
|
|
name: 'nonConformance',
|
|
data() {
|
|
return {
|
|
queryParam: {},
|
|
loading: false,
|
|
dataSource: [],
|
|
columns: [
|
|
{
|
|
title: this.$t('standard'),
|
|
align: 'center',
|
|
dataIndex: 'serialNumber'
|
|
},
|
|
{
|
|
title: this.$t('title'),
|
|
align: 'center',
|
|
dataIndex: 'title'
|
|
},
|
|
{
|
|
title: this.$t('ProcessType'),
|
|
align: 'center',
|
|
dataIndex: 'flowType'
|
|
},
|
|
{
|
|
title: this.$t('areaOfResponsibility'),
|
|
align: 'center',
|
|
dataIndex: 'dutyTerritory_dictText'
|
|
},
|
|
{
|
|
title: this.$t('problemType'),
|
|
align: 'center',
|
|
dataIndex: 'problemType'
|
|
},
|
|
{
|
|
title: this.$t('Sponsor'),
|
|
align: 'center',
|
|
dataIndex: 'initiator'
|
|
},
|
|
{
|
|
title: this.$t('personLiable'),
|
|
align: 'center',
|
|
dataIndex: 'duty'
|
|
}
|
|
],
|
|
total: 0,
|
|
pageSize: 10,
|
|
pageNo: 1,
|
|
url: {
|
|
page: '/project/ncrTrackController/queryPageInfo',
|
|
exportData: '/project/ncrTrackController/exportData'
|
|
}
|
|
}
|
|
},
|
|
mounted() {
|
|
this.getList()
|
|
},
|
|
methods: {
|
|
searchQuery() {
|
|
this.pageNo = 1
|
|
this.getList()
|
|
},
|
|
searchReset() {
|
|
this.pageNo = 1
|
|
this.queryParam = {}
|
|
this.getList()
|
|
},
|
|
pageOnChange(page, pageSize) {
|
|
this.pageNo = page
|
|
this.getList()
|
|
},
|
|
SizeChange(page, pageSize) {
|
|
this.pageNo = 1
|
|
this.pageSize = pageSize
|
|
this.getList()
|
|
},
|
|
handleExport() {
|
|
let query = {
|
|
...this.queryParam,
|
|
projectLibraryId: this.$route.query.id
|
|
}
|
|
downloadFile(this.url.exportData, this.$t('NonConformance') + '.xls', query, this.Deselect)
|
|
},
|
|
getList() {
|
|
let query = {
|
|
pageNo: this.pageNo,
|
|
pageSize: this.pageSize,
|
|
projectLibraryId: this.$route.query.id,
|
|
...this.queryParam
|
|
}
|
|
this.loading = true
|
|
getAction(this.url.page, query).then((res) => {
|
|
if (res.success) {
|
|
this.dataSource = res.result.records || []
|
|
this.total = res.result.total
|
|
this.loading = false
|
|
} else {
|
|
this.dataSource = []
|
|
this.loading = false
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
@import '~@assets/less/common.less';
|
|
|
|
.box-title-text {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.title-text {
|
|
width: 32px;
|
|
color: #000F16;
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
margin-right: 16px;
|
|
margin-top: 3px;
|
|
text-align: right;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.box-input {
|
|
display: inline-block;
|
|
width: 70%;
|
|
height: 38px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.box-button {
|
|
height: 38px;
|
|
/*margin-top: 2px;*/
|
|
}
|
|
|
|
.page {
|
|
text-align: right;
|
|
margin-top: 20px;
|
|
}
|
|
</style> |