From 9f53be1dfd7f55ca43fa4e8229c371e8ed29a5ba Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Tue, 16 Jan 2024 09:21:12 +0800
Subject: [PATCH] 更新
---
src/option/assessmentTask/assessmentTask.js | 105 ++++++++++++++++++++++------------------------------
1 files changed, 45 insertions(+), 60 deletions(-)
diff --git a/src/option/assessmentTask/assessmentTask.js b/src/option/assessmentTask/assessmentTask.js
index de11350..1fc20dc 100644
--- a/src/option/assessmentTask/assessmentTask.js
+++ b/src/option/assessmentTask/assessmentTask.js
@@ -1,3 +1,13 @@
+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,
@@ -10,26 +20,15 @@
delBtn: false,
editBtn: false,
selection: true,
+ menuWidth: 250,
dialogClickModal: false,
column: [
- // {
- // label: "主键",
- // prop: "id",
- // type: "input",
- // hide: true,
- // },
- // {
- // label: "租户ID",
- // prop: "tenantId",
- // type: "input",
- // hide: true,
- // },
{
label: "考核编号",
prop: "assessmentNo",
type: "input",
search: true,
- width: 100,
+ minWidth: 100,
disabled: true,
rules: [
{
@@ -40,10 +39,11 @@
],
},
{
- // label: "考核目的",
label: "考核种类",
prop: "assessmentPurpose",
type: "select",
+ minWidth: 100,
+ overHidden: true,
dicData: [
{
label: '月度考核',
@@ -99,13 +99,26 @@
label: "开始时间",
prop: "startTime",
type: "date",
+ // disabled: true,
format: "YYYY-MM-DD HH:mm:ss",
valueFormat: "YYYY-MM-DD HH:mm:ss",
- width: 200,
+ minWidth: 200,
rules: [
{
required: true,
message: '请选择开始时间',
+ trigger: 'click',
+ },
+ {
+ validator: (rule, value, callback) => {
+ const nowDate = new Date().getTime() - (24*60*60*1000)
+ const selectDate = new Date(value).getTime()
+ if (selectDate < nowDate) {
+ callback(new Error('选择的时候不能小于当前时间'))
+ } else {
+ callback()
+ }
+ },
trigger: 'click',
},
],
@@ -116,11 +129,23 @@
type: "date",
format: "YYYY-MM-DD HH:mm:ss",
valueFormat: "YYYY-MM-DD HH:mm:ss",
- width: 200,
+ minWidth: 200,
rules: [
{
required: true,
message: '请选择结束时间',
+ trigger: 'click',
+ },
+ {
+ validator: (rule, value, callback) => {
+ const nowDate = new Date().getTime() - (24*60*60*1000)
+ const selectDate = new Date(value).getTime()
+ if (selectDate < nowDate) {
+ callback(new Error('选择的时候不能小于当前时间'))
+ } else {
+ callback()
+ }
+ },
trigger: 'click',
},
],
@@ -128,7 +153,9 @@
{
label: "备注",
prop: "remark",
- type: "textarea"
+ type: "textarea",
+ overHidden: true,
+ minWidth: 300
},
{
label: "任务状态",
@@ -137,48 +164,6 @@
display: false,
width: 100,
slot: true
- },
- // {
- // label: "创建人",
- // prop: "createUser",
- // type: "input",
- // hide: true,
- // },
- // {
- // label: "创建部门",
- // prop: "createDept",
- // type: "input",
- // hide: true,
- // },
- // {
- // label: "创建时间",
- // prop: "createTime",
- // type: "input",
- // hide: true,
- // },
- // {
- // label: "修改人",
- // prop: "updateUser",
- // type: "input",
- // hide: true,
- // },
- // {
- // label: "修改时间",
- // prop: "updateTime",
- // type: "input",
- // hide: true,
- // },
- // {
- // label: "状态",
- // prop: "status",
- // type: "input",
- // hide: true,
- // },
- // {
- // label: "是否已删除",
- // prop: "isDeleted",
- // type: "input",
- // hide: true,
- // },
+ }
]
}
--
Gitblit v1.9.3