Commit ceb2dc88 authored by zhengke's avatar zhengke

修改

parent a735ead0
...@@ -8,11 +8,17 @@ ...@@ -8,11 +8,17 @@
<div class="text-caption q-mb-lg q-px-md text-grey-6">招聘类型信息</div> <div class="text-caption q-mb-lg q-px-md text-grey-6">招聘类型信息</div>
<div class="row wrap" style="align-items:end;"> <div class="row wrap" style="align-items:end;">
<q-input filled stack-label maxlength="50" :dense="false" v-model="objOption.TypeName" <q-input filled stack-label maxlength="50" :dense="false" v-model="objOption.TypeName"
class="col-6 q-pr-lg q-pb-lg" label="招聘类型" ref="TypeName" :rules="[val => !!val || '请填写招聘类型']" /> class="col-12 q-pb-lg" label="招聘类型" ref="TypeName" :rules="[val => !!val || '请填写招聘类型']" />
<div class="col-6 q-pb-lg q-pr-lg">
<q-uploader :style="{ backgroundImage: 'url(' + objOption.CheckImg + ')' }"
style="width:auto;height:200px;background-repeat:no-repeat;background-size:cover;" flat hide-upload-btn
max-files="1" label="选中图" accept=".jpg, image/*" :factory="uploadFile2" auto-upload>
</q-uploader>
</div>
<div class="col-6 q-pb-lg"> <div class="col-6 q-pb-lg">
<q-uploader :style="{ backgroundImage: 'url(' + objOption.ImgCover + ')' }" <q-uploader :style="{ backgroundImage: 'url(' + objOption.ImgCover + ')' }"
style="width:auto;height:200px;background-repeat:no-repeat;background-size:cover;" flat hide-upload-btn style="width:auto;height:200px;background-repeat:no-repeat;background-size:cover;" flat hide-upload-btn
max-files="1" label="封面" accept=".jpg, image/*" :factory="uploadFile" auto-upload> max-files="1" label="未选中" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
</q-uploader> </q-uploader>
</div> </div>
</div> </div>
...@@ -48,7 +54,8 @@ ...@@ -48,7 +54,8 @@
objOption: { objOption: {
Id: 0, Id: 0,
TypeName: '', TypeName: '',
ImgCover: '' ImgCover: '',
CheckImg:''
}, },
optionTitle: "新增招聘类型", optionTitle: "新增招聘类型",
saveLoading: false, saveLoading: false,
...@@ -68,6 +75,7 @@ ...@@ -68,6 +75,7 @@
this.objOption.Id = res.Data.Id; this.objOption.Id = res.Data.Id;
this.objOption.TypeName = res.Data.TypeName; this.objOption.TypeName = res.Data.TypeName;
this.objOption.ImgCover = res.Data.ImgCover; this.objOption.ImgCover = res.Data.ImgCover;
this.objOption.CheckImg = res.Data.CheckImg;
this.optionTitle = '修改招聘信息' this.optionTitle = '修改招聘信息'
} }
}) })
...@@ -80,6 +88,13 @@ ...@@ -80,6 +88,13 @@
} }
}); });
}, },
uploadFile2(files){
UploadSelfFile("course", files[0], res => {
if (res.Code == 1) {
this.objOption.CheckImg = res.FileUrl;
}
});
},
//关闭弹窗 //关闭弹窗
closeSaveForm() { closeSaveForm() {
this.$emit('close') this.$emit('close')
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增类型" @click="EditComic(null)" /> <q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增类型" @click="EditComic(null)" />
</div> </div>
</template> </template>
<template v-slot:body-cell-ImgCover="props"> <template v-slot:body-cell-CheckImg="props">
<q-td> <q-td>
<img :src="props.row.ImgCover" style="width:50px;" /> <img :src="props.row.CheckImg" style="width:50px;" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
field: 'TypeName', field: 'TypeName',
align: 'left' align: 'left'
},{ },{
name: 'ImgCover', name: 'CheckImg',
label: '封面图', label: '封面图',
field: 'ImgCover', field: 'CheckImg',
align: 'left' align: 'left'
},{ },{
name: 'optioned', name: 'optioned',
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table sticky-right-column-table"
separator="none" :data="data" :columns="columns" row-key="name"> separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">教师团队信息</div> <div class="col-2 q-table__title">教师团队信息</div>
......
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