magic-boot/data/magic-api/api/系统管理/组件/列表.ms

139 lines
15 KiB
Plaintext
Raw Normal View History

2022-03-05 10:28:20 +08:00
{
"properties" : { },
"id" : "56ed96789b1e4b649265da83a7b3b8b4",
"script" : null,
"groupId" : "6f106ebdee21489db34b956f7770ff03",
"name" : "列表",
"createTime" : null,
2022-03-23 20:57:43 +08:00
"updateTime" : 1648017562433,
2022-03-05 10:28:20 +08:00
"lock" : "0",
"createBy" : null,
"updateBy" : null,
2022-03-05 10:28:20 +08:00
"path" : "/list",
"method" : "POST",
2022-03-05 10:28:20 +08:00
"parameters" : [ ],
"options" : [ ],
2022-03-05 10:28:20 +08:00
"requestBody" : "",
"headers" : [ ],
"paths" : [ ],
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [{\n \"name\": \"sys-dict-list\",\n \"code\": \"<template>\\n <div class=\\\"app-container\\\">\\n\\n <mb-search :where=\\\"tableOptions.where\\\" @search=\\\"reloadTable\\\" />\\n\\n <el-row class=\\\"toolbar-container\\\">\\n <el-button v-permission=\\\"'dict:save'\\\" class=\\\"filter-item\\\" type=\\\"primary\\\" icon=\\\"ElPlus\\\" @click=\\\"handleCreate\\\">\\n 添加1\\n </el-button>\\n </el-row>\\n\\n <mb-table ref=\\\"table\\\" v-bind=\\\"tableOptions\\\" />\\n\\n <mb-dialog ref=\\\"dictDialog\\\" :title=\\\"dialogTitle\\\" width=\\\"640px\\\" @confirm-click=\\\"save($event)\\\">\\n <template #content>\\n <el-form ref=\\\"dataForm\\\" :inline=\\\"true\\\" :rules=\\\"rules\\\" :model=\\\"temp\\\" label-position=\\\"right\\\" label-width=\\\"80px\\\">\\n <el-row :gutter=\\\"24\\\">\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"字典类型\\\" prop=\\\"dictType\\\">\\n <mb-select v-model=\\\"temp.dictType\\\" type=\\\"dict_type\\\" width=\\\"185px\\\" />\\n </el-form-item>\\n </el-col>\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"类型\\\" prop=\\\"type\\\">\\n <el-input v-model=\\\"temp.type\\\" />\\n </el-form-item>\\n </el-col>\\n </el-row>\\n <el-row :gutter=\\\"24\\\">\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"排序\\\" prop=\\\"sort\\\">\\n <el-input v-model=\\\"temp.sort\\\" />\\n </el-form-item>\\n </el-col>\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"描述\\\" prop=\\\"descRibe\\\">\\n <el-input v-model=\\\"temp.descRibe\\\" />\\n </el-form-item>\\n </el-col>\\n </el-row>\\n <el-row :gutter=\\\"24\\\">\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"备注\\\" prop=\\\"remarks\\\">\\n <el-input v-model=\\\"temp.remarks\\\" />\\n </el-form-item>\\n </el-col>\\n </el-row>\\n </el-form>\\n </template>\\n </mb-dialog>\\n\\n </div>\\n</template>\\n\\n<script setup>\\n\\nimport { ref, reactive, getCurrentInstance, nextTick } from 'vue'\\n\\nconst { proxy } = getCurrentInstance()\\n\\nconst tableOptions = reactive({\\n url: 'dict/list',\\n page: true,\\n where: {\\n type: {\\n type: 'input',\\n label: '类型',\\n value: ''\\n },\\n dictType: {\\n type: 'select',\\n label: '字典类型',\\n value: '',\\n properties: {\\n 'all-option': true,\\n type: 'dict_type'\\n }\\n }\\n },\\n cols: [\\n {\\n field: 'type',\\n label: '类型'\\n },\\n {\\n field: 'descRibe',\\n label: '描述'\\n },\\n {\\n field: 'dictType',\\n label: '字典类型',\\n width: 200,\\n dictType: 'dict_type'\\n },\\n {\\n field: 'remarks',\\n label: '备注',\\n width: 200\\n },\\n {\\n field: 'sort',\\n label: '排序',\\n width: 100\\n },\\n {\\n label: '操作',\\n type: 'btns',\\n width: 220,\\n fixed: 'right',\\n btns: [\\n {\\n permission: 'dict:save',\\n label: '修改',\\n type: 'text',\\n icon: 'ElEdit',\\n click: (row) => {\\n handleUpdate(row)\\n }\\n },\\n {\\n permission: 'dict:delete',\\n label: '删除',\\n type: 'text',\\n icon: 'ElDelete',\\n click: (row) => {\\n proxy.$common.handleDelete({\\n url: 'dict/delete',\\n id: row.id,\\n done: () => {\\n reloadTable()\\n proxy.$common.getDictData()\\n }\\n })\\n }\\n
2022-03-05 10:28:20 +08:00
"description" : null,
"requestBodyDefinition" : null,
"responseBodyDefinition" : {
"name" : "",
"value" : "",
"description" : "",
"required" : false,
"dataType" : "Object",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ {
"name" : "code",
2022-03-23 20:57:43 +08:00
"value" : "200",
"description" : "",
"required" : false,
"dataType" : "Integer",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "message",
2022-03-23 20:57:43 +08:00
"value" : "success",
"description" : "",
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "data",
2022-03-23 20:57:43 +08:00
"value" : "",
"description" : "",
"required" : false,
"dataType" : "Object",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
2022-03-23 20:57:43 +08:00
"children" : [ {
"name" : "",
"value" : "",
"description" : "",
"required" : false,
"dataType" : "Object",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ {
"name" : "name",
"value" : "sys-dict-list",
"description" : "",
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "code",
"value" : "<template>\\n <div class=\\\"app-container\\\">\\n\\n <mb-search :where=\\\"tableOptions.where\\\" @search=\\\"reloadTable\\\" />\\n\\n <el-row class=\\\"toolbar-container\\\">\\n <el-button v-permission=\\\"'dict:save'\\\" class=\\\"filter-item\\\" type=\\\"primary\\\" icon=\\\"ElPlus\\\" @click=\\\"handleCreate\\\">\\n 添加1\\n </el-button>\\n </el-row>\\n\\n <mb-table ref=\\\"table\\\" v-bind=\\\"tableOptions\\\" />\\n\\n <mb-dialog ref=\\\"dictDialog\\\" :title=\\\"dialogTitle\\\" width=\\\"640px\\\" @confirm-click=\\\"save($event)\\\">\\n <template #content>\\n <el-form ref=\\\"dataForm\\\" :inline=\\\"true\\\" :rules=\\\"rules\\\" :model=\\\"temp\\\" label-position=\\\"right\\\" label-width=\\\"80px\\\">\\n <el-row :gutter=\\\"24\\\">\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"字典类型\\\" prop=\\\"dictType\\\">\\n <mb-select v-model=\\\"temp.dictType\\\" type=\\\"dict_type\\\" width=\\\"185px\\\" />\\n </el-form-item>\\n </el-col>\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"类型\\\" prop=\\\"type\\\">\\n <el-input v-model=\\\"temp.type\\\" />\\n </el-form-item>\\n </el-col>\\n </el-row>\\n <el-row :gutter=\\\"24\\\">\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"排序\\\" prop=\\\"sort\\\">\\n <el-input v-model=\\\"temp.sort\\\" />\\n </el-form-item>\\n </el-col>\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"描述\\\" prop=\\\"descRibe\\\">\\n <el-input v-model=\\\"temp.descRibe\\\" />\\n </el-form-item>\\n </el-col>\\n </el-row>\\n <el-row :gutter=\\\"24\\\">\\n <el-col :span=\\\"12\\\">\\n <el-form-item label=\\\"备注\\\" prop=\\\"remarks\\\">\\n <el-input v-model=\\\"temp.remarks\\\" />\\n </el-form-item>\\n </el-col>\\n </el-row>\\n </el-form>\\n </template>\\n </mb-dialog>\\n\\n </div>\\n</template>\\n\\n<script setup>\\n\\nimport { ref, reactive, getCurrentInstance, nextTick } from 'vue'\\n\\nconst { proxy } = getCurrentInstance()\\n\\nconst tableOptions = reactive({\\n url: 'dict/list',\\n page: true,\\n where: {\\n type: {\\n type: 'input',\\n label: '类型',\\n value: ''\\n },\\n dictType: {\\n type: 'select',\\n label: '字典类型',\\n value: '',\\n properties: {\\n 'all-option': true,\\n type: 'dict_type'\\n }\\n }\\n },\\n cols: [\\n {\\n field: 'type',\\n label: '类型'\\n },\\n {\\n field: 'descRibe',\\n label: '描述'\\n },\\n {\\n field: 'dictType',\\n label: '字典类型',\\n width: 200,\\n dictType: 'dict_type'\\n },\\n {\\n field: 'remarks',\\n label: '备注',\\n width: 200\\n },\\n {\\n field: 'sort',\\n label: '排序',\\n width: 100\\n },\\n {\\n label: '操作',\\n type: 'btns',\\n width: 220,\\n fixed: 'right',\\n btns: [\\n {\\n permission: 'dict:save',\\n label: '修改',\\n type: 'text',\\n icon: 'ElEdit',\\n click: (row) => {\\n handleUpdate(row)\\n }\\n },\\n {\\n permission: 'dict:delete',\\n label: '删除',\\n type: 'text',\\n icon: 'ElDelete',\\n click: (row) => {\\n proxy.$common.handleDelete({\\n url: 'dict/delete',\\n id: row.id,\\n done: () => {\\n reloadTable()\\n proxy.$common.getDictData()\\n }\\n })\\n }\\n }\\n ]\\n }\\n ]\\n})\\n\\nconst dictId = ref('')\\nconst temp = ref(getTemp())\\nconst dialogTitle = ref('')\\n
2022-03-23 20:57:43 +08:00
"description" : "",
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
} ]
} ]
}, {
"name" : "timestamp",
2022-03-23 20:57:43 +08:00
"value" : "1648017503577",
"description" : "",
"required" : false,
"dataType" : "Long",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "executeTime",
2022-03-23 20:57:43 +08:00
"value" : "12",
"description" : "",
"required" : false,
"dataType" : "Object",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
} ]
}
2022-03-05 10:28:20 +08:00
}
================================
2022-03-23 20:57:43 +08:00
import org.ssssssss.magicapi.utils.PathUtils
import org.ssssssss.magicapi.core.service.MagicResourceService
2022-03-27 22:44:48 +08:00
return MagicResourceService.files('component').map(it => {
2022-03-23 20:57:43 +08:00
name: PathUtils.replaceSlash(String.format("%s-%s", MagicResourceService.getGroupPath(it.groupId), it.path)).replace('/', '-'),
code: it.script
2022-03-27 22:44:48 +08:00
})