|
|
|
|
@ -162,6 +162,54 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:set_list>
|
|
|
|
|
<div class="xy-table-item"> <div class="xy-table-item-label">
|
|
|
|
|
明细:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<Button type="primary" icon="md-add" @click="addListCombo" style="margin-bottom: 10px">新增</Button>
|
|
|
|
|
|
|
|
|
|
<xy-table :height="260" :is-page="false" :list="form.set_list" :table-item="tableCombo">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="操作" width="90" header-align="center" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<Button size="small" type="primary" ghost @click="deleteCombo(scope)">删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:picture_list>
|
|
|
|
|
<div class="xy-table-item"> <div class="xy-table-item-label">
|
|
|
|
|
图集:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
|
|
|
|
|
<el-upload
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
:action="action"
|
|
|
|
|
:before-upload="pichandleBefore"
|
|
|
|
|
:on-success="pichandleSuccess"
|
|
|
|
|
:on-preview="pichandlePreview"
|
|
|
|
|
:before-remove="pichandleBeforeRemove"
|
|
|
|
|
:on-remove="pichandleRemove"
|
|
|
|
|
:file-list="picfileList"
|
|
|
|
|
list-type="picture" multiple>
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件或者视频文件,且不超过2M</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -188,15 +236,44 @@
|
|
|
|
|
tinymce
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
return {
|
|
|
|
|
picfileList:[],
|
|
|
|
|
id: '',
|
|
|
|
|
isShow: false,
|
|
|
|
|
type: '',
|
|
|
|
|
type: '',
|
|
|
|
|
listCombo:[],
|
|
|
|
|
tableCombo:[
|
|
|
|
|
{
|
|
|
|
|
label:'名称',
|
|
|
|
|
sortable:false,
|
|
|
|
|
minWidth:220,
|
|
|
|
|
customFn:(row)=>{
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<el-input size='small' placeholder="请输入名称" value={row.name} on={{['input']:(e)=>{row.name = e}}}/>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:'内容',
|
|
|
|
|
sortable:false,
|
|
|
|
|
minWidth:420,
|
|
|
|
|
customFn:(row)=>{
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<el-input size='small' placeholder="请输入内容" value={row.content} on={{['input']:(e)=>{row.content = e}}}/>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
action: `${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
|
|
|
|
|
clubSelect: {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
page: 1,
|
|
|
|
|
type:"maternity"
|
|
|
|
|
page: 1,
|
|
|
|
|
type: "maternity"
|
|
|
|
|
},
|
|
|
|
|
clubs: [],
|
|
|
|
|
roomTypes: [],
|
|
|
|
|
@ -205,16 +282,17 @@
|
|
|
|
|
form: {
|
|
|
|
|
name: '',
|
|
|
|
|
confinementServicesId: '', //所属机构
|
|
|
|
|
roomType: '',
|
|
|
|
|
state: true,
|
|
|
|
|
recommend: false,
|
|
|
|
|
sortNumber: 0,
|
|
|
|
|
featuredLabel: [],
|
|
|
|
|
state: true,
|
|
|
|
|
price: 0,
|
|
|
|
|
recommend: false,
|
|
|
|
|
coverPicture: '',
|
|
|
|
|
timeLimit: '',
|
|
|
|
|
content: '',
|
|
|
|
|
video: ""
|
|
|
|
|
video: "",
|
|
|
|
|
set_list:[],
|
|
|
|
|
picture_list:[]
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
name: [{
|
|
|
|
|
@ -236,9 +314,40 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
pichandleBefore(file){
|
|
|
|
|
console.log(file)
|
|
|
|
|
if((file.size/1000) > 10240){
|
|
|
|
|
Message({
|
|
|
|
|
type:'warning',
|
|
|
|
|
message:'上传文件大小超过2M!'
|
|
|
|
|
})
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
pichandleRemove(file, fileList) {
|
|
|
|
|
//console.log(file, fileList);
|
|
|
|
|
},
|
|
|
|
|
pichandlePreview(file) {
|
|
|
|
|
console.log(file);
|
|
|
|
|
},
|
|
|
|
|
pichandleSuccess(response, file, fileList){
|
|
|
|
|
this.picfileList.push(response.url)
|
|
|
|
|
},
|
|
|
|
|
pichandleBeforeRemove(file){
|
|
|
|
|
this.picfileList.splice(this.picfileList.indexOf(file.response.id),1)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
addListCombo(){
|
|
|
|
|
this.form.set_list.push({
|
|
|
|
|
name:'',
|
|
|
|
|
content:''
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
deleteCombo(scope){
|
|
|
|
|
this.form.set_list.splice(scope.$index,1)
|
|
|
|
|
},
|
|
|
|
|
//上传
|
|
|
|
|
uploadFailVideo(err) {
|
|
|
|
|
console.log(err)
|
|
|
|
|
@ -295,8 +404,8 @@
|
|
|
|
|
async getClubs() {
|
|
|
|
|
const res = await clubIndex({
|
|
|
|
|
page: this.clubSelect.page,
|
|
|
|
|
page_size: this.clubSelect.pageSize,
|
|
|
|
|
type:this.clubSelect.type
|
|
|
|
|
page_size: this.clubSelect.pageSize,
|
|
|
|
|
type: this.clubSelect.type
|
|
|
|
|
}, false)
|
|
|
|
|
if (res?.data?.length === 0) {
|
|
|
|
|
this.$Message.info({
|
|
|
|
|
@ -322,16 +431,16 @@
|
|
|
|
|
console.log(res)
|
|
|
|
|
this.form = {
|
|
|
|
|
name: res?.name,
|
|
|
|
|
confinementServicesId: res?.confinement_services_id, //所属机构
|
|
|
|
|
confinementServicesId: res?.common_services_id, //所属机构
|
|
|
|
|
roomType: res?.room_type,
|
|
|
|
|
state: !!res?.state,
|
|
|
|
|
recommend: !!res?.recommend,
|
|
|
|
|
sortNumber: res?.sort_number,
|
|
|
|
|
featuredLabel: res?.featured_label?.split(',') || [], //特色标签
|
|
|
|
|
roomOrientation: res?.room_orientation, //房间朝向
|
|
|
|
|
roomFacility: res?.room_facility?.split(',').map(item => Number(item)) || [], //房间设施
|
|
|
|
|
roomArea: res?.room_area,
|
|
|
|
|
price: res?.price,
|
|
|
|
|
state: !!res?.state,
|
|
|
|
|
recommend: !!res?.recommend,
|
|
|
|
|
coverPicture: res?.cover_picture,
|
|
|
|
|
timeLimit: res?.time_limit?.split(','),
|
|
|
|
|
content: res?.content,
|
|
|
|
|
@ -345,11 +454,16 @@
|
|
|
|
|
this.getClubs()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
submit() {
|
|
|
|
|
submit() {
|
|
|
|
|
|
|
|
|
|
let list=[];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let _form = {
|
|
|
|
|
name: this.form.name,
|
|
|
|
|
room_type: this.form.roomType,
|
|
|
|
|
confinement_services_id: this.form.confinementServicesId,
|
|
|
|
|
common_services_id: this.form.confinementServicesId,
|
|
|
|
|
state: this.form.state ? 1 : 0,
|
|
|
|
|
sort_number: this.form.sortNumber,
|
|
|
|
|
featured_label: this.form.featuredLabel?.toString(),
|
|
|
|
|
@ -361,7 +475,9 @@
|
|
|
|
|
price: this.form.price,
|
|
|
|
|
room_area: this.form.roomArea,
|
|
|
|
|
time_limit: this.form.timeLimit?.toString(),
|
|
|
|
|
video: this.form.video
|
|
|
|
|
video: this.form.video,
|
|
|
|
|
set_list:this.form.set_list,
|
|
|
|
|
picture_list:list
|
|
|
|
|
}
|
|
|
|
|
if (this.type === 'add') {
|
|
|
|
|
store(_form).then(res => {
|
|
|
|
|
|