[update] 修改高级检索和三个标准的查询标准状态变多选,并且有默认值
This commit is contained in:
@@ -307,6 +307,14 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
default: null
|
default: null
|
||||||
|
},
|
||||||
|
// 默认的查询条件
|
||||||
|
defaultSearchParams: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// searchQueryList: {
|
// searchQueryList: {
|
||||||
// type: Array,
|
// type: Array,
|
||||||
@@ -331,6 +339,9 @@ export default {
|
|||||||
optionsData: {} // 用接口获取到的下拉数据
|
optionsData: {} // 用接口获取到的下拉数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created () {
|
||||||
|
this.queryParam = Object.assign({}, this.defaultSearchParams)
|
||||||
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getSysCategoryTree()
|
this.getSysCategoryTree()
|
||||||
this.getSearch()
|
this.getSearch()
|
||||||
@@ -352,7 +363,8 @@ export default {
|
|||||||
eventBus.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
|
eventBus.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
|
||||||
},
|
},
|
||||||
searchReset () {
|
searchReset () {
|
||||||
this.queryParam = {}
|
this.queryParam = Object.assign({}, this.defaultSearchParams)
|
||||||
|
console.log(this.defaultSearchParams, this.queryParam)
|
||||||
this.$emit('reset', JSON.parse(JSON.stringify(this.queryParam)))
|
this.$emit('reset', JSON.parse(JSON.stringify(this.queryParam)))
|
||||||
eventBus.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
|
eventBus.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
|
||||||
},
|
},
|
||||||
@@ -378,6 +390,9 @@ export default {
|
|||||||
this.getQueryConditionFunc(params).then((res) => {
|
this.getQueryConditionFunc(params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.searchList = res.result
|
this.searchList = res.result
|
||||||
|
// 标准状态特殊处理成多选
|
||||||
|
const standardStateIndex = this.searchList.findIndex(item => item.dbFieldName === 'standard_state')
|
||||||
|
this.searchList[standardStateIndex].fieldShowType = FieldType.OPTION_MORE.value
|
||||||
this.getOptionsData() // 获取下拉数据
|
this.getOptionsData() // 获取下拉数据
|
||||||
console.log(this.searchList)
|
console.log(this.searchList)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ export const ConfigurableTableMixin = {
|
|||||||
getTableHeaderFunc: null, // 获取表头的方法
|
getTableHeaderFunc: null, // 获取表头的方法
|
||||||
tableSlotField: [], // 表格需要使用插槽的字段,dbFieldName
|
tableSlotField: [], // 表格需要使用插槽的字段,dbFieldName
|
||||||
disabledMixinsCreate: false,
|
disabledMixinsCreate: false,
|
||||||
isBackTitle: false // 是否是详情页有返回的标题
|
isBackTitle: false, // 是否是详情页有返回的标题
|
||||||
|
defaultSearchParams: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -81,6 +82,7 @@ export const ConfigurableTableMixin = {
|
|||||||
if (this.disabledMixinsCreate) {
|
if (this.disabledMixinsCreate) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.searchParams = Object.assign({}, this.defaultSearchParams)
|
||||||
this.getTableHeader()
|
this.getTableHeader()
|
||||||
this.loadData()
|
this.loadData()
|
||||||
// 过滤没有权限的按钮
|
// 过滤没有权限的按钮
|
||||||
|
|||||||
@@ -153,7 +153,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { filterObj } from '@/utils/util'
|
import { filterObj } from '@/utils/util'
|
||||||
import { StandardSource, FieldType } from '@/enums/commonEnums'
|
import { StandardSource, FieldType, EnterpriseStandardStatus, StandardStatus } from '@/enums/commonEnums'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
import { getFormDictTreeList, queryDepartTreeList } from '@/api/api'
|
import { getFormDictTreeList, queryDepartTreeList } from '@/api/api'
|
||||||
import {
|
import {
|
||||||
@@ -269,6 +269,7 @@ export default {
|
|||||||
this.getQueryConditionFunc = getDomesticStandardQuery
|
this.getQueryConditionFunc = getDomesticStandardQuery
|
||||||
this.getSearch()
|
this.getSearch()
|
||||||
this.getSysCategoryTree()
|
this.getSysCategoryTree()
|
||||||
|
this.queryParam.standard_state = '6,7'
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 点击一般检索
|
// 点击一般检索
|
||||||
@@ -311,6 +312,11 @@ export default {
|
|||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
total: 0
|
total: 0
|
||||||
}
|
}
|
||||||
|
if (value === StandardSource.ENTERPRISE.value) {
|
||||||
|
this.queryParam.standard_state = `${EnterpriseStandardStatus.CURRENTLY_EFFECTIVE.value},${EnterpriseStandardStatus.TRIAL_OPERATION.value},${EnterpriseStandardStatus.RELEASE.value}`
|
||||||
|
} else {
|
||||||
|
this.queryParam.standard_state = `${StandardStatus.CURRENTLY_EFFECTIVE.value},${StandardStatus.RELEASE.value}`
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onChange (item) {
|
onChange (item) {
|
||||||
if (this.queryParam[item] && this.queryParam[item].length > 0) {
|
if (this.queryParam[item] && this.queryParam[item].length > 0) {
|
||||||
@@ -344,6 +350,9 @@ export default {
|
|||||||
this.getQueryConditionFunc(params).then((res) => {
|
this.getQueryConditionFunc(params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.searchList = res.result
|
this.searchList = res.result
|
||||||
|
// 标准状态特殊处理成多选
|
||||||
|
const standardStateIndex = this.searchList.findIndex(item => item.dbFieldName === 'standard_state')
|
||||||
|
this.searchList[standardStateIndex].fieldShowType = FieldType.OPTION_MORE.value
|
||||||
this.getOptionsData() // 获取下拉数据
|
this.getOptionsData() // 获取下拉数据
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
@@ -438,6 +447,11 @@ export default {
|
|||||||
// 重置
|
// 重置
|
||||||
searchReset () {
|
searchReset () {
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
|
if (this.currStandardType === StandardSource.ENTERPRISE.value) {
|
||||||
|
this.queryParam.standard_state = `${EnterpriseStandardStatus.CURRENTLY_EFFECTIVE.value},${EnterpriseStandardStatus.TRIAL_OPERATION.value},${EnterpriseStandardStatus.RELEASE.value}`
|
||||||
|
} else {
|
||||||
|
this.queryParam.standard_state = `${StandardStatus.CURRENTLY_EFFECTIVE.value},${StandardStatus.RELEASE.value}`
|
||||||
|
}
|
||||||
this.dataSource = []
|
this.dataSource = []
|
||||||
this.ipagination.total = 0
|
this.ipagination.total = 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
<search ref="searchRef"
|
<search ref="searchRef"
|
||||||
:flag="flag"
|
:flag="flag"
|
||||||
:get-query-condition-func="getQueryConditionFunc"
|
:get-query-condition-func="getQueryConditionFunc"
|
||||||
|
:default-search-params="defaultSearchParams"
|
||||||
search-has="enterpriseStandard:search"
|
search-has="enterpriseStandard:search"
|
||||||
@search="searchQuery"
|
@search="searchQuery"
|
||||||
@reset="searchReset" />
|
@reset="searchReset" />
|
||||||
@@ -229,7 +230,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { StandardSystemTreeNodeType } from '@/enums/commonEnums'
|
import { StandardSystemTreeNodeType, EnterpriseStandardStatus } from '@/enums/commonEnums'
|
||||||
import JTable from '@/components/jero/JTable'
|
import JTable from '@/components/jero/JTable'
|
||||||
// 搜索组件
|
// 搜索组件
|
||||||
import Search from '@/components/customField/Search'
|
import Search from '@/components/customField/Search'
|
||||||
@@ -261,7 +262,6 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|||||||
import { previewPdf } from '@/utils/previewPdf'
|
import { previewPdf } from '@/utils/previewPdf'
|
||||||
import { kkFilePreview } from '@/utils/kkFilePreview'
|
import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||||
import { getFileInfo } from '@api/api'
|
import { getFileInfo } from '@api/api'
|
||||||
import { OperationType, StandardSource } from '../../../enums/commonEnums'
|
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -325,7 +325,10 @@ export default {
|
|||||||
},
|
},
|
||||||
showAction: true, // 是否显示操作列
|
showAction: true, // 是否显示操作列
|
||||||
currentShare: {},
|
currentShare: {},
|
||||||
expandedKeys: [] // 体系展开的节点
|
expandedKeys: [], // 体系展开的节点
|
||||||
|
defaultSearchParams: {
|
||||||
|
standard_state: `${EnterpriseStandardStatus.CURRENTLY_EFFECTIVE.value},${EnterpriseStandardStatus.TRIAL_OPERATION.value},${EnterpriseStandardStatus.RELEASE.value}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -433,9 +436,9 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 重置查询
|
* 重置查询
|
||||||
*/
|
*/
|
||||||
searchReset () {
|
searchReset (params) {
|
||||||
this.currentTreeNode = null
|
this.currentTreeNode = null
|
||||||
this.searchParams = {}
|
this.searchParams = Object.assign({}, params)
|
||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
delete this.filters.nodeCode
|
delete this.filters.nodeCode
|
||||||
this.getTableHeader()
|
this.getTableHeader()
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
<search ref="searchRef"
|
<search ref="searchRef"
|
||||||
:url="url"
|
:url="url"
|
||||||
:get-query-condition-func="getQueryConditionFunc"
|
:get-query-condition-func="getQueryConditionFunc"
|
||||||
|
:defaultSearchParams="defaultSearchParams"
|
||||||
search-has="domesticStandard:search"
|
search-has="domesticStandard:search"
|
||||||
@search="searchQuery"
|
@search="searchQuery"
|
||||||
@reset="searchReset" />
|
@reset="searchReset" />
|
||||||
@@ -261,7 +262,13 @@ import {
|
|||||||
collectionDomesticStandard,
|
collectionDomesticStandard,
|
||||||
cancelCollectionDomesticStandard
|
cancelCollectionDomesticStandard
|
||||||
} from '../../../api/standardRegulationLibraryApi'
|
} from '../../../api/standardRegulationLibraryApi'
|
||||||
import { OperationType, StandardSource, StandardSystemTreeNodeType, YesOrNoEnum } from '../../../enums/commonEnums'
|
import {
|
||||||
|
OperationType,
|
||||||
|
StandardSource,
|
||||||
|
StandardStatus,
|
||||||
|
StandardSystemTreeNodeType,
|
||||||
|
YesOrNoEnum
|
||||||
|
} from '../../../enums/commonEnums'
|
||||||
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||||
import DomesticSystemTreeModal from './modules/DomesticSystemTreeModal.vue'
|
import DomesticSystemTreeModal from './modules/DomesticSystemTreeModal.vue'
|
||||||
import SelectionDomesticStandardDrawer from './modules/SelectionDomesticStandardDrawer.vue'
|
import SelectionDomesticStandardDrawer from './modules/SelectionDomesticStandardDrawer.vue'
|
||||||
@@ -342,7 +349,10 @@ export default {
|
|||||||
treeLoading: false,
|
treeLoading: false,
|
||||||
isCollection: false,
|
isCollection: false,
|
||||||
expandedKeys: [], // 展开的节点
|
expandedKeys: [], // 展开的节点
|
||||||
needFilterTableBtn: true
|
needFilterTableBtn: true,
|
||||||
|
defaultSearchParams: {
|
||||||
|
standard_state: `${StandardStatus.CURRENTLY_EFFECTIVE.value},${StandardStatus.RELEASE.value}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -713,8 +723,8 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 重置查询
|
* 重置查询
|
||||||
*/
|
*/
|
||||||
searchReset () {
|
searchReset (params) {
|
||||||
this.searchParams = {}
|
this.searchParams = Object.assign({}, params)
|
||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
this.selectedTreeKeys = []
|
this.selectedTreeKeys = []
|
||||||
delete this.filters.nodeCode
|
delete this.filters.nodeCode
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
<search ref="searchRef"
|
<search ref="searchRef"
|
||||||
:url="url"
|
:url="url"
|
||||||
:get-query-condition-func="getQueryConditionFunc"
|
:get-query-condition-func="getQueryConditionFunc"
|
||||||
|
:default-search-params="defaultSearchParams"
|
||||||
search-has="overseasStandard:search"
|
search-has="overseasStandard:search"
|
||||||
@search="searchQuery"
|
@search="searchQuery"
|
||||||
@reset="searchReset" />
|
@reset="searchReset" />
|
||||||
@@ -260,7 +261,13 @@ import {
|
|||||||
getOverseasStandardForm,
|
getOverseasStandardForm,
|
||||||
getOverseasStandardDocumentInfo
|
getOverseasStandardDocumentInfo
|
||||||
} from '../../../api/standardRegulationLibraryApi'
|
} from '../../../api/standardRegulationLibraryApi'
|
||||||
import { OperationType, StandardSource, StandardSystemTreeNodeType, YesOrNoEnum } from '../../../enums/commonEnums'
|
import {
|
||||||
|
OperationType,
|
||||||
|
StandardSource,
|
||||||
|
StandardStatus,
|
||||||
|
StandardSystemTreeNodeType,
|
||||||
|
YesOrNoEnum
|
||||||
|
} from '../../../enums/commonEnums'
|
||||||
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||||
import OverseasStandardModal from './modules/OverseasStandardModal.vue'
|
import OverseasStandardModal from './modules/OverseasStandardModal.vue'
|
||||||
import OverseasSystemTreeModal from './modules/OverseasSystemTreeModal.vue'
|
import OverseasSystemTreeModal from './modules/OverseasSystemTreeModal.vue'
|
||||||
@@ -342,7 +349,10 @@ export default {
|
|||||||
tableSlotField: ['standard_name', 'standard_number'], // 表格中需要插槽的字段
|
tableSlotField: ['standard_name', 'standard_number'], // 表格中需要插槽的字段
|
||||||
treeLoading: false,
|
treeLoading: false,
|
||||||
isCollection: false,
|
isCollection: false,
|
||||||
expandedKeys: []
|
expandedKeys: [],
|
||||||
|
defaultSearchParams: {
|
||||||
|
standard_state: `${StandardStatus.CURRENTLY_EFFECTIVE.value},${StandardStatus.RELEASE.value}`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -714,8 +724,8 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 重置查询
|
* 重置查询
|
||||||
*/
|
*/
|
||||||
searchReset () {
|
searchReset (params) {
|
||||||
this.searchParams = {}
|
this.searchParams = Object.assign({}, params)
|
||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
this.selectedTreeKeys = []
|
this.selectedTreeKeys = []
|
||||||
delete this.filters.nodeCode
|
delete this.filters.nodeCode
|
||||||
|
|||||||
Reference in New Issue
Block a user