2 次代碼提交 8d95020d42 ... 0d8c02ba5c

作者 SHA1 備註 提交日期
  wj 0d8c02ba5c Merge branch 'master' of http://121.40.237.253:3000/lijie/zhxy-desk 1 年之前
  wj 4616a81f25 联调删除记录 1 年之前
共有 2 個文件被更改,包括 50 次插入10 次删除
  1. 35 3
      pages/studentRanked/components/mark-score-list.vue
  2. 15 7
      pages/studentRanked/studentRanked.vue

+ 35 - 3
pages/studentRanked/components/mark-score-list.vue

@@ -2,7 +2,7 @@
 	<el-drawer append-to-body title="点评记录" :visible.sync="show" size="400px" direction="ltr"
 		style="backdrop-filter: blur(4px);">
 		<u-cell-group v-for="(item,index) in list" :key="index">
-			<u-cell class="ui-hover" clickable :title="item.student.student_name">
+			<u-cell @click="itemClick(item,index)" class="ui-hover" clickable :title="item.student.student_name">
 
 				<view slot="icon" class="ui-mr10">
 					<image :src="item.stuSchool.student_photo" style="width: 40px;height: 40px;border-radius: 20px;">
@@ -21,9 +21,14 @@
 			</u-cell>
 
 		</u-cell-group>
-		<view  @click="addTab" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
+		<view @click="addTab" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
 			加载更多
 		</view>
+
+		<uni-popup ref="alertDialog" type="dialog">
+			<uni-popup-dialog type="center" cancelText="关闭" confirmText="确认" title="确认撤销?" content="您确认撤销该条点评记录?"
+				@confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
 	</el-drawer>
 </template>
 
@@ -38,6 +43,9 @@
 		data() {
 			return {
 				show: false,
+				msgType: 'center',
+				itemInfo: {},
+				index:0
 			}
 		},
 		mounted() {
@@ -49,7 +57,31 @@
 			},
 			addTab() {
 				this.$emit('add')
-			}
+			},
+			itemClick(item,index) {
+				this.index = index
+				this.itemInfo = item
+				this.$refs.alertDialog.open('center')
+
+			},
+			dialogConfirm() {
+				this.$api.sendRequest({
+					url: `/mobile/studentTab/delstudentTabLog`,
+					method: "post",
+					data: {
+						tab_log_id: this.itemInfo.tab_id
+					},
+					success: res => {
+						uni.showToast({
+							title: res.msg,
+						})
+						
+						this.$emit('success',this.index)
+					}
+				})
+
+			},
+			dialogClose() {}
 		},
 
 	}

+ 15 - 7
pages/studentRanked/studentRanked.vue

@@ -94,7 +94,8 @@
 			ref="markScore"></markScore>
 
 		<!-- 点评记录 -->
-		<markScoreList @add='addTab' :list='studentTab.data' ref="markScoreList"></markScoreList>
+		<markScoreList @success='DelectSuccess' @add='addTab' :list='studentTab.data' ref="markScoreList">
+		</markScoreList>
 
 		<el-drawer title="排行榜" :visible.sync="showRankList" direction="rtl">
 			<view style="text-align: center;" class="">
@@ -108,7 +109,7 @@
 				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="show_classes=true">
 					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
 					<view style="line-height: 1;">
-						<text class="txt-white f24">评分记录</text>
+						<text class="txt-white f24">选择班级</text>
 					</view>
 				</view>
 				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="$refs.markScoreList.open()">
@@ -158,7 +159,6 @@
 </template>
 
 <script>
-
 	import markScore from './components/mark-score.vue'
 	import markScoreList from './components/mark-score-list.vue'
 	import {
@@ -186,13 +186,15 @@
 				studentTab: [],
 				type: 1,
 				stuNameList: [],
-				stuName: ''
+				stuName: '',
+				
 			}
 		},
 		mounted() {
 
 			// this.id = this.$route.query.id
-			this.id = this.$store.state.teacherInfo.selfclass.id
+
+			this.id = this.$store.state.teacherInfo.selfclass.id 
 			this.getstudentTabLog()
 			// this.getStudent()
 			this.getClassroomList();
@@ -227,7 +229,13 @@
 				this.getStudent()
 				this.show_classes = false
 			},
+			DelectSuccess(index) {
+				console.log(index);
+				this.getStudent()
+				this.getstudentTabLog()
+			},
 			getClassroomList() {
+
 				let teacher_id = this.$store.state.teacherInfo.id
 				this.$api.sendRequest({
 					url: `/mobile/teacher/teachClasses`,
@@ -336,7 +344,7 @@
 				this.$api.sendRequest({
 					url: `/mobile/studentTab/getstudentTabLog`,
 					data: {
-						class_id: 2
+						class_id: this.chooseClassId
 					},
 					method: "post",
 					success: res => {
@@ -357,7 +365,7 @@
 					method: "post",
 					data: {
 						page: this.studentTab.current_page + 1,
-						class_id: 2
+						class_id: this.chooseClassId
 					},
 					success: res => {
 						let arr = [...this.studentTab.data, ...res.data.data]