hd-idevvue3 3.0.2 → 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 +4 -2
  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,44 +1,58 @@
1
1
  <template>
2
2
  <div>
3
- <hd-btn icon="el-icon-edit" hint="编辑" @click.stop="$vnode.context.$refs[gridRef].doEdit(row)"
4
- v-if="!row.isEdit">
3
+ <hd-btn
4
+ icon="el-icon-edit"
5
+ hint="编辑"
6
+ @click.stop="$vnode.context.$refs[gridRef].doEdit(row)"
7
+ v-if="!row.isEdit"
8
+ >
5
9
  </hd-btn>
6
- <hd-btn hint="撤销" @click.stop="$vnode.context.$refs[gridRef].doCancel(row)" v-if="row.isEdit">
7
- <svg-icon icon-class="undo"/>
10
+ <hd-btn
11
+ hint="撤销"
12
+ @click.stop="$vnode.context.$refs[gridRef].doCancel(row)"
13
+ v-if="row.isEdit"
14
+ >
15
+ <svg-icon icon-class="undo" />
8
16
  </hd-btn>
9
- <hd-btn icon="el-icon-check" hint="保存" @click.stop="$vnode.context.$refs[gridRef].doSave(row)" v-if="row.isEdit">
17
+ <hd-btn
18
+ icon="el-icon-check"
19
+ hint="保存"
20
+ @click.stop="$vnode.context.$refs[gridRef].doSave(row)"
21
+ v-if="row.isEdit"
22
+ >
10
23
  </hd-btn>
11
- <hd-btn icon="el-icon-delete" hint="删除" @click.stop="$vnode.context.$refs[gridRef].doRemove(row)"
12
- v-if="!row.isEdit">
24
+ <hd-btn
25
+ icon="el-icon-delete"
26
+ hint="删除"
27
+ @click.stop="$vnode.context.$refs[gridRef].doRemove(row)"
28
+ v-if="!row.isEdit"
29
+ >
13
30
  </hd-btn>
14
31
  </div>
15
32
  </template>
16
33
 
17
34
  <script>
18
-
19
35
  /**
20
- * GridEditBtn 列表内的增删改按钮
21
- * @module HdGridEditBtn
22
- */
36
+ * GridEditBtn 列表内的增删改按钮
37
+ * @module HdGridEditBtn
38
+ */
23
39
  export default {
24
40
  name: 'HdGridEditBtn',
25
41
  inheritAttrs: false,
26
42
  /**
27
- * Props
28
- * @prop {String} gridRef 默认为grid
29
- * @prop {Object} row 行对象
30
- */
43
+ * Props
44
+ * @prop {String} gridRef 默认为grid
45
+ * @prop {Object} row 行对象
46
+ */
31
47
  props: {
32
48
  gridRef: {
33
49
  type: String,
34
- default: 'grid'
50
+ default: 'grid',
35
51
  },
36
- row: Object
52
+ row: Object,
37
53
  },
38
54
  data() {
39
55
  return {}
40
- }
56
+ },
41
57
  }
42
-
43
58
  </script>
44
-
@@ -2,7 +2,7 @@
2
2
  export default {
3
3
  data() {
4
4
  return {
5
- rowSelNum: -1// 选中行
5
+ rowSelNum: -1, // 选中行
6
6
  }
7
7
  },
8
8
  methods: {
@@ -16,23 +16,32 @@ export default {
16
16
  const keyCode = event.keyCode
17
17
  const list = [38, 40, 37, 39]
18
18
  if (list.indexOf(keyCode) !== -1) {
19
- if (keyCode === 38) { // up
19
+ if (keyCode === 38) {
20
+ // up
20
21
  this.rowSelNum -= 1
21
22
  }
22
23
  if (keyCode === 40) {
23
24
  this.rowSelNum += 1
24
25
  }
25
- if (keyCode === 37) { // left
26
- this.hdQuery.doCurPageChange(this.hdQuery.page - 1 < 1 ? 1 : this.hdQuery.page - 1)
26
+ if (keyCode === 37) {
27
+ // left
28
+ this.hdQuery.doCurPageChange(
29
+ this.hdQuery.page - 1 < 1 ? 1 : this.hdQuery.page - 1
30
+ )
27
31
  }
28
32
  if (keyCode === 39) {
29
- let totalPageSize = (this.hdResult.total - 1) / this.hdQuery.rows + 1;
30
- this.hdQuery.doCurPageChange(this.hdQuery.page + 1 > totalPageSize ? totalPageSize : this.hdQuery.page + 1);
33
+ let totalPageSize = (this.hdResult.total - 1) / this.hdQuery.rows + 1
34
+ this.hdQuery.doCurPageChange(
35
+ this.hdQuery.page + 1 > totalPageSize
36
+ ? totalPageSize
37
+ : this.hdQuery.page + 1
38
+ )
31
39
  }
32
40
  event.stopPropagation()
33
41
  event.preventDefault()
34
42
  }
35
- if (keyCode === 13) { // Enter
43
+ if (keyCode === 13) {
44
+ // Enter
36
45
  if (this.hdQuery.selRow) {
37
46
  this.$emit('enterClick', this.hdQuery.selRow)
38
47
  this.hdQuery.selRow = null
@@ -42,7 +51,8 @@ export default {
42
51
  this.hdQuery.selRow = null
43
52
  }
44
53
  }
45
- if (event.altKey && keyCode === 13) { // alt+Enter
54
+ if (event.altKey && keyCode === 13) {
55
+ // alt+Enter
46
56
  this.$emit('altEnterClick', this.hdQuery.selRow)
47
57
  }
48
58
  },
@@ -52,30 +62,36 @@ export default {
52
62
  if (this.hdQuery) {
53
63
  this.hdQuery.selRow = this.hdResultComRows[this.rowSelNum]
54
64
  }
55
- const trSel = this.$refs.ingrid.$el.querySelectorAll('.el-table__body tr')[i]
65
+ const trSel =
66
+ this.$refs.ingrid.$el.querySelectorAll('.el-table__body tr')[i]
56
67
  if (!trSel) {
57
68
  return true
58
69
  }
59
70
 
60
- const scrollParent = this.$refs.ingrid.$el.querySelector('.el-table__body-wrapper')
71
+ const scrollParent = this.$refs.ingrid.$el.querySelector(
72
+ '.el-table__body-wrapper'
73
+ )
61
74
  const conHeigh = scrollParent.getBoundingClientRect().height
62
75
  // const cellNumPage = conHeigh / cellHeigh //当前页面有多少行
63
76
 
64
77
  const top = trSel.offsetTop
65
78
  const bottom = trSel.offsetTop + trSel.offsetHeight
66
79
  const viewRectTop = scrollParent.scrollTop
67
- const viewRectBottom = viewRectTop + scrollParent.clientHeight + trSel.clientHeight / 3// trSel.clientHeight/3确保滚出屏幕后才触发
80
+ const viewRectBottom =
81
+ viewRectTop + scrollParent.clientHeight + trSel.clientHeight / 3 // trSel.clientHeight/3确保滚出屏幕后才触发
68
82
  if (top < viewRectTop) {
69
83
  scrollParent.scrollTop = top
70
- } else if (bottom > viewRectBottom) { // 向下移动触发
84
+ } else if (bottom > viewRectBottom) {
85
+ // 向下移动触发
71
86
  scrollParent.scrollTop = scrollParent.scrollTop + trSel.clientHeight
72
87
  }
73
88
  },
74
- findLeafCol(col, leafCol, header, filterVal, par) {//获得叶子节点,并且返回叶子节点父类
89
+ findLeafCol(col, leafCol, header, filterVal, par) {
90
+ //获得叶子节点,并且返回叶子节点父类
75
91
  if (!col.children) {
76
92
  leafCol.push(col)
77
93
  if (par) {
78
- header.push(par.label + "-" + col.label)
94
+ header.push(par.label + '-' + col.label)
79
95
  } else {
80
96
  header.push(col.label)
81
97
  }
@@ -93,42 +109,52 @@ export default {
93
109
  const disColWithProp = [] //统计表头时判断
94
110
  for (let i = 0; i < this.disCol.length; i++) {
95
111
  const oneCol = this.disCol[i]
96
- if (!oneCol || (!oneCol.property && !oneCol.children) || !oneCol.showFlg || oneCol.showFlg == '0') {
112
+ if (
113
+ !oneCol ||
114
+ (!oneCol.property && !oneCol.children) ||
115
+ !oneCol.showFlg ||
116
+ oneCol.showFlg == '0'
117
+ ) {
97
118
  continue
98
119
  }
99
- this.findLeafCol(oneCol, disColWithProp, header, filterVal)//将所有的叶子节点
120
+ this.findLeafCol(oneCol, disColWithProp, header, filterVal) //将所有的叶子节点
100
121
  }
101
122
  const data = this.formatJson(filterVal, exportdata, header)
102
- const merdata = [header].concat(data)// 中文+数据
123
+ const merdata = [header].concat(data) // 中文+数据
103
124
  this.summaryAdd(merdata, filterVal.length)
104
- const title = this.$route.meta.title + new Date().format('yyyy-MM-dd HH:mm:ss')
125
+ const title =
126
+ this.$route.meta.title + new Date().format('yyyy-MM-dd HH:mm:ss')
105
127
  return { header, filterVal, merdata, title }
106
128
  },
107
129
  excelExport(exportdata) {
108
- let excelData = this.comExport(exportdata);
109
- let exportData = {};
130
+ let excelData = this.comExport(exportdata)
131
+ let exportData = {}
110
132
  if (this.excelFormatter) {
111
- exportData = this.excelFormatter(excelData);
133
+ exportData = this.excelFormatter(excelData)
112
134
  } else {
113
- let merdata = excelData.merdata;
135
+ let merdata = excelData.merdata
114
136
  if (this.excelPropHeader) {
115
- merdata = this.formatJson(excelData.filterVal, merdata);
137
+ merdata = this.formatJson(excelData.filterVal, merdata)
116
138
  }
117
139
  exportData = {
118
140
  header: merdata[0],
119
141
  data: merdata.slice(1),
120
- filename: excelData.title
142
+ filename: excelData.title,
121
143
  }
122
144
  }
123
145
  const excel = require('../vendor/Export2Excel')
124
- excel.export_json_to_excel(exportData)// excelPropHeader:是否导出prop头
146
+ excel.export_json_to_excel(exportData) // excelPropHeader:是否导出prop头
125
147
  },
126
148
  pdfExport(exportdata) {
127
149
  let { header, filterVal, merdata, title } = this.comExport(exportdata)
128
150
  this.$refs.pdfshow.genPdf(header, merdata, title)
129
151
  },
130
- summaryAdd(merdata, size) {//如果导出有合计项
131
- if (this.$attrs.showSummary == undefined && this.$attrs['show-summary'] == undefined) {
152
+ summaryAdd(merdata, size) {
153
+ //如果导出有合计项
154
+ if (
155
+ this.$attrs.showSummary == undefined &&
156
+ this.$attrs['show-summary'] == undefined
157
+ ) {
132
158
  return
133
159
  }
134
160
  const disColWithProp = [] //获取表头
@@ -156,7 +182,8 @@ export default {
156
182
  if (!jsonData || jsonData.length == 0) {
157
183
  return []
158
184
  }
159
- if (this.excelPropHeader) { // 导出所有头
185
+ if (this.excelPropHeader) {
186
+ // 导出所有头
160
187
  for (const data in jsonData[0]) {
161
188
  let isHas = false
162
189
  for (const val in filterVal) {
@@ -165,7 +192,8 @@ export default {
165
192
  break
166
193
  }
167
194
  }
168
- if (!isHas) { // 所有json属性在filterval都要有
195
+ if (!isHas) {
196
+ // 所有json属性在filterval都要有
169
197
  filterVal.push(data)
170
198
  }
171
199
  }
@@ -174,33 +202,36 @@ export default {
174
202
  if (this.noExcelExport) {
175
203
  noExLs = noExLs.concat(this.noExcelExport)
176
204
  }
177
- for (let j = 0; j < noExLs.length; j++) { // 不需要导出的属性,header也需要删除
205
+ for (let j = 0; j < noExLs.length; j++) {
206
+ // 不需要导出的属性,header也需要删除
178
207
  const index = filterVal.removeone(noExLs[j])
179
208
  if (index != -1) {
180
209
  header.splice(index, 1)
181
210
  }
182
211
  }
183
- return jsonData.map(v => filterVal.map(j => {
184
- try {
185
- const inFt = this.getInputFormat(j) //支持多级prop如果有inutFormat会使用inputFormt
186
- if (inFt) {
187
- return inFt(v, j)
188
- } else {
189
- return v[j] + ''// 数字变为字符串
212
+ return jsonData.map((v) =>
213
+ filterVal.map((j) => {
214
+ try {
215
+ const inFt = this.getInputFormat(j) //支持多级prop如果有inutFormat会使用inputFormt
216
+ if (inFt) {
217
+ return inFt(v, j)
218
+ } else {
219
+ return v[j] + '' // 数字变为字符串
220
+ }
221
+ } catch (err) {
222
+ //不存在时,直接返回空
223
+ console.info(err)
224
+ return null
190
225
  }
191
- } catch (err) {//不存在时,直接返回空
192
- console.info(err)
193
- return null
194
- }
195
- }
196
- ))
226
+ })
227
+ )
197
228
  },
198
229
  },
199
230
  watch: {
200
-
201
231
  rowSelNum: function (val, oldVal) {
202
232
  if (val < 0) {
203
- if (this.hdResult.rows.length == 0) { // 没有数据时不选中
233
+ if (this.hdResult.rows.length == 0) {
234
+ // 没有数据时不选中
204
235
  this.rowSelNum = -1
205
236
  return false
206
237
  } else {
@@ -214,6 +245,6 @@ export default {
214
245
  this.hdQuery.selRow = this.hdResult.rows[this.rowSelNum]
215
246
  }
216
247
  this.setCurrentRow(this.rowSelNum, val - oldVal > 0) // >0是下移动,<0是上移
217
- }
218
- }
248
+ },
249
+ },
219
250
  }