| | |
| | | <template #default="scope"> |
| | | <div v-if="data.isAdmin"> |
| | | <div v-if="scope.row.state !== 3"> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="primary" v-if="scope.row.state == 1" @click="openApprove(scope.row)">审核</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="primary" @click="toChapters(scope.row)">章节</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </div> |
| | |
| | | <div v-else-if="!data.isAdmin"> |
| | | <div v-if="scope.row.state !== 2"> |
| | | <el-button link type="primary" v-if="scope.row.state == 0 || scope.row.state == 3" @click="submitApprove(scope.row)">提交审核</el-button> |
| | | <el-button link type="primary" v-if="scope.row.state == 1" @click="submitApprove(scope.row)">取消审批</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="primary" @click="toChapters(scope.row)">章节</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | <el-button link type="primary" v-if="scope.row.state == 1" @click="submitApprove(scope.row)">取消审核</el-button> |
| | | <el-button link type="primary" v-if="scope.row.state !== 1" @click="openDialog('edit',scope.row)" >编辑</el-button> |
| | | <el-button link type="primary" v-if="scope.row.state !== 1" @click="toChapters(scope.row)">章节</el-button> |
| | | <el-button link type="danger" v-if="scope.row.state !== 1" @click="handleDelete(scope.row)">删除</el-button> |
| | | </div> |
| | | <div v-else>--</div> |
| | | |
| | |
| | | } |
| | | const submitApprove = async (val) => { |
| | | let param = { |
| | | companyId: val.companyId, |
| | | id: val.id, |
| | | state: null |
| | | } |