|
@@ -121,7 +121,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- curType: "1", //当前所在tab页
|
|
|
+ curType: "", //当前所在tab页
|
|
|
typeList: [], //tab页list
|
|
|
sourceList: [], //数据源
|
|
|
DynEquipList: [], //数据字典设备类型
|
|
@@ -137,7 +137,7 @@ export default {
|
|
|
lastUpdateTime: "", //最后更新时间
|
|
|
tipsType: 1, //提示信息种类
|
|
|
ruleDialogShow: false, //规则提示执行弹窗
|
|
|
- ruleDialogStr:'',//规则提示执行弹窗文字
|
|
|
+ ruleDialogStr: "" //规则提示执行弹窗文字
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -153,17 +153,7 @@ export default {
|
|
|
init() {
|
|
|
let param = { Related: true };
|
|
|
//对象类型
|
|
|
- dynamicPointTypeList(param, res => {
|
|
|
- if (res.Result == "success") {
|
|
|
- this.typeList = res.Content;
|
|
|
- if (this.typeList.length) {
|
|
|
- this.curType = this.typeList[0].Name;
|
|
|
- this.getTableData();
|
|
|
- } else {
|
|
|
- this.tableData = [];
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ this.getTypeNames();
|
|
|
//数据源
|
|
|
dynamicDataSource(param, res => {
|
|
|
if (res.Result == "success") {
|
|
@@ -189,13 +179,14 @@ export default {
|
|
|
for (let i = 0; i < res.Content.length; i++) {
|
|
|
if (res.Content[i].Type == "未执行对应规则") {
|
|
|
this.tipsType = 3;
|
|
|
- this.ruleDialogStr = '对应规则更新,是否现在执行?';
|
|
|
+ this.ruleDialogStr = "对应规则更新,是否现在执行?";
|
|
|
this.ruleDialogShow = true;
|
|
|
return;
|
|
|
}
|
|
|
if (res.Content[i].Type == "原始点位增删") {
|
|
|
this.tipsType = 2;
|
|
|
- this.ruleDialogStr = '原始点位变化,部分标识受到影响,请重新执行对应规则';
|
|
|
+ this.ruleDialogStr =
|
|
|
+ "原始点位变化,部分标识受到影响,请重新执行对应规则";
|
|
|
this.ruleDialogShow = true;
|
|
|
return;
|
|
|
}
|
|
@@ -210,14 +201,32 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //获取tab页
|
|
|
+ getTypeNames() {
|
|
|
+ let param = { Related: false };
|
|
|
+ //对象类型
|
|
|
+ dynamicPointTypeList(param, res => {
|
|
|
+ if (res.Result == "success") {
|
|
|
+ this.typeList = res.Content;
|
|
|
+ if (this.typeList.length) {
|
|
|
+ //记录上次操作的tab页
|
|
|
+ this.curType =
|
|
|
+ this.curType != 0 ? this.curType : this.typeList[0].Name;
|
|
|
+ this.getTableData();
|
|
|
+ } else {
|
|
|
+ this.tableData = [];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//执行对应结果
|
|
|
apply() {
|
|
|
- // dynamicExecute()
|
|
|
- // let date = new Date();
|
|
|
- // this.lastUpdateTime = `${date.getFullYear()}-${date.getMonth() +
|
|
|
- // 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
|
|
|
- // this.$message.success("应用成功");
|
|
|
- this.$refs.apply.showDialog();
|
|
|
+ dynamicExecute({}, res => {
|
|
|
+ if (res.Result == "success") {
|
|
|
+ this.$message.success("应用成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // this.$refs.apply.showDialog();
|
|
|
},
|
|
|
//清除对应关系
|
|
|
handleDelete(index, row) {
|
|
@@ -268,14 +277,14 @@ export default {
|
|
|
//刷新列表
|
|
|
refresh() {
|
|
|
this.page.pageNumber = 1;
|
|
|
- this.getTableData();
|
|
|
+ this.getTypeNames();
|
|
|
},
|
|
|
//规则执行弹窗
|
|
|
rulesClose() {
|
|
|
this.ruleDialogShow = false;
|
|
|
},
|
|
|
//现在执行
|
|
|
- nowDo(){}
|
|
|
+ nowDo() {}
|
|
|
},
|
|
|
watch: {
|
|
|
projectId() {
|