|
@@ -7,7 +7,7 @@
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<div class="pos-right">
|
|
|
- <span style="margin-right:10px;" v-show="lastUpdateTime">最后配置时间:{{lastUpdateTime}}</span>
|
|
|
+ <span style="margin-right:10px;" v-show="lastUpdateTime">最后配置完成时间:{{lastUpdateTime}}</span>
|
|
|
<span v-if="tipsType==2" class="tips">
|
|
|
原始点位变化,部分标识受到影响,请重新执行对应规则
|
|
|
<i class="el-icon-right"></i>
|
|
@@ -16,23 +16,46 @@
|
|
|
对应规则有更新,记得执行哦
|
|
|
<i class="el-icon-right"></i>
|
|
|
</span>
|
|
|
+ <span v-if="tipsType==0" class="tips">规则执行中。。。</span>
|
|
|
<el-tooltip class="item" effect="dark" :content="'按对应规则自动设定实例动态参数信息点'" placement="left">
|
|
|
- <el-badge :is-dot="ruleDialogShow||tipsType>1" class="item">
|
|
|
- <el-button size="small" type="primary" @click="apply" icon="el-icon-refresh" style="float:right;">配置</el-button>
|
|
|
+ <el-badge :is-dot="tipsType==2||tipsType==3" class="item">
|
|
|
+ <el-button size="small" type="primary" @click="showSelectAll" icon="el-icon-refresh" style="float:right;" :disabled="isPending">配置
|
|
|
+ </el-button>
|
|
|
+ <!-- @contextmenu.native.prevent="show" -->
|
|
|
</el-badge>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
- <equip-rules v-if="curType=='设备'" ref="equip" :typeName="curType" @refresh="equipRefresh"></equip-rules>
|
|
|
+ <equip-rules v-if="curType=='设备'" ref="equip" :typeName="curType" @refresh="equipRefresh" :isPending="isPending"></equip-rules>
|
|
|
<!-- <parts-rules v-if="!curType=='设备'" ref="parts" :typeName="'设备'"></parts-rules> -->
|
|
|
<!-- 应用规则弹窗 -->
|
|
|
- <apply-rules-dialog ref="apply" @refresh="getPrompt"></apply-rules-dialog>
|
|
|
+ <apply-rules-dialog ref="apply" @refresh="getExecuteFeedback"></apply-rules-dialog>
|
|
|
<!-- 规则更新提示 -->
|
|
|
<el-dialog title="提示" :visible.sync="ruleDialogShow" width="25%" @close="rulesClose">
|
|
|
<span>{{tipCon}}</span>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button size="small" @click="rulesClose">稍后处理</el-button>
|
|
|
- <el-button size="small" type="primary" @click="apply">现在执行</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="apply(false)">现在执行</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 选择增量 or 全量 执行 -->
|
|
|
+ <el-dialog title="提示" :visible.sync="allApplyDialog" width="50%" @close="allApplyClose">
|
|
|
+ <div id="applySelect">
|
|
|
+ <el-radio v-model="force" :label="false">增量执行:只设定对应规则or原始点位有变化的实例动态参数信息点</el-radio>
|
|
|
+ <p style="color:#999;">因自动判断是否变化,可能更新不够完整,但速度比较快</p>
|
|
|
+ <p>
|
|
|
+ <span class="el-dropdown-link" @click="allApplyFlag=true">
|
|
|
+ 我要全量执行<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <div v-show="allApplyFlag">
|
|
|
+ <el-radio v-model="force" :label="true">全量执行:按对应规则重新设定所有实例动态参数信息点</el-radio>
|
|
|
+ <p style="color:#ff0000;">全量执行时间较长,且执行过程中相关功能不可操作</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="allApplyClose">取消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="apply">确认</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -46,7 +69,8 @@ import partsRules from "@/components/point/dynamicdata/partsRules";
|
|
|
import {
|
|
|
dynamicClashConfirm,
|
|
|
dynamicPromptmessage,
|
|
|
- dynamicPointTypeList
|
|
|
+ dynamicPointTypeList,
|
|
|
+ dynamicExecuteFeedback
|
|
|
} from "@/api/scan/request";
|
|
|
export default {
|
|
|
computed: {
|
|
@@ -60,6 +84,10 @@ export default {
|
|
|
tipsType: 1, //提示信息种类
|
|
|
ruleDialogShow: false, //规则提示执行弹窗
|
|
|
tipCon: '', //配置按钮提示文字-规则提示执行弹窗文字
|
|
|
+ allApplyDialog: false, //全量执行弹窗
|
|
|
+ allApplyFlag: false, //全量执行flag
|
|
|
+ force: false, //默认增量执行 ----- false - 增量 true - 全量执行
|
|
|
+ isPending: false, //是否执行中:执行中禁用所有功能 true即为执行中
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -81,8 +109,8 @@ export default {
|
|
|
let param = { Related: true };
|
|
|
//对象类型
|
|
|
this.getTypeNames();
|
|
|
- //获取提示信息
|
|
|
- this.getPrompt();
|
|
|
+ //获取 执行反馈
|
|
|
+ this.getExecuteFeedback();
|
|
|
},
|
|
|
//获取提示消息
|
|
|
getPrompt() {
|
|
@@ -130,20 +158,53 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //显示选择增量or增量执行
|
|
|
+ showSelectAll() {
|
|
|
+ this.allApplyDialog = true;
|
|
|
+ this.force = false;
|
|
|
+ this.allApplyFlag = false;
|
|
|
+ },
|
|
|
//执行对应结果
|
|
|
apply() {
|
|
|
this.ruleDialogShow = false;
|
|
|
- this.tipsType = 1;
|
|
|
- this.$refs.apply.showDialog();
|
|
|
+ this.tipsType = 0;
|
|
|
+ this.isPending = true;
|
|
|
+ this.allApplyClose()
|
|
|
+ this.$refs.apply.showDialog(this.force);
|
|
|
},
|
|
|
//规则执行弹窗
|
|
|
rulesClose() {
|
|
|
this.ruleDialogShow = false;
|
|
|
},
|
|
|
+ //关闭选择全量-增量弹窗
|
|
|
+ allApplyClose() {
|
|
|
+ this.allApplyDialog = false;
|
|
|
+ this.force = false;
|
|
|
+ },
|
|
|
//刷新设备类表
|
|
|
equipRefresh(val) {
|
|
|
this.curType = val;
|
|
|
this.getTypeNames()
|
|
|
+ },
|
|
|
+ // show() {
|
|
|
+ // console.log('右键事件')
|
|
|
+ // },
|
|
|
+ //获取执行反馈
|
|
|
+ getExecuteFeedback() {
|
|
|
+ dynamicExecuteFeedback('', res => {
|
|
|
+ this.allApplyClose()
|
|
|
+ this.isPending = false;
|
|
|
+ let response = res.Content[0]
|
|
|
+ if (response.Completed == 'Processing') {
|
|
|
+ this.isPending = true;
|
|
|
+ this.tipsType = 0;
|
|
|
+ setTimeout(() => {
|
|
|
+ this.getExecuteFeedback()
|
|
|
+ }, 2000)
|
|
|
+ } else {
|
|
|
+ this.getPrompt()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -178,6 +239,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ #applySelect {
|
|
|
+ /deep/ .el-radio__input.is-checked + .el-radio__label {
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+ p {
|
|
|
+ font-size: 12px;
|
|
|
+ padding-left: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
|