|
|
@@ -56,18 +56,18 @@
|
|
|
>新增
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
-<!-- <el-col :span="1.5">-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="success"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- icon="el-icon-edit"-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :disabled="multiple"-->
|
|
|
-<!-- @click="handleUpdate"-->
|
|
|
-<!-- v-hasPermi="['courseFinishTemp:course:edit']"-->
|
|
|
-<!-- >修改状态-->
|
|
|
-<!-- </el-button>-->
|
|
|
-<!-- </el-col>-->
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleUpdateStatusBatch"
|
|
|
+ v-hasPermi="['courseFinishTemp:course:edit']"
|
|
|
+ >批量修改状态
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="danger"
|
|
|
@@ -578,6 +578,25 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="批量修改状态" :visible.sync="batchOpen" width="400px" append-to-body>
|
|
|
+ <el-form ref="form" :model="statusForm">
|
|
|
+ <el-form-item label="状态">
|
|
|
+ <el-radio-group v-model="statusForm.status">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in statusOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="parseInt(dict.dictValue)"
|
|
|
+ >{{ dict.dictLabel }}
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" v-if="formType==1">
|
|
|
+ <el-button type="primary" @click="submitFormBatchStatus" :loading="submitFormBatchStatusLoading">确 定</el-button>
|
|
|
+ <el-button @click="batchOpen = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog :title="videoNumOptions.title" :visible.sync="videoNumOptions.open" width="1500px" append-to-body>
|
|
|
<userVideo ref="QwUserVideo" @videoResult="qwUserVideoResult"></userVideo>
|
|
|
</el-dialog>
|
|
|
@@ -591,7 +610,8 @@ import {
|
|
|
exportCourseFinishTemp,
|
|
|
getCourseFinishTemp,
|
|
|
listCourseFinishTemp,
|
|
|
- updateCourseFinishTemp
|
|
|
+ updateCourseFinishTemp,
|
|
|
+ updateStatusBatch
|
|
|
} from '@/api/course/courseFinishTemp'
|
|
|
import { getUserList } from '@/api/company/companyUser'
|
|
|
import { courseList, videoList } from '@/api/qw/sop'
|
|
|
@@ -649,6 +669,8 @@ export default {
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+ batchOpen:false,
|
|
|
+ submitFormBatchStatusLoading:false,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
@@ -675,6 +697,9 @@ export default {
|
|
|
videoIdSet: null,
|
|
|
courseIdSet: null,
|
|
|
},
|
|
|
+ statusForm:{
|
|
|
+ status:null
|
|
|
+ },
|
|
|
// 表单校验
|
|
|
rules: {}
|
|
|
};
|
|
|
@@ -980,6 +1005,15 @@ export default {
|
|
|
|
|
|
});
|
|
|
},
|
|
|
+ // 批量修改状态
|
|
|
+ handleUpdateStatusBatch(){
|
|
|
+ console.log(this.ids);
|
|
|
+ if(this.ids == null || this.ids == undefined || this.ids.length == 0 ){
|
|
|
+ return this.$message.error("请选择数据")
|
|
|
+ }
|
|
|
+ this.statusForm.status = null;
|
|
|
+ this.batchOpen = true;
|
|
|
+ },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
@@ -1015,6 +1049,30 @@ export default {
|
|
|
this.formType = 1;
|
|
|
});
|
|
|
},
|
|
|
+ submitFormBatchStatus(){
|
|
|
+ if(this.statusForm.status==null){
|
|
|
+ return this.$message.error("状态不能为空,请选择状态")
|
|
|
+ }
|
|
|
+ if(this.ids == null || this.ids == undefined || this.ids.length == 0 ){
|
|
|
+ return this.$message.error("请选择数据")
|
|
|
+ }
|
|
|
+ let _this = this;
|
|
|
+ _this.submitFormBatchStatusLoading = true;
|
|
|
+ let param ={
|
|
|
+ ids:_this.ids,
|
|
|
+ status:_this.statusForm.status
|
|
|
+ }
|
|
|
+ updateStatusBatch(param).then(res=>{
|
|
|
+ _this.submitFormBatchStatusLoading = false;
|
|
|
+ _this.msgSuccess("修改成功");
|
|
|
+ _this.batchOpen = false;
|
|
|
+ _this.getList();
|
|
|
+ }).catch(res=>{
|
|
|
+ console.log(res);
|
|
|
+ _this.submitFormBatchStatusLoading = false;
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|