Commit 9b7209ed by huangqy

111

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