1
This commit is contained in:
@@ -1,14 +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
|
||||
# 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
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# just a flag
|
||||
ENV = 'development'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/api'
|
||||
|
||||
## 配置测试和本地开发时的 接口地址
|
||||
##VUE_APP_URL = "http://26077a35f5.wicp.vip"
|
||||
VUE_APP_URL = "http://anrui.yyundong.com"
|
||||
##VUE_APP_URL = "http://1mn7264414.qicp.vip"
|
||||
# just a flag
|
||||
ENV = 'development'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/api'
|
||||
|
||||
## 配置测试和本地开发时的 接口地址
|
||||
##VUE_APP_URL = "http://26077a35f5.wicp.vip"
|
||||
# VUE_APP_URL = "http://anrui.yyundong.com"
|
||||
##VUE_APP_URL = "http://1mn7264414.qicp.vip"
|
||||
VUE_APP_URL = "http://39.104.100.138:9112"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# just a flag
|
||||
ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/api'
|
||||
|
||||
## 配置 正式接口地址
|
||||
VUE_APP_URL = "http://120.46.131.15:8111"
|
||||
|
||||
# just a flag
|
||||
ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/api'
|
||||
|
||||
## 配置 正式接口地址
|
||||
VUE_APP_URL = "http://192.168.3.183:9112"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
NODE_ENV = production
|
||||
|
||||
# just a flag
|
||||
ENV = 'staging'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# just a flag
|
||||
ENV = 'staging'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
build/*.js
|
||||
src/assets
|
||||
public
|
||||
dist
|
||||
build/*.js
|
||||
src/assets
|
||||
public
|
||||
dist
|
||||
|
||||
@@ -1,199 +1,199 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true,
|
||||
},
|
||||
extends: ['plugin:vue/recommended', 'eslint:recommended'],
|
||||
|
||||
// add your custom rules here
|
||||
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||
rules: {
|
||||
"vue/max-attributes-per-line": [2, {
|
||||
"singleline": 10,
|
||||
"multiline": {
|
||||
"max": 1,
|
||||
"allowFirstLine": false
|
||||
}
|
||||
}],
|
||||
"vue/singleline-html-element-content-newline": "off",
|
||||
"vue/multiline-html-element-content-newline":"off",
|
||||
"vue/name-property-casing": ["error", "PascalCase"],
|
||||
"vue/no-v-html": "off",
|
||||
'accessor-pairs': 2,
|
||||
'arrow-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'block-spacing': [2, 'always'],
|
||||
'brace-style': [2, '1tbs', {
|
||||
'allowSingleLine': true
|
||||
}],
|
||||
'camelcase': [0, {
|
||||
'properties': 'always'
|
||||
}],
|
||||
'comma-dangle': [2, 'never'],
|
||||
'comma-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'comma-style': [2, 'last'],
|
||||
'constructor-super': 2,
|
||||
'curly': [2, 'multi-line'],
|
||||
'dot-location': [2, 'property'],
|
||||
'eol-last': 2,
|
||||
'eqeqeq': ["error", "always", {"null": "ignore"}],
|
||||
'generator-star-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'handle-callback-err': [2, '^(err|error)$'],
|
||||
// 'indent': [2, 2, {
|
||||
// 'SwitchCase': 1
|
||||
// }],
|
||||
'indent': 'off',
|
||||
'jsx-quotes': [2, 'prefer-single'],
|
||||
'key-spacing': [2, {
|
||||
'beforeColon': false,
|
||||
'afterColon': true
|
||||
}],
|
||||
'keyword-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'new-cap': [2, {
|
||||
'newIsCap': true,
|
||||
'capIsNew': false
|
||||
}],
|
||||
'new-parens': 2,
|
||||
'no-array-constructor': 2,
|
||||
'no-caller': 2,
|
||||
'no-console': 'off',
|
||||
'no-class-assign': 2,
|
||||
'no-cond-assign': 2,
|
||||
'no-const-assign': 2,
|
||||
'no-control-regex': 0,
|
||||
'no-delete-var': 2,
|
||||
'no-dupe-args': 2,
|
||||
'no-dupe-class-members': 2,
|
||||
'no-dupe-keys': 2,
|
||||
'no-duplicate-case': 2,
|
||||
'no-empty-character-class': 2,
|
||||
'no-empty-pattern': 2,
|
||||
'no-eval': 2,
|
||||
'no-ex-assign': 2,
|
||||
'no-extend-native': 2,
|
||||
'no-extra-bind': 2,
|
||||
'no-extra-boolean-cast': 2,
|
||||
'no-extra-parens': [2, 'functions'],
|
||||
'no-fallthrough': 2,
|
||||
'no-floating-decimal': 2,
|
||||
'no-func-assign': 2,
|
||||
'no-implied-eval': 2,
|
||||
'no-inner-declarations': [2, 'functions'],
|
||||
'no-invalid-regexp': 2,
|
||||
'no-irregular-whitespace': 2,
|
||||
'no-iterator': 2,
|
||||
'no-label-var': 2,
|
||||
'no-labels': [2, {
|
||||
'allowLoop': false,
|
||||
'allowSwitch': false
|
||||
}],
|
||||
'no-lone-blocks': 2,
|
||||
'no-mixed-spaces-and-tabs': 2,
|
||||
'no-multi-spaces': 2,
|
||||
'no-multi-str': 2,
|
||||
'no-multiple-empty-lines': [2, {
|
||||
'max': 1
|
||||
}],
|
||||
'no-native-reassign': 2,
|
||||
'no-negated-in-lhs': 2,
|
||||
'no-new-object': 2,
|
||||
'no-new-require': 2,
|
||||
'no-new-symbol': 2,
|
||||
'no-new-wrappers': 2,
|
||||
'no-obj-calls': 2,
|
||||
'no-octal': 2,
|
||||
'no-octal-escape': 2,
|
||||
'no-path-concat': 2,
|
||||
'no-proto': 2,
|
||||
'no-redeclare': 2,
|
||||
'no-regex-spaces': 2,
|
||||
'no-return-assign': [2, 'except-parens'],
|
||||
'no-self-assign': 2,
|
||||
'no-self-compare': 2,
|
||||
'no-sequences': 2,
|
||||
'no-shadow-restricted-names': 2,
|
||||
'no-spaced-func': 2,
|
||||
'no-sparse-arrays': 2,
|
||||
'no-this-before-super': 2,
|
||||
'no-throw-literal': 2,
|
||||
'no-trailing-spaces': 2,
|
||||
'no-undef': 2,
|
||||
'no-undef-init': 2,
|
||||
'no-unexpected-multiline': 2,
|
||||
'no-unmodified-loop-condition': 2,
|
||||
'no-unneeded-ternary': [2, {
|
||||
'defaultAssignment': false
|
||||
}],
|
||||
'no-unreachable': 2,
|
||||
'no-unsafe-finally': 2,
|
||||
'no-unused-vars': [2, {
|
||||
'vars': 'all',
|
||||
'args': 'none'
|
||||
}],
|
||||
'no-useless-call': 2,
|
||||
'no-useless-computed-key': 2,
|
||||
'no-useless-constructor': 2,
|
||||
'no-useless-escape': 0,
|
||||
'no-whitespace-before-property': 2,
|
||||
'no-with': 2,
|
||||
'one-var': [2, {
|
||||
'initialized': 'never'
|
||||
}],
|
||||
'operator-linebreak': [2, 'after', {
|
||||
'overrides': {
|
||||
'?': 'before',
|
||||
':': 'before'
|
||||
}
|
||||
}],
|
||||
'padded-blocks': [2, 'never'],
|
||||
'quotes': [2, 'single', {
|
||||
'avoidEscape': true,
|
||||
'allowTemplateLiterals': true
|
||||
}],
|
||||
'semi': [2, 'never'],
|
||||
'semi-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'space-before-blocks': [2, 'always'],
|
||||
'space-before-function-paren': [2, 'never'],
|
||||
'space-in-parens': [2, 'never'],
|
||||
'space-infix-ops': 2,
|
||||
'space-unary-ops': [2, {
|
||||
'words': true,
|
||||
'nonwords': false
|
||||
}],
|
||||
'spaced-comment': [2, 'always', {
|
||||
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
|
||||
}],
|
||||
'template-curly-spacing': [2, 'never'],
|
||||
'use-isnan': 2,
|
||||
'valid-typeof': 2,
|
||||
'wrap-iife': [2, 'any'],
|
||||
'yield-star-spacing': [2, 'both'],
|
||||
'yoda': [2, 'never'],
|
||||
'prefer-const': 2,
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'object-curly-spacing': [2, 'always', {
|
||||
objectsInObjects: false
|
||||
}],
|
||||
'array-bracket-spacing': [2, 'never']
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true,
|
||||
},
|
||||
extends: ['plugin:vue/recommended', 'eslint:recommended'],
|
||||
|
||||
// add your custom rules here
|
||||
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||
rules: {
|
||||
"vue/max-attributes-per-line": [2, {
|
||||
"singleline": 10,
|
||||
"multiline": {
|
||||
"max": 1,
|
||||
"allowFirstLine": false
|
||||
}
|
||||
}],
|
||||
"vue/singleline-html-element-content-newline": "off",
|
||||
"vue/multiline-html-element-content-newline":"off",
|
||||
"vue/name-property-casing": ["error", "PascalCase"],
|
||||
"vue/no-v-html": "off",
|
||||
'accessor-pairs': 2,
|
||||
'arrow-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'block-spacing': [2, 'always'],
|
||||
'brace-style': [2, '1tbs', {
|
||||
'allowSingleLine': true
|
||||
}],
|
||||
'camelcase': [0, {
|
||||
'properties': 'always'
|
||||
}],
|
||||
'comma-dangle': [2, 'never'],
|
||||
'comma-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'comma-style': [2, 'last'],
|
||||
'constructor-super': 2,
|
||||
'curly': [2, 'multi-line'],
|
||||
'dot-location': [2, 'property'],
|
||||
'eol-last': 2,
|
||||
'eqeqeq': ["error", "always", {"null": "ignore"}],
|
||||
'generator-star-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'handle-callback-err': [2, '^(err|error)$'],
|
||||
// 'indent': [2, 2, {
|
||||
// 'SwitchCase': 1
|
||||
// }],
|
||||
'indent': 'off',
|
||||
'jsx-quotes': [2, 'prefer-single'],
|
||||
'key-spacing': [2, {
|
||||
'beforeColon': false,
|
||||
'afterColon': true
|
||||
}],
|
||||
'keyword-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'new-cap': [2, {
|
||||
'newIsCap': true,
|
||||
'capIsNew': false
|
||||
}],
|
||||
'new-parens': 2,
|
||||
'no-array-constructor': 2,
|
||||
'no-caller': 2,
|
||||
'no-console': 'off',
|
||||
'no-class-assign': 2,
|
||||
'no-cond-assign': 2,
|
||||
'no-const-assign': 2,
|
||||
'no-control-regex': 0,
|
||||
'no-delete-var': 2,
|
||||
'no-dupe-args': 2,
|
||||
'no-dupe-class-members': 2,
|
||||
'no-dupe-keys': 2,
|
||||
'no-duplicate-case': 2,
|
||||
'no-empty-character-class': 2,
|
||||
'no-empty-pattern': 2,
|
||||
'no-eval': 2,
|
||||
'no-ex-assign': 2,
|
||||
'no-extend-native': 2,
|
||||
'no-extra-bind': 2,
|
||||
'no-extra-boolean-cast': 2,
|
||||
'no-extra-parens': [2, 'functions'],
|
||||
'no-fallthrough': 2,
|
||||
'no-floating-decimal': 2,
|
||||
'no-func-assign': 2,
|
||||
'no-implied-eval': 2,
|
||||
'no-inner-declarations': [2, 'functions'],
|
||||
'no-invalid-regexp': 2,
|
||||
'no-irregular-whitespace': 2,
|
||||
'no-iterator': 2,
|
||||
'no-label-var': 2,
|
||||
'no-labels': [2, {
|
||||
'allowLoop': false,
|
||||
'allowSwitch': false
|
||||
}],
|
||||
'no-lone-blocks': 2,
|
||||
'no-mixed-spaces-and-tabs': 2,
|
||||
'no-multi-spaces': 2,
|
||||
'no-multi-str': 2,
|
||||
'no-multiple-empty-lines': [2, {
|
||||
'max': 1
|
||||
}],
|
||||
'no-native-reassign': 2,
|
||||
'no-negated-in-lhs': 2,
|
||||
'no-new-object': 2,
|
||||
'no-new-require': 2,
|
||||
'no-new-symbol': 2,
|
||||
'no-new-wrappers': 2,
|
||||
'no-obj-calls': 2,
|
||||
'no-octal': 2,
|
||||
'no-octal-escape': 2,
|
||||
'no-path-concat': 2,
|
||||
'no-proto': 2,
|
||||
'no-redeclare': 2,
|
||||
'no-regex-spaces': 2,
|
||||
'no-return-assign': [2, 'except-parens'],
|
||||
'no-self-assign': 2,
|
||||
'no-self-compare': 2,
|
||||
'no-sequences': 2,
|
||||
'no-shadow-restricted-names': 2,
|
||||
'no-spaced-func': 2,
|
||||
'no-sparse-arrays': 2,
|
||||
'no-this-before-super': 2,
|
||||
'no-throw-literal': 2,
|
||||
'no-trailing-spaces': 2,
|
||||
'no-undef': 2,
|
||||
'no-undef-init': 2,
|
||||
'no-unexpected-multiline': 2,
|
||||
'no-unmodified-loop-condition': 2,
|
||||
'no-unneeded-ternary': [2, {
|
||||
'defaultAssignment': false
|
||||
}],
|
||||
'no-unreachable': 2,
|
||||
'no-unsafe-finally': 2,
|
||||
'no-unused-vars': [2, {
|
||||
'vars': 'all',
|
||||
'args': 'none'
|
||||
}],
|
||||
'no-useless-call': 2,
|
||||
'no-useless-computed-key': 2,
|
||||
'no-useless-constructor': 2,
|
||||
'no-useless-escape': 0,
|
||||
'no-whitespace-before-property': 2,
|
||||
'no-with': 2,
|
||||
'one-var': [2, {
|
||||
'initialized': 'never'
|
||||
}],
|
||||
'operator-linebreak': [2, 'after', {
|
||||
'overrides': {
|
||||
'?': 'before',
|
||||
':': 'before'
|
||||
}
|
||||
}],
|
||||
'padded-blocks': [2, 'never'],
|
||||
'quotes': [2, 'single', {
|
||||
'avoidEscape': true,
|
||||
'allowTemplateLiterals': true
|
||||
}],
|
||||
'semi': [2, 'never'],
|
||||
'semi-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'space-before-blocks': [2, 'always'],
|
||||
'space-before-function-paren': [2, 'never'],
|
||||
'space-in-parens': [2, 'never'],
|
||||
'space-infix-ops': 2,
|
||||
'space-unary-ops': [2, {
|
||||
'words': true,
|
||||
'nonwords': false
|
||||
}],
|
||||
'spaced-comment': [2, 'always', {
|
||||
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
|
||||
}],
|
||||
'template-curly-spacing': [2, 'never'],
|
||||
'use-isnan': 2,
|
||||
'valid-typeof': 2,
|
||||
'wrap-iife': [2, 'any'],
|
||||
'yield-star-spacing': [2, 'both'],
|
||||
'yoda': [2, 'never'],
|
||||
'prefer-const': 2,
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'object-curly-spacing': [2, 'always', {
|
||||
objectsInObjects: false
|
||||
}],
|
||||
'array-bracket-spacing': [2, 'never']
|
||||
}
|
||||
}
|
||||
|
||||
32
demo-web-ui/.gitignore
vendored
32
demo-web-ui/.gitignore
vendored
@@ -1,16 +1,16 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
package-lock.json
|
||||
tests/**/coverage/
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
package-lock.json
|
||||
tests/**/coverage/
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>anrui-system-ui</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.aptana.ide.core.unifiedBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.aptana.projects.webnature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1629107336958</id>
|
||||
<name></name>
|
||||
<type>26</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-node_modules</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>anrui-system-ui</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.aptana.ide.core.unifiedBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.aptana.projects.webnature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1629107336958</id>
|
||||
<name></name>
|
||||
<type>26</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-node_modules</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
language: node_js
|
||||
node_js: 10
|
||||
script: npm run test
|
||||
notifications:
|
||||
email: false
|
||||
language: node_js
|
||||
node_js: 10
|
||||
script: npm run test
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
@@ -1,21 +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.
|
||||
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.
|
||||
|
||||
@@ -1,90 +1,90 @@
|
||||
# vue-admin-template
|
||||
|
||||
English | [简体中文](./README-zh.md)
|
||||
|
||||
> A minimal vue admin template with Element UI & axios & iconfont & permission control & lint
|
||||
|
||||
**Live demo:** http://panjiachen.github.io/vue-admin-template
|
||||
|
||||
|
||||
**The current version is `v4.0+` build on `vue-cli`. If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0), it does not rely on `vue-cli`**
|
||||
|
||||
## Build Setup
|
||||
|
||||
```bash
|
||||
# clone the project
|
||||
git clone https://github.com/PanJiaChen/vue-admin-template.git
|
||||
|
||||
# enter the project directory
|
||||
cd vue-admin-template
|
||||
|
||||
# install dependency
|
||||
npm install
|
||||
|
||||
# develop
|
||||
npm run dev
|
||||
```
|
||||
|
||||
This will automatically open http://localhost:9528
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
# build for test environment
|
||||
npm run build:stage
|
||||
|
||||
# build for production environment
|
||||
npm run build:prod
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
```bash
|
||||
# preview the release environment effect
|
||||
npm run preview
|
||||
|
||||
# preview the release environment effect + static resource analysis
|
||||
npm run preview -- --report
|
||||
|
||||
# code format check
|
||||
npm run lint
|
||||
|
||||
# code format check and auto fix
|
||||
npm run lint -- --fix
|
||||
```
|
||||
|
||||
Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information
|
||||
|
||||
## Demo
|
||||
|
||||

|
||||
|
||||
## Extra
|
||||
|
||||
If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)
|
||||
|
||||
For `typescript` version, you can use [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
|
||||
|
||||
## Related Project
|
||||
|
||||
- [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
|
||||
|
||||
- [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
||||
|
||||
- [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)
|
||||
|
||||
- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312)
|
||||
|
||||
## Browsers support
|
||||
|
||||
Modern browsers and Internet Explorer 10+.
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
|
||||
| --------- | --------- | --------- | --------- |
|
||||
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.
|
||||
|
||||
Copyright (c) 2017-present PanJiaChen
|
||||
# vue-admin-template
|
||||
|
||||
English | [简体中文](./README-zh.md)
|
||||
|
||||
> A minimal vue admin template with Element UI & axios & iconfont & permission control & lint
|
||||
|
||||
**Live demo:** http://panjiachen.github.io/vue-admin-template
|
||||
|
||||
|
||||
**The current version is `v4.0+` build on `vue-cli`. If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0), it does not rely on `vue-cli`**
|
||||
|
||||
## Build Setup
|
||||
|
||||
```bash
|
||||
# clone the project
|
||||
git clone https://github.com/PanJiaChen/vue-admin-template.git
|
||||
|
||||
# enter the project directory
|
||||
cd vue-admin-template
|
||||
|
||||
# install dependency
|
||||
npm install
|
||||
|
||||
# develop
|
||||
npm run dev
|
||||
```
|
||||
|
||||
This will automatically open http://localhost:9528
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
# build for test environment
|
||||
npm run build:stage
|
||||
|
||||
# build for production environment
|
||||
npm run build:prod
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
```bash
|
||||
# preview the release environment effect
|
||||
npm run preview
|
||||
|
||||
# preview the release environment effect + static resource analysis
|
||||
npm run preview -- --report
|
||||
|
||||
# code format check
|
||||
npm run lint
|
||||
|
||||
# code format check and auto fix
|
||||
npm run lint -- --fix
|
||||
```
|
||||
|
||||
Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information
|
||||
|
||||
## Demo
|
||||
|
||||

|
||||
|
||||
## Extra
|
||||
|
||||
If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)
|
||||
|
||||
For `typescript` version, you can use [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
|
||||
|
||||
## Related Project
|
||||
|
||||
- [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
|
||||
|
||||
- [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
|
||||
|
||||
- [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)
|
||||
|
||||
- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312)
|
||||
|
||||
## Browsers support
|
||||
|
||||
Modern browsers and Internet Explorer 10+.
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
|
||||
| --------- | --------- | --------- | --------- |
|
||||
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.
|
||||
|
||||
Copyright (c) 2017-present PanJiaChen
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
module.exports = {
|
||||
/* presets: [
|
||||
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
],*/
|
||||
presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ],
|
||||
|
||||
'env': {
|
||||
'development': {
|
||||
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
|
||||
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
|
||||
// https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
|
||||
'plugins': ['dynamic-import-node']
|
||||
}
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
/* presets: [
|
||||
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
],*/
|
||||
presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ],
|
||||
|
||||
'env': {
|
||||
'development': {
|
||||
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
|
||||
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
|
||||
// https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
|
||||
'plugins': ['dynamic-import-node']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
const { run } = require('runjs')
|
||||
const chalk = require('chalk')
|
||||
const config = require('../vue.config.js')
|
||||
const rawArgv = process.argv.slice(2)
|
||||
const args = rawArgv.join(' ')
|
||||
|
||||
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
|
||||
const report = rawArgv.includes('--report')
|
||||
|
||||
run(`vue-cli-service build ${args}`)
|
||||
|
||||
const port = 9526
|
||||
const publicPath = config.publicPath
|
||||
|
||||
var connect = require('connect')
|
||||
var serveStatic = require('serve-static')
|
||||
const app = connect()
|
||||
|
||||
app.use(
|
||||
publicPath,
|
||||
serveStatic('./dist', {
|
||||
index: ['index.html', '/']
|
||||
})
|
||||
)
|
||||
|
||||
app.listen(port, function () {
|
||||
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
|
||||
if (report) {
|
||||
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
run(`vue-cli-service build ${args}`)
|
||||
}
|
||||
const { run } = require('runjs')
|
||||
const chalk = require('chalk')
|
||||
const config = require('../vue.config.js')
|
||||
const rawArgv = process.argv.slice(2)
|
||||
const args = rawArgv.join(' ')
|
||||
|
||||
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
|
||||
const report = rawArgv.includes('--report')
|
||||
|
||||
run(`vue-cli-service build ${args}`)
|
||||
|
||||
const port = 9526
|
||||
const publicPath = config.publicPath
|
||||
|
||||
var connect = require('connect')
|
||||
var serveStatic = require('serve-static')
|
||||
const app = connect()
|
||||
|
||||
app.use(
|
||||
publicPath,
|
||||
serveStatic('./dist', {
|
||||
index: ['index.html', '/']
|
||||
})
|
||||
)
|
||||
|
||||
app.listen(port, function () {
|
||||
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
|
||||
if (report) {
|
||||
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
run(`vue-cli-service build ${args}`)
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
module.exports = {
|
||||
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
|
||||
transform: {
|
||||
'^.+\\.vue$': 'vue-jest',
|
||||
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
|
||||
'jest-transform-stub',
|
||||
'^.+\\.jsx?$': 'babel-jest'
|
||||
},
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1'
|
||||
},
|
||||
snapshotSerializers: ['jest-serializer-vue'],
|
||||
testMatch: [
|
||||
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
|
||||
],
|
||||
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
|
||||
coverageDirectory: '<rootDir>/tests/unit/coverage',
|
||||
// 'collectCoverage': true,
|
||||
'coverageReporters': [
|
||||
'lcov',
|
||||
'text-summary'
|
||||
],
|
||||
testURL: 'http://localhost/'
|
||||
}
|
||||
module.exports = {
|
||||
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
|
||||
transform: {
|
||||
'^.+\\.vue$': 'vue-jest',
|
||||
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
|
||||
'jest-transform-stub',
|
||||
'^.+\\.jsx?$': 'babel-jest'
|
||||
},
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1'
|
||||
},
|
||||
snapshotSerializers: ['jest-serializer-vue'],
|
||||
testMatch: [
|
||||
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
|
||||
],
|
||||
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
|
||||
coverageDirectory: '<rootDir>/tests/unit/coverage',
|
||||
// 'collectCoverage': true,
|
||||
'coverageReporters': [
|
||||
'lcov',
|
||||
'text-summary'
|
||||
],
|
||||
testURL: 'http://localhost/'
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
const Mock = require('mockjs')
|
||||
const { param2Obj } = require('./utils')
|
||||
|
||||
const user = require('./user')
|
||||
const table = require('./table')
|
||||
|
||||
const mocks = [
|
||||
...user,
|
||||
...table
|
||||
]
|
||||
|
||||
// for front mock
|
||||
// please use it cautiously, it will redefine XMLHttpRequest,
|
||||
// which will cause many of your third-party libraries to be invalidated(like progress event).
|
||||
function mockXHR() {
|
||||
// mock patch
|
||||
// https://github.com/nuysoft/Mock/issues/300
|
||||
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
|
||||
Mock.XHR.prototype.send = function() {
|
||||
if (this.custom.xhr) {
|
||||
this.custom.xhr.withCredentials = this.withCredentials || false
|
||||
|
||||
if (this.responseType) {
|
||||
this.custom.xhr.responseType = this.responseType
|
||||
}
|
||||
}
|
||||
this.proxy_send(...arguments)
|
||||
}
|
||||
|
||||
function XHR2ExpressReqWrap(respond) {
|
||||
return function(options) {
|
||||
let result = null
|
||||
if (respond instanceof Function) {
|
||||
const { body, type, url } = options
|
||||
// https://expressjs.com/en/4x/api.html#req
|
||||
result = respond({
|
||||
method: type,
|
||||
body: JSON.parse(body),
|
||||
query: param2Obj(url)
|
||||
})
|
||||
} else {
|
||||
result = respond
|
||||
}
|
||||
return Mock.mock(result)
|
||||
}
|
||||
}
|
||||
|
||||
for (const i of mocks) {
|
||||
Mock.mock(new RegExp(i.url), i.type || 'get', XHR2ExpressReqWrap(i.response))
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
mocks,
|
||||
mockXHR
|
||||
}
|
||||
|
||||
const Mock = require('mockjs')
|
||||
const { param2Obj } = require('./utils')
|
||||
|
||||
const user = require('./user')
|
||||
const table = require('./table')
|
||||
|
||||
const mocks = [
|
||||
...user,
|
||||
...table
|
||||
]
|
||||
|
||||
// for front mock
|
||||
// please use it cautiously, it will redefine XMLHttpRequest,
|
||||
// which will cause many of your third-party libraries to be invalidated(like progress event).
|
||||
function mockXHR() {
|
||||
// mock patch
|
||||
// https://github.com/nuysoft/Mock/issues/300
|
||||
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
|
||||
Mock.XHR.prototype.send = function() {
|
||||
if (this.custom.xhr) {
|
||||
this.custom.xhr.withCredentials = this.withCredentials || false
|
||||
|
||||
if (this.responseType) {
|
||||
this.custom.xhr.responseType = this.responseType
|
||||
}
|
||||
}
|
||||
this.proxy_send(...arguments)
|
||||
}
|
||||
|
||||
function XHR2ExpressReqWrap(respond) {
|
||||
return function(options) {
|
||||
let result = null
|
||||
if (respond instanceof Function) {
|
||||
const { body, type, url } = options
|
||||
// https://expressjs.com/en/4x/api.html#req
|
||||
result = respond({
|
||||
method: type,
|
||||
body: JSON.parse(body),
|
||||
query: param2Obj(url)
|
||||
})
|
||||
} else {
|
||||
result = respond
|
||||
}
|
||||
return Mock.mock(result)
|
||||
}
|
||||
}
|
||||
|
||||
for (const i of mocks) {
|
||||
Mock.mock(new RegExp(i.url), i.type || 'get', XHR2ExpressReqWrap(i.response))
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
mocks,
|
||||
mockXHR
|
||||
}
|
||||
|
||||
|
||||
@@ -1,81 +1,81 @@
|
||||
const chokidar = require('chokidar')
|
||||
const bodyParser = require('body-parser')
|
||||
const chalk = require('chalk')
|
||||
const path = require('path')
|
||||
const Mock = require('mockjs')
|
||||
|
||||
const mockDir = path.join(process.cwd(), 'mock')
|
||||
|
||||
function registerRoutes(app) {
|
||||
let mockLastIndex
|
||||
const { mocks } = require('./index.js')
|
||||
const mocksForServer = mocks.map(route => {
|
||||
return responseFake(route.url, route.type, route.response)
|
||||
})
|
||||
for (const mock of mocksForServer) {
|
||||
app[mock.type](mock.url, mock.response)
|
||||
mockLastIndex = app._router.stack.length
|
||||
}
|
||||
const mockRoutesLength = Object.keys(mocksForServer).length
|
||||
return {
|
||||
mockRoutesLength: mockRoutesLength,
|
||||
mockStartIndex: mockLastIndex - mockRoutesLength
|
||||
}
|
||||
}
|
||||
|
||||
function unregisterRoutes() {
|
||||
Object.keys(require.cache).forEach(i => {
|
||||
if (i.includes(mockDir)) {
|
||||
delete require.cache[require.resolve(i)]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// for mock server
|
||||
const responseFake = (url, type, respond) => {
|
||||
return {
|
||||
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
|
||||
type: type || 'get',
|
||||
response(req, res) {
|
||||
console.log('request invoke:' + req.path)
|
||||
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = app => {
|
||||
// parse app.body
|
||||
// https://expressjs.com/en/4x/api.html#req.body
|
||||
app.use(bodyParser.json())
|
||||
app.use(bodyParser.urlencoded({
|
||||
extended: true
|
||||
}))
|
||||
|
||||
const mockRoutes = registerRoutes(app)
|
||||
var mockRoutesLength = mockRoutes.mockRoutesLength
|
||||
var mockStartIndex = mockRoutes.mockStartIndex
|
||||
|
||||
// watch files, hot reload mock server
|
||||
chokidar.watch(mockDir, {
|
||||
ignored: /mock-server/,
|
||||
ignoreInitial: true
|
||||
}).on('all', (event, path) => {
|
||||
if (event === 'change' || event === 'add') {
|
||||
try {
|
||||
// remove mock routes stack
|
||||
app._router.stack.splice(mockStartIndex, mockRoutesLength)
|
||||
|
||||
// clear routes cache
|
||||
unregisterRoutes()
|
||||
|
||||
const mockRoutes = registerRoutes(app)
|
||||
mockRoutesLength = mockRoutes.mockRoutesLength
|
||||
mockStartIndex = mockRoutes.mockStartIndex
|
||||
|
||||
console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
|
||||
} catch (error) {
|
||||
console.log(chalk.redBright(error))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const chokidar = require('chokidar')
|
||||
const bodyParser = require('body-parser')
|
||||
const chalk = require('chalk')
|
||||
const path = require('path')
|
||||
const Mock = require('mockjs')
|
||||
|
||||
const mockDir = path.join(process.cwd(), 'mock')
|
||||
|
||||
function registerRoutes(app) {
|
||||
let mockLastIndex
|
||||
const { mocks } = require('./index.js')
|
||||
const mocksForServer = mocks.map(route => {
|
||||
return responseFake(route.url, route.type, route.response)
|
||||
})
|
||||
for (const mock of mocksForServer) {
|
||||
app[mock.type](mock.url, mock.response)
|
||||
mockLastIndex = app._router.stack.length
|
||||
}
|
||||
const mockRoutesLength = Object.keys(mocksForServer).length
|
||||
return {
|
||||
mockRoutesLength: mockRoutesLength,
|
||||
mockStartIndex: mockLastIndex - mockRoutesLength
|
||||
}
|
||||
}
|
||||
|
||||
function unregisterRoutes() {
|
||||
Object.keys(require.cache).forEach(i => {
|
||||
if (i.includes(mockDir)) {
|
||||
delete require.cache[require.resolve(i)]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// for mock server
|
||||
const responseFake = (url, type, respond) => {
|
||||
return {
|
||||
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
|
||||
type: type || 'get',
|
||||
response(req, res) {
|
||||
console.log('request invoke:' + req.path)
|
||||
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = app => {
|
||||
// parse app.body
|
||||
// https://expressjs.com/en/4x/api.html#req.body
|
||||
app.use(bodyParser.json())
|
||||
app.use(bodyParser.urlencoded({
|
||||
extended: true
|
||||
}))
|
||||
|
||||
const mockRoutes = registerRoutes(app)
|
||||
var mockRoutesLength = mockRoutes.mockRoutesLength
|
||||
var mockStartIndex = mockRoutes.mockStartIndex
|
||||
|
||||
// watch files, hot reload mock server
|
||||
chokidar.watch(mockDir, {
|
||||
ignored: /mock-server/,
|
||||
ignoreInitial: true
|
||||
}).on('all', (event, path) => {
|
||||
if (event === 'change' || event === 'add') {
|
||||
try {
|
||||
// remove mock routes stack
|
||||
app._router.stack.splice(mockStartIndex, mockRoutesLength)
|
||||
|
||||
// clear routes cache
|
||||
unregisterRoutes()
|
||||
|
||||
const mockRoutes = registerRoutes(app)
|
||||
mockRoutesLength = mockRoutes.mockRoutesLength
|
||||
mockStartIndex = mockRoutes.mockStartIndex
|
||||
|
||||
console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
|
||||
} catch (error) {
|
||||
console.log(chalk.redBright(error))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
const Mock = require('mockjs')
|
||||
|
||||
const data = Mock.mock({
|
||||
'items|30': [{
|
||||
id: '@id',
|
||||
title: '@sentence(10, 20)',
|
||||
'status|1': ['published', 'draft', 'deleted'],
|
||||
author: 'name',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(300, 5000)'
|
||||
}]
|
||||
})
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
url: '/vue-admin-template/table/list',
|
||||
type: 'get',
|
||||
response: config => {
|
||||
const items = data.items
|
||||
return {
|
||||
code: 20000,
|
||||
data: {
|
||||
total: items.length,
|
||||
items: items
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
const Mock = require('mockjs')
|
||||
|
||||
const data = Mock.mock({
|
||||
'items|30': [{
|
||||
id: '@id',
|
||||
title: '@sentence(10, 20)',
|
||||
'status|1': ['published', 'draft', 'deleted'],
|
||||
author: 'name',
|
||||
display_time: '@datetime',
|
||||
pageviews: '@integer(300, 5000)'
|
||||
}]
|
||||
})
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
url: '/vue-admin-template/table/list',
|
||||
type: 'get',
|
||||
response: config => {
|
||||
const items = data.items
|
||||
return {
|
||||
code: 20000,
|
||||
data: {
|
||||
total: items.length,
|
||||
items: items
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
|
||||
const tokens = {
|
||||
admin: {
|
||||
token: 'admin-token'
|
||||
},
|
||||
editor: {
|
||||
token: 'editor-token'
|
||||
}
|
||||
}
|
||||
|
||||
const users = {
|
||||
'admin-token': {
|
||||
roles: ['admin'],
|
||||
introduction: 'I am a super administrator',
|
||||
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
|
||||
name: 'Super Admin'
|
||||
},
|
||||
'editor-token': {
|
||||
roles: ['editor'],
|
||||
introduction: 'I am an editor',
|
||||
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
|
||||
name: 'Normal Editor'
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
// user login
|
||||
{
|
||||
url: '/vue-admin-template/user/login',
|
||||
type: 'post',
|
||||
response: config => {
|
||||
const { username } = config.body
|
||||
const token = tokens[username]
|
||||
|
||||
// mock error
|
||||
if (!token) {
|
||||
return {
|
||||
code: 60204,
|
||||
message: 'Account and password are incorrect.'
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
code: 20000,
|
||||
data: token
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// get user info
|
||||
{
|
||||
url: '/vue-admin-template/user/info\.*',
|
||||
type: 'get',
|
||||
response: config => {
|
||||
const { token } = config.query
|
||||
const info = users[token]
|
||||
|
||||
// mock error
|
||||
if (!info) {
|
||||
return {
|
||||
code: 50008,
|
||||
message: 'Login failed, unable to get user details.'
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
code: 20000,
|
||||
data: info
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// user logout
|
||||
{
|
||||
url: '/vue-admin-template/user/logout',
|
||||
type: 'post',
|
||||
response: _ => {
|
||||
return {
|
||||
code: 20000,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
const tokens = {
|
||||
admin: {
|
||||
token: 'admin-token'
|
||||
},
|
||||
editor: {
|
||||
token: 'editor-token'
|
||||
}
|
||||
}
|
||||
|
||||
const users = {
|
||||
'admin-token': {
|
||||
roles: ['admin'],
|
||||
introduction: 'I am a super administrator',
|
||||
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
|
||||
name: 'Super Admin'
|
||||
},
|
||||
'editor-token': {
|
||||
roles: ['editor'],
|
||||
introduction: 'I am an editor',
|
||||
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
|
||||
name: 'Normal Editor'
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
// user login
|
||||
{
|
||||
url: '/vue-admin-template/user/login',
|
||||
type: 'post',
|
||||
response: config => {
|
||||
const { username } = config.body
|
||||
const token = tokens[username]
|
||||
|
||||
// mock error
|
||||
if (!token) {
|
||||
return {
|
||||
code: 60204,
|
||||
message: 'Account and password are incorrect.'
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
code: 20000,
|
||||
data: token
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// get user info
|
||||
{
|
||||
url: '/vue-admin-template/user/info\.*',
|
||||
type: 'get',
|
||||
response: config => {
|
||||
const { token } = config.query
|
||||
const info = users[token]
|
||||
|
||||
// mock error
|
||||
if (!info) {
|
||||
return {
|
||||
code: 50008,
|
||||
message: 'Login failed, unable to get user details.'
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
code: 20000,
|
||||
data: info
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// user logout
|
||||
{
|
||||
url: '/vue-admin-template/user/logout',
|
||||
type: 'post',
|
||||
response: _ => {
|
||||
return {
|
||||
code: 20000,
|
||||
data: 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
/**
|
||||
* @param {string} url
|
||||
* @returns {Object}
|
||||
*/
|
||||
function param2Obj(url) {
|
||||
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
|
||||
if (!search) {
|
||||
return {}
|
||||
}
|
||||
const obj = {}
|
||||
const searchArr = search.split('&')
|
||||
searchArr.forEach(v => {
|
||||
const index = v.indexOf('=')
|
||||
if (index !== -1) {
|
||||
const name = v.substring(0, index)
|
||||
const val = v.substring(index + 1, v.length)
|
||||
obj[name] = val
|
||||
}
|
||||
})
|
||||
return obj
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
param2Obj
|
||||
}
|
||||
/**
|
||||
* @param {string} url
|
||||
* @returns {Object}
|
||||
*/
|
||||
function param2Obj(url) {
|
||||
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
|
||||
if (!search) {
|
||||
return {}
|
||||
}
|
||||
const obj = {}
|
||||
const searchArr = search.split('&')
|
||||
searchArr.forEach(v => {
|
||||
const index = v.indexOf('=')
|
||||
if (index !== -1) {
|
||||
const name = v.substring(0, index)
|
||||
const val = v.substring(index + 1, v.length)
|
||||
obj[name] = val
|
||||
}
|
||||
})
|
||||
return obj
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
param2Obj
|
||||
}
|
||||
|
||||
@@ -1,72 +1,72 @@
|
||||
{
|
||||
"name": "admin-template",
|
||||
"version": "4.4.0",
|
||||
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
|
||||
"author": "Pan <panfree23@gmail.com>",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
"test:ci": "npm run lint && npm run test:unit"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "0.18.1",
|
||||
"bpmn-js": "^9.2.2",
|
||||
"core-js": "^3.19.3",
|
||||
"element-ui": "2.13.2",
|
||||
"js-cookie": "2.2.0",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"portfinder": "^1.0.21",
|
||||
"qs": "^6.9.4",
|
||||
"sass-resources-loader": "^2.1.1",
|
||||
"viewerjs": "^1.9.0",
|
||||
"vue": "2.6.10",
|
||||
"vue-amap": "^0.5.10",
|
||||
"vue-router": "3.0.6",
|
||||
"vuex": "3.1.0",
|
||||
"vuex-persistedstate": "^4.0.0",
|
||||
"xcrud": "^0.4.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "4.4.4",
|
||||
"@vue/cli-plugin-eslint": "4.4.4",
|
||||
"@vue/cli-plugin-unit-jest": "4.4.4",
|
||||
"@vue/cli-service": "4.4.4",
|
||||
"@vue/test-utils": "1.0.0-beta.29",
|
||||
"autoprefixer": "9.5.1",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-jest": "23.6.0",
|
||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"chalk": "2.4.2",
|
||||
"connect": "3.6.6",
|
||||
"css-loader": "^6.7.1",
|
||||
"eslint": "6.7.2",
|
||||
"eslint-plugin-vue": "6.2.2",
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"mockjs": "1.0.1-beta3",
|
||||
"runjs": "4.3.2",
|
||||
"sass": "1.26.8",
|
||||
"sass-loader": "8.0.2",
|
||||
"script-ext-html-webpack-plugin": "2.1.3",
|
||||
"serve-static": "1.13.2",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.2",
|
||||
"vue-template-compiler": "2.6.10"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
{
|
||||
"name": "admin-template",
|
||||
"version": "4.4.0",
|
||||
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
|
||||
"author": "Pan <panfree23@gmail.com>",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
"test:ci": "npm run lint && npm run test:unit"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "0.18.1",
|
||||
"bpmn-js": "^9.2.2",
|
||||
"core-js": "^3.19.3",
|
||||
"element-ui": "2.13.2",
|
||||
"js-cookie": "2.2.0",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"portfinder": "^1.0.21",
|
||||
"qs": "^6.9.4",
|
||||
"sass-resources-loader": "^2.1.1",
|
||||
"viewerjs": "^1.9.0",
|
||||
"vue": "2.6.10",
|
||||
"vue-amap": "^0.5.10",
|
||||
"vue-router": "3.0.6",
|
||||
"vuex": "3.1.0",
|
||||
"vuex-persistedstate": "^4.0.0",
|
||||
"xcrud": "^0.4.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "4.4.4",
|
||||
"@vue/cli-plugin-eslint": "4.4.4",
|
||||
"@vue/cli-plugin-unit-jest": "4.4.4",
|
||||
"@vue/cli-service": "4.4.4",
|
||||
"@vue/test-utils": "1.0.0-beta.29",
|
||||
"autoprefixer": "9.5.1",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-jest": "23.6.0",
|
||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"chalk": "2.4.2",
|
||||
"connect": "3.6.6",
|
||||
"css-loader": "^6.7.1",
|
||||
"eslint": "6.7.2",
|
||||
"eslint-plugin-vue": "6.2.2",
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"mockjs": "1.0.1-beta3",
|
||||
"runjs": "4.3.2",
|
||||
"sass": "1.26.8",
|
||||
"sass-loader": "8.0.2",
|
||||
"script-ext-html-webpack-plugin": "2.1.3",
|
||||
"serve-static": "1.13.2",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.2",
|
||||
"vue-template-compiler": "2.6.10"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||
|
||||
module.exports = {
|
||||
'plugins': {
|
||||
// to edit target browsers: use "browserslist" field in package.json
|
||||
'autoprefixer': {}
|
||||
}
|
||||
}
|
||||
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||
|
||||
module.exports = {
|
||||
'plugins': {
|
||||
// to edit target browsers: use "browserslist" field in package.json
|
||||
'autoprefixer': {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= webpackConfig.name %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= webpackConfig.name %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App',
|
||||
mounted() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App',
|
||||
mounted() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
import request from '@/utils/request'
|
||||
// 上传图片
|
||||
export function imageUpload(data){
|
||||
return request({
|
||||
url: '/jlcyry/file/upload',
|
||||
method: 'post',
|
||||
data,
|
||||
headers:{'Content-Type':'multipart/form-data'}
|
||||
})
|
||||
}
|
||||
// 移动端管理--新增上传插件
|
||||
export const uploadFile = '/api/portal/v1/appsubsetversion/save'
|
||||
// 移动端管理--更新上传插件
|
||||
export const upload_UpdateFile = '/api/portal/v1/appsubsetversion/update'
|
||||
// 移动端管理--框架更新上传插件
|
||||
export const upload_frameFile = '/api/portal/v1/appversion/save'
|
||||
// 移动端管理--上传icon(图标)
|
||||
export const uploadFileIcon = '/api/portal/file/upload'
|
||||
|
||||
// 图片上传
|
||||
export const uploadImgFile = '/api/portal/file/upload'
|
||||
|
||||
// 移除图片
|
||||
export function deleteFilesOss(data) {
|
||||
return request({
|
||||
url: '/base/v1/baseVehicleAppendixs/deleteFilesOss', // data,
|
||||
method: 'post',
|
||||
params: { fullPath: data }
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
// 上传图片
|
||||
export function imageUpload(data){
|
||||
return request({
|
||||
url: '/jlcyry/file/upload',
|
||||
method: 'post',
|
||||
data,
|
||||
headers:{'Content-Type':'multipart/form-data'}
|
||||
})
|
||||
}
|
||||
// 移动端管理--新增上传插件
|
||||
export const uploadFile = '/api/portal/v1/appsubsetversion/save'
|
||||
// 移动端管理--更新上传插件
|
||||
export const upload_UpdateFile = '/api/portal/v1/appsubsetversion/update'
|
||||
// 移动端管理--框架更新上传插件
|
||||
export const upload_frameFile = '/api/portal/v1/appversion/save'
|
||||
// 移动端管理--上传icon(图标)
|
||||
export const uploadFileIcon = '/api/portal/file/upload'
|
||||
|
||||
// 图片上传
|
||||
export const uploadImgFile = '/api/portal/file/upload'
|
||||
|
||||
// 移除图片
|
||||
export function deleteFilesOss(data) {
|
||||
return request({
|
||||
url: '/base/v1/baseVehicleAppendixs/deleteFilesOss', // data,
|
||||
method: 'post',
|
||||
params: { fullPath: data }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
//区域获取省
|
||||
export function getProvince(data) {
|
||||
return request({
|
||||
url: '/system/region/getProvince',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//根据省sid获取该省的所有市
|
||||
export function getCity(data) {
|
||||
return request({
|
||||
url: '/system/region/getCity',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//根据市sid获取该市的所有县区
|
||||
export function getCounty(data) {
|
||||
return request({
|
||||
url: '/system/region/getCounty',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
//区域获取省
|
||||
export function getProvince(data) {
|
||||
return request({
|
||||
url: '/system/region/getProvince',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//根据省sid获取该省的所有市
|
||||
export function getCity(data) {
|
||||
return request({
|
||||
url: '/system/region/getCity',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//根据市sid获取该市的所有县区
|
||||
export function getCounty(data) {
|
||||
return request({
|
||||
url: '/system/region/getCounty',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,54 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
class user {
|
||||
login(data) { // 登录
|
||||
return request({
|
||||
url: '/system/user/login',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
logout(data) { // 退出
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/signOut',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
updatePassword(data) { // 退出修改密码
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/updatePassword',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
reGetPwd(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/reGetPwd',
|
||||
method: 'post',
|
||||
params: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
selectPasswordByUserSid(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/selectPasswordByUserSid/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
getOrgListByUserSid(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/getOrgListByUserSid',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default new user()
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
class user {
|
||||
login(data) { // 登录
|
||||
return request({
|
||||
url: '/system/user/login',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
logout(data) { // 退出
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/signOut',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
updatePassword(data) { // 退出修改密码
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/updatePassword',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
reGetPwd(data) { //修改密码
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/reGetPwd',
|
||||
method: 'post',
|
||||
params: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
selectPasswordByUserSid(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/selectPasswordByUserSid/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
getOrgListByUserSid(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/getOrgListByUserSid',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default new user()
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查看待阅和已阅列表
|
||||
export function pagerList(data) {
|
||||
return request({
|
||||
url: '/message/v1/messagelist/todoAllReadList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 待阅列表--修改为已阅
|
||||
export function changeRead(data) {
|
||||
return request({
|
||||
url: '/message/v1/messagelist/changeRead?sids=' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 待阅列表--修改为已阅
|
||||
export function getToBeReadNum(data) {
|
||||
return request({
|
||||
url: '/message/v1/messagelist/getTodoNum/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 待办已办待阅已阅获取人员
|
||||
export function sysstaffinfo() {
|
||||
return request({
|
||||
url: '/portal/v1/sysstaffinfo/v1/sysstaffinfo/selectStaffLists',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查看待阅和已阅列表
|
||||
export function pagerList(data) {
|
||||
return request({
|
||||
url: '/message/v1/messagelist/todoAllReadList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 待阅列表--修改为已阅
|
||||
export function changeRead(data) {
|
||||
return request({
|
||||
url: '/message/v1/messagelist/changeRead?sids=' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 待阅列表--修改为已阅
|
||||
export function getToBeReadNum(data) {
|
||||
return request({
|
||||
url: '/message/v1/messagelist/getTodoNum/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 待办已办待阅已阅获取人员
|
||||
export function sysstaffinfo() {
|
||||
return request({
|
||||
url: '/portal/v1/sysstaffinfo/v1/sysstaffinfo/selectStaffLists',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,133 +1,133 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 读取xml文件
|
||||
export function readXml(deployId, token) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/readXml/' + deployId,
|
||||
method: 'get',
|
||||
params: token
|
||||
})
|
||||
}
|
||||
// 读取image文件
|
||||
export function getFlowViewer(procInsId, token) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/flowViewer/' + procInsId,
|
||||
method: 'get',
|
||||
params: token
|
||||
})
|
||||
}
|
||||
// 查看总代办列表
|
||||
export function pagerList(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/todoAllTaskList/' + params.params.userSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查看总已办列表
|
||||
export function getList(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/doneAllTaskList/' + params.params.userSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 待办已办待阅已阅获取人员
|
||||
export function sysstaffinfo() {
|
||||
return request({
|
||||
url: '/portal/v1/sysstaffinfo/selectStaffLists',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 代办任务同意办理
|
||||
export function businessAgree(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/complete',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 代办任务驳回任务
|
||||
export function rejectTask(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/reject/' + params.businessSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 代办任务终止任务
|
||||
export function breakTask(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/breakProcess/' + params.businessSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 代办任务撤回任务
|
||||
export function revokeTask(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/revokeProcess/' + params.userSid + '/' + params.businessSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 已办任务列表--终止
|
||||
export function breakProcess(params) {
|
||||
return request({
|
||||
url: '/flowable/v1/flow/breakProcess',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 审批记录--保存评论
|
||||
export function commentSave(data) {
|
||||
return request({
|
||||
url: '/flowable/v1/processcomment/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 根据流程定义id,节点id,终端及类型查询流程与业务表单url
|
||||
export function selectUrl(params) {
|
||||
return request({
|
||||
url: '/flowable/v1/flowable/proUrl/selectPcUrlByTaskDefKey',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 读取xml文件
|
||||
export function readXml(deployId, token) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/readXml/' + deployId,
|
||||
method: 'get',
|
||||
params: token
|
||||
})
|
||||
}
|
||||
// 读取image文件
|
||||
export function getFlowViewer(procInsId, token) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/flowViewer/' + procInsId,
|
||||
method: 'get',
|
||||
params: token
|
||||
})
|
||||
}
|
||||
// 查看总代办列表
|
||||
export function pagerList(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/todoAllTaskList/' + params.params.userSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查看总已办列表
|
||||
export function getList(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/doneAllTaskList/' + params.params.userSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 待办已办待阅已阅获取人员
|
||||
export function sysstaffinfo() {
|
||||
return request({
|
||||
url: '/portal/v1/sysstaffinfo/selectStaffLists',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 代办任务同意办理
|
||||
export function businessAgree(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/complete',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 代办任务驳回任务
|
||||
export function rejectTask(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/reject/' + params.businessSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 代办任务终止任务
|
||||
export function breakTask(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/breakProcess/' + params.businessSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 代办任务撤回任务
|
||||
export function revokeTask(params) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/revokeProcess/' + params.userSid + '/' + params.businessSid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 已办任务列表--终止
|
||||
export function breakProcess(params) {
|
||||
return request({
|
||||
url: '/flowable/v1/flow/breakProcess',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 审批记录--保存评论
|
||||
export function commentSave(data) {
|
||||
return request({
|
||||
url: '/flowable/v1/processcomment/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 根据流程定义id,节点id,终端及类型查询流程与业务表单url
|
||||
export function selectUrl(params) {
|
||||
return request({
|
||||
url: '/flowable/v1/flowable/proUrl/selectPcUrlByTaskDefKey',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
// 读取xml文件
|
||||
export function readXml (deployId) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/readXml/' + deployId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 读取image文件
|
||||
export function getFlowViewer (procInsId) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/flowViewer/' + procInsId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 任务流转记录
|
||||
export function flowRecord(query) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/flowRecord/' + query.procInsId + "/" + query.deployId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
// 读取xml文件
|
||||
export function readXml (deployId) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/readXml/' + deployId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 读取image文件
|
||||
export function getFlowViewer (procInsId) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/flowViewer/' + procInsId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 任务流转记录
|
||||
export function flowRecord(query) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/flowRecord/' + query.procInsId + "/" + query.deployId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs';
|
||||
class staffOrg {
|
||||
staffBingingList(data) { // 人员绑定审核列表
|
||||
return request({
|
||||
url: '/jlcyry/staffOrg/staffBingingList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token' : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiIxOCIsImlzcyI6IldCSyIsImV4cCI6MTYwMjg5ODM0NH0.VBtcZcQm_1eLqThHXPM6YZrIHQFy3_LJtBkEONgcoos"
|
||||
}
|
||||
})
|
||||
}
|
||||
staffOrgBingingDetails(data) { //人员绑定列表点击审核的初始化页面数据
|
||||
return request({
|
||||
url: '/jlcyry/staffOrg/staffOrgBingingDetails/'+ data.userName,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
verify(data) { //人员绑定审核
|
||||
return request({
|
||||
url: '/jlcyry/staffOrg/verifyStaffOrg',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
setUpDepartment(data) { //人员绑定部门
|
||||
return request({
|
||||
url: '/system/v1/departmentStaffs/setUpDepartment',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default new staffOrg()
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs';
|
||||
class staffOrg {
|
||||
staffBingingList(data) { // 人员绑定审核列表
|
||||
return request({
|
||||
url: '/jlcyry/staffOrg/staffBingingList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token' : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiIxOCIsImlzcyI6IldCSyIsImV4cCI6MTYwMjg5ODM0NH0.VBtcZcQm_1eLqThHXPM6YZrIHQFy3_LJtBkEONgcoos"
|
||||
}
|
||||
})
|
||||
}
|
||||
staffOrgBingingDetails(data) { //人员绑定列表点击审核的初始化页面数据
|
||||
return request({
|
||||
url: '/jlcyry/staffOrg/staffOrgBingingDetails/'+ data.userName,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
verify(data) { //人员绑定审核
|
||||
return request({
|
||||
url: '/jlcyry/staffOrg/verifyStaffOrg',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
setUpDepartment(data) { //人员绑定部门
|
||||
return request({
|
||||
url: '/system/v1/departmentStaffs/setUpDepartment',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default new staffOrg()
|
||||
|
||||
@@ -1,60 +1,60 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs';
|
||||
// 获取机构的单位类别
|
||||
export function getDwType(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getDwType',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//获取机构的人员类别
|
||||
export function getRylb(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getRylb',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//获取验证码(注册)
|
||||
export function getVerificationCode(data) {
|
||||
return request({
|
||||
url: '/system/organization/getVerificationCode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//获取机构信息列表
|
||||
export function verifyList(data) {
|
||||
return request({
|
||||
url: '/system/organization/verifyList',
|
||||
method: 'post',
|
||||
data: qs.stringify(data),
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//机构信息保存
|
||||
export function saveOrg(data) {
|
||||
return request({
|
||||
url: '/system/organization/save',
|
||||
method: 'post',
|
||||
data: qs.stringify(data),
|
||||
})
|
||||
}
|
||||
|
||||
//入职单位下拉框
|
||||
export function inductionUnitList(data) {
|
||||
return request({
|
||||
url: '/system/organization/inductionUnitList',
|
||||
method: 'post',
|
||||
data: qs.stringify(data),
|
||||
})
|
||||
}
|
||||
|
||||
export function download(data) { // 下载授权证书
|
||||
return request({
|
||||
url: 'system/organization/download',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs';
|
||||
// 获取机构的单位类别
|
||||
export function getDwType(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getDwType',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//获取机构的人员类别
|
||||
export function getRylb(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getRylb',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//获取验证码(注册)
|
||||
export function getVerificationCode(data) {
|
||||
return request({
|
||||
url: '/system/organization/getVerificationCode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//获取机构信息列表
|
||||
export function verifyList(data) {
|
||||
return request({
|
||||
url: '/system/organization/verifyList',
|
||||
method: 'post',
|
||||
data: qs.stringify(data),
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//机构信息保存
|
||||
export function saveOrg(data) {
|
||||
return request({
|
||||
url: '/system/organization/save',
|
||||
method: 'post',
|
||||
data: qs.stringify(data),
|
||||
})
|
||||
}
|
||||
|
||||
//入职单位下拉框
|
||||
export function inductionUnitList(data) {
|
||||
return request({
|
||||
url: '/system/organization/inductionUnitList',
|
||||
method: 'post',
|
||||
data: qs.stringify(data),
|
||||
})
|
||||
}
|
||||
|
||||
export function download(data) { // 下载授权证书
|
||||
return request({
|
||||
url: 'system/organization/download',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs';
|
||||
class organization{
|
||||
inductionUnitList(data) { // 绑定单位 入职单位下拉框
|
||||
return request({
|
||||
url: '/system/organization/inductionUnitList',
|
||||
method: 'post',
|
||||
data: qs.stringify(data),
|
||||
})
|
||||
}
|
||||
save(data) { // 人员机构关系保存
|
||||
return request({
|
||||
url: '/jlcyry/staffOrg/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default new organization()
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs';
|
||||
class organization{
|
||||
inductionUnitList(data) { // 绑定单位 入职单位下拉框
|
||||
return request({
|
||||
url: '/system/organization/inductionUnitList',
|
||||
method: 'post',
|
||||
data: qs.stringify(data),
|
||||
})
|
||||
}
|
||||
save(data) { // 人员机构关系保存
|
||||
return request({
|
||||
url: '/jlcyry/staffOrg/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default new organization()
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//
|
||||
export function rolemenus(data) {
|
||||
return request({
|
||||
url: '/system/v1/rolemenus/'+data.roleSid,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取左侧菜单
|
||||
export function getrolemenus(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/sourcemenutree',
|
||||
method: 'POST',
|
||||
async: false,
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取角色的主页菜单
|
||||
export function sourcesofrole(data) {
|
||||
return request({
|
||||
url: '/system/v1/rolemenus/sourcesofrole',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//
|
||||
export function rolemenus(data) {
|
||||
return request({
|
||||
url: '/system/v1/rolemenus/'+data.roleSid,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取左侧菜单
|
||||
export function getrolemenus(data) {
|
||||
return request({
|
||||
url: 'v1/SysMenu/list',
|
||||
method: 'POST',
|
||||
async: false,
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取角色的主页菜单
|
||||
export function sourcesofrole(data) {
|
||||
return request({
|
||||
url: '/system/v1/rolemenus/sourcesofrole',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
// 获取角色 不分页列表
|
||||
export function roleList(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/list/',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//获取角色 分页列表
|
||||
export function rolePageList(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/pagelist',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//保存 角色信息
|
||||
export function saveRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 获取单个角色 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 修改单个角色 信息
|
||||
export function putRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/' + data.sid,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 删除单个角色 信息
|
||||
export function delRole(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/' + data.sid,
|
||||
method: 'DELETE',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 设置单个角色 的状态
|
||||
export function setRoleEnable(data) {
|
||||
return request({
|
||||
url: `/system/v1/roles/setIsEnable/${data.sid}/${data.isEnable}`,
|
||||
method: 'POST',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
// 获取角色 不分页列表
|
||||
export function roleList(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/list/',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//获取角色 分页列表
|
||||
export function rolePageList(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/pagelist',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//保存 角色信息
|
||||
export function saveRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 获取单个角色 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 修改单个角色 信息
|
||||
export function putRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/' + data.sid,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 删除单个角色 信息
|
||||
export function delRole(data) {
|
||||
return request({
|
||||
url: '/system/v1/roles/' + data.sid,
|
||||
method: 'DELETE',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 设置单个角色 的状态
|
||||
export function setRoleEnable(data) {
|
||||
return request({
|
||||
url: `/system/v1/roles/setIsEnable/${data.sid}/${data.isEnable}`,
|
||||
method: 'POST',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//获取单位级别
|
||||
export function getDwJb(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getDwJb',
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
// 获取机构单位类别
|
||||
export function getDwType(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getDwType',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//获取机构人员类别
|
||||
export function getRylb(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getRylb',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据Type值获取数据对象
|
||||
export function getDicts(typeCode) {
|
||||
return request({
|
||||
url: '/system/dictCommon/dicts/'+typeCode,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//获取单位级别
|
||||
export function getDwJb(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getDwJb',
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
// 获取机构单位类别
|
||||
export function getDwType(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getDwType',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//获取机构人员类别
|
||||
export function getRylb(data) {
|
||||
return request({
|
||||
url: '/system/dictCommon/getRylb',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据Type值获取数据对象
|
||||
export function getDicts(typeCode) {
|
||||
return request({
|
||||
url: '/system/dictCommon/dicts/'+typeCode,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listPage(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmapping/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function listPage(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmapping/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,125 +1,125 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
// let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
let tokens = window.sessionStorage.getItem('token')
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询左侧部门列表
|
||||
export function orgList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑部门信息
|
||||
export function postOrgtree(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取 机构分页列表(编辑部门信息)
|
||||
export function putOrgtree(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增部门信息
|
||||
export function addOrgTree(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 回显
|
||||
export function selectBySid(data) {
|
||||
return request({
|
||||
url: 'portal/v1/sysorganization/fetchBySid/' + data,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 树 节点名称 删除
|
||||
export function delOrgtree(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysorganization/delBySid/` + data.sid,
|
||||
method: 'get',
|
||||
data: qs.stringify(data),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询主管人员 旧的:/portal/v1/sysstafforg/staffinfoList
|
||||
export function getStaff(data) {
|
||||
return request({
|
||||
url: 'portal/v1/sysstaffinfo/getStaffNameByDeptSid',
|
||||
method: 'get',
|
||||
params: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询分管人员
|
||||
export function getStaffName(params) {
|
||||
return request({
|
||||
url: '/portal/v1/sysstaffinfo/getStaffName',
|
||||
method: 'get',
|
||||
params: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查看二维码
|
||||
export function getQrCode(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/getQrCode/' + data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
// let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
let tokens = window.sessionStorage.getItem('token')
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询左侧部门列表
|
||||
export function orgList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑部门信息
|
||||
export function postOrgtree(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取 机构分页列表(编辑部门信息)
|
||||
export function putOrgtree(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增部门信息
|
||||
export function addOrgTree(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 回显
|
||||
export function selectBySid(data) {
|
||||
return request({
|
||||
url: 'portal/v1/sysorganization/fetchBySid/' + data,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 树 节点名称 删除
|
||||
export function delOrgtree(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysorganization/delBySid/` + data.sid,
|
||||
method: 'get',
|
||||
data: qs.stringify(data),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询主管人员 旧的:/portal/v1/sysstafforg/staffinfoList
|
||||
export function getStaff(data) {
|
||||
return request({
|
||||
url: 'portal/v1/sysstaffinfo/getStaffNameByDeptSid',
|
||||
method: 'get',
|
||||
params: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询分管人员
|
||||
export function getStaffName(params) {
|
||||
return request({
|
||||
url: '/portal/v1/sysstaffinfo/getStaffName',
|
||||
method: 'get',
|
||||
params: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查看二维码
|
||||
export function getQrCode(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/getQrCode/' + data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
|
||||
//获取字典子集 分页列表
|
||||
export function dictCommonList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/pageList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//保存 字典子级
|
||||
export function savedictCommon(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/save',
|
||||
method: 'POST',
|
||||
data: data ,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 获取单个菜单 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 修改 数据字典
|
||||
export function putdictCommon(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data ,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 删除菜单 信息
|
||||
export function deldictCommon(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/delete/' + data.sid,
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
|
||||
//获取字典子集 分页列表
|
||||
export function dictCommonList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/pageList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//保存 字典子级
|
||||
export function savedictCommon(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/save',
|
||||
method: 'POST',
|
||||
data: data ,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 获取单个菜单 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 修改 数据字典
|
||||
export function putdictCommon(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data ,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 删除菜单 信息
|
||||
export function deldictCommon(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/delete/' + data.sid,
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token')
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dicttypes/pageList',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid 修改
|
||||
export function putDictType(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dicttypes/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 保存 角色信息
|
||||
export function saveDictType(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dicttypes/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid 获取单个菜单 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 数据字段--映射管理保存
|
||||
export function saveMappingList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmapping/saveMappingList',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 数据字段--映射管理保存
|
||||
export function selectMappingListInfo(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmapping/selectMappingListInfo',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid 删除菜单 信息
|
||||
export function delDictType(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dicttypes/delete/' + data.sid,
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token')
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dicttypes/pageList',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid 修改
|
||||
export function putDictType(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dicttypes/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 保存 角色信息
|
||||
export function saveDictType(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dicttypes/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid 获取单个菜单 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 数据字段--映射管理保存
|
||||
export function saveMappingList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmapping/saveMappingList',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 数据字段--映射管理保存
|
||||
export function selectMappingListInfo(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmapping/selectMappingListInfo',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid 删除菜单 信息
|
||||
export function delDictType(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dicttypes/delete/' + data.sid,
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json', 'token': tokens }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,125 +1,125 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询流程定义列表
|
||||
export function listDefinition(query) {
|
||||
console.log(query);
|
||||
return request({
|
||||
// url: '/flowable/definition/list',
|
||||
url: "/flowable/definition/pagerList",
|
||||
method: "post",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 读取xml文件
|
||||
export function readXml(deployId) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/readXml/" + deployId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
// 保存模型
|
||||
export function saveXml(data) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/save",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function definitionStart(procDefId, data) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/start/" + procDefId,
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 获取流程变量
|
||||
export function getProcessVariables(taskId) {
|
||||
return request({
|
||||
url: "/v1/flowable/task/processVariables/" + taskId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
// 激活/挂起流程
|
||||
export function updateState(params) {
|
||||
return request({
|
||||
url: "/flowable/definition/updateState",
|
||||
method: "put",
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
// 指定流程办理人员列表
|
||||
export function userList(query) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/userList",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 指定流程办理组列表
|
||||
export function roleList(query) {
|
||||
return request({
|
||||
url: "/flowable/definition/roleList",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 读取image文件
|
||||
export function readImage(deployId) {
|
||||
return request({
|
||||
url: "/flowable/definition/readImage/" + deployId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
// 读取image文件
|
||||
export function getFlowViewer(procInsId) {
|
||||
return request({
|
||||
url: "/v1/flowable/task/flowViewer/" + procInsId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: "/system/deployment",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: "/system/deployment",
|
||||
method: "put",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(query) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/delete",
|
||||
method: "delete",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: "/system/deployment/export",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询流程定义列表
|
||||
export function listDefinition(query) {
|
||||
console.log(query);
|
||||
return request({
|
||||
// url: '/flowable/definition/list',
|
||||
url: "/flowable/definition/pagerList",
|
||||
method: "post",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 读取xml文件
|
||||
export function readXml(deployId) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/readXml/" + deployId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
// 保存模型
|
||||
export function saveXml(data) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/save",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function definitionStart(procDefId, data) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/start/" + procDefId,
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 获取流程变量
|
||||
export function getProcessVariables(taskId) {
|
||||
return request({
|
||||
url: "/v1/flowable/task/processVariables/" + taskId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
// 激活/挂起流程
|
||||
export function updateState(params) {
|
||||
return request({
|
||||
url: "/flowable/definition/updateState",
|
||||
method: "put",
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
// 指定流程办理人员列表
|
||||
export function userList(query) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/userList",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 指定流程办理组列表
|
||||
export function roleList(query) {
|
||||
return request({
|
||||
url: "/flowable/definition/roleList",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 读取image文件
|
||||
export function readImage(deployId) {
|
||||
return request({
|
||||
url: "/flowable/definition/readImage/" + deployId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
// 读取image文件
|
||||
export function getFlowViewer(procInsId) {
|
||||
return request({
|
||||
url: "/v1/flowable/task/flowViewer/" + procInsId,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: "/system/deployment",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: "/system/deployment",
|
||||
method: "put",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(query) {
|
||||
return request({
|
||||
url: "/v1/flowable/definition/delete",
|
||||
method: "delete",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: "/system/deployment/export",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,80 +1,80 @@
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 查询已办任务列表
|
||||
export function finishedList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/doneList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 任务流转记录
|
||||
export function flowRecord(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/flowRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回任务
|
||||
export function revokeProcess(data) {
|
||||
return request({
|
||||
url: '/flowable/task/revokeProcess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 查询已办任务列表
|
||||
export function finishedList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/doneList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 任务流转记录
|
||||
export function flowRecord(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/flowRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回任务
|
||||
export function revokeProcess(data) {
|
||||
return request({
|
||||
url: '/flowable/task/revokeProcess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,64 +1,64 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询流程表单列表
|
||||
export function listForm(query) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/list',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程表单详细
|
||||
export function getForm(formId) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/' + formId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程表单
|
||||
export function addForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程表单
|
||||
export function updateForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 挂载表单
|
||||
export function addDeployForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/addDeployForm',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程表单
|
||||
export function delForm(formId) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/' + formId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程表单
|
||||
export function exportForm(query) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询流程表单列表
|
||||
export function listForm(query) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/list',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程表单详细
|
||||
export function getForm(formId) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/' + formId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程表单
|
||||
export function addForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程表单
|
||||
export function updateForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 挂载表单
|
||||
export function addDeployForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/addDeployForm',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程表单
|
||||
export function delForm(formId) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/' + formId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程表单
|
||||
export function exportForm(query) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,98 +1,98 @@
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 我的发起的流程
|
||||
export function myProcessList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/myprocess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/flowable/task/complete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 取消申请
|
||||
export function stopProcess(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/stopProcess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 驳回任务
|
||||
export function rejectTask(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/reject',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 可退回任务列表
|
||||
export function returnList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/returnList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 我的发起的流程
|
||||
export function myProcessList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/myprocess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/flowable/task/complete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 取消申请
|
||||
export function stopProcess(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/stopProcess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 驳回任务
|
||||
export function rejectTask(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/reject',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 可退回任务列表
|
||||
export function returnList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/returnList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,116 +1,116 @@
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 查询待办任务列表
|
||||
export function todoList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/todoList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/complete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 委派任务
|
||||
export function delegate(data) {
|
||||
return request({
|
||||
url: '/flowable/task/delegate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 退回任务
|
||||
export function returnTask(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/return',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 驳回任务
|
||||
export function rejectTask(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/reject',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 可退回任务列表
|
||||
export function returnList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/returnList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 下一节点
|
||||
export function getNextFlowNode(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/nextFlowNode',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 查询待办任务列表
|
||||
export function todoList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/todoList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/complete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 委派任务
|
||||
export function delegate(data) {
|
||||
return request({
|
||||
url: '/flowable/task/delegate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 退回任务
|
||||
export function returnTask(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/return',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 驳回任务
|
||||
export function rejectTask(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/reject',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 可退回任务列表
|
||||
export function returnList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/returnList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 下一节点
|
||||
export function getNextFlowNode(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/nextFlowNode',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,104 +1,104 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
let tokens = window.sessionStorage.getItem('token')
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/listAllVoForSource',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function savePost(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 模块名称
|
||||
export function sourceList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/syssource/listAll',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delOrgroles(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/delBySids/' + data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function getSingleData(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/fetchBySid/' + data.id,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function putOrgroles(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 功能是否可用状态
|
||||
export function IsEnable(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/updateIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取模块下的菜单
|
||||
export function getMenusForFunction(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/getMenusForFunction',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
let tokens = window.sessionStorage.getItem('token')
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/listAllVoForSource',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function savePost(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 模块名称
|
||||
export function sourceList(data) {
|
||||
return request({
|
||||
url: 'v1/SysMenu/list',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delOrgroles(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/delBySids/' + data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function getSingleData(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/fetchBySid/' + data.id,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function putOrgroles(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 功能是否可用状态
|
||||
export function IsEnable(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysfunction/updateIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取模块下的菜单
|
||||
export function getMenusForFunction(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/getMenusForFunction',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取当前用户的待办数量
|
||||
export function getTodoNum(data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/getTodoNum/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取当前用户的待办数量
|
||||
export function getTodoNum(data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/getTodoNum/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysflowcc/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysflowcc/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化应用
|
||||
export function fetchSid(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysflowcc/fetchDetailsBySid/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delBySids(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysflowcc/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询角色列表
|
||||
export function roleList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/listAll',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysflowcc/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysflowcc/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化应用
|
||||
export function fetchSid(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysflowcc/fetchDetailsBySid/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delBySids(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysflowcc/delBySids',
|
||||
method: 'DELETE',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询角色列表
|
||||
export function roleList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/listAll',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//获取菜单 分页列表
|
||||
export function logPageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/systemlog/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//获取菜单 分页列表
|
||||
export function logPageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/systemlog/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,109 +1,109 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
|
||||
//获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/listAllVoForSource',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增保存 菜单信息
|
||||
export function saveMenusInfo(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改保存 菜单信息
|
||||
export function putMenusInfo(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 删除单个 资源信息
|
||||
export function delMenus(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/delBySids/' + data.sid,
|
||||
method: 'get',
|
||||
data: qs.stringify(data),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改状态
|
||||
export function IsEnable(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/updateIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'POST',
|
||||
/* data: qs.stringify(data),*/
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取菜单 不分页列表
|
||||
export function roleList(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/list',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//获取菜单 分页列表
|
||||
export function menusPageList(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/pagelist',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
//获取菜单 树形分页列表
|
||||
export function menusTreelist(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/treelist',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//根据sid 获取单个菜单 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
|
||||
//获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: 'v1/SysMenu/list',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增保存 菜单信息
|
||||
export function saveMenusInfo(data) {
|
||||
return request({
|
||||
url: 'v1/SysMenu/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 修改保存 菜单信息
|
||||
export function putMenusInfo(data) {
|
||||
return request({
|
||||
url: 'v1/SysMenu/alterSysMenu',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
//根据sid 删除单个 资源信息
|
||||
export function delMenus(data) {
|
||||
return request({
|
||||
url: 'v1/SysMenu/deleteSysMenu/' + data.sid,
|
||||
method: 'get',
|
||||
data: qs.stringify(data),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改状态
|
||||
export function IsEnable(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/updateIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'POST',
|
||||
/* data: qs.stringify(data),*/
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取菜单 不分页列表
|
||||
export function roleList(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/list',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
//获取菜单 分页列表
|
||||
export function menusPageList(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/pagelist',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
//获取菜单 树形分页列表
|
||||
export function menusTreelist(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/treelist',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//根据sid 获取单个菜单 信息
|
||||
export function getRoleInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/menus/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenu/list',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增插件
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/portal/v1/appsubsetversion/save',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新插件
|
||||
export function putMenusInfo(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 新增/编辑应用
|
||||
export function saveOrUpdate(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenu/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化应用
|
||||
export function details(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenu/details',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid应用
|
||||
export function deleteMenu(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenu/deleteMenu',
|
||||
method: 'DELETE',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenu/list',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增插件
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/portal/v1/appsubsetversion/save',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新插件
|
||||
export function putMenusInfo(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmenu/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 新增/编辑应用
|
||||
export function saveOrUpdate(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenu/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化应用
|
||||
export function details(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenu/details',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据sid应用
|
||||
export function deleteMenu(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenu/deleteMenu',
|
||||
method: 'DELETE',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
class user{
|
||||
verifyList(data){ // 获取列表
|
||||
return request({
|
||||
url: '/system/organization/verifyList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
orgRegisterDetails(data){ // 单位注册信息详情
|
||||
return request({
|
||||
url: '/system/organization/organizationRegisterDetails/'+data.organizationSid,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
verify(data){ // 审核
|
||||
return request({
|
||||
url: '/system/organization/verify',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
// 删除机构信息
|
||||
del(data) {
|
||||
return request({
|
||||
url: '/system/organization/delete/'+data.sid,
|
||||
method: 'DELETE',
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
export default new user()
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
class user{
|
||||
verifyList(data){ // 获取列表
|
||||
return request({
|
||||
url: '/system/organization/verifyList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
orgRegisterDetails(data){ // 单位注册信息详情
|
||||
return request({
|
||||
url: '/system/organization/organizationRegisterDetails/'+data.organizationSid,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
verify(data){ // 审核
|
||||
return request({
|
||||
url: '/system/organization/verify',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
// 删除机构信息
|
||||
del(data) {
|
||||
return request({
|
||||
url: '/system/organization/delete/'+data.sid,
|
||||
method: 'DELETE',
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
export default new user()
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function getList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuserdefaultorg/getList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增插件
|
||||
export function saveOrUpdate(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuserdefaultorg/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取菜单 分页列表
|
||||
export function getList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuserdefaultorg/getList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增插件
|
||||
export function saveOrUpdate(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuserdefaultorg/saveOrUpdate',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,87 +1,87 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMTE1MjUwfQ.gtn_mVsbwH6ztl835rWmIY4DxeNmRe_TOt-Q0TdldIE'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/syspost/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门列表
|
||||
export function orgList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增
|
||||
export function savePost(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改
|
||||
export function putOrgroles(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/update/' +data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delOrgroles(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/delBySids/' + data.sids,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function pullDown(data){
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/typeValues',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询岗位列表
|
||||
export function selectList(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/selectList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有流程名称
|
||||
export function selectFlowList(){
|
||||
return request({
|
||||
url: '/flowable/v1/flow/selectFlowList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMTE1MjUwfQ.gtn_mVsbwH6ztl835rWmIY4DxeNmRe_TOt-Q0TdldIE'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/syspost/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门列表
|
||||
export function orgList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增
|
||||
export function savePost(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改
|
||||
export function putOrgroles(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/update/' +data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delOrgroles(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/delBySids/' + data.sids,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function pullDown(data){
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/typeValues',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询岗位列表
|
||||
export function selectList(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/selectList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有流程名称
|
||||
export function selectFlowList(){
|
||||
return request({
|
||||
url: '/flowable/v1/flow/selectFlowList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,83 +1,83 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 分页列表
|
||||
pagerList: function (params) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/pagerList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 新增保存
|
||||
save: function (regionDto) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/save',
|
||||
method: 'post',
|
||||
data: regionDto,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// // 根据省sid获取该省的所有市
|
||||
// getCity: function (sid) {
|
||||
// return request({
|
||||
// url: '/portal/v1/regions/getCity',
|
||||
// method: 'get',
|
||||
// params: {
|
||||
// sid
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
//
|
||||
// // 根据市sid获取该省的所有县区
|
||||
// getCounty: function (sid) {
|
||||
// return request({
|
||||
// url: '/portal/v1/regions/getCounty',
|
||||
// method: 'get',
|
||||
// params: {
|
||||
// sid
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
|
||||
// 删除
|
||||
delete: function (sid) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/delete/' + sid,
|
||||
method: 'delete',
|
||||
data: sid
|
||||
})
|
||||
},
|
||||
|
||||
//点击修改回显数据
|
||||
updateEcho: function (sid) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/getOne/' + sid,
|
||||
method: 'post',
|
||||
params: {
|
||||
sid
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 区域修改保存
|
||||
// system/region/update/{sid}
|
||||
update: function (params,sid) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/update/' + sid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 分页列表
|
||||
pagerList: function (params) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/pagerList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 新增保存
|
||||
save: function (regionDto) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/save',
|
||||
method: 'post',
|
||||
data: regionDto,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// // 根据省sid获取该省的所有市
|
||||
// getCity: function (sid) {
|
||||
// return request({
|
||||
// url: '/portal/v1/regions/getCity',
|
||||
// method: 'get',
|
||||
// params: {
|
||||
// sid
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
//
|
||||
// // 根据市sid获取该省的所有县区
|
||||
// getCounty: function (sid) {
|
||||
// return request({
|
||||
// url: '/portal/v1/regions/getCounty',
|
||||
// method: 'get',
|
||||
// params: {
|
||||
// sid
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
|
||||
// 删除
|
||||
delete: function (sid) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/delete/' + sid,
|
||||
method: 'delete',
|
||||
data: sid
|
||||
})
|
||||
},
|
||||
|
||||
//点击修改回显数据
|
||||
updateEcho: function (sid) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/getOne/' + sid,
|
||||
method: 'post',
|
||||
params: {
|
||||
sid
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 区域修改保存
|
||||
// system/region/update/{sid}
|
||||
update: function (params,sid) {
|
||||
return request({
|
||||
url: '/portal/v1/regions/update/' + sid,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,178 +1,178 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
// 业务角色 列表
|
||||
export function roleOrgList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function postList(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取数据字典下拉列表
|
||||
export function typeValues(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/typeValues',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 设置是否可用:isEnable:1可用,0不可用
|
||||
export function setRoleEnable(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/setIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* <新增 保存角色>
|
||||
* @orgSid 机构SID
|
||||
* @remarks 备注
|
||||
* @roleName 角色名称
|
||||
* */
|
||||
export function saveOrgroles(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* <根据SID 修改角色>
|
||||
* @sid 角色SID
|
||||
* @orgSid 机构SID
|
||||
* @remarks 备注
|
||||
* @roleName 角色名称
|
||||
* */
|
||||
export function putOrgroles(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysrole/update/${data.sid}`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* <根据SID 删除角色>
|
||||
* @sid 角色SID
|
||||
* */
|
||||
export function delOrgroles(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysrole/delBySids/${data.sid}`,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 移动端授权
|
||||
export function getRoleMenuList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenurole/getRoleMenuList',
|
||||
method: 'post',
|
||||
params: { roleSid: data }
|
||||
})
|
||||
}
|
||||
|
||||
// 菜单授权保存
|
||||
export function saveRoleMenuList(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysmobilemenurole/saveRoleMenuList`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 菜单授权
|
||||
export function roleMenuTree(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysmenu/listAllByRoleSid`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 菜单授权保存
|
||||
export function saveorgrolemenus(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysmenurole/updateRoleAndMenu`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 资源授权
|
||||
export function sourceMenuTree(data) {
|
||||
return request({
|
||||
url: `/portal/v1/syssource/listAllByRoleSid`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 资源授权保存
|
||||
export function saveSource(data) {
|
||||
return request({
|
||||
url: `/portal/v1/syssourcerole/updateRoleAndSource`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 功能授权
|
||||
export function funMenuTree(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysfunction/getFunctionAuthorization/` + data.roleSid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 功能授权保存
|
||||
export function savefunMenu(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysrolefunction/updateRoleAndFunction`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
// 业务角色 列表
|
||||
export function roleOrgList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function postList(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取数据字典下拉列表
|
||||
export function typeValues(data) {
|
||||
return request({
|
||||
url: '/portal/v1/dictcommons/typeValues',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 设置是否可用:isEnable:1可用,0不可用
|
||||
export function setRoleEnable(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/setIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* <新增 保存角色>
|
||||
* @orgSid 机构SID
|
||||
* @remarks 备注
|
||||
* @roleName 角色名称
|
||||
* */
|
||||
export function saveOrgroles(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* <根据SID 修改角色>
|
||||
* @sid 角色SID
|
||||
* @orgSid 机构SID
|
||||
* @remarks 备注
|
||||
* @roleName 角色名称
|
||||
* */
|
||||
export function putOrgroles(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysrole/update/${data.sid}`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* <根据SID 删除角色>
|
||||
* @sid 角色SID
|
||||
* */
|
||||
export function delOrgroles(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysrole/delBySids/${data.sid}`,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 移动端授权
|
||||
export function getRoleMenuList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysmobilemenurole/getRoleMenuList',
|
||||
method: 'post',
|
||||
params: { roleSid: data }
|
||||
})
|
||||
}
|
||||
|
||||
// 菜单授权保存
|
||||
export function saveRoleMenuList(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysmobilemenurole/saveRoleMenuList`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 菜单授权
|
||||
export function roleMenuTree(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysmenu/listAllByRoleSid`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 菜单授权保存
|
||||
export function saveorgrolemenus(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysmenurole/updateRoleAndMenu`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 资源授权
|
||||
export function sourceMenuTree(data) {
|
||||
return request({
|
||||
url: `/portal/v1/syssource/listAllByRoleSid`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 资源授权保存
|
||||
export function saveSource(data) {
|
||||
return request({
|
||||
url: `/portal/v1/syssourcerole/updateRoleAndSource`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 功能授权
|
||||
export function funMenuTree(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysfunction/getFunctionAuthorization/` + data.roleSid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 功能授权保存
|
||||
export function savefunMenu(data) {
|
||||
return request({
|
||||
url: `/portal/v1/sysrolefunction/updateRoleAndFunction`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
/**
|
||||
* < 业务角色授权时菜单列表(拥有的菜单选中)>
|
||||
* @orgTypeKeys 单位性质(类别
|
||||
* @roleSid 业务角色sid
|
||||
* @userType 用户类型只能为1或2
|
||||
* */
|
||||
export function roleMenuTree(data){
|
||||
return request({
|
||||
url: '/system/v1/orgrolemenus/menutree',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* < 保存角色授权的菜单项 >
|
||||
* @roleMenus[] 角色权限列表 {menuSid 菜单sid} {orgSid 单位sid} {roleSid 角色sid}
|
||||
* @roleSid 业务角色sid
|
||||
* */
|
||||
export function saveorgrolemenus(data){
|
||||
return request({
|
||||
url: '/system/v1/orgrolemenus',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
/**
|
||||
* < 业务角色授权时菜单列表(拥有的菜单选中)>
|
||||
* @orgTypeKeys 单位性质(类别
|
||||
* @roleSid 业务角色sid
|
||||
* @userType 用户类型只能为1或2
|
||||
* */
|
||||
export function roleMenuTree(data){
|
||||
return request({
|
||||
url: '/system/v1/orgrolemenus/menutree',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* < 保存角色授权的菜单项 >
|
||||
* @roleMenus[] 角色权限列表 {menuSid 菜单sid} {orgSid 单位sid} {roleSid 角色sid}
|
||||
* @roleSid 业务角色sid
|
||||
* */
|
||||
export function saveorgrolemenus(data){
|
||||
return request({
|
||||
url: '/system/v1/orgrolemenus',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
//角色授权时菜单列表(拥有的菜单选中)
|
||||
export function getrolemenus(data) {
|
||||
return request({
|
||||
url: `/system/v1/rolemenus/${data.roleSid}`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
//保存 角色授权时菜单列表
|
||||
export function saverolemenus(data) {
|
||||
return request({
|
||||
url: `/system/v1/rolemenus`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
//角色授权时菜单列表(拥有的菜单选中)
|
||||
export function getrolemenus(data) {
|
||||
return request({
|
||||
url: `/system/v1/rolemenus/${data.roleSid}`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
//保存 角色授权时菜单列表
|
||||
export function saverolemenus(data) {
|
||||
return request({
|
||||
url: `/system/v1/rolemenus`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,111 +1,141 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: '/portal/v1/syssource/listPage',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
//保存 资源信息
|
||||
export function saveSourcesInfo(data) {
|
||||
return request({
|
||||
url: '/portal/v1/syssource/save',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改 保存 资源信息
|
||||
export function putSourcesInfo(data) {
|
||||
return request({
|
||||
url: '/portal/v1/syssource/update/' + data.sid,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
//根据sid 删除单个 资源信息
|
||||
export function delSources(data) {
|
||||
return request({
|
||||
url: '/portal/v1/syssource/delBySids/' + data.sid,
|
||||
method: 'get',
|
||||
data: qs.stringify(data),
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取获取资源类别
|
||||
export function getZzylb(data) {
|
||||
return request({
|
||||
url: '/portal/v1/syssource/listAll',
|
||||
method: 'post',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取资源 不分页列表
|
||||
export function sourcesList(data) {
|
||||
return request({
|
||||
url: '/system/v1/sources/list',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取资源列表 不分页下拉
|
||||
export function getsourceList(data) {
|
||||
return request({
|
||||
url: '/system/v1/sources/sourceList',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
////获取资源 分页列表
|
||||
//export function sourcesPageList(data) {
|
||||
//return request({
|
||||
// url: '/system/v1/sources/pagelist',
|
||||
// method: 'POST',
|
||||
// data: data,
|
||||
// headers: {'Content-Type': 'application/json'}
|
||||
//})
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//根据sid 获取单个 资源信息
|
||||
export function getSourcesInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/sources/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjMwMDI3MDA3fQ.9bEgBzFW2g1CUT7s5VXxhNCa10cyU_WTCFeqpQje0iY'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
//获取菜单 分页列表
|
||||
export function pageList(data) {
|
||||
return request({
|
||||
url: 'v1/sysinfo/selectInfoList',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
//保存 资源信息
|
||||
export function saveSourcesInfo(data) {
|
||||
return request({
|
||||
url: 'v1/sysinfo/saveInfo',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改 保存 资源信息
|
||||
export function putSourcesInfo(data) {
|
||||
return request({
|
||||
url: 'v1/sysinfo/alterInfo',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addStudentScore(data) {
|
||||
return request({
|
||||
url: 'v1/sysstudentscore/addStudentScore',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
export function saveSysInfoShip(data) {
|
||||
return request({
|
||||
url: 'v1/sysinfoship/saveSysInfoShip',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
export function selectTeacherDownStudent(data) {
|
||||
return request({
|
||||
url: 'v1/sysinfoship/selectTeacherDownStudent/' + data.infoId,
|
||||
method: 'get',
|
||||
data: qs.stringify(data),
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
//根据sid 删除单个 资源信息
|
||||
export function delSources(data) {
|
||||
return request({
|
||||
url: 'v1/sysinfo/deleteInfo/' + data.sid,
|
||||
method: 'get',
|
||||
data: qs.stringify(data),
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取获取资源类别
|
||||
export function getZzylb(data) {
|
||||
return request({
|
||||
url: '/portal/v1/syssource/listAll',
|
||||
method: 'post',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取资源 不分页列表
|
||||
export function sourcesList(data) {
|
||||
return request({
|
||||
url: '/system/v1/sources/list',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取资源列表 不分页下拉
|
||||
export function getsourceList(data) {
|
||||
return request({
|
||||
url: '/system/v1/sources/sourceList',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
////获取资源 分页列表
|
||||
//export function sourcesPageList(data) {
|
||||
//return request({
|
||||
// url: '/system/v1/sources/pagelist',
|
||||
// method: 'POST',
|
||||
// data: data,
|
||||
// headers: {'Content-Type': 'application/json'}
|
||||
//})
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//根据sid 获取单个 资源信息
|
||||
export function getSourcesInfo(data) {
|
||||
return request({
|
||||
url: '/system/v1/sources/' + data.sid,
|
||||
method: 'GET',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
export function verifyList(data){ // 用户列表
|
||||
return request({
|
||||
url: '/system/user/verifyList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
// admin用户列表
|
||||
export function userListByAdmin(data){
|
||||
return request({
|
||||
url: '/system/user/userListByAdmin',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 设置角色
|
||||
export function psotUserRole(data){
|
||||
return request({
|
||||
url: '/system/v1/userrole',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 用户初始化密码
|
||||
export function initPwd(data){
|
||||
return request({
|
||||
url: 'system/user/initPwd/'+data.sid,
|
||||
method: 'POST',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 用户删除接口
|
||||
export function delUser(data){
|
||||
return request({
|
||||
url: '/system/user/delete/'+data.sid,
|
||||
method: 'DELETE',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化设置角色
|
||||
export function initUserRole(data){
|
||||
return request({
|
||||
url: '/system/v1/userroles/initUserRole/'+ data.userSid,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存角色
|
||||
export function saveUserRole(data){
|
||||
return request({
|
||||
url: '/system/v1/userroles',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 用户信息
|
||||
export function getUserINfo(data){
|
||||
return request({
|
||||
url: '/system/user/userRegisterDetails',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 单位信息
|
||||
export function getOrgINfo(data){
|
||||
return request({
|
||||
url: '/system/organization/organizationRegisterDetails/'+ data.organizationSid,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
export function verifyList(data){ // 用户列表
|
||||
return request({
|
||||
url: '/system/user/verifyList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
// admin用户列表
|
||||
export function userListByAdmin(data){
|
||||
return request({
|
||||
url: '/system/user/userListByAdmin',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 设置角色
|
||||
export function psotUserRole(data){
|
||||
return request({
|
||||
url: '/system/v1/userrole',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 用户初始化密码
|
||||
export function initPwd(data){
|
||||
return request({
|
||||
url: 'system/user/initPwd/'+data.sid,
|
||||
method: 'POST',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
// 用户删除接口
|
||||
export function delUser(data){
|
||||
return request({
|
||||
url: '/system/user/delete/'+data.sid,
|
||||
method: 'DELETE',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化设置角色
|
||||
export function initUserRole(data){
|
||||
return request({
|
||||
url: '/system/v1/userroles/initUserRole/'+ data.userSid,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存角色
|
||||
export function saveUserRole(data){
|
||||
return request({
|
||||
url: '/system/v1/userroles',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 用户信息
|
||||
export function getUserINfo(data){
|
||||
return request({
|
||||
url: '/system/user/userRegisterDetails',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 单位信息
|
||||
export function getOrgINfo(data){
|
||||
return request({
|
||||
url: '/system/organization/organizationRegisterDetails/'+ data.organizationSid,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
|
||||
//获取菜单 分页列表
|
||||
export function login1(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/login',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
// 'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class user {
|
||||
login(data) { // 登录
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/login',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
logout() { // 退出
|
||||
return request({
|
||||
url: '/vue-admin-template/user/logout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
updatePassword(data) { // 退出修改密码
|
||||
return request({
|
||||
url: '/system/user/updatePassword',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
|
||||
//获取菜单 分页列表
|
||||
export function login1(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/login',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
// 'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class user {
|
||||
login(data) { // 登录
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/login',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
logout() { // 退出
|
||||
return request({
|
||||
url: '/vue-admin-template/user/logout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
updatePassword(data) { // 退出修改密码
|
||||
return request({
|
||||
url: '/system/user/updatePassword',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
class user{
|
||||
verifyList(data){ // 请求审核列表
|
||||
return request({
|
||||
url: '/system/user/verifyList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
userRegisterDetails(data){ // 获取审核内容
|
||||
console.log(data)
|
||||
return request({
|
||||
url: '/system/user/userRegisterDetails',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
verify(data){ // 审核通过不通过
|
||||
return request({
|
||||
url: '/system/user/verify',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
userDelete(data){ // 删除
|
||||
return request({
|
||||
url: '/system/user/delete/{sid}',
|
||||
method: 'delete',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
userNameDelete(data){ // 删除个人注册审核
|
||||
return request({
|
||||
url: '/system/staffApply/deleteByUserName',
|
||||
method: 'delete',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
export default new user()
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
class user{
|
||||
verifyList(data){ // 请求审核列表
|
||||
return request({
|
||||
url: '/system/user/verifyList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
userRegisterDetails(data){ // 获取审核内容
|
||||
console.log(data)
|
||||
return request({
|
||||
url: '/system/user/userRegisterDetails',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
verify(data){ // 审核通过不通过
|
||||
return request({
|
||||
url: '/system/user/verify',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
userDelete(data){ // 删除
|
||||
return request({
|
||||
url: '/system/user/delete/{sid}',
|
||||
method: 'delete',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
userNameDelete(data){ // 删除个人注册审核
|
||||
return request({
|
||||
url: '/system/staffApply/deleteByUserName',
|
||||
method: 'delete',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
export default new user()
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
// 委托人分页列表
|
||||
export function clientList(data){
|
||||
return request({
|
||||
url: '/jlcyry/v1/clientalterrecords/pagerList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 变更选择委托人列表
|
||||
export function setclientList(data){
|
||||
return request({
|
||||
url: '/jlcyry/v1/clientalterrecords/staffClientList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 变更为被委托人
|
||||
export function doClientAlter(data){
|
||||
return request({
|
||||
url: '/jlcyry/v1/clientalterrecords/doClientAlter',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
|
||||
// 委托人分页列表
|
||||
export function clientList(data){
|
||||
return request({
|
||||
url: '/jlcyry/v1/clientalterrecords/pagerList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 变更选择委托人列表
|
||||
export function setclientList(data){
|
||||
return request({
|
||||
url: '/jlcyry/v1/clientalterrecords/staffClientList',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
// 变更为被委托人
|
||||
export function doClientAlter(data){
|
||||
return request({
|
||||
url: '/jlcyry/v1/clientalterrecords/doClientAlter',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
// 单位用户列表
|
||||
export function orgUserList(data){
|
||||
return request({
|
||||
url: '/system/user/userListByOrg',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 设置角色
|
||||
export function psotUserRole(data){
|
||||
return request({
|
||||
url: '/system/v1/userrole',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色列表
|
||||
* orgSid 用户SID
|
||||
* roleName 角色名称
|
||||
* */
|
||||
export function orgrolesList(data){
|
||||
return request({
|
||||
url: '/system/v1/orgroles/list',
|
||||
method: 'post',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 保存 设置角色 /system/v1/orguserroles
|
||||
* */
|
||||
export function saveOrgRole(data){
|
||||
return request({
|
||||
url: '/system/v1/orguserroles',
|
||||
method: 'post',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门机构列表 /system/v1/departments/departmentOrgList/{organizationSid}
|
||||
* */
|
||||
export function getOrgList(organizationSid){
|
||||
return request({
|
||||
url: '/system/v1/departments/departmentOrgList/' + organizationSid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 保存 设置部门 /system/v1/orguserroles
|
||||
* */
|
||||
export function saveDepartment(data){
|
||||
return request({
|
||||
url: '/system/v1/departmentStaffs/setUpDepartment',
|
||||
method: 'post',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
// 单位用户列表
|
||||
export function orgUserList(data){
|
||||
return request({
|
||||
url: '/system/user/userListByOrg',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 设置角色
|
||||
export function psotUserRole(data){
|
||||
return request({
|
||||
url: '/system/v1/userrole',
|
||||
method: 'post',
|
||||
data: qs.stringify(data)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色列表
|
||||
* orgSid 用户SID
|
||||
* roleName 角色名称
|
||||
* */
|
||||
export function orgrolesList(data){
|
||||
return request({
|
||||
url: '/system/v1/orgroles/list',
|
||||
method: 'post',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 保存 设置角色 /system/v1/orguserroles
|
||||
* */
|
||||
export function saveOrgRole(data){
|
||||
return request({
|
||||
url: '/system/v1/orguserroles',
|
||||
method: 'post',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门机构列表 /system/v1/departments/departmentOrgList/{organizationSid}
|
||||
* */
|
||||
export function getOrgList(organizationSid){
|
||||
return request({
|
||||
url: '/system/v1/departments/departmentOrgList/' + organizationSid,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 保存 设置部门 /system/v1/orguserroles
|
||||
* */
|
||||
export function saveDepartment(data){
|
||||
return request({
|
||||
url: '/system/v1/departmentStaffs/setUpDepartment',
|
||||
method: 'post',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,150 +1,150 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
// 用户列表
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
export function userList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增
|
||||
export function userAdd(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 更新
|
||||
export function userUpdata(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/update/' +data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delUser(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/delBySid/' +data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化密码
|
||||
export function initPwd(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/initPwd/' +data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 根据sid查询一条信息
|
||||
export function userSingle(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/fetchBySid/' +data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 单条用户的角色列表
|
||||
export function setRole(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/listAllByUserSid/' +data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 角色列表
|
||||
export function saveOrgRole(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuserrole/update',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询角色列表
|
||||
export function roleList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/listAll',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询部门列表
|
||||
export function orgList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询岗位列表
|
||||
export function postList(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/fetchByOrgSid/'+data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCode(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/sendMessageCode/'+data.phone,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 设置是否可用:isEnable:1可用,0不可用
|
||||
export function setRoleEnable(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/setIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
// 用户列表
|
||||
//let tokens = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI2IiwiaXNzIjoiV0JLIiwiZXhwIjoxNjI5OTQxNjI1fQ.aOFOz0h7c8YQs-ti2GLpqeWu4AE9mifx_043hLJQf8g'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
export function userList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/listPage',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增
|
||||
export function userAdd(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 更新
|
||||
export function userUpdata(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/update/' +data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function delUser(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/delBySid/' +data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化密码
|
||||
export function initPwd(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/initPwd/' +data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 根据sid查询一条信息
|
||||
export function userSingle(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/fetchBySid/' +data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 单条用户的角色列表
|
||||
export function setRole(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/listAllByUserSid/' +data.sid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 角色列表
|
||||
export function saveOrgRole(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuserrole/update',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询角色列表
|
||||
export function roleList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysrole/listAll',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询部门列表
|
||||
export function orgList(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysorganization/list',
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询岗位列表
|
||||
export function postList(data){
|
||||
return request({
|
||||
url: '/portal/v1/syspost/fetchByOrgSid/'+data.sid,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCode(data){
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/sendMessageCode/'+data.phone,
|
||||
method: 'get',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 设置是否可用:isEnable:1可用,0不可用
|
||||
export function setRoleEnable(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/setIsEnable/' + data.sid + '/' + data.isEnable,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,56 +1,54 @@
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//登录
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/login',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
})
|
||||
}
|
||||
// 用户注册
|
||||
export function registUser(data) {
|
||||
return request({
|
||||
url: '/system/user/save',
|
||||
method: 'post',
|
||||
data,
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded;'}
|
||||
})
|
||||
}
|
||||
// 获取手机验证码
|
||||
export function getVerificationCode(data) {
|
||||
return request({
|
||||
url: '/system/user/getVerificationCode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取登录验证码
|
||||
export function imgCode() {
|
||||
return request({
|
||||
url: '/system/api/defaultBlendCode?temm=' + new Date().getTime(),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用信息
|
||||
export function getInfo(token) {
|
||||
return request({
|
||||
url: '/system/user/loginDetails',
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
// 根据token值获取登录后的用户信息
|
||||
export function loginDetails(data) {
|
||||
return request({
|
||||
url: '/portal/v1/sysuser/loginDetails',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import qs from 'qs'
|
||||
//登录
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: '/v1/sysuser/login',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
// 用户注册
|
||||
export function registUser(data) {
|
||||
return request({
|
||||
url: 'v1/sysuser/register',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 获取手机验证码
|
||||
export function getVerificationCode(data) {
|
||||
return request({
|
||||
url: '/system/user/getVerificationCode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取登录验证码
|
||||
export function imgCode() {
|
||||
return request({
|
||||
url: '/system/api/defaultBlendCode?temm=' + new Date().getTime(),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用信息
|
||||
export function getInfo(token) {
|
||||
return request({
|
||||
url: '/system/user/loginDetails',
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
// 根据token值获取登录后的用户信息
|
||||
export function loginDetails(data) {
|
||||
return request({
|
||||
url: '/v1/sysuser/loginDetails',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,87 +1,87 @@
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
const tokens = window.sessionStorage.getItem('token')
|
||||
|
||||
// 查询已办任务列表
|
||||
export function finishedList(query) {
|
||||
return request({
|
||||
url: '/flowable/task/finishedList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 任务流转记录
|
||||
export function flowRecord(query) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/flowRecordAndComment/' + query.procInsId + '/' + query.deployId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回任务
|
||||
export function revokeProcess(data) {
|
||||
const userSid = data.userSid
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/revokeProcess/' + userSid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
const tokens = window.sessionStorage.getItem('token')
|
||||
|
||||
// 查询已办任务列表
|
||||
export function finishedList(query) {
|
||||
return request({
|
||||
url: '/flowable/task/finishedList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 任务流转记录
|
||||
export function flowRecord(query) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/flowRecordAndComment/' + query.procInsId + '/' + query.deployId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回任务
|
||||
export function revokeProcess(data) {
|
||||
const userSid = data.userSid
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/revokeProcess/' + userSid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,92 +1,92 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
const tokens = window.sessionStorage.getItem('token')
|
||||
|
||||
export default {
|
||||
// 查询待办任务列表
|
||||
getNextNodes: function (query) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/getNextTasks/'+query.taskId,
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
},
|
||||
businessStart: function(params) {
|
||||
const procDefId = params.procDefId
|
||||
const userSid = params.userSid
|
||||
const variables = params.variables
|
||||
return request({
|
||||
url: '/portal/v1/flow/businessStart/' + procDefId + '/' + userSid,
|
||||
method: 'POST',
|
||||
data: variables,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
},
|
||||
processPagerList: function(params) {
|
||||
const pageNum = params.current
|
||||
const pageSize = params.size
|
||||
return request({
|
||||
url: '/portal/v1/flow/processPagerList',
|
||||
method: 'POST',
|
||||
data: {
|
||||
pageNum: pageNum,
|
||||
pageSize: pageSize
|
||||
}
|
||||
})
|
||||
},
|
||||
myProcessList: function(params) {
|
||||
let userSid=params.params.userSid;
|
||||
return request({
|
||||
url: '/portal/v1/flow/myprocess/'+userSid,
|
||||
method: 'POST',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
},
|
||||
todoTaskList: function(params) {
|
||||
let userSid=params.params.userSid;
|
||||
return request({
|
||||
url: '/portal/v1/flow/todoTaskList/'+userSid,
|
||||
method: 'POST',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
},
|
||||
doneTaskList: function(params) {
|
||||
let userSid=params.params.userSid;
|
||||
return request({
|
||||
url: '/portal/v1/flow/doneTaskList/'+userSid,
|
||||
method: 'POST',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
// 任务流转记录
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/complete',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
const tokens = window.sessionStorage.getItem('token')
|
||||
|
||||
export default {
|
||||
// 查询待办任务列表
|
||||
getNextNodes: function (query) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/getNextTasks/'+query.taskId,
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
},
|
||||
businessStart: function(params) {
|
||||
const procDefId = params.procDefId
|
||||
const userSid = params.userSid
|
||||
const variables = params.variables
|
||||
return request({
|
||||
url: '/portal/v1/flow/businessStart/' + procDefId + '/' + userSid,
|
||||
method: 'POST',
|
||||
data: variables,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
},
|
||||
processPagerList: function(params) {
|
||||
const pageNum = params.current
|
||||
const pageSize = params.size
|
||||
return request({
|
||||
url: '/portal/v1/flow/processPagerList',
|
||||
method: 'POST',
|
||||
data: {
|
||||
pageNum: pageNum,
|
||||
pageSize: pageSize
|
||||
}
|
||||
})
|
||||
},
|
||||
myProcessList: function(params) {
|
||||
let userSid=params.params.userSid;
|
||||
return request({
|
||||
url: '/portal/v1/flow/myprocess/'+userSid,
|
||||
method: 'POST',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
},
|
||||
todoTaskList: function(params) {
|
||||
let userSid=params.params.userSid;
|
||||
return request({
|
||||
url: '/portal/v1/flow/todoTaskList/'+userSid,
|
||||
method: 'POST',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
},
|
||||
doneTaskList: function(params) {
|
||||
let userSid=params.params.userSid;
|
||||
return request({
|
||||
url: '/portal/v1/flow/doneTaskList/'+userSid,
|
||||
method: 'POST',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
// 任务流转记录
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/complete',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'token': tokens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,64 +1,64 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询流程表单列表
|
||||
export function listForm(query) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/list',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程表单详细
|
||||
export function getForm(formId) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/' + formId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程表单
|
||||
export function addForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程表单
|
||||
export function updateForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 挂载表单
|
||||
export function addDeployForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/addDeployForm',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程表单
|
||||
export function delForm(formId) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/' + formId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程表单
|
||||
export function exportForm(query) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询流程表单列表
|
||||
export function listForm(query) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/list',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程表单详细
|
||||
export function getForm(formId) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/' + formId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程表单
|
||||
export function addForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {'Content-Type': 'application/json',
|
||||
'token':1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程表单
|
||||
export function updateForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 挂载表单
|
||||
export function addDeployForm(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/addDeployForm',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程表单
|
||||
export function delForm(formId) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/' + formId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程表单
|
||||
export function exportForm(query) {
|
||||
return request({
|
||||
url: '/v1/flowable/form/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 代办、已办基础信息页面
|
||||
// 详情编辑回显(订金收取) 已改
|
||||
export function fetchSid(data) {
|
||||
return request({
|
||||
url: '/buscenter/v1/busmaindeposit/selectDepositBySid/' + data,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 详细编辑回显(预定车辆) 已改
|
||||
export function selectSid(data) {
|
||||
return request({
|
||||
url: '/buscenter/v1/busmaindeposit/selectDepositVehBySid/' + data,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
//合同管理编辑回显
|
||||
export function getOneContract(data) {
|
||||
return request({
|
||||
url: "/base/v1/commoncontract/fetchSid/" + data,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 代办、已办基础信息页面
|
||||
// 详情编辑回显(订金收取) 已改
|
||||
export function fetchSid(data) {
|
||||
return request({
|
||||
url: '/buscenter/v1/busmaindeposit/selectDepositBySid/' + data,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 详细编辑回显(预定车辆) 已改
|
||||
export function selectSid(data) {
|
||||
return request({
|
||||
url: '/buscenter/v1/busmaindeposit/selectDepositVehBySid/' + data,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
//合同管理编辑回显
|
||||
export function getOneContract(data) {
|
||||
return request({
|
||||
url: "/base/v1/commoncontract/fetchSid/" + data,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,101 +1,101 @@
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 我的发起的流程
|
||||
export function myProcessList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/myprocess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/flowable/task/complete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 取消申请
|
||||
export function stopProcess(data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/stopProcess',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 驳回任务
|
||||
export function rejectTask(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/reject',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 可退回任务列表
|
||||
export function returnList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/returnList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/deleteProcess/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 我的发起的流程
|
||||
export function myProcessList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/myprocess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/flowable/task/complete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 取消申请
|
||||
export function stopProcess(data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/stopProcess',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 驳回任务
|
||||
export function rejectTask(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/reject',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 可退回任务列表
|
||||
export function returnList(data) {
|
||||
return request({
|
||||
url: '/v1/flowable/task/returnList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/deleteProcess/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,129 +1,129 @@
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 查询待办任务列表
|
||||
export function todoList(query) {
|
||||
return request({
|
||||
url: '/flowable/task/todoList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/flowable/task/complete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 委派任务
|
||||
export function delegate(data) {
|
||||
return request({
|
||||
url: '/flowable/task/delegate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 退回任务
|
||||
export function returnTask(data) {
|
||||
return request({
|
||||
url: '/flowable/task/return',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 驳回任务
|
||||
export function rejectTask(data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/reject',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 可退回任务列表
|
||||
export function returnList(data) {
|
||||
return request({
|
||||
url: '/flowable/task/returnList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 下一节点
|
||||
export function getNextFlowNode(data) {
|
||||
return request({
|
||||
url: '/flowable/task/nextFlowNode',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查看总代办列表
|
||||
export function taskList (data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/todoAllTaskList/' + data,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
import request from '@/utils/request'
|
||||
import da from "element-ui/src/locale/lang/da";
|
||||
|
||||
// 查询待办任务列表
|
||||
export function todoList(query) {
|
||||
return request({
|
||||
url: '/flowable/task/todoList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 完成任务
|
||||
export function complete(data) {
|
||||
return request({
|
||||
url: '/flowable/task/complete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 委派任务
|
||||
export function delegate(data) {
|
||||
return request({
|
||||
url: '/flowable/task/delegate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 退回任务
|
||||
export function returnTask(data) {
|
||||
return request({
|
||||
url: '/flowable/task/return',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 驳回任务
|
||||
export function rejectTask(data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/task/reject',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 可退回任务列表
|
||||
export function returnList(data) {
|
||||
return request({
|
||||
url: '/flowable/task/returnList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 下一节点
|
||||
export function getNextFlowNode(data) {
|
||||
return request({
|
||||
url: '/flowable/task/nextFlowNode',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 部署流程实例
|
||||
export function deployStart(deployId) {
|
||||
return request({
|
||||
url: '/flowable/process/startFlow/' + deployId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询流程定义详细
|
||||
export function getDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增流程定义
|
||||
export function addDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改流程定义
|
||||
export function updateDeployment(data) {
|
||||
return request({
|
||||
url: '/system/deployment',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程定义
|
||||
export function delDeployment(id) {
|
||||
return request({
|
||||
url: '/system/deployment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出流程定义
|
||||
export function exportDeployment(query) {
|
||||
return request({
|
||||
url: '/system/deployment/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查看总代办列表
|
||||
export function taskList (data) {
|
||||
return request({
|
||||
url: '/portal/v1/flow/todoAllTaskList/' + data,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,151 +1,151 @@
|
||||
<template>
|
||||
<div class="AreaPicker">
|
||||
<el-select v-model="form.province"
|
||||
@change="changeProvince(form.province)"
|
||||
filterable
|
||||
placeholder="请选择省份"
|
||||
:loading="loading == 'province'">
|
||||
<el-option
|
||||
v-for="item in province_list"
|
||||
:key="item.sid"
|
||||
:label="item.name"
|
||||
:value="item.sid"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="form.city"
|
||||
@change='changeCity(form.city)'
|
||||
filterable
|
||||
placeholder="请选择市"
|
||||
:loading="loading == 'city'"
|
||||
style="margin-left: 8px;">
|
||||
<el-option
|
||||
v-for="item in city_list"
|
||||
:key="item.sid"
|
||||
:label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="form.county"
|
||||
@change='changeCounty(form.county)'
|
||||
filterable
|
||||
:loading="loading == 'county'"
|
||||
placeholder="请选择县/区"
|
||||
style="margin-left: 8px;">
|
||||
<el-option
|
||||
v-for="item in county_list"
|
||||
:key="item.sid"
|
||||
:label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getProvince,
|
||||
getCity,
|
||||
getCounty
|
||||
} from '@/api/Common/areaPicker.js'
|
||||
export default {
|
||||
props:{
|
||||
province:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
city:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
county:{
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
province_list: [],
|
||||
city_list: [],
|
||||
county_list: [],
|
||||
form:{
|
||||
province: this.province,
|
||||
city: this.city,
|
||||
county: this.county
|
||||
},
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
province:function(newVal,oldVal){
|
||||
this.form.province = newVal
|
||||
},
|
||||
city:function(newVal,oldVal){
|
||||
this.form.city = newVal
|
||||
},
|
||||
county:function(newVal,oldVal){
|
||||
this.form.county = newVal
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
let provincelist = await getProvince()
|
||||
this.province_list = provincelist.data
|
||||
if(this.province){
|
||||
let citylist = await getCity({ sid: this.province })
|
||||
this.city_list = citylist.data
|
||||
}
|
||||
if(this.city){
|
||||
let countylist = await getCounty({ sid: this.city })
|
||||
this.county_list = countylist.data
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
methods: {
|
||||
changeProvince(val){
|
||||
console.log(val)
|
||||
getCity({ sid: val }).then(res => {
|
||||
this.city_list = res.data
|
||||
this.loading = false
|
||||
})
|
||||
let obj = {};
|
||||
obj = this.province_list.find((item)=>{
|
||||
return item.sid === val;//筛选出匹配数据
|
||||
});
|
||||
console.log(obj)
|
||||
this.form.city = ''
|
||||
this.form.county = ''
|
||||
this.city_list = []
|
||||
this.county_list = []
|
||||
this.loading = 'city'
|
||||
this.$emit('areaPicker', obj.sidPath)
|
||||
},
|
||||
changeCity(val){
|
||||
let obj = {};
|
||||
obj = this.city_list.find((item)=>{
|
||||
return item.sid === val;//筛选出匹配数据
|
||||
});
|
||||
console.log(obj)
|
||||
this.form.county = ''
|
||||
this.county_list = []
|
||||
this.loading = 'county'
|
||||
this.$emit('areaPicker', obj.sidPath)
|
||||
getCounty({ sid: val }).then(res => {
|
||||
this.county_list = res.data
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
changeCounty(val){
|
||||
let obj = {};
|
||||
obj = this.county_list.find((item)=>{
|
||||
return item.sid === val;//筛选出匹配数据
|
||||
});
|
||||
this.$emit('areaPicker', obj.sidPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<div class="AreaPicker">
|
||||
<el-select v-model="form.province"
|
||||
@change="changeProvince(form.province)"
|
||||
filterable
|
||||
placeholder="请选择省份"
|
||||
:loading="loading == 'province'">
|
||||
<el-option
|
||||
v-for="item in province_list"
|
||||
:key="item.sid"
|
||||
:label="item.name"
|
||||
:value="item.sid"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="form.city"
|
||||
@change='changeCity(form.city)'
|
||||
filterable
|
||||
placeholder="请选择市"
|
||||
:loading="loading == 'city'"
|
||||
style="margin-left: 8px;">
|
||||
<el-option
|
||||
v-for="item in city_list"
|
||||
:key="item.sid"
|
||||
:label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="form.county"
|
||||
@change='changeCounty(form.county)'
|
||||
filterable
|
||||
:loading="loading == 'county'"
|
||||
placeholder="请选择县/区"
|
||||
style="margin-left: 8px;">
|
||||
<el-option
|
||||
v-for="item in county_list"
|
||||
:key="item.sid"
|
||||
:label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getProvince,
|
||||
getCity,
|
||||
getCounty
|
||||
} from '@/api/Common/areaPicker.js'
|
||||
export default {
|
||||
props:{
|
||||
province:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
city:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
county:{
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
province_list: [],
|
||||
city_list: [],
|
||||
county_list: [],
|
||||
form:{
|
||||
province: this.province,
|
||||
city: this.city,
|
||||
county: this.county
|
||||
},
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
province:function(newVal,oldVal){
|
||||
this.form.province = newVal
|
||||
},
|
||||
city:function(newVal,oldVal){
|
||||
this.form.city = newVal
|
||||
},
|
||||
county:function(newVal,oldVal){
|
||||
this.form.county = newVal
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
let provincelist = await getProvince()
|
||||
this.province_list = provincelist.data
|
||||
if(this.province){
|
||||
let citylist = await getCity({ sid: this.province })
|
||||
this.city_list = citylist.data
|
||||
}
|
||||
if(this.city){
|
||||
let countylist = await getCounty({ sid: this.city })
|
||||
this.county_list = countylist.data
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
methods: {
|
||||
changeProvince(val){
|
||||
console.log(val)
|
||||
getCity({ sid: val }).then(res => {
|
||||
this.city_list = res.data
|
||||
this.loading = false
|
||||
})
|
||||
let obj = {};
|
||||
obj = this.province_list.find((item)=>{
|
||||
return item.sid === val;//筛选出匹配数据
|
||||
});
|
||||
console.log(obj)
|
||||
this.form.city = ''
|
||||
this.form.county = ''
|
||||
this.city_list = []
|
||||
this.county_list = []
|
||||
this.loading = 'city'
|
||||
this.$emit('areaPicker', obj.sidPath)
|
||||
},
|
||||
changeCity(val){
|
||||
let obj = {};
|
||||
obj = this.city_list.find((item)=>{
|
||||
return item.sid === val;//筛选出匹配数据
|
||||
});
|
||||
console.log(obj)
|
||||
this.form.county = ''
|
||||
this.county_list = []
|
||||
this.loading = 'county'
|
||||
this.$emit('areaPicker', obj.sidPath)
|
||||
getCounty({ sid: val }).then(res => {
|
||||
this.county_list = res.data
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
changeCounty(val){
|
||||
let obj = {};
|
||||
obj = this.county_list.find((item)=>{
|
||||
return item.sid === val;//筛选出匹配数据
|
||||
});
|
||||
this.$emit('areaPicker', obj.sidPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,78 +1,78 @@
|
||||
<template>
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pathToRegexp from 'path-to-regexp'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelList: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.getBreadcrumb()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBreadcrumb()
|
||||
},
|
||||
methods: {
|
||||
getBreadcrumb() {
|
||||
// only show routes with meta.title
|
||||
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
|
||||
const first = matched[0]
|
||||
|
||||
if (!this.isDashboard(first)) {
|
||||
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
|
||||
}
|
||||
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
},
|
||||
isDashboard(route) {
|
||||
const name = route && route.name
|
||||
if (!name) {
|
||||
return false
|
||||
}
|
||||
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
|
||||
},
|
||||
pathCompile(path) {
|
||||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
||||
const { params } = this.$route
|
||||
var toPath = pathToRegexp.compile(path)
|
||||
return toPath(params)
|
||||
},
|
||||
handleLink(item) {
|
||||
const { redirect, path } = item
|
||||
if (redirect) {
|
||||
this.$router.push(redirect)
|
||||
return
|
||||
}
|
||||
this.$router.push(this.pathCompile(path))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
||||
margin-left: 8px;
|
||||
|
||||
.no-redirect {
|
||||
color: #97a8be;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pathToRegexp from 'path-to-regexp'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelList: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.getBreadcrumb()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBreadcrumb()
|
||||
},
|
||||
methods: {
|
||||
getBreadcrumb() {
|
||||
// only show routes with meta.title
|
||||
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
|
||||
const first = matched[0]
|
||||
|
||||
if (!this.isDashboard(first)) {
|
||||
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
|
||||
}
|
||||
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
},
|
||||
isDashboard(route) {
|
||||
const name = route && route.name
|
||||
if (!name) {
|
||||
return false
|
||||
}
|
||||
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
|
||||
},
|
||||
pathCompile(path) {
|
||||
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
||||
const { params } = this.$route
|
||||
var toPath = pathToRegexp.compile(path)
|
||||
return toPath(params)
|
||||
},
|
||||
handleLink(item) {
|
||||
const { redirect, path } = item
|
||||
if (redirect) {
|
||||
this.$router.push(redirect)
|
||||
return
|
||||
}
|
||||
this.$router.push(this.pathCompile(path))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
||||
margin-left: 8px;
|
||||
|
||||
.no-redirect {
|
||||
color: #97a8be;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,130 +1,130 @@
|
||||
<template>
|
||||
<!--标题按钮部分开始-->
|
||||
<div class="tab-header webtop">
|
||||
<!--标题-->
|
||||
<div>{{ viewTitle }}<span style="padding-left: 10px">{{ version }}</span><span style="padding-left: 10px">{{ time }}</span></div>
|
||||
<!--start 按钮部分开始 :icon="item.icon"-->
|
||||
<div>
|
||||
<el-button v-for="item in btnList" :key="item.btnKey" :type="item.type" :size="item.size" :disabled="btndisabled" @click="btnHandle(item.btnKey)">
|
||||
<svg-icon v-if="item.icon" :iconClass="item.icon"/>{{ item.btnLabel }}
|
||||
</el-button>
|
||||
</div>
|
||||
<!--end 按钮部分结束-->
|
||||
</div>
|
||||
<!--标题按钮部分结束-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ButtonBar',
|
||||
props: {
|
||||
viewTitle: String,
|
||||
version: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
time: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
btndisabled: { type: Boolean, default: false }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentPath: this.$route.path,
|
||||
userSid: this.$store.getters.userInfo ? this.$store.getters.userInfo.userSid : '',
|
||||
btnList: [
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'edit',
|
||||
btnKey: 'toEdit',
|
||||
btnLabel: '编辑'
|
||||
},
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'submit',
|
||||
btnKey: 'doSubmit',
|
||||
btnLabel: '提交'
|
||||
},
|
||||
{
|
||||
type: 'danger',
|
||||
size: 'small',
|
||||
icon: 'del',
|
||||
btnKey: 'doDel',
|
||||
btnLabel: '删除'
|
||||
},
|
||||
{
|
||||
type: 'success',
|
||||
size: 'small',
|
||||
icon: 'Import',
|
||||
btnKey: 'doImport',
|
||||
btnLabel: '导入'
|
||||
},
|
||||
{
|
||||
type: 'success',
|
||||
size: 'small',
|
||||
icon: 'export',
|
||||
btnKey: 'build',
|
||||
btnLabel: '导出'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
this.initPermission()
|
||||
},
|
||||
methods: {
|
||||
initPermission() {
|
||||
console.log('*******************当前路径 ' + this.currentPath)
|
||||
console.log('*******************当前用户 ' + this.userSid)
|
||||
const params = {
|
||||
currentPath: this.currentPath,
|
||||
userSid: this.userSid
|
||||
}
|
||||
// req
|
||||
// .buttonPermission(params)
|
||||
// .then(resp => {
|
||||
// if (resp.success) {
|
||||
// this.btnList = resp.data
|
||||
// }
|
||||
// })
|
||||
// .catch(e => {
|
||||
// console.log('请求权限按钮组出错:' + e)
|
||||
// })
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
this.$emit('btnhandle', btnKey)
|
||||
},
|
||||
setButtonList(value) {
|
||||
this.btnList = value
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.16em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
margin-right: 3px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<!--标题按钮部分开始-->
|
||||
<div class="tab-header webtop">
|
||||
<!--标题-->
|
||||
<div>{{ viewTitle }}<span style="padding-left: 10px">{{ version }}</span><span style="padding-left: 10px">{{ time }}</span></div>
|
||||
<!--start 按钮部分开始 :icon="item.icon"-->
|
||||
<div>
|
||||
<el-button v-for="item in btnList" :key="item.btnKey" :type="item.type" :size="item.size" :disabled="btndisabled" @click="btnHandle(item.btnKey)">
|
||||
<svg-icon v-if="item.icon" :iconClass="item.icon"/>{{ item.btnLabel }}
|
||||
</el-button>
|
||||
</div>
|
||||
<!--end 按钮部分结束-->
|
||||
</div>
|
||||
<!--标题按钮部分结束-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ButtonBar',
|
||||
props: {
|
||||
viewTitle: String,
|
||||
version: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
time: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
btndisabled: { type: Boolean, default: false }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentPath: this.$route.path,
|
||||
userSid: this.$store.getters.userInfo ? this.$store.getters.userInfo.userSid : '',
|
||||
btnList: [
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'edit',
|
||||
btnKey: 'toEdit',
|
||||
btnLabel: '编辑'
|
||||
},
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'submit',
|
||||
btnKey: 'doSubmit',
|
||||
btnLabel: '提交'
|
||||
},
|
||||
{
|
||||
type: 'danger',
|
||||
size: 'small',
|
||||
icon: 'del',
|
||||
btnKey: 'doDel',
|
||||
btnLabel: '删除'
|
||||
},
|
||||
{
|
||||
type: 'success',
|
||||
size: 'small',
|
||||
icon: 'Import',
|
||||
btnKey: 'doImport',
|
||||
btnLabel: '导入'
|
||||
},
|
||||
{
|
||||
type: 'success',
|
||||
size: 'small',
|
||||
icon: 'export',
|
||||
btnKey: 'build',
|
||||
btnLabel: '导出'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
this.initPermission()
|
||||
},
|
||||
methods: {
|
||||
initPermission() {
|
||||
console.log('*******************当前路径 ' + this.currentPath)
|
||||
console.log('*******************当前用户 ' + this.userSid)
|
||||
const params = {
|
||||
currentPath: this.currentPath,
|
||||
userSid: this.userSid
|
||||
}
|
||||
// req
|
||||
// .buttonPermission(params)
|
||||
// .then(resp => {
|
||||
// if (resp.success) {
|
||||
// this.btnList = resp.data
|
||||
// }
|
||||
// })
|
||||
// .catch(e => {
|
||||
// console.log('请求权限按钮组出错:' + e)
|
||||
// })
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
this.$emit('btnhandle', btnKey)
|
||||
},
|
||||
setButtonList(value) {
|
||||
this.btnList = value
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.16em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
margin-right: 3px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
<template>
|
||||
<el-image
|
||||
:preview-src-list="[url]"
|
||||
class="block-img"
|
||||
:src="url"
|
||||
@click.stop="handleClickItem"></el-image>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
url: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClickItem() {
|
||||
// 获取遮罩层dom
|
||||
let domImageMask = document.querySelector(".el-image-viewer__mask");
|
||||
if (!domImageMask) {
|
||||
return;
|
||||
}
|
||||
domImageMask.addEventListener("click", () => {
|
||||
// 点击遮罩层时调用关闭按钮的 click 事件
|
||||
document.querySelector(".el-image-viewer__close").click();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.block-img{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.el-icon-circle-close{
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<el-image
|
||||
:preview-src-list="[url]"
|
||||
class="block-img"
|
||||
:src="url"
|
||||
@click.stop="handleClickItem"></el-image>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
url: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClickItem() {
|
||||
// 获取遮罩层dom
|
||||
let domImageMask = document.querySelector(".el-image-viewer__mask");
|
||||
if (!domImageMask) {
|
||||
return;
|
||||
}
|
||||
domImageMask.addEventListener("click", () => {
|
||||
// 点击遮罩层时调用关闭按钮的 click 事件
|
||||
document.querySelector(".el-image-viewer__close").click();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.block-img{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.el-icon-circle-close{
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,78 +1,78 @@
|
||||
<template>
|
||||
<div v-if="errorLogs.length>0">
|
||||
<el-badge :is-dot="true" style="line-height: 25px;margin-top: -5px;" @click.native="dialogTableVisible=true">
|
||||
<el-button style="padding: 8px 10px;" size="small" type="danger">
|
||||
<svg-icon icon-class="bug" />
|
||||
</el-button>
|
||||
</el-badge>
|
||||
|
||||
<el-dialog :visible.sync="dialogTableVisible" width="80%" append-to-body>
|
||||
<div slot="title">
|
||||
<span style="padding-right: 10px;">Error Log</span>
|
||||
<el-button size="mini" type="primary" icon="el-icon-delete" @click="clearAll">Clear All</el-button>
|
||||
</div>
|
||||
<el-table :data="errorLogs" border>
|
||||
<el-table-column label="Message">
|
||||
<template slot-scope="{row}">
|
||||
<div>
|
||||
<span class="message-title">Msg:</span>
|
||||
<el-tag type="danger">
|
||||
{{ row.err.message }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<span class="message-title" style="padding-right: 10px;">Info: </span>
|
||||
<el-tag type="warning">
|
||||
{{ row.vm.$vnode.tag }} error in {{ row.info }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<span class="message-title" style="padding-right: 16px;">Url: </span>
|
||||
<el-tag type="success">
|
||||
{{ row.url }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Stack">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.err.stack }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ErrorLog',
|
||||
data() {
|
||||
return {
|
||||
dialogTableVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
errorLogs() {
|
||||
return this.$store.getters.errorLogs
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clearAll() {
|
||||
this.dialogTableVisible = false
|
||||
this.$store.dispatch('errorLog/clearErrorLog')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.message-title {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
padding-right: 8px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div v-if="errorLogs.length>0">
|
||||
<el-badge :is-dot="true" style="line-height: 25px;margin-top: -5px;" @click.native="dialogTableVisible=true">
|
||||
<el-button style="padding: 8px 10px;" size="small" type="danger">
|
||||
<svg-icon icon-class="bug" />
|
||||
</el-button>
|
||||
</el-badge>
|
||||
|
||||
<el-dialog :visible.sync="dialogTableVisible" width="80%" append-to-body>
|
||||
<div slot="title">
|
||||
<span style="padding-right: 10px;">Error Log</span>
|
||||
<el-button size="mini" type="primary" icon="el-icon-delete" @click="clearAll">Clear All</el-button>
|
||||
</div>
|
||||
<el-table :data="errorLogs" border>
|
||||
<el-table-column label="Message">
|
||||
<template slot-scope="{row}">
|
||||
<div>
|
||||
<span class="message-title">Msg:</span>
|
||||
<el-tag type="danger">
|
||||
{{ row.err.message }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<span class="message-title" style="padding-right: 10px;">Info: </span>
|
||||
<el-tag type="warning">
|
||||
{{ row.vm.$vnode.tag }} error in {{ row.info }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<span class="message-title" style="padding-right: 16px;">Url: </span>
|
||||
<el-tag type="success">
|
||||
{{ row.url }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Stack">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.err.stack }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ErrorLog',
|
||||
data() {
|
||||
return {
|
||||
dialogTableVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
errorLogs() {
|
||||
return this.$store.getters.errorLogs
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clearAll() {
|
||||
this.dialogTableVisible = false
|
||||
this.$store.dispatch('errorLog/clearErrorLog')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.message-title {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
padding-right: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
<template>
|
||||
<div style="padding: 0 15px;" @click="toggleClick">
|
||||
<svg
|
||||
:class="{'is-active':isActive}"
|
||||
class="hamburger"
|
||||
viewBox="0 0 1024 1024"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="64"
|
||||
height="64"
|
||||
>
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
|
||||
</svg>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Hamburger',
|
||||
props: {
|
||||
isActive: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleClick() {
|
||||
this.$emit('toggleClick')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.hamburger {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.hamburger.is-active {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div style="padding: 0 15px;" @click="toggleClick">
|
||||
<svg
|
||||
:class="{'is-active':isActive}"
|
||||
class="hamburger"
|
||||
viewBox="0 0 1024 1024"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="64"
|
||||
height="64"
|
||||
>
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
|
||||
</svg>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Hamburger',
|
||||
props: {
|
||||
isActive: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleClick() {
|
||||
this.$emit('toggleClick')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.hamburger {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.hamburger.is-active {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
<template>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 30px;" class="grid-content bg-purple" /> </el-col>
|
||||
<el-col :span="12" style="display: flex;justify-content: center;align-items: center;">
|
||||
<el-button v-if="notshowdelete == false" type="danger" size="mini" :disabled="multipleselection.length == 0" @click="delList">批量删除</el-button>
|
||||
<el-pagination
|
||||
:page-size="queryparams.size"
|
||||
:current-page="queryparams.current"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:total="queryparams.total"
|
||||
background
|
||||
layout="total,sizes,prev,pager,next,jumper"
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNoChange"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <div style="display: flex;">
|
||||
|
||||
</div> -->
|
||||
<!-- <el-pagination @current-change="pageNoChange" :page-size="queryparams.size" :current-page="queryparams.current" background layout="total,prev, pager, next,jumper" :total="queryparams.total"></el-pagination> -->
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'Pagging',
|
||||
props: {
|
||||
notshowdelete: Boolean,
|
||||
queryparams: Object,
|
||||
multipleselection: Array,
|
||||
idname: String
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
delete() {
|
||||
const id_name = this.idname || 'id'
|
||||
this.$confirm('此操作将删除[' + this.multipleselection.length + ']条数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let ids = ''
|
||||
for (let i = 0; i < this.multipleselection.length; i++) {
|
||||
ids += this.multipleselection[i][id_name] + ','
|
||||
}
|
||||
this.$emit('dodelete', ids)
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.queryparams.size = val
|
||||
this.$emit('reloading')
|
||||
},
|
||||
pageNoChange(val) {
|
||||
this.queryparams.current = val
|
||||
this.$emit('reloading')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.el-row {
|
||||
border-bottom: #dfe6ec 1px solid;
|
||||
border-left: #dfe6ec 1px solid;
|
||||
border-right: #dfe6ec 1px solid;
|
||||
padding: 10px 0 10px 0;
|
||||
}
|
||||
.el-pagination {
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 30px;" class="grid-content bg-purple" /> </el-col>
|
||||
<el-col :span="12" style="display: flex;justify-content: center;align-items: center;">
|
||||
<el-button v-if="notshowdelete == false" type="danger" size="mini" :disabled="multipleselection.length == 0" @click="delList">批量删除</el-button>
|
||||
<el-pagination
|
||||
:page-size="queryparams.size"
|
||||
:current-page="queryparams.current"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:total="queryparams.total"
|
||||
background
|
||||
layout="total,sizes,prev,pager,next,jumper"
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNoChange"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <div style="display: flex;">
|
||||
|
||||
</div> -->
|
||||
<!-- <el-pagination @current-change="pageNoChange" :page-size="queryparams.size" :current-page="queryparams.current" background layout="total,prev, pager, next,jumper" :total="queryparams.total"></el-pagination> -->
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'Pagging',
|
||||
props: {
|
||||
notshowdelete: Boolean,
|
||||
queryparams: Object,
|
||||
multipleselection: Array,
|
||||
idname: String
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
delete() {
|
||||
const id_name = this.idname || 'id'
|
||||
this.$confirm('此操作将删除[' + this.multipleselection.length + ']条数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let ids = ''
|
||||
for (let i = 0; i < this.multipleselection.length; i++) {
|
||||
ids += this.multipleselection[i][id_name] + ','
|
||||
}
|
||||
this.$emit('dodelete', ids)
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.queryparams.size = val
|
||||
this.$emit('reloading')
|
||||
},
|
||||
pageNoChange(val) {
|
||||
this.queryparams.current = val
|
||||
this.$emit('reloading')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.el-row {
|
||||
border-bottom: #dfe6ec 1px solid;
|
||||
border-left: #dfe6ec 1px solid;
|
||||
border-right: #dfe6ec 1px solid;
|
||||
padding: 10px 0 10px 0;
|
||||
}
|
||||
.el-pagination {
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
<template>
|
||||
<div>
|
||||
<svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'Screenfull',
|
||||
data() {
|
||||
return {
|
||||
isFullscreen: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.destroy()
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
if (!screenfull.enabled) {
|
||||
this.$message({
|
||||
message: 'you browser can not work',
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
}
|
||||
screenfull.toggle()
|
||||
},
|
||||
change() {
|
||||
this.isFullscreen = screenfull.isFullscreen
|
||||
},
|
||||
init() {
|
||||
if (screenfull.enabled) {
|
||||
screenfull.on('change', this.change)
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
if (screenfull.enabled) {
|
||||
screenfull.off('change', this.change)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.screenfull-svg {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
fill: #5a5e66;;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
vertical-align: 10px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'Screenfull',
|
||||
data() {
|
||||
return {
|
||||
isFullscreen: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.destroy()
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
if (!screenfull.enabled) {
|
||||
this.$message({
|
||||
message: 'you browser can not work',
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
}
|
||||
screenfull.toggle()
|
||||
},
|
||||
change() {
|
||||
this.isFullscreen = screenfull.isFullscreen
|
||||
},
|
||||
init() {
|
||||
if (screenfull.enabled) {
|
||||
screenfull.on('change', this.change)
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
if (screenfull.enabled) {
|
||||
screenfull.off('change', this.change)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.screenfull-svg {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
fill: #5a5e66;;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
vertical-align: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
<template>
|
||||
<el-dropdown trigger="click" @command="handleSetSize">
|
||||
<div>
|
||||
<svg-icon class-name="size-icon" icon-class="size" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">
|
||||
{{
|
||||
item.label }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
sizeOptions: [
|
||||
{ label: 'Default', value: 'default' },
|
||||
{ label: 'Medium', value: 'medium' },
|
||||
{ label: 'Small', value: 'small' },
|
||||
{ label: 'Mini', value: 'mini' }
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
size() {
|
||||
return this.$store.getters.size
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSetSize(size) {
|
||||
this.$ELEMENT.size = size
|
||||
this.$store.dispatch('app/setSize', size)
|
||||
this.refreshView()
|
||||
this.$message({
|
||||
message: 'Switch Size Success',
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
refreshView() {
|
||||
// In order to make the cached page re-rendered
|
||||
this.$store.dispatch('tagsView/delAllCachedViews', this.$route)
|
||||
|
||||
const { fullPath } = this.$route
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$router.replace({
|
||||
path: '/redirect' + fullPath
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<el-dropdown trigger="click" @command="handleSetSize">
|
||||
<div>
|
||||
<svg-icon class-name="size-icon" icon-class="size" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">
|
||||
{{
|
||||
item.label }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
sizeOptions: [
|
||||
{ label: 'Default', value: 'default' },
|
||||
{ label: 'Medium', value: 'medium' },
|
||||
{ label: 'Small', value: 'small' },
|
||||
{ label: 'Mini', value: 'mini' }
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
size() {
|
||||
return this.$store.getters.size
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSetSize(size) {
|
||||
this.$ELEMENT.size = size
|
||||
this.$store.dispatch('app/setSize', size)
|
||||
this.refreshView()
|
||||
this.$message({
|
||||
message: 'Switch Size Success',
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
refreshView() {
|
||||
// In order to make the cached page re-rendered
|
||||
this.$store.dispatch('tagsView/delAllCachedViews', this.$route)
|
||||
|
||||
const { fullPath } = this.$route
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$router.replace({
|
||||
path: '/redirect' + fullPath
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
<template>
|
||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
||||
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
||||
<use :xlink:href="iconName" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
|
||||
import { isExternal } from '@/utils/validate'
|
||||
|
||||
export default {
|
||||
name: 'SvgIcon',
|
||||
props: {
|
||||
iconClass: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isExternal() {
|
||||
return isExternal(this.iconClass)
|
||||
},
|
||||
iconName() {
|
||||
return `#icon-${this.iconClass}`
|
||||
},
|
||||
svgClass() {
|
||||
if (this.className) {
|
||||
return 'svg-icon ' + this.className
|
||||
} else {
|
||||
return 'svg-icon'
|
||||
}
|
||||
},
|
||||
styleExternalIcon() {
|
||||
return {
|
||||
mask: `url(${this.iconClass}) no-repeat 50% 50%`,
|
||||
'-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.svg-external-icon {
|
||||
background-color: currentColor;
|
||||
mask-size: cover!important;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
||||
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
||||
<use :xlink:href="iconName" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage
|
||||
import { isExternal } from '@/utils/validate'
|
||||
|
||||
export default {
|
||||
name: 'SvgIcon',
|
||||
props: {
|
||||
iconClass: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isExternal() {
|
||||
return isExternal(this.iconClass)
|
||||
},
|
||||
iconName() {
|
||||
return `#icon-${this.iconClass}`
|
||||
},
|
||||
svgClass() {
|
||||
if (this.className) {
|
||||
return 'svg-icon ' + this.className
|
||||
} else {
|
||||
return 'svg-icon'
|
||||
}
|
||||
},
|
||||
styleExternalIcon() {
|
||||
return {
|
||||
mask: `url(${this.iconClass}) no-repeat 50% 50%`,
|
||||
'-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.svg-external-icon {
|
||||
background-color: currentColor;
|
||||
mask-size: cover!important;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,175 +1,175 @@
|
||||
<template>
|
||||
<el-color-picker
|
||||
v-model="theme"
|
||||
:predefine="['#409EFF', '#1890ff', '#304156','#212121','#11a983', '#13c2c2', '#6959CD', '#f5222d', ]"
|
||||
class="theme-picker"
|
||||
popper-class="theme-picker-dropdown"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const version = require('element-ui/package.json').version // element-ui version from node_modules
|
||||
const ORIGINAL_THEME = '#409EFF' // default color
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
chalk: '', // content of theme-chalk css
|
||||
theme: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
defaultTheme() {
|
||||
return this.$store.state.settings.theme
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
defaultTheme: {
|
||||
handler: function(val, oldVal) {
|
||||
this.theme = val
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
async theme(val) {
|
||||
const oldVal = this.chalk ? this.theme : ORIGINAL_THEME
|
||||
if (typeof val !== 'string') return
|
||||
const themeCluster = this.getThemeCluster(val.replace('#', ''))
|
||||
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
|
||||
console.log(themeCluster, originalCluster)
|
||||
|
||||
const $message = this.$message({
|
||||
message: ' Compiling the theme',
|
||||
customClass: 'theme-message',
|
||||
type: 'success',
|
||||
duration: 0,
|
||||
iconClass: 'el-icon-loading'
|
||||
})
|
||||
|
||||
const getHandler = (variable, id) => {
|
||||
return () => {
|
||||
const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', ''))
|
||||
const newStyle = this.updateStyle(this[variable], originalCluster, themeCluster)
|
||||
|
||||
let styleTag = document.getElementById(id)
|
||||
if (!styleTag) {
|
||||
styleTag = document.createElement('style')
|
||||
styleTag.setAttribute('id', id)
|
||||
document.head.appendChild(styleTag)
|
||||
}
|
||||
styleTag.innerText = newStyle
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.chalk) {
|
||||
const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css`
|
||||
await this.getCSSString(url, 'chalk')
|
||||
}
|
||||
|
||||
const chalkHandler = getHandler('chalk', 'chalk-style')
|
||||
|
||||
chalkHandler()
|
||||
|
||||
const styles = [].slice.call(document.querySelectorAll('style'))
|
||||
.filter(style => {
|
||||
const text = style.innerText
|
||||
return new RegExp(oldVal, 'i').test(text) && !/Chalk Variables/.test(text)
|
||||
})
|
||||
styles.forEach(style => {
|
||||
const { innerText } = style
|
||||
if (typeof innerText !== 'string') return
|
||||
style.innerText = this.updateStyle(innerText, originalCluster, themeCluster)
|
||||
})
|
||||
|
||||
this.$emit('change', val)
|
||||
|
||||
$message.close()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
updateStyle(style, oldCluster, newCluster) {
|
||||
let newStyle = style
|
||||
oldCluster.forEach((color, index) => {
|
||||
newStyle = newStyle.replace(new RegExp(color, 'ig'), newCluster[index])
|
||||
})
|
||||
return newStyle
|
||||
},
|
||||
|
||||
getCSSString(url, variable) {
|
||||
return new Promise(resolve => {
|
||||
const xhr = new XMLHttpRequest()
|
||||
xhr.onreadystatechange = () => {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
this[variable] = xhr.responseText.replace(/@font-face{[^}]+}/, '')
|
||||
resolve()
|
||||
}
|
||||
}
|
||||
xhr.open('GET', url)
|
||||
xhr.send()
|
||||
})
|
||||
},
|
||||
|
||||
getThemeCluster(theme) {
|
||||
const tintColor = (color, tint) => {
|
||||
let red = parseInt(color.slice(0, 2), 16)
|
||||
let green = parseInt(color.slice(2, 4), 16)
|
||||
let blue = parseInt(color.slice(4, 6), 16)
|
||||
|
||||
if (tint === 0) { // when primary color is in its rgb space
|
||||
return [red, green, blue].join(',')
|
||||
} else {
|
||||
red += Math.round(tint * (255 - red))
|
||||
green += Math.round(tint * (255 - green))
|
||||
blue += Math.round(tint * (255 - blue))
|
||||
|
||||
red = red.toString(16)
|
||||
green = green.toString(16)
|
||||
blue = blue.toString(16)
|
||||
|
||||
return `#${red}${green}${blue}`
|
||||
}
|
||||
}
|
||||
|
||||
const shadeColor = (color, shade) => {
|
||||
let red = parseInt(color.slice(0, 2), 16)
|
||||
let green = parseInt(color.slice(2, 4), 16)
|
||||
let blue = parseInt(color.slice(4, 6), 16)
|
||||
|
||||
red = Math.round((1 - shade) * red)
|
||||
green = Math.round((1 - shade) * green)
|
||||
blue = Math.round((1 - shade) * blue)
|
||||
|
||||
red = red.toString(16)
|
||||
green = green.toString(16)
|
||||
blue = blue.toString(16)
|
||||
|
||||
return `#${red}${green}${blue}`
|
||||
}
|
||||
|
||||
const clusters = [theme]
|
||||
for (let i = 0; i <= 9; i++) {
|
||||
clusters.push(tintColor(theme, Number((i / 10).toFixed(2))))
|
||||
}
|
||||
clusters.push(shadeColor(theme, 0.1))
|
||||
return clusters
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.theme-message,
|
||||
.theme-picker-dropdown {
|
||||
z-index: 99999 !important;
|
||||
}
|
||||
|
||||
.theme-picker .el-color-picker__trigger {
|
||||
height: 26px !important;
|
||||
width: 26px !important;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.theme-picker-dropdown .el-color-dropdown__link-btn {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<el-color-picker
|
||||
v-model="theme"
|
||||
:predefine="['#409EFF', '#1890ff', '#304156','#212121','#11a983', '#13c2c2', '#6959CD', '#f5222d', ]"
|
||||
class="theme-picker"
|
||||
popper-class="theme-picker-dropdown"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const version = require('element-ui/package.json').version // element-ui version from node_modules
|
||||
const ORIGINAL_THEME = '#409EFF' // default color
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
chalk: '', // content of theme-chalk css
|
||||
theme: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
defaultTheme() {
|
||||
return this.$store.state.settings.theme
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
defaultTheme: {
|
||||
handler: function(val, oldVal) {
|
||||
this.theme = val
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
async theme(val) {
|
||||
const oldVal = this.chalk ? this.theme : ORIGINAL_THEME
|
||||
if (typeof val !== 'string') return
|
||||
const themeCluster = this.getThemeCluster(val.replace('#', ''))
|
||||
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
|
||||
console.log(themeCluster, originalCluster)
|
||||
|
||||
const $message = this.$message({
|
||||
message: ' Compiling the theme',
|
||||
customClass: 'theme-message',
|
||||
type: 'success',
|
||||
duration: 0,
|
||||
iconClass: 'el-icon-loading'
|
||||
})
|
||||
|
||||
const getHandler = (variable, id) => {
|
||||
return () => {
|
||||
const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', ''))
|
||||
const newStyle = this.updateStyle(this[variable], originalCluster, themeCluster)
|
||||
|
||||
let styleTag = document.getElementById(id)
|
||||
if (!styleTag) {
|
||||
styleTag = document.createElement('style')
|
||||
styleTag.setAttribute('id', id)
|
||||
document.head.appendChild(styleTag)
|
||||
}
|
||||
styleTag.innerText = newStyle
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.chalk) {
|
||||
const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css`
|
||||
await this.getCSSString(url, 'chalk')
|
||||
}
|
||||
|
||||
const chalkHandler = getHandler('chalk', 'chalk-style')
|
||||
|
||||
chalkHandler()
|
||||
|
||||
const styles = [].slice.call(document.querySelectorAll('style'))
|
||||
.filter(style => {
|
||||
const text = style.innerText
|
||||
return new RegExp(oldVal, 'i').test(text) && !/Chalk Variables/.test(text)
|
||||
})
|
||||
styles.forEach(style => {
|
||||
const { innerText } = style
|
||||
if (typeof innerText !== 'string') return
|
||||
style.innerText = this.updateStyle(innerText, originalCluster, themeCluster)
|
||||
})
|
||||
|
||||
this.$emit('change', val)
|
||||
|
||||
$message.close()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
updateStyle(style, oldCluster, newCluster) {
|
||||
let newStyle = style
|
||||
oldCluster.forEach((color, index) => {
|
||||
newStyle = newStyle.replace(new RegExp(color, 'ig'), newCluster[index])
|
||||
})
|
||||
return newStyle
|
||||
},
|
||||
|
||||
getCSSString(url, variable) {
|
||||
return new Promise(resolve => {
|
||||
const xhr = new XMLHttpRequest()
|
||||
xhr.onreadystatechange = () => {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
this[variable] = xhr.responseText.replace(/@font-face{[^}]+}/, '')
|
||||
resolve()
|
||||
}
|
||||
}
|
||||
xhr.open('GET', url)
|
||||
xhr.send()
|
||||
})
|
||||
},
|
||||
|
||||
getThemeCluster(theme) {
|
||||
const tintColor = (color, tint) => {
|
||||
let red = parseInt(color.slice(0, 2), 16)
|
||||
let green = parseInt(color.slice(2, 4), 16)
|
||||
let blue = parseInt(color.slice(4, 6), 16)
|
||||
|
||||
if (tint === 0) { // when primary color is in its rgb space
|
||||
return [red, green, blue].join(',')
|
||||
} else {
|
||||
red += Math.round(tint * (255 - red))
|
||||
green += Math.round(tint * (255 - green))
|
||||
blue += Math.round(tint * (255 - blue))
|
||||
|
||||
red = red.toString(16)
|
||||
green = green.toString(16)
|
||||
blue = blue.toString(16)
|
||||
|
||||
return `#${red}${green}${blue}`
|
||||
}
|
||||
}
|
||||
|
||||
const shadeColor = (color, shade) => {
|
||||
let red = parseInt(color.slice(0, 2), 16)
|
||||
let green = parseInt(color.slice(2, 4), 16)
|
||||
let blue = parseInt(color.slice(4, 6), 16)
|
||||
|
||||
red = Math.round((1 - shade) * red)
|
||||
green = Math.round((1 - shade) * green)
|
||||
blue = Math.round((1 - shade) * blue)
|
||||
|
||||
red = red.toString(16)
|
||||
green = green.toString(16)
|
||||
blue = blue.toString(16)
|
||||
|
||||
return `#${red}${green}${blue}`
|
||||
}
|
||||
|
||||
const clusters = [theme]
|
||||
for (let i = 0; i <= 9; i++) {
|
||||
clusters.push(tintColor(theme, Number((i / 10).toFixed(2))))
|
||||
}
|
||||
clusters.push(shadeColor(theme, 0.1))
|
||||
return clusters
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.theme-message,
|
||||
.theme-picker-dropdown {
|
||||
z-index: 99999 !important;
|
||||
}
|
||||
|
||||
.theme-picker .el-color-picker__trigger {
|
||||
height: 26px !important;
|
||||
width: 26px !important;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.theme-picker-dropdown .el-color-dropdown__link-btn {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,224 +1,224 @@
|
||||
<template>
|
||||
<el-dialog top="5vh" :append-to-body="true" title="获取地图坐标" :visible.sync="dialogVisible" :before-close="handleClose" width="1000px">
|
||||
<div class="amap-page-container">
|
||||
<el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult" />
|
||||
<div class="toolbar">
|
||||
<span>当前坐标: {{ lng }}, {{ lat }}</span>
|
||||
<span>地址: {{ address }}</span>
|
||||
<el-button type="primary" @click="select" class="btn">确定</el-button>
|
||||
|
||||
</div>
|
||||
<el-amap
|
||||
class="amap-demo"
|
||||
vid="amapDemo2"
|
||||
:zoom="zoom"
|
||||
:center="mapCenter"
|
||||
:events="events"
|
||||
:plugin="plugin"
|
||||
>
|
||||
<el-amap-marker v-for="(marker,index) in markers"
|
||||
:key="index"
|
||||
:position="marker"
|
||||
:events="markerEvents"
|
||||
/>
|
||||
<!-- <el-amap-marker v-for="marker in markers" :position="marker" /> -->
|
||||
</el-amap>
|
||||
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { AMapManager } from 'vue-amap'
|
||||
export default {
|
||||
name: 'AmapPage',
|
||||
props: {
|
||||
dialogVisible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
address:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
makerPosition: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
const self = this
|
||||
return {
|
||||
zoom: 14,
|
||||
mapCenter: [114.508905, 38.004099],
|
||||
searchOption: {
|
||||
city: '石家庄',
|
||||
citylimit: false
|
||||
},
|
||||
lng: 0,
|
||||
lat: 0,
|
||||
loaded: false,
|
||||
plugin: [{
|
||||
pName: 'Geolocation',
|
||||
resizeEnable: true, //是否使用高精度定位,默认:true
|
||||
timeout: 100, //超过10秒后停止定位,默认:无穷大
|
||||
events: {
|
||||
init(o) {
|
||||
// o 是高德地图定位插件实例
|
||||
o.getCurrentPosition((status, result) => {
|
||||
if (result && result.position) {
|
||||
if (self.makerPosition.length == 0) {
|
||||
self.$emit('update:address', result.formattedAddress)
|
||||
// 设置经度
|
||||
self.lng = result.position.lng;
|
||||
// 设置维度
|
||||
self.lat = result.position.lat;
|
||||
// 设置坐标
|
||||
self.mapCenter = [self.lng, self.lat];
|
||||
}else{
|
||||
let maker = self.makerPosition.split(",")
|
||||
self.lng = maker[0]
|
||||
self.lat = maker[1]
|
||||
}
|
||||
// load
|
||||
self.loaded = true
|
||||
// 页面渲染好后
|
||||
self.$nextTick()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
events: {
|
||||
click(e) {
|
||||
const { lng, lat } = e.lnglat
|
||||
self.lng = lng
|
||||
self.lat = lat
|
||||
self.markers[0] = [lng, lat]
|
||||
|
||||
// 这里通过高德 SDK 完成。
|
||||
var geocoder = new AMap.Geocoder({
|
||||
radius: 1000,
|
||||
extensions: 'all'
|
||||
})
|
||||
geocoder.getAddress([lng, lat], function(status, result) {
|
||||
if (status === 'complete' && result.info === 'OK') {
|
||||
if (result && result.regeocode) {
|
||||
let addressComponent = result.regeocode.addressComponent
|
||||
let address = addressComponent.province + addressComponent.city + addressComponent.district + addressComponent.street + addressComponent.streetNumber
|
||||
self.$emit('update:address', address)
|
||||
self.$nextTick()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
markerEvents:{ // marker点点击事件
|
||||
click: e => {
|
||||
const { lng, lat } = e.lnglat
|
||||
self.lng = lng
|
||||
self.lat = lat
|
||||
// self.markers[0] = [lng, lat]
|
||||
|
||||
// 这里通过高德 SDK 完成。
|
||||
var geocoder = new AMap.Geocoder({
|
||||
radius: 1000,
|
||||
extensions: 'all'
|
||||
})
|
||||
geocoder.getAddress([lng, lat], function(status, result) {
|
||||
if (status === 'complete' && result.info === 'OK') {
|
||||
if (result && result.regeocode) {
|
||||
let addressComponent = result.regeocode.addressComponent
|
||||
let address = addressComponent.province + addressComponent.city + addressComponent.district + addressComponent.street + addressComponent.streetNumber
|
||||
self.$emit('update:address', address)
|
||||
self.$nextTick()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
markers: {
|
||||
get: function () {
|
||||
return [[this.lng, this.lat]]
|
||||
},
|
||||
set: function (newValue) {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSearchResult(pois) {
|
||||
let latSum = 0
|
||||
let lngSum = 0
|
||||
let _self = this
|
||||
this.markers = []
|
||||
if (pois.length > 0) {
|
||||
const { lng, lat } = pois[0]
|
||||
_self.lng = lng
|
||||
_self.lat = lat
|
||||
_self.mapCenter = [lng, lat];
|
||||
|
||||
// 这里通过高德 SDK 完成。
|
||||
var geocoder = new AMap.Geocoder({
|
||||
radius: 1000,
|
||||
extensions: 'all'
|
||||
})
|
||||
geocoder.getAddress([lng, lat], (status, result) => {
|
||||
if (status === 'complete' && result.info === 'OK') {
|
||||
if (result && result.regeocode) {
|
||||
let addressComponent = result.regeocode.addressComponent
|
||||
let address = addressComponent.province + addressComponent.city + addressComponent.district + addressComponent.street + addressComponent.streetNumber
|
||||
_self.$emit('update:address', address)
|
||||
_self.$nextTick()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$emit('update:dialogVisible', false)
|
||||
this.$nextTick(() => {
|
||||
done()
|
||||
})
|
||||
},
|
||||
select() {
|
||||
this.$emit('update:dialogVisible', false)
|
||||
this.$emit('update:makerPosition', this.markers[0].toString())
|
||||
this.$emit('update:address', this.address)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.amap-demo {
|
||||
height: 450px;
|
||||
}
|
||||
.search-box {
|
||||
z-index: 999;
|
||||
margin-bottom: 20px;
|
||||
position: absolute;
|
||||
top: 70px;
|
||||
left: 100px;
|
||||
}
|
||||
.amap-page-container {
|
||||
position: relative;
|
||||
}
|
||||
.toolbar{
|
||||
padding-bottom: 10px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
position: relative;
|
||||
.btn{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
span{
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<el-dialog top="5vh" :append-to-body="true" title="获取地图坐标" :visible.sync="dialogVisible" :before-close="handleClose" width="1000px">
|
||||
<div class="amap-page-container">
|
||||
<el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult" />
|
||||
<div class="toolbar">
|
||||
<span>当前坐标: {{ lng }}, {{ lat }}</span>
|
||||
<span>地址: {{ address }}</span>
|
||||
<el-button type="primary" @click="select" class="btn">确定</el-button>
|
||||
|
||||
</div>
|
||||
<el-amap
|
||||
class="amap-demo"
|
||||
vid="amapDemo2"
|
||||
:zoom="zoom"
|
||||
:center="mapCenter"
|
||||
:events="events"
|
||||
:plugin="plugin"
|
||||
>
|
||||
<el-amap-marker v-for="(marker,index) in markers"
|
||||
:key="index"
|
||||
:position="marker"
|
||||
:events="markerEvents"
|
||||
/>
|
||||
<!-- <el-amap-marker v-for="marker in markers" :position="marker" /> -->
|
||||
</el-amap>
|
||||
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { AMapManager } from 'vue-amap'
|
||||
export default {
|
||||
name: 'AmapPage',
|
||||
props: {
|
||||
dialogVisible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
address:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
makerPosition: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
const self = this
|
||||
return {
|
||||
zoom: 14,
|
||||
mapCenter: [114.508905, 38.004099],
|
||||
searchOption: {
|
||||
city: '石家庄',
|
||||
citylimit: false
|
||||
},
|
||||
lng: 0,
|
||||
lat: 0,
|
||||
loaded: false,
|
||||
plugin: [{
|
||||
pName: 'Geolocation',
|
||||
resizeEnable: true, //是否使用高精度定位,默认:true
|
||||
timeout: 100, //超过10秒后停止定位,默认:无穷大
|
||||
events: {
|
||||
init(o) {
|
||||
// o 是高德地图定位插件实例
|
||||
o.getCurrentPosition((status, result) => {
|
||||
if (result && result.position) {
|
||||
if (self.makerPosition.length == 0) {
|
||||
self.$emit('update:address', result.formattedAddress)
|
||||
// 设置经度
|
||||
self.lng = result.position.lng;
|
||||
// 设置维度
|
||||
self.lat = result.position.lat;
|
||||
// 设置坐标
|
||||
self.mapCenter = [self.lng, self.lat];
|
||||
}else{
|
||||
let maker = self.makerPosition.split(",")
|
||||
self.lng = maker[0]
|
||||
self.lat = maker[1]
|
||||
}
|
||||
// load
|
||||
self.loaded = true
|
||||
// 页面渲染好后
|
||||
self.$nextTick()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
events: {
|
||||
click(e) {
|
||||
const { lng, lat } = e.lnglat
|
||||
self.lng = lng
|
||||
self.lat = lat
|
||||
self.markers[0] = [lng, lat]
|
||||
|
||||
// 这里通过高德 SDK 完成。
|
||||
var geocoder = new AMap.Geocoder({
|
||||
radius: 1000,
|
||||
extensions: 'all'
|
||||
})
|
||||
geocoder.getAddress([lng, lat], function(status, result) {
|
||||
if (status === 'complete' && result.info === 'OK') {
|
||||
if (result && result.regeocode) {
|
||||
let addressComponent = result.regeocode.addressComponent
|
||||
let address = addressComponent.province + addressComponent.city + addressComponent.district + addressComponent.street + addressComponent.streetNumber
|
||||
self.$emit('update:address', address)
|
||||
self.$nextTick()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
markerEvents:{ // marker点点击事件
|
||||
click: e => {
|
||||
const { lng, lat } = e.lnglat
|
||||
self.lng = lng
|
||||
self.lat = lat
|
||||
// self.markers[0] = [lng, lat]
|
||||
|
||||
// 这里通过高德 SDK 完成。
|
||||
var geocoder = new AMap.Geocoder({
|
||||
radius: 1000,
|
||||
extensions: 'all'
|
||||
})
|
||||
geocoder.getAddress([lng, lat], function(status, result) {
|
||||
if (status === 'complete' && result.info === 'OK') {
|
||||
if (result && result.regeocode) {
|
||||
let addressComponent = result.regeocode.addressComponent
|
||||
let address = addressComponent.province + addressComponent.city + addressComponent.district + addressComponent.street + addressComponent.streetNumber
|
||||
self.$emit('update:address', address)
|
||||
self.$nextTick()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
markers: {
|
||||
get: function () {
|
||||
return [[this.lng, this.lat]]
|
||||
},
|
||||
set: function (newValue) {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSearchResult(pois) {
|
||||
let latSum = 0
|
||||
let lngSum = 0
|
||||
let _self = this
|
||||
this.markers = []
|
||||
if (pois.length > 0) {
|
||||
const { lng, lat } = pois[0]
|
||||
_self.lng = lng
|
||||
_self.lat = lat
|
||||
_self.mapCenter = [lng, lat];
|
||||
|
||||
// 这里通过高德 SDK 完成。
|
||||
var geocoder = new AMap.Geocoder({
|
||||
radius: 1000,
|
||||
extensions: 'all'
|
||||
})
|
||||
geocoder.getAddress([lng, lat], (status, result) => {
|
||||
if (status === 'complete' && result.info === 'OK') {
|
||||
if (result && result.regeocode) {
|
||||
let addressComponent = result.regeocode.addressComponent
|
||||
let address = addressComponent.province + addressComponent.city + addressComponent.district + addressComponent.street + addressComponent.streetNumber
|
||||
_self.$emit('update:address', address)
|
||||
_self.$nextTick()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$emit('update:dialogVisible', false)
|
||||
this.$nextTick(() => {
|
||||
done()
|
||||
})
|
||||
},
|
||||
select() {
|
||||
this.$emit('update:dialogVisible', false)
|
||||
this.$emit('update:makerPosition', this.markers[0].toString())
|
||||
this.$emit('update:address', this.address)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.amap-demo {
|
||||
height: 450px;
|
||||
}
|
||||
.search-box {
|
||||
z-index: 999;
|
||||
margin-bottom: 20px;
|
||||
position: absolute;
|
||||
top: 70px;
|
||||
left: 100px;
|
||||
}
|
||||
.amap-page-container {
|
||||
position: relative;
|
||||
}
|
||||
.toolbar{
|
||||
padding-bottom: 10px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
position: relative;
|
||||
.btn{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
span{
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
<template>
|
||||
<div>
|
||||
<bpmn-modeler
|
||||
ref="refNode"
|
||||
:xml="xmlData"
|
||||
:is-view="true"
|
||||
:taskList="taskData"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import bpmnModeler from '@/views/Process/index'
|
||||
export default {
|
||||
name: "Flow",
|
||||
components: {
|
||||
bpmnModeler
|
||||
},
|
||||
props: {
|
||||
xmlData: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
taskData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<bpmn-modeler
|
||||
ref="refNode"
|
||||
:xml="xmlData"
|
||||
:is-view="true"
|
||||
:taskList="taskData"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import bpmnModeler from '@/views/Process/index'
|
||||
export default {
|
||||
name: "Flow",
|
||||
components: {
|
||||
bpmnModeler
|
||||
},
|
||||
props: {
|
||||
xmlData: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
taskData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,130 +1,130 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--流程流转记录-->
|
||||
<el-card style="overflow: auto;height: 600px">
|
||||
<el-col :span="24">
|
||||
<div>
|
||||
<div style="width:50%;float:left;">
|
||||
<span class="el-icon-picture-outline">流程图</span>
|
||||
<flow :xmlData="xmlData" :taskData="taskData"></flow>
|
||||
</div>
|
||||
<div style="width:50%;;float:left;border-left: 1px solid blue">
|
||||
<el-timeline>
|
||||
<el-timeline-item v-for="(item,index ) in flowRecordList" :key="index" :icon="setIcon(item.time)" :color="setColor(item.time)">
|
||||
<div v-if="item.flowableRecordVo !== null">
|
||||
<p style="font-weight: 700">{{ item.flowableRecordVo.taskName }}</p>
|
||||
<el-card :body-style="{ padding: '10px' }">
|
||||
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: flex-start">
|
||||
<div>
|
||||
<label v-if="item.flowableRecordVo.taskUserInfos" style="font-weight: normal;margin-right: 30px;">实际办理:
|
||||
<span v-for="(items, index ) in item.flowableRecordVo.taskUserInfos" :key="index">{{ items.assigneeName }},</span>
|
||||
<!-- <el-tag type="info" size="mini">{{item.deptName}}</el-tag>-->
|
||||
</label>
|
||||
<label v-if="item.flowableRecordVo.candidate" style="font-weight: normal;margin-right: 30px;">候选办理:{{ item.flowableRecordVo.candidate }}</label><br>
|
||||
<label style="font-weight: normal">接收时间: </label><label style="color:#8a909c;font-weight: normal">{{ item.flowableRecordVo.createTime }}</label><br>
|
||||
<label v-if="item.flowableRecordVo.finishTime" style="font-weight: normal">办理时间: </label>
|
||||
<label style="color:#8a909c;font-weight: normal">{{ item.flowableRecordVo.finishTime }}</label><br>
|
||||
</div>
|
||||
<div>
|
||||
<label v-if="item.flowableRecordVo.duration" style="font-weight: normal">耗时:</label>
|
||||
<label style="color:red;font-weight: normal">{{ item.flowableRecordVo.duration }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p v-if="item.flowableRecordVo.comment">
|
||||
<el-tag type="success" v-if="item.flowableRecordVo.comment.type === '1'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
<el-tag type="warning" v-if="item.flowableRecordVo.comment.type === '2'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
<el-tag type="danger" v-if="item.flowableRecordVo.comment.type === '3'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
<el-tag type="danger" v-if="item.flowableRecordVo.comment.type === '7'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
<el-tag type="danger" v-if="item.flowableRecordVo.comment.type === '6'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
</p>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p style="font-weight: 700">{{ item.processCommentVo.title }}</p>
|
||||
<el-card :body-style="{ padding: '10px' }">
|
||||
<div>
|
||||
<div>
|
||||
<label style="font-weight: normal">评论时间: </label><label style="color:#8a909c;font-weight: normal">{{ item.processCommentVo.time }}</label><br>
|
||||
<label style="font-weight: normal">评论内容: </label><label style="color:#8a909c;font-weight: normal">{{ item.processCommentVo.content }}</label><br>
|
||||
<label style="font-weight: normal" v-show="item.processCommentVo.fileList.length > 0">评论图片: </label><label style="color:#0294d7;font-weight: normal" v-show="item.processCommentVo.fileList.length > 0" @click="handLook(item.processCommentVo.fileList)">查看</label>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-card>
|
||||
<el-dialog :visible="dialogViseble" append-to-body :before-close="handleClose">
|
||||
<el-image style="width: 178px;height: 178px" v-for="(item,index) in imgList" :key="index" :src="item" :preview-src-list="imgList"></el-image>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import flow from '@C/flow/flow'
|
||||
|
||||
export default {
|
||||
name: 'flowRecords',
|
||||
components: {
|
||||
flow
|
||||
},
|
||||
props: {
|
||||
xmlData: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
taskData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
flowRecordList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogViseble: false,
|
||||
imgList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
handLook(value) {
|
||||
console.log(value)
|
||||
this.dialogViseble = true
|
||||
this.imgList = value
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogViseble = false
|
||||
this.imgList = []
|
||||
},
|
||||
setIcon(val) {
|
||||
if (val) {
|
||||
return 'el-icon-check'
|
||||
} else {
|
||||
return 'el-icon-time'
|
||||
}
|
||||
},
|
||||
setColor(val) {
|
||||
if (val) {
|
||||
return '#2bc418'
|
||||
} else {
|
||||
return '#b3bdbb'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-tag {
|
||||
white-space: normal;
|
||||
height: auto;
|
||||
line-height: 20px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<!--流程流转记录-->
|
||||
<el-card style="overflow: auto;height: 600px">
|
||||
<el-col :span="24">
|
||||
<div>
|
||||
<div style="width:50%;float:left;">
|
||||
<span class="el-icon-picture-outline">流程图</span>
|
||||
<flow :xmlData="xmlData" :taskData="taskData"></flow>
|
||||
</div>
|
||||
<div style="width:50%;;float:left;border-left: 1px solid blue">
|
||||
<el-timeline>
|
||||
<el-timeline-item v-for="(item,index ) in flowRecordList" :key="index" :icon="setIcon(item.time)" :color="setColor(item.time)">
|
||||
<div v-if="item.flowableRecordVo !== null">
|
||||
<p style="font-weight: 700">{{ item.flowableRecordVo.taskName }}</p>
|
||||
<el-card :body-style="{ padding: '10px' }">
|
||||
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: flex-start">
|
||||
<div>
|
||||
<label v-if="item.flowableRecordVo.taskUserInfos" style="font-weight: normal;margin-right: 30px;">实际办理:
|
||||
<span v-for="(items, index ) in item.flowableRecordVo.taskUserInfos" :key="index">{{ items.assigneeName }},</span>
|
||||
<!-- <el-tag type="info" size="mini">{{item.deptName}}</el-tag>-->
|
||||
</label>
|
||||
<label v-if="item.flowableRecordVo.candidate" style="font-weight: normal;margin-right: 30px;">候选办理:{{ item.flowableRecordVo.candidate }}</label><br>
|
||||
<label style="font-weight: normal">接收时间: </label><label style="color:#8a909c;font-weight: normal">{{ item.flowableRecordVo.createTime }}</label><br>
|
||||
<label v-if="item.flowableRecordVo.finishTime" style="font-weight: normal">办理时间: </label>
|
||||
<label style="color:#8a909c;font-weight: normal">{{ item.flowableRecordVo.finishTime }}</label><br>
|
||||
</div>
|
||||
<div>
|
||||
<label v-if="item.flowableRecordVo.duration" style="font-weight: normal">耗时:</label>
|
||||
<label style="color:red;font-weight: normal">{{ item.flowableRecordVo.duration }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p v-if="item.flowableRecordVo.comment">
|
||||
<el-tag type="success" v-if="item.flowableRecordVo.comment.type === '1'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
<el-tag type="warning" v-if="item.flowableRecordVo.comment.type === '2'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
<el-tag type="danger" v-if="item.flowableRecordVo.comment.type === '3'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
<el-tag type="danger" v-if="item.flowableRecordVo.comment.type === '7'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
<el-tag type="danger" v-if="item.flowableRecordVo.comment.type === '6'"> {{ item.flowableRecordVo.comment.comment }}</el-tag>
|
||||
</p>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p style="font-weight: 700">{{ item.processCommentVo.title }}</p>
|
||||
<el-card :body-style="{ padding: '10px' }">
|
||||
<div>
|
||||
<div>
|
||||
<label style="font-weight: normal">评论时间: </label><label style="color:#8a909c;font-weight: normal">{{ item.processCommentVo.time }}</label><br>
|
||||
<label style="font-weight: normal">评论内容: </label><label style="color:#8a909c;font-weight: normal">{{ item.processCommentVo.content }}</label><br>
|
||||
<label style="font-weight: normal" v-show="item.processCommentVo.fileList.length > 0">评论图片: </label><label style="color:#0294d7;font-weight: normal" v-show="item.processCommentVo.fileList.length > 0" @click="handLook(item.processCommentVo.fileList)">查看</label>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-card>
|
||||
<el-dialog :visible="dialogViseble" append-to-body :before-close="handleClose">
|
||||
<el-image style="width: 178px;height: 178px" v-for="(item,index) in imgList" :key="index" :src="item" :preview-src-list="imgList"></el-image>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import flow from '@C/flow/flow'
|
||||
|
||||
export default {
|
||||
name: 'flowRecords',
|
||||
components: {
|
||||
flow
|
||||
},
|
||||
props: {
|
||||
xmlData: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
taskData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
flowRecordList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogViseble: false,
|
||||
imgList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
handLook(value) {
|
||||
console.log(value)
|
||||
this.dialogViseble = true
|
||||
this.imgList = value
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogViseble = false
|
||||
this.imgList = []
|
||||
},
|
||||
setIcon(val) {
|
||||
if (val) {
|
||||
return 'el-icon-check'
|
||||
} else {
|
||||
return 'el-icon-time'
|
||||
}
|
||||
},
|
||||
setColor(val) {
|
||||
if (val) {
|
||||
return '#2bc418'
|
||||
} else {
|
||||
return '#b3bdbb'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-tag {
|
||||
white-space: normal;
|
||||
height: auto;
|
||||
line-height: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,147 +1,147 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="big-box" id="BigBox"
|
||||
v-loading="loading"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||
<img class="codeimg" :src="imgCodeUrl" alt="">
|
||||
<div class="click-box" @click="clickBox"></div>
|
||||
</div>
|
||||
<div class="wordList">
|
||||
请在上图依次点击:
|
||||
<i>{{wordList[0]}}</i>
|
||||
<i>{{wordList[1]}}</i>
|
||||
<i>{{wordList[2]}}</i>
|
||||
<span class="restcode" @click="getCodeImage">换一换</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
rndNum: '', //随机数
|
||||
imgCodeUrl: '', //图片地址
|
||||
cssCode: '', //验证码样式
|
||||
isSubmit: true, //提交开关
|
||||
zuobiaoNum: 0, //点击数
|
||||
zuobiaoArr: [], //坐标数组
|
||||
tempElement: [] ,//记录追加标签,删除时使用
|
||||
wordList: [] ,// 要选择的文字
|
||||
uuid: '',
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.getCodeImage() //获取验证码
|
||||
},
|
||||
methods: {
|
||||
// 获取图片验证码
|
||||
getCodeImage() {
|
||||
this.zuobiaoNum = 0
|
||||
this.zuobiaoArr = []
|
||||
let BigBox = document.getElementById("BigBox");
|
||||
for (let i = 0; i < this.tempElement.length; i++) {
|
||||
BigBox.removeChild(this.tempElement[i]);
|
||||
}
|
||||
this.tempElement = []
|
||||
axios.get('api/portal/v1/captcha/clickWord',{ params:{_t: Date.parse(new Date()) / 1000} }).then(res =>{
|
||||
console.log(res);
|
||||
this.loading = false
|
||||
this.imgCodeUrl = "data:image/gif;base64," + res.data.data.dataVO.originalImageBase64
|
||||
this.wordList = res.data.data.dataVO.wordList
|
||||
this.uuid = res.data.data.uuid
|
||||
})
|
||||
this.rndNum = this.getRndNum()
|
||||
},
|
||||
//获取随机数,
|
||||
getRndNum() {
|
||||
return Math.random()
|
||||
.toString()
|
||||
.split('.')[1]
|
||||
},
|
||||
clickBox(event) {
|
||||
|
||||
this.zuobiaoArr[this.zuobiaoNum] = event.offsetX + ',' + event.offsetY
|
||||
this.zuobiaoArr[this.zuobiaoNum] = { 'x': parseInt(event.offsetX)-20, 'y': parseInt(event.offsetY)-20 }
|
||||
this.zuobiaoNum++
|
||||
|
||||
let BigBox = document.getElementById("BigBox");
|
||||
let addSpan = document.createElement("span");
|
||||
addSpan.innerText = this.zuobiaoNum
|
||||
addSpan.setAttribute('style', 'left: ' + event.offsetX + 'px; top:' + event.offsetY + 'px;')
|
||||
|
||||
BigBox.appendChild(addSpan)
|
||||
this.tempElement.push(addSpan)
|
||||
|
||||
if (this.zuobiaoNum == 3) {
|
||||
let data = {
|
||||
uuid: this.uuid,
|
||||
verifyCode: '['
|
||||
}
|
||||
for (var i = 0; i < this.zuobiaoArr.length; i++) {
|
||||
data.verifyCode += "{'x':" + this.zuobiaoArr[i].x + ",'y':" + this.zuobiaoArr[i].y + "}"
|
||||
}
|
||||
data.verifyCode = data.verifyCode + ']'
|
||||
console.log(this.zuobiaoArr,data)
|
||||
this.$emit("login", data)
|
||||
data = qs.stringify(data)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.big-box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.codeimg{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.click-box {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 92;
|
||||
}
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
border-radius: 50%;
|
||||
z-index: 1;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
}
|
||||
}
|
||||
.wordList{
|
||||
font-size: 18px;
|
||||
padding-top: 5px;
|
||||
i{
|
||||
padding: 0 8px;
|
||||
color: #018ad2;
|
||||
}
|
||||
.restcode{
|
||||
float: right;
|
||||
color: #018ad2;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<div class="big-box" id="BigBox"
|
||||
v-loading="loading"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||
<img class="codeimg" :src="imgCodeUrl" alt="">
|
||||
<div class="click-box" @click="clickBox"></div>
|
||||
</div>
|
||||
<div class="wordList">
|
||||
请在上图依次点击:
|
||||
<i>{{wordList[0]}}</i>
|
||||
<i>{{wordList[1]}}</i>
|
||||
<i>{{wordList[2]}}</i>
|
||||
<span class="restcode" @click="getCodeImage">换一换</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
rndNum: '', //随机数
|
||||
imgCodeUrl: '', //图片地址
|
||||
cssCode: '', //验证码样式
|
||||
isSubmit: true, //提交开关
|
||||
zuobiaoNum: 0, //点击数
|
||||
zuobiaoArr: [], //坐标数组
|
||||
tempElement: [] ,//记录追加标签,删除时使用
|
||||
wordList: [] ,// 要选择的文字
|
||||
uuid: '',
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.getCodeImage() //获取验证码
|
||||
},
|
||||
methods: {
|
||||
// 获取图片验证码
|
||||
getCodeImage() {
|
||||
this.zuobiaoNum = 0
|
||||
this.zuobiaoArr = []
|
||||
let BigBox = document.getElementById("BigBox");
|
||||
for (let i = 0; i < this.tempElement.length; i++) {
|
||||
BigBox.removeChild(this.tempElement[i]);
|
||||
}
|
||||
this.tempElement = []
|
||||
axios.get('api/portal/v1/captcha/clickWord',{ params:{_t: Date.parse(new Date()) / 1000} }).then(res =>{
|
||||
console.log(res);
|
||||
this.loading = false
|
||||
this.imgCodeUrl = "data:image/gif;base64," + res.data.data.dataVO.originalImageBase64
|
||||
this.wordList = res.data.data.dataVO.wordList
|
||||
this.uuid = res.data.data.uuid
|
||||
})
|
||||
this.rndNum = this.getRndNum()
|
||||
},
|
||||
//获取随机数,
|
||||
getRndNum() {
|
||||
return Math.random()
|
||||
.toString()
|
||||
.split('.')[1]
|
||||
},
|
||||
clickBox(event) {
|
||||
|
||||
this.zuobiaoArr[this.zuobiaoNum] = event.offsetX + ',' + event.offsetY
|
||||
this.zuobiaoArr[this.zuobiaoNum] = { 'x': parseInt(event.offsetX)-20, 'y': parseInt(event.offsetY)-20 }
|
||||
this.zuobiaoNum++
|
||||
|
||||
let BigBox = document.getElementById("BigBox");
|
||||
let addSpan = document.createElement("span");
|
||||
addSpan.innerText = this.zuobiaoNum
|
||||
addSpan.setAttribute('style', 'left: ' + event.offsetX + 'px; top:' + event.offsetY + 'px;')
|
||||
|
||||
BigBox.appendChild(addSpan)
|
||||
this.tempElement.push(addSpan)
|
||||
|
||||
if (this.zuobiaoNum == 3) {
|
||||
let data = {
|
||||
uuid: this.uuid,
|
||||
verifyCode: '['
|
||||
}
|
||||
for (var i = 0; i < this.zuobiaoArr.length; i++) {
|
||||
data.verifyCode += "{'x':" + this.zuobiaoArr[i].x + ",'y':" + this.zuobiaoArr[i].y + "}"
|
||||
}
|
||||
data.verifyCode = data.verifyCode + ']'
|
||||
console.log(this.zuobiaoArr,data)
|
||||
this.$emit("login", data)
|
||||
data = qs.stringify(data)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.big-box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.codeimg{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.click-box {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 92;
|
||||
}
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
border-radius: 50%;
|
||||
z-index: 1;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
}
|
||||
}
|
||||
.wordList{
|
||||
font-size: 18px;
|
||||
padding-top: 5px;
|
||||
i{
|
||||
padding: 0 8px;
|
||||
color: #018ad2;
|
||||
}
|
||||
.restcode{
|
||||
float: right;
|
||||
color: #018ad2;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,136 +1,136 @@
|
||||
<template>
|
||||
<div :class="{'hidden':hidden}" class="pagination-container e-pagination">
|
||||
<el-pagination
|
||||
:background="background"
|
||||
:current-page.sync="current"
|
||||
:page-size.sync="Size"
|
||||
:layout="layout"
|
||||
:page-sizes="pageSizes"
|
||||
:total="total"
|
||||
v-bind="$attrs"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* props 参数
|
||||
* @total 默认数据总数
|
||||
* @page 默认开始页面
|
||||
* @limit 每页的数据条数
|
||||
* @pageSizes 分组
|
||||
* */
|
||||
|
||||
export default {
|
||||
name: 'Pagination',
|
||||
props: {
|
||||
total: {
|
||||
required: true,
|
||||
type: Number
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 20
|
||||
},
|
||||
pageSizes: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [5, 10, 15, 20, 30, 50]
|
||||
}
|
||||
},
|
||||
layout: {
|
||||
type: String,
|
||||
default: 'prev, pager, next, sizes, total, jumper'
|
||||
},
|
||||
background: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
autoScroll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
hidden: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
/**
|
||||
* page-size 每页显示条目个数,支持 .sync 修饰符
|
||||
* current-page 当前页数,支持 .sync 修饰符
|
||||
* */
|
||||
computed: {
|
||||
current: {
|
||||
get() {
|
||||
return this.page
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:page', val)
|
||||
}
|
||||
},
|
||||
Size: {
|
||||
get() {
|
||||
return this.limit
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:limit', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* pagination 父定义请求函数 getList
|
||||
* */
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
this.$emit('pagination', { pageNum: this.curren, pageSize: val })
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.$emit('pagination', { pageNum: val, pageSize: this.Size })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pagination-container.pagesize{
|
||||
float: right;
|
||||
padding: 0;
|
||||
}
|
||||
.pagination-container {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0 16px;
|
||||
float: right;
|
||||
}
|
||||
.pagination-container.hidden {
|
||||
display: none;
|
||||
}
|
||||
.el-pagination {
|
||||
white-space: nowrap;
|
||||
color: #303133;
|
||||
font-weight: bold;
|
||||
height: 28px;
|
||||
}
|
||||
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev{
|
||||
padding: 0 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.e-pagination{
|
||||
.el-icon-arrow-left:before,
|
||||
.el-icon-arrow-right:before{
|
||||
content: '下一页';
|
||||
color: #727272;
|
||||
}
|
||||
.el-icon-arrow-left:before{
|
||||
content: '上一页';
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<div :class="{'hidden':hidden}" class="pagination-container e-pagination">
|
||||
<el-pagination
|
||||
:background="background"
|
||||
:current-page.sync="current"
|
||||
:page-size.sync="Size"
|
||||
:layout="layout"
|
||||
:page-sizes="pageSizes"
|
||||
:total="total"
|
||||
v-bind="$attrs"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* props 参数
|
||||
* @total 默认数据总数
|
||||
* @page 默认开始页面
|
||||
* @limit 每页的数据条数
|
||||
* @pageSizes 分组
|
||||
* */
|
||||
|
||||
export default {
|
||||
name: 'Pagination',
|
||||
props: {
|
||||
total: {
|
||||
required: true,
|
||||
type: Number
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 20
|
||||
},
|
||||
pageSizes: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [5, 10, 15, 20, 30, 50]
|
||||
}
|
||||
},
|
||||
layout: {
|
||||
type: String,
|
||||
default: 'prev, pager, next, sizes, total, jumper'
|
||||
},
|
||||
background: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
autoScroll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
hidden: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
/**
|
||||
* page-size 每页显示条目个数,支持 .sync 修饰符
|
||||
* current-page 当前页数,支持 .sync 修饰符
|
||||
* */
|
||||
computed: {
|
||||
current: {
|
||||
get() {
|
||||
return this.page
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:page', val)
|
||||
}
|
||||
},
|
||||
Size: {
|
||||
get() {
|
||||
return this.limit
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:limit', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* pagination 父定义请求函数 getList
|
||||
* */
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
this.$emit('pagination', { pageNum: this.curren, pageSize: val })
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.$emit('pagination', { pageNum: val, pageSize: this.Size })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pagination-container.pagesize{
|
||||
float: right;
|
||||
padding: 0;
|
||||
}
|
||||
.pagination-container {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0 16px;
|
||||
float: right;
|
||||
}
|
||||
.pagination-container.hidden {
|
||||
display: none;
|
||||
}
|
||||
.el-pagination {
|
||||
white-space: nowrap;
|
||||
color: #303133;
|
||||
font-weight: bold;
|
||||
height: 28px;
|
||||
}
|
||||
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev{
|
||||
padding: 0 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.e-pagination{
|
||||
.el-icon-arrow-left:before,
|
||||
.el-icon-arrow-right:before{
|
||||
content: '下一页';
|
||||
color: #727272;
|
||||
}
|
||||
.el-icon-arrow-left:before{
|
||||
content: '上一页';
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,124 +1,124 @@
|
||||
<template>
|
||||
<div :class="{'hidden':hidden}" class="pagination-container e-pagination">
|
||||
<el-pagination
|
||||
:background="background"
|
||||
:current-page.sync="current"
|
||||
:page-size.sync="Size"
|
||||
:layout="layout"
|
||||
:page-sizes="pageSizes"
|
||||
:total="total"
|
||||
v-bind="$attrs"
|
||||
@size-chage="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* props 参数
|
||||
* @total 默认数据总数
|
||||
* @page 默认开始页面
|
||||
* @limit 每页的数据条数
|
||||
* @pageSizes 分组
|
||||
* */
|
||||
|
||||
export default {
|
||||
name:"Pageination",
|
||||
props:{
|
||||
total:{
|
||||
required:true,
|
||||
type:Number
|
||||
},
|
||||
page:{
|
||||
type:Number,
|
||||
default:1
|
||||
},
|
||||
limit:{
|
||||
type:Number,
|
||||
default:20
|
||||
},
|
||||
pageSizes:{
|
||||
type:Array,
|
||||
default(){
|
||||
return[5,10,15,20,30,50]
|
||||
}
|
||||
},
|
||||
layout: {
|
||||
type: String,
|
||||
// default: 'prev, pager, next, sizes, total, jumper'
|
||||
default: 'sizes'
|
||||
},
|
||||
background: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
autoScroll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
hidden: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
current:{
|
||||
get(){
|
||||
return this.page
|
||||
},
|
||||
set(val){
|
||||
this.$emit('update:page',val)
|
||||
}
|
||||
},
|
||||
Size:{
|
||||
get(){
|
||||
return this.limit
|
||||
},
|
||||
set(){
|
||||
this.$emit('update:limit',val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
handleSizeChange(val){
|
||||
this.$emit('pagination',{pageNum:this.current,pageSize:val})
|
||||
},
|
||||
handleCurrentChange(val){
|
||||
this.$emit('pagination',{pageNum: val, pageSize: this.Size})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pagination-container.pagesize{
|
||||
float: right;
|
||||
padding: 0;
|
||||
}
|
||||
.pagination-container {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0 16px;
|
||||
float: right;
|
||||
}
|
||||
.pagination-container.hidden {
|
||||
display: none;
|
||||
}
|
||||
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev{
|
||||
padding: 0 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.e-pagination{
|
||||
.el-icon-arrow-left:before,
|
||||
.el-icon-arrow-right:before{
|
||||
content: '下一页';
|
||||
color: #727272;
|
||||
}
|
||||
.el-icon-arrow-left:before{
|
||||
content: '上一页';
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<div :class="{'hidden':hidden}" class="pagination-container e-pagination">
|
||||
<el-pagination
|
||||
:background="background"
|
||||
:current-page.sync="current"
|
||||
:page-size.sync="Size"
|
||||
:layout="layout"
|
||||
:page-sizes="pageSizes"
|
||||
:total="total"
|
||||
v-bind="$attrs"
|
||||
@size-chage="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* props 参数
|
||||
* @total 默认数据总数
|
||||
* @page 默认开始页面
|
||||
* @limit 每页的数据条数
|
||||
* @pageSizes 分组
|
||||
* */
|
||||
|
||||
export default {
|
||||
name:"Pageination",
|
||||
props:{
|
||||
total:{
|
||||
required:true,
|
||||
type:Number
|
||||
},
|
||||
page:{
|
||||
type:Number,
|
||||
default:1
|
||||
},
|
||||
limit:{
|
||||
type:Number,
|
||||
default:20
|
||||
},
|
||||
pageSizes:{
|
||||
type:Array,
|
||||
default(){
|
||||
return[5,10,15,20,30,50]
|
||||
}
|
||||
},
|
||||
layout: {
|
||||
type: String,
|
||||
// default: 'prev, pager, next, sizes, total, jumper'
|
||||
default: 'sizes'
|
||||
},
|
||||
background: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
autoScroll: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
hidden: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
current:{
|
||||
get(){
|
||||
return this.page
|
||||
},
|
||||
set(val){
|
||||
this.$emit('update:page',val)
|
||||
}
|
||||
},
|
||||
Size:{
|
||||
get(){
|
||||
return this.limit
|
||||
},
|
||||
set(){
|
||||
this.$emit('update:limit',val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
handleSizeChange(val){
|
||||
this.$emit('pagination',{pageNum:this.current,pageSize:val})
|
||||
},
|
||||
handleCurrentChange(val){
|
||||
this.$emit('pagination',{pageNum: val, pageSize: this.Size})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pagination-container.pagesize{
|
||||
float: right;
|
||||
padding: 0;
|
||||
}
|
||||
.pagination-container {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0 16px;
|
||||
float: right;
|
||||
}
|
||||
.pagination-container.hidden {
|
||||
display: none;
|
||||
}
|
||||
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev{
|
||||
padding: 0 20px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.e-pagination{
|
||||
.el-icon-arrow-left:before,
|
||||
.el-icon-arrow-right:before{
|
||||
content: '下一页';
|
||||
color: #727272;
|
||||
}
|
||||
.el-icon-arrow-left:before{
|
||||
content: '上一页';
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-input :type="type" v-model="localValue" @input="onInput" :placeholder="placeholder" autocomplete="off"
|
||||
:maxlength="maxlength" show-password>
|
||||
</el-input>
|
||||
<div class="pasTips" v-if="pastips">
|
||||
<span :class="{'opcity':isopcity == 1}">弱</span> <span :class="{'opcity':isopcity == 2}">中</span> <span :class="{'opcity':isopcity == 3}">强</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "passwordInput",
|
||||
props: {
|
||||
//传进来的value值,只显示不修改
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
maxlength:{
|
||||
type: Number,
|
||||
default: 18
|
||||
},
|
||||
pastips:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
// 获取props中value的值,并与el-input绑定,过程中不修改props中value的值,保证了单向数据流原则
|
||||
localValue: this.value,
|
||||
isopcity: 0,
|
||||
type: 'password'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onInput(e) {
|
||||
this.$emit('input', e)
|
||||
let $test = /^(?![A-Z]+$)(?![a-z]+$)(?!\d+$)(?![\W_]+$)\S{6,30}$/;
|
||||
let $test1 = /^(?:\d+|[a-zA-Z]+|[!@#$%^&*]+){6,12}$/; // 弱:纯数字,纯字母,纯特殊字符
|
||||
let $test2 = /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*]+$)[a-zA-Z\d!@#$%^&*]+$/; //中:字母+数字,字母+特殊字符,数字+特殊字符
|
||||
let $test3 = /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&*]+$)(?![\d!@#$%^&*]+$)[a-zA-Z\d!@#$%^&*]+$/; //强:字母+数字+特殊字符
|
||||
if(e.length < 1){ this.isopcity = 0; return;}
|
||||
if($test1.test(e)){
|
||||
this.isopcity = 1
|
||||
if($test.test(e)){
|
||||
if($test2.test(e)){
|
||||
this.isopcity = 2
|
||||
if($test3.test(e)){
|
||||
this.isopcity = 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{//没满足 弱 条件就依旧显示红色
|
||||
this.isopcity = 1
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<el-input :type="type" v-model="localValue" @input="onInput" :placeholder="placeholder" autocomplete="off"
|
||||
:maxlength="maxlength" show-password>
|
||||
</el-input>
|
||||
<div class="pasTips" v-if="pastips">
|
||||
<span :class="{'opcity':isopcity == 1}">弱</span> <span :class="{'opcity':isopcity == 2}">中</span> <span :class="{'opcity':isopcity == 3}">强</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "passwordInput",
|
||||
props: {
|
||||
//传进来的value值,只显示不修改
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
maxlength:{
|
||||
type: Number,
|
||||
default: 18
|
||||
},
|
||||
pastips:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
// 获取props中value的值,并与el-input绑定,过程中不修改props中value的值,保证了单向数据流原则
|
||||
localValue: this.value,
|
||||
isopcity: 0,
|
||||
type: 'password'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onInput(e) {
|
||||
this.$emit('input', e)
|
||||
let $test = /^(?![A-Z]+$)(?![a-z]+$)(?!\d+$)(?![\W_]+$)\S{6,30}$/;
|
||||
let $test1 = /^(?:\d+|[a-zA-Z]+|[!@#$%^&*]+){6,12}$/; // 弱:纯数字,纯字母,纯特殊字符
|
||||
let $test2 = /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*]+$)[a-zA-Z\d!@#$%^&*]+$/; //中:字母+数字,字母+特殊字符,数字+特殊字符
|
||||
let $test3 = /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&*]+$)(?![\d!@#$%^&*]+$)[a-zA-Z\d!@#$%^&*]+$/; //强:字母+数字+特殊字符
|
||||
if(e.length < 1){ this.isopcity = 0; return;}
|
||||
if($test1.test(e)){
|
||||
this.isopcity = 1
|
||||
if($test.test(e)){
|
||||
if($test2.test(e)){
|
||||
this.isopcity = 2
|
||||
if($test3.test(e)){
|
||||
this.isopcity = 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{//没满足 弱 条件就依旧显示红色
|
||||
this.isopcity = 1
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
@@ -1,80 +1,80 @@
|
||||
<template>
|
||||
<div class="tab-header">
|
||||
<div class="tab-btn clearfix">
|
||||
<div class="search-from">
|
||||
<slot name="from"></slot>
|
||||
</div>
|
||||
<div class="search-bth">
|
||||
<slot name="btn"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
search:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form:{},
|
||||
showsearch: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "~@/styles/variables.scss";
|
||||
.tab-header {
|
||||
background-color: $search-bg;
|
||||
padding: 8px 20px;
|
||||
margin-bottom: 15px;
|
||||
.tab-search{
|
||||
padding: 8px 0px;
|
||||
}
|
||||
.tab-btn{
|
||||
.search-from{
|
||||
float: left;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.search-bth{
|
||||
float: right;
|
||||
|
||||
}
|
||||
}
|
||||
.el-form-item{
|
||||
margin-bottom: 0px;
|
||||
.el-input__icon,
|
||||
.el-form-item__content{
|
||||
line-height: 32px;
|
||||
}
|
||||
.el-input__inner,
|
||||
.el-form-item__label{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
color: $text-color;
|
||||
}
|
||||
.el-select .el-input.is-focus .el-input__inner{
|
||||
border-color: $border-color;
|
||||
}
|
||||
}
|
||||
.el-button{
|
||||
padding: 8px 20px;
|
||||
background-color: $color-primary;
|
||||
color: $text-color-inverse;
|
||||
}
|
||||
.el-select{
|
||||
width: 150px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="tab-header">
|
||||
<div class="tab-btn clearfix">
|
||||
<div class="search-from">
|
||||
<slot name="from"></slot>
|
||||
</div>
|
||||
<div class="search-bth">
|
||||
<slot name="btn"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
search:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form:{},
|
||||
showsearch: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "~@/styles/variables.scss";
|
||||
.tab-header {
|
||||
background-color: $search-bg;
|
||||
padding: 8px 20px;
|
||||
margin-bottom: 15px;
|
||||
.tab-search{
|
||||
padding: 8px 0px;
|
||||
}
|
||||
.tab-btn{
|
||||
.search-from{
|
||||
float: left;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.search-bth{
|
||||
float: right;
|
||||
|
||||
}
|
||||
}
|
||||
.el-form-item{
|
||||
margin-bottom: 0px;
|
||||
.el-input__icon,
|
||||
.el-form-item__content{
|
||||
line-height: 32px;
|
||||
}
|
||||
.el-input__inner,
|
||||
.el-form-item__label{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
color: $text-color;
|
||||
}
|
||||
.el-select .el-input.is-focus .el-input__inner{
|
||||
border-color: $border-color;
|
||||
}
|
||||
}
|
||||
.el-button{
|
||||
padding: 8px 20px;
|
||||
background-color: $color-primary;
|
||||
color: $text-color-inverse;
|
||||
}
|
||||
.el-select{
|
||||
width: 150px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
<template>
|
||||
<el-upload class="avatar-uploader" ref="upload" action="fakeaction"
|
||||
:show-file-list="false"
|
||||
:on-change="uploadchangeFile"
|
||||
:http-request="uploadSectionFile">
|
||||
<!-- <el-button size="small" type="primary">点击上传</el-button> -->
|
||||
<img v-if="Photo" :src="Photo" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
<div slot="tip" class="el-upload__tip">{{tip}}</div>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { imageUpload } from '@/api/Common/Upload.js'
|
||||
export default {
|
||||
props:{
|
||||
tip:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
FrontPhoto:{
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Photo: this.FrontPhoto,
|
||||
loading: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openFullScreen2() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
},
|
||||
// 上传文件 FrontPhoto
|
||||
uploadSectionFile(params) {
|
||||
const file = params.file,
|
||||
fileType = file.type,
|
||||
isImage = fileType.indexOf("image") != -1,
|
||||
isLt2M = file.size / 1024 / 1024 < 10;
|
||||
this.openFullScreen2()
|
||||
console.log(params)
|
||||
// 这里常规检验,看项目需求而定
|
||||
if (!isImage) {
|
||||
this.$message.error("只能上传图片格式png、jpg、gif!");
|
||||
this.loading.close();
|
||||
return;
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error("只能上传图片大小小于10M");
|
||||
this.loading.close();
|
||||
return;
|
||||
}
|
||||
// 根据后台需求数据格式
|
||||
const form = new FormData();
|
||||
console.log(form)
|
||||
// 文件对象
|
||||
form.append("file", file);
|
||||
|
||||
// 项目封装的请求方法,下面做简单介绍
|
||||
imageUpload(form).then(res => {
|
||||
//自行处理各种情况
|
||||
console.log(res)
|
||||
this.$emit('imgUrl', res.data)
|
||||
this.Photo = res.data.fullUrl
|
||||
if(res.code == 200){
|
||||
this.loading.close();
|
||||
this.$message({
|
||||
message: '上传成功!',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
});
|
||||
},
|
||||
uploadchangeFile(file){
|
||||
// this.Photo = URL.createObjectURL(file.raw)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 200px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<el-upload class="avatar-uploader" ref="upload" action="fakeaction"
|
||||
:show-file-list="false"
|
||||
:on-change="uploadchangeFile"
|
||||
:http-request="uploadSectionFile">
|
||||
<!-- <el-button size="small" type="primary">点击上传</el-button> -->
|
||||
<img v-if="Photo" :src="Photo" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
<div slot="tip" class="el-upload__tip">{{tip}}</div>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { imageUpload } from '@/api/Common/Upload.js'
|
||||
export default {
|
||||
props:{
|
||||
tip:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
FrontPhoto:{
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Photo: this.FrontPhoto,
|
||||
loading: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openFullScreen2() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
},
|
||||
// 上传文件 FrontPhoto
|
||||
uploadSectionFile(params) {
|
||||
const file = params.file,
|
||||
fileType = file.type,
|
||||
isImage = fileType.indexOf("image") != -1,
|
||||
isLt2M = file.size / 1024 / 1024 < 10;
|
||||
this.openFullScreen2()
|
||||
console.log(params)
|
||||
// 这里常规检验,看项目需求而定
|
||||
if (!isImage) {
|
||||
this.$message.error("只能上传图片格式png、jpg、gif!");
|
||||
this.loading.close();
|
||||
return;
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error("只能上传图片大小小于10M");
|
||||
this.loading.close();
|
||||
return;
|
||||
}
|
||||
// 根据后台需求数据格式
|
||||
const form = new FormData();
|
||||
console.log(form)
|
||||
// 文件对象
|
||||
form.append("file", file);
|
||||
|
||||
// 项目封装的请求方法,下面做简单介绍
|
||||
imageUpload(form).then(res => {
|
||||
//自行处理各种情况
|
||||
console.log(res)
|
||||
this.$emit('imgUrl', res.data)
|
||||
this.Photo = res.data.fullUrl
|
||||
if(res.code == 200){
|
||||
this.loading.close();
|
||||
this.$message({
|
||||
message: '上传成功!',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
});
|
||||
},
|
||||
uploadchangeFile(file){
|
||||
// this.Photo = URL.createObjectURL(file.raw)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 200px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,217 +1,217 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-upload ref="imgUpload" v-loading="loadding" class="avatar-uploader" :headers="accessToken" :action="uploadFile" :accept="accept" list-type="picture-card" :file-list="files" :on-remove="removeImage" :on-preview="handlePictureCardPreview" :on-progress="uploadProgrees" :on-error="uploadError" :on-success="uploadImgSuccess_FuJian">
|
||||
<i class="el-icon-plus avatar-uploader-icon"/>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible" title="查看图片">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uploadImgFile } from '@/api/Common/Upload'
|
||||
import { getStorage } from '@/utils/auth.js'
|
||||
|
||||
export default {
|
||||
model: {
|
||||
prop: 'name',
|
||||
event: 'change'
|
||||
},
|
||||
props: {
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
bucket: {
|
||||
type: String,
|
||||
default: 'abc'
|
||||
},
|
||||
// 长度
|
||||
width: {
|
||||
type: String,
|
||||
default: '270px'
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default: '.jpg,.jpeg,.png,.JPG,.JPEG,'
|
||||
},
|
||||
// 文件名称
|
||||
name: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
uploadData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
accessToken: null,
|
||||
uploadFile: uploadImgFile,
|
||||
fileList_FuJian: [],
|
||||
enclosure: '',
|
||||
file_add: '',
|
||||
file_catch: '',
|
||||
files: [],
|
||||
files_list: [],
|
||||
filedUrl: '',
|
||||
// fileUrl: fileUrl,
|
||||
// showpicture:false,
|
||||
isview: false,
|
||||
nameArr: '',
|
||||
loadding: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
name: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
console.log('aaaa1', newVal)
|
||||
this.files = newVal
|
||||
console.log('aaaa2', this.files)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.Init()
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.uploadFile = uploadImgFile // 接口
|
||||
this.accessToken = {
|
||||
token: getStorage()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showImg(imgList) {
|
||||
this.files = imgList
|
||||
console.log('123123123', this.files)
|
||||
},
|
||||
view() {
|
||||
// window.open(this.filedUrl)
|
||||
},
|
||||
// 页面第一次加载
|
||||
Init() {
|
||||
if (this.name !== undefined) {
|
||||
this.files = []
|
||||
for (var i = 0; i < this.name.length; i++) {
|
||||
this.files.push({
|
||||
name: this.name[i],
|
||||
url: this.name[i]
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogVisible = true
|
||||
this.dialogImageUrl = file.url
|
||||
},
|
||||
// 上传方案--成功后执行
|
||||
uploadImgSuccess_FuJian(response, file, fileList) {
|
||||
console.log('您选择的file:', file)
|
||||
if (file.response.code === '200') {
|
||||
this.loadding = false
|
||||
// 返显图片
|
||||
this.filedUrl = this.fileUrl + file.response.data
|
||||
// var uid = file.response.data
|
||||
this.files.push({
|
||||
name: file.response.data.sourceFileName,
|
||||
url: file.response.data.fullUrl,
|
||||
size: file.response.data.size
|
||||
})
|
||||
this.$emit('change', this.files)
|
||||
this.$emit('eett', this.files)
|
||||
}
|
||||
},
|
||||
|
||||
removeImage(file, ImageFileList) {
|
||||
this.files.splice(this.files.indexOf(file), 1)
|
||||
const imgFiles = []
|
||||
this.files.forEach((o) => {
|
||||
imgFiles.push(o.url)
|
||||
})
|
||||
this.$emit('fileChange', this.files)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log('file:' + JSON.stringify(file))
|
||||
console.log('fileList:' + JSON.stringify(fileList))
|
||||
this.enclosure = ''
|
||||
// 1. 保存新增文件id(this.file_add)
|
||||
this.getNewFileId(fileList)
|
||||
// 2. 保存数据库读取的已有文件id(this.file_catch)
|
||||
this.getCatchFileId(file)
|
||||
// 3. 保存并拼接id
|
||||
this.getFileId()
|
||||
// 4. 返回拼接id
|
||||
this.$emit('change', this.enclosure)
|
||||
},
|
||||
// 返回this.file_add(新上传文件的id拼接集合)
|
||||
getNewFileId(fileList) {
|
||||
// debugger
|
||||
this.file_add = ''
|
||||
for (var i = 0; i < fileList.length; i++) {
|
||||
if (fileList[i].response && fileList[i].response.code === '200') {
|
||||
this.file_add = this.file_add + fileList[i].response.data + ','
|
||||
}
|
||||
}
|
||||
if (this.file_add !== '') {
|
||||
this.file_add = this.file_add.substring(0, this.file_add.length - 1)
|
||||
}
|
||||
// console.log('1. this.file_add: ' + this.file_add)
|
||||
},
|
||||
// 返回this.file_catch(数库一寸照的文件的id的拼接集合)
|
||||
getCatchFileId(file) {
|
||||
for (var i = 0; i < this.files_list.length; i++) {
|
||||
if (this.file_catch !== '') {
|
||||
// 1. 检查当前删除的文件是否是修改文件列表里面的,如果是,将修改列表里去除此id
|
||||
if (this.files_list[i].name === file.name) {
|
||||
// 2. 拆开file_catch到fils_arry
|
||||
var fils_arry = this.file_catch.split(',')
|
||||
// 3. 从fils_arry去除 this.files_list[i].id
|
||||
var arry = []
|
||||
fils_arry.forEach((element) => {
|
||||
// 不加载文件里面的
|
||||
if (element !== this.files_list[i].id) {
|
||||
arry.push(element)
|
||||
}
|
||||
})
|
||||
// 4. 重新拼接成file_catch
|
||||
this.file_catch = arry.join(',')
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log('2. this.file_catch:' + this.file_catch)
|
||||
},
|
||||
// 保存并拼接id
|
||||
getFileId() {
|
||||
// console.log('3. this.file_catch:' + this.file_catch + ',this.file_add:' + this.file_add)
|
||||
if (this.file_catch !== '') {
|
||||
if (this.file_add !== '') {
|
||||
this.enclosure = this.file_catch + ',' + this.file_add
|
||||
} else {
|
||||
this.enclosure = this.file_catch
|
||||
}
|
||||
} else {
|
||||
this.enclosure = this.file_add
|
||||
}
|
||||
},
|
||||
// 上传失败
|
||||
uploadError() {
|
||||
this.loadding = false
|
||||
},
|
||||
uploadProgrees(event, file, fileList) {
|
||||
if (Number(event.percent) > 0) {
|
||||
this.loadding = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<template>
|
||||
<div>
|
||||
<el-upload ref="imgUpload" v-loading="loadding" class="avatar-uploader" :headers="accessToken" :action="uploadFile" :accept="accept" list-type="picture-card" :file-list="files" :on-remove="removeImage" :on-preview="handlePictureCardPreview" :on-progress="uploadProgrees" :on-error="uploadError" :on-success="uploadImgSuccess_FuJian">
|
||||
<i class="el-icon-plus avatar-uploader-icon"/>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible" title="查看图片">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uploadImgFile } from '@/api/Common/Upload'
|
||||
import { getStorage } from '@/utils/auth.js'
|
||||
|
||||
export default {
|
||||
model: {
|
||||
prop: 'name',
|
||||
event: 'change'
|
||||
},
|
||||
props: {
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
bucket: {
|
||||
type: String,
|
||||
default: 'abc'
|
||||
},
|
||||
// 长度
|
||||
width: {
|
||||
type: String,
|
||||
default: '270px'
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default: '.jpg,.jpeg,.png,.JPG,.JPEG,'
|
||||
},
|
||||
// 文件名称
|
||||
name: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
uploadData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
accessToken: null,
|
||||
uploadFile: uploadImgFile,
|
||||
fileList_FuJian: [],
|
||||
enclosure: '',
|
||||
file_add: '',
|
||||
file_catch: '',
|
||||
files: [],
|
||||
files_list: [],
|
||||
filedUrl: '',
|
||||
// fileUrl: fileUrl,
|
||||
// showpicture:false,
|
||||
isview: false,
|
||||
nameArr: '',
|
||||
loadding: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
name: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
console.log('aaaa1', newVal)
|
||||
this.files = newVal
|
||||
console.log('aaaa2', this.files)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.Init()
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.uploadFile = uploadImgFile // 接口
|
||||
this.accessToken = {
|
||||
token: getStorage()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showImg(imgList) {
|
||||
this.files = imgList
|
||||
console.log('123123123', this.files)
|
||||
},
|
||||
view() {
|
||||
// window.open(this.filedUrl)
|
||||
},
|
||||
// 页面第一次加载
|
||||
Init() {
|
||||
if (this.name !== undefined) {
|
||||
this.files = []
|
||||
for (var i = 0; i < this.name.length; i++) {
|
||||
this.files.push({
|
||||
name: this.name[i],
|
||||
url: this.name[i]
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogVisible = true
|
||||
this.dialogImageUrl = file.url
|
||||
},
|
||||
// 上传方案--成功后执行
|
||||
uploadImgSuccess_FuJian(response, file, fileList) {
|
||||
console.log('您选择的file:', file)
|
||||
if (file.response.code === '200') {
|
||||
this.loadding = false
|
||||
// 返显图片
|
||||
this.filedUrl = this.fileUrl + file.response.data
|
||||
// var uid = file.response.data
|
||||
this.files.push({
|
||||
name: file.response.data.sourceFileName,
|
||||
url: file.response.data.fullUrl,
|
||||
size: file.response.data.size
|
||||
})
|
||||
this.$emit('change', this.files)
|
||||
this.$emit('eett', this.files)
|
||||
}
|
||||
},
|
||||
|
||||
removeImage(file, ImageFileList) {
|
||||
this.files.splice(this.files.indexOf(file), 1)
|
||||
const imgFiles = []
|
||||
this.files.forEach((o) => {
|
||||
imgFiles.push(o.url)
|
||||
})
|
||||
this.$emit('fileChange', this.files)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log('file:' + JSON.stringify(file))
|
||||
console.log('fileList:' + JSON.stringify(fileList))
|
||||
this.enclosure = ''
|
||||
// 1. 保存新增文件id(this.file_add)
|
||||
this.getNewFileId(fileList)
|
||||
// 2. 保存数据库读取的已有文件id(this.file_catch)
|
||||
this.getCatchFileId(file)
|
||||
// 3. 保存并拼接id
|
||||
this.getFileId()
|
||||
// 4. 返回拼接id
|
||||
this.$emit('change', this.enclosure)
|
||||
},
|
||||
// 返回this.file_add(新上传文件的id拼接集合)
|
||||
getNewFileId(fileList) {
|
||||
// debugger
|
||||
this.file_add = ''
|
||||
for (var i = 0; i < fileList.length; i++) {
|
||||
if (fileList[i].response && fileList[i].response.code === '200') {
|
||||
this.file_add = this.file_add + fileList[i].response.data + ','
|
||||
}
|
||||
}
|
||||
if (this.file_add !== '') {
|
||||
this.file_add = this.file_add.substring(0, this.file_add.length - 1)
|
||||
}
|
||||
// console.log('1. this.file_add: ' + this.file_add)
|
||||
},
|
||||
// 返回this.file_catch(数库一寸照的文件的id的拼接集合)
|
||||
getCatchFileId(file) {
|
||||
for (var i = 0; i < this.files_list.length; i++) {
|
||||
if (this.file_catch !== '') {
|
||||
// 1. 检查当前删除的文件是否是修改文件列表里面的,如果是,将修改列表里去除此id
|
||||
if (this.files_list[i].name === file.name) {
|
||||
// 2. 拆开file_catch到fils_arry
|
||||
var fils_arry = this.file_catch.split(',')
|
||||
// 3. 从fils_arry去除 this.files_list[i].id
|
||||
var arry = []
|
||||
fils_arry.forEach((element) => {
|
||||
// 不加载文件里面的
|
||||
if (element !== this.files_list[i].id) {
|
||||
arry.push(element)
|
||||
}
|
||||
})
|
||||
// 4. 重新拼接成file_catch
|
||||
this.file_catch = arry.join(',')
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log('2. this.file_catch:' + this.file_catch)
|
||||
},
|
||||
// 保存并拼接id
|
||||
getFileId() {
|
||||
// console.log('3. this.file_catch:' + this.file_catch + ',this.file_add:' + this.file_add)
|
||||
if (this.file_catch !== '') {
|
||||
if (this.file_add !== '') {
|
||||
this.enclosure = this.file_catch + ',' + this.file_add
|
||||
} else {
|
||||
this.enclosure = this.file_catch
|
||||
}
|
||||
} else {
|
||||
this.enclosure = this.file_add
|
||||
}
|
||||
},
|
||||
// 上传失败
|
||||
uploadError() {
|
||||
this.loadding = false
|
||||
},
|
||||
uploadProgrees(event, file, fileList) {
|
||||
if (Number(event.percent) > 0) {
|
||||
this.loadding = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
<template>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
ref="upload"
|
||||
:action="uploadFile"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
name="multipartFile"
|
||||
:data="fileInfo"
|
||||
:auto-upload="false">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { uploadFile } from '@/api/Common/Upload'
|
||||
export default {
|
||||
props: {
|
||||
fileInfo: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
uploadFile: uploadFile
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fileList = []
|
||||
this.uploadFile = uploadFile
|
||||
},
|
||||
methods: {
|
||||
handleSuccess(event, file, fileList) {
|
||||
console.log(file)
|
||||
this.$emit('change', file)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList)
|
||||
},
|
||||
handlePreview(file) {
|
||||
console.log(file)
|
||||
},
|
||||
submitUpload() {
|
||||
console.log(this.fileInfo)
|
||||
this.$refs.upload.submit()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
ref="upload"
|
||||
:action="uploadFile"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
name="multipartFile"
|
||||
:data="fileInfo"
|
||||
:auto-upload="false">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { uploadFile } from '@/api/Common/Upload'
|
||||
export default {
|
||||
props: {
|
||||
fileInfo: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
uploadFile: uploadFile
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fileList = []
|
||||
this.uploadFile = uploadFile
|
||||
},
|
||||
methods: {
|
||||
handleSuccess(event, file, fileList) {
|
||||
console.log(file)
|
||||
this.$emit('change', file)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList)
|
||||
},
|
||||
handlePreview(file) {
|
||||
console.log(file)
|
||||
},
|
||||
submitUpload() {
|
||||
console.log(this.fileInfo)
|
||||
this.$refs.upload.submit()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
<template>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
ref="upload"
|
||||
:action="uploadFile"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
name="file"
|
||||
:data="fileInfo"
|
||||
:auto-upload="false">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { upload_frameFile } from '@/api/Common/Upload'
|
||||
export default {
|
||||
props: {
|
||||
fileInfo: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
uploadFile: upload_frameFile
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fileList = []
|
||||
this.uploadFile = upload_frameFile
|
||||
},
|
||||
methods: {
|
||||
handleSuccess(event, file, fileList) {
|
||||
console.log(file)
|
||||
this.$emit('change', file)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList)
|
||||
},
|
||||
handlePreview(file) {
|
||||
console.log(file)
|
||||
},
|
||||
submitUpload() {
|
||||
console.log(this.fileInfo)
|
||||
this.$refs.upload.submit()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
ref="upload"
|
||||
:action="uploadFile"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
name="file"
|
||||
:data="fileInfo"
|
||||
:auto-upload="false">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { upload_frameFile } from '@/api/Common/Upload'
|
||||
export default {
|
||||
props: {
|
||||
fileInfo: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
uploadFile: upload_frameFile
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fileList = []
|
||||
this.uploadFile = upload_frameFile
|
||||
},
|
||||
methods: {
|
||||
handleSuccess(event, file, fileList) {
|
||||
console.log(file)
|
||||
this.$emit('change', file)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList)
|
||||
},
|
||||
handlePreview(file) {
|
||||
console.log(file)
|
||||
},
|
||||
submitUpload() {
|
||||
console.log(this.fileInfo)
|
||||
this.$refs.upload.submit()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,144 +1,144 @@
|
||||
<template>
|
||||
<div><!---->
|
||||
<el-upload class="avatar-uploader" :headers="accessToken" :action="uploadFile" :accept="accept" :data="uploadData" :on-success="uploadImgSuccess_FuJian" :on-remove="handleRemove" :limit="1" :file-list="files" list-type="picture-card" :on-preview="handlePictureCardPreview">
|
||||
<i class="el-icon-plus avatar-uploader-icon"/>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="true" title="查看图片">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uploadFileIcon } from '@/api/Common/Upload'
|
||||
import { getStorage } from '@/utils/auth.js' // token
|
||||
|
||||
export default {
|
||||
model: {
|
||||
prop: 'name',
|
||||
event: 'change'
|
||||
},
|
||||
props: {
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
bucket: {
|
||||
type: String,
|
||||
default: 'abc'
|
||||
},
|
||||
// 长度
|
||||
width: {
|
||||
type: String,
|
||||
default: '270px'
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default:
|
||||
'.jpg,.jpeg,.png,.JPG,.JPEG,'
|
||||
},
|
||||
// 文件名称
|
||||
name: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
uploadData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
accessToken: null,
|
||||
uploadFile: uploadFileIcon,
|
||||
fileList_FuJian: [],
|
||||
enclosure: '',
|
||||
file_add: '',
|
||||
file_catch: '',
|
||||
files: [],
|
||||
files_list: [],
|
||||
filedUrl: '',
|
||||
// fileUrl: fileUrl,
|
||||
// showpicture:false,
|
||||
isview: false,
|
||||
nameArr: '',
|
||||
loadding: false,
|
||||
stateName: '',
|
||||
/* uploadData: { modelSid: '' },*/
|
||||
sid: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
name: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
console.log('aaaa1', newVal)
|
||||
this.files = newVal
|
||||
console.log('aaaa2', this.files)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.Init()
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.uploadFile = uploadFileIcon // 接口
|
||||
this.accessToken = {
|
||||
token: getStorage()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 页面第一次加载
|
||||
Init() {
|
||||
if (this.name !== undefined) {
|
||||
this.files = []
|
||||
for (var i = 0; i < this.name.length; i++) {
|
||||
this.files.push({
|
||||
name: this.name[i],
|
||||
url: this.name[i]
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上传方案--成功后执行
|
||||
uploadImgSuccess_FuJian(response, file, fileList) {
|
||||
let _this = this
|
||||
console.log('您选择的file:', file)
|
||||
// console.log('您传递的data:', _this.uploadData)
|
||||
if (file.response.code === '200') {
|
||||
this.loadding = false
|
||||
// 返显图片
|
||||
this.filedUrl = this.fileUrl + file.response.data
|
||||
// var uid = file.response.data
|
||||
const files = []
|
||||
files.push({
|
||||
name: file.response.data.sourceFileName,
|
||||
url: file.response.data.fullUrl,
|
||||
size: file.response.data.size
|
||||
})
|
||||
this.$emit('change', files)
|
||||
}
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log('file:' + JSON.stringify(file))
|
||||
console.log('fileList:' + JSON.stringify(fileList))
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogVisible = true
|
||||
this.dialogImageUrl = file.url
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<template>
|
||||
<div><!---->
|
||||
<el-upload class="avatar-uploader" :headers="accessToken" :action="uploadFile" :accept="accept" :data="uploadData" :on-success="uploadImgSuccess_FuJian" :on-remove="handleRemove" :limit="1" :file-list="files" list-type="picture-card" :on-preview="handlePictureCardPreview">
|
||||
<i class="el-icon-plus avatar-uploader-icon"/>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="true" title="查看图片">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uploadFileIcon } from '@/api/Common/Upload'
|
||||
import { getStorage } from '@/utils/auth.js' // token
|
||||
|
||||
export default {
|
||||
model: {
|
||||
prop: 'name',
|
||||
event: 'change'
|
||||
},
|
||||
props: {
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
bucket: {
|
||||
type: String,
|
||||
default: 'abc'
|
||||
},
|
||||
// 长度
|
||||
width: {
|
||||
type: String,
|
||||
default: '270px'
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default:
|
||||
'.jpg,.jpeg,.png,.JPG,.JPEG,'
|
||||
},
|
||||
// 文件名称
|
||||
name: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
uploadData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
accessToken: null,
|
||||
uploadFile: uploadFileIcon,
|
||||
fileList_FuJian: [],
|
||||
enclosure: '',
|
||||
file_add: '',
|
||||
file_catch: '',
|
||||
files: [],
|
||||
files_list: [],
|
||||
filedUrl: '',
|
||||
// fileUrl: fileUrl,
|
||||
// showpicture:false,
|
||||
isview: false,
|
||||
nameArr: '',
|
||||
loadding: false,
|
||||
stateName: '',
|
||||
/* uploadData: { modelSid: '' },*/
|
||||
sid: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
name: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
console.log('aaaa1', newVal)
|
||||
this.files = newVal
|
||||
console.log('aaaa2', this.files)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.Init()
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.uploadFile = uploadFileIcon // 接口
|
||||
this.accessToken = {
|
||||
token: getStorage()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 页面第一次加载
|
||||
Init() {
|
||||
if (this.name !== undefined) {
|
||||
this.files = []
|
||||
for (var i = 0; i < this.name.length; i++) {
|
||||
this.files.push({
|
||||
name: this.name[i],
|
||||
url: this.name[i]
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上传方案--成功后执行
|
||||
uploadImgSuccess_FuJian(response, file, fileList) {
|
||||
let _this = this
|
||||
console.log('您选择的file:', file)
|
||||
// console.log('您传递的data:', _this.uploadData)
|
||||
if (file.response.code === '200') {
|
||||
this.loadding = false
|
||||
// 返显图片
|
||||
this.filedUrl = this.fileUrl + file.response.data
|
||||
// var uid = file.response.data
|
||||
const files = []
|
||||
files.push({
|
||||
name: file.response.data.sourceFileName,
|
||||
url: file.response.data.fullUrl,
|
||||
size: file.response.data.size
|
||||
})
|
||||
this.$emit('change', files)
|
||||
}
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log('file:' + JSON.stringify(file))
|
||||
console.log('fileList:' + JSON.stringify(fileList))
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogVisible = true
|
||||
this.dialogImageUrl = file.url
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
<template>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
ref="upload"
|
||||
:action="uploadFile"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
name="multipartFile"
|
||||
:data="fileInfo"
|
||||
:auto-upload="false">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { upload_UpdateFile } from '@/api/Common/Upload'
|
||||
export default {
|
||||
props: {
|
||||
fileInfo: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
uploadFile: upload_UpdateFile
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fileList = []
|
||||
this.uploadFile = upload_UpdateFile
|
||||
},
|
||||
methods: {
|
||||
handleSuccess(event, file, fileList) {
|
||||
console.log(file)
|
||||
this.$emit('change', file)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList)
|
||||
},
|
||||
handlePreview(file) {
|
||||
console.log(file)
|
||||
},
|
||||
submitUpload() {
|
||||
console.log(this.fileInfo)
|
||||
this.$refs.upload.submit()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
ref="upload"
|
||||
:action="uploadFile"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
name="multipartFile"
|
||||
:data="fileInfo"
|
||||
:auto-upload="false">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { upload_UpdateFile } from '@/api/Common/Upload'
|
||||
export default {
|
||||
props: {
|
||||
fileInfo: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
uploadFile: upload_UpdateFile
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fileList = []
|
||||
this.uploadFile = upload_UpdateFile
|
||||
},
|
||||
methods: {
|
||||
handleSuccess(event, file, fileList) {
|
||||
console.log(file)
|
||||
this.$emit('change', file)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList)
|
||||
},
|
||||
handlePreview(file) {
|
||||
console.log(file)
|
||||
},
|
||||
submitUpload() {
|
||||
console.log(this.fileInfo)
|
||||
this.$refs.upload.submit()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,104 +1,104 @@
|
||||
<template>
|
||||
<el-upload class="avatar-uploader" ref="upload" action="fakeaction"
|
||||
:show-file-list="false"
|
||||
:on-change="uploadchangeFile"
|
||||
:http-request="uploadSectionFile">
|
||||
<img v-if="FrontPhoto" :src="FrontPhoto" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
<div slot="tip" class="el-upload__tip">{{tip}}</div>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { imageUpload } from '@/api/Upload.js'
|
||||
export default {
|
||||
props:{
|
||||
tip:{
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
FrontPhoto: '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 上传文件 FrontPhoto
|
||||
uploadSectionFile(params) {
|
||||
const file = params.file,
|
||||
fileType = file.type,
|
||||
isImage = fileType.indexOf("image") != -1,
|
||||
isLt2M = file.size / 1024 / 1024 < 2;
|
||||
console.log(params)
|
||||
// 这里常规检验,看项目需求而定
|
||||
if (!isImage) {
|
||||
this.$message.error("只能上传图片格式png、jpg、gif!");
|
||||
return;
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error("只能上传图片大小小于2M");
|
||||
return;
|
||||
}
|
||||
// 根据后台需求数据格式
|
||||
const form = new FormData();
|
||||
console.log(form)
|
||||
// 文件对象
|
||||
form.append("file", file);
|
||||
|
||||
// 项目封装的请求方法,下面做简单介绍
|
||||
imageUpload(form).then(res => {
|
||||
//自行处理各种情况
|
||||
console.log(res)
|
||||
this.$emit('imgUrl',res.filePath)
|
||||
// this.FrontPhoto = res.fullUrl
|
||||
if(res.msg == '操作成功'){
|
||||
this.$message({
|
||||
message: '上传成功!',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
});
|
||||
},
|
||||
uploadchangeFile(file){
|
||||
this.FrontPhoto = URL.createObjectURL(file.raw)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 200px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
.el-upload__tip{
|
||||
line-height: 25px;
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<el-upload class="avatar-uploader" ref="upload" action="fakeaction"
|
||||
:show-file-list="false"
|
||||
:on-change="uploadchangeFile"
|
||||
:http-request="uploadSectionFile">
|
||||
<img v-if="FrontPhoto" :src="FrontPhoto" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
<div slot="tip" class="el-upload__tip">{{tip}}</div>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { imageUpload } from '@/api/Upload.js'
|
||||
export default {
|
||||
props:{
|
||||
tip:{
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
FrontPhoto: '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 上传文件 FrontPhoto
|
||||
uploadSectionFile(params) {
|
||||
const file = params.file,
|
||||
fileType = file.type,
|
||||
isImage = fileType.indexOf("image") != -1,
|
||||
isLt2M = file.size / 1024 / 1024 < 2;
|
||||
console.log(params)
|
||||
// 这里常规检验,看项目需求而定
|
||||
if (!isImage) {
|
||||
this.$message.error("只能上传图片格式png、jpg、gif!");
|
||||
return;
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error("只能上传图片大小小于2M");
|
||||
return;
|
||||
}
|
||||
// 根据后台需求数据格式
|
||||
const form = new FormData();
|
||||
console.log(form)
|
||||
// 文件对象
|
||||
form.append("file", file);
|
||||
|
||||
// 项目封装的请求方法,下面做简单介绍
|
||||
imageUpload(form).then(res => {
|
||||
//自行处理各种情况
|
||||
console.log(res)
|
||||
this.$emit('imgUrl',res.filePath)
|
||||
// this.FrontPhoto = res.fullUrl
|
||||
if(res.msg == '操作成功'){
|
||||
this.$message({
|
||||
message: '上传成功!',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
});
|
||||
},
|
||||
uploadchangeFile(file){
|
||||
this.FrontPhoto = URL.createObjectURL(file.raw)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 200px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
.el-upload__tip{
|
||||
line-height: 25px;
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
<template>
|
||||
<div id="index">
|
||||
<ul>
|
||||
<li v-for="(item,index) of imgArr"><img :src="item" alt="图片描述"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Viewer from 'viewerjs';
|
||||
import 'viewerjs/dist/viewer.css';
|
||||
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
data() {
|
||||
return {
|
||||
imgArr:[
|
||||
'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2181711937,4147085500&fm=26&gp=0.jpg',
|
||||
'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1403641414,3238219543&fm=26&gp=0.jpg',
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
const ViewerDom = document.getElementById('index');
|
||||
const viewer = new Viewer(ViewerDom, {
|
||||
// 相关配置项,详情见下面
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
*{
|
||||
padding:0;
|
||||
margin: 0;
|
||||
}
|
||||
/* ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
ul li{
|
||||
width:265px;
|
||||
height: 180px;
|
||||
list-style: none;
|
||||
border:2px solid #CCC;
|
||||
border-radius: 3px;
|
||||
padding: 1px;
|
||||
margin: 10px;
|
||||
cursor: pointer;
|
||||
} */
|
||||
ul li img{
|
||||
width:100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div id="index">
|
||||
<ul>
|
||||
<li v-for="(item,index) of imgArr"><img :src="item" alt="图片描述"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Viewer from 'viewerjs';
|
||||
import 'viewerjs/dist/viewer.css';
|
||||
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
data() {
|
||||
return {
|
||||
imgArr:[
|
||||
'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2181711937,4147085500&fm=26&gp=0.jpg',
|
||||
'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1403641414,3238219543&fm=26&gp=0.jpg',
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
const ViewerDom = document.getElementById('index');
|
||||
const viewer = new Viewer(ViewerDom, {
|
||||
// 相关配置项,详情见下面
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
*{
|
||||
padding:0;
|
||||
margin: 0;
|
||||
}
|
||||
/* ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
ul li{
|
||||
width:265px;
|
||||
height: 180px;
|
||||
list-style: none;
|
||||
border:2px solid #CCC;
|
||||
border-radius: 3px;
|
||||
padding: 1px;
|
||||
margin: 10px;
|
||||
cursor: pointer;
|
||||
} */
|
||||
ul li img{
|
||||
width:100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import Vue from 'vue'
|
||||
import SvgIcon from '@/components/SvgIcon'// svg component
|
||||
|
||||
// register globally
|
||||
Vue.component('svg-icon', SvgIcon)
|
||||
|
||||
const req = require.context('./svg', false, /\.svg$/)
|
||||
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
||||
requireAll(req)
|
||||
import Vue from 'vue'
|
||||
import SvgIcon from '@/components/SvgIcon'// svg component
|
||||
|
||||
// register globally
|
||||
Vue.component('svg-icon', SvgIcon)
|
||||
|
||||
const req = require.context('./svg', false, /\.svg$/)
|
||||
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
||||
requireAll(req)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user