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,311 +0,0 @@
1
- <template>
2
- <el-dialog
3
- title="单证上传"
4
- :visible.sync="visible"
5
- width="50%"
6
- append-to-body
7
- top="2vh"
8
- >
9
- <el-container class="bill_upload_container">
10
- <el-aside width="30%">
11
- <template v-for="row in rows">
12
- <el-image
13
- :src="row.src"
14
- @click="doImageItemClick(row)"
15
- :class="{ image_list: row.fileId == hdform.fileId }"
16
- lazy
17
- ></el-image>
18
- <div class="image_list_title">{{ row.titleTxt }}</div>
19
- </template>
20
- <div class="image_list_button">
21
- <el-col :span="12">
22
- <el-button class="filter-item" @click="doGoUp" type=""
23
- >上移
24
- </el-button>
25
- </el-col>
26
- <el-col :span="12">
27
- <el-button class="filter-item" @click="doGoDown" type=""
28
- >下移
29
- </el-button>
30
- </el-col>
31
- </div>
32
- </el-aside>
33
- <el-main>
34
- <el-row>
35
- <el-image
36
- :src="hdform.src || ''"
37
- :preview-src-list="[hdform.src || '']"
38
- class="image_detail"
39
- lazy
40
- >
41
- <div slot="error" class="image-slot">
42
- <el-icon><el-icon-picture-outline /></el-icon>
43
- </div>
44
- </el-image>
45
- </el-row>
46
- <el-row>
47
- <el-upload
48
- action="/webresources/login/com/SysFile/upload"
49
- :before-upload="beforeUpload"
50
- :on-remove="handleRemove"
51
- :before-remove="beforeRemove"
52
- :limit="1"
53
- :on-exceed="handleExceed"
54
- :on-success="handleSuccess"
55
- :file-list="fileList"
56
- :show-file-list="false"
57
- accept="image/*"
58
- class="fileUpload"
59
- >
60
- <el-button class="filter-item" @click="" type="primary"
61
- >上传
62
- </el-button>
63
- </el-upload>
64
- <el-button class="filter-item" @click="" type="primary"
65
- >拍照
66
- </el-button>
67
- <el-button class="filter-item" @click="doRemove" type="danger"
68
- >删除
69
- </el-button>
70
- </el-row>
71
-
72
- <!-- <div class="button">-->
73
- <!-- -->
74
- <!-- </div>-->
75
-
76
- <el-form label-width="5px" :model.sync="hdform" ref="hdform">
77
- <el-row>
78
- <el-col :span="12" :xs="16">
79
- <el-form-item prop="billTyp" :rules="hdform.src ? $r(1) : $r(0)">
80
- <hd-drop
81
- field="BILL_TYP"
82
- v-model="hdform.billTyp"
83
- :placeholder="$t('请选择单据类型')"
84
- ></hd-drop>
85
- </el-form-item>
86
- </el-col>
87
- <el-col :span="12" :xs="16">
88
- <el-form-item
89
- prop="titleTxt"
90
- :rules="hdform.src ? $r(1, 0, 36) : $r(0, 0, 36)"
91
- >
92
- <el-input
93
- type="text"
94
- v-model="hdform.titleTxt"
95
- :placeholder="$t('请输入照片名称')"
96
- ></el-input>
97
- </el-form-item>
98
- </el-col>
99
- </el-row>
100
- <el-row>
101
- <el-form-item prop="markTxt" :rules="$r(0, 0, 100)">
102
- <el-input
103
- type="textarea"
104
- :rows="3"
105
- v-model="hdform.markTxt"
106
- placeholder="备注内容"
107
- ></el-input>
108
- </el-form-item>
109
- </el-row>
110
- </el-form>
111
- </el-main>
112
- </el-container>
113
- <div
114
- slot="footer"
115
- class="dialog-footer"
116
- align="right"
117
- style="margin-top: 10px"
118
- >
119
- <!-- :action="`/webresources/login/com/SysFileRecord/upload?billTyp=${billTyp}&billId=${hdform.billId}&orderFlag=${hdform.orderFlag}&billId=${hdform.titleTxt}&billId=${titleTxt}`"
120
- -->
121
- <el-button class="filter-item" type="primary" @click="doSave"
122
- >保存</el-button
123
- >
124
- </div>
125
- </el-dialog>
126
- </template>
127
-
128
- <script>
129
- import { PictureOutline as ElIconPictureOutline } from '@element-plus/icons-vue'
130
- export default {
131
- components: {
132
- ElIconPictureOutline,
133
- },
134
- name: 'BillUpload',
135
- props: {},
136
- data() {
137
- return {
138
- visible: false,
139
- billTyp: null,
140
- billId: null,
141
- billTypStr: null,
142
- hdform: { src: null },
143
- rows: [],
144
- fileList: [],
145
- }
146
- },
147
- methods: {
148
- show(billTyp, billId) {
149
- this.visible = true
150
- this.billTyp = billTyp
151
-
152
- this.billId = billId
153
-
154
- let hdQuery = new HdQuery()
155
- hdQuery.rows = 1000
156
- // hdQuery.query.billTyp = billTyp;
157
- hdQuery.query.billId = billId
158
- hdQuery.sort = 'orderFlag'
159
- hdQuery.order = 'asc'
160
- this.visible = true
161
- this.$http
162
- .post('/webresources/login/com/SysFileRecord/detail/find', hdQuery)
163
- .then((response) => {
164
- const data = response.data
165
- this.rows = response.data.rows
166
- // this.$set(this.hdform, "src", 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg')
167
- this.hdform = this.rows[0] || { src: null }
168
- })
169
- },
170
- doImageItemClick(row) {
171
- this.$refs['hdform'].validate((valid) => {
172
- if (!valid) {
173
- return false
174
- }
175
- this.hdform = row
176
- })
177
- },
178
- handleRemove(file, fileList) {
179
- console.log(file, fileList)
180
- },
181
- beforeUpload(file) {
182
- if (this.rows.length < 1) {
183
- return true
184
- }
185
- let flag = true
186
- this.$refs['hdform'].validate((valid) => {
187
- if (!valid) {
188
- flag = false
189
- return false
190
- }
191
- })
192
- return flag
193
- },
194
- handleExceed(files, fileList) {
195
- console.warn(
196
- `当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
197
- files.length + fileList.length
198
- } 个文件`
199
- )
200
- },
201
- handleSuccess(response) {
202
- this.hdform = {
203
- billTyp: this.hdform.billTyp || this.billTyp,
204
- billId: this.billId,
205
- titleTxt: response.data.fileName || this.hdform.titleTxt,
206
- fileId: response.data.sefileId,
207
- src: `data:image/${response.data.fileType};base64,${response.data.fileData}`,
208
- cancelFlag: '0',
209
- }
210
- this.rows.push(this.hdform)
211
- this.fileList = []
212
- },
213
- beforeRemove(file, fileList) {
214
- // return this.$confirm(`确定移除 ${file.name}?`);
215
- },
216
- doSave() {
217
- this.$refs['hdform'].validate((valid) => {
218
- if (!valid) {
219
- return false
220
- }
221
- this.rows.forEach((v, i) => {
222
- v.orderFlag = i
223
- })
224
-
225
- this.$http
226
- .post(
227
- `/webresources/login/com/SysFileRecord/saveAll?billId=${encodeURIComponent(
228
- this.billId
229
- )}`,
230
- this.rows
231
- )
232
- .then((response) => {
233
- this.rows = response.data.data
234
- this.$emit('save-ok', this.rows)
235
- this.visible = false
236
- })
237
- })
238
- },
239
- doRemove() {
240
- // this.rows = this.rows.filter(v => v.fileId != this.hdform.fileId)
241
- this.rows.remove(this.hdform)
242
- this.hdform = this.rows[0] || { src: null }
243
- },
244
- doGoUp() {
245
- const index = this.rows.findIndex((v) => v.fileId == this.hdform.fileId)
246
- console.log(index)
247
- if (index > 0) {
248
- this.swapArray(this.rows, index, index - 1)
249
- } else {
250
- this.$message({
251
- type: 'info',
252
- message: this.$t('已经处于置顶,无法上移'),
253
- })
254
- }
255
- },
256
- doGoDown() {
257
- const index = this.rows.findIndex((v) => v.fileId == this.hdform.fileId)
258
- console.log(index)
259
- if (index < this.rows.length - 1) {
260
- this.swapArray(this.rows, index + 1, index)
261
- } else {
262
- this.$message({
263
- type: 'info',
264
- message: this.$t('已经处于置底,无法下移'),
265
- })
266
- }
267
- },
268
- swapArray(arr, index1, index2) {
269
- arr[index1] = arr.splice(index2, 1, arr[index1])[0]
270
- console.log(arr)
271
- return arr
272
- },
273
- },
274
- }
275
- </script>
276
-
277
- <style scoped>
278
- .button {
279
- margin-left: 5px;
280
- }
281
-
282
- .image_detail {
283
- width: 100%;
284
- height: 310px;
285
- }
286
-
287
- .image_list {
288
- border: 2px solid;
289
- }
290
-
291
- .fileUpload {
292
- float: left;
293
- }
294
-
295
- .image_list_title {
296
- text-align: center;
297
- }
298
-
299
- .image_list_button {
300
- float: inline-end;
301
- position: sticky;
302
- bottom: 0px;
303
- background: white;
304
- width: 100%;
305
- }
306
-
307
- .bill_upload_container {
308
- height: 80vh;
309
- border: 1px solid #eee;
310
- }
311
- </style>
@@ -1,101 +0,0 @@
1
- <script>
2
- // 按钮权限专用
3
-
4
- export default {
5
- name: 'BtnRight',
6
- data() {
7
- return {
8
- btnRight: true,
9
- }
10
- },
11
- created() {},
12
- methods: {
13
- getName() {},
14
- getClass() {},
15
- getType() {},
16
- checkRight() {
17
- if (!this.$store) {
18
- // 确认提示的没有store
19
- return true
20
- }
21
- const allBtnRight = this.$store.state.user.hidBtns
22
- const permissions = this.findNameCombine()
23
- if (!permissions) {
24
- // 不需要控制权限的
25
- return true
26
- }
27
- const menuId = this.$route.name // 这里就是menuId
28
- if (allBtnRight && allBtnRight.length > 0) {
29
- for (let i = 0; i < allBtnRight.length; i++) {
30
- const one = allBtnRight[i]
31
- if (one.menuId == menuId && permissions == one.permissions) {
32
- this.btnRight = false
33
- }
34
- }
35
- }
36
- },
37
- addBtnMetaToParent() {
38
- if (!this.$route.meta.btnRole) {
39
- return false
40
- }
41
- const permissions = this.findNameCombine()
42
- if (!permissions) {
43
- return false
44
- }
45
- const btn = {
46
- name: this.getName(),
47
- permissions: permissions,
48
- buttonStyle: this.getClass(),
49
- buttonType: this.getType(),
50
- }
51
- if (!this.checkIsSame(btn)) {
52
- this.$route.meta.btnRole.push(btn)
53
- }
54
- },
55
- checkIsSame(btn) {
56
- const allLs = this.$route.meta.btnRole
57
- for (let i = 0; i < allLs.length; i++) {
58
- const one = allLs[i]
59
- if (one.permissions == btn.permissions) {
60
- return true
61
- }
62
- }
63
- return false
64
- },
65
- findNameCombine() {
66
- if (this.vid) {
67
- // 指定id的直接用id
68
- return this.vid
69
- }
70
- const result = ''
71
- const par = this.$vnode.context // 非常有用
72
- let parentName = par.$options.name // 使用name
73
- if (parentName == 'HdFormDialog') {
74
- parentName = this.findNameFromFile(par.$vnode.context.$options.name)
75
- }
76
- if (!parentName) {
77
- // 非页面按钮,没有_file不需要管理
78
- parentName = 'noname'
79
- }
80
- return parentName + '_' + this.getName()
81
- },
82
- findNameFromFile(fileName) {
83
- // 根据文件名获取 组件名
84
- if (!fileName) {
85
- return false
86
- }
87
- const arr = fileName.split('\\')
88
- const one = arr[arr.length - 1].split('.')
89
- return one[0]
90
- },
91
- findRoleSetParent() {
92
- // roleset界面时,需要设置按钮,注册
93
- let parent = this.$parent.$parent
94
- while (parent && !parent.$options.name == 'btnRole') {
95
- parent = parent.$parent
96
- }
97
- return parent
98
- },
99
- },
100
- }
101
- </script>
@@ -1,42 +0,0 @@
1
- <template>
2
- <ElTooltip
3
- effect="light"
4
- :content="errMsg"
5
- placement="bottom"
6
- v-if="errMsg"
7
- :open-delay="1"
8
- transition=""
9
- ref="errhint"
10
- >
11
- <el-icon
12
- style="
13
- color: #ff5c5c;
14
- right: 10px;
15
- top: 8px;
16
- position: absolute;
17
- z-index: 999;
18
- "
19
- ><el-icon-warning
20
- /></el-icon>
21
- </ElTooltip>
22
- </template>
23
-
24
- <script>
25
- import { Warning as ElIconWarning } from '@element-plus/icons-vue'
26
- export default {
27
- components: {
28
- ElIconWarning,
29
- },
30
- name: 'ErrHint',
31
- props: [
32
- 'errMsg',
33
- 'value', // 修改为内容变更即触发
34
- ],
35
- mounted() {},
36
- watch: {
37
- value: function (newVal, oldVal) {
38
- this.$emit('checkErr', newVal)
39
- },
40
- },
41
- }
42
- </script>
@@ -1,115 +0,0 @@
1
- <template>
2
- <el-table-column
3
- v-if="exFieldRow.columnType == 'BOOLEAN'"
4
- :key="exFieldRow.exFieldId"
5
- align="center"
6
- :input-format="$ckFt"
7
- input="el-switch"
8
- :inputProp="{ activeValue: '1', inactiveValue: '0' }"
9
- :label="exFieldRow.columnComment"
10
- :rules="genRules(exFieldRow)"
11
- :prop="exFieldRow.fieldName"
12
- sortable
13
- :width="exFieldRow.gridWidth == null ? 'auto' : exFieldRow.gridWidth"
14
- >
15
- </el-table-column>
16
- <el-table-column
17
- v-else-if="exFieldRow.columnType == 'DROP'"
18
- :key="exFieldRow.exFieldId"
19
- align="center"
20
- :input-format="(v) => genCode(v, exFieldRow.formatter)"
21
- input="HdDrop"
22
- :inputProp="{ field: exFieldRow.formatter }"
23
- :label="exFieldRow.columnComment"
24
- :rules="genRules(exFieldRow)"
25
- :prop="exFieldRow.fieldName"
26
- sortable
27
- :width="exFieldRow.gridWidth == null ? 'auto' : exFieldRow.gridWidth"
28
- >
29
- </el-table-column>
30
- <el-table-column
31
- v-else-if="exFieldRow.columnType == 'DATE'"
32
- :key="exFieldRow.exFieldId"
33
- :inputProp="genFormatter(exFieldRow.formatter)"
34
- align="center"
35
- input="el-date-picker"
36
- :label="exFieldRow.columnComment"
37
- :rules="genRules(exFieldRow)"
38
- :prop="exFieldRow.fieldName"
39
- sortable
40
- :width="exFieldRow.gridWidth == null ? 'auto' : exFieldRow.gridWidth"
41
- >
42
- </el-table-column>
43
- <el-table-column
44
- v-else-if="exFieldRow.columnType == 'NUMBER'"
45
- :key="exFieldRow.exFieldId"
46
- align="center"
47
- input="HdNum"
48
- :label="exFieldRow.columnComment"
49
- :rules="genRules(exFieldRow)"
50
- :prop="exFieldRow.fieldName"
51
- sortable
52
- :width="exFieldRow.gridWidth == null ? 'auto' : exFieldRow.gridWidth"
53
- >
54
- </el-table-column>
55
- <el-table-column
56
- v-else
57
- :key="exFieldRow.exFieldId"
58
- align="center"
59
- :label="exFieldRow.columnComment"
60
- :rules="genRules(exFieldRow)"
61
- :prop="exFieldRow.fieldName"
62
- sortable
63
- :width="exFieldRow.gridWidth == null ? 'auto' : exFieldRow.gridWidth"
64
- >
65
- </el-table-column>
66
- </template>
67
-
68
- <script>
69
- import ExtendCommon from './ExtendCommon'
70
-
71
- export default {
72
- name: 'ExtendColumn',
73
-
74
- /**
75
- * Props
76
- * @prop {String} tableName 表名
77
- */
78
- mixins: [ExtendCommon],
79
- props: {
80
- exFieldRow: Object,
81
- },
82
- data() {
83
- return {
84
- codeList: Object,
85
- }
86
- },
87
- mounted() {},
88
- methods: {
89
- genCode(value, code) {
90
- if (!this.codeList[code]) {
91
- this.codeList[code] = {}
92
- this.$http
93
- .get(`/webresources/login/privilege/SysCode/findAll?fieldCod=${code}`)
94
- .then((response) => {
95
- response.data.forEach((item) => {
96
- this.codeList[code][item.code] = item.name
97
- return this.codeList[code][value]
98
- })
99
- })
100
- } else {
101
- return this.codeList[code][value]
102
- }
103
- },
104
- getSysCode(code) {
105
- this.$http
106
- .get(`/webresources/login/privilege/SysCode/findAll?fieldCod=${code}`)
107
- .then((response) => {
108
- response.data.forEach((item) => {
109
- this.codeList[code][item.fieldCod] = item.fieldNam
110
- })
111
- })
112
- },
113
- },
114
- }
115
- </script>
@@ -1,40 +0,0 @@
1
- export default {
2
- methods: {
3
- genFormatter(formatter) {
4
- //console.log("this." + formatter)
5
- const rtn = eval('this.' + formatter)
6
- return rtn
7
- },
8
- genRules(field) {
9
- if (field.rules) {
10
- return eval('this.' + field.rules)
11
- }
12
- const require = field.columnRequire ? field.columnRequire : '0'
13
- let rules = ''
14
-
15
- if (
16
- field.columnType == 'DROP' ||
17
- field.columnType == 'DATE' ||
18
- field.columnType == 'BOOLEAN'
19
- ) {
20
- rules = 'this.$r(' + require + ')'
21
- } else if (field.columnType == 'NUMBER') {
22
- rules =
23
- 'this.$r(' +
24
- require +
25
- ', 0, ' +
26
- this.repeat('9', field.columnLen) +
27
- ",'number'," +
28
- field.formatter +
29
- ')'
30
- } else {
31
- rules = 'this.$r(' + require + ', 0, ' + field.columnLen + ')'
32
- }
33
- // console.log(rules);
34
- return eval(rules)
35
- },
36
- repeat(str, n) {
37
- return new Array(n + 1).join(str)
38
- },
39
- },
40
- }