feat(): 增加规则版本状态规则
parent
351acc4fc4
commit
381dae4722
|
@ -37,14 +37,19 @@
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>{{ruleEngineVersion.name + "-" + ruleEngineVersion.code}}</span>
|
<span>{{ruleEngineVersion.name + "-" + ruleEngineVersion.code}}</span>
|
||||||
<el-dropdown style="float: right; padding: 3px 0">
|
<el-dropdown style="float: right; padding: 3px 0" @command="checkRuleEngineVersion">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
更多操作<i class="el-icon-arrow-down el-icon--right"></i>
|
更多操作<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="info">规则详情</el-dropdown-item>
|
<el-dropdown-item :command="{event: 'info', ruleEngineVersion: ruleEngineVersion}">规则详情</el-dropdown-item>
|
||||||
<el-dropdown-item command="test">测试规则</el-dropdown-item>
|
<el-dropdown-item :command="{event: 'test', ruleEngineVersion: ruleEngineVersion}">测试规则</el-dropdown-item>
|
||||||
<el-dropdown-item command="status">禁用规则</el-dropdown-item>
|
<el-dropdown-item :command="{event: 'status', ruleEngineVersion: ruleEngineVersion}" :disabled="ruleEngineVersion.status !== '2'">
|
||||||
|
{{ruleEngineVersion.isActivate !== 'no-activate' ? "禁用" : "激活"}}规则
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="{event: 'publish', ruleEngineVersion: ruleEngineVersion}" v-if="ruleEngineVersion.status === '1'">
|
||||||
|
发布规则
|
||||||
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
@ -96,7 +101,6 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<dict-tag :options="dict.type.rule_engine_version_status" :value="engineVersionForm.status"/>
|
<dict-tag :options="dict.type.rule_engine_version_status" :value="engineVersionForm.status"/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -161,6 +165,25 @@ export default {
|
||||||
this.initRuleEngine();
|
this.initRuleEngine();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 点击规则事件
|
||||||
|
checkRuleEngineVersion(command) {
|
||||||
|
switch (command.event) {
|
||||||
|
case "info"://详情
|
||||||
|
this.handleAbandon(command.index,command.row);
|
||||||
|
break;
|
||||||
|
case "test"://测试
|
||||||
|
this.handleUpload (command.index,command.row);
|
||||||
|
break;
|
||||||
|
case "status"://激活状态
|
||||||
|
command.ruleEngineVersion.isActivate = 'no-activate' === command.ruleEngineVersion.isActivate ? 'activated' : 'no-activate'
|
||||||
|
break;
|
||||||
|
case "publish"://发布
|
||||||
|
command.ruleEngineVersion.status = '2'
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
console.log(command.event);
|
||||||
|
console.log(command.ruleEngineVersion);
|
||||||
|
},
|
||||||
// 生成规则版本
|
// 生成规则版本
|
||||||
genEngineVersion(){
|
genEngineVersion(){
|
||||||
if (this.engineVersionForm.name == null || this.engineVersionForm.name === "") {
|
if (this.engineVersionForm.name == null || this.engineVersionForm.name === "") {
|
||||||
|
|
Loading…
Reference in New Issue