feat(): 增加规则配置,代码展示
parent
a47d18f42a
commit
2ecedadd5c
|
@ -24,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane v-for="scope in scopeList" :label="scope.type" :name="scope.value">
|
<el-tab-pane v-for="scope in scopeList" :label="scope.type" :name="scope.value">
|
||||||
{{scope.type}}
|
<encoding v-model="scope.code"></encoding>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -35,8 +35,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import Encoding from "@/components/Encoding/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "EngineConfig",
|
name: "EngineConfig",
|
||||||
|
components: {Encoding},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
code: "",
|
code: "",
|
||||||
|
@ -44,10 +47,95 @@ export default {
|
||||||
packageName: "com.muyu.rule.engine",
|
packageName: "com.muyu.rule.engine",
|
||||||
},
|
},
|
||||||
scopeList: [
|
scopeList: [
|
||||||
{ type: "任务", value: "taskContext", },
|
{ type: "任务", value: "taskContext", "code":
|
||||||
{ type: "资产集", value: "recordContext", },
|
"package com.muyu;\n" +
|
||||||
{ type: "资产记录", value: "dataSetContext", },
|
"\n" +
|
||||||
{ type: "资产模型", value: "dataModelContext", }
|
"import com.muyu.scope.DataModelContext;\n" +
|
||||||
|
"import com.muyu.scope.DataSetContext;\n" +
|
||||||
|
"import com.muyu.scope.RecordContext;\n" +
|
||||||
|
"import com.muyu.scope.TaskContext;\n" +
|
||||||
|
"\n" +
|
||||||
|
"/**\n" +
|
||||||
|
" * @Author: DongZeLiang\n" +
|
||||||
|
" * @date: 2024/4/29\n" +
|
||||||
|
" * @Description: ceshi\n" +
|
||||||
|
" * @Version: 1.0\n" +
|
||||||
|
" */\n" +
|
||||||
|
"public class Main {\n" +
|
||||||
|
" public static void main (String[] args) {\n" +
|
||||||
|
" TaskContext taskContext = TaskContext.build();\n" +
|
||||||
|
" RecordContext recordContext = new RecordContext(taskContext);\n" +
|
||||||
|
" DataSetContext dataSetContext = new DataSetContext(recordContext);\n" +
|
||||||
|
" DataModelContext dataModelContext = new DataModelContext(dataSetContext);\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}"
|
||||||
|
},
|
||||||
|
{ type: "资产集", value: "recordContext", "code":
|
||||||
|
"package com.muyu;\n" +
|
||||||
|
"\n" +
|
||||||
|
"import com.muyu.scope.DataModelContext;\n" +
|
||||||
|
"import com.muyu.scope.DataSetContext;\n" +
|
||||||
|
"import com.muyu.scope.RecordContext;\n" +
|
||||||
|
"import com.muyu.scope.TaskContext;\n" +
|
||||||
|
"\n" +
|
||||||
|
"/**\n" +
|
||||||
|
" * @Author: DongZeLiang\n" +
|
||||||
|
" * @date: 2024/4/29\n" +
|
||||||
|
" * @Description: ceshi\n" +
|
||||||
|
" * @Version: 1.0\n" +
|
||||||
|
" */\n" +
|
||||||
|
"public class Main {\n" +
|
||||||
|
" public static void main (String[] args) {\n" +
|
||||||
|
" TaskContext taskContext = TaskContext.build();\n" +
|
||||||
|
" RecordContext recordContext = new RecordContext(taskContext);\n" +
|
||||||
|
" DataSetContext dataSetContext = new DataSetContext(recordContext);\n" +
|
||||||
|
" DataModelContext dataModelContext = new DataModelContext(dataSetContext);\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}" },
|
||||||
|
{ type: "资产记录", value: "dataSetContext", "code":
|
||||||
|
"package com.muyu;\n" +
|
||||||
|
"\n" +
|
||||||
|
"import com.muyu.scope.DataModelContext;\n" +
|
||||||
|
"import com.muyu.scope.DataSetContext;\n" +
|
||||||
|
"import com.muyu.scope.RecordContext;\n" +
|
||||||
|
"import com.muyu.scope.TaskContext;\n" +
|
||||||
|
"\n" +
|
||||||
|
"/**\n" +
|
||||||
|
" * @Author: DongZeLiang\n" +
|
||||||
|
" * @date: 2024/4/29\n" +
|
||||||
|
" * @Description: ceshi\n" +
|
||||||
|
" * @Version: 1.0\n" +
|
||||||
|
" */\n" +
|
||||||
|
"public class Main {\n" +
|
||||||
|
" public static void main (String[] args) {\n" +
|
||||||
|
" TaskContext taskContext = TaskContext.build();\n" +
|
||||||
|
" RecordContext recordContext = new RecordContext(taskContext);\n" +
|
||||||
|
" DataSetContext dataSetContext = new DataSetContext(recordContext);\n" +
|
||||||
|
" DataModelContext dataModelContext = new DataModelContext(dataSetContext);\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}" },
|
||||||
|
{ type: "资产模型", value: "dataModelContext", "code":
|
||||||
|
"package com.muyu;\n" +
|
||||||
|
"\n" +
|
||||||
|
"import com.muyu.scope.DataModelContext;\n" +
|
||||||
|
"import com.muyu.scope.DataSetContext;\n" +
|
||||||
|
"import com.muyu.scope.RecordContext;\n" +
|
||||||
|
"import com.muyu.scope.TaskContext;\n" +
|
||||||
|
"\n" +
|
||||||
|
"/**\n" +
|
||||||
|
" * @Author: DongZeLiang\n" +
|
||||||
|
" * @date: 2024/4/29\n" +
|
||||||
|
" * @Description: ceshi\n" +
|
||||||
|
" * @Version: 1.0\n" +
|
||||||
|
" */\n" +
|
||||||
|
"public class Main {\n" +
|
||||||
|
" public static void main (String[] args) {\n" +
|
||||||
|
" TaskContext taskContext = TaskContext.build();\n" +
|
||||||
|
" RecordContext recordContext = new RecordContext(taskContext);\n" +
|
||||||
|
" DataSetContext dataSetContext = new DataSetContext(recordContext);\n" +
|
||||||
|
" DataModelContext dataModelContext = new DataModelContext(dataSetContext);\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue