fix:面授课、审核管理课程分类显示

This commit is contained in:
wyx
2023-01-15 17:38:12 +08:00
parent e648f4e414
commit 639195a3af
3 changed files with 91 additions and 10 deletions

View File

@@ -54,8 +54,8 @@
tree-default-expand-all tree-default-expand-all
:fieldNames="{ :fieldNames="{
children: 'children', children: 'children',
label: 'dictCode', title: 'dictName',
value: 'dictName', value: 'dictCode',
}" }"
:tree-data="sysTypeOptions" :tree-data="sysTypeOptions"
> >
@@ -2352,6 +2352,7 @@ import TableStudent from "@/components/student/TableStudent";
import FJUpload from "@/components/common/FJUpload"; import FJUpload from "@/components/common/FJUpload";
import { updateStudent } from "@/api/indexProjStu"; import { updateStudent } from "@/api/indexProjStu";
import {useStore} from "vuex"; import {useStore} from "vuex";
//列表表格 //列表表格
const columns1 = [ const columns1 = [
// { // {
@@ -3283,7 +3284,7 @@ export default defineComponent({
name: "", name: "",
createName: "", createName: "",
auditStatus: null, auditStatus: null,
categoryId: '', categoryId: undefined,
projectTime: "", projectTime: "",
//列表 //列表
@@ -3542,7 +3543,30 @@ export default defineComponent({
state.viewpowervisible = true; state.viewpowervisible = true;
}; };
const sysTypeOptions = computed(() => store.state.sysType); const sysTypeOptions = computed(() => formateDictT(store.state.sysType));
// console.log('12344', sysTypeOptions)
// 处理数据字典
function formateDictT(data) {
for(let i=0;i<data.length;i++){
data[i].title = data[i].dictName;
data[i].value = data[i].dictCode;
if(data[i].children.length!==0){
for(let j=0;j<data[i].children.length;j++){
data[i].children[j].title = data[i].children[j].dictName;
data[i].children[j].value = data[i].children[j].dictCode;
if(data[i].children[j].children.length!==0){
for(let k=0; k<data[i].children[j].children.length; k++) {
data[i].children[j].children[k].title = data[i].children[j].children[k].dictName;
data[i].children[j].children[k].value = data[i].children[j].children[k].dictCode;
}
}
}
}
}
return data;
}
// 富文本 sssssssssssssss // 富文本 sssssssssssssss
// 编辑器实例,必须用 shallowRef // 编辑器实例,必须用 shallowRef
@@ -3711,6 +3735,7 @@ export default defineComponent({
// 渲染列表1操作 // 渲染列表1操作
const getTableDate = async () => { const getTableDate = async () => {
console.log('我是点击搜索的数据',state.categoryId)
// let datas = state.tableData1; // let datas = state.tableData1;
let startTime = ""; let startTime = "";
let endTime = ""; let endTime = "";

View File

@@ -28,7 +28,7 @@
return triggerNode.parentNode || document.body; return triggerNode.parentNode || document.body;
} }
" v-model:value="valueproj" show-search :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" " v-model:value="valueproj" show-search :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择内容分类" allow-clear tree-default-expand-all :tree-data="options2222"> placeholder="请选择内容分类" allow-clear tree-default-expand-all :tree-data="sysTypeOptions">
<template #title="{ value: val, title }"> <template #title="{ value: val, title }">
<b v-if="val === '11111'" style="color: #08c">sss</b> <b v-if="val === '11111'" style="color: #08c">sss</b>
<template v-else>{{ title }}</template> <template v-else>{{ title }}</template>
@@ -401,7 +401,28 @@ export default {
const store = useStore(); const store = useStore();
const sysTypeOptions = computed(() => store.state.sysType); const sysTypeOptions = computed(() => formateDictT(store.state.sysType));
// 处理数据字典
function formateDictT(data) {
for(let i=0;i<data.length;i++){
data[i].title = data[i].dictName;
data[i].value = data[i].dictCode;
if(data[i].children.length!==0){
for(let j=0;j<data[i].children.length;j++){
data[i].children[j].title = data[i].children[j].dictName;
data[i].children[j].value = data[i].children[j].dictCode;
if(data[i].children[j].children.length!==0){
for(let k=0; k<data[i].children[j].children.length; k++) {
data[i].children[j].children[k].title = data[i].children[j].children[k].dictName;
data[i].children[j].children[k].value = data[i].children[j].children[k].dictCode;
}
}
}
}
}
return data;
}
function findClassFullName(list,classify,name=''){ function findClassFullName(list,classify,name=''){
return list && list.length && list.map(e=>{ return list && list.length && list.map(e=>{
@@ -515,6 +536,7 @@ export default {
changePagination, changePagination,
showProjAuditModal, showProjAuditModal,
closeProjAuditModal, closeProjAuditModal,
sysTypeOptions
}; };
}, },
}; };

View File

@@ -22,8 +22,19 @@
...calssifyList, ...calssifyList,
]" ]"
/>--> />-->
<a-tree-select :getPopupContainer="triggerNode => triggerNode.parentNode || document.body" v-model:value="valueproj" show-search :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" <a-tree-select
placeholder="请选择内容分类" tree-default-expand-all :tree-data="options2222"> :fieldNames="{
children: 'children',
title: 'dictName',
value: 'dictCode',
}"
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
v-model:value="valueproj"
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择内容分类"
tree-default-expand-all
:tree-data="sysTypeOptions">
</a-tree-select> </a-tree-select>
</div> </div>
<div class="inpbox1"> <div class="inpbox1">
@@ -400,7 +411,29 @@ export default {
}); });
const store = useStore(); const store = useStore();
const sysTypeOptions = computed(() => store.state.sysType); const sysTypeOptions = computed(() => formateDictT(store.state.sysType));
// console.log('asdasd--------------------------------------', sysTypeOptions)
// 处理数据字典
function formateDictT(data) {
for(let i=0;i<data.length;i++){
data[i].title = data[i].dictName;
data[i].value = data[i].dictCode;
if(data[i].children.length!==0){
for(let j=0;j<data[i].children.length;j++){
data[i].children[j].title = data[i].children[j].dictName;
data[i].children[j].value = data[i].children[j].dictCode;
if(data[i].children[j].children.length!==0){
for(let k=0; k<data[i].children[j].children.length; k++) {
data[i].children[j].children[k].title = data[i].children[j].children[k].dictName;
data[i].children[j].children[k].value = data[i].children[j].children[k].dictCode;
}
}
}
}
}
return data;
}
function findClassFullName(list,classify,name=''){ function findClassFullName(list,classify,name=''){
return list && list.length && list.map(e=>{ return list && list.length && list.map(e=>{
@@ -655,7 +688,8 @@ export default {
contentList11, contentList11,
sceneist11, sceneist11,
onEditorFocus, onEditorFocus,
sHX sHX,
sysTypeOptions
}; };
}, },
}; };