工作台及头部导航、主题色更改

dev_202412
yujialong 2 months ago
parent 801c4683a9
commit 36c1a45fe2
  1. 4
      src/App.vue
  2. 28
      src/assets/css/color-dark.css
  3. 7
      src/assets/css/default/index.scss
  4. 8
      src/assets/css/main.css
  5. 29
      src/assets/css/theme-green/color-green.css
  6. BIN
      src/assets/css/theme-green/fonts/element-icons.ttf
  7. BIN
      src/assets/css/theme-green/fonts/element-icons.woff
  8. 1
      src/assets/css/theme-green/index.css
  9. BIN
      src/assets/img/workbench/1.png
  10. BIN
      src/assets/img/workbench/10.png
  11. BIN
      src/assets/img/workbench/11.png
  12. BIN
      src/assets/img/workbench/12.png
  13. BIN
      src/assets/img/workbench/13.png
  14. BIN
      src/assets/img/workbench/14.png
  15. BIN
      src/assets/img/workbench/15.png
  16. BIN
      src/assets/img/workbench/2.png
  17. BIN
      src/assets/img/workbench/3.png
  18. BIN
      src/assets/img/workbench/4.png
  19. BIN
      src/assets/img/workbench/5.png
  20. BIN
      src/assets/img/workbench/6.png
  21. BIN
      src/assets/img/workbench/7.png
  22. BIN
      src/assets/img/workbench/8.png
  23. BIN
      src/assets/img/workbench/9.png
  24. 101
      src/components/Sidebar.vue
  25. 17
      src/main.js
  26. 12
      src/router/index.js
  27. 4
      src/setting.js
  28. 3
      src/utils/api.js
  29. 4
      src/views/customer/AddCustomer.vue
  30. 39
      src/views/information/contentManage/index.vue
  31. 51
      src/views/information/list/index.vue
  32. 251
      src/views/market/index.vue
  33. 2
      src/views/order/AddOrder.vue
  34. 592
      src/views/parnerOperation/learnMg.vue
  35. 433
      src/views/parnerOperation/schemeSet.vue
  36. 2468
      src/views/setting/Person.vue
  37. 99
      src/views/setting/index.vue
  38. 5
      src/views/shop/add.vue
  39. 199
      src/views/shop/list.vue
  40. 55
      src/views/shop/list/index.vue
  41. 314
      src/views/shop/list/market/index.vue
  42. 2
      src/views/theoryExam/list/system.vue
  43. 2
      src/views/user/AddUser.vue
  44. 217
      src/views/workbench/index.vue

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

@ -90,7 +90,7 @@ li {
line-height: 1; line-height: 1;
font-size: 14px; font-size: 14px;
color: #585858; color: #585858;
border-left: 3px solid #9278ff; border-left: 3px solid #062c87;
} }
.el-upload-list { .el-upload-list {
width: 100%; width: 100%;
@ -154,7 +154,7 @@ li {
border-radius: 2px; border-radius: 2px;
} }
.tabs .item.active:after { .tabs .item.active:after {
border-bottom-color: #9278ff; border-bottom-color: #062c87;
} }
.crumbs { .crumbs {
@ -329,7 +329,7 @@ li {
color: #fff; color: #fff;
} }
#app .el-table th { #app .el-table th {
background-color: #9278ff !important; background-color: #062c87 !important;
font-size: 16px; font-size: 16px;
font-weight: normal; font-weight: normal;
} }
@ -378,7 +378,7 @@ li {
} }
.hr_tag { .hr_tag {
background-color: #9278ff; background-color: #062c87;
width: 3px; width: 3px;
height: 15px; height: 15px;
margin-right: 5px; margin-right: 5px;

@ -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

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: 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

@ -1,12 +1,12 @@
<template> <template>
<div> <div class="menus">
<el-menu class="sidebar-el-menu" :default-active="onRoutes" background-color="#324157" text-color="#bfcbd9" <el-menu class="sidebar" :default-active="onRoutes" background-color="#062c87" text-color="#fff"
active-text-color="#9278FF" unique-opened mode="horizontal" router @select="handleSelect"> active-text-color="#333" unique-opened mode="horizontal" router @select="handleSelect">
<template v-for="item in menus"> <template v-for="item in menus">
<template v-if="item.subs"> <template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index"> <el-submenu :index="item.index" :key="item.index">
<template slot="title"> <template slot="title">
<i :class="item.icon"></i> <!-- <i :class="item.icon"></i> -->
<span slot="title">{{ item.title }}</span> <span slot="title">{{ item.title }}</span>
</template> </template>
<template v-for="subItem in item.subs"> <template v-for="subItem in item.subs">
@ -22,7 +22,7 @@
</template> </template>
<template v-else> <template v-else>
<el-menu-item :index="item.index" :key="item.index"> <el-menu-item :index="item.index" :key="item.index">
<i :class="item.icon"></i> <!-- <i :class="item.icon"></i> -->
<span slot="title">{{ item.title }}</span> <span slot="title">{{ item.title }}</span>
</el-menu-item> </el-menu-item>
</template> </template>
@ -40,79 +40,29 @@ export default {
menuList: [ menuList: [
{ {
icon: 'el-icon-school', icon: 'el-icon-school',
index: '/workbench',
title: '工作台'
},
{
icon: 'el-icon-user',
index: '/customer', index: '/customer',
title: '客户管理' title: '客户管理'
}, },
{ {
icon: 'el-icon-user', icon: 'el-icon-shopping-bag-2',
index: '/user', index: '/user',
title: '用户管理' title: '用户管理'
}, },
{ {
icon: 'el-icon-shopping-bag-2', icon: 'el-icon-document-checked',
index: '/order', index: '/order',
title: '订单管理' title: '订单管理'
}, },
{
icon: 'el-icon-document-checked',
index: '/curriculum',
title: '课程管理'
},
{
icon: 'el-icon-notebook-2',
index: '/data',
title: '数据管理'
},
{
icon: 'el-icon-tickets',
index: '/match',
title: '大赛管理'
},
{
icon: 'el-icon-takeaway-box',
index: '/theoreticalCourse',
title: '理论课程'
},
{
icon: 'el-icon-box',
index: '/information',
title: '资讯管理'
},
{
icon: 'el-icon-receiving',
index: '/configure',
title: '服务配置'
},
{ {
icon: 'el-icon-office-building', icon: 'el-icon-office-building',
index: '/system', index: '/system',
title: '系统配置' title: '系统配置'
}, },
{
icon: 'el-icon-box',
index: '/parner',
title: '合伙管理'
},
{
icon: 'el-icon-data-line',
index: '/parnerOperation',
title: '合伙运营'
},
{
icon: 'el-icon-shopping-cart-2',
index: '/shop',
title: '商城管理'
},
{
icon: 'el-icon-data-board',
index: '/theoryExam',
title: '考试平台'
},
{
icon: 'el-icon-document-copy',
index: '/review',
title: '评阅平台'
},
], ],
menus: [], menus: [],
onRoutes: this.$route.path onRoutes: this.$route.path
@ -171,16 +121,25 @@ export default {
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
.sidebar::-webkit-scrollbar { .menus {
width: 0; display: flex;
} justify-content: center;
background-color: #062c87;
.sidebar-el-menu:not(.el-menu--collapse) { /deep/.sidebar {
width: 100%; border-bottom: 0;
}
&>.el-menu-item {
height: 36px;
line-height: 36px;
}
&>.el-menu-item.is-active {
background-color: #fff !important;
border-bottom: 0;
}
}
.sidebar>ul {
height: 100%;
} }
</style> </style>

@ -2,17 +2,18 @@ import Vue from 'vue';
import App from './App.vue'; import App from './App.vue';
import router from './router'; import router from './router';
import ElementUI from 'element-ui'; import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css'; // 默认主题 import "@/assets/css/default/index.scss";
import './assets/css/theme-green/index.css'; // 浅绿色主题
import './assets/css/icon.css'; import './assets/css/icon.css';
import './assets/icon/iconfont.css'; import './assets/icon/iconfont.css';
import 'babel-polyfill'; import 'babel-polyfill';
import './utils/rem'; import './utils/rem';
import {post,get,del,put} from './utils/http'; import { post, get, del, put } from './utils/http';
import api from './utils/api'; import api from './utils/api';
import store from './store' import store from './store'
import { systemStatus, systemTypeStatus, systemAttributionStatus, courseTypeStatus, import {
hoursStatus, roleStatus, orderTypeFn, orderStatusFn, orderNatureFn, Percentage, removeByValue, isIE, encodeString, formatDate, downloadFile, dateCompatible } from './utils/core'; 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 preventReClick from './utils/preventReClick' //防多次点击,重复提交
import plugins from '@/directive'; import plugins from '@/directive';
@ -44,7 +45,7 @@ Vue.use(ElementUI, { size: 'small' });
Vue.use(plugins); Vue.use(plugins);
new Vue({ new Vue({
router, router,
store, store,
render: h => h(App) render: h => h(App)
}).$mount('#app'); }).$mount('#app');

@ -208,8 +208,12 @@ let router = new Router({
component: () => import('../views/shop/list'), component: () => import('../views/shop/list'),
}, },
{ {
path: '/shop/addProduct', path: '/shop/add',
component: () => import('../views/shop/addProduct'), component: () => import('../views/shop/add'),
},
{
path: '/market',
component: () => import('../views/market'),
}, },
{ {
path: '/theoryExam/list', path: '/theoryExam/list',
@ -223,6 +227,10 @@ let router = new Router({
path: '/review', path: '/review',
component: () => import('../views/review'), component: () => import('../views/review'),
}, },
{
path: '/workbench',
component: () => import('../views/workbench'),
},
{ {
path: '/404', path: '/404',
component: () => import('../views/404.vue'), component: () => import('../views/404.vue'),

@ -14,7 +14,7 @@ if (isDev) {
sandPath = `http://${location.hostname}:9520` sandPath = `http://${location.hostname}:9520`
host = 'http://121.37.12.51/' host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/' // host = 'https://huorantech.cn/'
const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'http://118.31.167.228/'] const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'https://occupationlab.com/']
host = ips[+localStorage.getItem('ip')] host = ips[+localStorage.getItem('ip')]
} else if (isPro) { } else if (isPro) {
sandPath = `https://izhixinyun.com/sandbox` sandPath = `https://izhixinyun.com/sandbox`
@ -51,7 +51,7 @@ const Setting = {
isDev, isDev,
isPro, isPro,
// 是否使用动态路由 // 是否使用动态路由
dynamicRoute: true, dynamicRoute: false,
/** /**
* @description 默认密码 * @description 默认密码
*/ */

@ -1,7 +1,6 @@
import Setting from "@/setting"; import Setting from "@/setting";
const { uploadURL, apiBaseURL: host } = Setting const { apiBaseURL: host } = Setting
const jumpApi = Setting.isDev ? `http://121.37.12.51/` : Setting.isPro ? `https://judgment.huorantech.cn/` : `http://121.37.12.51/`
export default { export default {
logins: `users/users/user/login`, //登录 logins: `users/users/user/login`, //登录

@ -1264,12 +1264,12 @@ export default {
.radio_icon { .radio_icon {
font-size: 26px; font-size: 26px;
color: #9278ff; color: #062c87;
} }
/deep/.warning { /deep/.warning {
margin-left: 5px; margin-left: 5px;
color: #9278ff; color: #062c87;
} }
.tags { .tags {

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

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

@ -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" stripe 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>

@ -2701,7 +2701,7 @@ export default {
.radio_icon { .radio_icon {
font-size: 26px; font-size: 26px;
color: #9278ff; color: #062c87;
} }
.ellipsis { .ellipsis {

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

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

File diff suppressed because it is too large Load Diff

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

@ -438,14 +438,11 @@
<script> <script>
import Util from "@/libs/util"; import Util from "@/libs/util";
import Setting from "@/setting";
import quill from "@/components/quill";
import Editor from '@tinymce/tinymce-vue' import Editor from '@tinymce/tinymce-vue'
import editorConfig from '@/utils/editor' import editorConfig from '@/utils/editor'
import Cropper from '@/components/img-upload/Cropper' import Cropper from '@/components/img-upload/Cropper'
import Upload from '@/components/upload'; import Upload from '@/components/upload';
import Oss from '@/components/upload/upload.js' import Oss from '@/components/upload/upload.js'
import Axios from 'axios'
export default { export default {
data () { data () {
return { return {
@ -1418,7 +1415,7 @@ $avatar-width: 104px;
.plus { .plus {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 18px; font-size: 18px;
color: #9278ff; color: #062c87;
text-align: right; text-align: right;
cursor: pointer; cursor: pointer;
} }

@ -1,179 +1,94 @@
<template> <template>
<!-- 产品管理 --> <div class="page">
<div style="padding-top: 24px">
<div class="tool"> <div class="tool">
<ul class="filter" <ul class="filter" style="align-items: flex-start">
style="align-items: flex-start">
<li> <li>
<label>学科类</label> <label>学科类</label>
<el-select v-model="form.categoryId" <el-select v-model="form.categoryId" clearable @change="getProfessionalClass()" @clear="clearClass()">
clearable <el-option v-for="(item, index) in subjectList" :key="index" :label="item.disciplineName"
@change="getProfessionalClass()" :value="item.disciplineId"></el-option>
@clear="clearClass()">
<el-option v-for="(item,index) in subjectList"
:key="index"
:label="item.disciplineName"
:value="item.disciplineId"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>专业类</label> <label>专业类</label>
<el-select v-model="form.professionalCategoryId" <el-select v-model="form.professionalCategoryId" clearable :disabled="form.categoryId ? false : true"
clearable @change="getProfessional" @clear="clearProfess()">
:disabled="form.categoryId ? false : true" <el-option v-for="(item, index) in professionalClassList" :key="index" :label="item.professionalClassName"
@change="getProfessional" :value="item.professionalClassId"></el-option>
@clear="clearProfess()">
<el-option v-for="(item,index) in professionalClassList"
:key="index"
:label="item.professionalClassName"
:value="item.professionalClassId"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>专业</label> <label>专业</label>
<el-select v-model="form.professionalId" <el-select v-model="form.professionalId" clearable :disabled="form.professionalCategoryId ? false : true"
clearable @change="initData">
:disabled="form.professionalCategoryId ? false : true" <el-option v-for="(item, index) in professionalList" :key="index" :label="item.professionalName"
@change="initData"> :value="item.professionalId"></el-option>
<el-option v-for="(item,index) in professionalList"
:key="index"
:label="item.professionalName"
:value="item.professionalId"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>产品分类</label> <label>产品分类</label>
<el-select v-model="form.productClassification" <el-select v-model="form.productClassification" clearable placeholder="请选择产品分类" @change="initData">
clearable <el-option v-for="(item, i) in productCategoryList" :key="i" :label="item.classificationName"
placeholder="请选择产品分类" :value="item.classificationId"></el-option>
@change="initData">
<el-option v-for="(item, i) in productCategoryList"
:key="i"
:label="item.classificationName"
:value="item.classificationId"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入" <el-input placeholder="请输入" suffix-icon="el-icon-search" v-model="form.productName" clearable
suffix-icon="el-icon-search" size="small"></el-input>
v-model="form.productName"
clearable
size="small"></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button v-auth="'/shop:产品管理:新增'" <el-button v-auth="'/shop:产品管理:新增'" type="primary" round @click="addCourse">新增</el-button>
type="primary"
round
@click="addCourse">新增</el-button>
</div> </div>
</div> </div>
<el-table :data="list" <el-table :data="list" class="table" ref="table" stripe header-align="center"
class="table" @selection-change="handleSelectionChange" row-key="id" @sort-change="sortChange">
ref="table" <el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
stripe <el-table-column type="index" width="100" label="序号" align="center">
header-align="center"
@selection-change="handleSelectionChange"
row-key="id"
@sort-change="sortChange">
<el-table-column type="selection"
width="80"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="productName" <el-table-column prop="productName" label="产品名称" min-width="150" align="center"></el-table-column>
label="产品名称" <el-table-column prop="supplierName" label="厂商" min-width="150" align="center"></el-table-column>
min-width="150" <el-table-column prop="classificationName" label="产品分类" min-width="150" align="center"></el-table-column>
align="center"></el-table-column> <el-table-column prop="typeName" label="产品类型" min-width="150" align="center"></el-table-column>
<el-table-column prop="supplierName" <el-table-column prop="associatedProductName" label="关联产品" min-width="140" align="center"></el-table-column>
label="厂商" <el-table-column prop="courseName" label="状态" min-width="140" align="center">
min-width="150"
align="center"></el-table-column>
<el-table-column prop="classificationName"
label="产品分类"
min-width="150"
align="center"></el-table-column>
<el-table-column prop="typeName"
label="产品类型"
min-width="150"
align="center"></el-table-column>
<el-table-column prop="associatedProductName"
label="关联产品"
min-width="140"
align="center"></el-table-column>
<el-table-column prop="courseName"
label="状态"
min-width="140"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isShelves ? '下架' : '上架' }} {{ scope.row.isShelves ? '下架' : '上架' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderQuantity" <el-table-column prop="orderQuantity" label="订单量" min-width="150" align="center"></el-table-column>
label="订单量" <el-table-column prop="userName" label="最近编辑人" min-width="150" align="center"></el-table-column>
min-width="150" <el-table-column prop="selected" label="精选" min-width="150" align="center" sortable="custom">
align="center"></el-table-column>
<el-table-column prop="userName"
label="最近编辑人"
min-width="150"
align="center"></el-table-column>
<el-table-column prop="selected"
label="精选"
min-width="150"
align="center"
sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
<i v-auth="'/shop:产品管理:精选'" <i v-auth="'/shop:产品管理:精选'" :class="['icon', scope.row.selected ? 'el-icon-check' : 'el-icon-close']"
:class="['icon', scope.row.selected ? 'el-icon-check' : 'el-icon-close']" @click="selected(scope.row)"></i>
@click="selected(scope.row)"></i>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上架/下架" <el-table-column label="上架/下架" align="center" width="90">
align="center"
width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.isShelves" <el-switch v-model="scope.row.isShelves" :active-value="0" :inactive-value="1"
:active-value="0" @change="changeSwitch($event, scope.row)" v-auth="'/shop:产品管理:上下架'">
:inactive-value="1"
@change="changeSwitch($event, scope.row)"
v-auth="'/shop:产品管理:上下架'">
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" align="center" width="120">
align="center"
width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.isShelves"> <template v-if="scope.row.isShelves">
<el-button v-auth="'/shop:产品管理:编辑'" <el-button v-auth="'/shop:产品管理:编辑'" type="text" @click="edit(scope.row)">编辑</el-button>
type="text" <el-button v-auth="'/shop:产品管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
@click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/shop:产品管理:删除'"
type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
<el-button v-else <el-button v-else v-auth="'/shop:产品管理:查看'" type="text" @click="edit(scope.row, 1)">查看</el-button>
v-auth="'/shop:产品管理:查看'"
type="text"
@click="edit(scope.row, 1)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange"
layout="total, prev, pager, next" :current-page="page">
:total="total"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -436,20 +351,24 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .tool { /deep/ .tool {
margin-bottom: 14px; margin-bottom: 14px;
.filter {
flex-wrap: wrap; .filter {
li { flex-wrap: wrap;
margin-bottom: 10px;
} li {
.el-input { margin-bottom: 10px;
min-width: 215px;
}
} }
.el-input {
min-width: 215px;
}
}
} }
.icon { .icon {
font-size: 16px; font-size: 16px;
color: #9076ff; color: #9076ff;
cursor: pointer; cursor: pointer;
} }
</style> </style>

@ -1,55 +0,0 @@
<template>
<div class="page">
<div class="tabs">
<a class="item"
v-for="(item,index) in tabs"
:key="index"
:class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div>
<div class="page-content">
<product v-if="active == 'first'" />
<market v-if="active == 'second'" />
</div>
</div>
</template>
<script>
import Setting from "@/setting";
import product from "./product";
import market from "./market";
export default {
components: {
product,
market,
},
data () {
return {
active: "first", //
tabs: {
first: "产品管理",
second: "营销推广管理",
},
showTabs: true
};
},
mounted () {
Setting.dynamicRoute && this.initTabs();
},
methods: {
tabChange (index) {
this.active = index;
},
initTabs () {
const { btns } = this.$store.state
const tab1 = btns.includes('/shop:产品管理')
const tab2 = btns.includes('/shop:营销推广管理')
tab1 || delete this.tabs.first
tab2 || delete this.tabs.second
}
}
};
</script>
<style lang="scss" scoped>
</style>

@ -1,314 +0,0 @@
<template>
<!-- 营销推广管理 -->
<div style="padding-top: 24px">
<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"
stripe
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>

@ -310,7 +310,7 @@ export default {
.plus { .plus {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 18px; font-size: 18px;
color: #9278ff; color: #062c87;
text-align: right; text-align: right;
cursor: pointer; cursor: pointer;
} }

@ -356,7 +356,7 @@ export default {
// //
.scrollbar ::-webkit-scrollbar-thumb { .scrollbar ::-webkit-scrollbar-thumb {
background-color: #9278ff; background-color: #062c87;
border-radius: 3px; border-radius: 3px;
box-shadow: inset 0 0 5px #dddddd; box-shadow: inset 0 0 5px #dddddd;
} }

@ -0,0 +1,217 @@
<template>
<div class="wrap">
<div class="block block1">
<div class="title">系统后台</div>
<div class="apps">
<div class="app">
<img src="@/assets/img/workbench/1.png" alt="">
<p class="name">Python系统</p>
</div>
<div class="app">
<img src="@/assets/img/workbench/2.png" alt="">
<p class="name">理论考试系统</p>
</div>
<div class="app">
<img src="@/assets/img/workbench/3.png" alt="">
<p class="name">金融产品设计及数字化营销沙盘系统</p>
</div>
<div class="app">
<img src="@/assets/img/workbench/4.png" alt="">
<p class="name">银行综合系统</p>
</div>
<div class="app">
<img src="@/assets/img/workbench/5.png" alt="">
<p class="name">众筹系统</p>
</div>
</div>
</div>
<div class="block block2">
<div class="title">职站教学后台</div>
<div class="apps">
<div class="app" @click="to('/curriculum')">
<img src="@/assets/img/workbench/6.png" alt="">
<p class="name">教学课程管理</p>
</div>
<div class="app" @click="to('/theoreticalCourse')">
<img src="@/assets/img/workbench/7.png" alt="">
<p class="name">精品课程管理</p>
</div>
<div class="app" @click="to('/information')">
<img src="@/assets/img/workbench/8.png" alt="">
<p class="name">资讯管理</p>
</div>
<div class="app" @click="to('/curriculum')">
<img src="@/assets/img/workbench/9.png" alt="">
<p class="name">资源库</p>
</div>
</div>
</div>
<div class="block middle" @click="to('/shop')">
<img src="@/assets/img/workbench/10.png" alt="">
<p class="name">产品管理</p>
</div>
<div class="block middle" @click="to('/market')">
<img src="@/assets/img/workbench/11.png" alt="">
<p class="name">营销管理</p>
</div>
<div class="block middle" @click="to('/parnerOperation')">
<img src="@/assets/img/workbench/12.png" alt="">
<p class="name">小程序内容管理</p>
</div>
<div class="block middle" @click="to('/parner')">
<img src="@/assets/img/workbench/13.png" alt="">
<p class="name">销售代理人管理</p>
</div>
<div class="block block3">
<div class="title">运营后台</div>
<div class="apps">
<div class="app" @click="to('/match')">
<img src="@/assets/img/workbench/14.png" alt="">
<p class="name">大赛管理</p>
</div>
<div class="app" @click="to('/data')">
<img src="@/assets/img/workbench/15.png" alt="">
<p class="name">数据管理</p>
</div>
</div>
</div>
</div>
</template>
<script>
import Setting from '@/setting'
export default {
data () {
return {
};
},
mounted () {
},
methods: {
getData () {
this.loading = true
this.$post(this.api.userManagementList, {
countries: this.form.countries,
provinceId: this.form.provinces,
cityId: this.form.city,
platformId: this.form.platformId,
schoolId: this.form.schoolId,
month: this.form.month,
creationTime: this.form.startTime,
endTime: this.form.endTime,
roleId: this.form.accountRole,
searchContent: this.form.keyword,
pageNum: this.page,
pageSize: this.pageSize
}).then(({ page }) => {
const { records, total } = page
records.map(e => {
e.enable = e.displayState
if (e.enable === 2) {
e.enable = 1
}
})
this.userData = records
this.totals = total
this.loading = false
}).catch(res => {
this.loading = false
})
},
to (path) {
this.$router.push(path)
},
}
};
</script>
<style lang="scss" scoped>
.wrap {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 1000px;
margin: 0 auto;
.block {
padding: 20px 20px 0;
background-color: #fff;
border-radius: 20px;
box-sizing: border-box;
}
.block1 {
width: 55%;
.app {
width: 30%;
}
img {
margin-bottom: 10px;
}
}
.block2 {
width: 40%;
.app {
width: 48%;
}
}
.block3 {
width: 100%;
margin-top: 30px;
.app {
display: inline-flex;
align-items: center;
margin-right: 100px;
}
img {
margin-right: 20px;
}
}
.middle {
display: inline-flex;
align-items: center;
width: 200px;
padding: 20px;
margin-top: 30px;
cursor: pointer;
img {
margin-right: 20px;
}
}
.title {
margin-bottom: 30px;
font-size: 18px;
}
.apps {
display: flex;
flex-wrap: wrap;
}
.app {
margin-bottom: 30px;
text-align: center;
cursor: pointer;
}
.name {
font-size: 14px;
color: #333;
}
}
</style>
Loading…
Cancel
Save