From ec5f61e7539817434807cea5bb2171ef255c7c61 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 21 Oct 2021 18:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E4=B8=8A10.13=E5=8F=B7=E5=87=AF?= =?UTF-8?q?=E5=93=A5=E4=BF=AE=E5=A4=8D=E6=8B=96=E6=8B=BDbug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/project/add/index.vue | 35 +++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/src/pages/project/add/index.vue b/src/pages/project/add/index.vue index 2c171e6..c7496a4 100644 --- a/src/pages/project/add/index.vue +++ b/src/pages/project/add/index.vue @@ -92,6 +92,7 @@ header-align="center" @selection-change="handleSelectionProjectJudgment" row-key="judgmentId" + v-loading="listLoading" > @@ -224,7 +225,8 @@ export default { searchTimer: null, isToPoint: false, // 判断是否是跳转到判分点系统 - visibleLoading: false// 加载弹框 + visibleLoading: false, // 加载弹框 + listLoading:false,// 列表加载 }; }, computed: { @@ -249,12 +251,12 @@ export default { } }, watch: { - projectJudgmentData: { - handler(newValue) { - console.log("newValue:", newValue); - }, - deep: true - }, + // projectJudgmentData: { + // handler(newValue) { + // console.log("newValue:", newValue); + // }, + // deep: true + // }, judgementpointsquery(n) { clearTimeout(this.searchTimer); this.searchTimer = setTimeout(() => { @@ -735,16 +737,23 @@ export default { }, // 重新调接口,专门赋值列表 listAgain() { + this.listLoading = true + let scrollTop = this.$refs.main.scrollTop + this.projectJudgmentData = [] + this.$refs.main.scrollTop = scrollTop this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { let { projectManage, projectJudgmentVos } = res; - this.projectJudgmentData = projectJudgmentVos; - this.projectJudgmentData.map((e, i) => { - e.sort = i + 1; + projectJudgmentVos.map((e,i)=>{ + this.$set(e,'sort',i+1)// 不更新 + this.$set(e,'name',e.name+"?") + this.$set(e,'name',e.name.slice(0,e.name.length-1)) // 不更新的解决方案 }); - }); + this.projectJudgmentData = projectJudgmentVos; + this.listLoading = false + }).catch(()=>{ + this.listLoading = false + }) } - - } };