vue2-client 1.2.0 → 1.2.3
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/README.md +65 -65
- package/babel.config.js +1 -0
- package/docs/notice.md +22 -0
- package/index.js +28 -28
- package/package.json +1 -1
- package/src/App.vue +93 -93
- package/src/assets/img/SunClientDownload.png +0 -0
- package/src/assets/img/SunClientManual/1.png +0 -0
- package/src/assets/img/SunClientManual/2.png +0 -0
- package/src/assets/img/SunClientManual/3.png +0 -0
- package/src/assets/img/SunClientManual/4.png +0 -0
- package/src/assets/img/ToDeskDownload.png +0 -0
- package/src/assets/img/ToDeskManual/1.png +0 -0
- package/src/assets/img/ToDeskManual/2.png +0 -0
- package/src/assets/img/ToDeskManual/3.png +0 -0
- package/src/assets/img/ToDeskManual/4.png +0 -0
- package/src/assets/sound/newNote.mp3 +0 -0
- package/src/base-client/all.js +57 -57
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +1157 -1159
- package/src/base-client/components/common/CreateQuery/index.md +42 -42
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +540 -540
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
- package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +150 -150
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
- package/src/base-client/components/common/XAddForm/XAddForm.vue +323 -323
- package/src/base-client/components/common/XAddForm/index.md +60 -60
- package/src/base-client/components/common/XBadge/index.md +39 -39
- package/src/base-client/components/common/XCard/index.md +43 -43
- package/src/base-client/components/common/XForm/XForm.vue +275 -275
- package/src/base-client/components/common/XForm/XFormItem.vue +217 -217
- package/src/base-client/components/common/XForm/index.md +196 -196
- package/src/base-client/components/common/XFormCol/index.md +35 -35
- package/src/base-client/components/common/XFormTable/XFormTable.vue +407 -405
- package/src/base-client/components/common/XFormTable/index.md +89 -89
- package/src/base-client/components/common/XTable/XTable.vue +262 -262
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +105 -105
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +226 -226
- package/src/base-client/components/iot/CustomerDetailsView/index.md +41 -41
- package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +127 -127
- package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +244 -250
- package/src/base-client/components/iot/DataAnalysisViewGD/DataAnalysisViewGD.vue +548 -548
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +453 -453
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +231 -231
- package/src/base-client/components/iot/DeviceDetailsView/index.md +43 -43
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +330 -330
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +122 -122
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +122 -122
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +225 -225
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +135 -135
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +277 -277
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +472 -472
- package/src/base-client/components/iot/InstructDetailsView/index.md +45 -45
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +380 -380
- package/src/base-client/components/iot/LogDetailsView/index.md +43 -43
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +360 -360
- package/src/base-client/components/iot/MeterDetailsView/index.md +43 -43
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +335 -335
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +185 -185
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +292 -292
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +237 -237
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +257 -257
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +190 -190
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +723 -723
- package/src/base-client/components/iot/WebmeterAnalysisView/index.md +48 -48
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/components/system/DictionaryDetailsView/index.md +41 -41
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +248 -248
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +371 -406
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +838 -486
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +261 -184
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +528 -303
- package/src/base-client/plugins/AppData.js +69 -69
- package/src/base-client/plugins/GetLoginInfoService.js +221 -221
- package/src/base-client/plugins/index.js +21 -21
- package/src/bootstrap.js +27 -27
- package/src/components/Ellipsis/Ellipsis.vue +64 -64
- package/src/components/Ellipsis/index.md +38 -38
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/STable/README.md +341 -341
- package/src/components/Trend/index.md +45 -45
- package/src/components/cache/AKeepAlive.js +172 -172
- package/src/components/checkbox/index.js +7 -7
- package/src/components/index.js +36 -36
- package/src/components/menu/menu.js +273 -273
- package/src/components/setting/Setting.vue +237 -237
- package/src/components/table/advance/AdvanceTable.vue +275 -275
- package/src/components/transition/PageToggleTransition.vue +97 -97
- package/src/layouts/CommonLayout.vue +42 -42
- package/src/layouts/PageLayout.vue +151 -151
- package/src/layouts/SinglePageView.vue +74 -74
- package/src/layouts/header/AdminHeader.vue +109 -109
- package/src/layouts/header/HeaderAvatar.vue +60 -60
- package/src/layouts/header/HeaderNotice.vue +97 -97
- package/src/layouts/tabs/TabsHead.vue +190 -190
- package/src/layouts/tabs/TabsView.vue +355 -355
- package/src/main.js +20 -20
- package/src/mock/goods/index.js +108 -108
- package/src/mock/index.js +12 -12
- package/src/mock/project/index.js +17 -17
- package/src/mock/user/current.js +13 -13
- package/src/mock/user/login.js +39 -39
- package/src/mock/workplace/index.js +15 -15
- package/src/pages/exception/403.vue +25 -25
- package/src/pages/exception/404.vue +25 -25
- package/src/pages/exception/500.vue +25 -25
- package/src/pages/login/Login.vue +194 -194
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/resourceManage/resourceManageMain.vue +55 -55
- package/src/pages/system/applyInstallView/Core.vue +570 -570
- package/src/pages/system/applyInstallView/index.vue +34 -34
- package/src/pages/system/dictionary/index.vue +41 -41
- package/src/pages/system/queryParams/index.vue +41 -41
- package/src/router/async/config.async.js +25 -25
- package/src/router/async/router.map.js +59 -59
- package/src/router/guards.js +104 -104
- package/src/router/index.js +27 -27
- package/src/services/api/EmployeeDetailsViewApi.js +3 -1
- package/src/services/api/TicketDetailsViewApi.js +9 -1
- package/src/services/api/common.js +37 -39
- package/src/services/api/restTools.js +23 -23
- package/src/services/dataSource.js +12 -12
- package/src/services/user.js +34 -34
- package/src/store/modules/setting.js +114 -114
- package/src/utils/i18n.js +80 -80
- package/src/utils/indexedDB.js +146 -146
- package/src/utils/request.js +197 -197
- package/src/utils/routerUtil.js +15 -2
- package/tests/unit/ReportTable.spec.js +15 -15
- package/vue.config.js +153 -153
- package/webpack.config.js +12 -12
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
# CreateSimpleFormQuery 基础表单配置生成(仅新增场景)
|
|
2
|
-
|
|
3
|
-
提供基础表单配置生成(仅新增场景)的快捷组件
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## 何时使用
|
|
8
|
-
|
|
9
|
-
允许生成基础表单的配置
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
引用方式:
|
|
14
|
-
|
|
15
|
-
```javascript
|
|
16
|
-
import CreateSimpleFormQuery from '@vue2-client/base-client/components/CreateSimpleFormQuery'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
components: {
|
|
20
|
-
CreateSimpleFormQuery
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## 代码演示
|
|
28
|
-
|
|
29
|
-
```html
|
|
30
|
-
<create-simple-form-query
|
|
31
|
-
:toEditJson="toEditJson"
|
|
32
|
-
:visible.sync="createSimpleFormVisible"
|
|
33
|
-
/>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## API
|
|
37
|
-
|
|
38
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
39
|
-
|----------------------------|------------------------------------------|---------|-----------|
|
|
40
|
-
| visible | 是否显示 | Boolean | false |
|
|
41
|
-
| toEditJson | 要编辑的json 当 visible 从false变成true时解析加载到页面上 | Object | undefined |
|
|
42
|
-
| @saveSimpleFormQueryParams | 基础表单配置点击保存后事件 | event | - |
|
|
1
|
+
# CreateSimpleFormQuery 基础表单配置生成(仅新增场景)
|
|
2
|
+
|
|
3
|
+
提供基础表单配置生成(仅新增场景)的快捷组件
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## 何时使用
|
|
8
|
+
|
|
9
|
+
允许生成基础表单的配置
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
引用方式:
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
import CreateSimpleFormQuery from '@vue2-client/base-client/components/CreateSimpleFormQuery'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
components: {
|
|
20
|
+
CreateSimpleFormQuery
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## 代码演示
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<create-simple-form-query
|
|
31
|
+
:toEditJson="toEditJson"
|
|
32
|
+
:visible.sync="createSimpleFormVisible"
|
|
33
|
+
/>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## API
|
|
37
|
+
|
|
38
|
+
| 参数 | 说明 | 类型 | 默认值 |
|
|
39
|
+
|----------------------------|------------------------------------------|---------|-----------|
|
|
40
|
+
| visible | 是否显示 | Boolean | false |
|
|
41
|
+
| toEditJson | 要编辑的json 当 visible 从false变成true时解析加载到页面上 | Object | undefined |
|
|
42
|
+
| @saveSimpleFormQueryParams | 基础表单配置点击保存后事件 | event | - |
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
# CustomColumnsDrawer 自定义表格列
|
|
2
|
-
|
|
3
|
-
提供一个可以自定义选择需要展示的表格列抽屉实现
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## 何时使用
|
|
8
|
-
|
|
9
|
-
允许用户自定义选择需要展示的表格列,常用于列较多的表格查询展示。
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
引用方式:
|
|
14
|
-
|
|
15
|
-
```javascript
|
|
16
|
-
import CustomColumnsDrawer from '@vue2-client/vue2-client/components/CustomColumnsDrawer'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
components: {
|
|
20
|
-
CustomColumnsDrawer
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## 代码演示
|
|
28
|
-
|
|
29
|
-
```html
|
|
30
|
-
<custom-columns-drawer
|
|
31
|
-
:visible.sync="visible"
|
|
32
|
-
:columns.sync="tableShowColumns"
|
|
33
|
-
:columns-meta="columnsMeta"
|
|
34
|
-
/>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## API
|
|
38
|
-
|
|
39
|
-
参数 | 说明 | 类型 | 默认值
|
|
40
|
-
----|------|-----|------
|
|
41
|
-
placement | 抽屉的方向,详情参考Ant Design Vue的官方文档 | String, Object | right
|
|
42
|
-
width | 抽屉的宽度,详情参考Ant Design Vue的官方文档 | String, Object | 190
|
|
43
|
-
columnsMeta | 表格列配置的原始json数据 | Array | null
|
|
44
|
-
visible | 是否显示 | Boolean | false
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
# CustomColumnsDrawer 自定义表格列
|
|
2
|
+
|
|
3
|
+
提供一个可以自定义选择需要展示的表格列抽屉实现
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## 何时使用
|
|
8
|
+
|
|
9
|
+
允许用户自定义选择需要展示的表格列,常用于列较多的表格查询展示。
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
引用方式:
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
import CustomColumnsDrawer from '@vue2-client/vue2-client/components/CustomColumnsDrawer'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
components: {
|
|
20
|
+
CustomColumnsDrawer
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## 代码演示
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<custom-columns-drawer
|
|
31
|
+
:visible.sync="visible"
|
|
32
|
+
:columns.sync="tableShowColumns"
|
|
33
|
+
:columns-meta="columnsMeta"
|
|
34
|
+
/>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## API
|
|
38
|
+
|
|
39
|
+
参数 | 说明 | 类型 | 默认值
|
|
40
|
+
----|------|-----|------
|
|
41
|
+
placement | 抽屉的方向,详情参考Ant Design Vue的官方文档 | String, Object | right
|
|
42
|
+
width | 抽屉的宽度,详情参考Ant Design Vue的官方文档 | String, Object | 190
|
|
43
|
+
columnsMeta | 表格列配置的原始json数据 | Array | null
|
|
44
|
+
visible | 是否显示 | Boolean | false
|
|
45
|
+
|
|
46
|
+
|
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-drawer
|
|
3
|
-
title="选择参数组"
|
|
4
|
-
placement="right"
|
|
5
|
-
:width="isMobile ? screenWidth : screenWidth * 0.85"
|
|
6
|
-
:visible="visible"
|
|
7
|
-
@close="onClose"
|
|
8
|
-
>
|
|
9
|
-
<x-add-form
|
|
10
|
-
business-title="参数设置"
|
|
11
|
-
business-type="编辑"
|
|
12
|
-
:visible.sync="editQueryVisible"
|
|
13
|
-
:json-data="formObj.formJson"
|
|
14
|
-
:modify-model-data="this.modifyModelData[this.formObj.groupName]"
|
|
15
|
-
:loading="loading"
|
|
16
|
-
@onSubmit="submit"/>
|
|
17
|
-
<a-list
|
|
18
|
-
:grid="{gutter: 24, lg: 4, md: 3, sm: 1, xs: 1}"
|
|
19
|
-
:dataSource="columnJson.groups"
|
|
20
|
-
>
|
|
21
|
-
<a-list-item slot="renderItem" slot-scope="item">
|
|
22
|
-
<a-card :hoverable="true" @click="toEdit(item)">
|
|
23
|
-
<a-card-meta >
|
|
24
|
-
<div style="margin-bottom: 3px" slot="title">{{ item.group }}</div>
|
|
25
|
-
<a-icon type="tags" slot="avatar" :style="{ fontSize:'2em' }"/>
|
|
26
|
-
<div class="meta-content" slot="description">{{ item.describe }}</div>
|
|
27
|
-
</a-card-meta>
|
|
28
|
-
</a-card>
|
|
29
|
-
</a-list-item>
|
|
30
|
-
</a-list>
|
|
31
|
-
</a-drawer>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
import { mapState } from 'vuex'
|
|
36
|
-
import XAddForm from '@vue2-client/base-client/components/common/XAddForm/XAddForm'
|
|
37
|
-
import { commonApi } from '@vue2-client/services/api/common'
|
|
38
|
-
import { post } from '@vue2-client/services/api/restTools'
|
|
39
|
-
|
|
40
|
-
export default {
|
|
41
|
-
name: 'FormGroupEdit',
|
|
42
|
-
components: {
|
|
43
|
-
XAddForm
|
|
44
|
-
},
|
|
45
|
-
data () {
|
|
46
|
-
return {
|
|
47
|
-
// 页面宽度
|
|
48
|
-
screenWidth: document.documentElement.clientWidth,
|
|
49
|
-
// 是否显示参数下发抽屉
|
|
50
|
-
editQueryVisible: false,
|
|
51
|
-
targetIndex: 0,
|
|
52
|
-
columnJson: {},
|
|
53
|
-
editIndex: -1,
|
|
54
|
-
formObj: {
|
|
55
|
-
groupName: '',
|
|
56
|
-
formJson: []
|
|
57
|
-
},
|
|
58
|
-
// 参数设置业务执行状态
|
|
59
|
-
loading: false
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
mounted () {
|
|
63
|
-
this.initView()
|
|
64
|
-
},
|
|
65
|
-
computed: {
|
|
66
|
-
...mapState('setting', ['isMobile'])
|
|
67
|
-
},
|
|
68
|
-
props: {
|
|
69
|
-
visible: {
|
|
70
|
-
type: Boolean,
|
|
71
|
-
default: false
|
|
72
|
-
},
|
|
73
|
-
modifyModelData: {
|
|
74
|
-
type: Object,
|
|
75
|
-
default: () => {
|
|
76
|
-
return {}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
watch: {
|
|
81
|
-
visible (rel) {
|
|
82
|
-
if (rel) {
|
|
83
|
-
this.initView()
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
methods: {
|
|
88
|
-
// 初始化组件
|
|
89
|
-
initView () {
|
|
90
|
-
this.$emit('getColumnJson', val => {
|
|
91
|
-
this.columnJson = val
|
|
92
|
-
})
|
|
93
|
-
},
|
|
94
|
-
toEdit (item) {
|
|
95
|
-
post(commonApi.getColumnsJson, { queryObject: item }).then(res => {
|
|
96
|
-
this.formObj = res
|
|
97
|
-
this.editQueryVisible = true
|
|
98
|
-
})
|
|
99
|
-
},
|
|
100
|
-
onClose () {
|
|
101
|
-
this.$emit('update:visible', false)
|
|
102
|
-
},
|
|
103
|
-
submit (res) {
|
|
104
|
-
if (res.valid) {
|
|
105
|
-
this.loading = true
|
|
106
|
-
const requestParameters = {
|
|
107
|
-
paramsJson: {}
|
|
108
|
-
}
|
|
109
|
-
requestParameters.paramsJson[this.formObj.groupName] = {}
|
|
110
|
-
for (const key of Object.keys(res.form)) {
|
|
111
|
-
const realKey = key.substring(key.indexOf('_') + 1)
|
|
112
|
-
requestParameters.paramsJson[this.formObj.groupName][realKey] = res.form[key]
|
|
113
|
-
}
|
|
114
|
-
this.$emit('onSubmit', requestParameters, result => {
|
|
115
|
-
if (result) {
|
|
116
|
-
this.$message.success('参数设置成功!')
|
|
117
|
-
} else {
|
|
118
|
-
this.$message.error('参数设置失败!')
|
|
119
|
-
}
|
|
120
|
-
this.loading = false
|
|
121
|
-
this.editQueryVisible = false
|
|
122
|
-
})
|
|
123
|
-
} else {
|
|
124
|
-
return false
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
</script>
|
|
130
|
-
<style lang="less" scoped>
|
|
131
|
-
.card-avatar {
|
|
132
|
-
width: 48px;
|
|
133
|
-
height: 48px;
|
|
134
|
-
border-radius: 48px;
|
|
135
|
-
}
|
|
136
|
-
.new-btn{
|
|
137
|
-
border-radius: 2px;
|
|
138
|
-
width: 100%;
|
|
139
|
-
height: 187px;
|
|
140
|
-
}
|
|
141
|
-
.meta-content{
|
|
142
|
-
position: relative;
|
|
143
|
-
overflow: hidden;
|
|
144
|
-
text-overflow: ellipsis;
|
|
145
|
-
display: -webkit-box;
|
|
146
|
-
height: 64px;
|
|
147
|
-
-webkit-line-clamp: 3;
|
|
148
|
-
-webkit-box-orient: vertical;
|
|
149
|
-
}
|
|
150
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-drawer
|
|
3
|
+
title="选择参数组"
|
|
4
|
+
placement="right"
|
|
5
|
+
:width="isMobile ? screenWidth : screenWidth * 0.85"
|
|
6
|
+
:visible="visible"
|
|
7
|
+
@close="onClose"
|
|
8
|
+
>
|
|
9
|
+
<x-add-form
|
|
10
|
+
business-title="参数设置"
|
|
11
|
+
business-type="编辑"
|
|
12
|
+
:visible.sync="editQueryVisible"
|
|
13
|
+
:json-data="formObj.formJson"
|
|
14
|
+
:modify-model-data="this.modifyModelData[this.formObj.groupName]"
|
|
15
|
+
:loading="loading"
|
|
16
|
+
@onSubmit="submit"/>
|
|
17
|
+
<a-list
|
|
18
|
+
:grid="{gutter: 24, lg: 4, md: 3, sm: 1, xs: 1}"
|
|
19
|
+
:dataSource="columnJson.groups"
|
|
20
|
+
>
|
|
21
|
+
<a-list-item slot="renderItem" slot-scope="item">
|
|
22
|
+
<a-card :hoverable="true" @click="toEdit(item)">
|
|
23
|
+
<a-card-meta >
|
|
24
|
+
<div style="margin-bottom: 3px" slot="title">{{ item.group }}</div>
|
|
25
|
+
<a-icon type="tags" slot="avatar" :style="{ fontSize:'2em' }"/>
|
|
26
|
+
<div class="meta-content" slot="description">{{ item.describe }}</div>
|
|
27
|
+
</a-card-meta>
|
|
28
|
+
</a-card>
|
|
29
|
+
</a-list-item>
|
|
30
|
+
</a-list>
|
|
31
|
+
</a-drawer>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import { mapState } from 'vuex'
|
|
36
|
+
import XAddForm from '@vue2-client/base-client/components/common/XAddForm/XAddForm'
|
|
37
|
+
import { commonApi } from '@vue2-client/services/api/common'
|
|
38
|
+
import { post } from '@vue2-client/services/api/restTools'
|
|
39
|
+
|
|
40
|
+
export default {
|
|
41
|
+
name: 'FormGroupEdit',
|
|
42
|
+
components: {
|
|
43
|
+
XAddForm
|
|
44
|
+
},
|
|
45
|
+
data () {
|
|
46
|
+
return {
|
|
47
|
+
// 页面宽度
|
|
48
|
+
screenWidth: document.documentElement.clientWidth,
|
|
49
|
+
// 是否显示参数下发抽屉
|
|
50
|
+
editQueryVisible: false,
|
|
51
|
+
targetIndex: 0,
|
|
52
|
+
columnJson: {},
|
|
53
|
+
editIndex: -1,
|
|
54
|
+
formObj: {
|
|
55
|
+
groupName: '',
|
|
56
|
+
formJson: []
|
|
57
|
+
},
|
|
58
|
+
// 参数设置业务执行状态
|
|
59
|
+
loading: false
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
mounted () {
|
|
63
|
+
this.initView()
|
|
64
|
+
},
|
|
65
|
+
computed: {
|
|
66
|
+
...mapState('setting', ['isMobile'])
|
|
67
|
+
},
|
|
68
|
+
props: {
|
|
69
|
+
visible: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false
|
|
72
|
+
},
|
|
73
|
+
modifyModelData: {
|
|
74
|
+
type: Object,
|
|
75
|
+
default: () => {
|
|
76
|
+
return {}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
watch: {
|
|
81
|
+
visible (rel) {
|
|
82
|
+
if (rel) {
|
|
83
|
+
this.initView()
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
// 初始化组件
|
|
89
|
+
initView () {
|
|
90
|
+
this.$emit('getColumnJson', val => {
|
|
91
|
+
this.columnJson = val
|
|
92
|
+
})
|
|
93
|
+
},
|
|
94
|
+
toEdit (item) {
|
|
95
|
+
post(commonApi.getColumnsJson, { queryObject: item }).then(res => {
|
|
96
|
+
this.formObj = res
|
|
97
|
+
this.editQueryVisible = true
|
|
98
|
+
})
|
|
99
|
+
},
|
|
100
|
+
onClose () {
|
|
101
|
+
this.$emit('update:visible', false)
|
|
102
|
+
},
|
|
103
|
+
submit (res) {
|
|
104
|
+
if (res.valid) {
|
|
105
|
+
this.loading = true
|
|
106
|
+
const requestParameters = {
|
|
107
|
+
paramsJson: {}
|
|
108
|
+
}
|
|
109
|
+
requestParameters.paramsJson[this.formObj.groupName] = {}
|
|
110
|
+
for (const key of Object.keys(res.form)) {
|
|
111
|
+
const realKey = key.substring(key.indexOf('_') + 1)
|
|
112
|
+
requestParameters.paramsJson[this.formObj.groupName][realKey] = res.form[key]
|
|
113
|
+
}
|
|
114
|
+
this.$emit('onSubmit', requestParameters, result => {
|
|
115
|
+
if (result) {
|
|
116
|
+
this.$message.success('参数设置成功!')
|
|
117
|
+
} else {
|
|
118
|
+
this.$message.error('参数设置失败!')
|
|
119
|
+
}
|
|
120
|
+
this.loading = false
|
|
121
|
+
this.editQueryVisible = false
|
|
122
|
+
})
|
|
123
|
+
} else {
|
|
124
|
+
return false
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
</script>
|
|
130
|
+
<style lang="less" scoped>
|
|
131
|
+
.card-avatar {
|
|
132
|
+
width: 48px;
|
|
133
|
+
height: 48px;
|
|
134
|
+
border-radius: 48px;
|
|
135
|
+
}
|
|
136
|
+
.new-btn{
|
|
137
|
+
border-radius: 2px;
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 187px;
|
|
140
|
+
}
|
|
141
|
+
.meta-content{
|
|
142
|
+
position: relative;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
text-overflow: ellipsis;
|
|
145
|
+
display: -webkit-box;
|
|
146
|
+
height: 64px;
|
|
147
|
+
-webkit-line-clamp: 3;
|
|
148
|
+
-webkit-box-orient: vertical;
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
# FormGroupEdit 表单参数组配置编辑
|
|
2
|
-
|
|
3
|
-
提供表单参数组配置编辑的快捷组件
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## 何时使用
|
|
8
|
-
|
|
9
|
-
允许通过表单参数组编辑参数
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
引用方式:
|
|
14
|
-
|
|
15
|
-
```javascript
|
|
16
|
-
import FormGroupEdit from '@vue2-client/base-client/components/FormGroupEdit'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
components: {
|
|
20
|
-
FormGroupEdit
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## 代码演示
|
|
28
|
-
|
|
29
|
-
```html
|
|
30
|
-
<form-group-edit
|
|
31
|
-
@getColumnJson="getColumnJson"
|
|
32
|
-
:visible.sync="createQueryVisible"
|
|
33
|
-
@saveQueryParams="saveQueryParams"
|
|
34
|
-
/>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## API
|
|
38
|
-
|
|
39
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
40
|
-
|------------------|------------|---------|-------|
|
|
41
|
-
| visible | 是否显示 | Boolean | false |
|
|
42
|
-
| @getColumnJson | 获取表单配置方法 | event | - |
|
|
43
|
-
| @saveQueryParams | 存储查询配置信息事件 | event | - |
|
|
1
|
+
# FormGroupEdit 表单参数组配置编辑
|
|
2
|
+
|
|
3
|
+
提供表单参数组配置编辑的快捷组件
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## 何时使用
|
|
8
|
+
|
|
9
|
+
允许通过表单参数组编辑参数
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
引用方式:
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
import FormGroupEdit from '@vue2-client/base-client/components/FormGroupEdit'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
components: {
|
|
20
|
+
FormGroupEdit
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## 代码演示
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<form-group-edit
|
|
31
|
+
@getColumnJson="getColumnJson"
|
|
32
|
+
:visible.sync="createQueryVisible"
|
|
33
|
+
@saveQueryParams="saveQueryParams"
|
|
34
|
+
/>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## API
|
|
38
|
+
|
|
39
|
+
| 参数 | 说明 | 类型 | 默认值 |
|
|
40
|
+
|------------------|------------|---------|-------|
|
|
41
|
+
| visible | 是否显示 | Boolean | false |
|
|
42
|
+
| @getColumnJson | 获取表单配置方法 | event | - |
|
|
43
|
+
| @saveQueryParams | 存储查询配置信息事件 | event | - |
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
# FormGroupQuery 表单参数组配置生成
|
|
2
|
-
|
|
3
|
-
提供表单参数组配置生成的快捷组件
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## 何时使用
|
|
8
|
-
|
|
9
|
-
允许生成表单参数组
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
引用方式:
|
|
14
|
-
|
|
15
|
-
```javascript
|
|
16
|
-
import FormGroupQuery from '@vue2-client/base-client/components/FormGroupQuery'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
components: {
|
|
20
|
-
FormGroupQuery
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## 代码演示
|
|
28
|
-
|
|
29
|
-
```html
|
|
30
|
-
<form-group-query
|
|
31
|
-
@getColumnJson="getColumnJson"
|
|
32
|
-
:visible.sync="createQueryVisible"
|
|
33
|
-
@saveQueryParams="saveQueryParams"
|
|
34
|
-
/>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## API
|
|
38
|
-
|
|
39
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
40
|
-
|------------------|------------|---------|-------|
|
|
41
|
-
| visible | 是否显示 | Boolean | false |
|
|
42
|
-
| @getColumnJson | 获取表单配置方法 | event | - |
|
|
43
|
-
| @saveQueryParams | 存储查询配置信息事件 | event | - |
|
|
1
|
+
# FormGroupQuery 表单参数组配置生成
|
|
2
|
+
|
|
3
|
+
提供表单参数组配置生成的快捷组件
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## 何时使用
|
|
8
|
+
|
|
9
|
+
允许生成表单参数组
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
引用方式:
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
import FormGroupQuery from '@vue2-client/base-client/components/FormGroupQuery'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
components: {
|
|
20
|
+
FormGroupQuery
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## 代码演示
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<form-group-query
|
|
31
|
+
@getColumnJson="getColumnJson"
|
|
32
|
+
:visible.sync="createQueryVisible"
|
|
33
|
+
@saveQueryParams="saveQueryParams"
|
|
34
|
+
/>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## API
|
|
38
|
+
|
|
39
|
+
| 参数 | 说明 | 类型 | 默认值 |
|
|
40
|
+
|------------------|------------|---------|-------|
|
|
41
|
+
| visible | 是否显示 | Boolean | false |
|
|
42
|
+
| @getColumnJson | 获取表单配置方法 | event | - |
|
|
43
|
+
| @saveQueryParams | 存储查询配置信息事件 | event | - |
|