Compare commits
2 Commits
34f6007610
...
3b6bb724b0
| Author | SHA1 | Date |
|---|---|---|
|
|
3b6bb724b0 | 2 days ago |
|
|
e7fb4a3f1b | 2 days ago |
@ -0,0 +1,23 @@ |
|||||
|
docs |
||||
|
public |
||||
|
src |
||||
|
.dockerignore |
||||
|
.editorconfig |
||||
|
.eslintignore |
||||
|
.gitattributes |
||||
|
.gitignore |
||||
|
.prettierrc |
||||
|
babel.config.js |
||||
|
Dockerfile |
||||
|
idea.config.js |
||||
|
LICENSE |
||||
|
package.json |
||||
|
package-lock.json |
||||
|
README.md |
||||
|
vue.config.js |
||||
|
yarn |
||||
|
yarn.lock |
||||
|
yarn-error.log |
||||
|
.idea |
||||
|
.svn |
||||
|
node_modules |
||||
@ -0,0 +1,39 @@ |
|||||
|
[*] |
||||
|
charset=utf-8 |
||||
|
end_of_line=crlf |
||||
|
insert_final_newline=false |
||||
|
indent_style=space |
||||
|
indent_size=2 |
||||
|
|
||||
|
[{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}] |
||||
|
indent_style=space |
||||
|
indent_size=2 |
||||
|
|
||||
|
[{*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}] |
||||
|
indent_style=space |
||||
|
indent_size=2 |
||||
|
|
||||
|
[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}] |
||||
|
indent_style=space |
||||
|
indent_size=2 |
||||
|
|
||||
|
[*.svg] |
||||
|
indent_style=space |
||||
|
indent_size=2 |
||||
|
|
||||
|
[*.js.map] |
||||
|
indent_style=space |
||||
|
indent_size=2 |
||||
|
|
||||
|
[*.less] |
||||
|
indent_style=space |
||||
|
indent_size=2 |
||||
|
|
||||
|
[*.vue] |
||||
|
indent_style=space |
||||
|
indent_size=2 |
||||
|
|
||||
|
[{.analysis_options,*.yml,*.yaml}] |
||||
|
indent_style=space |
||||
|
indent_size=2 |
||||
|
|
||||
@ -0,0 +1,3 @@ |
|||||
|
NODE_ENV=development |
||||
|
VUE_APP_PLATFORM_NAME=JeecgBoot 企业级低代码平台 |
||||
|
VUE_APP_SSO=false |
||||
@ -0,0 +1,7 @@ |
|||||
|
NODE_ENV=development |
||||
|
VUE_APP_API_BASE_URL=https://midea-test.egyun.com.cn/gcs |
||||
|
VUE_APP_API_BASE_SITE=http://localhost:9000 |
||||
|
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas |
||||
|
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview |
||||
|
VUE_APP_LOGOUT_URL=https://lsitapi.midea.com/api-auth/ssoLogout |
||||
|
VUE_APP_API_AUTH=https://lsitapi.midea.com/api-auth |
||||
@ -0,0 +1,8 @@ |
|||||
|
NODE_ENV=prod |
||||
|
VUE_APP_API_BASE_URL=https://lcapi.midea.com/api-iems-cn/gcs |
||||
|
VUE_APP_API_BASE_SITE=https://lcapi.midea.com/api-iems-cn/gcs |
||||
|
VUE_APP_CAS_BASE_URL=https://signin.midea.com/login |
||||
|
VUE_APP_ONLINE_BASE_URL= |
||||
|
VUE_APP_LOGOUT_URL=https://lcapi.midea.com/api-auth/ssoLogout |
||||
|
VUE_APP_SSO=true |
||||
|
VUE_APP_API_AUTH=https://lcapi.midea.com/api-auth |
||||
@ -0,0 +1,8 @@ |
|||||
|
NODE_ENV=production |
||||
|
VUE_APP_API_BASE_URL=https://lcapi.midea.com/api-iems-cn/gcs |
||||
|
VUE_APP_API_BASE_SITE=https://lcapi.midea.com/api-iems-cn/gcs |
||||
|
VUE_APP_CAS_BASE_URL=https://signin.midea.com/login |
||||
|
VUE_APP_ONLINE_BASE_URL= |
||||
|
VUE_APP_LOGOUT_URL=https://lcapi.midea.com/api-auth/ssoLogout |
||||
|
VUE_APP_SSO=true |
||||
|
VUE_APP_API_AUTH=https://lcapi.midea.com/api-auth |
||||
@ -0,0 +1,8 @@ |
|||||
|
NODE_ENV=sit |
||||
|
VUE_APP_API_BASE_URL=https://lsitapi.midea.com/api-iems-cn/gcs |
||||
|
VUE_APP_API_BASE_SITE=http://localhost:9000 |
||||
|
VUE_APP_CAS_BASE_URL=https://signinuat.midea.com/login |
||||
|
VUE_APP_ONLINE_BASE_URL= |
||||
|
VUE_APP_LOGOUT_URL=https://lsitapi.midea.com/api-auth/ssoLogout |
||||
|
VUE_APP_SSO=true |
||||
|
VUE_APP_API_AUTH=https://lsitapi.midea.com/api-auth |
||||
@ -0,0 +1,5 @@ |
|||||
|
NODE_ENV=production |
||||
|
VUE_APP_API_BASE_URL=https://midea-test.egyun.com.cn/gcs |
||||
|
VUE_APP_API_BASE_SITE=https://midea-test.egyun.com.cn |
||||
|
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas |
||||
|
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview |
||||
@ -0,0 +1,8 @@ |
|||||
|
NODE_ENV=uat |
||||
|
VUE_APP_API_BASE_URL=https://luatapi.midea.com/api-iems-cn/gcs |
||||
|
VUE_APP_API_BASE_SITE=http://localhost:9000 |
||||
|
VUE_APP_CAS_BASE_URL=https://signinuat.midea.com/login |
||||
|
VUE_APP_ONLINE_BASE_URL= |
||||
|
VUE_APP_LOGOUT_URL=https://luatapi.midea.com/api-auth/ssoLogout |
||||
|
VUE_APP_SSO=true |
||||
|
VUE_APP_API_AUTH=https://luatapi.midea.com/api-auth |
||||
@ -0,0 +1,8 @@ |
|||||
|
NODE_ENV=ver |
||||
|
VUE_APP_API_BASE_URL=https://lverapi.midea.com/api-iems-cn/gcs |
||||
|
VUE_APP_API_BASE_SITE=http://localhost:9000 |
||||
|
VUE_APP_CAS_BASE_URL=https://signinuat.midea.com/login |
||||
|
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview |
||||
|
VUE_APP_LOGOUT_URL=https://lverapi.midea.com/api-auth/ssoLogout |
||||
|
VUE_APP_SSO=true |
||||
|
VUE_APP_API_AUTH=https://lverapi.midea.com/api-auth |
||||
@ -0,0 +1,151 @@ |
|||||
|
module.exports = { |
||||
|
"root": true, |
||||
|
"env": { |
||||
|
"browser": true |
||||
|
}, |
||||
|
"parser": "vue-eslint-parser", |
||||
|
"parserOptions": { |
||||
|
"parser": "@babel/eslint-parser", |
||||
|
"ecmaVersion": 2020, |
||||
|
"sourceType": "module" |
||||
|
}, |
||||
|
extends: [ |
||||
|
// "eslint-config-md-js",
|
||||
|
// "eslint-config-md-vue2",
|
||||
|
// 加入 Vue 推荐的规则配置
|
||||
|
'plugin:vue/recommended', |
||||
|
], |
||||
|
rules: { |
||||
|
// 关闭多行属性间必须换行的规则
|
||||
|
'vue/new-line-between-multi-line-attributes': 'off', |
||||
|
|
||||
|
// 关闭Vue模板缩进检查(关键:解决模板中的缩进提示)
|
||||
|
'vue/html-indent': 'off', |
||||
|
|
||||
|
// 强制使用分号(默认)
|
||||
|
'semi': ['warn', 'always'], |
||||
|
|
||||
|
// 警告但不报错(提醒清理)
|
||||
|
'no-console': 'warn', |
||||
|
|
||||
|
// 单行标签属性个数
|
||||
|
'vue/max-attributes-per-line': ['warn', { |
||||
|
'singleline': 10, |
||||
|
'multiline': { |
||||
|
'max': 10, |
||||
|
'allowFirstLine': false |
||||
|
} |
||||
|
}], |
||||
|
|
||||
|
// 关闭v-html的XSS风险提示
|
||||
|
'vue/no-v-html': 'off', |
||||
|
|
||||
|
// 关闭属性必须使用连字符命名的规则
|
||||
|
'vue/attribute-hyphenation': 'off', |
||||
|
|
||||
|
// 关闭组件选项顺序校验规则
|
||||
|
'vue/order-in-components': 'off', |
||||
|
|
||||
|
// 关闭 Vue 属性顺序强制校验规则
|
||||
|
'vue/attributes-order': 'off', |
||||
|
|
||||
|
// 允许单行里展示标签和文本
|
||||
|
'vue/singleline-html-element-content-newline': 'off', |
||||
|
|
||||
|
// 要求使用严格相等(!==/===)
|
||||
|
eqeqeq: ['error', 'always'], |
||||
|
|
||||
|
// 允许在 <template v-for> 的子元素上使用 key(而非 template 标签本身)
|
||||
|
'vue/no-v-for-template-key-on-child': 'off', |
||||
|
|
||||
|
// 关闭 "$slots" 属性应作为函数使用的提示 好像没效果
|
||||
|
'vue/no-deprecated-slot-attribute': 'off', |
||||
|
|
||||
|
'vue/html-self-closing': [ |
||||
|
'error', |
||||
|
{ |
||||
|
html: { |
||||
|
void: 'always', // HTML 空标签始终自闭合
|
||||
|
normal: 'never', // 普通标签不自闭合
|
||||
|
component: 'always', // 组件始终自闭合
|
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
'vue/html-closing-bracket-spacing': [ |
||||
|
'error', |
||||
|
{ |
||||
|
selfClosingTag: 'always', // 自闭合标签斜杠前必须有空格
|
||||
|
}, |
||||
|
], |
||||
|
|
||||
|
// 插值语法内必须要有空格 {{ 1 }} 这种
|
||||
|
'vue/mustache-interpolation-spacing': ['error', 'always'], |
||||
|
|
||||
|
// 禁止使用var,要求用let/const
|
||||
|
'no-var': 'error', |
||||
|
|
||||
|
// 新增:未修改的变量必须用const,修改的用let
|
||||
|
'prefer-const': [ |
||||
|
'error', |
||||
|
{ |
||||
|
// 允许对解构赋值中的变量使用let(可选配置)
|
||||
|
destructuring: 'any', |
||||
|
// 忽略for循环中的初始化变量(如for(let i=0;...))
|
||||
|
ignoreReadBeforeAssign: false |
||||
|
} |
||||
|
], |
||||
|
|
||||
|
// if条件后必须有大括号
|
||||
|
curly: ['error', 'all'], |
||||
|
|
||||
|
// Props必须设置默认值
|
||||
|
'vue/require-default-prop': 'error', |
||||
|
// Props必须定义类型
|
||||
|
'vue/require-prop-types': 'error', |
||||
|
|
||||
|
// 关闭 $listeners 弃用警告(适用于 Vue 2 项目)
|
||||
|
'vue/no-deprecated-dollar-listeners-api': 'off', |
||||
|
|
||||
|
// 禁止访问Object原型方法(如hasOwnProperty)------------- 没效果
|
||||
|
'no-prototype-builtins': 'error', |
||||
|
|
||||
|
// 禁止定义但未使用的变量
|
||||
|
'no-unused-vars': 'error', |
||||
|
|
||||
|
// 关闭 slot-scope 弃用警告
|
||||
|
'vue/no-deprecated-slot-scope-attribute': 'off', |
||||
|
|
||||
|
// 关闭 .native 修饰符弃用警告
|
||||
|
'vue/no-deprecated-v-on-native-modifier': 'off', |
||||
|
|
||||
|
// 关闭组件名必须多单词的规则
|
||||
|
'vue/multi-word-component-names': 'off', |
||||
|
|
||||
|
// 关闭计算属性中意外副作用的提示
|
||||
|
'vue/no-side-effects-in-computed-properties': 'off', |
||||
|
|
||||
|
// 关闭组件已注册但未使用的提示
|
||||
|
'vue/no-unused-components': 'off', |
||||
|
|
||||
|
// 关闭属性应至少定义其类型的提示(针对 Vue 组件 props 类型检查)
|
||||
|
'vue/require-prop-type-constructor': 'off', |
||||
|
|
||||
|
// 禁止不必要的转义字符
|
||||
|
'no-useless-escape': 'error', |
||||
|
|
||||
|
// 限制函数复杂度(默认最大10)
|
||||
|
complexity: ['error', 10], |
||||
|
|
||||
|
// 允许使用 $on, $off, $once(Vue 3 中已废弃的事件 API)
|
||||
|
'vue/no-deprecated-events-api': 'off', |
||||
|
|
||||
|
// 允许使用过滤器(Vue 3 中已废弃)
|
||||
|
'vue/no-deprecated-filter': 'off', |
||||
|
|
||||
|
// 允许以属性形式使用 $slots(Vue 3 中建议作为函数使用)
|
||||
|
'vue/no-deprecated-slot-scope-attribute': 'off', |
||||
|
'vue/no-deprecated-dollar-scopedslots-api': 'off', |
||||
|
'vue/require-slots-as-functions': 'off', |
||||
|
|
||||
|
}, |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
public/* linguist-vendored |
||||
@ -1,11 +1,21 @@ |
|||||
# ---> Vue |
.DS_Store |
||||
# gitignore template for Vue.js projects |
node_modules |
||||
# |
/dist |
||||
# Recommended template: Node.gitignore |
|
||||
|
|
||||
# TODO: where does this rule come from? |
# local env files |
||||
docs/_book |
.env.local |
||||
|
.env.*.local |
||||
|
|
||||
# TODO: where does this rule come from? |
# Log files |
||||
test/ |
npm-debug.log* |
||||
|
yarn-debug.log* |
||||
|
yarn-error.log* |
||||
|
|
||||
|
# Editor directories and files |
||||
|
.idea |
||||
|
.vscode |
||||
|
*.suo |
||||
|
*.ntvs* |
||||
|
*.njsproj |
||||
|
*.sln |
||||
|
*.sw* |
||||
|
|||||
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"printWidth": 120, |
||||
|
"semi": true, |
||||
|
"singleQuote": true |
||||
|
} |
||||
@ -1,73 +1,21 @@ |
|||||
Apache License |
MIT License |
||||
Version 2.0, January 2004 |
|
||||
http://www.apache.org/licenses/ |
Copyright (c) 2019 DaiHao Zhang |
||||
|
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
of this software and associated documentation files (the "Software"), to deal |
||||
1. Definitions. |
in the Software without restriction, including without limitation the rights |
||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. |
copies of the Software, and to permit persons to whom the Software is |
||||
|
furnished to do so, subject to the following conditions: |
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. |
|
||||
|
The above copyright notice and this permission notice shall be included in all |
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. |
copies or substantial portions of the Software. |
||||
|
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. |
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 |
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). |
SOFTWARE. |
||||
|
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. |
|
||||
|
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." |
|
||||
|
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. |
|
||||
|
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. |
|
||||
|
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. |
|
||||
|
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: |
|
||||
|
|
||||
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and |
|
||||
|
|
||||
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and |
|
||||
|
|
||||
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and |
|
||||
|
|
||||
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. |
|
||||
|
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. |
|
||||
|
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. |
|
||||
|
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. |
|
||||
|
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. |
|
||||
|
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. |
|
||||
|
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. |
|
||||
|
|
||||
END OF TERMS AND CONDITIONS |
|
||||
|
|
||||
APPENDIX: How to apply the Apache License to your work. |
|
||||
|
|
||||
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. |
|
||||
|
|
||||
Copyright [yyyy] [name of copyright owner] |
|
||||
|
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
|
||||
you may not use this file except in compliance with the License. |
|
||||
You may obtain a copy of the License at |
|
||||
|
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
|
||||
|
|
||||
Unless required by applicable law or agreed to in writing, software |
|
||||
distributed under the License is distributed on an "AS IS" BASIS, |
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
||||
See the License for the specific language governing permissions and |
|
||||
limitations under the License. |
|
||||
@ -1,3 +1,135 @@ |
|||||
# logistics-fe-iems-winlink |
Ant Design Jeecg Vue |
||||
|
==== |
||||
|
|
||||
美的项目前端代码 |
当前最新版本: 3.0.0(发布日期:2021-11-01) |
||||
|
|
||||
|
Overview |
||||
|
---- |
||||
|
|
||||
|
基于 [Ant Design of Vue](https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/) 实现的 Ant Design Pro Vue 版 |
||||
|
Jeecg-boot 的前端UI框架,采用前后端分离方案,提供强大代码生成器的低代码平台。 |
||||
|
前端页面代码和后端功能代码一键生成,不需要写任何代码,保持jeecg一贯的强大!! |
||||
|
|
||||
|
|
||||
|
|
||||
|
#### 前端技术 |
||||
|
|
||||
|
- 基础框架:[ant-design-vue](https://github.com/vueComponent/ant-design-vue) - Ant Design Of Vue 实现 |
||||
|
- JavaScript框架:Vue |
||||
|
- Webpack |
||||
|
- node |
||||
|
- yarn |
||||
|
- eslint |
||||
|
- @vue/cli 3.2.1 |
||||
|
- [vue-cropper](https://github.com/xyxiao001/vue-cropper) - 头像裁剪组件 |
||||
|
- [@antv/g2](https://antv.alipay.com/zh-cn/index.html) - Alipay AntV 数据可视化图表 |
||||
|
- [Viser-vue](https://viserjs.github.io/docs.html#/viser/guide/installation) - antv/g2 封装实现 |
||||
|
|
||||
|
|
||||
|
|
||||
|
项目下载和运行 |
||||
|
---- |
||||
|
|
||||
|
- 拉取项目代码 |
||||
|
```bash |
||||
|
git clone https://github.com/zhangdaiscott/jeecg-boot.git |
||||
|
cd jeecg-boot/ant-design-vue-jeecg |
||||
|
``` |
||||
|
|
||||
|
- 安装依赖 |
||||
|
``` |
||||
|
yarn install |
||||
|
``` |
||||
|
|
||||
|
- 开发模式运行 |
||||
|
``` |
||||
|
yarn run serve |
||||
|
``` |
||||
|
|
||||
|
- 编译项目 |
||||
|
``` |
||||
|
yarn run build |
||||
|
``` |
||||
|
|
||||
|
- Lints and fixes files |
||||
|
``` |
||||
|
yarn run lint |
||||
|
``` |
||||
|
|
||||
|
|
||||
|
|
||||
|
其他说明 |
||||
|
---- |
||||
|
|
||||
|
- 项目使用的 [vue-cli3](https://cli.vuejs.org/guide/), 请更新您的 cli |
||||
|
|
||||
|
- 关闭 Eslint (不推荐) 移除 `package.json` 中 `eslintConfig` 整个节点代码 |
||||
|
|
||||
|
- 修改 Ant Design 配色,在文件 `vue.config.js` 中,其他 less 变量覆盖参考 [ant design](https://ant.design/docs/react/customize-theme-cn) 官方说明 |
||||
|
```ecmascript 6 |
||||
|
css: { |
||||
|
loaderOptions: { |
||||
|
less: { |
||||
|
modifyVars: { |
||||
|
/* less 变量覆盖,用于自定义 ant design 主题 */ |
||||
|
|
||||
|
'primary-color': '#F5222D', |
||||
|
'link-color': '#F5222D', |
||||
|
'border-radius-base': '4px', |
||||
|
}, |
||||
|
javascriptEnabled: true, |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
|
||||
|
|
||||
|
附属文档 |
||||
|
---- |
||||
|
- [Ant Design Vue](https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn) |
||||
|
|
||||
|
- [报表 viser-vue](https://viserjs.github.io/demo.html#/viser/bar/basic-bar) |
||||
|
|
||||
|
- [Vue](https://cn.vuejs.org/v2/guide) |
||||
|
|
||||
|
- [路由/菜单说明](https://github.com/zhangdaiscott/jeecg-boot/tree/master/ant-design-vue-jeecg/src/router/README.md) |
||||
|
|
||||
|
- [ANTD 默认配置项](https://github.com/zhangdaiscott/jeecg-boot/tree/master/ant-design-vue-jeecg/src/defaultSettings.js) |
||||
|
|
||||
|
- 其他待补充... |
||||
|
|
||||
|
|
||||
|
备注 |
||||
|
---- |
||||
|
|
||||
|
> @vue/cli 升级后,eslint 规则更新了。由于影响到全部 .vue 文件,需要逐个验证。既暂时关闭部分原本不验证的规则,后期维护时,在逐步修正这些 rules |
||||
|
|
||||
|
|
||||
|
Docker 镜像使用 |
||||
|
---- |
||||
|
|
||||
|
``` |
||||
|
# 1.修改前端项目的后台域名 |
||||
|
.env.development |
||||
|
域名改成: http://jeecg-boot-system:8080/jeecg-boot |
||||
|
|
||||
|
# 2.先进入打包前端项目 |
||||
|
yarn run build |
||||
|
|
||||
|
# 3.构建镜像 |
||||
|
docker build -t nginx:jeecgboot . |
||||
|
|
||||
|
# 4.启动镜像 |
||||
|
docker run --name jeecg-boot-nginx -p 80:80 -d nginx:jeecgboot |
||||
|
|
||||
|
# 5.配置host |
||||
|
|
||||
|
# jeecgboot |
||||
|
127.0.0.1 jeecg-boot-redis |
||||
|
127.0.0.1 jeecg-boot-mysql |
||||
|
127.0.0.1 jeecg-boot-system |
||||
|
|
||||
|
# 6.访问前台项目 |
||||
|
http://localhost:80 |
||||
|
``` |
||||
@ -0,0 +1,5 @@ |
|||||
|
module.exports = { |
||||
|
presets: [ |
||||
|
'@vue/cli-plugin-babel/preset' |
||||
|
], |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
'use strict' |
||||
|
const path = require('path') |
||||
|
|
||||
|
function resolve (dir) { |
||||
|
return path.join(__dirname, '.', dir) |
||||
|
} |
||||
|
|
||||
|
module.exports = { |
||||
|
context: path.resolve(__dirname, './'), |
||||
|
resolve: { |
||||
|
extensions: ['.js', '.vue', '.json'], |
||||
|
alias: { |
||||
|
'config': resolve('config'), |
||||
|
'@': resolve('src'), |
||||
|
'@views': resolve('src/views'), |
||||
|
'@comp': resolve('src/components'), |
||||
|
'@core': resolve('src/core'), |
||||
|
'@utils': resolve('src/utils'), |
||||
|
'@entry': resolve('src/entry'), |
||||
|
'@router': resolve('src/router'), |
||||
|
'@store': resolve('src/store') |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
@ -0,0 +1,166 @@ |
|||||
|
{ |
||||
|
"name": "vue-antd-jeecg", |
||||
|
"version": "3.0.0", |
||||
|
"private": true, |
||||
|
"scripts": { |
||||
|
"pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ", |
||||
|
"serve": "vue-cli-service serve", |
||||
|
"serve:test": "vue-cli-service serve --mode test", |
||||
|
"serve:pro": "vue-cli-service serve --mode production", |
||||
|
"serve:sit": "vue-cli-service serve --mode sit", |
||||
|
"serve:uat": "vue-cli-service serve --mode uat", |
||||
|
"build:test": "vue-cli-service build --mode test", |
||||
|
"build": "vue-cli-service build", |
||||
|
"build:sit": "vue-cli-service build --mode sit", |
||||
|
"build:uat": "vue-cli-service build --mode uat", |
||||
|
"build:ver": "vue-cli-service build --mode ver", |
||||
|
"build:prod": "vue-cli-service build --mode prod", |
||||
|
"lint": "eslint --ext .js,.vue src/views/ --fix && stylelint src/**/*.{html,vue,css,sass,scss} --fix" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"@antv/data-set": "^0.11.4", |
||||
|
"@jeecg/antd-online-mini": "3.0.0-beta", |
||||
|
"@logicflow/core": "^1.1.3", |
||||
|
"@logicflow/extension": "^1.1.3", |
||||
|
"@micro-zoe/micro-app": "^1.0.0-rc.26", |
||||
|
"@tinymce/tinymce-vue": "^2.1.0", |
||||
|
"@toast-ui/editor": "^2.1.2", |
||||
|
"@vue-office/docx": "^1.6.2", |
||||
|
"@vue-office/excel": "^1.7.11", |
||||
|
"@vue-office/pdf": "^2.0.9", |
||||
|
"@vue/composition-api": "^1.7.2", |
||||
|
"@vue/reactivity": "^3.2.37", |
||||
|
"ant-design-vue": "^1.7.2", |
||||
|
"axios": "^0.18.0", |
||||
|
"china-area-data": "^5.0.1", |
||||
|
"clipboard": "^2.0.10", |
||||
|
"codemirror": "^5.46.0", |
||||
|
"cron-parser": "^2.10.0", |
||||
|
"date-fns": "^2.28.0", |
||||
|
"dayjs": "^1.8.0", |
||||
|
"dom-align": "1.12.0", |
||||
|
"echarts": "^5.4.0", |
||||
|
"enquire.js": "^2.1.6", |
||||
|
"flv.js": "^1.6.2", |
||||
|
"html2canvas": "^1.4.1", |
||||
|
"js-cookie": "^2.2.0", |
||||
|
"jspdf": "^2.5.1", |
||||
|
"less-loader": "^5.0.0", |
||||
|
"lodash.get": "^4.4.2", |
||||
|
"lodash.pick": "^4.4.0", |
||||
|
"md5": "^2.2.1", |
||||
|
"mdesign-plus": "^1.0.51", |
||||
|
"mux.js": "^6.1.0", |
||||
|
"normalize-wheel": "^1.0.1", |
||||
|
"nprogress": "^0.2.0", |
||||
|
"pdfobject": "^2.2.7", |
||||
|
"screenfull": "^5.1.0", |
||||
|
"scss": "^0.2.4", |
||||
|
"semver": "^7.6.0", |
||||
|
"throttle-debounce": "^1.1.0", |
||||
|
"tinymce": "^5.3.2", |
||||
|
"twtree": "^3.8.3", |
||||
|
"v-viewer": "^1.7.4", |
||||
|
"video.js": "^7.19.2", |
||||
|
"videojs-contrib-hls": "^5.15.0", |
||||
|
"viser-vue": "^2.4.8", |
||||
|
"vue": "^2.7.0", |
||||
|
"vue-area-linkage": "^5.1.0", |
||||
|
"vue-cropper": "^0.5.4", |
||||
|
"vue-demi": "^0.14.10", |
||||
|
"vue-draggable-resizable": "^2.3.0", |
||||
|
"vue-i18n": "^8.28.2", |
||||
|
"vue-json-pretty": "^1.8.2", |
||||
|
"vue-loader": "^15.7.0", |
||||
|
"vue-ls": "^3.2.0", |
||||
|
"vue-photo-preview": "^1.1.3", |
||||
|
"vue-print-nb-jeecg": "^1.0.9", |
||||
|
"vue-router": "^3.0.1", |
||||
|
"vue-slider-component": "^3.2.18", |
||||
|
"vue-splitpane": "^1.0.4", |
||||
|
"vuedraggable": "^2.20.0", |
||||
|
"vuex": "^3.1.0", |
||||
|
"vxe-table": "2.9.13", |
||||
|
"vxe-table-plugin-antd": "1.8.10", |
||||
|
"xe-utils": "2.4.8" |
||||
|
}, |
||||
|
"devDependencies": { |
||||
|
"@babel/core": "^7.23.3", |
||||
|
"@babel/eslint-parser": "^7.23.3", |
||||
|
"@babel/polyfill": "^7.2.5", |
||||
|
"@vue/cli-plugin-babel": "~5.0.0", |
||||
|
"@vue/cli-plugin-eslint": "^4.5.0", |
||||
|
"@vue/cli-service": "^4.5.0", |
||||
|
"@vue/eslint-config-standard": "^4.0.0", |
||||
|
"babel-eslint": "7.2.3", |
||||
|
"babel-loader": "^9.1.3", |
||||
|
"compression-webpack-plugin": "^3.1.0", |
||||
|
"core-js": "^3.33.2", |
||||
|
"eslint": "^5.16.0", |
||||
|
"eslint-plugin-html": "^7.0.0", |
||||
|
"eslint-plugin-vue": "^9.0.0", |
||||
|
"html-webpack-plugin": "^4.2.0", |
||||
|
"less": "^3.13.1", |
||||
|
"less-loader": "^4.1.0", |
||||
|
"mini-css-extract-plugin": "^2.4.5", |
||||
|
"vue-eslint-parser": "^9.3.2", |
||||
|
"webpack": "^4.0.0" |
||||
|
}, |
||||
|
"eslintConfig": { |
||||
|
"root": true, |
||||
|
"env": { |
||||
|
"node": true |
||||
|
}, |
||||
|
"extends": [ |
||||
|
"plugin:vue/strongly-recommended", |
||||
|
"@vue/standard" |
||||
|
], |
||||
|
"parserOptions": { |
||||
|
"parser": "babel-eslint" |
||||
|
}, |
||||
|
"rules": { |
||||
|
"generator-star-spacing": "off", |
||||
|
"no-mixed-operators": 0, |
||||
|
"vue/max-attributes-per-line": [ |
||||
|
2, |
||||
|
{ |
||||
|
"singleline": 5, |
||||
|
"multiline": { |
||||
|
"max": 1, |
||||
|
"allowFirstLine": false |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"vue/attribute-hyphenation": 0, |
||||
|
"vue/html-self-closing": 0, |
||||
|
"vue/component-name-in-template-casing": 0, |
||||
|
"vue/html-closing-bracket-spacing": 0, |
||||
|
"vue/singleline-html-element-content-newline": 0, |
||||
|
"vue/no-unused-components": 0, |
||||
|
"vue/multiline-html-element-content-newline": 0, |
||||
|
"vue/no-use-v-if-with-v-for": 0, |
||||
|
"vue/html-closing-bracket-newline": 0, |
||||
|
"vue/no-parsing-error": 0, |
||||
|
"no-tabs": 0, |
||||
|
"indent": [ |
||||
|
"off", |
||||
|
2 |
||||
|
], |
||||
|
"no-console": 0, |
||||
|
"space-before-function-paren": 0 |
||||
|
} |
||||
|
}, |
||||
|
"postcss": { |
||||
|
"plugins": { |
||||
|
"autoprefixer": {} |
||||
|
} |
||||
|
}, |
||||
|
"browser": { |
||||
|
"crypto": false |
||||
|
}, |
||||
|
"browserslist": [ |
||||
|
"> 1%", |
||||
|
"last 2 versions", |
||||
|
"not ie <= 10" |
||||
|
] |
||||
|
} |
||||
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,342 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh-cmn-Hans"> |
||||
|
|
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0"> |
||||
|
<title>WinLink Frame UI</title> |
||||
|
<link rel="icon" href="<%= BASE_URL %>logo.png"> |
||||
|
<!-- <script src="<%= BASE_URL %>gcs/cacheParamCus.js"></script> |
||||
|
<script src="<%= BASE_URL %>gcs/cacheParamComp.js"></script> --> |
||||
|
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script> |
||||
|
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script> |
||||
|
<style> |
||||
|
/* stylelint-disable */ |
||||
|
html, |
||||
|
body, |
||||
|
#app { |
||||
|
height: 100%; |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
/* 针对微前端环境的兼容样式 使用:root或html作为父级,避免被自动嵌套 */ |
||||
|
:root micro-app[name="iemsWinlink"] { |
||||
|
height: 100%; |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.chromeframe { |
||||
|
margin: 0.2em 0; |
||||
|
background: #ccc; |
||||
|
color: #000; |
||||
|
padding: 0.2em 0; |
||||
|
} |
||||
|
#loader-wrapper { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
z-index: 999999; |
||||
|
} |
||||
|
#loader { |
||||
|
display: block; |
||||
|
position: absolute; |
||||
|
left: 50%; |
||||
|
top: 50%; |
||||
|
width: 120px; |
||||
|
height: 120px; |
||||
|
margin: -75px 0 0 -75px; |
||||
|
border-radius: 50%; |
||||
|
border: 3px solid transparent; |
||||
|
/* COLOR 1 */ |
||||
|
border-top-color: #FFF; |
||||
|
-webkit-animation: spin 2s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
-ms-animation: spin 2s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
-moz-animation: spin 2s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
-o-animation: spin 2s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
animation: spin 2s linear infinite; |
||||
|
/* Chrome, Firefox 16+, IE 10+, Opera */ |
||||
|
z-index: 1001; |
||||
|
} |
||||
|
#loader:before { |
||||
|
content: ""; |
||||
|
position: absolute; |
||||
|
top: 5px; |
||||
|
left: 5px; |
||||
|
right: 5px; |
||||
|
bottom: 5px; |
||||
|
border-radius: 50%; |
||||
|
border: 3px solid transparent; |
||||
|
/* COLOR 2 */ |
||||
|
border-top-color: #FFF; |
||||
|
-webkit-animation: spin 3s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
-moz-animation: spin 3s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
-o-animation: spin 3s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
-ms-animation: spin 3s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
animation: spin 3s linear infinite; |
||||
|
/* Chrome, Firefox 16+, IE 10+, Opera */ |
||||
|
} |
||||
|
#loader:after { |
||||
|
content: ""; |
||||
|
position: absolute; |
||||
|
top: 15px; |
||||
|
left: 15px; |
||||
|
right: 15px; |
||||
|
bottom: 15px; |
||||
|
border-radius: 50%; |
||||
|
border: 3px solid transparent; |
||||
|
border-top-color: #FFF; |
||||
|
/* COLOR 3 */ |
||||
|
-moz-animation: spin 1.5s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
-o-animation: spin 1.5s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
-ms-animation: spin 1.5s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
-webkit-animation: spin 1.5s linear infinite; |
||||
|
/* Chrome, Opera 15+, Safari 5+ */ |
||||
|
animation: spin 1.5s linear infinite; |
||||
|
/* Chrome, Firefox 16+, IE 10+, Opera */ |
||||
|
} |
||||
|
@-webkit-keyframes spin { |
||||
|
0% { |
||||
|
-webkit-transform: rotate(0deg); |
||||
|
/* Chrome, Opera 15+, Safari 3.1+ */ |
||||
|
-ms-transform: rotate(0deg); |
||||
|
/* IE 9 */ |
||||
|
transform: rotate(0deg); |
||||
|
/* Firefox 16+, IE 10+, Opera */ |
||||
|
} |
||||
|
100% { |
||||
|
-webkit-transform: rotate(360deg); |
||||
|
/* Chrome, Opera 15+, Safari 3.1+ */ |
||||
|
-ms-transform: rotate(360deg); |
||||
|
/* IE 9 */ |
||||
|
transform: rotate(360deg); |
||||
|
/* Firefox 16+, IE 10+, Opera */ |
||||
|
} |
||||
|
} |
||||
|
@keyframes spin { |
||||
|
0% { |
||||
|
-webkit-transform: rotate(0deg); |
||||
|
/* Chrome, Opera 15+, Safari 3.1+ */ |
||||
|
-ms-transform: rotate(0deg); |
||||
|
/* IE 9 */ |
||||
|
transform: rotate(0deg); |
||||
|
/* Firefox 16+, IE 10+, Opera */ |
||||
|
} |
||||
|
100% { |
||||
|
-webkit-transform: rotate(360deg); |
||||
|
/* Chrome, Opera 15+, Safari 3.1+ */ |
||||
|
-ms-transform: rotate(360deg); |
||||
|
/* IE 9 */ |
||||
|
transform: rotate(360deg); |
||||
|
/* Firefox 16+, IE 10+, Opera */ |
||||
|
} |
||||
|
} |
||||
|
#loader-wrapper .loader-section { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
width: 51%; |
||||
|
height: 100%; |
||||
|
background: #002140; |
||||
|
/* Old browsers */ |
||||
|
z-index: 1000; |
||||
|
-webkit-transform: translateX(0); |
||||
|
/* Chrome, Opera 15+, Safari 3.1+ */ |
||||
|
-ms-transform: translateX(0); |
||||
|
/* IE 9 */ |
||||
|
transform: translateX(0); |
||||
|
/* Firefox 16+, IE 10+, Opera */ |
||||
|
} |
||||
|
#loader-wrapper .loader-section.section-left { |
||||
|
left: 0; |
||||
|
} |
||||
|
#loader-wrapper .loader-section.section-right { |
||||
|
right: 0; |
||||
|
} |
||||
|
/* Loaded */ |
||||
|
.loaded #loader-wrapper .loader-section.section-left { |
||||
|
-webkit-transform: translateX(-100%); |
||||
|
/* Chrome, Opera 15+, Safari 3.1+ */ |
||||
|
-ms-transform: translateX(-100%); |
||||
|
/* IE 9 */ |
||||
|
transform: translateX(-100%); |
||||
|
/* Firefox 16+, IE 10+, Opera */ |
||||
|
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); |
||||
|
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); |
||||
|
} |
||||
|
.loaded #loader-wrapper .loader-section.section-right { |
||||
|
-webkit-transform: translateX(100%); |
||||
|
/* Chrome, Opera 15+, Safari 3.1+ */ |
||||
|
-ms-transform: translateX(100%); |
||||
|
/* IE 9 */ |
||||
|
transform: translateX(100%); |
||||
|
/* Firefox 16+, IE 10+, Opera */ |
||||
|
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); |
||||
|
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); |
||||
|
} |
||||
|
.loaded #loader { |
||||
|
opacity: 0; |
||||
|
-webkit-transition: all 0.3s ease-out; |
||||
|
transition: all 0.3s ease-out; |
||||
|
} |
||||
|
.loaded #loader-wrapper { |
||||
|
visibility: hidden; |
||||
|
-webkit-transform: translateY(-100%); |
||||
|
/* Chrome, Opera 15+, Safari 3.1+ */ |
||||
|
-ms-transform: translateY(-100%); |
||||
|
/* IE 9 */ |
||||
|
transform: translateY(-100%); |
||||
|
/* Firefox 16+, IE 10+, Opera */ |
||||
|
-webkit-transition: all 0.3s 1s ease-out; |
||||
|
transition: all 0.3s 1s ease-out; |
||||
|
} |
||||
|
/* JavaScript Turned Off */ |
||||
|
.no-js #loader-wrapper { |
||||
|
display: none; |
||||
|
} |
||||
|
.no-js h1 { |
||||
|
color: #222222; |
||||
|
} |
||||
|
#loader-wrapper .load_title { |
||||
|
font-family: 'Open Sans'; |
||||
|
color: #FFF; |
||||
|
font-size: 14px; |
||||
|
width: 100%; |
||||
|
text-align: center; |
||||
|
z-index: 9999999999999; |
||||
|
position: absolute; |
||||
|
top: 60%; |
||||
|
opacity: 1; |
||||
|
line-height: 30px; |
||||
|
} |
||||
|
#loader-wrapper .load_title span { |
||||
|
font-weight: normal; |
||||
|
font-style: italic; |
||||
|
font-size: 14px; |
||||
|
color: #FFF; |
||||
|
opacity: 0.5; |
||||
|
} |
||||
|
/* 滚动条优化 start */ |
||||
|
::-webkit-scrollbar{ |
||||
|
width:8px; |
||||
|
height:14px; |
||||
|
z-index: 9; |
||||
|
} |
||||
|
::-webkit-scrollbar-track{ |
||||
|
background: #f6f6f6; |
||||
|
border-radius:2px; |
||||
|
} |
||||
|
::-webkit-scrollbar-thumb{ |
||||
|
background: #cdcdcd; |
||||
|
border-radius:2px; |
||||
|
} |
||||
|
::-webkit-scrollbar-thumb:hover{ |
||||
|
background: #747474; |
||||
|
} |
||||
|
::-webkit-scrollbar-corner { |
||||
|
background: #f6f6f6; |
||||
|
} |
||||
|
/* 滚动条优化 end */ |
||||
|
/* stylelint-enable */ |
||||
|
</style> |
||||
|
<!-- 全局配置 --> |
||||
|
<script> |
||||
|
window._CONFIG = {}; |
||||
|
// 定义加载函数但不立即执行 |
||||
|
window.loadRequiredScripts = function(BASE_URL) { |
||||
|
function loadScript(src) { |
||||
|
const script = document.createElement('script') |
||||
|
script.src = src |
||||
|
document.head.appendChild(script) |
||||
|
} |
||||
|
loadScript(BASE_URL + '/cacheParamCus.js') |
||||
|
loadScript(BASE_URL + '/cacheParamComp.js') |
||||
|
} |
||||
|
|
||||
|
// 微前端-创建全局变量 |
||||
|
window.loadRequiredScriptsMicroApp = function (BASE_URL) { |
||||
|
// 初始化全局变量容器 |
||||
|
window.__CACHE_VARS__ = window.__CACHE_VARS__ || {}; |
||||
|
|
||||
|
// 加载单个脚本并提取变量 |
||||
|
function loadScript(src) { |
||||
|
var xhr = new XMLHttpRequest(); |
||||
|
xhr.open('GET', src, true); |
||||
|
// 允许跨域请求携带Cookie |
||||
|
xhr.withCredentials = true; |
||||
|
// 添加请求头参数 |
||||
|
xhr.setRequestHeader('tenantcode', 'T20210428000005'); |
||||
|
xhr.setRequestHeader('Gate-App-Code', 'APP202106220004'); |
||||
|
xhr.onreadystatechange = function () { |
||||
|
if (xhr.readyState === 4 && (xhr.status === 200 || xhr.status === 304)) { |
||||
|
extractVariables(xhr.responseText); |
||||
|
} |
||||
|
}; |
||||
|
xhr.send(); |
||||
|
} |
||||
|
|
||||
|
// 提取变量核心逻辑(无模板字符串) |
||||
|
function extractVariables(scriptContent) { |
||||
|
// 1. 提取所有变量名 |
||||
|
var varNames = []; |
||||
|
var regex = /(var|let|const)\s+([a-zA-Z_$][\w$]*)\s*=/g; |
||||
|
var match; |
||||
|
while ((match = regex.exec(scriptContent))) { |
||||
|
if (varNames.indexOf(match[2]) === -1) { |
||||
|
varNames.push(match[2]); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 2. 纯字符串拼接生成提取代码 |
||||
|
var code = '(function(){' + scriptContent + ';var vars=window.__CACHE_VARS__;'; |
||||
|
|
||||
|
// 逐个添加变量提取逻辑 |
||||
|
for (var i = 0; i < varNames.length; i++) { |
||||
|
var name = varNames[i]; |
||||
|
code += 'if(typeof ' + name + '!=="undefined")vars["' + name + '"]=' + name + ';'; |
||||
|
} |
||||
|
|
||||
|
code += '})();'; |
||||
|
|
||||
|
// 3. 执行代码 |
||||
|
var script = document.createElement('script'); |
||||
|
script.textContent = code; |
||||
|
document.head.appendChild(script); |
||||
|
document.head.removeChild(script); // 执行后清理 |
||||
|
} |
||||
|
|
||||
|
// 加载目标脚本 |
||||
|
loadScript(BASE_URL + '/cacheParamCus.js'); |
||||
|
loadScript(BASE_URL + '/cacheParamComp.js'); |
||||
|
}; |
||||
|
|
||||
|
</script> |
||||
|
</head> |
||||
|
|
||||
|
<body> |
||||
|
<div id="app"> |
||||
|
<div id="loader-wrapper"> |
||||
|
<div id="loader"></div> |
||||
|
<div class="loader-section section-left"></div> |
||||
|
<div class="loader-section section-right"></div> |
||||
|
<div class="load_title">正在加载 WinLink Frame UI,请耐心等待 </div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</body> |
||||
|
|
||||
|
</html> |
||||
|
After Width: | Height: | Size: 4.5 KiB |
@ -0,0 +1,262 @@ |
|||||
|
/* eslint-disable */ |
||||
|
tinymce.addI18n('zh_CN',{ |
||||
|
"Redo": "\u91cd\u590d", |
||||
|
"Undo": "\u64a4\u6d88", |
||||
|
"Cut": "\u526a\u5207", |
||||
|
"Copy": "\u590d\u5236", |
||||
|
"Paste": "\u7c98\u8d34", |
||||
|
"Select all": "\u5168\u9009", |
||||
|
"New document": "\u65b0\u6587\u6863", |
||||
|
"Ok": "\u786e\u5b9a", |
||||
|
"Cancel": "\u53d6\u6d88", |
||||
|
"Visual aids": "\u7f51\u683c\u7ebf", |
||||
|
"Bold": "\u7c97\u4f53", |
||||
|
"Italic": "\u659c\u4f53", |
||||
|
"Underline": "\u4e0b\u5212\u7ebf", |
||||
|
"Strikethrough": "\u5220\u9664\u7ebf", |
||||
|
"Superscript": "\u4e0a\u6807", |
||||
|
"Subscript": "\u4e0b\u6807", |
||||
|
"Clear formatting": "\u6e05\u9664\u683c\u5f0f", |
||||
|
"Align left": "\u5de6\u5bf9\u9f50", |
||||
|
"Align center": "\u5c45\u4e2d", |
||||
|
"Align right": "\u53f3\u5bf9\u9f50", |
||||
|
"Justify": "\u4e24\u7aef\u5bf9\u9f50", |
||||
|
"Bullet list": "\u9879\u76ee\u7b26\u53f7", |
||||
|
"Numbered list": "\u7f16\u53f7\u5217\u8868", |
||||
|
"Decrease indent": "\u51cf\u5c11\u7f29\u8fdb", |
||||
|
"Increase indent": "\u589e\u52a0\u7f29\u8fdb", |
||||
|
"Close": "\u5173\u95ed", |
||||
|
"Formats": "\u683c\u5f0f", |
||||
|
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "\u4f60\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u5bf9\u526a\u8d34\u677f\u7684\u8bbf\u95ee\uff0c\u8bf7\u4f7f\u7528Ctrl+X\/C\/V\u952e\u8fdb\u884c\u590d\u5236\u7c98\u8d34\u3002", |
||||
|
"Headers": "\u6807\u9898", |
||||
|
"Header 1": "\u6807\u98981", |
||||
|
"Header 2": "\u6807\u98982", |
||||
|
"Header 3": "\u6807\u98983", |
||||
|
"Header 4": "\u6807\u98984", |
||||
|
"Header 5": "\u6807\u98985", |
||||
|
"Header 6": "\u6807\u98986", |
||||
|
"Headings": "\u6807\u9898", |
||||
|
"Heading 1": "\u6807\u98981", |
||||
|
"Heading 2": "\u6807\u98982", |
||||
|
"Heading 3": "\u6807\u98983", |
||||
|
"Heading 4": "\u6807\u98984", |
||||
|
"Heading 5": "\u6807\u98985", |
||||
|
"Heading 6": "\u6807\u98986", |
||||
|
"Preformatted": "\u9884\u683c\u5f0f\u5316", |
||||
|
"Div": "Div\u533a\u5757", |
||||
|
"Pre": "\u9884\u683c\u5f0f\u6587\u672c", |
||||
|
"Code": "\u4ee3\u7801", |
||||
|
"Paragraph": "\u6bb5\u843d", |
||||
|
"Blockquote": "\u5f15\u7528", |
||||
|
"Inline": "\u6587\u672c", |
||||
|
"Blocks": "\u533a\u5757", |
||||
|
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "\u5f53\u524d\u4e3a\u7eaf\u6587\u672c\u7c98\u8d34\u6a21\u5f0f\uff0c\u518d\u6b21\u70b9\u51fb\u53ef\u4ee5\u56de\u5230\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\u3002", |
||||
|
"Font Family": "\u5b57\u4f53", |
||||
|
"Font Sizes": "\u5b57\u53f7", |
||||
|
"Class": "Class", |
||||
|
"Browse for an image": "\u6d4f\u89c8\u56fe\u50cf", |
||||
|
"OR": "\u6216", |
||||
|
"Drop an image here": "\u62d6\u653e\u4e00\u5f20\u56fe\u50cf\u81f3\u6b64", |
||||
|
"Upload": "\u4e0a\u4f20", |
||||
|
"Block": "\u5757", |
||||
|
"Align": "\u5bf9\u9f50", |
||||
|
"Default": "\u9ed8\u8ba4", |
||||
|
"Circle": "\u7a7a\u5fc3\u5706", |
||||
|
"Disc": "\u5b9e\u5fc3\u5706", |
||||
|
"Square": "\u65b9\u5757", |
||||
|
"Lower Alpha": "\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd", |
||||
|
"Lower Greek": "\u5c0f\u5199\u5e0c\u814a\u5b57\u6bcd", |
||||
|
"Lower Roman": "\u5c0f\u5199\u7f57\u9a6c\u5b57\u6bcd", |
||||
|
"Upper Alpha": "\u5927\u5199\u82f1\u6587\u5b57\u6bcd", |
||||
|
"Upper Roman": "\u5927\u5199\u7f57\u9a6c\u5b57\u6bcd", |
||||
|
"Anchor": "\u951a\u70b9", |
||||
|
"Name": "\u540d\u79f0", |
||||
|
"Id": "\u6807\u8bc6\u7b26", |
||||
|
"Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "\u6807\u8bc6\u7b26\u5e94\u8be5\u4ee5\u5b57\u6bcd\u5f00\u5934\uff0c\u540e\u8ddf\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u7834\u6298\u53f7\u3001\u70b9\u3001\u5192\u53f7\u6216\u4e0b\u5212\u7ebf\u3002", |
||||
|
"You have unsaved changes are you sure you want to navigate away?": "\u4f60\u8fd8\u6709\u6587\u6863\u5c1a\u672a\u4fdd\u5b58\uff0c\u786e\u5b9a\u8981\u79bb\u5f00\uff1f", |
||||
|
"Restore last draft": "\u6062\u590d\u4e0a\u6b21\u7684\u8349\u7a3f", |
||||
|
"Special character": "\u7279\u6b8a\u7b26\u53f7", |
||||
|
"Source code": "\u6e90\u4ee3\u7801", |
||||
|
"Insert\/Edit code sample": "\u63d2\u5165\/\u7f16\u8f91\u4ee3\u7801\u793a\u4f8b", |
||||
|
"Language": "\u8bed\u8a00", |
||||
|
"Code sample": "\u4ee3\u7801\u793a\u4f8b", |
||||
|
"Color": "\u989c\u8272", |
||||
|
"R": "R", |
||||
|
"G": "G", |
||||
|
"B": "B", |
||||
|
"Left to right": "\u4ece\u5de6\u5230\u53f3", |
||||
|
"Right to left": "\u4ece\u53f3\u5230\u5de6", |
||||
|
"Emoticons": "\u8868\u60c5", |
||||
|
"Document properties": "\u6587\u6863\u5c5e\u6027", |
||||
|
"Title": "\u6807\u9898", |
||||
|
"Keywords": "\u5173\u952e\u8bcd", |
||||
|
"Description": "\u63cf\u8ff0", |
||||
|
"Robots": "\u673a\u5668\u4eba", |
||||
|
"Author": "\u4f5c\u8005", |
||||
|
"Encoding": "\u7f16\u7801", |
||||
|
"Fullscreen": "\u5168\u5c4f", |
||||
|
"Action": "\u64cd\u4f5c", |
||||
|
"Shortcut": "\u5feb\u6377\u952e", |
||||
|
"Help": "\u5e2e\u52a9", |
||||
|
"Address": "\u5730\u5740", |
||||
|
"Focus to menubar": "\u79fb\u52a8\u7126\u70b9\u5230\u83dc\u5355\u680f", |
||||
|
"Focus to toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u5de5\u5177\u680f", |
||||
|
"Focus to element path": "\u79fb\u52a8\u7126\u70b9\u5230\u5143\u7d20\u8def\u5f84", |
||||
|
"Focus to contextual toolbar": "\u79fb\u52a8\u7126\u70b9\u5230\u4e0a\u4e0b\u6587\u83dc\u5355", |
||||
|
"Insert link (if link plugin activated)": "\u63d2\u5165\u94fe\u63a5 (\u5982\u679c\u94fe\u63a5\u63d2\u4ef6\u5df2\u6fc0\u6d3b)", |
||||
|
"Save (if save plugin activated)": "\u4fdd\u5b58(\u5982\u679c\u4fdd\u5b58\u63d2\u4ef6\u5df2\u6fc0\u6d3b)", |
||||
|
"Find (if searchreplace plugin activated)": "\u67e5\u627e(\u5982\u679c\u67e5\u627e\u66ff\u6362\u63d2\u4ef6\u5df2\u6fc0\u6d3b)", |
||||
|
"Plugins installed ({0}):": "\u5df2\u5b89\u88c5\u63d2\u4ef6 ({0}):", |
||||
|
"Premium plugins:": "\u4f18\u79c0\u63d2\u4ef6\uff1a", |
||||
|
"Learn more...": "\u4e86\u89e3\u66f4\u591a...", |
||||
|
"You are using {0}": "\u4f60\u6b63\u5728\u4f7f\u7528 {0}", |
||||
|
"Plugins": "\u63d2\u4ef6", |
||||
|
"Handy Shortcuts": "\u5feb\u6377\u952e", |
||||
|
"Horizontal line": "\u6c34\u5e73\u5206\u5272\u7ebf", |
||||
|
"Insert\/edit image": "\u63d2\u5165\/\u7f16\u8f91\u56fe\u7247", |
||||
|
"Image description": "\u56fe\u7247\u63cf\u8ff0", |
||||
|
"Source": "\u5730\u5740", |
||||
|
"Dimensions": "\u5927\u5c0f", |
||||
|
"Constrain proportions": "\u4fdd\u6301\u7eb5\u6a2a\u6bd4", |
||||
|
"General": "\u666e\u901a", |
||||
|
"Advanced": "\u9ad8\u7ea7", |
||||
|
"Style": "\u6837\u5f0f", |
||||
|
"Vertical space": "\u5782\u76f4\u8fb9\u8ddd", |
||||
|
"Horizontal space": "\u6c34\u5e73\u8fb9\u8ddd", |
||||
|
"Border": "\u8fb9\u6846", |
||||
|
"Insert image": "\u63d2\u5165\u56fe\u7247", |
||||
|
"Image": "\u56fe\u7247", |
||||
|
"Image list": "\u56fe\u7247\u5217\u8868", |
||||
|
"Rotate counterclockwise": "\u9006\u65f6\u9488\u65cb\u8f6c", |
||||
|
"Rotate clockwise": "\u987a\u65f6\u9488\u65cb\u8f6c", |
||||
|
"Flip vertically": "\u5782\u76f4\u7ffb\u8f6c", |
||||
|
"Flip horizontally": "\u6c34\u5e73\u7ffb\u8f6c", |
||||
|
"Edit image": "\u7f16\u8f91\u56fe\u7247", |
||||
|
"Image options": "\u56fe\u7247\u9009\u9879", |
||||
|
"Zoom in": "\u653e\u5927", |
||||
|
"Zoom out": "\u7f29\u5c0f", |
||||
|
"Crop": "\u88c1\u526a", |
||||
|
"Resize": "\u8c03\u6574\u5927\u5c0f", |
||||
|
"Orientation": "\u65b9\u5411", |
||||
|
"Brightness": "\u4eae\u5ea6", |
||||
|
"Sharpen": "\u9510\u5316", |
||||
|
"Contrast": "\u5bf9\u6bd4\u5ea6", |
||||
|
"Color levels": "\u989c\u8272\u5c42\u6b21", |
||||
|
"Gamma": "\u4f3d\u9a6c\u503c", |
||||
|
"Invert": "\u53cd\u8f6c", |
||||
|
"Apply": "\u5e94\u7528", |
||||
|
"Back": "\u540e\u9000", |
||||
|
"Insert date\/time": "\u63d2\u5165\u65e5\u671f\/\u65f6\u95f4", |
||||
|
"Date\/time": "\u65e5\u671f\/\u65f6\u95f4", |
||||
|
"Insert link": "\u63d2\u5165\u94fe\u63a5", |
||||
|
"Insert\/edit link": "\u63d2\u5165\/\u7f16\u8f91\u94fe\u63a5", |
||||
|
"Text to display": "\u663e\u793a\u6587\u5b57", |
||||
|
"Url": "\u5730\u5740", |
||||
|
"Target": "\u6253\u5f00\u65b9\u5f0f", |
||||
|
"None": "\u65e0", |
||||
|
"New window": "\u5728\u65b0\u7a97\u53e3\u6253\u5f00", |
||||
|
"Remove link": "\u5220\u9664\u94fe\u63a5", |
||||
|
"Anchors": "\u951a\u70b9", |
||||
|
"Link": "\u94fe\u63a5", |
||||
|
"Paste or type a link": "\u7c98\u8d34\u6216\u8f93\u5165\u94fe\u63a5", |
||||
|
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u4e3a\u90ae\u4ef6\u5730\u5740\uff0c\u9700\u8981\u52a0\u4e0amailto:\u524d\u7f00\u5417\uff1f", |
||||
|
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "\u4f60\u6240\u586b\u5199\u7684URL\u5730\u5740\u5c5e\u4e8e\u5916\u90e8\u94fe\u63a5\uff0c\u9700\u8981\u52a0\u4e0ahttp:\/\/:\u524d\u7f00\u5417\uff1f", |
||||
|
"Link list": "\u94fe\u63a5\u5217\u8868", |
||||
|
"Insert video": "\u63d2\u5165\u89c6\u9891", |
||||
|
"Insert\/edit video": "\u63d2\u5165\/\u7f16\u8f91\u89c6\u9891", |
||||
|
"Insert\/edit media": "\u63d2\u5165\/\u7f16\u8f91\u5a92\u4f53", |
||||
|
"Alternative source": "\u955c\u50cf", |
||||
|
"Poster": "\u5c01\u9762", |
||||
|
"Paste your embed code below:": "\u5c06\u5185\u5d4c\u4ee3\u7801\u7c98\u8d34\u5728\u4e0b\u9762:", |
||||
|
"Embed": "\u5185\u5d4c", |
||||
|
"Media": "\u5a92\u4f53", |
||||
|
"Nonbreaking space": "\u4e0d\u95f4\u65ad\u7a7a\u683c", |
||||
|
"Page break": "\u5206\u9875\u7b26", |
||||
|
"Paste as text": "\u7c98\u8d34\u4e3a\u6587\u672c", |
||||
|
"Preview": "\u9884\u89c8", |
||||
|
"Print": "\u6253\u5370", |
||||
|
"Save": "\u4fdd\u5b58", |
||||
|
"Find": "\u67e5\u627e", |
||||
|
"Replace with": "\u66ff\u6362\u4e3a", |
||||
|
"Replace": "\u66ff\u6362", |
||||
|
"Replace all": "\u5168\u90e8\u66ff\u6362", |
||||
|
"Prev": "\u4e0a\u4e00\u4e2a", |
||||
|
"Next": "\u4e0b\u4e00\u4e2a", |
||||
|
"Find and replace": "\u67e5\u627e\u548c\u66ff\u6362", |
||||
|
"Could not find the specified string.": "\u672a\u627e\u5230\u641c\u7d22\u5185\u5bb9.", |
||||
|
"Match case": "\u533a\u5206\u5927\u5c0f\u5199", |
||||
|
"Whole words": "\u5168\u5b57\u5339\u914d", |
||||
|
"Spellcheck": "\u62fc\u5199\u68c0\u67e5", |
||||
|
"Ignore": "\u5ffd\u7565", |
||||
|
"Ignore all": "\u5168\u90e8\u5ffd\u7565", |
||||
|
"Finish": "\u5b8c\u6210", |
||||
|
"Add to Dictionary": "\u6dfb\u52a0\u5230\u5b57\u5178", |
||||
|
"Insert table": "\u63d2\u5165\u8868\u683c", |
||||
|
"Table properties": "\u8868\u683c\u5c5e\u6027", |
||||
|
"Delete table": "\u5220\u9664\u8868\u683c", |
||||
|
"Cell": "\u5355\u5143\u683c", |
||||
|
"Row": "\u884c", |
||||
|
"Column": "\u5217", |
||||
|
"Cell properties": "\u5355\u5143\u683c\u5c5e\u6027", |
||||
|
"Merge cells": "\u5408\u5e76\u5355\u5143\u683c", |
||||
|
"Split cell": "\u62c6\u5206\u5355\u5143\u683c", |
||||
|
"Insert row before": "\u5728\u4e0a\u65b9\u63d2\u5165", |
||||
|
"Insert row after": "\u5728\u4e0b\u65b9\u63d2\u5165", |
||||
|
"Delete row": "\u5220\u9664\u884c", |
||||
|
"Row properties": "\u884c\u5c5e\u6027", |
||||
|
"Cut row": "\u526a\u5207\u884c", |
||||
|
"Copy row": "\u590d\u5236\u884c", |
||||
|
"Paste row before": "\u7c98\u8d34\u5230\u4e0a\u65b9", |
||||
|
"Paste row after": "\u7c98\u8d34\u5230\u4e0b\u65b9", |
||||
|
"Insert column before": "\u5728\u5de6\u4fa7\u63d2\u5165", |
||||
|
"Insert column after": "\u5728\u53f3\u4fa7\u63d2\u5165", |
||||
|
"Delete column": "\u5220\u9664\u5217", |
||||
|
"Cols": "\u5217", |
||||
|
"Rows": "\u884c", |
||||
|
"Width": "\u5bbd", |
||||
|
"Height": "\u9ad8", |
||||
|
"Cell spacing": "\u5355\u5143\u683c\u5916\u95f4\u8ddd", |
||||
|
"Cell padding": "\u5355\u5143\u683c\u5185\u8fb9\u8ddd", |
||||
|
"Caption": "\u6807\u9898", |
||||
|
"Left": "\u5de6\u5bf9\u9f50", |
||||
|
"Center": "\u5c45\u4e2d", |
||||
|
"Right": "\u53f3\u5bf9\u9f50", |
||||
|
"Cell type": "\u5355\u5143\u683c\u7c7b\u578b", |
||||
|
"Scope": "\u8303\u56f4", |
||||
|
"Alignment": "\u5bf9\u9f50\u65b9\u5f0f", |
||||
|
"H Align": "\u6c34\u5e73\u5bf9\u9f50", |
||||
|
"V Align": "\u5782\u76f4\u5bf9\u9f50", |
||||
|
"Top": "\u9876\u90e8\u5bf9\u9f50", |
||||
|
"Middle": "\u5782\u76f4\u5c45\u4e2d", |
||||
|
"Bottom": "\u5e95\u90e8\u5bf9\u9f50", |
||||
|
"Header cell": "\u8868\u5934\u5355\u5143\u683c", |
||||
|
"Row group": "\u884c\u7ec4", |
||||
|
"Column group": "\u5217\u7ec4", |
||||
|
"Row type": "\u884c\u7c7b\u578b", |
||||
|
"Header": "\u8868\u5934", |
||||
|
"Body": "\u8868\u4f53", |
||||
|
"Footer": "\u8868\u5c3e", |
||||
|
"Border color": "\u8fb9\u6846\u989c\u8272", |
||||
|
"Insert template": "\u63d2\u5165\u6a21\u677f", |
||||
|
"Templates": "\u6a21\u677f", |
||||
|
"Template": "\u6a21\u677f", |
||||
|
"Text color": "\u6587\u5b57\u989c\u8272", |
||||
|
"Background color": "\u80cc\u666f\u8272", |
||||
|
"Custom...": "\u81ea\u5b9a\u4e49...", |
||||
|
"Custom color": "\u81ea\u5b9a\u4e49\u989c\u8272", |
||||
|
"No color": "\u65e0", |
||||
|
"Table of Contents": "\u5185\u5bb9\u5217\u8868", |
||||
|
"Show blocks": "\u663e\u793a\u533a\u5757\u8fb9\u6846", |
||||
|
"Show invisible characters": "\u663e\u793a\u4e0d\u53ef\u89c1\u5b57\u7b26", |
||||
|
"Words: {0}": "\u5b57\u6570\uff1a{0}", |
||||
|
"{0} words": "{0} \u5b57", |
||||
|
"File": "\u6587\u4ef6", |
||||
|
"Edit": "\u7f16\u8f91", |
||||
|
"Insert": "\u63d2\u5165", |
||||
|
"View": "\u89c6\u56fe", |
||||
|
"Format": "\u683c\u5f0f", |
||||
|
"Table": "\u8868\u683c", |
||||
|
"Tools": "\u5de5\u5177", |
||||
|
"Powered by {0}": "\u7531{0}\u9a71\u52a8", |
||||
|
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u5728\u7f16\u8f91\u533a\u6309ALT-F9\u6253\u5f00\u83dc\u5355\uff0c\u6309ALT-F10\u6253\u5f00\u5de5\u5177\u680f\uff0c\u6309ALT-0\u67e5\u770b\u5e2e\u52a9" |
||||
|
}); |
||||
@ -0,0 +1,554 @@ |
|||||
|
/** |
||||
|
* Copyright (c) Tiny Technologies, Inc. All rights reserved. |
||||
|
* Licensed under the LGPL or a commercial license. |
||||
|
* For LGPL see License.txt in the project root for license information. |
||||
|
* For commercial licenses see https://www.tiny.cloud/ |
||||
|
*/ |
||||
|
.mce-content-body .mce-item-anchor { |
||||
|
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center; |
||||
|
cursor: default; |
||||
|
display: inline-block; |
||||
|
height: 12px !important; |
||||
|
padding: 0 2px; |
||||
|
-webkit-user-modify: read-only; |
||||
|
-moz-user-modify: read-only; |
||||
|
-webkit-user-select: all; |
||||
|
-moz-user-select: all; |
||||
|
-ms-user-select: all; |
||||
|
user-select: all; |
||||
|
width: 8px !important; |
||||
|
} |
||||
|
.mce-content-body .mce-item-anchor[data-mce-selected] { |
||||
|
outline-offset: 1px; |
||||
|
} |
||||
|
.tox-comments-visible .tox-comment { |
||||
|
background-color: #fff0b7; |
||||
|
} |
||||
|
.tox-comments-visible .tox-comment--active { |
||||
|
background-color: #ffe168; |
||||
|
} |
||||
|
.tox-checklist > li:not(.tox-checklist--hidden) { |
||||
|
list-style: none; |
||||
|
margin: .25em 0; |
||||
|
position: relative; |
||||
|
} |
||||
|
.tox-checklist > li:not(.tox-checklist--hidden)::before { |
||||
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); |
||||
|
background-size: 100%; |
||||
|
content: ''; |
||||
|
cursor: pointer; |
||||
|
height: 1em; |
||||
|
left: -1.5em; |
||||
|
position: absolute; |
||||
|
top: .125em; |
||||
|
width: 1em; |
||||
|
} |
||||
|
.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before { |
||||
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A"); |
||||
|
} |
||||
|
/* stylelint-disable */ |
||||
|
/* http://prismjs.com/ */ |
||||
|
/** |
||||
|
* prism.js default theme for JavaScript, CSS and HTML |
||||
|
* Based on dabblet (http://dabblet.com) |
||||
|
* @author Lea Verou |
||||
|
*/ |
||||
|
code[class*="language-"], |
||||
|
pre[class*="language-"] { |
||||
|
color: black; |
||||
|
text-shadow: 0 1px white; |
||||
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; |
||||
|
font-size: .875rem; |
||||
|
direction: ltr; |
||||
|
text-align: left; |
||||
|
white-space: pre; |
||||
|
word-spacing: normal; |
||||
|
word-break: normal; |
||||
|
word-wrap: normal; |
||||
|
line-height: 1.5; |
||||
|
-moz-tab-size: 4; |
||||
|
tab-size: 4; |
||||
|
-webkit-hyphens: none; |
||||
|
-ms-hyphens: none; |
||||
|
hyphens: none; |
||||
|
} |
||||
|
pre[class*="language-"]::-moz-selection, |
||||
|
pre[class*="language-"] ::-moz-selection, |
||||
|
code[class*="language-"]::-moz-selection, |
||||
|
code[class*="language-"] ::-moz-selection { |
||||
|
text-shadow: none; |
||||
|
background: #b3d4fc; |
||||
|
} |
||||
|
pre[class*="language-"]::selection, |
||||
|
pre[class*="language-"] ::selection, |
||||
|
code[class*="language-"]::selection, |
||||
|
code[class*="language-"] ::selection { |
||||
|
text-shadow: none; |
||||
|
background: #b3d4fc; |
||||
|
} |
||||
|
@media print { |
||||
|
code[class*="language-"], |
||||
|
pre[class*="language-"] { |
||||
|
text-shadow: none; |
||||
|
} |
||||
|
} |
||||
|
/* Code blocks */ |
||||
|
pre[class*="language-"] { |
||||
|
padding: 1em; |
||||
|
margin: .5em 0; |
||||
|
overflow: auto; |
||||
|
} |
||||
|
:not(pre) > code[class*="language-"], |
||||
|
pre[class*="language-"] { |
||||
|
background: transparent !important; |
||||
|
border: 1px solid #ccc; |
||||
|
} |
||||
|
/* Inline code */ |
||||
|
:not(pre) > code[class*="language-"] { |
||||
|
padding: .1em; |
||||
|
border-radius: .3em; |
||||
|
} |
||||
|
.token.comment, |
||||
|
.token.prolog, |
||||
|
.token.doctype, |
||||
|
.token.cdata { |
||||
|
color: slategray; |
||||
|
} |
||||
|
.token.punctuation { |
||||
|
color: #999; |
||||
|
} |
||||
|
.namespace { |
||||
|
opacity: .7; |
||||
|
} |
||||
|
.token.property, |
||||
|
.token.tag, |
||||
|
.token.boolean, |
||||
|
.token.number, |
||||
|
.token.constant, |
||||
|
.token.symbol, |
||||
|
.token.deleted { |
||||
|
color: #905; |
||||
|
} |
||||
|
.token.selector, |
||||
|
.token.attr-name, |
||||
|
.token.string, |
||||
|
.token.char, |
||||
|
.token.builtin, |
||||
|
.token.inserted { |
||||
|
color: #690; |
||||
|
} |
||||
|
.token.operator, |
||||
|
.token.entity, |
||||
|
.token.url, |
||||
|
.language-css .token.string, |
||||
|
.style .token.string { |
||||
|
color: #a67f59; |
||||
|
background: rgba(255, 255, 255, 0.5); |
||||
|
} |
||||
|
.token.atrule, |
||||
|
.token.attr-value, |
||||
|
.token.keyword { |
||||
|
color: #07a; |
||||
|
} |
||||
|
.token.function { |
||||
|
color: #DD4A68; |
||||
|
} |
||||
|
.token.regex, |
||||
|
.token.important, |
||||
|
.token.variable { |
||||
|
color: #e90; |
||||
|
} |
||||
|
.token.important, |
||||
|
.token.bold { |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
.token.italic { |
||||
|
font-style: italic; |
||||
|
} |
||||
|
.token.entity { |
||||
|
cursor: help; |
||||
|
} |
||||
|
/* stylelint-enable */ |
||||
|
.mce-content-body .mce-visual-caret { |
||||
|
background-color: black; |
||||
|
background-color: currentcolor; |
||||
|
position: absolute; |
||||
|
} |
||||
|
.mce-content-body .mce-visual-caret-hidden { |
||||
|
display: none; |
||||
|
} |
||||
|
.mce-content-body *[data-mce-caret] { |
||||
|
left: -1000px; |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
position: absolute; |
||||
|
right: auto; |
||||
|
top: 0; |
||||
|
} |
||||
|
.mce-content-body .mce-offscreen-selection { |
||||
|
left: -9999999999px; |
||||
|
max-width: 1000000px; |
||||
|
position: absolute; |
||||
|
} |
||||
|
.mce-content-body *[contentEditable=false] { |
||||
|
cursor: default; |
||||
|
} |
||||
|
.mce-content-body *[contentEditable=true] { |
||||
|
cursor: text; |
||||
|
} |
||||
|
.tox-cursor-format-painter { |
||||
|
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default; |
||||
|
} |
||||
|
.mce-content-body figure.align-left { |
||||
|
float: left; |
||||
|
} |
||||
|
.mce-content-body figure.align-right { |
||||
|
float: right; |
||||
|
} |
||||
|
.mce-content-body figure.image.align-center { |
||||
|
display: table; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
.mce-preview-object { |
||||
|
border: 1px solid gray; |
||||
|
display: inline-block; |
||||
|
line-height: 0; |
||||
|
margin: 0 2px 0 2px; |
||||
|
position: relative; |
||||
|
} |
||||
|
.mce-preview-object .mce-shim { |
||||
|
background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); |
||||
|
height: 100%; |
||||
|
left: 0; |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
width: 100%; |
||||
|
} |
||||
|
.mce-preview-object[data-mce-selected="2"] .mce-shim { |
||||
|
display: none; |
||||
|
} |
||||
|
.mce-object { |
||||
|
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center; |
||||
|
border: 1px dashed #aaa; |
||||
|
} |
||||
|
.mce-pagebreak { |
||||
|
border: 1px dashed #aaa; |
||||
|
cursor: default; |
||||
|
display: block; |
||||
|
height: 5px; |
||||
|
margin-top: 15px; |
||||
|
page-break-before: always; |
||||
|
width: 100%; |
||||
|
} |
||||
|
@media print { |
||||
|
.mce-pagebreak { |
||||
|
border: 0; |
||||
|
} |
||||
|
} |
||||
|
.tiny-pageembed .mce-shim { |
||||
|
background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); |
||||
|
height: 100%; |
||||
|
left: 0; |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
width: 100%; |
||||
|
} |
||||
|
.tiny-pageembed[data-mce-selected="2"] .mce-shim { |
||||
|
display: none; |
||||
|
} |
||||
|
.tiny-pageembed { |
||||
|
display: inline-block; |
||||
|
position: relative; |
||||
|
} |
||||
|
.tiny-pageembed--21by9, |
||||
|
.tiny-pageembed--16by9, |
||||
|
.tiny-pageembed--4by3, |
||||
|
.tiny-pageembed--1by1 { |
||||
|
display: block; |
||||
|
overflow: hidden; |
||||
|
padding: 0; |
||||
|
position: relative; |
||||
|
width: 100%; |
||||
|
} |
||||
|
.tiny-pageembed--21by9::before, |
||||
|
.tiny-pageembed--16by9::before, |
||||
|
.tiny-pageembed--4by3::before, |
||||
|
.tiny-pageembed--1by1::before { |
||||
|
content: ""; |
||||
|
display: block; |
||||
|
} |
||||
|
.tiny-pageembed--21by9::before { |
||||
|
padding-top: 42.857143%; |
||||
|
} |
||||
|
.tiny-pageembed--16by9::before { |
||||
|
padding-top: 56.25%; |
||||
|
} |
||||
|
.tiny-pageembed--4by3::before { |
||||
|
padding-top: 75%; |
||||
|
} |
||||
|
.tiny-pageembed--1by1::before { |
||||
|
padding-top: 100%; |
||||
|
} |
||||
|
.tiny-pageembed--21by9 iframe, |
||||
|
.tiny-pageembed--16by9 iframe, |
||||
|
.tiny-pageembed--4by3 iframe, |
||||
|
.tiny-pageembed--1by1 iframe { |
||||
|
border: 0; |
||||
|
height: 100%; |
||||
|
left: 0; |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
width: 100%; |
||||
|
} |
||||
|
.mce-content-body div.mce-resizehandle { |
||||
|
background-color: #4099ff; |
||||
|
border-color: #4099ff; |
||||
|
border-style: solid; |
||||
|
border-width: 1px; |
||||
|
box-sizing: border-box; |
||||
|
height: 10px; |
||||
|
position: absolute; |
||||
|
width: 10px; |
||||
|
z-index: 10000; |
||||
|
} |
||||
|
.mce-content-body div.mce-resizehandle:hover { |
||||
|
background-color: #4099ff; |
||||
|
} |
||||
|
.mce-content-body div.mce-resizehandle:nth-of-type(1) { |
||||
|
cursor: nwse-resize; |
||||
|
} |
||||
|
.mce-content-body div.mce-resizehandle:nth-of-type(2) { |
||||
|
cursor: nesw-resize; |
||||
|
} |
||||
|
.mce-content-body div.mce-resizehandle:nth-of-type(3) { |
||||
|
cursor: nwse-resize; |
||||
|
} |
||||
|
.mce-content-body div.mce-resizehandle:nth-of-type(4) { |
||||
|
cursor: nesw-resize; |
||||
|
} |
||||
|
.mce-content-body .mce-clonedresizable { |
||||
|
opacity: .5; |
||||
|
outline: 1px dashed black; |
||||
|
position: absolute; |
||||
|
z-index: 10000; |
||||
|
} |
||||
|
.mce-content-body .mce-resize-helper { |
||||
|
background: #555; |
||||
|
background: rgba(0, 0, 0, 0.75); |
||||
|
border: 1px; |
||||
|
border-radius: 3px; |
||||
|
color: white; |
||||
|
display: none; |
||||
|
font-family: sans-serif; |
||||
|
font-size: 12px; |
||||
|
line-height: 14px; |
||||
|
margin: 5px 10px; |
||||
|
padding: 5px; |
||||
|
position: absolute; |
||||
|
white-space: nowrap; |
||||
|
z-index: 10001; |
||||
|
} |
||||
|
.mce-match-marker { |
||||
|
background: #aaa; |
||||
|
color: #fff; |
||||
|
} |
||||
|
.mce-match-marker-selected { |
||||
|
background: #39f; |
||||
|
color: #fff; |
||||
|
} |
||||
|
.mce-content-body img[data-mce-selected], |
||||
|
.mce-content-body table[data-mce-selected] { |
||||
|
outline: 3px solid #b4d7ff; |
||||
|
} |
||||
|
.mce-content-body hr[data-mce-selected] { |
||||
|
outline: 3px solid #b4d7ff; |
||||
|
outline-offset: 1px; |
||||
|
} |
||||
|
.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus { |
||||
|
outline: 3px solid #b4d7ff; |
||||
|
} |
||||
|
.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover { |
||||
|
outline: 3px solid #b4d7ff; |
||||
|
} |
||||
|
.mce-content-body *[contentEditable=false][data-mce-selected] { |
||||
|
cursor: not-allowed; |
||||
|
outline: 3px solid #b4d7ff; |
||||
|
} |
||||
|
.mce-content-body.mce-content-readonly *[contentEditable=true]:focus, |
||||
|
.mce-content-body.mce-content-readonly *[contentEditable=true]:hover { |
||||
|
outline: none; |
||||
|
} |
||||
|
.mce-content-body *[data-mce-selected="inline-boundary"] { |
||||
|
background-color: #b4d7ff; |
||||
|
} |
||||
|
.mce-content-body .mce-edit-focus { |
||||
|
outline: 3px solid #b4d7ff; |
||||
|
} |
||||
|
.mce-content-body td[data-mce-selected], |
||||
|
.mce-content-body th[data-mce-selected] { |
||||
|
background-color: #b4d7ff !important; |
||||
|
} |
||||
|
.mce-content-body td[data-mce-selected]::-moz-selection, |
||||
|
.mce-content-body th[data-mce-selected]::-moz-selection { |
||||
|
background: none; |
||||
|
} |
||||
|
.mce-content-body td[data-mce-selected]::selection, |
||||
|
.mce-content-body th[data-mce-selected]::selection { |
||||
|
background: none; |
||||
|
} |
||||
|
.mce-content-body td[data-mce-selected] *, |
||||
|
.mce-content-body th[data-mce-selected] * { |
||||
|
-webkit-touch-callout: none; |
||||
|
-webkit-user-select: none; |
||||
|
-moz-user-select: none; |
||||
|
-ms-user-select: none; |
||||
|
user-select: none; |
||||
|
} |
||||
|
.mce-content-body img::-moz-selection { |
||||
|
background: none; |
||||
|
} |
||||
|
.mce-content-body img::selection { |
||||
|
background: none; |
||||
|
} |
||||
|
.ephox-snooker-resizer-bar { |
||||
|
background-color: #b4d7ff; |
||||
|
opacity: 0; |
||||
|
} |
||||
|
.ephox-snooker-resizer-cols { |
||||
|
cursor: col-resize; |
||||
|
} |
||||
|
.ephox-snooker-resizer-rows { |
||||
|
cursor: row-resize; |
||||
|
} |
||||
|
.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { |
||||
|
opacity: 1; |
||||
|
} |
||||
|
.mce-spellchecker-word { |
||||
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.5'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); |
||||
|
background-position: 0 calc(100% + 1px); |
||||
|
background-repeat: repeat-x; |
||||
|
background-size: auto 6px; |
||||
|
cursor: default; |
||||
|
height: 2rem; |
||||
|
} |
||||
|
.mce-spellchecker-grammar { |
||||
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23008800'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A"); |
||||
|
background-position: 0 calc(100% + 1px); |
||||
|
background-repeat: repeat-x; |
||||
|
background-size: auto 6px; |
||||
|
cursor: default; |
||||
|
} |
||||
|
.mce-toc { |
||||
|
border: 1px solid gray; |
||||
|
} |
||||
|
.mce-toc h2 { |
||||
|
margin: 4px; |
||||
|
} |
||||
|
.mce-toc li { |
||||
|
list-style-type: none; |
||||
|
} |
||||
|
.mce-item-table, |
||||
|
.mce-item-table td, |
||||
|
.mce-item-table th, |
||||
|
.mce-item-table caption { |
||||
|
border: 1px dashed #bbb; |
||||
|
} |
||||
|
.mce-visualblocks p, |
||||
|
.mce-visualblocks h1, |
||||
|
.mce-visualblocks h2, |
||||
|
.mce-visualblocks h3, |
||||
|
.mce-visualblocks h4, |
||||
|
.mce-visualblocks h5, |
||||
|
.mce-visualblocks h6, |
||||
|
.mce-visualblocks div:not([data-mce-bogus]), |
||||
|
.mce-visualblocks section, |
||||
|
.mce-visualblocks article, |
||||
|
.mce-visualblocks blockquote, |
||||
|
.mce-visualblocks address, |
||||
|
.mce-visualblocks pre, |
||||
|
.mce-visualblocks figure, |
||||
|
.mce-visualblocks figcaption, |
||||
|
.mce-visualblocks hgroup, |
||||
|
.mce-visualblocks aside, |
||||
|
.mce-visualblocks ul, |
||||
|
.mce-visualblocks ol, |
||||
|
.mce-visualblocks dl { |
||||
|
background-repeat: no-repeat; |
||||
|
border: 1px dashed #bbb; |
||||
|
margin-left: 3px; |
||||
|
padding-top: 10px; |
||||
|
} |
||||
|
.mce-visualblocks p { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); |
||||
|
} |
||||
|
.mce-visualblocks h1 { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); |
||||
|
} |
||||
|
.mce-visualblocks h2 { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); |
||||
|
} |
||||
|
.mce-visualblocks h3 { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); |
||||
|
} |
||||
|
.mce-visualblocks h4 { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); |
||||
|
} |
||||
|
.mce-visualblocks h5 { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); |
||||
|
} |
||||
|
.mce-visualblocks h6 { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); |
||||
|
} |
||||
|
.mce-visualblocks div:not([data-mce-bogus]) { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); |
||||
|
} |
||||
|
.mce-visualblocks section { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); |
||||
|
} |
||||
|
.mce-visualblocks article { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); |
||||
|
} |
||||
|
.mce-visualblocks blockquote { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); |
||||
|
} |
||||
|
.mce-visualblocks address { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); |
||||
|
} |
||||
|
.mce-visualblocks pre { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); |
||||
|
} |
||||
|
.mce-visualblocks figure { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); |
||||
|
} |
||||
|
.mce-visualblocks figcaption { |
||||
|
border: 1px dashed #bbb; |
||||
|
} |
||||
|
.mce-visualblocks hgroup { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); |
||||
|
} |
||||
|
.mce-visualblocks aside { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); |
||||
|
} |
||||
|
.mce-visualblocks ul { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==); |
||||
|
} |
||||
|
.mce-visualblocks ol { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); |
||||
|
} |
||||
|
.mce-visualblocks dl { |
||||
|
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); |
||||
|
} |
||||
|
.mce-nbsp, |
||||
|
.mce-shy { |
||||
|
background: #aaa; |
||||
|
} |
||||
|
.mce-shy::after { |
||||
|
content: '-'; |
||||
|
} |
||||
|
body { |
||||
|
font-family: sans-serif; |
||||
|
} |
||||
|
table { |
||||
|
border-collapse: collapse; |
||||
|
} |
||||
@ -0,0 +1,71 @@ |
|||||
|
<template> |
||||
|
<a-config-provider :locale="locale"> |
||||
|
<div id="app"> |
||||
|
<!-- <ChangePasswordModal ref="ChangePasswordModal" title="修改密码" /> --> |
||||
|
<router-view /> |
||||
|
</div> |
||||
|
</a-config-provider> |
||||
|
</template> |
||||
|
<script> |
||||
|
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN' |
||||
|
import thTh from 'ant-design-vue/lib/locale-provider/th_TH' |
||||
|
import enUS from 'ant-design-vue/lib/locale-provider/en_US' |
||||
|
// Fontclass模式 |
||||
|
import '@/components/iconfont/common.less' |
||||
|
// 使用 symbol模式 支持多色 |
||||
|
import '@/components/iconfont/iconfont.js' |
||||
|
import { mapState, mapGetters } from 'vuex' |
||||
|
// import ChangePasswordModal from '@views/comp/ChangePasswordModal' |
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
// ChangePasswordModal, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
isRun: false, |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
...mapState({ |
||||
|
PasswordShow: (state) => state.user.PasswordShow, |
||||
|
}), |
||||
|
locale() { |
||||
|
if (this.lang() === 'cn') { |
||||
|
return zhCN |
||||
|
} |
||||
|
if (this.lang() === 'en') { |
||||
|
return enUS |
||||
|
} |
||||
|
if (this.lang() === 'th') { |
||||
|
return thTh |
||||
|
} |
||||
|
return zhCN |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
PasswordShow(val) { |
||||
|
if (val) { |
||||
|
if (this.userInfo()) { |
||||
|
const username = this.userInfo().username |
||||
|
if (username) { |
||||
|
// this.$refs.ChangePasswordModal.show(username) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
created() { |
||||
|
const that = this |
||||
|
that.$i18n.locale = this.lang() |
||||
|
}, |
||||
|
methods: { |
||||
|
...mapGetters(['lang', 'userInfo']), |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
<style> |
||||
|
#app { |
||||
|
height: 100%; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,11 @@ |
|||||
|
<script> |
||||
|
const ContentHeight = 200 |
||||
|
export default { |
||||
|
ContentHeight, |
||||
|
watch:{ |
||||
|
ContentHeight:function(){ |
||||
|
console.log("change...........") |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,30 @@ |
|||||
|
import Vue from 'vue' |
||||
|
|
||||
|
/** |
||||
|
* 将一个请求分组 |
||||
|
* |
||||
|
* @param getPromise 传入一个可以获取到Promise对象的方法 |
||||
|
* @param groupId 分组ID,如果不传或者为空则不分组 |
||||
|
* @param expire 过期时间,默认 半分钟 |
||||
|
*/ |
||||
|
export function httpGroupRequest(getPromise, groupId, expire = 1000 * 30) { |
||||
|
if (groupId === null || groupId === '') { |
||||
|
console.log("--------popup----------getFrom DB-------with---no--groupId ") |
||||
|
return getPromise() |
||||
|
} |
||||
|
|
||||
|
if (Vue.ls.get(groupId)) { |
||||
|
console.log("---------popup--------getFrom Cache--------groupId = " + groupId) |
||||
|
return Promise.resolve(Vue.ls.get(groupId)); |
||||
|
} else { |
||||
|
console.log("--------popup----------getFrom DB---------groupId = " + groupId) |
||||
|
} |
||||
|
|
||||
|
// 还没有发出请求,就发出第一次的请求
|
||||
|
return getPromise().then(res => { |
||||
|
Vue.ls.set(groupId, res, expire); |
||||
|
return Promise.resolve(res); |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
@ -0,0 +1,297 @@ |
|||||
|
import { |
||||
|
deleteAction, |
||||
|
getAction, |
||||
|
httpAction, |
||||
|
postAction, |
||||
|
putAction |
||||
|
} from '@/api/manage' |
||||
|
import { |
||||
|
getCompParameterName, |
||||
|
getCusParameterName |
||||
|
} from '@/store/category' |
||||
|
import { |
||||
|
UI_CACHE_DB_DICT_DATA |
||||
|
} from '@/store/mutation-types' |
||||
|
import Vue from 'vue' |
||||
|
|
||||
|
//角色管理
|
||||
|
const addRole = params => postAction('/sys/role/add', params) |
||||
|
const editRole = params => putAction('/sys/role/edit', params) |
||||
|
const checkRoleCode = params => getAction('/sys/role/checkRoleCode', params) |
||||
|
const queryall = params => getAction('/sys/role/queryall', params) |
||||
|
const querycomprole = params => getAction('/sys/role/comp', params) |
||||
|
|
||||
|
//用户管理
|
||||
|
const addUser = params => postAction('/sys/user/add', params) |
||||
|
const editUser = params => putAction('/sys/user/edit', params) |
||||
|
const queryUserRole = params => getAction('/sys/user/queryUserRole', params) |
||||
|
const getUserList = params => getAction('/sys/user/list', params) |
||||
|
const frozenBatch = params => putAction('/sys/user/frozenBatch', params) |
||||
|
//验证用户是否存在
|
||||
|
const checkOnlyUser = params => getAction('/sys/user/checkOnlyUser', params) |
||||
|
//改变密码
|
||||
|
const changePassword = params => putAction('/sys/user/changePassword', params) |
||||
|
|
||||
|
//权限管理
|
||||
|
const addPermission = params => postAction('/sys/permission/add', params) |
||||
|
const editPermission = params => putAction('/sys/permission/edit', params) |
||||
|
const getPermissionList = params => getAction('/sys/permission/list', params) |
||||
|
const getSystemMenuList = params => getAction('/sys/permission/getSystemMenuList', params) |
||||
|
const getSystemSubmenu = params => getAction('/sys/permission/getSystemSubmenu', params) |
||||
|
const getSystemSubmenuBatch = params => getAction('/sys/permission/getSystemSubmenuBatch', params) |
||||
|
const queryTreeList = params => getAction('/sys/permission/queryTreeList', params) |
||||
|
const queryCompTreeList = params => getAction('/sys/permission/queryTreeList/comp', params) |
||||
|
const queryTreeListForRole = params => getAction('/sys/role/queryTreeList', params) |
||||
|
const queryTreeListForRoleNew = params => getAction('/sys/role/queryTreeList/new', params) |
||||
|
const queryListAsync = params => getAction('/sys/permission/queryListAsync', params) |
||||
|
const queryRolePermission = params => getAction('/sys/permission/queryRolePermission', params) |
||||
|
const saveRolePermission = params => postAction('/sys/permission/saveRolePermission', params) |
||||
|
const saveRolePermissionMenu = params => postAction('/sys/permission/saveRolePermission/menu', params) |
||||
|
const queryPermissionsByUser = () => { |
||||
|
const apiUrl = process.env.VUE_APP_SSO === 'true' |
||||
|
? '/midea/auth/permission' |
||||
|
: '/sys/permission/getUserPermissionByToken'; |
||||
|
|
||||
|
return getAction(apiUrl); |
||||
|
}; |
||||
|
const loadAllRoleIds = params => getAction('/sys/permission/loadAllRoleIds', params) |
||||
|
const getPermissionRuleList = params => getAction('/sys/permission/getPermRuleListByPermId', params) |
||||
|
const queryPermissionRule = params => getAction('/sys/permission/queryPermissionRule', params) |
||||
|
const fastSettingPermission = params => getAction('/sys/permission/fast/setting/permission', params) |
||||
|
const resetCompRolePermission = params => getAction('/sys/role/reset/comp/permission', params) |
||||
|
|
||||
|
// 部门管理
|
||||
|
const queryDepartTreeList = params => getAction('/sys/sysDepart/queryTreeList', params) |
||||
|
const queryDepartTreeSync = params => getAction('/sys/sysDepart/queryDepartTreeSync', params) |
||||
|
const queryIdTree = params => getAction('/sys/sysDepart/queryIdTree', params) |
||||
|
const queryParentName = params => getAction('/sys/sysDepart/queryParentName', params) |
||||
|
const searchByKeywords = params => getAction('/sys/sysDepart/searchBy', params) |
||||
|
const deleteByDepartId = params => deleteAction('/sys/sysDepart/delete', params) |
||||
|
|
||||
|
//二级部门管理
|
||||
|
const queryDepartPermission = params => getAction('/sys/permission/queryDepartPermission', params) |
||||
|
const saveDepartPermission = params => postAction('/sys/permission/saveDepartPermission', params) |
||||
|
const queryTreeListForDeptRole = params => getAction('/sys/sysDepartPermission/queryTreeListForDeptRole', params) |
||||
|
const queryDeptRolePermission = params => getAction('/sys/sysDepartPermission/queryDeptRolePermission', params) |
||||
|
const saveDeptRolePermission = params => postAction('/sys/sysDepartPermission/saveDeptRolePermission', params) |
||||
|
const queryMyDepartTreeList = params => getAction('/sys/sysDepart/queryMyDeptTreeList', params) |
||||
|
|
||||
|
//日志管理
|
||||
|
const deleteLog = params => deleteAction('/sys/log/delete', params) |
||||
|
const deleteLogList = params => deleteAction('/sys/log/deleteBatch', params) |
||||
|
|
||||
|
//数据字典
|
||||
|
const addDict = params => postAction('/sys/dict/add', params) |
||||
|
const editDict = params => putAction('/sys/dict/edit', params) |
||||
|
const treeList = params => getAction('/sys/dict/treeList', params) |
||||
|
const addDictItem = params => postAction('/sys/dictItem/add', params) |
||||
|
const editDictItem = params => putAction('/sys/dictItem/edit', params) |
||||
|
|
||||
|
//企业管理
|
||||
|
const queryTreeListForComp = params => getAction('/sys/tenant/queryTreeList', params) |
||||
|
const queryExcelCompModel = params => getAction('/sys/excel/model/query/comps', params) |
||||
|
const saveExcelCompModel = params => postAction('/sys/excel/model/save/comps', params) |
||||
|
const queryModels = params => getAction('/sys/excel/models/get', params) |
||||
|
|
||||
|
//海关参数
|
||||
|
const queryCusElementsInfoByHsCode = params => getAction('/para/cusElementsInfo/queryByHsCode', params) |
||||
|
|
||||
|
const getApiPerms = params => getAction(`/system/sysApiPerms/list/info`, params) |
||||
|
|
||||
|
//字典标签专用(通过code获取字典数组)
|
||||
|
export const ajaxGetDictItems = (code, params) => getAction(`/sys/dict/getDictItems/${code}`, params) |
||||
|
//从缓存中获取字典配置
|
||||
|
function getDictItemsFromCache(dictCode) { |
||||
|
if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) { |
||||
|
const dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode] |
||||
|
//console.log("-----------getDictItemsFromCache----------dictCode="+dictCode+"---- dictItems=",dictItems)
|
||||
|
return dictItems |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
///从缓存中获取对应的项
|
||||
|
function getCusParametersItemFromCache(dict, paramType, format, value, isprecise, isIgnoreCase) { |
||||
|
if (isIgnoreCase !== false && !isIgnoreCase) { |
||||
|
isIgnoreCase = true |
||||
|
} |
||||
|
if (!dict || !value) {return null} |
||||
|
let paramSourse = 'cus' |
||||
|
if (dict.substring(0, 4) === 'comp') { |
||||
|
paramSourse = 'comp' |
||||
|
} |
||||
|
const paramName = paramSourse === 'cus' ? getCusParameterName(dict) : getCompParameterName(dict) |
||||
|
const items = getCusParametersFromCache(paramName, paramType, 1, format, value, paramSourse, isprecise, isIgnoreCase) |
||||
|
if (!items) {throw new Error('缓存【' + dict + '】未获取到缓存中的项【' + value + '】')} |
||||
|
if (items.length === 1) { |
||||
|
return items[0] |
||||
|
} |
||||
|
throw new Error('缓存【' + dict + '】获取到缓存中的重复项【' + value + '】') |
||||
|
} |
||||
|
|
||||
|
//////从缓存中获取对应的项集
|
||||
|
function getCusParametersItemsFromCache(dict, paramType, pageSize, format, value, isprecise, isIgnoreCase) { |
||||
|
if (isIgnoreCase !== false && !isIgnoreCase) { |
||||
|
isIgnoreCase = true |
||||
|
} |
||||
|
if (!dict) {return null} |
||||
|
let paramSourse = 'cus' |
||||
|
if (dict.substring(0, 4) === 'comp') { |
||||
|
paramSourse = 'comp' |
||||
|
} |
||||
|
const paramName = paramSourse === 'cus' ? getCusParameterName(dict) : getCompParameterName(dict) |
||||
|
const items = getCusParametersFromCache(paramName, paramType, pageSize, format, value, paramSourse, isprecise, isIgnoreCase) |
||||
|
if (!items) {throw new Error('缓存【' + dict + '】未获取到缓存中的项【' + value + '】')} |
||||
|
return items |
||||
|
} |
||||
|
|
||||
|
///从缓存中获取海关参数
|
||||
|
/* eslint complexity: ["error", 30] */ |
||||
|
function getCusParametersFromCache(parameter, parameterType, pageSize, format, value, paramSourse, isprecise, isIgnoreCase) { |
||||
|
if (isIgnoreCase !== false && !isIgnoreCase) { |
||||
|
isIgnoreCase = true |
||||
|
} |
||||
|
if (!parameter) {return null} |
||||
|
// let parameters = eval(parameter) /* eslint-disable-line no-eval */
|
||||
|
let parameters |
||||
|
|
||||
|
if (window.__MICRO_APP_ENVIRONMENT__) { |
||||
|
parameters = window.__CACHE_VARS__[parameter] |
||||
|
} else{ |
||||
|
parameters = eval(parameter) /* eslint-disable-line no-eval */ |
||||
|
} |
||||
|
|
||||
|
if (!parameters) {return parameters} |
||||
|
if (value !== '' && value !== undefined && value !== null) { |
||||
|
parameters = parameters.filter(function (tmp) { |
||||
|
if (!isprecise) { |
||||
|
if (isIgnoreCase) { |
||||
|
if (tmp.cusCode && tmp.cusCode.toLowerCase().indexOf(value.toLowerCase()) > -1) {return true} |
||||
|
else if (tmp.codeName && tmp.codeName.toLowerCase().indexOf(value.toLowerCase()) > -1) {return true} |
||||
|
else if (tmp.codeValue && tmp.codeValue.toLowerCase().indexOf(value.toLowerCase()) > -1) {return true} |
||||
|
return false |
||||
|
} else { |
||||
|
if (tmp.cusCode && tmp.cusCode.indexOf(value) > -1) {return true} |
||||
|
else if (tmp.codeName && tmp.codeName.indexOf(value) > -1) {return true} |
||||
|
else if (tmp.codeValue && tmp.codeValue.indexOf(value) > -1) {return true} |
||||
|
return false |
||||
|
} |
||||
|
} |
||||
|
if (isIgnoreCase) { |
||||
|
if (parameterType === 'codeValue') { |
||||
|
return tmp.codeValue && tmp.codeValue.toLowerCase() === value.toLowerCase() |
||||
|
} |
||||
|
if (parameterType === 'cusCode') { |
||||
|
return tmp.cusCode && tmp.cusCode.toLowerCase() === value.toLowerCase() |
||||
|
} |
||||
|
} else { |
||||
|
if (parameterType === 'codeValue') { |
||||
|
return tmp.codeValue && tmp.codeValue === value |
||||
|
} |
||||
|
if (parameterType === 'cusCode') { |
||||
|
return tmp.cusCode && tmp.cusCode === value |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
const datas = [] |
||||
|
let len = parameters.length |
||||
|
if (pageSize && len > pageSize) {len = pageSize} |
||||
|
for (let i = 0; i < len; i++) { |
||||
|
const obj = parameters[i] |
||||
|
let tmpParam = { |
||||
|
value: obj.cusCode, |
||||
|
text: obj.codeName, |
||||
|
title: obj.codeName, |
||||
|
name: obj.codeName |
||||
|
} |
||||
|
if (parameterType === 'codeValue') { |
||||
|
tmpParam = { |
||||
|
value: obj.codeValue, |
||||
|
text: obj.codeName, |
||||
|
title: obj.codeName, |
||||
|
name: obj.codeName |
||||
|
} |
||||
|
} |
||||
|
if (parameterType === 'cusCode') { |
||||
|
tmpParam = { |
||||
|
value: obj.cusCode, |
||||
|
text: obj.codeName, |
||||
|
title: obj.codeName, |
||||
|
name: obj.codeName |
||||
|
} |
||||
|
} |
||||
|
if (format === 'auto') { |
||||
|
tmpParam.text = tmpParam.value + '-' + tmpParam.text |
||||
|
} else if (format === 'code') { |
||||
|
tmpParam.text = tmpParam.value |
||||
|
} |
||||
|
datas.push(tmpParam) |
||||
|
} |
||||
|
return datas |
||||
|
} |
||||
|
|
||||
|
//获取海关参数缓存
|
||||
|
function getDictItemsFromCusCache(dictCode) { |
||||
|
if (Vue.ls.get(dictCode)) { |
||||
|
const dictItems = Vue.ls.get(dictCode) |
||||
|
return dictItems |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//缓存页面字典
|
||||
|
//从缓存中获取字典配置
|
||||
|
function initeCusDictCache(dictCode) { |
||||
|
if (Vue.ls.get(dictCode)) { |
||||
|
return |
||||
|
} |
||||
|
//根据字典Code, 初始化字典数组
|
||||
|
ajaxGetDictItems(dictCode, null).then(res => { |
||||
|
if (res.success) { |
||||
|
Vue.ls.set(dictCode, res.result, 7 * 24 * 60 * 60 * 1000) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//系统通告
|
||||
|
const doReleaseData = params => getAction('/sys/annountCement/doReleaseData', params) |
||||
|
const doReovkeData = params => getAction('/sys/annountCement/doReovkeData', params) |
||||
|
//获取系统访问量
|
||||
|
const getLoginfo = params => getAction('/sys/loginfo', params) |
||||
|
const getVisitInfo = params => getAction('/sys/visitInfo', params) |
||||
|
|
||||
|
// 根据部门主键查询用户信息
|
||||
|
const queryUserByDepId = params => getAction('/sys/user/queryUserByDepId', params) |
||||
|
|
||||
|
// 重复校验
|
||||
|
const duplicateCheck = params => getAction('/sys/duplicate/check', params) |
||||
|
// 加载分类字典
|
||||
|
const loadCategoryData = params => getAction('/sys/category/loadAllData', params) |
||||
|
const checkRuleByCode = params => getAction('/sys/checkRule/checkByCode', params) |
||||
|
//加载我的通告信息
|
||||
|
const getUserNoticeInfo = params => getAction('/sys/sysAnnouncementSend/getMyAnnouncementSend', params) |
||||
|
const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}` |
||||
|
|
||||
|
// 中转HTTP请求
|
||||
|
export const transitRESTful = { |
||||
|
get: (url, parameter) => getAction(getTransitURL(url), parameter), |
||||
|
post: (url, parameter) => postAction(getTransitURL(url), parameter), |
||||
|
put: (url, parameter) => putAction(getTransitURL(url), parameter), |
||||
|
http: (url, parameter) => httpAction(getTransitURL(url), parameter) |
||||
|
} |
||||
|
|
||||
|
export { |
||||
|
addDict, addDictItem, addPermission, |
||||
|
// imgView,
|
||||
|
// doMian,
|
||||
|
addRole, addUser, changePassword, checkOnlyUser, checkRoleCode, checkRuleByCode, deleteByDepartId, |
||||
|
deleteLog, |
||||
|
deleteLogList, doReleaseData, |
||||
|
doReovkeData, duplicateCheck, editDict, editDictItem, editPermission, editRole, editUser, fastSettingPermission, frozenBatch, getApiPerms, getCusParametersFromCache, |
||||
|
getCusParametersItemFromCache, |
||||
|
getCusParametersItemsFromCache, getDictItemsFromCache, getDictItemsFromCusCache, getLoginfo, getPermissionList, getPermissionRuleList, getSystemMenuList, |
||||
|
getSystemSubmenu, |
||||
|
getSystemSubmenuBatch, getUserList, getUserNoticeInfo, getVisitInfo, initeCusDictCache, loadAllRoleIds, loadCategoryData, queryall, querycomprole, queryCompTreeList, queryCusElementsInfoByHsCode, queryDepartPermission, queryDepartTreeList, |
||||
|
queryDepartTreeSync, queryDeptRolePermission, queryExcelCompModel, queryIdTree, queryListAsync, queryModels, queryMyDepartTreeList, queryParentName, queryPermissionRule, queryPermissionsByUser, queryRolePermission, queryTreeList, queryTreeListForComp, queryTreeListForDeptRole, queryTreeListForRole, |
||||
|
queryTreeListForRoleNew, queryUserByDepId, queryUserRole, resetCompRolePermission, saveDepartPermission, saveDeptRolePermission, saveExcelCompModel, saveRolePermission, |
||||
|
saveRolePermissionMenu, searchByKeywords, treeList |
||||
|
} |
||||
@ -0,0 +1,52 @@ |
|||||
|
import Vue from 'vue' |
||||
|
import { axios } from '@/utils/request' |
||||
|
|
||||
|
/** |
||||
|
* 调用api生成控件回车事件脚本, |
||||
|
* @param operateType 业务类型 |
||||
|
* @param eventType 事件类型 |
||||
|
* @param tableName 表名 |
||||
|
* @param fieldId 字段Id |
||||
|
* @param url 回车事件调用后台api获取数据值的url || 获取后台数据值的封装好的控件? |
||||
|
* @param param 获取信息后,需要赋值的字段的配置 字典(需要赋值的字段名:获取到的信息的字段名) (一一对应) |
||||
|
* @param callback |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function generateFieldEnterEvent() { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 调用api获取关键字段值的相关信息, |
||||
|
* @param fieldValue 关键字段值 |
||||
|
* @param url 调用api获取数据值的url |
||||
|
* @param callback 获取的相关信息回填到配置的对应字段中 |
||||
|
*/ |
||||
|
export function commonEnterSetData(callback) { |
||||
|
const res = {}; |
||||
|
res['khmc'] = 'khmcdaichu' |
||||
|
callback(res); |
||||
|
//return true;
|
||||
|
} |
||||
|
export function commonEnterCalculateData() { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
export function commonEnterValidateData() { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
export function getList(id) { |
||||
|
const checkKey = Vue.ls.get('CHECK_KEY'); |
||||
|
const token = Vue.ls.get('TOKEN'); |
||||
|
const temp='/online/cgform/field/listByHeadId?_t='+checkKey+'&headId='+id+'&token='+token; |
||||
|
const res = axios({ |
||||
|
//url: '/online/cgform/field/listByHeadId',
|
||||
|
url: temp, |
||||
|
method: 'get', |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json;charset=UTF-8' |
||||
|
}, |
||||
|
}); |
||||
|
return res; |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
const api = { |
||||
|
Login: '/sys/login', |
||||
|
Logout: '/sys/logout', |
||||
|
Register: '/auth/register', |
||||
|
SendSms: '/account/sms', |
||||
|
// get my info
|
||||
|
UserInfo: '/user/info' |
||||
|
} |
||||
|
export default api |
||||
@ -0,0 +1,123 @@ |
|||||
|
import api from './index'; |
||||
|
import { axios } from '@/utils/request'; |
||||
|
|
||||
|
/** |
||||
|
* login func |
||||
|
* parameter: { |
||||
|
* username: '', |
||||
|
* password: '', |
||||
|
* remember_me: true, |
||||
|
* captcha: '12345' |
||||
|
* } |
||||
|
* @param parameter |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function login(parameter) { |
||||
|
return axios({ |
||||
|
url: '/sys/login', |
||||
|
method: 'post', |
||||
|
data: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function phoneLogin(parameter) { |
||||
|
return axios({ |
||||
|
url: '/sys/phoneLogin', |
||||
|
method: 'post', |
||||
|
data: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function getSmsCaptcha(parameter) { |
||||
|
return axios({ |
||||
|
url: api.SendSms, |
||||
|
method: 'post', |
||||
|
data: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function adminLogin(parameter) { |
||||
|
return axios({ |
||||
|
url: '/sys/admin/login', |
||||
|
method: 'post', |
||||
|
data: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// export function getInfo() {
|
||||
|
// return axios({
|
||||
|
// url: '/api/user/info',
|
||||
|
// method: 'get',
|
||||
|
// headers: {
|
||||
|
// 'Content-Type': 'application/json;charset=UTF-8'
|
||||
|
// }
|
||||
|
// })
|
||||
|
// }
|
||||
|
|
||||
|
export function logoutSSO() { |
||||
|
return axios({ |
||||
|
url: process.env.VUE_APP_LOGOUT_URL, |
||||
|
method: 'get', |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json;charset=UTF-8', |
||||
|
'Gate-App-Code' : 'APP202106220004', |
||||
|
'tenantCode' : 'T20210428000005' |
||||
|
}, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function logout(logoutToken) { |
||||
|
const headers = { |
||||
|
'Content-Type': 'application/json;charset=UTF-8', |
||||
|
}; |
||||
|
if (logoutToken) { |
||||
|
headers['X-Access-Token'] = logoutToken; |
||||
|
} |
||||
|
return axios({ |
||||
|
url: '/sys/logout', |
||||
|
method: 'post', |
||||
|
headers: headers, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 第三方登录 |
||||
|
* @param token |
||||
|
* @param thirdType |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function thirdLogin(token, thirdType) { |
||||
|
return axios({ |
||||
|
url: `/sys/thirdLogin/getLoginUser/${token}/${thirdType}`, |
||||
|
method: 'get', |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json;charset=UTF-8', |
||||
|
}, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 强退其他账号 |
||||
|
* @param token |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function forceLogout(parameter) { |
||||
|
return axios({ |
||||
|
url: '/sys/online/forceLogout', |
||||
|
method: 'post', |
||||
|
data: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取缓存信息 |
||||
|
* @param token |
||||
|
* @param getCusParameters |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function getCusParameters() { |
||||
|
return axios({ |
||||
|
url: '/sys/cus/queryAllCusParamItems', |
||||
|
method: 'get', |
||||
|
}); |
||||
|
} |
||||
@ -0,0 +1,331 @@ |
|||||
|
import Vue from 'vue'; |
||||
|
import { axios } from '@/utils/request'; |
||||
|
import signMd5Utils from '@/utils/encryption/signMd5Utils'; |
||||
|
|
||||
|
const api = { |
||||
|
user: '/mock/api/user', |
||||
|
role: '/mock/api/role', |
||||
|
service: '/mock/api/service', |
||||
|
permission: '/mock/api/permission', |
||||
|
permissionNoPager: '/mock/api/permission/no-pager', |
||||
|
}; |
||||
|
|
||||
|
export default api; |
||||
|
|
||||
|
//post
|
||||
|
export function postAction(url, parameter) { |
||||
|
const sign = signMd5Utils.getSign(url, parameter); |
||||
|
//将签名和时间戳,添加在请求接口 Header
|
||||
|
const signHeader = { |
||||
|
'X-Sign': sign, |
||||
|
'X-TIMESTAMP': signMd5Utils.getDateTimeToString(), |
||||
|
}; |
||||
|
|
||||
|
return axios({ |
||||
|
url: url, |
||||
|
method: 'post', |
||||
|
data: parameter, |
||||
|
headers: signHeader, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
//post method= {post | put}
|
||||
|
export function httpAction(url, parameter, method) { |
||||
|
const sign = signMd5Utils.getSign(url, parameter); |
||||
|
//将签名和时间戳,添加在请求接口 Header
|
||||
|
const signHeader = { |
||||
|
'X-Sign': sign, |
||||
|
'X-TIMESTAMP': signMd5Utils.getDateTimeToString(), |
||||
|
}; |
||||
|
|
||||
|
return axios({ |
||||
|
url: url, |
||||
|
method: method, |
||||
|
data: parameter, |
||||
|
headers: signHeader, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
//put
|
||||
|
export function putAction(url, parameter) { |
||||
|
return axios({ |
||||
|
url: url, |
||||
|
method: 'put', |
||||
|
data: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
//get
|
||||
|
export function getAction(url, parameter) { |
||||
|
const sign = signMd5Utils.getSign(url, parameter); |
||||
|
//将签名和时间戳,添加在请求接口 Header
|
||||
|
const signHeader = { |
||||
|
'X-Sign': sign, |
||||
|
'X-TIMESTAMP': signMd5Utils.getDateTimeToString(), |
||||
|
}; |
||||
|
|
||||
|
return axios({ |
||||
|
url: url, |
||||
|
method: 'get', |
||||
|
params: parameter, |
||||
|
headers: signHeader, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
//deleteAction
|
||||
|
export function deleteAction(url, parameter) { |
||||
|
return axios({ |
||||
|
url: url, |
||||
|
method: 'delete', |
||||
|
params: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function getUserList(parameter) { |
||||
|
return axios({ |
||||
|
url: api.user, |
||||
|
method: 'get', |
||||
|
params: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function getRoleList(parameter) { |
||||
|
return axios({ |
||||
|
url: api.role, |
||||
|
method: 'get', |
||||
|
params: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function getServiceList(parameter) { |
||||
|
return axios({ |
||||
|
url: api.service, |
||||
|
method: 'get', |
||||
|
params: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
export function getPermissions(parameter) { |
||||
|
return axios({ |
||||
|
url: api.permissionNoPager, |
||||
|
method: 'get', |
||||
|
params: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// id === 0 add post
|
||||
|
// id !== 0 update put
|
||||
|
export function saveService(parameter) { |
||||
|
return axios({ |
||||
|
url: api.service, |
||||
|
method: parameter.id === 0 ? 'post' : 'put', |
||||
|
data: parameter, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 下载文件 用于excel导出 |
||||
|
* @param url |
||||
|
* @param parameter |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function downFile(url, parameter) { |
||||
|
return axios({ |
||||
|
url: url, |
||||
|
params: parameter, |
||||
|
method: 'get', |
||||
|
responseType: 'blob', |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 下载文件 用于excel导出 |
||||
|
* @param url |
||||
|
* @param parameter |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function downFilePost(url, parameter) { |
||||
|
return axios({ |
||||
|
url: url, |
||||
|
data: parameter, |
||||
|
method: 'post', |
||||
|
responseType: 'blob', |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 下载文件 |
||||
|
* @param url 文件路径 |
||||
|
* @param fileName 文件名 |
||||
|
* @param parameter |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function downloadFile(url, fileName, parameter) { |
||||
|
return downFile(url, parameter).then((data) => { |
||||
|
if (!data || data.size === 0) { |
||||
|
Vue.prototype['$message'].warning('文件下载失败'); |
||||
|
return; |
||||
|
} |
||||
|
if (typeof window.navigator.msSaveBlob !== 'undefined') { |
||||
|
window.navigator.msSaveBlob(new Blob([data]), fileName); |
||||
|
} else { |
||||
|
const url = window.URL.createObjectURL(new Blob([data])); |
||||
|
const link = document.createElement('a'); |
||||
|
link.style.display = 'none'; |
||||
|
link.href = url; |
||||
|
link.setAttribute('download', fileName); |
||||
|
document.body.appendChild(link); |
||||
|
link.click(); |
||||
|
document.body.removeChild(link); //下载完成移除元素
|
||||
|
window.URL.revokeObjectURL(url); //释放掉blob对象
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 文件上传 用于富文本上传图片 |
||||
|
* @param url |
||||
|
* @param parameter |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function uploadAction(url, parameter) { |
||||
|
return axios({ |
||||
|
url: url, |
||||
|
data: parameter, |
||||
|
method: 'post', |
||||
|
headers: { |
||||
|
'Content-Type': 'multipart/form-data', // 文件上传
|
||||
|
}, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 带header的PDF文件URL获取(供pdfobject使用) |
||||
|
* @param {string} urlParam - PDF的相对路径 |
||||
|
* @returns {Promise<string>} - 可直接使用的Blob URL |
||||
|
*/ |
||||
|
export function getPdfUrlWithHeader(urlParam) { |
||||
|
return new Promise((resolve) => { |
||||
|
(async () =>{ |
||||
|
try { |
||||
|
// 拼接完整URL(和原逻辑保持一致)
|
||||
|
const fullUrl = `${window._CONFIG['domianURL']}${urlParam}`; |
||||
|
|
||||
|
// 带header请求PDF
|
||||
|
const response = await fetch(fullUrl, { |
||||
|
method: 'GET', |
||||
|
headers: { |
||||
|
'Gate-App-Code': 'APP202106220004', |
||||
|
tenantCode: 'T20210428000005', |
||||
|
}, |
||||
|
credentials: 'include' |
||||
|
}); |
||||
|
|
||||
|
if (response.ok) { |
||||
|
const blob = await response.blob(); |
||||
|
// 生成PDF的Blob URL(指定MIME类型为pdf)
|
||||
|
const blobUrl = URL.createObjectURL(new Blob([blob], { type: 'application/pdf' })); |
||||
|
resolve(blobUrl); |
||||
|
} else { |
||||
|
resolve(''); // 请求失败返回空
|
||||
|
} |
||||
|
} catch (err) { |
||||
|
resolve(''); |
||||
|
} |
||||
|
})(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 带自定义Header的文件访问路径获取(用于img标签,支持viewer组件) |
||||
|
* @param {string} avatar - 文件ID或相对路径 |
||||
|
* @param {string} [subStr='http'] - 判定完整路径的前缀 |
||||
|
* @returns {Promise<string>} - 可直接用于img的Blob URL |
||||
|
*/ |
||||
|
export function getImgUrlWithHeader(avatar, subStr = 'http') { |
||||
|
// 执行器函数去掉 async
|
||||
|
return new Promise((resolve) => { |
||||
|
// 用立即执行的 async 函数包裹内部异步逻辑
|
||||
|
(async () => { |
||||
|
try { |
||||
|
let url; |
||||
|
if (avatar && avatar.startsWith(subStr)) { |
||||
|
url = avatar; |
||||
|
} else if (avatar && avatar.length > 0 && avatar.indexOf('[') === -1) { |
||||
|
url = window._CONFIG['staticDomainURL'] + '/' + avatar; |
||||
|
} else { |
||||
|
resolve(''); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
const response = await fetch(url, { |
||||
|
method: 'GET', |
||||
|
headers: { |
||||
|
'Gate-App-Code': 'APP202106220004', |
||||
|
tenantCode: 'T20210428000005', |
||||
|
}, |
||||
|
credentials: 'include' |
||||
|
}); |
||||
|
|
||||
|
if (response.ok) { |
||||
|
const blob = await response.blob(); |
||||
|
const blobUrl = URL.createObjectURL(blob); |
||||
|
resolve(blobUrl); |
||||
|
} else { |
||||
|
resolve(''); |
||||
|
} |
||||
|
} catch (err) { |
||||
|
resolve(''); |
||||
|
} |
||||
|
})(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取文件服务访问路径(逐步废弃,被上面函数替代) |
||||
|
* @param avatar |
||||
|
* @param subStr |
||||
|
* @returns {*} |
||||
|
*/ |
||||
|
export function getFileAccessHttpUrl(avatar, subStr) { |
||||
|
if (!subStr) { |
||||
|
subStr = 'http'; |
||||
|
} |
||||
|
try { |
||||
|
if (avatar && avatar.startsWith(subStr)) { |
||||
|
return avatar; |
||||
|
} else { |
||||
|
if (avatar && avatar.length > 0 && avatar.indexOf('[') === -1) { |
||||
|
return window._CONFIG['staticDomainURL'] + '/' + avatar; |
||||
|
} |
||||
|
} |
||||
|
} catch (err) { |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 附件上传
|
||||
|
export function uploadFile(url, data) { |
||||
|
return axios({ |
||||
|
url: url, |
||||
|
method: 'post', |
||||
|
headers: { |
||||
|
'Content-Type': 'multipart/form-data; charset=utf-8', |
||||
|
}, |
||||
|
data: data, |
||||
|
}).then((res) => { |
||||
|
if (res.success) { |
||||
|
return Promise.resolve(res); |
||||
|
} else { |
||||
|
return Promise.reject(res.message); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// 获取文件名
|
||||
|
export function getFileName(path) { |
||||
|
const pos1 = path.lastIndexOf('/'); |
||||
|
const pos2 = path.lastIndexOf('\\'); |
||||
|
const pos = Math.max(pos1, pos2); |
||||
|
return pos < 0 ? path : path.substring(pos + 1); |
||||
|
} |
||||
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
@ -0,0 +1,539 @@ |
|||||
|
/* Logo 字体 */ |
||||
|
@font-face { |
||||
|
font-family: "iconfont logo"; |
||||
|
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); |
||||
|
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), |
||||
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), |
||||
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), |
||||
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); |
||||
|
} |
||||
|
|
||||
|
.logo { |
||||
|
font-family: "iconfont logo"; |
||||
|
font-size: 160px; |
||||
|
font-style: normal; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
|
||||
|
/* tabs */ |
||||
|
.nav-tabs { |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.nav-tabs .nav-more { |
||||
|
position: absolute; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
height: 42px; |
||||
|
line-height: 42px; |
||||
|
color: #666; |
||||
|
} |
||||
|
|
||||
|
#tabs { |
||||
|
border-bottom: 1px solid #eee; |
||||
|
} |
||||
|
|
||||
|
#tabs li { |
||||
|
cursor: pointer; |
||||
|
width: 100px; |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
text-align: center; |
||||
|
font-size: 16px; |
||||
|
border-bottom: 2px solid transparent; |
||||
|
position: relative; |
||||
|
z-index: 1; |
||||
|
margin-bottom: -1px; |
||||
|
color: #666; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
#tabs .active { |
||||
|
border-bottom-color: #f00; |
||||
|
color: #222; |
||||
|
} |
||||
|
|
||||
|
.tab-container .content { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
/* 页面布局 */ |
||||
|
.main { |
||||
|
padding: 30px 100px; |
||||
|
width: 960px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
|
||||
|
.main .logo { |
||||
|
color: #333; |
||||
|
text-align: left; |
||||
|
margin-bottom: 30px; |
||||
|
line-height: 1; |
||||
|
height: 110px; |
||||
|
margin-top: -50px; |
||||
|
overflow: hidden; |
||||
|
*zoom: 1; |
||||
|
} |
||||
|
|
||||
|
.main .logo a { |
||||
|
font-size: 160px; |
||||
|
color: #333; |
||||
|
} |
||||
|
|
||||
|
.helps { |
||||
|
margin-top: 40px; |
||||
|
} |
||||
|
|
||||
|
.helps pre { |
||||
|
padding: 20px; |
||||
|
margin: 10px 0; |
||||
|
border: solid 1px #e7e1cd; |
||||
|
background-color: #fffdef; |
||||
|
overflow: auto; |
||||
|
} |
||||
|
|
||||
|
.icon_lists { |
||||
|
width: 100% !important; |
||||
|
overflow: hidden; |
||||
|
*zoom: 1; |
||||
|
} |
||||
|
|
||||
|
.icon_lists li { |
||||
|
width: 100px; |
||||
|
margin-bottom: 10px; |
||||
|
margin-right: 20px; |
||||
|
text-align: center; |
||||
|
list-style: none !important; |
||||
|
cursor: default; |
||||
|
} |
||||
|
|
||||
|
.icon_lists li .code-name { |
||||
|
line-height: 1.2; |
||||
|
} |
||||
|
|
||||
|
.icon_lists .icon { |
||||
|
display: block; |
||||
|
height: 100px; |
||||
|
line-height: 100px; |
||||
|
font-size: 42px; |
||||
|
margin: 10px auto; |
||||
|
color: #333; |
||||
|
-webkit-transition: font-size 0.25s linear, width 0.25s linear; |
||||
|
-moz-transition: font-size 0.25s linear, width 0.25s linear; |
||||
|
transition: font-size 0.25s linear, width 0.25s linear; |
||||
|
} |
||||
|
|
||||
|
.icon_lists .icon:hover { |
||||
|
font-size: 100px; |
||||
|
} |
||||
|
|
||||
|
.icon_lists .svg-icon { |
||||
|
/* 通过设置 font-size 来改变图标大小 */ |
||||
|
width: 1em; |
||||
|
/* 图标和文字相邻时,垂直对齐 */ |
||||
|
vertical-align: -0.15em; |
||||
|
/* 通过设置 color 来改变 SVG 的颜色/fill */ |
||||
|
fill: currentColor; |
||||
|
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 |
||||
|
normalize.css 中也包含这行 */ |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
.icon_lists li .name, |
||||
|
.icon_lists li .code-name { |
||||
|
color: #666; |
||||
|
} |
||||
|
|
||||
|
/* markdown 样式 */ |
||||
|
.markdown { |
||||
|
color: #666; |
||||
|
font-size: 14px; |
||||
|
line-height: 1.8; |
||||
|
} |
||||
|
|
||||
|
.highlight { |
||||
|
line-height: 1.5; |
||||
|
} |
||||
|
|
||||
|
.markdown img { |
||||
|
vertical-align: middle; |
||||
|
max-width: 100%; |
||||
|
} |
||||
|
|
||||
|
.markdown h1 { |
||||
|
color: #404040; |
||||
|
font-weight: 500; |
||||
|
line-height: 40px; |
||||
|
margin-bottom: 24px; |
||||
|
} |
||||
|
|
||||
|
.markdown h2, |
||||
|
.markdown h3, |
||||
|
.markdown h4, |
||||
|
.markdown h5, |
||||
|
.markdown h6 { |
||||
|
color: #404040; |
||||
|
margin: 1.6em 0 0.6em 0; |
||||
|
font-weight: 500; |
||||
|
clear: both; |
||||
|
} |
||||
|
|
||||
|
.markdown h1 { |
||||
|
font-size: 28px; |
||||
|
} |
||||
|
|
||||
|
.markdown h2 { |
||||
|
font-size: 22px; |
||||
|
} |
||||
|
|
||||
|
.markdown h3 { |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
|
||||
|
.markdown h4 { |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
|
||||
|
.markdown h5 { |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
|
||||
|
.markdown h6 { |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
|
||||
|
.markdown hr { |
||||
|
height: 1px; |
||||
|
border: 0; |
||||
|
background: #e9e9e9; |
||||
|
margin: 16px 0; |
||||
|
clear: both; |
||||
|
} |
||||
|
|
||||
|
.markdown p { |
||||
|
margin: 1em 0; |
||||
|
} |
||||
|
|
||||
|
.markdown>p, |
||||
|
.markdown>blockquote, |
||||
|
.markdown>.highlight, |
||||
|
.markdown>ol, |
||||
|
.markdown>ul { |
||||
|
width: 80%; |
||||
|
} |
||||
|
|
||||
|
.markdown ul>li { |
||||
|
list-style: circle; |
||||
|
} |
||||
|
|
||||
|
.markdown>ul li, |
||||
|
.markdown blockquote ul>li { |
||||
|
margin-left: 20px; |
||||
|
padding-left: 4px; |
||||
|
} |
||||
|
|
||||
|
.markdown>ul li p, |
||||
|
.markdown>ol li p { |
||||
|
margin: 0.6em 0; |
||||
|
} |
||||
|
|
||||
|
.markdown ol>li { |
||||
|
list-style: decimal; |
||||
|
} |
||||
|
|
||||
|
.markdown>ol li, |
||||
|
.markdown blockquote ol>li { |
||||
|
margin-left: 20px; |
||||
|
padding-left: 4px; |
||||
|
} |
||||
|
|
||||
|
.markdown code { |
||||
|
margin: 0 3px; |
||||
|
padding: 0 5px; |
||||
|
background: #eee; |
||||
|
border-radius: 3px; |
||||
|
} |
||||
|
|
||||
|
.markdown strong, |
||||
|
.markdown b { |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
|
||||
|
.markdown>table { |
||||
|
border-collapse: collapse; |
||||
|
border-spacing: 0; |
||||
|
empty-cells: show; |
||||
|
border: 1px solid #e9e9e9; |
||||
|
width: 95%; |
||||
|
margin-bottom: 24px; |
||||
|
} |
||||
|
|
||||
|
.markdown>table th { |
||||
|
white-space: nowrap; |
||||
|
color: #333; |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
|
||||
|
.markdown>table th, |
||||
|
.markdown>table td { |
||||
|
border: 1px solid #e9e9e9; |
||||
|
padding: 8px 16px; |
||||
|
text-align: left; |
||||
|
} |
||||
|
|
||||
|
.markdown>table th { |
||||
|
background: #F7F7F7; |
||||
|
} |
||||
|
|
||||
|
.markdown blockquote { |
||||
|
font-size: 90%; |
||||
|
color: #999; |
||||
|
border-left: 4px solid #e9e9e9; |
||||
|
padding-left: 0.8em; |
||||
|
margin: 1em 0; |
||||
|
} |
||||
|
|
||||
|
.markdown blockquote p { |
||||
|
margin: 0; |
||||
|
} |
||||
|
|
||||
|
.markdown .anchor { |
||||
|
opacity: 0; |
||||
|
transition: opacity 0.3s ease; |
||||
|
margin-left: 8px; |
||||
|
} |
||||
|
|
||||
|
.markdown .waiting { |
||||
|
color: #ccc; |
||||
|
} |
||||
|
|
||||
|
.markdown h1:hover .anchor, |
||||
|
.markdown h2:hover .anchor, |
||||
|
.markdown h3:hover .anchor, |
||||
|
.markdown h4:hover .anchor, |
||||
|
.markdown h5:hover .anchor, |
||||
|
.markdown h6:hover .anchor { |
||||
|
opacity: 1; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.markdown>br, |
||||
|
.markdown>p>br { |
||||
|
clear: both; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.hljs { |
||||
|
display: block; |
||||
|
background: white; |
||||
|
padding: 0.5em; |
||||
|
color: #333333; |
||||
|
overflow-x: auto; |
||||
|
} |
||||
|
|
||||
|
.hljs-comment, |
||||
|
.hljs-meta { |
||||
|
color: #969896; |
||||
|
} |
||||
|
|
||||
|
.hljs-string, |
||||
|
.hljs-variable, |
||||
|
.hljs-template-variable, |
||||
|
.hljs-strong, |
||||
|
.hljs-emphasis, |
||||
|
.hljs-quote { |
||||
|
color: #df5000; |
||||
|
} |
||||
|
|
||||
|
.hljs-keyword, |
||||
|
.hljs-selector-tag, |
||||
|
.hljs-type { |
||||
|
color: #a71d5d; |
||||
|
} |
||||
|
|
||||
|
.hljs-literal, |
||||
|
.hljs-symbol, |
||||
|
.hljs-bullet, |
||||
|
.hljs-attribute { |
||||
|
color: #0086b3; |
||||
|
} |
||||
|
|
||||
|
.hljs-section, |
||||
|
.hljs-name { |
||||
|
color: #63a35c; |
||||
|
} |
||||
|
|
||||
|
.hljs-tag { |
||||
|
color: #333333; |
||||
|
} |
||||
|
|
||||
|
.hljs-title, |
||||
|
.hljs-attr, |
||||
|
.hljs-selector-id, |
||||
|
.hljs-selector-class, |
||||
|
.hljs-selector-attr, |
||||
|
.hljs-selector-pseudo { |
||||
|
color: #795da3; |
||||
|
} |
||||
|
|
||||
|
.hljs-addition { |
||||
|
color: #55a532; |
||||
|
background-color: #eaffea; |
||||
|
} |
||||
|
|
||||
|
.hljs-deletion { |
||||
|
color: #bd2c00; |
||||
|
background-color: #ffecec; |
||||
|
} |
||||
|
|
||||
|
.hljs-link { |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
|
||||
|
/* 代码高亮 */ |
||||
|
/* PrismJS 1.15.0 |
||||
|
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ |
||||
|
/** |
||||
|
* prism.js default theme for JavaScript, CSS and HTML |
||||
|
* Based on dabblet (http://dabblet.com) |
||||
|
* @author Lea Verou |
||||
|
*/ |
||||
|
code[class*="language-"], |
||||
|
pre[class*="language-"] { |
||||
|
color: black; |
||||
|
background: none; |
||||
|
text-shadow: 0 1px white; |
||||
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; |
||||
|
text-align: left; |
||||
|
white-space: pre; |
||||
|
word-spacing: normal; |
||||
|
word-break: normal; |
||||
|
word-wrap: normal; |
||||
|
line-height: 1.5; |
||||
|
|
||||
|
-moz-tab-size: 4; |
||||
|
-o-tab-size: 4; |
||||
|
tab-size: 4; |
||||
|
|
||||
|
-webkit-hyphens: none; |
||||
|
-moz-hyphens: none; |
||||
|
-ms-hyphens: none; |
||||
|
hyphens: none; |
||||
|
} |
||||
|
|
||||
|
pre[class*="language-"]::-moz-selection, |
||||
|
pre[class*="language-"] ::-moz-selection, |
||||
|
code[class*="language-"]::-moz-selection, |
||||
|
code[class*="language-"] ::-moz-selection { |
||||
|
text-shadow: none; |
||||
|
background: #b3d4fc; |
||||
|
} |
||||
|
|
||||
|
pre[class*="language-"]::selection, |
||||
|
pre[class*="language-"] ::selection, |
||||
|
code[class*="language-"]::selection, |
||||
|
code[class*="language-"] ::selection { |
||||
|
text-shadow: none; |
||||
|
background: #b3d4fc; |
||||
|
} |
||||
|
|
||||
|
@media print { |
||||
|
|
||||
|
code[class*="language-"], |
||||
|
pre[class*="language-"] { |
||||
|
text-shadow: none; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/* Code blocks */ |
||||
|
pre[class*="language-"] { |
||||
|
padding: 1em; |
||||
|
margin: .5em 0; |
||||
|
overflow: auto; |
||||
|
} |
||||
|
|
||||
|
:not(pre)>code[class*="language-"], |
||||
|
pre[class*="language-"] { |
||||
|
background: #f5f2f0; |
||||
|
} |
||||
|
|
||||
|
/* Inline code */ |
||||
|
:not(pre)>code[class*="language-"] { |
||||
|
padding: .1em; |
||||
|
border-radius: .3em; |
||||
|
white-space: normal; |
||||
|
} |
||||
|
|
||||
|
.token.comment, |
||||
|
.token.prolog, |
||||
|
.token.doctype, |
||||
|
.token.cdata { |
||||
|
color: slategray; |
||||
|
} |
||||
|
|
||||
|
.token.punctuation { |
||||
|
color: #999; |
||||
|
} |
||||
|
|
||||
|
.namespace { |
||||
|
opacity: .7; |
||||
|
} |
||||
|
|
||||
|
.token.property, |
||||
|
.token.tag, |
||||
|
.token.boolean, |
||||
|
.token.number, |
||||
|
.token.constant, |
||||
|
.token.symbol, |
||||
|
.token.deleted { |
||||
|
color: #905; |
||||
|
} |
||||
|
|
||||
|
.token.selector, |
||||
|
.token.attr-name, |
||||
|
.token.string, |
||||
|
.token.char, |
||||
|
.token.builtin, |
||||
|
.token.inserted { |
||||
|
color: #690; |
||||
|
} |
||||
|
|
||||
|
.token.operator, |
||||
|
.token.entity, |
||||
|
.token.url, |
||||
|
.language-css .token.string, |
||||
|
.style .token.string { |
||||
|
color: #9a6e3a; |
||||
|
background: hsla(0, 0%, 100%, 50%); |
||||
|
} |
||||
|
|
||||
|
.token.atrule, |
||||
|
.token.attr-value, |
||||
|
.token.keyword { |
||||
|
color: #07a; |
||||
|
} |
||||
|
|
||||
|
.token.function, |
||||
|
.token.class-name { |
||||
|
color: #DD4A68; |
||||
|
} |
||||
|
|
||||
|
.token.regex, |
||||
|
.token.important, |
||||
|
.token.variable { |
||||
|
color: #e90; |
||||
|
} |
||||
|
|
||||
|
.token.important, |
||||
|
.token.bold { |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.token.italic { |
||||
|
font-style: italic; |
||||
|
} |
||||
|
|
||||
|
.token.entity { |
||||
|
cursor: help; |
||||
|
} |
||||
@ -0,0 +1,234 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html> |
||||
|
<head> |
||||
|
<meta charset="utf-8"/> |
||||
|
<title>iconfont Demo</title> |
||||
|
<link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/> |
||||
|
<link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/> |
||||
|
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css"> |
||||
|
<link rel="stylesheet" href="demo.css"> |
||||
|
<link rel="stylesheet" href="iconfont.css"> |
||||
|
<script src="iconfont.js"></script> |
||||
|
<!-- jQuery --> |
||||
|
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script> |
||||
|
<!-- 代码高亮 --> |
||||
|
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script> |
||||
|
<style> |
||||
|
.main .logo { |
||||
|
margin-top: 0; |
||||
|
height: auto; |
||||
|
} |
||||
|
|
||||
|
.main .logo a { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.main .logo .sub-title { |
||||
|
margin-left: 0.5em; |
||||
|
font-size: 22px; |
||||
|
color: #fff; |
||||
|
background: linear-gradient(-45deg, #3967FF, #B500FE); |
||||
|
-webkit-background-clip: text; |
||||
|
-webkit-text-fill-color: transparent; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="main"> |
||||
|
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank"> |
||||
|
<img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg"> |
||||
|
|
||||
|
</a></h1> |
||||
|
<div class="nav-tabs"> |
||||
|
<ul id="tabs" class="dib-box"> |
||||
|
<li class="dib active"><span>Unicode</span></li> |
||||
|
<li class="dib"><span>Font class</span></li> |
||||
|
<li class="dib"><span>Symbol</span></li> |
||||
|
</ul> |
||||
|
|
||||
|
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=4966310" target="_blank" class="nav-more">查看项目</a> |
||||
|
|
||||
|
</div> |
||||
|
<div class="tab-container"> |
||||
|
<div class="content unicode" style="display: block;"> |
||||
|
<ul class="icon_lists dib-box"> |
||||
|
|
||||
|
<li class="dib"> |
||||
|
<span class="icon iconfont"></span> |
||||
|
<div class="name">下载2</div> |
||||
|
<div class="code-name">&#xe600;</div> |
||||
|
</li> |
||||
|
|
||||
|
<li class="dib"> |
||||
|
<span class="icon iconfont"></span> |
||||
|
<div class="name">筛选</div> |
||||
|
<div class="code-name">&#xe6c9;</div> |
||||
|
</li> |
||||
|
|
||||
|
</ul> |
||||
|
<div class="article markdown"> |
||||
|
<h2 id="unicode-">Unicode 引用</h2> |
||||
|
<hr> |
||||
|
|
||||
|
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p> |
||||
|
<ul> |
||||
|
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li> |
||||
|
<li>默认情况下不支持多色,直接添加多色图标会自动去色。</li> |
||||
|
</ul> |
||||
|
<blockquote> |
||||
|
<p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p> |
||||
|
</blockquote> |
||||
|
<p>Unicode 使用步骤如下:</p> |
||||
|
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3> |
||||
|
<pre><code class="language-css" |
||||
|
>@font-face { |
||||
|
font-family: 'iconfont'; |
||||
|
src: url('iconfont.woff2?t=1751596850969') format('woff2'), |
||||
|
url('iconfont.woff?t=1751596850969') format('woff'), |
||||
|
url('iconfont.ttf?t=1751596850969') format('truetype'); |
||||
|
} |
||||
|
</code></pre> |
||||
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> |
||||
|
<pre><code class="language-css" |
||||
|
>.iconfont { |
||||
|
font-family: "iconfont" !important; |
||||
|
font-size: 16px; |
||||
|
font-style: normal; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
</code></pre> |
||||
|
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3> |
||||
|
<pre> |
||||
|
<code class="language-html" |
||||
|
><span class="iconfont">&#x33;</span> |
||||
|
</code></pre> |
||||
|
<blockquote> |
||||
|
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p> |
||||
|
</blockquote> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="content font-class"> |
||||
|
<ul class="icon_lists dib-box"> |
||||
|
|
||||
|
<li class="dib"> |
||||
|
<span class="icon iconfont icon-download-2"></span> |
||||
|
<div class="name"> |
||||
|
下载2 |
||||
|
</div> |
||||
|
<div class="code-name">.icon-download-2 |
||||
|
</div> |
||||
|
</li> |
||||
|
|
||||
|
<li class="dib"> |
||||
|
<span class="icon iconfont icon-shaixuan"></span> |
||||
|
<div class="name"> |
||||
|
筛选 |
||||
|
</div> |
||||
|
<div class="code-name">.icon-shaixuan |
||||
|
</div> |
||||
|
</li> |
||||
|
|
||||
|
</ul> |
||||
|
<div class="article markdown"> |
||||
|
<h2 id="font-class-">font-class 引用</h2> |
||||
|
<hr> |
||||
|
|
||||
|
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p> |
||||
|
<p>与 Unicode 使用方式相比,具有如下特点:</p> |
||||
|
<ul> |
||||
|
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li> |
||||
|
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li> |
||||
|
</ul> |
||||
|
<p>使用步骤如下:</p> |
||||
|
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3> |
||||
|
<pre><code class="language-html"><link rel="stylesheet" href="./iconfont.css"> |
||||
|
</code></pre> |
||||
|
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3> |
||||
|
<pre><code class="language-html"><span class="iconfont icon-xxx"></span> |
||||
|
</code></pre> |
||||
|
<blockquote> |
||||
|
<p>" |
||||
|
iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p> |
||||
|
</blockquote> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="content symbol"> |
||||
|
<ul class="icon_lists dib-box"> |
||||
|
|
||||
|
<li class="dib"> |
||||
|
<svg class="icon svg-icon" aria-hidden="true"> |
||||
|
<use xlink:href="#icon-download-2"></use> |
||||
|
</svg> |
||||
|
<div class="name">下载2</div> |
||||
|
<div class="code-name">#icon-download-2</div> |
||||
|
</li> |
||||
|
|
||||
|
<li class="dib"> |
||||
|
<svg class="icon svg-icon" aria-hidden="true"> |
||||
|
<use xlink:href="#icon-shaixuan"></use> |
||||
|
</svg> |
||||
|
<div class="name">筛选</div> |
||||
|
<div class="code-name">#icon-shaixuan</div> |
||||
|
</li> |
||||
|
|
||||
|
</ul> |
||||
|
<div class="article markdown"> |
||||
|
<h2 id="symbol-">Symbol 引用</h2> |
||||
|
<hr> |
||||
|
|
||||
|
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a> |
||||
|
这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p> |
||||
|
<ul> |
||||
|
<li>支持多色图标了,不再受单色限制。</li> |
||||
|
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li> |
||||
|
<li>兼容性较差,支持 IE9+,及现代浏览器。</li> |
||||
|
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li> |
||||
|
</ul> |
||||
|
<p>使用步骤如下:</p> |
||||
|
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3> |
||||
|
<pre><code class="language-html"><script src="./iconfont.js"></script> |
||||
|
</code></pre> |
||||
|
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3> |
||||
|
<pre><code class="language-html"><style> |
||||
|
.icon { |
||||
|
width: 1em; |
||||
|
height: 1em; |
||||
|
vertical-align: -0.15em; |
||||
|
fill: currentColor; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
</style> |
||||
|
</code></pre> |
||||
|
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3> |
||||
|
<pre><code class="language-html"><svg class="icon" aria-hidden="true"> |
||||
|
<use xlink:href="#icon-xxx"></use> |
||||
|
</svg> |
||||
|
</code></pre> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
<script> |
||||
|
$(document).ready(function () { |
||||
|
$('.tab-container .content:first').show() |
||||
|
|
||||
|
$('#tabs li').click(function (e) { |
||||
|
var tabContent = $('.tab-container .content') |
||||
|
var index = $(this).index() |
||||
|
|
||||
|
if ($(this).hasClass('active')) { |
||||
|
return |
||||
|
} else { |
||||
|
$('#tabs li').removeClass('active') |
||||
|
$(this).addClass('active') |
||||
|
|
||||
|
tabContent.hide().eq(index).fadeIn() |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,23 @@ |
|||||
|
@font-face { |
||||
|
font-family: "iconfont"; /* Project id 4966310 */ |
||||
|
src: url('iconfont.woff2?t=1751596850969') format('woff2'), |
||||
|
url('iconfont.woff?t=1751596850969') format('woff'), |
||||
|
url('iconfont.ttf?t=1751596850969') format('truetype'); |
||||
|
} |
||||
|
|
||||
|
.iconfont { |
||||
|
font-family: "iconfont" !important; |
||||
|
font-size: 16px; |
||||
|
font-style: normal; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
|
||||
|
.icon-download-2:before { |
||||
|
content: "\e600"; |
||||
|
} |
||||
|
|
||||
|
.icon-shaixuan:before { |
||||
|
content: "\e6c9"; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,2 @@ |
|||||
|
/* eslint-disable */ |
||||
|
window._iconfont_svg_string_4966310='<svg><symbol id="icon-download-2" viewBox="0 0 1024 1024"><path d="M768.355 416a256 256 0 1 0-512 0 192 192 0 1 0 0 384v64a256 256 0 0 1-58.88-505.216 320.128 320.128 0 0 1 629.76 0A256.128 256.128 0 0 1 768.355 864v-64a192 192 0 0 0 0-384z m-512 384h64v64h-64v-64z m448 0h64v64h-64v-64z" fill="" ></path><path d="M539.043 845.248V512.192a32.448 32.448 0 0 0-32-32.192c-17.664 0-32 14.912-32 32.192v333.056l-36.096-36.096a32.192 32.192 0 0 0-45.056 0.192 31.616 31.616 0 0 0-0.192 45.056l90.88 90.944a31.36 31.36 0 0 0 22.528 9.088 30.08 30.08 0 0 0 22.4-9.088l90.88-90.88a32.192 32.192 0 0 0-0.192-45.12 31.616 31.616 0 0 0-45.056-0.192l-36.096 36.096z" fill="" ></path></symbol><symbol id="icon-shaixuan" viewBox="0 0 1024 1024"><path d="M128 128a42.666667 42.666667 0 0 1 42.666667-42.666667h682.666666a42.666667 42.666667 0 0 1 42.666667 42.666667v149.333333a42.666667 42.666667 0 0 1-17.578667 34.496L661.333333 469.717333V768a42.666667 42.666667 0 0 1-20.714666 36.586667l-213.333334 128A42.666667 42.666667 0 0 1 362.666667 896V469.717333l-217.088-157.866666A42.666667 42.666667 0 0 1 128 277.333333V128z m85.333333 42.666667v84.949333l217.088 157.866667A42.666667 42.666667 0 0 1 448 448v372.650667l128-76.8V448a42.666667 42.666667 0 0 1 17.578667-34.496L810.666667 255.616V170.666667H213.333333z" fill="#000000" ></path><path d="M917.333333 640h-170.666666v-85.333333h170.666666v85.333333zM917.333333 810.666667h-170.666666v-85.333334h170.666666v85.333334z" fill="#000000" ></path></symbol></svg>',(n=>{var t=(e=(e=document.getElementsByTagName("script"))[e.length-1]).getAttribute("data-injectcss"),e=e.getAttribute("data-disable-injectsvg");if(!e){var i,o,a,l,d,c=function(t,e){e.parentNode.insertBefore(t,e)};if(t&&!n.__iconfont__svg__cssinject__){n.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(t){console&&console.log(t)}}i=function(){var t,e=document.createElement("div");e.innerHTML=n._iconfont_svg_string_4966310,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?c(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),i()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(a=i,l=n.document,d=!1,r(),l.onreadystatechange=function(){"complete"==l.readyState&&(l.onreadystatechange=null,s())})}function s(){d||(d=!0,a())}function r(){try{l.documentElement.doScroll("left")}catch(t){return void setTimeout(r,50)}s()}})(window); |
||||
@ -0,0 +1,23 @@ |
|||||
|
{ |
||||
|
"id": "4966310", |
||||
|
"name": "wilink-美的", |
||||
|
"font_family": "iconfont", |
||||
|
"css_prefix_text": "icon-", |
||||
|
"description": "", |
||||
|
"glyphs": [ |
||||
|
{ |
||||
|
"icon_id": "2784748", |
||||
|
"name": "下载2", |
||||
|
"font_class": "download-2", |
||||
|
"unicode": "e600", |
||||
|
"unicode_decimal": 58880 |
||||
|
}, |
||||
|
{ |
||||
|
"icon_id": "37053339", |
||||
|
"name": "筛选", |
||||
|
"font_class": "shaixuan", |
||||
|
"unicode": "e6c9", |
||||
|
"unicode_decimal": 59081 |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
@ -0,0 +1,259 @@ |
|||||
|
.area-zoom-in-top-enter-active, |
||||
|
.area-zoom-in-top-leave-active { |
||||
|
opacity: 1; |
||||
|
transform: scaleY(1); |
||||
|
} |
||||
|
|
||||
|
.area-zoom-in-top-enter, |
||||
|
.area-zoom-in-top-leave-active { |
||||
|
opacity: 0; |
||||
|
transform: scaleY(0); |
||||
|
} |
||||
|
|
||||
|
.area-select { |
||||
|
box-sizing: border-box; |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
color: rgba(0, 0, 0, 0.65); |
||||
|
font-size: 14px; |
||||
|
font-variant: tabular-nums; |
||||
|
line-height: 1.5; |
||||
|
list-style: none; |
||||
|
font-feature-settings: 'tnum'; |
||||
|
position: relative; |
||||
|
outline: 0; |
||||
|
display: block; |
||||
|
background-color: #fff; |
||||
|
border: 1px solid #d9d9d9; |
||||
|
border-top-width: 1.02px; |
||||
|
border-radius: 4px; |
||||
|
outline: none; |
||||
|
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); |
||||
|
-webkit-user-select: none; |
||||
|
-ms-user-select: none; |
||||
|
user-select: none; |
||||
|
} |
||||
|
|
||||
|
.area-select-wrap .area-select { |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.area-select * { |
||||
|
box-sizing: border-box; |
||||
|
} |
||||
|
|
||||
|
.area-select:hover { |
||||
|
border-color: #40a9ff; |
||||
|
border-right-width: 1px !important; |
||||
|
outline: 0; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.area-select:active { |
||||
|
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2); |
||||
|
} |
||||
|
|
||||
|
.area-select.small { |
||||
|
width: 126px; |
||||
|
} |
||||
|
|
||||
|
.area-select.medium { |
||||
|
width: 160px; |
||||
|
} |
||||
|
|
||||
|
.area-select.large { |
||||
|
width: 194px; |
||||
|
} |
||||
|
|
||||
|
.area-select.is-disabled { |
||||
|
background: #eceff5; |
||||
|
cursor: not-allowed; |
||||
|
} |
||||
|
|
||||
|
.area-select.is-disabled:hover { |
||||
|
border-color: #e1e2e6; |
||||
|
} |
||||
|
|
||||
|
.area-select.is-disabled .area-selected-trigger { |
||||
|
cursor: not-allowed; |
||||
|
} |
||||
|
|
||||
|
.area-select .area-selected-trigger { |
||||
|
position: relative; |
||||
|
display: block; |
||||
|
font-size: 14px; |
||||
|
cursor: pointer; |
||||
|
margin: 0; |
||||
|
overflow: hidden; |
||||
|
white-space: nowrap; |
||||
|
text-overflow: ellipsis; |
||||
|
height: 100%; |
||||
|
padding: 8px 20px 7px 12px; |
||||
|
} |
||||
|
|
||||
|
.area-select .area-select-icon { |
||||
|
position: absolute; |
||||
|
top: 50%; |
||||
|
margin-top: -2px; |
||||
|
right: 6px; |
||||
|
content: ""; |
||||
|
width: 0; |
||||
|
height: 0; |
||||
|
border: 6px solid transparent; |
||||
|
border-top-color: rgba(0, 0, 0, 0.25); |
||||
|
transition: all .3s linear; |
||||
|
transform-origin: center; |
||||
|
} |
||||
|
|
||||
|
.area-select .area-select-icon.active { |
||||
|
margin-top: -8px; |
||||
|
transform: rotate(180deg); |
||||
|
} |
||||
|
|
||||
|
.area-selectable-list-wrap { |
||||
|
position: absolute; |
||||
|
width: 100%; |
||||
|
max-height: 275px; |
||||
|
z-index: 15000; |
||||
|
background-color: #fff; |
||||
|
box-sizing: border-box; |
||||
|
overflow-x: auto; |
||||
|
margin: 2px 0; |
||||
|
border-radius: 4px; |
||||
|
outline: none; |
||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
||||
|
|
||||
|
transition: opacity 0.15s, transform 0.3s !important; |
||||
|
transform-origin: center top !important; |
||||
|
} |
||||
|
|
||||
|
.area-selectable-list { |
||||
|
position: relative; |
||||
|
margin: 0; |
||||
|
padding: 6px 0; |
||||
|
width: 100%; |
||||
|
font-size: 14px; |
||||
|
color: #565656; |
||||
|
list-style: none; |
||||
|
} |
||||
|
|
||||
|
.area-selectable-list .area-select-option { |
||||
|
position: relative; |
||||
|
white-space: nowrap; |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
cursor: pointer; |
||||
|
padding: 0 15px 0 10px; |
||||
|
height: 32px; |
||||
|
line-height: 32px; |
||||
|
} |
||||
|
|
||||
|
.area-selectable-list .area-select-option.hover { |
||||
|
background-color: #e6f7ff; |
||||
|
} |
||||
|
|
||||
|
.area-selectable-list .area-select-option.selected { |
||||
|
color: rgba(0, 0, 0, 0.65); |
||||
|
font-weight: 600; |
||||
|
background-color: #efefef; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list-wrap { |
||||
|
position: absolute; |
||||
|
white-space: nowrap; |
||||
|
z-index: 15000; |
||||
|
background-color: #fff; |
||||
|
box-sizing: border-box; |
||||
|
overflow: hidden; |
||||
|
font-size: 0; |
||||
|
margin: 2px 0; |
||||
|
border-radius: 4px; |
||||
|
outline: none; |
||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
||||
|
|
||||
|
transition: opacity 0.15s, transform 0.3s !important; |
||||
|
transform-origin: center top !important; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list { |
||||
|
position: relative; |
||||
|
margin: 0; |
||||
|
font-size: 14px; |
||||
|
color: #565656; |
||||
|
padding: 6px 0; |
||||
|
list-style: none; |
||||
|
display: inline-block; |
||||
|
height: 204px; |
||||
|
overflow-x: hidden; |
||||
|
overflow-y: auto; |
||||
|
min-width: 160px; |
||||
|
vertical-align: top; |
||||
|
background-color: #fff; |
||||
|
border-right: 1px solid #e4e7ed; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list:last-child { |
||||
|
border-right: none; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list .cascader-menu-option { |
||||
|
position: relative; |
||||
|
white-space: nowrap; |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
cursor: pointer; |
||||
|
padding: 0 15px 0 10px; |
||||
|
height: 32px; |
||||
|
line-height: 32px; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list .cascader-menu-option.hover, |
||||
|
.cascader-menu-list .cascader-menu-option:hover { |
||||
|
background-color: #e6f7ff; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list .cascader-menu-option.selected { |
||||
|
color: rgba(0, 0, 0, 0.65); |
||||
|
font-weight: 600; |
||||
|
background-color: #efefef; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list .cascader-menu-option.cascader-menu-extensible:after { |
||||
|
position: absolute; |
||||
|
top: 50%; |
||||
|
margin-top: -4px; |
||||
|
right: 5px; |
||||
|
content: ""; |
||||
|
width: 0; |
||||
|
height: 0; |
||||
|
border: 4px solid transparent; |
||||
|
border-left-color: #a1a4ad; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list::-webkit-scrollbar, |
||||
|
.area-selectable-list-wrap::-webkit-scrollbar { |
||||
|
width: 8px; |
||||
|
background: transparent; |
||||
|
} |
||||
|
|
||||
|
.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:decremen, |
||||
|
.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:end:decrement, |
||||
|
.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:increment, |
||||
|
.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:start:increment, |
||||
|
.cascader-menu-list::-webkit-scrollbar-button:vertical:decremen, |
||||
|
.cascader-menu-list::-webkit-scrollbar-button:vertical:end:decrement, |
||||
|
.cascader-menu-list::-webkit-scrollbar-button:vertical:increment, |
||||
|
.cascader-menu-list::-webkit-scrollbar-button:vertical:start:increment { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list::-webkit-scrollbar-thumb:vertical, |
||||
|
.area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical { |
||||
|
background-color: #b8b8b8; |
||||
|
border-radius: 4px; |
||||
|
} |
||||
|
|
||||
|
.cascader-menu-list::-webkit-scrollbar-thumb:vertical:hover, |
||||
|
.area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical:hover { |
||||
|
background-color: #777; |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
.cm-s-idea span.cm-meta{color:olive}.cm-s-idea span.cm-number{color:#00f}.cm-s-idea span.cm-keyword{line-height:1em;font-weight:700;color:navy}.cm-s-idea span.cm-atom{font-weight:700;color:navy}.cm-s-idea span.cm-def{color:#000}.cm-s-idea span.cm-variable{color:#000}.cm-s-idea span.cm-variable-2{color:#000}.cm-s-idea span.cm-type,.cm-s-idea span.cm-variable-3{color:#000}.cm-s-idea span.cm-property{color:#000}.cm-s-idea span.cm-operator{color:#000}.cm-s-idea span.cm-comment{color:grey}.cm-s-idea span.cm-string{color:green}.cm-s-idea span.cm-string-2{color:green}.cm-s-idea span.cm-qualifier{color:#555}.cm-s-idea span.cm-error{color:red}.cm-s-idea span.cm-attribute{color:#00f}.cm-s-idea span.cm-tag{color:navy}.cm-s-idea span.cm-link{color:#00f}.cm-s-idea .CodeMirror-activeline-background{background:#fffae3}.cm-s-idea span.cm-builtin{color:#30a}.cm-s-idea span.cm-bracket{color:#cc7}.cm-s-idea{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif}.cm-s-idea .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}.CodeMirror-hints.idea{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;color:#616569;background-color:#ebf3fd!important}.CodeMirror-hints.idea .CodeMirror-hint-active{background-color:#a2b8c9!important;color:#5c6065!important} |
||||
@ -0,0 +1,113 @@ |
|||||
|
///命名规范采用BEM CSS命名规范 |
||||
|
///author:tianxiu |
||||
|
/// |
||||
|
/* |
||||
|
|
||||
|
1. .block{} |
||||
|
2. .block__element{} |
||||
|
3. .block--modifier{} |
||||
|
.block 代表了更⾼级别的抽象或组件。 |
||||
|
.block__element 代表.block的后代,⽤于形成⼀个完整的.block的整体。 |
||||
|
.block--modifier代表.block的不同状态或不同版本 |
||||
|
|
||||
|
|
||||
|
.模块名-一级模块-二级模块.... |
||||
|
*/ |
||||
|
|
||||
|
/* |
||||
|
定义主题颜色 |
||||
|
定义主题字体 |
||||
|
定义主题大小字号 |
||||
|
*/ |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
@font-face { |
||||
|
font-family: "Source Han Sans CN"; |
||||
|
src: url('./font/Source Han Sans CN.ttf'); |
||||
|
} |
||||
|
|
||||
|
@fant-family: "Arial, sans-serif"; |
||||
|
@theme-color: #0077ff; |
||||
|
@theme-color-dark: #195AA4; |
||||
|
@theme-color-background: #ffffff; |
||||
|
@theme-color-border: #E8E8E8; |
||||
|
@theme-color-shadow: rgba(0, 0, 0, 0.20); |
||||
|
@theme-color_active: #1890ff; |
||||
|
@theme-color_placeholder: #CCCCCC; |
||||
|
@theme-color-container: #F2F9FF; |
||||
|
@theme-color-blur: #999999; |
||||
|
@theme-color-table-th: #f8f8f8; ///f2f9ff |
||||
|
|
||||
|
html { |
||||
|
--antd-wave-shadow-color: @theme-color; |
||||
|
} |
||||
|
|
||||
|
///公用的兼容样式 |
||||
|
///flex布局兼容 多种浏览器 |
||||
|
.display_flex { |
||||
|
display: -webkit-flex; |
||||
|
/* Safari */ |
||||
|
display: -moz-box; |
||||
|
display: -moz-flex; |
||||
|
display: -ms-flexbox; |
||||
|
display: -webkit-box; |
||||
|
display: -webkit-flex; |
||||
|
/* Safari */ |
||||
|
display: flex; |
||||
|
} |
||||
|
|
||||
|
.border-soild(@width: 1px, @style: "soild", @color: @theme-color-border) { |
||||
|
border: @arguments; |
||||
|
} |
||||
|
|
||||
|
.box-shadow (@x: 0, @y: 0, @blur: 1px, @spread: 0, @color: @theme-color-shadow) { |
||||
|
box-shadow: @arguments; |
||||
|
-moz-box-shadow: @arguments; |
||||
|
-webkit-box-shadow: @arguments; |
||||
|
} |
||||
|
|
||||
|
.table-operator-right { |
||||
|
float: right; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
th { |
||||
|
cursor: move !important; |
||||
|
} |
||||
|
|
||||
|
.ant-table-column-sorter{ |
||||
|
cursor: pointer !important; |
||||
|
} |
||||
|
|
||||
|
.ant-table-column-sorter-inner-full{ |
||||
|
height: auto !important; |
||||
|
margin-bottom: 0.3em; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.resize-table-th { |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.table-draggable-handle { |
||||
|
width: 10px !important; |
||||
|
bottom: 0; |
||||
|
transform: none !important; |
||||
|
height: 100% !important; |
||||
|
left: auto !important; |
||||
|
right: -5px; |
||||
|
cursor: col-resize !important; |
||||
|
touch-action: none !important; |
||||
|
border: none !important; |
||||
|
} |
||||
|
.ant-table-header-cc { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
z-index: 9999; |
||||
|
background-color: #d6d6d673; |
||||
|
border-right: 1px solid #aaa; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,272 @@ |
|||||
|
@import 'common.less'; |
||||
|
|
||||
|
.dashboard-analysis { |
||||
|
margin: 15px; |
||||
|
height: calc(100% - 30px); |
||||
|
|
||||
|
.top-zone { |
||||
|
height: 55%; |
||||
|
.display_flex; |
||||
|
.left-zone { |
||||
|
width: 62%; |
||||
|
.display_flex; |
||||
|
flex: 5; |
||||
|
flex-direction: column; |
||||
|
padding-right: 8px; |
||||
|
overflow: auto; |
||||
|
|
||||
|
///四个面板 |
||||
|
.number-card-bar { |
||||
|
.display_flex; |
||||
|
justify-content: space-between; |
||||
|
|
||||
|
///数字看板 |
||||
|
.number-card { |
||||
|
// flex: 1; |
||||
|
width: 24%; |
||||
|
height: 130px; |
||||
|
border-radius: 10px; |
||||
|
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1); |
||||
|
|
||||
|
.chart-card-content { |
||||
|
height: 0 !important; |
||||
|
} |
||||
|
|
||||
|
.ant-card { |
||||
|
background-color: transparent !important; |
||||
|
color: #ffffff; |
||||
|
} |
||||
|
|
||||
|
.ant-card-body { |
||||
|
margin: 0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.number-card.blue { |
||||
|
background-color: #1c66b9 !important; |
||||
|
} |
||||
|
|
||||
|
.number-card.orange { |
||||
|
background-color: #fecc2f !important; |
||||
|
} |
||||
|
|
||||
|
.number-card.violet { |
||||
|
background-color: #b472ff !important; |
||||
|
} |
||||
|
|
||||
|
.number-card.green { |
||||
|
background-color: #8dde47 !important; |
||||
|
} |
||||
|
|
||||
|
.trend-text { |
||||
|
display: flex; |
||||
|
justify-content: space-around; |
||||
|
div { |
||||
|
font-size: 0.7rem; |
||||
|
} |
||||
|
div:nth-child(1) { |
||||
|
margin-right: 0.1rem; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 政策法规 表格 |
||||
|
.content-card { |
||||
|
.display_flex; |
||||
|
width: 100%; |
||||
|
margin-top: 15px; |
||||
|
border-radius: 10px; |
||||
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); |
||||
|
height: calc(100% - 147px); |
||||
|
|
||||
|
.dashboard-tab { |
||||
|
width: 100%; |
||||
|
.display_flex; |
||||
|
flex-direction: column; |
||||
|
background-color: #ffffff; |
||||
|
|
||||
|
.ant-tabs-tabpane { |
||||
|
box-shadow: none !important; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.right-zone { |
||||
|
width: 38%; |
||||
|
.display_flex; |
||||
|
padding-left: 8px; |
||||
|
flex-direction: column; |
||||
|
height: 100%; |
||||
|
|
||||
|
// 代办列表 |
||||
|
.right-important-task { |
||||
|
height: 100%; |
||||
|
background: #ffffff; |
||||
|
border-radius: 10px; |
||||
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); |
||||
|
.display_flex; |
||||
|
flex-direction: column; |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
.r-zone-bar { |
||||
|
height: 47px; |
||||
|
line-height: 47px; |
||||
|
border-bottom: 1px solid #dedede; |
||||
|
padding: 0 15px; |
||||
|
font-size: 18px; |
||||
|
.display_flex; |
||||
|
justify-content: space-between; |
||||
|
width: 100%; |
||||
|
color: #333333; |
||||
|
flex-wrap: nowrap; |
||||
|
|
||||
|
.r-zone-bar-right { |
||||
|
font-size: 0.9rem; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.card_container { |
||||
|
padding: 20px; |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(3, 1fr); |
||||
|
gap: 10px; |
||||
|
overflow: auto; |
||||
|
|
||||
|
.card_container_title { |
||||
|
display: flex; |
||||
|
cursor: pointer; |
||||
|
color: #0077ff; |
||||
|
border: 1px solid #81b2e9; |
||||
|
border-radius: 5px; |
||||
|
padding: 5px; |
||||
|
align-items: center; |
||||
|
min-width: 0; |
||||
|
height: 38px; |
||||
|
|
||||
|
a { |
||||
|
white-space: nowrap; |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
flex: 1; |
||||
|
margin-left: 5px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.bottom-zone { |
||||
|
margin-top: 15px; |
||||
|
height: calc(45% - 15px); |
||||
|
// 预警信息 |
||||
|
.right-important-waring { |
||||
|
height: 100%; |
||||
|
background: #ffffff; |
||||
|
border-radius: 10px; |
||||
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); |
||||
|
overflow-y: auto; |
||||
|
.display_flex; |
||||
|
flex-direction: column; |
||||
|
} |
||||
|
|
||||
|
.r-zone-bar { |
||||
|
height: 47px; |
||||
|
line-height: 47px; |
||||
|
border-bottom: 1px solid #dedede; |
||||
|
padding: 0 15px; |
||||
|
font-size: 18px; |
||||
|
.display_flex; |
||||
|
justify-content: space-between; |
||||
|
width: 100%; |
||||
|
color: #333333; |
||||
|
flex-wrap: nowrap; |
||||
|
|
||||
|
.r-zone-bar-right { |
||||
|
font-size: 0.9rem; |
||||
|
} |
||||
|
} |
||||
|
.r-zone-content { |
||||
|
height: 100%; |
||||
|
width: 100%; |
||||
|
.display_flex; |
||||
|
font-size: 16px; |
||||
|
overflow-y: auto; |
||||
|
padding: 0 !important; |
||||
|
|
||||
|
ul { |
||||
|
list-style-type: none; |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
ul > li { |
||||
|
height: 34px; |
||||
|
line-height: 34px; |
||||
|
.display_flex; |
||||
|
flex-direction: row; |
||||
|
flex-wrap: nowrap; |
||||
|
justify-content: space-between; |
||||
|
margin-bottom: 4px; |
||||
|
margin-top: 6px; |
||||
|
padding-left: 6px; |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
ul > li > a { |
||||
|
color: #0076f6; |
||||
|
} |
||||
|
|
||||
|
ul > li > .title { |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
width: 100%; |
||||
|
|
||||
|
.time { |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
|
||||
|
.title_left, |
||||
|
.title_right { |
||||
|
flex: 0 1 auto; |
||||
|
white-space: nowrap; |
||||
|
} |
||||
|
|
||||
|
.title_center { |
||||
|
flex: 1; |
||||
|
min-width: 0; |
||||
|
height: 40px; |
||||
|
padding: 0 10px; |
||||
|
|
||||
|
span { |
||||
|
display: inline-block; |
||||
|
width: 100%; |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
white-space: nowrap; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
ul > li > .number { |
||||
|
height: 34px; |
||||
|
width: 34px; |
||||
|
background: #fecc2f; |
||||
|
border-radius: 4px; |
||||
|
text-align: center; |
||||
|
justify-content: center; |
||||
|
color: #ffffff; |
||||
|
|
||||
|
span { |
||||
|
display: block; |
||||
|
height: 34px; |
||||
|
width: 34px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 912 B |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
@ -0,0 +1,30 @@ |
|||||
|
/** |
||||
|
* 列表查询通用样式,移动端自适应 |
||||
|
*/ |
||||
|
.search{ |
||||
|
margin-bottom: 54px; |
||||
|
} |
||||
|
.fold{ |
||||
|
width: calc(100% - 216px); |
||||
|
display: inline-block |
||||
|
} |
||||
|
.operator{ |
||||
|
margin-bottom: 18px; |
||||
|
} |
||||
|
@media screen and (max-width: 900px) { |
||||
|
.fold { |
||||
|
width: 100%; |
||||
|
} |
||||
|
} |
||||
|
.operator button { |
||||
|
margin-right: 5px; |
||||
|
} |
||||
|
i { |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
.trcolor{ |
||||
|
background-color: rgba(255, 192, 203, 0.31); |
||||
|
color:red; |
||||
|
} |
||||
|
|
||||
|
|
||||
@ -0,0 +1,311 @@ |
|||||
|
///命名规范采用BEM CSS命名规范 |
||||
|
///author:tianxiu |
||||
|
/// |
||||
|
/* |
||||
|
|
||||
|
1. .block{} |
||||
|
2. .block__element{} |
||||
|
3. .block--modifier{} |
||||
|
.block 代表了更⾼级别的抽象或组件。 |
||||
|
.block__element 代表.block的后代,⽤于形成⼀个完整的.block的整体。 |
||||
|
.block--modifier代表.block的不同状态或不同版本 |
||||
|
|
||||
|
|
||||
|
.模块名-一级模块-二级模块.... |
||||
|
*/ |
||||
|
|
||||
|
/* |
||||
|
定义主题颜色 |
||||
|
定义主题字体 |
||||
|
定义主题大小字号 |
||||
|
lg:登录页面 |
||||
|
*/ |
||||
|
@import 'common.less'; |
||||
|
@lg-fant-family: @fant-family; |
||||
|
@lg-color-background: @theme-color-background; |
||||
|
@lg-color-border: @theme-color-border; |
||||
|
@lg-color_placeholder: @theme-color_placeholder; |
||||
|
/* 屏幕分辨率放大为 150 */ |
||||
|
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 120dpi) { |
||||
|
.lg-body { |
||||
|
transform: scale(0.665, 0.665); /* 缩放数值需要根据效果调试 */ |
||||
|
transform-origin: left top; |
||||
|
} |
||||
|
} |
||||
|
/* 屏幕分辨率放大为 125 */ |
||||
|
@media (-webkit-min-device-pixel-ratio: 1.25) { |
||||
|
.lg-body { |
||||
|
transform: scale(0.799, 0.799); |
||||
|
transform-origin: left top; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.lg-body { |
||||
|
font-family: @lg-fant-family; |
||||
|
.display_flex; |
||||
|
flex-direction: row; |
||||
|
height: 100% !important; |
||||
|
background-color: transparent; |
||||
|
justify-content: center; |
||||
|
|
||||
|
.user-layout-pic { |
||||
|
float: left; |
||||
|
width: 45%; |
||||
|
|
||||
|
img { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.user-layout-register { |
||||
|
width: 28px; |
||||
|
height: 76px; |
||||
|
background: @theme-color; |
||||
|
border-radius: 0 6px 6px 0; |
||||
|
margin-top: 30px; |
||||
|
padding-left: 7px; |
||||
|
padding-top: 2px; |
||||
|
|
||||
|
span { |
||||
|
width: 14px; |
||||
|
height: 68px; |
||||
|
font-size: 14px; |
||||
|
font-weight: 400; |
||||
|
text-align: left; |
||||
|
color: @lg-color-background; |
||||
|
line-height: 18px; |
||||
|
display: block; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.user-layout-opt { |
||||
|
z-index: 9999; |
||||
|
position: absolute; |
||||
|
width: 368px; |
||||
|
bottom: 119px; |
||||
|
} |
||||
|
|
||||
|
.user-layout-login { |
||||
|
height: 480px; |
||||
|
width: 448px; |
||||
|
float: right; |
||||
|
margin-left: percentage(130/1520); |
||||
|
margin-top: 15px; |
||||
|
padding-left: 40px; |
||||
|
padding-right: 40px; |
||||
|
background: @lg-color-background; |
||||
|
border-radius: 10px; |
||||
|
.box-shadow(0, 0, 20px, 0); |
||||
|
|
||||
|
.user-layout-title { |
||||
|
height: 84px; |
||||
|
line-height: 84px; |
||||
|
text-align: center; |
||||
|
|
||||
|
h1 { |
||||
|
font-size: 20px; |
||||
|
font-weight: 500; |
||||
|
text-align: center; |
||||
|
color: #333333; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.getCaptcha { |
||||
|
display: block; |
||||
|
width: 90%; |
||||
|
height: 48px; |
||||
|
font-size: 16px; |
||||
|
margin-top: 24px; |
||||
|
padding-left: 5px; |
||||
|
padding-right: 5px; |
||||
|
.border-soild(1px, solid, @theme-color); |
||||
|
color: @theme-color; |
||||
|
} |
||||
|
|
||||
|
.forge-password { |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
|
||||
|
button.login-button { |
||||
|
padding: 0 15px; |
||||
|
font-size: 18px; |
||||
|
height: 48px; |
||||
|
width: 100%; |
||||
|
background-color: @theme-color_active; |
||||
|
border-radius: 6px; |
||||
|
color: white; |
||||
|
margin-top: 10px; |
||||
|
// :active { |
||||
|
// background-color: @theme-color_active; |
||||
|
// } |
||||
|
} |
||||
|
|
||||
|
.user-login-other { |
||||
|
text-align: left; |
||||
|
margin-top: 24px; |
||||
|
line-height: 22px; |
||||
|
|
||||
|
.item-icon { |
||||
|
font-size: 24px; |
||||
|
color: rgba(0, 0, 0, 0.2); |
||||
|
margin-left: 16px; |
||||
|
vertical-align: middle; |
||||
|
cursor: pointer; |
||||
|
transition: color 0.3s; |
||||
|
|
||||
|
&:hover { |
||||
|
color: @theme-color_active; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.register { |
||||
|
float: right; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.ant-form-item { |
||||
|
border: 0; |
||||
|
} |
||||
|
.md-form { |
||||
|
.md-row { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
margin-bottom: 30px; |
||||
|
.md-form-item { |
||||
|
width: 100%; |
||||
|
.md-input__inner { |
||||
|
padding-left: 50px; |
||||
|
} |
||||
|
.md-input__prefix { |
||||
|
left: 10px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
form { |
||||
|
// height: 360px; |
||||
|
height: 320px; |
||||
|
border: 0; |
||||
|
background-color: @lg-color-background; |
||||
|
.md-form-item { |
||||
|
border: none; |
||||
|
} |
||||
|
.ant-form .ant-form-item { |
||||
|
background-color: @lg-color-background; |
||||
|
margin-top: 24px; |
||||
|
border: 0; |
||||
|
} |
||||
|
|
||||
|
.ant-input-affix-wrapper { |
||||
|
font-size: 22px; |
||||
|
} |
||||
|
|
||||
|
.ant-input-affix-wrapper .ant-input:not(:first-child) { |
||||
|
padding-left: 50px; |
||||
|
} |
||||
|
|
||||
|
input { |
||||
|
height: 48px; |
||||
|
background: @lg-color-background; |
||||
|
border: 1px solid @lg-color-border; |
||||
|
border-radius: 6px; |
||||
|
font-size: 22px; |
||||
|
// padding-left: 150px; |
||||
|
} |
||||
|
|
||||
|
::placeholder { |
||||
|
color: @lg-color_placeholder; |
||||
|
font-weight: 100 !important; |
||||
|
} |
||||
|
|
||||
|
input::placeholder > input::-webkit-input-placeholder > input::-moz-placeholder, |
||||
|
input:-moz-placeholder, |
||||
|
input:-ms-input-placeholder { |
||||
|
color: @lg-color_placeholder; |
||||
|
font-weight: 300 !important; |
||||
|
} |
||||
|
|
||||
|
img { |
||||
|
height: 48px; |
||||
|
// margin-top: 24px; |
||||
|
width: 90%; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.ant-tabs-bar { |
||||
|
position: absolute; |
||||
|
bottom: 0; |
||||
|
width: 368px; |
||||
|
z-index: 1; |
||||
|
font-size: 18px; |
||||
|
|
||||
|
.ant-tabs-tab-prev { |
||||
|
display: none; |
||||
|
width: 0; |
||||
|
} |
||||
|
|
||||
|
.ant-tabs-tab-next { |
||||
|
display: none; |
||||
|
width: 0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.ant-tabs-nav { |
||||
|
width: 368px; |
||||
|
} |
||||
|
|
||||
|
.ant-tabs-nav-container-scrolling { |
||||
|
padding-right: 0; |
||||
|
padding-left: 0; |
||||
|
width: 368px; |
||||
|
} |
||||
|
|
||||
|
.ant-tabs-nav-container { |
||||
|
font-size: 18px; |
||||
|
font-weight: 400; |
||||
|
color: #333333; |
||||
|
height: 50px; |
||||
|
background-color: @lg-color-background; |
||||
|
font-family: @lg-fant-family; |
||||
|
} |
||||
|
|
||||
|
.ant-tabs-nav .ant-tabs-tab { |
||||
|
position: relative; |
||||
|
width: 184px; |
||||
|
display: inline-block; |
||||
|
box-sizing: border-box; |
||||
|
margin: 0; |
||||
|
height: 100%; |
||||
|
text-decoration: none; |
||||
|
cursor: pointer; |
||||
|
transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.ant-btn-primary:hover, |
||||
|
.ant-btn-primary:focus { |
||||
|
background-color: @theme-color_active; |
||||
|
border-color: @theme-color_active; |
||||
|
} |
||||
|
} |
||||
|
// 美的 |
||||
|
.md-tabs__header.is-bottom { |
||||
|
.md-tabs__nav-scroll { |
||||
|
.md-tabs__nav.is-bottom { |
||||
|
width: 100%; |
||||
|
.md-tabs__active-bar.is-bottom { |
||||
|
width: 50%; |
||||
|
} |
||||
|
.md-tabs__item.is-bottom { |
||||
|
text-align: center; |
||||
|
width: 50%; |
||||
|
font-size: 18px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,164 @@ |
|||||
|
///命名规范采用BEM CSS命名规范 |
||||
|
///author:tianxiu |
||||
|
/// |
||||
|
/* |
||||
|
|
||||
|
1. .block{} |
||||
|
2. .block__element{} |
||||
|
3. .block--modifier{} |
||||
|
.block 代表了更⾼级别的抽象或组件。 |
||||
|
.block__element 代表.block的后代,⽤于形成⼀个完整的.block的整体。 |
||||
|
.block--modifier代表.block的不同状态或不同版本 |
||||
|
|
||||
|
|
||||
|
.模块名-一级模块-二级模块.... |
||||
|
*/ |
||||
|
|
||||
|
/* |
||||
|
定义主题颜色 |
||||
|
定义主题字体 |
||||
|
定义主题大小字号 |
||||
|
lg:登录页面 |
||||
|
*/ |
||||
|
@import "common.less"; |
||||
|
@tab-theme-color: @theme-color; |
||||
|
@tab-theme-color-dark: @theme-color-dark; |
||||
|
@tab-color-sider: #fff; |
||||
|
|
||||
|
.tab-box { |
||||
|
.display_flex; |
||||
|
position: fixed; |
||||
|
flex-direction: column; |
||||
|
height: 40px; |
||||
|
width: 100%; |
||||
|
background: #FFFFFF; |
||||
|
box-shadow: 0 2px 6px 0 rgba(0,0,0,0.06); |
||||
|
///tab 的样式 |
||||
|
.tab-layout-tabs, |
||||
|
.tab-layout-tabs.ant-tabs .ant-tabs-bar, |
||||
|
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container, |
||||
|
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab { |
||||
|
height: 40px !important; |
||||
|
background-color: #FFFFFF; |
||||
|
border-bottom: 1px solid #E8E8E8; |
||||
|
} |
||||
|
|
||||
|
.tab-layout-tabs.ant-tabs .ant-tabs-bar { |
||||
|
margin: 0; |
||||
|
} |
||||
|
|
||||
|
.ant-tabs-nav-scroll{ |
||||
|
padding-left: 20px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.box { |
||||
|
.display_flex; |
||||
|
position: relative; |
||||
|
flex-direction: column; |
||||
|
// background-color: @theme-color-container; |
||||
|
background-color: #FFFFFF; |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
* The following styles are auto-applied to elements with |
||||
|
* transition="page-transition" when their visibility is toggled |
||||
|
* by Vue.js. |
||||
|
* |
||||
|
* You can easily play with the page transition by editing |
||||
|
* these styles. |
||||
|
*/ |
||||
|
|
||||
|
.page-transition-enter { |
||||
|
opacity: 0; |
||||
|
} |
||||
|
|
||||
|
.page-transition-leave-active { |
||||
|
opacity: 0; |
||||
|
} |
||||
|
|
||||
|
.page-transition-enter .page-transition-container, |
||||
|
.page-transition-leave-active .page-transition-container { |
||||
|
-webkit-transform: scale(1.1); |
||||
|
transform: scale(1.1); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
///定义主题颜色 |
||||
|
|
||||
|
.ant-menu-dark, |
||||
|
.ant-menu-dark .ant-menu-sub { |
||||
|
color: @tab-color-sider !important; |
||||
|
background: @tab-theme-color !important; |
||||
|
font-weight: 400 !important; |
||||
|
font-size: 14px !important; |
||||
|
} |
||||
|
|
||||
|
// 隐藏第一个路由(就是首页)底部的白色样式 |
||||
|
// .ant-menu.ant-menu-root>.ant-menu-item:first-child { |
||||
|
// width: 90%; |
||||
|
// height: 46px; |
||||
|
// line-height: 46px; |
||||
|
// background: #ffffff; |
||||
|
// border-radius: 6px; |
||||
|
// color: @tab-theme-color !important; |
||||
|
// margin-left: 5%; |
||||
|
// margin-right: 5%; |
||||
|
|
||||
|
// .anticon, |
||||
|
// .anticon+span { |
||||
|
// color: @tab-theme-color !important; |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// .ant-menu.ant-menu-root.ant-menu-dark>.ant-menu-item:first-child.ant-menu-item-selected>a, |
||||
|
// .ant-menu.ant-menu-root.ant-menu-dark>.ant-menu-item:first-child.ant-menu-item-selected>a:hover, |
||||
|
// .ant-menu.ant-menu-root.ant-menu-dark>.ant-menu-item:first-child>a, |
||||
|
// .ant-menu.ant-menu-root.ant-menu-dark>.ant-menu-item:first-child>a:hover { |
||||
|
// color: @tab-theme-color !important; |
||||
|
// height: 46px; |
||||
|
// line-height: 46px; |
||||
|
// background: #ffffff; |
||||
|
// border-radius: 6px; |
||||
|
// color: @tab-theme-color !important; |
||||
|
// } |
||||
|
|
||||
|
.ant-menu-item:not(:first-child) { |
||||
|
|
||||
|
.ant-menu-item-selected .anticon, |
||||
|
.ant-menu-item-selected .anticon+span { |
||||
|
color: @tab-color-sider !important; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.ant-menu-item:first-child { |
||||
|
|
||||
|
.ant-menu-item-selected .anticon, |
||||
|
.ant-menu-item-selected .anticon+span { |
||||
|
color: @tab-theme-color !important; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.ant-menu-dark, |
||||
|
.ant-menu-dark .ant-menu-sub, |
||||
|
.ant-menu-dark .ant-menu-item, |
||||
|
.ant-menu-dark .ant-menu-item-group-title, |
||||
|
.ant-menu-dark .ant-menu-item>a { |
||||
|
color: @tab-color-sider !important; |
||||
|
} |
||||
|
|
||||
|
.ant-menu-dark .ant-menu-inline.ant-menu-sub { |
||||
|
background: @tab-theme-color-dark !important; |
||||
|
-webkit-box-shadow: 0 2px 8px rgb(0 0 0 / 45%) inset; |
||||
|
box-shadow: 0 2px 8px rgb(0 0 0 / 45%) inset; |
||||
|
color: @tab-color-sider !important; |
||||
|
} |
||||
|
|
||||
|
.ant-layout-sider { |
||||
|
background: @tab-theme-color !important; |
||||
|
} |
||||
|
|
||||
|
.sider .logo { |
||||
|
background: @tab-theme-color !important; |
||||
|
} |
||||
@ -0,0 +1,158 @@ |
|||||
|
///命名规范采用BEM CSS命名规范 |
||||
|
///author:tianxiu |
||||
|
/// |
||||
|
/* |
||||
|
|
||||
|
1. .block{} |
||||
|
2. .block__element{} |
||||
|
3. .block--modifier{} |
||||
|
.block 代表了更⾼级别的抽象或组件。 |
||||
|
.block__element 代表.block的后代,⽤于形成⼀个完整的.block的整体。 |
||||
|
.block--modifier代表.block的不同状态或不同版本 |
||||
|
|
||||
|
|
||||
|
.模块名-一级模块-二级模块.... |
||||
|
*/ |
||||
|
|
||||
|
/* |
||||
|
定义主题颜色 |
||||
|
定义主题字体 |
||||
|
定义主题大小字号 |
||||
|
lg:登录页面 |
||||
|
*/ |
||||
|
@import "common.less"; |
||||
|
|
||||
|
#userLayout.user-layout-wrapper { |
||||
|
font-family: @fant-family; |
||||
|
height: 100%; |
||||
|
width: 100%; |
||||
|
|
||||
|
.container { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
background-color: #f0f2f5; |
||||
|
background-image: url('./images/login/login-bg-01.png'); |
||||
|
background-repeat: round; |
||||
|
background-size: cover; |
||||
|
position: relative; |
||||
|
|
||||
|
a { |
||||
|
text-decoration: none; |
||||
|
} |
||||
|
|
||||
|
.top { |
||||
|
.header { |
||||
|
height: 180px; |
||||
|
line-height: 180px; |
||||
|
background-image: url('./images/login/login-ele-01.png'); |
||||
|
background-position-x: 86px; |
||||
|
background-repeat: no-repeat; |
||||
|
|
||||
|
.header_title { |
||||
|
display: block; |
||||
|
font-size: 24px; |
||||
|
font-family: fangsong; |
||||
|
margin-left: 200px; |
||||
|
height: 180px; |
||||
|
line-height: 100px; |
||||
|
width: 650px; |
||||
|
.logo_title{ |
||||
|
display: block; |
||||
|
font-size: 28px; |
||||
|
height: 80px; |
||||
|
line-height: 80px; |
||||
|
width: 70px; |
||||
|
float: left; |
||||
|
text-align: left; |
||||
|
font-family: fantasy; |
||||
|
font-weight: 400; |
||||
|
} |
||||
|
.logo_sys{ |
||||
|
display: block; |
||||
|
margin-left: 4px; |
||||
|
height: 80px; |
||||
|
line-height: 80px; |
||||
|
font-size: 24px; |
||||
|
float: left; |
||||
|
width: 560px; |
||||
|
|
||||
|
font-weight: 800; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.badge { |
||||
|
position: absolute; |
||||
|
display: inline-block; |
||||
|
line-height: 1; |
||||
|
vertical-align: middle; |
||||
|
margin-left: -12px; |
||||
|
margin-top: -10px; |
||||
|
opacity: 0.8; |
||||
|
} |
||||
|
|
||||
|
.logo { |
||||
|
height: 32px; |
||||
|
width: 128px; |
||||
|
vertical-align: top; |
||||
|
margin-left: 200px; |
||||
|
margin-top: 40px; |
||||
|
border-style: none; |
||||
|
} |
||||
|
|
||||
|
.title { |
||||
|
font-size: 33px; |
||||
|
color: rgba(0, 0, 0, .85); |
||||
|
font-family: @fant-family; |
||||
|
font-weight: 600; |
||||
|
position: relative; |
||||
|
top: 2px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.desc { |
||||
|
font-size: 14px; |
||||
|
color: rgba(0, 0, 0, 0.45); |
||||
|
margin-top: 12px; |
||||
|
margin-bottom: 40px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.main { |
||||
|
min-width: 1520px; |
||||
|
width: 100%; |
||||
|
height: 50%; |
||||
|
min-height: 528px; |
||||
|
top: 25%; |
||||
|
position: absolute; |
||||
|
left: 0; |
||||
|
} |
||||
|
|
||||
|
.footer { |
||||
|
position: absolute; |
||||
|
width: 100%; |
||||
|
bottom: 0; |
||||
|
padding: 0 16px; |
||||
|
margin: 48px 0 24px; |
||||
|
text-align: center; |
||||
|
|
||||
|
.links { |
||||
|
margin-bottom: 8px; |
||||
|
font-size: 16px; |
||||
|
|
||||
|
a { |
||||
|
color: rgba(0, 0, 0, 0.45); |
||||
|
transition: all 0.3s; |
||||
|
|
||||
|
&:not(:last-child) { |
||||
|
margin-right: 40px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.copyright { |
||||
|
color: rgba(0, 0, 0, 0.45); |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,244 @@ |
|||||
|
<template> |
||||
|
<j-modal |
||||
|
:title="title" |
||||
|
:width="width" |
||||
|
:visible="visible" |
||||
|
:ok-button-props="{ class: { 'jee-hidden': true } }" |
||||
|
@cancel="close" |
||||
|
:containerSelector="'.WmdCard'" |
||||
|
switch-fullscreen |
||||
|
cancel-text="关闭" |
||||
|
> |
||||
|
<!-- 内容区域 --> |
||||
|
<div class="user-select-modal-content"> |
||||
|
<!-- 左侧搜索与结果区域 --> |
||||
|
<div class="left-area"> |
||||
|
<div class="search-bar"> |
||||
|
<w-input v-model.trim="searchVal" :placeholder="placeholder" @keyup.enter.native="handleSearch" /> |
||||
|
<w-button type="primary" icon="search" @click="handleSearch">搜索</w-button> |
||||
|
</div> |
||||
|
<a-spin class="spin-loading" :spinning="loading"> |
||||
|
<div class="result-list" v-if="searchResult.length > 0"> |
||||
|
<div v-for="item in searchResult" :key="item.userCode" class="result-item"> |
||||
|
<w-checkbox v-model="item.checked" @change="() => handleItemCheck(item)"> |
||||
|
{{ `${item.userCode}-${item.userName}` }} |
||||
|
</w-checkbox> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div v-else class="empty-tip">无信息</div> |
||||
|
</a-spin> |
||||
|
</div> |
||||
|
<!-- 右侧已选区域 --> |
||||
|
<div class="right-area"> |
||||
|
<div class="selected-header"> |
||||
|
已选 {{ selectedItems.length }}/{{ maxSelectNum }} |
||||
|
<a @click="clearSelected" class="clear-btn">清空</a> |
||||
|
</div> |
||||
|
<div class="selected-list" v-if="selectedItems.length > 0"> |
||||
|
<div v-for="item in selectedItems" :key="item.userCode" class="selected-item"> |
||||
|
{{ `${item.userCode}-${item.userName}` }} |
||||
|
<a class="delete-btn" @click="handleDeleteSelected(item)"> 删除 </a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<template slot="footer"> |
||||
|
<w-button @click="close"> 关闭 </w-button> |
||||
|
<w-button @click="handleOk" type="primary"> 确认 </w-button> |
||||
|
</template> |
||||
|
</j-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { getAction } from '@/api/manage'; |
||||
|
export default { |
||||
|
name: 'UserSelectModal', |
||||
|
components: {}, |
||||
|
props: { |
||||
|
// 接收父组件已选中的数据 |
||||
|
initialSelected: { |
||||
|
type: Array, |
||||
|
default: () => [], |
||||
|
}, |
||||
|
placeholder: { |
||||
|
type: String, |
||||
|
default: '支持多个关键字搜索,空格隔开', |
||||
|
}, |
||||
|
maxSelectNum: { |
||||
|
type: Number, |
||||
|
default: 1, |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
title: '选择人员', |
||||
|
width: 800, |
||||
|
visible: false, |
||||
|
loading: false, |
||||
|
searchVal: '', |
||||
|
searchResult: [], |
||||
|
selectedItems: [], |
||||
|
}; |
||||
|
}, |
||||
|
methods: { |
||||
|
// 打开弹窗时初始化已选数据 |
||||
|
open() { |
||||
|
this.visible = true; |
||||
|
// 同步父组件已选中的数据到弹窗的已选列表 |
||||
|
this.selectedItems = [...this.initialSelected]; |
||||
|
// 如果有搜索结果,同步勾选状态(避免已有选中项在弹窗中未勾选) |
||||
|
this.syncCheckedStatus(); |
||||
|
}, |
||||
|
// 同步左侧搜索结果的勾选状态(与已选列表匹配) |
||||
|
syncCheckedStatus() { |
||||
|
if (!this.searchResult.length) { |
||||
|
return; |
||||
|
} |
||||
|
this.searchResult.forEach((item) => { |
||||
|
// 检查当前项是否在已选列表中,同步勾选状态 |
||||
|
item.checked = this.selectedItems.some((selected) => selected.userCode === item.userCode); |
||||
|
}); |
||||
|
}, |
||||
|
close() { |
||||
|
this.visible = false; |
||||
|
this.searchVal = ''; |
||||
|
this.searchResult = []; |
||||
|
}, |
||||
|
async handleSearch() { |
||||
|
if (!this.searchVal) { |
||||
|
this.searchResult = []; |
||||
|
return; |
||||
|
} |
||||
|
this.loading = true; |
||||
|
const res = await getAction(process.env.VUE_APP_API_AUTH + '/userInfos', { |
||||
|
queryParam: this.searchVal, |
||||
|
}); |
||||
|
if (res.code === '0') { |
||||
|
this.searchResult = res.data.list; |
||||
|
// 搜索完成后同步勾选状态(匹配已选列表) |
||||
|
this.syncCheckedStatus(); |
||||
|
} else { |
||||
|
this.searchResult = []; |
||||
|
this.$message.warning(res.msg || '获取数据失败'); |
||||
|
} |
||||
|
|
||||
|
this.loading = false; |
||||
|
}, |
||||
|
handleItemCheck(item) { |
||||
|
if (item.checked) { |
||||
|
if (this.selectedItems.length >= this.maxSelectNum) { |
||||
|
item.checked = false; |
||||
|
this.$message.warning(`最多只能选择${this.maxSelectNum}项`); |
||||
|
return; |
||||
|
} |
||||
|
this.selectedItems.push({ ...item }); |
||||
|
} else { |
||||
|
const index = this.selectedItems.findIndex((selectedItem) => selectedItem.userCode === item.userCode); |
||||
|
if (index !== -1) { |
||||
|
this.selectedItems.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
// 处理已选列表中单项删除 |
||||
|
handleDeleteSelected(item) { |
||||
|
// 从已选数组中移除 |
||||
|
const index = this.selectedItems.findIndex((selectedItem) => selectedItem.userCode === item.userCode); |
||||
|
if (index !== -1) { |
||||
|
this.selectedItems.splice(index, 1); |
||||
|
} |
||||
|
// 同时取消左侧对应项的勾选状态 |
||||
|
const resultItem = this.searchResult.find((resultItem) => resultItem.userCode === item.userCode); |
||||
|
if (resultItem) { |
||||
|
resultItem.checked = false; |
||||
|
} |
||||
|
}, |
||||
|
clearSelected() { |
||||
|
this.selectedItems = []; |
||||
|
this.searchResult.forEach((item) => { |
||||
|
item.checked = false; |
||||
|
}); |
||||
|
}, |
||||
|
handleOk() { |
||||
|
// 将选中数据同步到AppprovalUserSelect组件 |
||||
|
this.$emit('select-confirm', this.selectedItems); |
||||
|
this.close(); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="less"> |
||||
|
.user-select-modal-content { |
||||
|
display: flex; |
||||
|
height: 400px; |
||||
|
.left-area, |
||||
|
.right-area { |
||||
|
border: 1px solid #e8e8e8; |
||||
|
height: 100%; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
.left-area { |
||||
|
flex: 3; |
||||
|
.search-bar { |
||||
|
padding: 10px; |
||||
|
border-bottom: 1px solid #e8e8e8; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.spin-loading { |
||||
|
width: 100%; |
||||
|
height: calc(100% - 50px); |
||||
|
.ant-spin-container { |
||||
|
height: 100%; |
||||
|
} |
||||
|
.result-list { |
||||
|
height: 100%; |
||||
|
overflow-y: auto; |
||||
|
.result-item { |
||||
|
padding: 10px; |
||||
|
cursor: pointer; |
||||
|
&:hover { |
||||
|
background-color: #f5f5f5; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.empty-tip { |
||||
|
height: calc(100% - 50px); |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
color: #cccccc; |
||||
|
} |
||||
|
} |
||||
|
.right-area { |
||||
|
flex: 2; |
||||
|
margin-left: 10px; |
||||
|
.selected-header { |
||||
|
padding: 10px; |
||||
|
border-bottom: 1px solid #e8e8e8; |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
.clear-btn { |
||||
|
color: #1890ff; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
.selected-list { |
||||
|
height: calc(100% - 50px); |
||||
|
overflow-y: auto; |
||||
|
.selected-item { |
||||
|
padding: 10px; |
||||
|
border-bottom: 1px solid #e8e8e8; |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
.delete-btn { |
||||
|
color: #f5222d; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,270 @@ |
|||||
|
<template> |
||||
|
<div class="personnel-selector"> |
||||
|
<div class="selector-wrapper"> |
||||
|
<md-select |
||||
|
v-model="selectedCodes" |
||||
|
remote |
||||
|
multiple |
||||
|
filterable |
||||
|
collapse-tags |
||||
|
:placeholder="placeholder" |
||||
|
:disabled="disabled" |
||||
|
:remote-method="handleRemoteSearch" |
||||
|
:loading="loading" |
||||
|
@change="handleSelectChange" |
||||
|
:inputtranslatevalue="selectedCodes" |
||||
|
> |
||||
|
<md-option |
||||
|
v-for="item in options" |
||||
|
:key="item.userCode" |
||||
|
:label="`${item.userCode}-${item.userName}`" |
||||
|
:value="item.userCode" |
||||
|
/> |
||||
|
</md-select> |
||||
|
<a-icon class="user-icon" type="user" @click="openUserSelectModal()" :disabled="disabled" /> |
||||
|
</div> |
||||
|
<user-select-modal |
||||
|
:placeholder="placeholder" |
||||
|
:max-select-num="maxSelectNum" |
||||
|
:initial-selected="selectedItems" |
||||
|
@select-confirm="handleSelectConfirm" |
||||
|
ref="userSelectModal" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import UserSelectModal from './UserSelectModal.vue'; |
||||
|
import { getAction, postAction } from '@/api/manage'; |
||||
|
export default { |
||||
|
name: 'AppprovalUserSelect', |
||||
|
components: { UserSelectModal }, |
||||
|
props: { |
||||
|
// 父组件传入的选中值(逗号分隔字符串) |
||||
|
value: { |
||||
|
type: String, |
||||
|
default: '', |
||||
|
}, |
||||
|
// 占位符文本 |
||||
|
placeholder: { |
||||
|
type: String, |
||||
|
default: '请输入关键词搜索', |
||||
|
}, |
||||
|
// 是否禁用 |
||||
|
disabled: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
// 最大选择数量 |
||||
|
maxSelectNum: { |
||||
|
type: Number, |
||||
|
default: 1, |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
options: [], // 下拉选项列表(随搜索变化) |
||||
|
selectedCodes: [], // 选中的code数组(与父组件同步) |
||||
|
selectedItems: [], // 存储选中项的完整数据对象(核心新增) |
||||
|
loading: false, |
||||
|
}; |
||||
|
}, |
||||
|
watch: { |
||||
|
// 监听父组件传入的value变化,同步到组件内部 |
||||
|
value: { |
||||
|
immediate: true, |
||||
|
handler(newVal) { |
||||
|
// 统一转为数组(空值则为空数组) |
||||
|
const codes = newVal ? newVal.split(',') : []; |
||||
|
|
||||
|
// 关键判断:只有当父组件传入的codes与当前selectedCodes不一致时,才执行后续逻辑 |
||||
|
const isEqual = this.arrayEqual(codes, this.selectedCodes); |
||||
|
// 一致则直接返回,避免重复操作 |
||||
|
if (isEqual) { |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
// 同步选中的code数组 |
||||
|
this.selectedCodes = codes; |
||||
|
// 初始化时同步选中项完整数据 |
||||
|
if (codes.length) { |
||||
|
this.fetchUserInfoByCodes(codes); |
||||
|
} else { |
||||
|
this.selectedItems = []; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
// 监听组件内部选中值变化,同步到父组件(双向绑定) |
||||
|
selectedCodes(newVal) { |
||||
|
this.$emit('input', newVal.join(',')); |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
/** |
||||
|
* 远程搜索处理函数 |
||||
|
* @param {String} query 搜索关键词 |
||||
|
*/ |
||||
|
async handleRemoteSearch(query) { |
||||
|
// 去除前后空格 |
||||
|
const trimmedQuery = query?.trim() || ''; |
||||
|
// 若处理后为空,或长度小于3,则不执行后续逻辑 |
||||
|
if (!trimmedQuery || trimmedQuery.length < 3) { |
||||
|
this.options = []; |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
this.loading = true; |
||||
|
const res = await getAction(process.env.VUE_APP_API_AUTH + '/userInfos', { |
||||
|
queryParam: trimmedQuery, |
||||
|
}); |
||||
|
|
||||
|
if (res.code === '0') { |
||||
|
this.options = res.data.list; |
||||
|
// 搜索后更新选中项:确保已选项在新options中时数据同步 |
||||
|
this.syncSelectedItems(); |
||||
|
} else { |
||||
|
this.options = []; |
||||
|
this.$message.warning(res.msg || '获取数据失败'); |
||||
|
} |
||||
|
this.loading = false; |
||||
|
}, |
||||
|
|
||||
|
// 辅助方法:判断两个数组是否完全相等(顺序无关,值相等即可) |
||||
|
arrayEqual(arr1, arr2) { |
||||
|
if (arr1.length !== arr2.length) { |
||||
|
return false; |
||||
|
} |
||||
|
// 排序后对比字符串(避免顺序不同导致误判) |
||||
|
return arr1.sort().join(',') === arr2.sort().join(','); |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 根据用户code数组获取完整信息(用于回显) |
||||
|
* @param {Array} codes 用户code数组 |
||||
|
*/ |
||||
|
async fetchUserInfoByCodes(codes) { |
||||
|
this.loading = true; |
||||
|
|
||||
|
const res = await postAction(process.env.VUE_APP_API_AUTH + '/userInfosExt', { |
||||
|
userCodes: codes, |
||||
|
}); |
||||
|
|
||||
|
if (res.code === '0') { |
||||
|
// 初始化选中项完整数据 |
||||
|
this.selectedItems = res.data.list; |
||||
|
// 将回显数据添加到当前选项中(确保显示正常) |
||||
|
res.data.list.forEach((item) => { |
||||
|
const exists = this.options.some((option) => option.userCode === item.userCode); |
||||
|
if (!exists) { |
||||
|
this.options.push(item); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
this.selectedItems = []; |
||||
|
this.$message.error(res.msg || '获取默认数据失败'); |
||||
|
} |
||||
|
|
||||
|
// 默认值时触发Change事件 |
||||
|
this.handleSelectChange(); |
||||
|
|
||||
|
this.loading = false; |
||||
|
}, |
||||
|
|
||||
|
/** 同步选中项完整数据(核心方法) */ |
||||
|
syncSelectedItems() { |
||||
|
// 1. 过滤出当前已选中但不在selectedItems中的新项(从options中取) |
||||
|
const newItems = this.selectedCodes |
||||
|
.filter((code) => !this.selectedItems.some((item) => item.userCode === code)) |
||||
|
.map((code) => this.options.find((item) => item.userCode === code)) |
||||
|
.filter(Boolean); // 过滤无效项 |
||||
|
|
||||
|
// 2. 保留已在selectedItems中且仍被选中的项 |
||||
|
const retainedItems = this.selectedItems.filter((item) => this.selectedCodes.includes(item.userCode)); |
||||
|
|
||||
|
// 3. 合并新项和保留项,得到最新的选中项完整数据 |
||||
|
this.selectedItems = [...retainedItems, ...newItems]; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 处理选择变化 |
||||
|
*/ |
||||
|
handleSelectChange() { |
||||
|
// 检查是否超出最大选择数量 |
||||
|
if (this.selectedCodes.length > this.maxSelectNum) { |
||||
|
// 截断数组保留前maxSelectNum项 |
||||
|
this.selectedCodes = this.selectedCodes.slice(0, this.maxSelectNum); |
||||
|
this.$message.warning('超出了最大选中数量'); |
||||
|
} |
||||
|
|
||||
|
// 同步选中项完整数据 |
||||
|
this.syncSelectedItems(); |
||||
|
|
||||
|
// 触发change事件,返回最新的选中项完整数据数组 用 $nextTick 延迟触发 change,等待 input 事件的异步更新完成 |
||||
|
this.$nextTick(() => { |
||||
|
this.$emit('change', [...this.selectedItems]); |
||||
|
}); |
||||
|
}, |
||||
|
/* 打开弹窗 */ |
||||
|
openUserSelectModal() { |
||||
|
if (!this.disabled) { |
||||
|
this.$refs.userSelectModal.open(); |
||||
|
} |
||||
|
}, |
||||
|
handleSelectConfirm(selectedItems) { |
||||
|
// 处理从弹窗回传的选中数据,更新自身selectedCodes和selectedItems等 |
||||
|
this.selectedCodes = selectedItems.map((item) => item.userCode); |
||||
|
this.selectedItems = selectedItems; |
||||
|
this.options.push(...selectedItems); |
||||
|
// 用 $nextTick 延迟触发 change,等待 input 事件的异步更新完成 |
||||
|
this.$nextTick(() => { |
||||
|
this.$emit('change', [...this.selectedItems]); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="less"> |
||||
|
.personnel-selector { |
||||
|
width: 100%; |
||||
|
.selector-wrapper { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
.md-select { |
||||
|
width: calc(100% - 26px); |
||||
|
height: 100% !important; |
||||
|
} |
||||
|
.user-icon { |
||||
|
border: 1px solid #c4cdd5; |
||||
|
padding: 5px; |
||||
|
height: 26px; |
||||
|
width: 26px; |
||||
|
text-align: center; |
||||
|
border-left: none; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
.md-select__tags { |
||||
|
height: 26px !important; |
||||
|
max-width: none !important; |
||||
|
.md-tag { |
||||
|
font-size: 12px !important; |
||||
|
height: 20px !important; |
||||
|
max-width: none !important; |
||||
|
.md-select__tags-text { |
||||
|
max-width: none !important; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.md-input__inner { |
||||
|
height: 26px !important; |
||||
|
padding-right: 0 !important; |
||||
|
} |
||||
|
.md-select__input { |
||||
|
padding-left: 2px !important; |
||||
|
margin-left: 0 !important; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,148 @@ |
|||||
|
<template> |
||||
|
<j-modal class="noBorder" :title="title" :width="width" :visible="visible" @cancel="handleCancel"> |
||||
|
<template slot="footer"> |
||||
|
<w-button @click="handleCancel">取消</w-button> |
||||
|
<w-button type="primary" @click="handleOk">确定</w-button> |
||||
|
</template> |
||||
|
<a-spin :spinning="loading"> |
||||
|
<div> |
||||
|
<div v-if="['handler_communicate', 'handler_commission'].includes(flag)" class="passLabel">处理人</div> |
||||
|
|
||||
|
<AppprovalUserSelect style="margin-bottom: 20px;" v-model="operator" @change="getOperator" |
||||
|
v-if="['handler_communicate', 'handler_commission'].includes(flag)" /> |
||||
|
<!-- @change=" |
||||
|
(data) => { |
||||
|
currentByName = (data && data.length > 0) ? data[0].userName : '' |
||||
|
}" --> |
||||
|
<!-- <w-input style="margin-bottom: 20px;" v-model="operator" |
||||
|
v-if="['handler_communicate', 'handler_commission'].includes(flag)" placeholder="请输入关键字" /> --> |
||||
|
|
||||
|
<div class="passLabel"> |
||||
|
<span class="required" |
||||
|
v-if="['handler_communicate', 'handler_refuse', 'handler_abandon'].includes(flag)">*</span> |
||||
|
处理意见 |
||||
|
<span class="required_text" |
||||
|
v-if="['handler_communicate', 'handler_refuse', 'handler_abandon'].includes(flag)">(必填)</span> |
||||
|
</div> |
||||
|
<w-input style="margin-bottom: 20px;" v-model="remark" type="textarea" :rows="3" /> |
||||
|
<div v-if="flag === 'handler_refuse'"> |
||||
|
<div class="passLabel"> |
||||
|
驳回到 |
||||
|
</div> |
||||
|
<md-select v-model="node"> |
||||
|
<md-option v-for="item in refuseNodeList" :key="item.nodeId" :value="item.nodeId" |
||||
|
:label="item.nodeName" /> |
||||
|
</md-select> |
||||
|
<div> |
||||
|
<md-checkbox v-model="refusePassedToThisNode">重新提交后直接返回本节点</md-checkbox> |
||||
|
</div> |
||||
|
<div> |
||||
|
<md-checkbox v-if="refusePassedToThisNode" |
||||
|
v-model="refusePassedToAllApprover">返回后该节点人员默认全部重审</md-checkbox> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</a-spin> |
||||
|
</j-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import AppprovalUserSelect from '@/components/AppprovalUserSelect/index' |
||||
|
export default { |
||||
|
name: "passModal", |
||||
|
components: { |
||||
|
AppprovalUserSelect |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
visible: false, |
||||
|
width: 500, |
||||
|
title: '', |
||||
|
flag: '', |
||||
|
remark: '同意', |
||||
|
operator: '', |
||||
|
node: "", |
||||
|
refusePassedToThisNode: false, |
||||
|
refusePassedToAllApprover: false, |
||||
|
refuseNodeList: [], |
||||
|
loading: false, |
||||
|
operatorName:'', |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
}, |
||||
|
methods: { |
||||
|
show(obj) { |
||||
|
this.flag = obj.flag |
||||
|
this.title = obj.title |
||||
|
this.refuseNodeList = obj.refuseNodeList || [] |
||||
|
if (this.refuseNodeList.length) { |
||||
|
this.node = this.refuseNodeList[0].nodeId |
||||
|
} |
||||
|
if (this.flag === 'draft_submit') { |
||||
|
this.remark = '同意' |
||||
|
} |
||||
|
this.visible = true |
||||
|
}, |
||||
|
getOperator(data){ |
||||
|
if (data && data.length > 0) { |
||||
|
this.operatorName = data[0].userName; |
||||
|
} else { |
||||
|
this.operatorName = ''; |
||||
|
} |
||||
|
}, |
||||
|
handleCancel() { |
||||
|
this.remark = '' |
||||
|
this.visible = false |
||||
|
}, |
||||
|
handleOk() { |
||||
|
if (this.flag === 'handler_refuse' && !this.node) { |
||||
|
return this.$message.error('请选择驳回节点') |
||||
|
} |
||||
|
if (['handler_communicate', 'handler_commission'].includes(this.flag) && !this.operator) { |
||||
|
this.$message.error('处理人必选') |
||||
|
return |
||||
|
} |
||||
|
this.loading = true |
||||
|
this.$emit('ok', { |
||||
|
remark: this.remark, |
||||
|
operator: this.operator, |
||||
|
operatorName: this.operatorName, |
||||
|
node: this.node, |
||||
|
refusePassedToThisNode: this.refusePassedToThisNode, |
||||
|
refusePassedToAllApprover: this.refusePassedToAllApprover, |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="less"> |
||||
|
.noBorder /deep/ .ant-modal-content { |
||||
|
.ant-modal-header { |
||||
|
border: none; |
||||
|
|
||||
|
.leftTitle { |
||||
|
padding: 0 8px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.passLabel { |
||||
|
margin-bottom: 10px; |
||||
|
|
||||
|
.required { |
||||
|
color: red; |
||||
|
} |
||||
|
|
||||
|
.required_text { |
||||
|
font-size: 12px; |
||||
|
color: #cccccc; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.ant-modal-footer { |
||||
|
border: none; |
||||
|
padding: 6px 8px; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,494 @@ |
|||||
|
<template> |
||||
|
<j-modal :title="title" :width="width" :visible="visible" @cancel="handleCancel" :footer="null"> |
||||
|
<!-- <template slot="footer"> |
||||
|
<w-button type="primary" @click="handleCancel">关闭</w-button> |
||||
|
</template> --> |
||||
|
<a-spin :spinning="loading"> |
||||
|
<div v-if="type === 'submit'"> |
||||
|
<div> |
||||
|
<div class="topArea"> |
||||
|
<div class="topArea_box"> |
||||
|
<div class="topArea_theme"> |
||||
|
<div class="topArea_theme_label"> |
||||
|
主题 |
||||
|
</div> |
||||
|
<w-input style="width: 300px;" v-model="themeTitle" /> |
||||
|
</div> |
||||
|
<div class="buttonArea"> |
||||
|
<w-button v-for="item in buttonList" :key="item.name" type="primary" |
||||
|
@click="openFlowModal(item)">{{ |
||||
|
item.name }}</w-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div> |
||||
|
<w-tabs v-model="activeKey" type="card" style="width: 100%" size="mini"> |
||||
|
<w-tab-pane tab="流程表格" key="flowTable" :forceRender="true"> |
||||
|
<a-table ref="table" :columns="submitColumns" :pagination="false" :dataSource="dataSource" |
||||
|
bordered size="middle" row-key="id" class="j-table-force-nowrap"> |
||||
|
<span slot="operator" slot-scope="text, record"> |
||||
|
<span v-if="record.currentNode">{{ record.handlerNames }} </span> |
||||
|
<!-- <w-input v-else-if="record.showType === 'input'" v-model="operator" /> --> |
||||
|
<AppprovalUserSelect v-model="operator" v-else-if="record.showType === 'input'" @change="getOperator" /> |
||||
|
<span v-else></span> |
||||
|
</span> |
||||
|
</a-table> |
||||
|
</w-tab-pane> |
||||
|
</w-tabs> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div v-if="type === 'audit'"> |
||||
|
<div> |
||||
|
<div class="topArea"> |
||||
|
<div class="topArea_box"> |
||||
|
<div class="topArea_theme"> |
||||
|
<!-- <div class="topArea_theme_label"> |
||||
|
主题 |
||||
|
</div> --> |
||||
|
<div> |
||||
|
{{ themeTitle }} |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="buttonArea"> |
||||
|
<!-- 遍历 --> |
||||
|
<w-button v-for="(item, index) in buttonList" :key="item.name" |
||||
|
:type="index === 0 ? 'primary' : ''" @click="openFlowModal(item)">{{ |
||||
|
item.name }}</w-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div> |
||||
|
<w-tabs v-model="activeKey" type="card" style="width: 100%" size="mini"> |
||||
|
<w-tab-pane tab="审批记录" key="auditRecord" :forceRender="true"> |
||||
|
<a-table ref="table" :columns="auditColumns" :pagination="false" :dataSource="dataSource" |
||||
|
bordered size="middle" row-key="id" class="j-table-force-nowrap" /> |
||||
|
</w-tab-pane> |
||||
|
<w-tab-pane tab="日志" key="auditLog" :forceRender="true"> |
||||
|
<a-table ref="table" :columns="auditColumns" :pagination="false" :dataSource="logList" |
||||
|
bordered size="middle" row-key="id" class="j-table-force-nowrap" /> |
||||
|
</w-tab-pane> |
||||
|
</w-tabs> |
||||
|
</div> |
||||
|
</div> |
||||
|
</a-spin> |
||||
|
<passModal ref="passModal" @ok="hanledOK" /> |
||||
|
</j-modal> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { postAction } from '@/api/manage' |
||||
|
import passModal from './components/passModal.vue' |
||||
|
import { mapGetters } from 'vuex' |
||||
|
import AppprovalUserSelect from '@/components/AppprovalUserSelect/index' |
||||
|
export default { |
||||
|
name: "ApprovalProgressTemplate", |
||||
|
components: { |
||||
|
passModal, |
||||
|
AppprovalUserSelect |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
loading: false, |
||||
|
type: 'submit', |
||||
|
activeKey: 'flowTable', |
||||
|
title: "提交", |
||||
|
width: 800, |
||||
|
visible: false, |
||||
|
themeTitle: '', |
||||
|
// 业务id |
||||
|
businessId: '', |
||||
|
// 流程id |
||||
|
flowId: "", |
||||
|
// 操作人 |
||||
|
operator: "", |
||||
|
operatorName:'', |
||||
|
submitColumns: [ |
||||
|
{ |
||||
|
title: '序号', |
||||
|
dataIndex: 'nodeId', |
||||
|
key: 'nodeId', |
||||
|
width: 60, |
||||
|
align: 'center', |
||||
|
}, |
||||
|
{ |
||||
|
title: '节点', |
||||
|
align: 'center', |
||||
|
dataIndex: 'nodeName', |
||||
|
ellipsis: true, |
||||
|
width: 200, |
||||
|
}, |
||||
|
{ |
||||
|
title: '处理人', |
||||
|
align: 'center', |
||||
|
width: 300, |
||||
|
dataIndex: 'operator', |
||||
|
ellipsis: true, |
||||
|
scopedSlots: { customRender: 'operator' }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '类型', |
||||
|
align: 'center', |
||||
|
dataIndex: 'processType', |
||||
|
ellipsis: true, |
||||
|
}, |
||||
|
], |
||||
|
auditColumns: [ |
||||
|
{ |
||||
|
title: '节点', |
||||
|
align: 'center', |
||||
|
dataIndex: 'fdNodeId', |
||||
|
ellipsis: true, |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '节点名称', |
||||
|
align: 'center', |
||||
|
dataIndex: 'fdNodeName', |
||||
|
ellipsis: true, |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '操作人', |
||||
|
align: 'center', |
||||
|
width: 100, |
||||
|
dataIndex: 'fdHandlerName', |
||||
|
ellipsis: true, |
||||
|
}, |
||||
|
{ |
||||
|
title: '操作', |
||||
|
align: 'center', |
||||
|
dataIndex: 'fdOperationName', |
||||
|
ellipsis: true, |
||||
|
width: 100, |
||||
|
}, |
||||
|
{ |
||||
|
title: '附件/审批意见', |
||||
|
align: 'center', |
||||
|
dataIndex: 'fdAuditeInfo', |
||||
|
ellipsis: true, |
||||
|
width: 200, |
||||
|
}, |
||||
|
// { |
||||
|
// title: '时间', |
||||
|
// align: 'center', |
||||
|
// dataIndex: 'time', |
||||
|
// ellipsis: true, |
||||
|
// width: 100, |
||||
|
// }, |
||||
|
], |
||||
|
dataSource: [], |
||||
|
url: { |
||||
|
// 流程初始化 |
||||
|
initProcess: '/flow/common/initProcess', |
||||
|
// 按钮list |
||||
|
optionList: '/flow/common/optionList', |
||||
|
// 流程list |
||||
|
flowList: '/flow/common/info/table', |
||||
|
// 提交 |
||||
|
submit: '/flow/common/submit', |
||||
|
// 审核 |
||||
|
approve: '/flow/common/approve', |
||||
|
// 审批记录 |
||||
|
auditeNote: '/flow/common/auditeNote', |
||||
|
// 补充审批记录 |
||||
|
auditeNoteSupply: '/flow/common/info/process', |
||||
|
// 日志 |
||||
|
logList: '/flow/common/log/list', |
||||
|
// 驳回节点列表 |
||||
|
refuseNode: '/flow/common/refuseNode/process', |
||||
|
}, |
||||
|
buttonList: [], |
||||
|
fdActivityType: '', |
||||
|
taskId: "", |
||||
|
nodeInstanceId: '', |
||||
|
refuseNodeList: [], |
||||
|
logList: [], |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
}, |
||||
|
methods: { |
||||
|
...mapGetters(['userInfo']), |
||||
|
async getFlowList() { |
||||
|
const res = await postAction(this.url.optionList, { |
||||
|
fdId: this.flowId, |
||||
|
loginName: this.userInfo().username, |
||||
|
}) |
||||
|
const resp = await postAction(this.url.flowList, { |
||||
|
fdId: this.flowId, |
||||
|
loginName: this.userInfo().username, |
||||
|
fdTemplateCode: 'mergerApply', |
||||
|
}) |
||||
|
if (res.success) { |
||||
|
if (res.result.length) { |
||||
|
this.buttonList = res.result[0].operationList.filter(item => !['沟通', '废弃'].includes(item.name)) |
||||
|
this.buttonList = this.buttonList.sort((a, b) => a.order - b.order) |
||||
|
} else { |
||||
|
this.buttonList = [] |
||||
|
} |
||||
|
} else { |
||||
|
this.$message.error(res.message) |
||||
|
this.loading = false |
||||
|
} |
||||
|
if (resp.success) { |
||||
|
this.dataSource = resp.result.processNodes || [] |
||||
|
const Index = this.dataSource.findIndex(item => !item.currentNode) |
||||
|
this.dataSource.forEach((item, index) => { |
||||
|
this.$set(item, 'showType', 'text') |
||||
|
if (Index === index) { |
||||
|
item.showType = 'input' |
||||
|
} |
||||
|
}) |
||||
|
} else { |
||||
|
this.$message.error(res.message) |
||||
|
this.loading = false |
||||
|
} |
||||
|
setTimeout(() => { |
||||
|
this.loading = false |
||||
|
}, 100); |
||||
|
}, |
||||
|
async getLogList() { |
||||
|
const res = await postAction(this.url.optionList, { |
||||
|
fdId: this.flowId, |
||||
|
loginName: this.userInfo().username, |
||||
|
}) |
||||
|
if (res.success) { |
||||
|
if (res.result.length) { |
||||
|
this.buttonList = res.result[0].operationList.filter(item => !['沟通', '废弃'].includes(item.name)) |
||||
|
this.buttonList = this.buttonList.sort((a, b) => a.order - b.order) |
||||
|
} else { |
||||
|
this.buttonList = [] |
||||
|
} |
||||
|
} else { |
||||
|
this.$message.error(res.message) |
||||
|
this.loading = false |
||||
|
} |
||||
|
const resp = await postAction(this.url.auditeNote, { |
||||
|
bsId: this.businessId, |
||||
|
fdId: this.flowId, |
||||
|
loginName: this.userInfo().username, |
||||
|
fdTemplateCode: 'mergerApply', |
||||
|
}) |
||||
|
const resppp = await postAction(this.url.logList, { |
||||
|
bsId: this.businessId, |
||||
|
fdId: this.flowId, |
||||
|
loginName: this.userInfo().username, |
||||
|
fdTemplateCode: 'mergerApply', |
||||
|
}) |
||||
|
this.logList = JSON.parse(resppp.result) |
||||
|
if (resp.success) { |
||||
|
this.dataSource = resp.result |
||||
|
const response = await postAction(this.url.auditeNoteSupply, { |
||||
|
// bsId: this.businessId, |
||||
|
fdId: this.flowId, |
||||
|
loginName: this.userInfo().username, |
||||
|
fdTemplateCode: 'mergerApply', |
||||
|
}) |
||||
|
if (response.result.currNodes && response.result.currNodes.length > 0) { |
||||
|
this.themeTitle = response.result.subject |
||||
|
this.nodeInstanceId = response.result.currNodes[0].nodeInstanceId |
||||
|
this.dataSource.push({ |
||||
|
fdNodeId: response.result.currNodeIds, |
||||
|
fdNodeName: response.result.currNodes[0].nodeName, |
||||
|
fdHandlerName: response.result.currNodes[0].handlers[0].name, |
||||
|
fdOperationName: response.result.fdStatus, |
||||
|
fdAuditeInfo: response.result.nodeDesc, |
||||
|
}) |
||||
|
} |
||||
|
console.log(response, 'response'); |
||||
|
} else { |
||||
|
this.$message.error(res.message) |
||||
|
this.loading = false |
||||
|
} |
||||
|
setTimeout(() => { |
||||
|
this.loading = false |
||||
|
}, 100); |
||||
|
}, |
||||
|
async openFlowModal(obj) { |
||||
|
this.operationFlag = obj.operationType |
||||
|
this.taskId = obj.operationTaskList[0].fdTaskId |
||||
|
this.fdActivityType = obj.operationTaskList[0].fdActivityType |
||||
|
let title = '' |
||||
|
if (this.operationFlag === 'handler_pass') { |
||||
|
title = '通过' |
||||
|
} else if (this.operationFlag === 'draft_submit') { |
||||
|
title = '提交' |
||||
|
if (!this.operator) { |
||||
|
return this.$message.info('请先选择处理人') |
||||
|
} |
||||
|
} else if (this.operationFlag === 'handler_commission') { |
||||
|
title = '转办' |
||||
|
} else if (this.operationFlag === 'handler_refuse') { |
||||
|
title = '驳回' |
||||
|
const res = await postAction(this.url.refuseNode, { |
||||
|
fdId: this.flowId, |
||||
|
loginName: this.userInfo().username, |
||||
|
nodeInstanceId: this.nodeInstanceId |
||||
|
}) |
||||
|
this.refuseNodeList = res.result |
||||
|
} else if (['draft_abandon', 'handler_abandon'].includes(this.operationFlag)) { |
||||
|
title = '废弃' |
||||
|
} else if (this.operationFlag === 'handler_communicate') { |
||||
|
title = '沟通' |
||||
|
} |
||||
|
this.$refs.passModal.show({ |
||||
|
title, |
||||
|
flag: this.operationFlag, |
||||
|
refuseNodeList: this.refuseNodeList |
||||
|
}) |
||||
|
}, |
||||
|
async show(obj) { |
||||
|
this.type = obj.type |
||||
|
this.activeKey = this.type === 'submit' ? 'flowTable' : 'auditRecord' |
||||
|
this.businessId = obj.id |
||||
|
this.visible = true |
||||
|
this.flowId = obj.flowId |
||||
|
this.operator = obj.defaultverifyBy || '' |
||||
|
this.loading = true |
||||
|
this.themeTitle = obj.title || '' |
||||
|
if (this.type === 'submit') { |
||||
|
if (this.flowId) { |
||||
|
this.getFlowList() |
||||
|
} else { |
||||
|
const res = await postAction(this.url.initProcess, { |
||||
|
fdTemplateCode: 'mergerApply', |
||||
|
loginName: this.userInfo().username, |
||||
|
id: this.businessId |
||||
|
}) |
||||
|
if (res.success) { |
||||
|
this.flowId = res.result |
||||
|
this.getFlowList() |
||||
|
} else { |
||||
|
this.$message.error(res.message) |
||||
|
this.loading = false |
||||
|
} |
||||
|
} |
||||
|
} else { |
||||
|
this.title = '审核' |
||||
|
this.flowId = obj.flowId |
||||
|
this.getLogList() |
||||
|
} |
||||
|
console.log(this.businessId, 'this.businessId'); |
||||
|
}, |
||||
|
handleCancel() { |
||||
|
this.visible = false |
||||
|
this.operator = '' |
||||
|
}, |
||||
|
getOperator(data){ |
||||
|
if(data && data.length > 0){ |
||||
|
this.operatorName = data[0].userName |
||||
|
}else{ |
||||
|
this.operatorName = '' |
||||
|
} |
||||
|
}, |
||||
|
async hanledOK(obj) { |
||||
|
// 提交 |
||||
|
if (this.operationFlag === 'draft_submit') { |
||||
|
const tableObj = this.dataSource.find(item => !item.currentNode) |
||||
|
const res = await postAction(this.url.submit, { |
||||
|
bsId: this.businessId, |
||||
|
loginName: this.userInfo().username, |
||||
|
docSubject: this.themeTitle, |
||||
|
fdId: this.flowId, |
||||
|
fdTemplateCode: "mergerApply", |
||||
|
auditNote: obj.remark, |
||||
|
processParam: { |
||||
|
changeNodeHandler: [ |
||||
|
{ |
||||
|
nodeId: tableObj.nodeId, |
||||
|
handlers: [ |
||||
|
{ |
||||
|
type: "USER", |
||||
|
id: this.operator, |
||||
|
name: this.operatorName |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
], |
||||
|
taskId: this.taskId, |
||||
|
activityType: this.fdActivityType, |
||||
|
operationType: this.operationFlag, |
||||
|
}, |
||||
|
formParam: { |
||||
|
formInstanceId: this.businessId |
||||
|
} |
||||
|
}) |
||||
|
if (res.success) { |
||||
|
this.$refs.passModal.handleCancel() |
||||
|
this.$refs.passModal.remark = '' |
||||
|
this.visible = false |
||||
|
this.$refs.passModal.loading = false |
||||
|
this.$emit('ok') |
||||
|
} else { |
||||
|
this.$refs.passModal.loading = false |
||||
|
this.$message.error(res.message) |
||||
|
} |
||||
|
} |
||||
|
// 审核 |
||||
|
else { |
||||
|
// else if (this.operationFlag === 'handler_pass') { |
||||
|
const res = await postAction(this.url.approve, { |
||||
|
fdId: this.flowId, |
||||
|
// activityType: this.fdActivityType, |
||||
|
// operationType: this.operationFlag, |
||||
|
// taskId: this.taskId, |
||||
|
auditNote: obj.remark, |
||||
|
fdTemplateCode: "mergerApply", |
||||
|
bsId: this.businessId, |
||||
|
loginName: this.userInfo().username, |
||||
|
processParam: { |
||||
|
jumpToNodeId: obj.node, |
||||
|
refusePassedToThisNode: obj.refusePassedToThisNode, |
||||
|
refusePassedToAllApprover: obj.refusePassedToAllApprover, |
||||
|
toOtherPersons: this.operationFlag === 'handler_commission' ? obj.operator : '', |
||||
|
toOtherPersonsName: this.operationFlag === 'handler_commission' ? obj.operatorName : '' , |
||||
|
changeNodeHandler: [], |
||||
|
taskId: this.taskId, |
||||
|
activityType: this.fdActivityType, |
||||
|
operationType: this.operationFlag, |
||||
|
}, |
||||
|
// formParam: { |
||||
|
// formInstanceId: this.businessId |
||||
|
// } |
||||
|
}) |
||||
|
if (res.success) { |
||||
|
this.$refs.passModal.handleCancel() |
||||
|
this.$refs.passModal.remark = '' |
||||
|
this.visible = false |
||||
|
this.$refs.passModal.loading = false |
||||
|
this.$emit('ok') |
||||
|
} else { |
||||
|
this.$message.error(res.message) |
||||
|
this.$refs.passModal.loading = false |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
this.operator = '' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="less"> |
||||
|
.topArea { |
||||
|
.topArea_box { |
||||
|
.topArea_theme { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
margin-bottom: 20px; |
||||
|
|
||||
|
.topArea_theme_label { |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.buttonArea { |
||||
|
margin-bottom: 20px; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,46 @@ |
|||||
|
<template> |
||||
|
<tooltip v-if="tips !== ''"> |
||||
|
<template slot="title">{{ tips }}</template> |
||||
|
<avatar :size="avatarSize" :src="src" /> |
||||
|
</tooltip> |
||||
|
<avatar v-else :size="avatarSize" :src="src" /> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Avatar from 'ant-design-vue/es/avatar' |
||||
|
import Tooltip from 'ant-design-vue/es/tooltip' |
||||
|
|
||||
|
export default { |
||||
|
name: "AvatarItem", |
||||
|
components: { |
||||
|
Avatar, |
||||
|
Tooltip |
||||
|
}, |
||||
|
props: { |
||||
|
tips: { |
||||
|
type: String, |
||||
|
default: '', |
||||
|
required: false |
||||
|
}, |
||||
|
src: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
} |
||||
|
}, |
||||
|
data () { |
||||
|
return { |
||||
|
size: this.$parent.size |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
avatarSize () { |
||||
|
return this.size !== 'mini' && this.size || 20 |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
'$parent.size' (val) { |
||||
|
this.size = val |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,112 @@ |
|||||
|
<!-- |
||||
|
<template> |
||||
|
<div :class="[prefixCls]"> |
||||
|
<ul> |
||||
|
<slot></slot> |
||||
|
<template v-for="item in filterEmpty($slots.default).slice(0, 3)"></template> |
||||
|
|
||||
|
|
||||
|
<template v-if="maxLength > 0 && filterEmpty($slots.default).length > maxLength"> |
||||
|
<avatar-item :size="size"> |
||||
|
<avatar :size="size !== 'mini' && size || 20" :style="excessItemsStyle">{{ `+${maxLength}` }}</avatar> |
||||
|
</avatar-item> |
||||
|
</template> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</template> |
||||
|
--> |
||||
|
|
||||
|
<script> |
||||
|
import Avatar from 'ant-design-vue/es/avatar' |
||||
|
import AvatarItem from './Item' |
||||
|
import { filterEmpty } from '@/components/_util/util' |
||||
|
|
||||
|
export default { |
||||
|
AvatarItem, |
||||
|
name: "AvatarList", |
||||
|
components: { |
||||
|
Avatar, |
||||
|
AvatarItem |
||||
|
}, |
||||
|
props: { |
||||
|
prefixCls: { |
||||
|
type: String, |
||||
|
default: 'ant-pro-avatar-list' |
||||
|
}, |
||||
|
/** |
||||
|
* 头像大小 类型: large、small 、mini, default |
||||
|
* 默认值: default |
||||
|
*/ |
||||
|
size: { |
||||
|
type: [String, Number], |
||||
|
default: 'default' |
||||
|
}, |
||||
|
/** |
||||
|
* 要显示的最大项目 |
||||
|
*/ |
||||
|
maxLength: { |
||||
|
type: Number, |
||||
|
default: 0 |
||||
|
}, |
||||
|
/** |
||||
|
* 多余的项目风格 |
||||
|
*/ |
||||
|
excessItemsStyle: { |
||||
|
type: Object, |
||||
|
default: () => { |
||||
|
return { |
||||
|
color: '#f56a00', |
||||
|
backgroundColor: '#fde3cf' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return {} |
||||
|
}, |
||||
|
methods: { |
||||
|
getItems(items) { |
||||
|
const classString = { |
||||
|
[`${this.prefixCls}-item`]: true, |
||||
|
[`${this.size}`]: true |
||||
|
} |
||||
|
|
||||
|
if (this.maxLength > 0) { |
||||
|
items = items.slice(0, this.maxLength) |
||||
|
// items.push( |
||||
|
// <Avatar size={this.size} style={this.excessItemsStyle}> |
||||
|
// {`+${this.maxLength}`} |
||||
|
// </Avatar> |
||||
|
// ); |
||||
|
items.push(` |
||||
|
<Avatar |
||||
|
size="${this.size}" |
||||
|
style="${this.excessItemsStyle}" |
||||
|
> |
||||
|
+${this.maxLength} |
||||
|
</Avatar> |
||||
|
`); |
||||
|
} |
||||
|
const itemList = items.map((item) => ( |
||||
|
<li class={classString}>{item}</li> |
||||
|
)) |
||||
|
return itemList |
||||
|
} |
||||
|
}, |
||||
|
render() { |
||||
|
const { prefixCls, size } = this.$props |
||||
|
const classString = { |
||||
|
[`${prefixCls}`]: true, |
||||
|
[`${size}`]: true, |
||||
|
} |
||||
|
const items = filterEmpty(this.$slots.default) |
||||
|
const itemsDom = items && items.length ? <ul class={`${prefixCls}-items`}>{this.getItems(items)}</ul> : null |
||||
|
|
||||
|
return ( |
||||
|
<div class={classString}> |
||||
|
{itemsDom} |
||||
|
</div> |
||||
|
) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,4 @@ |
|||||
|
import AvatarList from './List' |
||||
|
import "./index.less" |
||||
|
|
||||
|
export default AvatarList |
||||
@ -0,0 +1,60 @@ |
|||||
|
@import url(../index); |
||||
|
|
||||
|
@avatar-list-prefix-cls: ~"@{ant-pro-prefix}-avatar-list"; |
||||
|
@avatar-list-item-prefix-cls: ~"@{ant-pro-prefix}-avatar-list-item"; |
||||
|
|
||||
|
.@{avatar-list-prefix-cls} { |
||||
|
display: inline-block; |
||||
|
|
||||
|
ul { |
||||
|
list-style: none; |
||||
|
display: inline-block; |
||||
|
padding: 0; |
||||
|
margin: 0 0 0 8px; |
||||
|
font-size: 0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.@{avatar-list-item-prefix-cls} { |
||||
|
display: inline-block; |
||||
|
font-size: @font-size-base; |
||||
|
margin-left: -8px; |
||||
|
width: @avatar-size-base; |
||||
|
height: @avatar-size-base; |
||||
|
|
||||
|
:global { |
||||
|
.ant-avatar { |
||||
|
border: 1px solid #ffffff; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
&.large { |
||||
|
width: @avatar-size-lg; |
||||
|
height: @avatar-size-lg; |
||||
|
} |
||||
|
|
||||
|
&.small { |
||||
|
width: @avatar-size-sm; |
||||
|
height: @avatar-size-sm; |
||||
|
} |
||||
|
|
||||
|
&.mini { |
||||
|
width: 20px; |
||||
|
height: 20px; |
||||
|
|
||||
|
:global { |
||||
|
.ant-avatar { |
||||
|
width: 20px; |
||||
|
height: 20px; |
||||
|
line-height: 20px; |
||||
|
|
||||
|
.ant-avatar-string { |
||||
|
font-size: 12px; |
||||
|
line-height: 18px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,119 @@ |
|||||
|
<template> |
||||
|
<a-card :loading="loading" :body-style="bodyStyleObject" :bordered="false"> |
||||
|
<div class="chart-card-header"> |
||||
|
<div class="meta"> |
||||
|
<span class="chart-card-title">{{ title }}</span> |
||||
|
<span class="chart-card-action"> |
||||
|
<slot name="action"></slot> |
||||
|
</span> |
||||
|
</div> |
||||
|
<div class="total"> |
||||
|
<span>{{ total }}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="chart-card-content"> |
||||
|
<div class="content-fix"> |
||||
|
<slot></slot> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="chart-card-footer"> |
||||
|
<div class="field"> |
||||
|
<slot name="footer"></slot> |
||||
|
</div> |
||||
|
</div> |
||||
|
</a-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'ChartCard', |
||||
|
props: { |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
total: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
loading: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
bodyStyleObject: { |
||||
|
type: Object, |
||||
|
default: () => { |
||||
|
return { padding: '20px 24px 8px'} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="less" scoped> |
||||
|
.chart-card-header { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
width: 100%; |
||||
|
|
||||
|
.meta { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
width: 100%; |
||||
|
color: #ffffff; |
||||
|
font-size: 14px; |
||||
|
line-height: 22px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.chart-card-action { |
||||
|
cursor: pointer; |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
right: 0; |
||||
|
} |
||||
|
|
||||
|
.chart-card-footer { |
||||
|
border-top: 1px solid #e8e8e8; |
||||
|
padding-top: 9px; |
||||
|
margin-top: 8px; |
||||
|
|
||||
|
> * { |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.field { |
||||
|
white-space: nowrap; |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
margin: 0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.chart-card-content { |
||||
|
margin-bottom: 12px; |
||||
|
position: relative; |
||||
|
height: 46px; |
||||
|
width: 100%; |
||||
|
|
||||
|
.content-fix { |
||||
|
position: absolute; |
||||
|
left: 0; |
||||
|
bottom: 0; |
||||
|
width: 100%; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.total { |
||||
|
overflow: hidden; |
||||
|
text-overflow: ellipsis; |
||||
|
word-break: break-all; |
||||
|
white-space: nowrap; |
||||
|
color: #ffffff; |
||||
|
margin-top: 4px; |
||||
|
margin-bottom: 0; |
||||
|
font-size: 30px; |
||||
|
line-height: 38px; |
||||
|
height: 38px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,100 @@ |
|||||
|
<template> |
||||
|
<span> |
||||
|
{{ lastTime | format }} |
||||
|
</span> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
|
||||
|
function fixedZero(val) { |
||||
|
return val * 1 < 10 ? `0${val}` : val; |
||||
|
} |
||||
|
|
||||
|
export default { |
||||
|
name: "CountDown", |
||||
|
props: { |
||||
|
format: { |
||||
|
type: Function, |
||||
|
default: undefined |
||||
|
}, |
||||
|
target: { |
||||
|
type: [Date, Number], |
||||
|
required: true, |
||||
|
}, |
||||
|
onEnd: { |
||||
|
type: Function, |
||||
|
default: () => { |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
dateTime: '0', |
||||
|
originTargetTime: 0, |
||||
|
lastTime: 0, |
||||
|
timer: 0, |
||||
|
interval: 1000 |
||||
|
} |
||||
|
}, |
||||
|
filters: { |
||||
|
format(time) { |
||||
|
const hours = 60 * 60 * 1000; |
||||
|
const minutes = 60 * 1000; |
||||
|
|
||||
|
const h = Math.floor(time / hours); |
||||
|
const m = Math.floor((time - h * hours) / minutes); |
||||
|
const s = Math.floor((time - h * hours - m * minutes) / 1000); |
||||
|
return `${fixedZero(h)}:${fixedZero(m)}:${fixedZero(s)}` |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.initTime() |
||||
|
this.tick() |
||||
|
}, |
||||
|
methods: { |
||||
|
initTime() { |
||||
|
let lastTime = 0; |
||||
|
let targetTime = 0; |
||||
|
this.originTargetTime = this.target |
||||
|
try { |
||||
|
if (Object.prototype.toString.call(this.target) === '[object Date]') { |
||||
|
targetTime = this.target |
||||
|
} else { |
||||
|
targetTime = new Date(this.target).getTime() |
||||
|
} |
||||
|
} catch (e) { |
||||
|
throw new Error('invalid target prop') |
||||
|
} |
||||
|
|
||||
|
lastTime = targetTime - new Date().getTime(); |
||||
|
|
||||
|
this.lastTime = lastTime < 0 ? 0 : lastTime |
||||
|
}, |
||||
|
tick() { |
||||
|
const {onEnd} = this |
||||
|
|
||||
|
this.timer = setTimeout(() => { |
||||
|
if (this.lastTime < this.interval) { |
||||
|
clearTimeout(this.timer) |
||||
|
this.lastTime = 0 |
||||
|
if (typeof onEnd === 'function') { |
||||
|
onEnd(); |
||||
|
} |
||||
|
} else { |
||||
|
this.lastTime -= this.interval |
||||
|
this.tick() |
||||
|
} |
||||
|
}, this.interval) |
||||
|
} |
||||
|
}, |
||||
|
beforeUpdate () { |
||||
|
if (this.originTargetTime !== this.target) { |
||||
|
this.initTime() |
||||
|
} |
||||
|
}, |
||||
|
beforeUnmount() { |
||||
|
clearTimeout(this.timer) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
@ -0,0 +1,3 @@ |
|||||
|
import CountDown from './CountDown' |
||||
|
|
||||
|
export default CountDown |
||||
@ -0,0 +1,49 @@ |
|||||
|
<script> |
||||
|
import { cutStrByFullLength, getStrFullLength } from '@/components/_util/StringUtil' |
||||
|
|
||||
|
export default { |
||||
|
name: 'Ellipsis', |
||||
|
props: { |
||||
|
prefixCls: { |
||||
|
type: String, |
||||
|
default: 'ant-pro-ellipsis' |
||||
|
}, |
||||
|
tooltip: { |
||||
|
type: Boolean, |
||||
|
default: true, |
||||
|
}, |
||||
|
length: { |
||||
|
type: Number, |
||||
|
default: 25, |
||||
|
}, |
||||
|
lines: { |
||||
|
type: Number, |
||||
|
default: 1 |
||||
|
}, |
||||
|
fullWidthRecognition: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
} |
||||
|
}, |
||||
|
methods: {}, |
||||
|
render() { |
||||
|
const { tooltip, length } = this.$props |
||||
|
let text = '' |
||||
|
// 处理没有default插槽时的特殊情况 |
||||
|
if (this.$slots.default) { |
||||
|
text = this.$slots.default.map(vNode => vNode.text).join('') |
||||
|
} |
||||
|
// 判断是否显示 tooltip |
||||
|
if (tooltip && getStrFullLength(text) > length) { |
||||
|
return ` |
||||
|
<a-tooltip> |
||||
|
<template slot="title">${text}</template> |
||||
|
<span>${cutStrByFullLength(text, this.length)}…</span> |
||||
|
</a-tooltip> |
||||
|
`; |
||||
|
} else { |
||||
|
return (<span>{text}</span>) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,3 @@ |
|||||
|
import Ellipsis from './Ellipsis' |
||||
|
|
||||
|
export default Ellipsis |
||||
@ -0,0 +1,136 @@ |
|||||
|
<template> |
||||
|
<j-dict-select-tag |
||||
|
v-if="row.type === 'list'" |
||||
|
format="auto" |
||||
|
type="list" |
||||
|
v-model="innerValue" |
||||
|
:dictCode="row.dictCode" |
||||
|
v-bind="cellProps" |
||||
|
@blur="handleSelectBlur" |
||||
|
@change="handleSelectChange" |
||||
|
/> |
||||
|
<j-search-select-tag |
||||
|
v-else-if="row.type === 'select'" |
||||
|
v-model="innerValue" |
||||
|
:dictOptions="row.options" |
||||
|
@blur="handleSelectBlur" |
||||
|
@change="handleSelectChange" |
||||
|
/> |
||||
|
<a-auto-complete |
||||
|
v-else-if="row.type === 'option'" |
||||
|
v-model="innerValue" |
||||
|
:dataSource="row.options" |
||||
|
@blur="handleSelectBlur" |
||||
|
@change="handleSelectChange" |
||||
|
:filterOption="filterOption" |
||||
|
/> |
||||
|
<w-input |
||||
|
v-else |
||||
|
:value="innerValue" |
||||
|
:disabled="row.disabled" |
||||
|
v-bind="cellProps" |
||||
|
@blur="handleBlur" |
||||
|
@change="handleChange" |
||||
|
/> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { initSyncDictOptions } from '@/components/dict/JDictSelectUtil' |
||||
|
import { JVXETypes } from '@/components/jeecg/JVxeTable' |
||||
|
import JVxeCellMixins from '@/components/jeecg/JVxeTable/mixins/JVxeCellMixins' |
||||
|
|
||||
|
const NumberRegExp = /^-?\d+\.?\d*$/ |
||||
|
export default { |
||||
|
name: 'WElementCell', |
||||
|
mixins: [JVxeCellMixins], |
||||
|
props: { |
||||
|
alwaysEdit: { |
||||
|
type: Boolean, |
||||
|
default: true, |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// 当前正在编辑的行的id |
||||
|
currentEditRows: {}, |
||||
|
} |
||||
|
}, |
||||
|
created() {}, |
||||
|
methods: { |
||||
|
// 判定当前行是否是正在编辑的 |
||||
|
isEditRow(row, col) { |
||||
|
//debugger |
||||
|
if (this.alwaysEdit) { |
||||
|
return true |
||||
|
} |
||||
|
const current = this.currentEditRows[row.id] |
||||
|
return !!(current && current[col.key] === true) |
||||
|
}, |
||||
|
/** 处理blur失去焦点事件 */ |
||||
|
handleSelectBlur(value) { |
||||
|
//debugger |
||||
|
this.handleBlurCommon(value) |
||||
|
}, |
||||
|
handleSelectChange(value) { |
||||
|
//debugger |
||||
|
this.handleChangeCommon(value) |
||||
|
}, |
||||
|
/** 处理change事件 */ |
||||
|
handleChange(event) { |
||||
|
const { target } = event |
||||
|
const { value } = target |
||||
|
const change = true |
||||
|
// 触发事件,存储输入的值 |
||||
|
if (change) { |
||||
|
this.handleChangeCommon(value) |
||||
|
} |
||||
|
}, |
||||
|
/** 处理blur失去焦点事件 */ |
||||
|
handleBlur(event) { |
||||
|
const { target } = event |
||||
|
this.handleBlurCommon(target.value) |
||||
|
}, |
||||
|
filterOption(input, option) { |
||||
|
return option.componentOptions.children[0].text.indexOf(input) !== -1 |
||||
|
}, |
||||
|
}, |
||||
|
// 【组件增强】注释详见:JVxeCellMixins.js |
||||
|
enhanced: { |
||||
|
installOptions: { |
||||
|
// 自动聚焦的 class 类名 |
||||
|
autofocus: '.ant-input', |
||||
|
}, |
||||
|
getValue(value) { |
||||
|
if (this.$type === JVXETypes.inputNumber && typeof value === 'string') { |
||||
|
if (NumberRegExp.test(value)) { |
||||
|
return Number.parseFloat(value) |
||||
|
} |
||||
|
} |
||||
|
return value |
||||
|
}, |
||||
|
aopEvents: { |
||||
|
// editActived(event) { |
||||
|
// dispatchEvent.call(this, event, 'ant-select') |
||||
|
// }, |
||||
|
}, |
||||
|
translate: { |
||||
|
enabled: true, |
||||
|
handler(value) { |
||||
|
//debugger |
||||
|
if (value === null) {return value} |
||||
|
if (!this.row.dictCode) { |
||||
|
return value |
||||
|
} |
||||
|
const options = initSyncDictOptions(this.row.dictCode) |
||||
|
if (options && options.result) { |
||||
|
const first = options.result.find((o) => { |
||||
|
return o.value === value |
||||
|
}) |
||||
|
if (first) {return first.text} |
||||
|
} |
||||
|
return value |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
@ -0,0 +1,222 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div v-if="hasFile"> |
||||
|
<template v-for="(file, fileKey) of [innerFile || {}]"> |
||||
|
<div :key="fileKey" style="position: relative"> |
||||
|
<a-tooltip v-if="file.status === 'uploading'" :title="`上传中(${Math.floor(file.percent)}%)`"> |
||||
|
<a-icon type="loading" /> |
||||
|
<span style="margin-left: 5px">上传中…</span> |
||||
|
</a-tooltip> |
||||
|
|
||||
|
<a-tooltip v-else-if="file.status === 'done'" :title="file.name"> |
||||
|
<a-icon type="paper-clip" /> |
||||
|
<span style="margin-left: 5px">{{ ellipsisFileName }}</span> |
||||
|
</a-tooltip> |
||||
|
|
||||
|
<a-tooltip v-else :title="file.message || '上传失败'"> |
||||
|
<a-icon type="exclamation-circle" style="color: red" /> |
||||
|
<span style="margin-left: 5px">{{ ellipsisFileName }}</span> |
||||
|
</a-tooltip> |
||||
|
|
||||
|
<template style="width: 30px"> |
||||
|
<a-dropdown :trigger="['click']" placement="bottomRight" style="margin-left: 10px"> |
||||
|
<a-tooltip title="操作"> |
||||
|
<a-icon v-if="file.status !== 'uploading'" type="setting" style="cursor: pointer" /> |
||||
|
</a-tooltip> |
||||
|
|
||||
|
<a-menu slot="overlay"> |
||||
|
<a-menu-item v-if="originColumn.allowDownload !== false" @click="handleClickDownloadFile"> |
||||
|
<span><a-icon type="download" /> 下载</span> |
||||
|
</a-menu-item> |
||||
|
<a-menu-item v-if="originColumn.allowRemove !== false" @click="handleClickDeleteFile"> |
||||
|
<span><a-icon type="delete" /> 删除</span> |
||||
|
</a-menu-item> |
||||
|
<a-menu-item @click="handleMoreOperation(originColumn)"> |
||||
|
<span><a-icon type="bars" /> 更多</span> |
||||
|
</a-menu-item> |
||||
|
</a-menu> |
||||
|
</a-dropdown> |
||||
|
</template> |
||||
|
</div> |
||||
|
</template> |
||||
|
</div> |
||||
|
|
||||
|
<a-upload |
||||
|
v-show="!hasFile" |
||||
|
name="file" |
||||
|
:data="{ isup: 1 }" |
||||
|
:multiple="false" |
||||
|
:action="uploadAction" |
||||
|
:headers="uploadHeaders" |
||||
|
:showUploadList="false" |
||||
|
v-bind="cellProps" |
||||
|
@change="handleChangeUpload" |
||||
|
> |
||||
|
<w-button icon="upload">{{ originColumn.btnText || '上传文件' }}</w-button> |
||||
|
</a-upload> |
||||
|
<j-file-pop ref="filePop" @ok="handleFileSuccess" :number="number" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import JVxeCellMixins from '@/components/jeecg/JVxeTable/mixins/JVxeCellMixins'; |
||||
|
import JFilePop from '@/components/jeecg/minipop/JFilePop'; |
||||
|
import { ACCESS_TOKEN } from '@/store/mutation-types'; |
||||
|
import { getImgUrlWithHeader } from '@api/manage'; |
||||
|
import JVxeUploadCell from '@/components/jeecg/JVxeTable/components/cells/JVxeUploadCell'; |
||||
|
|
||||
|
export default { |
||||
|
name: 'JVxeFileCell', |
||||
|
mixins: [JVxeCellMixins], |
||||
|
components: { JFilePop }, |
||||
|
props: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
innerFile: null, |
||||
|
number: 0, |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
/** upload headers */ |
||||
|
uploadHeaders() { |
||||
|
const { originColumn: col } = this; |
||||
|
const headers = {}; |
||||
|
if (col.token === true) { |
||||
|
headers['X-Access-Token'] = this.$ls.get(ACCESS_TOKEN); |
||||
|
} |
||||
|
return headers; |
||||
|
}, |
||||
|
|
||||
|
/** 上传请求地址 */ |
||||
|
uploadAction() { |
||||
|
if (!this.originColumn.action) { |
||||
|
return window._CONFIG['domianURL'] + '/sys/common/upload'; |
||||
|
} else { |
||||
|
return this.originColumn.action; |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
hasFile() { |
||||
|
return this.innerFile !== null; |
||||
|
}, |
||||
|
|
||||
|
ellipsisFileName() { |
||||
|
const length = 5; |
||||
|
const file = this.innerFile; |
||||
|
if (!file || !file.name) { |
||||
|
return ''; |
||||
|
} |
||||
|
if (file.name.length > length) { |
||||
|
return file.name.substr(0, length) + '…'; |
||||
|
} |
||||
|
return file.name; |
||||
|
}, |
||||
|
|
||||
|
responseName() { |
||||
|
if (this.originColumn.responseName) { |
||||
|
return this.originColumn.responseName; |
||||
|
} else { |
||||
|
return 'message'; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
innerValue: { |
||||
|
immediate: true, |
||||
|
handler() { |
||||
|
if (this.innerValue) { |
||||
|
this.innerFile = this.innerValue; |
||||
|
} else { |
||||
|
this.innerFile = null; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
// 点击更多按钮 |
||||
|
handleMoreOperation(originColumn) { |
||||
|
//update-begin-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件 |
||||
|
if (originColumn.number) { |
||||
|
this.number = originColumn.number; |
||||
|
} else { |
||||
|
this.number = 0; |
||||
|
} |
||||
|
//update-end-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件 |
||||
|
if (originColumn && originColumn.fieldExtendJson) { |
||||
|
const json = JSON.parse(originColumn.fieldExtendJson); |
||||
|
this.number = json.uploadnum ? json.uploadnum : 0; |
||||
|
} |
||||
|
let path = ''; |
||||
|
if (this.innerFile) { |
||||
|
path = this.innerFile.path; |
||||
|
} |
||||
|
this.$refs.filePop.show('', path); |
||||
|
}, |
||||
|
|
||||
|
// 更多上传回调 |
||||
|
handleFileSuccess(file) { |
||||
|
if (file) { |
||||
|
this.innerFile.path = file.path; |
||||
|
this.handleChangeCommon(this.innerFile); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
handleChangeUpload(info) { |
||||
|
const { file } = info; |
||||
|
const value = { |
||||
|
name: file.name, |
||||
|
type: file.type, |
||||
|
size: file.size, |
||||
|
status: file.status, |
||||
|
percent: file.percent, |
||||
|
}; |
||||
|
if (file.response) { |
||||
|
value['responseName'] = file.response[this.responseName]; |
||||
|
} |
||||
|
if (file.status === 'done') { |
||||
|
if (typeof file.response.success === 'boolean') { |
||||
|
if (file.response.success) { |
||||
|
value['path'] = file.response[this.responseName]; |
||||
|
this.handleChangeCommon(value); |
||||
|
} else { |
||||
|
value['status'] = 'error'; |
||||
|
value['message'] = file.response.message || '未知错误'; |
||||
|
} |
||||
|
} else { |
||||
|
// 考虑到如果设置action上传路径为非jeecg-boot后台,可能不会返回 success 属性的情况,就默认为成功 |
||||
|
value['path'] = file.response[this.responseName]; |
||||
|
this.handleChangeCommon(value); |
||||
|
} |
||||
|
} else if (file.status === 'error') { |
||||
|
value['message'] = file.response.message || '未知错误'; |
||||
|
} |
||||
|
this.innerFile = value; |
||||
|
}, |
||||
|
|
||||
|
async handleClickDownloadFile() { |
||||
|
const { path } = this.innerFile || {}; |
||||
|
let { url } = this.innerFile || {}; |
||||
|
if (!url || url.length === 0) { |
||||
|
if (path && path.length > 0) { |
||||
|
// url = getFileAccessHttpUrl(path.split(',')[0]); |
||||
|
url = await getImgUrlWithHeader(path.split(',')[0]); |
||||
|
} |
||||
|
} |
||||
|
if (url) { |
||||
|
window.open(url); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
handleClickDeleteFile() { |
||||
|
this.handleChangeCommon(null); |
||||
|
}, |
||||
|
}, |
||||
|
// 【组件增强】注释详见:JVxeCellMixins.js |
||||
|
enhanced: { |
||||
|
switches: { visible: true }, |
||||
|
getValue: (value) => JVxeUploadCell.enhanced.getValue(value), |
||||
|
setValue: (value) => JVxeUploadCell.enhanced.setValue(value), |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
@ -0,0 +1,237 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div v-if="hasFile"> |
||||
|
<template v-for="(file, fileKey) of [innerFile || {}]"> |
||||
|
<div :key="fileKey" style="position: relative"> |
||||
|
<template v-if="!file || !(file['url'] || file['path'] || file['message'])"> |
||||
|
<a-tooltip :title="'请稍后: ' + JSON.stringify(file) + (file['url'] || file['path'] || file['message'])"> |
||||
|
<a-icon type="loading" /> |
||||
|
</a-tooltip> |
||||
|
</template> |
||||
|
<template v-else-if="file['path']"> |
||||
|
<img class="j-editable-image" :src="imgSrc" alt="无图片" @click="handleMoreOperation" /> |
||||
|
</template> |
||||
|
<a-tooltip v-else :title="file.message || '上传失败'" @click="handleClickShowImageError"> |
||||
|
<a-icon type="exclamation-circle" style="color: red" /> |
||||
|
</a-tooltip> |
||||
|
|
||||
|
<template style="width: 30px"> |
||||
|
<a-dropdown :trigger="['click']" placement="bottomRight" style="margin-left: 10px"> |
||||
|
<a-tooltip title="操作"> |
||||
|
<a-icon v-if="file.status !== 'uploading'" type="setting" style="cursor: pointer" /> |
||||
|
</a-tooltip> |
||||
|
|
||||
|
<a-menu slot="overlay"> |
||||
|
<a-menu-item v-if="originColumn.allowDownload !== false" @click="handleClickDownloadFile"> |
||||
|
<span><a-icon type="download" /> 下载</span> |
||||
|
</a-menu-item> |
||||
|
<a-menu-item v-if="originColumn.allowRemove !== false" @click="handleClickDeleteFile"> |
||||
|
<span><a-icon type="delete" /> 删除</span> |
||||
|
</a-menu-item> |
||||
|
<a-menu-item @click="handleMoreOperation(originColumn)"> |
||||
|
<span><a-icon type="bars" /> 更多</span> |
||||
|
</a-menu-item> |
||||
|
</a-menu> |
||||
|
</a-dropdown> |
||||
|
</template> |
||||
|
</div> |
||||
|
</template> |
||||
|
</div> |
||||
|
|
||||
|
<a-upload |
||||
|
v-show="!hasFile" |
||||
|
name="file" |
||||
|
:data="{ isup: 1 }" |
||||
|
:multiple="false" |
||||
|
:action="uploadAction" |
||||
|
:headers="uploadHeaders" |
||||
|
:showUploadList="false" |
||||
|
v-bind="cellProps" |
||||
|
@change="handleChangeUpload" |
||||
|
> |
||||
|
<w-button icon="upload">{{ originColumn.btnText || '上传图片' }}</w-button> |
||||
|
</a-upload> |
||||
|
<j-file-pop ref="filePop" @ok="handleFileSuccess" :number="number" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import JVxeCellMixins from '@/components/jeecg/JVxeTable/mixins/JVxeCellMixins'; |
||||
|
import JFilePop from '@/components/jeecg/minipop/JFilePop'; |
||||
|
import { ACCESS_TOKEN } from '@/store/mutation-types'; |
||||
|
import { getImgUrlWithHeader } from '@api/manage'; |
||||
|
import JVxeUploadCell from '@/components/jeecg/JVxeTable/components/cells/JVxeUploadCell'; |
||||
|
|
||||
|
export default { |
||||
|
name: 'JVxeImageCell', |
||||
|
mixins: [JVxeCellMixins], |
||||
|
components: { JFilePop }, |
||||
|
props: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
innerFile: null, |
||||
|
number: 0, |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
/** upload headers */ |
||||
|
uploadHeaders() { |
||||
|
const { originColumn: col } = this; |
||||
|
const headers = {}; |
||||
|
if (col.token === true) { |
||||
|
headers['X-Access-Token'] = this.$ls.get(ACCESS_TOKEN); |
||||
|
} |
||||
|
return headers; |
||||
|
}, |
||||
|
|
||||
|
/** 上传请求地址 */ |
||||
|
uploadAction() { |
||||
|
if (!this.originColumn.action) { |
||||
|
return window._CONFIG['domianURL'] + '/sys/common/upload'; |
||||
|
} else { |
||||
|
return this.originColumn.action; |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
hasFile() { |
||||
|
return this.innerFile !== null; |
||||
|
}, |
||||
|
|
||||
|
/** 预览图片地址 */ |
||||
|
imgSrc() { |
||||
|
if (this.innerFile) { |
||||
|
if (this.innerFile['url']) { |
||||
|
return this.innerFile['url']; |
||||
|
} else if (this.innerFile['path']) { |
||||
|
const path = this.innerFile['path'].split(',')[0]; |
||||
|
// return getFileAccessHttpUrl(path); |
||||
|
return getImgUrlWithHeader(path); |
||||
|
} |
||||
|
} |
||||
|
return ''; |
||||
|
}, |
||||
|
|
||||
|
responseName() { |
||||
|
if (this.originColumn.responseName) { |
||||
|
return this.originColumn.responseName; |
||||
|
} else { |
||||
|
return 'message'; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
innerValue: { |
||||
|
immediate: true, |
||||
|
handler() { |
||||
|
if (this.innerValue) { |
||||
|
this.innerFile = this.innerValue; |
||||
|
} else { |
||||
|
this.innerFile = null; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
// 点击更多按钮 |
||||
|
handleMoreOperation(originColumn) { |
||||
|
//update-begin-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件 |
||||
|
if (originColumn.number) { |
||||
|
this.number = originColumn.number; |
||||
|
} else { |
||||
|
this.number = 0; |
||||
|
} |
||||
|
//update-end-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件 |
||||
|
if (originColumn && originColumn.fieldExtendJson) { |
||||
|
const json = JSON.parse(originColumn.fieldExtendJson); |
||||
|
this.number = json.uploadnum ? json.uploadnum : 0; |
||||
|
} |
||||
|
let path = ''; |
||||
|
if (this.innerFile) { |
||||
|
path = this.innerFile.path; |
||||
|
} |
||||
|
this.$refs.filePop.show('', path, 'img'); |
||||
|
}, |
||||
|
|
||||
|
// 更多上传回调 |
||||
|
handleFileSuccess(file) { |
||||
|
if (file) { |
||||
|
this.innerFile.path = file.path; |
||||
|
this.handleChangeCommon(this.innerFile); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// 弹出上传出错详细信息 |
||||
|
handleClickShowImageError() { |
||||
|
const file = this.innerFile || null; |
||||
|
if (file && file['message']) { |
||||
|
this.$error({ title: '上传出错', content: '错误信息:' + file['message'], maskClosable: true }); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
handleChangeUpload(info) { |
||||
|
const { file } = info; |
||||
|
const value = { |
||||
|
name: file.name, |
||||
|
type: file.type, |
||||
|
size: file.size, |
||||
|
status: file.status, |
||||
|
percent: file.percent, |
||||
|
}; |
||||
|
if (file.response) { |
||||
|
value['responseName'] = file.response[this.responseName]; |
||||
|
} |
||||
|
if (file.status === 'done') { |
||||
|
if (typeof file.response.success === 'boolean') { |
||||
|
if (file.response.success) { |
||||
|
value['path'] = file.response[this.responseName]; |
||||
|
this.handleChangeCommon(value); |
||||
|
} else { |
||||
|
value['status'] = 'error'; |
||||
|
value['message'] = file.response.message || '未知错误'; |
||||
|
} |
||||
|
} else { |
||||
|
// 考虑到如果设置action上传路径为非jeecg-boot后台,可能不会返回 success 属性的情况,就默认为成功 |
||||
|
value['path'] = file.response[this.responseName]; |
||||
|
this.handleChangeCommon(value); |
||||
|
} |
||||
|
} else if (file.status === 'error') { |
||||
|
value['message'] = file.response.message || '未知错误'; |
||||
|
} |
||||
|
this.innerFile = value; |
||||
|
}, |
||||
|
|
||||
|
handleClickDownloadFile() { |
||||
|
if (this.imgSrc) { |
||||
|
window.open(this.imgSrc); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
handleClickDeleteFile() { |
||||
|
this.handleChangeCommon(null); |
||||
|
}, |
||||
|
}, |
||||
|
// 【组件增强】注释详见:JVxeCellMixins.js |
||||
|
enhanced: { |
||||
|
switches: { visible: true }, |
||||
|
getValue: (value) => JVxeUploadCell.enhanced.getValue(value), |
||||
|
setValue: (value) => JVxeUploadCell.enhanced.setValue(value), |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="less"> |
||||
|
.j-editable-image { |
||||
|
height: 32px; |
||||
|
max-width: 100px !important; |
||||
|
cursor: pointer; |
||||
|
|
||||
|
&:hover { |
||||
|
opacity: 0.8; |
||||
|
} |
||||
|
|
||||
|
&:active { |
||||
|
opacity: 0.6; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,60 @@ |
|||||
|
<template> |
||||
|
<j-popup |
||||
|
v-bind="popupProps" |
||||
|
@input="handlePopupInput" |
||||
|
/> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import JVxeCellMixins, { dispatchEvent, vModel } from '@/components/jeecg/JVxeTable/mixins/JVxeCellMixins' |
||||
|
|
||||
|
export default { |
||||
|
name: 'JVxePopupCell', |
||||
|
mixins: [JVxeCellMixins], |
||||
|
computed: { |
||||
|
popupProps() { |
||||
|
const {innerValue, originColumn: col, caseId, cellProps} = this |
||||
|
return { |
||||
|
...cellProps, |
||||
|
value: innerValue, |
||||
|
field: col.field || col.key, |
||||
|
code: col.popupCode, |
||||
|
orgFields: col.orgFields, |
||||
|
destFields: col.destFields, |
||||
|
groupId: caseId, |
||||
|
param: col.param, |
||||
|
sorter: col.sorter, |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
/** popup回调 */ |
||||
|
handlePopupInput(value, others) { |
||||
|
const {row, originColumn: col} = this |
||||
|
// 存储输入的值 |
||||
|
let popupValue = value |
||||
|
if (others && Object.keys(others).length > 0) { |
||||
|
Object.keys(others).forEach(key => { |
||||
|
const currentValue = others[key] |
||||
|
// 当前列直接赋值,其他列通过vModel赋值 |
||||
|
if (key === col.key) { |
||||
|
popupValue = currentValue |
||||
|
} else { |
||||
|
vModel.call(this, currentValue, row, key) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
this.handleChangeCommon(popupValue) |
||||
|
}, |
||||
|
}, |
||||
|
// 【组件增强】注释详见:JVxeCellMixins.js |
||||
|
enhanced: { |
||||
|
aopEvents: { |
||||
|
editActived(event) { |
||||
|
dispatchEvent.call(this, event, 'ant-input') |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
@ -0,0 +1,60 @@ |
|||||
|
<template> |
||||
|
<a-radio-group |
||||
|
:class="clazz" |
||||
|
:value="innerValue" |
||||
|
v-bind="cellProps" |
||||
|
@change="(e)=>handleChangeCommon(e.target.value)" |
||||
|
> |
||||
|
<a-radio |
||||
|
v-for="item of originColumn.options" |
||||
|
:key="item.value" |
||||
|
:value="item.value" |
||||
|
@click="$event=>handleRadioClick(item,$event)" |
||||
|
>{{ item.text }} |
||||
|
</a-radio> |
||||
|
</a-radio-group> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import JVxeCellMixins from '@/components/jeecg/JVxeTable/mixins/JVxeCellMixins' |
||||
|
|
||||
|
export default { |
||||
|
name: 'JVxeRadioCell', |
||||
|
mixins: [JVxeCellMixins], |
||||
|
computed: { |
||||
|
scrolling() { |
||||
|
return !!this.renderOptions.scrolling |
||||
|
}, |
||||
|
clazz() { |
||||
|
return { |
||||
|
'j-vxe-radio': true, |
||||
|
'no-animation': this.scrolling |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
handleRadioClick(item) { |
||||
|
if (this.originColumn.allowClear === true) { |
||||
|
// 取消选择 |
||||
|
if (item.value === this.innerValue) { |
||||
|
this.handleChangeCommon(null) |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
// 【组件增强】注释详见:JVxeCellMixins.js |
||||
|
enhanced: { |
||||
|
switches: {visible: true}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="less"> |
||||
|
// 关闭动画,防止滚动时动态赋值出现问题 |
||||
|
.j-vxe-radio.no-animation { |
||||
|
.ant-radio-inner, |
||||
|
.ant-radio-inner::after { |
||||
|
transition: none !important; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,263 @@ |
|||||
|
import debounce from 'lodash/debounce' |
||||
|
import { getAction } from '@/api/manage' |
||||
|
import { cloneObject } from '@/utils/util' |
||||
|
import { filterDictText } from '@/components/dict/JDictSelectUtil' |
||||
|
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' |
||||
|
import JVxeCellMixins, { dispatchEvent } from '@/components/jeecg/JVxeTable/mixins/JVxeCellMixins' |
||||
|
|
||||
|
/** 公共资源 */ |
||||
|
const common = { |
||||
|
/** value - label map,防止重复查询(刷新清空缓存) */ |
||||
|
labelMap: new Map(), |
||||
|
|
||||
|
/** 公共data */ |
||||
|
data() { |
||||
|
return { |
||||
|
loading: false, |
||||
|
innerSelectValue: null, |
||||
|
innerOptions: [], |
||||
|
} |
||||
|
}, |
||||
|
/** 公共计算属性 */ |
||||
|
computed: { |
||||
|
dict() { |
||||
|
return this.originColumn.dict |
||||
|
}, |
||||
|
options() { |
||||
|
if (this.isAsync) { |
||||
|
return this.innerOptions |
||||
|
} else { |
||||
|
return this.originColumn.options || [] |
||||
|
} |
||||
|
}, |
||||
|
// 是否是异步模式
|
||||
|
isAsync() { |
||||
|
const isAsync = this.originColumn.async |
||||
|
return (isAsync !== null && isAsync !== '') ? !!isAsync : true |
||||
|
}, |
||||
|
}, |
||||
|
/** 公共属性监听 */ |
||||
|
watch: { |
||||
|
innerValue: { |
||||
|
immediate: true, |
||||
|
handler(value) { |
||||
|
if (value === null || value === '') { |
||||
|
this.innerSelectValue = null |
||||
|
} else { |
||||
|
this.loadDataByValue(value) |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
dict() { |
||||
|
this.loadDataByDict() |
||||
|
} |
||||
|
}, |
||||
|
/** 公共方法 */ |
||||
|
methods: { |
||||
|
|
||||
|
// 根据 value 查询数据,用于回显
|
||||
|
async loadDataByValue(value) { |
||||
|
if (this.isAsync) { |
||||
|
if (this.innerSelectValue !== value) { |
||||
|
if (common.labelMap.has(value)) { |
||||
|
this.innerOptions = cloneObject(common.labelMap.get(value)) |
||||
|
} else { |
||||
|
const {success, result} = await getAction(`/sys/dict/loadDictItem/${this.dict}`, {key: value}) |
||||
|
if (success && result && result.length > 0) { |
||||
|
this.innerOptions = [{value: value, text: result[0]}] |
||||
|
common.labelMap.set(value, cloneObject(this.innerOptions)) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
this.innerSelectValue = (value || '').toString() |
||||
|
}, |
||||
|
|
||||
|
// 初始化字典
|
||||
|
async loadDataByDict() { |
||||
|
if (!this.isAsync) { |
||||
|
// 如果字典项集合有数据
|
||||
|
if (!this.originColumn.options || this.originColumn.options.length === 0) { |
||||
|
// 根据字典Code, 初始化字典数组
|
||||
|
let dictStr = '' |
||||
|
if (this.dict) { |
||||
|
const arr = this.dict.split(',') |
||||
|
if (arr[0].indexOf('where') > 0) { |
||||
|
const tbInfo = arr[0].split('where') |
||||
|
dictStr = tbInfo[0].trim() + ',' + arr[1] + ',' + arr[2] + ',' + encodeURIComponent(tbInfo[1]) |
||||
|
} else { |
||||
|
dictStr = this.dict |
||||
|
} |
||||
|
if (this.dict.indexOf(',') === -1) { |
||||
|
//优先从缓存中读取字典配置
|
||||
|
const cache = getDictItemsFromCache(this.dict) |
||||
|
if (cache) { |
||||
|
this.innerOptions = cache |
||||
|
return |
||||
|
} |
||||
|
} |
||||
|
const {success, result} = await ajaxGetDictItems(dictStr, null) |
||||
|
if (success) { |
||||
|
this.innerOptions = result |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// 显示组件,自带翻译
|
||||
|
export const DictSearchSpanCell = { |
||||
|
name: 'JVxeSelectSearchSpanCell', |
||||
|
mixins: [JVxeCellMixins], |
||||
|
data() { |
||||
|
return { |
||||
|
...common.data.apply(this), |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
...common.computed, |
||||
|
}, |
||||
|
watch: { |
||||
|
...common.watch, |
||||
|
}, |
||||
|
methods: { |
||||
|
...common.methods, |
||||
|
}, |
||||
|
render(h) { |
||||
|
return h('span', {}, [ |
||||
|
filterDictText(this.innerOptions, this.innerSelectValue || this.innerValue) |
||||
|
]) |
||||
|
}, |
||||
|
} |
||||
|
|
||||
|
// 请求id
|
||||
|
let requestId = 0 |
||||
|
|
||||
|
// 输入选择组件
|
||||
|
export const DictSearchInputCell = { |
||||
|
name: 'JVxeSelectSearchInputCell', |
||||
|
mixins: [JVxeCellMixins], |
||||
|
data() { |
||||
|
return { |
||||
|
...common.data.apply(this), |
||||
|
|
||||
|
hasRequest: false, |
||||
|
scopedSlots: { |
||||
|
notFoundContent: () => { |
||||
|
if (this.loading) { |
||||
|
// return <a-spin size="small"/>
|
||||
|
return '' |
||||
|
} else if (this.hasRequest) { |
||||
|
return '没有查询到任何数据' |
||||
|
} else { |
||||
|
return this.tipsContent |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
...common.computed, |
||||
|
tipsContent() { |
||||
|
return this.originColumn.tipsContent || '请输入搜索内容' |
||||
|
}, |
||||
|
filterOption() { |
||||
|
if (this.isAsync) { |
||||
|
return null |
||||
|
} |
||||
|
return (input, option) => option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
...common.watch, |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadData = debounce(this.loadData, 300)//消抖
|
||||
|
}, |
||||
|
methods: { |
||||
|
...common.methods, |
||||
|
|
||||
|
loadData(value) { |
||||
|
const currentRequestId = ++requestId |
||||
|
this.loading = true |
||||
|
this.innerOptions = [] |
||||
|
if (value === null || value.trim() === '') { |
||||
|
this.loading = false |
||||
|
this.hasRequest = false |
||||
|
return |
||||
|
} |
||||
|
// 字典code格式:table,text,code
|
||||
|
this.hasRequest = true |
||||
|
getAction(`/sys/dict/loadDict/${this.dict}`, {keyword: value}).then(res => { |
||||
|
if (currentRequestId !== requestId) { |
||||
|
return |
||||
|
} |
||||
|
const {success, result, message} = res |
||||
|
if (success) { |
||||
|
this.innerOptions = result |
||||
|
result.forEach((item) => { |
||||
|
common.labelMap.set(item.value, [item]) |
||||
|
}) |
||||
|
} else { |
||||
|
this.$message.warning(message) |
||||
|
} |
||||
|
}).finally(() => { |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
handleChange(selectedValue) { |
||||
|
this.innerSelectValue = selectedValue |
||||
|
this.handleChangeCommon(this.innerSelectValue) |
||||
|
}, |
||||
|
handleSearch(value) { |
||||
|
if (this.isAsync) { |
||||
|
// 在输入时也应该开启加载,因为loadData加了消抖,所以会有800ms的用户主观上认为的卡顿时间
|
||||
|
this.loading = true |
||||
|
if (this.innerOptions.length > 0) { |
||||
|
this.innerOptions = [] |
||||
|
} |
||||
|
this.loadData(value) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
renderOptionItem() { |
||||
|
const options = [] |
||||
|
this.options.forEach(({value, text, label, title, disabled}) => { |
||||
|
options.push( |
||||
|
<a-select-option key={value} value={value} disabled={disabled}>{text || label || title}</a-select-option> |
||||
|
) |
||||
|
}) |
||||
|
return options |
||||
|
}, |
||||
|
}, |
||||
|
render() { |
||||
|
return ( |
||||
|
<a-select |
||||
|
showSearch |
||||
|
allowClear |
||||
|
value={this.innerSelectValue} |
||||
|
filterOption={this.filterOption} |
||||
|
style="width: 100%" |
||||
|
{...this.cellProps} |
||||
|
onSearch={this.handleSearch} |
||||
|
onChange={this.handleChange} |
||||
|
scopedSlots={this.scopedSlots} |
||||
|
> |
||||
|
{this.renderOptionItem()} |
||||
|
</a-select> |
||||
|
) |
||||
|
}, |
||||
|
// 【组件增强】注释详见:JVxeCellMixins.js
|
||||
|
enhanced: { |
||||
|
aopEvents: { |
||||
|
editActived(event) { |
||||
|
dispatchEvent.call(this, event, 'ant-select') |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
} |
||||