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,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-shortkey="keyMap" @shortkey="doMethod" v-if="isFocus"></div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
/**
|
|
7
|
+
* 通常不需要直接调用,HdButton中已经集成,不需要绑定按钮的快捷键,可能用到
|
|
8
|
+
* @module HdHotKey
|
|
9
|
+
*/
|
|
10
|
+
export default {
|
|
11
|
+
name: 'HdHotKey',
|
|
12
|
+
data() {
|
|
13
|
+
return {
|
|
14
|
+
isFocus: false,
|
|
15
|
+
rangeThis: {} // 快捷键有效区域
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
// hdResult展示 hdQuery查询 defaultSort默认排序 pageHide true隐藏分页
|
|
19
|
+
props: ['keyMap', 'hotKeyRange'],
|
|
20
|
+
created() {
|
|
21
|
+
this.rangeThis = this.getRangeThis()
|
|
22
|
+
this.$set(this.$store.state, 'IdevFocus', -1) // 必须在watch之前先初始化
|
|
23
|
+
},
|
|
24
|
+
mounted() {
|
|
25
|
+
this.$nextTick(() => {
|
|
26
|
+
if (this.rangeThis) {
|
|
27
|
+
const rgThisEl = this.rangeThis.$el
|
|
28
|
+
rgThisEl.onmouseenter = () => {
|
|
29
|
+
if (this.$store.state.hotKey != "-1")//aside拖动时,会有样式干扰
|
|
30
|
+
this.$set(this.$store.state, 'IdevFocus', this.rangeThis._uid)
|
|
31
|
+
}
|
|
32
|
+
rgThisEl.onmouseleave = () => {
|
|
33
|
+
this.$set(this.$store.state, 'IdevFocus', '-1')
|
|
34
|
+
// this.$set(this.$route.meta, 'focusAreaId', "-1")
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
getRangeThis() {
|
|
41
|
+
let par = this.$parent
|
|
42
|
+
while (par) {
|
|
43
|
+
if (par.$options._componentTag == this.hotKeyRange) {
|
|
44
|
+
return par
|
|
45
|
+
}
|
|
46
|
+
par = par.$parent
|
|
47
|
+
}
|
|
48
|
+
return null
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
doMethod(e) {
|
|
52
|
+
this.$emit('do', e)
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
watch: {
|
|
56
|
+
'$store.state.IdevFocus'() {
|
|
57
|
+
if (!this.rangeThis) {
|
|
58
|
+
return false
|
|
59
|
+
}
|
|
60
|
+
const rgThisEl = this.rangeThis.$el
|
|
61
|
+
if (rgThisEl) {
|
|
62
|
+
if (this.$store.state.IdevFocus == this.rangeThis._uid) {
|
|
63
|
+
this.isFocus = true
|
|
64
|
+
//rgThisEl.classList.add("mouseEnter");
|
|
65
|
+
} else {
|
|
66
|
+
//rgThisEl.classList.remove("mouseEnter");
|
|
67
|
+
this.isFocus = false
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
<style rel="stylesheet/scss" lang="scss">
|
|
75
|
+
.mouseEnter {//1.15 wxl去掉用途不大
|
|
76
|
+
/*border-width: 0 0 2px 0;*/
|
|
77
|
+
/*border-color: #2d8ac7;*/
|
|
78
|
+
/*border-style: solid;*/
|
|
79
|
+
//padding: 1px;
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-autocomplete
|
|
3
|
+
:fetch-suggestions="querySearch"
|
|
4
|
+
:placeholder="$t(placeholder)"
|
|
5
|
+
:value="value"
|
|
6
|
+
@input="v=>$emit('input', v)"
|
|
7
|
+
@select="handleSelect"
|
|
8
|
+
style="width:100%"
|
|
9
|
+
></el-autocomplete>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
options: [],
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
props: ['value', 'field', 'placeholder'],
|
|
20
|
+
mounted() {
|
|
21
|
+
this.doQuery();
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
doQuery() {
|
|
25
|
+
let quUrl = '/webresources/login/privilege/SysCode/findAll?fieldCod=' + this.field
|
|
26
|
+
this.$http.get(quUrl).then(response => {
|
|
27
|
+
response.data.forEach(v => {
|
|
28
|
+
this.options.push({value: v.name})
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
},
|
|
32
|
+
querySearch(queryString, cb) {
|
|
33
|
+
console.info(this.options)
|
|
34
|
+
let results = queryString ? this.options.filter(this.createFilter(queryString)) : this.options;
|
|
35
|
+
// 调用 callback 返回建议列表的数据
|
|
36
|
+
cb(results);
|
|
37
|
+
},
|
|
38
|
+
createFilter(queryString) {
|
|
39
|
+
return (dropLs) => {
|
|
40
|
+
return (dropLs.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
handleSelect(item) {
|
|
44
|
+
this.$emit('input', item.value)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ExMain v-bind="$attrs" class="hdMain">
|
|
3
|
+
<template v-if="title">
|
|
4
|
+
<div class="hd-title">{{$t(title)}}
|
|
5
|
+
<slot name="title"></slot>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
<div style="flex:1;height: 100%;position: relative; ">
|
|
9
|
+
<!--需要这样写 上下布局-->
|
|
10
|
+
<div style="position: absolute; width: 100%;height: 100%;">
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
</ExMain>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 覆写ElMain,增加title
|
|
22
|
+
* 插槽:<slot name="title"></slot> title进行额外扩展如增加按钮等
|
|
23
|
+
* @module HdMain
|
|
24
|
+
*/
|
|
25
|
+
export default {
|
|
26
|
+
name: 'HdMain',
|
|
27
|
+
component: {},
|
|
28
|
+
props: ['title'],
|
|
29
|
+
inheritAttrs: false,
|
|
30
|
+
data() {
|
|
31
|
+
return {}
|
|
32
|
+
},
|
|
33
|
+
mounted() {
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
</script>
|
|
38
|
+
<style rel="stylesheet/scss" lang="scss">
|
|
39
|
+
.hdMain {
|
|
40
|
+
display: flex !important;//在主题切换时,会被el-main取消,所以需要important
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
</template>
|
|
3
|
+
<script>
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* websocket消息
|
|
7
|
+
* @module HdMessage
|
|
8
|
+
*/
|
|
9
|
+
export default {
|
|
10
|
+
name: 'HdMessage',
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
hdQuery: new HdQuery(this),
|
|
14
|
+
websocket: null,
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* prop
|
|
19
|
+
* @prop {allProto} 完整格式 如 wss://gctos.huadong.net/ws,与ipAddr和port互斥
|
|
20
|
+
* @prop {String} ipAddr 有值时,使用该值,无值时,localhost下 为localhost:8080,其它用浏览器的url
|
|
21
|
+
* @prop {Event} msgRec 消息接收的事件,类型1的会弹出系统自带的消息框
|
|
22
|
+
*/
|
|
23
|
+
props: ['ipAddr', 'port', 'allProto'],
|
|
24
|
+
mounted() {
|
|
25
|
+
window._tabOpen = (path) => {//这里必须是全局的
|
|
26
|
+
if (path.indexOf('http') == 0) {//http开头的在新窗口打开
|
|
27
|
+
window.open(path);
|
|
28
|
+
} else if(path.indexOf('iframe://') == 0) {
|
|
29
|
+
// this.$refs['commsgiframe'].show(path.substring(9));
|
|
30
|
+
} else {
|
|
31
|
+
this.$router.push({
|
|
32
|
+
path: path,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
this.init()
|
|
37
|
+
this.readMessage();
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
init() {
|
|
41
|
+
this.socketConnect()
|
|
42
|
+
|
|
43
|
+
// 连接发生错误的回调方法
|
|
44
|
+
this.websocket.onerror = () => {
|
|
45
|
+
this.websocket = -1
|
|
46
|
+
console.info("连接发生错误")
|
|
47
|
+
//this.doMsg("连接发生错误");
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// 连接成功建立的回调方法
|
|
51
|
+
this.websocket.onopen = () => {
|
|
52
|
+
console.info("websocket success")
|
|
53
|
+
this.doHeartConnect()//开启心跳连接
|
|
54
|
+
//this.doMsg("连接成功");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// 接收到消息的回调方法,此处添加处理接收消息方法,当前是将接收到的信息显示在网页上
|
|
58
|
+
this.websocket.onmessage = (event) => {
|
|
59
|
+
let msgObj = JSON.parse(event.data)
|
|
60
|
+
if (msgObj.msgType == -2) {//单用户登录:退出到登录页
|
|
61
|
+
this.singleLoginNotify(msgObj)
|
|
62
|
+
return false
|
|
63
|
+
}
|
|
64
|
+
//未读消息加一
|
|
65
|
+
this.$store.state.user.messageNum = this.$store.state.user.messageNum + 1;
|
|
66
|
+
if (msgObj.msgType == 1) {//type 1为普通消息,默认提示,其它类型发送给业务系统判断
|
|
67
|
+
this.doMsgObj(msgObj);
|
|
68
|
+
}
|
|
69
|
+
this.$emit('msgRec', msgObj)//父类处理事件
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 连接关闭的回调方法
|
|
73
|
+
this.websocket.onclose = () => {
|
|
74
|
+
console.info("websocket close,restart")
|
|
75
|
+
if (this.websocket != -1) {//连接错误,停止使用
|
|
76
|
+
this.websocket = null
|
|
77
|
+
this.init()//重新连接
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
,
|
|
83
|
+
singleLoginNotify(msgObj) {
|
|
84
|
+
this.$notify({
|
|
85
|
+
title: '',
|
|
86
|
+
message: this.$t('该账号已在其它地方登录,5秒后将退出系统'),
|
|
87
|
+
duration: 5000,
|
|
88
|
+
onClose: () => {
|
|
89
|
+
this.$store.dispatch('LogOut').then(() => {
|
|
90
|
+
location.reload()// 为了重新实例化vue-router对象 避免bug
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
,
|
|
96
|
+
socketConnect() {
|
|
97
|
+
// 判断当前浏览器是否支持WebSocket
|
|
98
|
+
let inPort = this.port
|
|
99
|
+
if ('WebSocket' in window) {
|
|
100
|
+
if (!this.port) {
|
|
101
|
+
inPort = '8080';
|
|
102
|
+
}
|
|
103
|
+
// let host = "127.0.0.1:8080" //window.location.host
|
|
104
|
+
let host = window.location.host //window.location.host
|
|
105
|
+
// 创建一个WebSocket连接,URL:127.0.0.1:8080/realTimeWebSocket/webSocket
|
|
106
|
+
if (host.indexOf("localhost") >= 0) {
|
|
107
|
+
host = "127.0.0.1:" + inPort
|
|
108
|
+
}
|
|
109
|
+
if (this.ipAddr) {
|
|
110
|
+
host = this.ipAddr + ":" + inPort
|
|
111
|
+
}
|
|
112
|
+
if (this.allProto) {
|
|
113
|
+
this.websocket = new WebSocket(this.allProto + "?token=" + this.$store.getters.token);
|
|
114
|
+
} else {
|
|
115
|
+
this.websocket = new WebSocket("ws://" + host + "/ws?token=" + this.$store.getters.token);
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
alert('当前浏览器 不支持WebSocket')
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
readMessage() {
|
|
122
|
+
this.hdQuery.query.readFlg = '0';
|
|
123
|
+
this.hdQuery.rows = '1000';
|
|
124
|
+
this.hdQuery.sort = 'sendTim'
|
|
125
|
+
|
|
126
|
+
this.$http.post('/webresources/login/com/ComMsg/find/rec', this.hdQuery).then(response => {
|
|
127
|
+
if (response.data.total === 0) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
var msg = {};
|
|
131
|
+
msg.title = this.$t('消息提示');
|
|
132
|
+
msg.content = this.$t('您有{total}条未读消息', {total: response.data.total});
|
|
133
|
+
msg.url = '/privilege/commsgto'
|
|
134
|
+
this.$store.state.user.messageNum = response.data.total;
|
|
135
|
+
this.doMsgObj(msg);
|
|
136
|
+
// let data = response.data.rows;
|
|
137
|
+
// for (let i = 0; i < data.length; i++) {
|
|
138
|
+
// this.doMsgObj(data[i]);
|
|
139
|
+
// }
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
,
|
|
144
|
+
doMsgObj(con) {
|
|
145
|
+
let msgcon = ""
|
|
146
|
+
if (con.url) {
|
|
147
|
+
msgcon = `<a onclick="_tabOpen('${con.url}')">${con.content}</a>`
|
|
148
|
+
} else {
|
|
149
|
+
msgcon = con.content
|
|
150
|
+
}
|
|
151
|
+
//document.getElementById("video").src=require('../assets/sound/notify.wav')
|
|
152
|
+
//this.notify = new Audio(require('../assets/sound/notify.wav'));
|
|
153
|
+
this.notify = new Audio(`/webresources/login/com/comwav/txtRead?text=${con.content}`);
|
|
154
|
+
this.notify.play();
|
|
155
|
+
|
|
156
|
+
this.$notify({
|
|
157
|
+
dangerouslyUseHTMLString: true,
|
|
158
|
+
title: con.title,
|
|
159
|
+
message: msgcon,
|
|
160
|
+
duration: 10000,
|
|
161
|
+
position: 'bottom-right'
|
|
162
|
+
});
|
|
163
|
+
if (!con.msgRecId) {
|
|
164
|
+
con.msgRecId = con.recId;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
//消息展示完不在把消息标为已读
|
|
168
|
+
// this.$http.post('/webresources/login/com/ComMsg/read', {recId: con.msgRecId}).then(response => {
|
|
169
|
+
// var data = response.data;
|
|
170
|
+
// if (data.code != '1') {
|
|
171
|
+
// this.$message({
|
|
172
|
+
// type: 'error',
|
|
173
|
+
// message: data.message
|
|
174
|
+
// })
|
|
175
|
+
// }
|
|
176
|
+
// })
|
|
177
|
+
}
|
|
178
|
+
,
|
|
179
|
+
doHeartConnect() {
|
|
180
|
+
setInterval(() => {
|
|
181
|
+
try {
|
|
182
|
+
if (this.websocket && this.websocket != -1) {
|
|
183
|
+
this.websocket.send('ping')
|
|
184
|
+
}
|
|
185
|
+
} catch (e) {
|
|
186
|
+
console.error(e)
|
|
187
|
+
}
|
|
188
|
+
}, 30000)
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
</script>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-input :clearable="false" :disabled="disabled" :step="step" @blur="myblur" @change="mychange"
|
|
3
|
+
class="hdnum" onkeypress='return( "e"!=(String.fromCharCode(event.keyCode).toLowerCase()))'
|
|
4
|
+
ref="numInput" type="number"
|
|
5
|
+
v-model.lazy="mynum"></el-input>
|
|
6
|
+
</template>
|
|
7
|
+
<!-- onkeypress 是为了阻止e的输入html5的问题-->
|
|
8
|
+
<script>
|
|
9
|
+
/**
|
|
10
|
+
* 输入区为数字时使用,请勿直接使用el-input(校验时空处理有问题)
|
|
11
|
+
* @module HdNum
|
|
12
|
+
*/
|
|
13
|
+
export default {
|
|
14
|
+
name: 'HdNum',
|
|
15
|
+
data() {
|
|
16
|
+
return {
|
|
17
|
+
mynum: null
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
inheritAttrs: false,
|
|
21
|
+
/**
|
|
22
|
+
* Props 不继承任何属性
|
|
23
|
+
* @prop {int} value 值,组件使用 v-model=""
|
|
24
|
+
* @prop {int} step 步长
|
|
25
|
+
* @prop {boolean} disabled
|
|
26
|
+
* @change
|
|
27
|
+
* @blur
|
|
28
|
+
*/
|
|
29
|
+
props: ['value', 'step', 'disabled'],
|
|
30
|
+
methods: {
|
|
31
|
+
mychange(evt) {
|
|
32
|
+
if (typeof (evt) == 'undefined' || evt === '') { // 空字符串设置为null
|
|
33
|
+
this.mynum = null
|
|
34
|
+
this.$emit('input', null)
|
|
35
|
+
} else {
|
|
36
|
+
this.mynum = parseFloat(evt)
|
|
37
|
+
this.$emit('input', parseFloat(evt))
|
|
38
|
+
}
|
|
39
|
+
this.$emit('change', evt)
|
|
40
|
+
},
|
|
41
|
+
myblur(evt) {
|
|
42
|
+
this.$emit('blur', evt)
|
|
43
|
+
},
|
|
44
|
+
isNumber(val) {
|
|
45
|
+
var regPos = /^\d+(\.\d+)?$/; //非负浮点数
|
|
46
|
+
var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
|
|
47
|
+
if (regPos.test(val) || regNeg.test(val)) {
|
|
48
|
+
return true;
|
|
49
|
+
} else {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
watch: {// 给外层v-model赋值
|
|
55
|
+
value: {
|
|
56
|
+
handler: function (val, oldVal) {
|
|
57
|
+
if(val && this.isNumber(val)){
|
|
58
|
+
this.mynum = parseFloat(val)
|
|
59
|
+
this.$emit('input', parseFloat(val))
|
|
60
|
+
} else {
|
|
61
|
+
this.mynum = val
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
immediate: true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
</script>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-input v-bind="$attrs" v-on="$listeners" :placeholder="placeholder?placeholder:''" :value="txtVal" readonly
|
|
3
|
+
@focus="$emit('focus')" :disabled="disabled"
|
|
4
|
+
ref="sel" @mouseenter.native="doMouseEnter" @mouseleave.native="doMouseLeave" :clearable="false">
|
|
5
|
+
<i slot="suffix" class="el-input__icon el-icon-circle-close" v-if="!threePointShow" @click.stop="doClear"
|
|
6
|
+
style="cursor:pointer "></i>
|
|
7
|
+
<i v-if="threePointShow" slot="suffix" class="el-input__icon el-icon-more" @click="$emit('pop')"
|
|
8
|
+
style="cursor:pointer"></i>
|
|
9
|
+
</el-input>
|
|
10
|
+
</template>
|
|
11
|
+
<style>
|
|
12
|
+
.lucencyInput .el-input__inner {
|
|
13
|
+
border: 0px;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
<script>
|
|
17
|
+
/**
|
|
18
|
+
* 废弃,直接使用HdGridSel
|
|
19
|
+
* @module HdPoPSel
|
|
20
|
+
*/
|
|
21
|
+
export default {
|
|
22
|
+
name: 'HdPoPSel',
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
popShow: this.show,
|
|
26
|
+
threePointShow: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
inheritAttrs: false,
|
|
30
|
+
props: {
|
|
31
|
+
show: Boolean, txtVal: String, idVal: String, placeholder: String, disabled: Boolean
|
|
32
|
+
}, // 设置value为props属性-必须
|
|
33
|
+
mounted() {
|
|
34
|
+
$(this.$parent.$el).find('.el-popover__reference').removeAttr('tabIndex')// 焦点用
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
focus() {
|
|
38
|
+
this.$refs.sel.focus()
|
|
39
|
+
},
|
|
40
|
+
doQuery() {
|
|
41
|
+
},
|
|
42
|
+
doClear() {
|
|
43
|
+
this.$emit('clear')
|
|
44
|
+
},
|
|
45
|
+
doMouseEnter() {
|
|
46
|
+
if (this.disabled) {
|
|
47
|
+
return false
|
|
48
|
+
}
|
|
49
|
+
if (this.idVal) {
|
|
50
|
+
this.threePointShow = false
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
doMouseLeave() {
|
|
54
|
+
this.threePointShow = true
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="rightmenu">
|
|
3
|
+
<slot name="rightMenu">
|
|
4
|
+
<el-button-group>
|
|
5
|
+
|
|
6
|
+
<ex-button class="rightmenu_button" @click="doAdd" vid="doAdd">增加
|
|
7
|
+
</ex-button>
|
|
8
|
+
<ex-button class="rightmenu_button" @click="doUpdate" vid="doUpdate">修改
|
|
9
|
+
</ex-button>
|
|
10
|
+
<ex-button class="rightmenu_button" @click="doRemove" vid="doRemove">删除
|
|
11
|
+
</ex-button>
|
|
12
|
+
<ex-button class="rightmenu_button" @click="doCopy" vid="doCopy">复制
|
|
13
|
+
</ex-button>
|
|
14
|
+
</el-button-group>
|
|
15
|
+
<div style="border: #555 1px solid;" v-if="$slots.rightMenuExt"></div>
|
|
16
|
+
<el-button-group>
|
|
17
|
+
|
|
18
|
+
<slot name="rightMenuExt">
|
|
19
|
+
</slot>
|
|
20
|
+
</el-button-group>
|
|
21
|
+
</slot>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<script>
|
|
25
|
+
// import BtnRight from './BtnRight'
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
name: 'HdRightMenu',
|
|
29
|
+
// mixins: [BtnRight],
|
|
30
|
+
props: {
|
|
31
|
+
noRoleManage: false,
|
|
32
|
+
},
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
isFocus: false,
|
|
36
|
+
rangeThis: {} // 快捷键有效区域
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
created() {
|
|
40
|
+
// if (!this.noRoleManage) {
|
|
41
|
+
// if (this.$route && this.$route.meta.btnRoleCheck) { // 角色管理下激活
|
|
42
|
+
// this.addBtnMetaToParent()
|
|
43
|
+
// }
|
|
44
|
+
// }
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
doAdd() {
|
|
48
|
+
this.$emit('do-add')
|
|
49
|
+
},
|
|
50
|
+
doRemove() {
|
|
51
|
+
this.$emit('do-remove')
|
|
52
|
+
},
|
|
53
|
+
doUpdate() {
|
|
54
|
+
this.$emit('do-update')
|
|
55
|
+
},
|
|
56
|
+
doCopy() {
|
|
57
|
+
this.$emit('do-copy')
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!--代码表用popsel-->
|
|
2
|
+
<template>
|
|
3
|
+
<hd-grid-sel :txtVal="txtVal" :idVal="idVal" placeholder="请点击选取"
|
|
4
|
+
height="50vh" width="300px" :hdQuery="hdQuery" :disabled="disabled"
|
|
5
|
+
url="webresources/login/privilege/SysField/vue/find" @rowClick="doClick" :beforeQuery="beforeQuery">
|
|
6
|
+
<el-table-column width="120px" align="left" header-align="center" label="代码" prop="fieldCod" sortable></el-table-column>
|
|
7
|
+
<el-table-column widhth="180px" align="left" header-align="center" label="名称" prop="fieldName" sortable></el-table-column>
|
|
8
|
+
</hd-grid-sel>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'sel-grid-fieldcode',
|
|
15
|
+
components: {},
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
hdQuery: new HdQuery(this)
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
mounted() {
|
|
22
|
+
},
|
|
23
|
+
props: {txtVal: String, idVal: String, disabled: Boolean},// 设置value为props属�??-必须
|
|
24
|
+
methods: {
|
|
25
|
+
beforeQuery(val) {
|
|
26
|
+
this.hdQuery.query.anyQuery = val
|
|
27
|
+
},
|
|
28
|
+
doClick(row) {
|
|
29
|
+
this.$emit('update:txtVal', row.fieldName)
|
|
30
|
+
this.$emit('update:idVal', row.fieldCod)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
|