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

View File

@@ -14,19 +14,11 @@
<div class="tmplh_inp"> <div class="tmplh_inp">
<div class="inpbox"> <div class="inpbox">
<div class="inpbox1"> <div class="inpbox1">
<!--
<a-select
v-model:value="valueproj"
:options="[
{ label: '请选择内容分类', value: '' },
...calssifyList,
]"
/>-->
<a-tree-select <a-tree-select
:fieldNames="{ :fieldNames="{
children: 'children', children: 'children',
label: 'dictName', label: 'name',
value: 'dictCode', value: 'code',
}" }"
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body" :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
v-model:value="valueproj" v-model:value="valueproj"
@@ -148,7 +140,6 @@ import { list, courseAuditView, courseDetail } from "../../api/indexAudit";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import SeeModal from "../courselibrary/components/seeModal.vue"; import SeeModal from "../courselibrary/components/seeModal.vue";
import { iframeUrl } from "../../api/method"; import { iframeUrl } from "../../api/method";
import * as api1 from "@/api/index1";
import {useStore} from "vuex"; import {useStore} from "vuex";
import dayjs from "dayjs"; import dayjs from "dayjs";
@@ -423,11 +414,11 @@ export default {
}); });
const store = useStore(); const store = useStore();
const sysTypeOptions = computed(() => store.state.sysType); const sysTypeOptions = computed(() => store.state.content_type);
function findClassFullName(list,classify,name=''){ function findClassFullName(list,classify,name=''){
return list && list.length && list.map(e=>{ 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('') }).filter(name=>name).join('')
} }
@@ -435,20 +426,6 @@ export default {
const sHX = (classify) => { const sHX = (classify) => {
return findClassFullName(sysTypeOptions.value,classify) || '-' return findClassFullName(sysTypeOptions.value,classify) || '-'
} }
/*
* 获取字典列表
* param faceclassPic | faceclassClass | faceclassScene
* */
const getDictList = (param) =>
api1
.getDict({
pageNo: 1,
pageSize: 20,
setCode: param,
})
.then((res) => res.data.data.rows);
const getFaceList = () => { const getFaceList = () => {
state.loading = true state.loading = true
let objn = { let objn = {
@@ -462,10 +439,6 @@ export default {
projectName: "", projectName: "",
}; };
console.log(objn);
// 测试数据先放下
// setFaceData([{ name: "面授课审核", category_id: "8", scene_id: "8" }]);
list(objn) list(objn)
.then((res) => { .then((res) => {
console.log("获取面授列表成功", res); console.log("获取面授列表成功", res);
@@ -658,11 +631,6 @@ export default {
}; };
onMounted(async () => { onMounted(async () => {
getFaceList(); getFaceList();
//获取分类列表
state.calssifyList = (await getDictList("faceclassClass")).map((e) => ({
label: e.dictName,
value: e.dictCode,
}));
}); });
// 禁止用户编辑文本框内容 // 禁止用户编辑文本框内容

View File

@@ -717,7 +717,6 @@ import ProjCheckShip from "../../components/drawers/ProjCheckPower";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import * as apiStu from "../../api/index"; import * as apiStu from "../../api/index";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { storage } from "@/api/storage";
import { useStore } from "vuex"; import { useStore } from "vuex";
import OrgClass from "@/components/project/OrgClass"; import OrgClass from "@/components/project/OrgClass";
import NameInput from "@/components/project/NameInput"; import NameInput from "@/components/project/NameInput";