| | |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm" v-if="operationType !== 'view'">确定</el-button> |
| | | <el-button @click="dialogVisible = false">取消</el-button> |
| | | <el-button type="primary" |
| | | @click="submitForm" |
| | | v-if="operationType !== 'view'"> |
| | | 确定 |
| | | </el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | { required: true, message: "请选择下班时间", trigger: "change" }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | // 如果是夜班,不限制时间顺序 |
| | | if (form.shift && ['夜班', '夜'].includes(form.shift)) { |
| | | callback(); |
| | | return; |
| | | } |
| | | if (form.startAt && value) { |
| | | const startParts = form.startAt.split(":"); |
| | | const endParts = value.split(":"); |