Unverified 提交 475e6059 authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

Merge pull request #662 from dataease/pr@dev@feat_panel-linkage-bar

refactor:联动设置出现未匹配的字段时,给提示
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<el-popover <el-popover
width="400" width="400"
trigger="click" trigger="click"
style="max-height: 400px;overflow-y: auto"
> >
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
...@@ -13,6 +14,8 @@ ...@@ -13,6 +14,8 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row style="height: 120px;overflow-y: auto">
<el-row v-for="(item, index) in linkageInfo.linkageFields" :key="index"> <el-row v-for="(item, index) in linkageInfo.linkageFields" :key="index">
<el-col :span="11"> <el-col :span="11">
<div class="select-filed"> <div class="select-filed">
...@@ -60,6 +63,7 @@ ...@@ -60,6 +63,7 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</el-row>
<el-row class="bottom"> <el-row class="bottom">
<el-button size="mini" type="success" icon="el-icon-plus" round @click="addLinkageField">追加联动依赖字段</el-button> <el-button size="mini" type="success" icon="el-icon-plus" round @click="addLinkageField">追加联动依赖字段</el-button>
...@@ -67,7 +71,6 @@ ...@@ -67,7 +71,6 @@
<!-- <el-button slot="reference">T</el-button>--> <!-- <el-button slot="reference">T</el-button>-->
<i slot="reference" class="icon iconfont icon-edit slot-class" /> <i slot="reference" class="icon iconfont icon-edit slot-class" />
</el-popover> </el-popover>
</template> </template>
...@@ -183,5 +186,9 @@ export default { ...@@ -183,5 +186,9 @@ export default {
height: 35px; height: 35px;
border-radius: 3px; border-radius: 3px;
} }
>>>.el-popover{
height: 200px;
overflow: auto;
}
</style> </style>
...@@ -320,6 +320,38 @@ export default { ...@@ -320,6 +320,38 @@ export default {
this.close() this.close()
}, },
saveLinkage() { saveLinkage() {
// 字段检查
// let checkCount = 0
for (const key in this.targetLinkageInfo) {
let subCheckCount = 0
const linkageInfo = this.targetLinkageInfo[key]
const linkageFields = linkageInfo['linkageFields']
if (linkageFields) {
linkageFields.forEach(function(linkage) {
if (!(linkage.sourceField && linkage.targetField)) {
subCheckCount++
}
})
}
if (subCheckCount > 0) {
this.$message({
message: this.$t('chart.datalist') + '【' + linkageInfo.targetViewName + '】' + this.$t('panel.exit_un_march_linkage_field'),
type: 'error',
showClose: true
})
return
}
}
// if (checkCount > 0) {
// this.$message({
// message: this.$t('panel.exit_un_march_linkage_field'),
// type: 'error',
// showClose: true
// })
// return
// }
const request = { const request = {
panelId: this.$store.state.panel.panelInfo.id, panelId: this.$store.state.panel.panelInfo.id,
sourceViewId: this.curLinkageView.propValue.viewId, sourceViewId: this.curLinkageView.propValue.viewId,
......
...@@ -1212,7 +1212,8 @@ export default { ...@@ -1212,7 +1212,8 @@ export default {
drill: 'drill', drill: 'drill',
linkage: 'linkage', linkage: 'linkage',
cancel_linkage: 'Cancel Linkage', cancel_linkage: 'Cancel Linkage',
remove_all_linkage: 'Remove All Linkage' remove_all_linkage: 'Remove All Linkage',
exit_un_march_linkage_field: 'Exit Un March Linkage Field'
}, },
plugin: { plugin: {
local_install: 'Local installation', local_install: 'Local installation',
......
...@@ -1211,7 +1211,8 @@ export default { ...@@ -1211,7 +1211,8 @@ export default {
drill: '下钻', drill: '下钻',
linkage: '联动', linkage: '联动',
cancel_linkage: '取消联动', cancel_linkage: '取消联动',
remove_all_linkage: '清除所有联动' remove_all_linkage: '清除所有联动',
exit_un_march_linkage_field: '存在未匹配联动关系的字段'
}, },
plugin: { plugin: {
local_install: '本地安裝', local_install: '本地安裝',
......
...@@ -1213,7 +1213,8 @@ export default { ...@@ -1213,7 +1213,8 @@ export default {
drill: '下钻', drill: '下钻',
linkage: '联动', linkage: '联动',
cancel_linkage: '取消联动', cancel_linkage: '取消联动',
remove_all_linkage: '清除所有联动' remove_all_linkage: '清除所有联动',
exit_un_march_linkage_field: '存在未匹配联动关系的字段'
}, },
plugin: { plugin: {
local_install: '本地安装', local_install: '本地安装',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论