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