[update] 修改企标库搜索条件bug

This commit is contained in:
lideqin
2023-09-18 14:26:38 +08:00
parent 929fb3b737
commit 41b7cd15c6
5 changed files with 47 additions and 13 deletions
+24 -6
View File
@@ -1,7 +1,7 @@
<template>
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="(24 / (minLength + 1))" :sm="(24 / minLength)" v-for="(item,index) in searchList.slice(0, minLength)" :key="index" style="line-height: 48px">
<a-col :md="(24 / (minLength + 1))" :sm="(24 / minLength)" v-for="(item) in searchList.slice(0, minLength)" :key="item.id" style="line-height: 48px">
<!-- 树形选择器 -->
<!-- <template v-if="item.fieldShowType === FieldType.TREE.value">-->
<!-- <a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
@@ -19,7 +19,8 @@
<!-- 输入框 -->
<template
v-if="[FieldType.TEXT_BOX.value, FieldType.TEXTAREA.value,FieldType.USER_SINGLE.value,
FieldType.ORGAN_SINGLE.value, FieldType.STANDARD_MORE.value, FieldType.ORGAN_MORE.value]
FieldType.ORGAN_SINGLE.value, FieldType.STANDARD_MORE.value, FieldType.ORGAN_MORE.value,
FieldType.YEAR_PICKER.value]
.includes(item.fieldShowType)">
<a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+item.dbFieldTxt"
@@ -56,12 +57,28 @@
<j-dict-select-tag v-model="queryParam[item.dbFieldName]"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
:type="'select'"
:triggerChange="false" :dictCode="item.dict_field"/>
:triggerChange="false" :dictCode="item.dictField"/>
</a-form-item>
</template>
<!-- 组织机构选择 -->
<template v-else-if="[FieldType.ORGAN_SINGLE.value, FieldType.ORGAN_MORE.value].includes(item.fieldShowType)">
<a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam[item.dbFieldName]"
:maxTagCount="1"
:show-search="true"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="categoryTreeList"
:placeholder="$t('pleaseSelect') + item.dbFieldTxt"
/>
</a-form-item>
</template>
</a-col>
<template v-if="searchList.length > minLength && toggleSearchStatus">
<a-col :md="(24 / (minLength + 1))" :sm="(24 / minLength)" v-for="(item,index) in searchList.slice(minLength)" :key="index" style="line-height: 48px">
<a-col :md="(24 / (minLength + 1))" :sm="(24 / minLength)" v-for="(item) in searchList.slice(minLength)" :key="item.id" style="line-height: 48px">
<!-- 树形选择器 -->
<template v-if="item.fieldShowType === FieldType.TREE.value">
<a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -86,7 +103,7 @@
</a-form-item>
</template>
<!-- 组织机构选择 -->
<template v-if="[FieldType.ORGAN_SINGLE.value, FieldType.ORGAN_MORE.value].includes(item.fieldShowType)">
<template v-else-if="[FieldType.ORGAN_SINGLE.value, FieldType.ORGAN_MORE.value].includes(item.fieldShowType)">
<a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
@@ -115,7 +132,7 @@
<j-dict-select-tag v-model="queryParam[item.dbFieldName]"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
:type="'select'"
:triggerChange="false" :dictCode="item.dict_field" />
:triggerChange="false" :dictCode="item.dictField" />
</a-form-item>
</template>
</a-col>
@@ -223,6 +240,7 @@ export default {
this.getQueryConditionFunc(params).then((res) => {
if (res.success) {
this.searchList = res.result
console.log(this.searchList)
// if (this.searchQueryList && this.searchQueryList.length > 0) {
// for (let i = 0; i < this.searchList.length; i++) {
// // 是要去掉这个字段的搜索??