Commit 6cd23437 authored by 何远江's avatar 何远江

添加区域类型关联限制

parent a5f12ea4
...@@ -260,6 +260,7 @@ const currentConnectInfo = reactive<Recordable>({ ...@@ -260,6 +260,7 @@ const currentConnectInfo = reactive<Recordable>({
fileId: '' fileId: ''
}) })
const cachCurrentConnectInfo = reactive<Recordable>({}) const cachCurrentConnectInfo = reactive<Recordable>({})
const cachCurrentBeConnectInfo = reactive<Recordable>({})
const beConnectData = computed(() => { const beConnectData = computed(() => {
/** /**
* 如果公共区域 和 附加区域关联 只能关联 数据区域 * 如果公共区域 和 附加区域关联 只能关联 数据区域
...@@ -547,7 +548,10 @@ const confirmConnect = () => { ...@@ -547,7 +548,10 @@ const confirmConnect = () => {
const list = xTableConnect.value?.getCheckboxRecords() const list = xTableConnect.value?.getCheckboxRecords()
if (!list?.length) { if (!list?.length) {
if (cachCurrentConnectInfo.excelAreaType == 'attach_area') { if (
cachCurrentConnectInfo.excelAreaType == 'attach_area' ||
cachCurrentBeConnectInfo.excelAreaType == 'attach_area'
) {
return ElMessage.warning('请选择关联的字段!') return ElMessage.warning('请选择关联的字段!')
} }
addConnect([]) addConnect([])
...@@ -639,6 +643,7 @@ const confirmBeConnect = () => { ...@@ -639,6 +643,7 @@ const confirmBeConnect = () => {
if (!data) { if (!data) {
return ElMessage.warning('请选择有效数据!') return ElMessage.warning('请选择有效数据!')
} }
Object.assign(cachCurrentBeConnectInfo, unref(data))
currentConnectInfo.excelAreaBeId = data.excelAreaId currentConnectInfo.excelAreaBeId = data.excelAreaId
// 打开关联弹窗。 // 打开关联弹窗。
chooseVisible.value = false chooseVisible.value = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment