hd-idevvue3 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.9c127719.css +1 -0
- package/dist/hd-idevvue3.mjs +3521 -3305
- package/dist/hd-idevvue3.umd.js +29 -29
- package/npminstall-debug.log +2 -10
- package/package.json +3 -1
- package/pnpm-lock.yaml +37 -4
- package/src/App.vue +11 -15
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +9 -10
- package/src/demo/dropdemo.vue +42 -43
- package/src/demo/extsets.vue +140 -39
- package/src/demo/formedit.vue +157 -145
- package/src/demo/hightquery.vue +263 -66
- package/src/demo/inlineedit.vue +129 -35
- package/src/demo/selfdrop.vue +32 -15
- package/src/directive/el-dragDialog/drag.js +13 -13
- package/src/directive/el-dragDialog/index.js +13 -13
- package/src/errorLog.js +3 -3
- package/src/hdcom/BigGrid.js +54 -48
- package/src/hdcom/BillShow.vue +84 -63
- package/src/hdcom/BillUpload.vue +144 -86
- package/src/hdcom/BtnRight.vue +26 -23
- package/src/hdcom/ErrHint.vue +36 -24
- package/src/hdcom/ExtendColumn.vue +97 -90
- package/src/hdcom/ExtendCommon.js +24 -13
- package/src/hdcom/ExtendForm.vue +107 -80
- package/src/hdcom/FacePicUpload.vue +59 -50
- package/src/hdcom/FaceRecTest.vue +87 -77
- package/src/hdcom/GridChart.vue +175 -162
- package/src/hdcom/GridExField.vue +328 -234
- package/src/hdcom/GridShow.vue +89 -39
- package/src/hdcom/HdAside.vue +192 -145
- package/src/hdcom/HdBtn.vue +44 -32
- package/src/hdcom/HdButton.vue +141 -117
- package/src/hdcom/HdComFaceRec.vue +80 -32
- package/src/hdcom/HdComGrid.vue +329 -229
- package/src/hdcom/HdComQuery.vue +179 -90
- package/src/hdcom/HdComQueryDetail.vue +159 -115
- package/src/hdcom/HdComSortDetail.vue +136 -130
- package/src/hdcom/HdDatePicker.vue +32 -16
- package/src/hdcom/HdDialog.vue +62 -44
- package/src/hdcom/HdDrop.vue +163 -138
- package/src/hdcom/HdFileUpload.vue +138 -119
- package/src/hdcom/HdFilterBox.vue +62 -62
- package/src/hdcom/HdFooter.vue +152 -119
- package/src/hdcom/HdForm.vue +276 -203
- package/src/hdcom/HdFormBtn.vue +81 -39
- package/src/hdcom/HdFormItem.vue +14 -10
- package/src/hdcom/HdGrid.vue +353 -156
- package/src/hdcom/HdGridEditBtn.vue +34 -20
- package/src/hdcom/HdGridExt.js +78 -47
- package/src/hdcom/HdGridSel.vue +227 -193
- package/src/hdcom/HdHeader.vue +149 -117
- package/src/hdcom/HdHotKey.vue +70 -67
- package/src/hdcom/HdInputHint.vue +40 -36
- package/src/hdcom/HdMain.vue +25 -27
- package/src/hdcom/HdMessage.vue +180 -171
- package/src/hdcom/HdNum.vue +67 -57
- package/src/hdcom/HdPopSel.vue +46 -24
- package/src/hdcom/HdRightMenu.vue +63 -61
- package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
- package/src/hdcom/HdTableColumn.vue +156 -109
- package/src/hdcom/HdTempSave.vue +138 -116
- package/src/hdcom/HdTree.vue +89 -72
- package/src/hdcom/HdTreeTable/eval.js +8 -3
- package/src/hdcom/HdTreeTable/index.vue +229 -174
- package/src/hdcom/ImportExcel.vue +69 -34
- package/src/hdcom/index.js +39 -44
- package/src/idev.common.js +54 -47
- package/src/index.js +3 -6
- package/src/utils/HdQuery.js +25 -14
- package/src/utils/comutils.js +50 -28
- package/src/utils/gogocodeTransfer.js +59 -0
- package/src/utils/utils.js +30 -19
- package/src/vendor/Blob.js +187 -179
- package/src/vendor/Export2Excel.js +231 -220
- package/src/vendor/Export2Zip.js +25 -22
- package/src/views/layout/AppMain.vue +34 -32
- package/src/views/layout/HdLayout.vue +64 -52
- package/src/views/layout/header/ElasticSearch.vue +196 -159
- package/src/views/layout/header/HZRecorder.js +163 -135
- package/src/views/layout/header/HeaderSearch.vue +165 -145
- package/src/views/layout/header/Levelbar.vue +55 -49
- package/src/views/layout/header/MainHeader.vue +233 -189
- package/src/views/layout/header/Navbar.vue +74 -78
- package/src/views/layout/header/ScrollPane.vue +103 -81
- package/src/views/layout/header/TagsView.vue +169 -164
- package/src/views/layout/header/VocRec.vue +86 -78
- package/src/views/layout/header/changepswform.vue +98 -64
- package/src/views/layout/index.js +5 -7
- package/src/views/layout/menu/Hamburger.vue +63 -45
- package/src/views/layout/menu/HdMenu.vue +155 -118
- package/src/views/layout/menu/index.vue +21 -19
- package/src/views/privilege/commsg/commsg.vue +115 -41
- package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
- package/src/views/privilege/commsg/commsgRole.vue +180 -109
- package/src/views/privilege/commsg/commsgform.vue +125 -101
- package/src/views/privilege/commsg/commsgiframe.vue +30 -23
- package/src/views/privilege/commsg/commsgto.vue +163 -84
- package/src/views/privilege/commsg/commsgtoform.vue +64 -58
- package/src/views/privilege/commsg/commsgtrans.vue +187 -115
- package/src/views/privilege/exfield/comexcolumn.vue +133 -43
- package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
- package/src/views/privilege/exfield/comexfield.vue +15 -17
- package/src/views/privilege/exfield/comexfieldform.vue +71 -53
- package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
- package/src/views/privilege/index.js +19 -20
- package/src/views/privilege/menu/comMenu.vue +49 -41
- package/src/views/privilege/menu/menu.vue +166 -49
- package/src/views/privilege/menu/menuinfo.vue +41 -34
- package/src/views/privilege/menu/rolelist.vue +78 -33
- package/src/views/privilege/menu/userlist.vue +76 -33
- package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
- package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
- package/src/views/privilege/orgDept/authOrgn.vue +157 -65
- package/src/views/privilege/orgDept/authorgnform.vue +50 -38
- package/src/views/privilege/orgDept/orgDept.vue +38 -37
- package/src/views/privilege/orgDept/orgTree.vue +99 -88
- package/src/views/privilege/orgDept/orgnselect.vue +132 -111
- package/src/views/privilege/personDept/authuser.vue +197 -91
- package/src/views/privilege/personDept/authuserform.vue +123 -71
- package/src/views/privilege/personDept/facerec.vue +128 -83
- package/src/views/privilege/personDept/orgncascader.vue +134 -115
- package/src/views/privilege/personDept/personDept.vue +9 -7
- package/src/views/privilege/quartz/comquartzjob.vue +123 -38
- package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
- package/src/views/privilege/quartz/comquartzlog.vue +116 -32
- package/src/views/privilege/role/btnRole.vue +123 -67
- package/src/views/privilege/role/menuRole.vue +65 -45
- package/src/views/privilege/role/orgnRole.vue +63 -41
- package/src/views/privilege/role/role.vue +26 -9
- package/src/views/privilege/role/rolelist.vue +114 -45
- package/src/views/privilege/role/roleselect.vue +34 -17
- package/src/views/privilege/search/comsearch.vue +164 -73
- package/src/views/privilege/search/menu.vue +38 -22
- package/src/views/privilege/syscode/syscode.vue +157 -69
- package/src/views/privilege/syscode/sysfield.vue +96 -43
- package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
- package/src/views/privilege/syslog/menulog.vue +38 -22
- package/src/views/privilege/syslog/syslog.vue +145 -78
- package/src/views/privilege/syslog/syslogconfig.vue +91 -24
- package/src/views/privilege/syslog/syslogform.vue +45 -43
- package/src/views/privilege/syslog/syslogframe.vue +26 -26
- package/src/views/privilege/userRole/userRole.vue +187 -89
- package/vite.config.js +7 -0
- package/dist/assets/index.774ef40e.css +0 -1
- package/src/views/privilege.zip +0 -0
package/src/hdcom/HdGridSel.vue
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<el-popover
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
<el-popover
|
|
4
|
+
:disabled="disabled"
|
|
5
|
+
placement="bottom-start"
|
|
6
|
+
popperClass="hd-grid-sel"
|
|
7
|
+
ref="popSel"
|
|
8
|
+
v-model="visible"
|
|
9
|
+
>
|
|
10
|
+
<div :style="{ height: height, width: width }">
|
|
11
|
+
<hd-com-grid
|
|
12
|
+
:findUrl="url"
|
|
13
|
+
:hdQuery="hdQuery"
|
|
14
|
+
@enterClick="rowClick(hdQuery.selRow)"
|
|
15
|
+
@row-click="rowClick"
|
|
16
|
+
ckHide
|
|
17
|
+
indexHide
|
|
18
|
+
noSets
|
|
19
|
+
notInit
|
|
20
|
+
recHide
|
|
21
|
+
ref="grid"
|
|
22
|
+
v-bind="$attrs"
|
|
23
|
+
v-on="$listeners"
|
|
24
|
+
:hd-btn-tool="false"
|
|
25
|
+
is-not-db-edit
|
|
26
|
+
>
|
|
10
27
|
<slot name="query" slot="query"></slot>
|
|
11
28
|
<slot></slot>
|
|
12
29
|
</hd-com-grid>
|
|
@@ -14,210 +31,227 @@
|
|
|
14
31
|
</el-popover>
|
|
15
32
|
<div>
|
|
16
33
|
<!--readonly 在选择区隐藏时,不能输入-->
|
|
17
|
-
<el-input
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
34
|
+
<el-input
|
|
35
|
+
:clearable="false"
|
|
36
|
+
:disabled="disabled"
|
|
37
|
+
:placeholder="placeholder ? $t(placeholder) : $t('请选择')"
|
|
38
|
+
:readonly="!visible"
|
|
39
|
+
@blur="blur"
|
|
40
|
+
@focus="focus"
|
|
41
|
+
@mouseenter.native="doMouseEnter"
|
|
42
|
+
@mouseleave.native="doMouseLeave"
|
|
43
|
+
ref="sel"
|
|
44
|
+
v-model="searchVal"
|
|
45
|
+
v-popover:popSel
|
|
46
|
+
>
|
|
47
|
+
<el-icon class="el-input__icon" style="cursor: pointer"
|
|
48
|
+
><el-icon-circle-close
|
|
49
|
+
/></el-icon>
|
|
50
|
+
<el-icon class="el-input__icon" style="cursor: pointer"
|
|
51
|
+
><el-icon-more
|
|
52
|
+
/></el-icon>
|
|
25
53
|
</el-input>
|
|
26
54
|
</div>
|
|
27
55
|
</div>
|
|
28
56
|
</template>
|
|
29
|
-
<!--<style rel="stylesheet/scss" lang="scss">-->
|
|
30
|
-
<!--.hd-grid-sel {-->
|
|
31
|
-
<!--z-index: 4000 !important;-->
|
|
32
|
-
<!--}-->
|
|
33
57
|
|
|
34
|
-
<!--</style>-->
|
|
35
58
|
<script>
|
|
59
|
+
import {
|
|
60
|
+
CircleClose as ElIconCircleClose,
|
|
61
|
+
More as ElIconMore,
|
|
62
|
+
} from '@element-plus/icons'
|
|
63
|
+
export default {
|
|
64
|
+
components: {
|
|
65
|
+
ElIconCircleClose,
|
|
66
|
+
ElIconMore,
|
|
67
|
+
},
|
|
68
|
+
name: 'HdGridSel',
|
|
69
|
+
data() {
|
|
70
|
+
return {
|
|
71
|
+
openHandler: null, //快速切换焦点,避免出现很多下拉类别
|
|
72
|
+
threePointShow: true,
|
|
73
|
+
searchVal: this.txtVal,
|
|
74
|
+
// isFocus: false,
|
|
75
|
+
visible: false,
|
|
76
|
+
isFirst: true, // 是否第一次打开
|
|
77
|
+
searchHandler: Object,
|
|
78
|
+
isSoftFocus: false, // 点击弹窗内容时,input重新获得焦点,但是不能触发focus
|
|
79
|
+
// focusTime: 0
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
inheritAttrs: false,
|
|
36
83
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @
|
|
84
|
+
* Props 继承hd-com-grid的属性和事件
|
|
85
|
+
* @prop {String} txtVal 双向绑定 这里是为了clear清空用
|
|
86
|
+
* @prop {String} idVal 双向绑定 这里是为了clear清空用
|
|
87
|
+
* @prop {String} placeholder
|
|
88
|
+
* @prop {Boolean} disabled 只读
|
|
89
|
+
* @prop {Object} hdQuery 查询封装类
|
|
90
|
+
* @prop {String} height 默认为40vh
|
|
91
|
+
* @prop {String} width 弹出选择框的宽度,非输入框的!!!
|
|
92
|
+
* @prop {Function} beforeQuery 查询前的事件,通常需要绑定anyQuery
|
|
93
|
+
* @prop {String} url 查询的url,hdGrid中的findUrl
|
|
39
94
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
95
|
+
// 设置value为props属性-必须
|
|
96
|
+
props: {
|
|
97
|
+
txtVal: String,
|
|
98
|
+
idVal: String,
|
|
99
|
+
placeholder: String,
|
|
100
|
+
disabled: Boolean,
|
|
101
|
+
hdQuery: Object,
|
|
102
|
+
url: String, // 全路径
|
|
103
|
+
height: {
|
|
104
|
+
// 弹出选择框的高度,非输入框的!!!
|
|
105
|
+
type: String,
|
|
106
|
+
default: '40vh',
|
|
107
|
+
},
|
|
108
|
+
width: {
|
|
109
|
+
// 弹出选择框的宽度,非输入框的!!!
|
|
110
|
+
type: String,
|
|
111
|
+
default: '100%',
|
|
112
|
+
},
|
|
113
|
+
beforeQuery: Function,
|
|
114
|
+
},
|
|
115
|
+
mounted() {
|
|
116
|
+
this.$nextTick(() => {
|
|
117
|
+
if (this.$refs.popSel)
|
|
118
|
+
this.$refs.popSel.referenceElm.setAttribute('tabindex', -1) // 不可通过tab切换到popsel,因为有input存在
|
|
119
|
+
})
|
|
120
|
+
},
|
|
121
|
+
methods: {
|
|
122
|
+
focus() {
|
|
123
|
+
// this.focusTime = new Date().getTime()
|
|
124
|
+
this.$emit('focus')
|
|
125
|
+
if (this.isSoftFocus) {
|
|
126
|
+
// click时
|
|
127
|
+
this.isSoftFocus = false // 点击时,防止焦点触发
|
|
128
|
+
return false
|
|
53
129
|
}
|
|
130
|
+
this.openHandler = setTimeout(() => {
|
|
131
|
+
// 否则会和默认的冲突
|
|
132
|
+
this.visible = true
|
|
133
|
+
this.openHandler = null
|
|
134
|
+
}, 150)
|
|
135
|
+
// this.isFocus = true
|
|
54
136
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
mounted() {
|
|
137
|
+
blur() {
|
|
138
|
+
if (this.openHandler) {
|
|
139
|
+
clearTimeout(this.openHandler)
|
|
140
|
+
this.openHandler = null
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
// visibleChg() {
|
|
144
|
+
// setTimeout(() => {
|
|
145
|
+
// let nowClickTime = new Date().getTime()
|
|
146
|
+
// if (nowClickTime - focusTime > 500)//只有焦点时才可点击
|
|
147
|
+
// this.visible = !this.visible
|
|
148
|
+
// }, 150)
|
|
149
|
+
// },
|
|
150
|
+
// blur() {
|
|
151
|
+
// // setTimeout(() => {
|
|
152
|
+
// // console.info('blur' + this.isSoftFocus)
|
|
153
|
+
// // if (this.isSoftFocus) {
|
|
154
|
+
// // this.isSoftFocus = false;
|
|
155
|
+
// // } else {
|
|
156
|
+
// // this.$emit('blur', event);
|
|
157
|
+
// // this.isFocus = false
|
|
158
|
+
// // this.searchVal = this.txtVal //焦点切换,还原
|
|
159
|
+
// // this.visible = false
|
|
160
|
+
// // }
|
|
161
|
+
// // }, 150);
|
|
162
|
+
// },
|
|
163
|
+
doClear() {
|
|
164
|
+
this.$parent.$emit('update:txtVal', '')
|
|
165
|
+
this.$parent.$emit('update:idVal', '')
|
|
166
|
+
this.$emit('clear')
|
|
86
167
|
this.$nextTick(() => {
|
|
87
|
-
|
|
88
|
-
this.$refs.popSel.referenceElm.setAttribute('tabindex', -1); // 不可通过tab切换到popsel,因为有input存在
|
|
168
|
+
this.$refs.sel.focus() // 确保input已渲染后再设置焦点
|
|
89
169
|
})
|
|
90
170
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
this.$emit('focus')
|
|
95
|
-
if (this.isSoftFocus) { // click时
|
|
96
|
-
this.isSoftFocus = false // 点击时,防止焦点触发
|
|
97
|
-
return false
|
|
98
|
-
}
|
|
99
|
-
this.openHandler = setTimeout(() => { // 否则会和默认的冲突
|
|
100
|
-
this.visible = true
|
|
101
|
-
this.openHandler = null
|
|
102
|
-
}, 150)
|
|
103
|
-
// this.isFocus = true
|
|
104
|
-
},
|
|
105
|
-
blur() {
|
|
106
|
-
if (this.openHandler) {
|
|
107
|
-
clearTimeout(this.openHandler)
|
|
108
|
-
this.openHandler = null
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
// visibleChg() {
|
|
112
|
-
// setTimeout(() => {
|
|
113
|
-
// let nowClickTime = new Date().getTime()
|
|
114
|
-
// if (nowClickTime - focusTime > 500)//只有焦点时才可点击
|
|
115
|
-
// this.visible = !this.visible
|
|
116
|
-
// }, 150)
|
|
117
|
-
// },
|
|
118
|
-
// blur() {
|
|
119
|
-
// // setTimeout(() => {
|
|
120
|
-
// // console.info('blur' + this.isSoftFocus)
|
|
121
|
-
// // if (this.isSoftFocus) {
|
|
122
|
-
// // this.isSoftFocus = false;
|
|
123
|
-
// // } else {
|
|
124
|
-
// // this.$emit('blur', event);
|
|
125
|
-
// // this.isFocus = false
|
|
126
|
-
// // this.searchVal = this.txtVal //焦点切换,还原
|
|
127
|
-
// // this.visible = false
|
|
128
|
-
// // }
|
|
129
|
-
// // }, 150);
|
|
130
|
-
// },
|
|
131
|
-
doClear() {
|
|
132
|
-
this.$parent.$emit('update:txtVal', '')
|
|
133
|
-
this.$parent.$emit('update:idVal', '')
|
|
134
|
-
this.$emit('clear')
|
|
135
|
-
this.$nextTick(() => {
|
|
136
|
-
this.$refs.sel.focus(); // 确保input已渲染后再设置焦点
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
doMouseEnter() {
|
|
140
|
-
if (this.disabled) {
|
|
141
|
-
return false
|
|
142
|
-
}
|
|
143
|
-
if (this.idVal) {
|
|
144
|
-
this.threePointShow = false
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
doMouseLeave() {
|
|
148
|
-
this.threePointShow = true
|
|
149
|
-
},
|
|
150
|
-
/**
|
|
151
|
-
* @function 触发rowClick(row)事件
|
|
152
|
-
* */
|
|
153
|
-
rowClick(row) {
|
|
154
|
-
this.$emit('rowClick', row)
|
|
155
|
-
this.isSoftFocus = true
|
|
156
|
-
this.$refs.sel.focus()
|
|
157
|
-
this.visible = false
|
|
158
|
-
},
|
|
159
|
-
visbileKeyAdd() {
|
|
160
|
-
document.onkeydown = (e) => {
|
|
161
|
-
var key = window.event.keyCode
|
|
162
|
-
if (key == 9 || key == 27) { // 9 tab 27 esc
|
|
163
|
-
this.visible = false
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
visbileKeyRemove() {
|
|
168
|
-
document.onkeydown = function (e) {
|
|
169
|
-
}
|
|
171
|
+
doMouseEnter() {
|
|
172
|
+
if (this.disabled) {
|
|
173
|
+
return false
|
|
170
174
|
}
|
|
175
|
+
if (this.idVal) {
|
|
176
|
+
this.threePointShow = false
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
doMouseLeave() {
|
|
180
|
+
this.threePointShow = true
|
|
171
181
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
182
|
+
/**
|
|
183
|
+
* @function 触发rowClick(row)事件
|
|
184
|
+
* */
|
|
185
|
+
rowClick(row) {
|
|
186
|
+
this.$emit('rowClick', row)
|
|
187
|
+
this.isSoftFocus = true
|
|
188
|
+
this.$refs.sel.focus()
|
|
189
|
+
this.visible = false
|
|
190
|
+
},
|
|
191
|
+
visbileKeyAdd() {
|
|
192
|
+
document.onkeydown = (e) => {
|
|
193
|
+
var key = window.event.keyCode
|
|
194
|
+
if (key == 9 || key == 27) {
|
|
195
|
+
// 9 tab 27 esc
|
|
196
|
+
this.visible = false
|
|
176
197
|
}
|
|
177
|
-
|
|
178
|
-
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
visbileKeyRemove() {
|
|
201
|
+
document.onkeydown = function (e) {}
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
watch: {
|
|
205
|
+
searchVal: function (newVal) {
|
|
206
|
+
if (!this.visible) {
|
|
207
|
+
return false
|
|
208
|
+
}
|
|
209
|
+
if (this.searchTimeHandler) {
|
|
210
|
+
clearTimeout(this.searchTimeHandler)
|
|
211
|
+
}
|
|
212
|
+
this.searchTimeHandler = setTimeout(() => {
|
|
213
|
+
// 延迟300ms查询
|
|
214
|
+
this.searchTimeHandler = null
|
|
215
|
+
if (this.beforeQuery) {
|
|
216
|
+
this.beforeQuery(newVal)
|
|
179
217
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
},
|
|
194
|
-
txtVal: function (newVal) {
|
|
195
|
-
this.searchVal = this.txtVal
|
|
196
|
-
},
|
|
218
|
+
// for(var key in this.hdQuery.query) {
|
|
219
|
+
// this.hdQuery.query[key]=this.hdQuery.query[key].toUpperCase();
|
|
220
|
+
// }
|
|
221
|
+
this.$refs.grid.doQuery().then(() => {
|
|
222
|
+
// 默认选中第一行
|
|
223
|
+
this.$refs.grid.$refs.hdgrid.setCurrentRow(0)
|
|
224
|
+
})
|
|
225
|
+
}, 600)
|
|
226
|
+
// this.visible = true
|
|
227
|
+
},
|
|
228
|
+
txtVal: function (newVal) {
|
|
229
|
+
this.searchVal = this.txtVal
|
|
230
|
+
},
|
|
197
231
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
// for(var key in this.hdQuery.query) {
|
|
214
|
-
// this.hdQuery.query[key]=this.hdQuery.query[key].toUpperCase();
|
|
215
|
-
// }
|
|
216
|
-
this.$refs.grid.doQuery(null).then(() => {
|
|
217
|
-
this.$refs.grid.$refs.hdgrid.setCurrentRow(0)
|
|
218
|
-
})
|
|
232
|
+
visible: function (newVal) {
|
|
233
|
+
if (newVal) {
|
|
234
|
+
//虚拟滚动时,防止页面空白
|
|
235
|
+
this.$refs.grid.$refs.hdgrid.scroller = 0
|
|
236
|
+
this.$refs.grid.addHotKey()
|
|
237
|
+
this.visbileKeyAdd()
|
|
238
|
+
} else {
|
|
239
|
+
this.$refs.grid.removeHotKey()
|
|
240
|
+
this.visbileKeyRemove()
|
|
241
|
+
this.searchVal = this.txtVal
|
|
242
|
+
}
|
|
243
|
+
if (newVal) {
|
|
244
|
+
if (this.beforeQuery) {
|
|
245
|
+
this.beforeQuery()
|
|
219
246
|
}
|
|
247
|
+
// for(var key in this.hdQuery.query) {
|
|
248
|
+
// this.hdQuery.query[key]=this.hdQuery.query[key].toUpperCase();
|
|
249
|
+
// }
|
|
250
|
+
this.$refs.grid.doQuery(null).then(() => {
|
|
251
|
+
this.$refs.grid.$refs.hdgrid.setCurrentRow(0)
|
|
252
|
+
})
|
|
220
253
|
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
}
|
|
223
257
|
</script>
|