优化
This commit is contained in:
parent
ee286d414b
commit
fefae8a61f
@ -373,6 +373,7 @@ export default {
|
||||
})
|
||||
})
|
||||
if (!isScore) {
|
||||
this.loadingTi = false
|
||||
return this.$message({
|
||||
message: '有未评分指标',
|
||||
type: 'info'
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<i @click.stop="handleDelete(i)"
|
||||
class="el-icon-close close"></i>
|
||||
</div>
|
||||
<div v-if="index+1!==list.length && list.length!==0"
|
||||
<div v-if="index+1!==handleGetList().length && handleGetList().length!==0"
|
||||
class="process-title-item-img">
|
||||
<img src="./imgs/right.png"
|
||||
alt="">
|
||||
@ -250,13 +250,14 @@ export default {
|
||||
} else {
|
||||
this.list = this.list.filter(i => i !== item)
|
||||
}
|
||||
if (this.handleGetList().length === 1) {
|
||||
const list = this.handleGetList()
|
||||
if (list.length === 1) {
|
||||
this.itemInfo = {}
|
||||
}
|
||||
if (!this.list.some(i => i.isCick && !i.isDelete)) {
|
||||
if (this.list[0]) {
|
||||
this.list[0].isCick = true
|
||||
this.itemInfo = this.list[0]
|
||||
if (list.every(i => !i.isCick)) {
|
||||
if (list[0]) {
|
||||
list[0].isCick = true
|
||||
this.itemInfo = list[0]
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<span>{{i.label}}</span>
|
||||
<i @click.stop="handleDelete(i)" class="el-icon-close close"></i>
|
||||
</div>
|
||||
<div v-if="index+1!==list.length && list.length!==0" class="process-title-item-img">
|
||||
<div v-if="index+1!==handleGetList().length && handleGetList().length!==0" class="process-title-item-img">
|
||||
<img src="./imgs/right.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
@ -230,13 +230,15 @@ export default {
|
||||
} else {
|
||||
this.list = this.list.filter(i => i !== item)
|
||||
}
|
||||
if (this.handleGetList().length === 1) {
|
||||
const list = this.handleGetList()
|
||||
|
||||
if (list.length === 1) {
|
||||
this.itemInfo = {}
|
||||
}
|
||||
if (!this.list.some(i => i.isCick && !i.isDelete)) {
|
||||
if (this.list[0]) {
|
||||
this.list[0].isCick = true
|
||||
this.itemInfo = this.list[0]
|
||||
if (list.every(i => !i.isCick)) {
|
||||
if (list[0]) {
|
||||
list[0].isCick = true
|
||||
this.itemInfo = list[0].id === 9999 ? {} : list[0]
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<span style="font-size:12px;">{{i.label || "---"}}</span>
|
||||
<i @click.stop="handleDelete(i)" class="el-icon-close close"></i>
|
||||
</div>
|
||||
<div v-if="index+1!==list.length && list.length!==0" class="process-title-item-img">
|
||||
<div v-if="index+1!==handleGetList(list).length && handleGetList(list).length!==0" class="process-title-item-img">
|
||||
<img src="./imgs/right.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
@ -228,22 +228,6 @@ export default {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
handleDelete (item) {
|
||||
// if (item.id) {
|
||||
// item.isDelete = 1
|
||||
// } else {
|
||||
// this.list = this.list.filter(i => i !== item)
|
||||
// }
|
||||
// if (this.handleGetList().length === 1) {
|
||||
// this.itemInfo = {}
|
||||
// }
|
||||
// if (!this.list.some(i => i.isCick && !i.isDelete)) {
|
||||
// if (this.list[0]) {
|
||||
// this.list[0].isCick = true
|
||||
// this.itemInfo = this.list[0]
|
||||
// }
|
||||
// }
|
||||
// console.log('this.list: ', this.list)
|
||||
// return
|
||||
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -254,13 +238,14 @@ export default {
|
||||
} else {
|
||||
this.list = this.list.filter(i => i !== item)
|
||||
}
|
||||
if (this.handleGetList().length === 1) {
|
||||
const list = this.handleGetList()
|
||||
if (list.length === 1) {
|
||||
this.itemInfo = {}
|
||||
}
|
||||
if (!this.list.some(i => i.isCick && !i.isDelete)) {
|
||||
if (this.list[0]) {
|
||||
this.list[0].isCick = true
|
||||
this.itemInfo = this.list[0]
|
||||
if (list.every(i => !i.isCick)) {
|
||||
if (list[0]) {
|
||||
list[0].isCick = true
|
||||
this.itemInfo = list[0].id === 9999 ? {} : list[0]
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
@ -258,6 +258,9 @@ export default {
|
||||
async handleGetByIdForBasis (id) {
|
||||
try {
|
||||
let res = await getByIdForBasis({id})
|
||||
if (res.code !== 200) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
res = res.data
|
||||
this.GroundList1 = res.managers ? res.managers.map(i => {
|
||||
i.staffId = i.id
|
||||
@ -299,6 +302,9 @@ export default {
|
||||
async handleGetGround () {
|
||||
try {
|
||||
let res = await getGround({groupId: 1})
|
||||
if (res.code !== 200) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
res = res.data
|
||||
res = res.map(i => {
|
||||
i.isDisable = i.isSelect
|
||||
@ -308,6 +314,7 @@ export default {
|
||||
this.GroundList1 = JSON.parse(JSON.stringify(res))
|
||||
} catch (error) {
|
||||
this.$message.error(error.msg)
|
||||
this.$loadingEnd()
|
||||
}
|
||||
},
|
||||
handleCancel () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user