apply-clients 3.5.4-8 → 3.5.4-80

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 (103) hide show
  1. package/build/dev-server.js +6 -2
  2. package/package.json +2 -2
  3. package/src/App.vue +4 -4
  4. package/src/apply.js +2 -3
  5. package/src/applyAndroid.js +2 -0
  6. package/src/assets//344/270/213/350/275/275.png +0 -0
  7. package/src/components/android/AppCheckTakePic.vue +168 -0
  8. package/src/components/android/Process/AppServiceControl.vue +4 -0
  9. package/src/components/android/Process/Processes/AppChargeManagementNew.vue +637 -0
  10. package/src/components/image/dxf.png +0 -0
  11. package/src/components/product/Function/Service/FunctionServiceControl.vue +1 -1
  12. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  13. package/src/components/product/MaterialsManage/MaterialsBase.vue +5 -1
  14. package/src/components/product/MaterialsManage/MaterialsManage.vue +2 -2
  15. package/src/components/product/PcZhihuanManagement.vue +160 -0
  16. package/src/components/product/Process/ExplorationSelect.vue +4 -1
  17. package/src/components/product/Process/ExplorationUser.vue +1 -0
  18. package/src/components/product/Process/Processes/chargeManagement.vue +1 -1
  19. package/src/components/product/ServiceView.vue +22 -1
  20. package/src/components/product/Supervisory/SupervisoryControl.vue +1 -0
  21. package/src/filiale/baiyin/android/AppServiceControl.vue +1762 -0
  22. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +823 -0
  23. package/src/filiale/baiyin/android/ByDeviceManagement.vue +916 -0
  24. package/src/filiale/baiyin/android.js +8 -0
  25. package/src/filiale/fugou/android/AppAddMaterialScience.vue +448 -0
  26. package/src/filiale/fugou/android/AppAddReplacement.vue +341 -0
  27. package/src/filiale/fugou/android/AppChargeManagement.vue +739 -625
  28. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -0
  29. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -0
  30. package/src/filiale/fugou/android/AppServiceControl.vue +38 -5
  31. package/src/filiale/fugou/android/AppZhihuanManagement.vue +191 -0
  32. package/src/filiale/fugou/android.js +7 -1
  33. package/src/filiale/fugou/pc/AddReplacement.vue +340 -0
  34. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -0
  35. package/src/filiale/fugou/pc/InstallationDetails.vue +54 -43
  36. package/src/filiale/fugou/pc/ServiceControl.vue +125 -379
  37. package/src/filiale/fugou/pc/ServiceView.vue +941 -0
  38. package/src/filiale/fugou/pc/addMaterialScience.vue +481 -0
  39. package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +216 -0
  40. package/src/filiale/fugou/pc/devicesManagement.vue +483 -0
  41. package/src/filiale/fugou/pc.js +13 -7
  42. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -481
  43. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -0
  44. package/src/filiale/gongyi/android/AppInstallationDetails.vue +15 -10
  45. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -0
  46. package/src/filiale/gongyi/android/AppSign.vue +16 -3
  47. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -0
  48. package/src/filiale/gongyi/android.js +3 -0
  49. package/src/filiale/gongyi/pc/ApplyUpload.vue +31 -39
  50. package/src/filiale/gongyi/pc/PcAddLogs.vue +12 -4
  51. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -0
  52. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -0
  53. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +1 -1
  54. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -0
  55. package/src/filiale/gongyi/pc/addMaterialScience.vue +43 -7
  56. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -0
  57. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -0
  58. package/src/filiale/gongyi/pc.js +6 -1
  59. package/src/filiale/hongda/pc/SupervisoryList.vue +13 -0
  60. package/src/filiale/jinhuang/pc/ServiceControl.vue +1925 -0
  61. package/src/filiale/jinhuang/pc/chargeManagementNew.vue +589 -0
  62. package/src/filiale/jinhuang/pc.js +7 -0
  63. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -0
  64. package/src/filiale/qianneng/android/AppExplorationUser.vue +490 -490
  65. package/src/filiale/qianneng/android/AppInstallationDetails.vue +541 -541
  66. package/src/filiale/qianneng/android.js +15 -14
  67. package/src/filiale/qianneng/pc/ApplyUpload.vue +5 -4
  68. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +704 -704
  69. package/src/filiale/qianneng/pc/Applydetail.vue +378 -383
  70. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  71. package/src/filiale/qianneng/pc/InstallationDetails.vue +614 -587
  72. package/src/filiale/qianneng/pc/ServiceControl.vue +1384 -1384
  73. package/src/filiale/qianneng/pc/printactivatecard.vue +311 -311
  74. package/src/filiale/ruihua/pc/ServiceControl.vue +20 -0
  75. package/src/filiale/ruihua/pc/printVentilation.vue +21 -6
  76. package/src/filiale/shexian/android/AppServiceControl.vue +12 -2
  77. package/src/filiale/shexian/android/AppTakePic.vue +15 -55
  78. package/src/filiale/siyangRH/android/AppAddMaterialScience.vue +0 -2
  79. package/src/filiale/siyangRH/pc/ApplyUpload.vue +324 -324
  80. package/src/filiale/siyangRH/pc/chargeManagement.vue +810 -0
  81. package/src/filiale/siyangRH/pc.js +1 -0
  82. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +527 -511
  83. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +639 -609
  84. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +12 -0
  85. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +956 -961
  86. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1681 -1648
  87. package/src/filiale/yangchunboneng/android/AppSuperServiceControl.vue +1 -1
  88. package/src/filiale/yangchunboneng/android/AppUpload.vue +78 -9
  89. package/src/filiale/yangchunboneng/android/MaterIialOne.vue +31 -19
  90. package/src/filiale/yangchunboneng/android.js +1 -1
  91. package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +235 -218
  92. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +548 -508
  93. package/src/filiale/yangchunboneng/pc/ExplorationUser.vue +191 -0
  94. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2075 -1871
  95. package/src/filiale/yangchunboneng/pc/SupervisoryControlNew.vue +142 -0
  96. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +69 -14
  97. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +628 -0
  98. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControl.vue +902 -0
  99. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControlNew.vue +901 -0
  100. package/src/filiale/yangchunboneng/pc/SupervisoryServiceView.vue +1117 -0
  101. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1059 -960
  102. package/src/filiale/yangchunboneng/pc.js +7 -1
  103. package/src/main.js +1 -1
@@ -1,324 +1,324 @@
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
- :value-single="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="../../../components/image/pdf.jpg" alt="" />
31
- <img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../../components/image/excel.jpg" alt="" />
32
- <img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../../components/image/doc.jpg" alt="" />
33
- <img v-if="row.f_filetype === 'dwg'" src="../../../components/image/dwg.jpg" alt="" />
34
- <img v-if="row.f_filetype === 'txt'" src="../../../components/image/txt.jpg" alt="" />
35
- </a>
36
- </div>
37
- <div class="right col-sm-7">
38
- <p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
39
- <p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
40
- <p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
41
- <p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
42
- <p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
43
- <p class="clears">
44
- <a v-if="row.f_filetype === 'jpg' || row.f_filetype === 'txt' || 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>
45
- <a v-else @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
46
- <a v-if="isdelete" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
47
- </p>
48
- </div>
49
- </div>
50
- </div>
51
- </div>
52
- </div>
53
- <apply-high-meter :show.sync="showhighmeter" @photo-finish="newPhoto" v-if="showhighmeter"
54
- v-on:confirminfo="confirmIdCard"></apply-high-meter>
55
- <modal :show.sync="showUpload" v-ref:modal backdrop="false">
56
- <header slot="modal-header" class="modal-header">
57
- <button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
58
- <h4 class="modal-title" style="text-align: center">文件上传</h4>
59
- </header>
60
- <article slot="modal-body" class="modal-body form-horizontal">
61
- <div class="form-group" style="text-align: center">
62
- <file-upload class="my-file-uploader" :name="'myFile' + blodid"
63
- action="rs/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
64
- </div>
65
- <div class="form-group" v-if="isusetype">
66
- <label class="col-sm-2 control-label">文件类型:</label>
67
- <div class="col-sm-10">
68
- <input-select
69
- class="select select_list"
70
- :value.sync="headers.fusetype"
71
- v-model="headers.fusetype"
72
- :options="$appdata.getParam('报建-使用类型')"
73
- :valueSingle="true"></input-select>
74
- </div>
75
- </div>
76
- <div class="form-group" v-if="isremark">
77
- <label class="col-sm-2 control-label">文件说明:</label>
78
- <div class="col-sm-10">
79
- <input class="form-control input_view" style=""
80
- v-model="headers.fremarks"
81
- :value="headers.fremarks"/>
82
- </div>
83
- </div>
84
- </article>
85
- <footer slot="modal-footer" class="modal-footer">
86
- </footer>
87
- </modal>
88
- </template>
89
-
90
- <script>
91
- import {HttpResetClass} from 'vue-client'
92
- import {isEmpty} from "../../../components/Util";
93
- export default {
94
- title: '附件',
95
- props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch'],
96
- data () {
97
- return {
98
- fileInfoData: [], // 数据库存储的文件记录对象数组
99
- headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
100
- showUpload: false, // 上传模态框控制
101
- showhighmeter: false, // 高拍仪组件控制
102
- useType: null
103
- }
104
- },
105
- ready () {
106
- this.headers.blodid = this.blodid
107
- this.headers.businessid = this.businessid
108
- this.headers.defname = this.defname
109
- if (this.blodid || this.businessid) {
110
- this.load()
111
- }
112
- },
113
- methods: {
114
- delet(index, row) {
115
- this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
116
- this.$dispatch("delResid",row.id)
117
- this.load()
118
- })
119
- },
120
- // 下载
121
- downloadfile(filepath){
122
- let name1= this.extractFileNameFromUrl(filepath)
123
- let name=this.extractFileName(name1)
124
- if(filepath.toString().endsWith(".dwg")){
125
- var xhr = new XMLHttpRequest();
126
- xhr.open('GET', filepath, true);
127
- // 设置Accept头以指定下载.dwg文件
128
- xhr.setRequestHeader('Accept', ' application/acad, application/x-acad, image/x-dwg');
129
- xhr.onload = function() {
130
- if (xhr.status === 200) {
131
- // 创建隐藏的a元素并设置其href属性为下载的数据
132
- var link = document.createElement('a');
133
- link.href =filepath;
134
- // 设置文件名
135
- link.download =name+'.dwg';// 假设存在getFileNameFromUrl函数来获取文件名
136
- // 触发下载事件
137
- link.dispatchEvent(new MouseEvent('click'));
138
- } else {
139
- console.error('Failed to download file:', xhr.statusText);
140
- }
141
- };
142
- xhr.send();
143
- }else{
144
- var link = document.createElement('a');
145
- link.href = filepath;
146
- link.target='_blank'
147
- link.dispatchEvent(new MouseEvent('click'));
148
- }
149
- },
150
- extractFileNameFromUrl(url) {
151
- // 使用split分割URL
152
- var parts = url.split('/');
153
- // 获取最后一个部分,这通常是文件名
154
- var fileName = parts[parts.length - 1];
155
- // 返回文件名(不包括扩展名)
156
- return fileName.split('.')[0];
157
- },
158
- extractFileName(str) {
159
- // 使用split分割字符串
160
- var parts = str.split('\\');
161
- // 获取最后一个部分,这通常是文件名
162
- var fileName = parts[parts.length - 1];
163
- // 返回文件名
164
- return fileName;
165
- },
166
- // 关闭文件上传对话框
167
- close () {
168
- this.showUpload = false
169
- this.showhighmeter = false
170
- // 将选的文件清空
171
- this.$refs.file.$el.querySelector('input').value = ''
172
- this.headers.fusetype = ''
173
- this.headers.fremarks = ''
174
- this.load()
175
- },
176
- // 查询
177
- async load() {
178
- let condition = ''
179
- if(!isEmpty(this.businessid)){
180
- condition = `f_businessid= '${this.headers.businessid}' `
181
- }else{
182
- condition = `f_blobid= '${this.headers.blodid}' `
183
- }
184
- if(!this.$login.r.includes('查看全部附件')){
185
- //有权限查看所有,没有权限查看当前环节的
186
- condition +=` and defname= '${this.defname}' `
187
- }
188
- if (!isEmpty(this.useType)) {
189
- condition += `and fusetype like '${this.useType}'`
190
- }
191
- let http = new HttpResetClass()
192
- let data = {
193
- tablename: 't_files',
194
- condition: condition + ` order by f_uploaddate desc `
195
- }
196
- let getFile = await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {
197
- warnMsg: null,
198
- resolveMsg: null
199
- })
200
- for (var i = 0; i < getFile.data.length; i++) {
201
- // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
202
- if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
203
- getFile.data.splice(i,1)
204
- i--
205
- continue
206
- }
207
- let temp = getFile.data[i].f_downloadpath
208
- let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
209
- getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
210
- }
211
- for (var i = 0; i < getFile.data.length; i++) {
212
- if(getFile.data[i].f_downloadpath.includes('http:')){
213
- let temp = getFile.data[i].f_downloadpath
214
- getFile.data[i].f_downloadURL = temp
215
- console.log('打印',i)
216
- }else{
217
- let temp = getFile.data[i].f_downloadpath
218
- let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
219
- getFile.data[i].f_downloadURL ="http://" + location.host + "/" + URL
220
- }
221
-
222
- }
223
- this.fileInfoData = []
224
- this.fileInfoData = getFile.data
225
- },
226
- confirmIdCard (IdCardInfo) {
227
- this.showhighmeter = !this.showhighmeter
228
- },
229
- // 打开高拍仪
230
- upload () {
231
- if(this.showhighmeter){
232
- this.$refs.ltgao.closeVideo()
233
- }
234
- this.showhighmeter = !this.showhighmeter
235
- },
236
- // 高拍仪回调
237
- newPhoto(data) {
238
- let form = new FormData()
239
- let xhr = new XMLHttpRequest()
240
- let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
241
- form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
242
- form.append('file', this.convertBase64ToBlob(data.img), "GaoPaiYi.jpg")
243
- xhr.open("POST", "api/af-revenue/file/uploadFile")
244
-
245
- if (this.headers) {
246
- this.headers.blodid = this.blodid
247
- for (var header in this.headers) {
248
- xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
249
- }
250
- }
251
- xhr.send(form)
252
- setTimeout(() => {
253
- this.close()
254
- }, 5000)
255
- },
256
- convertBase64ToBlob(base64String) {
257
- // 将base64解码
258
- var bytes = atob(base64String);
259
- //var bytes = base64;
260
- var bytesCode = new ArrayBuffer(bytes.length);
261
- // 转换为类型化数组
262
- var byteArray = new Uint8Array(bytesCode);
263
-
264
- // 将base64转换为ascii码
265
- for (var i = 0; i < bytes.length; i++) {
266
- byteArray[i] = bytes.charCodeAt(i);
267
- }
268
- // 生成Blob对象(文件对象)
269
- return new Blob([bytesCode], {type: 'image/jpeg'});
270
- },
271
- },
272
- computed: {
273
- typeOfUse () {
274
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('报建-使用类型')]
275
- }
276
- },
277
- events: {
278
- onFileUpload: function (file, res) {
279
- this.$dispatch("resid",res.id)
280
- this.headers.fremarks=''
281
- this.close()
282
- }
283
- }
284
- }
285
- </script>
286
-
287
- <style scoped>
288
- .clears{
289
- overflow:hidden;
290
- text-overflow:ellipsis;
291
- white-space:nowrap;
292
- }
293
- .showData {
294
- padding: 15px 10px 0px 10px;
295
- box-sizing: border-box;
296
- height: 230px;
297
- font-family: "微软雅黑";
298
- }
299
- .showData .item{
300
- padding-bottom: 10px;
301
- border-bottom: solid 1px #c1c1c1;
302
- }
303
- .left {
304
- padding-right: 10px;
305
- }
306
- .left img{
307
- height: 100%;
308
- width: 100%;
309
- }
310
- .right{
311
- height: 100%;
312
- /*display: -webkit-flex;*/
313
- /*display: flex;*/
314
- /*flex-direction: column;*/
315
- /*justify-content: space-around;*/
316
- }
317
- .item_btn{
318
- width: 80%;
319
- background-color: #6aa6e2;
320
- border-radius: 4px;
321
- color: #FFFFFF;
322
- font-family: PingFang;
323
- }
324
- </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
+ :value-single="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="../../../components/image/pdf.jpg" alt="" />
31
+ <img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../../components/image/excel.jpg" alt="" />
32
+ <img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../../components/image/doc.jpg" alt="" />
33
+ <img v-if="row.f_filetype === 'dwg'" src="../../../components/image/dwg.jpg" alt="" />
34
+ <img v-if="row.f_filetype === 'txt'" src="../../../components/image/txt.jpg" alt="" />
35
+ </a>
36
+ </div>
37
+ <div class="right col-sm-7">
38
+ <p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
39
+ <p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
40
+ <p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
41
+ <p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
42
+ <p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
43
+ <p class="clears">
44
+ <a v-if="row.f_filetype === 'jpg' || row.f_filetype === 'txt' || 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>
45
+ <a v-else @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
46
+ <a v-if="isdelete" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
47
+ </p>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ <apply-high-meter :show.sync="showhighmeter" @photo-finish="newPhoto" v-if="showhighmeter"
54
+ v-on:confirminfo="confirmIdCard"></apply-high-meter>
55
+ <modal :show.sync="showUpload" v-ref:modal backdrop="false">
56
+ <header slot="modal-header" class="modal-header">
57
+ <button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
58
+ <h4 class="modal-title" style="text-align: center">文件上传</h4>
59
+ </header>
60
+ <article slot="modal-body" class="modal-body form-horizontal">
61
+ <div class="form-group" style="text-align: center">
62
+ <file-upload class="my-file-uploader" :name="'myFile' + blodid"
63
+ action="rs/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
64
+ </div>
65
+ <div class="form-group" v-if="isusetype">
66
+ <label class="col-sm-2 control-label">文件类型:</label>
67
+ <div class="col-sm-10">
68
+ <input-select
69
+ class="select select_list"
70
+ :value.sync="headers.fusetype"
71
+ v-model="headers.fusetype"
72
+ :options="$appdata.getParam('报建-使用类型')"
73
+ :valueSingle="true"></input-select>
74
+ </div>
75
+ </div>
76
+ <div class="form-group" v-if="isremark">
77
+ <label class="col-sm-2 control-label">文件说明:</label>
78
+ <div class="col-sm-10">
79
+ <input class="form-control input_view" style=""
80
+ v-model="headers.fremarks"
81
+ :value="headers.fremarks"/>
82
+ </div>
83
+ </div>
84
+ </article>
85
+ <footer slot="modal-footer" class="modal-footer">
86
+ </footer>
87
+ </modal>
88
+ </template>
89
+
90
+ <script>
91
+ import {HttpResetClass} from 'vue-client'
92
+ import {isEmpty} from "../../../components/Util";
93
+ export default {
94
+ title: '附件',
95
+ props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch'],
96
+ data () {
97
+ return {
98
+ fileInfoData: [], // 数据库存储的文件记录对象数组
99
+ headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
100
+ showUpload: false, // 上传模态框控制
101
+ showhighmeter: false, // 高拍仪组件控制
102
+ useType: null
103
+ }
104
+ },
105
+ ready () {
106
+ this.headers.blodid = this.blodid
107
+ this.headers.businessid = this.businessid
108
+ this.headers.defname = this.defname
109
+ if (this.blodid || this.businessid) {
110
+ this.load()
111
+ }
112
+ },
113
+ methods: {
114
+ delet(index, row) {
115
+ this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
116
+ this.$dispatch("delResid",row.id)
117
+ this.load()
118
+ })
119
+ },
120
+ // 下载
121
+ downloadfile(filepath){
122
+ let name1= this.extractFileNameFromUrl(filepath)
123
+ let name=this.extractFileName(name1)
124
+ if(filepath.toString().endsWith(".dwg")){
125
+ var xhr = new XMLHttpRequest();
126
+ xhr.open('GET', filepath, true);
127
+ // 设置Accept头以指定下载.dwg文件
128
+ xhr.setRequestHeader('Accept', ' application/acad, application/x-acad, image/x-dwg');
129
+ xhr.onload = function() {
130
+ if (xhr.status === 200) {
131
+ // 创建隐藏的a元素并设置其href属性为下载的数据
132
+ var link = document.createElement('a');
133
+ link.href =filepath;
134
+ // 设置文件名
135
+ link.download =name+'.dwg';// 假设存在getFileNameFromUrl函数来获取文件名
136
+ // 触发下载事件
137
+ link.dispatchEvent(new MouseEvent('click'));
138
+ } else {
139
+ console.error('Failed to download file:', xhr.statusText);
140
+ }
141
+ };
142
+ xhr.send();
143
+ }else{
144
+ var link = document.createElement('a');
145
+ link.href = filepath;
146
+ link.target='_blank'
147
+ link.dispatchEvent(new MouseEvent('click'));
148
+ }
149
+ },
150
+ extractFileNameFromUrl(url) {
151
+ // 使用split分割URL
152
+ var parts = url.split('/');
153
+ // 获取最后一个部分,这通常是文件名
154
+ var fileName = parts[parts.length - 1];
155
+ // 返回文件名(不包括扩展名)
156
+ return fileName.split('.')[0];
157
+ },
158
+ extractFileName(str) {
159
+ // 使用split分割字符串
160
+ var parts = str.split('\\');
161
+ // 获取最后一个部分,这通常是文件名
162
+ var fileName = parts[parts.length - 1];
163
+ // 返回文件名
164
+ return fileName;
165
+ },
166
+ // 关闭文件上传对话框
167
+ close () {
168
+ this.showUpload = false
169
+ this.showhighmeter = false
170
+ // 将选的文件清空
171
+ this.$refs.file.$el.querySelector('input').value = ''
172
+ this.headers.fusetype = ''
173
+ this.headers.fremarks = ''
174
+ this.load()
175
+ },
176
+ // 查询
177
+ async load() {
178
+ let condition = ''
179
+ if(!isEmpty(this.businessid)){
180
+ condition = `f_businessid= '${this.headers.businessid}' `
181
+ }else{
182
+ condition = `f_blobid= '${this.headers.blodid}' `
183
+ }
184
+ if(!this.$login.r.includes('查看全部附件')){
185
+ //有权限查看所有,没有权限查看当前环节的
186
+ condition +=` and defname= '${this.defname}' `
187
+ }
188
+ if (!isEmpty(this.useType)) {
189
+ condition += `and fusetype like '${this.useType}'`
190
+ }
191
+ let http = new HttpResetClass()
192
+ let data = {
193
+ tablename: 't_files',
194
+ condition: condition + ` order by f_uploaddate desc `
195
+ }
196
+ let getFile = await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {
197
+ warnMsg: null,
198
+ resolveMsg: null
199
+ })
200
+ for (var i = 0; i < getFile.data.length; i++) {
201
+ // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
202
+ if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
203
+ getFile.data.splice(i,1)
204
+ i--
205
+ continue
206
+ }
207
+ let temp = getFile.data[i].f_downloadpath
208
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
209
+ getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
210
+ }
211
+ for (var i = 0; i < getFile.data.length; i++) {
212
+ if(getFile.data[i].f_downloadpath.includes('http:')){
213
+ let temp = getFile.data[i].f_downloadpath
214
+ getFile.data[i].f_downloadURL = temp
215
+ console.log('打印',i)
216
+ }else{
217
+ let temp = getFile.data[i].f_downloadpath
218
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
219
+ getFile.data[i].f_downloadURL ="http://" + location.host + "/" + URL
220
+ }
221
+
222
+ }
223
+ this.fileInfoData = []
224
+ this.fileInfoData = getFile.data
225
+ },
226
+ confirmIdCard (IdCardInfo) {
227
+ this.showhighmeter = !this.showhighmeter
228
+ },
229
+ // 打开高拍仪
230
+ upload () {
231
+ if(this.showhighmeter){
232
+ this.$refs.ltgao.closeVideo()
233
+ }
234
+ this.showhighmeter = !this.showhighmeter
235
+ },
236
+ // 高拍仪回调
237
+ newPhoto(data) {
238
+ let form = new FormData()
239
+ let xhr = new XMLHttpRequest()
240
+ let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
241
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
242
+ form.append('file', this.convertBase64ToBlob(data.img), "GaoPaiYi.jpg")
243
+ xhr.open("POST", "api/af-revenue/file/uploadFile")
244
+
245
+ if (this.headers) {
246
+ this.headers.blodid = this.blodid
247
+ for (var header in this.headers) {
248
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
249
+ }
250
+ }
251
+ xhr.send(form)
252
+ setTimeout(() => {
253
+ this.close()
254
+ }, 5000)
255
+ },
256
+ convertBase64ToBlob(base64String) {
257
+ // 将base64解码
258
+ var bytes = atob(base64String);
259
+ //var bytes = base64;
260
+ var bytesCode = new ArrayBuffer(bytes.length);
261
+ // 转换为类型化数组
262
+ var byteArray = new Uint8Array(bytesCode);
263
+
264
+ // 将base64转换为ascii码
265
+ for (var i = 0; i < bytes.length; i++) {
266
+ byteArray[i] = bytes.charCodeAt(i);
267
+ }
268
+ // 生成Blob对象(文件对象)
269
+ return new Blob([bytesCode], {type: 'image/jpeg'});
270
+ },
271
+ },
272
+ computed: {
273
+ typeOfUse () {
274
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('报建-使用类型')]
275
+ }
276
+ },
277
+ events: {
278
+ onFileUpload: function (file, res) {
279
+ this.$dispatch("resid",res.id)
280
+ this.headers.fremarks=''
281
+ this.close()
282
+ }
283
+ }
284
+ }
285
+ </script>
286
+
287
+ <style scoped>
288
+ .clears{
289
+ overflow:hidden;
290
+ text-overflow:ellipsis;
291
+ white-space:nowrap;
292
+ }
293
+ .showData {
294
+ padding: 15px 10px 0px 10px;
295
+ box-sizing: border-box;
296
+ height: 230px;
297
+ font-family: "微软雅黑";
298
+ }
299
+ .showData .item{
300
+ padding-bottom: 10px;
301
+ border-bottom: solid 1px #c1c1c1;
302
+ }
303
+ .left {
304
+ padding-right: 10px;
305
+ }
306
+ .left img{
307
+ height: 100%;
308
+ width: 100%;
309
+ }
310
+ .right{
311
+ height: 100%;
312
+ /*display: -webkit-flex;*/
313
+ /*display: flex;*/
314
+ /*flex-direction: column;*/
315
+ /*justify-content: space-around;*/
316
+ }
317
+ .item_btn{
318
+ width: 80%;
319
+ background-color: #6aa6e2;
320
+ border-radius: 4px;
321
+ color: #FFFFFF;
322
+ font-family: PingFang;
323
+ }
324
+ </style>