hd-idevvue3 3.0.0 → 3.0.1
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/README.md +22 -191
- package/dist/index.html +17 -0
- package/package.json +13 -9
- package/pnpm-lock.yaml +5593 -0
- package/src/App.vue +15 -0
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +43 -0
- package/src/demo/dropdemo.vue +43 -0
- package/src/demo/extsets.vue +107 -0
- package/src/demo/formedit.vue +145 -0
- package/src/demo/hightquery.vue +169 -0
- package/src/demo/inlineedit.vue +88 -0
- package/src/demo/selfdrop.vue +41 -0
- package/src/demo//350/241/214/345/206/205/347/272/247/350/201/224.txt +2 -0
- package/src/directive/el-dragDialog/drag.js +124 -0
- package/src/directive/el-dragDialog/index.js +13 -0
- package/src/errorLog.js +14 -0
- package/src/hdcom/BigGrid.js +173 -0
- package/src/hdcom/BillShow.vue +90 -0
- package/src/hdcom/BillUpload.vue +253 -0
- package/src/hdcom/BtnRight.vue +98 -0
- package/src/hdcom/ErrHint.vue +30 -0
- package/src/hdcom/ExtendColumn.vue +108 -0
- package/src/hdcom/ExtendCommon.js +29 -0
- package/src/hdcom/ExtendForm.vue +114 -0
- package/src/hdcom/FacePicUpload.vue +71 -0
- package/src/hdcom/FaceRecTest.vue +104 -0
- package/src/hdcom/GridChart.vue +194 -0
- package/src/hdcom/GridExField.vue +281 -0
- package/src/hdcom/GridShow.vue +238 -0
- package/src/hdcom/HdAside.vue +178 -0
- package/src/hdcom/HdBtn.vue +113 -0
- package/src/hdcom/HdButton.vue +137 -0
- package/src/hdcom/HdComFaceRec.vue +58 -0
- package/src/hdcom/HdComGrid.vue +776 -0
- package/src/hdcom/HdComQuery.vue +273 -0
- package/src/hdcom/HdComQueryDetail.vue +161 -0
- package/src/hdcom/HdComSortDetail.vue +155 -0
- package/src/hdcom/HdDatePicker.vue +78 -0
- package/src/hdcom/HdDialog.vue +63 -0
- package/src/hdcom/HdDrop.vue +163 -0
- package/src/hdcom/HdFileUpload.vue +148 -0
- package/src/hdcom/HdFilterBox.vue +90 -0
- package/src/hdcom/HdFooter.vue +149 -0
- package/src/hdcom/HdForm.vue +278 -0
- package/src/hdcom/HdFormBtn.vue +89 -0
- package/src/hdcom/HdFormItem.vue +35 -0
- package/src/hdcom/HdGctosGrid +0 -0
- package/src/hdcom/HdGrid.vue +825 -0
- package/src/hdcom/HdGridEditBtn.vue +44 -0
- package/src/hdcom/HdGridExt.js +219 -0
- package/src/hdcom/HdGridSel.vue +223 -0
- package/src/hdcom/HdHeader.vue +148 -0
- package/src/hdcom/HdHotKey.vue +81 -0
- package/src/hdcom/HdInputHint.vue +49 -0
- package/src/hdcom/HdMain.vue +43 -0
- package/src/hdcom/HdMessage.vue +192 -0
- package/src/hdcom/HdNum.vue +69 -0
- package/src/hdcom/HdPopSel.vue +58 -0
- package/src/hdcom/HdRightMenu.vue +61 -0
- package/src/hdcom/HdSel/SelGridFieldcod.vue +36 -0
- package/src/hdcom/HdTableColumn.vue +334 -0
- package/src/hdcom/HdTempSave.vue +140 -0
- package/src/hdcom/HdTree.vue +86 -0
- package/src/hdcom/HdTreeTable/eval.js +32 -0
- package/src/hdcom/HdTreeTable/index.vue +174 -0
- package/src/hdcom/ImportExcel.vue +143 -0
- package/src/hdcom/PdfShow.vue +266 -0
- package/src/hdcom/index.js +80 -0
- package/src/idev.common.js +72 -0
- package/src/index.js +13 -0
- package/src/utils/HdQuery.js +54 -0
- package/src/utils/comutils.js +98 -0
- package/src/utils/utils.js +105 -0
- package/src/vendor/Blob.js +179 -0
- package/src/vendor/Export2Excel.js +220 -0
- package/src/vendor/Export2Zip.js +22 -0
- package/src/views/layout/AppMain.vue +32 -0
- package/src/views/layout/HdLayout.vue +78 -0
- package/src/views/layout/header/ElasticSearch.vue +225 -0
- package/src/views/layout/header/HZRecorder.js +231 -0
- package/src/views/layout/header/HeaderSearch.vue +198 -0
- package/src/views/layout/header/Levelbar.vue +49 -0
- package/src/views/layout/header/MainHeader.vue +271 -0
- package/src/views/layout/header/Navbar.vue +105 -0
- package/src/views/layout/header/ScrollPane.vue +81 -0
- package/src/views/layout/header/TagsView.vue +210 -0
- package/src/views/layout/header/VocRec.vue +97 -0
- package/src/views/layout/header/changepswform.vue +96 -0
- package/src/views/layout/index.js +12 -0
- package/src/views/layout/menu/Hamburger.vue +45 -0
- package/src/views/layout/menu/HdMenu.vue +167 -0
- package/src/views/layout/menu/css/menu.css +288 -0
- package/src/views/layout/menu/index.vue +25 -0
- package/src/views/privilege/commsg/commsg.vue +78 -0
- package/src/views/privilege/commsg/commsgOrgn.vue +42 -0
- package/src/views/privilege/commsg/commsgRole.vue +149 -0
- package/src/views/privilege/commsg/commsgform.vue +160 -0
- package/src/views/privilege/commsg/commsgiframe.vue +33 -0
- package/src/views/privilege/commsg/commsgto.vue +120 -0
- package/src/views/privilege/commsg/commsgtoform.vue +108 -0
- package/src/views/privilege/commsg/commsgtrans.vue +155 -0
- package/src/views/privilege/exfield/comexcolumn.vue +71 -0
- package/src/views/privilege/exfield/comexcolumnform.vue +101 -0
- package/src/views/privilege/exfield/comexfield.vue +31 -0
- package/src/views/privilege/exfield/comexfieldform.vue +94 -0
- package/src/views/privilege/exfield/comexfieldsub.vue +72 -0
- package/src/views/privilege/index.js +42 -0
- package/src/views/privilege/menu/comMenu.vue +41 -0
- package/src/views/privilege/menu/menu.vue +133 -0
- package/src/views/privilege/menu/menuinfo.vue +56 -0
- package/src/views/privilege/menu/rolelist.vue +47 -0
- package/src/views/privilege/menu/userlist.vue +49 -0
- package/src/views/privilege/mobile/authmobileupdate.vue +69 -0
- package/src/views/privilege/mobile/authmobileupdateform.vue +90 -0
- package/src/views/privilege/orgDept/authOrgn.vue +96 -0
- package/src/views/privilege/orgDept/authorgnform.vue +145 -0
- package/src/views/privilege/orgDept/orgDept.vue +37 -0
- package/src/views/privilege/orgDept/orgTree.vue +88 -0
- package/src/views/privilege/orgDept/orgnselect.vue +134 -0
- package/src/views/privilege/personDept/authuser.vue +123 -0
- package/src/views/privilege/personDept/authuserform.vue +154 -0
- package/src/views/privilege/personDept/facerec.vue +117 -0
- package/src/views/privilege/personDept/orgncascader.vue +125 -0
- package/src/views/privilege/personDept/personDept.vue +31 -0
- package/src/views/privilege/quartz/comquartzjob.vue +65 -0
- package/src/views/privilege/quartz/comquartzjobform.vue +99 -0
- package/src/views/privilege/quartz/comquartzlog.vue +59 -0
- package/src/views/privilege/role/btnRole.vue +117 -0
- package/src/views/privilege/role/menuRole.vue +64 -0
- package/src/views/privilege/role/orgnRole.vue +56 -0
- package/src/views/privilege/role/role.vue +67 -0
- package/src/views/privilege/role/rolelist.vue +67 -0
- package/src/views/privilege/role/roleselect.vue +57 -0
- package/src/views/privilege/search/comsearch.vue +105 -0
- package/src/views/privilege/search/menu.vue +52 -0
- package/src/views/privilege/syscode/syscode.vue +103 -0
- package/src/views/privilege/syscode/sysfield.vue +66 -0
- package/src/views/privilege/syscode/sysfieldframe.vue +30 -0
- package/src/views/privilege/syslog/menulog.vue +52 -0
- package/src/views/privilege/syslog/syslog.vue +115 -0
- package/src/views/privilege/syslog/syslogconfig.vue +61 -0
- package/src/views/privilege/syslog/syslogform.vue +83 -0
- package/src/views/privilege/syslog/syslogframe.vue +26 -0
- package/src/views/privilege/userRole/userRole.vue +122 -0
- package/src/views/privilege.zip +0 -0
- package/vite.config.js +118 -0
- package/.babelrc +0 -17
- package/.editorconfig +0 -14
- package/.eslintignore +0 -3
- package/.npminstall.done +0 -1
- package/.postcssrc.js +0 -8
- package/LICENSE +0 -21
- package/Listening +0 -28
- package/build/build.js +0 -70
- package/build/check-versions.js +0 -45
- package/build/config.js +0 -81
- package/build/dev-client.js +0 -9
- package/build/dev-server.js +0 -93
- package/build/utils.js +0 -78
- package/build/vue-loader.conf.js +0 -12
- package/build/webpack.common.js +0 -37
- package/build/webpack.component.js +0 -36
- package/build/webpack.prod.conf.js +0 -38
- package/components.json +0 -8
- package/conf.js +0 -42
- package/config/dev.env.js +0 -6
- package/config/index.js +0 -43
- package/config/prod.env.js +0 -6
- package/config/sit.env.js +0 -6
- package/favicon.ico +0 -0
- package/jsdoc-vue.js +0 -12
- package/lib/0.index.js +0 -12573
- package/lib/1.index.js +0 -6
- package/lib/2.index.js +0 -2
- package/lib/idev.common.js +0 -1
- package/lib/idv8.common.js +0 -1
- package/lib/index.js +0 -49170
- package/lib/js/ErrHint.js +0 -1
- package/lib/js/HdAside.js +0 -1
- package/lib/js/HdBtn.js +0 -1
- package/lib/js/HdButton.js +0 -1
- package/lib/js/HdComFaceRec.js +0 -1
- package/lib/js/HdComGrid.js +0 -1
- package/lib/js/HdDatePicker.js +0 -1
- package/lib/js/HdDialog.js +0 -1
- package/lib/js/HdDrop.js +0 -1
- package/lib/js/HdFileUpload.js +0 -1
- package/lib/js/HdFooter.js +0 -1
- package/lib/js/HdForm.js +0 -1
- package/lib/js/HdFormBtn.js +0 -1
- package/lib/js/HdFormItem.js +0 -1
- package/lib/js/HdGrid.js +0 -1
- package/lib/js/HdGridEditBtn.js +0 -1
- package/lib/js/HdGridSel.js +0 -1
- package/lib/js/HdHeader.js +0 -1
- package/lib/js/HdHotkey.js +0 -1
- package/lib/js/HdLayout.js +0 -1
- package/lib/js/HdMain.js +0 -1
- package/lib/js/HdMessage.js +0 -1
- package/lib/js/HdNum.js +0 -1
- package/lib/js/HdPopSel.js +0 -1
- package/lib/js/HdSearch.js +0 -1
- package/lib/js/HdTableColumn.js +0 -1
- package/lib/js/HdTempSave.js +0 -1
- package/lib/js/HdTree.js +0 -1
- package/lib/js/HdTreeTable.js +0 -1
- package/lib/js/authmobileupdate.js +0 -1
- package/lib/js/comexfield.js +0 -1
- package/lib/js/commsg.js +0 -1
- package/lib/js/commsgto.js +0 -1
- package/lib/js/comquartzjob.js +0 -1
- package/lib/js/comquartzlog.js +0 -1
- package/lib/js/comsearch.js +0 -1
- package/lib/js/menu.js +0 -1
- package/lib/js/menuinfo.js +0 -1
- package/lib/js/orgDept.js +0 -1
- package/lib/js/orgTree.js +0 -1
- package/lib/js/personDept.js +0 -1
- package/lib/js/role.js +0 -1
- package/lib/js/sysfieldframe.js +0 -1
- package/lib/js/syslog.js +0 -1
- package/lib/js/syslogframe.js +0 -1
- package/lib/js/userRole.js +0 -1
- package/npminstall-debug.log +0 -200
- package/ytgvue.rar +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog title="文件上传" :visible.sync="visible" append-to-body width="450px">
|
|
3
|
+
<el-upload
|
|
4
|
+
style="min-height:300px;width:400px"
|
|
5
|
+
ref="upload"
|
|
6
|
+
:action="upUrl"
|
|
7
|
+
:on-preview="handlePreview"
|
|
8
|
+
:on-remove="handleRemove"
|
|
9
|
+
:on-success="onUpSuccess"
|
|
10
|
+
:before-remove="beforeRemove"
|
|
11
|
+
:file-list="fileList"
|
|
12
|
+
multiple
|
|
13
|
+
:auto-upload="false">
|
|
14
|
+
<el-button slot="trigger" type="primary" v-if="canEdit">{{$t('选取文件')}}</el-button>
|
|
15
|
+
<el-button style="margin-left: 10px;" type="success" @click="submitUpload" v-if="canEdit">{{$t('上传到服务器')}}</el-button>
|
|
16
|
+
|
|
17
|
+
<div slot="tip" class="el-upload__tip"></div>
|
|
18
|
+
</el-upload>
|
|
19
|
+
</el-dialog>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
/**
|
|
24
|
+
* 文件上传 包括上传和下载后台idev8入口为comfileupload
|
|
25
|
+
* @module HdFileUpload
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
components: {},
|
|
30
|
+
name: 'FacePicUpload',
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
upUrl: '/webresources/login/com/ComFaceRec/upload',
|
|
34
|
+
visible: false,
|
|
35
|
+
fileDownVisible: false,
|
|
36
|
+
fileList: [],
|
|
37
|
+
entityId: '',
|
|
38
|
+
entityName: '',
|
|
39
|
+
canEdit: true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
mounted() {
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
/**
|
|
46
|
+
* @method open
|
|
47
|
+
* @param entityName 区分名
|
|
48
|
+
* @param entityId 区分id
|
|
49
|
+
* @param canEdit 是否可编辑
|
|
50
|
+
*/
|
|
51
|
+
show() {
|
|
52
|
+
this.visible = true
|
|
53
|
+
},
|
|
54
|
+
submitUpload() {
|
|
55
|
+
this.$refs.upload.submit()
|
|
56
|
+
},
|
|
57
|
+
onUpSuccess(response, file, fileList) {
|
|
58
|
+
file.uploadId = response.message
|
|
59
|
+
},
|
|
60
|
+
beforeRemove(file, fileList) {
|
|
61
|
+
|
|
62
|
+
},
|
|
63
|
+
handleRemove(file, fileList) {
|
|
64
|
+
|
|
65
|
+
},
|
|
66
|
+
handlePreview(file) {
|
|
67
|
+
return false
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</script>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog title="识别测试" :visible.sync="visible" append-to-body width="90%" top="5vh">
|
|
3
|
+
<el-container style="height:500px">
|
|
4
|
+
<el-aside width="50%">
|
|
5
|
+
<video ref="video" width="400" height="400" autoplay></video>
|
|
6
|
+
</el-aside>
|
|
7
|
+
<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
|
+
<tr v-for="intab in tab">
|
|
15
|
+
<td>{{intab.name}}</td>
|
|
16
|
+
<td>{{intab.workNo}}</td>
|
|
17
|
+
<td>{{intab.compareRs}}</td>
|
|
18
|
+
</tr>
|
|
19
|
+
</table>
|
|
20
|
+
</el-main>
|
|
21
|
+
</el-container>
|
|
22
|
+
</el-dialog>
|
|
23
|
+
</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
|
+
|
|
37
|
+
mounted() {
|
|
38
|
+
|
|
39
|
+
},
|
|
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 => {
|
|
68
|
+
if (!response.data || !response.data.data) {
|
|
69
|
+
this.recRs = []
|
|
70
|
+
this.capAndReg()
|
|
71
|
+
return false
|
|
72
|
+
}
|
|
73
|
+
console.info(response.data.data)
|
|
74
|
+
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(() => {
|
|
88
|
+
this.recRs = []
|
|
89
|
+
if (this.visible)
|
|
90
|
+
this.capAndReg()
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
watch: {
|
|
96
|
+
visible(nowVal) {
|
|
97
|
+
if (nowVal) {
|
|
98
|
+
this.init()
|
|
99
|
+
} else {
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
@@ -0,0 +1,194 @@
|
|
|
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>
|
|
7
|
+
</span>
|
|
8
|
+
<el-button @click="doQuery">{{$t('统计')}}</el-button>
|
|
9
|
+
<el-row>
|
|
10
|
+
<el-col :span="12">
|
|
11
|
+
<div ref="mychart" style="height:60vh"></div>
|
|
12
|
+
</el-col>
|
|
13
|
+
<el-col :span="12">
|
|
14
|
+
<div ref="mychart2" style="height:60vh"></div>
|
|
15
|
+
</el-col>
|
|
16
|
+
<el-col :span="12">
|
|
17
|
+
<div ref="mychart3" style="height:60vh"></div>
|
|
18
|
+
</el-col>
|
|
19
|
+
<el-col :span="12">
|
|
20
|
+
<div ref="mychart4" style="height:60vh"></div>
|
|
21
|
+
</el-col>
|
|
22
|
+
</el-row>
|
|
23
|
+
</el-dialog>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import HdDrop from "./HdDrop.vue";
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
components: {
|
|
31
|
+
HdDrop
|
|
32
|
+
},
|
|
33
|
+
name: "GridChart",
|
|
34
|
+
props: ['allColumn', 'url', 'hdQuery'],
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
visible: false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
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
|
|
65
|
+
})
|
|
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
|
|
76
|
+
}
|
|
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: [{
|
|
106
|
+
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
|
|
118
|
+
},
|
|
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'
|
|
138
|
+
},
|
|
139
|
+
series: [{
|
|
140
|
+
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}%)"
|
|
152
|
+
},
|
|
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'
|
|
167
|
+
},
|
|
168
|
+
emphasis: {
|
|
169
|
+
show: true,
|
|
170
|
+
textStyle: {
|
|
171
|
+
fontSize: '30',
|
|
172
|
+
fontWeight: 'bold'
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
labelLine: {
|
|
177
|
+
normal: {
|
|
178
|
+
show: false
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
data: allVal
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
chart.setOption(option)
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
</script>
|
|
191
|
+
|
|
192
|
+
<style scoped>
|
|
193
|
+
|
|
194
|
+
</style>
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog title="扩展字段设置" :visible.sync="visible" width='65%' append-to-body top="2vh">
|
|
3
|
+
<el-container style="height: 80vh; border: 1px solid #eee">
|
|
4
|
+
<el-main class="gridShow">
|
|
5
|
+
<hd-com-grid ref="grid" :hdQuery="hdQuery" url="/webresources/login/tech/ComExFieldCustom" not-init no-sets
|
|
6
|
+
ck-hide no-sort index-hide :hd-btn-tool="false"
|
|
7
|
+
rec-hide page-hide :default-sort="{prop: 'sortNo', order: 'ascending'}">
|
|
8
|
+
|
|
9
|
+
<!-- <div class="filter-container" slot="query">
|
|
10
|
+
<!– <el-input @keyup.enter.native="$refs.grid.doQuery()" style="width: 200px;" class="filter-item"
|
|
11
|
+
placeholder="名称"
|
|
12
|
+
v-model="hdQuery.query.anyQuery">
|
|
13
|
+
</el-input>
|
|
14
|
+
<el-button class="filter-item" @click="$refs.grid.doQuery()" icon="search" type="primary" ref="q"
|
|
15
|
+
keyType="query">搜索
|
|
16
|
+
</el-button>–>
|
|
17
|
+
<el-button class="filter-item" type="primary" @click="doAdd()" icon="edit" ref="a"
|
|
18
|
+
keyType="add">新增
|
|
19
|
+
</el-button>
|
|
20
|
+
</div>-->
|
|
21
|
+
|
|
22
|
+
<!-- <el-table-column width="60px" align="center" label="操作" fixed="right">
|
|
23
|
+
<template slot-scope="scope">
|
|
24
|
+
<hd-btn icon="el-icon-edit" hint="编辑" @click.stop="$refs.grid.doEdit(scope.row)"
|
|
25
|
+
v-if="!scope.row.isEdit">
|
|
26
|
+
</hd-btn>
|
|
27
|
+
<hd-btn hint="撤销" @click.stop="$refs.grid.doCancel(scope.row)" v-if="scope.row.isEdit">
|
|
28
|
+
<svg-icon icon-class="undo"/>
|
|
29
|
+
</hd-btn>
|
|
30
|
+
<hd-btn icon="el-icon-check" hint="保存" @click.stop="$refs.grid.doSave(scope.row)" v-if="scope.row.isEdit">
|
|
31
|
+
</hd-btn>
|
|
32
|
+
</template>
|
|
33
|
+
</el-table-column>
|
|
34
|
+
-->
|
|
35
|
+
<el-table-column width="100px" align="center" label="是否使用" prop="useFlg" sortable :rules="$r(0,0,50)"
|
|
36
|
+
input="el-switch" :inputProp='{activeValue:"1", inactiveValue:"0"}' :inputFormat='$ckFt'>
|
|
37
|
+
</el-table-column>
|
|
38
|
+
|
|
39
|
+
<!-- <el-table-column width="100px" align="center" label="表名" prop="tableName" sortable
|
|
40
|
+
:rules="$r(1,0,50)" no-edit>
|
|
41
|
+
</el-table-column>
|
|
42
|
+
<el-table-column width="100px" align="center" label="字段名" prop="columnName" sortable
|
|
43
|
+
:rules="$r(1,0,50)" no-edit>
|
|
44
|
+
</el-table-column>-->
|
|
45
|
+
<el-table-column width="100px" align="center" label="字段注解" prop="columnComment"
|
|
46
|
+
:rules="$r(1,0,50)">
|
|
47
|
+
</el-table-column>
|
|
48
|
+
<el-table-column width="100px" align="center" label="字段类型" prop="columnType"
|
|
49
|
+
:rules="$r(1)" input="HdDrop" :inputProp="{ field:'IDV_COLUMN_TYPE'}"
|
|
50
|
+
@change="columnTypeChange">
|
|
51
|
+
</el-table-column>
|
|
52
|
+
<el-table-column width="110px" align="center" label="格式/代码" prop="formatter"
|
|
53
|
+
:rules="$r(1)">
|
|
54
|
+
<template slot-scope="scope">
|
|
55
|
+
<!--noEdit不允许编辑-->
|
|
56
|
+
<template v-if="scope.row.isEdit">
|
|
57
|
+
<template v-if="scope.row.columnType == 'DROP'">
|
|
58
|
+
<sel-grid-fieldcode :gridRow="scope.row" :txtVal.sync="scope.row['formatter']"
|
|
59
|
+
:idVal.sync="scope.row['formatter']" @blur="checkErr(scope.row)"
|
|
60
|
+
style="width: 100%;" v-model="scope.row['formatter']"></sel-grid-fieldcode>
|
|
61
|
+
</template>
|
|
62
|
+
<template v-else-if="scope.row.columnType == 'NUMBER'">
|
|
63
|
+
<HdDrop :gridRow="scope.row" :txtVal.sync="scope.row['formatterStr']"
|
|
64
|
+
:idVal.sync="scope.row['formatter']" @blur="checkErr(scope.row)"
|
|
65
|
+
style="width: 100%;" field="IDV_NUMBER_FORMATTER"
|
|
66
|
+
v-model="scope.row['formatter']"></HdDrop>
|
|
67
|
+
</template>
|
|
68
|
+
<template v-else-if="scope.row.columnType == 'DATE'">
|
|
69
|
+
<HdDrop :gridRow="scope.row" :txtVal.sync="scope.row['formatterStr']"
|
|
70
|
+
:idVal.sync="scope.row['formatter']" @blur="checkErr(scope.row)"
|
|
71
|
+
style="width: 100%;" field="IDV_DATE_FORMATTER"
|
|
72
|
+
v-model="scope.row['formatter']"></HdDrop>
|
|
73
|
+
</template>
|
|
74
|
+
<template v-else>
|
|
75
|
+
</template>
|
|
76
|
+
</template>
|
|
77
|
+
</template>
|
|
78
|
+
</el-table-column>
|
|
79
|
+
<el-table-column width="100px" align="center" label="是否必填" prop="columnRequire"
|
|
80
|
+
input="el-switch" :inputProp="{'active-value':1, 'inactive-value':0}" :inputFormat='$ckFt'>
|
|
81
|
+
</el-table-column>
|
|
82
|
+
<el-table-column width="100px" align="center" label="最大长度" prop="columnLen"
|
|
83
|
+
:rules="$r(1, 0, 255, 'number')" input="HdNum">
|
|
84
|
+
</el-table-column>
|
|
85
|
+
<!-- <el-table-column width="100px" align="center" label="比例" prop="columnScale" sortable
|
|
86
|
+
:rules="$r(0, 'number', 0, 255)" input="HdNum">
|
|
87
|
+
</el-table-column>
|
|
88
|
+
<el-table-column width="100px" align="center" label="默认值" prop="columnDefaultValue" sortable
|
|
89
|
+
:rules="$r(0,0,50)">
|
|
90
|
+
</el-table-column>
|
|
91
|
+
|
|
92
|
+
<el-table-column width="100px" align="center" label="编码" prop="gridCode" sortable :rules="$r(1,0,50)" no-edit>
|
|
93
|
+
</el-table-column>-->
|
|
94
|
+
<el-table-column width="100px" align="center" label="表格宽度" prop="formSpan"
|
|
95
|
+
:rules="$r(1)" input="HdDrop" :inputProp="{field:'IDV_FORM_SPAN'}"
|
|
96
|
+
>
|
|
97
|
+
</el-table-column>
|
|
98
|
+
<!-- <el-table-column width="100px" align="center" label="表单高度" prop="formXs" sortable
|
|
99
|
+
:rules="$r(1, 'number', 0, 1024)" input="HdNum">
|
|
100
|
+
</el-table-column>-->
|
|
101
|
+
<!-- <el-table-column width="100px" align="center" label="列表宽度" prop="gridWidth"
|
|
102
|
+
:rules="$r(0, 0, 9999, 'number')" input="HdNum">
|
|
103
|
+
</el-table-column>-->
|
|
104
|
+
<!-- <el-table-column width="100px" align="center" label="默认值" prop="defaultValue" sortable :rules="$r(0,0,50)">
|
|
105
|
+
</el-table-column>
|
|
106
|
+
<el-table-column width="100px" align="center" label="描述" prop="placeHolder" sortable :rules="$r(0,0,50)">
|
|
107
|
+
</el-table-column>
|
|
108
|
+
<el-table-column width="100px" align="center" label="规则" prop="rules" sortable :rules="$r(1,0,50)">
|
|
109
|
+
</el-table-column>-->
|
|
110
|
+
<el-table-column align="center" label="排序" width="80px" noQuery>
|
|
111
|
+
<template slot-scope="scope">
|
|
112
|
+
<svg-icon class='drag-handler' icon-class="drag"></svg-icon>
|
|
113
|
+
</template>
|
|
114
|
+
</el-table-column>
|
|
115
|
+
</hd-com-grid>
|
|
116
|
+
</el-main>
|
|
117
|
+
</el-container>
|
|
118
|
+
<div slot="footer" class="dialog-footer">
|
|
119
|
+
<!-- <el-button class="filter-item" type="primary" @click="doAdd()" icon="edit" ref="a"
|
|
120
|
+
keyType="add">新增
|
|
121
|
+
</el-button>-->
|
|
122
|
+
<el-button @click="visible = false">{{$t('取 消')}}</el-button>
|
|
123
|
+
<el-button type="primary" @click="submit" :loading="loading"> {{$t('确 定')}}</el-button>
|
|
124
|
+
</div>
|
|
125
|
+
</el-dialog>
|
|
126
|
+
</template>
|
|
127
|
+
<script>
|
|
128
|
+
import Sortable from 'sortablejs'
|
|
129
|
+
import SelGridFieldcode from "./HdSel/SelGridFieldcod";
|
|
130
|
+
|
|
131
|
+
export default {
|
|
132
|
+
name: 'gridexfield',
|
|
133
|
+
components: {SelGridFieldcode},
|
|
134
|
+
props: {
|
|
135
|
+
table: String,
|
|
136
|
+
columnList: Array,
|
|
137
|
+
gridCode: String
|
|
138
|
+
},
|
|
139
|
+
data() {
|
|
140
|
+
return {
|
|
141
|
+
hdQuery: new HdQuery(this),
|
|
142
|
+
visible: false,
|
|
143
|
+
loading: false,
|
|
144
|
+
list: [],
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
mounted() {
|
|
148
|
+
this.init();
|
|
149
|
+
},
|
|
150
|
+
methods: {
|
|
151
|
+
init(exField) {
|
|
152
|
+
this.hdQuery.query.tableName = this.table;
|
|
153
|
+
this.hdQuery.query.columnList = this.columnList;
|
|
154
|
+
this.hdQuery.query.gridCode = this.gridCode;
|
|
155
|
+
this.hdQuery.sort = 'sortNo';
|
|
156
|
+
this.hdQuery.order = 'asc';
|
|
157
|
+
|
|
158
|
+
this.$http.post('/webresources/login/tech/ComExFieldCustom/find', this.hdQuery).then(response => {
|
|
159
|
+
this.list = response.data.rows;
|
|
160
|
+
|
|
161
|
+
if(this.columnList) {
|
|
162
|
+
this.columnList.forEach(column => {
|
|
163
|
+
if (!response.data.rows.some(row => {
|
|
164
|
+
return row.columnName == column
|
|
165
|
+
})) {
|
|
166
|
+
this.list.unshift({
|
|
167
|
+
columnName: column,
|
|
168
|
+
tableName: this.table,
|
|
169
|
+
formXs: '20',
|
|
170
|
+
formSpan: '12',
|
|
171
|
+
isEdit: true
|
|
172
|
+
})
|
|
173
|
+
}
|
|
174
|
+
})
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
let i = 0;
|
|
178
|
+
this.list.forEach(row => {
|
|
179
|
+
row.isEdit = true;
|
|
180
|
+
row.sortNo = i++
|
|
181
|
+
row.formSpan = row.formSpan + "";
|
|
182
|
+
});
|
|
183
|
+
this.$refs.grid.doQuery({rows: this.list})
|
|
184
|
+
|
|
185
|
+
this.$nextTick(() => {
|
|
186
|
+
this.setSort()
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
},
|
|
191
|
+
show() {
|
|
192
|
+
this.visible = true
|
|
193
|
+
|
|
194
|
+
this.list.forEach(row => {
|
|
195
|
+
row.isEdit = true;
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
setSort() {
|
|
199
|
+
const elAll = document.querySelectorAll('.gridShow .el-table__body-wrapper > table > tbody')
|
|
200
|
+
for (let i = 0; i < elAll.length; i++) {
|
|
201
|
+
const el = elAll[i]
|
|
202
|
+
this.sortable = Sortable.create(el, {
|
|
203
|
+
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
|
|
204
|
+
onEnd: evt => {
|
|
205
|
+
// this.list.forEach(row => console.log(row.columnComment, row.sortNo))
|
|
206
|
+
// console.log('----------------------------------')
|
|
207
|
+
// console.log(evt)
|
|
208
|
+
// console.log('----------------------------------')
|
|
209
|
+
|
|
210
|
+
this.list.forEach(row => {
|
|
211
|
+
if (row.sortNo == evt.oldIndex) {
|
|
212
|
+
row.sortNo = evt.newIndex
|
|
213
|
+
} else if (evt.newIndex > evt.oldIndex && row.sortNo <= evt.newIndex && row.sortNo > evt.oldIndex) {
|
|
214
|
+
row.sortNo = row.sortNo - 1
|
|
215
|
+
} else if (evt.newIndex < evt.oldIndex && row.sortNo >= evt.newIndex && row.sortNo < evt.oldIndex) {
|
|
216
|
+
row.sortNo = row.sortNo + 1
|
|
217
|
+
}
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
// this.list.forEach(row => console.log(row.columnComment, row.sortNo))
|
|
221
|
+
}
|
|
222
|
+
})
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
doAdd() {
|
|
226
|
+
let emptyColumn = this.getEmptyColumn();
|
|
227
|
+
if (emptyColumn == null) {
|
|
228
|
+
this.$message({
|
|
229
|
+
message: "没有剩余的扩展字段"
|
|
230
|
+
})
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
let exField = {
|
|
234
|
+
gridCode: this.gridCode,
|
|
235
|
+
tableName: this.table,
|
|
236
|
+
columnName: emptyColumn,
|
|
237
|
+
formXs: 12,
|
|
238
|
+
formSpan: '20',
|
|
239
|
+
isEdit: true
|
|
240
|
+
}
|
|
241
|
+
this.$refs.grid.doEdit('', exField)
|
|
242
|
+
},
|
|
243
|
+
submit() {
|
|
244
|
+
this.list.forEach(row => {
|
|
245
|
+
if (!row.columnComment || !row.columnType) {
|
|
246
|
+
row.isEdit = false;
|
|
247
|
+
}
|
|
248
|
+
row.gridCode = this.gridCode;
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
this.$refs.grid.doSaveAll().then(v => {
|
|
252
|
+
this.visible = false;
|
|
253
|
+
this.$emit('save-ok')
|
|
254
|
+
}).catch(e => {
|
|
255
|
+
this.$message({
|
|
256
|
+
message: "填写有误"
|
|
257
|
+
})
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
getEmptyColumn() {
|
|
261
|
+
let emptyColumns = this.columnList.filter(column => {
|
|
262
|
+
return !this.list.some(row => {
|
|
263
|
+
return row.columnName == column;
|
|
264
|
+
})
|
|
265
|
+
})
|
|
266
|
+
return emptyColumns.length > 0 ? emptyColumns[0] : null;
|
|
267
|
+
},
|
|
268
|
+
columnTypeChange(v, row) {
|
|
269
|
+
if (row.exColumnId) {
|
|
270
|
+
this.$message({type: 'warning', message: this.$t('修改类型可能回造成数据混乱或丢失, 请慎重!')});
|
|
271
|
+
}
|
|
272
|
+
if(row.columnType == 'VARCHAR' || row.columnType == 'BOOLEAN') {
|
|
273
|
+
row.formatter = 'x';
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
</script>
|
|
279
|
+
|
|
280
|
+
<style scoped>
|
|
281
|
+
</style>
|