Commit 96c5dd21 authored by 罗超's avatar 罗超

1

parent c90d34bc
<template> <template>
<!-- 可补课时 --> <q-dialog
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale"> v-model="persistent"
<q-card style="width: 900px;max-width:900px;"> content-class="bg-grey-1"
persistent
transition-show="scale"
transition-hide="scale"
>
<q-card style="width: 900px; max-width: 900px">
<q-card-section> <q-card-section>
<div class="text-h6">事件记录</div> <div class="text-h6">事件记录</div>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table " <q-table
separator="none" :data="data" :columns="columns" row-key="name"> :pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-column-table"
separator="none"
:data="data"
:columns="columns"
row-key="name"
>
<template v-slot:top="props"> <template v-slot:top="props">
<!-- <div class="col-2 q-table__title">可补课课时</div> --> <!-- <div class="col-2 q-table__title">事件记录</div> -->
</template> </template>
<template v-slot:body-cell-EventType="props"> <template v-slot:body-cell-EventType="props">
<q-td :props="props"> <q-td :props="props">
<div v-if="props.row.EventType===1" style="color:#ff0000">处分</div> <div v-if="props.row.EventType === 1" style="color: #ff0000">
<div v-if="props.row.EventType===2" style="color:#00ff00">奖励</div> 处分
</div>
<div v-if="props.row.EventType === 2" style="color: #00ff00">
奖励
</div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<div> <div>
<q-btn size="xs" color="accent" style="font-weight:400" label="修改" <q-btn
@click="modify(props.row)" /> size="xs"
color="accent"
style="font-weight: 400"
label="修改"
@click="modify(props.row)"
/>
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination
:input="true" @input="changePage" /> class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template> </template>
</q-table> </q-table>
</q-card-section> </q-card-section>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" /> <q-btn
label="取消"
flat
color="grey-10"
style="font-weight: 400 !important"
@click="closeSaveForm"
/>
<!-- <q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading" <!-- <q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="save" /> --> @click="save" /> -->
</q-card-actions> </q-card-actions>
...@@ -41,14 +76,12 @@ ...@@ -41,14 +76,12 @@
</template> </template>
<script> <script>
import { import { getEventLogPageList } from "../../api/stuMan/index.js";
getEventLogPageList export default {
} from '../../api/stuMan/index.js'
export default {
props: { props: {
setObj: { setObj: {
type: Object, type: Object,
} },
}, },
data() { data() {
return { return {
...@@ -59,8 +92,8 @@ ...@@ -59,8 +92,8 @@
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
rowsPerPage: 10, rowsPerPage: 10,
StuId:0, StuId: 0,
EventType:0 EventType: 0,
}, },
data: [], data: [],
columns: [ columns: [
...@@ -74,7 +107,7 @@ ...@@ -74,7 +107,7 @@
name: "EventType", name: "EventType",
label: "类型", label: "类型",
align: "left", align: "left",
field: "EventType" field: "EventType",
}, },
{ {
name: "EventContent", name: "EventContent",
...@@ -101,28 +134,28 @@ ...@@ -101,28 +134,28 @@
label: "操作", label: "操作",
align: "left", align: "left",
}, },
] ],
} };
}, },
mounted() { mounted() {
if (this.setObj) { if (this.setObj) {
this.msg.StuId = this.setObj.Student_Id this.msg.StuId = this.setObj.Id;
} }
this.getList(); this.getList();
}, },
methods: { methods: {
closeSaveForm() { closeSaveForm() {
this.$emit('close') this.$emit("close");
this.persistent = false this.persistent = false;
}, },
getList() { getList() {
getEventLogPageList(this.msg).then(res => { getEventLogPageList(this.msg).then((res) => {
if (res.Code === 1) { if (res.Code === 1) {
this.data = res.Data.PageData this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount this.pageCount = res.Data.PageCount;
} }
}) });
}, },
//重新查询 //重新查询
resetSearch() { resetSearch() {
...@@ -132,20 +165,19 @@ ...@@ -132,20 +165,19 @@
//翻页 //翻页
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList() this.getList();
}, },
//修改 //修改
modify(item){ modify(item) {
this.persistent = false this.persistent = false;
this.$emit('modify',item) this.$emit("modify", item);
}
}, },
} },
};
</script> </script>
<style> <style>
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
width: 100%; width: 100%;
...@@ -153,26 +185,26 @@ ...@@ -153,26 +185,26 @@
color: #8c939d; color: #8c939d;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.addDutyMain { .addDutyMain {
display: inline-block; display: inline-block;
width: 118px; width: 118px;
height: 118px; height: 118px;
font-size: 70px; font-size: 70px;
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
line-height: 120px; line-height: 120px;
} }
.ItemImgDiv { .ItemImgDiv {
width: 118px; width: 118px;
height: 118px; height: 118px;
position: relative; position: relative;
margin: 0 10px 10px 0; margin: 0 10px 10px 0;
display: inline-block; display: inline-block;
} }
._delete_img { ._delete_img {
position: absolute; position: absolute;
top: 0px; top: 0px;
height: 82px; height: 82px;
...@@ -182,20 +214,20 @@ ...@@ -182,20 +214,20 @@
background-color: rgba(2, 2, 2, 0.6); background-color: rgba(2, 2, 2, 0.6);
display: inherit; display: inherit;
opacity: 0; opacity: 0;
transition: all linear .5s transition: all linear 0.5s;
} }
._delete_img i.iconfont { ._delete_img i.iconfont {
display: inline-block; display: inline-block;
width: 32px; width: 32px;
height: 32px; height: 32px;
border-radius: 50%; border-radius: 50%;
color: #E95252 !important; color: #e95252 !important;
background-color: rgba(251, 251, 251, 0.9); background-color: rgba(251, 251, 251, 0.9);
margin-top: 26px; margin-top: 26px;
} }
._upload_box ul li { ._upload_box ul li {
float: left; float: left;
height: 82px; height: 82px;
width: 143px; width: 143px;
...@@ -204,18 +236,18 @@ ...@@ -204,18 +236,18 @@
position: relative; position: relative;
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
} }
._upload_box ul li img { ._upload_box ul li img {
height: 82px; height: 82px;
width: 143px; width: 143px;
} }
._upload_box ul li:hover ._delete_img { ._upload_box ul li:hover ._delete_img {
opacity: 1; opacity: 1;
} }
._upload_tips { ._upload_tips {
font-size: 12px; font-size: 12px;
position: absolute; position: absolute;
top: 71%; top: 71%;
...@@ -223,6 +255,5 @@ ...@@ -223,6 +255,5 @@
left: 0; left: 0;
text-align: center; text-align: center;
color: #949494; color: #949494;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment