hd-idevvue3 3.0.5 → 3.0.8

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 (155) hide show
  1. package/dist/static/css/index-DRHIlcVU.css +1 -0
  2. package/dist/static/js/index-DbUA6jg0.js +184 -0
  3. package/dist/static/js/index-Dl4O91nB.js +73768 -0
  4. package/package.json +16 -16
  5. package/.env.development +0 -5
  6. package/.env.production +0 -5
  7. package/.eslintrc.js +0 -151
  8. package/dist/assets/index.431f21ca.css +0 -1
  9. package/dist/hd-idevvue3.mjs +0 -45878
  10. package/dist/hd-idevvue3.umd.js +0 -153
  11. package/index.html +0 -18
  12. package/npminstall-debug.log +0 -200
  13. package/pnpm-lock.yaml +0 -2813
  14. package/src/App.vue +0 -11
  15. package/src/assets/sound/notify.wav +0 -0
  16. package/src/demo/demo.vue +0 -42
  17. package/src/demo/dropdemo.vue +0 -42
  18. package/src/demo/extsets.vue +0 -208
  19. package/src/demo/formedit.vue +0 -157
  20. package/src/demo/hightquery.vue +0 -366
  21. package/src/demo/inlineedit.vue +0 -182
  22. package/src/demo/selfdrop.vue +0 -58
  23. package/src/demo//350/241/214/345/206/205/347/272/247/350/201/224.txt +0 -2
  24. package/src/directive/el-dragDialog/drag.js +0 -124
  25. package/src/directive/el-dragDialog/index.js +0 -13
  26. package/src/errorLog.js +0 -16
  27. package/src/hdcom/BigGrid.js +0 -179
  28. package/src/hdcom/BillShow.vue +0 -111
  29. package/src/hdcom/BillUpload.vue +0 -311
  30. package/src/hdcom/BtnRight.vue +0 -101
  31. package/src/hdcom/ErrHint.vue +0 -42
  32. package/src/hdcom/ExtendColumn.vue +0 -115
  33. package/src/hdcom/ExtendCommon.js +0 -40
  34. package/src/hdcom/ExtendForm.vue +0 -141
  35. package/src/hdcom/FacePicUpload.vue +0 -80
  36. package/src/hdcom/FaceRecTest.vue +0 -114
  37. package/src/hdcom/GridChart.vue +0 -207
  38. package/src/hdcom/GridExField.vue +0 -375
  39. package/src/hdcom/GridShow.vue +0 -288
  40. package/src/hdcom/HdAside.vue +0 -225
  41. package/src/hdcom/HdBtn.vue +0 -125
  42. package/src/hdcom/HdButton.vue +0 -161
  43. package/src/hdcom/HdComFaceRec.vue +0 -106
  44. package/src/hdcom/HdComGrid.vue +0 -876
  45. package/src/hdcom/HdComQuery.vue +0 -362
  46. package/src/hdcom/HdComQueryDetail.vue +0 -205
  47. package/src/hdcom/HdComSortDetail.vue +0 -161
  48. package/src/hdcom/HdDatePicker.vue +0 -94
  49. package/src/hdcom/HdDialog.vue +0 -81
  50. package/src/hdcom/HdDrop.vue +0 -188
  51. package/src/hdcom/HdFileUpload.vue +0 -167
  52. package/src/hdcom/HdFilterBox.vue +0 -90
  53. package/src/hdcom/HdFooter.vue +0 -182
  54. package/src/hdcom/HdForm.vue +0 -351
  55. package/src/hdcom/HdFormBtn.vue +0 -131
  56. package/src/hdcom/HdFormItem.vue +0 -39
  57. package/src/hdcom/HdGctosGrid +0 -0
  58. package/src/hdcom/HdGrid.vue +0 -1022
  59. package/src/hdcom/HdGridEditBtn.vue +0 -58
  60. package/src/hdcom/HdGridExt.js +0 -250
  61. package/src/hdcom/HdGridSel.vue +0 -257
  62. package/src/hdcom/HdHeader.vue +0 -180
  63. package/src/hdcom/HdHotKey.vue +0 -84
  64. package/src/hdcom/HdInputHint.vue +0 -53
  65. package/src/hdcom/HdMain.vue +0 -41
  66. package/src/hdcom/HdMessage.vue +0 -201
  67. package/src/hdcom/HdNum.vue +0 -79
  68. package/src/hdcom/HdPopSel.vue +0 -80
  69. package/src/hdcom/HdRightMenu.vue +0 -63
  70. package/src/hdcom/HdSel/SelGridFieldcod.vue +0 -54
  71. package/src/hdcom/HdTableColumn.vue +0 -381
  72. package/src/hdcom/HdTempSave.vue +0 -162
  73. package/src/hdcom/HdTree.vue +0 -103
  74. package/src/hdcom/HdTreeTable/eval.js +0 -39
  75. package/src/hdcom/HdTreeTable/index.vue +0 -229
  76. package/src/hdcom/ImportExcel.vue +0 -178
  77. package/src/hdcom/index.js +0 -75
  78. package/src/idev.common.js +0 -79
  79. package/src/index.js +0 -11
  80. package/src/utils/HdQuery.js +0 -65
  81. package/src/utils/comutils.js +0 -120
  82. package/src/utils/gogocodeTransfer.js +0 -59
  83. package/src/utils/utils.js +0 -116
  84. package/src/vendor/Blob.js +0 -187
  85. package/src/vendor/Export2Excel.js +0 -231
  86. package/src/vendor/Export2Zip.js +0 -25
  87. package/src/views/layout/AppMain.vue +0 -34
  88. package/src/views/layout/HdLayout.vue +0 -90
  89. package/src/views/layout/header/ElasticSearch.vue +0 -262
  90. package/src/views/layout/header/HZRecorder.js +0 -259
  91. package/src/views/layout/header/HeaderSearch.vue +0 -218
  92. package/src/views/layout/header/Levelbar.vue +0 -55
  93. package/src/views/layout/header/MainHeader.vue +0 -315
  94. package/src/views/layout/header/Navbar.vue +0 -101
  95. package/src/views/layout/header/ScrollPane.vue +0 -103
  96. package/src/views/layout/header/TagsView.vue +0 -215
  97. package/src/views/layout/header/VocRec.vue +0 -105
  98. package/src/views/layout/header/changepswform.vue +0 -130
  99. package/src/views/layout/index.js +0 -10
  100. package/src/views/layout/menu/Hamburger.vue +0 -63
  101. package/src/views/layout/menu/HdMenu.vue +0 -204
  102. package/src/views/layout/menu/css/menu.css +0 -288
  103. package/src/views/layout/menu/index.vue +0 -27
  104. package/src/views/privilege/commsg/commsg.vue +0 -152
  105. package/src/views/privilege/commsg/commsgOrgn.vue +0 -51
  106. package/src/views/privilege/commsg/commsgRole.vue +0 -220
  107. package/src/views/privilege/commsg/commsgform.vue +0 -184
  108. package/src/views/privilege/commsg/commsgiframe.vue +0 -40
  109. package/src/views/privilege/commsg/commsgto.vue +0 -199
  110. package/src/views/privilege/commsg/commsgtoform.vue +0 -114
  111. package/src/views/privilege/commsg/commsgtrans.vue +0 -227
  112. package/src/views/privilege/exfield/comexcolumn.vue +0 -161
  113. package/src/views/privilege/exfield/comexcolumnform.vue +0 -128
  114. package/src/views/privilege/exfield/comexfield.vue +0 -29
  115. package/src/views/privilege/exfield/comexfieldform.vue +0 -112
  116. package/src/views/privilege/exfield/comexfieldsub.vue +0 -163
  117. package/src/views/privilege/index.js +0 -41
  118. package/src/views/privilege/menu/comMenu.vue +0 -49
  119. package/src/views/privilege/menu/menu.vue +0 -250
  120. package/src/views/privilege/menu/menuinfo.vue +0 -63
  121. package/src/views/privilege/menu/rolelist.vue +0 -92
  122. package/src/views/privilege/menu/userlist.vue +0 -92
  123. package/src/views/privilege/mobile/authmobileupdate.vue +0 -145
  124. package/src/views/privilege/mobile/authmobileupdateform.vue +0 -120
  125. package/src/views/privilege/orgDept/authOrgn.vue +0 -188
  126. package/src/views/privilege/orgDept/authorgnform.vue +0 -157
  127. package/src/views/privilege/orgDept/orgDept.vue +0 -38
  128. package/src/views/privilege/orgDept/orgTree.vue +0 -99
  129. package/src/views/privilege/orgDept/orgnselect.vue +0 -155
  130. package/src/views/privilege/personDept/authuser.vue +0 -229
  131. package/src/views/privilege/personDept/authuserform.vue +0 -206
  132. package/src/views/privilege/personDept/facerec.vue +0 -162
  133. package/src/views/privilege/personDept/orgncascader.vue +0 -144
  134. package/src/views/privilege/personDept/personDept.vue +0 -33
  135. package/src/views/privilege/quartz/comquartzjob.vue +0 -150
  136. package/src/views/privilege/quartz/comquartzjobform.vue +0 -115
  137. package/src/views/privilege/quartz/comquartzlog.vue +0 -143
  138. package/src/views/privilege/role/btnRole.vue +0 -173
  139. package/src/views/privilege/role/menuRole.vue +0 -84
  140. package/src/views/privilege/role/orgnRole.vue +0 -78
  141. package/src/views/privilege/role/role.vue +0 -84
  142. package/src/views/privilege/role/rolelist.vue +0 -136
  143. package/src/views/privilege/role/roleselect.vue +0 -74
  144. package/src/views/privilege/search/comsearch.vue +0 -196
  145. package/src/views/privilege/search/menu.vue +0 -68
  146. package/src/views/privilege/syscode/syscode.vue +0 -191
  147. package/src/views/privilege/syscode/sysfield.vue +0 -119
  148. package/src/views/privilege/syscode/sysfieldframe.vue +0 -30
  149. package/src/views/privilege/syslog/menulog.vue +0 -68
  150. package/src/views/privilege/syslog/syslog.vue +0 -182
  151. package/src/views/privilege/syslog/syslogconfig.vue +0 -128
  152. package/src/views/privilege/syslog/syslogform.vue +0 -85
  153. package/src/views/privilege/syslog/syslogframe.vue +0 -26
  154. package/src/views/privilege/userRole/userRole.vue +0 -220
  155. package/vite.config.js +0 -103
@@ -1,225 +0,0 @@
1
- <template>
2
- <ExAside :width="nowWidth" ref="aside" style="display: flex">
3
- <div class="hdAside">
4
- <template v-if="title">
5
- <div class="hd-title" v-show="!isShrink">
6
- {{ $t(title) }}
7
- <slot name="title"></slot>
8
- <div
9
- align="right"
10
- style="margin: -15px 10px 0px 0px"
11
- v-if="arrowShow"
12
- >
13
- <i
14
- @click="isShrink ? doShrink(false) : doShrink(true)"
15
- style="cursor: pointer"
16
- v-bind:class="[
17
- 'fa',
18
- isShrink ? 'fa-chevron-right' : 'fa-chevron-left',
19
- ]"
20
- >
21
- </i>
22
- </div>
23
- </div>
24
- </template>
25
- <div class="hd-title" v-show="isShrink">
26
- <i
27
- @click="isShrink ? doShrink(false) : doShrink(true)"
28
- style="cursor: pointer"
29
- v-bind:class="[
30
- 'fa',
31
- isShrink ? 'fa-chevron-right' : 'fa-chevron-left',
32
- ]"
33
- >
34
- </i>
35
- </div>
36
- <div
37
- style="flex: 1; position: relative; height: 100%; width: 100%"
38
- v-show="!isShrink"
39
- >
40
- <div style="position: absolute; width: 100%; height: 100%">
41
- <slot></slot>
42
- </div>
43
- </div>
44
- </div>
45
- <div
46
- :class="{ asideDrag: true, dragShowCls: dragShow }"
47
- @mousedown="mousedown($event)"
48
- @mouseout="dragShow = false"
49
- @mouseover="dragShow = true"
50
- v-if="!noDrag"
51
- ></div>
52
- <div class="moveline" ref="moveline" v-show="dragFrom != null"></div>
53
- </ExAside>
54
- </template>
55
-
56
- <script>
57
- /**
58
- * 覆写ElAside,增加拖动和title
59
- * @module HdAside
60
- */
61
- export default {
62
- name: 'HdAside',
63
- component: {},
64
- inheritAttrs: false,
65
- /**
66
- * Props 继承ELAside属性和事件,如果仅需要elementui的ElAside请使用ExAside
67
- * 插槽:<slot name="title"></slot> title进行额外扩展如增加按钮等
68
- * @prop {String} title 标题
69
- * @prop {String} width 禁止在style中写width
70
- * @prop {Boolen} arrowShow 是否显示一键收缩
71
- * @prop {Boolen} noDrag 是否可拖动,默认否
72
- * @prop {String} showType 字符串:"1" 普通 2 收缩 3 全屏
73
- *
74
- */
75
- props: {
76
- width: String,
77
- title: String,
78
- arrowShow: { type: Boolean, default: true },
79
- noDrag: { type: Boolean, default: false },
80
- showType: { type: String, default: '1' }, // 注意是字符串:"1" 普通 2 收缩 3 全屏
81
- },
82
- data() {
83
- return {
84
- isShrink: false, // 收缩还是展开
85
- isFull: false, // 是否全屏
86
- differ: 0, //鼠标点击的位置与元素上级位置的差
87
- dragFrom: null, //开始点击的点
88
- inputWidth: 0, //第一次进来时的,宽度
89
- nowWidth: '300px', //无设置默认300px
90
- dragShow: false,
91
- }
92
- },
93
- mounted() {
94
- if (this.width) {
95
- this.nowWidth = this.width
96
- }
97
- this.inputWidth = this.nowWidth
98
- },
99
- methods: {
100
- doShrink(isShrink) {
101
- this.isShrink = isShrink
102
- this.isFull = false // 收缩时,全屏还原
103
- if (isShrink) {
104
- this.$emit('update:showType', '2')
105
- this.nowWidth = '15px'
106
- } else {
107
- //点还原按钮
108
- this.$emit('update:showType', '1')
109
- this.nowWidth = this.inputWidth
110
- }
111
- },
112
- doFullScreen(isFull) {
113
- // 全屏
114
- this.isFull = isFull
115
- this.isShrink = false //
116
- if (isFull) {
117
- this.$emit('update:showType', '3')
118
- this.nowWidth = '100%'
119
- } else {
120
- this.$emit('update:showType', '1')
121
- this.nowWidth = this.inputWidth
122
- }
123
- },
124
- mousedown: function (event) {
125
- this.$set(this.$store.state, 'hotKey', '-1') //避免热键样式影响体验
126
- this.dragFrom = event.x
127
- this.$refs.moveline.style.left = this.dragFrom + 'px'
128
- document.documentElement.addEventListener(
129
- 'mousemove',
130
- this.handleMove,
131
- true
132
- )
133
- document.documentElement.addEventListener(
134
- 'mouseup',
135
- this.handleMouseup,
136
- true
137
- )
138
- },
139
- handleMove: function (event) {
140
- this.$refs.moveline.style.left = event.x + 'px'
141
- },
142
- handleMouseup: function (event) {
143
- document.documentElement.removeEventListener(
144
- 'mousemove',
145
- this.handleMove,
146
- true
147
- )
148
- document.documentElement.removeEventListener(
149
- 'mouseup',
150
- this.handleMouseup,
151
- true
152
- )
153
- let newWidth = this.$refs.aside.$el.offsetWidth + event.x - this.dragFrom
154
- this.nowWidth = newWidth + 'px'
155
- this.dragFrom = null
156
- this.$set(this.$store.state, 'hotKey', null) //避免热键样式影响体验
157
- if (newWidth <= 100) {
158
- // 少于一定宽度自动收缩
159
- this.doShrink(true)
160
- }
161
- if (newWidth >= 150) {
162
- // 少于一定宽度自动收缩
163
- this.isShrink = false
164
- }
165
- },
166
- },
167
- watch: {
168
- // 如果 `activeName` 发生改变,这个函数就会运行
169
- showType: {
170
- immediate: true,
171
- handler: function (newVal) {
172
- this.$nextTick(() => {
173
- if (newVal == '1') {
174
- // 第一次显示查询,以后不查询
175
- this.doShrink(false)
176
- } else if (newVal == '2') {
177
- // 第一次显示查询,以后不查询
178
- this.doShrink(true)
179
- } else if (newVal == '3') {
180
- // 第一次显示查询,以后不查询
181
- this.doFullScreen(true)
182
- }
183
- })
184
- },
185
- },
186
- nowWidth(val) {
187
- this.$emit('update:width', val)
188
- },
189
- width(val) {
190
- this.nowWidth = val
191
- },
192
- },
193
- }
194
- </script>
195
-
196
- <style lang="scss" rel="stylesheet/scss" scoped>
197
- .hdAside {
198
- display: flex;
199
- flex-direction: column;
200
- flex: 1;
201
- }
202
-
203
- .asideDrag {
204
- width: 5px;
205
- height: 100%;
206
- overflow: hidden;
207
- cursor: ew-resize;
208
- user-select: none;
209
- }
210
-
211
- .moveline {
212
- width: 5px;
213
- height: 100%;
214
- overflow: hidden;
215
- position: fixed;
216
- cursor: ew-resize;
217
- background-color: red;
218
- z-index: 9999;
219
- user-select: none;
220
- }
221
-
222
- .dragShowCls {
223
- background-color: #409eff;
224
- }
225
- </style>
@@ -1,125 +0,0 @@
1
- <template>
2
- <el-tooltip
3
- :auto-close="2"
4
- :show-after="500"
5
- v-if="btnRight"
6
- ref="hdbtn"
7
- :content="$t(hint + addTextProp)"
8
- :enterable="true"
9
- placement="bottom"
10
- effect="light"
11
- transition=""
12
- >
13
- <i :class="'hdBtn ' + icon" @click="handleClick">
14
- <slot v-if="!icon" />
15
- <hd-hot-key
16
- v-if="nowKeyMap"
17
- :hot-key-range="hotKeyRange"
18
- :key-map="nowKeyMap"
19
- @do="click('hotkey')"
20
- />
21
- </i>
22
- </el-tooltip>
23
- </template>
24
-
25
- <script>
26
- import BtnRight from './BtnRight'
27
- /**
28
- * 通常为列表内用的按钮图标
29
- * @module HdBtn
30
- */
31
- export default {
32
- name: 'HdBtn',
33
- mixins: [BtnRight],
34
- /**
35
- * Props slot或者icon方式传入图标
36
- * @prop {String} icon svgicon的名称,或者以slot形式传入
37
- * @prop {String} hint 图标提示文字
38
- * @prop {String} vid 按钮授权时,必须指定按钮id
39
- */
40
- /* props: ['icon', 'hint', 'vid'],*/
41
- props: {
42
- noRoleManage: Boolean, // 设置不受角色控制
43
- keyMap: Array,
44
- keyType: String,
45
- hotKeyRange: { type: String, default: 'hd-com-grid' },
46
- icon: String, // svgicon的名称,或者以slot形式传入
47
- hint: String, // hint 图标提示文字
48
- vid: String, // 按钮指定id时,授权用不指定默认生成
49
- },
50
- data() {
51
- return {}
52
- },
53
- computed: {
54
- addTextProp() {
55
- let append = ''
56
- if (this.$store.getters.isSuperAdmin && this.vid) {
57
- append = '[' + this.vid + ']'
58
- }
59
-
60
- if (this.nowKeyMap && this.nowKeyMap.length == 2) {
61
- return '(' + this.nowKeyMap[1].toUpperCase() + ')' + append
62
- }
63
- return '' + append
64
- },
65
- nowKeyMap() {
66
- if (this.keyMap) {
67
- return this.keyMap
68
- } else if (this.keyType && this.$keyMap) {
69
- // $keyMap是在keymap.js配置的对象
70
- return this.$keyMap[this.keyType]
71
- }
72
- },
73
- },
74
- created() {
75
- // 列表内循环,数量无法控制,需要手工加入
76
- if (!this.noRoleManage) {
77
- if (this.$route && this.$route.meta.btnRoleCheck) {
78
- // 角色管理下激活
79
- this.addBtnMetaToParent()
80
- }
81
- }
82
- },
83
- mounted() {
84
- this.$nextTick(() => {
85
- if (this.$refs.hdbtn && this.$refs.hdbtn.referenceElm) {
86
- this.$refs.hdbtn.referenceElm.setAttribute('tabindex', -1)
87
- }
88
- })
89
- this.checkRight()
90
- },
91
- methods: {
92
- getName() {
93
- const parentName = this.$parent.$parent.$options.name
94
- if (parentName == 'ElTable') {
95
- return '[表格]_' + this.hint
96
- }
97
- return this.hint
98
- },
99
- getClass() {
100
- return 'hdBtn ' + this.icon
101
- },
102
- getType() {
103
- return 'hdBtn'
104
- },
105
- handleClick(evt) {
106
- this.$emit('click', evt)
107
- },
108
- handleTooltipClick() {},
109
- click(evt) {
110
- if (
111
- this.$attrs.disabled === undefined ||
112
- this.$attrs.disabled === false
113
- ) {
114
- this.handleClick(evt)
115
- }
116
- },
117
- },
118
- }
119
- </script>
120
-
121
- <style lang="scss" rel="stylesheet/scss">
122
- .hdBtn {
123
- cursor: pointer;
124
- }
125
- </style>
@@ -1,161 +0,0 @@
1
- <template>
2
- <ExButton
3
- ref="elbtn"
4
- v-bind="$attrs"
5
- v-if="btnRight"
6
- v-on="$listeners"
7
- :class="buttonClass"
8
- >
9
- {{ nowText() }}
10
- <hd-hot-key
11
- :hotKeyRange="hotKeyRange"
12
- :keyMap="nowKeyMap"
13
- @do="click('hotkey')"
14
- v-if="nowKeyMap"
15
- ></hd-hot-key>
16
- </ExButton>
17
- </template>
18
-
19
- <script>
20
- import BtnRight from './BtnRight'
21
-
22
- /**
23
- * 继承之 ElButton 直接用ElButton
24
- * HdButton和HdBtn覆写是为了进行按钮权限,校验形式:(name_按钮文字),没有name也行,但是如果一个菜单下多个同名按钮要分别控制就需要加name
25
- * @module HdButton
26
- */
27
- export default {
28
- name: 'HdButton',
29
- mixins: [BtnRight],
30
- data() {
31
- return {
32
- classmap: [
33
- { name: '增加', value: 'hd-bn bn-add' },
34
- { name: '新增', value: 'hd-bn bn-add' },
35
- { name: '删除', value: 'hd-bn bn-del' },
36
- { name: '保存', value: 'hd-bn bn-save' },
37
- { name: '搜索', value: 'hd-bn bn-search' },
38
- { name: '查询', value: 'hd-bn bn-search' },
39
- { name: '复制', value: 'hd-bn bn-copy' },
40
- { name: '粘贴', value: 'hd-bn bn-paste' },
41
- { name: '作废', value: 'hd-bn bn-docdel' },
42
- { name: '新建文件夹', value: 'hd-bn bn-folde' },
43
- { name: '上传', value: 'hd-bn bn-upload' },
44
- { name: '下载', value: 'hd-bn bn-download' },
45
- { name: '切换查看模式', value: 'hd-bn bn-sort' },
46
- { name: '发起', value: 'hd-bn bn-start' },
47
- { name: '刷新', value: 'hd-bn bn-refresh' },
48
- { name: '导入', value: 'hd-bn bn-import' },
49
- { name: '设置', value: 'hd-bn bn-setting' },
50
- { name: '更新', value: 'hd-bn bn-renew' },
51
- { name: '选择', value: 'hd-bn bn-selected' },
52
- { name: '读取', value: 'hd-bn bn-finished' },
53
- { name: '预览', value: 'hd-bn bn-view' },
54
- { name: '生成', value: 'hd-bn bn-create' },
55
- { name: '确定', value: 'hd-bn bn-fix' },
56
- { name: '取消', value: 'hd-bn bn-cancel' },
57
- ],
58
- }
59
- },
60
- inheritAttrs: false,
61
- /**
62
- * Props 继承ElButton的属性和事件
63
- * @prop {Boolean} noRoleManage 设置是否按钮授权时,该按钮被扫描到
64
- * @prop {Array} keyMap 绑定快捷键
65
- * @prop {String} keyType 绑定快捷键类型,keyType='del'可在keymap.js中修改匹配,keyMap有值时,此无效
66
- * @prop {String} hotKeyRange 快捷键的鼠标有效区域
67
- * @prop {String} vid 按钮授权时,按钮id,此处可以不指定会根据页面名_title生成
68
- */
69
- props: {
70
- noRoleManage: Boolean, // 设置不受角色控制
71
- keyMap: Array,
72
- keyType: String,
73
- hotKeyRange: { type: String, default: 'hd-com-grid' },
74
- vid: String, // 按钮指定id时,授权用不指定默认生成
75
- customClass: {
76
- type: String,
77
- },
78
- },
79
-
80
- components: {},
81
- created() {
82
- if (!this.noRoleManage) {
83
- if (this.$route && this.$route.meta.btnRoleCheck) {
84
- // 角色管理下激活
85
- this.addBtnMetaToParent()
86
- }
87
- }
88
- },
89
- mounted() {
90
- this.checkRight()
91
- },
92
-
93
- computed: {
94
- addTextProp() {
95
- if (this.nowKeyMap && this.nowKeyMap.length == 2) {
96
- return '(' + this.nowKeyMap[1].toUpperCase() + ')'
97
- }
98
- return ''
99
- },
100
- nowKeyMap() {
101
- if (this.keyMap) {
102
- return this.keyMap
103
- } else if (this.keyType && this.$keyMap) {
104
- //$keyMap是在keymap.js配置的对象
105
- return this.$keyMap[this.keyType]
106
- }
107
- },
108
- buttonClass() {
109
- let classObj = this.classmap.find(
110
- (v) => v.name == this.$slots.default[0].text.replace(/\s/g, '')
111
- )
112
- // console.log(this.$slots.default[0].text.replace(/\s/g,""), classObj, 'buttonClass')
113
- // console.log(this.customClass)
114
- return classObj
115
- ? `${classObj.value} ${this.customClass}`
116
- : `hd-bn bn-finished ${this.customClass}`
117
- },
118
- },
119
- methods: {
120
- nowText() {
121
- if (!this.$slots.default || this.$slots.default.length == 0) {
122
- return ''
123
- }
124
- if (this.$i18n) {
125
- // 国际化
126
- //去掉2边空格
127
- return (
128
- this.$t(this.$slots.default[0].text.replace(/(^\s*)|(\s*$)/g, '')) +
129
- this.addTextProp
130
- )
131
- } else {
132
- return this.$slots.default[0].text + this.addTextProp
133
- }
134
- },
135
- addText(text) {
136
- // 快捷键自动增加(a)等
137
- this.addTextProp = text
138
- },
139
- getName() {
140
- if (!this.$slots.default || this.$slots.default.length == 0) {
141
- return ''
142
- }
143
- return this.$slots.default[0].text.trim()
144
- },
145
- getClass() {
146
- return this.buttonClass
147
- },
148
- getType() {
149
- return 'hdButton'
150
- },
151
- click(evt) {
152
- if (
153
- this.$attrs.disabled === undefined ||
154
- this.$attrs.disabled === false
155
- ) {
156
- this.$refs.elbtn.handleClick(evt)
157
- }
158
- },
159
- },
160
- }
161
- </script>
@@ -1,106 +0,0 @@
1
- <template>
2
- <el-container>
3
- <el-main>
4
- <hd-com-grid
5
- ref="grid"
6
- :hdQuery="hdQuery"
7
- url="/webresources/login/com/ComFaceRec"
8
- >
9
- <div class="filter-container" slot="query">
10
- <el-input
11
- @keyup.enter.native="doQuery"
12
- style="width: 200px"
13
- class="filter-item"
14
- :placeholder="$t('姓名、工号')"
15
- v-model="hdQuery.query.anyQuery"
16
- >
17
- </el-input>
18
- <el-button
19
- class="filter-item"
20
- type="primary"
21
- :icon="ElIconSearch"
22
- @click="$refs.grid.doQuery()"
23
- :keyMap="['alt', 'q']"
24
- >{{ $t('搜索') }}
25
- </el-button>
26
- <el-button
27
- class="filter-item"
28
- @click="doUpload"
29
- type="primary"
30
- :icon="ElIconEdit"
31
- >{{ $t('上传照片') }}
32
- </el-button>
33
- <el-button
34
- class="filter-item"
35
- @click="$refs.faceTest.show()"
36
- type="primary"
37
- >{{ $t('识别测试') }}
38
- </el-button>
39
- <el-button
40
- class="filter-item"
41
- @click="$refs.grid.doRemoveAll()"
42
- type="danger"
43
- :keyMap="['alt', 'd']"
44
- >{{ $t('删除') }}
45
- </el-button>
46
- </div>
47
- <el-table-column
48
- width="100px"
49
- align="center"
50
- label="操作"
51
- fixed="right"
52
- >
53
- <template slot-scope="scope">
54
- <hd-btn
55
- icon="el-icon-delete"
56
- hint="删除"
57
- @click.stop="$refs.grid.doRemove(scope.row.recId)"
58
- ></hd-btn>
59
- </template>
60
- </el-table-column>
61
- <el-table-column
62
- width="100px"
63
- align="center"
64
- label="姓名"
65
- prop="name"
66
- sortable
67
- >
68
- </el-table-column>
69
- <el-table-column
70
- width="100px"
71
- align="center"
72
- label="工号"
73
- prop="workNo"
74
- sortable
75
- >
76
- </el-table-column>
77
- </hd-com-grid>
78
- </el-main>
79
- <face-pic-upload ref="upload"></face-pic-upload>
80
- <FaceRecTest ref="faceTest"></FaceRecTest>
81
- </el-container>
82
- </template>
83
-
84
- <script>
85
- import { Search as ElIconSearch, Edit as ElIconEdit } from '@element-plus/icons-vue'
86
-
87
- import FacePicUpload from './FacePicUpload.vue'
88
- import FaceRecTest from './FaceRecTest.vue'
89
-
90
- export default {
91
- data() {
92
- return {
93
- hdQuery: new HdQuery(this),
94
- ElIconSearch,
95
- ElIconEdit,
96
- }
97
- },
98
- components: { FacePicUpload, FaceRecTest },
99
- mounted() {},
100
- methods: {
101
- doUpload() {
102
- this.$refs.upload.show()
103
- },
104
- },
105
- }
106
- </script>