提交 3dbb2223 authored 作者: pengxiaohui's avatar pengxiaohui

优化交互

上级 1aac5272
module.exports = {
domain: 'dev.ezijing.com',
url: 'https://live-broadcast2.ezijing.com/api',
// url: 'https://test-microservices-live-api.ezijing.com',
// url: 'https://microservices-live-api.ezijing.com',
url: 'https://live-broadcast2-admin.ezijing.com/api',
webpack: {
externals: {
CKEDITOR: 'window.CKEDITOR',
......
......@@ -7,15 +7,14 @@ export function operateLog(params) {
const data = {
detail: logMsg
}
httpRequest.post('/api/admin/live/v2/system/log/write', data).then(res => {
console.log(res)
httpRequest.post('/api/live/admin/v2/system/log/write', data).then(res => {
}).catch(() => {})
}
/**
* 模糊搜索
*/
export function searchUserList(params) {
return httpRequest.get('/api/common/v1/sso-user/search', { params })
return httpRequest.get('/api/live/common/v1/sso-user/search', { params })
}
/**
* 创建腾讯用户
......@@ -106,7 +105,7 @@ export function getMeetingRecordAddr(params) {
*/
export function exportParticipants(params) {
return httpRequest({
url: `/api/admin/live/v2/tencent/meeting/${params.meeting_id}/participants/export`,
url: `/api/live/admin/v2/tencent/meeting/${params.meeting_id}/participants/export`,
method: 'get',
params,
responseType: 'blob'
......
......@@ -174,6 +174,9 @@ export default {
} else {
this.scheduleList = nv
}
this.$nextTick(() => {
this.containerWidth = this.calcWidth()
})
},
immediate: true,
deep: true
......@@ -223,10 +226,11 @@ export default {
mounted() {
// console.log(this.containerWidth)
this.$refs.scheduleScroll.wrap.addEventListener('scroll', this.scrollHandle);
this.containerWidth = this.calcWidth()
window.addEventListener('resize', this.handleResize)
},
beforeDestroy() {
this.$refs.scheduleScroll.wrap.removeEventListener('scroll', this.scrollHandle);
this.$refs.scheduleScroll.wrap.removeEventListener('resize', this.handleResize);
},
methods: {
calcWidth() {
......@@ -236,13 +240,20 @@ export default {
minWidth = parseFloat(minWidth)
}
const count = this.scheduleList.length;
const viewWidth = this.$refs.scheduleScroll.wrap.clientWidth
if (viewWidth < minWidth * count) {
let viewWidth = 0
try {
viewWidth = this.$refs.scheduleScroll.wrap.clientWidth
} catch {
}
if (viewWidth - 50 < minWidth * count) {
return minWidth * count + 'px'
} else {
return 'calc(100% - 50px)'
}
},
handleResize () {
this.containerWidth = this.calcWidth()
},
documentClick() {
this.newPopoverVisible = false
},
......
......@@ -72,16 +72,9 @@ export default {
params.sub_meeting_id = row.sub_meeting_id
}
exportParticipants(params).then((res) => {
console.log(res)
if (res && res.type === 'text/xlsx') {
const url = URL.createObjectURL(res)
// const elink = document.createElement('a')// 创建一个a标签
// elink.download = `参会人员表_${this.nowFormat}.xlsx`;// 设置a标签的下载属性
// elink.style.display = 'none';// 将a标签设置为隐藏
// elink.href = URL.createObjectURL(blob);// 把之前处理好的地址赋给a标签的href
// document.body.appendChild(elink);// 将a标签添加到body中
// elink.click();// 执行a标签的点击方法
// URL.revokeObjectURL(elink.href) // 下载完成释放URL 对象
// document.body.removeChild(elink)// 移除a标签
this.funDownload(url, `参会人员表_${this.nowFormat}.xlsx`)
}
})
......
......@@ -3,7 +3,7 @@
<i v-if="navItem.icon" :class="navItem.icon"></i>
<span slot="title">{{navItem.title}}</span>
</el-menu-item>
<el-submenu v-else ref="subMenu" popper-append-to-body :index="navItem.path">
<el-submenu v-else ref="subMenu" :index="navItem.path">
<template slot="title">
<i v-if="navItem.icon" :class="navItem.icon"></i>
<span>{{navItem.title}}</span>
......
......@@ -24,7 +24,6 @@ export default {
position: relative;
overflow: hidden;
}
.fixed-header+.app-main {
padding-top: 50px;
}
......
......@@ -69,7 +69,6 @@ export default {
defaultDate: {
handler: function(nv, ov) {
if (nv) {
console.log(nv)
this.getScheduleData()
}
},
......
<template>
<div class="list">
<el-table :data="listData" style="width: 100%" height="calc(100% - 32px)">
<el-table-column label="会议时间" min-width="160">
<el-table-column label="会议时间" min-width="160" align="center">
<template slot-scope="scope">
<p style="color: #aeaeae">
<span style="font-size: 18px; color: #606266">{{ scope.row.start_time | dateFormat('{d}') }}</span>
......@@ -15,15 +15,15 @@
</p>
</template>
</el-table-column>
<el-table-column label="会议主题" min-width="180">
<el-table-column label="会议主题" min-width="180" align="center">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top" width="240">
<p>{{ scope.row.subject }}</p>
<el-popover trigger="click" placement="top" width="280">
<p style="margin-bottom:5px;">主题:{{ scope.row.subject }}</p>
<p style="margin-bottom:5px;">会议号:{{ scope.row.meeting_code }}</p>
<div slot="reference" class="name-wrapper">
<p style="display: flex">
<p style="display:inline-flex;text-align:center;">
<span
style="
flex: 1;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
......@@ -31,14 +31,14 @@
"
>{{ scope.row.subject }}</span
>
<span v-if="scope.row.meeting_type === 1" style="color: #409dff; width: 40px">(周期)</span>
<span v-if="scope.row.meeting_type === 1" style="display:inline-table; color: #409dff; width: 40px">(周期)</span>
</p>
</div>
</el-popover>
</template>
</el-table-column>
<!-- <el-table-column prop="resource" label="会议来源" width="80"></el-table-column> -->
<el-table-column prop="resource" label="会议状态" width="80">
<el-table-column prop="resource" label="会议状态" width="80" align="center">
<template slot-scope="scope">
<p
:class="{
......@@ -52,8 +52,8 @@
</p>
</template>
</el-table-column>
<el-table-column prop="sso_user.nickname" label="创建人" min-width="100"></el-table-column>
<el-table-column label="操作" width="220">
<el-table-column prop="sso_user.nickname" label="创建人" min-width="100" align="center"></el-table-column>
<el-table-column label="操作" width="220" align="center">
<template slot-scope="scope">
<table-handles :rowData="scope.row" @refresh="fetchMeetingList"/>
</template>
......
......@@ -477,6 +477,13 @@ export default {
}
},
immediate: true
},
dialogVisible: {
handler: function (nv) {
if (!nv) {
this.goList()
}
}
}
},
methods: {
......@@ -583,6 +590,9 @@ export default {
resetForm(formName) {
this.$refs[formName].resetFields()
},
goList() {
this.$router.push('/calendar')
},
async getDetailsData(params) {
const details = await this.fetchMeetingDetails(params)
this.details = details
......@@ -636,7 +646,7 @@ export default {
});
const params = {
meeting_id: obj.meeting_id,
sub_meeting_id: obj.sub_meetings[0].sub_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()
......
<template>
<div>个人中心</div>
<div class="account">
<h5>我的资料</h5>
<div class="inner">
<div class="item">
<div class="avatar"><img :src="user.avatar"></div>
<div class="user">
<p>{{user.nickname}}</p>
<p>ID:{{user.id}}</p>
</div>
</div>
<div class="item">
<label>邮箱:</label>{{user.email}}
</div>
<div class="item">
<label>手机号:</label>{{user.mobile}}
</div>
<div class="item">
<label>系统角色:</label>
<span v-for="(role, index) in roles" :key="index">{{index ? '、' + role.name : role.name}}</span>
<span v-if="roles.length === 0"></span>
</div>
<div class="item">
<label>真实姓名:</label>{{user.realname || "无"}}
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
data () {
return {}
},
computed: {
...mapGetters(['user', 'roles'])
}
}
</script>
<style scoped>
.account {
height: 100%;
}
h5 {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
font-weight: 400;
line-height: 50px;
text-indent: 40px;
}
.inner {
height: calc(100% - 50px - 10px);
background: #ffffff;
border-radius: 10px;
margin: 0 16px;
box-sizing: border-box;
padding: 14px 30px 6px;
}
.item{
display:flex;
line-height:40px;
margin-top:20px;
padding-bottom:20px;
border-bottom:1px solid #F1F1F1;
}
.item label{
width:130px;
color:#999;
}
.avatar{
width:80px;
}
.avatar img{
width:80px;
height:80px;
border-radius:10px;
}
.user p{
line-height:32px;
padding-left:50px;
}
.user p:first-child{
font-size:16px;
line-height:44px;
color:#333;
}
</style>
......@@ -5,8 +5,8 @@
<div class="search-filter">
<el-row style="margin-bottom:14px;">
<el-col :span="8">
<label>会议ID</label>
<el-input placeholder="请输入会议ID" v-model="filter.meetingId" size="mini" clearable></el-input>
<label>会议</label>
<el-input placeholder="请输入会议号" v-model="filter.meetingCode" size="mini" clearable></el-input>
</el-col>
<el-col :span="8">
<label>会议主题</label>
......@@ -39,7 +39,7 @@
</el-row>
</div>
<el-table :data="listData" style="width: 100%" height="calc(100% - 116px)">
<el-table-column label="会议时间" min-width="160">
<el-table-column label="会议时间" min-width="160" align="center">
<template slot-scope="scope">
<p style="color: #aeaeae">
<span style="font-size: 18px; color: #606266">{{ scope.row.start_time | dateFormat('{d}') }}</span>
......@@ -53,15 +53,15 @@
</p>
</template>
</el-table-column>
<el-table-column label="会议主题" min-width="180">
<el-table-column label="会议主题" min-width="180" align="center">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top" width="240">
<p>{{ scope.row.subject }}</p>
<el-popover trigger="click" placement="top" width="240">
<p style="margin-bottom:5px;">主题:{{ scope.row.subject }}</p>
<p style="margin-bottom:5px;">会议号:{{ scope.row.meeting_code }}</p>
<div slot="reference" class="name-wrapper">
<p style="display: flex">
<p style="display:inline-flex;text-align:center;">
<span
style="
flex: 1;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
......@@ -69,14 +69,14 @@
"
>{{ scope.row.subject }}</span
>
<span v-if="scope.row.meeting_type === 1" style="color: #409dff; width: 40px">(周期)</span>
<span v-if="scope.row.meeting_type === 1" style="color: #409dff; display:inline-table;width: 40px">(周期)</span>
</p>
</div>
</el-popover>
</template>
</el-table-column>
<!-- <el-table-column prop="resource" label="会议来源" width="80"></el-table-column> -->
<el-table-column prop="resource" label="会议状态" min-width="80">
<el-table-column prop="resource" label="会议状态" min-width="80" align="center">
<template slot-scope="scope">
<p
:class="{
......@@ -90,8 +90,8 @@
</p>
</template>
</el-table-column>
<el-table-column prop="sso_user.nickname" label="创建人" min-width="100"></el-table-column>
<el-table-column label="操作" width="240">
<el-table-column prop="sso_user.nickname" label="创建人" min-width="100" align="center"></el-table-column>
<el-table-column label="操作" width="240" align="center">
<template slot-scope="scope">
<table-handles :rowData="scope.row" @refresh="fetchMeetingList"/>
</template>
......@@ -110,7 +110,7 @@ export default {
data() {
return {
filter: {
meetingId: '',
meetingCode: '',
subject: '',
status: '',
userid: '',
......@@ -172,7 +172,7 @@ export default {
limit: this.pageSize,
sso_id: filter.userid ? filter.userid : undefined,
status: filter.status ? filter.status : undefined,
meeting_id: filter.meetingId ? filter.meetingId : undefined,
meeting_code: filter.meetingCode ? filter.meetingCode : undefined,
subject: filter.subject ? filter.subject : undefined,
start_time: start,
end_time: endPlus1
......
......@@ -16,8 +16,8 @@
</el-table>
<el-pagination :current-page.sync="curPage" :page-size="pageSize" layout="total, prev, pager, next" :total="total" @current-change="pageChange" style="float:right;"></el-pagination>
<el-dialog :title="domicTitle" :visible.sync="dialogVisible" width="30%" center>
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="70px" class="demo-ruleForm" v-show="dialogVisible === 'add' || dialogVisible === 'edit'">
<el-form-item label="ID" prop="userid" v-if="dialogVisible === 'edit'">
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="70px" class="demo-ruleForm" v-show="dialogType === 'add' || dialogType === 'edit'">
<el-form-item label="ID" prop="userid" v-if="dialogType === 'edit'">
<el-input v-model="form.userid" size="small" disabled></el-input>
</el-form-item>
<el-form-item label="ID" prop="userid" v-else>
......@@ -35,10 +35,10 @@
<el-input v-model="form.email" size="small"></el-input>
</el-form-item>
</el-form>
<p v-show="dialogVisible === 'delete'">删除此账号,与其相关的会议将被同时删除,确认删除此账号吗?</p>
<p v-show="dialogType === 'delete'">删除此账号,与其相关的会议将被同时删除,确认删除此账号吗?</p>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleBtn" size="mini">确 定</el-button>
<el-button @click="dialogVisible = null" size="mini">取 消</el-button>
<el-button @click="dialogVisible = false" size="mini">取 消</el-button>
</span>
</el-dialog>
</div>
......@@ -75,7 +75,8 @@ export default {
curPage: 1,
pageSize: 20,
total: 0,
dialogVisible: null,
dialogVisible: false,
dialogType: 'add',
form: {
userid: '',
username: '',
......@@ -100,10 +101,10 @@ export default {
}
},
computed: {
...mapGetters(['isSuperAdmin']),
...mapGetters(['isSuperAdmin', 'user']),
domicTitle() {
let title = '新增'
switch (this.dialogVisible) {
switch (this.dialogType) {
case 'edit':
title = '编辑'
break
......@@ -116,33 +117,35 @@ export default {
},
created() {
this.fetchAccountList()
console.log(this.isSuperAdmin)
},
methods: {
handleEdit(data) {
this.form = _.cloneDeep(data)
this.dialogVisible = 'edit'
this.dialogType = 'edit'
this.dialogVisible = true
},
handleAdd() {
for (const key in this.form) {
this.form[key] = ''
}
this.dialogVisible = 'add'
this.dialogType = 'add'
this.dialogVisible = true
},
handleDelete(id) {
this.dialogVisible = 'delete'
this.dialogType = 'delete'
this.dialogVisible = true
this.deleteId = id
},
pageChange() {
this.fetchRoleList()
},
handleBtn() {
if (this.dialogVisible === 'delete') {
if (this.dialogType === 'delete') {
this.fetchDeleteAccount()
} else {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
this.dialogVisible === 'add' ? this.fetchCreateAccount() : this.fetchUpdateAccount()
this.dialogType === 'add' ? this.fetchCreateAccount() : this.fetchUpdateAccount()
}
});
}
......
......@@ -2,9 +2,7 @@
<div class="account">
<h5>
角色管理
<el-button style="float: right; margin: 12px 30px 0 0" size="mini" type="primary" plain @click="handleAdd"
>添加角色</el-button
>
<!-- <el-button style="float: right; margin: 12px 30px 0 0" size="mini" type="primary" plain @click="handleAdd">添加角色</el-button> -->
</h5>
<div class="inner">
<el-table :data="listData" style="width: 100%" height="calc(100% - 32px)">
......@@ -12,14 +10,14 @@
<el-table-column prop="display_name" label="角色名称" min-width="120"></el-table-column>
<el-table-column prop="description" label="角色描述" min-width="120"></el-table-column>
<el-table-column prop="updated_at" label="创建时间" min-width="120"></el-table-column>
<el-table-column label="操作" min-width="140">
<!-- <el-table-column label="操作" min-width="140">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleUsers(scope.row)">分配用户</el-button>
<el-button type="text" size="small" @click="handlePermission(scope.row)">设置权限</el-button>
<el-button type="text" size="small" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text" size="small" @click="handleDelete(scope.row.userid)">删除</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<el-pagination :current-page.sync="curPage" :page-size="pageSize" layout="total, prev, pager, next" :total="total" @current-change="pageChange" style="float:right;"></el-pagination>
</div>
......@@ -73,6 +71,7 @@ export default {
handleDelete(val) {
console.log(val)
},
handleAdd() {},
pageChange() {
this.fetchRoleList()
},
......
......@@ -95,3 +95,16 @@ body {
'Hiragino Sans GB', 'Wenquanyi Micro Hei', sans-serif;
background-color: #f9f9f9;
}
/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
transition: all .5s;
}
.fade-transform-enter {
opacity: 0;
transform: translateX(-30px);
}
.fade-transform-leave-to {
opacity: 0;
transform: translateX(30px);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论