mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 13:26:45 +08:00
feat:学员获取 搜索重置查看 关卡阶段定位
This commit is contained in:
@@ -9,16 +9,16 @@
|
||||
<div class="groupname" style="width: 42px">姓名:</div>
|
||||
<a-input
|
||||
class="ant-input"
|
||||
v-model:value="value"
|
||||
v-model:value="searchNameValue"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<div class="groupright">
|
||||
<div class="btn1">
|
||||
<div class="btn1" @click="searchStu">
|
||||
<img src="../../assets/images/courseManage/search0.png" />
|
||||
<span class="btn1text">搜索</span>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<div class="btn2" @click="resetStud">
|
||||
<img src="../../assets/images/courseManage/reset1.png" />
|
||||
<span class="btn2text">重置</span>
|
||||
</div>
|
||||
@@ -36,6 +36,7 @@
|
||||
/>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
@@ -43,6 +44,7 @@
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -277,16 +279,21 @@
|
||||
>
|
||||
</a-tabs>
|
||||
</div>
|
||||
<stu-score-detail v-model:Svisible="Svisible" />
|
||||
<stu-score-detail
|
||||
v-model:Svisible="Svisible"
|
||||
v-model:studentId="checkStuId"
|
||||
v-model:projectId="proId"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StuScoreDetail from "../../components/drawers/StuScoreDetail";
|
||||
import { reactive, toRefs, computed } from "vue";
|
||||
import { reactive, toRefs, computed, onMounted } from "vue";
|
||||
import * as api from "../../api/index1";
|
||||
// import { message } from "ant-design-vue";
|
||||
// import { scoreRule } from "../../api/indexTaskadd"; //获取项目积分规则
|
||||
import { setScoreRule } from "../../api/indexTaskadd"; //设置项目积分规则
|
||||
import { getProjStu } from "../../api/indexProjStu";
|
||||
export default {
|
||||
name: "ProjectScore",
|
||||
components: {
|
||||
@@ -301,42 +308,15 @@ export default {
|
||||
setup(props) {
|
||||
const state = reactive({
|
||||
tabledataStu: [
|
||||
{
|
||||
key: 1,
|
||||
name: "小李",
|
||||
bum: "产研部",
|
||||
gangw: "产品经理",
|
||||
group: "好好学习",
|
||||
diploma: "0",
|
||||
operation: "查看",
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
name: "小刘",
|
||||
bum: "产研部",
|
||||
gangw: "产品经理",
|
||||
group: "天天向上",
|
||||
diploma: "0",
|
||||
operation: "查看",
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
name: "小王",
|
||||
bum: "产研部",
|
||||
gangw: "后端",
|
||||
group: "好好学习",
|
||||
diploma: "0",
|
||||
operation: "查看",
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
name: "小赵",
|
||||
bum: "产研部",
|
||||
gangw: "前端",
|
||||
group: "天天向上",
|
||||
diploma: "0",
|
||||
operation: "查看",
|
||||
},
|
||||
// {
|
||||
// key: 1,
|
||||
// name: "小李",
|
||||
// bum: "产研部",
|
||||
// gangw: "产品经理",
|
||||
// group: "好好学习",
|
||||
// diploma: "0",
|
||||
// operation: "查看",
|
||||
// },
|
||||
],
|
||||
|
||||
tablecolumnStu: [
|
||||
@@ -387,6 +367,20 @@ export default {
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "operation",
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div
|
||||
style="color:#387df7;cursor:pointer"
|
||||
onClick={() => {
|
||||
state.Svisible = true;
|
||||
console.log(value.record.key);
|
||||
state.checkStuId = value.record.key;
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
datascore: [
|
||||
@@ -450,7 +444,6 @@ export default {
|
||||
activeKeyScore: "2",
|
||||
stuName: "请输入姓名",
|
||||
todayvalue: "1",
|
||||
tableDataTotal: 30,
|
||||
stuValue: false,
|
||||
Svisible: false,
|
||||
score1: null,
|
||||
@@ -468,6 +461,12 @@ export default {
|
||||
seven2: null,
|
||||
edit: true,
|
||||
searchRankName: null, //榜单搜索名称
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: null,
|
||||
searchNameValue: null, //学员获取的姓名
|
||||
checkStuId: null,
|
||||
proId: null,
|
||||
});
|
||||
const getTableData = () => {
|
||||
let datas = state.tabledataStu;
|
||||
@@ -599,6 +598,66 @@ export default {
|
||||
|
||||
state.edit = true;
|
||||
};
|
||||
const getStu = (obj) => {
|
||||
state.proId = props.projectId;
|
||||
let objn = obj || {
|
||||
deptIds: [],
|
||||
groupId: "",
|
||||
groupName: "",
|
||||
name: "",
|
||||
pageNo: state.currentPage,
|
||||
pageSize: 10,
|
||||
projectId: props.projectId,
|
||||
topFlag: "",
|
||||
};
|
||||
getProjStu(objn).then((res) => {
|
||||
console.log("dedaole", res.data.data.rows);
|
||||
let result = res.data.data.rows;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
setStuData(result);
|
||||
});
|
||||
};
|
||||
const setStuData = (tabledata) => {
|
||||
let data = tabledata;
|
||||
let array = [];
|
||||
data.map((item) => {
|
||||
let obj = {
|
||||
key: item.studentId,
|
||||
name: item.name,
|
||||
bum: item.userInfoBo.deptName,
|
||||
gangw: item.userInfoBo.jobName,
|
||||
group: item.groupName,
|
||||
diploma: "0",
|
||||
// operation: "查看",
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.tabledataStu = array;
|
||||
};
|
||||
const changePagination = (current) => {
|
||||
state.currentPage = current;
|
||||
getStu();
|
||||
};
|
||||
const searchStu = () => {
|
||||
let obj = {
|
||||
deptIds: [],
|
||||
groupId: "",
|
||||
groupName: "",
|
||||
name: state.searchNameValue,
|
||||
pageNo: state.currentPage,
|
||||
pageSize: 10,
|
||||
projectId: props.projectId,
|
||||
topFlag: "",
|
||||
};
|
||||
getStu(obj);
|
||||
};
|
||||
const resetStud = () => {
|
||||
state.searchNameValue = null;
|
||||
getStu();
|
||||
};
|
||||
onMounted(() => {
|
||||
getStu();
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
typeChange,
|
||||
@@ -609,6 +668,11 @@ export default {
|
||||
scoreRank,
|
||||
editRule,
|
||||
scoresum,
|
||||
getStu,
|
||||
setStuData,
|
||||
changePagination,
|
||||
searchStu,
|
||||
resetStud,
|
||||
};
|
||||
},
|
||||
// computed: {
|
||||
|
||||
Reference in New Issue
Block a user