vue2-client 1.2.38 → 1.2.40
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/CHANGELOG.md +8 -0
- package/docs/notice.md +22 -22
- package/package.json +90 -90
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +315 -315
- package/src/base-client/components/common/XForm/XForm.vue +275 -275
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +225 -225
- package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +244 -244
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +452 -452
- 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/DeviceDetailsInstructOperate.vue +121 -121
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +276 -276
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +469 -469
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +379 -379
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +359 -359
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +335 -335
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +184 -184
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +291 -291
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +236 -236
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +256 -256
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +189 -189
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +722 -722
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +231 -231
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +247 -247
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +370 -370
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +3 -3
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +67 -67
- package/src/base-client/plugins/GetLoginInfoService.js +252 -252
- package/src/components/exception/ExceptionPage.vue +70 -70
- package/src/components/setting/Setting.vue +235 -237
- package/src/config/default/setting.config.js +5 -4
- package/src/config/index.js +3 -6
- package/src/layouts/SinglePageView.vue +13 -17
- package/src/layouts/header/HeaderNotice.vue +97 -97
- package/src/layouts/tabs/TabsView.vue +3 -5
- package/src/pages/login/Login.vue +4 -1
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/resourceManage/depListManage.vue +23 -23
- package/src/pages/resourceManage/funListManage.vue +23 -23
- package/src/pages/resourceManage/index.js +15 -15
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/resourceManage/roleListManage.vue +23 -23
- package/src/pages/resourceManage/staffListManage.vue +23 -23
- package/src/pages/system/ticket/submitTicketSuccess.vue +248 -248
- package/src/router/async/config.async.js +26 -26
- package/src/router/async/router.map.js +58 -59
- package/src/router/index.js +27 -27
- package/src/services/api/common.js +47 -47
- package/src/services/api/index.js +39 -39
- package/src/services/user.js +34 -34
- package/src/utils/indexedDB.js +146 -146
- package/src/utils/routerUtil.js +359 -360
- package/vue.config.js +2 -2
- package/src/config/config.js +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
> 所有关于本项目的变化都在该文档里。
|
|
3
3
|
|
|
4
|
+
**##1.2.40 -2022-04-24 @苗艳强**
|
|
5
|
+
- 问题修复:
|
|
6
|
+
- 修复 singlepage 页面不能缓存的问题
|
|
7
|
+
|
|
8
|
+
**##1.2.39 -2022-04-22 @朱子峰**
|
|
9
|
+
- 问题修复:
|
|
10
|
+
- [工单提交] 修复数据库时区问题,正确显示时间
|
|
11
|
+
|
|
4
12
|
**##1.2.38 -2022-04-22 @朱子峰**
|
|
5
13
|
- 功能修改:
|
|
6
14
|
- [工单提交] 要求联系方式必须明确填写,不再从vuex中获取
|
package/docs/notice.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# 开发规范(持续跟新)
|
|
2
|
-
## 引入各种文件时,必须写绝对路径, 不允许写相对路径
|
|
3
|
-
```js
|
|
4
|
-
// 引自己项目时文件时, @ 表示自己项目的src目录
|
|
5
|
-
import('@vue2-client/pages/system/queryParams')
|
|
6
|
-
```
|
|
7
|
-
## 编写vue文件的样式时, 必须使用less, 样式必须在最外层添加当前页面html的id, id与vue文件名相同
|
|
8
|
-
```vue
|
|
9
|
-
helloWorld.vue
|
|
10
|
-
<template>
|
|
11
|
-
<div id="helloWorld">
|
|
12
|
-
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<style lang="less">
|
|
17
|
-
#helloWorld{
|
|
18
|
-
/*写自己的样式*/
|
|
19
|
-
}
|
|
20
|
-
</style>
|
|
21
|
-
```
|
|
22
|
-
|
|
1
|
+
# 开发规范(持续跟新)
|
|
2
|
+
## 引入各种文件时,必须写绝对路径, 不允许写相对路径
|
|
3
|
+
```js
|
|
4
|
+
// 引自己项目时文件时, @ 表示自己项目的src目录
|
|
5
|
+
import('@vue2-client/pages/system/queryParams')
|
|
6
|
+
```
|
|
7
|
+
## 编写vue文件的样式时, 必须使用less, 样式必须在最外层添加当前页面html的id, id与vue文件名相同
|
|
8
|
+
```vue
|
|
9
|
+
helloWorld.vue
|
|
10
|
+
<template>
|
|
11
|
+
<div id="helloWorld">
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<style lang="less">
|
|
17
|
+
#helloWorld{
|
|
18
|
+
/*写自己的样式*/
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
```
|
|
22
|
+
|
package/package.json
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vue2-client",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"private": false,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"serve": "vue-cli-service serve",
|
|
7
|
-
"build": "vue-cli-service build",
|
|
8
|
-
"test:unit": "vue-cli-service test:unit",
|
|
9
|
-
"lint": "vue-cli-service lint"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@antv/data-set": "^0.11.4",
|
|
13
|
-
"@antv/f2": "^3.6.4",
|
|
14
|
-
"@antv/g2plot": "^2.3.33",
|
|
15
|
-
"@logicflow/core": "^1.1.7",
|
|
16
|
-
"@logicflow/extension": "^1.1.7",
|
|
17
|
-
"@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
|
|
18
|
-
"@vue/babel-preset-jsx": "^1.2.4",
|
|
19
|
-
"animate.css": "^4.1.0",
|
|
20
|
-
"ant-design-vue": "1.7.8",
|
|
21
|
-
"axios": "^0.19.2",
|
|
22
|
-
"clipboard": "^2.0.6",
|
|
23
|
-
"core-js": "^3.6.5",
|
|
24
|
-
"date-fns": "^2.14.0",
|
|
25
|
-
"default-passive-events": "^2.0.0",
|
|
26
|
-
"enquire.js": "^2.1.6",
|
|
27
|
-
"file-saver": "^2.0.5",
|
|
28
|
-
"highlight.js": "^10.2.1",
|
|
29
|
-
"js-cookie": "^2.2.1",
|
|
30
|
-
"jsencrypt": "^3.0.0-rc.1",
|
|
31
|
-
"lodash.get": "^4.4.2",
|
|
32
|
-
"mockjs": "^1.1.0",
|
|
33
|
-
"nprogress": "^0.2.0",
|
|
34
|
-
"viser-vue": "^2.4.8",
|
|
35
|
-
"vue": "^2.6.11",
|
|
36
|
-
"vue-i18n": "^8.18.2",
|
|
37
|
-
"vue-json-viewer": "^2.2.15",
|
|
38
|
-
"vue-infinite-scroll": "^2.0.2",
|
|
39
|
-
"vue-router": "^3.3.4",
|
|
40
|
-
"vuedraggable": "^2.23.2",
|
|
41
|
-
"vuex": "^3.4.0",
|
|
42
|
-
"xlsx": "0.17.5"
|
|
43
|
-
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@ant-design/colors": "^4.0.1",
|
|
46
|
-
"@vue/cli-plugin-babel": "^4.4.0",
|
|
47
|
-
"@vue/cli-plugin-eslint": "^4.4.0",
|
|
48
|
-
"@vue/cli-plugin-router": "^4.4.0",
|
|
49
|
-
"@vue/cli-plugin-unit-jest": "~5.0.0",
|
|
50
|
-
"@vue/cli-plugin-vuex": "^4.4.0",
|
|
51
|
-
"@vue/cli-service": "^4.4.0",
|
|
52
|
-
"@vue/eslint-config-standard": "^4.0.0",
|
|
53
|
-
"@vue/test-utils": "^1.1.3",
|
|
54
|
-
"@vue/vue2-jest": "^27.0.0-alpha.2",
|
|
55
|
-
"@vuepress/plugin-back-to-top": "^1.5.2",
|
|
56
|
-
"babel-eslint": "^10.1.0",
|
|
57
|
-
"babel-jest": "^27.0.6",
|
|
58
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
59
|
-
"babel-polyfill": "^6.26.0",
|
|
60
|
-
"compression-webpack-plugin": "^2.0.0",
|
|
61
|
-
"deepmerge": "^4.2.2",
|
|
62
|
-
"echarts": "^4.9.0",
|
|
63
|
-
"eslint": "^6.7.2",
|
|
64
|
-
"eslint-plugin-import": "^2.25.3",
|
|
65
|
-
"eslint-plugin-node": "^11.1.0",
|
|
66
|
-
"eslint-plugin-standard": "^5.0.0",
|
|
67
|
-
"eslint-plugin-vue": "^6.2.2",
|
|
68
|
-
"fast-deep-equal": "^3.1.3",
|
|
69
|
-
"gh-pages": "^3.1.0",
|
|
70
|
-
"jest": "^27.0.5",
|
|
71
|
-
"less-loader": "^6.1.1",
|
|
72
|
-
"react-bmap": "^1.0.121",
|
|
73
|
-
"script-loader": "^0.7.2",
|
|
74
|
-
"style-resources-loader": "^1.3.2",
|
|
75
|
-
"vue-amap": "^0.5.10",
|
|
76
|
-
"vue-baidu-map": "^0.21.22",
|
|
77
|
-
"vue-bmap-gl": "0.0.29",
|
|
78
|
-
"vue-cli-plugin-style-resources-loader": "^0.1.4",
|
|
79
|
-
"vue-mapvgl": "0.0.28",
|
|
80
|
-
"vue-template-compiler": "^2.6.11",
|
|
81
|
-
"vuepress": "^1.5.2",
|
|
82
|
-
"webpack-theme-color-replacer": "1.3.18",
|
|
83
|
-
"whatwg-fetch": "^3.0.0"
|
|
84
|
-
},
|
|
85
|
-
"browserslist": [
|
|
86
|
-
"> 1%",
|
|
87
|
-
"last 2 versions",
|
|
88
|
-
"not ie <= 10"
|
|
89
|
-
]
|
|
90
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue2-client",
|
|
3
|
+
"version": "1.2.40",
|
|
4
|
+
"private": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"serve": "vue-cli-service serve",
|
|
7
|
+
"build": "vue-cli-service build",
|
|
8
|
+
"test:unit": "vue-cli-service test:unit",
|
|
9
|
+
"lint": "vue-cli-service lint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@antv/data-set": "^0.11.4",
|
|
13
|
+
"@antv/f2": "^3.6.4",
|
|
14
|
+
"@antv/g2plot": "^2.3.33",
|
|
15
|
+
"@logicflow/core": "^1.1.7",
|
|
16
|
+
"@logicflow/extension": "^1.1.7",
|
|
17
|
+
"@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
|
|
18
|
+
"@vue/babel-preset-jsx": "^1.2.4",
|
|
19
|
+
"animate.css": "^4.1.0",
|
|
20
|
+
"ant-design-vue": "1.7.8",
|
|
21
|
+
"axios": "^0.19.2",
|
|
22
|
+
"clipboard": "^2.0.6",
|
|
23
|
+
"core-js": "^3.6.5",
|
|
24
|
+
"date-fns": "^2.14.0",
|
|
25
|
+
"default-passive-events": "^2.0.0",
|
|
26
|
+
"enquire.js": "^2.1.6",
|
|
27
|
+
"file-saver": "^2.0.5",
|
|
28
|
+
"highlight.js": "^10.2.1",
|
|
29
|
+
"js-cookie": "^2.2.1",
|
|
30
|
+
"jsencrypt": "^3.0.0-rc.1",
|
|
31
|
+
"lodash.get": "^4.4.2",
|
|
32
|
+
"mockjs": "^1.1.0",
|
|
33
|
+
"nprogress": "^0.2.0",
|
|
34
|
+
"viser-vue": "^2.4.8",
|
|
35
|
+
"vue": "^2.6.11",
|
|
36
|
+
"vue-i18n": "^8.18.2",
|
|
37
|
+
"vue-json-viewer": "^2.2.15",
|
|
38
|
+
"vue-infinite-scroll": "^2.0.2",
|
|
39
|
+
"vue-router": "^3.3.4",
|
|
40
|
+
"vuedraggable": "^2.23.2",
|
|
41
|
+
"vuex": "^3.4.0",
|
|
42
|
+
"xlsx": "0.17.5"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@ant-design/colors": "^4.0.1",
|
|
46
|
+
"@vue/cli-plugin-babel": "^4.4.0",
|
|
47
|
+
"@vue/cli-plugin-eslint": "^4.4.0",
|
|
48
|
+
"@vue/cli-plugin-router": "^4.4.0",
|
|
49
|
+
"@vue/cli-plugin-unit-jest": "~5.0.0",
|
|
50
|
+
"@vue/cli-plugin-vuex": "^4.4.0",
|
|
51
|
+
"@vue/cli-service": "^4.4.0",
|
|
52
|
+
"@vue/eslint-config-standard": "^4.0.0",
|
|
53
|
+
"@vue/test-utils": "^1.1.3",
|
|
54
|
+
"@vue/vue2-jest": "^27.0.0-alpha.2",
|
|
55
|
+
"@vuepress/plugin-back-to-top": "^1.5.2",
|
|
56
|
+
"babel-eslint": "^10.1.0",
|
|
57
|
+
"babel-jest": "^27.0.6",
|
|
58
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
59
|
+
"babel-polyfill": "^6.26.0",
|
|
60
|
+
"compression-webpack-plugin": "^2.0.0",
|
|
61
|
+
"deepmerge": "^4.2.2",
|
|
62
|
+
"echarts": "^4.9.0",
|
|
63
|
+
"eslint": "^6.7.2",
|
|
64
|
+
"eslint-plugin-import": "^2.25.3",
|
|
65
|
+
"eslint-plugin-node": "^11.1.0",
|
|
66
|
+
"eslint-plugin-standard": "^5.0.0",
|
|
67
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
68
|
+
"fast-deep-equal": "^3.1.3",
|
|
69
|
+
"gh-pages": "^3.1.0",
|
|
70
|
+
"jest": "^27.0.5",
|
|
71
|
+
"less-loader": "^6.1.1",
|
|
72
|
+
"react-bmap": "^1.0.121",
|
|
73
|
+
"script-loader": "^0.7.2",
|
|
74
|
+
"style-resources-loader": "^1.3.2",
|
|
75
|
+
"vue-amap": "^0.5.10",
|
|
76
|
+
"vue-baidu-map": "^0.21.22",
|
|
77
|
+
"vue-bmap-gl": "0.0.29",
|
|
78
|
+
"vue-cli-plugin-style-resources-loader": "^0.1.4",
|
|
79
|
+
"vue-mapvgl": "0.0.28",
|
|
80
|
+
"vue-template-compiler": "^2.6.11",
|
|
81
|
+
"vuepress": "^1.5.2",
|
|
82
|
+
"webpack-theme-color-replacer": "1.3.18",
|
|
83
|
+
"whatwg-fetch": "^3.0.0"
|
|
84
|
+
},
|
|
85
|
+
"browserslist": [
|
|
86
|
+
"> 1%",
|
|
87
|
+
"last 2 versions",
|
|
88
|
+
"not ie <= 10"
|
|
89
|
+
]
|
|
90
|
+
}
|
|
@@ -1,149 +1,149 @@
|
|
|
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, post } from '@vue2-client/services/api'
|
|
38
|
-
|
|
39
|
-
export default {
|
|
40
|
-
name: 'FormGroupEdit',
|
|
41
|
-
components: {
|
|
42
|
-
XAddForm
|
|
43
|
-
},
|
|
44
|
-
data () {
|
|
45
|
-
return {
|
|
46
|
-
// 页面宽度
|
|
47
|
-
screenWidth: document.documentElement.clientWidth,
|
|
48
|
-
// 是否显示参数下发抽屉
|
|
49
|
-
editQueryVisible: false,
|
|
50
|
-
targetIndex: 0,
|
|
51
|
-
columnJson: {},
|
|
52
|
-
editIndex: -1,
|
|
53
|
-
formObj: {
|
|
54
|
-
groupName: '',
|
|
55
|
-
formJson: []
|
|
56
|
-
},
|
|
57
|
-
// 参数设置业务执行状态
|
|
58
|
-
loading: false
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
mounted () {
|
|
62
|
-
this.initView()
|
|
63
|
-
},
|
|
64
|
-
computed: {
|
|
65
|
-
...mapState('setting', ['isMobile'])
|
|
66
|
-
},
|
|
67
|
-
props: {
|
|
68
|
-
visible: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
default: false
|
|
71
|
-
},
|
|
72
|
-
modifyModelData: {
|
|
73
|
-
type: Object,
|
|
74
|
-
default: () => {
|
|
75
|
-
return {}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
watch: {
|
|
80
|
-
visible (rel) {
|
|
81
|
-
if (rel) {
|
|
82
|
-
this.initView()
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
methods: {
|
|
87
|
-
// 初始化组件
|
|
88
|
-
initView () {
|
|
89
|
-
this.$emit('getColumnJson', val => {
|
|
90
|
-
this.columnJson = val
|
|
91
|
-
})
|
|
92
|
-
},
|
|
93
|
-
toEdit (item) {
|
|
94
|
-
post(commonApi.getColumnsJson, { queryObject: item }).then(res => {
|
|
95
|
-
this.formObj = res
|
|
96
|
-
this.editQueryVisible = true
|
|
97
|
-
})
|
|
98
|
-
},
|
|
99
|
-
onClose () {
|
|
100
|
-
this.$emit('update:visible', false)
|
|
101
|
-
},
|
|
102
|
-
submit (res) {
|
|
103
|
-
if (res.valid) {
|
|
104
|
-
this.loading = true
|
|
105
|
-
const requestParameters = {
|
|
106
|
-
paramsJson: {}
|
|
107
|
-
}
|
|
108
|
-
requestParameters.paramsJson[this.formObj.groupName] = {}
|
|
109
|
-
for (const key of Object.keys(res.form)) {
|
|
110
|
-
const realKey = key.substring(key.indexOf('_') + 1)
|
|
111
|
-
requestParameters.paramsJson[this.formObj.groupName][realKey] = res.form[key]
|
|
112
|
-
}
|
|
113
|
-
this.$emit('onSubmit', requestParameters, result => {
|
|
114
|
-
if (result) {
|
|
115
|
-
this.$message.success('参数设置成功!')
|
|
116
|
-
} else {
|
|
117
|
-
this.$message.error('参数设置失败!')
|
|
118
|
-
}
|
|
119
|
-
this.loading = false
|
|
120
|
-
this.editQueryVisible = false
|
|
121
|
-
})
|
|
122
|
-
} else {
|
|
123
|
-
return false
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
</script>
|
|
129
|
-
<style lang="less" scoped>
|
|
130
|
-
.card-avatar {
|
|
131
|
-
width: 48px;
|
|
132
|
-
height: 48px;
|
|
133
|
-
border-radius: 48px;
|
|
134
|
-
}
|
|
135
|
-
.new-btn{
|
|
136
|
-
border-radius: 2px;
|
|
137
|
-
width: 100%;
|
|
138
|
-
height: 187px;
|
|
139
|
-
}
|
|
140
|
-
.meta-content{
|
|
141
|
-
position: relative;
|
|
142
|
-
overflow: hidden;
|
|
143
|
-
text-overflow: ellipsis;
|
|
144
|
-
display: -webkit-box;
|
|
145
|
-
height: 64px;
|
|
146
|
-
-webkit-line-clamp: 3;
|
|
147
|
-
-webkit-box-orient: vertical;
|
|
148
|
-
}
|
|
149
|
-
</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, post } from '@vue2-client/services/api'
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
name: 'FormGroupEdit',
|
|
41
|
+
components: {
|
|
42
|
+
XAddForm
|
|
43
|
+
},
|
|
44
|
+
data () {
|
|
45
|
+
return {
|
|
46
|
+
// 页面宽度
|
|
47
|
+
screenWidth: document.documentElement.clientWidth,
|
|
48
|
+
// 是否显示参数下发抽屉
|
|
49
|
+
editQueryVisible: false,
|
|
50
|
+
targetIndex: 0,
|
|
51
|
+
columnJson: {},
|
|
52
|
+
editIndex: -1,
|
|
53
|
+
formObj: {
|
|
54
|
+
groupName: '',
|
|
55
|
+
formJson: []
|
|
56
|
+
},
|
|
57
|
+
// 参数设置业务执行状态
|
|
58
|
+
loading: false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
mounted () {
|
|
62
|
+
this.initView()
|
|
63
|
+
},
|
|
64
|
+
computed: {
|
|
65
|
+
...mapState('setting', ['isMobile'])
|
|
66
|
+
},
|
|
67
|
+
props: {
|
|
68
|
+
visible: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: false
|
|
71
|
+
},
|
|
72
|
+
modifyModelData: {
|
|
73
|
+
type: Object,
|
|
74
|
+
default: () => {
|
|
75
|
+
return {}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
watch: {
|
|
80
|
+
visible (rel) {
|
|
81
|
+
if (rel) {
|
|
82
|
+
this.initView()
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
// 初始化组件
|
|
88
|
+
initView () {
|
|
89
|
+
this.$emit('getColumnJson', val => {
|
|
90
|
+
this.columnJson = val
|
|
91
|
+
})
|
|
92
|
+
},
|
|
93
|
+
toEdit (item) {
|
|
94
|
+
post(commonApi.getColumnsJson, { queryObject: item }).then(res => {
|
|
95
|
+
this.formObj = res
|
|
96
|
+
this.editQueryVisible = true
|
|
97
|
+
})
|
|
98
|
+
},
|
|
99
|
+
onClose () {
|
|
100
|
+
this.$emit('update:visible', false)
|
|
101
|
+
},
|
|
102
|
+
submit (res) {
|
|
103
|
+
if (res.valid) {
|
|
104
|
+
this.loading = true
|
|
105
|
+
const requestParameters = {
|
|
106
|
+
paramsJson: {}
|
|
107
|
+
}
|
|
108
|
+
requestParameters.paramsJson[this.formObj.groupName] = {}
|
|
109
|
+
for (const key of Object.keys(res.form)) {
|
|
110
|
+
const realKey = key.substring(key.indexOf('_') + 1)
|
|
111
|
+
requestParameters.paramsJson[this.formObj.groupName][realKey] = res.form[key]
|
|
112
|
+
}
|
|
113
|
+
this.$emit('onSubmit', requestParameters, result => {
|
|
114
|
+
if (result) {
|
|
115
|
+
this.$message.success('参数设置成功!')
|
|
116
|
+
} else {
|
|
117
|
+
this.$message.error('参数设置失败!')
|
|
118
|
+
}
|
|
119
|
+
this.loading = false
|
|
120
|
+
this.editQueryVisible = false
|
|
121
|
+
})
|
|
122
|
+
} else {
|
|
123
|
+
return false
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
</script>
|
|
129
|
+
<style lang="less" scoped>
|
|
130
|
+
.card-avatar {
|
|
131
|
+
width: 48px;
|
|
132
|
+
height: 48px;
|
|
133
|
+
border-radius: 48px;
|
|
134
|
+
}
|
|
135
|
+
.new-btn{
|
|
136
|
+
border-radius: 2px;
|
|
137
|
+
width: 100%;
|
|
138
|
+
height: 187px;
|
|
139
|
+
}
|
|
140
|
+
.meta-content{
|
|
141
|
+
position: relative;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
text-overflow: ellipsis;
|
|
144
|
+
display: -webkit-box;
|
|
145
|
+
height: 64px;
|
|
146
|
+
-webkit-line-clamp: 3;
|
|
147
|
+
-webkit-box-orient: vertical;
|
|
148
|
+
}
|
|
149
|
+
</style>
|