ruoyi-muyu-ui/src/views/ruleEngine/engineConfig/index.vue

130 lines
3.9 KiB
Vue

<template>
<el-col :span="22" :offset="1">
<el-card>
<div slot="header" class="clearfix">
<span>公共配置</span>
</div>
<el-form ref="form" :model="ruleEngineCommonConfig" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="规则基础目录">
<el-input v-model="ruleEngineCommonConfig.packageName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
</el-col>
</el-row>
</el-form>
</el-card>
<el-col>
<el-card>
<div slot="header" class="clearfix">
<span>作用域</span>
</div>
<el-tabs type="border-card" v-model="codeCardStatus">
<el-tab-pane v-for="scope in scopeList" :label="scope.type" :name="scope.value">
<encoding v-if="codeCardStatus === scope.value" style="height: 800px" v-model="scope.code" :read-only="true"></encoding>
</el-tab-pane>
</el-tabs>
</el-card>
</el-col>
</el-col>
</template>
<script>
import Encoding from "@/components/Encoding/index.vue";
export default {
name: "EngineConfig",
components: {Encoding},
data() {
return {
codeCardStatus: "taskContext",
ruleEngineCommonConfig: {
packageName: "com.muyu.rule.engine",
},
scopeList: [
{ type: "任务", value: "taskContext", "code":
"package com.muyu.scope;\n" +
"\n" +
"/**\n" +
" * @Author: DongZeLiang\n" +
" * @date: 2024/4/29\n" +
" * @Description: 任务上下文\n" +
" * @Version: 1.0\n" +
" */\n" +
"public class TaskContext {\n" +
"\n" +
" public static TaskContext build(){\n" +
" return new TaskContext();\n" +
" }\n" +
"}\n"
},
{ type: "资产集", value: "recordContext", "code":
"package com.muyu.scope;\n" +
"\n" +
"/**\n" +
" * @Author: DongZeLiang\n" +
" * @date: 2024/4/29\n" +
" * @Description: 数据集\n" +
" * @Version: 1.0\n" +
" */\n" +
"public class DataSetContext {\n" +
"\n" +
" private final RecordContext recordContext;\n" +
"\n" +
" public DataSetContext (RecordContext recordContext) {\n" +
" this.recordContext = recordContext;\n" +
" }\n" +
"}\n" },
{ type: "资产记录", value: "dataSetContext", "code":
"package com.muyu.scope;\n" +
"\n" +
"/**\n" +
" * @Author: DongZeLiang\n" +
" * @date: 2024/4/29\n" +
" * @Description: 记录/资产模型\n" +
" * @Version: 1.0\n" +
" */\n" +
"public class RecordContext {\n" +
"\n" +
" private final TaskContext taskContext;\n" +
"\n" +
" public RecordContext (TaskContext taskContext) {\n" +
" this.taskContext = taskContext;\n" +
" }\n" +
"}\n" },
{ type: "资产模型", value: "dataModelContext", "code":
"package com.muyu.scope;\n" +
"\n" +
"/**\n" +
" * @Author: DongZeLiang\n" +
" * @date: 2024/4/29\n" +
" * @Description: 数据模型\n" +
" * @Version: 1.0\n" +
" */\n" +
"public class DataModelContext {\n" +
"\n" +
" private final DataSetContext dataSetContext;\n" +
"\n" +
" public DataModelContext (DataSetContext dataSetContext) {\n" +
" this.dataSetContext = dataSetContext;\n" +
" }\n" +
"}\n" }
]
}
},
created() {
},
methods: {}
}
</script>
<style>
.el-col {
margin-top: 20px;
}
</style>