--demand 字典修改

This commit is contained in:
yuping
2023-02-12 19:02:06 +08:00
parent fe4711ad68
commit 6d5ad2474b
10 changed files with 703 additions and 347 deletions

View File

@@ -52,17 +52,14 @@ function beforeunloadHandler() {
function init() {
getUserInfo();
initDict("faceclassPic");
initDict("faceclassClass");
initDict("faceclassScene");
initDict("projectLevel");
initDict("projectSys");
initDict("pathmapPic");
initDict("projectClass");
initDict("projectPic");
initDict("sysType");
getMemberInfo();
getUserPermission();
initDict("content_type"); //内容分类
initDict("project_level"); //项目级别
initDict("project_sys"); //培训分类
initDict("project_pic"); //项目封面
initDict("router_pic"); //路径图封面
initDict("course_pic"); //课程封面
}
function unloadHandler() {
@@ -91,17 +88,8 @@ async function getUserInfo() {
store.commit("SET_USER", userInfo.data.data);
}
async function initDict(key, localStory = false) {
let list;
if (localStory) {
list = localStorage.getItem(key);
if (list) {
store.commit("SET_DICT", {key, data: JSON.parse(list)});
return;
}
}
list = await getDictList(key);
localStory && localStorage.setItem(key, JSON.stringify(list));
async function initDict(key) {
const list = await getDictList(key);
store.commit("SET_DICT", {key, data: list});
}
@@ -111,7 +99,7 @@ function getUserPermission(){
})
}
const getDictList = (param) => api1.getDictTree({setCode: param,}).then((res) => res.data.data);
const getDictList = (param) => api1.getDictTree({code: param,}).then((res) => res.data.data);
</script>
<style lang="scss">
#app {

View File

@@ -108,7 +108,7 @@ export const billboard = (obj) => http.post("/admin/project/billboard", obj);
//公共信息---------------------------------------------------
// 获取字典信息
export const getDict = (obj) => http.post('/dict/getList', obj)
export const getDictTree = (params) => http.get('/dict/getTree', { params })
export const getDictTree = (params) => http.get('/dict', { params })
//获取组织树一级列表
export const getOrgTree = (obj) => http.post('/admin/router/orgList', obj)
//根据id获取组织树一级元素下所有子元素

View File

@@ -47,9 +47,9 @@ const id = computed(() => {
const emit = defineEmits({});
const options = computed(() =>
store.state.projectLevel.map((e) => ({
value: parseInt(e.dictCode),
label: e.dictName,
store.state.project_level.map((e) => ({
value: parseInt(e.value),
label: e.name,
}))
);

View File

@@ -47,12 +47,7 @@ const id = computed(() => {
const emit = defineEmits({});
const options = computed(() =>
store.state.projectSys.map((e) => ({
value: parseInt(e.dictCode),
label: e.dictName,
}))
);
const options = computed(() => store.state.project_sys.map((e) => ({value: parseInt(e.value), label: e.name,})));
function change(key) {
emit("update:value", key);

View File

@@ -0,0 +1,604 @@
<template>
<a-modal
:visible="visiable"
:centered="true"
:width="1000"
title="学员管理"
@cancel="closeDrawer"
>
<div class="header-content">
<div>
xxxxxxxx课程
</div>
<div>
内容分类:12312
</div>
<div>
授课教师:12312
</div>
<div>
状态审核:12312
</div>
</div>
<div class="TableStudent">
<a-row
type="flex"
gutter="12"
style="padding-left: 20px; margin-right: 0px"
>
<a-col>
<a-form-item title="学员名称:">
<a-input
class="cus-input"
v-model:value="searchParams.studentName"
placeholder="请输入学员名称"
/>
</a-form-item>
</a-col>
<a-col>
<a-button
class="cus-btn"
style="background: #4ea6ff; color: #fff; width: 100px"
@click="searchStu"
>
<template #icon>
<img
style="margin-right: 10px"
src="../../assets/images/courseManage/search0.png"
/></template>
搜索
</a-button>
</a-col>
<a-col :span="2">
<a-button class="cus-btn white" style="width: 100px" @click="reset">
<template #icon>
<img
style="margin-right: 10px"
src="../../assets/images/leveladd/reset.png"
/></template>
重置
</a-button>
</a-col>
</a-row>
<a-row
type="flex"
gutter="12"
style="padding-left: 20px; margin-right: 0px"
v-if="checkPer(permissions)"
>
<a-col :span="1.5">
<CommonStudent
:type="type"
:id="id"
@finash="submitCall"
:stage="stage"
>
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff">
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/courseManage/add0.png"
/></template>
添加学员
</a-button>
</CommonStudent>
</a-col>
<!-- 新加导入学员 批量换组 导出学习信息 -->
<a-col :span="1.5" v-if="type === 1 || type === 2">
<a-button class="cus-btn white" @click="showImpStu">
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/basicinfo/in2.png"
/></template>
导入学员
</a-button>
</a-col>
<!--
<a-col :span="1.5" v-if="type === 1">
<a-button class="cus-btn white"> 批量换组 </a-button>
</a-col>-->
<a-col :span="1.5" v-if="type === 1">
<a-button class="cus-btn white" @click="exportTaskStu">
导出学习信息
</a-button>
</a-col>
<a-col :span="1.5" v-if="type === 2">
<a-button class="cus-btn white" @click="exportTaskStuRouter">
导出学习信息
</a-button>
</a-col>
<a-col :span="1.5">
<a-button class="cus-btn white" @click="bathDel">
<template #icon
><img
style="margin-right: 10px"
src="../../assets/images/projectadd/delete.png"
/></template>
批量删除
</a-button>
</a-col>
<a-col :span="1.5" v-if="type === 2">
<a-button class="cus-btn white" @click="showChangeModal">
<template #icon></template>
批量调整关卡
</a-button>
</a-col>
<!-- 新加批量操作导出导出作业 -->
<a-col :span="1.5" v-if="type === 3" class="batchOpera">
<div class="stmm_btn btn4" @click="hideShow">
<div class="btn4_sub">
<span style="color: #4ea6ff; margin-right: 4px"> 批量操作 </span>
<div
class="b_zk"
:style="{ display: hideshow ? 'block' : 'none' }"
></div>
<div
class="b_sq"
:style="{ display: hideshow ? 'none' : 'block' }"
></div>
</div>
<div
class="btn4_sup"
:style="{ display: hideshow ? 'none' : 'block' }"
>
<div class="btnsbox">
<div class="btn4_tit" @click="showEScoreModal">
<span>批量录入成绩</span>
</div>
<div class="btn4_op1" @click="updateStatus(1)">
<span>批量结业</span>
</div>
<div class="btn4_op2" @click="updateStatus(0)">
<span>批量通过</span>
</div>
<div class="btn4_op3" @click="updateStatus(2)">
<span>批量拒绝</span>
</div>
</div>
</div>
</div>
<div class="stmm_btn btn5" @click="exportStu">
<div class="export"></div>
<div class="btnText">导出</div>
</div>
<div
class="stmm_btn btn5"
style="margin-left: 15px"
@click="exportHomeWorkShow"
>
<div class="btnText">导出作业</div>
</div>
</a-col>
</a-row>
<div style="margin-top: 20px">
<a-table
:columns="columns"
:data-source="studentList"
:pagination="stuPagination"
:loading="loading"
row-key="id"
:row-selection="stuRowSelection"
>
<template #action="{ record }">
<a-space :size="2">
<slot name="extension" v-bind:data="{ record }"></slot>
<a-button v-if="checkPer(permissions)" @click="del(record.id)" type="link" danger>删除</a-button>
</a-space>
</template>
</a-table>
</div>
</div>
</a-modal>
</template>
<script setup>
import {computed, createVNode, defineProps, defineExpose, ref, watch} from "vue";
import {usePage} from "@/api/request";
import {STUDENT_LIST} from "@/api/apis";
import {delStudentList} from "@/api/index1";
import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
import {Modal} from "ant-design-vue";
import CommonStudent from "@/components/student/CommonStudent";
import {checkPer} from "@/utils/utils";
const props = defineProps({
permissions: {
type: String,
default: ''
},
type: Number,
id: String,
stage: {
type: Array,
default: () => [],
},
types: {
type: Array,
default: () => [],
},
});
const visiable = ref(false);
const initParams = {
studentName: "",
pageNo: 1,
pageSize: 10,
type: props.type || '',
types: props.types,
pid: props.id || '',
}
const searchParams = ref(initParams)
const searchName = ref('')
const columns = ref([
{
title: "姓名",
dataIndex: "studentName",
key: "studentName",
width: 30,
align: "center",
ellipsis: true,
},
{
title: "工号",
dataIndex: "studentUserNo",
key: "studentUserNo",
width: 50,
align: "center",
ellipsis: true,
},
{
title: "部门",
dataIndex: "studentDepartName",
key: "studentDepartName",
width: 80,
align: "center",
ellipsis: true,
},
{
title: "操作",
dataIndex: "operation",
key: "operation",
width: 50,
align: "center",
slots: {customRender: "action"},
},
])
const {data: studentList, fetch: searchStu, total, loading} = usePage(STUDENT_LIST, searchParams)
const stuPagination = computed(() => ({
total: total.value,
showSizeChanger: false,
current: searchParams.value.pageNo,
pageSize: searchParams.value.pageSize,
onChange: changePagination
}));
const stuSelectKeys = ref([]);
const stuRowSelection = computed(() => ({
columnWidth: 20,
selectedRowKeys: stuSelectKeys.value,
onChange: onStuSelectChange,
preserveSelectedRowKeys: true,
}));
function onStuSelectChange(e) {
stuSelectKeys.value = e;
}
const openDrawer = () => {
visiable.value = true;
};
const changePagination = (page) => {
searchParams.value.pageNo = page;
};
function del(id) {
Modal.confirm({
title: () => '确定删除?',
icon: () => createVNode(ExclamationCircleOutlined),
content: () => '数据删除后不可恢复!',
okText: () => '确定',
okType: 'danger',
cancelText: () => '取消',
onOk() {
if (id) {
loading.value = true
delStudentList({ids: [id]}).then(() => searchStu())
}
},
});
}
const closeDrawer = () => {
visiable.value = false;
};
function reset() {
searchParams.value = initParams
searchName.value = ''
}
watch(visiable, () => {
visiable.value && searchStu()
searchParams.value = initParams
});
defineExpose({
searchStu,
loading,
closeDrawer,
openDrawer
})
</script>
<style lang="scss">
.header-content{
padding:20px;
border:1px solid #eef9f3;
margin-bottom: 20px;
div{
margin-top: 10px;
}
}
.cus-btn {
width: 100%;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16px;
border: 1px solid #4ea6ff;
border-radius: 8px;
background: #4ea6ff;
cursor: pointer;
color: #fff;
}
.white {
background: #fff;
color: #4ea6ff;
}
.cus-input {
height: 40px;
border-radius: 8px;
}
.cus-select {
height: 40px;
border-radius: 8px;
}
.CommonStudent {
.ant-btn-primary {
background-color: #4ea6ff !important;
}
.cus-select {
height: 40px;
border-radius: 8px;
}
.tableBox .ant-table-row .ant-table-cell {
height: 48px;
font-size: 14px;
font-weight: 400;
color: #4f5156;
line-height: 29px;
padding: 0px;
}
.tableBox .ant-table-thead tr th {
font-size: 14px;
}
.ant-tabs-tabpane {
height: 100%;
}
.ant-tabs {
overflow: visible;
}
.right1 {
border-left: 1px solid #f2f6fe;
margin-left: 20px;
.onerow {
display: flex;
justify-content: space-between;
align-items: center;
margin-right: 40px;
flex-wrap: wrap;
width: 100%;
.onleft {
display: flex;
text-align: center;
.already {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
margin-left: 32px;
white-space: nowrap;
// margin-bottom: 20px;
}
.count {
color: #4ea6ff;
font-size: 16px;
margin: 0 6px;
}
.peo {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
}
}
.clbox {
margin-right: 50px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
width: 104px;
height: 32px;
border-radius: 4px;
background: #4ea6ff;
.colose {
width: 16px;
height: 16px;
// border-radius: 8px;
// background: #ffffff;
// position: relative;
background-image: url(../../assets/images/basicinfo/ch.png);
background-size: 100%;
margin-right: 4px;
}
.allclear {
color: rgba(255, 255, 255, 1);
font-size: 14px;
}
}
}
.selecteds {
display: flex;
flex-wrap: wrap;
margin-left: 32px;
.person {
width: 100%;
margin-top: 20px;
border-top: 1px solid #f2f6fe;
}
.chose {
width: 64px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.ch {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
.ifsw {
display: flex;
align-items: end;
justify-content: center;
color: #4ea6ff;
}
.sw {
display: flex;
align-items: center;
justify-content: center;
text-align: justify;
color: #4ea6ff;
margin-top: 23px;
margin-left: 10px;
}
.dept {
width: 100%;
margin-top: 30px;
border-top: 1px solid #f2f6fe;
}
.chose1 {
//width: 90px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ch1 {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
.group {
width: 100%;
margin-top: 30px;
border-top: 1px solid #f2f6fe;
}
.chose2 {
//width: 120px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ch2 {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
}
}
}
</style>

View File

@@ -51,8 +51,8 @@
tree-default-expand-all
:fieldNames="{
children: 'children',
label: 'dictName',
value: 'dictCode',
label: 'name',
value: 'code',
}"
:tree-data="sysTypeOptions"
>
@@ -2712,7 +2712,7 @@ export default defineComponent({
state.viewpowervisible = true;
};
const sysTypeOptions = computed(() => store.state.sysType);
const sysTypeOptions = computed(() => store.state.content_type);
// console.log('12344', sysTypeOptions)
@@ -3211,63 +3211,6 @@ export default defineComponent({
//获取分类、场景、封面图、-----------字典配置-------------------------------
const optionsUrl = ref([]);
const getDictList = (param) => {
let obj = {
pageNo: 1,
pageSize: 10000,
setCode: param,
};
api1
.getDict(obj)
.then((res) => {
console.log("获取字典成功", res);
if (res.data.code === 200) {
if (param === "faceclassPic") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictValue,
label: item.dictName,
});
});
optionsUrl.value = newArr;
// if (res.data.data.rows.length > 0) {
// state.imageUrl = res.data.data.rows[0].dictValue;
// }
}
if (param === "faceclassClass") {
// let arr = res.data.data.rows;
// let newArr = [];
// arr.forEach((item) => {
// newArr.push({
// value: item.dictCode,
// label: item.dictName,
// });
// });
// console.log(newArr)
options2.value = state.options2222;
}
if (param === "faceclassScene") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
});
});
options3.value = newArr;
}
}
})
.catch((err) => {
console.log("获取字典失败", err);
});
};
getDictList("faceclassClass");
getDictList("faceclassScene");
getDictList("faceclassPic");
//获取分类、场景、封面图、----------------字典配置---------------------------
//渲染学员管理操作
@@ -3584,8 +3527,6 @@ export default defineComponent({
state.qdms_inputV1 = state.xzinputV1;
state.xzinputV1 = "";
console.log("qdms_inputV1", state.qdms_inputV1);
getDictList("faceclassPic");
getTea();
}
if (state.bs_hs && state.valueE1 == 1) {

View File

@@ -7,10 +7,10 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 课件管理页面 -->
<!-- sandbox="allow-forms allow-scripts allow-same-origin allow-popups" -->
<template>
<div class="courseManage">
<iframe
<!-- sandbox="allow-forms allow-scripts allow-same-origin allow-popups" -->
<template>
<div class="courseManage">
<iframe
id="iframe"
style="width: 100%; height: 100%"
:src="iframeUrl + '/course/manages'"
@@ -18,36 +18,62 @@
name="myframe"
security="restricted"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
></iframe>
></iframe>
<OnlineClassModelStudent ref="stuRef"></OnlineClassModelStudent>
<div @click="test">
asdfasdf
</div>
</template>
<script>
import { reactive, toRefs, onMounted } from "vue";
import { iframeUrl } from "../../api/method";
export default {
name: "OnlineManage",
setup() {
const state = reactive({
iframeUrl: iframeUrl,
});
onMounted(() => {
// console.log("执行");
});
return {
...toRefs(state),
};
},
};
</script>
<style lang="scss">
.courseManage {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
</div>
</template>
<script setup>
import {onMounted, ref} from "vue";
import {iframeUrl} from "@/api/method";
import OnlineClassModelStudent from "@/components/student/OnlineClassModelStudent";
const stuRef = ref()
onMounted(()=>{
window.openStudentModel = stuRef.value.openDrawer
})
function test(){
window.openStudentModel()
}
</script>
<style lang="scss">
.courseManage {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.btnn {
height: 72px;
width: 100%;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
border: 1px solid #4ea6ff;
border-radius: 8px;
color: #4ea6ff;
background-color: #fff;
cursor: pointer;
}
</style>
.btn2 {
cursor: pointer;
width: 100px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-left: 15px;
color: #fff;
}
}
</style>

View File

@@ -85,7 +85,7 @@
<div style="width:440px;height:70px;display: flex;justify-content: flex-start;align-items: center;">
<img v-for="(item, index) in optionsUrl" :key="index" class="choiceoptionurl"
:style="item.value == feng_mian_1 ? 'border:3px solid rgb(78, 166, 255);' : ''" :src="item.value"
:alt="item.label" @click="choicePic(item.value)" />
:alt="item.name" @click="choicePic(item.value)" />
</div>
<!-- <a-select
:getPopupContainer="
@@ -144,8 +144,8 @@
:tree-data="sysTypeOptions"
:fieldNames="{
children: 'children',
label: 'dictName',
value: 'dictCode',
label: 'name',
value: 'code',
}">
</a-tree-select>
</div>
@@ -321,7 +321,6 @@ import { validateName } from "@/api/index1";
import { message } from "ant-design-vue";
import { edit, detail, handle } from "@/api/indexCourse";
import { fileUp } from "../../api/indexEval";
import * as api1 from "../../api/index1";
import "@wangeditor/editor/dist/css/style.css";
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import NameInput from "@/components/project/NameInput";
@@ -370,140 +369,11 @@ export default defineComponent({
auditDescription: "",
contentClassify: [],
// 课程三级分类
options2222: [
{
title: '领导力',
value: '100',
children: [
{
title: '管理业务',
value: '1001',
},
{
title: '管理团队',
value: '1002',
},
{
title: '管理自我',
value: '1003',
},
],
},
{
title: '专业力',
value: '200',
children: [
{
title: '研发',
value: '2001',
},
{
title: '系统和解决方案',
value: '2002',
},
{
title: '生产技术与制造',
value: '2003',
},
{
title: '供应链',
value: '2004',
},
{
title: '营销',
value: '2005',
},
{
title: '品质',
value: '2006',
},
{
title: '专业职能',
value: '2007',
children: [
{
title: '战略与企划',
value: '200701',
},
{
title: '流程管理',
value: '200702',
},
{
title: '业绩管理',
value: '200703',
},
{
title: '项目管理',
value: '200704',
},
{
title: '信息技术',
value: '200705',
},
{
title: '环境与安全',
value: '200706',
},
{
title: '人力资源',
value: '200707',
},
{
title: '企业文化',
value: '200708',
},
{
title: '品牌',
value: '200709',
},
{
title: '财务',
value: '200710',
},
{
title: '法务',
value: '200711',
},
{
title: '风险控制',
value: '200712',
},
{
title: '行政',
value: '200713'
},
]
},
{
title: '医工',
value: '2008',
}
],
},
{
title: '通用力',
value: '300',
children: [
{
title: '职业操守与道德',
value: '3001',
},
{
title: '职业素养与技能',
value: '3002',
},
{
title: '规章制度',
value: '3003',
},
],
}
],
});
const store = useStore();
const sysTypeOptions = computed(() => store.state.sysType);
const sysTypeOptions = computed(() => store.state.content_type);
const optionsUrl = computed(() => store.state.course_pic);
watch(()=>state.fen_lei,()=>{
state.fen_lei1 = findClassFullName(sysTypeOptions.value)
@@ -511,7 +381,7 @@ export default defineComponent({
function findClassFullName(list,name=''){
return list && list.length && list.map(e=>{
return state.fen_lei == e.dictCode ? name?name+'-'+e.dictName:e.dictName : findClassFullName(e.children,name?name+'-'+e.dictName:e.dictName)
return state.fen_lei === e.code ? name?name+'-'+e.name:e.name : findClassFullName(e.children,name?name+'-'+e.name:e.name)
}).filter(name=>name).join('')
}
@@ -648,77 +518,10 @@ export default defineComponent({
}
//获取分类、场景、封面图、-----------字典配置-------------------------------
const optionsUrl = ref([]);
const options2 = ref([]);
const options3 = ref([]);
const options4 = ref([]);
const getDictList = (param) => {
let obj = {
pageNo: 1,
pageSize: 10000,
setCode: param,
};
api1
.getDict(obj)
.then((res) => {
console.log("获取字典成功", res);
if (res.data.code === 200) {
if (param === "faceclassPic") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictValue,
label: item.dictName,
});
});
optionsUrl.value = newArr;
}
if (param === "faceclassClass") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
});
});
options2.value = newArr;
}
if (param === "faceclassScene") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
});
});
options3.value = newArr;
}
if (param === "contentClassify") {
state.contentClassify = dealDickTree(res.data.data.rows) || []
}
}
})
.catch((err) => {
console.log("获取字典失败", err);
});
};
function dealDickTree(data, level = 1) {
return data?.filter(e => e.levelId == level).map(({ dictName, dictCode }) => ({
title: dictName,
value: dictCode,
key: dictCode,
children: dealDickTree(data, dictCode)
}))
}
getDictList("faceclassClass");
getDictList("faceclassScene");
getDictList("faceclassPic");
getDictList("contentClassify");
//获取分类、场景、封面图、----------------字典配置---------------------------
const hideShow = () => {
@@ -737,12 +540,11 @@ export default defineComponent({
}
}
return count ? false : true;
return !count;
};
//保存面授课
const handlePush = async (param) => {
let files = "";
if (state.imgList.length) {
state.imgList.forEach((item) => {

View File

@@ -229,10 +229,10 @@
class="learnBgItem"
:style="{
border:
pathBgId === item.dictCode
pathBgId === item.code
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #C7CBD2',
'background-image': 'url(' + item.dictValue + ')',
'background-image': 'url(' + item.value + ')',
display: index >= 5 ? 'none' : 'flex',
}"
style="background-size: 100% 100%"
@@ -358,10 +358,10 @@
class="learnBgItem"
:style="{
border:
pathBgId === item.dictCode
pathBgId === item.code
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
'background-image': 'url(' + item.dictValue + ')',
'background-image': 'url(' + item.value + ')',
display: index >= 5 ? 'none' : 'flex',
}"
style="background-size: 100% 100%"
@@ -685,14 +685,14 @@
<div
@click="chooseImg2(item)"
v-for="item in imgData"
:key="item.key"
:key="item.code"
class="learnBgItem"
:style="{
border:
pathBgId === item.id
pathBgId === item.code
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
'background-image': 'url(' + item.source + ')',
'background-image': 'url(' + item.value + ')',
}"
>
<!-- <img class="im" :src="item.source" /> -->
@@ -894,13 +894,13 @@ export default {
};
const chooseImg = (item) => {
console.log(item);
state.pathBgId = item.dictCode;
state.pathBg = item.dictValue;
state.pathBgId = item.code;
state.pathBg = item.value;
};
const chooseImg2 = (item) => {
// console.log(item);
state.pathBgId = item.dictCode;
state.pathBg = item.dictValue;
state.pathBgId = item.code;
state.pathBg = item.value;
};
//发布弹窗
const showPub = (router) => {
@@ -1502,7 +1502,7 @@ export default {
// state.imgData = ;
// }
});
const imgData = computed(() => store.state.pathmapPic);
const imgData = computed(() => store.state.router_pic);
//添加权限
watch(
() => state.addAuthList,

View File

@@ -362,9 +362,9 @@ export default {
state.projectInfo.picUrl = value;
};
onMounted(() => {
state.projectPic = store.state.projectPic.map((e) => ({
value: e.dictValue,
label: e.dictName,
state.projectPic = store.state.project_pic.map((e) => ({
value: e.value,
label: e.name,
}));
state.viewDetail = routers.query.viewDetail;
getProjectInfo();