Commit 002b07b3 by 胡悦

修改一客一群

1 parent 8a43c44e
......@@ -174,22 +174,18 @@ export default {
membersVisible: false,
key: new Date(),
previewFlag: false,
selectData: []
selectData: [],
editStatus: false
}
},
watch: {
basicForm: {
handler(val) {
this.editStatus = true
},
deep: true
}
},
// watch: {
// $route(val) {
// console.log(val)
// if (val.params) {
// const id = val.params.id
// if (id && id != -1) {
// this.getDetail(id)
// } else {
// this.selectData = []
// }
// }
// }
// },
mounted() {
if (this.$route.params) {
const id = this.$route.params.id
......@@ -275,7 +271,20 @@ export default {
},
handleCancel() {
// this.$router.go(-1)
this.$router.push({ path: '/guestGroup/index' })
// this.$router.push({ path: '/guestGroup/index' })
if (this.editStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$router.push('/guestGroup/index')
})
.catch(() => {})
} else {
this.$router.push('/guestGroup/index')
}
},
remove(val, idx) {
console.log(val, idx)
......
......@@ -87,7 +87,7 @@ export default {
this.$apis.groupGuest.listDepartmentTree(params).then(res => {
this.listTree = res
this.loading = false
// this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
......@@ -108,7 +108,7 @@ export default {
handleNodeClick(data) {
this.departmentId = data.id
this.tableEmpData = data.entmicroStaffResponses
this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses)
// this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses)
// this.listEntmicroStaff()
},
getEmployee(d, arr = []) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!