feat(): 增加规则版本功能-未完善
parent
4b8d1fc117
commit
968b238057
|
@ -64,6 +64,56 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
title="新增版本" :visible.sync="addVersionStatus"
|
||||||
|
width="75%">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>基本信息</span>
|
||||||
|
<el-button style="float: right; padding: 3px 0" type="text" @click="genEngineVersion">生成引擎版本类</el-button>
|
||||||
|
</div>
|
||||||
|
<el-form :label-position="engineVersionForm" label-width="80px" :model="engineVersionForm">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="版本类">
|
||||||
|
<el-input v-model="engineVersionForm.versionCode" disabled placeholder="点击类生成自动生成类名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="名称">
|
||||||
|
<el-input v-model="engineVersionForm.name"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="编码">
|
||||||
|
<el-input v-model="engineVersionForm.code"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<dict-tag :options="dict.type.rule_engine_version_status" :value="engineVersionForm.status"/>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否激活">
|
||||||
|
<dict-tag :options="dict.type.rule_engine_activate_status" :value="engineVersionForm.isActivate"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<editor v-model="engineVersionForm.description" :min-height="150"/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="addVersionCancel">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addVersionSubmission">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -85,6 +135,15 @@ export default {
|
||||||
"code": "email",
|
"code": "email",
|
||||||
"engineCode": "engine_custom_email",
|
"engineCode": "engine_custom_email",
|
||||||
"level": "data-field",
|
"level": "data-field",
|
||||||
|
},
|
||||||
|
// 新增版本
|
||||||
|
addVersionStatus: false,
|
||||||
|
engineVersionForm: {
|
||||||
|
"name": "", "code": "", "status": "0",
|
||||||
|
"versionCode": "",
|
||||||
|
"isActivate": "no-activate",
|
||||||
|
"description": "",
|
||||||
|
"codeIng": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -92,9 +151,29 @@ export default {
|
||||||
this.initRuleEngine();
|
this.initRuleEngine();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 生成规则版本
|
||||||
|
genEngineVersion(){
|
||||||
|
if (this.engineVersionForm.name == null || this.engineVersionForm.name === "") {
|
||||||
|
this.$message.error('规则名称不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.engineVersionForm.code == null || this.engineVersionForm.code === "") {
|
||||||
|
this.$message.error('规则CODE不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.engineVersionForm.versionCode = this.ruleEngineInfo.engineCode + "_" + this.engineVersionForm.code
|
||||||
|
},
|
||||||
|
// 确定新增
|
||||||
|
addVersionSubmission(){
|
||||||
|
|
||||||
|
},
|
||||||
|
// 取消新增
|
||||||
|
addVersionCancel(){
|
||||||
|
|
||||||
|
},
|
||||||
handleClick(clickType){
|
handleClick(clickType){
|
||||||
if (clickType === "add"){
|
if (clickType === "add"){
|
||||||
|
this.addVersionStatus = true;
|
||||||
}else if(clickType === "activate"){
|
}else if(clickType === "activate"){
|
||||||
this.ruleEngineInfo.isActivate = 'no-activate' === this.ruleEngineInfo.isActivate ? 'activated' : 'no-activate'
|
this.ruleEngineInfo.isActivate = 'no-activate' === this.ruleEngineInfo.isActivate ? 'activated' : 'no-activate'
|
||||||
this.$modal.msgSuccess("引擎激活状态修改成功");
|
this.$modal.msgSuccess("引擎激活状态修改成功");
|
||||||
|
|
Loading…
Reference in New Issue