mooho-base-admin-plus 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +5 -0
- package/.env.development +0 -0
- package/.env.production +0 -0
- package/.eslintignore +11 -0
- package/.eslintrc.js +47 -0
- package/.prettierrc +15 -0
- package/README.md +18 -0
- package/dist/favicon.ico +0 -0
- package/dist/mooho-base-admin-plus.min.esm.js +131746 -0
- package/dist/mooho-base-admin-plus.min.js +279 -0
- package/dist/setting.js +31 -0
- package/dist/static/images/app-barcode.png +0 -0
- package/dist/static/images/login/bg.png +0 -0
- package/dist/static/images/login/logo.png +0 -0
- package/dist/static/images/login/password-active.png +0 -0
- package/dist/static/images/login/password-default.png +0 -0
- package/dist/static/images/login/signIn-img.png +0 -0
- package/dist/static/images/login/user-active.png +0 -0
- package/dist/static/images/login/user-default.png +0 -0
- package/dist/static/images/logo-dark.png +0 -0
- package/dist/static/images/logo-small.png +0 -0
- package/dist/static/images/logo.png +0 -0
- package/dist/static/images/logo.svg +510 -0
- package/dist/static/images/no-image.png +0 -0
- package/dist/style.css +4 -0
- package/index.html +18 -0
- package/other/pda.vue +28 -0
- package/package.json +59 -0
- package/public/favicon.ico +0 -0
- package/public/setting.js +31 -0
- package/public/static/images/app-barcode.png +0 -0
- package/public/static/images/login/bg.png +0 -0
- package/public/static/images/login/logo.png +0 -0
- package/public/static/images/login/password-active.png +0 -0
- package/public/static/images/login/password-default.png +0 -0
- package/public/static/images/login/signIn-img.png +0 -0
- package/public/static/images/login/user-active.png +0 -0
- package/public/static/images/login/user-default.png +0 -0
- package/public/static/images/logo-dark.png +0 -0
- package/public/static/images/logo-small.png +0 -0
- package/public/static/images/logo.png +0 -0
- package/public/static/images/logo.svg +510 -0
- package/public/static/images/no-image.png +0 -0
- package/src/App.vue +60 -0
- package/src/api/application.js +35 -0
- package/src/api/customModel.js +187 -0
- package/src/api/customPage.js +15 -0
- package/src/api/customTable.js +24 -0
- package/src/api/dataSource.js +93 -0
- package/src/api/dataView.js +199 -0
- package/src/api/dictType.js +23 -0
- package/src/api/entityView.js +13 -0
- package/src/api/enum.js +15 -0
- package/src/api/filterColumn.js +16 -0
- package/src/api/model.js +244 -0
- package/src/api/movePlan.js +29 -0
- package/src/api/notification.js +28 -0
- package/src/api/openApiPermission.js +25 -0
- package/src/api/permission.js +51 -0
- package/src/api/planJob.js +15 -0
- package/src/api/process.js +23 -0
- package/src/api/processDef.js +36 -0
- package/src/api/processInst.js +16 -0
- package/src/api/rolePermission.js +17 -0
- package/src/api/roleProperty.js +36 -0
- package/src/api/shortcut.js +20 -0
- package/src/api/system.js +23 -0
- package/src/api/task.js +56 -0
- package/src/api/taskQueue.js +24 -0
- package/src/api/user.js +45 -0
- package/src/api/viewColumn.js +16 -0
- package/src/assets/svg/body.svg +17 -0
- package/src/assets/svg/header-theme-dark.svg +40 -0
- package/src/assets/svg/header-theme-primary.svg +40 -0
- package/src/assets/svg/header-top.svg +40 -0
- package/src/assets/svg/icon-happy.svg +1 -0
- package/src/assets/svg/icon-sad.svg +1 -0
- package/src/assets/svg/icon-social-bilibili.svg +1 -0
- package/src/assets/svg/icon-social-dingding.svg +1 -0
- package/src/assets/svg/icon-social-facebook.svg +1 -0
- package/src/assets/svg/icon-social-juejin.svg +1 -0
- package/src/assets/svg/icon-social-qq.svg +1 -0
- package/src/assets/svg/icon-social-twitter.svg +1 -0
- package/src/assets/svg/icon-social-wechat.svg +1 -0
- package/src/assets/svg/icon-social-weibo.svg +1 -0
- package/src/assets/svg/icon-social-zhihu.svg +1 -0
- package/src/assets/svg/nav-theme-dark.svg +40 -0
- package/src/assets/svg/nav-theme-light.svg +40 -0
- package/src/components/copyright/index.vue +28 -0
- package/src/components/home/notice-list.vue +62 -0
- package/src/components/home/shortcut.vue +125 -0
- package/src/components/input/dialog-select.vue +301 -0
- package/src/components/input/item-select.vue +195 -0
- package/src/components/link/index.vue +54 -0
- package/src/components/richEditor/index.vue +86 -0
- package/src/components/upload/file-upload.vue +84 -0
- package/src/components/upload/upload-attachment.vue +119 -0
- package/src/components/upload/upload-image.vue +212 -0
- package/src/components/view/column-check.vue +223 -0
- package/src/components/view/column-edit.vue +850 -0
- package/src/components/view/column-select.vue +206 -0
- package/src/components/view/condition-edit.vue +164 -0
- package/src/components/view/filter-edit.vue +633 -0
- package/src/components/view/filter-setting.vue +126 -0
- package/src/components/view/form-setting-layout.vue +375 -0
- package/src/components/view/form-setting.vue +247 -0
- package/src/components/view/group-column.vue +104 -0
- package/src/components/view/group-method.vue +104 -0
- package/src/components/view/mixin.js +72 -0
- package/src/components/view/modal-form-filter.vue +319 -0
- package/src/components/view/modal-form-sort.vue +248 -0
- package/src/components/view/modal-form.vue +453 -0
- package/src/components/view/modal-table.vue +471 -0
- package/src/components/view/table-filter.vue +702 -0
- package/src/components/view/table-setting.vue +533 -0
- package/src/components/view/view-chart.vue +423 -0
- package/src/components/view/view-form-draggable.vue +837 -0
- package/src/components/view/view-form.vue +1444 -0
- package/src/components/view/view-table.vue +2261 -0
- package/src/components/workflow/flow-chart.vue +846 -0
- package/src/directive/focus.js +10 -0
- package/src/directive/tabHide.js +9 -0
- package/src/i18n/index.js +15 -0
- package/src/i18n/locale/en-US.js +1 -0
- package/src/i18n/locale/lang.js +1 -0
- package/src/i18n/locale/zh-CN.js +1 -0
- package/src/i18n/locale.js +102 -0
- package/src/index.js +222 -0
- package/src/layouts/basic-layout/header-breadcrumb/index.vue +122 -0
- package/src/layouts/basic-layout/header-collapse/index.vue +44 -0
- package/src/layouts/basic-layout/header-fullscreen/index.vue +19 -0
- package/src/layouts/basic-layout/header-i18n/index.vue +45 -0
- package/src/layouts/basic-layout/header-log/index.vue +41 -0
- package/src/layouts/basic-layout/header-logo/index.vue +23 -0
- package/src/layouts/basic-layout/header-notice/index.vue +218 -0
- package/src/layouts/basic-layout/header-reload/index.vue +21 -0
- package/src/layouts/basic-layout/header-search/index.vue +37 -0
- package/src/layouts/basic-layout/header-setting/index.vue +219 -0
- package/src/layouts/basic-layout/header-user/index.vue +175 -0
- package/src/layouts/basic-layout/i18n.js +50 -0
- package/src/layouts/basic-layout/index.vue +280 -0
- package/src/layouts/basic-layout/menu-head/index.vue +120 -0
- package/src/layouts/basic-layout/menu-head/title.vue +48 -0
- package/src/layouts/basic-layout/menu-side/index.vue +113 -0
- package/src/layouts/basic-layout/menu-side/menu-collapse.vue +76 -0
- package/src/layouts/basic-layout/menu-side/menu-item.vue +31 -0
- package/src/layouts/basic-layout/menu-side/menu-title.vue +56 -0
- package/src/layouts/basic-layout/menu-side/submenu.vue +31 -0
- package/src/layouts/basic-layout/mixins/click-item.js +21 -0
- package/src/layouts/basic-layout/mixins/sider-menu-badge.js +13 -0
- package/src/layouts/basic-layout/mixins/translate-title.js +11 -0
- package/src/layouts/basic-layout/tabs/index.vue +192 -0
- package/src/layouts/basic-layout/water-mark/index.vue +29 -0
- package/src/libs/lodop/index.js +145 -0
- package/src/libs/random_str.js +10 -0
- package/src/libs/request/index.js +158 -0
- package/src/libs/system/index.js +234 -0
- package/src/libs/util.cookies.js +44 -0
- package/src/libs/util.db.js +13 -0
- package/src/libs/util.js +55 -0
- package/src/libs/util.log.js +88 -0
- package/src/libs/water-mark.js +44 -0
- package/src/menu/header.js +20 -0
- package/src/menu/modules/dashboard.js +23 -0
- package/src/menu/sider.js +12 -0
- package/src/mixins/app.js +9 -0
- package/src/mixins/page.js +643 -0
- package/src/pages/account/login.vue +101 -0
- package/src/pages/common/home.vue +169 -0
- package/src/pages/common/task-form.vue +350 -0
- package/src/pages/common/todo.vue +31 -0
- package/src/pages/system/apiLog.vue +79 -0
- package/src/pages/system/applicationType.vue +182 -0
- package/src/pages/system/customPage.vue +62 -0
- package/src/pages/system/customTable.vue +98 -0
- package/src/pages/system/dict.vue +36 -0
- package/src/pages/system/dictType.vue +58 -0
- package/src/pages/system/entityView.vue +38 -0
- package/src/pages/system/error/404.vue +6 -0
- package/src/pages/system/extendColumn.vue +99 -0
- package/src/pages/system/formView.vue +136 -0
- package/src/pages/system/log.vue +55 -0
- package/src/pages/system/notice.vue +26 -0
- package/src/pages/system/openApi.vue +26 -0
- package/src/pages/system/openUser.vue +66 -0
- package/src/pages/system/organization.vue +98 -0
- package/src/pages/system/organizationType.vue +26 -0
- package/src/pages/system/permission.vue +175 -0
- package/src/pages/system/planJob.vue +40 -0
- package/src/pages/system/printTemplate.vue +48 -0
- package/src/pages/system/process.vue +79 -0
- package/src/pages/system/processType.vue +26 -0
- package/src/pages/system/role.vue +395 -0
- package/src/pages/system/rolePropertyEdit.vue +480 -0
- package/src/pages/system/sequenceSetting.vue +26 -0
- package/src/pages/system/systemData.vue +52 -0
- package/src/pages/system/tableView.vue +386 -0
- package/src/pages/system/taskQueue.vue +48 -0
- package/src/pages/system/user.vue +250 -0
- package/src/pages/template/processPage.vue +243 -0
- package/src/pages/template/reportPage.vue +66 -0
- package/src/pages/template/viewPage.vue +139 -0
- package/src/plugins/auth/index.js +21 -0
- package/src/plugins/error/index.js +31 -0
- package/src/plugins/index.js +24 -0
- package/src/plugins/sweetalert2/index.js +20 -0
- package/src/router/dynamic.js +183 -0
- package/src/router/index.js +84 -0
- package/src/setting.js +202 -0
- package/src/store/index.js +9 -0
- package/src/store/modules/admin/index.js +16 -0
- package/src/store/modules/admin/modules/account.js +103 -0
- package/src/store/modules/admin/modules/cache.js +119 -0
- package/src/store/modules/admin/modules/dataView.js +112 -0
- package/src/store/modules/admin/modules/db.js +231 -0
- package/src/store/modules/admin/modules/i18n.js +87 -0
- package/src/store/modules/admin/modules/layout.js +115 -0
- package/src/store/modules/admin/modules/loader.js +44 -0
- package/src/store/modules/admin/modules/log.js +77 -0
- package/src/store/modules/admin/modules/menu.js +338 -0
- package/src/store/modules/admin/modules/page.js +466 -0
- package/src/store/modules/admin/modules/user.js +96 -0
- package/src/store/modules/admin/modules/viewPage.js +34 -0
- package/src/styles/common.less +47 -0
- package/src/styles/css/default.css +510 -0
- package/src/styles/css/login.css +1217 -0
- package/src/styles/default/index.less +6 -0
- package/src/styles/font/demo.css +539 -0
- package/src/styles/font/demo_index.html +372 -0
- package/src/styles/font/icon-demo/demo.css +539 -0
- package/src/styles/font/icon-demo/demo_index.html +423 -0
- package/src/styles/font/icon-demo/iconfont.css +61 -0
- package/src/styles/font/icon-demo/iconfont.eot +0 -0
- package/src/styles/font/icon-demo/iconfont.js +1 -0
- package/src/styles/font/icon-demo/iconfont.svg +59 -0
- package/src/styles/font/icon-demo/iconfont.ttf +0 -0
- package/src/styles/font/icon-demo/iconfont.woff +0 -0
- package/src/styles/font/icon-demo/iconfont.woff2 +0 -0
- package/src/styles/font/iconfont.css +47 -0
- package/src/styles/font/iconfont.js +1 -0
- package/src/styles/font/iconfont.json +65 -0
- package/src/styles/font/iconfont.ttf +0 -0
- package/src/styles/font/iconfont.woff +0 -0
- package/src/styles/font/iconfont.woff2 +0 -0
- package/src/styles/font/ionicons.svg +870 -0
- package/src/styles/font/ionicons.ttf +0 -0
- package/src/styles/font/ionicons.woff +0 -0
- package/src/styles/font/ionicons.woff2 +0 -0
- package/src/styles/index.less +7 -0
- package/src/styles/layout/basic-layout/layout.less +527 -0
- package/src/styles/layout/basic-layout/menu.less +274 -0
- package/src/styles/layout/index.less +2 -0
- package/src/styles/setting.less +6 -0
- package/styleguide.config.js +22 -0
- package/test/api/barcode.js +50 -0
- package/test/api/inbound.js +47 -0
- package/test/api/interfaceLog.js +15 -0
- package/test/api/interfaceQueue.js +15 -0
- package/test/api/interfaceServer.js +29 -0
- package/test/api/movePlan.js +50 -0
- package/test/api/movePlanItem.js +13 -0
- package/test/api/moveType.js +22 -0
- package/test/api/openApiPermission.js +25 -0
- package/test/api/outbound.js +40 -0
- package/test/api/permission.js +34 -0
- package/test/api/rolePermission.js +17 -0
- package/test/api/user.js +40 -0
- package/test/api/viewColumn.js +16 -0
- package/test/api/warehouse.js +13 -0
- package/test/api/warehouseMoveType.js +18 -0
- package/test/main.js +55 -0
- package/test/package.js +33 -0
- package/test/pages/home/index.vue +22 -0
- package/test/pages/task/test.vue +28 -0
- package/test/pages/test/dataViewTest.vue +28 -0
- package/test/pages/test/logReport.vue +25 -0
- package/test/pages/test/testPage.vue +38 -0
- package/test/router/routes.js +88 -0
- package/test/setting.env.js +22 -0
- package/test/styles/css/custom.css +0 -0
- package/test/styles/css/login.css +1217 -0
- package/vite.config.js +72 -0
- package/vue.config.js +20 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="i-layout-page-header">
|
|
4
|
+
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
|
+
</div>
|
|
6
|
+
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
<view-table ref="table" view-code="FormView" :filter="filter" :selectEnable="true" @create="create" @edit="edit">
|
|
8
|
+
<template #filterCommand>
|
|
9
|
+
<Button size="small" type="info" custom-icon="fa fa-cloud-download-alt" @click="exportFile()">导出</Button>
|
|
10
|
+
<file-upload url="api/DataView/importFile" accept=".view" @on-success="importFileSuccess" style="display: inline-block; margin-left: 4px; margin-right: 4px">
|
|
11
|
+
<template #>
|
|
12
|
+
<Button type="primary" custom-icon="fa fa-cloud-upload-alt" size="small">导入</Button>
|
|
13
|
+
</template>
|
|
14
|
+
</file-upload>
|
|
15
|
+
</template>
|
|
16
|
+
<template #command="{ row }">
|
|
17
|
+
<Button size="small" title="字段设置" type="info" custom-icon="fa fa-bars" @click="setting(row)"></Button>
|
|
18
|
+
</template>
|
|
19
|
+
</view-table>
|
|
20
|
+
</Card>
|
|
21
|
+
<modal-form ref="form" view-code="FormViewEdit" @on-change="formChange" @on-after-save="$refs.table.loadData()">
|
|
22
|
+
<template #footer>
|
|
23
|
+
<Button type="primary" custom-icon="fa fa-save" @click="() => $refs.form.onSave()">保存</Button>
|
|
24
|
+
<Button type="primary" v-if="canCopy" custom-icon="fa fa-copy" @click="copy">复制</Button>
|
|
25
|
+
</template>
|
|
26
|
+
</modal-form>
|
|
27
|
+
<form-setting ref="setting" @layout-mode="layoutMode" />
|
|
28
|
+
<form-setting-layout ref="settingLayout" @list-mode="listMode" />
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
<script>
|
|
32
|
+
import dataViewApi from '../../api/dataView';
|
|
33
|
+
import mixinPage from '../../mixins/page';
|
|
34
|
+
import viewColumnApi from '../../api/viewColumn';
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'system-ui-formView',
|
|
38
|
+
mixins: [mixinPage],
|
|
39
|
+
components: {},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
filter: {
|
|
43
|
+
viewType: 'FormView'
|
|
44
|
+
},
|
|
45
|
+
canCopy: null
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
computed: {},
|
|
49
|
+
created() {},
|
|
50
|
+
methods: {
|
|
51
|
+
formChange() {
|
|
52
|
+
const data = this.$refs.form.data;
|
|
53
|
+
const columns = this.$refs.form.columns;
|
|
54
|
+
|
|
55
|
+
const columnModel = columns.find(item => {
|
|
56
|
+
return item.code === 'model';
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
if (data.isVirtual) {
|
|
60
|
+
columnModel.isShow = false;
|
|
61
|
+
} else {
|
|
62
|
+
columnModel.isShow = true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
//this.$refs.form.forceUpdate();
|
|
66
|
+
},
|
|
67
|
+
// 字段设置
|
|
68
|
+
async setting(row) {
|
|
69
|
+
let res = await viewColumnApi.queryByDataViewID(row.id);
|
|
70
|
+
this.$refs.settingLayout.open(row, res.data);
|
|
71
|
+
},
|
|
72
|
+
// 切换至列表模式
|
|
73
|
+
listMode({ dataView, columns }) {
|
|
74
|
+
this.$refs.settingLayout.close();
|
|
75
|
+
this.$refs.setting.open(dataView, columns);
|
|
76
|
+
},
|
|
77
|
+
// 切换至预览模式
|
|
78
|
+
layoutMode({ dataView, columns }) {
|
|
79
|
+
this.$refs.setting.close();
|
|
80
|
+
this.$refs.settingLayout.open(dataView, columns);
|
|
81
|
+
},
|
|
82
|
+
// 导出文件
|
|
83
|
+
exportFile() {
|
|
84
|
+
let ids = this.$refs.table.getSelected().map(x => {
|
|
85
|
+
return x.id;
|
|
86
|
+
});
|
|
87
|
+
if (ids.length > 0) {
|
|
88
|
+
dataViewApi.exportFile(ids);
|
|
89
|
+
} else {
|
|
90
|
+
this.error('请选择需要导出的内容!');
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
// 导入成功
|
|
94
|
+
importFileSuccess(res) {
|
|
95
|
+
if (res.code == 0) {
|
|
96
|
+
this.success('导入成功!', () => {
|
|
97
|
+
this.$refs.table.loadData();
|
|
98
|
+
});
|
|
99
|
+
} else {
|
|
100
|
+
this.error(res.message);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
// 复制
|
|
104
|
+
copy() {
|
|
105
|
+
this.confirmInput(
|
|
106
|
+
'确认要复制并创建新的视图吗?',
|
|
107
|
+
'视图代码',
|
|
108
|
+
async () => {
|
|
109
|
+
let dataView = await dataViewApi.copy(this.$refs.form.data.id, this.newCode);
|
|
110
|
+
this.$refs.form.open(dataView);
|
|
111
|
+
this.$refs.table.loadData();
|
|
112
|
+
},
|
|
113
|
+
newCode => {
|
|
114
|
+
if (!(newCode || '').trim()) {
|
|
115
|
+
this.warning('请输入需要创建的视图代码!');
|
|
116
|
+
return false;
|
|
117
|
+
} else {
|
|
118
|
+
this.newCode = newCode;
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
},
|
|
124
|
+
// 新建
|
|
125
|
+
create() {
|
|
126
|
+
this.canCopy = false;
|
|
127
|
+
this.$refs.form.openDefault({ viewType: 'FormView' });
|
|
128
|
+
},
|
|
129
|
+
// 编辑
|
|
130
|
+
edit({ row }) {
|
|
131
|
+
this.canCopy = true;
|
|
132
|
+
this.$refs.form.open(row);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
</script>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="i-layout-page-header">
|
|
4
|
+
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
|
+
</div>
|
|
6
|
+
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
<view-table ref="table" view-code="Log">
|
|
8
|
+
<template #command="{ row }">
|
|
9
|
+
<Button size="small" title="堆栈信息" type="info" custom-icon="fa fa-bars" @click="openStack(row)"></Button>
|
|
10
|
+
</template>
|
|
11
|
+
</view-table>
|
|
12
|
+
</Card>
|
|
13
|
+
<Modal v-model="stackOpened" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" :width="800">
|
|
14
|
+
<template #header>
|
|
15
|
+
<div>
|
|
16
|
+
<slot name="header">
|
|
17
|
+
<span class="title">堆栈信息</span>
|
|
18
|
+
<span class="description">Stack Info</span>
|
|
19
|
+
</slot>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
<div class="ivu-ml-8 ivu-mr-8">
|
|
23
|
+
{{ log.stack }}
|
|
24
|
+
</div>
|
|
25
|
+
<template #footer>
|
|
26
|
+
<div>
|
|
27
|
+
<Button type="default" custom-icon="fa fa-times" @click="stackOpened = false">关闭</Button>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
</Modal>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
<script>
|
|
34
|
+
import mixinPage from '../../mixins/page';
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'system-log',
|
|
38
|
+
mixins: [mixinPage],
|
|
39
|
+
components: {},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
log: {},
|
|
43
|
+
stackOpened: false
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
computed: {},
|
|
47
|
+
created() {},
|
|
48
|
+
methods: {
|
|
49
|
+
openStack(row) {
|
|
50
|
+
this.log = row;
|
|
51
|
+
this.stackOpened = true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="i-layout-page-header">
|
|
4
|
+
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
|
+
</div>
|
|
6
|
+
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
<view-table ref="table" view-code="Notice" @create="$refs.form.open()" @edit="({ row, index }) => $refs.form.open(row)"></view-table>
|
|
8
|
+
</Card>
|
|
9
|
+
<modal-form ref="form" view-code="NoticeEdit" @on-after-save="$refs.table.loadData()" />
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
<script>
|
|
13
|
+
import mixinPage from '../../mixins/page';
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: 'system-notice',
|
|
17
|
+
mixins: [mixinPage],
|
|
18
|
+
components: {},
|
|
19
|
+
data() {
|
|
20
|
+
return {};
|
|
21
|
+
},
|
|
22
|
+
computed: {},
|
|
23
|
+
created() {},
|
|
24
|
+
methods: {}
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="i-layout-page-header">
|
|
4
|
+
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
|
+
</div>
|
|
6
|
+
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
<view-table ref="table" view-code="OpenApi" @create="$refs.form.open()" @edit="({ row, index }) => $refs.form.open(row)" />
|
|
8
|
+
</Card>
|
|
9
|
+
<modal-form ref="form" view-code="OpenApiEdit" @on-after-save="$refs.table.loadData()" />
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
<script>
|
|
13
|
+
import mixinPage from '../../mixins/page';
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: 'system-openApi',
|
|
17
|
+
mixins: [mixinPage],
|
|
18
|
+
components: {},
|
|
19
|
+
data() {
|
|
20
|
+
return {};
|
|
21
|
+
},
|
|
22
|
+
computed: {},
|
|
23
|
+
created() {},
|
|
24
|
+
methods: {}
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="i-layout-page-header">
|
|
4
|
+
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
|
+
</div>
|
|
6
|
+
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
<view-table ref="table" view-code="OpenUser" @create="$refs.form.open()" @edit="({ row, index }) => $refs.form.open(row)">
|
|
8
|
+
<template #command="{ row }">
|
|
9
|
+
<Button size="small" title="接口权限" type="primary" custom-icon="fa fa-atom" @click="openApiTableOpen(row)"></Button>
|
|
10
|
+
</template>
|
|
11
|
+
</view-table>
|
|
12
|
+
</Card>
|
|
13
|
+
<modal-form ref="form" view-code="OpenUserEdit" @on-after-save="$refs.table.loadData()" />
|
|
14
|
+
<modal-table ref="openApiTable" view-code="OpenApiCheck" :select-enable="true" :static="true" :footerEnable="true">
|
|
15
|
+
<template #footer>
|
|
16
|
+
<Button type="primary" custom-icon="fa fa-save" @click="saveOpenApiPermission()">保存</Button>
|
|
17
|
+
<Button type="default" custom-icon="fa fa-times" @click="$refs.openApiTable.close()">关闭</Button>
|
|
18
|
+
</template>
|
|
19
|
+
</modal-table>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
<script>
|
|
23
|
+
import mixinPage from '../../mixins/page';
|
|
24
|
+
import openApiPermissionApi from '../../api/openApiPermission';
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
name: 'system-openUser',
|
|
28
|
+
mixins: [mixinPage],
|
|
29
|
+
components: {},
|
|
30
|
+
data() {
|
|
31
|
+
return {
|
|
32
|
+
openUserID: null
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
computed: {},
|
|
36
|
+
created() {},
|
|
37
|
+
methods: {
|
|
38
|
+
// 打开接口列表界面
|
|
39
|
+
async openApiTableOpen(row) {
|
|
40
|
+
this.openUserID = row.id;
|
|
41
|
+
let openApis = await openApiPermissionApi.queryForCheck(row.id);
|
|
42
|
+
this.$refs.openApiTable.loadData(openApis);
|
|
43
|
+
this.$refs.openApiTable.setSelected(
|
|
44
|
+
openApis.filter(item => {
|
|
45
|
+
return item.checked;
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
this.$refs.openApiTable.open();
|
|
49
|
+
},
|
|
50
|
+
// 保存接口权限
|
|
51
|
+
async saveOpenApiPermission() {
|
|
52
|
+
this.confirm('确定要保存吗?', () => {
|
|
53
|
+
let openApiIDs = this.$refs.openApiTable.getSelected().map(item => {
|
|
54
|
+
return item.id;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
openApiPermissionApi.batchSave(this.openUserID, openApiIDs).then(() => {
|
|
58
|
+
this.success('保存成功!', () => {
|
|
59
|
+
this.$refs.openApiTable.close();
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
</script>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="i-layout-page-header">
|
|
4
|
+
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
|
+
</div>
|
|
6
|
+
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
<view-table
|
|
8
|
+
ref="table"
|
|
9
|
+
view-code="Organization"
|
|
10
|
+
:filter="filter"
|
|
11
|
+
:tree-enable="true"
|
|
12
|
+
:tree-load="row => onTreeLoad(row)"
|
|
13
|
+
:has-children="
|
|
14
|
+
row => {
|
|
15
|
+
return row.hasChildren;
|
|
16
|
+
}
|
|
17
|
+
"
|
|
18
|
+
@create="create()"
|
|
19
|
+
@edit="({ row, index }) => edit(row)"
|
|
20
|
+
>
|
|
21
|
+
<template #command="{ row }">
|
|
22
|
+
<Button size="small" title="创建下级" type="primary" custom-icon="fa fa-plus" @click="create(row)"></Button>
|
|
23
|
+
</template>
|
|
24
|
+
<template #column="{ row, column, code }">
|
|
25
|
+
<template v-if="code == 'name'">
|
|
26
|
+
<div :style="{ 'font-weight': row.hasChildren ? 'bold' : '', 'text-indent': row._depth * 12 + 'px' }">{{ showData(row, column) }}</div>
|
|
27
|
+
</template>
|
|
28
|
+
</template>
|
|
29
|
+
</view-table>
|
|
30
|
+
</Card>
|
|
31
|
+
<modal-form ref="form" view-code="OrganizationEdit" @on-after-save="formAfterSave" />
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
<script>
|
|
35
|
+
import mixinPage from '../../mixins/page';
|
|
36
|
+
import modelApi from '../../api/model';
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name: 'system-organization',
|
|
40
|
+
mixins: [mixinPage],
|
|
41
|
+
components: {},
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
data: null,
|
|
45
|
+
filter: {
|
|
46
|
+
parentID: 'null'
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
computed: {},
|
|
51
|
+
created() {},
|
|
52
|
+
methods: {
|
|
53
|
+
// 树展开
|
|
54
|
+
async onTreeLoad(row) {
|
|
55
|
+
let res = await modelApi.query('Organization', {
|
|
56
|
+
parentID: row.id,
|
|
57
|
+
page: 1,
|
|
58
|
+
per: 1000,
|
|
59
|
+
orderBy: '+orderNo'
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
for (let data of res.data) {
|
|
63
|
+
data._depth = row._depth == null ? 1 : row._depth + 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return res.data;
|
|
67
|
+
},
|
|
68
|
+
// 创建
|
|
69
|
+
create(parent) {
|
|
70
|
+
this.data = null;
|
|
71
|
+
if (parent) {
|
|
72
|
+
this.$refs.form.openDefault({
|
|
73
|
+
parentID: parent.id,
|
|
74
|
+
orderNo: parent.orderNo
|
|
75
|
+
});
|
|
76
|
+
} else {
|
|
77
|
+
this.$refs.form.openDefault({});
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
// 编辑
|
|
81
|
+
edit(row) {
|
|
82
|
+
this.data = row;
|
|
83
|
+
this.$refs.form.open(row);
|
|
84
|
+
},
|
|
85
|
+
// 保存后事件
|
|
86
|
+
formAfterSave(row) {
|
|
87
|
+
if (this.data) {
|
|
88
|
+
for (let key in row) {
|
|
89
|
+
this.data[key] = row[key];
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
this.$refs.table.loadData();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
</script>
|
|
98
|
+
[]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="i-layout-page-header">
|
|
4
|
+
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
|
+
</div>
|
|
6
|
+
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
<view-table ref="table" view-code="OrganizationType" @create="$refs.form.open()" @edit="({ row, index }) => $refs.form.open(row)"></view-table>
|
|
8
|
+
</Card>
|
|
9
|
+
<modal-form ref="form" view-code="OrganizationTypeEdit" @on-after-save="$refs.table.loadData()" />
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
<script>
|
|
13
|
+
import mixinPage from '../../mixins/page';
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: 'system-organizationType',
|
|
17
|
+
mixins: [mixinPage],
|
|
18
|
+
components: {},
|
|
19
|
+
data() {
|
|
20
|
+
return {};
|
|
21
|
+
},
|
|
22
|
+
computed: {},
|
|
23
|
+
created() {},
|
|
24
|
+
methods: {}
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="i-layout-page-header">
|
|
4
|
+
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
|
+
</div>
|
|
6
|
+
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
<view-table
|
|
8
|
+
ref="table"
|
|
9
|
+
view-code="Permission"
|
|
10
|
+
:filter="filter"
|
|
11
|
+
:selectEnable="true"
|
|
12
|
+
:tree-enable="true"
|
|
13
|
+
:tree-load="row => onTreeLoad(row)"
|
|
14
|
+
:has-children="
|
|
15
|
+
row => {
|
|
16
|
+
return row.hasChildren;
|
|
17
|
+
}
|
|
18
|
+
"
|
|
19
|
+
@create="create()"
|
|
20
|
+
@edit="({ row, index }) => edit(row)"
|
|
21
|
+
>
|
|
22
|
+
<template #filterCommand>
|
|
23
|
+
<Button size="small" type="info" custom-icon="fa fa-cloud-download-alt" @click="exportFile()">导出</Button>
|
|
24
|
+
<file-upload url="api/Permission/importFile" accept=".pms" @on-success="importFileSuccess" style="display: inline-block; margin-left: 4px; margin-right: 4px">
|
|
25
|
+
<template #>
|
|
26
|
+
<Button type="primary" custom-icon="fa fa-cloud-upload-alt" size="small">导入</Button>
|
|
27
|
+
</template>
|
|
28
|
+
</file-upload>
|
|
29
|
+
</template>
|
|
30
|
+
<template #command="{ row }">
|
|
31
|
+
<Button size="small" title="创建下级" type="primary" custom-icon="fa fa-plus" @click="create(row)"></Button>
|
|
32
|
+
</template>
|
|
33
|
+
<template #column="{ row, column, code }">
|
|
34
|
+
<template v-if="code == 'name'">
|
|
35
|
+
<div :style="{ 'font-weight': row.hasChildren ? 'bold' : '', 'text-indent': row._depth * 12 + 'px' }">{{ showData(row, column) }}</div>
|
|
36
|
+
</template>
|
|
37
|
+
</template>
|
|
38
|
+
</view-table>
|
|
39
|
+
</Card>
|
|
40
|
+
<modal-form ref="form" view-code="PermissionEdit" @on-change="formChange" @on-after-save="formAfterSave" />
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
<script>
|
|
44
|
+
import mixinPage from '../../mixins/page';
|
|
45
|
+
import permissionApi from '../../api/permission';
|
|
46
|
+
import modelApi from '../../api/model';
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
name: 'system-permission',
|
|
50
|
+
mixins: [mixinPage],
|
|
51
|
+
components: {},
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
data: null,
|
|
55
|
+
filter: {
|
|
56
|
+
parentID: 'null'
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
computed: {},
|
|
61
|
+
created() {},
|
|
62
|
+
methods: {
|
|
63
|
+
formChange(sender, oldValue, newValue, selected) {
|
|
64
|
+
const data = this.$refs.form.data;
|
|
65
|
+
const columns = this.$refs.form.columns;
|
|
66
|
+
|
|
67
|
+
const columnCustomPageID = columns.find(item => {
|
|
68
|
+
return item.code === 'customPageID';
|
|
69
|
+
});
|
|
70
|
+
const columnTemplateUrl = columns.find(item => {
|
|
71
|
+
return item.code === 'templateUrl';
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
if (data.isCustomPage) {
|
|
75
|
+
// 自定义页面
|
|
76
|
+
columnCustomPageID.isShow = true;
|
|
77
|
+
columnTemplateUrl.isShow = false;
|
|
78
|
+
} else {
|
|
79
|
+
columnCustomPageID.isShow = false;
|
|
80
|
+
columnTemplateUrl.isShow = true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 必须父路由打头
|
|
84
|
+
if (sender && sender.code == 'parentID') {
|
|
85
|
+
if (selected) {
|
|
86
|
+
data.url = selected.url + '/';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (sender && sender.code == 'hasPermissionPoint') {
|
|
91
|
+
if (data.hasPermissionPoint && data.permissionPoint == null) {
|
|
92
|
+
this.$refs.form.setTableData('permissionPoint', [
|
|
93
|
+
{ code: 'view', name: '查看' },
|
|
94
|
+
{ code: 'create', name: '新增' },
|
|
95
|
+
{ code: 'edit', name: '编辑' },
|
|
96
|
+
{ code: 'remove', name: '删除' }
|
|
97
|
+
]);
|
|
98
|
+
}
|
|
99
|
+
// else if (!data.hasPermissionPoint) {
|
|
100
|
+
// this.$refs.form.setTableData('permissionPoint', null);
|
|
101
|
+
// }
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
//this.$refs.form.forceUpdate();
|
|
105
|
+
},
|
|
106
|
+
// 导出文件
|
|
107
|
+
exportFile() {
|
|
108
|
+
let ids = this.$refs.table.getSelected().map(x => {
|
|
109
|
+
return x.id;
|
|
110
|
+
});
|
|
111
|
+
if (ids.length > 0) {
|
|
112
|
+
permissionApi.exportFile(ids);
|
|
113
|
+
} else {
|
|
114
|
+
this.error('请选择需要导出的内容!');
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
// 导入成功
|
|
118
|
+
importFileSuccess(res) {
|
|
119
|
+
if (res.code == 0) {
|
|
120
|
+
this.success('导入成功!', () => {
|
|
121
|
+
this.$refs.table.loadData();
|
|
122
|
+
});
|
|
123
|
+
} else {
|
|
124
|
+
this.error(res.message);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
// 树展开
|
|
128
|
+
async onTreeLoad(row) {
|
|
129
|
+
let res = await modelApi.query('Permission', {
|
|
130
|
+
parentID: row.id,
|
|
131
|
+
page: 1,
|
|
132
|
+
per: 1000,
|
|
133
|
+
orderBy: '+orderNo'
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
for (let data of res.data) {
|
|
137
|
+
data._depth = row._depth == null ? 1 : row._depth + 1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return res.data;
|
|
141
|
+
},
|
|
142
|
+
// 创建
|
|
143
|
+
create(parent) {
|
|
144
|
+
this.data = null;
|
|
145
|
+
if (parent) {
|
|
146
|
+
this.$refs.form.openDefault({
|
|
147
|
+
clientTypeID: parent.clientTypeID,
|
|
148
|
+
parentID: parent.id,
|
|
149
|
+
icon: parent.icon,
|
|
150
|
+
url: parent.url + '/',
|
|
151
|
+
orderNo: parent.orderNo
|
|
152
|
+
});
|
|
153
|
+
} else {
|
|
154
|
+
this.$refs.form.openDefault({});
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
// 编辑
|
|
158
|
+
edit(row) {
|
|
159
|
+
this.data = row;
|
|
160
|
+
this.$refs.form.open(row);
|
|
161
|
+
},
|
|
162
|
+
// 保存后事件
|
|
163
|
+
formAfterSave(row) {
|
|
164
|
+
if (this.data) {
|
|
165
|
+
for (let key in row) {
|
|
166
|
+
this.data[key] = row[key];
|
|
167
|
+
}
|
|
168
|
+
} else {
|
|
169
|
+
this.$refs.table.loadData();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
</script>
|
|
175
|
+
[]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="i-layout-page-header">
|
|
4
|
+
<PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
|
|
5
|
+
</div>
|
|
6
|
+
<Card :bordered="false" dis-hover class="ivu-mt">
|
|
7
|
+
<view-table ref="table" view-code="PlanJob" @create="$refs.form.open()" @edit="({ row, index }) => $refs.form.open(row)">
|
|
8
|
+
<template #command="{ row }">
|
|
9
|
+
<Button size="small" title="立即启动" type="primary" custom-icon="fa fa-bolt" @click="execute(row)"></Button>
|
|
10
|
+
</template>
|
|
11
|
+
</view-table>
|
|
12
|
+
</Card>
|
|
13
|
+
<modal-form ref="form" view-code="PlanJobEdit" @on-after-save="$refs.table.loadData()" />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
import mixinPage from '../../mixins/page';
|
|
18
|
+
import planJobApi from '../../api/planJob';
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'system-planJob',
|
|
22
|
+
mixins: [mixinPage],
|
|
23
|
+
components: {},
|
|
24
|
+
data() {
|
|
25
|
+
return {};
|
|
26
|
+
},
|
|
27
|
+
computed: {},
|
|
28
|
+
created() {},
|
|
29
|
+
methods: {
|
|
30
|
+
// 执行
|
|
31
|
+
execute(row) {
|
|
32
|
+
this.confirm('确定要立即启动该任务吗?', async () => {
|
|
33
|
+
await planJobApi.execute(row.id);
|
|
34
|
+
this.success('启动成功!');
|
|
35
|
+
this.$refs.table.loadData();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
</script>
|