--fix 字典修改

This commit is contained in:
yuping
2023-01-13 12:45:43 +08:00
parent dd840d67e7
commit f8ab82468a
3 changed files with 15 additions and 23 deletions

View File

@@ -67,6 +67,7 @@ export default defineComponent({
initDict("pathmapPic"); initDict("pathmapPic");
initDict("projectClass"); initDict("projectClass");
initDict("projectPic"); initDict("projectPic");
initDict("sysType");
getMemberInfo(); getMemberInfo();
getOrgTree(); getOrgTree();
} }
@@ -128,14 +129,7 @@ export default defineComponent({
store.commit("SET_DICT", { key, data: list }); store.commit("SET_DICT", { key, data: list });
} }
const getDictList = (param) => const getDictList = (param) => api1.getDictTree({setCode: param,}).then((res) => res.data.data);
api1
.getDict({
pageNo: 1,
pageSize: 20,
setCode: param,
})
.then((res) => res.data.data.rows);
//获取组织树 //获取组织树
const getOrgTree = () => { const getOrgTree = () => {
api.getOrgTreeInfo().then((res) => { api.getOrgTreeInfo().then((res) => {

View File

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

View File

@@ -39,15 +39,6 @@
</a-select> </a-select>
</div> </div>
<div class="select"> <div class="select">
<!-- <a-select
v-model:value="categoryId"
dropdownClassName="dropdown-style"
style="width: 200px"
placeholder="请选择内容分类"
:options="options2"
allowClear
showSearch
></a-select> -->
<a-tree-select <a-tree-select
:getPopupContainer=" :getPopupContainer="
(triggerNode) => { (triggerNode) => {
@@ -61,12 +52,13 @@
placeholder="请选择内容分类" placeholder="请选择内容分类"
allow-clear allow-clear
tree-default-expand-all tree-default-expand-all
:tree-data="options2222" :fieldNames="{
children: 'children',
label: 'name',
value: 'dictName',
}"
:tree-data="sysTypeOptions"
> >
<template #title="{ value: val, title }">
<b v-if="val === '11111'" style="color: #08c">sss</b>
<template v-else>{{ title }}</template>
</template>
</a-tree-select> </a-tree-select>
</div> </div>
<div class="select"> <div class="select">
@@ -2298,7 +2290,7 @@ import {
shallowRef, shallowRef,
onMounted, onMounted,
onBeforeUnmount, onBeforeUnmount,
watch, watch, computed,
} from "vue"; } from "vue";
import * as api from "../../api/indexInvist.js"; import * as api from "../../api/indexInvist.js";
@@ -2359,6 +2351,7 @@ import AddTest from "../../components/drawers/AddTest.vue";
import TableStudent from "@/components/student/TableStudent"; 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";
//列表表格 //列表表格
const columns1 = [ const columns1 = [
// { // {
@@ -2992,6 +2985,7 @@ export default defineComponent({
}, },
setup() { setup() {
const CourseModalRef = ref(null); const CourseModalRef = ref(null);
const store = useStore();
const state = reactive({ const state = reactive({
//新加 //新加
@@ -3550,6 +3544,8 @@ export default defineComponent({
state.viewpowervisible = true; state.viewpowervisible = true;
}; };
const sysTypeOptions = computed(() => store.state.sysType);
// 富文本 sssssssssssssss // 富文本 sssssssssssssss
// 编辑器实例,必须用 shallowRef // 编辑器实例,必须用 shallowRef
const editorRef = shallowRef(); const editorRef = shallowRef();
@@ -5557,6 +5553,7 @@ export default defineComponent({
}; };
return { return {
...toRefs(state), ...toRefs(state),
sysTypeOptions,
CourseModalRef, CourseModalRef,
auditStudent, auditStudent,
getdateToDateFn, getdateToDateFn,