123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <template>
- <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">
- <view class="">
- <u-cell class="ui-hover ui-flex-1" 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;">
- </image>
- </view>
- <text slot="label" class="txt-muted">{{item.created_at}} </text>
- <el-tag v-if="item.studentTab.type_text == '好评'" slot="value"
- plain>{{item.studentTab.tab_name}}{{item.score}}</el-tag>
- <el-tag slot="value" v-else plain type="danger">{{item.studentTab.tab_name}}{{item.score}}</el-tag>
- <!-- <u-badge slot="value" value="+1" plain size="mini" type="success"></u-badge> -->
- <view class="" slot="right-icon">
- <i class="el-icon-delete ui-ml30 " style="font-size: 20px;" @click="itemClick(item,index)"></i>
- </view>
- </u-cell>
- </view>
- </u-cell-group>
- <view @click="addTab" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
- {{ showTitle }}
- </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>
- <script>
- export default {
- props: {
- chooseClassId :{
- type : Number|String,
- default : ""
- },
- },
- data() {
- return {
- show: false,
- current_page : 1,
- list : [],
- last_page : 10,
-
- msgType: 'center',
- itemInfo: {},
- index:0
- }
- },
- computed : {
- showTitle(){
- if (this.current_page > this.last_page) {
- return '没有更多数据了。。。'
- }else{
- return '加载更多'
- }
- },
- },
- mounted() {
- },
- methods: {
- open() {
- this.show = true
- },
- addTab() {
- if(this.showTitle=="没有更多数据了。。。"){
- return
- }
- this.$api.sendRequest({
- url: `/mobile/studentTab/getstudentTabLog`,
- method: "post",
- data: {
- page: this.current_page,
- class_id: this.chooseClassId
- },
- success: res => {
- let arr = [...this.list, ...res.data.data]
- this.current_page++
- this.last_page=res.data.last_page
- this.list =[...this.list,...res.data.data]
-
- }
- })
- },
- 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.id
- },
- success: res => {
- console.log("aaaaaaaaaaa");
- this.show=false
- this.$emit('delSuccess')
- },
- complete : res=>{
- console.log(res,"resss");
- }
- })
- },
- dialogClose() {
-
- }
- },
- }
- </script>
- <style>
- </style>
|