Commit dbabf8ee by Lyan

后台ui更改

parent 53901a16
...@@ -29,7 +29,9 @@ module.exports = { ...@@ -29,7 +29,9 @@ module.exports = {
filename: '[name].js', filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production' publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath ? config.build.assetsPublicPath
: config.dev.assetsPublicPath : config.dev.assetsPublicPath,
hotUpdateChunkFilename: 'hot/hot-update.js',
hotUpdateMainFilename: 'hot/hot-update.json'
}, },
resolve: { resolve: {
extensions: ['.js', '.vue', '.json'], extensions: ['.js', '.vue', '.json'],
......
...@@ -23,7 +23,8 @@ module.exports = { ...@@ -23,7 +23,8 @@ module.exports = {
}, },
// Various Dev Server settings // Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST // host: 'localhost', // can be overwritten by process.env.HOST
host: '127.0.0.1',
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>gs1后台管理</title> <title>中国物品编码中心管理系统</title>
<% if (process.env.NODE_ENV === 'production') { %> <% if (process.env.NODE_ENV === 'production') { %>
<!-- 生产环境 --> <!-- 生产环境 -->
<script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script> <script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script>
......
// 站点主色 // 站点主色
// tips: 要达到整站主题修改效果, 请确保[$--color-primary]站点主色与[/src/element-ui-theme/index.js]文件中[import './element-[#17B3A3]/index.css']当前主题色一致 // tips: 要达到整站主题修改效果, 请确保[$--color-primary]站点主色与[/src/element-ui-theme/index.js]文件中[import './element-[#17B3A3]/index.css']当前主题色一致
$--color-primary: #17B3A3; $--color-primary: rgba(24, 144, 255, 1);
// Navbar // Navbar
$navbar--background-color: $--color-primary; $navbar--background-color: $--color-primary;
// Sidebar // Sidebar
$sidebar--background-color-dark: #263238; $sidebar--background-color-dark: rgba(0, 27, 58, 1);
$sidebar--color-text-dark: #8a979e; $sidebar--color-text-dark: rgba(255, 255, 255, 0.647058823529412);
// Content // Content
$content--background-color: #f1f4f5; $content--background-color: #f1f4f5;
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* 1. 此处只包含element-ui组件主题 * 1. 此处只包含element-ui组件主题
* 2. 要达到整站主题修改效果, 请确保[import './element-[#17B3A3]/index.css']当前主题色与[/src/assets/scss/_variables.scss]文件中[$--color-primary]属性值一致 * 2. 要达到整站主题修改效果, 请确保[import './element-[#17B3A3]/index.css']当前主题色与[/src/assets/scss/_variables.scss]文件中[$--color-primary]属性值一致
*/ */
import './element-#17B3A3/index.css' // 当前主题色 import './element-#3E8EF7/index.css' // 当前主题色
export default { export default {
list: [ list: [
'#0BB2D4', // 青色 '#0BB2D4', // 青色
......
...@@ -16,7 +16,7 @@ Vue.config.productionTip = false ...@@ -16,7 +16,7 @@ Vue.config.productionTip = false
// 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock // 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
require('@/mock') // require('@/mock')
} }
// 挂载全局 // 挂载全局
......
...@@ -35,9 +35,12 @@ const mainRoutes = { ...@@ -35,9 +35,12 @@ const mainRoutes = {
// 2. iframeUrl: 是否通过iframe嵌套展示内容, '以http[s]://开头': 是, '': 否 // 2. iframeUrl: 是否通过iframe嵌套展示内容, '以http[s]://开头': 是, '': 否
// 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理! // 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
{ path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } }, { path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } },
{ path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } } { path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } },
// { path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } } { path: '/picture-add-or-update', component: _import('modules/info/picture-add-or-update'), name: 'picture-add-or-update', meta: { title: '图片资讯管理', isTab: true } },
// { path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } } { path: '/news-add-or-update', component: _import('modules/info/news-add-or-update'), name: 'news-add-or-update', meta: { title: '文章管理', isTab: true } },
{ path: '/indexcarouselmanage-add-or-update', component: _import('modules/info/indexcarouselmanage-add-or-update'), name: 'indexcarouselmanage-add-or-update', meta: { title: '首页轮播管理', isTab: true } },
{ path: '/newtopic-add-or-update', component: _import('modules/info/newtopic-add-or-update'), name: 'newtopic-add-or-update', meta: { title: '深度专题管理', isTab: true } },
{ path: '/newsmovie-add-or-update', component: _import('modules/info/newsmovie-add-or-update'), name: 'newsmovie-add-or-update', meta: { title: '视频管理', isTab: true } }
], ],
beforeEnter (to, from, next) { beforeEnter (to, from, next) {
let token = Vue.cookie.get('token') let token = Vue.cookie.get('token')
...@@ -85,7 +88,7 @@ router.beforeEach((to, from, next) => { ...@@ -85,7 +88,7 @@ router.beforeEach((to, from, next) => {
// sessionStorage.setItem('permissions', '[]') // sessionStorage.setItem('permissions', '[]')
// next() // next()
// } // }
// }).catch((e) => { // }).catch((e) =>
// console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue') // console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue')
// router.push({ name: 'login' }) // router.push({ name: 'login' })
// }) // })
......
...@@ -11,7 +11,7 @@ export const menuData = { ...@@ -11,7 +11,7 @@ export const menuData = {
'url': null, 'url': null,
'perms': null, 'perms': null,
'type': 0, 'type': 0,
'icon': null, 'icon': 'suoding',
'orderNum': 0, 'orderNum': 0,
'open': null, 'open': null,
'list': [ 'list': [
...@@ -27,104 +27,75 @@ export const menuData = { ...@@ -27,104 +27,75 @@ export const menuData = {
'orderNum': 1, 'orderNum': 1,
'open': null, 'open': null,
'list': null 'list': null
},
{
'menuId': 3,
'parentId': 1,
'parentName': null,
'name': '文章管理',
'url': 'info/news',
'perms': 'manage:news:save',
'type': 1,
'icon': null,
'orderNum': 2,
'open': null,
'list': null
},
{
'menuId': 4,
'parentId': 1,
'parentName': null,
'name': '首页轮播',
'url': 'info/indexcarouselmanage',
'perms': null,
'type': 1,
'icon': null,
'orderNum': 3,
'open': null,
'list': null
},
{
'menuId': 5,
'parentId': 1,
'parentName': null,
'name': '专题管理',
'url': 'info/newtopic',
'perms': null,
'type': 1,
'icon': null,
'orderNum': 4,
'open': null,
'list': null
},
{
'menuId': 6,
'parentId': 1,
'parentName': null,
'name': '视频管理',
'url': 'info/newsmovie',
'perms': null,
'type': 1,
'icon': null,
'orderNum': 5,
'open': null,
'list': null
} }
// {
// 'menuId': 3,
// 'parentId': 1,
// 'parentName': null,
// 'name': '角色管理',
// 'url': 'sys/role',
// 'perms': 'sys:user:save',
// 'type': 1,
// 'icon': 'role',
// 'orderNum': 2,
// 'open': null,
// 'list': null
// },
// {
// 'menuId': 4,
// 'parentId': 1,
// 'parentName': null,
// 'name': '菜单管理',
// 'url': 'sys/menu',
// 'perms': null,
// 'type': 1,
// 'icon': 'menu',
// 'orderNum': 3,
// 'open': null,
// 'list': null
// },
// {
// 'menuId': 5,
// 'parentId': 1,
// 'parentName': null,
// 'name': 'SQL监控',
// 'url': 'http://localhost:8080/renren-fast/druid/sql.html',
// 'perms': null,
// 'type': 1,
// 'icon': 'sql',
// 'orderNum': 4,
// 'open': null,
// 'list': null
// },
// {
// 'menuId': 6,
// 'parentId': 1,
// 'parentName': null,
// 'name': '定时任务',
// 'url': 'job/schedule',
// 'perms': null,
// 'type': 1,
// 'icon': 'job',
// 'orderNum': 5,
// 'open': null,
// 'list': null
// },
// {
// 'menuId': 27,
// 'parentId': 1,
// 'parentName': null,
// 'name': '参数管理',
// 'url': 'sys/config',
// 'perms': 'sys:config:delete',
// 'type': 1,
// 'icon': 'config',
// 'orderNum': 6,
// 'open': null,
// 'list': null
// },
// {
// 'menuId': 30,
// 'parentId': 1,
// 'parentName': null,
// 'name': '文件上传',
// 'url': ' ',
// 'perms': 'sys:oss:all',
// 'type': 1,
// 'icon': 'oss',
// 'orderNum': 6,
// 'open': null,
// 'list': null
// },
// {
// 'menuId': 29,
// 'parentId': 1,
// 'parentName': null,
// 'name': '系统日志',
// 'url': 'sys/log',
// 'perms': 'sys:log:list',
// 'type': 1,
// 'icon': 'log',
// 'orderNum': 7,
// 'open': null,
// 'list': null
// }
] ]
} }
], ],
permissions: [ permissions: [
'manage:picture:save', 'manage:picture:save',
'manage:picture:delete' 'manage:picture:delete',
'manage:news:save',
'manage:news:delete',
'manage:indexcarouselmanage:save',
'manage:indexcarouselmanage:delete',
'manage:template:save',
'manage:template:delete',
'manage:newsmovie:save',
'manage:newsmovie:delete',
'manage:newtopic:save',
'manage:newtopic:delete'
] ]
} }
<template> <template>
<div class="mod-home"> <div class="mod-home">
<h3>项目介绍</h3> <h3>管理平台</h3>
<ul>
<li>renren-fast-vue基于vue、element-ui构建开发,实现<a href="https://gitee.com/renrenio/renren-fast" target="_blank">renren-fast</a>后台管理前端功能,提供一套更优的前端解决方案</li>
<li>前后端分离,通过token进行数据交互,可独立部署</li>
<li>主题定制,通过scss变量统一一站式定制</li>
<li>动态菜单,通过菜单管理统一管理访问路由</li>
<li>数据切换,通过mock配置对接口数据/mock模拟数据进行切换</li>
<li>发布时,可动态配置CDN静态资源/切换新旧版本</li>
<li>演示地址:<a href="http://demo.open.renren.io/renren-fast" target="_blank">http://demo.open.renren.io/renren-fast</a> (账号密码:admin/admin)</li>
</ul>
<h3>获取帮助</h3>
<ul>
<li>官方社区:<a href="https://www.renren.io/community" target="_blank">https://www.renren.io/community</a></li>
<li>前端Git地址:<a href="https://github.com/renrenio/renren-fast-vue" target="_blank">https://github.com/renrenio/renren-fast-vue</a></li>
<li>后台Git地址:<a href="https://gitee.com/renrenio/renren-fast" target="_blank">https://gitee.com/renrenio/renren-fast</a></li>
<li>代码生成器:<a href="https://gitee.com/renrenio/renren-generator" target="_blank">https://gitee.com/renrenio/renren-generator</a></li>
<li>如需关注项目最新动态,请Watch、Star项目,同时也是对项目最好的支持</li>
</ul>
<h3>官方QQ群</h3>
<ul>
<li>高级群:324780204(大牛云集,跟大牛学习新技能)</li>
<li>普通群:145799952(学习交流,互相解答各种疑问)</li>
</ul>
</div> </div>
</template> </template>
......
...@@ -2,34 +2,23 @@ ...@@ -2,34 +2,23 @@
<div class="site-wrapper site-page--login"> <div class="site-wrapper site-page--login">
<div class="site-content__wrapper"> <div class="site-content__wrapper">
<div class="site-content"> <div class="site-content">
<div class="brand-info">
<h2 class="brand-info__text">renren-fast-vue</h2>
<p class="brand-info__intro">renren-fast-vue基于vue、element-ui构建开发,实现renren-fast后台管理前端功能,提供一套更优的前端解决方案。</p>
</div>
<div class="login-main"> <div class="login-main">
<h3 class="login-title">管理员登录</h3> <p class="login-title">中国物品编码中心后台管理系统</p>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" status-icon> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" status-icon>
<el-form-item prop="userName"> <el-form-item prop="userName">
<el-input v-model="dataForm.userName" placeholder="帐号"></el-input> <el-input v-model="dataForm.userName" placeholder="请输入帐号" ><i slot="prefix" style="font-style:normal;font-size:14px;color:#333333;margin:2px 0 0 5px;display:inline-block;">帐号</i></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input v-model="dataForm.password" type="password" placeholder="密码"></el-input> <el-input v-model="dataForm.password" type="password" placeholder="请输入密码"><i slot="prefix" style="font-style:normal;font-size:14px;color:#333333;margin:2px 0 0 5px;display:inline-block;">密码</i></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="captcha"> <el-form-item>
<el-row :gutter="20"> <p class="rememberPwd"><el-checkbox v-model="dataForm.checked"></el-checkbox> 记住密码</p>
<el-col :span="14">
<el-input v-model="dataForm.captcha" placeholder="验证码">
</el-input>
</el-col>
<el-col :span="10" class="login-captcha">
<!-- <img :src="captchaPath" @click="getCaptcha()" alt=""> -->
</el-col>
</el-row>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button class="login-btn-submit" type="primary" @click="dataFormSubmit()">登录</el-button> <el-button class="login-btn-submit" type="primary" @click="dataFormSubmit()">登录</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<p class="forgetPwd">忘记密码请联系系统管理员</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -45,7 +34,8 @@ ...@@ -45,7 +34,8 @@
userName: '', userName: '',
password: '', password: '',
uuid: '', uuid: '',
captcha: '' captcha: '',
checked: false
}, },
dataRule: { dataRule: {
userName: [ userName: [
...@@ -62,11 +52,23 @@ ...@@ -62,11 +52,23 @@
} }
}, },
created () { created () {
// this.getCaptcha() this.dataForm.userName = this.$cookie.get('username')
this.dataForm.password = this.$cookie.get('password')
}, },
methods: { methods: {
// 提交表单 // 提交表单
dataFormSubmit () { dataFormSubmit () {
if (this.dataForm.checked) {
this.$cookie.set('username', this.dataForm.userName)
this.$cookie.set('password', this.dataForm.password)
this.submit()
} else {
this.$cookie.delete('username')
this.$cookie.delete('password')
this.submit()
}
},
submit () {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.$http({ this.$http({
...@@ -79,6 +81,7 @@ ...@@ -79,6 +81,7 @@
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$cookie.set('token', data.token) this.$cookie.set('token', data.token)
this.$cookie.set('username', this.dataForm.userName)
this.$router.replace({ name: 'home' }) this.$router.replace({ name: 'home' })
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
...@@ -99,38 +102,26 @@ ...@@ -99,38 +102,26 @@
<style lang="scss"> <style lang="scss">
.site-wrapper.site-page--login { .site-wrapper.site-page--login {
position: absolute; position: absolute;
width: 100%;
background: rgba(228, 228, 228, 1);
height: 900px;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
background-color: rgba(38, 50, 56, .6);
overflow: hidden; .site-content__wrapper{
&:before { width: 1440px;
position: fixed; background-image: url(~@/assets/img/u0.gif);
top: 0; background-size: 100% 100%;
left: 0; min-height: 0;
z-index: -1;
width: 100%;
height: 100%; height: 100%;
content: "";
background-image: url(~@/assets/img/login_bg.jpg);
background-size: cover;
}
.site-content__wrapper {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 0; padding: 0;
margin: 0; margin: 0 auto;
overflow-x: hidden;
overflow-y: auto;
background-color: transparent;
} }
.site-content { .site-content {
min-height: 100%; min-height: 100%;
padding: 30px 500px 30px 30px; // padding: 30px 500px 30px 30px;
} }
.brand-info { .brand-info {
margin: 220px 100px 0 90px; margin: 220px 100px 0 90px;
...@@ -151,14 +142,52 @@ ...@@ -151,14 +142,52 @@
.login-main { .login-main {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 50%;
padding: 150px 60px 180px; margin-right: -225px;
width: 470px; width: 449px;
min-height: 100%; min-height: 100%;
background-color: #fff;
} }
.login-title { .login-title {
font-size: 16px; margin: 240px auto 45px;
font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC';
font-weight: 650;
font-style: normal;
color: #0066CC;
text-align: center;
font-size: 32px;
}
.el-form{
position: relative;
width: 300px;
margin: 0 auto;
.el-input__inner{
height: 40px;
border: 1px solid rgba(228, 228, 228, 1);
border-radius: 0;
padding-left: 45px;
font-size: 13px;
color: #000;
line-height: 40px;
}
.rememberPwd{
text-align: right;
margin: 0;
line-height: 14px!important;
margin-top: -10px;
font-size: 13px;
}
.el-checkbox__input.is-checked .el-checkbox__inner{
background-color: #0066CC;
border-color: #0066CC;
}
.el-checkbox__inner:hover{
border-color: #0066CC;
}
}
.el-form-item__content /deep/span{
top: 3px!important;
left: 5px!important;
} }
.login-captcha { .login-captcha {
overflow: hidden; overflow: hidden;
...@@ -169,7 +198,20 @@ ...@@ -169,7 +198,20 @@
} }
.login-btn-submit { .login-btn-submit {
width: 100%; width: 100%;
margin-top: 38px; background: #0066CC;
border-color: #0066CC;
border-radius: 20px;
height: 40px;
font-size: 13px;
}
.forgetPwd{
position: absolute;
width: 100%;
top: 780px;
white-space: nowrap;
text-align: center;
font-size: 14px;
} }
} }
</style> </style>
...@@ -28,15 +28,15 @@ ...@@ -28,15 +28,15 @@
width="100%" height="100%" frameborder="0" scrolling="yes"> width="100%" height="100%" frameborder="0" scrolling="yes">
</iframe> </iframe>
<keep-alive v-else> <keep-alive v-else>
<router-view v-if="item.name === mainTabsActiveName" /> <router-view v-if="item.name === mainTabsActiveName" :key="key" />
</keep-alive> </keep-alive>
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- 主入口标签页 e --> <!-- 主入口标签页 e -->
<el-card v-else :body-style="siteContentViewHeight"> <el-card v-else :body-style="siteContentViewHeight" >
<keep-alive> <keep-alive>
<router-view /> <router-view :key="key" />
</keep-alive> </keep-alive>
</el-card> </el-card>
</main> </main>
...@@ -73,11 +73,22 @@ ...@@ -73,11 +73,22 @@
return isURL(this.$route.meta.iframeUrl) ? { height: height + 'px' } : { minHeight: height + 'px' } return isURL(this.$route.meta.iframeUrl) ? { height: height + 'px' } : { minHeight: height + 'px' }
} }
return { minHeight: height + 'px' } return { minHeight: height + 'px' }
},
key () {
return this.$route.path + Math.random()
} }
},
mounted () {
console.log(this.mainTabs)
console.log(this.mainTabsActiveName)
}, },
methods: { methods: {
// tabs, 选中tab // tabs, 选中tab
selectedTabHandle (tab) { selectedTabHandle (tab) {
console.log('tab')
console.log(tab)
console.log(this.mainTabs)
tab = this.mainTabs.filter(item => item.name === tab.name) tab = this.mainTabs.filter(item => item.name === tab.name)
if (tab.length >= 1) { if (tab.length >= 1) {
this.$router.push({ name: tab[0].name, query: tab[0].query, params: tab[0].params }) this.$router.push({ name: tab[0].name, query: tab[0].query, params: tab[0].params })
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<nav class="site-navbar" :class="'site-navbar--' + navbarLayoutType"> <nav class="site-navbar" :class="'site-navbar--' + navbarLayoutType">
<div class="site-navbar__header"> <div class="site-navbar__header">
<h1 class="site-navbar__brand" @click="$router.push({ name: 'home' })"> <h1 class="site-navbar__brand" @click="$router.push({ name: 'home' })">
<a class="site-navbar__brand-lg" href="javascript:;">gs1后台管理</a> <a class="site-navbar__brand-lg" href="javascript:;">中国物品编码中心管理系统</a>
<a class="site-navbar__brand-mini" href="javascript:;">gs1</a> <a class="site-navbar__brand-mini" href="javascript:;">后台</a>
</h1> </h1>
</div> </div>
<div class="site-navbar__body clearfix"> <div class="site-navbar__body clearfix">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<el-menu <el-menu
class="site-navbar__menu site-navbar__menu--right" class="site-navbar__menu site-navbar__menu--right"
mode="horizontal"> mode="horizontal">
<el-menu-item index="1" @click="$router.push({ name: 'theme' })"> <!-- <el-menu-item index="1" @click="$router.push({ name: 'theme' })">
<template slot="title"> <template slot="title">
<el-badge value="new"> <el-badge value="new">
<icon-svg name="shezhi" class="el-icon-setting"></icon-svg> <icon-svg name="shezhi" class="el-icon-setting"></icon-svg>
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
<el-menu-item index="2-1"><a href="https://github.com/renrenio/renren-fast-vue" target="_blank">前端</a></el-menu-item> <el-menu-item index="2-1"><a href="https://github.com/renrenio/renren-fast-vue" target="_blank">前端</a></el-menu-item>
<el-menu-item index="2-2"><a href="https://gitee.com/renrenio/renren-fast" target="_blank">后台</a></el-menu-item> <el-menu-item index="2-2"><a href="https://gitee.com/renrenio/renren-fast" target="_blank">后台</a></el-menu-item>
<el-menu-item index="2-3"><a href="https://gitee.com/renrenio/renren-generator" target="_blank">代码生成器</a></el-menu-item> <el-menu-item index="2-3"><a href="https://gitee.com/renrenio/renren-generator" target="_blank">代码生成器</a></el-menu-item>
</el-submenu> </el-submenu> -->
<el-menu-item class="site-navbar__avatar" index="3"> <el-menu-item class="site-navbar__avatar" index="3">
<el-dropdown :show-timeout="0" placement="bottom"> <el-dropdown :show-timeout="0" placement="bottom">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<img src="~@/assets/img/avatar.png" :alt="userName">{{ userName }} <img src="~@/assets/img/avatar.png" :alt="userName">{{ userName }}
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePasswordHandle()">修改密码</el-dropdown-item> <!-- <el-dropdown-item @click.native="updatePasswordHandle()">修改密码</el-dropdown-item> -->
<el-dropdown-item @click.native="logoutHandle()">退出</el-dropdown-item> <el-dropdown-item @click.native="logoutHandle()">退出</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -78,20 +78,21 @@ ...@@ -78,20 +78,21 @@
set (val) { this.$store.commit('common/updateMainTabs', val) } set (val) { this.$store.commit('common/updateMainTabs', val) }
}, },
userName: { userName: {
get () { return this.$store.state.user.name } get () { return this.$cookie.get('username') }
} }
}, },
methods: { methods: {
// 修改密码 // 修改密码
updatePasswordHandle () { // updatePasswordHandle () {
this.updatePassowrdVisible = true // this.updatePassowrdVisible = true
this.$nextTick(() => { // this.$nextTick(() => {
this.$refs.updatePassowrd.init() // this.$refs.updatePassowrd.init()
}) // })
}, // },
// 退出 // 退出
logoutHandle () { logoutHandle () {
clearLoginInfo() clearLoginInfo()
this.$router.push({ name: 'login' })
// this.$confirm(`确定进行[退出]操作?`, '提示', { // this.$confirm(`确定进行[退出]操作?`, '提示', {
// confirmButtonText: '确定', // confirmButtonText: '确定',
// cancelButtonText: '取消', // cancelButtonText: '取消',
...@@ -112,3 +113,18 @@ ...@@ -112,3 +113,18 @@
} }
} }
</script> </script>
<style scoped>
.site-navbar__avatar .el-dropdown-link > img{
width: 24px;
}
.site-navbar__brand-lg,.site-navbar__brand-mini{
font-family: 'PingFangSC-Regular', 'PingFang SC';
font-weight: 400;
font-style: normal;
font-size: 16px;
color: #FFFFFF;
}
.site-navbar{
background-color: rgba(0, 40, 77, 1);
}
</style>
\ No newline at end of file
...@@ -53,3 +53,13 @@ ...@@ -53,3 +53,13 @@
} }
} }
</script> </script>
<style scoped>
.site-sidebar{
top: 65px;
}
.el-menu-item{
padding-left: 20px!important;
}
</style>
\ No newline at end of file
...@@ -82,16 +82,18 @@ ...@@ -82,16 +82,18 @@
methods: { methods: {
// 路由操作 // 路由操作
routeHandle (route) { routeHandle (route) {
console.log(332323)
console.log(route)
if (route.meta.isTab) { if (route.meta.isTab) {
// tab选中, 不存在先添加 // tab选中, 不存在先添加
var tab = this.mainTabs.filter(item => item.name === route.name)[0] var tab = this.mainTabs.filter(item => item.name === route.name)[0]
if (!tab) { if (!tab) {
if (route.meta.isDynamic) { // if (route.meta.isDynamic) {
route = this.dynamicMenuRoutes.filter(item => item.name === route.name)[0] // route = this.dynamicMenuRoutes.filter(item => item.name === route.name)[0]
if (!route) { // if (!route) {
return console.error('未能找到可用标签页!') // return console.error('未能找到可用标签页!')
} // }
} // }
tab = { tab = {
menuId: route.meta.menuId || route.name, menuId: route.meta.menuId || route.name,
name: route.name, name: route.name,
...@@ -101,7 +103,11 @@ ...@@ -101,7 +103,11 @@
params: route.params, params: route.params,
query: route.query query: route.query
} }
console.log(232323)
console.log(tab)
console.log(this.mainTabs)
this.mainTabs = this.mainTabs.concat(tab) this.mainTabs = this.mainTabs.concat(tab)
console.log(this.mainTabs)
} }
this.menuActiveName = tab.menuId + '' this.menuActiveName = tab.menuId + ''
this.mainTabsActiveName = tab.name this.mainTabsActiveName = tab.name
......
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
<el-button v-if="isAuth('manage:newsmovie:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
<el-button v-if="isAuth('manage:newsmovie:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column
prop="id"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="title"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="titleOld"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="keyword"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="releasedate"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="updatedate"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="rmname"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="wavname"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="littlepic"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="bigpic"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="author"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="clanguage"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="long"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="stdate"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="editor"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="hits"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="levels"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="status"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="type"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="newsRelease"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="brief"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="directpath"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="showtime"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="auditor"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="lasteditor"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from './newsmovie-add-or-update'
export default {
data () {
return {
dataForm: {
key: ''
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false
}
},
components: {
AddOrUpdate
},
activated () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/office/newsmovie/list'),
method: 'post',
data: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'key': this.dataForm.key
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle (val) {
this.dataListSelections = val
},
// 新增 / 修改
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
},
// 删除
deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/newsmovie/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
}
}
}
</script>
<template>
<div class="mod-config mod-list-form">
<div class="title">深度专题管理</div>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label='标题' prop='title'>
<el-input v-model='dataForm.title' placeholder='请输入标题'></el-input>
</el-form-item>
<el-form-item label='状态' prop='status'>
<el-select v-model="dataForm.status" placeholder="请选择状态">
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label='级别' prop='pictureLevel'>
<el-select v-model="dataForm.pictureLevel" placeholder="请输入级别">
<el-option
v-for="item in levelList"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item label='发布日期' prop='releaseDate'>
<el-date-picker
size="small"
v-model="releaseDate"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-button class="seach-btn" @click="getDataList()" type="primary" size="small">搜索</el-button>
</el-form>
<div class="add-btn">
<el-button v-if="isAuth('manage:news:save')" type="primary" @click="addOrUpdateHandle()"> + 添加专题</el-button>
</div>
<div class="table-list">
<el-table
:data="dataList"
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
>
<el-table-column
prop="levels"
header-align="center"
align="center"
label="级别">
</el-table-column>
<el-table-column
prop="title"
header-align="center"
align="center"
label="专题标题">
</el-table-column>
<el-table-column
prop="author"
header-align="center"
align="center"
label="专题分类">
</el-table-column>
<el-table-column
prop="showtime"
header-align="center"
align="center"
sortable
label="显示时间">
</el-table-column>
<el-table-column
prop="releasedate"
header-align="center"
align="center"
sortable
label="发布时间">
</el-table-column>
<el-table-column
prop="keyword"
header-align="center"
align="center"
label="关键字">
</el-table-column>
<el-table-column
prop="editor"
header-align="center"
align="center"
label="编辑">
</el-table-column>
<el-table-column
prop="lasteditor"
header-align="center"
align="center"
label="最后编辑">
</el-table-column>
<el-table-column
prop="auditor"
header-align="center"
align="center"
label="审核人">
</el-table-column>
<el-table-column
prop="status"
header-align="center"
align="center"
label="状态">
<template slot-scope="scope">
<div>
<span v-if="scope.row.status === 0">待审核</span>
<span v-if="scope.row.status === -1">失败</span>
<span v-if="scope.row.status === 1">成功</span>
</div>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<el-button type="text" @click="checkHandle(scope.row.classid,1)">[成功]</el-button>
<el-button type="text" @click="checkHandle(scope.row.classid,-1)">[失败]</el-button>
<br />
<el-button type="text" >预览</el-button>
<el-button type="text" @click="addOrUpdateHandle(scope.row.classid)">修改</el-button>
<el-button type="text" @click="deleteHandle(scope.row.classid)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data () {
return {
dataForm: {
title: '',
levels: '0',
status: '',
classnum: '',
inputdate: ''
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
statusList: [
{
value: '0',
label: '待审核'
},
{
value: '-1',
label: '失败'
},
{
value: '1',
label: '成功'
}
],
levelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
releaseDate: ''
}
},
activated () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/office/newtopic/list'),
method: 'post',
data: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'title': this.dataForm.title,
'status': this.dataForm.status,
'levels': this.dataForm.levels,
'inputDataStart': this.releaseDate[0],
'inputDataEnd': this.releaseDate[1]
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle (val) {
this.dataListSelections = val
},
// 新增 / 修改
addOrUpdateHandle (id) {
this.$nextTick(() => {
this.$router.push({name: 'newstopic-add-or-update', query: {id: id}})
})
},
// 删除
deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.classid
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/newtopic/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
}
}
}
</script>
<template>
<el-dialog
:title="!dataForm.tId ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="" prop="tType">
<el-input v-model="dataForm.tType" placeholder=""></el-input>
</el-form-item>
<el-form-item label="" prop="tTitle">
<el-input v-model="dataForm.tTitle" placeholder=""></el-input>
</el-form-item>
<el-form-item label="" prop="tContent">
<el-input v-model="dataForm.tContent" placeholder=""></el-input>
</el-form-item>
<el-form-item label="" prop="tAtime">
<el-input v-model="dataForm.tAtime" placeholder=""></el-input>
</el-form-item>
<el-form-item label="" prop="levels">
<el-input v-model="dataForm.levels" placeholder=""></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
tId: 0,
tType: '',
tTitle: '',
tContent: '',
tAtime: '',
levels: ''
},
dataRule: {
tType: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
tTitle: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
tContent: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
tAtime: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
]
}
}
},
methods: {
init (id) {
this.dataForm.tId = id || 0
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.tId) {
this.$http({
url: this.$http.adornUrl(`/manage/template/info/${this.dataForm.tId}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.tType = data.template.tType
this.dataForm.tTitle = data.template.tTitle
this.dataForm.tContent = data.template.tContent
this.dataForm.tAtime = data.template.tAtime
this.dataForm.levels = data.template.levels
}
})
}
})
},
// 表单提交
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/manage/template/${!this.dataForm.tId ? 'save' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'tId': this.dataForm.tId || undefined,
'tType': this.dataForm.tType,
'tTitle': this.dataForm.tTitle,
'tContent': this.dataForm.tContent,
'tAtime': this.dataForm.tAtime,
'levels': this.dataForm.levels
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
}
}
}
</script>
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
<el-button v-if="isAuth('manage:template:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
<el-button v-if="isAuth('manage:template:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column
prop="tId"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="tType"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="tTitle"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="tContent"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="tAtime"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
prop="levels"
header-align="center"
align="center"
label="">
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.tId)">修改</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.tId)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from './template-add-or-update'
export default {
data () {
return {
dataForm: {
key: ''
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false
}
},
components: {
AddOrUpdate
},
activated () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/manage/template/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'key': this.dataForm.key
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle (val) {
this.dataListSelections = val
},
// 新增 / 修改
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
},
// 删除
deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.tId
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/manage/template/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
}
}
}
</script>
<template>
<div>
<script id="editor" type="text/plain"></script>
</div>
</template>
<script>
import ueditor from 'ueditor'
export default {
data () {
return {
editor: null
}
},
props: {
value: '',
config: {}
},
mounted () {
this.ue = ueditor.getEditor('editor', this.config)
// this.ue.addListener('ready', function () { this.ue.setContent(this.value) })
},
destroyed () {
this.ue.destroy()
},
methods: {
getUEContent () {
// 获取内容方法
return this.ue.getContent()
},
setClearUEContent (text) {
// 获取内容方法
return this.ue.setContent(text)
}
}
}
</script>
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment