Commit 69edd48a authored by 何远江's avatar 何远江

bug 修改

parent c223e890
...@@ -649,6 +649,7 @@ watch(connectVisible, (val) => { ...@@ -649,6 +649,7 @@ watch(connectVisible, (val) => {
) )
if (index > -1) { if (index > -1) {
const beConnectFiledItem = beConnectFiled[index] const beConnectFiledItem = beConnectFiled[index]
const connectFiledItem = connectFiled[index]
return { return {
title: item.title, title: item.title,
sheet: item.sheet, sheet: item.sheet,
...@@ -657,8 +658,8 @@ watch(connectVisible, (val) => { ...@@ -657,8 +658,8 @@ watch(connectVisible, (val) => {
numFlag: item.numFlag, numFlag: item.numFlag,
numTitle: item.numTitle, numTitle: item.numTitle,
only: item.only, only: item.only,
script: item.script, script: connectFiledItem.script,
scriptName: item.scriptName, scriptName: connectFiledItem.scriptName,
bescriptName: beConnectFiledItem.scriptName, bescriptName: beConnectFiledItem.scriptName,
bescript: beConnectFiledItem.script, bescript: beConnectFiledItem.script,
betitle: beConnectFiledItem.title, betitle: beConnectFiledItem.title,
......
...@@ -150,7 +150,13 @@ ...@@ -150,7 +150,13 @@
</template> </template>
</vxe-modal> </vxe-modal>
<vxe-modal v-model="connectVisible" width="1000" title="关联信息配置" show-footer> <vxe-modal
v-model="connectVisible"
@hide="onHideSettingConnect"
width="1000"
title="关联信息配置"
show-footer
>
<p>关联区域信息:{{ currentConnectInfo.excelAreaNicname }}</p> <p>关联区域信息:{{ currentConnectInfo.excelAreaNicname }}</p>
<p>被关联信息:{{ cachCurrentBeConnectInfo.excelAreaNicname }}</p> <p>被关联信息:{{ cachCurrentBeConnectInfo.excelAreaNicname }}</p>
...@@ -158,7 +164,6 @@ ...@@ -158,7 +164,6 @@
class="mt-2" class="mt-2"
size="mini" size="mini"
:data="connectConfigData" :data="connectConfigData"
@hide="onHideSettingConnect"
border border
height="400" height="400"
ref="xTableConnect" ref="xTableConnect"
...@@ -649,7 +654,8 @@ watch(connectVisible, (val) => { ...@@ -649,7 +654,8 @@ watch(connectVisible, (val) => {
connectConfigData.value = titles.map((item: any) => { connectConfigData.value = titles.map((item: any) => {
// 全部列,并且匹配已经绑定的列 // 全部列,并且匹配已经绑定的列
if (currentConnectInfo.excelAreaConnectId) { if (currentConnectInfo.varAreaConnectId) {
console.log('zhixing -------')
// 按照顺序来赋值connectFiled -> beConnectFiled // 按照顺序来赋值connectFiled -> beConnectFiled
const connectFiled = cachConnectEditInfo.value?.connectFiled || [] const connectFiled = cachConnectEditInfo.value?.connectFiled || []
const beConnectFiled = cachConnectEditInfo.value?.beConnectFiled const beConnectFiled = cachConnectEditInfo.value?.beConnectFiled
...@@ -659,6 +665,7 @@ watch(connectVisible, (val) => { ...@@ -659,6 +665,7 @@ watch(connectVisible, (val) => {
) )
if (index > -1) { if (index > -1) {
const beConnectFiledItem = beConnectFiled[index] const beConnectFiledItem = beConnectFiled[index]
const connectFiledItem = connectFiled[index]
return { return {
title: item.title, title: item.title,
sheet: item.sheet, sheet: item.sheet,
...@@ -667,8 +674,8 @@ watch(connectVisible, (val) => { ...@@ -667,8 +674,8 @@ watch(connectVisible, (val) => {
numFlag: item.numFlag, numFlag: item.numFlag,
numTitle: item.numTitle, numTitle: item.numTitle,
only: item.only, only: item.only,
script: item.script, script: connectFiledItem.script,
scriptName: item.scriptName, scriptName: connectFiledItem.scriptName,
bescriptName: beConnectFiledItem.scriptName, bescriptName: beConnectFiledItem.scriptName,
bescript: beConnectFiledItem.script, bescript: beConnectFiledItem.script,
betitle: beConnectFiledItem.title, betitle: beConnectFiledItem.title,
...@@ -704,6 +711,8 @@ watch(connectVisible, (val) => { ...@@ -704,6 +711,8 @@ watch(connectVisible, (val) => {
const onHideSettingConnect = () => { const onHideSettingConnect = () => {
// 清空 // 清空
cachConnectEditInfo.value = {} cachConnectEditInfo.value = {}
currentConnectInfo.varAreaConnectId = ''
console.log('清空----===')
} }
const changeBeConnect = (v: string, row: any) => { const changeBeConnect = (v: string, row: any) => {
const option = beConnectSelectOptions.value.find((item: any) => item.title == v) const option = beConnectSelectOptions.value.find((item: any) => item.title == v)
...@@ -751,8 +760,8 @@ const chooseConnectOnHide = () => { ...@@ -751,8 +760,8 @@ const chooseConnectOnHide = () => {
const editConnect = async (row: any, index: number) => { const editConnect = async (row: any, index: number) => {
console.log(row) console.log(row)
currentConnectInfo.excelAreaConnectId = row.excelAreaConnectId currentConnectInfo.varAreaConnectId = row.varAreaConnectId
currentConnectInfo.excelAreaBeId = row.excelAreaBeId currentConnectInfo.varAreaBeId = row.varAreaBeId
currentConnectInfo.varAreaId = row.varAreaId currentConnectInfo.varAreaId = row.varAreaId
Object.assign(cachConnectEditInfo.value, unref(row)) Object.assign(cachConnectEditInfo.value, unref(row))
...@@ -764,7 +773,7 @@ const editConnect = async (row: any, index: number) => { ...@@ -764,7 +773,7 @@ const editConnect = async (row: any, index: number) => {
// cachCurrentBeConnectInfo 保存被关联数据 // cachCurrentBeConnectInfo 保存被关联数据
Object.assign( Object.assign(
cachCurrentBeConnectInfo, cachCurrentBeConnectInfo,
unref(areaList.value?.find((item) => item.varAreaId == row.excelAreaBeId)) unref(areaList.value?.find((item) => item.varAreaId == row.varAreaBeId))
) )
connectVisible.value = true connectVisible.value = true
......
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