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,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="signIn">
|
|
3
|
+
<div class="box cf">
|
|
4
|
+
<div class="left" :style="{ background: 'url(' + rootPath + 'images/login/signIn-img.png) center center no-repeat', 'background-size': 'cover' }">
|
|
5
|
+
<h3>{{ sysInfo.banner }}</h3>
|
|
6
|
+
<p>{{ sysInfo.subBanner }}</p>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="right">
|
|
9
|
+
<div class="logo cf">
|
|
10
|
+
<img :src="rootPath + 'images/login/logo.png'" />
|
|
11
|
+
<h2>{{ sysInfo.title }}</h2>
|
|
12
|
+
<small></small>
|
|
13
|
+
</div>
|
|
14
|
+
<input type="text" v-model="username" @keyup="submit" class="username" autofocus placeholder="请输入账号" />
|
|
15
|
+
<input type="password" v-model="password" @keyup="submit" class="password" placeholder="请输入密码" />
|
|
16
|
+
<!--<div class="remenber">
|
|
17
|
+
<label for="remenber" class="remenber1"><input type="checkbox" ng-model="remember">记住我</label>
|
|
18
|
+
</div>-->
|
|
19
|
+
<button type="button" @click="submit()" class="sign-in">登录 Login</button>
|
|
20
|
+
<button type="button" @click="close" class="exit">退出 Exit</button>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="cpt">{{ sysInfo.copyright }}</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<script>
|
|
27
|
+
import { mapActions } from 'vuex';
|
|
28
|
+
import router from '../../router';
|
|
29
|
+
import mixinPage from '../../mixins/page';
|
|
30
|
+
//import permissionApi from '../../api/permission';
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
mixins: [mixinPage],
|
|
34
|
+
components: {},
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
username: '',
|
|
38
|
+
password: '',
|
|
39
|
+
autoLogin: true
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
created() {},
|
|
43
|
+
computed: {},
|
|
44
|
+
methods: {
|
|
45
|
+
...mapActions('admin/account', ['login']),
|
|
46
|
+
/**
|
|
47
|
+
* @description 登录
|
|
48
|
+
* 表单校验已有 iView Pro 自动完成,如有需要修改,请阅读 iView Pro 文档
|
|
49
|
+
*/
|
|
50
|
+
async submit(e) {
|
|
51
|
+
if (e) {
|
|
52
|
+
var keycode = window.event ? e.keyCode : e.which;
|
|
53
|
+
|
|
54
|
+
if (!keycode) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (keycode !== 0 && keycode !== 1 && keycode !== 13) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (this.username && this.password) {
|
|
64
|
+
await this.login({
|
|
65
|
+
username: this.username,
|
|
66
|
+
password: this.password
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// 初始化菜单和权限
|
|
70
|
+
// let res = await permissionApi.query();
|
|
71
|
+
|
|
72
|
+
// // 默认包含首页
|
|
73
|
+
// res.menus.unshift({
|
|
74
|
+
// name: '首页',
|
|
75
|
+
// subName: 'Home',
|
|
76
|
+
// parentID: null,
|
|
77
|
+
// url: 'home',
|
|
78
|
+
// templateUrl: '@/home',
|
|
79
|
+
// icon: 'fa fa-home'
|
|
80
|
+
// });
|
|
81
|
+
|
|
82
|
+
// this.$store.dispatch('admin/menu/setSider', res.menus);
|
|
83
|
+
// this.$store.dispatch('admin/permission/set', res.permissions);
|
|
84
|
+
|
|
85
|
+
// 重定向对象不存在则返回顶层路径
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
router.replace(this.$route.query.redirect || '/home');
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
close() {
|
|
92
|
+
this.confirm('确定要关闭系统吗?\r\nAre you sure to exit?', () => {
|
|
93
|
+
window.location.href = 'about:blank';
|
|
94
|
+
window.close();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<style src="../../styles/css/login.css" scoped></style>
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Row :gutter="24" class="ivu-mt">
|
|
4
|
+
<Col :xxl="8" :xl="12" :lg="12" :md="12" :sm="24" :xs="24" class="ivu-mb">
|
|
5
|
+
<div>
|
|
6
|
+
<Row :gutter="24">
|
|
7
|
+
<Col v-bind="grid" class="ivu-mb">
|
|
8
|
+
<Card :bordered="false" :padding="12">
|
|
9
|
+
<template #title>
|
|
10
|
+
<p>
|
|
11
|
+
<span>检测任务</span>
|
|
12
|
+
</p>
|
|
13
|
+
</template>
|
|
14
|
+
<div class="stat">
|
|
15
|
+
<div class="icon">
|
|
16
|
+
<Icon type="md-speedometer" color="rgb(24, 144, 255)" />
|
|
17
|
+
</div>
|
|
18
|
+
<div class="content">
|
|
19
|
+
<div>
|
|
20
|
+
<Numeral value="85" format="0,0" v-font="30" />
|
|
21
|
+
<div class="value1">待分派</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div>
|
|
24
|
+
<Numeral value="85" format="0,0" v-font="20" />
|
|
25
|
+
<div class="value2">已分派</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</Card>
|
|
30
|
+
</Col>
|
|
31
|
+
<Col v-bind="grid" class="ivu-mb">
|
|
32
|
+
<Card :bordered="false" :padding="12">
|
|
33
|
+
<template #title>
|
|
34
|
+
<p>
|
|
35
|
+
<span>原始记录</span>
|
|
36
|
+
</p>
|
|
37
|
+
</template>
|
|
38
|
+
<div class="stat">
|
|
39
|
+
<div class="icon">
|
|
40
|
+
<Icon type="md-list-box" color="rgb(250, 173, 20)" />
|
|
41
|
+
</div>
|
|
42
|
+
<div class="content">
|
|
43
|
+
<div>
|
|
44
|
+
<Numeral value="85" format="0,0" v-font="30" />
|
|
45
|
+
<div class="value1">待分派</div>
|
|
46
|
+
</div>
|
|
47
|
+
<div>
|
|
48
|
+
<Numeral value="85" format="0,0" v-font="20" />
|
|
49
|
+
<div class="value2">已分派</div>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</Card>
|
|
54
|
+
</Col>
|
|
55
|
+
<Col v-bind="grid" class="ivu-mb">
|
|
56
|
+
<Card :bordered="false" :padding="12">
|
|
57
|
+
<template #title>
|
|
58
|
+
<p>
|
|
59
|
+
<span>检测报告</span>
|
|
60
|
+
</p>
|
|
61
|
+
</template>
|
|
62
|
+
<div class="stat">
|
|
63
|
+
<div class="icon">
|
|
64
|
+
<Icon type="md-print" color="rgb(19, 194, 194)" />
|
|
65
|
+
</div>
|
|
66
|
+
<div class="content">
|
|
67
|
+
<div>
|
|
68
|
+
<Numeral value="85" format="0,0" v-font="30" />
|
|
69
|
+
<div class="value1">待分派</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div>
|
|
72
|
+
<Numeral value="85" format="0,0" v-font="20" />
|
|
73
|
+
<div class="value2">已分派</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</Card>
|
|
78
|
+
</Col>
|
|
79
|
+
<Col v-bind="grid" class="ivu-mb">
|
|
80
|
+
<Card :bordered="false" :padding="12">
|
|
81
|
+
<template #title>
|
|
82
|
+
<p>
|
|
83
|
+
<span>检测样件</span>
|
|
84
|
+
</p>
|
|
85
|
+
</template>
|
|
86
|
+
<div class="stat">
|
|
87
|
+
<div class="icon">
|
|
88
|
+
<Icon type="md-analytics" color="#b37feb" />
|
|
89
|
+
</div>
|
|
90
|
+
<div class="content">
|
|
91
|
+
<div>
|
|
92
|
+
<Numeral value="85" format="0,0" v-font="30" />
|
|
93
|
+
<div class="value1">待分派</div>
|
|
94
|
+
</div>
|
|
95
|
+
<div>
|
|
96
|
+
<Numeral value="85" format="0,0" v-font="20" />
|
|
97
|
+
<div class="value2">已分派</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</Card>
|
|
102
|
+
</Col>
|
|
103
|
+
</Row>
|
|
104
|
+
</div>
|
|
105
|
+
</Col>
|
|
106
|
+
<Col :xl="10" :lg="8" :md="8" :sm="12" :xs="24" class="ivu-mb">
|
|
107
|
+
<notice-list />
|
|
108
|
+
</Col>
|
|
109
|
+
<Col :xl="6" :lg="8" :md="8" :sm="12" :xs="24" class="ivu-mb">
|
|
110
|
+
<shortcut />
|
|
111
|
+
</Col>
|
|
112
|
+
</Row>
|
|
113
|
+
</div>
|
|
114
|
+
</template>
|
|
115
|
+
<script>
|
|
116
|
+
import mixinPage from '../../mixins/page';
|
|
117
|
+
import shortcut from '../../components/home/shortcut';
|
|
118
|
+
import noticeList from '../../components/home/notice-list';
|
|
119
|
+
|
|
120
|
+
export default {
|
|
121
|
+
name: 'home',
|
|
122
|
+
mixins: [mixinPage],
|
|
123
|
+
components: { noticeList, shortcut },
|
|
124
|
+
data() {
|
|
125
|
+
return {
|
|
126
|
+
grid: {
|
|
127
|
+
xl: 12,
|
|
128
|
+
lg: 12,
|
|
129
|
+
md: 12,
|
|
130
|
+
sm: 12,
|
|
131
|
+
xs: 12
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
},
|
|
135
|
+
async mounted() {},
|
|
136
|
+
methods: {}
|
|
137
|
+
};
|
|
138
|
+
</script>
|
|
139
|
+
|
|
140
|
+
<style scoped>
|
|
141
|
+
.stat {
|
|
142
|
+
display: flex;
|
|
143
|
+
}
|
|
144
|
+
.stat .icon {
|
|
145
|
+
width: 50%;
|
|
146
|
+
margin-left: auto;
|
|
147
|
+
margin-right: auto;
|
|
148
|
+
text-align: center;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.stat .icon i {
|
|
152
|
+
font-size: 64px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.stat .content {
|
|
156
|
+
width: 50%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.stat .content .value1 {
|
|
160
|
+
font-size: 12px;
|
|
161
|
+
float: right;
|
|
162
|
+
margin-top: 18px;
|
|
163
|
+
}
|
|
164
|
+
.stat .content .value2 {
|
|
165
|
+
font-size: 12px;
|
|
166
|
+
float: right;
|
|
167
|
+
margin-top: 8px;
|
|
168
|
+
}
|
|
169
|
+
</style>
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Modal v-model="opened" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" :width="width">
|
|
4
|
+
<template #header>
|
|
5
|
+
<div>
|
|
6
|
+
<!--
|
|
7
|
+
@slot 页头
|
|
8
|
+
-->
|
|
9
|
+
<slot name="header">
|
|
10
|
+
<span class="title">{{ name }}</span>
|
|
11
|
+
<span class="description">{{ description }}</span>
|
|
12
|
+
</slot>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<div class="ivu-ml-8 ivu-mr-8">
|
|
16
|
+
<view-form v-show="!isCustom" ref="form" :readonly="readonly"></view-form>
|
|
17
|
+
<component v-show="isCustom" :is="customComponent" :readonly="readonly" ref="customComponent"></component>
|
|
18
|
+
</div>
|
|
19
|
+
<template #footer>
|
|
20
|
+
<div>
|
|
21
|
+
<Button v-for="(item, index) in outcomes" :key="index" type="primary" custom-icon="fa fa-check-circle" @click="action(item)">
|
|
22
|
+
{{ item.name == null ? '同意' : item.name }}
|
|
23
|
+
</Button>
|
|
24
|
+
<Button type="warning" v-if="isRejectable" custom-icon="fa fa-reply" @click="reject()">拒绝</Button>
|
|
25
|
+
<Button type="primary" v-if="isBackable" custom-icon="fa fa-share" @click="back()">退回上一步</Button>
|
|
26
|
+
<Button type="primary" v-if="isRedirectable" custom-icon="fa fa-share" @click="$refs.redirectTaskForm.open()">转办</Button>
|
|
27
|
+
<Button type="primary" v-if="isMessageEnable" custom-icon="fa fa-comment-dots" @click="openMessage()">发表意见</Button>
|
|
28
|
+
<Button type="info" custom-icon="fa fa-history" @click="$refs.approvalHistoryTable.open({ processInstID: task.processInstID })">历史</Button>
|
|
29
|
+
<Button type="default" custom-icon="fa fa-times" @click="opened = false">关闭</Button>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
</Modal>
|
|
33
|
+
<modal-table ref="approvalHistoryTable" view-code="ApprovalHistoryModal"></modal-table>
|
|
34
|
+
<modal-form ref="redirectTaskForm" view-code="RedirectTask">
|
|
35
|
+
<template #footer>
|
|
36
|
+
<Button type="primary" custom-icon="fa fa-check" @click="redirect()">确定</Button>
|
|
37
|
+
</template>
|
|
38
|
+
</modal-form>
|
|
39
|
+
<Modal v-model="messageOpened" scrollable>
|
|
40
|
+
<template #header>
|
|
41
|
+
<div>
|
|
42
|
+
<span class="title">意见发表</span>
|
|
43
|
+
<span class="description">Message</span>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
<div class="ivu-ml-8 ivu-mr-8">
|
|
47
|
+
<Form ref="messageForm" :model="messageData" label-position="top" label-colon=":" class="ivu-mt" @submit.prevent>
|
|
48
|
+
<Row :gutter="24" type="flex">
|
|
49
|
+
<Col v-bind="grid24">
|
|
50
|
+
<FormItem
|
|
51
|
+
label="意见内容"
|
|
52
|
+
key="message"
|
|
53
|
+
prop="message"
|
|
54
|
+
:rules="{
|
|
55
|
+
required: true,
|
|
56
|
+
message: '请输入',
|
|
57
|
+
trigger: 'blur,change'
|
|
58
|
+
}"
|
|
59
|
+
>
|
|
60
|
+
<Input type="textarea" :rows="6" v-model="messageData.message" />
|
|
61
|
+
</FormItem>
|
|
62
|
+
</Col>
|
|
63
|
+
</Row>
|
|
64
|
+
</Form>
|
|
65
|
+
</div>
|
|
66
|
+
<template #footer>
|
|
67
|
+
<Button type="primary" custom-icon="fa fa-check" @click="submitMessage">提交</Button>
|
|
68
|
+
<Button type="default" custom-icon="fa fa-times" @click="messageOpened = false">关闭</Button>
|
|
69
|
+
</template>
|
|
70
|
+
</Modal>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
<script>
|
|
74
|
+
import mixinPage from '../../mixins/page';
|
|
75
|
+
import customModelApi from '../../api/customModel';
|
|
76
|
+
import processInstApi from '../../api/processInst';
|
|
77
|
+
import modelApi from '../../api/model';
|
|
78
|
+
import taskApi from '../../api/task';
|
|
79
|
+
|
|
80
|
+
export default {
|
|
81
|
+
mixins: [mixinPage],
|
|
82
|
+
components: {},
|
|
83
|
+
data() {
|
|
84
|
+
return {
|
|
85
|
+
task: null,
|
|
86
|
+
model: null,
|
|
87
|
+
comment: null,
|
|
88
|
+
outcomes: [],
|
|
89
|
+
readonly: true,
|
|
90
|
+
isRejectable: false,
|
|
91
|
+
isBackable: false,
|
|
92
|
+
isRedirectable: false,
|
|
93
|
+
isMessageEnable: false,
|
|
94
|
+
messageData: {
|
|
95
|
+
message: null
|
|
96
|
+
},
|
|
97
|
+
messageOpened: false,
|
|
98
|
+
opened: false,
|
|
99
|
+
isCustom: false,
|
|
100
|
+
width: 800,
|
|
101
|
+
name: null,
|
|
102
|
+
description: null,
|
|
103
|
+
customComponent: null,
|
|
104
|
+
form: null
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
async created() {},
|
|
108
|
+
computed: {},
|
|
109
|
+
methods: {
|
|
110
|
+
// 打开
|
|
111
|
+
async open(row) {
|
|
112
|
+
let applicationType = row.processInst.applicationType;
|
|
113
|
+
this.outcomes = [];
|
|
114
|
+
this.task = row;
|
|
115
|
+
this.isRejectable = this.task.activityInst.activity.isRejectable;
|
|
116
|
+
this.isBackable = this.task.activityInst.activity.isBackable;
|
|
117
|
+
this.isRedirectable = this.task.activityInst.activity.isRedirectable;
|
|
118
|
+
this.isMessageEnable = this.task.processInst.isMessageEnable;
|
|
119
|
+
this.isCustom = false;
|
|
120
|
+
|
|
121
|
+
if (this.task.activityInst.activity.pageMode == 'Page') {
|
|
122
|
+
// 路由跳转
|
|
123
|
+
this.$router.push({ path: this.task.activityInst.activity.routerPath, query: { taskID: row.id } });
|
|
124
|
+
return;
|
|
125
|
+
} else if (this.task.activityInst.activity.pageMode == 'Component') {
|
|
126
|
+
// 动态组件
|
|
127
|
+
this.customComponent = this.$pages[this.task.activityInst.activity.templateUrl]; // 动态组件
|
|
128
|
+
this.isCustom = true;
|
|
129
|
+
|
|
130
|
+
setTimeout(async () => {
|
|
131
|
+
if (applicationType.isCustom) {
|
|
132
|
+
this.model = await customModelApi.get(applicationType.model, row.processInst.modelID);
|
|
133
|
+
} else {
|
|
134
|
+
this.model = await modelApi.get(applicationType.model, row.processInst.modelID);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
this.form = this.$refs.customComponent.form;
|
|
138
|
+
this.form.data = this.model;
|
|
139
|
+
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
140
|
+
|
|
141
|
+
if (this.form.formView) {
|
|
142
|
+
this.width = this.form.formView.width || '800';
|
|
143
|
+
this.name = this.form.formView.name;
|
|
144
|
+
this.description = this.form.formView.description;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
this.opened = true;
|
|
148
|
+
});
|
|
149
|
+
} else if (this.task.activityInst.activity.pageMode == 'Form') {
|
|
150
|
+
this.form = this.$refs.form;
|
|
151
|
+
this.form.init(this.task.activityInst.activity.formViewCode, async view => {
|
|
152
|
+
if (view.dataView.isCustom) {
|
|
153
|
+
this.model = await customModelApi.get(applicationType.model, row.processInst.modelID);
|
|
154
|
+
} else {
|
|
155
|
+
this.model = await modelApi.get(applicationType.model, row.processInst.modelID);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
159
|
+
this.width = this.form.formView.width || '800';
|
|
160
|
+
this.name = this.form.formView.name;
|
|
161
|
+
this.description = this.form.formView.description;
|
|
162
|
+
this.form.data = this.model;
|
|
163
|
+
|
|
164
|
+
setTimeout(() => {
|
|
165
|
+
this.form.onDataChange();
|
|
166
|
+
this.form.clearValidate();
|
|
167
|
+
this.opened = true;
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
} else if (applicationType.pageMode == 'Page') {
|
|
171
|
+
this.$router.push({ path: applicationType.routerPath, query: { taskID: row.id } });
|
|
172
|
+
return;
|
|
173
|
+
} else if (applicationType.pageMode == 'Component') {
|
|
174
|
+
// 动态组件
|
|
175
|
+
this.customComponent = this.$pages[applicationType.templateUrl]; // 动态组件
|
|
176
|
+
this.isCustom = true;
|
|
177
|
+
|
|
178
|
+
if (applicationType.isCustom) {
|
|
179
|
+
this.model = await customModelApi.get(applicationType.model, row.processInst.modelID);
|
|
180
|
+
} else {
|
|
181
|
+
this.model = await modelApi.get(applicationType.model, row.processInst.modelID);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
this.form = this.$refs.customComponent.form;
|
|
185
|
+
this.form.data = this.model;
|
|
186
|
+
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
187
|
+
|
|
188
|
+
if (this.form.formView) {
|
|
189
|
+
this.width = this.form.formView.width || '800';
|
|
190
|
+
this.name = this.form.formView.name;
|
|
191
|
+
this.description = this.form.formView.description;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
this.opened = true;
|
|
195
|
+
} else if (applicationType.pageMode == 'Form') {
|
|
196
|
+
this.form = this.$refs.form;
|
|
197
|
+
this.form.init(applicationType.formViewCode, async view => {
|
|
198
|
+
if (view.dataView.isCustom) {
|
|
199
|
+
this.model = await customModelApi.get(applicationType.model, row.processInst.modelID);
|
|
200
|
+
} else {
|
|
201
|
+
this.model = await modelApi.get(applicationType.model, row.processInst.modelID);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
this.readonly = !this.task.activityInst.activity.isEditable;
|
|
205
|
+
this.width = this.form.formView.width || '800';
|
|
206
|
+
this.name = this.form.formView.name;
|
|
207
|
+
this.description = this.form.formView.description;
|
|
208
|
+
this.form.data = this.model;
|
|
209
|
+
|
|
210
|
+
setTimeout(() => {
|
|
211
|
+
this.form.onDataChange();
|
|
212
|
+
this.form.clearValidate();
|
|
213
|
+
this.opened = true;
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
} else {
|
|
217
|
+
this.error('配置错误,没有相应的处理界面!');
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
let res = await modelApi.query('Outcome', { activityFromID: row.activityInst.activityID });
|
|
222
|
+
this.outcomes = res.data;
|
|
223
|
+
|
|
224
|
+
// res = await modelApi.query('Task', { processInstID: row.processInstID });
|
|
225
|
+
// this.$refs.approvalHistoryTable.loadData(res.data);
|
|
226
|
+
},
|
|
227
|
+
// 执行结果
|
|
228
|
+
async action(outcome) {
|
|
229
|
+
let isOK = await this.form.validate();
|
|
230
|
+
|
|
231
|
+
if (!isOK) {
|
|
232
|
+
this.error('有内容不符合要求,请正确填写!');
|
|
233
|
+
} else {
|
|
234
|
+
this.confirmInput(
|
|
235
|
+
'确认要' + (outcome.name == null ? '同意' : outcome.name) + '该申请吗?',
|
|
236
|
+
'备注',
|
|
237
|
+
async () => {
|
|
238
|
+
let data = null;
|
|
239
|
+
if (!this.readonly) {
|
|
240
|
+
data = this.form.getFullData();
|
|
241
|
+
|
|
242
|
+
if (!data) {
|
|
243
|
+
// 表格验证失败
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
await taskApi.do(this.task.id, outcome.id, data, this.comment);
|
|
249
|
+
this.success('处理成功!');
|
|
250
|
+
this.resetNotice();
|
|
251
|
+
this.$emit('on-after-action');
|
|
252
|
+
this.opened = false;
|
|
253
|
+
},
|
|
254
|
+
comment => {
|
|
255
|
+
this.comment = comment;
|
|
256
|
+
return true;
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
// 拒绝
|
|
262
|
+
async reject() {
|
|
263
|
+
this.confirmInput(
|
|
264
|
+
'确认要拒绝该申请吗?',
|
|
265
|
+
'备注',
|
|
266
|
+
async () => {
|
|
267
|
+
await taskApi.reject(this.task.id, this.comment);
|
|
268
|
+
this.success('处理成功!');
|
|
269
|
+
this.resetNotice();
|
|
270
|
+
this.$emit('on-after-action');
|
|
271
|
+
this.opened = false;
|
|
272
|
+
},
|
|
273
|
+
comment => {
|
|
274
|
+
if (!(comment || '').trim()) {
|
|
275
|
+
this.warning('请输入拒绝原因!');
|
|
276
|
+
return false;
|
|
277
|
+
} else {
|
|
278
|
+
this.comment = comment;
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
);
|
|
283
|
+
},
|
|
284
|
+
// 退回上一步
|
|
285
|
+
async back() {
|
|
286
|
+
this.confirmInput(
|
|
287
|
+
'确认要退回上一步吗?',
|
|
288
|
+
'备注',
|
|
289
|
+
async () => {
|
|
290
|
+
await taskApi.back(this.task.id, this.comment);
|
|
291
|
+
this.success('处理成功!');
|
|
292
|
+
this.resetNotice();
|
|
293
|
+
this.$emit('on-after-action');
|
|
294
|
+
this.opened = false;
|
|
295
|
+
},
|
|
296
|
+
comment => {
|
|
297
|
+
if (!(comment || '').trim()) {
|
|
298
|
+
this.warning('请输入退回原因!');
|
|
299
|
+
return false;
|
|
300
|
+
} else {
|
|
301
|
+
this.comment = comment;
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
);
|
|
306
|
+
},
|
|
307
|
+
// 转办
|
|
308
|
+
async redirect() {
|
|
309
|
+
let isOK = await this.$refs.redirectTaskForm.validate();
|
|
310
|
+
|
|
311
|
+
if (!isOK) {
|
|
312
|
+
this.error('有内容不符合要求,请正确填写!');
|
|
313
|
+
} else {
|
|
314
|
+
let model = this.$refs.redirectTaskForm.data;
|
|
315
|
+
|
|
316
|
+
this.confirm('确定要将任务转移给 ' + model.target.name + ' 吗?', async () => {
|
|
317
|
+
await taskApi.redirect(this.task.id, model.targetID, model.comment);
|
|
318
|
+
this.success('转办成功!');
|
|
319
|
+
this.resetNotice();
|
|
320
|
+
this.$emit('on-after-action');
|
|
321
|
+
this.$refs.redirectTaskForm.close();
|
|
322
|
+
this.opened = false;
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
// 打开意见输入
|
|
327
|
+
openMessage() {
|
|
328
|
+
this.messageData.message = null;
|
|
329
|
+
this.messageOpened = true;
|
|
330
|
+
},
|
|
331
|
+
// 提交意见
|
|
332
|
+
async submitMessage() {
|
|
333
|
+
let isOK = await this.$refs.messageForm.validate();
|
|
334
|
+
|
|
335
|
+
if (!isOK) {
|
|
336
|
+
this.error('有内容不符合要求,请正确填写!');
|
|
337
|
+
} else {
|
|
338
|
+
this.confirm('确定要发表意见吗?', async () => {
|
|
339
|
+
await processInstApi.addMessage(this.task.processInstID, this.messageData.message);
|
|
340
|
+
|
|
341
|
+
this.success('操作成功!', () => {
|
|
342
|
+
this.messageData.message = null;
|
|
343
|
+
this.messageOpened = false;
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
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="TodoList">
|
|
8
|
+
<template #command="{ row }">
|
|
9
|
+
<Button size="small" title="详细" type="info" custom-icon="fa fa-file-alt" @click="$refs.taskForm.open(row)"></Button>
|
|
10
|
+
</template>
|
|
11
|
+
</view-table>
|
|
12
|
+
</Card>
|
|
13
|
+
<task-form ref="taskForm" @on-after-action="$refs.table.loadData()"></task-form>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
import mixinPage from '../../mixins/page';
|
|
18
|
+
import taskForm from './task-form';
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'common-myTask',
|
|
22
|
+
mixins: [mixinPage],
|
|
23
|
+
components: { taskForm },
|
|
24
|
+
data() {
|
|
25
|
+
return {};
|
|
26
|
+
},
|
|
27
|
+
computed: {},
|
|
28
|
+
created() {},
|
|
29
|
+
methods: {}
|
|
30
|
+
};
|
|
31
|
+
</script>
|