vue2-client 1.8.299 → 1.8.302
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 +1 -1
- package/package.json +96 -96
- package/src/base-client/components/common/AmapMarker/index.js +3 -3
- package/src/base-client/components/common/XDetailsView/XDetailsView.vue +214 -214
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XFormGroup/demo.vue +40 -40
- package/src/base-client/components/common/XFormGroupDetails/XFormGroupDetails.vue +72 -72
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XReport/XReportJsonRender.vue +21 -5
- package/src/base-client/components/common/XTree/XTree.vue +24 -5
- package/src/pages/Example/index.vue +407 -15
- package/src/utils/indexedDB.js +16 -5
- package/src/utils/reg.js +19 -19
package/.env
CHANGED
|
@@ -14,6 +14,6 @@ VUE_APP_SINGLEVALUE_KEY=admin.singlevalue
|
|
|
14
14
|
VUE_APP_DIVISIONSOHCHINA=admin.divisionsohchina
|
|
15
15
|
VUE_APP_WEB_CONFIG_KEY=admin.webconfig
|
|
16
16
|
VUE_APP_API_BASE_URL=http://123.60.214.109:8405
|
|
17
|
-
VUE_APP_SYSTEM_NAME=af-
|
|
17
|
+
VUE_APP_SYSTEM_NAME=af-revenue
|
|
18
18
|
VUE_APP_LOGIN_VERSION=V4
|
|
19
19
|
|
package/package.json
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vue2-client",
|
|
3
|
-
"version": "1.8.
|
|
4
|
-
"private": false,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
|
|
7
|
-
"mac-serve": "vue-cli-service serve --no-eslint --mode mac",
|
|
8
|
-
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
|
9
|
-
"test:unit": "vue-cli-service test:unit",
|
|
10
|
-
"lint": "vue-cli-service lint",
|
|
11
|
-
"build:preview": "vue-cli-service build --mode preview",
|
|
12
|
-
"lint:nofix": "vue-cli-service lint --no-fix",
|
|
13
|
-
"test": "jest"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
17
|
-
"@antv/data-set": "^0.11.8",
|
|
18
|
-
"@antv/g2plot": "^2.4.31",
|
|
19
|
-
"@vue/babel-preset-jsx": "^1.4.0",
|
|
20
|
-
"animate.css": "^4.1.1",
|
|
21
|
-
"ant-design-vue": "^1.7.8",
|
|
22
|
-
"axios": "^0.27.2",
|
|
23
|
-
"clipboard": "^2.0.11",
|
|
24
|
-
"core-js": "^3.33.0",
|
|
25
|
-
"crypto-js": "^4.1.1",
|
|
26
|
-
"date-fns": "^2.29.3",
|
|
27
|
-
"default-passive-events": "^2.0.0",
|
|
28
|
-
"dotenv": "^16.3.1",
|
|
29
|
-
"echarts": "^5.5.0",
|
|
30
|
-
"enquire.js": "^2.1.6",
|
|
31
|
-
"file-saver": "^2.0.5",
|
|
32
|
-
"highlight.js": "^11.7.0",
|
|
33
|
-
"html2canvas": "^1.4.1",
|
|
34
|
-
"js-base64": "^3.7.5",
|
|
35
|
-
"js-cookie": "^2.2.1",
|
|
36
|
-
"jsencrypt": "^3.3.2",
|
|
37
|
-
"jspdf": "^2.5.1",
|
|
38
|
-
"lodash.clonedeep": "^4.5.0",
|
|
39
|
-
"lodash.get": "^4.4.2",
|
|
40
|
-
"lodash.debounce": "^4",
|
|
41
|
-
"mockjs": "^1.1.0",
|
|
42
|
-
"nprogress": "^0.2.0",
|
|
43
|
-
"qs": "^6.11.2",
|
|
44
|
-
"regenerator-runtime": "^0.14.0",
|
|
45
|
-
"videojs-contrib-hls": "^5.15.0",
|
|
46
|
-
"viser-vue": "^2.4.8",
|
|
47
|
-
"vue": "^2.7.14",
|
|
48
|
-
"vue-codemirror": "4.0.6",
|
|
49
|
-
"vue-i18n": "^8.28.2",
|
|
50
|
-
"vue-json-viewer": "^2.2.22",
|
|
51
|
-
"vue-router": "^3.6.5",
|
|
52
|
-
"vue-video-player": "^5.0.2",
|
|
53
|
-
"vue-virtual-scroller": "^1.1.2",
|
|
54
|
-
"vuedraggable": "^2.24.3",
|
|
55
|
-
"vuex": "^3.6.2",
|
|
56
|
-
"xlsx": "0.18.5"
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"@ant-design/colors": "^7.0.0",
|
|
60
|
-
"@babel/core": "^7.22.20",
|
|
61
|
-
"@babel/eslint-parser": "^7.22.15",
|
|
62
|
-
"@babel/preset-env": "^7.22.20",
|
|
63
|
-
"@vue/cli-plugin-babel": "^5.0.8",
|
|
64
|
-
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
65
|
-
"@vue/cli-service": "^5.0.8",
|
|
66
|
-
"@vue/eslint-config-standard": "^8.0.1",
|
|
67
|
-
"@vue/test-utils": "^1.3.6",
|
|
68
|
-
"babel-jest": "^26.6.3",
|
|
69
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
70
|
-
"compression-webpack-plugin": "^10.0.0",
|
|
71
|
-
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
72
|
-
"deepmerge": "^4.3.1",
|
|
73
|
-
"eslint": "^8.51.0",
|
|
74
|
-
"eslint-plugin-vue": "^9.17.0",
|
|
75
|
-
"fast-deep-equal": "^3.1.3",
|
|
76
|
-
"ignore-loader": "^0.1.2",
|
|
77
|
-
"jest": "^26.6.3",
|
|
78
|
-
"jest-environment-jsdom": "^26.6.2",
|
|
79
|
-
"jest-transform-stub": "^2.0.0",
|
|
80
|
-
"less-loader": "^6.2.0",
|
|
81
|
-
"script-loader": "^0.7.2",
|
|
82
|
-
"style-resources-loader": "^1.5.0",
|
|
83
|
-
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
84
|
-
"vue-jest": "^4.0.1",
|
|
85
|
-
"vue-template-compiler": "^2.7.14",
|
|
86
|
-
"webpack": "^5.88.2",
|
|
87
|
-
"webpack-theme-color-replacer": "^1.4.7",
|
|
88
|
-
"whatwg-fetch": "^3.6.19"
|
|
89
|
-
},
|
|
90
|
-
"browserslist": [
|
|
91
|
-
"> 1%",
|
|
92
|
-
"last 2 versions",
|
|
93
|
-
"not dead",
|
|
94
|
-
"not ie 11"
|
|
95
|
-
]
|
|
96
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue2-client",
|
|
3
|
+
"version": "1.8.302",
|
|
4
|
+
"private": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
|
|
7
|
+
"mac-serve": "vue-cli-service serve --no-eslint --mode mac",
|
|
8
|
+
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
|
9
|
+
"test:unit": "vue-cli-service test:unit",
|
|
10
|
+
"lint": "vue-cli-service lint",
|
|
11
|
+
"build:preview": "vue-cli-service build --mode preview",
|
|
12
|
+
"lint:nofix": "vue-cli-service lint --no-fix",
|
|
13
|
+
"test": "jest"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
17
|
+
"@antv/data-set": "^0.11.8",
|
|
18
|
+
"@antv/g2plot": "^2.4.31",
|
|
19
|
+
"@vue/babel-preset-jsx": "^1.4.0",
|
|
20
|
+
"animate.css": "^4.1.1",
|
|
21
|
+
"ant-design-vue": "^1.7.8",
|
|
22
|
+
"axios": "^0.27.2",
|
|
23
|
+
"clipboard": "^2.0.11",
|
|
24
|
+
"core-js": "^3.33.0",
|
|
25
|
+
"crypto-js": "^4.1.1",
|
|
26
|
+
"date-fns": "^2.29.3",
|
|
27
|
+
"default-passive-events": "^2.0.0",
|
|
28
|
+
"dotenv": "^16.3.1",
|
|
29
|
+
"echarts": "^5.5.0",
|
|
30
|
+
"enquire.js": "^2.1.6",
|
|
31
|
+
"file-saver": "^2.0.5",
|
|
32
|
+
"highlight.js": "^11.7.0",
|
|
33
|
+
"html2canvas": "^1.4.1",
|
|
34
|
+
"js-base64": "^3.7.5",
|
|
35
|
+
"js-cookie": "^2.2.1",
|
|
36
|
+
"jsencrypt": "^3.3.2",
|
|
37
|
+
"jspdf": "^2.5.1",
|
|
38
|
+
"lodash.clonedeep": "^4.5.0",
|
|
39
|
+
"lodash.get": "^4.4.2",
|
|
40
|
+
"lodash.debounce": "^4",
|
|
41
|
+
"mockjs": "^1.1.0",
|
|
42
|
+
"nprogress": "^0.2.0",
|
|
43
|
+
"qs": "^6.11.2",
|
|
44
|
+
"regenerator-runtime": "^0.14.0",
|
|
45
|
+
"videojs-contrib-hls": "^5.15.0",
|
|
46
|
+
"viser-vue": "^2.4.8",
|
|
47
|
+
"vue": "^2.7.14",
|
|
48
|
+
"vue-codemirror": "4.0.6",
|
|
49
|
+
"vue-i18n": "^8.28.2",
|
|
50
|
+
"vue-json-viewer": "^2.2.22",
|
|
51
|
+
"vue-router": "^3.6.5",
|
|
52
|
+
"vue-video-player": "^5.0.2",
|
|
53
|
+
"vue-virtual-scroller": "^1.1.2",
|
|
54
|
+
"vuedraggable": "^2.24.3",
|
|
55
|
+
"vuex": "^3.6.2",
|
|
56
|
+
"xlsx": "0.18.5"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@ant-design/colors": "^7.0.0",
|
|
60
|
+
"@babel/core": "^7.22.20",
|
|
61
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
62
|
+
"@babel/preset-env": "^7.22.20",
|
|
63
|
+
"@vue/cli-plugin-babel": "^5.0.8",
|
|
64
|
+
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
65
|
+
"@vue/cli-service": "^5.0.8",
|
|
66
|
+
"@vue/eslint-config-standard": "^8.0.1",
|
|
67
|
+
"@vue/test-utils": "^1.3.6",
|
|
68
|
+
"babel-jest": "^26.6.3",
|
|
69
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
70
|
+
"compression-webpack-plugin": "^10.0.0",
|
|
71
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
72
|
+
"deepmerge": "^4.3.1",
|
|
73
|
+
"eslint": "^8.51.0",
|
|
74
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
75
|
+
"fast-deep-equal": "^3.1.3",
|
|
76
|
+
"ignore-loader": "^0.1.2",
|
|
77
|
+
"jest": "^26.6.3",
|
|
78
|
+
"jest-environment-jsdom": "^26.6.2",
|
|
79
|
+
"jest-transform-stub": "^2.0.0",
|
|
80
|
+
"less-loader": "^6.2.0",
|
|
81
|
+
"script-loader": "^0.7.2",
|
|
82
|
+
"style-resources-loader": "^1.5.0",
|
|
83
|
+
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
84
|
+
"vue-jest": "^4.0.1",
|
|
85
|
+
"vue-template-compiler": "^2.7.14",
|
|
86
|
+
"webpack": "^5.88.2",
|
|
87
|
+
"webpack-theme-color-replacer": "^1.4.7",
|
|
88
|
+
"whatwg-fetch": "^3.6.19"
|
|
89
|
+
},
|
|
90
|
+
"browserslist": [
|
|
91
|
+
"> 1%",
|
|
92
|
+
"last 2 versions",
|
|
93
|
+
"not dead",
|
|
94
|
+
"not ie 11"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
@@ -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,214 +1,214 @@
|
|
|
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="isMobile ? 1 : 2" 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
|
-
// 按钮状态
|
|
108
|
-
buttonState: {
|
|
109
|
-
type: Object,
|
|
110
|
-
default: () => {
|
|
111
|
-
return {
|
|
112
|
-
// 刷新按钮显示状态
|
|
113
|
-
refresh: true
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
methods: {
|
|
119
|
-
// 初始化组件
|
|
120
|
-
initView () {
|
|
121
|
-
this.getDetails()
|
|
122
|
-
},
|
|
123
|
-
// 关闭抽屉时回调
|
|
124
|
-
onClose () {
|
|
125
|
-
this.$emit('update:visible', false)
|
|
126
|
-
},
|
|
127
|
-
// 获取详情信息
|
|
128
|
-
getDetails () {
|
|
129
|
-
if (this.api && this.id) {
|
|
130
|
-
this.loadDetails = true
|
|
131
|
-
post(this.api, {
|
|
132
|
-
id: this.id
|
|
133
|
-
}).then(res => {
|
|
134
|
-
this.details = res
|
|
135
|
-
}, err => {
|
|
136
|
-
console.error(err)
|
|
137
|
-
}).finally(() => {
|
|
138
|
-
this.loadDetails = false
|
|
139
|
-
})
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
// 日期格式化
|
|
143
|
-
format (date, format) {
|
|
144
|
-
return formatDate(date, format)
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
watch: {
|
|
148
|
-
'visible' (val) {
|
|
149
|
-
if (val) {
|
|
150
|
-
this.initView()
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
</script>
|
|
156
|
-
|
|
157
|
-
<style lang="less" scoped>
|
|
158
|
-
.detail-layout {
|
|
159
|
-
margin-left: 44px;
|
|
160
|
-
}
|
|
161
|
-
.text {
|
|
162
|
-
color: rgba(0, 0, 0, .45);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.heading {
|
|
166
|
-
color: rgba(0, 0, 0, .85);
|
|
167
|
-
font-size: 20px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.no-data {
|
|
171
|
-
color: rgba(0, 0, 0, .25);
|
|
172
|
-
text-align: center;
|
|
173
|
-
line-height: 64px;
|
|
174
|
-
font-size: 16px;
|
|
175
|
-
|
|
176
|
-
i {
|
|
177
|
-
font-size: 24px;
|
|
178
|
-
margin-right: 16px;
|
|
179
|
-
position: relative;
|
|
180
|
-
top: 3px;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.mobile {
|
|
185
|
-
.detail-layout {
|
|
186
|
-
margin-left: unset;
|
|
187
|
-
}
|
|
188
|
-
.text {
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
.status-list {
|
|
192
|
-
text-align: left;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.row {
|
|
197
|
-
display: flex;
|
|
198
|
-
|
|
199
|
-
.content {
|
|
200
|
-
-webkit-box-flex: 1;
|
|
201
|
-
flex: auto;
|
|
202
|
-
-ms-flex: auto;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.extra {
|
|
206
|
-
flex: 0 1 auto;
|
|
207
|
-
-webkit-box-flex: 0;
|
|
208
|
-
-ms-flex: 0 1 auto;
|
|
209
|
-
min-width: 242px;
|
|
210
|
-
margin-left: 88px;
|
|
211
|
-
text-align: right;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
</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="isMobile ? 1 : 2" 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
|
+
// 按钮状态
|
|
108
|
+
buttonState: {
|
|
109
|
+
type: Object,
|
|
110
|
+
default: () => {
|
|
111
|
+
return {
|
|
112
|
+
// 刷新按钮显示状态
|
|
113
|
+
refresh: true
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
// 初始化组件
|
|
120
|
+
initView () {
|
|
121
|
+
this.getDetails()
|
|
122
|
+
},
|
|
123
|
+
// 关闭抽屉时回调
|
|
124
|
+
onClose () {
|
|
125
|
+
this.$emit('update:visible', false)
|
|
126
|
+
},
|
|
127
|
+
// 获取详情信息
|
|
128
|
+
getDetails () {
|
|
129
|
+
if (this.api && this.id) {
|
|
130
|
+
this.loadDetails = true
|
|
131
|
+
post(this.api, {
|
|
132
|
+
id: this.id
|
|
133
|
+
}).then(res => {
|
|
134
|
+
this.details = res
|
|
135
|
+
}, err => {
|
|
136
|
+
console.error(err)
|
|
137
|
+
}).finally(() => {
|
|
138
|
+
this.loadDetails = false
|
|
139
|
+
})
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
// 日期格式化
|
|
143
|
+
format (date, format) {
|
|
144
|
+
return formatDate(date, format)
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
watch: {
|
|
148
|
+
'visible' (val) {
|
|
149
|
+
if (val) {
|
|
150
|
+
this.initView()
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
</script>
|
|
156
|
+
|
|
157
|
+
<style lang="less" scoped>
|
|
158
|
+
.detail-layout {
|
|
159
|
+
margin-left: 44px;
|
|
160
|
+
}
|
|
161
|
+
.text {
|
|
162
|
+
color: rgba(0, 0, 0, .45);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.heading {
|
|
166
|
+
color: rgba(0, 0, 0, .85);
|
|
167
|
+
font-size: 20px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.no-data {
|
|
171
|
+
color: rgba(0, 0, 0, .25);
|
|
172
|
+
text-align: center;
|
|
173
|
+
line-height: 64px;
|
|
174
|
+
font-size: 16px;
|
|
175
|
+
|
|
176
|
+
i {
|
|
177
|
+
font-size: 24px;
|
|
178
|
+
margin-right: 16px;
|
|
179
|
+
position: relative;
|
|
180
|
+
top: 3px;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.mobile {
|
|
185
|
+
.detail-layout {
|
|
186
|
+
margin-left: unset;
|
|
187
|
+
}
|
|
188
|
+
.text {
|
|
189
|
+
|
|
190
|
+
}
|
|
191
|
+
.status-list {
|
|
192
|
+
text-align: left;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.row {
|
|
197
|
+
display: flex;
|
|
198
|
+
|
|
199
|
+
.content {
|
|
200
|
+
-webkit-box-flex: 1;
|
|
201
|
+
flex: auto;
|
|
202
|
+
-ms-flex: auto;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.extra {
|
|
206
|
+
flex: 0 1 auto;
|
|
207
|
+
-webkit-box-flex: 0;
|
|
208
|
+
-ms-flex: 0 1 auto;
|
|
209
|
+
min-width: 242px;
|
|
210
|
+
margin-left: 88px;
|
|
211
|
+
text-align: right;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
</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
|