mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
对接修改
This commit is contained in:
@@ -1,197 +1,27 @@
|
||||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
import { Notification, MessageBox, Message } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/token'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
/**
|
||||
*request请求 axios.request(config)
|
||||
*requestJson请求 axios.request(config)
|
||||
*get请求 axios.get(url[, config])
|
||||
*post请求 axios.post(url[, data[, config]])
|
||||
*postJson请求 axios.post(url[, data[, config]])
|
||||
*put请求 axios.put(url[, data[, config]])
|
||||
*putJson请求 axios.put(url[, data[, config]])
|
||||
*patch请求 axios.patch(url[, data[, config]])
|
||||
*patchJson请求 axios.patch(url[, data[, config]])
|
||||
*delete请求 axios.delete(url[, config])
|
||||
*/
|
||||
/** 管理端接口 **/
|
||||
import ajax from '../unionAjax.js';
|
||||
const baseURL ="/manageApi";
|
||||
|
||||
|
||||
// const ReLoginUrl=process.env.VUE_APP_LOGIN_URL;
|
||||
const TokenName='token';
|
||||
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
|
||||
//只是用于发送json对象数据时使用post,put,patch
|
||||
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
|
||||
//只是用于发送json对象数据时使用post,put,patch
|
||||
//用于普通的发送请求
|
||||
const formRequest=axios.create({
|
||||
// headers:{'Content-Type':'application/x-www-form-urlencoded'},
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
// baseURL: process.env.VUE_APP_CESOURCE_BASE_API,
|
||||
//超时
|
||||
timeout: 10000,
|
||||
})
|
||||
//发送json对象的拦截器
|
||||
formRequest.interceptors.request.use(config => {
|
||||
//是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
let curToken=getToken();
|
||||
//curToken='eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NzIzMTE2MTIsImV4cCI6MTY3MjMxODgxMiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.a4f41376e994c5fcd3ab537ce17572ef4c633863f87785cf7b6ffa353e2ed51c';
|
||||
if (curToken && !isToken) {
|
||||
config.headers[TokenName] = curToken // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
});
|
||||
formRequest.interceptors.response.use(res => {
|
||||
//console.log(res);
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
}else{
|
||||
if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
return Promise.reject(new Error(msg))
|
||||
}else{
|
||||
//Message({message: res.data.message, type: 'error'});
|
||||
//console.log('err' + res.data.error);
|
||||
return res.data
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err',error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "网络异常,请稍后重试";
|
||||
}
|
||||
else if (message.includes("timeout")) {
|
||||
message = "网络异常或接口错误,请求超时";
|
||||
}
|
||||
else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* request请求,可以自定义参数
|
||||
*/
|
||||
const request=formRequest.request;
|
||||
|
||||
/**
|
||||
* get请求 ,只有url
|
||||
*/
|
||||
const get = function(baseURL,url){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'get',
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'}
|
||||
})
|
||||
/**用户的待办任务数量*/
|
||||
const getTaskNum = function(){
|
||||
return ajax.get(baseURL,'/todoTask/queryTodoTaskCounts');
|
||||
}
|
||||
|
||||
/**
|
||||
* post请求
|
||||
* @param {Object} url
|
||||
* @param {Object} postData
|
||||
*/
|
||||
const post=function(baseURL,url,postData){
|
||||
if(postData){
|
||||
postData=qs.stringify(postData);
|
||||
}
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'post',
|
||||
data:postData,
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'}
|
||||
})
|
||||
/**用户的待办任务数量
|
||||
{
|
||||
"pageNo":1,
|
||||
"pageSize":10,
|
||||
"cmtask_name":"",任务名称
|
||||
"cmtask_code":"",任务Id
|
||||
"cmtask_status":"",状态
|
||||
"cmtask_id":"965341999643234304" 学员id,当前人的
|
||||
}
|
||||
//post请求
|
||||
const postForm=function(baseURL,url,data){
|
||||
return request({
|
||||
baseURL,
|
||||
url,
|
||||
data,
|
||||
method: 'post',
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'}
|
||||
});
|
||||
}
|
||||
// const postJson=jsonRequest.post;
|
||||
|
||||
const postJson=function(baseURL,url,postData){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'post',
|
||||
data:postData,
|
||||
headers:{'Content-Type':'application/json'},
|
||||
})
|
||||
*/
|
||||
const userTaskList = function(data){
|
||||
return ajax.postJson(baseURL,'/todoTask/queryTodoTaskDetail',data);
|
||||
}
|
||||
|
||||
// 导出文件请求定义
|
||||
const postJsonToFile=function(baseURL,url,postData){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'post',
|
||||
data:postData,
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* put请求
|
||||
*/
|
||||
const put=function(baseURL,url,data){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'put',
|
||||
data:data,
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'}
|
||||
})
|
||||
}
|
||||
|
||||
const putJson=function(baseURL,url,data){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'put',
|
||||
data:data,
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
tokenName:TokenName,
|
||||
request,
|
||||
get,
|
||||
post,
|
||||
postJson,
|
||||
postJsonToFile,
|
||||
put,
|
||||
putJson,
|
||||
getTaskNum,
|
||||
userTaskList
|
||||
}
|
||||
|
||||
197
src/api/unionAjax.js
Normal file
197
src/api/unionAjax.js
Normal file
@@ -0,0 +1,197 @@
|
||||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
import { Notification, MessageBox, Message } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/token'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
/**
|
||||
*request请求 axios.request(config)
|
||||
*requestJson请求 axios.request(config)
|
||||
*get请求 axios.get(url[, config])
|
||||
*post请求 axios.post(url[, data[, config]])
|
||||
*postJson请求 axios.post(url[, data[, config]])
|
||||
*put请求 axios.put(url[, data[, config]])
|
||||
*putJson请求 axios.put(url[, data[, config]])
|
||||
*patch请求 axios.patch(url[, data[, config]])
|
||||
*patchJson请求 axios.patch(url[, data[, config]])
|
||||
*delete请求 axios.delete(url[, config])
|
||||
*/
|
||||
|
||||
|
||||
// const ReLoginUrl=process.env.VUE_APP_LOGIN_URL;
|
||||
const TokenName='token';
|
||||
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
|
||||
//只是用于发送json对象数据时使用post,put,patch
|
||||
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
|
||||
//只是用于发送json对象数据时使用post,put,patch
|
||||
//用于普通的发送请求
|
||||
const formRequest=axios.create({
|
||||
// headers:{'Content-Type':'application/x-www-form-urlencoded'},
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
// baseURL: process.env.VUE_APP_CESOURCE_BASE_API,
|
||||
//超时
|
||||
timeout: 10000,
|
||||
})
|
||||
//发送json对象的拦截器
|
||||
formRequest.interceptors.request.use(config => {
|
||||
//是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
let curToken=getToken();
|
||||
//curToken='eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NzIzMTE2MTIsImV4cCI6MTY3MjMxODgxMiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.a4f41376e994c5fcd3ab537ce17572ef4c633863f87785cf7b6ffa353e2ed51c';
|
||||
if (curToken && !isToken) {
|
||||
config.headers[TokenName] = curToken // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
});
|
||||
formRequest.interceptors.response.use(res => {
|
||||
//console.log(res);
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
}else{
|
||||
if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
return Promise.reject(new Error(msg))
|
||||
}else{
|
||||
//Message({message: res.data.message, type: 'error'});
|
||||
//console.log('err' + res.data.error);
|
||||
return res.data
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err',error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "网络异常,请稍后重试";
|
||||
}
|
||||
else if (message.includes("timeout")) {
|
||||
message = "网络异常或接口错误,请求超时";
|
||||
}
|
||||
else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* request请求,可以自定义参数
|
||||
*/
|
||||
const request=formRequest.request;
|
||||
|
||||
/**
|
||||
* get请求 ,只有url
|
||||
*/
|
||||
const get = function(baseURL,url){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'get',
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* post请求
|
||||
* @param {Object} url
|
||||
* @param {Object} postData
|
||||
*/
|
||||
const post=function(baseURL,url,postData){
|
||||
if(postData){
|
||||
postData=qs.stringify(postData);
|
||||
}
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'post',
|
||||
data:postData,
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'}
|
||||
})
|
||||
}
|
||||
//post请求
|
||||
const postForm=function(baseURL,url,data){
|
||||
return request({
|
||||
baseURL,
|
||||
url,
|
||||
data,
|
||||
method: 'post',
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'}
|
||||
});
|
||||
}
|
||||
// const postJson=jsonRequest.post;
|
||||
|
||||
const postJson=function(baseURL,url,postData){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'post',
|
||||
data:postData,
|
||||
headers:{'Content-Type':'application/json'},
|
||||
})
|
||||
}
|
||||
|
||||
// 导出文件请求定义
|
||||
const postJsonToFile=function(baseURL,url,postData){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'post',
|
||||
data:postData,
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* put请求
|
||||
*/
|
||||
const put=function(baseURL,url,data){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'put',
|
||||
data:data,
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'}
|
||||
})
|
||||
}
|
||||
|
||||
const putJson=function(baseURL,url,data){
|
||||
return request({
|
||||
baseURL,
|
||||
url: url,
|
||||
method: 'put',
|
||||
data:data,
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
tokenName:TokenName,
|
||||
request,
|
||||
get,
|
||||
post,
|
||||
postJson,
|
||||
postJsonToFile,
|
||||
put,
|
||||
putJson,
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { getToken, setToken, removeToken } from '@/utils/token'
|
||||
import app from '@/api/console.js'
|
||||
import apiLogin from '@/api/login.js'
|
||||
import apiMessage from '@/api/system/message.js'
|
||||
import apiManage from '@/api/manage/manage.js'
|
||||
import apiCourse from "@/api/modules/course.js";
|
||||
import apiBoeCourse from "@/api/boe/course.js";
|
||||
import apiBoeLogout from "@/api/boe/login.js";
|
||||
@@ -79,17 +80,24 @@ const user = {
|
||||
})
|
||||
},
|
||||
refrashStudyTaskCount({ commit }) {
|
||||
apiBoeCourse.cmtaskList({page:1,size:1,get_count:1}).then(res=>{
|
||||
if(res.status==200){
|
||||
let count = 0;
|
||||
if(res.result.count > 0){
|
||||
count = res.result.count;
|
||||
}
|
||||
commit('SET_StudyTaskCount',count);
|
||||
}else{
|
||||
console.log("读取学习任务数失败:"+res.message);
|
||||
}
|
||||
})
|
||||
apiManage.getTaskNum().then(res=>{
|
||||
if(res.code==200){
|
||||
commit('SET_StudyTaskCount',res.data.todoTaskCounts);
|
||||
}else{
|
||||
console.log("获取学习任务数失败:"+res.msg);
|
||||
}
|
||||
})
|
||||
// apiBoeCourse.cmtaskList({page:1,size:1,get_count:1}).then(res=>{
|
||||
// if(res.status==200){
|
||||
// let count = 0;
|
||||
// if(res.result.count > 0){
|
||||
// count = res.result.count;
|
||||
// }
|
||||
// commit('SET_StudyTaskCount',count);
|
||||
// }else{
|
||||
// console.log("读取学习任务数失败:"+res.message);
|
||||
// }
|
||||
// })
|
||||
},
|
||||
//设置用户身份
|
||||
SetIdentity({ commit }, iden) {
|
||||
|
||||
@@ -131,10 +131,10 @@
|
||||
<el-table-column label="操作" width="180px" fixed="right">
|
||||
<template slot-scope="scope" class="btn-gl">
|
||||
<el-button type="text" size="mini" v-if="scope.row.status == 5 && !scope.row.published" @click="releaseData(scope.row)">发布</el-button>
|
||||
<el-button v-if="scope.row.published" @click="showManageStudy(scope.row)" type="text" size="mini">管理</el-button>
|
||||
<el-button v-if="scope.row.status == 2" @click="withdraw(scope.row)" type="text" size="mini">撤回</el-button>
|
||||
<el-button v-if="pageManage && scope.row.published" @click="showStudent(scope.row)" type="text" size="mini">学员</el-button>
|
||||
<el-button v-if="!forChoose && scope.row.published" @click="showManageStudy(scope.row)" type="text" size="mini">管理</el-button>
|
||||
<el-button v-if="!forChoose && scope.row.status == 2" @click="withdraw(scope.row)" type="text" size="mini">撤回</el-button>
|
||||
<el-button v-if="scope.row.status != 2" type="text" size="mini" @click="editCurriculum(scope.row)">编辑</el-button>
|
||||
<el-button v-if="scope.row.status != 2 && !scope.row.published" type="text" size="mini" @click="copyCourse(scope.row)">复制</el-button>
|
||||
<el-button v-if="scope.row.status != 2 && !scope.row.published" type="text" size="mini" @click="delItem(scope.row)">删除</el-button>
|
||||
<el-dropdown v-if="scope.row.published" type="text" size="mini" style="margin-left:10px">
|
||||
<el-button type="text" size="mini">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
|
||||
@@ -143,6 +143,7 @@
|
||||
<el-dropdown-item v-if="scope.row.published" @click.native="isDisable(scope.row)">{{scope.row.enabled? '停用':'启用'}}</el-dropdown-item>
|
||||
<el-dropdown-item v-if="scope.row.published" @click.native="showQrimage(scope.row)">二维码</el-dropdown-item><!--发布之后才可以查看二维码-->
|
||||
<el-dropdown-item v-if="scope.row.published" @click.native="setTop(scope.row)">{{scope.row.isTop? '取消置顶':'置顶'}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -298,6 +299,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
forChoose:false,
|
||||
pageManage:false,
|
||||
showDetails: false,
|
||||
examin:{
|
||||
detailType: '',
|
||||
@@ -380,6 +382,10 @@ export default {
|
||||
if(chooseFlag && chooseFlag=='choose'){
|
||||
this.forChoose=true;
|
||||
}
|
||||
if(this.$route.query && this.$route.query.page && this.$route.query.page == 'manage') {
|
||||
this.pageManage=true;
|
||||
}
|
||||
|
||||
if (this.$route.query && this.$route.query.open && this.$route.query.open == 'new') {
|
||||
this.addNewCourse();
|
||||
}
|
||||
@@ -398,6 +404,10 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
showStudent(row){
|
||||
//出现学员管理
|
||||
window.parent.openSelectStu(row);
|
||||
},
|
||||
handleChoose(row){ //选择课程
|
||||
window.parent.selectCourse(row);
|
||||
},
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
<span v-if="item.cmtask_status==0">未开始</span>
|
||||
<span v-if="item.cmtask_status==1">进行中</span>
|
||||
<span v-if="item.cmtask_status==2">已完成</span>
|
||||
</div>
|
||||
<div class="uc-course-time">推送时间:{{ formatsec(Number(item.updated_at) * 1000 )}}</div>
|
||||
</div>
|
||||
<!-- <div class="uc-course-time">推送时间:{{ formatsec(Number(item.updated_at) * 1000 )}}</div> -->
|
||||
<div class="uc-course-time">推送时间:{{ item.created_at}}</div>
|
||||
</div>
|
||||
<div class="uc-course-btns">
|
||||
<el-button @click="jumpRouter(item)" type="primary" size="small">开始学习</el-button>
|
||||
@@ -68,9 +69,10 @@
|
||||
<script>
|
||||
import studyItem from '@/components/Course/studyItem.vue';
|
||||
import apiBoeCourse from '@/api/boe/course.js';
|
||||
import apiManage from '@/api/manage/manage.js'
|
||||
import {formatsec} from '@/utils/datetime.js'
|
||||
export default {
|
||||
name: 'ucStudyCourses',
|
||||
name: 'ucStudyTask',
|
||||
components: { studyItem },
|
||||
data() {
|
||||
return {
|
||||
@@ -122,6 +124,13 @@ export default {
|
||||
jumpRouter(item) {
|
||||
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`,'_self' )
|
||||
location.href=`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`;
|
||||
if(item.cmtask_type==1){ //学习路径图
|
||||
//let params=encodeURIComponent('projectId='+courseId);
|
||||
//this.$router.push('/forward?to='+studentPath+'/projectdetails¶ms='+params);
|
||||
location.href='https://u-pre.boe.com/student-h5/projectdetails?projectId='+item.id
|
||||
}else if(item.cmtask_type==2){ //学习项目
|
||||
location.href='https://u-pre.boe.com/student-h5/projectdetails?projectId='+item.id
|
||||
}
|
||||
},
|
||||
|
||||
loadBoeData() {
|
||||
@@ -129,25 +138,35 @@ export default {
|
||||
this.params.cmtask_status = this.status;
|
||||
}
|
||||
let params={
|
||||
// keyword:this.keyword,
|
||||
page:this.page,
|
||||
size:this.size,
|
||||
pageNo:this.page,
|
||||
pageSize:this.size,
|
||||
cmtask_status:this.params.cmtask_status,
|
||||
cmtask_name:this.params.cmtask_name,
|
||||
}
|
||||
this.loading=true;
|
||||
apiBoeCourse.cmtaskList(params).then(res=>{
|
||||
if(res.status==200){
|
||||
this.total = res.result.count
|
||||
this.couresList = res.result.list;
|
||||
}else{
|
||||
this.$message.error('查询数据失败:'+res.message);
|
||||
}
|
||||
this.loading=false;
|
||||
apiManage.userTaskList(params).then(res=>{
|
||||
if(res.code==200){
|
||||
this.total = 10;
|
||||
this.couresList = res.data;
|
||||
}else{
|
||||
this.$message.error('查询数据失败:'+res.msg);
|
||||
}
|
||||
this.loading=false;
|
||||
}).catch(()=>{
|
||||
this.loading=false;
|
||||
})
|
||||
// apiBoeCourse.cmtaskList(params).then(res=>{
|
||||
// if(res.status==200){
|
||||
// this.total = res.result.count
|
||||
// this.couresList = res.result.list;
|
||||
// }else{
|
||||
// this.$message.error('查询数据失败:'+res.message);
|
||||
// }
|
||||
// this.loading=false;
|
||||
|
||||
}).catch(()=>{
|
||||
this.loading=false;
|
||||
})
|
||||
// }).catch(()=>{
|
||||
// this.loading=false;
|
||||
// })
|
||||
},
|
||||
search(){
|
||||
this.loadBoeData()
|
||||
|
||||
Reference in New Issue
Block a user