vue2-client 1.8.329 → 1.8.330

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.329",
3
+ "version": "1.8.330",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -1,3 +1,3 @@
1
- import AmapPointRendering from './AmapPointRendering'
2
-
3
- export default AmapPointRendering
1
+ import AmapPointRendering from './AmapPointRendering'
2
+
3
+ export default AmapPointRendering
@@ -1,220 +1,220 @@
1
- <template>
2
- <a-drawer
3
- :visible="visible"
4
- :width="isMobile ? screenWidth : screenWidth * 0.85"
5
- placement="right"
6
- :title="mainTitle"
7
- @close="onClose"
8
- >
9
- <a-spin :spinning="loadDetails">
10
- <a-page-header :title="title">
11
- <!-- 详情区域 -->
12
- <div class="row">
13
- <div class="content">
14
- <a-descriptions :column="desColumn" size="small">
15
- <slot name="descriptionsContent" :details="details"/>
16
- </a-descriptions>
17
- </div>
18
- <!-- 状态区域 -->
19
- <div class="extra">
20
- <slot name="statusContent" :details="details"/>
21
- <!-- example is: -->
22
- <!-- <a-row class="status-list">-->
23
- <!-- <a-col :sm="24" :xs="12">-->
24
- <!-- </a-col>-->
25
- <!-- </a-row>-->
26
- <!-- or many is: -->
27
- <!-- <a-row class="status-list">-->
28
- <!-- <a-col :sm="24" :xs="12">-->
29
- <!-- </a-col>-->
30
- <!-- </a-row>-->
31
- <!-- <p></p>-->
32
- <!-- <a-row class="status-list">-->
33
- <!-- <a-col :sm="24" :xs="12">-->
34
- <!-- </a-col>-->
35
- <!-- </a-row>-->
36
- </div>
37
- </div>
38
- <!-- 操作区域 -->
39
- <template #extra>
40
- <a-button-group style="margin-right: 4px;" v-show="buttonState.refresh">
41
- <a-button :loading="loadDetails" type="dashed" @click="initView('1')">刷新</a-button>
42
- </a-button-group>
43
- <a-button-group style="margin-right: 4px;">
44
- <slot name="actionContent"/>
45
- </a-button-group>
46
- </template>
47
- <!-- 扩展区域 -->
48
- <slot name="extraContent"/>
49
- <!-- 页签区域 -->
50
- <a-tabs default-active-key="1">
51
- <slot name="actionTabs"/>
52
- </a-tabs>
53
- </a-page-header>
54
- </a-spin>
55
- </a-drawer>
56
- </template>
57
-
58
- <script>
59
- import { formatDate } from '@vue2-client/utils/util'
60
- import { mapState } from 'vuex'
61
- import XBadge from '@vue2-client/base-client/components/common/XBadge/XBadge'
62
- import { post } from 'vue2-client/src/services/api/restTools'
63
-
64
- export default {
65
- name: 'XDetailsView',
66
- components: {
67
- XBadge
68
- },
69
- data () {
70
- return {
71
- // 页面宽度
72
- screenWidth: document.documentElement.clientWidth,
73
- // 数据详情
74
- details: {},
75
- // 详情加载
76
- loadDetails: false
77
- }
78
- },
79
- mounted () {
80
- this.initView()
81
- },
82
- computed: {
83
- ...mapState('account', { currUser: 'user' }),
84
- ...mapState('setting', ['isMobile'])
85
- },
86
- props: {
87
- id: {
88
- type: [String, Number],
89
- required: false
90
- },
91
- mainTitle: {
92
- type: String,
93
- required: true
94
- },
95
- title: {
96
- type: String,
97
- required: true
98
- },
99
- visible: {
100
- type: Boolean,
101
- default: false
102
- },
103
- api: {
104
- type: String,
105
- required: false
106
- },
107
- desColumn: {
108
- type: Number,
109
- required: false,
110
- default: 3
111
- },
112
- // 按钮状态
113
- buttonState: {
114
- type: Object,
115
- default: () => {
116
- return {
117
- // 刷新按钮显示状态
118
- refresh: true
119
- }
120
- }
121
- }
122
- },
123
- methods: {
124
- // 初始化组件
125
- initView () {
126
- this.getDetails()
127
- },
128
- // 关闭抽屉时回调
129
- onClose () {
130
- this.$emit('update:visible', false)
131
- },
132
- // 获取详情信息
133
- getDetails () {
134
- if (this.api && this.id) {
135
- this.loadDetails = true
136
- post(this.api, {
137
- id: this.id
138
- }).then(res => {
139
- this.$emit('searchData', res)
140
- this.details = res
141
- }, err => {
142
- console.error(err)
143
- }).finally(() => {
144
- this.loadDetails = false
145
- })
146
- }
147
- },
148
- // 日期格式化
149
- format (date, format) {
150
- return formatDate(date, format)
151
- }
152
- },
153
- watch: {
154
- 'visible' (val) {
155
- if (val) {
156
- this.initView()
157
- }
158
- }
159
- }
160
- }
161
- </script>
162
-
163
- <style lang="less" scoped>
164
- .detail-layout {
165
- margin-left: 44px;
166
- }
167
- .text {
168
- color: rgba(0, 0, 0, .45);
169
- }
170
-
171
- .heading {
172
- color: rgba(0, 0, 0, .85);
173
- font-size: 20px;
174
- }
175
-
176
- .no-data {
177
- color: rgba(0, 0, 0, .25);
178
- text-align: center;
179
- line-height: 64px;
180
- font-size: 16px;
181
-
182
- i {
183
- font-size: 24px;
184
- margin-right: 16px;
185
- position: relative;
186
- top: 3px;
187
- }
188
- }
189
-
190
- .mobile {
191
- .detail-layout {
192
- margin-left: unset;
193
- }
194
- .text {
195
-
196
- }
197
- .status-list {
198
- text-align: left;
199
- }
200
- }
201
-
202
- .row {
203
- display: flex;
204
-
205
- .content {
206
- -webkit-box-flex: 1;
207
- flex: auto;
208
- -ms-flex: auto;
209
- }
210
-
211
- .extra {
212
- flex: 0 1 auto;
213
- -webkit-box-flex: 0;
214
- -ms-flex: 0 1 auto;
215
- min-width: 242px;
216
- margin-left: 88px;
217
- text-align: right;
218
- }
219
- }
220
- </style>
1
+ <template>
2
+ <a-drawer
3
+ :visible="visible"
4
+ :width="isMobile ? screenWidth : screenWidth * 0.85"
5
+ placement="right"
6
+ :title="mainTitle"
7
+ @close="onClose"
8
+ >
9
+ <a-spin :spinning="loadDetails">
10
+ <a-page-header :title="title">
11
+ <!-- 详情区域 -->
12
+ <div class="row">
13
+ <div class="content">
14
+ <a-descriptions :column="desColumn" size="small">
15
+ <slot name="descriptionsContent" :details="details"/>
16
+ </a-descriptions>
17
+ </div>
18
+ <!-- 状态区域 -->
19
+ <div class="extra">
20
+ <slot name="statusContent" :details="details"/>
21
+ <!-- example is: -->
22
+ <!-- <a-row class="status-list">-->
23
+ <!-- <a-col :sm="24" :xs="12">-->
24
+ <!-- </a-col>-->
25
+ <!-- </a-row>-->
26
+ <!-- or many is: -->
27
+ <!-- <a-row class="status-list">-->
28
+ <!-- <a-col :sm="24" :xs="12">-->
29
+ <!-- </a-col>-->
30
+ <!-- </a-row>-->
31
+ <!-- <p></p>-->
32
+ <!-- <a-row class="status-list">-->
33
+ <!-- <a-col :sm="24" :xs="12">-->
34
+ <!-- </a-col>-->
35
+ <!-- </a-row>-->
36
+ </div>
37
+ </div>
38
+ <!-- 操作区域 -->
39
+ <template #extra>
40
+ <a-button-group style="margin-right: 4px;" v-show="buttonState.refresh">
41
+ <a-button :loading="loadDetails" type="dashed" @click="initView('1')">刷新</a-button>
42
+ </a-button-group>
43
+ <a-button-group style="margin-right: 4px;">
44
+ <slot name="actionContent" :details="details"/>
45
+ </a-button-group>
46
+ </template>
47
+ <!-- 扩展区域 -->
48
+ <slot name="extraContent" :details="details"/>
49
+ <!-- 页签区域 -->
50
+ <a-tabs default-active-key="1">
51
+ <slot name="actionTabs" :details="details"/>
52
+ </a-tabs>
53
+ </a-page-header>
54
+ </a-spin>
55
+ </a-drawer>
56
+ </template>
57
+
58
+ <script>
59
+ import { formatDate } from '@vue2-client/utils/util'
60
+ import { mapState } from 'vuex'
61
+ import XBadge from '@vue2-client/base-client/components/common/XBadge/XBadge'
62
+ import { post } from 'vue2-client/src/services/api/restTools'
63
+
64
+ export default {
65
+ name: 'XDetailsView',
66
+ components: {
67
+ XBadge
68
+ },
69
+ data () {
70
+ return {
71
+ // 页面宽度
72
+ screenWidth: document.documentElement.clientWidth,
73
+ // 数据详情
74
+ details: {},
75
+ // 详情加载
76
+ loadDetails: false
77
+ }
78
+ },
79
+ mounted () {
80
+ this.initView()
81
+ },
82
+ computed: {
83
+ ...mapState('account', { currUser: 'user' }),
84
+ ...mapState('setting', ['isMobile'])
85
+ },
86
+ props: {
87
+ id: {
88
+ type: [String, Number],
89
+ required: false
90
+ },
91
+ mainTitle: {
92
+ type: String,
93
+ required: true
94
+ },
95
+ title: {
96
+ type: String,
97
+ required: true
98
+ },
99
+ visible: {
100
+ type: Boolean,
101
+ default: false
102
+ },
103
+ api: {
104
+ type: String,
105
+ required: false
106
+ },
107
+ desColumn: {
108
+ type: Number,
109
+ required: false,
110
+ default: 3
111
+ },
112
+ // 按钮状态
113
+ buttonState: {
114
+ type: Object,
115
+ default: () => {
116
+ return {
117
+ // 刷新按钮显示状态
118
+ refresh: true
119
+ }
120
+ }
121
+ }
122
+ },
123
+ methods: {
124
+ // 初始化组件
125
+ initView () {
126
+ this.getDetails()
127
+ },
128
+ // 关闭抽屉时回调
129
+ onClose () {
130
+ this.$emit('update:visible', false)
131
+ },
132
+ // 获取详情信息
133
+ getDetails () {
134
+ if (this.api && this.id) {
135
+ this.loadDetails = true
136
+ post(this.api, {
137
+ id: this.id
138
+ }).then(res => {
139
+ this.$emit('searchData', res)
140
+ this.details = res
141
+ }, err => {
142
+ console.error(err)
143
+ }).finally(() => {
144
+ this.loadDetails = false
145
+ })
146
+ }
147
+ },
148
+ // 日期格式化
149
+ format (date, format) {
150
+ return formatDate(date, format)
151
+ }
152
+ },
153
+ watch: {
154
+ 'visible' (val) {
155
+ if (val) {
156
+ this.initView()
157
+ }
158
+ }
159
+ }
160
+ }
161
+ </script>
162
+
163
+ <style lang="less" scoped>
164
+ .detail-layout {
165
+ margin-left: 44px;
166
+ }
167
+ .text {
168
+ color: rgba(0, 0, 0, .45);
169
+ }
170
+
171
+ .heading {
172
+ color: rgba(0, 0, 0, .85);
173
+ font-size: 20px;
174
+ }
175
+
176
+ .no-data {
177
+ color: rgba(0, 0, 0, .25);
178
+ text-align: center;
179
+ line-height: 64px;
180
+ font-size: 16px;
181
+
182
+ i {
183
+ font-size: 24px;
184
+ margin-right: 16px;
185
+ position: relative;
186
+ top: 3px;
187
+ }
188
+ }
189
+
190
+ .mobile {
191
+ .detail-layout {
192
+ margin-left: unset;
193
+ }
194
+ .text {
195
+
196
+ }
197
+ .status-list {
198
+ text-align: left;
199
+ }
200
+ }
201
+
202
+ .row {
203
+ display: flex;
204
+
205
+ .content {
206
+ -webkit-box-flex: 1;
207
+ flex: auto;
208
+ -ms-flex: auto;
209
+ }
210
+
211
+ .extra {
212
+ flex: 0 1 auto;
213
+ -webkit-box-flex: 0;
214
+ -ms-flex: 0 1 auto;
215
+ min-width: 242px;
216
+ margin-left: 88px;
217
+ text-align: right;
218
+ }
219
+ }
220
+ </style>
@@ -1,3 +1,3 @@
1
- import XDetailsView from './XDetailsView'
2
-
3
- export default XDetailsView
1
+ import XDetailsView from './XDetailsView'
2
+
3
+ export default XDetailsView
@@ -1,72 +1,72 @@
1
- <template>
2
- <div v-if="loading">
3
- <template v-for="(item, index) in formJson.groups">
4
- <a-descriptions :key="index" v-if="formJson.default[item.groupName]" :column="1" class="details_content">
5
- <template v-for="(col, index) in item.formJson">
6
- <a-descriptions-item :label="col.name" :key="index">
7
- <template v-if="col.type === 'rate'">
8
- <a-rate disabled v-model="formJson.default[item.groupName][col.model]" />
9
- </template>
10
- <template v-else>
11
- {{formJson.default[item.groupName][col.model]}}
12
- </template>
13
- </a-descriptions-item>
14
- </template>
15
- </a-descriptions>
16
- </template>
17
- </div>
18
- </template>
19
-
20
- <script>
21
- export default {
22
- name: 'XFormGroupDetails',
23
- props: {},
24
- data () {
25
- return {
26
- // 加载状态
27
- loading: false,
28
- // 标题
29
- title: '',
30
- // 表单组配置
31
- formJson: {},
32
- }
33
- },
34
- methods: {
35
- init (params) {
36
- /* params入参格式
37
- * {
38
- title: '评价内容', --表单标题
39
- formJson: res, --琉璃配置中心表单组json
40
- showGroups: [ --对应每组的内容
41
- {
42
- title: record.ter_f_business_name, --某个表单的名字
43
- result: { key: value } --需要渲染的key-value
44
- }
45
- ]
46
- }
47
- * */
48
- const {
49
- title, formJson, showGroups
50
- } = params
51
- formJson.default = {}
52
- showGroups.forEach((res) => {
53
- formJson.default[res.title] = res.result
54
- })
55
- this.title = title
56
- this.formJson = formJson
57
- this.loading = true
58
- }
59
- }
60
- }
61
- </script>
62
-
63
- <style lang="less" scoped>
64
- .details_content {
65
- width: 60%;
66
- :deep(.ant-descriptions-item-label) {
67
- // display: block;
68
- font-weight: bold;
69
- margin-bottom: 4px;
70
- }
71
- }
72
- </style>
1
+ <template>
2
+ <div v-if="loading">
3
+ <template v-for="(item, index) in formJson.groups">
4
+ <a-descriptions :key="index" v-if="formJson.default[item.groupName]" :column="1" class="details_content">
5
+ <template v-for="(col, index) in item.formJson">
6
+ <a-descriptions-item :label="col.name" :key="index">
7
+ <template v-if="col.type === 'rate'">
8
+ <a-rate disabled v-model="formJson.default[item.groupName][col.model]" />
9
+ </template>
10
+ <template v-else>
11
+ {{formJson.default[item.groupName][col.model]}}
12
+ </template>
13
+ </a-descriptions-item>
14
+ </template>
15
+ </a-descriptions>
16
+ </template>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ export default {
22
+ name: 'XFormGroupDetails',
23
+ props: {},
24
+ data () {
25
+ return {
26
+ // 加载状态
27
+ loading: false,
28
+ // 标题
29
+ title: '',
30
+ // 表单组配置
31
+ formJson: {},
32
+ }
33
+ },
34
+ methods: {
35
+ init (params) {
36
+ /* params入参格式
37
+ * {
38
+ title: '评价内容', --表单标题
39
+ formJson: res, --琉璃配置中心表单组json
40
+ showGroups: [ --对应每组的内容
41
+ {
42
+ title: record.ter_f_business_name, --某个表单的名字
43
+ result: { key: value } --需要渲染的key-value
44
+ }
45
+ ]
46
+ }
47
+ * */
48
+ const {
49
+ title, formJson, showGroups
50
+ } = params
51
+ formJson.default = {}
52
+ showGroups.forEach((res) => {
53
+ formJson.default[res.title] = res.result
54
+ })
55
+ this.title = title
56
+ this.formJson = formJson
57
+ this.loading = true
58
+ }
59
+ }
60
+ }
61
+ </script>
62
+
63
+ <style lang="less" scoped>
64
+ .details_content {
65
+ width: 60%;
66
+ :deep(.ant-descriptions-item-label) {
67
+ // display: block;
68
+ font-weight: bold;
69
+ margin-bottom: 4px;
70
+ }
71
+ }
72
+ </style>
@@ -1,3 +1,3 @@
1
- import XFormGroupDetails from './XFormGroupDetails'
2
-
3
- export default XFormGroupDetails
1
+ import XFormGroupDetails from './XFormGroupDetails'
2
+
3
+ export default XFormGroupDetails