|
|
@@ -10,6 +10,19 @@
|
|
|
</view>
|
|
|
</picker>
|
|
|
|
|
|
+ <!-- 选择年级区域 -->
|
|
|
+ <view class="grade">
|
|
|
+ <uni-data-picker
|
|
|
+ placeholder="请选择班级"
|
|
|
+ popup-title="请选择班级"
|
|
|
+ :map="{ text: 'name', value: 'classId' }"
|
|
|
+ :clear-icon="false"
|
|
|
+ :localdata="dataTree_student"
|
|
|
+ v-model="classes_student"
|
|
|
+ @nodeclick="onchange_student"
|
|
|
+ ></uni-data-picker>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- 列表区域 -->
|
|
|
<view class="list">
|
|
|
<!-- 每一个资料区域 -->
|
|
|
@@ -95,9 +108,17 @@ const total = ref(0)
|
|
|
// 资料审批数组
|
|
|
const dataList = ref([])
|
|
|
|
|
|
+// 班级数组
|
|
|
+const dataTree_student = ref([])
|
|
|
+// 选择的班级
|
|
|
+const classes_student = ref()
|
|
|
+// 选择的年级
|
|
|
+const grade_student = ref()
|
|
|
+
|
|
|
onLoad(() => {
|
|
|
- // 获取资料审批数组
|
|
|
- getData()
|
|
|
+ const id = uni.getStorageSync('userInfo').id
|
|
|
+
|
|
|
+ getManageClass(id)
|
|
|
})
|
|
|
|
|
|
// 页面下拉刷新回调
|
|
|
@@ -113,6 +134,24 @@ onReachBottom(() => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+// 获取管理的班级数组
|
|
|
+const getManageClass = async (id) => {
|
|
|
+ const res = await myRequest({
|
|
|
+ url: '/wanzai/api/smartUser/getManageClass',
|
|
|
+ data: {
|
|
|
+ id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // console.log(res)
|
|
|
+ const result = JSON.parse(decryptDes(res.data))
|
|
|
+ // console.log(result)
|
|
|
+ dataTree_student.value = result
|
|
|
+ classes_student.value = result[0].classId
|
|
|
+ grade_student.value = result[0].gradeId
|
|
|
+
|
|
|
+ getData()
|
|
|
+}
|
|
|
+
|
|
|
// 获取资料审批数组
|
|
|
const getData = async () => {
|
|
|
const res = await myRequest({
|
|
|
@@ -120,7 +159,9 @@ const getData = async () => {
|
|
|
data: {
|
|
|
currentPage: currentPage.value,
|
|
|
pageCount: 4,
|
|
|
- status: array.value[currentIndex.value].value
|
|
|
+ status: array.value[currentIndex.value].value,
|
|
|
+ grade: grade_student.value,
|
|
|
+ schoolClass: classes_student.value
|
|
|
}
|
|
|
})
|
|
|
// console.log(res)
|
|
|
@@ -141,6 +182,16 @@ const bindPickerChange = (e) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 学生部门筛选框选择时的回调
|
|
|
+const onchange_student = (e) => {
|
|
|
+ // console.log(e)
|
|
|
+ classes_student.value = e.classId
|
|
|
+ grade_student.value = e.gradeId
|
|
|
+ currentPage.value = 1
|
|
|
+ dataList.value = []
|
|
|
+ getData()
|
|
|
+}
|
|
|
+
|
|
|
// 点击同意拒绝按钮回调
|
|
|
const clickBtn = (id, type) => {
|
|
|
uni.showModal({
|
|
|
@@ -192,7 +243,6 @@ const clickImg = (url) => {
|
|
|
box-sizing: border-box;
|
|
|
padding: 30rpx 20rpx;
|
|
|
height: 100vh;
|
|
|
- overflow-y: auto;
|
|
|
background: linear-gradient(180deg, #f2f7ff 0%, #f2f7ff 100%);
|
|
|
|
|
|
.search {
|
|
|
@@ -208,6 +258,11 @@ const clickImg = (url) => {
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
|
|
|
+ .grade {
|
|
|
+ margin-top: 20rpx;
|
|
|
+ height: 70rpx;
|
|
|
+ }
|
|
|
+
|
|
|
.list {
|
|
|
margin-top: 30rpx;
|
|
|
|