mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
支持多图片上传
This commit is contained in:
parent
0f68bec2ff
commit
da64db403d
@ -56,20 +56,19 @@
|
||||
{{event.staffName}}
|
||||
</td>
|
||||
<td class="text-center" v-if="event.fileType != 'S'">
|
||||
<div v-if="event.pathUrl.endsWith('jpg') || event.pathUrl.endsWith('png')">
|
||||
<img style="width: 60px; height: 60px;" class="border-radius" v-bind:src="event.pathUrl"
|
||||
v-on:click="_viewTaskFileImg(event.pathUrl)" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<a :href="event.pathUrl" target="_blank">下载</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center" v-else>
|
||||
--
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<div class="text-right">
|
||||
|
||||
@ -70,8 +70,14 @@
|
||||
{{item.remark}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div v-if="item.pathUrl">
|
||||
<a :href="item.pathUrl" target="_blank">下载</a>
|
||||
<div v-if="item.pathUrls" v-for="(url,index) in item.pathUrls">
|
||||
<div v-if="url.endsWith('jpg') || url.endsWith('png')">
|
||||
<img style="width: 60px; height: 60px;" class="border-radius" v-bind:src="url"
|
||||
v-on:click="_viewTaskFileImg(url)" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<a :href="url" target="_blank">下载</a>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else> - </div>
|
||||
</td>
|
||||
|
||||
@ -75,6 +75,11 @@
|
||||
$that.workDetailTaskItemInfo.taskId = _task.taskId;
|
||||
$that._loadWorkDetailTaskItemData();
|
||||
},
|
||||
_viewTaskFileImg: function (_url) {
|
||||
vc.emit('viewImage', 'showImage', {
|
||||
url: _url
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -10,7 +10,7 @@
|
||||
endTime:'',
|
||||
staffs:[],
|
||||
copyStaffs:[],
|
||||
pathUrl:'',
|
||||
pathUrls:[],
|
||||
contents:[],
|
||||
period:'',
|
||||
months: [],
|
||||
@ -40,8 +40,9 @@
|
||||
vc.emit('textarea','init',$that.addWorkInfo);
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addWorkInfo', 'notifyFile', function (_param) {
|
||||
$that.addWorkInfo.pathUrl = _param.realFileName;
|
||||
vc.on('addWork', 'notifyFile', function (_param) {
|
||||
$that.addWorkInfo.pathUrls = [];
|
||||
$that.addWorkInfo.pathUrls.push(_param.realFileName);
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
endTime: '',
|
||||
staffs: [],
|
||||
copyStaffs: [],
|
||||
pathUrl: '',
|
||||
pathUrls: [],
|
||||
contents:[],
|
||||
period: '',
|
||||
months: [],
|
||||
@ -38,8 +38,9 @@
|
||||
vc.emit('textarea', 'init', $that.editWorkInfo);
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('editWorkInfo', 'notifyFile', function (_param) {
|
||||
$that.editWorkInfo.pathUrl = _param.realFileName;
|
||||
vc.on('editWork', 'notifyFile', function (_param) {
|
||||
$that.editWorkInfo.pathUrls = [];
|
||||
$that.editWorkInfo.pathUrls.push(_param.realFileName);
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@ -179,8 +180,8 @@
|
||||
function (json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
vc.copyObject(_json.data[0], $that.editWorkInfo);
|
||||
if(_json.data[0].pathUrl){
|
||||
vc.emit('uploadFile', 'notifyVedio',_json.data[0].pathUrl);
|
||||
if(_json.data[0].pathUrls){
|
||||
vc.emit('uploadFile', 'notifyVedio',_json.data[0].pathUrls[0]);
|
||||
}
|
||||
$that.editWorkInfo.contents.forEach(_c=>{
|
||||
_c.id = vc.uuid();
|
||||
|
||||
@ -103,13 +103,21 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group flex justify-start">
|
||||
<label class="col-form-label">
|
||||
<vc:i18n name="附件:" namespace="workDetailInfo"></vc:i18n>
|
||||
</label>
|
||||
<label class="">
|
||||
<a :href="workDetailInfo.pathUrl" v-if="workDetailInfo.pathUrl">下载</a>
|
||||
</label>
|
||||
<div class="flex justify-start">
|
||||
<div class="" v-if="workDetailInfo.pathUrls" v-for="(url,index) in workDetailInfo.pathUrls">
|
||||
<div v-if="url.endsWith('jpg') || url.endsWith('png')">
|
||||
<img style="width: 60px; height: 60px;" class="border-radius" v-bind:src="url"
|
||||
v-on:click="_viewTaskFileImg(url)" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<a :href="url" target="_blank">下载</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
stateName: "",
|
||||
createTime: '',
|
||||
content: '',
|
||||
pathUrl: '',
|
||||
pathUrls: [],
|
||||
_currentTab: 'workDetailContent',
|
||||
contents:[]
|
||||
}
|
||||
@ -72,6 +72,11 @@
|
||||
contents:$that.workDetailInfo.contents
|
||||
})
|
||||
},
|
||||
_viewTaskFileImg: function (_url) {
|
||||
vc.emit('viewImage', 'showImage', {
|
||||
url: _url
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user