From 255719bb2097acd8f8174ed09b58bf0054c3a655 Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Tue, 17 Oct 2023 19:11:49 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E4=B8=8D=E5=90=8C?=
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=AE=BE=E7=BD=AE=E7=9B=AE=E6=A0=87=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +-
src/views/task_template/edit_admin.vue | 44 ++++++++++++++++++++++----
2 files changed, 38 insertions(+), 8 deletions(-)
diff --git a/.env.development b/.env.development
index f9ad6c9..a4c3d9e 100644
--- a/.env.development
+++ b/.env.development
@@ -6,4 +6,4 @@ VITE_APP_BASE_URL = 'https://ceshi-worker-task.lihaink.cn'
# VITE_APP_BASE_URL = 'https://preview-worker-task.lihaink.cn'
-# VITE_APP_BASE_URL = 'https://worker-task.lihaink.cn'preview
\ No newline at end of file
+# VITE_APP_BASE_URL = 'https://worker-task.lihaink.cn'
\ No newline at end of file
diff --git a/src/views/task_template/edit_admin.vue b/src/views/task_template/edit_admin.vue
index 5b34c97..545b160 100644
--- a/src/views/task_template/edit_admin.vue
+++ b/src/views/task_template/edit_admin.vue
@@ -31,7 +31,6 @@
/>
-
+
+
+
+
{
+ let flag = false;
+ if (showTargetTypeList.includes(formData.type_value)) flag = true;
+ return flag;
+});
+
// 表单验证
const formRules = reactive({
title: [
@@ -336,8 +359,10 @@ const setFormData = async (data: Record) => {
formData[key] = data[key];
}
}
- if (formData.extend?.task_role)
+ if (formData.extend?.task_role) {
formData.extend.task_role = +formData.extend.task_role;
+ changeTaskRole(formData.extend.task_role);
+ }
};
const getDetail = async (row: Record) => {
@@ -377,6 +402,11 @@ const changeTaskRole = async (e: any) => {
}
apiTaskTypeList({ type_value: taskType.value }).then((res) => {
datalist.value = res.lists;
+ datalist.value.forEach((item: any) => {
+ if (item.id == formData.type) {
+ formData.type_value = item.value;
+ }
+ });
});
};
@@ -412,11 +442,11 @@ const handleSubmit = async () => {
const open = (type = "add") => {
mode.value = type;
popupRef.value?.open();
- if (type == "edit") {
- apiTaskTypeList({ type_value: taskType.value }).then((res) => {
- datalist.value = res.lists;
- });
- }
+ // if (type == "edit") {
+ // apiTaskTypeList({ type_value: taskType.value }).then((res) => {
+ // datalist.value = res.lists;
+ // });
+ // }
};
// 关闭回调