apply-clients 3.4.2 → 3.4.3

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 (85) hide show
  1. package/android.html +23 -23
  2. package/build/dev-server.js +119 -119
  3. package/build/webpack.base.conf.js +2 -1
  4. package/build/webpack.dev.conf.js +12 -0
  5. package/dingding.html +23 -0
  6. package/index.html +33 -33
  7. package/package.json +2 -1
  8. package/src/AndroidApp.vue +35 -35
  9. package/src/DingDingApp.vue +51 -0
  10. package/src/android.js +21 -21
  11. package/src/apply.js +7 -1
  12. package/src/applyAndroid.js +32 -32
  13. package/src/applyDingDing.js +12 -0
  14. package/src/components/android/AppOnetomany.vue +301 -301
  15. package/src/components/android/AppServiceView.vue +566 -566
  16. package/src/components/android/AppSign.vue +142 -142
  17. package/src/components/android/AppTakePic.vue +143 -143
  18. package/src/components/android/Process/AppExplorationUser.vue +320 -320
  19. package/src/components/android/Process/AppServiceControl.vue +757 -757
  20. package/src/components/android/Process/Processes/AppInstallationDetails.vue +456 -456
  21. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -64
  22. package/src/components/android/Supervisory/AppSupervisoryCart.vue +121 -121
  23. package/src/components/android/TaskGraph.vue +125 -125
  24. package/src/components/product/Business/BusinessApply.vue +269 -0
  25. package/src/components/product/Business/CivilApply.vue +269 -0
  26. package/src/components/product/Function/InstallFunction.vue +131 -125
  27. package/src/components/product/Function/InstallInfoSelect.vue +300 -292
  28. package/src/components/product/Function/Service/FunctionServiceControl.vue +420 -222
  29. package/src/components/product/GroupByApply/ApplyGroupByList.vue +253 -0
  30. package/src/components/product/GroupByApply/ApplyGroupByMain.vue +53 -0
  31. package/src/components/product/GroupByApply/ApplyGroupByPaper.vue +376 -0
  32. package/src/components/product/Material/MaterialDetailed.vue +262 -0
  33. package/src/components/product/Onetomany.vue +377 -377
  34. package/src/components/product/Print/BuildOrder/buildOrderList.vue +339 -0
  35. package/src/components/product/Print/BuildOrder/printBuildOrder.vue +157 -0
  36. package/src/components/product/Print/IgnitionBill/IgnitionBill.vue +259 -0
  37. package/src/components/product/Print/IgnitionBill/printIgnitionBill.vue +168 -0
  38. package/src/components/product/Process/ExplorationSelect.vue +7 -0
  39. package/src/components/product/Process/ExplorationUser.vue +138 -138
  40. package/src/components/product/Process/Processes/InstallationDetails.vue +592 -592
  41. package/src/components/product/Process/Processes/Print/printCharge.vue +142 -142
  42. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +207 -207
  43. package/src/components/product/Process/Processes/chargeManagement.vue +638 -639
  44. package/src/components/product/Process/Service/ServiceControl.vue +10 -10
  45. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  46. package/src/components/product/ServiceView.vue +631 -631
  47. package/src/components/product/Stop/StopApply.vue +105 -103
  48. package/src/components/product/Stop/StopApplyList.vue +269 -269
  49. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +186 -186
  50. package/src/components/product/Supervisory/SupervisoryControl.vue +100 -100
  51. package/src/components/product/Supervisory/SupervisoryList.vue +233 -233
  52. package/src/components/product/Supervisory/SupervisoryhCart.vue +107 -107
  53. package/src/components/product/VueUtils/ApplyUpload.vue +273 -273
  54. package/src/components/product/VueUtils/HighMeter.vue +208 -208
  55. package/src/dingding.js +19 -0
  56. package/src/expandcssAndroid.less +1034 -1034
  57. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -731
  58. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
  59. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
  60. package/src/filiale/yuchuan/android/Sign/AppSignTask.vue +182 -182
  61. package/src/filiale/yuchuan/android/Sign/BuildSign.vue +50 -50
  62. package/src/filiale/yuchuan/android/Sign/ConstructSign.vue +50 -50
  63. package/src/filiale/yuchuan/android/Sign/DesignSign.vue +50 -50
  64. package/src/filiale/yuchuan/android/Sign/SupervisorSign.vue +50 -50
  65. package/src/filiale/yuchuan/android/Task/Build/BuildTsak.vue +60 -60
  66. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +60 -60
  67. package/src/filiale/yuchuan/android.js +14 -14
  68. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
  69. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +343 -343
  70. package/src/filiale/yuchuan/pc/Print/BuildOrder/buildOrderList.vue +264 -0
  71. package/src/filiale/yuchuan/pc/Print/BuildOrder/printBuildOrder.vue +152 -0
  72. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +149 -149
  73. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +67 -67
  74. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
  75. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
  76. package/src/filiale/yuchuan/pc/Process/Processes/Print/printCharge.vue +125 -0
  77. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -470
  78. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1074
  79. package/src/filiale/yuchuan/pc/Sign/SignRecord.vue +24 -0
  80. package/src/filiale/yuchuan/pc/Sign/SignRecordList.vue +174 -0
  81. package/src/filiale/yuchuan/pc.js +20 -12
  82. package/src/main.js +1 -1
  83. package/src/components/product/Function/StopApplyCrrdList.vue +0 -176
  84. package/src/components/product/Function/functions/ApplyRecordCancel.vue +0 -102
  85. package/src/components/product/Function/functions/StopInstall.vue +0 -106
@@ -1,273 +1,273 @@
1
- <template>
2
- <div class="col-sm-12" style="background-color: #FFFFFF">
3
- <div class="col-sm-12" style="padding:50px 100px;height: 25%">
4
- <div class="form-group col-sm-5" v-if="issearch">
5
- <v-select
6
- class="select select_list"
7
- :value.sync="useType"
8
- width="90%"
9
- v-model="useType"
10
- :options='typeOfUse'
11
- :valueSingle="true"></v-select>
12
- </div>
13
- <div class="form-group col-sm-2" style="text-align: center" v-if="issearch">
14
- <button type="button" class="btn btn-primary item_btn" @click="load">搜索</button>
15
- </div>
16
- <div class="form-group col-sm-2" style="text-align: center" v-if="isupload">
17
- <button type="button" class="btn btn-primary item_btn" @click="showUpload = !showUpload">本地上传</button>
18
- </div>
19
- <div class="form-group col-sm-2" style="text-align: center" v-if="takeimg">
20
- <button type="button" class="btn btn-primary item_btn" @click="upload()">拍照</button>
21
- </div>
22
- </div>
23
- <hr style="width: 90%;margin: 0px auto;border: #999999 1px solid;"/>
24
- <div class="col-sm-12" style="overflow: scroll;height: 75%">
25
- <div :class="bootstraped ? bootstraped + ' showData' : 'col-sm-6 showData'" v-for="row in fileInfoData">
26
- <div class="col-sm-12 item">
27
- <div class="left col-sm-5">
28
- <a href="#" class="thumbnail" style="width: 100%;height: 100%">
29
- <img v-if="row.f_filetype === 'jpg'||row.f_filetype === 'png'||row.f_filetype === 'gif'||row.f_filetype === 'bmp'" :src="row.f_downloadURL" alt="..."/>
30
- <img v-if="row.f_filetype === 'pdf'" src="../../image/pdf.jpg" alt="" />
31
- <img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../image/excel.jpg" alt="" />
32
- <img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../image/doc.jpg" alt="" />
33
- </a>
34
- </div>
35
- <div class="right col-sm-7">
36
- <p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
37
- <p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
38
- <p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
39
- <p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
40
- <p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
41
- <p class="clears">
42
- <a v-if="row.f_filetype === 'jpg' || row.f_filetype==='png' || row.f_filetype==='gif' || row.f_filetype==='bmp'" :href="row.f_downloadURL" style="background:#6aa6e2" class="btn btn-primary" target="_blank" role="button">预览</a>
43
- <a v-else @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
44
- <a v-if="isdelete" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
45
- </p>
46
- </div>
47
- </div>
48
- </div>
49
- </div>
50
- </div>
51
- <apply-high-meter
52
- v-if="showhighmeter"
53
- :show.sync="showhighmeter"
54
- :isusetype="isusetype"
55
- :isremark="isremark"
56
- @photo-finish="newPhoto"
57
- v-ref:ltgao
58
- ></apply-high-meter>
59
- <modal :show.sync="showUpload" v-ref:modal backdrop="false">
60
- <header slot="modal-header" class="modal-header">
61
- <button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
62
- <h4 class="modal-title" style="text-align: center">文件上传</h4>
63
- </header>
64
- <article slot="modal-body" class="modal-body form-horizontal">
65
- <div class="form-group" style="text-align: center">
66
- <file-upload class="my-file-uploader" :name="'myFile' + blodid"
67
- action="rs/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
68
- </div>
69
- <div class="form-group" v-if="isusetype">
70
- <label class="col-sm-2 control-label">文件类型:</label>
71
- <div class="col-sm-10">
72
- <input-select
73
- class="select select_list"
74
- :value.sync="headers.fusetype"
75
- v-model="headers.fusetype"
76
- :options="$appdata.getParam('使用类型')"
77
- :valueSingle="true"></input-select>
78
- </div>
79
- </div>
80
- <div class="form-group" v-if="isremark">
81
- <label class="col-sm-2 control-label">文件说明:</label>
82
- <div class="col-sm-10">
83
- <input class="form-control input_view" style=""
84
- v-model="headers.fremarks"
85
- :value="headers.fremarks"/>
86
- </div>
87
- </div>
88
- </article>
89
- <footer slot="modal-footer" class="modal-footer">
90
- </footer>
91
- </modal>
92
- </template>
93
-
94
- <script>
95
- import {HttpResetClass} from 'vue-client'
96
- import {isEmpty} from "../../Util";
97
- export default {
98
- title: '附件',
99
- props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch'],
100
- data () {
101
- return {
102
- fileInfoData: [], // 数据库存储的文件记录对象数组
103
- headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
104
- showUpload: false, // 上传模态框控制
105
- showhighmeter: false, // 高拍仪组件控制
106
- useType: null
107
- }
108
- },
109
- ready () {
110
- this.headers.blodid = this.blodid
111
- this.headers.businessid = this.businessid
112
- this.headers.defname = this.defname
113
- if (this.blodid || this.businessid) {
114
- this.load()
115
- }
116
- },
117
- methods: {
118
- delet(index, row) {
119
- this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
120
- this.$dispatch("delResid",row.id)
121
- this.load()
122
- })
123
- },
124
- // 下载
125
- downloadfile(filepath){
126
- var link = document.createElement('a');
127
- link.href = filepath;
128
- link.target='_blank'
129
- link.dispatchEvent(new MouseEvent('click'));
130
- },
131
- // 关闭文件上传对话框
132
- close () {
133
- this.showUpload = false
134
- this.showhighmeter = false
135
- // 将选的文件清空
136
- this.$refs.file.$el.querySelector('input').value = ''
137
- this.headers.fusetype = ''
138
- this.headers.fremarks = ''
139
- this.load()
140
- },
141
- // 查询
142
- async load() {
143
- let condition = ''
144
- if(this.businessid){
145
- condition = `f_businessid= '${this.headers.businessid}' `
146
- }else{
147
- condition = `f_blobid= '${this.headers.blodid}' `
148
- }
149
- if (!isEmpty(this.useType)) {
150
- condition += `and fusetype like '${this.useType}'`
151
- }
152
- let http = new HttpResetClass()
153
- let data = {
154
- tablename: 't_files',
155
- condition: condition + ` order by f_uploaddate desc `
156
- }
157
- let getFile = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
158
- warnMsg: null,
159
- resolveMsg: null
160
- })
161
-
162
- for (var i = 0; i < getFile.data.length; i++) {
163
- // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
164
- if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
165
- getFile.data.splice(i,1)
166
- i--
167
- continue
168
- }
169
- let temp = getFile.data[i].f_downloadpath
170
- let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
171
- getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
172
- }
173
- this.fileInfoData = []
174
- this.fileInfoData = getFile.data
175
- },
176
- // 打开高拍仪
177
- upload () {
178
- if(this.showhighmeter){
179
- this.$refs.ltgao.closeVideo()
180
- }
181
- this.showhighmeter = !this.showhighmeter
182
- },
183
- // 高拍仪回调
184
- newPhoto(Imgbase64, fusetype, fremarks) {
185
- this.headers.fusetype = fusetype
186
- this.headers.fremarks = fremarks
187
-
188
- let form = new FormData()
189
- let xhr = new XMLHttpRequest()
190
- let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
191
- form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
192
- form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
193
- xhr.open("POST", "rs/file/uploadFile")
194
-
195
- if (this.headers) {
196
- for (var header in this.headers) {
197
- xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
198
- }
199
- }
200
- xhr.send(form)
201
- setTimeout(() => {
202
- this.close()
203
- }, 5000)
204
- },
205
- convertBase64ToBlob(base64String) {
206
- // 将base64解码
207
- var bytes = atob(base64String);
208
- //var bytes = base64;
209
- var bytesCode = new ArrayBuffer(bytes.length);
210
- // 转换为类型化数组
211
- var byteArray = new Uint8Array(bytesCode);
212
-
213
- // 将base64转换为ascii码
214
- for (var i = 0; i < bytes.length; i++) {
215
- byteArray[i] = bytes.charCodeAt(i);
216
- }
217
- // 生成Blob对象(文件对象)
218
- return new Blob([bytesCode], {type: 'image/jpeg'});
219
- },
220
- },
221
- computed: {
222
- typeOfUse () {
223
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
224
- }
225
- },
226
- events: {
227
- onFileUpload: function (file, res) {
228
- this.$dispatch("resid",res.id)
229
- this.headers.fremarks=''
230
- this.close()
231
- }
232
- }
233
- }
234
- </script>
235
-
236
- <style scoped>
237
- .clears{
238
- overflow:hidden;
239
- text-overflow:ellipsis;
240
- white-space:nowrap;
241
- }
242
- .showData {
243
- padding: 15px 10px 0px 10px;
244
- box-sizing: border-box;
245
- height: 230px;
246
- font-family: "微软雅黑";
247
- }
248
- .showData .item{
249
- padding-bottom: 10px;
250
- border-bottom: solid 1px #c1c1c1;
251
- }
252
- .left {
253
- padding-right: 10px;
254
- }
255
- .left img{
256
- height: 100%;
257
- width: 100%;
258
- }
259
- .right{
260
- height: 100%;
261
- /*display: -webkit-flex;*/
262
- /*display: flex;*/
263
- /*flex-direction: column;*/
264
- /*justify-content: space-around;*/
265
- }
266
- .item_btn{
267
- width: 80%;
268
- background-color: #6aa6e2;
269
- border-radius: 4px;
270
- color: #FFFFFF;
271
- font-family: PingFang;
272
- }
273
- </style>
1
+ <template>
2
+ <div class="col-sm-12" style="background-color: #FFFFFF">
3
+ <div class="col-sm-12" style="padding:50px 100px;height: 25%">
4
+ <div class="form-group col-sm-5" v-if="issearch">
5
+ <v-select
6
+ class="select select_list"
7
+ :value.sync="useType"
8
+ width="90%"
9
+ v-model="useType"
10
+ :options='typeOfUse'
11
+ :valueSingle="true"></v-select>
12
+ </div>
13
+ <div class="form-group col-sm-2" style="text-align: center" v-if="issearch">
14
+ <button type="button" class="btn btn-primary item_btn" @click="load">搜索</button>
15
+ </div>
16
+ <div class="form-group col-sm-2" style="text-align: center" v-if="isupload">
17
+ <button type="button" class="btn btn-primary item_btn" @click="showUpload = !showUpload">本地上传</button>
18
+ </div>
19
+ <div class="form-group col-sm-2" style="text-align: center" v-if="takeimg">
20
+ <button type="button" class="btn btn-primary item_btn" @click="upload()">拍照</button>
21
+ </div>
22
+ </div>
23
+ <hr style="width: 90%;margin: 0px auto;border: #999999 1px solid;"/>
24
+ <div class="col-sm-12" style="overflow: scroll;height: 75%">
25
+ <div :class="bootstraped ? bootstraped + ' showData' : 'col-sm-6 showData'" v-for="row in fileInfoData">
26
+ <div class="col-sm-12 item">
27
+ <div class="left col-sm-5">
28
+ <a href="#" class="thumbnail" style="width: 100%;height: 100%">
29
+ <img v-if="row.f_filetype === 'jpg'||row.f_filetype === 'png'||row.f_filetype === 'gif'||row.f_filetype === 'bmp'" :src="row.f_downloadURL" alt="..."/>
30
+ <img v-if="row.f_filetype === 'pdf'" src="../../image/pdf.jpg" alt="" />
31
+ <img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../image/excel.jpg" alt="" />
32
+ <img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../image/doc.jpg" alt="" />
33
+ </a>
34
+ </div>
35
+ <div class="right col-sm-7">
36
+ <p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
37
+ <p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
38
+ <p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
39
+ <p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
40
+ <p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
41
+ <p class="clears">
42
+ <a v-if="row.f_filetype === 'jpg' || row.f_filetype==='png' || row.f_filetype==='gif' || row.f_filetype==='bmp'" :href="row.f_downloadURL" style="background:#6aa6e2" class="btn btn-primary" target="_blank" role="button">预览</a>
43
+ <a v-else @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
44
+ <a v-if="isdelete" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
45
+ </p>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ <apply-high-meter
52
+ v-if="showhighmeter"
53
+ :show.sync="showhighmeter"
54
+ :isusetype="isusetype"
55
+ :isremark="isremark"
56
+ @photo-finish="newPhoto"
57
+ v-ref:ltgao
58
+ ></apply-high-meter>
59
+ <modal :show.sync="showUpload" v-ref:modal backdrop="false">
60
+ <header slot="modal-header" class="modal-header">
61
+ <button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
62
+ <h4 class="modal-title" style="text-align: center">文件上传</h4>
63
+ </header>
64
+ <article slot="modal-body" class="modal-body form-horizontal">
65
+ <div class="form-group" style="text-align: center">
66
+ <file-upload class="my-file-uploader" :name="'myFile' + blodid"
67
+ action="rs/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
68
+ </div>
69
+ <div class="form-group" v-if="isusetype">
70
+ <label class="col-sm-2 control-label">文件类型:</label>
71
+ <div class="col-sm-10">
72
+ <input-select
73
+ class="select select_list"
74
+ :value.sync="headers.fusetype"
75
+ v-model="headers.fusetype"
76
+ :options="$appdata.getParam('使用类型')"
77
+ :valueSingle="true"></input-select>
78
+ </div>
79
+ </div>
80
+ <div class="form-group" v-if="isremark">
81
+ <label class="col-sm-2 control-label">文件说明:</label>
82
+ <div class="col-sm-10">
83
+ <input class="form-control input_view" style=""
84
+ v-model="headers.fremarks"
85
+ :value="headers.fremarks"/>
86
+ </div>
87
+ </div>
88
+ </article>
89
+ <footer slot="modal-footer" class="modal-footer">
90
+ </footer>
91
+ </modal>
92
+ </template>
93
+
94
+ <script>
95
+ import {HttpResetClass} from 'vue-client'
96
+ import {isEmpty} from "../../Util";
97
+ export default {
98
+ title: '附件',
99
+ props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch'],
100
+ data () {
101
+ return {
102
+ fileInfoData: [], // 数据库存储的文件记录对象数组
103
+ headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
104
+ showUpload: false, // 上传模态框控制
105
+ showhighmeter: false, // 高拍仪组件控制
106
+ useType: null
107
+ }
108
+ },
109
+ ready () {
110
+ this.headers.blodid = this.blodid
111
+ this.headers.businessid = this.businessid
112
+ this.headers.defname = this.defname
113
+ if (this.blodid || this.businessid) {
114
+ this.load()
115
+ }
116
+ },
117
+ methods: {
118
+ delet(index, row) {
119
+ this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
120
+ this.$dispatch("delResid",row.id)
121
+ this.load()
122
+ })
123
+ },
124
+ // 下载
125
+ downloadfile(filepath){
126
+ var link = document.createElement('a');
127
+ link.href = filepath;
128
+ link.target='_blank'
129
+ link.dispatchEvent(new MouseEvent('click'));
130
+ },
131
+ // 关闭文件上传对话框
132
+ close () {
133
+ this.showUpload = false
134
+ this.showhighmeter = false
135
+ // 将选的文件清空
136
+ this.$refs.file.$el.querySelector('input').value = ''
137
+ this.headers.fusetype = ''
138
+ this.headers.fremarks = ''
139
+ this.load()
140
+ },
141
+ // 查询
142
+ async load() {
143
+ let condition = ''
144
+ if(this.businessid){
145
+ condition = `f_businessid= '${this.headers.businessid}' `
146
+ }else{
147
+ condition = `f_blobid= '${this.headers.blodid}' `
148
+ }
149
+ if (!isEmpty(this.useType)) {
150
+ condition += `and fusetype like '${this.useType}'`
151
+ }
152
+ let http = new HttpResetClass()
153
+ let data = {
154
+ tablename: 't_files',
155
+ condition: condition + ` order by f_uploaddate desc `
156
+ }
157
+ let getFile = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
158
+ warnMsg: null,
159
+ resolveMsg: null
160
+ })
161
+
162
+ for (var i = 0; i < getFile.data.length; i++) {
163
+ // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
164
+ if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
165
+ getFile.data.splice(i,1)
166
+ i--
167
+ continue
168
+ }
169
+ let temp = getFile.data[i].f_downloadpath
170
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
171
+ getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
172
+ }
173
+ this.fileInfoData = []
174
+ this.fileInfoData = getFile.data
175
+ },
176
+ // 打开高拍仪
177
+ upload () {
178
+ if(this.showhighmeter){
179
+ this.$refs.ltgao.closeVideo()
180
+ }
181
+ this.showhighmeter = !this.showhighmeter
182
+ },
183
+ // 高拍仪回调
184
+ newPhoto(Imgbase64, fusetype, fremarks) {
185
+ this.headers.fusetype = fusetype
186
+ this.headers.fremarks = fremarks
187
+
188
+ let form = new FormData()
189
+ let xhr = new XMLHttpRequest()
190
+ let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
191
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
192
+ form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
193
+ xhr.open("POST", "rs/file/uploadFile")
194
+
195
+ if (this.headers) {
196
+ for (var header in this.headers) {
197
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
198
+ }
199
+ }
200
+ xhr.send(form)
201
+ setTimeout(() => {
202
+ this.close()
203
+ }, 5000)
204
+ },
205
+ convertBase64ToBlob(base64String) {
206
+ // 将base64解码
207
+ var bytes = atob(base64String);
208
+ //var bytes = base64;
209
+ var bytesCode = new ArrayBuffer(bytes.length);
210
+ // 转换为类型化数组
211
+ var byteArray = new Uint8Array(bytesCode);
212
+
213
+ // 将base64转换为ascii码
214
+ for (var i = 0; i < bytes.length; i++) {
215
+ byteArray[i] = bytes.charCodeAt(i);
216
+ }
217
+ // 生成Blob对象(文件对象)
218
+ return new Blob([bytesCode], {type: 'image/jpeg'});
219
+ },
220
+ },
221
+ computed: {
222
+ typeOfUse () {
223
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
224
+ }
225
+ },
226
+ events: {
227
+ onFileUpload: function (file, res) {
228
+ this.$dispatch("resid",res.id)
229
+ this.headers.fremarks=''
230
+ this.close()
231
+ }
232
+ }
233
+ }
234
+ </script>
235
+
236
+ <style scoped>
237
+ .clears{
238
+ overflow:hidden;
239
+ text-overflow:ellipsis;
240
+ white-space:nowrap;
241
+ }
242
+ .showData {
243
+ padding: 15px 10px 0px 10px;
244
+ box-sizing: border-box;
245
+ height: 230px;
246
+ font-family: "微软雅黑";
247
+ }
248
+ .showData .item{
249
+ padding-bottom: 10px;
250
+ border-bottom: solid 1px #c1c1c1;
251
+ }
252
+ .left {
253
+ padding-right: 10px;
254
+ }
255
+ .left img{
256
+ height: 100%;
257
+ width: 100%;
258
+ }
259
+ .right{
260
+ height: 100%;
261
+ /*display: -webkit-flex;*/
262
+ /*display: flex;*/
263
+ /*flex-direction: column;*/
264
+ /*justify-content: space-around;*/
265
+ }
266
+ .item_btn{
267
+ width: 80%;
268
+ background-color: #6aa6e2;
269
+ border-radius: 4px;
270
+ color: #FFFFFF;
271
+ font-family: PingFang;
272
+ }
273
+ </style>