fix: bug修复
This commit is contained in:
parent
f088060092
commit
b58ff53eb5
@ -96,6 +96,35 @@ export const constantRouterMap = [
|
||||
}
|
||||
]
|
||||
},
|
||||
// 合集
|
||||
{
|
||||
path: "/serial",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: "noredirect",
|
||||
children: [
|
||||
{
|
||||
path: "detail/:id",
|
||||
component: () => import("@/views/serial/detail/index.vue"),
|
||||
name: "合集详情",
|
||||
meta: { title: "合集详情" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/course",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: "noredirect",
|
||||
children: [
|
||||
{
|
||||
path: "detail/:id",
|
||||
component: () => import("@/views/course/detail/index"),
|
||||
name: "课程详情",
|
||||
meta: { title: "课程详情" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/user",
|
||||
component: Layout,
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
>
|
||||
<div v-if="item.userType !== 2">
|
||||
<span
|
||||
><i v-if="item.readCount">{{ item.readCount }}</i
|
||||
><i v-if="item.readCount !== null">{{ item.readCount }}</i
|
||||
><i>{{ item.totalCount ? `/${item.totalCount}` : "人" }}</i
|
||||
>已读</span
|
||||
>
|
||||
|
||||
@ -749,7 +749,15 @@ export default {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.head-container {
|
||||
h3 {
|
||||
font-size: 20px;
|
||||
}
|
||||
p {
|
||||
font-size: 16px;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
|
||||
@ -21,15 +21,17 @@
|
||||
<div>
|
||||
<el-button
|
||||
v-for="(item, index) in buttonText"
|
||||
:key="index"
|
||||
@click="selected(item.productType)"
|
||||
:class="{ selected: selectedButton === item.productType }"
|
||||
plain
|
||||
@click="selected(item.productType)"
|
||||
>{{ item.showName }}</el-button>
|
||||
<el-button
|
||||
class="custom-button selected"
|
||||
type="primary"
|
||||
@click="copyUrl($event)"
|
||||
>复制投顾主页链接</el-button>
|
||||
>{{ item.showName }}</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="custom-button">
|
||||
<el-button type="primary" @click="customDialog()">自定义tab</el-button>
|
||||
<!-- <el-button type="primary" @click="copyUrl($event)">复制投顾主页链接</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
@ -43,11 +45,11 @@
|
||||
title="自定义tab"
|
||||
append-to-body
|
||||
>
|
||||
<div ref="contentContainer" class="dialog-content">
|
||||
<div class="dialog-content" ref="contentContainer">
|
||||
<div
|
||||
class="dialog-content-item"
|
||||
v-for="(item, index) in buttonTextEdit"
|
||||
:key="item.productType"
|
||||
class="dialog-content-item"
|
||||
draggable="true"
|
||||
>
|
||||
<div class="dialog-content-item-left">{{ item.showName }}</div>
|
||||
@ -56,25 +58,24 @@
|
||||
v-model="item.status"
|
||||
:active-value="1"
|
||||
:inactive-value="2"
|
||||
/>
|
||||
>
|
||||
</el-switch>
|
||||
<i
|
||||
class="el-icon-edit-outline"
|
||||
style="font-size: 24px;margin-left: 10px;cursor: pointer;"
|
||||
@click="openEditTab(item)"
|
||||
/>
|
||||
style="font-size: 24px;margin-left: 10px;cursor: pointer;"
|
||||
></i>
|
||||
<i
|
||||
class="el-icon-set-up"
|
||||
style="font-size: 24px;margin-left: 10px;cursor: pointer;"
|
||||
/>
|
||||
></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="editTab()"
|
||||
>提交</el-button>
|
||||
<el-button size="mini" type="primary" @click="editTab()"
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button size="mini" @click="cancelTab()">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -94,18 +95,17 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
@click="editItem.showName = JSON.parse(JSON.stringify(item))"
|
||||
v-for="(item, index) in buttonTextEditList[editItem.productType]"
|
||||
:key="index"
|
||||
@click="editItem.showName = JSON.parse(JSON.stringify(item))"
|
||||
>{{ item }}</el-button>
|
||||
>{{ item }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="submitEditDialog()"
|
||||
>提交</el-button>
|
||||
<el-button size="mini" type="primary" @click="submitEditDialog()"
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button size="mini" @click="cancelEditDialog()">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -334,6 +334,7 @@ export default {
|
||||
.button-box {
|
||||
padding: 20px 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
.custom-button {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
@ -1,35 +1,21 @@
|
||||
<template>
|
||||
<div class="centent app-container">
|
||||
<div class="menu-container">
|
||||
<el-tabs
|
||||
v-model="editableTabsValue"
|
||||
type="card"
|
||||
@tab-click="selectedTab()"
|
||||
>
|
||||
<el-tab-pane
|
||||
v-for="(item, index) in tgList"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:name="item.name"
|
||||
>
|
||||
{{ item.content }}
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
<div class="button-box">
|
||||
<div>
|
||||
<el-button
|
||||
v-for="(item, index) in buttonText"
|
||||
:key="index"
|
||||
:class="{ selected: selectedButton === item.productType }"
|
||||
plain
|
||||
@click="selected(item.productType)"
|
||||
>{{ item.showName }}</el-button>
|
||||
>{{ item.showName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
class="custom-button selected"
|
||||
type="primary"
|
||||
@click="copyUrl($event)"
|
||||
>复制投顾主页链接</el-button>
|
||||
>复制投顾主页链接</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
@ -70,11 +56,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="editTab()"
|
||||
>提交</el-button>
|
||||
<el-button size="mini" type="primary" @click="editTab()"
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button size="mini" @click="cancelTab()">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -97,15 +81,14 @@
|
||||
v-for="(item, index) in buttonTextEditList[editItem.productType]"
|
||||
:key="index"
|
||||
@click="editItem.showName = JSON.parse(JSON.stringify(item))"
|
||||
>{{ item }}</el-button>
|
||||
>{{ item }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="submitEditDialog()"
|
||||
>提交</el-button>
|
||||
<el-button size="mini" type="primary" @click="submitEditDialog()"
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button size="mini" @click="cancelEditDialog()">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -117,7 +100,7 @@ import LiveTab from "./components/LiveTab.vue";
|
||||
import CourseTab from "./components/CourseTab.vue";
|
||||
import ShortTab from "./components/ShortTab.vue";
|
||||
import { mapGetters } from "vuex";
|
||||
import { tgList, mainTabInfoList, mainTabInfoSave } from "@/api/adviser";
|
||||
import { mainTabInfoList, mainTabInfoSave } from "@/api/adviser";
|
||||
import { handleClipboard } from "@/views/liveBroadcast/manage/config";
|
||||
import { urlResize } from "@/api/videoLive";
|
||||
export default {
|
||||
@ -127,7 +110,6 @@ export default {
|
||||
editableTabsValue: "",
|
||||
selectedButton: null,
|
||||
buttonText: [],
|
||||
tgList: [],
|
||||
advisorId: null,
|
||||
dialogTab: false,
|
||||
sortable: null,
|
||||
@ -151,7 +133,6 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.getTgList()
|
||||
this.advisorId = this.user.advisorInfo.id;
|
||||
this.editableTabsValue = this.user.advisorInfo.name;
|
||||
},
|
||||
@ -159,34 +140,6 @@ export default {
|
||||
...mapGetters(["user"])
|
||||
},
|
||||
watch: {
|
||||
// editableTabsValue(value) {
|
||||
// if(value === '0' && value === null) return
|
||||
// this.$nextTick(()=>{
|
||||
// if(this.selectedButton === 3 && this.$refs.liveTab){
|
||||
// this.$refs.liveTab.getList(value)
|
||||
// }else if(this.selectedButton === 32 && this.$refs.courseTab){
|
||||
// const selectTg = this.tgList.find(item => item.name === value);
|
||||
// this.advisorId = selectTg.id
|
||||
// this.$refs.courseTab.getList(this.advisorId)
|
||||
// }
|
||||
// })
|
||||
|
||||
// },
|
||||
// selectedButton(value){
|
||||
// if(value){
|
||||
// this.$nextTick(()=>{
|
||||
// if(this.selectedButton === 3 && this.$refs.liveTab){
|
||||
// this.$refs.liveTab.getList(this.editableTabsValue)
|
||||
|
||||
// }else if(this.selectedButton === 32 && this.$refs.courseTab){
|
||||
// const selectTg = this.tgList.find(item => item.name === this.editableTabsValue);
|
||||
// this.advisorId = selectTg.id
|
||||
// this.$refs.courseTab.getList(this.advisorId)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
// },
|
||||
advisorId(value) {
|
||||
if (value) {
|
||||
this.getMainTabInfoList();
|
||||
@ -221,26 +174,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
async getTgList() {
|
||||
const ret = await tgList({
|
||||
current: 1,
|
||||
name: this.user.user.name,
|
||||
showName: "",
|
||||
size: 100000,
|
||||
staffNo: "",
|
||||
status: 3,
|
||||
deptId: this.user.user.deptId
|
||||
});
|
||||
if (ret.code === 0) {
|
||||
this.tgList = ret.data.list;
|
||||
if (this.tgList.lenght > 0) {
|
||||
this.advisorId = this.tgList[0].id;
|
||||
this.editableTabsValue = this.tgList[0].name;
|
||||
}
|
||||
|
||||
// 进来获取当前投顾的tab列表
|
||||
}
|
||||
},
|
||||
selectedTab() {
|
||||
const selectTg = this.tgList.find(
|
||||
item => item.name === this.editableTabsValue
|
||||
@ -334,6 +267,7 @@ export default {
|
||||
.button-box {
|
||||
padding: 20px 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
.custom-button {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
@ -21,15 +21,18 @@
|
||||
<div>
|
||||
<el-button
|
||||
v-for="(item, index) in buttonText"
|
||||
:key="index"
|
||||
:class="{ selected: selectedButton === item.productType }"
|
||||
plain
|
||||
@click="selected(item.productType)"
|
||||
>{{ item.showName }}</el-button>
|
||||
>{{ item.showName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
class="custom-button selected"
|
||||
type="primary"
|
||||
@click="copyUrl($event)"
|
||||
>复制投顾主页链接</el-button>
|
||||
>复制投顾主页链接</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
@ -70,11 +73,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="editTab()"
|
||||
>提交</el-button>
|
||||
<el-button size="mini" type="primary" @click="editTab()"
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button size="mini" @click="cancelTab()">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -97,15 +98,14 @@
|
||||
v-for="(item, index) in buttonTextEditList[editItem.productType]"
|
||||
:key="index"
|
||||
@click="editItem.showName = JSON.parse(JSON.stringify(item))"
|
||||
>{{ item }}</el-button>
|
||||
>{{ item }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="submitEditDialog()"
|
||||
>提交</el-button>
|
||||
<el-button size="mini" type="primary" @click="submitEditDialog()"
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button size="mini" @click="cancelEditDialog()">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -333,6 +333,7 @@ export default {
|
||||
.button-box {
|
||||
padding: 20px 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
.custom-button {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
@ -603,6 +603,15 @@ export default {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.head-container {
|
||||
h3 {
|
||||
font-size: 20px;
|
||||
}
|
||||
p {
|
||||
font-size: 16px;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user