apply-clients 5.0.35-99 → 5.0.36-1

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.
@@ -1,304 +1,304 @@
1
- <template>
2
- <div class="col-sm-12" style="background-color: #FFFFFF">
3
- <div class="col-sm-12" style="padding:50px 100px;height: 25%">
4
- <div class="form-group col-sm-5" v-if="issearch">
5
- <v-select
6
- class="select select_list"
7
- :value.sync="useType"
8
- width="90%"
9
- v-model="useType"
10
- :options='typeOfUse'
11
- :valueSingle="true"></v-select>
12
- </div>
13
- <div class="form-group col-sm-2" style="text-align: center" v-if="issearch">
14
- <button type="button" class="btn btn-primary item_btn" @click="load">搜索</button>
15
- </div>
16
- <div class="form-group col-sm-2" style="text-align: center" v-if="isupload">
17
- <button type="button" class="btn btn-primary item_btn" @click="showUpload = !showUpload">本地上传</button>
18
- </div>
19
- <div class="form-group col-sm-2" style="text-align: center" v-if="takeimg">
20
- <button type="button" class="btn btn-primary item_btn" @click="upload()">高拍仪</button>
21
- </div>
22
- </div>
23
- <hr style="width: 90%;margin: 0px auto;border: #999999 1px solid;"/>
24
- <div class="col-sm-12" style="overflow: scroll;height: 75%">
25
- <div :class="bootstraped ? bootstraped + ' showData' : 'col-sm-6 showData'" v-for="row in fileInfoData">
26
- <div class="col-sm-12 item">
27
- <div class="left col-sm-5">
28
- <a href="#" class="thumbnail" style="width: 100%;height: 100%">
29
- <img v-if="row.f_filetype === 'jpg'||row.f_filetype === 'png'||row.f_filetype === 'gif'||row.f_filetype === 'bmp'" :src="row.f_downloadURL" alt="..."/>
30
- <img v-if="row.f_filetype === 'pdf'" src="../../image/pdf.jpg" alt="" />
31
- <img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../image/excel.jpg" alt="" />
32
- <img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../image/doc.jpg" alt="" />
33
- <img v-if="row.f_filetype === 'dwg'" src="../../image/dwg.png" alt="" />
34
- <img v-if="row.f_filetype === 'dxf'" src="../../image/dxf.png" 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==='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-if="row.f_filetype === 'dwg' || row.f_filetype==='dxf'" style="background:#6aa6e2" class="btn btn-primary" :href="row.f_downloadURL" role="button" download>下载</a>
46
- <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'"
47
- @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
48
- <a v-if="isdelete && row.defname === defname" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
49
- </p>
50
- </div>
51
- </div>
52
- </div>
53
- </div>
54
- </div>
55
- <high-meter :show.sync="showhighmeter"
56
- @photo-finish="newPhoto"
57
- v-if="showhighmeter"
58
- :isusetype="isusetype"
59
- :isremark="isremark"
60
- v-ref:ltgao></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 "../../Util";
99
- export default {
100
- title: '附件',
101
- props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch'],
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
- methods: {
112
- delet(index, row) {
113
- this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
114
- this.$dispatch("delResid",row.id)
115
- this.load()
116
- })
117
- },
118
- // 下载
119
- downloadfile(filepath){
120
- var link = document.createElement('a');
121
- link.href = filepath;
122
- link.target='_blank'
123
- link.dispatchEvent(new MouseEvent('click'));
124
- },
125
- // 关闭文件上传对话框
126
- close () {
127
- this.showUpload = false
128
- this.showhighmeter = false
129
- // 将选的文件清空
130
- this.$refs.file.$el.querySelector('input').value = ''
131
- this.headers.fusetype = ''
132
- this.headers.fremarks = ''
133
- this.load()
134
- },
135
- // 查询
136
- async load() {
137
- let condition = ''
138
- if(this.businessid){
139
- condition = `f_businessid= '${this.headers.businessid}' `
140
- }else{
141
- condition = `f_blobid= '${this.headers.blodid}' `
142
- }
143
- if (this.useType != undefined && this.useType != null && this.useType != '') {
144
- condition += `and fusetype = '${this.useType}'`
145
- }
146
- let http = new HttpResetClass()
147
- let data = {
148
- tablename: 't_files',
149
- condition: condition + ` order by f_uploaddate desc `
150
- }
151
- console.log("当前数据",data)
152
- let getFile = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
153
- warnMsg: null,
154
- resolveMsg: null
155
- })
156
-
157
- for (var i = 0; i < getFile.data.length; i++) {
158
- // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
159
- if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
160
- getFile.data.splice(i,1)
161
- i--
162
- continue
163
- }
164
- let temp = getFile.data[i].f_downloadpath
165
- if (temp.includes('http:')){
166
- getFile.data[i].f_downloadURL = temp
167
- } else {
168
- let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
169
- getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
170
- }
171
- }
172
- this.fileInfoData = []
173
- this.fileInfoData = getFile.data
174
- },
175
- // 打开高拍仪
176
- upload () {
177
- if(this.showhighmeter){
178
- this.$refs.ltgao.closeVideo()
179
- }
180
- this.showhighmeter = !this.showhighmeter
181
- },
182
- // 高拍仪回调
183
- newPhoto(Imgbase64, fusetype, fremarks) {
184
- this.headers.fusetype = fusetype
185
- this.headers.fremarks = fremarks
186
-
187
- let form = new FormData()
188
- let xhr = new XMLHttpRequest()
189
- let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
190
- form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
191
- form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
192
- xhr.open("POST", "rs/file/uploadFile")
193
-
194
- if (this.headers) {
195
- for (var header in this.headers) {
196
- xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
197
- }
198
- }
199
- xhr.send(form)
200
- setTimeout(() => {
201
- this.close()
202
- }, 5000)
203
- },
204
- convertBase64ToBlob(base64String) {
205
- // 将base64解码
206
- var bytes = atob(base64String);
207
- //var bytes = base64;
208
- var bytesCode = new ArrayBuffer(bytes.length);
209
- // 转换为类型化数组
210
- var byteArray = new Uint8Array(bytesCode);
211
-
212
- // 将base64转换为ascii码
213
- for (var i = 0; i < bytes.length; i++) {
214
- byteArray[i] = bytes.charCodeAt(i);
215
- }
216
- // 生成Blob对象(文件对象)
217
- return new Blob([bytesCode], {type: 'image/jpeg'});
218
- },
219
- },
220
- ready () {
221
- console.log("当前的流程标asdasd识",this.blodid+'adada'+ this.defname)
222
- this.headers.blodid = this.blodid
223
- this.headers.businessid = this.businessid
224
- this.headers.defname = this.defname
225
- if (this.blodid || this.businessid) {
226
- this.load()
227
- }
228
- },
229
- computed: {
230
- typeOfUse () {
231
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('工程管理文件类型')]
232
- }
233
- },
234
- events: {
235
- onFileUpload: function (file, res) {
236
- this.$dispatch("resid",res.id)
237
- this.headers.fremarks=''
238
- this.close()
239
- }
240
- },
241
- watch: {
242
- 'blodid'(val) {
243
- if (val) {
244
- console.log('观察blodid', val)
245
- this.headers.blodid = this.blodid
246
- this.load(this)
247
- }
248
- },
249
- 'businessid'(val) {
250
- console.log('观察businessid')
251
- if (val) {
252
- console.log('观察businessid', val)
253
- this.headers.businessid = this.businessid
254
- this.load(this)
255
- }
256
- },
257
- 'useType'() {
258
- this.headers.fusetype = this.useType[0] ? this.useType[0] : ''
259
- },
260
- 'defname'() {
261
- this.headers.defname=this.defname
262
- }
263
- },
264
- }
265
- </script>
266
-
267
- <style scoped>
268
- .clears{
269
- overflow:hidden;
270
- text-overflow:ellipsis;
271
- white-space:nowrap;
272
- }
273
- .showData {
274
- padding: 15px 10px 0px 10px;
275
- box-sizing: border-box;
276
- height: 230px;
277
- font-family: "微软雅黑";
278
- }
279
- .showData .item{
280
- padding-bottom: 10px;
281
- border-bottom: solid 1px #c1c1c1;
282
- }
283
- .left {
284
- padding-right: 10px;
285
- }
286
- .left img{
287
- height: 100%;
288
- width: 100%;
289
- }
290
- .right{
291
- height: 100%;
292
- /*display: -webkit-flex;*/
293
- /*display: flex;*/
294
- /*flex-direction: column;*/
295
- /*justify-content: space-around;*/
296
- }
297
- .item_btn{
298
- width: 80%;
299
- background-color: #6aa6e2;
300
- border-radius: 4px;
301
- color: #FFFFFF;
302
- font-family: PingFang;
303
- }
304
- </style>
1
+ <template>
2
+ <div class="col-sm-12" style="background-color: #FFFFFF">
3
+ <div class="col-sm-12" style="padding:50px 100px;height: 25%">
4
+ <div class="form-group col-sm-5" v-if="issearch">
5
+ <v-select
6
+ class="select select_list"
7
+ :value.sync="useType"
8
+ width="90%"
9
+ v-model="useType"
10
+ :options='typeOfUse'
11
+ :valueSingle="true"></v-select>
12
+ </div>
13
+ <div class="form-group col-sm-2" style="text-align: center" v-if="issearch">
14
+ <button type="button" class="btn btn-primary item_btn" @click="load">搜索</button>
15
+ </div>
16
+ <div class="form-group col-sm-2" style="text-align: center" v-if="isupload">
17
+ <button type="button" class="btn btn-primary item_btn" @click="showUpload = !showUpload">本地上传</button>
18
+ </div>
19
+ <div class="form-group col-sm-2" style="text-align: center" v-if="takeimg">
20
+ <button type="button" class="btn btn-primary item_btn" @click="upload()">高拍仪</button>
21
+ </div>
22
+ </div>
23
+ <hr style="width: 90%;margin: 0px auto;border: #999999 1px solid;"/>
24
+ <div class="col-sm-12" style="overflow: scroll;height: 75%">
25
+ <div :class="bootstraped ? bootstraped + ' showData' : 'col-sm-6 showData'" v-for="row in fileInfoData">
26
+ <div class="col-sm-12 item">
27
+ <div class="left col-sm-5">
28
+ <a href="#" class="thumbnail" style="width: 100%;height: 100%">
29
+ <img v-if="row.f_filetype === 'jpg'||row.f_filetype === 'png'||row.f_filetype === 'gif'||row.f_filetype === 'bmp'" :src="row.f_downloadURL" alt="..."/>
30
+ <img v-if="row.f_filetype === 'pdf'" src="../../image/pdf.jpg" alt="" />
31
+ <img v-if="row.f_filetype === 'xls'||row.f_filetype === 'xlsx'" src="../../image/excel.jpg" alt="" />
32
+ <img v-if="row.f_filetype === 'doc'||row.f_filetype === 'docx'" src="../../image/doc.jpg" alt="" />
33
+ <img v-if="row.f_filetype === 'dwg'" src="../../image/dwg.png" alt="" />
34
+ <img v-if="row.f_filetype === 'dxf'" src="../../image/dxf.png" 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==='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-if="row.f_filetype === 'dwg' || row.f_filetype==='dxf'" style="background:#6aa6e2" class="btn btn-primary" :href="row.f_downloadURL" role="button" download>下载</a>
46
+ <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'"
47
+ @click="downloadfile(row.f_downloadURL)" style="background:#6aa6e2" class="btn btn-primary" role="button">下载</a>
48
+ <a v-if="isdelete && row.defname === defname" @click="delet($index, row)" href="#" class="btn btn-default" role="button" role="button">删除</a>
49
+ </p>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <high-meter :show.sync="showhighmeter"
56
+ @photo-finish="newPhoto"
57
+ v-if="showhighmeter"
58
+ :isusetype="isusetype"
59
+ :isremark="isremark"
60
+ v-ref:ltgao></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 "../../Util";
99
+ export default {
100
+ title: '附件',
101
+ props: ['blodid', 'businessid', 'isremark', 'isusetype', 'takeimg', 'defname', 'isupload', 'isdelete', 'bootstraped', 'issearch'],
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
+ methods: {
112
+ delet(index, row) {
113
+ this.$resetdelete('rs/entity/t_files', {id: row.id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
114
+ this.$dispatch("delResid",row.id)
115
+ this.load()
116
+ })
117
+ },
118
+ // 下载
119
+ downloadfile(filepath){
120
+ var link = document.createElement('a');
121
+ link.href = filepath;
122
+ link.target='_blank'
123
+ link.dispatchEvent(new MouseEvent('click'));
124
+ },
125
+ // 关闭文件上传对话框
126
+ close () {
127
+ this.showUpload = false
128
+ this.showhighmeter = false
129
+ // 将选的文件清空
130
+ this.$refs.file.$el.querySelector('input').value = ''
131
+ this.headers.fusetype = ''
132
+ this.headers.fremarks = ''
133
+ this.load()
134
+ },
135
+ // 查询
136
+ async load() {
137
+ let condition = ''
138
+ if(this.businessid){
139
+ condition = `f_businessid= '${this.headers.businessid}' `
140
+ }else{
141
+ condition = `f_blobid= '${this.headers.blodid}' `
142
+ }
143
+ if (this.useType != undefined && this.useType != null && this.useType != '') {
144
+ condition += `and fusetype = '${this.useType}'`
145
+ }
146
+ let http = new HttpResetClass()
147
+ let data = {
148
+ tablename: 't_files',
149
+ condition: condition + ` order by f_uploaddate desc `
150
+ }
151
+ console.log("当前数据",data)
152
+ let getFile = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
153
+ warnMsg: null,
154
+ resolveMsg: null
155
+ })
156
+
157
+ for (var i = 0; i < getFile.data.length; i++) {
158
+ // 如果使用类型包含导入字样,则是execl文件导入的,不做显示
159
+ if(getFile.data[i].fusetype&&(getFile.data[i].fusetype.includes('execl导入'))){
160
+ getFile.data.splice(i,1)
161
+ i--
162
+ continue
163
+ }
164
+ let temp = getFile.data[i].f_downloadpath
165
+ if (temp.includes('http:')){
166
+ getFile.data[i].f_downloadURL = temp
167
+ } else {
168
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
169
+ getFile.data[i].f_downloadURL = "http://" + location.host + "/" + URL
170
+ }
171
+ }
172
+ this.fileInfoData = []
173
+ this.fileInfoData = getFile.data
174
+ },
175
+ // 打开高拍仪
176
+ upload () {
177
+ if(this.showhighmeter){
178
+ this.$refs.ltgao.closeVideo()
179
+ }
180
+ this.showhighmeter = !this.showhighmeter
181
+ },
182
+ // 高拍仪回调
183
+ newPhoto(Imgbase64, fusetype, fremarks) {
184
+ this.headers.fusetype = fusetype
185
+ this.headers.fremarks = fremarks
186
+
187
+ let form = new FormData()
188
+ let xhr = new XMLHttpRequest()
189
+ let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
190
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
191
+ form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
192
+ xhr.open("POST", "rs/file/uploadFile")
193
+
194
+ if (this.headers) {
195
+ for (var header in this.headers) {
196
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
197
+ }
198
+ }
199
+ xhr.send(form)
200
+ setTimeout(() => {
201
+ this.close()
202
+ }, 5000)
203
+ },
204
+ convertBase64ToBlob(base64String) {
205
+ // 将base64解码
206
+ var bytes = atob(base64String);
207
+ //var bytes = base64;
208
+ var bytesCode = new ArrayBuffer(bytes.length);
209
+ // 转换为类型化数组
210
+ var byteArray = new Uint8Array(bytesCode);
211
+
212
+ // 将base64转换为ascii码
213
+ for (var i = 0; i < bytes.length; i++) {
214
+ byteArray[i] = bytes.charCodeAt(i);
215
+ }
216
+ // 生成Blob对象(文件对象)
217
+ return new Blob([bytesCode], {type: 'image/jpeg'});
218
+ },
219
+ },
220
+ ready () {
221
+ console.log("当前的流程标asdasd识",this.blodid+'adada'+ this.defname)
222
+ this.headers.blodid = this.blodid
223
+ this.headers.businessid = this.businessid
224
+ this.headers.defname = this.defname
225
+ if (this.blodid || this.businessid) {
226
+ this.load()
227
+ }
228
+ },
229
+ computed: {
230
+ typeOfUse () {
231
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('工程管理文件类型')]
232
+ }
233
+ },
234
+ events: {
235
+ onFileUpload: function (file, res) {
236
+ this.$dispatch("resid",res.id)
237
+ this.headers.fremarks=''
238
+ this.close()
239
+ }
240
+ },
241
+ watch: {
242
+ 'blodid'(val) {
243
+ if (val) {
244
+ console.log('观察blodid', val)
245
+ this.headers.blodid = this.blodid
246
+ this.load(this)
247
+ }
248
+ },
249
+ 'businessid'(val) {
250
+ console.log('观察businessid')
251
+ if (val) {
252
+ console.log('观察businessid', val)
253
+ this.headers.businessid = this.businessid
254
+ this.load(this)
255
+ }
256
+ },
257
+ 'useType'() {
258
+ this.headers.fusetype = this.useType[0] ? this.useType[0] : ''
259
+ },
260
+ 'defname'() {
261
+ this.headers.defname=this.defname
262
+ }
263
+ },
264
+ }
265
+ </script>
266
+
267
+ <style scoped>
268
+ .clears{
269
+ overflow:hidden;
270
+ text-overflow:ellipsis;
271
+ white-space:nowrap;
272
+ }
273
+ .showData {
274
+ padding: 15px 10px 0px 10px;
275
+ box-sizing: border-box;
276
+ height: 230px;
277
+ font-family: "微软雅黑";
278
+ }
279
+ .showData .item{
280
+ padding-bottom: 10px;
281
+ border-bottom: solid 1px #c1c1c1;
282
+ }
283
+ .left {
284
+ padding-right: 10px;
285
+ }
286
+ .left img{
287
+ height: 100%;
288
+ width: 100%;
289
+ }
290
+ .right{
291
+ height: 100%;
292
+ /*display: -webkit-flex;*/
293
+ /*display: flex;*/
294
+ /*flex-direction: column;*/
295
+ /*justify-content: space-around;*/
296
+ }
297
+ .item_btn{
298
+ width: 80%;
299
+ background-color: #6aa6e2;
300
+ border-radius: 4px;
301
+ color: #FFFFFF;
302
+ font-family: PingFang;
303
+ }
304
+ </style>