hd-idevvue3 3.0.0 → 3.0.1

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 (226) hide show
  1. package/README.md +22 -191
  2. package/dist/index.html +17 -0
  3. package/package.json +13 -9
  4. package/pnpm-lock.yaml +5593 -0
  5. package/src/App.vue +15 -0
  6. package/src/assets/sound/notify.wav +0 -0
  7. package/src/demo/demo.vue +43 -0
  8. package/src/demo/dropdemo.vue +43 -0
  9. package/src/demo/extsets.vue +107 -0
  10. package/src/demo/formedit.vue +145 -0
  11. package/src/demo/hightquery.vue +169 -0
  12. package/src/demo/inlineedit.vue +88 -0
  13. package/src/demo/selfdrop.vue +41 -0
  14. package/src/demo//350/241/214/345/206/205/347/272/247/350/201/224.txt +2 -0
  15. package/src/directive/el-dragDialog/drag.js +124 -0
  16. package/src/directive/el-dragDialog/index.js +13 -0
  17. package/src/errorLog.js +14 -0
  18. package/src/hdcom/BigGrid.js +173 -0
  19. package/src/hdcom/BillShow.vue +90 -0
  20. package/src/hdcom/BillUpload.vue +253 -0
  21. package/src/hdcom/BtnRight.vue +98 -0
  22. package/src/hdcom/ErrHint.vue +30 -0
  23. package/src/hdcom/ExtendColumn.vue +108 -0
  24. package/src/hdcom/ExtendCommon.js +29 -0
  25. package/src/hdcom/ExtendForm.vue +114 -0
  26. package/src/hdcom/FacePicUpload.vue +71 -0
  27. package/src/hdcom/FaceRecTest.vue +104 -0
  28. package/src/hdcom/GridChart.vue +194 -0
  29. package/src/hdcom/GridExField.vue +281 -0
  30. package/src/hdcom/GridShow.vue +238 -0
  31. package/src/hdcom/HdAside.vue +178 -0
  32. package/src/hdcom/HdBtn.vue +113 -0
  33. package/src/hdcom/HdButton.vue +137 -0
  34. package/src/hdcom/HdComFaceRec.vue +58 -0
  35. package/src/hdcom/HdComGrid.vue +776 -0
  36. package/src/hdcom/HdComQuery.vue +273 -0
  37. package/src/hdcom/HdComQueryDetail.vue +161 -0
  38. package/src/hdcom/HdComSortDetail.vue +155 -0
  39. package/src/hdcom/HdDatePicker.vue +78 -0
  40. package/src/hdcom/HdDialog.vue +63 -0
  41. package/src/hdcom/HdDrop.vue +163 -0
  42. package/src/hdcom/HdFileUpload.vue +148 -0
  43. package/src/hdcom/HdFilterBox.vue +90 -0
  44. package/src/hdcom/HdFooter.vue +149 -0
  45. package/src/hdcom/HdForm.vue +278 -0
  46. package/src/hdcom/HdFormBtn.vue +89 -0
  47. package/src/hdcom/HdFormItem.vue +35 -0
  48. package/src/hdcom/HdGctosGrid +0 -0
  49. package/src/hdcom/HdGrid.vue +825 -0
  50. package/src/hdcom/HdGridEditBtn.vue +44 -0
  51. package/src/hdcom/HdGridExt.js +219 -0
  52. package/src/hdcom/HdGridSel.vue +223 -0
  53. package/src/hdcom/HdHeader.vue +148 -0
  54. package/src/hdcom/HdHotKey.vue +81 -0
  55. package/src/hdcom/HdInputHint.vue +49 -0
  56. package/src/hdcom/HdMain.vue +43 -0
  57. package/src/hdcom/HdMessage.vue +192 -0
  58. package/src/hdcom/HdNum.vue +69 -0
  59. package/src/hdcom/HdPopSel.vue +58 -0
  60. package/src/hdcom/HdRightMenu.vue +61 -0
  61. package/src/hdcom/HdSel/SelGridFieldcod.vue +36 -0
  62. package/src/hdcom/HdTableColumn.vue +334 -0
  63. package/src/hdcom/HdTempSave.vue +140 -0
  64. package/src/hdcom/HdTree.vue +86 -0
  65. package/src/hdcom/HdTreeTable/eval.js +32 -0
  66. package/src/hdcom/HdTreeTable/index.vue +174 -0
  67. package/src/hdcom/ImportExcel.vue +143 -0
  68. package/src/hdcom/PdfShow.vue +266 -0
  69. package/src/hdcom/index.js +80 -0
  70. package/src/idev.common.js +72 -0
  71. package/src/index.js +13 -0
  72. package/src/utils/HdQuery.js +54 -0
  73. package/src/utils/comutils.js +98 -0
  74. package/src/utils/utils.js +105 -0
  75. package/src/vendor/Blob.js +179 -0
  76. package/src/vendor/Export2Excel.js +220 -0
  77. package/src/vendor/Export2Zip.js +22 -0
  78. package/src/views/layout/AppMain.vue +32 -0
  79. package/src/views/layout/HdLayout.vue +78 -0
  80. package/src/views/layout/header/ElasticSearch.vue +225 -0
  81. package/src/views/layout/header/HZRecorder.js +231 -0
  82. package/src/views/layout/header/HeaderSearch.vue +198 -0
  83. package/src/views/layout/header/Levelbar.vue +49 -0
  84. package/src/views/layout/header/MainHeader.vue +271 -0
  85. package/src/views/layout/header/Navbar.vue +105 -0
  86. package/src/views/layout/header/ScrollPane.vue +81 -0
  87. package/src/views/layout/header/TagsView.vue +210 -0
  88. package/src/views/layout/header/VocRec.vue +97 -0
  89. package/src/views/layout/header/changepswform.vue +96 -0
  90. package/src/views/layout/index.js +12 -0
  91. package/src/views/layout/menu/Hamburger.vue +45 -0
  92. package/src/views/layout/menu/HdMenu.vue +167 -0
  93. package/src/views/layout/menu/css/menu.css +288 -0
  94. package/src/views/layout/menu/index.vue +25 -0
  95. package/src/views/privilege/commsg/commsg.vue +78 -0
  96. package/src/views/privilege/commsg/commsgOrgn.vue +42 -0
  97. package/src/views/privilege/commsg/commsgRole.vue +149 -0
  98. package/src/views/privilege/commsg/commsgform.vue +160 -0
  99. package/src/views/privilege/commsg/commsgiframe.vue +33 -0
  100. package/src/views/privilege/commsg/commsgto.vue +120 -0
  101. package/src/views/privilege/commsg/commsgtoform.vue +108 -0
  102. package/src/views/privilege/commsg/commsgtrans.vue +155 -0
  103. package/src/views/privilege/exfield/comexcolumn.vue +71 -0
  104. package/src/views/privilege/exfield/comexcolumnform.vue +101 -0
  105. package/src/views/privilege/exfield/comexfield.vue +31 -0
  106. package/src/views/privilege/exfield/comexfieldform.vue +94 -0
  107. package/src/views/privilege/exfield/comexfieldsub.vue +72 -0
  108. package/src/views/privilege/index.js +42 -0
  109. package/src/views/privilege/menu/comMenu.vue +41 -0
  110. package/src/views/privilege/menu/menu.vue +133 -0
  111. package/src/views/privilege/menu/menuinfo.vue +56 -0
  112. package/src/views/privilege/menu/rolelist.vue +47 -0
  113. package/src/views/privilege/menu/userlist.vue +49 -0
  114. package/src/views/privilege/mobile/authmobileupdate.vue +69 -0
  115. package/src/views/privilege/mobile/authmobileupdateform.vue +90 -0
  116. package/src/views/privilege/orgDept/authOrgn.vue +96 -0
  117. package/src/views/privilege/orgDept/authorgnform.vue +145 -0
  118. package/src/views/privilege/orgDept/orgDept.vue +37 -0
  119. package/src/views/privilege/orgDept/orgTree.vue +88 -0
  120. package/src/views/privilege/orgDept/orgnselect.vue +134 -0
  121. package/src/views/privilege/personDept/authuser.vue +123 -0
  122. package/src/views/privilege/personDept/authuserform.vue +154 -0
  123. package/src/views/privilege/personDept/facerec.vue +117 -0
  124. package/src/views/privilege/personDept/orgncascader.vue +125 -0
  125. package/src/views/privilege/personDept/personDept.vue +31 -0
  126. package/src/views/privilege/quartz/comquartzjob.vue +65 -0
  127. package/src/views/privilege/quartz/comquartzjobform.vue +99 -0
  128. package/src/views/privilege/quartz/comquartzlog.vue +59 -0
  129. package/src/views/privilege/role/btnRole.vue +117 -0
  130. package/src/views/privilege/role/menuRole.vue +64 -0
  131. package/src/views/privilege/role/orgnRole.vue +56 -0
  132. package/src/views/privilege/role/role.vue +67 -0
  133. package/src/views/privilege/role/rolelist.vue +67 -0
  134. package/src/views/privilege/role/roleselect.vue +57 -0
  135. package/src/views/privilege/search/comsearch.vue +105 -0
  136. package/src/views/privilege/search/menu.vue +52 -0
  137. package/src/views/privilege/syscode/syscode.vue +103 -0
  138. package/src/views/privilege/syscode/sysfield.vue +66 -0
  139. package/src/views/privilege/syscode/sysfieldframe.vue +30 -0
  140. package/src/views/privilege/syslog/menulog.vue +52 -0
  141. package/src/views/privilege/syslog/syslog.vue +115 -0
  142. package/src/views/privilege/syslog/syslogconfig.vue +61 -0
  143. package/src/views/privilege/syslog/syslogform.vue +83 -0
  144. package/src/views/privilege/syslog/syslogframe.vue +26 -0
  145. package/src/views/privilege/userRole/userRole.vue +122 -0
  146. package/src/views/privilege.zip +0 -0
  147. package/vite.config.js +118 -0
  148. package/.babelrc +0 -17
  149. package/.editorconfig +0 -14
  150. package/.eslintignore +0 -3
  151. package/.npminstall.done +0 -1
  152. package/.postcssrc.js +0 -8
  153. package/LICENSE +0 -21
  154. package/Listening +0 -28
  155. package/build/build.js +0 -70
  156. package/build/check-versions.js +0 -45
  157. package/build/config.js +0 -81
  158. package/build/dev-client.js +0 -9
  159. package/build/dev-server.js +0 -93
  160. package/build/utils.js +0 -78
  161. package/build/vue-loader.conf.js +0 -12
  162. package/build/webpack.common.js +0 -37
  163. package/build/webpack.component.js +0 -36
  164. package/build/webpack.prod.conf.js +0 -38
  165. package/components.json +0 -8
  166. package/conf.js +0 -42
  167. package/config/dev.env.js +0 -6
  168. package/config/index.js +0 -43
  169. package/config/prod.env.js +0 -6
  170. package/config/sit.env.js +0 -6
  171. package/favicon.ico +0 -0
  172. package/jsdoc-vue.js +0 -12
  173. package/lib/0.index.js +0 -12573
  174. package/lib/1.index.js +0 -6
  175. package/lib/2.index.js +0 -2
  176. package/lib/idev.common.js +0 -1
  177. package/lib/idv8.common.js +0 -1
  178. package/lib/index.js +0 -49170
  179. package/lib/js/ErrHint.js +0 -1
  180. package/lib/js/HdAside.js +0 -1
  181. package/lib/js/HdBtn.js +0 -1
  182. package/lib/js/HdButton.js +0 -1
  183. package/lib/js/HdComFaceRec.js +0 -1
  184. package/lib/js/HdComGrid.js +0 -1
  185. package/lib/js/HdDatePicker.js +0 -1
  186. package/lib/js/HdDialog.js +0 -1
  187. package/lib/js/HdDrop.js +0 -1
  188. package/lib/js/HdFileUpload.js +0 -1
  189. package/lib/js/HdFooter.js +0 -1
  190. package/lib/js/HdForm.js +0 -1
  191. package/lib/js/HdFormBtn.js +0 -1
  192. package/lib/js/HdFormItem.js +0 -1
  193. package/lib/js/HdGrid.js +0 -1
  194. package/lib/js/HdGridEditBtn.js +0 -1
  195. package/lib/js/HdGridSel.js +0 -1
  196. package/lib/js/HdHeader.js +0 -1
  197. package/lib/js/HdHotkey.js +0 -1
  198. package/lib/js/HdLayout.js +0 -1
  199. package/lib/js/HdMain.js +0 -1
  200. package/lib/js/HdMessage.js +0 -1
  201. package/lib/js/HdNum.js +0 -1
  202. package/lib/js/HdPopSel.js +0 -1
  203. package/lib/js/HdSearch.js +0 -1
  204. package/lib/js/HdTableColumn.js +0 -1
  205. package/lib/js/HdTempSave.js +0 -1
  206. package/lib/js/HdTree.js +0 -1
  207. package/lib/js/HdTreeTable.js +0 -1
  208. package/lib/js/authmobileupdate.js +0 -1
  209. package/lib/js/comexfield.js +0 -1
  210. package/lib/js/commsg.js +0 -1
  211. package/lib/js/commsgto.js +0 -1
  212. package/lib/js/comquartzjob.js +0 -1
  213. package/lib/js/comquartzlog.js +0 -1
  214. package/lib/js/comsearch.js +0 -1
  215. package/lib/js/menu.js +0 -1
  216. package/lib/js/menuinfo.js +0 -1
  217. package/lib/js/orgDept.js +0 -1
  218. package/lib/js/orgTree.js +0 -1
  219. package/lib/js/personDept.js +0 -1
  220. package/lib/js/role.js +0 -1
  221. package/lib/js/sysfieldframe.js +0 -1
  222. package/lib/js/syslog.js +0 -1
  223. package/lib/js/syslogframe.js +0 -1
  224. package/lib/js/userRole.js +0 -1
  225. package/npminstall-debug.log +0 -200
  226. package/ytgvue.rar +0 -0
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <ExDialog :fullscreen="fullscreen" v-el-drag-dialog v-bind="$attrs" v-on="$listeners" :close-on-click-modal="false"
3
+ append-to-body v-if="$attrs.modal==null||$attrs.modal==true" :title="$t($attrs.title)">
4
+ <slot></slot>
5
+ <div slot="footer">
6
+ <slot name="footer"></slot>
7
+ </div>
8
+ </ExDialog>
9
+ <ExDialog :fullscreen="fullscreen" v-el-drag-dialog v-bind="$attrs" v-on="$listeners" :close-on-click-modal="false"
10
+ append-to-body class="wrapperChg" custom-class="dialogChg" v-else>
11
+ <slot></slot>
12
+ <div slot="footer">
13
+ <slot name="footer"></slot>
14
+ </div>
15
+ </ExDialog>
16
+ </template>
17
+
18
+ <script>
19
+ /**
20
+ * 继承并重写ElDialog 使弹窗可拖动
21
+ * 7.6实现 在modal=false时,可以点击底层内容
22
+ * @module HdDialog
23
+ */
24
+ import elDragDialog from '../directive/el-dragDialog' // base on element-ui
25
+ export default {
26
+ name: 'HdDialog',
27
+ directives: {elDragDialog},
28
+ inheritAttrs: false,
29
+ components: {},
30
+ data() {
31
+ return {nowFull: false}
32
+ },
33
+ mounted() {
34
+ // $(".el-dialog").draggable({handle: '.el-dialog__header'});
35
+ // $(".el-dialog__header").css("cursor", "move")
36
+ },
37
+ computed: {
38
+ fullscreen() {
39
+ if (this.nowFull) {
40
+ return true
41
+ }
42
+
43
+ if (this.$attrs.fullscreen === '' || this.$attrs.fullscreen === true) {
44
+ return true
45
+ }
46
+ }
47
+ }
48
+ }
49
+ </script>
50
+ <style rel="stylesheet/scss" lang="scss">
51
+ .wrapperChg { //为了让弹窗底层的内容可以修改,在model:false时增加class
52
+ position: static !important;
53
+ z-index: 1;
54
+ }
55
+
56
+ .dialogChg {
57
+ position: absolute !important;
58
+ z-index: 1001;
59
+ left: 0;
60
+ right: 0;
61
+ }
62
+ </style>
63
+
@@ -0,0 +1,163 @@
1
+ <template>
2
+ <el-select v-model="selVal" filterable :clearable="clearable" :placeholder="placeholder?$t(placeholder):$t('请选择')"
3
+ style="width:100%"
4
+ v-bind="$attrs" v-on="$listeners" @change="change" :filter-method="filterMe"
5
+ @visible-change="visibleChange">
6
+ <el-option v-for="item in options" :key="item.codeId" :label="item.name" :value="item.code">
7
+
8
+ <!--item[myts]可以实现动态label-->
9
+ <span style="float: left">{{ item.name }}</span>
10
+ <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
11
+ </el-option>
12
+ </el-select>
13
+ </template>
14
+
15
+ <script>
16
+ /**
17
+ * 继承ElSelect属性和事件,syscode下的field只需要传入field,其它的需要传入url
18
+ * @module HdDrop
19
+ */
20
+ export default {
21
+ name: 'HdDrop',
22
+ data() {
23
+ return {
24
+ options: [],
25
+ backUpArr: []// 备份
26
+ }
27
+ },
28
+ /**
29
+ * Props
30
+ * @prop {String} value v-model双向绑定
31
+ * @prop {String} field syscode时,传入下拉field
32
+ * @prop {String} placeholder
33
+ * @prop {String} url 不使用syscode下拉时指定url
34
+ * @prop {String} txtVal 加.sync双向绑定 选择的label
35
+ * @prop {Array} codeIn 有值时,只显示指定的code :codeIn="['A','S']"
36
+ */
37
+ props: {
38
+ value: String,
39
+ field: String,
40
+ placeholder: String,
41
+ name: String,
42
+ url: String,
43
+ txtVal: String,
44
+ codeIn: Array,
45
+ clearable: {
46
+ type: Boolean,
47
+ default: true
48
+ }
49
+ }, // 设置value为props属性-必须,name.sync(不能用)和txtVal.sync双向
50
+ inheritAttrs: false,
51
+ mounted() {
52
+ if (this.url || this.field) {
53
+ this.doQuery()
54
+ }
55
+ },
56
+ methods: {
57
+ doQuery() {
58
+ let quUrl = ''
59
+ if (!this.url) {
60
+ quUrl = '/webresources/login/privilege/SysCode/findAll?fieldCod=' + this.field
61
+ } else {
62
+ quUrl = this.url
63
+ }
64
+ this.$http.get(quUrl).then(response => {
65
+ this.options = response.data
66
+ if (this.codeIn) { // 如果options的code和codeIn相同,就显示
67
+ this.options = this.options.filter((item) => {
68
+ return this.codeIn.find(v => v == item.code)
69
+ })
70
+ }
71
+ this.backUpArr = this.options
72
+ })
73
+ },
74
+ change(val) {
75
+ this.upName(val)
76
+ //this.$emit('change', val) 不用写,el-select会传递到上层
77
+ },
78
+ visibleChange(val) { // 下拉隐藏时还原
79
+ if (!val) { // 隐藏时
80
+ this.options = this.backUpArr
81
+ }
82
+ },
83
+ filterMe(val) { // 过滤 根据name code
84
+ if (val) { // val存在
85
+ this.options = this.backUpArr.filter((item) => {
86
+ if (item.code.indexOf(val) >= 0 || item.name.indexOf(val) >= 0) {
87
+ return true
88
+ }
89
+ })
90
+ } else { // val为空时,还原数组
91
+ this.options = this.backUpArr
92
+ }
93
+ },
94
+ upName(value) {
95
+ if (!value) {
96
+ this.$emit('update:name', null)// 匹配不上
97
+ }
98
+ for (let i = 0; i < this.options.length; i++) {
99
+ if (this.options[i].code == value) {
100
+ const obj = this.options[i]
101
+ this.$emit('update:name', obj.name)// 用txtVal
102
+ this.$emit('update:txtVal', obj.name)
103
+ return true
104
+ }
105
+ }
106
+ }
107
+ },
108
+ watch: {
109
+ // // 针对编辑时,不改变 hddrop里的内容
110
+ // val: function (value) {
111
+ // for (let i = 0; i < this.options.length; i++) {
112
+ // if (this.options[i].code == value) {
113
+ // let obj = this.options[i]
114
+ // this.$emit('update:name', obj.name)
115
+ // return true
116
+ // }
117
+ // }
118
+ // },
119
+ // //针对增加编辑时,改变了hddrop里的值
120
+ // value: function (value) {
121
+ // for (let i = 0; i < this.options.length; i++) {
122
+ // if (this.options[i].code == value) {
123
+ // let obj = this.options[i]
124
+ // this.$emit('update:name', obj.name)
125
+ // return true
126
+ // }
127
+ // }
128
+ // }
129
+ url: function () {
130
+ this.doQuery()
131
+ },
132
+ field: function () {
133
+ this.doQuery()
134
+ },
135
+ codeIn: {
136
+ handler(newValue, oldValue) { // codeIn改变时计算
137
+ for (let i = 0; i < newValue.length; i++) {
138
+ if (newValue[i] != oldValue[i]) {
139
+ this.doQuery()
140
+ return true
141
+ }
142
+ }
143
+ },
144
+ deep: true
145
+ }
146
+ },
147
+ computed: {// 给外层v-model赋值
148
+ selVal: {
149
+ // 动态计算selVal的值
150
+ get: function () {
151
+ if (!this.value) { // filterMe在null时不触发,''就没问题
152
+ return ''
153
+ }
154
+ return this.value
155
+ },
156
+ set: function (val) { // v-model input
157
+ // upName(val)//更新name
158
+ this.$emit('input', val)
159
+ }
160
+ }
161
+ }
162
+ }
163
+ </script>
@@ -0,0 +1,148 @@
1
+ <template>
2
+ <el-dialog :visible.sync="fileUploadVisible" append-to-body title="文件上传" width="450px">
3
+ <el-alert :closable='false' :title="$t('点击文件即可下载')" type="warning"></el-alert>
4
+ <el-upload :action="upUrl"
5
+ :auto-upload="false"
6
+ :before-remove="beforeRemove"
7
+ :before-upload="beforeUpload"
8
+ :file-list="fileList"
9
+ :multiple="multiple"
10
+ :on-preview="handlePreview"
11
+ :on-remove="handleRemove"
12
+ :on-success="onUpSuccess"
13
+ ref="upload"
14
+ style="min-height:300px;width:400px"
15
+ v-bind="$attrs">
16
+ <el-button slot="trigger" type="primary" v-if="canEdit">{{$t('选取文件')}}</el-button>
17
+ <el-button @click="submitUpload" style="margin-left: 10px;" type="success" v-if="canEdit">{{$t('上传到服务器')}}
18
+ </el-button>
19
+ <div class="el-upload__tip" slot="tip"></div>
20
+ </el-upload>
21
+ </el-dialog>
22
+ </template>
23
+
24
+ <script>
25
+ var FileSaver = require('file-saver')
26
+ /**
27
+ * 文件上传 包括上传和下载后台idev8入口为comfileupload
28
+ * @module HdFileUpload
29
+ */
30
+
31
+ export default {
32
+ components: {},
33
+ name: 'HdFileUpload',
34
+ /**
35
+ * @prop 参考element-ui的el-upload
36
+ * */
37
+ props: {
38
+ url: {
39
+ type: String,
40
+ default: '/webresources/login/com/SysFile/comfileupload'
41
+ },
42
+ },
43
+ inheritAttrs: false,
44
+ data() {
45
+ return {
46
+ upUrl: '',
47
+ fileUploadVisible: false,
48
+ fileDownVisible: false,
49
+ fileList: [],
50
+ entityId: '',
51
+ entityName: '',
52
+ canEdit: true,
53
+ uploadNum: 0
54
+ }
55
+ },
56
+ mounted() {
57
+ },
58
+ methods: {
59
+ beforeUpload(file) {
60
+ this.uploadNum++;
61
+ },
62
+ /**
63
+ * @method open
64
+ * @param entityName 区分名
65
+ * @param entityId 区分id
66
+ * @param canEdit 是否可编辑
67
+ * @event complete 文件全部上传完结束的事件
68
+ */
69
+ open(entityName, entityId, canEdit) {
70
+ this.entityId = entityId
71
+ this.entityName = entityName
72
+ this.fileUploadVisible = true
73
+ this.canEdit = canEdit
74
+ this.upUrl = `${this.url}/upload?entityId=${this.entityId}&entityName=${this.entityName}`
75
+ this.doQuery()
76
+ },
77
+ downShow() {
78
+ this.fileDownVisible = true
79
+ },
80
+ doQuery() {
81
+ const url = `${this.url}/find?entityId=${this.entityId}&entityName=${this.entityName}`
82
+ this.$http.post(url).then(response => {
83
+ const fileLs = response.data
84
+ this.fileList = []
85
+ for (let i = 0; i < fileLs.length; i++) {
86
+ const fileOne = fileLs[i]
87
+ const oneObj = {}
88
+ oneObj.name = fileOne.fileName
89
+ oneObj.uploadId = fileOne.uploadId
90
+ this.fileList.push(oneObj)
91
+ }
92
+ })
93
+ },
94
+ submitUpload() {
95
+ this.$refs.upload.submit()
96
+ },
97
+ onUpSuccess(response, file, fileList) {
98
+ this.uploadNum--;
99
+ if (this.uploadNum == 0) {
100
+ this.$emit('complete')
101
+ }
102
+ file.uploadId = response.message
103
+ },
104
+ beforeRemove(file, fileList) {
105
+ if (!this.canEdit) {
106
+ this.$message({
107
+ type: 'error',
108
+ message: this.$t('无权删除')
109
+ })
110
+ return false
111
+ }
112
+ return this.$confirm(this.$t('确定删除') + file.name + '?').then(() => {
113
+ if (!file.uploadId) {
114
+ return true
115
+ }
116
+ this.$http.post(`${this.url}/delete?uploadId=${file.uploadId}`).then(response => {
117
+ const data = response.data
118
+ this.$message({
119
+ type: data.code == '-1' ? 'error' : 'success',
120
+ message: this.$t('操作成功')
121
+ })
122
+ if (data.code == '-1') {
123
+ return false
124
+ }
125
+ // this.doQuery()
126
+ })
127
+ })
128
+ },
129
+ handleRemove(file, fileList) {
130
+
131
+ },
132
+ handlePreview(file) {
133
+ if (!file.uploadId) {
134
+ this.$message({
135
+ type: 'error',
136
+ message: this.$t('这是未上传的文件')
137
+ })
138
+ return false
139
+ }
140
+ const url = `${this.url}/download?uploadId=${file.uploadId}`
141
+ this.$http.post(url, {}, {responseType: 'arraybuffer'}).then(response => {
142
+ var blob = new Blob([response.data])
143
+ FileSaver.saveAs(blob, file.name)
144
+ })
145
+ }
146
+ }
147
+ }
148
+ </script>
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <el-row>
3
+ <el-col :span="10" align="left">
4
+ <div class="icon" @click.stop.prevent="doShrink" v-show="shrinkVisable">
5
+ <i :class="[fa, arrowClass]" style="cursor:pointer;"/>
6
+ </div>
7
+ <div ref="searchBox" class="filter-item-box" :style="{'height':nowHeight}">
8
+ <slot>
9
+ </slot>
10
+ </div>
11
+ </el-col>
12
+ <el-col :span="4" align="left">
13
+ <div class="filter-btn-search">
14
+ <slot name="searchBtn">
15
+ </slot>
16
+ </div>
17
+ </el-col>
18
+ <el-col :span="10" align="right">
19
+ <div class="filter-btn-otheritem">
20
+ <slot name="otherBtn"></slot>
21
+ </div>
22
+ </el-col>
23
+ </el-row>
24
+ </template>
25
+
26
+ <script>
27
+ export default {
28
+ name: "HdFilterBoxTmp",
29
+ data() {
30
+ return {
31
+ arrowClass: 'fa-chevron-down',
32
+ fa: 'fa',
33
+ isShrink: false,
34
+ nowHeight: '28px',
35
+ nowWidth: null,
36
+ shrinkVisable: false
37
+ }
38
+ },
39
+ mounted() {
40
+
41
+ let elementResizeDetectorMaker = require("element-resize-detector")
42
+ let erd = elementResizeDetectorMaker()
43
+ // console.log('this.$refs.searchBox.$el', this.$refs.searchBox)
44
+ erd.listenTo(this.$refs.searchBox, element => {
45
+ if (element.scrollHeight < 40) {
46
+ this.shrinkVisable = false
47
+ } else {
48
+ this.shrinkVisable = true
49
+ }
50
+ })
51
+ },
52
+ methods: {
53
+ doShrink() {
54
+ if (this.isShrink) {
55
+ this.nowHeight = "28px"
56
+ this.arrowClass = 'fa-chevron-down'
57
+ } else {
58
+ this.nowHeight = "100%"
59
+ this.arrowClass = 'fa-chevron-up'
60
+ }
61
+ this.isShrink = !this.isShrink
62
+ },
63
+ },
64
+ computed: {
65
+ searchBoxWidth() {
66
+ // return this.nowWidth ? this.nowWidth%180 + 'px' : 'auto';
67
+ return 'auto'
68
+ }
69
+ }
70
+ }
71
+ </script>
72
+
73
+ <style scoped>
74
+ .filter-item-box {
75
+ overflow: hidden;
76
+ display: flex;
77
+ flex-wrap: wrap;
78
+ /*height: 28px;*/
79
+ }
80
+
81
+ .icon {
82
+ margin-top: 0px;
83
+ /*margin-right: 10px;*/
84
+ line-height: 28px;
85
+ font-size: 14px;
86
+ color: #bbbbbb;
87
+ float: right;
88
+ }
89
+
90
+ </style>
@@ -0,0 +1,149 @@
1
+ <template>
2
+ <ExFooter :height="nowHeight" ref="footer" style="display: flex; flex-direction: column;">
3
+ <div class="asideDrag" @mousedown="mousedown($event)" v-if="!noDrag" :class="{dragShowCls:dragShow}"
4
+ @mouseover="dragShow=true" @mouseout="dragShow=false"></div>
5
+ <div ref="moveline" class="moveline" v-show="dragFrom!=null"></div>
6
+ <div class="hdFooter">
7
+ <template v-if="title">
8
+ <div class="hd-title">
9
+ <div align="left" style="float:left">{{$t(title)}}</div>
10
+ <slot name="title"></slot>
11
+ <div align="right" v-if="arrowShow">
12
+ <i v-bind:class="[fa, arrowClass]" @click="isShrink?doShrink(false):doShrink(true)" style="cursor:pointer;">
13
+ </i>
14
+ </div>
15
+ </div>
16
+ </template>
17
+ <div style="flex:1;height: 100%;position: relative; ">
18
+ <div style="position: absolute; width: 100%;height: 100%;" v-show="!isShrink">
19
+ <slot></slot>
20
+ </div>
21
+ </div>
22
+ </div>
23
+
24
+ </ExFooter>
25
+ </template>
26
+
27
+ <script>
28
+
29
+ /**
30
+ * 覆写ElFooter,增加拖动和title
31
+ * 插槽:<slot name="title"></slot> title进行额外扩展如增加按钮等
32
+ * @module HdFooter
33
+ */
34
+ export default {
35
+ name: 'HdFooter',
36
+ component: {},
37
+ /**
38
+ * Props 继承ElFooter属性和事件,,如果仅需要elementui的ElFooter请使用ExFooter
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
+ isShrink: false, // 收缩还是展开
53
+ dragFrom: null,
54
+ iconCls: 'el-icon-d-caret',
55
+ arrowClass: 'fa-chevron-down',
56
+ fa: 'fa',
57
+ inputHeight: 0,
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-up'
77
+ } else {
78
+ this.nowHeight = this.inputHeight
79
+ this.arrowClass = 'fa-chevron-down'
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.footer.$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
105
+ }
106
+ }
107
+ },
108
+ watch: {
109
+ nowHeight(val) {
110
+
111
+ this.$emit('update:height', val);
112
+ },
113
+ width(val) {
114
+ this.nowHeight = val
115
+ }
116
+ }
117
+ }
118
+
119
+ </script>
120
+ <style rel="stylesheet/scss" lang="scss" scoped>
121
+ .hdFooter {
122
+ display: flex;
123
+ flex-direction: column;
124
+ flex: 1;
125
+ }
126
+
127
+ .asideDrag {
128
+ width: 100%;
129
+ height: 5px;
130
+ overflow: hidden;
131
+ cursor: ns-resize;
132
+ user-select: none;
133
+ }
134
+
135
+ .moveline {
136
+ width: 100%;
137
+ height: 5px;
138
+ overflow: hidden;
139
+ position: fixed;
140
+ cursor: ns-resize;
141
+ background-color: red;
142
+ z-index: 9999;
143
+ user-select: none;
144
+ }
145
+
146
+ .dragShowCls {
147
+ background-color: #409EFF;
148
+ }
149
+ </style>