|
@@ -859,18 +859,21 @@ export default {
|
|
|
item.id === e ? (eventID = item) : ''
|
|
|
})
|
|
|
this.dialogFormVisible = true
|
|
|
- var start1 = eventID.startTime.split(/\s+/)
|
|
|
- var start2 = eventID.endTime.split(/\s+/)
|
|
|
+ var start1 = eventID.startTime !== null ? eventID.startTime.split(/\s+/) : ''
|
|
|
+ var start2 = eventID.endTime !== null ? eventID.endTime.split(/\s+/) : ''
|
|
|
+
|
|
|
this.form = eventID
|
|
|
- this.$set(this.form, 'date_start', [start1[0] + 'T' + start1[1] + '.000Z', start2[0] + 'T' + start2[1] + '.000Z'])
|
|
|
+ if (eventID.startTime !== null) {
|
|
|
+ this.$set(this.form, 'date_start', [start1[0] + 'T' + start1[1] + '.000Z', start2[0] + 'T' + start2[1] + '.000Z'])
|
|
|
+ } else {
|
|
|
+ this.$set(this.form, 'date_start', '')
|
|
|
+ }
|
|
|
this.options = this.form.peopleObject
|
|
|
if (this.form.peopleObject !== null && this.form.peopleObject !== '') {
|
|
|
const peopleArr = this.form.peopleObject.map((eachPeople) => eachPeople.idap)
|
|
|
this.$set(this.form, 'peoples', peopleArr)
|
|
|
}
|
|
|
- this.form.noHoliday === 1
|
|
|
- ? (this.form.noHoliday = false)
|
|
|
- : (this.form.noHoliday = true)
|
|
|
+ this.form.noHoliday === 1 ? (this.form.noHoliday = false) : (this.form.noHoliday = true)
|
|
|
},
|
|
|
blur_describe(e) {
|
|
|
this.describe = false
|
|
@@ -884,7 +887,11 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.loading = false
|
|
|
memberQueryMemberInfoByIDAPorName({ memberIDAP: query }).then(res => {
|
|
|
- this.options = res.data
|
|
|
+ const obj = {}
|
|
|
+ this.options = res.data.reduce((cur, next) => {
|
|
|
+ obj[next.idap] ? '' : obj[next.idap] = true && cur.push(next)
|
|
|
+ return cur
|
|
|
+ }, [])
|
|
|
})
|
|
|
}, 200)
|
|
|
} else {
|
|
@@ -919,9 +926,7 @@ export default {
|
|
|
this.$refs['form'].validate(valid => {
|
|
|
if (valid) {
|
|
|
var schedule = e
|
|
|
- e.noHoliday === true
|
|
|
- ? (schedule.noHoliday = 0)
|
|
|
- : (schedule.noHoliday = 1)
|
|
|
+ e.noHoliday === true ? (schedule.noHoliday = 0) : (schedule.noHoliday = 1)
|
|
|
schedule.peopleObject = e.peoples
|
|
|
schedule.startTime = e.date_start[0]
|
|
|
schedule.endTime = e.date_start[1]
|
|
@@ -929,11 +934,7 @@ export default {
|
|
|
this.taskScheduleEvent.map(item => {
|
|
|
item.code === e.type ? (schedule.name = item.msg) : ''
|
|
|
})
|
|
|
- var user = {
|
|
|
- name: this.userNames,
|
|
|
- ename: this.userInformation,
|
|
|
- id: ''
|
|
|
- }
|
|
|
+ var user = { name: this.userNames, ename: this.userInformation, id: '' }
|
|
|
ScheduleUpdate({ schedule, user }).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.dialogFormVisible = false
|