mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 22:36:43 +08:00
管理员转审
This commit is contained in:
@@ -75,10 +75,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
|
<el-table-column label="创建人" prop="sysCreateBy"></el-table-column>
|
||||||
<el-table-column label="创建时间" prop="sysCreateTime" width="200px" show-overflow-tooltip></el-table-column>
|
<el-table-column label="创建时间" prop="sysCreateTime" width="200px" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="操作" width="100px" fixed="right">
|
<el-table-column label="操作" width="150px" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click="toExamine(scope.row)" type="text" >审核</el-button>
|
<el-button @click="toExamine(scope.row)" type="text">审核</el-button>
|
||||||
<el-button @click="toPreview(scope.row)" type="text" >预览</el-button>
|
<el-button @click="toReferral(scope.row)" type="text">转审</el-button>
|
||||||
|
<el-button @click="toPreview(scope.row)" type="text">预览</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -176,15 +177,39 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog">
|
<el-dialog title="课程详情" :visible.sync="showDetails" @close="examin = {};" width="900px" custom-class="g-dialog">
|
||||||
<!-- <div v-show="expandDetails"> -->
|
|
||||||
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div>
|
<div v-if="examin.detailType == 10"><auditCourse1 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse1></div>
|
||||||
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div>
|
<div v-if="examin.detailType == 20"><auditCourse2 :showTest="true" :isDetails="false" :isShow="false" :id="examin.examineId"></auditCourse2></div>
|
||||||
<!-- </div> -->
|
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="showDetails = false;examin = {};">取 消</el-button>
|
<el-button @click="showDetails = false;examin = {};">取 消</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog title="请选择教师" :visible.sync="teacherInfo.show" :close-on-click-modal="false" :append-to-body="true" width="500px" custom-class="g-dialog">
|
||||||
|
<div style="height: 200px;padding-right: 30px;">
|
||||||
|
<el-form label-width="100px" @submit.native.prevent >
|
||||||
|
<el-form-item label="姓名或工号">
|
||||||
|
<el-input v-model="teacherInfo.name" maxlength="10" placeholder="请输入教师姓名或工号" @keyup.enter.native="keyupEnter">
|
||||||
|
<el-button @click="findUser" slot="append" icon="el-icon-search">搜索</el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="padding: 0px 20px;height:60px;overflow-y: auto;margin-bottom: 20px;">
|
||||||
|
<!-- <el-checkbox-group v-model="selectedTeacher">
|
||||||
|
<el-checkbox v-for="(u,uidx) in teacherInfo.list" :key="uidx" :label="u.aid">{{u.name+'('+u.code+')'}}</el-checkbox>
|
||||||
|
</el-checkbox-group> -->
|
||||||
|
<el-radio-group v-model="selectedTeacher">
|
||||||
|
<el-radio v-for="(u,uidx) in teacherInfo.list" :key="uidx" :label="u.aid">{{u.name+'('+u.code+')'}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="padding-left: 20px;display:flex;">
|
||||||
|
<div style="width:100px;font-size: 14px;color: #606266;font-weight: 700;">说明</div>
|
||||||
|
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="referralData.remark" maxlength="200" show-word-limit></el-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="teacherInfo.show= false">取 消</el-button>
|
||||||
|
<el-button @click="submitReferral()" type="primary" >转审</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -196,8 +221,8 @@ import auditCourse1 from '@/components/Course/auditCourse1.vue';
|
|||||||
import auditCourse2 from '@/components/Course/auditCourse2.vue';
|
import auditCourse2 from '@/components/Course/auditCourse2.vue';
|
||||||
import adminPage from '@/components/Administration/adminPage.vue';
|
import adminPage from '@/components/Administration/adminPage.vue';
|
||||||
import {courseType} from '../../utils/tools.js';
|
import {courseType} from '../../utils/tools.js';
|
||||||
import apiType from '../../api/modules/type.js';
|
|
||||||
import apiCourse from '../../api/modules/course.js';
|
import apiCourse from '../../api/modules/course.js';
|
||||||
|
import apiUser from '@/api/system/user.js'
|
||||||
import { mapGetters,mapActions} from 'vuex';
|
import { mapGetters,mapActions} from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
name: 'manageCourse',
|
name: 'manageCourse',
|
||||||
@@ -207,6 +232,19 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
selectedTeacher:'',
|
||||||
|
teacherInfo:{
|
||||||
|
show:false,
|
||||||
|
list:[],
|
||||||
|
load:false,
|
||||||
|
name:'',
|
||||||
|
},
|
||||||
|
referralData:{
|
||||||
|
teacherId:'',
|
||||||
|
teacherName:'',
|
||||||
|
remark:'',
|
||||||
|
courseId:'',
|
||||||
|
},
|
||||||
sysTypeList: [],
|
sysTypeList: [],
|
||||||
sysTypeListMap:[],
|
sysTypeListMap:[],
|
||||||
resOwnerListMap:[],
|
resOwnerListMap:[],
|
||||||
@@ -289,6 +327,76 @@ export default {
|
|||||||
this.loadSysTypes();
|
this.loadSysTypes();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
submitReferral(){ // 转审
|
||||||
|
if(this.selectedTeacher == '') {
|
||||||
|
this.$message.warning('请选择教师!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let teacherData = this.teacherInfo.list.find(item => item.aid == this.selectedTeacher);
|
||||||
|
this.referralData.teacherId = teacherData.aid;
|
||||||
|
this.referralData.teacherName=teacherData.name;
|
||||||
|
apiCourse.auditAppoint(this.referralData).then(res=>{
|
||||||
|
if(res.status == 200) {
|
||||||
|
this.$message.success('转审成功!');
|
||||||
|
this.searchData();
|
||||||
|
this.teacherInfo.show= false;
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toReferral(row){
|
||||||
|
this.teacherInfo.list = [];
|
||||||
|
this.referralData={
|
||||||
|
teacherId:'',
|
||||||
|
teacherName:'',
|
||||||
|
remark:'',
|
||||||
|
};
|
||||||
|
this.selectedTeacher = '';
|
||||||
|
this.teacherInfo.name = '';
|
||||||
|
this.referralData.courseId = row.id;
|
||||||
|
this.teacherInfo.show = true;
|
||||||
|
},
|
||||||
|
keyupEnter(){ // 转审选择教师
|
||||||
|
this.findUser();
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
findUser(){
|
||||||
|
this.teacherInfo.load=false;
|
||||||
|
this.teacherInfo.list=[];
|
||||||
|
this.selectedTeacher=[];
|
||||||
|
var name=this.teacherInfo.name;
|
||||||
|
var regPos = /^\d+(\.\d+)?$/; //非负浮点数
|
||||||
|
if(regPos.test(name)){
|
||||||
|
//console.log("数字");
|
||||||
|
apiUser.getByLoginName(name).then(rs=>{
|
||||||
|
if(rs.status==200){
|
||||||
|
//因为根据工号查询,只会是一个人,所有会有null情况,而json会返回空字符串
|
||||||
|
if(rs.result!=''){
|
||||||
|
this.teacherInfo.list.push(rs.result);
|
||||||
|
}else{
|
||||||
|
this.$message.error("查无此用户")
|
||||||
|
}
|
||||||
|
this.teacherInfo.load=true;
|
||||||
|
}else{
|
||||||
|
this.$message.error(rs.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
// console.log("非数字");
|
||||||
|
apiUser.findByName(name).then(rs=>{
|
||||||
|
if(rs.status==200){
|
||||||
|
if(rs.result.length==0){
|
||||||
|
return this.$message.error(rs.message);
|
||||||
|
}
|
||||||
|
this.teacherInfo.list=rs.result;
|
||||||
|
this.teacherInfo.load=true;
|
||||||
|
}else{
|
||||||
|
this.$message.error(rs.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
getsearch(){
|
getsearch(){
|
||||||
this.params.pageIndex= 1;
|
this.params.pageIndex= 1;
|
||||||
this.searchData();
|
this.searchData();
|
||||||
|
|||||||
Reference in New Issue
Block a user