Commit 9b7209ed by huangqy

111

parent a728330c
...@@ -72,6 +72,8 @@ ...@@ -72,6 +72,8 @@
<span>时段:{{ thing.startTime + '-' + thing.endTime }}</span> <span>时段:{{ thing.startTime + '-' + thing.endTime }}</span>
<span>课程:{{ thing.courseName }}</span> <span>课程:{{ thing.courseName }}</span>
</div> </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>
</template> </template>
<div class="thing_item2" v-show="!period.voList.map(i=> i.classTime).includes(month.date)" @click="handleDetail(month)"/> <div class="thing_item2" v-show="!period.voList.map(i=> i.classTime).includes(month.date)" @click="handleDetail(month)"/>
</div> </div>
...@@ -89,7 +91,6 @@ ...@@ -89,7 +91,6 @@
:append-to-body="true" :append-to-body="true"
:title="title" :title="title"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
@close="dialogClose()"
width="800px" width="800px"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
...@@ -147,7 +148,7 @@ ...@@ -147,7 +148,7 @@
<a-button type="primary" ghost @click="addCourse()" icon="plus">加课</a-button> <a-button type="primary" ghost @click="addCourse()" icon="plus">加课</a-button>
<el-row :gutter="40" style="margin-top: 30px;"> <el-row :gutter="40" style="margin-top: 30px;">
<el-col :span="6"> <el-col :span="6">
<el-table :data="sbData" highlight-current-row @row-click="selectSb"> <el-table :data="sbData" ref="sbTable" highlight-current-row @row-click="selectSb">
<el-table-column prop="weekName" label="日期" align="center"></el-table-column> <el-table-column prop="weekName" label="日期" align="center"></el-table-column>
</el-table> </el-table>
</el-col> </el-col>
...@@ -160,8 +161,8 @@ ...@@ -160,8 +161,8 @@
</el-col> </el-col>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible1 = false" type="danger" size="medium"> </el-button> <a-button @click="dialogVisible1 = false" type="danger" ghost style="margin-right: 12px;"> </a-button>
<el-button type="primary" @click="subFormData1()" size="medium"> </el-button> <a-button type="primary" @click="subFormData1()" ghost> </a-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -428,6 +429,12 @@ export default { ...@@ -428,6 +429,12 @@ export default {
} }
}, },
yjpk() { yjpk() {
const that = this
setTimeout(() => {
this.$refs.sbTable.setCurrentRow(this.sbData[0])
this.selectWeek = this.sbData[0]
}, 100)
//
this.dialogVisible1 = true this.dialogVisible1 = true
}, },
addCourse() { addCourse() {
...@@ -449,7 +456,6 @@ export default { ...@@ -449,7 +456,6 @@ export default {
}, },
selectSb(row) { selectSb(row) {
this.selectWeek = row this.selectWeek = row
console.log(row)
// this.formData3.className = this.classList.find(i => i.classCode == this.formData3.classCode).className // this.formData3.className = this.classList.find(i => i.classCode == this.formData3.classCode).className
}, },
subFormData1() { subFormData1() {
...@@ -458,6 +464,27 @@ export default { ...@@ -458,6 +464,27 @@ export default {
if (!res.data) return this.$message.error(res.message) if (!res.data) return this.$message.error(res.message)
this.$message.success(res.message) this.$message.success(res.message)
this.dialogVisible1 = false this.dialogVisible1 = false
this.initData()
})
},
closeClass(id) {
this.$confirm('是否删除该课程?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success'
}).then(async () => {
this.formData = {
id: id,
classTime:null,
classCode:"",
courseCode:"",
lessonId:""
}
const { data: res } = await this.$axios.post('/classCourse/update', this.formData)
if (!res.data) return this.$message.error(res.message)
this.$message.success(res.message)
this.dialogVisible = false
this.initData()
}) })
}, },
subFormData() { subFormData() {
...@@ -652,8 +679,9 @@ $borderCoder: #EAEDF2; ...@@ -652,8 +679,9 @@ $borderCoder: #EAEDF2;
.things { .things {
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; // flex-direction: column;
align-items: center; align-items: center;
justify-content: center;
border-left: 1px solid $borderCoder; border-left: 1px solid $borderCoder;
border-bottom: 1px solid $borderCoder; border-bottom: 1px solid $borderCoder;
box-sizing: border-box; box-sizing: border-box;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论