123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543 |
- <!-- 活动解析 -->
- <template>
- <div>
- <!-- table 表格 -->
- <el-row :gutter="20" class="main-items" >
- <!--数据监控-->
- <el-col :span="20" class="main" :offset="2">
- <el-row :gutter="20" class="main-header">
- <el-col :span="3"><div class="main-header-item" >注册老师数:{{getManagerList.registerTeacherCount}}人</div></el-col>
- <el-col :span="3"><div class="main-header-item">活跃老师数:{{getManagerList.activeTeacherCount}}人</div></el-col>
- <el-col :span="4"><div class="main-header-item">注册用户数:{{getManagerList.registerUserCount}}人</div></el-col>
- <el-col :span="4"><div class="main-header-item">活跃用户数:{{getManagerList.activeUserCount}}人</div></el-col>
- </el-row>
- <el-table
- :data="getManagerList.list"
- :header-cell-class-name="tableheaderClassName"
- :header-cell-style="{
- 'background-color': '#F6F7FB',
- 'color': '#393939',
- 'font-size': '16px'
- }"
- size="medium"
- border
- >
- <el-table-column
- label="小组管理员"
- header-align="center"
- >
- <template slot-scope="scope">
- <div class="scope-list">
- <img :src='BASE_URL+scope.row.imgUrl' alt="" class="table-img" v-if="scope.row.imgUrl">
- <img src="../../assets/img/user.jpg" alt="" v-if="!scope.row.imgUrl" class="table-img">
- <span class="scope-name">{{scope.row.name}}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="groupCount"
- label="小组人数"
- header-align="center"
- >
- </el-table-column>
- <el-table-column
- prop="attendanceRate"
- label="老师出勤率"
- header-align="center"
- ></el-table-column>
- <el-table-column
- prop="homeworkCount"
- label="作业批改总份数"
- header-align="center">
- </el-table-column>
- <el-table-column
- prop="homeworkPicCount"
- label="作业批改总张数"
- header-align="center"
- >
- </el-table-column>
- <el-table-column
- prop="avgTime"
- label="批改平均用时"
- header-align="center"></el-table-column>
- <el-table-column
- prop="avgMark"
- label="家长平均评分"
- header-align="center"></el-table-column>
- <el-table-column
- prop=""
- label="是否在线"
- header-align="center">
- <template slot-scope="scope">
- <span v-if="scope.$index==0&&parseInt(getManagerList.pageNo)==1">自己</span>
- <span v-if="scope.$index>0&&parseInt(getManagerList.pageNo)==1">{{scope.row.status}}</span>
- <span v-if="parseInt(getManagerList.pageNo)>1">{{scope.row.status}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="status" label="" header-align="center" width="250">
- <template slot-scope="scope">
- <el-button type="success" @click="groupDetail(scope.row.managerId)" >小组详情</el-button>
- <el-button type="success" plain @click="isShow(1,scope.row.managerId)" v-if="scope.$index>0">管理员详情</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- 分页显示 -->
- <div class="page-block" v-if="parseInt(getManagerList.pages) > 10">
- <el-pagination
- background
- @size-change="handleSizeChange"
- @current-change="pageChange"
- :page-sizes="[10, 20, 30, 40]"
- layout="total, sizes, prev, pager, next, jumper"
- :total= parseInt(getManagerList.pages)
- ></el-pagination>
- </div>
- </el-col>
- </el-row>
- <!--可分配老师-->
- <div class='showModel' @click="allShowModel(1)" v-if="hiddenModel"></div>
- <div class='model' v-if="hiddenModel">
- <div class='model-text'>
- <div class="model-manager">
- <div>校区管理员</div>
- <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(1)"></div>
- </div>
- <div class="model-items">
- <div class="model-items-first">
- <div>
- <img :src='BASE_URL+getManagerDetail.imgUrl' alt="" class="model-items-first-img" v-if="getManagerDetail.imgUrl">
- <img src="../../assets/img/user.jpg" alt="" v-if="!getManagerDetail.imgUrl" class="model-items-first-img">
- <div class="model-items-first-left">
- <div>{{getManagerDetail.name}}({{getManagerDetail.status}})</div>
- <div class="model-items-first-left-down">{{getManagerDetail.school}}</div>
- </div>
- </div>
- <div>
- <el-button type="danger" plain round @click="isShow(2,getManagerDetail.name)" icon="el-icon-bottom">降级</el-button>
- </div>
- </div>
- <div class="model-items-other model-active" >批改科目 : {{getManagerDetail.subject}}</div>
- <div class="model-items-other">批改年级 :<span v-for="(v, k) of arrGrade" :key=k class="grade-name" v-show="v">{{v}}</span></div>
- <div class="model-items-other model-active"><span>可批改时间:</span> <el-button type="info" round v-for="(v, k) of arrPeriod" :key=k v-show="v">{{v}}</el-button></div>
- <div class="model-items-other">手机号 : {{getManagerDetail.phone}}</div>
- <div class="model-items-other model-active-last">上次登录时间 : {{getManagerDetail.lastOnlineTime}}</div>
- </div>
- </div>
- </div>
- <!--所有未批改作业-->
- <div class='showModel' @click="allShowModel(2)" v-if="isPigai"></div>
- <div class='model' v-if="isPigai">
- <div class='model-text'>
- <div class="model-text-items">
- <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(2)" class="model-text-items-close"></div>
- <div>是否要将{{superName}}老师降级为普通批改老师?</div>
- </div>
- <div class="model-btn">
- <div class="model-btn-items main-gay" @click="Downgrade()">是</div>
- <div class="model-btn-items model-grdeen" @click="allShowModel(2)">否</div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { mapGetters, mapActions } from "vuex";
- export default {
- components: { },
- name: "actvResolveLabel",
- props: {},
- data() {
- return {
- BASE_URL:'https://xtimg.sharingschool.com/',
- // BASE_URL:'https://t.sharingschool.com/upload/',
- hiddenModel:false,
- isPigai:false,
- managerId:'',
- superName:'',
- count:0,
- arrPeriod:[],
- arrGrade:[],
- ItemList: [
- {
- text:'数据监控'
- },
- {
- text:'当天'
- },
- {
- text:'当月'
- },
- ],
- filters: {
- actvNm: "",
- actvCrtUserId: "",
- actvType: "",
- actvSmallType: "",
- // 排序
- MaxtimeValue:"",
- pageNo: 1,
- pageSize: 10,
- count: 0,
- orderField: "",
- orderAD: ""
- }
- };
- },
- watch: {},
- computed: {
- ...mapGetters(["getUser","getManagerList","getManagerDetail"])
- },
- methods: {
- ...mapActions(["setUser"]),
- isShow(str,res){
- let _this = this;
- // console.log(str,res)
- if (str == 1){
- _this.hiddenModel = true;
- _this.isPigai = false;
- _this.managerId = res;
- _this.GetManagerDetail(res)
- } else if (str == 2){
- _this.isPigai = true;
- _this.hiddenModel = false;
- _this.superName = res
- }
- },
- //关闭弹框
- allShowModel(str) {
- let _this = this;
- if (str == 1){
- _this.hiddenModel = false;
- } else if (str == 2){
- _this.isPigai = false;
- }
- },
- //时间封装
- formatDate: function () {
- let date = new Date();
- let y = date.getFullYear();
- let MM = date.getMonth() + 1;
- MM = MM < 10 ? ('0' + MM) : MM;
- let d = date.getDate();
- d = d < 10 ? ('0' + d) : d;
- let h = date.getHours();
- h = h < 10 ? ('0' + h) : h;
- let m = date.getMinutes();
- m = m < 10 ? ('0' + m) : m;
- let s = date.getSeconds();
- s = s < 10 ? ('0' + s) : s;
- return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
- },
- // 获取超级管理员数据
- async SuperManagerList() {
- this.$store.dispatch("SuperManagerList", {
- maxCreateTime: this.formatDate(),
- pageNo: this.filters.pageNo,
- pageSize: this.filters.pageSize
- });
- },
- // 查看校区管理员详情
- async GetManagerDetail(str) {
- this.$store.dispatch("GetManagerDetail", {
- managerId: str
- });
- var arr = [];
- if (this.getManagerDetail.grade) {
- arr = this.getManagerDetail.grade.split(',');
- } else {
- arr = []
- }
- if (this.getManagerDetail.period) {
- this.arrPeriod = this.getManagerDetail.period.split(';');
- } else {
- this.arrPeriod = [];
- }
- var arrList = [];
- for (var i in arr) {
- if (arr[i] == '一年级' || arr[i] == '二年级') {
- arrList.push('1-2年级')
- } else if (arr[i] == '三年级' || arr[i] == "四年级") {
- arrList.push('3-4年级')
- } else if (arr[i] == '五年级' || arr[i] == "六年级") {
- arrList.push('5-6年级')
- }
- }
- console.log(this.arrPeriod)
- this.arrGrade = this.uniq(arrList);
- },
- //校区管理员降级
- async Downgrade() {
- this.$store.dispatch("Downgrade", {
- managerId: this.managerId
- });
- this.SuperManagerList();
- this.allShowModel(2)
- },
- //小组详情
- groupDetail(str){
- this.$router.push({
- path: "/super/SuperSchoolManager",
- query: {
- managerId: str
- }
- })
- },
- // 表格头部样式
- tableheaderClassName({ row, rowIndex }) {
- return "table-head-th";
- },
- cellStyle:function (row, column, rowIndex, columnIndex) {
- console.log(row)
- if (row.column.label === "小组管理员") {
- return 'font-size:30px'
- } else {
- return ''
- }
- },
- // 分页
- pageChange(val) {
- this.filters.pageNo = val;
- this.SuperManagerList();
- },
- changeDateSlot(dateSlot) {
- if (dateSlot) {
- this.filters.startDate = dateSlot[0];
- this.filters.endDate = dateSlot[1];
- } else {
- this.filters.startDate = null;
- this.filters.endDate = null;
- }
- },
- actvTypeChange(typeList) {
- switch (typeList.length) {
- case 1:
- this.filters.actvType = typeList[0];
- this.filters.actvSmallType = null;
- break;
- case 2:
- this.filters.actvType = null;
- this.filters.actvSmallType = typeList[1];
- break;
- default:
- this.filters.actvType = null;
- this.filters.actvSmallType = null;
- break;
- }
- },
- handleSizeChange(val) {
- this.filters.pageSize = val;
- this.SuperManagerList();
- },
- // 排序
- sortChange(sort) {
- this.filters.orderField = sort.prop;
- this.filters.orderAD = sort.order != null ? sort.order : "";
- this.itemListReshow();
- },
- clearSearch() {
- this.filters.actvNm = null;
- this.filters.actvCrtUserId = null;
- this.filters.actvType = null;
- this.filters.actvSmallType = null;
- this.filtersActvType = [];
- this.createDateSlot = null;
- },
- // 数组去重
- uniq(array){
- var temp = []; //一个新的临时数组
- for (var i = 0; i < array.length; i++){
- if (temp.indexOf(array[i]) == -1) {
- temp.push(array[i]);
- }
- }
- return temp;
- }
- },
- mounted() {
- this.SuperManagerList()
- }
- };
- </script>
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style scoped>
- .main{
- background-color: #fff;
- margin-top: 16px;
- padding: 0 !important;
- border: 1px solid #E1E1E1;
- min-height: 980px;
- }
- el-table{
- color: #999999;
- font-size: 18px;
- }
- .main-items{
- color: #393939;
- text-align: center;
- line-height: 80px;
- }
- .main-header-item{
- font-size: 16px;
- color: #7E7E7E;
- }
- .input-with-select .el-input-group__prepend {
- background-color: #fff;
- }
- .table-img{
- width:36px;
- height:36px;
- border-radius:6px;
- }
- .showModel{
- width: 100%;
- height: 100%;
- position: fixed;
- top: 0;
- left: 0;
- background: #000000;
- opacity: 0.2;
- overflow: hidden;
- z-index: 1000;
- color: #fff;
- }
- .model{
- z-index: 1001;
- width:40%;
- height:auto;
- position: fixed;
- top: 30%;
- left: 30%;
- margin:auto;
- background: #fff;
- border-radius:10px;
- text-align: center;
- }
- .model-items-first{
- padding: 0 34px;
- display: flex;
- justify-content: space-between;
- }
- .model-items-first-img{
- width: 68px;
- height: 68px;
- border-radius: 8px;
- position: relative;
- bottom: 20px;
- }
- .model-items-first-left{
- display: inline-block;
- color: #393939;
- font-size: 24px;
- margin-left: 14px;
- text-align: left;
- }
- .model-items-first-left-down{
- color: #7E7E7E;
- font-size: 18px;
- }
- .model-text{
- background:rgba(255,255,255,1);
- border-radius:10px;
- }
- .model-items-other{
- height: 60px;
- line-height: 60px;
- color: #393939;
- font-size: 20px;
- text-align: left;
- padding: 0 34px;
- }
- .model-active{
- background-color: #F6F7FB;
- }
- .model-active-last{
- border-radius:0 0 10px 10px;
- background-color: #F6F7FB;
- }
- .model-manager{
- display: flex;
- justify-content: space-between;
- margin: 30px;
- color: #393939;
- font-size: 24px;
- }
- .model-btn{
- display: flex;
- justify-content: space-around;
- margin-bottom: 44px;
- }
- .model-btn-items{
- width:154px;
- height:50px;
- line-height: 50px;
- text-align: center;
- font-size: 18px;
- border-radius:4px;
- }
- .main-gay{
- background:rgba(246,247,251,1);
- color: #7E7E7E;
- }
- .model-grdeen{
- background-color: #52CC60;
- color: #fff;
- }
- .model-text-items-close{
- position: absolute;
- top: 10px;
- right: 15px;
- }
- .model-text-items{
- position: relative;
- color: #000000;
- font-size: 24px;
- text-align: center;
- padding: 40px 0 50px 0;
- }
- .scope-name{
- margin-left: 13px;
- color: #393939;
- font-size: 13px;
- }
- .grade-name{
- color: #393939;
- font-size: 16px;
- margin:0 10px;
- }
- .page-block{
- text-align: center !important;
- margin-top: 15px;
- }
- .scope-list{
- margin-left: 18px;
- text-align: left;
- }
- .noBorderBottom{
- border-bottom: none;
- }
- .el-table .table-head-th{
- background-color:#F6F7FB;
- font-size: 16px !important;
- color: #393939;
- }
- </style>
|