导入学生信息添加loading&哈尔滨日志

This commit is contained in:
fan 2020-12-02 18:38:28 +08:00
parent c2cb4ce764
commit 6cc64d7cfc
3 changed files with 120 additions and 3 deletions

View File

@ -126,7 +126,7 @@
<el-row style="height: 68px;" />
<el-row class="button-row">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">考评</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">日志</div>
<div style="width: 80px;" class="div-simulate-button" @click="showLogDetail">日志</div>
</el-row>
<el-row class="button-row" style="margin-top: 10px;">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">锁屏</div>
@ -139,6 +139,7 @@
<alarm-table-low ref="alarmTableLow" />
<alarm-table-hmi ref="alarmTableHmi" />
<train-control ref="trainControl" :offset="10" />
<log-detail ref="logDetail" />
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
<source :src="buzzerAudio" type="audio/mpeg">
</audio>
@ -154,6 +155,7 @@ import BuzzerAudio from '@/assets/buzzer.mp3';
import AlarmTableHmi from './menuDialog/alarmTableHmi';
import AlarmTableLow from './menuDialog/alarmTableLow';
import TrainControl from './dialog/trainControl';
import LogDetail from './menuDialog/logDetail';
export default {
name: 'MenuBar',
@ -161,7 +163,8 @@ export default {
NoticeInfo,
AlarmTableLow,
AlarmTableHmi,
TrainControl
TrainControl,
LogDetail
},
props: {
selected: {
@ -379,6 +382,10 @@ export default {
}
});
},
showLogDetail() {
// this.$refs.logDetail.doShow();
this.undeveloped();
},
login() {
if (this.loginActive) {
if (this.loginText === '退出') {

View File

@ -0,0 +1,105 @@
<template>
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="操作列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="text-align: center;">
<div style="text-align: left;">
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
<el-date-picker
v-model="startTime"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
/>
<div style="display: inline-block;margin-right: 5px;margin-left: 10px;">结束时间:</div>
<el-date-picker
v-model="endTime"
size="small"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
/>
<el-button style="margin-left: 10px;" @click="queryData">查询</el-button>
</div>
<el-table
:data="totalData"
border
style="width: 100%"
height="600"
>
<el-table-column prop="data" label="日期/时间" header-align="center" align="center" width="150px" />
<el-table-column prop="operateName" label="操作人" header-align="center" align="center" width="100px" />
<el-table-column prop="terminal" label="终端" header-align="center" align="center" width="100px" />
<el-table-column prop="operateDes" header-align="center" align="center" label="操作" />
</el-table>
<el-pagination
:current-page="currentPage"
:page-size="100"
layout="total, prev, pager, next, jumper"
:total="totalNum"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</el-dialog>
</template>
<script>
import {deviceType} from '@/scripts/cmdPlugin/Config';
export default {
name: 'LogDetail',
data() {
return {
currentPage: 1,
show: false,
level: '',
startTime: '',
endTime: '',
totalData: [{data: '2020-12-02 18:00:00', operateName: 'admin', terminal: '维护HMI', operateDes: '对联锁区“太平桥联锁区”执行命令“交出控制”'}],
tableData: [{data: '2020-12-02 18:00:00', operateName: 'admin', terminal: '维护HMI', operateDes: '对联锁区“太平桥联锁区”执行命令“交出控制”'}],
totalNum: 0
};
},
computed:{
},
methods:{
doShow(level) {
this.show = true;
this.level = level;
this.queryData();
},
handleClose() {
this.level = '';
this.startTime = '';
this.endTime = '';
this.show = false;
},
queryData() {
// const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
// getAlarmList(this.$route.query.group, params).then(resp => {
// this.totalData = resp.data;
// });
},
handleDeviceType(code) {
const device = this.$store.getters['map/getDeviceByCode'](code);
return deviceType[device.type];
},
handleDeviceName(code) {
const device = this.$store.getters['map/getDeviceByCode'](code);
return device.name;
},
handleSizeChange() {
// this.handleSizeChange
},
handleCurrentChange() {
// this.handleCurrentChange
}
}
};
</script>
<style scoped>
/deep/ .el-dialog .el-input {
border: 0 !important;
}
</style>

View File

@ -105,7 +105,7 @@
</el-col>
<el-col :span="4">
<el-button type="primary" size="mini" @click="query">查询</el-button>
<el-button type="primary" class="uploadDemo" size="mini" style="margin-top: 10px;">
<el-button :loading="loadingStudentInfo" type="primary" class="uploadDemo" size="mini" style="margin-top: 10px;">
<input
id="importResults"
ref="files"
@ -190,6 +190,7 @@ export default {
};
return {
loading: false,
loadingStudentInfo: false,
classList: [],
localLessonList: [],
centerLessonList: [],
@ -446,17 +447,21 @@ export default {
}
studentData.students = students;
}
that.loadingStudentInfo = true;
importStudentResults(ProjectCode[that.project], studentData).then(resp => {
that.classList = [];
getProjectClassList(ProjectCode[that.project]).then(respon => {
that.classList = respon.data;
that.loadingStudentInfo = false;
}).catch(() =>{
that.$message.error('获取班级数据失败!');
that.loadingStudentInfo = false;
});
that.$message.success('学生信息导入成功!');
}).catch(() => {
that.$message.error('学生信息导入失败!');
that.loadingStudentInfo = false;
});
} catch (error) {
that.$message.warning(`解析成绩单失败:${error}`);