hd-idevvue3 3.0.7 → 3.0.9
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/{static/js/index-DbUA6jg0.js → index.js} +1 -1
- package/package.json +7 -2
- package/.env.development +0 -5
- package/.env.production +0 -5
- package/.eslintrc.js +0 -151
- package/dist/static/js/index-Dl4O91nB.js +0 -73768
- package/index.html +0 -18
- package/pnpm-lock.yaml +0 -3541
- package/src/App.vue +0 -11
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +0 -42
- package/src/demo/dropdemo.vue +0 -42
- package/src/demo/extsets.vue +0 -208
- package/src/demo/formedit.vue +0 -157
- package/src/demo/hightquery.vue +0 -366
- package/src/demo/inlineedit.vue +0 -182
- package/src/demo/selfdrop.vue +0 -58
- package/src/demo//350/241/214/345/206/205/347/272/247/350/201/224.txt +0 -2
- package/src/directive/el-dragDialog/drag.js +0 -124
- package/src/directive/el-dragDialog/index.js +0 -13
- package/src/errorLog.js +0 -16
- package/src/hdcom/BigGrid.js +0 -179
- package/src/hdcom/BillShow.vue +0 -111
- package/src/hdcom/BillUpload.vue +0 -311
- package/src/hdcom/BtnRight.vue +0 -101
- package/src/hdcom/ErrHint.vue +0 -42
- package/src/hdcom/ExtendColumn.vue +0 -115
- package/src/hdcom/ExtendCommon.js +0 -40
- package/src/hdcom/ExtendForm.vue +0 -141
- package/src/hdcom/FacePicUpload.vue +0 -80
- package/src/hdcom/FaceRecTest.vue +0 -114
- package/src/hdcom/GridChart.vue +0 -207
- package/src/hdcom/GridExField.vue +0 -375
- package/src/hdcom/GridShow.vue +0 -288
- package/src/hdcom/HdAside.vue +0 -225
- package/src/hdcom/HdBtn.vue +0 -125
- package/src/hdcom/HdButton.vue +0 -161
- package/src/hdcom/HdComFaceRec.vue +0 -106
- package/src/hdcom/HdComGrid.vue +0 -876
- package/src/hdcom/HdComQuery.vue +0 -362
- package/src/hdcom/HdComQueryDetail.vue +0 -205
- package/src/hdcom/HdComSortDetail.vue +0 -161
- package/src/hdcom/HdDatePicker.vue +0 -94
- package/src/hdcom/HdDialog.vue +0 -81
- package/src/hdcom/HdDrop.vue +0 -188
- package/src/hdcom/HdFileUpload.vue +0 -167
- package/src/hdcom/HdFilterBox.vue +0 -90
- package/src/hdcom/HdFooter.vue +0 -182
- package/src/hdcom/HdForm.vue +0 -351
- package/src/hdcom/HdFormBtn.vue +0 -131
- package/src/hdcom/HdFormItem.vue +0 -39
- package/src/hdcom/HdGctosGrid +0 -0
- package/src/hdcom/HdGrid.vue +0 -1022
- package/src/hdcom/HdGridEditBtn.vue +0 -58
- package/src/hdcom/HdGridExt.js +0 -250
- package/src/hdcom/HdGridSel.vue +0 -257
- package/src/hdcom/HdHeader.vue +0 -180
- package/src/hdcom/HdHotKey.vue +0 -84
- package/src/hdcom/HdInputHint.vue +0 -53
- package/src/hdcom/HdMain.vue +0 -41
- package/src/hdcom/HdMessage.vue +0 -201
- package/src/hdcom/HdNum.vue +0 -79
- package/src/hdcom/HdPopSel.vue +0 -80
- package/src/hdcom/HdRightMenu.vue +0 -63
- package/src/hdcom/HdSel/SelGridFieldcod.vue +0 -54
- package/src/hdcom/HdTableColumn.vue +0 -381
- package/src/hdcom/HdTempSave.vue +0 -162
- package/src/hdcom/HdTree.vue +0 -103
- package/src/hdcom/HdTreeTable/eval.js +0 -39
- package/src/hdcom/HdTreeTable/index.vue +0 -229
- package/src/hdcom/ImportExcel.vue +0 -178
- package/src/hdcom/index.js +0 -75
- package/src/idev.common.js +0 -79
- package/src/index.js +0 -11
- package/src/utils/HdQuery.js +0 -65
- package/src/utils/comutils.js +0 -120
- package/src/utils/gogocodeTransfer.js +0 -59
- package/src/utils/utils.js +0 -116
- package/src/vendor/Blob.js +0 -187
- package/src/vendor/Export2Excel.js +0 -231
- package/src/vendor/Export2Zip.js +0 -25
- package/src/views/layout/AppMain.vue +0 -34
- package/src/views/layout/HdLayout.vue +0 -90
- package/src/views/layout/header/ElasticSearch.vue +0 -262
- package/src/views/layout/header/HZRecorder.js +0 -259
- package/src/views/layout/header/HeaderSearch.vue +0 -218
- package/src/views/layout/header/Levelbar.vue +0 -55
- package/src/views/layout/header/MainHeader.vue +0 -315
- package/src/views/layout/header/Navbar.vue +0 -101
- package/src/views/layout/header/ScrollPane.vue +0 -103
- package/src/views/layout/header/TagsView.vue +0 -215
- package/src/views/layout/header/VocRec.vue +0 -105
- package/src/views/layout/header/changepswform.vue +0 -130
- package/src/views/layout/index.js +0 -10
- package/src/views/layout/menu/Hamburger.vue +0 -63
- package/src/views/layout/menu/HdMenu.vue +0 -204
- package/src/views/layout/menu/css/menu.css +0 -288
- package/src/views/layout/menu/index.vue +0 -27
- package/src/views/privilege/commsg/commsg.vue +0 -152
- package/src/views/privilege/commsg/commsgOrgn.vue +0 -51
- package/src/views/privilege/commsg/commsgRole.vue +0 -220
- package/src/views/privilege/commsg/commsgform.vue +0 -184
- package/src/views/privilege/commsg/commsgiframe.vue +0 -40
- package/src/views/privilege/commsg/commsgto.vue +0 -199
- package/src/views/privilege/commsg/commsgtoform.vue +0 -114
- package/src/views/privilege/commsg/commsgtrans.vue +0 -227
- package/src/views/privilege/exfield/comexcolumn.vue +0 -161
- package/src/views/privilege/exfield/comexcolumnform.vue +0 -128
- package/src/views/privilege/exfield/comexfield.vue +0 -29
- package/src/views/privilege/exfield/comexfieldform.vue +0 -112
- package/src/views/privilege/exfield/comexfieldsub.vue +0 -163
- package/src/views/privilege/index.js +0 -41
- package/src/views/privilege/menu/comMenu.vue +0 -49
- package/src/views/privilege/menu/menu.vue +0 -250
- package/src/views/privilege/menu/menuinfo.vue +0 -63
- package/src/views/privilege/menu/rolelist.vue +0 -92
- package/src/views/privilege/menu/userlist.vue +0 -92
- package/src/views/privilege/mobile/authmobileupdate.vue +0 -145
- package/src/views/privilege/mobile/authmobileupdateform.vue +0 -120
- package/src/views/privilege/orgDept/authOrgn.vue +0 -188
- package/src/views/privilege/orgDept/authorgnform.vue +0 -157
- package/src/views/privilege/orgDept/orgDept.vue +0 -38
- package/src/views/privilege/orgDept/orgTree.vue +0 -99
- package/src/views/privilege/orgDept/orgnselect.vue +0 -155
- package/src/views/privilege/personDept/authuser.vue +0 -229
- package/src/views/privilege/personDept/authuserform.vue +0 -206
- package/src/views/privilege/personDept/facerec.vue +0 -162
- package/src/views/privilege/personDept/orgncascader.vue +0 -144
- package/src/views/privilege/personDept/personDept.vue +0 -33
- package/src/views/privilege/quartz/comquartzjob.vue +0 -150
- package/src/views/privilege/quartz/comquartzjobform.vue +0 -115
- package/src/views/privilege/quartz/comquartzlog.vue +0 -143
- package/src/views/privilege/role/btnRole.vue +0 -173
- package/src/views/privilege/role/menuRole.vue +0 -84
- package/src/views/privilege/role/orgnRole.vue +0 -78
- package/src/views/privilege/role/role.vue +0 -84
- package/src/views/privilege/role/rolelist.vue +0 -136
- package/src/views/privilege/role/roleselect.vue +0 -74
- package/src/views/privilege/search/comsearch.vue +0 -196
- package/src/views/privilege/search/menu.vue +0 -68
- package/src/views/privilege/syscode/syscode.vue +0 -191
- package/src/views/privilege/syscode/sysfield.vue +0 -119
- package/src/views/privilege/syscode/sysfieldframe.vue +0 -30
- package/src/views/privilege/syslog/menulog.vue +0 -68
- package/src/views/privilege/syslog/syslog.vue +0 -182
- package/src/views/privilege/syslog/syslogconfig.vue +0 -128
- package/src/views/privilege/syslog/syslogform.vue +0 -85
- package/src/views/privilege/syslog/syslogframe.vue +0 -26
- package/src/views/privilege/userRole/userRole.vue +0 -220
- package/vite.config.js +0 -124
- /package/dist/{static/css/index-DRHIlcVU.css → index.css} +0 -0
package/src/hdcom/ExtendForm.vue
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-row>
|
|
3
|
-
<el-divider content-position="left">自定义扩展字段</el-divider>
|
|
4
|
-
<!-- <el-col :span="12" :xs="16">
|
|
5
|
-
<el-form-item :rules="$r(1,2,20)" label="姓名" prop="name">
|
|
6
|
-
<el-input type="text" v-model="hdform.name"></el-input>
|
|
7
|
-
</el-form-item>
|
|
8
|
-
</el-col>-->
|
|
9
|
-
|
|
10
|
-
<el-col
|
|
11
|
-
v-for="exField in exFieldRows"
|
|
12
|
-
:key="exField.exFieldId"
|
|
13
|
-
:span="exField.formSpan"
|
|
14
|
-
:xs="24"
|
|
15
|
-
>
|
|
16
|
-
<el-form-item
|
|
17
|
-
:rules="genRules(exField)"
|
|
18
|
-
:label="exField.columnComment"
|
|
19
|
-
:prop="exField.fieldName"
|
|
20
|
-
>
|
|
21
|
-
<template v-if="exField.columnType == 'VARCHAR'">
|
|
22
|
-
<el-input
|
|
23
|
-
type="text"
|
|
24
|
-
v-model="hdform[exField.fieldName]"
|
|
25
|
-
@change="(v) => changeValue(v, exField.fieldName)"
|
|
26
|
-
></el-input>
|
|
27
|
-
</template>
|
|
28
|
-
<template v-else-if="exField.columnType == 'DROP'">
|
|
29
|
-
<hd-drop
|
|
30
|
-
:field="exField.formatter"
|
|
31
|
-
v-model="hdform[exField.fieldName]"
|
|
32
|
-
></hd-drop>
|
|
33
|
-
</template>
|
|
34
|
-
<template v-else-if="exField.columnType == 'DATE'">
|
|
35
|
-
<el-date-picker
|
|
36
|
-
v-bind="genFormatter(exField.formatter)"
|
|
37
|
-
v-model="hdform[exField.fieldName]"
|
|
38
|
-
></el-date-picker>
|
|
39
|
-
</template>
|
|
40
|
-
<template v-else-if="exField.columnType == 'NUMBER'">
|
|
41
|
-
<hd-num v-model="hdform[exField.fieldName]"></hd-num>
|
|
42
|
-
</template>
|
|
43
|
-
<template v-else-if="exField.columnType == 'BOOLEAN'">
|
|
44
|
-
<el-switch
|
|
45
|
-
active-value="1"
|
|
46
|
-
inactive-value="0"
|
|
47
|
-
v-model="hdform[exField.fieldName]"
|
|
48
|
-
></el-switch>
|
|
49
|
-
</template>
|
|
50
|
-
<!-- <template v-else-if="exField.columnType == 'CUSTOME'">
|
|
51
|
-
<component :is="require('@/views/comgctos/'+item.input).default" :txtVal.sync="scope.row.fieldNames[item.prop]" :idVal.sync="scope.row.fields[item.prop]" v-if="scope.row.isEdit&&item.type=='3'"></component>
|
|
52
|
-
</template>-->
|
|
53
|
-
<template v-else>
|
|
54
|
-
<el-input
|
|
55
|
-
type="text"
|
|
56
|
-
v-model="hdform[exField.fieldName]"
|
|
57
|
-
@change="(v) => changeValue(v, exField.fieldName)"
|
|
58
|
-
></el-input>
|
|
59
|
-
</template>
|
|
60
|
-
</el-form-item>
|
|
61
|
-
</el-col>
|
|
62
|
-
</el-row>
|
|
63
|
-
<!-- <el-col :span="12" :xs="16">
|
|
64
|
-
<el-form-item :rules="$r(1,2,20)" label="姓名" prop="name">
|
|
65
|
-
<el-input type="text" v-model="hdform.name"></el-input>
|
|
66
|
-
</el-form-item>
|
|
67
|
-
</el-col>-->
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<script>
|
|
71
|
-
import ExtendCommon from './ExtendCommon'
|
|
72
|
-
|
|
73
|
-
export default {
|
|
74
|
-
name: 'ExtendForm',
|
|
75
|
-
components: {},
|
|
76
|
-
/**
|
|
77
|
-
* Props
|
|
78
|
-
* @prop {String} tableName 表名
|
|
79
|
-
*/
|
|
80
|
-
mixins: [ExtendCommon],
|
|
81
|
-
props: {
|
|
82
|
-
gridCode: String,
|
|
83
|
-
hdformThis: Function,
|
|
84
|
-
},
|
|
85
|
-
data() {
|
|
86
|
-
return {
|
|
87
|
-
exFieldRows: [],
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
mounted() {
|
|
91
|
-
this.initExFieldRows()
|
|
92
|
-
},
|
|
93
|
-
methods: {
|
|
94
|
-
initExFieldRows() {
|
|
95
|
-
let hdFielddQuery = new HdQuery(this)
|
|
96
|
-
hdFielddQuery.query.gridCode = this.gridCode
|
|
97
|
-
hdFielddQuery.sort = 'sortNo'
|
|
98
|
-
hdFielddQuery.order = 'asc'
|
|
99
|
-
this.$http
|
|
100
|
-
.post(`/webresources/login/tech/ComExField/detail/find`, hdFielddQuery)
|
|
101
|
-
.then((response) => {
|
|
102
|
-
this.exFieldRows = response.data.rows
|
|
103
|
-
this.exFieldRows.forEach((row) => {
|
|
104
|
-
row.fieldName = row.columnName
|
|
105
|
-
.toLowerCase()
|
|
106
|
-
.replace(/\_+[a-zA-Z]/g, (str, index) =>
|
|
107
|
-
index ? str.substr(-1).toUpperCase() : str
|
|
108
|
-
)
|
|
109
|
-
})
|
|
110
|
-
})
|
|
111
|
-
},
|
|
112
|
-
changeValue(value, field) {
|
|
113
|
-
this.$set(this.getHdForm().hdform, field, value)
|
|
114
|
-
},
|
|
115
|
-
getHdForm() {
|
|
116
|
-
let par = this.$parent
|
|
117
|
-
while (par) {
|
|
118
|
-
if (par.hasOwnProperty('hdform')) {
|
|
119
|
-
return par
|
|
120
|
-
}
|
|
121
|
-
par = par.$parent
|
|
122
|
-
}
|
|
123
|
-
return null
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
computed: {
|
|
127
|
-
hdform: {
|
|
128
|
-
// 动态计算selVal的值
|
|
129
|
-
get: function () {
|
|
130
|
-
return this.getHdForm().hdform || {}
|
|
131
|
-
},
|
|
132
|
-
set: function (val) {
|
|
133
|
-
//v-model input
|
|
134
|
-
if (val) {
|
|
135
|
-
this.getHdForm().hdform = val
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
}
|
|
141
|
-
</script>
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
title="文件上传"
|
|
4
|
-
:visible.sync="visible"
|
|
5
|
-
append-to-body
|
|
6
|
-
width="450px"
|
|
7
|
-
>
|
|
8
|
-
<el-upload
|
|
9
|
-
style="min-height: 300px; width: 400px"
|
|
10
|
-
ref="upload"
|
|
11
|
-
:action="upUrl"
|
|
12
|
-
:on-preview="handlePreview"
|
|
13
|
-
:on-remove="handleRemove"
|
|
14
|
-
:on-success="onUpSuccess"
|
|
15
|
-
:before-remove="beforeRemove"
|
|
16
|
-
:file-list="fileList"
|
|
17
|
-
multiple
|
|
18
|
-
:auto-upload="false"
|
|
19
|
-
>
|
|
20
|
-
<el-button slot="trigger" type="primary" v-if="canEdit">{{
|
|
21
|
-
$t('选取文件')
|
|
22
|
-
}}</el-button>
|
|
23
|
-
<el-button
|
|
24
|
-
style="margin-left: 10px"
|
|
25
|
-
type="success"
|
|
26
|
-
@click="submitUpload"
|
|
27
|
-
v-if="canEdit"
|
|
28
|
-
>{{ $t('上传到服务器') }}</el-button
|
|
29
|
-
>
|
|
30
|
-
|
|
31
|
-
<div slot="tip" class="el-upload__tip"></div>
|
|
32
|
-
</el-upload>
|
|
33
|
-
</el-dialog>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script>
|
|
37
|
-
/**
|
|
38
|
-
* 文件上传 包括上传和下载后台idev8入口为comfileupload
|
|
39
|
-
* @module HdFileUpload
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
export default {
|
|
43
|
-
components: {},
|
|
44
|
-
name: 'FacePicUpload',
|
|
45
|
-
data() {
|
|
46
|
-
return {
|
|
47
|
-
upUrl: '/webresources/login/com/ComFaceRec/upload',
|
|
48
|
-
visible: false,
|
|
49
|
-
fileDownVisible: false,
|
|
50
|
-
fileList: [],
|
|
51
|
-
entityId: '',
|
|
52
|
-
entityName: '',
|
|
53
|
-
canEdit: true,
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
mounted() {},
|
|
57
|
-
methods: {
|
|
58
|
-
/**
|
|
59
|
-
* @method open
|
|
60
|
-
* @param entityName 区分名
|
|
61
|
-
* @param entityId 区分id
|
|
62
|
-
* @param canEdit 是否可编辑
|
|
63
|
-
*/
|
|
64
|
-
show() {
|
|
65
|
-
this.visible = true
|
|
66
|
-
},
|
|
67
|
-
submitUpload() {
|
|
68
|
-
this.$refs.upload.submit()
|
|
69
|
-
},
|
|
70
|
-
onUpSuccess(response, file, fileList) {
|
|
71
|
-
file.uploadId = response.message
|
|
72
|
-
},
|
|
73
|
-
beforeRemove(file, fileList) {},
|
|
74
|
-
handleRemove(file, fileList) {},
|
|
75
|
-
handlePreview(file) {
|
|
76
|
-
return false
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
<template>
|
|
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">
|
|
10
|
-
<el-aside width="50%">
|
|
11
|
-
<video ref="video" width="400" height="400" autoplay></video>
|
|
12
|
-
</el-aside>
|
|
13
|
-
<el-main>
|
|
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>
|
|
20
|
-
<tr v-for="intab in tab">
|
|
21
|
-
<td>{{ intab.name }}</td>
|
|
22
|
-
<td>{{ intab.workNo }}</td>
|
|
23
|
-
<td>{{ intab.compareRs }}</td>
|
|
24
|
-
</tr>
|
|
25
|
-
</table>
|
|
26
|
-
</el-main>
|
|
27
|
-
</el-container>
|
|
28
|
-
</el-dialog>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
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
|
-
},
|
|
43
|
-
|
|
44
|
-
mounted() {},
|
|
45
|
-
methods: {
|
|
46
|
-
show() {
|
|
47
|
-
this.visible = true
|
|
48
|
-
},
|
|
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) => {
|
|
79
|
-
if (!response.data || !response.data.data) {
|
|
80
|
-
this.recRs = []
|
|
81
|
-
this.capAndReg()
|
|
82
|
-
return false
|
|
83
|
-
}
|
|
84
|
-
console.info(response.data.data)
|
|
85
|
-
this.recRs = response.data.data
|
|
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(() => {
|
|
100
|
-
this.recRs = []
|
|
101
|
-
if (this.visible) this.capAndReg()
|
|
102
|
-
})
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
watch: {
|
|
106
|
-
visible(nowVal) {
|
|
107
|
-
if (nowVal) {
|
|
108
|
-
this.init()
|
|
109
|
-
} else {
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
}
|
|
114
|
-
</script>
|
package/src/hdcom/GridChart.vue
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
<template>
|
|
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>
|
|
22
|
-
</span>
|
|
23
|
-
<el-button @click="doQuery">{{ $t('统计') }}</el-button>
|
|
24
|
-
<el-row>
|
|
25
|
-
<el-col :span="12">
|
|
26
|
-
<div ref="mychart" style="height: 60vh"></div>
|
|
27
|
-
</el-col>
|
|
28
|
-
<el-col :span="12">
|
|
29
|
-
<div ref="mychart2" style="height: 60vh"></div>
|
|
30
|
-
</el-col>
|
|
31
|
-
<el-col :span="12">
|
|
32
|
-
<div ref="mychart3" style="height: 60vh"></div>
|
|
33
|
-
</el-col>
|
|
34
|
-
<el-col :span="12">
|
|
35
|
-
<div ref="mychart4" style="height: 60vh"></div>
|
|
36
|
-
</el-col>
|
|
37
|
-
</el-row>
|
|
38
|
-
</el-dialog>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script>
|
|
42
|
-
import HdDrop from './HdDrop.vue'
|
|
43
|
-
|
|
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()
|
|
60
|
-
},
|
|
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
|
-
}
|
|
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
|
-
})
|
|
79
|
-
},
|
|
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: '请选择统计的标签和值',
|
|
87
|
-
})
|
|
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)
|
|
101
|
-
}
|
|
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
|
-
{
|
|
120
|
-
data: allVal,
|
|
121
|
-
type: 'line',
|
|
122
|
-
},
|
|
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,
|
|
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
|
-
{
|
|
156
|
-
data: allVal,
|
|
157
|
-
type: 'bar',
|
|
158
|
-
},
|
|
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',
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
labelLine: {
|
|
194
|
-
normal: {
|
|
195
|
-
show: false,
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
data: allVal,
|
|
199
|
-
},
|
|
200
|
-
],
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
chart.setOption(option)
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
}
|
|
207
|
-
</script>
|