|
@@ -66,7 +66,7 @@
|
|
|
<ul v-show="visibleGroupMenu"
|
|
|
:style="{ left: menuLeft + 'px', top: menuTop + 'px' }"
|
|
|
class="contextmenu contextmenu-black">
|
|
|
- <li @click="createGroupEvent">添加组</li>
|
|
|
+ <li @click="createGroupEvent">添加数据组</li>
|
|
|
</ul>
|
|
|
|
|
|
<!-- 数据组列表右键操作 -->
|
|
@@ -361,7 +361,7 @@ export default {
|
|
|
name: "HeaderMain",
|
|
|
data() {
|
|
|
return {
|
|
|
- groupDialogTitle: '添加组',
|
|
|
+ groupDialogTitle: '添加数据组',
|
|
|
groupDialogVisible: false,
|
|
|
dataItemDialogTitle: '选择数据项',
|
|
|
dataItemDialogVisible: false,
|
|
@@ -642,6 +642,7 @@ export default {
|
|
|
},
|
|
|
/** 添加数据组事件 */
|
|
|
createGroupEvent() {
|
|
|
+ this.groupDialogTitle = '添加数据组'
|
|
|
this.closeMenu()
|
|
|
this.currTabs = 'base-setting'
|
|
|
this.groupBasicForm = {
|
|
@@ -722,8 +723,10 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ const loading = showLoading(this, '加载中,请稍候···')
|
|
|
this.chooseItemDataList = []
|
|
|
getItemGroupById(id).then(res => {
|
|
|
+ loading.close()
|
|
|
this.createGroupEvent()
|
|
|
let item = res.data
|
|
|
this.updateGroupData = item
|
|
@@ -734,11 +737,18 @@ export default {
|
|
|
this.groupBasicForm.itemList = item.itemList
|
|
|
this.getChooseItemData(item)
|
|
|
this.chooseItemDataView = true
|
|
|
+ this.groupDialogTitle = '修改数据组'
|
|
|
this.groupRateForm.readMode = item.readMode + ''
|
|
|
this.groupRateForm.modeValue = item.modeValue
|
|
|
this.groupRateForm.valueMode = item.valueCondition + ''
|
|
|
this.groupRateForm.valuePeriod = [item.startReadTime, item.endReadTime]
|
|
|
}).catch((e) => {
|
|
|
+ loading.close()
|
|
|
+ this.$alert(e, '查询失败!', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
/** 选择的数据项值初始化 */
|
|
@@ -785,9 +795,10 @@ export default {
|
|
|
})
|
|
|
}).catch((e) => {
|
|
|
loading.close()
|
|
|
- _this.$message({
|
|
|
- message: '删除失败!',
|
|
|
- type: 'error'
|
|
|
+ _this.$alert(e, '删除失败!', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
}).catch(() => {
|
|
@@ -875,10 +886,10 @@ export default {
|
|
|
this.dataItemDialogVisible = true
|
|
|
}).catch((e) => {
|
|
|
loading.close()
|
|
|
- console.error(e)
|
|
|
- this.$message({
|
|
|
- message: '连接失败!',
|
|
|
- type: 'error'
|
|
|
+ this.$alert(e, '连接失败!', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -1197,6 +1208,11 @@ export default {
|
|
|
// node.parent.expand()
|
|
|
}).catch((e) => {
|
|
|
loading.close()
|
|
|
+ this.$alert(e, '删除失败!', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
})
|