hd-idevvue3 3.0.3 → 3.0.4
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/dist/assets/index.9c127719.css +1 -0
- package/dist/hd-idevvue3.mjs +3521 -3305
- package/dist/hd-idevvue3.umd.js +29 -29
- package/npminstall-debug.log +2 -10
- package/package.json +3 -1
- package/pnpm-lock.yaml +37 -4
- package/src/App.vue +11 -15
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +9 -10
- package/src/demo/dropdemo.vue +42 -43
- package/src/demo/extsets.vue +140 -39
- package/src/demo/formedit.vue +157 -145
- package/src/demo/hightquery.vue +263 -66
- package/src/demo/inlineedit.vue +129 -35
- package/src/demo/selfdrop.vue +32 -15
- package/src/directive/el-dragDialog/drag.js +13 -13
- package/src/directive/el-dragDialog/index.js +13 -13
- package/src/errorLog.js +3 -3
- package/src/hdcom/BigGrid.js +54 -48
- package/src/hdcom/BillShow.vue +84 -63
- package/src/hdcom/BillUpload.vue +144 -86
- package/src/hdcom/BtnRight.vue +26 -23
- package/src/hdcom/ErrHint.vue +36 -24
- package/src/hdcom/ExtendColumn.vue +97 -90
- package/src/hdcom/ExtendCommon.js +24 -13
- package/src/hdcom/ExtendForm.vue +107 -80
- package/src/hdcom/FacePicUpload.vue +59 -50
- package/src/hdcom/FaceRecTest.vue +87 -77
- package/src/hdcom/GridChart.vue +175 -162
- package/src/hdcom/GridExField.vue +328 -234
- package/src/hdcom/GridShow.vue +89 -39
- package/src/hdcom/HdAside.vue +192 -145
- package/src/hdcom/HdBtn.vue +44 -32
- package/src/hdcom/HdButton.vue +141 -117
- package/src/hdcom/HdComFaceRec.vue +80 -32
- package/src/hdcom/HdComGrid.vue +329 -229
- package/src/hdcom/HdComQuery.vue +179 -90
- package/src/hdcom/HdComQueryDetail.vue +159 -115
- package/src/hdcom/HdComSortDetail.vue +136 -130
- package/src/hdcom/HdDatePicker.vue +32 -16
- package/src/hdcom/HdDialog.vue +62 -44
- package/src/hdcom/HdDrop.vue +163 -138
- package/src/hdcom/HdFileUpload.vue +138 -119
- package/src/hdcom/HdFilterBox.vue +62 -62
- package/src/hdcom/HdFooter.vue +152 -119
- package/src/hdcom/HdForm.vue +276 -203
- package/src/hdcom/HdFormBtn.vue +81 -39
- package/src/hdcom/HdFormItem.vue +14 -10
- package/src/hdcom/HdGrid.vue +353 -156
- package/src/hdcom/HdGridEditBtn.vue +34 -20
- package/src/hdcom/HdGridExt.js +78 -47
- package/src/hdcom/HdGridSel.vue +227 -193
- package/src/hdcom/HdHeader.vue +149 -117
- package/src/hdcom/HdHotKey.vue +70 -67
- package/src/hdcom/HdInputHint.vue +40 -36
- package/src/hdcom/HdMain.vue +25 -27
- package/src/hdcom/HdMessage.vue +180 -171
- package/src/hdcom/HdNum.vue +67 -57
- package/src/hdcom/HdPopSel.vue +46 -24
- package/src/hdcom/HdRightMenu.vue +63 -61
- package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
- package/src/hdcom/HdTableColumn.vue +156 -109
- package/src/hdcom/HdTempSave.vue +138 -116
- package/src/hdcom/HdTree.vue +89 -72
- package/src/hdcom/HdTreeTable/eval.js +8 -3
- package/src/hdcom/HdTreeTable/index.vue +229 -174
- package/src/hdcom/ImportExcel.vue +69 -34
- package/src/hdcom/index.js +39 -44
- package/src/idev.common.js +54 -47
- package/src/index.js +3 -6
- package/src/utils/HdQuery.js +25 -14
- package/src/utils/comutils.js +50 -28
- package/src/utils/gogocodeTransfer.js +59 -0
- package/src/utils/utils.js +30 -19
- package/src/vendor/Blob.js +187 -179
- package/src/vendor/Export2Excel.js +231 -220
- package/src/vendor/Export2Zip.js +25 -22
- package/src/views/layout/AppMain.vue +34 -32
- package/src/views/layout/HdLayout.vue +64 -52
- package/src/views/layout/header/ElasticSearch.vue +196 -159
- package/src/views/layout/header/HZRecorder.js +163 -135
- package/src/views/layout/header/HeaderSearch.vue +165 -145
- package/src/views/layout/header/Levelbar.vue +55 -49
- package/src/views/layout/header/MainHeader.vue +233 -189
- package/src/views/layout/header/Navbar.vue +74 -78
- package/src/views/layout/header/ScrollPane.vue +103 -81
- package/src/views/layout/header/TagsView.vue +169 -164
- package/src/views/layout/header/VocRec.vue +86 -78
- package/src/views/layout/header/changepswform.vue +98 -64
- package/src/views/layout/index.js +5 -7
- package/src/views/layout/menu/Hamburger.vue +63 -45
- package/src/views/layout/menu/HdMenu.vue +155 -118
- package/src/views/layout/menu/index.vue +21 -19
- package/src/views/privilege/commsg/commsg.vue +115 -41
- package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
- package/src/views/privilege/commsg/commsgRole.vue +180 -109
- package/src/views/privilege/commsg/commsgform.vue +125 -101
- package/src/views/privilege/commsg/commsgiframe.vue +30 -23
- package/src/views/privilege/commsg/commsgto.vue +163 -84
- package/src/views/privilege/commsg/commsgtoform.vue +64 -58
- package/src/views/privilege/commsg/commsgtrans.vue +187 -115
- package/src/views/privilege/exfield/comexcolumn.vue +133 -43
- package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
- package/src/views/privilege/exfield/comexfield.vue +15 -17
- package/src/views/privilege/exfield/comexfieldform.vue +71 -53
- package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
- package/src/views/privilege/index.js +19 -20
- package/src/views/privilege/menu/comMenu.vue +49 -41
- package/src/views/privilege/menu/menu.vue +166 -49
- package/src/views/privilege/menu/menuinfo.vue +41 -34
- package/src/views/privilege/menu/rolelist.vue +78 -33
- package/src/views/privilege/menu/userlist.vue +76 -33
- package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
- package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
- package/src/views/privilege/orgDept/authOrgn.vue +157 -65
- package/src/views/privilege/orgDept/authorgnform.vue +50 -38
- package/src/views/privilege/orgDept/orgDept.vue +38 -37
- package/src/views/privilege/orgDept/orgTree.vue +99 -88
- package/src/views/privilege/orgDept/orgnselect.vue +132 -111
- package/src/views/privilege/personDept/authuser.vue +197 -91
- package/src/views/privilege/personDept/authuserform.vue +123 -71
- package/src/views/privilege/personDept/facerec.vue +128 -83
- package/src/views/privilege/personDept/orgncascader.vue +134 -115
- package/src/views/privilege/personDept/personDept.vue +9 -7
- package/src/views/privilege/quartz/comquartzjob.vue +123 -38
- package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
- package/src/views/privilege/quartz/comquartzlog.vue +116 -32
- package/src/views/privilege/role/btnRole.vue +123 -67
- package/src/views/privilege/role/menuRole.vue +65 -45
- package/src/views/privilege/role/orgnRole.vue +63 -41
- package/src/views/privilege/role/role.vue +26 -9
- package/src/views/privilege/role/rolelist.vue +114 -45
- package/src/views/privilege/role/roleselect.vue +34 -17
- package/src/views/privilege/search/comsearch.vue +164 -73
- package/src/views/privilege/search/menu.vue +38 -22
- package/src/views/privilege/syscode/syscode.vue +157 -69
- package/src/views/privilege/syscode/sysfield.vue +96 -43
- package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
- package/src/views/privilege/syslog/menulog.vue +38 -22
- package/src/views/privilege/syslog/syslog.vue +145 -78
- package/src/views/privilege/syslog/syslogconfig.vue +91 -24
- package/src/views/privilege/syslog/syslogform.vue +45 -43
- package/src/views/privilege/syslog/syslogframe.vue +26 -26
- package/src/views/privilege/userRole/userRole.vue +187 -89
- package/vite.config.js +7 -0
- package/dist/assets/index.774ef40e.css +0 -1
- package/src/views/privilege.zip +0 -0
|
@@ -1,70 +1,81 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
|
|
2
|
+
<el-dialog
|
|
3
|
+
title="识别测试"
|
|
4
|
+
:visible.sync="visible"
|
|
5
|
+
append-to-body
|
|
6
|
+
width="90%"
|
|
7
|
+
top="5vh"
|
|
8
|
+
>
|
|
9
|
+
<el-container style="height: 500px">
|
|
4
10
|
<el-aside width="50%">
|
|
5
11
|
<video ref="video" width="400" height="400" autoplay></video>
|
|
6
12
|
</el-aside>
|
|
7
13
|
<el-main>
|
|
8
|
-
<canvas ref=
|
|
9
|
-
<div>{{$t('识别结果') + '(' + $t('耗时') + timeSpend + ')'}}</div>
|
|
10
|
-
<table v-for="tab in recRs" style="border:1px solid #0094ff
|
|
11
|
-
<td>{{$t('name')}}</td>
|
|
12
|
-
<td>{{$t('工号')}}</td>
|
|
13
|
-
<td>{{$t('差值')}}</td>
|
|
14
|
+
<canvas ref="canvas" width="400" height="300"></canvas>
|
|
15
|
+
<div>{{ $t('识别结果') + '(' + $t('耗时') + timeSpend + ')' }}</div>
|
|
16
|
+
<table v-for="tab in recRs" style="border: 1px solid #0094ff">
|
|
17
|
+
<td>{{ $t('name') }}</td>
|
|
18
|
+
<td>{{ $t('工号') }}</td>
|
|
19
|
+
<td>{{ $t('差值') }}</td>
|
|
14
20
|
<tr v-for="intab in tab">
|
|
15
|
-
<td>{{intab.name}}</td>
|
|
16
|
-
<td>{{intab.workNo}}</td>
|
|
17
|
-
<td>{{intab.compareRs}}</td>
|
|
21
|
+
<td>{{ intab.name }}</td>
|
|
22
|
+
<td>{{ intab.workNo }}</td>
|
|
23
|
+
<td>{{ intab.compareRs }}</td>
|
|
18
24
|
</tr>
|
|
19
25
|
</table>
|
|
20
26
|
</el-main>
|
|
21
27
|
</el-container>
|
|
22
28
|
</el-dialog>
|
|
23
29
|
</template>
|
|
24
|
-
<script>
|
|
25
|
-
export default {
|
|
26
|
-
components: {},
|
|
27
|
-
data() {
|
|
28
|
-
return {
|
|
29
|
-
video: null,
|
|
30
|
-
visible: false,
|
|
31
|
-
timeHandle: null,
|
|
32
|
-
recRs: [],
|
|
33
|
-
timeSpend: 0
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
<script>
|
|
32
|
+
export default {
|
|
33
|
+
components: {},
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
video: null,
|
|
37
|
+
visible: false,
|
|
38
|
+
timeHandle: null,
|
|
39
|
+
recRs: [],
|
|
40
|
+
timeSpend: 0,
|
|
41
|
+
}
|
|
42
|
+
},
|
|
38
43
|
|
|
44
|
+
mounted() {},
|
|
45
|
+
methods: {
|
|
46
|
+
show() {
|
|
47
|
+
this.visible = true
|
|
39
48
|
},
|
|
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
|
-
//对其进行base64编 之后的字符串
|
|
66
|
-
|
|
67
|
-
|
|
49
|
+
init() {
|
|
50
|
+
navigator.webkitGetUserMedia(
|
|
51
|
+
{
|
|
52
|
+
video: true,
|
|
53
|
+
},
|
|
54
|
+
this.success,
|
|
55
|
+
this.error
|
|
56
|
+
)
|
|
57
|
+
this.$nextTick(() => {
|
|
58
|
+
this.video = this.$refs.video
|
|
59
|
+
this.capAndReg()
|
|
60
|
+
})
|
|
61
|
+
},
|
|
62
|
+
success(stream) {
|
|
63
|
+
this.video.src = window.URL.createObjectURL(stream)
|
|
64
|
+
this.video.play()
|
|
65
|
+
},
|
|
66
|
+
error(err) {
|
|
67
|
+
alert('video error: ' + err)
|
|
68
|
+
},
|
|
69
|
+
capAndReg() {
|
|
70
|
+
let nowStart = new Date().getTime()
|
|
71
|
+
console.info('shot...')
|
|
72
|
+
this.$refs.canvas.getContext('2d').drawImage(this.video, 0, 0, 400, 300)
|
|
73
|
+
let pic = this.$refs.canvas.toDataURL('image/jpg')
|
|
74
|
+
//对其进行base64编 之后的字符串
|
|
75
|
+
pic = pic.replace(/^data:image\/(png|jpg);base64,/, '')
|
|
76
|
+
this.$http
|
|
77
|
+
.post('/webresources/login/com/ComFaceRec/faceRec', { imageData: pic })
|
|
78
|
+
.then((response) => {
|
|
68
79
|
if (!response.data || !response.data.data) {
|
|
69
80
|
this.recRs = []
|
|
70
81
|
this.capAndReg()
|
|
@@ -72,33 +83,32 @@
|
|
|
72
83
|
}
|
|
73
84
|
console.info(response.data.data)
|
|
74
85
|
this.recRs = response.data.data
|
|
75
|
-
// for (let i = 0; i < data.length; i++) {
|
|
76
|
-
// let onePerReg = []
|
|
77
|
-
// for (let j = 0; j < data[i].length; j++) {
|
|
78
|
-
// let onePer = data[i][j]
|
|
79
|
-
// let one = {name: onePer.name, score: onePer.compareRs, workNo: onePer.workNo}
|
|
80
|
-
// onePerReg.push(one)
|
|
81
|
-
// }
|
|
82
|
-
// this.recRs.push(onePerReg)
|
|
83
|
-
// }
|
|
84
|
-
if (this.visible)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})
|
|
86
|
+
// for (let i = 0; i < data.length; i++) {
|
|
87
|
+
// let onePerReg = []
|
|
88
|
+
// for (let j = 0; j < data[i].length; j++) {
|
|
89
|
+
// let onePer = data[i][j]
|
|
90
|
+
// let one = {name: onePer.name, score: onePer.compareRs, workNo: onePer.workNo}
|
|
91
|
+
// onePerReg.push(one)
|
|
92
|
+
// }
|
|
93
|
+
// this.recRs.push(onePerReg)
|
|
94
|
+
// }
|
|
95
|
+
if (this.visible) this.capAndReg()
|
|
96
|
+
this.timeSpend =
|
|
97
|
+
(new Date().getTime() - nowStart) / 1000 + this.$t('秒')
|
|
98
|
+
})
|
|
99
|
+
.catch(() => {
|
|
88
100
|
this.recRs = []
|
|
89
|
-
if (this.visible)
|
|
90
|
-
this.capAndReg()
|
|
101
|
+
if (this.visible) this.capAndReg()
|
|
91
102
|
})
|
|
92
|
-
|
|
93
|
-
}
|
|
94
103
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
104
|
+
},
|
|
105
|
+
watch: {
|
|
106
|
+
visible(nowVal) {
|
|
107
|
+
if (nowVal) {
|
|
108
|
+
this.init()
|
|
109
|
+
} else {
|
|
101
110
|
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
}
|
|
104
114
|
</script>
|
package/src/hdcom/GridChart.vue
CHANGED
|
@@ -1,194 +1,207 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
<el-dialog
|
|
3
|
+
title="统计展示"
|
|
4
|
+
:visible.sync="visible"
|
|
5
|
+
width="80%"
|
|
6
|
+
append-to-body
|
|
7
|
+
top="2vh"
|
|
8
|
+
>
|
|
9
|
+
{{ $t('展示标签列') }}
|
|
10
|
+
<hd-drop
|
|
11
|
+
style="width: 200px"
|
|
12
|
+
ref="labelDrop"
|
|
13
|
+
v-model="hdQuery.query._chartLabel"
|
|
14
|
+
></hd-drop>
|
|
15
|
+
<span
|
|
16
|
+
>{{ $t('对应的值列') }}
|
|
17
|
+
<hd-drop
|
|
18
|
+
style="width: 200px"
|
|
19
|
+
ref="valDrop"
|
|
20
|
+
v-model="hdQuery.query._chartValue"
|
|
21
|
+
></hd-drop>
|
|
7
22
|
</span>
|
|
8
|
-
<el-button @click="doQuery">{{$t('统计')}}</el-button>
|
|
23
|
+
<el-button @click="doQuery">{{ $t('统计') }}</el-button>
|
|
9
24
|
<el-row>
|
|
10
25
|
<el-col :span="12">
|
|
11
|
-
<div ref="mychart" style="height:60vh"></div>
|
|
26
|
+
<div ref="mychart" style="height: 60vh"></div>
|
|
12
27
|
</el-col>
|
|
13
28
|
<el-col :span="12">
|
|
14
|
-
<div ref="mychart2" style="height:60vh"></div>
|
|
29
|
+
<div ref="mychart2" style="height: 60vh"></div>
|
|
15
30
|
</el-col>
|
|
16
31
|
<el-col :span="12">
|
|
17
|
-
<div ref="mychart3" style="height:60vh"></div>
|
|
32
|
+
<div ref="mychart3" style="height: 60vh"></div>
|
|
18
33
|
</el-col>
|
|
19
34
|
<el-col :span="12">
|
|
20
|
-
<div ref="mychart4" style="height:60vh"></div>
|
|
35
|
+
<div ref="mychart4" style="height: 60vh"></div>
|
|
21
36
|
</el-col>
|
|
22
37
|
</el-row>
|
|
23
38
|
</el-dialog>
|
|
24
39
|
</template>
|
|
25
40
|
|
|
26
41
|
<script>
|
|
27
|
-
|
|
42
|
+
import HdDrop from './HdDrop.vue'
|
|
28
43
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
export default {
|
|
45
|
+
components: {
|
|
46
|
+
HdDrop,
|
|
47
|
+
},
|
|
48
|
+
name: 'GridChart',
|
|
49
|
+
props: ['allColumn', 'url', 'hdQuery'],
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
visible: false,
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
mounted() {},
|
|
56
|
+
methods: {
|
|
57
|
+
show() {
|
|
58
|
+
this.visible = true
|
|
59
|
+
this.genDrop()
|
|
32
60
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
61
|
+
genDrop() {
|
|
62
|
+
let labelDrop = []
|
|
63
|
+
let numDrop = [{ name: this.$t('只统计数量'), code: '_chartNumOnly' }]
|
|
64
|
+
for (let i = 0; i < this.allColumn.length; i++) {
|
|
65
|
+
let oneCol = this.allColumn[i]
|
|
66
|
+
let one = { name: oneCol.$attrs.label, code: oneCol.$attrs.prop }
|
|
67
|
+
labelDrop.push(one)
|
|
68
|
+
if (oneCol.$attrs.chartNum != undefined) {
|
|
69
|
+
numDrop.push(one)
|
|
70
|
+
}
|
|
38
71
|
}
|
|
72
|
+
this.$nextTick(function () {
|
|
73
|
+
//hddrop 为了查询和展示不同,增加了backUpArr
|
|
74
|
+
this.$refs.labelDrop.options = labelDrop
|
|
75
|
+
this.$refs.labelDrop.backUpArr = labelDrop
|
|
76
|
+
this.$refs.valDrop.options = numDrop
|
|
77
|
+
this.$refs.valDrop.backUpArr = numDrop
|
|
78
|
+
})
|
|
39
79
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
genDrop() {
|
|
50
|
-
let labelDrop = []
|
|
51
|
-
let numDrop = [{name: this.$t('只统计数量'), code: '_chartNumOnly'}]
|
|
52
|
-
for (let i = 0; i < this.allColumn.length; i++) {
|
|
53
|
-
let oneCol = this.allColumn[i]
|
|
54
|
-
let one = {name: oneCol.$attrs.label, code: oneCol.$attrs.prop}
|
|
55
|
-
labelDrop.push(one)
|
|
56
|
-
if (oneCol.$attrs.chartNum != undefined) {
|
|
57
|
-
numDrop.push(one)
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
this.$nextTick(function () {//hddrop 为了查询和展示不同,增加了backUpArr
|
|
61
|
-
this.$refs.labelDrop.options = labelDrop
|
|
62
|
-
this.$refs.labelDrop.backUpArr = labelDrop
|
|
63
|
-
this.$refs.valDrop.options = numDrop
|
|
64
|
-
this.$refs.valDrop.backUpArr = numDrop
|
|
80
|
+
doQuery() {
|
|
81
|
+
if (!this.hdQuery.query._chartLabel || !this.hdQuery.query._chartValue) {
|
|
82
|
+
this.$message({
|
|
83
|
+
type: 'error',
|
|
84
|
+
showClose: true,
|
|
85
|
+
duration: 1500,
|
|
86
|
+
message: '请选择统计的标签和值',
|
|
65
87
|
})
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
return false
|
|
89
|
+
}
|
|
90
|
+
const copyQuery = new HdQuery(this)
|
|
91
|
+
Object.assign(copyQuery, this.hdQuery)
|
|
92
|
+
copyQuery.rows = null //去掉分页
|
|
93
|
+
copyQuery.sort = null //去掉排序
|
|
94
|
+
this.$http.post(this.url, copyQuery).then((response) => {
|
|
95
|
+
let allLabel = []
|
|
96
|
+
let allVal = []
|
|
97
|
+
let hdResult = response.data
|
|
98
|
+
for (let i = 0; i < hdResult.length; i++) {
|
|
99
|
+
allLabel.push(hdResult[i].name)
|
|
100
|
+
allVal.push(hdResult[i].value)
|
|
76
101
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
initChart(allLabel, allVal) {
|
|
96
|
-
let chart = echarts.init(this.$refs.mychart)
|
|
97
|
-
let option = {
|
|
98
|
-
xAxis: {
|
|
99
|
-
type: 'category',
|
|
100
|
-
data: allLabel
|
|
101
|
-
},
|
|
102
|
-
yAxis: {
|
|
103
|
-
type: 'value'
|
|
104
|
-
},
|
|
105
|
-
series: [{
|
|
102
|
+
this.initChart(allLabel, allVal)
|
|
103
|
+
this.initPip(allLabel, hdResult)
|
|
104
|
+
this.initBar(allLabel, allVal)
|
|
105
|
+
this.initCircle(allLabel, hdResult)
|
|
106
|
+
})
|
|
107
|
+
},
|
|
108
|
+
initChart(allLabel, allVal) {
|
|
109
|
+
let chart = echarts.init(this.$refs.mychart)
|
|
110
|
+
let option = {
|
|
111
|
+
xAxis: {
|
|
112
|
+
type: 'category',
|
|
113
|
+
data: allLabel,
|
|
114
|
+
},
|
|
115
|
+
yAxis: {
|
|
116
|
+
type: 'value',
|
|
117
|
+
},
|
|
118
|
+
series: [
|
|
119
|
+
{
|
|
106
120
|
data: allVal,
|
|
107
|
-
type: 'line'
|
|
108
|
-
}]
|
|
109
|
-
};
|
|
110
|
-
chart.setOption(option)
|
|
111
|
-
},
|
|
112
|
-
initPip(allLabel, hdResult) {
|
|
113
|
-
let pip = echarts.init(this.$refs.mychart2)
|
|
114
|
-
let option = {
|
|
115
|
-
legend: {
|
|
116
|
-
bottom: 0,
|
|
117
|
-
data: allLabel
|
|
121
|
+
type: 'line',
|
|
118
122
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
data:
|
|
135
|
-
},
|
|
136
|
-
yAxis: {
|
|
137
|
-
type: 'value'
|
|
123
|
+
],
|
|
124
|
+
}
|
|
125
|
+
chart.setOption(option)
|
|
126
|
+
},
|
|
127
|
+
initPip(allLabel, hdResult) {
|
|
128
|
+
let pip = echarts.init(this.$refs.mychart2)
|
|
129
|
+
let option = {
|
|
130
|
+
legend: {
|
|
131
|
+
bottom: 0,
|
|
132
|
+
data: allLabel,
|
|
133
|
+
},
|
|
134
|
+
series: [
|
|
135
|
+
{
|
|
136
|
+
type: 'pie',
|
|
137
|
+
selectedMode: 'single',
|
|
138
|
+
data: hdResult,
|
|
138
139
|
},
|
|
139
|
-
|
|
140
|
+
],
|
|
141
|
+
}
|
|
142
|
+
pip.setOption(option)
|
|
143
|
+
},
|
|
144
|
+
initBar(allLabel, allVal) {
|
|
145
|
+
let chart = echarts.init(this.$refs.mychart3)
|
|
146
|
+
let option = {
|
|
147
|
+
xAxis: {
|
|
148
|
+
type: 'category',
|
|
149
|
+
data: allLabel,
|
|
150
|
+
},
|
|
151
|
+
yAxis: {
|
|
152
|
+
type: 'value',
|
|
153
|
+
},
|
|
154
|
+
series: [
|
|
155
|
+
{
|
|
140
156
|
data: allVal,
|
|
141
|
-
type: 'bar'
|
|
142
|
-
}]
|
|
143
|
-
};
|
|
144
|
-
chart.setOption(option)
|
|
145
|
-
},
|
|
146
|
-
initCircle(allLabel, allVal) {
|
|
147
|
-
let chart = echarts.init(this.$refs.mychart4)
|
|
148
|
-
let option = {
|
|
149
|
-
tooltip: {
|
|
150
|
-
trigger: 'item',
|
|
151
|
-
formatter: "{a} <br/>{b}: {c} ({d}%)"
|
|
157
|
+
type: 'bar',
|
|
152
158
|
},
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
],
|
|
160
|
+
}
|
|
161
|
+
chart.setOption(option)
|
|
162
|
+
},
|
|
163
|
+
initCircle(allLabel, allVal) {
|
|
164
|
+
let chart = echarts.init(this.$refs.mychart4)
|
|
165
|
+
let option = {
|
|
166
|
+
tooltip: {
|
|
167
|
+
trigger: 'item',
|
|
168
|
+
formatter: '{a} <br/>{b}: {c} ({d}%)',
|
|
169
|
+
},
|
|
170
|
+
legend: {
|
|
171
|
+
orient: 'vertical',
|
|
172
|
+
x: 'left',
|
|
173
|
+
data: allLabel,
|
|
174
|
+
},
|
|
175
|
+
series: [
|
|
176
|
+
{
|
|
177
|
+
type: 'pie',
|
|
178
|
+
radius: ['50%', '70%'],
|
|
179
|
+
avoidLabelOverlap: false,
|
|
180
|
+
label: {
|
|
181
|
+
normal: {
|
|
182
|
+
show: false,
|
|
183
|
+
position: 'center',
|
|
184
|
+
},
|
|
185
|
+
emphasis: {
|
|
186
|
+
show: true,
|
|
187
|
+
textStyle: {
|
|
188
|
+
fontSize: '30',
|
|
189
|
+
fontWeight: 'bold',
|
|
167
190
|
},
|
|
168
|
-
emphasis: {
|
|
169
|
-
show: true,
|
|
170
|
-
textStyle: {
|
|
171
|
-
fontSize: '30',
|
|
172
|
-
fontWeight: 'bold'
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
191
|
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
192
|
+
},
|
|
193
|
+
labelLine: {
|
|
194
|
+
normal: {
|
|
195
|
+
show: false,
|
|
180
196
|
},
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
chart.setOption(option)
|
|
197
|
+
},
|
|
198
|
+
data: allVal,
|
|
199
|
+
},
|
|
200
|
+
],
|
|
187
201
|
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
</script>
|
|
191
202
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
203
|
+
chart.setOption(option)
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
}
|
|
207
|
+
</script>
|