From f2bac630c2dcea18837ba7e6ad822681b8a34e85 Mon Sep 17 00:00:00 2001 From: fengdong777 <1478994744@qq.com> Date: Sat, 29 Apr 2023 14:25:40 +0800 Subject: [PATCH 1/3] 1 --- demo-web-ui/.editorconfig | 28 +- demo-web-ui/.env.development | 21 +- demo-web-ui/.env.production | 18 +- demo-web-ui/.env.staging | 16 +- demo-web-ui/.eslintignore | 8 +- demo-web-ui/.eslintrc.js | 398 +-- demo-web-ui/.gitignore | 32 +- demo-web-ui/.project | 56 +- demo-web-ui/.travis.yml | 10 +- demo-web-ui/LICENSE | 42 +- demo-web-ui/README.md | 180 +- demo-web-ui/babel.config.js | 32 +- demo-web-ui/build/index.js | 70 +- demo-web-ui/jest.config.js | 48 +- demo-web-ui/jsconfig.json | 18 +- demo-web-ui/mock/index.js | 114 +- demo-web-ui/mock/mock-server.js | 162 +- demo-web-ui/mock/table.js | 58 +- demo-web-ui/mock/user.js | 168 +- demo-web-ui/mock/utils.js | 50 +- demo-web-ui/package.json | 144 +- demo-web-ui/postcss.config.js | 16 +- demo-web-ui/public/index.html | 34 +- demo-web-ui/src/App.vue | 28 +- demo-web-ui/src/api/Common/Upload.js | 60 +- demo-web-ui/src/api/Common/areaPicker.js | 50 +- demo-web-ui/src/api/User/login.js | 107 +- demo-web-ui/src/api/flow/read.js | 74 +- demo-web-ui/src/api/flow/todo.js | 266 +- demo-web-ui/src/api/flow/todoForBusiness.js | 48 +- .../src/api/jlcyry/staffOrg/staffOrg.js | 84 +- demo-web-ui/src/api/orgRegist/index.js | 120 +- demo-web-ui/src/api/orgRegist/organization.js | 44 +- demo-web-ui/src/api/system/Role/role.js | 66 +- demo-web-ui/src/api/system/Role/roleManage.js | 138 +- .../src/api/system/dataDict/dataDict.js | 64 +- .../src/api/system/datamapping/datamapping.js | 20 +- .../src/api/system/departments/departments.js | 250 +- .../src/api/system/dictType/dictCommon.js | 116 +- demo-web-ui/src/api/system/dictType/index.js | 148 +- .../src/api/system/flowable/definition.js | 250 +- .../src/api/system/flowable/finished.js | 160 +- demo-web-ui/src/api/system/flowable/form.js | 128 +- .../src/api/system/flowable/process.js | 196 +- demo-web-ui/src/api/system/flowable/todo.js | 232 +- .../src/api/system/functional/functional.js | 208 +- demo-web-ui/src/api/system/home/home.js | 18 +- .../liuchengchaosong/liuchengchaosong.js | 98 +- demo-web-ui/src/api/system/log/index.js | 32 +- demo-web-ui/src/api/system/menu/index.js | 218 +- .../system/mobileterminal/mobileterminal.js | 118 +- .../api/system/organization/organization.js | 72 +- .../system/personalization/personalization.js | 40 +- .../src/api/system/postManage/index.js | 174 +- demo-web-ui/src/api/system/region/region.js | 166 +- .../src/api/system/roleAdminister/index.js | 356 +-- .../api/system/roleAdminister/rolemenus.js | 62 +- demo-web-ui/src/api/system/roleMenus/index.js | 42 +- demo-web-ui/src/api/system/sources/index.js | 252 +- demo-web-ui/src/api/system/user/Auser.js | 168 +- demo-web-ui/src/api/system/user/login.js | 86 +- demo-web-ui/src/api/system/user/user.js | 86 +- .../src/api/system/userAdminister/client.js | 64 +- .../src/api/system/userAdminister/index.js | 138 +- .../src/api/system/userManage/index.js | 300 +-- demo-web-ui/src/api/user.js | 110 +- demo-web-ui/src/api/workflow/finished.js | 174 +- demo-web-ui/src/api/workflow/flow.js | 184 +- demo-web-ui/src/api/workflow/form.js | 128 +- demo-web-ui/src/api/workflow/info.js | 58 +- demo-web-ui/src/api/workflow/process.js | 202 +- demo-web-ui/src/api/workflow/todo.js | 258 +- .../src/components/AreaPicker/index.vue | 302 +-- .../src/components/Breadcrumb/index.vue | 156 +- .../src/components/ButtonBar/index.vue | 260 +- demo-web-ui/src/components/E-image/index.vue | 90 +- demo-web-ui/src/components/ErrorLog/index.vue | 156 +- .../src/components/Hamburger/index.vue | 88 +- demo-web-ui/src/components/Pagging/index.vue | 146 +- .../src/components/Screenfull/index.vue | 118 +- .../src/components/SizeSelect/index.vue | 114 +- demo-web-ui/src/components/SvgIcon/index.vue | 124 +- .../src/components/ThemePicker/index.vue | 350 +-- demo-web-ui/src/components/amap/amap.vue | 448 ++-- demo-web-ui/src/components/flow/flow.vue | 64 +- .../src/components/flow/flowRecord.vue | 260 +- .../src/components/imgCodeRole/index.vue | 294 +- .../src/components/pagination/index.vue | 272 +- .../src/components/pagination/pageye.vue | 248 +- .../src/components/passwordSafe/index.vue | 140 +- .../src/components/tab-search/index.vue | 160 +- .../src/components/uploadFile/index.vue | 236 +- .../src/components/uploadFile/upload.vue | 434 +-- .../src/components/uploadFile/upload_apk.vue | 110 +- .../components/uploadFile/upload_frameApk.vue | 108 +- .../src/components/uploadFile/upload_icon.vue | 288 +- .../uploadFile/upload_updateApk.vue | 108 +- .../src/components/uploadFileimg/index.vue | 208 +- demo-web-ui/src/components/viewerjs/index.vue | 110 +- demo-web-ui/src/icons/index.js | 18 +- demo-web-ui/src/icons/svg/Import.svg | 2 +- demo-web-ui/src/icons/svg/cross.svg | 2 +- demo-web-ui/src/icons/svg/del.svg | 2 +- demo-web-ui/src/icons/svg/edit.svg | 2 +- demo-web-ui/src/icons/svg/export.svg | 2 +- demo-web-ui/src/icons/svg/plus.svg | 2 +- demo-web-ui/src/icons/svgo.yml | 44 +- demo-web-ui/src/layout/components/AppMain.vue | 96 +- demo-web-ui/src/layout/components/Navbar.vue | 321 +-- .../layout/components/Sidebar/FixiOSBug.js | 52 +- .../src/layout/components/Sidebar/Item.vue | 82 +- .../src/layout/components/Sidebar/Link.vue | 86 +- .../src/layout/components/Sidebar/Logo.vue | 164 +- .../layout/components/Sidebar/SidebarItem.vue | 194 +- .../src/layout/components/Sidebar/index.vue | 306 +-- .../layout/components/TagsView/ScrollPane.vue | 172 +- .../src/layout/components/TagsView/index.vue | 686 ++--- demo-web-ui/src/layout/components/index.js | 8 +- demo-web-ui/src/layout/index.vue | 221 +- demo-web-ui/src/layout/mixin/ResizeHandler.js | 90 +- demo-web-ui/src/main.js | 156 +- demo-web-ui/src/permission.js | 106 +- demo-web-ui/src/router/index.js | 827 +++--- .../router/modules/components - 副本 (2).js | 412 +-- demo-web-ui/src/router/modules/components.js | 112 +- demo-web-ui/src/settings.js | 32 +- demo-web-ui/src/store/getters.js | 34 +- demo-web-ui/src/store/index.js | 50 +- demo-web-ui/src/store/modules/app.js | 112 +- demo-web-ui/src/store/modules/errorLog.js | 56 +- demo-web-ui/src/store/modules/permission.js | 138 +- demo-web-ui/src/store/modules/settings.js | 70 +- demo-web-ui/src/store/modules/tagsView.js | 320 +-- demo-web-ui/src/store/modules/user.js | 320 +-- demo-web-ui/src/styles/e-table.scss | 60 +- demo-web-ui/src/styles/el-form.scss | 134 +- demo-web-ui/src/styles/element-table.scss | 38 +- demo-web-ui/src/styles/element-tabs.scss | 50 +- demo-web-ui/src/styles/element-ui.scss | 124 +- demo-web-ui/src/styles/element-variables.scss | 62 +- demo-web-ui/src/styles/index.scss | 536 ++-- demo-web-ui/src/styles/mixin.scss | 56 +- demo-web-ui/src/styles/sidebar.scss | 523 ++-- demo-web-ui/src/styles/table.scss | 96 +- demo-web-ui/src/styles/transition.scss | 96 +- demo-web-ui/src/styles/variables.scss | 104 +- demo-web-ui/src/utils/auth.js | 60 +- demo-web-ui/src/utils/get-page-title.js | 20 +- demo-web-ui/src/utils/index.js | 234 +- demo-web-ui/src/utils/print.js | 244 +- demo-web-ui/src/utils/request.js | 132 +- demo-web-ui/src/utils/roles.js | 194 +- demo-web-ui/src/utils/validate.js | 40 +- demo-web-ui/src/views/404.vue | 456 ++-- demo-web-ui/src/views/Home/Home.vue | 655 ----- demo-web-ui/src/views/Process/BpmData.js | 136 +- .../src/views/Process/PropertyPanel.vue | 338 +-- .../views/Process/common/customTranslate.js | 40 +- .../Process/common/mixinExecutionListener.js | 48 +- .../src/views/Process/common/mixinPanel.js | 140 +- .../src/views/Process/common/mixinXcrud.js | 44 +- .../src/views/Process/common/parseElement.js | 106 +- .../components/custom/customContextPad.vue | 48 +- .../Process/components/nodePanel/gateway.vue | 162 +- .../Process/components/nodePanel/process.vue | 226 +- .../nodePanel/property/executionListener.vue | 388 +-- .../nodePanel/property/listenerParam.vue | 192 +- .../nodePanel/property/multiInstance.vue | 234 +- .../components/nodePanel/property/signal.vue | 248 +- .../nodePanel/property/taskListener.vue | 392 +-- .../components/nodePanel/sequenceFlow.vue | 184 +- .../Process/components/nodePanel/startEnd.vue | 188 +- .../Process/components/nodePanel/task.vue | 852 +++--- .../src/views/Process/flowable/flowable.json | 2388 ++++++++--------- .../src/views/Process/flowable/init.js | 48 +- .../src/views/Process/flowable/showConfig.js | 110 +- demo-web-ui/src/views/Process/index.js | 10 +- demo-web-ui/src/views/Process/index.vue | 956 +++---- demo-web-ui/src/views/Process/lang/zh.js | 454 ++-- demo-web-ui/src/views/PwdModify/PwdModify.vue | 334 +-- .../views/Regist/Organing/components/amap.vue | 348 +-- .../Regist/Organing/components/first.vue | 180 +- .../Regist/Organing/components/fourth.vue | 62 +- .../views/Regist/Organing/components/index.js | 10 +- .../Regist/Organing/components/second.vue | 298 +- .../Regist/Organing/components/third.vue | 352 +-- .../src/views/Regist/Organing/index.vue | 456 ++-- demo-web-ui/src/views/Regist/User.vue | 549 ++-- .../views/RoleAdminister/RoleAdminister.vue | 1760 ++++++------ .../copyofprocess/liuchengchaosongAdd.vue | 356 +-- .../copyofprocess/liuchengchasongguanli.vue | 543 ++-- .../src/views/datamapping/shujuyingshe.vue | 522 ++-- .../src/views/dictManage/dictCommon.vue | 496 ++-- .../src/views/dictManage/dictManage.vue | 400 +-- demo-web-ui/src/views/dictManage/dictMap.vue | 310 +-- demo-web-ui/src/views/flow/doneList.vue | 1046 ++++---- .../src/views/flow/flowRecordForBusiness.vue | 148 +- demo-web-ui/src/views/flow/havereadList.vue | 784 +++--- demo-web-ui/src/views/flow/tobereadList.vue | 786 +++--- demo-web-ui/src/views/flow/todoList.vue | 1226 ++++----- .../src/views/functional/functional.vue | 708 ++--- demo-web-ui/src/views/index.vue | 94 +- demo-web-ui/src/views/logManage/logManage.vue | 424 +-- demo-web-ui/src/views/login/login.vue | 591 ++-- .../src/views/menuManage/menuManage.vue | 1074 ++++---- .../src/views/mobileterminal/adhibition.vue | 360 +-- .../src/views/mobileterminal/frame.vue | 244 +- .../views/mobileterminal/mobileterminal.vue | 400 +-- .../src/views/mobileterminal/plugin.vue | 430 +-- .../src/views/mobileterminal/updatePlugin.vue | 482 ++-- .../organizationManage/organizationManage.vue | 1320 ++++----- .../views/personalization/personalization.vue | 234 +- .../src/views/postManage/postManage.vue | 1010 +++---- demo-web-ui/src/views/redirect/index.vue | 24 +- .../src/views/region/component/regionAdd.vue | 254 +- .../views/region/component/regionAlter.vue | 248 +- demo-web-ui/src/views/region/region.vue | 1126 ++++---- demo-web-ui/src/views/region/regionCity.vue | 1144 ++++---- .../src/views/region/regionDistrict.vue | 1094 ++++---- .../src/views/sourceManage/sourceManage.vue | 910 +++---- .../RoleAdminister/RoleAdminister.vue | 704 ++--- .../UserAdminister/components/client.vue | 440 +-- .../UserAdminister/components/user.vue | 564 ++-- .../system-admin/UserAdminister/index.vue | 84 +- .../src/views/system-admin/check/company.vue | 912 +++---- .../src/views/system-admin/check/people.vue | 614 ++--- .../views/system-admin/check/personnel.vue | 754 +++--- .../system-admin/check/remarks/index.vue | 116 +- .../views/system-admin/components/orgInfo.vue | 302 +-- .../system-admin/components/userInfo.vue | 70 +- .../src/views/system-admin/dictCommon.vue | 360 +-- .../src/views/system-admin/orgsetup/index.vue | 894 +++--- demo-web-ui/src/views/system-admin/role.vue | 646 ++--- demo-web-ui/src/views/system-admin/user.vue | 726 ++--- .../src/views/userManage/userManage.vue | 130 +- .../src/views/userManage/userManageAdd.vue | 534 ++-- .../src/views/userManage/userManageList.vue | 966 +++---- .../views/workflow/definition/definition.vue | 1247 +++------ .../workflow/definition/definitionAdd.vue | 70 +- .../src/views/workflow/demo/leavedemo.vue | 132 +- demo-web-ui/src/views/workflow/endtask.vue | 396 +-- demo-web-ui/src/views/workflow/form/form.vue | 612 ++--- .../src/views/workflow/form/formAdd.vue | 26 +- demo-web-ui/src/views/workflow/index.vue | 88 +- demo-web-ui/src/views/workflow/myprocess.vue | 338 +-- demo-web-ui/src/views/workflow/mytask.vue | 366 +-- .../src/views/workflow/processlist.vue | 234 +- .../src/views/workflow/task/record/flow.vue | 64 +- .../src/views/workflow/task/record/index.vue | 24 +- demo-web-ui/tests/unit/.eslintrc.js | 10 +- .../tests/unit/components/Breadcrumb.spec.js | 196 +- .../tests/unit/components/Hamburger.spec.js | 36 +- .../tests/unit/components/SvgIcon.spec.js | 44 +- .../tests/unit/utils/formatTime.spec.js | 60 +- .../tests/unit/utils/param2Obj.spec.js | 28 +- .../tests/unit/utils/parseTime.spec.js | 70 +- demo-web-ui/tests/unit/utils/validate.spec.js | 34 +- demo-web-ui/vue.config.js | 270 +- 258 files changed, 33043 insertions(+), 33974 deletions(-) delete mode 100644 demo-web-ui/src/views/Home/Home.vue diff --git a/demo-web-ui/.editorconfig b/demo-web-ui/.editorconfig index ea6e20f..9a0e57f 100644 --- a/demo-web-ui/.editorconfig +++ b/demo-web-ui/.editorconfig @@ -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 diff --git a/demo-web-ui/.env.development b/demo-web-ui/.env.development index 5e5768e..9b523de 100644 --- a/demo-web-ui/.env.development +++ b/demo-web-ui/.env.development @@ -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" diff --git a/demo-web-ui/.env.production b/demo-web-ui/.env.production index c4d0fd7..c6e0044 100644 --- a/demo-web-ui/.env.production +++ b/demo-web-ui/.env.production @@ -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" + diff --git a/demo-web-ui/.env.staging b/demo-web-ui/.env.staging index a8793a0..defe786 100644 --- a/demo-web-ui/.env.staging +++ b/demo-web-ui/.env.staging @@ -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' + diff --git a/demo-web-ui/.eslintignore b/demo-web-ui/.eslintignore index e6529fc..e3a871f 100644 --- a/demo-web-ui/.eslintignore +++ b/demo-web-ui/.eslintignore @@ -1,4 +1,4 @@ -build/*.js -src/assets -public -dist +build/*.js +src/assets +public +dist diff --git a/demo-web-ui/.eslintrc.js b/demo-web-ui/.eslintrc.js index bb624b1..cc395fe 100644 --- a/demo-web-ui/.eslintrc.js +++ b/demo-web-ui/.eslintrc.js @@ -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'] + } +} diff --git a/demo-web-ui/.gitignore b/demo-web-ui/.gitignore index 9ad28d2..f1f7665 100644 --- a/demo-web-ui/.gitignore +++ b/demo-web-ui/.gitignore @@ -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 diff --git a/demo-web-ui/.project b/demo-web-ui/.project index a7648aa..c386291 100644 --- a/demo-web-ui/.project +++ b/demo-web-ui/.project @@ -1,28 +1,28 @@ - - - anrui-system-ui - - - - - - com.aptana.ide.core.unifiedBuilder - - - - - - com.aptana.projects.webnature - - - - 1629107336958 - - 26 - - org.eclipse.ui.ide.multiFilter - 1.0-name-matches-false-false-node_modules - - - - + + + anrui-system-ui + + + + + + com.aptana.ide.core.unifiedBuilder + + + + + + com.aptana.projects.webnature + + + + 1629107336958 + + 26 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-node_modules + + + + diff --git a/demo-web-ui/.travis.yml b/demo-web-ui/.travis.yml index f4be7a0..a95f7bb 100644 --- a/demo-web-ui/.travis.yml +++ b/demo-web-ui/.travis.yml @@ -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 diff --git a/demo-web-ui/LICENSE b/demo-web-ui/LICENSE index 6151575..7be02ac 100644 --- a/demo-web-ui/LICENSE +++ b/demo-web-ui/LICENSE @@ -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. diff --git a/demo-web-ui/README.md b/demo-web-ui/README.md index a2f3c71..1f1a820 100644 --- a/demo-web-ui/README.md +++ b/demo-web-ui/README.md @@ -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 - -![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif) - -## 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+. - -| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
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 + +![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif) + +## 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+. + +| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
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 diff --git a/demo-web-ui/babel.config.js b/demo-web-ui/babel.config.js index f851c1a..0476045 100644 --- a/demo-web-ui/babel.config.js +++ b/demo-web-ui/babel.config.js @@ -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'] + } + } +} diff --git a/demo-web-ui/build/index.js b/demo-web-ui/build/index.js index 0c57de2..385da08 100644 --- a/demo-web-ui/build/index.js +++ b/demo-web-ui/build/index.js @@ -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}`) +} diff --git a/demo-web-ui/jest.config.js b/demo-web-ui/jest.config.js index 143cdc8..ca6c565 100644 --- a/demo-web-ui/jest.config.js +++ b/demo-web-ui/jest.config.js @@ -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: { - '^@/(.*)$': '/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: '/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: { + '^@/(.*)$': '/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: '/tests/unit/coverage', + // 'collectCoverage': true, + 'coverageReporters': [ + 'lcov', + 'text-summary' + ], + testURL: 'http://localhost/' +} diff --git a/demo-web-ui/jsconfig.json b/demo-web-ui/jsconfig.json index ed079e2..de88533 100644 --- a/demo-web-ui/jsconfig.json +++ b/demo-web-ui/jsconfig.json @@ -1,9 +1,9 @@ -{ - "compilerOptions": { - "baseUrl": "./", - "paths": { - "@/*": ["src/*"] - } - }, - "exclude": ["node_modules", "dist"] -} +{ + "compilerOptions": { + "baseUrl": "./", + "paths": { + "@/*": ["src/*"] + } + }, + "exclude": ["node_modules", "dist"] +} diff --git a/demo-web-ui/mock/index.js b/demo-web-ui/mock/index.js index c514c13..4867182 100644 --- a/demo-web-ui/mock/index.js +++ b/demo-web-ui/mock/index.js @@ -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 +} + diff --git a/demo-web-ui/mock/mock-server.js b/demo-web-ui/mock/mock-server.js index 8941ec0..5d0abe4 100644 --- a/demo-web-ui/mock/mock-server.js +++ b/demo-web-ui/mock/mock-server.js @@ -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)) + } + } + }) +} diff --git a/demo-web-ui/mock/table.js b/demo-web-ui/mock/table.js index bd0e013..d2588a0 100644 --- a/demo-web-ui/mock/table.js +++ b/demo-web-ui/mock/table.js @@ -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 + } + } + } + } +] diff --git a/demo-web-ui/mock/user.js b/demo-web-ui/mock/user.js index 7555338..b70ca10 100644 --- a/demo-web-ui/mock/user.js +++ b/demo-web-ui/mock/user.js @@ -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' + } + } + } +] diff --git a/demo-web-ui/mock/utils.js b/demo-web-ui/mock/utils.js index 95cc27d..ca5cb75 100644 --- a/demo-web-ui/mock/utils.js +++ b/demo-web-ui/mock/utils.js @@ -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 +} diff --git a/demo-web-ui/package.json b/demo-web-ui/package.json index 77a6c3a..63e5ae4 100644 --- a/demo-web-ui/package.json +++ b/demo-web-ui/package.json @@ -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 ", - "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 ", + "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" +} diff --git a/demo-web-ui/postcss.config.js b/demo-web-ui/postcss.config.js index 10473ef..e5d4d90 100644 --- a/demo-web-ui/postcss.config.js +++ b/demo-web-ui/postcss.config.js @@ -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': {} + } +} diff --git a/demo-web-ui/public/index.html b/demo-web-ui/public/index.html index fa2be91..504c8f7 100644 --- a/demo-web-ui/public/index.html +++ b/demo-web-ui/public/index.html @@ -1,17 +1,17 @@ - - - - - - - - <%= webpackConfig.name %> - - - -
- - - + + + + + + + + <%= webpackConfig.name %> + + + +
+ + + diff --git a/demo-web-ui/src/App.vue b/demo-web-ui/src/App.vue index c65a59a..40b5ff9 100644 --- a/demo-web-ui/src/App.vue +++ b/demo-web-ui/src/App.vue @@ -1,14 +1,14 @@ - - - + + + diff --git a/demo-web-ui/src/api/Common/Upload.js b/demo-web-ui/src/api/Common/Upload.js index cf2eda9..7d3ce9b 100644 --- a/demo-web-ui/src/api/Common/Upload.js +++ b/demo-web-ui/src/api/Common/Upload.js @@ -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 } + }) +} diff --git a/demo-web-ui/src/api/Common/areaPicker.js b/demo-web-ui/src/api/Common/areaPicker.js index f43d0a3..dc83125 100644 --- a/demo-web-ui/src/api/Common/areaPicker.js +++ b/demo-web-ui/src/api/Common/areaPicker.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/User/login.js b/demo-web-ui/src/api/User/login.js index e447216..68b72a2 100644 --- a/demo-web-ui/src/api/User/login.js +++ b/demo-web-ui/src/api/User/login.js @@ -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() diff --git a/demo-web-ui/src/api/flow/read.js b/demo-web-ui/src/api/flow/read.js index 23fc15f..487ae7f 100644 --- a/demo-web-ui/src/api/flow/read.js +++ b/demo-web-ui/src/api/flow/read.js @@ -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' + }) +} diff --git a/demo-web-ui/src/api/flow/todo.js b/demo-web-ui/src/api/flow/todo.js index c517e15..29687c9 100644 --- a/demo-web-ui/src/api/flow/todo.js +++ b/demo-web-ui/src/api/flow/todo.js @@ -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' + } + }) +} diff --git a/demo-web-ui/src/api/flow/todoForBusiness.js b/demo-web-ui/src/api/flow/todoForBusiness.js index 45727fc..6daf61b 100644 --- a/demo-web-ui/src/api/flow/todoForBusiness.js +++ b/demo-web-ui/src/api/flow/todoForBusiness.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/jlcyry/staffOrg/staffOrg.js b/demo-web-ui/src/api/jlcyry/staffOrg/staffOrg.js index ad3ce15..fbd75ea 100644 --- a/demo-web-ui/src/api/jlcyry/staffOrg/staffOrg.js +++ b/demo-web-ui/src/api/jlcyry/staffOrg/staffOrg.js @@ -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() diff --git a/demo-web-ui/src/api/orgRegist/index.js b/demo-web-ui/src/api/orgRegist/index.js index 8f0412c..15b9452 100644 --- a/demo-web-ui/src/api/orgRegist/index.js +++ b/demo-web-ui/src/api/orgRegist/index.js @@ -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', + }) +} diff --git a/demo-web-ui/src/api/orgRegist/organization.js b/demo-web-ui/src/api/orgRegist/organization.js index 75b6165..7db6e86 100644 --- a/demo-web-ui/src/api/orgRegist/organization.js +++ b/demo-web-ui/src/api/orgRegist/organization.js @@ -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() diff --git a/demo-web-ui/src/api/system/Role/role.js b/demo-web-ui/src/api/system/Role/role.js index 0fe3e00..c9c9a81 100644 --- a/demo-web-ui/src/api/system/Role/role.js +++ b/demo-web-ui/src/api/system/Role/role.js @@ -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'} + }) +} diff --git a/demo-web-ui/src/api/system/Role/roleManage.js b/demo-web-ui/src/api/system/Role/roleManage.js index e3de51c..aeb3922 100644 --- a/demo-web-ui/src/api/system/Role/roleManage.js +++ b/demo-web-ui/src/api/system/Role/roleManage.js @@ -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) + }) +} diff --git a/demo-web-ui/src/api/system/dataDict/dataDict.js b/demo-web-ui/src/api/system/dataDict/dataDict.js index 15df050..dc1af9f 100644 --- a/demo-web-ui/src/api/system/dataDict/dataDict.js +++ b/demo-web-ui/src/api/system/dataDict/dataDict.js @@ -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' + }) +} diff --git a/demo-web-ui/src/api/system/datamapping/datamapping.js b/demo-web-ui/src/api/system/datamapping/datamapping.js index 7c6831d..aa8e59e 100644 --- a/demo-web-ui/src/api/system/datamapping/datamapping.js +++ b/demo-web-ui/src/api/system/datamapping/datamapping.js @@ -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' } + }) +} diff --git a/demo-web-ui/src/api/system/departments/departments.js b/demo-web-ui/src/api/system/departments/departments.js index bc377a6..738c816 100644 --- a/demo-web-ui/src/api/system/departments/departments.js +++ b/demo-web-ui/src/api/system/departments/departments.js @@ -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' + } + }) +} diff --git a/demo-web-ui/src/api/system/dictType/dictCommon.js b/demo-web-ui/src/api/system/dictType/dictCommon.js index 10029f5..5f58c23 100644 --- a/demo-web-ui/src/api/system/dictType/dictCommon.js +++ b/demo-web-ui/src/api/system/dictType/dictCommon.js @@ -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 + } + }) +} diff --git a/demo-web-ui/src/api/system/dictType/index.js b/demo-web-ui/src/api/system/dictType/index.js index 501fea2..1443b69 100644 --- a/demo-web-ui/src/api/system/dictType/index.js +++ b/demo-web-ui/src/api/system/dictType/index.js @@ -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 } + }) +} diff --git a/demo-web-ui/src/api/system/flowable/definition.js b/demo-web-ui/src/api/system/flowable/definition.js index feb4e75..8a6da01 100644 --- a/demo-web-ui/src/api/system/flowable/definition.js +++ b/demo-web-ui/src/api/system/flowable/definition.js @@ -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 + }); +} diff --git a/demo-web-ui/src/api/system/flowable/finished.js b/demo-web-ui/src/api/system/flowable/finished.js index 69def25..3a33bf8 100644 --- a/demo-web-ui/src/api/system/flowable/finished.js +++ b/demo-web-ui/src/api/system/flowable/finished.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/system/flowable/form.js b/demo-web-ui/src/api/system/flowable/form.js index bb0beee..a8fa657 100644 --- a/demo-web-ui/src/api/system/flowable/form.js +++ b/demo-web-ui/src/api/system/flowable/form.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/system/flowable/process.js b/demo-web-ui/src/api/system/flowable/process.js index 84e6443..13ed50d 100644 --- a/demo-web-ui/src/api/system/flowable/process.js +++ b/demo-web-ui/src/api/system/flowable/process.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/system/flowable/todo.js b/demo-web-ui/src/api/system/flowable/todo.js index 5a3b542..7663f0d 100644 --- a/demo-web-ui/src/api/system/flowable/todo.js +++ b/demo-web-ui/src/api/system/flowable/todo.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/system/functional/functional.js b/demo-web-ui/src/api/system/functional/functional.js index 1b5a62f..9fe81c3 100644 --- a/demo-web-ui/src/api/system/functional/functional.js +++ b/demo-web-ui/src/api/system/functional/functional.js @@ -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' } + }) +} + diff --git a/demo-web-ui/src/api/system/home/home.js b/demo-web-ui/src/api/system/home/home.js index ac52541..6589c6a 100644 --- a/demo-web-ui/src/api/system/home/home.js +++ b/demo-web-ui/src/api/system/home/home.js @@ -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' + }) +} diff --git a/demo-web-ui/src/api/system/liuchengchaosong/liuchengchaosong.js b/demo-web-ui/src/api/system/liuchengchaosong/liuchengchaosong.js index 7b9305e..f696865 100644 --- a/demo-web-ui/src/api/system/liuchengchaosong/liuchengchaosong.js +++ b/demo-web-ui/src/api/system/liuchengchaosong/liuchengchaosong.js @@ -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' } + }) +} diff --git a/demo-web-ui/src/api/system/log/index.js b/demo-web-ui/src/api/system/log/index.js index a4dfd39..3251131 100644 --- a/demo-web-ui/src/api/system/log/index.js +++ b/demo-web-ui/src/api/system/log/index.js @@ -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 + } + }) +} + diff --git a/demo-web-ui/src/api/system/menu/index.js b/demo-web-ui/src/api/system/menu/index.js index 9348efe..521ff32 100644 --- a/demo-web-ui/src/api/system/menu/index.js +++ b/demo-web-ui/src/api/system/menu/index.js @@ -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) + }) +} + + + + diff --git a/demo-web-ui/src/api/system/mobileterminal/mobileterminal.js b/demo-web-ui/src/api/system/mobileterminal/mobileterminal.js index ceb9385..0f95691 100644 --- a/demo-web-ui/src/api/system/mobileterminal/mobileterminal.js +++ b/demo-web-ui/src/api/system/mobileterminal/mobileterminal.js @@ -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 + }) +} + diff --git a/demo-web-ui/src/api/system/organization/organization.js b/demo-web-ui/src/api/system/organization/organization.js index 1cf938e..7177e82 100644 --- a/demo-web-ui/src/api/system/organization/organization.js +++ b/demo-web-ui/src/api/system/organization/organization.js @@ -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() diff --git a/demo-web-ui/src/api/system/personalization/personalization.js b/demo-web-ui/src/api/system/personalization/personalization.js index 84a2608..e22fc15 100644 --- a/demo-web-ui/src/api/system/personalization/personalization.js +++ b/demo-web-ui/src/api/system/personalization/personalization.js @@ -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' } + }) +} diff --git a/demo-web-ui/src/api/system/postManage/index.js b/demo-web-ui/src/api/system/postManage/index.js index 737cca2..f20a817 100644 --- a/demo-web-ui/src/api/system/postManage/index.js +++ b/demo-web-ui/src/api/system/postManage/index.js @@ -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' + }) +} + diff --git a/demo-web-ui/src/api/system/region/region.js b/demo-web-ui/src/api/system/region/region.js index 005192a..edaf66a 100644 --- a/demo-web-ui/src/api/system/region/region.js +++ b/demo-web-ui/src/api/system/region/region.js @@ -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' + } + }) + } +} diff --git a/demo-web-ui/src/api/system/roleAdminister/index.js b/demo-web-ui/src/api/system/roleAdminister/index.js index cc1d510..141e15a 100644 --- a/demo-web-ui/src/api/system/roleAdminister/index.js +++ b/demo-web-ui/src/api/system/roleAdminister/index.js @@ -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 + } + }) +} diff --git a/demo-web-ui/src/api/system/roleAdminister/rolemenus.js b/demo-web-ui/src/api/system/roleAdminister/rolemenus.js index b3342eb..fd24ea1 100644 --- a/demo-web-ui/src/api/system/roleAdminister/rolemenus.js +++ b/demo-web-ui/src/api/system/roleAdminister/rolemenus.js @@ -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'} + }) +} diff --git a/demo-web-ui/src/api/system/roleMenus/index.js b/demo-web-ui/src/api/system/roleMenus/index.js index 9d4e877..e1675af 100644 --- a/demo-web-ui/src/api/system/roleMenus/index.js +++ b/demo-web-ui/src/api/system/roleMenus/index.js @@ -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'} + }) +} diff --git a/demo-web-ui/src/api/system/sources/index.js b/demo-web-ui/src/api/system/sources/index.js index f94cac0..1222cc9 100644 --- a/demo-web-ui/src/api/system/sources/index.js +++ b/demo-web-ui/src/api/system/sources/index.js @@ -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) + }) +} + diff --git a/demo-web-ui/src/api/system/user/Auser.js b/demo-web-ui/src/api/system/user/Auser.js index b2318a8..030aeb1 100644 --- a/demo-web-ui/src/api/system/user/Auser.js +++ b/demo-web-ui/src/api/system/user/Auser.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/system/user/login.js b/demo-web-ui/src/api/system/user/login.js index 250edd2..6afb96f 100644 --- a/demo-web-ui/src/api/system/user/login.js +++ b/demo-web-ui/src/api/system/user/login.js @@ -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) + }) + } +} + diff --git a/demo-web-ui/src/api/system/user/user.js b/demo-web-ui/src/api/system/user/user.js index 6ff564f..d71f49b 100644 --- a/demo-web-ui/src/api/system/user/user.js +++ b/demo-web-ui/src/api/system/user/user.js @@ -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() diff --git a/demo-web-ui/src/api/system/userAdminister/client.js b/demo-web-ui/src/api/system/userAdminister/client.js index ffb3861..cfdec18 100644 --- a/demo-web-ui/src/api/system/userAdminister/client.js +++ b/demo-web-ui/src/api/system/userAdminister/client.js @@ -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'} + }) +} diff --git a/demo-web-ui/src/api/system/userAdminister/index.js b/demo-web-ui/src/api/system/userAdminister/index.js index 08d3d50..afdcc2d 100644 --- a/demo-web-ui/src/api/system/userAdminister/index.js +++ b/demo-web-ui/src/api/system/userAdminister/index.js @@ -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 + }) + } + diff --git a/demo-web-ui/src/api/system/userManage/index.js b/demo-web-ui/src/api/system/userManage/index.js index c650372..a9a4ed4 100644 --- a/demo-web-ui/src/api/system/userManage/index.js +++ b/demo-web-ui/src/api/system/userManage/index.js @@ -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' + } + }) +} diff --git a/demo-web-ui/src/api/user.js b/demo-web-ui/src/api/user.js index 535b7c5..6acbd3f 100644 --- a/demo-web-ui/src/api/user.js +++ b/demo-web-ui/src/api/user.js @@ -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' + } + }) +} diff --git a/demo-web-ui/src/api/workflow/finished.js b/demo-web-ui/src/api/workflow/finished.js index 5cb3fdd..b3523ae 100644 --- a/demo-web-ui/src/api/workflow/finished.js +++ b/demo-web-ui/src/api/workflow/finished.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/workflow/flow.js b/demo-web-ui/src/api/workflow/flow.js index 5c69fa8..c37ce8d 100644 --- a/demo-web-ui/src/api/workflow/flow.js +++ b/demo-web-ui/src/api/workflow/flow.js @@ -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 + } + }) +} diff --git a/demo-web-ui/src/api/workflow/form.js b/demo-web-ui/src/api/workflow/form.js index bb0beee..a8fa657 100644 --- a/demo-web-ui/src/api/workflow/form.js +++ b/demo-web-ui/src/api/workflow/form.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/workflow/info.js b/demo-web-ui/src/api/workflow/info.js index 79aa71f..695b6ea 100644 --- a/demo-web-ui/src/api/workflow/info.js +++ b/demo-web-ui/src/api/workflow/info.js @@ -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" + }); +} + diff --git a/demo-web-ui/src/api/workflow/process.js b/demo-web-ui/src/api/workflow/process.js index f425771..0768388 100644 --- a/demo-web-ui/src/api/workflow/process.js +++ b/demo-web-ui/src/api/workflow/process.js @@ -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 + }) +} diff --git a/demo-web-ui/src/api/workflow/todo.js b/demo-web-ui/src/api/workflow/todo.js index 62ed00f..2a3ce52 100644 --- a/demo-web-ui/src/api/workflow/todo.js +++ b/demo-web-ui/src/api/workflow/todo.js @@ -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 + }) +} + diff --git a/demo-web-ui/src/components/AreaPicker/index.vue b/demo-web-ui/src/components/AreaPicker/index.vue index 105c647..894ac0f 100644 --- a/demo-web-ui/src/components/AreaPicker/index.vue +++ b/demo-web-ui/src/components/AreaPicker/index.vue @@ -1,151 +1,151 @@ - - - - - - + + + + + + diff --git a/demo-web-ui/src/components/Breadcrumb/index.vue b/demo-web-ui/src/components/Breadcrumb/index.vue index 29f9a04..4b70634 100644 --- a/demo-web-ui/src/components/Breadcrumb/index.vue +++ b/demo-web-ui/src/components/Breadcrumb/index.vue @@ -1,78 +1,78 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/ButtonBar/index.vue b/demo-web-ui/src/components/ButtonBar/index.vue index c98230e..13ecaa7 100644 --- a/demo-web-ui/src/components/ButtonBar/index.vue +++ b/demo-web-ui/src/components/ButtonBar/index.vue @@ -1,130 +1,130 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/E-image/index.vue b/demo-web-ui/src/components/E-image/index.vue index 9401ce4..7841d6f 100644 --- a/demo-web-ui/src/components/E-image/index.vue +++ b/demo-web-ui/src/components/E-image/index.vue @@ -1,45 +1,45 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/ErrorLog/index.vue b/demo-web-ui/src/components/ErrorLog/index.vue index 6119c03..edfc627 100644 --- a/demo-web-ui/src/components/ErrorLog/index.vue +++ b/demo-web-ui/src/components/ErrorLog/index.vue @@ -1,78 +1,78 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/Hamburger/index.vue b/demo-web-ui/src/components/Hamburger/index.vue index 368b002..c6a4359 100644 --- a/demo-web-ui/src/components/Hamburger/index.vue +++ b/demo-web-ui/src/components/Hamburger/index.vue @@ -1,44 +1,44 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/Pagging/index.vue b/demo-web-ui/src/components/Pagging/index.vue index f4ac9a6..b3007d9 100644 --- a/demo-web-ui/src/components/Pagging/index.vue +++ b/demo-web-ui/src/components/Pagging/index.vue @@ -1,73 +1,73 @@ - - - + + + diff --git a/demo-web-ui/src/components/Screenfull/index.vue b/demo-web-ui/src/components/Screenfull/index.vue index 4735604..fd1c04b 100644 --- a/demo-web-ui/src/components/Screenfull/index.vue +++ b/demo-web-ui/src/components/Screenfull/index.vue @@ -1,59 +1,59 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/SizeSelect/index.vue b/demo-web-ui/src/components/SizeSelect/index.vue index e88065b..5503b97 100644 --- a/demo-web-ui/src/components/SizeSelect/index.vue +++ b/demo-web-ui/src/components/SizeSelect/index.vue @@ -1,57 +1,57 @@ - - - + + + diff --git a/demo-web-ui/src/components/SvgIcon/index.vue b/demo-web-ui/src/components/SvgIcon/index.vue index b07ded2..333f497 100644 --- a/demo-web-ui/src/components/SvgIcon/index.vue +++ b/demo-web-ui/src/components/SvgIcon/index.vue @@ -1,62 +1,62 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/ThemePicker/index.vue b/demo-web-ui/src/components/ThemePicker/index.vue index 3879c5a..9a77cd3 100644 --- a/demo-web-ui/src/components/ThemePicker/index.vue +++ b/demo-web-ui/src/components/ThemePicker/index.vue @@ -1,175 +1,175 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/amap/amap.vue b/demo-web-ui/src/components/amap/amap.vue index c7d643c..2982c62 100644 --- a/demo-web-ui/src/components/amap/amap.vue +++ b/demo-web-ui/src/components/amap/amap.vue @@ -1,224 +1,224 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/flow/flow.vue b/demo-web-ui/src/components/flow/flow.vue index 4b7cabc..24f5a71 100644 --- a/demo-web-ui/src/components/flow/flow.vue +++ b/demo-web-ui/src/components/flow/flow.vue @@ -1,32 +1,32 @@ - - + + diff --git a/demo-web-ui/src/components/flow/flowRecord.vue b/demo-web-ui/src/components/flow/flowRecord.vue index 6cb8c60..b87144b 100644 --- a/demo-web-ui/src/components/flow/flowRecord.vue +++ b/demo-web-ui/src/components/flow/flowRecord.vue @@ -1,130 +1,130 @@ - - - + + + diff --git a/demo-web-ui/src/components/imgCodeRole/index.vue b/demo-web-ui/src/components/imgCodeRole/index.vue index f17b0a9..e46ac5f 100644 --- a/demo-web-ui/src/components/imgCodeRole/index.vue +++ b/demo-web-ui/src/components/imgCodeRole/index.vue @@ -1,147 +1,147 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/pagination/index.vue b/demo-web-ui/src/components/pagination/index.vue index 36f36b3..334a872 100644 --- a/demo-web-ui/src/components/pagination/index.vue +++ b/demo-web-ui/src/components/pagination/index.vue @@ -1,136 +1,136 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/pagination/pageye.vue b/demo-web-ui/src/components/pagination/pageye.vue index e0dc937..44d02f4 100644 --- a/demo-web-ui/src/components/pagination/pageye.vue +++ b/demo-web-ui/src/components/pagination/pageye.vue @@ -1,124 +1,124 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/passwordSafe/index.vue b/demo-web-ui/src/components/passwordSafe/index.vue index 847af1b..c905f50 100644 --- a/demo-web-ui/src/components/passwordSafe/index.vue +++ b/demo-web-ui/src/components/passwordSafe/index.vue @@ -1,70 +1,70 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/tab-search/index.vue b/demo-web-ui/src/components/tab-search/index.vue index 95351ef..178b52e 100644 --- a/demo-web-ui/src/components/tab-search/index.vue +++ b/demo-web-ui/src/components/tab-search/index.vue @@ -1,80 +1,80 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/uploadFile/index.vue b/demo-web-ui/src/components/uploadFile/index.vue index c5619ad..50e5f49 100644 --- a/demo-web-ui/src/components/uploadFile/index.vue +++ b/demo-web-ui/src/components/uploadFile/index.vue @@ -1,118 +1,118 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/uploadFile/upload.vue b/demo-web-ui/src/components/uploadFile/upload.vue index f235f06..8f547d7 100644 --- a/demo-web-ui/src/components/uploadFile/upload.vue +++ b/demo-web-ui/src/components/uploadFile/upload.vue @@ -1,217 +1,217 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/uploadFile/upload_apk.vue b/demo-web-ui/src/components/uploadFile/upload_apk.vue index 3aa8dc8..313dd81 100644 --- a/demo-web-ui/src/components/uploadFile/upload_apk.vue +++ b/demo-web-ui/src/components/uploadFile/upload_apk.vue @@ -1,55 +1,55 @@ - - - + + + diff --git a/demo-web-ui/src/components/uploadFile/upload_frameApk.vue b/demo-web-ui/src/components/uploadFile/upload_frameApk.vue index b379145..0814f45 100644 --- a/demo-web-ui/src/components/uploadFile/upload_frameApk.vue +++ b/demo-web-ui/src/components/uploadFile/upload_frameApk.vue @@ -1,54 +1,54 @@ - - - + + + diff --git a/demo-web-ui/src/components/uploadFile/upload_icon.vue b/demo-web-ui/src/components/uploadFile/upload_icon.vue index b294816..990a80d 100644 --- a/demo-web-ui/src/components/uploadFile/upload_icon.vue +++ b/demo-web-ui/src/components/uploadFile/upload_icon.vue @@ -1,144 +1,144 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/uploadFile/upload_updateApk.vue b/demo-web-ui/src/components/uploadFile/upload_updateApk.vue index 266fa23..964daa0 100644 --- a/demo-web-ui/src/components/uploadFile/upload_updateApk.vue +++ b/demo-web-ui/src/components/uploadFile/upload_updateApk.vue @@ -1,54 +1,54 @@ - - - + + + diff --git a/demo-web-ui/src/components/uploadFileimg/index.vue b/demo-web-ui/src/components/uploadFileimg/index.vue index 25c53d7..6ba463b 100644 --- a/demo-web-ui/src/components/uploadFileimg/index.vue +++ b/demo-web-ui/src/components/uploadFileimg/index.vue @@ -1,104 +1,104 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/components/viewerjs/index.vue b/demo-web-ui/src/components/viewerjs/index.vue index 3d6f841..b6ef83e 100644 --- a/demo-web-ui/src/components/viewerjs/index.vue +++ b/demo-web-ui/src/components/viewerjs/index.vue @@ -1,55 +1,55 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/icons/index.js b/demo-web-ui/src/icons/index.js index 2c6b309..d79e164 100644 --- a/demo-web-ui/src/icons/index.js +++ b/demo-web-ui/src/icons/index.js @@ -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) diff --git a/demo-web-ui/src/icons/svg/Import.svg b/demo-web-ui/src/icons/svg/Import.svg index 184327c..6002009 100644 --- a/demo-web-ui/src/icons/svg/Import.svg +++ b/demo-web-ui/src/icons/svg/Import.svg @@ -1,2 +1,2 @@ -
- - Copyright © {{ year }} 安瑞集团 All Rights Reserved -
- - - - - + + + + + diff --git a/demo-web-ui/src/layout/components/Sidebar/FixiOSBug.js b/demo-web-ui/src/layout/components/Sidebar/FixiOSBug.js index bc14856..4d7ebe1 100644 --- a/demo-web-ui/src/layout/components/Sidebar/FixiOSBug.js +++ b/demo-web-ui/src/layout/components/Sidebar/FixiOSBug.js @@ -1,26 +1,26 @@ -export default { - computed: { - device() { - return this.$store.state.app.device - } - }, - mounted() { - // In order to fix the click on menu on the ios device will trigger the mouseleave bug - // https://github.com/PanJiaChen/vue-element-admin/issues/1135 - this.fixBugIniOS() - }, - methods: { - fixBugIniOS() { - const $subMenu = this.$refs.subMenu - if ($subMenu) { - const handleMouseleave = $subMenu.handleMouseleave - $subMenu.handleMouseleave = (e) => { - if (this.device === 'mobile') { - return - } - handleMouseleave(e) - } - } - } - } -} +export default { + computed: { + device() { + return this.$store.state.app.device + } + }, + mounted() { + // In order to fix the click on menu on the ios device will trigger the mouseleave bug + // https://github.com/PanJiaChen/vue-element-admin/issues/1135 + this.fixBugIniOS() + }, + methods: { + fixBugIniOS() { + const $subMenu = this.$refs.subMenu + if ($subMenu) { + const handleMouseleave = $subMenu.handleMouseleave + $subMenu.handleMouseleave = (e) => { + if (this.device === 'mobile') { + return + } + handleMouseleave(e) + } + } + } + } +} diff --git a/demo-web-ui/src/layout/components/Sidebar/Item.vue b/demo-web-ui/src/layout/components/Sidebar/Item.vue index aa1f5da..24728f8 100644 --- a/demo-web-ui/src/layout/components/Sidebar/Item.vue +++ b/demo-web-ui/src/layout/components/Sidebar/Item.vue @@ -1,41 +1,41 @@ - - - + + + diff --git a/demo-web-ui/src/layout/components/Sidebar/Link.vue b/demo-web-ui/src/layout/components/Sidebar/Link.vue index 530b3d5..d235d10 100644 --- a/demo-web-ui/src/layout/components/Sidebar/Link.vue +++ b/demo-web-ui/src/layout/components/Sidebar/Link.vue @@ -1,43 +1,43 @@ - - - + + + diff --git a/demo-web-ui/src/layout/components/Sidebar/Logo.vue b/demo-web-ui/src/layout/components/Sidebar/Logo.vue index 040fab6..b07addb 100644 --- a/demo-web-ui/src/layout/components/Sidebar/Logo.vue +++ b/demo-web-ui/src/layout/components/Sidebar/Logo.vue @@ -1,82 +1,82 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/layout/components/Sidebar/SidebarItem.vue b/demo-web-ui/src/layout/components/Sidebar/SidebarItem.vue index 9e87f22..eec5e95 100644 --- a/demo-web-ui/src/layout/components/Sidebar/SidebarItem.vue +++ b/demo-web-ui/src/layout/components/Sidebar/SidebarItem.vue @@ -1,97 +1,97 @@ - - - - + + + + diff --git a/demo-web-ui/src/layout/components/Sidebar/index.vue b/demo-web-ui/src/layout/components/Sidebar/index.vue index 9b06d72..3f7a5f2 100644 --- a/demo-web-ui/src/layout/components/Sidebar/index.vue +++ b/demo-web-ui/src/layout/components/Sidebar/index.vue @@ -1,158 +1,148 @@ - - - - + + + + diff --git a/demo-web-ui/src/layout/components/TagsView/ScrollPane.vue b/demo-web-ui/src/layout/components/TagsView/ScrollPane.vue index e8d682b..2e642c3 100644 --- a/demo-web-ui/src/layout/components/TagsView/ScrollPane.vue +++ b/demo-web-ui/src/layout/components/TagsView/ScrollPane.vue @@ -1,87 +1,87 @@ - - - - - \ No newline at end of file diff --git a/demo-web-ui/src/layout/components/TagsView/index.vue b/demo-web-ui/src/layout/components/TagsView/index.vue index 5c3d53e..885e70f 100644 --- a/demo-web-ui/src/layout/components/TagsView/index.vue +++ b/demo-web-ui/src/layout/components/TagsView/index.vue @@ -1,343 +1,343 @@ - - - - - - - + + + + + + + diff --git a/demo-web-ui/src/layout/components/index.js b/demo-web-ui/src/layout/components/index.js index 686faf6..4494217 100644 --- a/demo-web-ui/src/layout/components/index.js +++ b/demo-web-ui/src/layout/components/index.js @@ -1,4 +1,4 @@ -export { default as Navbar } from './Navbar' -export { default as Sidebar } from './Sidebar' -export { default as AppMain } from './AppMain' -export { default as TagsView } from './TagsView/index.vue' +export { default as Navbar } from './Navbar' +export { default as Sidebar } from './Sidebar' +export { default as AppMain } from './AppMain' +export { default as TagsView } from './TagsView/index.vue' diff --git a/demo-web-ui/src/layout/index.vue b/demo-web-ui/src/layout/index.vue index c397f7c..ca0de96 100644 --- a/demo-web-ui/src/layout/index.vue +++ b/demo-web-ui/src/layout/index.vue @@ -1,111 +1,110 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/layout/mixin/ResizeHandler.js b/demo-web-ui/src/layout/mixin/ResizeHandler.js index e8d0df8..b3fc8b2 100644 --- a/demo-web-ui/src/layout/mixin/ResizeHandler.js +++ b/demo-web-ui/src/layout/mixin/ResizeHandler.js @@ -1,45 +1,45 @@ -import store from '@/store' - -const { body } = document -const WIDTH = 992 // refer to Bootstrap's responsive design - -export default { - watch: { - $route(route) { - if (this.device === 'mobile' && this.sidebar.opened) { - store.dispatch('app/closeSideBar', { withoutAnimation: false }) - } - } - }, - beforeMount() { - window.addEventListener('resize', this.$_resizeHandler) - }, - beforeDestroy() { - window.removeEventListener('resize', this.$_resizeHandler) - }, - mounted() { - const isMobile = this.$_isMobile() - if (isMobile) { - store.dispatch('app/toggleDevice', 'mobile') - store.dispatch('app/closeSideBar', { withoutAnimation: true }) - } - }, - methods: { - // use $_ for mixins properties - // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential - $_isMobile() { - const rect = body.getBoundingClientRect() - return rect.width - 1 < WIDTH - }, - $_resizeHandler() { - if (!document.hidden) { - const isMobile = this.$_isMobile() - store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') - - if (isMobile) { - store.dispatch('app/closeSideBar', { withoutAnimation: true }) - } - } - } - } -} +import store from '@/store' + +const { body } = document +const WIDTH = 992 // refer to Bootstrap's responsive design + +export default { + watch: { + $route(route) { + if (this.device === 'mobile' && this.sidebar.opened) { + store.dispatch('app/closeSideBar', { withoutAnimation: false }) + } + } + }, + beforeMount() { + window.addEventListener('resize', this.$_resizeHandler) + }, + beforeDestroy() { + window.removeEventListener('resize', this.$_resizeHandler) + }, + mounted() { + const isMobile = this.$_isMobile() + if (isMobile) { + store.dispatch('app/toggleDevice', 'mobile') + store.dispatch('app/closeSideBar', { withoutAnimation: true }) + } + }, + methods: { + // use $_ for mixins properties + // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential + $_isMobile() { + const rect = body.getBoundingClientRect() + return rect.width - 1 < WIDTH + }, + $_resizeHandler() { + if (!document.hidden) { + const isMobile = this.$_isMobile() + store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop') + + if (isMobile) { + store.dispatch('app/closeSideBar', { withoutAnimation: true }) + } + } + } + } +} diff --git a/demo-web-ui/src/main.js b/demo-web-ui/src/main.js index b3d0a73..946884d 100644 --- a/demo-web-ui/src/main.js +++ b/demo-web-ui/src/main.js @@ -1,78 +1,78 @@ -import 'babel-polyfill' -import Vue from 'vue' -import 'normalize.css/normalize.css' // A modern alternative to CSS resets - -import ElementUI from 'element-ui' -import 'element-ui/lib/theme-chalk/index.css' - -Vue.use(ElementUI) - -import '@/styles/index.scss' // global css - -import App from './App' -import store from './store' -import router from './router' - -import '@/icons' // icon -//import '@/permission' //权限控制 - -Vue.prototype.$userInfo = null // 用户信息 -Vue.prototype.msgSuccess = function (msg) { - alert(msg); -} - -// 全局自定义组件 -import Pagination from '@/components/pagination/index.vue' - -Vue.component("Pagination", Pagination) -import tabsearch from '@/components/tab-search/index.vue' - -Vue.component("tab-search", tabsearch) -import eimage from "@/components/E-image/index.vue" - -Vue.component("eimage", eimage); - -// 全局组件挂载 -Vue.component('Pagination', Pagination) - -import Print from '@/utils/print' // 引入附件的js文件 -Vue.use(Print) // 注册 - -import {setStorage, getStorage} from "./utils/auth.js" - -let token = null; -token = GetQueryString("token") - -//if (token) { -//setStorage(token) -//let href = window.location.href; -//href = href.split(`token=${token}`)[0]; -//window.location.href = href.slice(0, href.length - 1); -//} - -function GetQueryString(name) { - var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); - var r = window.location.search.substr(1).match(reg); - if (r != null) return unescape(r[2]); - return null; -} - -import VueAMap from 'vue-amap' - -Vue.use(VueAMap) -VueAMap.initAMapApiLoader({ - key: 'ccda12d8bffc72e9f1a32c599323a876',//此处的key,在高德开放平台申请 - plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'],//此处的插件按需添加 - v: '1.4.4', - uiVersion: '1.0' -}) - -Vue.config.productionTip = false - -new Vue({ - el: '#app', - router, - store, - render: h => h(App) -}) - +import 'babel-polyfill' +import Vue from 'vue' +import 'normalize.css/normalize.css' // A modern alternative to CSS resets + +import ElementUI from 'element-ui' +import 'element-ui/lib/theme-chalk/index.css' + +Vue.use(ElementUI) + +import '@/styles/index.scss' // global css + +import App from './App' +import store from './store' +import router from './router' + +import '@/icons' // icon +//import '@/permission' //权限控制 + +Vue.prototype.$userInfo = null // 用户信息 +Vue.prototype.msgSuccess = function (msg) { + alert(msg); +} + +// 全局自定义组件 +import Pagination from '@/components/pagination/index.vue' + +Vue.component("Pagination", Pagination) +import tabsearch from '@/components/tab-search/index.vue' + +Vue.component("tab-search", tabsearch) +import eimage from "@/components/E-image/index.vue" + +Vue.component("eimage", eimage); + +// 全局组件挂载 +Vue.component('Pagination', Pagination) + +import Print from '@/utils/print' // 引入附件的js文件 +Vue.use(Print) // 注册 + +import {setStorage, getStorage} from "./utils/auth.js" + +let token = null; +token = GetQueryString("token") + +//if (token) { +//setStorage(token) +//let href = window.location.href; +//href = href.split(`token=${token}`)[0]; +//window.location.href = href.slice(0, href.length - 1); +//} + +function GetQueryString(name) { + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); + var r = window.location.search.substr(1).match(reg); + if (r != null) return unescape(r[2]); + return null; +} + +import VueAMap from 'vue-amap' + +Vue.use(VueAMap) +VueAMap.initAMapApiLoader({ + key: 'ccda12d8bffc72e9f1a32c599323a876',//此处的key,在高德开放平台申请 + plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'],//此处的插件按需添加 + v: '1.4.4', + uiVersion: '1.0' +}) + +Vue.config.productionTip = false + +new Vue({ + el: '#app', + router, + store, + render: h => h(App) +}) + diff --git a/demo-web-ui/src/permission.js b/demo-web-ui/src/permission.js index 6f38310..31032f5 100644 --- a/demo-web-ui/src/permission.js +++ b/demo-web-ui/src/permission.js @@ -1,53 +1,53 @@ -import router from './router' -import store from './store' -// import { Message } from 'element-ui' -// import Vue from 'vue' -import NProgress from 'nprogress' // progress bar -import 'nprogress/nprogress.css' // progress bar style -import getPageTitle from '@/utils/get-page-title' -NProgress.configure({ showSpinner: false }) // NProgress Configuration - -import { getStorage } from '@/utils/auth' // get token from cookie -import { getRoleRouter } from '@/router/modules/components.js' - -const whiteList = ['/login', '/registUser', '/registOrg'] // no redirect whitelist - -router.beforeEach(async(to, from, next) => { - // start progress bar - NProgress.start() - - // set page title - document.title = getPageTitle(to.meta.title) - - // determine whether the user has logged in -//const hasToken = getStorage() - const hasToken = window.sessionStorage.getItem('token') - console.log(hasToken) - if (hasToken) { - const userInfo = store.getters.userInfo - if (userInfo) { - console.log('有 userInfo') - console.log(to) - next() - NProgress.done() - } else { - console.log('无 userInfo') - await store.dispatch('user/getInfo') - let userRoles = await getRoleRouter(store.getters.userInfo.userSid) - console.log("userRoles",userRoles) - router.options.routes = userRoles - router.addRoutes(userRoles) // 动态添加可访问路由表 - console.log(to) - next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: - } - } else { - console.log('222') - window.location.href = process.env.VUE_APP_URL - } - -}) - -router.afterEach(() => { - // finish progress bar - NProgress.done() -}) +import router from './router' +import store from './store' +// import { Message } from 'element-ui' +// import Vue from 'vue' +import NProgress from 'nprogress' // progress bar +import 'nprogress/nprogress.css' // progress bar style +import getPageTitle from '@/utils/get-page-title' +NProgress.configure({ showSpinner: false }) // NProgress Configuration + +import { getStorage } from '@/utils/auth' // get token from cookie +import { getRoleRouter } from '@/router/modules/components.js' + +const whiteList = ['/login', '/registUser', '/registOrg'] // no redirect whitelist + +router.beforeEach(async(to, from, next) => { + // start progress bar + NProgress.start() + + // set page title + document.title = getPageTitle(to.meta.title) + + // determine whether the user has logged in +//const hasToken = getStorage() + const hasToken = window.sessionStorage.getItem('token') + console.log(hasToken) + if (hasToken) { + const userInfo = store.getters.userInfo + if (userInfo) { + console.log('有 userInfo') + console.log(to) + next() + NProgress.done() + } else { + console.log('无 userInfo') + await store.dispatch('user/getInfo') + let userRoles = await getRoleRouter(store.getters.userInfo.userSid) + console.log("userRoles",userRoles) + router.options.routes = userRoles + router.addRoutes(userRoles) // 动态添加可访问路由表 + console.log(to) + next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: + } + } else { + console.log('222') + window.location.href = process.env.VUE_APP_URL + } + +}) + +router.afterEach(() => { + // finish progress bar + NProgress.done() +}) diff --git a/demo-web-ui/src/router/index.js b/demo-web-ui/src/router/index.js index 37a1673..f0aea97 100644 --- a/demo-web-ui/src/router/index.js +++ b/demo-web-ui/src/router/index.js @@ -1,352 +1,475 @@ -import Vue from 'vue' -import Router from 'vue-router' -/* Layout */ -import Layout from '@/layout' - -Vue.use(Router) - -/* 所有角色可以访问/没有权限要求的基页 */ - -export const constantRoutes = [ - { - path: '/redirect', - component: Layout, - hidden: true, - children: [{ - path: '/redirect/:path(.*)', - component: () => import('@/views/redirect/index.vue') - }] - }, - { - path: '/', - redirect: 'login' - }, - { - path: '/login', - component: () => import('@/views/login/login.vue') - }, - { - path: '/home', - component: () => import('@/views/Home/Home.vue'), - name: 'home' - - }, - { - path: '/index', - component: Layout, - redirect: '/index', - children: [{ - path: '/index', - component: () => - import('@/views/index.vue'), - name: 'index', - meta: { - title: '主页', - noCache: true, - affix: true - } - }] - }, { - path: '/region', - component: Layout, - redirect: '/region', - children: [{ - path: '/region', - component: () => - import('@/views/region/region.vue'), - name: 'region', - meta: { - title: '区域管理' - } - }] - }, { - path: '/userManage', - component: Layout, - redirect: '/userManage', - children: [{ - path: '/userManage', - component: () => - import('@/views/userManage/userManage.vue'), - name: 'userManage', - meta: { - title: '用户管理' - } - }] - }, { - path: '/RoleAdminister', - component: Layout, - redirect: '/RoleAdminister', - children: [{ - path: '/RoleAdminister', - component: () => - import('@/views/RoleAdminister/RoleAdminister.vue'), - name: 'RoleAdminister', - meta: { - title: '角色管理' - } - }] - }, { - path: '/postManage', - component: Layout, - redirect: '/postManage', - children: [{ - path: '/postManage', - component: () => - import('@/views/postManage/postManage.vue'), - name: 'postManage', - meta: { - title: '岗位管理' - } - }] - }, { - path: '/functional', - component: Layout, - redirect: '/functional', - children: [{ - path: '/functional', - component: () => - import('@/views/functional/functional.vue'), - name: 'functional', - meta: { - title: '功能管理' - } - }] - }, { - path: '/sourceManage', - component: Layout, - redirect: '/sourceManage', - children: [{ - path: '/sourceManage', - component: () => - import('@/views/sourceManage/sourceManage.vue'), - name: 'sourceManage', - meta: { - title: '资源管理' - } - }] - }, { - path: '/menuManage', - component: Layout, - redirect: '/menuManage', - children: [{ - path: '/menuManage', - component: () => import('@/views/menuManage/menuManage.vue'), - name: 'menuManage', - meta: { - title: '菜单管理' - } - }] - }, - { - path: '/mobileterminal', - component: Layout, - redirect: '/mobileterminal', - children: [{ - path: '/mobileterminal', - component: () => import('@/views/mobileterminal/mobileterminal.vue'), - name: 'mobileterminal', - meta: { - title: '移动端管理' - } - }] - }, - { - path: '/personalization', - component: Layout, - redirect: '/personalization', - children: [{ - path: '/personalization', - component: () => import('@/views/personalization/personalization.vue'), - name: 'personalization', - meta: { - title: '个性化设置' - } - }] - }, - { - path: '/copyofprocess', - component: Layout, - redirect: '/copyofprocess', - children: [{ - path: '/copyofprocess', - component: () => import('@/views/copyofprocess/liuchengchasongguanli'), - name: 'mobileterminal', - meta: { - title: '流程抄送' - } - }] - }, - { - path: '/dictManage', - component: Layout, - redirect: '/dictManage', - children: [{ - path: '/dictManage', - component: () => import('@/views/dictManage/dictManage.vue'), - name: 'dictManage', - meta: { - title: '数据字典' - } - }] - }, - { - path: '/logManage', - component: Layout, - redirect: '/logManage', - children: [{ - path: '/logManage', - component: () => - import('@/views/logManage/logManage.vue'), - name: 'logManage', - meta: { - title: '日志管理' - } - }] - }, { - path: '/PwdModify', - component: Layout, - redirect: '/PwdModify', - children: [{ - path: '/PwdModify', - component: () => import('@/views/PwdModify/PwdModify.vue'), - name: 'PwdModify', - meta: { - title: '修改密码' - } - }] - }, { - path: '/organizationManage', - component: Layout, - redirect: '/organizationManage', - children: [{ - path: '/organizationManage', - component: () => - import('@/views/organizationManage/organizationManage.vue'), - name: 'organizationManage', - meta: { - title: '组织管理' - } - }] - }, - // 工作流 - { - path: '/workflow', - component: Layout, - redirect: '/workflow', - meta: { - title: '工作流' - }, - children: [ - { - path: '/workflow/definition', - component: () => - import('@/views/workflow/definition/definition.vue'), - name: 'definition', - meta: { - title: '流程定义' - } - }, - { - path: '/workflow/form', - component: () => - import('@/views/workflow/form/form.vue'), - name: 'form', - meta: { - title: '表单配置' - } - } - ] - }, - { - path: '/datamapping', - component: Layout, - redirect: '/datamapping', - children: [{ - path: '/datamapping', - component: () => import('@/views/datamapping/shujuyingshe.vue'), - name: 'shujuyingshe', - meta: { title: '数据映射', noCache: true } - }] - }, - // { - // path: '/workflow', - // component: Layout, - // redirect: '/workflow/index', - // children: [{ - // path: '/workflow/index', - // component: () => - // import('@/views/workflow/index.vue'), - // name: 'WorkflowIndex', - // meta: { - // title: '工作流' - // } - // }] - // }, - { - path: '/todo', - component: () => import('@/views/flow/todoList.vue') - }, - { - path: '/done', - component: () => import('@/views/flow/doneList.vue') - }, - { - path: '/toberead', - component: () => import('@/views/flow/tobereadList.vue') - }, - { - path: '/haveread', - component: () => import('@/views/flow/havereadList.vue') - }, - -// { -// path: '/', -// component: Layout, -// redirect: 'dictCommon', -// children: [{ -// path: 'dictCommon', -// component: () => -// import('@/views/system-admin/dictCommon.vue'), -// name: 'dictCommon', -// meta: { -// title: '数据字典值' -// } -// }] -// }, - { - path: '/404', - component: () => - import('@/views/404'), - hidden: true - }, - { - path: '/flow/flowRecordForBusiness', - component: () => import('@/views/flow/flowRecordForBusiness'), - name: 'flowRecordForBusiness' - }/*, - { - path: '/portal/flow/flowRecord', - component: ()=> import('@/views/flow/flowRecord'), - name: 'flowRecord' - }*/ - // 404 page must be placed at the end !!! - // { path: '*', redirect: '/404', hidden: true } -] - -// import componentsRouter from '@/router/modules/components' - -const createRouter = () => new Router({ - // mode: 'history', // require service support - scrollBehavior: () => ({y: 0}), - routes: constantRoutes -}) - -const router = createRouter() - -// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 -export function resetRouter() { - const newRouter = createRouter() - router.matcher = newRouter.matcher // reset router -} - -export default router +import Vue from 'vue' +import Router from 'vue-router' +/* Layout */ +import Layout from '@/layout' + +Vue.use(Router) + +/* 所有角色可以访问/没有权限要求的基页 */ + +export const constantRoutes = [ + { + path: '/redirect', + component: Layout, + hidden: true, + children: [{ + path: '/redirect/:path(.*)', + component: () => import('@/views/redirect/index.vue') + }] + }, + { + path: '/', + redirect: 'login' + }, + { + path: '/reg', + component: () => import("@/views/regist/User.vue") + }, + { + path: '/login', + component: () => import('@/views/login/login.vue') + }, + { + path: '/index', + component: Layout, + redirect: '/index', + children: [ + { + path: '/index', + component: () => + import('@/views/index.vue'), + meta: { + title: '主页', + noCache: true, + affix: true + } + }, + { + path: '/userManage', + component: () => + import('@/views/userManage/userManage.vue'), + meta: { + title: '用户管理' + } + }, + { + path: '/region', + component: () => + import('@/views/region/region.vue'), + meta: { + title: '自主学习计划管理' + } + }, + { + path: '/RoleAdminister', + component: () => import('@/views/RoleAdminister/RoleAdminister.vue'), + meta: { + title: '角色管理' + } + }, + { + path: '/postManage', + component: () => + import('@/views/postManage/postManage.vue'), + meta: { + title: '自主学习计划进度管理' + } + }, + { + path: '/guideManage', + component: () => + import('@/views/guideManage/guideManage.vue'), + meta: { + title: '指导任务管理' + } + }, + { + path: '/functional', + component: () => + import('@/views/functional/functional.vue'), + meta: { + title: '成绩设置' + } + }, + { + path: '/sourceManage', + component: () => + import('@/views/sourceManage/sourceManage.vue'), + meta: { + title: '自学资源管理' + } + }, + { + path: '/menuManage', + component: () => import('@/views/menuManage/menuManage.vue'), + meta: { + title: '菜单管理' + } + }, + { + path: '/mobileterminal', + component: () => import('@/views/mobileterminal/mobileterminal.vue'), + meta: { + title: '移动端管理' + } + }, + { + path: '/personalization', + component: () => import('@/views/personalization/personalization.vue'), + meta: { + title: '公告管理' + } + }, + { + path: '/copyofprocess', + component: () => import('@/views/copyofprocess/liuchengchasongguanli'), + meta: { + title: '论坛管理' + } + }, + { + path: '/dictManage', + component: () => import('@/views/dictManage/dictManage.vue'), + meta: { + title: '数据字典管理' + } + }, + { + path: '/logManage', + component: () => + import('@/views/logManage/logManage.vue'), + meta: { + title: '统计信息管理' + } + }, + { + path: '/PwdModify', + component: () => import('@/views/PwdModify/PwdModify.vue'), + meta: { + title: '账户信息管理' + } + }, + { + path: '/organizationManage', + component: () => + import('@/views/organizationManage/organizationManage.vue'), + meta: { + title: '论坛交流' + } + }, + { + path: '/datamapping', + component: () => import('@/views/datamapping/shujuyingshe.vue'), + meta: { title: '自主学习计划制定指导', noCache: true } + }, + { + path: '/organizationManage', + component: () => + import('@/views/organizationManage/organizationManage.vue'), + meta: { + title: '自主学习计划实施指导' + } + } + ] + }, { + path: '/region', + component: Layout, + redirect: '/region', + children: [{ + path: '/region', + component: () => + import('@/views/region/region.vue'), + name: 'region', + meta: { + title: '区域管理' + } + }] + }, { + path: '/userManage', + component: Layout, + redirect: '/userManage', + children: [{ + path: '/userManage', + component: () => + import('@/views/userManage/userManage.vue'), + name: 'userManage', + meta: { + title: '用户管理' + } + }] + }, { + path: '/RoleAdminister', + component: Layout, + redirect: '/RoleAdminister', + children: [{ + path: '/RoleAdminister', + component: () => import('@/views/RoleAdminister/RoleAdminister.vue'), name: 'RoleAdminister', + meta: { + title: '角色管理' + } + }] + }, { + path: '/postManage', + component: Layout, + redirect: '/postManage', + children: [{ + path: '/postManage', + component: () => + import('@/views/postManage/postManage.vue'), + name: 'postManage', + meta: { + title: '岗位管理' + } + }] + }, { + path: '/functional', + component: Layout, + redirect: '/functional', + children: [{ + path: '/functional', + component: () => + import('@/views/functional/functional.vue'), + name: 'functional', + meta: { + title: '功能管理' + } + }] + }, { + path: '/sourceManage', + component: Layout, + redirect: '/sourceManage', + children: [{ + path: '/sourceManage', + component: () => + import('@/views/sourceManage/sourceManage.vue'), + name: 'sourceManage', + meta: { + title: '自学资源管理' + } + }] + }, { + path: '/menuManage', + component: Layout, + redirect: '/menuManage', + children: [{ + path: '/menuManage', + component: () => import('@/views/menuManage/menuManage.vue'), + name: 'menuManage', + meta: { + title: '菜单管理' + } + }] + }, + { + path: '/mobileterminal', + component: Layout, + redirect: '/mobileterminal', + children: [{ + path: '/mobileterminal', + component: () => import('@/views/mobileterminal/mobileterminal.vue'), + name: 'mobileterminal', + meta: { + title: '移动端管理' + } + }] + }, + { + path: '/personalization', + component: Layout, + redirect: '/personalization', + children: [{ + path: '/personalization', + component: () => import('@/views/personalization/personalization.vue'), + name: 'personalization', + meta: { + title: '个性化设置' + } + }] + }, + { + path: '/copyofprocess', + component: Layout, + redirect: '/copyofprocess', + children: [{ + path: '/copyofprocess', + component: () => import('@/views/copyofprocess/liuchengchasongguanli'), + name: 'mobileterminal', + meta: { + title: '流程抄送' + } + }] + }, + { + path: '/dictManage', + component: Layout, + redirect: '/dictManage', + children: [{ + path: '/dictManage', + component: () => import('@/views/dictManage/dictManage.vue'), + name: 'dictManage', + meta: { + title: '数据字典' + } + }] + }, + { + path: '/logManage', + component: Layout, + redirect: '/logManage', + children: [{ + path: '/logManage', + component: () => + import('@/views/logManage/logManage.vue'), + name: 'logManage', + meta: { + title: '日志管理' + } + }] + }, { + path: '/PwdModify', + component: Layout, + redirect: '/PwdModify', + children: [{ + path: '/PwdModify', + component: () => import('@/views/PwdModify/PwdModify.vue'), + name: 'PwdModify', + meta: { + title: '修改密码' + } + }] + }, { + path: '/organizationManage', + component: Layout, + redirect: '/organizationManage', + children: [{ + path: '/organizationManage', + component: () => + import('@/views/organizationManage/organizationManage.vue'), + name: 'organizationManage', + meta: { + title: '组织管理' + } + }] + }, + // 工作流 + { + path: '/workflow', + component: Layout, + redirect: '/workflow', + meta: { + title: '用户管理' + }, + children: [ + { + path: '/workflow/definition', + component: () => + import('@/views/workflow/definition/definition.vue'), + name: 'definition', + meta: { + title: '学生信息' + } + }, + { + path: '/workflow/form', + component: () => + import('@/views/workflow/form/form.vue'), + name: 'form', + meta: { + title: '教师信息' + } + } + ] + }, + { + path: '/datamapping', + component: Layout, + redirect: '/datamapping', + children: [{ + path: '/datamapping', + component: () => import('@/views/datamapping/shujuyingshe.vue'), + name: 'shujuyingshe', + meta: { title: '数据映射', noCache: true } + }] + }, + // { + // path: '/workflow', + // component: Layout, + // redirect: '/workflow/index', + // children: [{ + // path: '/workflow/index', + // component: () => + // import('@/views/workflow/index.vue'), + // name: 'WorkflowIndex', + // meta: { + // title: '工作流' + // } + // }] + // }, + { + path: '/todo', + component: () => import('@/views/flow/todoList.vue') + }, + { + path: '/done', + component: () => import('@/views/flow/doneList.vue') + }, + { + path: '/toberead', + component: () => import('@/views/flow/tobereadList.vue') + }, + { + path: '/haveread', + component: () => import('@/views/flow/havereadList.vue') + }, + + // { + // path: '/', + // component: Layout, + // redirect: 'dictCommon', + // children: [{ + // path: 'dictCommon', + // component: () => + // import('@/views/system-admin/dictCommon.vue'), + // name: 'dictCommon', + // meta: { + // title: '数据字典值' + // } + // }] + // }, + { + path: '/404', + component: () => + import('@/views/404'), + hidden: true + }, + { + path: '/flow/flowRecordForBusiness', + component: () => import('@/views/flow/flowRecordForBusiness'), + name: 'flowRecordForBusiness' + }/*, + { + path: '/portal/flow/flowRecord', + component: ()=> import('@/views/flow/flowRecord'), + name: 'flowRecord' + }*/ + // 404 page must be placed at the end !!! + // { path: '*', redirect: '/404', hidden: true } +] + +// import componentsRouter from '@/router/modules/components' + +const createRouter = () => new Router({ + // mode: 'history', // require service support + scrollBehavior: () => ({ y: 0 }), + routes: constantRoutes +}) + +const router = createRouter() + +// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 +export function resetRouter() { + const newRouter = createRouter() + router.matcher = newRouter.matcher // reset router +} + +export default router diff --git a/demo-web-ui/src/router/modules/components - 副本 (2).js b/demo-web-ui/src/router/modules/components - 副本 (2).js index 0c9a57e..ee6e57c 100644 --- a/demo-web-ui/src/router/modules/components - 副本 (2).js +++ b/demo-web-ui/src/router/modules/components - 副本 (2).js @@ -1,206 +1,206 @@ -import Layout from '@/layout' - -const componentsRouter = [ - { - path: '/system_admin', - component: Layout, - children: [ - { - path: 'checkCompany', - name: 'checkCompany', - component: () => import('@/views/system-admin/check/company.vue'), - meta: { title: '单位注册审核', icon: 'el-icon-tickets' } - } - ] - }, - { - path: '/system_admin', - component: Layout, - children: [ - { - path: 'checkPeople', - name: 'checkPeople', - component: () => import('@/views/system-admin/check/people.vue'), - meta: { title: '个人注册审核', icon: 'el-icon-tickets' } - } - ] - }, - - { - path: '/system_admin', - component: Layout, - children: [ - { - path: 'checkPersonnel', - name: 'checkPersonnel', - component: () => import('@/views/system-admin/check/personnel.vue'), - meta: { title: '人员绑定审核', icon: 'el-icon-tickets' } - } - ] - }, - { - path: '/system_admin', - component: Layout, - children: [ - { - path: '/system_admin/orgsetup', - name: 'orgsetup', - component: () => import('@/views/system-admin/orgsetup/index.vue'), - meta: { title: '内部机构设置', icon: 'el-icon-office-building' } - } - ] - }, - { - path: '/system_admin', - component: Layout, - children: [ - { - path: '/system_admin/user', - name: 'user', - component: () => import('@/views/system-admin/user.vue'), - meta: { title: '用户管理', icon: 'el-icon-user' } - } - ] - }, - { - path: '/system_admin', - component: Layout, - children: [ - { - path: '/system_admin/role', - name: 'role', - component: () => import('@/views/system-admin/role.vue'), - meta: { title: '角色管理', icon: 'el-icon-s-custom' } - } - ] - }, - { - path: '/system_admin', - component: Layout, - children: [ - { - path: '/system_admin/resource', - name: 'resource', - component: () => import('@/views/system-admin/resource.vue'), - meta: { title: '资源管理', icon: 'el-icon-s-platform' } - } - ] - }, - { - path: '/system_admin', - component: Layout, - children: [ - { - path: '/system_admin/diclist', - name: 'diclist', - component: () => import('@/views/system-admin/diclist.vue'), - meta: { title: '数据字典', icon: 'el-icon-data-analysis' } - } - ] - }, - { - path: '/system_admin', - component: Layout, - children: [ - { - path: '/system_admin/log', - name: 'log', - component: () => import('@/views/system-admin/log.vue'), - meta: { title: '日志管理', icon: 'el-icon-menu', } - } - ] - }, - { - path: '/system_admin', - component: Layout, - children: [ - { - path: '/system_admin/changepwd', - name: 'changepwd', - component: () => import('@/views/system-admin/changepwd.vue'), - meta: { title: '修改密码', icon: 'el-icon-setting' } - } - ] - }, - -]; - -// // 单位信息管理 -// { -// path: '/areaAdmin/CompanyInfo', -// component: Layout, -// redirect: '/areaAdmin/CompanyInfo/jlxzjg', -// name: 'CompanyInfo', -// meta: { title: '单位信息管理', icon: 'el-icon-s-help' }, -// children: [ -// { -// path: 'jlxzjg', -// name: 'jlxzjg', -// component: () => import('@/views/basic-info/areaAdmin/CompanyInfo/jlxzjg.vue'), -// meta: { title: '计量行政机关', icon: 'table' } -// }, -// { -// path: 'jljsjg', -// name: 'jljsjg', -// component: () => import('@/views/basic-info/areaAdmin/CompanyInfo/jljsjg.vue'), -// meta: { title: '计量技术机构', icon: 'tree' } -// } -// ] -// }, - // // 人员信息管理 - // { - // path: '/areaAdmin/PersonalInfo', - // component: Layout, - // redirect: '/areaAdmin/PersonalInfo', - // name: 'PersonalInfo', - // meta: { title: '人员信息管理(单位)', icon: 'el-icon-s-help' }, - // children: [ - // { - // path: 'xzjgry', - // name: 'xzjgry', - // component: () => import('@/views/basic-info/areaAdmin/PersonalInfo/xzjgry.vue'), - // meta: { title: '行政机关人员', icon: 'table' } - // }, - // { - // path: 'jsjgry', - // name: 'jsjgry', - // component: () => import('@/views/basic-info/areaAdmin/PersonalInfo/jsjgry.vue'), - // meta: { title: '技术机构人员', icon: 'tree' } - // }, - // { - // path: 'swdwry', - // name: 'swdwry', - // component: () => import('@/views/basic-info/areaAdmin/PersonalInfo/swdwry.vue'), - // meta: { title: '尚无单位人员', icon: 'tree' } - // } - // ] - // }, - // // 人员信息管理 - // { - // path: '/people/PersonalInfo', - // component: Layout, - // redirect: '/people/PersonalInfo', - // name: 'PersonalInfo', - // meta: { title: '人员信息管理(个人)', icon: 'el-icon-s-help' }, - // children: [ - // { - // path: 'xzjgry', - // name: 'xzjgry', - // component: () => import('@/views/basic-info/people/index.vue'), - // meta: { title: '行政机关人员', icon: 'table' } - // }, - // { - // path: 'jsjgry', - // name: 'jsjgry', - // component: () => import('@/views/basic-info/people/index.vue'), - // meta: { title: '技术机构人员', icon: 'tree' } - // }, - // { - // path: 'swdwry', - // name: 'swdwry', - // component: () => import('@/views/basic-info/people/notCompany.vue'), - // meta: { title: '尚无单位人员', icon: 'tree' } - // } - // ] - // }, -export default componentsRouter +import Layout from '@/layout' + +const componentsRouter = [ + { + path: '/system_admin', + component: Layout, + children: [ + { + path: 'checkCompany', + name: 'checkCompany', + component: () => import('@/views/system-admin/check/company.vue'), + meta: { title: '单位注册审核', icon: 'el-icon-tickets' } + } + ] + }, + { + path: '/system_admin', + component: Layout, + children: [ + { + path: 'checkPeople', + name: 'checkPeople', + component: () => import('@/views/system-admin/check/people.vue'), + meta: { title: '个人注册审核', icon: 'el-icon-tickets' } + } + ] + }, + + { + path: '/system_admin', + component: Layout, + children: [ + { + path: 'checkPersonnel', + name: 'checkPersonnel', + component: () => import('@/views/system-admin/check/personnel.vue'), + meta: { title: '人员绑定审核', icon: 'el-icon-tickets' } + } + ] + }, + { + path: '/system_admin', + component: Layout, + children: [ + { + path: '/system_admin/orgsetup', + name: 'orgsetup', + component: () => import('@/views/system-admin/orgsetup/index.vue'), + meta: { title: '内部机构设置', icon: 'el-icon-office-building' } + } + ] + }, + { + path: '/system_admin', + component: Layout, + children: [ + { + path: '/system_admin/user', + name: 'user', + component: () => import('@/views/system-admin/user.vue'), + meta: { title: '用户管理', icon: 'el-icon-user' } + } + ] + }, + { + path: '/system_admin', + component: Layout, + children: [ + { + path: '/system_admin/role', + name: 'role', + component: () => import('@/views/system-admin/role.vue'), + meta: { title: '角色管理', icon: 'el-icon-s-custom' } + } + ] + }, + { + path: '/system_admin', + component: Layout, + children: [ + { + path: '/system_admin/resource', + name: 'resource', + component: () => import('@/views/system-admin/resource.vue'), + meta: { title: '资源管理', icon: 'el-icon-s-platform' } + } + ] + }, + { + path: '/system_admin', + component: Layout, + children: [ + { + path: '/system_admin/diclist', + name: 'diclist', + component: () => import('@/views/system-admin/diclist.vue'), + meta: { title: '数据字典', icon: 'el-icon-data-analysis' } + } + ] + }, + { + path: '/system_admin', + component: Layout, + children: [ + { + path: '/system_admin/log', + name: 'log', + component: () => import('@/views/system-admin/log.vue'), + meta: { title: '日志管理', icon: 'el-icon-menu', } + } + ] + }, + { + path: '/system_admin', + component: Layout, + children: [ + { + path: '/system_admin/changepwd', + name: 'changepwd', + component: () => import('@/views/system-admin/changepwd.vue'), + meta: { title: '修改密码', icon: 'el-icon-setting' } + } + ] + }, + +]; + +// // 单位信息管理 +// { +// path: '/areaAdmin/CompanyInfo', +// component: Layout, +// redirect: '/areaAdmin/CompanyInfo/jlxzjg', +// name: 'CompanyInfo', +// meta: { title: '单位信息管理', icon: 'el-icon-s-help' }, +// children: [ +// { +// path: 'jlxzjg', +// name: 'jlxzjg', +// component: () => import('@/views/basic-info/areaAdmin/CompanyInfo/jlxzjg.vue'), +// meta: { title: '计量行政机关', icon: 'table' } +// }, +// { +// path: 'jljsjg', +// name: 'jljsjg', +// component: () => import('@/views/basic-info/areaAdmin/CompanyInfo/jljsjg.vue'), +// meta: { title: '计量技术机构', icon: 'tree' } +// } +// ] +// }, + // // 人员信息管理 + // { + // path: '/areaAdmin/PersonalInfo', + // component: Layout, + // redirect: '/areaAdmin/PersonalInfo', + // name: 'PersonalInfo', + // meta: { title: '人员信息管理(单位)', icon: 'el-icon-s-help' }, + // children: [ + // { + // path: 'xzjgry', + // name: 'xzjgry', + // component: () => import('@/views/basic-info/areaAdmin/PersonalInfo/xzjgry.vue'), + // meta: { title: '行政机关人员', icon: 'table' } + // }, + // { + // path: 'jsjgry', + // name: 'jsjgry', + // component: () => import('@/views/basic-info/areaAdmin/PersonalInfo/jsjgry.vue'), + // meta: { title: '技术机构人员', icon: 'tree' } + // }, + // { + // path: 'swdwry', + // name: 'swdwry', + // component: () => import('@/views/basic-info/areaAdmin/PersonalInfo/swdwry.vue'), + // meta: { title: '尚无单位人员', icon: 'tree' } + // } + // ] + // }, + // // 人员信息管理 + // { + // path: '/people/PersonalInfo', + // component: Layout, + // redirect: '/people/PersonalInfo', + // name: 'PersonalInfo', + // meta: { title: '人员信息管理(个人)', icon: 'el-icon-s-help' }, + // children: [ + // { + // path: 'xzjgry', + // name: 'xzjgry', + // component: () => import('@/views/basic-info/people/index.vue'), + // meta: { title: '行政机关人员', icon: 'table' } + // }, + // { + // path: 'jsjgry', + // name: 'jsjgry', + // component: () => import('@/views/basic-info/people/index.vue'), + // meta: { title: '技术机构人员', icon: 'tree' } + // }, + // { + // path: 'swdwry', + // name: 'swdwry', + // component: () => import('@/views/basic-info/people/notCompany.vue'), + // meta: { title: '尚无单位人员', icon: 'tree' } + // } + // ] + // }, +export default componentsRouter diff --git a/demo-web-ui/src/router/modules/components.js b/demo-web-ui/src/router/modules/components.js index d00d8e9..be2f6a0 100644 --- a/demo-web-ui/src/router/modules/components.js +++ b/demo-web-ui/src/router/modules/components.js @@ -1,56 +1,56 @@ -const Layout = () => import('@/layout') -/* 权限路由 */ -//const orgRegCheck = () => import('@/views/system-admin/check/company.vue') // 单位注册审核 -//const personRegCheck = () => import('@/views/system-admin/check/people.vue') // 个人注册审核 -//const personJoinCheck = () => import('@/views/system-admin/check/personnel.vue') // 人员绑定审核 -//const deptManage = () => import('@/views/system-admin/orgsetup/index.vue') // 内部机构设置 -const region = () => import('@/views/region/region.vue') // 区域管理 -const userManage = () => import('@/views/userManage/userManage.vue') // 用户管理 -const roleManage = () => import('@/views/system-admin/role.vue') // 角色管理 -const sourceManage = () => import('@/views/sourceManage/sourceManage.vue') // 资源管理 - -const menuManage = () => import('@/views/menuManage/menuManage.vue') // 菜单管理 - -const dictManage = () => import('@/views/dictManage/dictManage.vue') // 数据字典 -const logManage = () => import('@/views/logManage/logManage.vue') // 日志管理 -const PwdModify = () => import('@/views/PwdModify/PwdModify.vue') // 修改密码 - -const UserAdminister = () => import('@/views/system-admin/UserAdminister/index.vue') // 单位用户管理 -const RoleAdminister = () => import('@/views/RoleAdminister/RoleAdminister.vue') // 业务角色管理 - -/* 获取权限路由列表 */ -import {getrolemenus} from '@/api/system/Role/role.js' -import {getSession} from '@/utils/auth.js' - -export async function getRoleRouter(userSid) { - let rolemenus = await getrolemenus({userSid: userSid}) - let userRoles = resRouter(rolemenus.data) - userRoles.push({path: '*', redirect: '/404', hidden: true}) - return userRoles -} - - -function resRouter(menus) { //递归,将后台传来数组 - for (var i = 0; i < menus.length; i++) { - if (menus[i].children && menus[i].children.length != 0) { - resRouter(menus[i].children) - } - console.log(menus[i].component) - if (menus[i].children.length == 0) { - delete menus[i].children - delete menus[i].redirect - } - if (menus[i].component != '') { - menus[i].component = eval(menus[i].path.substr(1)) - console.log(menus[i]) - menus[i] = { - path: menus[i].path, - component: Layout, - redirect: menus[i].path, - children: [menus[i]] - } - } - } - console.log(menus) - return menus -} +const Layout = () => import('@/layout') +/* 权限路由 */ +//const orgRegCheck = () => import('@/views/system-admin/check/company.vue') // 单位注册审核 +//const personRegCheck = () => import('@/views/system-admin/check/people.vue') // 个人注册审核 +//const personJoinCheck = () => import('@/views/system-admin/check/personnel.vue') // 人员绑定审核 +//const deptManage = () => import('@/views/system-admin/orgsetup/index.vue') // 内部机构设置 +const region = () => import('@/views/region/region.vue') // 区域管理 +const userManage = () => import('@/views/userManage/userManage.vue') // 用户管理 +const roleManage = () => import('@/views/system-admin/role.vue') // 角色管理 +const sourceManage = () => import('@/views/sourceManage/sourceManage.vue') // 资源管理 + +const menuManage = () => import('@/views/menuManage/menuManage.vue') // 菜单管理 + +const dictManage = () => import('@/views/dictManage/dictManage.vue') // 数据字典 +const logManage = () => import('@/views/logManage/logManage.vue') // 日志管理 +const PwdModify = () => import('@/views/PwdModify/PwdModify.vue') // 修改密码 + +const UserAdminister = () => import('@/views/system-admin/UserAdminister/index.vue') // 单位用户管理 +const RoleAdminister = () => import('@/views/RoleAdminister/RoleAdminister.vue') // 业务角色管理 + +/* 获取权限路由列表 */ +import {getrolemenus} from '@/api/system/Role/role.js' +import {getSession} from '@/utils/auth.js' + +export async function getRoleRouter(userSid) { + let rolemenus = await getrolemenus({userSid: userSid}) + let userRoles = resRouter(rolemenus.data) + userRoles.push({path: '*', redirect: '/404', hidden: true}) + return userRoles +} + + +function resRouter(menus) { //递归,将后台传来数组 + for (var i = 0; i < menus.length; i++) { + if (menus[i].children && menus[i].children.length != 0) { + resRouter(menus[i].children) + } + console.log(menus[i].component) + if (menus[i].children.length == 0) { + delete menus[i].children + delete menus[i].redirect + } + if (menus[i].component != '') { + menus[i].component = eval(menus[i].path.substr(1)) + console.log(menus[i]) + menus[i] = { + path: menus[i].path, + component: Layout, + redirect: menus[i].path, + children: [menus[i]] + } + } + } + console.log(menus) + return menus +} diff --git a/demo-web-ui/src/settings.js b/demo-web-ui/src/settings.js index 647f65b..3ba9452 100644 --- a/demo-web-ui/src/settings.js +++ b/demo-web-ui/src/settings.js @@ -1,16 +1,16 @@ -module.exports = { - - title: '安瑞集团信息化平台', - - /** - * @type {boolean} true | false - * @description Whether fix the header - */ - fixedHeader: false, - - /** - * @type {boolean} true | false - * @description Whether show the logo in sidebar - */ - sidebarLogo: false -} +module.exports = { + + title: '安瑞集团信息化平台', + + /** + * @type {boolean} true | false + * @description Whether fix the header + */ + fixedHeader: false, + + /** + * @type {boolean} true | false + * @description Whether show the logo in sidebar + */ + sidebarLogo: false +} diff --git a/demo-web-ui/src/store/getters.js b/demo-web-ui/src/store/getters.js index 33a426a..ef9ef23 100644 --- a/demo-web-ui/src/store/getters.js +++ b/demo-web-ui/src/store/getters.js @@ -1,17 +1,17 @@ -const getters = { - sidebar: state => state.app.sidebar, - size: state => state.app.size, - device: state => state.app.device, - visitedViews: state => state.tagsView.visitedViews, - cachedViews: state => state.tagsView.cachedViews, - token: state => state.user.token, - avatar: state => state.user.avatar, - name: state => state.user.name, - userInfo: state => state.user.userInfo, - menus: state => state.user.menus, - introduction: state => state.user.introduction, - roles: state => state.user.roles, - permission_routes: state => state.permission.routes, - errorLogs: state => state.errorLog.logs -} -export default getters +const getters = { + sidebar: state => state.app.sidebar, + size: state => state.app.size, + device: state => state.app.device, + visitedViews: state => state.tagsView.visitedViews, + cachedViews: state => state.tagsView.cachedViews, + token: state => state.user.token, + avatar: state => state.user.avatar, + name: state => state.user.name, + userInfo: state => state.user.userInfo, + menus: state => state.user.menus, + introduction: state => state.user.introduction, + roles: state => state.user.roles, + permission_routes: state => state.permission.routes, + errorLogs: state => state.errorLog.logs +} +export default getters diff --git a/demo-web-ui/src/store/index.js b/demo-web-ui/src/store/index.js index 0fd8395..157eb50 100644 --- a/demo-web-ui/src/store/index.js +++ b/demo-web-ui/src/store/index.js @@ -1,25 +1,25 @@ -import Vue from 'vue' -import Vuex from 'vuex' -import getters from './getters' - -Vue.use(Vuex) - -// https://webpack.js.org/guides/dependency-management/#requirecontext -const modulesFiles = require.context('./modules', true, /\.js$/) - -// you do not need `import app from './modules/app'` -// it will auto require all vuex module from modules file -const modules = modulesFiles.keys().reduce((modules, modulePath) => { - // set './app.js' => 'app' - const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') - const value = modulesFiles(modulePath) - modules[moduleName] = value.default - return modules -}, {}) - -const store = new Vuex.Store({ - modules, - getters -}) - -export default store +import Vue from 'vue' +import Vuex from 'vuex' +import getters from './getters' + +Vue.use(Vuex) + +// https://webpack.js.org/guides/dependency-management/#requirecontext +const modulesFiles = require.context('./modules', true, /\.js$/) + +// you do not need `import app from './modules/app'` +// it will auto require all vuex module from modules file +const modules = modulesFiles.keys().reduce((modules, modulePath) => { + // set './app.js' => 'app' + const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') + const value = modulesFiles(modulePath) + modules[moduleName] = value.default + return modules +}, {}) + +const store = new Vuex.Store({ + modules, + getters +}) + +export default store diff --git a/demo-web-ui/src/store/modules/app.js b/demo-web-ui/src/store/modules/app.js index 45d89bb..c8d8ee9 100644 --- a/demo-web-ui/src/store/modules/app.js +++ b/demo-web-ui/src/store/modules/app.js @@ -1,56 +1,56 @@ -import Cookies from 'js-cookie' - -const state = { - sidebar: { - opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, - withoutAnimation: false - }, - device: 'desktop', - size: Cookies.get('size') || 'medium' -} - -const mutations = { - TOGGLE_SIDEBAR: state => { - state.sidebar.opened = !state.sidebar.opened - state.sidebar.withoutAnimation = false - if (state.sidebar.opened) { - Cookies.set('sidebarStatus', 1) - } else { - Cookies.set('sidebarStatus', 0) - } - }, - CLOSE_SIDEBAR: (state, withoutAnimation) => { - Cookies.set('sidebarStatus', 0) - state.sidebar.opened = false - state.sidebar.withoutAnimation = withoutAnimation - }, - TOGGLE_DEVICE: (state, device) => { - state.device = device - }, - SET_SIZE: (state, size) => { - state.size = size - Cookies.set('size', size) - } -} - -const actions = { - toggleSideBar({ commit }) { - commit('TOGGLE_SIDEBAR') - }, - closeSideBar({ commit }, { withoutAnimation }) { - commit('CLOSE_SIDEBAR', withoutAnimation) - }, - toggleDevice({ commit }, device) { - commit('TOGGLE_DEVICE', device) - }, - setSize({ commit }, size) { - commit('SET_SIZE', size) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} +import Cookies from 'js-cookie' + +const state = { + sidebar: { + opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, + withoutAnimation: false + }, + device: 'desktop', + size: Cookies.get('size') || 'medium' +} + +const mutations = { + TOGGLE_SIDEBAR: state => { + state.sidebar.opened = !state.sidebar.opened + state.sidebar.withoutAnimation = false + if (state.sidebar.opened) { + Cookies.set('sidebarStatus', 1) + } else { + Cookies.set('sidebarStatus', 0) + } + }, + CLOSE_SIDEBAR: (state, withoutAnimation) => { + Cookies.set('sidebarStatus', 0) + state.sidebar.opened = false + state.sidebar.withoutAnimation = withoutAnimation + }, + TOGGLE_DEVICE: (state, device) => { + state.device = device + }, + SET_SIZE: (state, size) => { + state.size = size + Cookies.set('size', size) + } +} + +const actions = { + toggleSideBar({ commit }) { + commit('TOGGLE_SIDEBAR') + }, + closeSideBar({ commit }, { withoutAnimation }) { + commit('CLOSE_SIDEBAR', withoutAnimation) + }, + toggleDevice({ commit }, device) { + commit('TOGGLE_DEVICE', device) + }, + setSize({ commit }, size) { + commit('SET_SIZE', size) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/demo-web-ui/src/store/modules/errorLog.js b/demo-web-ui/src/store/modules/errorLog.js index 6b01f95..4615bfb 100644 --- a/demo-web-ui/src/store/modules/errorLog.js +++ b/demo-web-ui/src/store/modules/errorLog.js @@ -1,28 +1,28 @@ -const state = { - logs: [] -} - -const mutations = { - ADD_ERROR_LOG: (state, log) => { - state.logs.push(log) - }, - CLEAR_ERROR_LOG: (state) => { - state.logs.splice(0) - } -} - -const actions = { - addErrorLog({ commit }, log) { - commit('ADD_ERROR_LOG', log) - }, - clearErrorLog({ commit }) { - commit('CLEAR_ERROR_LOG') - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} +const state = { + logs: [] +} + +const mutations = { + ADD_ERROR_LOG: (state, log) => { + state.logs.push(log) + }, + CLEAR_ERROR_LOG: (state) => { + state.logs.splice(0) + } +} + +const actions = { + addErrorLog({ commit }, log) { + commit('ADD_ERROR_LOG', log) + }, + clearErrorLog({ commit }) { + commit('CLEAR_ERROR_LOG') + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/demo-web-ui/src/store/modules/permission.js b/demo-web-ui/src/store/modules/permission.js index aeb5ee5..757479e 100644 --- a/demo-web-ui/src/store/modules/permission.js +++ b/demo-web-ui/src/store/modules/permission.js @@ -1,69 +1,69 @@ -import { asyncRoutes, constantRoutes } from '@/router' - -/** - * Use meta.role to determine if the current user has permission - * @param roles - * @param route - */ -function hasPermission(roles, route) { - if (route.meta && route.meta.roles) { - return roles.some(role => route.meta.roles.includes(role)) - } else { - return true - } -} - -/** - * Filter asynchronous routing tables by recursion - * @param routes asyncRoutes - * @param roles - */ -export function filterAsyncRoutes(routes, roles) { - const res = [] - - routes.forEach(route => { - const tmp = { ...route } - if (hasPermission(roles, tmp)) { - if (tmp.children) { - tmp.children = filterAsyncRoutes(tmp.children, roles) - } - res.push(tmp) - } - }) - - return res -} - -const state = { - routes: [], - addRoutes: [] -} - -const mutations = { - SET_ROUTES: (state, routes) => { - state.addRoutes = routes - state.routes = constantRoutes.concat(routes) - } -} - -const actions = { - generateRoutes({ commit }, roles) { - return new Promise(resolve => { - let accessedRoutes - if (roles.includes('admin')) { - accessedRoutes = asyncRoutes || [] - } else { - accessedRoutes = filterAsyncRoutes(asyncRoutes, roles) - } - commit('SET_ROUTES', accessedRoutes) - resolve(accessedRoutes) - }) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} +import { asyncRoutes, constantRoutes } from '@/router' + +/** + * Use meta.role to determine if the current user has permission + * @param roles + * @param route + */ +function hasPermission(roles, route) { + if (route.meta && route.meta.roles) { + return roles.some(role => route.meta.roles.includes(role)) + } else { + return true + } +} + +/** + * Filter asynchronous routing tables by recursion + * @param routes asyncRoutes + * @param roles + */ +export function filterAsyncRoutes(routes, roles) { + const res = [] + + routes.forEach(route => { + const tmp = { ...route } + if (hasPermission(roles, tmp)) { + if (tmp.children) { + tmp.children = filterAsyncRoutes(tmp.children, roles) + } + res.push(tmp) + } + }) + + return res +} + +const state = { + routes: [], + addRoutes: [] +} + +const mutations = { + SET_ROUTES: (state, routes) => { + state.addRoutes = routes + state.routes = constantRoutes.concat(routes) + } +} + +const actions = { + generateRoutes({ commit }, roles) { + return new Promise(resolve => { + let accessedRoutes + if (roles.includes('admin')) { + accessedRoutes = asyncRoutes || [] + } else { + accessedRoutes = filterAsyncRoutes(asyncRoutes, roles) + } + commit('SET_ROUTES', accessedRoutes) + resolve(accessedRoutes) + }) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/demo-web-ui/src/store/modules/settings.js b/demo-web-ui/src/store/modules/settings.js index 110533f..e362c20 100644 --- a/demo-web-ui/src/store/modules/settings.js +++ b/demo-web-ui/src/store/modules/settings.js @@ -1,35 +1,35 @@ -import variables from '@/styles/element-variables.scss' -import defaultSettings from '@/settings' - -const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings - -const state = { - theme: variables.theme, - showSettings: showSettings, - tagsView: tagsView, - fixedHeader: fixedHeader, - sidebarLogo: sidebarLogo -} - -const mutations = { - CHANGE_SETTING: (state, { key, value }) => { - // eslint-disable-next-line no-prototype-builtins - if (state.hasOwnProperty(key)) { - state[key] = value - } - } -} - -const actions = { - changeSetting({ commit }, data) { - commit('CHANGE_SETTING', data) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} - +import variables from '@/styles/element-variables.scss' +import defaultSettings from '@/settings' + +const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings + +const state = { + theme: variables.theme, + showSettings: showSettings, + tagsView: tagsView, + fixedHeader: fixedHeader, + sidebarLogo: sidebarLogo +} + +const mutations = { + CHANGE_SETTING: (state, { key, value }) => { + // eslint-disable-next-line no-prototype-builtins + if (state.hasOwnProperty(key)) { + state[key] = value + } + } +} + +const actions = { + changeSetting({ commit }, data) { + commit('CHANGE_SETTING', data) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} + diff --git a/demo-web-ui/src/store/modules/tagsView.js b/demo-web-ui/src/store/modules/tagsView.js index 57e7242..107b298 100644 --- a/demo-web-ui/src/store/modules/tagsView.js +++ b/demo-web-ui/src/store/modules/tagsView.js @@ -1,160 +1,160 @@ -const state = { - visitedViews: [], - cachedViews: [] -} - -const mutations = { - ADD_VISITED_VIEW: (state, view) => { - if (state.visitedViews.some(v => v.path === view.path)) return - state.visitedViews.push( - Object.assign({}, view, { - title: view.meta.title || 'no-name' - }) - ) - }, - ADD_CACHED_VIEW: (state, view) => { - if (state.cachedViews.includes(view.name)) return - if (!view.meta.noCache) { - state.cachedViews.push(view.name) - } - }, - - DEL_VISITED_VIEW: (state, view) => { - for (const [i, v] of state.visitedViews.entries()) { - if (v.path === view.path) { - state.visitedViews.splice(i, 1) - break - } - } - }, - DEL_CACHED_VIEW: (state, view) => { - const index = state.cachedViews.indexOf(view.name) - index > -1 && state.cachedViews.splice(index, 1) - }, - - DEL_OTHERS_VISITED_VIEWS: (state, view) => { - state.visitedViews = state.visitedViews.filter(v => { - return v.meta.affix || v.path === view.path - }) - }, - DEL_OTHERS_CACHED_VIEWS: (state, view) => { - const index = state.cachedViews.indexOf(view.name) - if (index > -1) { - state.cachedViews = state.cachedViews.slice(index, index + 1) - } else { - // if index = -1, there is no cached tags - state.cachedViews = [] - } - }, - - DEL_ALL_VISITED_VIEWS: state => { - // keep affix tags - const affixTags = state.visitedViews.filter(tag => tag.meta.affix) - state.visitedViews = affixTags - }, - DEL_ALL_CACHED_VIEWS: state => { - state.cachedViews = [] - }, - - UPDATE_VISITED_VIEW: (state, view) => { - for (let v of state.visitedViews) { - if (v.path === view.path) { - v = Object.assign(v, view) - break - } - } - } -} - -const actions = { - addView({ dispatch }, view) { - dispatch('addVisitedView', view) - dispatch('addCachedView', view) - }, - addVisitedView({ commit }, view) { - commit('ADD_VISITED_VIEW', view) - }, - addCachedView({ commit }, view) { - commit('ADD_CACHED_VIEW', view) - }, - - delView({ dispatch, state }, view) { - return new Promise(resolve => { - dispatch('delVisitedView', view) - dispatch('delCachedView', view) - resolve({ - visitedViews: [...state.visitedViews], - cachedViews: [...state.cachedViews] - }) - }) - }, - delVisitedView({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_VISITED_VIEW', view) - resolve([...state.visitedViews]) - }) - }, - delCachedView({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_CACHED_VIEW', view) - resolve([...state.cachedViews]) - }) - }, - - delOthersViews({ dispatch, state }, view) { - return new Promise(resolve => { - dispatch('delOthersVisitedViews', view) - dispatch('delOthersCachedViews', view) - resolve({ - visitedViews: [...state.visitedViews], - cachedViews: [...state.cachedViews] - }) - }) - }, - delOthersVisitedViews({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_OTHERS_VISITED_VIEWS', view) - resolve([...state.visitedViews]) - }) - }, - delOthersCachedViews({ commit, state }, view) { - return new Promise(resolve => { - commit('DEL_OTHERS_CACHED_VIEWS', view) - resolve([...state.cachedViews]) - }) - }, - - delAllViews({ dispatch, state }, view) { - return new Promise(resolve => { - dispatch('delAllVisitedViews', view) - dispatch('delAllCachedViews', view) - resolve({ - visitedViews: [...state.visitedViews], - cachedViews: [...state.cachedViews] - }) - }) - }, - delAllVisitedViews({ commit, state }) { - return new Promise(resolve => { - commit('DEL_ALL_VISITED_VIEWS') - resolve([...state.visitedViews]) - }) - }, - delAllCachedViews({ commit, state }) { - return new Promise(resolve => { - commit('DEL_ALL_CACHED_VIEWS') - resolve([...state.cachedViews]) - }) - }, - - updateVisitedView({ commit }, view) { - commit('UPDATE_VISITED_VIEW', view) - } -} - -export default { - namespaced: true, - state, - mutations, - actions -} +const state = { + visitedViews: [], + cachedViews: [] +} + +const mutations = { + ADD_VISITED_VIEW: (state, view) => { + if (state.visitedViews.some(v => v.path === view.path)) return + state.visitedViews.push( + Object.assign({}, view, { + title: view.meta.title || 'no-name' + }) + ) + }, + ADD_CACHED_VIEW: (state, view) => { + if (state.cachedViews.includes(view.name)) return + if (!view.meta.noCache) { + state.cachedViews.push(view.name) + } + }, + + DEL_VISITED_VIEW: (state, view) => { + for (const [i, v] of state.visitedViews.entries()) { + if (v.path === view.path) { + state.visitedViews.splice(i, 1) + break + } + } + }, + DEL_CACHED_VIEW: (state, view) => { + const index = state.cachedViews.indexOf(view.name) + index > -1 && state.cachedViews.splice(index, 1) + }, + + DEL_OTHERS_VISITED_VIEWS: (state, view) => { + state.visitedViews = state.visitedViews.filter(v => { + return v.meta.affix || v.path === view.path + }) + }, + DEL_OTHERS_CACHED_VIEWS: (state, view) => { + const index = state.cachedViews.indexOf(view.name) + if (index > -1) { + state.cachedViews = state.cachedViews.slice(index, index + 1) + } else { + // if index = -1, there is no cached tags + state.cachedViews = [] + } + }, + + DEL_ALL_VISITED_VIEWS: state => { + // keep affix tags + const affixTags = state.visitedViews.filter(tag => tag.meta.affix) + state.visitedViews = affixTags + }, + DEL_ALL_CACHED_VIEWS: state => { + state.cachedViews = [] + }, + + UPDATE_VISITED_VIEW: (state, view) => { + for (let v of state.visitedViews) { + if (v.path === view.path) { + v = Object.assign(v, view) + break + } + } + } +} + +const actions = { + addView({ dispatch }, view) { + dispatch('addVisitedView', view) + dispatch('addCachedView', view) + }, + addVisitedView({ commit }, view) { + commit('ADD_VISITED_VIEW', view) + }, + addCachedView({ commit }, view) { + commit('ADD_CACHED_VIEW', view) + }, + + delView({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delVisitedView', view) + dispatch('delCachedView', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delVisitedView({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_VISITED_VIEW', view) + resolve([...state.visitedViews]) + }) + }, + delCachedView({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_CACHED_VIEW', view) + resolve([...state.cachedViews]) + }) + }, + + delOthersViews({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delOthersVisitedViews', view) + dispatch('delOthersCachedViews', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delOthersVisitedViews({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_OTHERS_VISITED_VIEWS', view) + resolve([...state.visitedViews]) + }) + }, + delOthersCachedViews({ commit, state }, view) { + return new Promise(resolve => { + commit('DEL_OTHERS_CACHED_VIEWS', view) + resolve([...state.cachedViews]) + }) + }, + + delAllViews({ dispatch, state }, view) { + return new Promise(resolve => { + dispatch('delAllVisitedViews', view) + dispatch('delAllCachedViews', view) + resolve({ + visitedViews: [...state.visitedViews], + cachedViews: [...state.cachedViews] + }) + }) + }, + delAllVisitedViews({ commit, state }) { + return new Promise(resolve => { + commit('DEL_ALL_VISITED_VIEWS') + resolve([...state.visitedViews]) + }) + }, + delAllCachedViews({ commit, state }) { + return new Promise(resolve => { + commit('DEL_ALL_CACHED_VIEWS') + resolve([...state.cachedViews]) + }) + }, + + updateVisitedView({ commit }, view) { + commit('UPDATE_VISITED_VIEW', view) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/demo-web-ui/src/store/modules/user.js b/demo-web-ui/src/store/modules/user.js index 01ddfc7..01a4974 100644 --- a/demo-web-ui/src/store/modules/user.js +++ b/demo-web-ui/src/store/modules/user.js @@ -1,160 +1,160 @@ -import { login, logout, getInfo } from '@/api/user' -import { getStorage, setStorage, removeStorage } from '@/utils/auth' - -import router, { resetRouter } from '@/router' - -const state = { - token: getStorage(), - userInfo: '', - menus: '' -} - -const mutations = { - SET_TOKEN: (state, token) => { - state.token = token - }, - SET_UESRINFO: (state, userInfo) => { - state.userInfo = userInfo - }, - SET_MENUS: (state, menus) => { - state.menus = menus - } -} - -const actions = { - // user login - login({ commit }, userInfo) { - return new Promise((resolve, reject) => { - login(userInfo).then(response => { - const { data } = response - commit('SET_TOKEN', data.token) - setStorage(data.token) - let user = { - roleSid: data.roleSid, - name: data.name, - userName: data.userName, - departmentName: data.departmentName, - isAdmin: data.isAdmin, - staffSid: data.staffSid, - userSid: data.sid, - orgSid: data.organizationSid, - Orgname: data.organizationName, - dwjb: data.dwjb, - pNameAndDepartmentNameAndPostName: data.pNameAndDepartmentNameAndPostName, - roleName: data.roleName, - defaultOrgPathName: data.defaultOrgPathName, - defaultOrgPath: data.defaultOrgPath, - postName: data.postName - } - commit('SET_UESRINFO', user) - window.sessionStorage.setItem('userSid', user.userSid) - window.sessionStorage.setItem('Orgname', user.Orgname) - window.sessionStorage.setItem('departmentName', user.departmentName) - window.sessionStorage.setItem('name', user.name) - window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', user.pNameAndDepartmentNameAndPostName) - window.sessionStorage.setItem('roleName', user.roleName) - window.sessionStorage.setItem('defaultOrgPathName', user.defaultOrgPathName) - window.sessionStorage.setItem('defaultOrgPath', user.defaultOrgPath) - window.sessionStorage.setItem('postName', user.postName) - resolve(data) - }).catch(error => { - reject(error) - }) - }) - }, - - // get user info - getInfo({ commit, state }) { - return new Promise((resolve, reject) => { - getInfo().then(response => { - const { data } = response - if (!data) { - removeStorage() - reject('Verification failed, please Login again.') - } - let user = { - roleSid: data.roleSid, - name: data.name, - userName: data.userName, - orgRoleName: data.orgRoleName, - isAdmin: data.isAdmin, - staffSid: data.staffSid, - userSid: data.sid, - orgSid: data.organizationSid, - Orgname: data.organizationName, - dwjb: data.dwjb - } - commit('SET_UESRINFO', user) - resolve(data) - }).catch((error) => { - removeStorage() - router.push({ path: '/' }) - // reject(error) - }) - }) - }, - - getMenus({ commit, state }) { - return new Promise((resolve, reject) => { - getInfo().then(response => { - const { data } = response - commit('SET_UESRINFO', user) - resolve(data) - }).catch(error => { - reject(error) - }) - }) - }, - - // user logout - logout({ commit, state, dispatch }) { - return new Promise((resolve, reject) => { - logout(state.token).then(() => { - commit('SET_TOKEN', '') - commit('SET_UESRINFO', '') - removeStorage() - resetRouter() - resolve() - }).catch(error => { - reject(error) - }) - }) - } - - // remove token - // resetToken({ commit }) { - // return new Promise(resolve => { - // commit('SET_TOKEN', '') - // commit('SET_ROLES', []) - // removeToken() - // resolve() - // }) - // }, - - // dynamically modify permissions - // async changeRoles({ commit, dispatch }, role) { - // const token = role + '-token' - - // commit('SET_TOKEN', token) - // setToken(token) - - // const { roles } = await dispatch('getInfo') - - // resetRouter() - - // // generate accessible routes map based on roles - // const accessRoutes = await dispatch('permission/generateRoutes', roles, { root: true }) - // // dynamically add accessible routes - // router.addRoutes(accessRoutes) - - // // reset visited views and cached views - // dispatch('tagsView/delAllViews', null, { root: true }) - // } -} - -export default { - namespaced: true, - state, - mutations, - actions -} +import { login, logout, getInfo } from '@/api/user' +import { getStorage, setStorage, removeStorage } from '@/utils/auth' + +import router, { resetRouter } from '@/router' + +const state = { + token: getStorage(), + userInfo: '', + menus: '' +} + +const mutations = { + SET_TOKEN: (state, token) => { + state.token = token + }, + SET_UESRINFO: (state, userInfo) => { + state.userInfo = userInfo + }, + SET_MENUS: (state, menus) => { + state.menus = menus + } +} + +const actions = { + // user login + login({ commit }, userInfo) { + return new Promise((resolve, reject) => { + login(userInfo).then(response => { + const { data } = response + commit('SET_TOKEN', data.token) + setStorage(data.token) + let user = { + roleSid: data.roleSid, + name: data.name, + userName: data.userName, + departmentName: data.departmentName, + isAdmin: data.isAdmin, + staffSid: data.staffSid, + userSid: data.sid, + orgSid: data.organizationSid, + Orgname: data.organizationName, + dwjb: data.dwjb, + pNameAndDepartmentNameAndPostName: data.pNameAndDepartmentNameAndPostName, + roleName: data.roleName, + defaultOrgPathName: data.defaultOrgPathName, + defaultOrgPath: data.defaultOrgPath, + postName: data.postName + } + commit('SET_UESRINFO', user) + window.sessionStorage.setItem('userSid', user.userSid) + window.sessionStorage.setItem('Orgname', user.Orgname) + window.sessionStorage.setItem('departmentName', user.departmentName) + window.sessionStorage.setItem('name', user.name) + window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', user.pNameAndDepartmentNameAndPostName) + window.sessionStorage.setItem('roleName', user.roleName) + window.sessionStorage.setItem('defaultOrgPathName', user.defaultOrgPathName) + window.sessionStorage.setItem('defaultOrgPath', user.defaultOrgPath) + window.sessionStorage.setItem('postName', user.postName) + resolve(data) + }).catch(error => { + reject(error) + }) + }) + }, + + // get user info + getInfo({ commit, state }) { + return new Promise((resolve, reject) => { + getInfo().then(response => { + const { data } = response + if (!data) { + removeStorage() + reject('Verification failed, please Login again.') + } + let user = { + roleSid: data.roleSid, + name: data.name, + userName: data.userName, + orgRoleName: data.orgRoleName, + isAdmin: data.isAdmin, + staffSid: data.staffSid, + userSid: data.sid, + orgSid: data.organizationSid, + Orgname: data.organizationName, + dwjb: data.dwjb + } + commit('SET_UESRINFO', user) + resolve(data) + }).catch((error) => { + removeStorage() + router.push({ path: '/' }) + // reject(error) + }) + }) + }, + + getMenus({ commit, state }) { + return new Promise((resolve, reject) => { + getInfo().then(response => { + const { data } = response + commit('SET_UESRINFO', user) + resolve(data) + }).catch(error => { + reject(error) + }) + }) + }, + + // user logout + logout({ commit, state, dispatch }) { + return new Promise((resolve, reject) => { + logout(state.token).then(() => { + commit('SET_TOKEN', '') + commit('SET_UESRINFO', '') + removeStorage() + resetRouter() + resolve() + }).catch(error => { + reject(error) + }) + }) + } + + // remove token + // resetToken({ commit }) { + // return new Promise(resolve => { + // commit('SET_TOKEN', '') + // commit('SET_ROLES', []) + // removeToken() + // resolve() + // }) + // }, + + // dynamically modify permissions + // async changeRoles({ commit, dispatch }, role) { + // const token = role + '-token' + + // commit('SET_TOKEN', token) + // setToken(token) + + // const { roles } = await dispatch('getInfo') + + // resetRouter() + + // // generate accessible routes map based on roles + // const accessRoutes = await dispatch('permission/generateRoutes', roles, { root: true }) + // // dynamically add accessible routes + // router.addRoutes(accessRoutes) + + // // reset visited views and cached views + // dispatch('tagsView/delAllViews', null, { root: true }) + // } +} + +export default { + namespaced: true, + state, + mutations, + actions +} diff --git a/demo-web-ui/src/styles/e-table.scss b/demo-web-ui/src/styles/e-table.scss index 95b9f9c..35e2501 100644 --- a/demo-web-ui/src/styles/e-table.scss +++ b/demo-web-ui/src/styles/e-table.scss @@ -1,30 +1,30 @@ -.e-table { - width: 100%; - padding: 0 30px; - tr:first-child th{ - background-color: #c1f4cd; - } - tr { - td { - border: 1px solid #e6e9f0; - border-right: 0px; - border-bottom: 0px; - padding: 10px 20px; - } - td:last-child { - border-right: 1px solid #e6e9f0; - } - } - tr:last-child { - td { - border-bottom: 1px solid #e6e9f0; - } - } - - td:nth-child(2n-1) { - text-align: right; - } - td:nth-child(2n) { - text-align: left; - } - } +.e-table { + width: 100%; + padding: 0 30px; + tr:first-child th{ + background-color: #c1f4cd; + } + tr { + td { + border: 1px solid #e6e9f0; + border-right: 0px; + border-bottom: 0px; + padding: 10px 20px; + } + td:last-child { + border-right: 1px solid #e6e9f0; + } + } + tr:last-child { + td { + border-bottom: 1px solid #e6e9f0; + } + } + + td:nth-child(2n-1) { + text-align: right; + } + td:nth-child(2n) { + text-align: left; + } + } diff --git a/demo-web-ui/src/styles/el-form.scss b/demo-web-ui/src/styles/el-form.scss index 73288e1..d8b5888 100644 --- a/demo-web-ui/src/styles/el-form.scss +++ b/demo-web-ui/src/styles/el-form.scss @@ -1,67 +1,67 @@ -.listconadd .title { - text-align: center; - font-size: 28px; - //line-height: 90px; -} - -.listaddtop { - padding: 0 212px; - border-bottom: 2px solid #e0e3eb; - display: flex; - justify-content: space-between; - align-items: center; - line-height: 34px; - - span { - padding: 0 15px; - } -} - -.listconadd .demo-ruleForm { - padding: 22px 28px; -} - -.el-collapse-item__header { - .el-icon-arrow-right:before { - content: ""; - font-size: 20px; - } -} - -.demo-ruleForm table { - width: 100%; - border-collapse: collapse; - border: 2px solid #e0e3eb; - border-spacing: 0; - //text-align: right; - td { - border-right: 2px solid #e0e3eb; - border-bottom: 2px solid #e0e3eb; - border-top: 2px solid #e0e3eb; - } - - tr { - height: 40px; - } - - .el-form-item { - display: inline-block; - } - - .el-input { - display: inline-block; - } -} - -.tleftb { - text-align: right; - font-size: 14px; - color: #606266; - line-height: 40px !important; - font-weight: 600; -} - -.icon { - color: #e84026; - margin-right: 4px; -} +.listconadd .title { + text-align: center; + font-size: 28px; + //line-height: 90px; +} + +.listaddtop { + padding: 0 212px; + border-bottom: 2px solid #e0e3eb; + display: flex; + justify-content: space-between; + align-items: center; + line-height: 34px; + + span { + padding: 0 15px; + } +} + +.listconadd .demo-ruleForm { + padding: 22px 28px; +} + +.el-collapse-item__header { + .el-icon-arrow-right:before { + content: ""; + font-size: 20px; + } +} + +.demo-ruleForm table { + width: 100%; + border-collapse: collapse; + border: 2px solid #e0e3eb; + border-spacing: 0; + //text-align: right; + td { + border-right: 2px solid #e0e3eb; + border-bottom: 2px solid #e0e3eb; + border-top: 2px solid #e0e3eb; + } + + tr { + height: 40px; + } + + .el-form-item { + display: inline-block; + } + + .el-input { + display: inline-block; + } +} + +.tleftb { + text-align: right; + font-size: 14px; + color: #606266; + line-height: 40px !important; + font-weight: 600; +} + +.icon { + color: #e84026; + margin-right: 4px; +} diff --git a/demo-web-ui/src/styles/element-table.scss b/demo-web-ui/src/styles/element-table.scss index 727938c..306dba1 100644 --- a/demo-web-ui/src/styles/element-table.scss +++ b/demo-web-ui/src/styles/element-table.scss @@ -1,19 +1,19 @@ -.el-table { - .el-table__header{ - tr th{ - background: #edf1f7; - color: #333333; - } - } -} - -.table-describe{ - border: 1px solid #dfe4ed; - border-bottom: 0px solid #dfe4ed; - h4{ - float: left; - margin: 0; - line-height: 34px; - padding:0 15px; - } -} +.el-table { + .el-table__header{ + tr th{ + background: #edf1f7; + color: #333333; + } + } +} + +.table-describe{ + border: 1px solid #dfe4ed; + border-bottom: 0px solid #dfe4ed; + h4{ + float: left; + margin: 0; + line-height: 34px; + padding:0 15px; + } +} diff --git a/demo-web-ui/src/styles/element-tabs.scss b/demo-web-ui/src/styles/element-tabs.scss index 26321fb..fdfbc94 100644 --- a/demo-web-ui/src/styles/element-tabs.scss +++ b/demo-web-ui/src/styles/element-tabs.scss @@ -1,25 +1,25 @@ -.el-tabs--card{ - .el-tabs__header{ - .el-tabs__nav-scroll{ - padding-left: 3px; - padding-bottom: 10px; - border-bottom: 1px solid #018ad2; - .el-tabs__nav { - border: none; - } - .el-tabs__item { - border: 1px solid #dfe4ed; - margin-right: 12px; - margin-left: 2px; - } - .el-tabs__item:first-child { - border-left: 1px solid #dfe4ed; - } - .el-tabs__item.is-active{ - border-bottom-color: #018ad2; - background-color: #018ad2; - color: #fff; - } - } - } -} +.el-tabs--card{ + .el-tabs__header{ + .el-tabs__nav-scroll{ + padding-left: 3px; + padding-bottom: 10px; + border-bottom: 1px solid #018ad2; + .el-tabs__nav { + border: none; + } + .el-tabs__item { + border: 1px solid #dfe4ed; + margin-right: 12px; + margin-left: 2px; + } + .el-tabs__item:first-child { + border-left: 1px solid #dfe4ed; + } + .el-tabs__item.is-active{ + border-bottom-color: #018ad2; + background-color: #018ad2; + color: #fff; + } + } + } +} diff --git a/demo-web-ui/src/styles/element-ui.scss b/demo-web-ui/src/styles/element-ui.scss index 50c4dc3..7b01fea 100644 --- a/demo-web-ui/src/styles/element-ui.scss +++ b/demo-web-ui/src/styles/element-ui.scss @@ -1,62 +1,62 @@ -.el-image .el-image__inner--center{ - top: 0; - left: 0; - transform: none; -} - -.tablerow-click{ - color: #007FFF; - cursor: pointer; -} -// cover some element-ui styles - -.el-breadcrumb__inner, -.el-breadcrumb__inner a { - font-weight: 400 !important; -} - -.el-upload { - input[type="file"] { - display: none !important; - } -} - -.el-upload__input { - display: none; -} - - -// to fixed https://github.com/ElemeFE/element/issues/2461 -.el-dialog { - transform: none; - left: 0; - position: relative; - margin: 0 auto; -} - -// refine element ui upload -.upload-container { - .el-upload { - width: 100%; - - .el-upload-dragger { - width: 100%; - height: 200px; - } - } -} - -// dropdown -.el-dropdown-menu { - a { - display: block - } -} - -// to fix el-date-picker css style -.el-range-separator { - box-sizing: content-box; -} - - - +.el-image .el-image__inner--center{ + top: 0; + left: 0; + transform: none; +} + +.tablerow-click{ + color: #007FFF; + cursor: pointer; +} +// cover some element-ui styles + +.el-breadcrumb__inner, +.el-breadcrumb__inner a { + font-weight: 400 !important; +} + +.el-upload { + input[type="file"] { + display: none !important; + } +} + +.el-upload__input { + display: none; +} + + +// to fixed https://github.com/ElemeFE/element/issues/2461 +.el-dialog { + transform: none; + left: 0; + position: relative; + margin: 0 auto; +} + +// refine element ui upload +.upload-container { + .el-upload { + width: 100%; + + .el-upload-dragger { + width: 100%; + height: 200px; + } + } +} + +// dropdown +.el-dropdown-menu { + a { + display: block + } +} + +// to fix el-date-picker css style +.el-range-separator { + box-sizing: content-box; +} + + + diff --git a/demo-web-ui/src/styles/element-variables.scss b/demo-web-ui/src/styles/element-variables.scss index 3f304ba..700b971 100644 --- a/demo-web-ui/src/styles/element-variables.scss +++ b/demo-web-ui/src/styles/element-variables.scss @@ -1,31 +1,31 @@ -/** -* I think element-ui's default theme color is too light for long-term use. -* So I modified the default color and you can modify it to your liking. -**/ - -/* theme color */ -$--color-primary: #018ad2; -$--color-success: #13ce66; -$--color-warning: #ffba00; -$--color-danger: #ff4949; -// $--color-info: #1E1E1E; - -$--button-font-weight: 400; - -// $--color-text-regular: #1f2d3d; - -$--border-color-light: #dfe4ed; -$--border-color-lighter: #e6ebf5; - -$--table-border: 1px solid #dfe6ec; - -/* icon font path, required */ -$--font-path: "~element-ui/lib/theme-chalk/fonts"; - -@import "~element-ui/packages/theme-chalk/src/index"; - -// the :export directive is the magic sauce for webpack -// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass -:export { - theme: $--color-primary; -} +/** +* I think element-ui's default theme color is too light for long-term use. +* So I modified the default color and you can modify it to your liking. +**/ + +/* theme color */ +$--color-primary: #018ad2; +$--color-success: #13ce66; +$--color-warning: #ffba00; +$--color-danger: #ff4949; +// $--color-info: #1E1E1E; + +$--button-font-weight: 400; + +// $--color-text-regular: #1f2d3d; + +$--border-color-light: #dfe4ed; +$--border-color-lighter: #e6ebf5; + +$--table-border: 1px solid #dfe6ec; + +/* icon font path, required */ +$--font-path: "~element-ui/lib/theme-chalk/fonts"; + +@import "~element-ui/packages/theme-chalk/src/index"; + +// the :export directive is the magic sauce for webpack +// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass +:export { + theme: $--color-primary; +} diff --git a/demo-web-ui/src/styles/index.scss b/demo-web-ui/src/styles/index.scss index dfcc621..b9c3ac6 100644 --- a/demo-web-ui/src/styles/index.scss +++ b/demo-web-ui/src/styles/index.scss @@ -1,268 +1,268 @@ -@import './variables.scss'; -@import './mixin.scss'; -@import './transition.scss'; -@import './element-ui.scss'; -@import './sidebar.scss'; -@import './table.scss'; -@import './e-table.scss'; -@import './element-table.scss'; -@import './element-tabs.scss'; -@import './el-form.scss'; -body { - height: 100%; - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; -} - -label { - font-weight: 700; -} - -html { - height: 100%; - box-sizing: border-box; -} - -#app { - height: 100%; -} - -*, -*:before, -*:after { - box-sizing: inherit; -} - -a:focus, -a:active { - outline: none; -} - -a, -a:focus, -a:hover { - cursor: pointer; - color: inherit; - text-decoration: none; -} - -div:focus { - outline: none; -} - -.clearfix { - &:after { - visibility: hidden; - display: block; - font-size: 0; - content: " "; - clear: both; - height: 0; - } -} -.bg-primary{ - background-color: $color-primary !important; -} -// main-container global css -.container{ - min-height: 100%; - height: 100%; - background-color: #FFFFFF; - box-sizing: border-box; - padding: 10px 0; -} -.bluezi{color: $header-bg; cursor: pointer} -.fl{ - float: left; -} -.fr{ - float: right; -} -.text-center{ - text-align: center; -} -.color-red{ - color: red !important; -} - -.pd-b10{ - padding-bottom: 10px; -} - -.pd-y40{ - padding: 40px 0; -} -.pd-y20{ - padding: 20px 0; -} - -.fs20{ - font-size: 20px; -} - -// 页面上的button按钮 -.app-container { - .el-button--medium { - padding: 10px 14px; - font-size: 16px; - } - - .el-button--small { - padding: 8px 12px; - font-size: 14px; - } - - .el-button--mini { - padding: 7px 10px; - font-size: 12px; - } -} -// 添加样式 -.app-container { - margin: 5px 0 5px 0; - background-color: #fff; -} -.main-content{ overflow-x: hidden;overflow-y: auto;height: calc(100vh - 200px);padding: 0 20px;} -.listconadd{height: calc(100vh - 200px);overflow-y: auto;overflow-x: hidden;} -.listconadd{ - .titwu { - font-size: 28px; - text-align: center; - padding: 30px 0 20px 0; - } -} - -// 搜索的 -.webtop { - // position: fixed;top: 110px;width: calc(100% - 240px);z-index: 6000; - background-color: #fff; - display: flex !important; - flex-direction: row; - justify-content: space-between !important; - align-items: center; - margin-bottom: 0px !important; - font-size: 20px; -} - -// 设置了页面头部的内边距和背景色 -.tab-header { - font-size: 20px; - font-weight: bold; -} - -// 设置了搜索条件里的样式 -.search { - .tab-header { - .el-form-item { - margin-right: 16px; - .el-form-item__label { - font-size: 16px; - font-weight: 500; - } - } - } -} -.filter-item { - padding: 0 10px; - width: 220px; - display: inline-block; -} - -// 设置列表页面内容布局 -.listtop { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - padding: 0 0 0 15px; - margin-top: 0; - border: 1px solid #dfe4ed; - height: 42px; - line-height: 42px; -} - -.listtop .tit { - font-weight: bold; - font-size: 16px -} - -.listtop .pagination { - margin: 0; - padding: 0; -} - -.pages { - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: flex-end; - padding: 0 0 15px 15px; -} -.pages .tit{font-weight: bold;} -.pages .pagination{margin: 0;} - -.formadd { - padding: 10px 40px 0 40px; - font-size: 16px; - // height: calc(100vh - 200px);overflow-y: auto; - .title { - padding: 12px; - font-weight: bold; - font-size: 16px; - background-color: $header-bg; - text-align: left; - color: #ffffff; - } - .first_row{ - border-top: 1px solid $table-border-color; - } - .el-row { - display: flex; - flex-wrap: wrap; - border-left: 1px solid $table-border-color; - .el-col { - border-right: 1px solid $table-border-color; - border-bottom: 1px solid $table-border-color; - padding: 0 15px; - min-height: 42px; - line-height: 1; - - .el-form-item { - margin-bottom: 0; - line-height: 42px; - // .addinputw{width: 400px;} - .addinputw { - width: 80%; - line-height: 42px; - } - .el-input__inner { - height: 36px; - } - } - } - } - .footer{margin: 20px;} -} - -.el-form-item__error { - z-index: 100; -} - -.main-content { - .searchcon { - .searchbtn { - margin: 5px 0; - border: #2cab69 1px solid; - color: #2cab69; - } - } -} - -.search .btn { - padding: 5px 0; - border: 1px solid #e0e3eb; - text-align: center; - margin-bottom: 5px; -} +@import './variables.scss'; +@import './mixin.scss'; +@import './transition.scss'; +@import './element-ui.scss'; +@import './sidebar.scss'; +@import './table.scss'; +@import './e-table.scss'; +@import './element-table.scss'; +@import './element-tabs.scss'; +@import './el-form.scss'; +body { + height: 100%; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; +} + +label { + font-weight: 700; +} + +html { + height: 100%; + box-sizing: border-box; +} + +#app { + height: 100%; +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +a:focus, +a:active { + outline: none; +} + +a, +a:focus, +a:hover { + cursor: pointer; + color: inherit; + text-decoration: none; +} + +div:focus { + outline: none; +} + +.clearfix { + &:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; + } +} +.bg-primary{ + background-color: $color-primary !important; +} +// main-container global css +.container{ + min-height: 100%; + height: 100%; + background-color: #FFFFFF; + box-sizing: border-box; + padding: 10px 0; +} +.bluezi{color: $header-bg; cursor: pointer} +.fl{ + float: left; +} +.fr{ + float: right; +} +.text-center{ + text-align: center; +} +.color-red{ + color: red !important; +} + +.pd-b10{ + padding-bottom: 10px; +} + +.pd-y40{ + padding: 40px 0; +} +.pd-y20{ + padding: 20px 0; +} + +.fs20{ + font-size: 20px; +} + +// 页面上的button按钮 +.app-container { + .el-button--medium { + padding: 10px 14px; + font-size: 16px; + } + + .el-button--small { + padding: 8px 12px; + font-size: 14px; + } + + .el-button--mini { + padding: 7px 10px; + font-size: 12px; + } +} +// 添加样式 +.app-container { + margin: 5px 0 5px 0; + background-color: #fff; +} +.main-content{ overflow-x: hidden;overflow-y: auto;height: calc(100vh - 200px);padding: 0 20px;} +.listconadd{height: calc(100vh - 200px);overflow-y: auto;overflow-x: hidden;} +.listconadd{ + .titwu { + font-size: 28px; + text-align: center; + padding: 30px 0 20px 0; + } +} + +// 搜索的 +.webtop { + // position: fixed;top: 110px;width: calc(100% - 240px);z-index: 6000; + background-color: #fff; + display: flex !important; + flex-direction: row; + justify-content: space-between !important; + align-items: center; + margin-bottom: 0px !important; + font-size: 20px; +} + +// 设置了页面头部的内边距和背景色 +.tab-header { + font-size: 20px; + font-weight: bold; +} + +// 设置了搜索条件里的样式 +.search { + .tab-header { + .el-form-item { + margin-right: 16px; + .el-form-item__label { + font-size: 16px; + font-weight: 500; + } + } + } +} +.filter-item { + padding: 0 10px; + width: 220px; + display: inline-block; +} + +// 设置列表页面内容布局 +.listtop { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + padding: 0 0 0 15px; + margin-top: 0; + border: 1px solid #dfe4ed; + height: 42px; + line-height: 42px; +} + +.listtop .tit { + font-weight: bold; + font-size: 16px +} + +.listtop .pagination { + margin: 0; + padding: 0; +} + +.pages { + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: flex-end; + padding: 0 0 15px 15px; +} +.pages .tit{font-weight: bold;} +.pages .pagination{margin: 0;} + +.formadd { + padding: 10px 40px 0 40px; + font-size: 16px; + // height: calc(100vh - 200px);overflow-y: auto; + .title { + padding: 12px; + font-weight: bold; + font-size: 16px; + background-color: $header-bg; + text-align: left; + color: #ffffff; + } + .first_row{ + border-top: 1px solid $table-border-color; + } + .el-row { + display: flex; + flex-wrap: wrap; + border-left: 1px solid $table-border-color; + .el-col { + border-right: 1px solid $table-border-color; + border-bottom: 1px solid $table-border-color; + padding: 0 15px; + min-height: 42px; + line-height: 1; + + .el-form-item { + margin-bottom: 0; + line-height: 42px; + // .addinputw{width: 400px;} + .addinputw { + width: 80%; + line-height: 42px; + } + .el-input__inner { + height: 36px; + } + } + } + } + .footer{margin: 20px;} +} + +.el-form-item__error { + z-index: 100; +} + +.main-content { + .searchcon { + .searchbtn { + margin: 5px 0; + border: #2cab69 1px solid; + color: #2cab69; + } + } +} + +.search .btn { + padding: 5px 0; + border: 1px solid #e0e3eb; + text-align: center; + margin-bottom: 5px; +} diff --git a/demo-web-ui/src/styles/mixin.scss b/demo-web-ui/src/styles/mixin.scss index 36b74bb..9ded521 100644 --- a/demo-web-ui/src/styles/mixin.scss +++ b/demo-web-ui/src/styles/mixin.scss @@ -1,28 +1,28 @@ -@mixin clearfix { - &:after { - content: ""; - display: table; - clear: both; - } -} - -@mixin scrollBar { - &::-webkit-scrollbar-track-piece { - background: #d3dce6; - } - - &::-webkit-scrollbar { - width: 6px; - } - - &::-webkit-scrollbar-thumb { - background: #99a9bf; - border-radius: 20px; - } -} - -@mixin relative { - position: relative; - width: 100%; - height: 100%; -} +@mixin clearfix { + &:after { + content: ""; + display: table; + clear: both; + } +} + +@mixin scrollBar { + &::-webkit-scrollbar-track-piece { + background: #d3dce6; + } + + &::-webkit-scrollbar { + width: 6px; + } + + &::-webkit-scrollbar-thumb { + background: #99a9bf; + border-radius: 20px; + } +} + +@mixin relative { + position: relative; + width: 100%; + height: 100%; +} diff --git a/demo-web-ui/src/styles/sidebar.scss b/demo-web-ui/src/styles/sidebar.scss index cde93c5..67a611d 100644 --- a/demo-web-ui/src/styles/sidebar.scss +++ b/demo-web-ui/src/styles/sidebar.scss @@ -1,261 +1,262 @@ -#app { - background-color: #f7f9fc; - - .main-container { - height: 100vh; - transition: margin-left .28s; - padding-left: $sideBarWidth; - padding-top: 60px; - position: relative; - overflow: hidden; - } - .TagsView{ - height: 40px; - } - .home-box{ - position: fixed; - top: 60px; - left: 0; - background-color: $menuBg; - border: 1px solid $menuHover; - line-height: 40px; - width: 210px; - z-index: 1000; - a{ - display: inline-block; - line-height: 40px; - box-sizing: border-box; - width: 50%; - text-align: center; - font-size: 16px; - font-weight: 500; - color: #FFFFFF; - } - a:last-child{ - border:0; - background-color: $menuHover; - } - } - .sidebar-container { - transition: width 0.28s; - width: $sideBarWidth !important; - background-color: $menuBg; - height: calc(100% - 60px) ; - position: absolute; - font-size: 0px; - top: 60px; - bottom: 0; - left: 0; - z-index: 8; - overflow: hidden; - padding-top: 40px; - - // reset element-ui css - .horizontal-collapse-transition { - transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; - } - - .scrollbar-wrapper { - overflow-x: hidden !important; - } - - .el-scrollbar__bar.is-vertical { - right: 0px; - } - - .el-scrollbar { - height: 100%; - } - - &.has-logo { - .el-scrollbar { - height: calc(100% - 50px); - } - } - - .is-horizontal { - display: none; - } - - a { - display: inline-block; - width: 100%; - overflow: hidden; - } - - .svg-icon { - margin-right: 16px; - } - - .sub-el-icon { - margin-right: 12px; - margin-left: -2px; - } - - .el-menu { - border: none; - height: 100%; - width: 100% !important; - } - - // menu hover - .submenu-title-noDropdown, - .el-submenu__title { - &:hover { - background-color: $menuHover !important; - } - } - .el-submenu__title i{ - color: #FFFFFF; - } - .is-active>.el-submenu__title { - color: $subMenuActiveText !important; - } - - & .nest-menu .el-submenu>.el-submenu__title, - & .el-submenu .el-menu-item { - min-width: $sideBarWidth !important; - background-color: $subMenuBg !important; - - &:hover { - background-color: $subMenuHover !important; - } - } - & .el-menu-item.is-active { - background-color: $subMenuHover !important; - } - } - - // .hideSidebar { - // .sidebar-container { - // width: 54px !important; - // } - - // .main-container { - // margin-left: 54px; - // } - - // .submenu-title-noDropdown { - // padding: 0 !important; - // position: relative; - - // .el-tooltip { - // padding: 0 !important; - - // .svg-icon { - // margin-left: 20px; - // } - - // .sub-el-icon { - // margin-left: 19px; - // } - // } - // } - - // .el-submenu { - // overflow: hidden; - - // &>.el-submenu__title { - // padding: 0 !important; - - // .svg-icon { - // margin-left: 20px; - // } - - // .sub-el-icon { - // margin-left: 19px; - // } - - // .el-submenu__icon-arrow { - // display: none; - // } - // } - // } - - // .el-menu--collapse { - // .el-submenu { - // &>.el-submenu__title { - // &>span { - // height: 0; - // width: 0; - // overflow: hidden; - // visibility: hidden; - // display: inline-block; - // } - // } - // } - // } - // } - - .el-menu--collapse .el-menu .el-submenu { - min-width: $sideBarWidth !important; - } - - // mobile responsive - .mobile { - .main-container { - margin-left: 0px; - } - - .sidebar-container { - transition: transform .28s; - width: $sideBarWidth !important; - } - - &.hideSidebar { - .sidebar-container { - pointer-events: none; - transition-duration: 0.3s; - transform: translate3d(-$sideBarWidth, 0, 0); - } - } - } - - .withoutAnimation { - - .main-container, - .sidebar-container { - transition: none; - } - } -} - -// when menu collapsed -.el-menu--vertical { - &>.el-menu { - .svg-icon { - margin-right: 16px; - } - .sub-el-icon { - margin-right: 12px; - margin-left: -2px; - } - } - - .nest-menu .el-submenu>.el-submenu__title, - .el-menu-item { - &:hover { - // you can use $subMenuHover - background-color: $menuHover !important; - } - } - - // the scroll bar appears when the subMenu is too long - >.el-menu--popup { - max-height: 100vh; - overflow-y: auto; - - &::-webkit-scrollbar-track-piece { - background: #d3dce6; - } - - &::-webkit-scrollbar { - width: 6px; - } - - &::-webkit-scrollbar-thumb { - background: #99a9bf; - border-radius: 20px; - } - } -} +#app { + background-color: #f7f9fc; + + .main-container { + height: 100vh; + transition: margin-left .28s; + padding-left: $sideBarWidth; + padding-top: 60px; + position: relative; + overflow: hidden; + } + .TagsView{ + height: 40px; + } + + .home-box{ + position: fixed; + top: 60px; + left: 0; + background-color: $menuBg; + border: 1px solid $menuHover; + line-height: 40px; + width: 210px; + z-index: 1000; + a{ + display: inline-block; + line-height: 40px; + box-sizing: border-box; + width: 100%; + text-align: center; + font-size: 18px; + font-weight: 500; + color: #FFFFFF; + } + a:last-child{ + border:0; + background-color: $menuHover; + } + } + .sidebar-container { + transition: width 0.28s; + width: $sideBarWidth !important; + background-color: $menuBg; + height: calc(100% - 60px) ; + position: absolute; + font-size: 0px; + top: 60px; + bottom: 0; + left: 0; + z-index: 8; + overflow: hidden; + padding-top: 40px; + + // reset element-ui css + .horizontal-collapse-transition { + transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; + } + + .scrollbar-wrapper { + overflow-x: hidden !important; + } + + .el-scrollbar__bar.is-vertical { + right: 0px; + } + + .el-scrollbar { + height: 100%; + } + + &.has-logo { + .el-scrollbar { + height: calc(100% - 50px); + } + } + + .is-horizontal { + display: none; + } + + a { + display: inline-block; + width: 100%; + overflow: hidden; + } + + .svg-icon { + margin-right: 16px; + } + + .sub-el-icon { + margin-right: 12px; + margin-left: -2px; + } + + .el-menu { + border: none; + height: 100%; + width: 100% !important; + } + + // menu hover + .submenu-title-noDropdown, + .el-submenu__title { + &:hover { + background-color: $menuHover !important; + } + } + .el-submenu__title i{ + color: #FFFFFF; + } + .is-active>.el-submenu__title { + color: $subMenuActiveText !important; + } + + & .nest-menu .el-submenu>.el-submenu__title, + & .el-submenu .el-menu-item { + min-width: $sideBarWidth !important; + background-color: $subMenuBg !important; + + &:hover { + background-color: $subMenuHover !important; + } + } + & .el-menu-item.is-active { + // background-color: $subMenuHover !important; + } + } + + // .hideSidebar { + // .sidebar-container { + // width: 54px !important; + // } + + // .main-container { + // margin-left: 54px; + // } + + // .submenu-title-noDropdown { + // padding: 0 !important; + // position: relative; + + // .el-tooltip { + // padding: 0 !important; + + // .svg-icon { + // margin-left: 20px; + // } + + // .sub-el-icon { + // margin-left: 19px; + // } + // } + // } + + // .el-submenu { + // overflow: hidden; + + // &>.el-submenu__title { + // padding: 0 !important; + + // .svg-icon { + // margin-left: 20px; + // } + + // .sub-el-icon { + // margin-left: 19px; + // } + + // .el-submenu__icon-arrow { + // display: none; + // } + // } + // } + + // .el-menu--collapse { + // .el-submenu { + // &>.el-submenu__title { + // &>span { + // height: 0; + // width: 0; + // overflow: hidden; + // visibility: hidden; + // display: inline-block; + // } + // } + // } + // } + // } + + .el-menu--collapse .el-menu .el-submenu { + min-width: $sideBarWidth !important; + } + + // mobile responsive + .mobile { + .main-container { + margin-left: 0px; + } + + .sidebar-container { + transition: transform .28s; + width: $sideBarWidth !important; + } + + &.hideSidebar { + .sidebar-container { + pointer-events: none; + transition-duration: 0.3s; + transform: translate3d(-$sideBarWidth, 0, 0); + } + } + } + + .withoutAnimation { + + .main-container, + .sidebar-container { + transition: none; + } + } +} + +// when menu collapsed +.el-menu--vertical { + &>.el-menu { + .svg-icon { + margin-right: 16px; + } + .sub-el-icon { + margin-right: 12px; + margin-left: -2px; + } + } + + .nest-menu .el-submenu>.el-submenu__title, + .el-menu-item { + &:hover { + // you can use $subMenuHover + background-color: $menuHover !important; + } + } + + // the scroll bar appears when the subMenu is too long + >.el-menu--popup { + max-height: 100vh; + overflow-y: auto; + + &::-webkit-scrollbar-track-piece { + background: #d3dce6; + } + + &::-webkit-scrollbar { + width: 6px; + } + + &::-webkit-scrollbar-thumb { + background: #99a9bf; + border-radius: 20px; + } + } +} diff --git a/demo-web-ui/src/styles/table.scss b/demo-web-ui/src/styles/table.scss index 08e9142..d45cbae 100644 --- a/demo-web-ui/src/styles/table.scss +++ b/demo-web-ui/src/styles/table.scss @@ -1,48 +1,48 @@ -.container{ - /* 头 */ - .el-table thead{ - color: $text-color; - } - .el-table .cell{ - a{ - display: block; - color: $table-a-color; - } - .el-button--text{ - color: $table-a-color; - } - } - .el-table td, .el-table th{ - padding: 8px 0; - } - .el-table.is-group th{ - background-color: $table-bg-color; - } - .el-table--enable-row-hover .el-table__body tr:hover>td { - background-color: $table-bg-color !important; - } - .el-table--border td, .el-table--border th, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed { - border-right: 1px solid $table-border-color; - } - .el-table td, .el-table th.is-leaf{ - border-bottom: 1px solid $table-border-color; - } - .table-fixed { - .el-table__fixed-right { - height: 100% !important; //设置高优先,以覆盖内联样式 - } - } -} - -.children-box { - padding: 10px; - .table-header { - padding: 0 20px 5px 20px; - border-bottom: 2px solid $border-color; - .el-page-header { - line-height: 40px; - font-weight: 500; - - } - } -} +.container{ + /* 头 */ + .el-table thead{ + color: $text-color; + } + .el-table .cell{ + a{ + display: block; + color: $table-a-color; + } + .el-button--text{ + color: $table-a-color; + } + } + .el-table td, .el-table th{ + padding: 8px 0; + } + .el-table.is-group th{ + background-color: $table-bg-color; + } + .el-table--enable-row-hover .el-table__body tr:hover>td { + background-color: $table-bg-color !important; + } + .el-table--border td, .el-table--border th, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed { + border-right: 1px solid $table-border-color; + } + .el-table td, .el-table th.is-leaf{ + border-bottom: 1px solid $table-border-color; + } + .table-fixed { + .el-table__fixed-right { + height: 100% !important; //设置高优先,以覆盖内联样式 + } + } +} + +.children-box { + padding: 10px; + .table-header { + padding: 0 20px 5px 20px; + border-bottom: 2px solid $border-color; + .el-page-header { + line-height: 40px; + font-weight: 500; + + } + } +} diff --git a/demo-web-ui/src/styles/transition.scss b/demo-web-ui/src/styles/transition.scss index 4cb27cc..25e7e18 100644 --- a/demo-web-ui/src/styles/transition.scss +++ b/demo-web-ui/src/styles/transition.scss @@ -1,48 +1,48 @@ -// global transition css - -/* fade */ -.fade-enter-active, -.fade-leave-active { - transition: opacity 0.28s; -} - -.fade-enter, -.fade-leave-active { - opacity: 0; -} - -/* fade-transform */ -.fade-transform-leave-active, -.fade-transform-enter-active { - transition: all .5s; -} - -.fade-transform-enter { - opacity: 0; - transform: translateX(-30px); -} - -.fade-transform-leave-to { - opacity: 0; - transform: translateX(30px); -} - -/* breadcrumb transition */ -.breadcrumb-enter-active, -.breadcrumb-leave-active { - transition: all .5s; -} - -.breadcrumb-enter, -.breadcrumb-leave-active { - opacity: 0; - transform: translateX(20px); -} - -.breadcrumb-move { - transition: all .5s; -} - -.breadcrumb-leave-active { - position: absolute; -} +// global transition css + +/* fade */ +.fade-enter-active, +.fade-leave-active { + transition: opacity 0.28s; +} + +.fade-enter, +.fade-leave-active { + opacity: 0; +} + +/* fade-transform */ +.fade-transform-leave-active, +.fade-transform-enter-active { + transition: all .5s; +} + +.fade-transform-enter { + opacity: 0; + transform: translateX(-30px); +} + +.fade-transform-leave-to { + opacity: 0; + transform: translateX(30px); +} + +/* breadcrumb transition */ +.breadcrumb-enter-active, +.breadcrumb-leave-active { + transition: all .5s; +} + +.breadcrumb-enter, +.breadcrumb-leave-active { + opacity: 0; + transform: translateX(20px); +} + +.breadcrumb-move { + transition: all .5s; +} + +.breadcrumb-leave-active { + position: absolute; +} diff --git a/demo-web-ui/src/styles/variables.scss b/demo-web-ui/src/styles/variables.scss index 9ff78c5..05fa7fc 100644 --- a/demo-web-ui/src/styles/variables.scss +++ b/demo-web-ui/src/styles/variables.scss @@ -1,52 +1,52 @@ -// 行为色 -$color-primary: #018ad2; -$color-success: #4cd964; -$color-warning: #f0ad4e; -$color-error: #dd524d; -// header -$header-bg:#0294d7; -// sidebar -$menuText: rgba($color: #FFFFFF, $alpha: 0.9); -$menuActiveText:#ffffff; -$subMenuActiveText:#ffffff; //https://github.com/ElemeFE/element/issues/12951 - -$menuBg:#0294d7; -$menuHover:#087dba; - -$subMenuBg:#0294d7; -$subMenuHover:#087dba; - -$sideBarWidth: 210px; - -/* 表格的相关样式 */ -$search-bg:#edf1f7; // 表格搜索景色 -$table-bg-color:#edf1f7; // 表格背景 -$table-border-color:#e0e3eb; // 表格边框色 -// 文字 -$table-a-color:#018ad2; -/* 表格的相关样式 */ - -/* 边框颜色 */ -$border-color:#018ad2; -/* 文字基本颜色 */ -$text-color:#333;//基本色 -$text-color-inverse:#fff;//反色 -$text-color-grey:#999;//辅助灰色,如加载更多的提示信息 -$text-color-placeholder: #808080; -$text-color-disable:#c0c0c0; -$text-red: #d00000; - -$a-color:#018ad2; - -// the :export directive is the magic sauce for webpack -// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass -:export { - menuText: $menuText; - menuActiveText: $menuActiveText; - subMenuActiveText: $subMenuActiveText; - menuBg: $menuBg; - menuHover: $menuHover; - subMenuBg: $subMenuBg; - subMenuHover: $subMenuHover; - sideBarWidth: $sideBarWidth; -} +// 行为色 +$color-primary: #018ad2; +$color-success: #4cd964; +$color-warning: #f0ad4e; +$color-error: #dd524d; +// header +$header-bg:#0294d7; +// sidebar +$menuText: rgba($color: #FFFFFF, $alpha: 0.9); +$menuActiveText:#ffffff; +$subMenuActiveText:#ffffff; //https://github.com/ElemeFE/element/issues/12951 + +$menuBg:#0294d7; +$menuHover:#087dba; + +$subMenuBg:#0294d7; +$subMenuHover:#087dba; + +$sideBarWidth: 210px; + +/* 表格的相关样式 */ +$search-bg:#edf1f7; // 表格搜索景色 +$table-bg-color:#edf1f7; // 表格背景 +$table-border-color:#e0e3eb; // 表格边框色 +// 文字 +$table-a-color:#018ad2; +/* 表格的相关样式 */ + +/* 边框颜色 */ +$border-color:#018ad2; +/* 文字基本颜色 */ +$text-color:#333;//基本色 +$text-color-inverse:#fff;//反色 +$text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$text-color-placeholder: #808080; +$text-color-disable:#c0c0c0; +$text-red: #d00000; + +$a-color:#018ad2; + +// the :export directive is the magic sauce for webpack +// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass +:export { + menuText: $menuText; + menuActiveText: $menuActiveText; + subMenuActiveText: $subMenuActiveText; + menuBg: $menuBg; + menuHover: $menuHover; + subMenuBg: $subMenuBg; + subMenuHover: $subMenuHover; + sideBarWidth: $sideBarWidth; +} diff --git a/demo-web-ui/src/utils/auth.js b/demo-web-ui/src/utils/auth.js index 7b4f3ab..7e6beb5 100644 --- a/demo-web-ui/src/utils/auth.js +++ b/demo-web-ui/src/utils/auth.js @@ -1,30 +1,30 @@ -import Cookies from 'js-cookie' - -const TokenKey = 'token' -const sessionKey = 'token' - -export function getToken() { - return Cookies.get(TokenKey) -} - -export function setToken(token) { - return Cookies.set(TokenKey, token,{ expires: 7, path: '/' }) -} - -export function removeToken() { - return Cookies.remove(TokenKey) -} - -export function getStorage() { - return sessionStorage.getItem('token') - // return 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.1eyJ1c2VyTm8iOiJhNjRhYzA5OC0yZWJjLTQyMDgtOGY4Ni0wNmJlYTkwZmNlMTgiLCJpc3MiOiJXQksiLCJleHAiOjE2NDQ3MTU3MTl9.EBobsRKVpMbyVxjg3TvGOJ9dZHYJYVlr6xagjrikymE'; -} - - -export function setStorage(session) { - return sessionStorage.setItem('token', session) -} - -export function removeStorage() { - return sessionStorage.removeItem('token') -} +import Cookies from 'js-cookie' + +const TokenKey = 'token' +const sessionKey = 'token' + +export function getToken() { + return Cookies.get(TokenKey) +} + +export function setToken(token) { + return Cookies.set(TokenKey, token, { expires: 7, path: '/' }) +} + +export function removeToken() { + return Cookies.remove(TokenKey) +} + +export function getStorage() { + return sessionStorage.getItem('token') + // return 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.1eyJ1c2VyTm8iOiJhNjRhYzA5OC0yZWJjLTQyMDgtOGY4Ni0wNmJlYTkwZmNlMTgiLCJpc3MiOiJXQksiLCJleHAiOjE2NDQ3MTU3MTl9.EBobsRKVpMbyVxjg3TvGOJ9dZHYJYVlr6xagjrikymE'; +} + + +export function setStorage(session) { + return sessionStorage.setItem('token', session) +} + +export function removeStorage() { + return sessionStorage.removeItem('token') +} diff --git a/demo-web-ui/src/utils/get-page-title.js b/demo-web-ui/src/utils/get-page-title.js index a6de99d..1b0a84e 100644 --- a/demo-web-ui/src/utils/get-page-title.js +++ b/demo-web-ui/src/utils/get-page-title.js @@ -1,10 +1,10 @@ -import defaultSettings from '@/settings' - -const title = defaultSettings.title || 'Vue Admin Template' - -export default function getPageTitle(pageTitle) { - if (pageTitle) { - return `${pageTitle} - ${title}` - } - return `${title}` -} +import defaultSettings from '@/settings' + +const title = defaultSettings.title || 'Vue Admin Template' + +export default function getPageTitle(pageTitle) { + if (pageTitle) { + return `${pageTitle} - ${title}` + } + return `${title}` +} diff --git a/demo-web-ui/src/utils/index.js b/demo-web-ui/src/utils/index.js index 4830c04..f596ba7 100644 --- a/demo-web-ui/src/utils/index.js +++ b/demo-web-ui/src/utils/index.js @@ -1,117 +1,117 @@ -/** - * Created by PanJiaChen on 16/11/18. - */ - -/** - * Parse the time to string - * @param {(Object|string|number)} time - * @param {string} cFormat - * @returns {string | null} - */ -export function parseTime(time, cFormat) { - if (arguments.length === 0 || !time) { - return null - } - const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' - let date - if (typeof time === 'object') { - date = time - } else { - if ((typeof time === 'string')) { - if ((/^[0-9]+$/.test(time))) { - // support "1548221490638" - time = parseInt(time) - } else { - // support safari - // https://stackoverflow.com/questions/4310953/invalid-date-in-safari - time = time.replace(new RegExp(/-/gm), '/') - } - } - - if ((typeof time === 'number') && (time.toString().length === 10)) { - time = time * 1000 - } - date = new Date(time) - } - const formatObj = { - y: date.getFullYear(), - m: date.getMonth() + 1, - d: date.getDate(), - h: date.getHours(), - i: date.getMinutes(), - s: date.getSeconds(), - a: date.getDay() - } - const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { - const value = formatObj[key] - // Note: getDay() returns 0 on Sunday - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] } - return value.toString().padStart(2, '0') - }) - return time_str -} - -/** - * @param {number} time - * @param {string} option - * @returns {string} - */ -export function formatTime(time, option) { - if (('' + time).length === 10) { - time = parseInt(time) * 1000 - } else { - time = +time - } - const d = new Date(time) - const now = Date.now() - - const diff = (now - d) / 1000 - - if (diff < 30) { - return '刚刚' - } else if (diff < 3600) { - // less 1 hour - return Math.ceil(diff / 60) + '分钟前' - } else if (diff < 3600 * 24) { - return Math.ceil(diff / 3600) + '小时前' - } else if (diff < 3600 * 24 * 2) { - return '1天前' - } - if (option) { - return parseTime(time, option) - } else { - return ( - d.getMonth() + - 1 + - '月' + - d.getDate() + - '日' + - d.getHours() + - '时' + - d.getMinutes() + - '分' - ) - } -} - -/** - * @param {string} url - * @returns {Object} - */ -export 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 -} +/** + * Created by PanJiaChen on 16/11/18. + */ + +/** + * Parse the time to string + * @param {(Object|string|number)} time + * @param {string} cFormat + * @returns {string | null} + */ +export function parseTime(time, cFormat) { + if (arguments.length === 0 || !time) { + return null + } + const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + if ((typeof time === 'string')) { + if ((/^[0-9]+$/.test(time))) { + // support "1548221490638" + time = parseInt(time) + } else { + // support safari + // https://stackoverflow.com/questions/4310953/invalid-date-in-safari + time = time.replace(new RegExp(/-/gm), '/') + } + } + + if ((typeof time === 'number') && (time.toString().length === 10)) { + time = time * 1000 + } + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { + const value = formatObj[key] + // Note: getDay() returns 0 on Sunday + if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] } + return value.toString().padStart(2, '0') + }) + return time_str +} + +/** + * @param {number} time + * @param {string} option + * @returns {string} + */ +export function formatTime(time, option) { + if (('' + time).length === 10) { + time = parseInt(time) * 1000 + } else { + time = +time + } + const d = new Date(time) + const now = Date.now() + + const diff = (now - d) / 1000 + + if (diff < 30) { + return '刚刚' + } else if (diff < 3600) { + // less 1 hour + return Math.ceil(diff / 60) + '分钟前' + } else if (diff < 3600 * 24) { + return Math.ceil(diff / 3600) + '小时前' + } else if (diff < 3600 * 24 * 2) { + return '1天前' + } + if (option) { + return parseTime(time, option) + } else { + return ( + d.getMonth() + + 1 + + '月' + + d.getDate() + + '日' + + d.getHours() + + '时' + + d.getMinutes() + + '分' + ) + } +} + +/** + * @param {string} url + * @returns {Object} + */ +export 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 +} diff --git a/demo-web-ui/src/utils/print.js b/demo-web-ui/src/utils/print.js index 799a333..0ab8bf5 100644 --- a/demo-web-ui/src/utils/print.js +++ b/demo-web-ui/src/utils/print.js @@ -1,123 +1,123 @@ -// 打印类属性、方法定义 -/* eslint-disable */ -const Print =function(dom, options) { - if (!(this instanceof Print)) return new Print(dom, options); - - this.options = this.extend({ - 'noPrint': '.no-print' - }, options); - - if ((typeof dom) === "string") { - this.dom = document.querySelector(dom); - } else { - this.dom = dom; - } - - this.init(); -}; -Print.prototype = { - init: function () { - var content = this.getStyle() + this.getHtml(); - this.writeIframe(content); - }, - extend: function (obj, obj2) { - for (var k in obj2) { - obj[k] = obj2[k]; - } - return obj; - }, - - getStyle: function () { - var str = "", - styles = document.querySelectorAll('style,link'); - for (var i = 0; i < styles.length; i++) { - str += styles[i].outerHTML; - } - str += ""; - - return str; - }, - - getHtml: function () { - var inputs = document.querySelectorAll('input'); - var textareas = document.querySelectorAll('textarea'); - var selects = document.querySelectorAll('select'); - - for (var k in inputs) { - if (inputs[k].type == "checkbox" || inputs[k].type == "radio") { - if (inputs[k].checked == true) { - inputs[k].setAttribute('checked', "checked") - } else { - inputs[k].removeAttribute('checked') - } - } else if (inputs[k].type == "text") { - inputs[k].setAttribute('value', inputs[k].value) - } - } - - for (var k2 in textareas) { - if (textareas[k2].type == 'textarea') { - textareas[k2].innerHTML = textareas[k2].value - } - } - - for (var k3 in selects) { - if (selects[k3].type == 'select-one') { - var child = selects[k3].children; - for (var i in child) { - if (child[i].tagName == 'OPTION') { - if (child[i].selected == true) { - child[i].setAttribute('selected', "selected") - } else { - child[i].removeAttribute('selected') - } - } - } - } - } - - return this.dom.outerHTML; - }, - - writeIframe: function (content) { - var w, doc, iframe = document.createElement('iframe'), - f = document.body.appendChild(iframe); - iframe.id = "myIframe"; - iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;"; - - w = f.contentWindow || f.contentDocument; - doc = f.contentDocument || f.contentWindow.document; - doc.open(); - doc.write(content); - doc.close(); - this.toPrint(w); - - setTimeout(function () { - document.body.removeChild(iframe) - }, 100) - }, - - toPrint: function (frameWindow) { - try { - setTimeout(function () { - frameWindow.focus(); - try { - if (!frameWindow.document.execCommand('print', false, null)) { - frameWindow.print(); - } - } catch (e) { - frameWindow.print(); - } - frameWindow.close(); - }, 10); - } catch (err) { - console.log('err', err); - } - } -}; -const MyPlugin = {} -MyPlugin.install = function (Vue, options) { - // 4. 添加实例方法 - Vue.prototype.$print = Print -} +// 打印类属性、方法定义 +/* eslint-disable */ +const Print =function(dom, options) { + if (!(this instanceof Print)) return new Print(dom, options); + + this.options = this.extend({ + 'noPrint': '.no-print' + }, options); + + if ((typeof dom) === "string") { + this.dom = document.querySelector(dom); + } else { + this.dom = dom; + } + + this.init(); +}; +Print.prototype = { + init: function () { + var content = this.getStyle() + this.getHtml(); + this.writeIframe(content); + }, + extend: function (obj, obj2) { + for (var k in obj2) { + obj[k] = obj2[k]; + } + return obj; + }, + + getStyle: function () { + var str = "", + styles = document.querySelectorAll('style,link'); + for (var i = 0; i < styles.length; i++) { + str += styles[i].outerHTML; + } + str += ""; + + return str; + }, + + getHtml: function () { + var inputs = document.querySelectorAll('input'); + var textareas = document.querySelectorAll('textarea'); + var selects = document.querySelectorAll('select'); + + for (var k in inputs) { + if (inputs[k].type == "checkbox" || inputs[k].type == "radio") { + if (inputs[k].checked == true) { + inputs[k].setAttribute('checked', "checked") + } else { + inputs[k].removeAttribute('checked') + } + } else if (inputs[k].type == "text") { + inputs[k].setAttribute('value', inputs[k].value) + } + } + + for (var k2 in textareas) { + if (textareas[k2].type == 'textarea') { + textareas[k2].innerHTML = textareas[k2].value + } + } + + for (var k3 in selects) { + if (selects[k3].type == 'select-one') { + var child = selects[k3].children; + for (var i in child) { + if (child[i].tagName == 'OPTION') { + if (child[i].selected == true) { + child[i].setAttribute('selected', "selected") + } else { + child[i].removeAttribute('selected') + } + } + } + } + } + + return this.dom.outerHTML; + }, + + writeIframe: function (content) { + var w, doc, iframe = document.createElement('iframe'), + f = document.body.appendChild(iframe); + iframe.id = "myIframe"; + iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;"; + + w = f.contentWindow || f.contentDocument; + doc = f.contentDocument || f.contentWindow.document; + doc.open(); + doc.write(content); + doc.close(); + this.toPrint(w); + + setTimeout(function () { + document.body.removeChild(iframe) + }, 100) + }, + + toPrint: function (frameWindow) { + try { + setTimeout(function () { + frameWindow.focus(); + try { + if (!frameWindow.document.execCommand('print', false, null)) { + frameWindow.print(); + } + } catch (e) { + frameWindow.print(); + } + frameWindow.close(); + }, 10); + } catch (err) { + console.log('err', err); + } + } +}; +const MyPlugin = {} +MyPlugin.install = function (Vue, options) { + // 4. 添加实例方法 + Vue.prototype.$print = Print +} export default MyPlugin \ No newline at end of file diff --git a/demo-web-ui/src/utils/request.js b/demo-web-ui/src/utils/request.js index 023c665..7420aec 100644 --- a/demo-web-ui/src/utils/request.js +++ b/demo-web-ui/src/utils/request.js @@ -1,66 +1,66 @@ -import axios from 'axios' -import { MessageBox, Message } from 'element-ui' -import store from '@/store' -import { getToken, getStorage } from '@/utils/auth' - -// create an axios instance -console.log(process.env.VUE_APP_URL) -const service = axios.create({ - baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url - // timeout: 5000 // request timeout - headers:{'Content-Type':'application/x-www-form-urlencoded;'} -}) - -// request interceptor -service.interceptors.request.use( - config => { - config.params = { - ...config.params, - _t: Date.parse(new Date()) / 1000 - } - if (getStorage()) { - - config.headers['token'] = getStorage() - } - return config - }, - error => { - console.log(error) // for debug - return Promise.reject(error) - } -) - -// response interceptor -service.interceptors.response.use( - - response => { - const res = response.data - - // if the custom code is not 20000, it is judged as an error. - if (res.code != 200) { - if (res.msg == "请重新登录") { - // window.location.href = 'http://39.104.100.138:8082/' - } else { - Message({ - message: res.msg || 'Error', - type: 'error', - duration: 5 * 1000 - }) - } - return Promise.reject(new Error(res.message || 'Error')) - } else { - return res - } - }, - error => { - console.log('err' + error) // for debug - Message({ - message: error.message, - type: 'error', - duration: 5 * 1000 - }) - return Promise.reject(error) - } -) - -export default service +import axios from 'axios' +import { MessageBox, Message } from 'element-ui' +import store from '@/store' +import { getToken, getStorage } from '@/utils/auth' + +// create an axios instance +console.log('dadadadad', process.env.VUE_APP_URL) +const service = axios.create({ + baseURL: process.env.VUE_APP_URL, // url = base url + request url + timeout: 5000, // request timeout + // headers: { 'Content-Type': 'application/json' } +}) + +// request interceptor +service.interceptors.request.use( + config => { + config.params = { + ...config.params, + _t: Date.parse(new Date()) / 1000 + } + if (getStorage()) { + + config.headers['token'] = getStorage() + } + return config + }, + error => { + console.log(error) // for debug + return Promise.reject(error) + } +) + +// response interceptor +service.interceptors.response.use( + + response => { + const res = response.data + + // if the custom code is not 20000, it is judged as an error. + if (res.code != 200) { + if (res.msg == "请重新登录") { + // window.location.href = 'http://39.104.100.138:8082/' + } else { + Message({ + message: res.msg || 'Error', + type: 'error', + duration: 5 * 1000 + }) + } + return Promise.reject(new Error(res.message || 'Error')) + } else { + return res + } + }, + error => { + console.log('err' + error) // for debug + Message({ + message: error.message, + type: 'error', + duration: 5 * 1000 + }) + return Promise.reject(error) + } +) + +export default service diff --git a/demo-web-ui/src/utils/roles.js b/demo-web-ui/src/utils/roles.js index 07a6557..e2f000d 100644 --- a/demo-web-ui/src/utils/roles.js +++ b/demo-web-ui/src/utils/roles.js @@ -1,98 +1,98 @@ -/** - * 表单校验规则 - * 不符合规则时,返回错误文案 - * 符合规则时,返回false - */ - -var rules = {} - -// 是否必填 -rules.required = function (value) { - return (!!value || value === 0) ? false : "请输入内容" -}; - -// 最大字符长度 -rules.maxLength = function (value, size) { - var size = size || 256; - return String(value).length <= size ? false : ("最大不超过" + size + "个字符") -} - -// 只允许字母和数字 -rules.onlyAlphabetic = function (value) { - var reg = /^[0-9a-zA-Z]+$/; - return reg.test(value) ? false : "只能输入字母和数字" -} - -// 只允许字母数字和下划线 -rules.onlyAlphabeticUnderline = function (value) { - var reg = /^[0-9a-zA-Z_]+$/; - return reg.test(value) ? false : "只能输入字母、数字或下划线" -} - -// 只允许数字 -rules.onlyNumber = function (value) { - var reg = /^[0-9]+$/; - return reg.test(value) ? false : "只能输入数字" -} - -// 只允许字母 -rules.onlyLetter = function (value) { - var reg = /^[a-zA-Z]+$/; - return reg.test(value) ? false : "只能输入字母" -} - -// 特殊字符 -rules.noSpecial = function (value) { - var regEn = /[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im, - regCn = /[·!#¥(——):;“”‘、,|《。》?、【】[\]]/im; - return regEn.test(value) || regCn.test(value) ? false : "不能输入特殊字符" -} - -// 邮箱 -rules.email = function (value) { - var reg = /^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/; - return reg.test(value) ? false : "邮箱格式错误" -} - -// 手机号(以1开头的11位数字) -rules.phone = function (value) { - var reg = /^[1][3,4,5,7,8][0-9]{9}$/; - return reg.test(value) ? false : "手机格式错误" -} - -// 只允许汉字 -rules.chinese = function (value) { - var reg = /^[\u4e00-\u9fa5]+$/; - return reg.test(value) ? false : "只能输入汉字" -} - -// 密码格式校验 -rules.password = function (value) { - if (String(value).length < 6) { - return "密码长度不小于6位" - } - if (String(value).length > 18) { - return "密码长度不超过18位" - } - var level = 0; - if (value.search(/[a-z]/) > -1) { - level++; //密码中包含小写字母 - } - if (value.search(/[A-Z]/) > -1) { - level++; //密码中包含大写字母 - } - if (value.search(/[0-9]/) > -1) { - level++; //密码中包含数组 - } - if (value.search(/[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im) > -1) { - level++; //密码中包含特殊符号 - } - if(level<2){ - return "密码至少包含大写字母、小写字母、数字、标点符号中的两种" - }else{ - return level; // 当前密码强度为level(2/3/4) - } -} - - +/** + * 表单校验规则 + * 不符合规则时,返回错误文案 + * 符合规则时,返回false + */ + +var rules = {} + +// 是否必填 +rules.required = function (value) { + return (!!value || value === 0) ? false : "请输入内容" +}; + +// 最大字符长度 +rules.maxLength = function (value, size) { + var size = size || 256; + return String(value).length <= size ? false : ("最大不超过" + size + "个字符") +} + +// 只允许字母和数字 +rules.onlyAlphabetic = function (value) { + var reg = /^[0-9a-zA-Z]+$/; + return reg.test(value) ? false : "只能输入字母和数字" +} + +// 只允许字母数字和下划线 +rules.onlyAlphabeticUnderline = function (value) { + var reg = /^[0-9a-zA-Z_]+$/; + return reg.test(value) ? false : "只能输入字母、数字或下划线" +} + +// 只允许数字 +rules.onlyNumber = function (value) { + var reg = /^[0-9]+$/; + return reg.test(value) ? false : "只能输入数字" +} + +// 只允许字母 +rules.onlyLetter = function (value) { + var reg = /^[a-zA-Z]+$/; + return reg.test(value) ? false : "只能输入字母" +} + +// 特殊字符 +rules.noSpecial = function (value) { + var regEn = /[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im, + regCn = /[·!#¥(——):;“”‘、,|《。》?、【】[\]]/im; + return regEn.test(value) || regCn.test(value) ? false : "不能输入特殊字符" +} + +// 邮箱 +rules.email = function (value) { + var reg = /^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/; + return reg.test(value) ? false : "邮箱格式错误" +} + +// 手机号(以1开头的11位数字) +rules.phone = function (value) { + var reg = /^[1][3,4,5,7,8][0-9]{9}$/; + return reg.test(value) ? false : "手机格式错误" +} + +// 只允许汉字 +rules.chinese = function (value) { + var reg = /^[\u4e00-\u9fa5]+$/; + return reg.test(value) ? false : "只能输入汉字" +} + +// 密码格式校验 +rules.password = function (value) { + if (String(value).length < 6) { + return "密码长度不小于6位" + } + if (String(value).length > 18) { + return "密码长度不超过18位" + } + var level = 0; + if (value.search(/[a-z]/) > -1) { + level++; //密码中包含小写字母 + } + if (value.search(/[A-Z]/) > -1) { + level++; //密码中包含大写字母 + } + if (value.search(/[0-9]/) > -1) { + level++; //密码中包含数组 + } + if (value.search(/[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im) > -1) { + level++; //密码中包含特殊符号 + } + if(level<2){ + return "密码至少包含大写字母、小写字母、数字、标点符号中的两种" + }else{ + return level; // 当前密码强度为level(2/3/4) + } +} + + export default rules; \ No newline at end of file diff --git a/demo-web-ui/src/utils/validate.js b/demo-web-ui/src/utils/validate.js index 8d962ad..f484543 100644 --- a/demo-web-ui/src/utils/validate.js +++ b/demo-web-ui/src/utils/validate.js @@ -1,20 +1,20 @@ -/** - * Created by PanJiaChen on 16/11/18. - */ - -/** - * @param {string} path - * @returns {Boolean} - */ -export function isExternal(path) { - return /^(https?:|mailto:|tel:)/.test(path) -} - -/** - * @param {string} str - * @returns {Boolean} - */ -export function validUsername(str) { - const valid_map = ['admin', 'editor'] - return valid_map.indexOf(str.trim()) >= 0 -} +/** + * Created by PanJiaChen on 16/11/18. + */ + +/** + * @param {string} path + * @returns {Boolean} + */ +export function isExternal(path) { + return /^(https?:|mailto:|tel:)/.test(path) +} + +/** + * @param {string} str + * @returns {Boolean} + */ +export function validUsername(str) { + const valid_map = ['admin', 'editor'] + return valid_map.indexOf(str.trim()) >= 0 +} diff --git a/demo-web-ui/src/views/404.vue b/demo-web-ui/src/views/404.vue index 1791f55..c21ebce 100644 --- a/demo-web-ui/src/views/404.vue +++ b/demo-web-ui/src/views/404.vue @@ -1,228 +1,228 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Home/Home.vue b/demo-web-ui/src/views/Home/Home.vue deleted file mode 100644 index 749b8f0..0000000 --- a/demo-web-ui/src/views/Home/Home.vue +++ /dev/null @@ -1,655 +0,0 @@ - - - - - diff --git a/demo-web-ui/src/views/Process/BpmData.js b/demo-web-ui/src/views/Process/BpmData.js index 672ca44..0a24b02 100644 --- a/demo-web-ui/src/views/Process/BpmData.js +++ b/demo-web-ui/src/views/Process/BpmData.js @@ -1,68 +1,68 @@ -/** - * 存储流程设计相关参数 - */ -export default class BpmData { - constructor() { - this.controls = [] // 设计器控件 - this.init() - } - - init() { - this.controls = [ - { - action: 'create.start-event', - title: '开始' - }, - { - action: 'create.intermediate-event', - title: '中间' - }, - { - action: 'create.end-event', - title: '结束' - }, - { - action: 'create.exclusive-gateway', - title: '网关' - }, - { - action: 'create.task', - title: '任务' - }, - { - action: 'create.user-task', - title: '用户任务' - }, - { - action: 'create.user-sign-task', - title: '会签任务' - }, - { - action: 'create.subprocess-expanded', - title: '子流程' - }, - { - action: 'create.data-object', - title: '数据对象' - }, - { - action: 'create.data-store', - title: '数据存储' - }, - { - action: 'create.participant-expanded', - title: '扩展流程' - }, - { - action: 'create.group', - title: '分组' - } - ] - } - - // 获取控件配置信息 - getControl(action) { - const result = this.controls.filter(item => item.action === action) - return result[0] || {} - } -} +/** + * 存储流程设计相关参数 + */ +export default class BpmData { + constructor() { + this.controls = [] // 设计器控件 + this.init() + } + + init() { + this.controls = [ + { + action: 'create.start-event', + title: '开始' + }, + { + action: 'create.intermediate-event', + title: '中间' + }, + { + action: 'create.end-event', + title: '结束' + }, + { + action: 'create.exclusive-gateway', + title: '网关' + }, + { + action: 'create.task', + title: '任务' + }, + { + action: 'create.user-task', + title: '用户任务' + }, + { + action: 'create.user-sign-task', + title: '会签任务' + }, + { + action: 'create.subprocess-expanded', + title: '子流程' + }, + { + action: 'create.data-object', + title: '数据对象' + }, + { + action: 'create.data-store', + title: '数据存储' + }, + { + action: 'create.participant-expanded', + title: '扩展流程' + }, + { + action: 'create.group', + title: '分组' + } + ] + } + + // 获取控件配置信息 + getControl(action) { + const result = this.controls.filter(item => item.action === action) + return result[0] || {} + } +} diff --git a/demo-web-ui/src/views/Process/PropertyPanel.vue b/demo-web-ui/src/views/Process/PropertyPanel.vue index 970bd0f..ce6f5d6 100644 --- a/demo-web-ui/src/views/Process/PropertyPanel.vue +++ b/demo-web-ui/src/views/Process/PropertyPanel.vue @@ -1,169 +1,169 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/common/customTranslate.js b/demo-web-ui/src/views/Process/common/customTranslate.js index fa05f9d..4794d01 100644 --- a/demo-web-ui/src/views/Process/common/customTranslate.js +++ b/demo-web-ui/src/views/Process/common/customTranslate.js @@ -1,20 +1,20 @@ -import translations from '../lang/zh' - -export default function customTranslate(template, replacements) { - replacements = replacements || {} - - // Translate - template = translations[template] || template - - // Replace - return template.replace(/{([^}]+)}/g, function(_, key) { - var str = replacements[key] - if ( - translations[replacements[key]] !== null && - translations[replacements[key]] !== 'undefined' - ) { - str = translations[replacements[key]] - } - return str || '{' + key + '}' - }) -} +import translations from '../lang/zh' + +export default function customTranslate(template, replacements) { + replacements = replacements || {} + + // Translate + template = translations[template] || template + + // Replace + return template.replace(/{([^}]+)}/g, function(_, key) { + var str = replacements[key] + if ( + translations[replacements[key]] !== null && + translations[replacements[key]] !== 'undefined' + ) { + str = translations[replacements[key]] + } + return str || '{' + key + '}' + }) +} diff --git a/demo-web-ui/src/views/Process/common/mixinExecutionListener.js b/demo-web-ui/src/views/Process/common/mixinExecutionListener.js index 23295b0..050cf95 100644 --- a/demo-web-ui/src/views/Process/common/mixinExecutionListener.js +++ b/demo-web-ui/src/views/Process/common/mixinExecutionListener.js @@ -1,24 +1,24 @@ - -import executionListenerDialog from '../components/nodePanel/property/executionListener' -export default { - components: { - executionListenerDialog - }, - data() { - return { - executionListenerLength: 0, - dialogName: null - } - }, - methods: { - computedExecutionListenerLength() { - this.executionListenerLength = this.element.businessObject.extensionElements?.values?.length ?? 0 - }, - finishExecutionListener() { - if (this.dialogName === 'executionListenerDialog') { - this.computedExecutionListenerLength() - } - this.dialogName = '' - } - } -} + +import executionListenerDialog from '../components/nodePanel/property/executionListener' +export default { + components: { + executionListenerDialog + }, + data() { + return { + executionListenerLength: 0, + dialogName: null + } + }, + methods: { + computedExecutionListenerLength() { + this.executionListenerLength = this.element.businessObject.extensionElements?.values?.length ?? 0 + }, + finishExecutionListener() { + if (this.dialogName === 'executionListenerDialog') { + this.computedExecutionListenerLength() + } + this.dialogName = '' + } + } +} diff --git a/demo-web-ui/src/views/Process/common/mixinPanel.js b/demo-web-ui/src/views/Process/common/mixinPanel.js index 8686b98..b4a3dfe 100644 --- a/demo-web-ui/src/views/Process/common/mixinPanel.js +++ b/demo-web-ui/src/views/Process/common/mixinPanel.js @@ -1,70 +1,70 @@ -import xcrud from 'xcrud' -import golbalConfig from 'xcrud/package/common/config' -import showConfig from '../flowable/showConfig' -golbalConfig.set({ - input: { - // size: 'mini' - }, - select: { - // size: 'mini' - }, - colorPicker: { - showAlpha: true - }, - xform: { - form: { - labelWidth: 'auto' - // size: 'mini' - } - } -}) -export default { - components: { xForm: xcrud.xForm }, - props: { - modeler: { - type: Object, - required: true - }, - element: { - type: Object, - required: true - }, - categorys: { - type: Array, - default: () => [] - } - }, - watch: { - 'formData.id': function(val) { - this.updateProperties({ id: val }) - }, - 'formData.name': function(val) { - this.updateProperties({ name: val }) - }, - 'formData.documentation': function(val) { - if (!val) { - this.updateProperties({ documentation: [] }) - return - } - const documentationElement = this.modeler.get('moddle').create('bpmn:Documentation', { text: val }) - this.updateProperties({ documentation: [documentationElement] }) - } - }, - methods: { - updateProperties(properties) { - const modeling = this.modeler.get('modeling') - modeling.updateProperties(this.element, properties) - } - }, - computed: { - elementType() { - const bizObj = this.element.businessObject - return bizObj.eventDefinitions - ? bizObj.eventDefinitions[0].$type - : bizObj.$type - }, - showConfig() { - return showConfig[this.elementType] || {} - } - } -} +import xcrud from 'xcrud' +import golbalConfig from 'xcrud/package/common/config' +import showConfig from '../flowable/showConfig' +golbalConfig.set({ + input: { + // size: 'mini' + }, + select: { + // size: 'mini' + }, + colorPicker: { + showAlpha: true + }, + xform: { + form: { + labelWidth: 'auto' + // size: 'mini' + } + } +}) +export default { + components: { xForm: xcrud.xForm }, + props: { + modeler: { + type: Object, + required: true + }, + element: { + type: Object, + required: true + }, + categorys: { + type: Array, + default: () => [] + } + }, + watch: { + 'formData.id': function(val) { + this.updateProperties({ id: val }) + }, + 'formData.name': function(val) { + this.updateProperties({ name: val }) + }, + 'formData.documentation': function(val) { + if (!val) { + this.updateProperties({ documentation: [] }) + return + } + const documentationElement = this.modeler.get('moddle').create('bpmn:Documentation', { text: val }) + this.updateProperties({ documentation: [documentationElement] }) + } + }, + methods: { + updateProperties(properties) { + const modeling = this.modeler.get('modeling') + modeling.updateProperties(this.element, properties) + } + }, + computed: { + elementType() { + const bizObj = this.element.businessObject + return bizObj.eventDefinitions + ? bizObj.eventDefinitions[0].$type + : bizObj.$type + }, + showConfig() { + return showConfig[this.elementType] || {} + } + } +} diff --git a/demo-web-ui/src/views/Process/common/mixinXcrud.js b/demo-web-ui/src/views/Process/common/mixinXcrud.js index 1f7ee5b..ca17fa3 100644 --- a/demo-web-ui/src/views/Process/common/mixinXcrud.js +++ b/demo-web-ui/src/views/Process/common/mixinXcrud.js @@ -1,22 +1,22 @@ -import xcrud from 'xcrud' -import golbalConfig from 'xcrud/package/common/config' -golbalConfig.set({ - input: { - // size: 'mini' - }, - select: { - // size: 'mini' - }, - colorPicker: { - showAlpha: true - }, - xform: { - form: { - labelWidth: 'auto' - // size: 'mini' - } - } -}) -export default { - components: { xForm: xcrud.xForm } -} +import xcrud from 'xcrud' +import golbalConfig from 'xcrud/package/common/config' +golbalConfig.set({ + input: { + // size: 'mini' + }, + select: { + // size: 'mini' + }, + colorPicker: { + showAlpha: true + }, + xform: { + form: { + labelWidth: 'auto' + // size: 'mini' + } + } +}) +export default { + components: { xForm: xcrud.xForm } +} diff --git a/demo-web-ui/src/views/Process/common/parseElement.js b/demo-web-ui/src/views/Process/common/parseElement.js index 63cf336..584e837 100644 --- a/demo-web-ui/src/views/Process/common/parseElement.js +++ b/demo-web-ui/src/views/Process/common/parseElement.js @@ -1,53 +1,53 @@ -export function commonParse(element) { - const result = { - ...element.businessObject, - ...element.businessObject.$attrs - } - return formatJsonKeyValue(result) -} - -export function formatJsonKeyValue(result) { - // 移除flowable前缀,格式化数组 - for (const key in result) { - if (key.indexOf('flowable:') === 0) { - const newKey = key.replace('flowable:', '') - result[newKey] = result[key] - delete result[key] - } - } - result = documentationParse(result) - return result -} - -export function documentationParse(obj) { - if ('documentation' in obj) { - let str = '' - obj.documentation.forEach(item => { - str += item.text - }) - obj.documentation = str - } - return obj -} - -export function conditionExpressionParse(obj) { - if ('conditionExpression' in obj) { - obj.conditionExpression = obj.conditionExpression.body - } - return obj -} - -export function userTaskParse(obj) { - for (const key in obj) { - if (key === 'candidateUsers') { - obj.userType = 'candidateUsers' - obj[key] = obj[key]?.split(',') || [] - } else if (key === 'candidateGroups') { - obj.userType = 'candidateGroups' - obj[key] = obj[key]?.split(',') || [] - } else if (key === 'assignee') { - obj.userType = 'assignee' - } - } - return obj -} +export function commonParse(element) { + const result = { + ...element.businessObject, + ...element.businessObject.$attrs + } + return formatJsonKeyValue(result) +} + +export function formatJsonKeyValue(result) { + // 移除flowable前缀,格式化数组 + for (const key in result) { + if (key.indexOf('flowable:') === 0) { + const newKey = key.replace('flowable:', '') + result[newKey] = result[key] + delete result[key] + } + } + result = documentationParse(result) + return result +} + +export function documentationParse(obj) { + if ('documentation' in obj) { + let str = '' + obj.documentation.forEach(item => { + str += item.text + }) + obj.documentation = str + } + return obj +} + +export function conditionExpressionParse(obj) { + if ('conditionExpression' in obj) { + obj.conditionExpression = obj.conditionExpression.body + } + return obj +} + +export function userTaskParse(obj) { + for (const key in obj) { + if (key === 'candidateUsers') { + obj.userType = 'candidateUsers' + obj[key] = obj[key]?.split(',') || [] + } else if (key === 'candidateGroups') { + obj.userType = 'candidateGroups' + obj[key] = obj[key]?.split(',') || [] + } else if (key === 'assignee') { + obj.userType = 'assignee' + } + } + return obj +} diff --git a/demo-web-ui/src/views/Process/components/custom/customContextPad.vue b/demo-web-ui/src/views/Process/components/custom/customContextPad.vue index 89c2f68..86b072e 100644 --- a/demo-web-ui/src/views/Process/components/custom/customContextPad.vue +++ b/demo-web-ui/src/views/Process/components/custom/customContextPad.vue @@ -1,24 +1,24 @@ -export default class CustomContextPad { - constructor(config, contextPad, create, elementFactory, injector, translate) { - this.create = create; - this.elementFactory = elementFactory; - this.translate = translate; - - if (config.autoPlace !== false) { - this.autoPlace = injector.get('autoPlace', false); - } - - contextPad.registerProvider(this); // 定义这是一个contextPad - } - - getContextPadEntries(element) {} -} - -CustomContextPad.$inject = [ - 'config', - 'contextPad', - 'create', - 'elementFactory', - 'injector', - 'translate' -]; +export default class CustomContextPad { + constructor(config, contextPad, create, elementFactory, injector, translate) { + this.create = create; + this.elementFactory = elementFactory; + this.translate = translate; + + if (config.autoPlace !== false) { + this.autoPlace = injector.get('autoPlace', false); + } + + contextPad.registerProvider(this); // 定义这是一个contextPad + } + + getContextPadEntries(element) {} +} + +CustomContextPad.$inject = [ + 'config', + 'contextPad', + 'create', + 'elementFactory', + 'injector', + 'translate' +]; diff --git a/demo-web-ui/src/views/Process/components/nodePanel/gateway.vue b/demo-web-ui/src/views/Process/components/nodePanel/gateway.vue index db18153..1bf8de4 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/gateway.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/gateway.vue @@ -1,81 +1,81 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/components/nodePanel/process.vue b/demo-web-ui/src/views/Process/components/nodePanel/process.vue index 6946f1e..e83c3b9 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/process.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/process.vue @@ -1,113 +1,113 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/components/nodePanel/property/executionListener.vue b/demo-web-ui/src/views/Process/components/nodePanel/property/executionListener.vue index 1a15b8a..f0de3a8 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/property/executionListener.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/property/executionListener.vue @@ -1,194 +1,194 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/components/nodePanel/property/listenerParam.vue b/demo-web-ui/src/views/Process/components/nodePanel/property/listenerParam.vue index dd8ace1..11f5d74 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/property/listenerParam.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/property/listenerParam.vue @@ -1,96 +1,96 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/components/nodePanel/property/multiInstance.vue b/demo-web-ui/src/views/Process/components/nodePanel/property/multiInstance.vue index 357b716..de9fed7 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/property/multiInstance.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/property/multiInstance.vue @@ -1,117 +1,117 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/components/nodePanel/property/signal.vue b/demo-web-ui/src/views/Process/components/nodePanel/property/signal.vue index 2c29d73..ec5cb13 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/property/signal.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/property/signal.vue @@ -1,124 +1,124 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/components/nodePanel/property/taskListener.vue b/demo-web-ui/src/views/Process/components/nodePanel/property/taskListener.vue index 0f72a89..7380498 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/property/taskListener.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/property/taskListener.vue @@ -1,196 +1,196 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/components/nodePanel/sequenceFlow.vue b/demo-web-ui/src/views/Process/components/nodePanel/sequenceFlow.vue index 178cd7d..fbad8c6 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/sequenceFlow.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/sequenceFlow.vue @@ -1,92 +1,92 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/components/nodePanel/startEnd.vue b/demo-web-ui/src/views/Process/components/nodePanel/startEnd.vue index 2740bf6..fa9c643 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/startEnd.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/startEnd.vue @@ -1,94 +1,94 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/components/nodePanel/task.vue b/demo-web-ui/src/views/Process/components/nodePanel/task.vue index 61a00d1..7c42e2f 100644 --- a/demo-web-ui/src/views/Process/components/nodePanel/task.vue +++ b/demo-web-ui/src/views/Process/components/nodePanel/task.vue @@ -1,426 +1,426 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/flowable/flowable.json b/demo-web-ui/src/views/Process/flowable/flowable.json index 73ac308..bda0fcd 100644 --- a/demo-web-ui/src/views/Process/flowable/flowable.json +++ b/demo-web-ui/src/views/Process/flowable/flowable.json @@ -1,1194 +1,1194 @@ -{ - "name": "Flowable", - "uri": "http://flowable.org/bpmn", - "prefix": "flowable", - "xml": { - "tagAlias": "lowerCase" - }, - "associations": [], - "types": [ - { - "name": "InOutBinding", - "superClass": ["Element"], - "isAbstract": true, - "properties": [ - { - "name": "source", - "isAttr": true, - "type": "String" - }, - { - "name": "sourceExpression", - "isAttr": true, - "type": "String" - }, - { - "name": "target", - "isAttr": true, - "type": "String" - }, - { - "name": "businessKey", - "isAttr": true, - "type": "String" - }, - { - "name": "local", - "isAttr": true, - "type": "Boolean", - "default": false - }, - { - "name": "variables", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "In", - "superClass": ["InOutBinding"], - "meta": { - "allowedIn": ["bpmn:CallActivity"] - } - }, - { - "name": "Out", - "superClass": ["InOutBinding"], - "meta": { - "allowedIn": ["bpmn:CallActivity"] - } - }, - { - "name": "AsyncCapable", - "isAbstract": true, - "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], - "properties": [ - { - "name": "async", - "isAttr": true, - "type": "Boolean", - "default": false - }, - { - "name": "asyncBefore", - "isAttr": true, - "type": "Boolean", - "default": false - }, - { - "name": "asyncAfter", - "isAttr": true, - "type": "Boolean", - "default": false - }, - { - "name": "exclusive", - "isAttr": true, - "type": "Boolean", - "default": true - } - ] - }, - { - "name": "flowable:in", - "superClass": ["Element"], - "properties": [ - { - "name": "source", - "type": "string", - "isAttr": true - }, - { - "name": "target", - "type": "string", - "isAttr": true - } - ] - }, - { - "name": "flowable:out", - "superClass": ["Element"], - "properties": [ - { - "name": "source", - "type": "string", - "isAttr": true - }, - { - "name": "target", - "type": "string", - "isAttr": true - } - ] - }, - { - "name": "BoundaryEvent", - "superClass": ["CatchEvent"], - "properties": [ - { - "name": "cancelActivity", - "default": true, - "isAttr": true, - "type": "Boolean" - }, - { - "name": "attachedToRef", - "type": "Activity", - "isAttr": true, - "isReference": true - } - ] - }, - { - "name": "JobPriorized", - "isAbstract": true, - "extends": ["bpmn:Process", "flowable:AsyncCapable"], - "properties": [ - { - "name": "jobPriority", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "SignalEventDefinition", - "isAbstract": true, - "extends": ["bpmn:SignalEventDefinition"], - "properties": [ - { - "name": "async", - "isAttr": true, - "type": "Boolean", - "default": false - } - ] - }, - { - "name": "ErrorEventDefinition", - "isAbstract": true, - "extends": ["bpmn:ErrorEventDefinition"], - "properties": [ - { - "name": "errorCodeVariable", - "isAttr": true, - "type": "String" - }, - { - "name": "errorMessageVariable", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "Error", - "isAbstract": true, - "extends": ["bpmn:Error"], - "properties": [ - { - "name": "flowable:errorMessage", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "PotentialStarter", - "superClass": ["Element"], - "properties": [ - { - "name": "resourceAssignmentExpression", - "type": "bpmn:ResourceAssignmentExpression" - } - ] - }, - { - "name": "UserTask", - "isAbstract": true, - "extends": ["bpmn:UserTask"], - "properties": [ - { - "name": "timerEventDefinition", - "type": "Expression" - }, - { - "name": "multiInstanceLoopCharacteristics", - "type": "MultiInstanceLoopCharacteristics" - } - ] - }, - { - "name": "StartEvent", - "isAbstract": true, - "extends": ["bpmn:StartEvent"], - "properties": [ - { - "name": "timerEventDefinition", - "type": "Expression" - } - ] - }, - { - "name": "FormSupported", - "isAbstract": true, - "extends": ["bpmn:StartEvent", "bpmn:UserTask"], - "properties": [ - { - "name": "formHandlerClass", - "isAttr": true, - "type": "String" - }, - { - "name": "formKey", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "TemplateSupported", - "isAbstract": true, - "extends": ["bpmn:Process", "bpmn:FlowElement"], - "properties": [ - { - "name": "modelerTemplate", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "Initiator", - "isAbstract": true, - "extends": ["bpmn:StartEvent"], - "properties": [ - { - "name": "initiator", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "ScriptTask", - "isAbstract": true, - "extends": ["bpmn:ScriptTask"], - "properties": [ - { - "name": "resultVariable", - "isAttr": true, - "type": "String" - }, - { - "name": "resource", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "Process", - "isAbstract": true, - "extends": ["bpmn:Process"], - "properties": [ - { - "name": "candidateStarterGroups", - "isAttr": true, - "type": "String" - }, - { - "name": "candidateStarterUsers", - "isAttr": true, - "type": "String" - }, - { - "name": "versionTag", - "isAttr": true, - "type": "String" - }, - { - "name": "historyTimeToLive", - "isAttr": true, - "type": "String" - }, - { - "name": "isStartableInTasklist", - "isAttr": true, - "type": "Boolean", - "default": true - } - ] - }, - { - "name": "EscalationEventDefinition", - "isAbstract": true, - "extends": ["bpmn:EscalationEventDefinition"], - "properties": [ - { - "name": "escalationCodeVariable", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "FormalExpression", - "isAbstract": true, - "extends": ["bpmn:FormalExpression"], - "properties": [ - { - "name": "resource", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "Assignable", - "extends": ["bpmn:UserTask"], - "properties": [ - { - "name": "candidateGroups", - "isAttr": true, - "type": "String" - }, - { - "name": "dueDate", - "isAttr": true, - "type": "String" - }, - { - "name": "followUpDate", - "isAttr": true, - "type": "String" - }, - { - "name": "priority", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "CallActivity", - "extends": ["bpmn:CallActivity"], - "properties": [ - { - "name": "calledElementBinding", - "isAttr": true, - "type": "String", - "default": "latest" - }, - { - "name": "calledElementVersion", - "isAttr": true, - "type": "String" - }, - { - "name": "calledElementVersionTag", - "isAttr": true, - "type": "String" - }, - { - "name": "calledElementTenantId", - "isAttr": true, - "type": "String" - }, - { - "name": "caseRef", - "isAttr": true, - "type": "String" - }, - { - "name": "caseBinding", - "isAttr": true, - "type": "String", - "default": "latest" - }, - { - "name": "caseVersion", - "isAttr": true, - "type": "String" - }, - { - "name": "caseTenantId", - "isAttr": true, - "type": "String" - }, - { - "name": "variableMappingClass", - "isAttr": true, - "type": "String" - }, - { - "name": "variableMappingDelegateExpression", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "ServiceTaskLike", - "extends": [ - "bpmn:ServiceTask", - "bpmn:BusinessRuleTask", - "bpmn:SendTask", - "bpmn:MessageEventDefinition" - ], - "properties": [ - { - "name": "expression", - "isAttr": true, - "type": "String" - }, - { - "name": "class", - "isAttr": true, - "type": "String" - }, - { - "name": "delegateExpression", - "isAttr": true, - "type": "String" - }, - { - "name": "resultVariable", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "ExclusiveGateway", - "isAbstract": true, - "extends": ["bpmn:ExclusiveGateway"], - "properties": [ - { - "name": "serviceClass", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "DmnCapable", - "extends": ["bpmn:BusinessRuleTask"], - "properties": [ - { - "name": "decisionRef", - "isAttr": true, - "type": "String" - }, - { - "name": "decisionRefBinding", - "isAttr": true, - "type": "String", - "default": "latest" - }, - { - "name": "decisionRefVersion", - "isAttr": true, - "type": "String" - }, - { - "name": "mapDecisionResult", - "isAttr": true, - "type": "String", - "default": "resultList" - }, - { - "name": "decisionRefTenantId", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "ExternalCapable", - "extends": ["flowable:ServiceTaskLike"], - "properties": [ - { - "name": "type", - "isAttr": true, - "type": "String" - }, - { - "name": "topic", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "TaskPriorized", - "extends": ["bpmn:Process", "flowable:ExternalCapable"], - "properties": [ - { - "name": "taskPriority", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "Properties", - "superClass": ["Element"], - "meta": { - "allowedIn": ["*"] - }, - "properties": [ - { - "name": "values", - "type": "Property", - "isMany": true - } - ] - }, - { - "name": "Property", - "superClass": ["Element"], - "properties": [ - { - "name": "id", - "type": "String", - "isAttr": true - }, - { - "name": "name", - "type": "String", - "isAttr": true - }, - { - "name": "value", - "type": "String", - "isAttr": true - } - ] - }, - { - "name": "Connector", - "superClass": ["Element"], - "meta": { - "allowedIn": ["flowable:ServiceTaskLike"] - }, - "properties": [ - { - "name": "inputOutput", - "type": "InputOutput" - }, - { - "name": "connectorId", - "type": "String" - } - ] - }, - { - "name": "InputOutput", - "superClass": ["Element"], - "meta": { - "allowedIn": ["bpmn:FlowNode", "flowable:Connector"] - }, - "properties": [ - { - "name": "inputOutput", - "type": "InputOutput" - }, - { - "name": "connectorId", - "type": "String" - }, - { - "name": "inputParameters", - "isMany": true, - "type": "InputParameter" - }, - { - "name": "outputParameters", - "isMany": true, - "type": "OutputParameter" - } - ] - }, - { - "name": "InputOutputParameter", - "properties": [ - { - "name": "name", - "isAttr": true, - "type": "String" - }, - { - "name": "value", - "isBody": true, - "type": "String" - }, - { - "name": "definition", - "type": "InputOutputParameterDefinition" - } - ] - }, - { - "name": "InputOutputParameterDefinition", - "isAbstract": true - }, - { - "name": "List", - "superClass": ["InputOutputParameterDefinition"], - "properties": [ - { - "name": "items", - "isMany": true, - "type": "InputOutputParameterDefinition" - } - ] - }, - { - "name": "Map", - "superClass": ["InputOutputParameterDefinition"], - "properties": [ - { - "name": "entries", - "isMany": true, - "type": "Entry" - } - ] - }, - { - "name": "Entry", - "properties": [ - { - "name": "key", - "isAttr": true, - "type": "String" - }, - { - "name": "value", - "isBody": true, - "type": "String" - }, - { - "name": "definition", - "type": "InputOutputParameterDefinition" - } - ] - }, - { - "name": "Value", - "superClass": ["InputOutputParameterDefinition"], - "properties": [ - { - "name": "id", - "isAttr": true, - "type": "String" - }, - { - "name": "name", - "isAttr": true, - "type": "String" - }, - { - "name": "value", - "isBody": true, - "type": "String" - } - ] - }, - { - "name": "Script", - "superClass": ["InputOutputParameterDefinition"], - "properties": [ - { - "name": "scriptFormat", - "isAttr": true, - "type": "String" - }, - { - "name": "resource", - "isAttr": true, - "type": "String" - }, - { - "name": "value", - "isBody": true, - "type": "String" - } - ] - }, - { - "name": "Field", - "superClass": ["Element"], - "meta": { - "allowedIn": [ - "flowable:ServiceTaskLike", - "flowable:ExecutionListener", - "flowable:TaskListener" - ] - }, - "properties": [ - { - "name": "name", - "isAttr": true, - "type": "String" - }, - { - "name": "expression", - "isAttr": true, - "type": "expression" - }, - { - "name": "string", - "type": "string" - }, - { - "name": "stringValue", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "string", - "superClass": ["Element"], - "meta": { - "allowedIn": [ - "flowable:Field" - ] - }, - "properties": [ - { - "name": "body", - "isBody": true, - "type": "String" - } - ] - }, - { - "name": "expression", - "superClass": ["Element"], - "meta": { - "allowedIn": [ - "flowable:Field" - ] - }, - "properties": [ - { - "name": "body", - "isBody": true, - "type": "String" - } - ] - }, - { - "name": "InputParameter", - "superClass": ["InputOutputParameter"] - }, - { - "name": "OutputParameter", - "superClass": ["InputOutputParameter"] - }, - { - "name": "Collectable", - "isAbstract": true, - "extends": ["bpmn:MultiInstanceLoopCharacteristics"], - "superClass": ["flowable:AsyncCapable"], - "properties": [ - { - "name": "collection", - "isAttr": true, - "type": "String" - }, - { - "name": "elementVariable", - "isAttr": true, - "type": "String" - } - ] - }, - { - "name": "SequenceFlow", - "superClass": ["FlowElement"], - "properties": [ - { - "name": "isImmediate", - "isAttr": true, - "type": "Boolean" - }, - { - "name": "conditionExpression", - "type": "Expression" - }, - { - "name": "sourceRef", - "type": "FlowNode", - "isAttr": true, - "isReference": true - }, - { - "name": "targetRef", - "type": "FlowNode", - "isAttr": true, - "isReference": true - } - ] - }, - { - "name": "MultiInstanceLoopCharacteristics", - "superClass": ["LoopCharacteristics"], - "properties": [ - { - "name": "isSequential", - "default": false, - "isAttr": true, - "type": "Boolean" - }, - { - "name": "behavior", - "type": "MultiInstanceBehavior", - "default": "All", - "isAttr": true - }, - { - "name": "loopCardinality", - "type": "Expression", - "xml": { - "serialize": "xsi:type" - } - }, - { - "name": "loopDataInputRef", - "type": "ItemAwareElement", - "isReference": true - }, - { - "name": "loopDataOutputRef", - "type": "ItemAwareElement", - "isReference": true - }, - { - "name": "inputDataItem", - "type": "DataInput", - "xml": { - "serialize": "property" - } - }, - { - "name": "outputDataItem", - "type": "DataOutput", - "xml": { - "serialize": "property" - } - }, - { - "name": "complexBehaviorDefinition", - "type": "ComplexBehaviorDefinition", - "isMany": true - }, - { - "name": "completionCondition", - "type": "Expression", - "xml": { - "serialize": "xsi:type" - } - }, - { - "name": "oneBehaviorEventRef", - "type": "EventDefinition", - "isAttr": true, - "isReference": true - }, - { - "name": "noneBehaviorEventRef", - "type": "EventDefinition", - "isAttr": true, - "isReference": true - } - ] - }, - { - "name": "FailedJobRetryTimeCycle", - "superClass": ["Element"], - "meta": { - "allowedIn": ["flowable:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] - }, - "properties": [ - { - "name": "body", - "isBody": true, - "type": "String" - } - ] - }, - { - "name": "ExecutionListener", - "superClass": ["Element"], - "meta": { - "allowedIn": [ - "bpmn:Task", - "bpmn:ServiceTask", - "bpmn:UserTask", - "bpmn:BusinessRuleTask", - "bpmn:ScriptTask", - "bpmn:ReceiveTask", - "bpmn:ManualTask", - "bpmn:ExclusiveGateway", - "bpmn:SequenceFlow", - "bpmn:ParallelGateway", - "bpmn:InclusiveGateway", - "bpmn:EventBasedGateway", - "bpmn:StartEvent", - "bpmn:IntermediateCatchEvent", - "bpmn:IntermediateThrowEvent", - "bpmn:EndEvent", - "bpmn:BoundaryEvent", - "bpmn:CallActivity", - "bpmn:SubProcess", - "bpmn:Process" - ] - }, - "properties": [ - { - "name": "expression", - "isAttr": true, - "type": "String" - }, - { - "name": "class", - "isAttr": true, - "type": "String" - }, - { - "name": "delegateExpression", - "isAttr": true, - "type": "String" - }, - { - "name": "event", - "isAttr": true, - "type": "String" - }, - { - "name": "script", - "type": "Script" - }, - { - "name": "fields", - "type": "Field", - "isMany": true - } - ] - }, - { - "name": "TaskListener", - "superClass": ["Element"], - "meta": { - "allowedIn": ["bpmn:UserTask"] - }, - "properties": [ - { - "name": "expression", - "isAttr": true, - "type": "String" - }, - { - "name": "class", - "isAttr": true, - "type": "String" - }, - { - "name": "delegateExpression", - "isAttr": true, - "type": "String" - }, - { - "name": "event", - "isAttr": true, - "type": "String" - }, - { - "name": "script", - "type": "Script" - }, - { - "name": "fields", - "type": "Field", - "isMany": true - } - ] - }, - { - "name": "FormProperty", - "superClass": ["Element"], - "meta": { - "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] - }, - "properties": [ - { - "name": "id", - "type": "String", - "isAttr": true - }, - { - "name": "name", - "type": "String", - "isAttr": true - }, - { - "name": "type", - "type": "String", - "isAttr": true - }, - { - "name": "required", - "type": "String", - "isAttr": true - }, - { - "name": "readable", - "type": "String", - "isAttr": true - }, - { - "name": "writable", - "type": "String", - "isAttr": true - }, - { - "name": "variable", - "type": "String", - "isAttr": true - }, - { - "name": "expression", - "type": "String", - "isAttr": true - }, - { - "name": "datePattern", - "type": "String", - "isAttr": true - }, - { - "name": "default", - "type": "String", - "isAttr": true - }, - { - "name": "values", - "type": "Value", - "isMany": true - } - ] - }, - { - "name": "FormData", - "superClass": ["Element"], - "meta": { - "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] - }, - "properties": [ - { - "name": "fields", - "type": "FormField", - "isMany": true - }, - { - "name": "businessKey", - "type": "String", - "isAttr": true - } - ] - }, - { - "name": "FormField", - "superClass": ["Element"], - "properties": [ - { - "name": "id", - "type": "String", - "isAttr": true - }, - { - "name": "label", - "type": "String", - "isAttr": true - }, - { - "name": "type", - "type": "String", - "isAttr": true - }, - { - "name": "datePattern", - "type": "String", - "isAttr": true - }, - { - "name": "defaultValue", - "type": "String", - "isAttr": true - }, - { - "name": "properties", - "type": "Properties" - }, - { - "name": "validation", - "type": "Validation" - }, - { - "name": "values", - "type": "Value", - "isMany": true - } - ] - }, - { - "name": "Validation", - "superClass": ["Element"], - "properties": [ - { - "name": "constraints", - "type": "Constraint", - "isMany": true - } - ] - }, - { - "name": "Constraint", - "superClass": ["Element"], - "properties": [ - { - "name": "name", - "type": "String", - "isAttr": true - }, - { - "name": "config", - "type": "String", - "isAttr": true - } - ] - }, - { - "name": "ConditionalEventDefinition", - "isAbstract": true, - "extends": ["bpmn:ConditionalEventDefinition"], - "properties": [ - { - "name": "variableName", - "isAttr": true, - "type": "String" - }, - { - "name": "variableEvent", - "isAttr": true, - "type": "String" - } - ] - } - ], - "emumerations": [] - } +{ + "name": "Flowable", + "uri": "http://flowable.org/bpmn", + "prefix": "flowable", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "InOutBinding", + "superClass": ["Element"], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "Out", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "flowable:in", + "superClass": ["Element"], + "properties": [ + { + "name": "source", + "type": "string", + "isAttr": true + }, + { + "name": "target", + "type": "string", + "isAttr": true + } + ] + }, + { + "name": "flowable:out", + "superClass": ["Element"], + "properties": [ + { + "name": "source", + "type": "string", + "isAttr": true + }, + { + "name": "target", + "type": "string", + "isAttr": true + } + ] + }, + { + "name": "BoundaryEvent", + "superClass": ["CatchEvent"], + "properties": [ + { + "name": "cancelActivity", + "default": true, + "isAttr": true, + "type": "Boolean" + }, + { + "name": "attachedToRef", + "type": "Activity", + "isAttr": true, + "isReference": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": ["bpmn:Process", "flowable:AsyncCapable"], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:SignalEventDefinition"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ErrorEventDefinition"], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": ["bpmn:Error"], + "properties": [ + { + "name": "flowable:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": ["Element"], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "UserTask", + "isAbstract": true, + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "timerEventDefinition", + "type": "Expression" + }, + { + "name": "multiInstanceLoopCharacteristics", + "type": "MultiInstanceLoopCharacteristics" + } + ] + }, + { + "name": "StartEvent", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "timerEventDefinition", + "type": "Expression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": ["bpmn:StartEvent", "bpmn:UserTask"], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": ["bpmn:Process", "bpmn:FlowElement"], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": ["bpmn:ScriptTask"], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": ["bpmn:Process"], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": ["bpmn:EscalationEventDefinition"], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": ["bpmn:FormalExpression"], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignable", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": ["bpmn:CallActivity"], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExclusiveGateway", + "isAbstract": true, + "extends": ["bpmn:ExclusiveGateway"], + "properties": [ + { + "name": "serviceClass", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": ["bpmn:BusinessRuleTask"], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": ["flowable:ServiceTaskLike"], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": ["bpmn:Process", "flowable:ExternalCapable"], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": ["Element"], + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:ServiceTaskLike"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:FlowNode", "flowable:Connector"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:ServiceTaskLike", + "flowable:ExecutionListener", + "flowable:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "isAttr": true, + "type": "expression" + }, + { + "name": "string", + "type": "string" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "string", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:Field" + ] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "expression", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:Field" + ] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "OutputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": ["bpmn:MultiInstanceLoopCharacteristics"], + "superClass": ["flowable:AsyncCapable"], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SequenceFlow", + "superClass": ["FlowElement"], + "properties": [ + { + "name": "isImmediate", + "isAttr": true, + "type": "Boolean" + }, + { + "name": "conditionExpression", + "type": "Expression" + }, + { + "name": "sourceRef", + "type": "FlowNode", + "isAttr": true, + "isReference": true + }, + { + "name": "targetRef", + "type": "FlowNode", + "isAttr": true, + "isReference": true + } + ] + }, + { + "name": "MultiInstanceLoopCharacteristics", + "superClass": ["LoopCharacteristics"], + "properties": [ + { + "name": "isSequential", + "default": false, + "isAttr": true, + "type": "Boolean" + }, + { + "name": "behavior", + "type": "MultiInstanceBehavior", + "default": "All", + "isAttr": true + }, + { + "name": "loopCardinality", + "type": "Expression", + "xml": { + "serialize": "xsi:type" + } + }, + { + "name": "loopDataInputRef", + "type": "ItemAwareElement", + "isReference": true + }, + { + "name": "loopDataOutputRef", + "type": "ItemAwareElement", + "isReference": true + }, + { + "name": "inputDataItem", + "type": "DataInput", + "xml": { + "serialize": "property" + } + }, + { + "name": "outputDataItem", + "type": "DataOutput", + "xml": { + "serialize": "property" + } + }, + { + "name": "complexBehaviorDefinition", + "type": "ComplexBehaviorDefinition", + "isMany": true + }, + { + "name": "completionCondition", + "type": "Expression", + "xml": { + "serialize": "xsi:type" + } + }, + { + "name": "oneBehaviorEventRef", + "type": "EventDefinition", + "isAttr": true, + "isReference": true + }, + { + "name": "noneBehaviorEventRef", + "type": "EventDefinition", + "isAttr": true, + "isReference": true + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormData", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "fields", + "type": "FormField", + "isMany": true + }, + { + "name": "businessKey", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FormField", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": ["Element"], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": ["Element"], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ConditionalEventDefinition"], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvent", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [] + } diff --git a/demo-web-ui/src/views/Process/flowable/init.js b/demo-web-ui/src/views/Process/flowable/init.js index ec9e282..eab7996 100644 --- a/demo-web-ui/src/views/Process/flowable/init.js +++ b/demo-web-ui/src/views/Process/flowable/init.js @@ -1,24 +1,24 @@ - -function randomStr() { - return Math.random().toString(36).slice(-8) -} - -export default function() { - return ` - - - - - - - - - - - - - - - - ` -} + +function randomStr() { + return Math.random().toString(36).slice(-8) +} + +export default function() { + return ` + + + + + + + + + + + + + + + + ` +} diff --git a/demo-web-ui/src/views/Process/flowable/showConfig.js b/demo-web-ui/src/views/Process/flowable/showConfig.js index 69ba83e..86785ba 100644 --- a/demo-web-ui/src/views/Process/flowable/showConfig.js +++ b/demo-web-ui/src/views/Process/flowable/showConfig.js @@ -1,55 +1,55 @@ -export default { - 'bpmn:EndEvent': {}, - 'bpmn:StartEvent': { - initiator: true, - formKey: true - }, - 'bpmn:UserTask': { - userType: true, - dataType: true, - assignee: true, - candidateUsers: true, - candidateGroups: true, - // assigneeFixed: true, - // candidateUsersFixed: true, - // candidateGroupsFixed: true, - async: true, - priority: true, - formKey: true, - skipExpression: true, - dueDate: true, - taskListener: true - }, - 'bpmn:ServiceTask': { - async: true, - skipExpression: true, - isForCompensation: true, - triggerable: true, - class: true - }, - 'bpmn:ScriptTask': { - async: true, - isForCompensation: true, - autoStoreVariables: true - }, - 'bpmn:ManualTask': { - async: true, - isForCompensation: true - }, - 'bpmn:ReceiveTask': { - async: true, - isForCompensation: true - }, - 'bpmn:SendTask': { - async: true, - isForCompensation: true - }, - 'bpmn:BusinessRuleTask': { - async: true, - isForCompensation: true, - ruleVariablesInput: true, - rules: true, - resultVariable: true, - exclude: true - } -} +export default { + 'bpmn:EndEvent': {}, + 'bpmn:StartEvent': { + initiator: true, + formKey: true + }, + 'bpmn:UserTask': { + userType: true, + dataType: true, + assignee: true, + candidateUsers: true, + candidateGroups: true, + // assigneeFixed: true, + // candidateUsersFixed: true, + // candidateGroupsFixed: true, + async: true, + priority: true, + formKey: true, + skipExpression: true, + dueDate: true, + taskListener: true + }, + 'bpmn:ServiceTask': { + async: true, + skipExpression: true, + isForCompensation: true, + triggerable: true, + class: true + }, + 'bpmn:ScriptTask': { + async: true, + isForCompensation: true, + autoStoreVariables: true + }, + 'bpmn:ManualTask': { + async: true, + isForCompensation: true + }, + 'bpmn:ReceiveTask': { + async: true, + isForCompensation: true + }, + 'bpmn:SendTask': { + async: true, + isForCompensation: true + }, + 'bpmn:BusinessRuleTask': { + async: true, + isForCompensation: true, + ruleVariablesInput: true, + rules: true, + resultVariable: true, + exclude: true + } +} diff --git a/demo-web-ui/src/views/Process/index.js b/demo-web-ui/src/views/Process/index.js index f78489d..4f73ed0 100644 --- a/demo-web-ui/src/views/Process/index.js +++ b/demo-web-ui/src/views/Process/index.js @@ -1,5 +1,5 @@ -import workflowBpmnModeler from './index.vue' - -workflowBpmnModeler.install = Vue => Vue.component(workflowBpmnModeler.name, workflowBpmnModeler) // 给组件配置install方法 - -export default workflowBpmnModeler +import workflowBpmnModeler from './index.vue' + +workflowBpmnModeler.install = Vue => Vue.component(workflowBpmnModeler.name, workflowBpmnModeler) // 给组件配置install方法 + +export default workflowBpmnModeler diff --git a/demo-web-ui/src/views/Process/index.vue b/demo-web-ui/src/views/Process/index.vue index 615921c..425f069 100644 --- a/demo-web-ui/src/views/Process/index.vue +++ b/demo-web-ui/src/views/Process/index.vue @@ -1,478 +1,478 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Process/lang/zh.js b/demo-web-ui/src/views/Process/lang/zh.js index 003c0cc..1a58fbb 100644 --- a/demo-web-ui/src/views/Process/lang/zh.js +++ b/demo-web-ui/src/views/Process/lang/zh.js @@ -1,227 +1,227 @@ -export default { - // Labels - 'Activate the global connect tool': '激活全局连接工具', - 'Append {type}': '添加 {type}', - 'Add Lane above': '在上面添加道', - 'Divide into two Lanes': '分割成两个道', - 'Divide into three Lanes': '分割成三个道', - 'Add Lane below': '在下面添加道', - 'Append compensation activity': '追加补偿活动', - 'Change type': '修改类型', - 'Connect using Association': '使用关联连接', - 'Connect using Sequence/MessageFlow or Association': '使用顺序/消息流或者关联连接', - 'Connect using DataInputAssociation': '使用数据输入关联连接', - 'Remove': '移除', - 'Activate the hand tool': '激活抓手工具', - 'Activate the lasso tool': '激活套索工具', - 'Activate the create/remove space tool': '激活创建/删除空间工具', - 'Create expanded SubProcess': '创建扩展子过程', - 'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件', - 'Create Pool/Participant': '创建池/参与者', - 'Parallel Multi Instance': '并行多重事件', - 'Sequential Multi Instance': '时序多重事件', - 'DataObjectReference': '数据对象参考', - 'DataStoreReference': '数据存储参考', - 'Loop': '循环', - 'Ad-hoc': '即席', - 'Create {type}': '创建 {type}', - 'Task': '任务', - 'Send Task': '发送任务', - 'Receive Task': '接收任务', - 'User Task': '用户任务', - 'Manual Task': '手工任务', - 'Business Rule Task': '业务规则任务', - 'Service Task': '服务任务', - 'Script Task': '脚本任务', - 'Call Activity': '调用活动', - 'Sub Process (collapsed)': '子流程(折叠的)', - 'Sub Process (expanded)': '子流程(展开的)', - 'Start Event': '开始事件', - 'StartEvent': '开始事件', - 'Intermediate Throw Event': '中间事件', - 'End Event': '结束事件', - 'EndEvent': '结束事件', - 'Create Gateway': '创建网关', - 'Create Intermediate/Boundary Event': '创建中间/边界事件', - 'Message Start Event': '消息开始事件', - 'Timer Start Event': '定时开始事件', - 'Conditional Start Event': '条件开始事件', - 'Signal Start Event': '信号开始事件', - 'Error Start Event': '错误开始事件', - 'Escalation Start Event': '升级开始事件', - 'Compensation Start Event': '补偿开始事件', - 'Message Start Event (non-interrupting)': '消息开始事件(非中断)', - 'Timer Start Event (non-interrupting)': '定时开始事件(非中断)', - 'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)', - 'Signal Start Event (non-interrupting)': '信号开始事件(非中断)', - 'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)', - 'Message Intermediate Catch Event': '消息中间捕获事件', - 'Message Intermediate Throw Event': '消息中间抛出事件', - 'Timer Intermediate Catch Event': '定时中间捕获事件', - 'Escalation Intermediate Throw Event': '升级中间抛出事件', - 'Conditional Intermediate Catch Event': '条件中间捕获事件', - 'Link Intermediate Catch Event': '链接中间捕获事件', - 'Link Intermediate Throw Event': '链接中间抛出事件', - 'Compensation Intermediate Throw Event': '补偿中间抛出事件', - 'Signal Intermediate Catch Event': '信号中间捕获事件', - 'Signal Intermediate Throw Event': '信号中间抛出事件', - 'Message End Event': '消息结束事件', - 'Escalation End Event': '定时结束事件', - 'Error End Event': '错误结束事件', - 'Cancel End Event': '取消结束事件', - 'Compensation End Event': '补偿结束事件', - 'Signal End Event': '信号结束事件', - 'Terminate End Event': '终止结束事件', - 'Message Boundary Event': '消息边界事件', - 'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)', - 'Timer Boundary Event': '定时边界事件', - 'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)', - 'Escalation Boundary Event': '升级边界事件', - 'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)', - 'Conditional Boundary Event': '条件边界事件', - 'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)', - 'Error Boundary Event': '错误边界事件', - 'Cancel Boundary Event': '取消边界事件', - 'Signal Boundary Event': '信号边界事件', - 'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)', - 'Compensation Boundary Event': '补偿边界事件', - 'Exclusive Gateway': '互斥网关', - 'Parallel Gateway': '并行网关', - 'Inclusive Gateway': '相容网关', - 'Complex Gateway': '复杂网关', - 'Event based Gateway': '事件网关', - 'Transaction': '转运', - 'Sub Process': '子流程', - 'Event Sub Process': '事件子流程', - 'Collapsed Pool': '折叠池', - 'Expanded Pool': '展开池', - // Errors - 'no parent for {element} in {parent}': '在{parent}里,{element}没有父类', - 'no shape type specified': '没有指定的形状类型', - 'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类', - 'out of bounds release': 'out of bounds release', - 'more than {count} child lanes': '子道大于{count} ', - 'element required': '元素不能为空', - 'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范', - 'no diagram to display': '没有可展示的流程图', - 'no process or collaboration to display': '没有可展示的流程/协作', - 'element {element} referenced by {referenced}#{property} not yet drawn': '由{referenced}#{property}引用的{element}元素仍未绘制', - 'already rendered {element}': '{element} 已被渲染', - 'failed to import {element}': '导入{element}失败', - // 属性面板的参数 - 'Id': '标识', - 'Name': '名称', - 'General': '常规', - 'Details': '详情', - 'Message Name': '消息名称', - 'Message': '消息', - 'Initiator': '创建者', - 'Asynchronous Continuations': '持续异步', - 'Asynchronous Before': '异步前', - 'Asynchronous After': '异步后', - 'Job Configuration': '工作配置', - 'Exclusive': '排除', - 'Job Priority': '工作优先级', - 'Retry Time Cycle': '重试时间周期', - 'Documentation': '文档', - 'Element Documentation': '元素文档', - 'History Configuration': '历史配置', - 'History Time To Live': '历史的生存时间', - 'Forms': '表单', - 'Form Key': '表单key', - 'Form Fields': '表单字段', - 'Business Key': '业务key', - 'Form Field': '表单字段', - 'ID': '编号', - 'Type': '类型', - 'Label': '名称', - 'Default Value': '默认值', - 'Validation': '校验', - 'Add Constraint': '添加约束', - 'Config': '配置', - 'Properties': '属性', - 'Add Property': '添加属性', - 'Value': '值', - 'Listeners': '监听器', - 'Execution Listener': '执行监听', - 'Event Type': '事件类型', - 'Listener Type': '监听器类型', - 'Java Class': 'Java类', - 'Expression': '表达式', - 'Must provide a value': '必须提供一个值', - 'Delegate Expression': '代理表达式', - 'Script': '脚本', - 'Script Format': '脚本格式', - 'Script Type': '脚本类型', - 'Inline Script': '内联脚本', - 'External Script': '外部脚本', - 'Resource': '资源', - 'Field Injection': '字段注入', - 'Extensions': '扩展', - 'Input/Output': '输入/输出', - 'Input Parameters': '输入参数', - 'Output Parameters': '输出参数', - 'Parameters': '参数', - 'Output Parameter': '输出参数', - 'Timer Definition Type': '定时器定义类型', - 'Timer Definition': '定时器定义', - 'Date': '日期', - 'Duration': '持续', - 'Cycle': '循环', - 'Signal': '信号', - 'Signal Name': '信号名称', - 'Escalation': '升级', - 'Error': '错误', - 'Link Name': '链接名称', - 'Condition': '条件名称', - 'Variable Name': '变量名称', - 'Variable Event': '变量事件', - 'Specify more than one variable change event as a comma separated list.': '多个变量事件以逗号隔开', - 'Wait for Completion': '等待完成', - 'Activity Ref': '活动参考', - 'Version Tag': '版本标签', - 'Executable': '可执行文件', - 'External Task Configuration': '扩展任务配置', - 'Task Priority': '任务优先级', - 'External': '外部', - 'Connector': '连接器', - 'Must configure Connector': '必须配置连接器', - 'Connector Id': '连接器编号', - 'Implementation': '实现方式', - 'Field Injections': '字段注入', - 'Fields': '字段', - 'Result Variable': '结果变量', - 'Topic': '主题', - 'Configure Connector': '配置连接器', - 'Input Parameter': '输入参数', - 'Assignee': '代理人', - 'Candidate Users': '候选用户', - 'Candidate Groups': '候选组', - 'Due Date': '到期时间', - 'Follow Up Date': '跟踪日期', - 'Priority': '优先级', - 'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', - 'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', - 'Variables': '变量' -} - -export const NodeName = { - 'bpmn:Process': '流程', - 'bpmn:StartEvent': '开始事件', - 'bpmn:IntermediateThrowEvent': '中间事件', - 'bpmn:Task': '任务', - 'bpmn:SendTask': '发送任务', - 'bpmn:ReceiveTask': '接收任务', - 'bpmn:UserTask': '用户任务', - 'bpmn:ManualTask': '手工任务', - 'bpmn:BusinessRuleTask': '业务规则任务', - 'bpmn:ServiceTask': '服务任务', - 'bpmn:ScriptTask': '脚本任务', - 'bpmn:EndEvent': '结束事件', - 'bpmn:SequenceFlow': '流程线', - 'bpmn:ExclusiveGateway': '互斥网关', - 'bpmn:ParallelGateway': '并行网关', - 'bpmn:InclusiveGateway': '相容网关', - 'bpmn:ComplexGateway': '复杂网关', - 'bpmn:EventBasedGateway': '事件网关' -} +export default { + // Labels + 'Activate the global connect tool': '激活全局连接工具', + 'Append {type}': '添加 {type}', + 'Add Lane above': '在上面添加道', + 'Divide into two Lanes': '分割成两个道', + 'Divide into three Lanes': '分割成三个道', + 'Add Lane below': '在下面添加道', + 'Append compensation activity': '追加补偿活动', + 'Change type': '修改类型', + 'Connect using Association': '使用关联连接', + 'Connect using Sequence/MessageFlow or Association': '使用顺序/消息流或者关联连接', + 'Connect using DataInputAssociation': '使用数据输入关联连接', + 'Remove': '移除', + 'Activate the hand tool': '激活抓手工具', + 'Activate the lasso tool': '激活套索工具', + 'Activate the create/remove space tool': '激活创建/删除空间工具', + 'Create expanded SubProcess': '创建扩展子过程', + 'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件', + 'Create Pool/Participant': '创建池/参与者', + 'Parallel Multi Instance': '并行多重事件', + 'Sequential Multi Instance': '时序多重事件', + 'DataObjectReference': '数据对象参考', + 'DataStoreReference': '数据存储参考', + 'Loop': '循环', + 'Ad-hoc': '即席', + 'Create {type}': '创建 {type}', + 'Task': '任务', + 'Send Task': '发送任务', + 'Receive Task': '接收任务', + 'User Task': '用户任务', + 'Manual Task': '手工任务', + 'Business Rule Task': '业务规则任务', + 'Service Task': '服务任务', + 'Script Task': '脚本任务', + 'Call Activity': '调用活动', + 'Sub Process (collapsed)': '子流程(折叠的)', + 'Sub Process (expanded)': '子流程(展开的)', + 'Start Event': '开始事件', + 'StartEvent': '开始事件', + 'Intermediate Throw Event': '中间事件', + 'End Event': '结束事件', + 'EndEvent': '结束事件', + 'Create Gateway': '创建网关', + 'Create Intermediate/Boundary Event': '创建中间/边界事件', + 'Message Start Event': '消息开始事件', + 'Timer Start Event': '定时开始事件', + 'Conditional Start Event': '条件开始事件', + 'Signal Start Event': '信号开始事件', + 'Error Start Event': '错误开始事件', + 'Escalation Start Event': '升级开始事件', + 'Compensation Start Event': '补偿开始事件', + 'Message Start Event (non-interrupting)': '消息开始事件(非中断)', + 'Timer Start Event (non-interrupting)': '定时开始事件(非中断)', + 'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)', + 'Signal Start Event (non-interrupting)': '信号开始事件(非中断)', + 'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)', + 'Message Intermediate Catch Event': '消息中间捕获事件', + 'Message Intermediate Throw Event': '消息中间抛出事件', + 'Timer Intermediate Catch Event': '定时中间捕获事件', + 'Escalation Intermediate Throw Event': '升级中间抛出事件', + 'Conditional Intermediate Catch Event': '条件中间捕获事件', + 'Link Intermediate Catch Event': '链接中间捕获事件', + 'Link Intermediate Throw Event': '链接中间抛出事件', + 'Compensation Intermediate Throw Event': '补偿中间抛出事件', + 'Signal Intermediate Catch Event': '信号中间捕获事件', + 'Signal Intermediate Throw Event': '信号中间抛出事件', + 'Message End Event': '消息结束事件', + 'Escalation End Event': '定时结束事件', + 'Error End Event': '错误结束事件', + 'Cancel End Event': '取消结束事件', + 'Compensation End Event': '补偿结束事件', + 'Signal End Event': '信号结束事件', + 'Terminate End Event': '终止结束事件', + 'Message Boundary Event': '消息边界事件', + 'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)', + 'Timer Boundary Event': '定时边界事件', + 'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)', + 'Escalation Boundary Event': '升级边界事件', + 'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)', + 'Conditional Boundary Event': '条件边界事件', + 'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)', + 'Error Boundary Event': '错误边界事件', + 'Cancel Boundary Event': '取消边界事件', + 'Signal Boundary Event': '信号边界事件', + 'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)', + 'Compensation Boundary Event': '补偿边界事件', + 'Exclusive Gateway': '互斥网关', + 'Parallel Gateway': '并行网关', + 'Inclusive Gateway': '相容网关', + 'Complex Gateway': '复杂网关', + 'Event based Gateway': '事件网关', + 'Transaction': '转运', + 'Sub Process': '子流程', + 'Event Sub Process': '事件子流程', + 'Collapsed Pool': '折叠池', + 'Expanded Pool': '展开池', + // Errors + 'no parent for {element} in {parent}': '在{parent}里,{element}没有父类', + 'no shape type specified': '没有指定的形状类型', + 'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类', + 'out of bounds release': 'out of bounds release', + 'more than {count} child lanes': '子道大于{count} ', + 'element required': '元素不能为空', + 'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范', + 'no diagram to display': '没有可展示的流程图', + 'no process or collaboration to display': '没有可展示的流程/协作', + 'element {element} referenced by {referenced}#{property} not yet drawn': '由{referenced}#{property}引用的{element}元素仍未绘制', + 'already rendered {element}': '{element} 已被渲染', + 'failed to import {element}': '导入{element}失败', + // 属性面板的参数 + 'Id': '标识', + 'Name': '名称', + 'General': '常规', + 'Details': '详情', + 'Message Name': '消息名称', + 'Message': '消息', + 'Initiator': '创建者', + 'Asynchronous Continuations': '持续异步', + 'Asynchronous Before': '异步前', + 'Asynchronous After': '异步后', + 'Job Configuration': '工作配置', + 'Exclusive': '排除', + 'Job Priority': '工作优先级', + 'Retry Time Cycle': '重试时间周期', + 'Documentation': '文档', + 'Element Documentation': '元素文档', + 'History Configuration': '历史配置', + 'History Time To Live': '历史的生存时间', + 'Forms': '表单', + 'Form Key': '表单key', + 'Form Fields': '表单字段', + 'Business Key': '业务key', + 'Form Field': '表单字段', + 'ID': '编号', + 'Type': '类型', + 'Label': '名称', + 'Default Value': '默认值', + 'Validation': '校验', + 'Add Constraint': '添加约束', + 'Config': '配置', + 'Properties': '属性', + 'Add Property': '添加属性', + 'Value': '值', + 'Listeners': '监听器', + 'Execution Listener': '执行监听', + 'Event Type': '事件类型', + 'Listener Type': '监听器类型', + 'Java Class': 'Java类', + 'Expression': '表达式', + 'Must provide a value': '必须提供一个值', + 'Delegate Expression': '代理表达式', + 'Script': '脚本', + 'Script Format': '脚本格式', + 'Script Type': '脚本类型', + 'Inline Script': '内联脚本', + 'External Script': '外部脚本', + 'Resource': '资源', + 'Field Injection': '字段注入', + 'Extensions': '扩展', + 'Input/Output': '输入/输出', + 'Input Parameters': '输入参数', + 'Output Parameters': '输出参数', + 'Parameters': '参数', + 'Output Parameter': '输出参数', + 'Timer Definition Type': '定时器定义类型', + 'Timer Definition': '定时器定义', + 'Date': '日期', + 'Duration': '持续', + 'Cycle': '循环', + 'Signal': '信号', + 'Signal Name': '信号名称', + 'Escalation': '升级', + 'Error': '错误', + 'Link Name': '链接名称', + 'Condition': '条件名称', + 'Variable Name': '变量名称', + 'Variable Event': '变量事件', + 'Specify more than one variable change event as a comma separated list.': '多个变量事件以逗号隔开', + 'Wait for Completion': '等待完成', + 'Activity Ref': '活动参考', + 'Version Tag': '版本标签', + 'Executable': '可执行文件', + 'External Task Configuration': '扩展任务配置', + 'Task Priority': '任务优先级', + 'External': '外部', + 'Connector': '连接器', + 'Must configure Connector': '必须配置连接器', + 'Connector Id': '连接器编号', + 'Implementation': '实现方式', + 'Field Injections': '字段注入', + 'Fields': '字段', + 'Result Variable': '结果变量', + 'Topic': '主题', + 'Configure Connector': '配置连接器', + 'Input Parameter': '输入参数', + 'Assignee': '代理人', + 'Candidate Users': '候选用户', + 'Candidate Groups': '候选组', + 'Due Date': '到期时间', + 'Follow Up Date': '跟踪日期', + 'Priority': '优先级', + 'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + 'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + 'Variables': '变量' +} + +export const NodeName = { + 'bpmn:Process': '流程', + 'bpmn:StartEvent': '开始事件', + 'bpmn:IntermediateThrowEvent': '中间事件', + 'bpmn:Task': '任务', + 'bpmn:SendTask': '发送任务', + 'bpmn:ReceiveTask': '接收任务', + 'bpmn:UserTask': '用户任务', + 'bpmn:ManualTask': '手工任务', + 'bpmn:BusinessRuleTask': '业务规则任务', + 'bpmn:ServiceTask': '服务任务', + 'bpmn:ScriptTask': '脚本任务', + 'bpmn:EndEvent': '结束事件', + 'bpmn:SequenceFlow': '流程线', + 'bpmn:ExclusiveGateway': '互斥网关', + 'bpmn:ParallelGateway': '并行网关', + 'bpmn:InclusiveGateway': '相容网关', + 'bpmn:ComplexGateway': '复杂网关', + 'bpmn:EventBasedGateway': '事件网关' +} diff --git a/demo-web-ui/src/views/PwdModify/PwdModify.vue b/demo-web-ui/src/views/PwdModify/PwdModify.vue index a1f0070..1714bc5 100644 --- a/demo-web-ui/src/views/PwdModify/PwdModify.vue +++ b/demo-web-ui/src/views/PwdModify/PwdModify.vue @@ -1,167 +1,167 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Regist/Organing/components/amap.vue b/demo-web-ui/src/views/Regist/Organing/components/amap.vue index 4f301b2..7744c40 100644 --- a/demo-web-ui/src/views/Regist/Organing/components/amap.vue +++ b/demo-web-ui/src/views/Regist/Organing/components/amap.vue @@ -1,174 +1,174 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Regist/Organing/components/first.vue b/demo-web-ui/src/views/Regist/Organing/components/first.vue index 4b2233d..22ca3fe 100644 --- a/demo-web-ui/src/views/Regist/Organing/components/first.vue +++ b/demo-web-ui/src/views/Regist/Organing/components/first.vue @@ -1,90 +1,90 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Regist/Organing/components/fourth.vue b/demo-web-ui/src/views/Regist/Organing/components/fourth.vue index 63342c6..37cbaf4 100644 --- a/demo-web-ui/src/views/Regist/Organing/components/fourth.vue +++ b/demo-web-ui/src/views/Regist/Organing/components/fourth.vue @@ -1,31 +1,31 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Regist/Organing/components/index.js b/demo-web-ui/src/views/Regist/Organing/components/index.js index 7f9ebdd..771feb1 100644 --- a/demo-web-ui/src/views/Regist/Organing/components/index.js +++ b/demo-web-ui/src/views/Regist/Organing/components/index.js @@ -1,5 +1,5 @@ -export { default as first } from './first.vue' -export { default as second } from './second.vue' -export { default as third } from './third.vue' -export { default as fourth } from './fourth.vue' - +export { default as first } from './first.vue' +export { default as second } from './second.vue' +export { default as third } from './third.vue' +export { default as fourth } from './fourth.vue' + diff --git a/demo-web-ui/src/views/Regist/Organing/components/second.vue b/demo-web-ui/src/views/Regist/Organing/components/second.vue index bd96d3b..6d3e103 100644 --- a/demo-web-ui/src/views/Regist/Organing/components/second.vue +++ b/demo-web-ui/src/views/Regist/Organing/components/second.vue @@ -1,149 +1,149 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Regist/Organing/components/third.vue b/demo-web-ui/src/views/Regist/Organing/components/third.vue index 47882eb..5f821c7 100644 --- a/demo-web-ui/src/views/Regist/Organing/components/third.vue +++ b/demo-web-ui/src/views/Regist/Organing/components/third.vue @@ -1,176 +1,176 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/Regist/Organing/index.vue b/demo-web-ui/src/views/Regist/Organing/index.vue index 232a704..85b5d05 100644 --- a/demo-web-ui/src/views/Regist/Organing/index.vue +++ b/demo-web-ui/src/views/Regist/Organing/index.vue @@ -1,228 +1,228 @@ - - - - - - + + + + + + diff --git a/demo-web-ui/src/views/Regist/User.vue b/demo-web-ui/src/views/Regist/User.vue index 125e625..a42fdb0 100644 --- a/demo-web-ui/src/views/Regist/User.vue +++ b/demo-web-ui/src/views/Regist/User.vue @@ -1,293 +1,256 @@ - - - - - - - + + + + + + + diff --git a/demo-web-ui/src/views/RoleAdminister/RoleAdminister.vue b/demo-web-ui/src/views/RoleAdminister/RoleAdminister.vue index 8075128..b82835b 100644 --- a/demo-web-ui/src/views/RoleAdminister/RoleAdminister.vue +++ b/demo-web-ui/src/views/RoleAdminister/RoleAdminister.vue @@ -1,880 +1,880 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/copyofprocess/liuchengchaosongAdd.vue b/demo-web-ui/src/views/copyofprocess/liuchengchaosongAdd.vue index 00092ef..bfd559f 100644 --- a/demo-web-ui/src/views/copyofprocess/liuchengchaosongAdd.vue +++ b/demo-web-ui/src/views/copyofprocess/liuchengchaosongAdd.vue @@ -1,178 +1,178 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/copyofprocess/liuchengchasongguanli.vue b/demo-web-ui/src/views/copyofprocess/liuchengchasongguanli.vue index 9b136da..c7bbae1 100644 --- a/demo-web-ui/src/views/copyofprocess/liuchengchasongguanli.vue +++ b/demo-web-ui/src/views/copyofprocess/liuchengchasongguanli.vue @@ -1,228 +1,315 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/datamapping/shujuyingshe.vue b/demo-web-ui/src/views/datamapping/shujuyingshe.vue index 0d10d11..0a419a0 100644 --- a/demo-web-ui/src/views/datamapping/shujuyingshe.vue +++ b/demo-web-ui/src/views/datamapping/shujuyingshe.vue @@ -1,261 +1,261 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/dictManage/dictCommon.vue b/demo-web-ui/src/views/dictManage/dictCommon.vue index 81e58fc..fb71b80 100644 --- a/demo-web-ui/src/views/dictManage/dictCommon.vue +++ b/demo-web-ui/src/views/dictManage/dictCommon.vue @@ -1,248 +1,248 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/dictManage/dictManage.vue b/demo-web-ui/src/views/dictManage/dictManage.vue index 8cfa1db..b433a1c 100644 --- a/demo-web-ui/src/views/dictManage/dictManage.vue +++ b/demo-web-ui/src/views/dictManage/dictManage.vue @@ -1,200 +1,200 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/dictManage/dictMap.vue b/demo-web-ui/src/views/dictManage/dictMap.vue index ede63bc..8d56678 100644 --- a/demo-web-ui/src/views/dictManage/dictMap.vue +++ b/demo-web-ui/src/views/dictManage/dictMap.vue @@ -1,155 +1,155 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/flow/doneList.vue b/demo-web-ui/src/views/flow/doneList.vue index 872baca..7a5cf43 100644 --- a/demo-web-ui/src/views/flow/doneList.vue +++ b/demo-web-ui/src/views/flow/doneList.vue @@ -1,523 +1,523 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/flow/flowRecordForBusiness.vue b/demo-web-ui/src/views/flow/flowRecordForBusiness.vue index 0d9d5c7..d80e652 100644 --- a/demo-web-ui/src/views/flow/flowRecordForBusiness.vue +++ b/demo-web-ui/src/views/flow/flowRecordForBusiness.vue @@ -1,74 +1,74 @@ - - + + diff --git a/demo-web-ui/src/views/flow/havereadList.vue b/demo-web-ui/src/views/flow/havereadList.vue index 497b7fa..39c16d9 100644 --- a/demo-web-ui/src/views/flow/havereadList.vue +++ b/demo-web-ui/src/views/flow/havereadList.vue @@ -1,392 +1,392 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/flow/tobereadList.vue b/demo-web-ui/src/views/flow/tobereadList.vue index 2c81232..dbaa0fe 100644 --- a/demo-web-ui/src/views/flow/tobereadList.vue +++ b/demo-web-ui/src/views/flow/tobereadList.vue @@ -1,393 +1,393 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/flow/todoList.vue b/demo-web-ui/src/views/flow/todoList.vue index f3787c7..dbc680d 100644 --- a/demo-web-ui/src/views/flow/todoList.vue +++ b/demo-web-ui/src/views/flow/todoList.vue @@ -1,613 +1,613 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/functional/functional.vue b/demo-web-ui/src/views/functional/functional.vue index 7b54392..8d44bce 100644 --- a/demo-web-ui/src/views/functional/functional.vue +++ b/demo-web-ui/src/views/functional/functional.vue @@ -1,354 +1,354 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/index.vue b/demo-web-ui/src/views/index.vue index 8a431d0..1f02333 100644 --- a/demo-web-ui/src/views/index.vue +++ b/demo-web-ui/src/views/index.vue @@ -1,47 +1,47 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/logManage/logManage.vue b/demo-web-ui/src/views/logManage/logManage.vue index ab23366..eb9b5ef 100644 --- a/demo-web-ui/src/views/logManage/logManage.vue +++ b/demo-web-ui/src/views/logManage/logManage.vue @@ -1,212 +1,212 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/login/login.vue b/demo-web-ui/src/views/login/login.vue index f2c3184..a024ebd 100644 --- a/demo-web-ui/src/views/login/login.vue +++ b/demo-web-ui/src/views/login/login.vue @@ -1,281 +1,310 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/menuManage/menuManage.vue b/demo-web-ui/src/views/menuManage/menuManage.vue index 4621ee1..ade7391 100644 --- a/demo-web-ui/src/views/menuManage/menuManage.vue +++ b/demo-web-ui/src/views/menuManage/menuManage.vue @@ -1,577 +1,497 @@ - - - - - - - + + + + + + + diff --git a/demo-web-ui/src/views/mobileterminal/adhibition.vue b/demo-web-ui/src/views/mobileterminal/adhibition.vue index b53a634..f7a2c2e 100644 --- a/demo-web-ui/src/views/mobileterminal/adhibition.vue +++ b/demo-web-ui/src/views/mobileterminal/adhibition.vue @@ -1,180 +1,180 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/mobileterminal/frame.vue b/demo-web-ui/src/views/mobileterminal/frame.vue index 02cdd79..fb23f8c 100644 --- a/demo-web-ui/src/views/mobileterminal/frame.vue +++ b/demo-web-ui/src/views/mobileterminal/frame.vue @@ -1,122 +1,122 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/mobileterminal/mobileterminal.vue b/demo-web-ui/src/views/mobileterminal/mobileterminal.vue index 2f91dce..393e133 100644 --- a/demo-web-ui/src/views/mobileterminal/mobileterminal.vue +++ b/demo-web-ui/src/views/mobileterminal/mobileterminal.vue @@ -1,200 +1,200 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/mobileterminal/plugin.vue b/demo-web-ui/src/views/mobileterminal/plugin.vue index bc92260..68875cc 100644 --- a/demo-web-ui/src/views/mobileterminal/plugin.vue +++ b/demo-web-ui/src/views/mobileterminal/plugin.vue @@ -1,215 +1,215 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/mobileterminal/updatePlugin.vue b/demo-web-ui/src/views/mobileterminal/updatePlugin.vue index 95e72cb..23104b0 100644 --- a/demo-web-ui/src/views/mobileterminal/updatePlugin.vue +++ b/demo-web-ui/src/views/mobileterminal/updatePlugin.vue @@ -1,241 +1,241 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/organizationManage/organizationManage.vue b/demo-web-ui/src/views/organizationManage/organizationManage.vue index df37ffd..3e27716 100644 --- a/demo-web-ui/src/views/organizationManage/organizationManage.vue +++ b/demo-web-ui/src/views/organizationManage/organizationManage.vue @@ -1,660 +1,660 @@ - - - - - - - + + + + + + + diff --git a/demo-web-ui/src/views/personalization/personalization.vue b/demo-web-ui/src/views/personalization/personalization.vue index 2d1a7e3..b30ce33 100644 --- a/demo-web-ui/src/views/personalization/personalization.vue +++ b/demo-web-ui/src/views/personalization/personalization.vue @@ -1,117 +1,117 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/postManage/postManage.vue b/demo-web-ui/src/views/postManage/postManage.vue index 404d8b0..675225d 100644 --- a/demo-web-ui/src/views/postManage/postManage.vue +++ b/demo-web-ui/src/views/postManage/postManage.vue @@ -1,505 +1,505 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/redirect/index.vue b/demo-web-ui/src/views/redirect/index.vue index db4c1d6..6a62cb7 100644 --- a/demo-web-ui/src/views/redirect/index.vue +++ b/demo-web-ui/src/views/redirect/index.vue @@ -1,12 +1,12 @@ - + diff --git a/demo-web-ui/src/views/region/component/regionAdd.vue b/demo-web-ui/src/views/region/component/regionAdd.vue index d71307b..eed9bb5 100644 --- a/demo-web-ui/src/views/region/component/regionAdd.vue +++ b/demo-web-ui/src/views/region/component/regionAdd.vue @@ -1,127 +1,127 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/region/component/regionAlter.vue b/demo-web-ui/src/views/region/component/regionAlter.vue index 63c95f8..22b21ee 100644 --- a/demo-web-ui/src/views/region/component/regionAlter.vue +++ b/demo-web-ui/src/views/region/component/regionAlter.vue @@ -1,124 +1,124 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/region/region.vue b/demo-web-ui/src/views/region/region.vue index fdcda96..1f0db5e 100644 --- a/demo-web-ui/src/views/region/region.vue +++ b/demo-web-ui/src/views/region/region.vue @@ -1,563 +1,563 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/demo-web-ui/src/views/region/regionCity.vue b/demo-web-ui/src/views/region/regionCity.vue index 8811637..3e56244 100644 --- a/demo-web-ui/src/views/region/regionCity.vue +++ b/demo-web-ui/src/views/region/regionCity.vue @@ -1,572 +1,572 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/region/regionDistrict.vue b/demo-web-ui/src/views/region/regionDistrict.vue index 783384d..66f74cb 100644 --- a/demo-web-ui/src/views/region/regionDistrict.vue +++ b/demo-web-ui/src/views/region/regionDistrict.vue @@ -1,547 +1,547 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/sourceManage/sourceManage.vue b/demo-web-ui/src/views/sourceManage/sourceManage.vue index a1728b2..6202cac 100644 --- a/demo-web-ui/src/views/sourceManage/sourceManage.vue +++ b/demo-web-ui/src/views/sourceManage/sourceManage.vue @@ -1,455 +1,455 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/RoleAdminister/RoleAdminister.vue b/demo-web-ui/src/views/system-admin/RoleAdminister/RoleAdminister.vue index fc59de2..1c8b821 100644 --- a/demo-web-ui/src/views/system-admin/RoleAdminister/RoleAdminister.vue +++ b/demo-web-ui/src/views/system-admin/RoleAdminister/RoleAdminister.vue @@ -1,352 +1,352 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/UserAdminister/components/client.vue b/demo-web-ui/src/views/system-admin/UserAdminister/components/client.vue index 7405925..06d1a99 100644 --- a/demo-web-ui/src/views/system-admin/UserAdminister/components/client.vue +++ b/demo-web-ui/src/views/system-admin/UserAdminister/components/client.vue @@ -1,220 +1,220 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/UserAdminister/components/user.vue b/demo-web-ui/src/views/system-admin/UserAdminister/components/user.vue index 97c8921..de20409 100644 --- a/demo-web-ui/src/views/system-admin/UserAdminister/components/user.vue +++ b/demo-web-ui/src/views/system-admin/UserAdminister/components/user.vue @@ -1,282 +1,282 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/UserAdminister/index.vue b/demo-web-ui/src/views/system-admin/UserAdminister/index.vue index 9248ef8..9e6fd37 100644 --- a/demo-web-ui/src/views/system-admin/UserAdminister/index.vue +++ b/demo-web-ui/src/views/system-admin/UserAdminister/index.vue @@ -1,42 +1,42 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/check/company.vue b/demo-web-ui/src/views/system-admin/check/company.vue index f2350ad..fb4e09f 100644 --- a/demo-web-ui/src/views/system-admin/check/company.vue +++ b/demo-web-ui/src/views/system-admin/check/company.vue @@ -1,456 +1,456 @@ - - - - - - + + + + + + diff --git a/demo-web-ui/src/views/system-admin/check/people.vue b/demo-web-ui/src/views/system-admin/check/people.vue index ab05449..268d9ec 100644 --- a/demo-web-ui/src/views/system-admin/check/people.vue +++ b/demo-web-ui/src/views/system-admin/check/people.vue @@ -1,307 +1,307 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/check/personnel.vue b/demo-web-ui/src/views/system-admin/check/personnel.vue index e73c4a7..7a90a86 100644 --- a/demo-web-ui/src/views/system-admin/check/personnel.vue +++ b/demo-web-ui/src/views/system-admin/check/personnel.vue @@ -1,377 +1,377 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/check/remarks/index.vue b/demo-web-ui/src/views/system-admin/check/remarks/index.vue index 12cc49f..9765ecc 100644 --- a/demo-web-ui/src/views/system-admin/check/remarks/index.vue +++ b/demo-web-ui/src/views/system-admin/check/remarks/index.vue @@ -1,58 +1,58 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/components/orgInfo.vue b/demo-web-ui/src/views/system-admin/components/orgInfo.vue index d5bca0f..f54bb58 100644 --- a/demo-web-ui/src/views/system-admin/components/orgInfo.vue +++ b/demo-web-ui/src/views/system-admin/components/orgInfo.vue @@ -1,151 +1,151 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/components/userInfo.vue b/demo-web-ui/src/views/system-admin/components/userInfo.vue index 1682c54..c7c0d50 100644 --- a/demo-web-ui/src/views/system-admin/components/userInfo.vue +++ b/demo-web-ui/src/views/system-admin/components/userInfo.vue @@ -1,35 +1,35 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/dictCommon.vue b/demo-web-ui/src/views/system-admin/dictCommon.vue index b0a8194..f3775f2 100644 --- a/demo-web-ui/src/views/system-admin/dictCommon.vue +++ b/demo-web-ui/src/views/system-admin/dictCommon.vue @@ -1,180 +1,180 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/system-admin/orgsetup/index.vue b/demo-web-ui/src/views/system-admin/orgsetup/index.vue index c1d0d39..983834a 100644 --- a/demo-web-ui/src/views/system-admin/orgsetup/index.vue +++ b/demo-web-ui/src/views/system-admin/orgsetup/index.vue @@ -1,447 +1,447 @@ - - - - - - - + + + + + + + diff --git a/demo-web-ui/src/views/system-admin/role.vue b/demo-web-ui/src/views/system-admin/role.vue index c95a54e..1260fe5 100644 --- a/demo-web-ui/src/views/system-admin/role.vue +++ b/demo-web-ui/src/views/system-admin/role.vue @@ -1,323 +1,323 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/system-admin/user.vue b/demo-web-ui/src/views/system-admin/user.vue index b5bd8d5..72f90f9 100644 --- a/demo-web-ui/src/views/system-admin/user.vue +++ b/demo-web-ui/src/views/system-admin/user.vue @@ -1,363 +1,363 @@ - - - - - - - + + + + + + + diff --git a/demo-web-ui/src/views/userManage/userManage.vue b/demo-web-ui/src/views/userManage/userManage.vue index 37d826e..d9d550f 100644 --- a/demo-web-ui/src/views/userManage/userManage.vue +++ b/demo-web-ui/src/views/userManage/userManage.vue @@ -1,65 +1,65 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/userManage/userManageAdd.vue b/demo-web-ui/src/views/userManage/userManageAdd.vue index 27a27f4..f89e73d 100644 --- a/demo-web-ui/src/views/userManage/userManageAdd.vue +++ b/demo-web-ui/src/views/userManage/userManageAdd.vue @@ -1,267 +1,267 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/userManage/userManageList.vue b/demo-web-ui/src/views/userManage/userManageList.vue index 2bf9b53..80d39bd 100644 --- a/demo-web-ui/src/views/userManage/userManageList.vue +++ b/demo-web-ui/src/views/userManage/userManageList.vue @@ -1,483 +1,483 @@ - - - - - - + + + + + + diff --git a/demo-web-ui/src/views/workflow/definition/definition.vue b/demo-web-ui/src/views/workflow/definition/definition.vue index cb8808b..7075a90 100644 --- a/demo-web-ui/src/views/workflow/definition/definition.vue +++ b/demo-web-ui/src/views/workflow/definition/definition.vue @@ -1,808 +1,439 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/workflow/definition/definitionAdd.vue b/demo-web-ui/src/views/workflow/definition/definitionAdd.vue index 53a8f86..c037a8a 100644 --- a/demo-web-ui/src/views/workflow/definition/definitionAdd.vue +++ b/demo-web-ui/src/views/workflow/definition/definitionAdd.vue @@ -1,35 +1,35 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/workflow/demo/leavedemo.vue b/demo-web-ui/src/views/workflow/demo/leavedemo.vue index f670d39..51c6023 100644 --- a/demo-web-ui/src/views/workflow/demo/leavedemo.vue +++ b/demo-web-ui/src/views/workflow/demo/leavedemo.vue @@ -1,66 +1,66 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/workflow/endtask.vue b/demo-web-ui/src/views/workflow/endtask.vue index ac2b48a..25c4a01 100644 --- a/demo-web-ui/src/views/workflow/endtask.vue +++ b/demo-web-ui/src/views/workflow/endtask.vue @@ -1,198 +1,198 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/workflow/form/form.vue b/demo-web-ui/src/views/workflow/form/form.vue index b416923..c047264 100644 --- a/demo-web-ui/src/views/workflow/form/form.vue +++ b/demo-web-ui/src/views/workflow/form/form.vue @@ -1,331 +1,281 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/workflow/form/formAdd.vue b/demo-web-ui/src/views/workflow/form/formAdd.vue index 5b40534..d73f2df 100644 --- a/demo-web-ui/src/views/workflow/form/formAdd.vue +++ b/demo-web-ui/src/views/workflow/form/formAdd.vue @@ -1,13 +1,13 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/workflow/index.vue b/demo-web-ui/src/views/workflow/index.vue index c62b6ac..7e2bc1d 100644 --- a/demo-web-ui/src/views/workflow/index.vue +++ b/demo-web-ui/src/views/workflow/index.vue @@ -1,44 +1,44 @@ - - - - - + + + + + diff --git a/demo-web-ui/src/views/workflow/myprocess.vue b/demo-web-ui/src/views/workflow/myprocess.vue index 0dbed92..c909c46 100644 --- a/demo-web-ui/src/views/workflow/myprocess.vue +++ b/demo-web-ui/src/views/workflow/myprocess.vue @@ -1,169 +1,169 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/workflow/mytask.vue b/demo-web-ui/src/views/workflow/mytask.vue index c5e0374..54f70c6 100644 --- a/demo-web-ui/src/views/workflow/mytask.vue +++ b/demo-web-ui/src/views/workflow/mytask.vue @@ -1,183 +1,183 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/workflow/processlist.vue b/demo-web-ui/src/views/workflow/processlist.vue index 079035e..3dede4c 100644 --- a/demo-web-ui/src/views/workflow/processlist.vue +++ b/demo-web-ui/src/views/workflow/processlist.vue @@ -1,117 +1,117 @@ - - - - + + + + diff --git a/demo-web-ui/src/views/workflow/task/record/flow.vue b/demo-web-ui/src/views/workflow/task/record/flow.vue index 22982d0..5319c02 100644 --- a/demo-web-ui/src/views/workflow/task/record/flow.vue +++ b/demo-web-ui/src/views/workflow/task/record/flow.vue @@ -1,32 +1,32 @@ - - + + diff --git a/demo-web-ui/src/views/workflow/task/record/index.vue b/demo-web-ui/src/views/workflow/task/record/index.vue index 5709526..ab3ea03 100644 --- a/demo-web-ui/src/views/workflow/task/record/index.vue +++ b/demo-web-ui/src/views/workflow/task/record/index.vue @@ -1,12 +1,12 @@ - - + + diff --git a/demo-web-ui/tests/unit/.eslintrc.js b/demo-web-ui/tests/unit/.eslintrc.js index 958d51b..1e46bb8 100644 --- a/demo-web-ui/tests/unit/.eslintrc.js +++ b/demo-web-ui/tests/unit/.eslintrc.js @@ -1,5 +1,5 @@ -module.exports = { - env: { - jest: true - } -} +module.exports = { + env: { + jest: true + } +} diff --git a/demo-web-ui/tests/unit/components/Breadcrumb.spec.js b/demo-web-ui/tests/unit/components/Breadcrumb.spec.js index 1d94c8f..e05d123 100644 --- a/demo-web-ui/tests/unit/components/Breadcrumb.spec.js +++ b/demo-web-ui/tests/unit/components/Breadcrumb.spec.js @@ -1,98 +1,98 @@ -import { mount, createLocalVue } from '@vue/test-utils' -import VueRouter from 'vue-router' -import ElementUI from 'element-ui' -import Breadcrumb from '@/components/Breadcrumb/index.vue' - -const localVue = createLocalVue() -localVue.use(VueRouter) -localVue.use(ElementUI) - -const routes = [ - { - path: '/', - name: 'home', - children: [{ - path: 'dashboard', - name: 'dashboard' - }] - }, - { - path: '/menu', - name: 'menu', - children: [{ - path: 'menu1', - name: 'menu1', - meta: { title: 'menu1' }, - children: [{ - path: 'menu1-1', - name: 'menu1-1', - meta: { title: 'menu1-1' } - }, - { - path: 'menu1-2', - name: 'menu1-2', - redirect: 'noredirect', - meta: { title: 'menu1-2' }, - children: [{ - path: 'menu1-2-1', - name: 'menu1-2-1', - meta: { title: 'menu1-2-1' } - }, - { - path: 'menu1-2-2', - name: 'menu1-2-2' - }] - }] - }] - }] - -const router = new VueRouter({ - routes -}) - -describe('Breadcrumb.vue', () => { - const wrapper = mount(Breadcrumb, { - localVue, - router - }) - it('dashboard', () => { - router.push('/dashboard') - const len = wrapper.findAll('.el-breadcrumb__inner').length - expect(len).toBe(1) - }) - it('normal route', () => { - router.push('/menu/menu1') - const len = wrapper.findAll('.el-breadcrumb__inner').length - expect(len).toBe(2) - }) - it('nested route', () => { - router.push('/menu/menu1/menu1-2/menu1-2-1') - const len = wrapper.findAll('.el-breadcrumb__inner').length - expect(len).toBe(4) - }) - it('no meta.title', () => { - router.push('/menu/menu1/menu1-2/menu1-2-2') - const len = wrapper.findAll('.el-breadcrumb__inner').length - expect(len).toBe(3) - }) - // it('click link', () => { - // router.push('/menu/menu1/menu1-2/menu1-2-2') - // const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') - // const second = breadcrumbArray.at(1) - // console.log(breadcrumbArray) - // const href = second.find('a').attributes().href - // expect(href).toBe('#/menu/menu1') - // }) - // it('noRedirect', () => { - // router.push('/menu/menu1/menu1-2/menu1-2-1') - // const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') - // const redirectBreadcrumb = breadcrumbArray.at(2) - // expect(redirectBreadcrumb.contains('a')).toBe(false) - // }) - it('last breadcrumb', () => { - router.push('/menu/menu1/menu1-2/menu1-2-1') - const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') - const redirectBreadcrumb = breadcrumbArray.at(3) - expect(redirectBreadcrumb.contains('a')).toBe(false) - }) -}) +import { mount, createLocalVue } from '@vue/test-utils' +import VueRouter from 'vue-router' +import ElementUI from 'element-ui' +import Breadcrumb from '@/components/Breadcrumb/index.vue' + +const localVue = createLocalVue() +localVue.use(VueRouter) +localVue.use(ElementUI) + +const routes = [ + { + path: '/', + name: 'home', + children: [{ + path: 'dashboard', + name: 'dashboard' + }] + }, + { + path: '/menu', + name: 'menu', + children: [{ + path: 'menu1', + name: 'menu1', + meta: { title: 'menu1' }, + children: [{ + path: 'menu1-1', + name: 'menu1-1', + meta: { title: 'menu1-1' } + }, + { + path: 'menu1-2', + name: 'menu1-2', + redirect: 'noredirect', + meta: { title: 'menu1-2' }, + children: [{ + path: 'menu1-2-1', + name: 'menu1-2-1', + meta: { title: 'menu1-2-1' } + }, + { + path: 'menu1-2-2', + name: 'menu1-2-2' + }] + }] + }] + }] + +const router = new VueRouter({ + routes +}) + +describe('Breadcrumb.vue', () => { + const wrapper = mount(Breadcrumb, { + localVue, + router + }) + it('dashboard', () => { + router.push('/dashboard') + const len = wrapper.findAll('.el-breadcrumb__inner').length + expect(len).toBe(1) + }) + it('normal route', () => { + router.push('/menu/menu1') + const len = wrapper.findAll('.el-breadcrumb__inner').length + expect(len).toBe(2) + }) + it('nested route', () => { + router.push('/menu/menu1/menu1-2/menu1-2-1') + const len = wrapper.findAll('.el-breadcrumb__inner').length + expect(len).toBe(4) + }) + it('no meta.title', () => { + router.push('/menu/menu1/menu1-2/menu1-2-2') + const len = wrapper.findAll('.el-breadcrumb__inner').length + expect(len).toBe(3) + }) + // it('click link', () => { + // router.push('/menu/menu1/menu1-2/menu1-2-2') + // const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') + // const second = breadcrumbArray.at(1) + // console.log(breadcrumbArray) + // const href = second.find('a').attributes().href + // expect(href).toBe('#/menu/menu1') + // }) + // it('noRedirect', () => { + // router.push('/menu/menu1/menu1-2/menu1-2-1') + // const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') + // const redirectBreadcrumb = breadcrumbArray.at(2) + // expect(redirectBreadcrumb.contains('a')).toBe(false) + // }) + it('last breadcrumb', () => { + router.push('/menu/menu1/menu1-2/menu1-2-1') + const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') + const redirectBreadcrumb = breadcrumbArray.at(3) + expect(redirectBreadcrumb.contains('a')).toBe(false) + }) +}) diff --git a/demo-web-ui/tests/unit/components/Hamburger.spec.js b/demo-web-ui/tests/unit/components/Hamburger.spec.js index 01ea303..c7a4c30 100644 --- a/demo-web-ui/tests/unit/components/Hamburger.spec.js +++ b/demo-web-ui/tests/unit/components/Hamburger.spec.js @@ -1,18 +1,18 @@ -import { shallowMount } from '@vue/test-utils' -import Hamburger from '@/components/Hamburger/index.vue' -describe('Hamburger.vue', () => { - it('toggle click', () => { - const wrapper = shallowMount(Hamburger) - const mockFn = jest.fn() - wrapper.vm.$on('toggleClick', mockFn) - wrapper.find('.hamburger').trigger('click') - expect(mockFn).toBeCalled() - }) - it('prop isActive', () => { - const wrapper = shallowMount(Hamburger) - wrapper.setProps({ isActive: true }) - expect(wrapper.contains('.is-active')).toBe(true) - wrapper.setProps({ isActive: false }) - expect(wrapper.contains('.is-active')).toBe(false) - }) -}) +import { shallowMount } from '@vue/test-utils' +import Hamburger from '@/components/Hamburger/index.vue' +describe('Hamburger.vue', () => { + it('toggle click', () => { + const wrapper = shallowMount(Hamburger) + const mockFn = jest.fn() + wrapper.vm.$on('toggleClick', mockFn) + wrapper.find('.hamburger').trigger('click') + expect(mockFn).toBeCalled() + }) + it('prop isActive', () => { + const wrapper = shallowMount(Hamburger) + wrapper.setProps({ isActive: true }) + expect(wrapper.contains('.is-active')).toBe(true) + wrapper.setProps({ isActive: false }) + expect(wrapper.contains('.is-active')).toBe(false) + }) +}) diff --git a/demo-web-ui/tests/unit/components/SvgIcon.spec.js b/demo-web-ui/tests/unit/components/SvgIcon.spec.js index 31467a9..0da4a1f 100644 --- a/demo-web-ui/tests/unit/components/SvgIcon.spec.js +++ b/demo-web-ui/tests/unit/components/SvgIcon.spec.js @@ -1,22 +1,22 @@ -import { shallowMount } from '@vue/test-utils' -import SvgIcon from '@/components/SvgIcon/index.vue' -describe('SvgIcon.vue', () => { - it('iconClass', () => { - const wrapper = shallowMount(SvgIcon, { - propsData: { - iconClass: 'test' - } - }) - expect(wrapper.find('use').attributes().href).toBe('#icon-test') - }) - it('className', () => { - const wrapper = shallowMount(SvgIcon, { - propsData: { - iconClass: 'test' - } - }) - expect(wrapper.classes().length).toBe(1) - wrapper.setProps({ className: 'test' }) - expect(wrapper.classes().includes('test')).toBe(true) - }) -}) +import { shallowMount } from '@vue/test-utils' +import SvgIcon from '@/components/SvgIcon/index.vue' +describe('SvgIcon.vue', () => { + it('iconClass', () => { + const wrapper = shallowMount(SvgIcon, { + propsData: { + iconClass: 'test' + } + }) + expect(wrapper.find('use').attributes().href).toBe('#icon-test') + }) + it('className', () => { + const wrapper = shallowMount(SvgIcon, { + propsData: { + iconClass: 'test' + } + }) + expect(wrapper.classes().length).toBe(1) + wrapper.setProps({ className: 'test' }) + expect(wrapper.classes().includes('test')).toBe(true) + }) +}) diff --git a/demo-web-ui/tests/unit/utils/formatTime.spec.js b/demo-web-ui/tests/unit/utils/formatTime.spec.js index 24e165b..a3df9be 100644 --- a/demo-web-ui/tests/unit/utils/formatTime.spec.js +++ b/demo-web-ui/tests/unit/utils/formatTime.spec.js @@ -1,30 +1,30 @@ -import { formatTime } from '@/utils/index.js' - -describe('Utils:formatTime', () => { - const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01" - const retrofit = 5 * 1000 - - it('ten digits timestamp', () => { - expect(formatTime((d / 1000).toFixed(0))).toBe('7月13日17时54分') - }) - it('test now', () => { - expect(formatTime(+new Date() - 1)).toBe('刚刚') - }) - it('less two minute', () => { - expect(formatTime(+new Date() - 60 * 2 * 1000 + retrofit)).toBe('2分钟前') - }) - it('less two hour', () => { - expect(formatTime(+new Date() - 60 * 60 * 2 * 1000 + retrofit)).toBe('2小时前') - }) - it('less one day', () => { - expect(formatTime(+new Date() - 60 * 60 * 24 * 1 * 1000)).toBe('1天前') - }) - it('more than one day', () => { - expect(formatTime(d)).toBe('7月13日17时54分') - }) - it('format', () => { - expect(formatTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54') - expect(formatTime(d, '{y}-{m}-{d}')).toBe('2018-07-13') - expect(formatTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54') - }) -}) +import { formatTime } from '@/utils/index.js' + +describe('Utils:formatTime', () => { + const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01" + const retrofit = 5 * 1000 + + it('ten digits timestamp', () => { + expect(formatTime((d / 1000).toFixed(0))).toBe('7月13日17时54分') + }) + it('test now', () => { + expect(formatTime(+new Date() - 1)).toBe('刚刚') + }) + it('less two minute', () => { + expect(formatTime(+new Date() - 60 * 2 * 1000 + retrofit)).toBe('2分钟前') + }) + it('less two hour', () => { + expect(formatTime(+new Date() - 60 * 60 * 2 * 1000 + retrofit)).toBe('2小时前') + }) + it('less one day', () => { + expect(formatTime(+new Date() - 60 * 60 * 24 * 1 * 1000)).toBe('1天前') + }) + it('more than one day', () => { + expect(formatTime(d)).toBe('7月13日17时54分') + }) + it('format', () => { + expect(formatTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54') + expect(formatTime(d, '{y}-{m}-{d}')).toBe('2018-07-13') + expect(formatTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54') + }) +}) diff --git a/demo-web-ui/tests/unit/utils/param2Obj.spec.js b/demo-web-ui/tests/unit/utils/param2Obj.spec.js index e106ed8..f463edc 100644 --- a/demo-web-ui/tests/unit/utils/param2Obj.spec.js +++ b/demo-web-ui/tests/unit/utils/param2Obj.spec.js @@ -1,14 +1,14 @@ -import { param2Obj } from '@/utils/index.js' -describe('Utils:param2Obj', () => { - const url = 'https://github.com/PanJiaChen/vue-element-admin?name=bill&age=29&sex=1&field=dGVzdA==&key=%E6%B5%8B%E8%AF%95' - - it('param2Obj test', () => { - expect(param2Obj(url)).toEqual({ - name: 'bill', - age: '29', - sex: '1', - field: window.btoa('test'), - key: '测试' - }) - }) -}) +import { param2Obj } from '@/utils/index.js' +describe('Utils:param2Obj', () => { + const url = 'https://github.com/PanJiaChen/vue-element-admin?name=bill&age=29&sex=1&field=dGVzdA==&key=%E6%B5%8B%E8%AF%95' + + it('param2Obj test', () => { + expect(param2Obj(url)).toEqual({ + name: 'bill', + age: '29', + sex: '1', + field: window.btoa('test'), + key: '测试' + }) + }) +}) diff --git a/demo-web-ui/tests/unit/utils/parseTime.spec.js b/demo-web-ui/tests/unit/utils/parseTime.spec.js index 56045af..bc97ddb 100644 --- a/demo-web-ui/tests/unit/utils/parseTime.spec.js +++ b/demo-web-ui/tests/unit/utils/parseTime.spec.js @@ -1,35 +1,35 @@ -import { parseTime } from '@/utils/index.js' - -describe('Utils:parseTime', () => { - const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01" - it('timestamp', () => { - expect(parseTime(d)).toBe('2018-07-13 17:54:01') - }) - it('timestamp string', () => { - expect(parseTime((d + ''))).toBe('2018-07-13 17:54:01') - }) - it('ten digits timestamp', () => { - expect(parseTime((d / 1000).toFixed(0))).toBe('2018-07-13 17:54:01') - }) - it('new Date', () => { - expect(parseTime(new Date(d))).toBe('2018-07-13 17:54:01') - }) - it('format', () => { - expect(parseTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54') - expect(parseTime(d, '{y}-{m}-{d}')).toBe('2018-07-13') - expect(parseTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54') - }) - it('get the day of the week', () => { - expect(parseTime(d, '{a}')).toBe('五') // 星期五 - }) - it('get the day of the week', () => { - expect(parseTime(+d + 1000 * 60 * 60 * 24 * 2, '{a}')).toBe('日') // 星期日 - }) - it('empty argument', () => { - expect(parseTime()).toBeNull() - }) - - it('null', () => { - expect(parseTime(null)).toBeNull() - }) -}) +import { parseTime } from '@/utils/index.js' + +describe('Utils:parseTime', () => { + const d = new Date('2018-07-13 17:54:01') // "2018-07-13 17:54:01" + it('timestamp', () => { + expect(parseTime(d)).toBe('2018-07-13 17:54:01') + }) + it('timestamp string', () => { + expect(parseTime((d + ''))).toBe('2018-07-13 17:54:01') + }) + it('ten digits timestamp', () => { + expect(parseTime((d / 1000).toFixed(0))).toBe('2018-07-13 17:54:01') + }) + it('new Date', () => { + expect(parseTime(new Date(d))).toBe('2018-07-13 17:54:01') + }) + it('format', () => { + expect(parseTime(d, '{y}-{m}-{d} {h}:{i}')).toBe('2018-07-13 17:54') + expect(parseTime(d, '{y}-{m}-{d}')).toBe('2018-07-13') + expect(parseTime(d, '{y}/{m}/{d} {h}-{i}')).toBe('2018/07/13 17-54') + }) + it('get the day of the week', () => { + expect(parseTime(d, '{a}')).toBe('五') // 星期五 + }) + it('get the day of the week', () => { + expect(parseTime(+d + 1000 * 60 * 60 * 24 * 2, '{a}')).toBe('日') // 星期日 + }) + it('empty argument', () => { + expect(parseTime()).toBeNull() + }) + + it('null', () => { + expect(parseTime(null)).toBeNull() + }) +}) diff --git a/demo-web-ui/tests/unit/utils/validate.spec.js b/demo-web-ui/tests/unit/utils/validate.spec.js index f774905..50ceda8 100644 --- a/demo-web-ui/tests/unit/utils/validate.spec.js +++ b/demo-web-ui/tests/unit/utils/validate.spec.js @@ -1,17 +1,17 @@ -import { validUsername, isExternal } from '@/utils/validate.js' - -describe('Utils:validate', () => { - it('validUsername', () => { - expect(validUsername('admin')).toBe(true) - expect(validUsername('editor')).toBe(true) - expect(validUsername('xxxx')).toBe(false) - }) - it('isExternal', () => { - expect(isExternal('https://github.com/PanJiaChen/vue-element-admin')).toBe(true) - expect(isExternal('http://github.com/PanJiaChen/vue-element-admin')).toBe(true) - expect(isExternal('github.com/PanJiaChen/vue-element-admin')).toBe(false) - expect(isExternal('/dashboard')).toBe(false) - expect(isExternal('./dashboard')).toBe(false) - expect(isExternal('dashboard')).toBe(false) - }) -}) +import { validUsername, isExternal } from '@/utils/validate.js' + +describe('Utils:validate', () => { + it('validUsername', () => { + expect(validUsername('admin')).toBe(true) + expect(validUsername('editor')).toBe(true) + expect(validUsername('xxxx')).toBe(false) + }) + it('isExternal', () => { + expect(isExternal('https://github.com/PanJiaChen/vue-element-admin')).toBe(true) + expect(isExternal('http://github.com/PanJiaChen/vue-element-admin')).toBe(true) + expect(isExternal('github.com/PanJiaChen/vue-element-admin')).toBe(false) + expect(isExternal('/dashboard')).toBe(false) + expect(isExternal('./dashboard')).toBe(false) + expect(isExternal('dashboard')).toBe(false) + }) +}) diff --git a/demo-web-ui/vue.config.js b/demo-web-ui/vue.config.js index 82e1de5..76952fb 100644 --- a/demo-web-ui/vue.config.js +++ b/demo-web-ui/vue.config.js @@ -1,135 +1,135 @@ -'use strict' -const path = require('path') -const defaultSettings = require('./src/settings.js') - -function resolve(dir) { - return path.join(__dirname, dir) -} - -const name = defaultSettings.title || '安瑞集团信息化平台' // page title - -// 如果端口设置为80, -// 使用管理员权限执行命令行。 -// 例如,Mac:sudo npm run -// 可以通过以下方法更改端口: -// port=9528 npm run dev或npm run dev--port=9528 -const port = process.env.port || process.env.npm_config_port || 9530 // dev port - -// 所有配置项说明都可以在中找到https://cli.vuejs.org/config/ -module.exports = { - /** - *如果计划在子路径下部署站点,则需要设置publicPath, - *例如GitHub页面。如果您计划将站点部署到https://foo.github.io/bar/, - *然后publicPath应设置为“/bar/”。 - *在大多数情况下,请使用“/”!!! - *详细信息:https://cli.vuejs.org/config/#publicpath - */ - publicPath: '/', - outputDir: 'System', - assetsDir: 'static', - lintOnSave: process.env.NODE_ENV === 'development', - productionSourceMap: false, - devServer: { - hot: true, // 自动保存 - host: '0.0.0.0', - port: port, - open: true, - overlay: { - warnings: false, - errors: true - }, - proxy: { - '/api': { // 匹配所有以 '/api'开头的请求路径 - // target: 'http://120.46.131.15:8111', // 代理目标的基础路径 - //target: 'http://192.168.1.109:8111', // 代理目标的基础路径 - target: process.env.VUE_APP_URL, // 代理目标的基础路径 - changeOrigin: true, // 支持跨域 - pathRewrite: { // 重写路径: 去掉路径中开头的'/api' - '^/api': '' - } - } - }, - disableHostCheck: true - }, - configureWebpack: { - // 在webpack的name字段中提供应用程序的标题,以便 - // 它可以在索引.html插入正确的标题。 - name: name, - resolve: { - alias: { - '@': resolve('src'), - '@C': resolve('src/components') - } - } - }, - chainWebpack(config) { - // 它可以提高第一屏的速度,建议打开预加载 - config.plugin('preload').tap(() => [{ - rel: 'preload', - // 忽略 runtime.js - // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171 - fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], - include: 'initial' - }]) - - // 当有很多页面时,会导致太多无意义的请求 - config.plugins.delete('prefetch') - - // set svg-sprite-loader 设置 svg精灵加载程序 - config.module - .rule('svg') - .exclude.add(resolve('src/icons')) - .end() - config.module - .rule('icons') - .test(/\.svg$/) - .include.add(resolve('src/icons')) - .end() - .use('svg-sprite-loader') - .loader('svg-sprite-loader') - .options({ - symbolId: 'icon-[name]' - }) - .end() - - config - .when(process.env.NODE_ENV !== 'development', - config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) - .end() - config - .optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }) - // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk - config.optimization.runtimeChunk('single') - } - ) - } -} +'use strict' +const path = require('path') +const defaultSettings = require('./src/settings.js') + +function resolve(dir) { + return path.join(__dirname, dir) +} + +const name = defaultSettings.title || '安瑞集团信息化平台' // page title + +// 如果端口设置为80, +// 使用管理员权限执行命令行。 +// 例如,Mac:sudo npm run +// 可以通过以下方法更改端口: +// port=9528 npm run dev或npm run dev--port=9528 +const port = process.env.port || process.env.npm_config_port || 9530 // dev port + +// 所有配置项说明都可以在中找到https://cli.vuejs.org/config/ +module.exports = { + /** + *如果计划在子路径下部署站点,则需要设置publicPath, + *例如GitHub页面。如果您计划将站点部署到https://foo.github.io/bar/, + *然后publicPath应设置为“/bar/”。 + *在大多数情况下,请使用“/”!!! + *详细信息:https://cli.vuejs.org/config/#publicpath + */ + publicPath: '/', + outputDir: 'System', + assetsDir: 'static', + lintOnSave: process.env.NODE_ENV === 'development', + productionSourceMap: false, + devServer: { + hot: true, // 自动保存 + host: '0.0.0.0', + port: port, + open: true, + overlay: { + warnings: false, + errors: true + }, + proxy: { + '/api': { // 匹配所有以 '/api'开头的请求路径 + // target: 'http://120.46.131.15:8111', // 代理目标的基础路径 + //target: 'http://192.168.1.109:8111', // 代理目标的基础路径 + target: process.env.VUE_APP_URL, // 代理目标的基础路径 + changeOrigin: true, // 支持跨域 + pathRewrite: { // 重写路径: 去掉路径中开头的'/api' + '^/api': '' + } + } + }, + disableHostCheck: true + }, + configureWebpack: { + // 在webpack的name字段中提供应用程序的标题,以便 + // 它可以在索引.html插入正确的标题。 + name: name, + resolve: { + alias: { + '@': resolve('src'), + '@C': resolve('src/components') + } + } + }, + chainWebpack(config) { + // 它可以提高第一屏的速度,建议打开预加载 + config.plugin('preload').tap(() => [{ + rel: 'preload', + // 忽略 runtime.js + // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171 + fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], + include: 'initial' + }]) + + // 当有很多页面时,会导致太多无意义的请求 + config.plugins.delete('prefetch') + + // set svg-sprite-loader 设置 svg精灵加载程序 + config.module + .rule('svg') + .exclude.add(resolve('src/icons')) + .end() + config.module + .rule('icons') + .test(/\.svg$/) + .include.add(resolve('src/icons')) + .end() + .use('svg-sprite-loader') + .loader('svg-sprite-loader') + .options({ + symbolId: 'icon-[name]' + }) + .end() + + config + .when(process.env.NODE_ENV !== 'development', + config => { + config + .plugin('ScriptExtHtmlWebpackPlugin') + .after('html') + .use('script-ext-html-webpack-plugin', [{ + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/ + }]) + .end() + config + .optimization.splitChunks({ + chunks: 'all', + cacheGroups: { + libs: { + name: 'chunk-libs', + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: 'initial' // only package third parties that are initially dependent + }, + elementUI: { + name: 'chunk-elementUI', // split elementUI into a single package + priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app + test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm + }, + commons: { + name: 'chunk-commons', + test: resolve('src/components'), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true + } + } + }) + // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk + config.optimization.runtimeChunk('single') + } + ) + } +} From d3ac059efc684bff8c9c6674d912486232941a28 Mon Sep 17 00:00:00 2001 From: fengdong777 <1478994744@qq.com> Date: Sat, 29 Apr 2023 14:28:37 +0800 Subject: [PATCH 2/3] 1 --- .../src/views/guideManage/guideManage.vue | 249 +++++++++ .../views/workflow/userManage/userManage.vue | 65 +++ .../workflow/userManage/userManageAdd.vue | 267 ++++++++++ .../workflow/userManage/userManageList.vue | 483 ++++++++++++++++++ 4 files changed, 1064 insertions(+) create mode 100644 demo-web-ui/src/views/guideManage/guideManage.vue create mode 100644 demo-web-ui/src/views/workflow/userManage/userManage.vue create mode 100644 demo-web-ui/src/views/workflow/userManage/userManageAdd.vue create mode 100644 demo-web-ui/src/views/workflow/userManage/userManageList.vue diff --git a/demo-web-ui/src/views/guideManage/guideManage.vue b/demo-web-ui/src/views/guideManage/guideManage.vue new file mode 100644 index 0000000..18e47fa --- /dev/null +++ b/demo-web-ui/src/views/guideManage/guideManage.vue @@ -0,0 +1,249 @@ + + + + + + \ No newline at end of file diff --git a/demo-web-ui/src/views/workflow/userManage/userManage.vue b/demo-web-ui/src/views/workflow/userManage/userManage.vue new file mode 100644 index 0000000..7fee310 --- /dev/null +++ b/demo-web-ui/src/views/workflow/userManage/userManage.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/demo-web-ui/src/views/workflow/userManage/userManageAdd.vue b/demo-web-ui/src/views/workflow/userManage/userManageAdd.vue new file mode 100644 index 0000000..f89e73d --- /dev/null +++ b/demo-web-ui/src/views/workflow/userManage/userManageAdd.vue @@ -0,0 +1,267 @@ + + + + + diff --git a/demo-web-ui/src/views/workflow/userManage/userManageList.vue b/demo-web-ui/src/views/workflow/userManage/userManageList.vue new file mode 100644 index 0000000..80d39bd --- /dev/null +++ b/demo-web-ui/src/views/workflow/userManage/userManageList.vue @@ -0,0 +1,483 @@ + + + + + + From 0353092c2488af3ad56a3f7f8cec4afa41c9f90c Mon Sep 17 00:00:00 2001 From: fkf <1475794025@qq.com> Date: Sat, 29 Apr 2023 19:25:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?4-29=20=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/api/dict_type/DictTypeFeign.java | 2 +- .../SysForumCommentFeign.java | 4 +++ .../api/sys_info_ship/SysInfoShipFeign.java | 2 +- .../yxt/demo/system/api/sys_plan/SysPlan.java | 14 +++++++++ .../system/api/sys_plan/SysPlanFeign.java | 8 +++++ .../SysPlanScheduleFeign.java | 6 ++-- .../system/api/sys_role/SysRoleFeign.java | 2 +- .../yxt/demo/system/api/sys_user/SysUser.java | 11 +++++++ .../system/api/sys_user_role/SysUserRole.java | 10 +++++++ .../api/sys_user_role/SysUserRoleFeign.java | 9 +++--- .../SysForumCommentMapper.java | 3 ++ .../SysForumCommentMapper.xml | 4 +++ .../SysForumCommentRest.java | 5 ++++ .../SysForumCommentService.java | 6 ++++ .../system/biz/sys_plan/SysPlanMapper.java | 9 ++++++ .../system/biz/sys_plan/SysPlanMapper.xml | 29 ++++++++++++++++++- .../demo/system/biz/sys_plan/SysPlanRest.java | 10 +++++++ .../system/biz/sys_plan/SysPlanService.java | 19 ++++++++++++ .../SysPlanScheduleRest.java | 8 ++--- .../SysPlanScheduleService.java | 22 ++++++++------ .../biz/sys_user_role/SysUserRoleMapper.java | 3 ++ .../biz/sys_user_role/SysUserRoleMapper.xml | 7 +++++ .../biz/sys_user_role/SysUserRoleRest.java | 6 ++-- .../sys_user_role/SysUserRoleSerrvice.java | 7 +++-- 24 files changed, 176 insertions(+), 30 deletions(-) diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/dict_type/DictTypeFeign.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/dict_type/DictTypeFeign.java index a215f2b..40d280b 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/dict_type/DictTypeFeign.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/dict_type/DictTypeFeign.java @@ -29,5 +29,5 @@ public interface DictTypeFeign { @DeleteMapping("/delete/{sid}") @ApiOperation(value = "数据字典类型删除") - ResultBean delete(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid); + ResultBean delete(@PathVariable String sid); } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_forum_comment/SysForumCommentFeign.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_forum_comment/SysForumCommentFeign.java index 33f09c1..a41dc14 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_forum_comment/SysForumCommentFeign.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_forum_comment/SysForumCommentFeign.java @@ -31,4 +31,8 @@ public interface SysForumCommentFeign { @ApiOperation(value = "查询论坛评论") @RequestMapping("/selectSysForumComment") ResultBean selectSysForumComment(); + + @ApiOperation(value = "查询论坛评论") + @RequestMapping("/selectSysForumCommentOne/{sid}") + ResultBean selectSysForumCommentOne(@PathVariable String sid); } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_info_ship/SysInfoShipFeign.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_info_ship/SysInfoShipFeign.java index b094643..113798f 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_info_ship/SysInfoShipFeign.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_info_ship/SysInfoShipFeign.java @@ -27,7 +27,7 @@ public interface SysInfoShipFeign { ResultBean deleteSysInfoShip(@PathVariable String sid); @ApiOperation(value = "修改教师学生关联") - @RequestMapping("alterSysInfoShip") + @RequestMapping("/alterSysInfoShip") ResultBean alterSysInfoShip(@RequestBody SysInfoShip sysInfoShip); @ApiOperation(value = "查询教师学生关联") diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan/SysPlan.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan/SysPlan.java index 574f56f..0a9b945 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan/SysPlan.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan/SysPlan.java @@ -22,4 +22,18 @@ public class SysPlan extends BaseEntity { private String planContent; @ApiModelProperty("反馈意见") private String planOpinion; + + @ApiModelProperty("姓名") + private String name; + @ApiModelProperty("系别") + private String department; + @ApiModelProperty("专业") + private String speciality; + @ApiModelProperty("班级") + private String calss; + + @ApiModelProperty("进度内容") + private String planContentJd; + @ApiModelProperty("反馈意见") + private String planOpinionYj; } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan/SysPlanFeign.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan/SysPlanFeign.java index 5e22d16..c1d3069 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan/SysPlanFeign.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan/SysPlanFeign.java @@ -31,4 +31,12 @@ public interface SysPlanFeign { @ApiOperation(value = "查询自主学习计划") @RequestMapping("/selectSysPlan") ResultBean selectSysPlan(); + + @ApiOperation(value = "查询指定的一个自主学习计划") + @RequestMapping("/selectSysPlanOne/{sid}") + ResultBean selectSysPlanOne(@PathVariable String sid); + + @ApiOperation(value = "查询自主学习计划的进度") + @RequestMapping("/selectSysPlanComment/{sid}") + ResultBean selectSysPlanCommentBySid(@PathVariable String sid); } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan_schedule/SysPlanScheduleFeign.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan_schedule/SysPlanScheduleFeign.java index 1b53767..89b6f1f 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan_schedule/SysPlanScheduleFeign.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_plan_schedule/SysPlanScheduleFeign.java @@ -18,9 +18,9 @@ import org.springframework.web.bind.annotation.RequestMapping; @Api(tags = "自主学习计划进度表") public interface SysPlanScheduleFeign { - @ApiOperation(value = "修改自主学习计划进度") - @RequestMapping("/alterSysPlanSchedule") - ResultBean alterSysPlanSchedule(@RequestBody SysPlanSchedule sysPlanSchedule); +// @ApiOperation(value = "修改自主学习计划进度") +// @RequestMapping("/alterSysPlanSchedule") +// ResultBean alterSysPlanSchedule(@RequestBody SysPlanSchedule sysPlanSchedule); @ApiOperation(value = "添加/修改 自主学习计划进度") @RequestMapping("/saveSysPlanSchedule") diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_role/SysRoleFeign.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_role/SysRoleFeign.java index d8261a8..ec89cf4 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_role/SysRoleFeign.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_role/SysRoleFeign.java @@ -22,7 +22,7 @@ public interface SysRoleFeign { @ApiOperation(value = "删除角色") @PostMapping("/deleteRole/{sid}") - ResultBean deleteRole(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid); + ResultBean deleteRole(@PathVariable String sid); @ApiOperation(value = "查询角色") @PostMapping("/RoleOne/{sid}") diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user/SysUser.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user/SysUser.java index c7b1827..a7dc0ac 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user/SysUser.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user/SysUser.java @@ -29,4 +29,15 @@ public class SysUser extends BaseEntity { private int hasActivated; @ApiModelProperty("token") private String token; + + @ApiModelProperty("性别") + private String sex; + @ApiModelProperty("入学年份") + private String studyYear; + @ApiModelProperty("系别") + private String department; + @ApiModelProperty("专业") + private String speciality; + @ApiModelProperty("班级") + private String calss; } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user_role/SysUserRole.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user_role/SysUserRole.java index 4168c8d..2624f2d 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user_role/SysUserRole.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user_role/SysUserRole.java @@ -16,4 +16,14 @@ public class SysUserRole extends BaseEntity { private String userSid; @ApiModelProperty("角色sid") private String roleSid; + + @ApiModelProperty("姓名") + private String name; + @ApiModelProperty("昵称") + private String nickName; + @ApiModelProperty("工号/学号") + private String userName; + @ApiModelProperty("角色名称") + private String roleName; + } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user_role/SysUserRoleFeign.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user_role/SysUserRoleFeign.java index dd2a9ff..738129b 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user_role/SysUserRoleFeign.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/api/sys_user_role/SysUserRoleFeign.java @@ -24,10 +24,11 @@ public interface SysUserRoleFeign { ResultBean alterUserRole(@RequestBody SysUserRole sysUserRole); @ApiOperation(value = "删除该用户角色") - @RequestMapping("/deleteUserRoleById") - ResultBean deleteUserRoleById(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid); + @RequestMapping("/deleteUserRoleById/{sid}") + ResultBean deleteUserRoleById(@PathVariable String sid); @ApiOperation(value = "查询用户权限") - @RequestMapping("/selectUserRole") - ResultBean selectUserRole(); + @RequestMapping("/selectUserRole/{sid}") + ResultBean selectUserRole(@PathVariable String sid); + } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentMapper.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentMapper.java index be5eae8..11f92ee 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentMapper.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentMapper.java @@ -3,6 +3,7 @@ package com.yxt.demo.system.biz.sys_forum_comment; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.yxt.demo.system.api.sys_forum_comment.SysForumComment; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -14,4 +15,6 @@ import java.util.List; @Mapper public interface SysForumCommentMapper extends BaseMapper { List selectSysForumCommentList(); + + SysForumComment selectSysForumCommentOne(@Param("sid") String sid); } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentMapper.xml b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentMapper.xml index 17b511d..eb268be 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentMapper.xml +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentMapper.xml @@ -4,4 +4,8 @@ + + \ No newline at end of file diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentRest.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentRest.java index 0a33b4c..fe4bb6f 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentRest.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentRest.java @@ -47,4 +47,9 @@ public class SysForumCommentRest implements SysForumCommentFeign { public ResultBean selectSysForumComment() { return sysForumCommentService.selectSysForumComment(); } + + @Override + public ResultBean selectSysForumCommentOne(String sid) { + return sysForumCommentService.selectSysForumCommentOne(sid); + } } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentService.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentService.java index 0c2a637..462d664 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentService.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_forum_comment/SysForumCommentService.java @@ -46,4 +46,10 @@ public class SysForumCommentService extends MybatisBaseService { List selectSysPlanList(); + + SysPlan selectSysPlanOneStudent(@Param("sid") String sid); + + SysPlan selectSysPlanOneTeacher(@Param("sid") String sid); + + SysPlan selectSysPlanBySid(@Param("sid") String sid); + + SysPlan selectSysPlanCommentBySid(@Param("sid") String sid); } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanMapper.xml b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanMapper.xml index cecf662..2ee2a08 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanMapper.xml +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanMapper.xml @@ -2,6 +2,33 @@ + + + + + + + + \ No newline at end of file diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanRest.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanRest.java index 716c8b1..04fd7f3 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanRest.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanRest.java @@ -49,4 +49,14 @@ public class SysPlanRest implements SysPlanFeign { public ResultBean selectSysPlan() { return sysPlanService.selectSysPlan(); } + + @Override + public ResultBean selectSysPlanOne(String sid) { + return sysPlanService.selectSysPlanOne(sid); + } + + @Override + public ResultBean selectSysPlanCommentBySid(String sid) { + return sysPlanService.selectSysPlanCommentBySid(sid); + } } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanService.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanService.java index f24fbec..b5606fd 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanService.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan/SysPlanService.java @@ -49,4 +49,23 @@ public class SysPlanService extends MybatisBaseService { List sysPlans = sysPlanMapper.selectSysPlanList(); return rb.success().setData(sysPlans); } + + public ResultBean selectSysPlanOne(String sid) { + ResultBean rb = ResultBean.fireFail(); + SysPlan sysPlan1 = sysPlanMapper.selectSysPlanBySid(sid); + if (sysPlan1.getStudentNo() != null){ + SysPlan sysPlan = sysPlanMapper.selectSysPlanOneStudent(sid); + return rb.success().setData(sysPlan); + }else if (sysPlan1.getTeacherNo() != null){ + SysPlan sysPlan = sysPlanMapper.selectSysPlanOneTeacher(sid); + return rb.success().setData(sysPlan); + } + return rb.setMsg("没有该任务"); + } + + public ResultBean selectSysPlanCommentBySid(String sid) { + ResultBean rb = ResultBean.fireFail(); + SysPlan sysPlan = sysPlanMapper.selectSysPlanBySid(sid); + return rb.success().setData(sysPlan); + } } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan_schedule/SysPlanScheduleRest.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan_schedule/SysPlanScheduleRest.java index 4533f82..866e712 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan_schedule/SysPlanScheduleRest.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan_schedule/SysPlanScheduleRest.java @@ -21,10 +21,10 @@ public class SysPlanScheduleRest implements SysPlanScheduleFeign{ @Autowired private SysPlanScheduleService sysPlanScheduleService; - @Override - public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule) { - return sysPlanScheduleService.alterSysPlanSchedule(sysPlanSchedule); - } +// @Override +// public ResultBean alterSysPlanSchedule(SysPlanSchedule sysPlanSchedule) { +// return sysPlanScheduleService.alterSysPlanSchedule(sysPlanSchedule); +// } @Override public ResultBean saveSysPlanSchedule(SysPlanSchedule sysPlanSchedule) { diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan_schedule/SysPlanScheduleService.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan_schedule/SysPlanScheduleService.java index c21ec56..588f08d 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan_schedule/SysPlanScheduleService.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_plan_schedule/SysPlanScheduleService.java @@ -19,15 +19,15 @@ public class SysPlanScheduleService extends MybatisBaseService { List selectSysUserRole(String sid); List selectUserRoleList(); + + SysUserRole selectUserRole(@Param("sid") String sid); } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleMapper.xml b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleMapper.xml index b38d381..90544e0 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleMapper.xml +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleMapper.xml @@ -8,4 +8,11 @@ + + \ No newline at end of file diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleRest.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleRest.java index b99827f..9b22829 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleRest.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleRest.java @@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController; */ @Api(tags = "用户角色关联表") @RestController -@RequestMapping("v1/sysuser") +@RequestMapping("v1/sysuserrole") public class SysUserRoleRest implements SysUserRoleFeign { @Autowired @@ -43,7 +43,7 @@ public class SysUserRoleRest implements SysUserRoleFeign { } @Override - public ResultBean selectUserRole() { - return sysUserRoleSerrvice.selectUserRole(); + public ResultBean selectUserRole(String sid) { + return sysUserRoleSerrvice.selectUserRole(sid); } } diff --git a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleSerrvice.java b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleSerrvice.java index 5e99639..abd3cb8 100644 --- a/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleSerrvice.java +++ b/demo-system/demo-system-biz/src/main/java/com/yxt/demo/system/biz/sys_user_role/SysUserRoleSerrvice.java @@ -44,9 +44,10 @@ public class SysUserRoleSerrvice extends MybatisBaseService userRolesList = sysUserRoleMapper.selectUserRoleList(); - return rb.setData(userRolesList); + SysUserRole sysUserRole = sysUserRoleMapper.selectUserRole(sid); +// List userRolesList = sysUserRoleMapper.selectUserRoleList(); + return rb.success().setData(sysUserRole); } }