|
|
@ -9,77 +9,41 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="contentbottom"> |
|
|
|
<div class="contentbottom"> |
|
|
|
<el-form :model="photoForm" :rules="rules" ref="photoForm"> |
|
|
|
<el-form :model="photoForm" :rules="rules" ref="photoForm"> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="封面图" :label-width="formLabelWidth" prop="bgImgUrl"> |
|
|
|
label="封面图" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="bgImgUrl" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-upload |
|
|
|
<el-upload |
|
|
|
class="avatar-uploader" |
|
|
|
class="avatar-uploader" |
|
|
|
:action="joggle" |
|
|
|
:action="joggle" |
|
|
|
:show-file-list="false" |
|
|
|
:show-file-list="false" |
|
|
|
:on-success="handlePhotoSuccess" |
|
|
|
:on-success="handlePhotoSuccess" |
|
|
|
:before-upload="beforeAvatarUpload" |
|
|
|
:before-upload="beforeAvatarUpload"> |
|
|
|
> |
|
|
|
<img v-if="photoForm.bgImgUrl" :src="photoForm.bgImgUrl" class="avatar" width="200px"/> |
|
|
|
<img |
|
|
|
|
|
|
|
v-if="photoForm.bgImgUrl" |
|
|
|
|
|
|
|
:src="photoForm.bgImgUrl" |
|
|
|
|
|
|
|
class="avatar" |
|
|
|
|
|
|
|
width="200px" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
</el-upload> |
|
|
|
</el-upload> |
|
|
|
<!-- <img id="preview" :src="imageUrl" width="250px" height="60px"/> |
|
|
|
<!-- <img id="preview" :src="imageUrl" width="250px" height="60px"/> |
|
|
|
<a href="javascript:;" class="file gradient"> |
|
|
|
<a href="javascript:;" class="file gradient"> |
|
|
|
<input id="pop_file" type="file" accept=".jpg,.jpeg,.png" v-on:change="uploadFile($event)" name="fileTrans" ref="file" value="" />选择文件</a> --> |
|
|
|
<input id="pop_file" type="file" accept=".jpg,.jpeg,.png" v-on:change="uploadFile($event)" name="fileTrans" ref="file" value="" />选择文件</a> --> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="文章标题" :label-width="formLabelWidth" prop="title"> |
|
|
|
label="文章标题" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="title" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input v-model="photoForm.title" autocomplete="off"></el-input> |
|
|
|
<el-input v-model="photoForm.title" autocomplete="off"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="日期" :label-width="formLabelWidth"> |
|
|
|
<el-form-item label="日期" :label-width="formLabelWidth"> |
|
|
|
<el-col> |
|
|
|
<el-col> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker type="date" placeholder="选择日期" v-model="photoForm.createTime" style="width: 100%;"></el-date-picker> |
|
|
|
type="date" |
|
|
|
|
|
|
|
placeholder="选择日期" |
|
|
|
|
|
|
|
v-model="photoForm.createTime" |
|
|
|
|
|
|
|
style="width: 100%;" |
|
|
|
|
|
|
|
></el-date-picker> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="来源" :label-width="formLabelWidth" prop="description"> |
|
|
|
label="来源" |
|
|
|
<el-input v-model="photoForm.description" autocomplete="off"></el-input> |
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="description" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="photoForm.description" |
|
|
|
|
|
|
|
autocomplete="off" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<!-- <quill-editor v-model="form.content" ref="myQuillEditor" style="height: 300px;" :options="editorOption"> |
|
|
|
<el-form-item label="文章内容" :label-width="formLabelWidth" prop="textContent"> |
|
|
|
</quill-editor> --> |
|
|
|
|
|
|
|
<!-- <editor-bar v-model="detail" :isClear="isClear" @change="change"></editor-bar> --> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
|
|
|
label="文章内容" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="textContent" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<quill-editor |
|
|
|
<quill-editor |
|
|
|
ref="text" |
|
|
|
ref="text" |
|
|
|
v-model="photoForm.textContent" |
|
|
|
v-model="photoForm.textContent" |
|
|
|
class="myQuillEditor" |
|
|
|
class="myQuillEditor" |
|
|
|
:options="editorOption" |
|
|
|
:options="editorOption"/> |
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<div class="footer"> |
|
|
|
<div class="footer"> |
|
|
|
<el-button type="primary" @click="photoAdd('photoForm')" |
|
|
|
<el-button type="primary" @click="photoAdd('photoForm')">确认</el-button> |
|
|
|
>确认</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-button type="info" @click="cancel()">取消</el-button> |
|
|
|
<el-button type="info" @click="cancel()">取消</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
@ -94,59 +58,24 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="contentbottom"> |
|
|
|
<div class="contentbottom"> |
|
|
|
<el-form :model="videoForm" :rules="rules" ref="videoForm"> |
|
|
|
<el-form :model="videoForm" :rules="rules" ref="videoForm"> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="封面图" :label-width="formLabelWidth" prop="bgImgUrl"> |
|
|
|
label="封面图" |
|
|
|
<el-upload class="avatar-uploader" :action="joggle" :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload"> |
|
|
|
:label-width="formLabelWidth" |
|
|
|
<img v-if="videoForm.bgImgUrl" :src="videoForm.bgImgUrl" class="avatar" width="200px"/> |
|
|
|
prop="bgImgUrl" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-upload |
|
|
|
|
|
|
|
class="avatar-uploader" |
|
|
|
|
|
|
|
:action="joggle" |
|
|
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
|
|
:on-success="handleAvatarSuccess" |
|
|
|
|
|
|
|
:before-upload="beforeAvatarUpload" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<img |
|
|
|
|
|
|
|
v-if="videoForm.bgImgUrl" |
|
|
|
|
|
|
|
:src="videoForm.bgImgUrl" |
|
|
|
|
|
|
|
class="avatar" |
|
|
|
|
|
|
|
width="200px" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
</el-upload> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="文章标题" :label-width="formLabelWidth" prop="title"> |
|
|
|
label="文章标题" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="title" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input v-model="videoForm.title" autocomplete="off"></el-input> |
|
|
|
<el-input v-model="videoForm.title" autocomplete="off"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="日期" :label-width="formLabelWidth"> |
|
|
|
<el-form-item label="日期" :label-width="formLabelWidth"> |
|
|
|
<el-col> |
|
|
|
<el-col> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker type="date" placeholder="选择日期" v-model="videoForm.createTime" style="width: 100%;"></el-date-picker> |
|
|
|
type="date" |
|
|
|
|
|
|
|
placeholder="选择日期" |
|
|
|
|
|
|
|
v-model="videoForm.createTime" |
|
|
|
|
|
|
|
style="width: 100%;" |
|
|
|
|
|
|
|
></el-date-picker> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="来源" :label-width="formLabelWidth" prop="description"> |
|
|
|
label="来源" |
|
|
|
<el-input v-model="videoForm.description" autocomplete="off"></el-input> |
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="description" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="videoForm.description" |
|
|
|
|
|
|
|
autocomplete="off" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="视频" :label-width="formLabelWidth" prop="videoUrl"> |
|
|
|
label="视频" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="videoUrl" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-upload |
|
|
|
<el-upload |
|
|
|
class="avatar-uploader" |
|
|
|
class="avatar-uploader" |
|
|
|
:action="joggle" |
|
|
|
:action="joggle" |
|
|
@ -154,44 +83,17 @@ |
|
|
|
v-bind:on-progress="uploadVideoProcess" |
|
|
|
v-bind:on-progress="uploadVideoProcess" |
|
|
|
v-bind:on-success="handleVideoSuccess" |
|
|
|
v-bind:on-success="handleVideoSuccess" |
|
|
|
v-bind:before-upload="beforeUploadVideo" |
|
|
|
v-bind:before-upload="beforeUploadVideo" |
|
|
|
v-bind:show-file-list="false" |
|
|
|
v-bind:show-file-list="false"> |
|
|
|
> |
|
|
|
<video v-if="videoForm.videoUrl != '' && !videoFlag" v-bind:src="videoForm.videoUrl" class="avatar video-avatar" controls="controls">您的浏览器不支持视频播放</video> |
|
|
|
<video |
|
|
|
<i v-else-if="videoForm.videoUrl == '' && !videoFlag" class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
v-if="videoForm.videoUrl != '' && !videoFlag" |
|
|
|
<el-progress v-if="videoFlag == true" type="circle" v-bind:percentage="videoUploadPercent" style="margin-top:7px;"></el-progress> |
|
|
|
v-bind:src="videoForm.videoUrl" |
|
|
|
|
|
|
|
class="avatar video-avatar" |
|
|
|
|
|
|
|
controls="controls" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
您的浏览器不支持视频播放 |
|
|
|
|
|
|
|
</video> |
|
|
|
|
|
|
|
<i |
|
|
|
|
|
|
|
v-else-if="videoForm.videoUrl == '' && !videoFlag" |
|
|
|
|
|
|
|
class="el-icon-plus avatar-uploader-icon" |
|
|
|
|
|
|
|
></i> |
|
|
|
|
|
|
|
<el-progress |
|
|
|
|
|
|
|
v-if="videoFlag == true" |
|
|
|
|
|
|
|
type="circle" |
|
|
|
|
|
|
|
v-bind:percentage="videoUploadPercent" |
|
|
|
|
|
|
|
style="margin-top:7px;" |
|
|
|
|
|
|
|
></el-progress> |
|
|
|
|
|
|
|
</el-upload> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="文章内容" :label-width="formLabelWidth" prop="textContent"> |
|
|
|
label="文章内容" |
|
|
|
<quill-editor ref="text" v-model="videoForm.textContent" class="myQuillEditor" :options="editorOption"/> |
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="textContent" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<quill-editor |
|
|
|
|
|
|
|
ref="text" |
|
|
|
|
|
|
|
v-model="videoForm.textContent" |
|
|
|
|
|
|
|
class="myQuillEditor" |
|
|
|
|
|
|
|
:options="editorOption" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<div class="footer"> |
|
|
|
<div class="footer"> |
|
|
|
<el-button type="primary" @click="videoAdd('videoForm')" |
|
|
|
<el-button type="primary" @click="videoAdd('videoForm')">确认</el-button> |
|
|
|
>确认</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-button type="info" @click="cancel()">取消</el-button> |
|
|
|
<el-button type="info" @click="cancel()">取消</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
@ -206,100 +108,39 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="contentbottom"> |
|
|
|
<div class="contentbottom"> |
|
|
|
<el-form :model="linkForm" :rules="rules" ref="linkForm"> |
|
|
|
<el-form :model="linkForm" :rules="rules" ref="linkForm"> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="封面图" :label-width="formLabelWidth" prop="bgImgUrl"> |
|
|
|
label="封面图" |
|
|
|
<el-upload class="avatar-uploader" :action="joggle" :show-file-list="false" :on-success="handleLinkSuccess" :before-upload="beforeAvatarUpload"> |
|
|
|
:label-width="formLabelWidth" |
|
|
|
<img v-if="linkForm.bgImgUrl" :src="linkForm.bgImgUrl" class="avatar" width="200px"/> |
|
|
|
prop="bgImgUrl" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-upload |
|
|
|
|
|
|
|
class="avatar-uploader" |
|
|
|
|
|
|
|
:action="joggle" |
|
|
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
|
|
:on-success="handleLinkSuccess" |
|
|
|
|
|
|
|
:before-upload="beforeAvatarUpload" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<img |
|
|
|
|
|
|
|
v-if="linkForm.bgImgUrl" |
|
|
|
|
|
|
|
:src="linkForm.bgImgUrl" |
|
|
|
|
|
|
|
class="avatar" |
|
|
|
|
|
|
|
width="200px" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i> |
|
|
|
</el-upload> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="日期" :label-width="formLabelWidth"> |
|
|
|
<el-form-item label="日期" :label-width="formLabelWidth"> |
|
|
|
<el-col> |
|
|
|
<el-col> |
|
|
|
<el-date-picker |
|
|
|
<el-date-picker type="date" placeholder="选择日期" v-model="linkForm.createTime" style="width: 100%;"></el-date-picker> |
|
|
|
type="date" |
|
|
|
|
|
|
|
placeholder="选择日期" |
|
|
|
|
|
|
|
v-model="linkForm.createTime" |
|
|
|
|
|
|
|
style="width: 100%;" |
|
|
|
|
|
|
|
></el-date-picker> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="连接类型" :label-width="formLabelWidth" prop="linkType"> |
|
|
|
label="连接类型" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="linkType" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-radio-group v-model="linkForm.linkType"> |
|
|
|
<el-radio-group v-model="linkForm.linkType"> |
|
|
|
<el-radio :label="0">站内链接</el-radio> |
|
|
|
<el-radio :label="0">站内链接</el-radio> |
|
|
|
<el-radio :label="1">站外链接</el-radio> |
|
|
|
<el-radio :label="1">站外链接</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item prop="value" label="站内链接" :label-width="formLabelWidth" v-if="linkForm.linkType == 0"> |
|
|
|
prop="value" |
|
|
|
<el-cascader :change-on-select="true" :props="defaultParams" :options="options" v-model="value" @change="handleChange" :clearable="true"></el-cascader> |
|
|
|
label="站内链接" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
v-if="linkForm.linkType == 0" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-cascader |
|
|
|
|
|
|
|
:change-on-select="true" |
|
|
|
|
|
|
|
:props="defaultParams" |
|
|
|
|
|
|
|
:options="options" |
|
|
|
|
|
|
|
v-model="value" |
|
|
|
|
|
|
|
@change="handleChange" |
|
|
|
|
|
|
|
:clearable="true" |
|
|
|
|
|
|
|
></el-cascader> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="文章" :label-width="formLabelWidth" v-if="linkForm.linkType == 0" prop="linkArticleId"> |
|
|
|
label="文章" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
v-if="linkForm.linkType == 0" |
|
|
|
|
|
|
|
prop="linkArticleId" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-select v-model="linkForm.linkArticleId" placeholder="请选择"> |
|
|
|
<el-select v-model="linkForm.linkArticleId" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
<el-option v-for="item in option" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
v-for="item in option" |
|
|
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item prop="linkUrl" label="站外链接" :label-width="formLabelWidth" v-if="linkForm.linkType == 1"> |
|
|
|
prop="linkUrl" |
|
|
|
<el-input v-model="linkForm.linkUrl" placeholder="请输入链接"></el-input> |
|
|
|
label="站外链接" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
v-if="linkForm.linkType == 1" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="linkForm.linkUrl" |
|
|
|
|
|
|
|
placeholder="请输入链接" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
<el-form-item label="文章标题" :label-width="formLabelWidth" prop="title"> |
|
|
|
label="文章标题" |
|
|
|
|
|
|
|
:label-width="formLabelWidth" |
|
|
|
|
|
|
|
prop="title" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input v-model="linkForm.title" autocomplete="off"></el-input> |
|
|
|
<el-input v-model="linkForm.title" autocomplete="off"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<div class="footer"> |
|
|
|
<div class="footer"> |
|
|
|
<el-button type="primary" @click="linkAdd('linkForm')" |
|
|
|
<el-button type="primary" @click="linkAdd('linkForm')">确认</el-button> |
|
|
|
>确认</el-button |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-button type="info" @click="cancel()">取消</el-button> |
|
|
|
<el-button type="info" @click="cancel()">取消</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|