Compare commits
No commits in common. 'master' and 'dev_202303' have entirely different histories.
master
...
dev_202303
@ -1,6 +1,6 @@ |
||||
{ |
||||
"tabWidth": 2, |
||||
"singleQuote": true, |
||||
"trailingComma": "none", |
||||
"printWidth": 140 |
||||
"tabWidth": 4, |
||||
"singleQuote": true, |
||||
"trailingComma": "none", |
||||
"printWidth": 140 |
||||
} |
@ -1,19 +1,18 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8" /> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
||||
<meta name="keywords" content="深圳或然科技中台" /> |
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> |
||||
<meta name="viewport" content="width=device-width, user-scalable=yes, shrink-to-fit=no" /> |
||||
<title>深圳或然科技中台</title> |
||||
</head> |
||||
<body> |
||||
<noscript> |
||||
<strong>We're sorry but vms doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
||||
</noscript> |
||||
<div id="app"></div> |
||||
<!-- built files will be auto injected --> |
||||
<script src="/dev/styles/tinymce/tinymce.min.js"></script> |
||||
</body> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
||||
<meta name="keywords" content="深圳或然科技中台"> |
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> |
||||
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css"> |
||||
<title>深圳或然科技中台</title> |
||||
</head> |
||||
<body> |
||||
<noscript> |
||||
<strong>We're sorry but vms doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
||||
</noscript> |
||||
<div id="app"></div> |
||||
<!-- built files will be auto injected --> |
||||
</body> |
||||
</html> |
||||
|
@ -1,48 +1,30 @@ |
||||
<template> |
||||
<div id="app"> |
||||
<el-radio-group v-if="Setting.isDev" class="ip" v-model="ip" @change="ipChange"> |
||||
<el-radio :label="0">刘榕ip</el-radio> |
||||
<el-radio :label="1">陈赓ip</el-radio> |
||||
<el-radio :label="2">测试服ip</el-radio> |
||||
</el-radio-group> |
||||
<router-view></router-view> |
||||
</div> |
||||
<div id="app"> |
||||
<router-view></router-view> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import Setting from '@/setting' |
||||
export default { |
||||
name: 'App', |
||||
data () { |
||||
return { |
||||
Setting, |
||||
ip: localStorage.getItem('ip') ? +localStorage.getItem('ip') : 0, |
||||
}; |
||||
}, |
||||
created () { |
||||
window.exitSystem = () => { |
||||
sessionStorage.removeItem('token') |
||||
location.reload() |
||||
export default { |
||||
name: 'App', |
||||
created () { |
||||
//在页面加载时读取sessionStorage里的状态信息 |
||||
if (sessionStorage.getItem("store") ) { |
||||
this.$store.replaceState(Object.assign({}, this.$store.state,JSON.parse(sessionStorage.getItem("store")))) |
||||
} |
||||
|
||||
//在页面刷新时将vuex里的信息保存到sessionStorage里 |
||||
window.addEventListener("beforeunload",()=>{ |
||||
sessionStorage.getItem("token") && sessionStorage.setItem("store",JSON.stringify(this.$store.state)) |
||||
}) |
||||
} |
||||
//在页面加载时读取sessionStorage里的状态信息 |
||||
if (sessionStorage.getItem("store")) { |
||||
this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem("store")))) |
||||
} |
||||
|
||||
//在页面刷新时将vuex里的信息保存到sessionStorage里 |
||||
window.addEventListener("beforeunload", () => { |
||||
sessionStorage.getItem("token") && sessionStorage.setItem("store", JSON.stringify(this.$store.state)) |
||||
}) |
||||
}, |
||||
methods: { |
||||
ipChange (val) { |
||||
localStorage.setItem('ip', val) |
||||
location.reload() |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
@import "./assets/css/main.css"; |
||||
@import "./assets/css/main.css"; |
||||
/* @import "./assets/css/color-dark.css"; */ |
||||
/*深色主题*/ |
||||
@import "./assets/css/theme-green/color-green.css"; |
||||
/* 浅绿色主题 */ |
||||
</style> |
@ -0,0 +1,28 @@ |
||||
.header{ |
||||
background-color: #242f42; |
||||
} |
||||
.login-wrap{ |
||||
background: #324157; |
||||
} |
||||
.plugins-tips{ |
||||
background: #eef1f6; |
||||
} |
||||
.plugins-tips a{ |
||||
color: #20a0ff; |
||||
} |
||||
.el-upload--text em { |
||||
color: #20a0ff; |
||||
} |
||||
.pure-button{ |
||||
background: #20a0ff; |
||||
} |
||||
.tags-li.active { |
||||
border: 1px solid #409EFF; |
||||
background-color: #409EFF; |
||||
} |
||||
.message-title{ |
||||
color: #20a0ff; |
||||
} |
||||
.collapse-btn:hover{ |
||||
background: rgb(40,52,70); |
||||
} |
@ -1,7 +0,0 @@ |
||||
/* 改变主题色变量 */ |
||||
|
||||
$--color-primary: #062c87; |
||||
|
||||
/* 改变 icon 字体路径变量,必需 */ |
||||
$--font-path: '~element-ui/lib/theme-chalk/fonts'; |
||||
@import "~element-ui/packages/theme-chalk/src/index"; |
@ -1,189 +0,0 @@ |
||||
.msg { |
||||
li { |
||||
margin-bottom: 10px; |
||||
border-top: 1px solid #f1f1f1; |
||||
&:first-child { |
||||
border-top: 0; |
||||
} |
||||
.li-wrap { |
||||
position: relative; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
padding: 16px 0; |
||||
.avatar { |
||||
width: 48px; |
||||
height: 48px; |
||||
border-radius: 50%; |
||||
} |
||||
.texts { |
||||
flex: 1; |
||||
margin-left: 24px; |
||||
.name { |
||||
color: rgba(0, 0, 0, 0.85); |
||||
font-size: 16px; |
||||
} |
||||
.date { |
||||
color: rgba(0, 0, 0, 0.45); |
||||
font-size: 14px; |
||||
} |
||||
/deep/img { |
||||
max-width: 95%; |
||||
} |
||||
} |
||||
.reply-name { |
||||
color: #062c87; |
||||
} |
||||
.action { |
||||
display: inline-flex; |
||||
align-items: center; |
||||
margin: 15px 10px 0 0; |
||||
.icon { |
||||
margin: 0 5px; |
||||
color: #062c87; |
||||
font-size: 18px; |
||||
cursor: pointer; |
||||
&:hover { |
||||
opacity: 0.8; |
||||
} |
||||
&:first-child { |
||||
margin-right: 5px; |
||||
} |
||||
&.del { |
||||
color: rgba(0, 0, 0, 0.65); |
||||
border: 1px solid rgba(0, 0, 0, 0.15); |
||||
} |
||||
} |
||||
} |
||||
.like-wrap { |
||||
display: inline-flex; |
||||
align-items: center; |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
.reply { |
||||
margin-top: 20px; |
||||
} |
||||
} |
||||
&.children { |
||||
margin-left: 72px; |
||||
padding-left: 24px; |
||||
background-color: rgba(0, 0, 0, 0.02); |
||||
border-radius: 8px; |
||||
li { |
||||
border-top-color: rgba(0, 0, 0, 0.06); |
||||
} |
||||
} |
||||
} |
||||
.toggle { |
||||
margin: 16px 0; |
||||
text-align: center; |
||||
color: #062c87; |
||||
font-size: 14px; |
||||
span { |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
/deep/.quill { |
||||
background-color: #fff; |
||||
} |
||||
|
||||
/deep/.timeline { |
||||
padding-left: 9%; |
||||
overflow: hidden; |
||||
.el-timeline-item { |
||||
padding-bottom: 40px; |
||||
} |
||||
.el-timeline-item__node--normal { |
||||
top: 30px; |
||||
} |
||||
.el-timeline-item__wrapper { |
||||
top: 15px; |
||||
padding-left: 40px; |
||||
} |
||||
.el-timeline-item__tail { |
||||
height: 250%; |
||||
border-left-width: 1px; |
||||
} |
||||
.sign { |
||||
position: relative; |
||||
display: inline-block; |
||||
margin-left: -12.5%; |
||||
font-size: 14px; |
||||
color: #062c87; |
||||
} |
||||
.draft { |
||||
.ver, |
||||
.sign { |
||||
color: #b1b1b1; |
||||
} |
||||
} |
||||
.ver { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
padding-bottom: 10px; |
||||
margin: -22px 0 20px; |
||||
font-size: 15px; |
||||
color: #062c87; |
||||
border-bottom: 1px dashed #bfbfbf; |
||||
} |
||||
.des { |
||||
p, |
||||
span, |
||||
em { |
||||
font-size: 14px !important; |
||||
} |
||||
} |
||||
.withdraw { |
||||
margin-right: 10px; |
||||
font-size: 13px; |
||||
color: #979797; |
||||
} |
||||
.action { |
||||
margin-left: 15px; |
||||
i { |
||||
margin-left: 8px; |
||||
font-size: 14px; |
||||
color: #062c87; |
||||
cursor: pointer; |
||||
&:hover { |
||||
opacity: 0.9; |
||||
} |
||||
} |
||||
} |
||||
.detail { |
||||
li { |
||||
margin-bottom: 20px; |
||||
} |
||||
.name { |
||||
display: flex; |
||||
align-items: center; |
||||
margin-bottom: 5px; |
||||
font-size: 15px; |
||||
font-weight: 600; |
||||
img { |
||||
width: 20px; |
||||
margin-right: 5px; |
||||
} |
||||
} |
||||
.val { |
||||
font-size: 14px; |
||||
line-height: 1.8; |
||||
white-space: pre-wrap; |
||||
p { |
||||
position: relative; |
||||
color: #6a6a6a; |
||||
&:before { |
||||
content: ''; |
||||
display: inline-block; |
||||
width: 5px; |
||||
height: 5px; |
||||
margin: 0 10px 0 5px; |
||||
vertical-align: middle; |
||||
border-radius: 20px; |
||||
background-color: #c5b8ff; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,29 @@ |
||||
.header{ |
||||
background-color: #fff; |
||||
} |
||||
.login-wrap{ |
||||
background: rgba(56, 157, 170, 0.82);; |
||||
} |
||||
.plugins-tips{ |
||||
background: #f2f2f2; |
||||
} |
||||
.plugins-tips a{ |
||||
color: #00d1b2; |
||||
} |
||||
.el-upload--text em { |
||||
color: #00d1b2; |
||||
} |
||||
.pure-button{ |
||||
background: #00d1b2; |
||||
} |
||||
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus, .pagination > .active > span, .pagination > .active > span:hover, .pagination > .active > span:focus { |
||||
background-color: #00d1b2 !important; |
||||
border-color: #00d1b2 !important; |
||||
} |
||||
.tags-li.active { |
||||
border: 1px solid #9278FF; |
||||
background-color: #9278FF; |
||||
} |
||||
.collapse-btn:hover{ |
||||
background: #00d1b2; |
||||
} |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 946 B |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 432 B |
Before Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 341 B |
Before Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 697 B |
Before Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 702 B |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 768 B |
@ -1,178 +1,116 @@ |
||||
<template> |
||||
<div class="header flex-between"> |
||||
<div class="logo"> |
||||
<img class="cursor" @click="goHome" src="../assets/img/logo.png"> |
||||
</div> |
||||
<div class="header-right"> |
||||
<div class="header-user-con"> |
||||
<div class="user" @click="toPerson"> |
||||
<el-avatar :size="40" :src="$store.state.avatar"></el-avatar> |
||||
<span class="user-avator">{{ userName }}</span> |
||||
<div class="header flex-between"> |
||||
<div class="logo"> |
||||
<img class="cursor" @click="goHome" src="../assets/img/logo.png"> |
||||
</div> |
||||
<div class="header-right"> |
||||
<div class="header-user-con"> |
||||
<div class="user" @click="toPerson"> |
||||
<el-avatar :size="40" :src="$store.state.avatar"></el-avatar> |
||||
<span class="user-avator">{{userName}}</span> |
||||
</div> |
||||
<el-divider class="ml20" direction="vertical"></el-divider> |
||||
<el-button type="text" class="ml20" @click="loginout">退出</el-button> |
||||
</div> |
||||
</div> |
||||
<el-divider class="ml20" direction="vertical"></el-divider> |
||||
<el-button type="text" class="ml20" @click="logout">退出</el-button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
import Bus from '@/libs/bus' |
||||
import Setting from '@/setting' |
||||
export default { |
||||
data () { |
||||
return { |
||||
timer: null, |
||||
Setting, |
||||
userName: '', |
||||
}; |
||||
}, |
||||
mounted () { |
||||
this.getUserInfo() |
||||
}, |
||||
methods: { |
||||
toPerson () { |
||||
if (this.$route.path.split('/').pop() !== 'person') { |
||||
this.$router.push('/person') |
||||
} |
||||
}, |
||||
async logout () { |
||||
await this.$post(this.api.logout) |
||||
localStorage.removeItem('ms_username') |
||||
localStorage.removeItem('token') |
||||
sessionStorage.clear() |
||||
location.reload() |
||||
}, |
||||
goHome () { |
||||
this.$router.push('/customer') |
||||
}, |
||||
|
||||
|
||||
// socket连接成功 |
||||
open () { |
||||
console.log("socket连接成功"); |
||||
}, |
||||
// socket连接失败 |
||||
error () { |
||||
console.log("连接错误"); |
||||
data() { |
||||
return { |
||||
userName: '' |
||||
}; |
||||
}, |
||||
// 接收消息 |
||||
getMessage (msg) { |
||||
console.log("==websocket接收数据=="); |
||||
console.log(JSON.parse(msg.data)); |
||||
|
||||
const { content } = JSON.parse(msg.data) |
||||
// 1赛事、2创业、3考核、4模型。-号拼接携带id |
||||
content == 1 && Bus.$emit('matchSocket') |
||||
content == 4 && Bus.$emit('modelSocket') |
||||
mounted(){ |
||||
this.userName || this.getUserInfo() |
||||
}, |
||||
// 关闭socket |
||||
close () { |
||||
console.log("socket已经关闭"); |
||||
methods: { |
||||
getUserInfo(){ |
||||
this.$get(this.api.queryUserInfoDetails).then(({ result }) => { |
||||
let userInfo = result.hrUserInfo |
||||
if(userInfo.userAvatars) this.$store.commit('userAvatar',{avatar: userInfo.userAvatars}) |
||||
this.userName = userInfo.userName |
||||
const { id } = result.userAccount |
||||
id && this.$store.commit('SET_ACCOUNTID', id) |
||||
this.$store.commit('SET_USERNAME', this.userName) |
||||
}).catch(err => {}) |
||||
}, |
||||
toPerson(){ |
||||
if(this.$route.path.split('/').pop()!=='person'){ |
||||
this.$router.push('/person') |
||||
} |
||||
}, |
||||
loginout() { |
||||
localStorage.removeItem('ms_username'); |
||||
localStorage.removeItem('token'); |
||||
sessionStorage.clear() |
||||
location.reload() |
||||
}, |
||||
goHome(){ |
||||
this.$router.push('/customer') |
||||
} |
||||
}, |
||||
initSocket ({ id, account }) { |
||||
// 实例化socket |
||||
this.socket = new WebSocket(`wss://${Setting.isDev ? '192.168.31.51' : location.host}/nakadai/websocket/${id}/${account}`) |
||||
// this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`) |
||||
// 监听socket连接 |
||||
this.socket.onopen = this.open; |
||||
// 监听socket错误信息 |
||||
this.socket.onerror = this.error; |
||||
// 监听socket消息 |
||||
this.socket.onmessage = this.getMessage; |
||||
}, |
||||
// 心跳检测 |
||||
heartbeatDetection () { |
||||
this.timer = setInterval(async () => { |
||||
sessionStorage.getItem('token') ? await this.$get(this.api.heartbeatDetection) : clearInterval(this.timer) |
||||
}, 58 * 1000) |
||||
}, |
||||
|
||||
|
||||
getUserInfo () { |
||||
this.$get(this.api.queryUserInfoDetails).then(({ result }) => { |
||||
let userInfo = result.hrUserInfo |
||||
if (userInfo.userAvatars) this.$store.commit('userAvatar', { avatar: userInfo.userAvatars }) |
||||
this.userName = userInfo.userName |
||||
const { id } = result.userAccount |
||||
id && this.$store.commit('SET_ACCOUNTID', id) |
||||
this.$store.commit('SET_USERNAME', this.userName) |
||||
this.initSocket(result.userAccount) |
||||
Setting.isPro && this.heartbeatDetection() |
||||
}).catch(err => { }) |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
.header { |
||||
position: relative; |
||||
box-sizing: border-box; |
||||
width: 100%; |
||||
height: 60px; |
||||
font-size: 16px; |
||||
color: #333; |
||||
position: relative; |
||||
box-sizing: border-box; |
||||
width: 100%; |
||||
height: 60px; |
||||
font-size: 16px; |
||||
color: #333; |
||||
} |
||||
|
||||
.header .logo { |
||||
float: left; |
||||
width: 170px; |
||||
height: 40px; |
||||
margin-left: 20px; |
||||
float: left; |
||||
width: 170px; |
||||
height: 40px; |
||||
margin-left: 20px; |
||||
} |
||||
|
||||
.header .logo img { |
||||
width: 100%; |
||||
height: 100%; |
||||
.header .logo img{ |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
|
||||
.header-right { |
||||
float: right; |
||||
padding-right: 50px; |
||||
float: right; |
||||
padding-right: 50px; |
||||
} |
||||
|
||||
.header-user-con { |
||||
display: flex; |
||||
height: 70px; |
||||
align-items: center; |
||||
display: flex; |
||||
height: 70px; |
||||
align-items: center; |
||||
} |
||||
|
||||
.header-user-con .user { |
||||
display: inline-flex; |
||||
align-items: center; |
||||
cursor: pointer; |
||||
.header-user-con .user{ |
||||
display: inline-flex; |
||||
align-items: center; |
||||
cursor: pointer; |
||||
} |
||||
|
||||
.user-avator { |
||||
cursor: pointer; |
||||
margin-left: 10px; |
||||
font-size: 12px; |
||||
cursor: pointer; |
||||
margin-left: 10px; |
||||
font-size: 12px; |
||||
} |
||||
|
||||
.ml20 { |
||||
margin-left: 20px; |
||||
.ml20{ |
||||
margin-left: 20px; |
||||
} |
||||
|
||||
.user-avator img { |
||||
display: block; |
||||
width: 40px; |
||||
height: 40px; |
||||
border-radius: 50%; |
||||
display: block; |
||||
width: 40px; |
||||
height: 40px; |
||||
border-radius: 50%; |
||||
} |
||||
|
||||
/deep/.header-right .el-button--text { |
||||
color: #333; |
||||
|
||||
span { |
||||
font-size: 12px; |
||||
} |
||||
/deep/.header-right .el-button--text{ |
||||
color: #333; |
||||
span { |
||||
font-size: 12px; |
||||
} |
||||
} |
||||
|
||||
.header-right .el-divider--vertical { |
||||
width: 2px; |
||||
height: 15px; |
||||
.header-right .el-divider--vertical{ |
||||
width: 2px; |
||||
height: 15px; |
||||
} |
||||
|
||||
.header-right .el-divider { |
||||
background-color: #333; |
||||
.header-right .el-divider{ |
||||
background-color: #333; |
||||
} |
||||
</style> |
||||
|
@ -1,149 +0,0 @@ |
||||
<template> |
||||
<div class="menus"> |
||||
<el-menu class="nav" :default-active="onRoutes" background-color="#062c87" text-color="#fff" |
||||
active-text-color="#333" unique-opened mode="horizontal" router @select="handleSelect"> |
||||
<template v-for="item in menus"> |
||||
<template v-if="item.subs"> |
||||
<el-submenu :index="item.index" :key="item.index"> |
||||
<template slot="title"> |
||||
<!-- <i :class="item.icon"></i> --> |
||||
<span slot="title">{{ item.title }}</span> |
||||
</template> |
||||
<template v-for="subItem in item.subs"> |
||||
<el-submenu v-if="subItem.subs" :index="subItem.index" :key="subItem.index"> |
||||
<template slot="title">{{ subItem.title }}</template> |
||||
<el-menu-item v-for="(threeItem, i) in subItem.subs" :key="i" :index="threeItem.index">{{ |
||||
threeItem.title |
||||
}}</el-menu-item> |
||||
</el-submenu> |
||||
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }}</el-menu-item> |
||||
</template> |
||||
</el-submenu> |
||||
</template> |
||||
<template v-else> |
||||
<el-menu-item :index="item.index" :key="item.index"> |
||||
<!-- <i :class="item.icon"></i> --> |
||||
<span slot="title">{{ item.title }}</span> |
||||
</el-menu-item> |
||||
</template> |
||||
</template> |
||||
</el-menu> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import Setting from '@/setting' |
||||
import addRoutes from '@/libs/route/addRoutes' |
||||
export default { |
||||
data () { |
||||
return { |
||||
menuList: [ |
||||
{ |
||||
icon: 'el-icon-school', |
||||
index: '/workbench', |
||||
title: '工作台' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-user', |
||||
index: '/customer', |
||||
title: '客户管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-shopping-bag-2', |
||||
index: '/user', |
||||
title: '用户管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-document-checked', |
||||
index: '/order', |
||||
title: '订单管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-office-building', |
||||
index: '/system', |
||||
title: '系统配置' |
||||
}, |
||||
], |
||||
menus: [], |
||||
onRoutes: this.$route.path |
||||
}; |
||||
}, |
||||
watch: { |
||||
"$route.path": function (val) { |
||||
this.menuList.map(e => { |
||||
if (val.replace('/', '') === e.index) { |
||||
this.handleSelect(val.replace('/', '')) |
||||
this.$forceUpdate(); |
||||
} |
||||
}) |
||||
} |
||||
}, |
||||
mounted () { |
||||
sessionStorage.getItem('token') && this.getPer() // 登录了才获取权限 |
||||
}, |
||||
methods: { |
||||
handleSelect (index) { |
||||
this.onRoutes = index |
||||
this.$store.commit('setInfoTab', '1') |
||||
this.$store.commit('setColumnId', '') |
||||
this.$store.commit('setCompetitionCache', null) |
||||
}, |
||||
initMenu () { |
||||
if (Setting.dynamicRoute) { |
||||
this.menus = this.menuList |
||||
return false |
||||
|
||||
const routes = this.$store.state.routes |
||||
const menus = [] |
||||
this.menuList.map(e => { |
||||
routes.find(n => n.path === e.index) && menus.push(e) |
||||
}) |
||||
this.menus = menus |
||||
} else { |
||||
this.menus = this.menuList |
||||
} |
||||
}, |
||||
// 获取权限列表 |
||||
getPer () { |
||||
this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => { |
||||
const routes = res.permissionMenu[0].children |
||||
addRoutes(routes) |
||||
this.initMenu() |
||||
this.$store.commit('setDataPer', res.dataPermissionList) |
||||
}).catch(err => { |
||||
if (err.status === 500) { |
||||
localStorage.removeItem('ms_username'); |
||||
sessionStorage.clear() |
||||
location.reload() |
||||
} |
||||
}) |
||||
}, |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.menus { |
||||
z-index: 2000; |
||||
position: sticky; |
||||
top: 0; |
||||
display: flex; |
||||
justify-content: center; |
||||
background-color: #062c87; |
||||
|
||||
/deep/.nav { |
||||
border-bottom: 0; |
||||
|
||||
&>.el-menu-item { |
||||
height: 56px; |
||||
padding: 0 30px; |
||||
line-height: 56px; |
||||
} |
||||
|
||||
&>.el-menu-item.is-active { |
||||
background-color: #fff !important; |
||||
border-bottom: 0; |
||||
} |
||||
} |
||||
} |
||||
</style> |
@ -1,234 +1,188 @@ |
||||
<template> |
||||
<div class="sidebar"> |
||||
<el-menu :default-active="active" :default-openeds="['1', '2', '3', '4']" background-color="#fff" text-color="#333" |
||||
active-text-color="#062c87" router> |
||||
<template v-for="item in menus"> |
||||
<template v-if="item.children"> |
||||
<el-submenu :index="item.index" :key="item.index"> |
||||
<template slot="title"> |
||||
<span slot="title">{{ item.title }}</span> |
||||
<div> |
||||
<el-menu |
||||
class="sidebar-el-menu" |
||||
:default-active="onRoutes" |
||||
background-color="#324157" |
||||
text-color="#bfcbd9" |
||||
active-text-color="#9278FF" |
||||
unique-opened |
||||
mode="horizontal" |
||||
router |
||||
@select="handleSelect" |
||||
> |
||||
<template v-for="item in menus"> |
||||
<template v-if="item.subs"> |
||||
<el-submenu :index="item.index" :key="item.index"> |
||||
<template slot="title"> |
||||
<i :class="item.icon"></i> |
||||
<span slot="title">{{ item.title }}</span> |
||||
</template> |
||||
<template v-for="subItem in item.subs"> |
||||
<el-submenu |
||||
v-if="subItem.subs" |
||||
:index="subItem.index" |
||||
:key="subItem.index" |
||||
> |
||||
<template slot="title">{{ subItem.title }}</template> |
||||
<el-menu-item |
||||
v-for="(threeItem,i) in subItem.subs" |
||||
:key="i" |
||||
:index="threeItem.index" |
||||
>{{ threeItem.title }}</el-menu-item> |
||||
</el-submenu> |
||||
<el-menu-item |
||||
v-else |
||||
:index="subItem.index" |
||||
:key="subItem.index" |
||||
>{{ subItem.title }}</el-menu-item> |
||||
</template> |
||||
</el-submenu> |
||||
</template> |
||||
<template v-else> |
||||
<el-menu-item :index="item.index" :key="item.index"> |
||||
<i :class="item.icon"></i> |
||||
<span slot="title">{{ item.title }}</span> |
||||
</el-menu-item> |
||||
</template> |
||||
</template> |
||||
<template v-for="subItem in item.children"> |
||||
<el-submenu v-if="subItem.children" :index="subItem.index" :key="subItem.index"> |
||||
<template slot="title">{{ subItem.title }}</template> |
||||
<el-menu-item v-for="(threeItem, i) in subItem.children" :key="i" :index="threeItem.index">{{ |
||||
threeItem.title |
||||
}}</el-menu-item> |
||||
</el-submenu> |
||||
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }}</el-menu-item> |
||||
</template> |
||||
</el-submenu> |
||||
</template> |
||||
<template v-else> |
||||
<el-menu-item :index="item.index" :key="item.index"> |
||||
<span slot="title">{{ item.title }}</span> |
||||
</el-menu-item> |
||||
</template> |
||||
</template> |
||||
</el-menu> |
||||
</div> |
||||
</el-menu> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import Setting from '@/setting' |
||||
import addRoutes from '@/libs/route/addRoutes' |
||||
export default { |
||||
props: ['path'], |
||||
data () { |
||||
return { |
||||
active: '', |
||||
defaultMenus: [ |
||||
{ |
||||
index: '1', |
||||
title: '系统后台', |
||||
children: [ |
||||
{ |
||||
index: '/configure?id=1', |
||||
title: 'Python系统' |
||||
}, |
||||
{ |
||||
index: '/theoryExam', |
||||
title: '理论考试系统' |
||||
}, |
||||
{ |
||||
index: '/configure?id=3', |
||||
title: '金融产品设计及数字化营销沙盘系统' |
||||
}, |
||||
{ |
||||
index: '/configure?id=4', |
||||
title: '银行综合系统' |
||||
}, |
||||
{ |
||||
index: '/configure?id=5', |
||||
title: '众筹系统' |
||||
}, |
||||
] |
||||
}, |
||||
{ |
||||
index: '2', |
||||
title: '职站教学后台', |
||||
children: [ |
||||
{ |
||||
index: '/curriculum', |
||||
title: '教学课程管理' |
||||
}, |
||||
{ |
||||
index: '/theoreticalCourse', |
||||
title: '精品课程管理' |
||||
}, |
||||
{ |
||||
index: '/information', |
||||
title: '资讯管理' |
||||
}, |
||||
{ |
||||
index: '/resourse', |
||||
title: '资源库' |
||||
}, |
||||
] |
||||
data() { |
||||
return { |
||||
menuList: [ |
||||
{ |
||||
icon: 'el-icon-school', |
||||
index: '/customer', |
||||
title: '客户管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-user', |
||||
index: '/user', |
||||
title: '用户管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-shopping-bag-2', |
||||
index: '/order', |
||||
title: '订单管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-document-checked', |
||||
index: '/curriculum', |
||||
title: '课程管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-notebook-2', |
||||
index: '/data', |
||||
title: '数据管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-tickets', |
||||
index: '/match', |
||||
title: '大赛管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-takeaway-box', |
||||
index: '/theoreticalCourse', |
||||
title: '理论课程' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-box', |
||||
index: '/information', |
||||
title: '资讯管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-receiving', |
||||
index: '/configure', |
||||
title: '服务配置' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-office-building', |
||||
index: '/system', |
||||
title: '系统配置' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-s-check', |
||||
index: '/parner', |
||||
title: '合伙管理' |
||||
}, |
||||
{ |
||||
icon: 'el-icon-data-line', |
||||
index: '/parnerOperation', |
||||
title: '合伙运营' |
||||
}, |
||||
], |
||||
menus: [], |
||||
onRoutes: this.$route.path |
||||
}; |
||||
}, |
||||
watch:{ |
||||
"$route.path":function(val){ |
||||
this.menuList.map(e=>{ |
||||
if(val.replace('/', '')===e.index){ |
||||
this.handleSelect(val.replace('/', '')) |
||||
this.$forceUpdate(); |
||||
} |
||||
}) |
||||
} |
||||
}, |
||||
mounted() { |
||||
sessionStorage.getItem('sideBar') && this.handleSelect(sessionStorage.getItem('sideBar')) |
||||
sessionStorage.getItem('token') && this.getPer() // 登录了才获取权限 |
||||
}, |
||||
methods:{ |
||||
handleSelect(index){ |
||||
this.onRoutes = index |
||||
this.$store.commit('setOrderParam', null) |
||||
this.$store.commit('setInfoTab', '1') |
||||
this.$store.commit('setColumnId', '') |
||||
sessionStorage.setItem('sideBar',index) |
||||
}, |
||||
{ |
||||
index: '3', |
||||
title: '职站商城后台', |
||||
children: [ |
||||
{ |
||||
index: '/shop', |
||||
title: '产品管理' |
||||
}, |
||||
{ |
||||
index: '/market', |
||||
title: '营销管理' |
||||
}, |
||||
{ |
||||
index: '/parnerOperation', |
||||
title: '小程序内容管理' |
||||
}, |
||||
{ |
||||
index: '/parner', |
||||
title: '销售代理人管理' |
||||
}, |
||||
] |
||||
initMenu() { |
||||
if (Setting.dynamicRoute) { |
||||
const routes = this.$store.state.routes |
||||
const menus = [] |
||||
this.menuList.map(e => { |
||||
routes.find(n => n.path === e.index) && menus.push(e) |
||||
}) |
||||
this.menus = menus |
||||
} else { |
||||
this.menus = this.menuList |
||||
} |
||||
}, |
||||
{ |
||||
index: '4', |
||||
title: '运营后台', |
||||
children: [ |
||||
{ |
||||
index: '/match', |
||||
title: '大赛管理' |
||||
}, |
||||
{ |
||||
index: '/data', |
||||
title: '数据管理' |
||||
}, |
||||
{ |
||||
index: '/review', |
||||
title: '评阅管理' |
||||
}, |
||||
] |
||||
// 获取权限列表 |
||||
getPer() { |
||||
this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => { |
||||
const routes = res.permissionMenu[0].children |
||||
addRoutes(routes) |
||||
this.initMenu() |
||||
this.$store.commit('setDataPer', res.dataPermissionList) |
||||
}).catch(err => { |
||||
if (err.status === 500) { |
||||
localStorage.removeItem('ms_username'); |
||||
sessionStorage.clear() |
||||
location.reload() |
||||
} |
||||
}) |
||||
}, |
||||
], |
||||
menus: [], |
||||
}; |
||||
}, |
||||
watch: { |
||||
path: { |
||||
handler (val) { |
||||
this.active = val === '/configure' ? `/configure?id=${this.$route.query.id}` : val |
||||
}, |
||||
immediate: true |
||||
} |
||||
}, |
||||
mounted () { |
||||
Setting.dynamicRoute && this.initTabs() |
||||
}, |
||||
methods: { |
||||
initTabs () { |
||||
const { btns } = this.$store.state |
||||
const tabs = this.defaultMenus |
||||
btns.includes('/configure') && this.menus.push(tabs[0]) |
||||
|
||||
const children1 = [] |
||||
btns.includes('/curriculum') && children1.push(tabs[1].children[0]) |
||||
btns.includes('/theoreticalCourse') && children1.push(tabs[1].children[1]) |
||||
btns.includes('/information') && children1.push(tabs[1].children[2]) |
||||
btns.includes('/resourse') && children1.push(tabs[1].children[3]) |
||||
this.menus.push({ |
||||
index: '2', |
||||
title: '职站教学后台', |
||||
children: children1 |
||||
}) |
||||
|
||||
const children2 = [] |
||||
btns.includes('/shop:产品管理') && children2.push(tabs[2].children[0]) |
||||
btns.includes('/shop:营销推广管理') && children2.push(tabs[2].children[1]) |
||||
btns.includes('/parnerOperation') && children2.push(tabs[2].children[2]) |
||||
btns.includes('/parner') && children2.push(tabs[2].children[3]) |
||||
this.menus.push({ |
||||
index: '3', |
||||
title: '职站商城后台', |
||||
children: children2 |
||||
}) |
||||
|
||||
const children3 = [] |
||||
btns.includes('/match') && children3.push(tabs[3].children[0]) |
||||
btns.includes('/data') && children3.push(tabs[3].children[1]) |
||||
btns.includes('/review') && children3.push(tabs[3].children[2]) |
||||
this.menus.push({ |
||||
index: '4', |
||||
title: '运营后台', |
||||
children: children3 |
||||
}) |
||||
}, |
||||
handleSelect (index) { |
||||
|
||||
}, |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.sidebar { |
||||
min-width: 200px; |
||||
max-width: 200px; |
||||
height: calc(100vh - 116px); |
||||
overflow: auto; |
||||
// transition: .5s; |
||||
transform: translateX(-200px); |
||||
|
||||
&.show { |
||||
transform: translateX(0); |
||||
} |
||||
|
||||
/deep/.el-menu { |
||||
border-right: 0 !important; |
||||
|
||||
.el-menu-item, |
||||
.el-submenu__title { |
||||
height: 40px; |
||||
line-height: 40px; |
||||
|
||||
&.is-active { |
||||
font-weight: 600; |
||||
} |
||||
} |
||||
|
||||
.el-menu .el-menu-item { |
||||
padding: 0 20px 0 40px !important; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
white-space: nowrap; |
||||
} |
||||
} |
||||
} |
||||
|
||||
<style scoped> |
||||
.sidebar::-webkit-scrollbar { |
||||
width: 0; |
||||
width: 0; |
||||
} |
||||
|
||||
.sidebar-el-menu:not(.el-menu--collapse) { |
||||
width: 100%; |
||||
width: 100%; |
||||
} |
||||
|
||||
.sidebar>ul { |
||||
height: 100%; |
||||
.sidebar > ul { |
||||
height: 100%; |
||||
} |
||||
</style> |
||||
|
@ -1,344 +1,253 @@ |
||||
<template> |
||||
<div> |
||||
<el-radio-group v-if="!readonly && radio" class="type-radio" v-model="editorType" @change="typeChange"> |
||||
<el-radio label="0">富文本</el-radio> |
||||
<el-radio label="1">markdown</el-radio> |
||||
</el-radio-group> |
||||
|
||||
<div v-show="editorType == 0" class="quill" ref="quill" :class="classes"> |
||||
<div ref="editor" :style="styles" v-loading="loading"></div> |
||||
<Upload :max-size="1000" :limit="100" @beforeUpload="beforeUpload" @onSuccess="editorUploadSuccess" |
||||
style="display: none"> |
||||
<div slot="trigger"> |
||||
<el-button :id="'editorUpload' + index" type="primary">点击上传</el-button> |
||||
</div> |
||||
</Upload> |
||||
<div class="quill" ref="quill" :class="classes"> |
||||
<div ref="editor" :style="styles" v-loading="loading"></div> |
||||
<el-upload |
||||
:headers="headers" |
||||
:action="this.api.fileupload" |
||||
:before-upload="beforeUpload" |
||||
:on-success="editorUploadSuccess" |
||||
style="display: none"> |
||||
<el-button class="editorUpload" type="primary">点击上传</el-button> |
||||
</el-upload> |
||||
</div> |
||||
<mavon-editor class="md" v-model="mdVal" v-show="editorType == 1" ref="md" :ishljs="true" :subfield="false" |
||||
@change="mdChange" @imgAdd="imgAdd" /> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import Quill from 'quill'; |
||||
import 'quill/dist/quill.core.css'; |
||||
import 'quill/dist/quill.snow.css'; |
||||
import 'quill/dist/quill.bubble.css'; |
||||
import toolbarOptions from './options' |
||||
import { mavonEditor } from 'mavon-editor' |
||||
import 'mavon-editor/dist/css/index.css' |
||||
import Upload from '@/components/upload'; |
||||
import Oss from '@/components/upload/upload.js' |
||||
|
||||
export default { |
||||
name: 'quill', |
||||
components: { |
||||
Upload, |
||||
mavonEditor |
||||
}, |
||||
props: { |
||||
value: { |
||||
type: String, |
||||
default: '' |
||||
}, |
||||
readonly: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
toTop: { |
||||
type: Boolean, |
||||
default: true |
||||
}, |
||||
border: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
height: { |
||||
type: Number |
||||
}, |
||||
minHeight: { |
||||
type: Number |
||||
}, |
||||
/* |
||||
* 原本的readOnly失效,对比其他项目,发现是quill版本不同导致, |
||||
* 使用props传入elseRead = 'true',手动隐藏工具栏 |
||||
*/ |
||||
elseRead: { |
||||
type: String, default: 'false' |
||||
}, |
||||
// 当前富文本的索引。一个页面引入多个富文本的时候会无法获取到对应的实例,所以通过在父级存储实例的方式来保存 |
||||
index: { |
||||
type: Number, |
||||
default: 0 |
||||
}, |
||||
// 是否需要编辑器切换 |
||||
radio: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
// 编辑器切换 |
||||
type: { |
||||
type: String, |
||||
default: '0' |
||||
}, |
||||
}, |
||||
data () { |
||||
const that = this |
||||
return { |
||||
headers: { |
||||
token: sessionStorage.getItem('token') |
||||
}, |
||||
editorType: '0', |
||||
mdVal: '', |
||||
Quill: null, |
||||
currentValue: '', |
||||
options: { |
||||
theme: 'snow', |
||||
bounds: document.body, |
||||
debug: 'warn', |
||||
modules: { |
||||
toolbar: { |
||||
container: toolbarOptions, |
||||
handlers: { |
||||
'image': function (value) { |
||||
if (value) { |
||||
// 调用iview图片上传 |
||||
document.querySelector("#editorUpload" + that.index).click(); |
||||
} else { |
||||
this.Quill.format('image', false); |
||||
} |
||||
} |
||||
import Quill from 'quill'; |
||||
import 'quill/dist/quill.core.css'; |
||||
import 'quill/dist/quill.snow.css'; |
||||
import 'quill/dist/quill.bubble.css'; |
||||
import toolbarOptions from './options' |
||||
|
||||
export default { |
||||
name: 'quill', |
||||
props: { |
||||
value: { |
||||
type: String, |
||||
default: '' |
||||
}, |
||||
readonly: { |
||||
type: Boolean, |
||||
default:false |
||||
}, |
||||
toTop: { |
||||
type: Boolean, |
||||
default:true |
||||
}, |
||||
border: { |
||||
type: Boolean, |
||||
default:false |
||||
}, |
||||
height: { |
||||
type: Number |
||||
}, |
||||
minHeight: { |
||||
type: Number |
||||
}, |
||||
/* |
||||
* 原本的readOnly失效,对比其他项目,发现是quill版本不同导致, |
||||
* 使用props传入elseRead = 'true',手动隐藏工具栏 |
||||
*/ |
||||
elseRead:{ |
||||
type:String,default:'false' |
||||
} |
||||
} |
||||
}, |
||||
placeholder: '', |
||||
readOnly: this.readonly |
||||
}, |
||||
loading: false |
||||
} |
||||
}, |
||||
computed: { |
||||
classes () { |
||||
return [ |
||||
{ |
||||
'quill-no-border': !this.border |
||||
} |
||||
]; |
||||
}, |
||||
styles () { |
||||
let style = {}; |
||||
if (this.minHeight) { |
||||
style.minHeight = `${this.minHeight}px`; |
||||
} |
||||
if (this.height) { |
||||
style.height = `${this.height}px`; |
||||
} |
||||
return style; |
||||
}, |
||||
|
||||
}, |
||||
watch: { |
||||
type: { |
||||
handler (val) { |
||||
this.editorType = val |
||||
}, |
||||
immediate: true |
||||
}, |
||||
value: { |
||||
handler (val) { |
||||
if (this.type == 0) { |
||||
if (val !== this.currentValue) { |
||||
this.currentValue = val; |
||||
if (this.Quill) { |
||||
this.Quill.pasteHTML(this.value); |
||||
data () { |
||||
return { |
||||
headers: { |
||||
token: sessionStorage.getItem('token') |
||||
}, |
||||
Quill: null, |
||||
currentValue: '', |
||||
options: { |
||||
theme: 'snow', |
||||
bounds: document.body, |
||||
debug: 'warn', |
||||
modules: { |
||||
toolbar: { |
||||
container: toolbarOptions, |
||||
handlers: { |
||||
'image': function (value) { |
||||
if (value) { |
||||
// 调用iview图片上传 |
||||
document.querySelector('.editorUpload').click() |
||||
} else { |
||||
this.Quill.format('image', false); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
placeholder: '', |
||||
readOnly: this.readonly |
||||
}, |
||||
loading: false |
||||
} |
||||
} |
||||
} |
||||
if (!this.mdVal) this.mdVal = val |
||||
}, |
||||
immediate: true |
||||
} |
||||
}, |
||||
mounted () { |
||||
this.init(); |
||||
// 处理工具栏隐藏样式 |
||||
if (this.elseRead === 'true') { |
||||
let children = this.$refs.quill.children[0].style |
||||
children.padding = '0' |
||||
children.overflow = 'hidden' |
||||
children.height = '0' |
||||
children.border = '0' |
||||
} |
||||
}, |
||||
beforeDestroy () { |
||||
// 在组件销毁后销毁实例 |
||||
this.Quill = null; |
||||
}, |
||||
methods: { |
||||
// 富文本切换 |
||||
typeChange (val) { |
||||
this.$emit('update:type', val) |
||||
if (!this.mdVal) this.mdVal = this.value |
||||
}, |
||||
}, |
||||
computed: { |
||||
classes () { |
||||
return [ |
||||
{ |
||||
'quill-no-border': !this.border |
||||
} |
||||
]; |
||||
}, |
||||
styles () { |
||||
let style = {}; |
||||
if (this.minHeight) { |
||||
style.minHeight = `${this.minHeight}px`; |
||||
} |
||||
if (this.height) { |
||||
style.height = `${this.height}px`; |
||||
} |
||||
return style; |
||||
}, |
||||
|
||||
init () { |
||||
const editor = this.$refs.editor; |
||||
// 初始化编辑器 |
||||
this.Quill = new Quill(editor, this.options); |
||||
const ins = this.Quill |
||||
// 默认值 |
||||
ins.pasteHTML(this.currentValue); |
||||
if (this.toTop) { |
||||
this.$nextTick(() => { |
||||
window.scrollTo(0, 0) |
||||
}) |
||||
} |
||||
// 绑定事件 |
||||
ins.on('text-change', (delta, oldDelta, source) => { |
||||
const html = this.$refs.editor.children[0].innerHTML; |
||||
const text = ins.getText(); |
||||
const quill = this.Quill; |
||||
// 更新内部的值 |
||||
this.currentValue = html; |
||||
// 发出事件 v-model |
||||
this.$emit('input', html); |
||||
// 发出事件 |
||||
this.$emit('on-change', { html, text, quill }); |
||||
}); |
||||
// 将一些 quill 自带的事件传递出去 |
||||
ins.on('text-change', (delta, oldDelta, source) => { |
||||
this.$emit('on-text-change', delta, oldDelta, source); |
||||
}); |
||||
ins.on('selection-change', (range, oldRange, source) => { |
||||
this.$emit('on-selection-change', range, oldRange, source); |
||||
}); |
||||
ins.on('editor-change', (eventName, ...args) => { |
||||
this.$emit('on-editor-change', eventName, ...args); |
||||
}); |
||||
// 监听粘贴事件 |
||||
ins.root.addEventListener('paste', evt => { |
||||
if (evt.clipboardData && evt.clipboardData.files && evt.clipboardData.files.length) { |
||||
evt.preventDefault(); |
||||
// 检测是否粘贴的是图片 |
||||
[].forEach.call(evt.clipboardData.files, file => { |
||||
if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) { |
||||
return |
||||
}, |
||||
watch: { |
||||
value: { |
||||
handler (val) { |
||||
if (val !== this.currentValue) { |
||||
this.currentValue = val; |
||||
if (this.Quill) { |
||||
this.Quill.pasteHTML(this.value); |
||||
} |
||||
} |
||||
}, |
||||
immediate: true |
||||
} |
||||
// 把图片上传到oss,不然会直接把base64存到数据库 |
||||
Oss.upload(file).then(res => { |
||||
var range = ins.getSelection() |
||||
if (range) { |
||||
// 在当前光标位置插入图片 |
||||
ins.insertEmbed(range.index, 'image', res.url) |
||||
// 将光标移动到图片后面 |
||||
ins.setSelection(range.index + 1) |
||||
} |
||||
}) |
||||
}); |
||||
} |
||||
}, false) |
||||
}, |
||||
beforeUpload (file) { |
||||
this.loading = true |
||||
}, |
||||
// quill图片上传 |
||||
editorUploadSuccess (file) { |
||||
// 获取富文本组件实例 |
||||
let quill = this.Quill |
||||
// 如果上传成功 |
||||
if (file.url) { |
||||
// 获取光标所在位置 |
||||
let lengths; |
||||
if (quill.getSelection() == null) { |
||||
lengths = 1 |
||||
} else { |
||||
lengths = quill.getSelection().index; |
||||
}, |
||||
created(){ |
||||
}, |
||||
mounted () { |
||||
this.init(); |
||||
// 处理工具栏隐藏样式 |
||||
if(this.elseRead==='true'){ |
||||
let children = this.$refs.quill.children[0].style |
||||
children.padding = '0' |
||||
children.overflow = 'hidden' |
||||
children.height = '0' |
||||
children.borderTop = '0' |
||||
} |
||||
}, |
||||
beforeDestroy () { |
||||
// 在组件销毁后销毁实例 |
||||
this.Quill = null; |
||||
}, |
||||
methods: { |
||||
init () { |
||||
const editor = this.$refs.editor; |
||||
// 初始化编辑器 |
||||
this.Quill = new Quill(editor, this.options); |
||||
const ins = this.Quill |
||||
// 默认值 |
||||
ins.pasteHTML(this.currentValue); |
||||
if(this.toTop){ |
||||
this.$nextTick(() => { |
||||
window.scrollTo(0,0) |
||||
}) |
||||
} |
||||
// 绑定事件 |
||||
ins.on('text-change', (delta, oldDelta, source) => { |
||||
const html = this.$refs.editor.children[0].innerHTML; |
||||
const text = ins.getText(); |
||||
const quill = this.Quill; |
||||
// 更新内部的值 |
||||
this.currentValue = html; |
||||
// 发出事件 v-model |
||||
this.$emit('input', html); |
||||
// 发出事件 |
||||
this.$emit('on-change', { html, text, quill }); |
||||
}); |
||||
// 将一些 quill 自带的事件传递出去 |
||||
ins.on('text-change', (delta, oldDelta, source) => { |
||||
this.$emit('on-text-change', delta, oldDelta, source); |
||||
}); |
||||
ins.on('selection-change', (range, oldRange, source) => { |
||||
this.$emit('on-selection-change', range, oldRange, source); |
||||
}); |
||||
ins.on('editor-change', (eventName, ...args) => { |
||||
this.$emit('on-editor-change', eventName, ...args); |
||||
}); |
||||
// 监听粘贴事件 |
||||
ins.root.addEventListener('paste', evt => { |
||||
if (evt.clipboardData && evt.clipboardData.files && evt.clipboardData.files.length) { |
||||
evt.preventDefault(); |
||||
// 检测是否粘贴的是图片 |
||||
[].forEach.call(evt.clipboardData.files, file => { |
||||
if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i)) { |
||||
return |
||||
} |
||||
const param = new FormData() |
||||
param.append('file', file) |
||||
// 把图片上传到服务器,不然会直接把base64存到数据库 |
||||
this.$post(this.api.fileupload, param, { |
||||
headers: { "Content-Type": "multipart/form-data" } |
||||
}).then(res => { |
||||
var range = ins.getSelection() |
||||
if (range) { |
||||
// 在当前光标位置插入图片 |
||||
ins.insertEmbed(range.index, 'image', res.data.filesResult.fileUrl) |
||||
// 将光标移动到图片后面 |
||||
ins.setSelection(range.index + 1) |
||||
} |
||||
}).catch(res => {}) |
||||
}); |
||||
} |
||||
}, false) |
||||
}, |
||||
beforeUpload(file){ |
||||
this.loading = true |
||||
}, |
||||
editorUploadSuccess (res) { |
||||
// 获取富文本组件实例 |
||||
let quill = this.Quill |
||||
// 如果上传成功 |
||||
if (res.data.filesResult.fileUrl) { |
||||
// 获取光标所在位置 |
||||
let lengths; |
||||
if ( quill.getSelection() == null){ |
||||
lengths = 1 |
||||
}else{ |
||||
lengths = quill.getSelection().index; |
||||
} |
||||
// 插入图片,res为服务器返回的图片链接地址 |
||||
quill.insertEmbed(lengths, 'image', res.data.filesResult.fileUrl) |
||||
// 调整光标到最后 |
||||
quill.setSelection(lengths + 1) |
||||
} else { |
||||
this.$message.success('图片插入失败') |
||||
} |
||||
this.loading = false |
||||
}, |
||||
} |
||||
// 插入图片,res为服务器返回的图片链接地址 |
||||
quill.insertEmbed(lengths, 'image', file.url) |
||||
// 调整光标到最后 |
||||
quill.setSelection(lengths + 1) |
||||
} else { |
||||
this.$message.success('图片插入失败') |
||||
} |
||||
this.loading = false |
||||
}, |
||||
|
||||
// 类型切换回调 |
||||
mdChange (val) { |
||||
this.$emit('input', val) |
||||
}, |
||||
// markdown图片上传 |
||||
imgAdd (pos, $file) { |
||||
let $vm = this.$refs.md |
||||
// 将图片上传到oss |
||||
Oss.upload($file).then(res => { |
||||
$vm.$img2Url(pos, res.url); |
||||
}) |
||||
}, |
||||
|
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
.type-radio { |
||||
margin-bottom: 20px; |
||||
} |
||||
|
||||
.quill-no-border { |
||||
.ql-toolbar.ql-snow { |
||||
border: none; |
||||
border-bottom: 1px solid #e8eaec; |
||||
} |
||||
|
||||
.ql-container.ql-snow { |
||||
border: none; |
||||
} |
||||
} |
||||
|
||||
.else { |
||||
.ql-toolbar.ql-snow { |
||||
height: 0; |
||||
overflow: hidden; |
||||
padding: 0; |
||||
border-top: 0; |
||||
} |
||||
} |
||||
|
||||
/deep/.ql-snow { |
||||
position: relative; |
||||
|
||||
.ql-tooltip { |
||||
position: absolute !important; |
||||
top: 0 !important; |
||||
left: -100px !important; |
||||
transform: translateY(10px); |
||||
} |
||||
} |
||||
|
||||
.md { |
||||
max-height: 300px; |
||||
} |
||||
|
||||
/deep/.v-note-wrapper .v-note-panel { |
||||
min-height: 200px; |
||||
} |
||||
|
||||
/deep/.markdown-body { |
||||
ul { |
||||
list-style: disc; |
||||
|
||||
li { |
||||
list-style: inherit; |
||||
.quill-no-border{ |
||||
.ql-toolbar.ql-snow{ |
||||
border: none; |
||||
border-bottom: 1px solid #e8eaec; |
||||
} |
||||
.ql-container.ql-snow{ |
||||
border: none; |
||||
} |
||||
} |
||||
} |
||||
|
||||
ol { |
||||
list-style: decimal; |
||||
|
||||
li { |
||||
list-style: inherit; |
||||
.else{ |
||||
.ql-toolbar.ql-snow{ |
||||
height: 0; |
||||
overflow: hidden; |
||||
padding: 0; |
||||
border-top: 0; |
||||
} |
||||
} |
||||
/deep/.ql-snow { |
||||
position: relative; |
||||
.ql-tooltip { |
||||
position: absolute !important; |
||||
top: 0 !important; |
||||
left: -100px !important; |
||||
transform: translateY(10px); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |
||||
|
@ -1,32 +0,0 @@ |
||||
/** |
||||
* 阿里云oss配置 |
||||
* */ |
||||
|
||||
import router from '@/router/index' |
||||
import { Message } from 'element-ui' |
||||
export default async function () { |
||||
try { |
||||
let RE = localStorage.getItem('osc') |
||||
if (RE) { |
||||
RE = JSON.parse(RE) |
||||
} else { |
||||
sessionStorage.removeItem('token') |
||||
Message.error('登录过期,请重新登录!') |
||||
setTimeout(() => { |
||||
router.replace('/login') |
||||
}, 1500) |
||||
return false |
||||
} |
||||
return { |
||||
// oss账号信息
|
||||
config: { |
||||
region: 'oss-cn-shenzhen', |
||||
accessKeyId: RE[0], |
||||
accessKeySecret: RE[1], |
||||
bucket: 'huoran' |
||||
}, |
||||
// 上传成功url前置部分(成功回调没有返回url)
|
||||
preUrl: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/' |
||||
} |
||||
} catch (e) { } |
||||
} |
@ -1,140 +0,0 @@ |
||||
<template> |
||||
<el-upload :disabled="uploading" :before-upload="beforeUpload" :on-remove="onRemove" :on-error="uploadError" |
||||
:limit="limit" action="" :on-exceed="handleExceed" :show-file-list="showFiles" :file-list="fileList" |
||||
:http-request="handleRequest" name="file"> |
||||
<slot name="trigger"> |
||||
<el-button size="small" :loading="uploading">{{ uploading ? '正在上传' : '上传文件' }}</el-button> |
||||
</slot> |
||||
<div slot="tip" class="el-upload__tip"> |
||||
<el-progress v-if="uploading" class="upload-progress" :stroke-width="3" |
||||
:percentage="uploadProgress"></el-progress> |
||||
<slot name="tip"> |
||||
<p>支持扩展名:.rar .zip .doc .docx .pdf .jpg...</p> |
||||
</slot> |
||||
</div> |
||||
</el-upload> |
||||
</template> |
||||
|
||||
<script> |
||||
import OSS from 'ali-oss' |
||||
import OssConfig from './config.js' |
||||
import Util from '@/libs/util' |
||||
export default { |
||||
props: { |
||||
// 最大允许上传个数 |
||||
limit: { |
||||
type: Number, |
||||
default: 1 |
||||
}, |
||||
// 单个文件最大大小(单位: Mb) |
||||
maxSize: { |
||||
type: Number, |
||||
default: 10 |
||||
}, |
||||
// 是否显示已上传文件列表 |
||||
showFileList: { |
||||
type: Boolean, |
||||
default: true |
||||
}, |
||||
// 已上传文件列表 |
||||
fileList: { |
||||
type: Array, |
||||
default: () => [] |
||||
}, |
||||
// 是否要更新fileList(如果要使用自己的fileList,则这个值传false,一般情况不用给这个值) |
||||
changeFileList: { |
||||
type: Boolean, |
||||
default: true |
||||
}, |
||||
// 已上传文件列表 |
||||
onRemove: { |
||||
type: Function, |
||||
default: new Function() |
||||
}, |
||||
}, |
||||
data () { |
||||
return { |
||||
client: null, |
||||
uploading: false, |
||||
uploadProgress: 0, |
||||
showFiles: this.showFileList, |
||||
Oss: {}, |
||||
}; |
||||
}, |
||||
mounted () { |
||||
this.initOss() |
||||
}, |
||||
methods: { |
||||
// 初始化oss |
||||
async initOss () { |
||||
this.Oss = await OssConfig() |
||||
this.client = new OSS(this.Oss.config) |
||||
}, |
||||
// 附件上传前 |
||||
beforeUpload (file) { |
||||
const oversize = file.size / 1024 / 1024 < this.maxSize |
||||
if (!oversize) Util.warningMsg(`请上传小于${this.maxSize}MB的附件!`) |
||||
if (oversize) { |
||||
this.$emit('beforeUpload', file) |
||||
return true |
||||
} else { |
||||
return false |
||||
} |
||||
}, |
||||
// 自定义进度条 |
||||
handleProgress (progress) { |
||||
this.uploadProgress = Number((progress * 100).toFixed(2)) |
||||
}, |
||||
// 自定义上传 |
||||
async handleRequest ({ file }) { |
||||
try { |
||||
this.uploadProgress = 0 |
||||
this.uploading = true |
||||
this.showFiles = false |
||||
// 上传到阿里云oss |
||||
const { name } = await this.client.multipartUpload(Date.now() + '.' + Util.getFileExt(file.name), file, { |
||||
progress: this.handleProgress |
||||
}); |
||||
|
||||
this.uploading = false |
||||
const url = this.Oss.preUrl + name |
||||
this.changeFileList && this.$emit('update:fileList', [ |
||||
...this.fileList, |
||||
{ |
||||
name: name, |
||||
url |
||||
} |
||||
]) |
||||
|
||||
this.showFiles = true |
||||
this.$emit('onSuccess', { |
||||
format: Util.getFileExt(file.name), |
||||
name: file.name, |
||||
url, |
||||
size: file.size, |
||||
}) |
||||
} catch (error) { } |
||||
}, |
||||
uploadError (err, file, fileList) { |
||||
this.$message({ |
||||
message: "上传出错,请重试!", |
||||
type: "error", |
||||
center: true |
||||
}) |
||||
}, |
||||
beforeRemove (file, fileList) { |
||||
return this.$confirm(`确定移除 ${file.name}?`); |
||||
}, |
||||
handleExceed (files, fileList) { |
||||
Util.warningMsg(`当前限制选择 ${this.limit} 个文件,如需更换,请删除上一个文件再重新选择!`); |
||||
}, |
||||
} |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
/deep/.upload-progress { |
||||
max-width: 300px; |
||||
margin: 10px 0; |
||||
white-space: nowrap; |
||||
} |
||||
</style> |
@ -1,40 +0,0 @@ |
||||
// 阿里云oss上传
|
||||
|
||||
import OSS from 'ali-oss' |
||||
import OssConfig from './config' |
||||
import Util from '@/libs/util' |
||||
|
||||
let client = null |
||||
let Oss |
||||
// 初始化oss
|
||||
const initOss = async () => { |
||||
Oss = await OssConfig() |
||||
if (!client) client = new OSS(Oss.config) |
||||
} |
||||
initOss() |
||||
|
||||
export default { |
||||
// 上传文件
|
||||
upload (file) { |
||||
initOss() |
||||
return new Promise(async (resolve, reject) => { |
||||
try { |
||||
// 上传到阿里云oss
|
||||
const res = await client.multipartUpload(Date.now() + '.' + Util.getFileExt(file.name), file); |
||||
resolve({ |
||||
format: Util.getFileExt(file.name), |
||||
name: file.name, |
||||
url: Oss.preUrl + res.name, |
||||
size: file.size, |
||||
}) |
||||
} catch (error) { |
||||
reject() |
||||
} |
||||
}) |
||||
}, |
||||
// 删除文件(传完整url,不是没有https的name,因为很多接口没有存name,只存url,所以统一使用url)
|
||||
async del (url) { |
||||
initOss() |
||||
await client.delete(url.replace(Oss.preUrl, '')); |
||||
} |
||||
} |
@ -1,50 +0,0 @@ |
||||
export default { |
||||
difficults: [ |
||||
{ |
||||
id: 'basic', |
||||
name: '基础', |
||||
coefficient: 0.2, // 难度系数,试卷里计算试卷难度专用
|
||||
theme: 'success', |
||||
}, |
||||
{ |
||||
id: 'easy', |
||||
name: '普通', |
||||
coefficient: 0.4, |
||||
theme: '', |
||||
}, |
||||
{ |
||||
id: 'medium', |
||||
name: '较难', |
||||
coefficient: 0.6, |
||||
theme: 'warning', |
||||
}, |
||||
{ |
||||
id: 'hard', |
||||
name: '难', |
||||
coefficient: 0.8, |
||||
theme: 'danger', |
||||
}, |
||||
], |
||||
questionTypes: [ |
||||
{ |
||||
id: 'single_choice', |
||||
name: '单选题' |
||||
}, |
||||
{ |
||||
id: 'multiple_choice', |
||||
name: '多选题' |
||||
}, |
||||
{ |
||||
id: 'judgement', |
||||
name: '判断题' |
||||
}, |
||||
{ |
||||
id: 'fill_blank', |
||||
name: '填空题' |
||||
}, |
||||
{ |
||||
id: 'essay', |
||||
name: '问答题' |
||||
}, |
||||
], |
||||
} |
@ -1,28 +0,0 @@ |
||||
export default { |
||||
types: [ |
||||
{ |
||||
id: 1, |
||||
name: '演示文稿类' |
||||
}, |
||||
{ |
||||
id: 2, |
||||
name: '视频类' |
||||
}, |
||||
{ |
||||
id: 3, |
||||
name: '图形类' |
||||
}, |
||||
{ |
||||
id: 4, |
||||
name: '文本类' |
||||
}, |
||||
{ |
||||
id: 5, |
||||
name: '音频类' |
||||
}, |
||||
{ |
||||
id: 6, |
||||
name: '其他' |
||||
}, |
||||
], |
||||
} |
@ -1,34 +0,0 @@ |
||||
export default { |
||||
difficults: [ |
||||
{ |
||||
id: 1, |
||||
name: '简单' |
||||
}, |
||||
{ |
||||
id: 2, |
||||
name: '普通' |
||||
}, |
||||
{ |
||||
id: 3, |
||||
name: '较难' |
||||
}, |
||||
{ |
||||
id: 4, |
||||
name: '难' |
||||
}, |
||||
], |
||||
paperTypes: [ |
||||
{ |
||||
id: 0, |
||||
name: '练习' |
||||
}, |
||||
{ |
||||
id: 1, |
||||
name: '考核' |
||||
}, |
||||
{ |
||||
id: 2, |
||||
name: '竞赛' |
||||
}, |
||||
], |
||||
} |
@ -1,56 +0,0 @@ |
||||
// 导出压缩包
|
||||
import JSZip from 'jszip' |
||||
import FileSaver from 'file-saver' |
||||
|
||||
//文件以流的形式获取(参数url为文件链接地址)
|
||||
const getImgArrayBuffer = url => { |
||||
return new Promise((resolve, reject) => { |
||||
//通过请求获取文件blob格式
|
||||
let xmlhttp = new XMLHttpRequest(); |
||||
xmlhttp.open('GET', url, true); |
||||
xmlhttp.responseType = 'blob' |
||||
xmlhttp.onload = function () { |
||||
if (xmlhttp.status == 200) { |
||||
resolve(xmlhttp.response); |
||||
} else { |
||||
reject(xmlhttp.response); |
||||
} |
||||
}; |
||||
xmlhttp.send(); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* @param {String} zipName 压缩包名字 |
||||
* @param {Array} files 需要压缩的文件数组 |
||||
* @param {Function | undefined} callback 回调 |
||||
*/ |
||||
export default function (zipName, files, callback) { |
||||
var zip = new JSZip(); |
||||
var promises = []; |
||||
let cache = {}; |
||||
for (let item of files) { |
||||
// item.filePath为文件链接地址
|
||||
// item.fileName为文件名称
|
||||
if(item.filePath) { |
||||
const promise = getImgArrayBuffer(item.filePath).then((data) => { |
||||
// 下载文件, 并存成ArrayBuffer对象(blob)
|
||||
zip.file(item.fileName, data, { binary: true }); // 逐个添加文件
|
||||
cache[item.fileName] = data; |
||||
}); |
||||
promises.push(promise); |
||||
} else { |
||||
// 地址不存在时提示
|
||||
console.log(`附件${item.fileName}地址错误,下载失败`); |
||||
} |
||||
} |
||||
Promise.all(promises).then(() => { |
||||
zip.generateAsync({ type: "blob" }).then((content) => { |
||||
// 生成二进制流
|
||||
FileSaver.saveAs(content, zipName); // 利用file-saver保存文件 zipName: 自定义文件名
|
||||
callback && callback() |
||||
}); |
||||
}).catch((res) => { |
||||
console.log("文件压缩失败"); |
||||
}); |
||||
} |
@ -1,560 +1,435 @@ |
||||
import Setting from "@/setting"; |
||||
|
||||
const { apiBaseURL: host } = Setting |
||||
export default { |
||||
|
||||
logins: `users/users/user/login`, //登录
|
||||
verification: `${host}users/users/user/captcha`,// 验证码图片 保留host
|
||||
bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机
|
||||
sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码
|
||||
getUserRolesPermissionMenu: `users/users/user-role/getUserRolesPermissionMenu`, |
||||
deleteProfile: `users/users/userInfo/deleteProfile`, |
||||
refreshPageNotification: `nakadai/message/refreshPageNotification`, |
||||
heartbeatDetection: `nakadai/message/heartbeatDetection`, |
||||
getCurrentTime: `competition/competition/management/getCurrentTime`, |
||||
getToken: `users/users/user/getToken`, |
||||
logout: `users/users/user/logout`, |
||||
|
||||
// 阿里云文件/视频管理
|
||||
getPlayAuth: `nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证
|
||||
encrypt: `nakadai/data/encrypt`, |
||||
|
||||
staffTemplate: `https://occupationlab.com/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板
|
||||
competionPersonTemplate: `https://www.occupationlab.com/template/中台个人赛报名人员导入模板.xlsx`, // 中台个人报名人员模板
|
||||
competionTeamTemplate: `https://www.occupationlab.com/template/中台团队赛报名人员导入模板.xlsx`, // 中台团队报名人员模板
|
||||
|
||||
checkEmailOrPhone: `occupationlab/occupationlab/architecture/checkEmailOrPhone`, // 新增学生前:校验手机号或者邮箱
|
||||
checkWorkNumOrAccount: `occupationlab/occupationlab/architecture/checkWorkNumOrAccount`, // 新增/编辑学生前:校验学号或者学生账号
|
||||
|
||||
// 订单管理
|
||||
orderAdd: `nakadai/nakadai/order/add`,// 订单添加
|
||||
orderDelete: `nakadai/nakadai/order/delete`,// 删除定单
|
||||
orderDetail: `nakadai/nakadai/order/get`,// 订单详情
|
||||
orderList: `nakadai/nakadai/order/list`,// 订单列表
|
||||
orderUpdate: `nakadai/nakadai/order/update`,// 订单更新
|
||||
renew: `nakadai/nakadai/orderOther/renew`,// 续费信息管理-post
|
||||
ship: `nakadai/nakadai/orderOther/ship`,// 处理时的订单发货管理-post
|
||||
bulkShipping: `nakadai/nakadai/orderOther/bulkShipping`, |
||||
getOrderOtherTime: `nakadai/nakadai/orderOther/getOrderOtherTime`, |
||||
refreshCache: `data/data/myDate/refreshCache`, |
||||
getPartnerTeamRates: `nakadai/nakadai/partner-team/getPartnerTeamRates`, |
||||
getCustomerOrderRecord: `nakadai/nakadai/order/getCustomerOrderRecord`, |
||||
|
||||
// 客户管理
|
||||
delCustomers: `nakadai/nakadai/customer/delCustomers`, |
||||
updateCustomer: `nakadai/nakadai/customer/updateCustomer`, |
||||
addCustomer: `nakadai/nakadai/customer/addCustomer`, |
||||
queryCustomer: `nakadai/nakadai/customer/queryCustomer`, |
||||
queryCustomerDetails: `nakadai/nakadai/customer/queryCustomerDetails`, |
||||
saveOrUpdate: `data/data/role/saveOrUpdate`, |
||||
doAssign: `data/data/permission/doAssign`, |
||||
updateCustomerByRoleId: `nakadai/nakadai/customer/updateCustomerByRoleId`, |
||||
checkEmailOrPhone: `nakadai/nakadai/customer/checkEmailOrPhone`, // 新增客户前:校验手机号或者邮箱
|
||||
getProductsSubscribedByCustomers: `nakadai/nakadai/customer/getProductsSubscribedByCustomers`, |
||||
orderBulkDisableEnable: `nakadai/nakadai/orderOther/orderBulkDisableEnable`, |
||||
exportSubscribedRecords: `nakadai/nakadai/order/exportSubscribedRecords`, |
||||
addNewCustomersByOneself: `nakadai/nakadai/school/addNewCustomersByOneself`, |
||||
exportClient: `${host}nakadai/nakadai/customer/exportClient`, |
||||
customerSettingsList: `nakadai/nakadai/customer/customerSettingsList`, |
||||
clientSettingsEditClient: `nakadai/nakadai/customer/clientSettingsEditClient`, |
||||
delClientsOrSchools: `nakadai/nakadai/school/delClientsOrSchools`, |
||||
editClientsOrSchools: `nakadai/nakadai/school/editClientsOrSchools`, |
||||
userManagementList: `users/users/userAccount/userManagementList`, |
||||
|
||||
resetPwdCustomer: `nakadai/nakadai/customer/resetPwd`, |
||||
queryCustomerIsExists: `nakadai/nakadai/customer/queryCustomerIsExists`, |
||||
updateEnabled: `nakadai/nakadai/customer/updateEnabled`, |
||||
queryCustomerIndustryClass: `nakadai/nakadai/hrIndustryClass/queryIndustryClass`, |
||||
queryCustomerIndustry: `nakadai/nakadai/hrIndustry/queryIndustry`, |
||||
querySchoolData: `nakadai/nakadai/school/querySchool`, |
||||
getAListOfClientBusinessManagers: `nakadai/nakadai/customer/getAListOfClientBusinessManagers`, |
||||
getBusinessManagerOrder: `nakadai/nakadai/customer/getBusinessManagerOrder`, |
||||
|
||||
// 用户管理
|
||||
delUserAccountsByNakadai: `users/users/userAccount/delUserAccountsByNakadai`, |
||||
queryUserInfoDetails: `users/users/userAccount/queryUserInfoDetails`, |
||||
personalFile: `users/users/userAccount/personalFile`, |
||||
|
||||
queryUserInfoList: `users/users/userAccount/queryUserInfoList`, |
||||
resetPwd: `users/users/userAccount/resetPwd`, |
||||
selectAccountDetail: `users/users/userAccount/selectAccountDetail`, |
||||
selectUserSysBind: `users/users/userAccount/selectUserSysBind`, |
||||
updatePersonCenter: `users/users/userAccount/updatePersonCenter`, |
||||
updateUserAvatars: `${host}users/users/userAccount/updateUserAvatars`, |
||||
userInfo: `users/users/userAccount/userInfo`, |
||||
unbindMobilePhone: `users/users/userAccount/unbindMobilePhone`, |
||||
updateAccountEnable: `users/users/userAccount/updateAccountEnable`, |
||||
updateAccountAllEnable: `users/users/userAccount/updateAccountAllEnable`, |
||||
examinePassword: `users/users/userAccount/examinePassword`, |
||||
viewUserDetailsforNakadai: `users/users/userAccount/viewUserDetailsforNakadai`, |
||||
oneClickEnableVerification: `users/users/userAccount/oneClickEnableVerification`, |
||||
getValueModule: `nakadai/nakadai/valueModuleManagement/getValueModule`, |
||||
|
||||
queryServiceConfig: `nakadai/nakadai/serviceConfiguration/getAllService`, |
||||
workbenchSystemDemonstration: `nakadai/nakadai/serviceConfiguration/workbenchSystemDemonstration`, |
||||
// 项目管理
|
||||
avgValues: `occupationlab/occupationlab/projectManage/avgValues`, // 平均分分配值
|
||||
deleteProjectManage: `occupationlab/occupationlab/projectManage/deleteProjectManage`, // 新增项目管理
|
||||
getProjectBySystemId: `occupationlab/occupationlab/projectManage/getProjectBySystemId`, // 根据系统id获取全部项目
|
||||
queryNameIsExist: `occupationlab/occupationlab/projectManage/queryNameIsExist`, // 新增/编辑项目管理名称判重
|
||||
queryProjectManage: `occupationlab/occupationlab/projectManage/queryProjectManage`, // 项目管理列表(分页、筛选)
|
||||
updateIsOpen: `occupationlab/occupationlab/projectManage/updateIsOpen`, // 更新开启状态
|
||||
getProjectDetail: `occupationlab/occupationlab/projectManage/getProjectDetail`, // 根据项目id查询详情
|
||||
saveProjectDraft: `occupationlab/occupationlab/projectManage/saveProjectDraft`, // 新增项目管理
|
||||
addProjectManage: `occupationlab/occupationlab/projectManage/addProjectManage`, // 新增项目管理
|
||||
updateProjectManage: `occupationlab/occupationlab/projectManage/updateProjectManage`, // 修改项目管理
|
||||
editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理
|
||||
copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理
|
||||
// 判分点
|
||||
getBcJudgmentPoint: `${host}judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页)
|
||||
getLcJudgmentPoint: `${host}judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页)
|
||||
addProjectJudgment: `occupationlab/occupationlab/projectJudgment/addProjectJudgment`, // 添加项目管理、判分点中间表
|
||||
updateProjectJudgment: `occupationlab/occupationlab/projectJudgment/updateProjectJudgment`, // 判分点中间表批量更新
|
||||
deleteProjectJudgment: `occupationlab/occupationlab/projectJudgment/deleteProjectJudgment`, // 判分点中间表批量删除
|
||||
// 系统后台
|
||||
deleteModelClass: `nakadai/nakadai/model/reference/deleteModelClass`, |
||||
modelClassList: `nakadai/nakadai/model/reference/modelClassList`, |
||||
saveReferenceCategory: `nakadai/nakadai/model/reference/saveReferenceCategory`, |
||||
updateModelClass: `nakadai/nakadai/model/reference/updateModelClass`, |
||||
checkIsShowBySystemId: `nakadai/nakadai/model/reference/checkIsShowBySystemId`, |
||||
modifyIsShowState: `nakadai/nakadai/model/reference/modifyIsShowState`, |
||||
editProvinceCity: `nakadai/nakadai/partner-team/editProvinceCity`, |
||||
editPartnerTeamRates: `nakadai/nakadai/partner-team/editPartnerTeamRates`, |
||||
teamPartnerList: `nakadai/nakadai/partnerAccount/teamPartnerList`, |
||||
|
||||
delModelInfoBySystemId: `nakadai/nakadai/model/reference/demo/delModelInfoBySystemId`, |
||||
deleteReferenceDemo: `nakadai/nakadai/model/reference/demo/deleteReferenceDemo`, |
||||
referenceFindById: `nakadai/nakadai/model/reference/demo/findById`, |
||||
saveReferenceDemo: `nakadai/nakadai/model/reference/demo/saveReferenceDemo`, |
||||
referenceDemoList: `nakadai/nakadai/model/reference/demo/referenceDemoList`, |
||||
getAllModelList: `nakadai/nakadai/model/reference/demo/getAllModelList`, |
||||
synchronizationMdel: `nakadai/nakadai/model/reference/demo/synchronizationMdel`, |
||||
|
||||
deleteSourceModelCategory: `nakadai/nakadai/model/category/deleteSourceModelCategory`, |
||||
categorySave: `nakadai/nakadai/model/category/save`, |
||||
sourceModelClassification: `nakadai/nakadai/model/category/sourceModelClassification`, |
||||
updateSourceModelCategory: `nakadai/nakadai/model/category/updateSourceModelCategory`, |
||||
|
||||
bulkDisable: `nakadai/nakadai/model/demo/bulkDisable`, |
||||
deleteSysModelDemo: `nakadai/nakadai/model/demo/deleteSysModelDemo`, |
||||
modelFindById: `nakadai/nakadai/model/demo/findById`, |
||||
saveSysModelDemo: `nakadai/nakadai/model/demo/saveSysModelDemo`, |
||||
sysModelDemoList: `nakadai/nakadai/model/demo/sysModelDemoList`, |
||||
updateSysModelDemo: `nakadai/nakadai/model/demo/updateSysModelDemo`, |
||||
runPythonCode: `nakadai/nakadai/model/demo/runPythonCode`, |
||||
getAllModelListBySys: `nakadai/nakadai/model/demo/getAllModelListBySys`, |
||||
InstitutionSourceModel: `nakadai/nakadai/model/demo/InstitutionSourceModel`, |
||||
disableModelDemo: `nakadai/nakadai/model/demo/disabledEvents`, |
||||
copyTheModelToTheNakadai: `nakadai/nakadai/model/demo/copyTheModelToTheNakadai`, |
||||
builtInModelButtonDisplayByNakadai: `nakadai/nakadai/model/demo/builtInModelButtonDisplayByNakadai`, |
||||
builtInModelState: `nakadai/nakadai/model/demo/builtInModelState`, |
||||
modelRedis: `nakadai/nakadai/model/demo/getRedisCache`, |
||||
|
||||
// 课程管理三级联查
|
||||
courseDiscipline: `nakadai/nakadai/subject/courseDiscipline`, //课程学科类别
|
||||
courseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`, //课程专业类
|
||||
courseProfessional: `nakadai/nakadai/subject/courseProfessional`, //课程专业
|
||||
//课程管理
|
||||
curriculumList: `nakadai/nakadai/curriculum/curriculumList`, //课程列表
|
||||
curriculumTree: `nakadai/nakadai/curriculum/curriculumTree`, |
||||
createCurriculum: `nakadai/nakadai/curriculum/createCurriculum`, //创建课程
|
||||
configureCourseProject: `nakadai/nakadai/curriculum/configureCourseProject`, |
||||
curriculumDetail: `nakadai/nakadai/curriculum/curriculumDetail`, //课程详情
|
||||
modifyCourse: `nakadai/nakadai/curriculum/modifyCourse`, //编辑课程
|
||||
delCourse: `nakadai/nakadai/curriculum/delCourse`, //单个、批量删除课程
|
||||
isShelves: `nakadai/nakadai/curriculum/isShelves`, //上下架课程
|
||||
getInternalProjectBySystemId: `occupationlab/occupationlab/projectManage/getInternalProjectBySystemId`, //根据系统id、项目权限获取系统内置项目
|
||||
checkConfig: `nakadai/nakadai/curriculum/checkConfig`, |
||||
deleteCoursePrompt: `nakadai/nakadai/curriculum/deleteCoursePrompt`, |
||||
combinationResource: `nakadai/nakadai/curriculum/combinationResource`, |
||||
replaceResource: `nakadai/nakadai/curriculum/subsection/replaceResource`, |
||||
curriculumChapter: `nakadai/nakadai/curriculum/chapter/queryChaptersAndSubsections`, |
||||
courseLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/courseLearningProgress', |
||||
deleteLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/delete', |
||||
curriculumGetSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, |
||||
copySelfBuildCourse: `nakadai/nakadai/curriculum/copySelfBuildCourse`, |
||||
// 课程笔记
|
||||
addNote: `nakadai/curriculumNotes/addNote`, |
||||
curriculumNoteList: `nakadai/curriculumNotes/curriculumNoteList`, |
||||
deleteNotes: `nakadai/curriculumNotes/deleteNotes`, |
||||
updateNote: `nakadai/curriculumNotes/updateNote`, |
||||
|
||||
// 教学互动
|
||||
addCommentStation: `nakadai/comment/addComment`, |
||||
commentTreeList: `nakadai/comment/commentTreeList`, |
||||
deleteAComment: `nakadai/comment/deleteAComment`, |
||||
commentAndLike: `nakadai/commentLike/commentAndLike`, |
||||
unlike: `nakadai/commentLike/unlike`, |
||||
messageNotificationList: `nakadai/notify/messageNotificationList`, |
||||
noticeRead: `nakadai/notify/noticeRead`, |
||||
// 课程章节管理
|
||||
addChapter: `nakadai/nakadai/curriculum/chapter/addChapter`, //添加章节
|
||||
editChapter: `nakadai/nakadai/curriculum/chapter/editChapter`, //修改章节
|
||||
deleteChapter: `nakadai/nakadai/curriculum/chapter/deleteChapter`, //根据id删除章节
|
||||
queryChaptersAndSubsections: `nakadai/nakadai/curriculum/chapter/queryChaptersAndSubsections`, //根据课程id查询章节小节,树状结构
|
||||
reorder: `nakadai/nakadai/curriculum/chapter/reorder`, //编辑排序
|
||||
// 课程小节管理
|
||||
addSubsection: `nakadai/nakadai/curriculum/subsection/addSubsection`, //添加小节
|
||||
deleteSubsection: `nakadai/nakadai/curriculum/subsection/deleteSubsection`, //根据id删除小节
|
||||
editSubsection: `nakadai/nakadai/curriculum/subsection/editSubsection`, //修改小节
|
||||
getSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, //根据小节id获取预览文件地址
|
||||
|
||||
// 理论课程
|
||||
delTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/batchDeletion`, |
||||
findTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/findById`, |
||||
listTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/pageConditionalQueryCourse`, |
||||
boutiqueCurriculumTree: `occupationlab/occupationlab/theoreticalCourse/boutiqueCurriculumTree`, |
||||
saveTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/save`, |
||||
updateTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/update`, |
||||
disabledTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/disabledEvents`, |
||||
checkRepeatTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/checkRepeat`, |
||||
getRedisCache: `occupationlab/occupationlab/theoreticalCourse/getRedisCache`, |
||||
getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`, |
||||
// 理论课程分类管理
|
||||
checkRepeatClassification: `occupationlab/occupationlab/theoreticalCourseClassification/checkRepeat`, |
||||
delClassification: `occupationlab/occupationlab/theoreticalCourseClassification/batchDeletion`, |
||||
findClassification: `occupationlab/occupationlab/theoreticalCourseClassification/findById`, |
||||
listClassification: `occupationlab/occupationlab/theoreticalCourseClassification/pagingQuery`, |
||||
saveClassification: `occupationlab/occupationlab/theoreticalCourseClassification/save`, |
||||
updateClassification: `occupationlab/occupationlab/theoreticalCourseClassification/update`, |
||||
queryAllCategoriesOfSchools: `occupationlab/occupationlab/theoreticalCourseClassification/queryAllCategoriesOfSchools`, |
||||
// 课程章节管理
|
||||
addChapterTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/addChapter`, |
||||
chapterReorderTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/chapterReorder`, |
||||
deleteChapterTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/deleteChapter`, |
||||
editChapterTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/editChapter`, |
||||
queryChaptersTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/queryChaptersAndSubsections`, |
||||
reorderTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/reorder`, |
||||
// 课程小节管理
|
||||
addSubsectionTheoretical: `occupationlab/occupationlab/theoreticalCourseSubsection/addSubsection`, // 添加小节
|
||||
deleteSubsectionTheoretical: `occupationlab/occupationlab/theoreticalCourseSubsection/deleteSubsection`, // 根据id删除小节
|
||||
editSubsectionTheoretical: `occupationlab/occupationlab/theoreticalCourseSubsection/editSubsection`, // 修改小节
|
||||
getSubsectionTheoretical: `occupationlab/occupationlab/theoreticalCourseSubsection/getSubsection`, // 根据小节id获取预览文件地址
|
||||
batchDeletionTheoretical: `occupationlab/occupationlab/theoreticalCourseSubsection/batchDeletion`, |
||||
deleteSubsectionBatch: `nakadai/nakadai/curriculum/subsection/deleteSubsectionBatch`, |
||||
const host = Setting.apiBaseURL |
||||
const uploadURL = Setting.uploadURL |
||||
|
||||
// 栏目管理
|
||||
addColumn: `occupationlab/occupationlab/information/column/addColumn`, |
||||
deleteColumn: `occupationlab/occupationlab/information/column/deleteColumn`, |
||||
editColumn: `occupationlab/occupationlab/information/column/editColumn`, |
||||
queryAllColumns: `occupationlab/occupationlab/information/column/queryAllColumns`, |
||||
columnReorder: `occupationlab/occupationlab/information/column/reorder`, |
||||
// 内容管理
|
||||
addArticle: `occupationlab/occupationlab/information/article/addArticle`, |
||||
deleteArticles: `occupationlab/occupationlab/information/article/deleteArticles`, |
||||
editArticle: `occupationlab/occupationlab/information/article/editArticle`, |
||||
enableArticle: `occupationlab/occupationlab/information/article/enableArticle`, |
||||
getArticle: `occupationlab/occupationlab/information/article/getArticle`, |
||||
getArticles: `occupationlab/occupationlab/information/article/getArticles`, |
||||
queryArticleByCondition: `occupationlab/occupationlab/information/article/queryArticleByCondition`, |
||||
articleSort: `occupationlab/occupationlab/information/article/articleSort`, |
||||
|
||||
queryProvince: `nakadai/nakadai/province/queryProvince`, //查询省份
|
||||
queryCity: `nakadai/nakadai/city/queryCity`, //查询城市
|
||||
|
||||
queryCourseDiscipline: `nakadai/nakadai/subject/courseDiscipline`, //查询课程学科
|
||||
queryCourseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`, //查询专业类
|
||||
queryCourseProfessional: `nakadai/nakadai/subject/courseProfessional`, //查询专业
|
||||
|
||||
// 数据管理
|
||||
getIdQueryTable: `data/data/table/getIdQueryTable`, |
||||
getTableByClassification: `data/data/table/getTableByClassification`, |
||||
getTableByCondition: `data/data/table/getTableByCondition`, |
||||
originalList: `data/data/table/originalList`, |
||||
originalListById: `data/data/table/originalListById`, |
||||
saveCategory: `data/data/table/saveCategory`, |
||||
saveTable: `data/data/table/saveTable`, |
||||
updateCategory: `data/data/table/updateCategory`, |
||||
deleteCategory: `data/data/table/deleteCategory`, |
||||
deleteTable: `data/data/table/deleteTable`, |
||||
previewData: `data/data/preview`, |
||||
staticPreview: `data/data/staticPreview`, |
||||
editTableName: `data/data/table/editTableName`, |
||||
updateTableCommit: `data/data/updateTableCommit`, |
||||
getLevel: `data/data/category/getLevel`, |
||||
getAllTableInfoByCategoryId: `data/data/product/getAllTableInfoByCategoryId`, |
||||
|
||||
// 产品管理
|
||||
deleteProduct: `data/data/product/delete`, |
||||
findById: `data/data/product/findById`, |
||||
listByEntity: `data/data/product/listByEntity`, |
||||
saveProduct: `data/data/product/save`, |
||||
updateProduct: `data/data/product/update`, |
||||
saveRecord: `data/data/dataRecord/saveRecord`, |
||||
getAllTableIdBycategoryId: `data/data/product/getAllTableIdBycategoryId`, |
||||
deleteDataPrompt: `data/data/product/deleteDataPrompt`, |
||||
|
||||
// 关键词
|
||||
addKeyword: `data/data/keyword/addKeyword`, |
||||
deleteKeyword: `data/data/keyword/deleteKeyword`, |
||||
getKeywordByCategoryId: `data/data/keyword/getKeywordByCategoryId`, |
||||
|
||||
// 后台账号
|
||||
deleteArch: `nakadai/nakadai/staffAccountArchitecture/delete`, |
||||
saveArch: `nakadai/nakadai/staffAccountArchitecture/save`, |
||||
treeListArch: `nakadai/nakadai/staffAccountArchitecture/treeList`, |
||||
updateArch: `nakadai/nakadai/staffAccountArchitecture/update`, |
||||
delStaff: `nakadai/nakadai/backstageStaff/delStaff`, |
||||
modifyStaff: `nakadai/nakadai/backstageStaff/modifyStaff`, |
||||
saveStaff: `nakadai/nakadai/backstageStaff/saveStaff`, |
||||
staffDetail: `nakadai/nakadai/backstageStaff/staffDetail`, |
||||
staffList: `nakadai/nakadai/backstageStaff/staffList`, |
||||
importStaff: `${host}nakadai/nakadai/backstageStaff/importStaff`, |
||||
exportFailure: `${host}nakadai/nakadai/backstageStaff/exportFailure`, |
||||
|
||||
// 角色管理
|
||||
batchRemove: `users/users/role/batchRemove`, //批量删除角色
|
||||
checkRoleIsExist: `users/users/role/checkRoleIsExist`, //判断该角色是否存在
|
||||
delRoleByAccountId: `users/users/role/delRoleByAccountId`, //删除某用户下的某个角色
|
||||
roleList: `users/users/role/list`, //角色分页列表查询
|
||||
obtainDetails: `users/users/role/obtainDetails`, //获取角色详情
|
||||
saveOrUpdate: `users/users/role/saveOrUpdate`, //新增或更新角色
|
||||
queryAllMenus: `users/users/permission/queryAllMenus`, //查询所有菜单
|
||||
getSupplierList: `users/users/supplier/getSupplierList`, |
||||
getSupplierListByRole: `users/users/supplier/getSupplierListByRole`, |
||||
|
||||
// 日志管理
|
||||
logAdd: `nakadai/nakadai/log/add`, |
||||
logDel: `nakadai/nakadai/log/delete`, |
||||
logGet: `nakadai/nakadai/log/get`, |
||||
logManagementList: `nakadai/nakadai/log/logManagementList`, |
||||
platformLogList: `nakadai/nakadai/log/platformLogList`, |
||||
listUpdate: `nakadai/nakadai/log/update`, |
||||
checkRepeat: `nakadai/nakadai/log/checkRepeat`, |
||||
logWithdrawal: `nakadai/nakadai/log/logWithdrawal`, |
||||
|
||||
sysLogs: `occupationlab/sys/logs`, |
||||
|
||||
// 合伙人
|
||||
deleteParner: `nakadai/nakadai/partnerClassification/delete`, |
||||
saveParner: `nakadai/nakadai/partnerClassification/save`, |
||||
listParner: `nakadai/nakadai/partnerClassification/treeList`, |
||||
updateParner: `nakadai/nakadai/partnerClassification/update`, |
||||
|
||||
delPartnerAccount: `nakadai/nakadai/partnerAccount/delPartnerAccount`, |
||||
modifyPartnerAccount: `nakadai/nakadai/partnerAccount/modifyPartnerAccount`, |
||||
partnerAccountDetail: `nakadai/nakadai/partnerAccount/partnerAccountDetail`, |
||||
partnerAccountList: `nakadai/nakadai/partnerAccount/partnerAccountList`, |
||||
savePartnerAccount: `nakadai/nakadai/partnerAccount/savePartnerAccount`, |
||||
generateInvitationCode: `nakadai/nakadai/partnerAccount/generateInvitationCode`, |
||||
generationQrCode: `nakadai/nakadai/partnerAccount/generationQrCode`, |
||||
queryUserInfoByPhone: `nakadai/nakadai/partner-team/queryUserInfoByPhone`, |
||||
getAllTeam: `nakadai/nakadai/partnerClassification/getAllTeam`, |
||||
partnerRemoval: `nakadai/nakadai/partnerAccount/partnerRemoval`, |
||||
generateTransferCode: `nakadai/nakadai/partnerAccount/generateTransferCode`, |
||||
transferAdmin: `nakadai/nakadai/partnerAccount/transferAdmin`, |
||||
transferTeam: `nakadai/nakadai/partnerAccount/transferTeam`, |
||||
partnerAccountMergeList: `nakadai/nakadai/partnerAccount/partnerAccountMergeList`, |
||||
|
||||
// 赛事
|
||||
CompetitionPageConditionQueryByNakadai: `competition/competition/management/competitionPageConditionQueryByNakadai`, |
||||
addCompetition: `competition/competition/management/addCompetition`, |
||||
batchDeleteCompetition: `competition/competition/management/batchDeleteCompetition`, |
||||
checkTheStatusOfTheCompetition: `competition/competition/management/checkTheStatusOfTheCompetition`, |
||||
disabledEventsCompetition: `competition/competition/management/disabledEvents`, |
||||
editCompetition: `competition/competition/management/editCompetition`, |
||||
getCompetition: `competition/competition/management/getCompetition`, |
||||
getProjectAssessmentByCompetition: `occupationlab/occupationlab/projectManage/getProjectAssessmentByCompetition`, |
||||
publishCompetition: `competition/competition/management/publishCompetition`, |
||||
detailsOfCompetitionStage: `competition/competition/management/detailsOfCompetitionStage`, |
||||
entryInformation: `competition/competition/team/entryInformation`, |
||||
getRedisCacheCompetition: `competition/competition/management/getRedisCache`, |
||||
copyCompetition: `competition/competition/management/copyCompetition`, |
||||
checkCustomerBySchool: `competition/competition/team/checkCustomerBySchool`, |
||||
updateEventAllocationRecord: `competition/competitionAutomaticAllocationRecord/updateEventAllocationRecord`, |
||||
editWhetherPopUpsAppear: `competition/competitionAutomaticAllocationRecord/editWhetherPopUpsAppear`, |
||||
automaticAllocation: `competition/competition/automaticAllocation/automaticAllocation`, |
||||
checkTeamStatus: `competition/teamAbnormalInformation/checkTeamStatus`, |
||||
queryAbnormalTeam: `competition/teamAbnormalInformation/queryAbnormalTeam`, |
||||
viewEventAllocationInformation: `competition/competitionAutomaticAllocationRecord/viewEventAllocationInformation`, |
||||
getCompetitionProjectByMiddleGround: `occupationlab/occupationlab/projectManage/getCompetitionProjectByMiddleGround`, |
||||
libraryList: `exam/exam/paperLibrary/libraryList`, |
||||
examPaperList: `exam/exam/paper/examPaperList`, |
||||
copyExamPaper: `exam/exam/paper/copyExamPaper`, |
||||
getDetailedExamScores: `exam/exam/paper/getDetailedExamScores`, |
||||
exportExamPaperReport: `exam/exam/paper/exportExamPaperReport`, |
||||
exportLabReport: `${host}occupationlab/occupationlab/achievement/exportLabReport`, |
||||
exportBankExperimentReport: `${host}occupationlab/occupationlab/achievement/exportBankExperimentReport`, |
||||
getServiceOfType: `nakadai/nakadai/serviceConfiguration/getServiceOfType`, |
||||
|
||||
// 赛事内容
|
||||
addCompetitionContent: `competition/competition/content/addCompetitionContent`, |
||||
editCompetitionContent: `competition/competition/content/editCompetitionContent`, |
||||
getCompetitionContent: `competition/competition/content/getCompetitionContent`, |
||||
// 赛事附件
|
||||
delComAnnex: `competition/competition/annex/delete`, |
||||
saveComAnnex: `competition/competition/annex/save`, |
||||
updateComAnnex: `competition/competition/annex/update`, |
||||
// 赛事公告附件
|
||||
delAnnex: `competition/competition/announcementAnnex/delete`, |
||||
saveAnnex: `competition/competition/announcementAnnex/save`, |
||||
updateAnnex: `competition/competition/announcementAnnex/update`, |
||||
viewAttachments: `competition/competition/announcementAnnex/viewAttachments`, |
||||
// 赛事规则
|
||||
addCompetitionRule: `competition/competition/rule/addCompetitionRule`, |
||||
editCompetitionRule: `competition/competition/rule/editCompetitionRule`, |
||||
getCompetitionRule: `competition/competition/rule/getCompetitionRule`, |
||||
queryCompetitionStageBySetupId: `competition/competition/stage/queryCompetitionStageBySetupId`, |
||||
// 竞赛进展
|
||||
addCompetitionProgress: `competition/competition/progress/addCompetitionProgress`, |
||||
deleteCompetitionProgress: `competition/competition/progress/deleteCompetitionProgress`, |
||||
editCompetitionProgress: `competition/competition/progress/editCompetitionProgress`, |
||||
getCompetitionProgress: `competition/competition/progress/getCompetitionProgress`, |
||||
// 报名人员
|
||||
addCompetitionRegistration: `competition/competition/registration/addCompetitionRegistration`, |
||||
cancelRegistration: `competition/competition/registration/cancelRegistration`, |
||||
disableContests: `competition/competition/registration/disableContests`, |
||||
disableRegistration: `competition/competition/registration/disableRegistration`, |
||||
excelExport: `${host}competition/competition/registration/excelExport`, |
||||
exportDataInBatches: `${host}competition/competition/registration/exportDataInBatches`, |
||||
queryRegistrationByCondition: `competition/competition/registration/queryRegistrationByCondition`, |
||||
searchTeam: `competition/competition/team/searchTeam`, |
||||
joinCompetitionTeam: `competition/competition/team/joinCompetitionTeam`, |
||||
addCompetitionTeam: `competition/competition/team/addCompetitionTeam`, |
||||
studentAccountApplication: `users/users/register/studentAccountApplication`, |
||||
checkPhoneOrEmailExist: `users/users/userInfo/checkPhoneOrEmailExist`, |
||||
editCompetitionTeam: `competition/competition/team/editCompetitionTeam`, |
||||
addAnAdvisor: `competition/competition/teamInstructor/addAnAdvisor`, |
||||
deleteAnAdvisor: `competition/competition/teamInstructor/deleteAnAdvisor`, |
||||
captainOfTransfer: `competition/competition/team/captainOfTransfer`, |
||||
removeTheLine: `competition/competition/team/removeTheLine`, |
||||
stageSelectParticipants: `competition/competition/teamParticipant/stageSelectParticipants`, |
||||
updateUser: `users/users/userInfo/updateUser`, |
||||
enquireAboutSchoolStudents: `users/users/userAccount/enquireAboutSchoolStudents`, |
||||
cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`, |
||||
schoolsInCompetitionArea: `competition/competition/range/schoolsInCompetitionArea`, |
||||
batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`, |
||||
deleteAllData: `competition/competition/registration/deleteAllData`, |
||||
whetherThereIsReport: `competition/competitionAutomaticAllocationRecord/whetherThereIsReport`, |
||||
closePopup: `competition/competitionAutomaticAllocationRecord/closePopup`, |
||||
batchImportPersonalData: `${host}competition/competition/registration/batchImportPersonalData`, |
||||
batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`, |
||||
TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`, |
||||
exportAbnormalData: `${host}competition/teamAbnormalInformation/exportAbnormalData`, |
||||
// 赛事公告
|
||||
addAnnouncement: `competition/competition/announcement/addAnnouncement`, |
||||
amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`, |
||||
deleteAnnouncement: `competition/competition/announcement/deleteAnnouncement`, |
||||
disableAnnouncement: `competition/competition/announcement/disableAnnouncement`, |
||||
queryAnnouncementByCompetitionId: `competition/competition/announcement/queryAnnouncementByCompetitionId`, |
||||
queryAnnouncementDetails: `competition/competition/announcement/queryAnnouncementDetails`, |
||||
saveAnnouncementAnnex: `competition/competition/announcementAnnex/save`, |
||||
// 赛事成绩
|
||||
batchDeleteContestGrade: `competition/competition/performance/batchDeleteContestGrade`, |
||||
batchImportGrades: `${host}competition/competition/performance/batchImportGrades`, |
||||
exportExperimentalResultsInBatch: `${host}competition/competition/performance/exportExperimentalResultsInBatch`, |
||||
exportExamPaperReports: `${host}exam/exam/paper/exportExamPaperReports`, |
||||
batchExportReportsAsZip: `${host}occupationlab/occupationlab/achievement/batchExportReportsAsZip`, |
||||
performanceExportFailure: `${host}competition/competition/performance/exportFailure`, |
||||
rankExportFailure: `${host}competition/competition/rank/exportFailure`, |
||||
batchImportRanking: `${host}competition/competition/rank/batchImportRanking`, |
||||
getPaperUploadFileZip: `${host}exam/exam/paper/question/userAnswer/getPaperUploadFileZip`, |
||||
stageGradeManagementList: `competition/competition/performance/stageGradeManagementList`, |
||||
stageRaceRanking: `competition/competition/rank/stageRaceRanking`, |
||||
overallStandingsInThePointsRace: `competition/competition/rank/overallStandingsInThePointsRace`, |
||||
publishRanking: `competition/competition/rank/publishRanking`, |
||||
stageTeamScoreDetails: `competition/competition/rank/stageTeamScoreDetails`, |
||||
multipleStageTeamScoreDetails: `competition/competition/rank/multipleStageTeamScoreDetails`, |
||||
detailsOfTotalTeamScores: `competition/competition/rank/detailsOfTotalTeamScores`, |
||||
cancelRanking: `competition/competition/rank/cancelRanking`, |
||||
reportDetail: `occupationlab/occupationlab/achievement/reportDetail`, |
||||
deleteLastPublication: `competition/competition/rank/deleteLastPublication`, |
||||
whetherToPublish: `competition/competition/rank/whetherToPublish`, |
||||
manuallyRankTheUploadList: `competition/competition/rank/manuallyRankTheUploadList`, |
||||
queryPublicationSource: `competition/competition/rank/queryPublicationSource`, |
||||
releaseVerification: `competition/competition/rank/releaseVerification`, |
||||
totalRankingScoreDetails: `competition/competition/rank/totalRankingScoreDetails`, |
||||
batchRelease: `competition/competition/rank/batchRelease`, |
||||
manuallyUploadedRankings: `competition/competition/rank/manuallyUploadedRankings`, |
||||
toggleTheSortingMode: `competition/competition/rank/toggleTheSortingMode`, |
||||
selectTheLastSortStatus: `competition/competition/rank/selectTheLastSortStatus`, |
||||
cancelImport: `competition/competition/rank/cancelImport`, |
||||
addCompetitionStageRankingTime: `competition/competitionReleaseTime/addCompetitionStageRankingTime`, |
||||
cancelCompetitionStageRankingTime: `competition/competitionReleaseTime/cancelCompetitionStageRankingTime`, |
||||
getCompetitionStageRankingTime: `competition/competitionReleaseTime/getCompetitionStageRankingTime`, |
||||
frontOfficeCompetitionRanking: `competition/competition/rank/frontOfficeCompetitionRanking`, |
||||
cCompetitionStageFileList: `competition/cCompetitionStageFile/listByEntity`, |
||||
getPaperUploadFile: `exam/exam/paper/question/userAnswer/getPaperUploadFile`, |
||||
derive: `${host}competition/cCompetitionStageFile/deriveAll`, |
||||
allExperimentalResultsAreDerived: `${host}competition/competition/performance/allExperimentalResultsAreDerived`, |
||||
derivedRanking: `${host}competition/competition/rank/derivedRanking`, |
||||
individualDerivedRanking: `${host}competition/competition/rank/individualDerivedRanking`, |
||||
gradeDownloadExcel: `${host}competition/competition/performance/downloadExcel`, |
||||
gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`, |
||||
rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`, |
||||
rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`, |
||||
|
||||
// 合伙运营
|
||||
batchDeletionParnerLabel: `nakadai/nakadai/partner/article/label/batchDeletion`, |
||||
checkForHeavyParnerLabel: `nakadai/nakadai/partner/article/label/checkForHeavy`, |
||||
findByIdParnerLabel: `nakadai/nakadai/partner/article/label/findById`, |
||||
queryAllArticleSubjectTags: `nakadai/nakadai/partner/article/label/queryAllArticleSubjectTags`, |
||||
saveParnerLabel: `nakadai/nakadai/partner/article/label/save`, |
||||
updateParnerLabel: `nakadai/nakadai/partner/article/label/update`, |
||||
batchDeletionParnerClass: `nakadai/nakadai/partner/article/classification/batchDeletion`, |
||||
checkForHeavyParnerClass: `nakadai/nakadai/partner/article/classification/checkForHeavy`, |
||||
findByIdParnerClass: `nakadai/nakadai/partner/article/classification/findById`, |
||||
queryClassificationByType: `nakadai/nakadai/partner/article/classification/queryClassificationByType`, |
||||
saveParnerClass: `nakadai/nakadai/partner/article/classification/save`, |
||||
updateParnerClass: `nakadai/nakadai/partner/article/classification/update`, |
||||
batchDeletionParnerArticle: `nakadai/nakadai/partner/article/management/batchDeletion`, |
||||
findByIdParnerArticle: `nakadai/nakadai/partner/article/management/findById`, |
||||
partnerOperatingList: `nakadai/nakadai/partner/article/management/partnerOperatingList`, |
||||
saveParnerArticle: `nakadai/nakadai/partner/article/management/save`, |
||||
updateParnerArticle: `nakadai/nakadai/partner/article/management/update`, |
||||
articleEnableOrDisable: `nakadai/nakadai/partner/article/management/articleEnableOrDisable`, |
||||
checkIfTheTitleIsRepeat: `nakadai/nakadai/partner/article/management/checkIfTheTitleIsRepeat`, |
||||
modifiedSort: `nakadai/nakadai/partner/article/management/modifiedSort`, |
||||
articleTopOperation: `nakadai/nakadai/partner/article/management/articleTopOperation`, |
||||
batchDeletionParnerFile: `nakadai/nakadai/partner/article/file/batchDeletion`, |
||||
findByIdParnerFile: `nakadai/nakadai/partner/article/file/findById`, |
||||
saveParnerFile: `nakadai/nakadai/partner/article/file/save`, |
||||
theAttachmentUnderTheQueryColumn: `nakadai/nakadai/partner/article/file/theAttachmentUnderTheQueryColumn`, |
||||
updateParnerFile: `nakadai/nakadai/partner/article/file/update`, |
||||
batchDeletionScheme: `nakadai/nakadai/partner/schemeManagement/batchDeletion`, |
||||
enableOrDisableScheme: `nakadai/nakadai/partner/schemeManagement/enableOrDisable`, |
||||
findByIdScheme: `nakadai/nakadai/partner/schemeManagement/findById`, |
||||
saveScheme: `nakadai/nakadai/partner/schemeManagement/save`, |
||||
schemeList: `nakadai/nakadai/partner/schemeManagement/schemeList`, |
||||
updateScheme: `nakadai/nakadai/partner/schemeManagement/update`, |
||||
|
||||
// 商城管理
|
||||
addProductCategory: `nakadai/productClassification/addProductCategory`, |
||||
deleteProductCategory: `nakadai/productClassification/deleteProductCategory`, |
||||
productCategoryList: `nakadai/productClassification/productCategoryList`, |
||||
addProductType: `nakadai/productType/addProductType`, |
||||
deleteProductType: `nakadai/productType/deleteProductType`, |
||||
productTypeList: `nakadai/productType/productTypeList`, |
||||
updateProductType: `nakadai/productType/updateProductType`, |
||||
addSupplier: `nakadai/supplier/addSupplier`, |
||||
deleteSupplier: `nakadai/supplier/deleteSupplier`, |
||||
supplierList: `nakadai/supplier/supplierList`, |
||||
addTags: `nakadai/tags/addTags`, |
||||
deleteTags: `nakadai/tags/deleteTags`, |
||||
tagsList: `nakadai/tags/tagsList`, |
||||
updateTags: `nakadai/tags/updateTags`, |
||||
updateTagsSort: `nakadai/tags/updateTagsSort`, |
||||
addGoods: `nakadai/mall/addGoods`, |
||||
listOfGoods: `nakadai/mall/listOfGoods`, |
||||
deletionOfGoods: `nakadai/mall/deletionOfGoods`, |
||||
detailsOfGoods: `nakadai/mall/detailsOfGoods`, |
||||
renewalOfGoods: `nakadai/mall/renewalOfGoods`, |
||||
goodsOffTheShelf: `nakadai/mall/goodsOffTheShelf`, |
||||
goodsSelection: `nakadai/mall/goodsSelection`, |
||||
queryCitySettlementPrice: `nakadai/mallPrice/queryCitySettlementPrice`, |
||||
allSubjects: `nakadai/productTheme/allSubjects`, |
||||
|
||||
// 营销推广
|
||||
delMarketing: `nakadai/nakadai/mall/marketing/promotion/batchDeletion`, |
||||
findByIdMarketing: `nakadai/nakadai/mall/marketing/promotion/findById`, |
||||
listMarketing: `nakadai/nakadai/mall/marketing/promotion/pagingQueryList`, |
||||
saveMarketing: `nakadai/nakadai/mall/marketing/promotion/save`, |
||||
updateMarketing: `nakadai/nakadai/mall/marketing/promotion/update`, |
||||
bannerEnableOrDisable: `nakadai/nakadai/mall/marketing/promotion/bannerEnableOrDisable`, |
||||
export default { |
||||
|
||||
resourceLibrary: `nakadai/resourceLibrary/resourceLibrary`, |
||||
resourceDel: `nakadai/resourceLibrary/batchDeletion`, |
||||
resourceFind: `nakadai/resourceLibrary/findById`, |
||||
resourceSave: `nakadai/resourceLibrary/saveOrUpdate`, |
||||
getFileType: `nakadai/resourceLibrary/getFileType`, |
||||
logins: `users/users/user/login`, //登录
|
||||
verification: `${host}users/users/user/captcha`,// 验证码图片 保留host
|
||||
bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机
|
||||
sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码
|
||||
getUserRolesPermissionMenu: `users/users/user-role/getUserRolesPermissionMenu`, |
||||
deleteProfile : `users/users/userInfo/deleteProfile`, |
||||
|
||||
staffTemplate: `http://www.huorantech.cn/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板
|
||||
|
||||
checkEmailOrPhone: `occupationlab/occupationlab/architecture/checkEmailOrPhone`, // 新增学生前:校验手机号或者邮箱
|
||||
checkWorkNumOrAccount: `occupationlab/occupationlab/architecture/checkWorkNumOrAccount`, // 新增/编辑学生前:校验学号或者学生账号
|
||||
|
||||
// 订单管理
|
||||
orderAdd: `nakadai/nakadai/order/add`,// 订单添加
|
||||
orderDelete: `nakadai/nakadai/order/delete`,// 删除定单
|
||||
orderDetail: `nakadai/nakadai/order/get`,// 订单详情
|
||||
orderList: `nakadai/nakadai/order/list`,// 订单列表
|
||||
orderUpdate: `nakadai/nakadai/order/update`,// 订单更新
|
||||
renew: `nakadai/nakadai/orderOther/renew`,// 续费信息管理-post
|
||||
ship: `nakadai/nakadai/orderOther/ship`,// 处理时的订单发货管理-post
|
||||
bulkShipping: `nakadai/nakadai/orderOther/bulkShipping`, |
||||
getOrderOtherTime: `nakadai/nakadai/orderOther/getOrderOtherTime`, |
||||
refreshCache: `data/data/myDate/refreshCache`, |
||||
getPartnerTeamRates: `nakadai/nakadai/partner-team/getPartnerTeamRates`, |
||||
|
||||
// 客户管理
|
||||
delCustomers: `nakadai/nakadai/customer/delCustomers`, |
||||
updateCustomer: `nakadai/nakadai/customer/updateCustomer`, |
||||
addCustomer: `nakadai/nakadai/customer/addCustomer`, |
||||
queryCustomer: `nakadai/nakadai/customer/queryCustomer`, |
||||
queryCustomerDetails: `nakadai/nakadai/customer/queryCustomerDetails`, |
||||
saveOrUpdate: `data/data/role/saveOrUpdate`, |
||||
doAssign: `data/data/permission/doAssign`, |
||||
updateCustomerByRoleId: `nakadai/nakadai/customer/updateCustomerByRoleId`, |
||||
checkEmailOrPhone: `nakadai/nakadai/customer/checkEmailOrPhone`, // 新增客户前:校验手机号或者邮箱
|
||||
getProductsSubscribedByCustomers: `nakadai/nakadai/customer/getProductsSubscribedByCustomers`, |
||||
orderBulkDisableEnable: `nakadai/nakadai/orderOther/orderBulkDisableEnable`, |
||||
exportSubscribedRecords: `nakadai/nakadai/order/exportSubscribedRecords`, |
||||
|
||||
resetPwdCustomer: `nakadai/nakadai/customer/resetPwd`, |
||||
queryCustomerIsExists: `nakadai/nakadai/customer/queryCustomerIsExists`, |
||||
updateEnabled: `nakadai/nakadai/customer/updateEnabled`, |
||||
queryCustomerIndustryClass: `nakadai/nakadai/hrIndustryClass/queryIndustryClass`, |
||||
queryCustomerIndustry: `nakadai/nakadai/hrIndustry/queryIndustry`, |
||||
querySchoolData: `nakadai/nakadai/school/querySchool`, |
||||
getAListOfClientBusinessManagers: `nakadai/nakadai/customer/getAListOfClientBusinessManagers`, |
||||
getBusinessManagerOrder: `nakadai/nakadai/customer/getBusinessManagerOrder`, |
||||
|
||||
// 用户管理
|
||||
delUserAccounts: `users/users/userAccount/delUserAccounts`, |
||||
queryUserInfoDetails: `users/users/userAccount/queryUserInfoDetails`, |
||||
personalFile: `users/users/userAccount/personalFile`, |
||||
|
||||
queryUserInfoList: `users/users/userAccount/queryUserInfoList`, |
||||
resetPwd: `users/users/userAccount/resetPwd`, |
||||
selectAccountDetail: `users/users/userAccount/selectAccountDetail`, |
||||
selectUserSysBind: `users/users/userAccount/selectUserSysBind`, |
||||
updatePersonCenter: `users/users/userAccount/updatePersonCenter`, |
||||
updateUserAvatars: `${host}users/users/userAccount/updateUserAvatars`, |
||||
userInfo: `users/users/userAccount/userInfo`, |
||||
unbindMobilePhone: `users/users/userAccount/unbindMobilePhone`, |
||||
updateAccountEnable: `users/users/userAccount/updateAccountEnable`, |
||||
updateAccountAllEnable: `users/users/userAccount/updateAccountAllEnable`, |
||||
examinePassword: `users/users/userAccount/examinePassword`, |
||||
viewUserDetailsforNakadai: `users/users/userAccount/viewUserDetailsforNakadai`, |
||||
oneClickEnableVerification: `users/users/userAccount/oneClickEnableVerification`, |
||||
getValueModule: `nakadai/nakadai/valueModuleManagement/getValueModule`, |
||||
|
||||
queryServiceConfig: `nakadai/nakadai/serviceConfiguration/getAllService`, //查询服务配置
|
||||
// 项目管理
|
||||
avgValues: `occupationlab/occupationlab/projectManage/avgValues`, // 平均分分配值
|
||||
deleteProjectManage: `occupationlab/occupationlab/projectManage/deleteProjectManage`, // 新增项目管理
|
||||
getProjectBySystemId: `occupationlab/occupationlab/projectManage/getProjectBySystemId`, // 根据系统id获取全部项目
|
||||
queryNameIsExist: `occupationlab/occupationlab/projectManage/queryNameIsExist`, // 新增/编辑项目管理名称判重
|
||||
queryProjectManage: `occupationlab/occupationlab/projectManage/queryProjectManage`, // 项目管理列表(分页、筛选)
|
||||
updateIsOpen: `occupationlab/occupationlab/projectManage/updateIsOpen`, // 更新开启状态
|
||||
getProjectDetail: `occupationlab/occupationlab/projectManage/getProjectDetail`, // 根据项目id查询详情
|
||||
saveProjectDraft: `occupationlab/occupationlab/projectManage/saveProjectDraft`, // 新增项目管理
|
||||
addProjectManage: `occupationlab/occupationlab/projectManage/addProjectManage`, // 新增项目管理
|
||||
updateProjectManage: `occupationlab/occupationlab/projectManage/updateProjectManage`, // 修改项目管理
|
||||
editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理
|
||||
copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理
|
||||
// 判分点
|
||||
getBcJudgmentPoint: `judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页)
|
||||
getLcJudgmentPoint: `judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页)
|
||||
addProjectJudgment: `occupationlab/occupationlab/projectJudgment/addProjectJudgment`, // 添加项目管理、判分点中间表
|
||||
updateProjectJudgment: `occupationlab/occupationlab/projectJudgment/updateProjectJudgment`, // 判分点中间表批量更新
|
||||
deleteProjectJudgment: `occupationlab/occupationlab/projectJudgment/deleteProjectJudgment`, // 判分点中间表批量删除
|
||||
// 系统后台
|
||||
deleteModelClass: `nakadai/nakadai/model/reference/deleteModelClass`, |
||||
modelClassList: `nakadai/nakadai/model/reference/modelClassList`, |
||||
saveReferenceCategory: `nakadai/nakadai/model/reference/saveReferenceCategory`, |
||||
updateModelClass: `nakadai/nakadai/model/reference/updateModelClass`, |
||||
checkIsShowBySystemId: `nakadai/nakadai/model/reference/checkIsShowBySystemId`, |
||||
modifyIsShowState: `nakadai/nakadai/model/reference/modifyIsShowState`, |
||||
editProvinceCity: `nakadai/nakadai/partner-team/editProvinceCity`, |
||||
editPartnerTeamRates: `nakadai/nakadai/partner-team/editPartnerTeamRates`, |
||||
teamPartnerList: `nakadai/nakadai/partnerAccount/teamPartnerList`, |
||||
|
||||
delModelInfoBySystemId: `nakadai/nakadai/model/reference/demo/delModelInfoBySystemId`, |
||||
deleteReferenceDemo: `nakadai/nakadai/model/reference/demo/deleteReferenceDemo`, |
||||
referenceFindById: `nakadai/nakadai/model/reference/demo/findById`, |
||||
saveReferenceDemo: `nakadai/nakadai/model/reference/demo/saveReferenceDemo`, |
||||
referenceDemoList: `nakadai/nakadai/model/reference/demo/referenceDemoList`, |
||||
getAllModelList: `nakadai/nakadai/model/reference/demo/getAllModelList`, |
||||
synchronizationMdel: `nakadai/nakadai/model/reference/demo/synchronizationMdel`, |
||||
|
||||
deleteSourceModelCategory: `nakadai/nakadai/model/category/deleteSourceModelCategory`, |
||||
categorySave: `nakadai/nakadai/model/category/save`, |
||||
sourceModelClassification: `nakadai/nakadai/model/category/sourceModelClassification`, |
||||
updateSourceModelCategory: `nakadai/nakadai/model/category/updateSourceModelCategory`, |
||||
|
||||
bulkDisable: `nakadai/nakadai/model/demo/bulkDisable`, |
||||
deleteSysModelDemo: `nakadai/nakadai/model/demo/deleteSysModelDemo`, |
||||
modelFindById: `nakadai/nakadai/model/demo/findById`, |
||||
saveSysModelDemo: `nakadai/nakadai/model/demo/saveSysModelDemo`, |
||||
sysModelDemoList: `nakadai/nakadai/model/demo/sysModelDemoList`, |
||||
updateSysModelDemo: `nakadai/nakadai/model/demo/updateSysModelDemo`, |
||||
runPythonCode: `nakadai/nakadai/model/demo/runPythonCode`, |
||||
getAllModelListBySys: `nakadai/nakadai/model/demo/getAllModelListBySys`, |
||||
|
||||
// 课程管理三级联查
|
||||
courseDiscipline: `nakadai/nakadai/subject/courseDiscipline`, //课程学科类别
|
||||
courseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`, //课程专业类
|
||||
courseProfessional: `nakadai/nakadai/subject/courseProfessional`, //课程专业
|
||||
//课程管理
|
||||
curriculumList: `nakadai/nakadai/curriculum/curriculumList`, //课程列表
|
||||
createCurriculum: `nakadai/nakadai/curriculum/createCurriculum`, //创建课程
|
||||
curriculumDetail: `nakadai/nakadai/curriculum/curriculumDetail`, //课程详情
|
||||
modifyCourse: `nakadai/nakadai/curriculum/modifyCourse`, //编辑课程
|
||||
delCourse: `nakadai/nakadai/curriculum/delCourse`, //单个、批量删除课程
|
||||
isShelves: `nakadai/nakadai/curriculum/isShelves`, //上下架课程
|
||||
getInternalProjectBySystemId: `occupationlab/occupationlab/projectManage/getInternalProjectBySystemId`, //根据系统id、项目权限获取系统内置项目
|
||||
checkConfig: `nakadai/nakadai/curriculum/checkConfig`, |
||||
// 课程章节管理
|
||||
addChapter: `nakadai/nakadai/curriculum/chapter/addChapter`, //添加章节
|
||||
editChapter: `nakadai/nakadai/curriculum/chapter/editChapter`, //修改章节
|
||||
deleteChapter: `nakadai/nakadai/curriculum/chapter/deleteChapter`, //根据id删除章节
|
||||
queryChaptersAndSubsections: `nakadai/nakadai/curriculum/chapter/queryChaptersAndSubsections`, //根据课程id查询章节小节,树状结构
|
||||
reorder: `nakadai/nakadai/curriculum/chapter/reorder`, //编辑排序
|
||||
// 课程小节管理
|
||||
addSubsection: `nakadai/nakadai/curriculum/subsection/addSubsection`, //添加小节
|
||||
deleteSubsection: `nakadai/nakadai/curriculum/subsection/deleteSubsection`, //根据id删除小节
|
||||
editSubsection: `nakadai/nakadai/curriculum/subsection/editSubsection`, //修改小节
|
||||
getSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, //根据小节id获取预览文件地址
|
||||
|
||||
// 理论课程
|
||||
delTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/batchDeletion`, |
||||
findTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/findById`, |
||||
listTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/pageConditionalQueryCourse`, |
||||
saveTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/save`, |
||||
updateTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/update`, |
||||
disabledTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/disabledEvents`, |
||||
checkRepeatTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/checkRepeat`, |
||||
getRedisCache: `occupationlab/occupationlab/theoreticalCourse/getRedisCache`, |
||||
getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`, |
||||
// 理论课程分类管理
|
||||
checkRepeatClassification: `occupationlab/occupationlab/theoreticalCourseClassification/checkRepeat`, |
||||
delClassification: `occupationlab/occupationlab/theoreticalCourseClassification/batchDeletion`, |
||||
findClassification: `occupationlab/occupationlab/theoreticalCourseClassification/findById`, |
||||
listClassification: `occupationlab/occupationlab/theoreticalCourseClassification/pagingQuery`, |
||||
saveClassification: `occupationlab/occupationlab/theoreticalCourseClassification/save`, |
||||
updateClassification: `occupationlab/occupationlab/theoreticalCourseClassification/update`, |
||||
queryAllCategoriesOfSchools: `occupationlab/occupationlab/theoreticalCourseClassification/queryAllCategoriesOfSchools`, |
||||
// 课程章节管理
|
||||
addChapterTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/addChapter`, |
||||
chapterReorderTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/chapterReorder`, |
||||
deleteChapterTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/deleteChapter`, |
||||
editChapterTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/editChapter`, |
||||
queryChaptersTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/queryChaptersAndSubsections`, |
||||
reorderTheoretical: `occupationlab/occupationlab/theoreticalCourseChapter/reorder`, |
||||
// 课程小节管理
|
||||
addSubsectionTheoretical: `occupationlab/occupationlab/theoreticalCourseSubsection/addSubsection`, // 添加小节
|
||||
deleteSubsectionTheoretical: `occupationlab/occupationlab/theoreticalCourseSubsection/deleteSubsection`, // 根据id删除小节
|
||||
editSubsectionTheoretical: `occupationlab/occupationlab/theoreticalCourseSubsection/editSubsection`, // 修改小节
|
||||
getSubsectionTheoretical: `occupationlab/occupationlab/theoreticalCourseSubsection/getSubsection`, // 根据小节id获取预览文件地址
|
||||
|
||||
// 栏目管理
|
||||
addColumn: `occupationlab/occupationlab/information/column/addColumn`, |
||||
deleteColumn: `occupationlab/occupationlab/information/column/deleteColumn`, |
||||
editColumn: `occupationlab/occupationlab/information/column/editColumn`, |
||||
queryAllColumns: `occupationlab/occupationlab/information/column/queryAllColumns`, |
||||
columnReorder: `occupationlab/occupationlab/information/column/reorder`, |
||||
// 内容管理
|
||||
addArticle: `occupationlab/occupationlab/information/article/addArticle`, |
||||
deleteArticles: `occupationlab/occupationlab/information/article/deleteArticles`, |
||||
editArticle: `occupationlab/occupationlab/information/article/editArticle`, |
||||
enableArticle: `occupationlab/occupationlab/information/article/enableArticle`, |
||||
getArticle: `occupationlab/occupationlab/information/article/getArticle`, |
||||
getArticles: `occupationlab/occupationlab/information/article/getArticles`, |
||||
queryArticleByCondition: `occupationlab/occupationlab/information/article/queryArticleByCondition`, |
||||
articleSort: `occupationlab/occupationlab/information/article/articleSort`, |
||||
|
||||
// 阿里云文件/视频管理
|
||||
fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件
|
||||
fileupload: `${uploadURL}oss/manage/fileupload`, // 文件上传
|
||||
getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证
|
||||
removeMoreVideo: `${uploadURL}oss/manage/removeMoreVideo`, // 批量删除视频文件
|
||||
removeVideo: `${uploadURL}oss/manage/removeVideo`, // 删除视频文件
|
||||
fileUploadNakadai: `${host}nakadai/nakadai/oss/fileUpload`, |
||||
|
||||
queryProvince: `nakadai/nakadai/province/queryProvince`, //查询省份
|
||||
queryCity: `nakadai/nakadai/city/queryCity`, //查询城市
|
||||
|
||||
queryCourseDiscipline: `nakadai/nakadai/subject/courseDiscipline`, //查询课程学科
|
||||
queryCourseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`, //查询专业类
|
||||
queryCourseProfessional: `nakadai/nakadai/subject/courseProfessional`, //查询专业
|
||||
|
||||
// 数据管理
|
||||
getIdQueryTable: `data/data/table/getIdQueryTable`, |
||||
getTableByClassification: `data/data/table/getTableByClassification`, |
||||
getTableByCondition: `data/data/table/getTableByCondition`, |
||||
originalList: `data/data/table/originalList`, |
||||
originalListById: `data/data/table/originalListById`, |
||||
saveCategory: `data/data/table/saveCategory`, |
||||
saveTable: `data/data/table/saveTable`, |
||||
updateCategory: `data/data/table/updateCategory`, |
||||
deleteCategory: `data/data/table/deleteCategory`, |
||||
deleteTable: `data/data/table/deleteTable`, |
||||
previewData: `data/data/preview`, |
||||
staticPreview: `data/data/staticPreview`, |
||||
editTableName: `data/data/table/editTableName`, |
||||
updateTableCommit: `data/data/updateTableCommit`, |
||||
getLevel: `data/data/category/getLevel`, |
||||
getAllTableInfoByCategoryId: `data/data/product/getAllTableInfoByCategoryId`, |
||||
|
||||
// 产品管理
|
||||
deleteProduct: `data/data/product/delete`, |
||||
findById: `data/data/product/findById`, |
||||
listByEntity: `data/data/product/listByEntity`, |
||||
saveProduct: `data/data/product/save`, |
||||
updateProduct: `data/data/product/update`, |
||||
saveRecord: `data/data/dataRecord/saveRecord`, |
||||
getAllTableIdBycategoryId: `data/data/product/getAllTableIdBycategoryId`, |
||||
|
||||
// 关键词
|
||||
addKeyword: `data/data/keyword/addKeyword`, |
||||
deleteKeyword: `data/data/keyword/deleteKeyword`, |
||||
getKeywordByCategoryId: `data/data/keyword/getKeywordByCategoryId`, |
||||
|
||||
// 后台账号
|
||||
deleteArch: `nakadai/nakadai/staffAccountArchitecture/delete`, |
||||
saveArch: `nakadai/nakadai/staffAccountArchitecture/save`, |
||||
treeListArch: `nakadai/nakadai/staffAccountArchitecture/treeList`, |
||||
updateArch: `nakadai/nakadai/staffAccountArchitecture/update`, |
||||
delStaff: `nakadai/nakadai/backstageStaff/delStaff`, |
||||
modifyStaff: `nakadai/nakadai/backstageStaff/modifyStaff`, |
||||
saveStaff: `nakadai/nakadai/backstageStaff/saveStaff`, |
||||
staffDetail: `nakadai/nakadai/backstageStaff/staffDetail`, |
||||
staffList: `nakadai/nakadai/backstageStaff/staffList`, |
||||
importStaff: `${host}nakadai/nakadai/backstageStaff/importStaff`, |
||||
exportFailure: `${host}nakadai/nakadai/backstageStaff/exportFailure`, |
||||
|
||||
// 角色管理
|
||||
batchRemove: `users/users/role/batchRemove`, //批量删除角色
|
||||
checkRoleIsExist: `users/users/role/checkRoleIsExist`, //判断该角色是否存在
|
||||
delRoleByAccountId: `users/users/role/delRoleByAccountId`, //删除某用户下的某个角色
|
||||
roleList: `users/users/role/list`, //角色分页列表查询
|
||||
obtainDetails: `users/users/role/obtainDetails`, //获取角色详情
|
||||
saveOrUpdate: `users/users/role/saveOrUpdate`, //新增或更新角色
|
||||
queryAllMenus: `users/users/permission/queryAllMenus`, //查询所有菜单
|
||||
getSupplierList: `users/users/supplier/getSupplierList`, |
||||
getSupplierListByRole: `users/users/supplier/getSupplierListByRole`, |
||||
|
||||
// 日志管理
|
||||
logAdd: `nakadai/nakadai/log/add`, |
||||
logDel: `nakadai/nakadai/log/delete`, |
||||
logGet: `nakadai/nakadai/log/get`, |
||||
logManagementList: `nakadai/nakadai/log/logManagementList`, |
||||
platformLogList: `nakadai/nakadai/log/platformLogList`, |
||||
listUpdate: `nakadai/nakadai/log/update`, |
||||
checkRepeat: `nakadai/nakadai/log/checkRepeat`, |
||||
logWithdrawal: `nakadai/nakadai/log/logWithdrawal`, |
||||
|
||||
// 合伙人
|
||||
deleteParner: `nakadai/nakadai/partnerClassification/delete`, |
||||
saveParner: `nakadai/nakadai/partnerClassification/save`, |
||||
listParner: `nakadai/nakadai/partnerClassification/treeList`, |
||||
updateParner: `nakadai/nakadai/partnerClassification/update`, |
||||
|
||||
delPartnerAccount: `nakadai/nakadai/partnerAccount/delPartnerAccount`, |
||||
modifyPartnerAccount: `nakadai/nakadai/partnerAccount/modifyPartnerAccount`, |
||||
partnerAccountDetail: `nakadai/nakadai/partnerAccount/partnerAccountDetail`, |
||||
partnerAccountList: `nakadai/nakadai/partnerAccount/partnerAccountList`, |
||||
savePartnerAccount: `nakadai/nakadai/partnerAccount/savePartnerAccount`, |
||||
generateInvitationCode: `nakadai/nakadai/partnerAccount/generateInvitationCode`, |
||||
generationQrCode: `nakadai/nakadai/partnerAccount/generationQrCode`, |
||||
queryUserInfoByPhone: `nakadai/nakadai/partner-team/queryUserInfoByPhone`, |
||||
getAllTeam: `nakadai/nakadai/partnerClassification/getAllTeam`, |
||||
partnerRemoval: `nakadai/nakadai/partnerAccount/partnerRemoval`, |
||||
generateTransferCode: `nakadai/nakadai/partnerAccount/generateTransferCode`, |
||||
transferAdmin: `nakadai/nakadai/partnerAccount/transferAdmin`, |
||||
transferTeam: `nakadai/nakadai/partnerAccount/transferTeam`, |
||||
partnerAccountMergeList: `nakadai/nakadai/partnerAccount/partnerAccountMergeList`, |
||||
|
||||
// 赛事
|
||||
CompetitionPageConditionQueryByNakadai: `competition/competition/management/competitionPageConditionQueryByNakadai`, |
||||
addCompetition: `competition/competition/management/addCompetition`, |
||||
batchDeleteCompetition: `competition/competition/management/batchDeleteCompetition`, |
||||
checkTheStatusOfTheCompetition: `competition/competition/management/checkTheStatusOfTheCompetition`, |
||||
disabledEventsCompetition: `competition/competition/management/disabledEvents`, |
||||
editCompetition: `competition/competition/management/editCompetition`, |
||||
getCompetition: `competition/competition/management/getCompetition`, |
||||
getProjectAssessmentByCompetition: `occupationlab/occupationlab/projectManage/getProjectAssessmentByCompetition`, |
||||
publishCompetition: `competition/competition/management/publishCompetition`, |
||||
detailsOfCompetitionStage: `competition/competition/management/detailsOfCompetitionStage`, |
||||
entryInformation: `competition/competition/team/entryInformation`, |
||||
getRedisCacheCompetition: `competition/competition/management/getRedisCache`, |
||||
|
||||
// 赛事内容
|
||||
addCompetitionContent: `competition/competition/content/addCompetitionContent`, |
||||
editCompetitionContent: `competition/competition/content/editCompetitionContent`, |
||||
getCompetitionContent: `competition/competition/content/getCompetitionContent`, |
||||
// 赛事附件
|
||||
delComAnnex: `competition/competition/annex/delete`, |
||||
saveComAnnex: `competition/competition/annex/save`, |
||||
updateComAnnex: `competition/competition/annex/update`, |
||||
// 赛事公告附件
|
||||
delAnnex: `competition/competition/announcementAnnex/delete`, |
||||
saveAnnex: `competition/competition/announcementAnnex/save`, |
||||
updateAnnex: `competition/competition/announcementAnnex/update`, |
||||
viewAttachments: `competition/competition/announcementAnnex/viewAttachments`, |
||||
// 赛事规则
|
||||
addCompetitionRule: `competition/competition/rule/addCompetitionRule`, |
||||
editCompetitionRule: `competition/competition/rule/editCompetitionRule`, |
||||
getCompetitionRule: `competition/competition/rule/getCompetitionRule`, |
||||
queryCompetitionStageBySetupId: `competition/competition/stage/queryCompetitionStageBySetupId`, |
||||
// 竞赛进展
|
||||
addCompetitionProgress: `competition/competition/progress/addCompetitionProgress`, |
||||
deleteCompetitionProgress: `competition/competition/progress/deleteCompetitionProgress`, |
||||
editCompetitionProgress: `competition/competition/progress/editCompetitionProgress`, |
||||
getCompetitionProgress: `competition/competition/progress/getCompetitionProgress`, |
||||
// 报名人员
|
||||
addCompetitionRegistration: `competition/competition/registration/addCompetitionRegistration`, |
||||
cancelRegistration: `competition/competition/registration/cancelRegistration`, |
||||
disableContests: `competition/competition/registration/disableContests`, |
||||
disableRegistration: `competition/competition/registration/disableRegistration`, |
||||
excelExport: `${host}competition/competition/registration/excelExport`, |
||||
exportDataInBatches: `${host}competition/competition/registration/exportDataInBatches`, |
||||
queryRegistrationByCondition: `competition/competition/registration/queryRegistrationByCondition`, |
||||
searchTeam: `competition/competition/team/searchTeam`, |
||||
joinCompetitionTeam: `competition/competition/team/joinCompetitionTeam`, |
||||
addCompetitionTeam: `competition/competition/team/addCompetitionTeam`, |
||||
studentAccountApplication: `users/users/register/studentAccountApplication`, |
||||
checkPhoneOrEmailExist: `users/users/userInfo/checkPhoneOrEmailExist`, |
||||
editCompetitionTeam: `competition/competition/team/editCompetitionTeam`, |
||||
addAnAdvisor: `competition/competition/teamInstructor/addAnAdvisor`, |
||||
deleteAnAdvisor: `competition/competition/teamInstructor/deleteAnAdvisor`, |
||||
captainOfTransfer: `competition/competition/team/captainOfTransfer`, |
||||
removeTheLine: `competition/competition/team/removeTheLine`, |
||||
stageSelectParticipants: `competition/competition/teamParticipant/stageSelectParticipants`, |
||||
updateUser: `users/users/userInfo/updateUser`, |
||||
enquireAboutSchoolStudents: `users/users/userAccount/enquireAboutSchoolStudents`, |
||||
cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`, |
||||
schoolsInCompetitionArea: `competition/competition/range/schoolsInCompetitionArea`, |
||||
// 赛事公告
|
||||
addAnnouncement: `competition/competition/announcement/addAnnouncement`, |
||||
amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`, |
||||
deleteAnnouncement: `competition/competition/announcement/deleteAnnouncement`, |
||||
disableAnnouncement: `competition/competition/announcement/disableAnnouncement`, |
||||
queryAnnouncementByCompetitionId: `competition/competition/announcement/queryAnnouncementByCompetitionId`, |
||||
queryAnnouncementDetails: `competition/competition/announcement/queryAnnouncementDetails`, |
||||
saveAnnouncementAnnex: `competition/competition/announcementAnnex/save`, |
||||
// 赛事成绩
|
||||
batchDeleteContestGrade: `competition/competition/performance/batchDeleteContestGrade`, |
||||
batchImportGrades: `${host}competition/competition/performance/batchImportGrades`, |
||||
exportExperimentalResultsInBatch: `${host}competition/competition/performance/exportExperimentalResultsInBatch`, |
||||
performanceExportFailure: `${host}competition/competition/performance/exportFailure`, |
||||
rankExportFailure: `${host}competition/competition/rank/exportFailure`, |
||||
batchImportRanking: `${host}competition/competition/rank/batchImportRanking`, |
||||
stageGradeManagementList: `competition/competition/performance/stageGradeManagementList`, |
||||
stageRaceRanking: `competition/competition/rank/stageRaceRanking`, |
||||
overallStandingsInThePointsRace: `competition/competition/rank/overallStandingsInThePointsRace`, |
||||
publishRanking: `competition/competition/rank/publishRanking`, |
||||
stageTeamScoreDetails: `competition/competition/rank/stageTeamScoreDetails`, |
||||
multipleStageTeamScoreDetails: `competition/competition/rank/multipleStageTeamScoreDetails`, |
||||
detailsOfTotalTeamScores: `competition/competition/rank/detailsOfTotalTeamScores`, |
||||
cancelRanking: `competition/competition/rank/cancelRanking`, |
||||
reportDetail: `occupationlab/occupationlab/achievement/reportDetail`, |
||||
deleteLastPublication: `competition/competition/rank/deleteLastPublication`, |
||||
whetherToPublish: `competition/competition/rank/whetherToPublish`, |
||||
manuallyRankTheUploadList: `competition/competition/rank/manuallyRankTheUploadList`, |
||||
queryPublicationSource: `competition/competition/rank/queryPublicationSource`, |
||||
releaseVerification: `competition/competition/rank/releaseVerification`, |
||||
totalRankingScoreDetails: `competition/competition/rank/totalRankingScoreDetails`, |
||||
batchRelease: `competition/competition/rank/batchRelease`, |
||||
manuallyUploadedRankings: `competition/competition/rank/manuallyUploadedRankings`, |
||||
toggleTheSortingMode: `competition/competition/rank/toggleTheSortingMode`, |
||||
selectTheLastSortStatus: `competition/competition/rank/selectTheLastSortStatus`, |
||||
cancelImport: `competition/competition/rank/cancelImport`, |
||||
gradeImport: `https://www.occupationlab.com/template/赛事成绩导入模板.xlsx`, |
||||
rankImportTeam: `https://www.occupationlab.com/template/赛事排名导入模板(团队赛).xlsx`, |
||||
rankImportPerson: `https://www.occupationlab.com/template/赛事排名导入模板(个人赛).xlsx`, |
||||
|
||||
// 合伙运营
|
||||
batchDeletionParnerLabel: `nakadai/nakadai/partner/article/label/batchDeletion`, |
||||
checkForHeavyParnerLabel: `nakadai/nakadai/partner/article/label/checkForHeavy`, |
||||
findByIdParnerLabel: `nakadai/nakadai/partner/article/label/findById`, |
||||
queryAllArticleSubjectTags: `nakadai/nakadai/partner/article/label/queryAllArticleSubjectTags`, |
||||
saveParnerLabel: `nakadai/nakadai/partner/article/label/save`, |
||||
updateParnerLabel: `nakadai/nakadai/partner/article/label/update`, |
||||
batchDeletionParnerClass: `nakadai/nakadai/partner/article/classification/batchDeletion`, |
||||
checkForHeavyParnerClass: `nakadai/nakadai/partner/article/classification/checkForHeavy`, |
||||
findByIdParnerClass: `nakadai/nakadai/partner/article/classification/findById`, |
||||
queryClassificationByType: `nakadai/nakadai/partner/article/classification/queryClassificationByType`, |
||||
saveParnerClass: `nakadai/nakadai/partner/article/classification/save`, |
||||
updateParnerClass: `nakadai/nakadai/partner/article/classification/update`, |
||||
batchDeletionParnerArticle: `nakadai/nakadai/partner/article/management/batchDeletion`, |
||||
findByIdParnerArticle: `nakadai/nakadai/partner/article/management/findById`, |
||||
partnerOperatingList: `nakadai/nakadai/partner/article/management/partnerOperatingList`, |
||||
saveParnerArticle: `nakadai/nakadai/partner/article/management/save`, |
||||
updateParnerArticle: `nakadai/nakadai/partner/article/management/update`, |
||||
articleEnableOrDisable: `nakadai/nakadai/partner/article/management/articleEnableOrDisable`, |
||||
checkIfTheTitleIsRepeat: `nakadai/nakadai/partner/article/management/checkIfTheTitleIsRepeat`, |
||||
modifiedSort: `nakadai/nakadai/partner/article/management/modifiedSort`, |
||||
articleTopOperation: `nakadai/nakadai/partner/article/management/articleTopOperation`, |
||||
batchDeletionParnerFile: `nakadai/nakadai/partner/article/file/batchDeletion`, |
||||
findByIdParnerFile: `nakadai/nakadai/partner/article/file/findById`, |
||||
saveParnerFile: `nakadai/nakadai/partner/article/file/save`, |
||||
theAttachmentUnderTheQueryColumn: `nakadai/nakadai/partner/article/file/theAttachmentUnderTheQueryColumn`, |
||||
updateParnerFile: `nakadai/nakadai/partner/article/file/update`, |
||||
batchDeletionScheme: `nakadai/nakadai/partner/schemeManagement/batchDeletion`, |
||||
enableOrDisableScheme: `nakadai/nakadai/partner/schemeManagement/enableOrDisable`, |
||||
findByIdScheme: `nakadai/nakadai/partner/schemeManagement/findById`, |
||||
saveScheme: `nakadai/nakadai/partner/schemeManagement/save`, |
||||
schemeList: `nakadai/nakadai/partner/schemeManagement/schemeList`, |
||||
updateScheme: `nakadai/nakadai/partner/schemeManagement/update`, |
||||
}; |
@ -1,276 +0,0 @@ |
||||
import Oss from '@/components/upload/upload.js' |
||||
import { Loading } from 'element-ui' |
||||
|
||||
export default { |
||||
//skin:'oxide-dark',
|
||||
language: 'zh_CN', |
||||
language_url: './styles/tinymce/langs/zh_CN.js', |
||||
plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autoresize', |
||||
toolbar: 'code undo redo restoredraft | cut copy pastetext | forecolor backcolor headings fontsize lineHeight bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify | \ |
||||
styleselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \ |
||||
table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen | indent2em', |
||||
style_formats: [ |
||||
//新增 首行缩进与行高 配置
|
||||
{ |
||||
title: '首行缩进', |
||||
block: 'p', |
||||
styles: { |
||||
'text-indent': '2em' |
||||
} |
||||
}, |
||||
{ |
||||
title: '行高', |
||||
items: [{ |
||||
title: '1', |
||||
styles: { |
||||
'line-height': '1' |
||||
}, |
||||
inline: 'span' |
||||
}, |
||||
{ |
||||
title: '1.5', |
||||
styles: { |
||||
'line-height': '1.5' |
||||
}, |
||||
inline: 'span' |
||||
}, |
||||
{ |
||||
title: '2', |
||||
styles: { |
||||
'line-height': '2' |
||||
}, |
||||
inline: 'span' |
||||
}, |
||||
{ |
||||
title: '2.5', |
||||
styles: { |
||||
'line-height': '2.5' |
||||
}, |
||||
inline: 'span' |
||||
}, |
||||
{ |
||||
title: '3', |
||||
styles: { |
||||
'line-height': '3' |
||||
}, |
||||
inline: 'span' |
||||
} |
||||
] |
||||
}, |
||||
//默认的配置
|
||||
{ |
||||
title: 'headings', |
||||
items: [ |
||||
{ |
||||
title: 'Heading 1', |
||||
format: 'h1' |
||||
}, |
||||
{ |
||||
title: 'Heading 2', |
||||
format: 'h2' |
||||
}, |
||||
{ |
||||
title: 'Heading 3', |
||||
format: 'h3' |
||||
}, |
||||
{ |
||||
title: 'Heading 4', |
||||
format: 'h4' |
||||
}, |
||||
{ |
||||
title: 'Heading 5', |
||||
format: 'h5' |
||||
}, |
||||
{ |
||||
title: 'Heading 6', |
||||
format: 'h6' |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
title: 'Inline', |
||||
items: [ |
||||
{ |
||||
title: 'Bold', |
||||
icon: 'bold', |
||||
format: 'bold' |
||||
}, |
||||
{ |
||||
title: 'Italic', |
||||
icon: 'italic', |
||||
format: 'italic' |
||||
}, |
||||
{ |
||||
title: 'Underline', |
||||
icon: 'underline', |
||||
format: 'underline' |
||||
}, |
||||
{ |
||||
title: 'Strikethrough', |
||||
icon: 'strikethrough', |
||||
format: 'strikethrough' |
||||
}, |
||||
{ |
||||
title: 'Superscript', |
||||
icon: 'superscript', |
||||
format: 'superscript' |
||||
}, |
||||
{ |
||||
title: 'Subscript', |
||||
icon: 'subscript', |
||||
format: 'subscript' |
||||
}, |
||||
{ |
||||
title: 'Code', |
||||
icon: 'code', |
||||
format: 'code' |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
title: 'Blocks', |
||||
items: [ |
||||
{ |
||||
title: 'Paragraph', |
||||
format: 'p' |
||||
}, |
||||
{ |
||||
title: 'Blockquote', |
||||
format: 'blockquote' |
||||
}, |
||||
{ |
||||
title: 'Div', |
||||
format: 'div' |
||||
}, |
||||
{ |
||||
title: 'Pre', |
||||
format: 'pre' |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
title: 'Alignment', |
||||
items: [ |
||||
{ |
||||
title: 'Left', |
||||
icon: 'alignleft', |
||||
format: 'alignleft' |
||||
}, |
||||
{ |
||||
title: 'Center', |
||||
icon: 'aligncenter', |
||||
format: 'aligncenter' |
||||
}, |
||||
{ |
||||
title: 'Right', |
||||
icon: 'alignright', |
||||
format: 'alignright' |
||||
}, |
||||
{ |
||||
title: 'Justify', |
||||
icon: 'alignjustify', |
||||
format: 'alignjustify' |
||||
} |
||||
] |
||||
} |
||||
], |
||||
promotion: false, |
||||
branding: false, |
||||
width: 940, |
||||
height: 600, //编辑器高度
|
||||
min_height: 400, |
||||
max_height: 600, |
||||
content_css: [ //可设置编辑区内容展示的css,谨慎使用
|
||||
'./styles/css/editor.css', |
||||
], |
||||
// content_style: Style,
|
||||
fontsize_formats: '12px 14px 16px 19px 24px 36px 48px 56px 72px', |
||||
font_formats: '苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;知乎配置=BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;小米配置=Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif', |
||||
link_list: [ |
||||
{ title: '预置链接1', value: 'http://www.tinymce.com' }, |
||||
{ title: '预置链接2', value: 'http://tinymce.ax-z.cn' } |
||||
], |
||||
image_list: [ |
||||
{ title: '预置图片1', value: 'https://www.tiny.cloud/images/glyph-tinymce@2x.png' }, |
||||
{ title: '预置图片2', value: 'https://www.baidu.com/img/bd_logo1.png' } |
||||
], |
||||
image_class_list: [ |
||||
{ title: 'None', value: '' }, |
||||
{ title: 'Some class', value: 'class-name' } |
||||
], |
||||
//为内容模板插件提供预置模板
|
||||
templates: [], |
||||
// content_security_policy: "https://cdn.tiny.cloud/1/rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda/tinymce/6/tinymce.min.js",
|
||||
// extended_valid_elements:'script[src]',
|
||||
//
|
||||
// template_cdate_format: '[CDATE: %m/%d/%Y : %H:%M:%S]',
|
||||
// template_mdate_format: '[MDATE: %m/%d/%Y : %H:%M:%S]',
|
||||
// autosave_ask_before_unload: false,
|
||||
toolbar_mode: 'wrap', |
||||
// automatic_uploads: true,
|
||||
// images_upload_base_path: '/demo',
|
||||
// images_upload_url: 'http://10.10.11.7:10000/iasf/sysFiles/upload',
|
||||
paste_data_images: true, |
||||
powerpaste_allow_local_images: true, |
||||
powerpaste_word_import: 'clean', |
||||
powerpaste_html_import: 'clean', |
||||
urlconverter_callback: (url, node, onSave, name) => { |
||||
if (node === 'img' && url.startsWith('blob:')) { |
||||
// Do some custom URL conversion
|
||||
tinymce.activeEditor && tinymce.activeEditor.uploadImages() |
||||
} |
||||
// Return new URL
|
||||
return url |
||||
}, |
||||
// 自定义上传
|
||||
images_upload_handler: function (blobInfo, succFun, failFun) { |
||||
const blob = blobInfo.blob() |
||||
// blob转换为file
|
||||
const file = new File([blob], blobInfo.filename(), { |
||||
type: 'application/json', |
||||
lastModified: Date.now() |
||||
}); |
||||
Oss.upload(file).then(res => { |
||||
succFun(res.url) |
||||
}) |
||||
}, |
||||
//自定义文件选择器的回调内容 此方法只有在点击上方图片按钮才会触发
|
||||
file_picker_callback: function (callback, value, meta) { |
||||
if (meta.filetype === 'file') { |
||||
callback('https://www.baidu.com/img/bd_logo1.png', { text: 'My text' }); |
||||
} |
||||
if (meta.filetype === 'image') { |
||||
callback('https://www.baidu.com/img/bd_logo1.png', { alt: 'My alt text' }); |
||||
} |
||||
// 主要判断 media
|
||||
if (meta.filetype === 'media') { |
||||
// 动态创建上传input,并进行模拟点击上传操作,达到本地上传视频效果。
|
||||
let input = document.createElement('input');//创建一个隐藏的input
|
||||
input.setAttribute('type', 'file'); |
||||
input.setAttribute("accept", ".mp4"); |
||||
input.onchange = function () { |
||||
let file = this.files[0]; |
||||
const load = Loading.service() |
||||
Oss.upload(file).then(res => { |
||||
load.close() |
||||
callback(res.url) |
||||
}).catch(e => { |
||||
load.close() |
||||
}) |
||||
} |
||||
//触发点击
|
||||
input.click(); |
||||
} |
||||
}, |
||||
// 初始化事件
|
||||
setup: function (editor) { |
||||
editor.on('init', function (ed) { |
||||
// 设置默认字体
|
||||
ed.target.editorCommands.execCommand("fontName", false, "PingFang SC") |
||||
ed.target.editorCommands.execCommand("fontSize", false, "16px") |
||||
ed.target.editorCommands.execCommand("lineHeight", false, "1.5") |
||||
const el = top.document.querySelector('#focus-el') |
||||
el && el.focus() // 第一个字段聚焦
|
||||
}) |
||||
}, |
||||
} |
@ -1,45 +1,45 @@ |
||||
const util = { |
||||
deepCopy (obj) { // 深拷贝
|
||||
if (obj == null) { |
||||
return null; |
||||
} |
||||
if (typeof obj !== "object") return obj; |
||||
let result; |
||||
if (Array.isArray(obj)) { |
||||
result = []; |
||||
obj.forEach(item => { |
||||
result.push( |
||||
typeof item === "object" && !(item instanceof Date) |
||||
? util.deepCopy(item) |
||||
: item |
||||
); |
||||
}); |
||||
} else { |
||||
result = {}; |
||||
Object.keys(obj).forEach(key => { |
||||
result[key] = |
||||
typeof obj[key] === "object" && !(obj[key] instanceof Date) |
||||
? util.deepCopy(obj[key]) |
||||
: obj[key]; |
||||
}); |
||||
} |
||||
return result; |
||||
}, |
||||
// 传入文件名和数据,下载文件
|
||||
downloadFileDirect (fileName, data) { |
||||
if ('download' in document.createElement('a')) { // 非IE下载
|
||||
const elink = document.createElement('a') |
||||
elink.download = fileName |
||||
elink.style.display = 'none' |
||||
elink.href = URL.createObjectURL(data) |
||||
document.body.appendChild(elink) |
||||
elink.click() |
||||
URL.revokeObjectURL(elink.href) // 释放URL 对象
|
||||
document.body.removeChild(elink) |
||||
} else { // IE10+下载
|
||||
navigator.msSaveBlob(data, fileName) |
||||
} |
||||
}, |
||||
deepCopy(obj) { // 深拷贝
|
||||
if (obj == null) { |
||||
return null; |
||||
} |
||||
if (typeof obj !== "object") return obj; |
||||
let result; |
||||
if (Array.isArray(obj)) { |
||||
result = []; |
||||
obj.forEach(item => { |
||||
result.push( |
||||
typeof item === "object" && !(item instanceof Date) |
||||
? util.deepCopy(item) |
||||
: item |
||||
); |
||||
}); |
||||
} else { |
||||
result = {}; |
||||
Object.keys(obj).forEach(key => { |
||||
result[key] = |
||||
typeof obj[key] === "object" && !(obj[key] instanceof Date) |
||||
? util.deepCopy(obj[key]) |
||||
: obj[key]; |
||||
}); |
||||
} |
||||
return result; |
||||
}, |
||||
// 传入文件名和数据,下载文件
|
||||
downloadFileDirect(fileName,data) { |
||||
if ('download' in document.createElement('a')) { // 非IE下载
|
||||
const elink = document.createElement('a') |
||||
elink.download = fileName |
||||
elink.style.display = 'none' |
||||
elink.href = URL.createObjectURL(data) |
||||
document.body.appendChild(elink) |
||||
elink.click() |
||||
URL.revokeObjectURL(elink.href) // 释放URL 对象
|
||||
document.body.removeChild(elink) |
||||
} else { // IE10+下载
|
||||
navigator.msSaveBlob(data, fileName) |
||||
} |
||||
}, |
||||
}; |
||||
|
||||
export default util; |
@ -1,569 +1,433 @@ |
||||
<template> |
||||
<div class="login-wrap"> |
||||
<div class="header"> |
||||
<div class="logo"> |
||||
<img src="../assets/img/logo.png"> |
||||
</div> |
||||
<div class="login-wrap"> |
||||
<div class="header"> |
||||
<div class="logo"> |
||||
<img src="../assets/img/logo.png"> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="ms-login"> |
||||
<div class="ms-title"> |
||||
<!-- <p class="title">账号登录</p> --> |
||||
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"> |
||||
<el-menu-item index="1">账号登录</el-menu-item> |
||||
<el-menu-item index="2">手机号/邮箱登录</el-menu-item> |
||||
</el-menu> |
||||
<el-form v-show="activeIndex==='1'" :model="param" :rules="rules" ref="login" label-width="0px" style="margin-top: 40px"> |
||||
<el-form-item prop="account"> |
||||
<el-input @blur="blur" v-model="param.account" placeholder="请输入账号"></el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="password"> |
||||
<el-input |
||||
type="password" |
||||
placeholder="请输入密码" |
||||
v-model="param.password" |
||||
> |
||||
</el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="code" v-if="showVerify"> |
||||
<el-input |
||||
placeholder="请输入验证码" |
||||
v-model="param.code" |
||||
@keyup.enter.native="submitForm()" |
||||
> |
||||
</el-input> |
||||
<img @click="blur" :src="verificationIMG" class="verification" alt=""> |
||||
</el-form-item> |
||||
|
||||
<div style="width:100%;display:flex;justify-content: flex-end;"> |
||||
<el-button type="text" class="forget">忘记密码?</el-button> |
||||
</div> |
||||
<div class="login-btn"> |
||||
<el-button type="primary" @click="submitForm()">马上登录</el-button> |
||||
</div> |
||||
</el-form> |
||||
|
||||
<el-form v-show="activeIndex==='2'" :model="phoneOrEmail" :rules="phoneOrEmailrules" ref="phoneOrEmail" label-width="0px" style="margin-top: 40px"> |
||||
<el-form-item prop="account"> |
||||
<el-input @blur="phoneBlur" v-model="phoneOrEmail.account" placeholder="请输入电话/邮箱"></el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="password"> |
||||
<el-input |
||||
type="password" |
||||
placeholder="请输入密码" |
||||
v-model="phoneOrEmail.password" |
||||
> |
||||
</el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="code" v-if="showPhoneVerify"> |
||||
<el-input |
||||
placeholder="请输入验证码" |
||||
v-model="phoneOrEmail.code" |
||||
@keyup.enter.native="submitForm('phone')" |
||||
> |
||||
</el-input> |
||||
<img @click="phoneBlur" :src="PhoneVerificationIMG" class="verification" alt=""> |
||||
</el-form-item> |
||||
|
||||
<div style="width:100%;display:flex;justify-content: flex-end;"> |
||||
<el-button type="text" class="forget">忘记密码?</el-button> |
||||
</div> |
||||
<div class="login-btn"> |
||||
<el-button type="primary" @click="submitForm('phone')">马上登录</el-button> |
||||
</div> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
|
||||
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="576px"> |
||||
<p class="tips">依据国家政策法规,需绑定手机号进行网络实名才可登录使用本平台</p> |
||||
<el-form ref="form" label-width="60px"> |
||||
<el-form-item label="手机号"> |
||||
<el-input placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="验证码"> |
||||
<div style="display:flex;"> |
||||
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input> |
||||
<el-button style="margin-left:10px" @click="sendPhoneCode" :disabled="phoneDisabled">{{phoneBtnText}}</el-button> |
||||
</div> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="phoneVisible = false">取 消</el-button> |
||||
<el-button type="primary" @click="phoneSubmit">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
<v-footer class="footer" ref="footer"></v-footer> |
||||
</div> |
||||
|
||||
<div class="ms-login"> |
||||
<div class="ms-title"> |
||||
<!-- <p class="title">账号登录</p> --> |
||||
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"> |
||||
<el-menu-item index="1">账号登录</el-menu-item> |
||||
<el-menu-item index="2">手机号/邮箱登录</el-menu-item> |
||||
</el-menu> |
||||
<el-form v-show="activeIndex === '1'" :model="param" :rules="rules" ref="login" label-width="0px" |
||||
style="margin-top: 20px"> |
||||
<el-form-item prop="account"> |
||||
<el-input @blur="blur" v-model="param.account" placeholder="请输入账号"></el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="password"> |
||||
<el-input type="password" placeholder="请输入密码" v-model="param.password"> |
||||
</el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="code" v-if="showVerify"> |
||||
<el-input placeholder="请输入验证码" v-model="param.code" @keyup.enter.native="submitForm()"> |
||||
</el-input> |
||||
<img @click="blur" :src="verificationIMG" class="verification" alt=""> |
||||
</el-form-item> |
||||
|
||||
<div style="width:100%;display:flex;justify-content: flex-end;"> |
||||
<el-button type="text" class="forget">忘记密码?</el-button> |
||||
</div> |
||||
<div class="login-btn"> |
||||
<el-button type="primary" @click="submitForm()">马上登录</el-button> |
||||
</div> |
||||
</el-form> |
||||
|
||||
<el-form v-show="activeIndex === '2'" :model="phoneOrEmail" :rules="phoneOrEmailrules" ref="phoneOrEmail" |
||||
label-width="0px" style="margin-top: 20px"> |
||||
<el-form-item prop="account"> |
||||
<el-input @blur="phoneBlur" v-model="phoneOrEmail.workNumber" placeholder="请输入电话/邮箱"></el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="password"> |
||||
<el-input type="password" placeholder="请输入密码" v-model="phoneOrEmail.password"> |
||||
</el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="code" v-if="showPhoneVerify"> |
||||
<el-input placeholder="请输入验证码" v-model="phoneOrEmail.code" @keyup.enter.native="submitForm('phone')"> |
||||
</el-input> |
||||
<img @click="phoneBlur" :src="PhoneVerificationIMG" class="verification" alt=""> |
||||
</el-form-item> |
||||
|
||||
<div style="width:100%;display:flex;justify-content: flex-end;"> |
||||
<el-button type="text" class="forget">忘记密码?</el-button> |
||||
</div> |
||||
<div class="login-btn"> |
||||
<el-button type="primary" @click="submitForm('phone')">马上登录</el-button> |
||||
</div> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
|
||||
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="576px"> |
||||
<p class="tips">依据国家政策法规,需绑定手机号进行网络实名才可登录使用本平台</p> |
||||
<el-form ref="form" label-width="60px"> |
||||
<el-form-item label="手机号"> |
||||
<el-input placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="验证码"> |
||||
<div style="display:flex;"> |
||||
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input> |
||||
<el-button style="margin-left:10px" @click="sendPhoneCode" :disabled="phoneDisabled">{{ phoneBtnText |
||||
}}</el-button> |
||||
</div> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="phoneVisible = false">取 消</el-button> |
||||
<el-button type="primary" @click="phoneSubmit">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
|
||||
|
||||
<el-dialog title="请选择您要登录的用户" :visible.sync="userVisible" :close-on-click-modal="false" custom-class="user-dia" |
||||
width="500px"> |
||||
<p class="tips">该手机号已绑定以下用户信息</p> |
||||
<ul class="users"> |
||||
<li :class="{ isEnable: !user.isEnable }" v-for="(user, i) in users" :key="i" @click="chooseUser(user)"> |
||||
<span>{{ user.schoolName }},{{ user.userName }},{{ user.workNumber }}{{ |
||||
user.isEnable |
||||
? '' |
||||
: '(已禁用)' }}</span> |
||||
<i class="el-icon-right"></i> |
||||
</li> |
||||
</ul> |
||||
</el-dialog> |
||||
<v-footer class="footer" ref="footer"></v-footer> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import vFooter from '../components/Footer' |
||||
import Setting from '@/setting' |
||||
import addRoutes from '@/libs/route/addRoutes' |
||||
import CryptoJS from 'crypto-js' |
||||
import JSEncrypt from 'jsencrypt' |
||||
export default { |
||||
data: function () { |
||||
var regPhoneOrEmail = (rule, value, callback) => {// 验证手机或邮箱 |
||||
let emailReg = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ |
||||
let phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/ |
||||
if (value === '') { |
||||
callback(new Error('请输入手机或邮箱!')); |
||||
} else if (!emailReg.test(value) && !phoneReg.test(value)) { |
||||
callback(new Error('输入的手机/邮箱格式不正确!')); |
||||
} else { |
||||
callback(); |
||||
} |
||||
}; |
||||
return { |
||||
activeIndex: "1", |
||||
|
||||
showVerify: true,// 账号-验证码展示 |
||||
verificationIMG: '',// 账号验证码拼接链接 |
||||
|
||||
// 账号 |
||||
param: { |
||||
account: '', |
||||
password: '', |
||||
code: '', |
||||
platform: 3, |
||||
random: '', |
||||
distinguish: 1, |
||||
}, |
||||
rules: { |
||||
account: [{ required: true, message: '请输入账号', trigger: 'blur' }], |
||||
password: [{ required: true, message: '请输入密码', trigger: 'blur' }], |
||||
code: [{ required: true, message: '请输入验证码', trigger: 'blur' }], |
||||
}, |
||||
|
||||
// 手机+邮箱 |
||||
showPhoneVerify: true,// 邮箱-验证码展示 |
||||
PhoneVerificationIMG: '',// 电话或邮箱验证码拼接链接 |
||||
phoneOrEmail: { |
||||
workNumber: '', |
||||
password: '', |
||||
code: '', |
||||
platform: 3, |
||||
random: '', |
||||
distinguish: 1, |
||||
}, |
||||
phoneOrEmailrules: { |
||||
workNumber: [{ validator: regPhoneOrEmail, trigger: 'blur' }], |
||||
password: [{ required: true, message: '请输入密码', trigger: 'blur' }], |
||||
code: [{ required: true, message: '请输入验证码', trigger: 'blur' }], |
||||
}, |
||||
|
||||
phoneVisible: false, |
||||
phone: '', |
||||
phoneCode: '', |
||||
phoneDisabled: false, |
||||
phoneBtnText: '发送验证码', |
||||
phoneTimer: '', |
||||
phoneOpener: '', |
||||
|
||||
|
||||
userVisible: false, |
||||
users: [], |
||||
}; |
||||
}, |
||||
components: { |
||||
vFooter |
||||
}, |
||||
watch: { |
||||
verificationIMG: function (val) {// 监听账号--展示验证码框 |
||||
if (val) { |
||||
this.showVerify = true |
||||
} else { |
||||
this.showVerify = false |
||||
} |
||||
}, |
||||
PhoneVerificationIMG: function (val) {// 监听账号--展示验证码框 |
||||
if (val) { |
||||
this.showPhoneVerify = true |
||||
} else { |
||||
this.showPhoneVerify = false |
||||
} |
||||
}, |
||||
}, |
||||
created () { |
||||
if (this.param.account) { |
||||
this.showVerify = true |
||||
} |
||||
this.blur() |
||||
}, |
||||
methods: { |
||||
submitForm (val) { |
||||
let ref = val === 'phone' ? 'phoneOrEmail' : 'login' |
||||
let param = val === 'phone' ? this.phoneOrEmail : this.param |
||||
this.$refs[ref].validate(valid => { |
||||
if (valid) { |
||||
this.$post(this.api.logins, param).then(({ status, data, message }) => { |
||||
localStorage.removeItem('examPath') |
||||
localStorage.removeItem('reviewPath') |
||||
this.getOss() |
||||
if (status == 200) { |
||||
const accounts = data.userAccounts |
||||
// 如果返回的是数组,则弹框给用户选择登录哪个用户,否则,直接登录 |
||||
if (accounts instanceof Array) { |
||||
this.users = accounts |
||||
this.userVisible = true |
||||
} else { |
||||
sessionStorage.setItem('token', data.token) |
||||
this.setLogin() |
||||
} |
||||
data: function() { |
||||
var regPhoneOrEmail = (rule, value, callback) => {// 验证手机或邮箱 |
||||
let emailReg = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ |
||||
let phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/ |
||||
if (value === '') { |
||||
callback(new Error('请输入手机或邮箱!')); |
||||
} else if (!emailReg.test(value)&&!phoneReg.test(value)) { |
||||
callback(new Error('输入的手机/邮箱格式不正确!')); |
||||
} else { |
||||
param.code = '' |
||||
this.$message.error(message) |
||||
} |
||||
}).catch(err => { |
||||
if (err.status === 30001) { |
||||
this.phoneVisible = true |
||||
} else if (err.status == 10004 || err.status == 10005) { |
||||
param.code = '' |
||||
this.blur() |
||||
callback(); |
||||
} |
||||
}); |
||||
} else { |
||||
this.$message.error('请输入账号/密码/验证码'); |
||||
return false; |
||||
} |
||||
}); |
||||
}; |
||||
return { |
||||
activeIndex:"1", |
||||
|
||||
showVerify: true,// 账号-验证码展示 |
||||
verificationIMG:'',// 账号验证码拼接链接 |
||||
|
||||
// 账号 |
||||
param: { |
||||
account: '', |
||||
password: '', |
||||
code:'', |
||||
platform:3, |
||||
random:'', |
||||
distinguish:1, |
||||
type: 2 |
||||
}, |
||||
rules: { |
||||
account: [{ required: true, message: '请输入账号', trigger: 'blur' }], |
||||
password: [{ required: true, message: '请输入密码', trigger: 'blur' }], |
||||
code: [{ required: true, message: '请输入验证码', trigger: 'blur' }], |
||||
}, |
||||
|
||||
// 手机+邮箱 |
||||
showPhoneVerify:true,// 邮箱-验证码展示 |
||||
PhoneVerificationIMG:'',// 电话或邮箱验证码拼接链接 |
||||
phoneOrEmail: { |
||||
account: '', |
||||
password: '', |
||||
code:'', |
||||
platform:3, |
||||
random:'', |
||||
distinguish:2, |
||||
type: 2 |
||||
}, |
||||
phoneOrEmailrules:{ |
||||
account: [{ validator: regPhoneOrEmail, trigger: 'blur' }], |
||||
password: [{ required: true, message: '请输入密码', trigger: 'blur' }], |
||||
code: [{ required: true, message: '请输入验证码', trigger: 'blur' }], |
||||
}, |
||||
|
||||
phoneVisible:false, |
||||
phone:'', |
||||
phoneCode:'', |
||||
phoneDisabled:false, |
||||
phoneBtnText: '发送验证码', |
||||
phoneTimer:'', |
||||
phoneOpener:'' |
||||
|
||||
}; |
||||
}, |
||||
// 获取oss信息 |
||||
async getOss () { |
||||
const A = (key, encryptedData) => { |
||||
const keyHex = CryptoJS.enc.Base64.parse(key) |
||||
const decrypted = CryptoJS.AES.decrypt(encryptedData, keyHex, { |
||||
mode: CryptoJS.mode.ECB, |
||||
padding: CryptoJS.pad.Pkcs7 |
||||
}) |
||||
return decrypted.toString(CryptoJS.enc.Utf8) |
||||
} |
||||
|
||||
const R = (encryptedKey, privateKey) => { |
||||
const decrypt = new JSEncrypt() |
||||
decrypt.setPrivateKey(privateKey) |
||||
const decryptedKey = decrypt.decrypt(encryptedKey) |
||||
return decryptedKey |
||||
} |
||||
|
||||
const res = await this.$get(this.api.encrypt) |
||||
const RE = A(R(res.encryptedKey, res.privateKey), res.encryptedData).split('/') |
||||
localStorage.setItem('osc', JSON.stringify(RE)) |
||||
components: { |
||||
vFooter |
||||
}, |
||||
// 选择用户回调 |
||||
chooseUser (user) { |
||||
user.isEnable && this.$post(`${this.api.getToken}?id=${user.id}`).then(({ data }) => { |
||||
sessionStorage.setItem('token', data.token) |
||||
this.token = data.token |
||||
this.setLogin() |
||||
}).catch(res => { }) |
||||
}, |
||||
// 处理登录成功 |
||||
async setLogin () { |
||||
try { |
||||
const res = await this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`) |
||||
const list = res.permissionMenu |
||||
addRoutes(res.permissionMenu[0].children) |
||||
this.$store.commit('setDataPer', res.dataPermissionList) |
||||
this.$message.success('登录成功!') |
||||
this.$router.push({ |
||||
// path: list[0].children[0].path |
||||
path: '/workbench' |
||||
}); |
||||
localStorage.setItem('ms_username', this.param.username); |
||||
} catch (e) { |
||||
if (e.status === 500) { |
||||
sessionStorage.clear() |
||||
} |
||||
} |
||||
}, |
||||
blur () { |
||||
this.param.random = Math.floor(Math.random() * 999999999) |
||||
this.verificationIMG = this.api.verification + '?random=' + `${this.param.random}` |
||||
}, |
||||
phoneBlur () { |
||||
this.phoneOrEmail.random = Math.floor(Math.random() * 999999999) |
||||
this.PhoneVerificationIMG = this.api.verification + '?random=' + `${this.phoneOrEmail.random}` |
||||
}, |
||||
handleSelect (val) { |
||||
this.activeIndex = val |
||||
this.param.account = ""; |
||||
this.param.password = ""; |
||||
this.param.code = ""; |
||||
this.phoneOrEmail.account = ""; |
||||
this.phoneOrEmail.password = ""; |
||||
this.phoneOrEmail.code = ""; |
||||
this.$refs.phoneOrEmail.clearValidate() |
||||
// this.blur() |
||||
this.phoneBlur() |
||||
watch:{ |
||||
verificationIMG:function(val){// 监听账号--展示验证码框 |
||||
if(val){ |
||||
this.showVerify = true |
||||
}else{ |
||||
this.showVerify = false |
||||
} |
||||
}, |
||||
PhoneVerificationIMG:function(val){// 监听账号--展示验证码框 |
||||
if(val){ |
||||
this.showPhoneVerify = true |
||||
}else{ |
||||
this.showPhoneVerify = false |
||||
} |
||||
}, |
||||
}, |
||||
sendPhoneCode () { |
||||
if (!this.phone) return this.$message.warning('请输入手机号') |
||||
if (!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
||||
let data = { |
||||
phone: this.phone, |
||||
types: 2 |
||||
} |
||||
this.$post(this.api.sendPhoneOrEmailCode, data).then(res => { |
||||
this.phoneCountdown()// 倒计时 |
||||
if (res.message.opener) { |
||||
this.phoneOpener = res.message.opener |
||||
} else { |
||||
this.$message(res.message) |
||||
created(){ |
||||
if(this.param.account){ |
||||
this.showVerify = true |
||||
} |
||||
|
||||
}).catch(res => { }) |
||||
this.blur() |
||||
}, |
||||
phoneSubmit () { |
||||
if (!this.phone) return this.$message.warning('请输入手机号') |
||||
if (!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
||||
if (!this.phoneCode) return this.$message.warning('请输入验证码') |
||||
let data = { |
||||
phone: this.phone, |
||||
types: 2, |
||||
code: this.phoneCode, |
||||
opener: this.phoneOpener, |
||||
platform: 3, |
||||
account: this.param.account |
||||
} |
||||
this.$post(this.api.bindPhoneOrEmail, data).then(res => { |
||||
sessionStorage.setItem('token', res.token) |
||||
this.$router.push({ |
||||
path: '/customer' |
||||
}); |
||||
localStorage.setItem('ms_username', this.param.username); |
||||
this.$message.success('绑定成功') |
||||
// this.form.phone = this.phone |
||||
// this.phoneVisible = false |
||||
}).catch(res => { }) |
||||
}, |
||||
phoneCountdown () { |
||||
let count = 60 |
||||
if (!this.phoneTimer) { |
||||
this.phoneDisabled = true |
||||
this.phoneTimer = setInterval(() => { |
||||
if (count > 0) { |
||||
count-- |
||||
this.phoneBtnText = `${count}秒后重试` |
||||
} else { |
||||
this.phoneDisabled = false |
||||
clearInterval(this.phoneTimer) |
||||
this.phoneTimer = null |
||||
this.phoneBtnText = `发送验证码` |
||||
} |
||||
}, 1000) |
||||
} |
||||
methods: { |
||||
submitForm(val) { |
||||
let ref = val==='phone'?'phoneOrEmail':'login' |
||||
let param = val==='phone'?this.phoneOrEmail:this.param |
||||
this.$refs[ref].validate(valid => { |
||||
if (valid) { |
||||
this.$post(this.api.logins,param).then(res => { |
||||
const { message } = res |
||||
sessionStorage.setItem('token',res.data.token) |
||||
this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => { |
||||
const list = res.permissionMenu |
||||
addRoutes(res.permissionMenu[0].children) |
||||
this.$store.commit('setDataPer', res.dataPermissionList) |
||||
this.$message.success(message); |
||||
this.$router.push({ |
||||
path: list[0].children[0].path |
||||
}); |
||||
localStorage.setItem('ms_username', this.param.username); |
||||
}).catch(err => { |
||||
if (err.status === 500) { |
||||
sessionStorage.clear() |
||||
} |
||||
}) |
||||
}).catch(err => { |
||||
if(err.status===30001){ |
||||
this.phoneVisible = true |
||||
}else if(err.status == 10004){ |
||||
this.blur() |
||||
} |
||||
}); |
||||
} else { |
||||
this.$message.error('请输入账号/密码/验证码'); |
||||
return false; |
||||
} |
||||
}); |
||||
|
||||
}, |
||||
blur(){ |
||||
this.param.random = Math.floor(Math.random()*999999999) |
||||
this.verificationIMG = this.api.verification+'?random='+`${this.param.random}` |
||||
}, |
||||
phoneBlur(){ |
||||
this.phoneOrEmail.random = Math.floor(Math.random()*999999999) |
||||
this.PhoneVerificationIMG = this.api.verification+'?random='+`${this.phoneOrEmail.random}` |
||||
}, |
||||
handleSelect(val){ |
||||
this.activeIndex = val |
||||
this.param.account = ""; |
||||
this.param.password = ""; |
||||
this.param.code = ""; |
||||
this.phoneOrEmail.account = ""; |
||||
this.phoneOrEmail.password = ""; |
||||
this.phoneOrEmail.code = ""; |
||||
this.$refs.phoneOrEmail.clearValidate() |
||||
// this.blur() |
||||
this.phoneBlur() |
||||
}, |
||||
sendPhoneCode(){ |
||||
if(!this.phone) return this.$message.warning('请输入手机号') |
||||
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
||||
let data = { |
||||
phone: this.phone, |
||||
types: 2 |
||||
} |
||||
this.$post(this.api.sendPhoneOrEmailCode,data).then(res => { |
||||
this.phoneCountdown()// 倒计时 |
||||
if(res.message.opener){ |
||||
this.phoneOpener = res.message.opener |
||||
}else{ |
||||
this.$message(res.message) |
||||
} |
||||
|
||||
}).catch(res => {}) |
||||
}, |
||||
phoneSubmit(){ |
||||
if(!this.phone) return this.$message.warning('请输入手机号') |
||||
if(!/^1[3456789]\d{9}$/.test(this.phone)) return this.$message.warning('请输入正确的手机号') |
||||
if(!this.phoneCode) return this.$message.warning('请输入验证码') |
||||
let data = { |
||||
phone: this.phone, |
||||
types: 2, |
||||
code: this.phoneCode, |
||||
opener: this.phoneOpener, |
||||
platform: 3, |
||||
account: this.param.account |
||||
} |
||||
this.$post(this.api.bindPhoneOrEmail,data).then(res => { |
||||
sessionStorage.setItem('token',res.token) |
||||
this.$router.push({ |
||||
path:'/customer' |
||||
}); |
||||
localStorage.setItem('ms_username', this.param.username); |
||||
this.$message.success('绑定成功') |
||||
// this.form.phone = this.phone |
||||
// this.phoneVisible = false |
||||
}).catch(res => {}) |
||||
}, |
||||
phoneCountdown(){ |
||||
let count = 60 |
||||
if(!this.phoneTimer){ |
||||
this.phoneDisabled = true |
||||
this.phoneTimer = setInterval(() => { |
||||
if(count > 0){ |
||||
count-- |
||||
this.phoneBtnText = `${count}秒后重试` |
||||
}else{ |
||||
this.phoneDisabled = false |
||||
clearInterval(this.phoneTimer) |
||||
this.phoneTimer = null |
||||
this.phoneBtnText = `发送验证码` |
||||
} |
||||
},1000) |
||||
} |
||||
}, |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.login-wrap { |
||||
position: relative; |
||||
width: 100%; |
||||
background-image: url(../assets/img/login-bg.png); |
||||
background-size: 100%; |
||||
position: relative; |
||||
width: 100%; |
||||
background-image: url(../assets/img/login-bg.png); |
||||
background-size: 100%; |
||||
} |
||||
|
||||
.ms-title { |
||||
width: 548px; |
||||
position: absolute; |
||||
left: 50%; |
||||
top: 30px; |
||||
transform: translate(-50%, 0); |
||||
width: 548px; |
||||
position: absolute; |
||||
left: 50%; |
||||
top: 50px; |
||||
transform: translate(-50%,0); |
||||
} |
||||
|
||||
/deep/ .ms-login { |
||||
position: relative; |
||||
width: 1200px; |
||||
height: calc(92vh - 40px); |
||||
margin: 60px auto 0; |
||||
background-image: url(../assets/img/login-input.png); |
||||
box-shadow: 0px 0px 79px 0px rgba(11, 15, 65, 0.36); |
||||
background-repeat: no-repeat; |
||||
overflow: hidden; |
||||
|
||||
.el-input__inner { |
||||
height: 80px; |
||||
line-height: 80px; |
||||
border: 1px solid rgba(220, 220, 220, 1); |
||||
border-radius: 2px; |
||||
} |
||||
|
||||
.verification { |
||||
position: absolute; |
||||
top: 1px; |
||||
right: 1px; |
||||
width: 160px; |
||||
height: 78px; |
||||
cursor: pointer; |
||||
} |
||||
position: relative; |
||||
width: 1200px; |
||||
height: calc(92vh - 40px); |
||||
margin: 60px auto 0; |
||||
background-image: url(../assets/img/login-input.png); |
||||
box-shadow:0px 0px 79px 0px rgba(11,15,65,0.36); |
||||
background-repeat: no-repeat; |
||||
overflow: hidden; |
||||
.el-input__inner { |
||||
height: 80px; |
||||
line-height: 80px; |
||||
border: 1px solid rgba(220, 220, 220, 1); |
||||
border-radius: 2px; |
||||
} |
||||
.verification{ |
||||
position: absolute; |
||||
top: 1px; |
||||
right: 1px; |
||||
width: 160px; |
||||
height: 78px; |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
|
||||
.title { |
||||
font-size: 16px; |
||||
text-align: center; |
||||
font-weight: bold; |
||||
.title{ |
||||
font-size: 16px; |
||||
text-align: center; |
||||
font-weight: bold; |
||||
} |
||||
|
||||
.login-btn { |
||||
text-align: center; |
||||
text-align: center; |
||||
} |
||||
|
||||
.login-btn button { |
||||
width: 100%; |
||||
height: 88px; |
||||
margin-bottom: 50px; |
||||
font-weight: bold; |
||||
background: linear-gradient(90deg, rgba(94, 206, 253, 1), rgba(91, 67, 231, 1)); |
||||
box-shadow: 0px 7px 27px 0px rgba(50, 129, 255, 0.51); |
||||
border-radius: 10px; |
||||
width: 100%; |
||||
height: 88px; |
||||
margin-bottom: 50px; |
||||
font-weight: bold; |
||||
background:linear-gradient(90deg,rgba(94,206,253,1),rgba(91,67,231,1)); |
||||
box-shadow:0px 7px 27px 0px rgba(50,129,255,0.51); |
||||
border-radius:10px; |
||||
} |
||||
|
||||
.login-tips { |
||||
text-align: center; |
||||
color: #999; |
||||
font-weight: bold; |
||||
text-align: center; |
||||
color: #999; |
||||
font-weight:bold; |
||||
} |
||||
|
||||
.forget { |
||||
margin-bottom: 28px; |
||||
text-align: right; |
||||
color: #999; |
||||
font-weight: bold; |
||||
|
||||
&:hover { |
||||
color: #0092ff; |
||||
} |
||||
.forget{ |
||||
margin-bottom: 28px; |
||||
text-align: right; |
||||
color: #999; |
||||
font-weight:bold; |
||||
&:hover{ |
||||
color: #0092FF; |
||||
} |
||||
} |
||||
|
||||
.thirdParty { |
||||
width: 100%; |
||||
display: flex; |
||||
justify-content: center; |
||||
margin-top: 33px; |
||||
.thirdParty{ |
||||
width: 100%; |
||||
display: flex; |
||||
justify-content: center; |
||||
margin-top: 33px; |
||||
} |
||||
|
||||
/* 头部 */ |
||||
.header { |
||||
height: 60px; |
||||
background-color: #fff; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
font-size: 18px; |
||||
.header{ |
||||
height: 60px; |
||||
background-color: #fff; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
font-size: 18px; |
||||
} |
||||
|
||||
.logo { |
||||
width: 171px; |
||||
height: 40px; |
||||
margin-left: 20px; |
||||
.logo{ |
||||
width: 171px; |
||||
height: 40px; |
||||
margin-left: 20px; |
||||
} |
||||
|
||||
img { |
||||
width: 100%; |
||||
height: 100%; |
||||
img{ |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
|
||||
.header_title { |
||||
width: 33%; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
.header_title{ |
||||
width: 33%; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
} |
||||
|
||||
.header_title a { |
||||
cursor: pointer; |
||||
.header_title a{ |
||||
cursor: pointer; |
||||
} |
||||
|
||||
.header_title a:hover { |
||||
color: blueviolet; |
||||
.header_title a:hover{ |
||||
color: blueviolet; |
||||
} |
||||
|
||||
.nul { |
||||
width: 80px; |
||||
margin-right: 30px; |
||||
.nul{ |
||||
width:80px; |
||||
margin-right: 30px; |
||||
} |
||||
|
||||
.el-menu-demo { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
border-bottom: 0; |
||||
background-color: transparent; |
||||
.el-menu-demo{ |
||||
display: flex; |
||||
justify-content: space-between; |
||||
border-bottom: 0; |
||||
background-color: transparent; |
||||
} |
||||
|
||||
.tips { |
||||
margin: -20px 0 20px 5px; |
||||
font-size: 14px; |
||||
text-align: center; |
||||
color: #666; |
||||
} |
||||
|
||||
/deep/.user-dia { |
||||
.tips { |
||||
margin-bottom: 20px; |
||||
margin: -20px 0 20px 5px; |
||||
font-size: 14px; |
||||
text-align: center; |
||||
color: #666; |
||||
} |
||||
|
||||
.users { |
||||
li { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
padding: 0 15px; |
||||
margin-bottom: 10px; |
||||
line-height: 40px; |
||||
font-size: 14px; |
||||
background-color: #ebeef5; |
||||
cursor: pointer; |
||||
|
||||
&.isEnable { |
||||
color: #c0c4cc; |
||||
background-color: #f5f7fa; |
||||
cursor: not-allowed; |
||||
} |
||||
|
||||
&:last-child { |
||||
margin-bottom: 0; |
||||
} |
||||
|
||||
&:hover { |
||||
background-color: #d3e0ff; |
||||
} |
||||
|
||||
i { |
||||
font-size: 16px; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media (max-width: 1600px) { |
||||
/deep/.ms-login { |
||||
width: 1000px; |
||||
|
||||
.el-input__inner { |
||||
height: 50px; |
||||
line-height: 50px; |
||||
} |
||||
|
||||
.verification { |
||||
height: 48px; |
||||
} |
||||
} |
||||
|
||||
.ms-title { |
||||
width: 480px; |
||||
} |
||||
|
||||
.login-btn button { |
||||
height: 60px; |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,204 @@ |
||||
<template> |
||||
<div> |
||||
<el-row :gutter="20"> |
||||
<el-col :span="24"> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="flex-between"> |
||||
<div class="per_title" @click="goback()"> |
||||
<i class="el-icon-arrow-left"></i> |
||||
<span class="per_back">返回</span> |
||||
<span class="per_school">添加环节</span> |
||||
</div> |
||||
<div> |
||||
<el-button type="primary" round class="mag" @click="saveAdd('form')">确定 |
||||
</el-button> |
||||
</div> |
||||
</div> |
||||
</el-card> |
||||
|
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="flex-between mgb20 user_header"> |
||||
<div class="flex-center"> |
||||
<p class="addhr_tag"></p> |
||||
<span>环节1.1</span> |
||||
</div> |
||||
<el-button type="primary" round class="mag" @click="addcourse()">添加环节</el-button> |
||||
</div> |
||||
|
||||
<div> |
||||
<el-form :model="form" ref="form" label-width="120px" class="courseware"> |
||||
<ul class="mgb20"> |
||||
<li v-for="(item,index) in form.courseList" :key="index" class="flex-between"> |
||||
<div style="width: 50%;"> |
||||
<el-form-item label="环节名称" :prop="'courseList.' + index + '.linkName'" |
||||
:rules="{required: true, message: '请输入项目课件', trigger: 'blur'}"> |
||||
<el-input placeholder="请输入项目课件" v-model="item.linkName"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="资源添加" :prop="'courseList.' + index + '.fileLink'" |
||||
:rules="{required: true, message: '请添加文件', trigger: 'blur'}"> |
||||
<el-upload |
||||
class="link_upload" |
||||
:headers="{token}" |
||||
:action="api.uploadFiles" |
||||
:on-remove="(file, fileList)=>{return handleRemove(file, fileList, index)}" |
||||
:on-error="uploadError" |
||||
:on-success="(response, file, fileList)=>{return uploadSuccess(response, file, fileList, index)}" |
||||
:before-remove="beforeRemove" |
||||
:limit="1" |
||||
:on-exceed="handleExceed" |
||||
:file-list="item.uploadList"> |
||||
<el-button size="medium" type="primary" icon="el-icon-upload" |
||||
class="uploadTitle">点击上传 |
||||
</el-button> |
||||
</el-upload> |
||||
</el-form-item> |
||||
</div> |
||||
<div> |
||||
<el-button size="medium" type="primary" @click="delCourse(index)">删除课件 |
||||
</el-button> |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
</el-form> |
||||
</div> |
||||
</el-card> |
||||
</el-col> |
||||
</el-row> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
token: this.$store.state.loginToken, |
||||
form: { |
||||
courseList: [{ |
||||
projectId: this.$store.state.systemId, |
||||
courseId: this.$store.state.courseId, |
||||
linkName: "", |
||||
fileLink: "", |
||||
uploadList: [] |
||||
}] |
||||
} |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.getData(); |
||||
}, |
||||
methods: { |
||||
getData() { |
||||
let data = { |
||||
projectId: this.form.courseList[0].projectId, |
||||
courseId: this.form.courseList[0].courseId |
||||
}; |
||||
this.$get(this.api.queryLinkDetails, data).then((res) => { |
||||
res.message.map(e => { |
||||
var arr = []; |
||||
arr.push({ name: e.linkName, url: e.fileLink }); |
||||
this.$set(e, "uploadList", arr); |
||||
}); |
||||
this.form.courseList = res.message; |
||||
}).catch((res) => { |
||||
}); |
||||
}, |
||||
saveAdd(formName) { |
||||
this.$refs[formName].validate((valid) => { |
||||
if (valid) { |
||||
var arr = this.form.courseList.map(v => { |
||||
var obj = { |
||||
...v |
||||
}; |
||||
delete obj.uploadList; |
||||
return obj; |
||||
}); |
||||
let data = { |
||||
courseLink: arr |
||||
}; |
||||
this.$post(this.api.addCourseLink, data).then((res) => { |
||||
this.$message.success("添加成功!"); |
||||
this.goback(); |
||||
}).catch((res) => { |
||||
}); |
||||
} |
||||
}); |
||||
}, |
||||
addcourse() { |
||||
this.form.courseList = this.form.courseList.concat({ |
||||
projectId: this.$store.state.systemId, |
||||
courseId: this.$store.state.courseId, |
||||
linkName: "", |
||||
fileLink: "", |
||||
uploadList: [] |
||||
}); |
||||
}, |
||||
// 上传文件 |
||||
handleExceed(files, fileList) { |
||||
this.$message.warning( |
||||
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` |
||||
); |
||||
}, |
||||
uploadSuccess(response, file, fileList, idx) { |
||||
this.form.courseList[idx].uploadList.push({ name: file.name, url: response.message.fileUrl }); |
||||
this.form.courseList[idx].fileLink = response.message.fileUrl; |
||||
}, |
||||
uploadError(err, file, fileList) { |
||||
this.$message({ |
||||
message: "上传出错,请重试!", |
||||
type: "error", |
||||
center: true |
||||
}); |
||||
}, |
||||
beforeRemove(file, fileList) { |
||||
return this.$confirm(`确定移除 ${file.name}?`); |
||||
}, |
||||
handleRemove(file, fileList, idx) { |
||||
let uploadList = this.form.courseList[idx].uploadList; |
||||
uploadList.forEach((item, index) => { |
||||
if (file.name == item.name) { |
||||
uploadList.splice(index, 1); |
||||
} |
||||
}); |
||||
}, |
||||
delCourse(index) { |
||||
this.$confirm("确定要删除该课件吗?", "提示", { |
||||
type: "warning" |
||||
}) |
||||
.then(() => { |
||||
this.form.courseList.splice(index, 1); |
||||
this.$message.success("删除成功"); |
||||
}) |
||||
.catch(() => { |
||||
}); |
||||
}, |
||||
goback() { |
||||
this.$router.go(-1); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped> |
||||
/* .courseware ul .el-input{ |
||||
width: 30%; |
||||
} */ |
||||
|
||||
.courseware ul li { |
||||
margin-top: 20px; |
||||
padding: 0 0 10px 0; |
||||
border-bottom: 1px dashed #eee; |
||||
} |
||||
|
||||
.courseware ul li:first-child { |
||||
margin-top: 0; |
||||
} |
||||
|
||||
.courseware ul li:last-child { |
||||
border-bottom: none; |
||||
} |
||||
|
||||
.uploadTitle { |
||||
height: 40px !important; |
||||
font-size: 16px; |
||||
} |
||||
</style> |
@ -0,0 +1,317 @@ |
||||
<template> |
||||
<div> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div> |
||||
<div class="flex-center mgb20"> |
||||
<p class="hr_tag"></p> |
||||
<span>筛选</span> |
||||
</div> |
||||
<div> |
||||
<el-form label-width="80px"> |
||||
<el-col :span="4"> |
||||
<el-form-item label="学科类别"> |
||||
<el-select v-model="form.categoryId" clearable |
||||
@change="getProfessionalClass()" @clear="clearClass()"> |
||||
<el-option v-for="(item,index) in subjectList" :key="index" |
||||
:label="item.disciplineName" |
||||
:value="item.disciplineId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="专业类"> |
||||
<el-select v-model="form.professionalCategoryId" clearable |
||||
:disabled="form.categoryId ? false : true" |
||||
@change="getProfessional()" @clear="clearProfess()"> |
||||
<el-option v-for="(item,index) in ProfessionalClassList" :key="index" |
||||
:label="item.professionalClassName" |
||||
:value="item.professionalClassId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="专业"> |
||||
<el-select v-model="form.professionalId" clearable |
||||
:disabled="form.professionalCategoryId ? false : true" |
||||
@change="getData()"> |
||||
<el-option v-for="(item,index) in ProfessionalList" :key="index" |
||||
:label="item.professionalName" |
||||
:value="item.professionalId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="课程类别"> |
||||
<el-select v-model="form.curriculumType" clearable |
||||
@change="getData()"> |
||||
<el-option label="理论课程" :value="0"></el-option> |
||||
<el-option label="实训课程" :value="1"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="6"> |
||||
<el-form-item> |
||||
<el-input placeholder="请输入课程名称" prefix-icon="el-icon-search" |
||||
v-model="form.curriculumName" clearable |
||||
@keyup.enter.native="onSearch"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</el-card> |
||||
|
||||
<el-card shadow="hover" class="card"> |
||||
<div class="flex-between mgb20"> |
||||
<div class="flex-center"> |
||||
<p class="hr_tag"></p> |
||||
<span>课程列表</span> |
||||
</div> |
||||
<div> |
||||
<el-button type="primary" round @click="addcourse" v-auth>新增课程</el-button> |
||||
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> |
||||
</div> |
||||
</div> |
||||
<el-table v-loading="loading" :data="courseData" class="table" ref="table" stripe header-align="center" |
||||
@selection-change="handleSelectionChange" :row-key="getRowKeys"> |
||||
<el-table-column type="selection" width="55" align="center" |
||||
:reserve-selection="true"></el-table-column> |
||||
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> |
||||
<el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column> |
||||
<el-table-column prop="curriculumType" label="课程类型" align="center"> |
||||
<template slot-scope="scope"> |
||||
<span class="ellipsis">{{ courseTypeStatus[scope.row.curriculumType] }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="配置的实训应用" align="center"> |
||||
<template slot-scope="scope"> |
||||
<span class="ellipsis">{{ scope.row.sysName }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="orderVolume" label="订单量" align="center"></el-table-column> |
||||
<el-table-column prop="expectedCourse" label="预计课时" align="center"></el-table-column> |
||||
<el-table-column label="上架/下架" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-switch |
||||
v-model="scope.row.isShelves" |
||||
:active-value="1" |
||||
:inactive-value="0" |
||||
@change="changeSwitch($event, scope.row)" |
||||
v-auth="'/curriculum:上下架'"> |
||||
</el-switch> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button> |
||||
<el-button type="text" @click="config(scope.row)" v-auth>内容设置</el-button> |
||||
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background @current-change="handleCurrentChange" :current-page="pageNo" |
||||
layout="total, prev, pager, next" :total="totals"></el-pagination> |
||||
</div> |
||||
</el-card> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
name: "customer", |
||||
data() { |
||||
return { |
||||
courseTypeStatus: { |
||||
0: "理论课程", |
||||
1: "实训课程" |
||||
}, |
||||
name: localStorage.getItem("ms_username"), |
||||
courseData: [], |
||||
form: { |
||||
categoryId: "", |
||||
professionalCategoryId: "", |
||||
professionalId: "", |
||||
curriculumType: "", |
||||
curriculumName: "" |
||||
}, |
||||
pageNo: +this.$route.query.page || 1, |
||||
pageSize: 10, |
||||
totals: 0, |
||||
subjectList: [], // 学科类别 |
||||
ProfessionalClassList: [], // 专业类 |
||||
ProfessionalList: [], // 专业 |
||||
multipleSelection: [], |
||||
loading: false, |
||||
searchTimer: null |
||||
}; |
||||
}, |
||||
watch: { |
||||
"form.curriculumName": function(val) { |
||||
clearTimeout(this.searchTimer); |
||||
this.searchTimer = setTimeout(() => { |
||||
this.initData(); |
||||
}, 500); |
||||
} |
||||
}, |
||||
mounted() { |
||||
this.getSubject(); |
||||
this.getData(); |
||||
}, |
||||
methods: { |
||||
getRowKeys(row) { |
||||
return row.cid; |
||||
}, |
||||
// 获取列表数据 |
||||
getData() { |
||||
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理') |
||||
let data = { |
||||
...this.form, |
||||
pageNum: this.pageNo, |
||||
pageSize: this.pageSize, |
||||
supplierId: sid ? sid.supplierId : '' |
||||
}; |
||||
this.$post(this.api.curriculumList, data).then(res => { |
||||
this.courseData = res.page.records; |
||||
this.totals = res.page.total; |
||||
this.loading = false; |
||||
}).catch(err => { |
||||
}); |
||||
}, |
||||
initData() { |
||||
this.pageNo = 1; |
||||
this.getData(); |
||||
}, |
||||
// 获取学科类别 |
||||
getSubject() { |
||||
this.$get(this.api.courseDiscipline).then(res => { |
||||
this.subjectList = res.list; |
||||
}).catch(err => { |
||||
}); |
||||
}, |
||||
// 清除学科类别 |
||||
clearClass() { |
||||
this.form.professionalCategoryId = ""; |
||||
this.form.professionalId = ""; |
||||
}, |
||||
// 获取专业类 |
||||
getProfessionalClass() { |
||||
this.clearClass(); |
||||
this.getProfessionalClassData(); |
||||
this.pageNo = 1; |
||||
this.getData(); |
||||
}, |
||||
getProfessionalClassData() { |
||||
let data = { |
||||
disciplineId: this.form.categoryId |
||||
}; |
||||
this.$get(this.api.courseProfessionalClass, data).then(res => { |
||||
this.ProfessionalClassList = res.list; |
||||
}).catch(err => { |
||||
}); |
||||
}, |
||||
// 清除专业类 |
||||
clearProfess() { |
||||
this.form.professionalId = ""; |
||||
}, |
||||
// 获取专业 |
||||
getProfessional() { |
||||
this.clearProfess(); |
||||
this.getProfessionalData(); |
||||
this.pageNo = 1; |
||||
this.getData(); |
||||
}, |
||||
getProfessionalData() { |
||||
let data = { |
||||
professionalClassId: this.form.professionalCategoryId |
||||
}; |
||||
this.$get(this.api.courseProfessional, data).then(res => { |
||||
this.ProfessionalList = res.list; |
||||
}).catch(err => { |
||||
}); |
||||
}, |
||||
// 新建课程 |
||||
addcourse() { |
||||
this.$router.push("/addcurriculum"); |
||||
}, |
||||
// 编辑 |
||||
edit(row) { |
||||
this.$router.push(`/addcurriculum?cid=${row.cid}`); |
||||
}, |
||||
// 内容设置 |
||||
config(row) { |
||||
this.$router.push(`/contentSettings?cid=${row.cid}&name=${row.curriculumName}`); |
||||
}, |
||||
// 删除 |
||||
handleDelete(row) { |
||||
this.$confirm("确定要删除吗?", "提示", { |
||||
type: "warning" |
||||
}).then(() => { |
||||
this.$post(`${this.api.delCourse}?cids=${row.cid}`).then(res => { |
||||
this.getData(); |
||||
this.$message.success("删除成功"); |
||||
}).catch(err => { |
||||
}); |
||||
}).catch(() => { |
||||
}); |
||||
}, |
||||
// 处理多选 |
||||
handleSelectionChange(val) { |
||||
this.multipleSelection = val; |
||||
}, |
||||
// 批量删除 |
||||
delAllSelection() { |
||||
if (this.multipleSelection.length) { |
||||
this.$confirm("确定要删除吗?", "提示", { |
||||
type: "warning" |
||||
}).then(() => { |
||||
let ids = this.multipleSelection.map(i => i.cid); |
||||
this.$post(`${this.api.delCourse}?cids=${ids.toString()}`).then(res => { |
||||
if(ids.length == this.courseData.length){ |
||||
if(this.pageNo > 1){ |
||||
this.pageNo = this.pageNo-1 |
||||
} |
||||
} |
||||
this.getData(); |
||||
this.$message.success("删除成功"); |
||||
this.$refs.table.clearSelection() |
||||
}).catch(err => { |
||||
}); |
||||
}).catch(() => { |
||||
}); |
||||
} else { |
||||
this.$message.warning("请先选择课程 !"); |
||||
} |
||||
}, |
||||
// 处理页码切换 |
||||
handleCurrentChange(val) { |
||||
this.pageNo = val; |
||||
this.$router.push(`curriculum?page=${val}`) |
||||
this.getData(); |
||||
}, |
||||
// 课程名称条件搜索 |
||||
onSearch() { |
||||
this.pageNo = 1; |
||||
this.getData(); |
||||
}, |
||||
// 上下架 |
||||
changeSwitch(value, row) { |
||||
this.$post(`${this.api.isShelves}?cid=${row.cid}&isShelves=${value}`).then((res) => { |
||||
this.getData(); |
||||
this.$message.success("修改上下架状态成功!"); |
||||
}).catch((res) => { |
||||
}); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.card { |
||||
min-height: calc(100vh - 300px); |
||||
} |
||||
.mag { |
||||
margin-right: 20px; |
||||
} |
||||
</style> |
||||
|
@ -1,610 +0,0 @@ |
||||
<template> |
||||
<el-drawer title="添加系统资源" :visible.sync="sourceVisible" size="1200px" :close-on-click-modal="false" |
||||
custom-class="source-dia" @closed="closeDia"> |
||||
<div class="overflow" v-loading="loading"> |
||||
<div class="left"> |
||||
<div class="tabs mgb20"> |
||||
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: i == active }" @click="tabChange(i)">{{ |
||||
item |
||||
}}</a> |
||||
</div> |
||||
|
||||
<template v-if="active !== 'tab3'"> |
||||
<el-input class="mgb10" style="width: 300px" placeholder="请输入资源名称" prefix-icon="el-icon-search" |
||||
v-model="keyword" clearable></el-input> |
||||
|
||||
<div class="course"> |
||||
<div v-for="(course, i) in course" :key="i" class="item"> |
||||
<div class="line"> |
||||
<i :class="`el-icon-caret-right arrow ${course.shrink ? 'active' : ''}`" |
||||
@click="course.shrink = !course.shrink"></i> |
||||
<el-checkbox class="check" v-model="course.check" @change="checkCourse(course)"></el-checkbox> |
||||
<img v-if="course.coverUrl" class="cover" :src="course.coverUrl" alt=""> |
||||
<span class="course-name">{{ course.curriculumName || course.courseName }}</span> |
||||
</div> |
||||
<div v-if="course.shrink" class="chapters"> |
||||
<!-- 章节 --> |
||||
<div v-for="(chapter, j) in course.chapters" :key="j" class=""> |
||||
<div class="line"> |
||||
<i :class="`el-icon-caret-right arrow ${chapter.shrink ? 'active' : ''}`" |
||||
@click="chapter.shrink = !chapter.shrink"></i> |
||||
<el-checkbox class="check" v-model="chapter.check" @change="checkChapter(chapter, course)">{{ |
||||
chapter.name |
||||
}}</el-checkbox> |
||||
</div> |
||||
|
||||
<!-- 小节 --> |
||||
<div v-if="chapter.shrink" class="sections"> |
||||
<div v-for="(section, k) in chapter.subsections" :key="k" class="line"> |
||||
<el-checkbox class="check" v-model="section.check" @change="checkSection(section, chapter)"> |
||||
<img v-if="section.fileType === 'pptx'" src="@/assets/img/exts/ppt.png" alt=""> |
||||
<img v-else-if="section.fileType === 'mp4'" src="@/assets/img/exts/video.png" alt=""> |
||||
<img v-else-if="section.fileType === 'doc' || section.fileType === 'docx'" |
||||
src="@/assets/img/exts/word.png" alt=""> |
||||
<img v-else-if="section.fileType === 'xlsx' || section.fileType === 'xls'" |
||||
src="@/assets/img/exts/excel.png" alt=""> |
||||
<img v-else-if="section.fileType === 'txt'" src="@/assets/img/exts/txt.png" alt=""> |
||||
<img v-else-if="section.fileType === 'pdf'" src="@/assets/img/exts/pdf.png" alt=""> |
||||
<img v-else src="@/assets/img/exts/pic.png" alt=""> |
||||
{{ section.name }}</el-checkbox> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<!-- 文件素材 --> |
||||
<div v-else class="materials"> |
||||
<div class="types"> |
||||
<div class="flex-center m-b-10"> |
||||
<p class="addhr_tag"></p> |
||||
<span>资源类型</span> |
||||
</div> |
||||
<ul class="lines"> |
||||
<li v-for="(item, i) in sourceType" :key="i" :class="['line', { active: curType === item.name }]" |
||||
@click="checkType(item)">{{ item.name }}</li> |
||||
</ul> |
||||
</div> |
||||
|
||||
<div class="sources"> |
||||
<div class="flex-center m-b-10"> |
||||
<p class="addhr_tag"></p> |
||||
<span>资源列表</span> |
||||
</div> |
||||
<el-input class="m-b-10" placeholder="请输入资源名称" prefix-icon="el-icon-search" v-model="keyword" |
||||
clearable></el-input> |
||||
<ul class="lines"> |
||||
<el-checkbox v-if="sources.length" v-model="checkAll" label="全选" @change="checkAllChange"></el-checkbox> |
||||
<li v-for="(item, i) in sources" :key="i" class="line"> |
||||
<el-checkbox v-model="item.check" :label="item.resourceName" @change="sourceChange(item)"></el-checkbox> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="right"> |
||||
<div v-if="$parent.curSection.id" class="m-b-20"> |
||||
<p class="total m-b-10">原资源(共1个)</p> |
||||
<div v-html="$parent.curSection.name"></div> |
||||
</div> |
||||
<template v-if="checked.length"> |
||||
<div class="flex-between m-b-10"> |
||||
<p class="total">已选资源(共{{ checked.length }}个)</p> |
||||
<el-button type="text" @click="batchDelChecked">批量移除</el-button> |
||||
</div> |
||||
|
||||
<el-input placeholder="请输入资源名称" prefix-icon="el-icon-search" v-model="checkedKeyword" clearable></el-input> |
||||
|
||||
<div class="lines"> |
||||
<template v-for="(item, i) in checked"> |
||||
<div v-if="!item.name || item.name.includes(checkedKeyword)" :key="i" class="line"> |
||||
<div class="check-left"> |
||||
<el-checkbox v-model="item.check"></el-checkbox> |
||||
<span class="serial">{{ i + 1 }}</span> |
||||
<el-tooltip effect="dark" :content="item.name" placement="top-start"> |
||||
<p class="checked-name ellipsis">{{ item.name }}</p> |
||||
</el-tooltip> |
||||
</div> |
||||
<i class="el-icon-delete action-icon" @click="delChecked(item)"></i> |
||||
</div> |
||||
</template> |
||||
</div> |
||||
</template> |
||||
<div v-else class="empty"> |
||||
<img class="icon" src="@/assets/img/empty.svg" alt=""> |
||||
<p>暂无数据</p> |
||||
</div> |
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
<div class="btns"> |
||||
<el-button @click="sourceVisible = false">取消</el-button> |
||||
<el-button type="primary" :loading="submiting" @click="submit">确定</el-button> |
||||
</div> |
||||
</el-drawer> |
||||
</template> |
||||
<script> |
||||
import Setting from '@/setting' |
||||
import Util from '@/libs/util' |
||||
import _ from 'lodash' |
||||
import SourceConst from '@/const/source' |
||||
export default { |
||||
props: ['visible'], |
||||
data () { |
||||
return { |
||||
sourceVisible: false, |
||||
active: 'tab1', |
||||
tabs: { |
||||
tab1: '教学课程', |
||||
tab2: '精品课程', |
||||
tab3: '文件素材', |
||||
}, |
||||
sourceType: [], |
||||
curType: '全部', |
||||
sources: [], |
||||
checkAll: false, |
||||
keyword: '', |
||||
searchTimer: null, |
||||
checkedKeyword: '', |
||||
|
||||
allSections: [], |
||||
course: [], |
||||
|
||||
checked: [], |
||||
submiting: false, |
||||
loading: false, |
||||
}; |
||||
}, |
||||
watch: { |
||||
'keyword': function (val) { |
||||
clearTimeout(this.searchTimer) |
||||
this.searchTimer = setTimeout(this.getCourse, 500) |
||||
}, |
||||
visible () { |
||||
this.sourceVisible = this.visible |
||||
this.visible && this.init() |
||||
} |
||||
}, |
||||
mounted () { |
||||
|
||||
}, |
||||
methods: { |
||||
// 初始化 |
||||
init () { |
||||
this.checked = [] |
||||
this.curType = '全部' |
||||
this.sourceType = [ |
||||
{ |
||||
id: '', |
||||
name: '全部' |
||||
}, |
||||
...SourceConst.types |
||||
] |
||||
this.sourceType.forEach(e => { |
||||
e.check = false |
||||
}) |
||||
this.getCourse() |
||||
}, |
||||
// 课程列表 |
||||
async getCourse () { |
||||
try { |
||||
this.loading = true |
||||
this.checkAll = false |
||||
const { checked } = this |
||||
if (this.active === 'tab3') { |
||||
const { page } = await this.$post(this.api.resourceLibrary, { |
||||
pageNum: 1, |
||||
pageSize: 10000, |
||||
platformId: Setting.platformId, |
||||
type: 2, |
||||
keyword: this.keyword, |
||||
displayFileType: this.curType === '全部' ? [] : [this.curType], |
||||
}) |
||||
const list = page.records |
||||
list.forEach(e => { |
||||
const cur = checked.find(m => m.resourceName && m.id === e.id) |
||||
e.name = e.resourceName |
||||
e.check = !!cur |
||||
}) |
||||
this.sources = list |
||||
} else { |
||||
const { list } = await this.$post(`${this.api[this.active === 'tab1' ? 'curriculumTree' : 'boutiqueCurriculumTree']}?name=${this.keyword}`) |
||||
if (list.length) { |
||||
const all = [] |
||||
list.forEach(e => { |
||||
e.shrink = false |
||||
e.check = false |
||||
e.chapters.forEach(n => { |
||||
n.shrink = false |
||||
n.check = false |
||||
all.push(...n.subsections) |
||||
n.subsections.forEach(m => { |
||||
const cur = checked.find(j => m.cid === j.cid && m.id === j.id) |
||||
m.check = !!cur |
||||
}) |
||||
}) |
||||
}) |
||||
|
||||
list.forEach(e => { |
||||
e.shrink = false |
||||
e.check = false |
||||
e.chapters.forEach(n => { |
||||
n.shrink = false |
||||
n.check = n.subsections.every(m => m.check) |
||||
}) |
||||
}) |
||||
|
||||
list.forEach(e => { |
||||
e.shrink = false |
||||
e.check = e.chapters.every(m => m.check) |
||||
}) |
||||
|
||||
list[0].shrink = true |
||||
list[0].chapters[0].shrink = true |
||||
this.allSections = all |
||||
} |
||||
this.course = list |
||||
} |
||||
} finally { |
||||
this.loading = false |
||||
} |
||||
}, |
||||
initData () { |
||||
this.page = 1; |
||||
this.getData(); |
||||
}, |
||||
tabChange (index) { |
||||
this.keyword = '' |
||||
this.active = index |
||||
this.getCourse() |
||||
}, |
||||
// 课程多选回调 |
||||
checkCourse (row) { |
||||
const { check } = row |
||||
const { checked } = this |
||||
row.chapters.forEach(e => { |
||||
e.check = check |
||||
e.subsections.forEach(n => { |
||||
n.check = check |
||||
const cur = checked.findIndex(m => m.id === n.id) |
||||
if (check) { |
||||
if (cur === -1) { |
||||
const section = _.cloneDeep(n) |
||||
section.check = false |
||||
checked.push(section) |
||||
} |
||||
} else { |
||||
cur !== -1 && checked.splice(cur, 1) |
||||
} |
||||
}) |
||||
}) |
||||
}, |
||||
// 章节多选回调 |
||||
checkChapter (row, course) { |
||||
const { check } = row |
||||
const { checked } = this |
||||
row.subsections.forEach(n => { |
||||
n.check = check |
||||
const cur = checked.findIndex(m => m.id === n.id) |
||||
if (check) { |
||||
if (cur === -1) { |
||||
const section = _.cloneDeep(n) |
||||
section.check = false |
||||
checked.push(section) |
||||
} |
||||
} else { |
||||
cur !== -1 && checked.splice(cur, 1) |
||||
} |
||||
}) |
||||
course.check = course.chapters.every(e => e.check) |
||||
}, |
||||
// 小节多选回调 |
||||
async checkSection (row, chapter) { |
||||
const { check } = row |
||||
const { checked } = this |
||||
const cur = checked.findIndex(m => m.id === row.id) |
||||
if (check) { |
||||
if (cur === -1) { |
||||
const section = _.cloneDeep(row) |
||||
section.check = false |
||||
this.checked.push(section) |
||||
} |
||||
} else { |
||||
cur !== -1 && this.checked.splice(cur, 1) |
||||
} |
||||
chapter.check = chapter.subsections.every(e => e.check) |
||||
}, |
||||
// 资源全选回调 |
||||
checkAllChange (val) { |
||||
this.sources.map(e => { |
||||
e.check = val |
||||
this.sourceChange(e) |
||||
}) |
||||
}, |
||||
// 资源类型选择回调 |
||||
checkType ({ name }) { |
||||
this.curType = name |
||||
this.getCourse() |
||||
}, |
||||
// 资源列表选择回调 |
||||
sourceChange (row) { |
||||
const { check } = row |
||||
const { checked } = this |
||||
const cur = checked.findIndex(m => m.id === row.id) |
||||
if (check) { |
||||
if (cur === -1) { |
||||
const section = _.cloneDeep(row) |
||||
section.check = false |
||||
this.checked.push(section) |
||||
} |
||||
} else { |
||||
cur !== -1 && this.checked.splice(cur, 1) |
||||
} |
||||
}, |
||||
|
||||
// 批量移除 |
||||
async batchDelChecked (val) { |
||||
try { |
||||
const checked = this.checked.filter(e => e.check) |
||||
if (checked.length) { |
||||
checked.map(e => { |
||||
const cur = this.allSections.find(n => n.id === e.id) |
||||
if (cur) { |
||||
cur.check = false |
||||
} |
||||
}) |
||||
this.checked = this.checked.filter(e => !e.check) |
||||
} else { |
||||
Util.warningMsg('请选择数据') |
||||
} |
||||
} catch (e) { } |
||||
}, |
||||
// 已选单个删除 |
||||
async delChecked (item) { |
||||
try { |
||||
const cur = this.allSections.find(e => e.id === item.id) |
||||
if (cur) cur.check = false |
||||
this.checked.splice(this.checked.findIndex(e => e.id === item.id), 1) |
||||
} catch (e) { } |
||||
}, |
||||
// 提交 |
||||
async submit () { |
||||
try { |
||||
if (this.submiting) return false |
||||
const { checked } = this |
||||
if (checked.length) { |
||||
this.submiting = true |
||||
const { chapterId, id } = this.$parent |
||||
const result = checked.map(e => { |
||||
return { |
||||
chapterId, |
||||
cid: id, |
||||
resourceId: e.id, |
||||
type: e.cid ? 0 : e.resourceName ? 2 : 1, |
||||
} |
||||
}) |
||||
|
||||
const old = this.$parent.curSection // 需要更换的资源 |
||||
if (old.id) { |
||||
// 更换资源 |
||||
await this.$post(this.api.replaceResource, { |
||||
chapterId: old.chapterId, |
||||
cid: +id, |
||||
subsectionId: old.id, |
||||
newResource: result |
||||
}) |
||||
|
||||
} else { |
||||
// 批量新增资源 |
||||
await this.$post(this.api.combinationResource, result) |
||||
} |
||||
|
||||
this.sourceVisible = false |
||||
this.$parent.switchTypeVisible = false |
||||
this.$parent.getData() |
||||
this.submiting = false |
||||
} else { |
||||
Util.warningMsg('请选择资源') |
||||
} |
||||
} catch (e) { |
||||
this.submiting = false |
||||
} |
||||
}, |
||||
// 弹框关闭回调 |
||||
closeDia () { |
||||
this.$emit('update:visible', false) |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
/deep/.source-dia { |
||||
.el-drawer__header { |
||||
padding-bottom: 20px; |
||||
margin-bottom: 0; |
||||
border-bottom: 1px solid #eee; |
||||
} |
||||
|
||||
.overflow { |
||||
display: flex; |
||||
} |
||||
|
||||
.btns { |
||||
position: absolute; |
||||
bottom: 0; |
||||
left: 0; |
||||
width: 100%; |
||||
padding: 14px 0; |
||||
text-align: center; |
||||
background-color: #fff; |
||||
box-shadow: 4px -2px 6px 0px rgba(198, 198, 198, 0.3500); |
||||
} |
||||
|
||||
|
||||
.empty { |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
align-items: center; |
||||
height: 100%; |
||||
font-size: 14px; |
||||
text-align: center; |
||||
color: #a3a3a3; |
||||
} |
||||
|
||||
.left { |
||||
width: 700px; |
||||
padding: 0 15px; |
||||
border-right: 1px solid #eee; |
||||
box-sizing: border-box; |
||||
|
||||
.course { |
||||
height: calc(100vh - 263px); |
||||
overflow: auto; |
||||
|
||||
.item { |
||||
padding: 10px; |
||||
margin-bottom: 10px; |
||||
background-color: #f9f9f9; |
||||
} |
||||
} |
||||
|
||||
.line { |
||||
display: flex; |
||||
align-items: center; |
||||
} |
||||
|
||||
.arrow { |
||||
font-size: 16px; |
||||
color: #9f9f9f; |
||||
cursor: pointer; |
||||
transition: .3s; |
||||
|
||||
&.active { |
||||
transform: rotate(90deg); |
||||
} |
||||
} |
||||
|
||||
.check { |
||||
margin: 0 10px; |
||||
|
||||
img { |
||||
vertical-align: middle; |
||||
} |
||||
} |
||||
|
||||
.cover { |
||||
width: 100px; |
||||
max-height: 80px; |
||||
margin-right: 15px; |
||||
border-radius: 6px; |
||||
} |
||||
|
||||
.course-name { |
||||
font-size: 14px; |
||||
color: #333; |
||||
} |
||||
|
||||
.chapters { |
||||
padding-left: 26px; |
||||
margin-top: 10px; |
||||
|
||||
.line { |
||||
margin-bottom: 10px; |
||||
} |
||||
} |
||||
|
||||
.chapter-name { |
||||
font-size: 13px; |
||||
color: #ccc; |
||||
} |
||||
|
||||
.sections { |
||||
padding-left: 43px; |
||||
} |
||||
} |
||||
|
||||
.right { |
||||
flex: 1; |
||||
padding: 15px; |
||||
|
||||
.total { |
||||
font-size: 15px; |
||||
color: #333; |
||||
font-weight: 600; |
||||
} |
||||
|
||||
.lines { |
||||
height: calc(100vh - 228px); |
||||
padding-right: 10px; |
||||
margin-top: 10px; |
||||
overflow: auto; |
||||
} |
||||
|
||||
.line { |
||||
display: flex; |
||||
padding: 5px 0; |
||||
color: #333; |
||||
} |
||||
|
||||
.serial { |
||||
width: 32px; |
||||
margin: 0 12px; |
||||
text-align: center; |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
.check-left { |
||||
display: inline-flex; |
||||
align-items: center; |
||||
} |
||||
|
||||
.checked-name { |
||||
width: 360px; |
||||
margin-right: 20px; |
||||
} |
||||
|
||||
.action-icon { |
||||
font-size: 14px; |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
|
||||
.materials { |
||||
display: flex; |
||||
gap: 20px; |
||||
} |
||||
|
||||
.types { |
||||
width: 250px; |
||||
height: calc(100vh - 223px); |
||||
padding: 15px; |
||||
background-color: #f9f9f9; |
||||
box-sizing: border-box; |
||||
overflow: auto; |
||||
|
||||
.line { |
||||
margin-bottom: 10px; |
||||
cursor: pointer; |
||||
|
||||
&.active { |
||||
font-weight: 600; |
||||
color: #062c87; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.sources { |
||||
flex: 1; |
||||
padding: 10px; |
||||
|
||||
.line { |
||||
margin-top: 8px; |
||||
} |
||||
} |
||||
} |
||||
</style> |
@ -1,332 +0,0 @@ |
||||
<template> |
||||
<div> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div> |
||||
<div class="flex-center mgb20"> |
||||
<p class="hr_tag"></p> |
||||
<span>筛选</span> |
||||
</div> |
||||
<div> |
||||
<el-form label-width="80px"> |
||||
<el-col :span="4"> |
||||
<el-form-item label="学科类别"> |
||||
<el-select v-model="form.categoryId" clearable @change="getProfessionalClass()" @clear="clearClass()"> |
||||
<el-option v-for="(item, index) in subjectList" :key="index" :label="item.disciplineName" |
||||
:value="item.disciplineId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="专业类"> |
||||
<el-select v-model="form.professionalCategoryId" clearable :disabled="form.categoryId ? false : true" |
||||
@change="getProfessional()" @clear="clearProfess()"> |
||||
<el-option v-for="(item, index) in ProfessionalClassList" :key="index" |
||||
:label="item.professionalClassName" :value="item.professionalClassId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="专业"> |
||||
<el-select v-model="form.professionalId" clearable |
||||
:disabled="form.professionalCategoryId ? false : true" @change="getData()"> |
||||
<el-option v-for="(item, index) in ProfessionalList" :key="index" :label="item.professionalName" |
||||
:value="item.professionalId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="课程类别"> |
||||
<el-select v-model="form.curriculumType" clearable @change="getData()"> |
||||
<el-option v-for="(item, i) in courseTypeStatus" :key="i" :label="item" :value="i"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="6"> |
||||
<el-form-item> |
||||
<el-input placeholder="请输入课程名称" prefix-icon="el-icon-search" v-model="form.curriculumName" clearable |
||||
@keyup.enter.native="onSearch"></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</el-card> |
||||
|
||||
<el-card shadow="hover" class="card"> |
||||
<div class="flex-between mgb20"> |
||||
<div class="flex-center"> |
||||
<p class="hr_tag"></p> |
||||
<span>课程列表</span> |
||||
</div> |
||||
<div> |
||||
<el-button type="primary" round @click="addcourse" v-auth="'/curriculum:新增课程'">新增课程</el-button> |
||||
<el-button type="primary" round @click="delAllSelection" v-auth="'/curriculum:批量删除'">批量删除</el-button> |
||||
</div> |
||||
</div> |
||||
<el-table v-loading="loading" :data="courseData" class="table" ref="table" header-align="center" |
||||
@selection-change="handleSelectionChange" row-key="cid"> |
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
||||
<el-table-column type="index" width="70" label="序号" align="center"></el-table-column> |
||||
<el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column> |
||||
<el-table-column prop="curriculumType" label="课程类别" width="90" align="center"> |
||||
<template slot-scope="scope"> |
||||
<span class="ellipsis">{{ courseTypeStatus[scope.row.curriculumType] }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="配置的系统" align="center"> |
||||
<template slot-scope="scope"> |
||||
<span class="ellipsis">{{ scope.row.sysName }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="expectedCourse" label="预计课时" width="90" align="center"></el-table-column> |
||||
<el-table-column prop="orderVolume" label="订单量" width="90" align="center"></el-table-column> |
||||
<el-table-column prop="userName" label="创建人" width="120" align="center"></el-table-column> |
||||
<el-table-column label="上架/下架" width="90" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-switch v-model="scope.row.isShelves" :active-value="1" :inactive-value="0" |
||||
@change="changeSwitch($event, scope.row)" v-auth="'/curriculum:上下架'"> |
||||
</el-switch> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" width="240" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="text" @click="preview(scope.row)">预览课程</el-button> |
||||
<el-button type="text" @click="edit(scope.row)" v-auth="'/curriculum:编辑'">编辑</el-button> |
||||
<el-button type="text" @click="config(scope.row)" v-auth="'/curriculum:内容设置'">内容设置</el-button> |
||||
<el-button type="text" @click="copy(scope.row)">复制</el-button> |
||||
<el-button type="text" @click="handleDelete(scope.row)" v-auth="'/curriculum:删除'">删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background @current-change="handleCurrentChange" :current-page="page" |
||||
layout="total, prev, pager, next" :total="totals"></el-pagination> |
||||
</div> |
||||
</el-card> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import Setting from '@/setting' |
||||
import qs from 'qs' |
||||
import Util from '@/libs/util' |
||||
export default { |
||||
data () { |
||||
return { |
||||
courseTypeStatus: { |
||||
0: '理论课程', |
||||
1: '实训课程', |
||||
2: '理实课程', |
||||
}, |
||||
name: localStorage.getItem("ms_username"), |
||||
courseData: [], |
||||
form: { |
||||
categoryId: +this.$route.query.categoryId || '', |
||||
professionalCategoryId: +this.$route.query.professionalCategoryId || '', |
||||
professionalId: +this.$route.query.professionalId || '', |
||||
curriculumType: this.$route.query.curriculumType || '', |
||||
curriculumName: this.$route.query.curriculumName || '' |
||||
}, |
||||
page: +this.$route.query.page || 1, |
||||
pageSize: 10, |
||||
totals: 0, |
||||
subjectList: [], // 学科类别 |
||||
ProfessionalClassList: [], // 专业类 |
||||
ProfessionalList: [], // 专业 |
||||
multipleSelection: [], |
||||
loading: false, |
||||
searchTimer: null |
||||
}; |
||||
}, |
||||
watch: { |
||||
"form.curriculumName": function (val) { |
||||
clearTimeout(this.searchTimer); |
||||
this.searchTimer = setTimeout(() => { |
||||
this.initData(); |
||||
}, 500); |
||||
} |
||||
}, |
||||
mounted () { |
||||
this.getSubject(); |
||||
this.getData(); |
||||
}, |
||||
methods: { |
||||
async getData () { |
||||
try { |
||||
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理') |
||||
this.loading = true |
||||
const { page } = await this.$post(this.api.curriculumList, { |
||||
...this.form, |
||||
pageNum: this.page, |
||||
pageSize: this.pageSize, |
||||
supplierId: sid ? sid.supplierId : '', |
||||
platformId: Setting.platformId |
||||
}) |
||||
this.courseData = page.records |
||||
this.totals = page.total |
||||
this.loading = false |
||||
} finally { |
||||
this.loading = false |
||||
} |
||||
}, |
||||
initData () { |
||||
this.page = 1; |
||||
this.getData(); |
||||
}, |
||||
// 获取学科类别 |
||||
async getSubject () { |
||||
const { list } = await this.$get(this.api.courseDiscipline) |
||||
this.subjectList = list |
||||
this.form.professionalCategoryId && this.getProfessionalClassData() |
||||
}, |
||||
// 清除学科类别 |
||||
clearClass () { |
||||
this.form.professionalCategoryId = '' |
||||
this.form.professionalId = '' |
||||
}, |
||||
// 获取专业类 |
||||
getProfessionalClass () { |
||||
this.clearClass(); |
||||
this.getProfessionalClassData(); |
||||
this.page = 1; |
||||
this.getData(); |
||||
}, |
||||
async getProfessionalClassData () { |
||||
const { list } = await this.$get(this.api.courseProfessionalClass, { |
||||
disciplineId: this.form.categoryId |
||||
}) |
||||
this.ProfessionalClassList = list |
||||
this.form.professionalId && this.getProfessionalData() |
||||
}, |
||||
// 清除专业类 |
||||
clearProfess () { |
||||
this.form.professionalId = '' |
||||
}, |
||||
// 获取专业 |
||||
getProfessional () { |
||||
this.clearProfess(); |
||||
this.getProfessionalData(); |
||||
this.page = 1; |
||||
this.getData(); |
||||
}, |
||||
async getProfessionalData () { |
||||
const { list } = await this.$get(this.api.courseProfessional, { |
||||
professionalClassId: this.form.professionalCategoryId |
||||
}) |
||||
this.ProfessionalList = list |
||||
}, |
||||
// 缓存当前页面和参数,详情页返回到列表的时候直接取该url |
||||
setReferrer () { |
||||
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`) |
||||
}, |
||||
// 新建课程 |
||||
addcourse () { |
||||
this.setReferrer() |
||||
this.$router.push("/curriculum/detail"); |
||||
}, |
||||
// 编辑 |
||||
edit (row) { |
||||
this.setReferrer() |
||||
this.$router.push(`/curriculum/detail?cid=${row.cid}`); |
||||
}, |
||||
// 预览 |
||||
preview (row) { |
||||
this.setReferrer() |
||||
this.$router.push(`/station?courseId=${row.cid || ''}&curriculumName=${encodeURIComponent(row.curriculumName)}&mallId=${row.mallId || ''}`) |
||||
}, |
||||
// 内容设置 |
||||
config (row) { |
||||
this.setReferrer() |
||||
this.$router.push(`/curriculum/content?cid=${row.cid}&name=${row.curriculumName}`); |
||||
}, |
||||
// 复制 |
||||
async copy (row) { |
||||
this.$confirm('确定要复制吗', "提示", { |
||||
type: "warning" |
||||
}).then(async () => { |
||||
await this.$post(`${this.api.copySelfBuildCourse}?cid=${row.cid}`) |
||||
Util.successMsg('复制成功') |
||||
this.initData() |
||||
}).catch(() => { }) |
||||
|
||||
return |
||||
this.$router.push(`/curriculum/detail?cid=${row.cid}©=1`) |
||||
}, |
||||
// 删除 |
||||
handleDelete (row) { |
||||
this.$post(`${this.api.deleteCoursePrompt}?cids=${row.cid}`).then(({ status }) => { |
||||
if (status === 200) { |
||||
this.$confirm("确定要删除吗?", "提示", { |
||||
type: "warning" |
||||
}).then(() => { |
||||
this.$post(`${this.api.delCourse}?cids=${row.cid}`).then(res => { |
||||
this.getData(); |
||||
this.$message.success("删除成功"); |
||||
}).catch(err => { }) |
||||
}).catch(() => { |
||||
}); |
||||
} |
||||
}).catch(err => { }) |
||||
}, |
||||
// 处理多选 |
||||
handleSelectionChange (val) { |
||||
this.multipleSelection = val; |
||||
}, |
||||
// 批量删除 |
||||
delAllSelection () { |
||||
if (this.multipleSelection.length) { |
||||
let cids = [] |
||||
this.multipleSelection.forEach(i => { |
||||
cids.push('cids=' + i.cid) |
||||
}); |
||||
this.$post(`${this.api.deleteCoursePrompt}?${cids.join('&')}`).then(({ status }) => { |
||||
if (status === 200) { |
||||
this.$confirm("确定要删除吗?", "提示", { |
||||
type: "warning" |
||||
}).then(() => { |
||||
let ids = this.multipleSelection.map(i => i.cid); |
||||
this.$post(`${this.api.delCourse}?cids=${ids.toString()}`).then(res => { |
||||
if (ids.length == this.courseData.length) { |
||||
if (this.page > 1) { |
||||
this.page = this.page - 1 |
||||
} |
||||
} |
||||
this.getData(); |
||||
this.$message.success("删除成功"); |
||||
this.$refs.table.clearSelection() |
||||
}).catch(err => { }) |
||||
}).catch(() => { }) |
||||
} |
||||
}).catch(err => { }) |
||||
} else { |
||||
this.$message.warning("请先选择课程 !"); |
||||
} |
||||
}, |
||||
// 处理页码切换 |
||||
handleCurrentChange (val) { |
||||
this.page = val; |
||||
this.$router.push(`/curriculum?page=${val}`) |
||||
this.getData(); |
||||
}, |
||||
// 课程名称条件搜索 |
||||
onSearch () { |
||||
this.page = 1; |
||||
this.getData(); |
||||
}, |
||||
// 上下架 |
||||
changeSwitch (value, row) { |
||||
this.$post(`${this.api.isShelves}?cid=${row.cid}&isShelves=${value}`).then((res) => { |
||||
this.getData(); |
||||
this.$message.success("修改上下架状态成功!"); |
||||
}).catch((res) => { |
||||
}); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.card { |
||||
min-height: calc(100vh - 300px); |
||||
} |
||||
</style> |
@ -1,176 +1,157 @@ |
||||
<template> |
||||
<div> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="flex-between"> |
||||
<div class="per_title" v-preventReClick @click="back"> |
||||
<i class="el-icon-arrow-left"></i> |
||||
<span class="per_back">返回</span> |
||||
<span class="per_school">{{ $route.query.userName }}的订单</span> |
||||
</div> |
||||
</div> |
||||
</el-card> |
||||
<div> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="flex-between"> |
||||
<div class="per_title" v-preventReClick @click="back"> |
||||
<i class="el-icon-arrow-left"></i> |
||||
<span class="per_back">返回</span> |
||||
<span class="per_school">{{ $route.query.userName }}的订单</span> |
||||
</div> |
||||
</div> |
||||
</el-card> |
||||
|
||||
<el-card shadow="hover" class="card"> |
||||
<div class="flex-between mgb20"> |
||||
<div class="flex-center"> |
||||
<p class="hr_tag"></p> |
||||
<span>订单列表</span> |
||||
</div> |
||||
<el-input style="width: 300px" placeholder="请输入订单编号/产品名称" prefix-icon="el-icon-search" v-model="keyword" |
||||
clearable></el-input> |
||||
</div> |
||||
<el-table :data="orderData" class="table" ref="table" header-align="center" |
||||
@selection-change="handleSelectionChange" :row-key="getRowKeys"> |
||||
<el-table-column type="index" width="100" label="序号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="orderNumber" label="订单编号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="customerName" label="客户名称" align="center"> |
||||
<template slot-scope="scope"> |
||||
{{ customerName }} |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="productName" label="产品内容" align="center" show-overflow-tooltip></el-table-column> |
||||
<el-table-column prop="orderAmount" label="订单金额(元)" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="createTime" label="订单日期" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="orderType" label="订单类型" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="orderStatus" label="订单状态" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="orderNature" label="订单性质" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="操作" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="text" @click="toDetail(scope.row)">查看</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChange" |
||||
:current-page="page" :total="totals"> |
||||
</el-pagination> |
||||
</div> |
||||
</el-card> |
||||
</div> |
||||
<el-card shadow="hover" class="card"> |
||||
<div class="flex-between mgb20"> |
||||
<div class="flex-center"> |
||||
<p class="hr_tag"></p> |
||||
<span>订单列表</span> |
||||
</div> |
||||
<el-input style="width: 300px" placeholder="请输入订单编号/产品名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> |
||||
</div> |
||||
<el-table :data="orderData" class="table" ref="table" stripe header-align="center" |
||||
@selection-change="handleSelectionChange" :row-key="getRowKeys"> |
||||
<el-table-column type="index" width="100" label="序号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="orderNumber" label="订单编号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="customerName" label="客户名称" align="center"> |
||||
<template slot-scope="scope"> |
||||
{{ customerName }} |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="productName" label="产品内容" align="center" show-overflow-tooltip></el-table-column> |
||||
<el-table-column prop="orderAmount" label="订单金额(元)" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="createTime" label="订单日期" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="orderType" label="订单类型" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="orderStatus" label="订单状态" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="orderNature" label="订单性质" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="操作" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="text" @click="toDetail(scope.row)">查看</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background layout="total, prev, pager, next" |
||||
@current-change="handleCurrentChange" :current-page="page" :total="totals"> |
||||
</el-pagination> |
||||
</div> |
||||
</el-card> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data () { |
||||
return { |
||||
businessManagerId: this.$route.query.businessManagerId, |
||||
teamId: this.$route.query.teamId, |
||||
customerId: this.$route.query.customerId, |
||||
customerName: this.$route.query.customerName, |
||||
keyword: "", |
||||
orderData: [], |
||||
page: 1, |
||||
pageSize: 10, |
||||
totals: 0, |
||||
searchTimer: null |
||||
}; |
||||
}, |
||||
watch: { |
||||
keyword: function (val) { |
||||
clearTimeout(this.searchTimer); |
||||
this.searchTimer = setTimeout(() => { |
||||
this.initData(); |
||||
}, 500); |
||||
} |
||||
}, |
||||
created () { |
||||
const { orderParam } = this.$store.state |
||||
if (orderParam) { |
||||
this.keyword = orderParam.keyword |
||||
this.page = orderParam.page |
||||
|
||||
this.$store.commit('setOrderParam', null) |
||||
} |
||||
this.getData(); |
||||
}, |
||||
methods: { |
||||
getData () { |
||||
let data = { |
||||
businessManagerId: this.businessManagerId, |
||||
teamId: this.teamId, |
||||
keywords: this.keyword, |
||||
customerId: this.customerId, |
||||
pageNum: this.page, |
||||
pageSize: this.pageSize, |
||||
}; |
||||
this.$post(this.api.getBusinessManagerOrder, data).then(({ data }) => { |
||||
const { records } = data |
||||
records.forEach(e => { |
||||
e.orderType = this.orderTypeFn(e.orderType); |
||||
e.orderStatus = this.orderStatusFn(e.orderStatus); |
||||
e.orderNature = this.orderNatureFn(e.orderNature); |
||||
}); |
||||
this.orderData = records |
||||
this.totals = data.total |
||||
}).catch(res => { }) |
||||
data() { |
||||
return { |
||||
businessManagerId: this.$route.query.businessManagerId, |
||||
teamId: this.$route.query.teamId, |
||||
customerId: this.$route.query.customerId, |
||||
customerName: this.$route.query.customerName, |
||||
keyword: "", |
||||
orderData: [], |
||||
page: 1, |
||||
pageSize: 10, |
||||
totals: 0, |
||||
searchTimer: null |
||||
}; |
||||
}, |
||||
initData () { |
||||
this.page = 1 |
||||
this.getData() |
||||
watch: { |
||||
keyword: function(val) { |
||||
clearTimeout(this.searchTimer); |
||||
this.searchTimer = setTimeout(() => { |
||||
this.initData(); |
||||
}, 500); |
||||
} |
||||
}, |
||||
handleCurrentChange (val) { |
||||
this.page = val |
||||
this.getData() |
||||
created() { |
||||
this.getData(); |
||||
}, |
||||
toDetail (row) { |
||||
this.$store.commit('setOrderParam', { |
||||
keyword: this.keyword, |
||||
page: this.page, |
||||
}) |
||||
this.$router.push({ |
||||
path: '/AddOrder', |
||||
query: { |
||||
val: 'watch', |
||||
orderId: row.orderId, |
||||
orderStatus: row.orderStatus === '已完成' ? 1 : 0, |
||||
methods: { |
||||
getData() { |
||||
let data = { |
||||
businessManagerId: this.businessManagerId, |
||||
teamId: this.teamId, |
||||
keywords: this.keyword, |
||||
customerId: this.customerId, |
||||
pageNum: this.page, |
||||
pageSize: this.pageSize, |
||||
}; |
||||
this.$post(this.api.getBusinessManagerOrder, data).then(({ data }) => { |
||||
const { records } = data |
||||
records.forEach(e => { |
||||
e.orderType = this.orderTypeFn(e.orderType); |
||||
e.orderStatus = this.orderStatusFn(e.orderStatus); |
||||
e.orderNature = this.orderNatureFn(e.orderNature); |
||||
}); |
||||
this.orderData = records |
||||
this.totals = data.total |
||||
}).catch(res => {}) |
||||
}, |
||||
initData() { |
||||
this.page = 1 |
||||
this.getData() |
||||
}, |
||||
toDetail(row) { |
||||
this.$router.push({ |
||||
path:'/AddOrder', |
||||
query:{ |
||||
val: 'watch', |
||||
orderId: row.orderId, |
||||
orderStatus: row.orderStatus === '已完成' ? 1 : 0 |
||||
} |
||||
}) |
||||
}, |
||||
back() { |
||||
this.$router.back() |
||||
} |
||||
}) |
||||
}, |
||||
back () { |
||||
this.$router.back() |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.card { |
||||
min-height: calc(100vh - 300px); |
||||
min-height: calc(100vh - 300px); |
||||
} |
||||
|
||||
.mag { |
||||
margin-right: 20px; |
||||
margin-right: 20px; |
||||
} |
||||
|
||||
.cell { |
||||
white-space: pre-wrap; |
||||
width: 140px; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
-webkit-line-clamp: 2; |
||||
line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
||||
.cell{ |
||||
white-space:pre-wrap; |
||||
width: 140px; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
-webkit-line-clamp: 2; |
||||
line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
||||
} |
||||
|
||||
.tags { |
||||
border: none; |
||||
background: none; |
||||
color: #000; |
||||
white-space: pre-wrap; |
||||
width: 140px; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
-webkit-line-clamp: 2; |
||||
line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
||||
.tags{ |
||||
border: none; |
||||
background: none;color: #000; |
||||
white-space:pre-wrap; |
||||
width: 140px; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
-webkit-line-clamp: 2; |
||||
line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
||||
} |
||||
</style> |
||||
|
||||
|
@ -1,248 +1,244 @@ |
||||
<template> |
||||
<div> |
||||
<el-row :gutter="20"> |
||||
<el-col :span="24"> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="per_title" v-preventReClick @click="goback()"> |
||||
<i class="el-icon-arrow-left"></i> |
||||
<span class="per_back">返回</span> |
||||
<span class="per_school">{{ customerName }}</span> |
||||
</div> |
||||
</el-card> |
||||
<div> |
||||
<el-row :gutter="20"> |
||||
<el-col :span="24"> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="per_title" v-preventReClick @click="goback()"> |
||||
<i class="el-icon-arrow-left"></i> |
||||
<span class="per_back">返回</span> |
||||
<span class="per_school">{{customerName}}</span> |
||||
</div> |
||||
</el-card> |
||||
|
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="flex-center mgb20 user_header"> |
||||
<p class="addhr_tag"></p> |
||||
<span>代理配置</span> |
||||
</div> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="flex-center mgb20 user_header"> |
||||
<p class="addhr_tag"></p> |
||||
<span>代理配置</span> |
||||
</div> |
||||
|
||||
<div class="flex-between"> |
||||
<span>内网地址配置</span> |
||||
<div class="border_lf flex-column"> |
||||
<p class="marb30">平台服务</p> |
||||
<div class="flex-center"> |
||||
<label>IP</label> |
||||
<el-input placeholder="请输入IP地址" class="mar_input"></el-input> |
||||
<label>端口</label> |
||||
<el-input placeholder="请输入端口号"></el-input> |
||||
</div> |
||||
</div> |
||||
<div class="border_lf pad_none flex-column"> |
||||
<p class="marb30">流媒体服务</p> |
||||
<div class="flex-center"> |
||||
<label>IP</label> |
||||
<el-input placeholder="请输入IP地址" class="mar_input"></el-input> |
||||
<label>端口</label> |
||||
<el-input placeholder="请输入端口号"></el-input> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</el-card> |
||||
<div class="flex-between"> |
||||
<span>内网地址配置</span> |
||||
<div class="border_lf flex-column"> |
||||
<p class="marb30">平台服务</p> |
||||
<div class="flex-center"> |
||||
<label>IP</label> |
||||
<el-input placeholder="请输入IP地址" class="mar_input"></el-input> |
||||
<label>端口</label> |
||||
<el-input placeholder="请输入端口号"></el-input> |
||||
</div> |
||||
</div> |
||||
<div class="border_lf pad_none flex-column"> |
||||
<p class="marb30">流媒体服务</p> |
||||
<div class="flex-center"> |
||||
<label>IP</label> |
||||
<el-input placeholder="请输入IP地址" class="mar_input"></el-input> |
||||
<label>端口</label> |
||||
<el-input placeholder="请输入端口号"></el-input> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</el-card> |
||||
|
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="flex-center mgb20"> |
||||
<p class="addhr_tag"></p> |
||||
<span>应用列表</span> |
||||
</div> |
||||
<el-table :data="permissionData" class="table" :span-method="SpanMethod" header-align="center"> |
||||
<el-table-column prop="id" label="序号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="age" label="应用名称" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="storeName" label="使用期限" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="total" label="启用时间" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="payamount" label="结束时间" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="payamount" label="剩余时间" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="IP" align="center"> |
||||
<template slot-scope="scope"> |
||||
<div class="tab_temp" v-if="scope.row.Intranet != ''"> |
||||
<div class="flex-center"> |
||||
<label>内网:</label> |
||||
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input> |
||||
</div> |
||||
<div class="flex-center mar10"> |
||||
<label>外网:</label> |
||||
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="端口" align="center"> |
||||
<template slot-scope="scope"> |
||||
<div class="tab_temp" v-if="scope.row.Intranet != ''"> |
||||
<div class="flex-center"> |
||||
<label>内网:</label> |
||||
<el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input> |
||||
</div> |
||||
<div class="flex-center mar10"> |
||||
<label>外网:</label> |
||||
<el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input> |
||||
</div> |
||||
</div> |
||||
<div v-else> |
||||
<el-button type="plain" @click="chooseIp">选择IP与端口</el-button> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-switch v-model="scope.row.swtich" active-text="开启" inactive-text="关闭" |
||||
@change="changeSwitch(scope.row)"> |
||||
</el-switch> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background layout="total, prev, pager, next" :total="totals"> |
||||
</el-pagination> |
||||
</div> |
||||
</el-card> |
||||
</el-col> |
||||
</el-row> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div class="flex-center mgb20"> |
||||
<p class="addhr_tag"></p> |
||||
<span>应用列表</span> |
||||
</div> |
||||
<el-table :data="permissionData" class="table" stripe :span-method="SpanMethod" header-align="center"> |
||||
<el-table-column prop="id" label="序号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="age" label="应用名称" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="storeName" label="使用期限" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="total" label="启用时间" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="payamount" label="结束时间" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="payamount" label="剩余时间" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="IP" align="center"> |
||||
<template slot-scope="scope"> |
||||
<div class="tab_temp" v-if="scope.row.Intranet != ''"> |
||||
<div class="flex-center"> |
||||
<label>内网:</label> |
||||
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input> |
||||
</div> |
||||
<div class="flex-center mar10"> |
||||
<label>外网:</label> |
||||
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="端口" align="center"> |
||||
<template slot-scope="scope"> |
||||
<div class="tab_temp" v-if="scope.row.Intranet != ''"> |
||||
<div class="flex-center"> |
||||
<label>内网:</label> |
||||
<el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input> |
||||
</div> |
||||
<div class="flex-center mar10"> |
||||
<label>外网:</label> |
||||
<el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input> |
||||
</div> |
||||
</div> |
||||
<div v-else> |
||||
<el-button type="plain" @click="chooseIp">选择IP与端口</el-button> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-switch |
||||
v-model="scope.row.swtich" |
||||
active-text="开启" |
||||
inactive-text="关闭" |
||||
@change="changeSwitch(scope.row)"> |
||||
</el-switch> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background layout="total, prev, pager, next" :total="totals"> |
||||
</el-pagination> |
||||
</div> |
||||
</el-card> |
||||
</el-col> |
||||
</el-row> |
||||
|
||||
<!-- 选择IP --> |
||||
<el-dialog :visible.sync="ipVisible" width="70%" center> |
||||
<div class="flex-center mgb20"> |
||||
<p class="hr_tag"></p> |
||||
<span>客户列表</span> |
||||
</div> |
||||
<el-table :data="permissionData" class="table" header-align="center"> |
||||
<el-table-column type="index" width="100" label="序号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="age" label="服务器名称" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="IP" align="center"> |
||||
<template slot-scope="scope"> |
||||
<div class="tab_temp"> |
||||
<div class="flex-center"> |
||||
<label>内网:</label> |
||||
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input> |
||||
</div> |
||||
<div class="flex-center mar10"> |
||||
<label>外网:</label> |
||||
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="端口" align="center"> |
||||
<template slot-scope="scope"> |
||||
<div class="tab_temp"> |
||||
<div class="flex-center"> |
||||
<label>内网:</label> |
||||
<el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input> |
||||
</div> |
||||
<div class="flex-center mar10"> |
||||
<label>外网:</label> |
||||
<el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input> |
||||
</div> |
||||
<!-- 选择IP --> |
||||
<el-dialog :visible.sync="ipVisible" width="70%" center> |
||||
<div class="flex-center mgb20"> |
||||
<p class="hr_tag"></p> |
||||
<span>客户列表</span> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="选择" align="center"> |
||||
<template slot-scope="scope"> |
||||
<i class="el-icon-success radio_icon"></i> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="teacherVisible = false">取 消</el-button> |
||||
<el-button type="primary" @click="editSure('teacherForm')">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
</div> |
||||
<el-table :data="permissionData" class="table" stripe header-align="center"> |
||||
<el-table-column type="index" width="100" label="序号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="age" label="服务器名称" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="IP" align="center"> |
||||
<template slot-scope="scope"> |
||||
<div class="tab_temp"> |
||||
<div class="flex-center"> |
||||
<label>内网:</label> |
||||
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input> |
||||
</div> |
||||
<div class="flex-center mar10"> |
||||
<label>外网:</label> |
||||
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="端口" align="center"> |
||||
<template slot-scope="scope"> |
||||
<div class="tab_temp"> |
||||
<div class="flex-center"> |
||||
<label>内网:</label> |
||||
<el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input> |
||||
</div> |
||||
<div class="flex-center mar10"> |
||||
<label>外网:</label> |
||||
<el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="选择" align="center"> |
||||
<template slot-scope="scope"> |
||||
<i class="el-icon-success radio_icon"></i> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="teacherVisible = false">取 消</el-button> |
||||
<el-button type="primary" @click="editSure('teacherForm')">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data () { |
||||
return { |
||||
customerName: this.$route.query.name, |
||||
permissionData: [{ |
||||
id: 1, |
||||
age: '小额贷系统', |
||||
storeName: '1个月', |
||||
total: '2019.01.02 11:00', |
||||
payamount: '2019.01.02 11:00', |
||||
payamount: '700d12h1min', |
||||
swtich: true, |
||||
Intranet: '10.20.202.1', |
||||
extranet: '10.20.202.1' |
||||
}, |
||||
{ |
||||
id: 2, |
||||
age: '小额贷系统', |
||||
storeName: '1个月', |
||||
total: '2019.01.02 11:00', |
||||
payamount: '2019.01.02 11:00', |
||||
payamount: '700d12h1min', |
||||
swtich: true, |
||||
Intranet: '', |
||||
extranet: '' |
||||
}], |
||||
totals: 1, |
||||
ipVisible: false |
||||
} |
||||
}, |
||||
methods: { |
||||
SpanMethod ({ row, column, rowIndex, columnIndex }) { |
||||
if (rowIndex % 2 === 0) { |
||||
if (columnIndex === 6) { |
||||
if (!row.Intranet) { |
||||
return [1, 2]; |
||||
} |
||||
export default { |
||||
data (){ |
||||
return { |
||||
customerName: this.$route.query.name, |
||||
permissionData: [{ |
||||
id: 1, |
||||
age: '小额贷系统', |
||||
storeName: '1个月', |
||||
total: '2019.01.02 11:00', |
||||
payamount: '2019.01.02 11:00', |
||||
payamount: '700d12h1min', |
||||
swtich: true, |
||||
Intranet: '10.20.202.1', |
||||
extranet: '10.20.202.1' |
||||
}, |
||||
{ |
||||
id: 2, |
||||
age: '小额贷系统', |
||||
storeName: '1个月', |
||||
total: '2019.01.02 11:00', |
||||
payamount: '2019.01.02 11:00', |
||||
payamount: '700d12h1min', |
||||
swtich: true, |
||||
Intranet: '', |
||||
extranet: '' |
||||
}], |
||||
totals: 1, |
||||
ipVisible: false |
||||
} |
||||
}, |
||||
methods: { |
||||
SpanMethod({ row, column, rowIndex, columnIndex }) { |
||||
if (rowIndex % 2 === 0) { |
||||
if (columnIndex === 6) { |
||||
if(!row.Intranet){ |
||||
return [1, 2]; |
||||
} |
||||
} |
||||
// else if (columnIndex === 1) { |
||||
// return [0, 0]; |
||||
// } |
||||
} |
||||
}, |
||||
chooseIp(){ |
||||
this.ipVisible = true |
||||
}, |
||||
goback(){ |
||||
this.$router.go(-1) |
||||
} |
||||
} |
||||
// else if (columnIndex === 1) { |
||||
// return [0, 0]; |
||||
// } |
||||
} |
||||
}, |
||||
chooseIp () { |
||||
this.ipVisible = true |
||||
}, |
||||
goback () { |
||||
this.$router.go(-1) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.border_lf { |
||||
border-left: 1px dashed #eee; |
||||
padding: 0 60px; |
||||
.border_lf{ |
||||
border-left: 1px dashed #eee; |
||||
padding: 0 60px; |
||||
} |
||||
|
||||
.border_lf label { |
||||
width: 120px; |
||||
.border_lf label{ |
||||
width: 120px; |
||||
} |
||||
|
||||
.pad_none { |
||||
padding: 0 0 0 60px; |
||||
.pad_none{ |
||||
padding: 0 0 0 60px; |
||||
} |
||||
|
||||
.mar_input { |
||||
margin-right: 80px; |
||||
.mar_input{ |
||||
margin-right: 80px; |
||||
} |
||||
|
||||
.marb30 { |
||||
margin-bottom: 30px; |
||||
.marb30{ |
||||
margin-bottom: 30px; |
||||
} |
||||
|
||||
.tab_temp label { |
||||
width: 60px; |
||||
.tab_temp label{ |
||||
width: 60px; |
||||
} |
||||
|
||||
.mar10 { |
||||
margin-top: 10px; |
||||
.mar10{ |
||||
margin-top: 10px; |
||||
} |
||||
|
||||
.radio_icon { |
||||
font-size: 26px; |
||||
color: #9278FF; |
||||
.radio_icon{ |
||||
font-size: 26px; |
||||
color: #9278FF; |
||||
} |
||||
</style> |
@ -1,340 +1,269 @@ |
||||
<template> |
||||
<div v-loading="loading"> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div> |
||||
<div class="flex-center mgb20"> |
||||
<p class="hr_tag"></p> |
||||
<span>筛选</span> |
||||
</div> |
||||
<div> |
||||
<el-form label-width="80px"> |
||||
<el-col :span="4"> |
||||
<el-form-item label="省份"> |
||||
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity" |
||||
@clear="clearprovince"> |
||||
<el-option v-for="(item, index) in provinceList" :key="index" :label="item.provinceName" |
||||
:value="item.provinceId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="城市"> |
||||
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true" |
||||
@change="initData"> |
||||
<el-option v-for="(item, index) in cityList" :key="index" :label="item.cityName" |
||||
:value="item.cityId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="客户类型"> |
||||
<el-select v-model="form.customerType" placeholder="请选择客户类型" @change="initData"> |
||||
<el-option v-for="(item, index) in customerTypeList" :key="index" :label="item.name" |
||||
:value="item.value"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="6"> |
||||
<el-form-item> |
||||
<el-input placeholder="支持客户,联系人,账号搜索" prefix-icon="el-icon-search" v-model="form.keyword" |
||||
clearable></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</el-card> |
||||
<div> |
||||
<el-card shadow="hover" class="mgb20"> |
||||
<div> |
||||
<div class="flex-center mgb20"> |
||||
<p class="hr_tag"></p> |
||||
<span>筛选</span> |
||||
</div> |
||||
<div> |
||||
<el-form label-width="80px"> |
||||
<el-col :span="4"> |
||||
<el-form-item label="国家"> |
||||
<el-select v-model="form.countries" placeholder="请选择国家"> |
||||
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="省份"> |
||||
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity" @clear="clearprovince"> |
||||
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="4"> |
||||
<el-form-item label="城市"> |
||||
<el-select v-model="form.city" clearable placeholder="请选择城市" :disabled="form.provinces ? false : true" @change="initData"> |
||||
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="6"> |
||||
<el-form-item> |
||||
<el-input placeholder="支持客户,联系人,账号搜索" prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</el-card> |
||||
|
||||
<el-card shadow="hover" class="card"> |
||||
<div class="flex-between mgb20"> |
||||
<div class="flex-center"> |
||||
<p class="hr_tag"></p> |
||||
<span>客户列表</span> |
||||
</div> |
||||
<div> |
||||
<el-button type="primary" round class="mag" @click="exportData">导出客户列表</el-button> |
||||
<el-button type="primary" round class="mag" @click="addcustomer" v-auth>新增</el-button> |
||||
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> |
||||
</div> |
||||
</div> |
||||
<el-table :data="listData" class="table" ref="table" header-align="center" |
||||
@selection-change="handleSelectionChange" row-key="customerId"> |
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
||||
<el-table-column type="index" width="100" label="序号" align="center"> |
||||
<template slot-scope="scope"> |
||||
{{ scope.$index + (page - 1) * pageSize + 1 }} |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="customerName" label="客户名称" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="行业" align="center"> |
||||
<template slot-scope="scope"> |
||||
<span class="ellipsis">{{ scope.row.industryName }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="countries" label="客户类型" align="center"> |
||||
<template slot-scope="scope"> |
||||
<span v-if="scope.row.customerType">{{ customerTypeList.find(e => e.value == scope.row.customerType).name |
||||
}}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="provinceName" label="省份" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="cityName" label="城市" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="name" label="联系人" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="account" label="账号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="loginNumber" label="登录次数" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="操作" width="270" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="text" @click="resetPassword(scope.row)" v-auth>重置密码</el-button> |
||||
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> |
||||
<el-button type="text" @click="edit(scope.row)" v-auth>管理</el-button> |
||||
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" |
||||
:current-page="page"> |
||||
</el-pagination> |
||||
</div> |
||||
</el-card> |
||||
</div> |
||||
<el-card shadow="hover" class="card"> |
||||
<div class="flex-between mgb20"> |
||||
<div class="flex-center"> |
||||
<p class="hr_tag"></p> |
||||
<span>客户列表</span> |
||||
</div> |
||||
<div> |
||||
<el-button type="primary" round class="mag" @click="addcustomer" v-auth>新增</el-button> |
||||
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> |
||||
</div> |
||||
</div> |
||||
<el-table v-loading="loading" :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="customerId"> |
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
||||
<el-table-column type="index" width="100" label="序号" align="center"> |
||||
<template slot-scope="scope"> |
||||
{{scope.$index + (page - 1) * pageSize + 1}} |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="customerName" label="客户名称" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="行业" align="center"> |
||||
<template slot-scope="scope"> |
||||
<span class="ellipsis">{{scope.row.industryName}}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="countries" label="国家" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="provinceName" label="省份" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="cityName" label="城市" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="name" label="联系人" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="account" label="账号" align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="loginNumber" label="登录次数" align="center"> |
||||
</el-table-column> |
||||
<el-table-column label="操作" width="270" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="text" @click="resetPassword(scope.row)" v-auth>重置密码</el-button> |
||||
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> |
||||
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button> |
||||
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page"> |
||||
</el-pagination> |
||||
</div> |
||||
</el-card> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import Setting from '@/setting' |
||||
import axios from 'axios'; |
||||
import util from "@/libs/util"; |
||||
import qs from 'qs' |
||||
export default { |
||||
name: 'customer', |
||||
data () { |
||||
return { |
||||
loading: false, |
||||
searchTimer: null, |
||||
countryList: [{ |
||||
name: '中国' |
||||
}], |
||||
customerTypeList: [ |
||||
{ |
||||
value: '', |
||||
name: '不限' |
||||
}, |
||||
{ |
||||
name: '正式', |
||||
value: 1 |
||||
}, |
||||
{ |
||||
name: '试用', |
||||
value: 2 |
||||
}, |
||||
{ |
||||
name: '到期', |
||||
value: 3 |
||||
}], |
||||
listData: [], |
||||
form: { |
||||
customerType: +this.$route.query.customerType || '', |
||||
provinces: +this.$route.query.provinces || '', |
||||
city: +this.$route.query.city || '', |
||||
keyword: this.$route.query.keyword || '' |
||||
}, |
||||
multipleSelection: [], |
||||
provinceList: [], |
||||
cityList: [], |
||||
page: +this.$route.query.page || 1, |
||||
pageSize: 10, |
||||
total: 0, |
||||
ruleIds: [] |
||||
}; |
||||
}, |
||||
watch: { |
||||
'form.keyword': function (val) { |
||||
clearTimeout(this.searchTimer) |
||||
this.searchTimer = setTimeout(() => { |
||||
this.initData() |
||||
}, 500) |
||||
}, |
||||
}, |
||||
mounted () { |
||||
const { query } = this.$route |
||||
if (query.page) { |
||||
this.$router.push('/customer').catch(() => { }) |
||||
} |
||||
|
||||
this.getData() |
||||
this.getProvince() |
||||
}, |
||||
methods: { |
||||
getData () { |
||||
const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理') |
||||
this.loading = true |
||||
this.$post(this.api.queryCustomer, { |
||||
provinceId: this.form.provinces, |
||||
cityId: this.form.city, |
||||
customerType: this.form.customerType, |
||||
searchContent: this.form.keyword, |
||||
page: this.page, |
||||
size: this.pageSize, |
||||
supplierId: (sid && !sid.all) ? sid.supplierId : '' |
||||
}).then(res => { |
||||
this.listData = res.message.list |
||||
this.total = res.message.totalCount |
||||
this.loading = false |
||||
}).catch(res => { |
||||
this.loading = false |
||||
}) |
||||
}, |
||||
initData () { |
||||
this.page = 1 |
||||
this.getData() |
||||
}, |
||||
getProvince () { |
||||
this.$get(this.api.queryProvince).then(res => { |
||||
this.provinceList = res.list |
||||
this.$store.commit("provinceData", { provinceList: this.provinceList }) |
||||
this.form.city && this.getCityData() |
||||
}).catch(res => { }) |
||||
}, |
||||
clearprovince () { |
||||
this.form.city = '' |
||||
}, |
||||
getCity () { |
||||
this.clearprovince() |
||||
this.getCityData() |
||||
this.page = 1 |
||||
this.initData() |
||||
name: 'customer', |
||||
data() { |
||||
return { |
||||
loading:false, |
||||
searchTimer: null, |
||||
countryList: [{ |
||||
name:'中国' |
||||
}], |
||||
listData: [], |
||||
form: { |
||||
countries:'中国', |
||||
provinces: '', |
||||
city: '', |
||||
keyword: '' |
||||
}, |
||||
multipleSelection: [], |
||||
provinceList: [], |
||||
cityList: [], |
||||
page: +this.$route.query.page || 1, |
||||
pageSize: 10, |
||||
total: 0, |
||||
ruleIds: [] |
||||
}; |
||||
}, |
||||
getCityData () { |
||||
let data = { |
||||
provinceId: this.form.provinces |
||||
} |
||||
this.$get(this.api.queryCity, data).then(res => { |
||||
this.cityList = res.list |
||||
}).catch(res => { }) |
||||
}, |
||||
permission (row) { |
||||
this.$router.push(`/permission?name=${row.customerName}`) |
||||
}, |
||||
// 导出 |
||||
async exportData () { |
||||
let sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理') |
||||
sid = (sid && !sid.all) ? sid.supplierId : '' |
||||
let list = this.multipleSelection |
||||
// 没勾选,则查询所有成绩 |
||||
if (!list.length) { |
||||
const res = await this.$post(this.api.queryCustomer, { |
||||
page: 1, |
||||
size: 1000, |
||||
supplierId: sid |
||||
}) |
||||
list = res.message.list |
||||
} |
||||
const ids = list.map(e => e.customerId) |
||||
axios.post(this.api.exportClient, { |
||||
exportCustomerIds: ids, |
||||
supplierId: sid |
||||
}, { |
||||
headers: { |
||||
token: this.token |
||||
watch: { |
||||
'form.keyword': function(val) { |
||||
clearTimeout(this.searchTimer) |
||||
this.searchTimer = setTimeout(() => { |
||||
this.initData() |
||||
},500) |
||||
}, |
||||
responseType: 'blob' |
||||
}).then((res) => { |
||||
util.downloadFileDirect(`客户列表.xlsx`, new Blob([res.data])) |
||||
}).catch(res => { }) |
||||
}, |
||||
// 缓存当前页面和参数,详情页返回到列表的时候直接取该url |
||||
setReferrer () { |
||||
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`) |
||||
}, |
||||
addcustomer () { |
||||
this.setReferrer() |
||||
this.$router.push('addcustomer') |
||||
}, |
||||
edit (row) { |
||||
this.setReferrer() |
||||
this.$router.push(`addcustomer?id=${row.customerId}`) |
||||
}, |
||||
show (row) { |
||||
this.setReferrer() |
||||
this.$router.push(`addcustomer?id=${row.customerId}&show=true`) |
||||
mounted() { |
||||
this.getData() |
||||
this.getProvince() |
||||
}, |
||||
handleDelete (row) { |
||||
this.$confirm('确定要删除吗?', '提示', { |
||||
type: 'warning' |
||||
}).then(() => { |
||||
this.$post(this.api.delCustomers, [row.customerId]).then(res => { |
||||
this.$message.success('删除成功') |
||||
if (this.listData.length == 2) { |
||||
|
||||
} else { |
||||
if (this.page > 1) { |
||||
this.page = this.page - 1 |
||||
methods: { |
||||
getData() { |
||||
const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理') |
||||
this.loading = true |
||||
this.$post(this.api.queryCustomer,{ |
||||
countries: this.form.countries, |
||||
provinceId: this.form.provinces, |
||||
cityId: this.form.city, |
||||
searchContent: this.form.keyword, |
||||
page: this.page, |
||||
size: this.pageSize, |
||||
supplierId: (sid && !sid.all) ? sid.supplierId : '' |
||||
}).then(res => { |
||||
this.listData = res.message.list |
||||
this.total = res.message.totalCount |
||||
this.loading = false |
||||
}).catch(res => { |
||||
this.loading = false |
||||
}) |
||||
}, |
||||
initData(){ |
||||
this.page = 1 |
||||
this.getData() |
||||
}, |
||||
getProvince(){ |
||||
this.$get(this.api.queryProvince).then(res => { |
||||
this.provinceList = res.list |
||||
this.$store.commit("provinceData", { provinceList : this.provinceList}) |
||||
}).catch(res => {}) |
||||
}, |
||||
clearprovince(){ |
||||
this.form.city = '' |
||||
}, |
||||
getCity(){ |
||||
this.clearprovince() |
||||
this.getCityData() |
||||
this.page = 1 |
||||
this.initData() |
||||
}, |
||||
getCityData(){ |
||||
let data = { |
||||
provinceId: this.form.provinces |
||||
} |
||||
} |
||||
this.getData() |
||||
}).catch(res => { }) |
||||
}).catch(() => { }) |
||||
}, |
||||
handleSelectionChange (val) { |
||||
this.multipleSelection = val |
||||
}, |
||||
delAllSelection () { |
||||
if (this.multipleSelection.length != '') { |
||||
let arr = this.multipleSelection |
||||
let delList = arr.map(item => { |
||||
return item.customerId |
||||
}) |
||||
this.$confirm('确定要删除吗?', '提示', { |
||||
type: 'warning' |
||||
}).then(() => { |
||||
this.$post(this.api.delCustomers, delList).then(res => { |
||||
this.multipleSelection = []; |
||||
if (delList.length == this.listData.length) { |
||||
if (this.page > 1) { |
||||
this.page = this.page - 1 |
||||
} |
||||
this.$get(this.api.queryCity,data).then(res => { |
||||
this.cityList = res.list |
||||
}).catch(res => {}) |
||||
}, |
||||
permission(row){ |
||||
this.$router.push(`/permission?name=${row.customerName}`) |
||||
}, |
||||
addcustomer(){ |
||||
this.$router.push('addcustomer') |
||||
}, |
||||
edit(row){ |
||||
this.$router.push(`addcustomer?id=${row.customerId}`) |
||||
}, |
||||
show(row){ |
||||
this.$router.push(`addcustomer?id=${row.customerId}&show=true`) |
||||
}, |
||||
handleDelete(row) { |
||||
this.$confirm('确定要删除吗?', '提示', { |
||||
type: 'warning' |
||||
}).then(() => { |
||||
this.$post(this.api.delCustomers,[row.customerId]).then(res => { |
||||
this.$message.success('删除成功') |
||||
if(this.listData.length == 2){ |
||||
|
||||
}else{ |
||||
if(this.page > 1){ |
||||
this.page = this.page-1 |
||||
} |
||||
} |
||||
this.getData() |
||||
}).catch(res => {}) |
||||
}).catch(() => {}) |
||||
}, |
||||
handleSelectionChange(val) { |
||||
this.multipleSelection = val |
||||
}, |
||||
delAllSelection() { |
||||
if(this.multipleSelection.length != ''){ |
||||
let arr = this.multipleSelection |
||||
let delList = arr.map(item => { |
||||
return item.customerId |
||||
}) |
||||
this.$confirm('确定要删除吗?', '提示', { |
||||
type: 'warning' |
||||
}).then(() => { |
||||
this.$post(this.api.delCustomers,delList).then(res => { |
||||
this.multipleSelection = []; |
||||
if(delList.length == this.listData.length){ |
||||
if(this.page > 1){ |
||||
this.page = this.page-1 |
||||
} |
||||
} |
||||
this.$refs.table.clearSelection() |
||||
this.$message.success('删除成功') |
||||
this.getData() |
||||
}).catch(res => {}) |
||||
}).catch(() => {}) |
||||
}else{ |
||||
this.$message.error('请先选择数据') |
||||
} |
||||
this.$refs.table.clearSelection() |
||||
this.$message.success('删除成功') |
||||
}, |
||||
handleCurrentChange(val) { |
||||
this.page = val |
||||
this.$store.commit('SET_C_PAGE', val) |
||||
this.$router.push(`customer?page=${val}`) |
||||
this.getData() |
||||
}).catch(res => { }) |
||||
}).catch(() => { }) |
||||
} else { |
||||
this.$message.error('请先选择数据') |
||||
} |
||||
}, |
||||
handleCurrentChange (val) { |
||||
this.page = val |
||||
this.$router.push(`customer?page=${val}`) |
||||
this.getData() |
||||
}, |
||||
resetPassword (row) { |
||||
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', { |
||||
}).then(() => { |
||||
this.$get(this.api.resetPwdCustomer, { |
||||
customerId: row.customerId, |
||||
}).then(res => { |
||||
if (res.message == 'success') { |
||||
this.$message.success('重置成功') |
||||
} else { |
||||
this.$message.error('重置失败') |
||||
} |
||||
}).catch(res => { }); |
||||
}).catch(() => { |
||||
}); |
||||
}, |
||||
} |
||||
}, |
||||
resetPassword(row){ |
||||
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, '提示', { |
||||
}).then(() => { |
||||
this.$get(this.api.resetPwdCustomer,{ |
||||
customerId: row.customerId, |
||||
}).then(res => { |
||||
if(res.message == 'success'){ |
||||
this.$message.success('重置成功') |
||||
}else{ |
||||
this.$message.error('重置失败') |
||||
} |
||||
}).catch(res => {}); |
||||
}).catch(() => { |
||||
}); |
||||
}, |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.card { |
||||
min-height: calc(100vh - 300px); |
||||
min-height: calc(100vh - 300px); |
||||
} |
||||
</style> |
||||
|
||||
|
@ -1,301 +1,281 @@ |
||||
<template> |
||||
<div class="wrap"> |
||||
<div class="side"> |
||||
<el-tree ref="type" :data="typeList" node-key="id" accordion :default-expanded-keys="defaultActive" |
||||
:current-node-key="categoryId" :props="defaultProps" :highlight-current="true" |
||||
@current-change="typeClick"></el-tree> |
||||
</div> |
||||
|
||||
<div class="right"> |
||||
<div class="flex-between" style="margin-bottom: 10px;"> |
||||
<p>数据简介</p> |
||||
<el-button v-if="introduceText && !editing" type="primary" @click="editing = !editing" |
||||
v-auth="'/data:数据简介:编辑'">编辑</el-button> |
||||
</div> |
||||
<div class="intro" v-if="!introduceText && !editing"> |
||||
<p class="text">请添加简介</p> |
||||
<div class="btn"> |
||||
<el-button type="primary" @click="edit">添加</el-button> |
||||
</div> |
||||
</div> |
||||
<template v-if="introduceText || editing"> |
||||
<el-input placeholder="请输入简介" v-model="introduce" type="textarea" rows="5" :disabled="!editing"></el-input> |
||||
<div class="field"> |
||||
<p class="label">数据源</p> |
||||
<el-input style="width: 250px" placeholder="请输入数据源" v-model="dataSource" type="text" |
||||
:disabled="!editing"></el-input> |
||||
</div> |
||||
</template> |
||||
<div class="field"> |
||||
<p class="label">关键字</p> |
||||
<div class="tag-add" v-if="editing"> |
||||
<el-input placeholder="请输入关键字" size="small" v-model="newKeyword"></el-input> |
||||
<span v-if="editing"> |
||||
<el-button @click="save" |
||||
style="color: #062c87;border: 1px solid #062c87;border-radius:5px;height: 25px;line-height: 0px">保 |
||||
存</el-button> |
||||
</span> |
||||
<div class="wrap"> |
||||
<div class="side"> |
||||
<el-tree ref="type" :data="typeList" node-key="id" accordion :default-expanded-keys="defaultActive" :current-node-key="categoryId" :props="defaultProps" :highlight-current="true" @current-change="typeClick"></el-tree> |
||||
</div> |
||||
<div class="tag-wrap"> |
||||
<el-tag :key="tag.id" :type="editing ? '' : 'info'" v-for="tag in keywordList" :closable="editing" |
||||
:disable-transitions="false" @close="delKeyword(tag)"> |
||||
{{ tag.keyword }} |
||||
</el-tag> |
||||
|
||||
<div class="right"> |
||||
<div class="flex-between" style="margin-bottom: 10px;"> |
||||
<p>数据简介</p> |
||||
<el-button v-if="introduceText && !editing" type="primary" @click="editing = !editing" v-auth="'/data:数据简介:编辑'">编辑</el-button> |
||||
</div> |
||||
<div class="intro" v-if="!introduceText && !editing"> |
||||
<p class="text">请添加简介</p> |
||||
<div class="btn"> |
||||
<el-button type="primary" @click="edit">添加</el-button> |
||||
</div> |
||||
</div> |
||||
<template v-if="introduceText || editing"> |
||||
<el-input placeholder="请输入简介" v-model="introduce" type="textarea" rows="5" :disabled="!editing"></el-input> |
||||
<div class="field"> |
||||
<p class="label">数据源</p> |
||||
<el-input style="width: 250px" placeholder="请输入数据源" v-model="dataSource" type="text" :disabled="!editing"></el-input> |
||||
</div> |
||||
</template> |
||||
<div class="field"> |
||||
<p class="label">关键字</p> |
||||
<div class="tag-add" v-if="editing"> |
||||
<el-input placeholder="请输入关键字" size="small" v-model="newKeyword"></el-input> |
||||
<span v-if="editing"> |
||||
<el-button @click="save" style="color: #9076FF;border: 1px solid #9076FF;border-radius:5px;height: 25px;line-height: 0px">保 存</el-button> |
||||
</span> |
||||
</div> |
||||
<div class="tag-wrap"> |
||||
<el-tag |
||||
:key="tag.id" |
||||
:type="editing ? '' : 'info'" |
||||
v-for="tag in keywordList" |
||||
:closable="editing" |
||||
:disable-transitions="false" |
||||
@close="delKeyword(tag)"> |
||||
{{tag.keyword}} |
||||
</el-tag> |
||||
</div> |
||||
</div> |
||||
<div class="btns" v-if="editing"> |
||||
<el-button @click="editing = false">取 消</el-button> |
||||
<el-button type="primary" @click="confirmData">确 定</el-button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="btns" v-if="editing"> |
||||
<el-button @click="editing = false">取 消</el-button> |
||||
<el-button type="primary" @click="confirmData">确 定</el-button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
export default { |
||||
data () { |
||||
return { |
||||
id: this.$route.query.id || '', |
||||
typeList: [], |
||||
defaultProps: { |
||||
children: 'children', |
||||
label: 'label' |
||||
}, |
||||
defaultActive: [], |
||||
editing: false, |
||||
edited: false, |
||||
introduce: '', |
||||
dataSource: '', |
||||
introduceText: '', |
||||
categoryId: '', |
||||
keywordList: [], |
||||
newKeyword: '' |
||||
}; |
||||
}, |
||||
watch: { |
||||
keyword: function (val) { |
||||
clearTimeout(this.searchTimer) |
||||
this.searchTimer = setTimeout(() => { |
||||
this.getData() |
||||
}, 500) |
||||
} |
||||
}, |
||||
mounted () { |
||||
this.getData() |
||||
}, |
||||
methods: { |
||||
getData () { |
||||
// 获取分类 |
||||
this.$post(this.api.getTableByClassification).then(res => { |
||||
// 递归处理id和label |
||||
function handleId (data) { |
||||
data.map(n => { |
||||
n.id = String(n.id) |
||||
n.label = n.categoryName |
||||
if (n.children.length) { |
||||
handleId(n.children) |
||||
} |
||||
}) |
||||
} |
||||
handleId(res) |
||||
|
||||
this.typeList = res |
||||
if (!this.edited) { |
||||
// 取首个的id和简介 |
||||
if (res[0].children.length) { |
||||
let item = res[0].children[0] |
||||
this.categoryId = item.id |
||||
this.dataSource = res[0].children[0].dataSource |
||||
this.defaultActive = [res[0].children[0].id] |
||||
// this.defaultActive = [item.id] |
||||
this.introduceText = item.introduce |
||||
this.introduce = item.introduce |
||||
} else { |
||||
this.categoryId = res[0].id |
||||
this.dataSource = res[0].dataSource |
||||
this.defaultActive = [res[0].children[0].id] |
||||
// this.defaultActive = [res[0].id] |
||||
this.introduceText = res[0].introduce |
||||
this.introduce = res[0].introduce |
||||
} |
||||
this.$nextTick(() => { |
||||
this.$refs.type.setCurrentKey(this.categoryId) |
||||
}) |
||||
} else if (this.id) { |
||||
this.$nextTick(() => { |
||||
this.defaultActive = [+this.id] |
||||
this.$refs.type.setCurrentKey(+this.id) |
||||
}) |
||||
} |
||||
this.getKeyword() |
||||
}).catch(res => { }) |
||||
}, |
||||
// 分类点击 |
||||
typeClick (data, node) { |
||||
this.$router.push(`/data?tab=third&id=${data.id}`).catch(e => { }) |
||||
this.editing = false |
||||
this.categoryId = data.id |
||||
this.defaultActive = [data.id] |
||||
this.introduceText = data.introduce |
||||
this.introduce = data.introduce |
||||
this.dataSource = data.dataSource |
||||
this.getKeyword() |
||||
}, |
||||
// 获取关键词 |
||||
getKeyword () { |
||||
this.$get(this.api.getKeywordByCategoryId, { |
||||
categoryId: this.categoryId |
||||
}).then(res => { |
||||
this.keywordList = res.keywords |
||||
}).catch(res => { }) |
||||
data() { |
||||
return { |
||||
typeList: [], |
||||
defaultProps: { |
||||
children: 'children', |
||||
label: 'label' |
||||
}, |
||||
defaultActive: [], |
||||
editing: false, |
||||
edited: false, |
||||
introduce: '', |
||||
dataSource: '', |
||||
introduceText: '', |
||||
categoryId: '', |
||||
keywordList: [], |
||||
newKeyword: '' |
||||
}; |
||||
}, |
||||
// 进入编辑状态 |
||||
edit () { |
||||
this.editing = true |
||||
this.introduce = this.introduceText |
||||
watch: { |
||||
keyword: function(val) { |
||||
clearTimeout(this.searchTimer) |
||||
this.searchTimer = setTimeout(() => { |
||||
this.getData() |
||||
},500) |
||||
} |
||||
}, |
||||
// 保存数据介绍和数据源 |
||||
saveType () { |
||||
const id = this.categoryId // 获取当前分类id |
||||
this.$post(this.api.updateCategory, { |
||||
id, |
||||
introduce: this.introduce, |
||||
dataSource: this.dataSource |
||||
}).then(res => { |
||||
this.$message.success(this.introduceText ? '编辑成功' : '新增成功') |
||||
this.introduceText = this.introduce |
||||
this.editing = false |
||||
this.edited = true |
||||
mounted(){ |
||||
this.getData() |
||||
}).catch(res => { }) |
||||
}, |
||||
// 删除关键词 |
||||
delKeyword (item) { |
||||
this.$post(`${this.api.deleteKeyword}?categoryId=${this.categoryId}&keyword=${item.keyword}`).then(res => { |
||||
this.$message.success('删除成功') |
||||
this.getKeyword() |
||||
}).catch(res => { }) |
||||
}, |
||||
save () { |
||||
const keyword = this.newKeyword |
||||
if (keyword) { |
||||
if (this.keywordList.find(e => e.keyword === keyword)) return this.$message.error('请不要输入重复关键字!') |
||||
// this.confirmEdit() |
||||
this.$post(this.api.addKeyword, { |
||||
categoryId: this.categoryId, |
||||
keyword |
||||
}).then(res => { |
||||
this.newKeyword = '' |
||||
this.getKeyword() |
||||
}).catch(res => { }) |
||||
} else { |
||||
this.confirmEdit() |
||||
} |
||||
}, |
||||
// 保存 |
||||
confirmData () { |
||||
const keyword = this.newKeyword // 获取输入的关键词 |
||||
// 如果有关键词,则调新增关键词的接口,否则,直接调保存分类信息的接口去保存数据介绍和数据源 |
||||
if (keyword) { |
||||
// 同个分类下,关键词不能重复 |
||||
if (this.keywordList.find(e => e.keyword === keyword)) return this.$message.error('请不要输入重复关键字!') |
||||
this.saveType() |
||||
// 新增关键词 |
||||
this.$post(this.api.addKeyword, { |
||||
categoryId: this.categoryId, |
||||
keyword |
||||
}).then(res => { |
||||
this.newKeyword = '' // 新增后,输入框清空 |
||||
this.getKeyword() |
||||
}).catch(res => { }) |
||||
} else { |
||||
this.saveType() |
||||
} |
||||
methods: { |
||||
getData(){ |
||||
// 获取分类 |
||||
this.$post(this.api.getTableByClassification).then(res => { |
||||
// 递归处理id和label |
||||
function handleId(data){ |
||||
data.map(n => { |
||||
n.id = String(n.id) |
||||
n.label = n.categoryName |
||||
if(n.children.length){ |
||||
handleId(n.children) |
||||
} |
||||
}) |
||||
} |
||||
handleId(res) |
||||
console.log(res) |
||||
|
||||
this.typeList = res |
||||
// 取首个的id和简介 |
||||
if (!this.edited) { |
||||
if(res[0].children.length){ |
||||
let item = res[0].children[0] |
||||
this.categoryId = item.id |
||||
this.dataSource = res[0].children[0].dataSource |
||||
this.defaultActive = [res[0].children[0].id] |
||||
// this.defaultActive = [item.id] |
||||
this.introduceText = item.introduce |
||||
this.introduce = item.introduce |
||||
}else{ |
||||
this.categoryId = res[0].id |
||||
this.dataSource = res[0].dataSource |
||||
this.defaultActive = [res[0].children[0].id] |
||||
// this.defaultActive = [res[0].id] |
||||
this.introduceText = res[0].introduce |
||||
this.introduce = res[0].introduce |
||||
} |
||||
this.$nextTick(() => { |
||||
this.$refs.type.setCurrentKey(this.categoryId) |
||||
}) |
||||
} |
||||
this.getKeyword() |
||||
}).catch(res => {}) |
||||
}, |
||||
// 分类点击 |
||||
typeClick(data,node){ |
||||
console.log(data) |
||||
this.editing = false |
||||
this.categoryId = data.id |
||||
this.defaultActive = [data.id] |
||||
this.introduceText = data.introduce |
||||
this.introduce = data.introduce |
||||
this.dataSource = data.dataSource |
||||
this.getKeyword() |
||||
}, |
||||
// 获取关键词 |
||||
getKeyword(){ |
||||
this.$get(this.api.getKeywordByCategoryId,{ |
||||
categoryId: this.categoryId |
||||
}).then(res => { |
||||
this.keywordList = res.keywords |
||||
}).catch(res => {}) |
||||
}, |
||||
// 进入编辑状态 |
||||
edit(){ |
||||
this.editing = true |
||||
this.introduce = this.introduceText |
||||
}, |
||||
// 保存数据介绍和数据源 |
||||
saveType(){ |
||||
|
||||
const id = this.categoryId // 获取当前分类id |
||||
this.$post(this.api.updateCategory,{ |
||||
id, |
||||
introduce: this.introduce, |
||||
dataSource: this.dataSource |
||||
}).then(res => { |
||||
this.$message.success(this.introduceText ? '编辑成功' : '新增成功') |
||||
this.introduceText = this.introduce |
||||
this.editing = false |
||||
this.edited = true |
||||
// this.getData() |
||||
}).catch(res => {}) |
||||
}, |
||||
// 删除关键词 |
||||
delKeyword(item) { |
||||
this.$post(`${this.api.deleteKeyword}?categoryId=${this.categoryId}&keyword=${item.keyword}`).then(res => { |
||||
this.$message.success('删除成功') |
||||
this.getKeyword() |
||||
}).catch(res => {}) |
||||
}, |
||||
save(){ |
||||
const keyword = this.newKeyword |
||||
if (keyword) { |
||||
if (this.keywordList.find(e => e.keyword === keyword)) return this.$message.error('请不要输入重复关键字!') |
||||
// this.confirmEdit() |
||||
this.$post(this.api.addKeyword,{ |
||||
categoryId: this.categoryId, |
||||
keyword |
||||
}).then(res => { |
||||
this.newKeyword = '' |
||||
this.getKeyword() |
||||
}).catch(res => {}) |
||||
} else { |
||||
this.confirmEdit() |
||||
} |
||||
}, |
||||
// 保存 |
||||
confirmData() { |
||||
const keyword = this.newKeyword // 获取输入的关键词 |
||||
// 如果有关键词,则调新增关键词的接口,否则,直接调保存分类信息的接口去保存数据介绍和数据源 |
||||
if (keyword) { |
||||
// 同个分类下,关键词不能重复 |
||||
if (this.keywordList.find(e => e.keyword === keyword)) return this.$message.error('请不要输入重复关键字!') |
||||
this.saveType() |
||||
// 新增关键词 |
||||
this.$post(this.api.addKeyword,{ |
||||
categoryId: this.categoryId, |
||||
keyword |
||||
}).then(res => { |
||||
this.newKeyword = '' // 新增后,输入框清空 |
||||
this.getKeyword() |
||||
}).catch(res => {}) |
||||
} else { |
||||
this.saveType() |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
.wrap { |
||||
display: flex; |
||||
height: calc(100vh - 223px); |
||||
padding: 0 24px; |
||||
|
||||
.side { |
||||
width: 300px; |
||||
padding: 24px 10px 24px 0; |
||||
margin-right: 24px; |
||||
border-right: 1px solid rgba(0, 0, 0, 0.06); |
||||
} |
||||
|
||||
.right { |
||||
width: calc(100% - 374px); |
||||
padding: 24px 0; |
||||
} |
||||
|
||||
.intro { |
||||
padding: 20px; |
||||
margin: 20px 0; |
||||
border: 1px solid #dcdcdc; |
||||
border-radius: 4px; |
||||
|
||||
.text { |
||||
margin-bottom: 20px; |
||||
display: flex; |
||||
height: calc(100vh - 223px); |
||||
padding: 0 24px; |
||||
.side { |
||||
width: 300px; |
||||
padding: 24px 10px 24px 0; |
||||
margin-right: 24px; |
||||
border-right: 1px solid rgba(0, 0, 0, 0.06); |
||||
} |
||||
} |
||||
|
||||
.field { |
||||
margin-top: 20px; |
||||
text-align: left; |
||||
|
||||
.label { |
||||
margin-bottom: 10px; |
||||
.right { |
||||
width: calc(100% - 374px); |
||||
padding: 24px 0; |
||||
} |
||||
.intro{ |
||||
padding: 20px; |
||||
margin: 20px 0; |
||||
border: 1px solid #dcdcdc; |
||||
border-radius: 4px; |
||||
.text{ |
||||
margin-bottom: 20px; |
||||
} |
||||
} |
||||
.field { |
||||
margin-top: 20px; |
||||
text-align: left; |
||||
.label { |
||||
margin-bottom: 10px; |
||||
} |
||||
} |
||||
.tag-wrap { |
||||
display: flex; |
||||
align-items: center; |
||||
} |
||||
.btns{ |
||||
margin-top: 20px; |
||||
} |
||||
} |
||||
|
||||
.tag-wrap { |
||||
display: flex; |
||||
align-items: center; |
||||
} |
||||
|
||||
.btns { |
||||
margin-top: 20px; |
||||
} |
||||
} |
||||
|
||||
.tag-add { |
||||
display: flex; |
||||
align-items: center; |
||||
margin-bottom: 10px; |
||||
|
||||
.el-input { |
||||
width: 200px; |
||||
} |
||||
|
||||
.el-button { |
||||
margin-left: 5px; |
||||
} |
||||
display: flex; |
||||
align-items: center; |
||||
margin-bottom: 10px; |
||||
.el-input { |
||||
width: 200px; |
||||
} |
||||
.el-button { |
||||
margin-left: 5px; |
||||
} |
||||
} |
||||
|
||||
.mag { |
||||
margin-right: 20px; |
||||
margin-left: 20px; |
||||
.mag{ |
||||
margin-right: 20px; |
||||
margin-left: 20px; |
||||
} |
||||
|
||||
.el-tag+.el-tag { |
||||
margin-left: 10px; |
||||
.el-tag + .el-tag { |
||||
margin-left: 10px; |
||||
} |
||||
|
||||
.button-new-tag { |
||||
margin-left: 10px; |
||||
height: 32px; |
||||
line-height: 30px; |
||||
padding-top: 0; |
||||
padding-bottom: 0; |
||||
margin-left: 10px; |
||||
height: 32px; |
||||
line-height: 30px; |
||||
padding-top: 0; |
||||
padding-bottom: 0; |
||||
} |
||||
|
||||
.input-new-tag { |
||||
width: 90px; |
||||
margin-left: 10px; |
||||
vertical-align: bottom; |
||||
width: 90px; |
||||
margin-left: 10px; |
||||
vertical-align: bottom; |
||||
} |
||||
</style> |
||||
|
@ -1,226 +1,231 @@ |
||||
<template> |
||||
<div class="page"> |
||||
<!-- <div class="tabs">--> |
||||
<!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>--> |
||||
<!-- </div>--> |
||||
<div class="btn-wrap"> |
||||
<el-button v-auth="'内容管理:保存排序'" class="action-btn" type="primary" @click="sortSubmit">保存排序</el-button> |
||||
<el-button v-auth="'内容管理:批量删除'" class="action-btn" type="primary" @click="delAllData">批量删除</el-button> |
||||
<el-button v-auth="'内容管理:新增文章'" class="action-btn" type="primary" @click="addArticle">新增文章</el-button> |
||||
<div class="page"> |
||||
<!-- <div class="tabs">--> |
||||
<!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>--> |
||||
<!-- </div>--> |
||||
<div class="btn-wrap"> |
||||
<el-button v-auth="'内容管理:保存排序'" class="action-btn" type="primary" @click="sortSubmit">保存排序</el-button> |
||||
<el-button v-auth="'内容管理:批量删除'" class="action-btn" type="primary" @click="delAllData">批量删除</el-button> |
||||
<el-button v-auth="'内容管理:新增文章'" class="action-btn" type="primary" @click="addArticle">新增文章</el-button> |
||||
</div> |
||||
<div class="page-content" style="padding-top: 24px"> |
||||
<el-table ref="table" :data="list" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
||||
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> |
||||
<el-table-column type="index" width="60" label="序号" align="center"> |
||||
<template slot-scope="scope"> |
||||
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="title" label="标题" show-overflow-tooltip align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="title" label="栏目" show-overflow-tooltip align="center"> |
||||
{{ columnName }} |
||||
</el-table-column> |
||||
<el-table-column prop="name" label="排序值" width="80" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-input class="sort-input" width="120" min="1" v-model.number="scope.row.sort" type="number"></el-input> |
||||
<span>{{ scope.row.sort }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="date" label="添加日期" align="center"> |
||||
<template slot-scope="scope"> |
||||
{{ transferDate(scope.row.date) }} |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" align="center" width="170"> |
||||
<template slot-scope="scope"> |
||||
<el-button v-auth="'内容管理:编辑'" type="text" @click="editArticle(scope)">编辑</el-button> |
||||
<el-divider v-auth="'内容管理:编辑'" direction="vertical"></el-divider> |
||||
<el-button v-auth="'内容管理:删除'" type="text" @click="delData(scope.row)">删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="name" label="文章发布状态" width="120" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-switch |
||||
v-auth="'内容管理:禁用'" |
||||
class="off" |
||||
v-model="scope.row.status" |
||||
:active-value="0" |
||||
:inactive-value="1" |
||||
style="margin: 0 5px" |
||||
:active-text="scope.row.status ? '关' : '开'" |
||||
@change="switchOff($event,scope.row,scope.$index)" |
||||
></el-switch> |
||||
<span>{{ scope.row.status ? "禁用" : "启用" }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo"> |
||||
</el-pagination> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="page-content" style="padding-top: 24px"> |
||||
<el-table ref="table" :data="list" class="table" header-align="center" @selection-change="handleSelectionChange" |
||||
row-key="id"> |
||||
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> |
||||
<el-table-column type="index" width="60" label="序号" align="center"> |
||||
<template slot-scope="scope"> |
||||
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="title" label="标题" show-overflow-tooltip align="center"> |
||||
</el-table-column> |
||||
<el-table-column prop="title" label="栏目" show-overflow-tooltip align="center"> |
||||
{{ columnName }} |
||||
</el-table-column> |
||||
<el-table-column prop="name" label="排序值" width="80" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-input class="sort-input" width="120" min="1" v-model.number="scope.row.sort" type="number"></el-input> |
||||
<span>{{ scope.row.sort }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="date" label="添加日期" align="center"> |
||||
<template slot-scope="scope"> |
||||
{{ transferDate(scope.row.date) }} |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" align="center" width="170"> |
||||
<template slot-scope="scope"> |
||||
<el-button v-auth="'内容管理:编辑'" type="text" @click="editArticle(scope)">编辑</el-button> |
||||
<el-divider v-auth="'内容管理:编辑'" direction="vertical"></el-divider> |
||||
<el-button v-auth="'内容管理:删除'" type="text" @click="delData(scope.row)">删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="name" label="文章发布状态" width="120" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-switch v-auth="'内容管理:禁用'" class="off" v-model="scope.row.status" :active-value="0" :inactive-value="1" |
||||
style="margin: 0 5px" :active-text="scope.row.status ? '关' : '开'" |
||||
@change="switchOff($event, scope.row, scope.$index)"></el-switch> |
||||
<span>{{ scope.row.status ? "禁用" : "启用" }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background layout="total, prev, pager, next" :total="totals" |
||||
@current-change="handleCurrentChange" :current-page="pageNo"> |
||||
</el-pagination> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import util from "@/libs/util"; |
||||
|
||||
export default { |
||||
data () { |
||||
return { |
||||
activeName: "first", |
||||
tabs: { |
||||
first: "栏目内容管理" |
||||
}, |
||||
columns: this.$parent.menuList, |
||||
columnName: '', |
||||
list: [], |
||||
multipleSelection: [], |
||||
pageNo: +this.$route.query.page || 1, |
||||
pageSize: 10, |
||||
totals: 0, |
||||
originList: [] |
||||
}; |
||||
}, |
||||
props: { |
||||
columnId: "" |
||||
}, |
||||
watch: { |
||||
columnId () { |
||||
this.getColumnName(this.$parent.menuList) |
||||
this.getData(); |
||||
} |
||||
}, |
||||
mounted () { |
||||
this.getColumnName(this.$parent.menuList) |
||||
this.getData(); |
||||
}, |
||||
methods: { |
||||
getData (id) { |
||||
let data = { |
||||
columnId: this.columnId |
||||
}; |
||||
this.$get(`${this.api.queryArticleByCondition}/${this.pageNo}/${this.pageSize}`, data).then(({ articleList, total }) => { |
||||
this.list = articleList; |
||||
this.totals = total; |
||||
if (JSON.stringify(this.originList) !== '{}') this.originList = JSON.parse(JSON.stringify(articleList)) |
||||
if (!this.list.length && this.totals) { |
||||
this.pageNo--; |
||||
this.getData(); |
||||
} |
||||
}).catch(res => { |
||||
}); |
||||
}, |
||||
handleSelectionChange (val) { |
||||
this.multipleSelection = val; |
||||
data() { |
||||
return { |
||||
activeName: "first", |
||||
tabs: { |
||||
first: "栏目内容管理" |
||||
}, |
||||
columns: this.$parent.menuList, |
||||
columnName: '', |
||||
list: [], |
||||
multipleSelection: [], |
||||
pageNo: +this.$route.query.page || 1, |
||||
pageSize: 10, |
||||
totals: 0, |
||||
originList: [] |
||||
}; |
||||
}, |
||||
handleCurrentChange (val) { |
||||
this.pageNo = val; |
||||
this.$router.push(`/information?page=${val}`) |
||||
this.getData(); |
||||
}, |
||||
// 获取栏目名称 |
||||
getColumnName (data) { |
||||
data.map(e => { |
||||
if (e.id == this.columnId) { |
||||
this.columnName = e.name |
||||
} else { |
||||
this.getColumnName(e.children) |
||||
} |
||||
}) |
||||
props: { |
||||
columnId: "" |
||||
}, |
||||
addArticle () { |
||||
this.$router.push(`/addArticle?columnId=${this.columnId}&sort=${this.list.length + 1}`); |
||||
}, |
||||
editArticle (scope) { |
||||
this.$router.push(`/addArticle?columnId=${this.columnId}&id=${scope.row.id}&sort=${scope.$index + 1}`); |
||||
}, |
||||
delData (row) { |
||||
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { |
||||
type: "warning" |
||||
}) |
||||
.then(() => { |
||||
this.$del(`${this.api.deleteArticles}?articleIds=${row.id}`).then(res => { |
||||
util.successMsg("删除成功"); |
||||
watch: { |
||||
columnId() { |
||||
this.getColumnName(this.$parent.menuList) |
||||
this.getData(); |
||||
}).catch(res => { |
||||
}); |
||||
}) |
||||
.catch(() => { |
||||
}); |
||||
} |
||||
}, |
||||
transferDate (date) { |
||||
return date.replace(" 00:00:00", ""); |
||||
mounted() { |
||||
this.getColumnName(this.$parent.menuList) |
||||
this.getData(); |
||||
}, |
||||
delAllData () { |
||||
if (this.multipleSelection.length != "") { |
||||
let newArr = this.multipleSelection; |
||||
let delList = newArr.map(item => { |
||||
return item.id; |
||||
}); |
||||
|
||||
let title = newArr[0].title; |
||||
if (title.length > 14) { |
||||
title = title.substr(0, 14) + "……"; |
||||
} |
||||
this.$confirm(`此批量删除操作不可逆,是否确认删除${title}等${newArr.length}个选中项?`, "提示", { |
||||
type: "warning" |
||||
}) |
||||
.then(() => { |
||||
this.$del(`${this.api.deleteArticles}?articleIds=${delList.join(",")}`).then(res => { |
||||
this.$refs.table.clearSelection(); |
||||
util.successMsg("删除成功"); |
||||
this.getData(); |
||||
methods: { |
||||
getData(id) { |
||||
let data = { |
||||
columnId: this.columnId |
||||
}; |
||||
this.$get(`${this.api.queryArticleByCondition}/${this.pageNo}/${this.pageSize}`, data).then(({ articleList, total }) => { |
||||
this.list = articleList; |
||||
this.totals = total; |
||||
if (JSON.stringify(this.originList) !== '{}') this.originList = JSON.parse(JSON.stringify(articleList)) |
||||
if (!this.list.length && this.totals) { |
||||
this.pageNo--; |
||||
this.getData(); |
||||
} |
||||
}).catch(res => { |
||||
}); |
||||
if (this.multipleSelection.length === this.list.length && this.pageNo > 1) { |
||||
this.handleCurrentChange(this.pageNo - 1) |
||||
}, |
||||
handleSelectionChange(val) { |
||||
this.multipleSelection = val; |
||||
}, |
||||
handleCurrentChange(val) { |
||||
this.pageNo = val; |
||||
this.$router.push(`list?page=${val}`) |
||||
this.getData(); |
||||
}, |
||||
// 获取栏目名称 |
||||
getColumnName(data) { |
||||
data.map(e => { |
||||
if (e.id == this.columnId) { |
||||
this.columnName = e.name |
||||
} else { |
||||
this.getColumnName(e.children) |
||||
} |
||||
}) |
||||
.catch(() => { |
||||
}); |
||||
} else { |
||||
util.errorMsg("请先选择数据 !"); |
||||
} |
||||
}, |
||||
switchOff (val, row, index) { |
||||
this.$put(`${this.api.enableArticle}/${row.id}/${val}`) |
||||
.then(res => { |
||||
val == 1 ? util.errorMsg("该文章已隐藏,对学生端用户不可见") : util.successMsg("该文章已发布,对学生端用户可见"); |
||||
}) |
||||
.catch(err => { |
||||
}); |
||||
}, |
||||
sortSubmit () { |
||||
if (this.list.length) { |
||||
if (this.list.find(n => n.sort < 1)) return util.errorMsg("排序值最小为1"); |
||||
let data = { articleList: this.list }; |
||||
this.$post(this.api.articleSort, data).then(res => { |
||||
util.successMsg("保存成功"); |
||||
this.getData() |
||||
}) |
||||
.catch(err => { |
||||
}); |
||||
} else { |
||||
util.errorMsg("数据为空"); |
||||
} |
||||
}, |
||||
addArticle() { |
||||
this.$router.push(`/addArticle?columnId=${this.columnId}&sort=${this.list.length + 1}`); |
||||
}, |
||||
editArticle(scope) { |
||||
this.$router.push(`/addArticle?columnId=${this.columnId}&id=${scope.row.id}&sort=${scope.$index + 1}`); |
||||
}, |
||||
delData(row) { |
||||
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { |
||||
type: "warning" |
||||
}) |
||||
.then(() => { |
||||
this.$del(`${this.api.deleteArticles}?articleIds=${row.id}`).then(res => { |
||||
util.successMsg("删除成功"); |
||||
this.getData(); |
||||
}).catch(res => { |
||||
}); |
||||
}) |
||||
.catch(() => { |
||||
}); |
||||
}, |
||||
transferDate(date) { |
||||
return date.replace(" 00:00:00", ""); |
||||
}, |
||||
delAllData() { |
||||
if (this.multipleSelection.length != "") { |
||||
let newArr = this.multipleSelection; |
||||
let delList = newArr.map(item => { |
||||
return item.id; |
||||
}); |
||||
|
||||
let title = newArr[0].title; |
||||
if (title.length > 14) { |
||||
title = title.substr(0, 14) + "……"; |
||||
} |
||||
this.$confirm(`此批量删除操作不可逆,是否确认删除${title}等${newArr.length}个选中项?`, "提示", { |
||||
type: "warning" |
||||
}) |
||||
.then(() => { |
||||
this.$del(`${this.api.deleteArticles}?articleIds=${delList.join(",")}`).then(res => { |
||||
this.$refs.table.clearSelection(); |
||||
util.successMsg("删除成功"); |
||||
this.getData(); |
||||
}).catch(res => { |
||||
}); |
||||
if(this.multipleSelection.length === this.list.length && this.pageNo>1) { |
||||
this.handleCurrentChange(this.pageNo - 1) |
||||
} |
||||
}) |
||||
.catch(() => { |
||||
}); |
||||
} else { |
||||
util.errorMsg("请先选择数据 !"); |
||||
} |
||||
}, |
||||
switchOff(val, row, index) { |
||||
this.$put(`${this.api.enableArticle}/${row.id}/${val}`) |
||||
.then(res => { |
||||
val == 1 ? util.errorMsg("该文章已隐藏,对学生端用户不可见") : util.successMsg("该文章已发布,对学生端用户可见"); |
||||
}) |
||||
.catch(err => { |
||||
}); |
||||
}, |
||||
sortSubmit() { |
||||
if (this.list.length) { |
||||
if (this.list.find(n => n.sort < 1)) return util.errorMsg("排序值最小为1"); |
||||
let data = { articleList: this.list }; |
||||
this.$post(this.api.articleSort, data).then(res => { |
||||
util.successMsg("保存成功"); |
||||
this.getData() |
||||
}) |
||||
.catch(err => { |
||||
}); |
||||
} else { |
||||
util.errorMsg("数据为空"); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.btn-wrap { |
||||
text-align: right; |
||||
text-align: right; |
||||
} |
||||
|
||||
.sort-input { |
||||
/deep/ .el-input__inner { |
||||
padding: 0 0 0 10px; |
||||
} |
||||
/deep/ .el-input__inner { |
||||
padding: 0 0 0 10px; |
||||
} |
||||
} |
||||
|
||||
.sort-input+span { |
||||
display: none; |
||||
.sort-input + span { |
||||
display: none; |
||||
} |
||||
|
||||
.off+span { |
||||
display: none; |
||||
.off + span { |
||||
display: none; |
||||
} |
||||
</style> |
@ -1,251 +0,0 @@ |
||||
<template> |
||||
<div class="page"> |
||||
<div style="margin-bottom: 10px;text-align: right;"> |
||||
<el-button v-auth="'/shop:营销推广管理:新增'" type="primary" round @click="add">新增</el-button> |
||||
</div> |
||||
<el-table :data="list" class="table" ref="table" header-align="center" row-key="id"> |
||||
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> |
||||
<el-table-column prop="courseName" label="图片" min-width="150" align="center"> |
||||
<template slot-scope="scope"> |
||||
<img width="100" :src="scope.row.banner" alt=""> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="title" label="标题" min-width="150" align="center"></el-table-column> |
||||
<el-table-column prop="subheading" label="副标题" min-width="150" align="center"></el-table-column> |
||||
<el-table-column prop="url" label="链接" min-width="150" align="center"></el-table-column> |
||||
<el-table-column label="操作" align="center" width="250"> |
||||
<template slot-scope="scope"> |
||||
<el-switch v-model="scope.row.isOpen" :active-value="0" :inactive-value="1" |
||||
@change="switchOff($event, scope.row)" v-auth="'/shop:营销推广管理:禁用'"> |
||||
</el-switch> |
||||
<el-button style="margin-left: 10px;" v-auth="'/shop:营销推广管理:编辑'" type="text" |
||||
@click="edit(scope.row)">编辑</el-button> |
||||
<el-button v-auth="'/shop:营销推广管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
|
||||
<el-dialog :title="(form.id ? '编辑' : '新增') + 'banner'" :visible.sync="bannerVisible" width="500px" class="dialog" |
||||
:close-on-click-modal="false"> |
||||
<el-form ref="form" label-width="60px"> |
||||
<el-form-item label="图片"> |
||||
<el-upload class="avatar-uploader" accept=".jpg,.png,.jpeg,.gif" :on-change="changeFile" |
||||
:show-file-list="false" action="" :auto-upload="false"> |
||||
<img v-if="form.banner" :src="form.banner" class="avatar"> |
||||
<div class="uploader-default" v-else> |
||||
<i class="el-icon-plus"></i> |
||||
<p>上传图片</p> |
||||
</div> |
||||
</el-upload> |
||||
</el-form-item> |
||||
<el-form-item label="标题"> |
||||
<el-input v-model="form.title" placeholder="请输入标题" maxlength="100"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="副标题"> |
||||
<el-input v-model="form.subheading" placeholder="请输入副标题" maxlength="100"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="链接"> |
||||
<el-input v-model="form.url" placeholder="请输入链接" maxlength="100"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer"> |
||||
<el-button @click="bannerVisible = false">取消</el-button> |
||||
<el-button type="primary" @click="submitBanner">确定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
|
||||
<!-- 剪裁组件弹窗 --> |
||||
<el-dialog title="图片裁剪" append-to-body :visible.sync="cropperModel" width="1100px" :close-on-click-modal="false"> |
||||
<Cropper ref="cropper" :img-file.sync="file" :is-upload="isUpload" :fixed="true" :fixedNumber.sync="fixedNumber" |
||||
:autoCropWidth="500" :autoCropHeight="138.8" @upload="customUpload" /> |
||||
</el-dialog> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import Util from "@/libs/util"; |
||||
import Setting from '@/setting' |
||||
import Cropper from '@/components/img-upload/Cropper' |
||||
import Axios from 'axios' |
||||
import Oss from '@/components/upload/upload.js' |
||||
export default { |
||||
data () { |
||||
return { |
||||
headers: { |
||||
token: sessionStorage.getItem("token") |
||||
}, |
||||
list: [], |
||||
bannerVisible: false, |
||||
form: { |
||||
id: '', |
||||
banner: '', |
||||
title: '', |
||||
subheading: '', |
||||
url: '', |
||||
}, |
||||
cropperModel: false, |
||||
isUpload: false, |
||||
fixedNumber: [5.4, 1], |
||||
file: '' |
||||
}; |
||||
}, |
||||
components: { |
||||
Cropper |
||||
}, |
||||
mounted () { |
||||
this.getList() |
||||
}, |
||||
methods: { |
||||
getList () { |
||||
this.$post(this.api.listMarketing, { |
||||
pageNum: 1, |
||||
pageSize: 1000 |
||||
}).then(({ page }) => { |
||||
this.list = page.records; |
||||
this.total = page.total; |
||||
}).catch(res => { |
||||
}); |
||||
}, |
||||
// 图片裁剪上传事件 |
||||
customUpload (data) { |
||||
data.name = this.file.name |
||||
this.imgUpload(data) |
||||
}, |
||||
// 图片上传到服务器 |
||||
imgUpload (formData) { |
||||
this.isUpload = true |
||||
Oss.upload(formData).then(res => { |
||||
this.form.banner && Oss.del(this.form.banner) |
||||
this.form.banner = res.url |
||||
}) |
||||
this.$refs.cropper.isDisabled = false |
||||
this.isUpload = false |
||||
this.cropperModel = false |
||||
}, |
||||
// 图片改变钩子 |
||||
changeFile (file) { |
||||
const { size, name } = file |
||||
const ext = name.substring(name.lastIndexOf('.') + 1) |
||||
if (!Util.isImg(ext)) { |
||||
this.$message.error('请上传图片!') |
||||
return false |
||||
} |
||||
this.file = file |
||||
this.cropperModel = true |
||||
this.$nextTick(() => { |
||||
this.$refs.cropper.updateImg({ |
||||
url: window.URL.createObjectURL(file.raw), |
||||
size: file.size |
||||
}) |
||||
}) |
||||
}, |
||||
add () { |
||||
this.form = { |
||||
id: '', |
||||
banner: '', |
||||
title: '', |
||||
subheading: '', |
||||
url: '', |
||||
} |
||||
this.bannerVisible = true |
||||
}, |
||||
edit (row) { |
||||
this.form = JSON.parse(JSON.stringify(row)) |
||||
this.bannerVisible = true |
||||
}, |
||||
// banner弹框提交 |
||||
submitBanner () { |
||||
const { form } = this |
||||
if (!form.banner) return Util.errorMsg('请上传图片') |
||||
this.$post(this.api[form.id ? 'updateMarketing' : 'saveMarketing'], form).then(res => { |
||||
this.getList() |
||||
this.bannerVisible = false |
||||
}).catch(res => { }) |
||||
}, |
||||
handleDelete (row) { |
||||
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { |
||||
type: "warning" |
||||
}) |
||||
.then(() => { |
||||
this.$post(`${this.api.delMarketing}?ids=${row.id}`).then(res => { |
||||
Util.successMsg("删除成功"); |
||||
this.getList(); |
||||
}).catch(res => { |
||||
}); |
||||
}) |
||||
.catch(() => { |
||||
}); |
||||
}, |
||||
switchOff (val, row) { |
||||
this.$post(`${this.api.bannerEnableOrDisable}?id=${row.id}&isDisable=${row.isOpen}`).then(res => { }).catch(err => { }) |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.m-l-10 { |
||||
margin-left: 10px; |
||||
} |
||||
|
||||
$avatar-width: 104px; |
||||
|
||||
/deep/ .avatar-uploader { |
||||
.el-upload { |
||||
position: relative; |
||||
width: $avatar-width; |
||||
height: $avatar-width; |
||||
border: 1px dashed #d9d9d9; |
||||
border-radius: 2px; |
||||
cursor: pointer; |
||||
overflow: hidden; |
||||
|
||||
&:hover { |
||||
border-color: #409eff; |
||||
} |
||||
|
||||
.uploader-default { |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
width: $avatar-width !important; |
||||
height: $avatar-width; |
||||
text-align: center; |
||||
background: rgba(0, 0, 0, 0.04); |
||||
|
||||
i { |
||||
font-size: 20px; |
||||
font-weight: bold; |
||||
color: #8c939d; |
||||
} |
||||
|
||||
p { |
||||
margin-top: 10px; |
||||
font-size: 14px; |
||||
color: rgba(0, 0, 0, 0.65); |
||||
line-height: 1; |
||||
} |
||||
} |
||||
|
||||
.avatar { |
||||
width: $avatar-width; |
||||
height: $avatar-width; |
||||
display: block; |
||||
} |
||||
} |
||||
|
||||
.el-upload__tip { |
||||
margin-top: 0; |
||||
|
||||
p { |
||||
font-size: 14px; |
||||
color: rgba(0, 0, 0, 0.45); |
||||
line-height: 1; |
||||
|
||||
&:first-child { |
||||
margin-bottom: 5px; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |