Add all dashboard projects

This commit is contained in:
meswork764
2026-05-23 14:07:11 +08:00
commit ba82fbfc14
3550 changed files with 467904 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins":["transform-vue-jsx", "transform-runtime"]
}

View File

@@ -0,0 +1,45 @@
---
description:
globs:
alwaysApply: true
---
# 基本要求
Always respond in Chinese-simplified
总是直接帮我修改文件代码 与 代码插入
直接帮我修改 不需要二次确认
# 编码要求
定位问题,分析问题,针对问题进行全面修复,包括有可能关联的文件。
1.如果遇到需要修复的方法或函数,在现有的错误方法中进行重构,尽量不新建函数,如果必须要新建函数,在优化完毕后需要清理旧的重复功能和冗余代码。
2.期间遵循开发手册和项目结构内的要求。
3.注意修改代码时要符合现有代码架构,根据用户提出需求进行删改代码。
4.期间需要符合项目结构的属性。
5.注意代码结构清晰,尽量不使用多层嵌套,扁平化设计。
6.如果功能需要,需要时刻注意保持异步线程和消息队列的问题,提升通信效率,降低消息阻塞的问题。
7.本项目在后续需要分发给用户使用,所以应该同时考虑多并发和多事件循环的问题。并健壮代码的长期运行能力。
8.务必确保项目能够达到企业级标准,减少客户的投诉率。
9.确保代码健壮高效的同时,不应过度设计,项目整体应该保持精简高效的原则,这是开发核心原则。
10.创建文件必须经过用户同意,并说明创建理由,否则不能主动创建任何文件。
11.在开始前你需要先调用MCP工具中的顺序思维工具对于问题进行梳理与规划
然后按照步骤开始实施。实施期间不要影响无关代码和功能,完善后需要清理冗余代码。
#业务要求
******数据库关联
项目 设计到CreateData 方法 调用的都是SqlServer存储过程
参数 :
1 类型编号 : 11 是查询操作 会得到存储过程 select 返回的结果表 12 是增删改操作 (只返回最终的存储过程是否执行成功 result 结果 1 成功 反之失败)
2 存储过程名称
3 存储过程参数
二维数组类型 如
[
['参数1',参数值1],
['参数2',参数值2]
]
# 再次强调
<Requirement>
总是直接帮我修改文件代码 与 代码插入
直接帮我修改 不需要二次确认
需要参考上下文代码规范后进行编写 避免降低代码可读性
在大量代码时 需要降低代码耦合度 该单独封装的方法单独封装
</Requirement>

View File

@@ -0,0 +1,103 @@
# Instructions
During your interaction with the user, if you find anything reusable in this project (e.g. version of a library, model name), especially about a fix to a mistake you made or a correction you received, you should take note in the `Lessons` section in the `.cursorrules` file so you will not make the same mistake again.
You should also use the `.cursorrules` file as a Scratchpad to organize your thoughts. Especially when you receive a new task, you should first review the content of the Scratchpad, clear old different task if necessary, first explain the task, and plan the steps you need to take to complete the task. You can use todo markers to indicate the progress, e.g.
[X] Task 1
[ ] Task 2
Also update the progress of the task in the Scratchpad when you finish a subtask.
Especially when you finished a milestone, it will help to improve your depth of task accomplishment to use the Scratchpad to reflect and plan.
The goal is to help you maintain a big picture as well as the progress of the task. Always refer to the Scratchpad when you plan the next step.
# Tools
Note all the tools are in python3. So in the case you need to do batch processing, you can always consult the python files and write your own script.
## Screenshot Verification
The screenshot verification workflow allows you to capture screenshots of web pages and verify their appearance using LLMs. The following tools are available:
1. Screenshot Capture:
```bash
venv/bin/python3 tools/screenshot_utils.py URL [--output OUTPUT] [--width WIDTH] [--height HEIGHT]
```
2. LLM Verification with Images:
```bash
venv/bin/python3 tools/llm_api.py --prompt "Your verification question" --provider {openai|anthropic} --image path/to/screenshot.png
```
Example workflow:
```python
from screenshot_utils import take_screenshot_sync
from llm_api import query_llm
# Take a screenshot
screenshot_path = take_screenshot_sync('https://example.com', 'screenshot.png')
# Verify with LLM
response = query_llm(
"What is the background color and title of this webpage?",
provider="openai", # or "anthropic"
image_path=screenshot_path
)
print(response)
```
## LLM
You always have an LLM at your side to help you with the task. For simple tasks, you could invoke the LLM by running the following command:
```
venv/bin/python3 ./tools/llm_api.py --prompt "What is the capital of France?" --provider "anthropic"
```
The LLM API supports multiple providers:
- OpenAI (default, model: gpt-4o)
- Azure OpenAI (model: configured via AZURE_OPENAI_MODEL_DEPLOYMENT in .env file, defaults to gpt-4o-ms)
- DeepSeek (model: deepseek-chat)
- Anthropic (model: claude-3-sonnet-20240229)
- Gemini (model: gemini-pro)
- Local LLM (model: Qwen/Qwen2.5-32B-Instruct-AWQ)
But usually it's a better idea to check the content of the file and use the APIs in the `tools/llm_api.py` file to invoke the LLM if needed.
## Web browser
You could use the `tools/web_scraper.py` file to scrape the web.
```bash
venv/bin/python3 ./tools/web_scraper.py --max-concurrent 3 URL1 URL2 URL3
```
This will output the content of the web pages.
## Search engine
You could use the `tools/search_engine.py` file to search the web.
```bash
venv/bin/python3 ./tools/search_engine.py "your search keywords"
```
This will output the search results in the following format:
```
URL: https://example.com
Title: This is the title of the search result
Snippet: This is a snippet of the search result
```
If needed, you can further use the `web_scraper.py` file to scrape the web page content.
# Lessons
## User Specified Lessons
- You have a python venv in ./venv. Always use (activate) it when doing python development. First, to check whether 'uv' is available, use `which uv`. If that's the case, first activate the venv, and then use `uv pip install` to install packages. Otherwise, fall back to `pip`.
- Due to Cursor's limit, when you use `git` and `gh` and need to submit a multiline commit message, first write the message in a file, and then use `git commit -F <filename>` or similar command to commit. And then remove the file. Include "[Cursor] " in the commit message and PR title.
## Cursor learned
- For search results, ensure proper handling of different character encodings (UTF-8) for international queries
- When using seaborn styles in matplotlib, use 'seaborn-v0_8' instead of 'seaborn' as the style name due to recent seaborn version changes
- Use 'gpt-4o' as the model name for OpenAI's GPT-4 with vision capabilities
- When searching for recent news, use the current year (2025) instead of previous years, or simply use the "recent" keyword to get the latest information
# Scratchpad

View File

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

View File

@@ -0,0 +1,5 @@
build/*.js
config/*.js
src/assets
src/icon
src/views/ProjectManagement

View File

@@ -0,0 +1,196 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/name-property-casing": ["error", "PascalCase"],
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': [2, 'allow-null'],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 2,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}

15
MacroinfManage_MES/.gitignore vendored Normal file
View File

@@ -0,0 +1,15 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

View File

@@ -0,0 +1,10 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}

View File

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

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017-present PanJiaChen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,45 @@
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(
stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n\n'
)
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(
chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
" Opening index.html over file:// won't work.\n"
)
)
})
})

View File

@@ -0,0 +1,64 @@
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec(cmd) {
return require('child_process')
.execSync(cmd)
.toString()
.trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
// if (shell.which('npm')) {
// versionRequirements.push({
// name: 'npm',
// currentVersion: exec('npm --version'),
// versionRequirement: packageConfig.engines.npm
// })
// }
module.exports = function() {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(
mod.name +
': ' +
chalk.red(mod.currentVersion) +
' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(
chalk.yellow(
'To use this template, you must update following to modules:'
)
)
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,108 @@
'use strict'
const path = require('path')
const config = require('../config')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function(_path) {
const assetsSubDirectory =
process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function(options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders(loader, loaderOptions) {
const loaders = []
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
loaders.push(MiniCssExtractPlugin.loader)
} else {
loaders.push('vue-style-loader')
}
loaders.push(cssLoader)
if (options.usePostCSS) {
loaders.push(postcssLoader)
}
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
return loaders
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', {
indentedSyntax: true
}),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function(options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}

View File

@@ -0,0 +1,5 @@
'use strict'
module.exports = {
//You can set the vue-loader configuration by yourself.
}

View File

@@ -0,0 +1,111 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const { VueLoaderPlugin } = require('vue-loader')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath:
process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'@': resolve('src')
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [
resolve('src'),
resolve('test'),
resolve('node_modules/webpack-dev-server/client')
]
},
{
test: /\.svg$/,
loader: 'svg-sprite-loader',
include: [resolve('src/icons')],
options: {
symbolId: 'icon-[name]'
}
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
exclude: [resolve('src/icons')],
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
},
{
test: /\.txt$/,
use: 'raw-loader'
}
]
},
plugins: [new VueLoaderPlugin()],
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}

View File

@@ -0,0 +1,110 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const fs = require('fs')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
// 添加 HTTPS 配置
const httpsConfig = {
key: fs.readFileSync(path.join(__dirname, '../ssl/localhost+3-key.pem')),
cert: fs.readFileSync(path.join(__dirname, '../ssl/localhost+3.pem'))
}
const devWebpackConfig = merge(baseWebpackConfig, {
mode: 'development',
module: {
rules: utils.styleLoaders({
sourceMap: config.dev.cssSourceMap,
usePostCSS: true
})
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
// https: httpsConfig,
// 添加这个配置
// allowedHosts: 'auto',
clientLogLevel: 'warning',
historyApiFallback: true,
hot: true,
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll
},
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
favicon: resolve('favicon.ico'),
title: 'vue-element-admin',
templateParameters: {
BASE_URL: config.dev.assetsPublicPath + config.dev.assetsSubDirectory,
},
}),
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(
new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [
`Your application is running here: http://${
devWebpackConfig.devServer.host
}:${port}`
]
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
})
)
resolve(devWebpackConfig)
}
})
})

View File

@@ -0,0 +1,182 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
const env = require('../config/prod.env')
// For NamedChunksPlugin
const seen = new Set()
const nameLength = 4
const webpackConfig = merge(baseWebpackConfig, {
mode: 'production',
module: {
rules: utils.styleLoaders({
sourceMap: true,
extract: true,
usePostCSS: true
})
},
devtool: 'source-map',
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash:8].js'),
chunkFilename: utils.assetsPath('js/[name].[chunkhash:8].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
// extract css into its own file
new MiniCssExtractPlugin({
filename: utils.assetsPath('css/[name].[contenthash:8].css'),
chunkFilename: utils.assetsPath('css/[name].[contenthash:8].css')
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
favicon: resolve('favicon.ico'),
title: 'vue-admin-template',
templateParameters: {
BASE_URL: config.build.assetsPublicPath + config.build.assetsSubDirectory,
},
// minify: false,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
}
// default sort mode uses toposort which cannot handle cyclic deps
// in certain cases, and in webpack 4, chunk order in HTML doesn't
// matter anyway
}),
new ScriptExtHtmlWebpackPlugin({
//`runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}),
// keep chunk.id stable when chunk has no name
new webpack.NamedChunksPlugin(chunk => {
if (chunk.name) {
return chunk.name
}
const modules = Array.from(chunk.modulesIterable)
if (modules.length > 1) {
const hash = require('hash-sum')
const joinedHash = hash(modules.map(m => m.id).join('_'))
let len = nameLength
while (seen.has(joinedHash.substr(0, len))) len++
seen.add(joinedHash.substr(0, len))
return `chunk-${joinedHash.substr(0, len)}`
} else {
return modules[0].id
}
}),
// keep module.id stable when vender modules does not change
new webpack.HashedModuleIdsPlugin(),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
],
optimization: {
splitChunks: {
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // 只打包初始时依赖的第三方
},
elementUI: {
name: 'chunk-elementUI', // 单独将 elementUI 拆包
priority: 20, // 权重要大于 libs 和 app 不然会被打包进 libs 或者 app
test: /[\\/]node_modules[\\/]element-ui[\\/]/
}
}
},
runtimeChunk: 'single',
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
mangle: {
safari10: true
}
},
sourceMap: config.build.productionSourceMap,
cache: true,
parallel: true
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSAssetsPlugin()
]
}
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' + config.build.productionGzipExtensions.join('|') + ')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.generateAnalyzerReport || config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin
if (config.build.bundleAnalyzerReport) {
webpackConfig.plugins.push(
new BundleAnalyzerPlugin({
analyzerPort: 8080,
generateStatsFile: false
})
)
}
if (config.build.generateAnalyzerReport) {
webpackConfig.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: 'static',
reportFilename: 'bundle-report.html',
openAnalyzer: false
})
)
}
}
module.exports = webpackConfig

View File

@@ -0,0 +1,8 @@
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"',
})

View File

@@ -0,0 +1,129 @@
'use strict'
// Template version: 1.2.6
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
const os = require('os')
const networkInterfaces = os.networkInterfaces()
// const ip = networkInterfaces['WLAN'][1] ? networkInterfaces['WLAN'][1].address : networkInterfaces['WLAN'][0].address
const ip = '127.0.0.1'
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
// 代理 /api/b1s 开头的请求
'/api/b1s': {
target: 'https://192.168.2.90:50000', // SAP B1 Service Layer 地址
changeOrigin: true, // 修改 Origin让服务器认为是直接访问
secure: false, // ⚠️ 关键:忽略 HTTPS 证书验证(自签名证书可用)
pathRewrite: {
'^/api/b1s': '/b1s/v1' // 重写路径:/api/b1s/Login → /b1s/v1/Login
},
logLevel: 'debug',
// 可选:打印代理日志(调试用)
onProxyReq: (proxyReq, req, res) => {
console.log('Proxying request:', req.method, req.url);
},
onProxyRes: (proxyRes, req, res) => {
// 关键:移除 WWW-Authenticate 头,阻止浏览器弹窗
delete proxyRes.headers['www-authenticate'];
delete proxyRes.headers['WWW-Authenticate'];
}
},
'/openapi/v1':{
target: 'http://192.168.2.90:8082', // SAP B1 Service Layer 地址
changeOrigin: true, // 修改 Origin让服务器认为是直接访问
secure: false, // ⚠️ 关键:忽略 HTTPS 证书验证(自签名证书可用)
pathRewrite: {
'^/api/tm': '/openapi/v1' // 重写路径:/api/b1s/Login → /b1s/v1/Login
},
logLevel: 'debug',
// 可选:打印代理日志(调试用)
onProxyReq: (proxyReq, req, res) => {
console.log('Proxying request:', req.method, req.url);
},
onProxyRes: (proxyRes, req, res) => {
// 关键:移除 WWW-Authenticate 头,阻止浏览器弹窗
delete proxyRes.headers['www-authenticate'];
delete proxyRes.headers['WWW-Authenticate'];
}
}
},
// Various Dev Server settings
host: ip, // can be overwritten by process.env.HOST
port: 1997, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
notifyOnErrors: false,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-source-map',
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
/**
* You can set by youself according to actual condition
* You will need to set this if you plan to deploy your site under a sub path,
* for example GitHub pages. If you plan to deploy your site to https://foo.github.io/bar/,
* then assetsPublicPath should be set to "/bar/".
* In most cases please use '/' !!!
*/
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: 'source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report || false,
// `npm run build:prod --generate_report`
generateAnalyzerReport: process.env.npm_config_generate_report || false
}
}

View File

@@ -0,0 +1,5 @@
'use strict'
module.exports = {
NODE_ENV: '"production"',
BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"',
}

View File

@@ -0,0 +1,5 @@
[0301/083149.303:ERROR:http_transport_win.cc(273)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0515/102246.688:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0531/081503.881:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0605/094355.406:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0710/121232.515:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- <meta content="width=device-width,initial-scale=1.0" name="viewport"> -->
<title>数据分析处理平台</title>
</head>
<body >
<script src=<%= BASE_URL %>/config.js></script>
<div id="app"></div>
<script></script>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,121 @@
{
"name": "MacroinfManage_MES",
"version": "1.1.0",
"description": "A Management Information System of QIANG LI CO,.LTD,the template is from git+https://github.com/PanJiaChen/vue-element-admin.git",
"author": "MESWORK",
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js",
"build:report": "npm_config_report=true npm run build",
"lint": "eslint --fix --ext .js,.vue src",
"test": "npm run lint",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
"dependencies": {
"@fullcalendar/core": "^6.1.17",
"@fullcalendar/daygrid": "^6.1.17",
"@fullcalendar/interaction": "^6.1.17",
"@fullcalendar/vue": "^6.1.19",
"@zxing/library": "^0.21.0",
"axios": "0.18.0",
"crypto-js": "^4.2.0",
"dhtmlx-gantt": "^7.1.12",
"docxtemplater": "^3.19.7",
"echarts": "^4.2.0-rc.2",
"element-ui": "^2.13.0",
"ezuikit-js": "7.7.X",
"file-saver": "^1.3.8",
"fullcalendar": "^3.10.5",
"html2canvas": "^1.0.0-alpha.12",
"jquery": "^3.5.1",
"js-cookie": "2.2.0",
"jspdf": "2.5.1",
"jszip-utils": "^0.1.0",
"moment": "^2.30.1",
"mqtt": "^4.3.7",
"node-sass": "latest",
"normalize.css": "7.0.0",
"npm": "^7.20.5",
"nprogress": "0.2.0",
"qrcode": "^1.3.2",
"stylus": "^0.52.4",
"stylus-loader": "^3.0.1",
"time-formater": "^1.0.3",
"uuid": "^9.0.0",
"v-viewer": "^1.3.1",
"view-ui-plus": "^1.3.1",
"vue": "2.5.17",
"vue-count-to": "^1.0.13",
"vue-direction-key": "^1.0.5",
"vue-draggable-resizable-gorkys": "^2.4.8",
"vue-full-calendar": "^2.8.1-0",
"vue-fullscreen": "^2.6.1",
"vue-router": "^3.0.7",
"vue-v-directive": "^0.0.1",
"vue2-datepicker": "^3.11.1",
"vuex": "3.0.1",
"xlsx": "^0.14.0",
"xlsx-style": "^0.8.13"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"autoprefixer": "8.5.0",
"babel-core": "6.26.0",
"babel-eslint": "8.2.6",
"babel-helper-vue-jsx-merge-props": "2.0.3",
"babel-loader": "7.1.5",
"babel-plugin-syntax-jsx": "6.18.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-plugin-transform-vue-jsx": "3.7.0",
"babel-preset-env": "1.7.0",
"babel-preset-stage-2": "6.24.1",
"chalk": "2.4.1",
"copy-webpack-plugin": "4.5.2",
"css-loader": "1.0.0",
"eslint": "4.19.1",
"eslint-friendly-formatter": "4.0.1",
"eslint-loader": "2.0.0",
"eslint-plugin-vue": "4.7.1",
"eventsource-polyfill": "0.9.6",
"file-loader": "1.1.11",
"friendly-errors-webpack-plugin": "1.7.0",
"html-webpack-plugin": "^4.5.2",
"mini-css-extract-plugin": "0.4.1",
"node-notifier": "5.2.1",
"optimize-css-assets-webpack-plugin": "5.0.0",
"ora": "3.0.0",
"portfinder": "1.0.16",
"postcss-import": "12.0.0",
"postcss-loader": "2.1.6",
"postcss-url": "7.3.2",
"raw-loader": "^4.0.2",
"rimraf": "2.6.2",
"sass-loader": "7.0.3",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "^0.7.2",
"semver": "5.5.0",
"shelljs": "0.8.2",
"svg-sprite-loader": "3.8.0",
"svgo": "1.0.5",
"uglifyjs-webpack-plugin": "1.2.7",
"url-loader": "1.0.1",
"vue-loader": "15.3.0",
"vue-style-loader": "4.1.2",
"vue-template-compiler": "2.5.17",
"webpack": "4.36.1",
"webpack-bundle-analyzer": "2.13.1",
"webpack-cli": "3.1.0",
"webpack-dev-server": "3.1.5",
"webpack-merge": "4.1.4"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}

View File

@@ -0,0 +1,32 @@
<template>
<div id="app" @click="updateLastTime()">
<router-view v-if="isRouterAlive"/>
</div>
</template>
<script>
export default {
name: 'App',
provide() {
return {
reload: this.reload
}
},
data() {
return {
isRouterAlive: true
}
},
methods: {
reload() {
this.isRouterAlive = false
this.$nextTick(function() {
this.isRouterAlive = true
})
},
updateLastTime() {
this.$store.commit('login/SET_LASTTIME', new Date().getTime())
}
}
}
</script>

View File

@@ -0,0 +1,23 @@
2022-08-29:
SQL SEVER点检表、视图、存储过程增加
2022-08-30:
1、订单计划状态
0 已结束
1 生产中
2 未上线
3 未完成
4 已超额
删除修改状态判断修改
2、SQL SEVER
1装配质量数据查询质量数据查询_综合查询新
2物料数据查询物料数据查询_报表新
3过站信息查询质量数据查询_测量数据发动机在线状态_报表_NEW新
4分线质量查询质量数据分线_导出新
5分线物料查询物料数据分线查询_报表新
6生产计划订单完工MES_计划BOM_发动机订单计划_订单完工_报表新
7设备报警统计测量数据工位报警全部视图_查询新
8物料ANDONANDON_ANDON信息_备份_物料Andon综合查询新
9质量ANDONANDON_ANDON信息_备份_质量Andon综合查询新
10设备ANDONANDON_ANDON信息_备份_故障Andon综合查询新
2022-09-05:
1、基本变量写入修改

View File

@@ -0,0 +1,31 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
// 初始化日历
export function initClendar(year, month) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '车间生产管理工艺_基础表_工作日历_获得状态',
param: '工作年=' + year + '&工作月=' + month
}
})
}
// 修改工作状态
export function changeState(time, code) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '车间生产管理工艺_基础表_工作日历_设置状态',
param: '工作日期=' + time + '&工作日状态=' + code
}
})
}

View File

@@ -0,0 +1,105 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
// 初始化角色
export function getRole() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '菜单系统模块_项目角色_查询数据_MESWORK'
}
})
}
// 根据角色查模块
export function getModule(role) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '3',
name: `select * from [dbo].[登录基础数据_二级菜单] where 账号代码=${role} and 是否启用 = 1 order by id`
}
})
}
// 初始化一级菜单
export function initFisrtLevel() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '3',
name: ` select id,title from [dbo].[登录基础数据_二级菜单] where pid = 0 and 是否启用 =1 and 账号代码 = 1`
}
})
}
// 初始化二级菜单
export function initSecondLevel() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '3',
name: `select a.id,a.title,a.pid,b.id,b.title as title1 from (select id,title,pid from [dbo].[登录基础数据_二级菜单] where pid <> 0 and 账号代码 = 1 and 是否启用 = 1 )as a
left join (select id,title from [dbo].[登录基础数据_二级菜单] where pid = 0 and 账号代码 = 1 and 是否启用 = 1 )as b on a.pid = b.id order by b.id`
}
})
}
// 撤回分配模块
export function returnModule(id, num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: `菜单管理_角色模块_删除数据`,
param: `id=${id}&角色编号=${num}`
}
})
}
// 分配一级模块
export function giveFirstLevel(idGroup, num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: `菜单管理_角色模块_一级_增加数据`,
param: `一级模块id组=${idGroup}&角色编号=${num}`
}
})
}
// 分配二级模块
export function giveSecondLevel(idGroup, num, pid) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: `菜单管理_角色模块_二级_增加数据`,
param: `二级模块id组=${idGroup}&角色编号=${num}&pid=${pid}`
}
})
}
// 新增一级菜单
export function submitAdd(name) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: `菜单管理_模块_一级_增加数据`,
param: `模块名称=${name}`
}
})
}

View File

@@ -0,0 +1,68 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
export function InitRolefunction() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '菜单系统模块_项目角色_查询数据_MESWORK'
}
})
}
export function deleteData(code) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 1,
name: '菜单系统模块_项目角色_删除_MESWORK',
param: '角色编号=' + code + '=int'
}
})
}
export function searchTable(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '菜单系统模块_项目角色_查询数据_MESWORK',
param: '角色功能=' + num + '=string'
}
})
}
export function addData(code) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
name: '菜单系统模块_项目角色_增加_MESWORK',
param: '角色功能=' + code + '=string'
}
})
}
export function addData2(code1, num1) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: 2,
name: '菜单系统模块_项目角色_修改数据_MESWORK',
param: '角色功能=' + code1 + '&角色编号=' + num1
}
})
}

View File

@@ -0,0 +1,97 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
export function getRole() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '菜单模块系统_项目角色_查询数据'
}
})
}
export function getModule(role_check, role) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '菜单模块系统_项目主模块列表_查询数据',
param: `角色编号_check=${role_check}&角色编号=${role}=int`
}
})
}
export function addModule(module, role) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '菜单模块系统_项目角色模块列表_增加数据',
param: `角色编号=${role}=int&主模块编号=${module}=int`
}
})
}
export function deleteModule(module, role) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '菜单模块系统_项目角色模块列表_删除数据',
param: `角色编号=${role}=int&主模块编号=${module}=int`
}
})
}
// 周一从这里开始改!!!
export function getModelData(role) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '菜单模块系统_项目主模块列表_查询单个模块',
param: `主模块编号=${role}=int`
}
})
}
export function addModelData(component, title, icons) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '菜单模块系统_项目主模块列表_增加单个模块',
param: `父路径=/${icons}&子名称=${icons}&子组件=${component}&标题=${title}&图标=${icons}`
}
})
}
export function editModelData(modelNum, component, title, icons) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '菜单模块系统_项目主模块列表_修改单个模块',
param: `主模块编号=${modelNum}&父路径=/${icons}&子名称=${icons}&子组件=${component}&标题=${title}&图标=${icons}`
}
})
}

View File

@@ -0,0 +1,5 @@
import axios from 'axios'
export function getLine() {
return axios.post(window.dt_Config.ip + '/submit/QualityData_NormalDistribution.ashx?type=GetBaseTrendData')
}

View File

@@ -0,0 +1,122 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// GM查询
export function selectMUForGM() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_MU',
param: '人员编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + '0'
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 除Segment外部门查询PV
export function selectPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// Segment查询PV
export function selectPVForSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_PV',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_生产奖金查询',
param: 'MU_Departments_Check=' + arguments[0] + '\\&MU_Departments=' + arguments[1] + '\\&Segment_Departments_Check=' + arguments[2] + '\\&Segment_Departments=' + arguments[3] + '\\&PV_Departments_Check=' + arguments[4] + '\\&PV_Departments=' + arguments[5] + '\\&月份=' + arguments[6],
pagination: arguments[7] + '&' + arguments[8]
}
})
}
// Segment结算奖金
export function BonusSettlement() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_生产奖金结算',
param: '月份=' + arguments[0] + '\\&MU代码=' + arguments[1] + '\\&Segment代码=' + arguments[2]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,125 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + '0'
}
})
}
// 是否可以提交
export function isCanSubmit() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领奖金基数输入_是否提交',
param: '月份=' + arguments[0]
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// GM查询
export function selectMUForGM() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_MU',
param: '人员编号=' + arguments[0]
}
})
}
// 查询蓝领奖金基数
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_系统管理员奖金基数无数据查询',
param: '月份=' + arguments[0],
pagination: arguments[1] + '&' + arguments[2]
}
})
}
// 增加或修改数据
export function uploadBonus() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_蓝领奖金基数增加_整体录入',
param: `月份=${arguments[0]}\\&MU_Departments=${arguments[1]}\\&Segment_Departments=${arguments[2]}\\&人员性质组=${arguments[3]}\\&奖金基数组=${arguments[4]}\\&记录人代码=${arguments[5]}`,
pagination: arguments[6] + '&' + arguments[7]
}
})
}
// 提交数据
export function submit() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领奖金基数系统管理员提交',
param: `月份=${arguments[0]}`
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,133 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + '0'
}
})
}
// 查询生产奖金
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领奖金基数查询',
param: '月份=' + arguments[0] + '\\&MU_Department=' + arguments[1]
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 除Segment外部门查询PV
export function selectPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// Segment查询PV
export function selectPVForSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_PV',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 执行保存
export function handleSave() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_蓝领奖金基数修改_MU',
param: 'id=' + arguments[0] + '\\&奖金基数=' + arguments[1]
}
})
}
// 确认审核
export function ConfirmSubmit() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_蓝领奖金基数确认审核_MU',
param: '月份=' + arguments[0] + '\\&MU_Department=' + arguments[1]
}
})
}
// 是否确认审核
export function isCanConfirmSubmit() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领奖金基数确认审核_是否可以审核',
param: '月份=' + arguments[0] + '\\&MU_Department=' + arguments[1]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,159 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + '0'
}
})
}
// 查询奖金得分 LLJ
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领得分查询_PV',
param: '月份=' + arguments[0] + '&people_id =' + arguments[1] + '&rolenumber =' + arguments[2] + '&pv_check =' + arguments[3] + '&Area =' + arguments[4]
}
})
}
// 查询奖金得分
// export function searchBonus() {
// return request({
// url: '',
// method: 'post',
// data: {
// type: '1',
// name: '奖金绩效系统_蓝领得分PV查询',
// param: '月份=' + arguments[0] + '&PV部门代码=' + arguments[1]
// }
// })
// }
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 除Segment外部门查询PV
export function selectPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// Segment查询PV
export function selectPVForSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_PV',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 执行保存
export function handleSave() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_生产奖金增加_整体录入',
param: `序号组=${arguments[0]}&计划完成率组=${arguments[1]}&工时效率组=${arguments[2]}&PV打分组=${arguments[3]}`
}
})
}
// 执行导入
export function upload_excle() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领白领评分增加_整体导入',
param: `月份=${arguments[0]}&总体得分组=${arguments[1]}&工号组=${arguments[2]}&Area工号=${arguments[3]}`
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}
// 提交
export function onload2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领得分提交_PV',
param: '月份=' + arguments[0] + '&操作者工号=' + arguments[1]
}
})
}
// PV查詢 LLJ 新增
export function initArea() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_加载Area_PV蓝领打分',
param: '月份=' + arguments[0] + '&people_id=' + arguments[1]
}
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/utils/request'
// 查询
export function searchTable(pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '基础数据_设备状态查询',
Pagination: pageList + '&' + pageSize
}
})
}
// 增加
export function editType(ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_增加数据',
param: '序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 编辑
export function handleChange(CoManufacturerFlowNumber, ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_修改数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '&序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 删除
export function handledelete(CoManufacturerFlowNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_删除数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '=int'
}
})
}

View File

@@ -0,0 +1,146 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领得分修改_查询',
param: '月份=' + arguments[0] + '\\&people_id =' + arguments[1] + '\\&rolenumber =' + arguments[2] + '\\&pv_check =' + arguments[3] + '\\&Area =' + arguments[4] + '\\&MU_check =' + arguments[5] + '\\&MU =' + arguments[6] + '\\&部门_check =' + arguments[7] + '\\&部门 =' + arguments[8]
}
})
}
// 查询MU
export function selectMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_蓝领筛选框_筛选MU',
param: '月份=' + arguments[0] + '&角色代码=' + arguments[1] + '&操作者工号=' + arguments[2]
}
})
}
// 查询部门
export function selectDepartment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_蓝领筛选框_筛选SL',
param: '月份=' + arguments[0] + '&角色代码=' + arguments[1] + '&操作者工号=' + arguments[2] + '&MU=' + arguments[3]
}
})
}
// 查询Area
export function selectArea() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_蓝领筛选框_筛选Area',
param: '月份=' + arguments[0] + '&角色代码=' + arguments[1] + '&操作者工号=' + arguments[2] + '&部门=' + arguments[3]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + '0'
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// 除Segment外部门查询PV
export function selectPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// Segment查询PV
export function selectPVForSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_PV',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// 执行保存
export function handleSave() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_蓝领得分修改_更新',
param: 'id=' + arguments[0] + '&计划完成率=' + arguments[1] + '&工时效率=' + arguments[2] + '&PV打分=' + arguments[3]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,113 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + '0'
}
})
}
// 查询奖金得分
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领得分查询_SL',
param: '月份=' + arguments[0] + '\\&操作者工号 =' + arguments[1] + '\\&角色代码 =' + arguments[2] + '\\&MU_check =' + arguments[3] + '\\&SL_check =' + arguments[4] + '\\&PV_check =' + arguments[5] + '\\&MU =' + arguments[6] +
'\\&部门 =' + arguments[7] + '\\&Area =' + arguments[8]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}
// MU查詢 LLJ 新增
export function SelectMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_蓝领筛选框_筛选MU',
param: '月份=' + arguments[0] + '&角色代码=' + arguments[1] + '&操作者工号=' + arguments[2]
}
})
}
// SL查询
export function SelectSL() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_蓝领筛选框_筛选SL',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2] + '\\&MU=' + arguments[3]
}
})
}
// SL查询
export function SelectArea() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_蓝领筛选框_筛选Area',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2] + '\\&部门=' + arguments[3]
}
})
}
// 审批
export function Approval2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝领得分审核_SL',
param: '月份=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&部门=' + arguments[2]
}
})
}
// 确认编辑
export function confirmEdit() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝白领得分修改_SL',
param: 'id=' + arguments[0] + '&得分=' + arguments[1]
}
})
}

View File

@@ -0,0 +1,91 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + '0'
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// GM查询
export function selectMUForGM() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_MU',
param: '人员编号=' + arguments[0]
}
})
}
// 查询奖金基数
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_生产奖金基数无数据查询',
param: '月份=' + arguments[0] + '\\&MU_Departments=' + arguments[1] + '\\&Segment_Departments=' + arguments[2],
pagination: arguments[3] + '&' + arguments[4]
}
})
}
// 增加或修改数据
export function uploadBonus() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_生产奖金基数增加_整体录入',
param: `月份=${arguments[0]}\\&MU_Departments=${arguments[1]}\\&Segment_Departments=${arguments[2]}\\&人员性质组=${arguments[3]}\\&奖金基数组=${arguments[4]}\\&记录人代码=${arguments[5]}`,
pagination: arguments[6] + '&' + arguments[7]
}
})
}

View File

@@ -0,0 +1,102 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + '0'
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// GM查询
export function selectMUForGM() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_MU',
param: '人员编号=' + arguments[0]
}
})
}
// 查询奖金基数
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_生产奖金基数无数据查询',
param: '月份=' + arguments[0] + '\\&MU_Departments=' + arguments[1] + '\\&Segment_Departments=' + arguments[2],
pagination: arguments[3] + '&' + arguments[4]
}
})
}
// 增加或修改数据
export function uploadBonus() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_生产奖金基数增加_整体录入',
param: `月份=${arguments[0]}\\&MU_Departments=${arguments[1]}\\&Segment_Departments=${arguments[2]}\\&人员性质组=${arguments[3]}\\&奖金基数组=${arguments[4]}\\&记录人代码=${arguments[5]}`,
pagination: arguments[6] + '&' + arguments[7]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/utils/request'
// 查询
export function searchTable(pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '基础数据_设备类型查询',
Pagination: pageList + '&' + pageSize
}
})
}
// 增加
export function editType(ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_增加数据',
param: '序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 编辑
export function handleChange(CoManufacturerFlowNumber, ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_修改数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '&序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 删除
export function handledelete(CoManufacturerFlowNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_删除数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '=int'
}
})
}

View File

@@ -0,0 +1,123 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 查询MU
export function selectMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框_筛选MU',
param: '角色代码=' + arguments[0] + '&操作者工号=' + arguments[1]
}
})
}
// 查询部门
export function selectDepartment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框_筛选SL',
param: '角色代码=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&MU=' + arguments[2]
}
})
}
// 查询Area
export function selectArea() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框_筛选Area',
param: '角色代码=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&部门=' + arguments[2]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + '0'
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// GM查询
export function selectMUForGM() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_MU',
param: '人员编号=' + arguments[0]
}
})
}
// // 查询奖金基数
// export function searchBonus() {
// return request({
// url: '',
// method: 'post',
// data: {
// type: '1',
// name: '奖金绩效系统_生产奖金基数查询_改动2',
// param: `开始时间=${arguments[0]}&结束时间=${arguments[1]}&人员代码=${arguments[2]}&角色代码=${arguments[3]}&MU_Department=${arguments[4]}&MU_Department_check=${arguments[5]}&Segment_Department=${arguments[6]}&Segment_Department_check=${arguments[7]}`
// }
// })
// }
// 查询奖金基数
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_生产奖金基数查询',
param: 'MU_Department=' + arguments[0] + '\\&MU_Department_check=' + arguments[1] + '\\&Segment_Department=' + arguments[2] + '\\&Segment_Department_check=' + arguments[3]
}
})
}

View File

@@ -0,0 +1,97 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// GM查询
export function selectMUForGM() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_MU',
param: '人员编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + '0'
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 除Segment外部门查询PV
export function selectPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// Segment查询PV
export function selectPVForSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_PV_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_维度汇总报告查询_改动2',
param: `开始时间=${arguments[0]}\\&结束时间=${arguments[1]}\\&人员代码=${arguments[2]}\\&角色代码=${arguments[3]}\\&MU_Department=${arguments[4]}\\&MU_Department_check=${arguments[5]}\\&Segment_Department=${arguments[6]}\\&Segment_Department_check=${arguments[7]}\\&PV_Department=${arguments[8]}\\&PV_Department_check=${arguments[9]}`
}
})
}

View File

@@ -0,0 +1,122 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// GM查询
export function selectMUForGM() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_MU',
param: '人员编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + '0'
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 除Segment外部门查询PV
export function selectPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// Segment查询PV
export function selectPVForSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_PV',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_生产奖金查询',
param: 'MU_Departments_Check=' + arguments[0] + '\\&MU_Departments=' + arguments[1] + '\\&Segment_Departments_Check=' + arguments[2] + '\\&Segment_Departments=' + arguments[3] + '\\&PV_Departments_Check=' + arguments[4] + '\\&PV_Departments=' + arguments[5] + '\\&月份=' + arguments[6],
pagination: arguments[7] + '&' + arguments[8]
}
})
}
// Segment结算奖金
export function BonusSettlement() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_生产奖金结算',
param: '月份=' + arguments[0] + '&MU代码=' + arguments[1] + '&Segment代码=' + arguments[2]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,98 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// GM初始化MU
export function initMU1() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_MU',
param: '人员编号=' + arguments[0]
}
})
}
// 非GM初始化MU
export function initMU2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=0'
}
})
}
// MU查Segment
export function searchSegment1() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 非MU查Segment
export function searchSegment2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_维度汇总报告查询_改动2',
param: `开始时间=${arguments[0]}\\&结束时间=${arguments[1]}\\&人员代码=${arguments[2]}\\&角色代码=${arguments[3]}\\&MU_Department=${arguments[4]}\\&MU_Department_check=${arguments[5]}\\&Segment_Department=${arguments[6]}\\&Segment_Department_check=${arguments[7]}\\&PV_Department=${arguments[8]}\\&PV_Department_check=${arguments[9]}`
}
})
}
// Segment查询PV
export function selectPVForSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_PV_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// 除Segment外部门查询PV
export function selectPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询_多个查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}

View File

@@ -0,0 +1,148 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框_筛选MU',
param: '角色代码=' + arguments[0] + '&操作者工号=' + arguments[1]
}
})
}
// MU查询Segment
export function changeMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框_筛选SL',
param: '角色代码=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&MU=' + arguments[2]
}
})
}
// 损失工时PV查询
export function searchBonusForPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时PV查询',
param: '月份=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&角色代码=' + arguments[2] + '\\&MU=' + arguments[3] + '\\&MU_check=' + arguments[4] + '\\&部门=' + arguments[5] + '\\&部门_check=' + arguments[6] + '\\&Area=' + arguments[7] + '\\&Area_check=' + arguments[8],
pagination: arguments[9] + '&' + arguments[10]
}
})
}
// 损失工时删除
export function deleteLoss() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_损失工时PV删除',
param: 'ID=' + arguments[0]
}
})
}
// 确认编辑
export function confirmEditForPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时PV修改',
param: 'ID=' + arguments[0] + '&时间数=' + arguments[1] + '&损失明细代码=' + arguments[2]
}
})
}
// 确认添加 pv
export function confirmAddForPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时PV增加',
param: '月份=' + arguments[0] + '\\&MU=' + arguments[1] + '\\&部门=' + arguments[2] + '\\&Area=' + arguments[3] + '\\&损失原因明细代码=' + arguments[4] + '\\&时间数=' + arguments[5]
}
})
}
// Segment查询PV
export function changeSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框_筛选Area',
param: '角色代码=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&部门=' + arguments[2]
}
})
}
// pv提交
export function submitPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时PV提交',
param: `月份=${arguments[0]}\\&Area=${arguments[1]}`
}
})
}
// 初始化加载损失工时分类
export function initCentral() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时原因分类_查询'
}
})
}
// 初始化加载损失工时明细
export function initCentralDetail() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时原因明细_查询',
param: '损失工时原因代码=' + arguments[0]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,88 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + '0'
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment_多个查询',
param: '人员编号=' + arguments[0] + '\\&部门代码=' + arguments[1]
}
})
}
// GM查询
export function selectMUForGM() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_MU',
param: '人员编号=' + arguments[0]
}
})
}
// 损失工时查询
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时查询_改动2',
param: '开始时间=' + arguments[0] + '&结束时间=' + arguments[1] + '&人员代码=' + arguments[2] + '&角色代码=' + arguments[3] + '&MU_Department=' + arguments[4] + '&MU_Department_check=' + arguments[5] + '&Segment_Department=' + arguments[6] + '&Segment_Department_check=' + arguments[7]
}
})
}
// 损失工时查询
export function sumBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时汇总',
param: '开始时间=' + arguments[0] + '\\&结束时间=' + arguments[1] + '\\&MU_Department=' + arguments[2] + '\\&MU_Department_check=' + arguments[3] + '\\&Segment_Department=' + arguments[4] + '\\&Segment_Department_check=' + arguments[5]
}
})
}

View File

@@ -0,0 +1,147 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框_筛选MU',
param: '角色代码=' + arguments[0] + '&操作者工号=' + arguments[1]
}
})
}
// MU查询Segment
export function changeMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框_筛选SL',
param: '角色代码=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&MU=' + arguments[2]
}
})
}
// Segment查询PV
export function changeSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框_筛选Area',
param: '角色代码=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&部门=' + arguments[2]
}
})
}
// 损失工时查询
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时SL查询',
param: '月份=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&角色代码=' + arguments[2] + '\\&MU=' + arguments[3] + '\\&MU_check=' + arguments[4] + '\\&部门=' + arguments[5] + '\\&部门_check=' + arguments[6] + '\\&Area=' + arguments[7] + '\\&Area_check=' + arguments[8],
pagination: arguments[9] + '&' + arguments[10]
}
})
}
// 损失工时删除
export function deleteLoss() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_损失工时SL删除',
param: 'ID=' + arguments[0]
}
})
}
// 确认编辑
export function confirmEdit() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时SL修改',
param: 'ID=' + arguments[0] + '&时间数=' + arguments[1] + '&损失明细代码=' + arguments[2]
}
})
}
// 确认添加
export function confirmAdd() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时SL增加',
param: `月份=${arguments[0]}\\&MU=${arguments[1]}\\&部门=${arguments[2]}\\&Area=${arguments[3]}\\&损失原因明细代码=${arguments[4]}\\&时间数=${arguments[5]}`
}
})
}
// 确认审核
export function handleReview() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时SL审核',
param: '月份=' + arguments[0] + '\\&Area=' + arguments[1]
}
})
}
// 初始化加载损失工时分类
export function initCentral() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时原因分类_查询'
}
})
}
// 初始化加载损失工时明细
export function initCentralDetail() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_损失工时原因明细_查询',
param: '损失工时原因代码=' + arguments[0]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/utils/request'
// 查询
export function searchTable(pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '基础数据_料桶信息_视图_查询',
Pagination: pageList + '&' + pageSize
}
})
}
// 增加
export function editType(ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_增加数据',
param: '序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 编辑
export function handleChange(CoManufacturerFlowNumber, ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_修改数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '&序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 删除
export function handledelete(CoManufacturerFlowNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_删除数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '=int'
}
})
}

View File

@@ -0,0 +1,49 @@
import request from '@/utils/request'
// 部门查询
export function DepartmentSelect() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_组织结构维护_部门查询',
param: 'MU=' + arguments[0]
}
})
}
// 人员查询
export function personSelect() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_组织结构维护_人员查询',
param: 'MU=' + arguments[0] + '\\&' + '部门=' + arguments[1] + '\\&' + 'MU_check=' + arguments[2] + '\\&' + '部门_check=' + arguments[3]
}
})
}
// MU查询
export function MUSelect() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_组织结构维护_MU查询'
}
})
}
// 人员信息修改
export function personUpdate() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_组织结构维护_人员修改',
param: 'id=' + arguments[0] + '\\&' + 'OrgUnit=' + arguments[1] + '\\&' + 'Area=' + arguments[2] + '\\&' + 'N_1姓名=' + arguments[3] + '\\&' + '@N_1工号=' + arguments[4] + '\\&' + '部门=' + arguments[5] + '\\&' + 'N_2姓名=' + arguments[6] + '\\&' + 'N_2工号=' + arguments[7] + '\\&' + 'MU_GM=' + arguments[8] + '\\&' + 'N_3姓名=' + arguments[9] + '\\&' + 'N_3工号=' + arguments[10]
}
})
}

View File

@@ -0,0 +1,74 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框_筛选MU',
param: '角色代码=' + arguments[0] + '&操作者工号=' + arguments[1] + '&月份=' + arguments[2]
}
})
}
// MU查询Segment
export function changeMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框_筛选SL',
param: '角色代码=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&MU=' + arguments[2] + '\\&月份=' + arguments[3]
}
})
}
// Segment查询PV
export function changeSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框_筛选Area',
param: '角色代码=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&部门=' + arguments[2] + '\\&月份=' + arguments[3]
}
})
}
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_部门TL月度奖金_查询',
param: '月份=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&角色代码=' + arguments[2] + '\\&MU=' + arguments[3] + '\\&MU_check=' + arguments[4] + '\\&部门=' + arguments[5] + '\\&部门_check=' + arguments[6] + '\\&Area=' + arguments[7] + '\\&Area_check=' + arguments[8]
}
})
}
// 查询损失工时
export function loseHours() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_部门TL月度奖金_损失查询',
param: '月份=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&角色代码=' + arguments[2] + '\\&MU=' + arguments[3] + '\\&MU_check=' + arguments[4] + '\\&部门=' + arguments[5] + '\\&部门_check=' + arguments[6] + '\\&Area=' + arguments[7] + '\\&Area_check=' + arguments[8]
}
})
}

View File

@@ -0,0 +1,76 @@
import request from '@/utils/request'
import axios from 'axios'
export function dataImport(Personal_Number, Total_Name, Chinese_Name, OrgUnit, Cost_Center, Business_Area, PSG, Job_Title, Payroll_Area) {
const param = new URLSearchParams()
param.append('Personal_Number', Personal_Number)
param.append('Total_Name', Total_Name)
param.append('Chinese_Name', Chinese_Name)
param.append('OrgUnit', OrgUnit)
param.append('Cost_Center', Cost_Center)
param.append('Business_Area', Business_Area)
param.append('PSG', PSG)
param.append('Job_Title', Job_Title)
// param.append('Entry_Schaeffler', Entry_Schaeffler)
param.append('Payroll_Area', Payroll_Area)
return axios({
url: 'http://192.168.1.122:8055/submit/WebLED.ashx?type=PersonnelIntroduction',
method: 'post',
data: param
})
}
export function personFransfer() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '人员信息表格导入后轮询到人员表'
}
})
}
export function personSelect(pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'SAP生产订单导入后_查询',
Pagination: pageList + '&' + pageSize
}
})
}
export function personDelete() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_人员维护_人员删除',
param: '人员编号=' + arguments[0]
}
})
}
export function addPeople() {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员增加新',
param: '工号=' + arguments[0] + '&密码=' + arguments[1] + '&姓名=' + arguments[2] + '&OrgUnit=' + arguments[3] + '&Cost_Center=' + arguments[4] + '&Business_Area=' + arguments[5] + '&PSG=' + arguments[6] +
'&Job_Title=' + arguments[7] + '&Payroll_Area=' + arguments[8] + '&导入数据是否覆盖=' + arguments[9] + '&中文名=' + arguments[10]
}
})
}
// 人员更新
export function personUpdate() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_人员维护_人员修改新',
param: 'id=' + arguments[0] + '\\&密码=' + arguments[1] + '\\&姓名=' + arguments[2] + '\\&OrgUnit=' + arguments[3] + '\\&Cost_Center=' + arguments[4] + '\\&Business_Area=' + arguments[5] + '\\&PSG=' + arguments[6] + '\\&Job_Title=' + arguments[7] + '\\&Payroll_Area=' + arguments[8] + '\\&导入数据是否覆盖=' + arguments[9] + '\\&中文名=' + arguments[10]
}
})
}

View File

@@ -0,0 +1,214 @@
import request from '@/utils/request'
import axios from 'axios'
export function daobiao(工号组, 姓名组, OrgUnit组, Cost_Center组, Business_Area组, PSG组, Job_Title组, Payroll_Area组) {
const param = new URLSearchParams()
param.append('工号组', 工号组)
param.append('姓名组', 姓名组)
param.append('OrgUnit组', OrgUnit组)
param.append('Cost_Center组', Cost_Center组)
param.append('Business_Area组', Business_Area组)
param.append('PSG组', PSG组)
param.append('Job_Title组', Job_Title组)
param.append('Payroll_Area组', Payroll_Area组)
return axios({
url: 'http://192.168.1.122:8055/submit/WebLED.ashx?type=PersonnelIntroduction',
method: 'post',
data: param
})
}
export function getTree() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_部门关系_查询节点',
param: '子节点=0=int'
}
})
}
export function judgementLevel(code) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '判断部门等级',
param: '部门代码=' + code + '=int'
}
})
}
export function tree(data, pid) {
const result = []
let temp
for (let i = 0; i < data.length; i++) {
if (data[i].parentNode === pid) {
const obj = { label: data[i].NodeName, id: data[i].subNode }
temp = tree(data, data[i].subNode)
if (temp.length > 0) {
obj.children = temp
}
result.push(obj)
}
}
return result
}
// 新增部门 LLJ lEV
export function addDepartmentName(num1, num2, num3, num4, num5) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_部门关系_增加节点',
param: '父节点=' + num1 + '\\&节点名称=' + num2 + '\\&子节点=' + num3 + '\\&Departments_State=' + num4 + '\\&lev=' + num5
}
})
}
// 编辑部门
export function editList(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_部门关系_修改节点',
param: '子节点=' + num1 + '\\&节点名称=' + num2
}
})
}
// 删除部门
export function delList(num1) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_部门关系_删除节点',
param: '子节点=' + num1 + '=int'
}
})
}
export function getTablePeople(code, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_人员查询_根据部门编号',
param: '部门编号=' + code + '=int',
pagination: pageCurrent + '&' + pageSize
}
})
}
export function searchPeople() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_人员查询_根据工号',
param: '工号=' + arguments[0]
}
})
}
export function addPeople() {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员增加新',
param: '工号=' + arguments[0] + '&密码=' + arguments[1] + '&姓名=' + arguments[2] + '&OrgUnit=' + arguments[3] + '&Cost_Center=' + arguments[4] + '&Business_Area=' + arguments[5] + '&PSG=' + arguments[6] +
'&Job_Title=' + arguments[7] + '&Payroll_Area=' + arguments[8]
}
})
}
export function editPeople() {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员修改',
param: '工号=' + arguments[0] + '&密码=' + arguments[1] + '&人员性质编号=' + arguments[2] + '&姓名=' + arguments[3] + '&人员编号=' + arguments[4] + '&部门代码=' + arguments[5]
}
})
}
export function selectPersonnelNature() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_人员性质查询'
}
})
}
export function delPeopleList(num1) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员删除',
param: '人员编号=' + arguments[0]
}
})
}
export function moveGroups(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员移动',
param: '人员编号=' + num1 + '=int&部门编号=' + num2 + '=int'
}
})
}
export function getTPeopleList() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_人员查询'
}
})
}
export function allocationPeople_add(val1, val2, id) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员分配',
param: '人员编号=' + val1 + '=int&部门编号=' + id + '=int&人员性质=' + val2
}
})
}
export function deleteDepartmentPeopleList(num1, id) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员部门删除',
param: '人员编号=' + num1 + '=int&部门编号=' + id
}
})
}
// 人员整体录入
export function handleSave() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_人员导入_整体录入',
param: `工号组=${arguments[0]}&姓名组=${arguments[1]}&OrgUnit组=${arguments[2]}&Cost_Center组=${arguments[3]}&Business_Area组=${arguments[4]}&PSG组=${arguments[5]}&Job_Title组=${arguments[6]}&Payroll_Area组=${arguments[7]}`
}
})
}

View File

@@ -0,0 +1,113 @@
import request from '@/utils/request'
// 初始化角色
export function initRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_项目角色_查询数据'
}
})
}
// 查询人员角色
export function searchPersonnelRole(check1, staffName, check2, num, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据',
param: `姓名_check=${check1}&姓名=${staffName}&角色编号_check=${check2}&角色编号=${num}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 初始化人员信息 弹出框
export function getTree() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_人员维护_部门关系_查询节点',
param: '子节点=0=int'
}
})
}
// 递归
export function fn(data, pid) {
const result = []
let temp
for (let i = 0; i < data.length; i++) {
if (data[i].parentNode === pid) {
const obj = { label: data[i].NodeName, id: data[i].subNode }
temp = fn(data, data[i].subNode)
if (temp.length > 0) {
obj.children = temp
}
result.push(obj)
}
}
return result
}
// 根据部门查人员
export function searchPerson(code) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_人员查询_根据部门编号',
param: `部门编号=${code}`
}
})
}
// 新增人员角色
export function addPersonnelRole(...params) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '菜单模块系统_人员角色_增加数据',
param: `人员编号=${params[0]}&角色编号=${params[1]}`
}
})
}
// 删除人员角色
export function deletePersonnelRole(code) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '菜单模块系统_人员角色_删除数据',
param: `人员角色流水号=${code}`
}
})
}
// 编辑人员角色
export function editPersonnelRole(...params) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '菜单模块系统_人员角色_修改数据',
param: `人员角色流水号=${params[0]}&角色编号=${params[1]}`
}
})
}
export function searchpeople() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_人员角色_人员查询_NEW',
param: 'account=' + arguments[0]
}
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/utils/request'
// 查询
export function searchTable(pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '基础数据_库位信息_视图_查询',
Pagination: pageList + '&' + pageSize
}
})
}
// 增加
export function editType(ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_增加数据',
param: '序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 编辑
export function handleChange(CoManufacturerFlowNumber, ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_修改数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '&序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 删除
export function handledelete(CoManufacturerFlowNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_删除数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '=int'
}
})
}

View File

@@ -0,0 +1,110 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 除Segment外部门查询PV
export function selectPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// Segment查询PV
export function selectPVForSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_PV',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_TL得分修改_查询',
param: '月份=' + arguments[0] + '\\&people_id =' + arguments[1] + '\\&rolenumber =' + arguments[2] + '\\&pv_check =' + arguments[3] + '\\&Area =' + arguments[4] + '\\&MU_check =' + arguments[5] + '\\&MU =' + arguments[6] + '\\&部门_check =' + arguments[7] + '\\&部门 =' + arguments[8]
}
})
}
// 查询MU
export function selectMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框_筛选MU',
param: '月份=' + arguments[0] + '&角色代码=' + arguments[1] + '&操作者工号=' + arguments[2]
}
})
}
// 查询部门
export function selectDepartment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框_筛选SL',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2] + '\\&MU=' + arguments[3]
}
})
}
// 查询Area
export function selectArea() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框_筛选Area',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2] + '\\&部门=' + arguments[3]
}
})
}
// 执行保存
export function handleSave() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_TL得分修改_更新',
param: 'id=' + arguments[0] + '\\&计划完成率=' + arguments[1] + '\\&工时效率=' + arguments[2] + '\\&PV打分=' + arguments[3]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,46 @@
import request from '@/utils/request'
export function searchMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框新月份区间_筛选MU',
param: '开始月份=' + arguments[0] + '&结束月份=' + arguments[1] + '&角色代码=' + arguments[2] + '&操作者工号=' + arguments[3]
}
})
}
export function searchSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框新月份区间_筛选SL',
param: '开始月份=' + arguments[0] + '&结束月份=' + arguments[1] + '&角色代码=' + arguments[2] + '&操作者工号=' + arguments[3] + '&MU=' + arguments[4]
}
})
}
export function searchPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_筛选框新月份区间_筛选Area',
param: '开始月份=' + arguments[0] + '&结束月份=' + arguments[1] + '&角色代码=' + arguments[2] + '&操作者工号=' + arguments[3] + '&部门=' + arguments[4]
}
})
}
export function searchCharts() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_报告查询_损失汇总',
param: '开始月份=' + arguments[0] + '&结束月份=' + arguments[1] + '&操作者工号=' + arguments[2] + '&角色代码=' + arguments[3] + '&MU=' + arguments[4] + '&MU_check=' + arguments[5] + '&部门=' + arguments[6] + '&部门_check=' + arguments[7] + '&Area=' + arguments[8] + '&Area_check=' + arguments[9]
}
})
}

View File

@@ -0,0 +1,50 @@
import request from '@/utils/request'
// 查询
export function searchTable(pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '基础数据_设备查询',
Pagination: pageList + '&' + pageSize
}
})
}
// 增加
export function editType(ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_增加数据',
param: '序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 编辑
export function handleChange(CoManufacturerFlowNumber, ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_修改数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '&序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 删除
export function handledelete(CoManufacturerFlowNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_删除数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '=int'
}
})
}

View File

@@ -0,0 +1,24 @@
import request from '@/utils/request'
export function searchMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框月份区间_筛选MU ',
param: '开始月份=' + arguments[0] + '&结束月份=' + arguments[1] + '&角色代码=' + arguments[2] + '&操作者工号=' + arguments[3]
}
})
}
export function searchCharts() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_报告查询_TL奖金汇总_MU查询',
param: '开始月份=' + arguments[0] + '&结束月份=' + arguments[1] + '&操作者工号=' + arguments[2] + '&角色代码=' + arguments[3] + '&MU=' + arguments[4] + '&MU_check=' + arguments[5]
}
})
}

View File

@@ -0,0 +1,113 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + '0'
}
})
}
// 查询奖金得分
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_TL得分查询_SL',
param: '月份=' + arguments[0] + '\\&操作者工号 =' + arguments[1] + '\\&角色代码 =' + arguments[2] + '\\&MU_check =' + arguments[3] + '\\&SL_check =' + arguments[4] + '\\&PV_check =' + arguments[5] + '\\&MU =' + arguments[6] +
'\\&部门 =' + arguments[7] + '\\&Area =' + arguments[8]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}
// MU查詢 LLJ 新增
export function SelectMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框_筛选MU',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2]
}
})
}
// SL查询
export function SelectSL() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框_筛选SL',
param: '月份=' + arguments[0] + '&角色代码=' + arguments[1] + '&操作者工号=' + arguments[2] + '&MU=' + arguments[3]
}
})
}
// SL查询
export function SelectArea() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_TL筛选框_筛选Area',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2] + '\\&部门=' + arguments[3]
}
})
}
// 审批
export function Approval2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_TL得分审核_SL',
param: '月份=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&部门=' + arguments[2]
}
})
}
// 确认编辑
export function confirmEdit() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_TL得分修改_SL',
param: 'id=' + arguments[0] + '\\&计划完成率=' + arguments[1] + '\\&工时效率=' + arguments[2] + '\\&PV打分=' + arguments[3]
}
})
}

View File

@@ -0,0 +1,40 @@
import request from '@/utils/request'
// 开启关闭权限控制
export function PowerControl() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入冻结日期开启关闭权限控制',
param: '是否开启=' + arguments[0]
}
})
}
// 输入权限判断
export function PowerJudge() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断',
param: '当前日期=' + arguments[0] + '&可以输入月份=' + arguments[1] + '&是否可以输入=' + arguments[2] + '&开始时间=' + arguments[3] + '&结束时间=' + arguments[4] + '&是否启用=' + arguments[5]
}
})
}
// 输入冻结日期
export function FreezeDateInput() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入冻结日期',
param: '开始日期=' + arguments[0] + '&结束日期=' + arguments[1]
}
})
}

View File

@@ -0,0 +1,79 @@
import request from '@/utils/request'
export function dataImport() {
return request({
url: '',
method: 'post',
data: {
type: '7',
name: '人员表',
param: arguments[0]
}
})
}
export function personFransfer() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '人员信息表格导入后轮询到人员表'
}
})
}
export function personTruncate() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_人员导入_全部人员删除'
}
})
}
export function personSelect(pageList, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_人员维护_人员查询新',
Pagination: pageList + '&' + pageSize
}
})
}
export function personDelete() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_人员维护_人员删除',
param: '人员编号=' + arguments[0]
}
})
}
export function addPeople() {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员增加新',
param: '工号=' + arguments[0] + '&密码=' + arguments[1] + '&姓名=' + arguments[2] + '&OrgUnit=' + arguments[3] + '&Cost_Center=' + arguments[4] + '&Business_Area=' + arguments[5] + '&PSG=' + arguments[6] +
'&Job_Title=' + arguments[7] + '&Payroll_Area=' + arguments[8] + '&导入数据是否覆盖=' + arguments[9] + '&中文名=' + arguments[10]
}
})
}
// 人员更新
export function personUpdate() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_人员维护_人员修改新',
param: 'id=' + arguments[0] + '\\&密码=' + arguments[1] + '\\&姓名=' + arguments[2] + '\\&OrgUnit=' + arguments[3] + '\\&Cost_Center=' + arguments[4] + '\\&Business_Area=' + arguments[5] + '\\&PSG=' + arguments[6] + '\\&Job_Title=' + arguments[7] + '\\&Payroll_Area=' + arguments[8] + '\\&导入数据是否覆盖=' + arguments[9] + '\\&中文名=' + arguments[10]
}
})
}

View File

@@ -0,0 +1,24 @@
import request from '@/utils/request'
export function searchMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_白领筛选框月份区间_筛选MU ',
param: '开始月份=' + arguments[0] + '&结束月份=' + arguments[1] + '&角色代码=' + arguments[2] + '&操作者工号=' + arguments[3]
}
})
}
export function searchCharts() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_报告查询_白领奖金汇总_MU查询',
param: '开始月份=' + arguments[0] + '&结束月份=' + arguments[1] + '&操作者工号=' + arguments[2] + '&角色代码=' + arguments[3] + '&MU=' + arguments[4] + '&MU_check=' + arguments[5]
}
})
}

View File

@@ -0,0 +1,147 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 查询奖金得分
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_白领得分修改_查询',
param: '月份=' + arguments[0] + '\\&people_id =' + arguments[1] + '\\&rolenumber =' + arguments[2] + '\\&pv_check =' + arguments[3] + '\\&Area =' + arguments[4] + '\\&MU_check =' + arguments[5] + '\\&MU =' + arguments[6] + '\\&部门_check =' + arguments[7] + '\\&部门 =' + arguments[8]
}
})
}
// 查询MU
export function selectMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_白领筛选框_筛选MU',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2]
}
})
}
// 查询部门
export function selectDepartment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_白领筛选框_筛选SL',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2] + '\\&MU=' + arguments[3]
}
})
}
// 查询Area
export function selectArea() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_白领筛选框_筛选Area',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2] + '\\&部门=' + arguments[3]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + '0'
}
})
}
// 除MU外部门查询Segment
export function selectSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// MU查询Segment
export function selectSegmentForMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_Segment',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// 除Segment外部门查询PV
export function selectPV() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// Segment查询PV
export function selectPVForSegment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_PV',
param: '人员编号=' + arguments[0] + '&部门代码=' + arguments[1]
}
})
}
// 执行保存
export function handleSave() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '奖金绩效系统_白领得分修改_更新',
param: 'id=' + arguments[0] + '&计划完成率=' + arguments[1] + '&工时效率=' + arguments[2] + '&PV打分=' + arguments[3]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}

View File

@@ -0,0 +1,113 @@
import request from '@/utils/request'
// 判断登陆角色
export function judgeRole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_根据人角色编号',
param: '编号=' + arguments[0]
}
})
}
// 初始化MU
export function initMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_人员角色_查询数据_父节点_部门查询',
param: '人员编号=' + arguments[0] + '&部门代码=' + '0'
}
})
}
// 查询奖金得分
// 查询奖金得分
export function searchBonus() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_白领得分查询_SL',
param: '月份=' + arguments[0] + '\\&操作者工号 =' + arguments[1] + '\\&角色代码 =' + arguments[2] + '\\&MU_check =' + arguments[3] + '\\&SL_check =' + arguments[4] + '\\&PV_check =' + arguments[5] + '\\&MU =' + arguments[6] +
'\\&部门 =' + arguments[7] + '\\&Area =' + arguments[8]
}
})
}
// 查询冻结权限
export function initrole() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '输入权限判断'
}
})
}
// MU查詢 LLJ 新增
export function SelectMU() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_白领筛选框_筛选MU',
param: '月份=' + arguments[0] + '&角色代码=' + arguments[1] + '&操作者工号=' + arguments[2]
}
})
}
// SL查询
export function SelectSL() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_白领筛选框_筛选SL',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2] + '\\&MU=' + arguments[3]
}
})
}
// SL查询
export function SelectArea() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '菜单模块系统_白领筛选框_筛选Area',
param: '月份=' + arguments[0] + '\\&角色代码=' + arguments[1] + '\\&操作者工号=' + arguments[2] + '\\&部门=' + arguments[3]
}
})
}
// 审批
export function Approval2() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_白领得分审核_SL',
param: '月份=' + arguments[0] + '\\&操作者工号=' + arguments[1] + '\\&部门=' + arguments[2]
}
})
}
// 确认编辑
export function confirmEdit() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_蓝白领得分修改_SL',
param: 'id=' + arguments[0] + '&得分=' + arguments[1]
}
})
}

View File

@@ -0,0 +1,213 @@
import request from '@/utils/request'
import axios from 'axios'
export function daobiao(工号组, 姓名组, OrgUnit组, Cost_Center组, Business_Area组, PSG组, Job_Title组, Payroll_Area组) {
const param = new URLSearchParams()
param.append('工号组', 工号组)
param.append('姓名组', 姓名组)
param.append('OrgUnit组', OrgUnit组)
param.append('Cost_Center组', Cost_Center组)
param.append('Business_Area组', Business_Area组)
param.append('PSG组', PSG组)
param.append('Job_Title组', Job_Title组)
param.append('Payroll_Area组', Payroll_Area组)
return axios({
url: 'http://192.168.1.122:8055/submit/WebLED.ashx?type=PersonnelIntroduction',
method: 'post',
data: param
})
}
export function getTree() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_部门关系_查询节点',
param: '子节点=0=int'
}
})
}
export function judgementLevel(code) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '判断部门等级',
param: '部门代码=' + code + '=int'
}
})
}
export function tree(data, pid) {
const result = []
let temp
for (let i = 0; i < data.length; i++) {
if (data[i].parentNode === pid) {
const obj = { label: data[i].NodeName, id: data[i].subNode }
temp = tree(data, data[i].subNode)
if (temp.length > 0) {
obj.children = temp
}
result.push(obj)
}
}
return result
}
// 新增部门 LLJ lEV
export function addDepartmentName(num1, num2, num3, num4, num5) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_部门关系_增加节点',
param: '父节点=' + num1 + '\\&节点名称=' + num2 + '\\&子节点=' + num3 + '\\&Departments_State=' + num4 + '\\&lev=' + num5
}
})
}
// 编辑部门
export function editList(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_部门关系_修改节点',
param: '子节点=' + num1 + '\\&节点名称=' + num2
}
})
}
// 删除部门
export function delList(num1) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_部门关系_删除节点',
param: '子节点=' + num1 + '=int'
}
})
}
export function getTablePeople(code, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_人员查询_根据部门编号',
param: '部门编号=' + code + '=int',
pagination: pageCurrent + '&' + pageSize
}
})
}
export function searchPeople() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_人员查询_根据工号',
param: '工号=' + arguments[0]
}
})
}
export function addPeople() {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员增加',
param: '部门编号=' + arguments[0] + '&工号=' + arguments[1] + '&密码=' + arguments[2] + '&人员性质编号=' + arguments[3] + '&姓名=' + arguments[4]
}
})
}
export function editPeople() {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员修改',
param: '工号=' + arguments[0] + '&密码=' + arguments[1] + '&人员性质编号=' + arguments[2] + '&姓名=' + arguments[3] + '&人员编号=' + arguments[4] + '&部门代码=' + arguments[5]
}
})
}
export function selectPersonnelNature() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_人员性质查询'
}
})
}
export function delPeopleList(num1) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员删除',
param: '人员编号=' + arguments[0]
}
})
}
export function moveGroups(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员移动',
param: '人员编号=' + num1 + '=int&部门编号=' + num2 + '=int'
}
})
}
export function getTPeopleList() {
return request({
url: '',
method: 'post',
data: {
type: 1,
name: '奖金绩效系统_人员维护_人员查询'
}
})
}
export function allocationPeople_add(val1, val2, id) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员分配',
param: '人员编号=' + val1 + '=int&部门编号=' + id + '=int&人员性质=' + val2
}
})
}
export function deleteDepartmentPeopleList(num1, id) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '奖金绩效系统_人员维护_人员部门删除',
param: '人员编号=' + num1 + '=int&部门编号=' + id
}
})
}
// 人员整体录入
export function handleSave() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '奖金绩效系统_人员导入_整体录入',
param: `工号组=${arguments[0]}&姓名组=${arguments[1]}&OrgUnit组=${arguments[2]}&Cost_Center组=${arguments[3]}&Business_Area组=${arguments[4]}&PSG组=${arguments[5]}&Job_Title组=${arguments[6]}&Payroll_Area组=${arguments[7]}`
}
})
}

View File

@@ -0,0 +1,94 @@
// src/api/b1s.js
import axios from 'axios';
// 创建 axios 实例
const b1s = axios.create({
timeout: 10000,
baseURL: window.dt_Config.baseURLB1,
headers: {
'Content-Type': 'application/json'
}
});
export async function getB1(url, params) {
try {
const paramsGet = {
func:"GET",
cmd: url.replace('/', ''),
content: new URLSearchParams(params).toString().replace(/%24/g, '$')
}
const res = await b1s.post('',paramsGet);
return { success: true, data: res.data };
} catch (error) {
console.log('GET', error)
const msg = extractB1Error(error);
return { success: false, message: msg };
}
}
export async function postB1(url, data) {
try {
const params = {
func:"POST",
cmd: url.replace('/', ''),
content: JSON.stringify(data)
}
const res = await b1s.post('', params);
console.log(res)
return { success: true, data: res.data };
} catch (error) {
console.log('POST', error)
const msg = extractB1Error(error);
return { success: false, message: msg };
}
}
export async function patchB1(url, data) {
try {
const params = {
func:"PATCH",
cmd: url.replace('/', ''),
content: JSON.stringify(data)
}
const res = await b1s.post('', params);
console.log('PATCH 请求成功:', res);
return { success: true, data: res.data };
} catch (error) {
console.log('PATCH', error)
const msg = extractB1Error(error); // 複用你的錯誤提取函數
console.error('PATCH 请求失败:', msg);
return { success: false, message: msg };
}
}
// src/api/b1s.js 内部定义
function extractB1Error(error) {
if (!error) return '未知错误';
// 优先取 SAP B1 返回的错误信息
if (
error.response &&
error.response.data &&
error.response.data.error
) {
const b1Error = error.response.data.error;
if (b1Error.message && b1Error.message.value) {
return b1Error.message.value;
} else if (typeof b1Error.message === 'string') {
return b1Error.message;
} else {
return b1Error.code || 'SAP B1 错误';
}
}
// 网络错误、超时等
if (error.message) {
return error.message;
}
return '请求失败,请检查网络或服务状态';
}

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
export function login(username, password) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '菜单模块系统_用户名密码_查询数据',
param: `用户名=${username}&密码=${password}`
}
})
}
//
export function getInfo(token) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '菜单模块系统_项目角色模块列表_二级_查询数据',
param: `角色编号=${token}`
}
})
}
// 修改密码
export function editPassword(num1, num2, num3, num4) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '账号信息_修改密码_MESWORK',
param: '考勤编号=' + num1 + '=string&原始密码=' + num2 + '=string&新密码=' + num3 + '=string&返回=' + num4 + '=string=output'
}
})
}

View File

@@ -0,0 +1,92 @@
// src/api/b1s.js
import axios from 'axios';
// 创建 axios 实例
const tm = axios.create({
timeout: 10000,
baseURL: window.dt_Config.baseURLtm,
headers: {
'Content-Type': 'application/json'
}
});
export async function gettm(url, params) {
try {
const paramsGet = {
func:"GET",
cmd: url.replace('/', ''),
content: new URLSearchParams(params).toString()//.replace('%24', '')
}
const res = await tm.post('',paramsGet);
return { success: true, data: res.data };
} catch (error) {
console.log('GET', error)
const msg = extractB1Error(error);
return { success: false, message: msg };
}
}
export async function posttm(url, data) {
try {
const params = {
func:"POST",
cmd: url.replace('/', ''),
content: JSON.stringify(data)
}
const res = await tm.post('', params);
console.log(res)
return { success: true, data: res.data };
} catch (error) {
console.log('POST', error)
const msg = extractB1Error(error);
return { success: false, message: msg };
}
}
export async function patchtm(url, data) {
try {
const params = {
func:"PATCH",
cmd: url.replace('/', ''),
content: JSON.stringify(data)
}
const res = await tm.post('', params);
console.log('PATCH 请求成功:', res);
return { success: true, data: res.data };
} catch (error) {
console.log('PATCH', error)
const msg = extractB1Error(error); // 複用你的錯誤提取函數
console.error('PATCH 请求失败:', msg);
return { success: false, message: msg };
}
}
// src/api/b1s.js 内部定义
function extractB1Error(error) {
if (!error) return '未知错误';
// 优先取 SAP B1 返回的错误信息
if (
error.response &&
error.response.data &&
error.response.data.error
) {
const b1Error = error.response.data.error;
if (b1Error.message && b1Error.message.value) {
return b1Error.message.value;
} else if (typeof b1Error.message === 'string') {
return b1Error.message;
} else {
return b1Error.code || 'SAP B1 错误';
}
}
// 网络错误、超时等
if (error.message) {
return error.message;
}
return '请求失败,请检查网络或服务状态';
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,70 @@
@font-face {
font-family: MiSans Demibold;
src: url("MiSans-Demibold.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}
@font-face {
font-family: MiSans Bold;
src: url("MiSans-Bold.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}
@font-face {
font-family: MiSans ExtraLight;
src: url("MiSans-ExtraLight.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}
@font-face {
font-family: MiSans Heavy;
src: url("MiSans-Heavy.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}
@font-face {
font-family: MiSans Light;
src: url("MiSans-Light.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}
@font-face {
font-family: MiSans Medium;
src: url("MiSans-Medium.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}
@font-face {
font-family: MiSans Normal;
src: url("MiSans-Normal.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}
@font-face {
font-family: MiSans Regular;
src: url("MiSans-Regular.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}
@font-face {
font-family: MiSans Semibold;
src: url("MiSans-Semibold.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}
@font-face {
font-family: MiSans Thin;
src: url("MiSans-Thin.ttf");
font-weight: normal;
font-style: normal;
font-display: block;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,92 @@
/**
* @desc 验证整数类型数字方法
* @param {Object} e
* @param {regular} reg 正则
* @param {Number} charcode 键盘code
* */
const checkNumber = (e, reg, charcode) => {
if (!reg.test(String.fromCharCode(charcode)) && charcode > 9 && !e.ctrlKey) {
if (e.preventDefault) {
e.preventDefault()
} else {
e.returnValue = false
}
}
}
/**
* @desc 验证浮点类型小数方法(建议用text类型的表单)
* @param {Object} e
* @param {regular} reg 正则
* @param {Number} charcode 键盘code
* @param {Object} el dom对象
* */
const checkFloat = (e, reg, charcode, el) => {
if (charcode === 46) {
if (el.children[0].value.includes('.')) {
e.preventDefault()
}
return
} else if (
!reg.test(String.fromCharCode(charcode)) &&
charcode > 9 &&
!e.ctrlKey
) {
if (e.preventDefault) {
e.preventDefault()
} else {
e.returnValue = false
}
}
}
const loading = (e, el, bind) => {
el.disabled = true
setTimeout(function() {
el.disabled = false
}, 3000)
}
/**
* @author LeeYunxiang
* @description 限制数字输入格式 int => 正整数 , num => 自然数(正整数包括0) , float => 正数包括小数(建议用text类型的input表单)
* */
export default {
key: 'positive',
func: {
inserted(el, bind) {
el.addEventListener('keypress', e => {
e = e || window.event
const charcode = typeof e.charCode === 'number' ? e.charCode : e.keyCode
let reg = null
switch (bind.value) {
case 'num':
reg = /\d/
checkNumber(e, reg, charcode)
break
case 'int':
if (el.children[0].value.length === 0) {
reg = /^[1-9]$/
} else {
reg = /\d/
}
checkNumber(e, reg, charcode)
break
case 'float':
reg = /\d/
checkFloat(e, reg, charcode, el)
break
case 'notZero':
reg = (/^[1-9][0-9]*$/)
checkFloat(e, reg, charcode, el)
break
}
})
el.addEventListener('click', e => {
switch (bind.value) {
case 'loading':
loading(e, el, bind)
break
}
})
}
}
}

View File

@@ -0,0 +1,11 @@
import AmountInputBox from './AmountInputBox.js'
const directives = [AmountInputBox]
export default {
install: Vue => {
if (directives.length && directives.length > 0) {
directives.map(item => {
Vue.directive(item.key, item.func)
})
}
}
}

View File

@@ -0,0 +1,59 @@
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" v-if="item.meta.title" :key="item.path">
<span v-if="item.redirect==='noredirect'||index===levelList.length-2" class="no-redirect">{{
item.meta.title
}}</span>
<router-link v-else :to="item.redirect||item.path" style="color: white">{{ item.meta.title }}</router-link>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</template>
<script>
export default {
data() {
return {
levelList: null
}
},
watch: {
$route() {
this.getBreadcrumb()
}
},
created() {
this.getBreadcrumb()
},
methods: {
getBreadcrumb() {
let matched = this.$route.matched.filter(item => item.name)
const first = matched[0]
if (first && first.name !== 'dashboard') {
matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched)
}
this.levelList = matched
}
}
}
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
.app-breadcrumb.el-breadcrumb {
display: inline-block;
font-size: 13px;
line-height: 50px;
color: #fff;
margin-left: 0;
.no-redirect {
color: white;
cursor: text;
}
}
::v-deep .el-breadcrumb__separator {
margin: 0 12px;
}
</style>

View File

@@ -0,0 +1,526 @@
/**
* @1900-2100区间内的公历、农历互转
* @charset UTF-8
* @Author Jea杨(JJonline@JJonline.Cn)
* @Time 2014-7-21
* @Time 2016-8-13 Fixed 2033hex、Attribution Annals
* @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
* @Version 1.0.2
* @公历转农历calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
* @农历转公历calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
*/
/* eslint-disable */
var calendar = {
/**
* 农历1900-2100的润大小信息表
* @Array Of Property
* @return Hex
*/
lunarInfo:[0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,//1900-1909
0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,//1910-1919
0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,//1920-1929
0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,//1930-1939
0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,//1940-1949
0x06ca0,0x0b550,0x15355,0x04da0,0x0a5b0,0x14573,0x052b0,0x0a9a8,0x0e950,0x06aa0,//1950-1959
0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,//1960-1969
0x096d0,0x04dd5,0x04ad0,0x0a4d0,0x0d4d4,0x0d250,0x0d558,0x0b540,0x0b6a0,0x195a6,//1970-1979
0x095b0,0x049b0,0x0a974,0x0a4b0,0x0b27a,0x06a50,0x06d40,0x0af46,0x0ab60,0x09570,//1980-1989
0x04af5,0x04970,0x064b0,0x074a3,0x0ea50,0x06b58,0x055c0,0x0ab60,0x096d5,0x092e0,//1990-1999
0x0c960,0x0d954,0x0d4a0,0x0da50,0x07552,0x056a0,0x0abb7,0x025d0,0x092d0,0x0cab5,//2000-2009
0x0a950,0x0b4a0,0x0baa4,0x0ad50,0x055d9,0x04ba0,0x0a5b0,0x15176,0x052b0,0x0a930,//2010-2019
0x07954,0x06aa0,0x0ad50,0x05b52,0x04b60,0x0a6e6,0x0a4e0,0x0d260,0x0ea65,0x0d530,//2020-2029
0x05aa0,0x076a3,0x096d0,0x04afb,0x04ad0,0x0a4d0,0x1d0b6,0x0d250,0x0d520,0x0dd45,//2030-2039
0x0b5a0,0x056d0,0x055b2,0x049b0,0x0a577,0x0a4b0,0x0aa50,0x1b255,0x06d20,0x0ada0,//2040-2049
/**Add By JJonline@JJonline.Cn**/
0x14b63,0x09370,0x049f8,0x04970,0x064b0,0x168a6,0x0ea50, 0x06b20,0x1a6c4,0x0aae0,//2050-2059
0x0a2e0,0x0d2e3,0x0c960,0x0d557,0x0d4a0,0x0da50,0x05d55,0x056a0,0x0a6d0,0x055d4,//2060-2069
0x052d0,0x0a9b8,0x0a950,0x0b4a0,0x0b6a6,0x0ad50,0x055a0,0x0aba4,0x0a5b0,0x052b0,//2070-2079
0x0b273,0x06930,0x07337,0x06aa0,0x0ad50,0x14b55,0x04b60,0x0a570,0x054e4,0x0d160,//2080-2089
0x0e968,0x0d520,0x0daa0,0x16aa6,0x056d0,0x04ae0,0x0a9d4,0x0a2d0,0x0d150,0x0f252,//2090-2099
0x0d520],//2100
/**
* 公历每个月份的天数普通表
* @Array Of Property
* @return Number
*/
solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],
/**
* 天干地支之天干速查表
* @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
* @return Cn string
*/
Gan:["\u7532","\u4e59","\u4e19","\u4e01","\u620a","\u5df1","\u5e9a","\u8f9b","\u58ec","\u7678"],
/**
* 天干地支之地支速查表
* @Array Of Property
* @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
* @return Cn string
*/
Zhi:["\u5b50","\u4e11","\u5bc5","\u536f","\u8fb0","\u5df3","\u5348","\u672a","\u7533","\u9149","\u620c","\u4ea5"],
/**
* 天干地支之地支速查表<=>生肖
* @Array Of Property
* @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
* @return Cn string
*/
Animals:["\u9f20","\u725b","\u864e","\u5154","\u9f99","\u86c7","\u9a6c","\u7f8a","\u7334","\u9e21","\u72d7","\u732a"],
/**
* 24节气速查表
* @Array Of Property
* @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
* @return Cn string
*/
solarTerm:["\u5c0f\u5bd2","\u5927\u5bd2","\u7acb\u6625","\u96e8\u6c34","\u60ca\u86f0","\u6625\u5206","\u6e05\u660e","\u8c37\u96e8","\u7acb\u590f","\u5c0f\u6ee1","\u8292\u79cd","\u590f\u81f3","\u5c0f\u6691","\u5927\u6691","\u7acb\u79cb","\u5904\u6691","\u767d\u9732","\u79cb\u5206","\u5bd2\u9732","\u971c\u964d","\u7acb\u51ac","\u5c0f\u96ea","\u5927\u96ea","\u51ac\u81f3"],
/**
* 1900-2100各年的24节气日期速查表
* @Array Of Property
* @return 0x string For splice
*/
sTermInfo:['9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf97c3598082c95f8c965cc920f',
'97bd0b06bdb0722c965ce1cfcc920f','b027097bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf97c359801ec95f8c965cc920f','97bd0b06bdb0722c965ce1cfcc920f','b027097bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f','97bd0b06bdb0722c965ce1cfcc920f',
'b027097bd097c36b0b6fc9274c91aa','9778397bd19801ec9210c965cc920e','97b6b97bd19801ec95f8c965cc920f',
'97bd09801d98082c95f8e1cfcc920f','97bd097bd097c36b0b6fc9210c8dc2','9778397bd197c36c9210c9274c91aa',
'97b6b97bd19801ec95f8c965cc920e','97bd09801d98082c95f8e1cfcc920f','97bd097bd097c36b0b6fc9210c8dc2',
'9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec95f8c965cc920e','97bcf97c3598082c95f8e1cfcc920f',
'97bd097bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf97c3598082c95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e','97bcf97c3598082c95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f',
'97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf97c359801ec95f8c965cc920f','97bd097bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e','97bcf97c359801ec95f8c965cc920f','97bd097bd07f595b0b6fc920fb0722',
'9778397bd097c36b0b6fc9210c8dc2','9778397bd19801ec9210c9274c920e','97b6b97bd19801ec95f8c965cc920f',
'97bd07f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c920e',
'97b6b97bd19801ec95f8c965cc920f','97bd07f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2',
'9778397bd097c36c9210c9274c91aa','97b6b97bd19801ec9210c965cc920e','97bd07f1487f595b0b0bc920fb0722',
'7f0e397bd097c36b0b6fc9210c8dc2','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf7f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e','97bcf7f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e','97bcf7f1487f531b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b97bd19801ec9210c965cc920e',
'97bcf7f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c9274c920e','97bcf7f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
'9778397bd097c36b0b6fc9210c91aa','97b6b97bd197c36c9210c9274c920e','97bcf7f0e47f531b0b0bb0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9210c8dc2','9778397bd097c36c9210c9274c920e',
'97b6b7f0e47f531b0723b0b6fb0722','7f0e37f5307f595b0b0bc920fb0722','7f0e397bd097c36b0b6fc9210c8dc2',
'9778397bd097c36b0b70c9274c91aa','97b6b7f0e47f531b0723b0b6fb0721','7f0e37f1487f595b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc9210c8dc2','9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f595b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc920fb0722','9778397bd097c36b0b6fc9274c91aa','97b6b7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9274c91aa',
'97b6b7f0e47f531b0723b0787b0721','7f0e27f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
'9778397bd097c36b0b6fc9210c91aa','97b6b7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722','9778397bd097c36b0b6fc9210c8dc2','977837f0e37f149b0723b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722','7f0e37f5307f595b0b0bc920fb0722','7f0e397bd097c35b0b6fc9210c8dc2',
'977837f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0721','7f0e37f1487f595b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc9210c8dc2','977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722','977837f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd097c35b0b6fc920fb0722',
'977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14998082b0787b06bd',
'7f07e7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0b0bb0b6fb0722','7f0e397bd07f595b0b0bc920fb0722',
'977837f0e37f14998082b0723b06bd','7f07e7f0e37f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722','977837f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722','7f0e37f1487f595b0b0bb0b6fb0722','7f0e37f0e37f14898082b0723b02d5',
'7ec967f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0722','7f0e37f1487f531b0b0bb0b6fb0722',
'7f0e37f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
'7f0e37f1487f531b0b0bb0b6fb0722','7f0e37f0e37f14898082b072297c35','7ec967f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722','7f0e37f0e37f14898082b072297c35',
'7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f149b0723b0787b0721',
'7f0e27f1487f531b0b0bb0b6fb0722','7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14998082b0723b06bd',
'7f07e7f0e47f149b0723b0787b0721','7f0e27f0e47f531b0723b0b6fb0722','7f0e37f0e366aa89801eb072297c35',
'7ec967f0e37f14998082b0723b06bd','7f07e7f0e37f14998083b0787b0721','7f0e27f0e47f531b0723b0b6fb0722',
'7f0e37f0e366aa89801eb072297c35','7ec967f0e37f14898082b0723b02d5','7f07e7f0e37f14998082b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722','7f0e36665b66aa89801e9808297c35','665f67f0e37f14898082b0723b02d5',
'7ec967f0e37f14998082b0787b0721','7f07e7f0e47f531b0723b0b6fb0722','7f0e36665b66a449801e9808297c35',
'665f67f0e37f14898082b0723b02d5','7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721',
'7f0e36665b66a449801e9808297c35','665f67f0e37f14898082b072297c35','7ec967f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721','7f0e26665b66a449801e9808297c35','665f67f0e37f1489801eb072297c35',
'7ec967f0e37f14998082b0787b06bd','7f07e7f0e47f531b0723b0b6fb0721','7f0e27f1487f531b0b0bb0b6fb0722'],
/**
* 数字转中文速查表
* @Array Of Property
* @trans ['日','一','二','三','四','五','六','七','八','九','十']
* @return Cn string
*/
nStr1:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341"],
/**
* 日期转农历称呼速查表
* @Array Of Property
* @trans ['初','十','廿','卅']
* @return Cn string
*/
nStr2:["\u521d","\u5341","\u5eff","\u5345"],
/**
* 月份转农历称呼速查表
* @Array Of Property
* @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
* @return Cn string
*/
nStr3:["\u6b63","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u51ac","\u814a"],
/**
* 返回农历y年一整年的总天数
* @param lunar Year
* @return Number
* @eg:var count = calendar.lYearDays(1987) ;//count=387
*/
lYearDays:function(y) {
var i, sum = 348;
for(i=0x8000; i>0x8; i>>=1) { sum += (calendar.lunarInfo[y-1900] & i)? 1: 0; }
return(sum+calendar.leapDays(y));
},
/**
* 返回农历y年闰月是哪个月若y年没有闰月 则返回0
* @param lunar Year
* @return Number (0-12)
* @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
*/
leapMonth:function(y) { //闰字编码 \u95f0
return(calendar.lunarInfo[y-1900] & 0xf);
},
/**
* 返回农历y年闰月的天数 若该年没有闰月则返回0
* @param lunar Year
* @return Number (0、29、30)
* @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
*/
leapDays:function(y) {
if(calendar.leapMonth(y)) {
return((calendar.lunarInfo[y-1900] & 0x10000)? 30: 29);
}
return(0);
},
/**
* 返回农历y年m月非闰月的总天数计算m为闰月时的天数请使用leapDays方法
* @param lunar Year
* @return Number (-1、29、30)
* @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
*/
monthDays:function(y,m) {
if(m>12 || m<1) {return -1}//月份参数从1至12参数错误返回-1
return( (calendar.lunarInfo[y-1900] & (0x10000>>m))? 30: 29 );
},
/**
* 返回公历(!)y年m月的天数
* @param solar Year
* @return Number (-1、28、29、30、31)
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
*/
solarDays:function(y,m) {
if(m>12 || m<1) {return -1} //若参数错误 返回-1
var ms = m-1;
if(ms==1) { //2月份的闰平规律测算后确认返回28或29
return(((y%4 == 0) && (y%100 != 0) || (y%400 == 0))? 29: 28);
}else {
return(calendar.solarMonth[ms]);
}
},
/**
* 农历年份转换为干支纪年
* @param lYear 农历年的年份数
* @return Cn string
*/
toGanZhiYear:function(lYear) {
var ganKey = (lYear - 3) % 10;
var zhiKey = (lYear - 3) % 12;
if(ganKey == 0) ganKey = 10;//如果余数为0则为最后一个天干
if(zhiKey == 0) zhiKey = 12;//如果余数为0则为最后一个地支
return calendar.Gan[ganKey-1] + calendar.Zhi[zhiKey-1];
},
/**
* 公历月、日判断所属星座
* @param cMonth [description]
* @param cDay [description]
* @return Cn string
*/
toAstro:function(cMonth,cDay) {
var s = "\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf";
var arr = [20,19,21,21,21,22,23,23,23,23,22,22];
return s.substr(cMonth*2 - (cDay < arr[cMonth-1] ? 2 : 0),2) + "\u5ea7";//座
},
/**
* 传入offset偏移量返回干支
* @param offset 相对甲子的偏移量
* @return Cn string
*/
toGanZhi:function(offset) {
return calendar.Gan[offset%10] + calendar.Zhi[offset%12];
},
/**
* 传入公历(!)y年获得该年第n个节气的公历日期
* @param y公历年(1900-2100)n二十四节气中的第几个节气(1~24)从n=1(小寒)算起
* @return day Number
* @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
*/
getTerm:function(y,n) {
if(y<1900 || y>2100) {return -1;}
if(n<1 || n>24) {return -1;}
var _table = calendar.sTermInfo[y-1900];
var _info = [
parseInt('0x'+_table.substr(0,5)).toString() ,
parseInt('0x'+_table.substr(5,5)).toString(),
parseInt('0x'+_table.substr(10,5)).toString(),
parseInt('0x'+_table.substr(15,5)).toString(),
parseInt('0x'+_table.substr(20,5)).toString(),
parseInt('0x'+_table.substr(25,5)).toString()
];
var _calday = [
_info[0].substr(0,1),
_info[0].substr(1,2),
_info[0].substr(3,1),
_info[0].substr(4,2),
_info[1].substr(0,1),
_info[1].substr(1,2),
_info[1].substr(3,1),
_info[1].substr(4,2),
_info[2].substr(0,1),
_info[2].substr(1,2),
_info[2].substr(3,1),
_info[2].substr(4,2),
_info[3].substr(0,1),
_info[3].substr(1,2),
_info[3].substr(3,1),
_info[3].substr(4,2),
_info[4].substr(0,1),
_info[4].substr(1,2),
_info[4].substr(3,1),
_info[4].substr(4,2),
_info[5].substr(0,1),
_info[5].substr(1,2),
_info[5].substr(3,1),
_info[5].substr(4,2),
];
return parseInt(_calday[n-1]);
},
/**
* 传入农历数字月份返回汉语通俗表示法
* @param lunar month
* @return Cn string
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
*/
toChinaMonth:function(m) { // 月 => \u6708
if(m>12 || m<1) {return -1} //若参数错误 返回-1
var s = calendar.nStr3[m-1];
s+= "\u6708";//加上月字
return s;
},
/**
* 传入农历日期数字返回汉字表示法
* @param lunar day
* @return Cn string
* @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
*/
toChinaDay:function(d){ //日 => \u65e5
var s;
switch (d) {
case 10:
s = '\u521d\u5341'; break;
case 20:
s = '\u4e8c\u5341'; break;
break;
case 30:
s = '\u4e09\u5341'; break;
break;
default :
s = calendar.nStr2[Math.floor(d/10)];
s += calendar.nStr1[d%10];
}
return(s);
},
/**
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
* @param y year
* @return Cn string
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
*/
getAnimal: function(y) {
return calendar.Animals[(y - 4) % 12]
},
/**
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
* @param y solar year
* @param m solar month
* @param d solar day
* @return JSON object
* @eg:console.log(calendar.solar2lunar(1987,11,01));
*/
solar2lunar:function (y,m,d) { //参数区间1900.1.31~2100.12.31
if(y<1900 || y>2100) {return -1;}//年份限定、上限
if(y==1900&&m==1&&d<31) {return -1;}//下限
if(!y) { //未传参 获得当天
var objDate = new Date();
}else {
var objDate = new Date(y,parseInt(m)-1,d)
}
var i, leap=0, temp=0;
//修正ymd参数
var y = objDate.getFullYear(),m = objDate.getMonth()+1,d = objDate.getDate();
var offset = (Date.UTC(objDate.getFullYear(),objDate.getMonth(),objDate.getDate()) - Date.UTC(1900,0,31))/86400000;
for(i=1900; i<2101 && offset>0; i++) { temp=calendar.lYearDays(i); offset-=temp; }
if(offset<0) { offset+=temp; i--; }
//是否今天
var isTodayObj = new Date(),isToday=false;
if(isTodayObj.getFullYear()==y && isTodayObj.getMonth()+1==m && isTodayObj.getDate()==d) {
isToday = true;
}
//星期几
var nWeek = objDate.getDay(),cWeek = calendar.nStr1[nWeek];
if(nWeek==0) {nWeek =7;}//数字表示周几顺应天朝周一开始的惯例
//农历年
var year = i;
var leap = calendar.leapMonth(i); //闰哪个月
var isLeap = false;
//效验闰月
for(i=1; i<13 && offset>0; i++) {
//闰月
if(leap>0 && i==(leap+1) && isLeap==false){
--i;
isLeap = true; temp = calendar.leapDays(year); //计算农历闰月天数
}
else{
temp = calendar.monthDays(year, i);//计算农历普通月天数
}
//解除闰月
if(isLeap==true && i==(leap+1)) { isLeap = false; }
offset -= temp;
}
if(offset==0 && leap>0 && i==leap+1)
if(isLeap){
isLeap = false;
}else{
isLeap = true; --i;
}
if(offset<0){ offset += temp; --i; }
//农历月
var month = i;
//农历日
var day = offset + 1;
//天干地支处理
var sm = m-1;
var gzY = calendar.toGanZhiYear(year);
//月柱 1900年1月小寒以前为 丙子月(60进制12)
var firstNode = calendar.getTerm(year,(m*2-1));//返回当月「节」为几日开始
var secondNode = calendar.getTerm(year,(m*2));//返回当月「节」为几日开始
//依据12节气修正干支月
var gzM = calendar.toGanZhi((y-1900)*12+m+11);
if(d>=firstNode) {
gzM = calendar.toGanZhi((y-1900)*12+m+12);
}
//传入的日期的节气与否
var isTerm = false;
var Term = null;
if(firstNode==d) {
isTerm = true;
Term = calendar.solarTerm[m*2-2];
}
if(secondNode==d) {
isTerm = true;
Term = calendar.solarTerm[m*2-1];
}
//日柱 当月一日与 1900/1/1 相差天数
var dayCyclical = Date.UTC(y,sm,1,0,0,0,0)/86400000+25567+10;
var gzD = calendar.toGanZhi(dayCyclical+d-1);
//该日期所属的星座
var astro = calendar.toAstro(m,d);
return {'lYear':year,'lMonth':month,'lDay':day,'Animal':calendar.getAnimal(year),'IMonthCn':(isLeap?"\u95f0":'')+calendar.toChinaMonth(month),'IDayCn':calendar.toChinaDay(day),'cYear':y,'cMonth':m,'cDay':d,'gzYear':gzY,'gzMonth':gzM,'gzDay':gzD,'isToday':isToday,'isLeap':isLeap,'nWeek':nWeek,'ncWeek':"\u661f\u671f"+cWeek,'isTerm':isTerm,'Term':Term,'astro':astro};
},
/**
* 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
* @param y lunar year
* @param m lunar month
* @param d lunar day
* @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
* @return JSON object
* @eg:console.log(calendar.lunar2solar(1987,9,10));
*/
lunar2solar:function(y,m,d,isLeapMonth) { //参数区间1900.1.31~2100.12.1
var isLeapMonth = !!isLeapMonth;
var leapOffset = 0;
var leapMonth = calendar.leapMonth(y);
var leapDay = calendar.leapDays(y);
if(isLeapMonth&&(leapMonth!=m)) {return -1;}//传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
if(y==2100&&m==12&&d>1 || y==1900&&m==1&&d<31) {return -1;}//超出了最大极限值
var day = calendar.monthDays(y,m);
var _day = day;
//bugFix 2016-9-25
//if month is leap, _day use leapDays method
if(isLeapMonth) {
_day = calendar.leapDays(y,m);
}
if(y < 1900 || y > 2100 || d > _day) {return -1;}//参数合法性效验
//计算农历的时间差
var offset = 0;
for(var i=1900;i<y;i++) {
offset+=calendar.lYearDays(i);
}
var leap = 0,isAdd= false;
for(var i=1;i<m;i++) {
leap = calendar.leapMonth(y);
if(!isAdd) {//处理闰月
if(leap<=i && leap>0) {
offset+=calendar.leapDays(y);isAdd = true;
}
}
offset+=calendar.monthDays(y,i);
}
//转换闰月农历 需补充该年闰月的前一个月的时差
if(isLeapMonth) {offset+=day;}
//1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
var stmap = Date.UTC(1900,1,30,0,0,0);
var calObj = new Date((offset+d-31)*86400000+stmap);
var cY = calObj.getUTCFullYear();
var cM = calObj.getUTCMonth()+1;
var cD = calObj.getUTCDate();
return calendar.solar2lunar(cY,cM,cD);
}
};
export default calendar
/* eslint-disable */

View File

@@ -0,0 +1,837 @@
<style scoped>
.calendar {
margin:auto;
width: 100%;
min-width:300px;
background: #fff;
font-family: "PingFang SC","Hiragino Sans GB","STHeiti","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;
user-select:none;
}
.calendar-tools{
height:40px;
font-size: 20px;
line-height: 40px;
color:#5e7a88;
}
.calendar-tools span{
cursor: pointer;
}
.calendar-prev{
width: 14.28571429%;
float:left;
text-align: center;
}
.calendar-info{
padding-top: 3px;
font-size:16px;
line-height: 1.3;
text-align: center;
}
.calendar-info>div.month{
margin:auto;
height:20px;
width:100px;
text-align: center;
color:#5e7a88;
overflow: hidden;
position: relative;
}
.calendar-info>div.month .month-inner{
position: absolute;
left:0;
top:0;
height:240px;
transition:top .5s cubic-bezier(0.075, 0.82, 0.165, 1);
}
.calendar-info>div.month .month-inner>span{
display: block;
font-size: 14px;
height:20px;
width:100px;
overflow: hidden;
text-align: center;
}
.calendar-info>div.year{
font-size:10px;
line-height: 1;
color:#999;
}
.calendar-next{
width: 14.28571429%;
float:right;
text-align: center;
}
.calendar table {
clear: both;
width: 100%;
margin-bottom:10px;
border-collapse: collapse;
color: #444444;
}
.calendar td {
margin:2px !important;
padding:0px 0;
width: 14.28571429%;
height:44px;
text-align: center;
vertical-align: middle;
font-size:14px;
line-height: 125%;
cursor: pointer;
position: relative;
vertical-align: top;
}
.calendar td.week{
font-size:10px;
pointer-events:none !important;
cursor: default !important;
}
.calendar td.disabled {
color: #ccc;
pointer-events:none !important;
cursor: default !important;
}
.calendar td.disabled div{
color: #ccc;
}
.calendar td span{
display:block;
max-width:40px;
height:26px;
font-size: 16px;
line-height:26px;
margin:0px auto;
border-radius:20px;
}
.calendar td:not(.selected) span:not(.red):hover{
background:#f3f8fa;
color:#444;
}
.calendar td:not(.selected) span.red:hover{
background:#f9efef;
}
.calendar td:not(.disabled) span.red{
color:#ea6151;
}
.calendar td.selected span{
background-color: #5e7a88;
color: #fff;
}
.calendar td .text{
position: absolute;
top:28px;
left:0;
right:0;
text-align: center;
padding:2px;
font-size:8px;
line-height: 1.2;
color:#444;
}
.calendar td .isGregorianFestival,
.calendar td .isLunarFestival{
color:#ea6151;
}
.calendar td.selected span.red{
background-color: #ea6151;
color: #fff;
}
.calendar td.selected span.red:hover{
background-color: #ea6151;
color: #fff;
}
.calendar thead td {
text-transform: uppercase;
height:30px;
vertical-align: middle;
}
.calendar-button{
text-align: center;
}
.calendar-button span{
cursor: pointer;
display: inline-block;
min-height: 1em;
min-width: 5em;
vertical-align: baseline;
background:#5e7a88;
color:#fff;
margin: 0 .25em 0 0;
padding: .6em 2em;
font-size: 1em;
line-height: 1em;
text-align: center;
border-radius: .3em;
}
.calendar-button span.cancel{
background:#efefef;
color:#666;
}
.calendar-years{
position: absolute;
left:0px;
top:60px;
right:0px;
bottom:0px;
background:#fff;
display: flex;
justify-content: center;
align-items: center;
flex-wrap:wrap;
overflow: auto;
transition:all .5s cubic-bezier(0.075, 0.82, 0.165, 1);
opacity: 0;
pointer-events: none;
transform: translateY(-10px);
}
.calendar-years.show{
opacity: 1;
pointer-events: auto;
transform: translateY(0px);
}
.calendar-years>span{
margin:1px 5px;
display: inline-block;
width:60px;
line-height: 30px;
border-radius: 20px;
text-align:center;
border:1px solid #fbfbfb;
color:#999;
}
.calendar-years>span.active{
border:1px solid #5e7a88;
background-color: #5e7a88;
color:#fff;
}
</style>
<template>
<div class="calendar">
<div class="calendar-tools">
<span class="calendar-prev" @click="prev">
<svg
width="20"
height="20"
viewBox="0 0 16 16"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g class="transform-group">
<g transform="scale(0.015625, 0.015625)">
<path
d="M671.968 912c-12.288 0-24.576-4.672-33.952-14.048L286.048 545.984c-18.752-18.72-18.752-49.12 0-67.872l351.968-352c18.752-18.752 49.12-18.752 67.872 0 18.752 18.72 18.752 49.12 0 67.872l-318.016 318.048 318.016 318.016c18.752 18.752 18.752 49.12 0 67.872C696.544 907.328 684.256 912 671.968 912z"
fill="#5e7a88"/>
</g>
</g>
</svg>
</span>
<span class="calendar-next" @click="next">
<svg
width="20"
height="20"
viewBox="0 0 16 16"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g class="transform-group">
<g transform="scale(0.015625, 0.015625)">
<path
d="M761.056 532.128c0.512-0.992 1.344-1.824 1.792-2.848 8.8-18.304 5.92-40.704-9.664-55.424L399.936 139.744c-19.264-18.208-49.632-17.344-67.872 1.888-18.208 19.264-17.376 49.632 1.888 67.872l316.96 299.84-315.712 304.288c-19.072 18.4-19.648 48.768-1.248 67.872 9.408 9.792 21.984 14.688 34.56 14.688 12 0 24-4.48 33.312-13.44l350.048-337.376c0.672-0.672 0.928-1.6 1.6-2.304 0.512-0.48 1.056-0.832 1.568-1.344C757.76 538.88 759.2 535.392 761.056 532.128z"
fill="#5e7a88"/>
</g>
</g>
</svg>
</span>
<div class="calendar-info" @click.stop="changeYear">
<!-- {{monthString}} -->
<div class="month">
<div :style="{'top':-(month*20)+'px'}" class="month-inner">
<span v-for="m in months" :key="m">{{ m }}</span>
</div>
</div>
<div class="year">{{ year }}</div>
</div>
</div>
<table cellpadding="5">
<thead>
<tr>
<td v-for="week in weeks" :key="week" class="week">{{ week }}</td>
</tr>
</thead>
<tbody>
<tr v-for="(day,k1) in days" :key="(day,k1)" style="{'animation-delay',(k1*30)+'ms'}">
<td
v-for="(child,k2) in day"
:key="(child,k2)"
:class="{'selected':child.selected,'disabled':child.disabled}"
@click="select(k1,k2,$event)">
<span :class="{'red':k2==0||k2==6||((child.isLunarFestival||child.isGregorianFestival) && lunar)}">{{ child.day }}</span>
<div v-if="child.eventName!=undefined" class="text" >{{ child.eventName }}</div>
<div
v-if="lunar"
:class="{'isLunarFestival':child.isLunarFestival,'isGregorianFestival':child.isGregorianFestival}"
class="text">{{ child.lunar }}
</div>
</td>
</tr>
</tbody>
</table>
<div :class="{'show':yearsShow}" class="calendar-years">
<span v-for="y in years" :key="y" :class="{'active':y==year}" @click.stop="selectYear(y)">{{ y }}</span>
</div>
</div>
</template>
<script>
/* eslint-disable */
import calendar from './calendar.js'
export default {
props: {
// 多选模式
multi: {
type: Boolean,
default: false
},
// 范围模式
range:{
type: Boolean,
default: false
},
// 默认日期
value: {
type: Array,
default: function(){
return []
}
},
// 开始选择日期
begin: {
type: Array,
default: function(){
return []
}
},
// 结束选择日期
end: {
type: Array,
default: function(){
return []
}
},
// 是否小于10补零
zero:{
type: Boolean,
default: false
},
// 屏蔽的日期
disabled:{
type: Array,
default: function(){
return []
}
},
// 是否显示农历
lunar: {
type: Boolean,
default: false
},
// 自定义星期名称
weeks: {
type: Array,
default:function(){
return window.navigator.language.toLowerCase() == "zh-cn"?['日', '一', '二', '三', '四', '五', '六']:['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
}
},
// 自定义月份
months:{
type: Array,
default:function(){
return window.navigator.language.toLowerCase() == "zh-cn"?['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']:['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
}
},
// 自定义事件
events: {
type: Object,
default: function(){
return {}
}
},
},
data() {
return {
years:[],
yearsShow:false,
year: 0,
month: 0,
day: 0,
days: [],
multiDays:[],
today: [],
festival:{
lunar:{
"1-1":"春节",
"1-15":"元宵节",
"2-2":"龙头节",
"5-5":"端午节",
"7-7":"七夕节",
"7-15":"中元节",
"8-15":"中秋节",
"9-9":"重阳节",
"10-1":"寒衣节",
"10-15":"下元节",
"12-8":"腊八节",
"12-23":"祭灶节",
},
gregorian:{
"1-1":"元旦",
"2-14":"情人节",
"3-8":"妇女节",
"3-12":"植树节",
"4-5":"清明节",
"5-1":"劳动节",
"5-4":"青年节",
"6-1":"儿童节",
"7-1":"建党节",
"8-1":"建军节",
"9-10":"教师节",
"10-1":"国庆节",
"12-24":"平安夜",
"12-25":"圣诞节",
},
},
rangeBegin:[],
rangeEnd:[],
}
},
watch:{
events(){
this.render(this.year,this.month)
},
value(){
this.init();
}
},
mounted() {
this.init()
},
methods: {
init(){
let now = new Date();
this.year = now.getFullYear()
this.month = now.getMonth()
this.day = now.getDate()
if (this.value.length>0) {
if (this.range) { //范围
this.year = parseInt(this.value[0][0])
this.month = parseInt(this.value[0][1]) - 1
this.day = parseInt(this.value[0][2])
let year2 = parseInt(this.value[1][0])
let month2 = parseInt(this.value[1][1]) - 1
let day2 = parseInt(this.value[1][2])
this.rangeBegin = [this.year, this.month,this.day]
this.rangeEnd = [year2, month2 , day2]
}else if(this.multi){//多选
this.multiDays=this.value;
this.year = parseInt(this.value[0][0])
this.month = parseInt(this.value[0][1]) - 1
this.day = parseInt(this.value[0][2])
}else{ //单选
this.year = parseInt(this.value[0])
this.month = parseInt(this.value[1]) - 1
this.day = parseInt(this.value[2])
}
}
this.render(this.year, this.month)
},
// 渲染日期
render(y, m) {
let firstDayOfMonth = new Date(y, m, 1).getDay() //当月第一天
let lastDateOfMonth = new Date(y, m + 1, 0).getDate() //当月最后一天
let lastDayOfLastMonth = new Date(y, m, 0).getDate() //最后一月的最后一天
this.year = y
let seletSplit = this.value
let i, line = 0,temp = [],nextMonthPushDays = 1
for (i = 1; i <= lastDateOfMonth; i++) {
let day = new Date(y, m, i).getDay() //返回星期几06
let k
// 第一行
if (day == 0) {
temp[line] = []
} else if (i == 1) {
temp[line] = []
k = lastDayOfLastMonth - firstDayOfMonth + 1
for (let j = 0; j < firstDayOfMonth; j++) {
// console.log("第一行",lunarYear,lunarMonth,lunarValue,lunarInfo)
temp[line].push(Object.assign(
{day: k,disabled: true},
this.getLunarInfo(this.computedPrevYear(),this.computedPrevMonth(true),k),
this.getEvents(this.computedPrevYear(),this.computedPrevMonth(true),k),
))
k++;
}
}
if (this.range) { // 范围
// console.log("日期范围",this.getLunarInfo(this.year,this.month+1,i))
let options = Object.assign(
{day: i},
this.getLunarInfo(this.year,this.month+1,i),
this.getEvents(this.year,this.month+1,i),
)
if (this.rangeBegin.length > 0) {
let beginTime = Number(new Date(this.rangeBegin[0], this.rangeBegin[1], this.rangeBegin[2]))
let endTime = Number(new Date(this.rangeEnd[0], this.rangeEnd[1], this.rangeEnd[2]))
let stepTime = Number(new Date(this.year, this.month, i))
if (beginTime <= stepTime && endTime >= stepTime) {
options.selected = true
}
}
if (this.begin.length>0) {
let beginTime = Number(new Date(parseInt(this.begin[0]),parseInt(this.begin[1]) - 1,parseInt(this.begin[2])))
if (beginTime > Number(new Date(this.year, this.month, i))) options.disabled = true
}
if (this.end.length>0){
let endTime = Number(new Date(parseInt(this.end[0]),parseInt(this.end[1]) - 1,parseInt(this.end[2])))
if (endTime < Number(new Date(this.year, this.month, i))) options.disabled = true
}
if (this.disabled.length>0){
if (this.disabled.filter(v => {return this.year === v[0] && this.month === v[1]-1 && i === v[2] }).length>0) {
options.disabled = true
}
}
temp[line].push(options)
}else if(this.multi){//多选
let options
// 判断是否选中
if(this.value.filter(v => {return this.year === v[0] && this.month === v[1]-1 && i === v[2] }).length>0 ){
options = Object.assign({day: i,selected:true},this.getLunarInfo(this.year,this.month+1,i),this.getEvents(this.year,this.month+1,i))
}else{
options = Object.assign({day: i,selected:false},this.getLunarInfo(this.year,this.month+1,i),this.getEvents(this.year,this.month+1,i))
if (this.begin.length>0) {
let beginTime = Number(new Date(parseInt(this.begin[0]),parseInt(this.begin[1]) - 1,parseInt(this.begin[2])))
if (beginTime > Number(new Date(this.year, this.month, i))) options.disabled = true
}
if (this.end.length>0){
let endTime = Number(new Date(parseInt(this.end[0]),parseInt(this.end[1]) - 1,parseInt(this.end[2])))
if (endTime < Number(new Date(this.year, this.month, i))) options.disabled = true
}
if (this.disabled.length>0){
if (this.disabled.filter(v => {return this.year === v[0] && this.month === v[1]-1 && i === v[2] }).length>0) {
options.disabled = true
}
}
}
temp[line].push(options)
} else { // 单选
// console.log(this.lunar(this.year,this.month,i));
let chk = new Date()
let chkY = chk.getFullYear()
let chkM = chk.getMonth()
// 匹配上次选中的日期
if (parseInt(seletSplit[0]) == this.year && parseInt(seletSplit[1]) - 1 == this.month && parseInt(seletSplit[2]) == i) {
// console.log("匹配上次选中的日期",lunarYear,lunarMonth,lunarValue,lunarInfo)
temp[line].push(Object.assign(
{day: i,selected: true},
this.getLunarInfo(this.year,this.month+1,i),
this.getEvents(this.year,this.month+1,i),
))
this.today = [line, temp[line].length - 1]
}
// 没有默认值的时候显示选中今天日期
else if (chkY == this.year && chkM == this.month && i == this.day && this.value == "") {
// console.log("今天",lunarYear,lunarMonth,lunarValue,lunarInfo)
temp[line].push(Object.assign(
{day: i,selected: true},
this.getLunarInfo(this.year,this.month+1,i),
this.getEvents(this.year,this.month+1,i),
))
this.today = [line, temp[line].length - 1]
}else{
// 普通日期
// console.log("设置可选范围",i,lunarYear,lunarMonth,lunarValue,lunarInfo)
let options = Object.assign(
{day: i,selected:false},
this.getLunarInfo(this.year,this.month+1,i),
this.getEvents(this.year,this.month+1,i),
)
if (this.begin.length>0) {
let beginTime = Number(new Date(parseInt(this.begin[0]),parseInt(this.begin[1]) - 1,parseInt(this.begin[2])))
if (beginTime > Number(new Date(this.year, this.month, i))) options.disabled = true
}
if (this.end.length>0){
let endTime = Number(new Date(parseInt(this.end[0]),parseInt(this.end[1]) - 1,parseInt(this.end[2])))
if (endTime < Number(new Date(this.year, this.month, i))) options.disabled = true
}
if (this.disabled.length>0){
if (this.disabled.filter(v => {return this.year === v[0] && this.month === v[1]-1 && i === v[2] }).length>0) {
options.disabled = true
}
}
temp[line].push(options)
}
}
// 到周六换行
if (day == 6 && i < lastDateOfMonth) {
line++
}else if (i == lastDateOfMonth) {
// line++
let k = 1
for (let d=day; d < 6; d++) {
// console.log(this.computedNextYear()+"-"+this.computedNextMonth(true)+"-"+k)
temp[line].push(Object.assign(
{day: k,disabled: true},
this.getLunarInfo(this.computedNextYear(),this.computedNextMonth(true),k),
this.getEvents(this.computedNextYear(),this.computedNextMonth(true),k),
))
k++
}
// 下个月除了补充的前几天开始的日期
nextMonthPushDays=k
}
} //end for
// console.log(this.year+"/"+this.month+"/"+this.day+":"+line)
// 补充第六行让视觉稳定
if(line<=5 && nextMonthPushDays>0){
// console.log({nextMonthPushDays:nextMonthPushDays,line:line})
for (let i = line+1; i<=5; i++) {
temp[i] = []
let start=nextMonthPushDays+(i-line-1)*7
for (let d=start; d <= start+6; d++) {
temp[i].push(Object.assign(
{day: d,disabled: true},
this.getLunarInfo(this.computedNextYear(),this.computedNextMonth(true),d),
this.getEvents(this.computedNextYear(),this.computedNextMonth(true),d),
))
}
}
}
this.days = temp
},
computedPrevYear(){
let value=this.year
if(this.month-1<0){
value--
}
return value
},
computedPrevMonth(isString){
let value=this.month
if(this.month-1<0){
value=11
}else{
value--
}
// 用于显示目的一般月份是从0开始的
if(isString){
return value+1
}
return value
},
computedNextYear(){
let value=this.year
if(this.month+1>11){
value++
}
return value
},
computedNextMonth(isString){
let value=this.month
if(this.month+1>11){
value=0
}else{
value++
}
// 用于显示目的一般月份是从0开始的
if(isString){
return value+1
}
return value
},
// 获取农历信息
getLunarInfo(y,m,d){
let lunarInfo=calendar.solar2lunar(y,m,d)
let lunarValue=lunarInfo.IDayCn
// console.log(lunarInfo)
let isLunarFestival=false
let isGregorianFestival=false
if(this.festival.lunar[lunarInfo.lMonth+"-"+lunarInfo.lDay]!=undefined){
lunarValue=this.festival.lunar[lunarInfo.lMonth+"-"+lunarInfo.lDay]
isLunarFestival=true
}else if(this.festival.gregorian[m+"-"+d]!=undefined){
lunarValue=this.festival.gregorian[m+"-"+d]
isGregorianFestival=true
}
return {
lunar:lunarValue,
isLunarFestival:isLunarFestival,
isGregorianFestival:isGregorianFestival,
}
},
// 获取自定义事件
getEvents(y,m,d){
if(Object.keys(this.events).length==0)return false;
let eventName=this.events[y+"-"+m+"-"+d]
let data={}
if(eventName!=undefined){
data.eventName=eventName
}
return data
},
// 上月
prev(e) {
e.stopPropagation()
if (this.month == 0) {
this.month = 11
this.year = parseInt(this.year) - 1
} else {
this.month = parseInt(this.month) - 1
}
this.$emit('search', this.year, this.month+1) // 调用父组件方法
this.render(this.year, this.month)
this.$emit('selectMonth',this.month+1,this.year)
this.$emit('prev',this.month+1,this.year)
},
// 下月
next(e) {
e.stopPropagation()
if (this.month == 11) {
this.month = 0
this.year = parseInt(this.year) + 1
} else {
this.month = parseInt(this.month) + 1
}
this.$emit('search', this.year, this.month+1) // 调用父组件方法
this.render(this.year, this.month)
this.$emit('selectMonth',this.month+1,this.year)
this.$emit('next',this.month+1,this.year)
},
// 选中日期
select(k1, k2, e) {
if (e != undefined) e.stopPropagation()
// 日期范围
if (this.range) {
if (this.rangeBegin.length == 0 || this.rangeEndTemp != 0) {
this.rangeBegin = [this.year, this.month,this.days[k1][k2].day]
this.rangeBeginTemp = this.rangeBegin
this.rangeEnd = [this.year, this.month, this.days[k1][k2].day]
this.rangeEndTemp = 0
} else {
this.rangeEnd = [this.year, this.month,this.days[k1][k2].day]
this.rangeEndTemp = 1
// 判断结束日期小于开始日期则自动颠倒过来
if (+new Date(this.rangeEnd[0], this.rangeEnd[1], this.rangeEnd[2]) < +new Date(this.rangeBegin[0], this.rangeBegin[1], this.rangeBegin[2])) {
this.rangeBegin = this.rangeEnd
this.rangeEnd = this.rangeBeginTemp
}
// 小于10左边打补丁
let begin=[]
let end=[]
if(this.zero){
this.rangeBegin.forEach((v,k)=>{
if(k==1)v=v+1
begin.push(this.zeroPad(v))
})
this.rangeEnd.forEach((v,k)=>{
if(k==1)v=v+1
end.push(this.zeroPad(v))
})
}else{
begin=this.rangeBegin
end=this.rangeEnd
}
// console.log("选中日期",begin,end)
this.$emit('select',begin,end)
}
this.render(this.year, this.month)
}else if (this.multi) {
// 如果已经选过则过滤掉
let filterDay=this.multiDays.filter(v => {
return this.year === v[0] && this.month === v[1]-1 && this.days[k1][k2].day === v[2]
})
if( filterDay.length>0 ){
this.multiDays=this.multiDays.filter(v=> {
return this.year !== v[0] || this.month !== v[1]-1 || this.days[k1][k2].day !== v[2]
})
}else{
this.multiDays.push([this.year,this.month+1,this.days[k1][k2].day]);
}
this.days[k1][k2].selected = !this.days[k1][k2].selected
this.$emit('select',this.multiDays)
} else {
// 取消上次选中
if (this.today.length > 0) {
this.days.forEach(v=>{
v.forEach(vv=>{
vv.selected= false
})
})
}
// 设置当前选中天
this.days[k1][k2].selected = true
this.day = this.days[k1][k2].day
this.today = [k1, k2]
this.$emit('select',[this.year,this.zero?this.zeroPad(this.month + 1):this.month + 1,this.zero?this.zeroPad(this.days[k1][k2].day):this.days[k1][k2].day])
}
},
changeYear(){
if(this.yearsShow){
this.yearsShow=false
return false
}
this.yearsShow=true
this.years=[];
for(let i=~~this.year-10;i<~~this.year+10;i++){
this.years.push(i)
}
},
selectYear(value){
this.yearsShow=false
this.year=value
this.render(this.year,this.month)
this.$emit('selectYear',value)
this.$emit('search', this.year, this.month+1) // 调用父组件方法
},
// 返回今天
setToday(){
let now = new Date();
this.year = now.getFullYear()
this.month = now.getMonth()
this.day = now.getDate()
this.render(this.year,this.month)
// 遍历当前日找到选中
this.days.forEach(v => {
let day=v.find(vv => {
return vv.day==this.day && !vv.disabled
})
if(day!=undefined ){
day.selected=true
}
})
},
// 日期补零
zeroPad(n){
return String(n < 10 ? '0' + n : n)
},
}
}
/* eslint-enable */
</script>

View File

@@ -0,0 +1,58 @@
<template>
<div>
<svg
:class="{'is-active':isActive}"
t="1492500959545"
class="hamburger"
style="fill: #ffffff"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="1691"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="64"
height="64"
@click="toggleClick">
<path
d="M966.8023 568.849776 57.196677 568.849776c-31.397081 0-56.850799-25.452695-56.850799-56.850799l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 543.397081 998.200404 568.849776 966.8023 568.849776z"
p-id="1692" />
<path
d="M966.8023 881.527125 57.196677 881.527125c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.849776 56.850799-56.849776l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.849776l0 0C1023.653099 856.07443 998.200404 881.527125 966.8023 881.527125z"
p-id="1693" />
<path
d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z"
p-id="1694" />
</svg>
</div>
</template>
<script>
export default {
name: 'Hamburger',
props: {
isActive: {
type: Boolean,
default: false
},
toggleClick: {
type: Function,
default: null
}
}
}
</script>
<style scoped>
.hamburger {
display: inline-block;
cursor: pointer;
width: 20px;
height: 20px;
transform: rotate(90deg);
transition: .38s;
transform-origin: 50% 50%;
}
.hamburger.is-active {
transform: rotate(0deg);
}
</style>

View File

@@ -0,0 +1,72 @@
<template>
<div ref="scrollContainer" class="scroll-container" @wheel.prevent="handleScroll">
<div ref="scrollWrapper" :style="{left: left + 'px'}" class="scroll-wrapper">
<slot/>
</div>
</div>
</template>
<script>
const padding = 15 // tag's padding
export default {
name: 'ScrollPane',
data() {
return {
left: 0
}
},
methods: {
handleScroll(e) {
const eventDelta = e.wheelDelta || -e.deltaY * 3
const $container = this.$refs.scrollContainer
const $containerWidth = $container.offsetWidth
const $wrapper = this.$refs.scrollWrapper
const $wrapperWidth = $wrapper.offsetWidth
if (eventDelta > 0) {
this.left = Math.min(0, this.left + eventDelta)
} else {
if ($containerWidth - padding < $wrapperWidth) {
if (this.left < -($wrapperWidth - $containerWidth + padding)) {
this.left = this.left
} else {
this.left = Math.max(this.left + eventDelta, $containerWidth - $wrapperWidth - padding)
}
} else {
this.left = 0
}
}
},
moveToTarget($target) {
const $container = this.$refs.scrollContainer
const $containerWidth = $container.offsetWidth
const $targetLeft = $target.offsetLeft
const $targetWidth = $target.offsetWidth
if ($targetLeft < -this.left) {
// tag in the left
this.left = -$targetLeft + padding
} else if ($targetLeft + padding > -this.left && $targetLeft + $targetWidth < -this.left + $containerWidth - padding) {
// tag in the current view
// eslint-disable-line
} else {
// tag in the right
this.left = -($targetLeft - ($containerWidth - $targetWidth) + padding)
}
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.scroll-container {
white-space: nowrap;
position: relative;
overflow: hidden;
width: 100%;
.scroll-wrapper {
position: absolute;
}
}
</style>

View File

@@ -0,0 +1,91 @@
<template>
<div :style="{height:height+'px',zIndex:zIndex}">
<div
:class="className"
:style="{top:(isSticky ? stickyTop +'px' : ''),zIndex:zIndex,position:position,width:width,height:height+'px'}"
>
<slot>
<div>sticky</div>
</slot>
</div>
</div>
</template>
<script>
export default {
name: 'Sticky',
props: {
stickyTop: {
type: Number,
default: 0
},
zIndex: {
type: Number,
default: 1
},
className: {
type: String,
default: ''
}
},
data() {
return {
active: false,
position: '',
width: undefined,
height: undefined,
isSticky: false
}
},
mounted() {
this.height = this.$el.getBoundingClientRect().height
window.addEventListener('scroll', this.handleScroll)
window.addEventListener('resize', this.handleReize)
},
activated() {
this.handleScroll()
},
destroyed() {
window.removeEventListener('scroll', this.handleScroll)
window.removeEventListener('resize', this.handleReize)
},
methods: {
sticky() {
if (this.active) {
return
}
this.position = 'fixed'
this.active = true
this.width = this.width + 'px'
this.isSticky = true
},
handleReset() {
if (!this.active) {
return
}
this.reset()
},
reset() {
this.position = ''
this.width = 'auto'
this.active = false
this.isSticky = false
},
handleScroll() {
const width = this.$el.getBoundingClientRect().width
this.width = width || 'auto'
const offsetTop = this.$el.getBoundingClientRect().top
if (offsetTop < this.stickyTop) {
this.sticky()
return
}
this.handleReset()
},
handleReize() {
if (this.isSticky) {
this.width = this.$el.getBoundingClientRect().width + 'px'
}
}
}
}
</script>

View File

@@ -0,0 +1,43 @@
<template>
<svg :class="svgClass" aria-hidden="true">
<use :xlink:href="iconName"/>
</svg>
</template>
<script>
export default {
name: 'SvgIcon',
props: {
iconClass: {
type: String,
required: true
},
className: {
type: String,
default: ''
}
},
computed: {
iconName() {
return `#icon-${this.iconClass}`
},
svgClass() {
if (this.className) {
return 'svg-icon ' + this.className
} else {
return 'svg-icon'
}
}
}
}
</script>
<style scoped>
.svg-icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</style>

View File

@@ -0,0 +1,103 @@
<template>
<div class="upload-container">
<el-button :style="{background:color,borderColor:color}" icon="el-icon-upload" size="mini" type="primary" @click=" dialogVisible=true">上传图片
</el-button>
<el-dialog :visible.sync="dialogVisible">
<el-upload
:multiple="true"
:file-list="fileList"
:show-file-list="true"
:on-remove="handleRemove"
:on-success="handleSuccess"
:before-upload="beforeUpload"
class="editor-slide-upload"
action="https://httpbin.org/post"
list-type="picture-card">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="handleSubmit"> </el-button>
</el-dialog>
</div>
</template>
<script>
// import { getToken } from 'api/qiniu'
export default {
name: 'EditorSlideUpload',
props: {
color: {
type: String,
default: '#1890ff'
}
},
data() {
return {
dialogVisible: false,
listObj: {},
fileList: []
}
},
methods: {
checkAllSuccess() {
return Object.keys(this.listObj).every(item => this.listObj[item].hasSuccess)
},
handleSubmit() {
const arr = Object.keys(this.listObj).map(v => this.listObj[v])
if (!this.checkAllSuccess()) {
this.$message('请等待所有图片上传成功 或 出现了网络问题,请刷新页面重新上传!')
return
}
this.$emit('successCBK', arr)
this.listObj = {}
this.fileList = []
this.dialogVisible = false
},
handleSuccess(response, file) {
const uid = file.uid
const objKeyArr = Object.keys(this.listObj)
for (let i = 0, len = objKeyArr.length; i < len; i++) {
if (this.listObj[objKeyArr[i]].uid === uid) {
this.listObj[objKeyArr[i]].url = response.files.file
this.listObj[objKeyArr[i]].hasSuccess = true
return
}
}
},
handleRemove(file) {
const uid = file.uid
const objKeyArr = Object.keys(this.listObj)
for (let i = 0, len = objKeyArr.length; i < len; i++) {
if (this.listObj[objKeyArr[i]].uid === uid) {
delete this.listObj[objKeyArr[i]]
return
}
}
},
beforeUpload(file) {
const _self = this
const _URL = window.URL || window.webkitURL
const fileName = file.uid
this.listObj[fileName] = {}
return new Promise((resolve, reject) => {
const img = new Image()
img.src = _URL.createObjectURL(file)
img.onload = function() {
_self.listObj[fileName] = { hasSuccess: false, uid: file.uid, width: this.width, height: this.height }
}
resolve(true)
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.editor-slide-upload {
margin-bottom: 20px;
::v-deep .el-upload--picture-card {
width: 100%;
}
}
</style>

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