feat(): 增加规则配置,代码展示
parent
a47d18f42a
commit
2ecedadd5c
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
<el-tabs type="border-card">
|
||||
<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-tabs>
|
||||
</el-card>
|
||||
|
@ -35,8 +35,11 @@
|
|||
|
||||
<script>
|
||||
|
||||
import Encoding from "@/components/Encoding/index.vue";
|
||||
|
||||
export default {
|
||||
name: "EngineConfig",
|
||||
components: {Encoding},
|
||||
data() {
|
||||
return {
|
||||
code: "",
|
||||
|
@ -44,10 +47,95 @@ export default {
|
|||
packageName: "com.muyu.rule.engine",
|
||||
},
|
||||
scopeList: [
|
||||
{ type: "任务", value: "taskContext", },
|
||||
{ type: "资产集", value: "recordContext", },
|
||||
{ type: "资产记录", value: "dataSetContext", },
|
||||
{ type: "资产模型", value: "dataModelContext", }
|
||||
{ type: "任务", value: "taskContext", "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: "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