wangchenguang 2 years ago
commit 0ae9f107a6
  1. 72
      src/components/modules/module.vue
  2. 2
      src/const/modules.js
  3. 6
      src/pages/article/add/index.vue
  4. 4
      src/pages/column/page/talentCenter.vue
  5. 10
      src/styles/page/page.scss

@ -80,41 +80,43 @@
<el-form-item v-for="(item, i) in data.forms" :key="i" :prop="item.prop" :label="item.label"> <el-form-item v-for="(item, i) in data.forms" :key="i" :prop="item.prop" :label="item.label">
<el-input v-if="item.type === 'input'" v-model="data.form[item.prop]" placeholder="请输入" maxlength="100"></el-input> <el-input v-if="item.type === 'input'" v-model="data.form[item.prop]" placeholder="请输入" maxlength="100"></el-input>
<el-input v-if="item.type === 'textarea'" v-model="data.form[item.prop]" type="textarea" placeholder="请输入" maxlength="300"></el-input> <el-input v-if="item.type === 'textarea'" v-model="data.form[item.prop]" type="textarea" placeholder="请输入" maxlength="300"></el-input>
<el-upload <div v-if="item.type === 'upload' || item.type === 'video' || item.type === 'media'" class="uploader-wrap">
v-if="item.type === 'upload'" <el-upload
class="uploader" class="uploader"
accept=".jpg,.png,.jpeg" accept=".jpg,.png,.jpeg"
:on-success="res => uploadSuccess(res, data.form)" :on-success="res => uploadSuccess(res, data.form)"
:show-file-list="false" :show-file-list="false"
:headers="headers" :headers="headers"
:action="api.upload"> :action="api.upload">
<img v-if="data.form[item.prop]" :src="data.form[item.prop]" class="avatar"> <img v-if="data.form[item.prop]" :src="data.form[item.prop]" class="avatar">
<div class="uploader-default" v-else> <div class="uploader-default" v-else>
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<p>上传图片</p> <p>上传图片</p>
</div> </div>
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
<p>只支持.jpg,.png格式</p> <p>只支持.jpg,.png格式</p>
</div> </div>
</el-upload> </el-upload>
<el-upload <el-upload
v-if="item.type === 'video'" v-if="item.type === 'video'"
accept=".mp4,.mov,.avi" accept=".mp4,.mov,.avi"
:on-success="res => uploadSuccess(res, data.form, item)" :on-success="res => uploadSuccess(res, data.form, item)"
:file-list="fileList" :file-list="fileList"
:headers="headers" :headers="headers"
:action="api.upload"> :action="api.upload">
<el-button>上传视频</el-button> <el-button>上传视频</el-button>
</el-upload> </el-upload>
<!-- 图片视频都可上传 --> <!-- 图片视频都可上传 -->
<el-upload <el-upload
v-if="item.type === 'media'" v-if="item.type === 'media'"
:on-success="res => uploadSuccess(res, data.form, item)" :on-success="res => uploadSuccess(res, data.form, item)"
:file-list="fileList" :file-list="fileList"
:headers="headers" :headers="headers"
:action="api.upload"> :action="api.upload">
<el-button>上传资源</el-button> <el-button>上传资源</el-button>
</el-upload> </el-upload>
<i v-if="!item.required" class="el-icon-delete del" @click="data.form[item.prop] = ''"></i>
</div>
<div v-if="item.type === 'link'" class="flex"> <div v-if="item.type === 'link'" class="flex">
<el-input class="m-r-10" v-model="data.form.link.linkName"></el-input> <el-input class="m-r-10" v-model="data.form.link.linkName"></el-input>
<el-button @click="toLink(data.form)">设置链接</el-button> <el-button @click="toLink(data.form)">设置链接</el-button>

@ -5562,7 +5562,7 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: false
}, },
], ],
form: { form: {

@ -2,7 +2,7 @@
<div class="page"> <div class="page">
<p class="page-name mb">文章详情</p> <p class="page-name mb">文章详情</p>
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px"> <el-form :model="form" :rules="rules" class="input-form model" label-width="140px">
<el-form-item class="lg" prop="articleTemplate" label="独立文章模板"> <el-form-item v-if="!isPublication" class="lg" prop="articleTemplate" label="独立文章模板">
<el-popover <el-popover
placement="top-start" placement="top-start"
trigger="hover" trigger="hover"
@ -211,7 +211,9 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</template> </template>
<!-- 非出版物的才显示下面字段 --> <el-form-item v-if="isPublication" prop="mainBody" label="正文">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="form.mainBody" :init="editorConfig" />
</el-form-item>
<div v-else-if="!isPublication" class="item-line"> <div v-else-if="!isPublication" class="item-line">
<el-form-item prop="source" label="来源"> <el-form-item prop="source" label="来源">
<el-input <el-input

@ -40,7 +40,7 @@
<h6 class="c-title">{{ modules[3].form.title }}</h6> <h6 class="c-title">{{ modules[3].form.title }}</h6>
<div class="more">查看更多 ></div> <div class="more">查看更多 ></div>
</div> </div>
<p class="des" v-html="modules[3].form.des"></p> <div class="des" v-html="modules[3].form.des"></div>
<div class="cover" @click="toSet(3)">点击更换标题链接与描述</div> <div class="cover" @click="toSet(3)">点击更换标题链接与描述</div>
</div> </div>
<p class="hot">热门岗位</p> <p class="hot">热门岗位</p>
@ -61,7 +61,7 @@
<h6 class="c-title">{{ modules[6].form.title }}</h6> <h6 class="c-title">{{ modules[6].form.title }}</h6>
<div class="more">查看更多 ></div> <div class="more">查看更多 ></div>
</div> </div>
<p class="des" v-html="modules[6].form.des"></p> <div class="des" v-html="modules[6].form.des"></div>
<div class="cover" @click="toSet(6)">点击更换标题链接与描述</div> <div class="cover" @click="toSet(6)">点击更换标题链接与描述</div>
</div> </div>
<p class="hot">热门岗位</p> <p class="hot">热门岗位</p>

@ -149,7 +149,15 @@ $avatar-height: 80px;
color: #8c939d; color: #8c939d;
} }
} }
/deep/ .uploader { /deep/.uploader-wrap {
display: flex;
.del {
margin-left: 5px;
font-size: 18px;
cursor: pointer;
}
}
/deep/.uploader {
.el-upload { .el-upload {
position: relative; position: relative;
width: $avatar-width; width: $avatar-width;

Loading…
Cancel
Save