From aab24bc7e758a93e6f71bd346e7eafc497057afb Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Wed, 20 Sep 2023 09:33:52 +0800
Subject: [PATCH] =?UTF-8?q?[update]=20=E8=A7=A3=E5=86=B3=E6=90=9C=E7=B4=A2?=
=?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=B9=B4=E4=BB=A3=E5=8F=B7=E6=B8=85=E7=A9=BA?=
=?UTF-8?q?=E5=8E=BB=E4=B8=8D=E6=8E=89=EF=BC=8C=E4=BC=81=E6=A0=87=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/enterpriseStandardLibraryApi.js | 2 +-
src/components/customField/Search.vue | 58 +++++++++++--------
src/components/jero/JDate.vue | 6 +-
.../detail/EnterpriseStandardDetail.vue | 4 +-
.../EnterpriseStandardEvaluateModal.vue | 8 +--
5 files changed, 47 insertions(+), 31 deletions(-)
diff --git a/src/api/enterpriseStandardLibraryApi.js b/src/api/enterpriseStandardLibraryApi.js
index 9d7c8eae..44542afa 100644
--- a/src/api/enterpriseStandardLibraryApi.js
+++ b/src/api/enterpriseStandardLibraryApi.js
@@ -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)
// 企标详情-企标评价
diff --git a/src/components/customField/Search.vue b/src/components/customField/Search.vue
index 3a5f1591..489db565 100644
--- a/src/components/customField/Search.vue
+++ b/src/components/customField/Search.vue
@@ -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"
/>
@@ -36,7 +36,7 @@
{
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)
+ }
+ })
+ }
}
})
},
diff --git a/src/components/jero/JDate.vue b/src/components/jero/JDate.vue
index 764d8de4..e4c683b2 100644
--- a/src/components/jero/JDate.vue
+++ b/src/components/jero/JDate.vue
@@ -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
diff --git a/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue b/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue
index 3ed5d018..2f32dbd8 100644
--- a/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue
+++ b/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue
@@ -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 () {
diff --git a/src/views/enterpriseStandardLibrary/standard/detail/module/EnterpriseStandardEvaluateModal.vue b/src/views/enterpriseStandardLibrary/standard/detail/module/EnterpriseStandardEvaluateModal.vue
index f748392e..fd4afdfe 100644
--- a/src/views/enterpriseStandardLibrary/standard/detail/module/EnterpriseStandardEvaluateModal.vue
+++ b/src/views/enterpriseStandardLibrary/standard/detail/module/EnterpriseStandardEvaluateModal.vue
@@ -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)