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