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,37 +1,42 @@
1
1
  <template>
2
2
  <el-tooltip
3
+ :auto-close="2"
4
+ :show-after="500"
3
5
  v-if="btnRight"
4
6
  ref="hdbtn"
5
- :content="$t(hint+addTextProp)"
6
- :hide-after="2"
7
+ :content="$t(hint + addTextProp)"
7
8
  :enterable="true"
8
- :open-delay="500"
9
9
  placement="bottom"
10
10
  effect="light"
11
- transition="">
12
- <i :class="'hdBtn '+icon" @click="handleClick">
13
- <slot v-if="!icon"/>
14
- <hd-hot-key v-if="nowKeyMap" :hot-key-range="hotKeyRange" :key-map="nowKeyMap" @do="click('hotkey')"/>
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
+ />
15
21
  </i>
16
-
17
22
  </el-tooltip>
18
23
  </template>
19
24
 
20
25
  <script>
21
26
  import BtnRight from './BtnRight'
22
27
  /**
23
- * 通常为列表内用的按钮图标
24
- * @module HdBtn
25
- */
28
+ * 通常为列表内用的按钮图标
29
+ * @module HdBtn
30
+ */
26
31
  export default {
27
32
  name: 'HdBtn',
28
33
  mixins: [BtnRight],
29
34
  /**
30
- * Props slot或者icon方式传入图标
31
- * @prop {String} icon svgicon的名称,或者以slot形式传入
32
- * @prop {String} hint 图标提示文字
33
- * @prop {String} vid 按钮授权时,必须指定按钮id
34
- */
35
+ * Props slot或者icon方式传入图标
36
+ * @prop {String} icon svgicon的名称,或者以slot形式传入
37
+ * @prop {String} hint 图标提示文字
38
+ * @prop {String} vid 按钮授权时,必须指定按钮id
39
+ */
35
40
  /* props: ['icon', 'hint', 'vid'],*/
36
41
  props: {
37
42
  noRoleManage: Boolean, // 设置不受角色控制
@@ -40,7 +45,7 @@ export default {
40
45
  hotKeyRange: { type: String, default: 'hd-com-grid' },
41
46
  icon: String, // svgicon的名称,或者以slot形式传入
42
47
  hint: String, // hint 图标提示文字
43
- vid: String // 按钮指定id时,授权用不指定默认生成
48
+ vid: String, // 按钮指定id时,授权用不指定默认生成
44
49
  },
45
50
  data() {
46
51
  return {}
@@ -60,21 +65,26 @@ export default {
60
65
  nowKeyMap() {
61
66
  if (this.keyMap) {
62
67
  return this.keyMap
63
- } else if (this.keyType && this.$keyMap) { // $keyMap是在keymap.js配置的对象
68
+ } else if (this.keyType && this.$keyMap) {
69
+ // $keyMap是在keymap.js配置的对象
64
70
  return this.$keyMap[this.keyType]
65
71
  }
66
- }
72
+ },
67
73
  },
68
- created() { // 列表内循环,数量无法控制,需要手工加入
74
+ created() {
75
+ // 列表内循环,数量无法控制,需要手工加入
69
76
  if (!this.noRoleManage) {
70
- if (this.$route && this.$route.meta.btnRoleCheck) { // 角色管理下激活
77
+ if (this.$route && this.$route.meta.btnRoleCheck) {
78
+ // 角色管理下激活
71
79
  this.addBtnMetaToParent()
72
80
  }
73
81
  }
74
82
  },
75
83
  mounted() {
76
84
  this.$nextTick(() => {
77
- if (this.$refs.hdbtn && this.$refs.hdbtn.referenceElm) { this.$refs.hdbtn.referenceElm.setAttribute('tabindex', -1) }
85
+ if (this.$refs.hdbtn && this.$refs.hdbtn.referenceElm) {
86
+ this.$refs.hdbtn.referenceElm.setAttribute('tabindex', -1)
87
+ }
78
88
  })
79
89
  this.checkRight()
80
90
  },
@@ -95,19 +105,21 @@ export default {
95
105
  handleClick(evt) {
96
106
  this.$emit('click', evt)
97
107
  },
98
- handleTooltipClick() {
99
- },
108
+ handleTooltipClick() {},
100
109
  click(evt) {
101
- if (this.$attrs.disabled === undefined || this.$attrs.disabled === false) {
110
+ if (
111
+ this.$attrs.disabled === undefined ||
112
+ this.$attrs.disabled === false
113
+ ) {
102
114
  this.handleClick(evt)
103
115
  }
104
- }
105
- }
116
+ },
117
+ },
106
118
  }
107
-
108
119
  </script>
109
- <style rel="stylesheet/scss" lang="scss">
110
- .hdBtn {
111
- cursor: pointer;
112
- }
120
+
121
+ <style lang="scss" rel="stylesheet/scss">
122
+ .hdBtn {
123
+ cursor: pointer;
124
+ }
113
125
  </style>
@@ -1,137 +1,161 @@
1
1
  <template>
2
- <ExButton ref="elbtn"
3
- v-bind="$attrs" v-if="btnRight" v-on="$listeners" :class="buttonClass">
4
- {{nowText()}}
5
- <hd-hot-key :hotKeyRange="hotKeyRange" :keyMap="nowKeyMap" @do="click('hotkey')" v-if="nowKeyMap"></hd-hot-key>
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>
6
16
  </ExButton>
7
17
  </template>
8
18
 
9
19
  <script>
10
- import BtnRight from './BtnRight'
20
+ import BtnRight from './BtnRight'
11
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,
12
61
  /**
13
- * 继承之 ElButton 直接用ElButton
14
- * HdButton和HdBtn覆写是为了进行按钮权限,校验形式:(name_按钮文字),没有name也行,但是如果一个菜单下多个同名按钮要分别控制就需要加name
15
- * @module HdButton
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生成
16
68
  */
17
- export default {
18
- name: 'HdButton',
19
- mixins: [BtnRight],
20
- data() {
21
- return {
22
- classmap: [
23
- {name: "增加", value: "hd-bn bn-add"},
24
- {name: "新增", value: "hd-bn bn-add"},
25
- {name: "删除", value: "hd-bn bn-del"},
26
- {name: "保存", value: "hd-bn bn-save"},
27
- {name: "搜索", value: "hd-bn bn-search"},
28
- {name: "查询", value: "hd-bn bn-search"},
29
- {name: "复制", value: "hd-bn bn-copy"},
30
- {name: "粘贴", value: "hd-bn bn-paste"},
31
- {name: "作废", value: "hd-bn bn-docdel"},
32
- {name: "新建文件夹", value: "hd-bn bn-folde"},
33
- {name: "上传", value: "hd-bn bn-upload"},
34
- {name: "下载", value: "hd-bn bn-download"},
35
- {name: "切换查看模式", value: "hd-bn bn-sort"},
36
- {name: "发起", value: "hd-bn bn-start"},
37
- {name: "刷新", value: "hd-bn bn-refresh"},
38
- {name: "导入", value: "hd-bn bn-import"},
39
- {name: "设置", value: "hd-bn bn-setting"},
40
- {name: "更新", value: "hd-bn bn-renew"},
41
- {name: "选择", value: "hd-bn bn-selected"},
42
- {name: "读取", value: "hd-bn bn-finished"},
43
- {name: "预览", value: "hd-bn bn-view"},
44
- {name: "生成", value: "hd-bn bn-create"},
45
- {name: "确定", value: "hd-bn bn-fix"},
46
- {name: "取消", value: "hd-bn bn-cancel"}]
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() + ')'
47
97
  }
98
+ return ''
48
99
  },
49
- inheritAttrs: false,
50
- /**
51
- * Props 继承ElButton的属性和事件
52
- * @prop {Boolean} noRoleManage 设置是否按钮授权时,该按钮被扫描到
53
- * @prop {Array} keyMap 绑定快捷键
54
- * @prop {String} keyType 绑定快捷键类型,keyType='del'可在keymap.js中修改匹配,keyMap有值时,此无效
55
- * @prop {String} hotKeyRange 快捷键的鼠标有效区域
56
- * @prop {String} vid 按钮授权时,按钮id,此处可以不指定会根据页面名_title生成
57
- */
58
- props: {
59
- noRoleManage: Boolean, // 设置不受角色控制
60
- keyMap: Array,
61
- keyType: String,
62
- hotKeyRange: {type: String, default: 'hd-com-grid'},
63
- vid: String, // 按钮指定id时,授权用不指定默认生成
64
- customClass : {
65
- type: String
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]
66
106
  }
67
107
  },
68
-
69
- components: {},
70
- created() {
71
- if (!this.noRoleManage) {
72
- if (this.$route && this.$route.meta.btnRoleCheck) { // 角色管理下激活
73
- this.addBtnMetaToParent()
74
- }
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
75
133
  }
76
134
  },
77
- mounted() {
78
- this.checkRight()
135
+ addText(text) {
136
+ // 快捷键自动增加(a)
137
+ this.addTextProp = text
79
138
  },
80
-
81
- computed: {
82
- addTextProp() {
83
- if (this.nowKeyMap && this.nowKeyMap.length == 2) {
84
- return '(' + this.nowKeyMap[1].toUpperCase() + ')'
85
- }
139
+ getName() {
140
+ if (!this.$slots.default || this.$slots.default.length == 0) {
86
141
  return ''
87
- },
88
- nowKeyMap() {
89
- if (this.keyMap) {
90
- return this.keyMap
91
- } else if (this.keyType && this.$keyMap) {//$keyMap是在keymap.js配置的对象
92
- return this.$keyMap[this.keyType]
93
- }
94
- },
95
- buttonClass() {
96
- let classObj = this.classmap.find(v => v.name == this.$slots.default[0].text.replace(/\s/g, ""));
97
- // console.log(this.$slots.default[0].text.replace(/\s/g,""), classObj, 'buttonClass')
98
- // console.log(this.customClass)
99
- return classObj ? `${classObj.value} ${this.customClass}` : `hd-bn bn-finished ${this.customClass}`;
100
142
  }
143
+ return this.$slots.default[0].text.trim()
144
+ },
145
+ getClass() {
146
+ return this.buttonClass
101
147
  },
102
- methods: {
103
- nowText() {
104
- if (!this.$slots.default || this.$slots.default.length == 0) {
105
- return ''
106
- }
107
- if (this.$i18n) { // 国际化
108
- //去掉2边空格
109
- return this.$t(this.$slots.default[0].text.replace(/(^\s*)|(\s*$)/g, "")) + this.addTextProp
110
- } else {
111
- return this.$slots.default[0].text + this.addTextProp
112
- }
113
- },
114
- addText(text) { // 快捷键自动增加(a)等
115
- this.addTextProp = text
116
- },
117
- getName() {
118
- if (!this.$slots.default || this.$slots.default.length == 0) {
119
- return ''
120
- }
121
- return this.$slots.default[0].text.trim()
122
- },
123
- getClass(){
124
- return this.buttonClass
125
- },
126
- getType(){
127
- return 'hdButton'
128
- },
129
- click(evt) {
130
- if (this.$attrs.disabled === undefined || this.$attrs.disabled === false) {
131
- this.$refs.elbtn.handleClick(evt)
132
- }
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)
133
157
  }
134
- }
135
- }
136
-
158
+ },
159
+ },
160
+ }
137
161
  </script>
@@ -1,31 +1,78 @@
1
1
  <template>
2
2
  <el-container>
3
3
  <el-main>
4
-
5
- <hd-com-grid ref="grid" :hdQuery="hdQuery" url="/webresources/login/com/ComFaceRec">
4
+ <hd-com-grid
5
+ ref="grid"
6
+ :hdQuery="hdQuery"
7
+ url="/webresources/login/com/ComFaceRec"
8
+ >
6
9
  <div class="filter-container" slot="query">
7
- <el-input @keyup.enter.native="doQuery" style="width: 200px;" class="filter-item" :placeholder="$t('姓名、工号')"
8
- v-model="hdQuery.query.anyQuery">
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
+ >
9
17
  </el-input>
10
- <el-button class="filter-item" type="primary" icon="search" @click="$refs.grid.doQuery()"
11
- :keyMap="['alt','q']">{{$t('搜索')}}
18
+ <el-button
19
+ class="filter-item"
20
+ type="primary"
21
+ :icon="ElIconSearch"
22
+ @click="$refs.grid.doQuery()"
23
+ :keyMap="['alt', 'q']"
24
+ >{{ $t('搜索') }}
12
25
  </el-button>
13
- <el-button class="filter-item" @click="doUpload" type="primary" icon="edit">{{$t('上传照片')}}
26
+ <el-button
27
+ class="filter-item"
28
+ @click="doUpload"
29
+ type="primary"
30
+ :icon="ElIconEdit"
31
+ >{{ $t('上传照片') }}
14
32
  </el-button>
15
- <el-button class="filter-item" @click="$refs.faceTest.show()" type="primary">{{$t('识别测试')}}
33
+ <el-button
34
+ class="filter-item"
35
+ @click="$refs.faceTest.show()"
36
+ type="primary"
37
+ >{{ $t('识别测试') }}
16
38
  </el-button>
17
- <el-button class="filter-item" @click="$refs.grid.doRemoveAll()" type="danger" :keyMap="['alt','d']">{{$t('删除')}}
39
+ <el-button
40
+ class="filter-item"
41
+ @click="$refs.grid.doRemoveAll()"
42
+ type="danger"
43
+ :keyMap="['alt', 'd']"
44
+ >{{ $t('删除') }}
18
45
  </el-button>
19
-
20
46
  </div>
21
- <el-table-column width="100px" align="center" label="操作" fixed="right">
47
+ <el-table-column
48
+ width="100px"
49
+ align="center"
50
+ label="操作"
51
+ fixed="right"
52
+ >
22
53
  <template slot-scope="scope">
23
- <hd-btn icon="el-icon-delete" hint="删除" @click.stop="$refs.grid.doRemove(scope.row.recId)"></hd-btn>
54
+ <hd-btn
55
+ icon="el-icon-delete"
56
+ hint="删除"
57
+ @click.stop="$refs.grid.doRemove(scope.row.recId)"
58
+ ></hd-btn>
24
59
  </template>
25
60
  </el-table-column>
26
- <el-table-column width="100px" align="center" label="姓名" prop="name" sortable>
61
+ <el-table-column
62
+ width="100px"
63
+ align="center"
64
+ label="姓名"
65
+ prop="name"
66
+ sortable
67
+ >
27
68
  </el-table-column>
28
- <el-table-column width="100px" align="center" label="工号" prop="workNo" sortable>
69
+ <el-table-column
70
+ width="100px"
71
+ align="center"
72
+ label="工号"
73
+ prop="workNo"
74
+ sortable
75
+ >
29
76
  </el-table-column>
30
77
  </hd-com-grid>
31
78
  </el-main>
@@ -33,26 +80,27 @@
33
80
  <FaceRecTest ref="faceTest"></FaceRecTest>
34
81
  </el-container>
35
82
  </template>
36
- <script>
37
-
38
- import FacePicUpload from "./FacePicUpload.vue";
39
- import FaceRecTest from "./FaceRecTest.vue";
40
83
 
41
- export default {
42
- components: {FacePicUpload, FaceRecTest},
43
- data() {
44
- return {
45
- hdQuery: new HdQuery(this),
46
- }
47
- },
84
+ <script>
85
+ import { Search as ElIconSearch, Edit as ElIconEdit } from '@element-plus/icons'
48
86
 
49
- mounted() {
87
+ import FacePicUpload from './FacePicUpload.vue'
88
+ import FaceRecTest from './FaceRecTest.vue'
50
89
 
51
- },
52
- methods: {
53
- doUpload() {
54
- this.$refs.upload.show()
55
- }
90
+ export default {
91
+ data() {
92
+ return {
93
+ hdQuery: new HdQuery(this),
94
+ ElIconSearch,
95
+ ElIconEdit,
56
96
  }
57
- }
97
+ },
98
+ components: { FacePicUpload, FaceRecTest },
99
+ mounted() {},
100
+ methods: {
101
+ doUpload() {
102
+ this.$refs.upload.show()
103
+ },
104
+ },
105
+ }
58
106
  </script>