Browse Source

vue2.0框架提交

pull/1/head
fangdawei 1 year ago
parent
commit
f63a8cb3a5
  1. 14
      code/vue/.editorconfig
  2. 15
      code/vue/.env.development
  3. 6
      code/vue/.env.production
  4. 8
      code/vue/.env.staging
  5. 4
      code/vue/.eslintignore
  6. 15
      code/vue/.eslintrc.js
  7. 24
      code/vue/.gitignore
  8. 5
      code/vue/.travis.yml
  9. 21
      code/vue/LICENSE
  10. 83
      code/vue/README.md
  11. 5
      code/vue/babel.config.js
  12. 35
      code/vue/build/index.js
  13. 24
      code/vue/jest.config.js
  14. 9
      code/vue/jsconfig.json
  15. 116
      code/vue/mock/article.js
  16. 278
      code/vue/mock/common.js
  17. 74
      code/vue/mock/index.js
  18. 68
      code/vue/mock/mock-server.js
  19. 51
      code/vue/mock/remote-search.js
  20. 98
      code/vue/mock/role/index.js
  21. 525
      code/vue/mock/role/routes.js
  22. 152
      code/vue/mock/user.js
  23. 136
      code/vue/mock/ux.js
  24. 134
      code/vue/package.json
  25. 26
      code/vue/plop-templates/component/index.hbs
  26. 55
      code/vue/plop-templates/component/prompt.js
  27. 16
      code/vue/plop-templates/store/index.hbs
  28. 62
      code/vue/plop-templates/store/prompt.js
  29. 9
      code/vue/plop-templates/utils.js
  30. 26
      code/vue/plop-templates/view/index.hbs
  31. 55
      code/vue/plop-templates/view/prompt.js
  32. 9
      code/vue/plopfile.js
  33. 5
      code/vue/postcss.config.js
  34. BIN
      code/vue/public/favicon.ico
  35. 25
      code/vue/public/index.html
  36. 46
      code/vue/src/App.vue
  37. 41
      code/vue/src/api/apiConfig.json
  38. 21
      code/vue/src/api/area/area.js
  39. 21
      code/vue/src/api/areaItem/areaItem.js
  40. 41
      code/vue/src/api/article.js
  41. 33
      code/vue/src/api/bom/bom.js
  42. 21
      code/vue/src/api/claim/claim.js
  43. 142
      code/vue/src/api/common.js
  44. 21
      code/vue/src/api/currency/currency.js
  45. 21
      code/vue/src/api/currencyExchange/currencyExchange.js
  46. 28
      code/vue/src/api/customer/customer.js
  47. 21
      code/vue/src/api/customerBom/customerBom.js
  48. 21
      code/vue/src/api/customerItem/customerItem.js
  49. 21
      code/vue/src/api/department/department.js
  50. 42
      code/vue/src/api/dict/common.js
  51. 47
      code/vue/src/api/dict/dict.js
  52. 21
      code/vue/src/api/dictionary/dictionary.js
  53. 21
      code/vue/src/api/dictionaryItem/dictionaryItem.js
  54. 21
      code/vue/src/api/eqptInventory/eqptInventory.js
  55. 21
      code/vue/src/api/eqptType/eqptType.js
  56. 21
      code/vue/src/api/eqptTypeItem/eqptTypeItem.js
  57. 21
      code/vue/src/api/inReceipt/inReceipt.js
  58. 21
      code/vue/src/api/inReturn/inReturn.js
  59. 21
      code/vue/src/api/inTask/inTask.js
  60. 21
      code/vue/src/api/inTaskFgReceipt/inTaskFgReceipt.js
  61. 21
      code/vue/src/api/inTaskHis/inTaskHis.js
  62. 21
      code/vue/src/api/inTaskInspect/inTaskInspect.js
  63. 21
      code/vue/src/api/inTaskInspectDetail/inTaskInspectDetail.js
  64. 21
      code/vue/src/api/inTaskScrapOut/inTaskScrapOut.js
  65. 21
      code/vue/src/api/inTaskTransfer1/inTaskTransfer1.js
  66. 21
      code/vue/src/api/inTaskUnplanedDeliver/inTaskUnplanedDeliver.js
  67. 21
      code/vue/src/api/interfaceCalendar/interfaceCalendar.js
  68. 21
      code/vue/src/api/inventory/inventory.js
  69. 21
      code/vue/src/api/inventoryMoveHis/inventoryMoveHis.js
  70. 21
      code/vue/src/api/inventoryOccupy/inventoryOccupy.js
  71. 51
      code/vue/src/api/inventoryRoute/inventoryRoute.js
  72. 21
      code/vue/src/api/inventoryRouteDetail/inventoryRouteDetail.js
  73. 21
      code/vue/src/api/item/item.js
  74. 21
      code/vue/src/api/itemTransTypeInventoryRoute/itemTransTypeInventoryRoute.js
  75. 21
      code/vue/src/api/itemTransTypeOpStrategy/itemTransTypeOpStrategy.js
  76. 21
      code/vue/src/api/job/job.js
  77. 21
      code/vue/src/api/loc/loc.js
  78. 30
      code/vue/src/api/machine/machine.js
  79. 8
      code/vue/src/api/org/org.js
  80. 21
      code/vue/src/api/organization/organization.js
  81. 21
      code/vue/src/api/param/param.js
  82. 9
      code/vue/src/api/personCenter/personCenter.js
  83. 21
      code/vue/src/api/port/port.js
  84. 34
      code/vue/src/api/prodLine/prodLine.js
  85. 33
      code/vue/src/api/prodLineItem/prodLineItem.js
  86. 21
      code/vue/src/api/project/project.js
  87. 21
      code/vue/src/api/purchasePriceDetail/purchasePriceDetail.js
  88. 52
      code/vue/src/api/purchasePriceSheet/purchasePriceSheet.js
  89. 8
      code/vue/src/api/qiniu.js
  90. 17
      code/vue/src/api/remote-search.js
  91. 38
      code/vue/src/api/role.js
  92. 21
      code/vue/src/api/role/role.js
  93. 21
      code/vue/src/api/roleClaim/roleClaim.js
  94. 71
      code/vue/src/api/route/route.js
  95. 21
      code/vue/src/api/routeDetail/routeDetail.js
  96. 17
      code/vue/src/api/rule/rule.js
  97. 21
      code/vue/src/api/salePriceDetail/salePriceDetail.js
  98. 51
      code/vue/src/api/salePriceSheet/salePriceSheet.js
  99. 33
      code/vue/src/api/shift/shift.js
  100. 21
      code/vue/src/api/slg/slg.js

14
code/vue/.editorconfig

@ -1,14 +0,0 @@
# 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

15
code/vue/.env.development

@ -1,15 +0,0 @@
# just a flag
ENV = 'development'
# base api
VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API_ADMIN = 'http://114.116.225.148:8002'
port='9528'
# 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

6
code/vue/.env.production

@ -1,6 +0,0 @@
# just a flag
ENV = 'production'
# base api
VUE_APP_BASE_API = '/prod-api'

8
code/vue/.env.staging

@ -1,8 +0,0 @@
NODE_ENV = production
# just a flag
ENV = 'staging'
# base api
VUE_APP_BASE_API = '/stage-api'

4
code/vue/.eslintignore

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

15
code/vue/.eslintrc.js

@ -1,15 +0,0 @@
module.exports = {
root: true,
env: {
node: true,
es6: true
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint',
sourceType: "module",
}
}

24
code/vue/.gitignore

@ -1,24 +0,0 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock
/.vs

5
code/vue/.travis.yml

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

21
code/vue/LICENSE

@ -1,21 +0,0 @@
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.

83
code/vue/README.md

@ -1,83 +0,0 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Getting started](#getting-started)
- [Build](#build)
- [Advanced](#advanced)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<p align="center">
<img width="320" src="https://wpimg.wallstcn.com/ecc53a42-d79b-42e2-8852-5126b810a4c8.svg">
</p>
<p align="center">
<a href="https://github.com/vuejs/vue">
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
</a>
<a href="https://github.com/ElemeFE/element">
<img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui">
</a>
<a href="https://travis-ci.org/PanJiaChen/vue-element-admin" rel="nofollow">
<img src="https://travis-ci.org/PanJiaChen/vue-element-admin.svg?branch=master" alt="Build Status">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="license">
</a>
<a href="https://github.com/PanJiaChen/vue-element-admin/releases">
<img src="https://img.shields.io/github/release/PanJiaChen/vue-element-admin.svg" alt="GitHub release">
</a>
<a href="https://gitter.im/vue-element-admin/discuss">
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="gitter">
</a>
<a href="https://panjiachen.github.io/vue-element-admin-site/donate">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg" alt="donate">
</a>
</p>
## Getting started
```bash
# clone the project
git clone -b i18n git@github.com:PanJiaChen/vue-element-admin.git
# enter the project directory
cd vue-element-admin
# install dependency
npm install
# develop
npm run dev
```
This will automatically open http://localhost:9527
## Build
```bash
# build for test environment
npm run build:stage
# build for production environment
npm run build:prod
```
## Advanced
```bash
# preview the release environment effect
npm run preview
# preview the release environment effect + static resource analysis
npm run preview -- --report
# code format check
npm run lint
# code format check and auto fix
npm run lint -- --fix
```

5
code/vue/babel.config.js

@ -1,5 +0,0 @@
module.exports = {
presets: [
'@vue/app'
]
}

35
code/vue/build/index.js

@ -1,35 +0,0 @@
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}`)
}

24
code/vue/jest.config.js

@ -1,24 +0,0 @@
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
code/vue/jsconfig.json

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

116
code/vue/mock/article.js

@ -1,116 +0,0 @@
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'
}
}
}
]

278
code/vue/mock/common.js

@ -1,278 +0,0 @@
import Mock from 'mockjs'
//表格字段数据
const ListField = [{
"level": 1,
"children": [{"level": 2, "name": "666", "pid": 1, "id": 2, "label": "666"}, {
"level": 2,
"name": "777",
"pid": 1,
"id": 3,
"label": "777"
}],
"name": "办公室",
"pid": 0,
"id": 1,
"label": "办公室"
}, {"level": 2, "name": "666", "pid": 1, "id": 2, "label": "666"}, {
"level": 2,
"name": "777",
"pid": 1,
"id": 3,
"label": "777"
}]
//表格list数据
const roleList = [{
"name": "系统管理角色",
"pid": 1,
"list": [{
"remark": "超级管理员",
"pid": 1,
"rules": {"bi": [], "crm": []},
"id": 1,
"label": null,
"title": "超级管理员",
"type": 5,
"status": 1
}, {
"remark": "系统设置管理员",
"pid": 1,
"rules": {"bi": [], "crm": []},
"id": 2,
"label": null,
"title": "系统设置管理员",
"type": 2,
"status": 1
}, {
"remark": "部门与员工管理员",
"pid": 1,
"rules": {"bi": [], "crm": []},
"id": 3,
"label": null,
"title": "部门与员工管理员",
"type": 5,
"status": 1
}, {
"remark": "审批流管理员",
"pid": 1,
"rules": {"bi": [], "crm": []},
"id": 4,
"label": null,
"title": "审批流管理员",
"type": 5,
"status": 1
}, {
"remark": "工作台管理员",
"pid": 1,
"rules": {"bi": [], "crm": []},
"id": 5,
"label": null,
"title": "工作台管理员",
"type": 5,
"status": 1
}, {
"remark": "客户管理员",
"pid": 1,
"rules": {"bi": [], "crm": []},
"id": 6,
"label": null,
"title": "客户管理员",
"type": 5,
"status": 1
}]
}, {
"name": "客户管理角色",
"pid": 2,
"list": [{
"remark": "销售经理角色",
"pid": 2,
"rules": {
"bi": [],
"crm": [9, 17, 18, 19, 20, 21, 22, 23, 24, 25, 10, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 191, 11, 40, 41, 42, 43, 44, 45, 107, 108, 12, 46, 47, 48, 49, 50, 51, 52, 13, 53, 54, 55, 56, 57, 58, 59, 14, 60, 61, 62, 63, 64, 15, 65, 66, 67, 68, 69, 109, 110, 127, 128, 129, 130, 131]
},
"id": 8,
"label": null,
"title": "销售经理角色",
"type": 2,
"status": 1
}, {
"remark": "行政管理",
"pid": 2,
"rules": {"bi": [], "crm": []},
"id": 9,
"label": null,
"title": "行政管理",
"type": 1,
"status": 1
}, {
"remark": "财务角色",
"pid": 2,
"rules": {"bi": [], "crm": []},
"id": 10,
"label": null,
"title": "财务角色",
"type": 1,
"status": 1
}, {
"remark": "销售员角色",
"pid": 2,
"rules": {"bi": [], "crm": []},
"id": 11,
"label": null,
"title": "销售员角色",
"type": 2,
"status": 1
}]
}, {
"name": "办公管理角色",
"pid": 7,
"list": [{
"remark": "公告管理员",
"pid": 7,
"rules": {"bi": [], "crm": []},
"id": 7,
"label": null,
"title": "公告管理员",
"type": 5,
"status": 1
}]
}, {
"name": "项目管理角色",
"pid": 8,
"list": [{
"remark": "项目管理员",
"pid": 8,
"rules": {"bi": [], "crm": []},
"id": 12,
"label": 1,
"title": "项目管理员",
"type": 5,
"status": 1
}, {
"remark": "测试项目",
"pid": 8,
"rules": {"bi": [], "crm": []},
"id": 47,
"label": null,
"title": "测试项目",
"type": 5,
"status": 1
}]
}, {"name": "自定义角色", "pid": 0, "list": []}]
const userList = {
"totalRow": 2,
"pageNumber": 1,
"firstPage": true,
"lastPage": true,
"totalPage": 1,
"pageSize": 15,
"list": [{
"deptName": "办公室",
"img": "",
"createTime": "2019-02-13 15:43:26",
"roleId": "1",
"sex": null,
"mobile": "12312341234",
"realname": "admin",
"parentName": null,
"post": "1",
"userId": 3,
"parentId": 0,
"roleName": "超级管理员",
"deptId": 1,
"email": null,
"username": "admin",
"status": 1
}, {
"deptName": "办公室",
"img": null,
"createTime": "2020-11-10 11:01:49",
"roleId": "3",
"sex": null,
"mobile": "13364306255",
"realname": "ttt",
"parentName": null,
"post": null,
"userId": 4,
"parentId": null,
"roleName": "部门与员工管理员",
"deptId": 1,
"email": null,
"username": "13364306255",
"status": 1
}]
}
const sceneList =
[{
"isSystem": 1,
"bydata": null,
"data": "{\"is_transform\":{\"condition\":\"is\",\"name\":\"is_transform\",\"value\":0}}",
"sceneId": 22,
"name": "全部线索",
"isDefault": 0
}, {
"isSystem": 1,
"bydata": null,
"data": "{\"owner_user_id\":{\"condition\":\"is\",\"name\":\"owner_user_id\",\"value\":3},\"is_transform\":{\"condition\":\"is\",\"name\":\"is_transform\",\"value\":0}}",
"sceneId": 23,
"name": "我负责的线索",
"isDefault": 0
}, {
"isSystem": 1,
"bydata": null,
"data": "{\"owner_user_id\":{\"condition\":\"in\",\"name\":\"owner_user_id\",\"value\":\"0\"},\"is_transform\":{\"condition\":\"is\",\"name\":\"is_transform\",\"value\":0}}",
"sceneId": 24,
"name": "下属负责的线索",
"isDefault": 0
}, {
"isSystem": 1,
"bydata": "transform",
"data": "{\"is_transform\":{\"condition\":\"is\",\"name\":\"is_transform\",\"value\":\"1\"}}",
"sceneId": 25,
"name": "已转化的线索",
"isDefault": 0
}]
export default [
{
url: '/vue-element-admin/system/dept/queryDeptTreed',
type: 'get',
response: _ => {
return {
"code": 20000,
"data": ListField
}
}
},
{
url: '/vue-element-admin/system/role/getAllRoleList',
type: 'get',
response: _ => {
return {
"code": 20000,
"data": roleList,
}
}
},
{
url: '/vue-element-admin/system/user/queryUserList',
type: 'get',
response: _ => {
return {
"code": 20000,
"data": userList,
}
}
},
{
url: '/vue-element-admin/system/scene/getAllsceneList',
type: 'get',
response: _ => {
return {
"code": 20000,
"data": sceneList
}
}
},
]

74
code/vue/mock/index.js

@ -1,74 +0,0 @@
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'
import ux from './ux'
import common from './common'
const mocks = [
...user,
...role,
...article,
...search,
...ux,
...common
]
// 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))
}
}
// 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))
}
}
}
export default mocks.map(route => {
return responseFake(route.url, route.type, route.response)
})

68
code/vue/mock/mock-server.js

@ -1,68 +0,0 @@
const chokidar = require('chokidar')
const bodyParser = require('body-parser')
const chalk = require('chalk')
const path = require('path')
const mockDir = path.join(process.cwd(), 'mock')
function registerRoutes(app) {
let mockLastIndex
const { default: mocks } = require('./index.js')
for (const mock of mocks) {
app[mock.type](mock.url, mock.response)
mockLastIndex = app._router.stack.length
}
const mockRoutesLength = Object.keys(mocks).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)]
}
})
}
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
code/vue/mock/remote-search.js

@ -1,51 +0,0 @@
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
code/vue/mock/role/index.js

@ -1,98 +0,0 @@
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
code/vue/mock/role/routes.js

@ -1,525 +0,0 @@
// 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: 'pagePermission',
roles: ['admin']
}
},
{
path: 'directive',
component: 'views/permission/directive',
name: 'DirectivePermission',
meta: {
title: 'directivePermission'
}
},
{
path: 'role',
component: 'views/permission/role',
name: 'RolePermission',
meta: {
title: 'rolePermission',
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: 'jsonEditor' }
},
{
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: 'avatarUpload' }
},
{
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: 'countTo' }
},
{
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: 'backToTop' }
},
{
path: 'drag-dialog',
component: 'views/components-demo/drag-dialog',
name: 'DragDialogDemo',
meta: { title: 'dragDialog' }
},
{
path: 'drag-select',
component: 'views/components-demo/drag-select',
name: 'DragSelectDemo',
meta: { title: 'dragSelect' }
},
{
path: 'dnd-list',
component: 'views/components-demo/dnd-list',
name: 'DndListDemo',
meta: { title: 'dndList' }
},
{
path: 'drag-kanban',
component: 'views/components-demo/drag-kanban',
name: 'DragKanbanDemo',
meta: { title: 'dragKanban' }
}
]
},
{
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: 'keyboardChart', noCache: true }
},
{
path: 'line',
component: 'views/charts/line',
name: 'LineChart',
meta: { title: 'lineChart', noCache: true }
},
{
path: 'mixchart',
component: 'views/charts/mixChart',
name: 'MixChart',
meta: { title: 'mixChart', 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: 'createArticle', icon: 'edit' }
},
{
path: 'edit/:id(\\d+)',
component: 'views/example/edit',
name: 'EditArticle',
meta: { title: 'editArticle', noCache: true },
hidden: true
},
{
path: 'list',
component: 'views/example/list',
name: 'ArticleList',
meta: { title: 'articleList', 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: 'errorPages',
icon: '404'
},
children: [
{
path: '401',
component: 'views/error-page/401',
name: 'Page401',
meta: { title: 'page401', noCache: true }
},
{
path: '404',
component: 'views/error-page/404',
name: 'Page404',
meta: { title: 'page404', noCache: true }
}
]
},
{
path: '/error-log',
component: 'layout/Layout',
redirect: 'noRedirect',
children: [
{
path: 'log',
component: 'views/error-log/index',
name: 'ErrorLog',
meta: { title: 'errorLog', 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: 'exportExcel' }
},
{
path: 'export-selected-excel',
component: 'views/excel/select-excel',
name: 'SelectExcel',
meta: { title: 'selectExcel' }
},
{
path: 'export-merge-header',
component: 'views/excel/merge-header',
name: 'MergeHeader',
meta: { title: 'mergeHeader' }
},
{
path: 'upload-excel',
component: 'views/excel/upload-excel',
name: 'UploadExcel',
meta: { title: 'uploadExcel' }
}
]
},
{
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: 'exportZip' }
}
]
},
{
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: 'clipboardDemo', 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: 'externalLink', icon: 'link' }
}
]
},
{ path: '*', redirect: '/404', hidden: true }
]

152
code/vue/mock/user.js

@ -1,152 +0,0 @@
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'
}
}
},
{
url: '/vue-element-admin/getMenu',
type: 'get',
response: _ => {
return {
"code": 20000,
"data": {
"menuList": [
{
'create_time':'2018-03-16 11:33:00',
"menu_type": "M",
"path":'/projectManagement',
"component": "Layout",
"children": [
{
"create_time": "2018-03-16 11:33:00",
"menu_type": "C",
"children": [],
"parent_id": 1,
"menu_name": "客户管理",
"icon": "#",
"perms": "customer:index",
"order_num": 1,
"menu_id": 4,
"url": "/customer/index",
"path":'index',
"name": 'customer',
"component": "customer/index",
// "roles":"abpvnext_master.Customer"
"roles":"AbpIdentity.Users"
},
{
"create_time": "2018-03-16 11:33:00",
"menu_type": "C",
"children": [],
"parent_id": 1,
"menu_name": "合同管理",
"icon": "#",
"perms": "customer:contract",
"order_num": 1,
"menu_id": 4,
"url": "/customer/contract",
"path": 'contract',
"name": 'contract',
"component": "customer/contract",
// "roles": "abpvnext_master.Contract, abpvnext_master.Subject"
"roles":"AbpIdentity.Roles,AbpIdentity.Users"
}
],
"parent_id": 0,
"menu_name": "系统管理",
"icon": "job",
"perms": "customer:index",
"order_num": 2,
"menu_id": 1,
"url": "#",
}
],
"user": {
"login_name": "admin",
"user_id": 1,
"user_name": "管理员",
"dept_id": 1
}
}
}
}
}
]

136
code/vue/mock/ux.js

@ -1,136 +0,0 @@
import Mock from 'mockjs'
//表格字段数据
const ListField = [{"fieldId":1,"formType":"text","fieldName":"leadsName","name":"线索名称","width":100,"type":1,"setting":[]},{"fieldId":2,"formType":"select","fieldName":"线索来源","name":"线索来源","width":100,"type":3},{"fieldId":3,"formType":"text","fieldName":"telephone","name":"电话","width":100,"type":1,"setting":[]},{"fieldId":4,"formType":"mobile","fieldName":"mobile","name":"手机","width":100,"type":7,"setting":[]},{"fieldId":5,"formType":"select","fieldName":"客户行业","name":"客户行业","width":100,"type":3},{"fieldId":6,"formType":"select","fieldName":"客户级别","name":"客户级别","width":100,"type":3},{"fieldId":7,"formType":"text","fieldName":"address","name":"地址","width":100,"type":1,"setting":[]},{"fieldId":8,"formType":"datetime","fieldName":"nextTime","name":"下次联系时间","width":100,"type":13,"setting":[]},{"fieldId":9,"formType":"text","fieldName":"remark","name":"备注","width":100,"type":1,"setting":[]},{"fieldId":null,"formType":"text","fieldName":"lastContent","name":"最后跟进记录","width":100,"type":1,"setting":[]},{"fieldId":null,"formType":"date","fieldName":"updateTime","name":"更新时间","width":100,"type":4,"setting":[]},{"fieldId":null,"formType":"date","fieldName":"createTime","name":"创建时间","width":100,"type":4,"setting":[]},{"fieldId":null,"formType":"text","fieldName":"ownerUserName","name":"负责人","width":100,"type":1,"setting":[]},{"fieldId":null,"formType":"text","fieldName":"createUserName","name":"创建人","width":100,"type":1,"setting":[]}]
//表格list数据
const List=[{"createUserId":3,"ownerUserName":"admin","address":"","createTime":"2020-11-10 10:05:32","createUserName":"admin","ownerUserId":3,"batchId":"3f9e3f45400f452a988bd466a5a36561","mobile":"","telephone":"","remark":"","客户行业":"IT","fieldBatchId":"3f9e3f45400f452a988bd466a5a36561","线索来源":"促销","isTransform":0,"lastContent":null,"followup":null,"leadsId":2,"updateTime":"2020-11-10 10:05:32","nextTime":"2020-11-12 00:00:00","leadsName":"77","customerId":null,"客户级别":"A(重点客户)"},{"createUserId":3,"ownerUserName":"admin","address":"","createTime":"2020-10-13 16:08:48","createUserName":"admin","ownerUserId":3,"batchId":"215f6dfc0b544a84b3b095d505bb62b8","mobile":"1336544343","telephone":"i","remark":"","客户行业":"","fieldBatchId":"215f6dfc0b544a84b3b095d505bb62b8","线索来源":"搜索引擎","isTransform":0,"lastContent":null,"followup":null,"leadsId":1,"updateTime":"2020-10-13 16:08:48","nextTime":null,"leadsName":"ii","customerId":null,"客户级别":"A(重点客户)"}]
//detail 数据
//record 数据
const recordList= [{"recordId":2,"img":[],"file":[],"createTime":"2020-11-11 14:06:31","nextTime":"2020-11-23 00:00:00","batchId":null,"category":"上门拜访","userImg":"","content":"77","realname":"admin"}]
//基本信息
const baseInfoListOne=[{"formType":"text","name":"线索名称","value":"ii"},{"formType":"text","name":"电话","value":"i"},{"formType":"mobile","name":"手机","value":"1336544343"},{"formType":"text","name":"地址","value":""},{"formType":"datetime","name":"下次联系时间","value":"2020-11-09 00:00:00"},{"formType":"text","name":"备注","value":""},{"formType":"select","name":"线索来源","value":"搜索引擎"},{"formType":"select","name":"客户行业","value":""},{"formType":"select","name":"客户级别","value":"A(重点客户)"}]
const baseInfoListTwo=[{"formType":"text","name":"线索名称","value":"77"},{"formType":"text","name":"电话","value":""},{"formType":"mobile","name":"手机","value":""},{"formType":"text","name":"地址","value":""},{"formType":"datetime","name":"下次联系时间","value":"2020-11-23 00:00:00"},{"formType":"text","name":"备注","value":""},{"formType":"select","name":"线索来源","value":"促销"},{"formType":"select","name":"客户行业","value":"IT"},{"formType":"select","name":"客户级别","value":"A(重点客户)"}]
const scenList=[{"formType":"text","fieldName":"leads_name","name":"线索名称","setting":[]},{"formType":"text","fieldName":"telephone","name":"电话","setting":[]},{"formType":"mobile","fieldName":"mobile","name":"手机","setting":[]},{"formType":"text","fieldName":"address","name":"地址","setting":[]},{"formType":"datetime","fieldName":"next_time","name":"下次联系时间","setting":[]},{"formType":"text","fieldName":"remark","name":"备注","setting":[]},{"formType":"user","fieldName":"owner_user_id","name":"负责人","setting":[]},{"formType":"user","fieldName":"create_user_id","name":"创建人","setting":[]},{"formType":"datetime","fieldName":"update_time","name":"更新时间","setting":[]},{"formType":"datetime","fieldName":"create_time","name":"创建时间","setting":[]},{"fieldId":2,"formType":"select","name":"线索来源","options":"促销,搜索引擎,广告,转介绍,线上注册,线上询价,预约上门,电话咨询,邮件咨询","type":3,"fieldName":"线索来源","setting":["促销","搜索引擎","广告","转介绍","线上注册","线上询价","预约上门","电话咨询","邮件咨询"]},{"fieldId":5,"formType":"select","name":"客户行业","options":"IT,金融业,房地产,商业服务,运输/物流,生产,政府,文化传媒","type":3,"fieldName":"客户行业","setting":["IT","金融业","房地产","商业服务","运输/物流","生产","政府","文化传媒"]},{"fieldId":6,"formType":"select","name":"客户级别","options":"A(重点客户),B(普通客户),C(非优先客户)","type":3,"fieldName":"客户级别977","setting":["A(重点客户)","B(普通客户)","C(非优先客户)"]}]
export default [
{
url: '/vue-element-admin/ux/queryField',
type: 'get',
response: _ => {
return {
"code": 20000,
"data": ListField
}
}
},
{
url: '/vue-element-admin/ux/queryPageList',
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: {
totalRow: mockList.length,
list: pageList
}
}
}
},
{
url: '/vue-element-admin/ux/detail',
type: 'get',
response: config => {
const { id } = config.query
for (const article of List) {
if (article.leadsId == id) {
return {
code: 20000,
data: article
}
}
}
}
},
{
url: '/vue-element-admin/ux/queryRecordOptions',
type: 'get',
response: _ => {
return {
"code": 20000,
"data":["打电话","发短信","上门拜访"]
}
}
},
{
url: '/vue-element-admin/ux/getRecord',
type: 'get',
response: config => {
const { page, limit, leadsId } = config.query
let mockList = recordList.filter(item => {
return true
})
const pageList = mockList.filter((item, index) => index < limit * page && index >= limit * (page - 1))
for (const item of recordList) {
if (item.recordId == leadsId) {
return {
code: 20000,
data: recordList
}
}else{
return {
code: 20000,
data: []
}
}
}
}
},
{
url: '/vue-element-admin/ux/information',
type: 'get',
response: config => {
const { types, id } = config.query
console.log(id)
if(id==1){
return {
code: 20000,
data: baseInfoListOne
}
}else{
return {
code: 20000,
data: baseInfoListTwo
}
}
}
},
{
url: '/vue-element-admin/ux/scene/queryField',
type: 'get',
response: _ => {
return {
"code": 20000,
"data":scenList
}
}
},
]

134
code/vue/package.json

@ -1,134 +0,0 @@
{
"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": {
"@babel/polyfill": "^7.12.1",
"@riophae/vue-treeselect": "^0.4.0",
"axios": "0.18.1",
"babel-polyfill": "^6.26.0",
"clipboard": "2.0.4",
"codemirror": "5.45.0",
"driver.js": "0.9.5",
"dropzone": "5.5.1",
"echarts": "4.2.1",
"el-table-transfer": "^0.1.4",
"element-ui": "2.13.0",
"file-saver": "2.0.1",
"fuse.js": "3.4.4",
"js-cookie": "2.2.0",
"jsonlint": "1.6.3",
"jszip": "3.2.1",
"lockr": "^0.8.5",
"moment": "^2.29.1",
"normalize.css": "^7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"pinyin": "2.9.0",
"screenfull": "4.2.0",
"showdown": "^1.9.1",
"sortablejs": "1.8.4",
"tui-editor": "1.3.3",
"v-distpicker": "^1.2.7",
"vue": "2.6.10",
"vue-bus": "^1.2.1",
"vue-count-to": "1.0.13",
"vue-cropper": "^0.5.8",
"vue-i18n": "7.3.2",
"vue-infinite-scroll": "^2.0.2",
"vue-lazyload": "^1.3.3",
"vue-loader": "^15.9.5",
"vue-router": "3.0.2",
"vue-splitpane": "1.0.4",
"vue-style-loader": "^4.1.3",
"vuedraggable": "^2.24.3",
"vuex": "3.1.0",
"xlsx": "0.14.1"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"@vue/cli-plugin-babel": "3.5.3",
"@vue/cli-plugin-eslint": "^3.9.1",
"@vue/cli-plugin-unit-jest": "^4.5.15",
"@vue/cli-service": "^4.5.15",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "^9.8.8",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "^26.6.3",
"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",
"mini-css-extract-plugin": "^2.4.6",
"mockjs": "1.0.1-beta3",
"node-sass": "^4.14.1",
"plop": "2.3.0",
"postcss-loader": "^4.0.4",
"postcss-px-to-viewport": "^1.1.1",
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"serve-static": "^1.14.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
"vue-happy-scroll": "^2.1.1",
"vue-template-compiler": "2.6.10",
"webpack": "^4.46.0",
"webpack-cli": "^4.9.1"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

26
code/vue/plop-templates/component/index.hbs

@ -1,26 +0,0 @@
{{#if template}}
<template>
<div />
</template>
{{/if}}
{{#if script}}
<script>
export default {
name: '{{ properCase name }}',
props: {},
data() {
return {}
},
created() {},
mounted() {},
methods: {}
}
</script>
{{/if}}
{{#if style}}
<style lang="scss" scoped>
</style>
{{/if}}

55
code/vue/plop-templates/component/prompt.js

@ -1,55 +0,0 @@
const { notEmpty } = require('../utils.js')
module.exports = {
description: 'generate vue component',
prompts: [{
type: 'input',
name: 'name',
message: 'component name please',
validate: notEmpty('name')
},
{
type: 'checkbox',
name: 'blocks',
message: 'Blocks:',
choices: [{
name: '<template>',
value: 'template',
checked: true
},
{
name: '<script>',
value: 'script',
checked: true
},
{
name: 'style',
value: 'style',
checked: true
}
],
validate(value) {
if (value.indexOf('script') === -1 && value.indexOf('template') === -1) {
return 'Components require at least a <script> or <template> tag.'
}
return true
}
}
],
actions: data => {
const name = '{{properCase name}}'
const actions = [{
type: 'add',
path: `src/components/${name}/index.vue`,
templateFile: 'plop-templates/component/index.hbs',
data: {
name: name,
template: data.blocks.includes('template'),
script: data.blocks.includes('script'),
style: data.blocks.includes('style')
}
}]
return actions
}
}

16
code/vue/plop-templates/store/index.hbs

@ -1,16 +0,0 @@
{{#if state}}
const state = {}
{{/if}}
{{#if mutations}}
const mutations = {}
{{/if}}
{{#if actions}}
const actions = {}
{{/if}}
export default {
namespaced: true,
{{options}}
}

62
code/vue/plop-templates/store/prompt.js

@ -1,62 +0,0 @@
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
}
}

9
code/vue/plop-templates/utils.js

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

26
code/vue/plop-templates/view/index.hbs

@ -1,26 +0,0 @@
{{#if template}}
<template>
<div />
</template>
{{/if}}
{{#if script}}
<script>
export default {
name: '{{ properCase name }}',
props: {},
data() {
return {}
},
created() {},
mounted() {},
methods: {}
}
</script>
{{/if}}
{{#if style}}
<style lang="scss" scoped>
</style>
{{/if}}

55
code/vue/plop-templates/view/prompt.js

@ -1,55 +0,0 @@
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
}
}

9
code/vue/plopfile.js

@ -1,9 +0,0 @@
const viewGenerator = require('./plop-templates/view/prompt')
const componentGenerator = require('./plop-templates/component/prompt')
const storeGenerator = require('./plop-templates/store/prompt.js')
module.exports = function(plop) {
plop.setGenerator('view', viewGenerator)
plop.setGenerator('component', componentGenerator)
plop.setGenerator('store', storeGenerator)
}

5
code/vue/postcss.config.js

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

BIN
code/vue/public/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

25
code/vue/public/index.html

@ -1,25 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<!-- <link rel="stylesheet" href="./css/style.css" type="text/css" />-->
<!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
</head>
<body>
<div id="app"></div>
<!-- <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=Kw7ohrBpxoZxhVOHzWbIy1vDojNXujG5"></script> -->
<!-- built files will be auto injected -->
<!-- <script type="text/javascript" src="./static/js/ribbon.js"></script>-->
<!-- &lt;!&ndash; 先引入 Vue &ndash;&gt;-->
<!-- <script type="text/javascript" src="./static/js/vue.js"></script>-->
<!-- &lt;!&ndash; 引入组件库 &ndash;&gt;-->
<!-- <script type="text/javascript" src="./static/js/index.js"></script>-->
</body>
</html>

46
code/vue/src/App.vue

@ -1,46 +0,0 @@
<template>
<div id="app">
<router-view class="router-view" v-if="isRouterAlive"/>
</div>
</template>
<script>
import {mapGetters} from 'vuex'
export default {
name: 'App',
computed: {
...mapGetters(['activeIndex','isLoading'])
},
provide() {
return{
reload: this.reload
}
},
data() {
return {
isRouterAlive: true
}
},
watch: {
$route(to, from) {
if (to.meta.menuIndex) {
this.$store.commit('app/SET_ACTIVEINDEX', to.meta.menuIndex)
} else {
this.$store.commit('app/SET_ACTIVEINDEX', to.path)
}
}
},
methods: {
//
reload() {
this.isRouterAlive = false;
this.$nextTick(function () {
this.isRouterAlive = true
})
}
},
}
</script>

41
code/vue/src/api/apiConfig.json

@ -1,41 +0,0 @@
{
"router":{
"apiRoute":"/api"
},
"modules":
{
"Manufacture":"/manufacture",
"Sale":"/sale"
},
"crmTypes":
{
"Detail":"/details",
"Bom":"/bom",
"Machine":"/machine",
"MachineShop":"/machineShop",
"MachineShopItem":"/machineShopItem",
"ProdLine":"/prodLine",
"ProdLineItem":"/prodLineItem",
"Route":"/route",
"RouteDetail":"/routeDetail",
"Shift":"/shift",
"Team":"/team",
"WorkCenter":"/workCenter",
"Customer":"/customer",
"CustomerItem":"/customerItem",
"CustomerBom":"/customerBom"
},
"funcs":
{
"NullFunc":"/",
"ListFunc":"/list",
"CountFunc":"/count",
"AllFunc":"/all",
"AddFunc":"/add",
"UpdateFunc":"/update",
"DeleteFunc":"/delete",
"ImportFunc":"/import"
}
}

21
code/vue/src/api/area/area.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmAreaIndex(data) {
return axios.posts('/api/basedata/area/list',data)
}
// 创建
export function crmAreaSave(data) {
return axios.posts('/api/basedata/area',data)
}
// 根据id获取
export function crmAreaRead(id) {
return axios.gets('/api/basedata/area/'+id)
}
// 根据id修改
export function crmAreaUpdate(id,data) {
return axios.puts('/api/basedata/area/'+id,data)
}
// 删除
export function crmAreaDelete(data) {
return axios.posts('/api/basedata/area/delete',data)
}

21
code/vue/src/api/areaItem/areaItem.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmAreaItemIndex(data) {
return axios.posts('/api/basedata/area-item/list',data)
}
// 创建
export function crmAreaItemSave(data) {
return axios.posts('/api/basedata/area-item',data)
}
// 根据id获取
export function crmAreaItemRead(id) {
return axios.gets('/api/basedata/area-item/'+id)
}
// 根据id修改
export function crmAreaItemUpdate(id,data) {
return axios.puts('/api/basedata/area-item/'+id,data)
}
// 删除
export function crmAreaItemDelete(data) {
return axios.posts('/api/basedata/area-item/delete',data)
}

41
code/vue/src/api/article.js

@ -1,41 +0,0 @@
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',
method: 'post',
data
})
}
export function updateArticle(data) {
return request({
url: '/vue-element-admin/article/update',
method: 'post',
data
})
}

33
code/vue/src/api/bom/bom.js

@ -1,33 +0,0 @@
import axios from '@/axios/index'
import apiConfig from '@/api/apiConfig'
const api= apiConfig.router.apiRoute;
const module= apiConfig.modules.Manufacture;
const crmType=apiConfig.crmTypes.Bom;
const funcs=apiConfig.funcs;
//获取列表数据
export function crmBomIndex(data) {
return axios.posts(api+module+crmType+funcs.ListFunc,data)
//return axios.posts('/api/basedata/bom/list',data)
}
// 创建
export function crmBomSave(data) {
return axios.posts(api+module+crmType,data)
//return axios.posts('/api/basedata/bom',data)
}
//根据id获取单条数据
export function crmBomRead(id) {
return axios.gets(api+module+crmType+funcs.NullFunc+id)
//return axios.gets('/api/basedata/bom/'+id)
}
// 根据id修改
export function crmBomUpdate(id,data) {
return axios.puts(api+module+crmType+funcs.NullFunc+id,data)
//return axios.puts('/api/basedata/bom/'+id,data)
}
// 删除
export function crmBomDelete(data) {
return axios.posts(api+module+crmType+funcs.DeleteFunc,data)
//return axios.posts('/api/basedata/bom/delete',data)
}

21
code/vue/src/api/claim/claim.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmClaimIndex(data) {
return axios.posts('/api/basedata/claim/list',data)
}
// 创建
export function crmClaimSave(data) {
return axios.posts('/api/basedata/claim',data)
}
// 根据id获取
export function crmClaimRead(id) {
return axios.gets('/api/basedata/claim/'+id)
}
// 根据id修改
export function crmClaimUpdate(id,data) {
return axios.puts('/api/basedata/claim/'+id,data)
}
// 删除
export function crmClaimDelete(data) {
return axios.posts('/api/basedata/claim/delete',data)
}

142
code/vue/src/api/common.js

@ -1,142 +0,0 @@
import request from '@/utils/request'
/**
* type
* @param {*} data
*/
export function depList() {
return request({
url: '/vue-element-admin/system/dept/queryDeptTreed',
method: 'get',
// params: params
})
}
// 角色列表
export function roleList() {
return request({
url: '/vue-element-admin/system/role/getAllRoleList',
method: 'get'
})
}
/**
*
* @param {*} data
*/
export function usersList() {
return request({
url: '/vue-element-admin/system/user/queryUserList',
method: 'get',
})
}
// 获取权限范围内部门接口
export function adminStructuresSubIndex(data) {
return request({
url: 'system/dept/queryDeptByAuth',
method: 'post',
data: data
})
}
// 获取权限范围内部门接口
export function getUserByDeptId(data) {
return request({
url: 'system/user/queryUserByDeptId',
method: 'post',
data: data
})
}
// 部门下的员工
export function userListByStructid(data) {
return request({
url: 'admin/users/userListByStructid',
method: 'post',
data: data
})
}
/**
*
* @param {*} data
*/
export const crmFileSaveUrl = process.env.BASE_API + 'file/upload'
export function crmFileSave(data) {
var param = new FormData()
Object.keys(data).forEach(key => {
param.append(key, data[key])
})
return request({
url: 'file/upload',
method: 'post',
data: param,
headers: {
'Content-Type': 'multipart/form-data'
}
})
}
export function crmFileFormDataSave(data) {
return request({
url: 'file/upload',
method: 'post',
data: data,
headers: {
'Content-Type': 'multipart/form-data'
}
})
}
// 附件列表
export function crmFileIndex(data) {
return request({
url: 'file/queryByBatchId',
method: 'post',
data: data
})
}
/** 暂时客户管理里面也有 */
// 附件删除接口
export function crmFileDelete(data) {
return request({
url: 'file/removeById',
method: 'post',
data: data
})
}
// 附件重命名
export function crmFileUpdate(data) {
return request({
url: 'file/renameFileById',
method: 'post',
data: data
})
}
// crm 自定义字段的添加
/**
*
* @param {*} data
*/
export function filedGetField(data) {
return request({
url: 'field/queryField',
method: 'post',
data: data
})
}
// 权限数据返回
export function adminIndexAuthList(data) {
return request({
url: 'system/role/auth',
method: 'post',
data: data
})
}

21
code/vue/src/api/currency/currency.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmCurrencyIndex(data) {
return axios.posts('/api/basedata/currency/list',data)
}
// 创建
export function crmCurrencySave(data) {
return axios.posts('/api/basedata/currency',data)
}
// 根据id获取
export function crmCurrencyRead(id) {
return axios.gets('/api/basedata/currency/'+id)
}
// 根据id修改
export function crmCurrencyUpdate(id,data) {
return axios.puts('/api/basedata/currency/'+id,data)
}
// 删除
export function crmCurrencyDelete(data) {
return axios.posts('/api/basedata/currency/delete',data)
}

21
code/vue/src/api/currencyExchange/currencyExchange.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmCurrencyExchangeIndex(data) {
return axios.posts('/api/basedata/currency-exchange/list',data)
}
// 创建
export function crmCurrencyExchangeSave(data) {
return axios.posts('/api/basedata/currency-exchange',data)
}
// 根据id获取
export function crmCurrencyExchangeRead(id) {
return axios.gets('/api/basedata/currency-exchange/'+id)
}
// 根据id修改
export function crmCurrencyExchangeUpdate(id,data) {
return axios.puts('/api/basedata/currency-exchange/'+id,data)
}
// 删除
export function crmCurrencyExchangeDelete(data) {
return axios.posts('/api/basedata/currency-exchange/delete',data)
}

28
code/vue/src/api/customer/customer.js

@ -1,28 +0,0 @@
import axios from '@/axios/index'
import apiConfig from '@/api/apiConfig'
const api= apiConfig.router.apiRoute;
const module= apiConfig.modules.Manufacture;
const crmType=apiConfig.crmTypes.Bom;
const funcs=apiConfig.funcs;
// 获取列表
export function crmCustomerIndex(data) {
return axios.posts('/api/basedata/customer/list',data)
}
// 创建
export function crmCustomerSave(data) {
return axios.posts('/api/basedata/customer',data)
}
// 根据id获取
export function crmCustomerRead(id) {
return axios.gets('/api/basedata/customer/'+id)
}
// 根据id修改
export function crmCustomerUpdate(id,data) {
return axios.puts('/api/basedata/customer/'+id,data)
}
// 删除
export function crmCustomerDelete(data) {
return axios.posts('/api/basedata/customer/delete',data)
}

21
code/vue/src/api/customerBom/customerBom.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmCustomerBomIndex(data) {
return axios.posts('/api/basedata/customer-bom/list',data)
}
// 创建
export function crmCustomerBomSave(data) {
return axios.posts('/api/basedata/customer-bom',data)
}
// 根据id获取
export function crmCustomerBomRead(id) {
return axios.gets('/api/basedata/customer-bom/'+id)
}
// 根据id修改
export function crmCustomerBomUpdate(id,data) {
return axios.puts('/api/basedata/customer-bom/'+id,data)
}
// 删除
export function crmCustomerBomDelete(data) {
return axios.posts('/api/basedata/customer-bom/delete',data)
}

21
code/vue/src/api/customerItem/customerItem.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmCustomerItemIndex(data) {
return axios.posts('/api/basedata/customer-item/list',data)
}
// 创建
export function crmCustomerItemSave(data) {
return axios.posts('/api/basedata/customer-item',data)
}
// 根据id获取
export function crmCustomerItemRead(id) {
return axios.gets('/api/basedata/customer-item/'+id)
}
// 根据id修改
export function crmCustomerItemUpdate(id,data) {
return axios.puts('/api/basedata/customer-item/'+id,data)
}
// 删除
export function crmCustomerItemDelete(data) {
return axios.posts('/api/basedata/customer-item/delete',data)
}

21
code/vue/src/api/department/department.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmDepartmentIndex(data) {
return axios.posts('/api/basedata/department/list',data)
}
// 创建
export function crmDepartmentSave(data) {
return axios.posts('/api/basedata/department',data)
}
// 根据id获取
export function crmDepartmentRead(id) {
return axios.gets('/api/basedata/department/'+id)
}
// 根据id修改
export function crmDepartmentUpdate(id,data) {
return axios.puts('/api/basedata/department/'+id,data)
}
// 删除
export function crmDepartmentDelete(data) {
return axios.posts('/api/basedata/department/delete',data)
}

42
code/vue/src/api/dict/common.js

@ -1,42 +0,0 @@
import request from '@/utils/request'
//ux获取列表字段接口使用MOCK
export function filedGetField() {
return request({
url: '/vue-element-admin/ux/queryField',
method: 'get'
})
}
/**
* 记录类型 数据 与系统设置系统(repeat)
*/
export function crmSettingRecordListAPI() {
return request({
url: '/vue-element-admin/ux/queryRecordOptions',
method: 'get'
})
}
/**
* 详情页基本信息
* @param {*} data
*/
export function filedGetInformation(data) {
return request({
url: '/vue-element-admin/ux/information',
method: 'get',
params: data
})
}
// crm 自定义字段(高级筛选)
export function filterIndexfields(data) {
return request({
url: '/vue-element-admin/ux/scene/queryField',
method: 'get',
params: data
})
}
export function crmSceneIndex() {
return request({
url: '/vue-element-admin/system/scene/getAllsceneList',
method: 'get'
})
}

47
code/vue/src/api/dict/dict.js

@ -1,47 +0,0 @@
import axios from '@/axios/index'
/*axios*/
export function crmDictsIndex(data) {
return axios.posts('/api/basedata/dictionary/list',data)
}
export function crmDictsSave(data) {
return axios.posts('/api/basedata/dictionary',data)
}
export function crmDictsRead(id) {
return axios.gets('/api/basedata/dictionary/'+id)
}
export function crmDictsUpdate(id,data) {
return axios.puts('/api/basedata/dictionary/'+id,data)
}
export function crmDictsDelete(data) {
return axios.posts('/api/basedata/dictionary/delete',data)
}
//获取字典项列表
export function crmDictsItemListRead(id) {
return axios.gets('/api/basedata/dictionary/'+id+'/details')
}
// //按照主表ID和子表ID获取字典项详细信息
export function crmDictsItemDetailRead(id,detailId) {
return axios.gets('/api/basedata/dictionary/'+id+'/details/'+detailId)
}
//按筛选条件获取字典项列表
export function crmDictsItemIndex(id,data) {
return axios.posts('/api/basedata/dictionary/'+id+'/details',data)
}
//新增字典项
export function crmDictsItemAdd(id,data) {
return axios.posts('/api/basedata/dictionary/'+id+'/details/add',data)
}
//修改字典项
export function crmDictsItemUpdate(id,data) {
return axios.posts('/api/basedata/dictionary/'+id+'/details/update',data)
}
//删除字典项
export function crmDictsItemDelete(id,data) {
return axios.posts('/api/basedata/dictionary/'+id+'/details/delete',data)
}

21
code/vue/src/api/dictionary/dictionary.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmDictionaryIndex(data) {
return axios.posts('/api/basedata/dictionary/list',data)
}
// 创建
export function crmDictionarySave(data) {
return axios.posts('/api/basedata/dictionary',data)
}
// 根据id获取
export function crmDictionaryRead(id) {
return axios.gets('/api/basedata/dictionary/'+id)
}
// 根据id修改
export function crmDictionaryUpdate(id,data) {
return axios.puts('/api/basedata/dictionary/'+id,data)
}
// 删除
export function crmDictionaryDelete(data) {
return axios.posts('/api/basedata/dictionary/delete',data)
}

21
code/vue/src/api/dictionaryItem/dictionaryItem.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmDictionaryItemIndex(data) {
return axios.posts('/api/basedata/dictionary-item/list',data)
}
// 创建
export function crmDictionaryItemSave(data) {
return axios.posts('/api/basedata/dictionary-item',data)
}
// 根据id获取
export function crmDictionaryItemRead(id) {
return axios.gets('/api/basedata/dictionary-item/'+id)
}
// 根据id修改
export function crmDictionaryItemUpdate(id,data) {
return axios.puts('/api/basedata/dictionary-item/'+id,data)
}
// 删除
export function crmDictionaryItemDelete(data) {
return axios.posts('/api/basedata/dictionary-item/delete',data)
}

21
code/vue/src/api/eqptInventory/eqptInventory.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmEqptInventoryIndex(data) {
return axios.posts('/api/basedata/eqpt-inventory/list',data)
}
// 创建
export function crmEqptInventorySave(data) {
return axios.posts('/api/basedata/eqpt-inventory',data)
}
// 根据id获取
export function crmEqptInventoryRead(id) {
return axios.gets('/api/basedata/eqpt-inventory/'+id)
}
// 根据id修改
export function crmEqptInventoryUpdate(id,data) {
return axios.puts('/api/basedata/eqpt-inventory/'+id,data)
}
// 删除
export function crmEqptInventoryDelete(data) {
return axios.posts('/api/basedata/eqpt-inventory/delete',data)
}

21
code/vue/src/api/eqptType/eqptType.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmEqptTypeIndex(data) {
return axios.posts('/api/basedata/eqpt-type/list',data)
}
// 创建
export function crmEqptTypeSave(data) {
return axios.posts('/api/basedata/eqpt-type',data)
}
// 根据id获取
export function crmEqptTypeRead(id) {
return axios.gets('/api/basedata/eqpt-type/'+id)
}
// 根据id修改
export function crmEqptTypeUpdate(id,data) {
return axios.puts('/api/basedata/eqpt-type/'+id,data)
}
// 删除
export function crmEqptTypeDelete(data) {
return axios.posts('/api/basedata/eqpt-type/delete',data)
}

21
code/vue/src/api/eqptTypeItem/eqptTypeItem.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmEqptTypeItemIndex(data) {
return axios.posts('/api/basedata/eqpt-type-item/list',data)
}
// 创建
export function crmEqptTypeItemSave(data) {
return axios.posts('/api/basedata/eqpt-type-item',data)
}
// 根据id获取
export function crmEqptTypeItemRead(id) {
return axios.gets('/api/basedata/eqpt-type-item/'+id)
}
// 根据id修改
export function crmEqptTypeItemUpdate(id,data) {
return axios.puts('/api/basedata/eqpt-type-item/'+id,data)
}
// 删除
export function crmEqptTypeItemDelete(data) {
return axios.posts('/api/basedata/eqpt-type-item/delete',data)
}

21
code/vue/src/api/inReceipt/inReceipt.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInReceiptIndex(data) {
return axios.posts('/api/basedata/in-receipt/list',data)
}
// 创建
export function crmInReceiptSave(data) {
return axios.posts('/api/basedata/in-receipt',data)
}
// 根据id获取
export function crmInReceiptRead(id) {
return axios.gets('/api/basedata/in-receipt/'+id)
}
// 根据id修改
export function crmInReceiptUpdate(id,data) {
return axios.puts('/api/basedata/in-receipt/'+id,data)
}
// 删除
export function crmInReceiptDelete(data) {
return axios.posts('/api/basedata/in-receipt/delete',data)
}

21
code/vue/src/api/inReturn/inReturn.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInReturnIndex(data) {
return axios.posts('/api/basedata/in-return/list',data)
}
// 创建
export function crmInReturnSave(data) {
return axios.posts('/api/basedata/in-return',data)
}
// 根据id获取
export function crmInReturnRead(id) {
return axios.gets('/api/basedata/in-return/'+id)
}
// 根据id修改
export function crmInReturnUpdate(id,data) {
return axios.puts('/api/basedata/in-return/'+id,data)
}
// 删除
export function crmInReturnDelete(data) {
return axios.posts('/api/basedata/in-return/delete',data)
}

21
code/vue/src/api/inTask/inTask.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInTaskIndex(data) {
return axios.posts('/api/basedata/in-task/list',data)
}
// 创建
export function crmInTaskSave(data) {
return axios.posts('/api/basedata/in-task',data)
}
// 根据id获取
export function crmInTaskRead(id) {
return axios.gets('/api/basedata/in-task/'+id)
}
// 根据id修改
export function crmInTaskUpdate(id,data) {
return axios.puts('/api/basedata/in-task/'+id,data)
}
// 删除
export function crmInTaskDelete(data) {
return axios.posts('/api/basedata/in-task/delete',data)
}

21
code/vue/src/api/inTaskFgReceipt/inTaskFgReceipt.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInTaskFgReceiptIndex(data) {
return axios.posts('/api/basedata/in-task-fg-receipt/list',data)
}
// 创建
export function crmInTaskFgReceiptSave(data) {
return axios.posts('/api/basedata/in-task-fg-receipt',data)
}
// 根据id获取
export function crmInTaskFgReceiptRead(id) {
return axios.gets('/api/basedata/in-task-fg-receipt/'+id)
}
// 根据id修改
export function crmInTaskFgReceiptUpdate(id,data) {
return axios.puts('/api/basedata/in-task-fg-receipt/'+id,data)
}
// 删除
export function crmInTaskFgReceiptDelete(data) {
return axios.posts('/api/basedata/in-task-fg-receipt/delete',data)
}

21
code/vue/src/api/inTaskHis/inTaskHis.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInTaskHisIndex(data) {
return axios.posts('/api/basedata/in-task-his/list',data)
}
// 创建
export function crmInTaskHisSave(data) {
return axios.posts('/api/basedata/in-task-his',data)
}
// 根据id获取
export function crmInTaskHisRead(id) {
return axios.gets('/api/basedata/in-task-his/'+id)
}
// 根据id修改
export function crmInTaskHisUpdate(id,data) {
return axios.puts('/api/basedata/in-task-his/'+id,data)
}
// 删除
export function crmInTaskHisDelete(data) {
return axios.posts('/api/basedata/in-task-his/delete',data)
}

21
code/vue/src/api/inTaskInspect/inTaskInspect.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInTaskInspectIndex(data) {
return axios.posts('/api/basedata/in-task-inspect/list',data)
}
// 创建
export function crmInTaskInspectSave(data) {
return axios.posts('/api/basedata/in-task-inspect',data)
}
// 根据id获取
export function crmInTaskInspectRead(id) {
return axios.gets('/api/basedata/in-task-inspect/'+id)
}
// 根据id修改
export function crmInTaskInspectUpdate(id,data) {
return axios.puts('/api/basedata/in-task-inspect/'+id,data)
}
// 删除
export function crmInTaskInspectDelete(data) {
return axios.posts('/api/basedata/in-task-inspect/delete',data)
}

21
code/vue/src/api/inTaskInspectDetail/inTaskInspectDetail.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInTaskInspectDetailIndex(data) {
return axios.posts('/api/basedata/in-task-inspect-detail/list',data)
}
// 创建
export function crmInTaskInspectDetailSave(data) {
return axios.posts('/api/basedata/in-task-inspect-detail',data)
}
// 根据id获取
export function crmInTaskInspectDetailRead(id) {
return axios.gets('/api/basedata/in-task-inspect-detail/'+id)
}
// 根据id修改
export function crmInTaskInspectDetailUpdate(id,data) {
return axios.puts('/api/basedata/in-task-inspect-detail/'+id,data)
}
// 删除
export function crmInTaskInspectDetailDelete(data) {
return axios.posts('/api/basedata/in-task-inspect-detail/delete',data)
}

21
code/vue/src/api/inTaskScrapOut/inTaskScrapOut.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInTaskScrapOutIndex(data) {
return axios.posts('/api/basedata/in-task-scrap-out/list',data)
}
// 创建
export function crmInTaskScrapOutSave(data) {
return axios.posts('/api/basedata/in-task-scrap-out',data)
}
// 根据id获取
export function crmInTaskScrapOutRead(id) {
return axios.gets('/api/basedata/in-task-scrap-out/'+id)
}
// 根据id修改
export function crmInTaskScrapOutUpdate(id,data) {
return axios.puts('/api/basedata/in-task-scrap-out/'+id,data)
}
// 删除
export function crmInTaskScrapOutDelete(data) {
return axios.posts('/api/basedata/in-task-scrap-out/delete',data)
}

21
code/vue/src/api/inTaskTransfer1/inTaskTransfer1.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInTaskTransfer1Index(data) {
return axios.posts('/api/basedata/in-task-transfer1/list',data)
}
// 创建
export function crmInTaskTransfer1Save(data) {
return axios.posts('/api/basedata/in-task-transfer1',data)
}
// 根据id获取
export function crmInTaskTransfer1Read(id) {
return axios.gets('/api/basedata/in-task-transfer1/'+id)
}
// 根据id修改
export function crmInTaskTransfer1Update(id,data) {
return axios.puts('/api/basedata/in-task-transfer1/'+id,data)
}
// 删除
export function crmInTaskTransfer1Delete(data) {
return axios.posts('/api/basedata/in-task-transfer1/delete',data)
}

21
code/vue/src/api/inTaskUnplanedDeliver/inTaskUnplanedDeliver.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInTaskUnplanedDeliverIndex(data) {
return axios.posts('/api/basedata/in-task-unplaned-deliver/list',data)
}
// 创建
export function crmInTaskUnplanedDeliverSave(data) {
return axios.posts('/api/basedata/in-task-unplaned-deliver',data)
}
// 根据id获取
export function crmInTaskUnplanedDeliverRead(id) {
return axios.gets('/api/basedata/in-task-unplaned-deliver/'+id)
}
// 根据id修改
export function crmInTaskUnplanedDeliverUpdate(id,data) {
return axios.puts('/api/basedata/in-task-unplaned-deliver/'+id,data)
}
// 删除
export function crmInTaskUnplanedDeliverDelete(data) {
return axios.posts('/api/basedata/in-task-unplaned-deliver/delete',data)
}

21
code/vue/src/api/interfaceCalendar/interfaceCalendar.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInterfaceCalendarIndex(data) {
return axios.posts('/api/basedata/interface-calendar/list',data)
}
// 创建
export function crmInterfaceCalendarSave(data) {
return axios.posts('/api/basedata/interface-calendar',data)
}
// 根据id获取
export function crmInterfaceCalendarRead(id) {
return axios.gets('/api/basedata/interface-calendar/'+id)
}
// 根据id修改
export function crmInterfaceCalendarUpdate(id,data) {
return axios.puts('/api/basedata/interface-calendar/'+id,data)
}
// 删除
export function crmInterfaceCalendarDelete(data) {
return axios.posts('/api/basedata/interface-calendar/delete',data)
}

21
code/vue/src/api/inventory/inventory.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInventoryIndex(data) {
return axios.posts('/api/basedata/inventory/list',data)
}
// 创建
export function crmInventorySave(data) {
return axios.posts('/api/basedata/inventory',data)
}
// 根据id获取
export function crmInventoryRead(id) {
return axios.gets('/api/basedata/inventory/'+id)
}
// 根据id修改
export function crmInventoryUpdate(id,data) {
return axios.puts('/api/basedata/inventory/'+id,data)
}
// 删除
export function crmInventoryDelete(data) {
return axios.posts('/api/basedata/inventory/delete',data)
}

21
code/vue/src/api/inventoryMoveHis/inventoryMoveHis.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInventoryMoveHisIndex(data) {
return axios.posts('/api/basedata/inventory-move-his/list',data)
}
// 创建
export function crmInventoryMoveHisSave(data) {
return axios.posts('/api/basedata/inventory-move-his',data)
}
// 根据id获取
export function crmInventoryMoveHisRead(id) {
return axios.gets('/api/basedata/inventory-move-his/'+id)
}
// 根据id修改
export function crmInventoryMoveHisUpdate(id,data) {
return axios.puts('/api/basedata/inventory-move-his/'+id,data)
}
// 删除
export function crmInventoryMoveHisDelete(data) {
return axios.posts('/api/basedata/inventory-move-his/delete',data)
}

21
code/vue/src/api/inventoryOccupy/inventoryOccupy.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInventoryOccupyIndex(data) {
return axios.posts('/api/basedata/inventory-occupy/list',data)
}
// 创建
export function crmInventoryOccupySave(data) {
return axios.posts('/api/basedata/inventory-occupy',data)
}
// 根据id获取
export function crmInventoryOccupyRead(id) {
return axios.gets('/api/basedata/inventory-occupy/'+id)
}
// 根据id修改
export function crmInventoryOccupyUpdate(id,data) {
return axios.puts('/api/basedata/inventory-occupy/'+id,data)
}
// 删除
export function crmInventoryOccupyDelete(data) {
return axios.posts('/api/basedata/inventory-occupy/delete',data)
}

51
code/vue/src/api/inventoryRoute/inventoryRoute.js

@ -1,51 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInventoryRouteIndex(data) {
return axios.posts('/api/basedata/inventory-route/list',data)
}
// 创建
export function crmInventoryRouteSave(data) {
return axios.posts('/api/basedata/inventory-route',data)
}
// 根据id获取 crmInventoryRouteRead
export function crmInventoryRouteRead(id) {
return axios.gets('/api/basedata/inventory-route/'+id)
}
// 根据id修改
export function crmInventoryRouteUpdate(id,data) {
return axios.puts('/api/basedata/inventory-route/'+id,data)
}
// 删除
export function crmInventoryRouteDelete(data) {
return axios.posts('/api/basedata/inventory-route/delete',data)
}
//获取子项列表
export function crmInventoryRouteDetailListRead(id) {
return axios.gets('/api/basedata/inventory-route/'+id+'/details')
}
//按照主表ID和子表ID获取子项详细信息
export function crmInventoryRouteDetailRead(id,detailId) {
return axios.gets('/api/basedata/inventory-route/'+id+'/details/'+detailId)
}
//按筛选条件获取子项列表
export function crmInventoryRouteDetailIndex(id,data) {
return axios.posts('/api/basedata/inventory-route/'+id+'/details',data)
}
//新增子项
export function crmInventoryRouteDetailAdd(id,data) {
return axios.posts('/api/basedata/inventory-route/'+id+'/details/add',data)
}
//修改子项
export function crmInventoryRouteDetailUpdate(id,data) {
return axios.posts('/api/basedata/inventory-route/'+id+'/details/update',data)
}
//删除子项
export function crmInventoryRouteDetailDelete(id,data) {
return axios.posts('/api/basedata/inventory-route/'+id+'/details/delete',data)
}

21
code/vue/src/api/inventoryRouteDetail/inventoryRouteDetail.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmInventoryRouteDetailIndex(data) {
return axios.posts('/api/basedata/inventory-route-detail/list',data)
}
// 创建
export function crmInventoryRouteDetailSave(data) {
return axios.posts('/api/basedata/inventory-route-detail',data)
}
// 根据id获取
export function crmInventoryRouteDetailRead(id) {
return axios.gets('/api/basedata/inventory-route-detail/'+id)
}
// 根据id修改
export function crmInventoryRouteDetailUpdate(id,data) {
return axios.puts('/api/basedata/inventory-route-detail/'+id,data)
}
// 删除
export function crmInventoryRouteDetailDelete(data) {
return axios.posts('/api/basedata/inventory-route-detail/delete',data)
}

21
code/vue/src/api/item/item.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmItemIndex(data) {
return axios.posts('/api/basedata/item/list',data)
}
// 创建
export function crmItemSave(data) {
return axios.posts('/api/basedata/item',data)
}
// 根据id获取
export function crmItemRead(id) {
return axios.gets('/api/basedata/item/'+id)
}
// 根据id修改
export function crmItemUpdate(id,data) {
return axios.puts('/api/basedata/item/'+id,data)
}
// 删除
export function crmItemDelete(data) {
return axios.posts('/api/basedata/item/delete',data)
}

21
code/vue/src/api/itemTransTypeInventoryRoute/itemTransTypeInventoryRoute.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmItemTransTypeInventoryRouteIndex(data) {
return axios.posts('/api/basedata/item-transtype-inventory-route/list',data)
}
// 创建
export function crmItemTransTypeInventoryRouteSave(data) {
return axios.posts('/api/basedata/item-transtype-inventory-route',data)
}
// 根据id获取
export function crmItemTransTypeInventoryRouteRead(id) {
return axios.gets('/api/basedata/item-transtype-inventory-route/'+id)
}
// 根据id修改
export function crmItemTransTypeInventoryRouteUpdate(id,data) {
return axios.puts('/api/basedata/item-transtype-inventory-route/'+id,data)
}
// 删除
export function crmItemTransTypeInventoryRouteDelete(data) {
return axios.posts('/api/basedata/item-transtype-inventory-route/delete',data)
}

21
code/vue/src/api/itemTransTypeOpStrategy/itemTransTypeOpStrategy.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmItemTransTypeOpStrategyIndex(data) {
return axios.posts('/api/basedata/item-trans-type-op-strategy/list',data)
}
// 创建
export function crmItemTransTypeOpStrategySave(data) {
return axios.posts('/api/basedata/item-trans-type-op-strategy',data)
}
// 根据id获取
export function crmItemTransTypeOpStrategyRead(id) {
return axios.gets('/api/basedata/item-trans-type-op-strategy/'+id)
}
// 根据id修改
export function crmItemTransTypeOpStrategyUpdate(id,data) {
return axios.puts('/api/basedata/item-trans-type-op-strategy/'+id,data)
}
// 删除
export function crmItemTransTypeOpStrategyDelete(data) {
return axios.posts('/api/basedata/item-trans-type-op-strategy/delete',data)
}

21
code/vue/src/api/job/job.js

@ -1,21 +0,0 @@
// import axios from '@/axios/index'
// // 获取列表
// export function crmJobIndex(data) {
// return axios.posts('/api/basedata/job/list',data)
// }
// // 创建
// export function crmJobSave(data) {
// return axios.posts('/api/basedata/job',data)
// }
// // 根据id获取
// export function crmJobRead(id) {
// return axios.gets('/api/basedata/job/'+id)
// }
// // 根据id修改
// export function crmJobUpdate(id,data) {
// return axios.puts('/api/basedata/job/'+id,data)
// }
// // 删除
// export function crmJobDelete(data) {
// return axios.posts('/api/basedata/job/delete',data)
// }

21
code/vue/src/api/loc/loc.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmLocIndex(data) {
return axios.posts('/api/basedata/loc/list',data)
}
// 创建
export function crmLocSave(data) {
return axios.posts('/api/basedata/loc',data)
}
// 根据id获取
export function crmLocRead(id) {
return axios.gets('/api/basedata/loc/'+id)
}
// 根据id修改
export function crmLocUpdate(id,data) {
return axios.puts('/api/basedata/loc/'+id,data)
}
// 删除
export function crmLocDelete(data) {
return axios.posts('/api/basedata/loc/delete',data)
}

30
code/vue/src/api/machine/machine.js

@ -1,30 +0,0 @@
import axios from '@/axios/index'
import apiConfig from '@/api/apiConfig'
const api= apiConfig.router.apiRoute;
const module= apiConfig.modules.Manufacture;
const crmType=apiConfig.crmTypes.Machine;
const funcs=apiConfig.funcs;
/*axios*/
export function crmMachineIndex(data) {//获取列表数据
return axios.posts(api+module+crmType+funcs.ListFunc,data)
//return axios.posts('/api/basedata/machine/list',data)
}
export function crmMachineSave(data) {//新增
return axios.posts(api+module+crmType,data)
//return axios.posts('/api/basedata/machine',data)
}
export function crmMachineRead(id) {//根据id获取单条数据
return axios.gets(api+module+crmType+funcs.NullFunc+id)
//return axios.gets('/api/basedata/machine/'+id)
}
export function crmMachineUpdate(id,data) {//更新
return axios.puts(api+module+crmType+funcs.NullFunc+id,data)
//return axios.puts('/api/basedata/machine/'+id,data)
}
export function crmMachineDelete(data) {//删除
return axios.posts(api+module+crmType+funcs.DeleteFunc,data)
//return axios.posts('/api/basedata/machine/delete',data)
}

8
code/vue/src/api/org/org.js

@ -1,8 +0,0 @@
import axios from '@/axios/index'
/*axios*/
export function crmOrgIndex() {
return axios.gets('/api/base/userbranch/current/branches')
}
export function crmOrgRead(id) {
return axios.gets('/api/base/branch/'+id)
}

21
code/vue/src/api/organization/organization.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmOrganizationIndex(data) {
return axios.posts('/api/basedata/organization/list',data)
}
// 创建
export function crmOrganizationSave(data) {
return axios.posts('/api/basedata/organization',data)
}
// 根据id获取
export function crmOrganizationRead(id) {
return axios.gets('/api/basedata/organization/'+id)
}
// 根据id修改
export function crmOrganizationUpdate(id,data) {
return axios.puts('/api/basedata/organization/'+id,data)
}
// 删除
export function crmOrganizationDelete(data) {
return axios.posts('/api/basedata/organization/delete',data)
}

21
code/vue/src/api/param/param.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmParamIndex(data) {
return axios.posts('/api/basedata/param/list',data)
}
// 创建
export function crmParamSave(data) {
return axios.posts('/api/basedata/param',data)
}
// 根据id获取
export function crmParamRead(id) {
return axios.gets('/api/basedata/param/'+id)
}
// 根据id修改
export function crmParamUpdate(id,data) {
return axios.puts('/api/basedata/param/'+id,data)
}
// 删除
export function crmParamDelete(data) {
return axios.posts('/api/basedata/param/delete',data)
}

9
code/vue/src/api/personCenter/personCenter.js

@ -1,9 +0,0 @@
import axios from '@/axios/index'
/*axios*/
//修改当前登录用户信息
// export function adminUsersResetPassword(id,data) {
// return axios.puts('/api/base/user/'+id+'/updatenoauthuser',data)
// }
export function adminUsersResetPassword(data) {
return axios.posts('/api/identity/my-profile/change-password',data)
}

21
code/vue/src/api/port/port.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmPortIndex(data) {
return axios.posts('/api/basedata/port/list',data)
}
// 创建
export function crmPortSave(data) {
return axios.posts('/api/basedata/port',data)
}
// 根据id获取
export function crmPortRead(id) {
return axios.gets('/api/basedata/port/'+id)
}
// 根据id修改
export function crmPortUpdate(id,data) {
return axios.puts('/api/basedata/port/'+id,data)
}
// 删除
export function crmPortDelete(data) {
return axios.posts('/api/basedata/port/delete',data)
}

34
code/vue/src/api/prodLine/prodLine.js

@ -1,34 +0,0 @@
import axios from '@/axios/index'
import apiConfig from '@/api/apiConfig'
const api= apiConfig.router.apiRoute;
const module= apiConfig.modules.Manufacture;
const crmType=apiConfig.crmTypes.ProdLine;
const funcs=apiConfig.funcs;
//获取列表数据
export function crmProdLineIndex(data) {
return axios.posts(api+module+crmType+funcs.ListFunc,data)
//return axios.posts('/api/basedata/prodLine/list',data)
}
// 创建
export function crmProdLineSave(data) {
return axios.posts(api+module+crmType,data)
//return axios.posts('/api/basedata/prodLine',data)
}
//根据id获取单条数据
export function crmProdLineRead(id) {
return axios.gets(api+module+crmType+funcs.NullFunc+id)
//return axios.gets('/api/basedata/prodLine/'+id)
}
// 根据id修改
export function crmProdLineUpdate(id,data) {
return axios.puts(api+module+crmType+funcs.NullFunc+id,data)
//return axios.puts('/api/basedata/prodLine/'+id,data)
}
// 删除
export function crmProdLineDelete(data) {
return axios.posts(api+module+crmType+funcs.DeleteFunc,data)
//return axios.posts('/api/basedata/prodLine/delete',data)
}

33
code/vue/src/api/prodLineItem/prodLineItem.js

@ -1,33 +0,0 @@
import axios from '@/axios/index'
import apiConfig from '@/api/apiConfig'
const api= apiConfig.router.apiRoute;
const module= apiConfig.modules.Manufacture;
const crmType=apiConfig.crmTypes.ProdLineItem;
const funcs=apiConfig.funcs;
//获取列表数据
export function crmProdLineItemIndex(data) {
return axios.posts(api+module+crmType+funcs.ListFunc,data)
//return axios.posts('/api/basedata/prodLineItem/list',data)
}
// 创建
export function crmProdLineItemSave(data) {
return axios.posts(api+module+crmType,data)
//return axios.posts('/api/basedata/prodLineItem',data)
}
//根据id获取单条数据
export function crmProdLineItemRead(id) {
return axios.gets(api+module+crmType+funcs.NullFunc+id)
//return axios.gets('/api/basedata/prodLineItem/'+id)
}
// 根据id修改
export function crmProdLineItemUpdate(id,data) {
return axios.puts(api+module+crmType+funcs.NullFunc+id,data)
//return axios.puts('/api/basedata/prodLineItem/'+id,data)
}
// 删除
export function crmProdLineItemDelete(data) {
return axios.posts(api+module+crmType+funcs.DeleteFunc,data)
//return axios.posts('/api/basedata/prodLineItem/delete',data)
}

21
code/vue/src/api/project/project.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmProjectIndex(data) {
return axios.posts('/api/basedata/project/list',data)
}
// 创建
export function crmProjectSave(data) {
return axios.posts('/api/basedata/project',data)
}
// 根据id获取
export function crmProjectRead(id) {
return axios.gets('/api/basedata/project/'+id)
}
// 根据id修改
export function crmProjectUpdate(id,data) {
return axios.puts('/api/basedata/project/'+id,data)
}
// 删除
export function crmProjectDelete(data) {
return axios.posts('/api/basedata/project/delete',data)
}

21
code/vue/src/api/purchasePriceDetail/purchasePriceDetail.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmPurchasePriceDetailIndex(data) {
return axios.posts('/api/basedata/purchase-price-detail/list',data)
}
// 创建
export function crmPurchasePriceDetailSave(data) {
return axios.posts('/api/basedata/purchase-price-detail',data)
}
// 根据id获取
export function crmPurchasePriceDetailRead(id) {
return axios.gets('/api/basedata/purchase-price-detail/'+id)
}
// 根据id修改
export function crmPurchasePriceDetailUpdate(id,data) {
return axios.puts('/api/basedata/purchase-price-detail/'+id,data)
}
// 删除
export function crmPurchasePriceDetailDelete(data) {
return axios.posts('/api/basedata/purchase-price-detail/delete',data)
}

52
code/vue/src/api/purchasePriceSheet/purchasePriceSheet.js

@ -1,52 +0,0 @@
import axios from '@/axios'
// 获取列表
export function crmPurchasePriceSheetIndex(data) {
return axios.posts('/api/basedata/purchase-price-sheet/list',data)
}
// 创建
export function crmPurchasePriceSheetSave(data) {
return axios.posts('/api/basedata/purchase-price-sheet',data)
}
// 根据id获取
export function crmPurchasePriceSheetRead(id) {
return axios.gets('/api/basedata/purchase-price-sheet/'+id)
}
// 根据id修改
export function crmPurchasePriceSheetUpdate(id,data) {
return axios.puts('/api/basedata/purchase-price-sheet/'+id,data)
}
// 删除
export function crmPurchasePriceSheetDelete(data) {
return axios.posts('/api/basedata/purchase-price-sheet/delete',data)
}
//获取子项列表
export function crmPurchasePriceDetailListRead(id) {
return axios.gets('/api/basedata/purchase-price-sheet/'+id+'/details')
}
//按照主表ID和子表ID获取子项详细信息
export function crmPurchasePriceDetailRead(id,detailId) {
return axios.gets('/api/basedata/purchase-price-sheet/'+id+'/details/'+detailId)
}
//按筛选条件获取子项列表
export function crmPurchasePriceDetailIndex(id,data) {
return axios.posts('/api/basedata/purchase-price-sheet/'+id+'/details',data)
}
//新增子项
export function crmPurchasePriceDetailAdd(id,data) {
return axios.posts('/api/basedata/purchase-price-sheet/'+id+'/details/add',data)
}
//修改子项
export function crmPurchasePriceDetailUpdate(id,data) {
return axios.posts('/api/basedata/purchase-price-sheet/'+id+'/details/update',data)
}
//删除子项
export function crmPurchasePriceDetailDelete(id,data) {
return axios.posts('/api/basedata/purchase-price-sheet/'+id+'/details/delete',data)
}

8
code/vue/src/api/qiniu.js

@ -1,8 +0,0 @@
import request from '@/utils/request'
export function getToken() {
return request({
url: '/qiniu/upload/token', // 假地址 自行替换
method: 'get'
})
}

17
code/vue/src/api/remote-search.js

@ -1,17 +0,0 @@
import request from '@/utils/request'
export function searchUser(name) {
return request({
url: '/vue-element-admin/search/user',
method: 'get',
params: { name }
})
}
export function transactionList(query) {
return request({
url: '/vue-element-admin/transaction/list',
method: 'get',
params: query
})
}

38
code/vue/src/api/role.js

@ -1,38 +0,0 @@
import request from '@/utils/request'
export function getRoutes() {
return request({
url: '/vue-element-admin/routes',
method: 'get'
})
}
export function getRoles() {
return request({
url: '/vue-element-admin/roles',
method: 'get'
})
}
export function addRole(data) {
return request({
url: '/vue-element-admin/role',
method: 'post',
data
})
}
export function updateRole(id, data) {
return request({
url: `/vue-element-admin/role/${id}`,
method: 'put',
data
})
}
export function deleteRole(id) {
return request({
url: `/vue-element-admin/role/${id}`,
method: 'delete'
})
}

21
code/vue/src/api/role/role.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmRoleIndex(data) {
return axios.posts('/api/basedata/role/list',data)
}
// 创建
export function crmRoleSave(data) {
return axios.posts('/api/basedata/role',data)
}
// 根据id获取
export function crmRoleRead(id) {
return axios.gets('/api/basedata/role/'+id)
}
// 根据id修改
export function crmRoleUpdate(id,data) {
return axios.puts('/api/basedata/role/'+id,data)
}
// 删除
export function crmRoleDelete(data) {
return axios.posts('/api/basedata/role/delete',data)
}

21
code/vue/src/api/roleClaim/roleClaim.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmRoleClaimIndex(data) {
return axios.posts('/api/basedata/role-claim/list',data)
}
// 创建
export function crmRoleClaimSave(data) {
return axios.posts('/api/basedata/role-claim',data)
}
// 根据id获取
export function crmRoleClaimRead(id) {
return axios.gets('/api/basedata/role-claim/'+id)
}
// 根据id修改
export function crmRoleClaimUpdate(id,data) {
return axios.puts('/api/basedata/role-claim/'+id,data)
}
// 删除
export function crmRoleClaimDelete(data) {
return axios.posts('/api/basedata/role-claim/delete',data)
}

71
code/vue/src/api/route/route.js

@ -1,71 +0,0 @@
import axios from '@/axios/index'
import apiConfig from '@/api/apiConfig'
const api= apiConfig.router.apiRoute;
const routemodule= apiConfig.modules.Route;
const routeDetailmodule= apiConfig.modules.RouteDetail;
const crmType=apiConfig.crmTypes.Route;
const detailType=apiConfig.crmTypes.Detail;
const funcs=apiConfig.funcs;
// 获取列表
export function crmRouteIndex(data) {
return axios.posts(api+routemodule+crmType+funcs.ListFunc,data)
//return axios.posts('/api/basedata/route/list',data)
}
// 创建
export function crmRouteSave(data) {
return axios.posts(api+routemodule+crmType,data)
//return axios.posts('/api/basedata/route',data)
}
// 根据id获取
export function crmRouteRead(id) {
return axios.gets(api+module+crmType+funcs.NullFunc+id)
//return axios.gets('/api/basedata/route/'+id)
}
// 根据id修改
export function crmRouteUpdate(id,data) {
return axios.puts(api+module+crmType+funcs.NullFunc+id,data)
//return axios.puts('/api/basedata/route/'+id,data)
}
// 删除
export function crmRouteDelete(data) {
return axios.posts(api+module+crmType+funcs.DeleteFunc,data)
}
//获取子项列表
export function crmRouteDetailListRead(id) {
return axios.gets(api+module+crmType+id+detailType)
//return axios.gets(api+module+crmType+id+'/details')
}
//按照主表ID和子表ID获取子项详细信息
export function crmRouteDetailRead(id,detailId) {
return axios.gets(api+module+crmType+id+detailType+funcs.NullFunc+detailId)
//return axios.gets(api+module+crmType+id+'/details/'+detailId)
}
//按筛选条件获取子项列表
export function crmRouteDetailIndex(id,data) {
return axios.posts(api+module+crmType+id+detailType,data)
//return axios.posts(api+module+crmType+id+'/details',data)
}
//新增子项
export function crmRouteDetailAdd(id,data) {
return axios.posts(api+module+crmType+id+detailType+funcs.AddFunc,data)
//return axios.posts(api+module+crmType+id+'/details/add',data)
}
//修改子项
export function crmRouteDetailUpdate(id,data) {
return axios.posts(api+module+crmType+id+detailType+funcs.UpdateFunc,data)
//return axios.posts(api+module+crmType+id+'/details/update',data)
}
//删除子项
export function crmRouteDetailDelete(id,data) {
return axios.posts(api+module+crmType+id+detailType+funcs.DelateFunc,data)
//return axios.posts(api+module+crmType+id+'/details/delete',data)
}

21
code/vue/src/api/routeDetail/routeDetail.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmRouteDetailIndex(data) {
return axios.posts('/api/basedata/route-detail/list',data)
}
// 创建
export function crmRouteDetailSave(data) {
return axios.posts('/api/basedata/route-detail',data)
}
// 根据id获取
export function crmRouteDetailRead(id) {
return axios.gets('/api/basedata/route-detail/'+id)
}
// 根据id修改
export function crmRouteDetailUpdate(id,data) {
return axios.puts('/api/basedata/route-detail/'+id,data)
}
// 删除
export function crmRouteDetailDelete(data) {
return axios.posts('/api/basedata/route-detail/delete',data)
}

17
code/vue/src/api/rule/rule.js

@ -1,17 +0,0 @@
import axios from '@/axios/index'
/*axios*/
export function crmRuleIndex(data) {
return axios.posts('/api/basedata/rule/list',data)
}
export function crmRuleSave(data) {
return axios.posts('/api/basedata/rule',data)
}
export function crmRuleRead(id) {
return axios.gets('/api/basedata/rule/'+id)
}
export function crmRuleUpdate(id,data) {
return axios.puts('/api/basedata/rule/'+id,data)
}
export function crmRuleDelete(data) {
return axios.posts('/api/basedata/rule/delete',data)
}

21
code/vue/src/api/salePriceDetail/salePriceDetail.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmSalePriceDetailIndex(data) {
return axios.posts('/api/basedata/sale-price-detail/list',data)
}
// 创建
export function crmSalePriceDetailSave(data) {
return axios.posts('/api/basedata/sale-price-detail',data)
}
// 根据id获取
export function crmSalePriceDetailRead(id) {
return axios.gets('/api/basedata/sale-price-detail/'+id)
}
// 根据id修改
export function crmSalePriceDetailUpdate(id,data) {
return axios.puts('/api/basedata/sale-price-detail/'+id,data)
}
// 删除
export function crmSalePriceDetailDelete(data) {
return axios.posts('/api/basedata/sale-price-detail/delete',data)
}

51
code/vue/src/api/salePriceSheet/salePriceSheet.js

@ -1,51 +0,0 @@
import axios from '@/axios'
// 获取列表
export function crmSalePriceSheetIndex(data) {
return axios.posts('/api/basedata/sale-price-sheet/list',data)
}
// 创建
export function crmSalePriceSheetSave(data) {
return axios.posts('/api/basedata/sale-price-sheet',data)
}
// 根据id获取
export function crmSalePriceSheetRead(id) {
return axios.gets('/api/basedata/sale-price-sheet/'+id)
}
// 根据id修改
export function crmSalePriceSheetUpdate(id,data) {
return axios.puts('/api/basedata/sale-price-sheet/'+id,data)
}
// 删除
export function crmSalePriceSheetDelete(data) {
return axios.posts('/api/basedata/sale-price-sheet/delete',data)
}
//获取子项列表
export function crmSalePriceDetailListRead(id) {
return axios.gets('/api/basedata/sale-price-sheet/'+id+'/details')
}
//按照主表ID和子表ID获取子项详细信息
export function crmSalePriceDetailRead(id,detailId) {
return axios.gets('/api/basedata/sale-price-sheet/'+id+'/details/'+detailId)
}
//按筛选条件获取子项列表
export function crmSalePriceDetailIndex(id,data) {
return axios.posts('/api/basedata/sale-price-sheet/'+id+'/details',data)
}
//新增子项
export function crmSalePriceDetailAdd(id,data) {
return axios.posts('/api/basedata/sale-price-sheet/'+id+'/details/add',data)
}
//修改子项
export function crmSalePriceDetailUpdate(id,data) {
return axios.posts('/api/basedata/sale-price-sheet/'+id+'/details/update',data)
}
//删除子项
export function crmSalePriceDetailDelete(id,data) {
return axios.posts('/api/basedata/sale-price-sheet/'+id+'/details/delete',data)
}

33
code/vue/src/api/shift/shift.js

@ -1,33 +0,0 @@
import axios from '@/axios/index'
import apiConfig from '@/api/apiConfig'
const api= apiConfig.router.apiRoute;
const module= apiConfig.modules.Manufacture;
const crmType=apiConfig.crmTypes.Shift;
const funcs=apiConfig.funcs;
//获取列表数据
export function crmShiftIndex(data) {
return axios.posts(api+module+crmType+funcs.ListFunc,data)
//return axios.posts('/api/basedata/shift/list',data)
}
// 创建
export function crmShiftSave(data) {
return axios.posts(api+module+crmType,data)
//return axios.posts('/api/basedata/shift',data)
}
//根据id获取单条数据
export function crmShiftRead(id) {
return axios.gets(api+module+crmType+funcs.NullFunc+id)
//return axios.gets('/api/basedata/shift/'+id)
}
// 根据id修改
export function crmShiftUpdate(id,data) {
return axios.puts(api+module+crmType+funcs.NullFunc+id,data)
//return axios.puts('/api/basedata/shift/'+id,data)
}
// 删除
export function crmShiftDelete(data) {
return axios.posts(api+module+crmType+funcs.DeleteFunc,data)
//return axios.posts('/api/basedata/shift/delete',data)
}

21
code/vue/src/api/slg/slg.js

@ -1,21 +0,0 @@
import axios from '@/axios/index'
// 获取列表
export function crmSlgIndex(data) {
return axios.posts('/api/basedata/slg/list',data)
}
// 创建
export function crmSlgSave(data) {
return axios.posts('/api/basedata/slg',data)
}
// 根据id获取
export function crmSlgRead(id) {
return axios.gets('/api/basedata/slg/'+id)
}
// 根据id修改
export function crmSlgUpdate(id,data) {
return axios.puts('/api/basedata/slg/'+id,data)
}
// 删除
export function crmSlgDelete(data) {
return axios.posts('/api/basedata/slg/delete',data)
}

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

Loading…
Cancel
Save