Commit 4b50705c by huangqy

11

parent 00d6f25f
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -13,13 +13,14 @@
"core-js": "^3.6.5",
"echarts": "^4.9.0",
"element-ui": "^2.15.6",
"lodash": "^4.17.21",
"file-saver": "^2.0.5",
"lodash": "^4.17.21",
"nprogress": "^0.2.0",
"ol": "^7.1.0",
"script-loader": "^0.7.2",
"swiper": "^6.3.5",
"timetables": "^1.1.0",
"video.js": "^8.10.0",
"vue": "^2.6.11",
"vue-awesome-swiper": "^3.1.3",
"vue-router": "^3.2.0",
......
......@@ -242,9 +242,9 @@ i {
margin: 10px 0;
}
.el-divider--horizontal {
/* .el-divider--horizontal {
margin: 5px 0 !important;
}
} */
/* 分割线设置 */
.el-divider .el-divider__text {
font-size: 16px;
......
<template>
<el-dialog :append-to-body="true" title="上传" :visible.sync="addFlag" width="400px" @close="addClose()" :close-on-click-modal="false">
<!-- 上传区域 -->
<el-upload class="upload-demo" drag ref="upload" :action="actionUrl" :on-success="uploadSuccess" :auto-upload="false" :data="{req: JSON.stringify(formData)}" :multiple="false">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div slot="tip" class="el-upload__tip">只能上传Excel文件,其类型文件会上传失败</div>
</el-upload>
<el-divider style="margin-top: 20px">补充信息</el-divider>
<el-form :model="formData" ref="fromRef" size="medium">
<el-form-item label="专业名称 :">
<el-select clearable filterable placeholder="请选择专业名称" v-model="formData.majorCode" style="width: 100%" @change="changeMajor">
<el-option v-for="item in majorList" :key="item.id" :label="item.majorName" :value="item.majorCode"></el-option>
</el-select>
</el-form-item>
<el-form-item label="所属系别 :">
<el-select clearable filterable placeholder="请选择所属系别" v-model="formData.collegeId" style="width: 100%" @change="changeCollege">
<el-option v-for="item in collegeList" :key="item.id" :label="item.collegeName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<!-- 按钮区域 -->
<span slot="footer" class="dialog-footer">
<el-button @click="addFlag = false">取 消</el-button>
<el-button type="primary" @click="addClick()">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data() {
return {
formData: {},
upData: {},
majorList: [],
collegeList: [],
addFlag: false,
// 文件上传地址
actionUrl: window._CONFIG['domianURL'] + '/course/readExcel',
}
},
methods: {
show() {
this.initCollege()
this.initMajor()
this.addFlag = true
},
async initMajor() {
const { data: res } = await this.$axios.post('/major/getPage', {pageNo:1, pageSize: 999})
if (res.code !== 99200) return this.$message(res.message)
this.majorList = res.data.records
},
async initCollege() {
const { data: res } = await this.$axios.post('/college/getPage', {pageNo:1, pageSize: 999})
if (res.code !== 99200) return this.$message(res.message)
this.collegeList = res.data.records
},
changeMajor() {
this.formData.majorName = this.majorList.find(i => i.majorCode == this.formData.majorCode).majorName
},
changeCollege() {
this.formData.collegeName = this.collegeList.find(i => i.id == this.formData.collegeId).collegeName
},
uploadSuccess (response, file, fileList) {
if (response.code !== 99200) {
this.$message.error(`文件: ${file.name}出错 错误信息: ${response.message} 请检查文件是否为json类型,或已上传`)
} else {
this.$refs.upload.clearFiles()
this.$message.success(response.message)
}
},
addClose() {
this.formData = {}
this.$refs.upload.clearFiles()
this.$emit('ok')
},
async addClick () {
this.$refs.upload.submit()
this.addFlag = false
},
}
}
</script>
<style>
.el-divider--vertical {
margin: 0px !important;
}
</style>
\ No newline at end of file
......@@ -4,25 +4,27 @@
<el-card :style="'height:' + (height - 60) + 'px;overflow-y: auto;position:relative;'">
<div class="course-week">
<div class="week-top">
<div class="btn_wrap">
<div class="btn_wrap" style="margin-left: 50px;">
<el-tooltip class="item" effect="dark" content="上周" placement="top">
<span @click="getLastWeek"><i class="el-icon-d-arrow-left"></i>上周</span>
<a-button type="primary" ghost @click="getLastWeek"><i class="el-icon-d-arrow-left"></i>上周</a-button>
</el-tooltip>
<span @click="getCurWeek">本周</span>
<a-button type="primary" ghost @click="getCurWeek" style="margin-left: 10px;">本周</a-button>
<el-tooltip class="item" effect="dark" content="下周" placement="top">
<span @click="getNextWeek">下周<i class="el-icon-d-arrow-right"></i></span>
<a-button type="primary" ghost @click="getNextWeek" style="margin-left: 10px;">下周<i class="el-icon-d-arrow-right"></i></a-button>
</el-tooltip>
<span @click="yjpk">一键排课 </span>
<a-button @click="yjpk" type="primary" ghost style="margin-left: 10px;">一键排课 </a-button>
</div>
<span class="todayDate"> {{ todayDate }}</span>
<div class="chooseMonth">
<a-button type="primary" icon="upload" ghost @click="upload" style="margin-top: 5px;">导入</a-button>
<span style="margin-left: 10px;line-height: 35px;font-size: 16px;">班级选择:</span>
<el-select
filterable
size="mini"
placeholder="请选择班级编号"
v-model="searchData.classCode"
@change="initData"
style="margin-bottom: 10px;width: 240px;"
>
<el-option v-for="item in classList" :key="item.id" :label="item.className +'(' + item.classCode +')'" :value="item.classCode"></el-option>
</el-select>
......@@ -71,6 +73,7 @@
>
<span>时段:{{ thing.startTime + '-' + thing.endTime }}</span>
<span>课程:{{ thing.courseName }}</span>
<span>主讲教员: {{ thing.speaker }}</span>
</div>
<button type="button" aria-label="Close" v-if="thing.classTime===month.date" @click="closeClass(thing.id)"
style="margin-top: -75px;margin-right: -10px;padding: 0;background: 0 0;border: none;outline: 0;cursor: pointer;font-size: 1px;color: #000;"><i class="el-dialog__close el-icon el-icon-close"></i></button>
......@@ -218,6 +221,7 @@
</el-card>
<upload ref="up" @ok="initClass"></upload>
</div>
</div>
</template>
......@@ -226,8 +230,10 @@
<script>
import MyTools from '../../utils/MyTools'
import upload from './modules/upload.vue'
export default {
name: "courseWeek",
components: {upload},
data() {
return {
formData: {},
......@@ -307,6 +313,9 @@ export default {
this.initClass()
},
methods: {
upload() {
this.$refs.up.show()
},
/**
* 获取 时间
* @param time
......@@ -554,7 +563,7 @@ $borderCoder: #EAEDF2;
.chooseMonth {
display: flex;
justify-content: flex-end;
width: 11.8%;
width: 24.8%;
div {
flex: 1;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,7 +5,7 @@ function resolve (dir) {
module.exports = {
publicPath: '/',
devServer: {
host: '192.168.3.101',
host: '192.168.3.129',
port: 2233,
headers: {
//因为qiankun内部请求都是fetch来请求资源,所以子应用必须允许跨域
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论