修改认证清单的添加

This commit is contained in:
范强强
2023-10-27 10:23:03 +08:00
parent aa1f667ff8
commit bee8cc8ebb
@@ -19,7 +19,7 @@
<span>{{$t('standard')}}</span>
</div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></j-input>
v-model="queryParam.serial_number"></j-input>
</div>
</a-col>
<template v-if="toggleSearchStatus">
@@ -34,16 +34,27 @@
</a-col>
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{$t('areaOfResponsibility')}}</span>
<div class="title-text" :title="$t('status')">
<span>{{$t('status')}}</span>
</div>
<j-dict-select-tag class="box-input"
v-model="queryParam.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
<j-dict-select-tag class="box-input" v-model="queryParam.state"
:placeholder="$t('PleaseSelect')+$t('status')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
:triggerChange="false" :dictCode="'state'"/>
</div>
</a-col>
<!-- <a-col :md="12" :sm="8">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text" :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>-->
</template>
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
@@ -53,6 +64,9 @@
</a>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
</a-col>
</span>
</a-row>
@@ -70,18 +84,18 @@
:loading="loading">
</a-table>
</div>
<!-- <div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>-->
<div class="page" v-if="dataList.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
@@ -96,21 +110,27 @@
<script>
import { getAction, postAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
export default {
name: 'addCodeNumber',
mixins: [ResizeHeader, ResizeColumnProvide],
components: {
globalAdvancedQuery
},
data() {
return {
url: {
addModelList: '/project/projectLawsInventoryEO/list'
//project/projectLawsInventoryEO/list
addModelList: '/project/projectLawsInventoryEO/queryPageDummy',
queryConditionInventory: '/project/projectLawsInventoryEO/queryConditionInventory',
},
visible: false,
toggleSearchStatus: false,
columns: [
{
title: this.$t('standard'),
dataIndex: 'serialNumber',
dataIndex: 'serial_number',
align: 'left',
ellipsis: true,
width: 250
@@ -123,18 +143,25 @@
width: 250
},
{
title: this.$t('certificationType'),
dataIndex: 'attestationType_dictText',
title: this.$t('zoneOfApplication'),
dataIndex: 'region',
align: 'left',
ellipsis: true,
width: 228
},
{
title: this.$t('ImplementationDate'),
dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1',
align: 'left',
ellipsis: true,
width: 190
},
{
title: this.$t('areaOfResponsibility'),
dataIndex: 'dutyTerritory_dictText',
title: this.$t('vehicleInProductionDate'),
dataIndex: 'implement_time',
align: 'left',
ellipsis: true,
width: 100
width: 190
}
],
dataList: [],
@@ -144,13 +171,27 @@
pageSize: 10,
total: 0,
queryParam: {},
confirmLoading: false
confirmLoading: false,
queryConditionVOList: [],
fieldList:[],
}
},
mounted() {
},
methods: {
queryConditionInventory() {
let query = {
flag: 1
}
getAction(this.url.queryConditionInventory, query).then((res) => {
if (res.success) {
this.fieldList = res.result || []
} else {
this.fieldList = []
}
})
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
@@ -158,6 +199,8 @@
this.visible = true
this.queryParam = {}
this.selectedRowKeys = []
this.queryConditionVOList = []
this.queryConditionInventory()
this.replacePage()
},
handleCancel() {
@@ -170,6 +213,9 @@
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
this.replacePage()
},
onChange(page, pageSize) {
@@ -182,18 +228,20 @@
this.replacePage()
},
replacePage() {
let queryConditionVOList = JSON.parse(JSON.stringify(this.queryConditionVOList))
let query = {
// pageNo: this.pageNo,
// pageSize: this.pageSize,
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam,
projectLibraryId: this.$route.query.id,
roleCode: 0
// projectLibraryId: this.$route.query.id,
queryConditionVOList: JSON.stringify(queryConditionVOList)
// roleCode: 0
}
this.loading = true
getAction(this.url.addModelList, query).then((res) => {
postAction(this.url.addModelList, query).then((res) => {
if (res.success) {
this.dataList = res.result || []
// this.total = res.result.total
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.dataList = []
@@ -217,8 +265,8 @@
this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
if (this.selectedRowKeys.length < 2) {
let fgid = this.selectedRowList[0].standId
let regulationIndex = this.selectedRowList[0].serialNumber
let fgid = this.selectedRowList[0].id
let regulationIndex = this.selectedRowList[0].serial_number
this.confirmLoading = false
this.visible = false
this.$emit('regulation', regulationIndex, fgid)
@@ -230,6 +278,20 @@
this.$message.warning(this.$t('selectLeastOne'))
this.confirmLoading = false
}
},
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
this.queryConditionVOList = params
this.queryConditionVOList.forEach(res => {
res.type = matchType
})
}
this.replacePage()
}
}
}