代码生成
This commit is contained in:
@@ -7,10 +7,10 @@
|
|||||||
<ai-search-bar v-if="searchList.length" bottomBorder style="margin-bottom: 12px;">
|
<ai-search-bar v-if="searchList.length" bottomBorder style="margin-bottom: 12px;">
|
||||||
<template #left>
|
<template #left>
|
||||||
<div v-for="(item, index) in searchList" :key="index">
|
<div v-for="(item, index) in searchList" :key="index">
|
||||||
<ai-select
|
<ai-select multiple
|
||||||
v-model="search[item.searchValue]"
|
v-model="search[item.searchModel]"
|
||||||
:placeholder="'请选择'+item.label" clearable
|
:placeholder="'请选择'+item.label" clearable
|
||||||
@change="$forceUpdate();(page.current = 1), getList()"
|
@change="selectChange(index, search[item.searchModel])"
|
||||||
:selectList="dict.getDict(item.dict)"
|
:selectList="dict.getDict(item.dict)"
|
||||||
v-if="item.type == 'dict'">
|
v-if="item.type == 'dict'">
|
||||||
</ai-select>
|
</ai-select>
|
||||||
@@ -113,12 +113,23 @@ export default {
|
|||||||
ids: [],
|
ids: [],
|
||||||
showRightInput: false,
|
showRightInput: false,
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initConfigs()
|
this.initConfigs()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
selectChange(index, value) {
|
||||||
|
console.log(index, value)
|
||||||
|
this.searchList[index].searchValue = value.join('|')
|
||||||
|
console.log(this.searchList[index].searchValue )
|
||||||
|
this.$forceUpdate();
|
||||||
|
this.page.current = 1
|
||||||
|
this.getList()
|
||||||
|
|
||||||
|
},
|
||||||
initConfigs() {
|
initConfigs() {
|
||||||
var dictList = []
|
var dictList = []
|
||||||
var colList = []
|
var colList = []
|
||||||
@@ -153,8 +164,10 @@ export default {
|
|||||||
type: 'dict',
|
type: 'dict',
|
||||||
label: item.fieldName,
|
label: item.fieldName,
|
||||||
dict: item.dictionaryCode,
|
dict: item.dictionaryCode,
|
||||||
|
searchModel: item.fieldDbName+'2',
|
||||||
searchValue: item.fieldDbName
|
searchValue: item.fieldDbName
|
||||||
}
|
}
|
||||||
|
searchItem.searchModel = searchItem.searchValue
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.type == 'input' || item.type == 'name' || item.type == 'idNumber' || item.type == 'phone') {
|
if (item.type == 'input' || item.type == 'name' || item.type == 'idNumber' || item.type == 'phone') {
|
||||||
|
|||||||
Reference in New Issue
Block a user