修改一直问题
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
placeholder: String,
|
placeholder: String,
|
||||||
triggerChange: Boolean,
|
triggerChange: Boolean,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
|
db_field_name:String,
|
||||||
value: [String, Number],
|
value: [String, Number],
|
||||||
type: String,
|
type: String,
|
||||||
getPopupContainer:{
|
getPopupContainer:{
|
||||||
@@ -94,11 +95,17 @@
|
|||||||
}else{
|
}else{
|
||||||
val = e
|
val = e
|
||||||
}
|
}
|
||||||
console.log(val)
|
let content = ''
|
||||||
|
this.dictOptions.forEach(res=>{
|
||||||
|
if (res.value == e){
|
||||||
|
content = res.text || res.label
|
||||||
|
}
|
||||||
|
})
|
||||||
if(this.triggerChange){
|
if(this.triggerChange){
|
||||||
this.$emit('change', val);
|
this.$emit('change', val);
|
||||||
}else{
|
}else{
|
||||||
this.$emit('input', val);
|
this.$emit('input', val);
|
||||||
|
this.$emit('changeQuery', content,this.db_field_name);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setCurrentDictOptions(dictOptions){
|
setCurrentDictOptions(dictOptions){
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
placeholder: String,
|
placeholder: String,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
value: String,
|
value: String,
|
||||||
|
db_field_name:String,
|
||||||
type: String,
|
type: String,
|
||||||
options:Array,
|
options:Array,
|
||||||
spliter:{
|
spliter:{
|
||||||
@@ -104,7 +105,16 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onChange (selectedValue) {
|
onChange (selectedValue) {
|
||||||
|
let content = []
|
||||||
|
this.dictOptions.forEach(res=>{
|
||||||
|
selectedValue.forEach(val=>{
|
||||||
|
if (res.value == val){
|
||||||
|
content.push(res.text || res.label)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
this.$emit('change', selectedValue.join(this.spliter));
|
this.$emit('change', selectedValue.join(this.spliter));
|
||||||
|
this.$emit('changeQuery', content.join(this.spliter),this.db_field_name);
|
||||||
},
|
},
|
||||||
setCurrentDictOptions(dictOptions){
|
setCurrentDictOptions(dictOptions){
|
||||||
this.dictOptions = dictOptions
|
this.dictOptions = dictOptions
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
:maxTagCount="1"
|
:maxTagCount="1"
|
||||||
:tree-data="item.tree"
|
:tree-data="item.tree"
|
||||||
tree-checkable
|
tree-checkable
|
||||||
|
@click="treeClick(item.db_field_name)"
|
||||||
|
@change="treeChange"
|
||||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -31,12 +33,15 @@
|
|||||||
<j-dict-select-tag class="text-select" v-model="queryParam[item.db_field_name]"
|
<j-dict-select-tag class="text-select" v-model="queryParam[item.db_field_name]"
|
||||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
|
:db_field_name="item.db_field_name"
|
||||||
|
@changeQuery="changeQuery"
|
||||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-left-select" v-if="item.field_show_type == '4'">
|
<div class="text-left-select" v-if="item.field_show_type == '4'">
|
||||||
<span class="text-sel">{{item.db_field_txt}}</span>
|
<span class="text-sel">{{item.db_field_txt}}</span>
|
||||||
<j-multi-select-tag class="text-select" v-model="queryParam[item.db_field_name]"
|
<j-multi-select-tag class="text-select" v-model="queryParam[item.db_field_name]"
|
||||||
:db_field_name="item.db_field_name"
|
:db_field_name="item.db_field_name"
|
||||||
|
@changeQuery="changeQuery"
|
||||||
:placeholder="$t('PleaseSelect')+item.db_field_txt" :type="'select'"
|
:placeholder="$t('PleaseSelect')+item.db_field_txt" :type="'select'"
|
||||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -182,6 +187,7 @@
|
|||||||
queryParam: {},
|
queryParam: {},
|
||||||
visible: false,
|
visible: false,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
|
db_field_name: '',
|
||||||
url: {
|
url: {
|
||||||
queryCondition: 'search/document/queryCondition',
|
queryCondition: 'search/document/queryCondition',
|
||||||
getInfoList: 'search/document/getInfoList',
|
getInfoList: 'search/document/getInfoList',
|
||||||
@@ -397,11 +403,13 @@
|
|||||||
},
|
},
|
||||||
dateChange(item) {
|
dateChange(item) {
|
||||||
this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD')
|
this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD')
|
||||||
|
this.queryParam[item + '_name'] = moment(this.queryParam[item]).format('YYYY-MM-DD')
|
||||||
},
|
},
|
||||||
onChange(item) {
|
onChange(item) {
|
||||||
let dateOne = moment(this.queryParam[item][0]).format('YYYY-MM-DD')
|
let dateOne = moment(this.queryParam[item][0]).format('YYYY-MM-DD')
|
||||||
let dateTwo = moment(this.queryParam[item][1]).format('YYYY-MM-DD')
|
let dateTwo = moment(this.queryParam[item][1]).format('YYYY-MM-DD')
|
||||||
this.queryParam[item] = [dateOne, dateTwo]
|
this.queryParam[item] = [dateOne, dateTwo]
|
||||||
|
this.queryParam[item + '_name'] = [dateOne, dateTwo]
|
||||||
},
|
},
|
||||||
getCondition() {
|
getCondition() {
|
||||||
let query = {
|
let query = {
|
||||||
@@ -419,12 +427,30 @@
|
|||||||
searchReset() {
|
searchReset() {
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
|
this.queryParamSeach = ''
|
||||||
this.getInfoList()
|
this.getInfoList()
|
||||||
},
|
},
|
||||||
searchQuery() {
|
searchQuery() {
|
||||||
|
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||||
|
this.queryParamSeach = ''
|
||||||
|
Object.keys(queryParam).forEach(val => {
|
||||||
|
if (queryParam[val] instanceof Array) {
|
||||||
|
queryParam[val] = queryParam[val].join(',')
|
||||||
|
}
|
||||||
|
if (val.includes('_name')) {
|
||||||
|
this.queryParamSeach = this.queryParamSeach + queryParam[val] + ','
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.queryParamSeach = this.queryParamSeach.substr(0, this.queryParamSeach.length - 1)
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
this.getInfoList()
|
this.getInfoList()
|
||||||
},
|
},
|
||||||
|
treeChange(value, text) {
|
||||||
|
this.queryParam[this.db_field_name + '_name'] = text
|
||||||
|
},
|
||||||
|
treeClick(db_field_name) {
|
||||||
|
this.db_field_name = db_field_name
|
||||||
|
},
|
||||||
searchData(data, selectModel) {
|
searchData(data, selectModel) {
|
||||||
this.queryParam = { ...this.queryParam, ...data }
|
this.queryParam = { ...this.queryParam, ...data }
|
||||||
this.selectModel = selectModel
|
this.selectModel = selectModel
|
||||||
@@ -434,16 +460,19 @@
|
|||||||
this.queryParam.selectValueTwo = value
|
this.queryParam.selectValueTwo = value
|
||||||
this.getInfoList()
|
this.getInfoList()
|
||||||
},
|
},
|
||||||
|
changeQuery(val, name) {
|
||||||
|
this.queryParam[name + '_name'] = val
|
||||||
|
},
|
||||||
getInfoList() {
|
getInfoList() {
|
||||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||||
this.queryParamSeach = ''
|
|
||||||
Object.keys(queryParam).forEach(val => {
|
Object.keys(queryParam).forEach(val => {
|
||||||
if (queryParam[val] instanceof Array) {
|
if (queryParam[val] instanceof Array) {
|
||||||
queryParam[val] = queryParam[val].join(',')
|
queryParam[val] = queryParam[val].join(',')
|
||||||
}
|
}
|
||||||
this.queryParamSeach = this.queryParamSeach + queryParam[val] + ','
|
if (val.includes('_name')) {
|
||||||
|
delete queryParam[val]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.queryParamSeach = this.queryParamSeach.substr(0, this.queryParamSeach.length - 1)
|
|
||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="text-text-right"
|
<div class="text-text-right"
|
||||||
:class="{ 'null-input':item.checked }">
|
:class="{ 'null-input':item.checked }">
|
||||||
<div class="text-header">
|
<div class="text-header">
|
||||||
<span :title="item.module_type">{{item.module_type}}</span>
|
<span :title="item.module_type" v-html="item.module_type"></span>
|
||||||
<span style="cursor: pointer" :title="item.serial_number"
|
<span style="cursor: pointer" :title="item.serial_number"
|
||||||
@click="titleClick(item)" v-html="item.serial_number"></span>
|
@click="titleClick(item)" v-html="item.serial_number"></span>
|
||||||
<span style="cursor: pointer" :title="item.title" v-html="item.title" @click="titleClick(item)"></span>
|
<span style="cursor: pointer" :title="item.title" v-html="item.title" @click="titleClick(item)"></span>
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
<div class="noData" v-else>
|
<div class="noData" v-else>
|
||||||
暂无数据
|
暂无数据
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page" v-if="conList.length > 0">
|
<div class="page" v-if="conList.length > 0">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||||
@@ -101,6 +102,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.checkboxText.push(item.id)
|
this.checkboxText.push(item.id)
|
||||||
}
|
}
|
||||||
|
console.log(this.checkboxText)
|
||||||
},
|
},
|
||||||
pageOnChange(page, pageSize) {
|
pageOnChange(page, pageSize) {
|
||||||
this.pageNo = page
|
this.pageNo = page
|
||||||
@@ -125,9 +127,13 @@
|
|||||||
queryParam[val] = queryParam[val].join(',')
|
queryParam[val] = queryParam[val].join(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.loading = true
|
||||||
|
console.log(this.checkboxText)
|
||||||
|
let checkboxText = JSON.parse(JSON.stringify(this.checkboxText))
|
||||||
let query = {
|
let query = {
|
||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
|
ids: checkboxText.join(','),
|
||||||
...queryParam
|
...queryParam
|
||||||
}
|
}
|
||||||
postAction(this.url.getInfoList, query).then((res) => {
|
postAction(this.url.getInfoList, query).then((res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user