|
|
@@ -107,11 +107,26 @@ |
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="yiyun_col-6">
|
|
|
|
<div class="pageImgBox">
|
|
|
|
<img :src="coverSrc" alt="" />
|
|
|
|
<file-Uploader :mutiple="false" :label="uploadLabel" :auto="true" accept="image" ref="webUploadlist"
|
|
|
|
:btn-id="filePicker" :companyId="uploadCompId" :typeId="uploadTypeCover" @upload-success="coverUploadSuccess"
|
|
|
|
<img :src="coverSrc | resolveAvator" alt="" />
|
|
|
|
<!-- <file-Uploader
|
|
|
|
:mutiple="false"
|
|
|
|
:label="uploadLabel"
|
|
|
|
:auto="true"
|
|
|
|
accept="image"
|
|
|
|
ref="webUploadlist"
|
|
|
|
:btn-id="filePicker"
|
|
|
|
:companyId="uploadCompId"
|
|
|
|
:typeId="uploadTypeCover"
|
|
|
|
@upload-success="coverUploadSuccess"
|
|
|
|
:url="chunkUploadUrl" class="listUpdateBtn">
|
|
|
|
</file-Uploader>
|
|
|
|
</file-Uploader> -->
|
|
|
|
|
|
|
|
<file-uploader
|
|
|
|
:on-success="coverUploadSuccess"
|
|
|
|
class="listUpdateBtn editCoverBtn"
|
|
|
|
>
|
|
|
|
<span>编辑</span>
|
|
|
|
</file-uploader>
|
|
|
|
<span class="faceBtn" @click="setSystemCoverRandom">使用随机封面</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@@ -550,6 +565,9 @@ |
|
|
|
|
|
|
|
<script>
|
|
|
|
import * as templateService from '@/services/template';
|
|
|
|
import { wrapOssProtocol, getFileUrl } from "@/services/oss";
|
|
|
|
import FileUploader from "@/components/file-uploader";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
isNewProj: {
|
|
|
@@ -557,6 +575,16 @@ |
|
|
|
default: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
filters:{
|
|
|
|
resolveCover(imgSrc){
|
|
|
|
if(this.imgList.includes(imgSrc)){
|
|
|
|
return imgSrc
|
|
|
|
}
|
|
|
|
const imgsrc=getFileUrl(imgSrc);
|
|
|
|
return imgsrc
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
imgSrc: process.env.API_HOST + 'archives/cover?path=',
|
|
|
@@ -596,6 +624,18 @@ |
|
|
|
"listProjProp": [],
|
|
|
|
"userId": "",
|
|
|
|
}, // 新建项目
|
|
|
|
imgList:[
|
|
|
|
'static\img\faceImg\face01.png',
|
|
|
|
'static\img\faceImg\face02.png',
|
|
|
|
'static\img\faceImg\face03.png',
|
|
|
|
'static\img\faceImg\face04.png',
|
|
|
|
'static\img\faceImg\face05.png',
|
|
|
|
'static\img\faceImg\face06.png',
|
|
|
|
'static\img\faceImg\face07.png',
|
|
|
|
'static\img\faceImg\face08.png',
|
|
|
|
'static\img\faceImg\face09.png',
|
|
|
|
'static\img\faceImg\face10.png',
|
|
|
|
],
|
|
|
|
listTempProp: [],
|
|
|
|
listProjProp: [],
|
|
|
|
checked: false,
|
|
|
@@ -655,7 +695,7 @@ |
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
components: {},
|
|
|
|
components: {FileUploader,},
|
|
|
|
created: function() {
|
|
|
|
|
|
|
|
},
|
|
|
@@ -1302,13 +1342,23 @@ |
|
|
|
* 封面上传成功时
|
|
|
|
*/
|
|
|
|
coverUploadSuccess: function(file) {
|
|
|
|
this.uploadCoverTimes = this.uploadCoverTimes + 1;
|
|
|
|
this.newProjData.projectData.showImgUrl = file.filePath;
|
|
|
|
this.coverSrc = this.imgSrc + file.filePath;
|
|
|
|
if (this.uploadCoverTimes > 1) {
|
|
|
|
this.arryUnUseCover.push(file.filePath);
|
|
|
|
}
|
|
|
|
const filePath = wrapOssProtocol(file.ossUrl);
|
|
|
|
this.coverSrc = filePath;
|
|
|
|
this.newProjData.projectData.showImgUrl=filePath;
|
|
|
|
//this.coverSrc = filePath;
|
|
|
|
// this.uploadCoverTimes = this.uploadCoverTimes + 1;
|
|
|
|
// this.newProjData.projectData.showImgUrl = file.filePath;
|
|
|
|
|
|
|
|
// if (this.uploadCoverTimes > 1) {
|
|
|
|
// this.arryUnUseCover.push(file.filePath);
|
|
|
|
// }
|
|
|
|
// console.log(this.coverSrc)
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 修改封面
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 设置负责人
|
|
|
|
*/
|
|
|
|