feat:项目学员列表获取

This commit is contained in:
lixg
2022-11-30 15:17:53 +08:00
parent 29d3c8a8a1
commit ec3c3207e8
3 changed files with 45 additions and 13 deletions

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-30 13:45:23
* @LastEditTime: 2022-11-30 15:03:21
* @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -53,7 +53,7 @@ http.interceptors.response.use(
return response;
} else {
if (code === 1000) {
window.open("https://u-pre.boe.com/web/", '_self');
// window.open("https://u-pre.boe.com/web/", '_self');
}
console.log("api %o", msg);
}

View File

@@ -672,6 +672,9 @@ export default {
// state.tableDataTotal = res.data.data.total;
// return res.data.data.rows;
}
})
.catch((err) => {
console.log("获取学员失败", err);
});
};
getMember();

View File

@@ -576,12 +576,33 @@
"
>
<div class="groupname" style="width: 42px">部门</div>
<a-select
<a-tree-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="valuestub"
:dropdown-style="{
maxHeight: '400px',
overflow: 'auto',
}"
placeholder="请选择部门"
:options="bum"
@change="handleChangeBum"
:tree-data="bum"
:fieldNames="{
children: 'treeChildList',
label: 'name',
value: 'id',
}"
></a-tree-select>
<!-- <a-select
v-model:value="valuestub"
placeholder="请选择部门"
:options="bum"
@change="handleChangeBum"
/>
/> -->
</div>
<div
style="
@@ -1645,7 +1666,7 @@
</div>
</template>
<script>
import { reactive, toRefs, onMounted, watch } from "vue";
import { reactive, toRefs, onMounted, watch, computed } from "vue";
import { useRoute } from "vue-router";
import { useRouter } from "vue-router";
// import { CaretRightOutlined } from "@ant-design/icons-vue";
@@ -1685,6 +1706,7 @@ import { toDate } from "../../api/method";
import projSet from "../../components/Modals/projSet";
import { overview } from "../../api/indexProjStu";
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
import { useStore } from "vuex";
export default {
name: "taskPage",
components: {
@@ -1709,6 +1731,7 @@ export default {
TwoDimensionalCode,
},
setup() {
const store = useStore();
const state = reactive({
projectId: storage.get("projectId")
? JSON.parse(storage.get("projectId"))
@@ -1734,11 +1757,11 @@ export default {
},
],
bum: [
{
id: 1,
value: "",
label: "",
},
// {
// id: 1,
// value: "",
// label: "",
// },
],
changeGoods: [], //更改是否优秀的id数组
choosedStageId: 1, // 选择的阶段id
@@ -2362,6 +2385,10 @@ export default {
console.log("route:", router.query.id);
// 输入接入 -- start --
// 资源归属 sourceBelongId 后续给接口
state.bum = computed(() => {
return store.state.orgtreeList ? store.state.orgtreeList : [];
});
//任务大纲渲染
const getTaskList = () => {
@@ -3192,6 +3219,7 @@ export default {
const getStu = (obj) => {
let objf = obj || {
deptIds: [], //部门
groupId: 0,
groupName: "",
name: "",
pageNo: state.currentPageStu,
@@ -3201,7 +3229,7 @@ export default {
};
getProjStu(objf)
.then((res) => {
console.log(res.data, "获取学员列表");
console.log("获取学员列表", res.data);
if (res.data.code === 200) {
let leng = res.data.data.rows.length;
state.total = res.data.data.total;
@@ -3285,12 +3313,12 @@ export default {
} else if (info.attach.length !== 0 && d == -1) {
return;
} else {
console.log(info.attach, "xgo");
// console.log(info.attach, "xgo");
// let str = JSON.parse(info.attach)
// console.log("赚回来",str)
// let luj = info.attach.split(",")
let luj = info.attach;
console.log("lulj", luj);
// console.log("lulj", luj);
console.log("赚回来", JSON.parse(luj));
state.fileList = JSON.parse(luj);
// state.fileList = luj
@@ -3690,6 +3718,7 @@ export default {
.then((res) => {
console.log("添加学员成功", res);
message.success("添加学员成功");
getStu();
})
.catch((err) => {
console.log("添加学员失败", err);