mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
feat:增加学习路径及项目发布的统计,增加组织树
This commit is contained in:
@@ -169,7 +169,34 @@
|
||||
</div>
|
||||
|
||||
<div class="in select">
|
||||
<a-select
|
||||
<a-tree-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="classifySelect2"
|
||||
style="width: 100%"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="自动带出 可修改"
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="classifyList2"
|
||||
:fieldNames="{
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
}"
|
||||
:disabled="viewDetail ? true : false"
|
||||
@change="classificationChange2"
|
||||
dropdownClassName="treeDropdown"
|
||||
>
|
||||
<!-- <template #title="{ value: val, title }">
|
||||
<b v-if="val === 'parent 1-1'" style="color: #08c">sss</b>
|
||||
<template v-else>{{ title }}</template>
|
||||
</template> -->
|
||||
</a-tree-select>
|
||||
<!-- <a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
@@ -179,8 +206,9 @@
|
||||
placeholder="自动带出 可修改"
|
||||
:options="classifyList2"
|
||||
@change="classificationChange2"
|
||||
:field-names="{ label: 'name', value: 'id', options: 'children' }"
|
||||
:disabled="viewDetail ? true : false"
|
||||
/>
|
||||
/> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="name name2">
|
||||
@@ -359,22 +387,24 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref, onUnmounted } from "vue";
|
||||
import { reactive, toRefs, ref, onUnmounted, computed } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import dayjs from "dayjs";
|
||||
import * as api from "../../api/index";
|
||||
// import * as api1 from "../../api/index1";
|
||||
import { storage } from "../../api/storage";
|
||||
import { toDate } from "../../api/method";
|
||||
|
||||
import { useStore } from "vuex";
|
||||
export default {
|
||||
name: "projectAdd",
|
||||
setup() {
|
||||
const store = useStore();
|
||||
// 编辑页面跳转过来时候,自动填充表格
|
||||
const routers = useRoute();
|
||||
const isEdit = ref(false);
|
||||
let peojectID = "";
|
||||
|
||||
console.log("store.state.orgtreeList", store.state.orgtreeList);
|
||||
if (routers.query.projectId) {
|
||||
storage.set("projectAddId", routers.query.projectId);
|
||||
isEdit.value = true;
|
||||
@@ -515,7 +545,7 @@ export default {
|
||||
valueE1: null,
|
||||
valueE2: null,
|
||||
classifySelect1: [],
|
||||
classifySelect2: [],
|
||||
classifySelect2: null,
|
||||
classifySelect3: [],
|
||||
classifySelect4: [],
|
||||
rangevalue: [],
|
||||
@@ -690,11 +720,25 @@ export default {
|
||||
};
|
||||
|
||||
// 资源归属 sourceBelongId 后续给接口
|
||||
const classifyList2 = ref([
|
||||
{ value: 1, label: "项目一" },
|
||||
{ value: 2, label: "项目二" },
|
||||
{ value: 3, label: "项目三" },
|
||||
]);
|
||||
const classifyList2 = computed(() => {
|
||||
return store.state.orgtreeList ? store.state.orgtreeList : ref(null);
|
||||
});
|
||||
|
||||
// //获取资源归属
|
||||
// const orgTree = () => {
|
||||
// api1
|
||||
// .orgtree()
|
||||
// .then((res) => {
|
||||
// console.log("获取集团组织成功", res);
|
||||
// if (res.status === 200) {
|
||||
// classifyList2.value = res.data.data;
|
||||
// }
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log("获取集团组织失败", err);
|
||||
// });
|
||||
// };
|
||||
// orgTree();
|
||||
|
||||
let sourceBelongIdC = "";
|
||||
const classificationChange2 = (key) => {
|
||||
@@ -1357,4 +1401,18 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.treeDropdown {
|
||||
// width: 240px !important;
|
||||
// border-radius: 5px;
|
||||
// min-height: 600px !important;
|
||||
.ant-select-tree-list-scrollbar {
|
||||
width: 5px !important;
|
||||
.ant-select-tree-list-scrollbar-thumb {
|
||||
background-color: #4ea6ff !important;
|
||||
}
|
||||
}
|
||||
.ant-select-tree-indent-unit {
|
||||
width: 7px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user