|
@@ -24,25 +24,28 @@
|
|
|
</div>
|
|
|
<div class="sc-menu-right sc-text-no-select">
|
|
|
<ul>
|
|
|
- <li @click="importStudent()">
|
|
|
- <Icon type="md-arrow-round-up" color="white" size="18" />
|
|
|
- <span>汇入名单</span>
|
|
|
- </li>
|
|
|
- <li @click="delStudent(-1)">
|
|
|
- <Icon type="md-trash" color="white" size="18" />
|
|
|
+
|
|
|
+ <li @click="delStudent(-1)" :class=" selections.length > 0 ? '':'sc-disable-cursor' ">
|
|
|
+ <Icon type="md-trash" :color="selections.length > 0 ? 'white':'#606060'" size="18" />
|
|
|
<span>删除学生</span>
|
|
|
</li>
|
|
|
- <li @click="editStudent()">
|
|
|
- <Icon type="md-create" color="white" size="18" />
|
|
|
+ <li @click="editStudent()" :class=" selections.length > 0 ? '':'sc-disable-cursor' ">
|
|
|
+ <Icon type="md-create" :color="selections.length > 0 ? 'white':'#606060'" size="18" />
|
|
|
<span>编辑资讯</span>
|
|
|
- </li>
|
|
|
+ </li>
|
|
|
<li @click="addStudent()">
|
|
|
<Icon type="md-person-add" color="white" size="18" />
|
|
|
<span>新增学生</span>
|
|
|
</li>
|
|
|
+ <li @click="importStudent()">
|
|
|
+ <Icon type="md-arrow-round-up" color="white" size="18" />
|
|
|
+ <span>汇入名单</span>
|
|
|
+ <!--<span>{{ $t('stuAccount.importStu') }}</span>-->
|
|
|
+ </li>
|
|
|
<li @click="showAuthorization()">
|
|
|
<Icon type="ios-cog-outline" color="white" size="18" />
|
|
|
<span>授权管理</span>
|
|
|
+ <!--<span>{{ $t('stuAccount.menuAuth') }}</span>-->
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
@@ -50,8 +53,9 @@
|
|
|
<div class="sc-content" style="position:relative">
|
|
|
<Table ref="selection" :columns="tableColumns" :data="tablePageData" height="750" :loading="tableLoading" @on-select="getSelectInfo" @on-select-cancel="getSelectInfo" @on-select-all="getSelectInfo" @on-select-all-cancel="cancelAll">
|
|
|
<template slot-scope="{ row,index }" slot="status">
|
|
|
- <Icon v-if="row.status == 1" type="md-checkmark-circle-outline" size="18" color="#1CD0A1" />
|
|
|
- <Icon v-else type="md-close" size="18" color="red" />
|
|
|
+ <Icon v-if="index%3 == 1" type="md-checkmark-circle-outline" size="18" color="#1CD0A1" />
|
|
|
+ <!--<Icon v-else type="md-close" size="18" color="red" />-->
|
|
|
+ <span v-else>—</span>
|
|
|
</template>
|
|
|
<template slot-scope="{ row,index }" slot="action">
|
|
|
<div class="item-tools">
|
|
@@ -87,7 +91,7 @@
|
|
|
pageSize:30,
|
|
|
bizType:0,
|
|
|
editStudentInfo:[],
|
|
|
- selctions: [],
|
|
|
+ selections: [],
|
|
|
selectRow: {},
|
|
|
addStudentStatus:false,
|
|
|
importStudentStatus: false,
|
|
@@ -167,7 +171,7 @@
|
|
|
this.tableLoading = false;
|
|
|
},
|
|
|
cancelAll() {
|
|
|
- this.selctions = [];
|
|
|
+ this.selections = [];
|
|
|
},
|
|
|
getIndex(_arr, _obj) {
|
|
|
var len = _arr.length;
|
|
@@ -195,7 +199,7 @@
|
|
|
},
|
|
|
getSelectInfo(selction, row) {
|
|
|
console.log(this.tableData);
|
|
|
- this.selctions = selction;
|
|
|
+ this.selections = selction;
|
|
|
this.selectRow = row;
|
|
|
},
|
|
|
closeAddStudent(data) {
|
|
@@ -243,10 +247,10 @@
|
|
|
this.$forceUpdate();
|
|
|
this.addStudentStatus = true;
|
|
|
} else {
|
|
|
- if (this.selctions.length > 0) {
|
|
|
+ if (this.selections.length > 0) {
|
|
|
|
|
|
this.editStudentInfo = [];
|
|
|
- [...this.editStudentInfo] = this.selctions;
|
|
|
+ [...this.editStudentInfo] = this.selections;
|
|
|
this.addStudentStatus = true;
|
|
|
} else {
|
|
|
this.$Message.error('请选择需要修改的学生!');
|
|
@@ -258,9 +262,19 @@
|
|
|
if (index >= 0) {
|
|
|
let showIndex = index + (this.currentPage - 1) * this.pageSize;
|
|
|
let originIndex = this.getIndex(this.tableData, this.tablePageData[index]);
|
|
|
- this.tableData.splice(originIndex, 1);
|
|
|
- this.tablePageData.splice(index, 1);
|
|
|
- this.tableShowData.splice(showIndex, 1);
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: '删除学生',
|
|
|
+ content: '<p>确定删除' + this.tableShowData[showIndex].name + '账号信息!</p>',
|
|
|
+ onOk: () => {
|
|
|
+ this.tableData.splice(originIndex, 1);
|
|
|
+ this.tablePageData.splice(index, 1);
|
|
|
+ this.tableShowData.splice(showIndex, 1);
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
let i = this.getIndex(this.tableData, row);
|
|
|
if (i >= 0) {
|