| | |
| | | CapacityPlanningOnclickSelect, |
| | | CapacityPlanningSetupSearch |
| | | } from '@/api/scgl' |
| | | |
| | | var time = null |
| | | export default { |
| | | directives: { |
| | |
| | | type: Function, |
| | | default: null |
| | | } |
| | | |
| | | }, |
| | | |
| | | data() { |
| | |
| | | page: 1 |
| | | }, |
| | | projectDef: [] |
| | | |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | return `${year}-${month + 1}-${day}` |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | getDblTime() { |
| | | const { year, month, day } = funsdates.getYearMonthDay(this.dblDate) |
| | |
| | | focus() { |
| | | this.isVisible = true |
| | | |
| | | this.CapacityPlanningCalendar() |
| | | this.getCapacityPlanningCalendar() |
| | | this.getHeight() |
| | | this.CapacityPlanningSetupSearch() |
| | | this.CapacityPlanningSearch() |
| | |
| | | // 可以点击的日期 |
| | | if (!this.isPastDue(date)) { |
| | | if ((this.value.indexOf(this.handleDatetime(date)) < 0 && this.value !== '') || this.value === '') { // 数组添加 |
| | | if (typeof this.value === 'string') { |
| | | this.value = this.value.split(',') |
| | | } |
| | | this.value.push(this.handleDatetime(date)) // 新增到input里 |
| | | const data = { |
| | | name: this.handleDatetime(date), |
| | |
| | | this.defArr.push(data) // 新增到 默认数组里 |
| | | } else if (this.value.indexOf(this.handleDatetime(date)) >= 0) { // 数组减去 |
| | | const indexV = this.value.indexOf(this.handleDatetime(date)) |
| | | if (typeof this.value === 'string') { |
| | | this.value = this.value.split(',') |
| | | } |
| | | this.value.splice(indexV, 1) |
| | | for (const i in this.defArr) { |
| | | if (this.defArr[i].name === this.handleDatetime(date)) { |
| | |
| | | this.isDbl = true |
| | | this.changeTime = this.handleDatetime(date) |
| | | |
| | | this.CapacityPlanningOnclickSelect({ CaptPlanWorkShiftCode: this.rowData.CaptPlanWorkShiftCode, captplanid: this.rowData.CaptPlanId, datetime: this.handleDatetime(date) }) |
| | | this.CapacityPlanningOnclickSelect({ |
| | | CaptPlanWorkShiftCode: this.rowData.CaptPlanWorkShiftCode, |
| | | captplanid: this.rowData.CaptPlanId, |
| | | datetime: this.handleDatetime(date) |
| | | }) |
| | | this.getDblTime() |
| | | } |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | CapacityPlanningCalendar() { |
| | | // const temp = JSON.parse(this.rowData) |
| | | getCapacityPlanningCalendar() { |
| | | CapacityPlanningCalendar({ captplanid: this.rowData.CaptPlanId }).then((res) => { |
| | | for (const i in res.List) { |
| | | if (res.List[i].key === '') { |
| | | res.List[i].key = this.rowData.CaptPlanWorkShiftCode |
| | | } |
| | | } |
| | | this.defArr = res.List |
| | | this.defArr = res.data |
| | | }) |
| | | }, |
| | | closeCapacityPlanningCalendar() { |