提交 2aabc74e 编写于 作者: guangjun.yang's avatar guangjun.yang

解决定位问题

上级 54de5a55
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</table> </table>
<article class="page-content-list" style="margin-top: 55px;"> <article class="page-content-list" style="margin-top: 55px;">
<CommonImgTitle></CommonImgTitle> <CommonImgTitle></CommonImgTitle>
<div :id="'subject_0_' + index" class="subject" v-for="(item, index) in gjFirstSubjectModelList" :key="index"> <div :id="'subject_1_' + index" class="subject" v-for="(item, index) in gjFirstSubjectModelList" :key="index">
<p>{{item.name}}<span v-show="item.titleCode">{{item.titleCode}}</span></p> <p>{{item.name}}<span v-show="item.titleCode">{{item.titleCode}}</span></p>
<ul class="item-wrapper"> <ul class="item-wrapper">
<li @click="coopDetails(item, 1)" v-if="item.projectId && item.openFlag" class="item"> <li @click="coopDetails(item, 1)" v-if="item.projectId && item.openFlag" class="item">
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</article> </article>
<article ref="zjListRef" id="zjListRef" class="page-content-list"> <article ref="zjListRef" id="zjListRef" class="page-content-list">
<CommonImgTitle imgType=2 title="中级职称"></CommonImgTitle> <CommonImgTitle imgType=2 title="中级职称"></CommonImgTitle>
<div :id="'subject_1_' + index" class="subject" v-for="(item, index) in zjFirstSubjectModelList" :key="index"> <div :id="'subject_0_' + index" class="subject" v-for="(item, index) in zjFirstSubjectModelList" :key="index">
<p>{{item.name}}<span v-show="item.titleCode">{{item.titleCode}}</span></p> <p>{{item.name}}<span v-show="item.titleCode">{{item.titleCode}}</span></p>
<ul class="item-wrapper"> <ul class="item-wrapper">
<li @click="coopDetails(item, 1)" v-if="item.projectId && item.openFlag" class="item"> <li @click="coopDetails(item, 1)" v-if="item.projectId && item.openFlag" class="item">
...@@ -240,7 +240,7 @@ export default { ...@@ -240,7 +240,7 @@ export default {
getListData() { getListData() {
let _this = this; let _this = this;
let param = { let param = {
token: _this.token || '73534148526E4670A16A7CDBB6960DAA', token: _this.token || '531EB4560CBB4653B1F2C65B7F1816EF',
setEntry: true setEntry: true
}; };
this.showLoading = true; this.showLoading = true;
...@@ -253,6 +253,7 @@ export default { ...@@ -253,6 +253,7 @@ export default {
// 如果有绑定的卡,并且之前没有做定位,则进行定位 // 如果有绑定的卡,并且之前没有做定位,则进行定位
if (this.existBind && !this.hasResetPosition) { if (this.existBind && !this.hasResetPosition) {
debugger
this.hasResetPosition = true; this.hasResetPosition = true;
let titleTestModelList = res.data.titleTestModelList || []; let titleTestModelList = res.data.titleTestModelList || [];
titleTestModelList.splice(1, 1); titleTestModelList.splice(1, 1);
...@@ -332,8 +333,9 @@ export default { ...@@ -332,8 +333,9 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
setTimeout(() => { setTimeout(() => {
let scrollTop = document.getElementById( let scrollTop = document.getElementById(
`subject_${parentIndex}_${fIndex}` `subject_${parentIndex}_${subIndex}`
).offsetTop; ).offsetTop;
console.log('resetProjectPosition', scrollTop);
window.scrollTo(0, scrollTop - 120); window.scrollTo(0, scrollTop - 120);
}, 100); }, 100);
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册