vue2-client 1.8.80 → 1.8.82

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.
Files changed (26) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/package.json +1 -1
  3. package/src/base-client/components/common/XForm/XFormItem.vue +36 -22
  4. package/src/base-client/components/index.js +0 -6
  5. package/src/pages/DynamicStatistics/ChartSelector.vue +20 -6
  6. package/src/pages/DynamicStatistics/DynamicTable.vue +4 -1
  7. package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +3 -1
  8. package/src/pages/DynamicStatistics/SearchBar.vue +65 -17
  9. package/src/pages/DynamicStatistics/index.vue +9 -0
  10. package/src/router/async/router.map.js +0 -2
  11. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +0 -669
  12. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +0 -1014
  13. package/src/base-client/components/common/CreateQuery/index.js +0 -3
  14. package/src/base-client/components/common/CreateQuery/index.md +0 -42
  15. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +0 -452
  16. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +0 -511
  17. package/src/base-client/components/common/CreateSimpleFormQuery/index.js +0 -3
  18. package/src/base-client/components/common/CreateSimpleFormQuery/index.md +0 -42
  19. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +0 -149
  20. package/src/base-client/components/common/FormGroupEdit/index.js +0 -3
  21. package/src/base-client/components/common/FormGroupEdit/index.md +0 -43
  22. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +0 -166
  23. package/src/base-client/components/common/FormGroupQuery/index.js +0 -3
  24. package/src/base-client/components/common/FormGroupQuery/index.md +0 -43
  25. package/src/config/CreateQueryConfig.js +0 -322
  26. package/src/pages/CreateQueryPage.vue +0 -160
@@ -1,149 +0,0 @@
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
- ref="xAddForm"
11
- @onSubmit="onAddOrEditSubmit"/>
12
- <a-list
13
- :grid="{gutter: 24, lg: 4, md: 3, sm: 1, xs: 1}"
14
- :dataSource="content.groups"
15
- >
16
- <a-list-item slot="renderItem" slot-scope="item">
17
- <a-card :hoverable="true" @click="toEdit(item)">
18
- <a-card-meta >
19
- <div style="margin-bottom: 3px" slot="title">{{ item.group }}</div>
20
- <a-icon type="tags" slot="avatar" :style="{ fontSize:'2em' }"/>
21
- <div class="meta-content" slot="description">{{ item.describe }}</div>
22
- </a-card-meta>
23
- </a-card>
24
- </a-list-item>
25
- </a-list>
26
- </a-drawer>
27
- </template>
28
-
29
- <script>
30
- import { mapState } from 'vuex'
31
- import XAddForm from '@vue2-client/base-client/components/common/XAddForm/XAddForm'
32
- import { parseConfig } from '@vue2-client/services/api/common'
33
-
34
- export default {
35
- name: 'FormGroupEdit',
36
- components: {
37
- XAddForm
38
- },
39
- data () {
40
- return {
41
- // 页面宽度
42
- screenWidth: document.documentElement.clientWidth,
43
- formObj: {
44
- groupName: '',
45
- formJson: []
46
- }
47
- }
48
- },
49
- mounted () {
50
- this.initView()
51
- },
52
- computed: {
53
- ...mapState('setting', ['isMobile'])
54
- },
55
- props: {
56
- visible: {
57
- type: Boolean,
58
- default: false
59
- },
60
- serviceName: {
61
- type: String,
62
- default: undefined
63
- },
64
- modifyModelData: {
65
- type: Object,
66
- default: () => {
67
- return {}
68
- }
69
- },
70
- content: {
71
- type: Object,
72
- required: true
73
- },
74
- // 环境
75
- env: {
76
- type: String,
77
- default: () => {
78
- return 'prod'
79
- }
80
- },
81
- },
82
- watch: {
83
- visible (rel) {
84
- if (rel) {
85
- this.initView()
86
- }
87
- }
88
- },
89
- methods: {
90
- // 初始化组件
91
- initView () {
92
- },
93
- toEdit (item) {
94
- parseConfig(item, 'SIMPLE_FORM', this.serviceName, this.env === 'dev').then(res => {
95
- this.formObj = res
96
- const modifyModelData = { data: this.modifyModelData[res.groupName] }
97
- this.$refs.xAddForm.init({
98
- businessType: '修改',
99
- title: '参数项',
100
- formItems: res.formJson,
101
- serviceName: this.serviceName,
102
- modifyModelData: modifyModelData
103
- })
104
- })
105
- },
106
- onClose () {
107
- this.$emit('update:visible', false)
108
- },
109
- onAddOrEditSubmit (res, callback) {
110
- const requestParameters = {
111
- paramsJson: {}
112
- }
113
- requestParameters.paramsJson[this.formObj.groupName] = {}
114
- for (const key of Object.keys(res.realForm)) {
115
- requestParameters.paramsJson[this.formObj.groupName][key] = res.realForm[key]
116
- }
117
- this.$emit('onSubmit', requestParameters, result => {
118
- if (result) {
119
- this.$message.success('提交成功!')
120
- } else {
121
- this.$message.error('提交失败!')
122
- }
123
- callback()
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,3 +0,0 @@
1
- import FormGroupEdit from './FormGroupEdit'
2
-
3
- export default FormGroupEdit
@@ -1,43 +0,0 @@
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,166 +0,0 @@
1
- <template>
2
- <a-drawer
3
- :visible="visible"
4
- :width="isMobile ? screenWidth : screenWidth * 0.85"
5
- placement="right"
6
- title="表单参数组配置"
7
- @close="onClose"
8
- >
9
- <create-simple-form-query
10
- :to-edit-json="editItem()"
11
- :as-a-params-group="true"
12
- :visible.sync="createQueryVisible"
13
- @saveQueryParams="saveQueryParams"
14
- />
15
- <a-list
16
- :dataSource="contentCopy()"
17
- :grid="{gutter: 24, lg: 4, md: 3, sm: 1, xs: 1}"
18
- >
19
- <a-list-item slot="renderItem" slot-scope="item, index">
20
- <template v-if="item.type">
21
- <a-button class="new-btn" type="dashed" @click="toCreateQuery">
22
- <a-icon type="plus" />新增参数组
23
- </a-button>
24
- </template>
25
- <template v-else>
26
- <a-card :hoverable="true">
27
- <a-card-meta >
28
- <div slot="title" style="margin-bottom: 3px">{{ item.group }}</div>
29
- <a-icon slot="avatar" :style="{ fontSize:'2em' }" type="tags"/>
30
- <div slot="description" class="meta-content">{{ item.describe }}</div>
31
- </a-card-meta>
32
- <a slot="actions" @click="toEditQuery(index)">编辑</a>
33
- <a slot="actions" @click="toDelete(index)">删除</a>
34
- </a-card>
35
- </template>
36
- </a-list-item>
37
- </a-list>
38
- </a-drawer>
39
- </template>
40
-
41
- <script>
42
- import { mapState } from 'vuex'
43
- import CreateSimpleFormQuery from '../CreateSimpleFormQuery'
44
-
45
- export default {
46
- name: 'FormGroupQuery',
47
- components: {
48
- CreateSimpleFormQuery
49
- },
50
- data () {
51
- return {
52
- // 页面宽度
53
- screenWidth: document.documentElement.clientWidth,
54
- // 是否显示生成查询配置抽屉
55
- createQueryVisible: false,
56
- targetIndex: 0,
57
- editIndex: -1
58
- }
59
- },
60
- mounted () {
61
- this.initView()
62
- },
63
- computed: {
64
- ...mapState('setting', ['isMobile'])
65
- },
66
- props: {
67
- visible: {
68
- type: Boolean,
69
- default: false
70
- },
71
- content: {
72
- type: Object,
73
- required: true
74
- }
75
- },
76
- watch: {
77
- visible (rel) {
78
- if (rel) {
79
- this.initView()
80
- }
81
- }
82
- },
83
- methods: {
84
- // 初始化组件
85
- initView () {
86
- this.editIndex = -1
87
- },
88
- toCreateQuery () {
89
- this.editIndex = -1
90
- this.createQueryVisible = true
91
- },
92
- toEditQuery (index) {
93
- this.editIndex = index
94
- this.createQueryVisible = true
95
- },
96
- toDelete (index) {
97
- const _this = this
98
- this.$confirm({
99
- title: '您确定要删除该参数组?',
100
- content: '删除的参数组无法恢复',
101
- okText: '确定',
102
- okType: 'danger',
103
- cancelText: '取消',
104
- onOk () {
105
- _this.content.groups.splice(index, 1)
106
- _this.$emit('saveQueryParams', _this.content)
107
- }
108
- })
109
- },
110
- onClose () {
111
- this.$emit('update:visible', false)
112
- },
113
- // 存储查询配置信息
114
- saveQueryParams (source) {
115
- if (!this.content.groups) {
116
- this.content.groups = []
117
- }
118
- if (this.editIndex !== -1) {
119
- this.content.groups[this.editIndex] = source
120
- } else {
121
- this.content.groups.push(source)
122
- }
123
- this.$emit('saveQueryParams', this.content)
124
- this.createQueryVisible = false
125
- },
126
- contentCopy () {
127
- let groups
128
- if (this.content.groups) {
129
- groups = JSON.parse(JSON.stringify(this.content.groups))
130
- } else {
131
- groups = []
132
- }
133
- groups.push({ type: 'add' })
134
- return groups
135
- },
136
- editItem () {
137
- if (this.editIndex !== -1) {
138
- return JSON.parse(JSON.stringify(this.content.groups[this.editIndex]))
139
- } else {
140
- return {}
141
- }
142
- }
143
- }
144
- }
145
- </script>
146
- <style lang="less" scoped>
147
- .card-avatar {
148
- width: 48px;
149
- height: 48px;
150
- border-radius: 48px;
151
- }
152
- .new-btn{
153
- border-radius: 2px;
154
- width: 100%;
155
- height: 187px;
156
- }
157
- .meta-content{
158
- position: relative;
159
- overflow: hidden;
160
- text-overflow: ellipsis;
161
- display: -webkit-box;
162
- height: 64px;
163
- -webkit-line-clamp: 3;
164
- -webkit-box-orient: vertical;
165
- }
166
- </style>
@@ -1,3 +0,0 @@
1
- import FormGroupQuery from './FormGroupQuery'
2
-
3
- export default FormGroupQuery
@@ -1,43 +0,0 @@
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 | - |