Commit 9b763f0f by 张成

update

parent 3963e692
File added
......@@ -2,7 +2,7 @@
"name": "ruoyi",
"version": "3.8.1",
"description": "运营管理系统",
"author": "若依",
"author": "HOOLOO",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
......
<template>
<div class="component-upload-image">
<el-upload
multiple
:action="uploadImgUrl"
list-type="picture-card"
: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 }"
>
<el-upload multiple :action="uploadImgUrl" list-type="picture-card" :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>
</el-upload>
......@@ -32,16 +19,8 @@
的文件
</div>
<el-dialog
:visible.sync="dialogVisible"
title="预览"
width="800"
append-to-body
>
<img
:src="dialogImageUrl"
style="display: block; max-width: 100%; margin: 0 auto"
/>
<el-dialog :visible.sync="dialogVisible" title="预览" width="800" append-to-body>
<img :src="dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto" />
</el-dialog>
</div>
</template>
......@@ -73,6 +52,11 @@ export default {
type: Boolean,
default: true,
},
// 是否显示提示
arrType: {
type: Boolean,
default: false,
},
},
data() {
return {
......@@ -139,6 +123,7 @@ export default {
this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = [];
this.number = 0;
this.$emit("callback", this.listToString(this.fileList));
this.$emit("input", this.listToString(this.fileList));
this.$modal.closeLoading();
}
......@@ -202,9 +187,15 @@ export default {
if (size == 0) {
return "";
}
if (this.arrType) {
return strs;
}
if (size == 1) {
return strs[0];
}
return strs;
},
},
......@@ -220,6 +211,7 @@ export default {
width: 100px;
height: 100px;
}
// 去掉动画效果
::v-deep .el-list-enter-active,
::v-deep .el-list-leave-active {
......
<template>
<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"/>
<top-nav id="topmenu-container" class="topmenu-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" />
<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">
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar">
......@@ -104,7 +86,7 @@ export default {
this.$store.dispatch('LogOut').then(() => {
location.href = '/index';
})
}).catch(() => {});
}).catch(() => { });
}
}
}
......@@ -116,7 +98,7 @@ export default {
overflow: hidden;
position: relative;
background: #fff;
box-shadow: 0 1px 4px rgba(0,21,41,.08);
box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
.hamburger-container {
line-height: 46px;
......@@ -124,7 +106,7 @@ export default {
float: left;
cursor: pointer;
transition: background .3s;
-webkit-tap-highlight-color:transparent;
-webkit-tap-highlight-color: transparent;
&:hover {
background: rgba(0, 0, 0, .025)
......
<template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
......@@ -63,49 +63,49 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
&.mobile.openSidebar {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
}
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.sidebarHide .fixed-header {
width: 100%;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
}
.mobile .fixed-header {
width: 100%;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}
.sidebarHide .fixed-header {
width: 100%;
}
.mobile .fixed-header {
width: 100%;
}
</style>
......@@ -50,13 +50,13 @@ service.interceptors.request.use(config => {
const s_data = sessionObj.data; // 请求数据
const s_time = sessionObj.time; // 请求时间
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
const message = '数据正在处理,请勿重复提交';
console.warn(`[${s_url}]: ` + message)
return Promise.reject(new Error(message))
} else {
cache.session.setJSON('sessionObj', requestObj)
}
// if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
// const message = '数据正在处理,请勿重复提交';
// console.warn(`[${s_url}]: ` + message)
// return Promise.reject(new Error(message))
// } else {
// cache.session.setJSON('sessionObj', requestObj)
// }
}
}
return config
......
......@@ -53,24 +53,27 @@
<el-row :gutter="10">
<el-col :span="12">
<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-col>
<el-col :span="12">
<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-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<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-col>
<el-col :span="12">
<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-col>
</el-row>
......
<template>
<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>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="putShop">确 定</el-button>
</span>
</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">
<el-button @click="dialogVisible = false">取 消</el-button>
......
<template>
<div class="login">
<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-input
v-model="loginForm.username"
......
<template>
<div class="register">
<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-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<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