apply-clients 3.5.4-8 → 3.5.4-81

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