提交 a773b601 authored 作者: pengxiaohui's avatar pengxiaohui

删除冗余文件

上级 139903c1
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
background: #fff; background: #fff;
padding-top: 4px; padding-top: 4px;
transition: width 0.295s ease-in-out; transition: width 0.295s ease-in-out;
margin-left:10px; padding-left:10px;
} }
.logo-collapse { .logo-collapse {
width: 64px; width: 64px;
......
<template>
<div class="create-meeting">
<el-radio-group v-model="tabActive" size="mini" style="margin:14px 0 10px 40px;">
<el-radio-button label="tx">腾讯</el-radio-button>
<el-radio-button label="cc">cc</el-radio-button>
<!-- <el-radio-button label="week"></el-radio-button>
<el-radio-button label="month"></el-radio-button> -->
</el-radio-group>
<tencent-meeting v-if="tabActive === 'tx'" />
</div>
</template>
<script>
import TencentMeeting from './tencent-meeting/index.vue'
export default {
data() {
return {
tabActive: 'tx'
}
},
components: { TencentMeeting }
}
</script>
<style scope>
.create-meeting{
height:100%;
}
</style>
\ No newline at end of file
<template>
<div class="tx-meeting-container">
<div class="inner">
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="120px">
<el-form-item label="会议主题" prop="subject">
<el-input v-model="form.subject" size="small" />
</el-form-item>
<el-form-item label="开始时间" required>
<el-col :span="11">
<el-form-item prop="startDate">
<el-date-picker
v-model="form.startDate"
type="date"
placeholder="选择日期"
style="width: 100%"
size="small"
:clearable="timerClear"
:editable="timerClear"
:picker-options="startDateOptions"
@change="startDateChange"
/>
</el-form-item>
</el-col>
<el-col :span="2" class="line">-</el-col>
<el-col :span="11">
<el-form-item prop="startTime">
<el-time-select
v-model="form.startTime"
style="width: 100%"
:picker-options="startTimeOptions"
placeholder="选择时间"
size="small"
:clearable="timerClear"
:editable="timerClear"
@change="startTimeChange"
/>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="结束时间" required>
<el-col :span="11">
<el-form-item prop="endDate">
<el-date-picker
v-model="form.endDate"
type="date"
placeholder="选择日期"
style="width: 100%"
size="small"
:clearable="timerClear"
:editable="timerClear"
:picker-options="endDateOptions"
@change="endDateChange"
/>
</el-form-item>
</el-col>
<el-col :span="2" class="line">-</el-col>
<el-col :span="11">
<el-form-item prop="endTime">
<el-time-select
v-model="form.endTime"
style="width: 100%"
:picker-options="endTimeOptions"
placeholder="选择时间"
size="small"
:clearable="timerClear"
:editable="timerClear"
/>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="时区" required>
<el-col>
<el-select style="width: 100%" v-model="form.timezone" placeholder="选择时区" size="small">
<el-option label="(GMT+8:00)中国标准时间-北京" value="beijing" />
</el-select>
</el-col>
</el-form-item>
<el-form-item label="周期会议">
<el-switch v-model="form.meeting_type" :active-value="1" :inactive-value="0" />
<p v-show="form.meeting_type">{{recurringTypeOptions[form.recurring_type]}}</p>
<p v-show="form.meeting_type" style="line-height: 24px;color:#999;">结束于{{getCycleMeetingEndDate}} {{form.until_count}}场会议</p>
</el-form-item>
<el-form-item label="重复频率" v-if="form.meeting_type" required>
<el-col :span="11">
<el-select
style="width: 100%"
v-model="form.recurring_type"
placeholder="选择重复频率"
size="small"
@change="repaeatRateChange"
>
<el-option :label="item" :value="index" v-for="(item, index) in recurringTypeOptions" :key="index"/>
<!-- <el-option label="每个工作日" :value="1" />
<el-option label="每周" :value="2" />
<el-option label="每两周" :value="3" />
<el-option label="每月" :value="4" /> -->
</el-select>
</el-col>
</el-form-item>
<el-form-item label="结束重复" v-if="form.meeting_type" required>
<el-col :span="11">
<el-select style="width: 100%" v-model="form.until_type" placeholder="选择时区" size="small">
<el-option label="结束于某天" :value="0" />
<el-option label="限制会议次数" :value="1" />
</el-select>
</el-col>
<el-col :span="2" class="line">-</el-col>
<el-col :span="11">
<el-date-picker
v-if="form.until_type === 0"
v-model="getCycleMeetingEndDate"
type="date"
placeholder="选择结束日期"
style="width: 100%"
size="small"
:clearable="timerClear"
:editable="timerClear"
:picker-options="cycleMeetingEndDateOptions"
/>
<el-input-number v-else v-model="form.until_count" :min="1" :max="50" size="small"></el-input-number>
</el-col>
</el-form-item>
<!-- <el-form-item label="指定主持人">
<el-col :span="11">
<el-select style="width:100%" v-model="form.moderator" placeholder="选择主持人" size="small">
<el-option :label="user.username" :value="user.id" v-for="user in userList" :key="user.id" />
</el-select>
</el-col>
</el-form-item> -->
<el-form-item label="指定会议管理员">
<p style="line-height:24px;">(会议管理员有修改会议,复制、取消会议等所有管理本次会议的权限)</p>
<el-col :span="8">
<el-dropdown style="width:100%;" @command="(val) => searchType = val">
<el-button size="small" style="width:calc(100% - 5px);">
{{searchTypeOptions[searchType]}}<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="key" v-for="(value, key) in searchTypeOptions" :key="key">{{value}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-col>
<el-col :span="16">
<el-select
style="width: 100%"
v-model="form.managers"
placeholder="请输入关键字搜索"
size="small"
multiple
filterable
remote
:remote-method="fetchUserList"
:loading="searchUsersloading"
>
<el-option :label="user.nickname" :value="user.id" v-for="user in userList" :key="user.id" >
<span style="float: left">{{ user.nickname }}</span>
<span style="float: right; color: #8492a6; font-size: 13px; margin:0 20px 0 10px;">{{ user.id }}</span>
</el-option>
</el-select>
</el-col>
<p class="search-keywords-checked" v-if="searchKeywordsCheckMsg">{{searchKeywordsCheckMsg}}</p>
</el-form-item>
<el-form-item label="会议设置">
<el-checkbox style="width: 120px" v-model="form.hasPwd">开启会议密码</el-checkbox>
<el-input
style="width: 170px"
v-model="form.password"
v-if="form.hasPwd"
placeholder="请输入4-6位数字密码"
type="password"
suffix-icon="el-icon-lock"
size="small"
>
</el-input>
<el-checkbox style="display: block" v-model="form.auto_in_waiting_room">开启等候室</el-checkbox>
<el-checkbox style="display: block" v-model="form.allow_in_before_host"
>准许成员在主持人开始前进入会议</el-checkbox
>
<el-checkbox style="display: block" v-model="form.mute_enable_join">入会自动静音</el-checkbox>
<el-checkbox v-model="form.auto_record">自动录制会议</el-checkbox>
<el-radio-group v-model="form.auto_record_type" v-if="form.auto_record">
<el-radio label="local">本地录制</el-radio>
<el-radio label="cloud">云录制</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="会议直播">
<el-checkbox v-model="form.enable_live">开启会议直播(用于分享给观看直播的用户)</el-checkbox>
</el-form-item>
<el-form-item label="直播主题" v-if="form.enable_live" :required="form.enable_live" prop="live_subject">
<el-input v-model="form.live_subject" size="small" />
</el-form-item>
<el-form-item label="直播简介" v-if="form.enable_live" :required="form.enable_live" prop="live_summary">
<el-input type="textarea" v-model="form.live_summary"></el-input>
</el-form-item>
<el-form-item label="直播设置" v-if="form.enable_live" style="margin-bottom: 0">
<el-checkbox style="width: 150px" v-model="form.enable_live_password">开启观看直播密码</el-checkbox>
<el-input
style="width: 170px"
v-model="form.live_password"
v-if="form.enable_live_password"
placeholder="请输入4-6位数字密码"
type="password"
suffix-icon="el-icon-lock"
size="small"
/>
</el-form-item>
<el-form-item label="" v-if="form.enable_live">
<el-checkbox v-model="form.enable_live_im">准许观众讨论</el-checkbox>
</el-form-item>
<el-form-item style="padding-left: 100px">
<el-button type="primary" @click="submitForm('ruleForm')" size="mini">{{isUpdate ? '修改会议' : '立即创建'}}</el-button>
<el-button @click="resetForm('ruleForm')" size="mini">重置</el-button>
</el-form-item>
</el-form>
<div class="right-container" v-if="showSchedule">
<div class="title">{{ form.startDate | timeFormat }} {{ form.startDate | timeFormat('星期{a}') }}</div>
<schedule :options="options" :data="schedule" :date="form.startDate" />
<div class="pre-time-range" :style="{ top: getTop, height: getHeight }"></div>
</div>
</div>
<meeting-success-dialog :dialogVisible.sync="dialogVisible" :details="details"/>
</div>
</template>
<script>
import Schedule from '@/components/Schedule'
import MeetingSuccessDialog from '@/components/MeetingSuccessDialog/index'
import {
timeTrans,
dateFormat,
getYMDByDate,
getTimestampYMD,
computedDateByRateTimes,
computedTimesByRateDate,
getCurHalfHour,
isSameDate
} from '@/utils/dateAlgs'
import { searchUserList, createMeeting, operateLog, getMeetingDetails, getNonpagedMeetingList, updateMeeting } from '@api/common'
const DAY_TIMESTAMP = 8.64e7
const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
const EMAIL_REG = /^[A-Za-z0-9]+([_.][A-Za-z0-9]+)*@([A-Za-z0-9-]+\.)+[A-Za-z]{2,6}$/
export default {
data() {
const now = new Date()
const nowDate = getYMDByDate(now)
const startDateChecked = (rule, value, callback) => {
if (value) {
const timestamp = Date.parse(value)
if (timestamp < Date.now() - DAY_TIMESTAMP) {
callback(new Error('开始时间必须大于当前时间'))
} else {
callback()
}
}
}
const endDateChecked = (rule, value, callback) => {
if (value) {
if (this.endTimestamp < this.startTimestamp) {
callback(new Error('结束时间必须大于开始时间'))
} else if (this.endTimestamp > this.startTimestamp + DAY_TIMESTAMP) {
callback(new Error('会议时间不能超过24小时'))
} else {
callback()
}
}
}
const validateErrMsg = (rule, value, callback) => {
// 当开启会议直播时,启用验证,处理callback
if (this.form.enable_live && !value) {
const errMsg = rule.field === 'live_subject' ? '请输入直播主题' : '请输入直播简介'
callback(new Error(errMsg))
} else {
callback()
}
}
return {
timerClear: false,
time: '',
recurringTypeOptions: ['每天', '每个工作日', '每周', '每两周', '每月'],
form: {
subject: '',
startDate: nowDate,
startTime: getCurHalfHour('start'),
endDate: nowDate,
endTime: getCurHalfHour('end'),
timezone: 'beijing',
meeting_type: 0,
recurring_type: 0,
until_type: 0,
until_date: '',
until_count: 7,
managers: [],
hasPwd: false,
password: '',
auto_in_waiting_room: false,
allow_in_before_host: true,
auto_record: true,
auto_record_type: 'cloud',
mute_enable_join: false,
enable_live: false,
live_subject: '',
live_summary: '',
enable_live_password: false,
live_password: '',
enable_live_im: false
},
rules: {
subject: [{ required: true, message: '请填写会议主题', trigger: 'blur' }],
startDate: [
{ type: 'date', required: true, message: '请选择开始日期', trigger: 'change' },
{ type: 'date', validator: startDateChecked, trigger: 'change' }
],
startTime: [{ required: true, message: '请选择开始时间', trigger: 'change' }],
endDate: [{ type: 'date', required: true, message: '请选择结束日期', trigger: 'change' }],
endTime: [
{ required: true, message: '请选择结束时间', trigger: 'change' },
{ validator: endDateChecked, trigger: 'change' }
],
moderator: [{ required: true, message: '请选择主持人', trigger: 'change' }],
live_subject: [{ validator: validateErrMsg }],
live_summary: [{ validator: validateErrMsg }]
},
cycleMeetingEndDateOptions: {
disabledDate: time => {
let flag = false
switch (this.form.recurring_type) {
case 0: {
break
}
case 1: {
if (time.getDay() === 5 || time.getDay() === 6) flag = true
break
}
case 2: {
const startDate = timeTrans(this.form.startDate)
if (startDate.getDay() !== time.getDay() || getTimestampYMD(time) < getTimestampYMD(startDate)) flag = true
break
}
case 3: {
const startDate = timeTrans(this.form.startDate)
const disabledDay = ((getTimestampYMD(time) - getTimestampYMD(startDate)) / (DAY_TIMESTAMP * 7)) % 2 !== 0
if (disabledDay || getTimestampYMD(time) < getTimestampYMD(startDate)) flag = true
break
}
case 4: {
const startDate = timeTrans(this.form.startDate)
const day = startDate.getDate()
const targetDay = time.getDate()
let disabledDay = false
if (day > 28) {
const year = time.getFullYear()
const month = time.getMonth() + 1
const targetMDays = new Date(year, month, 0).getDate()
if (targetDay !== targetMDays) disabledDay = true
} else if (startDate.getDate() !== targetDay) {
disabledDay = true
}
if (disabledDay || getTimestampYMD(time) < getTimestampYMD(startDate)) flag = true
break
}
}
return flag
}
},
userList: [],
searchType: 'username',
searchTypeOptions: {
username: '通过用户名搜索',
nickname: '通过昵称搜索',
email: '通过邮箱搜索',
mobile: '通过手机号搜索',
id: '通过ID搜索'
},
searchKeywordsCheckMsg: '',
searchUsersloading: false,
showSchedule: false,
options: {
multi: false, // 是否为多日程
start: 0, // init number 0-23
end: 24, // init number 1-24且end>start
step: 60, // 只接收15, 30, 60三种步伐
lineHeight: 40, // init number 时间线间的高度
nowBeforeDisabled: true,
readonly: true,
popoverPos: 'bottom'
},
schedule: {
userid: '',
events: []
},
dialogVisible: false,
details: {},
isUpdate: false,
userid: ''
}
},
computed: {
user() {
return this.$store.getters.user
},
getTop() {
const timeRange = this.startTimestamp - this.startDotTimestamp
const top = timeRange / ((60 * 1000 * this.options.step) / this.options.lineHeight)
return top + 56 + 'px'
},
getHeight() {
const start = timeTrans(this.startTimestamp)
let end = timeTrans(this.endTimestamp)
if (!isSameDate(start, end)) {
end = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 24, 0, 0)
}
const timeRange = end.getTime() - start.getTime()
const h = timeRange / ((60 * 1000 * this.options.step) / this.options.lineHeight)
return h - 2 + 'px'
},
startDotTimestamp() {
const date = this.form.startDate
const startHour = parseInt(this.options.start)
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), startHour, 0, 0).getTime()
},
startTimestamp() {
return this.getFullDateTime(this.form.startDate, this.form.startTime).getTime()
},
endTimestamp() {
return this.getFullDateTime(this.form.endDate, this.form.endTime).getTime()
},
getCycleMeetingEndDate: {
get: function () {
const startDate = this.form.startDate ? this.form.startDate : Date.now()
return computedDateByRateTimes(startDate, this.form.until_count, this.form.recurring_type)
},
set: function (newValue) {
const times = computedTimesByRateDate(this.form.startDate, newValue, this.form.recurring_type)
this.form.until_count = times
}
},
startDateOptions() {
return {
disabledDate(time) {
return time.getTime() < Date.now() - DAY_TIMESTAMP
}
}
},
startTimeOptions() {
const date = this.form.startDate
const options = {
start: '00:00',
step: '00:30',
end: '23:30'
}
if (date.getTime() <= Date.now()) {
options.start = getCurHalfHour('start')
}
return options
},
endDateOptions() {
const _startDate = this.form.startDate
return {
disabledDate(time) {
return (
getTimestampYMD(time) < getTimestampYMD(_startDate) ||
getTimestampYMD(time) > getTimestampYMD(_startDate) + DAY_TIMESTAMP
)
}
}
},
endTimeOptions() {
const { startDate, endDate, startTime } = this.form
const fullDate = this.getFullDateTime(startDate, startTime)
const minutes = fullDate.getMinutes()
let options
if (this.isSameDate(startDate, endDate)) {
// 结束日期和开始日期同一天,会议最低半小时,则向后推半小时
const _date = fullDate.setMinutes(minutes + 30)
const startTime = dateFormat(_date, '{h}:{i}')
options = {
start: startTime,
step: '00:30',
end: '23:30'
}
} else {
// 结束时间和开始时间不能超过24小时,相隔一天,则向前推半小时
const _date = fullDate.setMinutes(minutes - 30)
const endTime = dateFormat(_date, '{h}:{i}')
options = {
start: '00:00',
step: '00:30',
end: endTime
}
}
return options
}
},
filters: {
timeFormat(val, fmt) {
fmt = fmt || '{y}年{m}月{d}日'
return dateFormat(val, fmt)
}
},
components: { Schedule, MeetingSuccessDialog },
created() {
// this.getUserList()
},
watch: {
getCycleMeetingEndDate: {
handler: function (nv, ov) {
this.form.until_date = Date.parse(nv)
},
immediate: true
},
$route: {
handler: function () {
const query = this.$route.query
if (query.type === '1') {
this.showSchedule = true
this.form.startDate = getYMDByDate(query.start)
this.form.startTime = dateFormat(query.start, '{h}:{i}')
this.form.endDate = getYMDByDate(query.end)
this.form.endTime = dateFormat(query.end, '{h}:{i}')
this.schedule.userid = query.account
this.fetchMeetingList()
} else if (query.type === '2') {
const params = {
meeting_id: query.meeting_id,
sub_meeting_id: query.sub_meeting_id
}
this.isUpdate = true
this.getDetailsData(params)
} else {
this.showSchedule = false
}
},
immediate: true
},
dialogVisible: {
handler: function (nv) {
if (!nv) {
this.goList()
}
}
}
},
methods: {
startDateChange(val) {
this.form.endDate = val
this.startTimeChange()
if (this.showSchedule) {
this.fetchMeetingList()
}
},
startTimeChange() {
const { startDate, endDate } = this.form
if (this.isSameDate(startDate, endDate)) {
this.form.endTime = this.endTimeOptions.start
} else {
this.form.endTime = this.endTimeOptions.end
}
},
endDateChange() {
this.startTimeChange()
},
repaeatRateChange(val) {
if (val === 'everyworkday' && this.form.endType === 'endOneday') {
this.form.periodicTimes = 7
}
},
getFullDateTime(date, timeStr) {
const hmArr = timeStr.split(':')
const h = parseInt(hmArr[0])
const s = parseInt(hmArr[1])
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, s, 0)
},
isSameDate(start, end) {
return dateFormat(start, '{y}-{m}-{d}') === dateFormat(end, '{y}-{m}-{d}')
},
autoRecordChange(val) {
this.auto_record_type = val ? 'cloud' : 'none'
},
// copyText() {
// const text = this.$refs.details.$el.innerText
// this.copyFn(text)
// },
// copyMeetingLink() {
// this.copyFn(this.details.join_url)
// },
// copyLiveLink() {
// this.copyFn(this.details.live_config.live_addr)
// },
// copyFn(val) {
// if (!val) return
// const dom = document.createElement('textarea')
// document.body.appendChild(dom)
// dom.value = val
// dom.select(); // 选择对象
// document.execCommand('Copy');
// this.$message({
// message: '复制成功!',
// type: 'success'
// })
// document.body.removeChild(dom)
// },
// joinMeeting() {
// window.open(this.details.join_url, '_blank');
// },
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
if (this.isUpdate) {
this.fetchUpdateMeeting()
} else {
this.fetchCreateMeeting()
}
} else {
return false
}
})
},
resetForm(formName) {
this.$refs[formName].resetFields()
},
goList() {
this.$router.push('/calendar')
},
async getDetailsData(params) {
const details = await this.fetchMeetingDetails(params)
this.details = details
const start = timeTrans(details.start_time)
const end = timeTrans(details.end_time)
this.userid = details.userid
this.form.subject = details.subject
this.form.startDate = getYMDByDate(start)
this.form.startTime = dateFormat(start, '{h}:{i}')
this.form.endDate = getYMDByDate(end)
this.form.endTime = dateFormat(end, '{h}:{i}')
this.form.meeting_type = details.meeting_type
if (details.meeting_type === 1) {
const recurringRule = details.recurring_rule
this.form.recurring_type = recurringRule.recurring_type
this.form.until_type = recurringRule.until_type
if (recurringRule.until_type === 0) {
this.form.until_date = timeTrans(recurringRule.until_date)
} else {
this.form.until_count = recurringRule.until_count
}
}
if (details.password) {
this.form.password = details.password
this.form.hasPwd = true
}
const setting = details.settings
this.form.auto_in_waiting_room = setting.auto_in_waiting_room
this.form.allow_in_before_host = setting.allow_in_before_host
this.form.auto_record_type = setting.auto_record_type
if (setting.auto_record_type !== 'none') {
this.form.auto_record = true
}
this.form.mute_enable_join = setting.mute_enable_join
if (details.enable_live === 1) {
const liveConfig = details.live_config
this.form.live_subject = liveConfig.live_subject
this.form.live_summary = liveConfig.live_summary
this.form.enable_live_password = Boolean(liveConfig.live_password)
this.form.live_password = liveConfig.live_password
this.form.enable_live_im = liveConfig.enable_live_im
this.form.enable_live = true
} else {
this.form.enable_live = false
}
if (Array.isArray(details.managers) && details.managers.length > 0) {
const _managers = details.managers.map(it => it.user_id)
this.form.managers = _managers;
this.userList = details.managers
}
},
async showMeetingDetails(obj) {
const loading = this.$loading({
lock: true,
text: '获取腾讯会议详情,请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const params = {
meeting_id: obj.meeting_id,
sub_meeting_id: (obj.sub_meetings && obj.sub_meetings.length > 0) ? obj.sub_meetings[0].sub_meeting_id : undefined
}
const details = await this.fetchMeetingDetails(params)
loading.close()
this.details = details
this.dialogVisible = true
},
fetchMeetingList() {
const date = this.form.startDate
const start = dateFormat(date)
const end = dateFormat(new Date(date.getFullYear(), date.getMonth(), date.getDate() + 1))
const params = {
userid: this.schedule.userid,
start_time: start,
end_time: end
}
getNonpagedMeetingList(params).then((res) => {
if (res.code === 0 && res.data && res.data.list) {
console.log(res.data.list)
this.schedule.events = res.data.list
} else {
}
}).catch()
},
fetchUserList(val) {
this.searchKeywordsCheckMsg = ''
if (!val) return
if (this.searchType === 'email' && !EMAIL_REG.test(val)) {
this.searchKeywordsCheckMsg = '邮箱格式错误'
this.userList = []
} else if (this.searchType === 'mobile' && !MOBILE_REG.test(val)) {
this.searchKeywordsCheckMsg = '手机号格式错误'
this.userList = []
} else {
const params = {
[this.searchType]: val
};
this.searchKeywordsCheckMsg = ''
this.searchUsersloading = true
searchUserList(params)
.then(res => {
this.searchUsersloading = false
if (res.data && Array.isArray(res.data.items)) {
this.userList = res.data.items
}
})
.catch(() => {})
}
},
getSubmitParams() {
const form = this.form
const params = {
instanceid: 1,
userid: this.showSchedule ? this.schedule.userid : undefined,
subject: form.subject,
start_time: dateFormat(this.startTimestamp),
end_time: dateFormat(this.endTimestamp),
password: form.password,
meeting_type: form.meeting_type,
settings: {
mute_enable_join: form.mute_enable_join,
auto_in_waiting_room: form.auto_in_waiting_room,
allow_in_before_host: form.allow_in_before_host,
auto_record_type: form.auto_record ? form.auto_record_type : 'none'
},
enable_live: form.enable_live,
managers: form.managers.length > 0 ? form.managers : [this.user.id]
}
if (form.meeting_type === 1) {
params.recurring_rule = {
recurring_type: form.recurring_type,
until_type: form.until_type,
until_date: form.until_type ? undefined : parseInt(form.until_date / 1000),
until_count: form.until_type ? form.until_count : undefined
}
}
if (form.enable_live) {
params.live_config = {
live_subject: form.live_subject,
live_summary: form.live_summary,
enable_live_password: form.enable_live_password,
live_password: form.enable_live_password ? form.live_password : undefined,
enable_live_im: form.enable_live_im
}
}
return params
},
fetchUpdateMeeting() {
const params = this.getSubmitParams()
params.meeting_id = this.$route.query.meeting_id
params.userid = this.userid
const loading = this.$loading({
lock: true,
text: '修改腾讯会议中,请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
updateMeeting(params).then(res => {
loading.close()
if (res.code === 0 && res.data && res.data.status) {
operateLog({ type: `修改会议,被修改会议meeting_code:${this.details.meeting_code}`, user: this.user })
this.$message.success('修改腾讯会议成功')
console.log(this.details)
console.log(params)
this.details.subject = params.subject
this.details.start_time = timeTrans(params.start_time)
this.details.end_time = timeTrans(params.end_time)
this.dialogVisible = true
} else {
this.$message.error(res.message || res.msg || '创建腾讯会议失败')
}
})
},
fetchCreateMeeting() {
const params = this.getSubmitParams()
const loading = this.$loading({
lock: true,
text: '创建腾讯会议中,请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
createMeeting(params).then(res => {
loading.close()
if (res.code === 0 && res.data.id) {
operateLog({ type: `创建会议,被创建会议meeting_code:${res.data.meeting_code}`, user: this.user })
this.$message.success('创建腾讯会议成功')
this.showMeetingDetails(res.data)
} else {
this.$message.error(res.message || res.msg || '创建腾讯会议失败')
}
})
},
fetchMeetingDetails(params) {
return new Promise((resolve, reject) => {
getMeetingDetails(params).then(res => {
if (res.code === 0 && res.data.id) {
resolve(res.data)
} else {
reject(res)
}
}).catch((err) => reject(err))
})
}
}
}
</script>
<style scoped>
.tx-meeting-container {
overflow-y: auto;
height: calc(100% - 52px);
}
.inner {
display: flex;
background: #fff;
margin: 0 15px;
border-radius: 4px;
padding-bottom:10px;
}
.el-form {
flex: 1;
max-width: 600px;
padding:20px 0 10px;
}
.line {
text-align: center;
}
.right-container {
position: relative;
width: 45%;
box-sizing: border-box;
padding-left: 20px;
}
.right-container .title {
position: absolute;
left: 0;
top: 0;
width: 100%;
line-height: 50px;
font-size: 16px;
text-align: center;
}
.pre-time-range {
position: absolute;
left: 70px;
width: calc(100% - 70px);
background: #52b837;
}
.search-keywords-checked{
color: #F56C6C;
font-size: 12px;
line-height: 1;
padding-top: 4px;
position: absolute;
top: 100%;
right: 0;
}
.right-container .el-scrollbar ::v-deep.el-scrollbar__wrap {
/* overflow:hidden; */
}
.tx-meeting-container ::v-deep.el-dialog__header{
padding-top:14px;
}
.tx-meeting-container ::v-deep.el-dialog__headerbtn{
top:12px;
right:12px;
}
.tx-meeting-container ::v-deep.el-dialog__body{
padding:10px 0;
margin:0 20px;
border: 1px solid #DBDBDB;
}
.tx-meeting-container ::v-deep.el-dialog__footer{
padding-bottom:16px;
}
.tx-meeting-container ::v-deep.el-dialog .el-form-item{
margin:0;
}
</style>
...@@ -6,18 +6,6 @@ export default [ ...@@ -6,18 +6,6 @@ export default [
component: Layout, component: Layout,
redirect: '/calendar' redirect: '/calendar'
}, },
{
path: '/meeting-old',
component: Layout,
children: [
{
path: '',
component: () => import('@/pages/meeting/index-old.vue'),
name: 'CreateLive',
meta: { title: '创建直播', affix: true }
}
]
},
{ {
path: '/meeting-create', path: '/meeting-create',
component: Layout, component: Layout,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论