Commit b25b1108 by dongjipeng

add

parent 556c010d
File added
......@@ -43,6 +43,7 @@ button {outline: none; border: none; background: transparent; cursor: pointer}
.tr {text-align: right}
/* margin */
.ma {margin: auto}
.mt10 {margin-top: 10px;}
.mt30 {margin-top: 30px;}
.mt50 {margin-top: 50px;}
......@@ -50,6 +51,8 @@ button {outline: none; border: none; background: transparent; cursor: pointer}
.mb15 {margin-bottom: 15px;}
.mb20 {margin-bottom: 20px;}
.mb30 {margin-bottom: 30px;}
.mr10 {margin-right: 10px;}
.mr20 {margin-right: 20px;}
.mr30 {margin-right: 30px;}
.ml30 {margin-left: 30px;}
......
......@@ -3,7 +3,7 @@
<div class="header_inner">
<h2>华夏幸福+ 平台管理系统</h2>
<ul>
<li><a href="">郭玉洁</a></li>
<li class="user_self"><a href="">郭玉洁</a></li>
<li class="exit_app"><a href="">退出登录</a></li>
<li class="change_pwd"><a href="">修改密码</a></li>
</ul>
......@@ -20,7 +20,7 @@ export default {
<style scoped lang="scss">
.header {
height: 70px!important;
padding: 0 17px;
padding: 0 20px;
background: #314057;
box-sizing: border-box;
position: fixed;
......@@ -29,7 +29,19 @@ export default {
left: 0;
top: 0;
.header_inner {display: flex; align-items: center; justify-content: space-between; height: 100%; color: #FEFEFE;
h2 {font-size: 22px; font-weight: normal; padding-left: 100px; color: #ddd}
h2 {font-size: 22px; font-weight: normal; padding-left: 82px; color: #ddd; position: relative;
&:before {
content: "";
display: block;
width: 68px;
height: 50px;
background: url("../assets/img/logo.png") no-repeat center/cover;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
}
ul {float: right;
li {display: inline-block; vertical-align: middle; font-size: 14px; position: relative; padding: 0 15px;
a { color: #ddd;
......@@ -47,6 +59,21 @@ export default {
transform: translateY(-50%);
}
}
&.user_self {
padding-left: 34px;
position: relative;
&:before {
content: "";
display: block;
width: 24px;
height: 24px;
background: url("../assets/img/icon/ico_user.png") no-repeat center/cover;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
}
}
}
}
......
......@@ -2,7 +2,7 @@
<el-container style="height: 100%">
<Header></Header>
<el-container class="el_content">
<el-aside width="200px">
<el-aside width="220px">
<el-menu
menu-trigger="hover"
:default-active="$route.path"
......@@ -19,7 +19,7 @@
</el-submenu>
<el-submenu index="2">
<template slot="title"><div class="tc">幸福餐厅</div></template>
<el-menu-item index="/restaurant/ationalRestaurant"><div class="tc">全国餐厅</div></el-menu-item>
<el-menu-item index="/restaurant/rationalRestaurant"><div class="tc">全国餐厅</div></el-menu-item>
<el-menu-item index="/restaurant/restaurantMenus"><div class="tc">餐厅菜单</div></el-menu-item>
<!--<el-menu-item index="/restaurant/foodVideo"><div class="tc">美食视频</div></el-menu-item>-->
<el-menu-item index="/restaurant/solarCalendar"><div class="tc">节气日历</div></el-menu-item>
......@@ -40,7 +40,7 @@
<el-submenu index="5">
<template slot="title"><div class="tc">幸福洗衣</div></template>
<el-menu-item index="/wash/washBranches"><div class="tc">洗衣网点</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="tc">网点编辑</div></el-menu-item>
<el-menu-item index="/wash/commonSense"><div class="tc">洗衣小常识</div></el-menu-item>
</el-submenu>
<el-submenu index="6">
......
......@@ -10,37 +10,72 @@ import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import ElementUi from 'element-ui'
import './element-variables.scss'
import rules from './util/validator'
import '../src/assets/css/reset.scss'
import '../src/assets/css/main.scss'
Vue.use(VueQuillEditor)
Vue.use(ElementUi, { size: 'small' })
Vue.prototype.$rules = rules
Vue.prototype.$axios = axios
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.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
axios.defaults.withCredentials = true
if (process.env.VUE_APP_API_PREFIX === 'development') { // 开发
axios.defaults.baseURL = 'http://10.2.98.32:8081/admin/'
Vue.prototype.$baseURL = 'http://10.2.98.32:8081/admin/'
Vue.prototype.$imgUrl = 'http://10.2.98.32:8081/admin/images/'
Vue.prototype.$export = 'http://10.2.98.32:8081/admin/export/'
axios.defaults.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/'
} else { // 生产
getCookie()
axios.defaults.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.$export = 'http://happy.cfldpe.com/admin/export/'
}
var loading
function startLoading () {
loading = Vue.prototype.$loading({
lock: true,
text: '加载中...',
fullscreen: true,
background: 'rgba(255, 255, 255, 0)'
})
}
function endLoading () {
loading.close()
}
// 添加请求拦截器
axios.interceptors.request.use(request => {
startLoading()
return request
}, err => {
return Promise.reject(err)
})
// 添加响应拦截器
axios.interceptors.response.use(function (response) {
endLoading()
if (response.data.code === '0') {
return response.data.data
} else {
Vue.prototype.$message({
type: 'error',
message: '操作失败!'
})
Vue.prototype.$message.error(response.data.msg)
return Promise.reject(response.data)
}
})
......
......@@ -145,7 +145,7 @@ export default new Router({
name: 'newBranches',
component: NewBranches,
meta: {
title: '新增网点'
title: '网点编辑'
}
},
{
......@@ -285,8 +285,8 @@ export default new Router({
},
children: [
{
path: '/restaurant/ationalRestaurant',
name: 'ationalRestaurant',
path: '/restaurant/rationalRestaurant',
name: 'rationalRestaurant',
component: r => { require(['./views/restaurant/NationalRestaurant'], r) },
meta: {
title: '全国餐厅'
......
export default {
common: {
imgFilePath: { // 图片上传不能为空
required: true,
message: '请上传图片',
trigger: 'blur'
}
}
}
......@@ -85,26 +85,27 @@
<el-dialog
title="幸福社团"
:visible.sync="centerDialogVisible"
width="35%"
width="40%"
center>
<el-form :model="form">
<el-form-item label="图片上传" :label-width="formLabelWidth">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + 'team/upload'"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.picturePath" :src="$imgUrl + form.picturePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-row>
<el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + 'team/upload'"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-form-item>
<el-form-item label="图片名称" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureOriginalName" autocomplete="off" disabled="disabled"></el-input>
</el-col>
</el-form-item>
<el-form-item label="图片大小" :label-width="formLabelWidth">
......@@ -112,11 +113,11 @@
<el-input v-model="form.pictureSize" autocomplete="off" disabled="disabled"></el-input>
</el-col>
</el-form-item>
<el-form-item label="图片排序" :label-width="formLabelWidth">
<!-- <el-form-item label="图片排序" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input-number v-model="form.pictureOrder" controls-position="right" :min="1"></el-input-number>
</el-col>
</el-form-item>
</el-form-item>-->
<el-form-item label="备注" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureMark" autocomplete="off"></el-input>
......@@ -128,7 +129,7 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="savePicture">确 定</el-button>
<el-button type="danger" @click="savePicture('myForm')">确 定</el-button>
</div>
</el-col>
</el-row>
......@@ -174,14 +175,14 @@ export default {
classifyId: '', // 图集ID
qjClassifyId: '',
currentPage: 1,
pageSize: 5,
pageSize: 10,
totalPage: null,
photoList: [],
centerDialogVisible: false,
formLabelWidth: '120px',
form: {
pictureName: '',
picturePath: '',
imgFilePath: '',
pictureOriginalName: '',
pictureSize: '',
pictureOrder: '',
......@@ -280,7 +281,7 @@ export default {
this.form.pictureName = res.data[0].fileName
this.form.pictureOriginalName = res.data[0].fileOriginalName
this.form.pictureSize = res.data[0].fileSize
this.form.picturePath = res.data[0].filePath
this.form.imgFilePath = res.data[0].filePath
},
beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5
......@@ -289,24 +290,28 @@ export default {
}
return isLt5M
},
savePicture () { // 新增
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
'pictureOrder': _this.form.pictureOrder,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.picturePath,
'pictureSize': _this.form.pictureSize
}
this.$axios.post('/team/save', params)
.then(function (res) {
if (res) {
_this._getPhotoList()
_this.centerDialogVisible = false
savePicture (myForm) { // 新增
this.$refs[myForm].validate((valid) => {
if (valid) {
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
// 'pictureOrder': _this.form.pictureOrder,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.imgFilePath,
'pictureSize': _this.form.pictureSize
}
})
this.$axios.post('/team/save', params)
.then(function (res) {
if (res) {
_this._getPhotoList()
_this.centerDialogVisible = false
}
})
} else { return false }
})
},
pictureDel (item) { // 删除
this.$confirm('确定删除这条数据吗?', '提示', {
......
......@@ -25,7 +25,7 @@
<el-table-column
prop="pictureOriginalName"
align="center"
label="标题">
label="名称">
</el-table-column>
<el-table-column
prop="classifyName"
......@@ -55,10 +55,9 @@
<el-table-column
align="center"
label="操作"
width="200">
width="100">
<template slot-scope="scope">
<el-button icon="el-icon-delete" size="small" @click="photoDel(scope.row)"></el-button>
<el-button icon="el-icon-download" size="small"></el-button>
<el-button icon="el-icon-delete" size="small" @click="photoDel(scope.row)" class="ma"></el-button>
</template>
</el-table-column>
</el-table>
......@@ -75,26 +74,22 @@
<el-dialog
title="幸福农场"
:visible.sync="centerDialogVisible"
width="35%"
width="40%"
center>
<el-form :model="form1">
<el-form-item label="图片上传" :label-width="formLabelWidth">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + '/farm/photoUpdate'"
:show-file-list="false"
name="img"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form1.picturePath" :src="$imgUrl + form1.picturePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-row>
<el-form :model="form1" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + '/farm/photoUpdate'"
:show-file-list="false"
name="img"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form1.imgFilePath" :src="$imgUrl + form1.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-form-item>
<el-form-item label="图片名称" :label-width="formLabelWidth">
......@@ -113,7 +108,7 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="uploadImg">确 定</el-button>
<el-button type="danger" @click="uploadImg('myForm')">确 定</el-button>
</div>
</el-col>
</el-row>
......@@ -132,17 +127,17 @@ export default {
centerDialogVisible: false,
imgInter: '',
currentPage: 1,
pageSize: 5,
pageSize: 10,
totalPage: null,
photoList: [],
form1: {
pictureName: '',
pictureOriginalName: '',
pictureSize: '',
picturePath: '',
imgFilePath: '',
pictureMark: ''
},
formLabelWidth: '120px'
formLabelWidth: '100px'
}
},
mounted () {
......@@ -179,7 +174,7 @@ export default {
handleAvatarSuccess (res, file) { // 图片上传
this.form1.pictureName = res.data.fileName
this.form1.pictureOriginalName = res.data.fileOriginalName
this.form1.picturePath = res.data.filePath
this.form1.imgFilePath = res.data.filePath
this.form1.pictureSize = res.data.fileSize
},
beforeAvatarUpload (file) {
......@@ -192,27 +187,31 @@ export default {
addClassifyImg (item) {
this.classifyId = item.id
this.form1.pictureOriginalName = ''
this.form1.picturePath = ''
this.form1.imgFilePath = ''
this.form1.pictureMark = ''
this.centerDialogVisible = true
},
uploadImg () { // 图片添加
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form1.pictureMark,
'pictureName': _this.form1.pictureName,
'pictureOriginalName': _this.form1.pictureOriginalName,
'picturePath': _this.form1.picturePath,
'pictureSize': _this.form1.pictureSize
}
this.$axios.post('/farm/photoAdd', params)
.then(function (res) {
if (res) {
_this._getPhotoList()
_this.centerDialogVisible = false
uploadImg (myForm) { // 图片添加
this.$refs[myForm].validate((valid) => {
if (valid) {
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form1.pictureMark,
'pictureName': _this.form1.pictureName,
'pictureOriginalName': _this.form1.pictureOriginalName,
'picturePath': _this.form1.imgFilePath,
'pictureSize': _this.form1.pictureSize
}
})
this.$axios.post('/farm/photoAdd', params)
.then(function (res) {
if (res) {
_this._getPhotoList()
_this.centerDialogVisible = false
}
})
} else { return false }
})
},
photoDel (item) { // 图片删除
this.$confirm('确定删除这条数据吗?', '提示', {
......
......@@ -32,7 +32,7 @@
<el-table-column
prop="updateTime"
align="center"
label="上传日期">
label="更新日期">
</el-table-column>
<el-table-column
align="center"
......@@ -45,7 +45,7 @@
width="300">
<template slot-scope="scope">
<!-- <el-button icon="el-icon-download" size="small" @click="importCoolRunHandle(scope.row.id)"></el-button>-->
<el-button icon="el-icon-download" size="small"><a :href="$baseURL + '/exercise/dailyDateExport?exerciseDailyId=' + scope.row.id"></a></el-button>
<a :href="$baseURL + '/exercise/dailyDateExport?exerciseDailyId=' + scope.row.id"><el-button icon="el-icon-download" size="small"></el-button></a>
<el-switch
v-model="scope.row.isShow"
@change="switchChange(scope.row)"
......@@ -78,7 +78,7 @@ export default {
data () {
return {
currentPage: 1,
pageSize: 5,
pageSize: 10,
totalPage: null,
dailyList: [],
marathonExportHref: ''
......@@ -161,7 +161,7 @@ export default {
},
handleSuccessMarathon (response, file) { // 酷跑导入数据
if (response.data === 'OK') {
this._getMarathonList()
this._getDailyList()
this.$message.success('导入成功!')
} else {
this.$message.success('导入失败!')
......
......@@ -30,16 +30,16 @@
<img :src="$imgUrl + scope.row.picturePath" width="220" height="60" />
</template>
</el-table-column>
<el-table-column
<!--<el-table-column
prop="pictureOriginalName"
align="center"
label="名称">
</el-table-column>
<el-table-column
</el-table-column>-->
<!--<el-table-column
prop="pictureOrder"
align="center"
label="图片排序">
</el-table-column>
</el-table-column>-->
<el-table-column
prop="pictureSize"
align="center"
......@@ -52,9 +52,9 @@
width="180">
</el-table-column>
<el-table-column
prop="updateUser"
prop="createUser"
align="center"
label="操作人">
label="创建人">
</el-table-column>
<el-table-column
prop="pictureMark"
......@@ -83,30 +83,26 @@
<el-dialog
title="幸福长跑"
:visible.sync="centerDialogVisible"
width="35%"
width="40%"
center>
<el-form :model="form">
<el-form-item label="图片上传" :label-width="formLabelWidth">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + '/exercise/photoUpdate'"
name="img"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.picturePath" :src="$imgUrl + form.picturePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-row>
<el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + '/exercise/photoUpdate'"
name="img"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-form-item>
<el-form-item label="标题" :label-width="formLabelWidth">
<el-form-item label="图片名称" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureOriginalName" autocomplete="off" disabled="disabled"></el-input>
</el-col>
......@@ -116,11 +112,11 @@
<el-input v-model="form.pictureSize" autocomplete="off" disabled="disabled"></el-input>
</el-col>
</el-form-item>
<el-form-item label="图片排序" :label-width="formLabelWidth">
<!-- <el-form-item label="图片排序" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input-number v-model="form.pictureOrder" controls-position="right" :min="1"></el-input-number>
</el-col>
</el-form-item>
</el-form-item>-->
<el-form-item label="备注" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureMark" autocomplete="off"></el-input>
......@@ -132,7 +128,7 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="savePicture">确 定</el-button>
<el-button type="danger" @click="savePicture('myForm')">确 定</el-button>
</div>
</el-col>
</el-row>
......@@ -157,7 +153,7 @@ export default {
form: {
pictureName: '',
pictureOriginalName: '',
picturePath: '',
imgFilePath: '',
pictureSize: '',
pictureOrder: '',
pictureMark: ''
......@@ -194,7 +190,7 @@ export default {
params: {
'p': _this.currentPage,
'c': _this.pageSize,
'exerciseClassifyId': _this.classifyId
'classifyId': _this.classifyId
}
}).then(function (res) {
_this.totalPage = res.count
......@@ -204,7 +200,7 @@ export default {
handleAvatarSuccess (res, file) { // 上传
this.form.pictureName = res.data.fileName
this.form.pictureOriginalName = res.data.fileOriginalName
this.form.picturePath = res.data.filePath
this.form.imgFilePath = res.data.filePath
this.form.pictureSize = res.data.fileSize
},
beforeAvatarUpload (file) {
......@@ -214,23 +210,27 @@ export default {
}
return isLt5M
},
savePicture () { // 新增
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.picturePath,
'pictureSize': _this.form.pictureSize
}
this.$axios.post('/exercise/photoAdd', params)
.then(function (res) {
if (res) {
_this._getPhotoList()
_this.centerDialogVisible = false
savePicture (myForm) { // 新增
this.$refs[myForm].validate((valid) => {
if (valid) {
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.imgFilePath,
'pictureSize': _this.form.pictureSize
}
})
this.$axios.post('/exercise/photoAdd', params)
.then(function (res) {
if (res) {
_this._getPhotoList()
_this.centerDialogVisible = false
}
})
} else { return false }
})
},
pictureDel (item) { // 删除
this.$confirm('确定删除这条数据吗?', '提示', {
......
......@@ -91,7 +91,7 @@ export default {
return {
exerciseMarathonName: '',
currentPageMarathon: 1,
pageSizeMarathon: 8,
pageSizeMarathon: 10,
totalPageMarathon: null,
marathonExportHref: '',
marathonData: []
......
......@@ -20,16 +20,10 @@
align="center"
label="banner缩略图">
<template slot-scope="scope">
<img :src="$imgUrl + scope.row.bannerPath" width="200" height="70" />
<img :src="$imgUrl + scope.row.bannerPath" width="200" height="70" style="margin: auto" />
</template>
</el-table-column>
<el-table-column
align="center"
prop="bannerOriginalName"
label="名称"
width="180">
</el-table-column>
<el-table-column
prop="createTime"
align="center"
label="操作日期">
......@@ -47,7 +41,7 @@
<el-table-column
align="center"
label="操作"
width="300">
width="150">
<template slot-scope="scope">
<div>
<el-button icon="el-icon-edit" size="small" @click="bannerEdit(scope.row)"></el-button>
......@@ -141,7 +135,7 @@
</template>
</el-table-column>
</el-table>
<div class="pagination">
<div class="pagination" v-if="activityList.length">
<el-pagination
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"
......@@ -156,26 +150,22 @@
<el-dialog
:title="dialogTitle1"
:visible.sync="actBannerDialogVisible"
width="35%"
width="40%"
center>
<el-form :model="actBannerForm" label-width="100px">
<el-form-item label="图片上传">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$uploaderUrl + '/active/banner/upload'"
:multiple="false"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="actBannerForm.imgFilePath" :src="$imgUrl + actBannerForm.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-row>
<el-form ref="myForm" :model="actBannerForm" label-width="100px" :rules="$rules.common" :inline-message="true">
<el-form-item label="图片上传" prop="imgFilePath">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + '/active/banner/upload'"
:multiple="false"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="actBannerForm.imgFilePath" :src="$imgUrl + actBannerForm.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-form-item>
<el-form-item label="图片大小">
......@@ -194,7 +184,7 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="actBannerDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="bannerAddHandle">确 定</el-button>
<el-button type="danger" @click="bannerAddHandle('myForm')">确 定</el-button>
</div>
</el-col>
</el-row>
......@@ -205,13 +195,13 @@
:visible.sync="outLinkDialogVisible"
width="35%"
center>
<el-form :model="outLink" :rules="outLinkFormRules" :inline-message="true" ref="ruleOutLink" label-width="100px">
<el-form-item label="文章名称" prop="articleName">
<el-form :model="outLink" ref="ruleOutLink" label-width="100px">
<el-form-item label="文章名称">
<el-col :sm="15">
<el-input v-model="outLink.articleName" autocomplete="off"></el-input>
</el-col>
</el-form-item>
<el-form-item label="文章类型" prop="articleType">
<el-form-item label="文章类型">
<el-col :sm="15">
<el-select v-model="outLink.articleType" placeholder="请选择文章类型" style="width: 100%">
<el-option label="活动" value="1"></el-option>
......@@ -219,7 +209,7 @@
</el-select>
</el-col>
</el-form-item>
<el-form-item label="文章链接" prop="articleLink">
<el-form-item label="文章链接">
<el-col :sm="15">
<el-input v-model="outLink.articleLink" autocomplete="off"></el-input>
</el-col>
......@@ -230,8 +220,8 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="outLinkDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="addOutLink('ruleOutLink')" v-if="articleId == ''">发 布</el-button>
<el-button type="danger" @click="saveOutLink('ruleOutLink')" v-if="articleId != ''">确 认</el-button>
<el-button type="danger" @click="addOutLink()" v-if="articleId == ''">发 布</el-button>
<el-button type="danger" @click="saveOutLink()" v-if="articleId != ''">确 认</el-button>
</div>
</el-col>
</el-row>
......@@ -242,13 +232,13 @@
:visible.sync="articleDialogVisible"
width="50%"
center>
<el-form :model="articleForm" :rules="articleFormRules" :inline-message="true" ref="ruleArticleForm" label-width="100px">
<el-form-item label="文章标题" prop="articleTitle">
<el-form :model="articleForm" label-width="100px">
<el-form-item label="文章标题">
<el-col :sm="10">
<el-input v-model="articleForm.articleTitle"></el-input>
</el-col>
</el-form-item>
<el-form-item label="文章类型" prop="articleType">
<el-form-item label="文章类型">
<el-col :sm="10">
<el-select v-model="articleForm.articleType" placeholder="请选择文章类型" style="width: 100%">
<el-option label="活动" value="1"></el-option>
......@@ -273,8 +263,8 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="articleDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="addActivityRest('ruleArticleForm')" v-if="articleId == ''">发 布</el-button>
<el-button type="danger" @click="saveActivityRest('ruleArticleForm')" v-if="articleId != ''">确 认</el-button>
<el-button type="danger" @click="addActivityRest()" v-if="articleId == ''">发 布</el-button>
<el-button type="danger" @click="saveActivityRest()" v-if="articleId != ''">确 认</el-button>
</div>
</el-col>
</el-row>
......@@ -392,41 +382,53 @@ export default {
this.actBannerForm.bannerFileName = item.bannerName
this.actBannerForm.bannerOriginalName = item.bannerOriginalName
},
bannerAddHandle () { // 编辑 or 添加
var _this = this
var paramsAdd = {
'bannerMark': _this.actBannerForm.bannerMark,
'bannerName': _this.actBannerForm.bannerFileName,
'bannerOriginalName': _this.actBannerForm.bannerOriginalName,
'bannerPath': _this.actBannerForm.imgFilePath,
'bannerSize': _this.actBannerForm.bannerSize
}
var paramsEdit = {
'bannerMark': _this.actBannerForm.bannerMark,
'bannerName': _this.actBannerForm.bannerFileName,
'bannerOriginalName': _this.actBannerForm.bannerOriginalName,
'bannerPath': _this.actBannerForm.imgFilePath,
'bannerSize': _this.actBannerForm.bannerSize,
'id': _this.actBannerId
}
if (_this.dialogTitle1 === '新增活动banner') {
this.$axios.post('/active/banner/add', paramsAdd)
.then(function (res) {
if (res) {
_this._getActiveBannerList()
_this.actBannerDialogVisible = false
}
})
} else {
this.$axios.post('/active/banner/update', paramsEdit)
.then(function (res) {
console.log(res)
if (res === 'OK') {
_this._getActiveBannerList()
_this.actBannerDialogVisible = false
}
})
}
bannerAddHandle (myForm) { // 编辑 or 添加
this.$refs[myForm].validate((valid) => {
if (valid) {
var _this = this
var paramsAdd = {
'bannerMark': _this.actBannerForm.bannerMark,
'bannerName': _this.actBannerForm.bannerFileName,
'bannerOriginalName': _this.actBannerForm.bannerOriginalName,
'bannerPath': _this.actBannerForm.imgFilePath,
'bannerSize': _this.actBannerForm.bannerSize
}
var paramsEdit = {
'bannerMark': _this.actBannerForm.bannerMark,
'bannerName': _this.actBannerForm.bannerFileName,
'bannerOriginalName': _this.actBannerForm.bannerOriginalName,
'bannerPath': _this.actBannerForm.imgFilePath,
'bannerSize': _this.actBannerForm.bannerSize,
'id': _this.actBannerId
}
if (_this.dialogTitle1 === '新增活动banner') {
this.$axios.post('/active/banner/add', paramsAdd)
.then(function (res) {
if (res) {
_this.$message({
type: 'success',
message: '添加成功!'
})
_this._getActiveBannerList()
_this.actBannerDialogVisible = false
}
})
} else {
this.$axios.post('/active/banner/update', paramsEdit)
.then(function (res) {
console.log(res)
if (res) {
_this.$message({
type: 'success',
message: '修改成功!'
})
_this._getActiveBannerList()
_this.actBannerDialogVisible = false
}
})
}
} else { return false }
})
},
bannerDel (item) { // 活动banner删除
this.$confirm('确定删除这条数据吗?', '提示', {
......@@ -437,7 +439,7 @@ export default {
let _this = this
this.$axios.get('/active/banner/delete/' + item.id)
.then(function (res) {
if (res === 'OK') {
if (res) {
_this.currentPage1 = 1
_this._getActiveBannerList()
_this.$message({
......@@ -494,7 +496,7 @@ export default {
let _this = this
this.$axios.get('/active/delete/' + id)
.then(function (res) {
if (res === 'OK') {
if (res) {
_this.currentPage2 = 1
_this._getActiveList()
_this.$message({
......@@ -521,77 +523,59 @@ export default {
},
addActivityRest (articleForm) { // 文章编辑(添加)
let _this = this
_this.$refs[articleForm].validate((valid) => {
if (valid) {
let params = {
'activeContent': _this.articleForm.editorContent,
'activeStatus': 1,
'activeTitle': _this.articleForm.articleTitle,
'activeType': _this.articleForm.articleType
}
this.$axios.post('/active/add', params)
.then(function (res) {
if (res === 'OK') {
_this.$message({
type: 'success',
message: '文章发布成功!'
})
_this._getActiveList()
_this.articleDialogVisible = false
}
let params = {
'activeContent': _this.articleForm.editorContent,
'activeStatus': 1,
'activeTitle': _this.articleForm.articleTitle,
'activeType': _this.articleForm.articleType
}
this.$axios.post('/active/add', params)
.then(function (res) {
if (res) {
_this.$message({
type: 'success',
message: '文章发布成功!'
})
} else {
console.log('error submit!!')
return false
}
})
_this._getActiveList()
_this.articleDialogVisible = false
}
})
},
saveActivityRest (articleForm) { // 文章编辑(修改)
saveActivityRest () { // 文章编辑(修改)
let _this = this
_this.$refs[articleForm].validate((valid) => {
if (valid) {
let params = {
'activeContent': _this.articleForm.editorContent,
'activePropagandaId': _this.articleId,
'activeTitle': _this.articleForm.articleTitle,
'activeType': _this.articleForm.articleType
}
this.$axios.post('/active/update', params)
.then(function (res) {
if (res === 'OK') {
_this.$message({
type: 'success',
message: '文章修改成功!'
})
_this._getActiveList()
_this.articleDialogVisible = false
}
let params = {
'activeContent': _this.articleForm.editorContent,
'activePropagandaId': _this.articleId,
'activeTitle': _this.articleForm.articleTitle,
'activeType': _this.articleForm.articleType
}
this.$axios.post('/active/update', params)
.then(function (res) {
if (res) {
_this.$message({
type: 'success',
message: '文章修改成功!'
})
} else {
console.log('error submit!!')
return false
}
})
_this._getActiveList()
_this.articleDialogVisible = false
}
})
},
addOutLink (ruleOutLink) { // 文章链接(添加)
addOutLink () { // 文章链接(添加)
let _this = this
_this.$refs[ruleOutLink].validate((valid) => {
if (valid) {
let params = {
'activeStatus': 1,
'activeTitle': _this.outLink.articleName,
'activeType': _this.outLink.articleType,
'linkUrl': _this.outLink.articleLink
let params = {
'activeStatus': 1,
'activeTitle': _this.outLink.articleName,
'activeType': _this.outLink.articleType,
'linkUrl': _this.outLink.articleLink
}
this.$axios.post('/active/add/links', params)
.then(function (res) {
if (res) {
_this._getActiveList()
_this.outLinkDialogVisible = false
}
this.$axios.post('/active/add/links', params)
.then(function (res) {
if (res === 'OK') {
_this._getActiveList()
_this.outLinkDialogVisible = false
}
})
}
})
})
},
saveOutLink (ruleOutLink) { // 文章链接(修改)
let _this = this
......
......@@ -17,17 +17,13 @@
</el-table-column>
<el-table-column
prop="bannerImg"
align="center"
label="banner缩略图">
<template slot-scope="scope">
<img :src="$imgUrl + scope.row.bannerPath" width="200" height="70" />
<img :src="$imgUrl + scope.row.bannerPath" width="200" height="70" style="margin: auto" />
</template>
</el-table-column>
<el-table-column
prop="bannerName"
label="名称"
width="180">
</el-table-column>
<el-table-column
prop="bannerOrder"
align="center"
label="轮播排序">
......@@ -50,7 +46,7 @@
<el-table-column
align="center"
label="操作"
width="300">
width="200">
<template slot-scope="scope">
<div @click.stop="deleteVisible = true">
<el-button icon="el-icon-edit" size="small" @click="bannerEdit(scope.row)"></el-button>
......@@ -68,7 +64,7 @@
</template>
</el-table-column>
</el-table>
<div class="pagination">
<div class="pagination" v-if="bannerList.length">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -81,25 +77,21 @@
<el-dialog
:title="dialogTitle"
:visible.sync="centerDialogVisible"
width="35%"
width="40%"
center>
<el-form :model="form">
<el-form-item label="图片上传" :label-width="formLabelWidth">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$uploaderUrl + '/index/banner/upload'"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-row>
<el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + '/index/banner/upload'"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-form-item>
<el-form-item label="图片大小" :label-width="formLabelWidth">
......@@ -117,19 +109,13 @@
</el-form-item>
<el-form-item label="轮播排序" :label-width="formLabelWidth">
<el-col :sm="18">
<el-select v-model="form.bannerOrder" placeholder="请选择活动区域" style="width: 100%">
<el-option label="1" value="1"></el-option>
<el-option label="2" value="2"></el-option>
<el-option label="3" value="3"></el-option>
<el-option label="4" value="4"></el-option>
<el-option label="5" value="5"></el-option>
</el-select>
<el-input-number v-model="form.bannerOrder" :min="1" :max="8" label="排序"></el-input-number>
<p style="font-size: 12px">*首页轮播图最多8张</p>
</el-col>
</el-form-item>
<el-form-item label="外链文章" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.bannerLinks" autocomplete="off"></el-input>
<el-input v-model="form.bannerLinks"></el-input>
</el-col>
</el-form-item>
</el-form>
......@@ -138,7 +124,7 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="bannerAddHandle">确 定</el-button>
<el-button type="danger" @click="bannerAddHandle('myForm')">确 定</el-button>
</div>
</el-col>
</el-row>
......@@ -148,6 +134,8 @@
</template>
<script>
import rules from '../../util/validator'
export default {
name: 'bannerManage',
data () {
......@@ -168,6 +156,7 @@ export default {
bannerFileName: '',
bannerOriginalName: ''
},
rules: rules,
bannerStatus: '1',
bannerPixel: '1920*502',
formLabelWidth: '100px',
......@@ -264,48 +253,52 @@ export default {
this.dialogTitle = '编辑banner'
this.centerDialogVisible = true
},
bannerAddHandle () { // 编辑 or 添加
var _this = this
var paramsAdd = {
'bannerLinks': _this.form.bannerLinks,
'bannerName': _this.form.bannerFileName,
'bannerOrder': _this.form.bannerOrder,
'bannerPath': _this.form.imgFilePath,
'bannerPixel': _this.bannerPixel,
'bannerSize': _this.form.bannerSize,
'bannerStatus': _this.bannerStatus
}
var paramsEdit = {
'bannerLinks': _this.form.bannerLinks,
'bannerName': _this.form.bannerFileName,
'bannerOrder': _this.form.bannerOrder,
'bannerPath': _this.form.imgFilePath,
'bannerPixel': _this.bannerPixel,
'bannerSize': _this.form.bannerSize,
'bannerStatus': _this.bannerStatus,
'indexBannerId': _this.indexBannerId
}
if (_this.dialogTitle === '新增banner') {
this.$axios.post('/index/banner/add', paramsAdd)
.then(function (res) {
_this.searchImgList()
_this.$message({
type: 'success',
message: '添加成功!'
})
_this.centerDialogVisible = false
})
} else {
this.$axios.post('/index/banner/update', paramsEdit)
.then(function (res) {
_this.searchImgList()
_this.$message({
type: 'success',
message: '修改成功!'
})
_this.centerDialogVisible = false
})
}
bannerAddHandle (myForm) { // 编辑 or 添加
this.$refs[myForm].validate((valid) => {
if (valid) {
var _this = this
var paramsAdd = {
'bannerLinks': _this.form.bannerLinks,
'bannerName': _this.form.bannerFileName,
'bannerOrder': _this.form.bannerOrder,
'bannerPath': _this.form.imgFilePath,
'bannerPixel': _this.bannerPixel,
'bannerSize': _this.form.bannerSize,
'bannerStatus': _this.bannerStatus
}
var paramsEdit = {
'bannerLinks': _this.form.bannerLinks,
'bannerName': _this.form.bannerFileName,
'bannerOrder': _this.form.bannerOrder,
'bannerPath': _this.form.imgFilePath,
'bannerPixel': _this.bannerPixel,
'bannerSize': _this.form.bannerSize,
'bannerStatus': _this.bannerStatus,
'indexBannerId': _this.indexBannerId
}
if (_this.dialogTitle === '新增banner') {
this.$axios.post('/index/banner/add', paramsAdd)
.then(function (res) {
_this.searchImgList()
_this.$message({
type: 'success',
message: '添加成功!'
})
_this.centerDialogVisible = false
})
} else {
this.$axios.post('/index/banner/update', paramsEdit)
.then(function (res) {
_this.searchImgList()
_this.$message({
type: 'success',
message: '修改成功!'
})
_this.centerDialogVisible = false
})
}
} else { return false }
})
}
}
}
......
......@@ -40,7 +40,7 @@
<el-table-column
align="center"
label="操作"
width="200">
width="150">
<template slot-scope="scope">
<div @click.stop="deleteVisible = true">
<el-button icon="el-icon-edit" size="small" @click="editLink(scope.row)"></el-button>
......@@ -55,7 +55,7 @@
</template>
</el-table-column>
</el-table>
<div class="pagination">
<div class="pagination" v-if="linkList.length">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -73,7 +73,7 @@
<el-row class="mb20">
<el-col :span="4" align="center">链接名称</el-col>
<el-col :span="12">
<el-input v-model="linkName" placeholder="请输入图片描述" maxlength="20"></el-input>
<el-input v-model="linkName" placeholder="请输入图片描述" maxlength="8"></el-input>
</el-col>
<el-col :span="7" :offset="1">
<p>*链接名称最多8个汉字</p>
......@@ -82,13 +82,14 @@
<el-row class="mb20">
<el-col :span="4" align="center">链接排序</el-col>
<el-col :span="12">
<el-select v-model="linkOrder" placeholder="请选择">
<!--<el-select v-model="linkOrder" placeholder="请选择">
<el-option
v-for="item in 10"
:key="item"
:value="item">
</el-option>
</el-select>
</el-select>-->
<el-input-number v-model="linkOrder" :min="1"></el-input-number>
</el-col>
</el-row>
<el-row>
......@@ -108,16 +109,6 @@
</el-row>
</span>
</el-dialog>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%">
<span>确认删除这条信息吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="ensureDelete">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -136,7 +127,6 @@ export default {
linkName: '',
linkOrder: '',
linkUrl: '',
dialogVisible: false,
linkItemId: '',
isAdd: true
}
......@@ -192,25 +182,32 @@ export default {
.then(function (res) {
if (res === 'OK') {
_this._getCommonList()
_this.$message('操作成功!')
_this.$message({
type: 'success',
message: '操作成功!'
})
_this.centerDialogVisible = false
}
})
},
deleteLink (item) {
this.linkItemId = item.id
this.dialogVisible = true
},
ensureDelete () { // 删除
let _this = this
this.$axios.get('/used/links/delete/' + _this.linkItemId)
.then(function (res) {
if (res === 'OK') {
_this._getCommonList()
_this.$message('删除成功!')
_this.dialogVisible = false
}
})
deleteLink (item) { // 删除
this.$confirm('确定删除这条数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let _this = this
_this.$axios.get('/used/links/delete/' + item.id)
.then(function (res) {
if (res) {
_this._getCommonList()
_this.$message({
type: 'success',
message: '删除成功!'
})
}
})
})
},
editLink (item) { // 编辑
this.centerDialogVisible = true
......
......@@ -2,7 +2,7 @@
<div class="message-management">
<el-row type="flex" justify="space-between" class="mb20">
<el-col :span="6">
<el-select v-model="moduleVal" placeholder="请选择" size="small">
<el-select v-model="moduleVal" placeholder="请选择" size="small" @change="_getMessageList">
<el-option
v-for="(item, key, index) in moduleList"
:key="index"
......@@ -116,7 +116,7 @@
</template>
</el-table-column>
</el-table>
<div class="pagination">
<div class="pagination" v-if="messageList.length">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -161,12 +161,12 @@ export default {
moduleList: {},
moduleVal: '',
currentPage: 1,
pageSize: 5,
pageSize: 10,
count: null,
messageList: [],
leaveMessageId: '',
centerDialogVisible: false,
remarks: '',
remarks: ''
}
},
mounted () {
......
......@@ -26,11 +26,11 @@
align="center"
label="名称">
</el-table-column>
<el-table-column
<!--<el-table-column
prop="pictureOrder"
align="center"
label="图片排序">
</el-table-column>
</el-table-column>-->
<el-table-column
prop="pictureSize"
align="center"
......@@ -74,31 +74,27 @@
<el-dialog
title="无忧办公"
:visible.sync="centerDialogVisible"
width="35%"
width="40%"
center>
<el-form :model="form">
<el-form-item label="标题" :label-width="formLabelWidth">
<el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18">
<el-input v-model="form.pictureOriginalName" autocomplete="off" disabled="disabled"></el-input>
<el-upload
class="avatar-uploader"
:action="$baseURL + '/roomofmother/picture/upload'"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-form-item>
<el-form-item label="图片上传" :label-width="formLabelWidth">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + '/roomofmother/picture/upload'"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.picturePath" :src="$imgUrl + form.picturePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-row>
<el-form-item label="图片名称" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureOriginalName" autocomplete="off" disabled="disabled"></el-input>
</el-col>
</el-form-item>
<el-form-item label="图片大小" :label-width="formLabelWidth">
......@@ -106,11 +102,11 @@
<el-input v-model="form.pictureSize" autocomplete="off" disabled="disabled"></el-input>
</el-col>
</el-form-item>
<el-form-item label="图片排序" :label-width="formLabelWidth">
<!-- <el-form-item label="图片排序" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input-number v-model="form.pictureOrder" controls-position="right" :min="1"></el-input-number>
</el-col>
</el-form-item>
</el-form-item>-->
<el-form-item label="备注" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureMark" autocomplete="off"></el-input>
......@@ -122,7 +118,7 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="savePicture">确 定</el-button>
<el-button type="danger" @click="savePicture('myForm')">确 定</el-button>
</div>
</el-col>
</el-row>
......@@ -138,7 +134,7 @@ export default {
return {
classifyId: '', // 图集ID
currentPage: 1,
pageSize: 5,
pageSize: 10,
totalPage: null,
photoList: [],
centerDialogVisible: false,
......@@ -188,7 +184,7 @@ export default {
this.form.pictureName = res.data[0].fileName
this.form.pictureOriginalName = res.data[0].fileOriginalName
this.form.pictureSize = res.data[0].fileSize
this.form.picturePath = res.data[0].filePath
this.form.imgFilePath = res.data[0].filePath
},
beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5
......@@ -197,24 +193,28 @@ export default {
}
return isLt5M
},
savePicture () { // 新增
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
'pictureOrder': _this.form.pictureOrder,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.picturePath,
'pictureSize': _this.form.pictureSize
}
this.$axios.post('/roomofmother/picture/save', params)
.then(function (res) {
if (res === 'ok') {
_this._getPhotoList()
_this.centerDialogVisible = false
savePicture (myForm) { // 新增
this.$refs[myForm].validate((valid) => {
if (valid) {
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
// 'pictureOrder': _this.form.pictureOrder,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.imgFilePath,
'pictureSize': _this.form.pictureSize
}
})
this.$axios.post('/roomofmother/picture/save', params)
.then(function (res) {
if (res === 'ok') {
_this._getPhotoList()
_this.centerDialogVisible = false
}
})
} else { return false }
})
},
pictureDel (item) { // 删除
this.$confirm('确定删除这条数据吗?', '提示', {
......
......@@ -35,11 +35,11 @@
align="center"
label="名称">
</el-table-column>
<el-table-column
<!--<el-table-column
prop="pictureOrder"
align="center"
label="图片排序">
</el-table-column>
</el-table-column>-->
<el-table-column
prop="pictureSize"
align="center"
......@@ -83,32 +83,28 @@
<el-dialog
title="无忧办公"
:visible.sync="centerDialogVisible"
width="35%"
width="40%"
center>
<el-form :model="form">
<el-form-item label="标题" :label-width="formLabelWidth">
<el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18">
<el-input v-model="form.pictureOriginalName" autocomplete="off" disabled="disabled"></el-input>
<el-upload
class="avatar-uploader"
:action="$baseURL + '/office/picture/upload'"
name="files"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-form-item>
<el-form-item label="图片上传" :label-width="formLabelWidth">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + '/office/picture/upload'"
name="files"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.picturePath" :src="$imgUrl + form.picturePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-row>
<el-form-item label="图片名称" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureOriginalName" autocomplete="off" disabled="disabled"></el-input>
</el-col>
</el-form-item>
<el-form-item label="图片大小" :label-width="formLabelWidth">
......@@ -116,11 +112,11 @@
<el-input v-model="form.pictureSize" autocomplete="off" disabled="disabled"></el-input>
</el-col>
</el-form-item>
<el-form-item label="图片排序" :label-width="formLabelWidth">
<!--<el-form-item label="图片排序" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input-number v-model="form.pictureOrder" controls-position="right" :min="1"></el-input-number>
</el-col>
</el-form-item>
</el-form-item>-->
<el-form-item label="备注" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureMark" autocomplete="off"></el-input>
......@@ -132,7 +128,7 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="savePicture">确 定</el-button>
<el-button type="danger" @click="savePicture('myForm')">确 定</el-button>
</div>
</el-col>
</el-row>
......@@ -204,7 +200,7 @@ export default {
this.form.pictureName = res.data[0].fileName
this.form.pictureOriginalName = res.data[0].fileOriginalName
this.form.pictureSize = res.data[0].fileSize
this.form.picturePath = res.data[0].filePath
this.form.imgFilePath = res.data[0].filePath
},
beforeAvatarUpload (file) {
console.log(file)
......@@ -214,24 +210,28 @@ export default {
}
return isLt5M
},
savePicture () { // 新增
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
'pictureOrder': _this.form.pictureOrder,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.picturePath,
'pictureSize': _this.form.pictureSize
}
this.$axios.post('/office/picture/save', params)
.then(function (res) {
if (res === 'OK') {
_this._getPhotoList()
_this.centerDialogVisible = false
savePicture (myForm) { // 新增
this.$refs[myForm].validate((valid) => {
if (valid) {
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
// 'pictureOrder': _this.form.pictureOrder,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.imgFilePath,
'pictureSize': _this.form.pictureSize
}
})
this.$axios.post('/office/picture/save', params)
.then(function (res) {
if (res === 'OK') {
_this._getPhotoList()
_this.centerDialogVisible = false
}
})
} else { return false }
})
},
pictureDel (item) { // 删除
this.$confirm('确定删除这条数据吗?', '提示', {
......
......@@ -69,30 +69,26 @@
<el-dialog
title="幸福传递"
:visible.sync="centerDialogVisible"
width="35%"
width="40%"
center>
<el-form :model="form">
<el-form-item label="图片上传" :label-width="formLabelWidth">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + 'warmth/pictureUpdate'"
name="img"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.picturePath" :src="$imgUrl + form.picturePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-row>
<el-form :model="form" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图片上传" :label-width="formLabelWidth" prop="imgFilePath">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + 'warmth/pictureUpdate'"
name="img"
:show-file-list="false"
:multiple="true"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="form.imgFilePath" :src="$imgUrl + form.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p style="font-size: 12px; line-height: 14px">*请上传尺寸为 <em>1920*502</em>,大小不超过5M的图片</p>
</el-col>
</el-form-item>
<el-form-item label="标题" :label-width="formLabelWidth">
<el-form-item label="图片名称" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureOriginalName" autocomplete="off" disabled="disabled"></el-input>
</el-col>
......@@ -102,11 +98,6 @@
<el-input v-model="form.pictureSize" autocomplete="off" disabled="disabled"></el-input>
</el-col>
</el-form-item>
<el-form-item label="图片排序" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input-number v-model="form.pictureOrder" controls-position="right" :min="1"></el-input-number>
</el-col>
</el-form-item>
<el-form-item label="备注" :label-width="formLabelWidth">
<el-col :sm="18">
<el-input v-model="form.pictureMark" autocomplete="off"></el-input>
......@@ -118,7 +109,7 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="danger" @click="savePicture">确 定</el-button>
<el-button type="danger" @click="savePicture('myForm')">确 定</el-button>
</div>
</el-col>
</el-row>
......@@ -142,7 +133,7 @@ export default {
form: {
pictureName: '',
pictureOriginalName: '',
picturePath: '',
imgFilePath: '',
pictureSize: '',
pictureOrder: '',
pictureMark: ''
......@@ -185,7 +176,7 @@ export default {
this.form.pictureName = res.data.fileName
this.form.pictureOriginalName = res.data.fileOriginalName
this.form.pictureSize = res.data.fileSize
this.form.picturePath = res.data.filePath
this.form.imgFilePath = res.data.filePath
},
beforeAvatarUpload (file) {
const isLt5M = file.size / 1024 / 1024 < 5
......@@ -194,24 +185,28 @@ export default {
}
return isLt5M
},
savePicture () { // 新增
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
// 'pictureOrder': _this.form.pictureOrder,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.picturePath,
'pictureSize': _this.form.pictureSize
}
this.$axios.post('/warmth/warmthPictureAdd', params)
.then(function (res) {
if (res === 'OK') {
_this._getPhotoList()
_this.centerDialogVisible = false
savePicture (myForm) { // 新增
this.$refs[myForm].validate((valid) => {
if (valid) {
let _this = this
let params = {
'classifyId': _this.classifyId,
'pictureMark': _this.form.pictureMark,
'pictureName': _this.form.pictureName,
// 'pictureOrder': _this.form.pictureOrder,
'pictureOriginalName': _this.form.pictureOriginalName,
'picturePath': _this.form.imgFilePath,
'pictureSize': _this.form.pictureSize
}
})
this.$axios.post('/warmth/warmthPictureAdd', params)
.then(function (res) {
if (res === 'OK') {
_this._getPhotoList()
_this.centerDialogVisible = false
}
})
} else { return false }
})
},
pictureDel (item) { // 删除
this.$confirm('确定删除这条数据吗?', '提示', {
......
......@@ -175,7 +175,7 @@ export default {
author: ''
},
currentPage: 1,
pageSize: 5,
pageSize: 10,
totalPage: null,
bookList: [],
bookDialogVisible: false,
......
......@@ -18,7 +18,7 @@
<el-button @click="searchRestaurant">搜索</el-button>
</el-form-item>
<el-form-item style="float: right">
<el-button type="primary"><router-link to="/restaurant/restaurantAdd" style="color: #fff">新增餐厅</router-link></el-button>
<el-button type="primary" class="el-button-link"><router-link to="/restaurant/restaurantAdd" style="color: #fff">新增餐厅</router-link></el-button>
<el-button size="small" class="el-button-link">
<a :href="$baseURL + '/diningroom/export/?diningRoomName=' + diningRoomName + '&provinceId=' + provinceId + '&cityId=' + cityId">导出</a>
</el-button>
......@@ -99,7 +99,7 @@
</template>
</el-table-column>
</el-table>
<div class="pagination" v-if="restaurantList.length > 0">
<div class="pagination" v-if="restaurantList.length">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -114,31 +114,27 @@
:visible.sync="restaurantImgDialogVisible"
width="40%"
center>
<el-form label-width="100px">
<el-form-item label="图片上传">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
action="http://10.2.98.32:8081/admin/diningroom/menu/upload"
:show-file-list="false"
:on-success="handleAvatarSuccess">
<img v-if="imageUrl" :src="$imgUrl + imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-col>
</el-row>
<el-form :model="ruleForm" label-width="100px" ref="myForm" :rules="$rules.common" :inline-message="true">
<el-form-item label="图片上传" prop="imgFilePath">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
:action="$baseURL + 'diningroom/menu/upload'"
:show-file-list="false"
:on-success="handleAvatarSuccess">
<img v-if="ruleForm.imgFilePath" :src="$imgUrl + ruleForm.imgFilePath" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-col>
</el-form-item>
<el-form-item label="名称">
<el-col :sm="8">
<el-input v-model="resImgName" disabled="disabled"></el-input>
<el-input v-model="ruleForm.resImgName" disabled="disabled"></el-input>
</el-col>
</el-form-item>
<el-form-item label="日期">
<el-col :sm="8">
<el-date-picker style="width: 100%" v-model="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="选择日期">
</el-date-picker>
</el-col>
</el-form-item>
......@@ -148,7 +144,7 @@
<el-col :sm="10">
<div class="btn-warp">
<el-button @click="restaurantImgDialogVisible = false" class="mr30">取 消</el-button>
<el-button type="danger" @click="addNewResImg">确 定</el-button>
<el-button type="danger" @click="addNewResImg('myForm')">确 定</el-button>
</div>
</el-col>
</el-row>
......@@ -159,7 +155,7 @@
<script>
export default {
name: 'ationalRestaurant',
name: 'rationalRestaurant',
data () {
return {
provinceId: '',
......@@ -173,9 +169,11 @@ export default {
pageSize: 10,
totalPage: null,
restaurantImgDialogVisible: false,
imageUrl: '',
imgDate: '',
resImgName: '',
ruleForm: {
imgFilePath: '',
resImgName: '',
imgDate: ''
},
diningRoomId: '',
diningRoomNameDia: ''
}
......@@ -265,27 +263,31 @@ export default {
this.diningRoomNameDia = item.diningRoomName
},
handleAvatarSuccess (res, file) { // 图片上传
this.imageUrl = res.data.filePath
this.resImgName = res.data.fileOriginalName
this.ruleForm.imgFilePath = res.data.filePath
this.ruleForm.resImgName = res.data.fileOriginalName
},
addNewResImg () { // 添加餐厅菜单
let _this = this
let params = {
'diningRoomId': _this.diningRoomId,
'menuDate': _this.imgDate,
'menuUrl': _this.imageUrl,
'type': 2
}
this.$axios.post('/diningroom/menu/add', params)
.then(function (res) {
if (res === 'ok') {
_this.$message({
type: 'success',
message: '菜单添加成功!'
})
_this.$router.push({ name: 'restaurantMenus' })
addNewResImg (myForm) { // 添加餐厅菜单
this.$refs[myForm].validate((valid) => {
if (valid) {
let _this = this
let params = {
'diningRoomId': _this.diningRoomId,
'menuDate': _this.ruleForm.imgDate,
'menuUrl': _this.ruleForm.imgFilePath,
'type': 2
}
})
this.$axios.post('/diningroom/menu/add', params)
.then(function (res) {
if (res === 'ok') {
_this.$message({
type: 'success',
message: '菜单添加成功!'
})
_this.$router.push({ name: 'restaurantMenus' })
}
})
} else { return false }
})
}
}
}
......
......@@ -56,7 +56,7 @@
<el-col :span="3" :offset="2">
<el-row type="flex" justify="space-between">
<el-col :sm="2">
<el-button size="small">取消</el-button>
<el-button size="small" @click="$router.go(-1)">取消</el-button>
</el-col>
<el-col :sm="2">
<el-button type="danger" size="small" @click="saveHandle" v-if="!$route.params.itemObj">确 认</el-button>
......
......@@ -160,17 +160,18 @@
</el-form-item>
<el-form-item label="所在经度">
<el-col :sm="4">
<el-input v-model="Latitude"></el-input>
<el-input v-model="longitude"></el-input>
</el-col>
<el-col :sm="5" :offset="1">
<div style="position: relative; width: 100%; height: 100%">
<div class="map" id="map" ref="allmap" style="width: 100%; height: 200px; position: absolute"></div>
<el-col :sm="5">
<div style="position: relative; width: 450px; height: 100%">
<el-button type="text" style="position: absolute; left: 20px; top: 0" icon="el-icon-refresh" @click="searchMap"></el-button>
<div class="map" id="map" ref="allmap" style="width: 100%; height: 200px; position: absolute; left: 60px"></div>
</div>
</el-col>
</el-form-item>
<el-form-item label="所在纬度">
<el-col :sm="4">
<el-input v-model="longitude"></el-input>
<el-input v-model="latitude"></el-input>
</el-col>
</el-form-item>
<el-form-item label="餐厅名称">
......@@ -190,7 +191,7 @@
</el-form-item>
<el-form-item>
<el-col :sm="4" style="text-align: center">
<el-button class="mr30">取消</el-button>
<el-button class="mr30" @click="$router.go(-1)">取消</el-button>
<el-button type="danger" v-if="$route.params.itemObj" @click="updataRestaurantHandle">保存</el-button>
<el-button type="danger" v-if="!$route.params.itemObj" @click="saveRestaurantHandle">确认</el-button>
</el-col>
......@@ -210,8 +211,8 @@ export default {
cityId: '',
countyName: '',
detailedAddress: '',
Latitude: '',
longitude: '',
longitude: '', // 经度
latitude: '', // 维度
restaurantName: '',
responsibleMan: '',
contactWay: '',
......@@ -224,18 +225,24 @@ export default {
}
},
mounted () {
this.createMap()
this.createMap(116.404, 39.915)
this._getProvinceList()
this._getRestaurantDetail()
},
methods: {
createMap () {
createMap (longitude, latitude) {
/* eslint-disable */
var map = new BMap.Map('map') // 创建地图实例
var point = new BMap.Point(116.404, 39.915) // 创建点坐标
map.centerAndZoom(point, 15)
let map = new BMap.Map('map')
map.enableScrollWheelZoom(true)
let point = new BMap.Point(longitude, latitude)
let marker = new BMap.Marker(point) // 创建标注
map.addOverlay(marker) // 将标注添加到地图中
map.centerAndZoom(point, 12)
/* eslint-disable */
},
searchMap () { // 更新地图坐标
this.createMap(this.longitude, this.latitude)
},
_getProvinceList () { // 获取省份列表
let _this = this
this.$axios.get('/diningroom/province/list')
......@@ -351,8 +358,8 @@ export default {
"cityId": _this.cityId,
"countyName": _this.countyName,
"diningRoomName": _this.restaurantName,
"lat": _this.Latitude,
"lng": _this.longitude,
"lat": _this.latitude,
"personMobile": _this.contactWay,
"personName": _this.responsibleMan,
"provinceId": _this.selectProvinceId
......@@ -364,7 +371,7 @@ export default {
type: 'success',
message: '添加成功!'
})
// _this.$router.go(-1)
_this.$router.go(-1)
}
})
},
......@@ -374,11 +381,12 @@ export default {
this.cityId = this.$route.params.itemObj.cityId
this.countyName = this.$route.params.itemObj.countyName
this.detailedAddress = this.$route.params.itemObj.address
this.Latitude = this.$route.params.itemObj.lat
this.latitude = this.$route.params.itemObj.lat
this.longitude = this.$route.params.itemObj.lng
this.restaurantName = this.$route.params.itemObj.diningRoomName
this.responsibleMan = this.$route.params.itemObj.personName
this.contactWay = this.$route.params.itemObj.personMobile
this.createMap(this.longitude, this.latitude)
}
},
updataRestaurantHandle () { // 修改
......@@ -402,6 +410,7 @@ export default {
type: 'success',
message: '修改成功!'
})
_this.$router.go(-1)
}
})
}
......
......@@ -79,7 +79,7 @@
<el-col :sm="5">
<el-upload
class="avatar-uploader"
:action="$uploaderUrl + '/diningroom/picture/upload'"
:action="$baseURL + '/diningroom/picture/upload'"
:show-file-list="false"
:multiple="true"
name="files"
......@@ -111,7 +111,7 @@
<el-col :span="3" :offset="2">
<el-row type="flex" justify="space-between">
<el-col :sm="2">
<el-button size="small">取消</el-button>
<el-button size="small" @click="$router.go(-1)">取消</el-button>
</el-col>
<el-col :sm="2">
<el-button type="danger" size="small" @click="saveHandle">确认</el-button>
......
......@@ -95,19 +95,15 @@
center>
<el-form label-width="100px">
<el-form-item label="图片上传">
<el-col :sm="24">
<el-row class="img_load">
<el-col :sm="18">
<el-upload
class="avatar-uploader"
action="http://10.2.98.32:8081/admin/diningroom/menu/upload"
:show-file-list="false"
:on-success="handleAvatarSuccess">
<img v-if="imageUrl" :src="$imgUrl + imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-col>
</el-row>
<el-col :sm="18">
<el-upload
class="avatar-uploader"
action="http://10.2.98.32:8081/admin/diningroom/menu/upload"
:show-file-list="false"
:on-success="handleAvatarSuccess">
<img v-if="imageUrl" :src="$imgUrl + imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-col>
</el-form-item>
<el-form-item label="日期">
......@@ -141,7 +137,7 @@ export default {
diningRoomName: '',
menuImg: [],
currentPage: 1,
pageSize: 5,
pageSize: 10,
totalPage: null,
imgDialogVisible: false,
bigImg: '',
......
......@@ -116,7 +116,7 @@ export default {
termYear: '',
solarTerm: '',
currentPage: 1,
pageSize: 5,
pageSize: 10,
totalPage: null,
solarList: []
}
......
......@@ -67,7 +67,7 @@
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="行政对接人">
<!-- <el-form-item label="行政对接人">
<el-col :sm="4">
<el-input v-model="docking"></el-input>
</el-col>
......@@ -78,7 +78,7 @@
</el-col>
</el-form-item>
</el-col>
</el-form-item>
</el-form-item>-->
<el-form-item label="房型&价格">
<el-col :sm="11">
<div class="room_warp">
......@@ -117,7 +117,7 @@
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="是否合同期内">
<!--<el-form-item label="是否合同期内">
<el-col :sm="4">
<el-select v-model="contractperiod" style="width: 100%">
<el-option label="是" value="0"></el-option>
......@@ -131,7 +131,7 @@
</el-col>
</el-form-item>
</el-col>
</el-form-item>
</el-form-item>-->
<el-form-item label="备注">
<el-col :sm="11">
<el-input type="textarea" v-model="remarks" :rows="5"></el-input>
......@@ -209,14 +209,15 @@ export default {
_this.contactsphone = res[0].contactsphone
_this.person = res[0].person
_this.persontel = res[0].persontel
_this.docking = res[0].docking
_this.dockingphone = res[0].dockingphone
// _this.docking = res[0].docking
// _this.dockingphone = res[0].dockingphone
_this.classMap = res[0].classMap
_this.starclass = res[0].starclass
_this.isrecommend = res[0].isrecommend
_this.contractperiod = res[0].contractperiod
_this.termofvalidity = res[0].termofvalidity
_this.remarks = res[0].remarks
_this.createMap(_this.longitude, _this.latitudel)
})
}
},
......@@ -253,8 +254,8 @@ export default {
'contacts': _this.contacts,
'contactsphone': _this.contactsphone,
'contractperiod': _this.contractperiod,
'docking': _this.docking,
'dockingphone': _this.dockingphone,
// 'docking': _this.docking,
// 'dockingphone': _this.dockingphone,
'hotelname': _this.hotelname,
'isrecommend': _this.isrecommend,
'latitudel': _this.latitudel,
......@@ -288,8 +289,8 @@ export default {
'contacts': _this.contacts,
'contactsphone': _this.contactsphone,
'contractperiod': _this.contractperiod,
'docking': _this.docking,
'dockingphone': _this.dockingphone,
// 'docking': _this.docking,
// 'dockingphone': _this.dockingphone,
'hotelname': _this.hotelname,
'isrecommend': _this.isrecommend,
'latitudel': _this.latitudel,
......
......@@ -10,6 +10,7 @@
<el-form-item>
<el-select v-model="starclass" placeholder="星级">
<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>
......@@ -121,6 +122,15 @@
label="星级">
</el-table-column>
<el-table-column
prop="isrecommend"
align="center"
width="100"
label="是否推荐">
<template slot-scope="scope">
<span v-if="scope.row.isrecommend">{{scope.row.isrecommend === '0' ? '是' : '否'}}</span>
</template>
</el-table-column>
<el-table-column
prop="handleMan"
align="center"
width="100"
......
<template>
<div class="commonSense">
<el-row class="title-warp mb15" type="flex" justify="center">
<el-row class="title-warp mb20" type="flex" justify="center">
<el-col :sm="6">
<el-input v-model="title" placeholder="请输入内容" size="medium"></el-input>
<!--<el-input v-model="title" placeholder="请输入内容" size="medium" disabled="disabled"></el-input>-->
<h3>{{title}}</h3>
</el-col>
</el-row>
<div class="mb20">
......
......@@ -96,7 +96,7 @@
<el-col :span="3" :offset="2">
<el-row type="flex" justify="space-between">
<el-col :sm="2">
<el-button size="small">取消</el-button>
<el-button size="small" @click="$router.go(-1)">取消</el-button>
</el-col>
<el-col :sm="2">
<el-button type="danger" size="small" @click="save">确认</el-button>
......@@ -113,12 +113,12 @@ export default {
data () {
return {
laundryId: '',
province: '河北省',
city: '全部',
province: '',
city: '',
laundryName: '',
detailAddress: '',
longitude: '116.487057',
latitude: '40.004086',
longitude: '',
latitude: '',
pickWay: '1',
contactMan: '',
contactNumber: '',
......@@ -137,12 +137,14 @@ export default {
},
methods: {
createMap (longitude, latitude) {
/* eslint-disable */
let map = new BMap.Map('map')
map.enableScrollWheelZoom(true)
let point = new BMap.Point(longitude, latitude)
let marker = new BMap.Marker(point) // 创建标注
map.addOverlay(marker) // 将标注添加到地图中
map.centerAndZoom(point, 15)
/* eslint-disable */
},
searchMap () { // 更新地图坐标
this.createMap(this.longitude, this.latitude)
......@@ -195,24 +197,25 @@ export default {
}
this.$axios.post('/laundry/add', params)
.then(function (res) {
if (res === 'OK') {
if (res) {
_this.$message({
type: 'success',
message: '添加成功!'
})
_this.province = ''
_this.city = ''
_this.laundryName = ''
_this.detailAddress = ''
_this.longitude = ''
_this.latitude = ''
_this.pickWay = ''
_this.contactMan = ''
_this.contactNumber = ''
_this.principal = ''
_this.principalNumber = ''
_this.businessHours = ''
_this.supplier = ''
_this.$router.go(-1)
// _this.province = ''
// _this.city = ''
// _this.laundryName = ''
// _this.detailAddress = ''
// _this.longitude = ''
// _this.latitude = ''
// _this.pickWay = ''
// _this.contactMan = ''
// _this.contactNumber = ''
// _this.principal = ''
// _this.principalNumber = ''
// _this.businessHours = ''
// _this.supplier = ''
}
})
},
......@@ -242,6 +245,7 @@ export default {
type: 'success',
message: '修改成功!'
})
_this.$router.go(-1)
}
})
}
......
......@@ -60,6 +60,9 @@
align="center"
label="送取方式"
width="100">
<template slot-scope="scope">
<span>{{scope.row.pickWay === 1 ? '集中送取' : '自由送取'}}</span>
</template>
</el-table-column>
<el-table-column
prop="detailAddress"
......@@ -124,7 +127,7 @@ export default {
laundryName: ''
},
currentPage: 1,
pageSize: 8,
pageSize: 10,
totalPage: null,
tableData: []
}
......
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