| | |
| | | <el-form-item label="组织" prop="companyName"> |
| | | <el-input v-model="searchForm.companyName" placeholder="请输入组织名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="起始时间" prop="eventType"> |
| | | <el-form-item label="培训开始时间" prop="eventType"> |
| | | <el-date-picker |
| | | @change="seleTime" |
| | | v-model="time" |
| | |
| | | searchForm: { |
| | | keyWords: '', |
| | | companyName: '', |
| | | startTime: '', |
| | | endTime: '', |
| | | radio: 0 |
| | | startTimeStart: '', |
| | | startTimeEnd: '', |
| | | endTimeStart: '', |
| | | endTimeEnd: '', |
| | | radio: 0, |
| | | radio1: 0 |
| | | }, |
| | | time: [] |
| | | time: [], |
| | | time1: [] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | methods: { |
| | | changeRadio (e) { |
| | | if (e === '0') { |
| | | this.searchForm.startTime = timeForMat(0)[0] |
| | | this.searchForm.endTime = timeForMat(0)[1] |
| | | this.searchForm.startTimeStart = timeForMat(0)[0] |
| | | this.searchForm.startTimeEnd = timeForMat(0)[1] |
| | | this.time = timeForMat(0) |
| | | } else if (e === '1') { |
| | | this.searchForm.startTime = timeForMat(6)[0] |
| | | this.searchForm.endTime = timeForMat(6)[1] |
| | | this.searchForm.startTimeStart = timeForMat(6)[0] |
| | | this.searchForm.startTimeEnd = timeForMat(6)[1] |
| | | this.time = timeForMat(6) |
| | | } else if (e === '2') { |
| | | this.searchForm.startTime = timeForMat(29)[0] |
| | | this.searchForm.endTime = timeForMat(29)[1] |
| | | this.searchForm.startTimeStart = timeForMat(29)[0] |
| | | this.searchForm.startTimeEnd = timeForMat(29)[1] |
| | | this.time = timeForMat(29) |
| | | } |
| | | this.search() |
| | | }, |
| | | seleTime (e) { |
| | | this.searchForm.startTime = e[0] |
| | | this.searchForm.endTime = e[1] |
| | | this.searchForm.radio = null |
| | | if(e && e.length > 1) { |
| | | this.searchForm.startTimeStart = e[0] |
| | | this.searchForm.startTimeEnd = e[1] |
| | | this.searchForm.radio = null |
| | | this.search() |
| | | } |
| | | }, |
| | | changeRadio1 (e) { |
| | | if (e === '0') { |
| | | this.searchForm.endTimeStart = timeForMat(0)[0] |
| | | this.searchForm.endTimeEnd = timeForMat(0)[1] |
| | | this.time1 = timeForMat(0) |
| | | } else if (e === '1') { |
| | | this.searchForm.endTimeStart = timeForMat(6)[0] |
| | | this.searchForm.endTimeEnd = timeForMat(6)[1] |
| | | this.time1 = timeForMat(6) |
| | | } else if (e === '2') { |
| | | this.searchForm.endTimeStart = timeForMat(29)[0] |
| | | this.searchForm.endTimeEnd = timeForMat(29)[1] |
| | | this.time1 = timeForMat(29) |
| | | } |
| | | this.search() |
| | | }, |
| | | seleTime1 (e) { |
| | | if (e && e.length > 1 ) { |
| | | this.searchForm.endTimeStart = e[0] |
| | | this.searchForm.endTimeEnd = e[1] |
| | | this.searchForm.radio1 = null |
| | | this.search() |
| | | } |
| | | }, |
| | | reset () { |
| | | this.$refs.searchForm.resetFields() |
| | | this.time = [] |
| | | this.time1 = [] |
| | | this.searchForm.radio = '0' |
| | | this.searchForm.radio1 = '0' |
| | | this.changeRadio('0') |
| | | this.search() |
| | | } |