打卡新写 配置文件更新

This commit is contained in:
@fawn-nine
2023-10-10 17:03:28 +08:00
parent 4288b2a892
commit 783f4ea806
8 changed files with 160 additions and 137 deletions

View File

@@ -4,7 +4,7 @@
<el-form-item>
<!-- <el-button @click="getDataList()">查询</el-button> -->
<el-button v-if="isAuth('book:bookchapter:save')" type="primary" @click="addOrUpdateHandle()">增加打卡任务</el-button>
<el-button v-if="isAuth('book:bookchapter:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
<!-- <el-button v-if="isAuth('book:bookchapter:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button> -->
<!-- <router-link :to="{path: 'book-book' , query:{ upPageIndex } }">
<el-button type="primary">返回上一级</el-button>
</router-link> -->
@@ -35,12 +35,12 @@
</el-table-column>
-->
<el-table-column
prop="days"
prop="day"
align="center"
label="第N天">
</el-table-column>
<el-table-column
prop="heading"
prop="title"
label="主题">
</el-table-column>
@@ -52,12 +52,12 @@
label="内容">
</el-table-column>
<el-table-column
prop="images"
prop="image"
header-align="center"
align="center"
label="卡片">
<template slot-scope="scope">
<img v-if="scope.row.images != ''" :src="scope.row.images" width="100px" />
<img v-if="scope.row.image != ''" :src="scope.row.image" width="100px" />
</template>
</el-table-column>
<el-table-column
@@ -148,13 +148,13 @@
this.dataListLoading = true
this.$http({
// url: this.$http.adornUrl('/forum/articles/list'),
url: this.$http.adornUrl('/book/task/list'),
url: this.$http.adornUrl('/book/clock/getBookClocks'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
//'key': this.dataForm.key,
'bookid' : this.bookid
'bookId' : this.bookid
})
// data: {
// 'page': this.pageIndex,
@@ -164,8 +164,8 @@
// }
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.page.records
this.totalPage = data.page.pages
} else {
this.dataList = []
this.totalPage = 0
@@ -197,18 +197,23 @@
},
// 删除
deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
// var ids = id ? [id] : this.dataListSelections.map(item => {
// return item.id
// })
this.$confirm(`确定对[id=${id}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/book/task/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
url: this.$http.adornUrl('/book/clock/delBookClock'),
method: 'get',
params: this.$http.adornParams({
'entryId': id
}),
// data: this.$http.adornData({
// 'entryId': id
// })
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({