功能细化

This commit is contained in:
@fawn-nine
2024-06-12 16:41:22 +08:00
parent 83987414aa
commit 3e8e5cf7e4
5 changed files with 163 additions and 60 deletions

View File

@@ -70,13 +70,6 @@
<template slot-scope="scope">
<div>
<span>{{ scope.row.title }}</span>
<el-tooltip placement="bottom" effect="light">
<div slot="content">多行信息<br />第二行信息多行信息<br />第二行信息多行信息<br />第二行信息多行信息第二行信息多行信息<br />第二行信息</div>
<i
class="el-icon-paperclip"
style=" color:#17B3A3; margin-left:15px"
></i>
</el-tooltip>
</div>
</template>
</el-table-column>
@@ -263,7 +256,7 @@
fixed="right"
header-align="center"
align="center"
width="160"
width="240"
label="操作"
>
<template slot-scope="scope">
@@ -317,6 +310,9 @@
@click="addOrUpdateHandle(scope.row)"
>修改</el-button
>
<el-button type="text" size="small" @click="showLinkTags(scope.row)"
>查看引用</el-button
>
<el-button
type="text"
size="small"
@@ -344,6 +340,44 @@
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
<el-dialog
title="课程引用一览"
:visible.sync="resListVisible"
width="60%"
@close="closeLink"
>
<div>
<div v-if="resList.length > 0">
<div style="margin-bottom:20px">当前课程共有 {{resList.length}} 个标签引用</div>
<div v-for="(item, index) in resList" :key="index">
{{index + 1}} {{ item.title }}
<span v-if="item.isLast != 1">
<span v-for="(item1, index1) in item.children" :key="index1"
> > {{ item1.title }}
<span v-if="item1.isLast != 1">
<span
v-for="(item2, index2) in item1.children"
:key="index2"
> > {{ item2.title }}
<span v-if="item2.isLast != 1">
<span
v-for="(item3, index3) in item2.children"
:key="index3"
> > {{ item3.title }}</span
>
</span>
</span>
</span>
</span>
</span>
</div>
</div>
<div v-else>这门课程还没有被标签引用哦~</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="closeLink"> </el-button>
</span>
</el-dialog>
</div>
</template>
@@ -390,7 +424,9 @@ export default {
urlList: {
medicalList: "/master/courseMedical/getCourseMedicalList", //医学
sociologyList: "/master/courseSociology/getCourseSociologyList" //国学
}
},
resList: [],
resListVisible: false
};
},
components: {
@@ -406,6 +442,27 @@ export default {
this.getTreeList(this.urlList.sociologyList, 2);
},
methods: {
closeLink() {
this.resListVisible = false;
this.resList = [];
},
showLinkTags(row) {
this.$http({
url: this.$http.adornUrl("/master/course/getCourseLableLinkList"),
method: "post",
data: this.$http.adornData({
courseId: row.id
})
}).then(res => {
this.resListVisible = true;
if (res.data.code == 0 && res.data.resList.length > 0) {
this.resList = res.data.resList;
}
// console.log(row, "row" , res.data.resList,this.resList);
});
},
handleChange(value) {
console.log(value, "989999999");
},