fix:(规则引擎版本详细信息)

master
zhang xu 2024-05-09 21:55:55 +08:00
parent 654025f3c3
commit 66c793f06c
2 changed files with 64 additions and 91 deletions

View File

@ -58,3 +58,12 @@ export function delMaintenance(id) {
method: 'delete' method: 'delete'
}) })
} }
export function selectEngineVersionListByEngineId(id) {
return request({
url: '/ruleEngine/maintenance/selectEngineVersionListByEngineId/' + id,
method: 'get'
})
}

View File

@ -171,6 +171,7 @@
<el-descriptions-item label="是否激活"> <el-descriptions-item label="是否激活">
<dict-tag :options="dict.type.rule_engine_activate_status" :value="ruleEngineVersionInfoAndTest.isActivate"/> <dict-tag :options="dict.type.rule_engine_activate_status" :value="ruleEngineVersionInfoAndTest.isActivate"/>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="版本状态"> <el-descriptions-item label="版本状态">
<dict-tag :options="dict.type.rule_engine_version_status" :value="ruleEngineVersionInfoAndTest.status"/> <dict-tag :options="dict.type.rule_engine_version_status" :value="ruleEngineVersionInfoAndTest.status"/>
</el-descriptions-item> </el-descriptions-item>
@ -241,8 +242,8 @@
<script> <script>
import Encoding from "@/components/Encoding/index.vue"; import Encoding from "@/components/Encoding/index.vue";
import {getVersion, listVersion} from "@/api/ruleEngine/version"; import {selectEngineVersionListByEngineId} from "@/api/ruleEngine/maintenance";
import {getMaintenance} from "@/api/ruleEngine/maintenance"; import {addVersion, getVersion, listVersion} from "@/api/ruleEngine/version";
export default { export default {
name: "EngineVersion", name: "EngineVersion",
@ -307,6 +308,12 @@ export default {
databaseName: "chuanmei", databaseName: "chuanmei",
type: "dataSource" type: "dataSource"
}, },
{
name:"测试无",
systemName:"云计算系统",
databaseName:"dewfwf",
type:"dataSource"
},
], ],
// //
assetStructure: null, assetStructure: null,
@ -332,7 +339,14 @@ export default {
dataTotal: 6347, dataTotal: 6347,
type: "dataTable", type: "dataTable",
childrenList: [] childrenList: []
} },
{
name: "sys_version",
as:"公告通知",
dataTotal: 4654,
type:"dataTable",
childrenList: []
},
], ],
// //
assets: null, assets: null,
@ -404,6 +418,20 @@ export default {
isDict: "N", isDict: "N",
dictKey: "-", dictKey: "-",
}, },
{
id:"6",
name:"create_time",
comment:"创建时间",
isPrimaryKey: "N",
type:"datetime",
mappingType: "Date",
length:"-",
decimalPlaces: "-",
isNull: "Y",
defaultValue: "-",
isDict: "N",
dictKey: "-",
},
], ],
// //
dataMode: null, dataMode: null,
@ -421,7 +449,7 @@ export default {
created() { created() {
// this.initRuleEngine(); // this.initRuleEngine();
this.getListEngineMaintenance(); this.getListEngineMaintenance();
this.getListVersion()
}, },
methods: { methods: {
@ -450,6 +478,10 @@ export default {
case "info":// case "info"://
this.ruleEngineVersionInfoStatus = true; this.ruleEngineVersionInfoStatus = true;
this.ruleEngineVersionInfoAndTest = command.ruleEngineVersion; this.ruleEngineVersionInfoAndTest = command.ruleEngineVersion;
listVersion(this.ruleEngineInfo.ruleEngineVersionList).then(res=>{
console.log(res,'1230')
this.ruleEngineInfo.ruleEngineVersionList = res.data;
})
break; break;
case "test":// case "test"://
this.ruleEngineVersionTestStatus = true; this.ruleEngineVersionTestStatus = true;
@ -484,6 +516,13 @@ export default {
}, },
// //
addVersionSubmission(){ addVersionSubmission(){
addVersion(this.engineVersionForm).then(res=>{
if (res.code === 200){
this.$message.success('新增成功');
}else {
this.$message.error('新增失败');
}
})
this.ruleEngineInfo.ruleEngineVersionList.push({... this.engineVersionForm}) this.ruleEngineInfo.ruleEngineVersionList.push({... this.engineVersionForm})
this.addVersionStatus = false; this.addVersionStatus = false;
}, },
@ -507,102 +546,27 @@ export default {
}else if(clickType === "status"){ }else if(clickType === "status"){
this.ruleEngineInfo.status = '0' === this.ruleEngineInfo.status ? '1' : '0' this.ruleEngineInfo.status = '0' === this.ruleEngineInfo.status ? '1' : '0'
this.$modal.msgSuccess("引擎状态操作成功"); this.$modal.msgSuccess("引擎状态操作成功");
} }o
}, },
getListEngineMaintenance(){ getListEngineMaintenance(){
getMaintenance(this.ruleEngineId).then(res=>{ selectEngineVersionListByEngineId(this.ruleEngineId).then(res=>{
console.log(res,'1') console.log(res,'1')
this.ruleEngineInfo = res.data this.ruleEngineInfo = res.data
}) })
// //
}, },
getListVersion(){ // getListVersion(){
getVersion(this.ruleEngineId).then(res=>{ // getVersion(this.ruleEngineId).then(res=>{
console.log(res,'2') // console.log(res,'2')
this.ruleEngineInfo.ruleEngineVersionList = res.data // this.ruleEngineInfo.ruleEngineVersionList = res.data
}) // })
}, // },
// initRuleEngine(){ // initRuleEngine(){
// let response = { // listVersion({id: this.ruleEngineVersionInfoAndTest.id,codeText: this.ruleEngineVersionInfoAndTest.code}).then(res=>{
// "code": 200, // console.log(res,'1230')
// "msg": "", // this.ruleEngineVersionInfoAndTest.code = res.data.codeText;
// "data": { // })
// "id": 1,
// "name": "",
// "type": "rule-custom",
// "isActivate": "no-activate",
// "status": "0",
// "description": "<p></p>",
// "remark": "-",
// "code": "email",
// "engineCode": "engine_custom_email",
// "level": "data-field",
// "ruleEngineVersionList": [
// {
// "name": "163", "code": "IAW3S02", "status": "0", "isTest": "0",
// "versionCode": "engine_custom_email_IAW3S02", "isActivate": "no-activate",
// "description": "<p></p>","codeIng": "package com.muyu.rule.engine.custom;\n" +
// "\n" +
// "import com.muyu.engine.action.ActionDiscard;\n" +
// "import com.muyu.engine.scope.DataModelEngine;\n" +
// "\n" +
// "/**\n" +
// " * @Author: DongZeLiang\n" +
// " * @date: 2024/5/6\n" +
// " * @Description: ce-IAW3S02\n" +
// " * @Version: 1.0\n" +
// " */\n" +
// "public class engine_custom_email_IAW3S02 extends DataModelEngine {\n" +
// " @Override\n" +
// " public void execution () {\n" +
// " Object value = getValue();\n" +
// "\n" +
// " if (value == null || \"\".equals(value) || \"null\".equals(value)) {\n" +
// " throw new ActionDiscard();\n" +
// " }\n" +
// " }\n" +
// "}"
// },
// {
// "name": "", "code": "JISID8S", "status": "2", "isTest": "1",
// "versionCode": "engine_custom_email_JISID8S", "isActivate": "activated",
// "description": "<p></p>","codeIng": "package com.muyu.rule.engine.custom;\n" +
// "\n" +
// "import com.muyu.engine.action.ActionDiscard;\n" +
// "import com.muyu.engine.scope.DataModelEngine;\n" +
// "\n" +
// "/**\n" +
// " * @Author: DongZeLiang\n" +
// " * @date: 2024/5/6\n" +
// " * @Description: ce-JISID8S\n" +
// " * @Version: 1.0\n" +
// " */\n" +
// "public class engine_custom_email_JISID8S extends DataModelEngine {\n" +
// " @Override\n" +
// " public void execution () {\n" +
// " Object value = getValue();\n" +
// "\n" +
// " if (value == null || \"\".equals(value) || \"null\".equals(value)) {\n" +
// " throw new ActionDiscard();\n" +
// " }\n" +
// " }\n" +
// "}"
// },
// {
// "name": "", "code": "DJ8S9EA", "status": "2", "isTest": "2",
// "versionCode": "engine_custom_email_DJ8S9EA", "isActivate": "no-activate",
// "description": "<p></p>"
// },
// {
// "name": "", "code": "XJS9E0S", "status": "1", "isTest": "0",
// "versionCode": "engine_custom_email_XJS9E0S", "isActivate": "no-activate",
// "description": "<p></p>"
// }
// ]
// }
// }
// this.ruleEngineInfo = response.data
// }, // },
// //
getCodeIng(){ getCodeIng(){