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
:fieldNames="{
children: 'children',
label: 'dictCode',
value: 'dictName',
title: 'dictName',
value: 'dictCode',
}"
:tree-data="sysTypeOptions"
>
@@ -2352,6 +2352,7 @@ import TableStudent from "@/components/student/TableStudent";
import FJUpload from "@/components/common/FJUpload";
import { updateStudent } from "@/api/indexProjStu";
import {useStore} from "vuex";
//列表表格
const columns1 = [
// {
@@ -3283,7 +3284,7 @@ export default defineComponent({
name: "",
createName: "",
auditStatus: null,
categoryId: '',
categoryId: undefined,
projectTime: "",
//列表
@@ -3542,7 +3543,30 @@ export default defineComponent({
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
// 编辑器实例,必须用 shallowRef
@@ -3711,6 +3735,7 @@ export default defineComponent({
// 渲染列表1操作
const getTableDate = async () => {
console.log('我是点击搜索的数据',state.categoryId)
// let datas = state.tableData1;
let startTime = "";
let endTime = "";

View File

@@ -28,7 +28,7 @@
return triggerNode.parentNode || document.body;
}
" 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 }">
<b v-if="val === '11111'" style="color: #08c">sss</b>
<template v-else>{{ title }}</template>
@@ -401,7 +401,28 @@ export default {
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=''){
return list && list.length && list.map(e=>{
@@ -515,6 +536,7 @@ export default {
changePagination,
showProjAuditModal,
closeProjAuditModal,
sysTypeOptions
};
},
};

View File

@@ -22,8 +22,19 @@
...calssifyList,
]"
/>-->
<a-tree-select :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="options2222">
<a-tree-select
: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>
</div>
<div class="inpbox1">
@@ -400,7 +411,29 @@ export default {
});
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=''){
return list && list.length && list.map(e=>{
@@ -655,7 +688,8 @@ export default {
contentList11,
sceneist11,
onEditorFocus,
sHX
sHX,
sysTypeOptions
};
},
};