Commit 8b52d12e authored by 黄奎's avatar 黄奎

页面修改

parent 84fb649a
......@@ -17,16 +17,22 @@
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.TeacherSay" ref="TeacherSay"
class="col-6 q-pb-lg" label="教师营销语" />
<div class="col-6 q-pr-lg q-pb-lg">
<q-uploader style="display: inline-block;height: 320px;max-width: 100%;"
:style="{'background-image':'url(' + objOption.TeacherHead + ')'}" hide-upload-btn max-files="1"
<q-uploader style="display: inline-block;height: 320px;max-width: 100%; background-repeat:no-repeat"
:style="{'background-image':'url(' + objOption.TeacherHead + ')'}" max-files="1" hide-upload-btn
@rejected="onRejected" label="教师头像" :max-file-size="512*1024" accept=".jpg, image/*" auto-upload
:factory="uploadFile" />
:factory="uploadFile" no-thumbnails @added="getType(1)">
<template v-slot:list="scope">
</template>
</q-uploader>
</div>
<div class="col-6 q-pb-lg">
<q-uploader style="display: inline-block;height:320px; max-width: 100%;"
:style="{'background-image':'url(' + objOption.TeacherIcon + ')'}" hide-upload-btn max-files="1"
<q-uploader style="display: inline-block;height:320px; max-width: 100%;background-repeat:no-repeat"
:style="{'background-image':'url(' + objOption.TeacherIcon + ')'}" max-files="1" hide-upload-btn
@rejected="onRejected" label="教师形象照" :max-file-size="512*1024" accept=".jpg, image/*" auto-upload
:factory="uploadFile" />
:factory="uploadFile" no-thumbnails @added="getType(2)">
<template v-slot:list="scope">
</template>
</q-uploader>
</div>
<ext-editor :defaultMsg="objOption.TeacherIntro" classStr="col-12" @getEditValue="getEditValue"></ext-editor>
<div class="col-6 q-pr-lg q-pb-lg q-pt-lg">
......@@ -92,6 +98,7 @@
objOption: {},
optionTitle: "",
schoolList: [],
uploadType: 0,
saveLoading: false,
tagText: "",
tags: [],
......@@ -102,6 +109,9 @@
this.initObj()
},
methods: {
getType(type) {
this.uploadType = type;
},
//获取编辑器值
getEditValue(obj) {
this.objOption.TeacherIntro = obj;
......@@ -155,15 +165,17 @@
uploadFile(files) {
UploadSelfFile('teacherIcon', files[0], res => {
if (res.resultCode == 1) {
this.objOption.TeacherHead = res.FileUrl;
this.objOption.TeacherIcon = res.FileUrl;
if (this.uploadType == 1) {
this.objOption.TeacherHead = res.FileUrl;
} else if (this.uploadType == 2) {
this.objOption.TeacherIcon = res.FileUrl;
}
}
})
},
closeSaveForm() {
this.$emit('close')
this.persistent = false
},
createTag() {
if (this.tagText.length > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment