diff --git a/src/views/task_template/edit.vue b/src/views/task_template/edit.vue index 4bba2cb..7a271d1 100644 --- a/src/views/task_template/edit.vue +++ b/src/views/task_template/edit.vue @@ -185,7 +185,7 @@ const formRef = shallowRef(); const popupRef = shallowRef>(); const mode = ref("add"); const datalist = ref([]); - +const route = useRoute(); // 弹窗标题 const popupTitle = computed(() => { return mode.value == "edit" ? "编辑任务模板" : "新增任务模板"; @@ -194,6 +194,7 @@ const popupTitle = computed(() => { // 表单数据 const formData = reactive({ id: "", + task_scheduling: 0, company_id: "", title: "", admin_id: "", @@ -212,7 +213,9 @@ const formData = reactive({ terminus: {}, //终点 }, }); - +if (route.query.id) { + formData.task_scheduling = route.query.id; +} //任务类型接口 dictDataLists({ type_id: 10 }).then((res) => { datalist.value = res.lists; @@ -282,7 +285,7 @@ const changeTaskType = async (e: any) => { // 当前点击的地图类型(起,转,终)点 const mapType = ref(""); -const changeMap = async (e: Number) => { +const changeMap = async (e: number) => { let map_title = ""; switch (e) { case 0: