提交 d6dfad2a 编写于 作者: guangjun.yang's avatar guangjun.yang

内部管理员审核

上级 98299d6d
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
class="bg-uploader" class="bg-uploader"
action="#" action="#"
:show-file-list="false" :show-file-list="false"
:before-upload="beforeUpload1" :before-upload="beforeUploadListPic"
:disabled="disabled" :disabled="disabled"
> >
<div class="bg-img-wrapper"> <div class="bg-img-wrapper">
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
class="bg-uploader" class="bg-uploader"
action="#" action="#"
:show-file-list="false" :show-file-list="false"
:before-upload="beforeUpload2" :before-upload="beforeUploadListPic"
:disabled="disabled" :disabled="disabled"
> >
<div class="bg-img-wrapper"> <div class="bg-img-wrapper">
......
<template>
<!-- 拒绝原因 暂时不做 -->
<el-dialog
title="拒绝原因"
@close="hideAddEditForm"
:visible.sync="addEditVisible"
:close-on-click-modal="false"
width="600px"
center>
<el-form ref="addEditForm" :rules="rules" :model="addEditForm" label-width="120px">
<el-form-item label="拒绝原因:">
<el-radio-group v-model="addEditForm.doctorId">
<div style="padding-top: 12px;">
<el-radio label="含有政治类、医疗健康、社会事件类不实信息" value="1"></el-radio>
</div>
<div style="padding-top: 16px;">
<el-radio label="含有欺诈,色情,诱导、违法犯罪非法字符" value="2"></el-radio>
</div>
<div style="padding-top: 16px;">
<el-radio label="其他" value="3"></el-radio>
</div>
</el-radio-group>
<el-input type="textarea" v-model="addEditForm.desc" maxlength="25" style="width: 310px;margin-top: 10px;"></el-input>
<span class="word-num">{{(addEditForm.desc).replace(/\s+/g,"").length}}/25</span>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="hideAddEditForm">取 消</el-button>
<el-button type="primary" @click="submitForm('addEditForm')">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data() {
return {
};
},
props: {
dialogVisible: {
type: Boolean,
default: false
}
},
computed: {
},
mounted() {
},
methods: {
save() {
this.dialogVisible = false;
}
}
};
</script>
<style scoped lang="scss">
</style>
...@@ -2,31 +2,33 @@ ...@@ -2,31 +2,33 @@
<!-- 拒绝原因 暂时不做 --> <!-- 拒绝原因 暂时不做 -->
<el-dialog <el-dialog
title="拒绝原因" title="拒绝原因"
@close="hideAddEditForm" :visible="dialogVisible"
:visible.sync="addEditVisible" @close="hideAuditForm"
:close-on-click-modal="false"
width="600px" width="600px"
center> center>
<el-form ref="addEditForm" :rules="rules" :model="addEditForm" label-width="120px"> <el-form ref="auditForm" :model="auditForm" label-width="120px">
<el-form-item label="拒绝原因:"> <el-form-item label="拒绝原因:">
<el-radio-group v-model="addEditForm.doctorId"> <el-radio-group v-model="auditForm.label">
<div style="padding-top: 12px;"> <div style="padding-top: 12px;">
<el-radio label="含有政治类、医疗健康、社会事件类不实信息" value="1"></el-radio> <el-radio label="含有政治类、医疗健康、社会事件类不实信息"></el-radio>
</div> </div>
<div style="padding-top: 16px;"> <div style="padding-top: 16px;">
<el-radio label="含有欺诈,色情,诱导、违法犯罪非法字符" value="2"></el-radio> <el-radio label="含有欺诈,色情,诱导、违法犯罪非法字符"></el-radio>
</div> </div>
<div style="padding-top: 16px;"> <div style="padding-top: 16px;">
<el-radio label="其他" value="3"></el-radio> <el-radio label="其他"></el-radio>
</div> </div>
</el-radio-group> </el-radio-group>
<el-input type="textarea" v-model="addEditForm.desc" maxlength="25" style="width: 310px;margin-top: 10px;"></el-input> <div v-if="auditForm.label == '其他'">
<span class="word-num">{{(addEditForm.desc).replace(/\s+/g,"").length}}/25</span> <el-input type="textarea" v-model="auditForm.desc" maxlength="25" style="width: 310px;margin-top: 10px;"></el-input>
<span class="word-num">{{(auditForm.desc).replace(/\s+/g,"").length}}/25</span>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="hideAddEditForm">取 消</el-button> <el-button @click="hideAuditForm">取 消</el-button>
<el-button type="primary" @click="submitForm('addEditForm')">确 定</el-button> <el-button type="primary" @click="submitForm()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
...@@ -34,24 +36,55 @@ ...@@ -34,24 +36,55 @@
export default { export default {
data() { data() {
return { return {
auditForm: {
label: '',
desc: ''
}
}; };
}, },
props: { props: {
dialogVisible: { dialogVisible: {
type: Boolean, type: Boolean,
default: false default: false
},
refuseReasonList: {
type: Array,
default: () => []
}
},
watch: {
dialogVisible(newVal) {
if(newVal) {
this.auditForm.label = '';
this.auditForm.desc = '';
}
} }
}, },
computed: { computed: {
}, },
mounted() { mounted() {
console.log(2222);
}, },
methods: { methods: {
save() { hideAuditForm() {
this.dialogVisible = false; this.$emit('close');
},
submitForm() {
let cMsg = this.auditForm.label;
if(cMsg == '其他') {
cMsg = this.auditForm.desc;
}
// if(!cMsg) {
// this.$message({
// type: "warning",
// message: '请填写拒绝原因或直接点击取消按钮'
// });
// return;
// }
// refuseReasonList
this.hideAuditForm();
this.$emit('checkInfo', cMsg);
} }
} }
}; };
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</ul> </ul>
<div v-if="courseList && courseList.list && courseList.list.length" class="list-wrapper"> <div v-if="courseList && courseList.list && courseList.list.length" class="list-wrapper">
<ul class="list"> <ul class="list">
<li class="course create-btn" @click="showOrgCourse(0)"> <li v-show="kind == 1" class="course create-btn" @click="showOrgCourse(0)">
<img src="../../../assets/image/phrase3/plus-icon.png"> <img src="../../../assets/image/phrase3/plus-icon.png">
<span>创建机构课程</span> <span>创建机构课程</span>
</li> </li>
...@@ -146,14 +146,25 @@ export default { ...@@ -146,14 +146,25 @@ export default {
// 选择当前分页个数 // 选择当前分页个数
handleSizeChange(val) { handleSizeChange(val) {
if(this.kind == 0) {
this.searchParam.pageSize = val; this.searchParam.pageSize = val;
this.setSearchParam(this.searchParam); this.setSearchParam(this.searchParam);
} else {
this.searchParamOrg.pageSize = val;
this.setSearchParamOrg(this.searchParamOrg);
}
}, },
// 选择当前分页 // 选择当前分页
handleCurrentChange(val) { handleCurrentChange(val) {
console.log();
if(this.kind == 0) {
this.searchParam.pageNo = val; this.searchParam.pageNo = val;
this.setSearchParam(this.searchParam); this.setSearchParam(this.searchParam);
} else {
this.searchParamOrg.pageNo = val;
this.setSearchParamOrg(this.searchParamOrg);
}
}, },
// 选择课程(并要处理过滤,删除等) // 选择课程(并要处理过滤,删除等)
......
...@@ -54,7 +54,7 @@ service.interceptors.request.use(config => { ...@@ -54,7 +54,7 @@ service.interceptors.request.use(config => {
} }
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境 if( process.env.BUILD_ENV == "development" ){ // 本地开发环境
// console.log('环境变量>>>> ', process.env.BUILD_ENV); // console.log('环境变量>>>> ', process.env.BUILD_ENV);
config.headers['token'] = '4C431D1F183E43EBA7AD7EC094753882'; config.headers['token'] = '377D063C4A8448B2847E05074648E77F';
// config.headers['token'] = localStorage.getItem('storageToken') // config.headers['token'] = localStorage.getItem('storageToken')
}else{ }else{
config.headers['token'] = localStorage.getItem('storageToken') config.headers['token'] = localStorage.getItem('storageToken')
......
<template>
<div class="review-access-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="edit-course-wrapper review-access screenSet" id="screenSet">
<div class="course-content">
<el-form
ref="formDataRef"
:model="formData"
:rules="rules"
label-width="120px"
class="basic-form"
>
<el-form-item label="课程名称:" prop="courseName" class="valid-msg">
<el-col :span="20">
<el-input
size="small"
v-model="formData.courseName"
placeholder="请输入课程名称"
style="width: 360px"
maxlength="25"
:disabled="disabled"
></el-input>
<span class="word-num">
{{(formData.courseName || '').replace(/\s+/g,"").length}}/25
<span class="edit-wrapper" @click="auditField(formData, 'courseNameCheck')">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span>
</span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span>
<span class="cancle">X</span>
</div>
</el-col>
</el-form-item>
<el-form-item label="学科分类:" prop="subjectIdList" class="valid-msg">
<el-col :span="18">
<el-cascader
style="width: 360px"
v-model="formData.subjectIdList"
:options="labelOptions"
:props="{ value: 'id', label: 'name', children: 'subList'}"
:disabled="disabled"
>
</el-cascader>
</el-col>
</el-form-item>
<el-form-item label="开放范围:" prop="shareType" class="valid-msg">
<el-radio-group v-model="formData.shareType">
<el-radio :label="1">机构共享</el-radio>
</el-radio-group>
</el-form-item>
<div class="basic-item-icon" style="margin-top: 0; padding-top: 0;">
<ul v-show="formData.courseCustomChapterModels[0].courseCustomLectureModelList.length" class="custom-list">
<li v-for="(lecture, index) in formData.courseCustomChapterModels[0].courseCustomLectureModelList" :key="index" class="valid-msg">
<ul class="video">
<li class="video-wapper">
<span class="title">视频{{index + 1}}</span>
<img src="../../assets/image/phrase3/icon-pin.png" />
<span class="name" @click="previewVideoAction(lecture)">{{lecture.resourceModel && lecture.resourceModel.name}}</span>
</li>
</ul>
<div class="video-name">
<span class="title">
<span >*</span>
<span class="video-title">视频名称</span>
</span>
<el-input
size="small"
v-model="lecture.name"
placeholder="请输入课程名称"
style="width: 380px"
maxlength="25"
:disabled="disabled"
></el-input>
<span class="word-num">
{{(lecture.name || '').replace(/\s+/g,"").length}}/25
<span class="edit-wrapper">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span>
</span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error-video">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span>
<span class="cancle">X</span>
</div>
</div>
</li>
<span v-show="needShowUploadProcess" class="upload-process" :style="{'width': (uploadProgress/100 * 340) + 'px'}"></span>
</ul>
</div>
<div class="other-content valid-msg">
<div class="tips">注:以下信息为非必填项,您也可以根据实际情况修改</div>
<div class="basic-item-icon">
<!-- <span class="require">*</span> -->
<el-form-item label="课程封面:">
<el-upload
v-model="formData.courseIntroImage"
class="bg-uploader"
action="#"
:show-file-list="false"
:disabled="disabled"
>
<div class="bg-img-wrapper">
<img
v-if="formData.courseIntroImage"
@mouseover.stop="imgMouseOver=true"
:src="formData.courseIntroImage"
class="bg-img"
/>
<img
v-if="!formData.courseIntroImage"
class="bg-img"
src="../../assets/image/small.png"
/>
</div>
</el-upload>
<div class="limit-text">尺寸:750*420,只支持jpeg格式</div>
</el-form-item>
<p class="upload-message" v-if="uploadImgMessage">请选择列表图片</p>
</div>
<el-form-item label="课程难度:">
<el-radio-group v-model="formData.difficultyLevel" :disabled="disabled">
<el-radio :label="1">初级</el-radio>
<el-radio :label="2">中级</el-radio>
<el-radio :label="3">高级</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="讲师名称:" class="valid-msg">
<el-col :span="18">
<el-input
size="small"
v-model="formData.courseCustomDoctorModels[0].courseDoctorName"
placeholder="请输入讲师名称"
style="width: 360px"
maxlength="25"
@focus="isShowDoctorList=true"
@input="filterDoctorName"
@blur="doctorNameInputBlur"
:disabled="disabled"
></el-input>
<ul v-show="isShowDoctorList" class="doctor-select-list">
<li
v-for="(item, index) in doctorNameList"
:key="index"
@click="selectDoctor(item.courseDoctorName, index)"
:class="{'doctor-selected': item.seleted}"
>
<span v-show="item.show">{{item.courseDoctorName || '测试名'}}</span>
</li>
</ul>
<span class="word-num">
{{(formData.courseCustomDoctorModels[0] && formData.courseCustomDoctorModels[0].courseDoctorName || '').replace(/\s+/g,"").length}}/25
<span class="edit-wrapper">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span>
</span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span>
<span class="cancle">X</span>
</div>
</el-col>
</el-form-item>
<div class="basic-item-icon">
<el-form-item label="讲师头像:" class="valid-msg">
<el-upload
v-model="formData.courseCustomDoctorModels[0].courseDoctorAvatarUrl"
class="bg-uploader"
action="#"
:show-file-list="false"
:disabled="disabled"
>
<div class="bg-img-wrapper">
<img
v-if="formData.courseCustomDoctorModels && formData.courseCustomDoctorModels[0].courseDoctorAvatarUrl || ''"
@mouseover.stop="imgMouseOver=true"
:src="formData.courseCustomDoctorModels[0].courseDoctorAvatarUrl"
class="bg-img-doctor"
/>
<img
v-if="!(formData.courseCustomDoctorModels && formData.courseCustomDoctorModels[0].courseDoctorAvatarUrl || '')"
class="bg-img-doctor"
src="../../assets/image/small.png"
/>
</div>
</el-upload>
<!-- <span class="word-num">
<span class="edit-wrapper">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span>
</span> -->
<!-- <div v-show="needShowAuditMsg && formData.courseNameCheck" class="error">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span>
<span class="cancle">X</span>
</div> -->
<!-- <div class="limit-text">尺寸:88*88,只支持jpeg格式</div> -->
</el-form-item>
<p class="upload-message" v-if="uploadImgMessage">请选择列表图片</p>
</div>
<el-form-item label="所属机构:" class="valid-msg">
<el-col :span="18">
<el-input
size="small"
v-model="formData.courseCustomDoctorModels[0].courseDoctorHospital"
placeholder="请输入所属机构"
style="width: 360px"
maxlength="25"
:disabled="disabled"
></el-input>
<span class="word-num">
{{(formData.courseCustomDoctorModels && formData.courseCustomDoctorModels[0].courseDoctorHospital || '').replace(/\s+/g,"").length}}/25
<span class="edit-wrapper">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span>
</span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span>
<span class="cancle">X</span>
</div>
</el-col>
</el-form-item>
<el-form-item label="课程简介:" class="valid-msg">
<el-col :span="14">
<el-input
style="width:420px"
size="small"
type="textarea"
maxlength="200"
:autosize="{ minRows: 5}"
placeholder="请输入课程简介"
v-model="formData.courseIntro"
:disabled="disabled"
/>
<span class="word-num">
{{(formData.courseIntro || '').replace(/\s+/g,"").length}}/200
<span class="edit-wrapper">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span>
</span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error-area">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span>
<span class="cancle">X</span>
</div>
</el-col>
</el-form-item>
</div>
</el-form>
</div>
<footer style="padding: 30px;padding-bottom: 50px;">
<el-button style="margin-left: 20px" @click="backToListPage">返回列表</el-button>
<el-button style="margin-left: 100px" type="primary" @click="insertOrUpdate(2)">通 过</el-button>
<el-button type="primary" @click="insertOrUpdate(1)">拒 绝</el-button>
</footer>
</div>
<DialogComponet :dialogObj="dialogObj" @hide="hideCancleTips" @confirm="dialogObj.visible=false"></DialogComponet>
<PreviewVideo :dialogVisible="isPreviewVideo" :videoUrl="videoUrl" @close="isPreviewVideo=false"></PreviewVideo>
</div>
</template>
<script>
import PreviewVideo from "@/components/education/custom-resource/preview-video";
import PreviewProtocol from "@/components/education/custom-resource/preview-protocol";
import DialogComponet from "@/components/education/template/dialog";
// reject-reason-dialog
import { openLoading, closeLoading } from "@/utils/utils";
import BreadCrumb from "../../components/breadcrumb.vue";
import * as commonUtil from "../../utils/utils";
let vm = null;
export default {
data() {
let checkCourseName = (rule, value, callback) => {
// 如果有审核的信息,则直接报错
if (!value && this.needCheckField) {
callback(new Error("请输入课程名称"));
} else {
callback();
}
};
return {
curmbFirst: "CME",
curmbSecond: "外部资源管理",
needCheckField: false,
needShowAuditMsg: false,
needShowUploadProcess: false,
disabled: true,
formData: {
checkStatus: 0,
courseCustomChapterModels: [
{
courseCustomLectureModelList: [],
id: null,
name: "视频课程"
}
],
courseCustomDoctorModels: [
{
courseDoctorAvatarUrl:
"https://test1-file.yunqueyi.com/image/png/common/2020062015265063.png",
courseDoctorAvatarUrlCheck: "",
courseDoctorHospital: "",
courseDoctorHospitalCheck: "",
courseDoctorName: "",
courseDoctorNameCheck: "",
id: null
}
],
courseId: null,
courseIntro: "",
courseIntroCheck: "",
courseIntroImage:
"https://test1-file.yunqueyi.com/image/png/common/202006201528136.png",
courseIntroImageCheck: "",
courseName: "",
courseNameCheck: "",
deleteCustomLectureIds: [],
difficultyLevel: 1,
shareType: 1,
subjectIdList: []
},
uploadImgMessage: false,
imgMouseOver: false,
rules: {
courseName: [
{ required: true, message: " " },
{ validator: checkCourseName }
],
subjectIdList: [
{ required: true, message: "请输入课程名称" }
],
shareType: [
{ required: true, message: "请选择开放范围" }
]
},
labelOptions: [],
fileList: [
],
projectBanner:
"https://file.yunqueyi.com/h5/images/cme/project-banner.png",
doctorHeader: "https://file.yunqueyi.com/h5/images/cme/doctor-header.png",
doctorNameList: [
{ courseDoctorName: "333", show: true, seleted: false },
{ courseDoctorName: "334", show: true, seleted: false },
{ courseDoctorName: "335", show: true, seleted: false },
{ courseDoctorName: "336", show: true, seleted: false }
],
isShowDoctorList: false,
isPreviewVideo: false,
videoUrl: "",
orgCourseInfo: {
defaultDoctor: {
courseDoctorAvatarUrl:
"https://test1-file.yunqueyi.com/image/png/common/2020062015265063.png",
courseDoctorAvatarUrlCheck: "",
courseDoctorHospital: "",
courseDoctorHospitalCheck: "",
courseDoctorName: "",
courseDoctorNameCheck: "",
id: null
},
doctorModelList: [
{
courseDoctorAvatarUrl:
"https://test1-file.yunqueyi.com/image/png/common/2020062015265063.png",
courseDoctorAvatarUrlCheck: "",
courseDoctorHospital: "",
courseDoctorHospitalCheck: "",
courseDoctorName: "",
courseDoctorNameCheck: "",
id: null
}
],
limitModel: {
maxLimitOneVideoSize: 0,
maxLimitVideoCount: 0,
maxStorageSpace: 0,
usedStorageSpace: 0
}
},
uploadProgress: 0,
dialogObj: {
visible: false,
title: "确定取消吗?",
message: "发布后,项目将进入审核中,待审核完成后学员可在云鹊医App上参加培训学习",
tip: "",
confirmMsg: "取 消",
hideMsg: "确 定"
},
courseId: 0,
currentModifiedOrg: {},
currentFieldName: ''
};
},
computed: {},
components: {
BreadCrumb,
PreviewVideo,
DialogComponet,
},
created() {
vm = this;
this.courseId = this.$route && this.$route.query && this.$route.query.courseId || 0;
vm.initModify();
},
mounted() {
this.getLabelList();
commonUtil.resizeHeight();
},
methods: {
backToListPage() {
this.$router.back(-1)
},
// 创建课程页面的初始信息
initOrgCourseInfo() {
vm.GET("contents/course/custom/info/init", { setEntry: true }).then(
res => {
if (res.code == "000000") {
this.orgCourseInfo = res.data;
this.formData.courseCustomDoctorModels[0] = this.orgCourseInfo.defaultDoctor;
this.formData.courseCustomDoctorModels[0].courseDoctorAvatarUrl =
this.orgCourseInfo.defaultDoctor.courseDoctorAvatarUrl ||
"https://test1-file.yunqueyi.com/image/png/common/2020062015265063.png";
this.doctorNameList = this.convertDNameToSelectOpt(
this.orgCourseInfo.doctorModelList
);
+this.courseId && this.getCourseInfoById(this.courseId);
}
}
);
},
// 将医生名称进行处理
convertDNameToSelectOpt(doctorModelList) {
doctorModelList.forEach(item => {
item.show = true;
item.seleted = false;
});
return doctorModelList;
},
// 初始化课程信息
initModify() {
this.needShowAuditMsg = true;
this.initOrgCourseInfo();
},
// 创建课程页面的初始信息
getCourseInfoById(courseId) {
vm.GET(`contents/course/custom/info/${courseId}`)
.then( res => {
if ( res.code == "000000") {
this.formData = res.data;
}
}
);
},
// 过滤医生信息
filterDoctorName(value) {
this.doctorNameList.forEach(item => {
if (value) {
if ((item.value + "").indexOf(value) == -1) {
item.show = false;
} else {
item.show = true;
}
if (item.value == value) {
item.seleted = true;
} else {
item.seleted = false;
}
} else {
item.show = true;
}
});
},
// 当选择医生的焦点失去时,要反选医生信息
doctorNameInputBlur() {
setTimeout(() => {
this.isShowDoctorList = false;
this.selectDoctorByName(
this.formData.courseCustomDoctorModels[0].courseDoctorName
);
}, 200);
},
// 根据姓名反选医生信息
// TODO 尝试找到完全匹配的医生
selectDoctorByName(name) {
},
// 选择其中一个
selectDoctor(name) {
console.log(name);
this.formData.courseCustomDoctorModels[0].courseDoctorName = name;
this.selectDoctorByName(name);
},
// 获取学科列表
getLabelList() {
let req = {};
this.GET("aggregate/content/labelList", req).then(res => {
if (res.code == "000000") {
this.convertLabelList(res.data);
}
});
},
// 将所有子分类中的“全部”去掉
convertLabelList(labelList) {
let newLabelList = [];
labelList.forEach(item => {
item.subList = item.subList.slice(1);
});
this.labelOptions = labelList;
},
// 添加或修改课程(kind = 3)
insertOrUpdate(checkStatus) {
// checkStatus 1:拒绝的话,要有理由;2:通过的话,没有拒绝理由
// TODO 判断
this.formData.checkStatus = checkStatus;
this.POST("contents/course/custom/check/v1/check", this.formData).then(res => {
if (res.code == "000000") {
this.backToListPage();
}
});
},
// 关闭(“取消”按钮弹出来的)弹框
hideCancleTips() {
this.dialogObj.visible = false;
},
// 预览视频
previewVideoAction(lecture) {
this.videoUrl = lecture.resourceModel.filePath;
this.isPreviewVideo = true;
},
// 对特定字段进行修改
auditField(modifiedOrg, fieldName) {
this.currentModifiedOrg = modifiedOrg;
this.currentFieldName = fieldName;
},
}
};
</script>
<style scoped lang="scss">
.edit-course-wrapper {
.course-content {
// color: red;
padding-top: 30px;
.basic-item-icon {
position: relative;
margin-top: 20px;
.require {
position: absolute;
left: 40px;
top: 11px;
color: #f56c6c;
}
.upload-message {
position: absolute;
left: 160px;
top: 105px;
font-size: 12px;
color: #f56c6c;
}
.img-delete {
position: absolute;
left: 0px;
top: 0px;
width: 84px;
height: 100px;
background: #000;
opacity: 0.7;
z-index: 999;
i {
color: #fff;
margin-top: 39px;
margin-left: 0px;
}
}
.upload-tips {
width: 100%;
position: relative;
top: -10px;
font-size: 12px;
color: #979899;
// display: inline-block;
}
.custom-list {
// width: 100%;
width: 800px;
display: flex;
flex-direction: column;
// border-radius: 3px;
// border: 1px solid rgba(228,231,237,1);
padding: 20px;
padding-top: 0px;
font-size: 12px;
color: #606266;
& > li {
margin: 10px 0;
}
.video {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.video-wapper {
height: 28px;
line-height: 28px;
.title {
display: inline-block;
width: 70px;
text-align: right;
margin-right: 10px;
}
.name {
cursor: pointer;
color: #5890DD;
}
img {
width: 12px;
height: 12px;
}
}
// .delete {
// position: relative;
// top: 4px;
// cursor: pointer;
// width: 16px;
// height: 16px;
// }
}
.video-name {
.title {
display: inline-block;
width: 70px;
text-align: right;
margin-right: 10px;
}
}
}
}
.word-num {
font-size: 12px;
color: #999;
padding-top: 5px;
}
.bg-uploader {
img {
float: left;
}
.bg-img-wrapper {
.bg-img {
display: block;
width: 160px;
height: 90px;
}
.bg-img-doctor {
display: block;
width: 88px;
height: 88px;
}
}
.bg-video {
float: left;
width: 84px;
height: 100px;
}
}
.limit-text {
position: absolute;
top: 86px;
left: 0px;
font-size: 12px;
color: #979899;
}
.separator-line {
width: 100%;
display: flex;
flex-direction: row;
align-content: center;
align-items: center;
justify-content: space-between;
.center {
cursor: pointer;
width: 130px;
color: #666666;
img {
width: 12px;
}
}
.line-left,
.line-right {
// display: inline-block;
// width: 100%;
flex: 1;
border-bottom: 1px dashed #e4e7ed;
}
}
.tips {
width: 500px;
height: 32px;
line-height: 32px;
margin-left: 38px;
padding-left: 12px;
background: rgba(254, 250, 245, 1);
border-radius: 3px;
color: #e6a23c;
}
.valid-msg {
position: relative;
.error {
width: 370px;
position: absolute;
display: flex;
justify-content: space-between;
top: 29px;
font-size: 13px;
color: #ed3131;
.text {
flex: 1;
}
.cancle {
width: 20px;
margin-left: 20px;
cursor: pointer;
}
}
.error-area {
position: absolute;
bottom: -32px;
font-size: 13px;
color: #ed3131;
.cancle {
width: 20px;
margin-left: 20px;
cursor: pointer;
}
}
.error-video {
position: absolute;
top: 64px;
left: 82px;
font-size: 13px;
color: #ed3131;
.cancle {
width: 20px;
margin-left: 20px;
cursor: pointer;
}
}
.edit-wrapper {
cursor: pointer;
color: #449284;
.edit-img {
position: relative;
top: 2px;
width: 12px;
margin: 0 2px 0 4px;
}
}
.doctor-select-list {
width: 200px;
// max-height: 100px;
position: absolute;
z-index: 100;
background: #fff;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
// margin: 10px;
li {
padding-left: 20px;
cursor: pointer;
&:hover {
background: #f4f7fd;
}
&.doctor-selected {
background: #f4f7fd;
}
}
}
}
.upload-process {
margin: 10px 0 10px 10px;
display: block;
// width: 310px;
height: 4px;
background: #449284;
border-radius: 2px;
}
}
}
</style>
<style scoped lang="scss">
.review-access-wrap {
.review-access {
padding: 10px;
background: #fff;
}
}
</style>
\ No newline at end of file
...@@ -22,20 +22,19 @@ ...@@ -22,20 +22,19 @@
></el-input> ></el-input>
<span class="word-num"> <span class="word-num">
{{(formData.courseName || '').replace(/\s+/g,"").length}}/25 {{(formData.courseName || '').replace(/\s+/g,"").length}}/25
<span class="edit-wrapper"> <span v-show="formData.checkStatus == 0" class="edit-wrapper" @click="auditField(formData, 'courseNameCheck')">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息 <img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span> </span>
</span> </span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error"> <div v-show="needShowAuditMsg && formData.courseNameCheck && formData.checkStatus != 2" class="error">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span> <span>{{formData.courseNameCheck}}</span>
<span class="cancle">X</span> <span v-show="formData.checkStatus == 0" class="cancle" @click="cancleAudit(formData, 'courseNameCheck')">X</span>
</div> </div>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="学科分类:" prop="subjectIdList" class="valid-msg"> <el-form-item label="学科分类:" prop="subjectIdList" class="valid-msg">
<el-col :span="18"> <el-col :span="18">
<!-- :props="{ expandTrigger: 'hover' }" -->
<el-cascader <el-cascader
style="width: 360px" style="width: 360px"
v-model="formData.subjectIdList" v-model="formData.subjectIdList"
...@@ -53,22 +52,19 @@ ...@@ -53,22 +52,19 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div class="basic-item-icon"> <div class="basic-item-icon" style="margin-top: 0; padding-top: 0;">
<ul v-show="formData.courseCustomChapterModels[0].courseCustomLectureModelList.length" class="custom-list"> <ul v-show="formData.courseCustomChapterModels[0].courseCustomLectureModelList.length" class="custom-list">
<li v-for="(lecture, index) in formData.courseCustomChapterModels[0].courseCustomLectureModelList" :key="index" class="valid-msg"> <li v-for="(lecture, index) in formData.courseCustomChapterModels[0].courseCustomLectureModelList" :key="index" class="valid-msg">
<ul class="video"> <ul class="video">
<li class="video-wapper"> <li class="video-wapper">
<span class="title">视频{{index + 1}}</span> <span class="title">视频{{index + 1}}</span>
<img src="../../assets/image/phrase3/icon-pin.png" /> <img src="../../assets/image/phrase3/icon-pin.png" />
<span class="name" @click="previewVideoAction(lecture)">{{lecture.resourceModel.name}}</span> <span class="name" @click="previewVideoAction(lecture)">{{lecture.resourceModel && lecture.resourceModel.name}}</span>
</li> </li>
<!-- <li>
<img @click="deleteLecture(index)" class="delete" src="../../assets/image/phrase3/close.png" />
</li> -->
</ul> </ul>
<div class="video-name"> <div class="video-name">
<span class="title"> <span class="title">
<span >*</span> <span style="color: red;">*</span>
<span class="video-title">视频名称</span> <span class="video-title">视频名称</span>
</span> </span>
<el-input <el-input
...@@ -81,13 +77,13 @@ ...@@ -81,13 +77,13 @@
></el-input> ></el-input>
<span class="word-num"> <span class="word-num">
{{(lecture.name || '').replace(/\s+/g,"").length}}/25 {{(lecture.name || '').replace(/\s+/g,"").length}}/25
<span class="edit-wrapper"> <span v-show="formData.checkStatus == 0" class="edit-wrapper" @click="auditField(formData.courseCustomChapterModels[0].courseCustomLectureModelList[index], 'nameCheck')">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息 <img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span> </span>
</span> </span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error-video"> <div v-show="needShowAuditMsg && formData.courseCustomChapterModels[0].courseCustomLectureModelList[index].nameCheck && formData.checkStatus != 2" class="error-video">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span> <span>{{formData.courseCustomChapterModels[0].courseCustomLectureModelList[index].nameCheck}}</span>
<span class="cancle">X</span> <span v-show="formData.checkStatus == 0" class="cancle" @click="cancleAudit(formData.courseCustomChapterModels[0].courseCustomLectureModelList[index], 'nameCheck')">X</span>
</div> </div>
</div> </div>
...@@ -106,7 +102,6 @@ ...@@ -106,7 +102,6 @@
class="bg-uploader" class="bg-uploader"
action="#" action="#"
:show-file-list="false" :show-file-list="false"
:before-upload="beforeUploadListPic"
:disabled="disabled" :disabled="disabled"
> >
<div class="bg-img-wrapper"> <div class="bg-img-wrapper">
...@@ -124,6 +119,15 @@ ...@@ -124,6 +119,15 @@
</div> </div>
</el-upload> </el-upload>
<div class="limit-text">尺寸:750*420,只支持jpeg格式</div> <div class="limit-text">尺寸:750*420,只支持jpeg格式</div>
<span class="word-num">
<span v-show="formData.checkStatus == 0" class="edit-wrapper" @click="auditField(formData, 'courseIntroImageCheck')">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span>
</span>
<div v-show="needShowAuditMsg && formData.courseIntroImageCheck" class="error" :class="{'top-124': formData.checkStatus == 0}" style="position:absolute;top:103px;">
<span>{{formData.courseIntroImageCheck}}</span>
<span v-show="formData.checkStatus == 0" class="cancle" @click="cancleAudit(formData, 'courseIntroImageCheck')">X</span>
</div>
</el-form-item> </el-form-item>
<p class="upload-message" v-if="uploadImgMessage">请选择列表图片</p> <p class="upload-message" v-if="uploadImgMessage">请选择列表图片</p>
</div> </div>
...@@ -160,13 +164,13 @@ ...@@ -160,13 +164,13 @@
</ul> </ul>
<span class="word-num"> <span class="word-num">
{{(formData.courseCustomDoctorModels[0] && formData.courseCustomDoctorModels[0].courseDoctorName || '').replace(/\s+/g,"").length}}/25 {{(formData.courseCustomDoctorModels[0] && formData.courseCustomDoctorModels[0].courseDoctorName || '').replace(/\s+/g,"").length}}/25
<span class="edit-wrapper"> <span v-show="formData.checkStatus == 0" class="edit-wrapper" @click="auditField(formData.courseCustomDoctorModels[0], 'courseDoctorNameCheck')">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息 <img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span> </span>
</span> </span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error"> <div v-show="needShowAuditMsg && formData.courseCustomDoctorModels[0].courseDoctorNameCheck && formData.checkStatus != 2" class="error">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span> <span>{{formData.courseCustomDoctorModels[0].courseDoctorNameCheck}}</span>
<span class="cancle">X</span> <span v-show="formData.checkStatus == 0" class="cancle" @click="cancleAudit(formData.courseCustomDoctorModels[0], 'courseDoctorNameCheck')">X</span>
</div> </div>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -178,7 +182,6 @@ ...@@ -178,7 +182,6 @@
class="bg-uploader" class="bg-uploader"
action="#" action="#"
:show-file-list="false" :show-file-list="false"
:before-upload="beforeUploadListPic"
:disabled="disabled" :disabled="disabled"
> >
<div class="bg-img-wrapper"> <div class="bg-img-wrapper">
...@@ -195,16 +198,16 @@ ...@@ -195,16 +198,16 @@
/> />
</div> </div>
</el-upload> </el-upload>
<!-- <span class="word-num"> <div class="limit-text">尺寸:88*88,只支持jpeg格式</div>
<span class="edit-wrapper"> <span class="word-num">
<span v-show="formData.checkStatus == 0" class="edit-wrapper" @click="auditField(formData.courseCustomDoctorModels[0], 'courseDoctorAvatarUrlCheck')">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息 <img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span> </span>
</span> --> </span>
<!-- <div v-show="needShowAuditMsg && formData.courseNameCheck" class="error"> <div v-show="needShowAuditMsg && formData.courseCustomDoctorModels[0].courseDoctorAvatarUrlCheck" class="error" :class="{'top-124': formData.checkStatus == 0}" style="position:absolute;top: 102px;">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span> <span>{{formData.courseCustomDoctorModels[0].courseDoctorAvatarUrlCheck}}</span>
<span class="cancle">X</span> <span v-show="formData.checkStatus == 0" class="cancle" @click="cancleAudit(formData.courseCustomDoctorModels[0], 'courseDoctorAvatarUrlCheck')">X</span>
</div> --> </div>
<!-- <div class="limit-text">尺寸:88*88,只支持jpeg格式</div> -->
</el-form-item> </el-form-item>
<p class="upload-message" v-if="uploadImgMessage">请选择列表图片</p> <p class="upload-message" v-if="uploadImgMessage">请选择列表图片</p>
</div> </div>
...@@ -220,13 +223,14 @@ ...@@ -220,13 +223,14 @@
></el-input> ></el-input>
<span class="word-num"> <span class="word-num">
{{(formData.courseCustomDoctorModels && formData.courseCustomDoctorModels[0].courseDoctorHospital || '').replace(/\s+/g,"").length}}/25 {{(formData.courseCustomDoctorModels && formData.courseCustomDoctorModels[0].courseDoctorHospital || '').replace(/\s+/g,"").length}}/25
<span class="edit-wrapper"> <!-- <span class="edit-wrapper"> -->
<span v-show="formData.checkStatus == 0" class="edit-wrapper" @click="auditField(formData.courseCustomDoctorModels[0], 'courseDoctorHospitalCheck')">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息 <img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span> </span>
</span> </span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error"> <div v-show="needShowAuditMsg && formData.courseCustomDoctorModels[0].courseDoctorHospitalCheck && formData.checkStatus != 2" class="error">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span> <span>{{formData.courseCustomDoctorModels[0].courseDoctorHospitalCheck}}</span>
<span class="cancle">X</span> <span v-show="formData.checkStatus == 0" class="cancle" @click="cancleAudit(formData.courseCustomDoctorModels[0], 'courseDoctorHospitalCheck')">X</span>
</div> </div>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -244,108 +248,51 @@ ...@@ -244,108 +248,51 @@
/> />
<span class="word-num"> <span class="word-num">
{{(formData.courseIntro || '').replace(/\s+/g,"").length}}/200 {{(formData.courseIntro || '').replace(/\s+/g,"").length}}/200
<span class="edit-wrapper"> <span v-show="formData.checkStatus == 0" class="edit-wrapper" @click="auditField(formData, 'courseIntroCheck')">
<img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息 <img class="edit-img" src="../../assets/image/phrase3/icon-pz.png" />修改信息
</span> </span>
</span> </span>
<div v-show="needShowAuditMsg && formData.courseNameCheck" class="error-area"> <div v-show="needShowAuditMsg && formData.courseIntroCheck && formData.checkStatus != 2" class="error-area">
<span>错误信息错误信息错误信息错误信息错误信息错误信息息</span> <span>{{formData.courseIntroCheck}}</span>
<span class="cancle">X</span> <span v-show="formData.checkStatus == 0" class="cancle" @click="cancleAudit(formData, 'courseIntroCheck')">X</span>
</div> </div>
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
</div> </div>
<footer style="padding: 30px;padding-bottom: 50px;"> <footer style="padding: 30px;padding-bottom: 50px;">
<el-button style="margin-left: 20px" @click="dialogObj.visible=true">返回列表</el-button> <el-button style="margin-left: 20px" @click="backToListPage">返回列表</el-button>
<el-button style="margin-left: 100px" type="primary" @click="submitForm('formDataRef')">通 过</el-button> <el-button v-if="formData.checkStatus == 0" style="margin-left: 100px" type="primary" @click="passOrRefuse(2)">通 过</el-button>
<el-button type="primary" @click="submitForm('formDataRef')">拒 绝</el-button> <el-button v-if="formData.checkStatus == 0" type="primary" @click="passOrRefuse(1)">拒 绝</el-button>
</footer> </footer>
</div> </div>
<DialogComponet :dialogObj="dialogObj" @hide="hideCancleTips" @confirm="dialogObj.visible=false"></DialogComponet> <DialogComponet :dialogObj="dialogObj" @hide="passOrRefuseAction" @confirm="dialogObj.visible=false"></DialogComponet>
<PreviewVideo :dialogVisible="isPreviewVideo" :videoUrl="videoUrl" @close="isPreviewVideo=false"></PreviewVideo> <PreviewVideo :dialogVisible="isPreviewVideo" :videoUrl="videoUrl" @close="isPreviewVideo=false"></PreviewVideo>
<RejectReasonDialog :refuseReasonList="refuseReasonList" :dialogVisible="auditVisible" @close="auditVisible=false" @checkInfo="checkInfo"></RejectReasonDialog>
</div> </div>
</template> </template>
<script> <script>
import PreviewVideo from "@/components/education/custom-resource/preview-video"; import PreviewVideo from "@/components/education/custom-resource/preview-video";
import PreviewProtocol from "@/components/education/custom-resource/preview-protocol"; import PreviewProtocol from "@/components/education/custom-resource/preview-protocol";
import PreviewEditCourse from "@/components/education/custom-resource/edit-course-dialog";
import DialogComponet from "@/components/education/template/dialog"; import DialogComponet from "@/components/education/template/dialog";
import CropperTwo from '@/components/common/cropper.two.vue' import RejectReasonDialog from "@/components/education/custom-resource/reject-reason-dialog";
import { doUpload, getFilePath } from "@/utils/qiniu-util"; import { openLoading, closeLoading } from "@/utils/utils";
import { openLoading, closeLoading, getQiniuToken1 } from "@/utils/utils";
import { isEmptyUtils } from "@/utils/index";
import { mapActions } from 'vuex';
import { ossUpload, getFilePathForOSS } from "@/utils/oss/ossUtil";
import BreadCrumb from "../../components/breadcrumb.vue"; import BreadCrumb from "../../components/breadcrumb.vue";
import * as commonUtil from "../../utils/utils"; import * as commonUtil from "../../utils/utils";
let vm = null; let vm = null;
export default { export default {
data() { data() {
let checkCourseName = (rule, value, callback) => {
// 如果有审核的信息,则直接报错
if (!value && this.needCheckField) {
callback(new Error("请输入课程名称"));
} else {
callback();
}
};
return { return {
curmbFirst: "CME", curmbFirst: "CME",
curmbSecond: "外部资源管理", curmbSecond: "外部资源管理",
slide2: { auditVisible: false,
oriUrl: 'https://avatars1.githubusercontent.com/u/23690568?s=460&v=4', // 原图
preUrl: 'https://avatars1.githubusercontent.com/u/23690568?s=460&v=4' // 裁剪后的预览图片,初始化为原图
},
showCropper: false,
cropOption: {
offset_x: 30,
offset_y: 40,
width: 600,
height: 400
},
step: 1,
needCheckField: false, needCheckField: false,
needShowAuditMsg: false, needShowAuditMsg: false,
needShowUploadProcess: false, needShowUploadProcess: false,
disabled: true, disabled: true,
formDataBase: {
checkStatus: 0,
courseCustomChapterModels: [
{
courseCustomLectureModelList: [],
id: null,
name: "视频课程"
}
],
courseCustomDoctorModels: [
{
courseDoctorAvatarUrl:
"https://test1-file.yunqueyi.com/image/png/common/2020062015265063.png",
courseDoctorAvatarUrlCheck: "",
courseDoctorHospital: "",
courseDoctorHospitalCheck: "",
courseDoctorName: "",
courseDoctorNameCheck: "",
id: null
}
],
courseId: null,
courseIntro: "",
courseIntroCheck: "",
courseIntroImage:
"https://test1-file.yunqueyi.com/image/png/common/202006201528136.png",
courseIntroImageCheck: "",
courseName: "",
courseNameCheck: "",
deleteCustomLectureIds: [],
difficultyLevel: 1,
shareType: 1,
subjectIdList: []
},
formData: { formData: {
checkStatus: 0, checkStatus: 0,
courseCustomChapterModels: [ courseCustomChapterModels: [
...@@ -385,7 +332,6 @@ export default { ...@@ -385,7 +332,6 @@ export default {
rules: { rules: {
courseName: [ courseName: [
{ required: true, message: " " }, { required: true, message: " " },
{ validator: checkCourseName }
], ],
subjectIdList: [ subjectIdList: [
{ required: true, message: "请输入课程名称" } { required: true, message: "请输入课程名称" }
...@@ -445,61 +391,74 @@ export default { ...@@ -445,61 +391,74 @@ export default {
dialogObj: { dialogObj: {
visible: false, visible: false,
title: "确定取消吗?", title: "确定取消吗?",
message: "发布后,项目将进入审核中,待审核完成后学员可在云鹊医App上参加培训学习", message: "确定课程已完成检测并通过审核?",
tip: "",
// confirmMsg: "取 消",
// hideMsg: "确 定"
},
statusObj: {
pass: {
title: "确认通过",
message: "确定课程已完成检测并通过审核?",
// message: "确定“云小鹊”提交的「高血压治疗规范」课程已完成检测并通过审核?",
tip: "", tip: "",
confirmMsg: "取 消", confirmMsg: "取 消",
hideMsg: "确 定" hideMsg: "确 定"
}, },
courseId: 0, refuse: {
}; title: "",
message: "您已添加过「拒绝原因」,不能通过该课程",
// message: "确定“云小鹊”提交的「高血压治疗规范」课程已完成检测并通过审核?",
tip: "",
confirmMsg: "我知道了",
hideMsg: ""
}, },
props: { refuseReasen: {
dialogVisible: { title: "",
type: Boolean, message: "请填写拒绝原因",
default: false // message: "确定“云小鹊”提交的「高血压治疗规范」课程已完成检测并通过审核?",
tip: "",
confirmMsg: "取 消",
hideMsg: "确 定"
}, },
// courseId: { confirmRefuse: {
// type: String | Number, title: "确认拒绝",
// default: 0 message: "确定“云小鹊”提交的「高血压治疗规范」课程审核为拒绝",
// } // message: "确定“云小鹊”提交的「高血压治疗规范」课程已完成检测并通过审核?",
tip: "",
confirmMsg: "取 消",
hideMsg: "确 定"
}, },
computed: {},
watch: {
// dialogVisible(isVisible) {
// this.formData = JSON.parse(JSON.stringify(this.formDataBase));
// if (isVisible) {
// if (this.courseId == 0) {
// this.initAdd(this.courseId);
// } else {
// this.initModify(this.courseId);
// }
// }
// },
}, },
courseId: 0,
currentModifiedOrg: {},
currentFieldName: '',
refuseReasonList: [],
};
},
computed: {},
components: { components: {
BreadCrumb, BreadCrumb,
PreviewVideo, PreviewVideo,
PreviewEditCourse,
DialogComponet, DialogComponet,
CropperTwo RejectReasonDialog
}, },
created() { created() {
vm = this; vm = this;
this.courseId = this.$route && this.$route.query && this.$route.query.courseId || 0; this.courseId = this.$route && this.$route.query && this.$route.query.courseId || 0;
vm.initModify(); vm.initModify();
// this.initAdd();
}, },
mounted() { mounted() {
this.getLabelList(); this.getLabelList();
this.getRefuseList();
commonUtil.resizeHeight(); commonUtil.resizeHeight();
}, },
methods: { methods: {
...mapActions(['setKind']),
getCropImg (argument) { // 返回到列表页面
console.log(argument); backToListPage() {
this.slide2.preUrl = argument[0] this.$router.back(-1)
this.cropData = argument[1]
}, },
// 创建课程页面的初始信息 // 创建课程页面的初始信息
...@@ -530,17 +489,9 @@ export default { ...@@ -530,17 +489,9 @@ export default {
return doctorModelList; return doctorModelList;
}, },
// 添加时初始化 // 初始化课程信息
initAdd() {
console.log("in initAdd");
this.step = 1;
this.needShowAuditMsg = false;
this.initOrgCourseInfo();
},
initModify() { initModify() {
this.needShowAuditMsg = true; this.needShowAuditMsg = true;
console.log("in initModify");
this.initOrgCourseInfo(); this.initOrgCourseInfo();
}, },
...@@ -598,11 +549,6 @@ export default { ...@@ -598,11 +549,6 @@ export default {
this.selectDoctorByName(name); this.selectDoctorByName(name);
}, },
// 关闭当前弹框
close() {
this.$emit("close");
},
// 获取学科列表 // 获取学科列表
getLabelList() { getLabelList() {
let req = {}; let req = {};
...@@ -622,257 +568,80 @@ export default { ...@@ -622,257 +568,80 @@ export default {
this.labelOptions = labelList; this.labelOptions = labelList;
}, },
// 查找是否有拒绝原因
// 上传视频(mp4) hasAuditMsg(cData) {
beforeUploadVideo(file) { let flag = false;
console.log(file); if(cData.courseNameCheck
const isMP4 = file.type === "video/mp4"; || cData.courseIntroCheck
const isLt = file.size / 1024 / 1024 / 1024 < 2; || cData.courseIntroImageCheck
if (!isLt) { || cData.courseCustomDoctorModels[0].courseDoctorNameCheck
this.$message.error("视频不符合规范,请根据规范上传视频"); || cData.courseCustomDoctorModels[0].courseDoctorAvatarUrlCheck
return; || cData.courseCustomDoctorModels[0].courseDoctorHospitalCheck
} ) {
if (!isMP4) { flag = true;
this.$message.error("视频不符合规范,请根据规范上传视频");
} else {
// openLoading(vm);
this.needShowUploadProcess = true;
doUpload(
vm,
file,
getFilePath(file, null),
"preview4",
"progress",
""
).then(function(path) {
// closeLoading(vm);
console.log('vm.uploadProgress', vm.uploadProgress);
console.log(path);
let uploadResourceParam = {
formatType: path.ext,
name: path.name,
qCloudUrl : path.fullPath,
size : path.size,
fileType : 1,
status : "success",
uid : new Date().getTime()
}
vm.needShowUploadProcess = false;
vm.uploadProgress = 0;
vm.insertResourceAction(uploadResourceParam);
});
} }
}, if(!flag) {
let lectureList = cData.courseCustomChapterModels[0].courseCustomLectureModelList;
// 上传资源(视频)后,生存对应的节 for(let i = 0; i < lectureList.length; i ++) {
insertResourceAction(uploadResourceParam) { if(lectureList[i].nameCheck) {
this.POST("contents/course/custom/info/insertResource", [uploadResourceParam]).then(res => { flag = true;
if (res.code == "000000") { break;
let cName = res.data.resourceModelList[0].name;
cName = cName.substr(0, cName.lastIndexOf('.'));
let lectureObj = {
id: null,
name: cName,
nameCheck: "",
contentCheck: "",
resourceModel: {}
} }
lectureObj.resourceModel = res.data && res.data.resourceModelList[0];
this.formData.courseCustomChapterModels[0].courseCustomLectureModelList.push(lectureObj);
} }
});
},
//上传列表图片
beforeUploadListPic(file) {
return;
let fileLimit = {
width: 230,
height: 172,
size: 0.5,
sizeText: "500K",
key: "attachmentUrl",
more: "attachmentMore1",
show: "uploadImgMessage"
};
vm.beforeAvatarUpload(file, fileLimit);
},
//上传图片校验
beforeAvatarUpload2(file, fileLimit) {
console.log();
const isJPG = file.type === "image/jpeg";
const isPNG = file.type === "image/png";
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
console.log("isJPG", isJPG, "isPNG", isPNG, "isLt2M", isLt2M);
// if (!isJPG && !isPNG) {
// vm.$message.error("图片不符合规范,请根据规范上传图片");
// return;
// }
// if (!isLt2M) {
// vm.$message.error("图片不符合规范,请根据规范上传图片 ");
// return;
// }
let _img = new FileReader();
_img.readAsDataURL(file);
console.log('readAsDataURL', _img, file);
_img.onload = function(theFile) {
let image = new Image();
image.src = theFile.target.result;
vm.slide2.oriUrl = theFile.target.result;
vm.showCropper = true;
console.log('readAsDataURL222', _img.width, file, theFile);
image.onload = function() {
console.log('image.onload', image);
let _vm = this;
if (
false
// true ||
// _vm.width != fileLimit.width ||
// _vm.height != fileLimit.height
) {
vm.$message.error("图片不符合规范,请根据规范上传图片");
} else {
// openLoading(vm);
// doUpload(
// vm,
// file,
// getFilePath(file, null),
// "preview4",
// "progress1",
// 1
// ).then(function(path) {
// closeLoading(vm);
// console.log(path);
// if (fileLimit.show == "uploadImgMessage") {
// vm.uploadImgMessage = false;
// }
// // else if (fileLimit.show == "uploadImgMessage2") {
// // vm.uploadImgMessage2 = false;
// // }
// vm.formData[fileLimit.key] = path.fullPath;
// vm.formData[fileLimit.more] = {
// attachmentName: path.name,
// attachmentExt: path.ext,
// attachmentSize: path.size
// };
// vm.$message.success("上传成功");
// });
} }
}; return flag;
};
return isJPG && isLt2M;
}, },
//上传图片校验 // 添加或修改课程(kind = 3)
beforeAvatarUpload(file, fileLimit) { passOrRefuse(checkStatus) {
console.log(); // checkStatus 1:拒绝的话,要有理由;2:通过的话,没有拒绝理由
const isJPG = file.type === "image/jpeg"; // TODO 判断
const isPNG = file.type === "image/png"; this.currentCheckStatus = checkStatus;
const isLt2M = file.size / 1024 / 1024 < fileLimit.size; let flag = this.hasAuditMsg(this.formData);
console.log("isJPG", isJPG, "isPNG", isPNG, "isLt2M", isLt2M); console.log('passOrRefuse', flag);
// if (!isJPG && !isPNG) { // 点击拒绝按钮
// vm.$message.error("图片不符合规范,请根据规范上传图片"); if(checkStatus == 1) {
// return; if(flag) { // 有拒绝原因
// } vm.dialogObj = Object.assign(
// if (!isLt2M) { vm.dialogObj,
// vm.$message.error("图片不符合规范,请根据规范上传图片 "); vm.statusObj.confirmRefuse
// return; );
// }
let _img = new FileReader();
_img.readAsDataURL(file);
_img.onload = function(theFile) {
let image = new Image();
image.src = theFile.target.result;
image.onload = function() {
let _vm = this;
if (
false
// true ||
// _vm.width != fileLimit.width ||
// _vm.height != fileLimit.height
) {
vm.$message.error("图片不符合规范,请根据规范上传图片");
} else { } else {
openLoading(vm); vm.dialogObj = Object.assign(
doUpload( vm.dialogObj,
vm, vm.statusObj.refuseReasen
file, );
getFilePath(file, null),
"preview4",
"progress1",
1
).then(function(path) {
closeLoading(vm);
console.log(path);
if (fileLimit.show == "uploadImgMessage") {
vm.uploadImgMessage = false;
}
// else if (fileLimit.show == "uploadImgMessage2") {
// vm.uploadImgMessage2 = false;
// }
vm.formData[fileLimit.key] = path.fullPath;
vm.formData[fileLimit.more] = {
attachmentName: path.name,
attachmentExt: path.ext,
attachmentSize: path.size
};
vm.$message.success("上传成功");
});
} }
}; // 点击通过按钮
};
return isJPG && isLt2M;
},
// 限制选择文件个数
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 100 个文件,您已经共选择了 ${files.length + fileList.length} 个文件!`);
},
// 删除按钮
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`);
},
//表单校验
submitForm(formName) {
this.needShowAuditMsg = false;
this.$refs[formName].validate(valid => {
if (valid) {
this.insertOrUpdate();
} else { } else {
console.log("error submit!!"); if(flag) { // 有拒绝原因
vm.dialogObj = Object.assign(
vm.dialogObj,
vm.statusObj.refuse
);
} else {
vm.dialogObj = Object.assign(
vm.dialogObj,
vm.statusObj.pass
);
} }
this.needShowAuditMsg = true; }
}); vm.dialogObj.visible = true;
}, },
// 添加或修改课程(kind = 3) passOrRefuseAction(){
insertOrUpdate() { this.formData.checkStatus = this.currentCheckStatus;
this.POST("contents/course/custom/info/insertOrUpdate", this.formData).then(res => { this.POST("contents/course/custom/check/v1/check", this.formData).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
if(this.courseId == 'add') { this.backToListPage();
this.step = 2;
} else {
this.close();
this.setKind(3);
}
} }
this.dialogObj.visible = false;
}); });
}, },
// 返回到课程选择页面(kind = 3)
backToOrgCourse() {
this.close();
this.setKind(3);
},
// 关闭(“取消”按钮弹出来的)弹框 // 关闭(“取消”按钮弹出来的)弹框
hideCancleTips() { hideCancleTips() {
this.dialogObj.visible = false; this.dialogObj.visible = false;
this.close();
}, },
// 预览视频 // 预览视频
...@@ -881,10 +650,31 @@ export default { ...@@ -881,10 +650,31 @@ export default {
this.isPreviewVideo = true; this.isPreviewVideo = true;
}, },
// 删除本节视频 // 对特定字段进行修改
// TODO 要将删除的节ID放在删除的节里 auditField(modifiedOrg, fieldName) {
deleteLecture(index) { this.currentModifiedOrg = modifiedOrg;
this.formData.courseCustomChapterModels[0].courseCustomLectureModelList.splice(index, 1); this.currentFieldName = fieldName;
this.auditVisible = true;
},
// 对特定字段进行重置
cancleAudit(modifiedOrg, fieldName) {
modifiedOrg[fieldName] = '';
},
// 获取到审核结果
checkInfo(info) {
this.currentModifiedOrg[this.currentFieldName] = info;
console.log(info);
},
// 获取默认的拒绝原因列表
getRefuseList() {
this.GET("contents/course/custom/check/v1/refuse/list", {}).then(res => {
if (res.code == "000000") {
this.refuseReasonList = res.data || [];
}
});
}, },
} }
...@@ -1100,6 +890,7 @@ export default { ...@@ -1100,6 +890,7 @@ export default {
} }
} }
.edit-wrapper { .edit-wrapper {
cursor: pointer;
color: #449284; color: #449284;
.edit-img { .edit-img {
position: relative; position: relative;
...@@ -1139,27 +930,6 @@ export default { ...@@ -1139,27 +930,6 @@ export default {
border-radius: 2px; border-radius: 2px;
} }
} }
.course-content-step2 {
display: flex;
flex-direction: column;
text-align: center;
align-items: center;
.success-img {
width: 60px;
height: 60px;
}
.tips-1 {
margin-top: 30px;
font-size: 18px;
color: #303133;
}
.tips-2 {
margin-top: 4px;
margin-bottom: 40px;
font-size: 14px;
color: #999999;
}
}
} }
</style> </style>
...@@ -1172,5 +942,8 @@ export default { ...@@ -1172,5 +942,8 @@ export default {
padding: 10px; padding: 10px;
background: #fff; background: #fff;
} }
.top-124 {
top: 124px !important;
}
} }
</style> </style>
\ No newline at end of file
...@@ -185,6 +185,7 @@ export default { ...@@ -185,6 +185,7 @@ export default {
}, },
watch: { watch: {
kind(newKind) { kind(newKind) {
console.log(newKind);
let searchParam = newKind == 0 ? this.searchParam : this.searchParamOrg; let searchParam = newKind == 0 ? this.searchParam : this.searchParamOrg;
if(newKind <= 1) { if(newKind <= 1) {
this.getCourseList(searchParam); this.getCourseList(searchParam);
...@@ -195,16 +196,18 @@ export default { ...@@ -195,16 +196,18 @@ export default {
}, },
searchParam: { searchParam: {
handler(val) { handler(val) {
console.log('searchParam', val);
this.getCourseList(val); this.getCourseList(val);
}, },
deep: true deep: true
}, },
searchParamOrg: { searchParamOrg: {
handler(val) { handler(val) {
if(!this.isFirst) { console.log('searchParamOrg', val, this.isFirst);
// if(!this.isFirst) {
this.isFirst = false this.isFirst = false
this.getCourseList(val); this.getCourseList(val);
} // }
}, },
deep: true deep: true
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册