safecheck-client 3.0.30-62-t9 → 3.0.30-62-t11
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/package.json +1 -1
- package/src/components/Util/SafecheckUpload.vue +281 -281
- package/src/components/android/CheckPlanDown.vue +214 -214
- package/src/components/android/PhoneUpUserinfo.vue +1229 -1229
- package/src/components/android/PhoneotherInfov3.vue +118 -118
- package/src/components/android/SafecheckOrderV.vue +2278 -2278
- package/src/components/pc/AddPlanItemYyChange.vue +743 -743
- package/src/components/pc/NewCheckpaper.vue +1957 -2001
- package/src/components/pc/PaperDefectMain.vue +879 -866
- package/src/components/pc/SecurityCheckLedger.vue +133 -133
- package/src/components/pc/SecurityCheckList.vue +160 -160
- package/src/components/report/CheckPlanAreaList.vue +505 -505
- package/src/components/rongcheng/AspiratedAreaPlan.vue +575 -575
- package/src/filiale/bayan/android/PhoneUpUserinfo.vue +1376 -1986
- package/src/filiale/bayan/pc/HiddenSituation.vue +295 -295
- package/src/filiale/dexin/pc/DefectListNew.vue +643 -643
- package/src/filiale/dexin/pc/DefectPaperNew.vue +1066 -1066
- package/src/filiale/huaran/android/CheckPlanDown.vue +212 -212
- package/src/filiale/shanxian/android/AddPlanItem.vue +447 -451
- package/src/filiale/siyang/android/PaperFeedback.vue +1514 -1514
- package/src/filiale/xilan/pc/PaperList.vue +795 -795
- package/src/filiale/zhongsheng/pc/CheckPlanAreaList.vue +495 -495
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "safecheck-client",
|
3
3
|
"//": "主分支版本别乱升,测试包的版本直接发包(建议使用1.XX.XX-XXX格式作为测试包,不要频繁升级第三位版本号),别提交版本号。切了分支切记把主分支版本升了,保证主分支始终是最高版本!!!!!",
|
4
|
-
"version": "3.0.30-62-
|
4
|
+
"version": "3.0.30-62-t11",
|
5
5
|
"description": "安检模块 前端组件",
|
6
6
|
"author": "丁新 <417755458@qq.com>",
|
7
7
|
"license": "ISC",
|
@@ -1,281 +1,281 @@
|
|
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-12" 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-12" style="text-align: center" v-if="isupload">
|
17
|
-
<button type="button" class="btn btn-primary item_btn" @click="showUpload = !showUpload">本地上传</button>
|
18
|
-
</div>
|
19
|
-
|
20
|
-
</div>
|
21
|
-
<hr style="width: 90%;margin: 0px auto;border: #999999 1px solid;"/>
|
22
|
-
<div class="col-sm-12" style="overflow: scroll;height: 75%">
|
23
|
-
<div :class="bootstraped ? bootstraped + ' showData' : 'col-sm-15 showData'" v-for="row in fileInfoData">
|
24
|
-
<div class="col-sm-12 item">
|
25
|
-
<div class="left col-sm-5">
|
26
|
-
<a href="#" class="thumbnail" style="width: 88%;height: 98%;margin-left: 16px">
|
27
|
-
<img v-if="row.f_filetype === 'jpg'||row.f_filetype === 'png'||row.f_filetype === 'jpeg'||row.f_filetype === 'gif'||row.f_filetype === 'bmp'||row.f_filetype === 'MP3'" :src="row.f_downloadURL" alt="..."/>
|
28
|
-
<img v-if="row.f_filetype === 'pdf'" src="../../assets/pdf.jpg" alt="" />
|
29
|
-
<img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../assets/excel.jpg" alt="" />
|
30
|
-
<img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../assets/doc.jpg" alt="" />
|
31
|
-
<img v-if="row.f_filetype === 'mp3'" src="../../assets/mp3.png" alt="" />
|
32
|
-
</a>
|
33
|
-
</div>
|
34
|
-
<div class="right col-sm-15">
|
35
|
-
<p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
|
36
|
-
<p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
|
37
|
-
<p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
|
38
|
-
<p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
|
39
|
-
<p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
|
40
|
-
<p class="clears">
|
41
|
-
<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>
|
42
|
-
<a v-else @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
|
43
|
-
<a v-if="isdelete" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
|
44
|
-
</p>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
</div>
|
49
|
-
</div>
|
50
|
-
<work-busy :is-busy="loading"></work-busy>
|
51
|
-
<modal :show.sync="showUpload" v-ref:modal backdrop="false">
|
52
|
-
<header slot="modal-header" class="modal-header">
|
53
|
-
<button type="button" class="close" @click="close">
|
54
|
-
<img src="../../assets/x.png" style="margin: -4px;margin-right: -15px;height: 37px"/>
|
55
|
-
<!-- <span class="glyphicon glyphicon-remove"></span>--></button>
|
56
|
-
<h4 class="modal-title" style="text-align: center" v-if="headers.fusetype=='MP3'">文件上传</h4>
|
57
|
-
</header>
|
58
|
-
<article slot="modal-body" class="modal-body form-horizontal" >
|
59
|
-
<div class="form-group" >
|
60
|
-
<!-blodid:在上传时候绑定用户标识-->
|
61
|
-
<file-upload style="margin-top: -8px;margin-left: 45px" :name="'myFile' + blodid"
|
62
|
-
action="api/af-revenue/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file>
|
63
|
-
</file-upload>
|
64
|
-
</div>
|
65
|
-
<div class="form-group" v-if="isusetype" style="padding-top: 15px">
|
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 "../Util";
|
93
|
-
import FileUpload from './FileUpload'
|
94
|
-
|
95
|
-
export default {
|
96
|
-
title: '附件',
|
97
|
-
props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch','flag'],
|
98
|
-
components: {
|
99
|
-
FileUpload
|
100
|
-
},
|
101
|
-
data () {
|
102
|
-
return {
|
103
|
-
fileInfoData: [], // 数据库存储的文件记录对象数组
|
104
|
-
headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
|
105
|
-
showUpload: false, // 上传模态框控制
|
106
|
-
useType: null,
|
107
|
-
loading:false
|
108
|
-
}
|
109
|
-
},
|
110
|
-
ready () {
|
111
|
-
this.headers.blodid = this.blodid
|
112
|
-
this.headers.businessid = this.businessid
|
113
|
-
this.headers.defname = this.defname
|
114
|
-
if(this.flag==='safeCheck'){
|
115
|
-
this.headers.fusetype='safeCheck'
|
116
|
-
}
|
117
|
-
//tag;
|
118
|
-
//tag;
|
119
|
-
if (this.blodid || this.businessid) {
|
120
|
-
//tag;
|
121
|
-
//tag;
|
122
|
-
this.load()
|
123
|
-
}
|
124
|
-
},
|
125
|
-
methods: {
|
126
|
-
delet(index, row) {
|
127
|
-
this.$resetdelete('api/af-revenue/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
128
|
-
this.$dispatch("delResid",row.id)
|
129
|
-
this.load()
|
130
|
-
})
|
131
|
-
},
|
132
|
-
// 下载
|
133
|
-
downloadfile(filepath){
|
134
|
-
var link = document.createElement('a');
|
135
|
-
link.href = filepath;
|
136
|
-
link.target='_blank'
|
137
|
-
link.dispatchEvent(new MouseEvent('click'));
|
138
|
-
},
|
139
|
-
// 关闭文件上传对话框
|
140
|
-
close () {
|
141
|
-
this.showUpload = false
|
142
|
-
// 将选的文件清空
|
143
|
-
this.$refs.file.$el.querySelector('input').value = ''
|
144
|
-
this.headers.fusetype = ''
|
145
|
-
this.headers.fremarks = ''
|
146
|
-
this.load()
|
147
|
-
},
|
148
|
-
// 查询
|
149
|
-
async load() {
|
150
|
-
let condition = ''
|
151
|
-
if(this.businessid){
|
152
|
-
condition = `f_businessid= '${this.businessid}'`
|
153
|
-
}else{
|
154
|
-
condition = `f_blobid= '${this.blodid}'`
|
155
|
-
}
|
156
|
-
if (!isEmpty(this.useType)) {
|
157
|
-
condition += `and fusetype like '${this.useType}'`
|
158
|
-
}
|
159
|
-
if(this.flag==='safeCheck'){
|
160
|
-
condition += `and fusetype ='safeCheck'`
|
161
|
-
}
|
162
|
-
let http = new HttpResetClass()
|
163
|
-
let data = {
|
164
|
-
items: '*',
|
165
|
-
tablename: 't_files',
|
166
|
-
condition: condition,
|
167
|
-
orderitem: 'id'
|
168
|
-
}
|
169
|
-
let getFile = await http.load('POST', 'api/af-safecheck/sql/safe_singleTable_OrderBy', {data: data}, {
|
170
|
-
warnMsg: null,
|
171
|
-
resolveMsg: null
|
172
|
-
})
|
173
|
-
for (var i = 0; i < getFile.data.length; i++) {
|
174
|
-
// 如果使用类型包含导入字样,则是execl文件导入的,不做显示
|
175
|
-
if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
|
176
|
-
getFile.data.splice(i,1)
|
177
|
-
i--
|
178
|
-
continue
|
179
|
-
}
|
180
|
-
let temp = getFile.data[i].f_downloadpath
|
181
|
-
let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
|
182
|
-
if (temp.startsWith('E:')){
|
183
|
-
URL = `rs/image/file/${getFile.data[i].f_filename}`
|
184
|
-
}
|
185
|
-
console.log(URL)
|
186
|
-
getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
|
187
|
-
}
|
188
|
-
this.fileInfoData = []
|
189
|
-
this.fileInfoData = getFile.data
|
190
|
-
|
191
|
-
},
|
192
|
-
convertBase64ToBlob(base64String) {
|
193
|
-
// 将base64解码
|
194
|
-
var bytes = atob(base64String);
|
195
|
-
//var bytes = base64;
|
196
|
-
var bytesCode = new ArrayBuffer(bytes.length);
|
197
|
-
// 转换为类型化数组
|
198
|
-
var byteArray = new Uint8Array(bytesCode);
|
199
|
-
|
200
|
-
// 将base64转换为ascii码
|
201
|
-
for (var i = 0; i < bytes.length; i++) {
|
202
|
-
byteArray[i] = bytes.charCodeAt(i);
|
203
|
-
}
|
204
|
-
// 生成Blob对象(文件对象)
|
205
|
-
return new Blob([bytesCode], {type: 'image/jpeg'});
|
206
|
-
},
|
207
|
-
},
|
208
|
-
computed: {
|
209
|
-
typeOfUse () {
|
210
|
-
return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
|
211
|
-
}
|
212
|
-
},
|
213
|
-
events: {
|
214
|
-
onFileUpload: function (file, res) {
|
215
|
-
this.$dispatch("resid",res.id)
|
216
|
-
this.$dispatch("filename",res)
|
217
|
-
this.headers.fremarks=''
|
218
|
-
this.close()
|
219
|
-
if(this.flag==='safeCheck'){
|
220
|
-
this.isupload=false
|
221
|
-
}
|
222
|
-
},
|
223
|
-
beforeFileUpload:function (file) {
|
224
|
-
this.loading = true
|
225
|
-
},
|
226
|
-
onAllFilesUploaded:function (file) {
|
227
|
-
this.loading = false
|
228
|
-
}
|
229
|
-
|
230
|
-
},
|
231
|
-
watch:{
|
232
|
-
//监听blodid值的变化
|
233
|
-
'blodid'(val){
|
234
|
-
//tag;
|
235
|
-
if (val) {
|
236
|
-
//tag;
|
237
|
-
this.load()
|
238
|
-
}
|
239
|
-
}
|
240
|
-
},
|
241
|
-
}
|
242
|
-
</script>
|
243
|
-
|
244
|
-
<style scoped>
|
245
|
-
.clears{
|
246
|
-
overflow:hidden;
|
247
|
-
text-overflow:ellipsis;
|
248
|
-
white-space:nowrap;
|
249
|
-
}
|
250
|
-
.showData {
|
251
|
-
padding: 15px 10px 0px 10px;
|
252
|
-
box-sizing: border-box;
|
253
|
-
height: 230px;
|
254
|
-
font-family: "微软雅黑";
|
255
|
-
}
|
256
|
-
.showData .item{
|
257
|
-
padding-bottom: 10px;
|
258
|
-
border-bottom: solid 1px #c1c1c1;
|
259
|
-
}
|
260
|
-
.left {
|
261
|
-
padding-right: 10px;
|
262
|
-
}
|
263
|
-
.left img{
|
264
|
-
height: 100%;
|
265
|
-
width: 100%;
|
266
|
-
}
|
267
|
-
.right{
|
268
|
-
height: 100%;
|
269
|
-
/*display: -webkit-flex;*/
|
270
|
-
/*display: flex;*/
|
271
|
-
/*flex-direction: column;*/
|
272
|
-
/*justify-content: space-around;*/
|
273
|
-
}
|
274
|
-
.item_btn{
|
275
|
-
width: 80%;
|
276
|
-
background-color: #6aa6e2;
|
277
|
-
border-radius: 4px;
|
278
|
-
color: #FFFFFF;
|
279
|
-
font-family: PingFang;
|
280
|
-
}
|
281
|
-
</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-12" 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-12" style="text-align: center" v-if="isupload">
|
17
|
+
<button type="button" class="btn btn-primary item_btn" @click="showUpload = !showUpload">本地上传</button>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
</div>
|
21
|
+
<hr style="width: 90%;margin: 0px auto;border: #999999 1px solid;"/>
|
22
|
+
<div class="col-sm-12" style="overflow: scroll;height: 75%">
|
23
|
+
<div :class="bootstraped ? bootstraped + ' showData' : 'col-sm-15 showData'" v-for="row in fileInfoData">
|
24
|
+
<div class="col-sm-12 item">
|
25
|
+
<div class="left col-sm-5">
|
26
|
+
<a href="#" class="thumbnail" style="width: 88%;height: 98%;margin-left: 16px">
|
27
|
+
<img v-if="row.f_filetype === 'jpg'||row.f_filetype === 'png'||row.f_filetype === 'jpeg'||row.f_filetype === 'gif'||row.f_filetype === 'bmp'||row.f_filetype === 'MP3'" :src="row.f_downloadURL" alt="..."/>
|
28
|
+
<img v-if="row.f_filetype === 'pdf'" src="../../assets/pdf.jpg" alt="" />
|
29
|
+
<img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../assets/excel.jpg" alt="" />
|
30
|
+
<img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../assets/doc.jpg" alt="" />
|
31
|
+
<img v-if="row.f_filetype === 'mp3'" src="../../assets/mp3.png" alt="" />
|
32
|
+
</a>
|
33
|
+
</div>
|
34
|
+
<div class="right col-sm-15">
|
35
|
+
<p :title="row.f_filename" class="clears"><strong>文件名:</strong>{{row.f_filename}}</p>
|
36
|
+
<p :title="row.f_username" class="clears"><strong>操作员:</strong><span>{{row.f_username}}</span></p>
|
37
|
+
<p :title="row.fusetype" class="clears"><strong>使用类型:</strong><span>{{row.fusetype}}</span></p>
|
38
|
+
<p :title="row.f_uploaddate" class="clears"><strong>上传时间:</strong><span>{{row.f_uploaddate}}</span></p>
|
39
|
+
<p :title="row.fremarks" class="clears"><strong>文件说明:</strong>{{row.fremarks}}</p>
|
40
|
+
<p class="clears">
|
41
|
+
<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>
|
42
|
+
<a v-else @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
|
43
|
+
<a v-if="isdelete" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
|
44
|
+
</p>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
<work-busy :is-busy="loading"></work-busy>
|
51
|
+
<modal :show.sync="showUpload" v-ref:modal backdrop="false">
|
52
|
+
<header slot="modal-header" class="modal-header">
|
53
|
+
<button type="button" class="close" @click="close">
|
54
|
+
<img src="../../assets/x.png" style="margin: -4px;margin-right: -15px;height: 37px"/>
|
55
|
+
<!-- <span class="glyphicon glyphicon-remove"></span>--></button>
|
56
|
+
<h4 class="modal-title" style="text-align: center" v-if="headers.fusetype=='MP3'">文件上传</h4>
|
57
|
+
</header>
|
58
|
+
<article slot="modal-body" class="modal-body form-horizontal" >
|
59
|
+
<div class="form-group" >
|
60
|
+
<!-blodid:在上传时候绑定用户标识-->
|
61
|
+
<file-upload style="margin-top: -8px;margin-left: 45px" :name="'myFile' + blodid"
|
62
|
+
action="api/af-revenue/file/uploadFile" tagname="文件上传" :headers="headers" multiple v-ref:file>
|
63
|
+
</file-upload>
|
64
|
+
</div>
|
65
|
+
<div class="form-group" v-if="isusetype" style="padding-top: 15px">
|
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 "../Util";
|
93
|
+
import FileUpload from './FileUpload'
|
94
|
+
|
95
|
+
export default {
|
96
|
+
title: '附件',
|
97
|
+
props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch','flag'],
|
98
|
+
components: {
|
99
|
+
FileUpload
|
100
|
+
},
|
101
|
+
data () {
|
102
|
+
return {
|
103
|
+
fileInfoData: [], // 数据库存储的文件记录对象数组
|
104
|
+
headers: {'username': this.$login.f.name, 'blodid': '','businessid':'', 'fremarks': '','defname':'','fusetype':''}, // 调用rs/file/uploadFile 的参数
|
105
|
+
showUpload: false, // 上传模态框控制
|
106
|
+
useType: null,
|
107
|
+
loading:false
|
108
|
+
}
|
109
|
+
},
|
110
|
+
ready () {
|
111
|
+
this.headers.blodid = this.blodid
|
112
|
+
this.headers.businessid = this.businessid
|
113
|
+
this.headers.defname = this.defname
|
114
|
+
if(this.flag==='safeCheck'){
|
115
|
+
this.headers.fusetype='safeCheck'
|
116
|
+
}
|
117
|
+
//tag;
|
118
|
+
//tag;
|
119
|
+
if (this.blodid || this.businessid) {
|
120
|
+
//tag;
|
121
|
+
//tag;
|
122
|
+
this.load()
|
123
|
+
}
|
124
|
+
},
|
125
|
+
methods: {
|
126
|
+
delet(index, row) {
|
127
|
+
this.$resetdelete('api/af-revenue/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
128
|
+
this.$dispatch("delResid",row.id)
|
129
|
+
this.load()
|
130
|
+
})
|
131
|
+
},
|
132
|
+
// 下载
|
133
|
+
downloadfile(filepath){
|
134
|
+
var link = document.createElement('a');
|
135
|
+
link.href = filepath;
|
136
|
+
link.target='_blank'
|
137
|
+
link.dispatchEvent(new MouseEvent('click'));
|
138
|
+
},
|
139
|
+
// 关闭文件上传对话框
|
140
|
+
close () {
|
141
|
+
this.showUpload = false
|
142
|
+
// 将选的文件清空
|
143
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
144
|
+
this.headers.fusetype = ''
|
145
|
+
this.headers.fremarks = ''
|
146
|
+
this.load()
|
147
|
+
},
|
148
|
+
// 查询
|
149
|
+
async load() {
|
150
|
+
let condition = ''
|
151
|
+
if(this.businessid){
|
152
|
+
condition = `f_businessid= '${this.businessid}'`
|
153
|
+
}else{
|
154
|
+
condition = `f_blobid= '${this.blodid}'`
|
155
|
+
}
|
156
|
+
if (!isEmpty(this.useType)) {
|
157
|
+
condition += `and fusetype like '${this.useType}'`
|
158
|
+
}
|
159
|
+
if(this.flag==='safeCheck'){
|
160
|
+
condition += `and fusetype ='safeCheck'`
|
161
|
+
}
|
162
|
+
let http = new HttpResetClass()
|
163
|
+
let data = {
|
164
|
+
items: '*',
|
165
|
+
tablename: 't_files',
|
166
|
+
condition: condition,
|
167
|
+
orderitem: 'id'
|
168
|
+
}
|
169
|
+
let getFile = await http.load('POST', 'api/af-safecheck/sql/safe_singleTable_OrderBy', {data: data}, {
|
170
|
+
warnMsg: null,
|
171
|
+
resolveMsg: null
|
172
|
+
})
|
173
|
+
for (var i = 0; i < getFile.data.length; i++) {
|
174
|
+
// 如果使用类型包含导入字样,则是execl文件导入的,不做显示
|
175
|
+
if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
|
176
|
+
getFile.data.splice(i,1)
|
177
|
+
i--
|
178
|
+
continue
|
179
|
+
}
|
180
|
+
let temp = getFile.data[i].f_downloadpath
|
181
|
+
let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
|
182
|
+
if (temp.startsWith('E:')){
|
183
|
+
URL = `rs/image/file/${getFile.data[i].f_filename}`
|
184
|
+
}
|
185
|
+
console.log(URL)
|
186
|
+
getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
|
187
|
+
}
|
188
|
+
this.fileInfoData = []
|
189
|
+
this.fileInfoData = getFile.data
|
190
|
+
|
191
|
+
},
|
192
|
+
convertBase64ToBlob(base64String) {
|
193
|
+
// 将base64解码
|
194
|
+
var bytes = atob(base64String);
|
195
|
+
//var bytes = base64;
|
196
|
+
var bytesCode = new ArrayBuffer(bytes.length);
|
197
|
+
// 转换为类型化数组
|
198
|
+
var byteArray = new Uint8Array(bytesCode);
|
199
|
+
|
200
|
+
// 将base64转换为ascii码
|
201
|
+
for (var i = 0; i < bytes.length; i++) {
|
202
|
+
byteArray[i] = bytes.charCodeAt(i);
|
203
|
+
}
|
204
|
+
// 生成Blob对象(文件对象)
|
205
|
+
return new Blob([bytesCode], {type: 'image/jpeg'});
|
206
|
+
},
|
207
|
+
},
|
208
|
+
computed: {
|
209
|
+
typeOfUse () {
|
210
|
+
return [{label: '全部', value: ''}, ...this.$appdata.getParam('使用类型')]
|
211
|
+
}
|
212
|
+
},
|
213
|
+
events: {
|
214
|
+
onFileUpload: function (file, res) {
|
215
|
+
this.$dispatch("resid",res.id)
|
216
|
+
this.$dispatch("filename",res)
|
217
|
+
this.headers.fremarks=''
|
218
|
+
this.close()
|
219
|
+
if(this.flag==='safeCheck'){
|
220
|
+
this.isupload=false
|
221
|
+
}
|
222
|
+
},
|
223
|
+
beforeFileUpload:function (file) {
|
224
|
+
this.loading = true
|
225
|
+
},
|
226
|
+
onAllFilesUploaded:function (file) {
|
227
|
+
this.loading = false
|
228
|
+
}
|
229
|
+
|
230
|
+
},
|
231
|
+
watch:{
|
232
|
+
//监听blodid值的变化
|
233
|
+
'blodid'(val){
|
234
|
+
//tag;
|
235
|
+
if (val) {
|
236
|
+
//tag;
|
237
|
+
this.load()
|
238
|
+
}
|
239
|
+
}
|
240
|
+
},
|
241
|
+
}
|
242
|
+
</script>
|
243
|
+
|
244
|
+
<style scoped>
|
245
|
+
.clears{
|
246
|
+
overflow:hidden;
|
247
|
+
text-overflow:ellipsis;
|
248
|
+
white-space:nowrap;
|
249
|
+
}
|
250
|
+
.showData {
|
251
|
+
padding: 15px 10px 0px 10px;
|
252
|
+
box-sizing: border-box;
|
253
|
+
height: 230px;
|
254
|
+
font-family: "微软雅黑";
|
255
|
+
}
|
256
|
+
.showData .item{
|
257
|
+
padding-bottom: 10px;
|
258
|
+
border-bottom: solid 1px #c1c1c1;
|
259
|
+
}
|
260
|
+
.left {
|
261
|
+
padding-right: 10px;
|
262
|
+
}
|
263
|
+
.left img{
|
264
|
+
height: 100%;
|
265
|
+
width: 100%;
|
266
|
+
}
|
267
|
+
.right{
|
268
|
+
height: 100%;
|
269
|
+
/*display: -webkit-flex;*/
|
270
|
+
/*display: flex;*/
|
271
|
+
/*flex-direction: column;*/
|
272
|
+
/*justify-content: space-around;*/
|
273
|
+
}
|
274
|
+
.item_btn{
|
275
|
+
width: 80%;
|
276
|
+
background-color: #6aa6e2;
|
277
|
+
border-radius: 4px;
|
278
|
+
color: #FFFFFF;
|
279
|
+
font-family: PingFang;
|
280
|
+
}
|
281
|
+
</style>
|