修改ESLint问题
This commit is contained in:
parent
701eb95f03
commit
8db86081eb
@ -1,5 +1,5 @@
|
|||||||
const Mock = require('mockjs')
|
const Mock = require('mockjs')
|
||||||
const {param2Obj} = require('./utils')
|
const { param2Obj } = require('./utils')
|
||||||
|
|
||||||
const user = require('./user')
|
const user = require('./user')
|
||||||
const table = require('./table')
|
const table = require('./table')
|
||||||
@ -16,7 +16,7 @@ function mockXHR() {
|
|||||||
// mock patch
|
// mock patch
|
||||||
// https://github.com/nuysoft/Mock/issues/300
|
// https://github.com/nuysoft/Mock/issues/300
|
||||||
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
|
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
|
||||||
Mock.XHR.prototype.send = function () {
|
Mock.XHR.prototype.send = function() {
|
||||||
if (this.custom.xhr) {
|
if (this.custom.xhr) {
|
||||||
this.custom.xhr.withCredentials = this.withCredentials || false
|
this.custom.xhr.withCredentials = this.withCredentials || false
|
||||||
|
|
||||||
@ -28,10 +28,10 @@ function mockXHR() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function XHR2ExpressReqWrap(respond) {
|
function XHR2ExpressReqWrap(respond) {
|
||||||
return function (options) {
|
return function(options) {
|
||||||
let result = null
|
let result = null
|
||||||
if (respond instanceof Function) {
|
if (respond instanceof Function) {
|
||||||
const {body, type, url} = options
|
const { body, type, url } = options
|
||||||
// https://expressjs.com/en/4x/api.html#req
|
// https://expressjs.com/en/4x/api.html#req
|
||||||
result = respond({
|
result = respond({
|
||||||
method: type,
|
method: type,
|
||||||
|
@ -8,7 +8,7 @@ const mockDir = path.join(process.cwd(), 'mock')
|
|||||||
|
|
||||||
function registerRoutes(app) {
|
function registerRoutes(app) {
|
||||||
let mockLastIndex
|
let mockLastIndex
|
||||||
const {mocks} = require('./index.js')
|
const { mocks } = require('./index.js')
|
||||||
const mocksForServer = mocks.map(route => {
|
const mocksForServer = mocks.map(route => {
|
||||||
return responseFake(route.url, route.type, route.response)
|
return responseFake(route.url, route.type, route.response)
|
||||||
})
|
})
|
||||||
|
@ -28,7 +28,7 @@ module.exports = [
|
|||||||
url: '/vue-admin-template/user/login',
|
url: '/vue-admin-template/user/login',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
response: config => {
|
response: config => {
|
||||||
const {username} = config.body
|
const { username } = config.body
|
||||||
const token = tokens[username]
|
const token = tokens[username]
|
||||||
|
|
||||||
// mock error
|
// mock error
|
||||||
@ -51,7 +51,7 @@ module.exports = [
|
|||||||
url: '/vue-admin-template/user/info\.*',
|
url: '/vue-admin-template/user/info\.*',
|
||||||
type: 'get',
|
type: 'get',
|
||||||
response: config => {
|
response: config => {
|
||||||
const {token} = config.query
|
const { token } = config.query
|
||||||
const info = users[token]
|
const info = users[token]
|
||||||
|
|
||||||
// mock error
|
// mock error
|
||||||
|
@ -13,6 +13,5 @@
|
|||||||
to continue.</strong>
|
to continue.</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<!-- built files will be auto injected -->
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<router-view/>
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ export default {
|
|||||||
return request({
|
return request({
|
||||||
url: `${api_name}/doAssign`,
|
url: `${api_name}/doAssign`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: {roleId, permissionId}
|
params: { roleId, permissionId }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,11 @@ const api_name = '/admin/acl/user'
|
|||||||
/*
|
/*
|
||||||
登陆
|
登陆
|
||||||
*/
|
*/
|
||||||
export function login({username, password}) {
|
export function login({ username, password }) {
|
||||||
return request({
|
return request({
|
||||||
url: '/admin/acl/index/login',
|
url: '/admin/acl/index/login',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {username, password}
|
data: { username, password }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
export * as user from './acl/user'
|
export * as user from './acl/user'
|
||||||
export {default as role} from './acl/role'
|
export { default as role } from './acl/role'
|
||||||
export {default as permission} from './acl/permission'
|
export { default as permission } from './acl/permission'
|
||||||
|
@ -12,7 +12,7 @@ export function getInfo(token) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/admin/acl/index/info',
|
url: '/admin/acl/index/info',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {token}
|
params: { token }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<transition-group name="breadcrumb">
|
<transition-group name="breadcrumb">
|
||||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{
|
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{
|
||||||
item.meta.title
|
item.meta.title
|
||||||
}}</span>
|
}}</span>
|
||||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
@ -35,7 +35,7 @@ export default {
|
|||||||
const first = matched[0]
|
const first = matched[0]
|
||||||
|
|
||||||
if (!this.isDashboard(first)) {
|
if (!this.isDashboard(first)) {
|
||||||
matched = [{path: '/dashboard', meta: {title: 'Dashboard'}}].concat(matched)
|
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||||
@ -49,12 +49,12 @@ export default {
|
|||||||
},
|
},
|
||||||
pathCompile(path) {
|
pathCompile(path) {
|
||||||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
||||||
const {params} = this.$route
|
const { params } = this.$route
|
||||||
var toPath = pathToRegexp.compile(path)
|
var toPath = pathToRegexp.compile(path)
|
||||||
return toPath(params)
|
return toPath(params)
|
||||||
},
|
},
|
||||||
handleLink(item) {
|
handleLink(item) {
|
||||||
const {redirect, path} = item
|
const { redirect, path } = item
|
||||||
if (redirect) {
|
if (redirect) {
|
||||||
this.$router.push(redirect)
|
this.$router.push(redirect)
|
||||||
return
|
return
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
height="64"
|
height="64"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"/>
|
d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tooltip :content="title" placement="top-start">
|
<el-tooltip :content="title" placement="top-start">
|
||||||
<el-button v-bind="$attrs" v-on="$listeners"/>
|
<el-button v-bind="$attrs" v-on="$listeners" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners"/>
|
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
||||||
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
||||||
<use :xlink:href="iconName"/>
|
<use :xlink:href="iconName" />
|
||||||
</svg>
|
</svg>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
|
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
|
||||||
import {isExternal} from '@/utils/validate'
|
import { isExternal } from '@/utils/validate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SvgIcon',
|
name: 'SvgIcon',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="app-main">
|
<section class="app-main">
|
||||||
<transition name="fade-transform" mode="out-in">
|
<transition name="fade-transform" mode="out-in">
|
||||||
<router-view :key="key"/>
|
<router-view :key="key" />
|
||||||
</transition>
|
</transition>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar"/>
|
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||||
|
|
||||||
<breadcrumb class="breadcrumb-container"/>
|
<breadcrumb class="breadcrumb-container" />
|
||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<el-dropdown class="avatar-container" trigger="click">
|
<el-dropdown class="avatar-container" trigger="click">
|
||||||
<div class="avatar-wrapper">
|
<div class="avatar-wrapper">
|
||||||
<img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar">
|
<img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar">
|
||||||
<i class="el-icon-caret-bottom"/>
|
<i class="el-icon-caret-bottom" />
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown" class="user-dropdown">
|
<el-dropdown-menu slot="dropdown" class="user-dropdown">
|
||||||
<router-link to="/">
|
<router-link to="/">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters} from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import Breadcrumb from '@/components/Breadcrumb'
|
import Breadcrumb from '@/components/Breadcrumb'
|
||||||
import Hamburger from '@/components/Hamburger'
|
import Hamburger from '@/components/Hamburger'
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
render(h, context) {
|
render(h, context) {
|
||||||
const {icon, title} = context.props
|
const { icon, title } = context.props
|
||||||
const vnodes = []
|
const vnodes = []
|
||||||
|
|
||||||
if (icon) {
|
if (icon) {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="type" v-bind="linkProps(to)">
|
<component :is="type" v-bind="linkProps(to)">
|
||||||
<slot/>
|
<slot />
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {isExternal} from '@/utils/validate'
|
import { isExternal } from '@/utils/validate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="!item.hidden">
|
<div v-if="!item.hidden">
|
||||||
<template
|
<template
|
||||||
v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"
|
||||||
|
>
|
||||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title"/>
|
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</app-link>
|
</app-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title"/>
|
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||||
</template>
|
</template>
|
||||||
<sidebar-item
|
<sidebar-item
|
||||||
v-for="child in item.children"
|
v-for="child in item.children"
|
||||||
@ -27,14 +28,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import {isExternal} from '@/utils/validate'
|
import { isExternal } from '@/utils/validate'
|
||||||
import Item from './Item'
|
import Item from './Item'
|
||||||
import AppLink from './Link'
|
import AppLink from './Link'
|
||||||
import FixiOSBug from './FixiOSBug'
|
import FixiOSBug from './FixiOSBug'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SidebarItem',
|
name: 'SidebarItem',
|
||||||
components: {Item, AppLink},
|
components: { Item, AppLink },
|
||||||
mixins: [FixiOSBug],
|
mixins: [FixiOSBug],
|
||||||
props: {
|
props: {
|
||||||
// route object
|
// route object
|
||||||
@ -76,7 +77,7 @@ export default {
|
|||||||
|
|
||||||
// Show parent if there are no child router to display
|
// Show parent if there are no child router to display
|
||||||
if (showingChildren.length === 0) {
|
if (showingChildren.length === 0) {
|
||||||
this.onlyOneChild = {...parent, path: '', noShowingChildren: true}
|
this.onlyOneChild = { ...parent, path: '', noShowingChildren: true }
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="{'has-logo':showLogo}">
|
<div :class="{'has-logo':showLogo}">
|
||||||
<logo v-if="showLogo" :collapse="isCollapse"/>
|
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
<el-menu
|
<el-menu
|
||||||
:default-active="activeMenu"
|
:default-active="activeMenu"
|
||||||
@ -12,20 +12,20 @@
|
|||||||
:collapse-transition="false"
|
:collapse-transition="false"
|
||||||
mode="vertical"
|
mode="vertical"
|
||||||
>
|
>
|
||||||
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path"/>
|
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters} from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import Logo from './Logo'
|
import Logo from './Logo'
|
||||||
import SidebarItem from './SidebarItem'
|
import SidebarItem from './SidebarItem'
|
||||||
import variables from '@/styles/variables.scss'
|
import variables from '@/styles/variables.scss'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {SidebarItem, Logo},
|
components: { SidebarItem, Logo },
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'sidebar'
|
'sidebar'
|
||||||
@ -35,7 +35,7 @@ export default {
|
|||||||
},
|
},
|
||||||
activeMenu() {
|
activeMenu() {
|
||||||
const route = this.$route
|
const route = this.$route
|
||||||
const {meta, path} = route
|
const { meta, path } = route
|
||||||
// if set path, the sidebar will highlight the path you set
|
// if set path, the sidebar will highlight the path you set
|
||||||
if (meta.activeMenu) {
|
if (meta.activeMenu) {
|
||||||
return meta.activeMenu
|
return meta.activeMenu
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
export {default as Navbar} from './Navbar'
|
export { default as Navbar } from './Navbar'
|
||||||
export {default as Sidebar} from './Sidebar'
|
export { default as Sidebar } from './Sidebar'
|
||||||
export {default as AppMain} from './AppMain'
|
export { default as AppMain } from './AppMain'
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="classObj" class="app-wrapper">
|
<div :class="classObj" class="app-wrapper">
|
||||||
<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 class="sidebar-container"/>
|
<sidebar class="sidebar-container" />
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<div :class="{'fixed-header':fixedHeader}">
|
<div :class="{'fixed-header':fixedHeader}">
|
||||||
<navbar/>
|
<navbar />
|
||||||
</div>
|
</div>
|
||||||
<app-main/>
|
<app-main />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Navbar, Sidebar, AppMain} from './components'
|
import { Navbar, Sidebar, AppMain } from './components'
|
||||||
import ResizeMixin from './mixin/ResizeHandler'
|
import ResizeMixin from './mixin/ResizeHandler'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -44,7 +44,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
this.$store.dispatch('app/closeSideBar', {withoutAnimation: false})
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
||||||
const {body} = document
|
const { body } = document
|
||||||
const WIDTH = 992 // refer to Bootstrap's responsive design
|
const WIDTH = 992 // refer to Bootstrap's responsive design
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
watch: {
|
watch: {
|
||||||
$route(route) {
|
$route(route) {
|
||||||
if (this.device === 'mobile' && this.sidebar.opened) {
|
if (this.device === 'mobile' && this.sidebar.opened) {
|
||||||
store.dispatch('app/closeSideBar', {withoutAnimation: false})
|
store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -21,7 +21,7 @@ export default {
|
|||||||
const isMobile = this.$_isMobile()
|
const isMobile = this.$_isMobile()
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
store.dispatch('app/toggleDevice', 'mobile')
|
store.dispatch('app/toggleDevice', 'mobile')
|
||||||
store.dispatch('app/closeSideBar', {withoutAnimation: true})
|
store.dispatch('app/closeSideBar', { withoutAnimation: true })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -37,7 +37,7 @@ export default {
|
|||||||
store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
|
store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
|
||||||
|
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
store.dispatch('app/closeSideBar', {withoutAnimation: true})
|
store.dispatch('app/closeSideBar', { withoutAnimation: true })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,12 +32,12 @@ Vue.prototype.$hasBP = hasBtnPermission
|
|||||||
* please remove it before going online ! ! !
|
* please remove it before going online ! ! !
|
||||||
*/
|
*/
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
const {mockXHR} = require('../mock')
|
const { mockXHR } = require('../mock')
|
||||||
mockXHR()
|
mockXHR()
|
||||||
}
|
}
|
||||||
|
|
||||||
// set ElementUI lang to EN
|
// set ElementUI lang to EN
|
||||||
Vue.use(ElementUI, {locale})
|
Vue.use(ElementUI, { locale })
|
||||||
// 如果想要中文版 element-ui,按如下方式声明
|
// 如果想要中文版 element-ui,按如下方式声明
|
||||||
// Vue.use(ElementUI)
|
// Vue.use(ElementUI)
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import router from './router'
|
import router from './router'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import {Message} from 'element-ui'
|
import { Message } from 'element-ui'
|
||||||
import NProgress from 'nprogress' // progress bar
|
import NProgress from 'nprogress' // progress bar
|
||||||
import 'nprogress/nprogress.css' // progress bar style
|
import 'nprogress/nprogress.css' // progress bar style
|
||||||
import {getToken} from '@/utils/auth' // get token from cookie
|
import { getToken } from '@/utils/auth' // get token from cookie
|
||||||
import getPageTitle from '@/utils/get-page-title'
|
import getPageTitle from '@/utils/get-page-title'
|
||||||
|
|
||||||
NProgress.configure({showSpinner: false}) // NProgress Configuration
|
NProgress.configure({ showSpinner: false }) // NProgress Configuration
|
||||||
|
|
||||||
const whiteList = ['/login'] // no redirect whitelist
|
const whiteList = ['/login'] // no redirect whitelist
|
||||||
|
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async(to, from, next) => {
|
||||||
// start progress bar
|
// start progress bar
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
if (hasToken) {
|
if (hasToken) {
|
||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
// if is logged in, redirect to the home page
|
// if is logged in, redirect to the home page
|
||||||
next({path: '/'})
|
next({ path: '/' })
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
const hasGetUserInfo = store.getters.name
|
const hasGetUserInfo = store.getters.name
|
||||||
|
@ -51,7 +51,7 @@ export const constantRoutes = [
|
|||||||
path: 'dashboard',
|
path: 'dashboard',
|
||||||
name: 'Dashboard',
|
name: 'Dashboard',
|
||||||
component: () => import('@/views/dashboard/index'),
|
component: () => import('@/views/dashboard/index'),
|
||||||
meta: {title: 'Dashboard', icon: 'dashboard'}
|
meta: { title: 'Dashboard', icon: 'dashboard' }
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -130,88 +130,88 @@ export const constantRoutes = [
|
|||||||
path: '/product',
|
path: '/product',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/product/category/list',
|
redirect: '/product/category/list',
|
||||||
meta: {title: '商品信息管理', icon: 'dashboard'},
|
meta: { title: '商品信息管理', icon: 'dashboard' },
|
||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'category/list',
|
path: 'category/list',
|
||||||
name: 'Category',
|
name: 'Category',
|
||||||
component: () => import('@/views/product/category/list'),
|
component: () => import('@/views/product/category/list'),
|
||||||
meta: {title: '商品分类'}
|
meta: { title: '商品分类' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'category/add',
|
path: 'category/add',
|
||||||
name: 'CategoryAdd',
|
name: 'CategoryAdd',
|
||||||
component: () => import('@/views/product/category/form'),
|
component: () => import('@/views/product/category/form'),
|
||||||
meta: {title: '添加'},
|
meta: { title: '添加' },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'category/edit/:id',
|
path: 'category/edit/:id',
|
||||||
name: 'CategoryEdit',
|
name: 'CategoryEdit',
|
||||||
component: () => import('@/views/product/category/form'),
|
component: () => import('@/views/product/category/form'),
|
||||||
meta: {title: '编辑', noCache: true},
|
meta: { title: '编辑', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'attrGroup/list',
|
path: 'attrGroup/list',
|
||||||
name: 'AttrGroup',
|
name: 'AttrGroup',
|
||||||
component: () => import('@/views/product/attrGroup/list'),
|
component: () => import('@/views/product/attrGroup/list'),
|
||||||
meta: {title: '平台属性分组'}
|
meta: { title: '平台属性分组' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'attrGroup/add',
|
path: 'attrGroup/add',
|
||||||
name: 'AttrGroupAdd',
|
name: 'AttrGroupAdd',
|
||||||
component: () => import('@/views/product/attrGroup/form'),
|
component: () => import('@/views/product/attrGroup/form'),
|
||||||
meta: {title: '添加'},
|
meta: { title: '添加' },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'attrGroup/edit/:id',
|
path: 'attrGroup/edit/:id',
|
||||||
name: 'AttrGroupEdit',
|
name: 'AttrGroupEdit',
|
||||||
component: () => import('@/views/product/attrGroup/form'),
|
component: () => import('@/views/product/attrGroup/form'),
|
||||||
meta: {title: '编辑', noCache: true},
|
meta: { title: '编辑', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'attr/list/:id',
|
path: 'attr/list/:id',
|
||||||
name: 'AttrList',
|
name: 'AttrList',
|
||||||
component: () => import('@/views/product/attr/list'),
|
component: () => import('@/views/product/attr/list'),
|
||||||
meta: {title: '平台属性列表', noCache: true},
|
meta: { title: '平台属性列表', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'attr/add',
|
path: 'attr/add',
|
||||||
name: 'AttrAdd',
|
name: 'AttrAdd',
|
||||||
component: () => import('@/views/product/attr/form'),
|
component: () => import('@/views/product/attr/form'),
|
||||||
meta: {title: '添加'},
|
meta: { title: '添加' },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'attr/edit/:id',
|
path: 'attr/edit/:id',
|
||||||
name: 'AttrEdit',
|
name: 'AttrEdit',
|
||||||
component: () => import('@/views/product/attr/form'),
|
component: () => import('@/views/product/attr/form'),
|
||||||
meta: {title: '编辑', noCache: true},
|
meta: { title: '编辑', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'skuInfo/list',
|
path: 'skuInfo/list',
|
||||||
name: 'SkuInfo',
|
name: 'SkuInfo',
|
||||||
component: () => import('@/views/product/skuInfo/list'),
|
component: () => import('@/views/product/skuInfo/list'),
|
||||||
meta: {title: 'SKU列表'}
|
meta: { title: 'SKU列表' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'skuInfo/add',
|
path: 'skuInfo/add',
|
||||||
name: 'SkuInfoAdd',
|
name: 'SkuInfoAdd',
|
||||||
component: () => import('@/views/product/skuInfo/form'),
|
component: () => import('@/views/product/skuInfo/form'),
|
||||||
meta: {title: '添加'},
|
meta: { title: '添加' },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'skuInfo/edit/:id',
|
path: 'skuInfo/edit/:id',
|
||||||
name: 'SkuInfoEdit',
|
name: 'SkuInfoEdit',
|
||||||
component: () => import('@/views/product/skuInfo/form'),
|
component: () => import('@/views/product/skuInfo/form'),
|
||||||
meta: {title: '编辑', noCache: true},
|
meta: { title: '编辑', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -222,7 +222,7 @@ export const constantRoutes = [
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/activity/seckill',
|
redirect: '/activity/seckill',
|
||||||
name: 'Activity',
|
name: 'Activity',
|
||||||
meta: {title: '营销活动管理', icon: 'dashboard'},
|
meta: { title: '营销活动管理', icon: 'dashboard' },
|
||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
children: [
|
children: [
|
||||||
// {
|
// {
|
||||||
@ -257,54 +257,54 @@ export const constantRoutes = [
|
|||||||
path: 'activityInfo/list',
|
path: 'activityInfo/list',
|
||||||
name: 'ActivityInfo',
|
name: 'ActivityInfo',
|
||||||
component: () => import('@/views/activity/activityInfo/list'),
|
component: () => import('@/views/activity/activityInfo/list'),
|
||||||
meta: {title: '活动列表'}
|
meta: { title: '活动列表' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'activityInfo/add',
|
path: 'activityInfo/add',
|
||||||
name: 'ActivityInfoAdd',
|
name: 'ActivityInfoAdd',
|
||||||
component: () => import('@/views/activity/activityInfo/form'),
|
component: () => import('@/views/activity/activityInfo/form'),
|
||||||
meta: {title: '添加'},
|
meta: { title: '添加' },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'activityInfo/edit/:id',
|
path: 'activityInfo/edit/:id',
|
||||||
name: 'ActivityInfoEdit',
|
name: 'ActivityInfoEdit',
|
||||||
component: () => import('@/views/activity/activityInfo/form'),
|
component: () => import('@/views/activity/activityInfo/form'),
|
||||||
meta: {title: '编辑', noCache: true},
|
meta: { title: '编辑', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'activityInfo/rule/:id',
|
path: 'activityInfo/rule/:id',
|
||||||
name: 'ActivityInfoRule',
|
name: 'ActivityInfoRule',
|
||||||
component: () => import('@/views/activity/activityInfo/rule'),
|
component: () => import('@/views/activity/activityInfo/rule'),
|
||||||
meta: {title: '规则', noCache: true},
|
meta: { title: '规则', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'couponInfo/list',
|
path: 'couponInfo/list',
|
||||||
name: 'CouponInfo',
|
name: 'CouponInfo',
|
||||||
component: () => import('@/views/activity/couponInfo/list'),
|
component: () => import('@/views/activity/couponInfo/list'),
|
||||||
meta: {title: '优惠券列表'}
|
meta: { title: '优惠券列表' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'couponInfo/add',
|
path: 'couponInfo/add',
|
||||||
name: 'CouponInfoAdd',
|
name: 'CouponInfoAdd',
|
||||||
component: () => import('@/views/activity/couponInfo/form'),
|
component: () => import('@/views/activity/couponInfo/form'),
|
||||||
meta: {title: '添加'},
|
meta: { title: '添加' },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'couponInfo/edit/:id',
|
path: 'couponInfo/edit/:id',
|
||||||
name: 'CouponInfoEdit',
|
name: 'CouponInfoEdit',
|
||||||
component: () => import('@/views/activity/couponInfo/form'),
|
component: () => import('@/views/activity/couponInfo/form'),
|
||||||
meta: {title: '编辑', noCache: true},
|
meta: { title: '编辑', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'couponInfo/rule/:id',
|
path: 'couponInfo/rule/:id',
|
||||||
name: 'CouponInfoRule',
|
name: 'CouponInfoRule',
|
||||||
component: () => import('@/views/activity/couponInfo/rule'),
|
component: () => import('@/views/activity/couponInfo/rule'),
|
||||||
meta: {title: '规则', noCache: true},
|
meta: { title: '规则', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -315,20 +315,20 @@ export const constantRoutes = [
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/user/leader/list',
|
redirect: '/user/leader/list',
|
||||||
name: 'Leader',
|
name: 'Leader',
|
||||||
meta: {title: '团长管理', icon: 'table'},
|
meta: { title: '团长管理', icon: 'table' },
|
||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'leader/checkList',
|
path: 'leader/checkList',
|
||||||
name: 'LeaderCheck',
|
name: 'LeaderCheck',
|
||||||
component: () => import('@/views/user/leader/checkList'),
|
component: () => import('@/views/user/leader/checkList'),
|
||||||
meta: {title: '团长待审核'}
|
meta: { title: '团长待审核' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'leader/list',
|
path: 'leader/list',
|
||||||
name: 'leader',
|
name: 'leader',
|
||||||
component: () => import('@/views/user/leader/list'),
|
component: () => import('@/views/user/leader/list'),
|
||||||
meta: {title: '团长已审核'}
|
meta: { title: '团长已审核' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -338,38 +338,38 @@ export const constantRoutes = [
|
|||||||
path: '/order',
|
path: '/order',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/order/orderInfo/list',
|
redirect: '/order/orderInfo/list',
|
||||||
meta: {title: '订单管理', icon: 'table'},
|
meta: { title: '订单管理', icon: 'table' },
|
||||||
alwaysShow: true,
|
alwaysShow: true,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'orderInfo/list',
|
path: 'orderInfo/list',
|
||||||
name: 'OrderInfo',
|
name: 'OrderInfo',
|
||||||
component: () => import('@/views/order/orderInfo/list'),
|
component: () => import('@/views/order/orderInfo/list'),
|
||||||
meta: {title: '订单列表'}
|
meta: { title: '订单列表' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'orderInfo/show/:id',
|
path: 'orderInfo/show/:id',
|
||||||
name: 'OrderInfoShow',
|
name: 'OrderInfoShow',
|
||||||
component: () => import('@/views/order/orderInfo/show'),
|
component: () => import('@/views/order/orderInfo/show'),
|
||||||
meta: {title: '查看', noCache: true},
|
meta: { title: '查看', noCache: true },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'orderInfo/deliverList',
|
path: 'orderInfo/deliverList',
|
||||||
name: 'DetailList',
|
name: 'DetailList',
|
||||||
component: () => import('@/views/order/orderInfo/deliverList'),
|
component: () => import('@/views/order/orderInfo/deliverList'),
|
||||||
meta: {title: '发货列表'}
|
meta: { title: '发货列表' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
// 404 page must be placed at the end !!!
|
// 404 page must be placed at the end !!!
|
||||||
{path: '*', redirect: '/404', hidden: true}
|
{ path: '*', redirect: '/404', hidden: true }
|
||||||
]
|
]
|
||||||
|
|
||||||
const createRouter = () => new Router({
|
const createRouter = () => new Router({
|
||||||
// mode: 'history', // require service support
|
// mode: 'history', // require service support
|
||||||
scrollBehavior: () => ({y: 0}),
|
scrollBehavior: () => ({ y: 0 }),
|
||||||
routes: constantRoutes
|
routes: constantRoutes
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -29,13 +29,13 @@ const mutations = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
toggleSideBar({commit}) {
|
toggleSideBar({ commit }) {
|
||||||
commit('TOGGLE_SIDEBAR')
|
commit('TOGGLE_SIDEBAR')
|
||||||
},
|
},
|
||||||
closeSideBar({commit}, {withoutAnimation}) {
|
closeSideBar({ commit }, { withoutAnimation }) {
|
||||||
commit('CLOSE_SIDEBAR', withoutAnimation)
|
commit('CLOSE_SIDEBAR', withoutAnimation)
|
||||||
},
|
},
|
||||||
toggleDevice({commit}, device) {
|
toggleDevice({ commit }, device) {
|
||||||
commit('TOGGLE_DEVICE', device)
|
commit('TOGGLE_DEVICE', device)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import defaultSettings from '@/settings'
|
import defaultSettings from '@/settings'
|
||||||
|
|
||||||
const {showSettings, fixedHeader, sidebarLogo} = defaultSettings
|
const { showSettings, fixedHeader, sidebarLogo } = defaultSettings
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
showSettings: showSettings,
|
showSettings: showSettings,
|
||||||
@ -9,7 +9,7 @@ const state = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
CHANGE_SETTING: (state, {key, value}) => {
|
CHANGE_SETTING: (state, { key, value }) => {
|
||||||
// eslint-disable-next-line no-prototype-builtins
|
// eslint-disable-next-line no-prototype-builtins
|
||||||
if (state.hasOwnProperty(key)) {
|
if (state.hasOwnProperty(key)) {
|
||||||
state[key] = value
|
state[key] = value
|
||||||
@ -18,7 +18,7 @@ const mutations = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
changeSetting({commit}, data) {
|
changeSetting({ commit }, data) {
|
||||||
commit('CHANGE_SETTING', data)
|
commit('CHANGE_SETTING', data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {login, logout, getInfo} from '@/api/user'
|
import { login, logout, getInfo } from '@/api/user'
|
||||||
import {getToken, setToken, removeToken} from '@/utils/auth'
|
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||||
import {resetRouter} from '@/router'
|
import { resetRouter } from '@/router'
|
||||||
|
|
||||||
const getDefaultState = () => {
|
const getDefaultState = () => {
|
||||||
return {
|
return {
|
||||||
@ -29,11 +29,11 @@ const mutations = {
|
|||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
// user login
|
// user login
|
||||||
login({commit}, userInfo) {
|
login({ commit }, userInfo) {
|
||||||
const {username, password} = userInfo
|
const { username, password } = userInfo
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
login({username: username.trim(), password: password}).then(response => {
|
login({ username: username.trim(), password: password }).then(response => {
|
||||||
const {data} = response
|
const { data } = response
|
||||||
commit('SET_TOKEN', data.token)
|
commit('SET_TOKEN', data.token)
|
||||||
setToken(data.token)
|
setToken(data.token)
|
||||||
resolve()
|
resolve()
|
||||||
@ -44,16 +44,16 @@ const actions = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// get user info
|
// get user info
|
||||||
getInfo({commit, state}) {
|
getInfo({ commit, state }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getInfo(state.token).then(response => {
|
getInfo(state.token).then(response => {
|
||||||
const {data} = response
|
const { data } = response
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return reject('Verification failed, please Login again.')
|
return reject('Verification failed, please Login again.')
|
||||||
}
|
}
|
||||||
|
|
||||||
const {name, avatar} = data
|
const { name, avatar } = data
|
||||||
|
|
||||||
commit('SET_NAME', name)
|
commit('SET_NAME', name)
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar)
|
||||||
@ -65,7 +65,7 @@ const actions = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// user logout
|
// user logout
|
||||||
logout({commit, state}) {
|
logout({ commit, state }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
logout(state.token).then(() => {
|
logout(state.token).then(() => {
|
||||||
removeToken() // must remove token first
|
removeToken() // must remove token first
|
||||||
@ -79,7 +79,7 @@ const actions = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// remove token
|
// remove token
|
||||||
resetToken({commit}) {
|
resetToken({ commit }) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
removeToken() // must remove token first
|
removeToken() // must remove token first
|
||||||
commit('RESET_STATE')
|
commit('RESET_STATE')
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import {MessageBox, Message} from 'element-ui'
|
import { MessageBox, Message } from 'element-ui'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import {getToken} from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
|
|
||||||
// create an axios instance
|
// create an axios instance
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
|
@ -14,20 +14,32 @@
|
|||||||
:tree-props="{children: 'children'}"
|
:tree-props="{children: 'children'}"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-table-column prop="name" label="菜单名称" width="200"/>
|
<el-table-column prop="name" label="菜单名称" width="200" />
|
||||||
|
|
||||||
<el-table-column prop="code" label="权限标识" width="180"/>
|
<el-table-column prop="code" label="权限标识" width="180" />
|
||||||
|
|
||||||
<el-table-column prop="createTime" label="创建时间" width="200"/>
|
<el-table-column prop="createTime" label="创建时间" width="200" />
|
||||||
|
|
||||||
<el-table-column prop="updateTime" label="修改时间" width="200"/>
|
<el-table-column prop="updateTime" label="修改时间" width="200" />
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="scope.row.type !== 2" type="success" icon="el-icon-plus" size="mini" title="添加下级节点"
|
<el-button
|
||||||
@click="add(scope.row)"/>
|
v-if="scope.row.type !== 2"
|
||||||
<el-button type="primary" icon="el-icon-edit" size="mini" title="修改" @click="edit(scope.row)"/>
|
type="success"
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" title="删除"
|
icon="el-icon-plus"
|
||||||
:disabled="scope.row.children.length > 0" @click="removeDataById(scope.row.id)"/>
|
size="mini"
|
||||||
|
title="添加下级节点"
|
||||||
|
@click="add(scope.row)"
|
||||||
|
/>
|
||||||
|
<el-button type="primary" icon="el-icon-edit" size="mini" title="修改" @click="edit(scope.row)" />
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
title="删除"
|
||||||
|
:disabled="scope.row.children.length > 0"
|
||||||
|
@click="removeDataById(scope.row.id)"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -35,7 +47,7 @@
|
|||||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
|
||||||
<el-form ref="dataForm" :model="sysMenu" label-width="150px" size="small" style="padding-right: 40px;">
|
<el-form ref="dataForm" :model="sysMenu" label-width="150px" size="small" style="padding-right: 40px;">
|
||||||
<el-form-item v-if="sysMenu.id === ''" label="上级部门">
|
<el-form-item v-if="sysMenu.id === ''" label="上级部门">
|
||||||
<el-input v-model="sysMenu.parentName" disabled="true"/>
|
<el-input v-model="sysMenu.parentName" disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="菜单类型" prop="type">
|
<el-form-item label="菜单类型" prop="type">
|
||||||
<el-radio-group v-model="sysMenu.type" :disabled="typeDisabled">
|
<el-radio-group v-model="sysMenu.type" :disabled="typeDisabled">
|
||||||
@ -45,24 +57,26 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="菜单名称" prop="name">
|
<el-form-item label="菜单名称" prop="name">
|
||||||
<el-input v-model="sysMenu.name"/>
|
<el-input v-model="sysMenu.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="sysMenu.type !== 0" prop="to_code">
|
<el-form-item v-if="sysMenu.type !== 0" prop="to_code">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content="访问的组件路径,如:`system/user/index`,默认在`views`目录下" placement="top">
|
<el-tooltip content="访问的组件路径,如:`system/user/index`,默认在`views`目录下" placement="top">
|
||||||
<i class="el-icon-question"/>
|
<i class="el-icon-question" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
组件路径
|
组件路径
|
||||||
</span>
|
</span>
|
||||||
<el-input v-model="sysMenu.to_code" placeholder="请输入组件路径"/>
|
<el-input v-model="sysMenu.to_code" placeholder="请输入组件路径" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="sysMenu.type === 2">
|
<el-form-item v-if="sysMenu.type === 2">
|
||||||
<el-input v-model="sysMenu.code" placeholder="请输入权限标识" maxlength="100"/>
|
<el-input v-model="sysMenu.code" placeholder="请输入权限标识" maxlength="100" />
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(hasAuthority('bnt.sysRole.list'))"
|
<el-tooltip
|
||||||
placement="top">
|
content="控制器中定义的权限字符,如:@PreAuthorize(hasAuthority('bnt.sysRole.list'))"
|
||||||
<i class="el-icon-question"/>
|
placement="top"
|
||||||
|
>
|
||||||
|
<i class="el-icon-question" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
权限字符
|
权限字符
|
||||||
</span>
|
</span>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
<el-form :inline="true" size="small" label-width="140px">
|
<el-form :inline="true" size="small" label-width="140px">
|
||||||
<el-form-item label="输入搜索:">
|
<el-form-item label="输入搜索:">
|
||||||
<el-input v-model="tempSearchObj.roleName" style="width: 203px" placeholder="角色名称"/>
|
<el-input v-model="tempSearchObj.roleName" style="width: 203px" placeholder="角色名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||||
@ -16,12 +16,17 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
|
|
||||||
<el-button class="btn-add" size="mini" @click="addRole">添加</el-button>
|
<el-button class="btn-add" size="mini" @click="addRole">添加</el-button>
|
||||||
<el-button class="btn-add" size="mini" :disabled="selectedRoles.length === 0" style="margin: 0 10px;"
|
<el-button
|
||||||
@click="removeRoles()">批量删除
|
class="btn-add"
|
||||||
|
size="mini"
|
||||||
|
:disabled="selectedRoles.length === 0"
|
||||||
|
style="margin: 0 10px;"
|
||||||
|
@click="removeRoles()"
|
||||||
|
>批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@ -48,7 +53,7 @@
|
|||||||
<el-table-column label="角色名称" width="500" align="center">
|
<el-table-column label="角色名称" width="500" align="center">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<template v-if="row.edit">
|
<template v-if="row.edit">
|
||||||
<el-input v-model="row.roleName" class="edit-input" size="small"/>
|
<el-input v-model="row.roleName" class="edit-input" size="small" />
|
||||||
<el-button
|
<el-button
|
||||||
class="cancel-btn"
|
class="cancel-btn"
|
||||||
size="small"
|
size="small"
|
||||||
@ -156,7 +161,7 @@ export default {
|
|||||||
更新角色
|
更新角色
|
||||||
*/
|
*/
|
||||||
updateRole(role) {
|
updateRole(role) {
|
||||||
this.$API.role.updateById({id: role.id, roleName: role.roleName})
|
this.$API.role.updateById({ id: role.id, roleName: role.roleName })
|
||||||
.then(result => {
|
.then(result => {
|
||||||
this.$message.success(result.message || '更新角色成功!')
|
this.$message.success(result.message || '更新角色成功!')
|
||||||
this.getRoles(this.page)
|
this.getRoles(this.page)
|
||||||
@ -179,8 +184,8 @@ export default {
|
|||||||
this.$prompt('请输入新名称', '添加角色', {
|
this.$prompt('请输入新名称', '添加角色', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消'
|
cancelButtonText: '取消'
|
||||||
}).then(({value}) => {
|
}).then(({ value }) => {
|
||||||
this.$API.role.save({roleName: value}).then(result => {
|
this.$API.role.save({ roleName: value }).then(result => {
|
||||||
this.$message.success(result.message || '添加角色成功')
|
this.$message.success(result.message || '添加角色成功')
|
||||||
this.getRoles()
|
this.getRoles()
|
||||||
})
|
})
|
||||||
@ -195,10 +200,10 @@ export default {
|
|||||||
getRoles(page = 1) {
|
getRoles(page = 1) {
|
||||||
this.page = page
|
this.page = page
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
const {limit, searchObj} = this
|
const { limit, searchObj } = this
|
||||||
this.$API.role.getPageList(page, limit, searchObj).then(
|
this.$API.role.getPageList(page, limit, searchObj).then(
|
||||||
result => {
|
result => {
|
||||||
const {records, total} = result.data
|
const { records, total } = result.data
|
||||||
this.roles = records.map(item => {
|
this.roles = records.map(item => {
|
||||||
item.edit = false // 用于标识是否显示编辑输入框的属性
|
item.edit = false // 用于标识是否显示编辑输入框的属性
|
||||||
item.originRoleName = item.roleName // 缓存角色名称, 用于取消
|
item.originRoleName = item.roleName // 缓存角色名称, 用于取消
|
||||||
@ -215,7 +220,7 @@ export default {
|
|||||||
根据搜索条件进行搜索
|
根据搜索条件进行搜索
|
||||||
*/
|
*/
|
||||||
search() {
|
search() {
|
||||||
this.searchObj = {...this.tempSearchObj}
|
this.searchObj = { ...this.tempSearchObj }
|
||||||
this.getRoles()
|
this.getRoles()
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -235,10 +240,10 @@ export default {
|
|||||||
/*
|
/*
|
||||||
删除指定的角色
|
删除指定的角色
|
||||||
*/
|
*/
|
||||||
removeRole({id, roleName}) {
|
removeRole({ id, roleName }) {
|
||||||
this.$confirm(`确定删除 '${roleName}' 吗?`, '提示', {
|
this.$confirm(`确定删除 '${roleName}' 吗?`, '提示', {
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(async () => {
|
}).then(async() => {
|
||||||
const result = await this.$API.role.removeById(id)
|
const result = await this.$API.role.removeById(id)
|
||||||
this.getRoles(this.roles.length === 1 ? this.page - 1 : this.page)
|
this.getRoles(this.roles.length === 1 ? this.page - 1 : this.page)
|
||||||
this.$message.success(result.message || '删除成功!')
|
this.$message.success(result.message || '删除成功!')
|
||||||
@ -260,7 +265,7 @@ export default {
|
|||||||
removeRoles() {
|
removeRoles() {
|
||||||
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
|
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(async () => {
|
}).then(async() => {
|
||||||
const ids = this.selectedRoles.map(role => role.id)
|
const ids = this.selectedRoles.map(role => role.id)
|
||||||
const result = await this.$API.role.removeRoles(ids)
|
const result = await this.$API.role.removeRoles(ids)
|
||||||
this.getRoles()
|
this.getRoles()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-input disabled :value="$route.query.roleName"/>
|
<el-input disabled :value="$route.query.roleName" />
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
style="margin: 20px 0"
|
style="margin: 20px 0"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
<el-form :inline="true" size="small" label-width="140px">
|
<el-form :inline="true" size="small" label-width="140px">
|
||||||
<el-form-item label="输入搜索:">
|
<el-form-item label="输入搜索:">
|
||||||
<el-input v-model="tempSearchObj.username" style="width: 203px" placeholder="用户名"/>
|
<el-input v-model="tempSearchObj.username" style="width: 203px" placeholder="用户名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="getUsers()">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="getUsers()">查询</el-button>
|
||||||
@ -16,11 +16,16 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" @click="showAddUser">添 加</el-button>
|
<el-button class="btn-add" size="mini" @click="showAddUser">添 加</el-button>
|
||||||
<el-button class="btn-add" size="mini" :disabled="selectedIds.length===0" style="margin: 0 10px;"
|
<el-button
|
||||||
@click="revomveUsers">批量删除
|
class="btn-add"
|
||||||
|
size="mini"
|
||||||
|
:disabled="selectedIds.length===0"
|
||||||
|
style="margin: 0 10px;"
|
||||||
|
@click="revomveUsers"
|
||||||
|
>批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@ -46,10 +51,10 @@
|
|||||||
align="center"
|
align="center"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-table-column prop="username" label="用户名" width="120"/>
|
<el-table-column prop="username" label="用户名" width="120" />
|
||||||
<el-table-column prop="name" label="用户名称" width="120"/>
|
<el-table-column prop="name" label="用户名称" width="120" />
|
||||||
<el-table-column prop="createTime" label="创建时间" width="180"/>
|
<el-table-column prop="createTime" label="创建时间" width="180" />
|
||||||
<el-table-column prop="updateTime" label="更新时间" width="180"/>
|
<el-table-column prop="updateTime" label="更新时间" width="180" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="220" align="center">
|
<el-table-column label="操作" width="220" align="center">
|
||||||
<!-- <template slot-scope="{row}">-->
|
<!-- <template slot-scope="{row}">-->
|
||||||
@ -84,14 +89,14 @@
|
|||||||
<el-dialog :title="user.id ? '修改用户' : '添加用户'" :visible.sync="dialogUserVisible">
|
<el-dialog :title="user.id ? '修改用户' : '添加用户'" :visible.sync="dialogUserVisible">
|
||||||
<el-form ref="userForm" :model="user" :rules="userRules" label-width="120px">
|
<el-form ref="userForm" :model="user" :rules="userRules" label-width="120px">
|
||||||
<el-form-item label="用户名" prop="username">
|
<el-form-item label="用户名" prop="username">
|
||||||
<el-input v-model="user.username"/>
|
<el-input v-model="user.username" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户名称">
|
<el-form-item label="用户名称">
|
||||||
<el-input v-model="user.name"/>
|
<el-input v-model="user.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="!user.id" label="用户密码" prop="password">
|
<el-form-item v-if="!user.id" label="用户密码" prop="password">
|
||||||
<el-input v-model="user.password"/>
|
<el-input v-model="user.password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -103,13 +108,13 @@
|
|||||||
<el-dialog title="设置角色" :visible.sync="dialogRoleVisible" :before-close="resetRoleData">
|
<el-dialog title="设置角色" :visible.sync="dialogRoleVisible" :before-close="resetRoleData">
|
||||||
<el-form label-width="80px">
|
<el-form label-width="80px">
|
||||||
<el-form-item label="用户名">
|
<el-form-item label="用户名">
|
||||||
<el-input disabled :value="user.username"/>
|
<el-input disabled :value="user.username" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="角色列表">
|
<el-form-item label="角色列表">
|
||||||
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选
|
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
<div style="margin: 15px 0;"/>
|
<div style="margin: 15px 0;" />
|
||||||
<el-checkbox-group v-model="userRoleIds" @change="handleCheckedChange">
|
<el-checkbox-group v-model="userRoleIds" @change="handleCheckedChange">
|
||||||
<el-checkbox v-for="role in allRoles" :key="role.id" :label="role.id">{{ role.roleName }}</el-checkbox>
|
<el-checkbox v-for="role in allRoles" :key="role.id" :label="role.id">{{ role.roleName }}</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
@ -148,11 +153,11 @@ export default {
|
|||||||
dialogUserVisible: false, // 是否显示用户添加/修改的dialog
|
dialogUserVisible: false, // 是否显示用户添加/修改的dialog
|
||||||
userRules: { // 用户添加/修改表单的校验规则
|
userRules: { // 用户添加/修改表单的校验规则
|
||||||
username: [
|
username: [
|
||||||
{required: true, message: '用户名必须输入'},
|
{ required: true, message: '用户名必须输入' },
|
||||||
{min: 4, message: '用户名不能小于4位'}
|
{ min: 4, message: '用户名不能小于4位' }
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{required: true, validator: this.validatePassword}
|
{ required: true, validator: this.validatePassword }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
loading: false, // 是否正在提交请求中
|
loading: false, // 是否正在提交请求中
|
||||||
@ -193,7 +198,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
async getRoles() {
|
async getRoles() {
|
||||||
const result = await this.$API.user.getRoles(this.user.id)
|
const result = await this.$API.user.getRoles(this.user.id)
|
||||||
const {allRolesList, assignRoles} = result.data
|
const { allRolesList, assignRoles } = result.data
|
||||||
this.allRoles = allRolesList
|
this.allRoles = allRolesList
|
||||||
this.userRoleIds = assignRoles.map(item => item.id)
|
this.userRoleIds = assignRoles.map(item => item.id)
|
||||||
this.checkAll = allRolesList.length === assignRoles.length
|
this.checkAll = allRolesList.length === assignRoles.length
|
||||||
@ -204,7 +209,7 @@ export default {
|
|||||||
角色列表选中项发生改变的监听
|
角色列表选中项发生改变的监听
|
||||||
*/
|
*/
|
||||||
handleCheckedChange(value) {
|
handleCheckedChange(value) {
|
||||||
const {userRoleIds, allRoles} = this
|
const { userRoleIds, allRoles } = this
|
||||||
this.checkAll = userRoleIds.length === allRoles.length && allRoles.length > 0
|
this.checkAll = userRoleIds.length === allRoles.length && allRoles.length > 0
|
||||||
this.isIndeterminate = userRoleIds.length > 0 && userRoleIds.length < allRoles.length
|
this.isIndeterminate = userRoleIds.length > 0 && userRoleIds.length < allRoles.length
|
||||||
},
|
},
|
||||||
@ -254,7 +259,7 @@ export default {
|
|||||||
根据输入进行搜索
|
根据输入进行搜索
|
||||||
*/
|
*/
|
||||||
search() {
|
search() {
|
||||||
this.searchObj = {...this.tempSearchObj}
|
this.searchObj = { ...this.tempSearchObj }
|
||||||
this.getUsers()
|
this.getUsers()
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -285,7 +290,7 @@ export default {
|
|||||||
删除所有选中的用户
|
删除所有选中的用户
|
||||||
*/
|
*/
|
||||||
revomveUsers() {
|
revomveUsers() {
|
||||||
this.$confirm('确定删除吗?').then(async () => {
|
this.$confirm('确定删除吗?').then(async() => {
|
||||||
await this.$API.user.removeUsers(this.selectedIds)
|
await this.$API.user.removeUsers(this.selectedIds)
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
this.getUsers()
|
this.getUsers()
|
||||||
@ -323,11 +328,11 @@ export default {
|
|||||||
*/
|
*/
|
||||||
async getUsers(page = 1) {
|
async getUsers(page = 1) {
|
||||||
this.page = page
|
this.page = page
|
||||||
const {limit, tempSearchObj} = this
|
const { limit, tempSearchObj } = this
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
const result = await this.$API.user.getPageList(page, limit, tempSearchObj)
|
const result = await this.$API.user.getPageList(page, limit, tempSearchObj)
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
const {records, total} = result.data
|
const { records, total } = result.data
|
||||||
this.users = records
|
this.users = records
|
||||||
this.total = total - 1
|
this.total = total - 1
|
||||||
this.selectedIds = []
|
this.selectedIds = []
|
||||||
@ -355,7 +360,7 @@ export default {
|
|||||||
addOrUpdate() {
|
addOrUpdate() {
|
||||||
this.$refs.userForm.validate(valid => {
|
this.$refs.userForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const {user} = this
|
const { user } = this
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$API.user[user.id ? 'update' : 'add'](user).then((result) => {
|
this.$API.user[user.id ? 'update' : 'add'](user).then((result) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<el-form label-width="120px">
|
<el-form label-width="120px">
|
||||||
|
|
||||||
<el-form-item label="活动名称">
|
<el-form-item label="活动名称">
|
||||||
<el-input v-model="activityInfo.activityName"/>
|
<el-input v-model="activityInfo.activityName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动类型">
|
<el-form-item label="活动类型">
|
||||||
<el-radio-group v-model="activityInfo.activityType">
|
<el-radio-group v-model="activityInfo.activityType">
|
||||||
@ -27,7 +27,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动描述">
|
<el-form-item label="活动描述">
|
||||||
<el-input v-model="activityInfo.activityDesc" :rows="3" type="textarea"/>
|
<el-input v-model="activityInfo.activityDesc" :rows="3" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -85,7 +85,7 @@ export default {
|
|||||||
this.fetchDataById(id)
|
this.fetchDataById(id)
|
||||||
} else {
|
} else {
|
||||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||||
this.activityInfo = {...defaultForm}
|
this.activityInfo = { ...defaultForm }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/activity/activityInfo/list'})
|
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -119,13 +119,13 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/activity/activityInfo/list'})
|
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({path: '/activity/activityInfo/list'})
|
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 根据id查询记录
|
// 根据id查询记录
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -29,11 +29,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="activityName" label="活动名称"/>
|
<el-table-column prop="activityName" label="活动名称" />
|
||||||
<el-table-column prop="activityTypeString" label="活动类型"/>
|
<el-table-column prop="activityTypeString" label="活动类型" />
|
||||||
<el-table-column prop="startTime" label="开始时间"/>
|
<el-table-column prop="startTime" label="开始时间" />
|
||||||
<el-table-column prop="endTime" label="结束时间"/>
|
<el-table-column prop="endTime" label="结束时间" />
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="150" align="center">
|
<el-table-column label="操作" width="150" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -99,7 +99,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
add() {
|
add() {
|
||||||
this.$router.push({path: '/activity/activityInfo/add'})
|
this.$router.push({ path: '/activity/activityInfo/add' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 加载banner列表数据
|
// 加载banner列表数据
|
||||||
|
@ -4,41 +4,41 @@
|
|||||||
<h4>活动信息</h4>
|
<h4>活动信息</h4>
|
||||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="15%">活动标题</th>
|
<th width="15%">活动标题</th>
|
||||||
<td width="35%"><b style="font-size: 14px">{{ activityInfo.activityName }}</b></td>
|
<td width="35%"><b style="font-size: 14px">{{ activityInfo.activityName }}</b></td>
|
||||||
<th width="15%">活动时间</th>
|
<th width="15%">活动时间</th>
|
||||||
<td width="35%">{{ activityInfo.startTime }}至{{ activityInfo.endTime }}</td>
|
<td width="35%">{{ activityInfo.startTime }}至{{ activityInfo.endTime }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>活动类型</th>
|
<th>活动类型</th>
|
||||||
<td>{{ activityInfo.activityTypeString }}</td>
|
<td>{{ activityInfo.activityTypeString }}</td>
|
||||||
<th>创建时间</th>
|
<th>创建时间</th>
|
||||||
<td>{{ activityInfo.createTime }}</td>
|
<td>{{ activityInfo.createTime }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>活动描述</th>
|
<th>活动描述</th>
|
||||||
<td colspan="3">{{ activityInfo.activityDesc }}</td>
|
<td colspan="3">{{ activityInfo.activityDesc }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<el-dialog title="添加规则" :visible.sync="dialogRuleVisible" width="490px">
|
<el-dialog title="添加规则" :visible.sync="dialogRuleVisible" width="490px">
|
||||||
<el-form label-width="120px">
|
<el-form label-width="120px">
|
||||||
<el-form-item v-if="activityInfo.activityType == 'FULL_REDUCTION'" label="满减金额">
|
<el-form-item v-if="activityInfo.activityType == 'FULL_REDUCTION'" label="满减金额">
|
||||||
<el-input v-model="activityRule.conditionAmount"/>
|
<el-input v-model="activityRule.conditionAmount" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="activityInfo.activityType == 'FULL_REDUCTION'" label="优惠金额">
|
<el-form-item v-if="activityInfo.activityType == 'FULL_REDUCTION'" label="优惠金额">
|
||||||
<el-input v-model="activityRule.benefitAmount"/>
|
<el-input v-model="activityRule.benefitAmount" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="activityInfo.activityType == 'FULL_DISCOUNT'" label="满减件数">
|
<el-form-item v-if="activityInfo.activityType == 'FULL_DISCOUNT'" label="满减件数">
|
||||||
<el-input v-model="activityRule.conditionNum"/>
|
<el-input v-model="activityRule.conditionNum" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="activityInfo.activityType == 'FULL_DISCOUNT'" label="优惠折扣">
|
<el-form-item v-if="activityInfo.activityType == 'FULL_DISCOUNT'" label="优惠折扣">
|
||||||
<el-input v-model="activityRule.benefitDiscount"/>
|
<el-input v-model="activityRule.benefitDiscount" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -75,11 +75,11 @@
|
|||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column v-if="activityInfo.activityType == 'FULL_REDUCTION'" prop="conditionAmount" label="满减金额"/>
|
<el-table-column v-if="activityInfo.activityType == 'FULL_REDUCTION'" prop="conditionAmount" label="满减金额" />
|
||||||
<el-table-column v-if="activityInfo.activityType == 'FULL_REDUCTION'" prop="benefitAmount" label="优惠金额"/>
|
<el-table-column v-if="activityInfo.activityType == 'FULL_REDUCTION'" prop="benefitAmount" label="优惠金额" />
|
||||||
|
|
||||||
<el-table-column v-if="activityInfo.activityType == 'FULL_DISCOUNT'" prop="conditionNum" label="满减量数"/>
|
<el-table-column v-if="activityInfo.activityType == 'FULL_DISCOUNT'" prop="conditionNum" label="满减量数" />
|
||||||
<el-table-column v-if="activityInfo.activityType == 'FULL_DISCOUNT'" prop="benefitDiscount" label="优惠折扣"/>
|
<el-table-column v-if="activityInfo.activityType == 'FULL_DISCOUNT'" prop="benefitDiscount" label="优惠折扣" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -132,7 +132,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="id" label="SKU ID" width="100"/>
|
<el-table-column prop="id" label="SKU ID" width="100" />
|
||||||
<el-table-column label="图片" width="320" align="center">
|
<el-table-column label="图片" width="320" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
@ -142,8 +142,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="skuName" label="名称"/>
|
<el-table-column prop="skuName" label="名称" />
|
||||||
<el-table-column prop="price" label="价格" width="70"/>
|
<el-table-column prop="price" label="价格" width="70" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -241,13 +241,13 @@ export default {
|
|||||||
|
|
||||||
save() {
|
save() {
|
||||||
const skuList = []
|
const skuList = []
|
||||||
this.skuInfoList.forEach(function (item) {
|
this.skuInfoList.forEach(function(item) {
|
||||||
skuList.push({
|
skuList.push({
|
||||||
skuId: item.id
|
skuId: item.id
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const couponIdList = []
|
const couponIdList = []
|
||||||
this.couponInfoList.forEach(function (item) {
|
this.couponInfoList.forEach(function(item) {
|
||||||
couponIdList.push(item.id)
|
couponIdList.push(item.id)
|
||||||
})
|
})
|
||||||
const ruleData = {
|
const ruleData = {
|
||||||
@ -259,7 +259,7 @@ export default {
|
|||||||
debugger
|
debugger
|
||||||
api.saveActivityRule(ruleData).then(response => {
|
api.saveActivityRule(ruleData).then(response => {
|
||||||
this.$message.success(response.message)
|
this.$message.success(response.message)
|
||||||
this.$router.push({path: '/activity/activityInfo/list'})
|
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({path: '/activity/activityInfo/list'})
|
this.$router.push({ path: '/activity/activityInfo/list' })
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchRuleDataById(id) {
|
fetchRuleDataById(id) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<el-form label-width="120px">
|
<el-form label-width="120px">
|
||||||
|
|
||||||
<el-form-item label="优惠券名称">
|
<el-form-item label="优惠券名称">
|
||||||
<el-input v-model="couponInfo.couponName"/>
|
<el-input v-model="couponInfo.couponName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="优惠券类型">
|
<el-form-item label="优惠券类型">
|
||||||
<el-radio-group v-model="couponInfo.couponType">
|
<el-radio-group v-model="couponInfo.couponType">
|
||||||
@ -13,7 +13,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="发行数量">
|
<el-form-item label="发行数量">
|
||||||
<el-input v-model="couponInfo.publishCount"/>
|
<el-input v-model="couponInfo.publishCount" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="领取时间">
|
<el-form-item label="领取时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@ -106,7 +106,7 @@ export default {
|
|||||||
this.fetchDataById(id)
|
this.fetchDataById(id)
|
||||||
} else {
|
} else {
|
||||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||||
this.couponInfo = {...defaultForm}
|
this.couponInfo = { ...defaultForm }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/activity/couponInfo/list'})
|
this.$router.push({ path: '/activity/couponInfo/list' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -142,13 +142,13 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/activity/couponInfo/list'})
|
this.$router.push({ path: '/activity/couponInfo/list' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({path: '/activity/couponInfo/list'})
|
this.$router.push({ path: '/activity/couponInfo/list' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 根据id查询记录
|
// 根据id查询记录
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -28,8 +28,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="couponName" label="购物券名称"/>
|
<el-table-column prop="couponName" label="购物券名称" />
|
||||||
<el-table-column prop="couponTypeString" label="购物券类型"/>
|
<el-table-column prop="couponTypeString" label="购物券类型" />
|
||||||
<el-table-column label="规则">
|
<el-table-column label="规则">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{
|
{{
|
||||||
@ -37,10 +37,10 @@
|
|||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="rangeTypeString" label="范围类型 "/>
|
<el-table-column prop="rangeTypeString" label="范围类型 " />
|
||||||
<el-table-column prop="publishCount" label="发行数量"/>
|
<el-table-column prop="publishCount" label="发行数量" />
|
||||||
<el-table-column prop="expireTime" label="过期时间"/>
|
<el-table-column prop="expireTime" label="过期时间" />
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
<el-table-column label="操作" width="150" align="center">
|
<el-table-column label="操作" width="150" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<router-link :to="'/activity/couponInfo/edit/'+scope.row.id">
|
<router-link :to="'/activity/couponInfo/edit/'+scope.row.id">
|
||||||
@ -105,7 +105,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
add() {
|
add() {
|
||||||
this.$router.push({path: '/activity/couponInfo/add'})
|
this.$router.push({ path: '/activity/couponInfo/add' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 加载banner列表数据
|
// 加载banner列表数据
|
||||||
|
@ -4,41 +4,41 @@
|
|||||||
<h4>优惠券信息</h4>
|
<h4>优惠券信息</h4>
|
||||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="15%">优惠券名称</th>
|
<th width="15%">优惠券名称</th>
|
||||||
<td width="35%"><b style="font-size: 14px">{{ couponInfo.couponName }}</b></td>
|
<td width="35%"><b style="font-size: 14px">{{ couponInfo.couponName }}</b></td>
|
||||||
<th width="15%">优惠券类型</th>
|
<th width="15%">优惠券类型</th>
|
||||||
<td width="35%">
|
<td width="35%">
|
||||||
{{ couponInfo.couponTypeString }}
|
{{ couponInfo.couponTypeString }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>发行数量</th>
|
<th>发行数量</th>
|
||||||
<td>{{ couponInfo.publishCount }}</td>
|
<td>{{ couponInfo.publishCount }}</td>
|
||||||
<th>每人限领次数</th>
|
<th>每人限领次数</th>
|
||||||
<td>{{ couponInfo.perLimit }}</td>
|
<td>{{ couponInfo.perLimit }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>领取时间</th>
|
<th>领取时间</th>
|
||||||
<td>{{ couponInfo.startTime }}至{{ couponInfo.endTime }}</td>
|
<td>{{ couponInfo.startTime }}至{{ couponInfo.endTime }}</td>
|
||||||
<th>过期时间</th>
|
<th>过期时间</th>
|
||||||
<td>{{ couponInfo.expireTime }}</td>
|
<td>{{ couponInfo.expireTime }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h4>添加规则</h4>
|
<h4>添加规则</h4>
|
||||||
<el-form label-width="140px" style="background: #f9f9f9;padding-top: 15px; padding-bottom: 1px;">
|
<el-form label-width="140px" style="background: #f9f9f9;padding-top: 15px; padding-bottom: 1px;">
|
||||||
<el-form-item v-if="couponInfo.couponType == 'CASH'" label="现金券金额(元)" style="width: 50%;">
|
<el-form-item v-if="couponInfo.couponType == 'CASH'" label="现金券金额(元)" style="width: 50%;">
|
||||||
<el-input v-model="couponInfo.amount"/>
|
<el-input v-model="couponInfo.amount" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="couponInfo.couponType == 'FULL_REDUCTION'" label="满减金额(元)" style="width: 50%;">
|
<el-form-item v-if="couponInfo.couponType == 'FULL_REDUCTION'" label="满减金额(元)" style="width: 50%;">
|
||||||
<el-input v-model="couponInfo.conditionAmount"/>
|
<el-input v-model="couponInfo.conditionAmount" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="couponInfo.couponType == 'FULL_REDUCTION'" label="优惠金额(元)" style="width: 50%;">
|
<el-form-item v-if="couponInfo.couponType == 'FULL_REDUCTION'" label="优惠金额(元)" style="width: 50%;">
|
||||||
<el-input v-model="couponInfo.amount"/>
|
<el-input v-model="couponInfo.amount" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -98,9 +98,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="id" label="sku ID" width="100"/>
|
<el-table-column prop="id" label="sku ID" width="100" />
|
||||||
<el-table-column prop="skuName" label="sku名称" width="120"/>
|
<el-table-column prop="skuName" label="sku名称" width="120" />
|
||||||
<el-table-column prop="skuCode" label="sku编号"/>
|
<el-table-column prop="skuCode" label="sku编号" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -151,8 +151,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="id" label="分类ID" width="100"/>
|
<el-table-column prop="id" label="分类ID" width="100" />
|
||||||
<el-table-column prop="name" label="名称"/>
|
<el-table-column prop="name" label="名称" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -244,7 +244,7 @@ export default {
|
|||||||
let rangeDesc = '可购买'
|
let rangeDesc = '可购买'
|
||||||
const couponRangeList = []
|
const couponRangeList = []
|
||||||
if (this.couponInfo.rangeType === 'SKU') {
|
if (this.couponInfo.rangeType === 'SKU') {
|
||||||
this.skuInfoList.forEach(function (item) {
|
this.skuInfoList.forEach(function(item) {
|
||||||
rangeDesc += ':'
|
rangeDesc += ':'
|
||||||
couponRangeList.push({
|
couponRangeList.push({
|
||||||
rangeType: 'SKU',
|
rangeType: 'SKU',
|
||||||
@ -255,7 +255,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.couponInfo.rangeType === 'CATEGORY') {
|
if (this.couponInfo.rangeType === 'CATEGORY') {
|
||||||
rangeDesc += '分类:'
|
rangeDesc += '分类:'
|
||||||
this.categoryList.forEach(function (item) {
|
this.categoryList.forEach(function(item) {
|
||||||
couponRangeList.push({
|
couponRangeList.push({
|
||||||
rangeType: 'CATEGORY',
|
rangeType: 'CATEGORY',
|
||||||
rangeId: item.id
|
rangeId: item.id
|
||||||
@ -282,7 +282,7 @@ export default {
|
|||||||
|
|
||||||
api.saveCouponRule(ruleData).then(response => {
|
api.saveCouponRule(ruleData).then(response => {
|
||||||
this.$message.success(response.message)
|
this.$message.success(response.message)
|
||||||
this.$router.push({path: '/activity/couponInfo/list'})
|
this.$router.push({ path: '/activity/couponInfo/list' })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" :disabled="$hasBP('btn.all') === false" @click="add()">添加</el-button>
|
<el-button class="btn-add" size="mini" :disabled="$hasBP('btn.all') === false" @click="add()">添加</el-button>
|
||||||
<el-button size="mini" class="btn-add" style="margin: 0 10px;" @click="addTimeList()">秒杀时间段列表</el-button>
|
<el-button size="mini" class="btn-add" style="margin: 0 10px;" @click="addTimeList()">秒杀时间段列表</el-button>
|
||||||
@ -28,9 +28,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="title" label="活动标题"/>
|
<el-table-column prop="title" label="活动标题" />
|
||||||
<el-table-column prop="startTime" label="开始日期"/>
|
<el-table-column prop="startTime" label="开始日期" />
|
||||||
<el-table-column prop="endTime" label="结束日期"/>
|
<el-table-column prop="endTime" label="结束日期" />
|
||||||
<el-table-column label="上线/下线" width="200" align="center">
|
<el-table-column label="上线/下线" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
@ -41,15 +41,19 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" @click="selectTime(scope.row)">设置商品</el-button>
|
<el-button size="mini" type="text" @click="selectTime(scope.row)">设置商品</el-button>
|
||||||
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false" @click="edit(scope.row.id)">编辑
|
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false" @click="edit(scope.row.id)">编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false"
|
<el-button
|
||||||
@click="removeDataById(scope.row.id)">删除
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
:disabled="$hasBP('btn.all') === false"
|
||||||
|
@click="removeDataById(scope.row.id)"
|
||||||
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -70,7 +74,7 @@
|
|||||||
<el-dialog title="添加活动" :visible.sync="dialogVisible" width="40%">
|
<el-dialog title="添加活动" :visible.sync="dialogVisible" width="40%">
|
||||||
<el-form ref="flashPromotionForm" label-width="150px" size="small">
|
<el-form ref="flashPromotionForm" label-width="150px" size="small">
|
||||||
<el-form-item label="活动标题:">
|
<el-form-item label="活动标题:">
|
||||||
<el-input v-model="seckill.title" style="width: 250px"/>
|
<el-input v-model="seckill.title" style="width: 250px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="开始时间:">
|
<el-form-item label="开始时间:">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@ -153,11 +157,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
addTimeList() {
|
addTimeList() {
|
||||||
this.$router.push({path: '/activity/seckill/timeList'})
|
this.$router.push({ path: '/activity/seckill/timeList' })
|
||||||
},
|
},
|
||||||
|
|
||||||
selectTime(row) {
|
selectTime(row) {
|
||||||
this.$router.push({path: '/activity/seckill/selectTimeList', query: {seckillId: row.id}})
|
this.$router.push({ path: '/activity/seckill/selectTimeList', query: { seckillId: row.id }})
|
||||||
},
|
},
|
||||||
|
|
||||||
add() {
|
add() {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button size="mini" class="btn-add" :disabled="$hasBP('btn.all') === false" @click="addSku()">添加</el-button>
|
<el-button size="mini" class="btn-add" :disabled="$hasBP('btn.all') === false" @click="addSku()">添加</el-button>
|
||||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="$router.back()">返回</el-button>
|
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="$router.back()">返回</el-button>
|
||||||
@ -28,15 +28,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="skuInfo.skuName" label="商品名称"/>
|
<el-table-column prop="skuInfo.skuName" label="商品名称" />
|
||||||
<el-table-column prop="skuInfo.skuCode" label="商品编号"/>
|
<el-table-column prop="skuInfo.skuCode" label="商品编号" />
|
||||||
<el-table-column prop="skuInfo.price" label="商品价格"/>
|
<el-table-column prop="skuInfo.price" label="商品价格" />
|
||||||
<el-table-column prop="skuInfo.stock" label="剩余数量"/>
|
<el-table-column prop="skuInfo.stock" label="剩余数量" />
|
||||||
<el-table-column prop="seckillPrice" label="秒杀价格"/>
|
<el-table-column prop="seckillPrice" label="秒杀价格" />
|
||||||
<el-table-column prop="seckillStock" label="秒杀数量"/>
|
<el-table-column prop="seckillStock" label="秒杀数量" />
|
||||||
<el-table-column prop="seckillLimit" label="每人限购数量"/>
|
<el-table-column prop="seckillLimit" label="每人限购数量" />
|
||||||
<el-table-column prop="seckillSort" label="排序"/>
|
<el-table-column prop="seckillSort" label="排序" />
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -65,7 +65,7 @@
|
|||||||
<!-- <el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button>-->
|
<!-- <el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button>-->
|
||||||
<!-- </el-input>-->
|
<!-- </el-input>-->
|
||||||
<el-table :data="dialogData.list" border @selection-change="handleDialogSelectionChange">
|
<el-table :data="dialogData.list" border @selection-change="handleDialogSelectionChange">
|
||||||
<el-table-column type="selection" width="60" align="center"/>
|
<el-table-column type="selection" width="60" align="center" />
|
||||||
<el-table-column label="商品名称" align="center">
|
<el-table-column label="商品名称" align="center">
|
||||||
<template slot-scope="scope">{{ scope.row.skuName }}</template>
|
<template slot-scope="scope">{{ scope.row.skuName }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -88,7 +88,7 @@
|
|||||||
@current-change="handleDialogCurrentChange"
|
@current-change="handleDialogCurrentChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style="clear: both;"/>
|
<div style="clear: both;" />
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<el-button size="small" @click="selectDialogVisible = false">取 消</el-button>
|
<el-button size="small" @click="selectDialogVisible = false">取 消</el-button>
|
||||||
<el-button size="small" type="primary" @click="handleSelectDialogConfirm()">确 定</el-button>
|
<el-button size="small" type="primary" @click="handleSelectDialogConfirm()">确 定</el-button>
|
||||||
@ -115,13 +115,13 @@
|
|||||||
<span>{{ seckillSku.skuInfo.stock }}</span>
|
<span>{{ seckillSku.skuInfo.stock }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="秒杀数量:">
|
<el-form-item label="秒杀数量:">
|
||||||
<el-input v-model="seckillSku.seckillStock" class="input-width"/>
|
<el-input v-model="seckillSku.seckillStock" class="input-width" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="限购数量:">
|
<el-form-item label="限购数量:">
|
||||||
<el-input v-model="seckillSku.seckillLimit" class="input-width"/>
|
<el-input v-model="seckillSku.seckillLimit" class="input-width" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序:">
|
<el-form-item label="排序:">
|
||||||
<el-input v-model="seckillSku.seckillSort" class="input-width"/>
|
<el-input v-model="seckillSku.seckillSort" class="input-width" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" @click="$router.back()">返回</el-button>
|
<el-button class="btn-add" size="mini" @click="$router.back()">返回</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -27,9 +27,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="name" label="场次名称"/>
|
<el-table-column prop="name" label="场次名称" />
|
||||||
<el-table-column prop="startTime" label="每日开始时间"/>
|
<el-table-column prop="startTime" label="每日开始时间" />
|
||||||
<el-table-column prop="endTime" label="每日结束时间"/>
|
<el-table-column prop="endTime" label="每日结束时间" />
|
||||||
<el-table-column label="启用状态" width="200" align="center">
|
<el-table-column label="启用状态" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
@ -40,7 +40,7 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" :disabled="$hasBP('btn.all') === false" @click="add()">添加</el-button>
|
<el-button class="btn-add" size="mini" :disabled="$hasBP('btn.all') === false" @click="add()">添加</el-button>
|
||||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="$router.back()">返回</el-button>
|
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="$router.back()">返回</el-button>
|
||||||
@ -28,9 +28,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="name" label="场次名称"/>
|
<el-table-column prop="name" label="场次名称" />
|
||||||
<el-table-column prop="startTime" label="每日开始时间"/>
|
<el-table-column prop="startTime" label="每日开始时间" />
|
||||||
<el-table-column prop="endTime" label="每日结束时间"/>
|
<el-table-column prop="endTime" label="每日结束时间" />
|
||||||
<el-table-column label="启用状态" width="200" align="center">
|
<el-table-column label="启用状态" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
@ -41,14 +41,18 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false" @click="edit(scope.row.id)">编辑
|
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false" @click="edit(scope.row.id)">编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" :disabled="$hasBP('btn.all') === false"
|
<el-button
|
||||||
@click="removeDataById(scope.row.id)">删除
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
:disabled="$hasBP('btn.all') === false"
|
||||||
|
@click="removeDataById(scope.row.id)"
|
||||||
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -57,7 +61,7 @@
|
|||||||
<el-dialog title="添加活动" :visible.sync="dialogVisible" width="40%">
|
<el-dialog title="添加活动" :visible.sync="dialogVisible" width="40%">
|
||||||
<el-form ref="flashPromotionForm" label-width="150px" size="small">
|
<el-form ref="flashPromotionForm" label-width="150px" size="small">
|
||||||
<el-form-item label="秒杀时间段名称:">
|
<el-form-item label="秒杀时间段名称:">
|
||||||
<el-input v-model="seckillTime.name" style="width: 250px"/>
|
<el-input v-model="seckillTime.name" style="width: 250px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="每日开始时间:">
|
<el-form-item label="每日开始时间:">
|
||||||
<el-time-picker
|
<el-time-picker
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters} from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Dashboard',
|
name: 'Dashboard',
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on"
|
<el-form
|
||||||
label-position="left">
|
ref="loginForm"
|
||||||
|
:model="loginForm"
|
||||||
|
:rules="loginRules"
|
||||||
|
class="login-form"
|
||||||
|
auto-complete="on"
|
||||||
|
label-position="left"
|
||||||
|
>
|
||||||
|
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<h3 class="title">尚上优选平台管理端</h3>
|
<h3 class="title">尚上优选平台管理端</h3>
|
||||||
@ -9,7 +15,7 @@
|
|||||||
|
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<span class="svg-container">
|
<span class="svg-container">
|
||||||
<svg-icon icon-class="user"/>
|
<svg-icon icon-class="user" />
|
||||||
</span>
|
</span>
|
||||||
<el-input
|
<el-input
|
||||||
ref="username"
|
ref="username"
|
||||||
@ -24,7 +30,7 @@
|
|||||||
|
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<span class="svg-container">
|
<span class="svg-container">
|
||||||
<svg-icon icon-class="password"/>
|
<svg-icon icon-class="password" />
|
||||||
</span>
|
</span>
|
||||||
<el-input
|
<el-input
|
||||||
:key="passwordType"
|
:key="passwordType"
|
||||||
@ -38,12 +44,16 @@
|
|||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
/>
|
/>
|
||||||
<span class="show-pwd" @click="showPwd">
|
<span class="show-pwd" @click="showPwd">
|
||||||
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"/>
|
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;"
|
<el-button
|
||||||
@click.native.prevent="handleLogin">Login
|
:loading="loading"
|
||||||
|
type="primary"
|
||||||
|
style="width:100%;margin-bottom:30px;"
|
||||||
|
@click.native.prevent="handleLogin"
|
||||||
|
>Login
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
@ -56,7 +66,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {validUsername} from '@/utils/validate'
|
import { validUsername } from '@/utils/validate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
@ -81,8 +91,8 @@ export default {
|
|||||||
password: '111111'
|
password: '111111'
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [{required: true, trigger: 'blur', validator: validateUsername}],
|
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
||||||
password: [{required: true, trigger: 'blur', validator: validatePassword}]
|
password: [{ required: true, trigger: 'blur', validator: validatePassword }]
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
passwordType: 'password',
|
passwordType: 'password',
|
||||||
@ -91,7 +101,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler: function (route) {
|
handler: function(route) {
|
||||||
this.redirect = route.query && route.query.redirect
|
this.redirect = route.query && route.query.redirect
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
@ -113,7 +123,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$store.dispatch('user/login', this.loginForm).then(() => {
|
this.$store.dispatch('user/login', this.loginForm).then(() => {
|
||||||
this.$router.push({path: this.redirect || '/'})
|
this.$router.push({ path: this.redirect || '/' })
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;">打印</el-button>
|
<el-button class="btn-add" size="mini" style="margin: 0 10px;">打印</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -52,14 +52,14 @@
|
|||||||
align="center"
|
align="center"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-table-column prop="leaderName" label="团长" width="90"/>
|
<el-table-column prop="leaderName" label="团长" width="90" />
|
||||||
<el-table-column prop="leaderPhone" label="团长电话" width="100"/>
|
<el-table-column prop="leaderPhone" label="团长电话" width="100" />
|
||||||
<el-table-column prop="takeName" label="提货点" width="130"/>
|
<el-table-column prop="takeName" label="提货点" width="130" />
|
||||||
<el-table-column prop="skuNum" label="商品数量" width="80"/>
|
<el-table-column prop="skuNum" label="商品数量" width="80" />
|
||||||
<el-table-column prop="driverName" label="司机" width="90"/>
|
<el-table-column prop="driverName" label="司机" width="90" />
|
||||||
<el-table-column prop="driverPhone" label="司机电话" width="100"/>
|
<el-table-column prop="driverPhone" label="司机电话" width="100" />
|
||||||
<el-table-column prop="deliverDate" label="配送日期" width="100"/>
|
<el-table-column prop="deliverDate" label="配送日期" width="100" />
|
||||||
<el-table-column prop="createTime" label="配送时间"/>
|
<el-table-column prop="createTime" label="配送时间" />
|
||||||
<el-table-column label="状态" width="100">
|
<el-table-column label="状态" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<p>{{ scope.row.deliverStatus == 0 ? '未发货' : scope.row.deliverStatus == 1 ? '已发货' : '已收货' }}</p>
|
<p>{{ scope.row.deliverStatus == 0 ? '未发货' : scope.row.deliverStatus == 1 ? '已发货' : '已收货' }}</p>
|
||||||
@ -92,8 +92,8 @@
|
|||||||
align="center"
|
align="center"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-table-column prop="skuName" label="商品"/>
|
<el-table-column prop="skuName" label="商品" />
|
||||||
<el-table-column prop="skuNum" label="商品数量" width="130"/>
|
<el-table-column prop="skuNum" label="商品数量" width="130" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button size="small" @click="receiveDialogVisible = false">取 消</el-button>
|
<el-button size="small" @click="receiveDialogVisible = false">取 消</el-button>
|
||||||
|
@ -4,17 +4,17 @@
|
|||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<el-form inline>
|
<el-form inline>
|
||||||
<el-form-item label="订单号">
|
<el-form-item label="订单号">
|
||||||
<el-input v-model="searchObj.outTradeNo" type="text" width="100" placeholder="订单号" clearable/>
|
<el-input v-model="searchObj.outTradeNo" type="text" width="100" placeholder="订单号" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="订单状态">
|
<el-form-item label="订单状态">
|
||||||
<el-select v-model="searchObj.orderStatus" clearable placeholder="订单状态">
|
<el-select v-model="searchObj.orderStatus" clearable placeholder="订单状态">
|
||||||
<el-option value="UNPAID" label="未支付"/>
|
<el-option value="UNPAID" label="未支付" />
|
||||||
<el-option value="WAITING_DELEVER" label="已支付,待发货"/>
|
<el-option value="WAITING_DELEVER" label="已支付,待发货" />
|
||||||
<el-option value="DELEVERED" label="已发货"/>
|
<el-option value="DELEVERED" label="已发货" />
|
||||||
<el-option value="WAITING_SIGN" label="待签收"/>
|
<el-option value="WAITING_SIGN" label="待签收" />
|
||||||
<el-option value="FINISHED" label="已完结"/>
|
<el-option value="FINISHED" label="已完结" />
|
||||||
<el-option value="CANCEL" label="已取消"/>
|
<el-option value="CANCEL" label="已取消" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -41,7 +41,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="收货人">
|
<el-form-item label="收货人">
|
||||||
<el-input v-model="searchObj.receiver" type="text" width="100" placeholder="收货人姓名/手机" clearable/>
|
<el-input v-model="searchObj.receiver" type="text" width="100" placeholder="收货人姓名/手机" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||||
@ -75,7 +75,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="orderNo" label="订单号" width="130"/>
|
<el-table-column prop="orderNo" label="订单号" width="130" />
|
||||||
<el-table-column label="订单金额" width="140px">
|
<el-table-column label="订单金额" width="140px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<p>总额:¥{{ scope.row.totalAmount }}</p>
|
<p>总额:¥{{ scope.row.totalAmount }}</p>
|
||||||
@ -101,7 +101,7 @@
|
|||||||
<p>支付:{{ scope.row.paymentTime }}</p>
|
<p>支付:{{ scope.row.paymentTime }}</p>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="param.orderStatusName" label="订单状态" width="100"/>
|
<el-table-column prop="param.orderStatusName" label="订单状态" width="100" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="130" align="center">
|
<el-table-column label="操作" width="130" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -3,46 +3,46 @@
|
|||||||
<h4>订单信息</h4>
|
<h4>订单信息</h4>
|
||||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="15%">订单单号</th>
|
<th width="15%">订单单号</th>
|
||||||
<td width="35%"><b style="font-size: 14px">{{ orderInfo.orderNo }}</b></td>
|
<td width="35%"><b style="font-size: 14px">{{ orderInfo.orderNo }}</b></td>
|
||||||
<th width="15%">下单时间</th>
|
<th width="15%">下单时间</th>
|
||||||
<td width="35%">{{ orderInfo.createTime }}</td>
|
<td width="35%">{{ orderInfo.createTime }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>支付时间</th>
|
<th>支付时间</th>
|
||||||
<td>{{ orderInfo.paymentTime }}</td>
|
<td>{{ orderInfo.paymentTime }}</td>
|
||||||
<th>支付方式</th>
|
<th>支付方式</th>
|
||||||
<td>微信</td>
|
<td>微信</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>订单状态</th>
|
<th>订单状态</th>
|
||||||
<td>{{ orderInfo.param.orderStatusName }}</td>
|
<td>{{ orderInfo.param.orderStatusName }}</td>
|
||||||
<th/>
|
<th />
|
||||||
<td/>
|
<td />
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h4>收货人信息</h4>
|
<h4>收货人信息</h4>
|
||||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="15%">姓名</th>
|
<th width="15%">姓名</th>
|
||||||
<td width="35%">{{ orderInfo.receiverName }}</td>
|
<td width="35%">{{ orderInfo.receiverName }}</td>
|
||||||
<th width="15%">电话</th>
|
<th width="15%">电话</th>
|
||||||
<td width="35%">{{ orderInfo.receiverPhone }}</td>
|
<td width="35%">{{ orderInfo.receiverPhone }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>团长名称</th>
|
<th>团长名称</th>
|
||||||
<td>{{ orderInfo.leaderName }}</td>
|
<td>{{ orderInfo.leaderName }}</td>
|
||||||
<th>提货点</th>
|
<th>提货点</th>
|
||||||
<td>{{ orderInfo.takeName }}</td>
|
<td>{{ orderInfo.takeName }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>收货地址</th>
|
<th>收货地址</th>
|
||||||
<td colspan="3">{{ orderInfo.receiverAddress }}</td>
|
<td colspan="3">{{ orderInfo.receiverAddress }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -71,26 +71,26 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="skuName" label="商品名称"/>
|
<el-table-column prop="skuName" label="商品名称" />
|
||||||
<el-table-column prop="skuPrice" label="价格" width="150"/>
|
<el-table-column prop="skuPrice" label="价格" width="150" />
|
||||||
<el-table-column prop="skuNum" label="数量" width="100"/>
|
<el-table-column prop="skuNum" label="数量" width="100" />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<h4>支付信息</h4>
|
<h4>支付信息</h4>
|
||||||
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
<table class="table table-striped table-condenseda table-bordered" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="15%">商品总金额</th>
|
<th width="15%">商品总金额</th>
|
||||||
<td width="35%">{{ orderInfo.originalTotalAmount }}</td>
|
<td width="35%">{{ orderInfo.originalTotalAmount }}</td>
|
||||||
<th width="15%">返现</th>
|
<th width="15%">返现</th>
|
||||||
<td width="35%">{{ orderInfo.activityAmount }}</td>
|
<td width="35%">{{ orderInfo.activityAmount }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>使用优惠券</th>
|
<th>使用优惠券</th>
|
||||||
<td>{{ orderInfo.couponAmount }}</td>
|
<td>{{ orderInfo.couponAmount }}</td>
|
||||||
<th>实际支付</th>
|
<th>实际支付</th>
|
||||||
<td>{{ orderInfo.totalAmount }}</td>
|
<td>{{ orderInfo.totalAmount }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<el-form label-width="120px">
|
<el-form label-width="120px">
|
||||||
|
|
||||||
<el-form-item label="属性名称">
|
<el-form-item label="属性名称">
|
||||||
<el-input v-model="attr.name"/>
|
<el-input v-model="attr.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="属性录入方式:">
|
<el-form-item label="属性录入方式:">
|
||||||
<el-radio-group v-model="attr.inputType">
|
<el-radio-group v-model="attr.inputType">
|
||||||
@ -12,7 +12,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="属性值可选值:">
|
<el-form-item label="属性值可选值:">
|
||||||
<el-input v-model="attr.selectList" :autosize="true" type="textarea"/>
|
<el-input v-model="attr.selectList" :autosize="true" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -69,7 +69,7 @@ export default {
|
|||||||
this.fetchDataById(id)
|
this.fetchDataById(id)
|
||||||
} else {
|
} else {
|
||||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||||
this.attr = {...defaultForm}
|
this.attr = { ...defaultForm }
|
||||||
this.attr.attrGroupId = this.$route.query.attrGroupId
|
this.attr.attrGroupId = this.$route.query.attrGroupId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -92,7 +92,7 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/product/attr/list/' + this.attr.attrGroupId})
|
this.$router.push({ path: '/product/attr/list/' + this.attr.attrGroupId })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -106,13 +106,13 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/product/attr/list/' + this.attr.attrGroupId})
|
this.$router.push({ path: '/product/attr/list/' + this.attr.attrGroupId })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({path: '/product/attr/list/' + this.attr.attrGroupId})
|
this.$router.push({ path: '/product/attr/list/' + this.attr.attrGroupId })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 根据id查询记录
|
// 根据id查询记录
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
||||||
@ -35,15 +35,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="name" label="属性名"/>
|
<el-table-column prop="name" label="属性名" />
|
||||||
<el-table-column prop="inputType" label="属性录入方式">
|
<el-table-column prop="inputType" label="属性录入方式">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.inputType === 0 ? '手动录入' : '选择' }}
|
{{ scope.row.inputType === 0 ? '手动录入' : '选择' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="selectList" label="可选值列表"/>
|
<el-table-column prop="selectList" label="可选值列表" />
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
<el-table-column prop="updateTime" label="更新时间"/>
|
<el-table-column prop="updateTime" label="更新时间" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -84,7 +84,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
add() {
|
add() {
|
||||||
this.$router.push({path: '/product/attr/add', query: {attrGroupId: this.attrGroupId}})
|
this.$router.push({ path: '/product/attr/add', query: { attrGroupId: this.attrGroupId }})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 加载banner列表数据
|
// 加载banner列表数据
|
||||||
@ -179,7 +179,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({path: '/product/attrGroup/list'})
|
this.$router.push({ path: '/product/attrGroup/list' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
<el-form label-width="120px">
|
<el-form label-width="120px">
|
||||||
|
|
||||||
<el-form-item label="组名">
|
<el-form-item label="组名">
|
||||||
<el-input v-model="attrGroup.name"/>
|
<el-input v-model="attrGroup.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序">
|
<el-form-item label="排序">
|
||||||
<el-input v-model="attrGroup.sort"/>
|
<el-input v-model="attrGroup.sort" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="attrGroup.remark"/>
|
<el-input v-model="attrGroup.remark" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -65,7 +65,7 @@ export default {
|
|||||||
this.fetchDataById(id)
|
this.fetchDataById(id)
|
||||||
} else {
|
} else {
|
||||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||||
this.attrGroup = {...defaultForm}
|
this.attrGroup = { ...defaultForm }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/product/attrGroup/list'})
|
this.$router.push({ path: '/product/attrGroup/list' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -101,13 +101,13 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/product/attrGroup/list'})
|
this.$router.push({ path: '/product/attrGroup/list' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({path: '/product/attrGroup/list'})
|
this.$router.push({ path: '/product/attrGroup/list' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 根据id查询记录
|
// 根据id查询记录
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item label="输入搜索:">
|
<el-form-item label="输入搜索:">
|
||||||
<el-input v-model="searchObj.name" style="width: 203px" placeholder="关键字"/>
|
<el-input v-model="searchObj.name" style="width: 203px" placeholder="关键字" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
||||||
@ -45,11 +45,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="name" label="组名"/>
|
<el-table-column prop="name" label="组名" />
|
||||||
<el-table-column prop="sort" label="排序"/>
|
<el-table-column prop="sort" label="排序" />
|
||||||
<el-table-column prop="remark" label="备注"/>
|
<el-table-column prop="remark" label="备注" />
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
<el-table-column prop="updateTime" label="更新时间"/>
|
<el-table-column prop="updateTime" label="更新时间" />
|
||||||
|
|
||||||
<el-table-column label="设置" width="200" align="center">
|
<el-table-column label="设置" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -120,7 +120,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
add() {
|
add() {
|
||||||
this.$router.push({path: '/product/attrGroup/add'})
|
this.$router.push({ path: '/product/attrGroup/add' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 加载banner列表数据
|
// 加载banner列表数据
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
<el-form ref="categoryForm" :model="category" :rules="validateRules" label-width="120px">
|
<el-form ref="categoryForm" :model="category" :rules="validateRules" label-width="120px">
|
||||||
|
|
||||||
<el-form-item label="分类名称" prop="name">
|
<el-form-item label="分类名称" prop="name">
|
||||||
<el-input v-model="category.name"/>
|
<el-input v-model="category.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input v-model="category.sort"/>
|
<el-input v-model="category.sort" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -44,10 +44,10 @@ export default {
|
|||||||
saveBtnDisabled: false,
|
saveBtnDisabled: false,
|
||||||
|
|
||||||
validateRules: {
|
validateRules: {
|
||||||
name: [{required: true, trigger: 'blur', message: '必须输入'}],
|
name: [{ required: true, trigger: 'blur', message: '必须输入' }],
|
||||||
sort: [
|
sort: [
|
||||||
{required: true, decimal: 2, trigger: 'blur', message: '必须输入'},
|
{ required: true, decimal: 2, trigger: 'blur', message: '必须输入' },
|
||||||
{validator: isNum, trigger: 'blur'}
|
{ validator: isNum, trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ export default {
|
|||||||
this.fetchDataById(id)
|
this.fetchDataById(id)
|
||||||
} else {
|
} else {
|
||||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||||
this.category = {...defaultForm}
|
this.category = { ...defaultForm }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/product/category/list'})
|
this.$router.push({ path: '/product/category/list' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -119,13 +119,13 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/product/category/list'})
|
this.$router.push({ path: '/product/category/list' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({path: '/product/category/list'})
|
this.$router.push({ path: '/product/category/list' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 根据id查询记录
|
// 根据id查询记录
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item label="输入搜索:">
|
<el-form-item label="输入搜索:">
|
||||||
<el-input v-model="searchObj.name" style="width: 203px" placeholder="关键字"/>
|
<el-input v-model="searchObj.name" style="width: 203px" placeholder="关键字" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
||||||
@ -45,10 +45,10 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="name" label="分类名称"/>
|
<el-table-column prop="name" label="分类名称" />
|
||||||
<el-table-column prop="sort" label="排序"/>
|
<el-table-column prop="sort" label="排序" />
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
<el-table-column prop="updateTime" label="更新时间"/>
|
<el-table-column prop="updateTime" label="更新时间" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -111,7 +111,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
add() {
|
add() {
|
||||||
this.$router.push({path: '/product/category/add'})
|
this.$router.push({ path: '/product/category/add' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 加载banner列表数据
|
// 加载banner列表数据
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>基本信息</h3></div>
|
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>基本信息</h3></div>
|
||||||
<el-form-item label="sku名称">
|
<el-form-item label="sku名称">
|
||||||
<el-input v-model="skuInfo.skuName"/>
|
<el-input v-model="skuInfo.skuName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品分类" prop="tmId">
|
<el-form-item label="商品分类" prop="tmId">
|
||||||
<el-select v-model="skuInfo.categoryId" placeholder="请选择">
|
<el-select v-model="skuInfo.categoryId" placeholder="请选择">
|
||||||
@ -17,13 +17,13 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="SKU编号:">
|
<el-form-item label="SKU编号:">
|
||||||
<el-input v-model="skuInfo.skuCode"/>
|
<el-input v-model="skuInfo.skuCode" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品售价:">
|
<el-form-item label="商品售价:">
|
||||||
<el-input v-model="skuInfo.price"/>
|
<el-input v-model="skuInfo.price" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="市场价:">
|
<el-form-item label="市场价:">
|
||||||
<el-input v-model="skuInfo.marketPrice"/>
|
<el-input v-model="skuInfo.marketPrice" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否新人专享:">
|
<el-form-item label="是否新人专享:">
|
||||||
<el-radio-group v-model="skuInfo.isNewPerson">
|
<el-radio-group v-model="skuInfo.isNewPerson">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序">
|
<el-form-item label="排序">
|
||||||
<el-input v-model="skuInfo.sort"/>
|
<el-input v-model="skuInfo.sort" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>平台属性</h3></div>
|
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>平台属性</h3></div>
|
||||||
@ -50,8 +50,12 @@
|
|||||||
<el-card shadow="never" class="cardBg">
|
<el-card shadow="never" class="cardBg">
|
||||||
<div v-for="(item,index) in attrList" :key="item.id" :class="{littleMarginTop:index!==0}">
|
<div v-for="(item,index) in attrList" :key="item.id" :class="{littleMarginTop:index!==0}">
|
||||||
<div class="paramInputLabel">{{ item.name }}:</div>
|
<div class="paramInputLabel">{{ item.name }}:</div>
|
||||||
<el-select v-if="item.inputType===1" v-model="attrList[index].value" class="paramInput"
|
<el-select
|
||||||
style="width: 300px">
|
v-if="item.inputType===1"
|
||||||
|
v-model="attrList[index].value"
|
||||||
|
class="paramInput"
|
||||||
|
style="width: 300px"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in getParamSelectList(item.selectList)"
|
v-for="item in getParamSelectList(item.selectList)"
|
||||||
:key="item"
|
:key="item"
|
||||||
@ -59,7 +63,7 @@
|
|||||||
:value="item"
|
:value="item"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-else v-model="attrList[index].value" class="paramInput" style="width: 300px"/>
|
<el-input v-else v-model="attrList[index].value" class="paramInput" style="width: 300px" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -77,20 +81,20 @@
|
|||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
>
|
>
|
||||||
<i class="el-icon-plus"/>
|
<i class="el-icon-plus" />
|
||||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png/gif文件,且不超过2MB</div>
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png/gif文件,且不超过2MB</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>商品库存</h3></div>
|
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>商品库存</h3></div>
|
||||||
<el-form-item label="商品库存:">
|
<el-form-item label="商品库存:">
|
||||||
<el-input v-model="skuInfo.stock"/>
|
<el-input v-model="skuInfo.stock" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品预警库存:">
|
<el-form-item label="商品预警库存:">
|
||||||
<el-input v-model="skuInfo.lowStock"/>
|
<el-input v-model="skuInfo.lowStock" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="限购个数:">
|
<el-form-item label="限购个数:">
|
||||||
<el-input v-model="skuInfo.perLimit"/>
|
<el-input v-model="skuInfo.perLimit" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>商品详情</h3></div>-->
|
<!-- <div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>商品详情</h3></div>-->
|
||||||
@ -110,7 +114,7 @@
|
|||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:file-list="filePosterList"
|
:file-list="filePosterList"
|
||||||
>
|
>
|
||||||
<i class="el-icon-plus"/>
|
<i class="el-icon-plus" />
|
||||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png/gif文件,且不超过2MB</div>
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png/gif文件,且不超过2MB</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -203,7 +207,7 @@ export default {
|
|||||||
this.fetchDataById(id)
|
this.fetchDataById(id)
|
||||||
} else {
|
} else {
|
||||||
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
// 对象拓展运算符:拷贝对象,而不是赋值对象的引用
|
||||||
this.skuInfo = {...defaultForm}
|
this.skuInfo = { ...defaultForm }
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fetchCategoryList()
|
this.fetchCategoryList()
|
||||||
@ -277,7 +281,7 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/product/skuInfo/list'})
|
this.$router.push({ path: '/product/skuInfo/list' })
|
||||||
this.saveBtnDisabled = false
|
this.saveBtnDisabled = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -304,13 +308,13 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: response.message
|
message: response.message
|
||||||
})
|
})
|
||||||
this.$router.push({path: '/product/skuInfo/list'})
|
this.$router.push({ path: '/product/skuInfo/list' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({path: '/product/skuInfo/list'})
|
this.$router.push({ path: '/product/skuInfo/list' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 根据id查询记录
|
// 根据id查询记录
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<el-form inline>
|
<el-form inline>
|
||||||
<el-form-item label="关键字">
|
<el-form-item label="关键字">
|
||||||
<el-input v-model="searchObj.keyword" type="text" width="100" placeholder="关键字" clearable/>
|
<el-input v-model="searchObj.keyword" type="text" width="100" placeholder="关键字" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="商品分类" prop="tmId">
|
<el-form-item label="商品分类" prop="tmId">
|
||||||
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
<el-form-item label="商品类型">
|
<el-form-item label="商品类型">
|
||||||
<el-select v-model="searchObj.skuType" clearable placeholder="请选择">
|
<el-select v-model="searchObj.skuType" clearable placeholder="请选择">
|
||||||
<el-option value="0" label="普通商品"/>
|
<el-option value="0" label="普通商品" />
|
||||||
<el-option value="1" label="秒杀商品"/>
|
<el-option value="1" label="秒杀商品" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
<el-button class="btn-add" size="mini" @click="add()">添加</el-button>
|
||||||
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
<el-button class="btn-add" size="mini" style="margin: 0 10px;" @click="removeRows()">批量删除</el-button>
|
||||||
@ -59,7 +59,7 @@
|
|||||||
<p>编号:{{ scope.row.skuCode }}</p>
|
<p>编号:{{ scope.row.skuCode }}</p>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="skuName" label="sku名称"/>
|
<el-table-column prop="skuName" label="sku名称" />
|
||||||
<el-table-column label="商品图片" width="140" align="center">
|
<el-table-column label="商品图片" width="140" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<img style="height: 80px" :src="scope.row.imgUrl">
|
<img style="height: 80px" :src="scope.row.imgUrl">
|
||||||
@ -80,8 +80,8 @@
|
|||||||
<p>市场价:{{ scope.row.marketPrice }}</p>
|
<p>市场价:{{ scope.row.marketPrice }}</p>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="sale" label="销量"/>
|
<el-table-column prop="sale" label="销量" />
|
||||||
<el-table-column prop="sort" label="排序"/>
|
<el-table-column prop="sort" label="排序" />
|
||||||
<el-table-column label="标签" width="160px">
|
<el-table-column label="标签" width="160px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<p>上架/下架:
|
<p>上架/下架:
|
||||||
@ -176,7 +176,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
add() {
|
add() {
|
||||||
this.$router.push({path: '/product/skuInfo/add'})
|
this.$router.push({ path: '/product/skuInfo/add' })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 加载banner列表数据
|
// 加载banner列表数据
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item label="输入搜索:">
|
<el-form-item label="输入搜索:">
|
||||||
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字"/>
|
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<!-- 工具条 -->
|
<!-- 工具条 -->
|
||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<i class="el-icon-tickets" style="margin-top: 5px"/>
|
<i class="el-icon-tickets" style="margin-top: 5px" />
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button class="btn-add" size="mini" @click="openShow()">开通区域</el-button>
|
<el-button class="btn-add" size="mini" @click="openShow()">开通区域</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -38,9 +38,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="regionName" label="区域名称"/>
|
<el-table-column prop="regionName" label="区域名称" />
|
||||||
<el-table-column prop="wareName" label="仓库名称"/>
|
<el-table-column prop="wareName" label="仓库名称" />
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
<el-table-column label="状态" width="120px">
|
<el-table-column label="状态" width="120px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<p>{{ scope.row.status == 0 ? '未开通' : '已开通' }}</p>
|
<p>{{ scope.row.status == 0 ? '未开通' : '已开通' }}</p>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item label="输入搜索:">
|
<el-form-item label="输入搜索:">
|
||||||
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字"/>
|
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||||
@ -33,13 +33,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="name" label="姓名" width="100px"/>
|
<el-table-column prop="name" label="姓名" width="100px" />
|
||||||
<el-table-column prop="phone" label="手机号码" width="100px"/>
|
<el-table-column prop="phone" label="手机号码" width="100px" />
|
||||||
<el-table-column prop="takeName" label="提货点名称"/>
|
<el-table-column prop="takeName" label="提货点名称" />
|
||||||
<el-table-column prop="param.provinceName" label="省" width="70px"/>
|
<el-table-column prop="param.provinceName" label="省" width="70px" />
|
||||||
<el-table-column prop="param.cityName" label="城市" width="70px"/>
|
<el-table-column prop="param.cityName" label="城市" width="70px" />
|
||||||
<el-table-column prop="param.districtName" label="区/县" width="70px"/>
|
<el-table-column prop="param.districtName" label="区/县" width="70px" />
|
||||||
<el-table-column prop="createTime" label="申请时间" width="155px"/>
|
<el-table-column prop="createTime" label="申请时间" width="155px" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="150" align="center">
|
<el-table-column label="操作" width="150" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -69,16 +69,16 @@
|
|||||||
<el-dialog title="添加/修改" :visible.sync="dialogVisible" width="60%">
|
<el-dialog title="添加/修改" :visible.sync="dialogVisible" width="60%">
|
||||||
<el-form ref="flashPromotionForm" label-width="150px" size="small" style="padding-right: 40px;">
|
<el-form ref="flashPromotionForm" label-width="150px" size="small" style="padding-right: 40px;">
|
||||||
<el-form-item label="团长名称">
|
<el-form-item label="团长名称">
|
||||||
<el-input v-model="leader.name"/>
|
<el-input v-model="leader.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号码">
|
<el-form-item label="手机号码">
|
||||||
<el-input v-model="leader.phone"/>
|
<el-input v-model="leader.phone" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="身份证">
|
<el-form-item label="身份证">
|
||||||
<el-input v-model="leader.idNo"/>
|
<el-input v-model="leader.idNo" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提货点名称">
|
<el-form-item label="提货点名称">
|
||||||
<el-input v-model="leader.takeName"/>
|
<el-input v-model="leader.takeName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择地址">
|
<el-form-item label="选择地址">
|
||||||
<el-select
|
<el-select
|
||||||
@ -120,13 +120,13 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="详细地址">
|
<el-form-item label="详细地址">
|
||||||
<el-input v-model="leader.detailAddress"/>
|
<el-input v-model="leader.detailAddress" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="经度">
|
<el-form-item label="经度">
|
||||||
<el-input v-model="leader.longitude"/>
|
<el-input v-model="leader.longitude" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="纬度">
|
<el-form-item label="纬度">
|
||||||
<el-input v-model="leader.latitude"/>
|
<el-input v-model="leader.latitude" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="门店照片">
|
<el-form-item label="门店照片">
|
||||||
<el-upload
|
<el-upload
|
||||||
@ -140,7 +140,7 @@
|
|||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="营业时间">
|
<el-form-item label="营业时间">
|
||||||
<el-input v-model="leader.workTime"/>
|
<el-input v-model="leader.workTime" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<el-card class="operate-container" shadow="never">
|
<el-card class="operate-container" shadow="never">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item label="输入搜索:">
|
<el-form-item label="输入搜索:">
|
||||||
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字"/>
|
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
|
||||||
@ -32,17 +32,17 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="name" label="姓名" width="100px"/>
|
<el-table-column prop="name" label="姓名" width="100px" />
|
||||||
<el-table-column prop="phone" label="手机号码" width="120px"/>
|
<el-table-column prop="phone" label="手机号码" width="120px" />
|
||||||
<el-table-column prop="takeName" label="提货点名称"/>
|
<el-table-column prop="takeName" label="提货点名称" />
|
||||||
<el-table-column prop="param.regionName" label="所属区域" width="80px"/>
|
<el-table-column prop="param.regionName" label="所属区域" width="80px" />
|
||||||
<el-table-column label="状态" width="100">
|
<el-table-column label="状态" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<p>{{ scope.row.checkStatus === 0 ? '待审核' : scope.row.checkStatus === 1 ? '通过' : '未通过' }}</p>
|
<p>{{ scope.row.checkStatus === 0 ? '待审核' : scope.row.checkStatus === 1 ? '通过' : '未通过' }}</p>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="checkTime" label="审核时间" width="150px"/>
|
<el-table-column prop="checkTime" label="审核时间" width="150px" />
|
||||||
<el-table-column prop="createTime" label="申请时间" width="150px"/>
|
<el-table-column prop="createTime" label="申请时间" width="150px" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="200" align="center">
|
<el-table-column label="操作" width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {mount, createLocalVue} from '@vue/test-utils'
|
import { mount, createLocalVue } from '@vue/test-utils'
|
||||||
import VueRouter from 'vue-router'
|
import VueRouter from 'vue-router'
|
||||||
import ElementUI from 'element-ui'
|
import ElementUI from 'element-ui'
|
||||||
import Breadcrumb from '@/components/Breadcrumb/index.vue'
|
import Breadcrumb from '@/components/Breadcrumb/index.vue'
|
||||||
@ -22,27 +22,27 @@ const routes = [
|
|||||||
children: [{
|
children: [{
|
||||||
path: 'menu1',
|
path: 'menu1',
|
||||||
name: 'menu1',
|
name: 'menu1',
|
||||||
meta: {title: 'menu1'},
|
meta: { title: 'menu1' },
|
||||||
children: [{
|
children: [{
|
||||||
path: 'menu1-1',
|
path: 'menu1-1',
|
||||||
name: 'menu1-1',
|
name: 'menu1-1',
|
||||||
meta: {title: 'menu1-1'}
|
meta: { title: 'menu1-1' }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'menu1-2',
|
||||||
|
name: 'menu1-2',
|
||||||
|
redirect: 'noredirect',
|
||||||
|
meta: { title: 'menu1-2' },
|
||||||
|
children: [{
|
||||||
|
path: 'menu1-2-1',
|
||||||
|
name: 'menu1-2-1',
|
||||||
|
meta: { title: 'menu1-2-1' }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'menu1-2',
|
path: 'menu1-2-2',
|
||||||
name: 'menu1-2',
|
name: 'menu1-2-2'
|
||||||
redirect: 'noredirect',
|
|
||||||
meta: {title: 'menu1-2'},
|
|
||||||
children: [{
|
|
||||||
path: 'menu1-2-1',
|
|
||||||
name: 'menu1-2-1',
|
|
||||||
meta: {title: 'menu1-2-1'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'menu1-2-2',
|
|
||||||
name: 'menu1-2-2'
|
|
||||||
}]
|
|
||||||
}]
|
}]
|
||||||
|
}]
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {shallowMount} from '@vue/test-utils'
|
import { shallowMount } from '@vue/test-utils'
|
||||||
import Hamburger from '@/components/Hamburger/index.vue'
|
import Hamburger from '@/components/Hamburger/index.vue'
|
||||||
|
|
||||||
describe('Hamburger.vue', () => {
|
describe('Hamburger.vue', () => {
|
||||||
@ -11,9 +11,9 @@ describe('Hamburger.vue', () => {
|
|||||||
})
|
})
|
||||||
it('prop isActive', () => {
|
it('prop isActive', () => {
|
||||||
const wrapper = shallowMount(Hamburger)
|
const wrapper = shallowMount(Hamburger)
|
||||||
wrapper.setProps({isActive: true})
|
wrapper.setProps({ isActive: true })
|
||||||
expect(wrapper.contains('.is-active')).toBe(true)
|
expect(wrapper.contains('.is-active')).toBe(true)
|
||||||
wrapper.setProps({isActive: false})
|
wrapper.setProps({ isActive: false })
|
||||||
expect(wrapper.contains('.is-active')).toBe(false)
|
expect(wrapper.contains('.is-active')).toBe(false)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {shallowMount} from '@vue/test-utils'
|
import { shallowMount } from '@vue/test-utils'
|
||||||
import SvgIcon from '@/components/SvgIcon/index.vue'
|
import SvgIcon from '@/components/SvgIcon/index.vue'
|
||||||
|
|
||||||
describe('SvgIcon.vue', () => {
|
describe('SvgIcon.vue', () => {
|
||||||
@ -17,7 +17,7 @@ describe('SvgIcon.vue', () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
expect(wrapper.classes().length).toBe(1)
|
expect(wrapper.classes().length).toBe(1)
|
||||||
wrapper.setProps({className: 'test'})
|
wrapper.setProps({ className: 'test' })
|
||||||
expect(wrapper.classes().includes('test')).toBe(true)
|
expect(wrapper.classes().includes('test')).toBe(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {formatTime} from '@/utils/index.js'
|
import { formatTime } from '@/utils/index.js'
|
||||||
|
|
||||||
describe('Utils:formatTime', () => {
|
describe('Utils:formatTime', () => {
|
||||||
const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
|
const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {param2Obj} from '@/utils/index.js'
|
import { param2Obj } from '@/utils/index.js'
|
||||||
|
|
||||||
describe('Utils:param2Obj', () => {
|
describe('Utils:param2Obj', () => {
|
||||||
const url = 'https://github.com/PanJiaChen/vue-element-admin?name=bill&age=29&sex=1&field=dGVzdA==&key=%E6%B5%8B%E8%AF%95'
|
const url = 'https://github.com/PanJiaChen/vue-element-admin?name=bill&age=29&sex=1&field=dGVzdA==&key=%E6%B5%8B%E8%AF%95'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {parseTime} from '@/utils/index.js'
|
import { parseTime } from '@/utils/index.js'
|
||||||
|
|
||||||
describe('Utils:parseTime', () => {
|
describe('Utils:parseTime', () => {
|
||||||
const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
|
const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {validUsername, isExternal} from '@/utils/validate.js'
|
import { validUsername, isExternal } from '@/utils/validate.js'
|
||||||
|
|
||||||
describe('Utils:validate', () => {
|
describe('Utils:validate', () => {
|
||||||
it('validUsername', () => {
|
it('validUsername', () => {
|
||||||
|
@ -93,28 +93,28 @@ module.exports = {
|
|||||||
.end()
|
.end()
|
||||||
config
|
config
|
||||||
.optimization.splitChunks({
|
.optimization.splitChunks({
|
||||||
chunks: 'all',
|
chunks: 'all',
|
||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
libs: {
|
libs: {
|
||||||
name: 'chunk-libs',
|
name: 'chunk-libs',
|
||||||
test: /[\\/]node_modules[\\/]/,
|
test: /[\\/]node_modules[\\/]/,
|
||||||
priority: 10,
|
priority: 10,
|
||||||
chunks: 'initial' // only package third parties that are initially dependent
|
chunks: 'initial' // only package third parties that are initially dependent
|
||||||
},
|
},
|
||||||
elementUI: {
|
elementUI: {
|
||||||
name: 'chunk-elementUI', // split elementUI into a single package
|
name: 'chunk-elementUI', // split elementUI into a single package
|
||||||
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
name: 'chunk-commons',
|
name: 'chunk-commons',
|
||||||
test: resolve('src/components'), // can customize your rules
|
test: resolve('src/components'), // can customize your rules
|
||||||
minChunks: 3, // minimum common number
|
minChunks: 3, // minimum common number
|
||||||
priority: 5,
|
priority: 5,
|
||||||
reuseExistingChunk: true
|
reuseExistingChunk: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
|
||||||
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
|
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
|
||||||
config.optimization.runtimeChunk('single')
|
config.optimization.runtimeChunk('single')
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user