修改拖拽不更新bug

dev_2022-05-11
e 3 years ago
parent 1357210919
commit ce7ee5a327
  1. 40
      src/pages/project/add/index.vue
  2. 2
      src/pages/project/list/index.vue

@ -1,5 +1,5 @@
<template> <template>
<div> <div ref="main" class="main">
<el-form :disabled="isDetail"> <el-form :disabled="isDetail">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between"> <div class="flex-between">
@ -92,6 +92,7 @@
header-align="center" header-align="center"
@selection-change="handleSelectionProjectJudgment" @selection-change="handleSelectionProjectJudgment"
row-key="judgmentId" row-key="judgmentId"
v-loading="listLoading"
> >
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column prop="sort" label="序号" width="80" align="center"> <el-table-column prop="sort" label="序号" width="80" align="center">
@ -226,6 +227,7 @@ export default {
searchTimer: null, searchTimer: null,
isToPoint: false, // isToPoint: false, //
visibleLoading:false,// visibleLoading:false,//
listLoading:false,//
}; };
}, },
computed: { computed: {
@ -245,17 +247,16 @@ export default {
// util.warningMsg(res.message); // util.warningMsg(res.message);
util.errorMsg("分配的数值已超过100"); util.errorMsg("分配的数值已超过100");
} }
console.log('chuli')
return score; return score;
} }
}, },
watch: { watch: {
projectJudgmentData: { // projectJudgmentData: {
handler(newValue) { // handler(newValue) {
console.log("newValue:", newValue); // console.log("newValue", newValue);
}, // },
deep: true // deep: true
}, // },
judgementpointsquery(n) { judgementpointsquery(n) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
@ -264,7 +265,7 @@ export default {
} }
}, },
created() { created() {
console.log(this.projectManage.systemId, "this.projectManage.systemId", this.lastSystemId); // console.log(this.projectManage.systemId, "this.projectManage.systemId", this.lastSystemId);
}, },
mounted() { mounted() {
if (this.$route.query.projectId) { if (this.$route.query.projectId) {
@ -666,8 +667,10 @@ export default {
_this.$set(e,'name',e.name+"?") _this.$set(e,'name',e.name+"?")
_this.$set(e,'name',e.name.slice(0,e.name.length-1)) // _this.$set(e,'name',e.name.slice(0,e.name.length-1)) //
}) })
// console.log('',_this.projectJudgmentData)
// //
if(_this.projectId){// if(_this.projectId){//
console.log('调接口')
_this.updateProjectJudgment() _this.updateProjectJudgment()
} }
} }
@ -735,12 +738,21 @@ export default {
}, },
// , // ,
listAgain(){ 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 => { this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
let { projectManage, projectJudgmentVos } = res; let { projectManage, projectJudgmentVos } = res;
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.projectJudgmentData = projectJudgmentVos;
this.projectJudgmentData.map((e,i)=>{ this.listLoading = false
e.sort = i+1 }).catch(()=>{
}) this.listLoading = false
}) })
}, },
@ -756,4 +768,8 @@ export default {
padding: 0; padding: 0;
border-bottom: 0; border-bottom: 0;
} }
.main{
overflow: auto;
height: calc(100vh - 152px );
}
</style> </style>

@ -232,7 +232,7 @@ export default {
mounted() { mounted() {
// systemIdsystemIdsystemId // systemIdsystemIdsystemId
this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId; this.systemId = this.lastSystemId ? this.lastSystemId : Setting.systemId;
console.log(this.systemId, "外面的sysid"); // console.log(this.systemId, "sysid");
this.getData(); this.getData();
}, },
methods: { methods: {

Loading…
Cancel
Save