对接未符合项

This commit is contained in:
qq787203167
2022-05-11 16:49:39 +08:00
parent f1ae33dc9e
commit 02d2a8812b
7 changed files with 149 additions and 18 deletions
@@ -22,40 +22,135 @@
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{$t('areaOfResponsibility')}}</span>
<div class="title-text" :title="$t('ProcessType')">
<span>{{$t('ProcessType')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'region'"/>
<a-select allowClear
class="box-input"
v-model="queryParam.flowType"
:placeholder="$t('PleaseSelect')+$t('ProcessType')">
<a-select-option :value="2">
<span class="itemOption">
{{ $t('designComplianceReview') }}
</span>
</a-select-option>
<a-select-option :value="3">
<span class="itemOption">
{{ $t('preHomeConfirmation') }}
</span>
</a-select-option>
<a-select-option :value="4">
<span class="itemOption">
{{ $t('verificationComplianceReview') }}
</span>
</a-select-option>
</a-select>
</div>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('RelatedItems')">
<span>{{$t('RelatedItems')}}</span>
</div>
<a-select allowClear
class="box-input"
v-model="queryParam.projectName"
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
<a-select-option :value="2">
<span class="itemOption">
{{ $t('designComplianceReview') }}
</span>
</a-select-option>
<a-select-option :value="3">
<span class="itemOption">
{{ $t('preHomeConfirmation') }}
</span>
</a-select-option>
<a-select-option :value="4">
<span class="itemOption">
{{ $t('verificationComplianceReview') }}
</span>
</a-select-option>
</a-select>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('problemType')">
<span>{{$t('problemType')}}</span>
</div>
<a-select allowClear
class="box-input"
v-model="queryParam.problemType"
:placeholder="$t('PleaseSelect')+$t('problemType')">
<a-select-option value="inconformity">
<span class="itemOption">
{{ $t('nonConformity') }}
</span>
</a-select-option>
<a-select-option value="to track">
<span class="itemOption">
{{ $t('Tracked') }}
</span>
</a-select-option>
</a-select>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('Sponsor')">
<span>{{$t('Sponsor')}}</span>
</div>
<PersonnelSelection :query="{db_field_name:'initiator',db_field_txt:$t('Sponsor')}"
:isInput="true"
class="box-input"
:personneQuery="queryParam"
@change="PersonnelSelectionChange"
v-model="queryParam.initiatorName"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('personLiable')">
<span>{{$t('personLiable')}}</span>
</div>
<PersonnelSelection :query="{db_field_name:'duty',db_field_txt:$t('personLiable')}"
:isInput="true"
class="box-input"
:personneQuery="queryParam"
@change="PersonnelSelectionChange"
v-model="queryParam.dutyName"/>
</div>
</a-col>
</template>
<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 @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a-col>
</span>
</a-row>
</div>
<div class="table-operator">
<div @click="handleAdd" class="operator-text" v-has="'document:getInfoById'">
<a-icon type="plus"/>
{{$t('add')}}
</div>
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
<div @click="handleExport" class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{ $t('export') }}
</div>
</div>
<div>
<a-table
ref="table"
size="middle"
rowKey="id"
:loading="loading"
:pagination="false"
:scroll="{x: true}"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:data-source="dataSource"
:columns="columns"
>
@@ -77,14 +172,20 @@
<script>
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import PersonnelSelection from '@/components/PersonnelSelection/index'
export default {
name: 'projectNonConformance',
components: {
PersonnelSelection
},
data() {
return {
queryParam: {},
loading: false,
dataSource: [],
selectedRowKeys: [],
toggleSearchStatus: false,
columns: [
{
title: this.$t('standard'),
@@ -126,7 +227,8 @@
pageSize: 10,
pageNo: 1,
url: {
page: '/project/ncrTrackController/queryPage'
page: '/project/ncrTrackController/queryPage',
exportData: ''
}
}
},
@@ -134,10 +236,16 @@
this.getList()
},
methods: {
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
searchQuery() {
this.pageNo = 1
this.getList()
},
onSelectChange(value) {
this.selectedRowKeys = value
},
searchReset() {
this.pageNo = 1
this.queryParam = {}
@@ -168,6 +276,18 @@
this.loading = false
}
})
},
handleExport() {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
ids: selectedRowKeys.join(',')
}
downloadFile(this.url.exportData, this.$route.query.projectName + this.$t('listOfRegulations') + '.zip', query, this.Deselect)
},
PersonnelSelectionChange(value, id) {
this.queryParam[value] = id
this.queryParam = { ...this.queryParam }
}
}
}