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

页面修改

parent 84fb649a
...@@ -17,16 +17,22 @@ ...@@ -17,16 +17,22 @@
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.TeacherSay" ref="TeacherSay" <q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.TeacherSay" ref="TeacherSay"
class="col-6 q-pb-lg" label="教师营销语" /> class="col-6 q-pb-lg" label="教师营销语" />
<div class="col-6 q-pr-lg q-pb-lg"> <div class="col-6 q-pr-lg q-pb-lg">
<q-uploader style="display: inline-block;height: 320px;max-width: 100%;" <q-uploader style="display: inline-block;height: 320px;max-width: 100%; background-repeat:no-repeat"
:style="{'background-image':'url(' + objOption.TeacherHead + ')'}" hide-upload-btn max-files="1" :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 @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>
<div class="col-6 q-pb-lg"> <div class="col-6 q-pb-lg">
<q-uploader style="display: inline-block;height:320px; max-width: 100%;" <q-uploader style="display: inline-block;height:320px; max-width: 100%;background-repeat:no-repeat"
:style="{'background-image':'url(' + objOption.TeacherIcon + ')'}" hide-upload-btn max-files="1" :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 @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> </div>
<ext-editor :defaultMsg="objOption.TeacherIntro" classStr="col-12" @getEditValue="getEditValue"></ext-editor> <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"> <div class="col-6 q-pr-lg q-pb-lg q-pt-lg">
...@@ -92,6 +98,7 @@ ...@@ -92,6 +98,7 @@
objOption: {}, objOption: {},
optionTitle: "", optionTitle: "",
schoolList: [], schoolList: [],
uploadType: 0,
saveLoading: false, saveLoading: false,
tagText: "", tagText: "",
tags: [], tags: [],
...@@ -102,6 +109,9 @@ ...@@ -102,6 +109,9 @@
this.initObj() this.initObj()
}, },
methods: { methods: {
getType(type) {
this.uploadType = type;
},
//获取编辑器值 //获取编辑器值
getEditValue(obj) { getEditValue(obj) {
this.objOption.TeacherIntro = obj; this.objOption.TeacherIntro = obj;
...@@ -155,15 +165,17 @@ ...@@ -155,15 +165,17 @@
uploadFile(files) { uploadFile(files) {
UploadSelfFile('teacherIcon', files[0], res => { UploadSelfFile('teacherIcon', files[0], res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
if (this.uploadType == 1) {
this.objOption.TeacherHead = res.FileUrl; this.objOption.TeacherHead = res.FileUrl;
} else if (this.uploadType == 2) {
this.objOption.TeacherIcon = res.FileUrl; this.objOption.TeacherIcon = res.FileUrl;
} }
}
}) })
}, },
closeSaveForm() { closeSaveForm() {
this.$emit('close') this.$emit('close')
this.persistent = false this.persistent = false
}, },
createTag() { createTag() {
if (this.tagText.length > 0) { 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