From 279cf9a890d809515ab64ca4ca6222be4162a269 Mon Sep 17 00:00:00 2001 From: lwh <2679599887@qq.com> Date: Sun, 30 Apr 2023 15:42:20 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E5=AF=B9=E6=8E=A5=E5=B8=88=E8=B5=84?= =?UTF-8?q?=E5=8A=9B=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/AddCompanyProfileDialog.vue | 24 ++++++++++++- .../components/DetailCompanyProfileDialog.vue | 17 ++++++++++ .../components/EditCompanyProfileDialog.vue | 25 +++++++++++++- .../index/about_us/company_profile/index.vue | 34 ++++++++++++++++++- .../teaching_envir_list/index.vue | 15 ++++---- 5 files changed, 105 insertions(+), 10 deletions(-) diff --git a/src/pages/index/about_us/company_profile/components/AddCompanyProfileDialog.vue b/src/pages/index/about_us/company_profile/components/AddCompanyProfileDialog.vue index c73e6cf..43a3a1b 100644 --- a/src/pages/index/about_us/company_profile/components/AddCompanyProfileDialog.vue +++ b/src/pages/index/about_us/company_profile/components/AddCompanyProfileDialog.vue @@ -16,6 +16,14 @@ + + + + +   {{ formData.company_profile_color }} + + + @@ -40,7 +48,15 @@ import { addCompanyProfile } from "~/service/company_profile"; import { useLoginStore } from "~/store"; // --业务参数 - +const predefineColors = ref([ + '#ff4500', + '#ff8c00', + '#ffd700', + '#90ee90', + '#00ced1', + '#1e90ff', + '#c71585', +]) // --业务方法 @@ -95,6 +111,12 @@ const rules = reactive({ message: '简介排序不能为空' } ], + company_profile_color: [ + { + required: true, + message: '简介背景色不能为空' + } + ], }); diff --git a/src/pages/index/about_us/company_profile/components/DetailCompanyProfileDialog.vue b/src/pages/index/about_us/company_profile/components/DetailCompanyProfileDialog.vue index db43239..d39c1f3 100644 --- a/src/pages/index/about_us/company_profile/components/DetailCompanyProfileDialog.vue +++ b/src/pages/index/about_us/company_profile/components/DetailCompanyProfileDialog.vue @@ -16,6 +16,14 @@ + + + + +   {{ formData.company_profile_color }} + + + @@ -33,6 +41,15 @@ import { isEmptyObject } from "~/utils/index"; // --业务参数 +const predefineColors = ref([ + '#ff4500', + '#ff8c00', + '#ffd700', + '#90ee90', + '#00ced1', + '#1e90ff', + '#c71585', +]) diff --git a/src/pages/index/about_us/company_profile/components/EditCompanyProfileDialog.vue b/src/pages/index/about_us/company_profile/components/EditCompanyProfileDialog.vue index 778af7d..e7d7f91 100644 --- a/src/pages/index/about_us/company_profile/components/EditCompanyProfileDialog.vue +++ b/src/pages/index/about_us/company_profile/components/EditCompanyProfileDialog.vue @@ -16,6 +16,14 @@ + + + + +   {{ formData.company_profile_color }} + + + @@ -39,6 +47,15 @@ import { editCompanyProfile } from "~/service/company_profile"; import { useLoginStore } from "~/store"; // --业务参数 +const predefineColors = ref([ + '#ff4500', + '#ff8c00', + '#ffd700', + '#90ee90', + '#00ced1', + '#1e90ff', + '#c71585', +]) @@ -106,6 +123,12 @@ const rules = reactive({ message: '简介排序不能为空' } ], + company_profile_color: [ + { + required: true, + message: '简介背景色不能为空' + } + ], }); @@ -118,7 +141,7 @@ const handleEditClick = async (formEl) => { return; } isBtnLod.value = true; - const { code ,msg} = await editCompanyProfile(formData.value); + const { code, msg } = await editCompanyProfile(formData.value); if (code == 0) { closeDialog(); props.done(); diff --git a/src/pages/index/about_us/company_profile/index.vue b/src/pages/index/about_us/company_profile/index.vue index fce1731..ab6f0a2 100644 --- a/src/pages/index/about_us/company_profile/index.vue +++ b/src/pages/index/about_us/company_profile/index.vue @@ -48,6 +48,11 @@ :hide-on-click-modal="true" fit="contain" class="el-avatar"> + +