vue2-client 1.8.133 → 1.8.136
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 +2 -0
- package/package.json +96 -96
- package/public/img/login/login-left.png +0 -0
- package/public/img/login/loginbg.gif +0 -0
- package/src/ReportView.js +19 -0
- package/src/base-client/components/common/Upload/Upload.vue +47 -15
- package/src/base-client/components/common/XReport/XReport.vue +76 -19
- package/src/base-client/components/common/XReport/XReportDesign.vue +22 -0
- package/src/base-client/components/common/XReport/XReportTrGroup.vue +357 -330
- package/src/base-client/components/common/XReportSlot/index.md +48 -48
- package/src/bootstrap.js +15 -11
- package/src/pages/Example/index.vue +463 -213
- package/src/pages/XReportView/index.vue +62 -0
- package/src/pages/login/LoginV3.vue +389 -0
- package/src/router/async/config.async.js +1 -0
- package/src/router/async/router.map.js +85 -61
- package/src/utils/indexedDB.js +4 -3
- package/vue.config.js +4 -3
package/.env
CHANGED
package/package.json
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
2
|
+
"name": "vue2-client",
|
|
3
|
+
"version": "1.8.136",
|
|
4
|
+
"private": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"serve": "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
|
+
"amis": "^3.4.3",
|
|
21
|
+
"animate.css": "^4.1.1",
|
|
22
|
+
"ant-design-vue": "^1.7.8",
|
|
23
|
+
"axios": "^0.27.2",
|
|
24
|
+
"clipboard": "^2.0.11",
|
|
25
|
+
"core-js": "^3.33.0",
|
|
26
|
+
"crypto-js": "^4.1.1",
|
|
27
|
+
"date-fns": "^2.29.3",
|
|
28
|
+
"default-passive-events": "^2.0.0",
|
|
29
|
+
"dotenv": "^16.3.1",
|
|
30
|
+
"echarts": "^5.5.0",
|
|
31
|
+
"enquire.js": "^2.1.6",
|
|
32
|
+
"file-saver": "^2.0.5",
|
|
33
|
+
"highlight.js": "^11.7.0",
|
|
34
|
+
"html2canvas": "^1.4.1",
|
|
35
|
+
"js-base64": "^3.7.5",
|
|
36
|
+
"js-cookie": "^2.2.1",
|
|
37
|
+
"jsencrypt": "^3.3.2",
|
|
38
|
+
"jspdf": "^2.5.1",
|
|
39
|
+
"lodash.clonedeep": "^4.5.0",
|
|
40
|
+
"lodash.get": "^4.4.2",
|
|
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
|
+
"copy-webpack-plugin": "^11.0.0",
|
|
72
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
73
|
+
"deepmerge": "^4.3.1",
|
|
74
|
+
"eslint": "^8.51.0",
|
|
75
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
76
|
+
"fast-deep-equal": "^3.1.3",
|
|
77
|
+
"ignore-loader": "^0.1.2",
|
|
78
|
+
"jest": "^26.6.3",
|
|
79
|
+
"jest-environment-jsdom": "^26.6.2",
|
|
80
|
+
"jest-transform-stub": "^2.0.0",
|
|
81
|
+
"less-loader": "^6.2.0",
|
|
82
|
+
"script-loader": "^0.7.2",
|
|
83
|
+
"style-resources-loader": "^1.5.0",
|
|
84
|
+
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
85
|
+
"vue-jest": "^4.0.1",
|
|
86
|
+
"vue-template-compiler": "^2.7.14",
|
|
87
|
+
"webpack": "^5.88.2",
|
|
88
|
+
"webpack-theme-color-replacer": "^1.4.7",
|
|
89
|
+
"whatwg-fetch": "^3.6.19"
|
|
90
|
+
},
|
|
91
|
+
"browserslist": [
|
|
92
|
+
"> 1%",
|
|
93
|
+
"last 2 versions",
|
|
94
|
+
"not dead",
|
|
95
|
+
"not ie 11"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import App from './pages/XReportView/index.vue'
|
|
3
|
+
import Vuex from 'vuex'
|
|
4
|
+
import { bootstrap, i18n, message, modules } from '../index'
|
|
5
|
+
|
|
6
|
+
Vue.use(Vuex)
|
|
7
|
+
|
|
8
|
+
// 创建router store
|
|
9
|
+
const store = new Vuex.Store({ modules })
|
|
10
|
+
|
|
11
|
+
// 绑定原型,用于amis
|
|
12
|
+
Vue.$store = store
|
|
13
|
+
|
|
14
|
+
bootstrap({ i18n, message }).then(() => {
|
|
15
|
+
new Vue({
|
|
16
|
+
i18n,
|
|
17
|
+
render: h => h(App)
|
|
18
|
+
}).$mount('#app')
|
|
19
|
+
})
|
|
@@ -18,18 +18,30 @@
|
|
|
18
18
|
支持单个或多个文件
|
|
19
19
|
</p>
|
|
20
20
|
</a-upload-dragger>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
<template v-if="uploadStyle === 'simple'">
|
|
22
|
+
<a-upload
|
|
23
|
+
v-if=" model.type === 'image'"
|
|
24
|
+
:accept="model.accept.join('')"
|
|
25
|
+
:customRequest="uploadFiles"
|
|
26
|
+
:file-list="uploadedFileList"
|
|
27
|
+
:remove="deleteFileItem">
|
|
28
|
+
<a-button style="margin-top: 2%"> <a-icon type="upload" /> 上传 </a-button>
|
|
29
|
+
</a-upload>
|
|
30
|
+
</template>
|
|
31
|
+
<template v-else>
|
|
32
|
+
<a-upload
|
|
33
|
+
v-if=" model.type === 'image'"
|
|
34
|
+
:accept="model.accept.join('')"
|
|
35
|
+
:customRequest="uploadFiles"
|
|
36
|
+
:file-list="uploadedFileList"
|
|
37
|
+
:remove="deleteFileItem"
|
|
38
|
+
list-type="picture-card">
|
|
39
|
+
<a-icon type="plus"/>
|
|
40
|
+
<div class="ant-upload-text">
|
|
41
|
+
Upload
|
|
42
|
+
</div>
|
|
43
|
+
</a-upload>
|
|
44
|
+
</template>
|
|
33
45
|
</div>
|
|
34
46
|
</template>
|
|
35
47
|
|
|
@@ -68,6 +80,14 @@ export default {
|
|
|
68
80
|
serviceName: {
|
|
69
81
|
type: String,
|
|
70
82
|
default: undefined
|
|
83
|
+
},
|
|
84
|
+
uploadStyle: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: undefined
|
|
87
|
+
},
|
|
88
|
+
outerContainerIndex: {
|
|
89
|
+
type: [String, Number],
|
|
90
|
+
default: undefined
|
|
71
91
|
}
|
|
72
92
|
},
|
|
73
93
|
computed: {
|
|
@@ -80,7 +100,11 @@ export default {
|
|
|
80
100
|
} else {
|
|
81
101
|
this.uploadedFileList = list
|
|
82
102
|
}
|
|
83
|
-
|
|
103
|
+
if (this.outerContainerIndex !== undefined) {
|
|
104
|
+
this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done'), this.outerContainerIndex)
|
|
105
|
+
} else {
|
|
106
|
+
this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done').map(item => item.id))
|
|
107
|
+
}
|
|
84
108
|
},
|
|
85
109
|
methods: {
|
|
86
110
|
uploadFiles (info) {
|
|
@@ -131,7 +155,11 @@ export default {
|
|
|
131
155
|
fileInfo.response = dataObj
|
|
132
156
|
fileInfo.id = dataObj.id
|
|
133
157
|
fileInfo.url = dataObj.f_downloadpath
|
|
134
|
-
|
|
158
|
+
if (this.outerContainerIndex !== undefined) {
|
|
159
|
+
this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done'), this.outerContainerIndex)
|
|
160
|
+
} else {
|
|
161
|
+
this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done').map(item => item.id))
|
|
162
|
+
}
|
|
135
163
|
this.$message.success('上传成功!')
|
|
136
164
|
} else {
|
|
137
165
|
fileInfo.status = 'error'
|
|
@@ -154,7 +182,11 @@ export default {
|
|
|
154
182
|
const index = this.uploadedFileList.indexOf(file)
|
|
155
183
|
// 从列表中移除该文件
|
|
156
184
|
this.uploadedFileList.splice(index, 1)
|
|
157
|
-
|
|
185
|
+
if (this.outerContainerIndex !== undefined) {
|
|
186
|
+
this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done'), this.outerContainerIndex)
|
|
187
|
+
} else {
|
|
188
|
+
this.$emit('setFiles', this.uploadedFileList.filter(item => item.status === 'done').map(item => item.id))
|
|
189
|
+
}
|
|
158
190
|
return true
|
|
159
191
|
}
|
|
160
192
|
}
|
|
@@ -7,17 +7,23 @@
|
|
|
7
7
|
<a-radio-button value="design">
|
|
8
8
|
设计
|
|
9
9
|
</a-radio-button>
|
|
10
|
-
<a-radio-button value="display">
|
|
10
|
+
<a-radio-button value="display" style="border-radius: 0">
|
|
11
11
|
预览
|
|
12
12
|
</a-radio-button>
|
|
13
13
|
</a-radio-group>
|
|
14
|
+
<a-radio-button @click="saveConfig" style="border-radius: 0 4px 4px 0">
|
|
15
|
+
保存
|
|
16
|
+
</a-radio-button>
|
|
14
17
|
<!-- 主体表格 -->
|
|
15
18
|
<XReportDesign
|
|
16
19
|
v-if="scanFinish"
|
|
17
20
|
:config="type === 'display' ? originalConfig : activeConfig"
|
|
18
21
|
:slot-config-name="type === 'display' ? undefined : activatedSlotName"
|
|
19
22
|
:for-display="type === 'display'"
|
|
20
|
-
|
|
23
|
+
ref="XReportDesign"
|
|
24
|
+
id="printReady"
|
|
25
|
+
:show-images="hasImages"
|
|
26
|
+
:image-list="imageList">
|
|
21
27
|
</XReportDesign>
|
|
22
28
|
<!-- 导出按钮 -->
|
|
23
29
|
<template v-if="type === 'display'">
|
|
@@ -42,6 +48,16 @@ import XReportDesign from '@vue2-client/base-client/components/common/XReport/XR
|
|
|
42
48
|
export default {
|
|
43
49
|
name: 'XReport',
|
|
44
50
|
props: {
|
|
51
|
+
files: {
|
|
52
|
+
type: Array,
|
|
53
|
+
default: () => {
|
|
54
|
+
return []
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
authority: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: 'user'
|
|
60
|
+
},
|
|
45
61
|
configName: {
|
|
46
62
|
type: String,
|
|
47
63
|
required: true
|
|
@@ -62,7 +78,7 @@ export default {
|
|
|
62
78
|
components: {
|
|
63
79
|
XReportDesign
|
|
64
80
|
},
|
|
65
|
-
data() {
|
|
81
|
+
data () {
|
|
66
82
|
return {
|
|
67
83
|
config: undefined,
|
|
68
84
|
type: 'design',
|
|
@@ -76,12 +92,33 @@ export default {
|
|
|
76
92
|
originalConfig: null,
|
|
77
93
|
// 扫描到的配置
|
|
78
94
|
configFromWeb: {},
|
|
79
|
-
timer: undefined
|
|
95
|
+
timer: undefined,
|
|
96
|
+
hasImages: false,
|
|
97
|
+
imageList: []
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
watch: {
|
|
101
|
+
configName (val) {
|
|
102
|
+
if (val) {
|
|
103
|
+
getConfigByName(this.configName, undefined, res => {
|
|
104
|
+
this.config = res
|
|
105
|
+
this.configInit()
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
localConfig (val) {
|
|
110
|
+
if (val) {
|
|
111
|
+
this.config = val
|
|
112
|
+
this.configInit()
|
|
113
|
+
}
|
|
80
114
|
}
|
|
81
115
|
},
|
|
82
116
|
methods: {
|
|
117
|
+
saveConfig () {
|
|
118
|
+
this.$emit('saveConfig', this.$refs.XReportDesign.activatedConfig)
|
|
119
|
+
},
|
|
83
120
|
// 检查slot是否在配置文件中包含,如果没有包含,则视为非法获取
|
|
84
|
-
checkSlotDefine(config) {
|
|
121
|
+
checkSlotDefine (config) {
|
|
85
122
|
const slotsDeclare = config.slotsDeclare
|
|
86
123
|
const total = slotsDeclare.length
|
|
87
124
|
let count = 0
|
|
@@ -98,16 +135,30 @@ export default {
|
|
|
98
135
|
return count === total
|
|
99
136
|
},
|
|
100
137
|
// 切换了标签页
|
|
101
|
-
tabChanged(key) {
|
|
138
|
+
tabChanged (key) {
|
|
102
139
|
this.scanFinish = false
|
|
103
|
-
this.originalConfig.data = {...this.originalConfig.data, ...this.config.data}
|
|
140
|
+
this.originalConfig.data = { ...this.originalConfig.data, ...this.config.data }
|
|
104
141
|
this.config.data = this.originalConfig.data
|
|
142
|
+
if (this.type === 'display') {
|
|
143
|
+
let count = 0
|
|
144
|
+
this.imageList = []
|
|
145
|
+
const keys = Object.keys(this.config.data.images)
|
|
146
|
+
keys.forEach(key => {
|
|
147
|
+
if (this.config.data.images[key].length > 0) {
|
|
148
|
+
this.imageList = [...this.imageList, ...this.config.data.images[key]]
|
|
149
|
+
count++
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
this.hasImages = count > 0
|
|
153
|
+
} else {
|
|
154
|
+
this.hasImages = false
|
|
155
|
+
}
|
|
105
156
|
this.$nextTick(() => {
|
|
106
157
|
this.scanFinish = true
|
|
107
158
|
})
|
|
108
159
|
},
|
|
109
160
|
// 获取当前日期,为保存文件命名用
|
|
110
|
-
getDate() {
|
|
161
|
+
getDate () {
|
|
111
162
|
const currentDate = new Date()
|
|
112
163
|
|
|
113
164
|
const year = currentDate.getFullYear()
|
|
@@ -119,7 +170,7 @@ export default {
|
|
|
119
170
|
return formattedDate
|
|
120
171
|
},
|
|
121
172
|
// 导出PDF
|
|
122
|
-
exportPDF() {
|
|
173
|
+
exportPDF () {
|
|
123
174
|
const date = this.getDate()
|
|
124
175
|
let title = this.config.title
|
|
125
176
|
title = title.replace(/<[^>]+>/g, '')
|
|
@@ -127,7 +178,7 @@ export default {
|
|
|
127
178
|
HtmlToPdf.getPdf(fileName, '#printReady')
|
|
128
179
|
},
|
|
129
180
|
// 用于分割配置中的colums,将需要处理的数组提取出来
|
|
130
|
-
formatConfigRow() {
|
|
181
|
+
formatConfigRow () {
|
|
131
182
|
for (let i = 0; i < this.config.columns.length; i++) {
|
|
132
183
|
// 对原始数组进行递归,依次将该位置拆分为三个部分,当前处理位置之前的,当前处理位置,当前处理位置之后的
|
|
133
184
|
const before = this.config.columns.slice(0, i)
|
|
@@ -177,7 +228,7 @@ export default {
|
|
|
177
228
|
}
|
|
178
229
|
},
|
|
179
230
|
// 处理colums数组,为声明了rowspan的单元格,自动匹配格式
|
|
180
|
-
checkRow(rowArr) {
|
|
231
|
+
checkRow (rowArr) {
|
|
181
232
|
// 不需要更改的数据
|
|
182
233
|
const original = []
|
|
183
234
|
// 需要更改新加的数据
|
|
@@ -322,7 +373,7 @@ export default {
|
|
|
322
373
|
}
|
|
323
374
|
},
|
|
324
375
|
// 扫描配置,如果有插槽则拼接插槽
|
|
325
|
-
scanConfigSlot(config) {
|
|
376
|
+
scanConfigSlot (config) {
|
|
326
377
|
const columnsArr = config.columns
|
|
327
378
|
for (let i = 0; i < columnsArr.length; i++) {
|
|
328
379
|
for (let j = 0; j < columnsArr[i].length; j++) {
|
|
@@ -383,7 +434,7 @@ export default {
|
|
|
383
434
|
config.slotsDeclare = []
|
|
384
435
|
}
|
|
385
436
|
|
|
386
|
-
config.data = {...config.data, ...this.configFromWeb[targetName].data}
|
|
437
|
+
config.data = { ...config.data, ...this.configFromWeb[targetName].data }
|
|
387
438
|
this.configFromWeb = {}
|
|
388
439
|
}
|
|
389
440
|
}
|
|
@@ -391,7 +442,7 @@ export default {
|
|
|
391
442
|
this.config = config
|
|
392
443
|
},
|
|
393
444
|
// 扫描所有插槽名
|
|
394
|
-
scanConfigName(config, resut) {
|
|
445
|
+
scanConfigName (config, resut) {
|
|
395
446
|
if (config.slotsDeclare) {
|
|
396
447
|
config.slotsDeclare.forEach(name => {
|
|
397
448
|
resut.push(name)
|
|
@@ -399,7 +450,7 @@ export default {
|
|
|
399
450
|
}
|
|
400
451
|
},
|
|
401
452
|
// 获取插槽
|
|
402
|
-
getConfigAndJoin(config, outerLock) {
|
|
453
|
+
getConfigAndJoin (config, outerLock) {
|
|
403
454
|
// 检查主配置插槽声明是否合法
|
|
404
455
|
const check = this.checkSlotDefine(config)
|
|
405
456
|
const waitForDownloadSlotName = []
|
|
@@ -424,7 +475,7 @@ export default {
|
|
|
424
475
|
clearInterval(timer)
|
|
425
476
|
this.scanConfigSlot(config)
|
|
426
477
|
if (config.slotsDeclare.length > 0) {
|
|
427
|
-
const lock = {status: true}
|
|
478
|
+
const lock = { status: true }
|
|
428
479
|
this.getConfigAndJoin(config, lock)
|
|
429
480
|
const innerTimer = setInterval(() => {
|
|
430
481
|
if (!lock.status) {
|
|
@@ -443,8 +494,8 @@ export default {
|
|
|
443
494
|
}
|
|
444
495
|
},
|
|
445
496
|
// 获取配置之后的初始化
|
|
446
|
-
configInit() {
|
|
447
|
-
const lock = {status: true}
|
|
497
|
+
configInit () {
|
|
498
|
+
const lock = { status: true }
|
|
448
499
|
|
|
449
500
|
this.getConfigAndJoin(this.config, lock)
|
|
450
501
|
|
|
@@ -465,13 +516,19 @@ export default {
|
|
|
465
516
|
}, 100)
|
|
466
517
|
}
|
|
467
518
|
},
|
|
468
|
-
beforeMount() {
|
|
519
|
+
beforeMount () {
|
|
469
520
|
if (this.localConfig) {
|
|
470
521
|
this.config = this.localConfig
|
|
522
|
+
if (this.config.data.images === undefined) {
|
|
523
|
+
this.config.data.images = {}
|
|
524
|
+
}
|
|
471
525
|
this.configInit()
|
|
472
526
|
} else {
|
|
473
527
|
getConfigByName(this.configName, 'af-system', res => {
|
|
474
528
|
this.config = res
|
|
529
|
+
if (this.config.data.images === undefined) {
|
|
530
|
+
this.config.data.images = {}
|
|
531
|
+
}
|
|
475
532
|
this.configInit()
|
|
476
533
|
})
|
|
477
534
|
}
|
|
@@ -68,6 +68,15 @@
|
|
|
68
68
|
</template>
|
|
69
69
|
</tbody>
|
|
70
70
|
</table>
|
|
71
|
+
<div v-if="showImages" style="margin-top: 5%; display: flex;margin-bottom: 5%">
|
|
72
|
+
<p>图片:</p>
|
|
73
|
+
<template v-for="(img,imgIndex) in imageList">
|
|
74
|
+
<div :key="imgIndex" style="margin-left: 3%;width: 200px">
|
|
75
|
+
<img :src="img.url" class="img" :alt="img.name"/>
|
|
76
|
+
<p style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 100%;">{{img.name}}</p>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
</div>
|
|
71
80
|
</div>
|
|
72
81
|
</template>
|
|
73
82
|
|
|
@@ -90,6 +99,14 @@ export default {
|
|
|
90
99
|
slotConfigName: {
|
|
91
100
|
type: String,
|
|
92
101
|
default: undefined
|
|
102
|
+
},
|
|
103
|
+
showImages: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: false
|
|
106
|
+
},
|
|
107
|
+
imageList: {
|
|
108
|
+
type: Array,
|
|
109
|
+
default: undefined
|
|
93
110
|
}
|
|
94
111
|
},
|
|
95
112
|
components: {
|
|
@@ -174,6 +191,11 @@ export default {
|
|
|
174
191
|
</script>
|
|
175
192
|
|
|
176
193
|
<style lang="less" scoped>
|
|
194
|
+
.img{
|
|
195
|
+
width: 95%;
|
|
196
|
+
height: 180px;
|
|
197
|
+
object-fit: cover;
|
|
198
|
+
}
|
|
177
199
|
.reportMain {
|
|
178
200
|
text-align: center;
|
|
179
201
|
margin: 0 auto;
|