
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for magic_backup_record_v2
-- ----------------------------
DROP TABLE IF EXISTS `magic_backup_record_v2`;
CREATE TABLE `magic_backup_record_v2`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '原对象ID',
  `create_date` bigint NOT NULL COMMENT '备份时间',
  `tag` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签',
  `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '原名称',
  `content` blob NULL COMMENT '备份内容',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作人',
  PRIMARY KEY (`id`, `create_date`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of magic_backup_record_v2
-- ----------------------------

-- ----------------------------
-- Table structure for sys_configure
-- ----------------------------
DROP TABLE IF EXISTS `sys_configure`;
CREATE TABLE `sys_configure`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `configure_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据值',
  `configure_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '键值',
  `configure_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `configure_condition` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条件筛选',
  `configure_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '配置类型',
  `configure_desc_ribe` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置说明',
  `is_del` int NULL DEFAULT 0 COMMENT '删除标识：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remarks` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '配置中心' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_configure
-- ----------------------------
INSERT INTO `sys_configure` VALUES ('5646fe2ba5674a5e89e74fcd65e8c42d', '1xx', 'super-password', '通用密码', NULL, '1', '万能登录密码，所有用户都能进行登录', 0, '1', '2022-05-21 12:41:51', '1', '2022-05-21 13:55:36', NULL);
INSERT INTO `sys_configure` VALUES ('a2cac5d9036b41ecaed4496b2f40085c', 'false', 'verification-code.enable', '是否验证“验证码”', '', '0', '1、开发模式下验证码可以不用输入，即可登录', 0, '1', '2022-05-21 11:29:24', '1', '2023-04-02 21:20:08', NULL);

-- ----------------------------
-- Table structure for sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `desc_ribe` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
  `dict_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典类型：0系统类，1业务类',
  `type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
  `is_del` int NULL DEFAULT 0 COMMENT '删除标识：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remarks` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_dict
-- ----------------------------
INSERT INTO `sys_dict` VALUES ('0da16e6dbc904a8dbcc3e3b15b0fdb11', '性别', '1', 'sex', 0, '1', '2022-03-28 21:57:05', NULL, NULL, NULL);
INSERT INTO `sys_dict` VALUES ('3c393981-9ddd-40b2-8c19-85f0a9d9a98f', '组织机构类型', '0', 'office_type', 0, '1', '2021-04-22 21:30:30', '1', '2022-02-05 15:33:09', '');
INSERT INTO `sys_dict` VALUES ('ae9a2cd400264ff6bdc2f00b62d6e911', '字典类型', '0', 'dict_type', 0, NULL, NULL, '1', '2021-04-30 22:17:24', '');
INSERT INTO `sys_dict` VALUES ('ae9a2cd400264ff6bdc2f00b62d6e941', '是否登录', '0', 'is_login', 0, NULL, NULL, '1', '2021-04-30 22:14:58', '');

-- ----------------------------
-- Table structure for sys_dict_items
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_items`;
CREATE TABLE `sys_dict_items`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '值',
  `label` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标签',
  `dict_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'sys_dict表id',
  `sort` int NOT NULL DEFAULT 0 COMMENT '排序',
  `is_del` int NULL DEFAULT 0 COMMENT '删除标识：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remarks` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典项表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_dict_items
-- ----------------------------
INSERT INTO `sys_dict_items` VALUES ('0f91de6e8406d59762bebe5d2dfc9d36', '0', '不禁用', 'ae9a2cd400264ff6bdc2f00b62d6e941', 20, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_items` VALUES ('3e6e9e8fade54e9b9cdbee3fb3c69f11', '1', '男', '0da16e6dbc904a8dbcc3e3b15b0fdb11', 10, 0, '1', '2022-03-28 21:57:14', NULL, NULL, NULL);
INSERT INTO `sys_dict_items` VALUES ('457517be-5245-4d98-b9fa-8b6753a9cfc6', '2', '公司', '3c393981-9ddd-40b2-8c19-85f0a9d9a98f', 10, 0, '1', '2021-04-22 21:31:25', '1', '2022-02-05 15:36:15', '');
INSERT INTO `sys_dict_items` VALUES ('b928f5b1-07bd-4f09-9142-897c767c5303', '1', '部门', '3c393981-9ddd-40b2-8c19-85f0a9d9a98f', 0, 0, '1', '2021-04-22 21:31:18', '1', '2022-02-05 15:36:22', '');
INSERT INTO `sys_dict_items` VALUES ('c5cf8715a74537156ea29c8bbc622b05', '1', '禁用', 'ae9a2cd400264ff6bdc2f00b62d6e941', 0, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_items` VALUES ('c988b28d659d40fc93535947f28977d9', '0', '女', '0da16e6dbc904a8dbcc3e3b15b0fdb11', 20, 0, '1', '2022-03-28 21:57:19', NULL, NULL, NULL);
INSERT INTO `sys_dict_items` VALUES ('f764ba6a05ad4a9dad96bdc0995b83e3', 'test', 'test', 'ae9a2cd400264ff6bdc2f00b62d6e911', 10, 0, '1', '2023-04-04 10:11:16', NULL, NULL, NULL);
INSERT INTO `sys_dict_items` VALUES ('ze9a2cd400264ff6bdc2f00b62d6e910', '1', '业务类', 'ae9a2cd400264ff6bdc2f00b62d6e911', 0, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_items` VALUES ('ze9a2cd400264ff6bdc2f00b62d6e911', '0', '系统类', 'ae9a2cd400264ff6bdc2f00b62d6e911', 0, 0, NULL, NULL, NULL, NULL, NULL);

-- ----------------------------
-- Table structure for sys_dynamic_component
-- ----------------------------
DROP TABLE IF EXISTS `sys_dynamic_component`;
CREATE TABLE `sys_dynamic_component`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `pid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父级ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `source_code` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '源码',
  `compile_js` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '编译js',
  `compile_css` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '编译css',
  `type` int NULL DEFAULT NULL COMMENT '0：分组，1：vue组件',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  `is_del` int NULL DEFAULT 0 COMMENT '删除标识：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '动态组件表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_dynamic_component
-- ----------------------------
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('0', NULL, '根节点', NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('28e3f82164de4bbf98a342c2a94da076', 'd17f4964dc664a4bafbd7af6a7e0596d', 'dict-list', '<template>\n    <div class=\"mb-list\">\n        <div class=\"mb-search\">\n            <mb-search :where=\"tableOptions.where\" @search=\"reloadTable\"/>\n        </div>\n        <div class=\"mb-toolbar\">\n            <n-space>\n                <n-button :size=\"$global.uiSize.value\" v-permission=\"\'dict:save\'\" type=\"primary\" @click=\"handleCreate\">\n                    <mb-icon icon=\"AddOutline\" />\n                    添加字典\n                </n-button>\n            </n-space>\n        </div>\n        <div class=\"mb-table\">\n            <mb-table ref=\"table\" v-bind=\"tableOptions\"/>\n        </div>\n\n        <mb-modal :size=\"$global.uiSize.value\" ref=\"dictDialog\" :title=\"dialogTitle\" width=\"600px\" @confirm=\"save($event)\">\n            <n-form :size=\"$global.uiSize.value\" ref=\"dataForm\" :rules=\"rules\" :model=\"temp\" label-placement=\"left\" label-width=\"80px\">\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"字典类型\" path=\"dictType\">\n                            <mb-select v-model=\"temp.dictType\" type=\"dict_type\"/>\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"类型\" path=\"type\">\n                            <n-input v-model:value=\"temp.type\"/>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"描述\" path=\"descRibe\">\n                            <n-input v-model:value=\"temp.descRibe\"/>\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"备注\" path=\"remarks\">\n                            <n-input v-model:value=\"temp.remarks\"/>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n            </n-form>\n        </mb-modal>\n\n        <mb-modal ref=\"dictItemsDialog\" title=\"字典项\" width=\"1400px\" :show-footer=\"false\">\n            <dict-items v-model:dict-id=\"dictId\"/>\n        </mb-modal>\n\n    </div>\n</template>\n\n<script setup>\n\nimport {ref, reactive, nextTick} from \'vue\'\nimport {useDictStore} from \"@/store/modules/dictStore\";\n\nconst dictStore = useDictStore()\n\nconst tableOptions = reactive({\n    id: \'dict-list\',\n    url: \'/system/dict/list\',\n    page: true,\n    where: {\n        type: {\n            label: \'类型\'\n        },\n        dictType: {\n            component: \'select\',\n            label: \'字典类型\',\n            props: {\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: \'createDate\',\n            label: \'创建时间\'\n        },\n        {\n            field: \'remarks\',\n            label: \'备注\',\n            width: 200\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 220,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'dict:save\',\n                    label: \'修改\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'dict:delete\',\n                    label: \'删除\',\n                    link: true,\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/dict/delete\',\n                            id: row.id,\n                            done: () => {\n                                reloadTable()\n                                dictStore.getDictData()\n                            }\n                        })\n                    }\n                },\n                {\n                    permission: \'dict:items:view\',\n                    label: \'字典项\',\n                    link: true,\n                    click: (row) => {\n                        dictItemsDialog.value.show()\n                        dictId.value = row.id\n                    }\n                }\n            ]\n        }\n    ]\n})\n\nconst dictId = ref(\'\')\nconst temp = ref(getTemp())\nconst dialogTitle = ref(\'\')\nconst rules = reactive({\n    dictType: {required: true, message: \'请选择字典类型\', trigger: \'change\'},\n    type: {required: true, message: \'请输入类型\', trigger: \'change\'},\n    descRibe: {required: true, message: \'请输入描述\', trigger: \'change\'}\n})\nconst table = ref()\nconst dictDialog = ref()\nconst dataForm = ref()\nconst dictItemsDialog = ref()\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        dictType: \'\',\n        type: \'\',\n        descRibe: \'\',\n        remarks: \'\'\n    }\n}\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nfunction handleCreate() {\n    temp.value = getTemp()\n    dialogTitle.value = \'添加\'\n    dictDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            $common.post(\'/system/dict/save\', temp.value).then((response) => {\n                d.hideLoading()\n                temp.value.id = response.data\n                dictDialog.value.hide()\n                $message.success(dialogTitle.value + \'成功\')\n                reloadTable()\n                dictStore.getDictData()\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction handleUpdate(row) {\n    $common.objAssign(temp.value, row)\n    dialogTitle.value = \'修改\'\n    dictDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n</script>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"useDictStore\": \"setup-maybe-ref\",\n  \"dictStore\": \"setup-maybe-ref\",\n  \"tableOptions\": \"setup-reactive-const\",\n  \"dictId\": \"setup-ref\",\n  \"temp\": \"setup-ref\",\n  \"dialogTitle\": \"setup-ref\",\n  \"rules\": \"setup-reactive-const\",\n  \"table\": \"setup-ref\",\n  \"dictDialog\": \"setup-ref\",\n  \"dataForm\": \"setup-ref\",\n  \"dictItemsDialog\": \"setup-ref\",\n  \"getTemp\": \"setup-const\",\n  \"reloadTable\": \"setup-const\",\n  \"handleCreate\": \"setup-const\",\n  \"save\": \"setup-const\",\n  \"handleUpdate\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _resolveDirective = ___magic__import__(\'vue\', \'resolveDirective\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _withDirectives = ___magic__import__(\'vue\', \'withDirectives\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\n\nconst _hoisted_1 = { class: \"mb-list\" }\nconst _hoisted_2 = { class: \"mb-search\" }\nconst _hoisted_3 = { class: \"mb-toolbar\" }\nconst _hoisted_4 = { class: \"mb-table\" }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\nconst useDictStore = ___magic__import__(\'@/store/modules/dictStore\', \'useDictStore\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\n\nconst dictStore = useDictStore()\n\nconst tableOptions = reactive({\n    id: \'dict-list\',\n    url: \'/system/dict/list\',\n    page: true,\n    where: {\n        type: {\n            label: \'类型\'\n        },\n        dictType: {\n            component: \'select\',\n            label: \'字典类型\',\n            props: {\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: \'createDate\',\n            label: \'创建时间\'\n        },\n        {\n            field: \'remarks\',\n            label: \'备注\',\n            width: 200\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 220,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'dict:save\',\n                    label: \'修改\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'dict:delete\',\n                    label: \'删除\',\n                    link: true,\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/dict/delete\',\n                            id: row.id,\n                            done: () => {\n                                reloadTable()\n                                dictStore.getDictData()\n                            }\n                        })\n                    }\n                },\n                {\n                    permission: \'dict:items:view\',\n                    label: \'字典项\',\n                    link: true,\n                    click: (row) => {\n                        dictItemsDialog.value.show()\n                        dictId.value = row.id\n                    }\n                }\n            ]\n        }\n    ]\n})\n\nconst dictId = ref(\'\')\nconst temp = ref(getTemp())\nconst dialogTitle = ref(\'\')\nconst rules = reactive({\n    dictType: {required: true, message: \'请选择字典类型\', trigger: \'change\'},\n    type: {required: true, message: \'请输入类型\', trigger: \'change\'},\n    descRibe: {required: true, message: \'请输入描述\', trigger: \'change\'}\n})\nconst table = ref()\nconst dictDialog = ref()\nconst dataForm = ref()\nconst dictItemsDialog = ref()\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        dictType: \'\',\n        type: \'\',\n        descRibe: \'\',\n        remarks: \'\'\n    }\n}\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nfunction handleCreate() {\n    temp.value = getTemp()\n    dialogTitle.value = \'添加\'\n    dictDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            $common.post(\'/system/dict/save\', temp.value).then((response) => {\n                d.hideLoading()\n                temp.value.id = response.data\n                dictDialog.value.hide()\n                $message.success(dialogTitle.value + \'成功\')\n                reloadTable()\n                dictStore.getDictData()\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction handleUpdate(row) {\n    $common.objAssign(temp.value, row)\n    dialogTitle.value = \'修改\'\n    dictDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n\nreturn (_ctx, _cache) => {\n  const _component_mb_search = _resolveComponent(\"mb-search\")\n  const _component_mb_icon = _resolveComponent(\"mb-icon\")\n  const _component_n_button = _resolveComponent(\"n-button\")\n  const _component_n_space = _resolveComponent(\"n-space\")\n  const _component_mb_table = _resolveComponent(\"mb-table\")\n  const _component_mb_select = _resolveComponent(\"mb-select\")\n  const _component_n_form_item = _resolveComponent(\"n-form-item\")\n  const _component_n_gi = _resolveComponent(\"n-gi\")\n  const _component_n_input = _resolveComponent(\"n-input\")\n  const _component_n_grid = _resolveComponent(\"n-grid\")\n  const _component_n_form = _resolveComponent(\"n-form\")\n  const _component_mb_modal = _resolveComponent(\"mb-modal\")\n  const _component_dict_items = _resolveComponent(\"dict-items\")\n  const _directive_permission = _resolveDirective(\"permission\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_mb_search, {\n        where: tableOptions.where,\n        onSearch: reloadTable\n      }, null, 8 /* PROPS */, [\"where\"])\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createVNode(_component_n_space, null, {\n        default: _withCtx(() => [\n          _withDirectives((_openBlock(), _createBlock(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            type: \"primary\",\n            onClick: handleCreate\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_icon, { icon: \"AddOutline\" }),\n              _createTextVNode(\" 添加字典 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])), [\n            [_directive_permission, \'dict:save\']\n          ])\n        ]),\n        _: 1 /* STABLE */\n      })\n    ]),\n    _createElementVNode(\"div\", _hoisted_4, [\n      _createVNode(_component_mb_table, _mergeProps({\n        ref_key: \"table\",\n        ref: table\n      }, tableOptions), null, 16 /* FULL_PROPS */)\n    ]),\n    _createVNode(_component_mb_modal, {\n      size: _ctx.$global.uiSize.value,\n      ref_key: \"dictDialog\",\n      ref: dictDialog,\n      title: dialogTitle.value,\n      width: \"600px\",\n      onConfirm: _cache[4] || (_cache[4] = $event => (save($event)))\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_n_form, {\n          size: _ctx.$global.uiSize.value,\n          ref_key: \"dataForm\",\n          ref: dataForm,\n          rules: rules,\n          model: temp.value,\n          \"label-placement\": \"left\",\n          \"label-width\": \"80px\"\n        }, {\n          default: _withCtx(() => [\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"字典类型\",\n                      path: \"dictType\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_mb_select, {\n                          modelValue: temp.value.dictType,\n                          \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => ((temp.value.dictType) = $event)),\n                          type: \"dict_type\"\n                        }, null, 8 /* PROPS */, [\"modelValue\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"类型\",\n                      path: \"type\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.type,\n                          \"onUpdate:value\": _cache[1] || (_cache[1] = $event => ((temp.value.type) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"描述\",\n                      path: \"descRibe\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.descRibe,\n                          \"onUpdate:value\": _cache[2] || (_cache[2] = $event => ((temp.value.descRibe) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"备注\",\n                      path: \"remarks\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.remarks,\n                          \"onUpdate:value\": _cache[3] || (_cache[3] = $event => ((temp.value.remarks) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            })\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"size\", \"rules\", \"model\"])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"size\", \"title\"]),\n    _createVNode(_component_mb_modal, {\n      ref_key: \"dictItemsDialog\",\n      ref: dictItemsDialog,\n      title: \"字典项\",\n      width: \"1400px\",\n      \"show-footer\": false\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_dict_items, {\n          \"dict-id\": dictId.value,\n          \"onUpdate:dictId\": _cache[5] || (_cache[5] = $event => ((dictId).value = $event))\n        }, null, 8 /* PROPS */, [\"dict-id\"])\n      ]),\n      _: 1 /* STABLE */\n    }, 512 /* NEED_PATCH */)\n  ]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 10:57:10', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('29d82244-d928-11ee-9675-c2b02ed3977b', '0', 'system', NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('63227c407c5d40f98df2486390a6f841', 'fc19e04fa384462d9948c18092f30287', 'menu-list', '<template>\n    <div class=\"mb-list\">\n        <div class=\"mb-search\">\n            <n-space>\n                <n-input v-model:value=\"searchValue\" :size=\"$global.uiSize.value\" @keyup.enter=\"searchMenu\" placeholder=\"菜单名称、链接、权限标识、关联组件\"\n                         style=\"width: 270px\"></n-input>\n                <n-button type=\"primary\" :size=\"$global.uiSize.value\" @click=\"searchMenu\">\n                    <mb-icon icon=\"Search\" />\n                    搜索\n                </n-button>\n                <n-button :size=\"$global.uiSize.value\" @click=\"() => { searchValue = \'\'; searchMenu() }\">\n                    <mb-icon icon=\"TrashOutline\" />\n                    清空\n                </n-button>\n            </n-space>\n        </div>\n        <div class=\"mb-toolbar\">\n            <n-space>\n                <n-button :size=\"$global.uiSize.value\" type=\"primary\" @click=\"addSubMenu(\'0\')\" v-permission=\"\'menu:save\'\">\n                    <mb-icon icon=\"AddOutline\" />\n                    添加菜单\n                </n-button>\n                <n-button :size=\"$global.uiSize.value\" type=\"primary\" @click=\"() => table.toggleExpand()\">\n                    <mb-icon icon=\"ArrowDownOutline\" />\n                    展开/折叠\n                </n-button>\n            </n-space>\n        </div>\n        <div class=\"mb-table\">\n            <mb-table ref=\"table\" v-bind=\"tableOptions\"/>\n        </div>\n        <mb-modal ref=\"menuFormDialog\" width=\"650px\" :title=\"dialogTitle\" @confirm=\"menuFormRef.save($event)\">\n            <menu-form ref=\"menuFormRef\" :menu-tree=\"menuTree\" :menu-data=\"menuData\" @reload-table=\"reloadTable\"/>\n        </mb-modal>\n    </div>\n</template>\n\n<script setup>\n\nimport {ref, reactive, onMounted, nextTick, watch, h} from \'vue\'\nimport MbIcon from \'@/components/magic/basic/mb-icon.vue\';\nimport { isEmpty } from \'lodash-es\'\n\n\nlet menuTree = ref([])\nconst menuData = ref([])\nlet searchValue = ref(\'\')\nconst table = ref()\nconst tableOptions = reactive({\n    id: \'menu-list\',\n    virtualScroll: true,\n    loading: false,\n    showNo: false,\n    page: false,\n    cols: [\n        {\n            field: \'name\',\n            label: \'菜单名称\',\n            type: \'html\'\n        },\n        {\n            field: \'url\',\n            label: \'路径\',\n            type: \'html\'\n        },\n        {\n            field: \'permission\',\n            label: \'权限标识\',\n            width: 150,\n            type: \'html\'\n        },\n        {\n            field: \'componentName\',\n            label: \'关联组件\',\n            width: 150,\n            type: \'html\'\n        },\n        {\n            field: \'icon\',\n            label: \'图标\',\n            render(row) {\n                if (row.icon) {\n                    return h(MbIcon, { icon: row.icon })\n                }\n            }\n        },\n        {\n            field: \'sort\',\n            label: \'序号\',\n        },\n        {\n            label: \'排序\',\n            type: \'buttons\',\n            width: 180,\n            buttons: [\n                {\n                    label: \'上移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/menu/sort/up\', {\n                            id: row.id,\n                            pid: row.pid,\n                            sort: row.sort\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                },\n                {\n                    label: \'下移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/menu/sort/down\', {\n                            id: row.id,\n                            pid: row.pid,\n                            sort: row.sort\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                }\n            ]\n        },\n        {\n            field: \'isShow\',\n            label: \'是否显示\',\n            type: \'switch\',\n            width: 100,\n            change: (row) => {\n                $common.get(\'/system/menu/change\', {\n                    id: row.id,\n                    isShow: row.isShow\n                })\n            }\n        },\n        {\n            field: \'keepAlive\',\n            label: \'是否缓存\',\n            type: \'switch\',\n            width: 100,\n            if: (row) => {\n                if (row.isShow == 0) {\n                    return false\n                }\n                if (!isEmpty(row.children) && row.children.some(it => it.isShow == 1)) {\n                    return false\n                }\n                return row.url ? true : false\n            },\n            change: (row) => {\n                $common.get(\'/system/menu/change\', {\n                    id: row.id,\n                    keepAlive: row.keepAlive\n                })\n            }\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 280,\n            fixed: \'right\',\n            align: \'left\',\n            buttons: [\n                {\n                    label: \'添加下级菜单\',\n                    link: true,\n                    permission: \'menu:save\',\n                    click: (row) => {\n                        addSubMenu(row.id)\n                    }\n                },\n                {\n                    label: \'修改\',\n                    link: true,\n                    permission: \'menu:save\',\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    label: \'删除\',\n                    link: true,\n                    permission: \'menu:delete\',\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/menu/delete\',\n                            id: row.id,\n                            done: () => reloadTable()\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst dialogTitle = ref(\'\')\nconst menuFormDialog = ref()\nconst menuFormRef = ref()\n\nfunction reloadTable() {\n    tableOptions.loading = true\n    $common.get(\'/system/menu/tree\').then(res => {\n        menuData.value = res.data.list\n        tableOptions.data = menuData.value\n        tableOptions.loading = false\n    })\n}\n\nfunction searchMenu() {\n    table.value.expand()\n    if (searchValue.value) {\n        tableOptions.data = $treeTable.recursionSearch([\'name\', \'url\', \'permission\', \'componentName\'], $common.copyNew(menuData.value), searchValue.value)\n    } else {\n        tableOptions.data = menuData.value\n    }\n}\n\nfunction addSubMenu(id) {\n    dialogTitle.value = \'添加\'\n    menuFormDialog.value.show()\n    nextTick(() => {\n        menuFormRef.value.addSubMenu(id)\n    })\n}\n\nfunction handleUpdate(row) {\n    dialogTitle.value = \'修改\'\n    menuFormDialog.value.show()\n    nextTick(() => {\n        menuFormRef.value.getInfo(row);\n    })\n}\n\nonMounted(() => reloadTable())\n\nwatch(menuData, () => {\n    menuTree.value = [{\n        label: \'根节点\',\n        key: \'0\',\n        children: $treeTable.genTree(menuData.value)\n    }]\n})\n\n</script>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"onMounted\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"watch\": \"setup-const\",\n  \"h\": \"setup-const\",\n  \"MbIcon\": \"setup-const\",\n  \"isEmpty\": \"setup-maybe-ref\",\n  \"menuTree\": \"setup-let\",\n  \"menuData\": \"setup-ref\",\n  \"searchValue\": \"setup-let\",\n  \"table\": \"setup-ref\",\n  \"tableOptions\": \"setup-reactive-const\",\n  \"dialogTitle\": \"setup-ref\",\n  \"menuFormDialog\": \"setup-ref\",\n  \"menuFormRef\": \"setup-ref\",\n  \"reloadTable\": \"setup-const\",\n  \"searchMenu\": \"setup-const\",\n  \"addSubMenu\": \"setup-const\",\n  \"handleUpdate\": \"setup-const\"\n} */\nconst _unref = ___magic__import__(\'vue\', \'unref\');\r\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _isRef = ___magic__import__(\'vue\', \'isRef\');\r\nconst _withKeys = ___magic__import__(\'vue\', \'withKeys\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _resolveDirective = ___magic__import__(\'vue\', \'resolveDirective\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _withDirectives = ___magic__import__(\'vue\', \'withDirectives\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\n\nconst _hoisted_1 = { class: \"mb-list\" }\nconst _hoisted_2 = { class: \"mb-search\" }\nconst _hoisted_3 = { class: \"mb-toolbar\" }\nconst _hoisted_4 = { class: \"mb-table\" }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst onMounted = ___magic__import__(\'vue\', \'onMounted\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\r\nconst watch = ___magic__import__(\'vue\', \'watch\');\r\nconst h = ___magic__import__(\'vue\', \'h\');\nconst MbIcon = ___magic__import__(\'@/components/magic/basic/mb-icon.vue\', \'*\');\nconst isEmpty = ___magic__import__(\'lodash-es\', \'isEmpty\');\n\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\n\nlet menuTree = ref([])\nconst menuData = ref([])\nlet searchValue = ref(\'\')\nconst table = ref()\nconst tableOptions = reactive({\n    id: \'menu-list\',\n    virtualScroll: true,\n    loading: false,\n    showNo: false,\n    page: false,\n    cols: [\n        {\n            field: \'name\',\n            label: \'菜单名称\',\n            type: \'html\'\n        },\n        {\n            field: \'url\',\n            label: \'路径\',\n            type: \'html\'\n        },\n        {\n            field: \'permission\',\n            label: \'权限标识\',\n            width: 150,\n            type: \'html\'\n        },\n        {\n            field: \'componentName\',\n            label: \'关联组件\',\n            width: 150,\n            type: \'html\'\n        },\n        {\n            field: \'icon\',\n            label: \'图标\',\n            render(row) {\n                if (row.icon) {\n                    return h(MbIcon, { icon: row.icon })\n                }\n            }\n        },\n        {\n            field: \'sort\',\n            label: \'序号\',\n        },\n        {\n            label: \'排序\',\n            type: \'buttons\',\n            width: 180,\n            buttons: [\n                {\n                    label: \'上移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/menu/sort/up\', {\n                            id: row.id,\n                            pid: row.pid,\n                            sort: row.sort\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                },\n                {\n                    label: \'下移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/menu/sort/down\', {\n                            id: row.id,\n                            pid: row.pid,\n                            sort: row.sort\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                }\n            ]\n        },\n        {\n            field: \'isShow\',\n            label: \'是否显示\',\n            type: \'switch\',\n            width: 100,\n            change: (row) => {\n                $common.get(\'/system/menu/change\', {\n                    id: row.id,\n                    isShow: row.isShow\n                })\n            }\n        },\n        {\n            field: \'keepAlive\',\n            label: \'是否缓存\',\n            type: \'switch\',\n            width: 100,\n            if: (row) => {\n                if (row.isShow == 0) {\n                    return false\n                }\n                if (!isEmpty(row.children) && row.children.some(it => it.isShow == 1)) {\n                    return false\n                }\n                return row.url ? true : false\n            },\n            change: (row) => {\n                $common.get(\'/system/menu/change\', {\n                    id: row.id,\n                    keepAlive: row.keepAlive\n                })\n            }\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 280,\n            fixed: \'right\',\n            align: \'left\',\n            buttons: [\n                {\n                    label: \'添加下级菜单\',\n                    link: true,\n                    permission: \'menu:save\',\n                    click: (row) => {\n                        addSubMenu(row.id)\n                    }\n                },\n                {\n                    label: \'修改\',\n                    link: true,\n                    permission: \'menu:save\',\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    label: \'删除\',\n                    link: true,\n                    permission: \'menu:delete\',\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/menu/delete\',\n                            id: row.id,\n                            done: () => reloadTable()\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst dialogTitle = ref(\'\')\nconst menuFormDialog = ref()\nconst menuFormRef = ref()\n\nfunction reloadTable() {\n    tableOptions.loading = true\n    $common.get(\'/system/menu/tree\').then(res => {\n        menuData.value = res.data.list\n        tableOptions.data = menuData.value\n        tableOptions.loading = false\n    })\n}\n\nfunction searchMenu() {\n    table.value.expand()\n    if (searchValue.value) {\n        tableOptions.data = $treeTable.recursionSearch([\'name\', \'url\', \'permission\', \'componentName\'], $common.copyNew(menuData.value), searchValue.value)\n    } else {\n        tableOptions.data = menuData.value\n    }\n}\n\nfunction addSubMenu(id) {\n    dialogTitle.value = \'添加\'\n    menuFormDialog.value.show()\n    nextTick(() => {\n        menuFormRef.value.addSubMenu(id)\n    })\n}\n\nfunction handleUpdate(row) {\n    dialogTitle.value = \'修改\'\n    menuFormDialog.value.show()\n    nextTick(() => {\n        menuFormRef.value.getInfo(row);\n    })\n}\n\nonMounted(() => reloadTable())\n\nwatch(menuData, () => {\n    menuTree.value = [{\n        label: \'根节点\',\n        key: \'0\',\n        children: $treeTable.genTree(menuData.value)\n    }]\n})\n\n\nreturn (_ctx, _cache) => {\n  const _component_n_input = _resolveComponent(\"n-input\")\n  const _component_n_button = _resolveComponent(\"n-button\")\n  const _component_n_space = _resolveComponent(\"n-space\")\n  const _component_mb_table = _resolveComponent(\"mb-table\")\n  const _component_menu_form = _resolveComponent(\"menu-form\")\n  const _component_mb_modal = _resolveComponent(\"mb-modal\")\n  const _directive_permission = _resolveDirective(\"permission\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_n_space, null, {\n        default: _withCtx(() => [\n          _createVNode(_component_n_input, {\n            value: _unref(searchValue),\n            \"onUpdate:value\": _cache[0] || (_cache[0] = $event => (_isRef(searchValue) ? (searchValue).value = $event : searchValue = $event)),\n            size: _ctx.$global.uiSize.value,\n            onKeyup: _withKeys(searchMenu, [\"enter\"]),\n            placeholder: \"菜单名称、链接、权限标识、关联组件\",\n            style: {\"width\":\"270px\"}\n          }, null, 8 /* PROPS */, [\"value\", \"size\"]),\n          _createVNode(_component_n_button, {\n            type: \"primary\",\n            size: _ctx.$global.uiSize.value,\n            onClick: searchMenu\n          }, {\n            default: _withCtx(() => [\n              _createVNode(MbIcon, { icon: \"Search\" }),\n              _createTextVNode(\" 搜索 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"]),\n          _createVNode(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            onClick: _cache[1] || (_cache[1] = () => { _isRef(searchValue) ? searchValue.value = \'\' : searchValue = \'\'; searchMenu() })\n          }, {\n            default: _withCtx(() => [\n              _createVNode(MbIcon, { icon: \"TrashOutline\" }),\n              _createTextVNode(\" 清空 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])\n        ]),\n        _: 1 /* STABLE */\n      })\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createVNode(_component_n_space, null, {\n        default: _withCtx(() => [\n          _withDirectives((_openBlock(), _createBlock(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            type: \"primary\",\n            onClick: _cache[2] || (_cache[2] = $event => (addSubMenu(\'0\')))\n          }, {\n            default: _withCtx(() => [\n              _createVNode(MbIcon, { icon: \"AddOutline\" }),\n              _createTextVNode(\" 添加菜单 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])), [\n            [_directive_permission, \'menu:save\']\n          ]),\n          _createVNode(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            type: \"primary\",\n            onClick: _cache[3] || (_cache[3] = () => table.value.toggleExpand())\n          }, {\n            default: _withCtx(() => [\n              _createVNode(MbIcon, { icon: \"ArrowDownOutline\" }),\n              _createTextVNode(\" 展开/折叠 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])\n        ]),\n        _: 1 /* STABLE */\n      })\n    ]),\n    _createElementVNode(\"div\", _hoisted_4, [\n      _createVNode(_component_mb_table, _mergeProps({\n        ref_key: \"table\",\n        ref: table\n      }, tableOptions), null, 16 /* FULL_PROPS */)\n    ]),\n    _createVNode(_component_mb_modal, {\n      ref_key: \"menuFormDialog\",\n      ref: menuFormDialog,\n      width: \"650px\",\n      title: dialogTitle.value,\n      onConfirm: _cache[4] || (_cache[4] = $event => (menuFormRef.value.save($event)))\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_menu_form, {\n          ref_key: \"menuFormRef\",\n          ref: menuFormRef,\n          \"menu-tree\": _unref(menuTree),\n          \"menu-data\": menuData.value,\n          onReloadTable: reloadTable\n        }, null, 8 /* PROPS */, [\"menu-tree\", \"menu-data\"])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"title\"])\n  ]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 13:39:14', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('88c17402-d92a-11ee-9675-c2b02ed3977b', '29d82244-d928-11ee-9675-c2b02ed3977b', 'monitor', NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('8c426b7d397b4ffeb4c9f89b4c318fbb', '9c302653077d47dc9374ba48b9fda579', 'role-list', '<style scoped>\n:deep(.n-form-item .n-form-item-blank) {\n    display: table;\n}\n</style>\n\n<template>\n    <div class=\"mb-list\">\n        <div class=\"mb-search\">\n            <mb-search :where=\"tableOptions.where\" @search=\"reloadTable\"/>\n        </div>\n        <div class=\"mb-toolbar\">\n            <n-button :size=\"$global.uiSize.value\"  v-permission=\"\'role:save\'\" type=\"primary\" @click=\"handleCreate\">\n                <mb-icon icon=\"AddOutline\" />\n                添加角色\n            </n-button>\n        </div>\n        <div class=\"mb-table\">\n            <mb-table ref=\"table\" v-bind=\"tableOptions\"/>\n        </div>\n        <mb-modal :size=\"$global.uiSize.value\" ref=\"roleFormDialog\" :title=\"dialogTitle\" width=\"900px\" @confirm=\"save($event)\">\n            <n-form :size=\"$global.uiSize.value\" ref=\"dataForm\" :rules=\"rules\" label-placement=\"left\" :model=\"temp\" label-width=\"80px\">\n                <n-grid :cols=\"24\" :x-gap=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"角色名称\" path=\"name\">\n                            <n-input v-model:value=\"temp.name\"/>\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"角色编码\" path=\"code\">\n                            <n-input v-model:value=\"temp.code\"/>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"24\">\n                        <n-form-item label=\"角色描述\" path=\"descRibe\">\n                            <n-input\n                                type=\"textarea\"\n                                :rows=\"4\"\n                                placeholder=\"请输入描述\"\n                                v-model:value=\"temp.descRibe\">\n                            </n-input>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"菜单权限\" path=\"menus\">\n                            <mb-tree\n                                ref=\"tree\"\n                                v-model=\"temp.menus\"\n                                style=\"height: 270px; overflow: auto\"\n                                url=\"/system/menu/tree\"\n                                checkable\n                                search\n                            />\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"数据权限\" path=\"permission\">\n                            <mb-select v-model=\"temp.permission\" :options=\"permissionData\" style=\"margin-bottom: 5px\"/>\n                            <mb-tree\n                                v-if=\"temp.permission == 1\"\n                                style=\"height: 270px; overflow: auto;\"\n                                ref=\"office\"\n                                checkable\n                                url=\"/system/office/tree\"\n                                v-model=\"temp.offices\"\n                            />\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n            </n-form>\n        </mb-modal>\n\n        <mb-modal ref=\"assignPermissionsDialog\" title=\"分配权限\" width=\"550px\"\n                  @confirm=\"assignPermissions.save($event)\">\n            <role-assign-permissions ref=\"assignPermissions\" :key=\"temp.id\" :id=\"temp.id\"\n                                     @close=\"() => { assignPermissionsDialog.hide(); temp.id = \'\' }\"/>\n        </mb-modal>\n\n    </div>\n</template>\n\n<script setup>\n\nimport {ref, reactive, watch, nextTick} from \'vue\'\nimport {push} from \'@/scripts/router\'\n\nconst permissionData = reactive([{\n    label: \'全部\',\n    value: \'0\'\n}, {\n    label: \'自定义\',\n    value: \'1\'\n}, {\n    label: \'本级及子级\',\n    value: \'2\'\n}, {\n    label: \'本级\',\n    value: \'3\'\n}])\nconst assignPermissions = ref()\nconst assignPermissionsDialog = ref()\nconst table = ref()\nconst roleFormDialog = ref()\nconst dataForm = ref()\nconst tableOptions = reactive({\n    id: \'role-list\',\n    url: \'/system/role/list\',\n    where: {\n        name: {\n            label: \'角色名称\'\n        }\n    },\n    cols: [\n        {\n            field: \'name\',\n            label: \'角色名称\'\n        },\n        {\n            field: \'code\',\n            label: \'角色编码\'\n        },\n        {\n            field: \'descRibe\',\n            label: \'角色描述\'\n        },\n        {\n            field: \'permission\',\n            label: \'数据权限\',\n            render: (row) => {\n                return permissionData[row.permission].label\n            }\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 300,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'role:save\',\n                    label: \'修改\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'role:delete\',\n                    label: \'删除\',\n                    link: true,\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/role/delete\',\n                            id: row.id,\n                            done: () => reloadTable()\n                        })\n                    }\n                },\n                {\n                    permission: \'role:permission\',\n                    label: \'权限\',\n                    link: true,\n                    click: (row) => {\n                        temp.value.id = row.id\n                        assignPermissionsDialog.value.show()\n                    }\n                },\n                {\n                    permission: \'role:user:list\',\n                    label: \'用户列表\',\n                    link: true,\n                    click: (row) => {\n                        push({\n                            path: \'/system/user/user-list\',\n                            query: {roleId: row.id}\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst dialogTitle = ref(\'\')\nconst temp = ref(getTemp())\nconst rules = reactive({\n    name: {required: true, message: \'请输入角色名称\', trigger: \'change\'},\n    code: {required: true, message: \'请输入角色编码\', trigger: \'change\'}\n})\n\nwatch(() => temp.value.permission, () => {\n    if (temp.value.permission != 1) {\n        temp.value.offices = \'\'\n    }\n})\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        name: \'\',\n        menus: \'\',\n        offices: \'\',\n        permission: \'0\',\n        code: \'\',\n        descRibe: \'\'\n    }\n}\n\nfunction resetTemp() {\n    temp.value = getTemp()\n}\n\nfunction handleCreate() {\n    resetTemp()\n    dialogTitle.value = \'添加\'\n    roleFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            $common.post(\'/system/role/save\', temp.value).then(() => {\n                d.hideLoading()\n                reloadTable()\n                roleFormDialog.value.hide()\n                $message.success(dialogTitle.value + \'成功\')\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction handleUpdate(row) {\n    for (let t in temp.value) {\n        temp.value[t] = row[t]\n    }\n    $common.get(\'/system/menu/by/role\', {roleId: row.id}).then(res => {\n        temp.value.menus = res.data.join(\',\')\n    })\n    $common.get(\'/system/office/by/role\', {roleId: row.id}).then(res => {\n        temp.value.offices = res.data.join(\',\')\n    })\n    dialogTitle.value = \'修改\'\n    roleFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n</script>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"watch\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"push\": \"setup-maybe-ref\",\n  \"permissionData\": \"setup-reactive-const\",\n  \"assignPermissions\": \"setup-ref\",\n  \"assignPermissionsDialog\": \"setup-ref\",\n  \"table\": \"setup-ref\",\n  \"roleFormDialog\": \"setup-ref\",\n  \"dataForm\": \"setup-ref\",\n  \"tableOptions\": \"setup-reactive-const\",\n  \"dialogTitle\": \"setup-ref\",\n  \"temp\": \"setup-ref\",\n  \"rules\": \"setup-reactive-const\",\n  \"reloadTable\": \"setup-const\",\n  \"getTemp\": \"setup-const\",\n  \"resetTemp\": \"setup-const\",\n  \"handleCreate\": \"setup-const\",\n  \"save\": \"setup-const\",\n  \"handleUpdate\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _resolveDirective = ___magic__import__(\'vue\', \'resolveDirective\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _withDirectives = ___magic__import__(\'vue\', \'withDirectives\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _createCommentVNode = ___magic__import__(\'vue\', \'createCommentVNode\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\r\nconst _pushScopeId = ___magic__import__(\'vue\', \'pushScopeId\');\r\nconst _popScopeId = ___magic__import__(\'vue\', \'popScopeId\');\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-bWItc2Zj\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mb-list\" }\nconst _hoisted_2 = { class: \"mb-search\" }\nconst _hoisted_3 = { class: \"mb-toolbar\" }\nconst _hoisted_4 = { class: \"mb-table\" }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst watch = ___magic__import__(\'vue\', \'watch\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\nconst push = ___magic__import__(\'@/scripts/router\', \'push\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\n\nconst permissionData = reactive([{\n    label: \'全部\',\n    value: \'0\'\n}, {\n    label: \'自定义\',\n    value: \'1\'\n}, {\n    label: \'本级及子级\',\n    value: \'2\'\n}, {\n    label: \'本级\',\n    value: \'3\'\n}])\nconst assignPermissions = ref()\nconst assignPermissionsDialog = ref()\nconst table = ref()\nconst roleFormDialog = ref()\nconst dataForm = ref()\nconst tableOptions = reactive({\n    id: \'role-list\',\n    url: \'/system/role/list\',\n    where: {\n        name: {\n            label: \'角色名称\'\n        }\n    },\n    cols: [\n        {\n            field: \'name\',\n            label: \'角色名称\'\n        },\n        {\n            field: \'code\',\n            label: \'角色编码\'\n        },\n        {\n            field: \'descRibe\',\n            label: \'角色描述\'\n        },\n        {\n            field: \'permission\',\n            label: \'数据权限\',\n            render: (row) => {\n                return permissionData[row.permission].label\n            }\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 300,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'role:save\',\n                    label: \'修改\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'role:delete\',\n                    label: \'删除\',\n                    link: true,\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/role/delete\',\n                            id: row.id,\n                            done: () => reloadTable()\n                        })\n                    }\n                },\n                {\n                    permission: \'role:permission\',\n                    label: \'权限\',\n                    link: true,\n                    click: (row) => {\n                        temp.value.id = row.id\n                        assignPermissionsDialog.value.show()\n                    }\n                },\n                {\n                    permission: \'role:user:list\',\n                    label: \'用户列表\',\n                    link: true,\n                    click: (row) => {\n                        push({\n                            path: \'/system/user/user-list\',\n                            query: {roleId: row.id}\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst dialogTitle = ref(\'\')\nconst temp = ref(getTemp())\nconst rules = reactive({\n    name: {required: true, message: \'请输入角色名称\', trigger: \'change\'},\n    code: {required: true, message: \'请输入角色编码\', trigger: \'change\'}\n})\n\nwatch(() => temp.value.permission, () => {\n    if (temp.value.permission != 1) {\n        temp.value.offices = \'\'\n    }\n})\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        name: \'\',\n        menus: \'\',\n        offices: \'\',\n        permission: \'0\',\n        code: \'\',\n        descRibe: \'\'\n    }\n}\n\nfunction resetTemp() {\n    temp.value = getTemp()\n}\n\nfunction handleCreate() {\n    resetTemp()\n    dialogTitle.value = \'添加\'\n    roleFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            $common.post(\'/system/role/save\', temp.value).then(() => {\n                d.hideLoading()\n                reloadTable()\n                roleFormDialog.value.hide()\n                $message.success(dialogTitle.value + \'成功\')\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction handleUpdate(row) {\n    for (let t in temp.value) {\n        temp.value[t] = row[t]\n    }\n    $common.get(\'/system/menu/by/role\', {roleId: row.id}).then(res => {\n        temp.value.menus = res.data.join(\',\')\n    })\n    $common.get(\'/system/office/by/role\', {roleId: row.id}).then(res => {\n        temp.value.offices = res.data.join(\',\')\n    })\n    dialogTitle.value = \'修改\'\n    roleFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n\nreturn (_ctx, _cache) => {\n  const _component_mb_search = _resolveComponent(\"mb-search\")\n  const _component_mb_icon = _resolveComponent(\"mb-icon\")\n  const _component_n_button = _resolveComponent(\"n-button\")\n  const _component_mb_table = _resolveComponent(\"mb-table\")\n  const _component_n_input = _resolveComponent(\"n-input\")\n  const _component_n_form_item = _resolveComponent(\"n-form-item\")\n  const _component_n_gi = _resolveComponent(\"n-gi\")\n  const _component_n_grid = _resolveComponent(\"n-grid\")\n  const _component_mb_tree = _resolveComponent(\"mb-tree\")\n  const _component_mb_select = _resolveComponent(\"mb-select\")\n  const _component_n_form = _resolveComponent(\"n-form\")\n  const _component_mb_modal = _resolveComponent(\"mb-modal\")\n  const _component_role_assign_permissions = _resolveComponent(\"role-assign-permissions\")\n  const _directive_permission = _resolveDirective(\"permission\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_mb_search, {\n        where: tableOptions.where,\n        onSearch: reloadTable\n      }, null, 8 /* PROPS */, [\"where\"])\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _withDirectives((_openBlock(), _createBlock(_component_n_button, {\n        size: _ctx.$global.uiSize.value,\n        type: \"primary\",\n        onClick: handleCreate\n      }, {\n        default: _withCtx(() => [\n          _createVNode(_component_mb_icon, { icon: \"AddOutline\" }),\n          _createTextVNode(\" 添加角色 \")\n        ]),\n        _: 1 /* STABLE */\n      }, 8 /* PROPS */, [\"size\"])), [\n        [_directive_permission, \'role:save\']\n      ])\n    ]),\n    _createElementVNode(\"div\", _hoisted_4, [\n      _createVNode(_component_mb_table, _mergeProps({\n        ref_key: \"table\",\n        ref: table\n      }, tableOptions), null, 16 /* FULL_PROPS */)\n    ]),\n    _createVNode(_component_mb_modal, {\n      size: _ctx.$global.uiSize.value,\n      ref_key: \"roleFormDialog\",\n      ref: roleFormDialog,\n      title: dialogTitle.value,\n      width: \"900px\",\n      onConfirm: _cache[6] || (_cache[6] = $event => (save($event)))\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_n_form, {\n          size: _ctx.$global.uiSize.value,\n          ref_key: \"dataForm\",\n          ref: dataForm,\n          rules: rules,\n          \"label-placement\": \"left\",\n          model: temp.value,\n          \"label-width\": \"80px\"\n        }, {\n          default: _withCtx(() => [\n            _createVNode(_component_n_grid, {\n              cols: 24,\n              \"x-gap\": 24\n            }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"角色名称\",\n                      path: \"name\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.name,\n                          \"onUpdate:value\": _cache[0] || (_cache[0] = $event => ((temp.value.name) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"角色编码\",\n                      path: \"code\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.code,\n                          \"onUpdate:value\": _cache[1] || (_cache[1] = $event => ((temp.value.code) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 24 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"角色描述\",\n                      path: \"descRibe\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          type: \"textarea\",\n                          rows: 4,\n                          placeholder: \"请输入描述\",\n                          value: temp.value.descRibe,\n                          \"onUpdate:value\": _cache[2] || (_cache[2] = $event => ((temp.value.descRibe) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"菜单权限\",\n                      path: \"menus\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_mb_tree, {\n                          ref: \"tree\",\n                          modelValue: temp.value.menus,\n                          \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => ((temp.value.menus) = $event)),\n                          style: {\"height\":\"270px\",\"overflow\":\"auto\"},\n                          url: \"/system/menu/tree\",\n                          checkable: \"\",\n                          search: \"\"\n                        }, null, 8 /* PROPS */, [\"modelValue\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"数据权限\",\n                      path: \"permission\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_mb_select, {\n                          modelValue: temp.value.permission,\n                          \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => ((temp.value.permission) = $event)),\n                          options: permissionData,\n                          style: {\"margin-bottom\":\"5px\"}\n                        }, null, 8 /* PROPS */, [\"modelValue\", \"options\"]),\n                        (temp.value.permission == 1)\n                          ? (_openBlock(), _createBlock(_component_mb_tree, {\n                              key: 0,\n                              style: {\"height\":\"270px\",\"overflow\":\"auto\"},\n                              ref: \"office\",\n                              checkable: \"\",\n                              url: \"/system/office/tree\",\n                              modelValue: temp.value.offices,\n                              \"onUpdate:modelValue\": _cache[5] || (_cache[5] = $event => ((temp.value.offices) = $event))\n                            }, null, 8 /* PROPS */, [\"modelValue\"]))\n                          : _createCommentVNode(\"v-if\", true)\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            })\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"size\", \"rules\", \"model\"])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"size\", \"title\"]),\n    _createVNode(_component_mb_modal, {\n      ref_key: \"assignPermissionsDialog\",\n      ref: assignPermissionsDialog,\n      title: \"分配权限\",\n      width: \"550px\",\n      onConfirm: _cache[8] || (_cache[8] = $event => (assignPermissions.value.save($event)))\n    }, {\n      default: _withCtx(() => [\n        (_openBlock(), _createBlock(_component_role_assign_permissions, {\n          ref_key: \"assignPermissions\",\n          ref: assignPermissions,\n          key: temp.value.id,\n          id: temp.value.id,\n          onClose: _cache[7] || (_cache[7] = () => { assignPermissionsDialog.value.hide(); temp.value.id = \'\' })\n        }, null, 8 /* PROPS */, [\"id\"]))\n      ]),\n      _: 1 /* STABLE */\n    }, 512 /* NEED_PATCH */)\n  ]))\n}\n}\n\n}\n__sfc__.__scopeId = \"data-v-bWItc2Zj\"\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '[data-v-bWItc2Zj] .n-form-item .n-form-item-blank {\n    display: table;\n}', 1, NULL, 0, '1', '2024-03-07 13:56:55', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('9809888c-d92a-11ee-9675-c2b02ed3977b', '88c17402-d92a-11ee-9675-c2b02ed3977b', 'login-log', '<template>\n    <div class=\"mb-list\">\n        <div class=\"mb-search\">\n            <mb-search :where=\"tableOptions.where\" @search=\"reloadTable\"/>\n        </div>\n        <div class=\"mb-table\">\n            <mb-table ref=\"table\" v-bind=\"tableOptions\"/>\n        </div>\n    </div>\n</template>\n\n<script setup>\nimport {ref, reactive, h} from \'vue\'\n\nconst table = ref()\nconst tableOptions = reactive({\n    id: \'login-log\',\n    url: \'/system/log/login/list\',\n    where: {\n        createDate: {\n            component: \'date\',\n            label: \'创建时间\',\n            props: {\n                type: \'datetimerange\'\n            }\n        }\n    },\n    cols: [\n        {\n            field: \'username\',\n            label: \'登录名\'\n        },\n        {\n            field: \'failPassword\',\n            label: \'失败密码\'\n        },\n        {\n            field: \'type\',\n            label: \'登录状态\',\n            width: \'100px\',\n            render: (row) => {\n                return row.type == \'成功\' ? h(\'b\', {style: {color: \'#409EFF\'}}, {default: () => \'成功\'}) : h(\'b\', {style: {color: \'red\'}}, {default: () => \'失败\'})\n            }\n        },\n        {\n            field: \'address\',\n            label: \'登录地址\'\n        },\n        {\n            field: \'ip\',\n            label: \'ip\',\n            width: \'150px\'\n        },\n        {\n            field: \'browser\',\n            label: \'浏览器\'\n        },\n        {\n            field: \'os\',\n            label: \'系统\',\n            props: {\n                \"show-overflow-tooltip\": true\n            }\n        },\n        {\n            field: \'createDate\',\n            label: \'操作时间\',\n            width: \'180px\'\n        }\n    ]\n})\n\nfunction reloadTable() {\n    table.value.reload()\n}\n</script>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"h\": \"setup-const\",\n  \"table\": \"setup-ref\",\n  \"tableOptions\": \"setup-reactive-const\",\n  \"reloadTable\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\n\nconst _hoisted_1 = { class: \"mb-list\" }\nconst _hoisted_2 = { class: \"mb-search\" }\nconst _hoisted_3 = { class: \"mb-table\" }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst h = ___magic__import__(\'vue\', \'h\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\nconst table = ref()\nconst tableOptions = reactive({\n    id: \'login-log\',\n    url: \'/system/log/login/list\',\n    where: {\n        createDate: {\n            component: \'date\',\n            label: \'创建时间\',\n            props: {\n                type: \'datetimerange\'\n            }\n        }\n    },\n    cols: [\n        {\n            field: \'username\',\n            label: \'登录名\'\n        },\n        {\n            field: \'failPassword\',\n            label: \'失败密码\'\n        },\n        {\n            field: \'type\',\n            label: \'登录状态\',\n            width: \'100px\',\n            render: (row) => {\n                return row.type == \'成功\' ? h(\'b\', {style: {color: \'#409EFF\'}}, {default: () => \'成功\'}) : h(\'b\', {style: {color: \'red\'}}, {default: () => \'失败\'})\n            }\n        },\n        {\n            field: \'address\',\n            label: \'登录地址\'\n        },\n        {\n            field: \'ip\',\n            label: \'ip\',\n            width: \'150px\'\n        },\n        {\n            field: \'browser\',\n            label: \'浏览器\'\n        },\n        {\n            field: \'os\',\n            label: \'系统\',\n            props: {\n                \"show-overflow-tooltip\": true\n            }\n        },\n        {\n            field: \'createDate\',\n            label: \'操作时间\',\n            width: \'180px\'\n        }\n    ]\n})\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nreturn (_ctx, _cache) => {\n  const _component_mb_search = _resolveComponent(\"mb-search\")\n  const _component_mb_table = _resolveComponent(\"mb-table\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_mb_search, {\n        where: tableOptions.where,\n        onSearch: reloadTable\n      }, null, 8 /* PROPS */, [\"where\"])\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createVNode(_component_mb_table, _mergeProps({\n        ref_key: \"table\",\n        ref: table\n      }, tableOptions), null, 16 /* FULL_PROPS */)\n    ])\n  ]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, NULL, NULL, NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('9c302653077d47dc9374ba48b9fda579', '29d82244-d928-11ee-9675-c2b02ed3977b', 'role', NULL, NULL, NULL, 0, NULL, 0, '1', '2024-03-07 13:56:50', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('a3bdf806e89b4a5a9d9436b012d57ce9', '88c17402-d92a-11ee-9675-c2b02ed3977b', 'oper-log', '<template>\n    <div class=\"mb-list\">\n        <div class=\"mb-search\">\n            <mb-search :where=\"tableOptions.where\" @search=\"reloadTable\">\n                <template #buttons>\n                    <n-button type=\"primary\" @click=\"table.exportExcel({fileName: \'操作日志\'})\">\n                        <mb-icon icon=\"DownloadOutline\" />\n                        导出\n                    </n-button>\n                </template>\n            </mb-search>\n        </div>\n        <div class=\"mb-table\">\n            <mb-table ref=\"table\" v-bind=\"tableOptions\"/>\n        </div>\n    </div>\n</template>\n\n<script setup>\nimport {ref, reactive} from \'vue\'\n\nconst table = ref()\nconst tableOptions = reactive({\n    id: \'oper-log\',\n    url: \'/system/log/oper/list\',\n    where: {\n        userIp: {\n            label: \'IP\'\n        },\n        username: {\n            label: \'操作人\'\n        },\n        apiName: {\n            label: \'接口名\'\n        },\n        apiPath: {\n            label: \'路径\'\n        },\n        costTime: {\n            component: \'input\',\n            props: {\n                pair: true,\n                separator: \'-\'\n            },\n            label: \'耗时区间\'\n        },\n        createDate: {\n            component: \'date\',\n            label: \'创建时间\',\n            props: {\n                type: \'datetimerange\'\n            }\n        }\n    },\n    cols: [\n        {\n            field: \'apiName\',\n            label: \'接口名\'\n        },\n        {\n            field: \'apiPath\',\n            label: \'路径\'\n        },\n        {\n            field: \'apiMethod\',\n            label: \'方法\',\n            width: \'100px\'\n        },\n        {\n            field: \'userIp\',\n            label: \'ip\',\n            width: \'150px\'\n        },\n        {\n            field: \'costTime\',\n            label: \'耗时\',\n            width: \'100px\'\n        },\n        {\n            field: \'userAgent\',\n            label: \'用户代理\',\n            props: {\n                \"show-overflow-tooltip\": true\n            }\n        },\n        {\n            field: \'username\',\n            label: \'操作人\',\n            width: \'150px\'\n        },\n        {\n            field: \'createDate\',\n            label: \'操作时间\',\n            width: \'180px\'\n        }\n    ]\n})\n\nfunction reloadTable() {\n    table.value.reload()\n}\n</script>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"table\": \"setup-ref\",\n  \"tableOptions\": \"setup-reactive-const\",\n  \"reloadTable\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\n\nconst _hoisted_1 = { class: \"mb-list\" }\nconst _hoisted_2 = { class: \"mb-search\" }\nconst _hoisted_3 = { class: \"mb-table\" }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\nconst table = ref()\nconst tableOptions = reactive({\n    id: \'oper-log\',\n    url: \'/system/log/oper/list\',\n    where: {\n        userIp: {\n            label: \'IP\'\n        },\n        username: {\n            label: \'操作人\'\n        },\n        apiName: {\n            label: \'接口名\'\n        },\n        apiPath: {\n            label: \'路径\'\n        },\n        costTime: {\n            component: \'input\',\n            props: {\n                pair: true,\n                separator: \'-\'\n            },\n            label: \'耗时区间\'\n        },\n        createDate: {\n            component: \'date\',\n            label: \'创建时间\',\n            props: {\n                type: \'datetimerange\'\n            }\n        }\n    },\n    cols: [\n        {\n            field: \'apiName\',\n            label: \'接口名\'\n        },\n        {\n            field: \'apiPath\',\n            label: \'路径\'\n        },\n        {\n            field: \'apiMethod\',\n            label: \'方法\',\n            width: \'100px\'\n        },\n        {\n            field: \'userIp\',\n            label: \'ip\',\n            width: \'150px\'\n        },\n        {\n            field: \'costTime\',\n            label: \'耗时\',\n            width: \'100px\'\n        },\n        {\n            field: \'userAgent\',\n            label: \'用户代理\',\n            props: {\n                \"show-overflow-tooltip\": true\n            }\n        },\n        {\n            field: \'username\',\n            label: \'操作人\',\n            width: \'150px\'\n        },\n        {\n            field: \'createDate\',\n            label: \'操作时间\',\n            width: \'180px\'\n        }\n    ]\n})\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nreturn (_ctx, _cache) => {\n  const _component_mb_icon = _resolveComponent(\"mb-icon\")\n  const _component_n_button = _resolveComponent(\"n-button\")\n  const _component_mb_search = _resolveComponent(\"mb-search\")\n  const _component_mb_table = _resolveComponent(\"mb-table\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_mb_search, {\n        where: tableOptions.where,\n        onSearch: reloadTable\n      }, {\n        buttons: _withCtx(() => [\n          _createVNode(_component_n_button, {\n            type: \"primary\",\n            onClick: _cache[0] || (_cache[0] = $event => (table.value.exportExcel({fileName: \'操作日志\'})))\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_icon, { icon: \"DownloadOutline\" }),\n              _createTextVNode(\" 导出 \")\n            ]),\n            _: 1 /* STABLE */\n          })\n        ]),\n        _: 1 /* STABLE */\n      }, 8 /* PROPS */, [\"where\"])\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createVNode(_component_mb_table, _mergeProps({\n        ref_key: \"table\",\n        ref: table\n      }, tableOptions), null, 16 /* FULL_PROPS */)\n    ])\n  ]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 13:52:32', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('b94688b24b724a50945b55899d6199bc', 'c2e46f717eba4fa69f96358dc1587b77', 'configure-list', '<template>\n    <div class=\"mb-list\">\n        <div class=\"mb-search\">\n            <mb-search :where=\"tableOptions.where\" @search=\"reloadTable\"/>\n        </div>\n        <div class=\"mb-toolbar\">\n            <n-space>\n                <n-button :size=\"$global.uiSize.value\" v-permission=\"\'configure:save\'\" type=\"primary\" @click=\"handleCreate\">\n                    <mb-icon icon=\"AddOutline\" />\n                    添加配置\n                </n-button>\n            </n-space>\n        </div>\n        <div class=\"mb-table\">\n            <mb-table ref=\"table\" v-bind=\"tableOptions\"/>\n        </div>\n        <mb-modal ref=\"roleFormDialog\" :title=\"dialogTitle\" width=\"900px\" @confirm=\"save($event)\">\n            <n-form :size=\"$global.uiSize.value\" ref=\"dataForm\" :rules=\"rules\" :model=\"temp\" label-placement=\"left\" label-width=\"100px\">\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"键值\" path=\"configureKey\">\n                            <mb-input :size=\"$global.uiSize.value\" v-model=\"temp.configureKey\"/>\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"数据值\" path=\"configureValue\">\n                            <n-input :size=\"$global.uiSize.value\" v-model:value=\"temp.configureValue\"/>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"名称\" path=\"configureName\">\n                            <mb-input :size=\"$global.uiSize.value\" v-model:value=\"temp.configureName\"/>\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"配置类型\" path=\"configureType\">\n                            <mb-select :size=\"$global.uiSize.value\" v-model=\"temp.configureType\" type=\"dict_type\"/>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"24\">\n                        <n-form-item label=\"条件筛选\" path=\"configureCondition\">\n                            <n-input\n                                :size=\"$global.uiSize.value\"\n                                type=\"textarea\"\n                                :rows=\"4\"\n                                placeholder=\"请输入条件筛选\"\n                                v-model:value=\"temp.configureCondition\">\n                            </n-input>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"24\">\n                        <n-form-item label=\"配置说明\" path=\"configureDescRibe\">\n                            <n-input\n                                :size=\"$global.uiSize.value\"\n                                type=\"textarea\"\n                                :rows=\"4\"\n                                placeholder=\"请输入配置说明\"\n                                v-model:value=\"temp.configureDescRibe\">\n                            </n-input>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"24\">\n                        <n-form-item label=\"备注\" path=\"remarks\">\n                            <n-input\n                                :size=\"$global.uiSize.value\"\n                                type=\"textarea\"\n                                :rows=\"4\"\n                                placeholder=\"请输入备注\"\n                                v-model:value=\"temp.remarks\">\n                            </n-input>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n            </n-form>\n        </mb-modal>\n    </div>\n</template>\n\n<script setup>\n\nimport {ref, reactive, nextTick} from \'vue\'\nimport {useDictStore} from \"@/store/modules/dictStore\";\n\nconst dictStore = useDictStore()\n\nconst dialogTitle = ref(\'\')\nconst roleFormDialog = ref()\nconst tableOptions = reactive({\n    id: \'configure-list\',\n    url: \'/system/configure/list\',\n    page: true,\n    where: {\n        configureCondition: {\n            label: \'查询条件\'\n        },\n        configureKey: {\n            label: \'配置键值\'\n        },\n        configureValue: {\n            label: \'配置数据\'\n        }\n    },\n    cols: [\n        {\n            field: \'configureKey\',\n            label: \'配置键值\',\n            width: 200\n        },\n        {\n            field: \'configureValue\',\n            label: \'配置数据\'\n        },\n        {\n            field: \'configureName\',\n            label: \'配置名称\'\n        },\n        {\n            field: \'configureType\',\n            label: \'配置类型\',\n            dictType: \'dict_type\'\n        },\n        {\n            field: \'configureCondition\',\n            label: \'查询条件\'\n        },\n        {\n            field: \'configureDescRibe\',\n            label: \'配置说明\',\n            width: 200\n        },\n        {\n            field: \'remarks\',\n            label: \'备注\',\n            width: 200\n        },\n        {\n            field: \'createDate\',\n            label: \'创建时间\',\n            width: 200\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 220,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'configure:save\',\n                    label: \'修改\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'configure:delete\',\n                    label: \'删除\',\n                    link: true,\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/configure/delete\',\n                            id: row.id,\n                            done: () => {\n                                reloadTable()\n                                dictStore.getDictData()\n                            }\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst temp = ref(getTemp())\nconst dialogFormVisible = ref(false)\nconst dialogStatus = ref(\'\')\nconst textMap = reactive({\n    update: \'修改\',\n    create: \'添加\'\n})\nconst rules = reactive({\n    configureName: {required: true, message: \'请输入配置名称\', trigger: \'change\'},\n    configureKey: {required: true, message: \'请输入配置键值\', trigger: \'change\'},\n    configureValue: {required: true, message: \'请输入配置数据\', trigger: \'change\'},\n    configureType: {required: true, message: \'请选择类型\', trigger: \'change\'}\n})\nconst table = ref()\nconst dataForm = ref()\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        configureCondition: \'\',\n        configureName: \'\',\n        configureKey: \'\',\n        configureValue: \'\',\n        configureType: \'\',\n        configureDescRibe: \'\',\n        remarks: \'\'\n    }\n}\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nfunction handleCreate() {\n    temp.value = getTemp()\n    dialogTitle.value = \'添加\'\n    roleFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save() {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            $common.post(\'/system/configure/save\', temp.value).then((response) => {\n                roleFormDialog.value.hide()\n                $message.success((dialogStatus.value === \'create\' ? \'创建\' : \'修改\') + \'成功\')\n                reloadTable()\n            })\n        }\n    })\n}\n\nfunction handleUpdate(row) {\n    $common.objAssign(temp.value, row)\n    dialogTitle.value = \'添加\'\n    roleFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n</script>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"useDictStore\": \"setup-maybe-ref\",\n  \"dictStore\": \"setup-maybe-ref\",\n  \"dialogTitle\": \"setup-ref\",\n  \"roleFormDialog\": \"setup-ref\",\n  \"tableOptions\": \"setup-reactive-const\",\n  \"temp\": \"setup-ref\",\n  \"dialogFormVisible\": \"setup-ref\",\n  \"dialogStatus\": \"setup-ref\",\n  \"textMap\": \"setup-reactive-const\",\n  \"rules\": \"setup-reactive-const\",\n  \"table\": \"setup-ref\",\n  \"dataForm\": \"setup-ref\",\n  \"getTemp\": \"setup-const\",\n  \"reloadTable\": \"setup-const\",\n  \"handleCreate\": \"setup-const\",\n  \"save\": \"setup-const\",\n  \"handleUpdate\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _resolveDirective = ___magic__import__(\'vue\', \'resolveDirective\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _withDirectives = ___magic__import__(\'vue\', \'withDirectives\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\n\nconst _hoisted_1 = { class: \"mb-list\" }\nconst _hoisted_2 = { class: \"mb-search\" }\nconst _hoisted_3 = { class: \"mb-toolbar\" }\nconst _hoisted_4 = { class: \"mb-table\" }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\nconst useDictStore = ___magic__import__(\'@/store/modules/dictStore\', \'useDictStore\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\n\nconst dictStore = useDictStore()\n\nconst dialogTitle = ref(\'\')\nconst roleFormDialog = ref()\nconst tableOptions = reactive({\n    id: \'configure-list\',\n    url: \'/system/configure/list\',\n    page: true,\n    where: {\n        configureCondition: {\n            label: \'查询条件\'\n        },\n        configureKey: {\n            label: \'配置键值\'\n        },\n        configureValue: {\n            label: \'配置数据\'\n        }\n    },\n    cols: [\n        {\n            field: \'configureKey\',\n            label: \'配置键值\',\n            width: 200\n        },\n        {\n            field: \'configureValue\',\n            label: \'配置数据\'\n        },\n        {\n            field: \'configureName\',\n            label: \'配置名称\'\n        },\n        {\n            field: \'configureType\',\n            label: \'配置类型\',\n            dictType: \'dict_type\'\n        },\n        {\n            field: \'configureCondition\',\n            label: \'查询条件\'\n        },\n        {\n            field: \'configureDescRibe\',\n            label: \'配置说明\',\n            width: 200\n        },\n        {\n            field: \'remarks\',\n            label: \'备注\',\n            width: 200\n        },\n        {\n            field: \'createDate\',\n            label: \'创建时间\',\n            width: 200\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 220,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'configure:save\',\n                    label: \'修改\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'configure:delete\',\n                    label: \'删除\',\n                    link: true,\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/configure/delete\',\n                            id: row.id,\n                            done: () => {\n                                reloadTable()\n                                dictStore.getDictData()\n                            }\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst temp = ref(getTemp())\nconst dialogFormVisible = ref(false)\nconst dialogStatus = ref(\'\')\nconst textMap = reactive({\n    update: \'修改\',\n    create: \'添加\'\n})\nconst rules = reactive({\n    configureName: {required: true, message: \'请输入配置名称\', trigger: \'change\'},\n    configureKey: {required: true, message: \'请输入配置键值\', trigger: \'change\'},\n    configureValue: {required: true, message: \'请输入配置数据\', trigger: \'change\'},\n    configureType: {required: true, message: \'请选择类型\', trigger: \'change\'}\n})\nconst table = ref()\nconst dataForm = ref()\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        configureCondition: \'\',\n        configureName: \'\',\n        configureKey: \'\',\n        configureValue: \'\',\n        configureType: \'\',\n        configureDescRibe: \'\',\n        remarks: \'\'\n    }\n}\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nfunction handleCreate() {\n    temp.value = getTemp()\n    dialogTitle.value = \'添加\'\n    roleFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save() {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            $common.post(\'/system/configure/save\', temp.value).then((response) => {\n                roleFormDialog.value.hide()\n                $message.success((dialogStatus.value === \'create\' ? \'创建\' : \'修改\') + \'成功\')\n                reloadTable()\n            })\n        }\n    })\n}\n\nfunction handleUpdate(row) {\n    $common.objAssign(temp.value, row)\n    dialogTitle.value = \'添加\'\n    roleFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n\nreturn (_ctx, _cache) => {\n  const _component_mb_search = _resolveComponent(\"mb-search\")\n  const _component_mb_icon = _resolveComponent(\"mb-icon\")\n  const _component_n_button = _resolveComponent(\"n-button\")\n  const _component_n_space = _resolveComponent(\"n-space\")\n  const _component_mb_table = _resolveComponent(\"mb-table\")\n  const _component_mb_input = _resolveComponent(\"mb-input\")\n  const _component_n_form_item = _resolveComponent(\"n-form-item\")\n  const _component_n_gi = _resolveComponent(\"n-gi\")\n  const _component_n_input = _resolveComponent(\"n-input\")\n  const _component_n_grid = _resolveComponent(\"n-grid\")\n  const _component_mb_select = _resolveComponent(\"mb-select\")\n  const _component_n_form = _resolveComponent(\"n-form\")\n  const _component_mb_modal = _resolveComponent(\"mb-modal\")\n  const _directive_permission = _resolveDirective(\"permission\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_mb_search, {\n        where: tableOptions.where,\n        onSearch: reloadTable\n      }, null, 8 /* PROPS */, [\"where\"])\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createVNode(_component_n_space, null, {\n        default: _withCtx(() => [\n          _withDirectives((_openBlock(), _createBlock(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            type: \"primary\",\n            onClick: handleCreate\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_icon, { icon: \"AddOutline\" }),\n              _createTextVNode(\" 添加配置 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])), [\n            [_directive_permission, \'configure:save\']\n          ])\n        ]),\n        _: 1 /* STABLE */\n      })\n    ]),\n    _createElementVNode(\"div\", _hoisted_4, [\n      _createVNode(_component_mb_table, _mergeProps({\n        ref_key: \"table\",\n        ref: table\n      }, tableOptions), null, 16 /* FULL_PROPS */)\n    ]),\n    _createVNode(_component_mb_modal, {\n      ref_key: \"roleFormDialog\",\n      ref: roleFormDialog,\n      title: dialogTitle.value,\n      width: \"900px\",\n      onConfirm: _cache[7] || (_cache[7] = $event => (save($event)))\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_n_form, {\n          size: _ctx.$global.uiSize.value,\n          ref_key: \"dataForm\",\n          ref: dataForm,\n          rules: rules,\n          model: temp.value,\n          \"label-placement\": \"left\",\n          \"label-width\": \"100px\"\n        }, {\n          default: _withCtx(() => [\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"键值\",\n                      path: \"configureKey\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_mb_input, {\n                          size: _ctx.$global.uiSize.value,\n                          modelValue: temp.value.configureKey,\n                          \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => ((temp.value.configureKey) = $event))\n                        }, null, 8 /* PROPS */, [\"size\", \"modelValue\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"数据值\",\n                      path: \"configureValue\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          size: _ctx.$global.uiSize.value,\n                          value: temp.value.configureValue,\n                          \"onUpdate:value\": _cache[1] || (_cache[1] = $event => ((temp.value.configureValue) = $event))\n                        }, null, 8 /* PROPS */, [\"size\", \"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"名称\",\n                      path: \"configureName\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_mb_input, {\n                          size: _ctx.$global.uiSize.value,\n                          value: temp.value.configureName,\n                          \"onUpdate:value\": _cache[2] || (_cache[2] = $event => ((temp.value.configureName) = $event))\n                        }, null, 8 /* PROPS */, [\"size\", \"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"配置类型\",\n                      path: \"configureType\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_mb_select, {\n                          size: _ctx.$global.uiSize.value,\n                          modelValue: temp.value.configureType,\n                          \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => ((temp.value.configureType) = $event)),\n                          type: \"dict_type\"\n                        }, null, 8 /* PROPS */, [\"size\", \"modelValue\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 24 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"条件筛选\",\n                      path: \"configureCondition\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          size: _ctx.$global.uiSize.value,\n                          type: \"textarea\",\n                          rows: 4,\n                          placeholder: \"请输入条件筛选\",\n                          value: temp.value.configureCondition,\n                          \"onUpdate:value\": _cache[4] || (_cache[4] = $event => ((temp.value.configureCondition) = $event))\n                        }, null, 8 /* PROPS */, [\"size\", \"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 24 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"配置说明\",\n                      path: \"configureDescRibe\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          size: _ctx.$global.uiSize.value,\n                          type: \"textarea\",\n                          rows: 4,\n                          placeholder: \"请输入配置说明\",\n                          value: temp.value.configureDescRibe,\n                          \"onUpdate:value\": _cache[5] || (_cache[5] = $event => ((temp.value.configureDescRibe) = $event))\n                        }, null, 8 /* PROPS */, [\"size\", \"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 24 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"备注\",\n                      path: \"remarks\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          size: _ctx.$global.uiSize.value,\n                          type: \"textarea\",\n                          rows: 4,\n                          placeholder: \"请输入备注\",\n                          value: temp.value.remarks,\n                          \"onUpdate:value\": _cache[6] || (_cache[6] = $event => ((temp.value.remarks) = $event))\n                        }, null, 8 /* PROPS */, [\"size\", \"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            })\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"size\", \"rules\", \"model\"])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"title\"])\n  ]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 10:52:47', '1', '2024-03-09 11:52:57');
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('bc38eb5038ce44aab4bd586fb32d79bb', 'fc061efbc39948d59aafc3905591c935', 'user-list', '<style scoped>\n.left {\n    width: calc(20% - 20px);\n    margin-right: 20px;\n    float: left;\n}\n\n.right {\n    width: 80%;\n    height: 100%;\n    float: right;\n}\n\n.app-container {\n    width: 100%;\n    height: 100%;\n}\n</style>\n\n<template>\n    <div class=\"app-container\">\n        <div class=\"left\">\n            <mb-tree\n                url=\"/system/office/tree\"\n                v-model=\"tableOptions.where.officeId\"\n                :expand=\"false\"\n                search\n                search-width=\"100%\"\n                checkable\n                :checked=\"false\"\n                @check-change=\"checkChange\"\n            />\n        </div>\n        <div class=\"right\">\n            <div class=\"mb-list\">\n                <div class=\"mb-search\">\n                    <mb-search :where=\"tableOptions.where\" @search=\"reloadTable\">\n                        <template #buttons>\n                            <n-button type=\"primary\" @click=\"table.exportExcel({ fileName: \'用户数据\' })\">\n                                <mb-icon icon=\"DownloadOutline\" />\n                                导出\n                            </n-button>\n                        </template>\n                    </mb-search>\n                </div>\n\n                <div class=\"mb-toolbar\">\n                    <n-button :size=\"$global.uiSize.value\"  v-permission=\"\'user:save\'\" type=\"primary\" @click=\"handleCreate\">\n                        <mb-icon icon=\"AddOutline\" />\n                        添加用户\n                    </n-button>\n                    <!--          <mb-button v-permission=\"\'user:delete\'\" plain :request-url=\"\'/system/user/delete\'\" :btn-type=\"\'delete\'\" :request-data=\"{ id: ids }\" :after-handler=\"reloadTable\" />-->\n                    <!--          <mb-upload-file ref=\"importUserRef\" action=\"/system/user/import/preview\" label=\"导入用户\" :show-tip=\"false\" :show-file-list=\"false\" :show-remove-tip=\"false\" :on-success=\"importUserSuccess\" />-->\n                </div>\n\n                <div class=\"mb-table\">\n                    <mb-table ref=\"table\" v-bind=\"tableOptions\" v-model:checked-row-keys=\"ids\">\n                        <template #roles=\"{row,col}\">\n                            <n-tag :size=\"$global.uiSize.value\"  style=\"margin-right:4px;\" v-if=\"row.roles\" :bordered=\"false\"\n                                   v-for=\"(it,idx) in row.roles.split(\',\')\" type=\"info\">\n                                {{ it }}\n                            </n-tag>\n                        </template>\n                    </mb-table>\n                </div>\n\n                <mb-modal ref=\"previewUsersDialog\" title=\"预览数据\" @confirm=\"importUsers\">\n                    <mb-table v-bind=\"importUserTableOptions\"/>\n                </mb-modal>\n\n                <mb-modal ref=\"userFormDialog\" :title=\"dialogTitle\" @confirm=\"userFormRef.save($event)\" width=\"670px\">\n                    <user-form ref=\"userFormRef\" :key=\"\'userForm\'\" @reload-table=\"reloadTable\"/>\n                </mb-modal>\n            </div>\n        </div>\n        <div class=\"clear\"></div>\n    </div>\n</template>\n\n<script setup>\n\nimport {ref, reactive, nextTick} from \'vue\'\nimport {useRoute} from \'vue-router\'\n\nconst route = useRoute()\n\nconst importUserRef = ref()\nconst previewUsersDialog = ref()\nconst importUserTableOptions = reactive({})\nconst sourceDatas = ref()\nfunction importUserSuccess(res, file, fileList) {\n    const {datas} = res.data\n    sourceDatas.value = res.data.sourceDatas\n    importUserRef.value.handlerRemove(file)\n    if (datas && datas.length) {\n        let cols = []\n        for (let key in datas[0]) {\n            cols.push({\n                field: key,\n                label: key\n            })\n        }\n        previewUsersDialog.value.show(() => {\n            importUserTableOptions.data = datas\n            importUserTableOptions.cols = cols\n        })\n    }\n}\n\nfunction importUsers() {\n    $common.postJson(\'/system/user/import\', {\n        datas: sourceDatas.value\n    }).then(res => {\n        if (res.data) {\n            $message.success(\'导入成功\')\n            previewUsersDialog.value.hide()\n            table.value.reload()\n        }\n    })\n}\n\nconst tableOptions = reactive({\n    id: \'user-list\',\n    url: \'/system/user/list\',\n    page: true,\n    selection: true,\n    where: {\n        username: {\n            label: \'登录名称\',\n            props: {\n                width: \'80px\'\n            }\n        },\n        name: {\n            label: \'姓名/昵称\'\n        },\n        roleId: {\n            component: \'select\',\n            label: \'角色\',\n            props: {\n                url: \'/system/role/all\',\n                multiple: true,\n                width: \'200px\'\n            }\n        },\n        officeId: \'\'\n    },\n    cols: [\n        {\n            field: \'username\',\n            label: \'登录名称\',\n            realSort: true\n        },\n        {\n            field: \'name\',\n            label: \'姓名/昵称\'\n        },\n        {\n            field: \'officeName\',\n            label: \'所属机构\'\n        },\n        {\n            field: \'roles\',\n            label: \'角色\',\n            type: \'dynamic\'\n        },\n        {\n            field: \'phone\',\n            label: \'手机号\'\n        },\n        {\n            field: \'isLogin\',\n            label: \'禁止登录\',\n            type: \'switch\',\n            exportRender: (row) => {\n                return row.isLogin == 1 ? \'已禁用\' : \'未禁用\'\n            },\n            width: 100,\n            if: (row) => {\n                return row.id != \'1\'\n            },\n            change: (row) => {\n                $common.get(\'/system/user/change/login/status\', {\n                    id: row.id,\n                    isLogin: row.isLogin\n                })\n            }\n        },\n        {\n            field: \'createDate\',\n            label: \'创建时间\',\n            width: 180\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 140,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'user:save\',\n                    label: \'修改\',\n                    type: \'primary\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'user:delete\',\n                    label: \'删除\',\n                    type: \'primary\',\n                    link: true,\n                    if: (row) => {\n                        return row.id != \'1\'\n                    },\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/user/delete\',\n                            id: row.id,\n                            done: () => reloadTable()\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst dialogTitle = ref(\'\')\nconst ids = ref([])\nconst userFormDialog = ref()\nconst table = ref()\nconst userFormRef = ref()\n\nfunction setWhere() {\n    if (route.query.roleId) {\n        tableOptions.where.roleId.value = route.query.roleId\n    }\n    if (route.query.officeId) {\n        tableOptions.where.officeId = route.query.officeId\n    }\n}\n\nsetWhere()\n\nfunction checkChange(values) {\n    tableOptions.where.officeId = values\n    nextTick(() => reloadTable())\n}\n\nfunction reloadTable() {\n    userFormDialog.value.hide()\n    table.value.reload()\n}\n\nfunction handleCreate() {\n    dialogTitle.value = \'添加\'\n    userFormDialog.value.show()\n    nextTick(() => {\n        userFormRef.value.resetTemp()\n    })\n}\n\nfunction handleUpdate(row) {\n    dialogTitle.value = \'修改\'\n    userFormDialog.value.show()\n    nextTick(() => {\n        userFormRef.value.getInfo(row)\n    })\n}\n\n</script>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"useRoute\": \"setup-maybe-ref\",\n  \"route\": \"setup-maybe-ref\",\n  \"importUserRef\": \"setup-ref\",\n  \"previewUsersDialog\": \"setup-ref\",\n  \"importUserTableOptions\": \"setup-reactive-const\",\n  \"sourceDatas\": \"setup-ref\",\n  \"importUserSuccess\": \"setup-const\",\n  \"importUsers\": \"setup-const\",\n  \"tableOptions\": \"setup-reactive-const\",\n  \"dialogTitle\": \"setup-ref\",\n  \"ids\": \"setup-ref\",\n  \"userFormDialog\": \"setup-ref\",\n  \"table\": \"setup-ref\",\n  \"userFormRef\": \"setup-ref\",\n  \"setWhere\": \"setup-const\",\n  \"checkChange\": \"setup-const\",\n  \"reloadTable\": \"setup-const\",\n  \"handleCreate\": \"setup-const\",\n  \"handleUpdate\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _resolveDirective = ___magic__import__(\'vue\', \'resolveDirective\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _withDirectives = ___magic__import__(\'vue\', \'withDirectives\');\r\nconst _createCommentVNode = ___magic__import__(\'vue\', \'createCommentVNode\');\r\nconst _renderList = ___magic__import__(\'vue\', \'renderList\');\r\nconst _Fragment = ___magic__import__(\'vue\', \'Fragment\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\r\nconst _toDisplayString = ___magic__import__(\'vue\', \'toDisplayString\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _normalizeProps = ___magic__import__(\'vue\', \'normalizeProps\');\r\nconst _guardReactiveProps = ___magic__import__(\'vue\', \'guardReactiveProps\');\r\nconst _pushScopeId = ___magic__import__(\'vue\', \'pushScopeId\');\r\nconst _popScopeId = ___magic__import__(\'vue\', \'popScopeId\');\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-bWItc2Zj\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"app-container\" }\nconst _hoisted_2 = { class: \"left\" }\nconst _hoisted_3 = { class: \"right\" }\nconst _hoisted_4 = { class: \"mb-list\" }\nconst _hoisted_5 = { class: \"mb-search\" }\nconst _hoisted_6 = { class: \"mb-toolbar\" }\nconst _hoisted_7 = { class: \"mb-table\" }\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"clear\" }, null, -1 /* HOISTED */))\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\nconst useRoute = ___magic__import__(\'vue-router\', \'useRoute\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\n\nconst route = useRoute()\n\nconst importUserRef = ref()\nconst previewUsersDialog = ref()\nconst importUserTableOptions = reactive({})\nconst sourceDatas = ref()\nfunction importUserSuccess(res, file, fileList) {\n    const {datas} = res.data\n    sourceDatas.value = res.data.sourceDatas\n    importUserRef.value.handlerRemove(file)\n    if (datas && datas.length) {\n        let cols = []\n        for (let key in datas[0]) {\n            cols.push({\n                field: key,\n                label: key\n            })\n        }\n        previewUsersDialog.value.show(() => {\n            importUserTableOptions.data = datas\n            importUserTableOptions.cols = cols\n        })\n    }\n}\n\nfunction importUsers() {\n    $common.postJson(\'/system/user/import\', {\n        datas: sourceDatas.value\n    }).then(res => {\n        if (res.data) {\n            $message.success(\'导入成功\')\n            previewUsersDialog.value.hide()\n            table.value.reload()\n        }\n    })\n}\n\nconst tableOptions = reactive({\n    id: \'user-list\',\n    url: \'/system/user/list\',\n    page: true,\n    selection: true,\n    where: {\n        username: {\n            label: \'登录名称\',\n            props: {\n                width: \'80px\'\n            }\n        },\n        name: {\n            label: \'姓名/昵称\'\n        },\n        roleId: {\n            component: \'select\',\n            label: \'角色\',\n            props: {\n                url: \'/system/role/all\',\n                multiple: true,\n                width: \'200px\'\n            }\n        },\n        officeId: \'\'\n    },\n    cols: [\n        {\n            field: \'username\',\n            label: \'登录名称\',\n            realSort: true\n        },\n        {\n            field: \'name\',\n            label: \'姓名/昵称\'\n        },\n        {\n            field: \'officeName\',\n            label: \'所属机构\'\n        },\n        {\n            field: \'roles\',\n            label: \'角色\',\n            type: \'dynamic\'\n        },\n        {\n            field: \'phone\',\n            label: \'手机号\'\n        },\n        {\n            field: \'isLogin\',\n            label: \'禁止登录\',\n            type: \'switch\',\n            exportRender: (row) => {\n                return row.isLogin == 1 ? \'已禁用\' : \'未禁用\'\n            },\n            width: 100,\n            if: (row) => {\n                return row.id != \'1\'\n            },\n            change: (row) => {\n                $common.get(\'/system/user/change/login/status\', {\n                    id: row.id,\n                    isLogin: row.isLogin\n                })\n            }\n        },\n        {\n            field: \'createDate\',\n            label: \'创建时间\',\n            width: 180\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 140,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'user:save\',\n                    label: \'修改\',\n                    type: \'primary\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'user:delete\',\n                    label: \'删除\',\n                    type: \'primary\',\n                    link: true,\n                    if: (row) => {\n                        return row.id != \'1\'\n                    },\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/user/delete\',\n                            id: row.id,\n                            done: () => reloadTable()\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst dialogTitle = ref(\'\')\nconst ids = ref([])\nconst userFormDialog = ref()\nconst table = ref()\nconst userFormRef = ref()\n\nfunction setWhere() {\n    if (route.query.roleId) {\n        tableOptions.where.roleId.value = route.query.roleId\n    }\n    if (route.query.officeId) {\n        tableOptions.where.officeId = route.query.officeId\n    }\n}\n\nsetWhere()\n\nfunction checkChange(values) {\n    tableOptions.where.officeId = values\n    nextTick(() => reloadTable())\n}\n\nfunction reloadTable() {\n    userFormDialog.value.hide()\n    table.value.reload()\n}\n\nfunction handleCreate() {\n    dialogTitle.value = \'添加\'\n    userFormDialog.value.show()\n    nextTick(() => {\n        userFormRef.value.resetTemp()\n    })\n}\n\nfunction handleUpdate(row) {\n    dialogTitle.value = \'修改\'\n    userFormDialog.value.show()\n    nextTick(() => {\n        userFormRef.value.getInfo(row)\n    })\n}\n\n\nreturn (_ctx, _cache) => {\n  const _component_mb_tree = _resolveComponent(\"mb-tree\")\n  const _component_mb_icon = _resolveComponent(\"mb-icon\")\n  const _component_n_button = _resolveComponent(\"n-button\")\n  const _component_mb_search = _resolveComponent(\"mb-search\")\n  const _component_n_tag = _resolveComponent(\"n-tag\")\n  const _component_mb_table = _resolveComponent(\"mb-table\")\n  const _component_mb_modal = _resolveComponent(\"mb-modal\")\n  const _component_user_form = _resolveComponent(\"user-form\")\n  const _directive_permission = _resolveDirective(\"permission\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_mb_tree, {\n        url: \"/system/office/tree\",\n        modelValue: tableOptions.where.officeId,\n        \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => ((tableOptions.where.officeId) = $event)),\n        expand: false,\n        search: \"\",\n        \"search-width\": \"100%\",\n        checkable: \"\",\n        checked: false,\n        onCheckChange: checkChange\n      }, null, 8 /* PROPS */, [\"modelValue\"])\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createElementVNode(\"div\", _hoisted_4, [\n        _createElementVNode(\"div\", _hoisted_5, [\n          _createVNode(_component_mb_search, {\n            where: tableOptions.where,\n            onSearch: reloadTable\n          }, {\n            buttons: _withCtx(() => [\n              _createVNode(_component_n_button, {\n                type: \"primary\",\n                onClick: _cache[1] || (_cache[1] = $event => (table.value.exportExcel({ fileName: \'用户数据\' })))\n              }, {\n                default: _withCtx(() => [\n                  _createVNode(_component_mb_icon, { icon: \"DownloadOutline\" }),\n                  _createTextVNode(\" 导出 \")\n                ]),\n                _: 1 /* STABLE */\n              })\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"where\"])\n        ]),\n        _createElementVNode(\"div\", _hoisted_6, [\n          _withDirectives((_openBlock(), _createBlock(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            type: \"primary\",\n            onClick: handleCreate\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_icon, { icon: \"AddOutline\" }),\n              _createTextVNode(\" 添加用户 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])), [\n            [_directive_permission, \'user:save\']\n          ]),\n          _createCommentVNode(\"          <mb-button v-permission=\\\"\'user:delete\'\\\" plain :request-url=\\\"\'/system/user/delete\'\\\" :btn-type=\\\"\'delete\'\\\" :request-data=\\\"{ id: ids }\\\" :after-handler=\\\"reloadTable\\\" />\"),\n          _createCommentVNode(\"          <mb-upload-file ref=\\\"importUserRef\\\" action=\\\"/system/user/import/preview\\\" label=\\\"导入用户\\\" :show-tip=\\\"false\\\" :show-file-list=\\\"false\\\" :show-remove-tip=\\\"false\\\" :on-success=\\\"importUserSuccess\\\" />\")\n        ]),\n        _createElementVNode(\"div\", _hoisted_7, [\n          _createVNode(_component_mb_table, _mergeProps({\n            ref_key: \"table\",\n            ref: table\n          }, tableOptions, {\n            \"checked-row-keys\": ids.value,\n            \"onUpdate:checkedRowKeys\": _cache[2] || (_cache[2] = $event => ((ids).value = $event))\n          }), {\n            roles: _withCtx(({row,col}) => [\n              (row.roles)\n                ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(row.roles.split(\',\'), (it, idx) => {\n                    return (_openBlock(), _createBlock(_component_n_tag, {\n                      size: _ctx.$global.uiSize.value,\n                      style: {\"margin-right\":\"4px\"},\n                      bordered: false,\n                      type: \"info\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createTextVNode(_toDisplayString(it), 1 /* TEXT */)\n                      ]),\n                      _: 2 /* DYNAMIC */\n                    }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"size\"]))\n                  }), 256 /* UNKEYED_FRAGMENT */))\n                : _createCommentVNode(\"v-if\", true)\n            ]),\n            _: 1 /* STABLE */\n          }, 16 /* FULL_PROPS */, [\"checked-row-keys\"])\n        ]),\n        _createVNode(_component_mb_modal, {\n          ref_key: \"previewUsersDialog\",\n          ref: previewUsersDialog,\n          title: \"预览数据\",\n          onConfirm: importUsers\n        }, {\n          default: _withCtx(() => [\n            _createVNode(_component_mb_table, _normalizeProps(_guardReactiveProps(importUserTableOptions)), null, 16 /* FULL_PROPS */)\n          ]),\n          _: 1 /* STABLE */\n        }, 512 /* NEED_PATCH */),\n        _createVNode(_component_mb_modal, {\n          ref_key: \"userFormDialog\",\n          ref: userFormDialog,\n          title: dialogTitle.value,\n          onConfirm: _cache[3] || (_cache[3] = $event => (userFormRef.value.save($event))),\n          width: \"670px\"\n        }, {\n          default: _withCtx(() => [\n            (_openBlock(), _createBlock(_component_user_form, {\n              ref_key: \"userFormRef\",\n              ref: userFormRef,\n              key: \'userForm\',\n              onReloadTable: reloadTable\n            }))\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"title\"])\n      ])\n    ]),\n    _hoisted_8\n  ]))\n}\n}\n\n}\n__sfc__.__scopeId = \"data-v-bWItc2Zj\"\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '.left[data-v-bWItc2Zj] {\n    width: calc(20% - 20px);\n    margin-right: 20px;\n    float: left;\n}\n.right[data-v-bWItc2Zj] {\n    width: 80%;\n    height: 100%;\n    float: right;\n}\n.app-container[data-v-bWItc2Zj] {\n    width: 100%;\n    height: 100%;\n}', 1, NULL, 0, '1', '2024-03-07 14:03:06', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('c0ad38bca2164af08f1c2b2bc90245df', 'fc19e04fa384462d9948c18092f30287', 'menu-form', '<template>\n    <div>\n        <n-form :size=\"$global.uiSize.value\" ref=\"dataForm\" :rules=\"rules\" :model=\"temp\" label-placement=\"left\" label-width=\"100px\">\n            <n-grid :cols=\"24\">\n                <n-gi :span=\"12\">\n                    <n-form-item label=\"菜单类型\" path=\"type\">\n                        <n-radio-group v-model:value=\"menuType\">\n                            <n-radio-button key=\"menu\" value=\"menu\" label=\"菜单\"/>\n                            <n-radio-button key=\"button\" value=\"button\" label=\"按钮\"/>\n                        </n-radio-group>\n                    </n-form-item>\n                </n-gi>\n                <n-gi :span=\"12\">\n                    <n-form-item label=\"上级菜单\" path=\"pid\">\n                        <n-tree-select\n                            v-model:value=\"temp.pid\"\n                            :options=\"menuTree\"\n                        />\n                    </n-form-item>\n                </n-gi>\n            </n-grid>\n            <n-form-item label=\"菜单名称\" path=\"name\">\n                <n-input v-model:value=\"temp.name\"/>\n            </n-form-item>\n            <n-form-item label=\"菜单链接\" path=\"url\" v-if=\"menuType == \'menu\'\">\n                <n-input v-model:value=\"temp.url\"/>\n            </n-form-item>\n            <n-form-item label=\"打开方式\" path=\"openMode\"\n                         v-if=\"menuType == \'menu\'\">\n                <n-radio-group v-model:value=\"openModeRef\">\n                    <n-radio-button key=\"0\" value=\"0\" label=\"页签\"/>\n                    <n-radio-button key=\"1\" value=\"1\" label=\"新标签页\"/>\n                    <n-radio-button key=\"2\" value=\"2\" label=\"iframe\"/>\n                </n-radio-group>\n            </n-form-item>\n            <n-form-item label=\"关联组件\" path=\"componentId\"\n                         v-if=\"menuType == \'menu\' && !(temp.url.startsWith(\'http\') || (temp.url.startsWith(\'/\') && temp.url.indexOf(\'.htm\') != -1))\">\n                <n-tree-select\n                    v-model:value=\"temp.componentId\"\n                    :options=\"componentTree\"\n                    key-field=\"id\"\n                    label-field=\"name\"\n                    check-strategy=\"child\"\n                    default-expand-all\n                />\n            </n-form-item>\n            <n-form-item label=\"权限标识\" path=\"permission\" v-if=\"menuType == \'button\'\">\n                <n-input v-model:value=\"temp.permission\"/>\n            </n-form-item>\n\n            <div class=\"flex flex-wrap\">\n                <div style=\"width: 50%\">\n                    <n-form-item label=\"菜单显示\" path=\"isShow\" v-if=\"menuType == \'menu\'\">\n                        <n-radio-group v-model:value=\"temp.isShow\">\n                            <n-radio-button :key=\"1\" :value=\"1\" label=\"显示\"/>\n                            <n-radio-button :key=\"0\" :value=\"0\" label=\"不显示\"/>\n                        </n-radio-group>\n                    </n-form-item>\n                </div>\n                <div style=\"width: 50%\">\n                    <n-form-item label=\"路由缓存\" path=\"keepAlive\" v-if=\"menuType == \'menu\'\">\n                        <n-radio-group v-model:value=\"temp.keepAlive\">\n                            <n-radio-button :key=\"1\" :value=\"1\" label=\"缓存\"/>\n                            <n-radio-button :key=\"0\" :value=\"0\" label=\"不缓存\"/>\n                        </n-radio-group>\n                    </n-form-item>\n                </div>\n                <div style=\"width: 50%\">\n                    <n-form-item label=\"排序\" path=\"sort\">\n                        <n-input-number v-model:value=\"temp.sort\" button-placement=\"both\"/>\n                    </n-form-item>\n                </div>\n                <div style=\"width: 50%\">\n                    <n-form-item label=\"图标\" path=\"icon\">\n                        <a @click=\"openIcons\">\n                            <n-input v-model:value=\"temp.icon\">\n                                <template #suffix>\n                                    <mb-icon :icon=\"temp.icon\" />\n                                </template>\n                            </n-input>\n                        </a>\n                    </n-form-item>\n                </div>\n            </div>\n        </n-form>\n        <mb-modal ref=\"iconDialog\" width=\"650px\" title=\"选择图标\">\n            <menu-icons :select-icon=\"selectIcon\" />\n        </mb-modal>\n    </div>\n</template>\n\n<script setup>\nimport {ref, reactive, watch, nextTick} from \'vue\'\n\nconst props = defineProps({\n    menuTree: {\n        type: Array,\n        default: () => []\n    },\n    menuData: {\n        type: Array,\n        default: () => []\n    }\n})\n\nconst emit = defineEmits([\'reload-table\'])\nconst componentTree = ref()\nconst dataForm = ref()\nconst menuType = ref(\'menu\')\nconst iconDialog = ref()\nconst openModeRef = ref(\'0\')\nconst getTemp = () => {\n    return {\n        id: \'\',\n        name: \'\',\n        url: \'\',\n        permission: \'\',\n        sort: 0,\n        descRibe: \'\',\n        isShow: 1,\n        pid: 0,\n        icon: \'\',\n        keepAlive: 0,\n        componentId: \'\',\n        openMode: \'0\'\n    }\n}\n\n$common.get(\'/system/component/tree\').then(res => {\n    $treeTable.deleteEmptyChildren(res.data.list)\n    componentTree.value = res.data.list\n})\n\nconst temp = ref(getTemp())\n\nlet validateUrl = (rule, value, callback) => {\n    if (menuType.value == \'menu\') {\n        if (!value) {\n            callback(new Error(\'请输入菜单链接\'))\n        } else {\n            if(value.startsWith(\'http\') || value.startsWith(\'/\')){\n                callback()\n            }else{\n                callback(new Error(\'菜单链接只能以\"http\"或\"/\"开头\'))\n            }\n        }\n    } else {\n        if(value.startsWith(\'http\') || value.startsWith(\'/\')){\n            callback()\n        }else{\n            callback(new Error(\'菜单链接只能以\"http\"或\"/\"开头\'))\n        }\n    }\n}\n\nlet validatePermission = (rule, value, callback) => {\n    if (menuType.value == \'button\') {\n        if (!value) {\n            callback(new Error(\'请输入权限标识\'))\n        } else {\n            callback()\n        }\n    } else {\n        callback()\n    }\n}\n\nconst rules = reactive({\n    pid: {required: true, message: \'请选择上级菜单\', trigger: \'change\'},\n    name: {required: true, message: \'请输入菜单名称\', trigger: \'change\'},\n    url: {required: true, trigger: \'change\', validator: validateUrl},\n    permission: {required: true, trigger: \'change\', validator: validatePermission}\n})\n\nwatch(menuType, (type) => {\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n    if (type == \'menu\') {\n        temp.value.isShow = 1\n    } else {\n        temp.value.isShow = 0\n    }\n})\n\nwatch(openModeRef, (value) => {\n    temp.value.openMode = value\n})\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            if (temp.value.pid == temp.value.id) {\n                $message.warning(\'上级菜单不能选当前菜单\')\n                d.hideLoading()\n                return\n            }\n            if ($treeTable.isChildren($treeTable.queryChildren(props.menuData, temp.value.id), temp.value.pid)) {\n                $message.warning(\'上级菜单不能选当前菜单子级\')\n                d.hideLoading()\n                return\n            }\n            if (menuType.value == \'menu\') {\n                temp.value.permission = \'\'\n            } else {\n                temp.value.isShow = 0\n                temp.value.keepAlive = 0\n                temp.value.icon = \'\'\n                temp.value.url = \'\'\n            }\n            $common.post(\'/system/menu/save\', temp.value).then(() => {\n                d.hideLoading()\n                $message.success(d.title + \'成功\')\n                d.hide()\n                emit(\'reload-table\')\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction addSubMenu(id) {\n    resetTemp()\n    menuType.value = \'menu\'\n    temp.value.pid = id\n    temp.value.id = $common.uuid()\n    getSort()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction getInfo(row) {\n    for (let t in temp.value) {\n        temp.value[t] = row[t]\n    }\n    openModeRef.value = temp.value.openMode || \'0\'\n    menuType.value = temp.value.url ? \'menu\' : \'button\'\n    $treeTable.clearFont(temp.value, [\'name\', \'url\', \'permission\'])\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction resetTemp() {\n    temp.value = getTemp()\n}\n\nfunction selectIcon(symbol) {\n    temp.value.icon = symbol\n    iconDialog.value.hide()\n}\n\nfunction openIcons() {\n    iconDialog.value.show()\n}\n\nfunction getSort() {\n    $common.get(\'/system/menu/sort\', {pid: temp.value.pid}).then(res => {\n        temp.value.sort = res.data\n    })\n}\n\ndefineExpose({addSubMenu, getInfo, save})\n\n</script>\n', '/* Analyzed bindings: {\n  \"menuTree\": \"props\",\n  \"menuData\": \"props\",\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"watch\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"props\": \"setup-reactive-const\",\n  \"emit\": \"setup-const\",\n  \"componentTree\": \"setup-ref\",\n  \"dataForm\": \"setup-ref\",\n  \"menuType\": \"setup-ref\",\n  \"iconDialog\": \"setup-ref\",\n  \"openModeRef\": \"setup-ref\",\n  \"getTemp\": \"setup-const\",\n  \"temp\": \"setup-ref\",\n  \"validateUrl\": \"setup-let\",\n  \"validatePermission\": \"setup-let\",\n  \"rules\": \"setup-reactive-const\",\n  \"save\": \"setup-const\",\n  \"addSubMenu\": \"setup-const\",\n  \"getInfo\": \"setup-const\",\n  \"resetTemp\": \"setup-const\",\n  \"selectIcon\": \"setup-const\",\n  \"openIcons\": \"setup-const\",\n  \"getSort\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _createCommentVNode = ___magic__import__(\'vue\', \'createCommentVNode\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\n\nconst _hoisted_1 = { class: \"flex flex-wrap\" }\nconst _hoisted_2 = { style: {\"width\":\"50%\"} }\nconst _hoisted_3 = { style: {\"width\":\"50%\"} }\nconst _hoisted_4 = { style: {\"width\":\"50%\"} }\nconst _hoisted_5 = { style: {\"width\":\"50%\"} }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst watch = ___magic__import__(\'vue\', \'watch\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  props: {\n    menuTree: {\n        type: Array,\n        default: () => []\n    },\n    menuData: {\n        type: Array,\n        default: () => []\n    }\n},\n  emits: [\'reload-table\'],\n  setup(__props, { expose: __expose, emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\nconst componentTree = ref()\nconst dataForm = ref()\nconst menuType = ref(\'menu\')\nconst iconDialog = ref()\nconst openModeRef = ref(\'0\')\nconst getTemp = () => {\n    return {\n        id: \'\',\n        name: \'\',\n        url: \'\',\n        permission: \'\',\n        sort: 0,\n        descRibe: \'\',\n        isShow: 1,\n        pid: 0,\n        icon: \'\',\n        keepAlive: 0,\n        componentId: \'\',\n        openMode: \'0\'\n    }\n}\n\n$common.get(\'/system/component/tree\').then(res => {\n    $treeTable.deleteEmptyChildren(res.data.list)\n    componentTree.value = res.data.list\n})\n\nconst temp = ref(getTemp())\n\nlet validateUrl = (rule, value, callback) => {\n    if (menuType.value == \'menu\') {\n        if (!value) {\n            callback(new Error(\'请输入菜单链接\'))\n        } else {\n            if(value.startsWith(\'http\') || value.startsWith(\'/\')){\n                callback()\n            }else{\n                callback(new Error(\'菜单链接只能以\"http\"或\"/\"开头\'))\n            }\n        }\n    } else {\n        if(value.startsWith(\'http\') || value.startsWith(\'/\')){\n            callback()\n        }else{\n            callback(new Error(\'菜单链接只能以\"http\"或\"/\"开头\'))\n        }\n    }\n}\n\nlet validatePermission = (rule, value, callback) => {\n    if (menuType.value == \'button\') {\n        if (!value) {\n            callback(new Error(\'请输入权限标识\'))\n        } else {\n            callback()\n        }\n    } else {\n        callback()\n    }\n}\n\nconst rules = reactive({\n    pid: {required: true, message: \'请选择上级菜单\', trigger: \'change\'},\n    name: {required: true, message: \'请输入菜单名称\', trigger: \'change\'},\n    url: {required: true, trigger: \'change\', validator: validateUrl},\n    permission: {required: true, trigger: \'change\', validator: validatePermission}\n})\n\nwatch(menuType, (type) => {\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n    if (type == \'menu\') {\n        temp.value.isShow = 1\n    } else {\n        temp.value.isShow = 0\n    }\n})\n\nwatch(openModeRef, (value) => {\n    temp.value.openMode = value\n})\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            if (temp.value.pid == temp.value.id) {\n                $message.warning(\'上级菜单不能选当前菜单\')\n                d.hideLoading()\n                return\n            }\n            if ($treeTable.isChildren($treeTable.queryChildren(props.menuData, temp.value.id), temp.value.pid)) {\n                $message.warning(\'上级菜单不能选当前菜单子级\')\n                d.hideLoading()\n                return\n            }\n            if (menuType.value == \'menu\') {\n                temp.value.permission = \'\'\n            } else {\n                temp.value.isShow = 0\n                temp.value.keepAlive = 0\n                temp.value.icon = \'\'\n                temp.value.url = \'\'\n            }\n            $common.post(\'/system/menu/save\', temp.value).then(() => {\n                d.hideLoading()\n                $message.success(d.title + \'成功\')\n                d.hide()\n                emit(\'reload-table\')\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction addSubMenu(id) {\n    resetTemp()\n    menuType.value = \'menu\'\n    temp.value.pid = id\n    temp.value.id = $common.uuid()\n    getSort()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction getInfo(row) {\n    for (let t in temp.value) {\n        temp.value[t] = row[t]\n    }\n    openModeRef.value = temp.value.openMode || \'0\'\n    menuType.value = temp.value.url ? \'menu\' : \'button\'\n    $treeTable.clearFont(temp.value, [\'name\', \'url\', \'permission\'])\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction resetTemp() {\n    temp.value = getTemp()\n}\n\nfunction selectIcon(symbol) {\n    temp.value.icon = symbol\n    iconDialog.value.hide()\n}\n\nfunction openIcons() {\n    iconDialog.value.show()\n}\n\nfunction getSort() {\n    $common.get(\'/system/menu/sort\', {pid: temp.value.pid}).then(res => {\n        temp.value.sort = res.data\n    })\n}\n\n__expose({addSubMenu, getInfo, save})\n\n\nreturn (_ctx, _cache) => {\n  const _component_n_radio_button = _resolveComponent(\"n-radio-button\")\n  const _component_n_radio_group = _resolveComponent(\"n-radio-group\")\n  const _component_n_form_item = _resolveComponent(\"n-form-item\")\n  const _component_n_gi = _resolveComponent(\"n-gi\")\n  const _component_n_tree_select = _resolveComponent(\"n-tree-select\")\n  const _component_n_grid = _resolveComponent(\"n-grid\")\n  const _component_n_input = _resolveComponent(\"n-input\")\n  const _component_n_input_number = _resolveComponent(\"n-input-number\")\n  const _component_mb_icon = _resolveComponent(\"mb-icon\")\n  const _component_n_form = _resolveComponent(\"n-form\")\n  const _component_menu_icons = _resolveComponent(\"menu-icons\")\n  const _component_mb_modal = _resolveComponent(\"mb-modal\")\n\n  return (_openBlock(), _createElementBlock(\"div\", null, [\n    _createVNode(_component_n_form, {\n      size: _ctx.$global.uiSize.value,\n      ref_key: \"dataForm\",\n      ref: dataForm,\n      rules: rules,\n      model: temp.value,\n      \"label-placement\": \"left\",\n      \"label-width\": \"100px\"\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_n_grid, { cols: 24 }, {\n          default: _withCtx(() => [\n            _createVNode(_component_n_gi, { span: 12 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_form_item, {\n                  label: \"菜单类型\",\n                  path: \"type\"\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_radio_group, {\n                      value: menuType.value,\n                      \"onUpdate:value\": _cache[0] || (_cache[0] = $event => ((menuType).value = $event))\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_radio_button, {\n                          key: \"menu\",\n                          value: \"menu\",\n                          label: \"菜单\"\n                        }),\n                        _createVNode(_component_n_radio_button, {\n                          key: \"button\",\n                          value: \"button\",\n                          label: \"按钮\"\n                        })\n                      ]),\n                      _: 1 /* STABLE */\n                    }, 8 /* PROPS */, [\"value\"])\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_gi, { span: 12 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_form_item, {\n                  label: \"上级菜单\",\n                  path: \"pid\"\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_tree_select, {\n                      value: temp.value.pid,\n                      \"onUpdate:value\": _cache[1] || (_cache[1] = $event => ((temp.value.pid) = $event)),\n                      options: __props.menuTree\n                    }, null, 8 /* PROPS */, [\"value\", \"options\"])\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            })\n          ]),\n          _: 1 /* STABLE */\n        }),\n        _createVNode(_component_n_form_item, {\n          label: \"菜单名称\",\n          path: \"name\"\n        }, {\n          default: _withCtx(() => [\n            _createVNode(_component_n_input, {\n              value: temp.value.name,\n              \"onUpdate:value\": _cache[2] || (_cache[2] = $event => ((temp.value.name) = $event))\n            }, null, 8 /* PROPS */, [\"value\"])\n          ]),\n          _: 1 /* STABLE */\n        }),\n        (menuType.value == \'menu\')\n          ? (_openBlock(), _createBlock(_component_n_form_item, {\n              key: 0,\n              label: \"菜单链接\",\n              path: \"url\"\n            }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_input, {\n                  value: temp.value.url,\n                  \"onUpdate:value\": _cache[3] || (_cache[3] = $event => ((temp.value.url) = $event))\n                }, null, 8 /* PROPS */, [\"value\"])\n              ]),\n              _: 1 /* STABLE */\n            }))\n          : _createCommentVNode(\"v-if\", true),\n        (menuType.value == \'menu\')\n          ? (_openBlock(), _createBlock(_component_n_form_item, {\n              key: 1,\n              label: \"打开方式\",\n              path: \"openMode\"\n            }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_radio_group, {\n                  value: openModeRef.value,\n                  \"onUpdate:value\": _cache[4] || (_cache[4] = $event => ((openModeRef).value = $event))\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_radio_button, {\n                      key: \"0\",\n                      value: \"0\",\n                      label: \"页签\"\n                    }),\n                    _createVNode(_component_n_radio_button, {\n                      key: \"1\",\n                      value: \"1\",\n                      label: \"新标签页\"\n                    }),\n                    _createVNode(_component_n_radio_button, {\n                      key: \"2\",\n                      value: \"2\",\n                      label: \"iframe\"\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }, 8 /* PROPS */, [\"value\"])\n              ]),\n              _: 1 /* STABLE */\n            }))\n          : _createCommentVNode(\"v-if\", true),\n        (menuType.value == \'menu\' && !(temp.value.url.startsWith(\'http\') || (temp.value.url.startsWith(\'/\') && temp.value.url.indexOf(\'.htm\') != -1)))\n          ? (_openBlock(), _createBlock(_component_n_form_item, {\n              key: 2,\n              label: \"关联组件\",\n              path: \"componentId\"\n            }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_tree_select, {\n                  value: temp.value.componentId,\n                  \"onUpdate:value\": _cache[5] || (_cache[5] = $event => ((temp.value.componentId) = $event)),\n                  options: componentTree.value,\n                  \"key-field\": \"id\",\n                  \"label-field\": \"name\",\n                  \"check-strategy\": \"child\",\n                  \"default-expand-all\": \"\"\n                }, null, 8 /* PROPS */, [\"value\", \"options\"])\n              ]),\n              _: 1 /* STABLE */\n            }))\n          : _createCommentVNode(\"v-if\", true),\n        (menuType.value == \'button\')\n          ? (_openBlock(), _createBlock(_component_n_form_item, {\n              key: 3,\n              label: \"权限标识\",\n              path: \"permission\"\n            }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_input, {\n                  value: temp.value.permission,\n                  \"onUpdate:value\": _cache[6] || (_cache[6] = $event => ((temp.value.permission) = $event))\n                }, null, 8 /* PROPS */, [\"value\"])\n              ]),\n              _: 1 /* STABLE */\n            }))\n          : _createCommentVNode(\"v-if\", true),\n        _createElementVNode(\"div\", _hoisted_1, [\n          _createElementVNode(\"div\", _hoisted_2, [\n            (menuType.value == \'menu\')\n              ? (_openBlock(), _createBlock(_component_n_form_item, {\n                  key: 0,\n                  label: \"菜单显示\",\n                  path: \"isShow\"\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_radio_group, {\n                      value: temp.value.isShow,\n                      \"onUpdate:value\": _cache[7] || (_cache[7] = $event => ((temp.value.isShow) = $event))\n                    }, {\n                      default: _withCtx(() => [\n                        (_openBlock(), _createBlock(_component_n_radio_button, {\n                          key: 1,\n                          value: 1,\n                          label: \"显示\"\n                        })),\n                        (_openBlock(), _createBlock(_component_n_radio_button, {\n                          key: 0,\n                          value: 0,\n                          label: \"不显示\"\n                        }))\n                      ]),\n                      _: 1 /* STABLE */\n                    }, 8 /* PROPS */, [\"value\"])\n                  ]),\n                  _: 1 /* STABLE */\n                }))\n              : _createCommentVNode(\"v-if\", true)\n          ]),\n          _createElementVNode(\"div\", _hoisted_3, [\n            (menuType.value == \'menu\')\n              ? (_openBlock(), _createBlock(_component_n_form_item, {\n                  key: 0,\n                  label: \"路由缓存\",\n                  path: \"keepAlive\"\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_radio_group, {\n                      value: temp.value.keepAlive,\n                      \"onUpdate:value\": _cache[8] || (_cache[8] = $event => ((temp.value.keepAlive) = $event))\n                    }, {\n                      default: _withCtx(() => [\n                        (_openBlock(), _createBlock(_component_n_radio_button, {\n                          key: 1,\n                          value: 1,\n                          label: \"缓存\"\n                        })),\n                        (_openBlock(), _createBlock(_component_n_radio_button, {\n                          key: 0,\n                          value: 0,\n                          label: \"不缓存\"\n                        }))\n                      ]),\n                      _: 1 /* STABLE */\n                    }, 8 /* PROPS */, [\"value\"])\n                  ]),\n                  _: 1 /* STABLE */\n                }))\n              : _createCommentVNode(\"v-if\", true)\n          ]),\n          _createElementVNode(\"div\", _hoisted_4, [\n            _createVNode(_component_n_form_item, {\n              label: \"排序\",\n              path: \"sort\"\n            }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_input_number, {\n                  value: temp.value.sort,\n                  \"onUpdate:value\": _cache[9] || (_cache[9] = $event => ((temp.value.sort) = $event)),\n                  \"button-placement\": \"both\"\n                }, null, 8 /* PROPS */, [\"value\"])\n              ]),\n              _: 1 /* STABLE */\n            })\n          ]),\n          _createElementVNode(\"div\", _hoisted_5, [\n            _createVNode(_component_n_form_item, {\n              label: \"图标\",\n              path: \"icon\"\n            }, {\n              default: _withCtx(() => [\n                _createElementVNode(\"a\", { onClick: openIcons }, [\n                  _createVNode(_component_n_input, {\n                    value: temp.value.icon,\n                    \"onUpdate:value\": _cache[10] || (_cache[10] = $event => ((temp.value.icon) = $event))\n                  }, {\n                    suffix: _withCtx(() => [\n                      _createVNode(_component_mb_icon, {\n                        icon: temp.value.icon\n                      }, null, 8 /* PROPS */, [\"icon\"])\n                    ]),\n                    _: 1 /* STABLE */\n                  }, 8 /* PROPS */, [\"value\"])\n                ])\n              ]),\n              _: 1 /* STABLE */\n            })\n          ])\n        ])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"size\", \"rules\", \"model\"]),\n    _createVNode(_component_mb_modal, {\n      ref_key: \"iconDialog\",\n      ref: iconDialog,\n      width: \"650px\",\n      title: \"选择图标\"\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_menu_icons, { \"select-icon\": selectIcon })\n      ]),\n      _: 1 /* STABLE */\n    }, 512 /* NEED_PATCH */)\n  ]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 13:40:18', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('c20b952d5b2747a3bc393bdaa7e86ef1', 'd17f4964dc664a4bafbd7af6a7e0596d', 'dict-items', '<template>\n    <div class=\"mb-list\" style=\"height: 600px\">\n        <div class=\"mb-search\">\n            <mb-search :where=\"tableOptions.where\" @search=\"reloadTable\" not-reset=\"dictId\"/>\n        </div>\n        <div class=\"mb-toolbar\">\n            <n-space>\n                <n-button :size=\"$global.uiSize.value\" v-permission=\"\'dict:items:save\'\" type=\"primary\" @click=\"handleCreate\">\n                    <mb-icon icon=\"AddOutline\" />\n                    添加字典项\n                </n-button>\n            </n-space>\n        </div>\n        <div class=\"mb-table\">\n            <mb-table ref=\"table\" v-bind=\"tableOptions\"/>\n        </div>\n\n        <mb-modal :size=\"$global.uiSize.value\" ref=\"formDialog\" :title=\"dialogTitle\" width=\"520px\" @confirm=\"save($event)\">\n            <n-form ref=\"dataForm\" :size=\"$global.uiSize.value\" :rules=\"rules\" :model=\"temp\" label-placement=\"left\" label-width=\"80px\">\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"标签名\" path=\"label\">\n                            <n-input v-model:value=\"temp.label\"/>\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"值\" path=\"value\">\n                            <n-input v-model:value=\"temp.value\"/>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :cols=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"排序\" path=\"sort\">\n                            <n-input-number v-model:value=\"temp.sort\" button-placement=\"both\"/>\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"备注\" path=\"remarks\">\n                            <n-input v-model:value=\"temp.remarks\"/>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n            </n-form>\n        </mb-modal>\n\n    </div>\n</template>\n\n<script setup>\n\nimport {ref, reactive, nextTick} from \'vue\'\nimport {useDictStore} from \"@/store/modules/dictStore\";\n\nconst dictStore = useDictStore()\n\nconst props = defineProps({\n    dictId: {\n        type: String,\n        default: \'\'\n    }\n})\n\nconst tableOptions = reactive({\n    id: \'dict-items\',\n    url: \'/system/dict/items/list\',\n    page: true,\n    where: {\n        label: {\n            label: \'标签\'\n        },\n        value: {\n            label: \'值\'\n        },\n        dictId: props.dictId\n    },\n    cols: [\n        {\n            field: \'label\',\n            label: \'标签\'\n        },\n        {\n            field: \'value\',\n            label: \'值\'\n        },\n        {\n            field: \'sort\',\n            label: \'排序\'\n        },\n        {\n            label: \'排序\',\n            type: \'buttons\',\n            width: 150,\n            buttons: [\n                {\n                    label: \'上移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/dict/items/sort/up\', {\n                            id: row.id,\n                            sort: row.sort,\n                            dictId: props.dictId\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                },\n                {\n                    label: \'下移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/dict/items/sort/down\', {\n                            id: row.id,\n                            sort: row.sort,\n                            dictId: props.dictId\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                }\n            ]\n        },\n        {\n            field: \'remarks\',\n            label: \'备注\'\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 160,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'dict:items:save\',\n                    label: \'修改\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'dict:items:delete\',\n                    label: \'删除\',\n                    link: true,\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/dict/items/delete\',\n                            id: row.id,\n                            done: () => {\n                                reloadTable()\n                                $common.getDictData()\n                            }\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst dialogTitle = ref(\'\')\nconst rules = reactive({\n    value: {required: true, message: \'请输入值\', trigger: \'change\'},\n    label: {required: true, message: \'请输入标签名\', trigger: \'change\'},\n    sort: {type: \'number\', required: true, message: \'请输入排序\', trigger: \'change\'}\n})\nconst temp = ref(getTemp())\nconst table = ref()\nconst formDialog = ref()\nconst dataForm = ref()\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        value: \'\',\n        label: \'\',\n        dictId: props.dictId,\n        sort: 0,\n        remarks: \'\'\n    }\n}\n\nfunction getSort() {\n    $common.get(\'/system/dict/items/sort\', {dictId: props.dictId}).then(res => {\n        temp.value.sort = res.data\n    })\n}\n\nfunction handleCreate() {\n    temp.value = getTemp()\n    getSort()\n    dialogTitle.value = \'添加\'\n    formDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            $common.post(\'/system/dict/items/save\', temp.value).then(() => {\n                d.hideLoading()\n                formDialog.value.hide()\n                $message.success(dialogTitle.value + \'成功\')\n                reloadTable()\n                dictStore.getDictData()\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction handleUpdate(row) {\n    $common.objAssign(temp.value, row)\n    dialogTitle.value = \'修改\'\n    formDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n</script>\n', '/* Analyzed bindings: {\n  \"dictId\": \"props\",\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"useDictStore\": \"setup-maybe-ref\",\n  \"dictStore\": \"setup-maybe-ref\",\n  \"props\": \"setup-reactive-const\",\n  \"tableOptions\": \"setup-reactive-const\",\n  \"dialogTitle\": \"setup-ref\",\n  \"rules\": \"setup-reactive-const\",\n  \"temp\": \"setup-ref\",\n  \"table\": \"setup-ref\",\n  \"formDialog\": \"setup-ref\",\n  \"dataForm\": \"setup-ref\",\n  \"reloadTable\": \"setup-const\",\n  \"getTemp\": \"setup-const\",\n  \"getSort\": \"setup-const\",\n  \"handleCreate\": \"setup-const\",\n  \"save\": \"setup-const\",\n  \"handleUpdate\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _resolveDirective = ___magic__import__(\'vue\', \'resolveDirective\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _withDirectives = ___magic__import__(\'vue\', \'withDirectives\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\n\nconst _hoisted_1 = {\n  class: \"mb-list\",\n  style: {\"height\":\"600px\"}\n}\nconst _hoisted_2 = { class: \"mb-search\" }\nconst _hoisted_3 = { class: \"mb-toolbar\" }\nconst _hoisted_4 = { class: \"mb-table\" }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\nconst useDictStore = ___magic__import__(\'@/store/modules/dictStore\', \'useDictStore\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  props: {\n    dictId: {\n        type: String,\n        default: \'\'\n    }\n},\n  setup(__props) {\n\n\nconst dictStore = useDictStore()\n\nconst props = __props\n\nconst tableOptions = reactive({\n    id: \'dict-items\',\n    url: \'/system/dict/items/list\',\n    page: true,\n    where: {\n        label: {\n            label: \'标签\'\n        },\n        value: {\n            label: \'值\'\n        },\n        dictId: props.dictId\n    },\n    cols: [\n        {\n            field: \'label\',\n            label: \'标签\'\n        },\n        {\n            field: \'value\',\n            label: \'值\'\n        },\n        {\n            field: \'sort\',\n            label: \'排序\'\n        },\n        {\n            label: \'排序\',\n            type: \'buttons\',\n            width: 150,\n            buttons: [\n                {\n                    label: \'上移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/dict/items/sort/up\', {\n                            id: row.id,\n                            sort: row.sort,\n                            dictId: props.dictId\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                },\n                {\n                    label: \'下移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/dict/items/sort/down\', {\n                            id: row.id,\n                            sort: row.sort,\n                            dictId: props.dictId\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                }\n            ]\n        },\n        {\n            field: \'remarks\',\n            label: \'备注\'\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 160,\n            fixed: \'right\',\n            buttons: [\n                {\n                    permission: \'dict:items:save\',\n                    label: \'修改\',\n                    link: true,\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    permission: \'dict:items:delete\',\n                    label: \'删除\',\n                    link: true,\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/dict/items/delete\',\n                            id: row.id,\n                            done: () => {\n                                reloadTable()\n                                $common.getDictData()\n                            }\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\nconst dialogTitle = ref(\'\')\nconst rules = reactive({\n    value: {required: true, message: \'请输入值\', trigger: \'change\'},\n    label: {required: true, message: \'请输入标签名\', trigger: \'change\'},\n    sort: {type: \'number\', required: true, message: \'请输入排序\', trigger: \'change\'}\n})\nconst temp = ref(getTemp())\nconst table = ref()\nconst formDialog = ref()\nconst dataForm = ref()\n\nfunction reloadTable() {\n    table.value.reload()\n}\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        value: \'\',\n        label: \'\',\n        dictId: props.dictId,\n        sort: 0,\n        remarks: \'\'\n    }\n}\n\nfunction getSort() {\n    $common.get(\'/system/dict/items/sort\', {dictId: props.dictId}).then(res => {\n        temp.value.sort = res.data\n    })\n}\n\nfunction handleCreate() {\n    temp.value = getTemp()\n    getSort()\n    dialogTitle.value = \'添加\'\n    formDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            $common.post(\'/system/dict/items/save\', temp.value).then(() => {\n                d.hideLoading()\n                formDialog.value.hide()\n                $message.success(dialogTitle.value + \'成功\')\n                reloadTable()\n                dictStore.getDictData()\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction handleUpdate(row) {\n    $common.objAssign(temp.value, row)\n    dialogTitle.value = \'修改\'\n    formDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n\nreturn (_ctx, _cache) => {\n  const _component_mb_search = _resolveComponent(\"mb-search\")\n  const _component_mb_icon = _resolveComponent(\"mb-icon\")\n  const _component_n_button = _resolveComponent(\"n-button\")\n  const _component_n_space = _resolveComponent(\"n-space\")\n  const _component_mb_table = _resolveComponent(\"mb-table\")\n  const _component_n_input = _resolveComponent(\"n-input\")\n  const _component_n_form_item = _resolveComponent(\"n-form-item\")\n  const _component_n_gi = _resolveComponent(\"n-gi\")\n  const _component_n_grid = _resolveComponent(\"n-grid\")\n  const _component_n_input_number = _resolveComponent(\"n-input-number\")\n  const _component_n_form = _resolveComponent(\"n-form\")\n  const _component_mb_modal = _resolveComponent(\"mb-modal\")\n  const _directive_permission = _resolveDirective(\"permission\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_mb_search, {\n        where: tableOptions.where,\n        onSearch: reloadTable,\n        \"not-reset\": \"dictId\"\n      }, null, 8 /* PROPS */, [\"where\"])\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createVNode(_component_n_space, null, {\n        default: _withCtx(() => [\n          _withDirectives((_openBlock(), _createBlock(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            type: \"primary\",\n            onClick: handleCreate\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_icon, { icon: \"AddOutline\" }),\n              _createTextVNode(\" 添加字典项 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])), [\n            [_directive_permission, \'dict:items:save\']\n          ])\n        ]),\n        _: 1 /* STABLE */\n      })\n    ]),\n    _createElementVNode(\"div\", _hoisted_4, [\n      _createVNode(_component_mb_table, _mergeProps({\n        ref_key: \"table\",\n        ref: table\n      }, tableOptions), null, 16 /* FULL_PROPS */)\n    ]),\n    _createVNode(_component_mb_modal, {\n      size: _ctx.$global.uiSize.value,\n      ref_key: \"formDialog\",\n      ref: formDialog,\n      title: dialogTitle.value,\n      width: \"520px\",\n      onConfirm: _cache[4] || (_cache[4] = $event => (save($event)))\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_n_form, {\n          ref_key: \"dataForm\",\n          ref: dataForm,\n          size: _ctx.$global.uiSize.value,\n          rules: rules,\n          model: temp.value,\n          \"label-placement\": \"left\",\n          \"label-width\": \"80px\"\n        }, {\n          default: _withCtx(() => [\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"标签名\",\n                      path: \"label\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.label,\n                          \"onUpdate:value\": _cache[0] || (_cache[0] = $event => ((temp.value.label) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"值\",\n                      path: \"value\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.value,\n                          \"onUpdate:value\": _cache[1] || (_cache[1] = $event => ((temp.value.value) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, { cols: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"排序\",\n                      path: \"sort\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input_number, {\n                          value: temp.value.sort,\n                          \"onUpdate:value\": _cache[2] || (_cache[2] = $event => ((temp.value.sort) = $event)),\n                          \"button-placement\": \"both\"\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"备注\",\n                      path: \"remarks\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.remarks,\n                          \"onUpdate:value\": _cache[3] || (_cache[3] = $event => ((temp.value.remarks) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            })\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"size\", \"rules\", \"model\"])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"size\", \"title\"])\n  ]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 10:57:18', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('c2e46f717eba4fa69f96358dc1587b77', '29d82244-d928-11ee-9675-c2b02ed3977b', 'configure', NULL, NULL, NULL, 0, NULL, 0, '1', '2024-03-07 10:52:41', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('c64a8b964c6e40dfbe4c3908fdea9553', '88c17402-d92a-11ee-9675-c2b02ed3977b', 'druid', '<template>\n    <iframe :src=\"$global.baseApi + \'druid/index.html\'\" width=\"100%\" height=\"100%\" frameborder=\"0\"></iframe>\n</template>\n', 'const __sfc__ = {}\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\n\nconst _hoisted_1 = [\"src\"]\nfunction render(_ctx, _cache) {\n  return (_openBlock(), _createElementBlock(\"iframe\", {\n    src: _ctx.$global.baseApi + \'druid/index.html\',\n    width: \"100%\",\n    height: \"100%\",\n    frameborder: \"0\"\n  }, null, 8 /* PROPS */, _hoisted_1))\n}\n__sfc__.render = render\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 13:52:03', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('c99bf0b5780e4f1996211c70e56f49f7', 'fc061efbc39948d59aafc3905591c935', 'user-form', '<template>\n    <n-form :size=\"$global.uiSize.value\" ref=\"dataForm\" :rules=\"rules\" :model=\"temp\" label-placement=\"left\" label-width=\"90px\">\n        <n-grid :cols=\"24\" :x-gap=\"24\">\n            <n-form-item-gi :span=\"12\" label=\"登录名称\" path=\"username\">\n                <n-input v-model:value=\"temp.username\" autocomplete=\"new-password\"/>\n            </n-form-item-gi>\n            <n-form-item-gi :span=\"12\" label=\"密码\" path=\"password\">\n                <n-input v-model:value=\"temp.password\" type=\"password\" autocomplete=\"new-password\"/>\n            </n-form-item-gi>\n        </n-grid>\n        <n-grid :cols=\"24\" :x-gap=\"24\">\n            <n-form-item-gi :span=\"12\" label=\"姓名/昵称\" path=\"name\">\n                <n-input v-model:value=\"temp.name\" autocomplete=\"new-password\"/>\n            </n-form-item-gi>\n            <n-form-item-gi :span=\"12\" label=\"手机号\" path=\"phone\">\n                <n-input v-model:value=\"temp.phone\"/>\n            </n-form-item-gi>\n        </n-grid>\n        <n-grid :cols=\"24\" :x-gap=\"24\">\n            <n-form-item-gi :span=\"12\" label=\"组织机构\" path=\"officeId\">\n                <mb-tree-select url=\"/system/user/offices\" v-model=\"temp.officeId\" :key=\"temp.officeId\"\n                                placeholder=\"请选择组织机构\"/>\n            </n-form-item-gi>\n            <n-form-item-gi :span=\"12\" label=\"选择角色\" path=\"roles\">\n                <mb-select v-model=\"temp.roles\" url=\"/system/role/all\" placeholder=\"请选择角色\" multiple />\n            </n-form-item-gi>\n        </n-grid>\n        <n-form-item label=\"登录状态\" path=\"isLogin\" v-if=\"temp.id != \'1\'\">\n            <n-radio-group v-model:value=\"temp.isLogin\">\n                <n-radio-button label=\"有效\" :value=\"0\" :key=\"0\"/>\n                <n-radio-button label=\"锁定\" :value=\"1\" :key=\"1\"/>\n            </n-radio-group>\n        </n-form-item>\n    </n-form>\n</template>\n\n<script setup>\n\nimport {ref, reactive, nextTick} from \'vue\'\n\nconst emit = defineEmits([\'reload-table\'])\n\nconst rules = reactive({\n    name: {required: true, message: \'请输入姓名/昵称\', trigger: \'change\'},\n    username: {required: true, message: \'请输入登录名称\', trigger: \'change\'},\n    roles: {required: true, message: \'请选择角色\', trigger: \'blur\'},\n    officeId: {required: true, message: \'请选择组织机构\', trigger: \'blur\'}\n})\nconst temp = ref(getTemp())\nconst dataForm = ref()\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        name: \'\',\n        username: \'\',\n        password: \'\',\n        phone: \'\',\n        isLogin: 0,\n        roles: null,\n        officeId: null\n    }\n}\n\nfunction resetTemp() {\n    rules.password = [{required: true, message: \'请输入密码\', trigger: \'change\'}]\n    temp.value = getTemp()\n    nextTick(() => {\n        nextTick(() => {\n            dataForm.value.restoreValidation()\n        })\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            $common.post(\'/system/user/save\', temp.value).then(() => {\n                d.hideLoading()\n                $message.success(d.title + \'成功\')\n                emit(\'reload-table\')\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction getInfo(row) {\n    delete rules.password\n    for (let t in temp.value) {\n        if (t !== \'roles\') {\n            temp.value[t] = row[t]\n        }\n    }\n    $common.get(\'/system/user/roles\', {userId: temp.value.id}).then((res) => {\n        temp.value.roles = res.data.join(\',\')\n    })\n}\n\ndefineExpose({save, getInfo, resetTemp})\n\n</script>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"emit\": \"setup-const\",\n  \"rules\": \"setup-reactive-const\",\n  \"temp\": \"setup-ref\",\n  \"dataForm\": \"setup-ref\",\n  \"getTemp\": \"setup-const\",\n  \"resetTemp\": \"setup-const\",\n  \"save\": \"setup-const\",\n  \"getInfo\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _createCommentVNode = ___magic__import__(\'vue\', \'createCommentVNode\');\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  emits: [\'reload-table\'],\n  setup(__props, { expose: __expose, emit: __emit }) {\n\n\nconst emit = __emit\n\nconst rules = reactive({\n    name: {required: true, message: \'请输入姓名/昵称\', trigger: \'change\'},\n    username: {required: true, message: \'请输入登录名称\', trigger: \'change\'},\n    roles: {required: true, message: \'请选择角色\', trigger: \'blur\'},\n    officeId: {required: true, message: \'请选择组织机构\', trigger: \'blur\'}\n})\nconst temp = ref(getTemp())\nconst dataForm = ref()\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        name: \'\',\n        username: \'\',\n        password: \'\',\n        phone: \'\',\n        isLogin: 0,\n        roles: null,\n        officeId: null\n    }\n}\n\nfunction resetTemp() {\n    rules.password = [{required: true, message: \'请输入密码\', trigger: \'change\'}]\n    temp.value = getTemp()\n    nextTick(() => {\n        nextTick(() => {\n            dataForm.value.restoreValidation()\n        })\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            $common.post(\'/system/user/save\', temp.value).then(() => {\n                d.hideLoading()\n                $message.success(d.title + \'成功\')\n                emit(\'reload-table\')\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction getInfo(row) {\n    delete rules.password\n    for (let t in temp.value) {\n        if (t !== \'roles\') {\n            temp.value[t] = row[t]\n        }\n    }\n    $common.get(\'/system/user/roles\', {userId: temp.value.id}).then((res) => {\n        temp.value.roles = res.data.join(\',\')\n    })\n}\n\n__expose({save, getInfo, resetTemp})\n\n\nreturn (_ctx, _cache) => {\n  const _component_n_input = _resolveComponent(\"n-input\")\n  const _component_n_form_item_gi = _resolveComponent(\"n-form-item-gi\")\n  const _component_n_grid = _resolveComponent(\"n-grid\")\n  const _component_mb_tree_select = _resolveComponent(\"mb-tree-select\")\n  const _component_mb_select = _resolveComponent(\"mb-select\")\n  const _component_n_radio_button = _resolveComponent(\"n-radio-button\")\n  const _component_n_radio_group = _resolveComponent(\"n-radio-group\")\n  const _component_n_form_item = _resolveComponent(\"n-form-item\")\n  const _component_n_form = _resolveComponent(\"n-form\")\n\n  return (_openBlock(), _createBlock(_component_n_form, {\n    size: _ctx.$global.uiSize.value,\n    ref_key: \"dataForm\",\n    ref: dataForm,\n    rules: rules,\n    model: temp.value,\n    \"label-placement\": \"left\",\n    \"label-width\": \"90px\"\n  }, {\n    default: _withCtx(() => [\n      _createVNode(_component_n_grid, {\n        cols: 24,\n        \"x-gap\": 24\n      }, {\n        default: _withCtx(() => [\n          _createVNode(_component_n_form_item_gi, {\n            span: 12,\n            label: \"登录名称\",\n            path: \"username\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_input, {\n                value: temp.value.username,\n                \"onUpdate:value\": _cache[0] || (_cache[0] = $event => ((temp.value.username) = $event)),\n                autocomplete: \"new-password\"\n              }, null, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          }),\n          _createVNode(_component_n_form_item_gi, {\n            span: 12,\n            label: \"密码\",\n            path: \"password\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_input, {\n                value: temp.value.password,\n                \"onUpdate:value\": _cache[1] || (_cache[1] = $event => ((temp.value.password) = $event)),\n                type: \"password\",\n                autocomplete: \"new-password\"\n              }, null, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          })\n        ]),\n        _: 1 /* STABLE */\n      }),\n      _createVNode(_component_n_grid, {\n        cols: 24,\n        \"x-gap\": 24\n      }, {\n        default: _withCtx(() => [\n          _createVNode(_component_n_form_item_gi, {\n            span: 12,\n            label: \"姓名/昵称\",\n            path: \"name\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_input, {\n                value: temp.value.name,\n                \"onUpdate:value\": _cache[2] || (_cache[2] = $event => ((temp.value.name) = $event)),\n                autocomplete: \"new-password\"\n              }, null, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          }),\n          _createVNode(_component_n_form_item_gi, {\n            span: 12,\n            label: \"手机号\",\n            path: \"phone\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_input, {\n                value: temp.value.phone,\n                \"onUpdate:value\": _cache[3] || (_cache[3] = $event => ((temp.value.phone) = $event))\n              }, null, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          })\n        ]),\n        _: 1 /* STABLE */\n      }),\n      _createVNode(_component_n_grid, {\n        cols: 24,\n        \"x-gap\": 24\n      }, {\n        default: _withCtx(() => [\n          _createVNode(_component_n_form_item_gi, {\n            span: 12,\n            label: \"组织机构\",\n            path: \"officeId\"\n          }, {\n            default: _withCtx(() => [\n              (_openBlock(), _createBlock(_component_mb_tree_select, {\n                url: \"/system/user/offices\",\n                modelValue: temp.value.officeId,\n                \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => ((temp.value.officeId) = $event)),\n                key: temp.value.officeId,\n                placeholder: \"请选择组织机构\"\n              }, null, 8 /* PROPS */, [\"modelValue\"]))\n            ]),\n            _: 1 /* STABLE */\n          }),\n          _createVNode(_component_n_form_item_gi, {\n            span: 12,\n            label: \"选择角色\",\n            path: \"roles\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_select, {\n                modelValue: temp.value.roles,\n                \"onUpdate:modelValue\": _cache[5] || (_cache[5] = $event => ((temp.value.roles) = $event)),\n                url: \"/system/role/all\",\n                placeholder: \"请选择角色\",\n                multiple: \"\"\n              }, null, 8 /* PROPS */, [\"modelValue\"])\n            ]),\n            _: 1 /* STABLE */\n          })\n        ]),\n        _: 1 /* STABLE */\n      }),\n      (temp.value.id != \'1\')\n        ? (_openBlock(), _createBlock(_component_n_form_item, {\n            key: 0,\n            label: \"登录状态\",\n            path: \"isLogin\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_radio_group, {\n                value: temp.value.isLogin,\n                \"onUpdate:value\": _cache[6] || (_cache[6] = $event => ((temp.value.isLogin) = $event))\n              }, {\n                default: _withCtx(() => [\n                  (_openBlock(), _createBlock(_component_n_radio_button, {\n                    label: \"有效\",\n                    value: 0,\n                    key: 0\n                  })),\n                  (_openBlock(), _createBlock(_component_n_radio_button, {\n                    label: \"锁定\",\n                    value: 1,\n                    key: 1\n                  }))\n                ]),\n                _: 1 /* STABLE */\n              }, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          }))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    _: 1 /* STABLE */\n  }, 8 /* PROPS */, [\"size\", \"rules\", \"model\"]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 14:03:32', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('d17f4964dc664a4bafbd7af6a7e0596d', '29d82244-d928-11ee-9675-c2b02ed3977b', 'dict', NULL, NULL, NULL, 0, NULL, 0, '1', '2024-03-07 10:57:01', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('d31791c8a14f4e648f3d01d5171c817c', 'fc061efbc39948d59aafc3905591c935', 'user-center', '<template>\n    <div class=\"user-center\">\n        <div style=\"widthL:35%\">\n            <mb-upload-image v-model=\"temp.headPortrait\"/>\n        </div>\n        <div style=\"width: 65%\">\n            <n-form ref=\"dataForm\" :rules=\"rules\" :model=\"temp\" label-placement=\"left\" label-width=\"80px\">\n                <n-form-item label=\"姓名/昵称\" path=\"name\">\n                    <n-input v-model:value=\"temp.name\" disabled/>\n                </n-form-item>\n                <n-form-item label=\"手机号码\" path=\"phone\">\n                    <n-input v-model:value=\"temp.phone\" maxlength=\"11\" autocomplete=\"new-password\"/>\n                </n-form-item>\n                <n-form-item label=\"当前密码\" path=\"password\">\n                    <n-input v-model:value=\"temp.password\" type=\"password\" autocomplete=\"new-password\"/>\n                </n-form-item>\n                <n-form-item label=\"新设密码\" path=\"newPassword\">\n                    <n-input v-model:value=\"temp.newPassword\" type=\"password\" autocomplete=\"new-password\"/>\n                </n-form-item>\n                <n-form-item label=\"确认密码\" path=\"confirmPassword\">\n                    <n-input v-model:value=\"temp.confirmPassword\" type=\"password\" autocomplete=\"new-password\"/>\n                </n-form-item>\n                <n-button type=\"primary\" size=\"large\" block round @click=\"save\">\n                    <m-icon style=\"margin-right: 4px\" icon=\"SaveSharp\" />\n                    保存信息\n                </n-button>\n            </n-form>\n        </div>\n    </div>\n</template>\n\n<script setup>\nimport {ref, reactive, nextTick} from \'vue\'\nimport {useUserStore} from \"@/store/modules/userStore\";\n\nconst userStore = useUserStore()\n\nconst temp = ref(getTemp())\n\nlet validatePass2 = (rule, value, callback) => {\n    if (temp.value.newPassword) {\n        if (value === \'\') {\n            callback(new Error(\'请再次输入密码\'));\n        } else if (value !== temp.value.newPassword) {\n            callback(new Error(\'两次输入密码不一致!\'));\n        } else {\n            callback();\n        }\n    } else {\n        callback();\n    }\n}\nconst rules = reactive({\n    password: [{required: true, message: \'请输入原密码\', trigger: \'change\'}, {min: 6, message: \'密码不少于6位\'}],\n    phone: [{min: 11, message: \'请输入11位手机号\', trigger: \'change\'}],\n    newPassword: [{min: 6, message: \'密码不少于6位\'}],\n    confirmPassword: [{min: 6, message: \'密码不少于6位\'}, {validator: validatePass2}],\n})\nconst dataForm = ref()\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        name: \'\',\n        password: \'\',\n        phone: \'\',\n        headPortrait: \'\',\n        newPassword: \'\',\n        confirmPassword: \'\'\n    }\n}\n\nfunction resetTemp() {\n    temp.value = getTemp()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save() {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            $common.post(\'/system/user/center/update\', temp.value).then(() => {\n                $message.success(\'修改成功\')\n            })\n        }\n    })\n}\n\n$common.objAssign(temp.value, userStore.getInfo, [\'password\'])\n</script>\n\n<style scoped>\n.user-center {\n    width: 1000px;\n    margin: 60px auto;\n    display: flex;\n}\n</style>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"useUserStore\": \"setup-maybe-ref\",\n  \"userStore\": \"setup-maybe-ref\",\n  \"temp\": \"setup-ref\",\n  \"validatePass2\": \"setup-let\",\n  \"rules\": \"setup-reactive-const\",\n  \"dataForm\": \"setup-ref\",\n  \"getTemp\": \"setup-const\",\n  \"resetTemp\": \"setup-const\",\n  \"save\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\r\nconst _pushScopeId = ___magic__import__(\'vue\', \'pushScopeId\');\r\nconst _popScopeId = ___magic__import__(\'vue\', \'popScopeId\');\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-bWItc2Zj\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"user-center\" }\nconst _hoisted_2 = { style: {\"widthL\":\"35%\"} }\nconst _hoisted_3 = { style: {\"width\":\"65%\"} }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\nconst useUserStore = ___magic__import__(\'@/store/modules/userStore\', \'useUserStore\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\nconst userStore = useUserStore()\n\nconst temp = ref(getTemp())\n\nlet validatePass2 = (rule, value, callback) => {\n    if (temp.value.newPassword) {\n        if (value === \'\') {\n            callback(new Error(\'请再次输入密码\'));\n        } else if (value !== temp.value.newPassword) {\n            callback(new Error(\'两次输入密码不一致!\'));\n        } else {\n            callback();\n        }\n    } else {\n        callback();\n    }\n}\nconst rules = reactive({\n    password: [{required: true, message: \'请输入原密码\', trigger: \'change\'}, {min: 6, message: \'密码不少于6位\'}],\n    phone: [{min: 11, message: \'请输入11位手机号\', trigger: \'change\'}],\n    newPassword: [{min: 6, message: \'密码不少于6位\'}],\n    confirmPassword: [{min: 6, message: \'密码不少于6位\'}, {validator: validatePass2}],\n})\nconst dataForm = ref()\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        name: \'\',\n        password: \'\',\n        phone: \'\',\n        headPortrait: \'\',\n        newPassword: \'\',\n        confirmPassword: \'\'\n    }\n}\n\nfunction resetTemp() {\n    temp.value = getTemp()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save() {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            $common.post(\'/system/user/center/update\', temp.value).then(() => {\n                $message.success(\'修改成功\')\n            })\n        }\n    })\n}\n\n$common.objAssign(temp.value, userStore.getInfo, [\'password\'])\n\nreturn (_ctx, _cache) => {\n  const _component_mb_upload_image = _resolveComponent(\"mb-upload-image\")\n  const _component_n_input = _resolveComponent(\"n-input\")\n  const _component_n_form_item = _resolveComponent(\"n-form-item\")\n  const _component_m_icon = _resolveComponent(\"m-icon\")\n  const _component_n_button = _resolveComponent(\"n-button\")\n  const _component_n_form = _resolveComponent(\"n-form\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_mb_upload_image, {\n        modelValue: temp.value.headPortrait,\n        \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => ((temp.value.headPortrait) = $event))\n      }, null, 8 /* PROPS */, [\"modelValue\"])\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createVNode(_component_n_form, {\n        ref_key: \"dataForm\",\n        ref: dataForm,\n        rules: rules,\n        model: temp.value,\n        \"label-placement\": \"left\",\n        \"label-width\": \"80px\"\n      }, {\n        default: _withCtx(() => [\n          _createVNode(_component_n_form_item, {\n            label: \"姓名/昵称\",\n            path: \"name\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_input, {\n                value: temp.value.name,\n                \"onUpdate:value\": _cache[1] || (_cache[1] = $event => ((temp.value.name) = $event)),\n                disabled: \"\"\n              }, null, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          }),\n          _createVNode(_component_n_form_item, {\n            label: \"手机号码\",\n            path: \"phone\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_input, {\n                value: temp.value.phone,\n                \"onUpdate:value\": _cache[2] || (_cache[2] = $event => ((temp.value.phone) = $event)),\n                maxlength: \"11\",\n                autocomplete: \"new-password\"\n              }, null, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          }),\n          _createVNode(_component_n_form_item, {\n            label: \"当前密码\",\n            path: \"password\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_input, {\n                value: temp.value.password,\n                \"onUpdate:value\": _cache[3] || (_cache[3] = $event => ((temp.value.password) = $event)),\n                type: \"password\",\n                autocomplete: \"new-password\"\n              }, null, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          }),\n          _createVNode(_component_n_form_item, {\n            label: \"新设密码\",\n            path: \"newPassword\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_input, {\n                value: temp.value.newPassword,\n                \"onUpdate:value\": _cache[4] || (_cache[4] = $event => ((temp.value.newPassword) = $event)),\n                type: \"password\",\n                autocomplete: \"new-password\"\n              }, null, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          }),\n          _createVNode(_component_n_form_item, {\n            label: \"确认密码\",\n            path: \"confirmPassword\"\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_n_input, {\n                value: temp.value.confirmPassword,\n                \"onUpdate:value\": _cache[5] || (_cache[5] = $event => ((temp.value.confirmPassword) = $event)),\n                type: \"password\",\n                autocomplete: \"new-password\"\n              }, null, 8 /* PROPS */, [\"value\"])\n            ]),\n            _: 1 /* STABLE */\n          }),\n          _createVNode(_component_n_button, {\n            type: \"primary\",\n            size: \"large\",\n            block: \"\",\n            round: \"\",\n            onClick: save\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_m_icon, {\n                style: {\"margin-right\":\"4px\"},\n                icon: \"SaveSharp\"\n              }),\n              _createTextVNode(\" 保存信息 \")\n            ]),\n            _: 1 /* STABLE */\n          })\n        ]),\n        _: 1 /* STABLE */\n      }, 8 /* PROPS */, [\"rules\", \"model\"])\n    ])\n  ]))\n}\n}\n\n}\n__sfc__.__scopeId = \"data-v-bWItc2Zj\"\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '.user-center[data-v-bWItc2Zj] {\n    width: 1000px;\n    margin: 60px auto;\n    display: flex;\n}', 1, NULL, 0, '1', '2024-03-07 14:04:51', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('e50d9d844de247fc825c8f4d4509da79', '9c302653077d47dc9374ba48b9fda579', 'role-assign-permissions', '<template>\n    <mb-tree\n        ref=\"tree\"\n        v-model=\"menus\"\n        style=\"height: 320px\"\n        url=\"/system/menu/tree\"\n        search\n        checkable\n        search-width=\"230px\"\n    />\n</template>\n\n<script setup>\nimport {ref} from \'vue\'\n\nconst emit = defineEmits([\'close\'])\nconst props = defineProps({\n    id: {\n        type: String,\n        default: \'\'\n    }\n})\n\nconst menus = ref(\'\')\n\n$common.get(\'/system/menu/by/role\', {roleId: props.id}).then(res => {\n    menus.value = res.data.join(\',\')\n})\n\nfunction save(d) {\n    d.loading()\n    $common.post(\'/system/role/save\', {\n        id: props.id,\n        menus: menus.value\n    }).then((response) => {\n        d.hideLoading()\n        $message.success(\'分配成功\')\n        emit(\'close\')\n    }).catch(() => d.hideLoading())\n}\n\ndefineExpose({save})\n\n</script>\n', '/* Analyzed bindings: {\n  \"id\": \"props\",\n  \"ref\": \"setup-const\",\n  \"emit\": \"setup-const\",\n  \"props\": \"setup-reactive-const\",\n  \"menus\": \"setup-ref\",\n  \"save\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  props: {\n    id: {\n        type: String,\n        default: \'\'\n    }\n},\n  emits: [\'close\'],\n  setup(__props, { expose: __expose, emit: __emit }) {\n\nconst emit = __emit\nconst props = __props\n\nconst menus = ref(\'\')\n\n$common.get(\'/system/menu/by/role\', {roleId: props.id}).then(res => {\n    menus.value = res.data.join(\',\')\n})\n\nfunction save(d) {\n    d.loading()\n    $common.post(\'/system/role/save\', {\n        id: props.id,\n        menus: menus.value\n    }).then((response) => {\n        d.hideLoading()\n        $message.success(\'分配成功\')\n        emit(\'close\')\n    }).catch(() => d.hideLoading())\n}\n\n__expose({save})\n\n\nreturn (_ctx, _cache) => {\n  const _component_mb_tree = _resolveComponent(\"mb-tree\")\n\n  return (_openBlock(), _createBlock(_component_mb_tree, {\n    ref: \"tree\",\n    modelValue: menus.value,\n    \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => ((menus).value = $event)),\n    style: {\"height\":\"320px\"},\n    url: \"/system/menu/tree\",\n    search: \"\",\n    checkable: \"\",\n    \"search-width\": \"230px\"\n  }, null, 8 /* PROPS */, [\"modelValue\"]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 13:57:14', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('e9cf6dae-d929-11ee-9675-c2b02ed3977b', '29d82244-d928-11ee-9675-c2b02ed3977b', 'office', NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, '1', '2024-03-04 13:58:44');
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('ef58200e5ca649f8a3c6f1d3ad66f250', 'fc19e04fa384462d9948c18092f30287', 'menu-icons', '<template>\n    <div class=\"icons-container\">\n        <n-tabs type=\"line\" animated>\n            <n-tab-pane v-for=\"tab in tabs\" :name=\"tab.name\" :tab=\"tab.tab\">\n                <div class=\"grid\">\n                    <div v-for=\"icon of tab.icons\" :key=\"icon\" @click=\"selectIcon(icon)\">\n                        <n-tooltip placement=\"top\" trigger=\"hover\">\n                            <template #trigger>\n                                <mb-icon :icon=\"icon\" size=\"2em\" />\n                            </template>\n                            <div class=\"icon-item\">\n                                <span>{{ icon }}</span>\n                            </div>\n                        </n-tooltip>\n                    </div>\n                </div>\n            </n-tab-pane>\n        </n-tabs>\n    </div>\n</template>\n\n<script setup>\nimport svgIcons from \'@/scripts/svg-icons\'\nimport xicons from \'@/scripts/xicons\'\nimport { ref } from \'vue\'\nconst props = defineProps({\n  selectIcon: Function\n})\nconst tabs = ref([{\n    name: \'dynamic\',\n    tab: \'自定义\',\n    icons: svgIcons\n}, {\n    name: \'xicons\',\n    tab: \'xicons\',\n    icons: Object.keys(xicons)\n}])\n</script>\n\n<style scoped>\n.icons-container {\n    margin: 10px 20px 0;\n    overflow: hidden;\n}\n\n.icons-container .grid {\n    position: relative;\n    display: grid;\n    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));\n}\n\n.icons-container .icon-item {\n    margin: 20px;\n    height: 85px;\n    text-align: center;\n    width: 100px;\n    float: left;\n    font-size: 30px;\n    color: #24292e;\n    cursor: pointer;\n}\n\n.icons-container span {\n    display: block;\n    font-size: 16px;\n    margin-top: 10px;\n}\n\n.icons-container .disabled {\n    pointer-events: none;\n}\n</style>\n', '/* Analyzed bindings: {\n  \"selectIcon\": \"props\",\n  \"svgIcons\": \"setup-maybe-ref\",\n  \"xicons\": \"setup-maybe-ref\",\n  \"ref\": \"setup-const\",\n  \"props\": \"setup-reactive-const\",\n  \"tabs\": \"setup-ref\"\n} */\nconst _renderList = ___magic__import__(\'vue\', \'renderList\');\r\nconst _Fragment = ___magic__import__(\'vue\', \'Fragment\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\r\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _toDisplayString = ___magic__import__(\'vue\', \'toDisplayString\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _pushScopeId = ___magic__import__(\'vue\', \'pushScopeId\');\r\nconst _popScopeId = ___magic__import__(\'vue\', \'popScopeId\');\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-bWItc2Zj\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"icons-container\" }\nconst _hoisted_2 = { class: \"grid\" }\nconst _hoisted_3 = [\"onClick\"]\nconst _hoisted_4 = { class: \"icon-item\" }\n\nconst svgIcons = ___magic__import__(\'@/scripts/svg-icons\', \'*\');\nconst xicons = ___magic__import__(\'@/scripts/xicons\', \'*\');\nconst ref = ___magic__import__(\'vue\', \'ref\');\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  props: {\n  selectIcon: Function\n},\n  setup(__props) {\n\nconst props = __props\nconst tabs = ref([{\n    name: \'dynamic\',\n    tab: \'自定义\',\n    icons: svgIcons\n}, {\n    name: \'xicons\',\n    tab: \'xicons\',\n    icons: Object.keys(xicons)\n}])\n\nreturn (_ctx, _cache) => {\n  const _component_mb_icon = _resolveComponent(\"mb-icon\")\n  const _component_n_tooltip = _resolveComponent(\"n-tooltip\")\n  const _component_n_tab_pane = _resolveComponent(\"n-tab-pane\")\n  const _component_n_tabs = _resolveComponent(\"n-tabs\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createVNode(_component_n_tabs, {\n      type: \"line\",\n      animated: \"\"\n    }, {\n      default: _withCtx(() => [\n        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tabs.value, (tab) => {\n          return (_openBlock(), _createBlock(_component_n_tab_pane, {\n            name: tab.name,\n            tab: tab.tab\n          }, {\n            default: _withCtx(() => [\n              _createElementVNode(\"div\", _hoisted_2, [\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tab.icons, (icon) => {\n                  return (_openBlock(), _createElementBlock(\"div\", {\n                    key: icon,\n                    onClick: $event => (__props.selectIcon(icon))\n                  }, [\n                    _createVNode(_component_n_tooltip, {\n                      placement: \"top\",\n                      trigger: \"hover\"\n                    }, {\n                      trigger: _withCtx(() => [\n                        _createVNode(_component_mb_icon, {\n                          icon: icon,\n                          size: \"2em\"\n                        }, null, 8 /* PROPS */, [\"icon\"])\n                      ]),\n                      default: _withCtx(() => [\n                        _createElementVNode(\"div\", _hoisted_4, [\n                          _createElementVNode(\"span\", null, _toDisplayString(icon), 1 /* TEXT */)\n                        ])\n                      ]),\n                      _: 2 /* DYNAMIC */\n                    }, 1024 /* DYNAMIC_SLOTS */)\n                  ], 8 /* PROPS */, _hoisted_3))\n                }), 128 /* KEYED_FRAGMENT */))\n              ])\n            ]),\n            _: 2 /* DYNAMIC */\n          }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"name\", \"tab\"]))\n        }), 256 /* UNKEYED_FRAGMENT */))\n      ]),\n      _: 1 /* STABLE */\n    })\n  ]))\n}\n}\n\n}\n__sfc__.__scopeId = \"data-v-bWItc2Zj\"\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '.icons-container[data-v-bWItc2Zj] {\n    margin: 10px 20px 0;\n    overflow: hidden;\n}\n.icons-container .grid[data-v-bWItc2Zj] {\n    position: relative;\n    display: grid;\n    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));\n}\n.icons-container .icon-item[data-v-bWItc2Zj] {\n    margin: 20px;\n    height: 85px;\n    text-align: center;\n    width: 100px;\n    float: left;\n    font-size: 30px;\n    color: #24292e;\n    cursor: pointer;\n}\n.icons-container span[data-v-bWItc2Zj] {\n    display: block;\n    font-size: 16px;\n    margin-top: 10px;\n}\n.icons-container .disabled[data-v-bWItc2Zj] {\n    pointer-events: none;\n}', 1, NULL, 0, '1', '2024-03-07 13:41:23', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('fc061efbc39948d59aafc3905591c935', '29d82244-d928-11ee-9675-c2b02ed3977b', 'user', NULL, NULL, NULL, 0, NULL, 0, '1', '2024-03-07 14:03:01', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('fc19e04fa384462d9948c18092f30287', '29d82244-d928-11ee-9675-c2b02ed3977b', 'menu', NULL, NULL, NULL, 0, NULL, 0, '1', '2024-03-07 13:39:07', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('fd89dd1d66ae429689bdd978162b4caf', '88c17402-d92a-11ee-9675-c2b02ed3977b', 'online-user', '<template>\n    <div style=\"height: 100%\">\n        <mb-list ref=\"magicList\" v-bind=\"listOptions\"/>\n        <mb-modal ref=\"magicDialog\" title=\"提示\" width=\"600px\" @confirm=\"disable\">\n            <n-grid :cols=\"24\">\n                <n-gi :span=\"24\">\n                    确定要踢“{{ currRow.username }}”下线并临时封禁吗？\n                </n-gi>\n                <n-gi :span=\"24\">\n                    <n-radio-group v-model:value=\"time\">\n                        <n-space>\n                            <n-radio v-for=\"option in options\" :key=\"option.value\" :value=\"option.value\">\n                                {{ option.label }}\n                            </n-radio>\n                        </n-space>\n                    </n-radio-group>\n                </n-gi>\n            </n-grid>\n        </mb-modal>\n    </div>\n</template>\n\n<script setup>\nimport {reactive, ref} from \"vue\";\n\nconst magicList = ref()\nconst magicDialog = ref()\nconst currRow = ref()\nconst time = ref(0)\nconst options = reactive([{\n    label: \'不封禁\',\n    value: 0\n}, {\n    label: \'1分钟\',\n    value: 60\n}, {\n    label: \'10分钟\',\n    value: 10 * 60\n}, {\n    label: \'1小时\',\n    value: 1 * 60 * 60\n}, {\n    label: \'5小时\',\n    value: 5 * 60 * 60\n}, {\n    label: \'永久\',\n    value: -1\n}])\nconst listOptions = reactive({\n    table: {\n        url: \'/system/online/list\',\n        where: {\n            username: {\n                label: \'登录名称\',\n            },\n            ip: {\n                label: \'IP\',\n            }\n        },\n        cols: [\n            {\n                field: \'username\',\n                label: \'登录名称\'\n            }, {\n                field: \'officeName\',\n                label: \'所属机构\'\n            }, {\n                field: \'address\',\n                label: \'登录地址\'\n            }, {\n                field: \'ip\',\n                label: \'IP\'\n            }, {\n                field: \'browser\',\n                label: \'浏览器\'\n            }, {\n                field: \'os\',\n                label: \'操作系统\',\n                props: {\n                    \"show-overflow-tooltip\": true\n                }\n            }, {\n                field: \'createDate\',\n                label: \'登录时间\'\n            }, {\n                label: \'操作\',\n                type: \'buttons\',\n                width: 140,\n                fixed: \'right\',\n                buttons: [\n                    {\n                        permission: \'online:logout\',\n                        label: \'踢人\',\n                        type: \'primary\',\n                        link: true,\n                        icon: \'ElIconBicycle\',\n                        click: (row) => {\n                            console.log(row)\n                            currRow.value = row\n                            magicDialog.value.show()\n                            // $dialog.warning({\n                            //   title: \'提示\',\n                            //   content: `确定要踢“${row.username}”下线吗？`,\n                            //   positiveText: \'确定\',\n                            //   negativeText: \'取消\',\n                            //   onPositiveClick: () => {\n                            //     $common.get(\'/system/online/logout\',{ token: row.token }).then(() => {\n                            //       magicList.value.reload()\n                            //     })\n                            //   }\n                            // })\n                        }\n                    }\n                ]\n            }\n        ]\n    }\n})\n\nfunction disable() {\n    $common.get(\'/system/online/logout\', {id: currRow.value.id, time: time.value}).then(() => {\n        magicDialog.value.hide()\n        magicList.value.reload()\n    })\n}\n</script>\n', '/* Analyzed bindings: {\n  \"reactive\": \"setup-const\",\n  \"ref\": \"setup-const\",\n  \"magicList\": \"setup-ref\",\n  \"magicDialog\": \"setup-ref\",\n  \"currRow\": \"setup-ref\",\n  \"time\": \"setup-ref\",\n  \"options\": \"setup-reactive-const\",\n  \"listOptions\": \"setup-reactive-const\",\n  \"disable\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _toDisplayString = ___magic__import__(\'vue\', \'toDisplayString\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _renderList = ___magic__import__(\'vue\', \'renderList\');\r\nconst _Fragment = ___magic__import__(\'vue\', \'Fragment\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\n\nconst _hoisted_1 = { style: {\"height\":\"100%\"} }\n\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst ref = ___magic__import__(\'vue\', \'ref\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\nconst magicList = ref()\nconst magicDialog = ref()\nconst currRow = ref()\nconst time = ref(0)\nconst options = reactive([{\n    label: \'不封禁\',\n    value: 0\n}, {\n    label: \'1分钟\',\n    value: 60\n}, {\n    label: \'10分钟\',\n    value: 10 * 60\n}, {\n    label: \'1小时\',\n    value: 1 * 60 * 60\n}, {\n    label: \'5小时\',\n    value: 5 * 60 * 60\n}, {\n    label: \'永久\',\n    value: -1\n}])\nconst listOptions = reactive({\n    table: {\n        url: \'/system/online/list\',\n        where: {\n            username: {\n                label: \'登录名称\',\n            },\n            ip: {\n                label: \'IP\',\n            }\n        },\n        cols: [\n            {\n                field: \'username\',\n                label: \'登录名称\'\n            }, {\n                field: \'officeName\',\n                label: \'所属机构\'\n            }, {\n                field: \'address\',\n                label: \'登录地址\'\n            }, {\n                field: \'ip\',\n                label: \'IP\'\n            }, {\n                field: \'browser\',\n                label: \'浏览器\'\n            }, {\n                field: \'os\',\n                label: \'操作系统\',\n                props: {\n                    \"show-overflow-tooltip\": true\n                }\n            }, {\n                field: \'createDate\',\n                label: \'登录时间\'\n            }, {\n                label: \'操作\',\n                type: \'buttons\',\n                width: 140,\n                fixed: \'right\',\n                buttons: [\n                    {\n                        permission: \'online:logout\',\n                        label: \'踢人\',\n                        type: \'primary\',\n                        link: true,\n                        icon: \'ElIconBicycle\',\n                        click: (row) => {\n                            console.log(row)\n                            currRow.value = row\n                            magicDialog.value.show()\n                            // $dialog.warning({\n                            //   title: \'提示\',\n                            //   content: `确定要踢“${row.username}”下线吗？`,\n                            //   positiveText: \'确定\',\n                            //   negativeText: \'取消\',\n                            //   onPositiveClick: () => {\n                            //     $common.get(\'/system/online/logout\',{ token: row.token }).then(() => {\n                            //       magicList.value.reload()\n                            //     })\n                            //   }\n                            // })\n                        }\n                    }\n                ]\n            }\n        ]\n    }\n})\n\nfunction disable() {\n    $common.get(\'/system/online/logout\', {id: currRow.value.id, time: time.value}).then(() => {\n        magicDialog.value.hide()\n        magicList.value.reload()\n    })\n}\n\nreturn (_ctx, _cache) => {\n  const _component_mb_list = _resolveComponent(\"mb-list\")\n  const _component_n_gi = _resolveComponent(\"n-gi\")\n  const _component_n_radio = _resolveComponent(\"n-radio\")\n  const _component_n_space = _resolveComponent(\"n-space\")\n  const _component_n_radio_group = _resolveComponent(\"n-radio-group\")\n  const _component_n_grid = _resolveComponent(\"n-grid\")\n  const _component_mb_modal = _resolveComponent(\"mb-modal\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createVNode(_component_mb_list, _mergeProps({\n      ref_key: \"magicList\",\n      ref: magicList\n    }, listOptions), null, 16 /* FULL_PROPS */),\n    _createVNode(_component_mb_modal, {\n      ref_key: \"magicDialog\",\n      ref: magicDialog,\n      title: \"提示\",\n      width: \"600px\",\n      onConfirm: disable\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_n_grid, { cols: 24 }, {\n          default: _withCtx(() => [\n            _createVNode(_component_n_gi, { span: 24 }, {\n              default: _withCtx(() => [\n                _createTextVNode(\" 确定要踢“\" + _toDisplayString(currRow.value.username) + \"”下线并临时封禁吗？ \", 1 /* TEXT */)\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_gi, { span: 24 }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_radio_group, {\n                  value: time.value,\n                  \"onUpdate:value\": _cache[0] || (_cache[0] = $event => ((time).value = $event))\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_space, null, {\n                      default: _withCtx(() => [\n                        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(options, (option) => {\n                          return (_openBlock(), _createBlock(_component_n_radio, {\n                            key: option.value,\n                            value: option.value\n                          }, {\n                            default: _withCtx(() => [\n                              _createTextVNode(_toDisplayString(option.label), 1 /* TEXT */)\n                            ]),\n                            _: 2 /* DYNAMIC */\n                          }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"value\"]))\n                        }), 128 /* KEYED_FRAGMENT */))\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }, 8 /* PROPS */, [\"value\"])\n              ]),\n              _: 1 /* STABLE */\n            })\n          ]),\n          _: 1 /* STABLE */\n        })\n      ]),\n      _: 1 /* STABLE */\n    }, 512 /* NEED_PATCH */)\n  ]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, '1', '2024-03-07 13:52:19', NULL, NULL);
INSERT INTO `sys_dynamic_component` (`id`, `pid`, `name`, `source_code`, `compile_js`, `compile_css`, `type`, `remark`, `is_del`, `create_by`, `create_date`, `update_by`, `update_date`) VALUES ('fe533026-d929-11ee-9675-c2b02ed3977b', 'e9cf6dae-d929-11ee-9675-c2b02ed3977b', 'office-list', '<template>\n    <div class=\"mb-list\">\n        <div class=\"mb-search\">\n            <n-space>\n                <n-input :size=\"$global.uiSize.value\" v-model:value=\"searchValue\" @keyup.enter=\"searchOffice\" placeholder=\"菜单名称、链接、权限标识\"\n                         style=\"width: 200px\"></n-input>\n                <n-button :size=\"$global.uiSize.value\" type=\"primary\" @click=\"searchOffice\">\n                    <mb-icon icon=\"Search\" />\n                    搜索\n                </n-button>\n                <n-button :size=\"$global.uiSize.value\" @click=\"() => { searchValue = \'\'; searchOffice() }\">\n                    <mb-icon icon=\"TrashOutline\" />\n                    清空\n                </n-button>\n            </n-space>\n        </div>\n        <div class=\"mb-toolbar\">\n            <n-space>\n                <n-button :size=\"$global.uiSize.value\" type=\"primary\" @click=\"addSubOffice(\'0\')\" v-permission=\"\'office:save\'\">\n                    <mb-icon icon=\"AddOutline\" />\n                    添加机构\n                </n-button>\n                <n-button :size=\"$global.uiSize.value\" type=\"primary\" @click=\"() => table.toggleExpand()\">\n                    <mb-icon icon=\"ArrowDownOutline\" />\n                    展开/折叠\n                </n-button>\n            </n-space>\n        </div>\n        <div class=\"mb-table\">\n            <mb-table ref=\"table\" v-bind=\"tableOptions\"/>\n        </div>\n        <mb-modal :size=\"$global.uiSize.value\" ref=\"officeFormDialog\" width=\"700px\" :title=\"dialogTitle\" @confirm=\"save($event)\">\n            <n-form :size=\"$global.uiSize.value\" ref=\"dataForm\" :rules=\"rules\" :model=\"temp\" label-placement=\"left\" label-width=\"80px\">\n                <n-grid :cols=\"24\" :x-gap=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"机构类型\" path=\"type\">\n                            <mb-select v-model=\"temp.type\" type=\"office_type\" width=\"100%\" :key=\"temp.type\"/>\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"上级机构\" path=\"pid\">\n                            <n-tree-select\n                                v-model:value=\"temp.pid\"\n                                :options=\"officeTree\"\n                            />\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :cols=\"24\" :x-gap=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"机构名称\" path=\"name\">\n                            <n-input v-model:value=\"temp.name\"/>\n                        </n-form-item>\n                    </n-gi>\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"机构编码\" path=\"code\">\n                            <n-input v-model:value=\"temp.code\"/>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n                <n-grid :gutter=\"24\" :x-gap=\"24\">\n                    <n-gi :span=\"12\">\n                        <n-form-item label=\"排序\" prop=\"sort\">\n                            <n-input-number v-model:value=\"temp.sort\" button-placement=\"both\"/>\n                        </n-form-item>\n                    </n-gi>\n                </n-grid>\n            </n-form>\n        </mb-modal>\n    </div>\n</template>\n\n<script setup>\n\nimport {ref, reactive, onMounted, watch, nextTick} from \'vue\'\nimport {push} from \'@/scripts/router\'\n\nconst officeData = ref([])\nconst officeTree = ref([])\nconst searchValue = ref(\'\')\nconst table = ref()\nconst tableOptions = reactive({\n    id: \'office-list\',\n    loading: false,\n    showNo: false,\n    page: false,\n    cols: [\n        {\n            field: \'name\',\n            label: \'机构名称\',\n            align: \'left\',\n            type: \'html\',\n            width: 280\n        },\n        {\n            field: \'code\',\n            label: \'机构编码\',\n            width: 120,\n            align: \'center\',\n            type: \'html\'\n        },\n        {\n            field: \'type\',\n            dictType: \'office_type\',\n            label: \'机构类型\',\n            width: 300,\n            align: \'center\'\n        },\n        {\n            field: \'sort\',\n            label: \'序号\',\n            width: 60,\n            align: \"center\"\n        },\n        {\n            label: \'排序\',\n            type: \'buttons\',\n            width: 160,\n            buttons: [\n                {\n                    label: \'上移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/office/sort/up\', {\n                            id: row.id,\n                            pid: row.pid,\n                            sort: row.sort\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                },\n                {\n                    label: \'下移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/office/sort/down\', {\n                            id: row.id,\n                            pid: row.pid,\n                            sort: row.sort\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                }\n            ]\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 360,\n            fixed: \'right\',\n            align: \'center\',\n            buttons: [\n                {\n                    label: \'添加下级机构\',\n                    link: true,\n                    permission: \'office:save\',\n                    click: (row) => {\n                        addSubOffice(row.id)\n                    }\n                },\n                {\n                    label: \'修改\',\n                    link: true,\n                    permission: \'office:save\',\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    label: \'删除\',\n                    link: true,\n                    permission: \'office:delete\',\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/office/delete\',\n                            id: row.id,\n                            done: () => reloadTable()\n                        })\n                    }\n                },\n                {\n                    permission: \'office:user:list\',\n                    label: \'用户列表\',\n                    link: true,\n                    click: (row) => {\n                        push({\n                            path: \'/system/user/user-list\',\n                            query: {officeId: row.id}\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\n\nconst dialogTitle = ref(\'\')\nconst temp = ref(getTemp())\nconst rules = reactive({\n    type: {required: true, message: \'请选择机构类型\', trigger: \'change\'},\n    pid: {required: true, message: \'请选择上级机构\', trigger: \'change\'},\n    name: {required: true, message: \'请输入机构名称\', trigger: \'change\'},\n    code: {required: true, message: \'请输入机构编码\', trigger: \'change\'}\n})\nconst officeFormDialog = ref()\nconst dataForm = ref()\n\nonMounted(() => reloadTable())\n\nwatch(officeData, () => {\n    officeTree.value = [{\n        label: \'根节点\',\n        key: \'0\',\n        children: $treeTable.genTree(officeData.value)\n    }]\n})\n\nfunction searchOffice() {\n    if (searchValue.value) {\n        tableOptions.data = $treeTable.recursionSearch([\'name\', \'code\'], $common.copyNew(officeData.value), searchValue.value)\n    } else {\n        tableOptions.data = officeData.value\n    }\n}\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        name: \'\',\n        sort: 0,\n        pid: \'\',\n        type: \'\',\n        code: \'\'\n    }\n}\n\nfunction resetTemp() {\n    temp.value = getTemp()\n}\n\nfunction getSort() {\n    $common.get(\'/system/office/sort\', {pid: temp.value.pid}).then(res => {\n        temp.value.sort = res.data\n    })\n}\n\nfunction addSubOffice(id) {\n    resetTemp()\n    temp.value.pid = id\n    temp.value.id = $common.uuid()\n    getSort()\n    dialogTitle.value = \'添加\'\n    officeFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            if (temp.value.pid == temp.value.id) {\n                $message.warning(\'上级机构不能选当前机构\')\n                return\n            }\n            if ($treeTable.isChildren($treeTable.queryChildren(officeData.value, temp.value.id), temp.value.pid)) {\n                $message.warning(\'上级机构不能选当前机构子级\')\n                return\n            }\n            $common.post(\'/system/office/save\', temp.value).then(() => {\n                d.hideLoading()\n                $message.success(dialogTitle.value + \'成功\')\n                reloadTable()\n                officeFormDialog.value.hide()\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction reloadTable() {\n    tableOptions.loading = true\n    $common.get(\'/system/office/tree\').then(res => {\n        officeData.value = res.data.list\n        tableOptions.data = officeData.value\n        tableOptions.loading = false\n    })\n}\n\nfunction handleUpdate(row) {\n    for (let t in temp.value) {\n        temp.value[t] = row[t]\n    }\n    $treeTable.clearFont(temp.value, [\'name\', \'code\'])\n    dialogTitle.value = \'修改\'\n    officeFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n</script>\n', '/* Analyzed bindings: {\n  \"ref\": \"setup-const\",\n  \"reactive\": \"setup-const\",\n  \"onMounted\": \"setup-const\",\n  \"watch\": \"setup-const\",\n  \"nextTick\": \"setup-const\",\n  \"push\": \"setup-maybe-ref\",\n  \"officeData\": \"setup-ref\",\n  \"officeTree\": \"setup-ref\",\n  \"searchValue\": \"setup-ref\",\n  \"table\": \"setup-ref\",\n  \"tableOptions\": \"setup-reactive-const\",\n  \"dialogTitle\": \"setup-ref\",\n  \"temp\": \"setup-ref\",\n  \"rules\": \"setup-reactive-const\",\n  \"officeFormDialog\": \"setup-ref\",\n  \"dataForm\": \"setup-ref\",\n  \"searchOffice\": \"setup-const\",\n  \"getTemp\": \"setup-const\",\n  \"resetTemp\": \"setup-const\",\n  \"getSort\": \"setup-const\",\n  \"addSubOffice\": \"setup-const\",\n  \"save\": \"setup-const\",\n  \"reloadTable\": \"setup-const\",\n  \"handleUpdate\": \"setup-const\"\n} */\nconst _resolveComponent = ___magic__import__(\'vue\', \'resolveComponent\');\r\nconst _withKeys = ___magic__import__(\'vue\', \'withKeys\');\r\nconst _createVNode = ___magic__import__(\'vue\', \'createVNode\');\r\nconst _createTextVNode = ___magic__import__(\'vue\', \'createTextVNode\');\r\nconst _withCtx = ___magic__import__(\'vue\', \'withCtx\');\r\nconst _createElementVNode = ___magic__import__(\'vue\', \'createElementVNode\');\r\nconst _resolveDirective = ___magic__import__(\'vue\', \'resolveDirective\');\r\nconst _openBlock = ___magic__import__(\'vue\', \'openBlock\');\r\nconst _createBlock = ___magic__import__(\'vue\', \'createBlock\');\r\nconst _withDirectives = ___magic__import__(\'vue\', \'withDirectives\');\r\nconst _mergeProps = ___magic__import__(\'vue\', \'mergeProps\');\r\nconst _createElementBlock = ___magic__import__(\'vue\', \'createElementBlock\');\n\nconst _hoisted_1 = { class: \"mb-list\" }\nconst _hoisted_2 = { class: \"mb-search\" }\nconst _hoisted_3 = { class: \"mb-toolbar\" }\nconst _hoisted_4 = { class: \"mb-table\" }\n\nconst ref = ___magic__import__(\'vue\', \'ref\');\r\nconst reactive = ___magic__import__(\'vue\', \'reactive\');\r\nconst onMounted = ___magic__import__(\'vue\', \'onMounted\');\r\nconst watch = ___magic__import__(\'vue\', \'watch\');\r\nconst nextTick = ___magic__import__(\'vue\', \'nextTick\');\nconst push = ___magic__import__(\'@/scripts/router\', \'push\');\n\n\nconst __sfc__ = {\n  __name: \'mb-sfc-compiler\',\n  setup(__props) {\n\n\nconst officeData = ref([])\nconst officeTree = ref([])\nconst searchValue = ref(\'\')\nconst table = ref()\nconst tableOptions = reactive({\n    id: \'office-list\',\n    loading: false,\n    showNo: false,\n    page: false,\n    cols: [\n        {\n            field: \'name\',\n            label: \'机构名称\',\n            align: \'left\',\n            type: \'html\',\n            width: 280\n        },\n        {\n            field: \'code\',\n            label: \'机构编码\',\n            width: 120,\n            align: \'center\',\n            type: \'html\'\n        },\n        {\n            field: \'type\',\n            dictType: \'office_type\',\n            label: \'机构类型\',\n            width: 300,\n            align: \'center\'\n        },\n        {\n            field: \'sort\',\n            label: \'序号\',\n            width: 60,\n            align: \"center\"\n        },\n        {\n            label: \'排序\',\n            type: \'buttons\',\n            width: 160,\n            buttons: [\n                {\n                    label: \'上移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/office/sort/up\', {\n                            id: row.id,\n                            pid: row.pid,\n                            sort: row.sort\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                },\n                {\n                    label: \'下移\',\n                    link: true,\n                    click: (row) => {\n                        $common.get(\'/system/office/sort/down\', {\n                            id: row.id,\n                            pid: row.pid,\n                            sort: row.sort\n                        }).then(() => {\n                            reloadTable()\n                        })\n                    }\n                }\n            ]\n        },\n        {\n            label: \'操作\',\n            type: \'buttons\',\n            width: 360,\n            fixed: \'right\',\n            align: \'center\',\n            buttons: [\n                {\n                    label: \'添加下级机构\',\n                    link: true,\n                    permission: \'office:save\',\n                    click: (row) => {\n                        addSubOffice(row.id)\n                    }\n                },\n                {\n                    label: \'修改\',\n                    link: true,\n                    permission: \'office:save\',\n                    click: (row) => {\n                        handleUpdate(row)\n                    }\n                },\n                {\n                    label: \'删除\',\n                    link: true,\n                    permission: \'office:delete\',\n                    click: (row) => {\n                        $common.handleDelete({\n                            url: \'/system/office/delete\',\n                            id: row.id,\n                            done: () => reloadTable()\n                        })\n                    }\n                },\n                {\n                    permission: \'office:user:list\',\n                    label: \'用户列表\',\n                    link: true,\n                    click: (row) => {\n                        push({\n                            path: \'/system/user/user-list\',\n                            query: {officeId: row.id}\n                        })\n                    }\n                }\n            ]\n        }\n    ]\n})\n\nconst dialogTitle = ref(\'\')\nconst temp = ref(getTemp())\nconst rules = reactive({\n    type: {required: true, message: \'请选择机构类型\', trigger: \'change\'},\n    pid: {required: true, message: \'请选择上级机构\', trigger: \'change\'},\n    name: {required: true, message: \'请输入机构名称\', trigger: \'change\'},\n    code: {required: true, message: \'请输入机构编码\', trigger: \'change\'}\n})\nconst officeFormDialog = ref()\nconst dataForm = ref()\n\nonMounted(() => reloadTable())\n\nwatch(officeData, () => {\n    officeTree.value = [{\n        label: \'根节点\',\n        key: \'0\',\n        children: $treeTable.genTree(officeData.value)\n    }]\n})\n\nfunction searchOffice() {\n    if (searchValue.value) {\n        tableOptions.data = $treeTable.recursionSearch([\'name\', \'code\'], $common.copyNew(officeData.value), searchValue.value)\n    } else {\n        tableOptions.data = officeData.value\n    }\n}\n\nfunction getTemp() {\n    return {\n        id: \'\',\n        name: \'\',\n        sort: 0,\n        pid: \'\',\n        type: \'\',\n        code: \'\'\n    }\n}\n\nfunction resetTemp() {\n    temp.value = getTemp()\n}\n\nfunction getSort() {\n    $common.get(\'/system/office/sort\', {pid: temp.value.pid}).then(res => {\n        temp.value.sort = res.data\n    })\n}\n\nfunction addSubOffice(id) {\n    resetTemp()\n    temp.value.pid = id\n    temp.value.id = $common.uuid()\n    getSort()\n    dialogTitle.value = \'添加\'\n    officeFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\nfunction save(d) {\n    dataForm.value.validate((errors) => {\n        if (!errors) {\n            d.loading()\n            if (temp.value.pid == temp.value.id) {\n                $message.warning(\'上级机构不能选当前机构\')\n                return\n            }\n            if ($treeTable.isChildren($treeTable.queryChildren(officeData.value, temp.value.id), temp.value.pid)) {\n                $message.warning(\'上级机构不能选当前机构子级\')\n                return\n            }\n            $common.post(\'/system/office/save\', temp.value).then(() => {\n                d.hideLoading()\n                $message.success(dialogTitle.value + \'成功\')\n                reloadTable()\n                officeFormDialog.value.hide()\n            }).catch(() => d.hideLoading())\n        }\n    })\n}\n\nfunction reloadTable() {\n    tableOptions.loading = true\n    $common.get(\'/system/office/tree\').then(res => {\n        officeData.value = res.data.list\n        tableOptions.data = officeData.value\n        tableOptions.loading = false\n    })\n}\n\nfunction handleUpdate(row) {\n    for (let t in temp.value) {\n        temp.value[t] = row[t]\n    }\n    $treeTable.clearFont(temp.value, [\'name\', \'code\'])\n    dialogTitle.value = \'修改\'\n    officeFormDialog.value.show()\n    nextTick(() => {\n        dataForm.value.restoreValidation()\n    })\n}\n\n\nreturn (_ctx, _cache) => {\n  const _component_n_input = _resolveComponent(\"n-input\")\n  const _component_mb_icon = _resolveComponent(\"mb-icon\")\n  const _component_n_button = _resolveComponent(\"n-button\")\n  const _component_n_space = _resolveComponent(\"n-space\")\n  const _component_mb_table = _resolveComponent(\"mb-table\")\n  const _component_mb_select = _resolveComponent(\"mb-select\")\n  const _component_n_form_item = _resolveComponent(\"n-form-item\")\n  const _component_n_gi = _resolveComponent(\"n-gi\")\n  const _component_n_tree_select = _resolveComponent(\"n-tree-select\")\n  const _component_n_grid = _resolveComponent(\"n-grid\")\n  const _component_n_input_number = _resolveComponent(\"n-input-number\")\n  const _component_n_form = _resolveComponent(\"n-form\")\n  const _component_mb_modal = _resolveComponent(\"mb-modal\")\n  const _directive_permission = _resolveDirective(\"permission\")\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode(_component_n_space, null, {\n        default: _withCtx(() => [\n          _createVNode(_component_n_input, {\n            size: _ctx.$global.uiSize.value,\n            value: searchValue.value,\n            \"onUpdate:value\": _cache[0] || (_cache[0] = $event => ((searchValue).value = $event)),\n            onKeyup: _withKeys(searchOffice, [\"enter\"]),\n            placeholder: \"菜单名称、链接、权限标识\",\n            style: {\"width\":\"200px\"}\n          }, null, 8 /* PROPS */, [\"size\", \"value\"]),\n          _createVNode(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            type: \"primary\",\n            onClick: searchOffice\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_icon, { icon: \"Search\" }),\n              _createTextVNode(\" 搜索 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"]),\n          _createVNode(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            onClick: _cache[1] || (_cache[1] = () => { searchValue.value = \'\'; searchOffice() })\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_icon, { icon: \"TrashOutline\" }),\n              _createTextVNode(\" 清空 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])\n        ]),\n        _: 1 /* STABLE */\n      })\n    ]),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createVNode(_component_n_space, null, {\n        default: _withCtx(() => [\n          _withDirectives((_openBlock(), _createBlock(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            type: \"primary\",\n            onClick: _cache[2] || (_cache[2] = $event => (addSubOffice(\'0\')))\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_icon, { icon: \"AddOutline\" }),\n              _createTextVNode(\" 添加机构 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])), [\n            [_directive_permission, \'office:save\']\n          ]),\n          _createVNode(_component_n_button, {\n            size: _ctx.$global.uiSize.value,\n            type: \"primary\",\n            onClick: _cache[3] || (_cache[3] = () => table.value.toggleExpand())\n          }, {\n            default: _withCtx(() => [\n              _createVNode(_component_mb_icon, { icon: \"ArrowDownOutline\" }),\n              _createTextVNode(\" 展开/折叠 \")\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"size\"])\n        ]),\n        _: 1 /* STABLE */\n      })\n    ]),\n    _createElementVNode(\"div\", _hoisted_4, [\n      _createVNode(_component_mb_table, _mergeProps({\n        ref_key: \"table\",\n        ref: table\n      }, tableOptions), null, 16 /* FULL_PROPS */)\n    ]),\n    _createVNode(_component_mb_modal, {\n      size: _ctx.$global.uiSize.value,\n      ref_key: \"officeFormDialog\",\n      ref: officeFormDialog,\n      width: \"700px\",\n      title: dialogTitle.value,\n      onConfirm: _cache[9] || (_cache[9] = $event => (save($event)))\n    }, {\n      default: _withCtx(() => [\n        _createVNode(_component_n_form, {\n          size: _ctx.$global.uiSize.value,\n          ref_key: \"dataForm\",\n          ref: dataForm,\n          rules: rules,\n          model: temp.value,\n          \"label-placement\": \"left\",\n          \"label-width\": \"80px\"\n        }, {\n          default: _withCtx(() => [\n            _createVNode(_component_n_grid, {\n              cols: 24,\n              \"x-gap\": 24\n            }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"机构类型\",\n                      path: \"type\"\n                    }, {\n                      default: _withCtx(() => [\n                        (_openBlock(), _createBlock(_component_mb_select, {\n                          modelValue: temp.value.type,\n                          \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => ((temp.value.type) = $event)),\n                          type: \"office_type\",\n                          width: \"100%\",\n                          key: temp.value.type\n                        }, null, 8 /* PROPS */, [\"modelValue\"]))\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"上级机构\",\n                      path: \"pid\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_tree_select, {\n                          value: temp.value.pid,\n                          \"onUpdate:value\": _cache[5] || (_cache[5] = $event => ((temp.value.pid) = $event)),\n                          options: officeTree.value\n                        }, null, 8 /* PROPS */, [\"value\", \"options\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, {\n              cols: 24,\n              \"x-gap\": 24\n            }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"机构名称\",\n                      path: \"name\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.name,\n                          \"onUpdate:value\": _cache[6] || (_cache[6] = $event => ((temp.value.name) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"机构编码\",\n                      path: \"code\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input, {\n                          value: temp.value.code,\n                          \"onUpdate:value\": _cache[7] || (_cache[7] = $event => ((temp.value.code) = $event))\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode(_component_n_grid, {\n              gutter: 24,\n              \"x-gap\": 24\n            }, {\n              default: _withCtx(() => [\n                _createVNode(_component_n_gi, { span: 12 }, {\n                  default: _withCtx(() => [\n                    _createVNode(_component_n_form_item, {\n                      label: \"排序\",\n                      prop: \"sort\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createVNode(_component_n_input_number, {\n                          value: temp.value.sort,\n                          \"onUpdate:value\": _cache[8] || (_cache[8] = $event => ((temp.value.sort) = $event)),\n                          \"button-placement\": \"both\"\n                        }, null, 8 /* PROPS */, [\"value\"])\n                      ]),\n                      _: 1 /* STABLE */\n                    })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            })\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"size\", \"rules\", \"model\"])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"size\", \"title\"])\n  ]))\n}\n}\n\n}\n__sfc__.__file = \"mb-sfc-compiler.vue\"\nreturn __sfc__', '/* No <style> tags present */', 1, NULL, 0, NULL, NULL, NULL, NULL);

-- ----------------------------
-- Table structure for sys_dynamic_component_history
-- ----------------------------
DROP TABLE IF EXISTS `sys_dynamic_component_history`;
CREATE TABLE `sys_dynamic_component_history`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `component_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '动态组件id',
  `source_code` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '源码',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT current_timestamp COMMENT '创建时间',
  `is_del` int NULL DEFAULT 0 COMMENT '是否删除0未删除 1已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '动态组件历史表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_dynamic_component_history
-- ----------------------------

-- ----------------------------
-- Table structure for sys_file
-- ----------------------------
DROP TABLE IF EXISTS `sys_file`;
CREATE TABLE `sys_file`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件相对路径',
  `sort` int NULL DEFAULT NULL COMMENT '排序',
  `external_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '外部id，其他表数据id',
  `external_type` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '外部文件类型，比如：是营业执照啊 还是 头像啊',
  `is_del` int NULL DEFAULT 0 COMMENT '删除标识',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文件表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_file
-- ----------------------------

-- ----------------------------
-- Table structure for sys_gen_info
-- ----------------------------
DROP TABLE IF EXISTS `sys_gen_info`;
CREATE TABLE `sys_gen_info`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `datasource` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '数据源',
  `table_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表名',
  `table_comment` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表注释',
  `columns` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '字段信息json',
  `info` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成信息json',
  `create_date` datetime NULL DEFAULT current_timestamp COMMENT '创建时间',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '生成表信息' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_gen_info
-- ----------------------------
INSERT INTO `sys_gen_info` VALUES (5, '', 't_data_test', '测试生成', '[{\"columnName\":\"name\",\"columnComment\":\"名字\",\"columnType\":\"varchar(255)\",\"component\":\"component: \'input\'\",\"where\":\"like\",\"save\":true,\"query\":true,\"list\":true,\"required\":true},{\"columnName\":\"sex\",\"columnComment\":\"性别\",\"columnType\":\"varchar(255)\",\"component\":\"component: \'select\'\",\"where\":\"=\",\"save\":true,\"query\":true,\"list\":true,\"required\":false,\"dictType\":\"sex\"},{\"columnName\":\"headPortrait\",\"columnComment\":\"头像\",\"columnType\":\"varchar(255)\",\"component\":\"component: \'upload-image\'\",\"where\":\"in\",\"save\":true,\"query\":true,\"list\":true,\"required\":true},{\"columnName\":\"remarks\",\"columnComment\":\"备注\",\"columnType\":\"text\",\"component\":\"component: \'input\',\\n                    props: {\\n                        type: \'textarea\'\\n                    }\\n      \",\"where\":\"<=\",\"save\":true,\"query\":true,\"list\":true,\"required\":false}]', '{\"moduleName\":\"数据管理\",\"modulePath\":\"/data\",\"businessName\":\"测试生成\",\"businessPath\":\"/test\",\"template\":\"singleTable\",\"pid\":\"d7f8d052d4864bd285c575c3cf2dce69\"}', '2022-03-28 21:56:09', '2022-05-27 13:36:55');

-- ----------------------------
-- Table structure for sys_login_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_login_log`;
CREATE TABLE `sys_login_log`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录账号',
  `fail_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '失败密码',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录类型（成功、失败）',
  `browser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览器',
  `os` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作系统',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地理位置',
  `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip地址',
  `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'token',
  `create_date` datetime NULL DEFAULT current_timestamp COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 579 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_login_log
-- ----------------------------

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `pid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父id',
  `icon` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '图标',
  `desc_ribe` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '描述',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单名称',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单链接',
  `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限',
  `sort` int NULL DEFAULT NULL COMMENT '排序',
  `component_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组件名称',
  `open_mode` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '打开方式，0：iframe  1：新标签页',
  `is_del` int NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `keep_alive` int NULL DEFAULT 1 COMMENT '是否缓存：1缓存，0不缓存',
  `is_show` int NULL DEFAULT NULL COMMENT '是否显示：1显示，0不显示',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES ('0', '', '', NULL, '功能菜单', '', '', 1, NULL, '0', 0, NULL, NULL, NULL, NULL, NULL, 1);
INSERT INTO `sys_menu` VALUES ('067343d790fd4d73b3e2ea5bb3d043f1', '99c6e9aeb6694c349f5db66e2516f069', '', '', '删除', '', 'code:gen:delete', 30, '', '0', 0, '1', '2022-03-27 22:25:27', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('06b8a427e4cd4c1ba11752070f565f20', 'b1851d1b13594e71840103c11a37a669', 'People', '', '用户管理', '/system/user/user-list', '', 50, 'bc38eb5038ce44aab4bd586fb32d79bb', '0', 0, NULL, NULL, '1', '2024-03-07 14:05:43', 1, 1);
INSERT INTO `sys_menu` VALUES ('06d8c9243e5e43bcbd1c24d10d02fbad', 'b198ae9fec6f4de8a44b7f6e097a44b3', NULL, NULL, '查看', NULL, 'data:test:view', 10, NULL, '0', 0, NULL, NULL, NULL, NULL, 1, 0);
INSERT INTO `sys_menu` VALUES ('1009eed4f46141e3aca939490d68786a', '8009eed4f46141e3aca939490d68786a', NULL, NULL, '按钮', '', '', 30, '', '0', 0, '1', '2019-11-15 10:23:07', '1', '2023-05-31 15:28:31', 0, 0);
INSERT INTO `sys_menu` VALUES ('11ac1fc1d2864f079a48d29f82dbb820', '99c6e9aeb6694c349f5db66e2516f069', '', '', '执行生成', '', 'code:gen:execute', 40, '', '0', 0, '1', '2022-05-10 16:22:38', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('1ff68fd34f35430db30540c40a2ef9db', 'af431ab748e64914a0398f00d7aa0def', '', '', '列表', '', 'component:history:list', 10, '', '0', 0, '1', '2024-03-10 23:07:35', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('24176912aa9e4b2d832f96292be3430e', '81b6845a20da4028a01a42f3eb0b4f4b', '', '', '删除', '', 'dict:items:delete', 20, NULL, '0', 0, '1', '2020-12-10 10:38:43', '1', '2021-04-30 21:37:39', 0, 0);
INSERT INTO `sys_menu` VALUES ('25162c30ae0d4297ade09539bcf81d86', '81b6845a20da4028a01a42f3eb0b4f4b', NULL, NULL, '查看', NULL, 'dict:items:view', 30, NULL, '0', 0, '1', '2022-02-05 22:07:33', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('2664b76cb2904227bce5b0f7d1dd6e7b', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '下拉框', '/examples/select-example', '', 60, NULL, '0', 0, '1', '2021-08-29 17:35:17', '1', '2022-01-21 21:57:29', 0, 1);
INSERT INTO `sys_menu` VALUES ('28c3342a6f0645fa968939a8fc66d537', 'f23e1fefbc534100915d430b5f956355', '', '', '删除', '', 'component:delete', 20, '', '0', 0, '1', '2024-03-10 23:02:30', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('2b8742fc1d2e4c92937517b95b09c50b', '81b6845a20da4028a01a42f3eb0b4f4b', '', '', '下移', '', 'dict:items:sort:down', 50, '', '0', 0, '1', '2022-05-10 16:21:40', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('35e56d173b5f4e6790883572d3104137', '99c6e9aeb6694c349f5db66e2516f069', '', '', '生成', '', 'code:gen', 20, '', '0', 0, '1', '2022-03-18 08:07:03', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('36329aad6f8e444dae4338b2124da7ba', '28216291e6a84b14aefbad91ed2b0f34', NULL, NULL, '保存', NULL, 'data:test:save', 20, NULL, '0', 0, NULL, NULL, NULL, NULL, 1, 0);
INSERT INTO `sys_menu` VALUES ('39be13ef6f0745568c80bf35202ddb2b', 'b1851d1b13594e71840103c11a37a669', 'Menu', '', '菜单管理', '/system/menu/menu-list', '', 10, '63227c407c5d40f98df2486390a6f841', '0', 0, NULL, NULL, '1', '2024-03-07 13:49:52', 1, 1);
INSERT INTO `sys_menu` VALUES ('3a0e3107402449698d86ee3cbc5272c0', '4a57f57fc7324c94b6390f1a2dd1f49a', 'database', '', '数据库监控', '/system/monitor/druid', '', 30, 'c64a8b964c6e40dfbe4c3908fdea9553', '0', 0, '1', '2022-03-05 23:21:35', '1', '2024-03-07 14:06:15', 0, 1);
INSERT INTO `sys_menu` VALUES ('3ae3a47e3bf54bb682adb10b497e6183', 'b198ae9fec6f4de8a44b7f6e097a44b3', NULL, NULL, '保存', NULL, 'data:test:save', 20, NULL, '0', 0, NULL, NULL, NULL, NULL, 1, 0);
INSERT INTO `sys_menu` VALUES ('3cac94be259c48d4ae778a13ee8fab82', '116182d1349a464fa89e24ddb349fea9', NULL, NULL, '删除', NULL, 'data:test:delete', 30, NULL, '0', 0, NULL, NULL, NULL, NULL, 1, 0);
INSERT INTO `sys_menu` VALUES ('3da5882528b640478b6d64bcbc4d1795', '99c6e9aeb6694c349f5db66e2516f069', '', '', '保存', '', 'code:gen:save', 10, '', '0', 0, '1', '2022-03-18 08:03:08', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('3e14f782d4e14998bce4f9d35c032a95', '06b8a427e4cd4c1ba11752070f565f20', '', '', '禁止登录', '', 'user:change:login:status', 40, '', '0', 0, '1', '2022-05-09 21:43:06', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('414e5d31-fe05-4e69-9983-217c10b9740a', '39be13ef6f0745568c80bf35202ddb2b', '', '', '查看', '', 'menu:view', 30, NULL, '0', 0, '1', '2021-03-25 20:40:12', '1', '2022-02-05 22:02:57', 0, 0);
INSERT INTO `sys_menu` VALUES ('43aeca5c3ac54ddeb038d2feecd32dd3', 'f23e1fefbc534100915d430b5f956355', '', '', '保存tree', '', 'component:save:tree', 30, '', '0', 0, '1', '2024-03-10 23:04:56', '1', '2024-03-10 23:05:51', 0, 0);
INSERT INTO `sys_menu` VALUES ('4526eb9c-4b7a-4945-bfa9-cddc01f36c22', '6f3594d0-5445-41e1-a13c-890a57485036', '', '', '保存', '', 'office:save', 10, NULL, '0', 0, '1', '2021-04-22 20:43:09', '1', '2022-02-05 22:04:03', 0, 0);
INSERT INTO `sys_menu` VALUES ('4807e74954c1443c811c701bacb878df', '116182d1349a464fa89e24ddb349fea9', NULL, NULL, '查看', NULL, 'data:test:view', 10, NULL, '0', 0, NULL, NULL, NULL, NULL, 1, 0);
INSERT INTO `sys_menu` VALUES ('4a57f57fc7324c94b6390f1a2dd1f49a', '0', 'Camera', '', '系统监控', '/system/monitor', '', 40, '', '0', 0, '1', '2022-03-05 17:24:21', '1', '2023-06-25 20:33:18', 0, 1);
INSERT INTO `sys_menu` VALUES ('4a9047e1c44a4e69907ca8bfe077e38a', '81b6845a20da4028a01a42f3eb0b4f4b', '', '', '上移', '', 'dict:items:sort:up', 40, '', '0', 0, '1', '2022-05-10 16:21:21', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('4d52144f827742c2aac57dd3b361d868', 'af431ab748e64914a0398f00d7aa0def', '', '', '详情', '', 'component:history:detail', 20, '', '0', 0, '1', '2024-03-10 23:08:21', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('4e0f340982ea477f9b66beca5f5d7218', '39be13ef6f0745568c80bf35202ddb2b', '', '', '上移', '', 'menu:sort:up', 40, '', '0', 0, '1', '2022-05-09 21:41:01', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('4fc65edbe0544c369b58fdfed1523537', '4a57f57fc7324c94b6390f1a2dd1f49a', 'oper-log', '', '操作日志', '/system/monitor/oper', '', 10, 'a3bdf806e89b4a5a9d9436b012d57ce9', '0', 0, '1', '2022-03-05 17:24:45', '1', '2024-03-07 14:06:04', 1, 1);
INSERT INTO `sys_menu` VALUES ('52702cf956f847e8a2d045f66eb6bfee', 'fdbdcf8b8d674ae38154bc1e57498a91', '', '', '踢人', '', 'online:logout', 10, '', '0', 0, '1', '2022-03-16 08:16:35', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('546c874267514672844cd3a019e468f7', 'c5f407478c4e4c9cbcdbee6389d2c909', '', '', '删除', '', 'dict:delete', 20, NULL, '0', 0, '1', '2020-11-11 14:11:38', '1', '2021-04-30 21:37:22', 0, 0);
INSERT INTO `sys_menu` VALUES ('5d9c050c87ad450e886290c4e93fa16f', 'f23e1fefbc534100915d430b5f956355', '', '', '获取组件最新源码', '', 'component:get:last:code', 60, '', '0', 0, '1', '2024-03-10 23:02:57', '1', '2024-03-10 23:09:32', 0, 0);
INSERT INTO `sys_menu` VALUES ('641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '0', 'ClipboardCode24Filled', '', '一些例子', '/examples', '', 20, '', '0', 0, '1', '2021-03-28 22:59:56', '1', '2023-06-25 20:31:26', 0, 1);
INSERT INTO `sys_menu` VALUES ('641592c74d5d43dfbecedc1a388edc8c', 'f23e1fefbc534100915d430b5f956355', '', '', '选择组件获取源码', '', 'component:get:code', 50, '', '0', 0, '1', '2024-03-10 23:09:16', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('6762231e-4f30-4a6b-a94e-b185e99ed608', '6f3594d0-5445-41e1-a13c-890a57485036', '', '', '删除', '', 'office:delete', 20, NULL, '0', 0, '1', '2021-04-22 20:42:56', '1', '2022-02-05 22:04:07', 0, 0);
INSERT INTO `sys_menu` VALUES ('684723f4226948aba1661292961c8f71', '8e9455740091486c914495cfb0c7faa5', '', '', '删除', '', 'role:delete', 20, NULL, '0', 0, '1', '2020-11-11 13:59:45', '1', '2021-04-30 21:36:56', 0, 0);
INSERT INTO `sys_menu` VALUES ('6f3594d0-5445-41e1-a13c-890a57485036', 'b1851d1b13594e71840103c11a37a669', 'Organization12Filled', '', '组织机构', '/system/office/office-list', '', 20, 'fe533026-d929-11ee-9675-c2b02ed3977b', '0', 0, '1', '2021-04-22 20:40:14', '1', '2024-03-07 09:10:19', 1, 1);
INSERT INTO `sys_menu` VALUES ('710c0a9195934e73b11123b62283fdc5', 'c5f407478c4e4c9cbcdbee6389d2c909', NULL, NULL, '查看', NULL, 'dict:view', 30, NULL, '0', 0, '1', '2022-02-05 22:05:51', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('713626516eaa4ba98c9daf55009b481e', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '测试表单', '/examples/test-mb-form', '', 80, '', '0', 0, '1', '2022-03-15 07:51:25', '1', '2022-03-15 07:51:34', 0, 1);
INSERT INTO `sys_menu` VALUES ('7324ad98fb51462795750bcfc1b11be2', '06b8a427e4cd4c1ba11752070f565f20', NULL, NULL, '查看', NULL, 'user:view', 30, NULL, '0', 0, '1', '2022-02-05 22:05:18', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('77469b38dedf4b398c0cea424be89c3f', '5e53c7ada9a0456dbc949c5c5d6abc41', '', '', 'zx', '/system/monitor/oper-log', '', 10, '', '0', 0, '1', '2023-07-14 13:48:23', NULL, NULL, 0, 1);
INSERT INTO `sys_menu` VALUES ('7ad229f12c8f4b57bbb9349e2ffd8932', 'b1851d1b13594e71840103c11a37a669', 'ContentSettings24Filled', '', '配置中心', '/system/configure/configure-list', '', 110, 'b94688b24b724a50945b55899d6199bc', '0', 0, '1', '2022-05-21 18:32:26', '1', '2024-03-07 10:54:11', 1, 1);
INSERT INTO `sys_menu` VALUES ('7c9ddcf803074f6c8b763517d37732a7', '6f3594d0-5445-41e1-a13c-890a57485036', '', '', '上移', '', 'office:sort:up', 50, '', '0', 0, '1', '2022-05-09 21:42:04', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('7e9203fdb630434abf7542ff111bc369', '06b8a427e4cd4c1ba11752070f565f20', '', '', '导入预览', '', 'user:import:preview', 60, '', '0', 0, '1', '2022-05-09 21:43:28', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('7f20cb25f62e48c5ac5e986e3277956f', '06b8a427e4cd4c1ba11752070f565f20', '', '', '导入', '', 'user:import', 50, '', '0', 0, '1', '2022-05-09 21:43:18', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('81b6845a20da4028a01a42f3eb0b4f4b', 'c5f407478c4e4c9cbcdbee6389d2c909', '', '', '字典项', '', '', 40, NULL, '0', 0, '1', '2020-12-10 09:35:02', '1', '2021-04-30 21:37:28', 0, 0);
INSERT INTO `sys_menu` VALUES ('833b204d5f2c402190bfca677421cfeb', '39be13ef6f0745568c80bf35202ddb2b', '', '', '删除', '', 'menu:delete', 20, NULL, '0', 0, '1', '2020-11-11 11:06:05', '1', '2021-04-30 21:36:36', 0, 0);
INSERT INTO `sys_menu` VALUES ('8bf0ebc0098c4003b353d36bec3fff19', 'bf5c1e44546341de9acee52d148d5a76', NULL, NULL, '保存', NULL, 'data:test:save', 20, NULL, '0', 0, NULL, NULL, NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('8e9455740091486c914495cfb0c7faa5', 'b1851d1b13594e71840103c11a37a669', 'Accessibility', '', '角色管理', '/system/role/role-list', '', 40, '8c426b7d397b4ffeb4c9f89b4c318fbb', '0', 0, NULL, NULL, '1', '2024-03-07 14:05:38', 1, 1);
INSERT INTO `sys_menu` VALUES ('90c5d6263fa04b5db2a1b0a626409523', '28216291e6a84b14aefbad91ed2b0f34', NULL, NULL, '查看', NULL, 'data:test:view', 10, NULL, '0', 0, NULL, NULL, NULL, NULL, 1, 0);
INSERT INTO `sys_menu` VALUES ('91a9226d1c6c4634b70dc4e9866e89cb', '39be13ef6f0745568c80bf35202ddb2b', '', '', '下移', '', 'menu:sort:down', 50, '', '0', 0, '1', '2022-05-09 21:41:12', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('91bdb7d742a64a8c8a8fdc6d3bb61581', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '可编辑表格', '/examples/editor-table', '', 40, NULL, '0', 0, '1', '2021-06-13 12:53:11', '1', '2021-06-13 12:53:11', 0, 1);
INSERT INTO `sys_menu` VALUES ('9385945c7f5f476ab38885976907db2a', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '测试外链', 'http://baidu.com', '', 90, '', '1', 0, '1', '2022-06-28 10:53:20', '1', '2023-04-27 18:52:30', 0, 1);
INSERT INTO `sys_menu` VALUES ('94071254597d4da286bb8112ad93f4ff', '8e9455740091486c914495cfb0c7faa5', '', '', '保存', '', 'role:save', 10, NULL, '0', 0, '1', '2020-11-11 13:59:27', '1', '2021-04-30 21:36:51', 0, 0);
INSERT INTO `sys_menu` VALUES ('98a47d57680f4759816028a035ccc7d3', '39be13ef6f0745568c80bf35202ddb2b', '', '', '是否显示/缓存', '', 'menu:change', 60, '', '0', 0, '1', '2022-05-09 21:41:37', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('99c6e9aeb6694c349f5db66e2516f069', 'd7f8d052d4864bd285c575c3cf2dce69', 'examples', '', '代码生成', '/lowcode/code-gen-list', '', 30, '', '0', 0, '1', '2022-03-18 08:01:25', '1', '2022-04-04 00:48:32', 1, 1);
INSERT INTO `sys_menu` VALUES ('9fe1eaae168e4b719dc880f039ccd7b7', 'fdbdcf8b8d674ae38154bc1e57498a91', '', '', '查看', '', 'online:view', 20, '', '0', 0, '1', '2022-05-10 16:16:11', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('a1564eaf9fb249a788d15bb4bce609a8', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '穿梭表格', '/examples/shuttle-table', '', 100, '', '0', 0, '1', '2023-12-05 13:51:50', NULL, NULL, 0, 1);
INSERT INTO `sys_menu` VALUES ('a224c0274f8e4ae6931e7deab75cd90b', '7ad229f12c8f4b57bbb9349e2ffd8932', '', '', '删除', '', 'configure:delete', 30, '', '0', 0, '1', '2022-05-21 18:34:48', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('a52bc9968c324813bd93a5642f5011ea', 'bccc28641f4647d3beeaef0381fdf079', NULL, NULL, '查看', NULL, 'system:role:view', 10, NULL, '0', 0, NULL, NULL, NULL, NULL, 0, NULL);
INSERT INTO `sys_menu` VALUES ('a5f2cb418ac348bca3d51b98958c4a80', '8e9455740091486c914495cfb0c7faa5', NULL, NULL, '查看', NULL, 'role:view', 30, NULL, '0', 0, '1', '2022-02-05 22:04:56', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('a7a7ba2e31504b27a02465ecf6e014c6', 'b198ae9fec6f4de8a44b7f6e097a44b3', NULL, NULL, '删除', NULL, 'data:test:delete', 30, NULL, '0', 0, NULL, NULL, NULL, NULL, 1, 0);
INSERT INTO `sys_menu` VALUES ('a9b57951790b423a91e8232aca514305', '7ad229f12c8f4b57bbb9349e2ffd8932', '', '', '保存', '', 'configure:save', 20, '', '0', 0, '1', '2022-05-21 18:34:38', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('af431ab748e64914a0398f00d7aa0def', 'f23e1fefbc534100915d430b5f956355', '', '', '历史记录', '/component/history', '', 70, '', '0', 0, '1', '2024-03-10 23:03:54', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('b1851d1b13594e71840103c11a37a669', '0', 'SettingsSharp', '', '系统设置', '/system', '', 10, '', '0', 0, NULL, NULL, '1', '2023-06-25 20:09:53', 0, 1);
INSERT INTO `sys_menu` VALUES ('b353de07f3624b4fa1c6f8b1b1e80cad', 'c5f407478c4e4c9cbcdbee6389d2c909', '', '', '保存', '', 'dict:save', 10, NULL, '0', 0, '1', '2020-11-11 14:11:28', '1', '2021-04-30 21:37:14', 0, 0);
INSERT INTO `sys_menu` VALUES ('b4e9009b24d14233a59029ec57681e2c', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '下拉表格', '/examples/select-table', '', 110, '', '0', 0, '1', '2024-02-22 13:29:05', NULL, NULL, 0, 1);
INSERT INTO `sys_menu` VALUES ('b5a77ce22eef40cba2eb1ca2794d9d8a', '6f3594d0-5445-41e1-a13c-890a57485036', NULL, NULL, '用户列表', NULL, 'office:user:list', 40, NULL, '0', 0, '1', '2022-02-04 17:44:08', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('bccc28641f4647d3beeaef0381fdf079', NULL, NULL, NULL, '角色管理', '/system/role', NULL, 10, 'system-role-list', '0', 0, NULL, NULL, NULL, NULL, 1, 1);
INSERT INTO `sys_menu` VALUES ('bee5c6cb1b484133a4b8e72fe5c5eed0', '06b8a427e4cd4c1ba11752070f565f20', '', '', '保存', '', 'user:save', 10, NULL, '0', 0, '1', '2020-11-11 13:27:06', '1', '2021-04-30 21:37:01', 0, 0);
INSERT INTO `sys_menu` VALUES ('bf41ddc3ea314b158e21e4efc1ed5a25', '8e9455740091486c914495cfb0c7faa5', NULL, NULL, '权限', NULL, 'role:permission', 40, NULL, '0', 0, '1', '2022-01-11 20:31:02', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('bf5c1e44546341de9acee52d148d5a76', 'd7f8d052d4864bd285c575c3cf2dce69', NULL, NULL, '测试生成', '/data/test', NULL, 40, 'data-test-list', '0', 0, NULL, NULL, NULL, NULL, 1, 1);
INSERT INTO `sys_menu` VALUES ('c38e9fe9521a4294bda2ab6ed8273719', '116182d1349a464fa89e24ddb349fea9', NULL, NULL, '保存', NULL, 'data:test:save', 20, NULL, '0', 0, NULL, NULL, NULL, NULL, 1, 0);
INSERT INTO `sys_menu` VALUES ('c4352b75954a47de84cd896c6e2093b9', '99c6e9aeb6694c349f5db66e2516f069', '', '', '查看', '', 'code:gen:view', 50, '', '0', 0, '1', '2022-05-10 16:23:08', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('c50388914fab408c8b74f83d0d43e557', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', NULL, NULL, '测试列表', '/examples/test-mb-list', NULL, 70, NULL, '0', 0, '1', '2022-03-06 15:13:30', NULL, NULL, 0, 1);
INSERT INTO `sys_menu` VALUES ('c5f407478c4e4c9cbcdbee6389d2c909', 'b1851d1b13594e71840103c11a37a669', 'BookLetter24Filled', '', '数据字典', '/system/dict/dict-list', '', 60, '28e3f82164de4bbf98a342c2a94da076', '0', 0, '1', '2019-11-15 10:22:28', '1', '2024-03-07 10:59:23', 1, 1);
INSERT INTO `sys_menu` VALUES ('c6e7b5866ce64bfdabeb5dd6342ca55f', '06b8a427e4cd4c1ba11752070f565f20', '', '', '删除', '', 'user:delete', 20, NULL, '0', 0, '1', '2020-11-11 13:27:22', '1', '2021-04-30 21:37:05', 0, 0);
INSERT INTO `sys_menu` VALUES ('c7445e2ac6144a15a76d723607fbfb9d', 'd7f8d052d4864bd285c575c3cf2dce69', 'interface', '', '接口管理', '/lowcode/magic-editor', '', 20, '', '1', 0, '1', '2022-03-04 21:05:29', '1', '2023-04-27 18:51:42', 1, 1);
INSERT INTO `sys_menu` VALUES ('c94be7eebe76404b9cf3b4ae0a563e31', 'f23e1fefbc534100915d430b5f956355', '', '', '保存源码', '', 'component:save:code', 40, '', '0', 0, '1', '2024-03-10 23:06:38', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('d346dfed451b44cbb4474f0b586c32f8', '28216291e6a84b14aefbad91ed2b0f34', NULL, NULL, '删除', NULL, 'data:test:delete', 30, NULL, '0', 0, NULL, NULL, NULL, NULL, 1, 0);
INSERT INTO `sys_menu` VALUES ('d790c401c3024332be8aee049af09030', '6f3594d0-5445-41e1-a13c-890a57485036', '', '', '下移', '', 'office:sort:down', 60, '', '0', 0, '1', '2022-05-09 21:42:21', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('d7e5280a2a8f4fb3b9e2f4a3e3093a38', '39be13ef6f0745568c80bf35202ddb2b', '', '', '保存', '', 'menu:save', 10, NULL, '0', 0, '1', '2020-11-11 13:58:32', '1', '2021-04-30 21:36:28', 0, 0);
INSERT INTO `sys_menu` VALUES ('d7f8d052d4864bd285c575c3cf2dce69', '0', 'ClipboardCode24Filled', '', '低代码', '/lowcode', '', 30, '', '0', 0, '1', '2022-03-04 21:03:42', '1', '2023-06-25 20:31:30', 1, 1);
INSERT INTO `sys_menu` VALUES ('d9c32f7ed4c841cbb37eaff2624385bb', '6f3594d0-5445-41e1-a13c-890a57485036', NULL, NULL, '查看', NULL, 'office:view', 30, NULL, '0', 0, '1', '2022-02-05 22:04:25', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('dc332875-831e-4937-86ff-0c7420915ce9', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '三级联动', '/examples/three-linkage', '', 10, NULL, '0', 0, '1', '2021-03-28 23:04:14', '1', '2021-04-30 21:38:23', 0, 1);
INSERT INTO `sys_menu` VALUES ('e46a01397a01459bb478a5f31a6220ee', '81b6845a20da4028a01a42f3eb0b4f4b', '', '', '保存', '', 'dict:items:save', 10, NULL, '0', 0, '1', '2020-12-10 10:38:27', '1', '2021-04-30 21:37:35', 0, 0);
INSERT INTO `sys_menu` VALUES ('e950b960890d4fb3916cd1c561dba035', 'bccc28641f4647d3beeaef0381fdf079', NULL, NULL, '保存', NULL, 'system:role:save', 20, NULL, '0', 0, NULL, NULL, NULL, NULL, 0, NULL);
INSERT INTO `sys_menu` VALUES ('eee27ca353fb440aa5ac0bd7b38cad1d', '4a57f57fc7324c94b6390f1a2dd1f49a', 'login-log', '', '登录日志', '/system/monitor/login-log', '', 20, '9809888c-d92a-11ee-9675-c2b02ed3977b', '0', 0, '1', '2022-03-05 17:25:05', '1', '2024-03-07 14:06:09', 1, 1);
INSERT INTO `sys_menu` VALUES ('ef2eeb351c9d421991514c7a205083d1', '7ad229f12c8f4b57bbb9349e2ffd8932', '', '', '查看', '', 'configure:view', 10, '', '0', 0, '1', '2022-05-21 18:34:29', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('f09410d5-5043-4164-9f68-8d135de71b29', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2', '', '', '上传文件', '/examples/upload-file', '', 20, NULL, '0', 0, '1', '2021-04-23 22:52:04', '1', '2021-05-23 10:34:47', 0, 1);
INSERT INTO `sys_menu` VALUES ('f23e1fefbc534100915d430b5f956355', 'd7f8d052d4864bd285c575c3cf2dce69', 'component', '', '动态组件', '/lowcode/sfc-component', '', 120, '', '1', 0, '1', '2024-02-26 09:23:56', '1', '2024-03-11 09:28:58', 0, 1);
INSERT INTO `sys_menu` VALUES ('f4ea43974661442aa0a42fbad4b24818', 'f23e1fefbc534100915d430b5f956355', '', '', '组件列表', '', 'component:tree', 10, '', '0', 0, '1', '2024-03-10 23:17:13', NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('f7436d87359445c093d6499d6a01b592', 'bf5c1e44546341de9acee52d148d5a76', NULL, NULL, '删除', NULL, 'data:test:delete', 30, NULL, '0', 0, NULL, NULL, NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('f79ec17944f5485b9cf7c12ad2553a2b', 'bccc28641f4647d3beeaef0381fdf079', NULL, NULL, '删除', NULL, 'system:role:delete', 30, NULL, '0', 0, NULL, NULL, NULL, NULL, 0, NULL);
INSERT INTO `sys_menu` VALUES ('fa201e3353ba4591923a0f1798acc855', 'bf5c1e44546341de9acee52d148d5a76', NULL, NULL, '查看', NULL, 'data:test:view', 10, NULL, '0', 0, NULL, NULL, NULL, NULL, 0, 0);
INSERT INTO `sys_menu` VALUES ('fdbdcf8b8d674ae38154bc1e57498a91', '4a57f57fc7324c94b6390f1a2dd1f49a', 'user', '', '在线用户', '/system/monitor/online-user', '', 40, 'fd89dd1d66ae429689bdd978162b4caf', '0', 0, '1', '2022-03-15 23:19:04', '1', '2024-03-07 14:06:23', 0, 1);
INSERT INTO `sys_menu` VALUES ('ff7d37f87ab749f9836af74dbcdf033d', '8e9455740091486c914495cfb0c7faa5', NULL, NULL, '用户列表', NULL, 'role:user:list', 50, NULL, '0', 0, '1', '2022-02-04 17:33:20', NULL, NULL, 0, 0);

-- ----------------------------
-- Table structure for sys_office
-- ----------------------------
DROP TABLE IF EXISTS `sys_office`;
CREATE TABLE `sys_office`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织机构编码',
  `pid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父id',
  `sort` int NULL DEFAULT NULL COMMENT '排序',
  `is_del` int NULL DEFAULT 0 COMMENT '删除标识',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织机构表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_office
-- ----------------------------
INSERT INTO `sys_office` VALUES ('31b365008f994e93850186126fce87cb', '东北分公司', '2', 'db', '4c37a80226134bce8bc91c8fc04a7d2f', 20, 0, '1', '2022-01-09 22:12:11', '1', '2022-03-05 17:17:29');
INSERT INTO `sys_office` VALUES ('4c37a80226134bce8bc91c8fc04a7d2f', '马小东总公司', '2', 'mxd', '0', 10, 0, '1', '2022-01-09 21:59:34', '1', '2022-02-05 11:26:01');
INSERT INTO `sys_office` VALUES ('81b5493cdb31477f9ceea85b2cd08f15', '内蒙分公司', '2', 'nm', '4c37a80226134bce8bc91c8fc04a7d2f', 10, 0, '1', '2022-01-09 21:59:47', '1', '2022-03-05 17:17:34');
INSERT INTO `sys_office` VALUES ('a8b62a271c2a4492bd5c0653cac8f33d', '扎兰屯办事处', '2', 'zlt', '81b5493cdb31477f9ceea85b2cd08f15', 10, 0, '1', '2022-01-16 13:15:46', '1', '2022-03-05 17:17:26');

-- ----------------------------
-- Table structure for sys_oper_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_oper_log`;
CREATE TABLE `sys_oper_log`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `api_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接口名',
  `api_path` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '路径',
  `api_method` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法',
  `cost_time` int NULL DEFAULT NULL COMMENT '耗时',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '操作时间',
  `user_agent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理',
  `user_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户IP',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 98269 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '操作日志' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Records of sys_oper_log
-- ----------------------------

-- ----------------------------
-- Table structure for sys_permission_code
-- ----------------------------
DROP TABLE IF EXISTS `sys_permission_code`;
CREATE TABLE `sys_permission_code`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限代码',
  `pid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父id',
  `is_del` int NULL DEFAULT 0 COMMENT '删除标识：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '权限code表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_permission_code
-- ----------------------------

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `type` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色名称',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色编码',
  `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '0：全部，1：自定义，2：本级级子级，3：本级',
  `sort` int NULL DEFAULT NULL COMMENT '排序',
  `desc_ribe` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
  `is_del` int NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES ('1', '1', '管理员', 'admin', '0', NULL, '管理员', 0, NULL, NULL, '1', '2024-03-10 23:17:53');
INSERT INTO `sys_role` VALUES ('1d183eaec667423fa9adb20e24356a86', NULL, '全部', 'qb', '0', NULL, NULL, 0, '1', '2022-01-16 13:56:10', NULL, NULL);
INSERT INTO `sys_role` VALUES ('3a408f5157c841ea8884ade4fa56d0f4', NULL, '自定义', 'zdy', '1', NULL, NULL, 0, '1', '2022-01-16 13:55:22', '1', '2023-12-28 20:54:53');
INSERT INTO `sys_role` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', NULL, '测试2', 'test2', '1', NULL, NULL, 0, '1', '2022-02-04 16:39:26', '1', '2022-02-04 16:45:11');
INSERT INTO `sys_role` VALUES ('e3448fc792ca463a95a34baf6f089dcd', NULL, '本级及子级', 'bjjzj', '2', NULL, NULL, 0, '1', '2022-01-16 13:55:45', NULL, NULL);
INSERT INTO `sys_role` VALUES ('e619e4b665de42acbca1665fec150634', NULL, '本级', 'bj', '3', NULL, NULL, 0, '1', '2022-01-16 13:55:59', NULL, NULL);

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu`  (
  `role_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色id',
  `menu_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单id'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO `sys_role_menu` VALUES ('e3448fc792ca463a95a34baf6f089dcd', 'b1851d1b13594e71840103c11a37a669');
INSERT INTO `sys_role_menu` VALUES ('e619e4b665de42acbca1665fec150634', 'b1851d1b13594e71840103c11a37a669');
INSERT INTO `sys_role_menu` VALUES ('1d183eaec667423fa9adb20e24356a86', 'b1851d1b13594e71840103c11a37a669');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'b1851d1b13594e71840103c11a37a669');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '39be13ef6f0745568c80bf35202ddb2b');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '414e5d31-fe05-4e69-9983-217c10b9740a');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'd7e5280a2a8f4fb3b9e2f4a3e3093a38');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '833b204d5f2c402190bfca677421cfeb');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '6f3594d0-5445-41e1-a13c-890a57485036');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '4526eb9c-4b7a-4945-bfa9-cddc01f36c22');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '6762231e-4f30-4a6b-a94e-b185e99ed608');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '8e9455740091486c914495cfb0c7faa5');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '94071254597d4da286bb8112ad93f4ff');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '684723f4226948aba1661292961c8f71');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'bf41ddc3ea314b158e21e4efc1ed5a25');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '06b8a427e4cd4c1ba11752070f565f20');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'bee5c6cb1b484133a4b8e72fe5c5eed0');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'c6e7b5866ce64bfdabeb5dd6342ca55f');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'c5f407478c4e4c9cbcdbee6389d2c909');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'b353de07f3624b4fa1c6f8b1b1e80cad');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '546c874267514672844cd3a019e468f7');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '81b6845a20da4028a01a42f3eb0b4f4b');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', 'e46a01397a01459bb478a5f31a6220ee');
INSERT INTO `sys_role_menu` VALUES ('d71c32ace3bb4d959a652ee99ecd1b26', '24176912aa9e4b2d832f96292be3430e');
INSERT INTO `sys_role_menu` VALUES ('3a408f5157c841ea8884ade4fa56d0f4', 'b1851d1b13594e71840103c11a37a669');
INSERT INTO `sys_role_menu` VALUES ('3a408f5157c841ea8884ade4fa56d0f4', '39be13ef6f0745568c80bf35202ddb2b');
INSERT INTO `sys_role_menu` VALUES ('3a408f5157c841ea8884ade4fa56d0f4', '414e5d31-fe05-4e69-9983-217c10b9740a');
INSERT INTO `sys_role_menu` VALUES ('1', NULL);
INSERT INTO `sys_role_menu` VALUES ('1', '1009eed4f46141e3aca939490d68786a');
INSERT INTO `sys_role_menu` VALUES ('1', '39be13ef6f0745568c80bf35202ddb2b');
INSERT INTO `sys_role_menu` VALUES ('1', 'b1851d1b13594e71840103c11a37a669');
INSERT INTO `sys_role_menu` VALUES ('1', '414e5d31-fe05-4e69-9983-217c10b9740a');
INSERT INTO `sys_role_menu` VALUES ('1', '6f3594d0-5445-41e1-a13c-890a57485036');
INSERT INTO `sys_role_menu` VALUES ('1', 'd9c32f7ed4c841cbb37eaff2624385bb');
INSERT INTO `sys_role_menu` VALUES ('1', '8e9455740091486c914495cfb0c7faa5');
INSERT INTO `sys_role_menu` VALUES ('1', 'a5f2cb418ac348bca3d51b98958c4a80');
INSERT INTO `sys_role_menu` VALUES ('1', '06b8a427e4cd4c1ba11752070f565f20');
INSERT INTO `sys_role_menu` VALUES ('1', '7324ad98fb51462795750bcfc1b11be2');
INSERT INTO `sys_role_menu` VALUES ('1', 'c5f407478c4e4c9cbcdbee6389d2c909');
INSERT INTO `sys_role_menu` VALUES ('1', '710c0a9195934e73b11123b62283fdc5');
INSERT INTO `sys_role_menu` VALUES ('1', '81b6845a20da4028a01a42f3eb0b4f4b');
INSERT INTO `sys_role_menu` VALUES ('1', '25162c30ae0d4297ade09539bcf81d86');
INSERT INTO `sys_role_menu` VALUES ('1', '7ad229f12c8f4b57bbb9349e2ffd8932');
INSERT INTO `sys_role_menu` VALUES ('1', 'ef2eeb351c9d421991514c7a205083d1');
INSERT INTO `sys_role_menu` VALUES ('1', '641253af-8ea1-4b5d-8bc3-a7165ef60ff2');
INSERT INTO `sys_role_menu` VALUES ('1', 'dc332875-831e-4937-86ff-0c7420915ce9');
INSERT INTO `sys_role_menu` VALUES ('1', 'f09410d5-5043-4164-9f68-8d135de71b29');
INSERT INTO `sys_role_menu` VALUES ('1', '91bdb7d742a64a8c8a8fdc6d3bb61581');
INSERT INTO `sys_role_menu` VALUES ('1', '2664b76cb2904227bce5b0f7d1dd6e7b');
INSERT INTO `sys_role_menu` VALUES ('1', 'c50388914fab408c8b74f83d0d43e557');
INSERT INTO `sys_role_menu` VALUES ('1', '713626516eaa4ba98c9daf55009b481e');
INSERT INTO `sys_role_menu` VALUES ('1', '9385945c7f5f476ab38885976907db2a');
INSERT INTO `sys_role_menu` VALUES ('1', 'a1564eaf9fb249a788d15bb4bce609a8');
INSERT INTO `sys_role_menu` VALUES ('1', 'b4e9009b24d14233a59029ec57681e2c');
INSERT INTO `sys_role_menu` VALUES ('1', 'd7f8d052d4864bd285c575c3cf2dce69');
INSERT INTO `sys_role_menu` VALUES ('1', 'f23e1fefbc534100915d430b5f956355');
INSERT INTO `sys_role_menu` VALUES ('1', 'fdbdcf8b8d674ae38154bc1e57498a91');
INSERT INTO `sys_role_menu` VALUES ('1', '4a57f57fc7324c94b6390f1a2dd1f49a');
INSERT INTO `sys_role_menu` VALUES ('1', '9fe1eaae168e4b719dc880f039ccd7b7');
INSERT INTO `sys_role_menu` VALUES ('1', '4fc65edbe0544c369b58fdfed1523537');
INSERT INTO `sys_role_menu` VALUES ('1', 'eee27ca353fb440aa5ac0bd7b38cad1d');
INSERT INTO `sys_role_menu` VALUES ('1', '3a0e3107402449698d86ee3cbc5272c0');
INSERT INTO `sys_role_menu` VALUES ('1', 'af431ab748e64914a0398f00d7aa0def');
INSERT INTO `sys_role_menu` VALUES ('1', '4d52144f827742c2aac57dd3b361d868');
INSERT INTO `sys_role_menu` VALUES ('1', '1ff68fd34f35430db30540c40a2ef9db');
INSERT INTO `sys_role_menu` VALUES ('1', '5d9c050c87ad450e886290c4e93fa16f');
INSERT INTO `sys_role_menu` VALUES ('1', '641592c74d5d43dfbecedc1a388edc8c');
INSERT INTO `sys_role_menu` VALUES ('1', 'f4ea43974661442aa0a42fbad4b24818');

-- ----------------------------
-- Table structure for sys_role_office
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_office`;
CREATE TABLE `sys_role_office`  (
  `office_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织机构id',
  `role_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色id'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户组织机构关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_role_office
-- ----------------------------
INSERT INTO `sys_role_office` VALUES ('81b5493cdb31477f9ceea85b2cd08f15', 'd71c32ace3bb4d959a652ee99ecd1b26');
INSERT INTO `sys_role_office` VALUES ('81b5493cdb31477f9ceea85b2cd08f15', '3a408f5157c841ea8884ade4fa56d0f4');

-- ----------------------------
-- Table structure for sys_test_data
-- ----------------------------
DROP TABLE IF EXISTS `sys_test_data`;
CREATE TABLE `sys_test_data`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `is_del` int NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_test_data
-- ----------------------------
INSERT INTO `sys_test_data` VALUES ('0572b97b3e45448bb1fcf9059e6c5ac9', '东北分公司', 0, '7217ee3f9d6e49f1a7e327183013226b', '2022-01-16 17:40:33', NULL, NULL);
INSERT INTO `sys_test_data` VALUES ('059d96a88d594995a895a6cb8151a72f', '扎兰屯', 0, '1b47d4758336487890147fc5cd64ebb9', '2022-01-16 17:48:33', NULL, NULL);
INSERT INTO `sys_test_data` VALUES ('f49eac2294114d588dee8ea548dc85c7', '内蒙分公司', 0, '7e7f4b1017fc4564ad31a05033eb29d1', '2022-01-16 17:40:15', NULL, NULL);

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录名',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名/昵称',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `head_portrait` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
  `is_login` int NULL DEFAULT 0 COMMENT '禁止登录：0未禁用，1已禁用',
  `sort` int NULL DEFAULT NULL COMMENT '排序',
  `office_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织机构id',
  `is_del` int NULL DEFAULT 0 COMMENT '删除标识：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`, `username`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES ('1', 'admin', '管理员', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', '1', '13888888888', 'userfiles/2023-04-01/1d8cd6ccc18746419b97bbd74702d38c/图片的副本2.png,userfiles/2023-04-15/5e4e53ef95884413b09509b8558393d8/iShot_2023-04-15_09.36.22.png,userfiles/2023-04-01/1d8cd6ccc18746419b97bbd74702d38c/图片的副本2.png,userfiles/2023-04-15/5e4e53ef95884413b09509b8558393d8/iShot_2023-04-15_09.36.22.png,userfiles/2023-04-01/1d8cd6ccc18746419b97bbd74702d38c/图片的副本2.png,userfiles/2023-04-15/5e4e53ef95884413b09509b8558393d8/iShot_2023-04-15_09.36.22.png,userfiles/2023-04-01/1d8cd6ccc18746419b97bbd74702d38c/图片的副本2.png,userfiles/2023-04-15/5e4e53ef95884413b09509b8558393d8/iShot_2023-04-15_09.36.22.png,userfiles/2023-04-01/1d8cd6ccc18746419b97bbd74702d38c/图片的副本2.png,userfiles/2023-04-15/5e4e53ef95884413b09509b8558393d8/iShot_2023-04-15_09.36.22.png', 0, NULL, '31b365008f994e93850186126fce87cb', 0, NULL, '2020-05-15 22:25:20', '1', '2024-03-10 23:13:41');
INSERT INTO `sys_user` VALUES ('1b47d4758336487890147fc5cd64ebb9', 'zlt', NULL, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', NULL, NULL, NULL, 0, NULL, 'a8b62a271c2a4492bd5c0653cac8f33d', 0, '1', '2022-01-16 17:48:20', NULL, NULL);
INSERT INTO `sys_user` VALUES ('6fa07e9364534ffeb56f9e38bda9de33', 'system', '管理员', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', NULL, NULL, NULL, 0, NULL, '4c37a80226134bce8bc91c8fc04a7d2f', 0, '1', '2024-03-10 22:45:40', NULL, NULL);
INSERT INTO `sys_user` VALUES ('7217ee3f9d6e49f1a7e327183013226b', 'db', NULL, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', NULL, NULL, NULL, 0, NULL, '31b365008f994e93850186126fce87cb', 0, '1', '2022-01-16 17:24:56', NULL, NULL);
INSERT INTO `sys_user` VALUES ('7e7f4b1017fc4564ad31a05033eb29d1', 'nm', NULL, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', NULL, NULL, NULL, 0, NULL, '81b5493cdb31477f9ceea85b2cd08f15', 0, '1', '2022-01-16 17:24:29', '1', '2022-01-16 17:24:38');
INSERT INTO `sys_user` VALUES ('895757b441fe45b1afb0ed1cb535f35c', 'mxd', 'mxd', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', NULL, NULL, NULL, 0, NULL, '4c37a80226134bce8bc91c8fc04a7d2f', 0, '1', '2022-01-16 17:23:16', '1', '2023-04-19 17:01:24');
INSERT INTO `sys_user` VALUES ('cbafb7813bd9458eae26e4dc3d05bf5e', 'mxd2', NULL, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', NULL, NULL, NULL, 0, NULL, '4c37a80226134bce8bc91c8fc04a7d2f', 0, '1', '2022-01-16 17:23:50', '1', '2022-01-16 17:24:42');

-- ----------------------------
-- Table structure for sys_user_code
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_code`;
CREATE TABLE `sys_user_code`  (
  `user_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id',
  `code_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限代码id',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户权限code关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user_code
-- ----------------------------

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role`  (
  `user_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户id',
  `role_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色id'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户与角色关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES ('7e7f4b1017fc4564ad31a05033eb29d1', 'e3448fc792ca463a95a34baf6f089dcd');
INSERT INTO `sys_user_role` VALUES ('cbafb7813bd9458eae26e4dc3d05bf5e', '1d183eaec667423fa9adb20e24356a86');
INSERT INTO `sys_user_role` VALUES ('7217ee3f9d6e49f1a7e327183013226b', 'e619e4b665de42acbca1665fec150634');
INSERT INTO `sys_user_role` VALUES ('1b47d4758336487890147fc5cd64ebb9', 'e619e4b665de42acbca1665fec150634');
INSERT INTO `sys_user_role` VALUES ('895757b441fe45b1afb0ed1cb535f35c', '3a408f5157c841ea8884ade4fa56d0f4');
INSERT INTO `sys_user_role` VALUES ('6fa07e9364534ffeb56f9e38bda9de33', '1');
INSERT INTO `sys_user_role` VALUES ('1', '1');

-- ----------------------------
-- Table structure for t_data_test
-- ----------------------------
DROP TABLE IF EXISTS `t_data_test`;
CREATE TABLE `t_data_test`  (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名字',
  `sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别',
  `head_portrait` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
  `is_del` int NULL DEFAULT 0 COMMENT '删除标识：0未删除，1已删除',
  `create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `remarks` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试生成' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of t_data_test
-- ----------------------------
INSERT INTO `t_data_test` VALUES ('ecacf5c78bd043b1aaf06a839f7195b1', '马小东', '1', 'userfiles/2022-05-05/c6aeb598deef48c385b0da831b7c2b85/QQ图片20220505165410.jpg', 0, '1', '2022-03-30 22:43:45', '1', '2022-05-05 16:54:21', '没有');

SET FOREIGN_KEY_CHECKS = 1;
