Compare commits
2 Commits
7cf08fcf14
...
de8c416266
| Author | SHA1 | Date |
|---|---|---|
|
|
de8c416266 | |
|
|
e5b5958b97 |
|
|
@ -53,7 +53,7 @@ const tableData: TableConfig = intTableData({
|
||||||
show: true,
|
show: true,
|
||||||
label: "删除",
|
label: "删除",
|
||||||
click: deleteInfo,
|
click: deleteInfo,
|
||||||
btnStyle: "danger", // topBtn: true才生效 success danger
|
btnStyle: "warning", // topBtn: true才生效 success danger
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
topBtn: false, // 头部按钮
|
topBtn: false, // 头部按钮
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ const tableData: TableConfig = intTableData({
|
||||||
show: true,
|
show: true,
|
||||||
label: "录入成绩",
|
label: "录入成绩",
|
||||||
click: entryExam,
|
click: entryExam,
|
||||||
btnStyle: "primary", // topBtn: true才生效 success danger
|
btnStyle: "warning", // topBtn: true才生效 success danger
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
topBtn: true, // 头部按钮
|
topBtn: true, // 头部按钮
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,9 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div>
|
<div>
|
||||||
提示:到期前<span class="text-yellow-500">{3天}</span>会黄色警告, 小于<span
|
提示:离赴校时间超过<span class="text-yellow-500">{ {{ warningDay }}天}</span
|
||||||
class="text-red-500"
|
>黄色警告, 超过预计完成时间<span class="text-red-500"
|
||||||
>{1天}</span
|
>{ {{ errorDay }}天}</span
|
||||||
>红色警告
|
>红色警告
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -184,6 +184,7 @@ import { ref, reactive, computed, defineProps, defineEmits, watch } from "vue";
|
||||||
import type { FormInstance, FormRules } from "element-plus";
|
import type { FormInstance, FormRules } from "element-plus";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { getSchoolData } from "@/api/userCenter";
|
import { getSchoolData } from "@/api/userCenter";
|
||||||
|
import { errorDay, warningDay } from "./config";
|
||||||
import { getSchoolBusinessPeopleListApi, addOrEditApi } from "@/api/toschoolinfomanage";
|
import { getSchoolBusinessPeopleListApi, addOrEditApi } from "@/api/toschoolinfomanage";
|
||||||
const props = defineProps<{ visible: boolean }>();
|
const props = defineProps<{ visible: boolean }>();
|
||||||
// const emit = defineEmits<{ (e: "update:visible", value: boolean): void }>();
|
// const emit = defineEmits<{ (e: "update:visible", value: boolean): void }>();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
/** 赴校后超时时间 */
|
||||||
|
export const warningDay = 8;
|
||||||
|
/** 赴校任务过期时间 */
|
||||||
|
export const errorDay = 2;
|
||||||
|
|
@ -198,6 +198,7 @@ import AddModal from "./addModal.vue";
|
||||||
import { Check, Search } from "@element-plus/icons-vue";
|
import { Check, Search } from "@element-plus/icons-vue";
|
||||||
import EditModal from "./editModal.vue";
|
import EditModal from "./editModal.vue";
|
||||||
import { message } from "@/utils/message";
|
import { message } from "@/utils/message";
|
||||||
|
import { errorDay, warningDay } from "./config";
|
||||||
interface TableItem {
|
interface TableItem {
|
||||||
id: number;
|
id: number;
|
||||||
school: string;
|
school: string;
|
||||||
|
|
@ -223,13 +224,12 @@ const tableRowClassName = ({ row, rowIndex }: { row: TableItem; rowIndex: number
|
||||||
const nD = new Date();
|
const nD = new Date();
|
||||||
const d = new Date(row.endTime + " ");
|
const d = new Date(row.endTime + " ");
|
||||||
const startTime = new Date(row.times + " ");
|
const startTime = new Date(row.times + " ");
|
||||||
const daysDiff1 = Math.floor(
|
const daysDiff1 = (nD.getTime() - startTime.getTime()) / (1000 * 60 * 60 * 24);
|
||||||
(nD.getTime() - startTime.getTime()) / (1000 * 60 * 60 * 24)
|
debugger;
|
||||||
);
|
const daysDiff = (d.getTime() - nD.getTime()) / (1000 * 60 * 60 * 24);
|
||||||
const daysDiff = Math.floor((d.getTime() - nD.getTime()) / (1000 * 60 * 60 * 24));
|
if (daysDiff <= -errorDay) {
|
||||||
if (daysDiff < -1) {
|
|
||||||
return "error-row";
|
return "error-row";
|
||||||
} else if (daysDiff1 > 7) {
|
} else if (daysDiff1 >= warningDay) {
|
||||||
return "warning-row";
|
return "warning-row";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue