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