hd-idevvue3 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/assets/index.9c127719.css +1 -0
  2. package/dist/hd-idevvue3.mjs +3521 -3305
  3. package/dist/hd-idevvue3.umd.js +29 -29
  4. package/npminstall-debug.log +2 -10
  5. package/package.json +3 -1
  6. package/pnpm-lock.yaml +37 -4
  7. package/src/App.vue +11 -15
  8. package/src/assets/sound/notify.wav +0 -0
  9. package/src/demo/demo.vue +9 -10
  10. package/src/demo/dropdemo.vue +42 -43
  11. package/src/demo/extsets.vue +140 -39
  12. package/src/demo/formedit.vue +157 -145
  13. package/src/demo/hightquery.vue +263 -66
  14. package/src/demo/inlineedit.vue +129 -35
  15. package/src/demo/selfdrop.vue +32 -15
  16. package/src/directive/el-dragDialog/drag.js +13 -13
  17. package/src/directive/el-dragDialog/index.js +13 -13
  18. package/src/errorLog.js +3 -3
  19. package/src/hdcom/BigGrid.js +54 -48
  20. package/src/hdcom/BillShow.vue +84 -63
  21. package/src/hdcom/BillUpload.vue +144 -86
  22. package/src/hdcom/BtnRight.vue +26 -23
  23. package/src/hdcom/ErrHint.vue +36 -24
  24. package/src/hdcom/ExtendColumn.vue +97 -90
  25. package/src/hdcom/ExtendCommon.js +24 -13
  26. package/src/hdcom/ExtendForm.vue +107 -80
  27. package/src/hdcom/FacePicUpload.vue +59 -50
  28. package/src/hdcom/FaceRecTest.vue +87 -77
  29. package/src/hdcom/GridChart.vue +175 -162
  30. package/src/hdcom/GridExField.vue +328 -234
  31. package/src/hdcom/GridShow.vue +89 -39
  32. package/src/hdcom/HdAside.vue +192 -145
  33. package/src/hdcom/HdBtn.vue +44 -32
  34. package/src/hdcom/HdButton.vue +141 -117
  35. package/src/hdcom/HdComFaceRec.vue +80 -32
  36. package/src/hdcom/HdComGrid.vue +329 -229
  37. package/src/hdcom/HdComQuery.vue +179 -90
  38. package/src/hdcom/HdComQueryDetail.vue +159 -115
  39. package/src/hdcom/HdComSortDetail.vue +136 -130
  40. package/src/hdcom/HdDatePicker.vue +32 -16
  41. package/src/hdcom/HdDialog.vue +62 -44
  42. package/src/hdcom/HdDrop.vue +163 -138
  43. package/src/hdcom/HdFileUpload.vue +138 -119
  44. package/src/hdcom/HdFilterBox.vue +62 -62
  45. package/src/hdcom/HdFooter.vue +152 -119
  46. package/src/hdcom/HdForm.vue +276 -203
  47. package/src/hdcom/HdFormBtn.vue +81 -39
  48. package/src/hdcom/HdFormItem.vue +14 -10
  49. package/src/hdcom/HdGrid.vue +353 -156
  50. package/src/hdcom/HdGridEditBtn.vue +34 -20
  51. package/src/hdcom/HdGridExt.js +78 -47
  52. package/src/hdcom/HdGridSel.vue +227 -193
  53. package/src/hdcom/HdHeader.vue +149 -117
  54. package/src/hdcom/HdHotKey.vue +70 -67
  55. package/src/hdcom/HdInputHint.vue +40 -36
  56. package/src/hdcom/HdMain.vue +25 -27
  57. package/src/hdcom/HdMessage.vue +180 -171
  58. package/src/hdcom/HdNum.vue +67 -57
  59. package/src/hdcom/HdPopSel.vue +46 -24
  60. package/src/hdcom/HdRightMenu.vue +63 -61
  61. package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
  62. package/src/hdcom/HdTableColumn.vue +156 -109
  63. package/src/hdcom/HdTempSave.vue +138 -116
  64. package/src/hdcom/HdTree.vue +89 -72
  65. package/src/hdcom/HdTreeTable/eval.js +8 -3
  66. package/src/hdcom/HdTreeTable/index.vue +229 -174
  67. package/src/hdcom/ImportExcel.vue +69 -34
  68. package/src/hdcom/index.js +39 -44
  69. package/src/idev.common.js +54 -47
  70. package/src/index.js +3 -6
  71. package/src/utils/HdQuery.js +25 -14
  72. package/src/utils/comutils.js +50 -28
  73. package/src/utils/gogocodeTransfer.js +59 -0
  74. package/src/utils/utils.js +30 -19
  75. package/src/vendor/Blob.js +187 -179
  76. package/src/vendor/Export2Excel.js +231 -220
  77. package/src/vendor/Export2Zip.js +25 -22
  78. package/src/views/layout/AppMain.vue +34 -32
  79. package/src/views/layout/HdLayout.vue +64 -52
  80. package/src/views/layout/header/ElasticSearch.vue +196 -159
  81. package/src/views/layout/header/HZRecorder.js +163 -135
  82. package/src/views/layout/header/HeaderSearch.vue +165 -145
  83. package/src/views/layout/header/Levelbar.vue +55 -49
  84. package/src/views/layout/header/MainHeader.vue +233 -189
  85. package/src/views/layout/header/Navbar.vue +74 -78
  86. package/src/views/layout/header/ScrollPane.vue +103 -81
  87. package/src/views/layout/header/TagsView.vue +169 -164
  88. package/src/views/layout/header/VocRec.vue +86 -78
  89. package/src/views/layout/header/changepswform.vue +98 -64
  90. package/src/views/layout/index.js +5 -7
  91. package/src/views/layout/menu/Hamburger.vue +63 -45
  92. package/src/views/layout/menu/HdMenu.vue +155 -118
  93. package/src/views/layout/menu/index.vue +21 -19
  94. package/src/views/privilege/commsg/commsg.vue +115 -41
  95. package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
  96. package/src/views/privilege/commsg/commsgRole.vue +180 -109
  97. package/src/views/privilege/commsg/commsgform.vue +125 -101
  98. package/src/views/privilege/commsg/commsgiframe.vue +30 -23
  99. package/src/views/privilege/commsg/commsgto.vue +163 -84
  100. package/src/views/privilege/commsg/commsgtoform.vue +64 -58
  101. package/src/views/privilege/commsg/commsgtrans.vue +187 -115
  102. package/src/views/privilege/exfield/comexcolumn.vue +133 -43
  103. package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
  104. package/src/views/privilege/exfield/comexfield.vue +15 -17
  105. package/src/views/privilege/exfield/comexfieldform.vue +71 -53
  106. package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
  107. package/src/views/privilege/index.js +19 -20
  108. package/src/views/privilege/menu/comMenu.vue +49 -41
  109. package/src/views/privilege/menu/menu.vue +166 -49
  110. package/src/views/privilege/menu/menuinfo.vue +41 -34
  111. package/src/views/privilege/menu/rolelist.vue +78 -33
  112. package/src/views/privilege/menu/userlist.vue +76 -33
  113. package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
  114. package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
  115. package/src/views/privilege/orgDept/authOrgn.vue +157 -65
  116. package/src/views/privilege/orgDept/authorgnform.vue +50 -38
  117. package/src/views/privilege/orgDept/orgDept.vue +38 -37
  118. package/src/views/privilege/orgDept/orgTree.vue +99 -88
  119. package/src/views/privilege/orgDept/orgnselect.vue +132 -111
  120. package/src/views/privilege/personDept/authuser.vue +197 -91
  121. package/src/views/privilege/personDept/authuserform.vue +123 -71
  122. package/src/views/privilege/personDept/facerec.vue +128 -83
  123. package/src/views/privilege/personDept/orgncascader.vue +134 -115
  124. package/src/views/privilege/personDept/personDept.vue +9 -7
  125. package/src/views/privilege/quartz/comquartzjob.vue +123 -38
  126. package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
  127. package/src/views/privilege/quartz/comquartzlog.vue +116 -32
  128. package/src/views/privilege/role/btnRole.vue +123 -67
  129. package/src/views/privilege/role/menuRole.vue +65 -45
  130. package/src/views/privilege/role/orgnRole.vue +63 -41
  131. package/src/views/privilege/role/role.vue +26 -9
  132. package/src/views/privilege/role/rolelist.vue +114 -45
  133. package/src/views/privilege/role/roleselect.vue +34 -17
  134. package/src/views/privilege/search/comsearch.vue +164 -73
  135. package/src/views/privilege/search/menu.vue +38 -22
  136. package/src/views/privilege/syscode/syscode.vue +157 -69
  137. package/src/views/privilege/syscode/sysfield.vue +96 -43
  138. package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
  139. package/src/views/privilege/syslog/menulog.vue +38 -22
  140. package/src/views/privilege/syslog/syslog.vue +145 -78
  141. package/src/views/privilege/syslog/syslogconfig.vue +91 -24
  142. package/src/views/privilege/syslog/syslogform.vue +45 -43
  143. package/src/views/privilege/syslog/syslogframe.vue +26 -26
  144. package/src/views/privilege/userRole/userRole.vue +187 -89
  145. package/vite.config.js +7 -0
  146. package/dist/assets/index.774ef40e.css +0 -1
  147. package/src/views/privilege.zip +0 -0
@@ -1,148 +1,180 @@
1
1
  <template>
2
- <ExHeader :height="nowHeight" ref="header" style="display: flex;flex-direction: column;">
2
+ <ExHeader
3
+ :height="nowHeight"
4
+ ref="header"
5
+ style="display: flex; flex-direction: column"
6
+ >
3
7
  <div class="hdHeader">
4
8
  <template v-if="title">
5
9
  <div class="hd-title">
6
- <div align="left" style="float:left">{{$t(title)}}</div>
10
+ <div align="left" style="float: left">{{ $t(title) }}</div>
7
11
  <slot name="title"></slot>
8
12
  <div align="right" v-if="arrowShow">
9
- <i @click="isShrink?doShrink(false):doShrink(true)" style="cursor:pointer;" v-bind:class="[fa, arrowClass]">
13
+ <i
14
+ @click="isShrink ? doShrink(false) : doShrink(true)"
15
+ style="cursor: pointer"
16
+ v-bind:class="[fa, arrowClass]"
17
+ >
10
18
  </i>
11
19
  </div>
12
20
  </div>
13
21
  </template>
14
22
  <!--title有20的高度-->
15
- <div style="flex:1;height: 100%;position: relative;" v-show="!isShrink">
16
- <div style="position: absolute; width: 100%;height: 100%;">
23
+ <div style="flex: 1; height: 100%; position: relative" v-show="!isShrink">
24
+ <div style="position: absolute; width: 100%; height: 100%">
17
25
  <slot></slot>
18
26
  </div>
19
27
  </div>
20
- <div :class="{dragShowCls:dragShow}" @mousedown="mousedown($event)" @mouseout="dragShow=false" @mouseover="dragShow=true"
21
- class="asideDrag" v-if="!noDrag"></div>
22
- <div class="moveline" ref="moveline" v-show="dragFrom!=null"></div>
28
+ <div
29
+ :class="{ dragShowCls: dragShow }"
30
+ @mousedown="mousedown($event)"
31
+ @mouseout="dragShow = false"
32
+ @mouseover="dragShow = true"
33
+ class="asideDrag"
34
+ v-if="!noDrag"
35
+ ></div>
36
+ <div class="moveline" ref="moveline" v-show="dragFrom != null"></div>
23
37
  </div>
24
38
  </ExHeader>
25
39
  </template>
26
40
 
27
41
  <script>
28
-
42
+ /**
43
+ * 覆写ElHeader,增加拖动和title
44
+ * 插槽:<slot name="title"></slot> title进行额外扩展如增加按钮等
45
+ * @module HdHeader
46
+ */
47
+ export default {
48
+ name: 'HdHeader',
49
+ component: {},
29
50
  /**
30
- * 覆写ElHeader,增加拖动和title
31
- * 插槽:<slot name="title"></slot> title进行额外扩展如增加按钮等
32
- * @module HdHeader
51
+ * Props 继承ElHeader属性和事件,如果仅需要elementui的ElHeader请使用ExHeader
52
+ * @prop {String} title 标题
53
+ * @prop {Boolen} arrowShow 是否显示一键收缩
54
+ * @prop {Boolen} noDrag 是否可拖动,默认否
33
55
  */
34
- export default {
35
- name: 'HdHeader',
36
- component: {},
37
- /**
38
- * Props 继承ElHeader属性和事件,如果仅需要elementui的ElHeader请使用ExHeader
39
- * @prop {String} title 标题
40
- * @prop {Boolen} arrowShow 是否显示一键收缩
41
- * @prop {Boolen} noDrag 是否可拖动,默认否
42
- */
43
- props: {
44
- height: String,
45
- title: String,
46
- arrowShow: {type: Boolean, default: true},
47
- noDrag: {type: Boolean, default: false}
48
- },
49
- inheritAttrs: false,
50
- data() {
51
- return {
52
- inputHeight: 0, //未拖拽时的高度
53
- iconCls: 'el-icon-d-caret',
54
- arrowClass: 'fa-chevron-up',
55
- fa: 'fa',
56
- isShrink: false,
57
- dragFrom: null,
58
- nowHeight: '100px',
59
- dragShow: false
60
- }
61
- },
62
- mounted() {
63
- if (this.height) {
64
- this.nowHeight = this.height
65
- }
66
- this.inputHeight = this.nowHeight
67
- },
68
- methods: {
69
- doShrink(isShrink) {
70
- if (isShrink) {
71
- if (this.title) {
72
- this.nowHeight = "30px"
73
- } else {
74
- this.nowHeight = "15px"
75
- }
76
- this.arrowClass = 'fa-chevron-down'
56
+ props: {
57
+ height: String,
58
+ title: String,
59
+ arrowShow: { type: Boolean, default: true },
60
+ noDrag: { type: Boolean, default: false },
61
+ },
62
+ inheritAttrs: false,
63
+ data() {
64
+ return {
65
+ inputHeight: 0, //未拖拽时的高度
66
+ iconCls: 'el-icon-d-caret',
67
+ arrowClass: 'fa-chevron-up',
68
+ fa: 'fa',
69
+ isShrink: false,
70
+ dragFrom: null,
71
+ nowHeight: '100px',
72
+ dragShow: false,
73
+ }
74
+ },
75
+ mounted() {
76
+ if (this.height) {
77
+ this.nowHeight = this.height
78
+ }
79
+ this.inputHeight = this.nowHeight
80
+ },
81
+ methods: {
82
+ doShrink(isShrink) {
83
+ if (isShrink) {
84
+ if (this.title) {
85
+ this.nowHeight = '30px'
77
86
  } else {
78
- this.nowHeight = this.inputHeight
79
- this.arrowClass = 'fa-chevron-up'
80
- }
81
- this.isShrink = isShrink
82
- },
83
- mousedown: function (event) {
84
- this.$set(this.$store.state, 'hotKey', "-1") //避免热键样式影响体验
85
- this.dragFrom = event.y
86
- this.$refs.moveline.style.top = this.dragFrom + "px"
87
- document.documentElement.addEventListener('mousemove', this.handleMove, true)
88
- document.documentElement.addEventListener('mouseup', this.handleMouseup, true)
89
- },
90
- handleMove: function (event) {
91
- this.$refs.moveline.style.top = event.y + "px"
92
- },
93
- handleMouseup: function (event) {
94
- document.documentElement.removeEventListener('mousemove', this.handleMove, true)
95
- document.documentElement.removeEventListener('mouseup', this.handleMouseup, true)
96
- let newHeight = this.$refs.header.$el.offsetHeight + event.y - this.dragFrom
97
- this.nowHeight = newHeight + 'px';
98
- this.dragFrom = null
99
- this.$set(this.$store.state, 'hotKey', null) //避免热键样式影响体验
100
- if (newHeight <= 70) { // 少于一定宽度自动收缩
101
- this.doShrink(true)
102
- }
103
- if (newHeight >= 100) { // 少于一定宽度自动收缩
104
- this.isShrink = false
87
+ this.nowHeight = '15px'
105
88
  }
89
+ this.arrowClass = 'fa-chevron-down'
90
+ } else {
91
+ this.nowHeight = this.inputHeight
92
+ this.arrowClass = 'fa-chevron-up'
106
93
  }
94
+ this.isShrink = isShrink
107
95
  },
108
- watch: {
109
- nowHeight(val) {
110
- this.$emit('update:height', val);
111
- },
112
- width(val) {
113
- this.nowHeight = val
96
+ mousedown: function (event) {
97
+ this.$set(this.$store.state, 'hotKey', '-1') //避免热键样式影响体验
98
+ this.dragFrom = event.y
99
+ this.$refs.moveline.style.top = this.dragFrom + 'px'
100
+ document.documentElement.addEventListener(
101
+ 'mousemove',
102
+ this.handleMove,
103
+ true
104
+ )
105
+ document.documentElement.addEventListener(
106
+ 'mouseup',
107
+ this.handleMouseup,
108
+ true
109
+ )
110
+ },
111
+ handleMove: function (event) {
112
+ this.$refs.moveline.style.top = event.y + 'px'
113
+ },
114
+ handleMouseup: function (event) {
115
+ document.documentElement.removeEventListener(
116
+ 'mousemove',
117
+ this.handleMove,
118
+ true
119
+ )
120
+ document.documentElement.removeEventListener(
121
+ 'mouseup',
122
+ this.handleMouseup,
123
+ true
124
+ )
125
+ let newHeight =
126
+ this.$refs.header.$el.offsetHeight + event.y - this.dragFrom
127
+ this.nowHeight = newHeight + 'px'
128
+ this.dragFrom = null
129
+ this.$set(this.$store.state, 'hotKey', null) //避免热键样式影响体验
130
+ if (newHeight <= 70) {
131
+ // 少于一定宽度自动收缩
132
+ this.doShrink(true)
114
133
  }
115
- }
116
- }
117
-
134
+ if (newHeight >= 100) {
135
+ // 少于一定宽度自动收缩
136
+ this.isShrink = false
137
+ }
138
+ },
139
+ },
140
+ watch: {
141
+ nowHeight(val) {
142
+ this.$emit('update:height', val)
143
+ },
144
+ width(val) {
145
+ this.nowHeight = val
146
+ },
147
+ },
148
+ }
118
149
  </script>
119
- <style rel="stylesheet/scss" lang="scss">
120
- .hdHeader {
121
- display: flex;
122
- flex-direction: column;
123
- flex: 1;
124
- }
125
150
 
126
- .asideDrag {
127
- width: 100%;
128
- height: 5px;
129
- overflow: hidden;
130
- cursor: ns-resize;
131
- user-select: none;
132
- }
151
+ <style lang="scss" rel="stylesheet/scss">
152
+ .hdHeader {
153
+ display: flex;
154
+ flex-direction: column;
155
+ flex: 1;
156
+ }
157
+
158
+ .asideDrag {
159
+ width: 100%;
160
+ height: 5px;
161
+ overflow: hidden;
162
+ cursor: ns-resize;
163
+ user-select: none;
164
+ }
133
165
 
134
- .moveline {
135
- width: 100%;
136
- height: 5px;
137
- overflow: hidden;
138
- position: fixed;
139
- cursor: ns-resize;
140
- background-color: red;
141
- z-index: 9999;
142
- user-select: none;
143
- }
166
+ .moveline {
167
+ width: 100%;
168
+ height: 5px;
169
+ overflow: hidden;
170
+ position: fixed;
171
+ cursor: ns-resize;
172
+ background-color: red;
173
+ z-index: 9999;
174
+ user-select: none;
175
+ }
144
176
 
145
- .dragShowCls {
146
- background-color: #409EFF;
147
- }
177
+ .dragShowCls {
178
+ background-color: #409eff;
179
+ }
148
180
  </style>
@@ -3,79 +3,82 @@
3
3
  </template>
4
4
 
5
5
  <script>
6
- /**
7
- * 通常不需要直接调用,HdButton中已经集成,不需要绑定按钮的快捷键,可能用到
8
- * @module HdHotKey
9
- */
10
- export default {
11
- name: 'HdHotKey',
12
- data() {
13
- return {
14
- isFocus: false,
15
- rangeThis: {} // 快捷键有效区域
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')
30
+ //aside拖动时,会有样式干扰
31
+ this.$set(this.$store.state, 'IdevFocus', this.rangeThis._uid)
32
+ }
33
+ rgThisEl.onmouseleave = () => {
34
+ this.$set(this.$store.state, 'IdevFocus', '-1')
35
+ // this.$set(this.$route.meta, 'focusAreaId', "-1")
36
+ }
16
37
  }
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
- }
38
+ })
39
+ },
40
+ methods: {
41
+ getRangeThis() {
42
+ let par = this.$parent
43
+ while (par) {
44
+ if (par.$options._componentTag == this.hotKeyRange) {
45
+ return par
36
46
  }
37
- })
47
+ par = par.$parent
48
+ }
49
+ return null
38
50
  },
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
 
51
- doMethod(e) {
52
- this.$emit('do', e)
53
- }
52
+ doMethod(e) {
53
+ this.$emit('do', e)
54
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
- }
55
+ },
56
+ watch: {
57
+ '$store.state.IdevFocus'() {
58
+ if (!this.rangeThis) {
59
+ return false
60
+ }
61
+ const rgThisEl = this.rangeThis.$el
62
+ if (rgThisEl) {
63
+ if (this.$store.state.IdevFocus == this.rangeThis._uid) {
64
+ this.isFocus = true
65
+ //rgThisEl.classList.add("mouseEnter");
66
+ } else {
67
+ //rgThisEl.classList.remove("mouseEnter");
68
+ this.isFocus = false
69
69
  }
70
70
  }
71
- }
72
- }
71
+ },
72
+ },
73
+ }
73
74
  </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
- }
75
+
76
+ <style lang="scss" rel="stylesheet/scss">
77
+ .mouseEnter {
78
+ //1.15 wxl去掉用途不大
79
+ /*border-width: 0 0 2px 0;*/
80
+ /*border-color: #2d8ac7;*/
81
+ /*border-style: solid;*/
82
+ //padding: 1px;
83
+ }
81
84
  </style>
@@ -2,48 +2,52 @@
2
2
  <el-autocomplete
3
3
  :fetch-suggestions="querySearch"
4
4
  :placeholder="$t(placeholder)"
5
- :value="value"
6
- @input="v=>$emit('input', v)"
5
+ :model-value="value"
6
+ @input="(v) => $emit('input', v)"
7
7
  @select="handleSelect"
8
- style="width:100%"
8
+ style="width: 100%"
9
9
  ></el-autocomplete>
10
10
  </template>
11
11
 
12
12
  <script>
13
- export default {
14
- data() {
15
- return {
16
- options: [],
17
- };
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 =
26
+ '/webresources/login/privilege/SysCode/findAll?fieldCod=' + this.field
27
+ this.$http.get(quUrl).then((response) => {
28
+ response.data.forEach((v) => {
29
+ this.options.push({ value: v.name })
30
+ })
31
+ })
18
32
  },
19
- props: ['value', 'field', 'placeholder'],
20
- mounted() {
21
- this.doQuery();
33
+ querySearch(queryString, cb) {
34
+ console.info(this.options)
35
+ let results = queryString
36
+ ? this.options.filter(this.createFilter(queryString))
37
+ : this.options
38
+ // 调用 callback 返回建议列表的数据
39
+ cb(results)
22
40
  },
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)
41
+ createFilter(queryString) {
42
+ return (dropLs) => {
43
+ return (
44
+ dropLs.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
45
+ )
45
46
  }
46
- }
47
- }
47
+ },
48
+ handleSelect(item) {
49
+ this.$emit('input', item.value)
50
+ },
51
+ },
52
+ }
48
53
  </script>
49
-
@@ -1,43 +1,41 @@
1
1
  <template>
2
2
  <ExMain v-bind="$attrs" class="hdMain">
3
3
  <template v-if="title">
4
- <div class="hd-title">{{$t(title)}}
4
+ <div class="hd-title">
5
+ {{ $t(title) }}
5
6
  <slot name="title"></slot>
6
7
  </div>
7
8
  </template>
8
- <div style="flex:1;height: 100%;position: relative; ">
9
+ <div style="flex: 1; height: 100%; position: relative">
9
10
  <!--需要这样写 上下布局-->
10
- <div style="position: absolute; width: 100%;height: 100%;">
11
+ <div style="position: absolute; width: 100%; height: 100%">
11
12
  <slot></slot>
12
13
  </div>
13
14
  </div>
14
-
15
15
  </ExMain>
16
16
  </template>
17
17
 
18
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
-
19
+ /**
20
+ * 覆写ElMain,增加title
21
+ * 插槽:<slot name="title"></slot> title进行额外扩展如增加按钮等
22
+ * @module HdMain
23
+ */
24
+ export default {
25
+ name: 'HdMain',
26
+ component: {},
27
+ props: ['title'],
28
+ inheritAttrs: false,
29
+ data() {
30
+ return {}
31
+ },
32
+ mounted() {},
33
+ }
37
34
  </script>
38
- <style rel="stylesheet/scss" lang="scss">
39
- .hdMain {
40
- display: flex !important;//在主题切换时,会被el-main取消,所以需要important
41
- flex-direction: column;
42
- }
35
+
36
+ <style lang="scss" rel="stylesheet/scss">
37
+ .hdMain {
38
+ display: flex !important; //在主题切换时,会被el-main取消,所以需要important
39
+ flex-direction: column;
40
+ }
43
41
  </style>