feat : 对接师资力量
This commit is contained in:
parent
10fc55d9bb
commit
279cf9a890
@ -16,6 +16,14 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label-width="labelWidth" label="背景色" prop="company_profile_color">
|
||||
<el-color-picker v-model="formData.company_profile_color" :predefine="predefineColors" />
|
||||
{{ formData.company_profile_color }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label-width="labelWidth" label="简介内容" prop="company_profile_content">
|
||||
@ -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: '简介背景色不能为空'
|
||||
}
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
|
@ -16,6 +16,14 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label-width="labelWidth" label="背景色" prop="company_profile_color">
|
||||
<el-color-picker v-model="formData.company_profile_color" :predefine="predefineColors" />
|
||||
{{ formData.company_profile_color }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label-width="labelWidth" label="简介内容" prop="company_profile_content">
|
||||
@ -33,6 +41,15 @@ import { isEmptyObject } from "~/utils/index";
|
||||
|
||||
|
||||
// --业务参数
|
||||
const predefineColors = ref([
|
||||
'#ff4500',
|
||||
'#ff8c00',
|
||||
'#ffd700',
|
||||
'#90ee90',
|
||||
'#00ced1',
|
||||
'#1e90ff',
|
||||
'#c71585',
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
@ -16,6 +16,14 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label-width="labelWidth" label="背景色" prop="company_profile_color">
|
||||
<el-color-picker v-model="formData.company_profile_color" :predefine="predefineColors" />
|
||||
{{ formData.company_profile_color }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label-width="labelWidth" label="简介内容" prop="company_profile_content">
|
||||
@ -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: '简介背景色不能为空'
|
||||
}
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
|
@ -48,6 +48,11 @@
|
||||
:hide-on-click-modal="true" fit="contain" class="el-avatar"></el-image>
|
||||
<template v-else>暂无图片</template>
|
||||
</template>
|
||||
<!-- 背景色 -->
|
||||
<template #company_profile_color="scope">
|
||||
<el-color-picker v-model="scope.row.company_profile_color" :predefine="predefineColors" @change="hanleChangeColor(scope.row)" />
|
||||
{{ scope.row.company_profile_color }}
|
||||
</template>
|
||||
<!-- 简介内容 -->
|
||||
<template #company_profile_content="scope">
|
||||
<div style="height: 150px;" v-html="scope.row.company_profile_content"></div>
|
||||
@ -116,6 +121,16 @@ const headers = {
|
||||
...store.headers,
|
||||
};
|
||||
|
||||
const predefineColors = ref([
|
||||
'#ff4500',
|
||||
'#ff8c00',
|
||||
'#ffd700',
|
||||
'#90ee90',
|
||||
'#00ced1',
|
||||
'#1e90ff',
|
||||
'#c71585',
|
||||
])
|
||||
|
||||
// 查询参数
|
||||
const params = reactive({
|
||||
company_profile_content: '',
|
||||
@ -135,7 +150,12 @@ const column = [
|
||||
{
|
||||
prop: "company_profile_content",
|
||||
label: '简介内容',
|
||||
width: '550',
|
||||
width: '500',
|
||||
},
|
||||
{
|
||||
prop: "company_profile_color",
|
||||
label: '背景色',
|
||||
width: '150',
|
||||
},
|
||||
{
|
||||
prop: "company_profile_order",
|
||||
@ -224,6 +244,18 @@ async function handleEditOrder(data) {
|
||||
}
|
||||
}
|
||||
|
||||
// 背景色
|
||||
async function hanleChangeColor(data) {
|
||||
loading.value = true
|
||||
const { code, msg } = await editCompanyProfile(data);
|
||||
if (code == 0) {
|
||||
loading.value = false
|
||||
tableRef.value.reload()
|
||||
ElMessage.success(msg);
|
||||
} else {
|
||||
ElMessage.error(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<el-form-item :label-width="labelWidth" label="环境类型" prop="teaching_envir_type_guid">
|
||||
<el-cascader class="w100" filterable :options="dataList"
|
||||
:props="{ checkStrictly: false, value: 'teaching_envir_type_guid', label: 'teaching_envir_type_name', emitPath: false }"
|
||||
placeholder="请选择作品类型" clearable v-model="params.teaching_envir_type_guid">
|
||||
placeholder="请选择环境类型" clearable v-model="params.teaching_envir_type_guid">
|
||||
<template #default="{ node, data }">
|
||||
<span>{{ data.teaching_envir_type_name }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
@ -146,6 +146,11 @@ const column = [
|
||||
fixed: true,
|
||||
type: "selection",
|
||||
},
|
||||
{
|
||||
prop: "teaching_envir_type_name",
|
||||
label: "教学环境类型",
|
||||
width: "150",
|
||||
},
|
||||
{
|
||||
prop: "teaching_envir_img",
|
||||
label: "教学环境图片",
|
||||
@ -159,12 +164,8 @@ const column = [
|
||||
{
|
||||
prop: "teaching_envir_intro",
|
||||
label: "教学环境简介",
|
||||
width: "150",
|
||||
},
|
||||
{
|
||||
prop: "teaching_envir_type_name",
|
||||
label: "教学环境类型",
|
||||
width: "150",
|
||||
width: "300",
|
||||
showOverflowTooltip: true,
|
||||
},
|
||||
{
|
||||
label: "操作",
|
||||
|
Loading…
Reference in New Issue
Block a user