mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 22:06:43 +08:00
临时提交修改
This commit is contained in:
@@ -21,8 +21,14 @@ const treeList = function (query) {
|
|||||||
const listByParent = function (parentId) {
|
const listByParent = function (parentId) {
|
||||||
return ajax.get('/xboe/org/list-by-parent?parentId='+parentId);
|
return ajax.get('/xboe/org/list-by-parent?parentId='+parentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getSimple = function (id) {
|
||||||
|
return ajax.get('/xboe/org/simple?id='+id);
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
treeList,
|
treeList,
|
||||||
|
getSimple,
|
||||||
listByParent
|
listByParent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,16 +73,11 @@
|
|||||||
:props="{ value: 'id', label: 'name' }"
|
:props="{ value: 'id', label: 'name' }"
|
||||||
:options="sysTypeListMap"></el-cascader>
|
:options="sysTypeListMap"></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="资源归属" required>
|
<el-form-item label="资源归属" required>
|
||||||
<el-cascader
|
<el-input placeholder="请选择" v-model="orgName" >
|
||||||
placeholder="选择资源归属"
|
<el-button @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||||
style="width: 100%;"
|
</el-input>
|
||||||
clearable
|
</el-form-item>
|
||||||
v-model="resOwnerArray"
|
|
||||||
:props="{ value: 'code', label: 'name' }"
|
|
||||||
:options="resOwnerListMap"
|
|
||||||
></el-cascader>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="场景" v-show="!weike.onlyRequired">
|
<el-form-item label="场景" v-show="!weike.onlyRequired">
|
||||||
<el-select v-model="courseInfo.forScene" style="width: 100%;">
|
<el-select v-model="courseInfo.forScene" style="width: 100%;">
|
||||||
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
@@ -219,15 +214,7 @@
|
|||||||
:options="sysTypeListMap">
|
:options="sysTypeListMap">
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="资源归属" required>
|
|
||||||
<el-cascader
|
|
||||||
placeholder="选择资源归属"
|
|
||||||
style="width: 100%;"
|
|
||||||
clearable
|
|
||||||
v-model="resOwnerArray"
|
|
||||||
:props="{ value: 'code', label: 'name' }"
|
|
||||||
:options="resOwnerListMap"></el-cascader>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="场景">
|
<el-form-item label="场景">
|
||||||
<el-select v-model="courseInfo.forScene" style="width: 100%;">
|
<el-select v-model="courseInfo.forScene" style="width: 100%;">
|
||||||
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in sceneList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
@@ -254,6 +241,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="资源归属" required>
|
||||||
|
<el-input placeholder="请选择" v-model="orgName" >
|
||||||
|
<el-button @click="showChooseOrg()" slot="append" icon="el-icon-search">选择</el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="目标人群" required>
|
<el-form-item label="目标人群" required>
|
||||||
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
|
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -378,6 +370,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--选择图片-->
|
<!--选择图片-->
|
||||||
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
<filecloud :show="dlgFileChoose.show" @choose="changeCourseImage" @close="choseChoose"></filecloud>
|
||||||
|
<chooseOrg ref="refChooseOrg" @confirm="confirmChooseOrg"></chooseOrg>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -391,19 +384,23 @@ import scene from '../../api/modules/scene.js';
|
|||||||
import apiUserGroup from '../../api/modules/usergroup.js';
|
import apiUserGroup from '../../api/modules/usergroup.js';
|
||||||
import apiTeacher from '../../api/modules/teacher.js';
|
import apiTeacher from '../../api/modules/teacher.js';
|
||||||
import apiTag from '../../api/modules/tag.js';
|
import apiTag from '../../api/modules/tag.js';
|
||||||
|
import apiHRBP from '../../api/boe/HRBP.js';
|
||||||
import apiCourse from '../../api/modules/course.js';
|
import apiCourse from '../../api/modules/course.js';
|
||||||
|
import apiOrg from '../../api/system/organiza.js';
|
||||||
import WxEditor from '@/components/Editor/index.vue';
|
import WxEditor from '@/components/Editor/index.vue';
|
||||||
import catalogSort from '@/components/Course/catalogSort.vue';
|
import catalogSort from '@/components/Course/catalogSort.vue';
|
||||||
import { courseType, getType } from '../../utils/tools.js';
|
import { courseType, getType } from '../../utils/tools.js';
|
||||||
import { mapGetters, mapActions } from 'vuex';
|
import { mapGetters, mapActions } from 'vuex';
|
||||||
import filecloud from '@/components/FileCloud/index.vue';
|
import filecloud from '@/components/FileCloud/index.vue';
|
||||||
|
import chooseOrg from '@/components/System/chooseOrg.vue';
|
||||||
export default {
|
export default {
|
||||||
props: {},
|
props: {},
|
||||||
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice},
|
components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice,chooseOrg},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
checked:false,
|
checked:false,
|
||||||
courseInfoFormCheckedShow:false,
|
courseInfoFormCheckedShow:false,
|
||||||
|
orgChooseShow:false,
|
||||||
weikeReset: '',
|
weikeReset: '',
|
||||||
onlineReset: '',
|
onlineReset: '',
|
||||||
sysTypeListMap: [],
|
sysTypeListMap: [],
|
||||||
@@ -432,11 +429,14 @@ export default {
|
|||||||
courseCoverurl: '', //显示的图片
|
courseCoverurl: '', //显示的图片
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
requireSaveCourse: false,
|
requireSaveCourse: false,
|
||||||
|
orgName:'',
|
||||||
|
orgKid:'',
|
||||||
courseInfo: {
|
courseInfo: {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
orderStudy: false,
|
orderStudy: false,
|
||||||
type: 10,
|
type: 10,
|
||||||
|
orgId:'',
|
||||||
coverImg: '',
|
coverImg: '',
|
||||||
source: 1,
|
source: 1,
|
||||||
forUsers: '',
|
forUsers: '',
|
||||||
@@ -493,7 +493,7 @@ export default {
|
|||||||
this.getSceneData();
|
this.getSceneData();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['resOwnerMap', 'sysTypeMap']),
|
...mapGetters(['resOwnerMap', 'sysTypeMap','userInfo']),
|
||||||
catalogTree() {
|
catalogTree() {
|
||||||
let treeList = [];
|
let treeList = [];
|
||||||
let $this = this;
|
let $this = this;
|
||||||
@@ -531,8 +531,19 @@ export default {
|
|||||||
this.loadResOwners();
|
this.loadResOwners();
|
||||||
this.loadSysTypes();
|
this.loadSysTypes();
|
||||||
this.loadUserGroup();
|
this.loadUserGroup();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showChooseOrg(){
|
||||||
|
this.$refs.refChooseOrg.dlgShow = true;
|
||||||
|
},
|
||||||
|
confirmChooseOrg(orgInfo){
|
||||||
|
//console.log(orgInfo,'orgInfo');
|
||||||
|
this.orgName=orgInfo.name;
|
||||||
|
this.orgKid=orgInfo.kid;
|
||||||
|
this.courseInfo.orgId=orgInfo.id;
|
||||||
|
this.$refs.refChooseOrg.dlgShow = false;
|
||||||
|
},
|
||||||
getTeacherList(res) {
|
getTeacherList(res) {
|
||||||
this.teacherValues = res;
|
this.teacherValues = res;
|
||||||
},
|
},
|
||||||
@@ -652,11 +663,16 @@ export default {
|
|||||||
this.onlineReset = Math.round(Math.random()) + '';
|
this.onlineReset = Math.round(Math.random()) + '';
|
||||||
this.courseChooseShow = true;
|
this.courseChooseShow = true;
|
||||||
this.biaoke.tabIndex = 'base';
|
this.biaoke.tabIndex = 'base';
|
||||||
|
|
||||||
|
this.courseInfo.orgId=this.userInfo.departId;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//console.log(editData,'editData');
|
//console.log(editData,'editData');
|
||||||
this.weikeReset = editData.id;
|
this.weikeReset = editData.id;
|
||||||
this.onlineReset = editData.id;
|
this.onlineReset = editData.id;
|
||||||
//console.log("编辑课程?");
|
//console.log("编辑课程?");
|
||||||
|
this.orgName=editData.orgName;
|
||||||
|
this.courseInfo.orgId=editData.orgId;
|
||||||
this.curCourseId = editData.id; //设置
|
this.curCourseId = editData.id; //设置
|
||||||
this.courseInfo.type = editData.type; //设置课程类型,因为这里的课程对象可能不全,所以只能设置值,不能整个对象附值
|
this.courseInfo.type = editData.type; //设置课程类型,因为这里的课程对象可能不全,所以只能设置值,不能整个对象附值
|
||||||
this.getDetail(editData.id); //获取课程的详细信息
|
this.getDetail(editData.id); //获取课程的详细信息
|
||||||
@@ -667,6 +683,15 @@ export default {
|
|||||||
this.biaoke.dlgShow = true;
|
this.biaoke.dlgShow = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.orgKid='';
|
||||||
|
if(this.courseInfo.orgId){
|
||||||
|
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
||||||
|
if(rrs.status==200){
|
||||||
|
this.orgName=rrs.result.name;
|
||||||
|
this.orgKid=rrs.result.kid;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
resetCurCourseContent() {
|
resetCurCourseContent() {
|
||||||
this.curContent = { id: '', contentType: 0, contentName: '', content: '', csectionId: '', contentName: '', contentRefId: '', courseId: this.courseInfo.id };
|
this.curContent = { id: '', contentType: 0, contentName: '', content: '', csectionId: '', contentName: '', contentRefId: '', courseId: this.courseInfo.id };
|
||||||
@@ -1037,6 +1062,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitCourse() {
|
submitCourse() {
|
||||||
|
if(!this.courseInfo.orgId || !this.orgKid){
|
||||||
|
this.$message.success('请选择资源归属');
|
||||||
|
return;
|
||||||
|
}
|
||||||
//console.log(this.resOwnerListMap[0],'this.resOwnerListMap[0]');
|
//console.log(this.resOwnerListMap[0],'this.resOwnerListMap[0]');
|
||||||
//return;
|
//return;
|
||||||
let ownerCode=this.resOwnerListMap[0].code;
|
let ownerCode=this.resOwnerListMap[0].code;
|
||||||
@@ -1127,22 +1156,38 @@ export default {
|
|||||||
};
|
};
|
||||||
this.btnLoading = true;
|
this.btnLoading = true;
|
||||||
let $this = this;
|
let $this = this;
|
||||||
apiCourse.submitCourse(postData).then(res => {
|
//先获取课程内容
|
||||||
//this.btnLoading=false;
|
apiHRBP.getHRBP(this.orgKid).then(rs=>{
|
||||||
setTimeout(function() {
|
if(rs.status==200){
|
||||||
|
postData.auditUser={
|
||||||
|
email:rs.result.email,
|
||||||
|
code:rs.result.user_no,
|
||||||
|
name:rs.result.real_name,
|
||||||
|
kid:rs.result.user_id,
|
||||||
|
orgId:rs.result.orgnization_id,
|
||||||
|
}
|
||||||
|
apiCourse.submitCourse(postData).then(res => {
|
||||||
|
//this.btnLoading=false;
|
||||||
|
setTimeout(function() {
|
||||||
|
$this.btnLoading = false;
|
||||||
|
}, 1000);
|
||||||
|
if (res.status === 200) {
|
||||||
|
//提交成功,直接关闭当前窗口
|
||||||
|
this.$message.success('提交成功!!!');
|
||||||
|
this.biaoke.dlgShow = false;
|
||||||
|
this.weike.dlgShow = false;
|
||||||
|
//提交成功回调处理
|
||||||
|
this.$emit('submitSuccess');
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
$this.btnLoading = false;
|
$this.btnLoading = false;
|
||||||
}, 1000);
|
this.$message.error('获取审核HRBP失败');
|
||||||
if (res.status === 200) {
|
|
||||||
//提交成功,直接关闭当前窗口
|
|
||||||
this.$message.success('提交成功!!!');
|
|
||||||
this.biaoke.dlgShow = false;
|
|
||||||
this.weike.dlgShow = false;
|
|
||||||
//提交成功回调处理
|
|
||||||
this.$emit('submitSuccess');
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.message);
|
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 教师列标,远程查询
|
// 教师列标,远程查询
|
||||||
async remoteFindTeacher(query) {
|
async remoteFindTeacher(query) {
|
||||||
|
|||||||
Reference in New Issue
Block a user