Compare commits

...

55 Commits

Author SHA1 Message Date
yujialong 87e0c2c1c8 fix 1 month ago
yujialong b7425ca1df fix 1 month ago
yujialong c9d67373d3 fix 1 month ago
yujialong 0c9e5562a1 权限 1 month ago
yujialong 429f9d672c 赛事导入人员模板更换 1 month ago
yujialong b5aa906326 fix 1 month ago
yujialong 6df319cf51 fix 1 month ago
yujialong be1ee97189 fix 1 month ago
yujialong db23e62753 fix 2 months ago
yujialong 04c306898f fix 2 months ago
yujialong 878645d672 fix 2 months ago
yujialong 2de12c8ec0 fix 2 months ago
yujialong 79a92a3410 fix 2 months ago
yujialong 08adddc010 fix 2 months ago
yujialong 3bf85a18bb 订单修复,资源库联调 2 months ago
yujialong 69fc4e49b2 fix 2 months ago
yujialong 07b36913d2 订单添加理实课程 2 months ago
yujialong 89abb11569 赛事相关 2 months ago
yujialong e467d90550 fix 2 months ago
yujialong 1d800d91b2 fix 2 months ago
yujialong b4b748d3ca fix 2 months ago
yujialong 6beec3d7e7 fix 2 months ago
yujialong 59f018f18c fix 2 months ago
yujialong 0e6e54bd81 fix 2 months ago
yujialong 28cce9dc63 课程相关 2 months ago
yujialong 38565b6669 fix 2 months ago
yujialong 9ea6496254 课程相关 2 months ago
yujialong 9356e4debe 课程 2 months ago
yujialong 0d1cbd6ed0 资源库等 2 months ago
yujialong 9dd6f20a62 新增课程修改 2 months ago
yujialong f2b6fb204f fix 2 months ago
yujialong 8f99871ad7 左侧导航 2 months ago
yujialong f508148177 整体风格调整 2 months ago
yujialong 36c1a45fe2 工作台及头部导航、主题色更改 2 months ago
yujialong 801c4683a9 工号同步职站 2 months ago
yujialong 26ec77f7de 订单修复 2 months ago
yujialong d5425d48bb fix 2 months ago
yujialong 2a1ffda11c fix 3 months ago
yujialong 24b60d7468 fix 3 months ago
yujialong 796f802fc5 fix 3 months ago
yujialong 2af18aa23c fix 3 months ago
yujialong fe4a1b7900 fix 3 months ago
yujialong 66b4c21343 fix 3 months ago
yujialong 40327a423f fix 4 months ago
yujialong a089ad2943 fix 4 months ago
yujialong 734524aab2 赛事修复 4 months ago
yujialong 4779595867 fix 4 months ago
yujialong df33b0b5eb fix 4 months ago
yujialong b692519c5d fix 4 months ago
yujialong 996a611e03 fix 4 months ago
yujialong 37eb678280 fix 4 months ago
yujialong 46eaca3745 fix 5 months ago
yujialong 56361bdd11 fix 5 months ago
yujialong f3e795125d 竞赛修复 5 months ago
yujialong d0764a64a0 赛事成绩列表实训跟理论合并,线下单独一个页面 5 months ago
  1. 4
      src/App.vue
  2. 28
      src/assets/css/color-dark.css
  3. 7
      src/assets/css/default/index.scss
  4. 46
      src/assets/css/main.css
  5. 189
      src/assets/css/station.scss
  6. 29
      src/assets/css/theme-green/color-green.css
  7. BIN
      src/assets/css/theme-green/fonts/element-icons.ttf
  8. BIN
      src/assets/css/theme-green/fonts/element-icons.woff
  9. 1
      src/assets/css/theme-green/index.css
  10. 1
      src/assets/img/drag.svg
  11. 1
      src/assets/img/empty.svg
  12. BIN
      src/assets/img/exts/excel.png
  13. BIN
      src/assets/img/full.png
  14. BIN
      src/assets/img/project.png
  15. BIN
      src/assets/img/wechat-code.jpeg
  16. BIN
      src/assets/img/workbench/1.png
  17. BIN
      src/assets/img/workbench/10.png
  18. BIN
      src/assets/img/workbench/11.png
  19. BIN
      src/assets/img/workbench/12.png
  20. BIN
      src/assets/img/workbench/13.png
  21. BIN
      src/assets/img/workbench/14.png
  22. BIN
      src/assets/img/workbench/15.png
  23. BIN
      src/assets/img/workbench/16.png
  24. BIN
      src/assets/img/workbench/2.png
  25. BIN
      src/assets/img/workbench/3.png
  26. BIN
      src/assets/img/workbench/4.png
  27. BIN
      src/assets/img/workbench/5.png
  28. BIN
      src/assets/img/workbench/6.png
  29. BIN
      src/assets/img/workbench/7.png
  30. BIN
      src/assets/img/workbench/8.png
  31. BIN
      src/assets/img/workbench/9.png
  32. 149
      src/components/Navbar.vue
  33. 234
      src/components/Sidebar.vue
  34. 35
      src/components/upload/config.js
  35. 28
      src/const/source.js
  36. 9
      src/main.js
  37. 42
      src/router/index.js
  38. 10
      src/setting.js
  39. 53
      src/utils/api.js
  40. 60
      src/views/Home.vue
  41. 28
      src/views/Login.vue
  42. 96
      src/views/course/AddCurriculum.vue
  43. 204
      src/views/course/AddLink.vue
  44. 1080
      src/views/course/content/index.vue
  45. 610
      src/views/course/content/source.vue
  46. 10
      src/views/course/contentSettings.vue
  47. 1209
      src/views/course/detail.vue
  48. 199
      src/views/course/list.vue
  49. 61
      src/views/customer/AddCustomer.vue
  50. 79
      src/views/customer/Order.vue
  51. 16
      src/views/customer/Permission.vue
  52. 2
      src/views/customer/customer.vue
  53. 63
      src/views/data/Framework.vue
  54. 73
      src/views/data/Introduce.vue
  55. 51
      src/views/data/Product.vue
  56. 195
      src/views/devLogin.vue
  57. 96
      src/views/information/contentManage/contentList.vue
  58. 19
      src/views/information/contentManage/index.vue
  59. 21
      src/views/information/list/index.vue
  60. 251
      src/views/market/index.vue
  61. 17
      src/views/match/add/index.vue
  62. 156
      src/views/match/add/set.vue
  63. 4
      src/views/match/add/step1.vue
  64. 4
      src/views/match/add/step2.vue
  65. 11
      src/views/match/add/step3.vue
  66. 2
      src/views/match/add/template.vue
  67. 78
      src/views/match/list/index.vue
  68. 4
      src/views/match/manage/abnormalTeam.vue
  69. 16
      src/views/match/manage/index.vue
  70. 59
      src/views/match/manage/matchArch.vue
  71. 554
      src/views/match/manage/matchArchList.vue
  72. 26
      src/views/match/manage/matchInfo.vue
  73. 61
      src/views/match/manage/matchProgress.vue
  74. 97
      src/views/match/manage/matchRank.vue
  75. 16
      src/views/match/manage/matchSignup.vue
  76. 63
      src/views/match/manage/notice.vue
  77. 675
      src/views/match/manage/otherArchList.vue
  78. 535
      src/views/match/manage/theoryArchList.vue
  79. 112
      src/views/match/manage/theoryReport.vue
  80. 48
      src/views/match/manage/trialReport.vue
  81. 258
      src/views/order/AddOrder.vue
  82. 16
      src/views/order/Order.vue
  83. 75
      src/views/order/selectClient.vue
  84. 36
      src/views/parner/mobileRole.vue
  85. 36
      src/views/parner/pcRole.vue
  86. 172
      src/views/parner/rate.vue
  87. 115
      src/views/parner/staff.vue
  88. 302
      src/views/parnerOperation/learnMg.vue
  89. 241
      src/views/parnerOperation/schemeSet.vue
  90. 672
      src/views/resourse/index.vue
  91. 210
      src/views/resourse/upload.vue
  92. 20
      src/views/review/index.vue
  93. 17
      src/views/serve/AddConfigure.vue
  94. 25
      src/views/serve/Configure.vue
  95. 95
      src/views/serve/backstage/model.vue
  96. 119
      src/views/serve/backstage/sourceModel.vue
  97. 288
      src/views/serve/projectAdd.vue
  98. 192
      src/views/serve/projectList.vue
  99. 324
      src/views/setting/Person.vue
  100. 31
      src/views/setting/index.vue
  101. Some files were not shown because too many files have changed in this diff Show More

@ -45,8 +45,4 @@ export default {
<style>
@import "./assets/css/main.css";
/* @import "./assets/css/color-dark.css"; */
/*深色主题*/
@import "./assets/css/theme-green/color-green.css";
/* 浅绿色主题 */
</style>

@ -1,28 +0,0 @@
.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);
}

@ -0,0 +1,7 @@
/* 改变主题色变量 */
$--color-primary: #062c87;
/* 改变 icon 字体路径变量,必需 */
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "~element-ui/packages/theme-chalk/src/index";

@ -8,7 +8,7 @@ body,
#app,
.wrapper {
width: 100%;
height: 100%;
min-height: 100%;
display: flex;
flex-direction: column;
}
@ -60,37 +60,14 @@ li {
.el-table th > .cell {
font-size: 14px;
}
.content-box {
-webkit-transition: left 0.3s ease-in-out;
transition: left 0.3s ease-in-out;
background: #f0f0f0;
flex: 1;
}
.content {
width: auto;
min-height: 100%;
padding: 20px;
box-sizing: border-box;
}
.content-collapse {
left: 65px;
}
.container {
padding: 30px;
background: #fff;
border: 1px solid #ddd;
border-radius: 5px;
}
.p-title {
padding-left: 5px;
margin-bottom: 24px;
line-height: 1;
font-size: 14px;
color: #585858;
border-left: 3px solid #9278ff;
border-left: 3px solid #062c87;
}
.el-upload-list {
width: 100%;
@ -154,7 +131,7 @@ li {
border-radius: 2px;
}
.tabs .item.active:after {
border-bottom-color: #9278ff;
border-bottom-color: #062c87;
}
.crumbs {
@ -329,9 +306,10 @@ li {
color: #fff;
}
#app .el-table th {
background-color: #9278ff !important;
background-color: #fafafc !important;
font-size: 16px;
font-weight: normal;
color: #000;
}
.el-input__inner[type='number'] {
@ -378,7 +356,7 @@ li {
}
.hr_tag {
background-color: #9278ff;
background-color: #062c87;
width: 3px;
height: 15px;
margin-right: 5px;
@ -520,3 +498,15 @@ li {
}
}
}
.files-tip {
li {
line-height: 1.8;
cursor: pointer;
}
}
.el-drawer__header > :first-child {
font-size: 16px;
font-weight: 600;
color: #333;
}

@ -0,0 +1,189 @@
.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;
}
}
}
}
}

@ -1,29 +0,0 @@
.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;
}

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1734423793915" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7651" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M362.666667 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="7652"></path><path d="M661.333333 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="7653"></path><path d="M362.666667 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="7654"></path><path d="M661.333333 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="7655"></path><path d="M362.666667 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="7656"></path><path d="M661.333333 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="7657"></path></svg>

After

Width:  |  Height:  |  Size: 946 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,149 @@
<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,18 +1,17 @@
<template>
<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">
<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.subs">
<template v-if="item.children">
<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 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.subs" :key="i" :index="threeItem.index">{{
<el-menu-item v-for="(threeItem, i) in subItem.children" :key="i" :index="threeItem.index">{{
threeItem.title
}}</el-menu-item>
</el-submenu>
@ -22,7 +21,6 @@
</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>
@ -33,145 +31,195 @@
<script>
import Setting from '@/setting'
import addRoutes from '@/libs/route/addRoutes'
export default {
props: ['path'],
data () {
return {
menuList: [
active: '',
defaultMenus: [
{
icon: 'el-icon-school',
index: '/customer',
title: '客户管理'
index: '1',
title: '系统后台',
children: [
{
index: '/configure?id=1',
title: 'Python系统'
},
{
icon: 'el-icon-user',
index: '/user',
title: '用户管理'
index: '/theoryExam',
title: '理论考试系统'
},
{
icon: 'el-icon-shopping-bag-2',
index: '/order',
title: '订单管理'
index: '/configure?id=3',
title: '金融产品设计及数字化营销沙盘系统'
},
{
icon: 'el-icon-document-checked',
index: '/curriculum',
title: '课程管理'
index: '/configure?id=4',
title: '银行综合系统'
},
{
icon: 'el-icon-notebook-2',
index: '/data',
title: '数据管理'
index: '/configure?id=5',
title: '众筹系统'
},
]
},
{
icon: 'el-icon-tickets',
index: '/match',
title: '大赛管理'
index: '2',
title: '职站教学后台',
children: [
{
index: '/curriculum',
title: '教学课程管理'
},
{
icon: 'el-icon-takeaway-box',
index: '/theoreticalCourse',
title: '理论课程'
title: '精品课程管理'
},
{
icon: 'el-icon-box',
index: '/information',
title: '资讯管理'
},
{
icon: 'el-icon-receiving',
index: '/configure',
title: '服务配置'
index: '/resourse',
title: '资源库'
},
]
},
{
index: '3',
title: '职站商城后台',
children: [
{
icon: 'el-icon-office-building',
index: '/system',
title: '系统配置'
index: '/shop',
title: '产品管理'
},
{
icon: 'el-icon-box',
index: '/parner',
title: '合伙管理'
index: '/market',
title: '营销管理'
},
{
icon: 'el-icon-data-line',
index: '/parnerOperation',
title: '合伙运营'
title: '小程序内容管理'
},
{
icon: 'el-icon-shopping-cart-2',
index: '/shop',
title: '商城管理'
index: '/parner',
title: '销售代理人管理'
},
]
},
{
icon: 'el-icon-data-board',
index: '/theoryExam',
title: '考试平台'
index: '4',
title: '运营后台',
children: [
{
index: '/match',
title: '大赛管理'
},
{
index: '/data',
title: '数据管理'
},
{
icon: 'el-icon-document-copy',
index: '/review',
title: '评阅平台'
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();
}
})
path: {
handler (val) {
this.active = val === '/configure' ? `/configure?id=${this.$route.query.id}` : val
},
immediate: true
}
},
mounted () {
// sessionStorage.getItem('sideBar') && this.handleSelect(sessionStorage.getItem('sideBar'))
sessionStorage.getItem('token') && this.getPer() //
Setting.dynamicRoute && this.initTabs()
},
methods: {
handleSelect (index) {
this.onRoutes = index
this.$store.commit('setInfoTab', '1')
this.$store.commit('setColumnId', '')
this.$store.commit('setCompetitionCache', null)
sessionStorage.setItem('sideBar', index)
},
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)
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
})
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()
}
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 scoped>
<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;
}
}
}
.sidebar::-webkit-scrollbar {
width: 0;
}

@ -1,31 +1,22 @@
/**
* 阿里云oss配置
* */
import { get } from '@/utils/http'
import api from '@/utils/api'
import CryptoJS from 'crypto-js'
import JSEncrypt from 'jsencrypt'
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
}
import router from '@/router/index'
import { Message } from 'element-ui'
export default async function () {
try {
const res = await get(api.encrypt)
const RE = A(R(res.encryptedKey, res.privateKey), res.encryptedData).split('/')
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: {

@ -0,0 +1,28 @@
export default {
types: [
{
id: 1,
name: '演示文稿类'
},
{
id: 2,
name: '视频类'
},
{
id: 3,
name: '图形类'
},
{
id: 4,
name: '文本类'
},
{
id: 5,
name: '音频类'
},
{
id: 6,
name: '其他'
},
],
}

@ -2,8 +2,7 @@ import Vue from 'vue';
import App from './App.vue';
import router from './router';
import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css'; // 默认主题
import './assets/css/theme-green/index.css'; // 浅绿色主题
import "@/assets/css/default/index.scss";
import './assets/css/icon.css';
import './assets/icon/iconfont.css';
import 'babel-polyfill';
@ -11,8 +10,10 @@ import './utils/rem';
import { post, get, del, put } from './utils/http';
import api from './utils/api';
import store from './store'
import { systemStatus, systemTypeStatus, systemAttributionStatus, courseTypeStatus,
hoursStatus, roleStatus, orderTypeFn, orderStatusFn, orderNatureFn, Percentage, removeByValue, isIE, encodeString, formatDate, downloadFile, dateCompatible } from './utils/core';
import {
systemStatus, systemTypeStatus, systemAttributionStatus, courseTypeStatus,
hoursStatus, roleStatus, orderTypeFn, orderStatusFn, orderNatureFn, Percentage, removeByValue, isIE, encodeString, formatDate, downloadFile, dateCompatible
} from './utils/core';
import preventReClick from './utils/preventReClick' //防多次点击,重复提交
import plugins from '@/directive';

@ -79,19 +79,15 @@ let router = new Router({
},
{
path: '/curriculum',
component: () => import('../views/course/Curriculum.vue'),
component: () => import('../views/course/list'),
},
{
path: '/addcurriculum',
component: () => import('../views/course/AddCurriculum.vue'),
path: '/curriculum/detail',
component: () => import('../views/course/detail'),
},
{
path: '/contentSettings',
component: () => import('../views/course/contentSettings.vue'),
},
{
path: '/addlink',
component: () => import('../views/course/AddLink.vue'),
path: '/curriculum/content',
component: () => import('../views/course/content'),
},
{
path: '/data',
@ -114,8 +110,8 @@ let router = new Router({
component: () => import('../views/match/manage/noticeDetail'),
},
{
path: '/matchArchList',
component: () => import('../views/match/manage/matchArchList'),
path: '/otherArchList',
component: () => import('../views/match/manage/otherArchList'),
},
{
path: '/matchRank',
@ -126,8 +122,8 @@ let router = new Router({
component: () => import('../views/match/manage/trialReport'),
},
{
path: '/theoryArchList',
component: () => import('../views/match/manage/theoryArchList'),
path: '/matchArchList',
component: () => import('../views/match/manage/matchArchList'),
},
{
path: '/theoryReport',
@ -208,8 +204,12 @@ let router = new Router({
component: () => import('../views/shop/list'),
},
{
path: '/shop/addProduct',
component: () => import('../views/shop/addProduct'),
path: '/shop/add',
component: () => import('../views/shop/add'),
},
{
path: '/market',
component: () => import('../views/market'),
},
{
path: '/theoryExam/list',
@ -223,6 +223,18 @@ let router = new Router({
path: '/review',
component: () => import('../views/review'),
},
{
path: '/workbench',
component: () => import('../views/workbench'),
},
{
path: '/resourse',
component: () => import('../views/resourse'),
},
{
path: '/station',
component: () => import('../views/station'),
},
{
path: '/404',
component: () => import('../views/404.vue'),

@ -5,8 +5,8 @@ const url = location.host;
const isDev = process.env.NODE_ENV === 'development' // 开发环境
const isPro = url.includes('huorantech.cn') //正式服
let jumpPath = `${location.origin}/judgmentPoint/`
let sandPath = `http://121.37.12.51/sandbox` // 沙盘地址
let jumpPath = `${location.origin}/panfen/`
let sandPath = `https://www.occupationlab.com/sandbox` // 沙盘地址
let host = `${location.origin}/`
if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
@ -14,11 +14,11 @@ if (isDev) {
sandPath = `http://${location.hostname}:9520`
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'http://121.37.12.51/']
const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'https://occupationlab.com/']
host = ips[+localStorage.getItem('ip')]
} else if (isPro) {
sandPath = `https://izhixinyun.com/sandbox`
jumpPath = 'https://judgment.huorantech.cn/'
// jumpPath = 'https://judgment.huorantech.cn/'
}
@ -51,7 +51,7 @@ const Setting = {
isDev,
isPro,
// 是否使用动态路由
dynamicRoute: false,
dynamicRoute: true,
/**
* @description 默认密码
*/

@ -1,7 +1,6 @@
import Setting from "@/setting";
const { uploadURL, apiBaseURL: host } = Setting
const jumpApi = Setting.isDev ? `http://121.37.12.51/` : Setting.isPro ? `https://judgment.huorantech.cn/` : `http://121.37.12.51/`
const { apiBaseURL: host } = Setting
export default {
logins: `users/users/user/login`, //登录
@ -21,8 +20,8 @@ export default {
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://huoran.oss-cn-shenzhen.aliyuncs.com/%E4%B8%AD%E5%8F%B0%E4%B8%AA%E4%BA%BA%E8%B5%9B%E6%8A%A5%E5%90%8D%E4%BA%BA%E5%91%98%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 中台个人报名人员模板
competionTeamTemplate: `https://huoran.oss-cn-shenzhen.aliyuncs.com/%E4%B8%AD%E5%8F%B0%E5%9B%A2%E9%98%9F%E8%B5%9B%E6%8A%A5%E5%90%8D%E4%BA%BA%E5%91%98%E5%AF%BC%E5%85%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`, // 新增/编辑学生前:校验学号或者学生账号
@ -91,7 +90,8 @@ export default {
oneClickEnableVerification: `users/users/userAccount/oneClickEnableVerification`,
getValueModule: `nakadai/nakadai/valueModuleManagement/getValueModule`,
queryServiceConfig: `nakadai/nakadai/serviceConfiguration/getAllService`, //查询服务配置
queryServiceConfig: `nakadai/nakadai/serviceConfiguration/getAllService`,
workbenchSystemDemonstration: `nakadai/nakadai/serviceConfiguration/workbenchSystemDemonstration`,
// 项目管理
avgValues: `occupationlab/occupationlab/projectManage/avgValues`, // 平均分分配值
deleteProjectManage: `occupationlab/occupationlab/projectManage/deleteProjectManage`, // 新增项目管理
@ -106,8 +106,8 @@ export default {
editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理
copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理
// 判分点
getBcJudgmentPoint: `${jumpApi}judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页)
getLcJudgmentPoint: `${jumpApi}judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页)
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`, // 判分点中间表批量删除
@ -156,7 +156,9 @@ export default {
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`, //单个、批量删除课程
@ -164,6 +166,27 @@ export default {
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`, //修改章节
@ -180,6 +203,7 @@ export default {
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`,
@ -206,6 +230,8 @@ export default {
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`,
// 栏目管理
addColumn: `occupationlab/occupationlab/information/column/addColumn`,
@ -347,6 +373,9 @@ export default {
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`,
@ -414,9 +443,12 @@ export default {
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`,
@ -442,6 +474,7 @@ export default {
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`,
@ -518,4 +551,10 @@ export default {
saveMarketing: `nakadai/nakadai/mall/marketing/promotion/save`,
updateMarketing: `nakadai/nakadai/mall/marketing/promotion/update`,
bannerEnableOrDisable: `nakadai/nakadai/mall/marketing/promotion/bannerEnableOrDisable`,
resourceLibrary: `nakadai/resourceLibrary/resourceLibrary`,
resourceDel: `nakadai/resourceLibrary/batchDeletion`,
resourceFind: `nakadai/resourceLibrary/findById`,
resourceSave: `nakadai/resourceLibrary/saveOrUpdate`,
getFileType: `nakadai/resourceLibrary/getFileType`,
};

@ -1,37 +1,49 @@
<template>
<div class="wrapper">
<v-head></v-head>
<v-sidebar></v-sidebar>
<Navbar></Navbar>
<div class="layout">
<Sidebar :class="{ show: showSidebar }" :path.sync="path" />
<div class="content-box">
<div class="content">
<transition name="move" mode="out-in">
<!-- <keep-alive> -->
<router-view></router-view>
<!-- </keep-alive> -->
</transition>
<el-backtop target=".content"></el-backtop>
<el-backtop target=".content-box"></el-backtop>
</div>
</div>
</div>
</template>
<script>
import vHead from '../components/Header.vue';
import vSidebar from '../components/Sidebar.vue';
import Setting from "@/setting";
import util from "@/libs/util";
import vHead from '../components/Header.vue'
import Navbar from '../components/Navbar.vue'
import Sidebar from '../components/Sidebar.vue'
import Setting from "@/setting"
import util from "@/libs/util"
export default {
data () {
return {
tagsList: [],
showSidebar: false,
path: '',
};
},
components: {
vHead,
vSidebar,
Navbar,
Sidebar,
},
watch: {
'$route.path': {
handler (val) {
this.path = val
//
this.showSidebar = ['/configure', '/curriculum', '/information', '/shop', '/market', '/parnerOperation', '/parner', '/match', '/data', '/review', '/theoreticalCourse', '/resourse'].includes(val)
},
immediate: true
}
},
created () {
// this.autoLogout()
},
methods: {
// ,退
@ -57,3 +69,27 @@ export default {
}
};
</script>
<style lang="scss" scoped>
.layout {
display: flex;
background: #f5f7fa;
.content-box {
width: calc(100vw - 208px);
padding: 20px;
box-sizing: border-box;
// -webkit-transition: left 0.3s ease-in-out;
// transition: left 0.3s ease-in-out;
}
.sidebar:not(.show) {
margin-left: -200px;
&+.content-box {
width: 100%;
}
}
}
</style>

@ -103,6 +103,8 @@
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) => {//
@ -201,6 +203,7 @@ export default {
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
//
@ -229,6 +232,28 @@ export default {
}
});
},
// 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))
},
//
chooseUser (user) {
user.isEnable && this.$post(`${this.api.getToken}?id=${user.id}`).then(({ data }) => {
@ -246,7 +271,8 @@ export default {
this.$store.commit('setDataPer', res.dataPermissionList)
this.$message.success('登录成功!')
this.$router.push({
path: list[0].children[0].path
// path: list[0].children[0].path
path: '/workbench'
});
localStorage.setItem('ms_username', this.param.username);
} catch (e) {

@ -102,17 +102,17 @@
</div>
<div class="border-b-dashed"></div>
<div>
<el-table :data="practiceData" class="table" stripe header-align="center" max-height="400"
<el-table :data="practiceData" class="table" header-align="center" max-height="400"
@selection-change="handleSelectionPractice">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<el-table-column prop="projectName" label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
{{ scope.row.projectName || scope.row.paperName }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column label="排序" align="center" width="100">
<template slot-scope="scope">
<el-input v-model.trim="scope.row.sort"
@ -152,17 +152,17 @@
<div class="border-b-dashed"></div>
<!-- 实训配置 -->
<div>
<el-table :data="assessmentData" class="table" stripe header-align="center" max-height="400"
<el-table :data="assessmentData" class="table" header-align="center" max-height="400"
@selection-change="handleSelectionAssessment">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<el-table-column prop="projectName" label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
{{ scope.row.projectName || scope.row.paperName }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column label="排序" align="center" width="100">
<template slot-scope="scope">
<el-input v-model.trim="scope.row.sort"
@ -201,16 +201,16 @@
<div class="border-b-dashed"></div>
<!-- 实训配置 -->
<div>
<el-table :data="matches" class="table" stripe header-align="center" max-height="400"
<el-table :data="matches" class="table" header-align="center" max-height="400"
@selection-change="handleSelectionMatch">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<el-table-column prop="projectName" label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
{{ scope.row.projectName || scope.row.paperName }}
</template>
</el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column label="排序" align="center" width="100">
<template slot-scope="scope">
<el-input v-model.trim="scope.row.sort"
@ -272,7 +272,7 @@
@change="val => checkAllChange(val, projects[0].systemId)"></el-checkbox>
<li v-for="(item, i) in projects" :key="i" :title="item.projectName">
<el-checkbox v-model="item.check"
:label="item.remark ? item.remark + '(' + item.projectName + ')' : item.projectName"
:label="item.remark ? item.remark + '(' + item.projectName + ')' : (item.projectName || item.paperName)"
@change="val => projectChange(val, item)"></el-checkbox>
</li>
</ul>
@ -285,20 +285,20 @@
</div>
<el-input style="width: 200px;margin-bottom: 20px;" placeholder="请输入项目名称" prefix-icon="el-icon-search"
v-model.trim="checkedKeyword" clearable></el-input>
<el-table :data="checkeds" class="table" stripe header-align="center" max-height="470">
<el-table :data="checkeds" class="table" header-align="center" max-height="470">
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
<el-table-column prop="applicationName" label="系统名称" align="center">
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column prop="projectName" width="80" label="系统类型" align="center">
<template slot-scope="scope">
{{ scope.row.applicationName || systemAll.find(e => e.systemId == scope.row.systemId).systemName }}
{{ scope.row.type === 1 ? '流程类' : scope.row.type === 3 ? '理论' : '编程类' }}
</template>
</el-table-column>
<el-table-column prop="projectName" width="80" label="系统类型" align="center">
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center">
<template slot-scope="scope">
{{ scope.row.type ? '流程类' : '编程类' }}
{{ scope.row.projectName || scope.row.paperName }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="55">
<template slot-scope="scope">
<i :class="['el-icon-delete rm', { disabled: scope.row.disabled }]"
@ -415,7 +415,6 @@ export default {
systemChecked: [],
curSystem: '',
projects: [],
projectAll: [],
projectKeyword: '',
checkedKeyword: '',
checkeds: [],
@ -442,7 +441,7 @@ export default {
projectKeyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.filterProject();
this.getProject();
}, 500);
},
checkedKeyword: function (val) {
@ -577,6 +576,7 @@ export default {
this.pageNo = 1;
this.getConfig();
this.checkeds = JSON.parse(JSON.stringify(type == 1 ? this.assessmentData : type == 2 ? this.matches : this.practiceData))
this.checkedAll = JSON.parse(JSON.stringify(this.checkeds))
},
//
getConfig () {
@ -609,26 +609,23 @@ export default {
}).catch(err => { })
},
//
getProject (item) {
async getProject (item, fromSystemChange) {
const checked = this.checkeds
this.curSystem = item.systemId
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}`).then(res => {
this.projectAll = JSON.parse(JSON.stringify(res)) //
if (item) this.curSystem = item.systemId
let res
if (!fromSystemChange) {
res = await this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${this.curSystem}&keyword=${this.projectKeyword}`)
}
const result = []
res.map(e => {
const projects = fromSystemChange ? this.projects : res
projects.map(e => {
//
const include = checked.some(n => n.projectId == e.projectId && n.systemId == e.systemId)
const include = checked.some(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && n.paperId == e.paperId))
e.check = include
result.push(e)
})
this.checkAll = !result.filter(e => !e.check).length
this.projects = result
}).catch(err => { })
},
//
filterProject () {
const val = this.projectKeyword
this.projects = this.projectAll.filter(e => e.projectName.includes(val))
},
//
systemChange (val, item) {
@ -640,7 +637,7 @@ export default {
})
}
this.projectKeyword = ''
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}`).then(res => {
this.$get(`${this.api.getInternalProjectBySystemId}?permissions=${this.permissions}&systemId=${item.systemId}&keyword=${this.projectKeyword}`).then(res => {
if (val) {
//
if (!this.mulSystem) {
@ -648,18 +645,18 @@ export default {
item.check = true
}
res.map(e => {
if (!checkeds.find(n => n.projectId == e.projectId && n.systemId == e.systemId)) {
if (!checkeds.find(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && e.paperId == n.paperId))) {
checkeds.push(e)
}
})
} else {
res.map(e => {
const i = checkeds.findIndex(n => n.projectId == e.projectId && n.systemId == e.systemId)
const i = checkeds.findIndex(n => (e.projectId && n.projectId == e.projectId && n.systemId == e.systemId) || (e.paperId && e.paperId == n.paperId))
i === -1 || checkeds.splice(i, 1)
})
}
this.checkedAll = JSON.parse(JSON.stringify(checkeds)) //
this.getProject(item)
this.getProject(item, 1)
}).catch(err => { })
},
//
@ -671,8 +668,8 @@ export default {
},
//
projectChange (val, item) {
const { systemId } = item
const i = this.checkeds.findIndex(e => e.projectId == item.projectId && e.systemId == systemId)
const { systemId, paperId } = item
const i = this.checkeds.findIndex(e => (item.projectId && e.projectId == item.projectId && e.systemId == systemId) || (paperId && paperId == e.paperId))
// push
if (val) {
this.checkeds.push(item)
@ -685,12 +682,11 @@ export default {
})
this.checkAll = !this.projects.find(e => !e.check) //
this.checkedAll = JSON.parse(JSON.stringify(this.checkeds)) //
console.log("🚀 ~ file: AddCurriculum.vue ~ line 728 ~ projectChange ~ checkedAll", this.checkeds, item)
},
//
filterChecked () {
const val = this.checkedKeyword
this.checkeds = this.checkedAll.filter(e => e.projectName.includes(val))
this.checkeds = this.checkedAll.filter(e => (e.projectName && e.projectName.includes(val)) || (e.paperName && e.paperName.includes(val)))
},
//
delProject (i, e) {
@ -701,9 +697,9 @@ export default {
this.checkeds.splice(i, 1)
// checkdisabled
if (e.systemId == this.curSystem) {
const { projectId } = e
const { projectId, paperId } = e
this.projects.map(n => {
if (n.projectId == projectId) {
if ((projectId && n.projectId == projectId) || (paperId && n.paperId == paperId)) {
n.check = false
}
})
@ -822,7 +818,8 @@ export default {
form.systemIdByPractice = this.practiceData.map(i => {
let obj = {
isShow: i.isShow,
projectId: i.projectId,
projectId: i.projectId || '',
paperId: i.paperId || '',
sort: Number(i.sort),
systemId: i.systemId
};
@ -838,6 +835,7 @@ export default {
let obj = {
isShow: i.isShow,
projectId: i.projectId,
paperId: i.paperId || '',
sort: Number(i.sort),
systemId: i.systemId
};
@ -850,6 +848,7 @@ export default {
let obj = {
isShow: i.isShow,
projectId: i.projectId,
paperId: i.paperId || '',
sort: Number(i.sort),
systemId: i.systemId
};
@ -864,6 +863,7 @@ export default {
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
debugger
if (form.cid) {
this.$post(this.api.modifyCourse, form).then((res) => {
this.$message.success("编辑成功");
@ -1043,7 +1043,7 @@ $avatar-width: 104px;
&.active,
&:hover {
color: #9076ff;
color: #062c87;
}
span {

@ -1,204 +0,0 @@
<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>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,610 @@
<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>

@ -6,8 +6,7 @@
</div>
</el-card>
<!--内容设置-->
<el-card shadow="hover" class="mgb20">
<div class="page">
<div class="page mgb20">
<div class="relative">
<div class="p-title">内容设置</div>
<div class="btns">
@ -45,7 +44,7 @@
</div>
</div>
<el-table :data="chapter.subsectionList" class="table" stripe header-align="center" row-key="id">
<el-table :data="chapter.subsectionList" class="table" header-align="center" row-key="id">
<el-table-column v-if="sorting" width="55" align="center">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.check"></el-checkbox>
@ -191,7 +190,6 @@
<Pdf :visible.sync="pdfVisible" :src.sync="pdfSrc" />
</div>
</div>
</el-card>
<div class="player-download" id="playerDownload"></div>
<el-dialog title="资源移动" :visible.sync="moveVisible" :close-on-click-modal="false" width="330px">
@ -826,9 +824,9 @@ export default {
}
.action-btn {
color: #9076ff;
color: #062c87;
font-size: 14px;
border: #9076ff 1px solid;
border: #062c87 1px solid;
background-color: #fff;
border-radius: 4px;
}

File diff suppressed because it is too large Load Diff

@ -1,7 +1,6 @@
<template>
<div>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
@ -11,62 +10,40 @@
<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"
<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 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"
<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 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
<el-input placeholder="请输入课程名称" prefix-icon="el-icon-search" v-model="form.curriculumName" clearable
@keyup.enter.native="onSearch"></el-input>
</el-form-item>
</el-col>
@ -75,110 +52,71 @@
</div>
</el-card>
<el-card shadow="hover"
class="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>
<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"
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">
<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 prop="userName"
label="创建人"
align="center"></el-table-column>
<el-table-column label="配置的实训应用"
align="center">
<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">
<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 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">
<el-table-column label="操作" width="240" 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>
<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>
<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: "实训课程"
0: '理论课程',
1: '实训课程',
2: '理实课程',
},
name: localStorage.getItem("ms_username"),
courseData: [],
@ -186,7 +124,7 @@ export default {
categoryId: +this.$route.query.categoryId || '',
professionalCategoryId: +this.$route.query.professionalCategoryId || '',
professionalId: +this.$route.query.professionalId || '',
curriculumType: this.$route.query.curriculumType ? +this.$route.query.curriculumType : '',
curriculumType: this.$route.query.curriculumType || '',
curriculumName: this.$route.query.curriculumName || ''
},
page: +this.$route.query.page || 1,
@ -213,23 +151,23 @@ export default {
this.getData();
},
methods: {
getRowKeys (row) {
return row.cid;
},
//
getData () {
async getData () {
try {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
let data = {
this.loading = true
const { page } = await this.$post(this.api.curriculumList, {
...this.form,
pageNum: this.page,
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 => { });
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;
@ -284,17 +222,35 @@ export default {
//
addcourse () {
this.setReferrer()
this.$router.push("/addcurriculum");
this.$router.push("/curriculum/detail");
},
//
edit (row) {
this.setReferrer()
this.$router.push(`/addcurriculum?cid=${row.cid}`);
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(`/contentSettings?cid=${row.cid}&name=${row.curriculumName}`);
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}&copy=1`)
},
//
handleDelete (row) {
@ -374,4 +330,3 @@ export default {
min-height: calc(100vh - 300px);
}
</style>

@ -130,8 +130,8 @@
<el-button type="primary" @click="exportList">导出列表</el-button>
</div>
</div>
<el-table :data="products" class="orderTable" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table :data="products" class="orderTable" header-align="center" @selection-change="handleSelectionChange"
row-key="id">
<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>
@ -139,7 +139,7 @@
<el-table-column prop="productTypeName" label="产品分类" align="center"></el-table-column>
<el-table-column label="起止日期" align="center">
<template slot-scope="scope">
{{ scope.row.status === '已过期' ? '' : scope.row.startAndEndTime }}
{{ scope.row.status === '已过期' ? '-' : scope.row.startAndEndTime }}
<el-tooltip v-if="scope.row.other" class="item" effect="dark" placement="top">
<div slot="content">
还有<span v-html="scope.row.other"></span><br>的订单还未生效
@ -173,14 +173,14 @@
<ul class="filter">
<li>
<label>订单类型</label>
<el-select v-model="form3.orderType" clearable placeholder="请选择订单类型" @change="getOrder">
<el-select v-model="form3.orderType" clearable placeholder="请选择订单类型" @change="initOrder">
<el-option v-for="(item, index) in orderTypeList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</li>
<li>
<label>订单状态</label>
<el-select v-model="form3.orderStatus" clearable placeholder="请选择订单状态" @change="getOrder">
<el-select v-model="form3.orderStatus" clearable placeholder="请选择订单状态" @change="initOrder">
<el-option v-for="(item, index) in orderStatusList" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select>
@ -191,8 +191,8 @@
v-model="form3.keyword"></el-input>
</div>
</div>
<el-table :data="orders" class="orderTable" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="orderId">
<el-table :data="orders" class="orderTable" header-align="center" @selection-change="handleSelectionChange"
row-key="orderId">
<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>
@ -200,7 +200,7 @@
<el-table-column prop="orderContent" label="订单内容" align="center">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top" style='width: 500px'
v-if='scope.row.orderContent.length > 14'>
v-if='scope.row.orderContent && scope.row.orderContent.length > 14'>
<p> {{ scope.row.orderContent }}</p>
<div slot="reference" class="name-wrapper">
<el-tag size="medium" class='tags'>{{ scope.row.orderContent }}</el-tag>
@ -234,7 +234,7 @@
clearable></el-input>
</div>
</div>
<el-table :data="contractInformations" class="table" stripe header-align="center">
<el-table :data="contractInformations" class="table" header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
<el-table-column prop="contractNumber" label="订单号" align="center"></el-table-column>
@ -270,7 +270,7 @@
v-model="bmsKeyword"></el-input>
</div>
</div>
<el-table :data="bms" class="table" stripe header-align="center">
<el-table :data="bms" class="table" header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" width="200" align="center">
<template slot-scope="scope">
@ -336,7 +336,7 @@
clearable></el-input>
<i class="el-icon-circle-plus plus-cus" @click="addCustomer"></i>
</div>
<el-table :data="customers" class="table" ref="table" stripe header-align="center" row-key="customerId">
<el-table :data="customers" class="table" ref="table" header-align="center" row-key="customerId">
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (pageCustomer - 1) * pageSizeCustomer + 1 }}
@ -526,6 +526,7 @@ export default {
],
products: [],
productAll: [],
productAllOrigin: [],
pageProduct: this.$route.query.type === 'tab2' ? (+this.$route.query.page || 1) : 1,
pageSizeProduct: 10,
totalProduct: 0,
@ -702,7 +703,7 @@ export default {
})
//
// if (list[0].startTime && list[0].endTime) {
if (list[0].startTime && now < new Date(list[0].startTime).getTime()) {
if (list[0].startTime && now < new Date(list[0].startTime)) {
e.startTime = list[0].startTime
e.endTime = connect ? list[list.length - 1].endTime : list[0].endTime
e.status = '未生效'
@ -716,7 +717,7 @@ export default {
e.other += `<br>${j.startTime} ~ ${j.endTime}`
})
}
} else if (list[list.length - 1].endTime && now > new Date(list[list.length - 1].endTime).getTime()) {
} else if (list[list.length - 1].endTime && now > new Date(list[list.length - 1].endTime)) {
e.status = '已过期'
} else {
//
@ -729,7 +730,7 @@ export default {
for (const j in list) {
const i = +j
const n = list[i]
if (n.startTime && n.endTime && now >= new Date(n.startTime).getTime() && now <= new Date(n.endTime).getTime()) {
if (n.startTime && n.endTime && now >= new Date(n.startTime) && now <= new Date(n.endTime)) {
//
e.startTime = n.startTime
e.endTime = n.endTime
@ -744,7 +745,7 @@ export default {
})
}
break
} else if (i != 0 && list[i - 1].endTime && n.startTime && n.endTime && now > new Date(list[i - 1].endTime).getTime() && now < new Date(n.startTime).getTime()) {
} else if (i != 0 && list[i - 1].endTime && n.startTime && n.endTime && now > new Date(list[i - 1].endTime) && now < new Date(n.startTime)) {
//
e.startTime = n.startTime
e.endTime = n.endTime
@ -775,13 +776,14 @@ export default {
}
})
this.productAll = data
this.productAllOrigin = data
this.totalProduct = data.length
this.handlePage()
}).catch(res => { })
},
//
getRemain (startTime, endTime) {
return parseInt(((new Date(endTime).getTime() - new Date(startTime).getTime()) / 86400000))
return parseInt(((new Date(endTime) - new Date(startTime)) / 86400000))
},
//
handlePage () {
@ -792,6 +794,15 @@ export default {
this.handlePage()
this.$router.push(`addcustomer?id=${this.customerId}&type=tab2&page=${val}`)
},
//
filterForm2 () {
const list = this.productAllOrigin
const { productType, status, keyword } = this.form2
this.productAll = list.filter(e => (productType === '' || productType === e.productType) && (e.status === status || status === '全部') && (!e.goodsName || (e.goodsName && e.goodsName.includes(keyword))))
this.pageProduct = 1
this.totalProduct = this.productAll.length
this.handlePage()
},
//
setCustomer () {
this.initCustomer()
@ -902,12 +913,6 @@ export default {
this.productTypeList = res.classificationList
}).catch(err => { })
},
//
filterForm2 () {
const list = this.productAll
const { productType, status, keyword } = this.form2
this.products = list.filter(e => (productType === '' || productType === e.productType) && (e.status === status || status === '全部') && (!e.goodsName || (e.goodsName && e.goodsName.includes(keyword))))
},
//
exportList () {
let list = this.productAll
@ -935,11 +940,11 @@ export default {
//
getOrder () {
const { orderStatus, orderType } = this.form3
const { orderStatus, orderType, keyword } = this.form3
this.$post(this.api.getCustomerOrderRecord, {
customerId: this.customerId,
cityId: '',
customerName: this.form.customerName,
orderContent: keyword,
orderStatus,
orderType,
pageNo: this.pageOrder,
@ -1259,12 +1264,12 @@ export default {
.radio_icon {
font-size: 26px;
color: #9278ff;
color: #062c87;
}
/deep/.warning {
margin-left: 5px;
color: #9278ff;
color: #062c87;
}
.tags {
@ -1291,7 +1296,7 @@ export default {
.plus-cus {
margin-left: 10px;
font-size: 18px;
color: #9076ff;
color: #062c87;
cursor: pointer;
}
@ -1303,7 +1308,7 @@ export default {
cursor: pointer;
&:hover {
color: #9076ff;
color: #062c87;
}
}
}

@ -1,11 +1,8 @@
<template>
<div>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title"
v-preventReClick
@click="back">
<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>
@ -13,80 +10,46 @@
</div>
</el-card>
<el-card shadow="hover"
class="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"
<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 :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 prop="orderNumber" label="订单编号" align="center">
</el-table-column>
<el-table-column prop="customerName"
label="客户名称"
align="center">
<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 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 prop="createTime" label="订单日期" align="center">
</el-table-column>
<el-table-column prop="orderType"
label="订单类型"
align="center">
<el-table-column prop="orderType" label="订单类型" align="center">
</el-table-column>
<el-table-column prop="orderStatus"
label="订单状态"
align="center">
<el-table-column prop="orderStatus" label="订单状态" align="center">
</el-table-column>
<el-table-column prop="orderNature"
label="订单性质"
align="center">
<el-table-column prop="orderNature" label="订单性质" align="center">
</el-table-column>
<el-table-column label="操作"
align="center">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text"
@click="toDetail(scope.row)">查看</el-button>
<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 background layout="total, prev, pager, next" @current-change="handleCurrentChange"
:current-page="page" :total="totals">
</el-pagination>
</div>
</el-card>
@ -181,9 +144,11 @@ export default {
.card {
min-height: calc(100vh - 300px);
}
.mag {
margin-right: 20px;
}
.cell {
white-space: pre-wrap;
width: 140px;
@ -194,6 +159,7 @@ export default {
line-clamp: 2;
-webkit-box-orient: vertical;
}
.tags {
border: none;
background: none;
@ -208,4 +174,3 @@ export default {
-webkit-box-orient: vertical;
}
</style>

@ -44,7 +44,7 @@
<p class="addhr_tag"></p>
<span>应用列表</span>
</div>
<el-table :data="permissionData" class="table" stripe :span-method="SpanMethod" header-align="center">
<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">
@ -90,10 +90,7 @@
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.swtich"
active-text="开启"
inactive-text="关闭"
<el-switch v-model="scope.row.swtich" active-text="开启" inactive-text="关闭"
@change="changeSwitch(scope.row)">
</el-switch>
</template>
@ -113,7 +110,7 @@
<p class="hr_tag"></p>
<span>客户列表</span>
</div>
<el-table :data="permissionData" class="table" stripe header-align="center">
<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">
@ -219,24 +216,31 @@
border-left: 1px dashed #eee;
padding: 0 60px;
}
.border_lf label {
width: 120px;
}
.pad_none {
padding: 0 0 0 60px;
}
.mar_input {
margin-right: 80px;
}
.marb30 {
margin-bottom: 30px;
}
.tab_temp label {
width: 60px;
}
.mar10 {
margin-top: 10px;
}
.radio_icon {
font-size: 26px;
color: #9278FF;

@ -57,7 +57,7 @@
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
</div>
</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center"
<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">

@ -5,11 +5,14 @@
<div class="plus">
<i class="el-icon-circle-plus-outline" @click.stop="addType(0)"></i>
</div>
<el-tree ref="type" :data="typeList" node-key="id" accordion :default-expanded-keys="defaultActive" :current-node-key="categoryId" :props="defaultProps" :highlight-current="true" v-loading="loadingType" @current-change="typeClick">
<el-tree ref="type" :data="typeList" node-key="id" accordion :default-expanded-keys="defaultActive"
:current-node-key="categoryId" :props="defaultProps" :highlight-current="true" v-loading="loadingType"
@current-change="typeClick">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :title="node.label">{{ node.label }}</span>
<span class="actions">
<i class="el-icon-circle-plus-outline" @click.stop="addType(node)" v-if="data.level != 6" v-auth="'/data:数据架构:新增分类'"></i>
<i class="el-icon-circle-plus-outline" @click.stop="addType(node)" v-if="data.level != 6"
v-auth="'/data:数据架构:新增分类'"></i>
<i class="el-icon-edit" @click.stop="editType(node)" v-auth="'/data:数据架构:编辑分类'"></i>
<i class="el-icon-delete" @click.stop="delType(node)" v-auth="'/data:数据架构:删除分类'"></i>
</span>
@ -21,7 +24,8 @@
<el-form label-width="80px" class="flex-between mgb20">
<div class="flex-center">
<el-form-item label="更新时间" style="margin: 0 20px 0 0">
<el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="initData"></el-date-picker>
<el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" @change="initData"></el-date-picker>
</el-form-item>
<el-input placeholder="请输入数据表名称" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input>
</div>
@ -30,7 +34,8 @@
<el-button type="primary" round @click="delAllSelection" v-auth="'/data:数据架构:批量删除'">批量删除</el-button>
</div>
</el-form>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table :data="listData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="70" label="序号" align="center"></el-table-column>
<el-table-column prop="tableComment" label="数据表名称" align="center">
@ -57,28 +62,21 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total">
<el-pagination background layout="total, prev, pager, next" :current-page="page"
@current-change="handleCurrentChange" :total="total">
</el-pagination>
</div>
</div>
<!-- 导入数据 -->
<el-dialog title="导入" :visible.sync="importVisible" width="80%" center @close="closeImport" class="dialog" :close-on-click-modal="false">
<el-dialog title="导入" :visible.sync="importVisible" width="80%" center @close="closeImport" class="dialog"
:close-on-click-modal="false">
<el-container style="padding: 20px 0 20px 20px;background-color: #f0f0f0;">
<div style="overflow:auto;height: 558px;width:330px;padding:15px;background:#fff" ref="typeTreeWrap" @scroll="loadType">
<el-tree v-loading="importLoading"
ref="typeTree"
:data="importTypeList"
node-key="id"
accordion
:default-expanded-keys="defaultTypeActive"
:default-checked-keys="defaultTypeChecked"
:current-node-key="curId"
show-checkbox
:props="defaultProps"
highlight-current
@node-click="importTypeClick"
@node-expand="importTypeExpand"
>
<div style="overflow:auto;height: 558px;width:330px;padding:15px;background:#fff" ref="typeTreeWrap"
@scroll="loadType">
<el-tree v-loading="importLoading" ref="typeTree" :data="importTypeList" node-key="id" accordion
:default-expanded-keys="defaultTypeActive" :default-checked-keys="defaultTypeChecked"
:current-node-key="curId" show-checkbox :props="defaultProps" highlight-current
@node-click="importTypeClick" @node-expand="importTypeExpand">
</el-tree>
</div>
@ -88,9 +86,10 @@
<p class="hr_tag"></p>
<span>预览</span>
</div>
<el-table :data="fieldData" stripe header-align="center" v-if="fieldHead.length">
<el-table :data="fieldData" header-align="center" v-if="fieldHead.length">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column v-for="(item,index) in fieldHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column>
<el-table-column v-for="(item, index) in fieldHead" :prop="item.field" :key="index" :label="item.comment"
align="center"></el-table-column>
</el-table>
</el-card>
</el-main>
@ -102,7 +101,8 @@
</span>
</el-dialog>
<!-- 新增编辑分类 -->
<el-dialog :title="id ? '编辑分类' : '新增分类'" :visible.sync="typeVisible" width="24%" center @close="closeType" :close-on-click-modal="false">
<el-dialog :title="id ? '编辑分类' : '新增分类'" :visible.sync="typeVisible" width="24%" center @close="closeType"
:close-on-click-modal="false">
<el-input placeholder="请输入分类名称" v-model="categoryName"></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="typeVisible = false"> </el-button>
@ -111,9 +111,10 @@
</el-dialog>
<!-- 预览 -->
<el-dialog title="预览" :visible.sync="previewVisible" width="60%" center :close-on-click-modal="false">
<el-table :data="previewData" class="table" stripe header-align="center" row-key="id">
<el-table :data="previewData" class="table" header-align="center" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column>
<el-table-column v-for="(item, index) in previewHead" :prop="item.field" :key="index" :label="item.comment"
align="center"></el-table-column>
</el-table>
</el-dialog>
<!-- 编辑产品数据表名称 -->
@ -126,14 +127,15 @@
</el-dialog>
<!-- 自定义表头 -->
<el-dialog title="自定义表头" :visible.sync="headVisible" width="60%" center :close-on-click-modal="false">
<el-table :data="previewData" class="table" stripe header-align="center" row-key="id" :key="editIndex">
<el-table :data="previewData" class="table" header-align="center" row-key="id" :key="editIndex">
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
<template v-if="scope.row.custom">序号</template>
<template v-else>{{ scope.$index }}</template>
</template>
</el-table-column>
<el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.oldComment" align="center">
<el-table-column v-for="(item, index) in previewHead" :prop="item.field" :key="index" :label="item.oldComment"
align="center">
<template slot-scope="scope">
<template v-if="scope.row.custom">
<el-input placeholder="请输入" size="medium" v-model="item.comment"></el-input>
@ -742,26 +744,31 @@ export default {
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;
}
.plus {
text-align: right;
color: #9278FF;
cursor: pointer;
}
.custom-tree-node {
flex: 1;
display: inline-flex;
justify-content: space-between;
align-items: center;
.actions {
i {
margin-left: 5px;

@ -1,77 +1,51 @@
<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"
<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;">
<div class="flex-between" style="margin-bottom: 10px;">
<p>数据简介</p>
<el-button v-if="introduceText && !editing"
type="primary"
@click="editing = !editing"
<el-button v-if="introduceText && !editing" type="primary" @click="editing = !editing"
v-auth="'/data:数据简介:编辑'">编辑</el-button>
</div>
<div class="intro"
v-if="!introduceText && !editing">
<div class="intro" v-if="!introduceText && !editing">
<p class="text">请添加简介</p>
<div class="btn">
<el-button type="primary"
@click="edit">添加</el-button>
<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>
<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"
<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>
<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>
style="color: #062c87;border: 1px solid #062c87;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)">
<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">
<div class="btns" v-if="editing">
<el-button @click="editing = false"> </el-button>
<el-button type="primary"
@click="confirmData"> </el-button>
<el-button type="primary" @click="confirmData"> </el-button>
</div>
</div>
</div>
@ -245,58 +219,72 @@ export default {
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;
}
}
.field {
margin-top: 20px;
text-align: left;
.label {
margin-bottom: 10px;
}
}
.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;
}
}
.mag {
margin-right: 20px;
margin-left: 20px;
}
.el-tag+.el-tag {
margin-left: 10px;
}
.button-new-tag {
margin-left: 10px;
height: 32px;
@ -304,6 +292,7 @@ export default {
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 90px;
margin-left: 10px;

@ -5,12 +5,14 @@
<ul class="filter">
<li>
<label>创建日期</label>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable></el-date-picker>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable></el-date-picker>
</li>
<li>
<label>状态</label>
<el-select v-model="status" clearable placeholder="请选择状态" @change="initData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
<el-option v-for="(item, index) in statusList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</li>
</ul>
@ -25,7 +27,8 @@
<el-button type="primary" round @click="delAllSelection" v-auth="'/data:产品管理:批量删除'">批量删除</el-button>
</div>
</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table :data="listData" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
row-key="id">
<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="productName" label="产品名称" align="center"></el-table-column>
@ -36,7 +39,8 @@
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="orderNature" label="状态" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" :active-text="scope.row.status ? '上架' : '下架'" :active-value="1" :inactive-value="0" @change="switchOff($event,scope.row,scope.$index)" v-auth="'/data:产品管理:上架'"></el-switch>
<el-switch v-model="scope.row.status" :active-text="scope.row.status ? '上架' : '下架'" :active-value="1"
:inactive-value="0" @change="switchOff($event, scope.row, scope.$index)" v-auth="'/data:产品管理:上架'"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作">
@ -48,24 +52,28 @@
</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>
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChange"
:current-page="page" :total="totals"></el-pagination>
</div>
<el-dialog :title="isDetail ? '查看产品' : (id ? '编辑产品' : '新增产品')" :visible.sync="productVisible" width="600px" center @close="closeProduct" class="dialog" :close-on-click-modal="false">
<el-dialog :title="isDetail ? '查看产品' : (id ? '编辑产品' : '新增产品')" :visible.sync="productVisible" width="600px" center
@close="closeProduct" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="98px" :disabled="isDetail" v-loading="loading">
<el-form-item label="数据产品名称">
<el-input v-model="productName" placeholder="请输入数据产品名称"></el-input>
</el-form-item>
<el-form-item label="供应厂商" prop="supplier">
<el-select v-model="supplier" clearable placeholder="请选择供应厂商">
<el-option v-for="(item, i) in suppliers" :key="i" :label="item.supplierName" :value="item.supplierId"></el-option>
<el-option v-for="(item, i) in suppliers" :key="i" :label="item.supplierName"
:value="item.supplierId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="配置数据">
<el-button type="primary" @click="configData">配置数据权限</el-button>
</el-form-item>
<div class="type-wrap" ref="typeWrap" @scroll="loadType" v-show="checkedIds.length">
<el-tree ref="type" :data="typeList" show-checkbox accordion node-key="id" :default-expanded-keys="checkedIds" :default-checked-keys="checkedIds" :props="defaultProps" @node-expand="typeExpand">
<el-tree ref="type" :data="typeList" show-checkbox accordion node-key="id" :default-expanded-keys="checkedIds"
:default-checked-keys="checkedIds" :props="defaultProps" @node-expand="typeExpand">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :title="node.label">{{ node.label }}</span>
</span>
@ -78,10 +86,13 @@
</span>
</el-dialog>
<el-dialog title="数据配置" :visible.sync="configVisible" width="70%" center @close="closeConfig" :close-on-click-modal="false">
<el-dialog title="数据配置" :visible.sync="configVisible" width="70%" center @close="closeConfig"
:close-on-click-modal="false">
<el-container style="padding: 20px 0 20px 20px;background-color: #f0f0f0;">
<el-aside width="300px">
<el-tree style="margin: 10px;" ref="typeConfig" :data="typeConfigList" show-checkbox node-key="id" accordion :default-expanded-keys="configIds" :default-checked-keys="configIds" :current-node-key="categoryId" :props="defaultProps" highlight-current @current-change="typeConfigClick">
<el-tree style="margin: 10px;" ref="typeConfig" :data="typeConfigList" show-checkbox node-key="id" accordion
:default-expanded-keys="configIds" :default-checked-keys="configIds" :current-node-key="categoryId"
:props="defaultProps" highlight-current @current-change="typeConfigClick">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :title="node.label">{{ node.label }}</span>
</span>
@ -93,12 +104,14 @@
<el-form label-width="80px" class="flex-between mgb20">
<div class="flex-center">
<el-form-item label="创建日期" style="margin: 0 20px 0 0">
<el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="initConfigData"></el-date-picker>
<el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" @change="initConfigData"></el-date-picker>
</el-form-item>
<el-input placeholder="请输入数据表名称" v-model="keywordConfig" prefix-icon="el-icon-search" clearable></el-input>
<el-input placeholder="请输入数据表名称" v-model="keywordConfig" prefix-icon="el-icon-search"
clearable></el-input>
</div>
</el-form>
<el-table :data="listConfigData" class="table" ref="table" stripe header-align="center">
<el-table :data="listConfigData" class="table" ref="table" header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="showName" label="数据表名称" align="center"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" align="center"></el-table-column>
@ -111,7 +124,8 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :current-page="pageConfig" @current-change="handleCurrentConfigChange" :total="totalConfig"></el-pagination>
<el-pagination background layout="total, prev, pager, next" :current-page="pageConfig"
@current-change="handleCurrentConfigChange" :total="totalConfig"></el-pagination>
</div>
</el-card>
</el-main>
@ -123,9 +137,10 @@
</el-dialog>
<el-dialog title="预览" :visible.sync="previewVisible" width="60%" center :close-on-click-modal="false">
<el-table :data="previewData" class="table" stripe header-align="center" row-key="id">
<el-table :data="previewData" class="table" header-align="center" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column>
<el-table-column v-for="(item, index) in previewHead" :prop="item.field" :key="index" :label="item.comment"
align="center"></el-table-column>
</el-table>
</el-dialog>
</div>
@ -668,20 +683,24 @@ export default {
/deep/.el-input--suffix .el-input__inner {
padding-right: 56px;
}
.type-wrap {
height: 450px;
margin-left: 25px;
overflow: auto;
}
.settlement {
display: flex;
margin-bottom: 10px;
.label {
margin-right: 10px;
white-space: nowrap;
color: #606266;
font-size: 14px;
}
.el-input {
width: 150px;
margin-right: 30px;

@ -6,26 +6,19 @@
<h1>欢迎使用开发者平台</h1>
<div class="form">
<ul class="tab">
<li v-for="(item, i) in tabList" :key="i" :class="{active: activeIndex == item.id}" @click="handleSelect(item.id)">{{item.label}}</li>
<li v-for="(item, i) in tabList" :key="i" :class="{ active: activeIndex == item.id }"
@click="handleSelect(item.id)">{{ item.label }}</li>
</ul>
<el-form v-show="activeIndex === '1'" :model="param" :rules="rules" ref="login" label-width="0px">
<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 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 placeholder="请输入验证码" v-model="param.code" @keyup.enter.native="submitForm()">
</el-input>
<img @click="blur" :src="verificationIMG" class="verification" alt="">
</el-form-item>
@ -34,24 +27,17 @@
</div>
</el-form>
<el-form v-show="activeIndex==='2'" :model="phoneOrEmail" :rules="phoneOrEmailrules" ref="phoneOrEmail" label-width="0px">
<el-form v-show="activeIndex === '2'" :model="phoneOrEmail" :rules="phoneOrEmailrules" ref="phoneOrEmail"
label-width="0px">
<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 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 placeholder="请输入验证码" v-model="phoneOrEmail.code" @keyup.enter.native="submitForm('phone')">
</el-input>
<img @click="phoneBlur" :src="PhoneVerificationIMG" class="verification" alt="">
</el-form-item>
@ -71,7 +57,8 @@
<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>
<el-button style="margin-left:10px" @click="sendPhoneCode" :disabled="phoneDisabled">{{ phoneBtnText
}}</el-button>
</div>
</el-form-item>
</el-form>
@ -80,6 +67,20 @@
<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>
@ -87,6 +88,9 @@
<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) => {//
@ -155,8 +159,10 @@ export default {
phoneDisabled: false,
phoneBtnText: '发送验证码',
phoneTimer: '',
phoneOpener:''
phoneOpener: '',
userVisible: false,
users: [],
};
},
components: {
@ -190,26 +196,29 @@ export default {
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
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()
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()
}
} else {
param.code = ''
this.$message.error(message)
}
})
}).catch(err => {
if (err.status === 30001) {
this.phoneVisible = true
}else if(err.status == 10004){
} else if (err.status == 10004 || err.status == 10005) {
param.code = ''
this.blur()
}
});
@ -218,7 +227,54 @@ export default {
return false;
}
});
},
// 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))
},
//
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
});
localStorage.setItem('ms_username', this.param.username);
} catch (e) {
if (e.status === 500) {
sessionStorage.clear()
}
}
},
blur () {
this.param.random = Math.floor(Math.random() * 999999999)
@ -305,24 +361,28 @@ export default {
.wrap {
min-height: 100%;
}
.logo {
z-index: 2;
position: absolute;
top: 50px;
left: 50px;
}
.login {
position: relative;
height: 100%;
height: 100vh;
background-image: url(../assets/img/devLogin.jpg);
background-size: 100%;
}
.box {
width: 448px;
position: absolute;
right: 20%;
top: 50%;
transform: translateY(-50%);
h1 {
margin-bottom: 20px;
font-size: 34px;
@ -330,21 +390,25 @@ export default {
text-align: center;
}
}
/deep/ .form {
padding: 20px 60px 0;
background-color: rgba(255, 255, 255, .3);
border-radius: 4px;
box-sizing: border-box;
border: 4px solid rgba(255, 255, 255, .2);
.el-input__inner {
height: 50px;
line-height: 50px;
border: 1px solid rgba(220, 220, 220, 1);
border-radius: 2px;
}
.el-form-item {
margin-bottom: 25px;
}
.verification {
position: absolute;
top: 1px;
@ -354,11 +418,13 @@ export default {
cursor: pointer;
}
}
.tab {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 24px;
li {
padding: 18px 5px;
margin: 0 20px;
@ -367,23 +433,28 @@ export default {
color: #fff;
cursor: pointer;
border-bottom: 2px solid transparent;
&:last-child {
margin-right: 0;
}
&.active {
color: #fff;
border-bottom-color: #ccc;
}
}
}
.title {
font-size: 16px;
text-align: center;
font-weight: bold;
}
.login-btn {
text-align: center;
}
.login-btn button {
width: 100%;
height: 48px;
@ -393,13 +464,55 @@ export default {
border-radius: 4px;
border: 0;
}
.forget {
margin-bottom: 28px;
text-align: right;
color: #999;
font-weight: bold;
&:hover {
color: #0092FF;
}
}
/deep/.user-dia {
.tips {
margin-bottom: 20px;
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;
}
}
}
}
</style>

@ -4,108 +4,54 @@
<!-- <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>
<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"
<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">
<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 prop="title" label="标题" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="title"
label="栏目"
show-overflow-tooltip
align="center">
<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">
<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>
<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">
<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">
<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>
<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">
<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 ? '关' : '开'"
<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 background layout="total, prev, pager, next" :total="totals"
@current-change="handleCurrentChange" :current-page="pageNo">
</el-pagination>
</div>
</div>

@ -2,19 +2,11 @@
<!-- 内容管理 -->
<div class="flex">
<div class="menu-con">
<el-tree ref="column"
:data="menuList"
:props="{ label: 'name' }"
highlight-current
:expand-on-click-node="false"
default-expand-all
node-key="id"
@node-click="handleSelect"></el-tree>
<el-tree ref="column" :data="menuList" :props="{ label: 'name' }" highlight-current :expand-on-click-node="false"
default-expand-all node-key="id" @node-click="handleSelect"></el-tree>
</div>
<div class="right">
<ContentList ref="content"
v-show="menuList.length"
:columnId="columnId" />
<ContentList ref="content" v-show="menuList.length" :columnId="columnId" />
</div>
</div>
</template>
@ -102,15 +94,18 @@ export default {
height: calc(100vh - 250px);
border-right: solid 1px #e6e6e6;
background-color: #f2f6fc;
/deep/.el-tree-node__content {
height: 50px;
}
}
.right {
flex: 1;
}
/deep/.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
color: #fff;
background-color: #9278ff;
background-color: #062c87;
}
</style>

@ -2,17 +2,11 @@
<!-- 资讯管理 -->
<div class="page">
<ul class="column-tab">
<li :class="{active: tabsName == 1}"
@click="handleClick(1)"><i class="el-icon-collection-tag"></i> 栏目管理</li>
<li :class="{active: tabsName == 2}"
@click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
<li :class="{ active: tabsName == 1 }" @click="handleClick(1)"><i class="el-icon-collection-tag"></i> 栏目管理</li>
<li :class="{ active: tabsName == 2 }" @click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
</ul>
<columnManage class="flex-1"
ref="content1"
v-if="tabsName == 1" />
<ContentManage class="flex-1"
ref="content2"
v-if="tabsName == 2" />
<columnManage class="flex-1" ref="content1" v-if="tabsName == 1" />
<ContentManage class="flex-1" ref="content2" v-if="tabsName == 2" />
</div>
</template>
@ -75,23 +69,28 @@ export default {
.flex-1 {
flex: 1;
}
.page {
display: flex;
}
.column-tab {
width: 120px;
border-right: solid 1px #e6e6e6;
li {
display: flex;
align-items: center;
height: 60px;
cursor: pointer;
i {
margin-right: 5px;
}
&:hover,
&.active {
color: #9278ff;
color: #062c87;
}
}
}

@ -0,0 +1,251 @@
<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>

@ -154,9 +154,10 @@ export default {
next (next, setupId, competitionId) {
if (!next) {
if (this.step === 3 && this.$refs['step' + this.step].form[0].contentId) {
// &&
// &&
this.editing = 0
this.step = 1
this.$parent.initTabs && this.$parent.initTabs()
} else {
//
this.$router.push(`/match`)
@ -297,28 +298,28 @@ export default {
.active {
.circle {
color: #fff;
border-color: #459ffb;
background: #007eff;
border-color: #26499f;
background: #062c87;
}
.text {
color: #007eff;
color: #062c87;
}
}
.done {
.circle {
color: #fff;
background: #9c86ff;
border-color: #bbacff;
background: #062c87;
border-color: #26499f;
&:after {
background: #bbacff;
background: #062c87;
}
}
.text {
color: #9178ff;
color: #062c87;
}
}

@ -25,22 +25,39 @@
</div>
</el-card>
<!-- 理论系统 -->
<template v-if="isTheory">
<!-- 理论系统选择试卷库非理论则选择系统 -->
<el-card shadow="hover" class="mgr20 m-b-20">
<el-card shadow="hover" class="m-b-20">
<div>
<p class="m-b-20">试卷库</p>
<el-radio-group class="m-b-20" v-model="courseSystem" @change="courseSystemChange">
<el-radio :label="0">从课程中选择</el-radio>
<el-radio :label="1">从系统中选择</el-radio>
</el-radio-group>
<div class="inline-input">
<el-select v-model="libraryId" placeholder="请选择试卷库" @change="getProject">
<!-- 选择系统 -->
<el-select v-if="courseSystem" v-model="systemId" placeholder="请选择系统" @change="getProject">
<el-option v-for="(item, i) in services" :key="i" :label="item.systemName" :value="item.systemId">
</el-option>
</el-select>
<template v-else>
<!-- 理论 && 选择课程 -->
<el-select v-if="isTheory && !courseSystem" v-model="libraryId" placeholder="请选择试卷库" @change="getProject">
<el-option v-for="(item, i) in paperLibraries" :key="i" :label="item.libraryName" :value="item.libraryId">
</el-option>
</el-select>
<!-- 实训 && 选择课程 -->
<el-cascader v-else-if="!isTheory && !courseSystem" ref="cur" v-model="mallIds" :options="curs"
:props="{ checkStrictly: true, value: 'id' }" popper-class="course-cas" @expand-change="curChange"
@change="curChange"></el-cascader>
</template>
</div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<!-- 理论系统 -->
<el-card v-if="isTheory" shadow="hover" class="m-b-20">
<div class="flex-between m-b-20">
<span>理论试卷</span>
<div style="display: inline-flex;">
@ -53,7 +70,7 @@
已选试卷{{ form.paperName }}
<el-button type="primary" size="mini" @click="previewPaper(form)">预览</el-button>
</p>
<el-table :data="projects" class="table" stripe header-align="center">
<el-table :data="projects" class="table" header-align="center">
<el-table-column width="60" label="选择" align="center">
<template slot-scope="scope">
<el-radio v-model="form.paperId" :label="scope.row.paperId" @change="paperChange">&nbsp;</el-radio>
@ -89,21 +106,8 @@
layout="total,prev, pager, next" :total="total"></el-pagination>
</div>
</el-card>
</template>
<template v-else>
<el-card shadow="hover" class="mgr20 m-b-20">
<div>
<p class="m-b-20">课程</p>
<div class="inline-input">
<el-cascader ref="cur" v-model="mallIds" :options="curs" :props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas" @expand-change="curChange" @change="curChange"></el-cascader>
</div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card v-else shadow="hover" class="m-b-20">
<div class="flex-between m-b-20">
<span>实训项目</span>
<div style="display: inline-flex;">
@ -114,7 +118,7 @@
</div>
</div>
<!-- 实训项目表格 -->
<el-table :data="projects" class="table" stripe header-align="center">
<el-table :data="projects" class="table" header-align="center">
<el-table-column width="60" label="选择" align="center">
<template slot-scope="scope">
<el-radio v-model="form.projectId" :label="scope.row.projectId">&nbsp;</el-radio>
@ -143,7 +147,6 @@
layout="total,prev, pager, next" :total="total"></el-pagination>
</div>
</el-card>
</template>
<div style="text-align: center">
<el-button @click="back">返回</el-button>
@ -153,8 +156,7 @@
</template>
<script>
import Setting from '@/setting'
import util from "@/libs/util";
import Util from '@/libs/util'
import { Loading } from 'element-ui'
import TestPaperConst from '@/const/testPaper'
export default {
@ -165,9 +167,10 @@ export default {
paperTypes: TestPaperConst.paperTypes,
loadIns: null,
mallIds: [],
systemId: '',
curs: [],
paperLibraries: [],
testPapers: [],
services: [],
keyword: '',
projects: [],
page: 1,
@ -179,6 +182,7 @@ export default {
paperName: '',
permissionsKeys: ['练习', '考核', '竞赛'],
timeInvalid: false,
courseSystem: 1,
};
},
computed: {
@ -198,22 +202,27 @@ export default {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
this.initData()
}, 500)
}
},
mounted () {
this.isTheory ? this.getLibrary() : this.getCourse()
// this.isTheory ? this.getLibrary() : this.getCourse()
this.getSystem()
},
methods: {
//
async getCourse () {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '服务配置')
const { serviceList } = await this.$post(this.api.queryServiceConfig, {
//
const res = await this.$post(this.api.queryServiceConfig, {
pageNum: 1,
pageSize: 1000,
supplierId: sid ? sid.supplierId : ''
})
const services = res.serviceList.records
//
const { page } = await this.$post(this.api.listOfGoods, {
pageNum: 1,
pageSize: 10000,
@ -225,14 +234,14 @@ export default {
const { records } = page
const { mallId, cid, systemId } = this.form
if (records.length) {
serviceList.records.map(e => {
services.map(e => {
e.id = +e.systemId
e.label = e.systemName
})
records.map(e => {
e.id = +e.mallId
e.label = e.productName
e.children = serviceList.records.filter(n => e.systemId && e.systemId.split(',').includes(n.systemId)) //
e.children = services.filter(n => e.systemId && e.systemId.split(',').includes(n.systemId)) //
})
this.curs = records
@ -247,6 +256,27 @@ export default {
this.getProject()
}
},
//
async getSystem () {
const res = await this.$get(this.api.getServiceOfType, {
type: this.isTheory ? 3 : 1
})
res.serviceList.forEach(e => e.systemId = +e.systemId)
this.services = res.serviceList
if (this.services.length) {
this.systemId = this.form.systemId || this.services[0].systemId
this.getProject()
this.loadIns = Loading.service()
}
},
//
courseSystemChange (val) {
if (val) {
this.getSystem()
} else {
this.isTheory ? this.getLibrary() : this.getCourse()
}
},
//
curChange (val) {
const id = val[0]
@ -284,8 +314,19 @@ export default {
// /
async getProject () {
try {
//
//
if (this.courseSystem) {
const res = await this.$get(`${this.api.getInternalProjectBySystemId}?permissions=2&systemId=${this.systemId}&keyword=${this.keyword}`)
if (this.isTheory) {
res.forEach(e => {
e.name = e.paperName
})
}
this.projects = res
}
else {
if (this.isTheory) {
//
const res = await this.$post(this.api.examPaperList, {
pageNum: this.page,
pageSize: this.pageSize,
@ -297,8 +338,8 @@ export default {
})
this.projects = res.pageList.records
this.total = res.pageList.total
} else {
//
} else { //
//
const { data } = await this.$post(this.api.getProjectAssessmentByCompetition, {
pageNum: this.page,
pageSize: this.pageSize,
@ -310,6 +351,7 @@ export default {
this.projects = data.records
this.total = data.total
}
}
} finally {
this.loadIns.close()
}
@ -330,7 +372,17 @@ export default {
form,
curStep
})
this.$router.push(`/projectList?systemId=${this.mallIds[1]}&show=1&name=${this.$refs.cur.getCheckedNodes()[0].label}`)
let { systemId } = this
let name
if (systemId) {
const cur = this.services.find(e => e.systemId === systemId)
if (cur) name = cur.systemName
}
if (!this.courseSystem && this.mallIds.length > 1) {
systemId = this.mallIds[1]
name = this.$refs.cur.getCheckedNodes()[0].label
}
this.$router.push(`/projectList?systemId=${systemId}&custom=1&name=${name}`)
},
//
timeChange (val) {
@ -340,7 +392,7 @@ export default {
const { playStartTime, playEndTime } = this.step1
if (startTime < new Date(playStartTime) || endTime > new Date(playEndTime)) {
this.timeInvalid = true
return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
return Util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
}
this.timeInvalid = false
const { form, curStep } = this.$parent
@ -350,7 +402,7 @@ export default {
const time1 = new Date(form[i].startTime)
const time2 = new Date(form[i].endTime)
if ((startTime >= time1 && startTime <= time2) || (endTime >= time1 && endTime <= time2)) {
util.warningMsg('请注意,所设置的时间与已设置的阶段时间重合。')
Util.warningMsg('请注意,所设置的时间与已设置的阶段时间重合。')
break
}
}
@ -368,29 +420,33 @@ export default {
},
//
save () {
const { form } = this
if (!form.time.length) return util.warningMsg('请选择比赛时间')
const { form, courseSystem } = this
if (!form.time.length) return Util.warningMsg('请选择比赛时间')
const { playStartTime, playEndTime } = this.step1
if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return Util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
//
if (this.isTheory) {
if (!this.libraryId) return util.warningMsg('请选择试卷库')
if (!form.paperId) return util.warningMsg('请选择试卷')
// if (!this.libraryId) return Util.warningMsg('')
if (!form.paperId) return Util.warningMsg('请选择试卷')
form.libraryId = this.libraryId
form.libraryId = courseSystem ? '' : this.libraryId
form.systemId = courseSystem ? this.systemId : ''
const curPaper = this.projects.find(e => e.paperId === form.paperId)
if (curPaper) form.paperName = curPaper.name
} else {
if (!form.cid) return util.warningMsg('请选择课程')
if (!form.projectId) return util.warningMsg('请选择项目')
// if (!form.cid) return Util.warningMsg('')
if (!form.projectId) return Util.warningMsg('请选择项目')
const { systemId, systemName, projectName } = this.projects.find(e => e.projectId == form.projectId)
if (systemId) form.systemId = systemId
if (projectName) form.projectName = projectName
if (systemName) form.systemName = systemName
}
if (courseSystem) {
form.mallId = ''
form.cid = ''
}
form.startTime = form.time[0]
form.endTime = form.time[1]
this.handlePaper()
this.$emit('hideSet', this.form)
},
@ -398,15 +454,13 @@ export default {
async handlePaper () {
const { form } = this
// id
if (form.paperName !== form.originPaperName) {
if (this.isTheory && form.paperName !== form.originPaperName) {
const res = await this.$post(this.api.copyExamPaper, {
associatedID: form.stageId,
paperId: form.paperId,
typeId: 1
})
if (res.examPaper) {
form.paperId = res.examPaper.paperId
}
if (res.examPaper) form.paperId = res.examPaper.paperId
}
},
//

@ -151,7 +151,7 @@
</el-form-item>
<el-form-item label="比赛内容">
<el-button style="margin-bottom: 10px;" size="small" type="primary">选择理论试卷</el-button>
<el-table :data="list" class="table" ref="table" stripe header-align="center" row-key="id">
<el-table :data="list" class="table" ref="table" header-align="center" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="试卷名称" align="center" min-width="100"></el-table-column>
@ -216,7 +216,7 @@
</template>
<script>
import Util from "@/libs/util";
import Util from '@/libs/util'
import quill from "@/components/quill";
import Upload from '@/components/upload';
import Oss from '@/components/upload/upload.js'

@ -322,12 +322,12 @@ export default {
//
if (this.step1.completeCompetitionSetup.competitionType) {
const { form, originForm } = this
// 34
let changeLimit = 0
for (const i in form.competitionStageList) {
const e = form.competitionStageList[i]
if (e.teamNumLimit !== originForm.competitionStageList[i].teamNumLimit || e.customNumber !== originForm.competitionStageList[i].customNumber) {
const originStage = originForm.competitionStageList[i]
if (!originStage || e.teamNumLimit !== originStage.teamNumLimit || e.customNumber !== originStage.customNumber) {
changeLimit = 1
break
}

@ -79,8 +79,7 @@
{{ item.projectName }}
</el-form-item>
</template>
<template v-else>
<el-form-item class="req" label="已选择试卷">
<el-form-item v-else class="req" label="已选择试卷">
<div class="flex">
{{ item.paperName }}&emsp;
<el-form>
@ -89,7 +88,6 @@
</el-form>
</div>
</el-form-item>
</template>
<el-form-item class="req" prop="resultAnnouncementTime" label="比赛地点">
<div class="line">
<el-checkbox v-model="item.onlineButton">线上</el-checkbox>
@ -112,7 +110,7 @@
<el-dialog title="提示" :visible.sync="tipsVisible" width="500px" :close-on-click-modal="false"
custom-class="tips-dia">
<p style="font-size: 17px;text-align: center;color: #9076ff;">编辑发布成功</p>
<p style="font-size: 17px;text-align: center;color: #062c87;">编辑发布成功</p>
<p style="margin: 5px 0px 10px;line-height: 1.6">
温馨提示报名结束后更改报名时间或赛程规则不影响已分配的阶段参赛人员且后续添加的人员不会自动分配如需重新自动分配所有团队请到报名列表执行全员重新分配操作
</p>
@ -392,6 +390,7 @@ export default {
this.$confirm('团队赛发布成功,由于您设置的报名时间已结束,如需自动分配阶段参赛人员,请前往报名人员列表进行设置', '提示', {
confirmButtonText: '关闭',
type: 'success',
showCancelButton: false,
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showClose: false,
@ -434,9 +433,9 @@ export default {
Util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
break
}
if (e.method === 0 && !e.cid) {
if (e.method === 0 && !e.projectId) {
invalid = 1
Util.errorMsg('请选择课程')
Util.errorMsg('请选择项目')
break
}
if (e.method === 1 && !e.paperId) {

@ -41,7 +41,7 @@
</div>
</div>
<el-table :data="papers" class="table" stripe header-align="center" @sort-change="sortChange">
<el-table :data="papers" class="table" header-align="center" @sort-change="sortChange">
<el-table-column width="60" label="选择" align="center">
<template slot-scope="scope">
<el-radio v-model="form.paperId" :label="scope.row.paperId">&nbsp;</el-radio>

@ -65,7 +65,7 @@
</div>
</div>
<el-table ref="table" :data="matchData" class="table" stripe header-align="center"
<el-table ref="table" :data="matchData" class="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
@ -73,7 +73,7 @@
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="competitionName" label="竞赛名称" align="center"></el-table-column>
<el-table-column prop="competitionName" min-width="160" label="竞赛名称" align="center"></el-table-column>
<el-table-column prop="name" label="竞赛来源" width="90" align="center">
<template slot-scope="scope">
{{ sourceList.find(e => e.id === scope.row.platformSource).name }}
@ -94,8 +94,8 @@
{{ scope.row.competitionType ? '团队赛' : '个人赛' }}
</template>
</el-table-column>
<el-table-column prop="applicantNum" label="报名人数" align="center" width="100"></el-table-column>
<el-table-column prop="status" label="状态" align="center" width="80">
<el-table-column prop="applicantNum" label="报名人数" align="center" width="90"></el-table-column>
<el-table-column prop="status" label="状态" align="center" width="60">
<template slot-scope="scope">
{{ scope.row.publishStatus ? '已发布' : '未发布' }}
</template>
@ -127,7 +127,7 @@
</div>
<el-dialog title="修改当前阶段结束时间" :visible.sync="modifyVisible" width="900px" :close-on-click-modal="false">
<el-table :data="curRow.playingStages" class="table" ref="table" stripe header-align="center">
<el-table :data="curRow.playingStages" class="table" ref="table" header-align="center">
<el-table-column prop="stageName" label="阶段名称" min-width="100" align="center"></el-table-column>
<el-table-column label="竞赛起止时间" width="300" align="center">
<template slot-scope="scope">
@ -151,7 +151,7 @@
</template>
<script>
import util from "@/libs/util";
import Util from '@/libs/util'
import Bus from '@/libs/bus'
import qs from 'qs'
export default {
@ -283,13 +283,14 @@ export default {
}]
},
loading: false,
now: '',
};
},
watch: {
"form.month": function (val) {
if (val) {
let unit = 24 * 60 * 60 * 1000;
this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))];
this.date = [Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))];
} else {
this.date = [];
}
@ -340,49 +341,57 @@ export default {
})
},
methods: {
getData () {
async getData () {
this.loading = true
try {
const { form } = this
this.$post(this.api.CompetitionPageConditionQueryByNakadai, {
const { data } = await this.$post(this.api.CompetitionPageConditionQueryByNakadai, {
pageNum: this.page,
pageSize: this.pageSize,
...form
}).then(({ data }) => {
const list = data.records
//
})
this.matchData = data.records
this.now = await Util.getNow()
clearInterval(this.timer)
this.handleBeganStage()
this.timer = setInterval(() => {
const now = new Date()
list.map(e => {
this.now = new Date(this.now.setSeconds(this.now.getSeconds() + 1))
this.handleBeganStage()
}, 1000)
this.total = data.total
this.$refs.table.clearSelection()
this.loading = false
if (!this.matchData.length && this.total) {
this.page--
this.getData()
}
} catch (e) {
this.loading = false
}
},
//
async handleBeganStage () {
this.matchData.map(e => {
if (!e.playingStages) {
this.$set(e, 'playingStages', [])
} else {
e.playingStages = []
}
//
if (now >= new Date(e.playStartTime) && now <= new Date(e.playEndTime)) {
if (this.now >= new Date(e.playStartTime) && this.now <= new Date(e.playEndTime)) {
//
if (e.competitionStageList) {
for (const n of e.competitionStageList) {
//
if (now >= new Date(n.startTime) && now <= new Date(n.endTime)) {
if (this.now >= new Date(n.startTime) && this.now <= new Date(n.endTime)) {
e.playingStages.push(n)
}
}
}
}
})
}, 1000)
this.matchData = list
this.total = data.total
this.$refs.table.clearSelection()
this.loading = false
if (!this.matchData.length && this.total) {
this.page--
this.getData()
}
}).catch(res => {
this.loading = false
})
},
initData () {
this.page = 1;
@ -402,7 +411,7 @@ export default {
type: "warning"
}).then(async () => {
await this.$post(`${this.api.copyCompetition}?competitionId=${row.id}`)
util.successMsg('复制成功')
Util.successMsg('复制成功')
this.initData()
}).catch(() => { })
},
@ -425,7 +434,7 @@ export default {
competitionContents: data
}).then(async res => {
await this.$post(`${this.api.refreshPageNotification}?content=1`)
util.successMsg('修改成功')
Util.successMsg('修改成功')
this.modifyVisible = false
this.getData()
}).catch(err => { })
@ -450,7 +459,7 @@ export default {
})
.then(() => {
this.$post(`${this.api.batchDeleteCompetition}?competitionIds=${row.id}`).then(res => {
util.successMsg("删除成功");
Util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
@ -495,7 +504,7 @@ export default {
isOpen: val,
type: 0 // (01)
}).then(res => {
util.successMsg(val == 1 ? '禁用成功' : '启用成功')
Util.successMsg(val == 1 ? '禁用成功' : '启用成功')
}).catch(err => { })
await this.$post(`${this.api.refreshPageNotification}?content=1`)
@ -506,7 +515,12 @@ export default {
<style lang="scss" scoped>
/deep/ .tool {
margin-bottom: 0;
.filter {
flex-wrap: wrap;
li {
margin-bottom: 15px;
}
.el-input {
min-width: 190px;
}

@ -23,8 +23,8 @@
</div>
</div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id" v-loading="loading" @sort-change="sortChange">
<el-table ref="table" :data="listData" class="table" header-align="center" @selection-change="handleSelectionChange"
row-key="id" v-loading="loading" @sort-change="sortChange">
<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">

@ -42,7 +42,6 @@ export default {
tab3: "竞赛进展",
tab4: "公告通知",
tab5: "报名人员",
tab6: '查看异常团队'
}
};
},
@ -55,11 +54,11 @@ export default {
AbnormalTeam
},
mounted () {
if (Setting.dynamicRoute) {
// if (Setting.dynamicRoute) {
this.initTabs()
} else {
this.active = this.$route.query.tab || 'tab1'
}
// } else {
// this.active = this.$route.query.tab || 'tab1'
// }
},
methods: {
async initTabs () {
@ -77,7 +76,12 @@ export default {
tab3 || this.$delete(this.tabs, 'tab3')
tab4 || this.$delete(this.tabs, 'tab4')
tab5 || this.$delete(this.tabs, 'tab5')
res.competition.completeCompetitionSetup.competitionType || this.$delete(this.tabs, 'tab6')
if (res.competition.completeCompetitionSetup.competitionType) {
this.tabs.tab6 || this.$set(this.tabs, 'tab6', '查看异常团队')
} else {
this.tabs.tab6 && this.$delete(this.tabs, 'tab6')
}
const type = this.$route.query.tab
const keys = Object.keys(this.tabs)

@ -1,37 +1,57 @@
<template>
<!-- 报名人员 -->
<div class="page-content" style="padding: 24px">
<el-table ref="table" :data="list" class="table" stripe header-align="center" row-key="stageId">
<el-table ref="table" :data="list" class="table" header-align="center" row-key="stageId">
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="stageName" label="阶段名称" align="center"></el-table-column>
<el-table-column prop="competitionContent" label="比赛内容" align="center"></el-table-column>
<el-table-column prop="methodName" label="比赛方式" align="center"></el-table-column>
<el-table-column prop="founderName" label="比赛形式" align="center">
<el-table-column label="竞赛类型" align="center">
<template slot-scope="scope">
{{ scope.row.competitionType ? '团队赛' : '个人赛' }}
</template>
</el-table-column>
<el-table-column prop="ruleName" label="赛制" align="center"></el-table-column>
<el-table-column prop="status" label="状态" align="center"></el-table-column>
<el-table-column label="竞赛起止时间" width="290" align="center">
<el-table-column prop="status" label="大赛状态" align="center"></el-table-column>
<el-table-column prop="reviewStatus" label="评阅情况" align="center"></el-table-column>
<el-table-column label="竞赛时间" width="290" align="center">
<template slot-scope="scope">
{{ scope.row.startTime + ' ~ ' + scope.row.endTime }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="260">
<el-table-column label="操作" align="center" width="280">
<template slot-scope="scope">
<el-button type="primary" @click="toRank(scope.row, scope.$index)">排名</el-button>
<el-button @click="toArch(scope.row, scope.$index)">成绩管理</el-button>
<el-button type="text" @click="toRank(scope.row, scope.$index)">排名</el-button>
<el-button type="text" @click="toArch(scope.row, scope.$index)">成绩统计</el-button>
<!-- <el-button @click="toArch(scope.row, scope.$index)">编辑试卷</el-button> -->
<template v-if="scope.row.method === 1">
<el-button v-if="scope.row.showMyReviewTask" type="text"
@click="showReview(scope.row, '/myReview/records')">我的评阅任务</el-button>
<el-button v-auth="'/review:分配评阅任务'" type="text"
@click="showReview(scope.row, '/allocationReview')">分配评阅任务</el-button>
</template>
</template>
</el-table-column>
</el-table>
<el-drawer title="" :visible.sync="reviewVisible" size="100%" :close-on-click-modal="false" :withHeader="false"
custom-class="review-dia">
<div>
<button type="button" class="el-drawer__close-btn" @click="reviewVisible = false">
<i class="el-dialog__close el-icon el-icon-close"></i>
</button>
</div>
<iframe :src="reviewUrl" frameborder="0" width="100%"></iframe>
</el-drawer>
</div>
</template>
<script>
import Setting from '@/setting'
import Const from '@/const/match'
export default {
name: "matchArch",
@ -42,6 +62,8 @@ export default {
form: {},
timer: null,
curStep: [],
reviewVisible: false,
reviewUrl: '',
};
},
mounted () {
@ -101,7 +123,16 @@ export default {
this.$store.commit('setInnerReferrer', this.$route.fullPath)
const cur = this.form.competitionStage[i]
const showFile = !!(cur.method === 2 && cur.competitionStageContentSetting && cur.competitionStageContentSetting.whetherToUploadFiles)
this.$router.push(`/${cur.method !== 1 ? 'matchArchList' : 'theoryArchList'}?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}`)
this.$router.push(`/${cur.method === 2 ? 'otherArchList' : 'matchArchList'}?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}&showMyReviewTask=${row.showMyReviewTask}`)
},
//
showReview (row, path) {
let url = `${location.origin}/reviewCenter/`
if (Setting.isDev) url = `http://192.168.31.125:8099/`
url += `#${path}?token=${sessionStorage.getItem('token')}&v=${Date.now()}&competitionId=${this.id}&stageId=${row.stageId}`
localStorage.setItem('review_token', sessionStorage.getItem('token'))
this.reviewUrl = url
this.reviewVisible = true
}
}
};
@ -122,4 +153,16 @@ export default {
margin-right: 30px;
}
}
/deep/.review-dia {
.el-drawer__close-btn {
position: absolute;
top: 20px;
right: 20px;
}
iframe {
height: 100%;
}
}
</style>

@ -17,8 +17,17 @@
</p>
</div>
<div class="item">
<p class="name">实验平均分</p>
<p class="val">{{ avgScore }}</p>
<p class="name">平均分</p>
<p class="val">{{ (+statData.avgScore).toFixed(2) }}</p>
</div>
<div class="item">
<p class="name">最高分</p>
<p class="val">{{ statData.maxScore }}
</p>
</div>
<div class="item">
<p class="name">最低分</p>
<p class="val">{{ statData.minScore }}</p>
</div>
</div>
<div class="chart" id="chart"></div>
@ -26,54 +35,95 @@
</el-card>
<el-card shadow="hover" class="m-b-20">
<div v-if="showFile" class="tabs m-b-20">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: i === active }" @click="tabChange(i)">{{
item }}</a>
<div class="tabs m-b-20">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.id === active }"
@click="tabChange(item.id)">{{ item.name }}</a>
</div>
<div class="flex-between m-b-20">
<div class="tool flex-between">
<ul class="filter">
<li>
<label>省份</label>
<el-select v-model="filter.provinceId" filterable clearable placeholder="请选择省份" @change="provinceChange"
@clear="clearProvince">
<el-option v-for="(item, i) in provinces" :key="i" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</li>
<li>
<label>城市</label>
<el-select v-model="filter.cityId" filterable clearable placeholder="请选择城市" :disabled="!filter.provinceId"
@change="initData">
<el-option v-for="(item, i) in cities" :key="i" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</li>
<li>
<label>学校</label>
<el-select v-model="filter.realSchoolId" clearable filterable placeholder="请选择学校" @change="initData">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</li>
<li v-if="active">
<label>评阅状态</label>
<el-select v-model="filter.reviewStatus" clearable placeholder="请选择评阅状态" @change="initData">
<el-option value="待评阅"></el-option>
<el-option value="已评阅"></el-option>
</el-select>
</li>
<li>
<el-input size="small" placeholder="请输入学生姓名、学生学号、团队名称" prefix-icon="el-icon-search" v-model="keyword"
clearable style="width: 300px"></el-input>
</li>
</ul>
<div>
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable
style="width: 300px"></el-input>
</div>
<div v-if="!active">
<el-button v-if="method == 2" type="primary" @click="batchImport">上传成绩</el-button>
<el-button type="primary" :disabled="!!multipleSelection.find(e => method != 2 && !e.reportId)"
@click="delAllData">批量删除</el-button>
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出'
<template v-if="active && method === 1">
<el-button v-auth="'/review:分配评阅任务'" type="primary" size="mini"
@click="showReview('/allocationReview')">分配评阅任务</el-button>
<el-button v-if="showMyReviewTask" type="primary" size="mini"
@click="showReview('/myReview/records')">我的评阅任务</el-button>
<el-button type="primary" size="mini" @click="exportFiles">导出答题文件</el-button>
</template>
<el-button type="primary" size="mini" :loading="exportingList" @click="exportList">{{ exportingList ? '正在导出'
:
'导出成绩列表'
}}</el-button>
</div>
<div v-else>
<el-button type="primary" :loading="exporting1" @click="exportData1">{{ exporting1 ? '正在导出' : '批量导出'
<template v-if="active">
<el-button type="primary" size="mini" :loading="exportingReport" @click="exporReport">{{ exportingReport ?
'正在导出' :
'导出成绩报告'
}}</el-button>
<el-button type="primary" size="mini" @click="delAllData">批量删除</el-button>
</template>
</div>
</div>
<template v-if="!active">
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table :data="list" class="table" :key="1" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id" @sort-change="sortChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="provinceName" label="省份" min-width="100" align="center"></el-table-column>
<el-table-column prop="cityName" label="城市" min-width="100" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" min-width="100"
align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="score" label="分数" width="90" align="center">
<el-table-column prop="score" label="成绩" width="90" align="center" sortable="custom">
<template slot-scope="scope">
{{ scope.row.submitTime ? scope.row.score : '--' }}
</template>
</el-table-column>
<el-table-column prop="timeSum" label="时" width="90" align="center">
<el-table-column prop="timeSum" label="时" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }}
</template>
</el-table-column>
<el-table-column prop="submitTime" label="提交时间" min-width="150" align="center">
<el-table-column prop="submitTime" label="提交时间" min-width="150" align="center" sortable="custom">
<template slot-scope="scope">
{{ scope.row.submitTime || '--' }}
</template>
@ -83,57 +133,42 @@
{{ scope.row.reportId || method == 2 ? '已参加' : '未参加' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<el-table-column prop="evaluationStatus" label="评阅状态" align="center" width="90">
<template slot-scope="scope">
<el-button v-if="method != 2 && scope.row.reportId" type="text"
@click="show(scope.row)">查看成绩报告</el-button>
<el-button v-if="scope.row.reportId" type="text" @click="handleDelete(scope.row)">删除</el-button>
<span v-if="scope.row.reviewStatus === '-'">-</span>
<el-tag v-else :type="scope.row.reviewStatus === '待评阅' ? 'danger' : 'success'">{{ scope.row.reviewStatus
}}</el-tag>
</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>
<el-table-column v-if="active" label="操作" align="center" width="300">
<template v-if="scope.row.reportId" slot-scope="scope">
<template v-if="method === 1">
<el-popover placement="top" trigger="click" popper-class="files-tip">
<div>
<ul class="match-files">
<li v-for="(file, i) in scope.row.files" :key="i" @click="preview(file.attachmentUrl)">{{
file.attachmentName }}</li>
</ul>
</div>
<el-button slot="reference" :disabled="!scope.row.hasFile" type="text"
@click="showFiles(scope.row)">查看答题文件</el-button>
</el-popover>
<el-button style="margin-left: 10px;" :disabled="!scope.row.hasFile" type="text"
@click="downloadFile(scope.row)">下载答题文件</el-button>
</template>
<template v-else>
<el-table :data="list1" class="table" :key="2" stripe header-align="center"
@selection-change="handleSelectionChange1" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page1 - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="fileName" label="文件名" align="center"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" align="center"></el-table-column>
<el-table-column prop="fileType" label="文件类型" align="center"></el-table-column>
<el-table-column prop="fileFormat" label="文件格式" align="center"></el-table-column>
<el-table-column prop="createTime" label="提交时间" width="150" align="center">
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button v-if="!isCompress(scope.row.fileFormat)" type="text"
@click="preview(scope.row)">预览文件</el-button>
<el-button type="primary" size="mini" :loading="scope.row.loading"
@click="exportFile(scope.row)">导出文件</el-button>
<el-button v-if="method != 2" type="text" @click="toReport(scope.row)">查看成绩报告</el-button>
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total1"
@current-change="handleCurrentChange1" :current-page="page1">
<el-pagination background layout="total, prev, pager, next" :total="total"
@current-change="handleCurrentChange" :current-page="page">
</el-pagination>
</div>
</template>
</el-card>
</div>
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false"
@close="cancelUpload">
<div style="text-align: center">
@ -156,7 +191,7 @@
<template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p>
<p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;"
style="margin-bottom: 10px;font-size: 14px;color: #062c87;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p>
</template>
</div>
@ -164,23 +199,54 @@
<el-button @click="cancelUpload">停止导入</el-button>
</span>
</el-dialog>
<el-drawer title="" :visible.sync="reviewVisible" size="100%" :close-on-click-modal="false" :withHeader="false"
custom-class="review-dia">
<div>
<button type="button" class="el-drawer__close-btn" @click="reviewVisible = false">
<i class="el-dialog__close el-icon el-icon-close"></i>
</button>
</div>
<iframe :src="reviewUrl" frameborder="0" width="100%"></iframe>
</el-drawer>
<el-dialog title="图片预览" :visible.sync="previewImgVisible" width="800px" :close-on-click-modal="false">
<el-image style="max-width: 100px; max-height: 100px" :src="previewImg" :preview-src-list="[previewImg]">
</el-image>
</el-dialog>
<PdfDia :key="pdfVisible" :visible.sync="pdfVisible" :src.sync="pdfSrc" />
</div>
</template>
<script>
import util from "@/libs/util";
import Setting from '@/setting'
import PdfDia from '@/components/pdf'
import Util from '@/libs/util'
import * as echarts from "echarts";
import axios from 'axios';
import Zip from '@/libs/zip'
export default {
components: {
PdfDia
},
data () {
return {
id: +this.$route.query.id,
stageId: +this.$route.query.stageId,
method: +this.$route.query.method,
competitionType: +this.$route.query.competitionType,
showFile: this.$route.query.showFile === 'true',
isCompress: util.isCompress,
showMyReviewTask: +this.$route.query.showMyReviewTask,
isCompress: Util.isCompress,
filter: {
provinceId: '',
cityId: '',
realSchoolId: '',
reviewStatus: '',
scoreSortOrder: '',
submitTimeSortOrder: '',
},
provinces: [],
cities: [],
schools: [],
keyword: this.$route.query.keyword || '',
searchTimer: null,
list: [],
@ -203,12 +269,34 @@ export default {
headers: {
token: sessionStorage.getItem("token")
},
statData: {},
tabs: ['成绩列表', '文件列表'],
active: 0,
statData: {
avgScore: 0,
maxScore: 0,
minScore: 0,
},
tabs: [
{
id: 1,
name: '已提交'
},
{
id: 0,
name: '未提交'
}
],
active: 1,
loading: false,
exporting: false,
exporting1: false,
exportingFiles: false,
exportingList: false,
exportingReport: false,
previewImgVisible: false,
previewImg: '',
pdfVisible: false,
pdfSrc: '',
reviewVisible: false,
reviewUrl: '',
};
},
watch: {
@ -228,76 +316,141 @@ export default {
},
mounted () {
this.getData()
this.getProvince()
this.getSchool()
},
methods: {
async getData () {
this.loading = true
//
if (this.active) {
const { data } = await this.$post(this.api.cCompetitionStageFileList, {
pageNum: this.page1,
pageSize: this.pageSize,
competitionId: this.id,
stageId: this.stageId,
keyWord: this.keyword,
})
data.records.forEach(e => {
e.loading = false
e.fileType = '其他'
if (util.isVideo(e.fileFormat)) {
e.fileType = '视频'
} else if (util.isAudio(e.fileFormat)) {
e.fileType = '音频'
} else if (util.isImg(e.fileFormat)) {
e.fileType = '图片'
} else if (util.isDoc(e.fileFormat)) {
e.fileType = '文档'
} else if (util.isCompress(e.fileFormat)) {
e.fileType = '压缩包'
} else if (e.fileType === 'pdf') {
e.fileType = 'pdf'
}
})
this.list1 = data.records
this.total1 = data.total
this.loading = false
} else { //
const { data, page } = await this.$post(this.api.stageGradeManagementList, {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
keyWord: this.keyword,
stageId: this.stageId,
isNakadai: 1
isNakadai: 1,
participatingState: this.active,
...this.filter
})
this.loading = false
this.total = page.total
this.list = page.records
this.statData = data
this.avgScore = (+data.avgScore).toFixed(2)
this.method != 2 && this.getChart()
}
this.getChart()
},
initData () {
this.page = 1
this.getData()
},
//
async getProvince () {
const { list } = await this.$get(this.api.queryProvince)
this.provinces = list
},
//
clearProvince () {
this.filter.cityId = ''
},
//
provinceChange () {
this.clearProvince()
this.getCity()
this.initData()
},
//
async getCity () {
const id = this.filter.provinceId
if (id) {
const { list } = await this.$get(this.api.queryCity, {
provinceId: id
})
this.cities = list
}
},
//
async getSchool () {
const { list } = await this.$get(this.api.querySchoolData)
this.schools = list
},
//
sortChange (column) {
if (column.prop === 'score') this.filter.scoreSortOrder = column.order ? column.order === 'ascending' ? 'ASC' : 'DESC' : ''
if (column.prop === 'submitTime') this.filter.scoreSortOrder = column.order ? column.order === 'ascending' ? 'ASC' : 'DESC' : ''
this.getData()
},
//
async showFiles (row) {
const { data } = await this.$get(this.api.getPaperUploadFile, {
reportId: row.reportId
})
this.$set(row, 'files', data)
},
//
async downloadFile (row) {
const res = await axios.post(this.api.getPaperUploadFileZip, {
reportIds: [row.reportId],
// reportIds: [3785],
stageId: this.stageId
}, {
headers: this.headers,
responseType: 'blob'
})
const name = res.headers['content-disposition']
Util.downloadFileDirect(name ? decodeURI(name) : '答题文件.zip', new Blob([res.data]))
},
//
show (row) {
this.$router.push(`/trialReport?reportId=${row.reportId}`)
toReport (row) {
this.$router.push(`/${this.method === 1 ? 'theoryReport' : 'trialReport'}?reportId=${row.reportId}`)
},
// ()
async exportData () {
//
showReview (path) {
let url = `${location.origin}/reviewCenter/`
if (Setting.isDev) url = `http://192.168.31.125:8099/`
url += `#${path}?token=${sessionStorage.getItem('token')}&v=${Date.now()}&competitionId=${this.id}&stageId=${this.stageId}`
localStorage.setItem('review_token', sessionStorage.getItem('token'))
this.reviewUrl = url
this.reviewVisible = true
},
//
async exportFiles () {
if (this.list.length) {
this.exporting = true
this.exportingFiles = true
const list = this.multipleSelection
const ids = []
if (list.length) {
list.forEach(e => {
e.reportId && ids.push(e.reportId)
})
}
const res = await axios.post(this.api.getPaperUploadFileZip, {
reportIds: ids,
// reportIds: [3785],
stageId: this.stageId
}, {
headers: this.headers,
responseType: 'blob'
})
const name = res.headers['content-disposition']
Util.downloadFileDirect(name ? decodeURI(name) : '答题文件.zip', new Blob([res.data]))
this.exportingFiles = false
}
},
// ()
async exportList () {
if (this.list.length) {
this.exportingList = true
//
if (this.multipleSelection.length) {
const res = await axios.post(this.api.exportExperimentalResultsInBatch, this.multipleSelection, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
Util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exportingList = false
} else if (this.list.length) {
const res = await axios.post(this.api.allExperimentalResultsAreDerived, {
pageNum: 1,
@ -305,40 +458,70 @@ export default {
competitionId: this.id,
isNakadai: 1,
stageId: this.stageId,
participatingState: this.active,
}, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
Util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exportingList = false
}
}
},
// ()
exportData1 () {
this.exporting1 = true
let list = this.list1
if (this.multipleSelection1.length) {
list = this.multipleSelection1
// ()
async exporReport () {
if (this.list.length) {
this.exportingReport = true
const list = this.multipleSelection
const ids = []
if (list.length) {
list.forEach(e => {
e.reportId && ids.push(e.reportId)
})
}
Zip('批量导出', list, () => {
this.exporting1 = false
let res
//
if (this.method) {
res = await axios.post(this.api.exportExamPaperReports, {
ids,
stageId: list.length ? '' : this.stageId
}, {
headers: this.headers,
responseType: 'blob'
})
Util.downloadFileDirect('成绩报告.zip', new Blob([res.data]))
this.exportingReport = false
} else {
//
res = await axios.post(this.api.batchExportReportsAsZip, {
reportIds: ids,
stageId: this.stageId,
competitionId: this.id,
}, {
headers: this.headers,
responseType: 'blob'
})
Util.downloadFileDirect('成绩报告.zip', new Blob([res.data]))
this.exportingReport = false
}
}
},
handleDelete (row) { //
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.batchDeleteContestGrade, {
async handleDelete (row) { //
await this.$confirm(`<p>确认要删除【${row.userName}】的成绩记录吗?</p><p style="color: #f56c6c;">删除后成绩数据不可恢复,自动变为未提交</p>`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
})
await this.$post(this.api.batchDeleteContestGrade, {
ids: [this.method == 2 ? row.scoreId : row.reportId],
competitionId: this.id,
stageId: this.stageId
}).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => { });
})
Util.successMsg("删除成功")
this.getData()
},
delAllData () { //
const list = this.multipleSelection
@ -360,7 +543,7 @@ export default {
await this.$post(this.api.batchDeleteContestGrade, data)
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
Util.successMsg("删除成功");
this.getData();
}).catch(() => { });
},
@ -382,16 +565,8 @@ export default {
handleSelectionChange1 (val) { //
this.multipleSelection1 = val;
},
handleCurrentChange1 (val) { //
this.page1 = val;
this.getData();
},
getChart () { // 线
const data = []
const { statData } = this
for (let i = 1; i <= 10; i++) {
data.push(statData['num' + i])
}
const { fractionalSegmentCounts: data } = this.statData
let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({
title: { text: "实验分数分布图" },
@ -401,7 +576,7 @@ export default {
type: "category",
boundaryGap: false,
interval: 10,
data: ["0-10", "10-20", "20-30", "30-40", "40-50", "50-60", "60-70", "70-80", "80-90", "90-100"]
data: data.map(e => e.range)
},
yAxis: {
name: "人数",
@ -409,9 +584,13 @@ export default {
minInterval: 10
},
series: [{
data,
data: data.map(e => e.count),
type: "line",
areaStyle: {},
label: {
show: true,
position: 'top'
},
color: ["#8191fd"]
}]
});
@ -428,12 +607,12 @@ export default {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect('赛事成绩导入模板.xlsx', new Blob([res.data]))
Util.downloadFileDirect('赛事成绩导入模板.xlsx', new Blob([res.data]))
}).catch(res => { })
},
//
handleExceed (files, fileList) {
util.warningMsg(
Util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
)
},
@ -443,7 +622,7 @@ export default {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data]))
Util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data]))
}).catch(res => { })
},
uploadSuccess (res) {
@ -456,11 +635,11 @@ export default {
this.faildData = data
this.uploadFaild = true
} else {
util.successMsg(data.tip, 3000)
Util.successMsg(data.tip, 3000)
this.importVisible = false
}
} else {
util.errorMsg(res.message || '上传失败,请检查数据')
Util.errorMsg(res.message || '上传失败,请检查数据')
}
},
uploadError (err, file, fileList) {
@ -490,29 +669,23 @@ export default {
},
// tab
tabChange (i) {
this.multipleSelection = []
this.$refs.table.clearSelection()
this.active = i
this.getData()
this.initData()
},
//
preview (item) {
window.open((util.isDoc(item.fileFormat) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath)
},
//
exportFile (item) {
item.loading = true
const url = item.filePath
var x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = "blob"
x.onload = function (e) {
var url = window.URL.createObjectURL(x.response)
var a = document.createElement("a")
a.href = url
a.download = item.userName + '-' + item.fileName
a.click()
item.loading = false
}
x.send()
preview (url) {
const ext = url.split('.').pop()
if (Util.isDoc(ext)) {
window.open('https://view.officeapps.live.com/op/view.aspx?src=' + url)
} else if (Util.isImg(ext)) {
this.previewImgVisible = true
this.previewImg = url
} else if (ext === 'pdf') {
this.pdfVisible = true
this.pdfSrc = url
}
},
back () {
this.$router.push(this.$store.state.innerReferrer)
@ -540,12 +713,31 @@ export default {
}
}
.tool {
align-items: flex-start;
margin-bottom: 10px;
.filter {
flex-wrap: wrap;
}
li {
margin-bottom: 10px;
}
/deep/.el-select {
width: 140px;
}
}
.stat {
display: flex;
.nums {
display: flex;
flex-wrap: wrap;
align-items: center;
width: 640px;
margin-right: 20px;
.item:nth-child(1) {
@ -556,6 +748,14 @@ export default {
background-image: url('../../../assets/img/avg.png');
}
.item:nth-child(3) {
background-image: url('../../../assets/img/ach1.png');
}
.item:nth-child(4) {
background-image: url('../../../assets/img/ach2.png');
}
.item {
width: 300px;
min-height: 145px;
@ -580,7 +780,7 @@ export default {
}
.chart {
flex: 1;
width: calc(100% - 660px);
height: 300px;
}
}
@ -592,4 +792,16 @@ export default {
display: none !important;
}
}
/deep/.review-dia {
.el-drawer__close-btn {
position: absolute;
top: 20px;
right: 20px;
}
iframe {
height: 100%;
}
}
</style>

@ -43,8 +43,8 @@
<template>
<tr>
<th>队长</th>
<td>{{ info.caption.userName }}{{ info.caption.realSchool && ',' + info.caption.realSchool }}{{
info.caption.workNumber && ',' + info.caption.workNumber }}</td>
<td>{{ info.captain.userName }}{{ info.captain.realSchool && ',' + info.captain.realSchool }}{{
info.captain.workNumber && ',' + info.captain.workNumber }}</td>
</tr>
<tr>
<th>团队成员</th>
@ -144,12 +144,13 @@
}}</el-tag>
</div>
<div class="flex-center">
<p>队长{{ info.caption.userName }}</p>
<p>队长{{ info.captain.userName }}</p>
<el-button type="primary" @click="transfer">转让队长</el-button>
</div>
<el-table :data="info.teamDetail" stripe header-align="center">
<el-table :data="info.teamDetail" header-align="center">
<el-table-column prop="userName" label="成员姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学校" min-width="100" align="center"></el-table-column>
<el-table-column prop="phone" label="手机号" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="加入时间" width="180" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="160">
@ -239,7 +240,7 @@ export default {
info: {
isCaption: 0,
person: {},
caption: {},
captain: {},
team: {
captain: 1,
invitationCode: ''
@ -314,10 +315,10 @@ export default {
info.team = {}
info.teamDetail = []
} else {
info.isCaption = info.team.caption
info.isCaption = info.team.captain
}
const caption = info.teamDetail.find(e => !e.caption)
info.caption = caption ? caption : {}
const captain = info.teamDetail.find(e => !e.captain)
info.captain = captain ? captain : {}
info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId)
this.originInfo = JSON.parse(JSON.stringify(info))
// accountId
@ -347,9 +348,10 @@ export default {
teamId: this.info.teamId
})
this.teamErrors = res.teamTip.split(';').filter(e => e)
if (Object.keys(res.stageTip).length) {
this.stageTip = res.stageTip
} else {
this.stageTip = null
}
},
//
@ -451,7 +453,7 @@ export default {
transferSubmit () {
if (!this.checkedPlayer) return Util.errorMsg('请选择成员')
this.$post(this.api.captainOfTransfer, {
captainId: this.info.caption.teamId,
captainId: this.info.captain.teamId,
playerId: this.checkedPlayer
}).then(res => {
this.checkedPlayer = ''
@ -570,9 +572,9 @@ export default {
},
//
show (row) {
this.curRow = row
//
if (this.form.completeCompetitionSetup.competitionType) { //
this.curRow = row
this.memberVisible = true
if (this.info.teamId) {
this.getMembers()
@ -589,7 +591,7 @@ export default {
},
//
toReport (row) {
this.$router.push(`/matchReport?reportId=${row.reportId}`)
this.$router.push(`/${this.curRow.method === 1 ? 'theoryReport' : 'trialReport'}?reportId=${row.reportId}`)
},
back () {
this.$router.push(this.$store.state.innerReferrer)

@ -1,74 +1,43 @@
<template>
<!-- 竞赛进展 -->
<div class="page-content"
style="padding: 24px">
<el-table ref="table"
:data="listData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
<div class="page-content" style="padding: 24px">
<el-table ref="table" :data="listData" class="table" header-align="center" @selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<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="name"
label="标题">
<el-table-column prop="name" label="标题">
<template slot-scope="scope">
<el-input placeholder="请输入标题"
:disabled="!scope.row.operate"
v-model="scope.row.title"></el-input>
<el-input placeholder="请输入标题" :disabled="!scope.row.operate" v-model="scope.row.title"></el-input>
</template>
</el-table-column>
<el-table-column prop="name"
label="详情描述">
<el-table-column prop="name" label="详情描述">
<template slot-scope="scope">
<el-input placeholder="请输入详情描述"
:disabled="!scope.row.operate"
type="textarea"
<el-input placeholder="请输入详情描述" :disabled="!scope.row.operate" type="textarea"
v-model="scope.row.description"></el-input>
</template>
</el-table-column>
<el-table-column prop="name"
label="状态"
width="150">
<el-table-column prop="name" label="状态" width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.status"
:disabled="!scope.row.operate"
clearable
placeholder="请选择状态">
<el-option v-for="(item,index) in statusList"
:key="index"
:label="item.name"
<el-select v-model="scope.row.status" :disabled="!scope.row.operate" clearable placeholder="请选择状态">
<el-option v-for="(item, index) in statusList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="170">
<el-table-column label="操作" align="center" width="170">
<template slot-scope="scope">
<el-button v-if="!scope.row.operate"
type="text"
@click="operateIt(scope.row)"
<el-button v-if="!scope.row.operate" type="text" @click="operateIt(scope.row)"
v-auth="'/match:管理:竞赛进展:编辑'">编辑</el-button>
<el-button v-else
type="text"
@click="saveData(scope.row)">保存</el-button>
<el-button type="text"
@click="handleDelete(scope.row, scope.$index)"
<el-button v-else type="text" @click="saveData(scope.row)">保存</el-button>
<el-button type="text" @click="handleDelete(scope.row, scope.$index)"
v-auth="'/match:管理:竞赛进展:删除'">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="plus"
@click="addData"
v-auth="'/match:管理:竞赛进展:新增'">
<div class="plus" @click="addData" v-auth="'/match:管理:竞赛进展:新增'">
<i class="el-icon-circle-plus-outline"></i>
</div>
</div>

@ -1,7 +1,7 @@
<template>
<div>
<el-card shadow="hover" class="m-b-20 head-card">
<div class="flex-between m-b-20">
<div class="flex-between">
<el-page-header v-if="grades.length" @back="back" :content="grades[index].stageName + '/排名'"></el-page-header>
</div>
@ -14,15 +14,41 @@
@click="tabChange(item.stageId)">{{ item.stageName }}排名</a>
</template>
</div>
<div class="flex-between" style="margin: 20px 0">
<div class="tool flex-between" style="margin-top: 20px">
<div style="display: inline-flex;align-items: center">
<el-radio v-model="type" :label="0" @change="typeChange">默认系统排序</el-radio>
<el-radio v-model="type" :label="1" @change="typeChange">手动上传</el-radio>
<el-button type="primary" :disabled="type === 0" class="ml20" @click="batchImport">上传文件</el-button>
</div>
<div style="display: inline-flex;align-items: center">
<ul class="filter" style="flex: none;">
<li>
<label>省份</label>
<el-select v-model="filter.provinceId" clearable filterable placeholder="请选择省份" @change="provinceChange"
@clear="clearProvince">
<el-option v-for="(item, i) in provinces" :key="i" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</li>
<li>
<label>城市</label>
<el-select v-model="filter.cityId" clearable filterable placeholder="请选择城市" :disabled="!filter.provinceId"
@change="initData">
<el-option v-for="(item, i) in cities" :key="i" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</li>
<li>
<label>学校</label>
<el-select v-model="filter.realSchoolId" clearable filterable placeholder="请选择学校" @change="initData">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</li>
<li>
<el-input style="margin-right: 15px" :placeholder="'请输入' + (competitionType ? '团队名称/队长' : '学生姓名') + '/学校'"
prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</li>
<el-button v-if="!published" type="primary" @click="cancelPublish(1)">发布排名</el-button>
<template v-else>
<span style="margin-right: 10px;white-space: nowrap;">{{ publishTime }}发布排名</span>
@ -31,10 +57,11 @@
<el-button v-if="list.length" type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' :
'批量导出'
}}</el-button>
</ul>
</div>
</div>
<el-table :data="list" class="table" ref="table" stripe row-key="scoreId"
@selection-change="handleSelectionChange" header-align="center">
<el-table :data="list" class="table" ref="table" row-key="scoreId" @selection-change="handleSelectionChange"
header-align="center">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="排名" align="center">
<template slot-scope="scope">
@ -46,6 +73,8 @@
<el-table-column prop="leaderName" label="队长" min-width="150" align="center"></el-table-column>
</template>
<el-table-column v-else prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="provinceName" label="省份" min-width="100" align="center"></el-table-column>
<el-table-column prop="cityName" label="城市" min-width="100" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column>
<el-table-column prop="timeSum" label="用时" width="90" align="center">
@ -147,7 +176,7 @@
<template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p>
<p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;"
style="margin-bottom: 10px;font-size: 14px;color: #062c87;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p>
</template>
</div>
@ -182,6 +211,14 @@ export default {
competitionType: +this.$route.query.competitionType,
rule: +this.$route.query.rule,
searchTimer: null,
filter: {
provinceId: '',
cityId: '',
realSchoolId: '',
},
provinces: [],
cities: [],
schools: [],
keyword: this.$route.query.keyword || '',
teamCalculationMethods: [
{
@ -262,6 +299,8 @@ export default {
}
},
mounted () {
this.getProvince()
this.getSchool()
this.getStage()
},
methods: {
@ -275,6 +314,7 @@ export default {
},
//
getRank () {
const { filter } = this
this.loading = true
//
if (this.type) {
@ -284,7 +324,8 @@ export default {
competitionId: this.id,
isOverallRanking: this.active ? 0 : 1,
stageId: this.active || this.stageId,
keyword: this.keyword
keyword: this.keyword,
...filter
}).then(({ message, publishStatus }) => {
// isRelease 01
this.published = publishStatus
@ -307,7 +348,8 @@ export default {
publicationType: this.type,
locationStageId: this.stageId,
stageIds: ids.splice(0, ids.length - 1),
keyword: this.keyword
keyword: this.keyword,
...filter
}).then(({ page, publishStatus, total }) => {
this.published = publishStatus
this.list = page || []
@ -319,7 +361,7 @@ export default {
})
} else {
//
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}&keyword=${this.keyword}`).then(({ page, total, publishStatus }) => {
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}&keyword=${this.keyword}&provinceId=${filter.provinceId}&cityId=${filter.cityId}&realSchoolId=${filter.realSchoolId}`).then(({ page, total, publishStatus }) => {
this.published = publishStatus
this.list = page
this.total = total
@ -367,6 +409,39 @@ export default {
this.active = i
this.initData()
},
//
async getProvince () {
const { list } = await this.$get(this.api.queryProvince)
this.provinces = list
},
//
clearProvince () {
this.filter.cityId = ''
},
//
provinceChange () {
this.clearProvince()
this.getCity()
this.initData()
},
//
async getCity () {
const id = this.filter.provinceId
if (id) {
const { list } = await this.$get(this.api.queryCity, {
provinceId: id
})
this.cities = list
}
},
//
async getSchool () {
const { list } = await this.$get(this.api.querySchoolData)
this.schools = list
},
//
show (row, i) {
this.teams = []
@ -717,7 +792,7 @@ export default {
.score {
font-size: 16px;
font-weight: 600;
color: #9076ff;
color: #062c87;
}
}

@ -23,9 +23,11 @@
'取消' : '' }}自动分配阶段成员</el-button>
<el-tooltip placement="top">
<div slot="content">
<p style="margin-bottom: 5px;">报名结束前设置的自动分配将在报名结束时触发一次系统自动分配取消则不触发</p>
<p>报名结束后也可以手动点击自动分配按钮来立即触发系统自动分配并且点击一次就触发一次</p>
<p>自动分配仅对触发时已报名的人员进行对于分配后才报名的人员如需自动分配则需手动再次触发自动分配</p>
<p>报名结束前设置的自动分配将在报名结束时触发一次系统自动分配取消则不触发</p>
<p style="margin: 5px 0;">报名结束后也可以手动点击自动分配按钮来立即触发系统自动分配并且点击一次就触发一次</p>
<p></p>
<p style="margin: 5px 0;">&emsp;&emsp;1. 自动分配仅对触发时已报名的人员进行对于分配后才报名的人员如需自动分配则需手动再次触发自动分配</p>
<p>&emsp;&emsp;2. 若已有学生提交了成绩报告则无法启用自动分配功能</p>
</div>
<i class="el-icon-question"
style="margin: 0 10px 0 5px;font-size: 16px;color: #8f8f8f;cursor: pointer;"></i>
@ -39,8 +41,8 @@
</div>
</div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id" v-loading="loading" @sort-change="sortChange">
<el-table ref="table" :data="listData" class="table" header-align="center" @selection-change="handleSelectionChange"
row-key="id" v-loading="loading" @sort-change="sortChange">
<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">
@ -55,7 +57,7 @@
<el-table-column prop="username" :label="info.completeCompetitionSetup.competitionType ? '队长/成员' : '学生姓名'"
min-width="140" align="center">
</el-table-column>
<el-table-column prop="workNumber" :label="info.completeCompetitionSetup.competitionType ? '队长/成员学号' : '学号'"
<el-table-column prop="account" :label="info.completeCompetitionSetup.competitionType ? '队长/成员账号' : '账号'"
min-width="140" align="center">
</el-table-column>
<el-table-column prop="phone" :label="info.completeCompetitionSetup.competitionType ? '队长/成员手机号' : '手机号'"
@ -185,7 +187,7 @@
<template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ uploadTips }}</p>
<p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;"
style="margin-bottom: 10px;font-size: 14px;color: #062c87;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p>
</template>
</div>

@ -1,70 +1,40 @@
<template>
<!-- 报名人员 -->
<div class="page-content"
style="padding: 24px">
<div class="tool"
style="justify-content: flex-end">
<el-button type="primary"
round
@click="add"
v-auth="'/match:管理:公告通知:新增'">新增</el-button>
<div class="page-content" style="padding: 24px">
<div class="tool" style="justify-content: flex-end">
<el-button type="primary" round @click="add" v-auth="'/match:管理:公告通知:新增'">新增</el-button>
</div>
<el-table ref="table"
:data="listData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
<el-table ref="table" :data="listData" class="table" header-align="center" @selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<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="announcementTitle"
label="标题名称">
<el-table-column prop="announcementTitle" label="标题名称">
</el-table-column>
<el-table-column prop="createTime"
label="创建时间">
<el-table-column prop="createTime" label="创建时间">
</el-table-column>
<el-table-column prop="updateTime"
label="发布时间">
<el-table-column prop="updateTime" label="发布时间">
</el-table-column>
<el-table-column prop="phone"
label="状态">
<el-table-column prop="phone" label="状态">
<template slot-scope="scope">
{{ scope.row.status ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="250">
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<el-button type="text"
@click="edit(scope.row)"
v-auth="'/match:管理:公告通知:编辑'">编辑</el-button>
<el-button type="text"
@click="del(scope.row)"
v-auth="'/match:管理:公告通知:删除'">删除</el-button>
<el-switch v-auth="'/match:管理:公告通知:启用'"
v-model="scope.row.isOpen"
:active-text="scope.row.isOpen ? '关' : '开'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
<el-button type="text" @click="edit(scope.row)" v-auth="'/match:管理:公告通知:编辑'">编辑</el-button>
<el-button type="text" @click="del(scope.row)" v-auth="'/match:管理:公告通知:删除'">删除</el-button>
<el-switch v-auth="'/match:管理:公告通知:启用'" v-model="scope.row.isOpen" :active-text="scope.row.isOpen ? '' : ''"
:active-value="0" :inactive-value="1" style="margin: 0 10px 0 5px"
@change="switchOff($event, scope.row, scope.$index)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange"
:current-page="pageNo">
</el-pagination>
</div>
@ -162,5 +132,4 @@ export default {
};
</script>
<style scoped>
</style>
<style scoped></style>

@ -0,0 +1,675 @@
<template>
<div>
<el-card shadow="hover" class="m-b-20 head-card">
<div class="flex-between m-b-20">
<el-page-header @back="back" content="成绩管理"></el-page-header>
</div>
</el-card>
<div v-loading="loading">
<el-card v-if="method != 2" shadow="hover" class="m-b-20">
<div class="stat">
<div class="nums">
<div class="item">
<p class="name">已参加/应参加人数</p>
<p class="val">{{ isNaN(statData.totalNumber) ? '' : statData.attendance + '/' + statData.totalNumber }}
</p>
</div>
<div class="item">
<p class="name">实验平均分</p>
<p class="val">{{ avgScore }}</p>
</div>
</div>
<div class="chart" id="chart"></div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div v-if="showFile" class="tabs m-b-20">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: i === active }" @click="tabChange(i)">{{
item }}</a>
</div>
<div class="tool flex-between">
<ul class="filter">
<li>
<label>省份</label>
<el-select v-model="filter.provinceId" filterable clearable placeholder="请选择省份" @change="provinceChange"
@clear="clearProvince">
<el-option v-for="(item, i) in provinces" :key="i" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</li>
<li>
<label>城市</label>
<el-select v-model="filter.cityId" filterable clearable placeholder="请选择城市" :disabled="!filter.provinceId"
@change="initData">
<el-option v-for="(item, i) in cities" :key="i" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</li>
<li>
<label>学校</label>
<el-select v-model="filter.realSchoolId" clearable filterable placeholder="请选择学校" @change="initData">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</li>
<li>
<el-input size="small" placeholder="请输入学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable
style="width: 300px"></el-input>
</li>
</ul>
<div v-if="!active">
<el-button v-if="method == 2" type="primary" @click="batchImport">上传成绩</el-button>
<el-button type="primary" :disabled="!!multipleSelection.find(e => method != 2 && !e.reportId)"
@click="delAllData">批量删除</el-button>
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出'
}}</el-button>
</div>
<div v-else>
<el-button type="primary" :loading="exporting1" @click="exportData1">{{ exporting1 ? '正在导出' : '批量导出'
}}</el-button>
</div>
</div>
<template v-if="!active">
<el-table :data="list" class="table" :key="1" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="provinceName" label="省份" min-width="100" align="center"></el-table-column>
<el-table-column prop="cityName" label="城市" min-width="100" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" min-width="100"
align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="score" label="分数" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.submitTime ? scope.row.score : '--' }}
</template>
</el-table-column>
<el-table-column prop="timeSum" label="耗时" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }}
</template>
</el-table-column>
<el-table-column prop="submitTime" label="提交时间" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.submitTime || '--' }}
</template>
</el-table-column>
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.reportId || method == 2 ? '已参加' : '未参加' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<template slot-scope="scope">
<el-button v-if="method != 2 && scope.row.reportId" type="text"
@click="show(scope.row)">查看成绩报告</el-button>
<el-button v-if="scope.row.reportId" type="text" @click="handleDelete(scope.row)">删除</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>
</template>
<template v-else>
<el-table :data="list1" class="table" :key="2" header-align="center"
@selection-change="handleSelectionChange1" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page1 - 1) * pageSize + 1 }}
</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="schoolName" label="学生账号归属" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="fileName" label="文件名" align="center"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" align="center"></el-table-column>
<el-table-column prop="fileType" label="文件类型" align="center"></el-table-column>
<el-table-column prop="fileFormat" label="文件格式" align="center"></el-table-column>
<el-table-column prop="createTime" label="提交时间" width="150" align="center">
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button v-if="!isCompress(scope.row.fileFormat)" type="text"
@click="preview(scope.row)">预览文件</el-button>
<el-button type="primary" size="mini" :loading="scope.row.loading"
@click="exportFile(scope.row)">导出文件</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total1"
@current-change="handleCurrentChange1" :current-page="page1">
</el-pagination>
</div>
</template>
</el-card>
</div>
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false"
@close="cancelUpload">
<div style="text-align: center">
<template v-if="!uploadFaild">
<div style="margin-bottom: 10px;">
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div>
<el-upload ref="upload" name="file" accept=".xls,.xlsx" class="import-file" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-error="uploadError" :on-success="uploadSuccess" :before-remove="beforeRemove"
:limit="1" :on-exceed="handleExceed" :action="this.api.batchImportGrades" :file-list="uploadList"
:headers="headers" :disabled="uploading" :data="{
competitionId: this.id,
stageId: this.stageId,
systemId: 0
}">
<el-button type="primary" :loading="uploading" class="ml20">上传文件<i
class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload>
</template>
<template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p>
<p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #062c87;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p>
</template>
</div>
<span v-if="uploading" slot="footer" class="dialog-footer">
<el-button @click="cancelUpload">停止导入</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import util from "@/libs/util";
import * as echarts from "echarts";
import axios from 'axios';
import Zip from '@/libs/zip'
export default {
data () {
return {
id: +this.$route.query.id,
stageId: +this.$route.query.stageId,
method: +this.$route.query.method,
competitionType: +this.$route.query.competitionType,
showFile: this.$route.query.showFile === 'true',
isCompress: util.isCompress,
filter: {
provinceId: '',
cityId: '',
realSchoolId: '',
reviewStatus: '',
scoreSortOrder: '',
submitTimeSortOrder: '',
},
provinces: [],
cities: [],
schools: [],
keyword: this.$route.query.keyword || '',
searchTimer: null,
list: [],
multipleSelection: [],
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
list1: [],
multipleSelection1: [],
page1: 1,
total1: 0,
avgScore: 0, //
importVisible: false,
uploadList: [],
uploadFaild: false,
uploading: false,
faildData: null,
headers: {
token: sessionStorage.getItem("token")
},
statData: {},
tabs: ['成绩列表', '文件列表'],
active: 0,
loading: false,
exporting: false,
exporting1: false,
};
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.$router.push({
path: '/otherArchList',
query: {
...this.$route.query,
keyword: val
}
})
this.initData();
}, 500);
}
},
mounted () {
this.getData()
this.getProvince()
this.getSchool()
},
methods: {
async getData () {
this.loading = true
//
if (this.active) {
const { data } = await this.$post(this.api.cCompetitionStageFileList, {
pageNum: this.page1,
pageSize: this.pageSize,
competitionId: this.id,
stageId: this.stageId,
keyWord: this.keyword,
...this.filter
})
data.records.forEach(e => {
e.loading = false
e.fileType = '其他'
if (util.isVideo(e.fileFormat)) {
e.fileType = '视频'
} else if (util.isAudio(e.fileFormat)) {
e.fileType = '音频'
} else if (util.isImg(e.fileFormat)) {
e.fileType = '图片'
} else if (util.isDoc(e.fileFormat)) {
e.fileType = '文档'
} else if (util.isCompress(e.fileFormat)) {
e.fileType = '压缩包'
} else if (e.fileType === 'pdf') {
e.fileType = 'pdf'
}
})
this.list1 = data.records
this.total1 = data.total
this.loading = false
} else { //
const { data, page } = await this.$post(this.api.stageGradeManagementList, {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
keyWord: this.keyword,
stageId: this.stageId,
isNakadai: 1,
...this.filter
})
this.loading = false
this.total = page.total
this.list = page.records
this.statData = data
this.avgScore = (+data.avgScore).toFixed(2)
this.method != 2 && this.getChart()
}
},
initData () {
this.page = 1
this.getData()
},
//
async getProvince () {
const { list } = await this.$get(this.api.queryProvince)
this.provinces = list
},
//
clearProvince () {
this.filter.cityId = ''
},
//
provinceChange () {
this.clearProvince()
this.getCity()
this.initData()
},
//
async getCity () {
const id = this.filter.provinceId
if (id) {
const { list } = await this.$get(this.api.queryCity, {
provinceId: id
})
this.cities = list
}
},
//
async getSchool () {
const { list } = await this.$get(this.api.querySchoolData)
this.schools = list
},
//
show (row) {
this.$router.push(`/trialReport?reportId=${row.reportId}`)
},
// ()
async exportData () {
if (this.list.length) {
this.exporting = true
//
if (this.multipleSelection.length) {
const res = await axios.post(this.api.exportExperimentalResultsInBatch, this.multipleSelection, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
} else if (this.list.length) {
const res = await axios.post(this.api.allExperimentalResultsAreDerived, {
pageNum: 1,
pageSize: 10000,
competitionId: this.id,
isNakadai: 1,
stageId: this.stageId,
}, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
}
}
},
// ()
exportData1 () {
this.exporting1 = true
let list = this.list1
if (this.multipleSelection1.length) {
list = this.multipleSelection1
}
Zip('批量导出', list, () => {
this.exporting1 = false
})
},
handleDelete (row) { //
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.batchDeleteContestGrade, {
ids: [this.method == 2 ? row.scoreId : row.reportId],
competitionId: this.id,
stageId: this.stageId
}).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
}).catch(() => { });
},
delAllData () { //
const list = this.multipleSelection
this.$confirm(list.length ? '该项目下的所有成绩报告将会删除,是否继续?' : '是否确定删除列表所有成绩数据?', "提示", {
type: "warning"
}).then(async () => {
let ids = []
if (list.length) {
ids = list.map(item => {
return this.method == 2 ? item.scoreId : item.reportId
});
ids = ids.filter(e => e)
}
const data = {
competitionId: this.id,
stageId: this.stageId
}
if (list.length) data.ids = ids
await this.$post(this.api.batchDeleteContestGrade, data)
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(() => { });
},
handleSelectionChange (val) { //
this.multipleSelection = val;
},
handleCurrentChange (val) { //
this.$router.push({
path: '/otherArchList',
query: {
...this.$route.query,
page: val
}
})
this.page = val;
this.getData();
},
handleSelectionChange1 (val) { //
this.multipleSelection1 = val;
},
handleCurrentChange1 (val) { //
this.page1 = val;
this.getData();
},
getChart () { // 线
const data = []
const { statData } = this
for (let i = 1; i <= 10; i++) {
data.push(statData['num' + i])
}
let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({
title: { text: "实验分数分布图" },
tooltip: {},
xAxis: {
name: "分数",
type: "category",
boundaryGap: false,
interval: 10,
data: ["0-10", "10-20", "20-30", "30-40", "40-50", "50-60", "60-70", "70-80", "80-90", "90-100"]
},
yAxis: {
name: "人数",
type: "value",
minInterval: 10
},
series: [{
data,
type: "line",
areaStyle: {},
label: {
show: true,
position: 'top'
},
color: ["#8191fd"]
}]
});
},
//
batchImport () {
this.importVisible = true
this.uploadList = []
this.uploadFaild = false
},
//
download () {
axios.get(`${this.api.gradeDownloadExcel}?competitionId=${this.id}&stageId=${this.stageId}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect('赛事成绩导入模板.xlsx', new Blob([res.data]))
}).catch(res => { })
},
//
handleExceed (files, fileList) {
util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
)
},
//
showFaild () {
axios.get(`${this.api.performanceExportFailure}?exportCode=${this.faildData.exportCode}&competitionType=${this.faildData.competitionType}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data]))
}).catch(res => { })
},
uploadSuccess (res) {
this.uploading = false
this.uploadFaild = false
if (res.status === 200) {
this.initData()
const { data } = res
if (data.exportCode) {
this.faildData = data
this.uploadFaild = true
} else {
util.successMsg(data.tip, 3000)
this.importVisible = false
}
} else {
util.errorMsg(res.message || '上传失败,请检查数据')
}
},
uploadError (err, file, fileList) {
this.uploading = false
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
beforeUpload (file) {
this.uploading = true
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
},
handleRemove (file, fileList) {
this.uploadList = fileList
this.uploadFaild = false
},
cancelUpload () {
this.uploading = false
if (this.$refs.upload) this.$refs.upload.abort()
this.keyword = ''
this.initData()
this.importVisible = false
},
// tab
tabChange (i) {
this.active = i
this.getData()
},
//
preview (item) {
window.open((util.isDoc(item.fileFormat) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath)
},
//
exportFile (item) {
item.loading = true
const url = item.filePath
var x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = "blob"
x.onload = function (e) {
var url = window.URL.createObjectURL(x.response)
var a = document.createElement("a")
a.href = url
a.download = item.userName + '-' + item.fileName
a.click()
item.loading = false
}
x.send()
},
back () {
this.$router.push(this.$store.state.innerReferrer)
}
}
};
</script>
<style lang="scss" scoped>
/deep/ .head-card {
.el-card__body {
padding-bottom: 0px;
.el-tabs__header {
margin-bottom: 1px;
.el-tabs__nav-wrap::after {
display: none;
}
.el-tabs__item {
font-size: 18px;
}
}
}
}
.stat {
display: flex;
.nums {
display: flex;
align-items: center;
margin-right: 20px;
.item:nth-child(1) {
background-image: url('../../../assets/img/total.png');
}
.item:nth-child(2) {
background-image: url('../../../assets/img/avg.png');
}
.item {
width: 300px;
min-height: 145px;
padding: 30px 30px;
margin: 0 10px;
box-sizing: border-box;
border-radius: 8px;
background-size: 100% 100%;
background-repeat: no-repeat;
p {
font-size: 18px;
color: #ffffff;
}
.val {
margin-top: 10px;
color: #ffffff;
font-size: 36px;
}
}
}
.chart {
flex: 1;
height: 300px;
}
}
/deep/.import-file {
.el-progress__text,
.el-progress,
.el-upload-list__item-status-label {
display: none !important;
}
}
</style>

@ -1,535 +0,0 @@
<template>
<div>
<el-card shadow="hover" class="m-b-20 head-card">
<div class="flex-between m-b-20">
<el-page-header @back="back" content="成绩管理"></el-page-header>
</div>
</el-card>
<div v-loading="loading">
<el-card v-if="method != 2" shadow="hover" class="m-b-20">
<div class="stat">
<div class="nums">
<div class="item">
<p class="name">已参加/应参加人数</p>
<p class="val">{{ isNaN(statData.totalNumber) ? '' : statData.attendance + '/' + statData.totalNumber }}
</p>
</div>
<div class="item">
<p class="name">平均分</p>
<p class="val">{{ (+statData.avgScore).toFixed(2) }}</p>
</div>
<div class="item">
<p class="name">最高分</p>
<p class="val">{{ statData.maxScore }}
</p>
</div>
<div class="item">
<p class="name">最低分</p>
<p class="val">{{ statData.minScore }}</p>
</div>
</div>
<div class="chart" id="chart"></div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div class="tabs m-b-20">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.id === active }"
@click="tabChange(item.id)">{{ item.name }}</a>
</div>
<div class="flex-between m-b-20">
<div>
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable
style="width: 300px"></el-input>
</div>
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出'
}}</el-button>
</div>
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="schoolName" label="学生账号归属" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学生所在院校" min-width="100" align="center"></el-table-column>
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" min-width="100"
align="center"></el-table-column>
<el-table-column prop="userName" label="学生姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="score" label="分数" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.submitTime ? scope.row.score : '--' }}
</template>
</el-table-column>
<el-table-column prop="timeSum" label="耗时" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }}
</template>
</el-table-column>
<el-table-column prop="submitTime" label="提交时间" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.submitTime || '--' }}
</template>
</el-table-column>
<el-table-column label="状态" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.reportId || method == 2 ? '已参加' : '未参加' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<template slot-scope="scope">
<el-button v-if="method != 2 && scope.row.reportId" type="text"
@click="show(scope.row)">查看成绩报告</el-button>
<el-button v-if="scope.row.reportId" type="text" @click="handleDelete(scope.row)">删除</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-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false"
@close="cancelUpload">
<div style="text-align: center">
<template v-if="!uploadFaild">
<div style="margin-bottom: 10px;">
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div>
<el-upload ref="upload" name="file" accept=".xls,.xlsx" class="import-file" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-error="uploadError" :on-success="uploadSuccess" :before-remove="beforeRemove"
:limit="1" :on-exceed="handleExceed" :action="this.api.batchImportGrades" :file-list="uploadList"
:headers="headers" :disabled="uploading" :data="{
competitionId: this.id,
stageId: this.stageId,
systemId: 0
}">
<el-button type="primary" :loading="uploading" class="ml20">上传文件<i
class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload>
</template>
<template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p>
<p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p>
</template>
</div>
<span v-if="uploading" slot="footer" class="dialog-footer">
<el-button @click="cancelUpload">停止导入</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import util from "@/libs/util";
import * as echarts from "echarts";
import axios from 'axios';
import Zip from '@/libs/zip'
export default {
data () {
return {
id: +this.$route.query.id,
stageId: +this.$route.query.stageId,
method: +this.$route.query.method,
competitionType: +this.$route.query.competitionType,
isCompress: util.isCompress,
keyword: this.$route.query.keyword || '',
searchTimer: null,
list: [],
multipleSelection: [],
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
list1: [],
multipleSelection1: [],
page1: 1,
total1: 0,
avgScore: 0, //
importVisible: false,
uploadList: [],
uploadFaild: false,
uploading: false,
faildData: null,
headers: {
token: sessionStorage.getItem("token")
},
statData: {
avgScore: 0,
maxScore: 0,
minScore: 0,
},
tabs: [
{
id: 1,
name: '已提交'
},
{
id: 0,
name: '未提交'
}
],
active: 1,
loading: false,
exporting: false,
exporting1: false,
};
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.$router.push({
path: '/theoryArchList',
query: {
...this.$route.query,
keyword: val
}
})
this.initData();
}, 500);
}
},
mounted () {
this.getData()
},
methods: {
async getData () {
this.loading = true
const { data, page } = await this.$post(this.api.stageGradeManagementList, {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
keyWord: this.keyword,
stageId: this.stageId,
isNakadai: 1,
participatingState: this.active,
})
this.loading = false
this.total = page.total
this.list = page.records
this.statData = data
this.getChart()
},
initData () {
this.page = 1
this.getData()
},
//
show (row) {
this.$router.push(`/theoryReport?reportId=${row.reportId}`)
},
// ()
async exportData () {
if (this.list.length) {
this.exporting = true
//
if (this.multipleSelection.length) {
const res = await axios.post(this.api.exportExperimentalResultsInBatch, this.multipleSelection, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
} else if (this.list.length) {
const res = await axios.post(this.api.allExperimentalResultsAreDerived, {
pageNum: 1,
pageSize: 10000,
competitionId: this.id,
isNakadai: 1,
stageId: this.stageId,
participatingState: this.active,
}, {
headers: this.headers,
responseType: 'blob'
})
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data]))
this.exporting = false
}
}
},
async handleDelete (row) { //
await this.$confirm(`<p>确认要删除【${row.userName}】的成绩记录吗?</p><p style="color: #f56c6c;">删除后成绩数据不可恢复,自动变为未提交</p>`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
})
await this.$post(this.api.batchDeleteContestGrade, {
ids: [this.method == 2 ? row.scoreId : row.reportId],
competitionId: this.id,
stageId: this.stageId
})
util.successMsg("删除成功")
this.getData()
},
delAllData () { //
const list = this.multipleSelection
this.$confirm(list.length ? '该项目下的所有成绩报告将会删除,是否继续?' : '是否确定删除列表所有成绩数据?', "提示", {
type: "warning"
}).then(async () => {
let ids = []
if (list.length) {
ids = list.map(item => {
return this.method == 2 ? item.scoreId : item.reportId
});
ids = ids.filter(e => e)
}
const data = {
competitionId: this.id,
stageId: this.stageId
}
if (list.length) data.ids = ids
await this.$post(this.api.batchDeleteContestGrade, data)
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
this.getData();
}).catch(() => { });
},
handleSelectionChange (val) { //
this.multipleSelection = val;
},
handleCurrentChange (val) { //
this.$router.push({
path: '/theoryArchList',
query: {
...this.$route.query,
page: val
}
})
this.page = val;
this.getData();
},
handleSelectionChange1 (val) { //
this.multipleSelection1 = val;
},
getChart () { // 线
const { fractionalSegmentCounts: data } = this.statData
let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({
title: { text: "实验分数分布图" },
tooltip: {},
xAxis: {
name: "分数",
type: "category",
boundaryGap: false,
interval: 10,
data: data.map(e => e.range)
},
yAxis: {
name: "人数",
type: "value",
minInterval: 10
},
series: [{
data: data.map(e => e.count),
type: "line",
areaStyle: {},
color: ["#8191fd"]
}]
});
},
//
batchImport () {
this.importVisible = true
this.uploadList = []
this.uploadFaild = false
},
//
download () {
axios.get(`${this.api.gradeDownloadExcel}?competitionId=${this.id}&stageId=${this.stageId}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect('赛事成绩导入模板.xlsx', new Blob([res.data]))
}).catch(res => { })
},
//
handleExceed (files, fileList) {
util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
)
},
//
showFaild () {
axios.get(`${this.api.performanceExportFailure}?exportCode=${this.faildData.exportCode}&competitionType=${this.faildData.competitionType}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data]))
}).catch(res => { })
},
uploadSuccess (res) {
this.uploading = false
this.uploadFaild = false
if (res.status === 200) {
this.initData()
const { data } = res
if (data.exportCode) {
this.faildData = data
this.uploadFaild = true
} else {
util.successMsg(data.tip, 3000)
this.importVisible = false
}
} else {
util.errorMsg(res.message || '上传失败,请检查数据')
}
},
uploadError (err, file, fileList) {
this.uploading = false
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
beforeUpload (file) {
this.uploading = true
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
},
handleRemove (file, fileList) {
this.uploadList = fileList
this.uploadFaild = false
},
cancelUpload () {
this.uploading = false
if (this.$refs.upload) this.$refs.upload.abort()
this.keyword = ''
this.initData()
this.importVisible = false
},
// tab
tabChange (i) {
this.multipleSelection = []
this.$refs.table.clearSelection()
this.active = i
this.initData()
},
//
preview (item) {
window.open((util.isDoc(item.fileFormat) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + item.filePath)
},
//
exportFile (item) {
item.loading = true
const url = item.filePath
var x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = "blob"
x.onload = function (e) {
var url = window.URL.createObjectURL(x.response)
var a = document.createElement("a")
a.href = url
a.download = item.userName + '-' + item.fileName
a.click()
item.loading = false
}
x.send()
},
back () {
this.$router.push(this.$store.state.innerReferrer)
}
}
};
</script>
<style lang="scss" scoped>
/deep/ .head-card {
.el-card__body {
padding-bottom: 0px;
.el-tabs__header {
margin-bottom: 1px;
.el-tabs__nav-wrap::after {
display: none;
}
.el-tabs__item {
font-size: 18px;
}
}
}
}
.stat {
display: flex;
.nums {
display: flex;
flex-wrap: wrap;
align-items: center;
width: 640px;
margin-right: 20px;
.item:nth-child(1) {
background-image: url('../../../assets/img/total.png');
}
.item:nth-child(2) {
background-image: url('../../../assets/img/avg.png');
}
.item:nth-child(3) {
background-image: url('../../../assets/img/ach1.png');
}
.item:nth-child(4) {
background-image: url('../../../assets/img/ach2.png');
}
.item {
width: 300px;
min-height: 145px;
padding: 30px 30px;
margin: 0 10px;
box-sizing: border-box;
border-radius: 8px;
background-size: 100% 100%;
background-repeat: no-repeat;
p {
font-size: 18px;
color: #ffffff;
}
.val {
margin-top: 10px;
color: #ffffff;
font-size: 36px;
}
}
}
.chart {
width: calc(100% - 660px);
height: 300px;
}
}
/deep/.import-file {
.el-progress__text,
.el-progress,
.el-upload-list__item-status-label {
display: none !important;
}
}
</style>

@ -64,7 +64,7 @@
<div v-else class="score-wrap">
<em>{{ info.score }}</em>
<img src="@/assets/img/point.png" alt="">
<p v-if="essayExist" class="exist">部分试题待判分成绩待定</p>
<p v-if="notReview" class="exist">部分试题待判分成绩待定</p>
</div>
</li>
<li>
@ -88,7 +88,7 @@
<img src="@/assets/img/report4.png" alt="">
得分情况
</h6>
<el-table :data="outlines" class="table" border stripe header-align="center">
<el-table :data="outlines" class="table" border header-align="center">
<el-table-column prop="outlineName" label="大题名称" align="center"></el-table-column>
<el-table-column prop="questionNum" label="小题总数" align="center"></el-table-column>
<el-table-column prop="targetScore" label="总分" align="center">
@ -96,14 +96,16 @@
</el-table-column>
<el-table-column prop="userTotalScore" label="得分" align="center">
<template slot-scope="scope">
<p v-if="scope.row.questionType === 'essay'" class="text-red">待评分</p>
<p v-else-if="essayExist && !scope.row.paperId" class="text-red">{{ scope.row.userTotalScore
<p v-if="scope.row.questionType === 'essay' && scope.row.scoringStatus === '未判分'" class="text-red">待评分
</p>
<p v-else-if="notReview && !scope.row.paperId" class="text-red">{{ scope.row.userTotalScore
}}部分试题待判分成绩待定</p>
<p v-else>{{ scope.row.userTotalScore }}</p>
</template>
</el-table-column>
<el-table-column prop="scoreRatePercentage" label="得分率" align="center">
<template slot-scope="scope">{{ scope.row.questionType === 'essay' ? '-' : scope.row.scoreRatePercentage
<template slot-scope="scope">{{ scope.row.questionType === 'essay' && scope.row.scoringStatus === '未判分'
? '-' : scope.row.scoreRatePercentage
}}</template>
</el-table-column>
</el-table>
@ -127,16 +129,18 @@
<el-tag class="m-r-5" :type="ques.difficultTheme">{{ ques.difficult }}</el-tag>
<div class="stem html-parse" :id="'stem' + ques.id" v-html="ques.stem"></div>
<p>{{ ques.questionScore }}</p>
<p v-if="!ques.notScored">{{ ques.questionScore }}</p>
</div>
<div
v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList"
class="m-b-10">
<div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt">
<template v-if="!ques.notScored">
<img v-if="opt.optCorrect === 1" src="@/assets/img/right.svg" alt="" class="icon">
<img v-else-if="!opt.optCorrect" src="@/assets/img/wrong.svg" alt="" class="icon">
<span v-else class="icon not-ans"></span>
</template>
<span>{{ numToLetter(j) }}.&nbsp;</span>
<div class="text html-parse" v-html="opt.optionText"></div>
@ -156,37 +160,46 @@
</template>
<div v-if="ques.knowledgePointList && ques.knowledgePointList.length" class="m-b-10">
<span>知识点</span>
<span class="line-label">知识点</span>
<el-tag v-for="(kp, k) in ques.knowledgePointList" :key="k" class="m-r-5" type="info">{{ kp.name
}}</el-tag>
</div>
<div class="flex m-b-10">
<span>解析</span>
<span class="line-label">解析</span>
<div
v-if="ques.questionAnswerVersionsList.length && ques.questionAnswerVersionsList[0].answerAnalysis"
v-html="ques.questionAnswerVersionsList[0].answerAnalysis" class="html-parse"></div>
<div v-else>暂无解析</div>
</div>
<div :class="['ques-info', { essay: item.questionType === 'essay' }]">
<div
:class="['ques-info', { essay: item.questionType === 'essay' && ques.scoringStatus === '未判分' && !ques.notScored }]">
<!-- 主观题 -->
<template v-if="item.questionType === 'essay'">
<div class="line">
<span class="line-label">参考答案</span>
<div v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div>
<div v-if="ques.questionAnswerVersionsList[0].referenceAnswer"
v-html="ques.questionAnswerVersionsList[0].referenceAnswer" class="html-parse"></div>
<span v-else>暂无参考答案</span>
</div>
<div class="line">
<span class="line-label">考生答案</span>
<div v-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div>
<div v-else>未作答</div>
<p v-if="!ques.richTextStatus">无需作答</p>
<div v-else-if="ques.answerContent" v-html="ques.answerContent" class="html-parse"></div>
<p v-else>未作答</p>
</div>
<div v-if="ques.attachmentUrl" class="line">
<div v-if="ques.allowAttachment" class="line">
<span class="line-label">考生上传附件</span>
<template v-if="ques.attachmentUrl">
<el-link class="m-r-10" type="primary" @click="preview(ques.attachmentUrl)">{{
ques.attachmentName }}</el-link>
<el-button type="primary" size="mini" round
@click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button>
</template>
<span v-else>未上传</span>
</div>
</template>
<!-- 客观题 -->
<template v-else>
<div class="line">正确答案{{ ques.quesAnswer }}</div>
<div class="line">
@ -195,16 +208,26 @@
<div v-else-if="ques.userAnswerFill" class="fill-answers">
<p v-for="(ans, j) in ques.userAnswerFill" :key="j" class="fill-answer">
填空{{ j + 1 }}{{ ans.studentAnswer || '未作答' }}
<template v-if="!ques.notScored">
<img v-if="ans.correct" src="@/assets/img/right.svg" alt="" class="icon">
<img v-else src="@/assets/img/wrong.svg" alt="" class="icon">
<img v-else src="@/assets/img/wrong.svg" alt="" class="icon">
</template>
</p>
</div>
<span v-else>未作答</span>
</div>
</template>
<div class="line">题目分值{{ ques.questionScore }}</div>
<div class="line">考生得分<el-input class="score-input" size="small" :value="ques.userScore"
disabled />
<div class="line">题目分值{{ ques.notScored ? '不计分' : ques.questionScore + '分' }}</div>
<div class="line">考生得分<template v-if="ques.notScored">不计分</template>
<template v-else>
<el-input class="score-input" size="small" :value="ques.userScore" disabled />
</template>
</div>
<div v-for="(coment, k) in ques.comment" :key="k" class="line">
<span class="line-label">评语{{ k + 1 }}</span>
<div v-html="coment" class="html-parse"></div>
</div>
</div>
</div>
@ -280,10 +303,15 @@ export default {
id: 4,
name: '待判分'
},
{
id: 5,
name: '不计分'
},
],
outlines: [],
paper: [],
essayExist: 0,
notReview: 0,
previewImgVisible: false,
previewImg: '',
pdfVisible: false,
@ -305,8 +333,12 @@ export default {
const { questionTypes: types, difficults } = QuesConst
const { numToLetter } = Util
let essayExist = 0
let notReview = 0
outline.map(e => {
if (e.questionType === 'essay') essayExist = 1
if (e.questionType === 'essay') {
essayExist = 1
if (e.scoringStatus === '未判分') notReview = 1
}
e.shrink = false
const type = e.questionType
e.questionTypeName = types.find(n => n.id === type).name
@ -319,10 +351,12 @@ export default {
}
}
n.notScored = n.questionScore === 0 // =0
if (n.notScored) n.userScore = '-'
const opts = n.questionAnswerVersionsList
if (type !== 'fill_blank' && type !== 'essay') { //
if (!n.userScore) n.userScore = 0
n.isCorrect = n.userScore && n.userScore === n.questionScore ? 1 : 2
this.handleIsCorrect(n)
//
let { userAnswer } = n
@ -367,14 +401,15 @@ export default {
//
let rightLen = 0
if (n.userAnswerFill) rightLen = n.userAnswerFill.filter(m => m.correct).length //
n.isCorrect = n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2)
n.isCorrect = n.notScored ? 5 : (n.userScore && n.questionScore === n.userScore ? 1 : (rightLen ? 3 : 2))
} else if (type === 'essay') { //
n.isCorrect = 4 //
this.handleIsCorrect(n)
}
})
})
this.essayExist = essayExist //
this.notReview = notReview //
this.paper = outline
this.outlines = [
...outline,
@ -402,6 +437,10 @@ export default {
this.loading = false
}
},
//
handleIsCorrect (n) {
n.isCorrect = n.notScored ? 5 : (n.userScore === undefined ? 4 : (n.userScore === n.questionScore ? 1 : n.userScore ? 3 : 2)) // reviewScore 0
},
scrollToSmooth (position, duration) {
let startTime = Date.now()
@ -616,7 +655,7 @@ samp {
}
.left {
width: 290px;
width: 320px;
margin-right: 15px;
background-color: #fff;
@ -655,7 +694,7 @@ samp {
li {
position: relative;
width: 30px;
min-width: 30px;
margin: 7px 9px;
font-size: 13px;
text-align: center;
@ -696,8 +735,15 @@ samp {
border-color: #fe9f0a;
}
.status5 .serial {
color: #fff;
background-color: #d1d1d1;
border-color: #d1d1d1;
}
.score {
height: 22px;
padding: 0 2px;
border: 1px solid #d3d3d3;
border-top: 0;
line-height: 22px;
@ -707,7 +753,7 @@ samp {
.status-filter {
display: flex;
justify-content: space-between;
padding: 10px;
padding: 10px 0;
border-top: 1px solid #e5e5e5;
li {
@ -717,6 +763,7 @@ samp {
font-size: 12px;
color: #333;
cursor: pointer;
white-space: nowrap;
border: 1px solid transparent;
&:before {
@ -760,7 +807,7 @@ samp {
}
}
&:last-child {
&:nth-child(4) {
&.active {
color: #fe9f0a;
border-color: #fe9f0a;
@ -771,6 +818,17 @@ samp {
}
}
&:last-child {
&.active {
color: #d1d1d1;
border-color: #d1d1d1;
}
&:before {
background-color: #d1d1d1;
}
}
&.active {
font-weight: 600;
}
@ -779,7 +837,7 @@ samp {
}
.right {
width: calc(100% - 325px);
width: calc(100% - 355px);
height: calc(100vh - 287px);
padding: 10px;
background-color: #fff;
@ -857,7 +915,7 @@ samp {
margin-right: 10px;
font-size: 12px;
line-height: 1;
color: #9076FF;
color: #062c87;
white-space: nowrap;
border: 1px solid;
border-radius: 2px;

@ -6,7 +6,7 @@
<div class="content" v-loading="loading">
<div class="text-right">
<el-button type="primary" @click="exportPage">导出报告</el-button>
<el-button type="primary" :loading="exporting" @click="exportPage">导出报告</el-button>
</div>
<h6 class="r-title">标准实验报告</h6>
<div class="info">
@ -74,7 +74,7 @@
<img src="@/assets/img/report4.png" alt="">
实验数据
</h6>
<el-table :data="expData" class="table" border stripe header-align="center">
<el-table :data="expData" class="table" border header-align="center">
<el-table-column type="index" label="序号" align="center" width="60">
<template slot-scope="scope">
{{ scope.$index + 1 }}
@ -114,7 +114,7 @@
</span>
</div>
</div>
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div>
<div v-else class="pre-code">{{ scope.row.answer }}</div>
<template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic"
:src="img" alt="">
@ -139,11 +139,16 @@
</template>
<script>
import util from "@/libs/util";
import Setting from '@/setting'
import Util from '@/libs/util'
import Axios from 'axios'
export default {
data () {
return {
reportId: this.$route.query.reportId,
headers: {
token: sessionStorage.getItem('token')
},
title: "实验报告",
form: {
className: "",
@ -155,7 +160,7 @@ export default {
infoData: {},
expData: [],
editing: false,
loadIns: null,
exporting: false,
loading: false,
project: false,
userScores: []
@ -169,7 +174,6 @@ export default {
this.loading = true
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => {
this.form = report
this.expData = userScores
this.project = this.expData.find(e => e.lcRuleRecords) // lcRuleRecords
let form = this.form;
this.infoData = {
@ -183,17 +187,17 @@ export default {
className: form.className,
userName: form.userName
}
const data = report.data
this.userScores = userScores
const { data } = report
// data使
if (!data) {
this.userScores = userScores
this.handleList(userScores)
this.$post(this.api.editExperimentalData, {
reportId,
data: JSON.stringify(userScores)
}).then(res => { }).catch(err => { })
} else {
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data))
this.handleList(JSON.parse(data))
}
}).catch(res => {
this.loading = false
@ -207,7 +211,7 @@ export default {
e.assessmentPoint = ''
e.referenceAnswer = ''
e.answer = ''
e.lcRuleRecords.map((n, i) => {
e.lcRuleRecords && e.lcRuleRecords.map((n, i) => {
e.assessmentPoint += `${i + 1}.${n.name}`
e.referenceAnswer += `${i + 1}.${n.ruleAnswer}`
e.answer += `${i + 1}.${n.userAnswer}`
@ -222,7 +226,8 @@ export default {
this.expData = list
this.loading = false
},
exportPage () {
async exportPage () {
this.exporting = true
const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => {
@ -237,13 +242,20 @@ export default {
if (form[i] && typeof form[i] === 'string') form[i] = form[i].replace(/<[^>]+>/g, '')
}
form.purpose = form.purpose.replace(/<[^>]+>/g, '')
this.$post(this.project ? this.api.exportBankExperimentReport : this.api.exportLabReport, {
try {
const res = await Axios.post(this.api[this.project ? 'exportBankExperimentReport' : 'exportLabReport'], {
...form,
experimentalData: list
}).then(res => {
console.log(res)
util.downloadFileDirect(`实验报告.docx`, new Blob([res]))
}).catch(res => { })
}, {
headers: this.headers,
responseType: 'blob'
})
const name = res.headers['content-disposition']
Util.downloadFileDirect(name ? decodeURI(name) : `实验报告.docx`, new Blob([res.data]))
} finally {
this.exporting = false
}
},
}
};
@ -254,6 +266,10 @@ export default {
padding: 12px 300px 20px;
}
.pre-code {
white-space: pre-wrap;
}
.text-right {
text-align: right;
}

@ -123,7 +123,7 @@
</div>
</div>
<el-table :data="coursePermissions" class="orderTable" stripe header-align="center">
<el-table :data="coursePermissions" class="orderTable" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center">
</el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip>
@ -272,7 +272,7 @@
</div>
</div>
<el-table :data="theoryCourseList" class="orderTable" stripe header-align="center">
<el-table :data="theoryCourseList" class="orderTable" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center">
</el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip>
@ -400,6 +400,155 @@
</div>
</el-card>
<!-- 理实课程 -->
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-between mgb20 user_header">
<div class="flex-center">
<p class="addhr_tag"></p>
<span>理实课程产品权限</span>
</div>
<div>
<!-- 处理中 || 有未生效的课程 || 新增订单 && 有课程 -->
<template v-if="!viewDisabled && (dispose || (isAdd && theoryTrialList.length))">
<el-button v-if="theoryTrialList.find(e => !e.ship)" v-auth="'/order:发货'" type="primary" round
@click="batchDeliver(1, 6)">一键发货</el-button>
<el-button v-else v-auth="'/order:发货'" type="primary" round
@click="batchDeliver(0, 6)">取消全部发货</el-button>
</template>
<el-button v-if="!viewDisabled && !isEdit && !renewDisabled" type="primary" round
@click="addCourseJurisdiction(7)">添加</el-button>
</div>
</div>
<el-table :data="theoryTrialList" class="orderTable" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center">
</el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip>
</el-table-column>
<el-table-column label="使用期限" align="center" min-width="190">
<template slot="header" slot-scope="scope">
<template v-if="viewDisabled || isEdit">使用期限</template>
<template v-else>
<el-input class="batch-time" :disabled="viewDisabled || isEdit" maxlength="4"
@change="batchDeadlineChange(6)"
@input="productProps[6].deadline = productProps[6].deadline.replace(/[^0-9.]/g, '')"
v-model="productProps[6].deadline" placeholder="批量输入时间" />
<el-select class="batch-unit" v-model="productProps[6].unit" :disabled="viewDisabled || isEdit"
placeholder="请选择" @change="batchUnitChange(6)">
<el-option v-for="(item, i) in units" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</template>
</template>
<template slot-scope="scope">
<div class="small">
<el-input class="time-input" :class="!scope.row.periodOfUse && whetherSubmit ? 'red' : ''"
:disabled="viewDisabled || isEdit" maxlength="4"
@change="deadLine(scope.row.periodOfUse, scope.row, scope.row.options, 1)"
@input="scope.row.periodOfUse = scope.row.periodOfUse.replace(/[^0-9.]/g, '')"
v-model="scope.row.periodOfUse" placeholder="输入时间"></el-input>
<el-select class="time-select" v-model="scope.row.options" :disabled="viewDisabled || isEdit"
placeholder="请选择" @change="deadLine(scope.row.periodOfUse, scope.row, scope.row.options, 1)">
<el-option v-for="(item, i) in units" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column label="起止日期" align="center" min-width="240">
<template slot-scope="scope">
<p v-if="!scope.row.startTime">
<el-date-picker :class="orderRepeat.includes(scope.row.mallId) ? 'red' : ''" style="width:130px"
v-model="scope.row.startTime" type="date" :disabled="viewDisabled || isEdit"
@change="deadLine(scope.row.periodOfUse, scope.row, scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
</p>
<p v-else>
<el-date-picker :class="orderRepeat.includes(scope.row.mallId) ? 'red' : ''" style="width:130px"
v-model="scope.row.startTime" type="date" :disabled="viewDisabled || isEdit"
@change="deadLine(scope.row.periodOfUse, scope.row, scope.row.options, 1)"
placeholder="请选择使用日期">
</el-date-picker>
<span v-if="scope.row.startTime"><span v-if="scope.row.endTime"> - </span>{{ scope.row.endTime
}}</span>
</p>
</template>
</el-table-column>
<el-table-column label="剩余期限" align="center" min-width="110">
<template slot-scope="scope">
<div class="small">
<el-input disabled v-model="scope.row.remainingPeriod" placeholder="" type="text"></el-input>
<span style="margin-left:5px"></span>
</div>
</template>
</el-table-column>
<el-table-column label="市场价" align="center" min-width="170">
<template slot-scope="scope">
<div class="small">
<el-input class="normal" disabled v-model="scope.row.marketValue" type="text"></el-input>
</div>
</template>
</el-table-column>
<el-table-column label="折扣率 " align="center" min-width="110">
<template slot-scope="scope">
<el-input class="normal" disabled v-model="scope.row.discountRate" placeholder="" type="text"
size="small" style="width: 100%"></el-input>
</template>
</el-table-column>
<el-table-column label="成交价" align="center" min-width="170">
<template slot-scope="scope">
<div class="small">
<el-input :class="['normal', scope.row.finalPrice === '' && whetherSubmit ? 'red' : '']"
:disabled="viewDisabled"
@input="scope.row.finalPrice = scope.row.finalPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
@change="[allAmount(scope.row), calculateDiscountCourse(scope.row)]"
v-model="scope.row.finalPrice" type="text"></el-input>
</div>
</template>
</el-table-column>
<el-table-column label="结算价" align="center" min-width="170">
<template slot-scope="scope">
<div class="small">
<el-input :class="['normal', scope.row.settlementPrice === '' && whetherSubmit ? 'red' : '']"
:disabled="viewDisabled"
@input="scope.row.settlementPrice = scope.row.settlementPrice.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
v-model="scope.row.settlementPrice" type="text"></el-input>
</div>
</template>
</el-table-column>
<el-table-column label="端口地址 " align="center" min-width="100">
<template slot-scope="scope">
<el-button @click="configure(scope.row)">配置</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<div class="flex-c-c">
<el-button v-if="!isEdit && !viewDisabled" type="text"
@click="delTheoryTrialForm(scope.$index, scope.row)" style="margin-right:10px;">删除</el-button>
<!-- 1: 未生效2生效中3已过期 -->
<!--
1查看时不可操作
2发货和启用不要同时出现生效前只会显示发货不发货按钮生效后只显示禁启用按钮
3处理中的订单显示发货不显示禁用
-->
<el-switch v-if="scope.row.ship === 0 || dispose || isAdd" v-auth="'/order:发货'"
style="margin-right:10px;" v-model="scope.row.ship" :active-value="1" :inactive-value="0"
:active-text="scope.row.ship ? '已发货' : '未发货'" :disabled="viewDisabled"
@change="handleDeliver($event, scope.row, 6)">
</el-switch>
<el-switch v-else :disabled="viewDisabled" v-model="scope.row.isEnable" :active-value="1"
:inactive-value="0" :active-text="scope.row.isEnable ? '启用' : '禁用'"
@change="handleEnable($event, scope.row, 6)">
</el-switch>
</div>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<!-- 数据平台权限 -->
<el-card shadow="hover" class="mgb20">
<div>
@ -422,7 +571,7 @@
</div>
<!--:summary-method="getSummaries"-->
<el-table :data="dataPlatformPermissions" class="orderTable orderTables" stripe header-align="center">
<el-table :data="dataPlatformPermissions" class="orderTable orderTables" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center">
</el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="100">
@ -593,7 +742,7 @@
</div>
<!--:summary-method="getSummaries"-->
<el-table :data="valuePermissions" class="orderTable orderTables" stripe header-align="center">
<el-table :data="valuePermissions" class="orderTable orderTables" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center">
</el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="100">
@ -732,7 +881,7 @@
</div>
</div>
<el-table :data="practicalCourses" class="orderTable orderTables" stripe header-align="center">
<el-table :data="practicalCourses" class="orderTable orderTables" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center">
</el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip>
@ -879,7 +1028,7 @@
</div>
<!--:summary-method="getSummaries"-->
<el-table :data="expTools" class="orderTable orderTables" stripe header-align="center">
<el-table :data="expTools" class="orderTable orderTables" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center">
</el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip>
@ -1067,7 +1216,7 @@
clearable></el-input>
</div>
</div>
<el-table v-loading="dataLoading" :data="practicalCourseList" stripe header-align="center"
<el-table v-loading="dataLoading" :data="practicalCourseList" header-align="center"
@selection-change="practicalCoursesSelection" row-key="mallId">
<el-table-column type="selection" :selectable="practicalCoursesSelectable" width="55"
align="center"></el-table-column>
@ -1096,7 +1245,7 @@
<p class="hr_tag"></p>
<span>地址列表</span>
</div>
<el-table :data="IPData" stripe header-align="center">
<el-table :data="IPData" header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
<el-table-column prop="age" label="服务器名称" align="center">
@ -1211,6 +1360,12 @@ export default {
deadline: '',
unit: '',
},
{
id: 7,
name: 'theoryTrialList',
deadline: '',
unit: '',
},
],
pageTypes: false,
dataPageTypes: false,
@ -1395,10 +1550,11 @@ export default {
shipContent: '',
shipInfo: '',
curRow: {},
// 1 2 3 45 6
// 1 2 3 45 6 7
classificationId: 0,
//
theoryCourseList: [],
theoryTrialList: [],
units: [
{
id: 0,
@ -1642,8 +1798,8 @@ export default {
this.deadLine(e.periodOfUse, e, e.options, 1)
}
} else if (!this.viewDisabled) { //
e.startTime = cur.startTime.split(" ")[0];
if (cur.endTime) e.endTime = cur.endTime.split(" ")[0];
// e.startTime = cur.startTime.split(" ")[0];
// if (cur.endTime) e.endTime = cur.endTime.split(" ")[0];
}
// }
if (item && this.renewDisabled) {
@ -1662,6 +1818,7 @@ export default {
});//
this.coursePermissions = list.filter(i => i.authority === 1 && (i.mallClassificationId == 1 || !i.mallClassificationId));
this.theoryCourseList = list.filter(i => i.authority === 1 && i.mallClassificationId == 2);
this.theoryTrialList = list.filter(i => i.authority === 1 && i.mallClassificationId == 7);
this.dataPlatformPermissions = list.filter(i => i.authority === 0);
this.valuePermissions = list.filter(i => i.authority === 2);
this.practicalCourses = list.filter(i => i.authority === 3);
@ -1723,7 +1880,7 @@ export default {
submitOrder () {
let purchase = 0 //
let profit = 0 //
if (!this.coursePermissions.length && !this.theoryCourseList.length && !this.dataPlatformPermissions.length && !this.valuePermissions.length && !this.practicalCourses.length && !this.expTools.length) {
if (!this.coursePermissions.length && !this.theoryCourseList.length && !this.theoryTrialList.length && !this.dataPlatformPermissions.length && !this.valuePermissions.length && !this.practicalCourses.length && !this.expTools.length) {
return this.$message.error("请选择产品权限后再确认订单");
} else {
//
@ -1769,6 +1926,27 @@ export default {
return this.$message.error("请把课程参数输入完整");
}
}
if (this.theoryTrialList.length) {
let courseVerify =
this.theoryTrialList.some(e => {
// if (!e.periodOfUse || e.finalPrice === '') {
if (!e.periodOfUse || e.finalPrice === '' || !e.startTime) {
return false;
} else {
const curPurchase = +e.settlementPrice + (e.settlementPrice * (this.rate / 100))
purchase += curPurchase
profit += +e.finalPrice - curPurchase
return true;
}
});
if (!courseVerify) {
this.whetherSubmit = true;
setTimeout(() => {
this.whetherSubmit = false;
}, 4000);
return this.$message.error("请把课程参数输入完整");
}
}
//
if (this.dataPlatformPermissions.length) {
let dataVerify =
@ -1854,8 +2032,7 @@ export default {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.orderRepeat.length) return this.$message.error(this.repeatMsg)
let tempArr = [...this.dataPlatformPermissions, ...this.coursePermissions, ...this.valuePermissions, ...this.practicalCourses, ...this.expTools, ...this.theoryCourseList];
console.log('tempArr=>', tempArr)
let tempArr = [...this.dataPlatformPermissions, ...this.coursePermissions, ...this.valuePermissions, ...this.practicalCourses, ...this.expTools, ...this.theoryCourseList, ...this.theoryTrialList];
let renew = tempArr.some(e => e.renew);
if (this.renewDisabled || renew) {/* 续费状态下 */
this.form.orderNature = 2;
@ -1878,7 +2055,6 @@ export default {
orderOther: tempArr//
};
this.loading = true;
console.log(param)
if (this.editDisabled) {
this.$post(this.api.orderUpdate, param).then(res => {
this.refreshCache()
@ -1936,6 +2112,12 @@ export default {
this.getSettlemennt()
});
this.$forceUpdate();
//
this.productProps.map(e => {
this[e.name].map(n => {
this.deadLine(n.periodOfUse, n, n.options, 1)
})
})
}
},
//
@ -1984,6 +2166,19 @@ export default {
// }
});
},
//
delTheoryTrialForm (index, row) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
// if (this.renewDisabled && this.theoryCourseList.length === 1) {
// return this.$message.warning("");
// } else {
this.handleOrderRepeat(row.mallId)
this.theoryTrialList.splice(index, 1);
// }
});
},
//
delDataForm (index, row) {
@ -2076,6 +2271,9 @@ export default {
case 6:
authority = 4
break;
case 7:
authority = 1
break;
default:
break;
}
@ -2106,26 +2304,28 @@ export default {
mallNonAssociatedLinks: e.mallNonAssociatedLinks //
}
that[name].push(row)
};
}
const productId = []
this.practicalCoursesSelect.map(e => {//
const promises = []
this.practicalCoursesSelect.map(async (e) => {//
productId.push(e.mallId)
let find = this[name].some(i => e.mallId === i.mallId);// id
if (!find) {
promises.push(new Promise(async (resolve, reject) => {
//
this.$post(`${this.api.queryCitySettlementPrice}?mallId=${e.mallId}&provinceId=${this.form.provinceId}&cityId=${this.form.cityId}`).then(res => {
const res = await this.$post(`${this.api.queryCitySettlementPrice}?mallId=${e.mallId}&provinceId=${this.form.provinceId}&cityId=${this.form.cityId}`)
const mall = res.mallPrice
if (mall) {
e.settlementPrice = mall.discountRate
}
if (mall) e.settlementPrice = mall.discountRate
createProduct(e)
}).catch((res) => { })
resolve()
}))
}
});
})
this.practicalCourseVisible = false
this.practicalCourseName = ''
this.practicalCoursesSelect = []
Promise.all(promises).then(async () => {
/* 调接口,判断是否为客户已有的产品功能 */
if (productId.length) {
const res = await this.$post(this.api.renew, {
@ -2149,6 +2349,8 @@ export default {
}
})
}
}).catch(err => { })
} else {
return this.$message.warning("请选择数据");
}
@ -2205,8 +2407,9 @@ export default {
this.expTools :
data === 5 ?
this.theoryCourseList :
data === 6 ?
this.theoryTrialList :
this.coursePermissions
list.map(e => {
e.ship = ship
if (e.ship === 1) {
@ -2302,7 +2505,6 @@ export default {
priceUnit * useUnit) * (row.authority ?
1 :
row.accountNum)).toFixed(2)
console.log("🚀 ~ file: AddOrder.vue:2287 ~ dealSettlePrice ~ sPrice:", row, sPrice)
row.settlementPrice = this.handleNaN(sPrice)
}
@ -2554,6 +2756,7 @@ export default {
addCourseJurisdiction (type) {
if (!this.form.customerId) return this.$message.warning("请先选择客户");
this.classificationId = type
this.practicalCourseName = ''
this.practicalCourseVisible = true;
this.initCourses();
},
@ -2561,7 +2764,6 @@ export default {
},
filters: {
dialogTitle (options) {
console.log(options)
switch (options) {
case 1:
return '实训课程产品列表'
@ -2575,6 +2777,8 @@ export default {
return '数据前瞻平台权限列表'
case 6:
return '实验工具列表'
case 7:
return '理实课程列表'
default:
break;
}
@ -2695,7 +2899,7 @@ export default {
.radio_icon {
font-size: 26px;
color: #9278ff;
color: #062c87;
}
.ellipsis {

@ -64,7 +64,7 @@
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
</div>
</div>
<el-table :data="orderData" class="table" ref="table" stripe header-align="center"
<el-table v-loading="loading" :data="orderData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="orderId">
<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">
@ -145,6 +145,7 @@ export default {
name: "已取消",
value: 2
}],
loading: false,
page: +this.$route.query.page || 1,
pageSize: 10,
totals: 0,
@ -176,15 +177,16 @@ export default {
val = 5;
}
},
getData () {
async getData () {
try {
this.loading = true
const sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理')
let data = {
const res = await this.$post(this.api.orderList, {
...this.form,
pageNo: this.page,
pageSize: this.pageSize,
supplierId: sid ? sid.supplierId : ''
};
this.$post(this.api.orderList, data).then(res => {
})
res.orderPage.orders.forEach(e => {
e.orderType = this.orderTypeFn(e.orderType);
e.orderStatus = this.orderStatusFn(e.orderStatus);
@ -192,7 +194,9 @@ export default {
});
this.orderData = res.orderPage.orders;
this.totals = res.orderPage.total;
}).catch(res => { });
} finally {
this.loading = false
}
},
//
clearprovince () {

@ -27,17 +27,17 @@
<el-col :span="6">
<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-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="6">
<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 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>
@ -45,16 +45,15 @@
<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-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="请输入客户名称/联系人姓名/账号" @clear="clearSearch"
@input="getData" prefix-icon="el-icon-search"
v-model="form.keyword" clearable></el-input>
<el-input placeholder="请输入客户名称/联系人姓名/账号" @clear="clearSearch" @input="getData"
prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input>
</el-form-item>
</el-col>
</el-form>
@ -73,7 +72,7 @@
<div>
</div>
</div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="customerId">
<el-table :data="listData" class="table" header-align="center" 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">
@ -99,8 +98,7 @@
</el-table-column>
<el-table-column label="操作" width="270" align="center">
<template slot-scope="scope">
<el-checkbox @change="checkboxChenge(scope.row)"
v-model="scope.row.checked"></el-checkbox>
<el-radio class="client-check" v-model="scope.row.checked" :label="true" @change="checkboxChenge(scope.row)"> </el-radio>
</template>
</el-table-column>
</el-table>
@ -244,11 +242,11 @@ export default {
// checkbox
checkboxChenge (row) {
this.listData.map(e => {
e.checked = false;
e.checked = false
});
row.checked = true;
this.checkedName = row.customerName;
this.checkedID = row.customerId;
row.checked = true
this.checkedName = row.customerName
this.checkedID = row.customerId
},
clearSearch () {
@ -264,44 +262,9 @@ export default {
margin-right: 20px;
}
/deep/ .el-checkbox__inner {
border-radius: 50%;
width: 19px;
height: 19px;
/deep/ .client-check {
.el-radio__label {
display: none;
}
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background: #FFF;
}
/deep/ .el-checkbox__inner::after {
transform: none;
transition: all .3s ease-in;
width: 0;
height: 0;
position: relative;
top: 50%;
left: 50%;
transform: translate(-46%, -48%);
border-radius: 50%;
}
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner::after {
width: 13px;
height: 13px;
background: #9278FF;
position: relative;
top: 50%;
left: 50%;
transform: translate(-46%, -48%);
display: block;
border-radius: 50%;
transition: all .3s ease-in;
border: 0;
}
/deep/ .el-checkbox__input {
line-height: 0;
}
</style>

@ -13,10 +13,13 @@
</div>
</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable" :reserve-selection="true"></el-table-column>
<el-table :data="listData" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
:row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable"
:reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250" show-overflow-tooltip></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250"
show-overflow-tooltip></el-table-column>
<el-table-column label="角色描述" min-width="400" align="center">
<template slot-scope="scope">
<el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
@ -25,16 +28,20 @@
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/parner:小程序角色权限:查看'">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)" v-auth="'/parner:小程序角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/parner:小程序角色权限:删除'">删除</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)"
v-auth="'/parner:小程序角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text"
@click="handleDelete(scope.row)" v-auth="'/parner:小程序角色权限:删除'">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%" @close="closeRole" class="dialog" :close-on-click-modal="false">
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%"
@close="closeRole" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="80px" :disabled="isDetail">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input>
@ -44,15 +51,8 @@
</el-form-item>
<el-form-item prop="role" label="角色权限">
<div style="max-height: 300px; overflow: auto">
<el-tree
ref="per"
:data="permissions"
show-checkbox
default-expand-all
node-key="id"
:default-expanded-keys="checkedIds"
:default-checked-keys="checkedIds"
:props="defaultProps">
<el-tree ref="per" :data="permissions" show-checkbox default-expand-all node-key="id"
:default-expanded-keys="checkedIds" :default-checked-keys="checkedIds" :props="defaultProps">
</el-tree>
</div>
</el-form-item>
@ -268,6 +268,4 @@ export default {
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -13,10 +13,13 @@
</div>
</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable" :reserve-selection="true"></el-table-column>
<el-table :data="listData" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
:row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable"
:reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250" show-overflow-tooltip></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250"
show-overflow-tooltip></el-table-column>
<el-table-column label="角色描述" min-width="400" align="center">
<template slot-scope="scope">
<el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
@ -25,16 +28,20 @@
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/parner:pc角色权限:查看'">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)" v-auth="'/parner:pc角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/parner:pc角色权限:删除'">删除</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)"
v-auth="'/parner:pc角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text"
@click="handleDelete(scope.row)" v-auth="'/parner:pc角色权限:删除'">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%" @close="closeRole" class="dialog" :close-on-click-modal="false">
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%"
@close="closeRole" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="80px" :disabled="isDetail">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input>
@ -44,15 +51,8 @@
</el-form-item>
<el-form-item prop="role" label="角色权限">
<div style="max-height: 300px; overflow: auto">
<el-tree
ref="per"
:data="permissions"
show-checkbox
default-expand-all
node-key="id"
:default-expanded-keys="checkedIds"
:default-checked-keys="checkedIds"
:props="defaultProps">
<el-tree ref="per" :data="permissions" show-checkbox default-expand-all node-key="id"
:default-expanded-keys="checkedIds" :default-checked-keys="checkedIds" :props="defaultProps">
</el-tree>
</div>
</el-form-item>
@ -267,6 +267,4 @@ export default {
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -4,58 +4,36 @@
<div class="side">
<div>
<div class="flex-between">
<h6 class="p-title"
style="margin-bottom: 0">城市合伙人区域管理</h6>
<h6 class="p-title" style="margin-bottom: 0">城市合伙人区域管理</h6>
</div>
<div style="height: 504px; max-height: 504px; overflow: auto">
<el-tree :data="orgList"
default-expand-all
ref="orgTree"
node-key="id"
highlight-current
:expand-on-click-node="false"
@node-click="handleNodeClick"
<el-tree :data="orgList" default-expand-all ref="orgTree" node-key="id" highlight-current
:expand-on-click-node="false" @node-click="handleNodeClick"
:props="{ children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf' }">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="org-name">{{ node.label }}</span>
</span>
</el-tree>
</div>
</div>
<el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'"
:visible.sync="orgVisible"
:close-on-click-modal="false"
width="50%"
@close="closeType">
<el-form v-if="orgVisible"
ref="typeForm"
:model="typeForm"
:rules="orgRules"
label-width="100px">
<el-form-item label="分类名称"
prop="partnerClassificationName">
<el-input v-model.trim="typeForm.partnerClassificationName"
placeholder="请输入"></el-input>
<el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'" :visible.sync="orgVisible" :close-on-click-modal="false"
width="50%" @close="closeType">
<el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px">
<el-form-item label="分类名称" prop="partnerClassificationName">
<el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="上级部门">
<span v-if="typeForm.parentName">{{ typeForm.parentName }}</span>
<el-cascader v-else
:options="orgListDia"
v-model="cascaderValue"
:props="cascaderProps"
clearable
<el-cascader v-else :options="orgListDia" v-model="cascaderValue" :props="cascaderProps" clearable
style="width: 100%">
</el-cascader>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="closeOrg"> </el-button>
<el-button type="primary"
@click="orgSubmit"> </el-button>
<el-button type="primary" @click="orgSubmit"> </el-button>
</span>
</el-dialog>
</div>
@ -70,117 +48,61 @@
</ul>
</div> -->
<el-table :data="listData"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="teamName"
label="团队名称"
align="center"
min-width="120"
<el-table :data="listData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="teamName" label="团队名称" align="center" min-width="120"
show-overflow-tooltip></el-table-column>
<el-table-column prop="userName"
label="团队负责人"
align="center"
min-width="100"></el-table-column>
<el-table-column prop="phone"
label="手机号"
align="center"
min-width="120"></el-table-column>
<el-table-column prop="account"
label="账号"
align="center"
min-width="100"></el-table-column>
<el-table-column prop="invitationAccount"
label="邀请人"
align="center"
min-width="120"></el-table-column>
<el-table-column prop="phone"
label="团队年费"
align="center"
min-width="120">
<el-table-column prop="userName" label="团队负责人" align="center" min-width="100"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column>
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column>
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column>
<el-table-column prop="phone" label="团队年费" align="center" min-width="120">
<template slot-scope="scope">
固定年费{{ scope.row.annualTeamFee !== underfined ? scope.row.annualTeamFee + '元' : '' }}
<el-button v-auth="'/parner:费率管理:修改固定年费'"
type="primary"
size="mini"
<el-button v-auth="'/parner:费率管理:修改固定年费'" type="primary" size="mini"
@click="editAnnualTeamFee(scope.row)">修改</el-button>
</template>
</el-table-column>
<el-table-column prop="phone"
label="市场服务年费"
align="center"
min-width="120">
<el-table-column prop="phone" label="市场服务年费" align="center" min-width="120">
<template slot-scope="scope">
项目抽成{{ scope.row.annualMarketingFee !== underfined ? scope.row.annualMarketingFee + '%' : '' }}
<el-button v-auth="'/parner:费率管理:修改项目抽成'"
type="primary"
size="mini"
<el-button v-auth="'/parner:费率管理:修改项目抽成'" type="primary" size="mini"
@click="editAnnualMarketingFee(scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
<el-dialog title="请设置团队年费"
:visible.sync="annualTeamFeeVisible"
width="300px"
class="dialog"
<el-dialog title="请设置团队年费" :visible.sync="annualTeamFeeVisible" width="300px" class="dialog"
:close-on-click-modal="false">
<el-form ref="form"
label-width="75px"
style='margin-right: 0;'>
<el-form ref="form" label-width="75px" style='margin-right: 0;'>
<el-form-item label="固定年费">
<el-input style="width: 150px;"
type="number"
v-model.number="annualTeamFee"
placeholder="请输入数字"></el-input>
<el-input style="width: 150px;" type="number" v-model.number="annualTeamFee" placeholder="请输入数字"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="annualTeamFeeVisible = false">取消</el-button>
<el-button type="primary"
@click="submitAnnualTeamFee">确定</el-button>
<el-button type="primary" @click="submitAnnualTeamFee">确定</el-button>
</span>
</el-dialog>
<el-dialog title="请设置市场服务年费"
:visible.sync="annualMarketingFeeVisible"
width="300px"
class="dialog"
<el-dialog title="请设置市场服务年费" :visible.sync="annualMarketingFeeVisible" width="300px" class="dialog"
:close-on-click-modal="false">
<el-form ref="form"
label-width="75px"
style='margin-right: 0;'>
<el-form ref="form" label-width="75px" style='margin-right: 0;'>
<el-form-item label="项目抽成">
<el-input style="width: 150px;"
type="number"
v-model.number="annualMarketingFee"
placeholder="请输入数字"></el-input> %
<el-input style="width: 150px;" type="number" v-model.number="annualMarketingFee"
placeholder="请输入数字"></el-input>
%
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="annualMarketingFeeVisible = false">取消</el-button>
<el-button type="primary"
@click="submitAnnualMarketingFee">确定</el-button>
<el-button type="primary" @click="submitAnnualMarketingFee">确定</el-button>
</span>
</el-dialog>
</div>
@ -498,47 +420,58 @@ export default {
.m-b-20 {
margin-bottom: 20px;
}
.org-name {
margin-right: 20px;
}
.w-100 {
width: 100%;
}
.wrap {
display: flex;
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% - 324px);
padding: 24px 0;
}
}
.add-dia {
.tips {
font-size: 12px;
color: #f00;
}
.title {
margin: 10px 0;
font-size: 14px;
em {
font-style: normal;
}
}
.des {
font-size: 13px;
color: #7a7a7a;
}
.link-wrap {
display: flex;
align-items: center;
margin: 10px 0 20px;
}
.link {
padding: 10px;
margin-right: 15px;
@ -546,6 +479,7 @@ export default {
border-radius: 4px;
}
}
/deep/.choose-dia {
.member-list {
li {
@ -554,17 +488,21 @@ export default {
align-items: center;
margin-bottom: 10px;
}
.info {
display: inline-flex;
align-items: center;
}
img {
width: 40px;
height: 40px;
}
.name {
margin-left: 10px;
}
.el-radio__label {
display: none;
}

@ -21,37 +21,20 @@
</div>
<div style="height: 504px; max-height: 504px; overflow: auto">
<el-tree
:data="orgList"
default-expand-all
ref="orgTree"
node-key="id"
highlight-current
:expand-on-click-node="false"
@node-click="handleNodeClick"
:props="{children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf'}"
>
<el-tree :data="orgList" default-expand-all ref="orgTree" node-key="id" highlight-current
:expand-on-click-node="false" @node-click="handleNodeClick"
:props="{ children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf' }">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="org-name">{{ node.label }}</span>
<span>
<!-- isTeam 0: 分类1: 团队 -->
<el-button
v-auth="'/parner:账号管理:添加分类'"
v-if="!data.isTeam"
type="text"
icon="el-icon-circle-plus-outline"
@click="() => addOrg(node, data)">
<el-button v-auth="'/parner:账号管理:添加分类'" v-if="!data.isTeam" type="text"
icon="el-icon-circle-plus-outline" @click="() => addOrg(node, data)">
</el-button>
<el-button
v-auth="'/parner:账号管理:编辑分类'"
type="text"
icon="el-icon-edit-outline"
<el-button v-auth="'/parner:账号管理:编辑分类'" type="text" icon="el-icon-edit-outline"
@click="() => editOrg(node, data)">
</el-button>
<el-button
v-auth="'/parner:账号管理:删除分类'"
type="text"
icon="el-icon-delete"
<el-button v-auth="'/parner:账号管理:删除分类'" type="text" icon="el-icon-delete"
@click="() => delOrg(node, data)">
</el-button>
</span>
@ -60,27 +43,16 @@
</div>
</div>
<el-dialog
:title="typeForm.id ? '编辑' : '新增' + '分类'"
:visible.sync="orgVisible"
:close-on-click-modal="false"
width="50%"
@close="closeType"
>
<el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'" :visible.sync="orgVisible" :close-on-click-modal="false"
width="50%" @close="closeType">
<el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px">
<el-form-item label="分类名称" prop="partnerClassificationName">
<el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="上级部门">
<span v-if="typeForm.parentName">{{ typeForm.parentName }}</span>
<el-cascader
v-else
:options="orgListDia"
v-model="cascaderValue"
:props="cascaderProps"
clearable
style="width: 100%"
>
<el-cascader v-else :options="orgListDia" v-model="cascaderValue" :props="cascaderProps" clearable
style="width: 100%">
</el-cascader>
</el-form-item>
</el-form>
@ -96,7 +68,8 @@
<div class="tool">
<ul class="filter">
<li>
<el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord" clearable></el-input>
<el-input style="width: 250px;" placeholder="请输入员工姓名/手机号" prefix-icon="el-icon-search" v-model="keyWord"
clearable></el-input>
</li>
</ul>
<div>
@ -104,18 +77,21 @@
</div>
</div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table :data="listData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center" min-width="100"></el-table-column>
<el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column>
<el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column>
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="120"
show-overflow-tooltip></el-table-column>
<template v-if="!type">
<el-table-column prop="provinceName" label="省份" align="center" min-width="80"></el-table-column>
<el-table-column prop="cityName" label="城市" align="center" min-width="80"></el-table-column>
<el-table-column prop="roleName" label="授权角色" align="center" min-width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="roleName" label="授权角色" align="center" min-width="120"
show-overflow-tooltip></el-table-column>
<el-table-column prop="phone" label="费率" align="center" min-width="120">
<template slot-scope="scope">
<p v-if="scope.row.annualTeamFee">团队年费{{ scope.row.annualTeamFee }}w</p>
@ -124,22 +100,26 @@
</el-table-column>
</template>
<el-table-column prop="loginNumber" label="登录次数" align="center" width="120"></el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="120"></el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="150"></el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" v-auth="'/parner:账号管理:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-if="type" type="text" v-auth="'/parner:账号管理:删除合伙人'" @click="del(scope.row)">删除</el-button>
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'" @click="transfer(scope.row)">转让超管</el-button>
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'" @click="remove(scope.row)">移除</el-button>
<el-button v-else-if="scope.row.isTeam == 1" type="text" v-auth="'/parner:账号管理:转让超管'"
@click="transfer(scope.row)">转让超管</el-button>
<el-button v-if="scope.row.isTeam == 0" type="text" v-auth="'/parner:账号管理:移除'"
@click="remove(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
<el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia" :close-on-click-modal="false" @close="closeAdd">
<el-dialog title="添加城市合伙人" :visible.sync="parnerVisible" width="580px" custom-class="add-dia"
:close-on-click-modal="false" @close="closeAdd">
<p class="tips">链接/二维码失效时间{{ expireTime }}</p>
<p class="title">城市合伙人 <em>邀请链接</em></p>
<p class="des">加盟商合作伙伴可以通过这个链接加入 <em>城市合伙人计划</em></p>
@ -152,21 +132,24 @@
<img width="250" :src="qrcode" alt="">
</el-dialog>
<el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia" :close-on-click-modal="false">
<el-dialog title="转让管理员" :visible.sync="transferVisible" width="350px" custom-class="transfer-dia"
:close-on-click-modal="false">
<div style="text-align: center">
<el-button type="primary" @click="showChoose">转给团队成员</el-button>
<el-button @click="add(1)">邀请外部人员</el-button>
</div>
</el-dialog>
<el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia" :close-on-click-modal="false">
<el-dialog title="请选择要转让的团队成员" :visible.sync="chooseVisible" width="300px" custom-class="choose-dia"
:close-on-click-modal="false">
<ul class="member-list">
<li v-for="(item, i) in members" :key="i">
<div class="info">
<img src="@/assets/img/avatar.png" alt="">
<span class="name">{{ item.userName }}</span>
</div>
<el-radio v-model="choosePartnerId" :label="item.partnerId" :disabled="curRow.accountId === item.accountId"></el-radio>
<el-radio v-model="choosePartnerId" :label="item.partnerId"
:disabled="curRow.accountId === item.accountId"></el-radio>
</li>
</ul>
<span slot="footer" class="dialog-footer">
@ -184,22 +167,22 @@
<el-select class="w-100" v-model="form.roleList" multiple>
<template v-for="item in roleList">
<!-- 不显示超管 -->
<el-option
:key="item.id"
:label="item.roleName"
:value="item.id">
<el-option :key="item.id" :label="item.roleName" :value="item.id">
</el-option>
</template>
</el-select>
</el-form-item>
<el-form-item prop="provinceId" label="省份">
<el-select style="width: 100%" v-model="form.provinceId" placeholder="请选择省份" @change="getCity">
<el-option v-for="(item,index) in provinces" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
<el-option v-for="(item, index) in provinces" :key="index" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="cityId" label="城市">
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市" :disabled="form.provinceId ? false : true">
<el-option v-for="(item,index) in cities" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
<el-select style="width: 100%" v-model="form.cityId" placeholder="请选择城市"
:disabled="form.provinceId ? false : true">
<el-option v-for="(item, index) in cities" :key="index" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</el-form-item>
</el-form>
@ -665,47 +648,58 @@ export default {
.m-b-20 {
margin-bottom: 20px;
}
.org-name {
margin-right: 20px;
}
.w-100 {
width: 100%;
}
.wrap {
display: flex;
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% - 324px);
padding: 24px 0;
}
}
.add-dia {
.tips {
font-size: 12px;
color: #f00;
}
.title {
margin: 10px 0;
font-size: 14px;
em {
font-style: normal;
}
}
.des {
font-size: 13px;
color: #7a7a7a;
}
.link-wrap {
display: flex;
align-items: center;
margin: 10px 0 20px;
}
.link {
padding: 10px;
margin-right: 15px;
@ -713,6 +707,7 @@ export default {
border-radius: 4px;
}
}
/deep/.choose-dia {
.member-list {
li {
@ -721,17 +716,21 @@ export default {
align-items: center;
margin-bottom: 10px;
}
.info {
display: inline-flex;
align-items: center;
}
img {
width: 40px;
height: 40px;
}
.name {
margin-left: 10px;
}
.el-radio__label {
display: none;
}

@ -1,227 +1,121 @@
<template>
<div>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title"
v-preventReClick
@click="back">
<div class="per_title" v-preventReClick @click="back">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school"
v-text="form.id ? '编辑文章' : '新建文章'"></span>
<span class="per_school" v-text="form.id ? '编辑文章' : '新建文章'"></span>
</div>
</div>
</el-card>
<div class="page">
<el-form :model="form"
:rules="rules"
class="input-form model"
label-width="140px">
<el-form-item prop="title"
label="标题">
<el-input id="focus-el"
style="width: 940px"
placeholder="请输入标题"
v-model="form.title"
clearable
maxlength="100"
@change="nameChange"></el-input>
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px">
<el-form-item prop="title" label="标题">
<el-input id="focus-el" style="width: 940px" placeholder="请输入标题" v-model="form.title" clearable
maxlength="100" @change="nameChange"></el-input>
</el-form-item>
<div class="item-line">
<el-form-item prop="releaseTime"
label="发布日期">
<el-date-picker v-model="form.releaseTime"
type="date"
placeholder="选择日期"
format="yyyy-MM-dd"
:clearable="false"
value-format="yyyy-MM-dd">
<el-form-item prop="releaseTime" label="发布日期">
<el-date-picker v-model="form.releaseTime" type="date" placeholder="选择日期" format="yyyy-MM-dd"
:clearable="false" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="source"
label="来源">
<el-input placeholder="请输入来源"
v-model.trim="form.source"
clearable
maxlength="50"
<el-form-item prop="source" label="来源">
<el-input placeholder="请输入来源" v-model.trim="form.source" clearable maxlength="50"
class="inline-input"></el-input>
</el-form-item>
<el-form-item prop="author"
label="作者">
<el-input v-model="form.author"
clearable
maxlength="50"
class="inline-input"></el-input>
<el-form-item prop="author" label="作者">
<el-input v-model="form.author" clearable maxlength="50" class="inline-input"></el-input>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="edit"
label="编辑">
<el-input placeholder="请输入编辑"
v-model.trim="form.edit"
clearable
maxlength="50"
<el-form-item prop="edit" label="编辑">
<el-input placeholder="请输入编辑" v-model.trim="form.edit" clearable maxlength="50"
class="inline-input"></el-input>
</el-form-item>
<el-form-item prop="audit"
label="审核">
<el-input placeholder="请输入审核"
v-model.trim="form.audit"
clearable
maxlength="50"
<el-form-item prop="audit" label="审核">
<el-input placeholder="请输入审核" v-model.trim="form.audit" clearable maxlength="50"
class="inline-input"></el-input>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="classificationId"
label="所属分类">
<el-select style="width: 234px;"
v-model="form.classificationId">
<el-form-item prop="classificationId" label="所属分类">
<el-select style="width: 234px;" v-model="form.classificationId">
<template v-for="item in classifications">
<el-option v-if="item.id"
:key="item.id"
:label="item.classificationName"
:value="item.id">
<el-option v-if="item.id" :key="item.id" :label="item.classificationName" :value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn"
type="primary"
@click="setClass">设置</el-button>
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button>
</el-form-item>
<el-form-item prop="author"
label="主题标签">
<el-select style="width: 234px;"
v-model="form.lableId"
multiple>
<el-form-item prop="author" label="主题标签">
<el-select style="width: 234px;" v-model="form.lableId" multiple>
<template v-for="item in labels">
<el-option v-if="item.id"
:key="item.id"
:label="item.labelName"
:value="item.id">
<el-option v-if="item.id" :key="item.id" :label="item.labelName" :value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn"
type="primary"
@click="setLabel">设置</el-button>
<el-button class="set-btn" type="primary" @click="setLabel">设置</el-button>
</el-form-item>
</div>
<el-form-item prop="summary"
label="摘要">
<el-input style="width: 940px"
type="textarea"
v-model.trim="form.summary"
:rows="3"
clearable></el-input>
<el-form-item prop="summary" label="摘要">
<el-input style="width: 940px" type="textarea" v-model.trim="form.summary" :rows="3" clearable></el-input>
</el-form-item>
<el-form-item prop="bannerImg"
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.bannerImg"
:src="form.bannerImg"
class="avatar">
<div class="uploader-default"
v-else>
<img class="plus"
src="@/assets/img/plus.png"
alt="">
<el-form-item prop="bannerImg" 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.bannerImg" :src="form.bannerImg" class="avatar">
<div class="uploader-default" v-else>
<img class="plus" src="@/assets/img/plus.png" alt="">
<p>点击上传</p>
</div>
</el-upload>
</el-form-item>
<el-form-item prop="mainBody"
label="正文">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda'
v-model="form.mainBody"
<el-form-item prop="mainBody" label="正文">
<Editor api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda' v-model="form.mainBody"
:init="editorConfig" />
</el-form-item>
<el-form-item prop="file"
label="文件上传">
<Upload :limit="20"
:changeFileList="false"
:file-list.sync="form.fileList"
:on-remove="handleRemove"
<el-form-item prop="file" label="文件上传">
<Upload :limit="20" :changeFileList="false" :file-list.sync="form.fileList" :on-remove="handleRemove"
@onSuccess="uploadSuccessFile" />
</el-form-item>
</el-form>
<div class="btns">
<el-button type="primary"
@click="submit(1)">发布</el-button>
<el-button type="primary" @click="submit(1)">发布</el-button>
<el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button>
</div>
</div>
<!-- 剪裁组件弹窗 -->
<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"
<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"
@upload="customUpload" />
</el-dialog>
<el-dialog title="所属分类设置"
:visible.sync="classVisible"
width="500px"
:close-on-click-modal="false"
class="manage-dia"
:before-close="closeClass">
<el-dialog title="所属分类设置" :visible.sync="classVisible" width="500px" :close-on-click-modal="false"
class="manage-dia" :before-close="closeClass">
<div class="plus">
<i class="el-icon-circle-plus-outline"
@click="addClass"></i>
<i class="el-icon-circle-plus-outline" @click="addClass"></i>
</div>
<el-table :data="classifications"
ref="table"
header-align="center"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="classificationName"
label="分类名称"
align="center"
min-width="130">
<el-table :data="classifications" ref="table" header-align="center" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="classificationName" label="分类名称" align="center" min-width="130">
<template slot-scope="scope">
<el-input v-if="scope.row.edit"
placeholder="请输入分类名称"
v-model="scope.row.classificationName"
clearable
<el-input v-if="scope.row.edit" placeholder="请输入分类名称" v-model="scope.row.classificationName" clearable
maxlength="30"></el-input>
<span v-else>{{ scope.row.classificationName }}</span>
</template>
</el-table-column>
<el-table-column prop="updateTime1"
label="是否引用"
align="center"
min-width="60"></el-table-column>
<el-table-column label="操作"
align="center"
min-width="60">
<el-table-column prop="updateTime1" label="是否引用" align="center" min-width="60"></el-table-column>
<el-table-column label="操作" align="center" min-width="60">
<template slot-scope="scope">
<i v-if="scope.row.edit"
class="el-icon-check edit"
@click="submitClass(scope.row)"></i>
<i v-else
class="el-icon-edit edit"
@click="editClass(scope.row)"></i>
<i class="el-icon-delete del"
@click="delClass(scope.row, scope.$index)"></i>
<i v-if="scope.row.edit" class="el-icon-check edit" @click="submitClass(scope.row)"></i>
<i v-else class="el-icon-edit edit" @click="editClass(scope.row)"></i>
<i class="el-icon-delete del" @click="delClass(scope.row, scope.$index)"></i>
</template>
</el-table-column>
</el-table>
@ -230,53 +124,26 @@
</span>
</el-dialog>
<el-dialog title="主题标签设置"
:visible.sync="labelVisible"
width="500px"
:close-on-click-modal="false"
class="manage-dia"
:before-close="closeLabel">
<el-dialog title="主题标签设置" :visible.sync="labelVisible" width="500px" :close-on-click-modal="false"
class="manage-dia" :before-close="closeLabel">
<div class="plus">
<i class="el-icon-circle-plus-outline"
@click="addLabel"></i>
<i class="el-icon-circle-plus-outline" @click="addLabel"></i>
</div>
<el-table :data="labels"
ref="table"
header-align="center"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="labelName"
label="主题名称"
align="center"
min-width="130">
<el-table :data="labels" ref="table" header-align="center" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="labelName" label="主题名称" align="center" min-width="130">
<template slot-scope="scope">
<el-input v-if="scope.row.edit"
placeholder="请输入主题名称"
v-model="scope.row.labelName"
clearable
<el-input v-if="scope.row.edit" placeholder="请输入主题名称" v-model="scope.row.labelName" clearable
maxlength="30"></el-input>
<span v-else>{{ scope.row.labelName }}</span>
</template>
</el-table-column>
<el-table-column prop="updateTime1"
label="是否引用"
align="center"
min-width="60"></el-table-column>
<el-table-column label="操作"
align="center"
min-width="60">
<el-table-column prop="updateTime1" label="是否引用" align="center" min-width="60"></el-table-column>
<el-table-column label="操作" align="center" min-width="60">
<template slot-scope="scope">
<i v-if="scope.row.edit"
class="el-icon-check edit"
@click="submitLabel(scope.row)"></i>
<i v-else
class="el-icon-edit edit"
@click="editLabel(scope.row)"></i>
<i class="el-icon-delete del"
@click="delLabel(scope.row, scope.$index)"></i>
<i v-if="scope.row.edit" class="el-icon-check edit" @click="submitLabel(scope.row)"></i>
<i v-else class="el-icon-edit edit" @click="editLabel(scope.row)"></i>
<i class="el-icon-delete del" @click="delLabel(scope.row, scope.$index)"></i>
</template>
</el-table-column>
</el-table>
@ -725,6 +592,7 @@ export default {
$upload-width: 220px;
$upload-height: 102px;
$upload-lg-height: 102px;
/deep/ .avatar-uploader {
.el-upload {
position: relative;
@ -734,6 +602,7 @@ $upload-lg-height: 102px;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.uploader-default {
display: flex;
height: $upload-height;
@ -742,6 +611,7 @@ $upload-lg-height: 102px;
align-items: center;
text-align: center;
background: #fafafa;
p {
margin-top: 10px;
font-size: 14px;
@ -750,6 +620,7 @@ $upload-lg-height: 102px;
}
}
}
&.avatar-uploader-lg {
.el-upload {
width: 100%;
@ -761,31 +632,38 @@ $upload-lg-height: 102px;
}
}
}
.avatar {
display: block;
width: $upload-width;
height: $upload-height;
}
.avatar-lg {
display: block;
width: 100%;
height: $upload-lg-height;
}
.el-upload__tip {
margin-top: 0;
p {
font-size: 12px;
color: #333;
}
}
}
.style-wrap {
display: flex;
margin-top: 10px;
.label {
margin-right: 30px;
}
}
.styles {
display: flex;
flex-wrap: wrap;
@ -793,14 +671,17 @@ $upload-lg-height: 102px;
// height: 320px;
margin-top: 20px;
overflow: auto;
li {
margin: 0 20px 10px 0;
text-align: center;
cursor: pointer;
&:hover .review {
border-color: #9278ff;
border-color: #062c87;
}
}
.review {
display: flex;
justify-content: center;
@ -810,85 +691,106 @@ $upload-lg-height: 102px;
margin-bottom: 10px;
border: 1px solid #dcdee0;
border-radius: 2px;
img {
width: 80px;
}
.is-link {
width: 50px;
}
}
}
.info {
position: absolute;
top: 8px;
left: -32px;
cursor: pointer;
}
.plus {
margin-bottom: 10px;
font-size: 18px;
color: #9278ff;
color: #062c87;
text-align: right;
cursor: pointer;
}
.set-btn {
margin-left: 10px !important;
}
.manage-dia {
.edit,
.del {
font-size: 14px;
cursor: pointer;
}
.edit {
margin-right: 10px;
}
}
.input-form {
&.model {
height: calc(100vh - 340px);
padding-right: 20px;
overflow: auto;
.el-form-item__label {
padding-right: 20px;
}
.lg .el-form-item__label {
padding-right: 43px;
}
}
.item-line {
display: flex;
.el-form-item:not(:last-child) {
margin-right: 200px;
}
}
.line {
margin-bottom: 24px;
border-bottom: 1px dashed #c2c2c2;
}
.el-form-item--small.el-form-item {
margin-bottom: 24px;
}
.el-input,
.el-select {
width: 300px;
}
.el-select .el-input {
width: auto;
}
.el-textarea {
width: 550px;
}
.auto,
.auto .el-input {
width: auto;
}
.el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before {
font-size: 18px;
vertical-align: -4px;
color: #f5222d;
}
}
.btns {
text-align: center;
}

@ -1,143 +1,79 @@
<template>
<div>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title"
v-preventReClick
@click="back">
<div class="per_title" v-preventReClick @click="back">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school"
v-text="form.id ? '编辑方案' : '新建方案'"></span>
<span class="per_school" v-text="form.id ? '编辑方案' : '新建方案'"></span>
</div>
</div>
</el-card>
<div class="page">
<el-form :model="form"
:rules="rules"
class="input-form model"
label-width="140px">
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px">
<div class="item-line">
<el-form-item prop="title"
label="标题">
<el-input placeholder="请输入标题"
v-model.trim="form.title"
clearable
maxlength="30"
<el-form-item prop="title" label="标题">
<el-input placeholder="请输入标题" v-model.trim="form.title" clearable maxlength="30"
class="inline-input"></el-input>
</el-form-item>
<el-form-item prop="classificationId"
label="所属分类">
<el-select style="width: 234px;"
v-model="form.classificationId">
<el-form-item prop="classificationId" label="所属分类">
<el-select style="width: 234px;" v-model="form.classificationId">
<template v-for="item in classifications">
<el-option v-if="item.id"
:key="item.id"
:label="item.classificationName"
:value="item.id">
<el-option v-if="item.id" :key="item.id" :label="item.classificationName" :value="item.id">
</el-option>
</template>
</el-select>
<el-button class="set-btn"
type="primary"
@click="setClass">设置</el-button>
<el-button class="set-btn" type="primary" @click="setClass">设置</el-button>
</el-form-item>
</div>
<el-form-item prop="applicableMajor"
label="适用专业">
<el-input style="width: 940px"
type="textarea"
v-model.trim="form.applicableMajor"
:rows="3"
<el-form-item prop="applicableMajor" label="适用专业">
<el-input style="width: 940px" type="textarea" v-model.trim="form.applicableMajor" :rows="3"
clearable></el-input>
</el-form-item>
<el-form-item prop="schemeIntroduction"
label="方案简介">
<el-input style="width: 940px"
type="textarea"
v-model.trim="form.schemeIntroduction"
:rows="3"
<el-form-item prop="schemeIntroduction" label="方案简介">
<el-input style="width: 940px" type="textarea" v-model.trim="form.schemeIntroduction" :rows="3"
clearable></el-input>
</el-form-item>
<el-form-item prop="product"
label="产品">
<el-button style="margin-bottom: 5px"
type="primary"
@click="showProduct">请选择</el-button>
<el-form-item prop="product" label="产品">
<el-button style="margin-bottom: 5px" type="primary" @click="showProduct">请选择</el-button>
<div>
<el-tag v-for="(tag, i) in form.productList"
:key="i"
class="tag"
closable
@close="delCheckedProduct(i)">
<el-tag v-for="(tag, i) in form.productList" :key="i" class="tag" closable @close="delCheckedProduct(i)">
{{ tag.productName }}
</el-tag>
</div>
</el-form-item>
<el-form-item prop="schemeFile"
label="方案文件">
<Upload :max-size="100000"
:file-list.sync="fileList"
:on-remove="handleRemove"
<el-form-item prop="schemeFile" label="方案文件">
<Upload :max-size="100000" :file-list.sync="fileList" :on-remove="handleRemove"
@onSuccess="uploadSuccessFile" />
</el-form-item>
</el-form>
<div class="btns">
<el-button type="primary"
@click="submit(1)">发布</el-button>
<el-button type="primary" @click="submit(1)">发布</el-button>
<el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button>
</div>
</div>
<el-dialog title="所属分类设置"
:visible.sync="classVisible"
width="500px"
:close-on-click-modal="false"
class="manage-dia"
:before-close="closeClass">
<el-dialog title="所属分类设置" :visible.sync="classVisible" width="500px" :close-on-click-modal="false"
class="manage-dia" :before-close="closeClass">
<div class="plus">
<i class="el-icon-circle-plus-outline"
@click="addClass"></i>
<i class="el-icon-circle-plus-outline" @click="addClass"></i>
</div>
<el-table :data="classifications"
ref="table"
header-align="center"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="classificationName"
label="分类名称"
align="center"
min-width="130">
<el-table :data="classifications" ref="table" header-align="center" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="classificationName" label="分类名称" align="center" min-width="130">
<template slot-scope="scope">
<el-input v-if="scope.row.edit"
placeholder="请输入分类名称"
v-model="scope.row.classificationName"
clearable
<el-input v-if="scope.row.edit" placeholder="请输入分类名称" v-model="scope.row.classificationName" clearable
maxlength="30"></el-input>
<span v-else>{{ scope.row.classificationName }}</span>
</template>
</el-table-column>
<el-table-column prop="updateTime1"
label="是否引用"
align="center"
min-width="60"></el-table-column>
<el-table-column label="操作"
align="center"
min-width="60">
<el-table-column prop="updateTime1" label="是否引用" align="center" min-width="60"></el-table-column>
<el-table-column label="操作" align="center" min-width="60">
<template slot-scope="scope">
<i v-if="scope.row.edit"
class="el-icon-check edit"
@click="submitClass(scope.row)"></i>
<i v-else
class="el-icon-edit edit"
@click="editClass(scope.row)"></i>
<i class="el-icon-delete del"
@click="delClass(scope.row, scope.$index)"></i>
<i v-if="scope.row.edit" class="el-icon-check edit" @click="submitClass(scope.row)"></i>
<i v-else class="el-icon-edit edit" @click="editClass(scope.row)"></i>
<i class="el-icon-delete del" @click="delClass(scope.row, scope.$index)"></i>
</template>
</el-table-column>
</el-table>
@ -146,10 +82,7 @@
</span>
</el-dialog>
<el-dialog :visible.sync="productVisible"
width="1200px"
center
custom-class="product-dia">
<el-dialog :visible.sync="productVisible" width="1200px" center custom-class="product-dia">
<div class="product-wrap">
<div class="item type">
<div class="title-wrap flex-center">
@ -157,9 +90,7 @@
<span>产品分类</span>
</div>
<ul class="types">
<li v-for="(item, i) in productCategories"
:key="i"
:class="{active: curType == item.classificationId}"
<li v-for="(item, i) in productCategories" :key="i" :class="{ active: curType == item.classificationId }"
@click="typeClick(item)">
{{ item.classificationName }}
</li>
@ -171,40 +102,18 @@
<p class="addhr_tag"></p>
<span>产品列表</span>
</div>
<el-input class="mgb10"
placeholder="请输入产品名称"
prefix-icon="el-icon-search"
v-model.trim="keyword"
<el-input class="mgb10" placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model.trim="keyword"
clearable></el-input>
<el-table :data="products"
class="table"
ref="table"
stripe
header-align="center"
max-height="470"
@selection-change="handleSelectionChange"
row-key="mallId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="55"
label="序号"
align="center"></el-table-column>
<el-table-column prop="productName"
label="产品名称"
align="center"></el-table-column>
<el-table-column prop="supplierName"
label="厂商"
align="center"></el-table-column>
<el-table :data="products" class="table" ref="table" header-align="center" max-height="470"
@selection-change="handleSelectionChange" row-key="mallId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
<el-table-column prop="productName" label="产品名称" align="center"></el-table-column>
<el-table-column prop="supplierName" label="厂商" align="center"></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 background layout="total, prev, pager, next" :total="total"
@current-change="handleCurrentChange" :current-page="page">
</el-pagination>
</div>
</div>
@ -214,27 +123,12 @@
<p class="addhr_tag"></p>
<span>已选择产品{{ checkeds.length }}</span>
</div>
<el-table :data="checkeds"
class="table"
stripe
header-align="center"
max-height="470">
<el-table-column type="index"
width="55"
label="序号"
align="center"></el-table-column>
<el-table-column prop="productName"
label="产品名称"
align="center"></el-table-column>
<el-table-column prop="supplierName"
label="厂商"
align="center"></el-table-column>
<el-table-column prop="typeName"
label="产品类型"
align="center"></el-table-column>
<el-table-column label="操作"
align="center"
width="55">
<el-table :data="checkeds" class="table" header-align="center" max-height="470">
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
<el-table-column prop="productName" label="产品名称" align="center"></el-table-column>
<el-table-column prop="supplierName" label="厂商" align="center"></el-table-column>
<el-table-column prop="typeName" label="产品类型" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="55">
<template slot-scope="scope">
<i :class="['el-icon-delete rm', { disabled: scope.row.disabled }]"
@click="delProduct(scope.$index, scope.row)"></i>
@ -244,11 +138,9 @@
</div>
</div>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="productVisible = false"> </el-button>
<el-button type="primary"
@click="productSubmit"> </el-button>
<el-button type="primary" @click="productSubmit"> </el-button>
</span>
</el-dialog>
</div>
@ -646,105 +538,132 @@ export default {
.plus {
margin-bottom: 10px;
font-size: 18px;
color: #9278ff;
color: #062c87;
text-align: right;
cursor: pointer;
}
.set-btn {
margin-left: 10px !important;
}
.manage-dia {
.edit,
.del {
font-size: 14px;
cursor: pointer;
}
.edit {
margin-right: 10px;
}
}
.input-form {
&.model {
height: calc(100vh - 340px);
padding-right: 20px;
overflow: auto;
.el-form-item__label {
padding-right: 20px;
}
.lg .el-form-item__label {
padding-right: 43px;
}
}
.item-line {
display: flex;
.el-form-item:not(:last-child) {
margin-right: 200px;
}
}
.line {
margin-bottom: 24px;
border-bottom: 1px dashed #c2c2c2;
}
.el-form-item--small.el-form-item {
margin-bottom: 24px;
}
.el-input,
.el-select {
width: 300px;
}
.el-select .el-input {
width: auto;
}
.el-textarea {
width: 550px;
}
.auto,
.auto .el-input {
width: auto;
}
.el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before {
font-size: 18px;
vertical-align: -4px;
color: #f5222d;
}
}
.btns {
text-align: center;
}
.tag {
margin: 0 5px 5px 0;
}
/deep/.product-dia {
.product-wrap {
display: flex;
}
.title-wrap {
margin-bottom: 15px;
}
.item {
width: 130px;
max-height: 600px;
margin-right: 20px;
overflow: hidden;
}
.types {
li {
margin: 10px 0;
cursor: pointer;
&.active {
color: #9278ff;
color: #062c87;
}
}
}
.products {
width: 400px;
}
.checked {
flex: 1;
.el-table .cell {
font-size: 12px;
}
}
.rm {
font-size: 16px;
cursor: pointer;

@ -0,0 +1,672 @@
<template>
<div class="page" style="padding-top: 0;" v-loading="loading">
<div class="tabs mgb20">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.id == active }"
@click="tabChange(item.id)">{{ item.name }}</a>
</div>
<div class="tool mul">
<ul class="filter">
<li>
<label>入库时间</label>
<div class="single-choice">
<dl>
<dd>
<el-radio-group v-model="form.month" @change="changeType">
<el-radio v-for="(item, index) in dateList" :key="index" :label="item.id" border>{{ item.name
}}</el-radio>
</el-radio-group>
</dd>
</dl>
</div>
</li>
<li>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期"
end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable></el-date-picker>
</li>
<li>
<el-input :placeholder="`请输入资源名称、${active === 2 ? '描述' : '章节'}`" suffix-icon="el-icon-search"
v-model="form.keyword" clearable></el-input>
</li>
</ul>
</div>
<div class="tool mul">
<ul class="filter">
<li v-if="!active">
<label>课程</label>
<el-select v-if="!active" v-model="form.cid" filterable clearable @change="initData">
<el-option v-for="(item, i) in courses" :key="i" :label="item.curriculumName" :value="item.cid"></el-option>
</el-select>
<el-select v-else v-model="form.cid" filterable clearable @change="initData">
<el-option v-for="(item, i) in theoreticalCourses" :key="i" :label="item.courseName"
:value="item.id"></el-option>
</el-select>
</li>
<li>
<label>资源类型</label>
<el-select v-model="form.displayFileType" multiple clearable @change="initData">
<el-option v-for="(item, i) in types" :key="i" :label="item.name" :value="item.name"></el-option>
</el-select>
</li>
<!-- <li>
<label>编辑人</label>
<el-select v-model="form.editor" clearable @change="initData">
<el-option v-for="(item, i) in types" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</li> -->
</ul>
<div>
<el-button v-if="active === 2" type="primary" @click="uploadFile">上传文件</el-button>
<el-button type="primary" @click="delAllSelection">批量删除</el-button>
</div>
</div>
<el-table ref="table" :data="list" class="table" header-align="center" @selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="resourceName" min-width="160" label="资源名称" align="center"></el-table-column>
<el-table-column prop="displayFileType" width="90" label="资源类型" align="center"></el-table-column>
<template v-if="active === 2">
<el-table-column key="1" prop="resourceDescription" min-width="160" label="资源描述"
align="center"></el-table-column>
<!-- <el-table-column key="2" prop="name" width="100" label="是否被引用" align="center">
<template slot-scope="scope">{{ scope.row.isReferenced ? '是' : '否' }}</template>
</el-table-column> -->
</template>
<template v-else>
<el-table-column key="3" prop="curriculumName" min-width="160" label="课程名称" align="center"></el-table-column>
<el-table-column key="4" prop="chapterSubsection" min-width="160" label="章节" align="center"></el-table-column>
</template>
<el-table-column prop="createTime" label="入库时间" align="center" width="160"></el-table-column>
<el-table-column prop="editor" label="编辑人" width="130" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" @click="download(scope.row)">下载</el-button>
<el-button type="text" @click="preview(scope.row)">预览</el-button>
<el-button type="text" @click="del(scope.row)">删除</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>
<div v-show="previewImg" class="el-image-viewer__wrapper" :class="{ active: previewImg }" style="z-index: 2000">
<div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" @click="previewImg = ''"><i class="el-icon-circle-close"
style="color: #fff"></i></span>
<div class="el-image-viewer__canvas">
<img :src="previewImg" class="el-image-viewer__img"
style="transform: scale(1) rotate(0deg);margin-top: -1px; max-height: 100%; max-width: 100%;">
</div>
</div>
<div v-show="iframeSrc || videoSrc" class="el-image-viewer__wrapper" :class="{ active: iframeSrc }"
style="z-index: 2000">
<div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" :class="{ 'doc-close': isWord }"
:style="{ top: isWord ? '50px' : '15px' }" @click="closeIframe"><i class="el-icon-circle-close"
style="color: #fff"></i></span>
<div class="el-image-viewer__canvas">
<iframe v-if="iframeSrc" class="fileIframe" id="fileIframe" :src="iframeSrc" frameborder="0"></iframe>
<video v-if="videoSrc" class="video" width="1200" height="600" autoplay controls>
<source :src="videoSrc" type="video/mp4">
您的浏览器不支持 video 标签
</video>
<template v-if="showMask">
<div class="mask" style="width: 200px;height: 30px;top: 53px;right: 320px"></div>
<div class="mask" style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
</template>
<template v-if="showMask1">
<div class="word-mask1" style="width: 200px;height: 50px;"></div>
<div class="word-mask" style="height: 40px;top: 48px;"></div>
<div class="word-mask2" style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
</template>
<template v-if="showMask2 && iframeSrc">
<div class="excel-mask1" style="height: 48px;"></div>
</template>
</div>
</div>
<div v-show="playAuth" class="el-image-viewer__wrapper" :class="{ active: playAuth }" style="z-index: 2000">
<div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i class="el-icon-circle-close"
style="color: #fff"></i></span>
<div class="player" id="player"></div>
</div>
<Pdf :visible.sync="pdfVisible" :src.sync="pdfSrc" />
<div class="player-download" id="playerDownload"></div>
<Upload :visible.sync="uploadVisible" :row.sync="curRow" />
</div>
</template>
<script>
import { Loading } from 'element-ui'
import Setting from '@/setting'
import Util from '@/libs/util'
import SourceConst from '@/const/source'
import Pdf from '@/components/pdf'
import Upload from './upload'
export default {
components: { Pdf, Upload },
data () {
return {
active: +this.$route.query.type || 0,
defaultTabs: [
{
id: 0,
name: '教学课程'
},
{
id: 1,
name: '精品课程'
},
{
id: 2,
name: '文件素材'
},
],
tabs: [],
timer: null,
types: SourceConst.types,
courses: [],
theoreticalCourses: [],
list: [],
form: {
month: '',
keyword: '',
startTime: '',
endTime: '',
displayFileType: [],
editor: '',
},
multipleSelection: [],
dateList: [
{
id: "",
name: "不限"
},
{
id: 1,
name: "近一个月"
},
{
id: 3,
name: "近三个月"
},
{
id: 6,
name: "近六个月"
}
],
date: [],
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
modifyVisible: false,
curRow: null,
loading: false,
now: '',
sectionForm: {
sectionName: ''
},
fileType: "",
videoSrc: '',
playAuth: "",
player: null,
previewImg: "",
iframeSrc: "",
isWord: false,
isPPT: false,
isExcel: false,
showMask: false,
showMask1: false,
showMask2: false,
loadIns: null,
pdfVisible: false,
pdfSrc: "",
previewing: false,
uploadVisible: false,
};
},
watch: {
"form.month": function (val) {
if (val) {
let unit = 24 * 60 * 60 * 1000;
this.date = [Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))];
} else {
this.date = [];
}
},
date: function (val) {
if (val) {
this.form.startTime = val[0];
this.form.endTime = val[1];
} else {
this.form.startTime = ''
this.form.endTime = ''
}
this.initData();
},
'form.keyword': function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted () {
Setting.dynamicRoute && this.initTabs()
this.insertScript()
this.getData()
this.getCourse()
},
methods: {
initTabs () {
const { btns } = this.$store.state
const tab1 = btns.includes('/resourse:教学课程')
const tab2 = btns.includes('/resourse:精品课程')
const tab3 = btns.includes('/resourse:文件素材')
const tabs = this.defaultTabs
tab1 && this.tabs.push(tabs[0])
tab2 && this.tabs.push(tabs[1])
tab3 && this.tabs.push(tabs[2])
const type = +this.$route.query.type
this.active = this.tabs.find(e => e.id === type) ? type : this.tabs[0].id
},
async getData () {
this.loading = true
try {
const { form } = this
const { page } = await this.$post(this.api.resourceLibrary, {
pageNum: this.page,
pageSize: this.pageSize,
platformId: Setting.platformId,
type: this.active,
...form
})
this.list = page.records
this.total = page.total
} finally {
this.loading = false
}
},
//
async getCourse () {
//
if (!this.courses.length) {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
const { page } = await this.$post(this.api.curriculumList, {
pageNum: 1,
pageSize: 1000,
supplierId: sid ? sid.supplierId : '',
platformId: Setting.platformId
})
this.courses = page.records
}
//
// if (!this.theoreticalCourses.length) {
// const { page } = await this.$post(this.api.listTheoreticalCourse, {
// pageNum: 1,
// pageSize: 1000,
// createPlatform: 0,
// platformSource: Setting.platformSource,
// })
// this.theoreticalCourses = page.records
// }
},
tabChange (id) {
this.active = id
this.form.cid = ''
this.$refs.table.clearSelection()
this.initData()
this.getCourse()
this.$router.push({
path: '/resourse',
query: {
...this.$route.query,
type: id
}
})
},
changeType () {
this.$refs.table.clearSelection()
this.initData()
},
initData () {
this.page = 1
this.getData()
},
handleSelectionChange (val) {
this.multipleSelection = val
},
handleCurrentChange (val) {
this.page = val
this.$router.push(`/resourse?page=${val}`)
this.getData()
},
//
uploadFile () {
this.curRow = null
this.uploadVisible = true
},
//
delAllSelection () {
const list = this.multipleSelection
if (list.length) {
this.$confirm('删除后用户将无法再查看和使用这些资源,确定删除?', '提示', {
type: "warning"
}).then(async () => {
const ids = list.map(e => e.id)
const tab = this.active
if (!tab) {
//
await this.$post(this.api.deleteSubsectionBatch, {
subsectionIds: ids
})
} else if (tab === 1) {
//
await this.$post(this.api.batchDeletionTheoretical, ids)
} else {
//
await this.$post(this.api.resourceDel, ids)
}
this.getData()
this.$message.success("删除成功")
this.$refs.table.clearSelection()
}).catch(() => { })
} else {
this.$message.warning("请先选择数据 !")
}
},
edit (row) {
this.curRow = row
this.uploadVisible = true
},
//
download (row) {
const { fileType, fileId } = row
// ppt
if (fileType === 'pptx') {
this.downloadFile(row.originalFileName || row.name, row.fileUrl)
} else if (fileId) {
//
this.$get(`${this.api.getPlayAuth}/${fileId}`).then(res => {
new Aliplayer({
id: "playerDownload",
width: "100%",
autoplay: false,
vid: fileId,
playauth: res.playAuth,
encryptType: 1 //
}, player => {
this.downloadFile(row.name, player._urls[0].Url)
})
}).catch(res => { })
} else {
this.downloadFile(row.originalFileName, row.fileUrl)
}
},
transferType (ext) {
if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return "图片";
if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return "视频";
return ext;
},
insertScript () {
const linkTag = document.createElement("link");
linkTag.rel = "stylesheet";
linkTag.href = "https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css";
document.body.appendChild(linkTag);
const scriptTag = document.createElement("script");
scriptTag.type = "text/javascript";
scriptTag.src = "https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js";
document.body.appendChild(scriptTag);
},
async preview (row) {
if (this.transferType(row.fileType) == "视频") {
//
if (row.fileId) {
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => {
this.playAuth = res.playAuth;
if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else {
this.player = new Aliplayer({
id: "player",
width: "100%",
autoplay: false,
vid: row.fileId,
playauth: this.playAuth,
encryptType: 1 //
});
}
}).catch(res => { });
} else {
this.videoSrc = row.fileUrl
}
} else if (this.transferType(row.fileType) == "图片") {
this.previewImg = row.fileUrl;
} else if (row.fileType == "pdf") {
this.pdfSrc = row.fileUrl;
this.pdfVisible = true;
} else {
this.previewing = true;
this.loadIns = Loading.service();
this.$route.fullPath.includes("#file") || history.pushState({ file: true }, "文件预览", "#" + this.$route.fullPath + "#file");
if (row.fileType == "pptx") {
this.isPPT = true
this.isWord = false
this.isExcel = false
} else if (row.fileType == "doc" || row.fileType == "docx") {
this.isPPT = false
this.isWord = true
this.isExcel = false
} else if (row.fileType == "xls" || row.fileType == "xlsx") {
this.isExcel = true
this.isPPT = false
this.isWord = false
} else {
this.isPPT = false
this.isWord = false
this.isExcel = false
}
this.iframeSrc = 'https://view.officeapps.live.com/op/view.aspx?src=' + row.fileUrl
this.$nextTick(() => {
this.iframeOnload()
})
}
},
iframeOnload () {
document.querySelector("#fileIframe").onload = e => {
if (this.isPPT) {
this.showMask = true;
} else {
this.showMask = false;
}
if (this.isWord) {
this.showMask1 = true;
} else {
this.showMask1 = false;
}
if (this.isExcel) {
this.showMask2 = true;
} else {
this.showMask2 = false;
}
this.loadIns.close();
};
},
del (row) {
this.$confirm('删除后用户将无法再查看和使用此资源,确定删除?', '提示', {
type: 'warning'
}).then(async () => {
const tab = this.active
if (!tab) {
//
await this.$post(this.api.deleteSubsectionBatch, {
chapterId: row.chapterId,
subsectionIds: [row.id]
})
} else if (tab === 1) {
//
await this.$post(this.api.batchDeletionTheoretical, [row.id])
} else {
//
await this.$post(this.api.resourceDel, [row.id])
}
this.$message.success("删除成功")
this.getData()
}).catch(() => { })
},
sectionNameSubmit () {
if (!this.sectionForm.sectionName) return this.$message.warning("请填写资源名称")
let data = {
id: this.sectionId,
cid: this.id,
chapterId: this.chapterId,
name: this.sectionForm.sectionName
}
this.$put(this.api.editSubsection, data).then(res => {
this.$message.success("修改成功")
this.sectionNameVisible = false
this.getData()
}).catch(err => { })
},
closePlayer () {
this.playAuth = ''
this.player.pause();
},
closeIframe () {
this.iframeSrc = ''
this.videoSrc = ''
this.showMask = false;
this.showMask1 = false;
this.showMask2 = false;
this.previewing = false;
},
}
};
</script>
<style lang="scss" scoped>
/deep/ .tool {
.filter {
.el-input {
min-width: 190px;
}
}
}
@media (max-width: 1640px) {
.page .page-content .tool .filter {
flex-wrap: wrap;
margin-bottom: -15px;
li {
min-width: 34%;
margin-bottom: 15px;
}
}
}
.el-image-viewer__wrapper {
transform: translateY(-10px);
transition: transform 0.5s;
&.active {
transform: translateY(0);
}
}
.el-image-viewer__close {
z-index: 10000;
top: 15px;
right: 15px;
&.doc-close {
i {
color: #000 !important;
}
}
}
.player {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 1200px !important;
height: 600px !important;
}
.player-download {
position: absolute;
top: -9999px;
}
.fileIframe {
z-index: 1;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
}
.mask {
z-index: 1000;
position: fixed;
background-color: rgb(57, 58, 61);
}
.word-mask {
z-index: 1000;
position: fixed;
right: 0;
width: 100%;
background-color: rgb(243, 242, 241);
}
.word-mask1 {
z-index: 1000;
position: fixed;
top: 0;
right: 0;
background-color: #2b579a;
}
.word-mask2 {
z-index: 1000;
position: fixed;
background-color: transparent;
}
.excel-mask1 {
z-index: 9;
position: absolute;
top: 0;
left: 20%;
width: 80%;
background-color: #107c41;
}
</style>

@ -0,0 +1,210 @@
<template>
<el-drawer title="上传文件" :visible.sync="uploadVisible" size="600px" :close-on-click-modal="false"
custom-class="source-dia" @closed="closeDia">
<el-form label-width="80px" style="padding: 20px">
<el-form-item prop="userName">
<el-upload name="file" ref="upload" class="import-file" drag :limit="10000" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-error="uploadError" :before-remove="beforeRemove" :disabled="uploading"
v-loading="uploading" :on-exceed="handleExceed" :file-list="uploadList" action=""
:http-request="handleRequest">
<!-- <img v-if="form.coverUrl" :src="form.coverUrl" class="avatar"> -->
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip" style="line-height: 1.8;">
<p>视频请上传MP4格式大小不超过150M</p>
<p>其他格式文件大小不要超过10M</p>
</div>
</el-upload>
</el-form-item>
<el-form-item label="资源名称">
<el-input v-model="form.resourceName" placeholder="请输入资源名称" />
</el-form-item>
<el-form-item label="资源类型">
<el-select v-model="form.displayFileType" disabled>
<el-option v-for="(item, i) in types" :key="i" :label="item.name" :value="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="$parent.active === 2" label="资源描述">
<el-input type="textarea" :rows="3" v-model="form.resourceDescription" placeholder="请输入资源描述" />
</el-form-item>
</el-form>
<div class="btns">
<el-button @click="uploadVisible = false">取消</el-button>
<el-button type="primary" :loading="submiting" @click="submit">确定</el-button>
</div>
</el-drawer>
</template>
<script>
import Util from '@/libs/util'
import Setting from '@/setting'
import SourceConst from '@/const/source'
import _ from 'lodash'
import Oss from '@/components/upload/upload.js'
export default {
props: ['visible', 'row'],
data () {
return {
uploadVisible: false,
types: SourceConst.types,
uploadList: [],
uploading: false,
submiting: false,
form: {
fileType: '',
fileUrl: '',
fileName: '',
originalFileName: '',
resourceName: '',
displayFileType: '',
resourceDescription: '',
},
originForm: {},
};
},
watch: {
visible () {
this.uploadVisible = this.visible
this.visible && this.init()
}
},
mounted () {
this.originForm = _.cloneDeep(this.form)
},
methods: {
init () {
const { row } = this
if (row) {
this.uploadList = [{
name: row.originalFileName,
url: row.fileUrl
}]
this.form = _.cloneDeep(this.row)
} else {
this.uploadList = []
this.form = _.cloneDeep(this.originForm)
}
},
//
handleExceed () {
Util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
)
},
//
async handleType (ext) {
const res = await this.$post(`${this.api.getFileType}?fileType=${ext}`)
this.form.resourceType = 1
this.form.displayFileType = res.data
},
//
async handleRequest ({ file }) {
Oss.upload(file).then(res => {
this.uploading = false
this.form.fileType = res.format
this.form.fileUrl = res.url
this.form.fileName = res.name
this.handleType(res.format)
this.uploadList = [{
name: res.name,
url: res.url
}]
})
},
uploadError () {
this.uploading = false
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
beforeUpload (file) {
this.uploading = true
this.form.originalFileName = file.name
this.form.resourceName = file.name.substring(0, file.name.lastIndexOf('.'))
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
},
handleRemove (file, fileList) {
file.url && Oss.del(file.url)
this.form.fileUrl = ''
this.uploadList = fileList
},
async submit () {
if (this.submiting) return false
const { form, row } = this
const tab = this.$parent.active
if (!form.fileUrl) return Util.warningMsg('请上传资源')
if (!form.resourceName) return Util.warningMsg('请填写资源名称')
this.submiting = true
if (!tab) {
//
await this.$put(this.api.editSubsection, {
id: row.id,
cid: row.cid,
chapterId: row.chapterId,
fileId: row.fileId || '',
name: form.resourceName,
fileUrl: form.fileUrl,
fileName: form.fileName,
fileType: form.fileType,
originalFileName: form.originalFileName
})
} else if (tab === 1) {
await this.$put(this.api.editSubsectionTheoretical, {
id: row.id,
// courseId: this.id,
chapterId: row.chapterId,
fileId: row.fileId || '',
name: form.resourceName,
fileUrl: form.fileUrl,
fileName: form.fileName,
fileType: form.fileType,
originalFileName: form.originalFileName
})
} else {
await this.$post(this.api.resourceSave, {
platformId: Setting.platformId,
...form
})
}
this.submiting = false
this.uploadVisible = false
},
//
closeDia () {
this.$parent.initData()
this.$emit('update:visible', false)
}
}
};
</script>
<style lang="scss" scoped>
/deep/.import-file {
.el-upload__tip {
margin-top: 0;
}
.el-progress__text,
.el-progress,
.el-upload-list__item-status-label {
display: none !important;
}
}
.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);
}
</style>

@ -13,20 +13,32 @@ export default {
};
},
mounted () {
const token = sessionStorage.getItem('token')
const cache = localStorage.getItem('reviewPath') // localStorage
let url = `${location.origin}/reviewCenter/`
if (Setting.isDev) url = `http://192.168.31.125:8099/`
if (cache) {
url += `#${cache}${cache.includes('?') ? `&` : '?'}token=${sessionStorage.getItem('token')}`
url += '#' + this.replaceParam(cache, Date.now())
} else {
url += `#/myReview?token=${sessionStorage.getItem('token')}`
url += `#/myReview?nakadai=1${Setting.isDev ? `&token=${token}` : ''}&v=${Date.now()}`
}
url += `&v=${Date.now()}`
localStorage.setItem('review_token', sessionStorage.getItem('token'))
console.log("🚀 ~ mounted ~ url:", url)
localStorage.setItem('review_token', token)
this.url = url
},
methods: {
replaceParam (url, newVValue) {
const vParamRegex = /v=[^&]+/g
let newUrl = url.replace(vParamRegex, `v=${newVValue}`)
const [baseUrl, hash] = newUrl.split('#');
if (hash) {
newUrl = `${baseUrl}#${hash.replace(vParamRegex, `v=${newVValue}`)}`
}
return newUrl
}
}
};
</script>

@ -30,7 +30,8 @@
<el-form-item prop="systemType" label="系统类型">
<el-select v-model="form.systemType" clearable placeholder="请选择系统类型">
<el-option v-for="(item,index) in systemTypeList" :key="index" :label="item.name" :value="item.value"></el-option>
<el-option v-for="(item, index) in systemTypeList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -39,7 +40,8 @@
<el-col :span="6" style="margin-left: 60px;">
<el-form-item prop="systemAttribution" label="系统归属">
<el-select v-model="form.systemAttribution" clearable placeholder="请选择系统归属">
<el-option v-for="(item,index) in systemList" :key="index" :label="item.name" :value="item.value"></el-option>
<el-option v-for="(item, index) in systemList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -57,7 +59,7 @@
<el-input placeholder="请输入系统名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div>
</div>
<el-table :data="permissionData" class="table" stripe :span-method="SpanMethod" header-align="center">
<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">
@ -113,7 +115,7 @@
<p class="addhr_tag"></p>
<span>客户列表</span>
</div>
<el-table :data="permissionData" class="table" stripe header-align="center">
<el-table :data="permissionData" class="table" header-align="center">
<el-table-column prop="id" label="序号" align="center">
</el-table-column>
<el-table-column prop="age" label="服务器名称" align="center">
@ -298,24 +300,31 @@
border-left: 1px dashed #eee;
padding: 0 60px;
}
.border_lf label {
width: 120px;
}
.pad_none {
padding: 0 0 0 60px;
}
.mar_input {
margin-right: 80px;
}
.marb30 {
margin-bottom: 30px;
}
.tab_temp label {
width: 60px;
}
.mar10 {
margin-top: 10px;
}
.radio_icon {
font-size: 26px;
color: #9278FF;

@ -16,13 +16,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="系统类型">
<el-select v-model="form.type" clearable placeholder="请选择系统类型" @change="initData">
<el-option v-for="(item, i) in types" :key="i" :label="item" :value="i"></el-option>
</el-select>
</el-form-item>
</el-col>
</div>
<el-col :span="6">
<el-form-item>
@ -40,7 +33,7 @@
<p class="hr_tag"></p>
<span>服务列表</span>
</div>
<el-table :data="list" class="table" stripe header-align="center">
<el-table :data="list" class="table" header-align="center">
<!-- <el-table-column type="selection" width="55" align="center"></el-table-column> -->
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
@ -94,6 +87,7 @@ import qs from 'qs'
export default {
data () {
return {
id: '',
userId: this.$store.state.userLoginId,
token: btoa(sessionStorage.getItem('token')),
form: {
@ -120,15 +114,21 @@ export default {
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
},
'$route.query': {
handler (val) {
this.id = this.$route.query.id || ''
this.getData()
},
immediate: true
}
},
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/configure').catch(() => { })
this.$router.push(`/configure?id=${this.id}`).catch(() => { })
}
this.getData();
},
methods: {
initData () {
@ -141,7 +141,8 @@ export default {
...this.form,
pageNum: this.page,
pageSize: this.pageSize,
supplierId: sid ? sid.supplierId : ''
supplierId: sid ? sid.supplierId : '',
systemTypeId: this.id,
};
this.$post(this.api.queryServiceConfig, data).then(res => {
this.list = res.serviceList.records;
@ -169,7 +170,7 @@ export default {
},
getIntoProject (row) {
this.setReferrer()
this.$router.push(`/projectList?systemId=${row.systemId}&show=1&name=${row.systemName}`)
this.$router.push(`/projectList?systemId=${row.systemId}&name=${row.systemName}`)
},
getIntoJudgement (row) {
this.setReferrer()

@ -1,9 +1,7 @@
<template>
<div class="wrap">
<div class="side">
<org ref="tree"
@initData="initData"
@getData="getData"></org>
<org ref="tree" @initData="initData" @getData="getData"></org>
</div>
<div class="right">
@ -11,95 +9,51 @@
<div class="tool">
<ul class="filter">
<li>
<el-input placeholder="请输入模型名称"
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
<el-input placeholder="请输入模型名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</li>
</ul>
<div>
<el-button type="primary"
round
@click="add">导入模型</el-button>
<el-button type="primary"
round
@click="batchDel">批量移除</el-button>
<el-button type="primary" round @click="add">导入模型</el-button>
<el-button type="primary" round @click="batchDel">批量移除</el-button>
</div>
</div>
<el-table :data="listData"
class="table"
ref="table"
stripe
header-align="center"
<el-table :data="listData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55"
align="center"></el-table-column>
<el-table-column type="index"
label="序号"
width="55"
align="center"></el-table-column>
<el-table-column prop="modelName"
label="模型名称"
align="center"></el-table-column>
<el-table-column v-if="isTopLevel"
prop="categoryName"
label="分类"
width="150"
align="center"></el-table-column>
<el-table-column prop="createTime"
label="导入时间"
align="center"></el-table-column>
<el-table-column label="状态"
align="center">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column prop="modelName" label="模型名称" align="center"></el-table-column>
<el-table-column v-if="isTopLevel" prop="categoryName" label="分类" width="150" align="center"></el-table-column>
<el-table-column prop="createTime" label="导入时间" align="center"></el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
{{ scope.row.ztOpen ? '禁用' : '启用' }}
</template>
</el-table-column>
<el-table-column label="操作"
width="200"
align="center">
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button type="text"
@click="show(scope.row)">查看</el-button>
<el-button type="text"
@click="del(scope.row)">移除</el-button>
<el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="del(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:current-page="page"
@current-change="handleCurrentChange"
:total="total"></el-pagination>
<el-pagination background layout="total, prev, pager, next" :current-page="page"
@current-change="handleCurrentChange" :total="total"></el-pagination>
</div>
</div>
<el-dialog title="请选择需要导入的模型"
:visible.sync="modelVisible"
width="500px"
class="dialog"
<el-dialog title="请选择需要导入的模型" :visible.sync="modelVisible" width="500px" class="dialog"
:close-on-click-modal="false">
<div class="model-wrap">
<el-tree v-if="modelData.length"
:data="modelData"
v-loading="modelLoading"
ref="model"
default-expand-all
show-checkbox
node-key="id"
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
<el-tree v-if="modelData.length" :data="modelData" v-loading="modelLoading" ref="model" default-expand-all
show-checkbox node-key="id" :props="{ children: 'children', label: 'categoryName', isLeaf: 'leaf' }">
</el-tree>
<div class="none"
v-else>暂无可导入的模型</div>
<div class="none" v-else>暂无可导入的模型</div>
</div>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="modelVisible = false"> </el-button>
<el-button type="primary"
@click="submit"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</el-dialog>
</div>
@ -344,23 +298,28 @@ export default {
display: flex;
min-height: calc(100vh - 310px);
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;
}
}
.el-input__inner {
height: 32px;
}
.model-wrap {
max-height: 400px;
overflow: auto;
.none {
text-align: center;
color: #8b8b8b;

@ -1,9 +1,7 @@
<template>
<div class="wrap">
<div class="side">
<org ref="tree"
@initData="catetoryClick"
@getData="getData"></org>
<org ref="tree" @initData="catetoryClick" @getData="getData"></org>
</div>
<div class="right">
@ -11,125 +9,67 @@
<div class="tool">
<ul class="filter">
<li>
<el-input placeholder="请输入模型名称"
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
<el-input placeholder="请输入模型名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</li>
</ul>
<div>
<el-button type="primary"
round
@click="add">新增模型</el-button>
<el-button type="primary"
round
@click="batchDel">批量删除</el-button>
<el-button type="primary"
round
@click="batchOff(1)">批量禁用</el-button>
<el-button type="primary"
round
@click="batchOff(0)">批量开启</el-button>
<el-button type="primary" round @click="add">新增模型</el-button>
<el-button type="primary" round @click="batchDel">批量删除</el-button>
<el-button type="primary" round @click="batchOff(1)">批量禁用</el-button>
<el-button type="primary" round @click="batchOff(0)">批量开启</el-button>
</div>
</div>
<el-table :data="listData"
class="table"
ref="table"
stripe
header-align="center"
<el-table :data="listData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55"
align="center"></el-table-column>
<el-table-column type="index"
label="序号"
width="55"
align="center"></el-table-column>
<el-table-column prop="modelName"
label="模型名称"
align="center"></el-table-column>
<el-table-column v-if="isTopLevel"
prop="categoryName"
label="分类"
width="150"
align="center"></el-table-column>
<el-table-column prop="modifyName"
label="编辑人"
align="center">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column prop="modelName" label="模型名称" align="center"></el-table-column>
<el-table-column v-if="isTopLevel" prop="categoryName" label="分类" width="150" align="center"></el-table-column>
<el-table-column prop="modifyName" label="编辑人" align="center">
<template slot-scope="scope">
{{ scope.row.schoolName || scope.row.modifyName }}
</template>
</el-table-column>
<el-table-column prop="updateTime"
label="最新编辑时间"
width="150"
align="center"></el-table-column>
<el-table-column prop="workNumber"
label="状态"
width="100"
align="center">
<el-table-column prop="updateTime" label="最新编辑时间" width="150" align="center"></el-table-column>
<el-table-column prop="workNumber" label="状态" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.postStatus ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column label="操作"
width="260">
<el-table-column label="操作" width="260">
<template slot-scope="scope">
<el-button type="text"
@click="show(scope.row)">查看</el-button>
<el-button type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button type="text"
@click="del(scope.row)">删除</el-button>
<el-button v-if="isSchool"
type="text"
@click="copy(scope.row)">复制</el-button>
<el-switch v-if="scope.row.postStatus"
v-model="scope.row.ztOpen"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
:active-text="scope.row.ztOpen ? '禁用' : '启用'"
<el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button>
<el-button v-if="isSchool" type="text" @click="copy(scope.row)">复制</el-button>
<el-switch v-if="scope.row.postStatus" v-model="scope.row.ztOpen" :active-value="0" :inactive-value="1"
style="margin: 0 10px 0 5px" :active-text="scope.row.ztOpen ? '禁用' : '启用'"
@change="switchOff($event, scope.row, scope.$index)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:current-page="page"
@current-change="handleCurrentChange"
:total="total"></el-pagination>
<el-pagination background layout="total, prev, pager, next" :current-page="page"
@current-change="handleCurrentChange" :total="total"></el-pagination>
</div>
</div>
<el-dialog title="复制"
:visible.sync="copyVisible"
width="400px"
center
:close-on-click-modal="false">
<el-dialog title="复制" :visible.sync="copyVisible" width="400px" center :close-on-click-modal="false">
<el-form label-position="left">
<el-form-item label="模型名称">
<el-input placeholder="请输入模型名称"
v-model="curRow.modelName"
style="width: 280px"></el-input>
<el-input placeholder="请输入模型名称" v-model="curRow.modelName" style="width: 280px"></el-input>
</el-form-item>
<el-form-item label="模型分类">
<el-cascader :options="categories"
v-model="categoryIdCus"
:props="categoryProps"
clearable
<el-cascader :options="categories" v-model="categoryIdCus" :props="categoryProps" clearable
style="width: 280px">
</el-cascader>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="copyVisible = false"> </el-button>
<el-button type="primary"
@click="copySubmit"> </el-button>
<el-button type="primary" @click="copySubmit"> </el-button>
</span>
</el-dialog>
</div>
@ -336,17 +276,20 @@ export default {
.wrap {
display: flex;
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;
}
}
.el-input__inner {
height: 32px;
}

@ -1,28 +1,20 @@
<template>
<div ref="main"
class="main"
v-loading="loading">
<div ref="main" class="main" v-loading="loading">
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<el-page-header @back="back"
content="项目配置"></el-page-header>
<el-page-header @back="back" content="项目配置"></el-page-header>
<div v-if="!isDetail">
<el-button type="success"
:loading="submiting === 0"
<el-button type="success" :loading="submiting === 0"
@click="handleSubmit(0, projectManage.isOpen = 1, projectManage.ztOpen = 1)">保存为草稿
</el-button>
<el-button type="primary"
:loading="submiting === 1"
@click="handleSubmit(1)">确定并发布</el-button>
<el-button type="primary" :loading="submiting === 1" @click="handleSubmit(1)">确定并发布</el-button>
</div>
</div>
</el-card>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-center mgb20">
<p class="addhr_tag"></p>
<span>课程信息</span>
@ -33,26 +25,18 @@
<el-form label-width="80px">
<div style="display: flex">
<el-form-item label="项目名称">
<el-input :disabled="isDetail"
v-model.trim="projectManage.projectName"
placeholder="20个字符以内"
<el-input :disabled="isDetail" v-model.trim="projectManage.projectName" placeholder="20个字符以内"
@blur="projectNameExistis"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model.trim="projectManage.remark"
placeholder="20个字符以内"></el-input>
<el-input v-model.trim="projectManage.remark" placeholder="20个字符以内"></el-input>
</el-form-item>
<el-form-item label="项目用途">
<el-select :disabled="isDetail"
v-model="projectManage.permissions"
placeholder="请选择"
<el-select :disabled="isDetail" v-model="projectManage.permissions" placeholder="请选择"
@change="permissionChange">
<el-option label="练习"
:value="0"></el-option>
<el-option label="考核"
:value="1"></el-option>
<el-option label="竞赛"
:value="2"></el-option>
<el-option label="练习" :value="0"></el-option>
<el-option label="考核" :value="1"></el-option>
<el-option label="竞赛" :value="2"></el-option>
</el-select>
</el-form-item>
</div>
@ -60,8 +44,7 @@
</div>
</el-card>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-center mgb20">
<p class="addhr_tag"></p>
<span>实验目标</span>
@ -70,20 +53,14 @@
<div>
<el-form label-width="0">
<el-form-item>
<quill :border="true"
:readonly="isDetail"
v-model="projectManage.experimentTarget"
:type.sync="projectManage.experimentTargetType"
radio
:minHeight="150"
:height="150" />
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentTarget"
:type.sync="projectManage.experimentTargetType" radio :minHeight="150" :height="150" />
</el-form-item>
</el-form>
</div>
</el-card>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-center mgb20">
<p class="addhr_tag"></p>
<span>项目背景</span>
@ -92,30 +69,22 @@
<div>
<el-form label-width="0">
<el-form-item>
<quill :border="true"
:readonly="isDetail"
v-model="projectManage.experimentDescription"
:type.sync="projectManage.experimentDescriptionType"
radio
:minHeight="150"
:height="150"
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentDescription"
:type.sync="projectManage.experimentDescriptionType" radio :minHeight="150" :height="150"
:index="1" />
</el-form-item>
</el-form>
</div>
</el-card>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="addhr_tag"></p>
<span>实验任务</span>
</div>
<div>
<el-button :disabled="isDetail"
type="primary"
@click="toJudgePoint('home')">进入判分点
<el-button :disabled="isDetail" type="primary" @click="toJudgePoint('home')">进入判分点
</el-button>
</div>
</div>
@ -123,120 +92,67 @@
<div class="mgb20 flex-between">
<div class="flex-center">
<div class="m-r-20"
style="color: #f00">项目总分值100</div>
<div class="m-r-20" style="color: #f00">项目总分值100</div>
<!-- <div>权重&emsp;<div class="dib"><el-input></el-input></div></div> -->
</div>
<div>
<el-button :disabled="isDetail"
class="m-r-20"
type="text"
@click="avgDistributionScore">
<el-button :disabled="isDetail" class="m-r-20" type="text" @click="avgDistributionScore">
平均分配分值
</el-button>
<el-button :disabled="isDetail"
class="m-r-20"
type="text"
@click="manualDistributionScore">
<el-button :disabled="isDetail" class="m-r-20" type="text" @click="manualDistributionScore">
手动分配分值
</el-button>
<span>(待分配分值: {{ handDistributionScore }}/100)</span>
</div>
</div>
<el-button :disabled="isDetail"
type="primary"
icon="el-icon-plus"
round
@click="handleAddJudgment"
<el-button :disabled="isDetail" type="primary" icon="el-icon-plus" round @click="handleAddJudgment"
style="margin-bottom: 10px">判分点
</el-button>
<el-button :disabled="isDetail"
type="primary"
icon="el-icon-delete"
round
@click="batchDeleteProjectJudgment"
<el-button :disabled="isDetail" type="primary" icon="el-icon-delete" round @click="batchDeleteProjectJudgment"
style="margin-bottom: 10px">批量删除
</el-button>
<div class="draggable">
<u-table ref="projectJudgementTable"
:data="projectJudgmentData"
class="table"
stripe
header-align="center"
:use-virtual="isLc"
:max-height="600"
:row-height="60"
:border="false"
@selection-change="handleSelectionProjectJudgment"
row-key="judgmentId"
v-loading="listLoading">
<u-table-column type="selection"
width="55"
align="center"></u-table-column>
<u-table-column prop="sort"
label="序号"
width="80"
align="center">
<el-table ref="projectJudgementTable" :data="projectJudgmentData" class="table" header-align="center"
:use-virtual="isLc" :max-height="600" :row-height="60" :border="false"
@selection-change="handleSelectionProjectJudgment" row-key="judgmentId" v-loading="listLoading">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column prop="sort" label="序号" width="80" align="center">
<template slot-scope="scope">
{{ scope.row.sort }}
</template>
</u-table-column>
<u-table-column prop="name"
label="判分指标"
align="center"
show-overflow-tooltip
min-width="140"></u-table-column>
<u-table-column prop="name"
label="判分点名称"
align="center"
show-overflow-tooltip
min-width="140"></u-table-column>
<u-table-column label="实验要求"
align="center"
width="600">
</el-table-column>
<el-table-column prop="name" label="判分指标" align="center" show-overflow-tooltip
min-width="140"></el-table-column>
<el-table-column prop="name" label="判分点名称" align="center" show-overflow-tooltip
min-width="140"></el-table-column>
<el-table-column label="实验要求" align="center" width="600">
<template slot-scope="scope">
<quill :readonly="true"
elseRead="true"
v-model="scope.row.experimentalRequirements"
:index="2" />
<quill :readonly="true" elseRead="true" v-model="scope.row.experimentalRequirements" :index="2" />
</template>
</u-table-column>
<u-table-column prop="score"
label="分数"
align="center"
width="120">
</el-table-column>
<el-table-column prop="score" label="分数" align="center" width="120">
<template slot-scope="scope">
<el-input :disabled="isDetail"
:key="scope.$index"
type="number"
step="0.1"
<el-input :disabled="isDetail" :key="scope.$index" type="number" step="0.1"
v-model.trim="scope.row.score"></el-input>
<!--
@input="scoreChange(scope.row, scope.$index)" -->
</template>
</u-table-column>
<u-table-column label="操作"
width="140"
align="center">
</el-table-column>
<el-table-column label="操作" width="140" align="center">
<template slot-scope="scope">
<el-button :disabled="isDetail"
type="text"
style="margin-right: 10px"
<el-button :disabled="isDetail" type="text" style="margin-right: 10px"
@click="toJudgePoint('edit', scope.row)">自定义</el-button>
<el-button :disabled="isDetail"
type="text"
@click="delJudgePoint(scope.$index)">
<el-button :disabled="isDetail" type="text" @click="delJudgePoint(scope.$index)">
删除
</el-button>
</template>
</u-table-column>
</u-table>
</el-table-column>
</el-table>
</div>
</el-card>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="addhr_tag"></p>
@ -244,25 +160,16 @@
</div>
<div>
启用
<el-switch :disabled="isDetail"
:active-value="0"
:inactive-value="1"
<el-switch :disabled="isDetail" :active-value="0" :inactive-value="1"
v-model="projectManage.hintOpen"></el-switch>
</div>
</div>
<div class="border-b-dashed"></div>
<div>
<el-form label-width="0">
<el-form-item prop="tips"
label="">
<quill :border="true"
:readonly="isDetail"
v-model="projectManage.experimentHint"
:type.sync="projectManage.experimentHintType"
radio
:minHeight="150"
:height="400"
:index="3" />
<el-form-item prop="tips" label="">
<quill :border="true" :readonly="isDetail" v-model="projectManage.experimentHint"
:type.sync="projectManage.experimentHintType" radio :minHeight="150" :height="400" :index="3" />
</el-form-item>
</el-form>
</div>
@ -271,62 +178,34 @@
</el-row>
<!--选择判分点对话框-->
<el-dialog title="添加判分点"
:visible.sync="dialogVisible"
width="40%"
:close-on-click-modal="false"
<el-dialog title="添加判分点" :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false"
@close="closeJudgment">
<div class="text-right mgb10">
<div>
<el-input placeholder="请输入需要查找的判分点"
prefix-icon="el-icon-search"
v-model.trim="judgementpointsquery"
<el-input placeholder="请输入需要查找的判分点" prefix-icon="el-icon-search" v-model.trim="judgementpointsquery"
clearable></el-input>
</div>
</div>
<u-table v-loading="visibleLoading"
:data="judgementData"
ref="judgementTable"
class="table"
stripe
header-align="center"
use-virtual
:row-height="45"
:max-height="400"
:border="false"
@selection-change="handleSelectionJudgment"
:row-key="rowKey">
<u-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></u-table-column>
<u-table-column prop="id"
label="序号"
align="center"
width="100">
<el-table v-loading="visibleLoading" :data="judgementData" ref="judgementTable" class="table"
header-align="center" use-virtual :row-height="45" :max-height="400" :border="false"
@selection-change="handleSelectionJudgment" :row-key="rowKey">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column prop="id" label="序号" align="center" width="100">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</u-table-column>
<u-table-column prop="name"
label="判分点名称"
align="center"></u-table-column>
<u-table-column label="操作"
align="center"
width="100">
</el-table-column>
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button size="mini"
@click="toJudgePoint('view', scope.row)">查看</el-button>
<el-button size="mini" @click="toJudgePoint('view', scope.row)">查看</el-button>
</template>
</u-table-column>
</u-table>
<div slot="footer"
class="dialog-footer">
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="closeJudgment"> </el-button>
<el-button type="primary"
:loading="savingJud"
@click="saveJudgment"> </el-button>
<el-button type="primary" :loading="savingJud" @click="saveJudgment"> </el-button>
</div>
</el-dialog>
</div>
@ -440,6 +319,8 @@ export default {
if (this.$route.query.projectId) {
this.projectId = this.$route.query.projectId;
this.getInfoData();
} else {
this.rowDrop()
}
//
if (JSON.stringify(this.projectFields) != "{}") {
@ -447,7 +328,6 @@ export default {
this.projectManage = projectManage;
this.projectJudgmentData = projectJudgmentData;
}
this.rowDrop();
this.$refs.main.scrollTop = 0;
},
beforeDestroy () {
@ -482,6 +362,7 @@ export default {
this.$nextTick(() => {
this.updateTime = 0
this.$refs.main.scrollTop = 0;
this.rowDrop();
});
}).catch(err => {
this.loading = false
@ -785,24 +666,16 @@ export default {
//
rowDrop () {
//
const tbody = document.querySelector(".draggable .el-table__body-wrapper tbody");
const _this = this;
Sortable.create(tbody, {
const tbody = document.querySelector(".el-table__body tbody");
const that = this;
this.$refs.projectJudgementTable && Sortable.create(tbody, {
//
draggable: ".draggable .el-table__row",
onEnd ({ newIndex, oldIndex }) {
// : vue$nextTick
_this.projectJudgmentData.splice(newIndex, 0, _this.projectJudgmentData.splice(oldIndex, 1)[0]);
let newArray = _this.projectJudgmentData.slice(0);
_this.projectJudgmentData = [];
_this.$nextTick(function () {
newArray.forEach((e, i) => {
_this.$set(e, "sort", i + 1);//
_this.$set(e, "name", e.name + "?");
_this.$set(e, "name", e.name.slice(0, e.name.length - 1)); //
});
_this.projectJudgmentData = newArray;
});
// draggable: ".draggable .el-table__row",
onUpdate ({ newIndex, oldIndex }) {
console.log("🚀 ~ onEnd ~ newIndex, oldIndex:", newIndex, oldIndex)
if (newIndex == oldIndex) return false
const currentRow = that.projectJudgmentData.splice(oldIndex, 1)[0]
that.projectJudgmentData.splice(newIndex, 0, currentRow)
}
});
},
@ -846,8 +719,8 @@ export default {
},
toJudgePoint (type, row) { //
this.handleCacheData();
let jumpPath = Setting.jumpPath;
let { systemId } = this.projectManage;
const { jumpPath } = Setting
let { systemId } = this.projectManage
let href = "";
if (type === "view") {
//
@ -915,6 +788,7 @@ export default {
padding: 0;
border-bottom: 0;
}
.main {
overflow: auto;
overflow-x: hidden;

@ -1,14 +1,10 @@
<template>
<div>
<el-card v-if="showBack"
shadow="hover"
class="mgb20">
<el-page-header :content="'实验项目管理 / '+titleName"
@back="back"></el-page-header>
<el-card shadow="hover" class="mgb20">
<el-page-header :content="'实验项目管理 / ' + titleName" @back="back"></el-page-header>
</el-card>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
@ -19,47 +15,31 @@
<el-form label-width="80px">
<el-col :span="4">
<el-form-item label="来源">
<el-select v-model="form.founder"
clearable
placeholder="请选择创建人"
@change="initData">
<el-option v-for="(item,index) in founderList"
:key="index"
:label="item.label"
<el-select v-model="form.founder" clearable placeholder="请选择创建人" @change="initData">
<el-option v-for="(item, index) in founderList" :key="index" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态">
<el-select v-model="form.state"
clearable
placeholder="请选择状态"
@change="initData">
<el-option v-for="(item,index) in stateList"
:key="index"
:label="item.label"
<el-select v-model="form.state" clearable placeholder="请选择状态" @change="initData">
<el-option v-for="(item, index) in stateList" :key="index" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="用途">
<el-select v-model="form.permissions"
placeholder="请选择"
@change="initData">
<el-option v-for="item in permissionsList"
:key="item.value"
:label="item.label"
<el-select v-model="form.permissions" placeholder="请选择" @change="initData">
<el-option v-for="item in permissionsList" :key="item.value" :label="item.label"
: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.projectName"
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="form.projectName"
clearable></el-input>
</el-form-item>
</el-col>
@ -67,129 +47,77 @@
</div>
</el-card>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>项目列表</span>
</div>
<div>
<el-button type="primary"
round
@click="add"
class="mag">新增项目</el-button>
<el-button type="primary"
round
@click="delAllData">批量删除</el-button>
<el-button type="primary" round @click="add" class="mag">新增项目</el-button>
<el-button type="primary" round @click="delAllData">批量删除</el-button>
</div>
</div>
<el-table :data="list"
class="table"
ref="table"
stripe
header-align="center"
row-key="projectId"
<el-table v-loading="loading" :data="list" class="table" ref="table" header-align="center" row-key="projectId"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55"
align="center"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<el-table-column type="selection" width="55" align="center"></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="projectName"
label="实验项目名称"
min-width="400"
align="center"></el-table-column>
<el-table-column prop="founder"
label="来源"
min-width="150"
align="center">
<el-table-column prop="projectName" label="实验项目名称" min-width="400" align="center"></el-table-column>
<el-table-column prop="founder" label="来源" min-width="150" align="center">
<template slot-scope="scope">
{{ founderKeys[scope.row.founder] }}
</template>
</el-table-column>
<el-table-column prop="creator"
label="创建人"
min-width="140"
align="center">
<el-table-column prop="creator" label="创建人" min-width="140" align="center">
<template slot-scope="scope">
{{ form.founder == 1 ? scope.row.schoolName : scope.row.creator }}
</template>
</el-table-column>
<el-table-column label="用途"
min-width="120"
align="center">
<el-table-column label="用途" min-width="120" align="center">
<template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }}
</template>
</el-table-column>
<el-table-column prop="createTime"
label="创建时间"
min-width="150"
align="center"></el-table-column>
<el-table-column prop="status"
label="状态"
min-width="100"
align="center">
<el-table-column prop="createTime" label="创建时间" min-width="150" align="center"></el-table-column>
<el-table-column prop="status" label="状态" min-width="100" align="center">
<template slot-scope="scope">
{{ stateKeys[scope.row.state] }}
</template>
</el-table-column>
<el-table-column label="操作"
width="300"
align="center">
<el-table-column label="操作" width="300" align="center">
<template slot-scope="scope">
<el-button type="text"
@click="edit(scope.row)">
<el-button type="text" @click="edit(scope.row)">
编辑
</el-button>
<el-button type="text"
@click="handleDelete(scope.row.projectId)">
<el-button type="text" @click="handleDelete(scope.row.projectId)">
删除
</el-button>
<el-button type="text"
@click="copyData(scope.row.projectId)">复制</el-button>
<el-switch v-if="scope.row.state"
v-model="scope.row.ztOpen"
:active-text="scope.row.ztOpen ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
<el-button type="text" @click="copyData(scope.row.projectId)">复制</el-button>
<el-switch v-if="scope.row.state" v-model="scope.row.ztOpen" :active-text="scope.row.ztOpen ? '关闭' : '启用'"
:active-value="0" :inactive-value="1" style="margin: 0 10px 0 10px"
@change="switchOff(scope.row)"></el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="handleCurrentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
<el-pagination background @current-change="handleCurrentChange" :current-page="page"
layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</el-card>
<!--复制对话框-->
<el-dialog title="复制"
:visible.sync="copyVisible"
width="24%"
center
:close-on-click-modal="false">
<el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false">
<el-form>
<el-form-item>
<!--前端不用做名称判重了@change='projectNameExistis'-->
<el-input placeholder="请输入项目名称"
v-model="projectName"></el-input>
<el-input placeholder="请输入项目名称" v-model="projectName"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="copyVisible = false"> </el-button>
<el-button type="primary"
@click="copySubmit"> </el-button>
<el-button type="primary" @click="copySubmit"> </el-button>
</span>
</el-dialog>
</div>
@ -200,7 +128,7 @@ import qs from 'qs'
export default {
data () {
return {
showBack: Boolean(this.$route.query.show),
fromCustom: Boolean(this.$route.query.custom), //
systemId: this.$route.query.systemId,
titleName: this.$route.query.name,
form: {
@ -267,7 +195,8 @@ export default {
copyVisible: false,
projectName: '',
currentRow: {}, //
listDataAll: []
listDataAll: [],
loading: false,
};
},
watch: {
@ -287,17 +216,20 @@ export default {
this.getData();
},
methods: {
getData () {
let data = {
async getData () {
try {
this.loading = true
const { data } = await this.$post(this.api.queryProjectManage, {
...this.form,
pageNum: this.page,
pageSize: this.pageSize,
systemId: this.systemId
};
this.$post(this.api.queryProjectManage, data).then(res => {
this.list = res.data.records;
this.total = res.data.total;
}).catch(err => { });
})
this.list = data.records
this.total = data.total
} finally {
this.loading = false
}
},
initData () {
this.page = 1;
@ -415,29 +347,31 @@ export default {
this.$message.warning("该项目名称已存在");
return;
}
this.currentRow.projectManage.projectName = this.projectName;
this.currentRow.projectManage.projectId = "";
this.currentRow.projectManage.founder = 0
this.currentRow.projectJudgmentList.forEach(i => {
i.projectId = "";
});
const data = this.currentRow
data.projectManage.projectName = this.projectName;
data.projectManage.projectId = ''
data.projectManage.createTime = ''
data.projectManage.updateTime = ''
data.projectManage.founder = 0
data.projectJudgmentList.forEach(i => {
i.projectId = ''
})
this.$post(`${this.api.copyProjectManage}`, this.currentRow).then(res => {
if (res.status === 200) {
this.form.founder = 0
this.initData();
this.$message.success("复制实验项目成功");
this.copyVisible = false;
this.initData()
this.$message.success("复制实验项目成功")
this.copyVisible = false
} else {
this.$message.error(res.message);
this.$message.error(res.message)
}
}).catch(err => { });
}).catch(err => { })
},
back () { //
this.$router.push(this.$store.state.referrer || '/configure')
this.fromCustom ? this.$router.back() : this.$router.push(this.$store.state.referrer || '/configure')
}
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -3,14 +3,8 @@
<div class="header">
<el-avatar :size="80" :src="avatar" class="Headtop"></el-avatar>
<div style="color:#9278FF;font-size:14px;font-family:MicrosoftYaHei;margin-top:5px;">
<el-upload
class="upload-demo"
:headers="{token}"
:action="this.api.updateUserAvatars"
name="file"
:limit="1"
:on-success="getRes"
>
<el-upload class="upload-demo" :headers="{ token }" :action="this.api.updateUserAvatars" name="file" :limit="1"
:on-success="getRes">
<div>点击更改头像</div>
</el-upload>
</div>
@ -32,16 +26,9 @@
</div>
<div class="item">
<span>所在国家</span>
<el-select
v-model="form.countries"
placeholder
>
<el-option
v-for="item in countryList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-select v-model="form.countries" placeholder>
<el-option v-for="item in countryList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
</div>
@ -56,40 +43,17 @@
<div class="item">
<span>所在地</span>
<div class="selects">
<el-select
v-model="form.countries"
placeholder
>
<el-option
v-for="item in countryList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-select v-model="form.countries" placeholder>
<el-option v-for="item in countryList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
<el-select
v-model="form.provinceId"
placeholder
@change="id => getCity(id,1)"
>
<el-option
v-for="item in provinceList"
:key="item.provinceId"
:label="item.provinceName"
:value="item.provinceId"
></el-option>
<el-select v-model="form.provinceId" placeholder @change="id => getCity(id, 1)">
<el-option v-for="item in provinceList" :key="item.provinceId" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
<el-select
v-model="form.cityId"
placeholder
:disabled="form.provinceId ? false : true"
>
<el-option
v-for="item in cityList"
:key="item.cityId"
:label="item.cityName"
:value="item.cityId"
></el-option>
<el-select v-model="form.cityId" placeholder :disabled="form.provinceId ? false : true">
<el-option v-for="item in cityList" :key="item.cityId" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</div>
</div>
@ -97,46 +61,28 @@
<div class="line">
<div class="item">
<span>出生年月日</span>
<el-date-picker
v-model="form.dateBirth"
:clearable="false"
class="block-right"
type="date">
<el-date-picker v-model="form.dateBirth" :clearable="false" class="block-right" type="date">
</el-date-picker>
</div>
<div class="item">
<span>证件</span>
<input onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" id="idnumber" class="idnumber" placeholder="请输入证件" type="text" v-model="form.idNumber"/>
<input onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" id="idnumber" class="idnumber" placeholder="请输入证件"
type="text" v-model="form.idNumber" />
</div>
</div>
<div class="line">
<div class="item">
<span>教育程度</span>
<el-select
v-model="form.educationDegree"
placeholder="请选择教育程度"
>
<el-option
v-for="(item,index) in educationDegreeList"
:key="index"
:label="item.name"
:value="item.value"
></el-option>
<el-select v-model="form.educationDegree" placeholder="请选择教育程度">
<el-option v-for="(item, index) in educationDegreeList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</div>
<div class="item">
<span>所在学校</span>
<el-select
v-model="form.schoolId"
filterable
placeholder="请选择所在学校"
>
<el-option
v-for="item in schoolList"
:key="item.value"
:label="item.schoolName"
:value="item.schoolId"
></el-option>
<el-select v-model="form.schoolId" filterable placeholder="请选择所在学校">
<el-option v-for="item in schoolList" :key="item.value" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</div>
</div>
@ -176,99 +122,53 @@
<div class="line">
<div class="item">
<span>职业</span>
<el-select
v-model="archive.personalCareerId"
placeholder="选择职业"
>
<el-option
v-for="item in occupationList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-select v-model="archive.personalCareerId" placeholder="选择职业">
<el-option v-for="item in occupationList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
<div class="item">
<span>国家</span>
<el-select
v-model="form.countries"
placeholder
>
<el-option
v-for="item in countryList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-select v-model="form.countries" placeholder>
<el-option v-for="item in countryList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
</div>
<div class="line">
<div class="item">
<span>学校名称</span>
<el-select
v-model="archive.schoolId"
filterable
placeholder="选择学校"
@change="id => getSchoolName(id,index)"
>
<el-option
v-for="item in schoolList"
:key="item.value"
:label="item.schoolName"
:value="item.schoolId"
></el-option>
<el-select v-model="archive.schoolId" filterable placeholder="选择学校"
@change="id => getSchoolName(id, index)">
<el-option v-for="item in schoolList" :key="item.value" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</div>
<div class="item">
<span>专业学科</span>
<el-select
v-model="archive.disciplineId"
placeholder="选择专业学科"
@change="id => getItemProfessionalClass(id,index)"
@clear="() => clearItemClass(index)"
>
<el-option
v-for="item in subjectList"
:key="item.value"
:label="item.disciplineName"
:value="item.disciplineId"
></el-option>
<el-select v-model="archive.disciplineId" placeholder="选择专业学科"
@change="id => getItemProfessionalClass(id, index)" @clear="() => clearItemClass(index)">
<el-option v-for="item in subjectList" :key="item.value" :label="item.disciplineName"
:value="item.disciplineId"></el-option>
</el-select>
</div>
</div>
<div class="line">
<div class="item">
<span>专业类</span>
<el-select
v-model="archive.professionalClassId"
placeholder="选择专业类"
:disabled="archive.disciplineId ? false : true"
@change="id => getItemProfessional(id,index)"
@clear="() => clearItemProfess(index)"
>
<el-option
v-for="item in archive.ProfessionalClassList"
:key="item.professionalClassId"
:label="item.professionalClassName"
:value="item.professionalClassId"
></el-option>
<el-select v-model="archive.professionalClassId" placeholder="选择专业类"
:disabled="archive.disciplineId ? false : true" @change="id => getItemProfessional(id, index)"
@clear="() => clearItemProfess(index)">
<el-option v-for="item in archive.ProfessionalClassList" :key="item.professionalClassId"
:label="item.professionalClassName" :value="item.professionalClassId"></el-option>
</el-select>
</div>
<div class="item">
<span>专业</span>
<el-select
v-model="archive.professionalId"
placeholder="选择专业"
:disabled="archive.professionalClassId ? false : true"
@change="getItemStuGrade"
>
<el-option
v-for="item in archive.ProfessionalList"
:key="item.professionalId"
:label="item.professionalName"
:value="item.professionalId"
></el-option>
<el-select v-model="archive.professionalId" placeholder="选择专业"
:disabled="archive.professionalClassId ? false : true" @change="getItemStuGrade">
<el-option v-for="item in archive.ProfessionalList" :key="item.professionalId"
:label="item.professionalName" :value="item.professionalId"></el-option>
</el-select>
</div>
</div>
@ -276,7 +176,8 @@
</div>
<div class="fold" v-if="archivesList.length > 1">
<img :class="{ 'arrowTransform': showArch, 'arrowTransformReturn': !showArch}" style="width: 21px;height: 17px;" src="../../assets/img/person/open.png" alt="" @click="foldArch">
<img :class="{ 'arrowTransform': showArch, 'arrowTransformReturn': !showArch }" style="width: 21px;height: 17px;"
src="../../assets/img/person/open.png" alt="" @click="foldArch">
</div>
</div>
@ -288,12 +189,7 @@
<div class="line">
<div class="item">
<span>用户账号</span>
<input
id="account"
type="text"
class="username" placeholder="请输入用户账号"
v-model="form.account"
/>
<input id="account" type="text" class="username" placeholder="请输入用户账号" v-model="form.account" />
</div>
<div class="item">
<span>密码</span>
@ -306,12 +202,8 @@
</div>
</div>
<el-dialog
:title="form.email ? '更换邮箱' : '绑定邮箱'"
:visible.sync="emailVisible"
:close-on-click-modal="false"
@close="closeEmail"
width="30%">
<el-dialog :title="form.email ? '更换邮箱' : '绑定邮箱'" :visible.sync="emailVisible" :close-on-click-modal="false"
@close="closeEmail" width="30%">
<el-form ref="form" :model="form" label-width="60px">
<el-form-item label="邮箱">
<el-input placeholder="请输入邮箱" v-model="email"></el-input>
@ -319,7 +211,8 @@
<el-form-item label="验证码">
<div class="flex-between">
<el-input v-model="emailCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left: 10px" type="text" @click="sendEmailCode" :disabled="emailDisabled">{{emailBtnText}}</el-button>
<el-button style="margin-left: 10px" type="text" @click="sendEmailCode"
:disabled="emailDisabled">{{ emailBtnText }}</el-button>
</div>
</el-form-item>
</el-form>
@ -329,12 +222,8 @@
</span>
</el-dialog>
<el-dialog
:title="form.phone ? '更换手机号' : '绑定手机号'"
:visible.sync="phoneVisible"
:close-on-click-modal="false"
@close="closePhone"
width="30%">
<el-dialog :title="form.phone ? '更换手机号' : '绑定手机号'" :visible.sync="phoneVisible" :close-on-click-modal="false"
@close="closePhone" width="30%">
<el-form ref="form" :model="form" label-width="60px">
<el-form-item label="手机号">
<el-input placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input>
@ -342,7 +231,8 @@
<el-form-item label="验证码">
<div class="flex-between">
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="margin-left: 10px" type="text" @click="sendPhoneCode" :disabled="phoneDisabled">{{phoneBtnText}}</el-button>
<el-button style="margin-left: 10px" type="text" @click="sendPhoneCode"
:disabled="phoneDisabled">{{ phoneBtnText }}</el-button>
</div>
</el-form-item>
</el-form>
@ -352,21 +242,19 @@
</span>
</el-dialog>
<el-dialog
title="更换密码"
:visible.sync="passwordVisible"
:close-on-click-modal="false"
@close="closePassword"
<el-dialog title="更换密码" :visible.sync="passwordVisible" :close-on-click-modal="false" @close="closePassword"
width="30%">
<el-form ref="passwordForm" :model="form" label-width="60px">
<el-form-item label="原密码">
<el-input type="password" v-model="passwordForm.password" placeholder="请输入原密码"></el-input>
</el-form-item>
<el-form-item label="新密码">
<el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input>
<el-input type="password" v-model="passwordForm.newPassword" placeholder="请输入新密码"
@keyup.enter.native="editPassword"></el-input>
</el-form-item>
<el-form-item label="新密码">
<el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input>
<el-input type="password" v-model="passwordForm.reNewPassword" placeholder="请确认新密码"
@keyup.enter.native="editPassword"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -1003,11 +891,13 @@ export default {
transform-origin: center;
transform: rotateZ(180deg);
}
.arrowTransformReturn {
transition: 0.5s;
transform-origin: center;
transform: rotateZ(0deg);
}
.wrap {
padding-top: 170px;
overflow: auto;
@ -1018,10 +908,12 @@ export default {
background: #f6f6f6 url(../../assets/img/person/bg.png) 0 0/100% 500px no-repeat;
box-sizing: border-box;
}
.header {
z-index: 2;
background-color: transparent;
}
.header /deep/.el-upload-list__item-name {
display: none;
}
@ -1033,6 +925,7 @@ export default {
.header /deep/.el-upload-list__item-status-label {
display: none;
}
.header /deep/ .el-upload-list {
display: none;
}
@ -1040,15 +933,19 @@ export default {
/deep/.el-input__inner {
height: 32px !important;
}
/deep/.el-select .el-input .el-select__caret {
line-height: 32px;
}
input:focus {
outline: 0;
}
.openfile {
cursor: pointer;
}
.Headtop {
margin-top: 10px;
// width: 80px;
@ -1066,6 +963,7 @@ input:focus {
flex-direction: column;
justify-content: center;
position: relative;
.eee {
height: 10px;
width: 16px;
@ -1075,17 +973,19 @@ input:focus {
top: 8px;
z-index: 2;
}
.Semicircle {
width: 12px;
height: 12px;
border: 2px solid #9278ff;
border: 2px solid #062c87;
border-radius: 50px;
margin-bottom: 10px;
position: absolute;
}
}
.body {
color: #9278ff;
color: #062c87;
width: 30px;
height: 20px;
border: 3px solid #f5f5f5;
@ -1093,12 +993,13 @@ input:focus {
margin-top: 5px;
margin-bottom: -10px;
}
.body::after {
content: '';
width: 40px;
height: 30px;
display: inline-block;
background-color: #9278ff;
background-color: #062c87;
margin-top: 8px;
margin-left: -6px;
}
@ -1113,12 +1014,14 @@ input:focus {
border-radius: 4px;
position: relative;
box-sizing: border-box;
.block-title {
span {
display: inline-flex;
align-items: center;
color: #444;
font-size: 18px;
img {
width: 20px;
margin-right: 5px;
@ -1126,45 +1029,54 @@ input:focus {
}
}
.meta-title {
padding-left: 6px;
margin: 20px 0 10px 0;
line-height: 1;
border-left: 4px solid #9278ff;
border-left: 4px solid #062c87;
span {
font-size: 16px;
color: #9278ff;
color: #062c87;
}
/deep/ .el-button {
padding: 0 0;
font-size: 16px;
color: #9278ff;
color: #062c87;
}
}
.el-icon-document {
color: #9278ff;
color: #062c87;
font-size: 30px;
}
.el-icon-collection {
color: #9278ff;
color: #062c87;
position: absolute;
left: 31px;
top: 31px;
font-size: 30px;
}
span {
color: #333333;
font-size: 20px;
}
.plus {
display: flex;
justify-content: space-between;
i {
font-size: 22px;
color: #21d749;
cursor: pointer;
}
}
.information {
.archives {
padding: 15px;
@ -1172,15 +1084,18 @@ input:focus {
border: 1px dashed #c9c9c9;
border-radius: 8px;
}
.line {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
.item {
display: inline-flex;
align-items: center;
margin-bottom: 20px;
span {
width: 90px;
margin-right: 15px;
@ -1189,30 +1104,35 @@ input:focus {
color: #656565;
white-space: nowrap;
}
.username {
background: url('~@/assets/img/person/edit.png') no-repeat 10px center;
background-size: 16px 15px;
background-position: 98% 50%;
box-sizing: border-box;
}
.idnumber {
background: url('~@/assets/img/person/idcard.png') no-repeat 10px center;
background-size: 20px 16px;
background-position: 98% 50%;
box-sizing: border-box;
}
.school {
background: url('~@/assets/img/person/school.png') no-repeat;
background-size: 22px 17px;
background-position: 98% 50%;
box-sizing: border-box;
}
.weChat {
background: url('~@/assets/img/person/bind.png') no-repeat;
background-size: 19px 18px;
background-position: 98% 50%;
box-sizing: border-box;
}
input {
height: 36px;
width: 260px;
@ -1222,42 +1142,54 @@ input:focus {
outline: none;
padding-left: 15px;
}
.read {
width: 260px;
color: #727272;
}
.el-select,.btns{
.el-select,
.btns {
width: 260px;
}
.btns {
display: inline-flex;
align-items: center;
border-bottom: 1px solid #b5b5b5;
padding: 5px 0;
}
.selects {
display: inline-flex;
align-items: center;
width: 260px;
.el-select {
width: 100px;
font-size: 12px;
&:first-child {
width: 82px;
}
}
}
}
/deep/.el-date-editor {
width: 260px;
}
/deep/.el-date-editor .el-input__prefix {
line-height: 32px;
}
/deep/.el-input__prefix,/deep/.el-input__suffix{
/deep/.el-input__prefix,
/deep/.el-input__suffix {
left: auto;
right: 0;
}
/deep/.el-input__inner {
color: #656565;
font-size: 14px;
@ -1265,13 +1197,17 @@ input:focus {
border: 0px;
border-bottom: 1px solid #b5b5b5;
}
/deep/.el-input--prefix .el-input__inner {
padding-left: 15px;
}
/deep/.el-input__icon {
color: #9278ff;
color: #062c87;
&.el-icon-date {
font-size: 14px;
&:before {
content: "";
background: url('~@/assets/img/person/date.png') center center no-repeat;
@ -1284,6 +1220,7 @@ input:focus {
}
}
}
/deep/.el-icon-arrow-up:before {
content: "";
background: url('~@/assets/img/person/select.png') center center no-repeat;
@ -1296,34 +1233,43 @@ input:focus {
}
}
}
.fold {
margin-top: 20px;
text-align: center;
i {
font-size: 22px;
color: #8e8e8e;
cursor: pointer;
&:hover {
opacity: .8;
}
}
}
.sexRadio /deep/ .el-radio__input.is-checked .el-radio__inner {
border-color: #9278ff;
background: #9278ff;
border-color: #062c87;
background: #062c87;
}
.sexRadio /deep/ .el-radio__input.is-checked+.el-radio__label {
color: #9278ff;
color: #062c87;
}
.sexRadio /deep/ .el-radio__inner:hover {
border-color: #9278ff;
border-color: #062c87;
}
/deep/ input::-webkit-input-placeholder {
color: #c0c0c0;
}
/deep/ input::-moz-input-placeholder {
color: #c0c0c0;
}
/deep/ input::-ms-input-placeholder {
color: #c0c0c0;
}

@ -3,31 +3,22 @@
<div class="left">
<div class="inner">
<div class="text-center">
<img :src="$store.state.avatar"
class="avatar" />
<el-upload :headers="{token}"
:action="this.api.updateUserAvatars"
name="file"
:limit="10"
:show-file-list="false"
:on-success="changeAvatar">
<el-button type="text"
size="small">点击更换头像</el-button>
<img :src="$store.state.avatar" class="avatar" />
<el-upload :headers="{ token }" :action="this.api.updateUserAvatars" name="file" :limit="10"
:show-file-list="false" :on-success="changeAvatar">
<el-button type="text" size="small">点击更换头像</el-button>
</el-upload>
</div>
<ul class="menu">
<li v-for="item in typeList"
:key="item.index"
:class="{active: item.index == active}">
<li v-for="item in typeList" :key="item.index" :class="{ active: item.index == active }">
{{ item.title }}
</li>
</ul>
</div>
</div>
<div class="right">
<info ref="info"
@updateStatus="updateStatus"></info>
<info ref="info" @updateStatus="updateStatus"></info>
</div>
</div>
</template>
@ -95,37 +86,45 @@ export default {
width: 1280px;
margin: 0 auto;
background-color: #f3f6fa;
.text-center {
text-align: center;
}
.left {
margin-right: 12px;
background-color: #fff;
box-shadow: 2px 0px 6px 0px #eeeeee;
.inner {
width: 170px;
padding: 20px 0;
}
.avatar {
width: 80px;
height: 80px;
border-radius: 50%;
}
.menu {
margin-top: 32px;
li {
padding: 0 20px;
color: #303133;
font-size: 14px;
line-height: 38px;
cursor: pointer;
&.active {
color: #fff;
background-color: #9278ff;
background-color: #062c87;
}
}
}
}
.right {
flex: 1;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save