--fix bug

This commit is contained in:
yuping
2023-02-13 10:21:38 +08:00
parent f896d6f3dd
commit 8c73cfd46e
3 changed files with 10 additions and 66 deletions

View File

@@ -14,24 +14,15 @@
<div class="tmplh_inp">
<div class="inpbox">
<div class="inpbox1">
<!--
<a-select
v-model:value="valueproj"
value-key="value"
:options="[
{ label: '请选择内容分类', value: '' },
...calssifyList,
]"
/>-->
<a-tree-select
<a-tree-select
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
v-model:value="valueproj"
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
:fieldNames="{
children: 'children',
label: 'dictName',
value: 'dictCode',
label: 'name',
value: 'code',
}"
placeholder="请选择内容分类"
allow-clear
@@ -128,7 +119,6 @@
<script>
import {reactive, toRefs, onMounted, computed} from "vue";
import { courseListView } from "../../api/indexAudit";
import * as api1 from "@/api/index1";
import {useStore} from "vuex";
import dayjs from "dayjs";
@@ -422,11 +412,11 @@ export default {
const store = useStore();
const sysTypeOptions = computed(() => store.state.sysType);
const sysTypeOptions = computed(() => store.state.content_type);
function findClassFullName(list,classify,name=''){
return list && list.length && list.map(e=>{
return classify == e.dictCode ? name?name+'-'+e.dictName:e.dictName : findClassFullName(e.children,classify,name?name+'-'+e.dictName:e.dictName)
return classify == e.code ? name?name+'-'+e.name:e.name : findClassFullName(e.children,classify,name?name+'-'+e.name:e.name)
}).filter(name=>name).join('')
}
@@ -503,22 +493,9 @@ export default {
state.currentPage = pagina;
getList();
};
const getDictList = (param) =>
api1
.getDict({
pageNo: 1,
pageSize: 20,
setCode: param,
})
.then((res) => res.data.data.rows);
onMounted(async () => {
getList();
//获取分类列表
state.calssifyList = (await getDictList("faceclassClass")).map((e) => ({
label: e.dictName,
value: e.dictCode,
}));
});
// 显示审核