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,480 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Modal v-model="opened" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" width="800">
|
|
4
|
+
<template #header>
|
|
5
|
+
<div>
|
|
6
|
+
<span class="title">参数设置</span>
|
|
7
|
+
<span class="description">Property Setting</span>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<div class="ivu-ml-8 ivu-mr-8">
|
|
11
|
+
<Form ref="form" :model="data" label-position="top" label-colon=":" class="ivu-mt" :rules="rules" @submit.prevent>
|
|
12
|
+
<Row :gutter="24" type="flex">
|
|
13
|
+
<Col v-bind="grid8">
|
|
14
|
+
<FormItem label="属性名称" prop="propertyName">
|
|
15
|
+
<Input type="text" v-model="data.propertyName"></Input>
|
|
16
|
+
</FormItem>
|
|
17
|
+
</Col>
|
|
18
|
+
<Col v-bind="grid8">
|
|
19
|
+
<FormItem label="属性代码" prop="propertyCode">
|
|
20
|
+
<Input type="text" v-model="data.propertyCode"></Input>
|
|
21
|
+
</FormItem>
|
|
22
|
+
</Col>
|
|
23
|
+
<Col v-bind="grid8">
|
|
24
|
+
<FormItem label="数据类型" prop="dataType">
|
|
25
|
+
<Select v-model="data.dataType" :transfer="true">
|
|
26
|
+
<Option v-for="item in getEnumList('DataType')" :key="item.id" :value="item.id">{{ item.name }}</Option>
|
|
27
|
+
</Select>
|
|
28
|
+
</FormItem>
|
|
29
|
+
</Col>
|
|
30
|
+
<Col v-bind="grid8">
|
|
31
|
+
<FormItem label="控件类型" prop="ControlType">
|
|
32
|
+
<Select v-model="data.controlType" :transfer="true">
|
|
33
|
+
<Option key="TextInput" value="TextInput">单行文本框</Option>
|
|
34
|
+
<Option key="NumberInput" value="NumberInput">数字输入框</Option>
|
|
35
|
+
<Option key="Check" value="Check">勾选</Option>
|
|
36
|
+
<Option key="Select" value="Select">选择框</Option>
|
|
37
|
+
<Option key="MultiSelect" value="MultiSelect">多选选择框</Option>
|
|
38
|
+
<Option key="DialogSelect" value="DialogSelect">弹出选择框</Option>
|
|
39
|
+
<Option key="MultiDialogSelect" value="MultiDialogSelect">多选弹出选择框</Option>
|
|
40
|
+
</Select>
|
|
41
|
+
</FormItem>
|
|
42
|
+
</Col>
|
|
43
|
+
<Col v-bind="grid8" v-if="needDataSource" v-show="data.controlType == 'Select' || data.controlType == 'MultiSelect' || data.controlType == 'ComboSelect'">
|
|
44
|
+
<FormItem label="数据源" key="Source" prop="Source">
|
|
45
|
+
<dialog-select
|
|
46
|
+
ref="select"
|
|
47
|
+
v-model="data.source"
|
|
48
|
+
source="EntitySelect"
|
|
49
|
+
source-data-code="name"
|
|
50
|
+
source-display-code="name"
|
|
51
|
+
@on-change="sourceChange"
|
|
52
|
+
></dialog-select>
|
|
53
|
+
</FormItem>
|
|
54
|
+
</Col>
|
|
55
|
+
<Col v-bind="grid8" v-if="needDataSource" v-show="data.controlType == 'DialogSelect' || data.controlType == 'MultiDialogSelect'">
|
|
56
|
+
<FormItem label="视图" key="DataViewSource" prop="DataViewSource">
|
|
57
|
+
<dialog-select
|
|
58
|
+
ref="dataViewSource"
|
|
59
|
+
v-model="data.source"
|
|
60
|
+
source="DataViewSelect"
|
|
61
|
+
source-data-code="code"
|
|
62
|
+
source-display-code="code"
|
|
63
|
+
:param="{ viewType: 'TableView' }"
|
|
64
|
+
@on-change="sourceChange"
|
|
65
|
+
></dialog-select>
|
|
66
|
+
</FormItem>
|
|
67
|
+
</Col>
|
|
68
|
+
<Col v-bind="grid8">
|
|
69
|
+
<FormItem label="数据字段" key="SourceDataCode" prop="SourceDataCode" v-if="data.source">
|
|
70
|
+
<Input type="text" :readonly="true" v-model="data.sourceDataCode" @on-focus="openColumnSelect(data, 'sourceDataCode')">
|
|
71
|
+
<template #prepend>
|
|
72
|
+
<Button custom-icon="fa fa-search" @click="openColumnSelect(data, 'sourceDataCode')"></Button>
|
|
73
|
+
</template>
|
|
74
|
+
</Input>
|
|
75
|
+
</FormItem>
|
|
76
|
+
</Col>
|
|
77
|
+
<Col v-bind="grid8" v-if="needDataSource">
|
|
78
|
+
<FormItem label="显示字段" key="SourceDisplayCode" prop="SourceDisplayCode" v-if="data.source">
|
|
79
|
+
<Input type="text" :readonly="true" v-model="data.sourceDisplayCode" @on-focus="openColumnSelect(data, 'sourceDisplayCode')">
|
|
80
|
+
<template #prepend>
|
|
81
|
+
<Button custom-icon="fa fa-search" @click="openColumnSelect(data, 'sourceDisplayCode')"></Button>
|
|
82
|
+
</template>
|
|
83
|
+
</Input>
|
|
84
|
+
</FormItem>
|
|
85
|
+
</Col>
|
|
86
|
+
<Col v-bind="grid16" v-if="needDataSource">
|
|
87
|
+
<FormItem label="参数" key="Param" prop="Param" v-if="data.source">
|
|
88
|
+
<Input type="text" @click="paramOpen" :readonly="true" v-model="data.param" maxlength="200" />
|
|
89
|
+
</FormItem>
|
|
90
|
+
</Col>
|
|
91
|
+
<Col v-bind="grid8">
|
|
92
|
+
<FormItem label="是否必填" key="isRequired" prop="isRequired">
|
|
93
|
+
<Switch
|
|
94
|
+
:model-value="!!data.isRequired"
|
|
95
|
+
@update:model-value="
|
|
96
|
+
$event => {
|
|
97
|
+
data.isRequired = $event;
|
|
98
|
+
}
|
|
99
|
+
"
|
|
100
|
+
/>
|
|
101
|
+
</FormItem>
|
|
102
|
+
</Col>
|
|
103
|
+
</Row>
|
|
104
|
+
</Form>
|
|
105
|
+
</div>
|
|
106
|
+
<template #footer>
|
|
107
|
+
<div>
|
|
108
|
+
<Button type="primary" custom-icon="fa fa-check" @click="save">确定</Button>
|
|
109
|
+
<Button type="default" custom-icon="fa fa-times" @click="close">关闭</Button>
|
|
110
|
+
</div>
|
|
111
|
+
</template>
|
|
112
|
+
</Modal>
|
|
113
|
+
<Modal v-model="paramOpened" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" width="600">
|
|
114
|
+
<template #header>
|
|
115
|
+
<div>
|
|
116
|
+
<slot name="header">
|
|
117
|
+
<span class="title">参数</span>
|
|
118
|
+
<span class="description">Param</span>
|
|
119
|
+
</slot>
|
|
120
|
+
</div>
|
|
121
|
+
</template>
|
|
122
|
+
<div class="i-table-no-border">
|
|
123
|
+
<Table :columns="parpamColumns" :data="params" stripe size="small" no-data-text="暂无数据...">
|
|
124
|
+
<template #command="{ row, index }">
|
|
125
|
+
<Button size="small" title="编辑" type="primary" ghost custom-icon="fa fa-edit" @click="paramEdit(row, index)"></Button>
|
|
126
|
+
<Button size="small" title="上移" type="primary" ghost custom-icon="fa fa-chevron-up" @click="upParam(row, index)"></Button>
|
|
127
|
+
<Button size="small" title="下移" type="primary" ghost custom-icon="fa fa-chevron-down" @click="downParam(row, index)"></Button>
|
|
128
|
+
<Button size="small" title="移除" type="primary" ghost custom-icon="fa fa-times" @click="paramRemove(row, index)"></Button>
|
|
129
|
+
</template>
|
|
130
|
+
</Table>
|
|
131
|
+
</div>
|
|
132
|
+
<template #footer>
|
|
133
|
+
<div>
|
|
134
|
+
<Button type="primary" ghost custom-icon="fa fa-plus" @click="paramEdit()">新增</Button>
|
|
135
|
+
<Button type="primary" custom-icon="fa fa-check" @click="paramSave">确定</Button>
|
|
136
|
+
</div>
|
|
137
|
+
</template>
|
|
138
|
+
</Modal>
|
|
139
|
+
<Modal v-model="paramItemOpened" scrollable :mask-closable="layout.maskClosable" :draggable="layout.draggable" :sticky="true" :reset-drag-position="true" width="800">
|
|
140
|
+
<template #header>
|
|
141
|
+
<div>
|
|
142
|
+
<span class="title">参数设置</span>
|
|
143
|
+
<span class="description">Param Setting</span>
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
146
|
+
<div class="ivu-ml-8 ivu-mr-8">
|
|
147
|
+
<Form ref="paramItemForm" :rules="paramItemFormRules" :model="paramData" label-position="top" label-colon=":" class="ivu-mt" @submit.prevent>
|
|
148
|
+
<Row :gutter="24" type="flex">
|
|
149
|
+
<Col v-bind="grid8">
|
|
150
|
+
<FormItem label="字段" key="code" prop="code">
|
|
151
|
+
<Input type="text" v-model="paramData.code">
|
|
152
|
+
<template #prepend>
|
|
153
|
+
<Button custom-icon="fa fa-search" @click="openColumnSelect(paramData, 'code')"></Button>
|
|
154
|
+
</template>
|
|
155
|
+
</Input>
|
|
156
|
+
</FormItem>
|
|
157
|
+
</Col>
|
|
158
|
+
<Col v-bind="grid8">
|
|
159
|
+
<FormItem label="值" key="val" prop="val">
|
|
160
|
+
<Input type="text" v-model="paramData.val" />
|
|
161
|
+
</FormItem>
|
|
162
|
+
</Col>
|
|
163
|
+
</Row>
|
|
164
|
+
</Form>
|
|
165
|
+
</div>
|
|
166
|
+
<template #footer>
|
|
167
|
+
<div>
|
|
168
|
+
<Button type="primary" custom-icon="fa fa-check" @click="paramItemSave">确定</Button>
|
|
169
|
+
<Button type="default" custom-icon="fa fa-times" @click="paramItemClose">关闭</Button>
|
|
170
|
+
</div>
|
|
171
|
+
</template>
|
|
172
|
+
</Modal>
|
|
173
|
+
<column-check ref="columnCheck" />
|
|
174
|
+
<column-check ref="columnParamCheck" />
|
|
175
|
+
</div>
|
|
176
|
+
</template>
|
|
177
|
+
<script>
|
|
178
|
+
import columnCheck from '../../components/view/column-check';
|
|
179
|
+
import mixinPage from '../../mixins/page';
|
|
180
|
+
import modelApi from '../../api/model';
|
|
181
|
+
|
|
182
|
+
export default {
|
|
183
|
+
mixins: [mixinPage],
|
|
184
|
+
components: { columnCheck },
|
|
185
|
+
data() {
|
|
186
|
+
return {
|
|
187
|
+
data: {},
|
|
188
|
+
callback: null,
|
|
189
|
+
opened: false,
|
|
190
|
+
rules: {
|
|
191
|
+
propertyName: {
|
|
192
|
+
type: 'string',
|
|
193
|
+
required: true,
|
|
194
|
+
message: '请输入属性名称',
|
|
195
|
+
trigger: 'blur'
|
|
196
|
+
},
|
|
197
|
+
propertyCode: {
|
|
198
|
+
type: 'string',
|
|
199
|
+
required: true,
|
|
200
|
+
message: '请输入属性代码',
|
|
201
|
+
trigger: 'blur'
|
|
202
|
+
},
|
|
203
|
+
dataType: {
|
|
204
|
+
type: 'string',
|
|
205
|
+
required: true,
|
|
206
|
+
message: '请输入数据类型',
|
|
207
|
+
trigger: 'blur'
|
|
208
|
+
},
|
|
209
|
+
controlType: {
|
|
210
|
+
type: 'string',
|
|
211
|
+
required: true,
|
|
212
|
+
message: '请输入控件类型',
|
|
213
|
+
trigger: 'blur'
|
|
214
|
+
},
|
|
215
|
+
source: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
required: true,
|
|
218
|
+
message: '请输入数据源',
|
|
219
|
+
trigger: 'blur'
|
|
220
|
+
},
|
|
221
|
+
sourceDataCode: {
|
|
222
|
+
type: 'string',
|
|
223
|
+
required: true,
|
|
224
|
+
message: '请输入数据字段',
|
|
225
|
+
trigger: 'blur'
|
|
226
|
+
},
|
|
227
|
+
sourceDisplayCode: {
|
|
228
|
+
type: 'string',
|
|
229
|
+
required: true,
|
|
230
|
+
message: '请输入显示字段',
|
|
231
|
+
trigger: 'blur'
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
parpamColumns: [
|
|
235
|
+
{ title: '参数', resizable: true, align: 'center', key: 'code' },
|
|
236
|
+
{ title: '值', align: 'center', resizable: true, key: 'val' },
|
|
237
|
+
{ slot: 'command', title: ' ', align: 'center', resizable: true, fixed: 'right' }
|
|
238
|
+
],
|
|
239
|
+
params: [],
|
|
240
|
+
paramData: {},
|
|
241
|
+
paramItemFormRules: {
|
|
242
|
+
code: {
|
|
243
|
+
type: 'string',
|
|
244
|
+
required: true,
|
|
245
|
+
message: '请输入字段名称',
|
|
246
|
+
trigger: 'blur,change'
|
|
247
|
+
},
|
|
248
|
+
keyType: {
|
|
249
|
+
type: 'string',
|
|
250
|
+
required: true,
|
|
251
|
+
message: '请选择字段类型',
|
|
252
|
+
trigger: 'blur,change'
|
|
253
|
+
},
|
|
254
|
+
val: {
|
|
255
|
+
type: 'string',
|
|
256
|
+
required: true,
|
|
257
|
+
message: '请输入值',
|
|
258
|
+
trigger: 'blur,change'
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
paramOpened: false,
|
|
262
|
+
paramItemOpened: false,
|
|
263
|
+
sourceBefore: null
|
|
264
|
+
};
|
|
265
|
+
},
|
|
266
|
+
async created() {},
|
|
267
|
+
props: {},
|
|
268
|
+
computed: {
|
|
269
|
+
// 选择框,或复选框组,且非枚举类型,需要输入数据源
|
|
270
|
+
needDataSource() {
|
|
271
|
+
if (this.data) {
|
|
272
|
+
return (
|
|
273
|
+
(this.data.controlType === 'Select' ||
|
|
274
|
+
this.data.controlType === 'MultiSelect' ||
|
|
275
|
+
this.data.controlType === 'DialogSelect' ||
|
|
276
|
+
this.data.controlType === 'MultiDialogSelect') &&
|
|
277
|
+
(this.data.dataType == null || this.data.dataType.indexOf('Enum:') !== 0)
|
|
278
|
+
);
|
|
279
|
+
} else {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
methods: {
|
|
285
|
+
// 打开
|
|
286
|
+
open(row, callback) {
|
|
287
|
+
if (row) {
|
|
288
|
+
this.data = this.copy(row);
|
|
289
|
+
} else {
|
|
290
|
+
this.data = {};
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
this.callback = callback;
|
|
294
|
+
this.opened = true;
|
|
295
|
+
this.$refs.form.resetFields();
|
|
296
|
+
},
|
|
297
|
+
// 关闭
|
|
298
|
+
close() {
|
|
299
|
+
this.opened = false;
|
|
300
|
+
},
|
|
301
|
+
// 确认
|
|
302
|
+
async save() {
|
|
303
|
+
let isOK = await this.$refs.form.validate();
|
|
304
|
+
|
|
305
|
+
if (!isOK) {
|
|
306
|
+
this.error('有内容不符合要求,请正确填写!');
|
|
307
|
+
} else {
|
|
308
|
+
this.confirm('确定要保存吗?', async () => {
|
|
309
|
+
if (!this.data.id) {
|
|
310
|
+
await modelApi.add('RoleProperty', this.data);
|
|
311
|
+
} else {
|
|
312
|
+
await modelApi.update('RoleProperty', this.data);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
this.success('保存成功!');
|
|
316
|
+
this.callback();
|
|
317
|
+
this.opened = false;
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
// 打开字段选择界面
|
|
322
|
+
openSelect() {
|
|
323
|
+
this.$refs.columnCheck.open(this.dataView.model, checked => {
|
|
324
|
+
this.data.code = checked.code;
|
|
325
|
+
this.data.name = checked.name;
|
|
326
|
+
this.data.dataType = checked.dataType;
|
|
327
|
+
this.data.source = checked.objColumn != null ? checked.objColumn.dataType : null;
|
|
328
|
+
this.data.sourceDataCode = checked.objColumn != null ? 'id' : null;
|
|
329
|
+
this.data.sourceDisplayCode =
|
|
330
|
+
checked.objColumn != null &&
|
|
331
|
+
checked.objColumn.columns.some(function (column) {
|
|
332
|
+
return column.code === checked.objColumn.code + '.name';
|
|
333
|
+
})
|
|
334
|
+
? 'name'
|
|
335
|
+
: null;
|
|
336
|
+
|
|
337
|
+
setTimeout(() => {
|
|
338
|
+
//this.$forceUpdate();
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
},
|
|
342
|
+
// 数据源变更
|
|
343
|
+
sourceChange() {
|
|
344
|
+
if (this.sourceBefore != this.data.source) {
|
|
345
|
+
this.data.sourceDisplayCode = null;
|
|
346
|
+
this.data.sourceDataCode = null;
|
|
347
|
+
this.data.param = null;
|
|
348
|
+
}
|
|
349
|
+
this.sourceBefore = this.data.source;
|
|
350
|
+
//this.$forceUpdate();
|
|
351
|
+
},
|
|
352
|
+
// 打开变量字段选择界面
|
|
353
|
+
openValueSelect() {
|
|
354
|
+
this.$refs.columnCheck.open(this.data.dataView.model, checked => {
|
|
355
|
+
this.paramData.val = checked.code;
|
|
356
|
+
//this.$forceUpdate();
|
|
357
|
+
});
|
|
358
|
+
},
|
|
359
|
+
// 打开参数弹框
|
|
360
|
+
paramOpen() {
|
|
361
|
+
this.params = [];
|
|
362
|
+
this.paramOpened = true;
|
|
363
|
+
if (this.data.param != null && this.data.param != '') {
|
|
364
|
+
let obj = JSON.parse(this.data.param);
|
|
365
|
+
for (let key in obj) {
|
|
366
|
+
let type = '变量';
|
|
367
|
+
if (obj[key].indexOf('[') == 0 && obj[key].indexOf(']') + 1 == obj[key].length) {
|
|
368
|
+
type = '常量';
|
|
369
|
+
}
|
|
370
|
+
this.params.push({
|
|
371
|
+
code: key,
|
|
372
|
+
val: obj[key],
|
|
373
|
+
type: type
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
// 参数框确认
|
|
379
|
+
async paramItemSave() {
|
|
380
|
+
let isOK = await this.$refs.paramItemForm.validate();
|
|
381
|
+
|
|
382
|
+
if (!isOK) {
|
|
383
|
+
this.error('有内容不符合要求,请正确填写!');
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
let val = this.paramData.val;
|
|
387
|
+
|
|
388
|
+
if (this.paramData.keyType == '常量') {
|
|
389
|
+
let len = this.paramData.val.length;
|
|
390
|
+
val = this.paramData.val.padStart(len + 1, '[').padEnd(len + 2, ']');
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (this.paramData.source) {
|
|
394
|
+
this.paramData.source.code = this.paramData.code;
|
|
395
|
+
this.paramData.source.val = val;
|
|
396
|
+
this.paramData.source.type = this.paramData.keyType;
|
|
397
|
+
} else {
|
|
398
|
+
this.params.push({
|
|
399
|
+
code: this.paramData.code,
|
|
400
|
+
val: val,
|
|
401
|
+
type: this.paramData.keyType
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
this.paramItemOpened = false;
|
|
405
|
+
this.$refs.paramItemForm.resetFields();
|
|
406
|
+
},
|
|
407
|
+
paramItemClose() {
|
|
408
|
+
this.paramItemOpened = false;
|
|
409
|
+
this.$refs.paramItemForm.resetFields();
|
|
410
|
+
},
|
|
411
|
+
keyTypeChange() {
|
|
412
|
+
setTimeout(() => {
|
|
413
|
+
this.paramData.val = null;
|
|
414
|
+
//this.$forceUpdate();
|
|
415
|
+
});
|
|
416
|
+
},
|
|
417
|
+
// 打开字段选择界面
|
|
418
|
+
openColumnSelect(data, code) {
|
|
419
|
+
if (this.data.source == null) {
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
let model;
|
|
424
|
+
if (this.data.controlType == 'DialogSelect' || this.data.controlType == 'MultiDialogSelect') {
|
|
425
|
+
model = this.$refs.dataViewSource.selectedData.model;
|
|
426
|
+
} else {
|
|
427
|
+
model = this.data.source;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
this.$refs.columnParamCheck.open(model, checked => {
|
|
431
|
+
data[code] = checked.code;
|
|
432
|
+
//this.$forceUpdate();
|
|
433
|
+
});
|
|
434
|
+
}, // 保存参数
|
|
435
|
+
paramSave() {
|
|
436
|
+
let obj = {};
|
|
437
|
+
this.params.forEach(item => {
|
|
438
|
+
obj[item.code] = item.val;
|
|
439
|
+
});
|
|
440
|
+
this.data.param = this.params.length > 0 ? JSON.stringify(obj) : '';
|
|
441
|
+
this.paramOpened = false;
|
|
442
|
+
},
|
|
443
|
+
// 编辑参数项
|
|
444
|
+
paramEdit(row) {
|
|
445
|
+
if (row) {
|
|
446
|
+
this.paramData = {
|
|
447
|
+
code: row.code,
|
|
448
|
+
val: row.val.replace('[', '').replace(']', ''),
|
|
449
|
+
keyType: row.type,
|
|
450
|
+
source: row
|
|
451
|
+
};
|
|
452
|
+
} else {
|
|
453
|
+
this.paramData = {
|
|
454
|
+
code: '',
|
|
455
|
+
val: '',
|
|
456
|
+
keyType: '常量'
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
this.paramItemOpened = true;
|
|
460
|
+
}, // 上移参数项
|
|
461
|
+
upParam(row, index) {
|
|
462
|
+
if (index > 0) {
|
|
463
|
+
this.params.splice(index, 1);
|
|
464
|
+
this.params.splice(index - 1, 0, row);
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
// 下移参数项
|
|
468
|
+
downParam(row, index) {
|
|
469
|
+
if (index < this.params.length - 1) {
|
|
470
|
+
this.params.splice(index, 1);
|
|
471
|
+
this.params.splice(index + 1, 0, row);
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
// 删除参数项
|
|
475
|
+
paramRemove(row, index) {
|
|
476
|
+
this.params.splice(index, 1);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
</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="SequenceSetting" @create="$refs.form.open()" @edit="({ row, index }) => $refs.form.open(row)"></view-table>
|
|
8
|
+
</Card>
|
|
9
|
+
<modal-form ref="form" view-code="SequenceSettingEdit" @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-sequenceSetting',
|
|
17
|
+
mixins: [mixinPage],
|
|
18
|
+
components: {},
|
|
19
|
+
data() {
|
|
20
|
+
return {};
|
|
21
|
+
},
|
|
22
|
+
computed: {},
|
|
23
|
+
created() {},
|
|
24
|
+
methods: {}
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,52 @@
|
|
|
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-form ref="form" view-code="SystemData"></view-form>
|
|
8
|
+
<div style="text-align: center">
|
|
9
|
+
<Button type="info" custom-icon="fa fa-cloud-download-alt" @click="exportFile()">导出</Button>
|
|
10
|
+
<file-upload url="api/System/importFile" accept=".syd" @on-success="importFileSuccess" style="display: inline-block; margin-left: 8px; margin-right: 8px">
|
|
11
|
+
<template #>
|
|
12
|
+
<Button type="primary" custom-icon="fa fa-cloud-upload-alt">导入</Button>
|
|
13
|
+
</template>
|
|
14
|
+
</file-upload>
|
|
15
|
+
</div>
|
|
16
|
+
</Card>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
<script>
|
|
20
|
+
import mixinPage from '../../mixins/page';
|
|
21
|
+
import systemApi from '../../api/system';
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
name: 'system-systemData',
|
|
25
|
+
mixins: [mixinPage],
|
|
26
|
+
components: {},
|
|
27
|
+
data() {
|
|
28
|
+
return {};
|
|
29
|
+
},
|
|
30
|
+
computed: {},
|
|
31
|
+
created() {},
|
|
32
|
+
methods: {
|
|
33
|
+
// 导出文件
|
|
34
|
+
exportFile() {
|
|
35
|
+
let types = this.$refs.form.data.types;
|
|
36
|
+
if (types && types.length > 0) {
|
|
37
|
+
systemApi.exportFile(JSON.parse(types));
|
|
38
|
+
} else {
|
|
39
|
+
this.error('请选择需要导出的内容!');
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
// 导入成功
|
|
43
|
+
importFileSuccess(res) {
|
|
44
|
+
if (res.code == 0) {
|
|
45
|
+
this.success('导入成功!');
|
|
46
|
+
} else {
|
|
47
|
+
this.error(res.message);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
</script>
|