-
+
@@ -48,6 +48,14 @@
@success="loadTask"
@close="showEdit = false"
/>
+
@@ -58,8 +66,11 @@ import { timeFormat } from "@/utils/util";
import feedback from "@/utils/feedback";
// import { getRoutePath } from "router";
import EditPopup from "./edit.vue";
+import EditTowPopup from "./editTow.vue";
import { reactive, watch } from "vue";
import { apiTaskList, apiTaskDetails } from "@/api/task";
+import { apiTaskSchedulingPlanAdd } from "@/api/task_scheduling_plan";
+
const dateValue = ref(new Date());
const detailsdata = reactive({
create_time: "",
@@ -92,16 +103,18 @@ const detailsdata = reactive({
watch(
() => dateValue,
async (newValue, oldValue) => {
- const id = taskList.value.find((item) =>item.start_time.split(" ")[0] == timeFormat(newValue.value.getTime()))?.id;
- if(id){
- const res = await apiTaskDetails({ id });
- Object.keys(detailsdata).forEach((key) => {
- res[key] ? (detailsdata[key] = res[key]) : null;
- });
- editRef.value?.open("add");
- initShowDate(timeFormat(newValue.value.getTime()));
+ const id = taskList.value.find(
+ (item) =>
+ item.start_time.split(" ")[0] == timeFormat(newValue.value.getTime())
+ )?.id;
+ if (id) {
+ const res = await apiTaskDetails({ id });
+ Object.keys(detailsdata).forEach((key) => {
+ res[key] ? (detailsdata[key] = res[key]) : null;
+ });
+ editRef.value?.open("add");
+ initShowDate(timeFormat(newValue.value.getTime()));
}
-
},
{ deep: true }
);
@@ -110,8 +123,10 @@ watch(
const loading = ref(true);
const editRef = shallowRef>();
+const editTowRef = shallowRef>();
// 是否显示编辑框
const showEdit = ref(false);
+const showEditTow = ref(false);
// 查询条件
const queryParams = reactive({
@@ -168,9 +183,9 @@ const dateNow = (day) => {
// 添加
const handleAdd = async () => {
- showEdit.value = true;
+ showEditTow.value = true;
await nextTick();
- editRef.value?.open("add");
+ editTowRef.value?.open("add");
};
// 编辑
diff --git a/src/views/task_scheduling/index.vue b/src/views/task_scheduling/index.vue
index bd881a7..83703ba 100644
--- a/src/views/task_scheduling/index.vue
+++ b/src/views/task_scheduling/index.vue
@@ -1,186 +1,248 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
- 重置
-
-
-
-
-
-
-
-
- 新增
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+ 新增
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+ {{ row.status == "1" ? "显示" : "隐藏" }}
+
+
+
+
+
+ 任务日程
+
+
+ 编辑
+
+
+ type="danger"
+ link
+ @click="handleDelete(row.id)"
+ >
删除
-
-
-
-
-
-
-
-
-
-
- {{row.status=="1"?"显示":"隐藏"}}
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+