[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
+1 -1
View File
@@ -11,7 +11,7 @@ const getEnterpriseStandardInfoById = (params) => getAction('/laws/standard/ente
// 配置标准
const allocationStandard = (params) => getAction('', params)
// 移出标准
const shiftStandard = (params) => getAction('', params)
const shiftStandard = (params) => getAction('/laws/standard/enterprise/removeStandard', params)
// 获取左侧树列表
const getTreeList = (params) => getAction('/laws/standard/lawsTreeNode/enterprise', params)
// 左侧树删除
+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++) {
// // 是要去掉这个字段的搜索??
@@ -89,6 +89,13 @@
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 主起草单位 为了去掉横向滚动条 -->
<template slot="mainDraftingUnit" slot-scope="{record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ record.mainDraftingUnit || record.mainDraftingUnit === 0 ? record.mainDraftingUnit : global.emptyLine }}</template>
<div class="table-text">{{ record.mainDraftingUnit || record.mainDraftingUnit === 0 ? record.mainDraftingUnit : global.emptyLine }}</div>
</a-tooltip>
</template>
</j-table>
</div>
@@ -163,8 +170,7 @@ export default {
title: this.$t('enterpriseStandardLibrary.reviewPlan.mainDraftingUnit'),
align: 'center',
width: 180,
dataIndex: 'mainDraftingUnit',
scopedSlots: { customRender: 'text' }
scopedSlots: { customRender: 'mainDraftingUnit' }
}
],
labelCol: {
@@ -114,11 +114,20 @@
</a-dropdown>
</template>
<!-- 详情-->
<template slot="detailClick" slot-scope="{text, record}">
<!-- 企标编号 -->
<template v-slot:standard_no="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="table-text textName" @click="detailClick(record)" v-if="text || text === 0">{{ text }}</a>
<a class="table-text can-click-table-text" @click="detailClick(record)" v-if="text || text === 0">{{ text }}</a>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 企标名称 -->
<template v-slot:standard_name="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="table-text can-click-table-text" @click="detailClick(record)" v-if="text || text === 0">{{ text }}</a>
<div class="table-text" v-else>{{ global.emptyLine }}</div>
</a-tooltip>
</template>
@@ -202,6 +211,7 @@ export default {
loading: false,
getTableHeaderFunc: getEnterpriseStandardTableHeader,
getQueryConditionFunc: getEnterpriseStandardSearchForm,
tableSlotField: ['standard_no', 'standard_name'], // 表格中需要插槽的字段
// url传参严格按照当前命名
url: {
list: '/laws/standard/enterprise/getCommonPage', // 表格数据
@@ -12,7 +12,7 @@
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
<div class="custom-drawer-style-scroll">
<add-form ref="addForm"
:defaultValue="{year_number: new Date().getFullYear()}"
:defaultValue="{year_number: new Date().getFullYear() + ''}"
:disabledFieldList="['replaced_stand_num', 'referenced_standard']"
:get-form-func="getFormFunc"
:get-document-info-func="getDocumentInfoFunc"