修改认证清单的添加

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