From d729996c05e85a3989d6486a7a65fff13b9caf41 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 21 Oct 2021 18:53:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=AD=E5=88=A4?= =?UTF-8?q?=E5=88=86=E7=82=B9=E5=AF=B9=E8=AF=9D=E6=A1=86=EF=BC=8C=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9D=A1=E4=BB=B6=E6=B2=A1=E6=B8=85=E7=A9=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/serve/projectAdd.vue | 55 +++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/src/views/serve/projectAdd.vue b/src/views/serve/projectAdd.vue index 9fd280b..7eaf9c7 100644 --- a/src/views/serve/projectAdd.vue +++ b/src/views/serve/projectAdd.vue @@ -102,7 +102,7 @@ 判分点 + @click="handleAddJudgment" style="margin-bottom: 10px">判分点 批量删除 @@ -116,6 +116,7 @@ header-align="center" @selection-change="handleSelectionProjectJudgment" row-key="judgmentId" + v-loading="listLoading" > @@ -178,7 +179,7 @@ - +
@@ -210,8 +211,8 @@
@@ -260,7 +261,8 @@ export default { searchTimer: null, isToPoint: false, // 判断是否是跳转到判分点系统 - visibleLoading: false// 加载判分点数据 + visibleLoading: false, // 加载判分点数据 + listLoading:false,// 列表加载 }; }, computed: { @@ -286,12 +288,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(() => { @@ -300,7 +302,7 @@ export default { } }, created() { - console.log(this.projectManage.systemId, "this.projectManage.systemId", this.lastSystemId); + // console.log(this.projectManage.systemId, "this.projectManage.systemId", this.lastSystemId); }, mounted() { if (this.$route.query.projectId) { @@ -539,9 +541,12 @@ export default { this.$message.warning("请选择判分点"); } }, + handleAddJudgment() { // 处理添加判分点 + this.dialogVisible = true; + this.handleQueryJudgment(); + }, handleQueryJudgment() { // 查询判分点数据 let { systemId } = this.projectManage; - this.dialogVisible = true; this.$nextTick(() => { this.$refs.judgementTable.clearSelection(); }); @@ -600,8 +605,13 @@ export default { handleSelectionJudgment(val) { // 处理多选判分点 this.selectedJudgment = val; }, - addJudgment() { // 确认选择判分点 + closeJudgment() { // 关闭判分点对话框 + this.judgementpointsquery = ""; + this.dialogVisible = false; + }, + saveJudgment() { // 确认选择判分点 if (this.selectedJudgment.length) { + this.judgementpointsquery = ""; this.dialogVisible = false; if (this.projectId) { // 编辑的时候,新增调接口 this.addProjectJudgment(); @@ -710,13 +720,22 @@ 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 + }) }, handleCacheData() { // 处理缓存数据 this.isToPoint = true;