master
lion 1 year ago
parent 7a8e816d44
commit 7663fc6e5a

@ -4,3 +4,6 @@ ENV='development'
# base api
VUE_APP_BASE_API=https://suzhoukeji-test.ali251.langye.net
VUE_APP_UPLOAD_API=https://suzhoukeji-test.ali251.langye.net/api/admin/upload-file
#VUE_APP_BASE_API = https://wx.sstbc.com
#VUE_APP_UPLOAD_API = https://wx.sstbc.com/api/admin/upload-file

@ -99,7 +99,7 @@
</div>
</div>
</template>
<template v-slot:use_student>
<!-- <template v-slot:use_student>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>是否只有学员可以预约
@ -111,6 +111,19 @@
</el-select>
</div>
</div>
</template> -->
<template v-slot:show_front>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>是否显示在小程序
</div>
<div class="xy-table-item-content">
<el-select v-model="form.show_front" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in false_or_true" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<!-- <template v-slot:dateRange>
<div class="xy-table-item">
@ -194,7 +207,8 @@
content: '',
total: '',
status: 1,
use_student: 1,
use_student: 1,
show_front:0,
// dateRange: ['09:00','17:30'],
file_ids: [],
// start_time:'09:00',
@ -282,7 +296,8 @@
this.fileList = res.files
this.form.sort = res.sort?res.sort:0
this.form.status = res.status ? res.status : 0
this.form.use_student = res.use_student ? res.use_student : 0
// this.form.use_student = res.use_student ? res.use_student : 0
this.form.show_front = res.show_front ? res.show_front : 0
// this.form.dateRange = res.start_time?[res.start_time,res.end_time]:['','']
// this.form.door = res.door?JSON.parse(res.door):''
// this.form.room = res.room?JSON.parse(res.room):''
@ -311,6 +326,7 @@
total: '',
status: 1,
use_student: 1,
show_front:0,
// dateRange: ['09:00','17:30'],
file_ids: [],
// start_time:'09:00',

@ -87,7 +87,7 @@
</div>
<div class="xy-table-item-content">
<el-select v-model="siteData" @change="changeSite" multiple collapse-tags placeholder="请选择预约场地" clearable style="width:100%">
<el-option v-for="item in site_options" :key="item.id" :label="item.real_name" :value="item.id">
<el-option v-for="item in site_options" :key="item.id" :label="item.show_name" :value="item.id">
</el-option>
</el-select>
</div>
@ -177,7 +177,8 @@
status: 1,
reason: ''
},
loading: false,
loading: false,
allUser:[],
user_options: [],
site_options: [],
course_options: [],
@ -205,7 +206,7 @@
}
}
},
created() {
created() {
this.getCourseList()
this.getUserList('')
this.getSites()
@ -252,15 +253,19 @@
return
}
}
if (this.type === 'more') {
if (this.type === 'more') {
console.log("this.form.user_id",this.form.user_id)
let _arr = []
if (this.base.isNull(this.form.user_id)) {
this.user_options.map(item => {
this.allUser.map(item => {
_arr.push(item.id)
})
} else {
_arr = this.user_options.filter(item => !this.form.user_id.includes(item.id))
_arr = _arr.map(item => item.id)
let _filterarr = this.allUser.filter(item => !this.form.user_id.includes(item.id))
console.log("_filterarr",_filterarr)
_filterarr.map(item => {
_arr.push(item.id)
})
}
console.log("_arr", _arr)
if(_arr.length===0){
@ -268,7 +273,8 @@
return
}
this.form.user_id = _arr.join(",")
}
}
// return
if (this.type === "editor") {
this.form.status = 0
}
@ -340,19 +346,31 @@
remoteMethod(query) {
if (query !== '') {
this.loading = true;
this.getUserList(query)
} else {
this.user_options = [];
this.remoteUserList(query)
}
},
async remoteUserList(query) {
const res = await indexStudy({
page: 1,
page_size: 300,
name: query,
course_id: this.form.course_id,
})
this.user_options = res.list.data
if(res.list.data===0){
this.$Message.warning("当前搜索没有学员")
}
this.loading = false
},
async getUserList(query) {
const res = await indexStudy({
page: 1,
page_size: 99,
page_size: 300,
name: query,
course_id: this.form.course_id,
})
this.user_options = res.list.data
this.allUser = res.list.data
if(this.user_options.length===0){
this.$Message.warning("当前搜索没有学员")
}
@ -368,6 +386,9 @@
value: 1
}]
})
res.data.map(item=>{
item.show_name = item.content?`${item.real_name}(${item.content})`:item.real_name
})
this.site_options = res.data
},
changeCourse(e) {

Loading…
Cancel
Save