mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-01-19 03:52:50 +08:00
组件管理
This commit is contained in:
parent
d9beca5433
commit
84b4df338b
10
data/magic-api/api/后台/组件/group.json
Normal file
10
data/magic-api/api/后台/组件/group.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "组件",
|
||||
"type" : "1",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/component",
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
26
data/magic-api/api/后台/组件/保存.ms
Normal file
26
data/magic-api/api/后台/组件/保存.ms
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "7879aae4cb5f40969b7de3db0dc4307c",
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1646401456776,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"path" : "/save",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"wrap_request_parameter\",\"value\":\"data\",\"description\":\"包装请求参数到一个变量中\"}]",
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"wrap_request_parameter" : "data"
|
||||
}
|
||||
}
|
||||
================================
|
||||
return db.table("sys_component").primary("id").saveOrUpdate(data)
|
27
data/magic-api/api/后台/组件/列表.ms
Normal file
27
data/magic-api/api/后台/组件/列表.ms
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "56ed96789b1e4b649265da83a7b3b8b4",
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1646401619732,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"path" : "/list",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
return db.page("""
|
||||
select * from sys_component where 1=1
|
||||
?{name, and name like concat('%',#{name},'%')}
|
||||
""")
|
24
data/magic-api/api/后台/组件/删除.ms
Normal file
24
data/magic-api/api/后台/组件/删除.ms
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "529cbe774ebe4565b091a30e806a5085",
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1646401575406,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"path" : "/delete",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
return db.table("sys_component").logic().where().eq("id",id).delete()
|
192
data/magic-api/api/后台/组件/详情.ms
Normal file
192
data/magic-api/api/后台/组件/详情.ms
Normal file
@ -0,0 +1,192 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "59ce5de20a8b46599cb72c164a9500d1",
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "详情",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1646401567689,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"path" : "/get",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"id\": \"1\",\n \"name\": \"TestCode\",\n \"code\": \"\\r\\n <template>\\r\\n <div class=\\\"aaa\\\">\\r\\n {{ msg }}\\r\\n <el-button type=\\\"primary\\\" @click=\\\"$emit('xxClick')\\\">阿斯顿发</el-button>\\r\\n {{ props.aaaaaa }}\\r\\n </div>\\r\\n </template>\\r\\n\\r\\n <script setup>\\r\\n const msg = '11111'\\r\\n const props = defineProps({\\r\\n aaaaaa: String\\r\\n })\\r\\n </script>\\r\\n\\r\\n <style scoped>\\r\\n .aaa{\\r\\n font-size: 30px;\\r\\n color: red;\\r\\n }\\r\\n </style>\\r\\n\",\n \"isDel\": 0,\n \"createBy\": null,\n \"createDate\": null,\n \"updateBy\": null,\n \"updateDate\": null\n },\n \"timestamp\": 1646401557066,\n \"executeTime\": 45\n}",
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "code",
|
||||
"value" : "200",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "message",
|
||||
"value" : "success",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "data",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "id",
|
||||
"value" : "1",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "name",
|
||||
"value" : "TestCode",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "code",
|
||||
"value" : "\\r\\n <template>\\r\\n <div class=\\\"aaa\\\">\\r\\n {{ msg }}\\r\\n <el-button type=\\\"primary\\\" @click=\\\"$emit('xxClick')\\\">阿斯顿发</el-button>\\r\\n {{ props.aaaaaa }}\\r\\n </div>\\r\\n </template>\\r\\n\\r\\n <script setup>\\r\\n const msg = '11111'\\r\\n const props = defineProps({\\r\\n aaaaaa: String\\r\\n })\\r\\n </script>\\r\\n\\r\\n <style scoped>\\r\\n .aaa{\\r\\n font-size: 30px;\\r\\n color: red;\\r\\n }\\r\\n </style>\\r\\n",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "isDel",
|
||||
"value" : "0",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "createBy",
|
||||
"value" : "null",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "createDate",
|
||||
"value" : "null",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "updateBy",
|
||||
"value" : "null",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "updateDate",
|
||||
"value" : "null",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
}, {
|
||||
"name" : "timestamp",
|
||||
"value" : "1646401557066",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Long",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "executeTime",
|
||||
"value" : "45",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
return db.table("sys_component").where().eq("id",id).selectOne()
|
98
data/magic-api/api/后台/组件/选择组件.ms
Normal file
98
data/magic-api/api/后台/组件/选择组件.ms
Normal file
@ -0,0 +1,98 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "eb2b08bc7fe74036867e8dc5f2c0e8f8",
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "选择组件",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1646402724502,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"path" : "/select",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : "{\n \"code\": 1,\n \"message\": \"success\",\n \"data\": null,\n \"timestamp\": 1646402708142,\n \"executeTime\": 2\n}",
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ {
|
||||
"name" : "code",
|
||||
"value" : "1",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "message",
|
||||
"value" : "success",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "data",
|
||||
"value" : "null",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Object",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "timestamp",
|
||||
"value" : "1646402708142",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Long",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
}, {
|
||||
"name" : "executeTime",
|
||||
"value" : "2",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "Integer",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : "",
|
||||
"error" : "",
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
return db.select("""
|
||||
select id value,name label from sys_component where is_del = 0
|
||||
""")
|
Loading…
Reference in New Issue
Block a user