From 29d39511ef0ef0da00d8d4577beb0cef2c3decdc Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Mon, 22 Jul 2024 15:39:35 +0800
Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9bug87313=E5=92=8C8?=
=?UTF-8?q?7311?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../MarketRegulationsListSelectionModal.vue | 65 ++++++++++++++++---
.../MarketRegulationsFormPage.vue | 2 +-
2 files changed, 56 insertions(+), 11 deletions(-)
diff --git a/src/components/selection/MarketRegulationsListSelectionModal.vue b/src/components/selection/MarketRegulationsListSelectionModal.vue
index 4d1c8d0..8693846 100644
--- a/src/components/selection/MarketRegulationsListSelectionModal.vue
+++ b/src/components/selection/MarketRegulationsListSelectionModal.vue
@@ -15,28 +15,35 @@
-
+ v-model="queryParam.manifestNo">
-
+ v-model="queryParam.manifestName">
-
+ :maxTagCount="1"
+ :getPopupContainer="triggerNode=> triggerNode.parentNode"
+ :tree-data="countryOptions"
+ :placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')"
+ show-search
+ allowClear
+ :filterTreeNode="filterTreeOption"
+ />
@@ -53,9 +60,9 @@
-
+ v-model="queryParam.author">
@@ -73,7 +80,7 @@
:scroll="{x: 900}"
:data-source="dataList"
:pagination="ipagination"
- :row-selection="{ type: type, selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+ :row-selection="rowSelection"
:loading="loading"
@change="handleTableChange">
@@ -106,6 +113,7 @@
import JDictSelectTag from '../dict/JDictSelectTag'
import { StandardSource } from '../../enums/commonEnums'
import { getMarketRegulationsList } from '@/api/api'
+import { getFormDictTreeList } from '../../api/api'
export default {
name: 'MarketRegulationsListSelectionModal',
@@ -133,6 +141,28 @@ export default {
default: () => {
return {}
}
+ },
+ // 不可选的数据
+ disabledData: {
+ type: Array,
+ required: false,
+ default: () => {
+ return []
+ }
+ }
+ },
+ computed: {
+ rowSelection () {
+ return {
+ type: this.type,
+ selectedRowKeys: this.selectedRowKeys,
+ onChange: this.onSelectChange,
+ getCheckboxProps: record => ({
+ props: {
+ disabled: this.disabledData.includes(record.id)
+ }
+ })
+ }
}
},
data () {
@@ -145,6 +175,7 @@ export default {
wrapperCol: {
sm: 14
},
+ countryOptions: [], // 国家下拉选择
selectedRowKeys: [],
selectedRowList: [],
loading: false,
@@ -222,7 +253,17 @@ export default {
dataList: []
}
},
+ mounted () {
+ this.getCountryOption()
+ },
methods: {
+ getCountryOption () {
+ getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
+ if (res.success) {
+ this.countryOptions = res.result
+ }
+ })
+ },
open () {
this.visible = true
this.queryParam = {}
@@ -354,6 +395,10 @@ export default {
title: this.$t('view')
}
})
+ },
+ filterTreeOption (input, option) {
+ const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
+ return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
diff --git a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue
index c83b85f..9e6dc98 100644
--- a/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue
+++ b/src/views/standardRegulationLibrary/marketRegulationsList/MarketRegulationsFormPage.vue
@@ -188,7 +188,7 @@
ref="transferModal"
@listChange="transferOk"/>
-
+