功能点完善

This commit is contained in:
2021-07-12 17:02:47 +08:00
parent 190f1bf1f2
commit 1dd5924d42
356 changed files with 86720 additions and 84655 deletions
+14 -14
View File
@@ -1,14 +1,14 @@
# https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
# https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
+19 -19
View File
@@ -1,19 +1,19 @@
NODE_ENV = production
# just a flag
ENV = 'boot'
VUE_APP_PROJECT_NAME = 'cereshop'
# 是否启用验证码
VUE_APP_IS_CAPTCHA = true
# 客户端秘钥
VUE_APP_CLIENT_ID=ceres_admin_web
VUE_APP_CLIENT_SECRET=ceres_admin_web
# base api
VUE_APP_BASE_API = '/api'
NODE_ENV = production
# just a flag
ENV = 'boot'
VUE_APP_PROJECT_NAME = 'cereshop'
# 是否启用验证码
VUE_APP_IS_CAPTCHA = true
# 客户端秘钥
VUE_APP_CLIENT_ID=ceres_admin_web
VUE_APP_CLIENT_SECRET=ceres_admin_web
# base api
VUE_APP_BASE_API = '/api'
+14 -14
View File
@@ -1,14 +1,14 @@
# just a flag
ENV = 'development'
VUE_APP_PROJECT_NAME = 'cereshop-admin-web'
# 请求服务配置
VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://192.168.10.236:8764'
# 是否启用验证码
VUE_APP_IS_CAPTCHA = true
# 客户端秘钥
VUE_APP_CLIENT_ID=ceres_admin_web
VUE_APP_CLIENT_SECRET=ceres_admin_web
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# just a flag
ENV = 'development'
VUE_APP_PROJECT_NAME = 'cereshop-admin-web'
# 请求服务配置
VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://192.168.10.130:8764'
# 是否启用验证码
VUE_APP_IS_CAPTCHA = true
# 客户端秘钥
VUE_APP_CLIENT_ID=ceres_admin_web
VUE_APP_CLIENT_SECRET=ceres_admin_web
VUE_CLI_BABEL_TRANSPILE_MODULES = true
+16 -16
View File
@@ -1,16 +1,16 @@
# just a flag
ENV = 'production'
VUE_APP_PROJECT_NAME = 'admin-web'
# 请求域名前缀, 该变量仅仅生产环境需要设置
VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'https://pos.admin.api.lotus-wallet.com'
# base api
VUE_APP_BASE_API = '/api'
# 是否启用验证码
VUE_APP_IS_CAPTCHA = true
# 客户端秘钥
VUE_APP_CLIENT_ID=ceres_admin_web
VUE_APP_CLIENT_SECRET=ceres_admin_web
# just a flag
ENV = 'production'
VUE_APP_PROJECT_NAME = 'admin-web'
# 请求域名前缀, 该变量仅仅生产环境需要设置
VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'https://pos.admin.api.lotus-wallet.com'
# base api
VUE_APP_BASE_API = '/api'
# 是否启用验证码
VUE_APP_IS_CAPTCHA = true
# 客户端秘钥
VUE_APP_CLIENT_ID=ceres_admin_web
VUE_APP_CLIENT_SECRET=ceres_admin_web
+8 -8
View File
@@ -1,8 +1,8 @@
NODE_ENV = production
# just a flag
ENV = 'staging'
# base api
VUE_APP_BASE_API = '/stage-api'
NODE_ENV = production
# just a flag
ENV = 'staging'
# base api
VUE_APP_BASE_API = '/stage-api'
+4 -4
View File
@@ -1,4 +1,4 @@
build/*.js
src/assets
public
dist
build/*.js
src/assets
public
dist
+15 -15
View File
@@ -1,15 +1,15 @@
module.exports = {
root: true,
env: {
node: true
},
// extends: ["plugin:vue/essential", "@vue/prettier"],//这里面的@vue/prettier去掉
extends: ["plugin:vue/essential"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
},
parserOptions: {
// parser: "babel-eslint"
}
};
module.exports = {
root: true,
env: {
node: true
},
// extends: ["plugin:vue/essential", "@vue/prettier"],//这里面的@vue/prettier去掉
extends: ["plugin:vue/essential"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
},
parserOptions: {
// parser: "babel-eslint"
}
};
+26 -26
View File
@@ -1,26 +1,26 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
.history/
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
*.iml
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
# admin-web
build
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
.history/
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
*.iml
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
# admin-web
build
+6 -6
View File
@@ -1,6 +1,6 @@
{
"eslintIntegration": true,
"stylelintIntegration": true,
"singleQuote": true,
"semi": false
}
{
"eslintIntegration": true,
"stylelintIntegration": true,
"singleQuote": true,
"semi": false
}
+5 -5
View File
@@ -1,5 +1,5 @@
language: node_js
node_js: 10
script: npm run test
notifications:
email: false
language: node_js
node_js: 10
script: npm run test
notifications:
email: false
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -1,5 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
module.exports = {
presets: [
'@vue/app'
]
}
+24 -24
View File
@@ -1,24 +1,24 @@
module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/tests/unit/coverage',
// 'collectCoverage': true,
'coverageReporters': [
'lcov',
'text-summary'
],
testURL: 'http://localhost/'
}
module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/tests/unit/coverage',
// 'collectCoverage': true,
'coverageReporters': [
'lcov',
'text-summary'
],
testURL: 'http://localhost/'
}
+2 -2
View File
@@ -1,3 +1,3 @@
{
"path": "admin-web"
{
"path": "admin-web"
}
+25803 -25803
View File
File diff suppressed because it is too large Load Diff
+127 -127
View File
@@ -1,127 +1,127 @@
{
"name": "cereshop",
"version": "1.0.0",
"description": "cereshop",
"author": "cereshop",
"license": "Apache 2.0",
"scripts": {
"dev": "vue-cli-service serve --open",
"build": "vue-cli-service build",
"build:prod": "vue-cli-service build",
"build:boot": "vue-cli-service build --mode boot",
"build:docker": "vue-cli-service build --mode docker",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"new": "plop"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"keywords": [
"vue",
"admin",
"dashboard",
"element-ui",
"management-system"
],
"repository": {
"type": "git",
"url": ""
},
"bugs": {
"url": ""
},
"dependencies": {
"@riophae/vue-treeselect": "^0.4.0",
"acorn": "^6.4.1",
"axios": "^0.20.0",
"clipboard": "^2.0.6",
"codemirror": "^5.57.0",
"core-js": "^3.6.5",
"css-loader": "^4.2.2",
"dragula": "^3.7.2",
"driver.js": "^0.9.8",
"dropzone": "^5.7.2",
"echarts": "^4.2.1",
"element-ui": "^2.13.2",
"file-saver": "^2.0.2",
"fuse.js": "^6.4.1",
"jsonlint": "1.6.3",
"jszip": "^3.5.0",
"less": "^3.12.2",
"less-loader": "^7.0.0",
"normalize.css": "^8.0.1",
"nprogress": "0.2.0",
"path-to-regexp": "^6.1.0",
"screenfull": "^5.0.2",
"showdown": "^1.9.1",
"sortablejs": "^1.10.2",
"tui-editor": "^1.4.10",
"v-viewer": "^1.5.1",
"vue": "^2.6.12",
"vue-count-to": "^1.0.13",
"vue-i18n": "^8.21.0",
"vue-loader": "^15.9.2",
"vue-photo-preview": "^1.1.3",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.4.6",
"vue-splitpane": "^1.0.6",
"vuedraggable": "^2.24.1",
"vuex": "^3.5.1",
"webpack": "^4.44.1",
"xlsx": "^0.16.6"
},
"devDependencies": {
"@babel/core": "^7.11.4",
"@babel/register": "^7.10.5",
"@vue/cli-plugin-babel": "^4.5.4",
"@vue/cli-plugin-eslint": "^4.5.4",
"@vue/cli-plugin-unit-jest": "^4.5.4",
"@vue/cli-service": "^4.5.4",
"@vue/test-utils": "^1.0.4",
"autoprefixer": "^9.5.1",
"babel-cli": "^6.26.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.3.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-preset-env": "^1.7.0",
"chalk": "^4.1.0",
"chokidar": "^3.4.2",
"connect": "^3.7.0",
"eslint": "^7.7.0",
"eslint-plugin-vue": "^6.2.2",
"html-webpack-plugin": "^4.3.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.13",
"mockjs": "^1.1.0",
"node-sass": "^4.13.1",
"plop": "^2.7.4",
"runjs": "^4.3.2",
"sass-loader": "^10.0.1",
"script-ext-html-webpack-plugin": "^2.1.4",
"script-loader": "0.7.2",
"serve-static": "^1.13.2",
"svg-sprite-loader": "^5.0.0",
"svgo": "^1.3.2",
"vue-template-compiler": "^2.6.12"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
{
"name": "cereshop",
"version": "1.0.0",
"description": "cereshop",
"author": "cereshop",
"license": "Apache 2.0",
"scripts": {
"dev": "vue-cli-service serve --open",
"build": "vue-cli-service build",
"build:prod": "vue-cli-service build",
"build:boot": "vue-cli-service build --mode boot",
"build:docker": "vue-cli-service build --mode docker",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"new": "plop"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"keywords": [
"vue",
"admin",
"dashboard",
"element-ui",
"management-system"
],
"repository": {
"type": "git",
"url": ""
},
"bugs": {
"url": ""
},
"dependencies": {
"@riophae/vue-treeselect": "^0.4.0",
"acorn": "^6.4.1",
"axios": "^0.20.0",
"clipboard": "^2.0.6",
"codemirror": "^5.57.0",
"core-js": "^3.6.5",
"css-loader": "^4.2.2",
"dragula": "^3.7.2",
"driver.js": "^0.9.8",
"dropzone": "^5.7.2",
"echarts": "^4.2.1",
"element-ui": "^2.13.2",
"file-saver": "^2.0.2",
"fuse.js": "^6.4.1",
"jsonlint": "1.6.3",
"jszip": "^3.5.0",
"less": "^3.12.2",
"less-loader": "^7.0.0",
"normalize.css": "^8.0.1",
"nprogress": "0.2.0",
"path-to-regexp": "^6.1.0",
"screenfull": "^5.0.2",
"showdown": "^1.9.1",
"sortablejs": "^1.10.2",
"tui-editor": "^1.4.10",
"v-viewer": "^1.5.1",
"vue": "^2.6.12",
"vue-count-to": "^1.0.13",
"vue-i18n": "^8.21.0",
"vue-loader": "^15.9.2",
"vue-photo-preview": "^1.1.3",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.4.6",
"vue-splitpane": "^1.0.6",
"vuedraggable": "^2.24.1",
"vuex": "^3.5.1",
"webpack": "^4.44.1",
"xlsx": "^0.16.6"
},
"devDependencies": {
"@babel/core": "^7.11.4",
"@babel/register": "^7.10.5",
"@vue/cli-plugin-babel": "^4.5.4",
"@vue/cli-plugin-eslint": "^4.5.4",
"@vue/cli-plugin-unit-jest": "^4.5.4",
"@vue/cli-service": "^4.5.4",
"@vue/test-utils": "^1.0.4",
"autoprefixer": "^9.5.1",
"babel-cli": "^6.26.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.3.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-preset-env": "^1.7.0",
"chalk": "^4.1.0",
"chokidar": "^3.4.2",
"connect": "^3.7.0",
"eslint": "^7.7.0",
"eslint-plugin-vue": "^6.2.2",
"html-webpack-plugin": "^4.3.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.13",
"mockjs": "^1.1.0",
"node-sass": "^4.13.1",
"plop": "^2.7.4",
"runjs": "^4.3.2",
"sass-loader": "^10.0.1",
"script-ext-html-webpack-plugin": "^2.1.4",
"script-loader": "0.7.2",
"serve-static": "^1.13.2",
"svg-sprite-loader": "^5.0.0",
"svgo": "^1.3.2",
"vue-template-compiler": "^2.6.12"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
+7 -7
View File
@@ -1,7 +1,7 @@
const viewGenerator = require('./plop-templates/view/prompt')
const componentGenerator = require('./plop-templates/component/prompt')
module.exports = function(plop) {
plop.setGenerator('view', viewGenerator)
plop.setGenerator('component', componentGenerator)
}
const viewGenerator = require('./plop-templates/view/prompt')
const componentGenerator = require('./plop-templates/component/prompt')
module.exports = function(plop) {
plop.setGenerator('view', viewGenerator)
plop.setGenerator('component', componentGenerator)
}
+5 -5
View File
@@ -1,5 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}
module.exports = {
plugins: {
autoprefixer: {}
}
}
+15 -15
View File
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>logo.ico">
<title>回乡POS平台端</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>logo.ico">
<title>回乡POS平台端</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
+32 -32
View File
@@ -1,32 +1,32 @@
<template>
<div id="app">
<router-view v-if="isRouterAlive" />
</div>
</template>
<script>
export default {
name: 'App',
provide() {
return {
reload: this.reload,
}
},
data() {
return {
isRouterAlive: true,
}
},
methods: {
reload() {
this.isRouterAlive = false
this.$nextTick(function () {
this.isRouterAlive = true
})
},
},
created() {
// TODO Token
},
}
</script>
<template>
<div id="app">
<router-view v-if="isRouterAlive" />
</div>
</template>
<script>
export default {
name: 'App',
provide() {
return {
reload: this.reload,
}
},
data() {
return {
isRouterAlive: true,
}
},
methods: {
reload() {
this.isRouterAlive = false
this.$nextTick(function () {
this.isRouterAlive = true
})
},
},
created() {
// TODO Token
},
}
</script>
+58
View File
@@ -0,0 +1,58 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/information/list`,
},
update: {
method: 'PUT',
url: `/information`
},
save: {
method: 'POST',
url: `/information`
},
delete: {
method: 'DELETE',
url: `/information`
},
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
// query (data, custom = {}) {
// return axiosApi({
// ...apiList.query,
// data,
// custom
// })
// },
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
}
+22 -22
View File
@@ -1,22 +1,22 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getList: `/order/findReturnInterventionList`,
getInfo: `/order/getReturnInterventionDetail`
}
export default {
// 售后平台介入列表
getList(data) {
return axiosApi({
method: 'POST',
url: apiList.getList,
data
})
},
getInfo(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getInfo}/${id}`
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getList: `/order/findReturnInterventionList`,
getInfo: `/order/getReturnInterventionDetail`
}
export default {
// 售后平台介入列表
getList(data) {
return axiosApi({
method: 'POST',
url: apiList.getList,
data
})
},
getInfo(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getInfo}/${id}`
})
}
}
+36 -36
View File
@@ -1,36 +1,36 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getPlatformTemplate: `/cmsTemplate/getPlatformTemplate`,
updateTemplate: '/cmsTemplate/updateTemplate',
getCmsTemplate: '/cmsTemplate/',
getStorePage: '/store/findStoreListForPlatform'
}
export default {
getStorePage(data) {
return axiosApi({
method: 'POST',
url: apiList.getStorePage,
data
})
},
getCmsTemplate(id) {
return axiosApi({
method: 'GET',
url: apiList.getCmsTemplate + id
})
},
getPlatformTemplate() {
return axiosApi({
method: 'GET',
url: apiList.getPlatformTemplate
})
},
updateTemplate(data) {
return axiosApi({
method: 'POST',
url: apiList.updateTemplate,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getPlatformTemplate: `/cmsTemplate/getPlatformTemplate`,
updateTemplate: '/cmsTemplate/updateTemplate',
getCmsTemplate: '/cmsTemplate/',
getStorePage: '/store/findStoreListForPlatform'
}
export default {
getStorePage(data) {
return axiosApi({
method: 'POST',
url: apiList.getStorePage,
data
})
},
getCmsTemplate(id) {
return axiosApi({
method: 'GET',
url: apiList.getCmsTemplate + id
})
},
getPlatformTemplate() {
return axiosApi({
method: 'GET',
url: apiList.getPlatformTemplate
})
},
updateTemplate(data) {
return axiosApi({
method: 'POST',
url: apiList.updateTemplate,
data
})
}
}
+78 -78
View File
@@ -1,78 +1,78 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/application/page`
},
update: {
method: 'PUT',
url: `/application`
},
save: {
method: 'POST',
url: `/application`
},
delete: {
method: 'DELETE',
url: `/application`
},
preview: {
method: 'POST',
url: `/application/preview`
},
export: {
method: 'POST',
url: `/application/export`
},
import: {
method: 'POST',
url: `/application/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/application/page`
},
update: {
method: 'PUT',
url: `/application`
},
save: {
method: 'POST',
url: `/application`
},
delete: {
method: 'DELETE',
url: `/application`
},
preview: {
method: 'POST',
url: `/application/preview`
},
export: {
method: 'POST',
url: `/application/export`
},
import: {
method: 'POST',
url: `/application/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+37 -37
View File
@@ -1,37 +1,37 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getList: `/tenantApply/page`,
auditApply: `/tenantApply/audit`,
deleteApply: `/tenantApply/remove`,
applyInfo: `/tenantApply`
}
export default {
getList(data) {
return axiosApi({
method: 'POST',
url: apiList.getList,
data
})
},
auditApply(data) {
return axiosApi({
method: 'POST',
url: apiList.auditApply,
data
})
},
deleteApply(data) {
return axiosApi({
method: 'POST',
url: apiList.deleteApply,
data
})
},
applyInfo(id) {
return axiosApi({
method: 'GET',
url: `${apiList.applyInfo}/${id}`
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getList: `/tenantApply/page`,
auditApply: `/tenantApply/audit`,
deleteApply: `/tenantApply/remove`,
applyInfo: `/tenantApply`
}
export default {
getList(data) {
return axiosApi({
method: 'POST',
url: apiList.getList,
data
})
},
auditApply(data) {
return axiosApi({
method: 'POST',
url: apiList.auditApply,
data
})
},
deleteApply(data) {
return axiosApi({
method: 'POST',
url: apiList.deleteApply,
data
})
},
applyInfo(id) {
return axiosApi({
method: 'GET',
url: `${apiList.applyInfo}/${id}`
})
}
}
+74 -74
View File
@@ -1,74 +1,74 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/area/page`
},
update: {
method: 'PUT',
url: `/area`
},
save: {
method: 'POST',
url: `/area`
},
delete: {
method: 'DELETE',
url: `/area`
},
query: {
method: 'POST',
url: `/area/query`
},
tree: {
method: 'GET',
url: `/area/tree`
}
}
export default {
page(data) {
return axiosApi({
...apiList.page,
data
})
},
tree(data) {
return axiosApi({
...apiList.tree,
data
})
},
query(data) {
return axiosApi({
...apiList.query,
data
})
},
save(data) {
return axiosApi({
...apiList.save,
data
})
},
update(data) {
return axiosApi({
...apiList.update,
data
})
},
delete(data) {
return axiosApi({
...apiList.delete,
data
})
},
check(code, id) {
return axiosApi({
method: 'GET',
url: `/area/check/` + code,
data: { id: id }
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/area/page`
},
update: {
method: 'PUT',
url: `/area`
},
save: {
method: 'POST',
url: `/area`
},
delete: {
method: 'DELETE',
url: `/area`
},
query: {
method: 'POST',
url: `/area/query`
},
tree: {
method: 'GET',
url: `/area/tree`
}
}
export default {
page(data) {
return axiosApi({
...apiList.page,
data
})
},
tree(data) {
return axiosApi({
...apiList.tree,
data
})
},
query(data) {
return axiosApi({
...apiList.query,
data
})
},
save(data) {
return axiosApi({
...apiList.save,
data
})
},
update(data) {
return axiosApi({
...apiList.update,
data
})
},
delete(data) {
return axiosApi({
...apiList.delete,
data
})
},
check(code, id) {
return axiosApi({
method: 'GET',
url: `/area/check/` + code,
data: { id: id }
})
}
}
+68 -68
View File
@@ -1,68 +1,68 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/attachment/page`
},
upload: {
method: 'POST',
url: `/attachment/upload`
},
download: {
method: 'GET',
url: `/attachment/download`
},
downloadBiz: {
method: 'GET',
url: `/attachment/download/biz`
},
downloadUrl: {
method: 'GET',
url: `/attachment/download/url`
},
delete: {
method: 'DELETE',
url: `/attachment`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
upload (data) {
return axiosApi({
...apiList.upload,
data
})
},
download (data) {
return axiosApi({
...apiList.download,
responseType: "blob",
data
})
},
downloadBiz (data) {
return axiosApi({
...apiList.downloadBiz,
data
})
},
downloadUrl (data) {
return axiosApi({
...apiList.downloadUrl,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/attachment/page`
},
upload: {
method: 'POST',
url: `/attachment/upload`
},
download: {
method: 'GET',
url: `/attachment/download`
},
downloadBiz: {
method: 'GET',
url: `/attachment/download/biz`
},
downloadUrl: {
method: 'GET',
url: `/attachment/download/url`
},
delete: {
method: 'DELETE',
url: `/attachment`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
upload (data) {
return axiosApi({
...apiList.upload,
data
})
},
download (data) {
return axiosApi({
...apiList.download,
responseType: "blob",
data
})
},
downloadBiz (data) {
return axiosApi({
...apiList.downloadBiz,
data
})
},
downloadUrl (data) {
return axiosApi({
...apiList.downloadUrl,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
}
}
+137 -137
View File
@@ -1,137 +1,137 @@
import axios from 'axios'
import { Message, MessageBox } from 'element-ui'
import db from '@/utils/localstorage'
import { Base64 } from 'js-base64'
// 请求添加条件,如token
axios.interceptors.request.use(
config => {
const isToken =
config.headers['X-isToken'] === false ? config.headers['X-isToken'] : true
const token = db.get('TOKEN', '')
if (token && isToken) {
config.headers.token = 'Bearer ' + token
}
// config.headers.tenant = 1166;
// config.headers.tenant = db.get('TENANT', '')
const clientId = process.env.VUE_APP_CLIENT_ID
const clientSecret = process.env.VUE_APP_CLIENT_SECRET
config.headers['Authorization'] = `Basic ${Base64.encode(
`${clientId}:${clientSecret}`
)}`
return config
},
error => {
return Promise.reject(error)
}
)
// 接口返回处理
axios.interceptors.response.use(
response => {
return response
},
error => {
return Promise.reject(error)
}
)
function handleError(error, reject) {
if (error.code === 'ECONNABORTED') {
Message({
message: '请求超时'
})
} else if (error.response && error.response.data) {
Message({
message: error.response.data
})
} else if (error.message) {
Message({
message: error.message
})
}
reject(error)
}
function handleSuccess(res, resolve) {
if (res.data.isError) {
// 未登录
if (
res.data.code === 40000 ||
res.data.code === 40001 ||
res.data.code === 40002 ||
res.data.code === 40003 ||
res.data.code === 40005 ||
res.data.code === 40006 ||
res.data.code === 40008
) {
MessageBox.alert(res.data.msg, '提醒', {
confirmButtonText: '确定',
callback: () => {
window.location.hash = '/login'
}
})
} else {
Message.error(res.data.msg)
}
}
resolve(res)
}
// http请求
const httpServer = opts => {
// 公共参数
const publicParams = {
ts: Date.now()
}
// http默认配置
const method = opts.method.toUpperCase()
// baseURL
// 开发环境: /api // 开发环境在 vue.config.js 中有 devServer.proxy 代理
// 生产环境: http://IP:PORT/api // 生产环境中 代理失效, 故需要配置绝对路径
const httpDefaultOpts = {
method,
url: `${process.env.VUE_APP_DEV_REQUEST_DOMAIN_PREFIX}${opts.url}`,
responseType: opts.responseType || '',
timeout: 20000
}
const dataRequest = ['PUT', 'POST', 'PATCH']
if (dataRequest.includes(method)) {
httpDefaultOpts.data = opts.data || {}
} else {
httpDefaultOpts.params = {
...publicParams,
...(opts.data || {})
}
}
// formData转换
if (opts.formData) {
httpDefaultOpts.transformRequest = [
data => {
const formData = new FormData()
if (data) {
Object.entries(data).forEach(item => {
formData.append(item[0], item[1])
})
}
return formData
}
]
}
const promise = new Promise((resolve, reject) => {
axios(httpDefaultOpts)
.then(response => {
handleSuccess(response, resolve)
})
.catch(error => {
handleError(error, reject)
})
})
return promise
}
export default httpServer
import axios from 'axios'
import { Message, MessageBox } from 'element-ui'
import db from '@/utils/localstorage'
import { Base64 } from 'js-base64'
// 请求添加条件,如token
axios.interceptors.request.use(
config => {
const isToken =
config.headers['X-isToken'] === false ? config.headers['X-isToken'] : true
const token = db.get('TOKEN', '')
if (token && isToken) {
config.headers.token = 'Bearer ' + token
}
// config.headers.tenant = 1166;
// config.headers.tenant = db.get('TENANT', '')
const clientId = process.env.VUE_APP_CLIENT_ID
const clientSecret = process.env.VUE_APP_CLIENT_SECRET
config.headers['Authorization'] = `Basic ${Base64.encode(
`${clientId}:${clientSecret}`
)}`
return config
},
error => {
return Promise.reject(error)
}
)
// 接口返回处理
axios.interceptors.response.use(
response => {
return response
},
error => {
return Promise.reject(error)
}
)
function handleError(error, reject) {
if (error.code === 'ECONNABORTED') {
Message({
message: '请求超时'
})
} else if (error.response && error.response.data) {
Message({
message: error.response.data
})
} else if (error.message) {
Message({
message: error.message
})
}
reject(error)
}
function handleSuccess(res, resolve) {
if (res.data.isError) {
// 未登录
if (
res.data.code === 40000 ||
res.data.code === 40001 ||
res.data.code === 40002 ||
res.data.code === 40003 ||
res.data.code === 40005 ||
res.data.code === 40006 ||
res.data.code === 40008
) {
MessageBox.alert(res.data.msg, '提醒', {
confirmButtonText: '确定',
callback: () => {
window.location.hash = '/login'
}
})
} else {
Message.error(res.data.msg)
}
}
resolve(res)
}
// http请求
const httpServer = opts => {
console.log(opts,"opts")
// 公共参数
const publicParams = {
ts: Date.now()
}
// http默认配置
const method = opts.method.toUpperCase()
// baseURL
// 开发环境: /api // 开发环境在 vue.config.js 中有 devServer.proxy 代理
// 生产环境: http://IP:PORT/api // 生产环境中 代理失效, 故需要配置绝对路径
const httpDefaultOpts = {
method,
url: `${process.env.VUE_APP_DEV_REQUEST_DOMAIN_PREFIX}${opts.url}`,
responseType: opts.responseType || '',
timeout: 20000
}
const dataRequest = ['PUT', 'POST', 'PATCH']
if (dataRequest.includes(method)) {
httpDefaultOpts.data = opts.data || {}
} else {
httpDefaultOpts.params = {
...publicParams,
...(opts.data || {})
}
}
// formData转换
if (opts.formData) {
httpDefaultOpts.transformRequest = [
data => {
const formData = new FormData()
if (data) {
Object.entries(data).forEach(item => {
formData.append(item[0], item[1])
})
}
return formData
}
]
}
const promise = new Promise((resolve, reject) => {
axios(httpDefaultOpts)
.then(response => {
handleSuccess(response, resolve)
})
.catch(error => {
handleError(error, reject)
})
})
return promise
}
export default httpServer
+96
View File
@@ -0,0 +1,96 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/brand/page`,
},
query: {
method: 'POST',
url: `/brand/query`,
},
update: {
method: 'PUT',
url: `/brand`
},
save: {
method: 'POST',
url: `/brand`
},
delete: {
method: 'DELETE',
url: `/brand`
},
export: {
method: 'POST',
url: `/brand/export`
},
preview: {
method: 'POST',
url: `/brand/preview`
},
import: {
method: 'POST',
url: `/brand/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
+54 -54
View File
@@ -1,54 +1,54 @@
import axiosApi from './AxiosApi.js'
const apiList = {
productCategory: `/productCategory/findPageCategory`,
addCategory: `/productCategory/addCategory`,
uploadCategory: `/productCategory/updateCategory`,
deletCategory: '/productCategory/delCategory',
queryOneCategory: `/productCategory/queryOneCategory`,
queryChildCategory: '/productCategory/queryChildCategory'
}
export default {
deletCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.deletCategory,
data
})
},
queryChildCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.queryChildCategory,
data
})
},
queryOneCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.queryOneCategory,
data
})
},
getProductCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.productCategory,
data
})
},
addCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.addCategory,
data
})
},
uploadCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.uploadCategory,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
productCategory: `/productCategory/findPageCategory`,
addCategory: `/productCategory/addCategory`,
uploadCategory: `/productCategory/updateCategory`,
deletCategory: '/productCategory/delCategory',
queryOneCategory: `/productCategory/queryOneCategory`,
queryChildCategory: '/productCategory/queryChildCategory'
}
export default {
deletCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.deletCategory,
data
})
},
queryChildCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.queryChildCategory,
data
})
},
queryOneCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.queryOneCategory,
data
})
},
getProductCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.productCategory,
data
})
},
addCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.addCategory,
data
})
},
uploadCategory(data) {
return axiosApi({
method: 'POST',
url: apiList.uploadCategory,
data
})
}
}
+116 -116
View File
@@ -1,116 +1,116 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getList: `/comment/findCommentList`,
handleComment: `/comment/handleComment`,
getSensitiveKeywordList: `/comment/findSensitiveKeywordList`,
setSensitiveKeyword: `/comment/updateSensitiveKeywordSetting`,
addSensitiveKeyword: `/comment/addSensitiveKeyword`,
editSensitiveKeyword: `/comment/updateSensitiveKeyword`,
deleteSensitiveKeyword: `/comment/deleteSensitiveKeyword`,
getCommentKeywordList: `/comment/findCommentKeywordList`,
setCommentKeywordList: `/comment/updateCommentKeywordSetting`,
addCommentKeyword: `/comment/addCommentKeyword`,
editCommentKeyword: `/comment/updateCommentKeyword`,
deleteCommentKeyword: `/comment/deleteCommentKeyword`
}
export default {
// 敏感词列表
getList(data) {
return axiosApi({
method: 'POST',
url: apiList.getList,
data
})
},
// 操作评论
handleComment(data) {
return axiosApi({
method: 'POST',
url: apiList.handleComment,
data
})
},
// 查询敏感词列表
getSensitiveKeywordList(data) {
return axiosApi({
method: 'POST',
url: apiList.getSensitiveKeywordList,
data
})
},
// 敏感词配置
setSensitiveKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.setSensitiveKeyword,
data
})
},
// 新增敏感词
addSensitiveKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.addSensitiveKeyword,
data
})
},
// 修改敏感词
editSensitiveKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.editSensitiveKeyword,
data
})
},
// 删除敏感词
deleteSensitiveKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.deleteSensitiveKeyword,
data
})
},
// 查询关键词列表
getCommentKeywordList(data) {
return axiosApi({
method: 'POST',
url: apiList.getCommentKeywordList,
data
})
},
// 关键词配置
setCommentKeywordList(data) {
return axiosApi({
method: 'POST',
url: apiList.setCommentKeywordList,
data
})
},
// 新增关键词
addCommentKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.addCommentKeyword,
data
})
},
// 修改关键词
editCommentKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.editCommentKeyword,
data
})
},
// 删除关键词
deleteCommentKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.deleteCommentKeyword,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getList: `/comment/findCommentList`,
handleComment: `/comment/handleComment`,
getSensitiveKeywordList: `/comment/findSensitiveKeywordList`,
setSensitiveKeyword: `/comment/updateSensitiveKeywordSetting`,
addSensitiveKeyword: `/comment/addSensitiveKeyword`,
editSensitiveKeyword: `/comment/updateSensitiveKeyword`,
deleteSensitiveKeyword: `/comment/deleteSensitiveKeyword`,
getCommentKeywordList: `/comment/findCommentKeywordList`,
setCommentKeywordList: `/comment/updateCommentKeywordSetting`,
addCommentKeyword: `/comment/addCommentKeyword`,
editCommentKeyword: `/comment/updateCommentKeyword`,
deleteCommentKeyword: `/comment/deleteCommentKeyword`
}
export default {
// 敏感词列表
getList(data) {
return axiosApi({
method: 'POST',
url: apiList.getList,
data
})
},
// 操作评论
handleComment(data) {
return axiosApi({
method: 'POST',
url: apiList.handleComment,
data
})
},
// 查询敏感词列表
getSensitiveKeywordList(data) {
return axiosApi({
method: 'POST',
url: apiList.getSensitiveKeywordList,
data
})
},
// 敏感词配置
setSensitiveKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.setSensitiveKeyword,
data
})
},
// 新增敏感词
addSensitiveKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.addSensitiveKeyword,
data
})
},
// 修改敏感词
editSensitiveKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.editSensitiveKeyword,
data
})
},
// 删除敏感词
deleteSensitiveKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.deleteSensitiveKeyword,
data
})
},
// 查询关键词列表
getCommentKeywordList(data) {
return axiosApi({
method: 'POST',
url: apiList.getCommentKeywordList,
data
})
},
// 关键词配置
setCommentKeywordList(data) {
return axiosApi({
method: 'POST',
url: apiList.setCommentKeywordList,
data
})
},
// 新增关键词
addCommentKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.addCommentKeyword,
data
})
},
// 修改关键词
editCommentKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.editCommentKeyword,
data
})
},
// 删除关键词
deleteCommentKeyword(data) {
return axiosApi({
method: 'POST',
url: apiList.deleteCommentKeyword,
data
})
}
}
+19 -19
View File
@@ -1,19 +1,19 @@
import axiosApi from './AxiosApi.js'
const apiList = {
// 获取当前系统的所有枚举
enums: {
method: 'GET',
url: `/enums`
}
}
export default {
uploadFile: `${process.env.VUE_APP_DEV_REQUEST_DOMAIN_PREFIX}/attachment/upload`,
enums (data) {
return axiosApi({
...apiList.enums,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
// 获取当前系统的所有枚举
enums: {
method: 'GET',
url: `/enums`
}
}
export default {
uploadFile: `${process.env.VUE_APP_DEV_REQUEST_DOMAIN_PREFIX}/attachment/upload`,
enums (data) {
return axiosApi({
...apiList.enums,
data
})
}
}
+37 -37
View File
@@ -1,37 +1,37 @@
import axiosApi from './AxiosApi.js'
const apiList = {
cmsTemplatePage: `/cmsTemplate/page`,
addTemplate: '/cmsTemplate',
deleteTemplate: '/cmsTemplate'
}
export default {
cmsTemplatePage(data) {
return axiosApi({
method: 'POST',
url: apiList.cmsTemplatePage,
data
})
},
addTemplate(data) {
return axiosApi({
method: 'POST',
url: apiList.addTemplate,
data
})
},
deleteTemplate(data) {
return axiosApi({
method: 'DELETE',
url: apiList.deleteTemplate,
data
})
},
updateTemplate(data) {
return axiosApi({
method: 'PUT',
url: apiList.deleteTemplate,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
cmsTemplatePage: `/cmsTemplate/page`,
addTemplate: '/cmsTemplate',
deleteTemplate: '/cmsTemplate'
}
export default {
cmsTemplatePage(data) {
return axiosApi({
method: 'POST',
url: apiList.cmsTemplatePage,
data
})
},
addTemplate(data) {
return axiosApi({
method: 'POST',
url: apiList.addTemplate,
data
})
},
deleteTemplate(data) {
return axiosApi({
method: 'DELETE',
url: apiList.deleteTemplate,
data
})
},
updateTemplate(data) {
return axiosApi({
method: 'PUT',
url: apiList.deleteTemplate,
data
})
}
}
+15 -15
View File
@@ -1,15 +1,15 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getVisitList: `/dashboard/visit`
}
export default {
getVisitList (data) {
return axiosApi({
method: 'GET',
url: apiList.getVisitList,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getVisitList: `/dashboard/visit`
}
export default {
getVisitList (data) {
return axiosApi({
method: 'GET',
url: apiList.getVisitList,
data
})
}
}
+47 -47
View File
@@ -1,47 +1,47 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/dictionary/page`
},
update: {
method: 'PUT',
url: `/dictionary`
},
save: {
method: 'POST',
url: `/dictionary`
},
delete: {
method: 'DELETE',
url: `/dictionary`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/dictionary/page`
},
update: {
method: 'PUT',
url: `/dictionary`
},
save: {
method: 'POST',
url: `/dictionary`
},
delete: {
method: 'DELETE',
url: `/dictionary`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
}
}
+88 -88
View File
@@ -1,88 +1,88 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/dictionaryItem/page`
},
update: {
method: 'PUT',
url: `/dictionaryItem`
},
save: {
method: 'POST',
url: `/dictionaryItem`
},
delete: {
method: 'DELETE',
url: `/dictionaryItem`
},
list: {
method: 'GET',
url: `/dictionaryItem/codes`
},
preview: {
method: 'POST',
url: `/dictionaryItem/preview`
},
export: {
method: 'POST',
url: `/dictionaryItem/export`
},
import: {
method: 'POST',
url: `/dictionaryItem/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
list (data) {
return axiosApi({
...apiList.list,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/dictionaryItem/page`
},
update: {
method: 'PUT',
url: `/dictionaryItem`
},
save: {
method: 'POST',
url: `/dictionaryItem`
},
delete: {
method: 'DELETE',
url: `/dictionaryItem`
},
list: {
method: 'GET',
url: `/dictionaryItem/codes`
},
preview: {
method: 'POST',
url: `/dictionaryItem/preview`
},
export: {
method: 'POST',
url: `/dictionaryItem/export`
},
import: {
method: 'POST',
url: `/dictionaryItem/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
list (data) {
return axiosApi({
...apiList.list,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+66 -66
View File
@@ -1,66 +1,66 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getCashList: `/cashOutDetail/page/audit`,
getDetail: '/cashOutDetail/audit/',
audiCash: '/cashOutDetail/audit',
getDepositList: `/depositJournal/page`, // 保证金列表
getDepositSum: `/depositJournal/summary`, // 保证金总金额
getDayList: `/journalDetail/platform-finance-page`,
getSummary: `/journalDetail/platform-finance-summary`
}
export default {
// 提现审核列表
getCashList(data) {
return axiosApi({
method: 'POST',
url: apiList.getCashList,
data
})
},
// 查询提现审核
getDetail(id) {
return axiosApi({
method: 'GET',
url: apiList.getDetail + id
})
},
// 提现审核
audiCash(data) {
return axiosApi({
method: 'POST',
url: apiList.audiCash,
data
})
},
// 保证金列表
getDepositList(data) {
return axiosApi({
method: 'POST',
url: apiList.getDepositList,
data
})
},
// 保证金总金额
getDepositSum() {
return axiosApi({
method: 'POST',
url: apiList.getDepositSum
})
},
// 平台流水列表
getDayList(data) {
return axiosApi({
method: 'POST',
url: apiList.getDayList,
data
})
},
// 平台财务统计
getSummary() {
return axiosApi({
method: 'POST',
url: apiList.getSummary
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getCashList: `/cashOutDetail/page/audit`,
getDetail: '/cashOutDetail/audit/',
audiCash: '/cashOutDetail/audit',
getDepositList: `/depositJournal/page`, // 保证金列表
getDepositSum: `/depositJournal/summary`, // 保证金总金额
getDayList: `/journalDetail/platform-finance-page`,
getSummary: `/journalDetail/platform-finance-summary`
}
export default {
// 提现审核列表
getCashList(data) {
return axiosApi({
method: 'POST',
url: apiList.getCashList,
data
})
},
// 查询提现审核
getDetail(id) {
return axiosApi({
method: 'GET',
url: apiList.getDetail + id
})
},
// 提现审核
audiCash(data) {
return axiosApi({
method: 'POST',
url: apiList.audiCash,
data
})
},
// 保证金列表
getDepositList(data) {
return axiosApi({
method: 'POST',
url: apiList.getDepositList,
data
})
},
// 保证金总金额
getDepositSum() {
return axiosApi({
method: 'POST',
url: apiList.getDepositSum
})
},
// 平台流水列表
getDayList(data) {
return axiosApi({
method: 'POST',
url: apiList.getDayList,
data
})
},
// 平台财务统计
getSummary() {
return axiosApi({
method: 'POST',
url: apiList.getSummary
})
}
}
+89 -89
View File
@@ -1,89 +1,89 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/globalUser/page`,
method: 'POST'
},
save: {
method: 'POST',
url: `/globalUser`
},
update: {
method: 'PUT',
url: `/globalUser`
},
remove: {
method: 'DELETE',
url: `/globalUser/delete`
},
check: {
method: 'GET',
url: `/globalUser/check`
},
preview: {
method: 'POST',
url: `/globalUser/preview`
},
export: {
method: 'POST',
url: `/globalUser/export`
},
import: {
method: 'POST',
url: `/globalUser/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data: data || {}
})
},
update (data) {
return axiosApi({
...apiList.update,
data: data || {}
})
},
remove (data) {
return axiosApi({
...apiList.remove,
data: data || {}
})
},
check (data) {
return axiosApi({
...apiList.check,
formData: true,
data: data || {}
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/globalUser/page`,
method: 'POST'
},
save: {
method: 'POST',
url: `/globalUser`
},
update: {
method: 'PUT',
url: `/globalUser`
},
remove: {
method: 'DELETE',
url: `/globalUser/delete`
},
check: {
method: 'GET',
url: `/globalUser/check`
},
preview: {
method: 'POST',
url: `/globalUser/preview`
},
export: {
method: 'POST',
url: `/globalUser/export`
},
import: {
method: 'POST',
url: `/globalUser/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data: data || {}
})
},
update (data) {
return axiosApi({
...apiList.update,
data: data || {}
})
},
remove (data) {
return axiosApi({
...apiList.remove,
data: data || {}
})
},
check (data) {
return axiosApi({
...apiList.check,
formData: true,
data: data || {}
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+84 -84
View File
@@ -1,84 +1,84 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getGroupList: `/productGroup/page`,
productGroup: `/productGroup`,
deleteGroup: `/productGroup/delProductCategory`,
getProductList: `/product/findAdminProductList`,
findCategoryList: '/productCategory/findCategoryListByDepth/',
saveProduct: '/product/save',
findAdminProductList: '/platformProduct/findAdminProductList',
findGoods: '/platformProduct/findProductListByCategoryOrProductIdList',
queryAllCategory: '/productCategory/queryAllCategory'
}
export default {
queryAllCategory() {
return axiosApi({
method: 'POST',
url: apiList.queryAllCategory
})
},
findGoods(data) {
return axiosApi({
method: 'POST',
url: apiList.findGoods,
data
})
},
findAdminProductList(data) {
return axiosApi({
method: 'POST',
url: apiList.findAdminProductList,
data
})
},
saveProduct(data) {
return axiosApi({
method: 'POST',
url: apiList.saveProduct,
data
})
},
findCategoryList(depth) {
return axiosApi({
method: 'GET',
url: apiList.findCategoryList + depth
})
},
getProductList(data) {
return axiosApi({
method: 'POST',
url: apiList.getProductList,
data
})
},
getGroupList(data) {
return axiosApi({
method: 'POST',
url: apiList.getGroupList,
data
})
},
addGroup(data) {
return axiosApi({
method: 'POST',
url: apiList.productGroup,
data
})
},
eidtGroup(data) {
return axiosApi({
method: 'PUT',
url: apiList.productGroup,
data
})
},
deleteGroup(data) {
return axiosApi({
method: 'POST',
url: apiList.deleteGroup,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getGroupList: `/productGroup/page`,
productGroup: `/productGroup`,
deleteGroup: `/productGroup/delProductCategory`,
getProductList: `/product/findAdminProductList`,
findCategoryList: '/productCategory/findCategoryListByDepth/',
saveProduct: '/product/save',
findAdminProductList: '/platformProduct/findAdminProductList',
findGoods: '/platformProduct/findProductListByCategoryOrProductIdList',
queryAllCategory: '/productCategory/queryAllCategory'
}
export default {
queryAllCategory() {
return axiosApi({
method: 'POST',
url: apiList.queryAllCategory
})
},
findGoods(data) {
return axiosApi({
method: 'POST',
url: apiList.findGoods,
data
})
},
findAdminProductList(data) {
return axiosApi({
method: 'POST',
url: apiList.findAdminProductList,
data
})
},
saveProduct(data) {
return axiosApi({
method: 'POST',
url: apiList.saveProduct,
data
})
},
findCategoryList(depth) {
return axiosApi({
method: 'GET',
url: apiList.findCategoryList + depth
})
},
getProductList(data) {
return axiosApi({
method: 'POST',
url: apiList.getProductList,
data
})
},
getGroupList(data) {
return axiosApi({
method: 'POST',
url: apiList.getGroupList,
data
})
},
addGroup(data) {
return axiosApi({
method: 'POST',
url: apiList.productGroup,
data
})
},
eidtGroup(data) {
return axiosApi({
method: 'PUT',
url: apiList.productGroup,
data
})
},
deleteGroup(data) {
return axiosApi({
method: 'POST',
url: apiList.deleteGroup,
data
})
}
}
+96 -96
View File
@@ -1,96 +1,96 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/store/information/page`,
},
query: {
method: 'POST',
url: `/store/information/query`,
},
update: {
method: 'PUT',
url: `/store/information`
},
save: {
method: 'POST',
url: `/store/information`
},
delete: {
method: 'DELETE',
url: `/store/information`
},
export: {
method: 'POST',
url: `/store/information/export`
},
preview: {
method: 'POST',
url: `/store/information/preview`
},
import: {
method: 'POST',
url: `/store/information/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/store/information/page`,
},
query: {
method: 'POST',
url: `/store/information/query`,
},
update: {
method: 'PUT',
url: `/store/information`
},
save: {
method: 'POST',
url: `/store/information`
},
delete: {
method: 'DELETE',
url: `/store/information`
},
export: {
method: 'POST',
url: `/store/information/export`
},
preview: {
method: 'POST',
url: `/store/information/preview`
},
import: {
method: 'POST',
url: `/store/information/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
+67 -67
View File
@@ -1,67 +1,67 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getLabelList: `/memberTag/page`,
addLabel: `/memberTag`,
queryTag: `/memberTag/queryTag/`,
deleteTag: `/memberTag`,
editTag: `/memberTag`,
exportTag: `/memberTag/export`,
getTagInfo: `/memberTag/`
}
export default {
// 标签列表
getLabelList(data) {
return axiosApi({
method: 'POST',
url: apiList.getLabelList,
data
})
},
// 新建标签
addLabel(data) {
return axiosApi({
method: 'POST',
url: apiList.addLabel,
data
})
},
// 查询客户标签
queryTag(id) {
return axiosApi({
method: 'GET',
url: `${apiList.queryTag}${id}`
})
},
// 删除标签
deleteTag(data) {
return axiosApi({
method: 'DELETE',
url: apiList.deleteTag,
data
})
},
// 修改标签
editTag(data) {
return axiosApi({
method: 'PUT',
url: apiList.editTag,
data
})
},
// 导出标签
exportTag(data) {
return axiosApi({
method: 'POST',
url: apiList.exportTag,
data
})
},
// 查询标签详情
getTagInfo(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getTagInfo}${id}`
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getLabelList: `/memberTag/page`,
addLabel: `/memberTag`,
queryTag: `/memberTag/queryTag/`,
deleteTag: `/memberTag`,
editTag: `/memberTag`,
exportTag: `/memberTag/export`,
getTagInfo: `/memberTag/`
}
export default {
// 标签列表
getLabelList(data) {
return axiosApi({
method: 'POST',
url: apiList.getLabelList,
data
})
},
// 新建标签
addLabel(data) {
return axiosApi({
method: 'POST',
url: apiList.addLabel,
data
})
},
// 查询客户标签
queryTag(id) {
return axiosApi({
method: 'GET',
url: `${apiList.queryTag}${id}`
})
},
// 删除标签
deleteTag(data) {
return axiosApi({
method: 'DELETE',
url: apiList.deleteTag,
data
})
},
// 修改标签
editTag(data) {
return axiosApi({
method: 'PUT',
url: apiList.editTag,
data
})
},
// 导出标签
exportTag(data) {
return axiosApi({
method: 'POST',
url: apiList.exportTag,
data
})
},
// 查询标签详情
getTagInfo(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getTagInfo}${id}`
})
}
}
+34 -34
View File
@@ -1,34 +1,34 @@
import axiosApi from './AxiosApi.js'
const apiList = {
captcha: `/anno/captcha`,
login: `/anno/admin/login`,
router: `/menu/admin/router`
}
export default {
getCaptcha (randomId) {
return axiosApi({
method: 'GET',
url: apiList.captcha + `?key=${randomId}`,
responseType: 'arraybuffer',
meta: {
"X-isToken": false
}
})
},
login (data) {
return axiosApi({
method: 'POST',
url: apiList.login,
data
})
},
getRouter (data) {
return axiosApi({
method: 'GET',
url: apiList.router,
data: data || {}
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
captcha: `/anno/captcha`,
login: `/anno/admin/login`,
router: `/menu/admin/router`
}
export default {
getCaptcha (randomId) {
return axiosApi({
method: 'GET',
url: apiList.captcha + `?key=${randomId}`,
responseType: 'arraybuffer',
meta: {
"X-isToken": false
}
})
},
login (data) {
return axiosApi({
method: 'POST',
url: apiList.login,
data
})
},
getRouter (data) {
return axiosApi({
method: 'GET',
url: apiList.router,
data: data || {}
})
}
}
+58 -58
View File
@@ -1,58 +1,58 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/loginLog/page`
},
delete: {
method: 'DELETE',
url: `/loginLog`
},
clear: {
method: 'DELETE',
url: `/loginLog/clear`
},
preview: {
method: 'POST',
url: `/loginLog/preview`
},
export: {
method: 'POST',
url: `/loginLog/export`
}
}
export default {
page(data) {
return axiosApi({
...apiList.page,
data
})
},
delete(data) {
return axiosApi({
...apiList.delete,
data
})
},
clear(data) {
return axiosApi({
...apiList.clear,
data
})
},
preview(data) {
return axiosApi({
...apiList.preview,
data
})
},
export(data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/loginLog/page`
},
delete: {
method: 'DELETE',
url: `/loginLog`
},
clear: {
method: 'DELETE',
url: `/loginLog/clear`
},
preview: {
method: 'POST',
url: `/loginLog/preview`
},
export: {
method: 'POST',
url: `/loginLog/export`
}
}
export default {
page(data) {
return axiosApi({
...apiList.page,
data
})
},
delete(data) {
return axiosApi({
...apiList.delete,
data
})
},
clear(data) {
return axiosApi({
...apiList.clear,
data
})
},
preview(data) {
return axiosApi({
...apiList.preview,
data
})
},
export(data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
}
}
+36 -36
View File
@@ -1,36 +1,36 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getTenants: `/tenant/page`,
addTenant: `/tenant`,
editTenant: `/tenant`
}
export default {
getAllTenant(data) {
return axiosApi({
method: 'POST',
url: apiList.getTenants,
data
})
},
addTenant(data) {
return axiosApi({
method: 'POST',
url: apiList.addTenant,
data
})
},
editTenant(data) {
return axiosApi({
method: 'PUT',
url: apiList.editTenant,
data
})
},
fixRole(tenantCode) {
return axiosApi({
method: 'GET',
url: `/resource/fixRole/${tenantCode}`
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getTenants: `/tenant/page`,
addTenant: `/tenant`,
editTenant: `/tenant`
}
export default {
getAllTenant(data) {
return axiosApi({
method: 'POST',
url: apiList.getTenants,
data
})
},
addTenant(data) {
return axiosApi({
method: 'POST',
url: apiList.addTenant,
data
})
},
editTenant(data) {
return axiosApi({
method: 'PUT',
url: apiList.editTenant,
data
})
},
fixRole(tenantCode) {
return axiosApi({
method: 'GET',
url: `/resource/fixRole/${tenantCode}`
})
}
}
+115 -115
View File
@@ -1,115 +1,115 @@
import axiosApi from './AxiosApi.js'
const apiList = {
addPromotion: `/promotion/addPromotion`,
getList: `/promotion/findAdminPromotionList`,
getDetails: `/promotion/query`,
delPromotion: `/promotion/delete`,
updatePromotion: `/promotion/updatePromotion`,
finishPromotion: `/promotion/end`,
applyShop: `/promotionApplyInfo/page`, // 参入店铺
auditLog: `/promotionAuditLog/query`,
getGoodList: `/product/findAdminProductListByIds`,
auditPromotion: `/promotionApplyInfo/auditPromotion`,
closeApplyInfo: `/promotionApplyInfo/closeApplyInfo`,
getDetail: `/promotionStat/detail`,
findTenantStatDetail: `/promotionStat/findTenantStatDetail`
}
export default {
addPromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.addPromotion,
data
})
},
getList(data) {
return axiosApi({
method: 'POST',
url: apiList.getList,
data
})
},
getDetails(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getDetails}/${id}`
})
},
delPromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.delPromotion,
data
})
},
updatePromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.updatePromotion,
data
})
},
finishPromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.finishPromotion,
data
})
},
// 参与店铺
applyShop(data) {
return axiosApi({
method: 'POST',
url: apiList.applyShop,
data
})
},
// 审核记录
auditLog(data) {
return axiosApi({
method: 'POST',
url: apiList.auditLog,
data
})
},
// 查看商品
getGoodList(data) {
return axiosApi({
method: 'POST',
url: apiList.getGoodList,
data
})
},
// 报名审核
auditPromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.auditPromotion,
data
})
},
// 清退报名
closeApplyInfo(data) {
return axiosApi({
method: 'POST',
url: apiList.closeApplyInfo,
data
})
},
/** 活动数据 */
getDetail(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getDetail}/${id}`
})
},
// 商家数据明细
findTenantStatDetail(data) {
return axiosApi({
method: 'GET',
url: apiList.findTenantStatDetail,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
addPromotion: `/promotion/addPromotion`,
getList: `/promotion/findAdminPromotionList`,
getDetails: `/promotion/query`,
delPromotion: `/promotion/delete`,
updatePromotion: `/promotion/updatePromotion`,
finishPromotion: `/promotion/end`,
applyShop: `/promotionApplyInfo/page`, // 参入店铺
auditLog: `/promotionAuditLog/query`,
getGoodList: `/product/findAdminProductListByIds`,
auditPromotion: `/promotionApplyInfo/auditPromotion`,
closeApplyInfo: `/promotionApplyInfo/closeApplyInfo`,
getDetail: `/promotionStat/detail`,
findTenantStatDetail: `/promotionStat/findTenantStatDetail`
}
export default {
addPromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.addPromotion,
data
})
},
getList(data) {
return axiosApi({
method: 'POST',
url: apiList.getList,
data
})
},
getDetails(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getDetails}/${id}`
})
},
delPromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.delPromotion,
data
})
},
updatePromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.updatePromotion,
data
})
},
finishPromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.finishPromotion,
data
})
},
// 参与店铺
applyShop(data) {
return axiosApi({
method: 'POST',
url: apiList.applyShop,
data
})
},
// 审核记录
auditLog(data) {
return axiosApi({
method: 'POST',
url: apiList.auditLog,
data
})
},
// 查看商品
getGoodList(data) {
return axiosApi({
method: 'POST',
url: apiList.getGoodList,
data
})
},
// 报名审核
auditPromotion(data) {
return axiosApi({
method: 'POST',
url: apiList.auditPromotion,
data
})
},
// 清退报名
closeApplyInfo(data) {
return axiosApi({
method: 'POST',
url: apiList.closeApplyInfo,
data
})
},
/** 活动数据 */
getDetail(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getDetail}/${id}`
})
},
// 商家数据明细
findTenantStatDetail(data) {
return axiosApi({
method: 'GET',
url: apiList.findTenantStatDetail,
data
})
}
}
+95 -95
View File
@@ -1,95 +1,95 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getMemberList: `/member/adminPage`,
addTag: `/member/addTag`,
forbiddenMember: `/member/forbidden`,
getMemberInfo: `/member/query/`,
getMemberAddress: `/memberAddress/page`,
getOrderList: `/order/findAdminOrderList`,
getCustomData: `/order/getOrderStatisticsByMid/`,
getCommentList: `/comment/findCommentList`,
getMemberBillDetials: `/member/getMemberBillDetials`,
editMemberBill: `/member/editMemberBill`
}
export default {
// 平台会员余额修改
editMemberBill(data) {
return axiosApi({
method: 'POST',
url: apiList.editMemberBill,
data
})
},
// 平台会员余额明细
getMemberBillDetials(data) {
return axiosApi({
method: 'POST',
url: apiList.getMemberBillDetials,
data
})
},
// 客户管理列表
getMemberList(data) {
return axiosApi({
method: 'POST',
url: apiList.getMemberList,
data
})
},
// 打标签
addTag(data) {
return axiosApi({
method: 'POST',
url: apiList.addTag,
data
})
},
// 加黑名单
forbiddenMember(data) {
return axiosApi({
method: 'POST',
url: apiList.forbiddenMember,
data
})
},
// 客户详情
getMemberInfo(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getMemberInfo}${id}`
})
},
// 客户消费数据
getCustomData(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getCustomData}${id}`
})
},
// 会员订单
getOrderList(data) {
return axiosApi({
method: 'POST',
url: apiList.getOrderList,
data
})
},
// 客户评价列表
getCommentList(data) {
return axiosApi({
method: 'POST',
url: apiList.getCommentList,
data
})
},
// 会员收货地址
getMemberAddress(data) {
return axiosApi({
method: 'POST',
url: apiList.getMemberAddress,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getMemberList: `/member/adminPage`,
addTag: `/member/addTag`,
forbiddenMember: `/member/forbidden`,
getMemberInfo: `/member/query/`,
getMemberAddress: `/memberAddress/page`,
getOrderList: `/order/findAdminOrderList`,
getCustomData: `/order/getOrderStatisticsByMid/`,
getCommentList: `/comment/findCommentList`,
getMemberBillDetials: `/member/getMemberBillDetials`,
editMemberBill: `/member/editMemberBill`
}
export default {
// 平台会员余额修改
editMemberBill(data) {
return axiosApi({
method: 'POST',
url: apiList.editMemberBill,
data
})
},
// 平台会员余额明细
getMemberBillDetials(data) {
return axiosApi({
method: 'POST',
url: apiList.getMemberBillDetials,
data
})
},
// 客户管理列表
getMemberList(data) {
return axiosApi({
method: 'POST',
url: apiList.getMemberList,
data
})
},
// 打标签
addTag(data) {
return axiosApi({
method: 'POST',
url: apiList.addTag,
data
})
},
// 加黑名单
forbiddenMember(data) {
return axiosApi({
method: 'POST',
url: apiList.forbiddenMember,
data
})
},
// 客户详情
getMemberInfo(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getMemberInfo}${id}`
})
},
// 客户消费数据
getCustomData(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getCustomData}${id}`
})
},
// 会员订单
getOrderList(data) {
return axiosApi({
method: 'POST',
url: apiList.getOrderList,
data
})
},
// 客户评价列表
getCommentList(data) {
return axiosApi({
method: 'POST',
url: apiList.getCommentList,
data
})
},
// 会员收货地址
getMemberAddress(data) {
return axiosApi({
method: 'POST',
url: apiList.getMemberAddress,
data
})
}
}
+39 -39
View File
@@ -1,39 +1,39 @@
import axiosApi from './AxiosApi.js'
const apiList = {
getPlatformMenu: `/menu/tree`,
getAllMerchanMenu: `/menu/getAllTenantMenu`,
getSpecialMerchantMenu: `/menu/getSpecifiedTenantMenu`,
saveMenu: `/menu/syncMenu`
}
export default {
// 平台所有菜单
getPlatformMenu() {
return axiosApi({
method: 'GET',
url: apiList.getPlatformMenu
})
},
// 查询所有商家菜单
getAllMerchanMenu() {
return axiosApi({
method: 'GET',
url: apiList.getAllMerchanMenu
})
},
// 查询指定商家菜单
getSpecialMerchantMenu(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getSpecialMerchantMenu}/${id}`
})
},
// 同步菜单
saveMenu(data) {
return axiosApi({
method: 'POST',
url: apiList.saveMenu,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
getPlatformMenu: `/menu/tree`,
getAllMerchanMenu: `/menu/getAllTenantMenu`,
getSpecialMerchantMenu: `/menu/getSpecifiedTenantMenu`,
saveMenu: `/menu/syncMenu`
}
export default {
// 平台所有菜单
getPlatformMenu() {
return axiosApi({
method: 'GET',
url: apiList.getPlatformMenu
})
},
// 查询所有商家菜单
getAllMerchanMenu() {
return axiosApi({
method: 'GET',
url: apiList.getAllMerchanMenu
})
},
// 查询指定商家菜单
getSpecialMerchantMenu(id) {
return axiosApi({
method: 'GET',
url: `${apiList.getSpecialMerchantMenu}/${id}`
})
},
// 同步菜单
saveMenu(data) {
return axiosApi({
method: 'POST',
url: apiList.saveMenu,
data
})
}
}
+47 -47
View File
@@ -1,47 +1,47 @@
import axiosApi from './AxiosApi.js'
const apiList = {
allTree: {
method: 'GET',
url: `/menu/tree`
},
save: {
method: 'POST',
url: `/menu`
},
update: {
method: 'PUT',
url: `/menu`
},
delete: {
method: 'DELETE',
url: `/menu`
}
}
export default {
allTree (data) {
return axiosApi({
...apiList.allTree,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
allTree: {
method: 'GET',
url: `/menu/tree`
},
save: {
method: 'POST',
url: `/menu`
},
update: {
method: 'PUT',
url: `/menu`
},
delete: {
method: 'DELETE',
url: `/menu`
}
}
export default {
allTree (data) {
return axiosApi({
...apiList.allTree,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
}
}
+85 -85
View File
@@ -1,85 +1,85 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/msgsCenterInfo/page`,
method: 'POST'
},
mark: {
url: `/msgsCenterInfo/mark`,
method: 'GET'
},
save: {
url: `/msgsCenterInfo`,
method: 'POST'
},
delete: {
url: `/msgsCenterInfo`,
method: 'DELETE'
},
preview: {
method: 'POST',
url: `/msgsCenterInfo/preview`
},
export: {
method: 'POST',
url: `/msgsCenterInfo/export`
},
import: {
method: 'POST',
url: `/msgsCenterInfo/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
mark (data) {
return axiosApi({
...apiList.mark,
data
})
},
get (id) {
return axiosApi({
url: `/msgsCenterInfo/${id}`,
method: 'GET'
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/msgsCenterInfo/page`,
method: 'POST'
},
mark: {
url: `/msgsCenterInfo/mark`,
method: 'GET'
},
save: {
url: `/msgsCenterInfo`,
method: 'POST'
},
delete: {
url: `/msgsCenterInfo`,
method: 'DELETE'
},
preview: {
method: 'POST',
url: `/msgsCenterInfo/preview`
},
export: {
method: 'POST',
url: `/msgsCenterInfo/export`
},
import: {
method: 'POST',
url: `/msgsCenterInfo/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
mark (data) {
return axiosApi({
...apiList.mark,
data
})
},
get (id) {
return axiosApi({
url: `/msgsCenterInfo/${id}`,
method: 'GET'
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+68 -68
View File
@@ -1,68 +1,68 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/optLog/page`
},
delete: {
method: 'DELETE',
url: `/optLog`
},
clear: {
method: 'DELETE',
url: `/optLog/clear`
},
preview: {
method: 'POST',
url: `/optLog/preview`
},
export: {
method: 'POST',
url: `/optLog/export`
},
import: {
method: 'POST',
url: `/optLog/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
clear (data) {
return axiosApi({
...apiList.clear,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/optLog/page`
},
delete: {
method: 'DELETE',
url: `/optLog`
},
clear: {
method: 'DELETE',
url: `/optLog/clear`
},
preview: {
method: 'POST',
url: `/optLog/preview`
},
export: {
method: 'POST',
url: `/optLog/export`
},
import: {
method: 'POST',
url: `/optLog/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
clear (data) {
return axiosApi({
...apiList.clear,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+78 -78
View File
@@ -1,78 +1,78 @@
import axiosApi from './AxiosApi.js'
const apiList = {
allTree: {
method: 'GET',
url: `/org/tree`
},
save: {
method: 'POST',
url: `/org`
},
update: {
method: 'PUT',
url: `/org`
},
delete: {
method: 'DELETE',
url: `/org`
},
preview: {
method: 'POST',
url: `/org/preview`
},
export: {
method: 'POST',
url: `/org/export`
},
import: {
method: 'POST',
url: `/org/import`
}
}
export default {
allTree (data) {
return axiosApi({
...apiList.allTree,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
allTree: {
method: 'GET',
url: `/org/tree`
},
save: {
method: 'POST',
url: `/org`
},
update: {
method: 'PUT',
url: `/org`
},
delete: {
method: 'DELETE',
url: `/org`
},
preview: {
method: 'POST',
url: `/org/preview`
},
export: {
method: 'POST',
url: `/org/export`
},
import: {
method: 'POST',
url: `/org/import`
}
}
export default {
allTree (data) {
return axiosApi({
...apiList.allTree,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+79 -79
View File
@@ -1,79 +1,79 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/parameter/page`
},
update: {
method: 'PUT',
url: `/parameter`
},
save: {
method: 'POST',
url: `/parameter`
},
delete: {
method: 'DELETE',
url: `/parameter`
},
preview: {
method: 'POST',
url: `/parameter/preview`
},
export: {
method: 'POST',
url: `/parameter/export`
},
import: {
method: 'POST',
url: `/parameter/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/parameter/page`
},
update: {
method: 'PUT',
url: `/parameter`
},
save: {
method: 'POST',
url: `/parameter`
},
delete: {
method: 'DELETE',
url: `/parameter`
},
preview: {
method: 'POST',
url: `/parameter/preview`
},
export: {
method: 'POST',
url: `/parameter/export`
},
import: {
method: 'POST',
url: `/parameter/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+47 -47
View File
@@ -1,47 +1,47 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/resource/page`
},
save: {
method: 'POST',
url: `/resource`
},
update: {
method: 'PUT',
url: `/resource`
},
delete: {
method: 'DELETE',
url: `/resource`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/resource/page`
},
save: {
method: 'POST',
url: `/resource`
},
update: {
method: 'PUT',
url: `/resource`
},
delete: {
method: 'DELETE',
url: `/resource`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
}
}
+129 -129
View File
@@ -1,129 +1,129 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/role/page`,
method: 'POST'
},
save: {
url: `/role`,
method: 'POST'
},
update: {
url: `/role`,
method: 'PUT'
},
delete: {
url: `/role`,
method: 'DELETE'
},
saveUserRole: {
url: `/role/user`,
method: 'POST'
},
saveRoleAuthority: {
url: `/role/authority`,
method: 'POST'
},
preview: {
method: 'POST',
url: `/user/preview`
},
export: {
method: 'POST',
url: `/user/export`
},
import: {
method: 'POST',
url: `/role/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
// formData: true,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
get (id) {
return axiosApi({
url: `/role/${id}`,
method: 'GET'
})
},
getDetails (id) {
return axiosApi({
url: `/role/details/${id}`,
method: 'GET'
})
},
check (code) {
return axiosApi({
url: `/role/check/${code}`,
method: 'GET'
})
},
saveUserRole (data) {
return axiosApi({
...apiList.saveUserRole,
data
})
},
findUserIdByRoleId (roleId) {
return axiosApi({
url: `/role/user/${roleId}`,
method: 'GET'
})
},
findAuthorityIdByRoleId (roleId) {
return axiosApi({
url: `/role/authority/${roleId}`,
method: 'GET'
})
},
saveRoleAuthority (data) {
return axiosApi({
...apiList.saveRoleAuthority,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/role/page`,
method: 'POST'
},
save: {
url: `/role`,
method: 'POST'
},
update: {
url: `/role`,
method: 'PUT'
},
delete: {
url: `/role`,
method: 'DELETE'
},
saveUserRole: {
url: `/role/user`,
method: 'POST'
},
saveRoleAuthority: {
url: `/role/authority`,
method: 'POST'
},
preview: {
method: 'POST',
url: `/user/preview`
},
export: {
method: 'POST',
url: `/user/export`
},
import: {
method: 'POST',
url: `/role/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
// formData: true,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
get (id) {
return axiosApi({
url: `/role/${id}`,
method: 'GET'
})
},
getDetails (id) {
return axiosApi({
url: `/role/details/${id}`,
method: 'GET'
})
},
check (code) {
return axiosApi({
url: `/role/check/${code}`,
method: 'GET'
})
},
saveUserRole (data) {
return axiosApi({
...apiList.saveUserRole,
data
})
},
findUserIdByRoleId (roleId) {
return axiosApi({
url: `/role/user/${roleId}`,
method: 'GET'
})
},
findAuthorityIdByRoleId (roleId) {
return axiosApi({
url: `/role/authority/${roleId}`,
method: 'GET'
})
},
saveRoleAuthority (data) {
return axiosApi({
...apiList.saveRoleAuthority,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+17 -17
View File
@@ -1,17 +1,17 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/smsSendStatus/page`,
method: 'POST'
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/smsSendStatus/page`,
method: 'POST'
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
}
}
+84 -84
View File
@@ -1,84 +1,84 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/smsTask/page`,
method: 'POST'
},
save: {
url: `/smsTask`,
method: 'POST'
},
update: {
url: `/smsTask`,
method: 'PUT'
},
delete: {
url: `/smsTask`,
method: 'DELETE'
},
preview: {
method: 'POST',
url: `/smsTask/preview`
},
export: {
method: 'POST',
url: `/smsTask/export`
},
import: {
method: 'POST',
url: `/smsTask/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
get (id) {
return axiosApi({
url: `/smsTask/${id}`,
method: 'GET'
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/smsTask/page`,
method: 'POST'
},
save: {
url: `/smsTask`,
method: 'POST'
},
update: {
url: `/smsTask`,
method: 'PUT'
},
delete: {
url: `/smsTask`,
method: 'DELETE'
},
preview: {
method: 'POST',
url: `/smsTask/preview`
},
export: {
method: 'POST',
url: `/smsTask/export`
},
import: {
method: 'POST',
url: `/smsTask/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
get (id) {
return axiosApi({
url: `/smsTask/${id}`,
method: 'GET'
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+89 -89
View File
@@ -1,89 +1,89 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/smsTemplate/page`,
method: 'POST'
},
save: {
url: `/smsTemplate`,
method: 'POST'
},
update: {
url: `/smsTemplate`,
method: 'PUT'
},
delete: {
url: `/smsTemplate`,
method: 'DELETE'
},
check: {
url: `/smsTemplate/check`,
method: 'GET'
},
preview: {
method: 'POST',
url: `/smsTemplate/preview`
},
export: {
method: 'POST',
url: `/smsTemplate/export`
},
import: {
method: 'POST',
url: `/smsTemplate/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
check (customCode) {
const data = { customCode: customCode }
return axiosApi({
...apiList.check,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/smsTemplate/page`,
method: 'POST'
},
save: {
url: `/smsTemplate`,
method: 'POST'
},
update: {
url: `/smsTemplate`,
method: 'PUT'
},
delete: {
url: `/smsTemplate`,
method: 'DELETE'
},
check: {
url: `/smsTemplate/check`,
method: 'GET'
},
preview: {
method: 'POST',
url: `/smsTemplate/preview`
},
export: {
method: 'POST',
url: `/smsTemplate/export`
},
import: {
method: 'POST',
url: `/smsTemplate/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
check (customCode) {
const data = { customCode: customCode }
return axiosApi({
...apiList.check,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+78 -78
View File
@@ -1,78 +1,78 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/station/page`,
method: 'POST'
},
save: {
url: `/station`,
method: 'POST'
},
update: {
url: `/station`,
method: 'PUT'
},
delete: {
url: `/station`,
method: 'DELETE'
},
preview: {
method: 'POST',
url: `/station/preview`
},
export: {
method: 'POST',
url: `/station/export`
},
import: {
method: 'POST',
url: `/station/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
url: `/station/page`,
method: 'POST'
},
save: {
url: `/station`,
method: 'POST'
},
update: {
url: `/station`,
method: 'PUT'
},
delete: {
url: `/station`,
method: 'DELETE'
},
preview: {
method: 'POST',
url: `/station/preview`
},
export: {
method: 'POST',
url: `/station/export`
},
import: {
method: 'POST',
url: `/station/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+84 -84
View File
@@ -1,84 +1,84 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/systemApi/page`
},
update: {
method: 'PUT',
url: `/systemApi`
},
save: {
method: 'POST',
url: `/systemApi`
},
delete: {
method: 'DELETE',
url: `/systemApi`
},
preview: {
method: 'POST',
url: `/systemApi/preview`
},
export: {
method: 'POST',
url: `/systemApi/export`
},
import: {
method: 'POST',
url: `/systemApi/import`
}
}
export default {
page(data) {
return axiosApi({
...apiList.page,
data
})
},
scan(serviceId) {
return axiosApi({
method: 'GET',
url: `/${serviceId}/systemApiScan`
})
},
save(data) {
return axiosApi({
...apiList.save,
data
})
},
update(data) {
return axiosApi({
...apiList.update,
data
})
},
delete(data) {
return axiosApi({
...apiList.delete,
data
})
},
preview(data) {
return axiosApi({
...apiList.preview,
data
})
},
export(data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import(data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/systemApi/page`
},
update: {
method: 'PUT',
url: `/systemApi`
},
save: {
method: 'POST',
url: `/systemApi`
},
delete: {
method: 'DELETE',
url: `/systemApi`
},
preview: {
method: 'POST',
url: `/systemApi/preview`
},
export: {
method: 'POST',
url: `/systemApi/export`
},
import: {
method: 'POST',
url: `/systemApi/import`
}
}
export default {
page(data) {
return axiosApi({
...apiList.page,
data
})
},
scan(serviceId) {
return axiosApi({
method: 'GET',
url: `/${serviceId}/systemApiScan`
})
},
save(data) {
return axiosApi({
...apiList.save,
data
})
},
update(data) {
return axiosApi({
...apiList.update,
data
})
},
delete(data) {
return axiosApi({
...apiList.delete,
data
})
},
preview(data) {
return axiosApi({
...apiList.preview,
data
})
},
export(data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import(data) {
return axiosApi({
...apiList.import,
data
})
}
}
+57 -57
View File
@@ -1,57 +1,57 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/tenant/page`
},
update: {
method: 'PUT',
url: `/tenant`
},
save: {
method: 'POST',
url: `/tenant`
},
saveInit: {
method: 'POST',
url: `/tenant/init`
},
remove: {
method: 'DELETE',
url: `/tenant/remove`
}
}
export default {
page(data) {
return axiosApi({
...apiList.page,
data
})
},
save(data) {
return axiosApi({
...apiList.save,
data
})
},
saveInit(data) {
return axiosApi({
...apiList.saveInit,
data
})
},
update(data) {
return axiosApi({
...apiList.update,
data
})
},
remove(data) {
return axiosApi({
...apiList.remove,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/tenant/page`
},
update: {
method: 'PUT',
url: `/tenant`
},
save: {
method: 'POST',
url: `/tenant`
},
saveInit: {
method: 'POST',
url: `/tenant/init`
},
remove: {
method: 'DELETE',
url: `/tenant/remove`
}
}
export default {
page(data) {
return axiosApi({
...apiList.page,
data
})
},
save(data) {
return axiosApi({
...apiList.save,
data
})
},
saveInit(data) {
return axiosApi({
...apiList.saveInit,
data
})
},
update(data) {
return axiosApi({
...apiList.update,
data
})
},
remove(data) {
return axiosApi({
...apiList.remove,
data
})
}
}
+105 -105
View File
@@ -1,105 +1,105 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/tenant/page`
},
update: {
method: 'PUT',
url: `/tenant`
},
save: {
method: 'POST',
url: `/tenant`
},
saveInit: {
method: 'POST',
url: `/tenant/init`
},
remove: {
method: 'DELETE',
url: `/tenant`
},
list: {
method: 'POST',
url: `/tenant/query`
},
preview: {
method: 'POST',
url: `/tenant/preview`
},
export: {
method: 'POST',
url: `/tenant/export`
},
import: {
method: 'POST',
url: `/tenant/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
// 同步创建租户,防止在切换回默认数据源时,执行其他方法
async saveInit (data) {
return axiosApi({
...apiList.saveInit,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
remove (data) {
return axiosApi({
...apiList.remove,
data
})
},
list (data) {
return axiosApi({
...apiList.list,
data
})
},
check (code) {
return axiosApi({
method: 'GET',
url: `/tenant/check/${code}`
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/tenant/page`
},
update: {
method: 'PUT',
url: `/tenant`
},
save: {
method: 'POST',
url: `/tenant`
},
saveInit: {
method: 'POST',
url: `/tenant/init`
},
remove: {
method: 'DELETE',
url: `/tenant`
},
list: {
method: 'POST',
url: `/tenant/query`
},
preview: {
method: 'POST',
url: `/tenant/preview`
},
export: {
method: 'POST',
url: `/tenant/export`
},
import: {
method: 'POST',
url: `/tenant/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
// 同步创建租户,防止在切换回默认数据源时,执行其他方法
async saveInit (data) {
return axiosApi({
...apiList.saveInit,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
remove (data) {
return axiosApi({
...apiList.remove,
data
})
},
list (data) {
return axiosApi({
...apiList.list,
data
})
},
check (code) {
return axiosApi({
method: 'GET',
url: `/tenant/check/${code}`
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+135 -135
View File
@@ -1,135 +1,135 @@
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/user/page`
},
save: {
method: 'POST',
url: `/user`
},
update: {
method: 'PUT',
url: `/user`
},
updateBaseInfo: {
method: 'PUT',
url: `/user/base`
},
avatar: {
method: 'PUT',
url: `/user/avatar`
},
delete: {
method: 'DELETE',
url: `/user`
},
reset: {
method: 'GET',
url: `/user/reset`
},
updatePassword: {
method: 'PUT',
url: `/user/password`
},
reload: {
method: 'POST',
url: `/user/reload`
},
preview: {
method: 'POST',
url: `/user/preview`
},
export: {
method: 'POST',
url: `/user/export`
},
import: {
method: 'POST',
url: `/user/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
updateBaseInfo (data) {
return axiosApi({
...apiList.updateBaseInfo,
data
})
},
updatePassword (data) {
return axiosApi({
...apiList.updatePassword,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
get (id) {
return axiosApi({
method: 'GET',
url: `/user/${id}`
})
},
reset (data) {
return axiosApi({
...apiList.reset,
data
})
},
avatar (data) {
return axiosApi({
...apiList.avatar,
data
})
},
reload (userId) {
return axiosApi({
...apiList.reload,
formData: true,
data: { userId: userId }
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
import axiosApi from './AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/user/page`
},
save: {
method: 'POST',
url: `/user`
},
update: {
method: 'PUT',
url: `/user`
},
updateBaseInfo: {
method: 'PUT',
url: `/user/base`
},
avatar: {
method: 'PUT',
url: `/user/avatar`
},
delete: {
method: 'DELETE',
url: `/user`
},
reset: {
method: 'GET',
url: `/user/reset`
},
updatePassword: {
method: 'PUT',
url: `/user/password`
},
reload: {
method: 'POST',
url: `/user/reload`
},
preview: {
method: 'POST',
url: `/user/preview`
},
export: {
method: 'POST',
url: `/user/export`
},
import: {
method: 'POST',
url: `/user/import`
}
}
export default {
page (data) {
return axiosApi({
...apiList.page,
data
})
},
save (data) {
return axiosApi({
...apiList.save,
data
})
},
update (data) {
return axiosApi({
...apiList.update,
data
})
},
updateBaseInfo (data) {
return axiosApi({
...apiList.updateBaseInfo,
data
})
},
updatePassword (data) {
return axiosApi({
...apiList.updatePassword,
data
})
},
delete (data) {
return axiosApi({
...apiList.delete,
data
})
},
get (id) {
return axiosApi({
method: 'GET',
url: `/user/${id}`
})
},
reset (data) {
return axiosApi({
...apiList.reset,
data
})
},
avatar (data) {
return axiosApi({
...apiList.avatar,
data
})
},
reload (userId) {
return axiosApi({
...apiList.reload,
formData: true,
data: { userId: userId }
})
},
preview (data) {
return axiosApi({
...apiList.preview,
data
})
},
export (data) {
return axiosApi({
...apiList.export,
responseType: "blob",
data
})
},
import (data) {
return axiosApi({
...apiList.import,
data
})
}
}
+97 -97
View File
@@ -1,97 +1,97 @@
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/creditGoods/list`,
// url: `/creditGoods/page`,
},
query: {
method: 'POST',
url: `/creditGoods/query`,
},
update: {
method: 'PUT',
url: `/creditGoods`
},
save: {
method: 'POST',
url: `/creditGoods`
},
delete: {
method: 'DELETE',
url: `/creditGoods`
},
export: {
method: 'POST',
url: `/creditGoods/export`
},
preview: {
method: 'POST',
url: `/creditGoods/preview`
},
import: {
method: 'POST',
url: `/creditGoods/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/creditGoods/list`,
// url: `/creditGoods/page`,
},
query: {
method: 'POST',
url: `/creditGoods/query`,
},
update: {
method: 'PUT',
url: `/creditGoods`
},
save: {
method: 'POST',
url: `/creditGoods`
},
delete: {
method: 'DELETE',
url: `/creditGoods`
},
export: {
method: 'POST',
url: `/creditGoods/export`
},
preview: {
method: 'POST',
url: `/creditGoods/preview`
},
import: {
method: 'POST',
url: `/creditGoods/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
+96 -96
View File
@@ -1,96 +1,96 @@
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/creditGoodsCategory/page`,
},
query: {
method: 'POST',
url: `/creditGoodsCategory/query`,
},
update: {
method: 'PUT',
url: `/creditGoodsCategory`
},
save: {
method: 'POST',
url: `/creditGoodsCategory`
},
delete: {
method: 'DELETE',
url: `/creditGoodsCategory`
},
export: {
method: 'POST',
url: `/creditGoodsCategory/export`
},
preview: {
method: 'POST',
url: `/creditGoodsCategory/preview`
},
import: {
method: 'POST',
url: `/creditGoodsCategory/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/creditGoodsCategory/page`,
},
query: {
method: 'POST',
url: `/creditGoodsCategory/query`,
},
update: {
method: 'PUT',
url: `/creditGoodsCategory`
},
save: {
method: 'POST',
url: `/creditGoodsCategory`
},
delete: {
method: 'DELETE',
url: `/creditGoodsCategory`
},
export: {
method: 'POST',
url: `/creditGoodsCategory/export`
},
preview: {
method: 'POST',
url: `/creditGoodsCategory/preview`
},
import: {
method: 'POST',
url: `/creditGoodsCategory/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
+96 -96
View File
@@ -1,96 +1,96 @@
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/store/creditGoodsImg/page`,
},
query: {
method: 'POST',
url: `/store/creditGoodsImg/query`,
},
update: {
method: 'PUT',
url: `/store/creditGoodsImg`
},
save: {
method: 'POST',
url: `/store/creditGoodsImg`
},
delete: {
method: 'DELETE',
url: `/store/creditGoodsImg`
},
export: {
method: 'POST',
url: `/store/creditGoodsImg/export`
},
preview: {
method: 'POST',
url: `/store/creditGoodsImg/preview`
},
import: {
method: 'POST',
url: `/store/creditGoodsImg/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/creditGoodsImg/page`,
},
query: {
method: 'POST',
url: `/creditGoodsImg/query`,
},
update: {
method: 'PUT',
url: `/creditGoodsImg`
},
save: {
method: 'POST',
url: `/creditGoodsImg`
},
delete: {
method: 'DELETE',
url: `/creditGoodsImg`
},
export: {
method: 'POST',
url: `/creditGoodsImg/export`
},
preview: {
method: 'POST',
url: `/creditGoodsImg/preview`
},
import: {
method: 'POST',
url: `/creditGoodsImg/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
+97 -97
View File
@@ -1,97 +1,97 @@
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/creditOrder/list`,
// url: `/creditOrder/page`,
},
query: {
method: 'POST',
url: `/creditOrder/query`,
},
update: {
method: 'PUT',
url: `/creditOrder`
},
save: {
method: 'POST',
url: `/creditOrder`
},
delete: {
method: 'DELETE',
url: `/creditOrder`
},
export: {
method: 'POST',
url: `/creditOrder/export`
},
preview: {
method: 'POST',
url: `/creditOrder/preview`
},
import: {
method: 'POST',
url: `/creditOrder/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/creditOrder/list`,
// url: `/creditOrder/page`,
},
query: {
method: 'POST',
url: `/creditOrder/query`,
},
update: {
method: 'PUT',
url: `/creditOrder`
},
save: {
method: 'POST',
url: `/creditOrder`
},
delete: {
method: 'DELETE',
url: `/creditOrder`
},
export: {
method: 'POST',
url: `/creditOrder/export`
},
preview: {
method: 'POST',
url: `/creditOrder/preview`
},
import: {
method: 'POST',
url: `/creditOrder/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
+96 -96
View File
@@ -1,96 +1,96 @@
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/store/creditOrderDelivery/page`,
},
query: {
method: 'POST',
url: `/store/creditOrderDelivery/query`,
},
update: {
method: 'PUT',
url: `/store/creditOrderDelivery`
},
save: {
method: 'POST',
url: `/store/creditOrderDelivery`
},
delete: {
method: 'DELETE',
url: `/store/creditOrderDelivery`
},
export: {
method: 'POST',
url: `/store/creditOrderDelivery/export`
},
preview: {
method: 'POST',
url: `/store/creditOrderDelivery/preview`
},
import: {
method: 'POST',
url: `/store/creditOrderDelivery/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/store/creditOrderDelivery/page`,
},
query: {
method: 'POST',
url: `/store/creditOrderDelivery/query`,
},
update: {
method: 'PUT',
url: `/store/creditOrderDelivery`
},
save: {
method: 'POST',
url: `/store/creditOrderDelivery`
},
delete: {
method: 'DELETE',
url: `/store/creditOrderDelivery`
},
export: {
method: 'POST',
url: `/store/creditOrderDelivery/export`
},
preview: {
method: 'POST',
url: `/store/creditOrderDelivery/preview`
},
import: {
method: 'POST',
url: `/store/creditOrderDelivery/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
+96 -96
View File
@@ -1,96 +1,96 @@
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/store/creditOrderDetail/page`,
},
query: {
method: 'POST',
url: `/store/creditOrderDetail/query`,
},
update: {
method: 'PUT',
url: `/store/creditOrderDetail`
},
save: {
method: 'POST',
url: `/store/creditOrderDetail`
},
delete: {
method: 'DELETE',
url: `/store/creditOrderDetail`
},
export: {
method: 'POST',
url: `/store/creditOrderDetail/export`
},
preview: {
method: 'POST',
url: `/store/creditOrderDetail/preview`
},
import: {
method: 'POST',
url: `/store/creditOrderDetail/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
import axiosApi from '../AxiosApi.js'
const apiList = {
page: {
method: 'POST',
url: `/store/creditOrderDetail/page`,
},
query: {
method: 'POST',
url: `/store/creditOrderDetail/query`,
},
update: {
method: 'PUT',
url: `/store/creditOrderDetail`
},
save: {
method: 'POST',
url: `/store/creditOrderDetail`
},
delete: {
method: 'DELETE',
url: `/store/creditOrderDetail`
},
export: {
method: 'POST',
url: `/store/creditOrderDetail/export`
},
preview: {
method: 'POST',
url: `/store/creditOrderDetail/preview`
},
import: {
method: 'POST',
url: `/store/creditOrderDetail/import`
}
}
export default {
page (data, custom = {}) {
return axiosApi({
...apiList.page,
data,
custom
})
},
query (data, custom = {}) {
return axiosApi({
...apiList.query,
data,
custom
})
},
save (data, custom = {}) {
return axiosApi({
...apiList.save,
data,
custom
})
},
update (data, custom = {}) {
return axiosApi({
...apiList.update,
data,
custom
})
},
delete (data, custom = {}) {
return axiosApi({
...apiList.delete,
data,
custom
})
},
export (data, custom = {}) {
return axiosApi({
...apiList.export,
responseType: "blob",
data,
custom
})
},
preview (data, custom = {}) {
return axiosApi({
...apiList.preview,
data,
custom
})
},
import (data, custom = {}) {
return axiosApi({
...apiList.import,
data,
custom
})
}
}
+111 -111
View File
@@ -1,111 +1,111 @@
<template>
<transition :name="transitionName">
<div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop">
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height:16px;width:16px"><path d="M12.036 15.59a1 1 0 0 1-.997.995H5.032a.996.996 0 0 1-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29a1.003 1.003 0 0 1 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" /></svg>
</div>
</transition>
</template>
<script>
export default {
name: 'BackToTop',
props: {
visibilityHeight: {
type: Number,
default: 400
},
backPosition: {
type: Number,
default: 0
},
customStyle: {
type: Object,
default: function() {
return {
right: '50px',
bottom: '50px',
width: '40px',
height: '40px',
'border-radius': '4px',
'line-height': '45px',
background: '#e7eaf1'
}
}
},
transitionName: {
type: String,
default: 'fade'
}
},
data() {
return {
visible: false,
interval: null,
isMoving: false
}
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
if (this.interval) {
clearInterval(this.interval)
}
},
methods: {
handleScroll() {
this.visible = window.pageYOffset > this.visibilityHeight
},
backToTop() {
if (this.isMoving) return
const start = window.pageYOffset
let i = 0
this.isMoving = true
this.interval = setInterval(() => {
const next = Math.floor(this.easeInOutQuad(10 * i, start, -start, 500))
if (next <= this.backPosition) {
window.scrollTo(0, this.backPosition)
clearInterval(this.interval)
this.isMoving = false
} else {
window.scrollTo(0, next)
}
i++
}, 16.7)
},
easeInOutQuad(t, b, c, d) {
if ((t /= d / 2) < 1) return c / 2 * t * t + b
return -c / 2 * (--t * (t - 2) - 1) + b
}
}
}
</script>
<style scoped>
.back-to-ceiling {
position: fixed;
display: inline-block;
text-align: center;
cursor: pointer;
}
.back-to-ceiling:hover {
background: #d5dbe7;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .5s;
}
.fade-enter,
.fade-leave-to {
opacity: 0
}
.back-to-ceiling .Icon {
fill: #9aaabf;
background: none;
}
</style>
<template>
<transition :name="transitionName">
<div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop">
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height:16px;width:16px"><path d="M12.036 15.59a1 1 0 0 1-.997.995H5.032a.996.996 0 0 1-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29a1.003 1.003 0 0 1 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" /></svg>
</div>
</transition>
</template>
<script>
export default {
name: 'BackToTop',
props: {
visibilityHeight: {
type: Number,
default: 400
},
backPosition: {
type: Number,
default: 0
},
customStyle: {
type: Object,
default: function() {
return {
right: '50px',
bottom: '50px',
width: '40px',
height: '40px',
'border-radius': '4px',
'line-height': '45px',
background: '#e7eaf1'
}
}
},
transitionName: {
type: String,
default: 'fade'
}
},
data() {
return {
visible: false,
interval: null,
isMoving: false
}
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
if (this.interval) {
clearInterval(this.interval)
}
},
methods: {
handleScroll() {
this.visible = window.pageYOffset > this.visibilityHeight
},
backToTop() {
if (this.isMoving) return
const start = window.pageYOffset
let i = 0
this.isMoving = true
this.interval = setInterval(() => {
const next = Math.floor(this.easeInOutQuad(10 * i, start, -start, 500))
if (next <= this.backPosition) {
window.scrollTo(0, this.backPosition)
clearInterval(this.interval)
this.isMoving = false
} else {
window.scrollTo(0, next)
}
i++
}, 16.7)
},
easeInOutQuad(t, b, c, d) {
if ((t /= d / 2) < 1) return c / 2 * t * t + b
return -c / 2 * (--t * (t - 2) - 1) + b
}
}
}
</script>
<style scoped>
.back-to-ceiling {
position: fixed;
display: inline-block;
text-align: center;
cursor: pointer;
}
.back-to-ceiling:hover {
background: #d5dbe7;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .5s;
}
.fade-enter,
.fade-leave-to {
opacity: 0
}
.back-to-ceiling .Icon {
fill: #9aaabf;
background: none;
}
</style>
+85 -85
View File
@@ -1,85 +1,85 @@
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<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">{{
generateTitle(item.meta.title) }}</span>
<a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</template>
<script>
import { generateTitle } from '@/utils/i18n'
import pathToRegexp from 'path-to-regexp'
export default {
data() {
return {
levelList: null
}
},
watch: {
$route(route) {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) {
return
}
this.getBreadcrumb()
}
},
created() {
this.getBreadcrumb()
},
methods: {
generateTitle,
getBreadcrumb() {
// only show routes with meta.title
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched)
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
},
isDashboard(route) {
const name = route && route.name
if (!name) {
return false
}
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route
var toPath = pathToRegexp.compile(path)
return toPath(params)
},
handleLink(item) {
const { redirect, path } = item
if (redirect) {
this.$router.push(redirect)
return
}
this.$router.push(this.pathCompile(path))
}
}
}
</script>
<style lang="scss" scoped>
.app-breadcrumb.el-breadcrumb {
display: inline-block;
font-size: 14px;
line-height: 50px;
margin-left: 8px;
.no-redirect {
color: #97a8be;
cursor: text;
}
}
</style>
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<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">{{
generateTitle(item.meta.title) }}</span>
<a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</template>
<script>
import { generateTitle } from '@/utils/i18n'
import pathToRegexp from 'path-to-regexp'
export default {
data() {
return {
levelList: null
}
},
watch: {
$route(route) {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) {
return
}
this.getBreadcrumb()
}
},
created() {
this.getBreadcrumb()
},
methods: {
generateTitle,
getBreadcrumb() {
// only show routes with meta.title
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched)
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
},
isDashboard(route) {
const name = route && route.name
if (!name) {
return false
}
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route
var toPath = pathToRegexp.compile(path)
return toPath(params)
},
handleLink(item) {
const { redirect, path } = item
if (redirect) {
this.$router.push(redirect)
return
}
this.$router.push(this.pathCompile(path))
}
}
}
</script>
<style lang="scss" scoped>
.app-breadcrumb.el-breadcrumb {
display: inline-block;
font-size: 14px;
line-height: 50px;
margin-left: 8px;
.no-redirect {
color: #97a8be;
cursor: text;
}
}
</style>
+155 -155
View File
@@ -1,155 +1,155 @@
<template>
<div :id="id" :class="className" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
const xAxisData = []
const data = []
const data2 = []
for (let i = 0; i < 50; i++) {
xAxisData.push(i)
data.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5)
data2.push((Math.sin(i / 5) * (i / 5 + 10) + i / 6) * 3)
}
this.chart.setOption({
backgroundColor: '#08263a',
grid: {
left: '5%',
right: '5%'
},
xAxis: [{
show: false,
data: xAxisData
}, {
show: false,
data: xAxisData
}],
visualMap: {
show: false,
min: 0,
max: 50,
dimension: 0,
inRange: {
color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055']
}
},
yAxis: {
axisLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#4a657a'
}
},
splitLine: {
show: true,
lineStyle: {
color: '#08263f'
}
},
axisTick: {
show: false
}
},
series: [{
name: 'back',
type: 'bar',
data: data2,
z: 1,
itemStyle: {
normal: {
opacity: 0.4,
barBorderRadius: 5,
shadowBlur: 3,
shadowColor: '#111'
}
}
}, {
name: 'Simulate Shadow',
type: 'line',
data,
z: 2,
showSymbol: false,
animationDelay: 0,
animationEasing: 'linear',
animationDuration: 1200,
lineStyle: {
normal: {
color: 'transparent'
}
},
areaStyle: {
normal: {
color: '#08263a',
shadowBlur: 50,
shadowColor: '#000'
}
}
}, {
name: 'front',
type: 'bar',
data,
xAxisIndex: 1,
z: 3,
itemStyle: {
normal: {
barBorderRadius: 5
}
}
}],
animationEasing: 'elasticOut',
animationEasingUpdate: 'elasticOut',
animationDelay(idx) {
return idx * 20
},
animationDelayUpdate(idx) {
return idx * 20
}
})
}
}
}
</script>
<template>
<div :id="id" :class="className" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
const xAxisData = []
const data = []
const data2 = []
for (let i = 0; i < 50; i++) {
xAxisData.push(i)
data.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5)
data2.push((Math.sin(i / 5) * (i / 5 + 10) + i / 6) * 3)
}
this.chart.setOption({
backgroundColor: '#08263a',
grid: {
left: '5%',
right: '5%'
},
xAxis: [{
show: false,
data: xAxisData
}, {
show: false,
data: xAxisData
}],
visualMap: {
show: false,
min: 0,
max: 50,
dimension: 0,
inRange: {
color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055']
}
},
yAxis: {
axisLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#4a657a'
}
},
splitLine: {
show: true,
lineStyle: {
color: '#08263f'
}
},
axisTick: {
show: false
}
},
series: [{
name: 'back',
type: 'bar',
data: data2,
z: 1,
itemStyle: {
normal: {
opacity: 0.4,
barBorderRadius: 5,
shadowBlur: 3,
shadowColor: '#111'
}
}
}, {
name: 'Simulate Shadow',
type: 'line',
data,
z: 2,
showSymbol: false,
animationDelay: 0,
animationEasing: 'linear',
animationDuration: 1200,
lineStyle: {
normal: {
color: 'transparent'
}
},
areaStyle: {
normal: {
color: '#08263a',
shadowBlur: 50,
shadowColor: '#000'
}
}
}, {
name: 'front',
type: 'bar',
data,
xAxisIndex: 1,
z: 3,
itemStyle: {
normal: {
barBorderRadius: 5
}
}
}],
animationEasing: 'elasticOut',
animationEasingUpdate: 'elasticOut',
animationDelay(idx) {
return idx * 20
},
animationDelayUpdate(idx) {
return idx * 20
}
})
}
}
}
</script>
+227 -227
View File
@@ -1,227 +1,227 @@
<template>
<div :id="id" :class="className" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
backgroundColor: '#394056',
title: {
top: 20,
text: 'Requests',
textStyle: {
fontWeight: 'normal',
fontSize: 16,
color: '#F1F1F3'
},
left: '1%'
},
tooltip: {
trigger: 'axis',
axisPointer: {
lineStyle: {
color: '#57617B'
}
}
},
legend: {
top: 20,
icon: 'rect',
itemWidth: 14,
itemHeight: 5,
itemGap: 13,
data: ['CMCC', 'CTCC', 'CUCC'],
right: '4%',
textStyle: {
fontSize: 12,
color: '#F1F1F3'
}
},
grid: {
top: 100,
left: '2%',
right: '2%',
bottom: '2%',
containLabel: true
},
xAxis: [{
type: 'category',
boundaryGap: false,
axisLine: {
lineStyle: {
color: '#57617B'
}
},
data: ['13:00', '13:05', '13:10', '13:15', '13:20', '13:25', '13:30', '13:35', '13:40', '13:45', '13:50', '13:55']
}],
yAxis: [{
type: 'value',
name: '(%)',
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: '#57617B'
}
},
axisLabel: {
margin: 10,
textStyle: {
fontSize: 14
}
},
splitLine: {
lineStyle: {
color: '#57617B'
}
}
}],
series: [{
name: 'CMCC',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(137, 189, 27, 0.3)'
}, {
offset: 0.8,
color: 'rgba(137, 189, 27, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(137,189,27)',
borderColor: 'rgba(137,189,2,0.27)',
borderWidth: 12
}
},
data: [220, 182, 191, 134, 150, 120, 110, 125, 145, 122, 165, 122]
}, {
name: 'CTCC',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(0, 136, 212, 0.3)'
}, {
offset: 0.8,
color: 'rgba(0, 136, 212, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(0,136,212)',
borderColor: 'rgba(0,136,212,0.2)',
borderWidth: 12
}
},
data: [120, 110, 125, 145, 122, 165, 122, 220, 182, 191, 134, 150]
}, {
name: 'CUCC',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(219, 50, 51, 0.3)'
}, {
offset: 0.8,
color: 'rgba(219, 50, 51, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(219,50,51)',
borderColor: 'rgba(219,50,51,0.2)',
borderWidth: 12
}
},
data: [220, 182, 125, 145, 122, 191, 134, 150, 120, 110, 165, 122]
}]
})
}
}
}
</script>
<template>
<div :id="id" :class="className" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
this.chart.setOption({
backgroundColor: '#394056',
title: {
top: 20,
text: 'Requests',
textStyle: {
fontWeight: 'normal',
fontSize: 16,
color: '#F1F1F3'
},
left: '1%'
},
tooltip: {
trigger: 'axis',
axisPointer: {
lineStyle: {
color: '#57617B'
}
}
},
legend: {
top: 20,
icon: 'rect',
itemWidth: 14,
itemHeight: 5,
itemGap: 13,
data: ['CMCC', 'CTCC', 'CUCC'],
right: '4%',
textStyle: {
fontSize: 12,
color: '#F1F1F3'
}
},
grid: {
top: 100,
left: '2%',
right: '2%',
bottom: '2%',
containLabel: true
},
xAxis: [{
type: 'category',
boundaryGap: false,
axisLine: {
lineStyle: {
color: '#57617B'
}
},
data: ['13:00', '13:05', '13:10', '13:15', '13:20', '13:25', '13:30', '13:35', '13:40', '13:45', '13:50', '13:55']
}],
yAxis: [{
type: 'value',
name: '(%)',
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: '#57617B'
}
},
axisLabel: {
margin: 10,
textStyle: {
fontSize: 14
}
},
splitLine: {
lineStyle: {
color: '#57617B'
}
}
}],
series: [{
name: 'CMCC',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(137, 189, 27, 0.3)'
}, {
offset: 0.8,
color: 'rgba(137, 189, 27, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(137,189,27)',
borderColor: 'rgba(137,189,2,0.27)',
borderWidth: 12
}
},
data: [220, 182, 191, 134, 150, 120, 110, 125, 145, 122, 165, 122]
}, {
name: 'CTCC',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(0, 136, 212, 0.3)'
}, {
offset: 0.8,
color: 'rgba(0, 136, 212, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(0,136,212)',
borderColor: 'rgba(0,136,212,0.2)',
borderWidth: 12
}
},
data: [120, 110, 125, 145, 122, 165, 122, 220, 182, 191, 134, 150]
}, {
name: 'CUCC',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(219, 50, 51, 0.3)'
}, {
offset: 0.8,
color: 'rgba(219, 50, 51, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(219,50,51)',
borderColor: 'rgba(219,50,51,0.2)',
borderWidth: 12
}
},
data: [220, 182, 125, 145, 122, 191, 134, 150, 120, 110, 165, 122]
}]
})
}
}
}
</script>
+271 -271
View File
@@ -1,271 +1,271 @@
<template>
<div :id="id" :class="className" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
const xData = (function() {
const data = []
for (let i = 1; i < 13; i++) {
data.push(i + 'month')
}
return data
}())
this.chart.setOption({
backgroundColor: '#344b58',
title: {
text: 'statistics',
x: '20',
top: '20',
textStyle: {
color: '#fff',
fontSize: '22'
},
subtextStyle: {
color: '#90979c',
fontSize: '16'
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
textStyle: {
color: '#fff'
}
}
},
grid: {
left: '5%',
right: '5%',
borderWidth: 0,
top: 150,
bottom: 95,
textStyle: {
color: '#fff'
}
},
legend: {
x: '5%',
top: '10%',
textStyle: {
color: '#90979c'
},
data: ['female', 'male', 'average']
},
calculable: true,
xAxis: [{
type: 'category',
axisLine: {
lineStyle: {
color: '#90979c'
}
},
splitLine: {
show: false
},
axisTick: {
show: false
},
splitArea: {
show: false
},
axisLabel: {
interval: 0
},
data: xData
}],
yAxis: [{
type: 'value',
splitLine: {
show: false
},
axisLine: {
lineStyle: {
color: '#90979c'
}
},
axisTick: {
show: false
},
axisLabel: {
interval: 0
},
splitArea: {
show: false
}
}],
dataZoom: [{
show: true,
height: 30,
xAxisIndex: [
0
],
bottom: 30,
start: 10,
end: 80,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle: {
color: '#d3dee5'
},
textStyle: {
color: '#fff' },
borderColor: '#90979c'
}, {
type: 'inside',
show: true,
height: 15,
start: 1,
end: 35
}],
series: [{
name: 'female',
type: 'bar',
stack: 'total',
barMaxWidth: 35,
barGap: '10%',
itemStyle: {
normal: {
color: 'rgba(255,144,128,1)',
label: {
show: true,
textStyle: {
color: '#fff'
},
position: 'insideTop',
formatter(p) {
return p.value > 0 ? p.value : ''
}
}
}
},
data: [
709,
1917,
2455,
2610,
1719,
1433,
1544,
3285,
5208,
3372,
2484,
4078
]
},
{
name: 'male',
type: 'bar',
stack: 'total',
itemStyle: {
normal: {
color: 'rgba(0,191,183,1)',
barBorderRadius: 0,
label: {
show: true,
position: 'top',
formatter(p) {
return p.value > 0 ? p.value : ''
}
}
}
},
data: [
327,
1776,
507,
1200,
800,
482,
204,
1390,
1001,
951,
381,
220
]
}, {
name: 'average',
type: 'line',
stack: 'total',
symbolSize: 10,
symbol: 'circle',
itemStyle: {
normal: {
color: 'rgba(252,230,48,1)',
barBorderRadius: 0,
label: {
show: true,
position: 'top',
formatter(p) {
return p.value > 0 ? p.value : ''
}
}
}
},
data: [
1036,
3693,
2962,
3810,
2519,
1915,
1748,
4675,
6209,
4323,
2865,
4298
]
}
]
})
}
}
}
</script>
<template>
<div :id="id" :class="className" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '200px'
},
height: {
type: String,
default: '200px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.initChart()
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(document.getElementById(this.id))
const xData = (function() {
const data = []
for (let i = 1; i < 13; i++) {
data.push(i + 'month')
}
return data
}())
this.chart.setOption({
backgroundColor: '#344b58',
title: {
text: 'statistics',
x: '20',
top: '20',
textStyle: {
color: '#fff',
fontSize: '22'
},
subtextStyle: {
color: '#90979c',
fontSize: '16'
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
textStyle: {
color: '#fff'
}
}
},
grid: {
left: '5%',
right: '5%',
borderWidth: 0,
top: 150,
bottom: 95,
textStyle: {
color: '#fff'
}
},
legend: {
x: '5%',
top: '10%',
textStyle: {
color: '#90979c'
},
data: ['female', 'male', 'average']
},
calculable: true,
xAxis: [{
type: 'category',
axisLine: {
lineStyle: {
color: '#90979c'
}
},
splitLine: {
show: false
},
axisTick: {
show: false
},
splitArea: {
show: false
},
axisLabel: {
interval: 0
},
data: xData
}],
yAxis: [{
type: 'value',
splitLine: {
show: false
},
axisLine: {
lineStyle: {
color: '#90979c'
}
},
axisTick: {
show: false
},
axisLabel: {
interval: 0
},
splitArea: {
show: false
}
}],
dataZoom: [{
show: true,
height: 30,
xAxisIndex: [
0
],
bottom: 30,
start: 10,
end: 80,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle: {
color: '#d3dee5'
},
textStyle: {
color: '#fff' },
borderColor: '#90979c'
}, {
type: 'inside',
show: true,
height: 15,
start: 1,
end: 35
}],
series: [{
name: 'female',
type: 'bar',
stack: 'total',
barMaxWidth: 35,
barGap: '10%',
itemStyle: {
normal: {
color: 'rgba(255,144,128,1)',
label: {
show: true,
textStyle: {
color: '#fff'
},
position: 'insideTop',
formatter(p) {
return p.value > 0 ? p.value : ''
}
}
}
},
data: [
709,
1917,
2455,
2610,
1719,
1433,
1544,
3285,
5208,
3372,
2484,
4078
]
},
{
name: 'male',
type: 'bar',
stack: 'total',
itemStyle: {
normal: {
color: 'rgba(0,191,183,1)',
barBorderRadius: 0,
label: {
show: true,
position: 'top',
formatter(p) {
return p.value > 0 ? p.value : ''
}
}
}
},
data: [
327,
1776,
507,
1200,
800,
482,
204,
1390,
1001,
951,
381,
220
]
}, {
name: 'average',
type: 'line',
stack: 'total',
symbolSize: 10,
symbol: 'circle',
itemStyle: {
normal: {
color: 'rgba(252,230,48,1)',
barBorderRadius: 0,
label: {
show: true,
position: 'top',
formatter(p) {
return p.value > 0 ? p.value : ''
}
}
}
},
data: [
1036,
3693,
2962,
3810,
2519,
1915,
1748,
4675,
6209,
4323,
2865,
4298
]
}
]
})
}
}
}
</script>
+34 -34
View File
@@ -1,34 +1,34 @@
import { debounce } from '@/utils'
export default {
data() {
return {
$_sidebarElm: null
}
},
mounted() {
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHandler)
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
},
beforeDestroy() {
window.removeEventListener('resize', this.__resizeHandler)
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
},
methods: {
// use $_ for mixins properties
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
$_sidebarResizeHandler(e) {
if (e.propertyName === 'width') {
this.__resizeHandler()
}
}
}
}
import { debounce } from '@/utils'
export default {
data() {
return {
$_sidebarElm: null
}
},
mounted() {
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHandler)
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
},
beforeDestroy() {
window.removeEventListener('resize', this.__resizeHandler)
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
},
methods: {
// use $_ for mixins properties
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
$_sidebarResizeHandler(e) {
if (e.propertyName === 'width') {
this.__resizeHandler()
}
}
}
}
+166 -166
View File
@@ -1,166 +1,166 @@
<template>
<div class="dndList">
<div :style="{width:width1}" class="dndList-list">
<h3>{{ list1Title }}</h3>
<draggable :set-data="setData" :list="list1" group="article" class="dragArea">
<div v-for="element in list1" :key="element.id" class="list-complete-item">
<div class="list-complete-item-handle">
{{ element.id }}[{{ element.author }}] {{ element.title }}
</div>
<div style="position:absolute;right:0px;">
<span style="float: right ;margin-top: -20px;margin-right:5px;" @click="deleteEle(element)">
<i style="color:#ff4949" class="el-icon-delete" />
</span>
</div>
</div>
</draggable>
</div>
<div :style="{width:width2}" class="dndList-list">
<h3>{{ list2Title }}</h3>
<draggable :list="list2" group="article" class="dragArea">
<div v-for="element in list2" :key="element.id" class="list-complete-item">
<div class="list-complete-item-handle2" @click="pushEle(element)">
{{ element.id }} [{{ element.author }}] {{ element.title }}
</div>
</div>
</draggable>
</div>
</div>
</template>
<script>
import draggable from 'vuedraggable'
export default {
name: 'DndList',
components: { draggable },
props: {
list1: {
type: Array,
default() {
return []
}
},
list2: {
type: Array,
default() {
return []
}
},
list1Title: {
type: String,
default: 'list1'
},
list2Title: {
type: String,
default: 'list2'
},
width1: {
type: String,
default: '48%'
},
width2: {
type: String,
default: '48%'
}
},
methods: {
isNotInList1(v) {
return this.list1.every(k => v.id !== k.id)
},
isNotInList2(v) {
return this.list2.every(k => v.id !== k.id)
},
deleteEle(ele) {
for (const item of this.list1) {
if (item.id === ele.id) {
const index = this.list1.indexOf(item)
this.list1.splice(index, 1)
break
}
}
if (this.isNotInList2(ele)) {
this.list2.unshift(ele)
}
},
pushEle(ele) {
for (const item of this.list2) {
if (item.id === ele.id) {
const index = this.list2.indexOf(item)
this.list2.splice(index, 1)
break
}
}
if (this.isNotInList1(ele)) {
this.list1.push(ele)
}
},
setData(dataTransfer) {
// to avoid Firefox bug
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
dataTransfer.setData('Text', '')
}
}
}
</script>
<style lang="scss" scoped>
.dndList {
background: #fff;
padding-bottom: 40px;
&:after {
content: "";
display: table;
clear: both;
}
.dndList-list {
float: left;
padding-bottom: 30px;
&:first-of-type {
margin-right: 2%;
}
.dragArea {
margin-top: 15px;
min-height: 50px;
padding-bottom: 30px;
}
}
}
.list-complete-item {
cursor: pointer;
position: relative;
font-size: 14px;
padding: 5px 12px;
margin-top: 4px;
border: 1px solid #bfcbd9;
transition: all 1s;
}
.list-complete-item-handle {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 50px;
}
.list-complete-item-handle2 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 20px;
}
.list-complete-item.sortable-chosen {
background: #4AB7BD;
}
.list-complete-item.sortable-ghost {
background: #30B08F;
}
.list-complete-enter,
.list-complete-leave-active {
opacity: 0;
}
</style>
<template>
<div class="dndList">
<div :style="{width:width1}" class="dndList-list">
<h3>{{ list1Title }}</h3>
<draggable :set-data="setData" :list="list1" group="article" class="dragArea">
<div v-for="element in list1" :key="element.id" class="list-complete-item">
<div class="list-complete-item-handle">
{{ element.id }}[{{ element.author }}] {{ element.title }}
</div>
<div style="position:absolute;right:0px;">
<span style="float: right ;margin-top: -20px;margin-right:5px;" @click="deleteEle(element)">
<i style="color:#ff4949" class="el-icon-delete" />
</span>
</div>
</div>
</draggable>
</div>
<div :style="{width:width2}" class="dndList-list">
<h3>{{ list2Title }}</h3>
<draggable :list="list2" group="article" class="dragArea">
<div v-for="element in list2" :key="element.id" class="list-complete-item">
<div class="list-complete-item-handle2" @click="pushEle(element)">
{{ element.id }} [{{ element.author }}] {{ element.title }}
</div>
</div>
</draggable>
</div>
</div>
</template>
<script>
import draggable from 'vuedraggable'
export default {
name: 'DndList',
components: { draggable },
props: {
list1: {
type: Array,
default() {
return []
}
},
list2: {
type: Array,
default() {
return []
}
},
list1Title: {
type: String,
default: 'list1'
},
list2Title: {
type: String,
default: 'list2'
},
width1: {
type: String,
default: '48%'
},
width2: {
type: String,
default: '48%'
}
},
methods: {
isNotInList1(v) {
return this.list1.every(k => v.id !== k.id)
},
isNotInList2(v) {
return this.list2.every(k => v.id !== k.id)
},
deleteEle(ele) {
for (const item of this.list1) {
if (item.id === ele.id) {
const index = this.list1.indexOf(item)
this.list1.splice(index, 1)
break
}
}
if (this.isNotInList2(ele)) {
this.list2.unshift(ele)
}
},
pushEle(ele) {
for (const item of this.list2) {
if (item.id === ele.id) {
const index = this.list2.indexOf(item)
this.list2.splice(index, 1)
break
}
}
if (this.isNotInList1(ele)) {
this.list1.push(ele)
}
},
setData(dataTransfer) {
// to avoid Firefox bug
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
dataTransfer.setData('Text', '')
}
}
}
</script>
<style lang="scss" scoped>
.dndList {
background: #fff;
padding-bottom: 40px;
&:after {
content: "";
display: table;
clear: both;
}
.dndList-list {
float: left;
padding-bottom: 30px;
&:first-of-type {
margin-right: 2%;
}
.dragArea {
margin-top: 15px;
min-height: 50px;
padding-bottom: 30px;
}
}
}
.list-complete-item {
cursor: pointer;
position: relative;
font-size: 14px;
padding: 5px 12px;
margin-top: 4px;
border: 1px solid #bfcbd9;
transition: all 1s;
}
.list-complete-item-handle {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 50px;
}
.list-complete-item-handle2 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 20px;
}
.list-complete-item.sortable-chosen {
background: #4AB7BD;
}
.list-complete-item.sortable-ghost {
background: #30B08F;
}
.list-complete-enter,
.list-complete-leave-active {
opacity: 0;
}
</style>
+61 -61
View File
@@ -1,61 +1,61 @@
<template>
<el-select ref="dragSelect" v-model="selectVal" v-bind="$attrs" class="drag-select" multiple v-on="$listeners">
<slot />
</el-select>
</template>
<script>
import Sortable from 'sortablejs'
export default {
name: 'DragSelect',
props: {
value: {
type: Array,
required: true
}
},
computed: {
selectVal: {
get() {
return [...this.value]
},
set(val) {
this.$emit('input', [...val])
}
}
},
mounted() {
this.setSort()
},
methods: {
setSort() {
const el = this.$refs.dragSelect.$el.querySelectorAll('.el-select__tags > span')[0]
this.sortable = Sortable.create(el, {
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
setData: function(dataTransfer) {
dataTransfer.setData('Text', '')
// to avoid Firefox bug
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
},
onEnd: evt => {
const targetRow = this.value.splice(evt.oldIndex, 1)[0]
this.value.splice(evt.newIndex, 0, targetRow)
}
})
}
}
}
</script>
<style scoped>
.drag-select >>> .sortable-ghost {
opacity: .8;
color: #fff!important;
background: #42b983!important;
}
.drag-select >>> .el-tag {
cursor: pointer;
}
</style>
<template>
<el-select ref="dragSelect" v-model="selectVal" v-bind="$attrs" class="drag-select" multiple v-on="$listeners">
<slot />
</el-select>
</template>
<script>
import Sortable from 'sortablejs'
export default {
name: 'DragSelect',
props: {
value: {
type: Array,
required: true
}
},
computed: {
selectVal: {
get() {
return [...this.value]
},
set(val) {
this.$emit('input', [...val])
}
}
},
mounted() {
this.setSort()
},
methods: {
setSort() {
const el = this.$refs.dragSelect.$el.querySelectorAll('.el-select__tags > span')[0]
this.sortable = Sortable.create(el, {
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
setData: function(dataTransfer) {
dataTransfer.setData('Text', '')
// to avoid Firefox bug
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
},
onEnd: evt => {
const targetRow = this.value.splice(evt.oldIndex, 1)[0]
this.value.splice(evt.newIndex, 0, targetRow)
}
})
}
}
}
</script>
<style scoped>
.drag-select >>> .sortable-ghost {
opacity: .8;
color: #fff!important;
background: #42b983!important;
}
.drag-select >>> .el-tag {
cursor: pointer;
}
</style>
+297 -297
View File
@@ -1,297 +1,297 @@
<template>
<div :id="id" :ref="id" :action="url" class="dropzone">
<input type="file" name="file">
</div>
</template>
<script>
import Dropzone from 'dropzone'
import 'dropzone/dist/dropzone.css'
// import { getToken } from 'api/qiniu';
Dropzone.autoDiscover = false
export default {
props: {
id: {
type: String,
required: true
},
url: {
type: String,
required: true
},
clickable: {
type: Boolean,
default: true
},
defaultMsg: {
type: String,
default: '上传图片'
},
acceptedFiles: {
type: String,
default: ''
},
thumbnailHeight: {
type: Number,
default: 200
},
thumbnailWidth: {
type: Number,
default: 200
},
showRemoveLink: {
type: Boolean,
default: true
},
maxFilesize: {
type: Number,
default: 2
},
maxFiles: {
type: Number,
default: 3
},
autoProcessQueue: {
type: Boolean,
default: true
},
useCustomDropzoneOptions: {
type: Boolean,
default: false
},
defaultImg: {
default: '',
type: [String, Array]
},
couldPaste: {
type: Boolean,
default: false
}
},
data() {
return {
dropzone: '',
initOnce: true
}
},
watch: {
defaultImg(val) {
if (val.length === 0) {
this.initOnce = false
return
}
if (!this.initOnce) return
this.initImages(val)
this.initOnce = false
}
},
mounted() {
const element = document.getElementById(this.id)
const vm = this
this.dropzone = new Dropzone(element, {
clickable: this.clickable,
thumbnailWidth: this.thumbnailWidth,
thumbnailHeight: this.thumbnailHeight,
maxFiles: this.maxFiles,
maxFilesize: this.maxFilesize,
dictRemoveFile: 'Remove',
addRemoveLinks: this.showRemoveLink,
acceptedFiles: this.acceptedFiles,
autoProcessQueue: this.autoProcessQueue,
dictDefaultMessage: '<i style="margin-top: 3em;display: inline-block" class="material-icons">' + this.defaultMsg + '</i><br>Drop files here to upload',
dictMaxFilesExceeded: '只能一个图',
previewTemplate: '<div class="dz-preview dz-file-preview"> <div class="dz-image" style="width:' + this.thumbnailWidth + 'px;height:' + this.thumbnailHeight + 'px" ><img style="width:' + this.thumbnailWidth + 'px;height:' + this.thumbnailHeight + 'px" data-dz-thumbnail /></div> <div class="dz-details"><div class="dz-size"><span data-dz-size></span></div> <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <i class="material-icons">done</i> </div> <div class="dz-error-mark"><i class="material-icons">error</i></div></div>',
init() {
const val = vm.defaultImg
if (!val) return
if (Array.isArray(val)) {
if (val.length === 0) return
val.map((v, i) => {
const mockFile = { name: 'name' + i, size: 12345, url: v }
this.options.addedfile.call(this, mockFile)
this.options.thumbnail.call(this, mockFile, v)
mockFile.previewElement.classList.add('dz-success')
mockFile.previewElement.classList.add('dz-complete')
vm.initOnce = false
return true
})
} else {
const mockFile = { name: 'name', size: 12345, url: val }
this.options.addedfile.call(this, mockFile)
this.options.thumbnail.call(this, mockFile, val)
mockFile.previewElement.classList.add('dz-success')
mockFile.previewElement.classList.add('dz-complete')
vm.initOnce = false
}
},
accept: (file, done) => {
/* 七牛*/
// const token = this.$store.getters.token;
// getToken(token).then(response => {
// file.token = response.data.qiniu_token;
// file.key = response.data.qiniu_key;
// file.url = response.data.qiniu_url;
// done();
// })
done()
},
sending: (file, xhr, formData) => {
// formData.append('token', file.token);
// formData.append('key', file.key);
vm.initOnce = false
}
})
if (this.couldPaste) {
document.addEventListener('paste', this.pasteImg)
}
this.dropzone.on('success', file => {
vm.$emit('dropzone-success', file, vm.dropzone.element)
})
this.dropzone.on('addedfile', file => {
vm.$emit('dropzone-fileAdded', file)
})
this.dropzone.on('removedfile', file => {
vm.$emit('dropzone-removedFile', file)
})
this.dropzone.on('error', (file, error, xhr) => {
vm.$emit('dropzone-error', file, error, xhr)
})
this.dropzone.on('successmultiple', (file, error, xhr) => {
vm.$emit('dropzone-successmultiple', file, error, xhr)
})
},
destroyed() {
document.removeEventListener('paste', this.pasteImg)
this.dropzone.destroy()
},
methods: {
removeAllFiles() {
this.dropzone.removeAllFiles(true)
},
processQueue() {
this.dropzone.processQueue()
},
pasteImg(event) {
const items = (event.clipboardData || event.originalEvent.clipboardData).items
if (items[0].kind === 'file') {
this.dropzone.addFile(items[0].getAsFile())
}
},
initImages(val) {
if (!val) return
if (Array.isArray(val)) {
val.map((v, i) => {
const mockFile = { name: 'name' + i, size: 12345, url: v }
this.dropzone.options.addedfile.call(this.dropzone, mockFile)
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, v)
mockFile.previewElement.classList.add('dz-success')
mockFile.previewElement.classList.add('dz-complete')
return true
})
} else {
const mockFile = { name: 'name', size: 12345, url: val }
this.dropzone.options.addedfile.call(this.dropzone, mockFile)
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, val)
mockFile.previewElement.classList.add('dz-success')
mockFile.previewElement.classList.add('dz-complete')
}
}
}
}
</script>
<style scoped>
.dropzone {
border: 2px solid #E5E5E5;
font-family: 'Roboto', sans-serif;
color: #777;
transition: background-color .2s linear;
padding: 5px;
}
.dropzone:hover {
background-color: #F6F6F6;
}
i {
color: #CCC;
}
.dropzone .dz-image img {
width: 100%;
height: 100%;
}
.dropzone input[name='file'] {
display: none;
}
.dropzone .dz-preview .dz-image {
border-radius: 0px;
}
.dropzone .dz-preview:hover .dz-image img {
transform: none;
filter: none;
width: 100%;
height: 100%;
}
.dropzone .dz-preview .dz-details {
bottom: 0px;
top: 0px;
color: white;
background-color: rgba(33, 150, 243, 0.8);
transition: opacity .2s linear;
text-align: left;
}
.dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {
background-color: transparent;
}
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {
border: none;
}
.dropzone .dz-preview .dz-details .dz-filename:hover span {
background-color: transparent;
border: none;
}
.dropzone .dz-preview .dz-remove {
position: absolute;
z-index: 30;
color: white;
margin-left: 15px;
padding: 10px;
top: inherit;
bottom: 15px;
border: 2px white solid;
text-decoration: none;
text-transform: uppercase;
font-size: 0.8rem;
font-weight: 800;
letter-spacing: 1.1px;
opacity: 0;
}
.dropzone .dz-preview:hover .dz-remove {
opacity: 1;
}
.dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
margin-left: -40px;
margin-top: -50px;
}
.dropzone .dz-preview .dz-success-mark i, .dropzone .dz-preview .dz-error-mark i {
color: white;
font-size: 5rem;
}
</style>
<template>
<div :id="id" :ref="id" :action="url" class="dropzone">
<input type="file" name="file">
</div>
</template>
<script>
import Dropzone from 'dropzone'
import 'dropzone/dist/dropzone.css'
// import { getToken } from 'api/qiniu';
Dropzone.autoDiscover = false
export default {
props: {
id: {
type: String,
required: true
},
url: {
type: String,
required: true
},
clickable: {
type: Boolean,
default: true
},
defaultMsg: {
type: String,
default: '上传图片'
},
acceptedFiles: {
type: String,
default: ''
},
thumbnailHeight: {
type: Number,
default: 200
},
thumbnailWidth: {
type: Number,
default: 200
},
showRemoveLink: {
type: Boolean,
default: true
},
maxFilesize: {
type: Number,
default: 2
},
maxFiles: {
type: Number,
default: 3
},
autoProcessQueue: {
type: Boolean,
default: true
},
useCustomDropzoneOptions: {
type: Boolean,
default: false
},
defaultImg: {
default: '',
type: [String, Array]
},
couldPaste: {
type: Boolean,
default: false
}
},
data() {
return {
dropzone: '',
initOnce: true
}
},
watch: {
defaultImg(val) {
if (val.length === 0) {
this.initOnce = false
return
}
if (!this.initOnce) return
this.initImages(val)
this.initOnce = false
}
},
mounted() {
const element = document.getElementById(this.id)
const vm = this
this.dropzone = new Dropzone(element, {
clickable: this.clickable,
thumbnailWidth: this.thumbnailWidth,
thumbnailHeight: this.thumbnailHeight,
maxFiles: this.maxFiles,
maxFilesize: this.maxFilesize,
dictRemoveFile: 'Remove',
addRemoveLinks: this.showRemoveLink,
acceptedFiles: this.acceptedFiles,
autoProcessQueue: this.autoProcessQueue,
dictDefaultMessage: '<i style="margin-top: 3em;display: inline-block" class="material-icons">' + this.defaultMsg + '</i><br>Drop files here to upload',
dictMaxFilesExceeded: '只能一个图',
previewTemplate: '<div class="dz-preview dz-file-preview"> <div class="dz-image" style="width:' + this.thumbnailWidth + 'px;height:' + this.thumbnailHeight + 'px" ><img style="width:' + this.thumbnailWidth + 'px;height:' + this.thumbnailHeight + 'px" data-dz-thumbnail /></div> <div class="dz-details"><div class="dz-size"><span data-dz-size></span></div> <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <i class="material-icons">done</i> </div> <div class="dz-error-mark"><i class="material-icons">error</i></div></div>',
init() {
const val = vm.defaultImg
if (!val) return
if (Array.isArray(val)) {
if (val.length === 0) return
val.map((v, i) => {
const mockFile = { name: 'name' + i, size: 12345, url: v }
this.options.addedfile.call(this, mockFile)
this.options.thumbnail.call(this, mockFile, v)
mockFile.previewElement.classList.add('dz-success')
mockFile.previewElement.classList.add('dz-complete')
vm.initOnce = false
return true
})
} else {
const mockFile = { name: 'name', size: 12345, url: val }
this.options.addedfile.call(this, mockFile)
this.options.thumbnail.call(this, mockFile, val)
mockFile.previewElement.classList.add('dz-success')
mockFile.previewElement.classList.add('dz-complete')
vm.initOnce = false
}
},
accept: (file, done) => {
/* 七牛*/
// const token = this.$store.getters.token;
// getToken(token).then(response => {
// file.token = response.data.qiniu_token;
// file.key = response.data.qiniu_key;
// file.url = response.data.qiniu_url;
// done();
// })
done()
},
sending: (file, xhr, formData) => {
// formData.append('token', file.token);
// formData.append('key', file.key);
vm.initOnce = false
}
})
if (this.couldPaste) {
document.addEventListener('paste', this.pasteImg)
}
this.dropzone.on('success', file => {
vm.$emit('dropzone-success', file, vm.dropzone.element)
})
this.dropzone.on('addedfile', file => {
vm.$emit('dropzone-fileAdded', file)
})
this.dropzone.on('removedfile', file => {
vm.$emit('dropzone-removedFile', file)
})
this.dropzone.on('error', (file, error, xhr) => {
vm.$emit('dropzone-error', file, error, xhr)
})
this.dropzone.on('successmultiple', (file, error, xhr) => {
vm.$emit('dropzone-successmultiple', file, error, xhr)
})
},
destroyed() {
document.removeEventListener('paste', this.pasteImg)
this.dropzone.destroy()
},
methods: {
removeAllFiles() {
this.dropzone.removeAllFiles(true)
},
processQueue() {
this.dropzone.processQueue()
},
pasteImg(event) {
const items = (event.clipboardData || event.originalEvent.clipboardData).items
if (items[0].kind === 'file') {
this.dropzone.addFile(items[0].getAsFile())
}
},
initImages(val) {
if (!val) return
if (Array.isArray(val)) {
val.map((v, i) => {
const mockFile = { name: 'name' + i, size: 12345, url: v }
this.dropzone.options.addedfile.call(this.dropzone, mockFile)
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, v)
mockFile.previewElement.classList.add('dz-success')
mockFile.previewElement.classList.add('dz-complete')
return true
})
} else {
const mockFile = { name: 'name', size: 12345, url: val }
this.dropzone.options.addedfile.call(this.dropzone, mockFile)
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, val)
mockFile.previewElement.classList.add('dz-success')
mockFile.previewElement.classList.add('dz-complete')
}
}
}
}
</script>
<style scoped>
.dropzone {
border: 2px solid #E5E5E5;
font-family: 'Roboto', sans-serif;
color: #777;
transition: background-color .2s linear;
padding: 5px;
}
.dropzone:hover {
background-color: #F6F6F6;
}
i {
color: #CCC;
}
.dropzone .dz-image img {
width: 100%;
height: 100%;
}
.dropzone input[name='file'] {
display: none;
}
.dropzone .dz-preview .dz-image {
border-radius: 0px;
}
.dropzone .dz-preview:hover .dz-image img {
transform: none;
filter: none;
width: 100%;
height: 100%;
}
.dropzone .dz-preview .dz-details {
bottom: 0px;
top: 0px;
color: white;
background-color: rgba(33, 150, 243, 0.8);
transition: opacity .2s linear;
text-align: left;
}
.dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {
background-color: transparent;
}
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {
border: none;
}
.dropzone .dz-preview .dz-details .dz-filename:hover span {
background-color: transparent;
border: none;
}
.dropzone .dz-preview .dz-remove {
position: absolute;
z-index: 30;
color: white;
margin-left: 15px;
padding: 10px;
top: inherit;
bottom: 15px;
border: 2px white solid;
text-decoration: none;
text-transform: uppercase;
font-size: 0.8rem;
font-weight: 800;
letter-spacing: 1.1px;
opacity: 0;
}
.dropzone .dz-preview:hover .dz-remove {
opacity: 1;
}
.dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
margin-left: -40px;
margin-top: -50px;
}
.dropzone .dz-preview .dz-success-mark i, .dropzone .dz-preview .dz-error-mark i {
color: white;
font-size: 5rem;
}
</style>
+44 -44
View File
@@ -1,44 +1,44 @@
<template>
<div style="padding: 0 15px;" @click="toggleClick">
<svg
:class="{'is-active':isActive}"
class="hamburger"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
width="64"
height="64"
>
<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" />
</svg>
</div>
</template>
<script>
export default {
name: 'Hamburger',
props: {
// eslint-disable-next-line vue/require-prop-types
isActive: {
default: false
}
},
methods: {
toggleClick() {
this.$emit('toggleClick')
}
}
}
</script>
<style scoped>
.hamburger {
display: inline-block;
vertical-align: middle;
width: 20px;
height: 20px;
}
.hamburger.is-active {
transform: rotate(180deg);
}
</style>
<template>
<div style="padding: 0 15px;" @click="toggleClick">
<svg
:class="{'is-active':isActive}"
class="hamburger"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
width="64"
height="64"
>
<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" />
</svg>
</div>
</template>
<script>
export default {
name: 'Hamburger',
props: {
// eslint-disable-next-line vue/require-prop-types
isActive: {
default: false
}
},
methods: {
toggleClick() {
this.$emit('toggleClick')
}
}
}
</script>
<style scoped>
.hamburger {
display: inline-block;
vertical-align: middle;
width: 20px;
height: 20px;
}
.hamburger.is-active {
transform: rotate(180deg);
}
</style>
+190 -190
View File
@@ -1,190 +1,190 @@
<template>
<div :class="{'show':show}" class="header-search">
<svg-icon class-name="search-icon" icon-class="magnifying-glass" style="margin-top: 3px" @click.stop="click" />
<el-select
ref="headerSearchSelect"
v-model="search"
:remote-method="querySearch"
filterable
default-first-option
remote
:placeholder="$t('table.search')"
class="header-search-select"
@change="change"
>
<el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" />
</el-select>
</div>
</template>
<script>
// fuse is a lightweight fuzzy-search module
// make search results more in line with expectations
import Fuse from 'fuse.js'
import path from 'path'
import i18n from '@/lang'
export default {
name: 'HeaderSearch',
data() {
return {
search: '',
options: [],
searchPool: [],
show: false,
fuse: undefined
}
},
computed: {
routes() {
return this.$store.state.account.routes
},
lang() {
return this.$store.state.setting.language
}
},
watch: {
lang() {
this.searchPool = this.generateRoutes(this.routes)
},
routes() {
this.searchPool = this.generateRoutes(this.routes)
},
searchPool(list) {
this.initFuse(list)
},
show(value) {
if (value) {
document.body.addEventListener('click', this.close)
} else {
document.body.removeEventListener('click', this.close)
}
}
},
mounted() {
this.searchPool = this.generateRoutes(this.routes)
},
methods: {
click() {
this.show = !this.show
if (this.show) {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
}
},
close() {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
this.options = []
this.show = false
},
change(val) {
this.$router.push(val.path)
this.search = ''
this.options = []
this.$nextTick(() => {
this.show = false
})
},
initFuse(list) {
this.fuse = new Fuse(list, {
shouldSort: true,
threshold: 0.4,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [{
name: 'title',
weight: 0.7
}, {
name: 'path',
weight: 0.3
}]
})
},
// Filter out the routes that can be displayed in the sidebar
// And generate the internationalized title
generateRoutes(routes, basePath = '/', prefixTitle = []) {
let res = []
for (const router of routes) {
// skip hidden router
if (router.hidden) { continue }
const data = {
path: path.resolve(basePath, router.path),
title: [...prefixTitle]
}
if (router.meta && router.meta.title) {
// generate internationalized title
const i18ntitle = i18n.t(`${router.meta.title}`)
data.title = [...data.title, i18ntitle]
if (router.redirect !== 'noRedirect') {
// only push the routes with title
// special case: need to exclude parent router without redirect
res.push(data)
}
}
// recursive child routes
if (router.children) {
const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
if (tempRoutes.length >= 1) {
res = [...res, ...tempRoutes]
}
}
}
return res
},
querySearch(query) {
if (query !== '') {
this.options = this.fuse.search(query)
} else {
this.options = []
}
}
}
}
</script>
<style lang="scss" scoped>
.header-search {
font-size: 0 !important;
.search-icon {
cursor: pointer;
font-size: 18px;
vertical-align: middle;
}
.header-search-select {
font-size: 18px;
transition: width 0.2s;
width: 0;
overflow: hidden;
background: transparent;
border-radius: 0;
display: inline-block;
vertical-align: middle;
/deep/ .el-input__inner {
border-radius: 0;
border: 0;
padding-left: 0;
padding-right: 0;
box-shadow: none !important;
border-bottom: 1px solid #d9d9d9;
vertical-align: middle;
}
}
&.show {
.header-search-select {
width: 210px;
margin-left: 10px;
}
}
}
</style>
<template>
<div :class="{'show':show}" class="header-search">
<svg-icon class-name="search-icon" icon-class="magnifying-glass" style="margin-top: 3px" @click.stop="click" />
<el-select
ref="headerSearchSelect"
v-model="search"
:remote-method="querySearch"
filterable
default-first-option
remote
:placeholder="$t('table.search')"
class="header-search-select"
@change="change"
>
<el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" />
</el-select>
</div>
</template>
<script>
// fuse is a lightweight fuzzy-search module
// make search results more in line with expectations
import Fuse from 'fuse.js'
import path from 'path'
import i18n from '@/lang'
export default {
name: 'HeaderSearch',
data() {
return {
search: '',
options: [],
searchPool: [],
show: false,
fuse: undefined
}
},
computed: {
routes() {
return this.$store.state.account.routes
},
lang() {
return this.$store.state.setting.language
}
},
watch: {
lang() {
this.searchPool = this.generateRoutes(this.routes)
},
routes() {
this.searchPool = this.generateRoutes(this.routes)
},
searchPool(list) {
this.initFuse(list)
},
show(value) {
if (value) {
document.body.addEventListener('click', this.close)
} else {
document.body.removeEventListener('click', this.close)
}
}
},
mounted() {
this.searchPool = this.generateRoutes(this.routes)
},
methods: {
click() {
this.show = !this.show
if (this.show) {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
}
},
close() {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
this.options = []
this.show = false
},
change(val) {
this.$router.push(val.path)
this.search = ''
this.options = []
this.$nextTick(() => {
this.show = false
})
},
initFuse(list) {
this.fuse = new Fuse(list, {
shouldSort: true,
threshold: 0.4,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [{
name: 'title',
weight: 0.7
}, {
name: 'path',
weight: 0.3
}]
})
},
// Filter out the routes that can be displayed in the sidebar
// And generate the internationalized title
generateRoutes(routes, basePath = '/', prefixTitle = []) {
let res = []
for (const router of routes) {
// skip hidden router
if (router.hidden) { continue }
const data = {
path: path.resolve(basePath, router.path),
title: [...prefixTitle]
}
if (router.meta && router.meta.title) {
// generate internationalized title
const i18ntitle = i18n.t(`${router.meta.title}`)
data.title = [...data.title, i18ntitle]
if (router.redirect !== 'noRedirect') {
// only push the routes with title
// special case: need to exclude parent router without redirect
res.push(data)
}
}
// recursive child routes
if (router.children) {
const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
if (tempRoutes.length >= 1) {
res = [...res, ...tempRoutes]
}
}
}
return res
},
querySearch(query) {
if (query !== '') {
this.options = this.fuse.search(query)
} else {
this.options = []
}
}
}
}
</script>
<style lang="scss" scoped>
.header-search {
font-size: 0 !important;
.search-icon {
cursor: pointer;
font-size: 18px;
vertical-align: middle;
}
.header-search-select {
font-size: 18px;
transition: width 0.2s;
width: 0;
overflow: hidden;
background: transparent;
border-radius: 0;
display: inline-block;
vertical-align: middle;
/deep/ .el-input__inner {
border-radius: 0;
border: 0;
padding-left: 0;
padding-right: 0;
box-shadow: none !important;
border-bottom: 1px solid #d9d9d9;
vertical-align: middle;
}
}
&.show {
.header-search-select {
width: 210px;
margin-left: 10px;
}
}
}
</style>
File diff suppressed because it is too large Load Diff
+19 -19
View File
@@ -1,19 +1,19 @@
/**
* database64文件格式转换为2进制
*
* @param {[String]} data dataURL 的格式为 data:image/png;base64,****,逗号之前都是一些说明性的文字我们只需要逗号之后的就行了
* @param {[String]} mime [description]
* @return {[blob]} [description]
*/
export default function(data, mime) {
data = data.split(',')[1]
data = window.atob(data)
var ia = new Uint8Array(data.length)
for (var i = 0; i < data.length; i++) {
ia[i] = data.charCodeAt(i)
}
// canvas.toDataURL 返回的默认格式就是 image/png
return new Blob([ia], {
type: mime
})
}
/**
* database64文件格式转换为2进制
*
* @param {[String]} data dataURL 的格式为 data:image/png;base64,****,逗号之前都是一些说明性的文字我们只需要逗号之后的就行了
* @param {[String]} mime [description]
* @return {[blob]} [description]
*/
export default function(data, mime) {
data = data.split(',')[1]
data = window.atob(data)
var ia = new Uint8Array(data.length)
for (var i = 0; i < data.length; i++) {
ia[i] = data.charCodeAt(i)
}
// canvas.toDataURL 返回的默认格式就是 image/png
return new Blob([ia], {
type: mime
})
}
@@ -1,39 +1,39 @@
/**
* 点击波纹效果
*
* @param {[event]} e [description]
* @param {[Object]} arg_opts [description]
* @return {[bollean]} [description]
*/
export default function(e, arg_opts) {
var opts = Object.assign({
ele: e.target, // 波纹作用元素
type: 'hit', // hit点击位置扩散center中心点扩展
bgc: 'rgba(0, 0, 0, 0.15)' // 波纹颜色
}, arg_opts)
var target = opts.ele
if (target) {
var rect = target.getBoundingClientRect()
var ripple = target.querySelector('.e-ripple')
if (!ripple) {
ripple = document.createElement('span')
ripple.className = 'e-ripple'
ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px'
target.appendChild(ripple)
} else {
ripple.className = 'e-ripple'
}
switch (opts.type) {
case 'center':
ripple.style.top = (rect.height / 2 - ripple.offsetHeight / 2) + 'px'
ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px'
break
default:
ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop) + 'px'
ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft) + 'px'
}
ripple.style.backgroundColor = opts.bgc
ripple.className = 'e-ripple z-active'
return false
}
}
/**
* 点击波纹效果
*
* @param {[event]} e [description]
* @param {[Object]} arg_opts [description]
* @return {[bollean]} [description]
*/
export default function(e, arg_opts) {
var opts = Object.assign({
ele: e.target, // 波纹作用元素
type: 'hit', // hit点击位置扩散center中心点扩展
bgc: 'rgba(0, 0, 0, 0.15)' // 波纹颜色
}, arg_opts)
var target = opts.ele
if (target) {
var rect = target.getBoundingClientRect()
var ripple = target.querySelector('.e-ripple')
if (!ripple) {
ripple = document.createElement('span')
ripple.className = 'e-ripple'
ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px'
target.appendChild(ripple)
} else {
ripple.className = 'e-ripple'
}
switch (opts.type) {
case 'center':
ripple.style.top = (rect.height / 2 - ripple.offsetHeight / 2) + 'px'
ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px'
break
default:
ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop) + 'px'
ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft) + 'px'
}
ripple.style.backgroundColor = opts.bgc
ripple.className = 'e-ripple z-active'
return false
}
}
+232 -232
View File
@@ -1,232 +1,232 @@
export default {
zh: {
hint: '点击,或拖动图片至此处',
loading: '正在上传……',
noSupported: '浏览器不支持该功能,请使用IE10以上或其他现在浏览器!',
success: '上传成功',
fail: '图片上传失败',
preview: '头像预览',
btn: {
off: '取消',
close: '关闭',
back: '上一步',
save: '保存'
},
error: {
onlyImg: '仅限图片格式',
outOfSize: '单文件大小不能超过 ',
lowestPx: '图片最低像素为(宽*高):'
}
},
'zh-tw': {
hint: '點擊,或拖動圖片至此處',
loading: '正在上傳……',
noSupported: '瀏覽器不支持該功能,請使用IE10以上或其他現代瀏覽器!',
success: '上傳成功',
fail: '圖片上傳失敗',
preview: '頭像預覽',
btn: {
off: '取消',
close: '關閉',
back: '上一步',
save: '保存'
},
error: {
onlyImg: '僅限圖片格式',
outOfSize: '單文件大小不能超過 ',
lowestPx: '圖片最低像素為(寬*高):'
}
},
en: {
hint: 'Click or drag the file here to upload',
loading: 'Uploading…',
noSupported: 'Browser is not supported, please use IE10+ or other browsers',
success: 'Upload success',
fail: 'Upload failed',
preview: 'Preview',
btn: {
off: 'Cancel',
close: 'Close',
back: 'Back',
save: 'Save'
},
error: {
onlyImg: 'Image only',
outOfSize: 'Image exceeds size limit: ',
lowestPx: 'Image\'s size is too low. Expected at least: '
}
},
ro: {
hint: 'Atinge sau trage fișierul aici',
loading: 'Se încarcă',
noSupported: 'Browser-ul tău nu suportă acest feature. Te rugăm încearcă cu alt browser.',
success: 'S-a încărcat cu succes',
fail: 'A apărut o problemă la încărcare',
preview: 'Previzualizează',
btn: {
off: 'Anulează',
close: 'Închide',
back: 'Înapoi',
save: 'Salvează'
},
error: {
onlyImg: 'Doar imagini',
outOfSize: 'Imaginea depășește limita de: ',
loewstPx: 'Imaginea este prea mică; Minim: '
}
},
ru: {
hint: 'Нажмите, или перетащите файл в это окно',
loading: 'Загружаю……',
noSupported: 'Ваш браузер не поддерживается, пожалуйста, используйте IE10 + или другие браузеры',
success: 'Загрузка выполнена успешно',
fail: 'Ошибка загрузки',
preview: 'Предпросмотр',
btn: {
off: 'Отменить',
close: 'Закрыть',
back: 'Назад',
save: 'Сохранить'
},
error: {
onlyImg: 'Только изображения',
outOfSize: 'Изображение превышает предельный размер: ',
lowestPx: 'Минимальный размер изображения: '
}
},
'pt-br': {
hint: 'Clique ou arraste o arquivo aqui para carregar',
loading: 'Carregando…',
noSupported: 'Browser não suportado, use o IE10+ ou outro browser',
success: 'Sucesso ao carregar imagem',
fail: 'Falha ao carregar imagem',
preview: 'Pré-visualizar',
btn: {
off: 'Cancelar',
close: 'Fechar',
back: 'Voltar',
save: 'Salvar'
},
error: {
onlyImg: 'Apenas imagens',
outOfSize: 'A imagem excede o limite de tamanho: ',
lowestPx: 'O tamanho da imagem é muito pequeno. Tamanho mínimo: '
}
},
fr: {
hint: 'Cliquez ou glissez le fichier ici.',
loading: 'Téléchargement…',
noSupported: 'Votre navigateur n\'est pas supporté. Utilisez IE10 + ou un autre navigateur s\'il vous plaît.',
success: 'Téléchargement réussit',
fail: 'Téléchargement echoué',
preview: 'Aperçu',
btn: {
off: 'Annuler',
close: 'Fermer',
back: 'Retour',
save: 'Enregistrer'
},
error: {
onlyImg: 'Image uniquement',
outOfSize: 'L\'image sélectionnée dépasse la taille maximum: ',
lowestPx: 'L\'image sélectionnée est trop petite. Dimensions attendues: '
}
},
nl: {
hint: 'Klik hier of sleep een afbeelding in dit vlak',
loading: 'Uploaden…',
noSupported: 'Je browser wordt helaas niet ondersteund. Gebruik IE10+ of een andere browser.',
success: 'Upload succesvol',
fail: 'Upload mislukt',
preview: 'Voorbeeld',
btn: {
off: 'Annuleren',
close: 'Sluiten',
back: 'Terug',
save: 'Opslaan'
},
error: {
onlyImg: 'Alleen afbeeldingen',
outOfSize: 'De afbeelding is groter dan: ',
lowestPx: 'De afbeelding is te klein! Minimale afmetingen: '
}
},
tr: {
hint: 'Tıkla veya yüklemek istediğini buraya sürükle',
loading: 'Yükleniyor…',
noSupported: 'Tarayıcı desteklenmiyor, lütfen IE10+ veya farklı tarayıcı kullanın',
success: 'Yükleme başarılı',
fail: 'Yüklemede hata oluştu',
preview: 'Önizle',
btn: {
off: 'İptal',
close: 'Kapat',
back: 'Geri',
save: 'Kaydet'
},
error: {
onlyImg: 'Sadece resim',
outOfSize: 'Resim yükleme limitini aşıyor: ',
lowestPx: 'Resmin boyutu çok küçük. En az olması gereken: '
}
},
'es-MX': {
hint: 'Selecciona o arrastra una imagen',
loading: 'Subiendo...',
noSupported: 'Tu navegador no es soportado, porfavor usa IE10+ u otros navegadores mas recientes',
success: 'Subido exitosamente',
fail: 'Sucedió un error',
preview: 'Vista previa',
btn: {
off: 'Cancelar',
close: 'Cerrar',
back: 'Atras',
save: 'Guardar'
},
error: {
onlyImg: 'Unicamente imagenes',
outOfSize: 'La imagen excede el tamaño maximo:',
lowestPx: 'La imagen es demasiado pequeño. Se espera por lo menos:'
}
},
de: {
hint: 'Klick hier oder zieh eine Datei hier rein zum Hochladen',
loading: 'Hochladen…',
noSupported: 'Browser wird nicht unterstützt, bitte verwende IE10+ oder andere Browser',
success: 'Upload erfolgreich',
fail: 'Upload fehlgeschlagen',
preview: 'Vorschau',
btn: {
off: 'Abbrechen',
close: 'Schließen',
back: 'Zurück',
save: 'Speichern'
},
error: {
onlyImg: 'Nur Bilder',
outOfSize: 'Das Bild ist zu groß: ',
lowestPx: 'Das Bild ist zu klein. Mindestens: '
}
},
ja: {
hint: 'クリック・ドラッグしてファイルをアップロード',
loading: 'アップロード中...',
noSupported: 'このブラウザは対応されていません。IE10+かその他の主要ブラウザをお使いください。',
success: 'アップロード成功',
fail: 'アップロード失敗',
preview: 'プレビュー',
btn: {
off: 'キャンセル',
close: '閉じる',
back: '戻る',
save: '保存'
},
error: {
onlyImg: '画像のみ',
outOfSize: '画像サイズが上限を超えています。上限: ',
lowestPx: '画像が小さすぎます。最小サイズ: '
}
}
}
export default {
zh: {
hint: '点击,或拖动图片至此处',
loading: '正在上传……',
noSupported: '浏览器不支持该功能,请使用IE10以上或其他现在浏览器!',
success: '上传成功',
fail: '图片上传失败',
preview: '头像预览',
btn: {
off: '取消',
close: '关闭',
back: '上一步',
save: '保存'
},
error: {
onlyImg: '仅限图片格式',
outOfSize: '单文件大小不能超过 ',
lowestPx: '图片最低像素为(宽*高):'
}
},
'zh-tw': {
hint: '點擊,或拖動圖片至此處',
loading: '正在上傳……',
noSupported: '瀏覽器不支持該功能,請使用IE10以上或其他現代瀏覽器!',
success: '上傳成功',
fail: '圖片上傳失敗',
preview: '頭像預覽',
btn: {
off: '取消',
close: '關閉',
back: '上一步',
save: '保存'
},
error: {
onlyImg: '僅限圖片格式',
outOfSize: '單文件大小不能超過 ',
lowestPx: '圖片最低像素為(寬*高):'
}
},
en: {
hint: 'Click or drag the file here to upload',
loading: 'Uploading…',
noSupported: 'Browser is not supported, please use IE10+ or other browsers',
success: 'Upload success',
fail: 'Upload failed',
preview: 'Preview',
btn: {
off: 'Cancel',
close: 'Close',
back: 'Back',
save: 'Save'
},
error: {
onlyImg: 'Image only',
outOfSize: 'Image exceeds size limit: ',
lowestPx: 'Image\'s size is too low. Expected at least: '
}
},
ro: {
hint: 'Atinge sau trage fișierul aici',
loading: 'Se încarcă',
noSupported: 'Browser-ul tău nu suportă acest feature. Te rugăm încearcă cu alt browser.',
success: 'S-a încărcat cu succes',
fail: 'A apărut o problemă la încărcare',
preview: 'Previzualizează',
btn: {
off: 'Anulează',
close: 'Închide',
back: 'Înapoi',
save: 'Salvează'
},
error: {
onlyImg: 'Doar imagini',
outOfSize: 'Imaginea depășește limita de: ',
loewstPx: 'Imaginea este prea mică; Minim: '
}
},
ru: {
hint: 'Нажмите, или перетащите файл в это окно',
loading: 'Загружаю……',
noSupported: 'Ваш браузер не поддерживается, пожалуйста, используйте IE10 + или другие браузеры',
success: 'Загрузка выполнена успешно',
fail: 'Ошибка загрузки',
preview: 'Предпросмотр',
btn: {
off: 'Отменить',
close: 'Закрыть',
back: 'Назад',
save: 'Сохранить'
},
error: {
onlyImg: 'Только изображения',
outOfSize: 'Изображение превышает предельный размер: ',
lowestPx: 'Минимальный размер изображения: '
}
},
'pt-br': {
hint: 'Clique ou arraste o arquivo aqui para carregar',
loading: 'Carregando…',
noSupported: 'Browser não suportado, use o IE10+ ou outro browser',
success: 'Sucesso ao carregar imagem',
fail: 'Falha ao carregar imagem',
preview: 'Pré-visualizar',
btn: {
off: 'Cancelar',
close: 'Fechar',
back: 'Voltar',
save: 'Salvar'
},
error: {
onlyImg: 'Apenas imagens',
outOfSize: 'A imagem excede o limite de tamanho: ',
lowestPx: 'O tamanho da imagem é muito pequeno. Tamanho mínimo: '
}
},
fr: {
hint: 'Cliquez ou glissez le fichier ici.',
loading: 'Téléchargement…',
noSupported: 'Votre navigateur n\'est pas supporté. Utilisez IE10 + ou un autre navigateur s\'il vous plaît.',
success: 'Téléchargement réussit',
fail: 'Téléchargement echoué',
preview: 'Aperçu',
btn: {
off: 'Annuler',
close: 'Fermer',
back: 'Retour',
save: 'Enregistrer'
},
error: {
onlyImg: 'Image uniquement',
outOfSize: 'L\'image sélectionnée dépasse la taille maximum: ',
lowestPx: 'L\'image sélectionnée est trop petite. Dimensions attendues: '
}
},
nl: {
hint: 'Klik hier of sleep een afbeelding in dit vlak',
loading: 'Uploaden…',
noSupported: 'Je browser wordt helaas niet ondersteund. Gebruik IE10+ of een andere browser.',
success: 'Upload succesvol',
fail: 'Upload mislukt',
preview: 'Voorbeeld',
btn: {
off: 'Annuleren',
close: 'Sluiten',
back: 'Terug',
save: 'Opslaan'
},
error: {
onlyImg: 'Alleen afbeeldingen',
outOfSize: 'De afbeelding is groter dan: ',
lowestPx: 'De afbeelding is te klein! Minimale afmetingen: '
}
},
tr: {
hint: 'Tıkla veya yüklemek istediğini buraya sürükle',
loading: 'Yükleniyor…',
noSupported: 'Tarayıcı desteklenmiyor, lütfen IE10+ veya farklı tarayıcı kullanın',
success: 'Yükleme başarılı',
fail: 'Yüklemede hata oluştu',
preview: 'Önizle',
btn: {
off: 'İptal',
close: 'Kapat',
back: 'Geri',
save: 'Kaydet'
},
error: {
onlyImg: 'Sadece resim',
outOfSize: 'Resim yükleme limitini aşıyor: ',
lowestPx: 'Resmin boyutu çok küçük. En az olması gereken: '
}
},
'es-MX': {
hint: 'Selecciona o arrastra una imagen',
loading: 'Subiendo...',
noSupported: 'Tu navegador no es soportado, porfavor usa IE10+ u otros navegadores mas recientes',
success: 'Subido exitosamente',
fail: 'Sucedió un error',
preview: 'Vista previa',
btn: {
off: 'Cancelar',
close: 'Cerrar',
back: 'Atras',
save: 'Guardar'
},
error: {
onlyImg: 'Unicamente imagenes',
outOfSize: 'La imagen excede el tamaño maximo:',
lowestPx: 'La imagen es demasiado pequeño. Se espera por lo menos:'
}
},
de: {
hint: 'Klick hier oder zieh eine Datei hier rein zum Hochladen',
loading: 'Hochladen…',
noSupported: 'Browser wird nicht unterstützt, bitte verwende IE10+ oder andere Browser',
success: 'Upload erfolgreich',
fail: 'Upload fehlgeschlagen',
preview: 'Vorschau',
btn: {
off: 'Abbrechen',
close: 'Schließen',
back: 'Zurück',
save: 'Speichern'
},
error: {
onlyImg: 'Nur Bilder',
outOfSize: 'Das Bild ist zu groß: ',
lowestPx: 'Das Bild ist zu klein. Mindestens: '
}
},
ja: {
hint: 'クリック・ドラッグしてファイルをアップロード',
loading: 'アップロード中...',
noSupported: 'このブラウザは対応されていません。IE10+かその他の主要ブラウザをお使いください。',
success: 'アップロード成功',
fail: 'アップロード失敗',
preview: 'プレビュー',
btn: {
off: 'キャンセル',
close: '閉じる',
back: '戻る',
save: '保存'
},
error: {
onlyImg: '画像のみ',
outOfSize: '画像サイズが上限を超えています。上限: ',
lowestPx: '画像が小さすぎます。最小サイズ: '
}
}
}
+7 -7
View File
@@ -1,7 +1,7 @@
export default {
'jpg': 'image/jpeg',
'png': 'image/png',
'gif': 'image/gif',
'svg': 'image/svg+xml',
'psd': 'image/photoshop'
}
export default {
'jpg': 'image/jpeg',
'png': 'image/png',
'gif': 'image/gif',
'svg': 'image/svg+xml',
'psd': 'image/photoshop'
}
+67 -67
View File
@@ -1,67 +1,67 @@
<template>
<div class="upload-widget">
<el-upload
:headers="headers"
:data="dataObj"
:multiple="false"
:show-file-list="false"
:file-list="item"
:on-success="handleImageSuccess"
class="upload-uploader"
:action="action"
>
<img v-if="src" class="upload-images" :src="src" />
<div
v-else
slot="trigger"
class="upload-btn"
>
<i class="el-icon-upload"></i>
<span class="upload-title">选择图片</span>
</div>
</el-upload>
</div>
</template>
<script>
import db from '@/utils/localstorage'
import { Upload } from 'element-ui'
export default {
components: {
'el-upload': Upload
},
props: {
item: {
type: Array,
default() {
return []
}
},
src: {
type: String,
default: ''
}
},
data() {
return {
headers: {
Authorization: ''
},
action: `${process.env.VUE_APP_DEV_REQUEST_DOMAIN_PREFIX}/file/upload`,
dataObj: {
folderId: 1
}
}
},
created() {
this.headers.token = 'Bearer ' + db.get('TOKEN', '')
this.headers.tenant = 'MDAwMA=='
},
methods: {
handleImageSuccess(response, file, fileList) {
((response, file, fileList) => {
this.$emit('success', response, file, fileList )
})(response, file, fileList )
}
}
}
</script>
<template>
<div class="upload-widget">
<el-upload
:headers="headers"
:data="dataObj"
:multiple="false"
:show-file-list="false"
:file-list="item"
:on-success="handleImageSuccess"
class="upload-uploader"
:action="action"
>
<img v-if="src" class="upload-images" :src="src" />
<div
v-else
slot="trigger"
class="upload-btn"
>
<i class="el-icon-upload"></i>
<span class="upload-title">选择图片</span>
</div>
</el-upload>
</div>
</template>
<script>
import db from '@/utils/localstorage'
import { Upload } from 'element-ui'
export default {
components: {
'el-upload': Upload
},
props: {
item: {
type: Array,
default() {
return []
}
},
src: {
type: String,
default: ''
}
},
data() {
return {
headers: {
Authorization: ''
},
action: `${process.env.VUE_APP_DEV_REQUEST_DOMAIN_PREFIX}/file/upload`,
dataObj: {
folderId: 1
}
}
},
created() {
this.headers.token = 'Bearer ' + db.get('TOKEN', '')
this.headers.tenant = 'MDAwMA=='
},
methods: {
handleImageSuccess(response, file, fileList) {
((response, file, fileList) => {
this.$emit('success', response, file, fileList )
})(response, file, fileList )
}
}
}
</script>
+72 -72
View File
@@ -1,72 +1,72 @@
<template>
<div class="json-editor">
<textarea ref="textarea" />
</div>
</template>
<script>
import CodeMirror from 'codemirror'
import 'codemirror/addon/lint/lint.css'
import 'codemirror/lib/codemirror.css'
import 'codemirror/theme/rubyblue.css'
require('script-loader!jsonlint')
import 'codemirror/mode/javascript/javascript'
import 'codemirror/addon/lint/lint'
import 'codemirror/addon/lint/json-lint'
export default {
name: 'JsonEditor',
/* eslint-disable vue/require-prop-types */
props: ['value'],
data() {
return {
jsonEditor: false
}
},
watch: {
value(value) {
const editorValue = this.jsonEditor.getValue()
if (value !== editorValue) {
this.jsonEditor.setValue(JSON.stringify(this.value, null, 2))
}
}
},
mounted() {
this.jsonEditor = CodeMirror.fromTextArea(this.$refs.textarea, {
lineNumbers: true,
mode: 'application/json',
gutters: ['CodeMirror-lint-markers'],
theme: 'rubyblue',
lint: true
})
this.jsonEditor.setValue(JSON.stringify(this.value, null, 2))
this.jsonEditor.on('change', cm => {
this.$emit('changed', cm.getValue())
this.$emit('input', cm.getValue())
})
},
methods: {
getValue() {
return this.jsonEditor.getValue()
}
}
}
</script>
<style scoped>
.json-editor{
height: 100%;
position: relative;
}
.json-editor >>> .CodeMirror {
height: auto;
min-height: 300px;
}
.json-editor >>> .CodeMirror-scroll{
min-height: 300px;
}
.json-editor >>> .cm-s-rubyblue span.cm-string {
color: #F08047;
}
</style>
<template>
<div class="json-editor">
<textarea ref="textarea" />
</div>
</template>
<script>
import CodeMirror from 'codemirror'
import 'codemirror/addon/lint/lint.css'
import 'codemirror/lib/codemirror.css'
import 'codemirror/theme/rubyblue.css'
require('script-loader!jsonlint')
import 'codemirror/mode/javascript/javascript'
import 'codemirror/addon/lint/lint'
import 'codemirror/addon/lint/json-lint'
export default {
name: 'JsonEditor',
/* eslint-disable vue/require-prop-types */
props: ['value'],
data() {
return {
jsonEditor: false
}
},
watch: {
value(value) {
const editorValue = this.jsonEditor.getValue()
if (value !== editorValue) {
this.jsonEditor.setValue(JSON.stringify(this.value, null, 2))
}
}
},
mounted() {
this.jsonEditor = CodeMirror.fromTextArea(this.$refs.textarea, {
lineNumbers: true,
mode: 'application/json',
gutters: ['CodeMirror-lint-markers'],
theme: 'rubyblue',
lint: true
})
this.jsonEditor.setValue(JSON.stringify(this.value, null, 2))
this.jsonEditor.on('change', cm => {
this.$emit('changed', cm.getValue())
this.$emit('input', cm.getValue())
})
},
methods: {
getValue() {
return this.jsonEditor.getValue()
}
}
}
</script>
<style scoped>
.json-editor{
height: 100%;
position: relative;
}
.json-editor >>> .CodeMirror {
height: auto;
min-height: 300px;
}
.json-editor >>> .CodeMirror-scroll{
min-height: 300px;
}
.json-editor >>> .cm-s-rubyblue span.cm-string {
color: #F08047;
}
</style>
+99 -99
View File
@@ -1,99 +1,99 @@
<template>
<div class="board-column">
<div class="board-column-header">
{{ headerText }}
</div>
<draggable
:list="list"
v-bind="$attrs"
class="board-column-content"
:set-data="setData"
>
<div v-for="element in list" :key="element.id" class="board-item">
{{ element.name }} {{ element.id }}
</div>
</draggable>
</div>
</template>
<script>
import draggable from 'vuedraggable'
export default {
name: 'DragKanbanDemo',
components: {
draggable
},
props: {
headerText: {
type: String,
default: 'Header'
},
options: {
type: Object,
default() {
return {}
}
},
list: {
type: Array,
default() {
return []
}
}
},
methods: {
setData(dataTransfer) {
// to avoid Firefox bug
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
dataTransfer.setData('Text', '')
}
}
}
</script>
<style lang="scss" scoped>
.board-column {
min-width: 300px;
min-height: 100px;
height: auto;
overflow: hidden;
background: #f0f0f0;
border-radius: 3px;
.board-column-header {
height: 50px;
line-height: 50px;
overflow: hidden;
padding: 0 20px;
text-align: center;
background: #333;
color: #fff;
border-radius: 3px 3px 0 0;
}
.board-column-content {
height: auto;
overflow: hidden;
border: 10px solid transparent;
min-height: 60px;
display: flex;
justify-content: flex-start;
flex-direction: column;
align-items: center;
.board-item {
cursor: pointer;
width: 100%;
height: 64px;
margin: 5px 0;
background-color: #fff;
text-align: left;
line-height: 54px;
padding: 5px 10px;
box-sizing: border-box;
box-shadow: 0px 1px 3px 0 rgba(0, 0, 0, 0.2);
}
}
}
</style>
<template>
<div class="board-column">
<div class="board-column-header">
{{ headerText }}
</div>
<draggable
:list="list"
v-bind="$attrs"
class="board-column-content"
:set-data="setData"
>
<div v-for="element in list" :key="element.id" class="board-item">
{{ element.name }} {{ element.id }}
</div>
</draggable>
</div>
</template>
<script>
import draggable from 'vuedraggable'
export default {
name: 'DragKanbanDemo',
components: {
draggable
},
props: {
headerText: {
type: String,
default: 'Header'
},
options: {
type: Object,
default() {
return {}
}
},
list: {
type: Array,
default() {
return []
}
}
},
methods: {
setData(dataTransfer) {
// to avoid Firefox bug
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
dataTransfer.setData('Text', '')
}
}
}
</script>
<style lang="scss" scoped>
.board-column {
min-width: 300px;
min-height: 100px;
height: auto;
overflow: hidden;
background: #f0f0f0;
border-radius: 3px;
.board-column-header {
height: 50px;
line-height: 50px;
overflow: hidden;
padding: 0 20px;
text-align: center;
background: #333;
color: #fff;
border-radius: 3px 3px 0 0;
}
.board-column-content {
height: auto;
overflow: hidden;
border: 10px solid transparent;
min-height: 60px;
display: flex;
justify-content: flex-start;
flex-direction: column;
align-items: center;
.board-item {
cursor: pointer;
width: 100%;
height: 64px;
margin: 5px 0;
background-color: #fff;
text-align: left;
line-height: 54px;
padding: 5px 10px;
box-sizing: border-box;
box-shadow: 0px 1px 3px 0 rgba(0, 0, 0, 0.2);
}
}
}
</style>
+35 -35
View File
@@ -1,35 +1,35 @@
<template>
<el-dropdown trigger="click" class="international" @command="handleSetLanguage">
<div>
<svg-icon class-name="international-icon" icon-class="language" style="color: #a8a9a9;" />
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :disabled="language==='zh'" command="zh">
中文
</el-dropdown-item>
<el-dropdown-item :disabled="language==='en'" command="en">
English
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<script>
export default {
computed: {
language() {
return this.$store.state.setting.language
}
},
methods: {
handleSetLanguage(lang) {
this.$i18n.locale = lang
this.$store.commit('setting/setLanguage', lang)
this.$message({
message: this.$t('tips.switchLanguageSuccess'),
type: 'success'
})
}
}
}
</script>
<template>
<el-dropdown trigger="click" class="international" @command="handleSetLanguage">
<div>
<svg-icon class-name="international-icon" icon-class="language" style="color: #a8a9a9;" />
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :disabled="language==='zh'" command="zh">
中文
</el-dropdown-item>
<el-dropdown-item :disabled="language==='en'" command="en">
English
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<script>
export default {
computed: {
language() {
return this.$store.state.setting.language
}
},
methods: {
handleSetLanguage(lang) {
this.$i18n.locale = lang
this.$store.commit('setting/setLanguage', lang)
this.$message({
message: this.$t('tips.switchLanguageSuccess'),
type: 'success'
})
}
}
}
</script>
+360 -360
View File
@@ -1,360 +1,360 @@
<template>
<div :class="computedClasses" class="material-input__component">
<div :class="{iconClass:icon}">
<i v-if="icon" :class="['el-icon-' + icon]" class="el-input__icon material-input__icon" />
<input
v-if="type === 'email'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:required="required"
type="email"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'url'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:required="required"
type="url"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'number'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:step="step"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:max="max"
:min="min"
:minlength="minlength"
:maxlength="maxlength"
:required="required"
type="number"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'password'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:max="max"
:min="min"
:required="required"
type="password"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'tel'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:required="required"
type="tel"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'text'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:minlength="minlength"
:maxlength="maxlength"
:required="required"
type="text"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<span class="material-input-bar" />
<label class="material-label">
<slot />
</label>
</div>
</div>
</template>
<script>
// source:https://github.com/wemake-services/vue-material-input/blob/master/src/components/MaterialInput.vue
export default {
name: 'MdInput',
props: {
/* eslint-disable */
icon: String,
name: String,
type: {
type: String,
default: 'text'
},
value: [String, Number],
placeholder: String,
readonly: Boolean,
disabled: Boolean,
min: String,
max: String,
step: String,
minlength: Number,
maxlength: Number,
required: {
type: Boolean,
default: true
},
autoComplete: {
type: String,
default: 'off'
},
validateEvent: {
type: Boolean,
default: true
}
},
data() {
return {
currentValue: this.value,
focus: false,
fillPlaceHolder: null
}
},
computed: {
computedClasses() {
return {
'material--active': this.focus,
'material--disabled': this.disabled,
'material--raised': Boolean(this.focus || this.currentValue) // has value
}
}
},
watch: {
value(newValue) {
this.currentValue = newValue
}
},
methods: {
handleModelInput(event) {
const value = event.target.value
this.$emit('input', value)
if (this.$parent.$options.componentName === 'ElFormItem') {
if (this.validateEvent) {
this.$parent.$emit('el.form.change', [value])
}
}
this.$emit('change', value)
},
handleMdFocus(event) {
this.focus = true
this.$emit('focus', event)
if (this.placeholder && this.placeholder !== '') {
this.fillPlaceHolder = this.placeholder
}
},
handleMdBlur(event) {
this.focus = false
this.$emit('blur', event)
this.fillPlaceHolder = null
if (this.$parent.$options.componentName === 'ElFormItem') {
if (this.validateEvent) {
this.$parent.$emit('el.form.blur', [this.currentValue])
}
}
}
}
}
</script>
<style lang="scss" scoped>
// Fonts:
$font-size-base: 16px;
$font-size-small: 18px;
$font-size-smallest: 12px;
$font-weight-normal: normal;
$font-weight-bold: bold;
$apixel: 1px;
// Utils
$spacer: 12px;
$transition: 0.2s ease all;
$index: 0px;
$index-has-icon: 30px;
// Theme:
$color-white: white;
$color-grey: #9E9E9E;
$color-grey-light: #E0E0E0;
$color-blue: #2196F3;
$color-red: #F44336;
$color-black: black;
// Base clases:
%base-bar-pseudo {
content: '';
height: 1px;
width: 0;
bottom: 0;
position: absolute;
transition: $transition;
}
// Mixins:
@mixin slided-top() {
top: - ($font-size-base + $spacer);
left: 0;
font-size: $font-size-base;
font-weight: $font-weight-bold;
}
// Component:
.material-input__component {
margin-top: 36px;
position: relative;
* {
box-sizing: border-box;
}
.iconClass {
.material-input__icon {
position: absolute;
left: 0;
line-height: $font-size-base;
color: $color-blue;
top: $spacer;
width: $index-has-icon;
height: $font-size-base;
font-size: $font-size-base;
font-weight: $font-weight-normal;
pointer-events: none;
}
.material-label {
left: $index-has-icon;
}
.material-input {
text-indent: $index-has-icon;
}
}
.material-input {
font-size: $font-size-base;
padding: $spacer $spacer $spacer - $apixel * 10 $spacer / 2;
display: block;
width: 100%;
border: none;
line-height: 1;
border-radius: 0;
&:focus {
outline: none;
border: none;
border-bottom: 1px solid transparent; // fixes the height issue
}
}
.material-label {
font-weight: $font-weight-normal;
position: absolute;
pointer-events: none;
left: $index;
top: 0;
transition: $transition;
font-size: $font-size-small;
}
.material-input-bar {
position: relative;
display: block;
width: 100%;
&:before {
@extend %base-bar-pseudo;
left: 50%;
}
&:after {
@extend %base-bar-pseudo;
right: 50%;
}
}
// Disabled state:
&.material--disabled {
.material-input {
border-bottom-style: dashed;
}
}
// Raised state:
&.material--raised {
.material-label {
@include slided-top();
}
}
// Active state:
&.material--active {
.material-input-bar {
&:before,
&:after {
width: 50%;
}
}
}
}
.material-input__component {
background: $color-white;
.material-input {
background: none;
color: $color-black;
text-indent: $index;
border-bottom: 1px solid $color-grey-light;
}
.material-label {
color: $color-grey;
}
.material-input-bar {
&:before,
&:after {
background: $color-blue;
}
}
// Active state:
&.material--active {
.material-label {
color: $color-blue;
}
}
// Errors:
&.material--has-errors {
&.material--active .material-label {
color: $color-red;
}
.material-input-bar {
&:before,
&:after {
background: transparent;
}
}
}
}
</style>
<template>
<div :class="computedClasses" class="material-input__component">
<div :class="{iconClass:icon}">
<i v-if="icon" :class="['el-icon-' + icon]" class="el-input__icon material-input__icon" />
<input
v-if="type === 'email'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:required="required"
type="email"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'url'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:required="required"
type="url"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'number'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:step="step"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:max="max"
:min="min"
:minlength="minlength"
:maxlength="maxlength"
:required="required"
type="number"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'password'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:max="max"
:min="min"
:required="required"
type="password"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'tel'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:required="required"
type="tel"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<input
v-if="type === 'text'"
v-model="currentValue"
:name="name"
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
:autocomplete="autoComplete"
:minlength="minlength"
:maxlength="maxlength"
:required="required"
type="text"
class="material-input"
@focus="handleMdFocus"
@blur="handleMdBlur"
@input="handleModelInput"
>
<span class="material-input-bar" />
<label class="material-label">
<slot />
</label>
</div>
</div>
</template>
<script>
// source:https://github.com/wemake-services/vue-material-input/blob/master/src/components/MaterialInput.vue
export default {
name: 'MdInput',
props: {
/* eslint-disable */
icon: String,
name: String,
type: {
type: String,
default: 'text'
},
value: [String, Number],
placeholder: String,
readonly: Boolean,
disabled: Boolean,
min: String,
max: String,
step: String,
minlength: Number,
maxlength: Number,
required: {
type: Boolean,
default: true
},
autoComplete: {
type: String,
default: 'off'
},
validateEvent: {
type: Boolean,
default: true
}
},
data() {
return {
currentValue: this.value,
focus: false,
fillPlaceHolder: null
}
},
computed: {
computedClasses() {
return {
'material--active': this.focus,
'material--disabled': this.disabled,
'material--raised': Boolean(this.focus || this.currentValue) // has value
}
}
},
watch: {
value(newValue) {
this.currentValue = newValue
}
},
methods: {
handleModelInput(event) {
const value = event.target.value
this.$emit('input', value)
if (this.$parent.$options.componentName === 'ElFormItem') {
if (this.validateEvent) {
this.$parent.$emit('el.form.change', [value])
}
}
this.$emit('change', value)
},
handleMdFocus(event) {
this.focus = true
this.$emit('focus', event)
if (this.placeholder && this.placeholder !== '') {
this.fillPlaceHolder = this.placeholder
}
},
handleMdBlur(event) {
this.focus = false
this.$emit('blur', event)
this.fillPlaceHolder = null
if (this.$parent.$options.componentName === 'ElFormItem') {
if (this.validateEvent) {
this.$parent.$emit('el.form.blur', [this.currentValue])
}
}
}
}
}
</script>
<style lang="scss" scoped>
// Fonts:
$font-size-base: 16px;
$font-size-small: 18px;
$font-size-smallest: 12px;
$font-weight-normal: normal;
$font-weight-bold: bold;
$apixel: 1px;
// Utils
$spacer: 12px;
$transition: 0.2s ease all;
$index: 0px;
$index-has-icon: 30px;
// Theme:
$color-white: white;
$color-grey: #9E9E9E;
$color-grey-light: #E0E0E0;
$color-blue: #2196F3;
$color-red: #F44336;
$color-black: black;
// Base clases:
%base-bar-pseudo {
content: '';
height: 1px;
width: 0;
bottom: 0;
position: absolute;
transition: $transition;
}
// Mixins:
@mixin slided-top() {
top: - ($font-size-base + $spacer);
left: 0;
font-size: $font-size-base;
font-weight: $font-weight-bold;
}
// Component:
.material-input__component {
margin-top: 36px;
position: relative;
* {
box-sizing: border-box;
}
.iconClass {
.material-input__icon {
position: absolute;
left: 0;
line-height: $font-size-base;
color: $color-blue;
top: $spacer;
width: $index-has-icon;
height: $font-size-base;
font-size: $font-size-base;
font-weight: $font-weight-normal;
pointer-events: none;
}
.material-label {
left: $index-has-icon;
}
.material-input {
text-indent: $index-has-icon;
}
}
.material-input {
font-size: $font-size-base;
padding: $spacer $spacer $spacer - $apixel * 10 $spacer / 2;
display: block;
width: 100%;
border: none;
line-height: 1;
border-radius: 0;
&:focus {
outline: none;
border: none;
border-bottom: 1px solid transparent; // fixes the height issue
}
}
.material-label {
font-weight: $font-weight-normal;
position: absolute;
pointer-events: none;
left: $index;
top: 0;
transition: $transition;
font-size: $font-size-small;
}
.material-input-bar {
position: relative;
display: block;
width: 100%;
&:before {
@extend %base-bar-pseudo;
left: 50%;
}
&:after {
@extend %base-bar-pseudo;
right: 50%;
}
}
// Disabled state:
&.material--disabled {
.material-input {
border-bottom-style: dashed;
}
}
// Raised state:
&.material--raised {
.material-label {
@include slided-top();
}
}
// Active state:
&.material--active {
.material-input-bar {
&:before,
&:after {
width: 50%;
}
}
}
}
.material-input__component {
background: $color-white;
.material-input {
background: none;
color: $color-black;
text-indent: $index;
border-bottom: 1px solid $color-grey-light;
}
.material-label {
color: $color-grey;
}
.material-input-bar {
&:before,
&:after {
background: $color-blue;
}
}
// Active state:
&.material--active {
.material-label {
color: $color-blue;
}
}
// Errors:
&.material--has-errors {
&.material--active .material-label {
color: $color-red;
}
.material-input-bar {
&:before,
&:after {
background: transparent;
}
}
}
}
</style>
+306 -306
View File
@@ -1,306 +1,306 @@
<template>
<div class="add-dialog-component">
<Form ref="addForm" label-width="150px" :rules="rules" :model="formParams">
<Tabs v-model="activeName">
<tab-pane label="授权信息" name="authorize">
<form-item label="店铺名称" prop="name">
<Input
v-model="formParams.name"
size="medium"
placeholder="请输入店铺名称"
maxlength="30"
show-word-limit
clearable
/>
</form-item>
<form-item label="店铺负责人" prop="duty">
<Input
v-model="formParams.duty"
size="medium"
placeholder="请输入店铺负责人"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="联系电话">
<Input
v-model="formParams.contactTel"
size="medium"
placeholder="请输入联系电话"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="联系地址">
<Input
v-model="formParams.address"
size="medium"
placeholder="请输入联系地址"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="生效日期" prop="startTime">
<date-picker
v-model="formParams.startTime"
size="medium"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请输入生效日期"
/>
</form-item>
<form-item label="生效时限(年)" prop="expireLimitYear">
<Input
v-model="formParams.expireLimitYear"
size="medium"
placeholder="请输入生效时限"
maxlength="4"
show-word-limit
clearable
/>
</form-item>
<form-item label="合同状态">
<Select v-model="formParams.status.code" size="mini">
<Option label="有效" value="NORMAL" />
<Option label="无效" value="FORBIDDEN" />
</Select>
</form-item>
<form-item label="收单类型">
<Select v-model="formParams.posType.code" size="mini">
<Option label="普通餐饮" value="NORMALSTORE" />
<Option label="快消奶茶" value="FASTSTORE" />
<Option label="零售店" value="RETAILSTORE" />
</Select>
</form-item>
<form-item size="large">
<Button type="primary" @click="next">下一步</Button>
<Button @click="close">取消</Button>
</form-item>
</tab-pane>
<tab-pane label="账户信息" name="account">
<form-item label="账号" prop="mobile">
<Input
v-model="formParams.mobile"
size="medium"
placeholder="账号"
maxlength="11"
show-word-limit
clearable
/>
</form-item>
<form-item label="密码" prop="password">
<Input
v-model="formParams.password"
size="medium"
type="password"
placeholder="请输入密码"
show-word-limit
clearable
/>
</form-item>
<form-item label="确认密码" prop="confirmPassword">
<Input
v-model="formParams.confirmPassword"
size="medium"
type="password"
placeholder="请再次输入密码"
show-word-limit
clearable
/>
</form-item>
<form-item size="large">
<Button type="primary" :loading="addLoading" @click="onSubmit">保存</Button>
<Button @click="close">取消</Button>
</form-item>
</tab-pane>
</Tabs>
</Form>
</div>
</template>
<script>
import Management from '@/api/Management.js'
import { Tabs, TabPane, Form, FormItem, Input, Button, Select, Option, DatePicker } from 'element-ui'
export default {
components: {
Tabs,
TabPane,
Form,
FormItem,
Input,
Button,
Select,
Option,
DatePicker
},
props: {
dialogVisible: {
type: Boolean,
default: false
}
},
data() {
const checkPhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('手机号不能为空'))
} else {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
console.log(reg.test(value))
if (reg.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的手机号'))
}
}
}
const checkPassword = (rule, value, callback) => {
if (!value) {
return callback(new Error('密码不能为空'))
} else {
const reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/
console.log(reg.test(value))
if (reg.test(value)) {
callback()
} else {
return callback(new Error('中英文混合6-20位,区分大小写'))
}
}
}
const checkConfirmPassword = (rule, value, callback) => {
if (!value) {
return callback(new Error('确认密码不能为空'))
} else if (value !== this.formParams.password) {
callback(new Error('两次输入密码不一致!'))
}
callback()
}
const isEmpty = (rule, value, callback) => {
if (!value) {
this.activeName = 'authorize'
return callback(new Error('手机号不能为空'))
}
callback()
}
return {
activeName: 'authorize',
formParams: {
posType: {
code: 'NORMALSTORE'
},
status: {
code: 'NORMAL'
}
},
addLoading: false,
rules: {
name: [
{ required: true, validator: isEmpty, message: '请输入店铺名称', trigger: ['blur', 'change'] }
],
startTime: [
{ type: 'date', required: true, validator: isEmpty, message: '请输入生效日期', trigger: ['blur', 'change'] }
],
expireLimitYear: [
{ required: true, validator: isEmpty, message: '请输入生效日期', trigger: ['blur', 'change'] }
],
mobile: [
{ required: true, validator: checkPhone, message: '请输入11位数手机号', trigger: ['blur', 'change'] }
],
password: [
{ required: true, validator: checkPassword, message: '中英文混合6-20位,区分大小写', trigger: ['blur', 'change'] },
{ min: 6, max: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' }
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: ['blur', 'change'] },
{ required: true, validator: checkConfirmPassword, trigger: ['blur'] }
]
}
}
},
methods: {
open() {
this.resetForm()
},
close() {
this.$emit('close')
},
next() {
this.activeName = 'account'
},
onSubmit() {
console.log(this.formParams)
const addForm = this.$refs.addForm
addForm.validate((valid) => {
if (valid) {
this.addManagement()
} else {
return false
}
})
},
resetForm() {
this.$emit('close')
this.activeName = 'authorize'
this.$refs.addForm && this.$refs.addForm.resetFields()
},
async addManagement() {
const vm = this
vm.addLoading = true
Management.addTenant(vm.formParams).then((res) => {
vm.addLoading = false
// const resData = res.data
vm.addLoading = false
// if (resData.code === 0) {
vm.resetForm()
vm.$message({
message: '创建成功!',
type: 'success'
})
// }
})
}
}
}
</script>
<style lang="less">
.add-dialog-component {
.tree-box {
.el-tree-node__content {
margin-bottom: 15px;
height: auto;
}
}
}
</style>
<style lang="less" scoped>
.add-dialog-component {
padding: 15px 20px;
max-height: 80vh;
overflow: auto;
.tree-box {
margin: 15px 0;
.custom-tree-node {
display: flex;
width: 100%;
text-align: left;
.content {
flex: 1;
}
.setting-box {
}
}
}
.add-btn-wrap {
text-align: center;
}
}
</style>
<template>
<div class="add-dialog-component">
<Form ref="addForm" label-width="150px" :rules="rules" :model="formParams">
<Tabs v-model="activeName">
<tab-pane label="授权信息" name="authorize">
<form-item label="店铺名称" prop="name">
<Input
v-model="formParams.name"
size="medium"
placeholder="请输入店铺名称"
maxlength="30"
show-word-limit
clearable
/>
</form-item>
<form-item label="店铺负责人" prop="duty">
<Input
v-model="formParams.duty"
size="medium"
placeholder="请输入店铺负责人"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="联系电话">
<Input
v-model="formParams.contactTel"
size="medium"
placeholder="请输入联系电话"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="联系地址">
<Input
v-model="formParams.address"
size="medium"
placeholder="请输入联系地址"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="生效日期" prop="startTime">
<date-picker
v-model="formParams.startTime"
size="medium"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请输入生效日期"
/>
</form-item>
<form-item label="生效时限(年)" prop="expireLimitYear">
<Input
v-model="formParams.expireLimitYear"
size="medium"
placeholder="请输入生效时限"
maxlength="4"
show-word-limit
clearable
/>
</form-item>
<form-item label="合同状态">
<Select v-model="formParams.status.code" size="mini">
<Option label="有效" value="NORMAL" />
<Option label="无效" value="FORBIDDEN" />
</Select>
</form-item>
<form-item label="收单类型">
<Select v-model="formParams.posType.code" size="mini">
<Option label="普通餐饮" value="NORMALSTORE" />
<Option label="快消奶茶" value="FASTSTORE" />
<Option label="零售店" value="RETAILSTORE" />
</Select>
</form-item>
<form-item size="large">
<Button type="primary" @click="next">下一步</Button>
<Button @click="close">取消</Button>
</form-item>
</tab-pane>
<tab-pane label="账户信息" name="account">
<form-item label="账号" prop="mobile">
<Input
v-model="formParams.mobile"
size="medium"
placeholder="账号"
maxlength="11"
show-word-limit
clearable
/>
</form-item>
<form-item label="密码" prop="password">
<Input
v-model="formParams.password"
size="medium"
type="password"
placeholder="请输入密码"
show-word-limit
clearable
/>
</form-item>
<form-item label="确认密码" prop="confirmPassword">
<Input
v-model="formParams.confirmPassword"
size="medium"
type="password"
placeholder="请再次输入密码"
show-word-limit
clearable
/>
</form-item>
<form-item size="large">
<Button type="primary" :loading="addLoading" @click="onSubmit">保存</Button>
<Button @click="close">取消</Button>
</form-item>
</tab-pane>
</Tabs>
</Form>
</div>
</template>
<script>
import Management from '@/api/Management.js'
import { Tabs, TabPane, Form, FormItem, Input, Button, Select, Option, DatePicker } from 'element-ui'
export default {
components: {
Tabs,
TabPane,
Form,
FormItem,
Input,
Button,
Select,
Option,
DatePicker
},
props: {
dialogVisible: {
type: Boolean,
default: false
}
},
data() {
const checkPhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('手机号不能为空'))
} else {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
console.log(reg.test(value))
if (reg.test(value)) {
callback()
} else {
return callback(new Error('请输入正确的手机号'))
}
}
}
const checkPassword = (rule, value, callback) => {
if (!value) {
return callback(new Error('密码不能为空'))
} else {
const reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/
console.log(reg.test(value))
if (reg.test(value)) {
callback()
} else {
return callback(new Error('中英文混合6-20位,区分大小写'))
}
}
}
const checkConfirmPassword = (rule, value, callback) => {
if (!value) {
return callback(new Error('确认密码不能为空'))
} else if (value !== this.formParams.password) {
callback(new Error('两次输入密码不一致!'))
}
callback()
}
const isEmpty = (rule, value, callback) => {
if (!value) {
this.activeName = 'authorize'
return callback(new Error('手机号不能为空'))
}
callback()
}
return {
activeName: 'authorize',
formParams: {
posType: {
code: 'NORMALSTORE'
},
status: {
code: 'NORMAL'
}
},
addLoading: false,
rules: {
name: [
{ required: true, validator: isEmpty, message: '请输入店铺名称', trigger: ['blur', 'change'] }
],
startTime: [
{ type: 'date', required: true, validator: isEmpty, message: '请输入生效日期', trigger: ['blur', 'change'] }
],
expireLimitYear: [
{ required: true, validator: isEmpty, message: '请输入生效日期', trigger: ['blur', 'change'] }
],
mobile: [
{ required: true, validator: checkPhone, message: '请输入11位数手机号', trigger: ['blur', 'change'] }
],
password: [
{ required: true, validator: checkPassword, message: '中英文混合6-20位,区分大小写', trigger: ['blur', 'change'] },
{ min: 6, max: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' }
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: ['blur', 'change'] },
{ required: true, validator: checkConfirmPassword, trigger: ['blur'] }
]
}
}
},
methods: {
open() {
this.resetForm()
},
close() {
this.$emit('close')
},
next() {
this.activeName = 'account'
},
onSubmit() {
console.log(this.formParams)
const addForm = this.$refs.addForm
addForm.validate((valid) => {
if (valid) {
this.addManagement()
} else {
return false
}
})
},
resetForm() {
this.$emit('close')
this.activeName = 'authorize'
this.$refs.addForm && this.$refs.addForm.resetFields()
},
async addManagement() {
const vm = this
vm.addLoading = true
Management.addTenant(vm.formParams).then((res) => {
vm.addLoading = false
// const resData = res.data
vm.addLoading = false
// if (resData.code === 0) {
vm.resetForm()
vm.$message({
message: '创建成功!',
type: 'success'
})
// }
})
}
}
}
</script>
<style lang="less">
.add-dialog-component {
.tree-box {
.el-tree-node__content {
margin-bottom: 15px;
height: auto;
}
}
}
</style>
<style lang="less" scoped>
.add-dialog-component {
padding: 15px 20px;
max-height: 80vh;
overflow: auto;
.tree-box {
margin: 15px 0;
.custom-tree-node {
display: flex;
width: 100%;
text-align: left;
.content {
flex: 1;
}
.setting-box {
}
}
}
.add-btn-wrap {
text-align: center;
}
}
</style>
+212 -208
View File
@@ -1,208 +1,212 @@
<template>
<div class="management-container-component">
<Table :data="dataList.records" style="width: 100%" border>
<table-column prop="name" label="店铺名称" />
<table-column prop="code" label="店铺编码" />
<table-column prop="posType.desc" label="店铺类型" width="180" />
<table-column prop="duty" label="负责人" width="180" />
<table-column prop="contactTel" label="联系电话" width="180" />
<table-column label="合同状态" width="180">
<template slot-scope="scope">
{{ scope.row.status.code | state }}
</template>
</table-column>
<table-column prop="createTime" label="创建时间" width="180" />
<table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.prevent="checkRow(scope.row, true)"
>
查看
</el-button>
<el-button
type="text"
size="small"
@click.native.prevent="checkRow(scope.row, false)"
>
编辑
</el-button>
<el-button
type="text"
size="small"
@click.native.prevent="prohibit(scope.row)"
>
{{ scope.row.status.code | prohibitTips }}
</el-button>
<el-button
type="text"
size="small"
@click.native.prevent="fixRole(scope.row)"
>
权限恢复
</el-button>
</template>
</table-column>
</Table>
<pagination
v-show="dataList.total > 0"
:limit.sync="form.size"
:page.sync="form.current"
:total="Number(dataList.total)"
@pagination="fetch"
/>
<Dialog
:center="true"
:title="checkData.check ?'查看商家': '修改商家'"
:visible.sync="checkVisible"
:fullscreen="!true"
:before-close="closeCheckDialog"
class="check-dialog"
width="55%"
>
<checkDialog v-if="checkVisible" :data-map="checkData" @close="closeCheckDialog" />
</Dialog>
</div>
</template>
<script>
import Management from '@/api/Management.js'
import { Table, TableColumn, Dialog } from 'element-ui'
import Pagination from '@/components/Pagination'
import checkDialog from '@/components/Management/checkDialog'
export default {
components: { Table, TableColumn, Dialog, checkDialog, Pagination },
filters: {
state(code) {
const stateMap = {
NORMAL: '有效',
FORBIDDEN: '无效'
}
return stateMap[code]
},
prohibitTips(code) {
const stateMap = {
NORMAL: '禁用',
FORBIDDEN: '启用'
}
return stateMap[code]
}
},
props: {
dataList: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
checkVisible: false,
checkData: {
status: {}
},
form: {
current: 1,
size: 10
}
}
},
methods: {
fetch() {
this.$emit('fetch', this.form)
},
checkRow(item, v) {
item.check = v
this.checkVisible = true
this.checkData = item
console.log(this.checkData, 11)
},
closeCheckDialog() {
this.checkVisible = false
this.checkData = {}
},
prohibit(item) {
const code = item.status.code
const stateMap = {
NORMAL: '禁用',
FORBIDDEN: '启用'
}
console.log((item))
this.$confirm(`是否${stateMap[code]}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.prohibitPut(item)
})
},
fixRole(item) {
Management.fixRole(item.code).then(res => {
this.$message({
message: '权限修复完成',
type: 'success',
center: true
});
});
},
async prohibitPut(item) {
const code = item.status.code
const id = item.id
const stateMap = {
NORMAL: '禁用',
FORBIDDEN: '启用'
}
const prohibitMap = {
NORMAL: 'FORBIDDEN',
FORBIDDEN: 'NORMAL'
}
const res = await Management.editTenant({
id,
status: {
code: prohibitMap[code]
}
})
const resData = res.data
if (resData.code === 0) {
item.status.code = prohibitMap[code]
this.$message({
type: 'success',
message: `${stateMap[code]}成功!`
})
} else {
this.$message({
type: 'error',
message: `${stateMap[code]}失败!`
})
}
}
}
}
</script>
<style lang="less" scoped>
.management-container-component {
padding: 0 20px;
}
/deep/ .el-table {
th {
background: #EEF3FF;
color:#333333;
font-size:16px;
font-weight: 400;
border-color: #E0E5EB;
text-align: center;
}
td {
font-size: 14px;
text-align: center;
color: #666666;
}
.cell {
text-align: center;
white-space: pre-line;/*保留换行符*/
}
}
</style>
<template>
<div class="management-container-component">
<Table :data="dataList.records" style="width: 100%" border>
<table-column prop="name" label="店铺名称" />
<table-column prop="code" label="店铺编码" />
<!-- <table-column prop="posType.desc" label="店铺类型" width="180" /> -->
<table-column prop="duty" label="负责人" width="180" />
<table-column prop="contactTel" label="联系电话" width="180" />
<table-column label="合同状态" width="180">
<template slot-scope="scope">
{{ scope.row.status.code | state }}
</template>
</table-column>
<table-column prop="createTime" label="创建时间" width="180" />
<table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.prevent="checkRow(scope.row, true)"
>
查看
</el-button>
<el-button
type="text"
size="small"
@click.native.prevent="checkRow(scope.row, false)"
>
编辑
</el-button>
<el-button
type="text"
size="small"
@click.native.prevent="prohibit(scope.row)"
>
{{ scope.row.status.code | prohibitTips }}
</el-button>
<el-button
type="text"
size="small"
@click.native.prevent="fixRole(scope.row)"
>
权限恢复
</el-button>
</template>
</table-column>
</Table>
<pagination
v-show="dataList.total > 0"
:limit.sync="form.size"
:page.sync="form.current"
:total="Number(dataList.total)"
@pagination="fetch"
/>
<Dialog
:center="true"
:title="checkData.check ?'查看商家': '修改商家'"
:visible.sync="checkVisible"
:fullscreen="!true"
:before-close="closeCheckDialog"
class="check-dialog"
width="55%"
>
<checkDialog ref="checkDialog" v-if="checkVisible" :dataMap="list" @close="closeCheckDialog" />
</Dialog>
</div>
</template>
<script>
import Management from '@/api/Management.js'
import { Table, TableColumn, Dialog } from 'element-ui'
import Pagination from '@/components/Pagination'
import checkDialog from '@/components/Management/checkDialog'
export default {
components: { Table, TableColumn, Dialog, checkDialog, Pagination },
filters: {
state(code) {
const stateMap = {
NORMAL: '有效',
FORBIDDEN: '无效'
}
return stateMap[code]
},
prohibitTips(code) {
const stateMap = {
NORMAL: '禁用',
FORBIDDEN: '启用'
}
return stateMap[code]
}
},
props: {
dataList: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
checkVisible: false,
checkData: {
status: {},
defaultPay: false
},
form: {
current: 1,
size: 10
},
list: {}
}
},
methods: {
fetch() {
this.$emit('fetch', this.form)
},
checkRow(item, v) {
item.check = v
this.checkVisible = true
this.checkData = item
this.list = item
console.log(this.checkData, 11)
},
closeCheckDialog() {
this.checkVisible = false
this.checkData = {}
console.log(this.$refs.checkDialog.dataMap,"dataMap")
},
prohibit(item) {
const code = item.status.code
const stateMap = {
NORMAL: '禁用',
FORBIDDEN: '启用'
}
console.log((item))
this.$confirm(`是否${stateMap[code]}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.prohibitPut(item)
})
},
fixRole(item) {
Management.fixRole(item.code).then(res => {
this.$message({
message: '权限修复完成',
type: 'success',
center: true
});
});
},
async prohibitPut(item) {
const code = item.status.code
const id = item.id
const stateMap = {
NORMAL: '禁用',
FORBIDDEN: '启用'
}
const prohibitMap = {
NORMAL: 'FORBIDDEN',
FORBIDDEN: 'NORMAL'
}
const res = await Management.editTenant({
id,
status: {
code: prohibitMap[code]
}
})
const resData = res.data
if (resData.code === 0) {
item.status.code = prohibitMap[code]
this.$message({
type: 'success',
message: `${stateMap[code]}成功!`
})
} else {
this.$message({
type: 'error',
message: `${stateMap[code]}失败!`
})
}
}
}
}
</script>
<style lang="less" scoped>
.management-container-component {
padding: 0 20px;
}
/deep/ .el-table {
th {
background: #EEF3FF;
color:#333333;
font-size:16px;
font-weight: 400;
border-color: #E0E5EB;
text-align: center;
}
td {
font-size: 14px;
text-align: center;
color: #666666;
}
.cell {
text-align: center;
white-space: pre-line;/*保留换行符*/
}
}
</style>
+82 -82
View File
@@ -1,82 +1,82 @@
<template>
<div class="search-bar-component">
<Form :inline="true" :model="formParams">
<form-item label="店铺名称">
<Input v-model="formParams.name" size="mini" placeholder="店铺名称" />
</form-item>
<form-item label="店铺编码">
<Input v-model="formParams.code" size="mini" placeholder="店铺编码" />
</form-item>
<form-item label="负责人">
<Input v-model="formParams.duty" size="mini" placeholder="负责人" />
</form-item>
<form-item label="合同状态">
<Select v-model="formParams.status.code" size="mini">
<Option label="全部" value="NORMAL" />
<Option label="有效" value="NORMAL" />
<Option label="无效" value="FORBIDDEN" />
</Select>
</form-item>
<form-item>
<Button type="primary" size="mini" @click="query">查询</Button>
<Button plain size="mini" @click="reset">重置</Button>
<Button type="success" size="mini" @click="addManagement">新建商家</Button>
</form-item>
</Form>
</div>
</template>
<script>
import { Form, FormItem, Input, Select, Option, Button } from 'element-ui'
export default {
components: {
Form,
FormItem,
Input,
Select,
Option,
Button
},
data() {
return {
formParams: {
name: '',
code: '',
duty: '',
status: {
code: ''
}
}
}
},
methods: {
query() {
this.$emit('query', this.formParams)
},
addManagement() {
this.$emit('addManagement')
},
reset() {
this.formParams = {
name: '',
code: '',
duty: '',
status: {
code: ''
}
}
}
}
}
</script>
<style lang="less">
.search-bar-component {
.el-form-item {
margin-bottom: 8px;
}
}
</style>
<style lang="less" scoped>
.search-bar-component {
padding: 15px 20px;
}
</style>
<template>
<div class="search-bar-component">
<Form :inline="true" :model="formParams">
<form-item label="店铺名称">
<Input v-model="formParams.name" size="mini" placeholder="店铺名称" />
</form-item>
<form-item label="店铺编码">
<Input v-model="formParams.code" size="mini" placeholder="店铺编码" />
</form-item>
<form-item label="负责人">
<Input v-model="formParams.duty" size="mini" placeholder="负责人" />
</form-item>
<form-item label="合同状态">
<Select v-model="formParams.status.code" size="mini">
<Option label="全部" value="NORMAL" />
<Option label="有效" value="NORMAL" />
<Option label="无效" value="FORBIDDEN" />
</Select>
</form-item>
<form-item>
<Button type="primary" size="mini" @click="query">查询</Button>
<Button plain size="mini" @click="reset">重置</Button>
<Button type="success" size="mini" @click="addManagement">新建商家</Button>
</form-item>
</Form>
</div>
</template>
<script>
import { Form, FormItem, Input, Select, Option, Button } from 'element-ui'
export default {
components: {
Form,
FormItem,
Input,
Select,
Option,
Button
},
data() {
return {
formParams: {
name: '',
code: '',
duty: '',
status: {
code: ''
}
}
}
},
methods: {
query() {
this.$emit('query', this.formParams)
},
addManagement() {
this.$emit('addManagement')
},
reset() {
this.formParams = {
name: '',
code: '',
duty: '',
status: {
code: ''
}
}
}
}
}
</script>
<style lang="less">
.search-bar-component {
.el-form-item {
margin-bottom: 8px;
}
}
</style>
<style lang="less" scoped>
.search-bar-component {
padding: 15px 20px;
}
</style>
+191 -185
View File
@@ -1,185 +1,191 @@
<template>
<div class="add-dialog-component">
<Form ref="addForm" label-width="150px" :model="dataMap">
<Tabs v-model="activeName">
<tab-pane label="授权信息" name="authorize">
<form-item label="店铺名称" prop="name">
<Input
v-model="dataMap.name"
:disabled="dataMap.check"
size="medium"
maxlength="30"
show-word-limit
clearable
/>
</form-item>
<form-item label="店铺负责人" prop="duty">
<Input
v-model="dataMap.duty"
:disabled="dataMap.check"
size="medium"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="联系电话">
<Input
v-model="dataMap.contactTel"
:disabled="dataMap.check"
size="medium"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="联系地址">
<Input
v-model="dataMap.address"
:disabled="dataMap.check"
size="medium"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="生效日期" prop="startTime">
<date-picker
v-model="dataMap.startTime"
:disabled="dataMap.check"
size="medium"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
/>
</form-item>
<form-item label="生效时限(年)" prop="expireLimitYear">
<Input
v-model="dataMap.expireLimitYear"
:disabled="dataMap.check"
size="medium"
maxlength="4"
show-word-limit
clearable
/>
</form-item>
<form-item label="合同状态">
<Select v-model="dataMap.status.code" disabled size="mini">
<Option label="有效" value="NORMAL" />
<Option label="无效" value="FORBIDDEN" />
</Select>
</form-item>
<form-item label="账号" prop="mobile">
<Input
v-model="dataMap.account"
:disabled="dataMap.check"
size="medium"
maxlength="11"
show-word-limit
clearable
/>
</form-item>
<form-item label="收单类型">
<Select v-model="dataMap.posType.code" size="mini">
<Option label="普通餐饮" value="NORMALSTORE" />
<Option label="快消餐饮" value="FASTSTORE" />
<Option label="零售店" value="RETAILSTORE" />
</Select>
</form-item>
<form-item size="large">
<Button v-if="!dataMap.check" type="primary" @click="sumbit">确定</Button>
</form-item>
</tab-pane>
</Tabs>
</Form>
</div>
</template>
<script>
import { Tabs, TabPane, Form, FormItem, Input, Button, Select, Option, DatePicker } from 'element-ui'
import Management from '@/api/Management'
export default {
components: {
Tabs,
TabPane,
Form,
FormItem,
Input,
Button,
Select,
Option,
DatePicker
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
dataMap: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
activeName: 'authorize'
}
},
created() {},
methods: {
close() {
this.$emit('close')
},
sumbit() {
const _ = this
Management.editTenant(this.dataMap).then(res => {
if (res.data.code === 0) {
_.$message.success('修改成功')
_.close()
}
})
}
}
}
</script>
<style lang="less">
.add-dialog-component {
.tree-box {
.el-tree-node__content {
margin-bottom: 15px;
height: auto;
}
}
}
</style>
<style lang="less" scoped>
.add-dialog-component {
padding: 15px 20px;
max-height: 80vh;
overflow: auto;
.tree-box {
margin: 15px 0;
.custom-tree-node {
display: flex;
width: 100%;
text-align: left;
.content {
flex: 1;
}
.setting-box {
}
}
}
.add-btn-wrap {
text-align: center;
}
}
</style>
<template>
<div class="add-dialog-component">
<Form ref="addForm" label-width="150px" :model="dataMap">
<Tabs v-model="activeName">
<tab-pane label="授权信息" name="authorize">
<form-item label="店铺名称" prop="name">
<Input
v-model="dataMap.name"
:disabled="dataMap.check"
size="medium"
maxlength="30"
show-word-limit
clearable
/>
</form-item>
<form-item label="店铺负责人" prop="duty">
<Input
v-model="dataMap.duty"
:disabled="dataMap.check"
size="medium"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="联系电话">
<Input
v-model="dataMap.contactTel"
:disabled="dataMap.check"
size="medium"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="联系地址">
<Input
v-model="dataMap.address"
:disabled="dataMap.check"
size="medium"
maxlength="50"
show-word-limit
clearable
/>
</form-item>
<form-item label="生效日期" prop="startTime">
<date-picker
v-model="dataMap.startTime"
:disabled="dataMap.check"
size="medium"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
/>
</form-item>
<form-item label="生效时限(年)" prop="expireLimitYear">
<Input
v-model="dataMap.expireLimitYear"
:disabled="dataMap.check"
size="medium"
maxlength="4"
show-word-limit
clearable
/>
</form-item>
<!-- <form-item label="合同状态">
<Select v-model="dataMap.status.code" disabled size="mini">
<Option label="有效" value="NORMAL" />
<Option label="无效" value="FORBIDDEN" />
</Select>
</form-item> -->
<form-item label="是否使用平台收款" prop="mobile">
<el-radio-group size="small" v-model="dataMap.defaultPay">
<el-radio-button :label="true">{{ $t('common.yes') }}</el-radio-button>
<el-radio-button :label="false">{{ $t('common.no') }}</el-radio-button>
</el-radio-group>
</form-item>
<form-item label="账号" prop="mobile">
<Input
v-model="dataMap.account"
:disabled="dataMap.check"
size="medium"
maxlength="11"
show-word-limit
clearable
/>
</form-item>
<!-- <form-item label="收单类型">
<Select v-model="dataMap.posType.code" size="mini">
<Option label="普通餐饮" value="NORMALSTORE" />
<Option label="快消餐饮" value="FASTSTORE" />
<Option label="零售店" value="RETAILSTORE" />
</Select>
</form-item> -->
<form-item size="large">
<Button v-if="!dataMap.check" type="primary" @click="sumbit">确定</Button>
</form-item>
</tab-pane>
</Tabs>
</Form>
</div>
</template>
<script>
import { Tabs, TabPane, Form, FormItem, Input, Button, Select, Option, DatePicker } from 'element-ui'
import Management from '@/api/Management'
export default {
components: {
Tabs,
TabPane,
Form,
FormItem,
Input,
Button,
// Select,
// Option,
DatePicker
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
dataMap: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
activeName: 'authorize'
}
},
created() {},
methods: {
close() {
this.$emit('close')
},
sumbit() {
const _ = this
Management.editTenant(this.dataMap).then(res => {
if (res.data.code === 0) {
_.$message.success('修改成功')
_.close()
}
})
}
}
}
</script>
<style lang="less">
.add-dialog-component {
.tree-box {
.el-tree-node__content {
margin-bottom: 15px;
height: auto;
}
}
}
</style>
<style lang="less" scoped>
.add-dialog-component {
padding: 15px 20px;
max-height: 80vh;
overflow: auto;
.tree-box {
margin: 15px 0;
.custom-tree-node {
display: flex;
width: 100%;
text-align: left;
.content {
flex: 1;
}
.setting-box {
}
}
}
.add-btn-wrap {
text-align: center;
}
}
</style>
@@ -1,31 +1,31 @@
// doc: https://nhnent.github.io/tui.editor/api/latest/ToastUIEditor.html#ToastUIEditor
export default {
minHeight: '200px',
previewStyle: 'vertical',
useCommandShortcut: true,
useDefaultHTMLSanitizer: true,
usageStatistics: false,
hideModeSwitch: false,
toolbarItems: [
'heading',
'bold',
'italic',
'strike',
'divider',
'hr',
'quote',
'divider',
'ul',
'ol',
'task',
'indent',
'outdent',
'divider',
'table',
'image',
'link',
'divider',
'code',
'codeblock'
]
}
// doc: https://nhnent.github.io/tui.editor/api/latest/ToastUIEditor.html#ToastUIEditor
export default {
minHeight: '200px',
previewStyle: 'vertical',
useCommandShortcut: true,
useDefaultHTMLSanitizer: true,
usageStatistics: false,
hideModeSwitch: false,
toolbarItems: [
'heading',
'bold',
'italic',
'strike',
'divider',
'hr',
'quote',
'divider',
'ul',
'ol',
'task',
'indent',
'outdent',
'divider',
'table',
'image',
'link',
'divider',
'code',
'codeblock'
]
}
+118 -118
View File
@@ -1,118 +1,118 @@
<template>
<div :id="id" />
</template>
<script>
// deps for editor
import 'codemirror/lib/codemirror.css' // codemirror
import 'tui-editor/dist/tui-editor.css' // editor ui
import 'tui-editor/dist/tui-editor-contents.css' // editor content
import Editor from 'tui-editor'
import defaultOptions from './default-options'
export default {
name: 'MarddownEditor',
props: {
value: {
type: String,
default: ''
},
id: {
type: String,
required: false,
default() {
return 'markdown-editor-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '')
}
},
options: {
type: Object,
default() {
return defaultOptions
}
},
mode: {
type: String,
default: 'markdown'
},
height: {
type: String,
required: false,
default: '300px'
},
language: {
type: String,
required: false,
default: 'en_US' // https://github.com/nhnent/tui.editor/tree/master/src/js/langs
}
},
data() {
return {
editor: null
}
},
computed: {
editorOptions() {
const options = Object.assign({}, defaultOptions, this.options)
options.initialEditType = this.mode
options.height = this.height
options.language = this.language
return options
}
},
watch: {
value(newValue, preValue) {
if (newValue !== preValue && newValue !== this.editor.getValue()) {
this.editor.setValue(newValue)
}
},
language(val) {
this.destroyEditor()
this.initEditor()
},
height(newValue) {
this.editor.height(newValue)
},
mode(newValue) {
this.editor.changeMode(newValue)
}
},
mounted() {
this.initEditor()
},
destroyed() {
this.destroyEditor()
},
methods: {
initEditor() {
this.editor = new Editor({
el: document.getElementById(this.id),
...this.editorOptions
})
if (this.value) {
this.editor.setValue(this.value)
}
this.editor.on('change', () => {
this.$emit('input', this.editor.getValue())
})
},
destroyEditor() {
if (!this.editor) return
this.editor.off('change')
this.editor.remove()
},
setValue(value) {
this.editor.setValue(value)
},
getValue() {
return this.editor.getValue()
},
setHtml(value) {
this.editor.setHtml(value)
},
getHtml() {
return this.editor.getHtml()
}
}
}
</script>
<template>
<div :id="id" />
</template>
<script>
// deps for editor
import 'codemirror/lib/codemirror.css' // codemirror
import 'tui-editor/dist/tui-editor.css' // editor ui
import 'tui-editor/dist/tui-editor-contents.css' // editor content
import Editor from 'tui-editor'
import defaultOptions from './default-options'
export default {
name: 'MarddownEditor',
props: {
value: {
type: String,
default: ''
},
id: {
type: String,
required: false,
default() {
return 'markdown-editor-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '')
}
},
options: {
type: Object,
default() {
return defaultOptions
}
},
mode: {
type: String,
default: 'markdown'
},
height: {
type: String,
required: false,
default: '300px'
},
language: {
type: String,
required: false,
default: 'en_US' // https://github.com/nhnent/tui.editor/tree/master/src/js/langs
}
},
data() {
return {
editor: null
}
},
computed: {
editorOptions() {
const options = Object.assign({}, defaultOptions, this.options)
options.initialEditType = this.mode
options.height = this.height
options.language = this.language
return options
}
},
watch: {
value(newValue, preValue) {
if (newValue !== preValue && newValue !== this.editor.getValue()) {
this.editor.setValue(newValue)
}
},
language(val) {
this.destroyEditor()
this.initEditor()
},
height(newValue) {
this.editor.height(newValue)
},
mode(newValue) {
this.editor.changeMode(newValue)
}
},
mounted() {
this.initEditor()
},
destroyed() {
this.destroyEditor()
},
methods: {
initEditor() {
this.editor = new Editor({
el: document.getElementById(this.id),
...this.editorOptions
})
if (this.value) {
this.editor.setValue(this.value)
}
this.editor.on('change', () => {
this.$emit('input', this.editor.getValue())
})
},
destroyEditor() {
if (!this.editor) return
this.editor.off('change')
this.editor.remove()
},
setValue(value) {
this.editor.setValue(value)
},
getValue() {
return this.editor.getValue()
},
setHtml(value) {
this.editor.setHtml(value)
},
getHtml() {
return this.editor.getHtml()
}
}
}
</script>
+103 -103
View File
@@ -1,103 +1,103 @@
<template>
<div style="display:block" :class="{'hidden':hidden}" class="pagination-container">
<el-pagination
:background="background"
:current-page.sync="currentPage"
:page-size.sync="pageSize"
:layout="layout"
:page-sizes="pageSizes"
:total="total"
v-bind="$attrs"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
style="display:block"
/>
</div>
</template>
<script>
import { scrollTo } from '@/utils/scroll-to'
export default {
name: 'Pagination',
props: {
total: {
required: true,
type: Number
},
page: {
type: Number,
default: 1
},
limit: {
type: Number,
default: 20
},
pageSizes: {
type: Array,
default() {
return [5, 10, 20, 30, 50]
}
},
layout: {
type: String,
default: 'total, sizes, prev, pager, next, jumper'
},
background: {
type: Boolean,
default: true
},
autoScroll: {
type: Boolean,
default: true
},
hidden: {
type: Boolean,
default: false
}
},
computed: {
currentPage: {
get() {
return this.page
},
set(val) {
this.$emit('update:page', val)
}
},
pageSize: {
get() {
return this.limit
},
set(val) {
this.$emit('update:limit', val)
}
}
},
methods: {
handleSizeChange(val) {
this.$emit('pagination', { page: this.currentPage, limit: val })
if (this.autoScroll) {
scrollTo(0, 800)
}
},
handleCurrentChange(val) {
this.$emit('pagination', { page: val, limit: this.pageSize })
if (this.autoScroll) {
scrollTo(0, 800)
}
}
}
}
</script>
<style scoped>
.pagination-container {
background: #fff;
padding: 32px 16px 16px 0;
margin-top: 0;
}
.pagination-container.hidden {
display: none;
}
</style>
<template>
<div style="display:block" :class="{'hidden':hidden}" class="pagination-container">
<el-pagination
:background="background"
:current-page.sync="currentPage"
:page-size.sync="pageSize"
:layout="layout"
:page-sizes="pageSizes"
:total="total"
v-bind="$attrs"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
style="display:block"
/>
</div>
</template>
<script>
import { scrollTo } from '@/utils/scroll-to'
export default {
name: 'Pagination',
props: {
total: {
required: true,
type: Number
},
page: {
type: Number,
default: 1
},
limit: {
type: Number,
default: 20
},
pageSizes: {
type: Array,
default() {
return [5, 10, 20, 30, 50]
}
},
layout: {
type: String,
default: 'total, sizes, prev, pager, next, jumper'
},
background: {
type: Boolean,
default: true
},
autoScroll: {
type: Boolean,
default: true
},
hidden: {
type: Boolean,
default: false
}
},
computed: {
currentPage: {
get() {
return this.page
},
set(val) {
this.$emit('update:page', val)
}
},
pageSize: {
get() {
return this.limit
},
set(val) {
this.$emit('update:limit', val)
}
}
},
methods: {
handleSizeChange(val) {
this.$emit('pagination', { page: this.currentPage, limit: val })
if (this.autoScroll) {
scrollTo(0, 800)
}
},
handleCurrentChange(val) {
this.$emit('pagination', { page: val, limit: this.pageSize })
if (this.autoScroll) {
scrollTo(0, 800)
}
}
}
}
</script>
<style scoped>
.pagination-container {
background: #fff;
padding: 32px 16px 16px 0;
margin-top: 0;
}
.pagination-container.hidden {
display: none;
}
</style>
+140 -140
View File
@@ -1,140 +1,140 @@
<template>
<div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item">
<div class="pan-info">
<div class="pan-info-roles-container">
<slot />
</div>
</div>
<img :src="image" class="pan-thumb">
</div>
</template>
<script>
export default {
name: 'PanThumb',
props: {
image: {
type: String,
required: true
},
zIndex: {
type: Number,
default: 1
},
width: {
type: String,
default: '150px'
},
height: {
type: String,
default: '150px'
}
}
}
</script>
<style scoped>
.pan-item {
width: 200px;
height: 200px;
border-radius: 50%;
display: inline-block;
position: relative;
cursor: default;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.pan-info-roles-container {
padding: 20px;
text-align: center;
}
.pan-thumb {
width: 100%;
height: 100%;
background-size: 100%;
border-radius: 50%;
overflow: hidden;
position: absolute;
transform-origin: 95% 40%;
transition: all 0.3s ease-in-out;
}
.pan-thumb:after {
content: '';
width: 8px;
height: 8px;
position: absolute;
border-radius: 50%;
top: 40%;
left: 95%;
margin: -4px 0 0 -4px;
background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%);
box-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
}
.pan-info {
position: absolute;
width: inherit;
height: inherit;
border-radius: 50%;
overflow: hidden;
box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05);
}
.pan-info h3 {
color: #fff;
text-transform: uppercase;
position: relative;
letter-spacing: 2px;
font-size: 18px;
margin: 0 60px;
padding: 22px 0 0 0;
height: 85px;
font-family: 'Open Sans', Arial, sans-serif;
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
}
.pan-info p {
color: #fff;
padding: 10px 5px;
font-style: italic;
margin: 0 30px;
font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.pan-info p a {
display: block;
color: #333;
width: 80px;
height: 80px;
background: rgba(255, 255, 255, 0.3);
border-radius: 50%;
color: #fff;
font-style: normal;
font-weight: 700;
text-transform: uppercase;
font-size: 9px;
letter-spacing: 1px;
padding-top: 24px;
margin: 7px auto 0;
font-family: 'Open Sans', Arial, sans-serif;
opacity: 0;
transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s;
transform: translateX(60px) rotate(90deg);
}
.pan-info p a:hover {
background: rgba(255, 255, 255, 0.5);
}
.pan-item:hover .pan-thumb {
transform: rotate(-110deg);
}
.pan-item:hover .pan-info p a {
opacity: 1;
transform: translateX(0px) rotate(0deg);
}
</style>
<template>
<div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item">
<div class="pan-info">
<div class="pan-info-roles-container">
<slot />
</div>
</div>
<img :src="image" class="pan-thumb">
</div>
</template>
<script>
export default {
name: 'PanThumb',
props: {
image: {
type: String,
required: true
},
zIndex: {
type: Number,
default: 1
},
width: {
type: String,
default: '150px'
},
height: {
type: String,
default: '150px'
}
}
}
</script>
<style scoped>
.pan-item {
width: 200px;
height: 200px;
border-radius: 50%;
display: inline-block;
position: relative;
cursor: default;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.pan-info-roles-container {
padding: 20px;
text-align: center;
}
.pan-thumb {
width: 100%;
height: 100%;
background-size: 100%;
border-radius: 50%;
overflow: hidden;
position: absolute;
transform-origin: 95% 40%;
transition: all 0.3s ease-in-out;
}
.pan-thumb:after {
content: '';
width: 8px;
height: 8px;
position: absolute;
border-radius: 50%;
top: 40%;
left: 95%;
margin: -4px 0 0 -4px;
background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%);
box-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
}
.pan-info {
position: absolute;
width: inherit;
height: inherit;
border-radius: 50%;
overflow: hidden;
box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05);
}
.pan-info h3 {
color: #fff;
text-transform: uppercase;
position: relative;
letter-spacing: 2px;
font-size: 18px;
margin: 0 60px;
padding: 22px 0 0 0;
height: 85px;
font-family: 'Open Sans', Arial, sans-serif;
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
}
.pan-info p {
color: #fff;
padding: 10px 5px;
font-style: italic;
margin: 0 30px;
font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.pan-info p a {
display: block;
color: #333;
width: 80px;
height: 80px;
background: rgba(255, 255, 255, 0.3);
border-radius: 50%;
color: #fff;
font-style: normal;
font-weight: 700;
text-transform: uppercase;
font-size: 9px;
letter-spacing: 1px;
padding-top: 24px;
margin: 7px auto 0;
font-family: 'Open Sans', Arial, sans-serif;
opacity: 0;
transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s;
transform: translateX(60px) rotate(90deg);
}
.pan-info p a:hover {
background: rgba(255, 255, 255, 0.5);
}
.pan-item:hover .pan-thumb {
transform: rotate(-110deg);
}
.pan-item:hover .pan-info p a {
opacity: 1;
transform: translateX(0px) rotate(0deg);
}
</style>

Some files were not shown because too many files have changed in this diff Show More