This commit is contained in:
gtz 2022-11-07 08:45:49 +08:00
commit 4d1231adc2
1222 changed files with 194552 additions and 0 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
.vscode/
.idea/
node_modules/
dist/
**/*.log
LICENSE
README.md

41
.drone.yml Normal file
View 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/mes/mes-ui:hfxny-1.0.0 ./ && docker push harbor.picaiba.com/mes/mes-ui:hfxny-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/mes-ui -n mes-hfxny
- sleep 3
- kubectl scale --replicas=1 deployment/mes-ui -n mes-hfxny
depends_on:
- build
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
- name: dockerconfig
host:
path: /root/.docker
trigger:
branch:
- projects/hfxny
event:
- push

14
.editorconfig Normal file
View 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

23
.env.development Normal file
View File

@ -0,0 +1,23 @@
# just a flag
ENV = 'development'
# base api
# 这里修改成api服务器地址
VUE_APP_BASE_API = '/api'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().
# This configuration can significantly increase the speed of hot updates,
# when you have a large number of pages.
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
VUE_CLI_BABEL_TRANSPILE_MODULES = true
VUE_APP_REPORT_DESIGN_URL = 'http://hfxny.mes.picaiba.com/ureport/designer'
VUE_APP_REPORT_VIEW_URL = 'http://hfxny.mes.picaiba.com/ureport/preview'
# sh record:
# @liubin
# 鉴于该文件不被git追踪固用来保存一些local的东西比如命令之类的
eval "$(ssh-agent -s)" && ssh-add ~/Desktop/ssh/id_rsa

7
.env.production Normal file
View File

@ -0,0 +1,7 @@
# just a flag
ENV = 'production'
# base api
VUE_APP_BASE_API = '/api'
VUE_APP_REPORT_DESIGN_URL = '/ureport/designer'
VUE_APP_REPORT_VIEW_URL = '/ureport/preview'

8
.env.staging Normal file
View 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
View File

@ -0,0 +1,4 @@
build/*.js
src/assets
public
dist

201
.eslintrc.js Normal file
View File

@ -0,0 +1,201 @@
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/no-use-v-if-with-v-for": ["error", {
"allowUsingIterationVar": true
}],
"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']
}
}

26
.gitignore vendored Normal file
View File

@ -0,0 +1,26 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
public/
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

12
.prettierrc Normal file
View File

@ -0,0 +1,12 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"useTabs": false,
"tabWidth": 2,
"htmlWhitespaceSensitivity": "ignore",
"vueIndentScriptAndStyle": false,
"embeddedLanguageFormatting": "off",
"bracketSameLine":false,
"printWidth": 120
}

5
.travis.yml Normal file
View File

@ -0,0 +1,5 @@
language: node_js
node_js: 10
script: npm run test
notifications:
email: false

10
Dockerfile Normal file
View 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
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
View 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.

BIN
QR.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 B

49
README.md Normal file
View File

@ -0,0 +1,49 @@
<!--
* @Author: gtz
* @Date: 2021-01-27 10:07:42
* @LastEditors: gtz
* @LastEditTime: 2021-04-22 09:58:18
* @Description: file content
-->
# Readme
页面原型地址: http://rp.picaiba.com/mes/2020-12-29
element 表单生成工具: https://mrhj.gitee.io/form-generator/#/
***
* 顶栏右上角设置的配置在 @/layout/components/Navbar.vue 中
* 富文本编辑器中 右上角上传图片的目标地址需要修改,在@/components/Tinymce/components/EditorImage.vue 中
##### echarts封装
* 考虑使用mixin加入部分功能
* option配置分离再复用
* 定义统一输入的数据格式通过props
##### 国际化注意事项
* 所有methodbtn的tableBtn配置中的btnName写成下种形式具体配置项在@/lang/i18n.js 中,若无想要的自行添加
```
btnName: 'btn.edit'
```
* 所有hidden不为true的路由的mate中的title写成下种形式位置同上
```
meta: { title: routerTitle.dashboard.dashboard?.[language] || routerTitle.dashboard.dashboard.en, icon: 'dashboard', affix: true }
```
* 所有table页引入国际化组件表格配置项中label写成下种形式具体配置需自行到@/lang/en.js 和@/lang/zh.js 中添加
```
import i18n from '@/lang'
const tableProps = [{
...
label: i18n.t('userManage.userId'),
...
}]
```
##### 切换主题色
* 主题样式文件应使用本地文件不应使用element云上的目前尝试使用本地可能因为缓存策略导致切换主题色仅第一次生效目前仍保留使用element云上的样式文件
##### 备注
* 废品报废添加时间隐藏,质量检测计划检测速率、检测内容隐藏

26
babel.config.js Normal file
View 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
View 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
View 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
View 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
View File

@ -0,0 +1,9 @@
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}

116
mock/article.js Normal file
View 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
View 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
View 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
View 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
View 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
View 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
View 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'
}
}
}
]

19035
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

129
package.json Normal file
View 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",
"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",
"write-excel-file": "^1.4.6",
"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"
]
}

View 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}}

View 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
}
}

View 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}}
}

View 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
}
}

View 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 v-show="total > listQuery.size" :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}}

View 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
View File

@ -0,0 +1,9 @@
exports.notEmpty = name => {
return v => {
if (!v || v.trim === '') {
return `${name} is required`
} else {
return true
}
}
}

View 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}}

View 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
View 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
View File

@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}

19
src/App.vue Normal file
View File

@ -0,0 +1,19 @@
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
mounted() {
}
}
</script>
<style lang="scss" scoped>
#app {
background-color: #f2f4f9;
}
</style>

View File

@ -0,0 +1,53 @@
/*
* @Author: lb
* @Date: 2022-07-13 08:40:14
* @LastEditors: lb
* @LastEditTime: 2022-07-13 08:40:14
* @Description: 数据分析-设备效率分析
*/
import request from '@/utils/request'
/**
* 获取产线列表
*/
export function getLineList() {
return request({
url: '/basic/production-line/list',
method: 'post',
data: {}
})
}
/**
* 获取工厂列表
*/
export function getFactoryList() {
return request({
url: '/basic/factory/list',
method: 'post',
data: {}
})
}
/**
* 请求设备效率分析数据
* @param {object} data
* @param {number} data.current
* @param {number} data.enabled
* @param {string} data.endTime
* @param {number} data.eqId
* @param {number} data.eqTypeId
* @param {number} data.ftId
* @param {number} data.productlines
* @param {number} data.size
* @param {string} data.startTime
* @param {number} data.type
* @param {number} data.wsId
*/
export function getOEE(data) {
return request({
url: '/analysis/equipment-analysis/oee',
method: 'post',
data
})
}

View File

@ -0,0 +1,48 @@
/*
* @Author: lb
* @Date: 2022-07-13 08:40:14
* @LastEditors: lb
* @LastEditTime: 2022-07-13 08:40:14
* @Description: 数据分析-设备效率分析
*/
import request from '@/utils/request'
/**
* 获取产线列表
* @param {object} data
* @param {number} data.current
* @param {number} data.enabled
* @param {number} data.factoryId
* @param {string} data.key
* @param {number} data.size
*/
export function getLineList(data = {}) {
return request({
url: '/basic/production-line/list',
method: 'post',
data
})
}
/**
* 设备异常分析数据
* @param {object} data
* @param {string} data.startTime
* @param {string} data.endTime
* @param {number} data.productlines
* @param {number} data.type
* @param {number} [data.current]
* @param {number} [data.enabled]
* @param {number} [data.eqId]
* @param {number} [data.eqTypeId]
* @param {number} [data.ftId]
* @param {number} [data.size]
* @param {number} [data.wsId]
*/
export function getEquipmentExceptionAnalysis(data) {
return request({
url: '/analysis/equipment-analysis/mtbrAndMtbr',
method: 'post',
data
})
}

View File

@ -0,0 +1,85 @@
/*
* @Author: lb
* @Date: 2022-07-22 08:40:14
* @LastEditors: lb
* @LastEditTime: 2022-07-22 08:40:14
* @Description: 数据分析-设备状态时序图
*/
import request from '@/utils/request'
/**
* 获取产线列表
* @param {object} data
* @param {number} data.current
* @param {number} data.enabled
* @param {number} data.factoryId
* @param {string} data.key
* @param {number} data.size
*/
export function getLineList(data = {}) {
return request({
url: '/basic/production-line/list',
method: 'post',
data
})
}
/**
* 获取工序列表
* @param {object} data
* @param {number} data.current
* @param {number} data.enabled
* @param {string} data.id
* @param {string} data.name
* @param {number} data.productionLineId
* @param {number} data.size
*/
export function getWorkSequenceList(data = {}) {
return request({
url: '/basic/workshop-section/list',
method: 'post',
data
})
}
/**
* 获取设备列表
* @param {object} data
* @param {string} data.code
* @param {number} data.current
* @param {number} data.enabled
* @param {string} data.fileName
* @param {string} data.name
* @param {number} data.size
* @param {number} data.workshopSectionId
*/
export function getEquipmentList(data = {}) {
return request({
url: '/basic/equipment/list',
method: 'post',
data
})
}
/**
* 获取设备状态时序数据
* @param {object} data
* @param {number} [data.current]
* @param {number} [data.size]
* @param {number} [data.enabled]
* @param {string} data.startTime
* @param {string} data.endTime
* @param {string} data.type
* @param {string} data.wsId
* @param {string} data.eqId
* @param {string} data.eqTypeId
* @param {string} data.ftId
* @param {string} data.productlines
*/
export function getStatus(data) {
return request({
url: '/analysis/equipment-analysis/time-Status',
method: 'post',
data
})
}

View File

@ -0,0 +1,16 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: gtz
* @LastEditTime: 2022-05-07 16:32:34
* @Description:
*/
import request from '@/utils/request'
export function lineList(data) { // 获取产线列表
return request({
url: '/basic/production-line/page',
method: 'post',
data
})
}

126
src/api/art-manage/art.js Normal file
View File

@ -0,0 +1,126 @@
import request from '@/utils/request'
export function list(data) {
return request({
url: '/process/process-flow/page',
method: 'post',
data
})
}
export function getInfo(data) {
return request({
url: '/process/process-flow/get',
method: 'post',
data
})
}
export function enabled(data) {
return request({
url: '/process/process-flow/enabled',
method: 'post',
data
})
}
export function del(data) {
return request({
url: '/process/process-flow/delete',
method: 'post',
data
})
}
export function update(data) {
return request({
url: '/process/process-flow/update',
method: 'post',
data
})
}
export function add(data) {
return request({
url: '/process/process-flow/add',
method: 'post',
data
})
}
// 获取基板列表
export function listSubstrate(data) {
return request({
url: '/process/process-flow/substrateList',
method: 'post',
data
})
}
// 获取BOM列表
export function listBom(data) {
return request({
url: '/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: '/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: '/process/process-flow-equipment/allEquipmentRecipeList',
method: 'post',
data
})
}
// 保存某个工艺下的所有节点
export function addProcessFlows(data) {
return request({
url: 'process/process-flow-equipment/add',
method: 'post',
data
})
}
// 获取工艺流程下所有节点
export function listProcessFlowNode(data) {
return request({
url: '/process/process-flow-equipment/list',
method: 'post',
data
})
}
// 获取工序列表
export function listProcess(data) {
return request({
url: '/process/work-sequence/list',
method: 'post',
data
})
}
// 获取工艺自动code
export function getCode() {
return request({
url: '/process/process-flow/getCode',
method: 'post'
})
}

View File

@ -0,0 +1,49 @@
/*
* @Author: gtz
* @Date: 2021-04-06 20:20:10
* @LastEditors: gtz
* @LastEditTime: 2021-04-07 16:14:47
* @Description: 工序管理 api
*/
import request from '@/utils/request'
export function list(data) {
return request({
url: '/process/work-sequence/page',
method: 'post',
data
})
}
export function getInfo(data) {
return request({
url: '/process/work-sequence/get',
method: 'post',
data
})
}
export function del(data) {
return request({
url: '/process/work-sequence/delete',
method: 'post',
data
})
}
export function update(data) {
return request({
url: '/process/work-sequence/update',
method: 'post',
data
})
}
export function add(data) {
return request({
url: '/process/work-sequence/add',
method: 'post',
data
})
}

View File

@ -0,0 +1,159 @@
/*
* @Author: gtz
* @Date: 2021-04-06 20:20:10
* @LastEditors: gtz
* @LastEditTime: 2021-04-07 16:14:47
* @Description: 工艺流程 api
*/
import request from '@/utils/request'
/**
* 获取工艺分页列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} data.enabled
* @param {string} data.key // 查询关键字
*/
export function list(data) {
return request({
url: '/process/process-flow/page',
method: 'post',
data
})
}
/**
* 获取工艺详情
* @param {string} id
*/
export function getInfo(data) {
return request({
url: '/process/process-flow/get',
method: 'post',
data
})
}
/**
* 删除工艺
* @param {string} id
*/
export function del(id) {
return request({
url: '/process/process-flow/delete',
method: 'post',
data: { id }
})
}
/**
* 更新工艺
* @param {object} data
* @param {number} data.bomId
* @param {string} data.code
* @param {number} data.description
* @param {string} data.externalCode
* @param {number} data.id
* @param {string} data.name
* @param {number} data.productId
* @param {number} data.remark
*/
export function update(data) {
return request({
url: '/process/process-flow/update',
method: 'post',
data
})
}
/**
* 获取工艺
* @param {object} data
* @param {number} data.bomId
* @param {string} data.code
* @param {number} data.description
* @param {string} data.externalCode
* @param {number} data.id
* @param {string} data.name
* @param {number} data.productId
* @param {number} data.remark
*/
export function add(data) {
return request({
url: '/process/process-flow/add',
method: 'post',
data
})
}
/**
* 获取BOM列表
*/
export function getBom() {
return request({
url: '/process/process-flow/bomList',
method: 'POST'
})
}
/**
* 启停工艺
* @param {object} data
* @param {number} data.enabled
* @param {number} data.id
*/
export function toggleEnabled(data) {
return request({
url: '/process/process-flow/enabled',
method: 'POST',
data
})
}
/**
* 生成工艺编码
*/
export function getCode() {
return request({
url: '/process/process-flow/getCode',
method: 'post'
})
}
/**
* 获取产品列表
*/
export function getProductList() {
return request({
url: '/basic/product/page',
method: 'POST',
data: {
current: 1,
size: 999
}
})
}
/**
* 获取工序列表
*/
export function getWorkSequenceList(data) {
return request({
url: '/process/work-sequence-equipment-type/getList',
method: 'POST',
data
})
}
/**
* 新增/删除/更新 工艺下的工序设备类型
*/
export function modifyWorkSequence(data) {
return request({
url: '/process/work-sequence-equipment-type/update',
method: 'POST',
data
})
}

41
src/api/article.js Normal file
View 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
View 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'

View 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 }
})
}

View 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 }
})
}

View 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 }
})
}

View File

@ -0,0 +1,143 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-03-18 10:42:27
* @Description:
*/
import request from '@/utils/request'
/**
* 获取区域信息列表
* @param {object} data
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.name]
* @param {number} [data.enabled]
* @param {number|string} [data.cacheId]
*/
export function list(data) {
return request({
url: '/basic/area/page',
method: 'post',
data
})
}
/**
* 获取区域信息单条数据
* @param {number|string} id
*/
export function detail(id) {
return request({
url: '/basic/area/get',
method: 'post',
data: { id }
})
}
/**
* 更新区域信息单条数据
* @param {object} data
* @param {number|string} data.id
* @param {number|string} data.cacheId
* @param {string} data.name
* @param {string} data.code
* @param {string} [data.enName]
* @param {number} [data.enabled]
*/
export function update(data) {
return request({
url: '/basic/area/update',
method: 'post',
data
})
}
/**
* 新增区域信息单条数据
* @param {object} data
* @param {number|string} [data.id]
* @param {number|string} data.cacheId
* @param {string} data.code
* @param {string} data.name
* @param {string} [data.enName]
* @param {number} [data.enabled]
*/
export function add(data) {
return request({
url: '/basic/area/add',
method: 'post',
data
})
}
/**
* 获取区域code
*/
export function getCode() {
return request({
url: '/basic/area/get-code',
method: 'post'
})
}
/**
* 删除区域单条数据
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/area/delete',
method: 'post',
data: { id }
})
}
/**
* 启停区域, 1: enable, 0: disable
* @param {object} data
* @param {number} data.id
* @param {number} data.enabled
*/
export function toggleEnable(data) {
return request({
url: '/basic/area/enabled',
method: 'post',
data
})
}
/**
* 分页获取区域列表
* @param {object} data
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.name]
* @param {number} [data.enabled]
* @param {string} [data.code]
*/
export function getCacheList(data) {
return request({
url: '/basic/cache/page',
method: 'post',
data
})
}
/**
* 获取区域里的库位信息分页获取
* @param: {object} data
* @param: {number} data.areaId
* @param: {number} data.current
* @param: {number} data.size
* @param: {number} [data.enabled]
* @param: {string} [data.name]
*/
export function getLocations(data) {
return request({
url: '/basic/stock/pageOfArea',
method: 'post',
data
})
}

View File

@ -0,0 +1,25 @@
/*
* @Author: lb
* @Date: 2022-03-10 11:00:00
* @LastEditors: lb
* @LastEditTime: 2022-03-10 11:00:00
* @Description: 缓存区页面的库位信息接口
*/
import request from '@/utils/request'
/**
*
* @param { object } data
* @property cacheId current enabled name size
* @requires cacheId
* @requires current
* @requires size
* @returns
*/
export function cacheStocksList(data) { // 获取缓存区的库位信息列表
return request({
url: '/basic/stock/listOfCache',
method: 'post',
data
})
}

View File

@ -0,0 +1,132 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-03-18 15:31:32
* @Description:
*/
import request from '@/utils/request'
/**
* 分页获取缓存区列表
* @param {object} data
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.name]
* @param {number} [data.enabled]
* @param {string} [data.code]
*/
export function list(data) {
return request({
url: '/basic/cache/page',
method: 'post',
data
})
}
/**
* 获取缓存区信息单条数据
* @param {number|string} id
*/
export function detail(id) {
return request({
url: '/basic/cache/get',
method: 'post',
data: { id }
})
}
/**
* 更新缓存区信息单条数据
* @param {object} data
* @param {number|string} data.id
* @param {string} data.code
* @param {string} data.name
* @param {string} [data.abbr]
* @param {string} [data.enName]
* @param {string} [data.description]
* @param {string} [data.remark]
* @param {number} [data.stockNumber]
* @param {number} [data.enabled]
*/
export function update(data) {
return request({
url: '/basic/cache/update',
method: 'post',
data
})
}
/**
* 新增缓存区信息单条数据
* @param {object} data
* @param {number|string} [data.id]
* @param {string} data.code
* @param {string} data.name
* @param {string} [data.abbr]
* @param {string} [data.enName]
* @param {string} [data.description]
* @param {string} [data.remark]
* @param {number} [data.stockNumber]
* @param {number} [data.enabled]
*/
export function add(data) {
return request({
url: '/basic/cache/add',
method: 'post',
data
})
}
/**
* 获取缓存区信息code
*/
export function getCode() {
return request({
url: '/basic/cache/get-code',
method: 'post'
})
}
/**
* 删除缓存区信息单条数据
* @param {number|string} id
*/
export function del(id) {
return request({
url: '/basic/cache/delete',
method: 'post',
data: { id }
})
}
/**
* 启停缓存区
* @param {object} data
* @param {number} data.id
* @param {number} data.enabled
*/
export function toggleEnabled(data) {
return request({
url: '/basic/cache/enabled',
method: 'post',
data
})
}
/**
* 获取缓存区里的库位信息分页获取
* @param {object} data
* @param {number} data.cacheId
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.name]
*/
export function getLocations(data) {
return request({
url: '/basic/stock/pageOfCache',
method: 'post',
data
})
}

View File

@ -0,0 +1,41 @@
/*
* @Author: lb
* @Date: 2022-03-23 11:40:00
* @LastEditors: lb
* @LastEditTime: 2022-03-23 11:40:00
* @Description: 库存统计 的后端接口
*/
import request from '@/utils/request'
/**
* 获取半成品库存分页仓储信息
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.cacheId]
* @param {number} [data.enabled]
*/
export function list(data) {
return request({
url: '/stock/SemiFinished/page',
method: 'post',
data
})
}
/**
* 分页获取缓存区列表
* @param {object} data
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.name]
* @param {number} [data.enabled]
* @param {string} [data.code]
*/
export function getCaches(data) {
return request({
url: '/basic/cache/page',
method: 'post',
data
})
}

View File

@ -0,0 +1,101 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-03-18 16:40:00
* @Description:
*/
import request from '@/utils/request'
export function list(data) { // 获取库位信息列表 deprecated
return request({
url: '/basic/stock/page',
method: 'post',
data
})
}
/**
* 获取库位信息单条数据
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/stock/get',
method: 'post',
data: { id }
})
}
/**
* 更新库位信息单条数据
* @param {object} data
* @param {number|string} data.id
* @param {number|string} data.areaId
* @param {string} data.code
* @param {string} [data.anotherName]
* @param {string} [data.place]
* @param {string} [data.remark]
*/
export function update(data) {
return request({
url: '/basic/stock/update',
method: 'post',
data
})
}
/**
* 新增库位信息单条数据
* @param {object} data
* @param {number|string} [data.id]
* @param {number|string} data.areaId
* @param {string} data.code
* @param {string} data.name
* @param {string} [data.anotherName]
* @param {string} [data.place]
* @param {string} [data.remark]
*/
export function add(data) {
return request({
url: '/basic/stock/add',
method: 'post',
data
})
}
/**
* 获取库位信息code
*/
export function getCode() {
return request({
url: '/basic/stock/get-code',
method: 'post'
})
}
/**
* 删除库位信息单条数据
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/stock/delete',
method: 'post',
data: { id }
})
}
/**
* 更改区域/缓存区里的库位状态
* @param {object} data
* @param {number} data.id
* @param {number} data.enabled
*/
export function toggleLocationStatus(data) {
return request({
url: '/basic/stock/enabled',
method: 'post',
data
})
}

View File

@ -0,0 +1,143 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-03-18 10:28:58
* @Description:
*/
import request from '@/utils/request'
/**
* 获取货架信息列表
* @param {object} data
* @param {number} data.size 必要
* @param {number} data.current 必要
* @param {string} [data.name]
* @param {number} [data.enabled]
*/
export function list(data) {
return request({
url: '/basic/shelf/page',
method: 'post',
data
})
}
/**
* 获取货架信息单条数据
* @param {number|string} id
*/
export function detail(id) {
return request({
url: '/basic/shelf/get',
method: 'post',
data: { id }
})
}
/**
* 更新货架信息单条数据
* @param {object} data
* @param {number|string} data.id
* @param {string} data.code
* @param {string} data.anotherCode
* @param {string} data.name
* @param {number} data.enabled
* @param {number} data.dicDataId
*/
export function update(data) {
return request({
url: '/basic/shelf/update',
method: 'post',
data
})
}
/**
* 新增货架信息单条数据
* @param {object} data
* @param {number|string} [data.id]
* @param {string} data.code
* @param {string} data.anotherCode
* @param {string} data.name
* @param {number} data.enabled
* @param {number} data.dicDataId
*/
export function add(data) {
return request({
url: '/basic/shelf/add',
method: 'post',
data
})
}
/**
* 获取货架信息code
*/
export function getCode() {
return request({
url: '/basic/shelf/get-code',
method: 'post'
})
}
/**
* 删除货架信息单条数据
* @param {number} id
*/
export function del(id) { //
return request({
url: '/basic/shelf/delete',
method: 'post',
data: { id }
})
}
/**
* 启停货架
* @param {object} data
* @param {number|string} data.id
* @param {number} data.enabled
*/
export function toggleEnabled(data) {
return request({
url: '/basic/shelf/enabled',
method: 'post',
data
})
}
/**
* 获取分页区域信息列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {string} [data.name]
* @param {number} [data.cacheId]
* @param {number} [data.enabled]
*/
export function getAreaList(data) {
return request({
url: '/basic/area/page',
method: 'post',
data
})
}
/**
* 分页获取字典类型列表
* @param {object} data
* @param {number|string} data.dictTypeId
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.dataCode]
* @param {number} [data.dataName]
* @param {number} [data.enabled]
*/
export function getDictListByType(data) {
return request({
url: '/basic/platform-dict/selectPlatformDictDataListByPage',
method: 'post',
data
})
}

View File

@ -0,0 +1,195 @@
/*
* @Author: lb
* @Date: 2022-03-23 14:40:00
* @LastEditors: lb
* @LastEditTime: 2022-03-23 14:40:00
* @Description: 出入库操作 的后端接口
*/
import request from '@/utils/request'
/**
* 获取分页仓储出入库信息
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.operateType]
* @param {number} [data.shelfCode]
* @param {number} [data.enabled]
*/
export function list(data) {
return request({
url: '/stock/SemiFinishedLog/page',
method: 'post',
data
})
}
/**
* 删除某条操作记录
* @param {number} id
*/
export function del(id) {
return request({
url: '/stock/SemiFinishedLog/delete',
method: 'post',
data: { id }
})
}
/**
* 新增出入库记录
* @param {object} data
* @param {object} data.id
* @param {object} data.operateType
* @param {object} data.shelfId
* @param {object} data.stockId
* @param {object} data.semifinishedProductId
* @param {object} data.num
* @param {object} data.source
* @param {object} [data.remark]
*/
export function add(data) {
const url = '/stock/SemiFinishedLog' + (data.operateType === 1 ? '/output' : '/input')
return request({
url,
method: 'post',
data
})
}
/**
* 获取出入库信息单条数据 ==> 后端没有对应接口
* @param {number|string} id
*/
export function detail(id) {
return request({
url: '/stock/SemiFinishedLog/get',
method: 'post',
data: { id }
})
}
/**
* 更新出入库信息单条数据
* @param {object} data
* @param {number|string} data.id
* @param {number|string} data.semifinishedProductId
* @param {number|string} data.shelfId
* @param {number|string} data.stockId
* @param {number} data.operateType
* @param {number} data.num
* @param {number} data.source
* @param {string} [data.remark]
*/
export function update(data) {
return request({
url: '/stock/SemiFinishedLog/update',
method: 'post',
data
})
}
/**
* 分页获取货架信息
* @param {object} data
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.name]
* @param {number} [data.enabled]
*/
export function getShelfList(data) {
return request({
url: '/basic/shelf/page',
method: 'post',
data
})
}
/**
* 分页获取缓存区列表
* @param {object} data
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.name]
* @param {number} [data.enabled]
* @param {string} [data.code]
*/
export function getCacheList(data) {
return request({
url: '/basic/cache/page',
method: 'post',
data
})
}
/**
* 分页获取区域信息列表
* @param {object} data
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.name]
* @param {number} [data.enabled]
* @param {number|string} [data.cacheId]
*/
export function getAreaList(data) {
return request({
url: '/basic/area/page',
method: 'post',
data
})
}
/**
* 分页获取库位信息列表, 如果data里有cacheId则按照缓存区搜索如果有areaId就按照区域搜索
* @param {object} data
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.name]
* @param {number} [data.enabled]
* @param {number|string} [data.cacheId]
* @param {number|string} [data.areaId]
*/
export function getStockList(data) {
const url = '/basic/stock' + (data.cacheId ? '/pageOfCache' : '/pageOfArea')
return request({
url,
method: 'post',
data
})
}
/**
* 分页获取产品池列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {string} [data.key]
* @param {number} [data.enabled]
*/
export function getProductsList(data) {
// 获取产品池列表
return request({
url: '/basic/product/page',
method: 'post',
data
})
}
/**
* 获取可用库位
* @param {object} data
* @param {number} [data.cacheId]
* @param {number} [data.areaId]
* @param {number} data.operateType
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
*/
export function getAvailableStocks(data) {
const url = '/basic/stock/availableStock'
return request({
url,
method: 'post',
data
})
}

View File

@ -0,0 +1,70 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: zwq
* @LastEditTime: 2021-07-21 14:29:10
* @Description:
*/
import request from '@/utils/request'
export function storageBoxList(data) { // 获取存储箱列表
return request({
url: '/basic/storage-tank/page',
method: 'post',
data
})
}
export function storageBoxDetail(id) { // 获取存储箱单条数据
return request({
url: '/basic/storage-tank/get',
method: 'post',
data: { id }
})
}
export function storageBoxUpdate(data) { // 更新存储箱单条数据
return request({
url: '/basic/storage-tank/update',
method: 'post',
data
})
}
export function storageBoxAdd(data) { // 新增存储箱单条数据
return request({
url: '/basic/storage-tank/add',
method: 'post',
data
})
}
export function storageBoxCode() { // 获取存储箱code
return request({
url: '/basic/storage-tank/get-code',
method: 'post'
})
}
export function storageBoxDelete(id) { // 删除存储箱单条数据
return request({
url: '/basic/storage-tank/delete',
method: 'post',
data: { id }
})
}
export function PositionDetailInfoAdd(data) { // 新增存储箱地址单条数据
return request({
url: '/basic/storage-tank-site/add',
method: 'post',
data
})
}
export function PositionDetailInfoList(data) { // 获取存储箱地址列表
return request({
url: '/basic/storage-tank-site/page',
method: 'post',
data
})
}

View 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 }
})
}

View 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 }
})
}

View File

@ -0,0 +1,99 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-21 19:55:30
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页客户列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.code] 客户编码
* @param {string} [data.name] 客户名称
*/
export function list(data) {
return request({
url: '/basic/customer/page',
method: 'post',
data
})
}
/**
* 获取客户详情
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/customer/get',
method: 'post',
data: { id }
})
}
/**
* 更新客户
* @param {object} data
* @param {number} data.id
* @param {string} data.name
* @param {string} data.code
* @param {string} data.email
* @param {string} data.address
* @param {string} data.contact
* @param {string} data.telephone
* @param {string} data.description
*/
export function update(data) {
return request({
url: '/basic/customer/update',
method: 'post',
data
})
}
/**
* 新增客户
* @param {object} data
* @param {number} [data.id]
* @param {string} data.name
* @param {string} data.code
* @param {string} data.email
* @param {string} data.address
* @param {string} data.contact
* @param {string} data.telephone
* @param {string} data.description
*/
export function add(data) {
return request({
url: '/basic/customer/add',
method: 'post',
data
})
}
/**
* 获取客户code
*/
export function getCode() {
return request({
url: '/basic/customer/get-code',
method: 'post'
})
}
/**
* 删除客户
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/customer/delete',
method: 'post',
data: { id }
})
}

View File

@ -0,0 +1,102 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-21 19:56:00
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页供应商
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {string} [data.name]
* @param {string} [data.code]
* @param {number} [data.enabled]
*/
export function list(data) {
return request({
url: '/basic/supplier/page',
method: 'post',
data
})
}
/**
* 获取供应商详情
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/supplier/get',
method: 'post',
data: { id }
})
}
/**
* 更新供应商
* @param {object} data
* @param {number} data.id
* @param {string} data.name
* @param {string} data.code
* @param {string} data.email
* @param {string} data.contact
* @param {string} data.address
* @param {string} data.category
* @param {string} data.telephone
* @param {string} data.description
*/
export function update(data) {
// 更新供应商单条数据
return request({
url: '/basic/supplier/update',
method: 'post',
data
})
}
/**
* 新增供应商
* @param {object} data
* @param {number} [data.id]
* @param {string} data.name
* @param {string} data.code
* @param {string} data.email
* @param {string} data.contact
* @param {string} data.address
* @param {string} data.category
* @param {string} data.telephone
* @param {string} data.description
*/
export function add(data) {
return request({
url: '/basic/supplier/add',
method: 'post',
data
})
}
/**
* 获取供应商code
*/
export function getCode() {
return request({
url: '/basic/supplier/get-code',
method: 'post'
})
}
/**
* 删除供应商
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/supplier/delete',
method: 'post',
data: { id }
})
}

View 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 }
})
}

View 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 }
})
}

View 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 }
})
}

View 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 }
})
}

View 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 }
})
}

View 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 }
})
}

View 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 }
})
}

View 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 }
})
}

View File

@ -0,0 +1,158 @@
/*
* @Author: zwq
* @Date: 2021-01-29 09:39:04
* @LastEditors: lb
* @LastEditTime: 2022-04-19 11:59:29
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页设备分组列表
* @param {object} data
* @param {string} [data.name]
* @param {string} [data.code]
* @param {number} [data.enabled]
* @param {number} data.current
* @param {number} data.size
*/
export function list(data) {
return request({
url: '/basic/equipment-group/page',
method: 'post',
data
})
}
/**
* 根据id获取分组信息
* @param {number} id
* @returns
*/
export function detail(id) {
return request({
url: '/basic/equipment-group/get',
method: 'post',
data: { id }
})
}
/**
* 更新设备分组
* @param {object} data
* @param {number} data.id
* @param {string} data.code
* @param {string} data.name
* @param {string} [data.remark]
* @param {number} [data.typeId] 设备类型id
*/
export function update(data) {
return request({
url: '/basic/equipment-group/update',
method: 'post',
data
})
}
/**
* 新增设备分组
* @param {object} data
* @param {number} [data.id]
* @param {string} data.code
* @param {string} data.name
* @param {string} [data.remark]
* @param {number} [data.typeId] 设备类型id
*/
export function add(data) {
return request({
url: '/basic/equipment-group/add',
method: 'post',
data
})
}
/**
* 获取随机生成的设备编码
*/
export function getCode() {
return request({
url: '/basic/equipment-group/get-code',
method: 'post'
})
}
/**
* 删除设备分组
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/equipment-group/delete',
method: 'post',
data: { id }
})
}
/**
{
"current": 1,
"size": 10,
"enabled": 1,
"equipmentGroupId": "设备分组id",
}
*/
export function getWarningList(data) {
// 获取分组报警列表
return request({
url: '/basic/equipment-group-alarm/page',
method: 'post',
data
})
}
/**
* 添加一条分组报警
"alarmContent": " ",
"alarmGrade": " ",
"alarmType": " ",
"equipmentGroupId": 1,
"externalCode": " ",
"id": 1
*/
export function addWarning(data) {
return request({
url: '/basic/equipment-group-alarm/add',
method: 'post',
data
})
}
export function updateWarning(data) {
return request({
url: '/basic/equipment-group-alarm/update',
method: 'post',
data
})
}
/**
* 删除一条设备分组报警
*/
export function deleteWarning(id) {
return request({
url: '/basic/equipment-group-alarm/delete',
method: 'post',
data: { id }
})
}
export function getWarningCode() {
return request({
url: '/basic/equipment-group-alarm/get-code',
method: 'post',
data: {}
})
}

View File

@ -0,0 +1,291 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-18 10:40:01
* @Description:
*/
import request from '@/utils/request'
/**
* 获取设备分页列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {string} [data.code]
* @param {number} [data.enabled]
* @param {string} [data.name]
*/
export function list(data) {
return request({
url: '/basic/equipment/page',
method: 'post',
data
})
}
/**
* 获取设备单条数据
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/equipment/get',
method: 'post',
data: { id }
})
}
/**
* 更新设备信息
* @param {object} data
* @param {string} data.abbr 缩写
* @param {number} data.activiation 是否稼动率
* @param {string} data.code 设备编码
* @param {number} data.communication 是否通讯
* @param {number} data.controlStatus 控制状态(默认0; 0-本地1-远程)
* @param {number} data.debugPeriod 调试周期天
* @param {string} data.debugTime 调试日期(datetime的string)
* @param {string} data.description 设备描述
* @param {number} data.eapVersion EAP版本
* @param {string} data.enName 英文名称
* @param {string} data.enterTime 进厂日期(datetime的string)
* @param {string} data.equipmentArea 设备区域
* @param {number} data.equipmentId 设备id
* @param {number} data.equipmentType 设备类型
* @param {number} data.estatus
* @param {number} data.fileId 文件id
* @param {number} data.groupId 设备分组id
* @param {number} data.id 设备id
* @param {string} data.intellectualProperty 知识产权
* @param {string} data.ip 设备ip地址
* @param {number} data.maintenanceCycle 保养周期
* @param {number} data.maintenanceTime 保养持续时间小时
* @param {string} data.manufacturer 生产厂商
* @param {string} data.name 设备名称
* @param {number} data.numberOfCavities 腔体数量
* @param {string} data.plcVersion PLC版本
* @param {string} data.port 端口号
* @param {string} data.processingQuantityPerCavity 每腔加工数量
* @param {string} data.productionTime 生产日期(datetime的string)
* @param {number} data.rangeNumber 范围号
* @param {string} data.remark 备注
* @param {string} data.spec 规格描述
*/
export function update(data) {
return request({
url: '/basic/equipment/update',
method: 'post',
data
})
}
/**
* 更新设备信息
* @param {object} data
* @param {string} data.abbr 缩写
* @param {number} data.activiation 是否稼动率
* @param {string} data.code 设备编码
* @param {number} data.communication 是否通讯
* @param {number} data.controlStatus 控制状态(默认0; 0-本地1-远程)
* @param {number} data.debugPeriod 调试周期天
* @param {string} data.debugTime 调试日期(datetime的string)
* @param {string} data.description 设备描述
* @param {number} data.eapVersion EAP版本
* @param {string} data.enName 英文名称
* @param {string} data.enterTime 进厂日期(datetime的string)
* @param {string} data.equipmentArea 设备区域
* @param {number} data.equipmentId 设备id
* @param {number} data.equipmentType 设备类型
* @param {number} data.estatus
* @param {number} data.fileId 文件id
* @param {number} data.groupId 设备分组id
* @param {number} data.id 设备id
* @param {string} data.intellectualProperty 知识产权
* @param {string} data.ip 设备ip地址
* @param {number} data.maintenanceCycle 保养周期
* @param {number} data.maintenanceTime 保养持续时间小时
* @param {string} data.manufacturer 生产厂商
* @param {string} data.name 设备名称
* @param {number} data.numberOfCavities 腔体数量
* @param {string} data.plcVersion PLC版本
* @param {number} data.port 端口号
* @param {number} data.processingQuantityPerCavity 每腔加工数量
* @param {string} data.productionTime 生产日期(datetime的string)
* @param {number} data.rangeNumber 范围号
* @param {string} data.remark 备注
* @param {string} data.spec 规格描述
*/
export function add(data) {
return request({
url: '/basic/equipment/add',
method: 'post',
data
})
}
export function getCode() {
// 获取设备信息code
return request({
url: '/basic/equipment/get-code',
method: 'post'
})
}
/**
* 删除设备信息
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/equipment/delete',
method: 'post',
data: { id }
})
}
/** ---------------- 设备文件 : ------------------ */
/**
* 平台设备文件信息管理接口 - 保存设备文件
* @param {object} data
* @param {number} data.id
* @param {number} data.equipmentId
* @param {number} data.fileId
* @param {string} data.fileName
* @param {string} data.fileUrl
* @param {string} data.typeCode
*/
export function saveFile(data) {
return request({
url: '/basic/equipment-file/update-file',
method: 'post',
data
})
}
/**
* 平台设备文件信息管理接口 - 获取设备文件
* @param {object} data
* @param {number} data.id
* @param {number} data.equipmentId
* @param {number} data.fileId
* @param {string} data.fileName
* @param {string} data.fileUrl
* @param {string} data.typeCode
*/
export function getFile(data) {
return request({
url: '/basic/equipment-file/get-by-param',
method: 'post',
data
})
}
/**
* 根据id删除某个服务器上的文件
* @param {number} id
*/
export function delFile(id) {
return request({
url: '/basic/equipment-file/delete',
method: 'post',
data: { id }
})
}
/** ---------------- 设备类型 : ------------------ */
/**
* 获取设备类型列表
* @param {object} data
* @param {number} data.size
* @param {number} data.current
* @param {string} [data.name]
* @param {string} [data.code]
* @param {number} [data.enabled]
*/
export function getEquipmentTypeList(data) {
return request({
url: '/basic/equipment-type/page',
method: 'post',
data
})
}
/** ---------------- 设备分组 : ------------------ */
/**
* 获取分页设备分组列表
* @param {object} data
* @param {string} [data.name]
* @param {string} [data.code]
* @param {number} [data.enabled]
* @param {number} data.current
* @param {number} data.size
*/
export function getEquipmentGroupList(data) {
return request({
url: '/basic/equipment-group/page',
method: 'post',
data
})
}
/** ---------------- 设备属性 : ------------------ */
/**
* 获取分页设备属性列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.equipmentId]
*/
export function getEquipmentAttributeList(data) {
return request({
url: '/basic/equipment-attr/page',
method: 'post',
data
})
}
/**
* 删除设备属性
* @param {number} id
*/
export function deleteEquipmentAttribute(id) {
return request({
url: '/basic/equipment-attr/delete',
method: 'post',
data: { id }
})
}
/**
* 获取分页供应商列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
*/
export function getSupplierList(data) {
return request({
url: '/basic/supplier/page',
method: 'post',
data
})
}
/**
* 导出设备信息
*/
export function exportEquipments(data) {
return request({
url: '/basic/equipment/export',
method: 'post',
data,
responseType: 'blob',
timeout: 60000
})
}

View File

@ -0,0 +1,92 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-19 9:00:52
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页设备属性列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.equipmentId]
*/
export function list(data) {
return request({
url: '/basic/equipment-attr/page',
method: 'post',
data
})
}
/**
* 获取设备属性
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/equipment-attr/get',
method: 'post',
data: { id }
})
}
/**
* 更新设备属性
* @param {object} data
* @param {number} data.id
* @param {string} data.attrName
* @param {string} data.attrValue
* @param {string} data.equipmentId
* @param {string} [data.remark]
*/
export function update(data) {
return request({
url: '/basic/equipment-attr/update',
method: 'post',
data
})
}
/**
* 新增设备属性
* @param {object} data
* @param {number} [data.id]
* @param {string} data.attrName
* @param {string} data.attrValue
* @param {string} data.equipmentId
* @param {string} [data.remark]
*/
export function add(data) {
return request({
url: '/basic/equipment-attr/add',
method: 'post',
data
})
}
/**
* 获取设备属性code
*/
export function getCode() {
return request({
url: '/basic/equipment-attr/get-code',
method: 'post'
})
}
/**
* 删除设备属性
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/equipment-attr/delete',
method: 'post',
data: { id }
})
}

View 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
})
}

View 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 }
})
}

View File

@ -0,0 +1,149 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: gtz
* @LastEditTime: 2022-07-28 20:45:12
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页设备类型列表
* @param {object} data
* @param {string} data.code
* @param {number} data.current
* @param {number} data.enabled
* @param {string} data.name
* @param {number} data.size
*/
export function list(data) {
return request({
url: '/basic/equipment-type/page',
method: 'post',
data
})
}
/**
* 获取设备类型
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/equipment-type/get',
method: 'post',
data: { id }
})
}
/**
* 更新设备类型
* @param {object} data
* @param {number} data.id
* @param {string} data.name
* @param {string} data.code
* @param {string} [data.remark]
*/
export function update(data) {
return request({
url: '/basic/equipment-type/update',
method: 'post',
data
})
}
/**
* 新增设备类型
* @param {object} data
* @param {number} [data.id]
* @param {string} data.name
* @param {string} data.code
* @param {string} [data.remark]
*/
export function add(data) {
return request({
url: '/basic/equipment-type/add',
method: 'post',
data
})
}
export function getCode() { // 获取设备类型code
return request({
url: '/basic/equipment-type/get-code',
method: 'post'
})
}
/**
* 删除设备类型
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/equipment-type/delete',
method: 'post',
data: { id }
})
}
export function listAll() { // 获取全部设备类型层级关系
return request({
url: '/basic/equipment-type/list-all',
method: 'post'
})
}
/**
* 保存设备类型文件
* @param {object} data
* @param {string} data.equipmentTypeId
* @param {number} data.id
* @param {string} data.fileId
* @param {string} data.fileName
* @param {string} data.fileUrl
* @param {string} data.typeCode
*/
export function equipmentTypeFileAdd(data) {
return request({
url: '/basic/equipment-type-file/update-file',
method: 'post',
data
})
}
/**
* 获取设备类型上传的文件列表
* @param {object} data
* @param {string} data.equipmentTypeId
* @param {number} [data.id]
* @param {string} [data.fileId]
* @param {string} [data.fileName]
* @param {string} [data.fileUrl]
* @param {string} [data.typeCode]
*/
export function getFileList(data) {
return request({
url: '/basic/equipment-type-file/get-by-param',
method: 'post',
data
})
}
/**
* 获取设备类型上传的文件列表
* @param {object} data
* @param {string} data.equipmentTypeId
* @param {number} [data.id]
* @param {string} [data.fileId]
* @param {string} [data.fileName]
* @param {string} [data.fileUrl]
* @param {string} [data.typeCode]
*/
export function delFile(data) {
return request({
url: '/basic/equipment-type-file/delete',
method: 'post',
data
})
}

View File

@ -0,0 +1,89 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-19 15:20:00
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页保养周期
* @param {object} data
* @param {number} data.current
* @param {number} data.enabled
* @param {number} data.size
*/
export function list(data) {
return request({
url: '/basic/maintenance-period/page',
method: 'post',
data
})
}
/**
* 获取保养周期
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/maintenance-period/get',
method: 'post',
data: { id }
})
}
/**
* 更新保养周期
* @param {object} data
* @param {number} data.id
* @param {string} data.code
* @param {string} data.maintenancePeriod
* @param {string} [data.remark]
*/
export function update(data) {
return request({
url: '/basic/maintenance-period/update',
method: 'post',
data
})
}
/**
* 新增保养周期
* @param {object} data
* @param {number} [data.id]
* @param {string} data.code
* @param {string} data.maintenancePeriod
* @param {string} [data.remark]
*/
export function add(data) {
return request({
url: '/basic/maintenance-period/add',
method: 'post',
data
})
}
/**
* 获取保养周期code
*/
export function getCode() {
return request({
url: '/basic/maintenance-period/get-code',
method: 'post'
})
}
/**
* 删除保养周期
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/maintenance-period/delete',
method: 'post',
data: { id }
})
}

View File

@ -0,0 +1,94 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-19 15:20:00
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页维修类型
* @param {object} data
* @param {string} [data.name]
* @param {string} [data.code]
* @param {number} [data.enabled]
* @param {number} data.current
* @param {number} data.size
*/
export function list(data) {
return request({
url: '/basic/maintenance-type/page',
method: 'post',
data
})
}
/**
* 获取维修类型详情
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/maintenance-type/get',
method: 'post',
data: { id }
})
}
/**
* 更新维修类型
* @param {object} data
* @param {number} data.id
* @param {string} data.name
* @param {string} data.code
* @param {string} [data.enName]
* @param {string} [data.remark]
*/
export function update(data) {
return request({
url: '/basic/maintenance-type/update',
method: 'post',
data
})
}
/**
* 新增维修类型
* @param {object} data
* @param {number} [data.id]
* @param {string} data.name
* @param {string} data.code
* @param {string} [data.enName]
* @param {string} [data.remark]
*/
export function add(data) {
return request({
url: '/basic/maintenance-type/add',
method: 'post',
data
})
}
/**
* 获取维修类型code
* @returns
*/
export function getCode() {
return request({
url: '/basic/maintenance-type/get-code',
method: 'post'
})
}
/**
* 删除维修类型
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/maintenance-type/delete',
method: 'post',
data: { id }
})
}

View File

@ -0,0 +1,117 @@
/*
* @Author: zwq
* @Date: 2021-01-29 09:39:04
* @LastEditors: lb
* @LastEditTime: 2022-04-20 9:20:00
* @Description:
*/
import request from '@/utils/request'
/**
* 获取备品备件分页列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {string} [data.key]
* @param {number} [data.enabled]
*/
export function list(data) {
return request({
url: '/basic/tool-spare-part/page',
method: 'post',
data
})
}
/**
* 获取备品备件
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/tool-spare-part/get',
method: 'post',
data: { id }
})
}
/**
* 更新备品备件
* @param {object} data
* @param {number} data.id
* @param {string} data.code
* @param {string} data.name
* @param {number} [data.life]
* @param {string} [data.model]
* @param {string} [data.description]
* @param {string} [data.dictDataId]
* @param {string} [data.specifications]
*/
export function update(data) {
return request({
url: '/basic/tool-spare-part/update',
method: 'post',
data
})
}
/**
* 新增备品备件
* @param {object} data
* @param {number} [data.id]
* @param {string} data.code
* @param {string} data.name
* @param {number} [data.life]
* @param {string} [data.model]
* @param {string} [data.description]
* @param {string} [data.dictDataId]
* @param {string} [data.specifications]
*/
export function add(data) {
return request({
url: '/basic/tool-spare-part/add',
method: 'post',
data
})
}
/**
* 获取备品备件code
*/
export function getCode() {
return request({
url: '/basic/tool-spare-part/get-code',
method: 'post'
})
}
/**
* 删除备品备件
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/tool-spare-part/delete',
method: 'post',
data: { id }
})
}
/**
* 获取单位列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
*/
export function getUnitList(data) {
return request({
url: '/basic/platform-dict/selectPlatformDictDataListByPage',
method: 'post',
data: {
...data,
dictTypeId: '2'
}
})
}

View File

@ -0,0 +1,48 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: zwq
* @LastEditTime: 2021-07-06 11:10:22
* @Description:
*/
import request from '@/utils/request'
export function EquipmentScrapGradeList(data) { // 获取废片等级列表
return request({
url: '/basic/equipment-scraps-grade/pageForEquipmentGrade',
method: 'post',
data
})
}
export function EquipmentScrapGradeDetail(id) { // 获取废片等级单条数据
return request({
url: '/basic/equipment-scraps-grade/get',
method: 'post',
data: { id }
})
}
export function EquipmentScrapGradeUpdate(data) { // 更新废片等级单条数据
return request({
url: '/basic/equipment-scraps-grade/update',
method: 'post',
data
})
}
export function EquipmentScrapGradeAdd(data) { // 新增废片等级单条数据
return request({
url: '/basic/equipment-scraps-grade/add',
method: 'post',
data
})
}
export function EquipmentScrapGradeDelete(id) { // 删除废片等级单条数据
return request({
url: '/basic/equipment-scraps-grade/delete',
method: 'post',
data: { id }
})
}

View 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 }
})
}

View 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 }
})
}

View File

@ -0,0 +1,122 @@
/*
* @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 }
})
}
/**
* 获取工单下的设备分页列表
* @param {object} data
* @param {number} data.current
* @param {number} data.enabled
* @param {string} data.equipmentId
* @param {string} data.equipmentName
* @param {string} data.id
* @param {string} data.name
* @param {number} data.size
*/
export function getEquipmentListBy(data) {
return request({
url: '/basic/workshop-section/page-WorksectionEquipment',
method: 'post',
data
})
}
/**
* {
* equipmentId: [],
* id,
* remark,
* singleEquipmentId,
* workshopSectionId,
* }
*/
export function addNewEquipment(data) {
return request({
url: '/basic/workshop-section/add-SingleWorksectionEquipment',
method: 'post',
data
})
}
export function getAllEquipmentList() {
// 获取所有设备分页列表
return request({
url: '/basic/equipment/list',
method: 'post',
data: {}
// data: {
// current: 1,
// size: 999,
// enabled: 1
// }
})
}
export function deleteEquipment(id) {
// 从工段里删除一个设备
return request({
url: '/basic/workshop-section/delete-WorksectionEquipment',
method: 'post',
data: {
id
}
})
}

View File

@ -0,0 +1,127 @@
/*
* @Author: lb
* @Date: 2022-04-12 14:30:00
* @LastEditors: lb
* @LastEditTime: 2022-04-12 14:30:00
* @Description: 部门 相关接口
*/
import request from '@/utils/request'
/**
* 新增部门
* @param {object} data
* @param {string} data.name
* @param {string} data.code
* @param {number|string} [data.id]
* @param {number|string} [data.parentId]
* @param {string} [data.description] 备注|描述
* @param {string} [data.remark] 备注(deprecated)
*/
export function add(data) {
return request({
url: '/basic/department/add',
method: 'post',
data
})
}
/**
* 删除部门
* @param {number|string} id
*/
export function del(id) {
return request({
url: '/basic/department/delete',
method: 'post',
data: { id }
})
}
/**
* getcode
*/
export function getCode() {
return request({
url: '/basic/department/get-code',
method: 'post'
})
}
/**
* 获取部门详情
* @param {number|string} id
*/
export function detail(id) {
return request({
url: '/basic/department/get',
method: 'post',
data: { id }
})
}
/**
* 获取部门列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.key] 查询关键字
*/
export function list(data) {
return request({
url: '/basic/department/list',
method: 'post',
data
})
}
/**
* 获取部门分页列表 --- 基本上同 list
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.key] 查询关键字
*/
export function listByPage(data) {
return request({
url: '/basic/department/page',
method: 'post',
data
})
}
/**
* 更新部门
* @param {object} data
* @param {string} data.name
* @param {string} data.code
* @param {number|string} data.id
* @param {number|string} [data.parentId]
* @param {string} [data.description] 备注|描述
* @param {string} [data.remark] 备注(deprecated)
*/
export function update(data) {
return request({
url: '/basic/department/update',
method: 'post',
data
})
}
/**
* 获取部门树列表
* @param {object} data
* @param {number} data.id
* @param {string} data.key
* @param {number} data.current
* @param {number} data.size
* @param {number} data.enabled
*/
export function getTree(data) {
return request({
url: '/basic/department/tree',
method: 'post',
data
})
}

View File

@ -0,0 +1,209 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: zwq
* @LastEditTime: 2021-01-12 15:38:59
* @Description:
*/
import request from '@/utils/request'
/**
* 获取班组分页列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.key]
* @param {number|string} [data.teamId]
*/
export function list(data) {
return request({
url: '/basic/team/page',
method: 'post',
data
})
}
/**
* 获取班组单条数据
* @param {number|string} id
*/
export function detail(id) {
return request({
url: '/basic/team/get',
method: 'post',
data: { id }
})
}
/**
* 更新班组单条数据
* @param {object} data
* @param {string} data.code
* @param {string} [data.description]
* @param {number} data.id
* @param {string} data.name
* @param {string} [data.teamLeader]
* @param {string} [data.teamLeaderId]
* @param {number} [data.teamNumber]
* @param {number} [data.workStatus]
*/
export function update(data) {
return request({
url: '/basic/team/update',
method: 'post',
data
})
}
/**
* 新增班组单条数据
* @param {object} data
* @param {string} data.code
* @param {string} [data.description]
* @param {number} [data.id]
* @param {string} data.name
* @param {string} [data.teamLeader]
* @param {string} [data.teamLeaderId]
* @param {number} [data.teamNumber]
* @param {number} [data.workStatus]
*/
export function add(data) {
return request({
url: '/basic/team/add',
method: 'post',
data
})
}
/**
* 获取班组code
*/
export function getCode() {
return request({
url: '/basic/team/get-code',
method: 'post'
})
}
/**
* 删除班组单条数据
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/team/delete',
method: 'post',
data: { id }
})
}
/**
* 启停班组
* @param {object} data
* @param {number} data.enabled
* @param {number} data.id
*/
export function toggleEnabled(data) {
return request({
url: '/basic/team/enabled',
method: 'post',
data
})
}
/**
* 获取部门列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.key] 查询关键字
*/
export function getDepartmentList(data) {
return request({
url: '/basic/department/list',
method: 'post',
data
})
}
/**
* 获取员工列表
* @param {object} data
* @param {number} data.current
* @param {number} [data.status]
* @param {string} [data.code]
* @param {string} [data.name]
* @param {number} data.size
*/
export function getStaffList(data) {
return request({
url: '/basic/worker/page',
method: 'post',
data
})
}
/**
* 获取分页班组成员
* @param {object} data
* @param {number} data.current
* @param {number} [data.enabled]
* @param {number} [data.key]
* @param {number} data.size
* @param {number} [data.teamId]
* @param {string} [data.workerId]
*/
export function getCrewList(data) {
return request({
url: '/basic/team-det/page',
method: 'post',
data
})
}
/**
* 删除班组单条数据
* @param {object} data
* @param {string} data.description
* @param {number} data.id
* @param {string} data.teamId
* @param {string} data.workerId
* @param {string} data.workerName
* @param {number} [data.workshopId]
*/
export function deleteCrew(data) {
return request({
url: '/basic/team-det/delete',
method: 'post',
data
})
}
/**
* 获取组员详情
* @param {number} id
*/
export function getCrewDetail(id) {
return request({
url: '/basic/team-det/get',
method: 'post',
data: { id }
})
}
/**
* 获取员工单条数据
* 组员既是员工
* 但是组员的接口和员工的接口不一样
* 员工的接口返回的数据更详细
* @param {number} id
*/
export function getStaffDetail(id) {
return request({
url: '/basic/worker/get',
method: 'post',
data: { id }
})
}

View File

@ -0,0 +1,109 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: zwq
* @LastEditTime: 2021-02-08 09:51:54
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页班组成员
* @param {object} data
* @param {number} data.current
* @param {number} [data.enabled]
* @param {number} [data.key]
* @param {number} data.size
* @param {number} [data.teamId]
* @param {string} [data.workerId]
*/
export function list(data) {
return request({
url: '/basic/team-det/page',
method: 'post',
data
})
}
/**
* 获取组员详情
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/team-det/get',
method: 'post',
data: { id }
})
}
/**
* 更新组员数据
* @param {object} data
* @param {string} [data.description]
* @param {number} data.id
* @param {string} data.teamId
* @param {string} data.workerId
* @param {string} data.workerName
* @param {number} data.workshopId
*/
export function update(data) {
return request({
url: '/basic/team-det/update',
method: 'post',
data
})
}
export function add(data) {
// 新增班组单条数据
return request({
url: '/basic/team-det/add',
method: 'post',
data
})
}
export function getCode() {
// 获取班组code
return request({
url: '/basic/team-det/get-code',
method: 'post'
})
}
/**
* 删除班组单条数据
* @param {object} data
* @param {string} data.description
* @param {number} data.id
* @param {string} data.teamId
* @param {string} data.workerId
* @param {string} data.workerName
* @param {number} [data.workshopId]
*/
export function del(data) {
return request({
url: '/basic/team-det/delete',
method: 'post',
data
})
}
/**
* 获取分页工段列表
* @param {object} data
* @param {number} data.current
* @param {number} [data.enabled]
* @param {string} [data.id]
* @param {string} [data.name]
* @param {number} data.size
*/
export function getWorkshopList(data) {
return request({
url: '/basic/workshop-section/page',
method: 'post',
data
})
}

View File

@ -0,0 +1,92 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-26 16:38:42
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页专业列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.name]
*/
export function list(data) {
return request({
url: '/basic/major/page',
method: 'post',
data
})
}
/**
* 获取专业
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/major/get',
method: 'post',
data: { id }
})
}
/**
* 更新专业
* @param {object} data
* @param {number} data.id
* @param {string} data.code
* @param {string} data.name
* @param {string} [data.abbreviation]
* @param {string} [data.description]
*/
export function update(data) {
return request({
url: '/basic/major/update',
method: 'post',
data
})
}
/**
* 新增专业
* @param {object} data
* @param {number} [data.id]
* @param {string} data.code
* @param {string} data.name
* @param {string} [data.abbreviation]
* @param {string} [data.description]
*/
export function add(data) {
return request({
url: '/basic/major/add',
method: 'post',
data
})
}
/**
* 获取code
*/
export function getCode() {
return request({
url: '/basic/major/get-code',
method: 'post'
})
}
/**
* 删除专业
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/major/delete',
method: 'post',
data: { id }
})
}

View File

@ -0,0 +1,91 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-13 15:19:55
* @Description:
*/
import request from '@/utils/request'
/**
* 获取班组列表
* @param {object} data
* @param {string} [data.code]
* @param {number} data.current
* @param {number} [data.enabled]
* @param {string} [data.name]
* @param {number} data.size
*/
export function list(data) {
return request({
url: '/basic/schedule-plan/page',
method: 'post',
data
})
}
/**
* 获取班组单条数据
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/schedule-plan/get',
method: 'post',
data: { id }
})
}
/**
* 更新班组单条数据
* @param {object} data
* @param {string} data.code
* @param {number} data.id
* @param {string} data.name
* @param {string} [data.remark]
*/
export function update(data) {
return request({
url: '/basic/schedule-plan/update',
method: 'post',
data
})
}
/**
* 新增班组单条数据
* @param {object} data
* @param {string} data.code
* @param {number} [data.id]
* @param {string} data.name
* @param {string} [data.remark]
*/
export function add(data) {
return request({
url: '/basic/schedule-plan/add',
method: 'post',
data
})
}
/**
* 获取班组code
*/
export function getCode() {
return request({
url: '/basic/schedule-plan/get-code',
method: 'post'
})
}
/**
* 删除班组单条数据
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/schedule-plan/delete',
method: 'post',
data: { id }
})
}

View File

@ -0,0 +1,155 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: gtz
* @LastEditTime: 2021-04-17 16:04:51
* @Description:
*/
import request from '@/utils/request'
/**
* 获取员工列表
* @param {object} data
* @param {number} data.current
* @param {number} [data.status]
* @param {string} [data.code]
* @param {string} [data.name]
* @param {number} data.size
*/
export function list(data) {
return request({
url: '/basic/worker/page',
method: 'post',
data
})
}
/**
* 获取员工单条数据
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/worker/get',
method: 'post',
data: { id }
})
}
/**
* 更新员工单条数据
* @param {object} data
* @param {string} [data.belong]
* @param {string} data.code
* @param {string} [data.departmentId]
* @param {string} [data.description]
* @param {string} [data.education]
* @param {string} [data.email]
* @param {string} [data.entryTime]
* @param {number} data.id
* @param {string} [data.identity]
* @param {string} data.majorId
* @param {string} data.name
* @param {string} [data.fileUrl] 头像地址或头像文件id
* @param {string} data.onDuty
* @param {string} [data.outTime]
* @param {string} [data.position]
* @param {string} [data.roleId]
* @param {string} data.sex
* @param {string} [data.status]
* @param {string} [data.telephone]
* @param {string} [data.wechatCode]
* @param {string} [data.workshop]
*/
export function update(data) {
return request({
url: '/basic/worker/update',
method: 'post',
data
})
}
/**
* 新增员工单条数据
* @param {object} data
* @param {string} [data.belong]
* @param {string} data.code
* @param {string} [data.departmentId]
* @param {string} [data.description]
* @param {string} [data.education]
* @param {string} [data.email]
* @param {string} [data.entryTime]
* @param {number} [data.id]
* @param {string} [data.identity]
* @param {string} data.majorId
* @param {string} data.name
* @param {string} [data.fileUrl] 头像地址或头像文件id
* @param {string} data.onDuty
* @param {string} [data.outTime]
* @param {string} [data.position]
* @param {string} [data.roleId]
* @param {string} data.sex
* @param {string} [data.status]
* @param {string} [data.telephone]
* @param {string} [data.wechatCode]
* @param {string} [data.workshop]
*/
export function add(data) {
return request({
url: '/basic/worker/add',
method: 'post',
data
})
}
/**
* 获取员工code
*/
export function getCode() {
return request({
url: '/basic/worker/get-code',
method: 'post'
})
}
/**
* 删除员工单条数据
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/worker/delete',
method: 'post',
data: { id }
})
}
export function getWorkerList(data) { // 添加组员列表
return request({
url: '/basic/team-det/workerList',
method: 'post',
data
})
}
export function getRoleList() {
return request({
url: '/basic/platform-dict/selectPlatformDictDataListByPage',
method: 'post',
data: {
dictTypeId: '1383318968677273601',
current: 1,
size: 999
}
})
}
/** 文件上传 */
export function saveFile(data) {
// application/x-www-form-urlencoded
return request({
url: '/common/attachment/uploadFileFormData',
method: 'post',
data
})
}

View File

@ -0,0 +1,140 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-14 13:03:31
* @Description:
*/
import request from '@/utils/request'
/**
* 获取分页物料信息列表
* @param {object} data
* @param {string} [data.code]
* @param {number} data.current
* @param {number} [data.enabled]
* @param {string} [data.name]
* @param {number} data.size
*/
export function list(data) {
return request({
url: '/basic/material/page',
method: 'post',
data
})
}
/**
* 获取物料信息单条数据
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/material/get',
method: 'post',
data: { id }
})
}
/**
* 更新物料信息单条数据
* @param {object} data
* @param {string} [data.abbr]
* @param {string} data.code
* @param {string} [data.description]
* @param {string} [data.enName]
* @param {number} data.id
* @param {number} [data.materialTypeId]
* @param {string} data.name
* @param {string} [data.remark]
*/
export function update(data) {
return request({
url: '/basic/material/update',
method: 'post',
data
})
}
/**
* 新增物料信息单条数据
* @param {object} data
* @param {string} [data.abbr]
* @param {string} data.code
* @param {string} [data.description]
* @param {string} [data.enName]
* @param {number} [data.id]
* @param {number} [data.materialTypeId]
* @param {string} data.name
* @param {string} [data.remark]
*/
export function add(data) {
return request({
url: '/basic/material/add',
method: 'post',
data
})
}
export function getCode() { // 获取物料信息code
return request({
url: '/basic/material/get-code',
method: 'post'
})
}
/**
* 获取物料信息单条数据
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/material/delete',
method: 'post',
data: { id }
})
}
/**
* 获取物料的属性列表
* @param {object} data
* @param {number} data.current
* @param {number} [data.enabled]
* @param {number} [data.materialId]
* @param {number} data.size
*/
export function getAttributeList(data) {
return request({
url: '/basic/material-attr/page',
method: 'post',
data
})
}
/**
* 删除物料的属性数据
* @param {number} id
*/
export function deleteAttribute(id) {
return request({
url: '/basic/material-attr/delete',
method: 'post',
data: { id }
})
}
/**
* 获取分页的物料类型列表
* @param {object} data
* @param {number} data.current
* @param {number} [data.enabled]
* @param {string} [data.name]
* @param {number} data.size
*/
export function getTypeList(data) {
return request({
url: '/basic/material-type/page',
method: 'post',
data
})
}

View File

@ -0,0 +1,55 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: zwq
* @LastEditTime: 2021-01-16 12:09:29
* @Description:
*/
import request from '@/utils/request'
export function list(data) { // 获取物料属性列表
return request({
url: '/basic/material-attr/page',
method: 'post',
data
})
}
export function detail(id) { // 获取物料属性单条数据
return request({
url: '/basic/material-attr/get',
method: 'post',
data: { id }
})
}
export function update(data) { // 更新物料属性单条数据
return request({
url: '/basic/material-attr/update',
method: 'post',
data
})
}
export function add(data) { // 新增物料属性单条数据
return request({
url: '/basic/material-attr/add',
method: 'post',
data
})
}
export function getCode() { // 获取物料属性code
return request({
url: '/basic/material-attr/get-code',
method: 'post'
})
}
export function del(id) { // 删除物料属性单条数据
return request({
url: '/basic/material-attr/delete',
method: 'post',
data: { id }
})
}

View File

@ -0,0 +1,55 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: zwq
* @LastEditTime: 2021-01-16 11:52:14
* @Description:
*/
import request from '@/utils/request'
export function list(data) { // 获取物料类型列表
return request({
url: '/basic/material-type/page',
method: 'post',
data
})
}
export function detail(id) { // 获取物料类型单条数据
return request({
url: '/basic/material-type/get',
method: 'post',
data: { id }
})
}
export function update(data) { // 更新物料类型单条数据
return request({
url: '/basic/material-type/update',
method: 'post',
data
})
}
export function add(data) { // 新增物料类型单条数据
return request({
url: '/basic/material-type/add',
method: 'post',
data
})
}
export function getCode() { // 获取物料类型code
return request({
url: '/basic/material-type/get-code',
method: 'post'
})
}
export function del(id) { // 删除物料类型单条数据
return request({
url: '/basic/material-type/delete',
method: 'post',
data: { id }
})
}

View File

@ -0,0 +1,92 @@
/*
* @Author: zwq
* @Date: 2020-12-29 16:00:14
* @LastEditors: lb
* @LastEditTime: 2022-04-16 22:00:49
* @Description:
*/
import request from '@/utils/request'
/**
* 获取产品属性列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {string} data.productId
* @param {number} [data.enabled]
*/
export function list(data) {
return request({
url: '/basic/product-arrt/page',
method: 'post',
data
})
}
/**
* 获取产品属性单条数据
* @param {number} id
*/
export function detail(id) {
return request({
url: '/basic/product-arrt/get',
method: 'post',
data: { id }
})
}
/**
* 更新产品属性单条数据
* @param {object} data
* @param {string} data.code
* @param {string} data.description
* @param {number} data.id
* @param {string} data.name
* @param {string} data.productId
* @param {string} data.value
*/
export function update(data) {
return request({
url: '/basic/product-arrt/update',
method: 'post',
data
})
}
/**
* 新增产品属性单条数据
* @param {object} data
* @param {string} data.code
* @param {string} data.description
* @param {number} [data.id]
* @param {string} data.name
* @param {string} data.productId
* @param {string} data.value
*/
export function add(data) {
return request({
url: '/basic/product-arrt/add',
method: 'post',
data
})
}
export function getCode() {
// 获取产品信息code
return request({
url: '/basic/product-arrt/get-code',
method: 'post'
})
}
/**
* 删除产品信息属性单条数据
* @param {number} id
*/
export function del(id) {
return request({
url: '/basic/product-arrt/delete',
method: 'post',
data: { id }
})
}

View File

@ -0,0 +1,118 @@
/*
* @Author: lb
* @Date: 2022-05-18 14:45:10
* @LastEditors: lb
* @LastEditTime: 2022-05-18 14:45:10
* @Description: 发车清单
*/
import request from '@/utils/request'
/**
* 新增车辆信息
* @param {object} data
* @param {string} [data.contactPerson] 车辆联系人
* @param {number} [data.contactPersonCall] 车辆联系人电话
* @param {string} [data.deliveryCarCode] 发车编码
* @param {string} [data.description] 车辆描述信息
* @param {number} [data.id]
* @param {string} [data.plate] 车牌
* @param {number} data.productDeliveryLogId 上层发货单id
* @param {number} [data.quantity] 装车数量
* @param {string} [data.remark]
* @param {string} [data.startLoadTime] 开始装货时间
* @param {number} [data.unitId] 单位id
*/
export function add(data) {
return request({
url: '/stock/ProductDeliveryCarLog/create',
method: 'post',
data
})
}
/**
* 删除发车清单条目
* @param {number} id
*/
export function del(id) {
return request({
url: '/stock/ProductDeliveryCarLog/delete',
method: 'post',
data: { id }
})
}
/**
* 获取车载货物列表
* @param {number} id 车辆的id
*/
export function getCargoList(id) {
return request({
url: '/stock/ProductDeliveryCarLog/get',
method: 'post',
data: { id }
})
}
/**
* 获取发车清单list
* @param {number} id 发货单的id
*/
export function getCars(id) { // 没有分页
return request({
url: '/stock/ProductDeliveryCarLog/list',
method: 'post',
data: { id }
})
}
/**
* 修改车辆信息
* @param {object} data
* @param {string} [data.contactPerson] 车辆联系人
* @param {number} [data.contactPersonCall] 车辆联系人电话
* @param {string} [data.deliveryCarCode] 发车编码
* @param {string} [data.description] 车辆描述信息
* @param {number} data.id
* @param {string} [data.plate] 车牌
* @param {number} data.productDeliveryLogId 上层发货单id
* @param {number} [data.quantity] 装车数量
* @param {string} [data.remark]
* @param {string} [data.startLoadTime] 开始装货时间
* @param {number} [data.unitId] 单位id
*/
export function update(data) {
return request({
url: '/stock/ProductDeliveryCarLog/update',
method: 'post',
data
})
}
export function getShelfList() {
return request({
url: '/basic/shelf/page',
method: 'post',
data: {
current: 1,
size: 999,
enabled: 1
}
})
}
/**
* getShelfRelation
* @param {string} shelfCode
* @returns
*/
export function getShelfRelation(shelfCode) {
return request({
url: '/stock/ProductDeliveryCarLogDet/getShelfRelation',
method: 'get',
params: {
shelfCode
}
})
}

View File

@ -0,0 +1,103 @@
/*
* @Author: lb
* @Date: 2022-05-18 14:45:10
* @LastEditors: lb
* @LastEditTime: 2022-05-18 14:45:10
* @Description: 装车清单
*/
import request from '@/utils/request'
/**
* 给车辆新增一条装货信息
* @param {object} data
* @param {number} data.carLogId 涉及的车辆
* @param {number} [data.id]
* @param {string} [data.productGrade]
* @param {number} [data.productId]
* @param {string} [data.productName]
* @param {number} [data.productSpecifications]
* @param {number} [data.quantity]
* @param {number} [data.shelfId]
* @param {number} [data.unitId]
*/
export function add(data) {
return request({
url: '/stock/ProductDeliveryCarLogDet/create',
method: 'post',
data
})
}
/**
* 删除一条装货信息
* @param {number} id
*/
export function del(id) {
return request({
url: '/stock/ProductDeliveryCarLogDet/delete',
method: 'post',
data: { id }
})
}
/**
* 获取装货清单的其他详细信息地址客户车辆列表等
* @param {number} id
*/
export function detail(id) {
return request({
url: '/stock/ProductDeliveryCarLogDet/get',
method: 'post',
data: { id }
})
}
/**
* 获取装货清单里的产品列表
* @param {number} id 上层发车单的id
*/
export function getCargoList(id) {
return request({
url: '/stock/ProductDeliveryCarLogDet/list',
method: 'post',
data: { id }
})
}
/**
* 修改车载货物信息
* @param {object} data
* @param {number} data.carLogId
* @param {number} data.id
* @param {string} [data.productGrade]
* @param {number} [data.productId]
* @param {string} [data.productName]
* @param {number} [data.productSpecifications]
* @param {number} [data.quantity]
* @param {number} [data.shelfId]
* @param {number} [data.unitId]
*/
export function update(data) {
return request({
url: '/stock/ProductDeliveryCarLogDet/update',
method: 'post',
data
})
}
/**
* 获取所有的产品列表
* @param {*} data
* @returns
*/
export function getProductList() {
return request({
url: '/basic/product/page',
method: 'post',
data: {
current: 1,
size: 999,
enabled: 1
}
})
}

View File

@ -0,0 +1,131 @@
/*
* @Author: lb
* @Date: 2022-05-18 14:45:10
* @LastEditors: lb
* @LastEditTime: 2022-05-18 14:45:10
* @Description:
*/
import request from '@/utils/request'
/**
* 新增发货单基础信息发货方信息运输方信息和订单等信息
* @param {object} data
* @param {number} [data.id]
* @param {string} [data.address]
* @param {string} [data.customerName]
* @param {string} [data.deliveryCode]
* @param {string} [data.deliveryPerson]
* @param {number} [data.deliveryPersonCall]
* @param {string} [data.description]
* @param {string} [data.startTime]
* @param {string} [data.endTime]
* @param {number} [data.orderId]
* @param {string} [data.orderName]
* @param {string} [data.principal]
* @param {number} [data.principalCall]
* @param {number} [data.quantity]
* @param {string} [data.remark]
* @param {string} [data.transportCompany]
* @param {number} [data.unitId]
*/
export function add(data) {
return request({
url: '/stock/ProductDeliveryLog/create',
method: 'post',
data
})
}
/**
* 删除发货单
* @param {number} id
*/
export function del(id) {
return request({
url: '/stock/ProductDeliveryLog/delete',
method: 'post',
data: { id }
})
}
/**
* 获取发货单涉及的车辆发货方运输方信息
* @param {number} id
*/
export function detail(id) {
return request({
url: '/stock/ProductDeliveryLog/get',
method: 'post',
data: { id }
})
}
/**
* 获取发货单下的发车单列表
* @param {number} id
*/
export function getCars(id) {
return request({
url: '/stock/ProductDeliveryLog/getCarList',
method: 'post',
data: { id }
})
}
/**
* 获取分页发货单的简要信息
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.orderName]
* @param {string} [data.startDate]
* @param {string} [data.endDate]
*/
export function list(data) {
return request({
url: '/stock/ProductDeliveryLog/page',
method: 'post',
data
})
}
/**
* 修改发货单基础信息发货方信息运输方信息和订单等信息
* @param {object} data
* @param {number} data.id
* @param {string} [data.address]
* @param {string} [data.customerName]
* @param {string} [data.deliveryCode]
* @param {string} [data.deliveryPerson]
* @param {number} [data.deliveryPersonCall]
* @param {string} [data.description]
* @param {string} [data.startTime]
* @param {string} [data.endTime]
* @param {number} [data.orderId]
* @param {string} [data.orderName]
* @param {string} [data.principal]
* @param {number} [data.principalCall]
* @param {number} [data.quantity]
* @param {string} [data.remark]
* @param {string} [data.transportCompany]
* @param {number} [data.unitId]
*/
export function update(data) {
return request({
url: '/stock/ProductDeliveryLog/update',
method: 'post',
data
})
}
/**
* 获取所有订单列表用于输入过滤
* @returns
*/
export function getAllOrders() {
return request({
url: '/order/order/list',
method: 'post',
data: { enabled: 1 }
})
}

View File

@ -0,0 +1,72 @@
/*
* @Author: lb
* @Date: 2022-05-18 14:45:10
* @LastEditors: lb
* @LastEditTime: 2022-05-18 14:45:10
* @Description:
*/
import request from '@/utils/request'
/**
* 获取进度详情的所有发货清单
* @param {number} id 发货单id
*/
export function processDetail(id) {
return request({
url: '/stock/ProductDeliveryProgress/get',
method: 'post',
data: { id }
})
}
/**
* 发车清单里的产品列表
* @param {number} id 发货单id
*/
export function cargoList(data) {
return request({
url: '/stock/ProductDeliveryProgress/getAllDet',
method: 'post',
data
})
}
/**
* 获取订单的发货进度列表
* @param {string} orderName 订单名
*/
export function getProcessList(orderName) {
return request({
url: '/stock/ProductDeliveryProgress/list',
method: 'post',
data: { orderName }
})
}
/**
* 获取订单的发货进度分页列表
* @param {object} data
* @param {object} data.current
* @param {object} data.size
* @param {object} [data.orderName]
* @param {object} [data.enabled]
*/
export function getProcessPage(data) {
return request({
url: '/stock/ProductDeliveryProgress/page',
method: 'post',
data
})
}
/**
* 获取所有订单列表用于输入过滤
* @returns
*/
export function getAllOrders() {
return request({
url: '/order/order/list',
method: 'post',
data: { enabled: 1 }
})
}

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