修改禅道bug

This commit is contained in:
qq787203167
2022-07-05 16:19:55 +08:00
parent 39da18419d
commit ba1a751ee4
2 changed files with 44 additions and 22 deletions
@@ -155,17 +155,17 @@
for (var i = 0; i < arr.length - 1; i++) { for (var i = 0; i < arr.length - 1; i++) {
for (var j = i + 1; j < arr.length; j++) { for (var j = i + 1; j < arr.length; j++) {
if (arr[i] === arr[j]) { if (arr[i] === arr[j]) {
arr.splice(j, 1); arr.splice(j, 1)
j--; j--
} }
} }
} }
return arr; return arr
} }
if (this.distributionEngineerList && this.distributionEngineerList.length > 0) { if (this.distributionEngineerList && this.distributionEngineerList.length > 0) {
this.distributionEngineerList.forEach(res => { this.distributionEngineerList.forEach(res => {
userIds.shift(res.userId) userIds.unshift(res.userId)
userName.shift(res.name) userName.unshift(res.name)
}) })
} }
userIds = noRepeat1(userIds) userIds = noRepeat1(userIds)
@@ -199,7 +199,7 @@
getUserAndDepart() { getUserAndDepart() {
getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => { getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => {
if (res) { if (res) {
this.gData = res.filter(ele => ele.flag === 'DEPART'); this.gData = res.filter(ele => ele.flag === 'DEPART')
} else { } else {
this.gData = [] this.gData = []
} }
@@ -691,15 +691,37 @@
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}, },
deleteText(num) { deleteText(num) {
this.distributionEngineerList.splice(num, 1) let _this = this
this.distributionEngineerList = [...this.distributionEngineerList] this.$confirm({
this.formInline.userName = this.formInline.userName.split(',') content: _this.$t('ConfirmDelete'),
this.formInline.userName.splice(num, 1) onOk() {
this.formInline.userName = this.formInline.userName.join(',') let id = ''
this.formInline.userId = this.formInline.userId.split(',') _this.dataSourceTable.forEach(res => {
this.formInline.userId.splice(num, 1) if (res.userName == _this.distributionEngineerList[num].name) {
this.formInline.userId = this.formInline.userId.join(',') id = res.id
this.formInline = { ...this.formInline } }
})
_this.distributionEngineerList.splice(num, 1)
_this.distributionEngineerList = [..._this.distributionEngineerList]
_this.formInline.userName = _this.formInline.userName.split(',')
_this.formInline.userName.splice(num, 1)
_this.formInline.userName = _this.formInline.userName.join(',')
_this.formInline.userId = _this.formInline.userId.split(',')
_this.formInline.userId.splice(num, 1)
_this.formInline.userId = _this.formInline.userId.join(',')
_this.formInline = { ..._this.formInline }
if (id){
deleteAction('/project/projectTaskInventoryDetailEO/delete', { id: id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
}
})
}, },
edit(val, title) { edit(val, title) {
this.title = title this.title = title