123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- <!-- 活动解析 -->
- <template>
- <div>
- <!-- table 表格 -->
- <el-row :gutter="20" class="main-items" >
- <!--数据监控-->
- <el-col :span="20" class="main" :offset="2">
- <el-table
- :data="list"
- highlight-current-row
- size="medium"
- border
- stripe
- >
- <el-table-column
- prop="school"
- label="上传时间"
- header-align="center"
- >
- </el-table-column>
- <el-table-column
- prop="subject"
- label="科目"
- header-align="center"
- ></el-table-column>
- <el-table-column
- prop=""
- label="学生"
- header-align="center">
- </el-table-column>
- <el-table-column
- prop=""
- label="批改状况"
- header-align="center"
- >
- </el-table-column>
- <el-table-column prop="status" label="" header-align="center" width="250">
- <template scope="scope">
- <el-button type="danger" @click="isShow(2,scope.row.teacherId,scope.row.name)">去分配</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- 分页显示 -->
- <div class="page-block" v-if="parseInt(applyTeacherList.pages) > 0">
- <el-pagination
- background
- @size-change="handleSizeChange"
- @current-change="pageChange"
- :page-sizes="[10]"
- layout="total, sizes, prev, pager, next, jumper"
- :total= parseInt(applyTeacherList.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-text-items">
- <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(1)" class="model-text-items-close"></div>
- <div>是否要通过{{userName}}老师的注册申请?</div>
- </div>
- <div class="model-btn">
- <div class="model-btn-items main-gay" @click="ApplyOperate()">是</div>
- <div class="model-btn-items model-grdeen" @click="allShowModel(1)">否</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>是否要驳回{{userName}}老师的注册申请?</div>
- </div>
- <div class="model-btn">
- <div class="model-btn-items main-gay" @click="ApplyOperate()">是</div>
- <div class="model-btn-items model-grdeen" @click="allShowModel(2)">否</div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { mapGetters, mapActions } from "vuex";
- import { IMG_BASE_URL } from '@/ImgConfig'
- export default {
- components: { },
- name: "actvResolveLabel",
- props: {},
- data() {
- return {
- BASE_URL:IMG_BASE_URL,
- hiddenModel:false,
- applicantId:'',
- operate:'',
- list:[],
- isPigai:false,
- options: [
- {
- value: "0",
- label: "一年级"
- },
- {
- value: "1",
- label: "二年级"
- },
- {
- value: "2",
- label: "三年级"
- },
- {
- value: "3",
- label: "四年级"
- },
- {
- value: "4",
- label: "五年级"
- },
- {
- value: "5",
- label: "六年级"
- }
- ],
- grades: [
- {
- value: "0",
- label: "语文"
- },
- {
- value: "1",
- label: "数学"
- },
- {
- value: "2",
- label: "英语"
- }
- ],
- ItemList: [
- {
- text:'数据监控'
- },
- {
- text:'当天'
- },
- {
- text:'当月'
- },
- ],
- filters: {
- actvNm: "",
- actvCrtUserId: "",
- actvType: "",
- actvSmallType: "",
- // 排序
- MaxtimeValue:'',
- pageNo: 1,
- pageSize: 10,
- count: 0,
- orderField: "",
- orderAD: ""
- }
- };
- },
- watch: {},
- computed: {
- ...mapGetters(["getUser","applyTeacherList"])
- },
- methods: {
- ...mapActions(["setUser"]),
- isShow(str,res,ts){
- let _this = this;
- console.log(str)
- _this.operate = str;
- _this.applicantId = res;
- _this.userName = ts
- if (str == 1){
- _this.hiddenModel = true;
- _this.isPigai = false;
- } else if (str == 2){
- _this.isPigai = true;
- _this.hiddenModel = false;
- }
- },
- //关闭弹框
- allShowModel(str) {
- let _this = this;
- if (str == 1){
- _this.hiddenModel = false;
- } else if (str == 2){
- _this.isPigai = false;
- }
- },
- //查看申请老师列表
- async SuperApplyTeacherList() {
- this.$store.dispatch("SuperApplyTeacherList", {
- maxCreateTime: this.formatDate(),
- pageNo: this.filters.pageNo,
- pageSize: this.filters.pageSize
- });
- console.log(this.applyTeacherList)
- this.applyTeacherList.list = (res => {
- const d = []
- for (let i in res) {
- d.push( {
- gradeList: this.gradeBag(i),
- periodList: res[i].period.split(';'),
- imgUrl: res[i].imgUrl,
- name: res[i].name,
- school:res[i].school,
- teacherId:res[i].teacherId,
- subject:res[i].subject
- })
- }
- return d
- })(this.applyTeacherList.list)
- this.list = this.applyTeacherList.list;
- console.log(this.list)
- },
- //申请审批操作
- async ApplyOperate() {
- this.$store.dispatch("ApplyOperate", {
- applicantId: this.applicantId,
- operate: this.operate,
- });
- this.allShowModel(this.operate)
- },
- //时间封装
- 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;
- },
- // 数组去重
- uniq(array){
- var temp = []; //一个新的临时数组
- for (var i = 0; i < array.length; i++){
- if (temp.indexOf(array[i]) == -1) {
- temp.push(array[i]);
- }
- }
- return temp;
- },
- //年级封装
- gradeBag:function (res) {
- var arr = [];
- if (this.applyTeacherList.list[res].grade) {
- arr = this.applyTeacherList.list[res].grade.split(',');
- } else {
- arr = []
- }
- 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年级')
- }
- }
- return this.uniq(arrList);
- },
- // 分页
- pageChange(val) {
- this.filters.pageNo = val;
- this.SuperApplyTeacherList();
- },
- 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) {
- console.log(val)
- this.filters.pageSize = val;
- this.SuperApplyTeacherList();
- },
- // 排序
- 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;
- },
- },
- mounted() {
- this.SuperApplyTeacherList();
- console.log(this.list)
- }
- };
- </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;
- }
- .scope-name{
- margin-left: 13px;
- }
- .main-items{
- color: #393939;
- text-align: center;
- line-height: 80px;
- }
- .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-text{
- background:rgba(255,255,255,1);
- border-radius:10px;
- }
- .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;
- }
- .el-pagination.is-background .el-pager li:not(.disabled).active {
- background-color:#52cc60!important;
- color: #fff;
- }
- .model-text-items{
- position: relative;
- color: #000000;
- font-size: 24px;
- text-align: center;
- padding: 40px 0 50px 0;
- }
- .page-block{
- text-align: center;
- margin-top: 15px;
- }
- .scope-list{
- margin-left: 18px;
- text-align: left;
- }
- /*.all_pagination{*/
- /*text-align: center !important;*/
- /*}*/
- </style>
|