Commit 3e5c1ffd by dongjipeng

add

parent b25b1108
{
"books": [
{
"book_name": "《深度思考》",
"publication_date": "2018-9",
"author": "【美】莫琳·希凯(Maureen Chiquet)(孔锐才译)",
"authorIntr": "\"《财富》“全球最具影响力的50位商界女性”之一,《福布斯》“100位最具影响力的女性”之一,《华尔街日报》“50位最值得瞩目的女性”之一,《魅力》杂志“年度女性人物”。\n1994年,担任盖璞公司旗下的老海军(Old Navy)公司执行副总裁\n2002年,担任盖璞公司的分公司香蕉共和国(Banana Republic)总裁\n2003年,担任香奈儿美国分部CEO\n2007年,担任香奈儿全球CEO\n2016年1月,辞去香奈儿全球CEO一职,引起全球媒体界广泛报道,被称为“新一代香奈儿女王”。",
"bookIntr": "\"深度思考就是不断逼近问题的本质。\n事情来了就做,很少去想为什么做,怎么做,以及做了之后想得到什么结果?\n笃信天道酬勤,大部分时间用来埋头苦干,却鲜少抬头看路?\n习惯于用战术上的勤奋来掩饰战略上的懒惰?\n事实上,任何深度思考前的盲目勤奋,注定都是吃力不讨好的徒劳。\n在碎片化信息爆炸的当下,在竞争激烈的高阶领域,决胜的关键不仅在于知识的多寡、勤奋的程度如何,更在于是否具备深度思考的能力。\n本书作者、香奈儿前全球CEO莫琳·希凯回首自己从普通职员到职场巅峰的进阶之道,为你逐一揭开在所有领域获取成功的共通秘笈:\n遇到复杂问题时,像剥洋葱一样逐层分析;\n从被动接受到主动学习,从低成长区跨越到高成长区;\n让自己冷静下来后,更容易看清问题的本质;\n战术上的勤奋和战略上的优化同时推进;\n刻意练习深度思考的能力,使之成为习惯;\n……\n用深度思考连接一切,是未来10年最有价值的认知升级与自我精进的模式,是最具竞争力的优势。"
},
{
"book_name": "《灰犀牛》",
"publication_date": "2017-2",
"author": "米歇尔·渥克((Michele Wucker) )(王丽云译)",
"authorIntr": "米歇尔·渥克(Michele Wucker) ,全球思想领袖,2007年古根海姆学者奖获得者,2009年世界经济论坛\"青年领袖\",她身兼数职,担任总部在纽约的国际政策研究所所长、芝加哥议会全球事务研究中心副主任、《国际金融评论》拉美办公室主任。曾多次给《纽约时报》《华盛顿邮报》《国际政策》等媒体撰写文章。",
"bookIntr": "\"类似以黑天鹅比喻小概率而又影响巨大的事件,本书以灰犀牛比喻大概率且影响巨大的潜在危机。相对于黑天鹅事件的难以预见性和偶发性,灰犀牛事件不是随机突发事件,而是在一系列警示信号和迹象之后出现的大概率事件。例如:2008年美国房地产泡沫集中爆发以及在此之前的诸多泡沫破裂;飓风卡特里娜和桑迪以及其他自然灾害后的毁灭性余波;颠覆了传统媒体的现实数码技术;大桥坍塌和摇摇欲坠的城市基础设施;苏联的迅速衰败和中东地区的混乱,在事前均出现过明显的迹象。\n\n为什么领导者们和决策者们不能在局面失去控制之前解除危机?人们应该如何辨识和有效应对那些明显的、高概率的危机事件?\n\n本书以科技、经济、自然、社会等多方面的实例进行分析,为我们提供了那些迫在眉睫的、概率高、影响大的危机的预测、防备、应对及善后的具体方法,以便为人们在组织管理、公司管理和国家管理过程提供决策参考。\n\n推荐经理人、投资者、决策者、政府领导以及希望躲避灰犀牛式危机事件的人士阅读。"
},
{
"book_name": "《人类简史》",
"publication_date": "2014-11",
"author": "[以色列]尤瓦尔·赫拉利",
"authorIntr": "\"尤瓦尔·赫拉利,1976年生,牛津大学历史学博士,现为耶路撒冷希伯来大学的历史系教授,青年怪才,全球瞩目的新锐历史学家。\n\n他擅长世界历史和宏观历史进程研究。在学术领域和大众出版领域都有很大的兴趣。\n\n他的《人类简史》一书让他一举成名,成为以色列超级畅销书,这本书已授20多个国家版权,在历史学之外,人类学、生态学、基因学等领域的知识信手拈来,根据图书改编的课程上传YOUTUBE后风靡全球,拥有大批青年粉丝。写书,视频课程之外,他还开设有专栏。",
"bookIntr": "\"《人类简史:从动物到上帝》是以色列新锐历史学家的一部重磅作品。从十万\n\n\n年前有生命迹象开始到21世纪资本、科技交织的人类发展史。十万年前,地球上至少有六个人种,为何今天却只剩下了我们自己?我们曾经只是非洲角落一个毫不起眼的族群,对地球上生态的影响力和萤火虫、猩猩或者水母相差无几。为何我们能登上生物链的顶端,最终成为地球的主宰?\n\n从认知革命、农业革命到科学革命,我们真的了解自己吗?我们过得更加快乐吗?我们知道金钱和宗教从何而来,为何产生吗?人类创建的帝国为何一个个衰亡又兴起?为什么地球上几乎每一个社会都有男尊女卑的观念?为何一神教成为最为广泛接受的宗教?科学和资本主义如何成为现代社会最重要的信条?理清影响人类发展的重大脉络,挖掘人类文化、宗教、法律、国家、信贷等产生的根源。这是一部宏大的人类简史,更见微知著、以小写大,让人类重新审视自己。\"\n\n\n\n\n\n\n\n\n\n"
}
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
File deleted
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
.el-table__body tr:hover>td {background-color: #ffffff !important} .el-table__body tr:hover>td {background-color: #ffffff !important}
.el-tooltip__popper{ max-width: 30% } .el-tooltip__popper{ max-width: 30% }
.el-menu-item, .el-submenu__title {padding-left: 0 !important;} .el-menu-item, .el-submenu__title {padding-left: 0 !important;}
.el-menu--inline {background-color: #f5f5f5} .el-menu--inline {background-color: #f5f5f5; padding-left: 20px}
.el-button.el-button-link { .el-button.el-button-link {
padding: 0; padding: 0;
span { span {
...@@ -28,7 +28,12 @@ ...@@ -28,7 +28,12 @@
} }
} }
} }
.el-upload {line-height: 80px; min-height: 80px; position: relative;
img {position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto}
}
.form-top-upload {
.el-upload {height: 34px; line-height: 1;min-height: 34px;}
}
/* /*
百度地图 百度地图
*/ */
......
...@@ -54,4 +54,4 @@ button {outline: none; border: none; background: transparent; cursor: pointer} ...@@ -54,4 +54,4 @@ button {outline: none; border: none; background: transparent; cursor: pointer}
.ml30 {margin-left: 30px;} .ml30 {margin-left: 30px;}
/*padding*/ /*padding*/
.pl20 {padding-left: 30px} .pl20 {padding-left: 20px}
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div class="header_inner"> <div class="header_inner">
<h2>华夏幸福+ 平台管理系统</h2> <h2>华夏幸福+ 平台管理系统</h2>
<ul> <ul>
<li class="user_self"><a href="">郭玉洁</a></li> <li class="user_self"><a href="javascript:;">{{$store.state.userInfor.personName}}</a></li>
<li class="exit_app"><a href="">退出登录</a></li> <li class="exit_app"><a :href="$ssoHttp + 'cfld_sso_localmodel_exit.axd'">退出登录</a></li>
<li class="change_pwd"><a href="">修改密码</a></li> <!--<li class="change_pwd"><a href="">修改密码</a></li>-->
</ul> </ul>
</div> </div>
</div> </div>
...@@ -13,7 +13,33 @@ ...@@ -13,7 +13,33 @@
<script> <script>
export default { export default {
name: 'Header' name: 'Header',
created () {
this._getUserVuex()
},
methods: {
_getUserVuex () { // 获取登陆人信息
this.$store.dispatch('_getUserInfor')
},
exitHandle () { // 退出登录
this.$confirm('确定退出登录吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let _this = this
this.$axios.get('/user/exit')
.then(function (res) {
if (res) {
_this.$message({
type: 'success',
message: '删除成功!'
})
}
})
})
}
}
} }
</script> </script>
......
...@@ -11,47 +11,47 @@ ...@@ -11,47 +11,47 @@
style="height: 100%" style="height: 100%"
active-text-color="#4A90E2"> active-text-color="#4A90E2">
<el-submenu index="1"> <el-submenu index="1">
<template slot="title"><!--<i class="el-icon-message"></i>--> <div class="tc">首页管理</div></template> <template slot="title"><!--<i class="el-icon-message"></i>--> <div class="tl pl20">首页管理</div></template>
<el-menu-item index="/home/bannerManage"><div class="tc">banner管理</div></el-menu-item> <el-menu-item index="/home/bannerManage"><div class="tl pl20">banner管理</div></el-menu-item>
<el-menu-item :index="'/home/' + activityPath"><div class="tc">活动宣传</div></el-menu-item> <el-menu-item :index="'/home/' + activityPath"><div class="tl pl20">活动宣传</div></el-menu-item>
<el-menu-item index="/home/commonLink"><div class="tc">常用链接</div></el-menu-item> <el-menu-item index="/home/commonLink"><div class="tl pl20">常用链接</div></el-menu-item>
<el-menu-item index="/home/messageManagement"><div class="tc">留言管理</div></el-menu-item> <el-menu-item index="/home/messageManagement"><div class="tl pl20">留言管理</div></el-menu-item>
</el-submenu> </el-submenu>
<el-submenu index="2"> <el-submenu index="2">
<template slot="title"><div class="tc">幸福餐厅</div></template> <template slot="title"><div class="tl pl20">幸福餐厅</div></template>
<el-menu-item index="/restaurant/rationalRestaurant"><div class="tc">全国餐厅</div></el-menu-item> <el-menu-item index="/restaurant/rationalRestaurant"><div class="tl pl20">全国餐厅</div></el-menu-item>
<el-menu-item index="/restaurant/restaurantMenus"><div class="tc">餐厅菜单</div></el-menu-item> <el-menu-item index="/restaurant/restaurantMenus"><div class="tl pl20">餐厅菜单</div></el-menu-item>
<!--<el-menu-item index="/restaurant/foodVideo"><div class="tc">美食视频</div></el-menu-item>--> <!--<el-menu-item index="/restaurant/foodVideo"><div class="tl pl20">美食视频</div></el-menu-item>-->
<el-menu-item index="/restaurant/solarCalendar"><div class="tc">节气日历</div></el-menu-item> <el-menu-item index="/restaurant/solarCalendar"><div class="tl pl20">节气日历</div></el-menu-item>
<el-menu-item index="/restaurant/themeActivities"><div class="tc">主题活动</div></el-menu-item> <el-menu-item index="/restaurant/themeActivities"><div class="tl pl20">主题活动</div></el-menu-item>
</el-submenu> </el-submenu>
<el-submenu index="3"> <el-submenu index="3">
<template slot="title"><div class="tc">幸福农场</div></template> <template slot="title"><div class="tl pl20">幸福农场</div></template>
<el-menu-item index="/farm/farmWonderful"><div class="tc">农场精彩</div></el-menu-item> <el-menu-item index="/farm/farmWonderful"><div class="tl pl20">农场精彩</div></el-menu-item>
<el-menu-item index="/farm/specialEvents"><div class="tc">特色活动</div></el-menu-item> <el-menu-item index="/farm/specialEvents"><div class="tl pl20">特色活动</div></el-menu-item>
</el-submenu> </el-submenu>
<el-submenu index="4"> <el-submenu index="4">
<template slot="title"><div class="tc">幸福健身</div></template> <template slot="title"><div class="tl pl20">幸福健身</div></template>
<el-menu-item index="/fitness/eventCalendar"><div class="tc">赛事日历</div></el-menu-item> <el-menu-item index="/fitness/eventCalendar"><div class="tl pl20">赛事日历</div></el-menu-item>
<el-menu-item index="/fitness/happyRunning"><div class="tc">幸福长跑</div></el-menu-item> <el-menu-item index="/fitness/happyRunning"><div class="tl pl20">幸福长跑</div></el-menu-item>
</el-submenu> </el-submenu>
<el-menu-item index="/community"><div class="tc">幸福社团</div></el-menu-item> <el-menu-item index="/community"><div class="tl pl20">幸福社团</div></el-menu-item>
<el-menu-item index="/office"><div class="tc">无忧办公</div></el-menu-item> <el-menu-item index="/office"><div class="tl pl20">无忧办公</div></el-menu-item>
<el-submenu index="5"> <el-submenu index="5">
<template slot="title"><div class="tc">幸福洗衣</div></template> <template slot="title"><div class="tl pl20">幸福洗衣</div></template>
<el-menu-item index="/wash/washBranches"><div class="tc">洗衣网点</div></el-menu-item> <el-menu-item index="/wash/washBranches"><div class="tl pl20">洗衣网点</div></el-menu-item>
<el-menu-item index="/wash/newBranches"><div class="tc">网点编辑</div></el-menu-item> <el-menu-item index="/wash/newBranches"><div class="tl pl20">网点编辑</div></el-menu-item>
<el-menu-item index="/wash/commonSense"><div class="tc">洗衣小常识</div></el-menu-item> <el-menu-item index="/wash/commonSense"><div class="tl pl20">洗衣小常识</div></el-menu-item>
</el-submenu> </el-submenu>
<el-submenu index="6"> <el-submenu index="6">
<template slot="title"><div class="tc">幸福差旅</div></template> <template slot="title"><div class="tl pl20">幸福差旅</div></template>
<el-menu-item index="/travel/hotelList"><div class="tc">协议酒店</div></el-menu-item> <el-menu-item index="/travel/hotelList"><div class="tl pl20">协议酒店</div></el-menu-item>
<el-menu-item index="/travel/hotelAdd"><div class="tc">新增酒店</div></el-menu-item> <el-menu-item index="/travel/hotelAdd"><div class="tl pl20">编辑酒店</div></el-menu-item>
</el-submenu> </el-submenu>
<el-menu-item index="/mom"><div class="tc">萌妈工作室</div></el-menu-item> <el-menu-item index="/mom"><div class="tl pl20">萌妈工作室</div></el-menu-item>
<el-menu-item index="/randomHouse"><div class="tc">幸福书屋</div></el-menu-item> <el-menu-item index="/randomHouse"><div class="tl pl20">幸福书屋</div></el-menu-item>
<el-menu-item index="/pass"><div class="tc">幸福传递</div></el-menu-item> <el-menu-item index="/pass"><div class="tl pl20">幸福传递</div></el-menu-item>
<el-menu-item index="/administrator"><div class="tc">管理员</div></el-menu-item> <el-menu-item index="/administrator"><div class="tl pl20">管理员</div></el-menu-item>
</el-menu> </el-menu>
</el-aside> </el-aside>
<el-main class="main"> <el-main class="main">
......
...@@ -19,36 +19,42 @@ Vue.prototype.$rules = rules ...@@ -19,36 +19,42 @@ Vue.prototype.$rules = rules
Vue.prototype.$axios = axios Vue.prototype.$axios = axios
Vue.prototype.$qs = QS Vue.prototype.$qs = QS
// cookie
function getCookie () {
if (document.cookie.length > 0) {
if (document.cookie.indexOf('AuthUser_LoginId') === '-1' || document.cookie.indexOf('AuthUser_AuthNum') === '-1' ||
document.cookie.indexOf('AuthUser_AuthToken') === '-1' || document.cookie.indexOf('AuthUser_LoginId') === '-1'
) {
let h = window.location.href
window.location.href = 'http://sso.cfldcn.com/LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h
}
} else {
let h = window.location.href
window.location.href = 'http://sso.cfldcn.com/LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h
}
}
axios.defaults.timeout = 50000 axios.defaults.timeout = 50000
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
axios.defaults.withCredentials = true axios.defaults.withCredentials = true
var ssoHttp = ''
if (process.env.VUE_APP_API_PREFIX === 'development') { // 开发 if (process.env.VUE_APP_API_PREFIX === 'development') { // 开发
ssoHttp = 'http://sso.cfldpe.com/'
Vue.prototype.$ssoHttp = ssoHttp
axios.defaults.baseURL = 'http://10.2.98.32:8091/admin/' axios.defaults.baseURL = 'http://10.2.98.32:8091/admin/'
Vue.prototype.$baseURL = 'http://10.2.98.32:8091/admin/' Vue.prototype.$baseURL = 'http://10.2.98.32:8091/admin/'
Vue.prototype.$imgUrl = 'http://10.2.98.32:8091/admin/images/' Vue.prototype.$imgUrl = 'http://10.2.98.32:8091/admin/images/'
} else { // 生产 } else { // 生产
ssoHttp = 'http://sso.cfldpe.com/'
Vue.prototype.$ssoHttp = ssoHttp
getCookie() getCookie()
axios.defaults.baseURL = 'http://happy.cfldpe.com/admin/' axios.defaults.baseURL = 'http://happy.cfldpe.com/admin/'
Vue.prototype.$baseURL = 'http://happy.cfldpe.com/admin/' Vue.prototype.$baseURL = 'http://happy.cfldpe.com/admin/'
Vue.prototype.$imgUrl = 'http://happy.cfldpe.com/admin/images/' Vue.prototype.$imgUrl = 'http://happy.cfldpe.com/admin/images/'
} }
function getCookie () {
if (document.cookie.length > 0) {
console.log('1')
if (document.cookie.indexOf('AuthUser_LoginId') === -1 || document.cookie.indexOf('AuthUser_AuthNum') === -1 ||
document.cookie.indexOf('AuthUser_AuthToken') === -1 || document.cookie.indexOf('AuthUser_LoginId') === -1
) {
console.log('2')
let h = window.location.href
window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h
}
} else {
let h = window.location.href
window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h
}
}
var loading var loading
function startLoading () { function startLoading () {
loading = Vue.prototype.$loading({ loading = Vue.prototype.$loading({
...@@ -61,16 +67,21 @@ function startLoading () { ...@@ -61,16 +67,21 @@ function startLoading () {
function endLoading () { function endLoading () {
loading.close() loading.close()
} }
// 添加请求拦截器 // 请求拦截器
axios.interceptors.request.use(request => { axios.interceptors.request.use(request => {
startLoading() startLoading()
return request return request
}, err => { }, err => {
return Promise.reject(err) return Promise.reject(err)
}) })
// 添加响应拦截器 // 响应拦截器
axios.interceptors.response.use(function (response) { axios.interceptors.response.use(function (response) {
endLoading() endLoading()
if (response.status === 302) {
let h = window.location.href
window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS117&RetutnUrl=' + h
return false
}
if (response.data.code === '0') { if (response.data.code === '0') {
return response.data.data return response.data.data
} else { } else {
......
...@@ -179,7 +179,7 @@ export default new Router({ ...@@ -179,7 +179,7 @@ export default new Router({
name: 'hotelAdd', name: 'hotelAdd',
component: HotelAdd, component: HotelAdd,
meta: { meta: {
title: '新增酒店' title: '编辑酒店'
} }
} }
] ]
......
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
import axios from 'axios'
Vue.use(Vuex) Vue.use(Vuex)
export default new Vuex.Store({ export default new Vuex.Store({
state: { state: {
userInfor: {
name: ''
}
}, },
mutations: { mutations: {
userInfor (state, data) {
state.userInfor = data
}
}, },
actions: { actions: {
_getUserInfor (context) { // 用户信息
axios.get('/user/current')
.then(function (res) {
if (res) {
context.commit('userInfor', res)
}
})
}
} }
}) })
...@@ -17,21 +17,36 @@ ...@@ -17,21 +17,36 @@
<el-table-column <el-table-column
prop="roleName" prop="roleName"
align="center" align="center"
width="150"
label="角色"> label="角色">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="personIdMdm" prop="personIdMdm"
align="center" align="center"
width="200"
label="账号"> label="账号">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="personName"
align="center"
width="200"
label="姓名">
</el-table-column>
<el-table-column
prop="deptOrg"
align="center"
label="组织架构">
</el-table-column>
<el-table-column
prop="createUser" prop="createUser"
align="center" align="center"
width="200"
label="创建人"> label="创建人">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
align="center" align="center"
width="200"
label="创建日期"> label="创建日期">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
<template> <template>
<div> <div>
<div class="btn-warp mb15"> <div class="btn-warp mb15">
<el-select v-model="classifyId" @change="_getPhotoList" placeholder="图集分类" size="small" class="mr30"> <el-select v-model="classifyId" @change="selectPhotoList" placeholder="图集分类" size="small" class="mr30">
<el-option <el-option
v-for="item in classifyList" v-for="item in classifyList"
:key="item.id" :key="item.id"
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</el-select> </el-select>
<p v-if="classifyId !== qjClassifyId" style="display: inline-block; vertical-align: middle; font-size: 14px; color: #666666; margin-right: 20px">领队人:{{leaderName}} <span style="padding-left: 20px">电话:{{leaderTel}}</span></p> <p v-if="classifyId !== qjClassifyId" style="display: inline-block; vertical-align: middle; font-size: 14px; color: #666666; margin-right: 20px">领队人:{{leaderName}} <span style="padding-left: 20px">电话:{{leaderTel}}</span></p>
<el-button v-if="classifyId !== qjClassifyId" type="text" size="small" style="font-size: 14px" @click="leaderInforOpen">修改</el-button> <el-button v-if="classifyId !== qjClassifyId" type="text" size="small" style="font-size: 14px" @click="leaderInforOpen">修改</el-button>
<el-button type="primary" size="small" @click="centerDialogVisible = true" class="fr">新增</el-button> <el-button type="primary" size="small" @click="newAddHandle" class="fr">新增</el-button>
</div> </div>
<el-table <el-table
:data="photoList" :data="photoList"
...@@ -88,13 +88,26 @@ ...@@ -88,13 +88,26 @@
width="40%" width="40%"
center> center>
<el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true"> <el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图集选择" :label-width="formLabelWidth">
<el-col :sm="18">
<el-select v-model="classifyId" @change="currentPage = 1">
<el-option
v-for="item in classifyList"
:key="item.id"
:v="item.id"
:label="item.classifyName"
:value="item.id">
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath"> <el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18"> <el-col :sm="18">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
:action="$baseURL + 'team/upload'" :action="$baseURL + 'team/upload'"
:show-file-list="false" :show-file-list="false"
:multiple="true" accept="image/jpeg,image/png,image/gif"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar"> <img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
...@@ -254,6 +267,10 @@ export default { ...@@ -254,6 +267,10 @@ export default {
_this.leaderDialogVisible = false _this.leaderDialogVisible = false
}) })
}, },
selectPhotoList () {
this.currentPage = 1
this._getPhotoList()
},
_getPhotoList () { // 图片列表 _getPhotoList () { // 图片列表
let _this = this let _this = this
_this.leaderName = '' _this.leaderName = ''
...@@ -277,6 +294,14 @@ export default { ...@@ -277,6 +294,14 @@ export default {
this.currentPage = currentPage this.currentPage = currentPage
this._getPhotoList() this._getPhotoList()
}, },
newAddHandle () {
this.form.imgFilePath = ''
this.form.pictureMark = ''
this.form.pictureName = ''
this.form.pictureOriginalName = ''
this.form.pictureSize = ''
this.centerDialogVisible = true
},
handleAvatarSuccess (res, file) { // 上传 handleAvatarSuccess (res, file) { // 上传
this.form.pictureName = res.data[0].fileName this.form.pictureName = res.data[0].fileName
this.form.pictureOriginalName = res.data[0].fileOriginalName this.form.pictureOriginalName = res.data[0].fileOriginalName
...@@ -286,7 +311,7 @@ export default { ...@@ -286,7 +311,7 @@ export default {
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) { if (!isLt5M) {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传图片大小不能超过 5MB!')
} }
return isLt5M return isLt5M
}, },
......
...@@ -33,11 +33,6 @@ ...@@ -33,11 +33,6 @@
label="分类"> label="分类">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="pictureMark"
align="center"
label="介绍">
</el-table-column>
<el-table-column
prop="pictureSize" prop="pictureSize"
align="center" align="center"
label="大小"> label="大小">
...@@ -48,9 +43,14 @@ ...@@ -48,9 +43,14 @@
label="上传时间"> label="上传时间">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="updateUser" prop="createUser"
align="center"
label="创建人">
</el-table-column>
<el-table-column
prop="pictureMark"
align="center" align="center"
label="操作人"> label="备注">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
:action="$baseURL + '/farm/photoUpdate'" :action="$baseURL + '/farm/photoUpdate'"
:show-file-list="false" :show-file-list="false"
name="img" name="img"
accept="image/jpeg,image/png"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="form1.imgFilePath" :src="$imgUrl + form1.imgFilePath" class="avatar"> <img v-if="form1.imgFilePath" :src="$imgUrl + form1.imgFilePath" class="avatar">
...@@ -97,7 +98,7 @@ ...@@ -97,7 +98,7 @@
<el-input v-model="form1.pictureOriginalName" autocomplete="off" disabled="disabled"></el-input> <el-input v-model="form1.pictureOriginalName" autocomplete="off" disabled="disabled"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="介绍" :label-width="formLabelWidth"> <el-form-item label="备注" :label-width="formLabelWidth">
<el-col :sm="18"> <el-col :sm="18">
<el-input v-model="form1.pictureMark" autocomplete="off"></el-input> <el-input v-model="form1.pictureMark" autocomplete="off"></el-input>
</el-col> </el-col>
...@@ -180,7 +181,7 @@ export default { ...@@ -180,7 +181,7 @@ export default {
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) { if (!isLt5M) {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传图片大小不能超过 5MB!')
} }
return isLt5M return isLt5M
}, },
...@@ -241,7 +242,7 @@ export default { ...@@ -241,7 +242,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.avatar { .avatar {
width: 178px; width: 180px;
height: auto; height: auto;
max-height: 100px; max-height: 100px;
overflow: hidden; overflow: hidden;
......
...@@ -11,30 +11,32 @@ ...@@ -11,30 +11,32 @@
</el-form-item> </el-form-item>
<el-form-item label="活动期限:"> <el-form-item label="活动期限:">
<el-col :sm="3"> <el-col :sm="3">
<el-date-picker type="datetime" placeholder="选择日期" v-model="startTime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;"></el-date-picker> <el-date-picker
type="datetime"
:clearable="false"
placeholder="选择日期"
v-model="startTime"
:picker-options="pickerOptionsStart"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%;">
</el-date-picker>
</el-col> </el-col>
<el-col class="line tc" :sm="1"></el-col> <el-col class="line tc" :sm="1"></el-col>
<el-col :sm="3"> <el-col :sm="3">
<el-date-picker type="datetime" placeholder="选择日期" v-model="endTime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;"></el-date-picker> <el-date-picker
type="datetime"
:clearable="false"
placeholder="选择日期"
v-model="endTime"
:picker-options="pickerOptionsEnd"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%;">
</el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
<!--<el-form-item label="活动介绍:">
<el-col :sm="6">
<el-upload
class="activity-upload"
:action="$baseURL + '/farm/activityFileUpdate'"
:multiple="false"
:limit="1"
name="fileUpdate"
:file-list="introduceFile"
:on-success="introduceHandleAvatarSuccess">
<el-button size="small" type="text" icon="el-icon-upload2" class="btn-upload"></el-button>
</el-upload>
</el-col>
</el-form-item>-->
<el-form-item label="活动介绍:"> <el-form-item label="活动介绍:">
<el-col :sm="7"> <el-col :sm="7">
<el-input v-model="introduceName" type="textarea" :rows="5"></el-input> <el-input v-model="introduceName" type="textarea" :rows="5" max-length="50"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="活动指引:"> <el-form-item label="活动指引:">
...@@ -47,6 +49,7 @@ ...@@ -47,6 +49,7 @@
:limit="1" :limit="1"
:multiple="false" :multiple="false"
:file-list="guideFile" :file-list="guideFile"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.openxmlformats-officedocument.presentationml.presentation"
:on-success="guideHandleAvatarSuccess"> :on-success="guideHandleAvatarSuccess">
<el-button size="small" type="text" icon="el-icon-upload2" class="btn-upload"></el-button> <el-button size="small" type="text" icon="el-icon-upload2" class="btn-upload"></el-button>
</el-upload> </el-upload>
...@@ -59,6 +62,7 @@ ...@@ -59,6 +62,7 @@
:action="$baseURL + '/farm/photoUpdate'" :action="$baseURL + '/farm/photoUpdate'"
:show-file-list="false" :show-file-list="false"
name="img" name="img"
accept="image/jpeg,image/png"
:on-success="qrcodeHandleAvatarSuccess"> :on-success="qrcodeHandleAvatarSuccess">
<img v-if="qrcodePath" :src="$imgUrl + qrcodePath" class="avatar"> <img v-if="qrcodePath" :src="$imgUrl + qrcodePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
...@@ -97,7 +101,21 @@ export default { ...@@ -97,7 +101,21 @@ export default {
qrcodePath: '', qrcodePath: '',
qrcodeUniqueName: '', qrcodeUniqueName: '',
qrcodeName: '', qrcodeName: '',
introduceName: '' introduceName: '',
pickerOptionsStart: {
disabledDate: time => {
if (this.endTime) {
return time.getTime() > new Date(this.endTime).getTime()
}
}
},
pickerOptionsEnd: {
disabledDate: time => {
if (this.startTime) {
return time.getTime() < new Date(this.startTime).getTime() - 86400000
}
}
}
} }
}, },
mounted () { mounted () {
...@@ -144,22 +162,11 @@ export default { ...@@ -144,22 +162,11 @@ export default {
_this.qrcodePath = res.qrcodePath _this.qrcodePath = res.qrcodePath
}) })
}, },
introduceHandleAvatarSuccess (res, file) { // 活动介绍文件上传
this.introduceFile = [
{
name: file.name,
url: '11111'
}
]
},
guideHandleAvatarSuccess (res, file) { // 活动指引文件上传 guideHandleAvatarSuccess (res, file) { // 活动指引文件上传
console.log(res) this.$set(this.guideFile, 0, {
this.guideFile = [ name: res.data.fileOriginalName,
{ url: res.data.filePath
name: file.name, })
url: '22222'
}
]
}, },
qrcodeHandleAvatarSuccess (res, file) { // 二维码图片上传 qrcodeHandleAvatarSuccess (res, file) { // 二维码图片上传
this.qrcodePath = res.data.filePath this.qrcodePath = res.data.filePath
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<el-form :inline="true" class="demo-form-inline" size="small"> <el-form :inline="true" class="demo-form-inline" size="small">
<el-form-item style="float: right"> <el-form-item style="float: right">
<el-upload <el-upload
class="form-top-upload"
style="display: inline-block; margin-right: 20px" style="display: inline-block; margin-right: 20px"
:action="$baseURL + '/exercise/dailyImportModel'" :action="$baseURL + '/exercise/dailyImportModel'"
:multiple="false" :multiple="false"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<el-button type="primary" size="small" @click="centerDialogVisible = true">新增</el-button> <el-button type="primary" size="small" @click="newAddHandle6">新增</el-button>
</div> </div>
<el-table <el-table
:data="photoList" :data="photoList"
...@@ -86,6 +86,19 @@ ...@@ -86,6 +86,19 @@
width="40%" width="40%"
center> center>
<el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true"> <el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图集选择" :label-width="formLabelWidth">
<el-col :sm="18">
<el-select v-model="classifyId" @change="currentPage = 1">
<el-option
v-for="item in classifyList"
:key="item.id"
:v="item.id"
:label="item.classifyName"
:value="item.id">
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath"> <el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18"> <el-col :sm="18">
<el-upload <el-upload
...@@ -93,7 +106,7 @@ ...@@ -93,7 +106,7 @@
:action="$baseURL + '/exercise/photoUpdate'" :action="$baseURL + '/exercise/photoUpdate'"
name="img" name="img"
:show-file-list="false" :show-file-list="false"
:multiple="true" accept="image/jpeg,image/png,image/gif"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar"> <img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
...@@ -206,10 +219,18 @@ export default { ...@@ -206,10 +219,18 @@ export default {
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) { if (!isLt5M) {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传图片大小不能超过 5MB!')
} }
return isLt5M return isLt5M
}, },
newAddHandle6 () {
this.centerDialogVisible = true
this.form.pictureMark = ''
this.form.pictureName = ''
this.form.pictureOriginalName = ''
this.form.imgFilePath = ''
this.form.pictureSize = ''
},
savePicture (myForm) { // 新增 savePicture (myForm) { // 新增
this.$refs[myForm].validate((valid) => { this.$refs[myForm].validate((valid) => {
if (valid) { if (valid) {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
</el-form-item> </el-form-item>
<el-form-item style="float: right"> <el-form-item style="float: right">
<el-upload <el-upload
class="form-top-upload"
style="display: inline-block; margin-right: 20px" style="display: inline-block; margin-right: 20px"
:action="$baseURL + '/exercise/marathonImport'" :action="$baseURL + '/exercise/marathonImport'"
:multiple="false" :multiple="false"
...@@ -42,7 +43,7 @@ ...@@ -42,7 +43,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="competitionEvent" prop="competitionEvent"
align="eventItem" align="center"
label="比赛项目"> label="比赛项目">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -163,7 +164,3 @@ export default { ...@@ -163,7 +164,3 @@ export default {
} }
} }
</script> </script>
<style scoped>
</style>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="活动文章" name="second"> <el-tab-pane label="活动文章" name="second">
<div class="btn-warp tr mb15"> <div class="btn-warp tr mb15">
<el-button type="primary" size="small" @click="articleDialogVisible = true; articleForm.articleTitle = ''; articleForm.editorContent = ''; articleForm.articleType = ''; articleId = ''">文章编辑</el-button> <!--<el-button type="primary" size="small" @click="articleDialogVisible = true; articleForm.articleTitle = ''; articleForm.editorContent = ''; articleForm.articleType = ''; articleId = ''">文章编辑</el-button>-->
<el-button type="primary" size="small" @click="outLinkDialogVisible = true; outLink.articleName = ''; outLink.articleType = ''; outLink.articleLink = ''; articleId = ''">文章链接</el-button> <el-button type="primary" size="small" @click="outLinkDialogVisible = true; outLink.articleName = ''; outLink.articleType = ''; outLink.articleLink = ''; articleId = ''">文章链接</el-button>
</div> </div>
<el-table <el-table
...@@ -110,8 +110,7 @@ ...@@ -110,8 +110,7 @@
width="80" width="80"
label="状态"> label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.activeStatus == 1">发布</div> {{scope.row.activeStatus == '1' ? '发布' : '未发布'}}
<div v-else>不发布</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -135,7 +134,7 @@ ...@@ -135,7 +134,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination" v-if="activityList.length"> <div class="pagination">
<el-pagination <el-pagination
@size-change="handleSizeChange2" @size-change="handleSizeChange2"
@current-change="handleCurrentChange2" @current-change="handleCurrentChange2"
...@@ -160,6 +159,7 @@ ...@@ -160,6 +159,7 @@
:action="$baseURL + '/active/banner/upload'" :action="$baseURL + '/active/banner/upload'"
:multiple="false" :multiple="false"
:show-file-list="false" :show-file-list="false"
accept="image/jpeg,image/png,image/gif"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="actBannerForm.imgFilePath" :src="$imgUrl + actBannerForm.imgFilePath" class="avatar"> <img v-if="actBannerForm.imgFilePath" :src="$imgUrl + actBannerForm.imgFilePath" class="avatar">
...@@ -193,24 +193,24 @@ ...@@ -193,24 +193,24 @@
<el-dialog <el-dialog
title="文章链接" title="文章链接"
:visible.sync="outLinkDialogVisible" :visible.sync="outLinkDialogVisible"
width="35%" width="30%"
center> center>
<el-form :model="outLink" ref="ruleOutLink" label-width="100px"> <el-form :model="outLink" ref="ruleOutLink" label-width="100px">
<el-form-item label="文章名称"> <el-form-item label="文章名称">
<el-col :sm="15"> <el-col :sm="18">
<el-input v-model="outLink.articleName" autocomplete="off"></el-input> <el-input v-model="outLink.articleName" autocomplete="off"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="文章类型"> <el-form-item label="文章类型">
<el-col :sm="15"> <el-col :sm="18">
<el-select v-model="outLink.articleType" placeholder="请选择文章类型" style="width: 100%"> <el-select v-model="outLink.articleType" placeholder="请选择文章类型" style="width: 100%">
<el-option label="活动" value="1"></el-option> <el-option label="活动" :value=1></el-option>
<el-option label="专题" value="2"></el-option> <el-option label="专题" :value=2></el-option>
</el-select> </el-select>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="文章链接"> <el-form-item label="文章链接">
<el-col :sm="15"> <el-col :sm="18">
<el-input v-model="outLink.articleLink" autocomplete="off"></el-input> <el-input v-model="outLink.articleLink" autocomplete="off"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -220,8 +220,8 @@ ...@@ -220,8 +220,8 @@
<el-col :sm="10"> <el-col :sm="10">
<div class="btn-warp"> <div class="btn-warp">
<el-button @click="outLinkDialogVisible = false">取 消</el-button> <el-button @click="outLinkDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="addOutLink()" v-if="articleId == ''">发 布</el-button> <el-button type="danger" @click="addOutLink('ruleOutLink')" v-if="articleId == ''">发 布</el-button>
<el-button type="danger" @click="saveOutLink()" v-if="articleId != ''">确 认</el-button> <el-button type="danger" @click="saveOutLink('ruleOutLink')" v-if="articleId != ''">确 认</el-button>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -241,8 +241,8 @@ ...@@ -241,8 +241,8 @@
<el-form-item label="文章类型"> <el-form-item label="文章类型">
<el-col :sm="10"> <el-col :sm="10">
<el-select v-model="articleForm.articleType" placeholder="请选择文章类型" style="width: 100%"> <el-select v-model="articleForm.articleType" placeholder="请选择文章类型" style="width: 100%">
<el-option label="活动" value="1"></el-option> <el-option label="活动" :value=1></el-option>
<el-option label="专题" value="2"></el-option> <el-option label="专题" :value=2></el-option>
</el-select> </el-select>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -359,7 +359,7 @@ export default { ...@@ -359,7 +359,7 @@ export default {
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) { if (!isLt5M) {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传图片大小不能超过 5MB!')
} }
return isLt5M return isLt5M
}, },
...@@ -440,7 +440,7 @@ export default { ...@@ -440,7 +440,7 @@ export default {
this.$axios.get('/active/banner/delete/' + item.id) this.$axios.get('/active/banner/delete/' + item.id)
.then(function (res) { .then(function (res) {
if (res) { if (res) {
_this.currentPage1 = 1 // _this.currentPage1 = 1
_this._getActiveBannerList() _this._getActiveBannerList()
_this.$message({ _this.$message({
type: 'success', type: 'success',
...@@ -497,7 +497,7 @@ export default { ...@@ -497,7 +497,7 @@ export default {
this.$axios.get('/active/delete/' + id) this.$axios.get('/active/delete/' + id)
.then(function (res) { .then(function (res) {
if (res) { if (res) {
_this.currentPage2 = 1 // _this.currentPage2 = 1
_this._getActiveList() _this._getActiveList()
_this.$message({ _this.$message({
type: 'success', type: 'success',
...@@ -505,10 +505,11 @@ export default { ...@@ -505,10 +505,11 @@ export default {
}) })
} }
}) })
}).catch(() => { console.log('取消删除') }) })
}, },
articleEdit (item) { articleEdit (item) {
this.articleId = item.id this.articleId = item.id
console.log(item)
if (item.linkType === 1) { if (item.linkType === 1) {
this.articleForm.articleTitle = item.activeTitle this.articleForm.articleTitle = item.activeTitle
this.articleForm.articleType = item.activeType this.articleForm.articleType = item.activeType
...@@ -572,6 +573,10 @@ export default { ...@@ -572,6 +573,10 @@ export default {
this.$axios.post('/active/add/links', params) this.$axios.post('/active/add/links', params)
.then(function (res) { .then(function (res) {
if (res) { if (res) {
_this.$message({
type: 'success',
message: '文章添加成功!'
})
_this._getActiveList() _this._getActiveList()
_this.outLinkDialogVisible = false _this.outLinkDialogVisible = false
} }
...@@ -589,7 +594,11 @@ export default { ...@@ -589,7 +594,11 @@ export default {
} }
this.$axios.post('/active/update/links', params) this.$axios.post('/active/update/links', params)
.then(function (res) { .then(function (res) {
if (res === 'OK') { if (res) {
_this.$message({
type: 'success',
message: '文章修改成功!'
})
_this._getActiveList() _this._getActiveList()
_this.outLinkDialogVisible = false _this.outLinkDialogVisible = false
} }
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
prop="bannerStatus" prop="bannerStatus"
align="center" align="center"
label="状态"> label="状态">
<template slot-scope="scope">
{{scope.row.bannerStatus == '1' ? '发布' : '未发布'}}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
...@@ -86,6 +89,7 @@ ...@@ -86,6 +89,7 @@
class="avatar-uploader" class="avatar-uploader"
:action="$baseURL + '/index/banner/upload'" :action="$baseURL + '/index/banner/upload'"
:show-file-list="false" :show-file-list="false"
accept="image/jpeg,image/png,image/gif"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar"> <img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
...@@ -109,8 +113,16 @@ ...@@ -109,8 +113,16 @@
</el-form-item> </el-form-item>
<el-form-item label="轮播排序" :label-width="formLabelWidth"> <el-form-item label="轮播排序" :label-width="formLabelWidth">
<el-col :sm="18"> <el-col :sm="18">
<el-input-number v-model="form.bannerOrder" :min="1" :max="8" label="排序"></el-input-number> <!--<el-input-number v-model="form.bannerOrder" :min="1" :max="8" label="排序"></el-input-number>-->
<p style="font-size: 12px">*首页轮播图最多8张</p> <!--<p style="font-size: 12px">*首页轮播图最多8张</p>-->
<el-select v-model="form.bannerOrder" placeholder="请选择">
<el-option
v-for="(item, index) in [1,2,3,4,5,6,7,8]"
:key="index"
:label="item"
:value="item">
</el-option>
</el-select>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="外链文章" :label-width="formLabelWidth"> <el-form-item label="外链文章" :label-width="formLabelWidth">
...@@ -232,7 +244,7 @@ export default { ...@@ -232,7 +244,7 @@ export default {
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) { if (!isLt5M) {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传图片大小不能超过 5MB!')
} }
return isLt5M return isLt5M
}, },
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<el-row class="mb20"> <el-row class="mb20">
<el-col :span="4" align="center">链接名称</el-col> <el-col :span="4" align="center">链接名称</el-col>
<el-col :span="12"> <el-col :span="12">
<el-input v-model="linkName" placeholder="请输入图片描述" maxlength="8"></el-input> <el-input v-model="linkName" placeholder="请输入链接名称" maxlength="8"></el-input>
</el-col> </el-col>
<el-col :span="7" :offset="1"> <el-col :span="7" :offset="1">
<p>*链接名称最多8个汉字</p> <p>*链接名称最多8个汉字</p>
...@@ -138,6 +138,10 @@ export default { ...@@ -138,6 +138,10 @@ export default {
addLink () { addLink () {
this.centerDialogVisible = true this.centerDialogVisible = true
this.isAdd = true this.isAdd = true
this.linkOrder = ''
this.linkName = ''
this.linkUrl = ''
this.linkItemId = ''
}, },
_getCommonList () { _getCommonList () {
let _this = this let _this = this
...@@ -180,7 +184,7 @@ export default { ...@@ -180,7 +184,7 @@ export default {
} }
this.$axios.post(requestUrl, params) this.$axios.post(requestUrl, params)
.then(function (res) { .then(function (res) {
if (res === 'OK') { if (res) {
_this._getCommonList() _this._getCommonList()
_this.$message({ _this.$message({
type: 'success', type: 'success',
......
...@@ -39,49 +39,32 @@ ...@@ -39,49 +39,32 @@
<el-table-column <el-table-column
align="center" align="center"
prop="personDept" prop="personDept"
:show-overflow-tooltip="true"
label="组织架构" label="组织架构"
width="320"> width="320">
<template slot-scope="scope">
<el-popover
ref="popover{{$index}}"
placement="top-start"
width="350"
:popper-options="{
boundariesElement: 'body'
}"
trigger="hover">
<div class="tc">{{scope.row.personDept}}</div>
<a href="javascript:;" slot="reference" class="a_hover">{{scope.row.personDept}}</a>
</el-popover>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="workPlace"
align="center" align="center"
label="工作地点" prop="messageContent"
width="150"> :show-overflow-tooltip="true"
label="留言"
width="300">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="moduleId" prop="moduleId"
label="留言版块" label="留言版块"
width="150"> width="150">
<template slot-scope="scope">
{{moduleIdComp(scope.row.moduleId)}}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="workPlace"
align="center" align="center"
prop="messageContent" :show-overflow-tooltip="true"
label="留言" label="工作地点"
width="250"> width="200">
<template slot-scope="scope">
<el-popover
ref="popover{{$index}}"
placement="top-start"
width="300"
trigger="hover">
<div class="tc">{{scope.row.messageContent}}</div>
<a href="javascript:;" slot="reference" class="a_hover">{{scope.row.messageContent}}</a>
</el-popover>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
...@@ -187,15 +170,17 @@ export default { ...@@ -187,15 +170,17 @@ export default {
}, },
_getMessageList () { // 留言列表 _getMessageList () { // 留言列表
let _this = this let _this = this
let params = { this.$axios.get('/leave/message/list', {
params: {
'p': _this.currentPage, 'p': _this.currentPage,
'c': _this.pageSize, 'c': _this.pageSize,
'moduleId': _this.moduleVal 'moduleId': _this.moduleVal
} }
this.$axios.post('/leave/message/list', params) }).then(function (res) {
.then(function (res) { if (res) {
_this.messageList = res.list _this.messageList = res.list
_this.count = res.count _this.count = res.count
}
}) })
}, },
handleSizeChange: function (size) { handleSizeChange: function (size) {
...@@ -232,7 +217,7 @@ export default { ...@@ -232,7 +217,7 @@ export default {
_this.$message({ _this.$message({
type: 'success', type: 'success',
message: '确认处理成功!' message: '确认处理成功!'
}); })
} }
}) })
}).catch(function () { }).catch(function () {
...@@ -241,7 +226,7 @@ export default { ...@@ -241,7 +226,7 @@ export default {
} }
}, },
computed: { computed: {
messageStatusComp (messageStatus) { messageStatusComp (messageStatus) { // 处理状态
return function (messageStatus) { return function (messageStatus) {
if (messageStatus === 1) { if (messageStatus === 1) {
return '未确认' return '未确认'
...@@ -249,6 +234,15 @@ export default { ...@@ -249,6 +234,15 @@ export default {
return '已确认' return '已确认'
} }
} }
},
moduleIdComp (moduleId) { // 留言板块
return function (moduleId) {
for (let i in this.moduleList) {
if (this.moduleList[i] === moduleId) {
return i
}
}
}
} }
} }
} }
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</el-pagination> </el-pagination>
</div> </div>
<el-dialog <el-dialog
title="无忧办公" title="萌妈工作室"
:visible.sync="centerDialogVisible" :visible.sync="centerDialogVisible"
width="40%" width="40%"
center> center>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
class="avatar-uploader" class="avatar-uploader"
:action="$baseURL + '/roomofmother/picture/upload'" :action="$baseURL + '/roomofmother/picture/upload'"
:show-file-list="false" :show-file-list="false"
:multiple="true" accept="image/jpeg,image/png,image/gif"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar"> <img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
...@@ -143,8 +143,9 @@ export default { ...@@ -143,8 +143,9 @@ export default {
pictureName: '', pictureName: '',
pictureOriginalName: '', pictureOriginalName: '',
pictureSize: '', pictureSize: '',
pictureOrder: '', // pictureOrder: '',
pictureMark: '' pictureMark: '',
imgFilePath: ''
} }
} }
}, },
...@@ -189,7 +190,7 @@ export default { ...@@ -189,7 +190,7 @@ export default {
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) { if (!isLt5M) {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传图片大小不能超过 5MB!')
} }
return isLt5M return isLt5M
}, },
......
...@@ -86,6 +86,19 @@ ...@@ -86,6 +86,19 @@
width="40%" width="40%"
center> center>
<el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true"> <el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图集选择" :label-width="formLabelWidth">
<el-col :sm="18">
<el-select v-model="classifyId" @change="currentPage = 1">
<el-option
v-for="item in classifyList"
:key="item.id"
:v="item.id"
:label="item.classifyName"
:value="item.id">
</el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath"> <el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18"> <el-col :sm="18">
<el-upload <el-upload
...@@ -93,7 +106,7 @@ ...@@ -93,7 +106,7 @@
:action="$baseURL + '/office/picture/upload'" :action="$baseURL + '/office/picture/upload'"
name="files" name="files"
:show-file-list="false" :show-file-list="false"
:multiple="true" accept="image/jpeg,image/png,image/gif"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar"> <img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
...@@ -145,7 +158,7 @@ export default { ...@@ -145,7 +158,7 @@ export default {
classifyList: [], // 图集分类 classifyList: [], // 图集分类
classifyId: '', // 图集ID classifyId: '', // 图集ID
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 5,
totalPage: null, totalPage: null,
photoList: [], photoList: [],
centerDialogVisible: false, centerDialogVisible: false,
...@@ -154,8 +167,9 @@ export default { ...@@ -154,8 +167,9 @@ export default {
pictureName: '', pictureName: '',
pictureOriginalName: '', pictureOriginalName: '',
pictureSize: '', pictureSize: '',
pictureOrder: '', // pictureOrder: '',
pictureMark: '' pictureMark: '',
imgFilePath: ''
} }
} }
}, },
...@@ -203,10 +217,9 @@ export default { ...@@ -203,10 +217,9 @@ export default {
this.form.imgFilePath = res.data[0].filePath this.form.imgFilePath = res.data[0].filePath
}, },
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
console.log(file)
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) { if (!isLt5M) {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传图片大小不能超过 5MB!')
} }
return isLt5M return isLt5M
}, },
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
:action="$baseURL + 'warmth/pictureUpdate'" :action="$baseURL + 'warmth/pictureUpdate'"
name="img" name="img"
:show-file-list="false" :show-file-list="false"
:multiple="true" accept="image/jpeg,image/png,image/gif"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar"> <img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
...@@ -181,7 +181,7 @@ export default { ...@@ -181,7 +181,7 @@ export default {
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) { if (!isLt5M) {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传图片大小不能超过 5MB!')
} }
return isLt5M return isLt5M
}, },
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
</el-pagination> </el-pagination>
</div> </div>
<el-dialog <el-dialog
title="新增书籍" :title="diaBookName"
:visible.sync="bookDialogVisible" :visible.sync="bookDialogVisible"
width="40%" width="40%"
center> center>
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
:action="$baseURL + 'library/cover/upload'" :action="$baseURL + 'library/cover/upload'"
accept="image/jpeg,image/png,image/gif"
:show-file-list="false" :show-file-list="false"
:on-success="handleAvatarSuccess"> :on-success="handleAvatarSuccess">
<img v-if="bookDialogForm.bookOver" :src="$imgUrl + bookDialogForm.bookOver" class="avatar"> <img v-if="bookDialogForm.bookOver" :src="$imgUrl + bookDialogForm.bookOver" class="avatar">
...@@ -129,7 +130,7 @@ ...@@ -129,7 +130,7 @@
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="排序">
<el-col :sm="6"> <el-col :sm="6">
<el-input-number v-model="bookDialogForm.bookOrder" :min="1" style="width: 100%"></el-input-number> <el-input-number v-model="bookDialogForm.bookOrder" :min="1" :max="999" style="width: 100%"></el-input-number>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="出版日期"> <el-form-item label="出版日期">
...@@ -188,7 +189,8 @@ export default { ...@@ -188,7 +189,8 @@ export default {
authorIntroduce: '', authorIntroduce: '',
booksIntroduce: '' booksIntroduce: ''
}, },
bookId: '' bookId: '',
diaBookName: ''
} }
}, },
mounted () { mounted () {
...@@ -217,6 +219,7 @@ export default { ...@@ -217,6 +219,7 @@ export default {
this._getBookList() this._getBookList()
}, },
newBookHandle () { newBookHandle () {
this.diaBookName = '新增书籍'
this.bookDialogVisible = true this.bookDialogVisible = true
this.bookId = '' this.bookId = ''
this.bookDialogForm.bookName = '' this.bookDialogForm.bookName = ''
...@@ -250,6 +253,7 @@ export default { ...@@ -250,6 +253,7 @@ export default {
}) })
}, },
bookEdit (item) { // 编辑 bookEdit (item) { // 编辑
this.diaBookName = '编辑书籍'
this.bookDialogForm.author = item.author this.bookDialogForm.author = item.author
this.bookDialogForm.authorIntroduce = item.authorIntroduce this.bookDialogForm.authorIntroduce = item.authorIntroduce
this.bookDialogForm.booksIntroduce = item.booksIntroduce this.bookDialogForm.booksIntroduce = item.booksIntroduce
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
<div> <div>
<el-form :inline="true" class="demo-form-inline"> <el-form :inline="true" class="demo-form-inline">
<el-form-item> <el-form-item>
<el-select v-model="provinceId" placeholder="省份" style="width: 100%" @change="_getCityList"> <el-select v-model="provinceId" placeholder="省份" style="width: 100%" @change="selectProvinceHandle">
<el-option :label="item.provinceName" :value="item.id" v-for="(item, index) in provinceTableData" :key="index"></el-option> <el-option :label="item.provinceName" :value="item.id" v-for="(item, index) in provinceTableData" :key="index"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="cityId" placeholder="市区" style="width: 100%"> <el-select v-model="cityId" placeholder="市区" style="width: 100%" @change="selectCityHandle">
<el-option label="全部" value=""></el-option>
<el-option :label="item.cityName" :value="item.id" v-for="(item, index) in cityTableData" :key="index"></el-option> <el-option :label="item.cityName" :value="item.id" v-for="(item, index) in cityTableData" :key="index"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -121,6 +122,7 @@ ...@@ -121,6 +122,7 @@
class="avatar-uploader" class="avatar-uploader"
:action="$baseURL + 'diningroom/menu/upload'" :action="$baseURL + 'diningroom/menu/upload'"
:show-file-list="false" :show-file-list="false"
accept="image/jpeg,image/png"
:on-success="handleAvatarSuccess"> :on-success="handleAvatarSuccess">
<img v-if="ruleForm.imgFilePath" :src="$imgUrl + ruleForm.imgFilePath" class="avatar"> <img v-if="ruleForm.imgFilePath" :src="$imgUrl + ruleForm.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
...@@ -132,6 +134,14 @@ ...@@ -132,6 +134,14 @@
<el-input v-model="ruleForm.resImgName" disabled="disabled"></el-input> <el-input v-model="ruleForm.resImgName" disabled="disabled"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="客户端选择">
<el-col :sm="8">
<el-select v-model="clientType" style="width: 100%">
<el-option label="pc" :value="2"></el-option>
<el-option label="移动端" :value="1"></el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="日期"> <el-form-item label="日期">
<el-col :sm="8"> <el-col :sm="8">
<el-date-picker style="width: 100%" v-model="ruleForm.imgDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"> <el-date-picker style="width: 100%" v-model="ruleForm.imgDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
...@@ -175,7 +185,8 @@ export default { ...@@ -175,7 +185,8 @@ export default {
imgDate: '' imgDate: ''
}, },
diningRoomId: '', diningRoomId: '',
diningRoomNameDia: '' diningRoomNameDia: '',
clientType: 2
} }
}, },
mounted () { mounted () {
...@@ -190,12 +201,18 @@ export default { ...@@ -190,12 +201,18 @@ export default {
_this.provinceTableData = res _this.provinceTableData = res
_this.provinceTableData.forEach(function (val, key) { _this.provinceTableData.forEach(function (val, key) {
if (val.provinceName === '全国') { if (val.provinceName === '全国') {
_this.quguoId = val.id // _this.quguoId = val.id
val.id = ''
} }
}) })
_this._getCityList() _this._getCityList()
}) })
}, },
selectProvinceHandle () {
this.cityId = ''
this.diningRoomName = ''
this._getCityList()
},
_getCityList () { // 获取城市列表 _getCityList () { // 获取城市列表
let _this = this let _this = this
this.$axios.get('/diningroom/city/list', { this.$axios.get('/diningroom/city/list', {
...@@ -206,6 +223,9 @@ export default { ...@@ -206,6 +223,9 @@ export default {
_this.cityTableData = res _this.cityTableData = res
}) })
}, },
selectCityHandle () {
this.diningRoomName = ''
},
_getRestaurantList () { // 餐厅列表 _getRestaurantList () { // 餐厅列表
let _this = this let _this = this
this.$axios.get('/diningroom/list', { this.$axios.get('/diningroom/list', {
...@@ -213,7 +233,8 @@ export default { ...@@ -213,7 +233,8 @@ export default {
'p': _this.currentPage, 'p': _this.currentPage,
'c': _this.pageSize, 'c': _this.pageSize,
'diningRoomName': _this.diningRoomName, 'diningRoomName': _this.diningRoomName,
'provinceId': _this.provinceId === _this.quguoId ? '' : _this.provinceId, // 'provinceId': _this.provinceId === _this.quguoId ? '' : _this.provinceId,
'provinceId': _this.provinceId,
'cityId': _this.cityId 'cityId': _this.cityId
} }
}).then(function (res) { }).then(function (res) {
...@@ -274,7 +295,7 @@ export default { ...@@ -274,7 +295,7 @@ export default {
'diningRoomId': _this.diningRoomId, 'diningRoomId': _this.diningRoomId,
'menuDate': _this.ruleForm.imgDate, 'menuDate': _this.ruleForm.imgDate,
'menuUrl': _this.ruleForm.imgFilePath, 'menuUrl': _this.ruleForm.imgFilePath,
'type': 2 'type': _this.clientType
} }
this.$axios.post('/diningroom/menu/add', params) this.$axios.post('/diningroom/menu/add', params)
.then(function (res) { .then(function (res) {
......
...@@ -8,12 +8,26 @@ ...@@ -8,12 +8,26 @@
</el-form-item> </el-form-item>
<el-form-item label="开始日期"> <el-form-item label="开始日期">
<el-col :sm="5"> <el-col :sm="5">
<el-date-picker v-model="startDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%"></el-date-picker> <el-date-picker
v-model="startDate"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptionsStart"
placeholder="选择日期"
style="width: 100%">
</el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="结束日期"> <el-form-item label="结束日期">
<el-col :sm="5"> <el-col :sm="5">
<el-date-picker v-model="endDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%"></el-date-picker> <el-date-picker
v-model="endDate"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptionsEnd"
placeholder="选择日期"
style="width: 100%">
</el-date-picker>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="年份"> <el-form-item label="年份">
...@@ -82,7 +96,21 @@ export default { ...@@ -82,7 +96,21 @@ export default {
healthSoup: '', healthSoup: '',
healthDish: '', healthDish: '',
termCharacteristic: '', termCharacteristic: '',
termHealth: '' termHealth: '',
pickerOptionsStart: {
disabledDate: time => {
if (this.endDate) {
return time.getTime() > new Date(this.endDate).getTime()
}
}
},
pickerOptionsEnd: {
disabledDate: time => {
if (this.startDate) {
return time.getTime() < new Date(this.startDate).getTime() - 86400000
}
}
}
} }
}, },
mounted () { mounted () {
......
...@@ -397,12 +397,13 @@ export default { ...@@ -397,12 +397,13 @@ export default {
"countyName": _this.countyName, "countyName": _this.countyName,
"diningRoomName": _this.restaurantName, "diningRoomName": _this.restaurantName,
"id": _this.$route.params.itemObj.id, "id": _this.$route.params.itemObj.id,
"lat": _this.Latitude, "lat": _this.latitude,
"lng": _this.longitude, "lng": _this.longitude,
"personMobile": _this.contactWay, "personMobile": _this.contactWay,
"personName": _this.responsibleMan, "personName": _this.responsibleMan,
"provinceId": _this.selectProvinceId "provinceId": _this.selectProvinceId
} }
console.log(_this.latitude)
this.$axios.post('/diningroom/update', params) this.$axios.post('/diningroom/update', params)
.then(function (res) { .then(function (res) {
if (res === 'ok') { if (res === 'ok') {
......
...@@ -81,8 +81,8 @@ ...@@ -81,8 +81,8 @@
class="avatar-uploader" class="avatar-uploader"
:action="$baseURL + '/diningroom/picture/upload'" :action="$baseURL + '/diningroom/picture/upload'"
:show-file-list="false" :show-file-list="false"
:multiple="true"
name="files" name="files"
accept="image/jpeg,image/png"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="picturePath" :src="$imgUrl + picturePath" class="avatar"> <img v-if="picturePath" :src="$imgUrl + picturePath" class="avatar">
...@@ -96,11 +96,11 @@ ...@@ -96,11 +96,11 @@
<el-input v-model="pictureSize" autocomplete="off" disabled="disabled"></el-input> <el-input v-model="pictureSize" autocomplete="off" disabled="disabled"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="图片排序"> <!-- <el-form-item label="图片排序">
<el-col :sm="18"> <el-col :sm="18">
<el-input-number v-model="pictureOrder" controls-position="right" :min="1"></el-input-number> <el-input-number v-model="pictureOrder" controls-position="right" :min="1"></el-input-number>
</el-col> </el-col>
</el-form-item> </el-form-item>-->
<el-form-item label="备注"> <el-form-item label="备注">
<el-col :sm="5"> <el-col :sm="5">
<el-input v-model="pictureMark" autocomplete="off" type="textarea" :rows="5"></el-input> <el-input v-model="pictureMark" autocomplete="off" type="textarea" :rows="5"></el-input>
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<el-input v-model="classfiyForm.classifyName" autocomplete="off"></el-input> <el-input v-model="classfiyForm.classifyName" autocomplete="off"></el-input>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="图集名称"> <el-form-item label="图集排序">
<el-col :sm="15"> <el-col :sm="15">
<el-input-number v-model="classfiyForm.classifyOrder" controls-position="right" :min="1"></el-input-number> <el-input-number v-model="classfiyForm.classifyOrder" controls-position="right" :min="1"></el-input-number>
</el-col> </el-col>
...@@ -197,7 +197,11 @@ export default { ...@@ -197,7 +197,11 @@ export default {
} }
this.$axios.post('/diningroom/picture/classify/add', params) this.$axios.post('/diningroom/picture/classify/add', params)
.then(function (res) { .then(function (res) {
if (res === 'OK') { if (res) {
_this.$message({
type: 'success',
message: '添加成功!'
})
_this._getClassify() _this._getClassify()
} }
}) })
...@@ -251,7 +255,7 @@ export default { ...@@ -251,7 +255,7 @@ export default {
beforeAvatarUpload (file) { beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5 const isLt5M = file.size / 1024 / 1024 < 5
if (!isLt5M) { if (!isLt5M) {
this.$message.error('上传头像图片大小不能超过 5MB!') this.$message.error('上传图片大小不能超过 5MB!')
} }
return isLt5M return isLt5M
}, },
...@@ -261,7 +265,7 @@ export default { ...@@ -261,7 +265,7 @@ export default {
'classifyId': _this.classifyId, 'classifyId': _this.classifyId,
'pictureMark': _this.pictureMark, 'pictureMark': _this.pictureMark,
'pictureName': _this.pictureName, 'pictureName': _this.pictureName,
'pictureOrder': _this.pictureOrder, // 'pictureOrder': _this.pictureOrder,
'pictureOriginalName': _this.pictureOriginalName, 'pictureOriginalName': _this.pictureOriginalName,
'picturePath': _this.picturePath, 'picturePath': _this.picturePath,
'pictureSize': _this.pictureSize 'pictureSize': _this.pictureSize
......
...@@ -62,6 +62,16 @@ ...@@ -62,6 +62,16 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="type"
label="客户端"
width="150">
<template slot-scope="scope">
<span v-if="scope.row.type === 2">pc端</span>
<span v-if="scope.row.type === 1">移动端</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作" label="操作"
width="150"> width="150">
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="solar-calendar"> <div class="solar-calendar">
<el-form :inline="true" class="demo-form-inline" size="small"> <el-form :inline="true" class="demo-form-inline" size="small">
<el-form-item> <el-form-item>
<el-date-picker v-model="termYear" align="right" type="year" placeholder="选择年"></el-date-picker> <el-date-picker v-model="termYear" align="right" type="year" value-format="yyyy" placeholder="选择年"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input v-model="solarTerm" placeholder="节气名称"></el-input> <el-input v-model="solarTerm" placeholder="节气名称"></el-input>
...@@ -44,11 +44,13 @@ ...@@ -44,11 +44,13 @@
<el-table-column <el-table-column
prop="termCharacteristic" prop="termCharacteristic"
align="center" align="center"
width="320"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
label="气候特点"> label="气候特点">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="termHealth" prop="termHealth"
width="320"
align="center" align="center"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
label="养生"> label="养生">
...@@ -88,6 +90,7 @@ ...@@ -88,6 +90,7 @@
<el-table-column <el-table-column
align="center" align="center"
label="操作" label="操作"
fixed="right"
width="150"> width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button icon="el-icon-edit" size="small" @click="solarEditHandle(scope.row)"></el-button> <el-button icon="el-icon-edit" size="small" @click="solarEditHandle(scope.row)"></el-button>
......
...@@ -33,11 +33,11 @@ ...@@ -33,11 +33,11 @@
<img :src="$imgUrl + scope.row.picturePath" width="220" height="60" /> <img :src="$imgUrl + scope.row.picturePath" width="220" height="60" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
prop="pictureName" prop="pictureOriginalName"
align="center" align="center"
label="名称"> label="名称">
</el-table-column> </el-table-column>-->
<el-table-column <el-table-column
prop="pictureSize" prop="pictureSize"
align="center" align="center"
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
<el-col :sm="4"> <el-col :sm="4">
<el-select v-model="starclass" style="width: 100%"> <el-select v-model="starclass" style="width: 100%">
<el-option label="快捷" value="快捷"></el-option> <el-option label="快捷" value="快捷"></el-option>
<el-option label="商务" value="商务"></el-option>
<el-option label="三星" value="三星"></el-option> <el-option label="三星" value="三星"></el-option>
<el-option label="四星" value="四星"></el-option> <el-option label="四星" value="四星"></el-option>
<el-option label="五星" value="五星"></el-option> <el-option label="五星" value="五星"></el-option>
...@@ -213,7 +214,7 @@ export default { ...@@ -213,7 +214,7 @@ export default {
// _this.dockingphone = res[0].dockingphone // _this.dockingphone = res[0].dockingphone
_this.classMap = res[0].classMap _this.classMap = res[0].classMap
_this.starclass = res[0].starclass _this.starclass = res[0].starclass
_this.isrecommend = res[0].isrecommend _this.isrecommend = res[0].isrecommend ? res[0].isrecommend.toString() : ''
_this.contractperiod = res[0].contractperiod _this.contractperiod = res[0].contractperiod
_this.termofvalidity = res[0].termofvalidity _this.termofvalidity = res[0].termofvalidity
_this.remarks = res[0].remarks _this.remarks = res[0].remarks
...@@ -222,17 +223,18 @@ export default { ...@@ -222,17 +223,18 @@ export default {
} }
}, },
createMap (longitude, latitude) { createMap (longitude, latitude) {
console.log(longitude, latitude)
/* eslint-disable */ /* eslint-disable */
var map = new BMap.Map('map') var map = new BMap.Map('map')
map.enableScrollWheelZoom(true) map.enableScrollWheelZoom(true)
var point = new BMap.Point(longitude, latitude) var point = new BMap.Point(longitude, latitude)
let marker = new BMap.Marker(point) let marker = new BMap.Marker(point)
map.addOverlay(marker) map.addOverlay(marker)
map.centerAndZoom(point, 15) map.centerAndZoom(point, 12)
/* eslint-disable */ /* eslint-disable */
}, },
searchMap () { searchMap () {
this.createMap(this.form.longitude, this.form.latitude) this.createMap(this.longitude, this.latitudel)
}, },
roomAdd () { // 新增房型 roomAdd () { // 新增房型
this.classMap.push({ this.classMap.push({
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
label="公司联系人电话" label="公司联系人电话"
width="120"> width="120">
</el-table-column> </el-table-column>
<el-table-column <!--<el-table-column
prop="type" prop="type"
align="center" align="center"
width="120" width="120"
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
width="100" width="100"
align="center" align="center"
label="价格"> label="价格">
</el-table-column> </el-table-column>-->
<el-table-column <el-table-column
prop="starclass" prop="starclass"
align="center" align="center"
...@@ -146,9 +146,10 @@ ...@@ -146,9 +146,10 @@
align="center" align="center"
fixed="right" fixed="right"
label="操作" label="操作"
width="140"> width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button icon="el-icon-edit" size="small" @click="hotelEdit(scope.row)"></el-button> <el-button icon="el-icon-edit" size="small" @click="hotelEdit(scope.row)"></el-button>
<el-button type="text" @click="seeRoomList(scope.row.id)">酒店房型</el-button>
<el-button icon="el-icon-delete" size="small" @click="hotelDel(scope.row)"></el-button> <el-button icon="el-icon-delete" size="small" @click="hotelDel(scope.row)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -163,6 +164,18 @@ ...@@ -163,6 +164,18 @@
:total="totalPage"> :total="totalPage">
</el-pagination> </el-pagination>
</div> </div>
<el-dialog
:title="hotelnameDia"
:visible.sync="classMapDialogVisible"
width="35%"
center>
<el-card class="box-card">
<div v-for="(item, index) in classMap" :key="index" class="room-item">
<span>{{item.type}}</span>
<span>{{item.price}}</span>
</div>
</el-card>
</el-dialog>
</div> </div>
</template> </template>
...@@ -179,7 +192,10 @@ export default { ...@@ -179,7 +192,10 @@ export default {
pageSize: 10, pageSize: 10,
totalPage: null, totalPage: null,
tableData: [], tableData: [],
exportHref: '' exportHref: '',
classMapDialogVisible: false,
classMap: [],
hotelnameDia: ''
} }
}, },
mounted () { mounted () {
...@@ -246,11 +262,25 @@ export default { ...@@ -246,11 +262,25 @@ export default {
} else { } else {
this.$message.success('导入失败!') this.$message.success('导入失败!')
} }
},
seeRoomList (id) { // 查看酒店房型
let _this = this
this.$axios.get('/travel/update/list', {
params: {
'id': id
}
}).then(function (res) {
_this.hotelnameDia = res[0].hotelname
_this.classMap = res[0].classMap
_this.classMapDialogVisible = true
})
} }
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.room-item {display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
span {color: #666666}
}
</style> </style>
...@@ -5,5 +5,11 @@ module.exports = { ...@@ -5,5 +5,11 @@ module.exports = {
externals: { externals: {
'BMap': 'BMap' 'BMap': 'BMap'
} }
},
chainWebpack: config => {
// 移除 prefetch 插件
config.plugins.delete('prefetch')
// 移除 preload 插件
config.plugins.delete('preload')
} }
} }
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 sign in to comment