[update] 解决搜索条件年代号清空去不掉,企标详情完善
This commit is contained in:
@@ -30,7 +30,7 @@ const cancelCollectStandard = (params) => postAction('/personal/lawsStandardColl
|
||||
const shareStandard = (params) => postAction('/personal/lawsStandardSharing/enterprise/add', params)
|
||||
|
||||
// 企标详情-获取更新记录
|
||||
const detailGetUpdateRecord = (params) => getAction('', params)
|
||||
const detailGetUpdateRecord = (params) => getAction('/laws/standard/enterprise/getUpdateRecordList', params)
|
||||
// 企标详情-提交问题
|
||||
const detailSubmitQuestion = (params) => postAction('', params)
|
||||
// 企标详情-企标评价
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
v-model="queryParam[item.dbFieldName]"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
:tree-data="item.tree"
|
||||
:tree-data="optionsData[item.dbFieldName]"
|
||||
tree-checkable
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||
/>
|
||||
@@ -28,7 +28,7 @@
|
||||
v-model="queryParam[item.dbFieldName]"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
:tree-data="item.tree"
|
||||
:tree-data="optionsData[item.dbFieldName]"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- 输入框 -->
|
||||
<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.STANDARD_MORE.value]
|
||||
.includes(item.fieldShowType)">
|
||||
<a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')+item.dbFieldTxt"
|
||||
@@ -117,7 +117,7 @@
|
||||
v-model="queryParam[item.dbFieldName]"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
:tree-data="item.tree"
|
||||
:tree-data="optionsData[item.dbFieldName]"
|
||||
tree-checkable
|
||||
treeCheckStrictly
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||
@@ -132,14 +132,14 @@
|
||||
v-model="queryParam[item.dbFieldName]"
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
:tree-data="item.tree"
|
||||
:tree-data="optionsData[item.dbFieldName]"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||
/>
|
||||
</a-form-item>
|
||||
</template>
|
||||
<!-- 输入框 -->
|
||||
<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.STANDARD_MORE.value]
|
||||
.includes(item.fieldShowType)">
|
||||
<a-form-item :label="item.dbFieldTxt" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('pleaseEnter')+item.dbFieldTxt"
|
||||
@@ -207,7 +207,8 @@
|
||||
import JDictSelectTag from '../dict/JDictSelectTag'
|
||||
import { FieldType } from '../../enums/commonEnums'
|
||||
import eventBus from '@/common/event'
|
||||
import { queryDepartTreeList } from '../../api/api'
|
||||
import { getFormDictTreeList, queryDepartTreeList } from '../../api/api'
|
||||
import { getAction } from '../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'Search',
|
||||
@@ -255,7 +256,8 @@ export default {
|
||||
},
|
||||
wrapperCol: {
|
||||
span: 14
|
||||
}
|
||||
},
|
||||
optionsData: {} // 用接口获取到的下拉数据
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
@@ -305,22 +307,32 @@ export default {
|
||||
this.getQueryConditionFunc(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.searchList = res.result
|
||||
this.getOptionsData() // 获取下拉数据
|
||||
console.log(this.searchList)
|
||||
// if (this.searchQueryList && this.searchQueryList.length > 0) {
|
||||
// for (let i = 0; i < this.searchList.length; i++) {
|
||||
// // 是要去掉这个字段的搜索??
|
||||
// if (this.searchList[i].db_field_name === 'issue_time') {
|
||||
// this.searchList.splice(i, 1)
|
||||
// i--
|
||||
// }
|
||||
// // db_field_name 说明可以被代替位置??
|
||||
// if (this.searchList[i].db_field_name === 'title') {
|
||||
// const data = this.searchList[i + 1]
|
||||
// this.searchList[i + 1] = this.searchQueryList[0]
|
||||
// this.searchList.push(data)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 处理需要通过接口获取的下拉数据
|
||||
*/
|
||||
getOptionsData () {
|
||||
const formList = Object.values(this.searchList).reduce((acc, cur) => acc.concat(cur), [])
|
||||
formList.forEach(item => {
|
||||
if (item.fieldShowType === FieldType.TREE.value || item.fieldShowType === FieldType.TREE_SINGLE.value) {
|
||||
// 展示类型是树选择,且有接口的
|
||||
if (item.fieldHref) {
|
||||
getAction(item.fieldHref).then(res => {
|
||||
if (res.success) {
|
||||
this.$set(this.optionsData, item.dbFieldName, res.result)
|
||||
}
|
||||
})
|
||||
} else if (item.dictId) {
|
||||
getFormDictTreeList({ dictId: item.dictId }).then(res => {
|
||||
if (res.success) {
|
||||
this.$set(this.optionsData, item.dbFieldName, res.result)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -126,7 +126,11 @@ export default {
|
||||
return moment(this).format(fm)
|
||||
}
|
||||
if (!val) {
|
||||
this.momVal = null
|
||||
if (this.showType === 'year') {
|
||||
this.year = null
|
||||
} else {
|
||||
this.momVal = null
|
||||
}
|
||||
} else {
|
||||
if (this.showType === 'year') {
|
||||
this.year = val
|
||||
|
||||
@@ -175,11 +175,11 @@ export default {
|
||||
},
|
||||
// 企标评价
|
||||
handleEvaluate () {
|
||||
this.$refs.enterpriseStandardEvaluateModal.open(this.detailData.id)
|
||||
this.$refs.enterpriseStandardEvaluateModal.open(this.detailData.standard_number)
|
||||
},
|
||||
// 更新记录
|
||||
handleOpenUpdateRecord () {
|
||||
this.$refs.updateRecordModal.open(this.detailData.standardNumber)
|
||||
this.$refs.updateRecordModal.open(this.detailData.standard_number)
|
||||
},
|
||||
// 提交问题
|
||||
submitQuestion () {
|
||||
|
||||
+4
-4
@@ -296,13 +296,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (id) {
|
||||
open (standardNumber) {
|
||||
this.visible = true
|
||||
this.initData(id)
|
||||
this.initData(standardNumber)
|
||||
},
|
||||
initData (id) {
|
||||
initData (standardNumber) {
|
||||
this.confirmLoading = true
|
||||
detailEvaluate({ id: id }).then(res => {
|
||||
detailEvaluate({ standardNumber: standardNumber }).then(res => {
|
||||
if (res.success) {
|
||||
this.scoreData = res.result
|
||||
this.nameArr = Object.keys(this.scoreData)
|
||||
|
||||
Reference in New Issue
Block a user