Browse Source

兽医PC端视频培训修改

master
王妍洁 1 week ago
parent
commit
7747ee302b
  1. 8
      chenhai-ui/src/api/vet/training.js
  2. 58
      chenhai-ui/src/views/syd.vue
  3. 50
      chenhai-ui/src/views/vet/training/index.vue

8
chenhai-ui/src/api/vet/training.js

@ -152,3 +152,11 @@ export function updateVideoInfo(videoId, data) {
data: data data: data
}) })
} }
// /vet/training/resubmit-audit/{videoId} 重新提交审核
export function resubmitAudit(videoId) {
return request({
url: `/vet/training/resubmit-audit/${videoId}`,
method: 'post'
})
}

58
chenhai-ui/src/views/syd.vue

@ -1,63 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 统计--> <!-- 统计-->
<!-- <div>-->
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="6">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :precision="2"-->
<!-- :value="value2"-->
<!-- :title="title"-->
<!-- ></el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <div>-->
<!-- <el-statistic title="男女比">-->
<!-- <template slot="formatter">-->
<!-- 456/2-->
<!-- </template>-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :precision="2"-->
<!-- decimal-separator="."-->
<!-- :value="value1"-->
<!-- :title="title"-->
<!-- >-->
<!-- <template slot="prefix">-->
<!-- <i class="el-icon-s-flag" style="color: red"></i>-->
<!-- </template>-->
<!-- <template slot="suffix">-->
<!-- <i class="el-icon-s-flag" style="color: blue"></i>-->
<!-- </template>-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <div>-->
<!-- <el-statistic :value="like ? 521 : 520" title="Feedback">-->
<!-- <template slot="suffix">-->
<!-- <span @click="like = !like" class="like">-->
<!-- <i-->
<!-- class="el-icon-star-on"-->
<!-- style="color:red"-->
<!-- v-show="!!like"-->
<!-- ></i>-->
<!-- <i class="el-icon-star-off" v-show="!like"></i>-->
<!-- </span>-->
<!-- </template>-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </div>-->
<!-- 消息通知 --> <!-- 消息通知 -->
<div class="info-container"> <div class="info-container">

50
chenhai-ui/src/views/vet/training/index.vue

@ -157,7 +157,7 @@
style="color: #dab708" style="color: #dab708"
@click="handleSubmitAudit(scope.row.id)" @click="handleSubmitAudit(scope.row.id)"
v-hasPermi="['vet:training:submit']" v-hasPermi="['vet:training:submit']"
v-if="scope.row.status === '0' && (scope.row.auditStatus === '3' || scope.row.auditStatus === '0')"
v-if="scope.row.status === '0' && scope.row.auditStatus === '0'"
class="info-btn submit-btn" class="info-btn submit-btn"
>提交审核</el-button> >提交审核</el-button>
@ -219,6 +219,19 @@
class="info-btn cancel-btn" class="info-btn cancel-btn"
>取消审核</el-button> >取消审核</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-s-promotion"
style="color: #c108af"
@click="handleResubmitAudit(scope.row)"
class="info-btn resubmit-btn"
v-hasPermi="['vet:training:submit']"
v-if="scope.row.status === '0' && scope.row.auditStatus === '3'"
>
重新提交
</el-button>
<!-- 删除按钮 --> <!-- 删除按钮 -->
<el-button <el-button
size="mini" size="mini"
@ -379,7 +392,7 @@
</template> </template>
<script> <script>
import { listTraining, getTraining, delTraining, addTraining, updateTraining, uploadVideo } from "@/api/vet/training"
import { listTraining, getTraining, delTraining, addTraining, updateTraining, uploadVideo, resubmitAudit} from "@/api/vet/training"
import { import {
submitForAudit, submitForAudit,
cancelAudit, cancelAudit,
@ -1007,6 +1020,34 @@ export default {
} }
}, },
// handleResubmitAudit
handleResubmitAudit(row) {
const id = row.id || this.ids[0];
if (!id) {
this.$modal.msgWarning('请选择需要重新提交审核的视频');
return;
}
this.$confirm('是否确认重新提交审核?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
const response = await resubmitAudit(id);
if (response.code === 200) {
this.$modal.msgSuccess("重新提交审核成功");
this.getList();
} else {
this.$modal.msgError(response.msg || "重新提交审核失败");
}
} catch (error) {
console.error('重新提交审核失败:', error);
this.$modal.msgError('重新提交审核失败:' + (error.message || '网络异常'));
}
}).catch(() => {
});
},
/** ============ 其他方法 ============ */ /** ============ 其他方法 ============ */
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@ -1196,6 +1237,11 @@ export default {
transform: translateY(-1px); transform: translateY(-1px);
} }
.resubmit-btn:hover {
background-color: rgb(248, 232, 250);
transform: translateY(-1px);
}
// / // /
::v-deep .el-dialog { ::v-deep .el-dialog {
border-radius: 12px; border-radius: 12px;

Loading…
Cancel
Save