wcs静态页面
This commit is contained in:
parent
494763ed25
commit
1d9e38a3e5
7
.dockerignore
Normal file
7
.dockerignore
Normal file
@ -0,0 +1,7 @@
|
||||
.vscode/
|
||||
.idea/
|
||||
node_modules/
|
||||
dist/
|
||||
**/*.log
|
||||
LICENSE
|
||||
README.md
|
41
.drone.yml
Normal file
41
.drone.yml
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: docker:dind
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
- name: dockerconfig
|
||||
path: /root/.docker
|
||||
commands:
|
||||
- docker build -t harbor.picaiba.com/kszny/wms-ui:00a-1.0.0 ./ && docker push harbor.picaiba.com/kszny/wms-ui:00a-1.0.0
|
||||
|
||||
- name: deploy
|
||||
image: harbor.picaiba.com/tools/kubectl:1.19.8
|
||||
commands:
|
||||
- echo "172.27.0.20 lb.kubesphere.local" >> /etc/hosts
|
||||
#- echo "52.74.223.119 github.com" >> /etc/hosts
|
||||
- sleep 1
|
||||
- kubectl scale --replicas=0 deployment/a-wms-ui -n wms
|
||||
- sleep 3
|
||||
- kubectl scale --replicas=1 deployment/a-wms-ui -n wms
|
||||
depends_on:
|
||||
- build
|
||||
|
||||
volumes:
|
||||
- name: dockersock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
- name: dockerconfig
|
||||
host:
|
||||
path: /root/.docker
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- develop
|
||||
event:
|
||||
- push
|
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@ -0,0 +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
|
7
.env.production
Normal file
7
.env.production
Normal file
@ -0,0 +1,7 @@
|
||||
# just a flag
|
||||
ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = ''
|
||||
VUE_APP_REPORT_DESIGN_URL = '/ureport/designer'
|
||||
VUE_APP_REPORT_VIEW_URL = '/ureport/preview'
|
8
.env.staging
Normal file
8
.env.staging
Normal file
@ -0,0 +1,8 @@
|
||||
NODE_ENV = production
|
||||
|
||||
# just a flag
|
||||
ENV = 'staging'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
4
.eslintignore
Normal file
4
.eslintignore
Normal file
@ -0,0 +1,4 @@
|
||||
build/*.js
|
||||
src/assets
|
||||
public
|
||||
dist
|
198
.eslintrc.js
Normal file
198
.eslintrc.js
Normal file
@ -0,0 +1,198 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true,
|
||||
},
|
||||
extends: ['plugin:vue/recommended', 'eslint:recommended'],
|
||||
|
||||
// add your custom rules here
|
||||
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||
rules: {
|
||||
"vue/max-attributes-per-line": [2, {
|
||||
"singleline": 10,
|
||||
"multiline": {
|
||||
"max": 1,
|
||||
"allowFirstLine": false
|
||||
}
|
||||
}],
|
||||
"vue/singleline-html-element-content-newline": "off",
|
||||
"vue/multiline-html-element-content-newline":"off",
|
||||
"vue/name-property-casing": ["error", "PascalCase"],
|
||||
"vue/no-v-html": "off",
|
||||
'accessor-pairs': 2,
|
||||
'arrow-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'block-spacing': [2, 'always'],
|
||||
'brace-style': [2, '1tbs', {
|
||||
'allowSingleLine': true
|
||||
}],
|
||||
'camelcase': [0, {
|
||||
'properties': 'always'
|
||||
}],
|
||||
'comma-dangle': [2, 'never'],
|
||||
'comma-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'comma-style': [2, 'last'],
|
||||
'constructor-super': 2,
|
||||
'curly': [2, 'multi-line'],
|
||||
'dot-location': [2, 'property'],
|
||||
'eol-last': 2,
|
||||
'eqeqeq': ["error", "always", {"null": "ignore"}],
|
||||
'generator-star-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'handle-callback-err': [2, '^(err|error)$'],
|
||||
'indent': [2, 2, {
|
||||
'SwitchCase': 1
|
||||
}],
|
||||
'jsx-quotes': [2, 'prefer-single'],
|
||||
'key-spacing': [2, {
|
||||
'beforeColon': false,
|
||||
'afterColon': true
|
||||
}],
|
||||
'keyword-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'new-cap': [2, {
|
||||
'newIsCap': true,
|
||||
'capIsNew': false
|
||||
}],
|
||||
'new-parens': 2,
|
||||
'no-array-constructor': 2,
|
||||
'no-caller': 2,
|
||||
'no-console': 'off',
|
||||
'no-class-assign': 2,
|
||||
'no-cond-assign': 2,
|
||||
'no-const-assign': 2,
|
||||
'no-control-regex': 0,
|
||||
'no-delete-var': 2,
|
||||
'no-dupe-args': 2,
|
||||
'no-dupe-class-members': 2,
|
||||
'no-dupe-keys': 2,
|
||||
'no-duplicate-case': 2,
|
||||
'no-empty-character-class': 2,
|
||||
'no-empty-pattern': 2,
|
||||
'no-eval': 2,
|
||||
'no-ex-assign': 2,
|
||||
'no-extend-native': 2,
|
||||
'no-extra-bind': 2,
|
||||
'no-extra-boolean-cast': 2,
|
||||
'no-extra-parens': [2, 'functions'],
|
||||
'no-fallthrough': 2,
|
||||
'no-floating-decimal': 2,
|
||||
'no-func-assign': 2,
|
||||
'no-implied-eval': 2,
|
||||
'no-inner-declarations': [2, 'functions'],
|
||||
'no-invalid-regexp': 2,
|
||||
'no-irregular-whitespace': 2,
|
||||
'no-iterator': 2,
|
||||
'no-label-var': 2,
|
||||
'no-labels': [2, {
|
||||
'allowLoop': false,
|
||||
'allowSwitch': false
|
||||
}],
|
||||
'no-lone-blocks': 2,
|
||||
'no-mixed-spaces-and-tabs': 2,
|
||||
'no-multi-spaces': 2,
|
||||
'no-multi-str': 2,
|
||||
'no-multiple-empty-lines': [2, {
|
||||
'max': 1
|
||||
}],
|
||||
'no-native-reassign': 2,
|
||||
'no-negated-in-lhs': 2,
|
||||
'no-new-object': 2,
|
||||
'no-new-require': 2,
|
||||
'no-new-symbol': 2,
|
||||
'no-new-wrappers': 2,
|
||||
'no-obj-calls': 2,
|
||||
'no-octal': 2,
|
||||
'no-octal-escape': 2,
|
||||
'no-path-concat': 2,
|
||||
'no-proto': 2,
|
||||
'no-redeclare': 2,
|
||||
'no-regex-spaces': 2,
|
||||
'no-return-assign': [2, 'except-parens'],
|
||||
'no-self-assign': 2,
|
||||
'no-self-compare': 2,
|
||||
'no-sequences': 2,
|
||||
'no-shadow-restricted-names': 2,
|
||||
'no-spaced-func': 2,
|
||||
'no-sparse-arrays': 2,
|
||||
'no-this-before-super': 2,
|
||||
'no-throw-literal': 2,
|
||||
'no-trailing-spaces': 2,
|
||||
'no-undef': 2,
|
||||
'no-undef-init': 2,
|
||||
'no-unexpected-multiline': 2,
|
||||
'no-unmodified-loop-condition': 2,
|
||||
'no-unneeded-ternary': [2, {
|
||||
'defaultAssignment': false
|
||||
}],
|
||||
'no-unreachable': 2,
|
||||
'no-unsafe-finally': 2,
|
||||
'no-unused-vars': [2, {
|
||||
'vars': 'all',
|
||||
'args': 'none'
|
||||
}],
|
||||
'no-useless-call': 2,
|
||||
'no-useless-computed-key': 2,
|
||||
'no-useless-constructor': 2,
|
||||
'no-useless-escape': 0,
|
||||
'no-whitespace-before-property': 2,
|
||||
'no-with': 2,
|
||||
'one-var': [2, {
|
||||
'initialized': 'never'
|
||||
}],
|
||||
'operator-linebreak': [2, 'after', {
|
||||
'overrides': {
|
||||
'?': 'before',
|
||||
':': 'before'
|
||||
}
|
||||
}],
|
||||
'padded-blocks': [2, 'never'],
|
||||
'quotes': [2, 'single', {
|
||||
'avoidEscape': true,
|
||||
'allowTemplateLiterals': true
|
||||
}],
|
||||
'semi': [2, 'never'],
|
||||
'semi-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'space-before-blocks': [2, 'always'],
|
||||
'space-before-function-paren': [2, 'never'],
|
||||
'space-in-parens': [2, 'never'],
|
||||
'space-infix-ops': 2,
|
||||
'space-unary-ops': [2, {
|
||||
'words': true,
|
||||
'nonwords': false
|
||||
}],
|
||||
'spaced-comment': [2, 'always', {
|
||||
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
|
||||
}],
|
||||
'template-curly-spacing': [2, 'never'],
|
||||
'use-isnan': 2,
|
||||
'valid-typeof': 2,
|
||||
'wrap-iife': [2, 'any'],
|
||||
'yield-star-spacing': [2, 'both'],
|
||||
'yoda': [2, 'never'],
|
||||
'prefer-const': 2,
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'object-curly-spacing': [2, 'always', {
|
||||
objectsInObjects: false
|
||||
}],
|
||||
'array-bracket-spacing': [2, 'never']
|
||||
}
|
||||
}
|
25
.gitignore
vendored
Normal file
25
.gitignore
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
**/*.log
|
||||
|
||||
tests/**/coverage/
|
||||
tests/e2e/reports
|
||||
selenium-debug.log
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.local
|
||||
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
/.env.development
|
||||
vue.config.js
|
5
.travis.yml
Normal file
5
.travis.yml
Normal file
@ -0,0 +1,5 @@
|
||||
language: node_js
|
||||
node_js: 10
|
||||
script: npm run test
|
||||
notifications:
|
||||
email: false
|
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM node:12 AS builder
|
||||
WORKDIR /app
|
||||
ADD package.json /app/
|
||||
RUN npm config set registry https://registry.npmmirror.com && npm install git+https://gitee.com/shihairong/raphael && npm install
|
||||
ADD . /app
|
||||
RUN npm run build:prod
|
||||
|
||||
FROM busybox
|
||||
LABEL maintainer thomas.hairong@gmail.com
|
||||
COPY --from=builder /app/dist /html
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-present PanJiaChen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
26
babel.config.js
Normal file
26
babel.config.js
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* @Date: 2020-12-14 09:07:03
|
||||
* @LastEditors: guo
|
||||
* @LastEditTime: 2020-12-29 21:34:11
|
||||
* @FilePath: \basic-admin\babel.config.js
|
||||
* @Description: 修改babel配置
|
||||
* preset-env用于适配浏览器(最新4个版本)
|
||||
* transform-runtime 用于识别一些比较新的js语法
|
||||
*/
|
||||
module.exports = {
|
||||
presets: [
|
||||
['@babel/preset-env', {
|
||||
'useBuiltIns': 'usage',
|
||||
'debug': true,
|
||||
'targets': [
|
||||
'last 4 versions'
|
||||
]
|
||||
}],
|
||||
'@vue/app'
|
||||
],
|
||||
plugins: [
|
||||
['@babel/plugin-transform-runtime', {
|
||||
'corejs': 3
|
||||
}]
|
||||
]
|
||||
}
|
35
build/index.js
Normal file
35
build/index.js
Normal file
@ -0,0 +1,35 @@
|
||||
const { run } = require('runjs')
|
||||
const chalk = require('chalk')
|
||||
const config = require('../vue.config.js')
|
||||
const rawArgv = process.argv.slice(2)
|
||||
const args = rawArgv.join(' ')
|
||||
|
||||
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
|
||||
const report = rawArgv.includes('--report')
|
||||
|
||||
run(`vue-cli-service build ${args}`)
|
||||
|
||||
const port = 9526
|
||||
const publicPath = config.publicPath
|
||||
|
||||
var connect = require('connect')
|
||||
var serveStatic = require('serve-static')
|
||||
const app = connect()
|
||||
|
||||
app.use(
|
||||
publicPath,
|
||||
serveStatic('./dist', {
|
||||
index: ['index.html', '/']
|
||||
})
|
||||
)
|
||||
|
||||
app.listen(port, function () {
|
||||
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
|
||||
if (report) {
|
||||
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
run(`vue-cli-service build ${args}`)
|
||||
}
|
50
default.conf
Normal file
50
default.conf
Normal file
@ -0,0 +1,50 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ @rewrites;
|
||||
}
|
||||
|
||||
location /spc/ {
|
||||
proxy_pass http://58.210.206.230:8000/;
|
||||
}
|
||||
|
||||
location /api {
|
||||
access_log off;
|
||||
add_header Access-Control-Allow-Origin * always;
|
||||
add_header Access-Control-Allow-Methods GET,OPTIONS,POST,GET,PUT,DELETE always;
|
||||
add_header Access-Control-Allow-Headers $http_access_control_request_headers;
|
||||
add_header Access-Control-Allow-Credentials true;
|
||||
add_header Access-Control-Max-Age 1800;
|
||||
|
||||
if ($request_method = OPTIONS){
|
||||
add_header Access-Control-Allow-Origin * always;
|
||||
add_header Access-Control-Allow-Methods GET,OPTIONS,POST,GET,PUT,DELETE always;
|
||||
add_header Access-Control-Allow-Headers $http_access_control_request_headers;
|
||||
add_header Access-Control-Allow-Credentials true;
|
||||
add_header Access-Control-Max-Age 1800;
|
||||
return 204;
|
||||
}
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://mes:9090/api;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
|
||||
location @rewrites {
|
||||
rewrite ^(.+)$ /index.html last;
|
||||
}
|
||||
|
||||
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
|
||||
expires max;
|
||||
add_header Pragma public;
|
||||
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
|
||||
}
|
||||
}
|
24
jest.config.js
Normal file
24
jest.config.js
Normal file
@ -0,0 +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/'
|
||||
}
|
9
jsconfig.json
Normal file
9
jsconfig.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
116
mock/article.js
Normal file
116
mock/article.js
Normal file
@ -0,0 +1,116 @@
|
||||
import Mock from 'mockjs'
|
||||
|
||||
const List = []
|
||||
const count = 100
|
||||
|
||||
const baseContent = '<p>I am testing data, I am testing data.</p><p><img src="https://wpimg.wallstcn.com/4c69009c-0fd4-4153-b112-6cb53d1cf943"></p>'
|
||||
const image_uri = 'https://wpimg.wallstcn.com/e4558086-631c-425c-9430-56ffb46e70b3'
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
List.push(Mock.mock({
|
||||
id: '@increment',
|
||||
timestamp: +Mock.Random.date('T'),
|
||||
author: '@first',
|
||||
reviewer: '@first',
|
||||
title: '@title(5, 10)',
|
||||
content_short: 'mock data',
|
||||
content: baseContent,
|
||||
forecast: '@float(0, 100, 2, 2)',
|
||||
importance: '@integer(1, 3)',
|
||||
'type|1': ['CN', 'US', 'JP', 'EU'],
|
||||
'status|1': ['published', 'draft'],
|
||||
display_time: '@datetime',
|
||||
comment_disabled: true,
|
||||
pageviews: '@integer(300, 5000)',
|
||||
image_uri,
|
||||
platforms: ['a-platform']
|
||||
}))
|
||||
}
|
||||
|
||||
export default [
|
||||
{
|
||||
url: '/vue-element-admin/article/list',
|
||||
type: 'get',
|
||||
response: config => {
|
||||
const { importance, type, title, page = 1, limit = 20, sort } = config.query
|
||||
|
||||
let mockList = List.filter(item => {
|
||||
if (importance && item.importance !== +importance) return false
|
||||
if (type && item.type !== type) return false
|
||||
if (title && item.title.indexOf(title) < 0) return false
|
||||
return true
|
||||
})
|
||||
|
||||
if (sort === '-id') {
|
||||
mockList = mockList.reverse()
|
||||
}
|
||||
|
||||
const pageList = mockList.filter((item, index) => index < limit * page && index >= limit * (page - 1))
|
||||
|
||||
return {
|
||||
code: 20000,
|
||||
data: {
|
||||
total: mockList.length,
|
||||
items: pageList
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
url: '/vue-element-admin/article/detail',
|
||||
type: 'get',
|
||||
response: config => {
|
||||
const { id } = config.query
|
||||
for (const article of List) {
|
||||
if (article.id === +id) {
|
||||
return {
|
||||
code: 20000,
|
||||
data: article
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
url: '/vue-element-admin/article/pv',
|
||||
type: 'get',
|
||||
response: _ => {
|
||||
return {
|
||||
code: 20000,
|
||||
data: {
|
||||
pvData: [
|
||||
{ key: 'PC', pv: 1024 },
|
||||
{ key: 'mobile', pv: 1024 },
|
||||
{ key: 'ios', pv: 1024 },
|
||||
{ key: 'android', pv: 1024 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
url: '/vue-element-admin/article/create',
|
||||
type: 'post',
|
||||
response: _ => {
|
||||
return {
|
||||
code: 20000,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
url: '/vue-element-admin/article/update',
|
||||
type: 'post',
|
||||
response: _ => {
|
||||
return {
|
||||
code: 20000,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
57
mock/index.js
Normal file
57
mock/index.js
Normal file
@ -0,0 +1,57 @@
|
||||
import Mock from 'mockjs'
|
||||
import { param2Obj } from '../src/utils'
|
||||
|
||||
import user from './user'
|
||||
import role from './role'
|
||||
import article from './article'
|
||||
import search from './remote-search'
|
||||
|
||||
const mocks = [
|
||||
...user,
|
||||
...role,
|
||||
...article,
|
||||
...search
|
||||
]
|
||||
|
||||
// for front mock
|
||||
// please use it cautiously, it will redefine XMLHttpRequest,
|
||||
// which will cause many of your third-party libraries to be invalidated(like progress event).
|
||||
export function mockXHR() {
|
||||
// mock patch
|
||||
// https://github.com/nuysoft/Mock/issues/300
|
||||
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
|
||||
Mock.XHR.prototype.send = function() {
|
||||
if (this.custom.xhr) {
|
||||
this.custom.xhr.withCredentials = this.withCredentials || false
|
||||
|
||||
if (this.responseType) {
|
||||
this.custom.xhr.responseType = this.responseType
|
||||
}
|
||||
}
|
||||
this.proxy_send(...arguments)
|
||||
}
|
||||
|
||||
function XHR2ExpressReqWrap(respond) {
|
||||
return function(options) {
|
||||
let result = null
|
||||
if (respond instanceof Function) {
|
||||
const { body, type, url } = options
|
||||
// https://expressjs.com/en/4x/api.html#req
|
||||
result = respond({
|
||||
method: type,
|
||||
body: JSON.parse(body),
|
||||
query: param2Obj(url)
|
||||
})
|
||||
} else {
|
||||
result = respond
|
||||
}
|
||||
return Mock.mock(result)
|
||||
}
|
||||
}
|
||||
|
||||
for (const i of mocks) {
|
||||
Mock.mock(new RegExp(i.url), i.type || 'get', XHR2ExpressReqWrap(i.response))
|
||||
}
|
||||
}
|
||||
|
||||
export default mocks
|
84
mock/mock-server.js
Normal file
84
mock/mock-server.js
Normal file
@ -0,0 +1,84 @@
|
||||
const chokidar = require('chokidar')
|
||||
const bodyParser = require('body-parser')
|
||||
const chalk = require('chalk')
|
||||
const path = require('path')
|
||||
const Mock = require('mockjs')
|
||||
|
||||
const mockDir = path.join(process.cwd(), 'mock')
|
||||
|
||||
function registerRoutes(app) {
|
||||
let mockLastIndex
|
||||
const { default: mocks } = require('./index.js')
|
||||
const mocksForServer = mocks.map(route => {
|
||||
return responseFake(route.url, route.type, route.response)
|
||||
})
|
||||
for (const mock of mocksForServer) {
|
||||
app[mock.type](mock.url, mock.response)
|
||||
mockLastIndex = app._router.stack.length
|
||||
}
|
||||
const mockRoutesLength = Object.keys(mocksForServer).length
|
||||
return {
|
||||
mockRoutesLength: mockRoutesLength,
|
||||
mockStartIndex: mockLastIndex - mockRoutesLength
|
||||
}
|
||||
}
|
||||
|
||||
function unregisterRoutes() {
|
||||
Object.keys(require.cache).forEach(i => {
|
||||
if (i.includes(mockDir)) {
|
||||
delete require.cache[require.resolve(i)]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// for mock server
|
||||
const responseFake = (url, type, respond) => {
|
||||
return {
|
||||
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
|
||||
type: type || 'get',
|
||||
response(req, res) {
|
||||
console.log('request invoke:' + req.path)
|
||||
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = app => {
|
||||
// es6 polyfill
|
||||
require('@babel/register')
|
||||
|
||||
// parse app.body
|
||||
// https://expressjs.com/en/4x/api.html#req.body
|
||||
app.use(bodyParser.json())
|
||||
app.use(bodyParser.urlencoded({
|
||||
extended: true
|
||||
}))
|
||||
|
||||
const mockRoutes = registerRoutes(app)
|
||||
var mockRoutesLength = mockRoutes.mockRoutesLength
|
||||
var mockStartIndex = mockRoutes.mockStartIndex
|
||||
|
||||
// watch files, hot reload mock server
|
||||
chokidar.watch(mockDir, {
|
||||
ignored: /mock-server/,
|
||||
ignoreInitial: true
|
||||
}).on('all', (event, path) => {
|
||||
if (event === 'change' || event === 'add') {
|
||||
try {
|
||||
// remove mock routes stack
|
||||
app._router.stack.splice(mockStartIndex, mockRoutesLength)
|
||||
|
||||
// clear routes cache
|
||||
unregisterRoutes()
|
||||
|
||||
const mockRoutes = registerRoutes(app)
|
||||
mockRoutesLength = mockRoutes.mockRoutesLength
|
||||
mockStartIndex = mockRoutes.mockStartIndex
|
||||
|
||||
console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
|
||||
} catch (error) {
|
||||
console.log(chalk.redBright(error))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
51
mock/remote-search.js
Normal file
51
mock/remote-search.js
Normal file
@ -0,0 +1,51 @@
|
||||
import Mock from 'mockjs'
|
||||
|
||||
const NameList = []
|
||||
const count = 100
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
NameList.push(Mock.mock({
|
||||
name: '@first'
|
||||
}))
|
||||
}
|
||||
NameList.push({ name: 'mock-Pan' })
|
||||
|
||||
export default [
|
||||
// username search
|
||||
{
|
||||
url: '/vue-element-admin/search/user',
|
||||
type: 'get',
|
||||
response: config => {
|
||||
const { name } = config.query
|
||||
const mockNameList = NameList.filter(item => {
|
||||
const lowerCaseName = item.name.toLowerCase()
|
||||
return !(name && lowerCaseName.indexOf(name.toLowerCase()) < 0)
|
||||
})
|
||||
return {
|
||||
code: 20000,
|
||||
data: { items: mockNameList }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// transaction list
|
||||
{
|
||||
url: '/vue-element-admin/transaction/list',
|
||||
type: 'get',
|
||||
response: _ => {
|
||||
return {
|
||||
code: 20000,
|
||||
data: {
|
||||
total: 20,
|
||||
'items|20': [{
|
||||
order_no: '@guid()',
|
||||
timestamp: +Mock.Random.date('T'),
|
||||
username: '@name()',
|
||||
price: '@float(1000, 15000, 0, 2)',
|
||||
'status|1': ['success', 'pending']
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
98
mock/role/index.js
Normal file
98
mock/role/index.js
Normal file
@ -0,0 +1,98 @@
|
||||
import Mock from 'mockjs'
|
||||
import { deepClone } from '../../src/utils/index.js'
|
||||
import { asyncRoutes, constantRoutes } from './routes.js'
|
||||
|
||||
const routes = deepClone([...constantRoutes, ...asyncRoutes])
|
||||
|
||||
const roles = [
|
||||
{
|
||||
key: 'admin',
|
||||
name: 'admin',
|
||||
description: 'Super Administrator. Have access to view all pages.',
|
||||
routes: routes
|
||||
},
|
||||
{
|
||||
key: 'editor',
|
||||
name: 'editor',
|
||||
description: 'Normal Editor. Can see all pages except permission page',
|
||||
routes: routes.filter(i => i.path !== '/permission')// just a mock
|
||||
},
|
||||
{
|
||||
key: 'visitor',
|
||||
name: 'visitor',
|
||||
description: 'Just a visitor. Can only see the home page and the document page',
|
||||
routes: [{
|
||||
path: '',
|
||||
redirect: 'dashboard',
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
name: 'Dashboard',
|
||||
meta: { title: 'dashboard', icon: 'dashboard' }
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
|
||||
export default [
|
||||
// mock get all routes form server
|
||||
{
|
||||
url: '/vue-element-admin/routes',
|
||||
type: 'get',
|
||||
response: _ => {
|
||||
return {
|
||||
code: 20000,
|
||||
data: routes
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// mock get all roles form server
|
||||
{
|
||||
url: '/vue-element-admin/roles',
|
||||
type: 'get',
|
||||
response: _ => {
|
||||
return {
|
||||
code: 20000,
|
||||
data: roles
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// add role
|
||||
{
|
||||
url: '/vue-element-admin/role',
|
||||
type: 'post',
|
||||
response: {
|
||||
code: 20000,
|
||||
data: {
|
||||
key: Mock.mock('@integer(300, 5000)')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// update role
|
||||
{
|
||||
url: '/vue-element-admin/role/[A-Za-z0-9]',
|
||||
type: 'put',
|
||||
response: {
|
||||
code: 20000,
|
||||
data: {
|
||||
status: 'success'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// delete role
|
||||
{
|
||||
url: '/vue-element-admin/role/[A-Za-z0-9]',
|
||||
type: 'delete',
|
||||
response: {
|
||||
code: 20000,
|
||||
data: {
|
||||
status: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
525
mock/role/routes.js
Normal file
525
mock/role/routes.js
Normal file
@ -0,0 +1,525 @@
|
||||
// Just a mock data
|
||||
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: '/redirect',
|
||||
component: 'layout/Layout',
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path*',
|
||||
component: 'views/redirect/index'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: 'views/login/index',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/auth-redirect',
|
||||
component: 'views/login/auth-redirect',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: 'views/error-page/404',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: 'views/error-page/401',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: 'layout/Layout',
|
||||
redirect: 'dashboard',
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: 'views/dashboard/index',
|
||||
name: 'Dashboard',
|
||||
meta: { title: 'Dashboard', icon: 'dashboard', affix: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/documentation',
|
||||
component: 'layout/Layout',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: 'views/documentation/index',
|
||||
name: 'Documentation',
|
||||
meta: { title: 'Documentation', icon: 'documentation', affix: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/guide',
|
||||
component: 'layout/Layout',
|
||||
redirect: '/guide/index',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: 'views/guide/index',
|
||||
name: 'Guide',
|
||||
meta: { title: 'Guide', icon: 'guide', noCache: true }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
export const asyncRoutes = [
|
||||
{
|
||||
path: '/permission',
|
||||
component: 'layout/Layout',
|
||||
redirect: '/permission/index',
|
||||
alwaysShow: true,
|
||||
meta: {
|
||||
title: 'Permission',
|
||||
icon: 'lock',
|
||||
roles: ['admin', 'editor']
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'page',
|
||||
component: 'views/permission/page',
|
||||
name: 'PagePermission',
|
||||
meta: {
|
||||
title: 'Page Permission',
|
||||
roles: ['admin']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'directive',
|
||||
component: 'views/permission/directive',
|
||||
name: 'DirectivePermission',
|
||||
meta: {
|
||||
title: 'Directive Permission'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'role',
|
||||
component: 'views/permission/role',
|
||||
name: 'RolePermission',
|
||||
meta: {
|
||||
title: 'Role Permission',
|
||||
roles: ['admin']
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/icon',
|
||||
component: 'layout/Layout',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: 'views/icons/index',
|
||||
name: 'Icons',
|
||||
meta: { title: 'Icons', icon: 'icon', noCache: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/components',
|
||||
component: 'layout/Layout',
|
||||
redirect: 'noRedirect',
|
||||
name: 'ComponentDemo',
|
||||
meta: {
|
||||
title: 'Components',
|
||||
icon: 'component'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'tinymce',
|
||||
component: 'views/components-demo/tinymce',
|
||||
name: 'TinymceDemo',
|
||||
meta: { title: 'Tinymce' }
|
||||
},
|
||||
{
|
||||
path: 'markdown',
|
||||
component: 'views/components-demo/markdown',
|
||||
name: 'MarkdownDemo',
|
||||
meta: { title: 'Markdown' }
|
||||
},
|
||||
{
|
||||
path: 'json-editor',
|
||||
component: 'views/components-demo/json-editor',
|
||||
name: 'JsonEditorDemo',
|
||||
meta: { title: 'Json Editor' }
|
||||
},
|
||||
{
|
||||
path: 'split-pane',
|
||||
component: 'views/components-demo/split-pane',
|
||||
name: 'SplitpaneDemo',
|
||||
meta: { title: 'SplitPane' }
|
||||
},
|
||||
{
|
||||
path: 'avatar-upload',
|
||||
component: 'views/components-demo/avatar-upload',
|
||||
name: 'AvatarUploadDemo',
|
||||
meta: { title: 'Avatar Upload' }
|
||||
},
|
||||
{
|
||||
path: 'dropzone',
|
||||
component: 'views/components-demo/dropzone',
|
||||
name: 'DropzoneDemo',
|
||||
meta: { title: 'Dropzone' }
|
||||
},
|
||||
{
|
||||
path: 'sticky',
|
||||
component: 'views/components-demo/sticky',
|
||||
name: 'StickyDemo',
|
||||
meta: { title: 'Sticky' }
|
||||
},
|
||||
{
|
||||
path: 'count-to',
|
||||
component: 'views/components-demo/count-to',
|
||||
name: 'CountToDemo',
|
||||
meta: { title: 'Count To' }
|
||||
},
|
||||
{
|
||||
path: 'mixin',
|
||||
component: 'views/components-demo/mixin',
|
||||
name: 'ComponentMixinDemo',
|
||||
meta: { title: 'componentMixin' }
|
||||
},
|
||||
{
|
||||
path: 'back-to-top',
|
||||
component: 'views/components-demo/back-to-top',
|
||||
name: 'BackToTopDemo',
|
||||
meta: { title: 'Back To Top' }
|
||||
},
|
||||
{
|
||||
path: 'drag-dialog',
|
||||
component: 'views/components-demo/drag-dialog',
|
||||
name: 'DragDialogDemo',
|
||||
meta: { title: 'Drag Dialog' }
|
||||
},
|
||||
{
|
||||
path: 'drag-select',
|
||||
component: 'views/components-demo/drag-select',
|
||||
name: 'DragSelectDemo',
|
||||
meta: { title: 'Drag Select' }
|
||||
},
|
||||
{
|
||||
path: 'dnd-list',
|
||||
component: 'views/components-demo/dnd-list',
|
||||
name: 'DndListDemo',
|
||||
meta: { title: 'Dnd List' }
|
||||
},
|
||||
{
|
||||
path: 'drag-kanban',
|
||||
component: 'views/components-demo/drag-kanban',
|
||||
name: 'DragKanbanDemo',
|
||||
meta: { title: 'Drag Kanban' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/charts',
|
||||
component: 'layout/Layout',
|
||||
redirect: 'noRedirect',
|
||||
name: 'Charts',
|
||||
meta: {
|
||||
title: 'Charts',
|
||||
icon: 'chart'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'keyboard',
|
||||
component: 'views/charts/keyboard',
|
||||
name: 'KeyboardChart',
|
||||
meta: { title: 'Keyboard Chart', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'line',
|
||||
component: 'views/charts/line',
|
||||
name: 'LineChart',
|
||||
meta: { title: 'Line Chart', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'mixchart',
|
||||
component: 'views/charts/mixChart',
|
||||
name: 'MixChart',
|
||||
meta: { title: 'Mix Chart', noCache: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/nested',
|
||||
component: 'layout/Layout',
|
||||
redirect: '/nested/menu1/menu1-1',
|
||||
name: 'Nested',
|
||||
meta: {
|
||||
title: 'Nested',
|
||||
icon: 'nested'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'menu1',
|
||||
component: 'views/nested/menu1/index',
|
||||
name: 'Menu1',
|
||||
meta: { title: 'Menu1' },
|
||||
redirect: '/nested/menu1/menu1-1',
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-1',
|
||||
component: 'views/nested/menu1/menu1-1',
|
||||
name: 'Menu1-1',
|
||||
meta: { title: 'Menu1-1' }
|
||||
},
|
||||
{
|
||||
path: 'menu1-2',
|
||||
component: 'views/nested/menu1/menu1-2',
|
||||
name: 'Menu1-2',
|
||||
redirect: '/nested/menu1/menu1-2/menu1-2-1',
|
||||
meta: { title: 'Menu1-2' },
|
||||
children: [
|
||||
{
|
||||
path: 'menu1-2-1',
|
||||
component: 'views/nested/menu1/menu1-2/menu1-2-1',
|
||||
name: 'Menu1-2-1',
|
||||
meta: { title: 'Menu1-2-1' }
|
||||
},
|
||||
{
|
||||
path: 'menu1-2-2',
|
||||
component: 'views/nested/menu1/menu1-2/menu1-2-2',
|
||||
name: 'Menu1-2-2',
|
||||
meta: { title: 'Menu1-2-2' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'menu1-3',
|
||||
component: 'views/nested/menu1/menu1-3',
|
||||
name: 'Menu1-3',
|
||||
meta: { title: 'Menu1-3' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'menu2',
|
||||
name: 'Menu2',
|
||||
component: 'views/nested/menu2/index',
|
||||
meta: { title: 'Menu2' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/example',
|
||||
component: 'layout/Layout',
|
||||
redirect: '/example/list',
|
||||
name: 'Example',
|
||||
meta: {
|
||||
title: 'Example',
|
||||
icon: 'example'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'create',
|
||||
component: 'views/example/create',
|
||||
name: 'CreateArticle',
|
||||
meta: { title: 'Create Article', icon: 'edit' }
|
||||
},
|
||||
{
|
||||
path: 'edit/:id(\\d+)',
|
||||
component: 'views/example/edit',
|
||||
name: 'EditArticle',
|
||||
meta: { title: 'Edit Article', noCache: true },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
component: 'views/example/list',
|
||||
name: 'ArticleList',
|
||||
meta: { title: 'Article List', icon: 'list' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/tab',
|
||||
component: 'layout/Layout',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: 'views/tab/index',
|
||||
name: 'Tab',
|
||||
meta: { title: 'Tab', icon: 'tab' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/error',
|
||||
component: 'layout/Layout',
|
||||
redirect: 'noRedirect',
|
||||
name: 'ErrorPages',
|
||||
meta: {
|
||||
title: 'Error Pages',
|
||||
icon: '404'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '401',
|
||||
component: 'views/error-page/401',
|
||||
name: 'Page401',
|
||||
meta: { title: 'Page 401', noCache: true }
|
||||
},
|
||||
{
|
||||
path: '404',
|
||||
component: 'views/error-page/404',
|
||||
name: 'Page404',
|
||||
meta: { title: 'Page 404', noCache: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/error-log',
|
||||
component: 'layout/Layout',
|
||||
redirect: 'noRedirect',
|
||||
children: [
|
||||
{
|
||||
path: 'log',
|
||||
component: 'views/error-log/index',
|
||||
name: 'ErrorLog',
|
||||
meta: { title: 'Error Log', icon: 'bug' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/excel',
|
||||
component: 'layout/Layout',
|
||||
redirect: '/excel/export-excel',
|
||||
name: 'Excel',
|
||||
meta: {
|
||||
title: 'Excel',
|
||||
icon: 'excel'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'export-excel',
|
||||
component: 'views/excel/export-excel',
|
||||
name: 'ExportExcel',
|
||||
meta: { title: 'Export Excel' }
|
||||
},
|
||||
{
|
||||
path: 'export-selected-excel',
|
||||
component: 'views/excel/select-excel',
|
||||
name: 'SelectExcel',
|
||||
meta: { title: 'Select Excel' }
|
||||
},
|
||||
{
|
||||
path: 'export-merge-header',
|
||||
component: 'views/excel/merge-header',
|
||||
name: 'MergeHeader',
|
||||
meta: { title: 'Merge Header' }
|
||||
},
|
||||
{
|
||||
path: 'upload-excel',
|
||||
component: 'views/excel/upload-excel',
|
||||
name: 'UploadExcel',
|
||||
meta: { title: 'Upload Excel' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/zip',
|
||||
component: 'layout/Layout',
|
||||
redirect: '/zip/download',
|
||||
alwaysShow: true,
|
||||
meta: { title: 'Zip', icon: 'zip' },
|
||||
children: [
|
||||
{
|
||||
path: 'download',
|
||||
component: 'views/zip/index',
|
||||
name: 'ExportZip',
|
||||
meta: { title: 'Export Zip' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/pdf',
|
||||
component: 'layout/Layout',
|
||||
redirect: '/pdf/index',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: 'views/pdf/index',
|
||||
name: 'PDF',
|
||||
meta: { title: 'PDF', icon: 'pdf' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/pdf/download',
|
||||
component: 'views/pdf/download',
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{
|
||||
path: '/theme',
|
||||
component: 'layout/Layout',
|
||||
redirect: 'noRedirect',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: 'views/theme/index',
|
||||
name: 'Theme',
|
||||
meta: { title: 'Theme', icon: 'theme' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/clipboard',
|
||||
component: 'layout/Layout',
|
||||
redirect: 'noRedirect',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: 'views/clipboard/index',
|
||||
name: 'ClipboardDemo',
|
||||
meta: { title: 'Clipboard Demo', icon: 'clipboard' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/i18n',
|
||||
component: 'layout/Layout',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: 'views/i18n-demo/index',
|
||||
name: 'I18n',
|
||||
meta: { title: 'I18n', icon: 'international' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: 'external-link',
|
||||
component: 'layout/Layout',
|
||||
children: [
|
||||
{
|
||||
path: 'https://github.com/PanJiaChen/vue-element-admin',
|
||||
meta: { title: 'External Link', icon: 'link' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
]
|
84
mock/user.js
Normal file
84
mock/user.js
Normal file
@ -0,0 +1,84 @@
|
||||
|
||||
const tokens = {
|
||||
admin: {
|
||||
token: 'admin-token'
|
||||
},
|
||||
editor: {
|
||||
token: 'editor-token'
|
||||
}
|
||||
}
|
||||
|
||||
const users = {
|
||||
'admin-token': {
|
||||
roles: ['admin'],
|
||||
introduction: 'I am a super administrator',
|
||||
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
|
||||
name: 'Super Admin'
|
||||
},
|
||||
'editor-token': {
|
||||
roles: ['editor'],
|
||||
introduction: 'I am an editor',
|
||||
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
|
||||
name: 'Normal Editor'
|
||||
}
|
||||
}
|
||||
|
||||
export default [
|
||||
// user login
|
||||
{
|
||||
url: '/vue-element-admin/user/login',
|
||||
type: 'post',
|
||||
response: config => {
|
||||
const { username } = config.body
|
||||
const token = tokens[username]
|
||||
|
||||
// mock error
|
||||
if (!token) {
|
||||
return {
|
||||
code: 60204,
|
||||
message: 'Account and password are incorrect.'
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
code: 20000,
|
||||
data: token
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// get user info
|
||||
{
|
||||
url: '/vue-element-admin/user/info\.*',
|
||||
type: 'get',
|
||||
response: config => {
|
||||
const { token } = config.query
|
||||
const info = users[token]
|
||||
|
||||
// mock error
|
||||
if (!info) {
|
||||
return {
|
||||
code: 50008,
|
||||
message: 'Login failed, unable to get user details.'
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
code: 20000,
|
||||
data: info
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// user logout
|
||||
{
|
||||
url: '/vue-element-admin/user/logout',
|
||||
type: 'post',
|
||||
response: _ => {
|
||||
return {
|
||||
code: 20000,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
129
package.json
Normal file
129
package.json
Normal file
@ -0,0 +1,129 @@
|
||||
{
|
||||
"name": "vue-element-admin",
|
||||
"version": "4.2.1",
|
||||
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
|
||||
"author": "Pan <panfree23@gmail.com>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
"test:ci": "npm run lint && npm run test:unit",
|
||||
"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",
|
||||
"boilerplate",
|
||||
"admin-template",
|
||||
"management-system"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/PanJiaChen/vue-element-admin.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/PanJiaChen/vue-element-admin/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "0.18.1",
|
||||
"clipboard": "2.0.4",
|
||||
"codemirror": "5.45.0",
|
||||
"desandro-matches-selector": "^2.0.2",
|
||||
"driver.js": "0.9.5",
|
||||
"dropzone": "5.5.1",
|
||||
"echarts": "4.2.1",
|
||||
"element-ui": "2.13.0",
|
||||
"ev-emitter": "^2.1.0",
|
||||
"file-saver": "2.0.1",
|
||||
"fizzy-ui-utils": "^3.0.0",
|
||||
"fuse.js": "3.4.4",
|
||||
"get-size": "^2.0.3",
|
||||
"js-cookie": "2.2.0",
|
||||
"jsonlint": "1.6.3",
|
||||
"jszip": "3.2.1",
|
||||
"lodash": "^4.17.15",
|
||||
"masonry-layout": "^4.2.2",
|
||||
"moment": "^2.27.0",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"outlayer": "^2.1.1",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"raphael": "git+https://gitee.com/shihairong/raphael",
|
||||
"screenfull": "4.2.0",
|
||||
"script-loader": "0.7.2",
|
||||
"showdown": "1.9.0",
|
||||
"sortablejs": "1.8.4",
|
||||
"tui-editor": "1.4.10",
|
||||
"viewerjs": "^1.6.1",
|
||||
"vue": "2.6.10",
|
||||
"vue-bus": "^1.2.1",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-i18n": "^8.22.2",
|
||||
"vue-perfect-scrollbar": "^0.2.1",
|
||||
"vue-router": "3.0.2",
|
||||
"vue-splitpane": "1.0.4",
|
||||
"vuedraggable": "2.20.0",
|
||||
"vuex": "3.1.0",
|
||||
"xlsx": "0.14.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0",
|
||||
"@babel/plugin-transform-runtime": "^7.12.10",
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@babel/register": "7.0.0",
|
||||
"@babel/runtime-corejs3": "^7.12.5",
|
||||
"@vue/cli-plugin-babel": "3.5.3",
|
||||
"@vue/cli-plugin-eslint": "^3.9.1",
|
||||
"@vue/cli-plugin-unit-jest": "3.5.3",
|
||||
"@vue/cli-service": "3.5.3",
|
||||
"@vue/test-utils": "1.0.0-beta.29",
|
||||
"autoprefixer": "^9.5.1",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "^8.2.2",
|
||||
"babel-jest": "23.6.0",
|
||||
"chalk": "2.4.2",
|
||||
"chokidar": "2.1.5",
|
||||
"connect": "3.6.6",
|
||||
"eslint": "5.15.3",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"husky": "1.3.1",
|
||||
"lint-staged": "8.1.5",
|
||||
"mockjs": "1.0.1-beta3",
|
||||
"plop": "2.3.0",
|
||||
"runjs": "^4.3.2",
|
||||
"sass": "^1.26.10",
|
||||
"sass-loader": "^7.1.0",
|
||||
"script-ext-html-webpack-plugin": "2.1.3",
|
||||
"serve-static": "^1.13.2",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.0",
|
||||
"vue-template-compiler": "2.6.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
}
|
26
plop-templates/component/index.hbs
Normal file
26
plop-templates/component/index.hbs
Normal file
@ -0,0 +1,26 @@
|
||||
{{#if template}}
|
||||
<template>
|
||||
<div />
|
||||
</template>
|
||||
{{/if}}
|
||||
|
||||
{{#if script}}
|
||||
<script>
|
||||
export default {
|
||||
name: '{{ properCase name }}',
|
||||
props: {},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
{{/if}}
|
||||
|
||||
{{#if style}}
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
{{/if}}
|
55
plop-templates/component/prompt.js
Normal file
55
plop-templates/component/prompt.js
Normal file
@ -0,0 +1,55 @@
|
||||
const { notEmpty } = require('../utils.js')
|
||||
|
||||
module.exports = {
|
||||
description: 'generate vue component',
|
||||
prompts: [{
|
||||
type: 'input',
|
||||
name: 'name',
|
||||
message: 'component name please',
|
||||
validate: notEmpty('name')
|
||||
},
|
||||
{
|
||||
type: 'checkbox',
|
||||
name: 'blocks',
|
||||
message: 'Blocks:',
|
||||
choices: [{
|
||||
name: '<template>',
|
||||
value: 'template',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
name: '<script>',
|
||||
value: 'script',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
name: 'style',
|
||||
value: 'style',
|
||||
checked: true
|
||||
}
|
||||
],
|
||||
validate(value) {
|
||||
if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
|
||||
return 'Components require at least a <script> or <template> tag.'
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
],
|
||||
actions: data => {
|
||||
const name = '{{properCase name}}'
|
||||
const actions = [{
|
||||
type: 'add',
|
||||
path: `src/components/${name}/index.vue`,
|
||||
templateFile: 'plop-templates/component/index.hbs',
|
||||
data: {
|
||||
name: name,
|
||||
template: data.blocks.includes('template'),
|
||||
script: data.blocks.includes('script'),
|
||||
style: data.blocks.includes('style')
|
||||
}
|
||||
}]
|
||||
|
||||
return actions
|
||||
}
|
||||
}
|
16
plop-templates/store/index.hbs
Normal file
16
plop-templates/store/index.hbs
Normal file
@ -0,0 +1,16 @@
|
||||
{{#if state}}
|
||||
const state = {}
|
||||
{{/if}}
|
||||
|
||||
{{#if mutations}}
|
||||
const mutations = {}
|
||||
{{/if}}
|
||||
|
||||
{{#if actions}}
|
||||
const actions = {}
|
||||
{{/if}}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
{{options}}
|
||||
}
|
62
plop-templates/store/prompt.js
Normal file
62
plop-templates/store/prompt.js
Normal file
@ -0,0 +1,62 @@
|
||||
const { notEmpty } = require('../utils.js')
|
||||
|
||||
module.exports = {
|
||||
description: 'generate store',
|
||||
prompts: [{
|
||||
type: 'input',
|
||||
name: 'name',
|
||||
message: 'store name please',
|
||||
validate: notEmpty('name')
|
||||
},
|
||||
{
|
||||
type: 'checkbox',
|
||||
name: 'blocks',
|
||||
message: 'Blocks:',
|
||||
choices: [{
|
||||
name: 'state',
|
||||
value: 'state',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
name: 'mutations',
|
||||
value: 'mutations',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
name: 'actions',
|
||||
value: 'actions',
|
||||
checked: true
|
||||
}
|
||||
],
|
||||
validate(value) {
|
||||
if (!value.includes('state') || !value.includes('mutations')) {
|
||||
return 'store require at least state and mutations'
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
],
|
||||
actions(data) {
|
||||
const name = '{{name}}'
|
||||
const { blocks } = data
|
||||
const options = ['state', 'mutations']
|
||||
const joinFlag = `,
|
||||
`
|
||||
if (blocks.length === 3) {
|
||||
options.push('actions')
|
||||
}
|
||||
|
||||
const actions = [{
|
||||
type: 'add',
|
||||
path: `src/store/modules/${name}.js`,
|
||||
templateFile: 'plop-templates/store/index.hbs',
|
||||
data: {
|
||||
options: options.join(joinFlag),
|
||||
state: blocks.includes('state'),
|
||||
mutations: blocks.includes('mutations'),
|
||||
actions: blocks.includes('actions')
|
||||
}
|
||||
}]
|
||||
return actions
|
||||
}
|
||||
}
|
89
plop-templates/table/index.hbs
Normal file
89
plop-templates/table/index.hbs
Normal file
@ -0,0 +1,89 @@
|
||||
{{#if template}}
|
||||
<template>
|
||||
<div class="{{ name }}-container">
|
||||
<base-table :table-config="tableProps" :table-data="list" :is-loading="listLoading">
|
||||
<method-btn slot="handleBtn" :method-list="tableBtn" @clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
{{/if}}
|
||||
|
||||
{{#if script}}
|
||||
<script>
|
||||
// edit here
|
||||
const tableBtn = [{
|
||||
type: 'edit',
|
||||
btnName: 'btn.edit'
|
||||
}, {
|
||||
type: 'delete',
|
||||
btnName: 'btn.delete'
|
||||
}]
|
||||
const tableProps = [{
|
||||
prop: '',
|
||||
label: '',
|
||||
width: '',
|
||||
filter: null,
|
||||
subcomponent: null,
|
||||
align: ''
|
||||
}]
|
||||
import BaseTable from '@/components/BaseTable'
|
||||
// edit here
|
||||
import { fetchList } from '@/api/article'
|
||||
|
||||
import Pagination from '@/components/Pagination'
|
||||
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
|
||||
export default {
|
||||
name: '{{ properCase name }}',
|
||||
props: {},
|
||||
components: { Pagination, BaseTable, MethodBtn },
|
||||
data() {
|
||||
return {
|
||||
tableBtn,
|
||||
tableProps,
|
||||
list: [],
|
||||
total: 0,
|
||||
listLoading: true,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
handleClick(raw) {
|
||||
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
// edit here
|
||||
fetchList(this.listQuery).then(response => {
|
||||
this.list = response.data.records
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{/if}}
|
||||
|
||||
{{#if style}}
|
||||
<style lang="scss" scoped>
|
||||
.{{ name }}-container {
|
||||
|
||||
}
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 10px;
|
||||
}
|
||||
</style>
|
||||
{{/if}}
|
55
plop-templates/table/prompt.js
Normal file
55
plop-templates/table/prompt.js
Normal file
@ -0,0 +1,55 @@
|
||||
const { notEmpty } = require('../utils.js')
|
||||
|
||||
module.exports = {
|
||||
description: 'generate a table-view',
|
||||
prompts: [{
|
||||
type: 'input',
|
||||
name: 'name',
|
||||
message: 'input table name please',
|
||||
validate: notEmpty('name')
|
||||
},
|
||||
{
|
||||
type: 'checkbox',
|
||||
name: 'blocks',
|
||||
message: 'Blocks:',
|
||||
choices: [{
|
||||
name: '<template>',
|
||||
value: 'template',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
name: '<script>',
|
||||
value: 'script',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
name: 'style',
|
||||
value: 'style',
|
||||
checked: true
|
||||
}
|
||||
],
|
||||
validate(value) {
|
||||
if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
|
||||
return 'View require at least a <script> or <template> tag.'
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
],
|
||||
actions: data => {
|
||||
const name = '{{name}}'
|
||||
const actions = [{
|
||||
type: 'add',
|
||||
path: `src/views/${name}/index.vue`,
|
||||
templateFile: 'plop-templates/table/index.hbs',
|
||||
data: {
|
||||
name: name,
|
||||
template: data.blocks.includes('template'),
|
||||
script: data.blocks.includes('script'),
|
||||
style: data.blocks.includes('style')
|
||||
}
|
||||
}]
|
||||
|
||||
return actions
|
||||
}
|
||||
}
|
9
plop-templates/utils.js
Normal file
9
plop-templates/utils.js
Normal file
@ -0,0 +1,9 @@
|
||||
exports.notEmpty = name => {
|
||||
return v => {
|
||||
if (!v || v.trim === '') {
|
||||
return `${name} is required`
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
26
plop-templates/view/index.hbs
Normal file
26
plop-templates/view/index.hbs
Normal file
@ -0,0 +1,26 @@
|
||||
{{#if template}}
|
||||
<template>
|
||||
<div />
|
||||
</template>
|
||||
{{/if}}
|
||||
|
||||
{{#if script}}
|
||||
<script>
|
||||
export default {
|
||||
name: '{{ properCase name }}',
|
||||
props: {},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
{{/if}}
|
||||
|
||||
{{#if style}}
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
{{/if}}
|
55
plop-templates/view/prompt.js
Normal file
55
plop-templates/view/prompt.js
Normal file
@ -0,0 +1,55 @@
|
||||
const { notEmpty } = require('../utils.js')
|
||||
|
||||
module.exports = {
|
||||
description: 'generate a view',
|
||||
prompts: [{
|
||||
type: 'input',
|
||||
name: 'name',
|
||||
message: 'view name please',
|
||||
validate: notEmpty('name')
|
||||
},
|
||||
{
|
||||
type: 'checkbox',
|
||||
name: 'blocks',
|
||||
message: 'Blocks:',
|
||||
choices: [{
|
||||
name: '<template>',
|
||||
value: 'template',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
name: '<script>',
|
||||
value: 'script',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
name: 'style',
|
||||
value: 'style',
|
||||
checked: true
|
||||
}
|
||||
],
|
||||
validate(value) {
|
||||
if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
|
||||
return 'View require at least a <script> or <template> tag.'
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
],
|
||||
actions: data => {
|
||||
const name = '{{name}}'
|
||||
const actions = [{
|
||||
type: 'add',
|
||||
path: `src/views/${name}/index.vue`,
|
||||
templateFile: 'plop-templates/view/index.hbs',
|
||||
data: {
|
||||
name: name,
|
||||
template: data.blocks.includes('template'),
|
||||
script: data.blocks.includes('script'),
|
||||
style: data.blocks.includes('style')
|
||||
}
|
||||
}]
|
||||
|
||||
return actions
|
||||
}
|
||||
}
|
11
plopfile.js
Normal file
11
plopfile.js
Normal file
@ -0,0 +1,11 @@
|
||||
const viewGenerator = require('./plop-templates/view/prompt')
|
||||
const componentGenerator = require('./plop-templates/component/prompt')
|
||||
const storeGenerator = require('./plop-templates/store/prompt.js')
|
||||
const tableGenerator = require('./plop-templates/table/prompt.js')
|
||||
|
||||
module.exports = function(plop) {
|
||||
plop.setGenerator('view', viewGenerator)
|
||||
plop.setGenerator('component', componentGenerator)
|
||||
plop.setGenerator('store', storeGenerator)
|
||||
plop.setGenerator('tablepage', tableGenerator)
|
||||
}
|
5
postcss.config.js
Normal file
5
postcss.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
autoprefixer: {}
|
||||
}
|
||||
}
|
BIN
public/Lodap.zip
Normal file
BIN
public/Lodap.zip
Normal file
Binary file not shown.
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
22
public/index.html
Normal file
22
public/index.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!--
|
||||
* @Author: gtz
|
||||
* @Date: 2021-01-27 10:07:42
|
||||
* @LastEditors: gtz
|
||||
* @LastEditTime: 2021-02-24 10:15:28
|
||||
* @Description: file content
|
||||
-->
|
||||
<!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 %>favicon.ico">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
13
src/App.vue
Normal file
13
src/App.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App',
|
||||
mounted() {
|
||||
}
|
||||
}
|
||||
</script>
|
126
src/api/art-manage/art.js
Normal file
126
src/api/art-manage/art.js
Normal file
@ -0,0 +1,126 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function list(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getInfo(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function enabled(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow/enabled',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function del(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取基板列表
|
||||
export function listSubstrate(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow/substrateList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取BOM列表
|
||||
export function listBom(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow/bomList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取某个设备下的bom
|
||||
export function listEquipmentBom(data) {
|
||||
return request({
|
||||
url: 'process/process-flow-equipment/equipmentBomList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取所有设备的bom
|
||||
export function listAllEquipmentBom(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow-equipment/allEquipmentBomList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取某个设备下的配方
|
||||
export function listEquipmentRecipe(data) {
|
||||
return request({
|
||||
url: 'process/process-flow-equipment/equipmentRecipeList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取所有设备下的配方
|
||||
export function listAllEquipmentRecipe(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow-equipment/allEquipmentRecipeList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 保存某个工艺下的所有节点
|
||||
export function addProcessFlows(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow-equipment/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取工艺流程下所有节点
|
||||
export function listProcessFlowNode(data) {
|
||||
return request({
|
||||
url: '/api/process/process-flow-equipment/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取工序列表
|
||||
export function listProcess(data) {
|
||||
return request({
|
||||
url: '/api/process/work-sequence/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取工艺自动code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/api/process/process-flow/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
49
src/api/art-manage/process.js
Normal file
49
src/api/art-manage/process.js
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* @Author: gtz
|
||||
* @Date: 2021-04-06 20:20:10
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-02-25 09:04:24
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function list(data) {
|
||||
return request({
|
||||
url: '/api/process/work-sequence/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getInfo(data) {
|
||||
return request({
|
||||
url: '/api/process/work-sequence/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(data) {
|
||||
return request({
|
||||
url: '/api/process/work-sequence/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/api/process/work-sequence/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/process/work-sequence/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
41
src/api/article.js
Normal file
41
src/api/article.js
Normal file
@ -0,0 +1,41 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function fetchList(query) {
|
||||
return request({
|
||||
url: '/vue-element-admin/article/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchArticle(id) {
|
||||
return request({
|
||||
url: '/vue-element-admin/article/detail',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchPv(pv) {
|
||||
return request({
|
||||
url: '/vue-element-admin/article/pv',
|
||||
method: 'get',
|
||||
params: { pv }
|
||||
})
|
||||
}
|
||||
|
||||
export function createArticle(data) {
|
||||
return request({
|
||||
url: '/vue-element-admin/article/create',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateArticle(data) {
|
||||
return request({
|
||||
url: '/vue-element-admin/article/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
13
src/api/basic.js
Normal file
13
src/api/basic.js
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* @Date: 2021-01-21 17:30:30
|
||||
* @LastEditors: gtz
|
||||
* @LastEditTime: 2021-03-01 14:04:42
|
||||
* @FilePath: \basic-admin\src\api\basic.js
|
||||
* @Description: 基础功能接口定义
|
||||
*/
|
||||
|
||||
// import request from '@/utils/request'
|
||||
|
||||
export const uploadPath = '/api/common/attachment/uploadFileFormData'
|
||||
export const uploadOnePath = '/api/common/attachment/uploadFile'
|
||||
export const cloudPath = 'http://mes.picaiba.com'
|
55
src/api/basicData/AlarmManagement/alarmInfo.js
Normal file
55
src/api/basicData/AlarmManagement/alarmInfo.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-02-01 10:58:22
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function alarmInfoList(data) { // 获取报警信息信息列表
|
||||
return request({
|
||||
url: '/basic/alarm/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmInfoDetail(id) { // 获取报警信息信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmInfoUpdate(data) { // 更新报警信息信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmInfoAdd(data) { // 新增报警信息信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmInfoCode() { // 获取报警信息信息code
|
||||
return request({
|
||||
url: '/basic/alarm/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmInfoDelete(id) { // 删除报警信息信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/AlarmManagement/alarmLevel.js
Normal file
55
src/api/basicData/AlarmManagement/alarmLevel.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-16 15:44:55
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function alarmLevelList(data) { // 获取报警等级信息列表
|
||||
return request({
|
||||
url: '/basic/alarm-grade/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmLevelDetail(id) { // 获取报警等级信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm-grade/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmLevelUpdate(data) { // 更新报警等级信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm-grade/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmLevelAdd(data) { // 新增报警等级信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm-grade/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmLevelCode() { // 获取报警等级信息code
|
||||
return request({
|
||||
url: '/basic/alarm-grade/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmLevelDelete(id) { // 删除报警等级信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm-grade/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/AlarmManagement/alarmType.js
Normal file
55
src/api/basicData/AlarmManagement/alarmType.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-16 15:45:10
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function alarmTypeList(data) { // 获取报警类型信息列表
|
||||
return request({
|
||||
url: '/basic/alarm-type/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmTypeDetail(id) { // 获取报警类型信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm-type/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmTypeUpdate(data) { // 更新报警类型信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm-type/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmTypeAdd(data) { // 新增报警类型信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm-type/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmTypeCode() { // 获取报警类型信息code
|
||||
return request({
|
||||
url: '/basic/alarm-type/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function alarmTypeDelete(id) { // 删除报警类型信息单条数据
|
||||
return request({
|
||||
url: '/basic/alarm-type/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/Cache/area.js
Normal file
55
src/api/basicData/Cache/area.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-11 16:16:07
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function areaList(data) { // 获取缓存区区域信息列表
|
||||
return request({
|
||||
url: '/api/wms/area/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function areaDetail(id) { // 获取缓存区区域信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/getById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function areaUpdate(data) { // 更新缓存区区域信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function areaAdd(data) { // 新增缓存区区域信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function areaCode() { // 获取缓存区区域信息code
|
||||
return request({
|
||||
url: '/api/wms/area/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function areaDelete(id) { // 删除缓存区区域信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/Cache/cache.js
Normal file
55
src/api/basicData/Cache/cache.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-11 15:50:42
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function cacheList(data) { // 获取缓存区信息列表
|
||||
return request({
|
||||
url: '/api/wms/area/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cacheDetail(id) { // 获取缓存区信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/getById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function cacheUpdate(data) { // 更新缓存区信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cacheAdd(data) { // 新增缓存区信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cacheCode() { // 获取缓存区信息code
|
||||
return request({
|
||||
url: '/api/wms/area/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function cacheDelete(id) { // 删除缓存区信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/Cache/location.js
Normal file
55
src/api/basicData/Cache/location.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-03 14:29:17
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function locationList(data) { // 获取库位信息列表
|
||||
return request({
|
||||
url: '/api/wms/area/locationByShelf',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function locationDetail(id) { // 获取库位信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/locationById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function locationUpdate(data) { // 更新库位信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/updatelocation',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function locationAdd(data) { // 新增库位信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/addlocation',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function locationCode() { // 获取库位信息code
|
||||
return request({
|
||||
url: '/api/wms/area/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function locationDelete(id) { // 删除库位信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/deletelocation',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
48
src/api/basicData/Cache/processLocation.js
Normal file
48
src/api/basicData/Cache/processLocation.js
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: fzq
|
||||
* @Date: 2022-03-06 18:13:49
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-06 18:29:43
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function list(data) { // 获取工序库位信息列表
|
||||
return request({
|
||||
url: '/api/wms/processlocation/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function detail(id) { // 获取工序库位信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/processlocation/getById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
export function update(data) { // 更新工序库位信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/processlocation/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function add(data) { // 手动绑定工序库位
|
||||
return request({
|
||||
url: '/api/wms/processlocation/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function locaDelete(id) { // 删除工序库位信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/processlocation/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
56
src/api/basicData/Cache/shelf.js
Normal file
56
src/api/basicData/Cache/shelf.js
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-25 09:28:58
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function shelfList(data) { // 获取货架信息列表
|
||||
return request({
|
||||
url: '/api/wms/area/shelf',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function shelfDetail(id) { // 获取货架信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/shelfById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function shelfUpdate(data) { // 更新货架信息单条数据
|
||||
return request({
|
||||
// url: '/basic/shelf/update',
|
||||
url: '/api/wms/area/updateshelf',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function shelfAdd(data) { // 新增货架信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/addshelf',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function shelfCode() { // 获取货架信息code
|
||||
return request({
|
||||
url: '/api/wms/area/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function shelfDelete(id) { // 删除货架信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/area/deleteshelf',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
70
src/api/basicData/Cache/storageBox.js
Normal file
70
src/api/basicData/Cache/storageBox.js
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-11 16:43:22
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function storageBoxList(data) { // 获取存储箱列表
|
||||
return request({
|
||||
url: '/api/wms/storagebox/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function storageBoxDetail(id) { // 获取存储箱单条数据
|
||||
return request({
|
||||
url: '/api/wms/storagebox/getById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function storageBoxUpdate(data) { // 更新存储箱单条数据
|
||||
return request({
|
||||
url: '/api/wms/storagebox/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function storageBoxAdd(data) { // 新增存储箱单条数据
|
||||
return request({
|
||||
url: '/api/wms/storagebox/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function storageBoxCode() { // 获取存储箱code
|
||||
return request({
|
||||
url: '/api/wms/storagebox/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function storageBoxDelete(id) { // 删除存储箱单条数据
|
||||
return request({
|
||||
url: '/api/wms/storagebox/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function PositionDetailInfoAdd(data) { // 新增存储箱地址单条数据
|
||||
return request({
|
||||
url: '/api/wms/storagebox/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function PositionDetailInfoList(data) { // 获取存储箱地址列表
|
||||
return request({
|
||||
url: '/api/wms/storagebox-site/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
55
src/api/basicData/CodeRules.js
Normal file
55
src/api/basicData/CodeRules.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-29 10:38:02
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function CodeRulesList(data) { // 获取编码规则列表
|
||||
return request({
|
||||
url: '/basic/code-rule/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesDetail(id) { // 获取编码规则单条数据
|
||||
return request({
|
||||
url: '/basic/code-rule/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesUpdate(data) { // 更新编码规则单条数据
|
||||
return request({
|
||||
url: '/basic/code-rule/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesAdd(data) { // 新增编码规则单条数据
|
||||
return request({
|
||||
url: '/basic/code-rule/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesCode() { // 获取编码规则code
|
||||
return request({
|
||||
url: '/basic/code-rule/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesDelete(id) { // 删除编码规则单条数据
|
||||
return request({
|
||||
url: '/basic/code-rule/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/CodeRulesAttr.js
Normal file
55
src/api/basicData/CodeRulesAttr.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-02-02 11:08:34
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function CodeRulesAttrList(data) { // 获取编码规则属性列表
|
||||
return request({
|
||||
url: '/basic/code-rule-arrt/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesAttrDetail(id) { // 获取编码规则属性单条数据
|
||||
return request({
|
||||
url: '/basic/code-rule-arrt/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesAttrUpdate(data) { // 更新编码规则属性单条数据
|
||||
return request({
|
||||
url: '/basic/code-rule-arrt/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesAttrAdd(data) { // 新增编码规则属性单条数据
|
||||
return request({
|
||||
url: '/basic/code-rule-arrt/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesAttrCode() { // 获取编码规则属性code
|
||||
return request({
|
||||
url: '/basic/code-rule-arrt/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function CodeRulesAttrDelete(id) { // 删除编码规则属性单条数据
|
||||
return request({
|
||||
url: '/basic/code-rule-arrt/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/CustomerSupplier/customer.js
Normal file
55
src/api/basicData/CustomerSupplier/customer.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-12 19:55:30
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function customerList(data) { // 获取客户列表
|
||||
return request({
|
||||
url: '/basic/customer/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function customerDetail(id) { // 获取客户单条数据
|
||||
return request({
|
||||
url: '/basic/customer/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function customerUpdate(data) { // 更新客户单条数据
|
||||
return request({
|
||||
url: '/basic/customer/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function customerAdd(data) { // 新增客户单条数据
|
||||
return request({
|
||||
url: '/basic/customer/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function customerCode() { // 获取客户code
|
||||
return request({
|
||||
url: '/basic/customer/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function customerDelete(id) { // 删除客户单条数据
|
||||
return request({
|
||||
url: '/basic/customer/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/CustomerSupplier/supplier.js
Normal file
55
src/api/basicData/CustomerSupplier/supplier.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-12 19:56:00
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function supplierList(data) { // 获取供应商列表
|
||||
return request({
|
||||
url: '/basic/supplier/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function supplierDetail(id) { // 获取供应商单条数据
|
||||
return request({
|
||||
url: '/basic/supplier/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function supplierUpdate(data) { // 更新供应商单条数据
|
||||
return request({
|
||||
url: '/basic/supplier/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function supplierAdd(data) { // 新增供应商单条数据
|
||||
return request({
|
||||
url: '/basic/supplier/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function supplierCode() { // 获取供应商code
|
||||
return request({
|
||||
url: '/basic/supplier/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function supplierDelete(id) { // 删除供应商单条数据
|
||||
return request({
|
||||
url: '/basic/supplier/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/Equipment/equipmentAlarm.js
Normal file
55
src/api/basicData/Equipment/equipmentAlarm.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-12 15:40:20
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentAlarmList(data) { // 获取设备报警列表
|
||||
return request({
|
||||
url: '/basic/equipment-alarm/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmDetail(id) { // 获取设备报警单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-alarm/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmUpdate(data) { // 更新设备报警单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-alarm/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmAdd(data) { // 新增设备报警单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-alarm/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmCode() { // 获取设备报警code
|
||||
return request({
|
||||
url: '/basic/equipment-alarm/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmDelete(id) { // 删除设备报警单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-alarm/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/Equipment/equipmentAlarmAttr.js
Normal file
55
src/api/basicData/Equipment/equipmentAlarmAttr.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-02-02 16:00:23
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentAlarmAttrList(data) { // 获取设备报警列表
|
||||
return request({
|
||||
url: '/basic/equipment-alarm-type/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmAttrDetail(id) { // 获取设备报警单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-alarm-type/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmAttrUpdate(data) { // 更新设备报警单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-alarm-type/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmAttrAdd(data) { // 新增设备报警单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-alarm-type/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmAttrCode() { // 获取设备报警code
|
||||
return request({
|
||||
url: '/basic/equipment-alarm-type/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentAlarmAttrDelete(id) { // 删除设备报警单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-alarm-type/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
63
src/api/basicData/Equipment/equipmentDetectArea.js
Normal file
63
src/api/basicData/Equipment/equipmentDetectArea.js
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2021-01-29 09:39:04
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-06-10 15:22:55
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentDetectAreaList(data) { // 获取设备区域列表
|
||||
return request({
|
||||
url: '/basic/detect-distribution-area/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectTreeList() { // 获取检测设备树形图
|
||||
return request({
|
||||
url: '/basic/detect-distribution-area/detect-area',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaDetail(id) { // 获取设备区域单条数据
|
||||
return request({
|
||||
url: '/basic/detect-distribution-area/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaUpdate(data) { // 更新设备区域单条数据
|
||||
return request({
|
||||
url: '/basic/detect-distribution-area/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaAdd(data) { // 新增设备区域单条数据
|
||||
return request({
|
||||
url: '/basic/detect-distribution-area/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaCode() { // 获取设备区域code
|
||||
return request({
|
||||
url: '/basic/detect-distribution-area/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaDelete(id) { // 删除设备区域单条数据
|
||||
return request({
|
||||
url: '/basic/detect-distribution-area/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
56
src/api/basicData/Equipment/equipmentDetectAreaAttr.js
Normal file
56
src/api/basicData/Equipment/equipmentDetectAreaAttr.js
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2021-01-29 09:39:04
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-05-28 09:44:01
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentDetectAreaAttrList(data) { // 获取设备关联列表
|
||||
return request({
|
||||
url: '/basic/detect-equ-area-re/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaAttrDetail(id) { // 获取设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equ-area-re/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaAttrUpdate(data) { // 更新设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equ-area-re/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaAttrAdd(data) { // 新增设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equ-area-re/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaAttrCode() { // 获取设备关联code
|
||||
return request({
|
||||
url: '/basic/detect-equ-area-re/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaAttrDelete(id) { // 删除设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equ-area-re/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
56
src/api/basicData/Equipment/equipmentDetectAreaSystem.js
Normal file
56
src/api/basicData/Equipment/equipmentDetectAreaSystem.js
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2021-01-29 09:39:04
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-05-21 10:26:40
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentDetectAreaSystemList(data) { // 获取设备关联列表
|
||||
return request({
|
||||
url: '/basic/detect-area-system/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaSystemDetail(id) { // 获取设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-area-system/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaSystemUpdate(data) { // 更新设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-area-system/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaSystemAdd(data) { // 新增设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-area-system/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaSystemCode() { // 获取设备关联code
|
||||
return request({
|
||||
url: '/basic/detect-area-system/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectAreaSystemDelete(id) { // 删除设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-area-system/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
56
src/api/basicData/Equipment/equipmentDetectAreaSystemAttr.js
Normal file
56
src/api/basicData/Equipment/equipmentDetectAreaSystemAttr.js
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2021-01-29 09:39:04
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-05-28 10:47:41
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function DetectAreaSystemAttrList(data) { // 获取设备关联列表
|
||||
return request({
|
||||
url: '/basic/detect-equipment-area/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function DetectAreaSystemAttrDetail(id) { // 获取设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equipment-area/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function DetectAreaSystemAttrUpdate(data) { // 更新设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equipment-area/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function DetectAreaSystemAttrAdd(data) { // 新增设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equipment-area/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function DetectAreaSystemAttrCode() { // 获取设备关联code
|
||||
return request({
|
||||
url: '/basic/detect-equipment-area/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function DetectAreaSystemAttrDelete(id) { // 删除设备关联单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equipment-area/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
56
src/api/basicData/Equipment/equipmentDetectParam.js
Normal file
56
src/api/basicData/Equipment/equipmentDetectParam.js
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2021-01-29 09:39:04
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-04-08 15:56:09
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentDetectParamList(data) { // 获取设备参数列表
|
||||
return request({
|
||||
url: '/basic/detect-equipment-param/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectParamDetail(id) { // 获取设备参数单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equipment-param/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectParamUpdate(data) { // 更新设备参数单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equipment-param/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectParamAdd(data) { // 新增设备参数单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equipment-param/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectParamCode() { // 获取设备参数code
|
||||
return request({
|
||||
url: '/basic/detect-equipment-param/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectParamDelete(id) { // 删除设备参数单条数据
|
||||
return request({
|
||||
url: '/basic/detect-equipment-param/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/Equipment/equipmentDetectSystem.js
Normal file
55
src/api/basicData/Equipment/equipmentDetectSystem.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-05-21 10:03:53
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentDetectSystemList(data) { // 获取检测系统列表
|
||||
return request({
|
||||
url: '/basic/detect-system/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectSystemDetail(id) { // 获取检测系统单条数据
|
||||
return request({
|
||||
url: '/basic/detect-system/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectSystemUpdate(data) { // 更新检测系统单条数据
|
||||
return request({
|
||||
url: '/basic/detect-system/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectSystemAdd(data) { // 新增检测系统单条数据
|
||||
return request({
|
||||
url: '/basic/detect-system/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectSystemCode() { // 获取检测系统code
|
||||
return request({
|
||||
url: '/basic/detect-system/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentDetectSystemDelete(id) { // 删除检测系统单条数据
|
||||
return request({
|
||||
url: '/basic/detect-system/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
58
src/api/basicData/Equipment/equipmentGroup.js
Normal file
58
src/api/basicData/Equipment/equipmentGroup.js
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2021-01-29 09:39:04
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2021-05-13 10:34:03
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentGroupList(data) { // 获取设备分组列表
|
||||
return request({
|
||||
// url: '/equipment/equipment-group/findAll',
|
||||
url: '/api/wms/equipment/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentGroupDetail(id) { // 获取设备分组列表
|
||||
return request({
|
||||
url: '/equipment/equipment-group/findById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentGroupUpdate(data) { // 更新设备分组单条数据
|
||||
return request({
|
||||
url: '/equipment/equipment-group/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentGroupAdd(data) { // 新增设备分组单条数据
|
||||
return request({
|
||||
url: '/equipment/equipment-group/create',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentGroupGetCode(data) { // 获取随机生成的设备编码
|
||||
return request({
|
||||
url: '/equipment/equipment-group/getCode',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentGroupDelete(id) { // 删除设备分组单条数据
|
||||
return request({
|
||||
url: '/equipment/equipment-group/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
81
src/api/basicData/Equipment/equipmentInfo.js
Normal file
81
src/api/basicData/Equipment/equipmentInfo.js
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-03-04 09:06:58
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentInfoList(data) { // 获取设备信息列表
|
||||
return request({
|
||||
url: '/api/wms/equipment/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentlistList(data) { // 获取设备信息列表
|
||||
return request({
|
||||
url: '/api/process/work-sequence/equipmentlistList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoDetail(id) { // 获取设备信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoUpdate(data) { // 更新设备信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoAdd(data) { // 新增设备信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoCode() { // 获取设备信息code
|
||||
return request({
|
||||
url: '/api/wms/equipment/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoDelete(id) { // 删除设备信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoFileAdd(data) { // 设备信息上传
|
||||
return request({
|
||||
url: '/api/wms/equipment-file/update-file',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getEquipmentInfoFile(data) { // 设备信息下载
|
||||
return request({
|
||||
// url: '/api/wms/equipment-file/get-by-param',
|
||||
url: '/api/common/attachment/downloadFile',
|
||||
// method: 'post',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
57
src/api/basicData/Equipment/equipmentInfoAttr.js
Normal file
57
src/api/basicData/Equipment/equipmentInfoAttr.js
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: fzq
|
||||
* @LastEditTime: 2022-03-05 10:22:28
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentInfoAttrList(data) { // 获取设备属性列表
|
||||
return request({
|
||||
// url: '/basic/equipment-attr/page',
|
||||
url: '/api/wms/equipment/attr',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoAttrDetail(id) { // 获取设备属性单条数据
|
||||
return request({
|
||||
// url: '/basic/equipment-attr/get',
|
||||
url: '/api/wms/equipment/attrById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoAttrUpdate(data) { // 更新设备属性单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment/updateattr',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoAttrAdd(data) { // 新增设备属性单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment/addattr',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoAttrCode() { // 获取设备属性code
|
||||
return request({
|
||||
url: '/api/wms/equipment/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentInfoAttrDelete(id) { // 删除设备属性单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment/deleteattr',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
72
src/api/basicData/Equipment/equipmentLink.js
Normal file
72
src/api/basicData/Equipment/equipmentLink.js
Normal file
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-12 09:25:09
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentLinkList(data) { // 获取连线设备列表
|
||||
return request({
|
||||
url: '/basic/connecting-device/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkDetail(id) { // 获取连线设备单条数据
|
||||
return request({
|
||||
url: '/basic/connecting-device/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkUpdate(data) { // 更新连线设备单条数据
|
||||
return request({
|
||||
url: '/basic/connecting-device/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkAdd(data) { // 新增连线设备单条数据
|
||||
return request({
|
||||
url: '/basic/connecting-device/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkCode() { // 获取连线设备code
|
||||
return request({
|
||||
url: '/basic/connecting-device/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkDelete(id) { // 删除连线设备单条数据
|
||||
return request({
|
||||
url: '/basic/connecting-device/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkFileAdd(data) { // 连线设备上传
|
||||
return request({
|
||||
url: '/basic/connecting-device-file/update-file',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getEquipmentLinkFile(data) { // 连线设备下载
|
||||
return request({
|
||||
url: '/basic/connecting-device-file/get-by-param',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
55
src/api/basicData/Equipment/equipmentLinkAttr.js
Normal file
55
src/api/basicData/Equipment/equipmentLinkAttr.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-20 10:35:56
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentLinkAttrList(data) { // 获取连线设备属性列表
|
||||
return request({
|
||||
url: '/basic/connecting-device-attr/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkAttrDetail(id) { // 获取连线设备属性单条数据
|
||||
return request({
|
||||
url: '/basic/connecting-device-attr/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkAttrUpdate(data) { // 更新连线设备属性单条数据
|
||||
return request({
|
||||
url: '/basic/connecting-device-attr/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkAttrAdd(data) { // 新增连线设备属性单条数据
|
||||
return request({
|
||||
url: '/basic/connecting-device-attr/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkAttrCode() { // 获取连线设备属性code
|
||||
return request({
|
||||
url: '/basic/connecting-device-attr/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentLinkAttrDelete(id) { // 删除连线设备属性单条数据
|
||||
return request({
|
||||
url: '/basic/connecting-device-attr/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
79
src/api/basicData/Equipment/equipmentType.js
Normal file
79
src/api/basicData/Equipment/equipmentType.js
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-03-11 18:56:39
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function equipmentTypeList(data) { // 获取设备类型列表
|
||||
return request({
|
||||
// url: '/basic/equipment-type/page',
|
||||
url: '/api/wms/equipment/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentTypeDetail(id) { // 获取设备类型单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-type/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentTypeUpdate(data) { // 更新设备类型单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-type/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentTypeAdd(data) { // 新增设备类型单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-type/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentTypeCode() { // 获取设备类型code
|
||||
return request({
|
||||
url: '/basic/equipment-type/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentTypeDelete(id) { // 删除设备类型单条数据
|
||||
return request({
|
||||
url: '/basic/equipment-type/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentTypeListAll() { // 获取全部设备类型层级关系
|
||||
return request({
|
||||
url: '/basic/equipment-type/list-all',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentTypeFileAdd(data) { // 新增设备类型上传
|
||||
return request({
|
||||
url: '/basic/equipment-type-file/update-file',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getEquipmentTypeFile(data) { // 获取设备类型上传列表
|
||||
return request({
|
||||
url: '/basic/equipment-type-file/get-by-param',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
55
src/api/basicData/Equipment/maintenanceCycle.js
Normal file
55
src/api/basicData/Equipment/maintenanceCycle.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-19 19:59:16
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function maintenanceCycleList(data) { // 获取保养列表
|
||||
return request({
|
||||
url: '/basic/maintenance-period/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceCycleDetail(id) { // 获取保养单条数据
|
||||
return request({
|
||||
url: '/basic/maintenance-period/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceCycleUpdate(data) { // 更新保养单条数据
|
||||
return request({
|
||||
url: '/basic/maintenance-period/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceCycleAdd(data) { // 新增保养单条数据
|
||||
return request({
|
||||
url: '/basic/maintenance-period/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceCycleCode() { // 获取保养code
|
||||
return request({
|
||||
url: '/basic/maintenance-period/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceCycleDelete(id) { // 删除保养单条数据
|
||||
return request({
|
||||
url: '/basic/maintenance-period/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/Equipment/maintenanceType.js
Normal file
55
src/api/basicData/Equipment/maintenanceType.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-19 19:52:52
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function maintenanceTypeList(data) { // 获取维修列表
|
||||
return request({
|
||||
url: '/basic/maintenance-type/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceTypeDetail(id) { // 获取维修单条数据
|
||||
return request({
|
||||
url: '/basic/maintenance-type/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceTypeUpdate(data) { // 更新维修单条数据
|
||||
return request({
|
||||
url: '/basic/maintenance-type/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceTypeAdd(data) { // 新增维修单条数据
|
||||
return request({
|
||||
url: '/basic/maintenance-type/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceTypeCode() { // 获取维修code
|
||||
return request({
|
||||
url: '/basic/maintenance-type/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function maintenanceTypeDelete(id) { // 删除维修单条数据
|
||||
return request({
|
||||
url: '/basic/maintenance-type/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
56
src/api/basicData/Equipment/spareParts.js
Normal file
56
src/api/basicData/Equipment/spareParts.js
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2021-01-29 09:39:04
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-29 09:40:21
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function sparePartsList(data) { // 获取备品备件列表
|
||||
return request({
|
||||
url: '/basic/tool-spare-part/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartsDetail(id) { // 获取备品备件单条数据
|
||||
return request({
|
||||
url: '/basic/tool-spare-part/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartsUpdate(data) { // 更新备品备件单条数据
|
||||
return request({
|
||||
url: '/basic/tool-spare-part/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartsAdd(data) { // 新增备品备件单条数据
|
||||
return request({
|
||||
url: '/basic/tool-spare-part/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartsCode() { // 获取备品备件code
|
||||
return request({
|
||||
url: '/basic/tool-spare-part/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartsDelete(id) { // 删除备品备件单条数据
|
||||
return request({
|
||||
url: '/basic/tool-spare-part/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
48
src/api/basicData/EquipmentScrapGrade.js
Normal file
48
src/api/basicData/EquipmentScrapGrade.js
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-03-03 13:46:55
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function EquipmentScrapGradeList(data) { // 获取废片等级列表
|
||||
return request({
|
||||
url: '/api/wms/equipment-scraps-grade/pageForEquipmentGrade',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function EquipmentScrapGradeDetail(id) { // 获取废片等级单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment-scraps-grade/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function EquipmentScrapGradeUpdate(data) { // 更新废片等级单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment-scraps-grade/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function EquipmentScrapGradeAdd(data) { // 新增废片等级单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment-scraps-grade/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function EquipmentScrapGradeDelete(id) { // 删除废片等级单条数据
|
||||
return request({
|
||||
url: '/api/wms/equipment-scraps-grade/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
58
src/api/basicData/FactoryManagement/factory.js
Normal file
58
src/api/basicData/FactoryManagement/factory.js
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2020-12-30 11:54:24
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function factoryList(data) { // 获取工厂列表
|
||||
return request({
|
||||
url: '/basic/factory/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function factoryDetail(id) { // 获取工厂单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/basic/factory/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function factoryUpdate(data) { // 更新工厂单条数据
|
||||
return request({
|
||||
url: '/basic/factory/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function factoryAdd(data) { // 新增工厂单条数据
|
||||
return request({
|
||||
url: '/basic/factory/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function factoryCode() { // 获取工厂code
|
||||
return request({
|
||||
url: '/basic/factory/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function factoryDelete(id) { // 删除工厂单条数据
|
||||
return request({
|
||||
url: '/basic/factory/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/FactoryManagement/line.js
Normal file
55
src/api/basicData/FactoryManagement/line.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-12 10:57:09
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function lineList(data) { // 获取产线列表
|
||||
return request({
|
||||
url: '/basic/production-line/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function lineDetail(id) { // 获取产线单条数据
|
||||
return request({
|
||||
url: '/basic/production-line/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function lineUpdate(data) { // 更新产线单条数据
|
||||
return request({
|
||||
url: '/basic/production-line/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function lineAdd(data) { // 新增产线单条数据
|
||||
return request({
|
||||
url: '/basic/production-line/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function lineCode() { // 获取产线code
|
||||
return request({
|
||||
url: '/basic/production-line/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function lineDelete(id) { // 删除产线单条数据
|
||||
return request({
|
||||
url: '/basic/production-line/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/FactoryManagement/section.js
Normal file
55
src/api/basicData/FactoryManagement/section.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-12 10:56:44
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function sectionList(data) { // 获取工段列表
|
||||
return request({
|
||||
url: '/basic/workshop-section/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sectionDetail(id) { // 获取工段单条数据
|
||||
return request({
|
||||
url: '/basic/workshop-section/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function sectionUpdate(data) { // 更新工段单条数据
|
||||
return request({
|
||||
url: '/basic/workshop-section/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sectionAdd(data) { // 新增工段单条数据
|
||||
return request({
|
||||
url: '/basic/workshop-section/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sectionCode() { // 获取工段code
|
||||
return request({
|
||||
url: '/basic/workshop-section/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function sectionDelete(id) { // 删除工段单条数据
|
||||
return request({
|
||||
url: '/basic/workshop-section/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/GroupModule/group.js
Normal file
55
src/api/basicData/GroupModule/group.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-12 15:38:59
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function groupList(data) { // 获取班组列表
|
||||
return request({
|
||||
url: '/basic/team/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function groupDetail(id) { // 获取班组单条数据
|
||||
return request({
|
||||
url: '/basic/team/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function groupUpdate(data) { // 更新班组单条数据
|
||||
return request({
|
||||
url: '/basic/team/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function groupAdd(data) { // 新增班组单条数据
|
||||
return request({
|
||||
url: '/basic/team/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function groupCode() { // 获取班组code
|
||||
return request({
|
||||
url: '/basic/team/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function groupDelete(id) { // 删除班组单条数据
|
||||
return request({
|
||||
url: '/basic/team/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/GroupModule/groupAttr.js
Normal file
55
src/api/basicData/GroupModule/groupAttr.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-02-08 09:51:54
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function groupAttrList(data) { // 获取班组列表
|
||||
return request({
|
||||
url: '/basic/team-det/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function groupAttrDetail(id) { // 获取班组单条数据
|
||||
return request({
|
||||
url: '/basic/team-det/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function groupAttrUpdate(data) { // 更新班组单条数据
|
||||
return request({
|
||||
url: '/basic/team-det/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function groupAttrAdd(data) { // 新增班组单条数据
|
||||
return request({
|
||||
url: '/basic/team-det/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function groupAttrCode() { // 获取班组code
|
||||
return request({
|
||||
url: '/basic/team-det/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function groupAttrDelete(data) { // 删除班组单条数据
|
||||
return request({
|
||||
url: '/basic/team-det/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
55
src/api/basicData/GroupModule/major.js
Normal file
55
src/api/basicData/GroupModule/major.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-12 16:38:42
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function majorList(data) { // 获取专业列表
|
||||
return request({
|
||||
url: '/basic/major/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function majorDetail(id) { // 获取专业单条数据
|
||||
return request({
|
||||
url: '/basic/major/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function majorUpdate(data) { // 更新专业单条数据
|
||||
return request({
|
||||
url: '/basic/major/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function majorAdd(data) { // 新增专业单条数据
|
||||
return request({
|
||||
url: '/basic/major/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function majorCode() { // 获取专业code
|
||||
return request({
|
||||
url: '/basic/major/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function majorDelete(id) { // 删除专业单条数据
|
||||
return request({
|
||||
url: '/basic/major/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
75
src/api/basicData/GroupModule/staff.js
Normal file
75
src/api/basicData/GroupModule/staff.js
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-03-04 10:05:02
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function staffList(data) { // 获取员工列表
|
||||
return request({
|
||||
url: '/api/wms/worker/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function staffDetail(id) { // 获取员工单条数据
|
||||
return request({
|
||||
url: '/api/wms/worker/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function staffUpdate(data) { // 更新员工单条数据
|
||||
return request({
|
||||
url: '/api/wms/worker/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function staffAdd(data) { // 新增员工单条数据
|
||||
return request({
|
||||
url: '/api/wms/worker/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function staffCode() { // 获取员工code
|
||||
return request({
|
||||
url: '/api/wms/worker/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function staffDelete(id) { // 删除员工单条数据
|
||||
return request({
|
||||
url: '/api/wms/worker/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function workerList(data) { // 添加组员列表
|
||||
return request({
|
||||
url: '/api/wms/team-det/workerList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getRoleList() {
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/selectPlatformDictDataListByPage',
|
||||
method: 'post',
|
||||
data: {
|
||||
dictTypeId: '1383318968677273601',
|
||||
current: 1,
|
||||
size: 999
|
||||
}
|
||||
})
|
||||
}
|
55
src/api/basicData/Materials/material.js
Normal file
55
src/api/basicData/Materials/material.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-02-24 08:57:40
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function materialList(data) { // 获取物料信息列表
|
||||
return request({
|
||||
url: '/api/wms/material/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialDetail(id) { // 获取物料信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/material/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function materialUpdate(data) { // 更新物料信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/material/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialAdd(data) { // 新增物料信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/material/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialCode() { // 获取物料信息code
|
||||
return request({
|
||||
url: '/api/wms/material/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function materialDelete(id) { // 删除物料信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/material/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/Materials/materialAttr.js
Normal file
55
src/api/basicData/Materials/materialAttr.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-02-24 14:46:16
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function materialAttrList(data) { // 获取物料属性列表
|
||||
return request({
|
||||
url: '/api/wms/material-attr/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialAttrDetail(id) { // 获取物料属性单条数据
|
||||
return request({
|
||||
url: '/api/wms/material-attr/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function materialAttrUpdate(data) { // 更新物料属性单条数据
|
||||
return request({
|
||||
url: '/api/wms/material-attr/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialAttrAdd(data) { // 新增物料属性单条数据
|
||||
return request({
|
||||
url: '/api/wms/material-attr/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialAttrCode() { // 获取物料属性code
|
||||
return request({
|
||||
url: '/api/wms/material-attr/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function materialAttrDelete(id) { // 删除物料属性单条数据
|
||||
return request({
|
||||
url: '/api/wms/material-attr/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/Materials/materialsType.js
Normal file
55
src/api/basicData/Materials/materialsType.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-02-24 14:46:20
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function materialsTypeList(data) { // 获取物料类型列表
|
||||
return request({
|
||||
url: '/api/wms/material-type/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialsTypeDetail(id) { // 获取物料类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/material-type/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function materialsTypeUpdate(data) { // 更新物料类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/material-type/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialsTypeAdd(data) { // 新增物料类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/material-type/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialsTypeCode() { // 获取物料类型code
|
||||
return request({
|
||||
url: '/api/wms/material-type/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function materialsTypeDelete(id) { // 删除物料类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/material-type/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/ProductAttr.js
Normal file
55
src/api/basicData/ProductAttr.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-29 10:47:49
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function productList(data) { // 获取产品信息列表
|
||||
return request({
|
||||
url: '/basic/product-arrt/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function productDetail(id) { // 获取产品信息单条数据
|
||||
return request({
|
||||
url: '/basic/product-arrt/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function productUpdate(data) { // 更新产品信息单条数据
|
||||
return request({
|
||||
url: '/basic/product-arrt/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function productAdd(data) { // 新增产品信息单条数据
|
||||
return request({
|
||||
url: '/basic/product-arrt/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function productCode() { // 获取产品信息code
|
||||
return request({
|
||||
url: '/basic/product-arrt/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function productDelete(id) { // 删除产品信息单条数据
|
||||
return request({
|
||||
url: '/basic/product-arrt/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
62
src/api/basicData/ProductPool.js
Normal file
62
src/api/basicData/ProductPool.js
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-25 09:59:10
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function ProductPoolList(data) { // 获取产品池列表
|
||||
return request({
|
||||
url: '/basic/product/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function ProductPoolDetail(id) { // 获取产品池单条数据
|
||||
return request({
|
||||
url: '/basic/product/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function ProductPoolUpdate(data) { // 更新产品池单条数据
|
||||
return request({
|
||||
url: '/basic/product/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function ProductPoolAdd(data) { // 新增产品池单条数据
|
||||
return request({
|
||||
url: '/basic/product/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function ProductPoolCode() { // 获取产品池code
|
||||
return request({
|
||||
url: '/basic/product/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function ProductPoolDelete(id) { // 删除产品池单条数据
|
||||
return request({
|
||||
url: '/basic/product/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function ProductPoolUnit() { // 获取产品池单位数据
|
||||
return request({
|
||||
url: '/common/data-dictionary/sysDictDataList',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
58
src/api/basicData/Scrap/ScrapInfo.js
Normal file
58
src/api/basicData/Scrap/ScrapInfo.js
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-03-03 13:46:40
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function scrapInfoList(data) { // 获取报废信息列表
|
||||
return request({
|
||||
url: '/api/wms/scrap-information/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapInfoDetail(id) { // 获取报废信息单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/api/wms/scrap-information/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapInfoUpdate(data) { // 更新报废信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/scrap-information/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapInfoAdd(data) { // 新增报废信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/scrap-information/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapInfoCode() { // 获取报废信息code
|
||||
return request({
|
||||
url: '/api/wms/scrap-information/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapInfoDelete(id) { // 删除报废信息单条数据
|
||||
return request({
|
||||
url: '/api/wms/scrap-information/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
58
src/api/basicData/Scrap/ScrapType.js
Normal file
58
src/api/basicData/Scrap/ScrapType.js
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-03-03 13:46:46
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function scrapTypeList(data) { // 获取报废类型列表
|
||||
return request({
|
||||
url: '/api/wms/scrap-type-information/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapTypeDetail(id) { // 获取报废类型单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/api/wms/scrap-type-information/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapTypeUpdate(data) { // 更新报废类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/scrap-type-information/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapTypeAdd(data) { // 新增报废类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/scrap-type-information/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapTypeCode() { // 获取报废类型code
|
||||
return request({
|
||||
url: '/api/wms/scrap-type-information/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function scrapTypeDelete(id) { // 删除报废类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/scrap-type-information/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/ScrapInfo.js
Normal file
55
src/api/basicData/ScrapInfo.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2021-01-18 14:48:49
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function ScrapInfoList(data) { // 获取废品报废信息列表
|
||||
return request({
|
||||
url: '/basic/scrap/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function ScrapInfoDetail(id) { // 获取废品报废信息单条数据
|
||||
return request({
|
||||
url: '/basic/scrap/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function ScrapInfoUpdate(data) { // 更新废品报废信息单条数据
|
||||
return request({
|
||||
url: '/basic/scrap/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function ScrapInfoAdd(data) { // 新增废品报废信息单条数据
|
||||
return request({
|
||||
url: '/basic/scrap/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function ScrapInfoCode() { // 获取废品报废信息code
|
||||
return request({
|
||||
url: '/basic/scrap/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function ScrapInfoDelete(id) { // 删除废品报废信息单条数据
|
||||
return request({
|
||||
url: '/basic/scrap/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
55
src/api/basicData/StateConfig.js
Normal file
55
src/api/basicData/StateConfig.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-03-03 16:10:54
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function StateConfigList(data) { // 获取状态列表
|
||||
return request({
|
||||
url: '/api/wms/configure-display/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StateConfigDetail(id) { // 获取状态单条数据
|
||||
return request({
|
||||
url: '/basic/configure-display/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function StateConfigUpdate(data) { // 更新状态单条数据
|
||||
return request({
|
||||
url: '/basic/configure-display/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StateConfigAdd(data) { // 新增状态单条数据
|
||||
return request({
|
||||
url: '/basic/configure-display/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StateConfigCode() { // 获取状态code
|
||||
return request({
|
||||
url: '/basic/configure-display/get-code',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function StateConfigDelete(id) { // 删除状态单条数据
|
||||
return request({
|
||||
url: '/basic/configure-display/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
46
src/api/basicData/Warehouse/HistoricalTask.js
Normal file
46
src/api/basicData/Warehouse/HistoricalTask.js
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-14 15:29:26
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function HistoricalTaskList(data) { // 获取任务列表
|
||||
return request({
|
||||
url: '/api/wms/car/task/execution/info/his/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function HistoricalTaskDetail(id) { // 获取任务单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/api/wms/car/task/execution/info/his/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function CurrentTaskList(data) { // 获取任务列表
|
||||
return request({
|
||||
url: '/api/wms/car/task/execution/info/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function CurrentTaskDetail(id) { // 获取任务单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/api/wms/car/task/execution/info/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
86
src/api/basicData/Warehouse/StorageBoxInfo.js
Normal file
86
src/api/basicData/Warehouse/StorageBoxInfo.js
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-01-17 13:59:54
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function StorageBoxInfoList(data) { // 获取存储箱使用情况
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/his/page/by/code',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxInfoDetail(id) { // 获取存储箱单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/api/wms/storage/box/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxRackList(data) { // 获取存储箱上架列表
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/page/for/bind',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function locationList(data) { // 获取库位列表
|
||||
return request({
|
||||
url: '/api/wms/location/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxRackDetail(id) { // 获取存储箱上架单条数据
|
||||
const data = {
|
||||
'id': id
|
||||
}
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxRackUpdate(data) { // 更新存储箱上架单条数据
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxRackAdd(data) { // 新增存储箱上架单条数据
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxRackCode(data) { // 获取存储箱上架code
|
||||
return request({
|
||||
url: '/api/wms/storagebox/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function StorageBoxRackDelete(id) { // 删除存储箱上架单条数据
|
||||
return request({
|
||||
url: '/api/wms/storage/box/circ/info/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
48
src/api/basicData/dataDictionary.js
Normal file
48
src/api/basicData/dataDictionary.js
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-03-03 15:10:16
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function dataDictionaryDataList(data) { // 获取字典类型列表
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/selectPlatformDictDataListByPage',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dataDictionaryDataDetail(id) { // 获取字典类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/selectPlatformDictDataById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function dataDictionaryDataUpdate(data) { // 更新字典类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/updatePlatformDictData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dataDictionaryDataAdd(data) { // 新增字典类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/savePlatformDictData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dataDictionaryDataDelete(id) { // 删除字典类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/deletePlatformDictData',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
48
src/api/basicData/dataDictionaryType.js
Normal file
48
src/api/basicData/dataDictionaryType.js
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2020-12-29 16:00:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-03-03 15:29:30
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function dataDictionaryTypeList(data) { // 获取字典类型列表
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/selectPlatformDictTypeListByPage',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dataDictionaryTypeDetail(id) { // 获取字典类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/selectDictTypeById',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function dataDictionaryTypeUpdate(data) { // 更新字典类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/updatePlatformDictType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dataDictionaryTypeAdd(data) { // 新增字典类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/savePlatformDictType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function dataDictionaryTypeDelete(id) { // 删除字典类型单条数据
|
||||
return request({
|
||||
url: '/api/wms/platform-dict/deletePlatformDictType',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
90
src/api/basicData/visual.js
Normal file
90
src/api/basicData/visual.js
Normal file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* @Author: gtz
|
||||
* @Date: 2021-02-27 17:23:17
|
||||
* @LastEditors: gtz
|
||||
* @LastEditTime: 2021-03-25 16:21:36
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取可视化布局图列表
|
||||
export function VisualList(data) {
|
||||
return request({
|
||||
url: '/visual/visual/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备数据字典
|
||||
export function eqList(data) {
|
||||
return request({
|
||||
url: '/basic/equipment/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取库位列表
|
||||
export function locationList(data) {
|
||||
return request({
|
||||
url: '/basic/stock/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取可视化布局图信息单条数据
|
||||
export function VisualDetail(id) {
|
||||
return request({
|
||||
url: '/visual/visual/get',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
// 更新可视化布局图信息单条数据
|
||||
export function VisualUpdate(data) {
|
||||
return request({
|
||||
url: '/visual/visual/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增可视化布局图信息单条数据
|
||||
export function VisualAdd(data) {
|
||||
return request({
|
||||
url: '/visual/visual/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除可视化布局图单条数据
|
||||
export function VisualDelete(id) {
|
||||
return request({
|
||||
url: '/visual/visual/delete',
|
||||
method: 'post',
|
||||
data: { id }
|
||||
})
|
||||
}
|
||||
|
||||
// 获取可视化实时信息
|
||||
export function VisualEqData(data) {
|
||||
return request({
|
||||
url: '/visual/visual/equipmentStatusList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取可视化库位信息
|
||||
export function VisualLocationData(data) {
|
||||
return request({
|
||||
url: '/visual/visual/stroageBoxForStockList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
373
src/api/dict/index.js
Normal file
373
src/api/dict/index.js
Normal file
@ -0,0 +1,373 @@
|
||||
/*
|
||||
* @Date: 2021-01-21 18:08:29
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-02-24 14:55:06
|
||||
* @FilePath: \basic-admin\src\api\dict\index.js
|
||||
* @Description: 数据字典定义
|
||||
*/
|
||||
// import request from '@/utils/request'
|
||||
import { requestWithCache } from '@/utils/request'
|
||||
|
||||
// 获取设备列表列表
|
||||
export function getDictDevice(data) {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/equipment/page',
|
||||
method: 'post',
|
||||
data
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备类型列表
|
||||
export function getDictDeviceType(data) {
|
||||
return requestWithCache({
|
||||
url: '/common/data-dictionary/equipmentTypeList',
|
||||
method: 'post',
|
||||
data
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取物料列表
|
||||
export function getDictBom(data) {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/material/page',
|
||||
method: 'post',
|
||||
data
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取供应商列表
|
||||
export function getDictSupplier(data) {
|
||||
return requestWithCache({
|
||||
url: '/common/data-dictionary/supplierList',
|
||||
method: 'post',
|
||||
data
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取单位列表
|
||||
export function getDictUnit(data) {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/platform-dict/selectPlatformDictDataListByPage',
|
||||
method: 'post',
|
||||
data: {
|
||||
current: 1,
|
||||
size: 999,
|
||||
dictTypeId: '1392033901169348609'
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取物料列表
|
||||
export function getDictMaterial(data) {
|
||||
return requestWithCache({
|
||||
url: '/material/material-date/materialList',
|
||||
method: 'post',
|
||||
data
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取维修类型
|
||||
export function getDictRepairType(data) {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/maintenance-type/page',
|
||||
method: 'post',
|
||||
data: {
|
||||
current: 1,
|
||||
enabled: 1,
|
||||
size: 999
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取员工列表
|
||||
export function getDictWorker() {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/worker/page',
|
||||
method: 'post',
|
||||
data: {
|
||||
current: 1,
|
||||
size: 999
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
telephone: item.telephone ? item.telephone : ''
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取基础备品备件列表
|
||||
export function getDictSparepart(data) {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/tool-spare-part/page',
|
||||
method: 'post',
|
||||
data: {
|
||||
current: 1,
|
||||
size: 999
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name + (item.model ? ' - ' + item.model : '')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取备件型号
|
||||
export function getDictModel(data) {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/tool-spare-part/list',
|
||||
method: 'post',
|
||||
data: {
|
||||
current: 1,
|
||||
size: 999,
|
||||
...data
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 质量---报废: 报废原因
|
||||
export function scrapReasonList(data) {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/scrap-information/page',
|
||||
method: 'post',
|
||||
data: {
|
||||
current: 1,
|
||||
size: 999
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.scrap
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取故障等级
|
||||
export function faultLevelList(data) {
|
||||
return requestWithCache({
|
||||
url: '/common/data-dictionary-business/findAllByTypeOrCategory',
|
||||
method: 'post',
|
||||
subname: 'faultLevelList',
|
||||
data: {
|
||||
current: 1,
|
||||
dataCategory: '故障',
|
||||
dataType: '状况',
|
||||
enabled: 1,
|
||||
size: 999
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.dataValue
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取保养周期
|
||||
export function maintainPeriod(data) {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/platform-dict/selectPlatformDictDataListByPage',
|
||||
method: 'post',
|
||||
data: {
|
||||
current: 1,
|
||||
enabled: 1,
|
||||
size: 999,
|
||||
dictTypeId: '1393406291017252866'
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.dataName
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 质量检测计划 获取检测频率
|
||||
export function detectionPeriod(data) {
|
||||
return requestWithCache({
|
||||
url: '/common/data-dictionary-business/findAllByTypeOrCategory',
|
||||
method: 'post',
|
||||
subname: 'detectionPeriod',
|
||||
data: {
|
||||
current: 1,
|
||||
dataCategory: '时间',
|
||||
dataType: '频率',
|
||||
enabled: 1,
|
||||
size: 999
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.dataValue
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备类型的参数
|
||||
export function equipmentTypeParam(id) {
|
||||
return requestWithCache({
|
||||
url: '/equipment/equipment-parameter/findAllByIdOrName',
|
||||
method: 'post',
|
||||
data: {
|
||||
current: 1,
|
||||
equipmentTypeId: id,
|
||||
size: 999
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.paramName
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备状态
|
||||
|
||||
export function statusList(id) {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/configure-display/page',
|
||||
method: 'post',
|
||||
data: {
|
||||
current: 1,
|
||||
size: 999
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.status
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取角色列表
|
||||
export function workerRoleList() {
|
||||
return requestWithCache({
|
||||
url: '/api/wms/platform-dict/selectPlatformDictDataListByPage',
|
||||
method: 'post',
|
||||
data: {
|
||||
dictTypeId: '1383318968677273601',
|
||||
current: 1,
|
||||
size: 999
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
return res.data.records.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.dataName
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
108
src/api/equipment/bom.js
Normal file
108
src/api/equipment/bom.js
Normal file
@ -0,0 +1,108 @@
|
||||
/*
|
||||
* @Date: 2021-01-05 15:25:38
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-02-24 14:48:53
|
||||
* @FilePath: \basic-admin\src\api\equipment\bom.js
|
||||
* @Description: 设备管理——设备物料bom管理 接口定义
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取物料bom列表
|
||||
export function getBOMList(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom/findAllByEQNameOrEQCodeOrMaterialNameWithPage',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增物料bom
|
||||
export function addBOM(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom/create',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改物料bom
|
||||
export function editBOM(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除物料bom
|
||||
export function delBOM(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id获取物料bom
|
||||
export function getBOMInfo(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom/findById',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备物料bom列表
|
||||
export function getDeviceBOMList(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom-detail/findAllByEQBomIdWithPage',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备物料bom
|
||||
export function addDeviceBOM(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom-detail/create',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备物料bom
|
||||
export function editDeviceBOM(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom-detail/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备物料bom
|
||||
export function delDeviceBOM(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom-detail/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id获取设备物料bom详细
|
||||
export function getDeviceBOMInfo(data) {
|
||||
return request({
|
||||
url: '/api/wms/equipment-bom-detail/findById',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取基础物料
|
||||
|
||||
export function getMaterialList(data) {
|
||||
return request({
|
||||
url: '/api/wms/material/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
80
src/api/equipment/eqManager.js
Normal file
80
src/api/equipment/eqManager.js
Normal file
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* @Author: gtz
|
||||
* @Date: 2021-04-16 16:23:35
|
||||
* @LastEditors: gtz
|
||||
* @LastEditTime: 2021-04-17 15:59:16
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取设备管理员列表
|
||||
export function page(data) {
|
||||
return request({
|
||||
url: '/equipment/equipment-operator-relation/findAll',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 添加设备管理员
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/equipment/equipment-operator-relation/create',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑设备管理员
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/equipment/equipment-operator-relation/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备管理员
|
||||
export function del(data) {
|
||||
return request({
|
||||
url: '/equipment/equipment-operator-relation/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备管理员详情
|
||||
export function getInfo(data) {
|
||||
return request({
|
||||
url: '/equipment/equipment-operator-relation/findById',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getWorkerList(data) {
|
||||
return request({
|
||||
url: '/basic/worker/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getEqList(data) {
|
||||
return request({
|
||||
url: '/basic/equipment/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getRoleList() {
|
||||
return request({
|
||||
url: '/equipment/equipment-operator-relation/findAllOperator',
|
||||
method: 'post',
|
||||
data: {
|
||||
roleId: '1410037914748780545'
|
||||
}
|
||||
})
|
||||
}
|
18
src/api/equipment/equipmentParams.js
Normal file
18
src/api/equipment/equipmentParams.js
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* @Author: gtz
|
||||
* @Date: 2021-06-17 15:20:52
|
||||
* @LastEditors: gtz
|
||||
* @LastEditTime: 2021-06-17 15:23:05
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取设备管理员列表
|
||||
export function getEqList(data) {
|
||||
return request({
|
||||
url: '/material/substrate-tree/getTree',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user