| | |
| | | import { ElMessage } from 'element-plus' |
| | | |
| | | const getNowDate = () => { |
| | | const date = new Date() |
| | | const year = date.getFullYear() |
| | | const month = date.getMonth() + 1 |
| | | const day = date.getDate() |
| | | return year + '-' + month + '-' + day + ' ' + '00:00:00' |
| | | } |
| | | |
| | | export default { |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | |
| | | label: "开始时间", |
| | | prop: "startTime", |
| | | type: "date", |
| | | value: getNowDate(), |
| | | disabled: true, |
| | | format: "YYYY-MM-DD HH:mm:ss", |
| | | valueFormat: "YYYY-MM-DD HH:mm:ss", |
| | | width: 200, |
| | |
| | | label: '手机号码', |
| | | prop: 'phone', |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请填写手机号', |
| | | trigger: 'blur', |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | label: '电子邮箱', |
| | |
| | | }) |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | const {startTime, endTime} = row |
| | | const startDate = new Date(startTime).getTime() |
| | | const endDate = new Date(endTime).getTime() |
| | | if (startDate >= endDate) { |
| | | this.$message.warning('结束时间不可小于或等于开始时间') |
| | | loading() |
| | | return |
| | | } |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | |
| | | trigger: 'click', |
| | | }, |
| | | ], |
| | | dicUrl: '/blade-system/user/page?current=1&size=999999999', |
| | | dicUrl: '/blade-system/user/page?current=1&size=999999999&userType=2', |
| | | dicFormatter: (res) => { |
| | | this.selectList = res.data.records |
| | | return res.data.records |
| | |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query), |
| | | // Object.assign(params, this.query), |
| | | Object.assign(params, { |
| | | ...this.query, |
| | | userType: 2 |
| | | }), |
| | | this.treeDeptId |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query), |
| | | // Object.assign(params, this.query), |
| | | Object.assign(params, { |
| | | ...this.query, |
| | | userType: 2 |
| | | }), |
| | | this.treeDeptId |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | |
| | | const initData = () => { |
| | | const { findObject } = config |
| | | const column = findObject(option.column, 'userId'); |
| | | getList(1, 999999, {}).then(res => { |
| | | getList(1, 999999, { userType: 2 }).then(res => { |
| | | column.dicData = res.data.data.records |
| | | }) |
| | | } |
| | |
| | | } |
| | | }) |
| | | const depts_list = _.cloneDeep(deptList) |
| | | this.depts = [] |
| | | for (const dept of depts_list) { |
| | | const employeeRes = await getList(1, 99999, {}, dept.id) |
| | | const employeeRes = await getList(1, 99999, { userType: 2 }, dept.id) |
| | | const { records } = employeeRes.data.data |
| | | this.depts.push({ |
| | | deptId: dept.id, |