修改标准选择

This commit is contained in:
qq787203167
2022-03-01 11:42:52 +08:00
parent 6b0404ceaa
commit 78a9d15bd5
4 changed files with 194 additions and 39 deletions
@@ -6,7 +6,8 @@
<!-- <span :class="{'title-text-text':false}">{{query.enName}}</span><br>-->
<!-- <span :class="{'title-text-text':false}">{{query.name}}</span>-->
<!-- </div>-->
<a-input class="box-input" :value="value" @input="indexclick($event)" :placeholder="$t('PleaseEnterOrSelect')+query.db_field_txt"/>
<a-input class="box-input" :value="value" @input="indexclick($event)"
:placeholder="$t('PleaseEnterOrSelect')+query.db_field_txt"/>
<a-button type="primary" class="button-box" @click="standardClick">
标准选择
</a-button>
@@ -20,32 +21,12 @@
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-form layout="inline" @keyup.enter.native="searchQuery" style="margin-bottom: 20px">
<a-row :gutter="24">
<a-col :md="6" :sm="8" style="line-height: 48px">
<div class="box-title-text-index">
<div class="title-text-index">
<span>{{$t('standard')}}</span>
</div>
<a-input class="box-input-index" :placeholder="this.$t('PleaseEnter') +' '+ this.$t('standard')"
v-model="queryParam.serialNumber"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8" style="line-height: 48px">
<div class="box-title-text-index">
<div class="title-text-index">
<span>{{$t('title')}}</span>
</div>
<a-input class="box-input-index" :placeholder="this.$t('PleaseEnter') +' '+ this.$t('title')"
v-model="queryParam.title"></a-input>
</div>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<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>
</span>
</a-row>
</a-form>
<currencySearch
:flag="'1'"
:url="url"
@searchQuery="searchQuery"
@searchReset="searchReset"
/>
<a-table
:columns="columns"
rowKey="id"
@@ -76,10 +57,14 @@
<script>
import { getAction, postAction } from '@/api/manage'
import currencySearch from '@/components/currencySearch/index'
export default {
name: 'index',
props: ['query', 'value'],
components:{
currencySearch
},
props: ['query', 'value', 'replace_standard_id'],
data() {
return {
visible: false,
@@ -92,23 +77,26 @@
{
title: this.$t('standard'),
dataIndex: 'serial_number',
align: 'center',
align: 'center'
},
{
title: this.$t('title'),
dataIndex: 'title',
align: 'center',
align: 'center'
},
{
title: this.$t('TextStatus'),
dataIndex: 'state',
align: 'center',
align: 'center'
}
],
dataList: [],
pageNo: 1,
pageSize: 10,
total: 0
total: 0,
url: {
seachList: 'document/bussDocumentLibraryEO/queryCondition' //搜索字段
}
}
},
mounted() {
@@ -118,7 +106,7 @@
standardClick() {
this.visible = true
this.queryParam = {}
this.replacePage()
this.replacePage(this.replace_standard_id)
},
replacePage() {
let query = {
@@ -126,12 +114,16 @@
pageNo: this.pageNo,
pageSize: this.pageSize
}
this.selectedRowKeys = []
this.loading = true
postAction('document/bussDocumentLibraryEO/replacePageInfo', query).then((res) => {
this.loading = false
if (res.success) {
this.dataList = res.result.records
this.total = res.result.total
if (this.replace_standard_id) {
this.selectedRowKeys = this.replace_standard_id.split(',')
}
} else {
this.dataList = []
}
@@ -142,10 +134,13 @@
},
handleSubmit() {
let content = []
let replace_standard_id = []
this.content.forEach(res => {
content.push(res.title)
replace_standard_id.push(res.id)
})
this.$emit('input', content.join(','))
this.$emit('change', replace_standard_id.join(','))
this.visible = false
},
indexclick(event) {
@@ -162,11 +157,12 @@
})
})
},
searchQuery() {
searchQuery(queryParam) {
this.queryParam = queryParam
this.replacePage()
},
searchReset() {
this.queryParam = {}
searchReset(queryParam) {
this.queryParam = queryParam
this.replacePage()
},
onChange(page, pageSize) {
@@ -176,7 +172,7 @@
SizeChange(page, pageSize) {
this.pageSize = pageSize
this.replacePage()
},
}
}
}
</script>
@@ -237,6 +233,7 @@
height: 38px;
margin-top: 2px;
}
.page {
text-align: right;
margin-top: 20px;