File tree Expand file tree Collapse file tree 7 files changed +50
-25
lines changed Expand file tree Collapse file tree 7 files changed +50
-25
lines changed Original file line number Diff line number Diff line change 56
56
{{event.staffName}}
57
57
</ td >
58
58
< td class ="text-center " v-if ="event.fileType != 'S' ">
59
- < a :href ="event.pathUrl " target ="_blank "> 下载</ a >
59
+ < div v-if ="event.pathUrl.endsWith('jpg') || event.pathUrl.endsWith('png') ">
60
+ < img style ="width: 60px; height: 60px; " class ="border-radius " v-bind:src ="event.pathUrl "
61
+ v-on:click ="_viewTaskFileImg(event.pathUrl) " />
62
+ </ div >
63
+ < div v-else >
64
+ < a :href ="event.pathUrl " target ="_blank "> 下载</ a >
65
+ </ div >
60
66
</ td >
61
67
< td class ="text-center " v-else >
62
68
--
63
69
</ td >
64
70
</ tr >
65
71
</ tbody >
66
- < tfoot >
67
- < tr >
68
- < td colspan ="2 ">
69
- < ul class ="pagination float-right "> </ ul >
70
- </ td >
71
- </ tr >
72
- </ tfoot >
73
72
</ table >
74
73
<!-- 分页 -->
75
74
< div class ="text-right ">
Original file line number Diff line number Diff line change 54
54
< tbody >
55
55
< tr v-for ="item in workDetailTaskItemInfo.items ">
56
56
< td class ="text-left " style ="width: 400px; ">
57
- < div >
58
- {{item.content}}
57
+ < div >
58
+ {{item.content}}
59
59
</ div >
60
60
</ td >
61
61
< td class ="text-center ">
70
70
{{item.remark}}
71
71
</ td >
72
72
< td class ="text-center ">
73
- < div v-if ="item.pathUrl ">
74
- < a :href ="item.pathUrl " target ="_blank "> 下载</ a >
73
+ < div v-if ="item.pathUrls " v-for ="(url,index) in item.pathUrls ">
74
+ < div v-if ="url.endsWith('jpg') || url.endsWith('png') ">
75
+ < img style ="width: 60px; height: 60px; " class ="border-radius " v-bind:src ="url "
76
+ v-on:click ="_viewTaskFileImg(url) " />
77
+ </ div >
78
+ < div v-else >
79
+ < a :href ="url " target ="_blank "> 下载</ a >
80
+ </ div >
75
81
</ div >
76
82
< div v-else > - </ div >
77
83
</ td >
Original file line number Diff line number Diff line change 75
75
$that . workDetailTaskItemInfo . taskId = _task . taskId ;
76
76
$that . _loadWorkDetailTaskItemData ( ) ;
77
77
} ,
78
+ _viewTaskFileImg : function ( _url ) {
79
+ vc . emit ( 'viewImage' , 'showImage' , {
80
+ url : _url
81
+ } ) ;
82
+ } ,
78
83
}
79
84
} ) ;
80
85
} ) ( window . vc ) ;
Original file line number Diff line number Diff line change 10
10
endTime :'' ,
11
11
staffs :[ ] ,
12
12
copyStaffs :[ ] ,
13
- pathUrl : '' ,
13
+ pathUrls : [ ] ,
14
14
contents :[ ] ,
15
15
period :'' ,
16
16
months : [ ] ,
40
40
vc . emit ( 'textarea' , 'init' , $that . addWorkInfo ) ;
41
41
} ,
42
42
_initEvent : function ( ) {
43
- vc . on ( 'addWorkInfo' , 'notifyFile' , function ( _param ) {
44
- $that . addWorkInfo . pathUrl = _param . realFileName ;
43
+ vc . on ( 'addWork' , 'notifyFile' , function ( _param ) {
44
+ $that . addWorkInfo . pathUrls = [ ] ;
45
+ $that . addWorkInfo . pathUrls . push ( _param . realFileName ) ;
45
46
} )
46
47
} ,
47
48
methods : {
Original file line number Diff line number Diff line change 11
11
endTime : '' ,
12
12
staffs : [ ] ,
13
13
copyStaffs : [ ] ,
14
- pathUrl : '' ,
14
+ pathUrls : [ ] ,
15
15
contents :[ ] ,
16
16
period : '' ,
17
17
months : [ ] ,
38
38
vc . emit ( 'textarea' , 'init' , $that . editWorkInfo ) ;
39
39
} ,
40
40
_initEvent : function ( ) {
41
- vc . on ( 'editWorkInfo' , 'notifyFile' , function ( _param ) {
42
- $that . editWorkInfo . pathUrl = _param . realFileName ;
41
+ vc . on ( 'editWork' , 'notifyFile' , function ( _param ) {
42
+ $that . editWorkInfo . pathUrls = [ ] ;
43
+ $that . editWorkInfo . pathUrls . push ( _param . realFileName ) ;
43
44
} )
44
45
} ,
45
46
methods : {
179
180
function ( json , res ) {
180
181
let _json = JSON . parse ( json ) ;
181
182
vc . copyObject ( _json . data [ 0 ] , $that . editWorkInfo ) ;
182
- if ( _json . data [ 0 ] . pathUrl ) {
183
- vc . emit ( 'uploadFile' , 'notifyVedio' , _json . data [ 0 ] . pathUrl ) ;
183
+ if ( _json . data [ 0 ] . pathUrls ) {
184
+ vc . emit ( 'uploadFile' , 'notifyVedio' , _json . data [ 0 ] . pathUrls [ 0 ] ) ;
184
185
}
185
186
$that . editWorkInfo . contents . forEach ( _c => {
186
187
_c . id = vc . uuid ( ) ;
Original file line number Diff line number Diff line change 103
103
</ div >
104
104
</ div >
105
105
< div class ="col-sm-3 ">
106
- < div class ="form-group ">
106
+ < div class ="form-group flex justify-start ">
107
107
< label class ="col-form-label ">
108
108
< vc:i18n name ="附件: " namespace ="workDetailInfo "> </ vc:i18n >
109
109
</ label >
110
- < label class ="">
111
- < a :href ="workDetailInfo.pathUrl " v-if ="workDetailInfo.pathUrl "> 下载</ a >
112
- </ label >
110
+ < div class ="flex justify-start ">
111
+ < div class ="" v-if ="workDetailInfo.pathUrls " v-for ="(url,index) in workDetailInfo.pathUrls ">
112
+ < div v-if ="url.endsWith('jpg') || url.endsWith('png') ">
113
+ < img style ="width: 60px; height: 60px; " class ="border-radius " v-bind:src ="url "
114
+ v-on:click ="_viewTaskFileImg(url) " />
115
+ </ div >
116
+ < div v-else >
117
+ < a :href ="url " target ="_blank "> 下载</ a >
118
+ </ div >
119
+ </ div >
120
+ </ div >
113
121
</ div >
114
122
</ div >
115
123
</ div >
Original file line number Diff line number Diff line change 19
19
stateName : "" ,
20
20
createTime : '' ,
21
21
content : '' ,
22
- pathUrl : '' ,
22
+ pathUrls : [ ] ,
23
23
_currentTab : 'workDetailContent' ,
24
24
contents :[ ]
25
25
}
72
72
contents :$that . workDetailInfo . contents
73
73
} )
74
74
} ,
75
+ _viewTaskFileImg : function ( _url ) {
76
+ vc . emit ( 'viewImage' , 'showImage' , {
77
+ url : _url
78
+ } ) ;
79
+ } ,
75
80
}
76
81
} ) ;
77
82
} ) ( window . vc ) ;
You can’t perform that action at this time.
0 commit comments