|
|
@@ -3,38 +3,47 @@
|
|
|
<!--作品名称-->
|
|
|
<div class="app__dp_f app__f_r app__alig_c">
|
|
|
<h5 class="app__f_s_0"><span class="app__fc_r">*</span>作品名称</h5>
|
|
|
- <el-input show-word-limit v-model="workName" class="title _title" placeholder="50字符以内,不能包含&*\#等特殊字符" :maxlength="50" @blur="workNameBlur"></el-input>
|
|
|
+ <el-input type="textarea" :rows="1" resize="none" show-word-limit v-model="workName" class="app__ml_20" placeholder="50字符以内,不能包含&*\#等特殊字符"
|
|
|
+ :maxlength="50" @blur="workNameBlur"/>
|
|
|
</div>
|
|
|
<!--作品描述-->
|
|
|
- <h5 class="label app__mt_20"><span class="app__fc_r">*</span>作品描述 <span class="app__ml_10" style="display: none"><a>查看参考案例</a></span></h5>
|
|
|
- <editor placeholder="请输入作品描述,支持图文混排,可添加【文字描述】【方案视频】【作品图片】【担任职责】等模块;可添加方案截图、PDF文档转图片,不低于60字" :content="content" @change="handleChange"
|
|
|
- class="app__bd_g" style="max-width: 800px"></editor>
|
|
|
- <!--作品封面图 -->
|
|
|
- <h5 class="label app__mt_20">作品封面图</h5>
|
|
|
- <div class="uploadInfo">
|
|
|
- <div class="left">
|
|
|
- <el-upload class="avatar-uploader" action="#" :show-file-list="false" :multiple="false" accept="image/png, image/jpeg"
|
|
|
- :before-upload="handleFileChange">
|
|
|
- <i v-if="cover_url" class="el-icon-delete avatar-uploader-icon" @click.stop="handleDeleteFile"></i>
|
|
|
- <img v-if="cover_url" :src="cover_url" class="avatar"/>
|
|
|
- <!--无照片-->
|
|
|
- <div v-else class="app__dp_f app__f_c app__alig_c app__jus__c" style="height: 100%">
|
|
|
- <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
- <p class="app__fz_12 app__mt_10 el-p-upload">上传照片</p>
|
|
|
- </div>
|
|
|
- </el-upload>
|
|
|
- <p class="app__fz_12 app__mt_10 app__tg_c app__fc_grey">支持JPG、PNG格式</p>
|
|
|
- </div>
|
|
|
- <div class="right">
|
|
|
- <p>(800*800,图片最大2M,最多一张)</p>
|
|
|
- </div>
|
|
|
+ <div class="app__dp_f app__f_r app__mt_10" style="align-items:flex-start">
|
|
|
+ <h5 class="label app__mt_20 app__ws_nw app__f_s_0"><span class="app__fc_r">*</span>作品描述
|
|
|
+ <span class="app__ml_10" style="display: none"><a>查看参考案例</a></span></h5>
|
|
|
+ <el-input type="textarea" :rows="5" v-model="content" placeholder="请输入60-10000字的作品内容"
|
|
|
+ :maxlength="10000" @blur="workContentBlur" class="app__ml_20"/>
|
|
|
</div>
|
|
|
+
|
|
|
<!--作品链接-->
|
|
|
<div class="app__dp_f app__f_r app__alig_c app__mt_20">
|
|
|
<h5 class="app__f_s_0">作品链接</h5>
|
|
|
<el-input show-word-limit v-model="workUrl" class="title _title" placeholder="例如:https://www.proginn.com 若无法添加作品有效链接,请添加作品截图" :maxlength="50"></el-input>
|
|
|
</div>
|
|
|
|
|
|
+ <!--作品封面图 -->
|
|
|
+ <h5 class="label app__mt_20">作品截图(至少上传2张)</h5>
|
|
|
+
|
|
|
+
|
|
|
+ <multi-uploader v-model="workImages"></multi-uploader>
|
|
|
+ <!-- <div class="uploadInfo">-->
|
|
|
+ <!-- <div class="left">-->
|
|
|
+ <!-- <el-upload class="avatar-uploader" action="#" :show-file-list="false" :multiple="false" accept="image/png, image/jpeg"-->
|
|
|
+ <!-- :before-upload="handleFileChange">-->
|
|
|
+ <!-- <i v-if="cover_url" class="el-icon-delete avatar-uploader-icon" @click.stop="handleDeleteFile"></i>-->
|
|
|
+ <!-- <img v-if="cover_url" :src="cover_url" class="avatar"/>-->
|
|
|
+ <!-- <!–无照片–>-->
|
|
|
+ <!-- <div v-else class="app__dp_f app__f_c app__alig_c app__jus__c" style="height: 100%">-->
|
|
|
+ <!-- <i class="el-icon-plus avatar-uploader-icon"></i>-->
|
|
|
+ <!-- <p class="app__fz_12 app__mt_10 el-p-upload">上传照片</p>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </el-upload>-->
|
|
|
+ <!-- <p class="app__fz_12 app__mt_10 app__tg_c app__fc_grey">支持JPG、PNG格式</p>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- <div class="right">-->
|
|
|
+ <!-- <p>(800*800,图片最大2M,最多一张)</p>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+
|
|
|
|
|
|
<footer class="app__tg_c">
|
|
|
<el-button type="primary" @click="publish" class="btn-save" v-bind:disabled="isPublishing">保存</el-button>
|
|
|
@@ -45,6 +54,7 @@
|
|
|
|
|
|
<script>
|
|
|
import editor from "@/components/editor";
|
|
|
+ import multiUploader from '@/components/multi-uploader';
|
|
|
|
|
|
export default {
|
|
|
head() {
|
|
|
@@ -53,7 +63,8 @@
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
|
- editor
|
|
|
+ editor,
|
|
|
+ multiUploader
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -77,7 +88,8 @@
|
|
|
fileList: [],
|
|
|
uploading: false,
|
|
|
workUrl: "",
|
|
|
- isPublishing: false
|
|
|
+ isPublishing: false,
|
|
|
+ workImages: []
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
@@ -122,6 +134,11 @@
|
|
|
}
|
|
|
this.isPublishing = true;
|
|
|
|
|
|
+ if (this.workImages.length < 2) {
|
|
|
+ this.$message.error("至少上传2张作品截图");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
const validCheckResult = this.publishValidCheck();
|
|
|
if (!validCheckResult.success) {
|
|
|
this.$message.error(validCheckResult.msg);
|
|
|
@@ -129,7 +146,7 @@
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const data = {name: this.workName, description: this.content, url: this.workUrl, image_list: this.cover_url};
|
|
|
+ const data = {name: this.workName, description: this.content, url: this.workUrl, image_list: this.workImages};
|
|
|
|
|
|
if (this.$route.query.wid) {
|
|
|
data.wid = this.$route.query.wid;
|
|
|
@@ -237,6 +254,7 @@
|
|
|
|
|
|
<style lang="scss">
|
|
|
@import "../../assets/css/common.css";
|
|
|
+ @import "../../assets/css/public.css";
|
|
|
|
|
|
.editor {
|
|
|
position: relative;
|