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 * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52 * @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com * @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 * @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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; return response;
} else { } else {
if (code === 1000) { 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); console.log("api %o", msg);
} }

View File

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

View File

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