This commit is contained in:
weipengfei 2023-08-18 15:37:30 +08:00
commit bdce56e54a

View File

@ -185,7 +185,7 @@ const formRef = shallowRef<FormInstance>();
const popupRef = shallowRef<InstanceType<typeof Popup>>(); const popupRef = shallowRef<InstanceType<typeof Popup>>();
const mode = ref("add"); const mode = ref("add");
const datalist = ref([]); const datalist = ref([]);
const route = useRoute();
// //
const popupTitle = computed(() => { const popupTitle = computed(() => {
return mode.value == "edit" ? "编辑任务模板" : "新增任务模板"; return mode.value == "edit" ? "编辑任务模板" : "新增任务模板";
@ -194,6 +194,7 @@ const popupTitle = computed(() => {
// //
const formData = reactive({ const formData = reactive({
id: "", id: "",
task_scheduling: 0,
company_id: "", company_id: "",
title: "", title: "",
admin_id: "", admin_id: "",
@ -212,7 +213,9 @@ const formData = reactive({
terminus: {}, // terminus: {}, //
}, },
}); });
if (route.query.id) {
formData.task_scheduling = route.query.id;
}
// //
dictDataLists({ type_id: 10 }).then((res) => { dictDataLists({ type_id: 10 }).then((res) => {
datalist.value = res.lists; datalist.value = res.lists;
@ -282,7 +285,7 @@ const changeTaskType = async (e: any) => {
// (,,) // (,,)
const mapType = ref(""); const mapType = ref("");
const changeMap = async (e: Number) => { const changeMap = async (e: number) => {
let map_title = ""; let map_title = "";
switch (e) { switch (e) {
case 0: case 0: