clay fix : 关闭一系列bug

This commit is contained in:
clay
2022-10-04 17:17:55 +08:00
parent 698adad066
commit 65e7a1ad86
7 changed files with 122 additions and 82 deletions

View File

@@ -3,8 +3,8 @@
<el-row>
<el-col>
<div class="context">
<div class="title">{{value.title}}</div>
<div class="text" v-html="value.content"></div>
<div v-if="value" class="title">{{ value.title }}</div>
<div v-if="value" class="text" v-html="value.content"></div>
</div>
</el-col>
</el-row>
@@ -15,30 +15,45 @@
export default {
name: "Introduction",
props: {
value: {
introduction: {
type: Object,
default: {
title:"12",
content:"12"
default() {
return {
}
},
},
},
data(){
return{}
}
data() {
return {
introductionData : this.value
}
},
watch:{
value(val){
this.introductionData = val
}
},
created() {
this.value = {
title: "12",
content: "12"
}
},
}
</script>
<style scoped lang="scss">
.Introduction{
.Introduction {
width: 100%;
}
.tab {
margin-left: 1.9rem;
margin-top: 1.5rem;
font-weight: 400;
font-size: 1.4rem !important;
}
.context {
margin: 3rem 4rem;
@@ -54,7 +69,8 @@ export default {
margin-top: 2rem;
font-size: 1.2rem;
font-weight: 400;
color: #3C3C3C;word-break: break-word; /* 文本行的任意字内断开 */
color: #3C3C3C;
word-break: break-word; /* 文本行的任意字内断开 */
word-wrap: break-word; /* IE */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap; /* HP printers */
@@ -63,7 +79,7 @@ export default {
white-space: pre; /* CSS2 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
pre{
pre {
width: 100%;
}
}

View File

@@ -3,29 +3,27 @@
<el-row v-for="(dire,index) in value" :key="index">
<!--正文内容-->
<el-col class="context">
<el-col class="context" :span="23">
<el-row class="context_el-row">
<el-col :span="2" :offset="1">
<el-col :span="1" :offset="1">
<img class="context_img" src="@/assets/teaching_staff/eji_icon_ys.png" alt="">
</el-col>
<el-col :span="3" class="context_name">{{ dire.name }}</el-col>
<el-col :span="4" class="context_name">{{ dire.name }}</el-col>
<el-col :span="16">
<hr class="context_hr">
</el-col>
<el-row v-for="(chile,index) in dire.children" :key="index">
<el-col class="name" :offset="1" :span="23">
{{ chile.name }}<span v-if="chile.children.length>1">({{chile.children.length}})</span>
</el-row>
<el-row v-for="(chile,index) in dire.children" :key="index">
<el-col class="name" :offset="1" :span="23">
{{ chile.name }}<span v-if="chile.children.length>1">({{chile.children.length}})</span>
</el-col>
<el-col class="text" :offset="1" :span="23">
<div v-for="(item,index) in chile.children" :key="index">
<a :href="item.link">
{{ item.name }}
</a>
</div>
</el-col>
<el-row>
<el-col class="text" :offset="1" :span="23">
<div v-for="(item,index) in chile.children" :key="index">
<a style="text-decoration: none" :href="item.link">
{{ item.name }}
</a>
</div>
</el-col>
</el-row>
</el-row>
</el-row>
</el-col>
</el-row>
@@ -68,7 +66,7 @@ export default {
margin: 3rem 2rem;
padding-bottom: 3rem;
//width: 84.3rem;
background: #FFFFFF;
//background: #FFFFFF;
.context_el-row {
margin-top: 2rem;
@@ -89,6 +87,7 @@ export default {
line-height: 2.2rem;
margin-top: 1.1rem;
border: #1956BC solid 0.1rem;
background-color: #1956BC;
}
}
@@ -96,16 +95,25 @@ export default {
margin-top: 2rem;
font-size: 1.6rem;
font-weight: 600;
color: #1956BC;
//color: #1956BC;
}
.text {
font-size: 1.4rem;
color: #3C3C3C;
//color: #3C3C3C;
clear: left;
div {
float: left;
margin-top: .4rem;
width: 7.4%;
//width: 7.4%;
margin-left: 1rem;
margin-right: 1rem;
a{
color: #000000;
text-decoration: none
}
a:hover{
color: #1956BC;
}
}
}
}

View File

@@ -21,8 +21,8 @@
</div>
<div>
<!--正文内容-->
<div class="context">
<div v-for="(item,index) in value.data" class="tw">
<div class="context" v-if="listData">
<div v-for="(item,index) in listData.data" class="tw">
<el-row>
<el-col :xs="6" :sm="6" :md="5" :lg="4" :xl="4">
<div class="tw_time">
@@ -48,21 +48,21 @@
</div>
</el-col>
</el-row>
<hr v-if="index != value.data.length-1" style="border: 0.1rem solid #E6E6E6;" class="hr">
<hr v-if="index != listData.data.length-1" style="border: 0.1rem solid #E6E6E6;" class="hr">
</div>
</div>
<el-row>
<el-col class="pagination_p">
<el-pagination class="pagination"
<el-pagination class="pagination" v-if="listData"
:small="small"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="value.pageNum"
:current-page.sync="listData.pageNum"
:page-sizes="[5,10,20, 30, 50, 100]"
:page-size="4"
layout="prev, pager, next,sizes, jumper"
:total="value.total">
:total="listData.total">
</el-pagination>
</el-col>
</el-row>
@@ -76,7 +76,7 @@ import {getNode} from "@/api";
export default {
name: "list",
props: {
value: {
list: {
type: Object,
default() {
return {
@@ -89,11 +89,17 @@ export default {
},
data() {
return {
listData : this.list,
width: document.documentElement.clientWidth,
small: document.documentElement.clientWidth <= 992,
query: '',
}
},
watch:{
list(val){
this.listData = val
}
},
methods: {
getContext(context) {
let type = this.$route.query && this.$route.query.type
@@ -101,50 +107,50 @@ export default {
if (type != null) {
router = "?id=" + context.id + '&type=' + type + "&lang=" + sessionStorage.getItem("lang")
} else {
router = "/" + this.value.navId + "?id=" + context.id + "&lang=" + sessionStorage.getItem("lang")
router = "/" + this.listData.navId + "?id=" + context.id + "&lang=" + sessionStorage.getItem("lang")
}
let routeData = null;
if (this.width <= 992) {
routeData = this.$router.resolve({path: "/mobile/" + this.value.secondId + router});
routeData = this.$router.resolve({path: "/mobile/" + this.listData.secondId + router});
} else {
routeData = this.$router.resolve({path: "/pc/" + this.value.secondId + router});
routeData = this.$router.resolve({path: "/pc/" + this.listData.secondId + router});
}
window.open(routeData.href,"_blank")
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
if (val === -1) {
this.value.pageSize = 1
this.listData.pageSize = 1
} else {
this.value.pageSize = val
this.listData.pageSize = val
}
this.getData()
},
handleCurrentChange(val) {
if (val === -1) {
this.value.pageNum = 1
this.listData.pageNum = 1
} else {
this.value.pageNum = val
this.listData.pageNum = val
}
this.getData()
},
getData() {
let data = {
title: this.query,
id: this.value.navId,
pageNum: this.value.pageNum,
pageSize: this.value.pageSize
id: this.listData.navId,
pageNum: this.listData.pageNum,
pageSize: this.listData.pageSize
}
this.type = this.$route.query && this.$route.query.type
if (this.type != null && this.type !== 0) {
data.id = this.value.secondId
data.id = this.listData.secondId
} else {
console.log(this.value);
console.log(this.listData);
}
console.log(data);
// console.log(data);
getNode(data).then(res => {
this.value.data = res.rows
this.value.total = res.total
this.listData.data = res.rows
this.listData.total = res.total
})
},
getDay(time) {