apply-clients 7.1.36-yuchuan-83 → 7.1.36-yuchuan-84
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.
- package/build/dev-server.js +3 -6
- package/package.json +1 -1
- package/src/components/android/AppServiceView.vue +603 -603
- package/src/components/android/Process/AppServiceControl.vue +1434 -1434
- package/src/components/android/Process/Processes/AppInstallationDetails.vue +1032 -1032
- package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
- package/src/components/android/SealBind.vue +426 -426
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +1115 -1115
- package/src/components/product/ApplyGaiXianCharge/ApplyGaiXianChargeList.vue +211 -211
- package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +325 -325
- package/src/components/product/Function/Service/FunctionServiceControl.vue +581 -581
- package/src/components/product/GongJianPush/ApplyPushDispose.vue +299 -299
- package/src/components/product/GongJianPush/ApplyPushManage.vue +92 -92
- package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
- package/src/components/product/List/OldShowDevices.vue +272 -272
- package/src/components/product/List/ShowAllActivity.vue +540 -540
- package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
- package/src/components/product/Print/BuildOrder/printGaiXianOrder.vue +271 -271
- package/src/components/product/Print/OrderPrint/GaiXianOrder.vue +314 -314
- package/src/components/product/Print/OrderPrint/printChaiChuOrder.vue +266 -266
- package/src/components/product/Process/ExplorationSelect.vue +593 -593
- package/src/components/product/Process/NewExplorationSelect.vue +587 -587
- package/src/components/product/Process/Processes/InstallationDetails.vue +1166 -1166
- package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
- package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
- package/src/components/product/Process/Processes/chargeManagement.vue +766 -766
- package/src/components/product/Process/Processes/newInstallationDetails.vue +683 -683
- package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
- package/src/components/product/Process/Service/ServiceControl.vue +2232 -2232
- package/src/components/product/ServiceView.vue +650 -650
- package/src/components/product/Supervisory/ExportExcel.vue +359 -359
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +592 -592
- package/src/components/product/Supervisory/SupervisoryList.vue +585 -585
- package/src/components/product/Supervisory/YiBanSupervisoryList.vue +543 -543
- package/src/components/product/VueUtils/ApplyUpload.vue +302 -302
- package/src/components/product/VueUtils/HighMeter.vue +208 -208
|
@@ -1,302 +1,302 @@
|
|
|
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
|
-
<!-- && source!='流程查看'-->
|
|
17
|
-
<div class="form-group col-sm-2" style="text-align: center" v-if="isupload ">
|
|
18
|
-
<button type="button" class="btn btn-primary item_btn" @click="showUpload = !showUpload">本地上传</button>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="form-group col-sm-2" style="text-align: center" v-if="takeimg">
|
|
21
|
-
<button type="button" class="btn btn-primary item_btn" @click="upload()">拍照</button>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<hr style="width: 90%;margin: 0px auto;border: #999999 1px solid;"/>
|
|
25
|
-
<div class="col-sm-12" style="overflow: scroll;height: 75%">
|
|
26
|
-
<div :class="bootstraped ? bootstraped + ' showData' : 'col-sm-6 showData'" v-for="row in fileInfoData">
|
|
27
|
-
<div class="col-sm-12 item">
|
|
28
|
-
<div class="left col-sm-5">
|
|
29
|
-
<a href="#" class="thumbnail" style="width: 100%;height: 100%">
|
|
30
|
-
<img v-if="row.f_filetype === 'jpg'||row.f_filetype === 'png'||row.f_filetype === 'gif'||row.f_filetype === 'bmp'" :src="row.f_downloadURL" alt="..."/>
|
|
31
|
-
<img v-if="row.f_filetype === 'pdf'" src="../../image/pdf.jpg" alt="" />
|
|
32
|
-
<img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../image/excel.jpg" alt="" />
|
|
33
|
-
<img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../image/doc.jpg" alt="" />
|
|
34
|
-
<img v-if="row.f_filetype === 'dwg'" src="../../image/dwg.png" alt="" />
|
|
35
|
-
<img v-if="row.f_filetype === 'dxf'" src="../../image/dxf.png" alt="" />
|
|
36
|
-
</a>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="right col-sm-7">
|
|
39
|
-
<p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
|
|
40
|
-
<p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
|
|
41
|
-
<p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
|
|
42
|
-
<p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
|
|
43
|
-
<p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
|
|
44
|
-
<p class="clears">
|
|
45
|
-
<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>
|
|
46
|
-
<a v-if="row.f_filetype === 'dwg' || row.f_filetype==='dxf'" style="background:#6aa6e2" class="btn btn-primary" :href="row.f_downloadURL" role="button" download>下载</a>
|
|
47
|
-
<a v-if="row.f_filetype !=='jpg' && row.f_filetype !=='png' && row.f_filetype !=='gif' && row.f_filetype !=='bmp' && row.f_filetype !=='dxf' && row.f_filetype !=='dwg'"
|
|
48
|
-
@click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
|
|
49
|
-
<a v-if="isdelete && row.defname === defname" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
|
|
50
|
-
</p>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
<apply-high-meter
|
|
57
|
-
v-if="showhighmeter"
|
|
58
|
-
:show.sync="showhighmeter"
|
|
59
|
-
:isusetype="isusetype"
|
|
60
|
-
:isremark="isremark"
|
|
61
|
-
@photo-finish="newPhoto"
|
|
62
|
-
v-ref:ltgao
|
|
63
|
-
></apply-high-meter>
|
|
64
|
-
<modal :show.sync="showUpload" v-ref:modal backdrop="false">
|
|
65
|
-
<header slot="modal-header" class="modal-header">
|
|
66
|
-
<button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
|
|
67
|
-
<h4 class="modal-title" style="text-align: center">文件上传</h4>
|
|
68
|
-
</header>
|
|
69
|
-
<article slot="modal-body" class="modal-body form-horizontal">
|
|
70
|
-
<div class="form-group" style="text-align: center">
|
|
71
|
-
<file-upload class="my-file-uploader" :name="'myFile' + blodid"
|
|
72
|
-
action="rs/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="form-group" v-if="isusetype">
|
|
75
|
-
<label class="col-sm-2 control-label">文件类型:</label>
|
|
76
|
-
<div class="col-sm-10">
|
|
77
|
-
<input-select
|
|
78
|
-
class="select select_list"
|
|
79
|
-
:value.sync="headers.fusetype"
|
|
80
|
-
v-model="headers.fusetype"
|
|
81
|
-
:options="$appdata.getParam('使用类型')"
|
|
82
|
-
:valueSingle="true"></input-select>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
<div class="form-group" v-if="isremark" style="color: #df2424">
|
|
86
|
-
<label class="col-sm-2 control-label">文件说明:</label>
|
|
87
|
-
<div class="col-sm-10">
|
|
88
|
-
<input class="form-control input_view" style=""
|
|
89
|
-
v-model="headers.fremarks"
|
|
90
|
-
:value="headers.fremarks"/>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</article>
|
|
94
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
95
|
-
</footer>
|
|
96
|
-
</modal>
|
|
97
|
-
</template>
|
|
98
|
-
|
|
99
|
-
<script>
|
|
100
|
-
import {HttpResetClass} from 'vue-client'
|
|
101
|
-
import {isEmpty} from "../../Util";
|
|
102
|
-
export default {
|
|
103
|
-
title: '附件',
|
|
104
|
-
props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch','source'],
|
|
105
|
-
data () {
|
|
106
|
-
return {
|
|
107
|
-
fileInfoData: [], // 数据库存储的文件记录对象数组
|
|
108
|
-
headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
|
|
109
|
-
showUpload: false, // 上传模态框控制
|
|
110
|
-
showhighmeter: false, // 高拍仪组件控制
|
|
111
|
-
useType: null
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
ready () {
|
|
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
|
-
methods: {
|
|
123
|
-
delet(index, row) {
|
|
124
|
-
this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
125
|
-
this.$dispatch("delResid",row.id)
|
|
126
|
-
this.load()
|
|
127
|
-
})
|
|
128
|
-
},
|
|
129
|
-
// 下载
|
|
130
|
-
downloadfile(filepath){
|
|
131
|
-
var link = document.createElement('a');
|
|
132
|
-
link.href = filepath;
|
|
133
|
-
// 设置下载属性,使得点击时触发下载
|
|
134
|
-
link.download = filepath.split('/').pop(); // 获取文件名并设置为下载时的文件名
|
|
135
|
-
// 隐藏链接(非必需,但避免不必要的视觉干扰)
|
|
136
|
-
link.style.display = 'none';
|
|
137
|
-
// 将链接添加到文档中
|
|
138
|
-
document.body.appendChild(link);
|
|
139
|
-
// 触发点击事件开始下载
|
|
140
|
-
link.click();
|
|
141
|
-
// 下载后移除链接(可选,为了保持DOM清洁)
|
|
142
|
-
document.body.removeChild(link);
|
|
143
|
-
},
|
|
144
|
-
// 关闭文件上传对话框
|
|
145
|
-
close () {
|
|
146
|
-
this.showUpload = false
|
|
147
|
-
this.showhighmeter = false
|
|
148
|
-
// 将选的文件清空
|
|
149
|
-
this.$refs.file.$el.querySelector('input').value = ''
|
|
150
|
-
this.headers.fusetype = ''
|
|
151
|
-
this.headers.fremarks = ''
|
|
152
|
-
this.load()
|
|
153
|
-
},
|
|
154
|
-
// 查询
|
|
155
|
-
async load() {
|
|
156
|
-
let condition = ''
|
|
157
|
-
if(this.businessid){
|
|
158
|
-
condition = `f_businessid= '${this.headers.businessid}' `
|
|
159
|
-
}else{
|
|
160
|
-
condition = `f_blobid= '${this.headers.blodid}' `
|
|
161
|
-
}
|
|
162
|
-
if (this.defname === '冲正'){
|
|
163
|
-
condition += `and defname= '${this.defname}' `
|
|
164
|
-
}
|
|
165
|
-
if (!isEmpty(this.useType)) {
|
|
166
|
-
condition += `and fusetype like '${this.useType}'`
|
|
167
|
-
}
|
|
168
|
-
let http = new HttpResetClass()
|
|
169
|
-
let data = {
|
|
170
|
-
tablename: 't_files',
|
|
171
|
-
condition: condition + ` order by f_uploaddate desc `
|
|
172
|
-
}
|
|
173
|
-
let getFile = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
|
|
174
|
-
warnMsg: null,
|
|
175
|
-
resolveMsg: null
|
|
176
|
-
})
|
|
177
|
-
|
|
178
|
-
for (var i = 0; i < getFile.data.length; i++) {
|
|
179
|
-
// 如果使用类型包含导入字样,则是execl文件导入的,不做显示
|
|
180
|
-
if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
|
|
181
|
-
getFile.data.splice(i,1)
|
|
182
|
-
i--
|
|
183
|
-
continue
|
|
184
|
-
}
|
|
185
|
-
let temp = getFile.data[i].f_downloadpath
|
|
186
|
-
if (temp.includes('http:')){
|
|
187
|
-
getFile.data[i].f_downloadURL = temp
|
|
188
|
-
} else {
|
|
189
|
-
let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
|
|
190
|
-
getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
this.fileInfoData = []
|
|
194
|
-
this.fileInfoData = getFile.data
|
|
195
|
-
},
|
|
196
|
-
// 打开高拍仪
|
|
197
|
-
upload () {
|
|
198
|
-
if(this.showhighmeter){
|
|
199
|
-
this.$refs.ltgao.closeVideo()
|
|
200
|
-
}
|
|
201
|
-
this.showhighmeter = !this.showhighmeter
|
|
202
|
-
},
|
|
203
|
-
// 高拍仪回调
|
|
204
|
-
newPhoto(Imgbase64, fusetype, fremarks) {
|
|
205
|
-
this.headers.fusetype = fusetype
|
|
206
|
-
this.headers.fremarks = fremarks
|
|
207
|
-
|
|
208
|
-
let form = new FormData()
|
|
209
|
-
let xhr = new XMLHttpRequest()
|
|
210
|
-
let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
|
|
211
|
-
form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
|
|
212
|
-
form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
|
|
213
|
-
xhr.open("POST", "rs/file/uploadFile")
|
|
214
|
-
|
|
215
|
-
if (this.headers) {
|
|
216
|
-
for (var header in this.headers) {
|
|
217
|
-
xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
xhr.send(form)
|
|
221
|
-
setTimeout(() => {
|
|
222
|
-
this.close()
|
|
223
|
-
}, 5000)
|
|
224
|
-
},
|
|
225
|
-
convertBase64ToBlob(base64String) {
|
|
226
|
-
// 将base64解码
|
|
227
|
-
var bytes = atob(base64String);
|
|
228
|
-
//var bytes = base64;
|
|
229
|
-
var bytesCode = new ArrayBuffer(bytes.length);
|
|
230
|
-
// 转换为类型化数组
|
|
231
|
-
var byteArray = new Uint8Array(bytesCode);
|
|
232
|
-
|
|
233
|
-
// 将base64转换为ascii码
|
|
234
|
-
for (var i = 0; i < bytes.length; i++) {
|
|
235
|
-
byteArray[i] = bytes.charCodeAt(i);
|
|
236
|
-
}
|
|
237
|
-
// 生成Blob对象(文件对象)
|
|
238
|
-
return new Blob([bytesCode], {type: 'image/jpeg'});
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
computed: {
|
|
242
|
-
typeOfUse () {
|
|
243
|
-
return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
events: {
|
|
247
|
-
onFileUpload: function (file, res) {
|
|
248
|
-
this.$dispatch("resid",res.id)
|
|
249
|
-
this.headers.fremarks=''
|
|
250
|
-
this.close()
|
|
251
|
-
},
|
|
252
|
-
onFileChange: function ( res) {
|
|
253
|
-
const regex = /^[^#]+$/;
|
|
254
|
-
for (let i=0;i<res.length;i++){
|
|
255
|
-
if (!regex.test(res[i].name)){
|
|
256
|
-
this.$showMessage(`第${i+1}个文件名不能包含#号`, 'error')
|
|
257
|
-
this.close()
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
</script>
|
|
264
|
-
|
|
265
|
-
<style scoped>
|
|
266
|
-
.clears{
|
|
267
|
-
overflow:hidden;
|
|
268
|
-
text-overflow:ellipsis;
|
|
269
|
-
white-space:nowrap;
|
|
270
|
-
}
|
|
271
|
-
.showData {
|
|
272
|
-
padding: 15px 10px 0px 10px;
|
|
273
|
-
box-sizing: border-box;
|
|
274
|
-
height: 230px;
|
|
275
|
-
font-family: "微软雅黑";
|
|
276
|
-
}
|
|
277
|
-
.showData .item{
|
|
278
|
-
padding-bottom: 10px;
|
|
279
|
-
border-bottom: solid 1px #c1c1c1;
|
|
280
|
-
}
|
|
281
|
-
.left {
|
|
282
|
-
padding-right: 10px;
|
|
283
|
-
}
|
|
284
|
-
.left img{
|
|
285
|
-
height: 100%;
|
|
286
|
-
width: 100%;
|
|
287
|
-
}
|
|
288
|
-
.right{
|
|
289
|
-
height: 100%;
|
|
290
|
-
/*display: -webkit-flex;*/
|
|
291
|
-
/*display: flex;*/
|
|
292
|
-
/*flex-direction: column;*/
|
|
293
|
-
/*justify-content: space-around;*/
|
|
294
|
-
}
|
|
295
|
-
.item_btn{
|
|
296
|
-
width: 80%;
|
|
297
|
-
background-color: #6aa6e2;
|
|
298
|
-
border-radius: 4px;
|
|
299
|
-
color: #FFFFFF;
|
|
300
|
-
font-family: PingFang;
|
|
301
|
-
}
|
|
302
|
-
</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
|
+
<!-- && source!='流程查看'-->
|
|
17
|
+
<div class="form-group col-sm-2" style="text-align: center" v-if="isupload ">
|
|
18
|
+
<button type="button" class="btn btn-primary item_btn" @click="showUpload = !showUpload">本地上传</button>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="form-group col-sm-2" style="text-align: center" v-if="takeimg">
|
|
21
|
+
<button type="button" class="btn btn-primary item_btn" @click="upload()">拍照</button>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<hr style="width: 90%;margin: 0px auto;border: #999999 1px solid;"/>
|
|
25
|
+
<div class="col-sm-12" style="overflow: scroll;height: 75%">
|
|
26
|
+
<div :class="bootstraped ? bootstraped + ' showData' : 'col-sm-6 showData'" v-for="row in fileInfoData">
|
|
27
|
+
<div class="col-sm-12 item">
|
|
28
|
+
<div class="left col-sm-5">
|
|
29
|
+
<a href="#" class="thumbnail" style="width: 100%;height: 100%">
|
|
30
|
+
<img v-if="row.f_filetype === 'jpg'||row.f_filetype === 'png'||row.f_filetype === 'gif'||row.f_filetype === 'bmp'" :src="row.f_downloadURL" alt="..."/>
|
|
31
|
+
<img v-if="row.f_filetype === 'pdf'" src="../../image/pdf.jpg" alt="" />
|
|
32
|
+
<img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../image/excel.jpg" alt="" />
|
|
33
|
+
<img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../image/doc.jpg" alt="" />
|
|
34
|
+
<img v-if="row.f_filetype === 'dwg'" src="../../image/dwg.png" alt="" />
|
|
35
|
+
<img v-if="row.f_filetype === 'dxf'" src="../../image/dxf.png" alt="" />
|
|
36
|
+
</a>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="right col-sm-7">
|
|
39
|
+
<p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
|
|
40
|
+
<p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
|
|
41
|
+
<p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
|
|
42
|
+
<p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
|
|
43
|
+
<p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
|
|
44
|
+
<p class="clears">
|
|
45
|
+
<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>
|
|
46
|
+
<a v-if="row.f_filetype === 'dwg' || row.f_filetype==='dxf'" style="background:#6aa6e2" class="btn btn-primary" :href="row.f_downloadURL" role="button" download>下载</a>
|
|
47
|
+
<a v-if="row.f_filetype !=='jpg' && row.f_filetype !=='png' && row.f_filetype !=='gif' && row.f_filetype !=='bmp' && row.f_filetype !=='dxf' && row.f_filetype !=='dwg'"
|
|
48
|
+
@click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
|
|
49
|
+
<a v-if="isdelete && row.defname === defname" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
|
|
50
|
+
</p>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<apply-high-meter
|
|
57
|
+
v-if="showhighmeter"
|
|
58
|
+
:show.sync="showhighmeter"
|
|
59
|
+
:isusetype="isusetype"
|
|
60
|
+
:isremark="isremark"
|
|
61
|
+
@photo-finish="newPhoto"
|
|
62
|
+
v-ref:ltgao
|
|
63
|
+
></apply-high-meter>
|
|
64
|
+
<modal :show.sync="showUpload" v-ref:modal backdrop="false">
|
|
65
|
+
<header slot="modal-header" class="modal-header">
|
|
66
|
+
<button type="button" class="close" @click="close"><span class="glyphicon glyphicon-remove"></span></button>
|
|
67
|
+
<h4 class="modal-title" style="text-align: center">文件上传</h4>
|
|
68
|
+
</header>
|
|
69
|
+
<article slot="modal-body" class="modal-body form-horizontal">
|
|
70
|
+
<div class="form-group" style="text-align: center">
|
|
71
|
+
<file-upload class="my-file-uploader" :name="'myFile' + blodid"
|
|
72
|
+
action="rs/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="form-group" v-if="isusetype">
|
|
75
|
+
<label class="col-sm-2 control-label">文件类型:</label>
|
|
76
|
+
<div class="col-sm-10">
|
|
77
|
+
<input-select
|
|
78
|
+
class="select select_list"
|
|
79
|
+
:value.sync="headers.fusetype"
|
|
80
|
+
v-model="headers.fusetype"
|
|
81
|
+
:options="$appdata.getParam('使用类型')"
|
|
82
|
+
:valueSingle="true"></input-select>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="form-group" v-if="isremark" style="color: #df2424">
|
|
86
|
+
<label class="col-sm-2 control-label">文件说明:</label>
|
|
87
|
+
<div class="col-sm-10">
|
|
88
|
+
<input class="form-control input_view" style=""
|
|
89
|
+
v-model="headers.fremarks"
|
|
90
|
+
:value="headers.fremarks"/>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</article>
|
|
94
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
95
|
+
</footer>
|
|
96
|
+
</modal>
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<script>
|
|
100
|
+
import {HttpResetClass} from 'vue-client'
|
|
101
|
+
import {isEmpty} from "../../Util";
|
|
102
|
+
export default {
|
|
103
|
+
title: '附件',
|
|
104
|
+
props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch','source'],
|
|
105
|
+
data () {
|
|
106
|
+
return {
|
|
107
|
+
fileInfoData: [], // 数据库存储的文件记录对象数组
|
|
108
|
+
headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
|
|
109
|
+
showUpload: false, // 上传模态框控制
|
|
110
|
+
showhighmeter: false, // 高拍仪组件控制
|
|
111
|
+
useType: null
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
ready () {
|
|
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
|
+
methods: {
|
|
123
|
+
delet(index, row) {
|
|
124
|
+
this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
125
|
+
this.$dispatch("delResid",row.id)
|
|
126
|
+
this.load()
|
|
127
|
+
})
|
|
128
|
+
},
|
|
129
|
+
// 下载
|
|
130
|
+
downloadfile(filepath){
|
|
131
|
+
var link = document.createElement('a');
|
|
132
|
+
link.href = filepath;
|
|
133
|
+
// 设置下载属性,使得点击时触发下载
|
|
134
|
+
link.download = filepath.split('/').pop(); // 获取文件名并设置为下载时的文件名
|
|
135
|
+
// 隐藏链接(非必需,但避免不必要的视觉干扰)
|
|
136
|
+
link.style.display = 'none';
|
|
137
|
+
// 将链接添加到文档中
|
|
138
|
+
document.body.appendChild(link);
|
|
139
|
+
// 触发点击事件开始下载
|
|
140
|
+
link.click();
|
|
141
|
+
// 下载后移除链接(可选,为了保持DOM清洁)
|
|
142
|
+
document.body.removeChild(link);
|
|
143
|
+
},
|
|
144
|
+
// 关闭文件上传对话框
|
|
145
|
+
close () {
|
|
146
|
+
this.showUpload = false
|
|
147
|
+
this.showhighmeter = false
|
|
148
|
+
// 将选的文件清空
|
|
149
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
|
150
|
+
this.headers.fusetype = ''
|
|
151
|
+
this.headers.fremarks = ''
|
|
152
|
+
this.load()
|
|
153
|
+
},
|
|
154
|
+
// 查询
|
|
155
|
+
async load() {
|
|
156
|
+
let condition = ''
|
|
157
|
+
if(this.businessid){
|
|
158
|
+
condition = `f_businessid= '${this.headers.businessid}' `
|
|
159
|
+
}else{
|
|
160
|
+
condition = `f_blobid= '${this.headers.blodid}' `
|
|
161
|
+
}
|
|
162
|
+
if (this.defname === '冲正'){
|
|
163
|
+
condition += `and defname= '${this.defname}' `
|
|
164
|
+
}
|
|
165
|
+
if (!isEmpty(this.useType)) {
|
|
166
|
+
condition += `and fusetype like '${this.useType}'`
|
|
167
|
+
}
|
|
168
|
+
let http = new HttpResetClass()
|
|
169
|
+
let data = {
|
|
170
|
+
tablename: 't_files',
|
|
171
|
+
condition: condition + ` order by f_uploaddate desc `
|
|
172
|
+
}
|
|
173
|
+
let getFile = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
|
|
174
|
+
warnMsg: null,
|
|
175
|
+
resolveMsg: null
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
for (var i = 0; i < getFile.data.length; i++) {
|
|
179
|
+
// 如果使用类型包含导入字样,则是execl文件导入的,不做显示
|
|
180
|
+
if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
|
|
181
|
+
getFile.data.splice(i,1)
|
|
182
|
+
i--
|
|
183
|
+
continue
|
|
184
|
+
}
|
|
185
|
+
let temp = getFile.data[i].f_downloadpath
|
|
186
|
+
if (temp.includes('http:')){
|
|
187
|
+
getFile.data[i].f_downloadURL = temp
|
|
188
|
+
} else {
|
|
189
|
+
let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
|
|
190
|
+
getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
this.fileInfoData = []
|
|
194
|
+
this.fileInfoData = getFile.data
|
|
195
|
+
},
|
|
196
|
+
// 打开高拍仪
|
|
197
|
+
upload () {
|
|
198
|
+
if(this.showhighmeter){
|
|
199
|
+
this.$refs.ltgao.closeVideo()
|
|
200
|
+
}
|
|
201
|
+
this.showhighmeter = !this.showhighmeter
|
|
202
|
+
},
|
|
203
|
+
// 高拍仪回调
|
|
204
|
+
newPhoto(Imgbase64, fusetype, fremarks) {
|
|
205
|
+
this.headers.fusetype = fusetype
|
|
206
|
+
this.headers.fremarks = fremarks
|
|
207
|
+
|
|
208
|
+
let form = new FormData()
|
|
209
|
+
let xhr = new XMLHttpRequest()
|
|
210
|
+
let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
|
|
211
|
+
form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
|
|
212
|
+
form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
|
|
213
|
+
xhr.open("POST", "rs/file/uploadFile")
|
|
214
|
+
|
|
215
|
+
if (this.headers) {
|
|
216
|
+
for (var header in this.headers) {
|
|
217
|
+
xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
xhr.send(form)
|
|
221
|
+
setTimeout(() => {
|
|
222
|
+
this.close()
|
|
223
|
+
}, 5000)
|
|
224
|
+
},
|
|
225
|
+
convertBase64ToBlob(base64String) {
|
|
226
|
+
// 将base64解码
|
|
227
|
+
var bytes = atob(base64String);
|
|
228
|
+
//var bytes = base64;
|
|
229
|
+
var bytesCode = new ArrayBuffer(bytes.length);
|
|
230
|
+
// 转换为类型化数组
|
|
231
|
+
var byteArray = new Uint8Array(bytesCode);
|
|
232
|
+
|
|
233
|
+
// 将base64转换为ascii码
|
|
234
|
+
for (var i = 0; i < bytes.length; i++) {
|
|
235
|
+
byteArray[i] = bytes.charCodeAt(i);
|
|
236
|
+
}
|
|
237
|
+
// 生成Blob对象(文件对象)
|
|
238
|
+
return new Blob([bytesCode], {type: 'image/jpeg'});
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
computed: {
|
|
242
|
+
typeOfUse () {
|
|
243
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
events: {
|
|
247
|
+
onFileUpload: function (file, res) {
|
|
248
|
+
this.$dispatch("resid",res.id)
|
|
249
|
+
this.headers.fremarks=''
|
|
250
|
+
this.close()
|
|
251
|
+
},
|
|
252
|
+
onFileChange: function ( res) {
|
|
253
|
+
const regex = /^[^#]+$/;
|
|
254
|
+
for (let i=0;i<res.length;i++){
|
|
255
|
+
if (!regex.test(res[i].name)){
|
|
256
|
+
this.$showMessage(`第${i+1}个文件名不能包含#号`, 'error')
|
|
257
|
+
this.close()
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
</script>
|
|
264
|
+
|
|
265
|
+
<style scoped>
|
|
266
|
+
.clears{
|
|
267
|
+
overflow:hidden;
|
|
268
|
+
text-overflow:ellipsis;
|
|
269
|
+
white-space:nowrap;
|
|
270
|
+
}
|
|
271
|
+
.showData {
|
|
272
|
+
padding: 15px 10px 0px 10px;
|
|
273
|
+
box-sizing: border-box;
|
|
274
|
+
height: 230px;
|
|
275
|
+
font-family: "微软雅黑";
|
|
276
|
+
}
|
|
277
|
+
.showData .item{
|
|
278
|
+
padding-bottom: 10px;
|
|
279
|
+
border-bottom: solid 1px #c1c1c1;
|
|
280
|
+
}
|
|
281
|
+
.left {
|
|
282
|
+
padding-right: 10px;
|
|
283
|
+
}
|
|
284
|
+
.left img{
|
|
285
|
+
height: 100%;
|
|
286
|
+
width: 100%;
|
|
287
|
+
}
|
|
288
|
+
.right{
|
|
289
|
+
height: 100%;
|
|
290
|
+
/*display: -webkit-flex;*/
|
|
291
|
+
/*display: flex;*/
|
|
292
|
+
/*flex-direction: column;*/
|
|
293
|
+
/*justify-content: space-around;*/
|
|
294
|
+
}
|
|
295
|
+
.item_btn{
|
|
296
|
+
width: 80%;
|
|
297
|
+
background-color: #6aa6e2;
|
|
298
|
+
border-radius: 4px;
|
|
299
|
+
color: #FFFFFF;
|
|
300
|
+
font-family: PingFang;
|
|
301
|
+
}
|
|
302
|
+
</style>
|