提交 863bbf44 编写于 作者: huangwensu's avatar huangwensu

ie兼容

上级 2cc2f991
......@@ -2,6 +2,8 @@
<html>
<head>
<meta charset="utf-8">
<meta content="云鹊医,云鹊健康,工作站,项目管理,教培项目,学情报告,随访管理,预约随访" name="keywords">
<meta content="云鹊医工作站用于管理人员的日常操作,支持提交内容审核、管理项目、管理随访计划等功能。" name="description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
<meta name="screen-orientation" content="portrait"/>
<meta name="apple-mobile-web-app-capable" content="yes">
......
......@@ -68,13 +68,13 @@ export default {
vm.$router.push({ path: 'home' })
} else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl() // 没有token返回登录页面
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return
}
}
}else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl() // 没有token返回登录页面
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return
}
}
......
// import "@babel/polyfill";
import "@babel/polyfill";
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './router/router'
......
......@@ -10,7 +10,7 @@ export const envConfig = {
// baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
qiniuFileUrl: "http://localhost:10201/contents/admin/qiniu/token1",
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
......
......@@ -152,8 +152,8 @@ export function getQiniuToken1() {
}
// 登录URL
export function getLoginUrl() {
return getConfigByEnvType('loginUrl')
export function getLoginUrl(param) {
return getConfigByEnvType('loginUrl') + param
}
export function getInnerLoginUrl() {
return getConfigByEnvType('innerLoginUrl')
......
......@@ -295,7 +295,8 @@ let validateRepeatWord = function(rule, value, callback, message) {
let req = {
token: vm._token,
name: value,
idType: vm.idType // 1内部 2外部
idType: vm.idType, // 1内部 2外部
id: null || vm.componentId
}
if(vm.itemName != value) {
vm.GET('portal/portalComponent/checkComponentName',req).then((res) => {
......@@ -314,20 +315,30 @@ let validateRepeatWord = function(rule, value, callback, message) {
// 判断模块是否重名(对外开放时候验证)
let validateModuleName = function(rule, value, callback, message) {
for(let i = 0;i<vm.componentList.moduleModelList.length;i++) {
if(vm.componentList.moduleModelList[i].openFlag == 2) {
vm.GET('portal/portalComponent/checkModuleName',{name: value}).then((res) => {
if(res.code == '000000') {
if(res.data.resultFlag > 0) {
callback(new Error(message))
return
}else {
callback()
}
vm.GET('portal/portalComponent/checkModuleName',{name: value,openFlag: vm.componentList.moduleModelList[i].openFlag}).then((res) => {
if(res.code == '000000') {
if(res.data.resultFlag > 0) {
callback(new Error(message))
return
}else {
callback()
}
})
}else {
callback()
}
}
})
// if(vm.componentList.moduleModelList[i].openFlag == 2) {
// vm.GET('portal/portalComponent/checkModuleName',{name: value}).then((res) => {
// if(res.code == '000000') {
// if(res.data.resultFlag > 0) {
// callback(new Error(message))
// return
// }else {
// callback()
// }
// }
// })
// }else {
// callback()
// }
}
}
export default {
......@@ -505,7 +516,6 @@ export default {
},
// 暂存(下一步)
storageAndNext(flag) {
vm.itemName = vm.portalComponent.name
if(vm.componentId) { // 编辑
vm.submitBasicData(flag,'portal/portalComponent/updatePortalComponent')
}else{ // 新增
......@@ -540,24 +550,60 @@ export default {
vm.isStorage = false
},
submitBasic(flag,url) {
vm.portalComponent.idType = vm.idType
vm.portalComponent.id = vm.componentId
vm.POST(url,{ model: vm.portalComponent }).then((res) => {
if( res.code == '000000') {
if(!vm.componentId) {
vm.componentId = res.data
let req = {
token: vm._token,
name: vm.portalComponent.name,
idType: vm.idType, // 1内部 2外部
id: null || vm.componentId
}
if(vm.portalComponent.name != vm.itemName) {
vm.GET('portal/portalComponent/checkComponentName',req).then((res) => {
if(res.code == '000000') {
if(res.data.resultFlag == 2) {
vm.$message.info("该组件名称已存在,请使用一个新的组件名称")
return
}else {
vm.portalComponent.idType = vm.idType
vm.portalComponent.id = vm.componentId
vm.POST(url,{ model: vm.portalComponent }).then((res) => {
if( res.code == '000000') {
if(!vm.componentId) {
vm.componentId = res.data
}
if(flag == 2) {
vm.stepNum = 2
vm.getTemplateData()
vm.getModuleData()
vm.getTestListData()
vm.getCourseData()
} else {
vm.$message.info("暂存成功!")
}
}
})
}
}
if(flag == 2) {
vm.stepNum = 2
vm.getTemplateData()
vm.getModuleData()
vm.getTestListData()
vm.getCourseData()
} else {
vm.$message.info("暂存成功!")
})
}else {
vm.portalComponent.idType = vm.idType
vm.portalComponent.id = vm.componentId
vm.POST(url,{ model: vm.portalComponent }).then((res) => {
if( res.code == '000000') {
if(!vm.componentId) {
vm.componentId = res.data
}
if(flag == 2) {
vm.stepNum = 2
vm.getTemplateData()
vm.getModuleData()
vm.getTestListData()
vm.getCourseData()
} else {
vm.$message.info("暂存成功!")
}
}
}
})
})
}
},
// 上传组件图片
beforeAvatarUpload(file) {
......@@ -676,40 +722,6 @@ export default {
removeTab(targetName) {
for(let i = 0;i<vm.componentList.moduleModelList.length;i++) {
if((targetName - 1) == i) {
// if(vm.componentList.moduleModelList[i].id) {
// if(vm.componentList.moduleModelList[i].templetModelList) {
// vm.$confirm('删除模块会将改模块下已有模板同时删除,确认需要删除吗?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
// if( res.code == '000000') {
// vm.$message.info('成功删除模块!')
// }
// vm.getModuleData()
// vm.firstTab = i + ''
// })
// }).catch(() => {
// vm.$message({
// type: 'info',
// message: '已取消删除'
// })
// })
// }else {
// vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
// if( res.code == '000000') {
// vm.$message.info('成功删除模块!')
// }
// vm.getModuleData()
// vm.firstTab = i + ''
// })
// }
// }else {
// vm.componentList.moduleModelList.splice(i,1)
// vm.firstTab = i + ''
// }
if(vm.componentList.moduleModelList[i].templetModelList) {
vm.$confirm('删除模块会将改模块下已有模板同时删除,确认需要删除吗?', '提示', {
confirmButtonText: '确定',
......@@ -922,12 +934,22 @@ export default {
vm.$message.info("模块内容不能为空")
return
}
for(let j = 0; j < vm.componentList.moduleModelList[i].templetModelList.length; j++) {
for(let k = 0; k < vm.componentList.moduleModelList[i].templetModelList[j].partModelList.length; k++) {
if(!vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content1) {
vm.$message.info( vm.componentList.moduleModelList[i].templetModelList[j].name + "中名称为空,请添加内容后保存")
return
// 考试
if(vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].type == 1) {
if(!vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content1 || !vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content2) {
vm.$message.info( vm.componentList.moduleModelList[i].templetModelList[j].name + "中考试为空,请添加考试保存")
return
}
} else {
if(!vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content1 || !vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content2) {
vm.$message.info( vm.componentList.moduleModelList[i].templetModelList[j].name + "中课程为空,请添加课程保存")
return
}
}
}
}
}else{ // 暂存
......
......@@ -55,7 +55,7 @@ export default {
if(vm.idType == 1) { // 内部
window.location.href = getInnerLoginUrl()
} else {
window.location.href = getLoginUrl()
window.location.href = getLoginUrl('?from=work&type=logout')
}
}
if(command === 'forward') {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册