Commit 9b763f0f by 张成

update

parent 3963e692
File added
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "ruoyi", "name": "ruoyi",
"version": "3.8.1", "version": "3.8.1",
"description": "运营管理系统", "description": "运营管理系统",
"author": "若依", "author": "HOOLOO",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
......
<template> <template>
<div class="component-upload-image"> <div class="component-upload-image">
<el-upload <el-upload multiple :action="uploadImgUrl" list-type="picture-card" :on-success="handleUploadSuccess"
multiple :before-upload="handleBeforeUpload" :limit="limit" :on-error="handleUploadError" :on-exceed="handleExceed"
:action="uploadImgUrl" name="file" :on-remove="handleRemove" :show-file-list="true" :headers="headers" :file-list="fileList"
list-type="picture-card" :on-preview="handlePictureCardPreview" :class="{ hide: this.fileList.length >= this.limit }">
:on-success="handleUploadSuccess"
:before-upload="handleBeforeUpload"
:limit="limit"
:on-error="handleUploadError"
:on-exceed="handleExceed"
name="file"
:on-remove="handleRemove"
:show-file-list="true"
:headers="headers"
:file-list="fileList"
:on-preview="handlePictureCardPreview"
:class="{ hide: this.fileList.length >= this.limit }"
>
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
...@@ -32,16 +19,8 @@ ...@@ -32,16 +19,8 @@
的文件 的文件
</div> </div>
<el-dialog <el-dialog :visible.sync="dialogVisible" title="预览" width="800" append-to-body>
:visible.sync="dialogVisible" <img :src="dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto" />
title="预览"
width="800"
append-to-body
>
<img
:src="dialogImageUrl"
style="display: block; max-width: 100%; margin: 0 auto"
/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -73,6 +52,11 @@ export default { ...@@ -73,6 +52,11 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
// 是否显示提示
arrType: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
...@@ -139,6 +123,7 @@ export default { ...@@ -139,6 +123,7 @@ export default {
this.fileList = this.fileList.concat(this.uploadList); this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = []; this.uploadList = [];
this.number = 0; this.number = 0;
this.$emit("callback", this.listToString(this.fileList));
this.$emit("input", this.listToString(this.fileList)); this.$emit("input", this.listToString(this.fileList));
this.$modal.closeLoading(); this.$modal.closeLoading();
} }
...@@ -202,9 +187,15 @@ export default { ...@@ -202,9 +187,15 @@ export default {
if (size == 0) { if (size == 0) {
return ""; return "";
} }
if (this.arrType) {
return strs;
}
if (size == 1) { if (size == 1) {
return strs[0]; return strs[0];
} }
return strs; return strs;
}, },
}, },
...@@ -220,6 +211,7 @@ export default { ...@@ -220,6 +211,7 @@ export default {
width: 100px; width: 100px;
height: 100px; height: 100px;
} }
// 去掉动画效果 // 去掉动画效果
::v-deep .el-list-enter-active, ::v-deep .el-list-enter-active,
::v-deep .el-list-leave-active { ::v-deep .el-list-leave-active {
......
<template> <template>
<div class="navbar"> <div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
@toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/> <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
<div class="right-menu"> <div class="right-menu">
<template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom">
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip>
<el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip>
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</template>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img :src="avatar" class="user-avatar"> <img :src="avatar" class="user-avatar">
...@@ -104,7 +86,7 @@ export default { ...@@ -104,7 +86,7 @@ export default {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = '/index'; location.href = '/index';
}) })
}).catch(() => {}); }).catch(() => { });
} }
} }
} }
...@@ -116,7 +98,7 @@ export default { ...@@ -116,7 +98,7 @@ export default {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
background: #fff; background: #fff;
box-shadow: 0 1px 4px rgba(0,21,41,.08); box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
.hamburger-container { .hamburger-container {
line-height: 46px; line-height: 46px;
...@@ -124,7 +106,7 @@ export default { ...@@ -124,7 +106,7 @@ export default {
float: left; float: left;
cursor: pointer; cursor: pointer;
transition: background .3s; transition: background .3s;
-webkit-tap-highlight-color:transparent; -webkit-tap-highlight-color: transparent;
&:hover { &:hover {
background: rgba(0, 0, 0, .025) background: rgba(0, 0, 0, .025)
......
<template> <template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}"> <div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/> <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" /> <sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container"> <div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
<div :class="{'fixed-header':fixedHeader}"> <div :class="{ 'fixed-header': fixedHeader }">
<navbar /> <navbar />
<tags-view v-if="needTagsView" /> <tags-view v-if="needTagsView" />
</div> </div>
...@@ -63,10 +63,10 @@ export default { ...@@ -63,10 +63,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss"; @import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss"; @import "~@/assets/styles/variables.scss";
.app-wrapper { .app-wrapper {
@include clearfix; @include clearfix;
position: relative; position: relative;
height: 100%; height: 100%;
...@@ -76,9 +76,9 @@ export default { ...@@ -76,9 +76,9 @@ export default {
position: fixed; position: fixed;
top: 0; top: 0;
} }
} }
.drawer-bg { .drawer-bg {
background: #000; background: #000;
opacity: 0.3; opacity: 0.3;
width: 100%; width: 100%;
...@@ -86,26 +86,26 @@ export default { ...@@ -86,26 +86,26 @@ export default {
height: 100%; height: 100%;
position: absolute; position: absolute;
z-index: 999; z-index: 999;
} }
.fixed-header { .fixed-header {
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: 0;
z-index: 9; z-index: 9;
width: calc(100% - #{$base-sidebar-width}); width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s; transition: width 0.28s;
} }
.hideSidebar .fixed-header { .hideSidebar .fixed-header {
width: calc(100% - 54px); width: calc(100% - 54px);
} }
.sidebarHide .fixed-header { .sidebarHide .fixed-header {
width: 100%; width: 100%;
} }
.mobile .fixed-header { .mobile .fixed-header {
width: 100%; width: 100%;
} }
</style> </style>
...@@ -50,13 +50,13 @@ service.interceptors.request.use(config => { ...@@ -50,13 +50,13 @@ service.interceptors.request.use(config => {
const s_data = sessionObj.data; // 请求数据 const s_data = sessionObj.data; // 请求数据
const s_time = sessionObj.time; // 请求时间 const s_time = sessionObj.time; // 请求时间
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交 const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) { // if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
const message = '数据正在处理,请勿重复提交'; // const message = '数据正在处理,请勿重复提交';
console.warn(`[${s_url}]: ` + message) // console.warn(`[${s_url}]: ` + message)
return Promise.reject(new Error(message)) // return Promise.reject(new Error(message))
} else { // } else {
cache.session.setJSON('sessionObj', requestObj) // cache.session.setJSON('sessionObj', requestObj)
} // }
} }
} }
return config return config
......
...@@ -53,24 +53,27 @@ ...@@ -53,24 +53,27 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="介绍图点单屏" prop="introImages"> <el-form-item label="介绍图点单屏" prop="introImages">
<ImageUpload :value="form.pics.introImages" v-model="form.pics.introImages" :limit="3" /> <ImageUpload :arrType="true" :value="form.pics.introImages" v-model="form.pics.introImages" :limit="3" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="介绍图小程序" prop="introImagesApplet"> <el-form-item label="介绍图小程序" prop="introImagesApplet">
<ImageUpload :value="form.pics.introImagesApplet" v-model="form.pics.introImagesApplet" :limit="3" /> <ImageUpload :arrType="true" :value="form.pics.introImagesApplet" v-model="form.pics.introImagesApplet"
:limit="3" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="内容图点单屏" prop="detailImages"> <el-form-item label="内容图点单屏" prop="detailImages">
<ImageUpload :value="form.pics.detailImages" v-model="form.pics.detailImages" :limit="3" /> <ImageUpload :arrType="true" :value="form.pics.detailImages" v-model="form.pics.detailImages"
:limit="3" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="内容图小程序" prop="detailImagesApplet"> <el-form-item label="内容图小程序" prop="detailImagesApplet">
<ImageUpload :value="form.pics.detailImagesApplet" v-model="form.pics.detailImagesApplet" :limit="3" /> <ImageUpload :arrType="true" :value="form.pics.detailImagesApplet" v-model="form.pics.detailImagesApplet"
:limit="3" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
<template> <template>
<div> <div>
<el-dialog title="上架" :visible.sync="dialogVisible" width="30%" :before-close="handleClose"> <el-dialog title="上架" :visible.sync="dialogVisible" width="30%">
<el-checkbox v-model="allPut">同时上架到所有店铺,所有机器中</el-checkbox> <el-checkbox v-model="allPut">同时上架到所有店铺,所有机器中</el-checkbox>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="putShop">确 定</el-button> <el-button type="primary" @click="putShop">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="上架" :visible.sync="dialogVisible2" width="30%" :before-close="handleClose"> <el-dialog title="上架" :visible.sync="dialogVisible2" width="30%">
本商品已在店铺中上架,下架商品会在店铺中同时下架,是否确认下架? 本商品已在店铺中上架,下架商品会在店铺中同时下架,是否确认下架?
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
......
<template> <template>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">若依后台管理系统</h3> <h3 class="title">HOOLOO运营管理系统</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"
......
<template> <template>
<div class="register"> <div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form"> <el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">若依后台管理系统</h3> <h3 class="title">HOOLOO运营管理系统</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号"> <el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
......
<template>
<div>
<ImageUpload @callback="submit" v-model="value" :limit="1" />
</div>
</template>
<script>
import { updateConfig } from '@/api/system/config';
export default {
props: ['initValue'],
watch: {
initValue(val) {
this.value = val?.configValue
},
value(val) {
}
},
data() {
return {
value: ''
}
},
methods: {
submit() {
this.$nextTick(() => {
updateConfig({ ...this.initValue, configValue: this.value }).then(res => {
this.$modal.msgSuccess("修改成功");
})
})
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<el-form ref="form" label-width="80px">
<el-form-item label="停业">
<ImageUpload @callback="submit" v-model="list['closeDown']" :limit="1" />
</el-form-item>
<el-form-item label="制作中">
<ImageUpload @callback="submit" v-model="list['inProduction']" :limit="1" />
</el-form-item>
<el-form-item label="有待取单">
<ImageUpload @callback="submit" v-model="list['thereAOrder']" :limit="1" />
</el-form-item>
<el-form-item label="无待取单">
<ImageUpload @callback="submit" v-model="list['noOrder']" :limit="1" />
</el-form-item>
</el-form>
</div>
</template>
<script>
import { updateConfig } from '@/api/system/config';
export default {
props: ['initValue'],
watch: {
initValue(val) {
if (val.configValue) {
this.list = JSON.parse(val.configValue)
}
}
},
data() {
return {
list: {}
}
},
methods: {
submit() {
this.$nextTick(() => {
console.log(this.list);
updateConfig({ ...this.initValue, configValue: JSON.stringify(this.list) }).then(res => {
this.$modal.msgSuccess("修改成功");
})
})
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="app-container">
<el-tabs tab-position="left" v-model="activeName">
<el-tab-pane label="左侧图片" name="first">
<LeftImg :initValue="workValue['menu.left']" />
</el-tab-pane>
<el-tab-pane label="右侧图片" name="second">
<Right :initValue="workValue['menu.right']" />
</el-tab-pane>
<el-tab-pane label="其他设置" name="third">
<el-form ref="form" label-width="180px">
<el-form-item label="每件商品数量">
<el-input v-model="workValue['goods.limit'].configValue" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="温馨提示地址">
<el-input v-model="workValue['tips.address'].configValue" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="">
<el-button @click="sumit">提交</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { listConfig } from '@/api/system/config';
import LeftImg from './components/leftImg.vue'
import Right from './components/right.vue'
import Other from './components/other.vue'
import { updateConfig } from '@/api/system/config';
export default {
components: { LeftImg, Right, Other },
data() {
return {
activeName: 'first',
workValue: {
"menu.left": {},
"menu.right": {},
"goods.limit": {},
"tips.address": {},
}
};
},
mounted() {
listConfig().then(({ rows }) => {
rows.forEach(element => {
this.workValue[element.configKey] = element
});
})
},
methods: {
sumit() {
updateConfig({ ...this.workValue['goods.limit'] }).then(res => {
updateConfig({ ...this.workValue['tips.address'] }).then(res => {
this.$modal.msgSuccess("修改成功");
})
})
}
}
}
</script>
<style>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment