Commit 48ab0774daf79e4df4633cff535eea1915634b04
1 parent
3d008fd4
1.提交闪电分支
Showing
586 changed files
with
31829 additions
and
147632 deletions
Too many changes to show.
To preserve performance only 79 of 586 files are displayed.
.editorconfig
0 → 100644
| 1 | +# http://editorconfig.org | |
| 2 | +root = true | |
| 3 | + | |
| 4 | +[*] | |
| 5 | +indent_style = space | |
| 6 | +indent_size = 2 | |
| 7 | +end_of_line = lf | |
| 8 | +charset = utf-8 | |
| 9 | +trim_trailing_whitespace = true | |
| 10 | +insert_final_newline = true | |
| 11 | + | |
| 12 | +[*.md] | |
| 13 | +trim_trailing_whitespace = false | |
| 14 | + | |
| 15 | +[Makefile] | |
| 16 | +indent_style = tab | ... | ... |
.eslintrc
0 → 100644
| 1 | +{ | |
| 2 | + "parser": "babel-eslint", | |
| 3 | + "extends": "airbnb", | |
| 4 | + "env": { | |
| 5 | + "browser": true, | |
| 6 | + "node": true, | |
| 7 | + "es6": true, | |
| 8 | + "mocha": true, | |
| 9 | + "jest": true, | |
| 10 | + "jasmine": true | |
| 11 | + }, | |
| 12 | + "plugins": [ | |
| 13 | + "jsx-a11y" | |
| 14 | + ], | |
| 15 | + "rules": { | |
| 16 | + "arrow-body-style": [0], | |
| 17 | + "consistent-return": [0], | |
| 18 | + "generator-star-spacing": [0], | |
| 19 | + "global-require": [1], | |
| 20 | + "import/extensions": [0], | |
| 21 | + "import/no-extraneous-dependencies": [0], | |
| 22 | + "import/no-unresolved": [0], | |
| 23 | + "import/prefer-default-export": [0], | |
| 24 | + "jsx-a11y/no-static-element-interactions": [0], | |
| 25 | + "jsx-a11y/anchor-is-valid": [ "error", { | |
| 26 | + "components": [ "Link" ], | |
| 27 | + "specialLink": [ "hrefLeft", "hrefRight" ], | |
| 28 | + "aspects": [ "noHref", "invalidHref", "preferButton" ] | |
| 29 | + }], | |
| 30 | + "no-restricted-globals": ["error", "event", "fdescribe"], | |
| 31 | + "jsx-a11y/click-events-have-key-events": [0], | |
| 32 | + "no-bitwise": [0], | |
| 33 | + "no-cond-assign": [0], | |
| 34 | + "no-else-return": [0], | |
| 35 | + "no-nested-ternary": [0], | |
| 36 | + "no-restricted-syntax": [0], | |
| 37 | + "no-use-before-define": [0], | |
| 38 | + "react/forbid-prop-types": [0], | |
| 39 | + "react/jsx-filename-extension": [1, { "extensions": [".js"] }], | |
| 40 | + "react/jsx-no-bind": [0], | |
| 41 | + "react/prefer-stateless-function": [0], | |
| 42 | + "react/prop-types": [0], | |
| 43 | + "require-yield": [1], | |
| 44 | + "linebreak-style": 0, //去除eslint控制 LF/CRLF的判断 //packjson.json "set port=9000&&roadhog server" | |
| 45 | + "max-len": [0, 200, 4], //每行太多老要回车 | |
| 46 | + "no-param-reassign": [0], //禁止给参数重新赋值 | |
| 47 | + "react/no-multi-comp": [0], | |
| 48 | + "no-shadow": [0], | |
| 49 | + "no-await-in-loop": [0], | |
| 50 | + "camelcase": [1, {"properties": "never"}] | |
| 51 | + }, | |
| 52 | + "parserOptions": { | |
| 53 | + "ecmaFeatures": { | |
| 54 | + "experimentalObjectRestSpread": true | |
| 55 | + } | |
| 56 | + } | |
| 57 | +} | ... | ... |
.gitignore
| 1 | +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | |
| 2 | + | |
| 3 | +# dependencies | |
| 1 | 4 | /node_modules |
| 2 | -/.env.local | |
| 3 | -/.umirc.local.ts | |
| 4 | -/config/config.local.ts | |
| 5 | -/src/.umi | |
| 6 | -/src/.umi-production | |
| 7 | -/src/.umi-test | |
| 5 | +/.idea | |
| 6 | +package-lock.json | |
| 7 | +# production | |
| 8 | 8 | /dist |
| 9 | -.swc | |
| 10 | -/.history | |
| 11 | 9 | /.vscode |
| 10 | +pnpm-lock.yaml | |
| 11 | + | |
| 12 | +# misc | |
| 12 | 13 | .DS_Store |
| 14 | +npm-debug.log* | |
| 15 | +/.history | |
| 16 | +/*.zip | ... | ... |
.npmrc deleted
.prettierignore deleted
.roadhogrc.mock.js
0 → 100644
.umirc.ts deleted
| 1 | -import { defineConfig } from "umi"; | |
| 2 | -import { join } from "path"; | |
| 3 | -import { readdirSync } from "fs"; | |
| 4 | - | |
| 5 | -const getIcons = () => { | |
| 6 | - const iconDir = join(__dirname, "src/icons"); | |
| 7 | - return readdirSync(iconDir) | |
| 8 | - .filter(file => file.endsWith(".svg")) | |
| 9 | - .map(file => `local:${file.replace(/\.svg$/, "")}`); | |
| 10 | -}; | |
| 11 | - | |
| 12 | -export default defineConfig({ | |
| 13 | - routes: [ | |
| 14 | - { path: "/", redirect: "/login" }, | |
| 15 | - { path: "/login", component: "@/routes/login/login" }, | |
| 16 | - { | |
| 17 | - path: "/indexPage", | |
| 18 | - component: "@/routes/indexPage", | |
| 19 | - routes: [{ path: "*" }], | |
| 20 | - }, | |
| 21 | - { | |
| 22 | - path: "/loginMobile", | |
| 23 | - component: "@/routes/mobile/login/LoginMobile", | |
| 24 | - }, | |
| 25 | - | |
| 26 | - { | |
| 27 | - path: "/indexMobile", | |
| 28 | - component: "@/routes/mobile/IndexMobile", | |
| 29 | - routes: [{ path: "*" }], | |
| 30 | - }, | |
| 31 | - ], | |
| 32 | - title: "小羚羊EBC前台业务系统", | |
| 33 | - favicons: ["/favicon.ico"], | |
| 34 | - npmClient: "pnpm", | |
| 35 | - dva: {}, | |
| 36 | - icons: { | |
| 37 | - include: getIcons(), | |
| 38 | - }, | |
| 39 | - plugins: ["@umijs/plugins/dist/dva"], | |
| 40 | - mfsu: false, | |
| 41 | -}); |
.webpackrc.js
0 → 100644
| 1 | +export default { | |
| 2 | + "entry": { | |
| 3 | + index: "./src/index.js", | |
| 4 | + "vendor": [ | |
| 5 | + "react", | |
| 6 | + "react-dom", | |
| 7 | + "dva", | |
| 8 | + "prop-types", | |
| 9 | + "lodash", | |
| 10 | + "classnames" | |
| 11 | + ], | |
| 12 | + "antd": [ | |
| 13 | + "antd/lib/button", | |
| 14 | + "antd/lib/icon", | |
| 15 | + "antd/lib/breadcrumb", | |
| 16 | + "antd/lib/form", | |
| 17 | + "antd/lib/menu", | |
| 18 | + "antd/lib/input", | |
| 19 | + "antd/lib/input-number", | |
| 20 | + "antd/lib/dropdown", | |
| 21 | + "antd/lib/table", | |
| 22 | + "antd/lib/tabs", | |
| 23 | + "antd/lib/modal", | |
| 24 | + "antd/lib/row", | |
| 25 | + "antd/lib/col" | |
| 26 | + ], | |
| 27 | + "components":[ | |
| 28 | + "./src/components/Common/CommonComponent" | |
| 29 | + ] | |
| 30 | + }, | |
| 31 | + "disableCSSModules": false, | |
| 32 | + "publicPath": "/", | |
| 33 | + "hash": true, | |
| 34 | + "extraBabelPlugins": [ | |
| 35 | + ["import", { "libraryName": "antd"}, "pc"], | |
| 36 | + ["import", { "libraryName": "antd-mobile", "style": true }, "mobile"] | |
| 37 | + ], | |
| 38 | + "define": { 'process.env.API': process.env.API }, | |
| 39 | + "env": { | |
| 40 | + "development": { | |
| 41 | + "extraBabelPlugins": [ | |
| 42 | + "dva-hmr", "dynamic-import-node" | |
| 43 | + ], | |
| 44 | + }, | |
| 45 | + "dllPlugin": { | |
| 46 | + "exclude": [ | |
| 47 | + "babel-runtime", | |
| 48 | + "roadhog" | |
| 49 | + ], | |
| 50 | + "include": [ | |
| 51 | + "dva/router", | |
| 52 | + "dva/saga", | |
| 53 | + "dva/fetch" | |
| 54 | + ] | |
| 55 | + } | |
| 56 | + }, | |
| 57 | + "commons": [ | |
| 58 | + { | |
| 59 | + "names": ["vendor", "antd", "components"], | |
| 60 | + "minChunks": "Infinity" | |
| 61 | + } | |
| 62 | + ], | |
| 63 | + "lessLoaderOptions": { | |
| 64 | + "javascriptEnabled": true | |
| 65 | + }, | |
| 66 | + "theme": { | |
| 67 | + "@primary-color": "#1890FF", | |
| 68 | + "@link-color": "#1890FF", | |
| 69 | + "@table-header-bg": '#e6e6e6', | |
| 70 | + "@disabled-bg": '#fff', | |
| 71 | + "@table-border-color": '#d9d9d9', | |
| 72 | + "@border-color-split": '#d9d9d9', | |
| 73 | + "@font-family": "Monospaced Number, Chinese Quote, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif", | |
| 74 | + }, | |
| 75 | + "html": { "template": "./src/index.ejs" } | |
| 76 | +} | ... | ... |
WW_verify_3IbaWKOXmkkYLaAK.txt
0 → 100644
| 1 | +3IbaWKOXmkkYLaAK | ... | ... |
app/index.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html> | |
| 3 | + <head> | |
| 4 | + <meta charset="utf-8"> | |
| 5 | + <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
| 6 | + <title></title> | |
| 7 | + <script src="./js/common.js" type="text/javascript"></script> | |
| 8 | + <script type="text/javascript"> | |
| 9 | + // function disp_confirm() | |
| 10 | + // { | |
| 11 | + // var r= confirm("Press a button") | |
| 12 | + // if (r) { | |
| 13 | + // plus.storage.setItem('privacyPolicy', 'agree'); | |
| 14 | + // } | |
| 15 | + // else | |
| 16 | + // { | |
| 17 | + // // plus.runtime.quit(); | |
| 18 | + // } | |
| 19 | + // } | |
| 20 | + document.addEventListener('plusready', function() { | |
| 21 | + const data = getUrlData(); | |
| 22 | + if (!data) { | |
| 23 | + window.location.href = 'http://118.178.131.219:8088/loginMobile'; | |
| 24 | + // showSettingPage(); | |
| 25 | + } else { | |
| 26 | + showMainPage(); | |
| 27 | + } | |
| 28 | + // const sPrivacyPolicy = plus.storage.getItem('privacyPolicy'); | |
| 29 | + // if (sPrivacyPolicy !== "agree") { | |
| 30 | + // disp_confirm(); | |
| 31 | + // } | |
| 32 | + }); | |
| 33 | + | |
| 34 | + function showSettingPage() { | |
| 35 | + const view = plus.webview.create('/setting.html', 'setting'); | |
| 36 | + view.show("pop-in"); | |
| 37 | + } | |
| 38 | + | |
| 39 | + function showMainPage() { | |
| 40 | + const waitTime = 5000; | |
| 41 | + const data = getUrlData(); | |
| 42 | + const url = `${data.protocol}://${data.url}:${data.port}/loginMobile`; | |
| 43 | + // window.location.href = url; | |
| 44 | + // console.log(url); | |
| 45 | + const webview = plus.webview.currentWebview(); | |
| 46 | + | |
| 47 | + const timerId = setTimeout(() => { | |
| 48 | + webview.loadURL('/setting.html'); | |
| 49 | + }, waitTime); | |
| 50 | + webview.onloaded = () => { | |
| 51 | + clearTimeout(timerId); | |
| 52 | + }; | |
| 53 | + webview.loadURL(url); | |
| 54 | + } | |
| 55 | + </script> | |
| 56 | + </head> | |
| 57 | + <body> | |
| 58 | + | |
| 59 | + </body> | |
| 60 | +</html> | ... | ... |
app/js/common.js
0 → 100644
| 1 | +/** | |
| 2 | + * @param {String} protocol 协议, http/https | |
| 3 | + * @param {string} url url地址 | |
| 4 | + * @param {number} port | |
| 5 | + */ | |
| 6 | +// eslint-disable-next-line no-unused-vars | |
| 7 | +function setUrlData(protocol, url, port) { | |
| 8 | + // eslint-disable-next-line no-undef | |
| 9 | + plus.storage.setItem('urlData', JSON.stringify({ | |
| 10 | + protocol, | |
| 11 | + url, | |
| 12 | + port, | |
| 13 | + })); | |
| 14 | +} | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * @return {{protocol:'http'|'https', url:string, port:number} | null} | |
| 18 | + */ | |
| 19 | +// eslint-disable-next-line no-unused-vars | |
| 20 | +function getUrlData() { | |
| 21 | + // eslint-disable-next-line no-undef | |
| 22 | + const str = plus.storage.getItem('urlData'); | |
| 23 | + try { | |
| 24 | + return JSON.parse(str); | |
| 25 | + } catch (e) { | |
| 26 | + return null; | |
| 27 | + } | |
| 28 | +} | |
| 29 | + | |
| 30 | +// eslint-disable-next-line no-unused-vars | |
| 31 | +function getDefaultUrlData() { | |
| 32 | + return { | |
| 33 | + protocol: 'http', | |
| 34 | + url: '118.178.131.219', | |
| 35 | + port: 8088, | |
| 36 | + }; | |
| 37 | +} | ... | ... |
app/manifest.json
0 → 100644
| 1 | +{ | |
| 2 | + "@platforms" : [ "android", "iPhone", "iPad" ], | |
| 3 | + "id" : "H5DCD0C6A", | |
| 4 | + /*应用的标识*/ | |
| 5 | + "name" : "小羚羊EBC", | |
| 6 | + /*应用名称,程序桌面图标名称*/ | |
| 7 | + "version" : { | |
| 8 | + "name" : "1.1", | |
| 9 | + /*应用版本名称*/ | |
| 10 | + "code" : 101 | |
| 11 | + }, | |
| 12 | + "description" : "", | |
| 13 | + /*应用描述信息*/ | |
| 14 | + "icons" : { | |
| 15 | + "72" : "icon.png" | |
| 16 | + }, | |
| 17 | + "launch_path" : "index.html", | |
| 18 | + /*应用的入口页面,默认为根目录下的index.html;支持网络地址,必须以http://或https://开头*/ | |
| 19 | + "developer" : { | |
| 20 | + "name" : "", | |
| 21 | + /*开发者名称*/ | |
| 22 | + "email" : "", | |
| 23 | + /*开发者邮箱地址*/ | |
| 24 | + "url" : "" /*开发者个人主页地址*/ | |
| 25 | + }, | |
| 26 | + "permissions" : { | |
| 27 | + "Accelerometer" : { | |
| 28 | + "description" : "访问加速度感应器" | |
| 29 | + }, | |
| 30 | + "Audio" : { | |
| 31 | + "description" : "访问麦克风" | |
| 32 | + }, | |
| 33 | + "Messaging" : { | |
| 34 | + "description" : "短彩邮件插件" | |
| 35 | + }, | |
| 36 | + "Cache" : { | |
| 37 | + "description" : "管理应用缓存" | |
| 38 | + }, | |
| 39 | + "Camera" : { | |
| 40 | + "description" : "访问摄像头" | |
| 41 | + }, | |
| 42 | + "Console" : { | |
| 43 | + "description" : "跟踪调试输出日志" | |
| 44 | + }, | |
| 45 | + "Contacts" : { | |
| 46 | + "description" : "访问系统联系人信息" | |
| 47 | + }, | |
| 48 | + "Device" : { | |
| 49 | + "description" : "访问设备信息" | |
| 50 | + }, | |
| 51 | + "Downloader" : { | |
| 52 | + "description" : "文件下载管理" | |
| 53 | + }, | |
| 54 | + "Events" : { | |
| 55 | + "description" : "应用扩展事件" | |
| 56 | + }, | |
| 57 | + "File" : { | |
| 58 | + "description" : "访问本地文件系统" | |
| 59 | + }, | |
| 60 | + "Gallery" : { | |
| 61 | + "description" : "访问系统相册" | |
| 62 | + }, | |
| 63 | + "Geolocation" : { | |
| 64 | + "description" : "访问位置信息" | |
| 65 | + }, | |
| 66 | + "Invocation" : { | |
| 67 | + "description" : "使用Native.js能力" | |
| 68 | + }, | |
| 69 | + "Orientation" : { | |
| 70 | + "description" : "访问方向感应器" | |
| 71 | + }, | |
| 72 | + "Proximity" : { | |
| 73 | + "description" : "访问距离感应器" | |
| 74 | + }, | |
| 75 | + "Storage" : { | |
| 76 | + "description" : "管理应用本地数据" | |
| 77 | + }, | |
| 78 | + "Uploader" : { | |
| 79 | + "description" : "管理文件上传任务" | |
| 80 | + }, | |
| 81 | + "Runtime" : { | |
| 82 | + "description" : "访问运行期环境" | |
| 83 | + }, | |
| 84 | + "XMLHttpRequest" : { | |
| 85 | + "description" : "跨域网络访问" | |
| 86 | + }, | |
| 87 | + "Zip" : { | |
| 88 | + "description" : "文件压缩与解压缩" | |
| 89 | + }, | |
| 90 | + "Barcode" : { | |
| 91 | + "description" : "管理二维码扫描插件" | |
| 92 | + }, | |
| 93 | + "Maps" : { | |
| 94 | + "description" : "管理地图插件" | |
| 95 | + }, | |
| 96 | + "Speech" : { | |
| 97 | + "description" : "管理语音识别插件" | |
| 98 | + }, | |
| 99 | + "Webview" : { | |
| 100 | + "description" : "窗口管理" | |
| 101 | + }, | |
| 102 | + "NativeUI" : { | |
| 103 | + "description" : "原生UI控件" | |
| 104 | + }, | |
| 105 | + "Navigator" : { | |
| 106 | + "description" : "浏览器信息" | |
| 107 | + }, | |
| 108 | + "NativeObj" : { | |
| 109 | + "description" : "原生对象" | |
| 110 | + } | |
| 111 | + }, | |
| 112 | + "plus" : { | |
| 113 | + "error" : { | |
| 114 | + "url" : "/setting.html" | |
| 115 | + }, | |
| 116 | + "splashscreen" : { | |
| 117 | + "autoclose" : true, | |
| 118 | + /*是否自动关闭程序启动界面,true表示应用加载应用入口页面后自动关闭;false则需调plus.navigator.closeSplashscreen()关闭*/ | |
| 119 | + "waiting" : true, /*是否在程序启动界面显示等待雪花,true表示显示,false表示不显示。*/ | |
| 120 | + "delay" : 1 | |
| 121 | + }, | |
| 122 | + "popGesture" : "close", | |
| 123 | + /*设置应用默认侧滑返回关闭Webview窗口,"none"为无侧滑返回功能,"hide"为侧滑隐藏Webview窗口。参考http://ask.dcloud.net.cn/article/102*/ | |
| 124 | + "runmode" : "normal", | |
| 125 | + /*应用的首次启动运行模式,可取liberate或normal,liberate模式在第一次启动时将解压应用资源(Android平台File API才可正常访问_www目录)*/ | |
| 126 | + "signature" : "Sk9JTiBVUyBtYWlsdG86aHIyMDEzQGRjbG91ZC5pbw==", | |
| 127 | + /*可选,保留给应用签名,暂不使用*/ | |
| 128 | + "distribute" : { | |
| 129 | + "apple" : { | |
| 130 | + "appid" : "", | |
| 131 | + /*iOS应用标识,苹果开发网站申请的appid,如io.dcloud.HelloH5*/ | |
| 132 | + "mobileprovision" : "", | |
| 133 | + /*iOS应用打包配置文件*/ | |
| 134 | + "password" : "", | |
| 135 | + /*iOS应用打包个人证书导入密码*/ | |
| 136 | + "p12" : "", | |
| 137 | + /*iOS应用打包个人证书,打包配置文件关联的个人证书*/ | |
| 138 | + "devices" : "universal", | |
| 139 | + /*iOS应用支持的设备类型,可取值iphone/ipad/universal*/ | |
| 140 | + "frameworks" : [] /*调用Native.js调用原生Objective-c API需要引用的FrameWork,如需调用GameCenter,则添加"GameKit.framework"*/ | |
| 141 | + }, | |
| 142 | + "google" : { | |
| 143 | + "packagename" : "", | |
| 144 | + /*Android应用包名,如io.dcloud.HelloH5*/ | |
| 145 | + "keystore" : "", | |
| 146 | + /*Android应用打包使用的密钥库文件*/ | |
| 147 | + "password" : "", | |
| 148 | + /*Android应用打包使用密钥库中证书的密码*/ | |
| 149 | + "aliasname" : "", | |
| 150 | + /*Android应用打包使用密钥库中证书的别名*/ | |
| 151 | + "permissions" : [ | |
| 152 | + "<uses-feature android:name=\"android.hardware.camera\"/>", | |
| 153 | + "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", | |
| 154 | + "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", | |
| 155 | + "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", | |
| 156 | + "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", | |
| 157 | + "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", | |
| 158 | + "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", | |
| 159 | + "<uses-permission android:name=\"android.permission.CAMERA\"/>", | |
| 160 | + "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", | |
| 161 | + "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", | |
| 162 | + "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", | |
| 163 | + "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", | |
| 164 | + "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", | |
| 165 | + "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", | |
| 166 | + "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", | |
| 167 | + "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", | |
| 168 | + "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", | |
| 169 | + "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", | |
| 170 | + "<uses-permission android:name=\"android.permission.VIBRATE\"/>", | |
| 171 | + "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", | |
| 172 | + "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", | |
| 173 | + "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" | |
| 174 | + ] | |
| 175 | + }, | |
| 176 | + /*使用Native.js调用原生安卓API需要使用到的系统权限*/ | |
| 177 | + "orientation" : [ "portrait-primary" ], | |
| 178 | + /*应用支持的方向,portrait-primary:竖屏正方向;portrait-secondary:竖屏反方向;landscape-primary:横屏正方向;landscape-secondary:横屏反方向*/ | |
| 179 | + "icons" : { | |
| 180 | + "ios" : { | |
| 181 | + "prerendered" : true, | |
| 182 | + /*应用图标是否已经高亮处理,在iOS6及以下设备上有效*/ | |
| 183 | + "auto" : "", | |
| 184 | + /*应用图标,分辨率:512x512,用于自动生成各种尺寸程序图标*/ | |
| 185 | + "iphone" : { | |
| 186 | + "normal" : "", | |
| 187 | + /*iPhone3/3GS程序图标,分辨率:57x57*/ | |
| 188 | + "retina" : "", | |
| 189 | + /*iPhone4程序图标,分辨率:114x114*/ | |
| 190 | + "retina7" : "", | |
| 191 | + /*iPhone4S/5/6程序图标,分辨率:120x120*/ | |
| 192 | + "retina8" : "", | |
| 193 | + /*iPhone6 Plus程序图标,分辨率:180x180*/ | |
| 194 | + "spotlight-normal" : "", | |
| 195 | + /*iPhone3/3GS Spotlight搜索程序图标,分辨率:29x29*/ | |
| 196 | + "spotlight-retina" : "", | |
| 197 | + /*iPhone4 Spotlight搜索程序图标,分辨率:58x58*/ | |
| 198 | + "spotlight-retina7" : "", | |
| 199 | + /*iPhone4S/5/6 Spotlight搜索程序图标,分辨率:80x80*/ | |
| 200 | + "settings-normal" : "", | |
| 201 | + /*iPhone4设置页面程序图标,分辨率:29x29*/ | |
| 202 | + "settings-retina" : "", | |
| 203 | + /*iPhone4S/5/6设置页面程序图标,分辨率:58x58*/ | |
| 204 | + "settings-retina8" : "", /*iPhone6Plus设置页面程序图标,分辨率:87x87*/ | |
| 205 | + "app@2x" : "unpackage/res/icons/120x120.png", | |
| 206 | + "app@3x" : "unpackage/res/icons/180x180.png", | |
| 207 | + "notification@2x" : "unpackage/res/icons/40x40.png", | |
| 208 | + "notification@3x" : "unpackage/res/icons/60x60.png", | |
| 209 | + "settings@2x" : "unpackage/res/icons/58x58.png", | |
| 210 | + "settings@3x" : "unpackage/res/icons/87x87.png", | |
| 211 | + "spotlight@2x" : "unpackage/res/icons/80x80.png", | |
| 212 | + "spotlight@3x" : "unpackage/res/icons/120x120.png" | |
| 213 | + }, | |
| 214 | + "ipad" : { | |
| 215 | + "normal" : "", | |
| 216 | + /*iPad普通屏幕程序图标,分辨率:72x72*/ | |
| 217 | + "retina" : "", | |
| 218 | + /*iPad高分屏程序图标,分辨率:144x144*/ | |
| 219 | + "normal7" : "", | |
| 220 | + /*iPad iOS7程序图标,分辨率:76x76*/ | |
| 221 | + "retina7" : "", | |
| 222 | + /*iPad iOS7高分屏程序图标,分辨率:152x152*/ | |
| 223 | + "spotlight-normal" : "", | |
| 224 | + /*iPad Spotlight搜索程序图标,分辨率:50x50*/ | |
| 225 | + "spotlight-retina" : "", | |
| 226 | + /*iPad高分屏Spotlight搜索程序图标,分辨率:100x100*/ | |
| 227 | + "spotlight-normal7" : "", | |
| 228 | + /*iPad iOS7 Spotlight搜索程序图标,分辨率:40x40*/ | |
| 229 | + "spotlight-retina7" : "", | |
| 230 | + /*iPad iOS7高分屏Spotlight搜索程序图标,分辨率:80x80*/ | |
| 231 | + "settings-normal" : "", | |
| 232 | + /*iPad设置页面程序图标,分辨率:29x29*/ | |
| 233 | + "settings-retina" : "", /*iPad高分屏设置页面程序图标,分辨率:58x58*/ | |
| 234 | + "app" : "unpackage/res/icons/76x76.png", | |
| 235 | + "app@2x" : "unpackage/res/icons/152x152.png", | |
| 236 | + "notification" : "unpackage/res/icons/20x20.png", | |
| 237 | + "notification@2x" : "unpackage/res/icons/40x40.png", | |
| 238 | + "proapp@2x" : "unpackage/res/icons/167x167.png", | |
| 239 | + "settings" : "unpackage/res/icons/29x29.png", | |
| 240 | + "settings@2x" : "unpackage/res/icons/58x58.png", | |
| 241 | + "spotlight" : "unpackage/res/icons/40x40.png", | |
| 242 | + "spotlight@2x" : "unpackage/res/icons/80x80.png" | |
| 243 | + }, | |
| 244 | + "appstore" : "unpackage/res/icons/1024x1024.png" | |
| 245 | + }, | |
| 246 | + "android" : { | |
| 247 | + "mdpi" : "", | |
| 248 | + /*普通屏程序图标,分辨率:48x48*/ | |
| 249 | + "ldpi" : "", | |
| 250 | + /*大屏程序图标,分辨率:48x48*/ | |
| 251 | + "hdpi" : "unpackage/res/icons/72x72.png", | |
| 252 | + /*高分屏程序图标,分辨率:72x72*/ | |
| 253 | + "xhdpi" : "unpackage/res/icons/96x96.png", | |
| 254 | + /*720P高分屏程序图标,分辨率:96x96*/ | |
| 255 | + "xxhdpi" : "unpackage/res/icons/144x144.png", /*1080P 高分屏程序图标,分辨率:144x144*/ | |
| 256 | + "xxxhdpi" : "unpackage/res/icons/192x192.png" | |
| 257 | + } | |
| 258 | + }, | |
| 259 | + "splashscreen" : { | |
| 260 | + "ios" : { | |
| 261 | + "iphone" : { | |
| 262 | + "default" : "", | |
| 263 | + /*iPhone3启动图片选,分辨率:320x480*/ | |
| 264 | + "retina35" : "", | |
| 265 | + /*3.5英寸设备(iPhone4)启动图片,分辨率:640x960*/ | |
| 266 | + "retina40" : "", | |
| 267 | + /*4.0 英寸设备(iPhone5/iPhone5s)启动图片,分辨率:640x1136*/ | |
| 268 | + "retina47" : "", | |
| 269 | + /*4.7 英寸设备(iPhone6)启动图片,分辨率:750x1334*/ | |
| 270 | + "retina55" : "", | |
| 271 | + /*5.5 英寸设备(iPhone6 Plus)启动图片,分辨率:1242x2208*/ | |
| 272 | + "retina55l" : "" /*5.5 英寸设备(iPhone6 Plus)横屏启动图片,分辨率:2208x1242*/ | |
| 273 | + }, | |
| 274 | + "ipad" : { | |
| 275 | + "portrait" : "", | |
| 276 | + /*iPad竖屏启动图片,分辨率:768x1004*/ | |
| 277 | + "portrait-retina" : "", | |
| 278 | + /*iPad高分屏竖屏图片,分辨率:1536x2008*/ | |
| 279 | + "landscape" : "", | |
| 280 | + /*iPad横屏启动图片,分辨率:1024x748*/ | |
| 281 | + "landscape-retina" : "", | |
| 282 | + /*iPad高分屏横屏启动图片,分辨率:2048x1496*/ | |
| 283 | + "portrait7" : "", | |
| 284 | + /*iPad iOS7竖屏启动图片,分辨率:768x1024*/ | |
| 285 | + "portrait-retina7" : "", | |
| 286 | + /*iPad iOS7高分屏竖屏图片,分辨率:1536x2048*/ | |
| 287 | + "landscape7" : "", | |
| 288 | + /*iPad iOS7横屏启动图片,分辨率:1024x768*/ | |
| 289 | + "landscape-retina7" : "" /*iPad iOS7高分屏横屏启动图片,分辨率:2048x1536*/ | |
| 290 | + } | |
| 291 | + }, | |
| 292 | + "android" : { | |
| 293 | + "mdpi" : "", | |
| 294 | + /*普通屏启动图片,分辨率:240x282*/ | |
| 295 | + "ldpi" : "", | |
| 296 | + /*大屏启动图片,分辨率:320x442*/ | |
| 297 | + "hdpi" : "", | |
| 298 | + /*高分屏启动图片,分辨率:480x762*/ | |
| 299 | + "xhdpi" : "", | |
| 300 | + /*720P高分屏启动图片,分辨率:720x1242*/ | |
| 301 | + "xxhdpi" : "" /*1080P高分屏启动图片,分辨率:1080x1882*/ | |
| 302 | + }, | |
| 303 | + "androidStyle" : "common" | |
| 304 | + }, | |
| 305 | + "plugins" : { | |
| 306 | + "speech" : { | |
| 307 | + "ifly" : {} | |
| 308 | + }, | |
| 309 | + "ad" : {} | |
| 310 | + }, | |
| 311 | + "ios" : { | |
| 312 | + "dSYMs" : false | |
| 313 | + } | |
| 314 | + } | |
| 315 | + }, | |
| 316 | + "screenOrientation" : [ "portrait-primary" ] | |
| 317 | +} | ... | ... |
app/setting.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html> | |
| 3 | + <head> | |
| 4 | + <meta charset="utf-8"> | |
| 5 | + <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
| 6 | + <title></title> | |
| 7 | + <script src="./js/common.js"></script> | |
| 8 | + <style> | |
| 9 | + * { | |
| 10 | + box-sizing: border-box; | |
| 11 | + } | |
| 12 | + | |
| 13 | + html, | |
| 14 | + body { | |
| 15 | + margin: 0; | |
| 16 | + padding: 0; | |
| 17 | + color: #666; | |
| 18 | + font-size: 14px; | |
| 19 | + } | |
| 20 | + | |
| 21 | + header{ | |
| 22 | + background-color: #f2f2f2; | |
| 23 | + padding: 15px 10px; | |
| 24 | + font-weight: bold; | |
| 25 | + font-size: 16px; | |
| 26 | + } | |
| 27 | + | |
| 28 | + main { | |
| 29 | + margin: 10px; | |
| 30 | + } | |
| 31 | + | |
| 32 | + h3 { | |
| 33 | + font-size: 14px; | |
| 34 | + margin: 20px 0 5px 0; | |
| 35 | + font-weight: normal; | |
| 36 | + } | |
| 37 | + | |
| 38 | + select, | |
| 39 | + input { | |
| 40 | + border: none; | |
| 41 | + border-bottom: 1px solid #eee; | |
| 42 | + width: 100%; | |
| 43 | + outline: none; | |
| 44 | + padding: 10px 0; | |
| 45 | + transition: all 0.3s; | |
| 46 | + color: #666; | |
| 47 | + border-radius: 0; | |
| 48 | + } | |
| 49 | + | |
| 50 | + input:focus { | |
| 51 | + border-bottom: 1px solid #aaa; | |
| 52 | + } | |
| 53 | + | |
| 54 | + button { | |
| 55 | + background-color: #f2f2f2; | |
| 56 | + color: #1d498d; | |
| 57 | + border: none; | |
| 58 | + width: 100%; | |
| 59 | + padding: 8px; | |
| 60 | + border-radius: 8px; | |
| 61 | + outline: none; | |
| 62 | + transition: all 0.3s; | |
| 63 | + } | |
| 64 | + | |
| 65 | + button:active { | |
| 66 | + background-color: #d9dede; | |
| 67 | + } | |
| 68 | + | |
| 69 | + .ControlGroup { | |
| 70 | + display: flex; | |
| 71 | + } | |
| 72 | + | |
| 73 | + .ControlGroup>*:not(:last-child) { | |
| 74 | + margin-right: 10px; | |
| 75 | + } | |
| 76 | + | |
| 77 | + .BottomFixed { | |
| 78 | + position: fixed; | |
| 79 | + bottom: 10px; | |
| 80 | + left: 10px; | |
| 81 | + right: 10px; | |
| 82 | + } | |
| 83 | + </style> | |
| 84 | + <script type="text/javascript"> | |
| 85 | + let settingData; | |
| 86 | + | |
| 87 | + document.addEventListener('plusready', function() { | |
| 88 | + settingData = getUrlData() || getDefaultUrlData(); | |
| 89 | + updateDisplay(); | |
| 90 | + addListeners(); | |
| 91 | + }); | |
| 92 | + | |
| 93 | + function updateDisplay() { | |
| 94 | + const data = settingData; | |
| 95 | + document.getElementById('stProtocol').value = data.protocol; | |
| 96 | + document.getElementById('tbIp').value = data.url; | |
| 97 | + document.getElementById('tbPort').value = data.port; | |
| 98 | + } | |
| 99 | + | |
| 100 | + function close() { | |
| 101 | + plus.webview.currentWebview().close(); | |
| 102 | + } | |
| 103 | + | |
| 104 | + function addListeners() { | |
| 105 | + document.getElementById('stProtocol').addEventListener('change', (event) => { | |
| 106 | + settingData.protocol = event.target.value; | |
| 107 | + }); | |
| 108 | + document.getElementById('tbIp').addEventListener('change', (event) => { | |
| 109 | + settingData.url = event.target.value; | |
| 110 | + }); | |
| 111 | + document.getElementById('tbPort').addEventListener('change', (event) => { | |
| 112 | + settingData.port = event.target.value; | |
| 113 | + }); | |
| 114 | + | |
| 115 | + document.getElementById('btnSave').addEventListener('click', () => { | |
| 116 | + let error = ''; | |
| 117 | + if (!settingData.url) { | |
| 118 | + error = '请填写url'; | |
| 119 | + } else if (!settingData.port) { | |
| 120 | + error = '请填写端口号'; | |
| 121 | + } else if (isNaN(settingData.port)) { | |
| 122 | + error = '请输入正确的端口号' | |
| 123 | + } | |
| 124 | + | |
| 125 | + if (error) { | |
| 126 | + plus.nativeUI.toast(error); | |
| 127 | + return; | |
| 128 | + } | |
| 129 | + setUrlData(settingData.protocol, settingData.url, settingData.port); | |
| 130 | + plus.runtime.restart(); | |
| 131 | + }); | |
| 132 | + | |
| 133 | + document.getElementById('btnCancel').addEventListener('click', (event) => { | |
| 134 | + plus.runtime.restart(); | |
| 135 | + }); | |
| 136 | + } | |
| 137 | + </script> | |
| 138 | + </head> | |
| 139 | + <body> | |
| 140 | + <header>服务器设置</header> | |
| 141 | + <main> | |
| 142 | + <h3>协议</h3> | |
| 143 | + <select id='stProtocol'> | |
| 144 | + <option value="http">http</option> | |
| 145 | + <option value="https">https</option> | |
| 146 | + </select> | |
| 147 | + | |
| 148 | + <h3>IP地址</h3> | |
| 149 | + <input id="tbIp" /> | |
| 150 | + <h3>端口号</h3> | |
| 151 | + <input id="tbPort" /> | |
| 152 | + <div class="ControlGroup BottomFixed"> | |
| 153 | + <button id='btnCancel'>取消</button> | |
| 154 | + <button id='btnSave'>保存</button> | |
| 155 | + </div> | |
| 156 | + </main> | |
| 157 | + </body> | |
| 158 | +</html> | ... | ... |
app/unpackage/res/icons/1024x1024.png
0 → 100644
59.6 KB
app/unpackage/res/icons/120x120.png
0 → 100644
12.3 KB
app/unpackage/res/icons/144x144.png
0 → 100644
15.6 KB
app/unpackage/res/icons/152x152.png
0 → 100644
16.6 KB
app/unpackage/res/icons/167x167.png
0 → 100644
18.6 KB
app/unpackage/res/icons/180x180.png
0 → 100644
20.4 KB
app/unpackage/res/icons/192x192.png
0 → 100644
22.1 KB
app/unpackage/res/icons/20x20.png
0 → 100644
1.24 KB
app/unpackage/res/icons/29x29.png
0 → 100644
2.04 KB
app/unpackage/res/icons/40x40.png
0 → 100644
3.12 KB
app/unpackage/res/icons/58x58.png
0 → 100644
5.02 KB
app/unpackage/res/icons/60x60.png
0 → 100644
5.3 KB
app/unpackage/res/icons/72x72.png
0 → 100644
6.61 KB
app/unpackage/res/icons/76x76.png
0 → 100644
7.11 KB
app/unpackage/res/icons/80x80.png
0 → 100644
7.59 KB
app/unpackage/res/icons/87x87.png
0 → 100644
8.36 KB
app/unpackage/res/icons/96x96.png
0 → 100644
9.43 KB
app/unpackage/res/icons/移动端LOGO-16-2.png
0 → 100644
934 Bytes
app/unpackage/res/icons/移动端LOGO-512-2.png
0 → 100644
72.1 KB
package.json
| 1 | 1 | { |
| 2 | + "name": "dik-dik", | |
| 3 | + "version": "1.0.5", | |
| 2 | 4 | "private": true, |
| 3 | - "author": "zhangzhen <525765282@qq.com>", | |
| 4 | 5 | "scripts": { |
| 5 | - "dev": "cross-env PORT=9000 umi dev", | |
| 6 | - "build": "umi build", | |
| 7 | - "postinstall": "umi setup", | |
| 8 | - "setup": "umi setup", | |
| 9 | - "start": "npm run dev" | |
| 6 | + "start": "cross-env PORT=8035 roadhog server --progress --watch --colors --profile", | |
| 7 | + "build": "roadhog build", | |
| 8 | + "lint": "eslint --ext .js src test", | |
| 9 | + "precommit": "npm run lint" | |
| 10 | + }, | |
| 11 | + "engines": { | |
| 12 | + "install-node": "6.9.2" | |
| 10 | 13 | }, |
| 11 | 14 | "dependencies": { |
| 12 | - "@ant-design/compatible": "^1.1.2", | |
| 13 | - "@ant-design/icons": "^5.6.1", | |
| 14 | - "@antv/data-set": "^0.11.8", | |
| 15 | + "@ant-design/compatible": "^1.0.8", | |
| 16 | + "@ant-design/icons": "^4.6.2", | |
| 17 | + "@antv/data-set": "0.10.1", | |
| 15 | 18 | "@antv/g2": "^4.1.24", |
| 16 | - "@js-preview/docx": "^1.6.4", | |
| 17 | - "@js-preview/excel": "^1.7.14", | |
| 19 | + "@js-preview/docx": "^1.3.0", | |
| 20 | + "@js-preview/excel": "^1.4.4", | |
| 18 | 21 | "@js-preview/pdf": "^2.0.10", |
| 19 | - "antd": "^5.24.3", | |
| 20 | - "antd-mobile": "5.37.1", | |
| 21 | - "antd-mobile-icons": "^0.3.0", | |
| 22 | - "antd-mobile-v2": "2.3.4", | |
| 23 | - "antd-v4": "npm:antd@4.24.16", | |
| 24 | - "braft-editor": "^2.3.9", | |
| 25 | - "classnames": "^2.5.1", | |
| 26 | - "dhtmlx-gantt": "^9.0.6", | |
| 27 | - "g2": "^2.3.13", | |
| 28 | - "g2-plugin-slider": "^1.2.1", | |
| 29 | - "immutability-helper": "^3.1.1", | |
| 30 | - "lodash": "^4.17.21", | |
| 31 | - "lodash-decorators": "^6.0.1", | |
| 32 | - "moment": "^2.30.1", | |
| 33 | - "numeral": "^2.0.6", | |
| 34 | - "rc-form": "2.4.11", | |
| 35 | - "react-dnd": "^14.0.5", | |
| 36 | - "react-dnd-html5-backend": "^14.1.0", | |
| 22 | + "ahooks": "^2.10.9", | |
| 23 | + "antd": "^4.24.16", | |
| 24 | + "antd-mobile": "^2.3.1", | |
| 25 | + "babel-plugin-transform-decorators-legacy": "1.3.5", | |
| 26 | + "babel-polyfill": "6.26.0", | |
| 27 | + "babel-runtime": "6.26.0", | |
| 28 | + "classnames": "^2.2.6", | |
| 29 | + "copy-to-clipboard": "^3.3.1", | |
| 30 | + "core-js": "3.6.5", | |
| 31 | + "dhtmlx-gantt": "^7.1.6", | |
| 32 | + "dva": "^2.4.1", | |
| 33 | + "dva-router-config": "^1.1.0", | |
| 34 | + "g-cloud": "1.0.2-beta", | |
| 35 | + "g2": "2.3.13", | |
| 36 | + "g2-plugin-slider": "1.2.1", | |
| 37 | + "history": "^5.3.0", | |
| 38 | + "immutability-helper": "^3.0.1", | |
| 39 | + "jsqr": "^1.3.1", | |
| 40 | + "lodash": "4.17.11", | |
| 41 | + "lodash-decorators": "6.0.0", | |
| 42 | + "lodash.clonedeep": "4.5.0", | |
| 43 | + "moment": "2.22.2", | |
| 44 | + "numeral": "2.0.6", | |
| 45 | + "prop-types": "15.6.2", | |
| 46 | + "qs": "6.5.2", | |
| 47 | + "quagga": "^0.12.1", | |
| 48 | + "rc-form": "^2.4.11", | |
| 49 | + "react": "^18.2.0", | |
| 50 | + "react-container-query": "0.11.0", | |
| 51 | + "react-dnd": "^14.0.2", | |
| 52 | + "react-dnd-html5-backend": "^14.0.0", | |
| 53 | + "react-document-title": "2.0.3", | |
| 54 | + "react-dom": "^18.2.0", | |
| 37 | 55 | "react-draggable": "4.4.5", |
| 38 | 56 | "react-fittext": "1.0.0", |
| 39 | - "react-flow-renderer": "^10.3.17", | |
| 40 | - "react-grid-layout": "^1.3.4", | |
| 41 | - "react-highlight-words": "^0.21.0", | |
| 42 | - "react-pdf": "^5.7.2", | |
| 43 | - "react-resizable": "^3.0.5", | |
| 57 | + "react-flow-renderer": "^10.3.16", | |
| 58 | + "react-grid-layout": "1.3.4", | |
| 59 | + "react-highlight-words": "0.16.0", | |
| 60 | + "react-hot-keys": "1.3.1", | |
| 61 | + "react-pdf": "^5.5.0", | |
| 62 | + "react-resizable": "^3.0.4", | |
| 44 | 63 | "react-sortable-hoc": "^2.0.0", |
| 45 | - "react-to-print": "^3.0.5", | |
| 46 | - "umi": "^4.4.11", | |
| 47 | - "weixin-js-sdk": "1.6.0", | |
| 48 | - "xlsx": "^0.18.5" | |
| 64 | + "react-to-print": "^3.0.2", | |
| 65 | + "react-window": "^1.8.6", | |
| 66 | + "sortablejs": "^1.15.0", | |
| 67 | + "terser-webpack-plugin-legacy": "^1.2.5", | |
| 68 | + "url-loader": "^4.1.1", | |
| 69 | + "vconsole": "^3.3.4", | |
| 70 | + "virtuallist-antd": "^0.6.3", | |
| 71 | + "weixin-js-sdk": "^1.6.0" | |
| 49 | 72 | }, |
| 50 | 73 | "devDependencies": { |
| 51 | - "@types/react": "^18.0.33", | |
| 52 | - "@types/react-dom": "^18.0.11", | |
| 53 | - "@umijs/plugins": "^4.4.6", | |
| 54 | - "cross-env": "^7.0.3", | |
| 55 | - "prettier": "^2.8.8", | |
| 56 | - "prettier-plugin-organize-imports": "^3.2.2", | |
| 57 | - "prettier-plugin-packagejson": "^2.4.3", | |
| 58 | - "typescript": "^5.0.3" | |
| 59 | - } | |
| 60 | -} | |
| 61 | 74 | \ No newline at end of file |
| 75 | + "antd-mobile-icons": "^0.3.0", | |
| 76 | + "babel-eslint": "8.2.5", | |
| 77 | + "babel-jest": "21.0.0", | |
| 78 | + "babel-plugin-dva-hmr": "0.4.1", | |
| 79 | + "babel-plugin-dynamic-import-node": "^2.3.3", | |
| 80 | + "babel-plugin-import": "1.11.0", | |
| 81 | + "babel-plugin-transform-class-properties": "6.24.1", | |
| 82 | + "babel-plugin-transform-decorators-legacy": "1.3.4", | |
| 83 | + "babel-plugin-transform-runtime": "6.23.0", | |
| 84 | + "babel-preset-env": "1.7.0", | |
| 85 | + "babel-preset-react": "6.24.1", | |
| 86 | + "braft-editor": "^2.3.9", | |
| 87 | + "cross-env": "5.2.0", | |
| 88 | + "cross-port-killer": "1.0.1", | |
| 89 | + "dva-router-config": "^1.1.0", | |
| 90 | + "enzyme": "3.7.0", | |
| 91 | + "enzyme-adapter-react-16": "1.6.0", | |
| 92 | + "eslint": "4.19.1", | |
| 93 | + "eslint-config-airbnb": "16.1.0", | |
| 94 | + "eslint-plugin-babel": "4.1.2", | |
| 95 | + "eslint-plugin-compat": "2.6.2", | |
| 96 | + "eslint-plugin-import": "2.14.0", | |
| 97 | + "eslint-plugin-jsx-a11y": "6.1.2", | |
| 98 | + "eslint-plugin-markdown": "1.0.0-beta.6", | |
| 99 | + "eslint-plugin-react": "7.11.1", | |
| 100 | + "expect": "1.20.2", | |
| 101 | + "gh-pages": "1.2.0", | |
| 102 | + "jest": "21.2.1", | |
| 103 | + "lint-staged": "4.3.0", | |
| 104 | + "lodash.flow": "^3.5.0", | |
| 105 | + "mockjs": "1.0.1-beta3", | |
| 106 | + "prettier": "1.14.3", | |
| 107 | + "pro-download": "1.0.1", | |
| 108 | + "react-test-renderer": "15.6.1", | |
| 109 | + "redbox-react": "1.6.0", | |
| 110 | + "roadhog-api-doc": "0.3.4", | |
| 111 | + "rollbar": "2.5.0", | |
| 112 | + "stylelint": "9.7.1", | |
| 113 | + "stylelint-config-standard": "18.2.0", | |
| 114 | + "svg-sprite-loader": "^6.0.11", | |
| 115 | + "svgo-loader": "^3.0.0", | |
| 116 | + "xly_roadhog": "^1.2.3" | |
| 117 | + }, | |
| 118 | + "optionalDependencies": { | |
| 119 | + "nightmare": "2.10.0" | |
| 120 | + }, | |
| 121 | + "babel": { | |
| 122 | + "presets": [ | |
| 123 | + "env", | |
| 124 | + "react" | |
| 125 | + ], | |
| 126 | + "plugins": [ | |
| 127 | + "transform-decorators-legacy", | |
| 128 | + "transform-class-properties" | |
| 129 | + ] | |
| 130 | + }, | |
| 131 | + "jest": { | |
| 132 | + "setupFiles": [ | |
| 133 | + "<rootDir>/tests/setupTests.js" | |
| 134 | + ], | |
| 135 | + "testMatch": [ | |
| 136 | + "**/?(*.)(spec|test|e2e).js?(x)" | |
| 137 | + ], | |
| 138 | + "setupTestFrameworkScriptFile": "<rootDir>/tests/jasmine.js", | |
| 139 | + "moduleFileExtensions": [ | |
| 140 | + "js", | |
| 141 | + "jsx" | |
| 142 | + ], | |
| 143 | + "moduleNameMapper": { | |
| 144 | + "\\.(css|less)$": "<rootDir>/tests/styleMock.js" | |
| 145 | + } | |
| 146 | + }, | |
| 147 | + "lint-staged": { | |
| 148 | + "**/*.{js,jsx}": "lint-staged:js", | |
| 149 | + "**/*.less": "stylelint --syntax less" | |
| 150 | + }, | |
| 151 | + "browserslist": [ | |
| 152 | + "> 1%", | |
| 153 | + "last 2 versions", | |
| 154 | + "not ie <= 10" | |
| 155 | + ] | |
| 156 | +} | ... | ... |
public/about.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html lang="en"> | |
| 3 | +<head> | |
| 4 | + <meta charset="UTF-8"> | |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| 6 | + <title>用户协议与隐私政策</title> | |
| 7 | +</head> | |
| 8 | +<body> | |
| 9 | +<div style="padding:0.5rem 2rem"> | |
| 10 | +<h3 style="text-align: center">用户协议与隐私政策</h3> | |
| 11 | +<p>感谢您选择小羚羊EBC!<br /> | |
| 12 | + 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前,请务必审慎阅读 | |
| 13 | + <a href="serviceAgreement.html">《小羚羊EBC服务协议》</a>与 | |
| 14 | + <a href="privacyPolicy.html">《小羚羊EBC隐私政策》</a>内的所有条款,尤其是:<br /> | |
| 15 | + 1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;<br /> | |
| 16 | + 2.约定我们的限制责任、免责条款。<br /> | |
| 17 | + 3.其他以颜色或加粗进行标识的重要条款。<br /> | |
| 18 | + 如您对以上协议有任何疑问,可通过人工客服或发邮件至yanghl@xlyerp.com与我们联系。</p><br/> | |
| 19 | +<div style="text-align: center"><button onclick="window.history.back(-1);" > 返回</button></div> | |
| 20 | +</div> | |
| 21 | +</body> | |
| 22 | +</html> | ... | ... |
public/favicon.ico
0 → 100644
No preview for this file type
public/favicons.ico deleted
No preview for this file type
public/index.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html lang="en"> | |
| 3 | +<head> | |
| 4 | + <meta charset="UTF-8"> | |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| 6 | + <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> | |
| 7 | + <title>小羚羊EBC前台业务系统</title> | |
| 8 | + <link rel="stylesheet" href="/components.css" /> | |
| 9 | + <link rel="stylesheet" href="/index.css" /> | |
| 10 | + <!--<link rel="icon" href="/public/favicon.ico" type="image/x-icon">--> | |
| 11 | +</head> | |
| 12 | + | |
| 13 | +<body> | |
| 14 | + | |
| 15 | +<div id="root"></div> | |
| 16 | + | |
| 17 | +<script type="text/javascript" src="/components.js"></script> | |
| 18 | +<script type="text/javascript" src="/antd.js"></script> | |
| 19 | +<script type="text/javascript" src="/vendor.js"></script> | |
| 20 | +<script type="text/javascript" src="/index.js"></script> | |
| 21 | + | |
| 22 | +<!--<script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script>--> | |
| 23 | +<!--<script>--> | |
| 24 | +<!-- // 初始化--> | |
| 25 | +<!-- var vConsole = new VConsole();--> | |
| 26 | +<!-- </script>--> | |
| 27 | +</body> | |
| 28 | +</html> | ... | ... |
public/pinban.json
0 → 100644
public/privacyPolicy.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html lang="en"> | |
| 3 | +<head> | |
| 4 | + <meta charset="UTF-8"> | |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| 6 | + <title>小羚羊EBC隐私政策</title> | |
| 7 | +</head> | |
| 8 | +<body> | |
| 9 | +本应用非常重视用户隐私政策并严格遵守相关的法律规定。请您仔细阅读《隐私政策》后再继续使用。如果您继续使用我们的服务,表示您已经充分阅读和理解我们协议的全部内容。 | |
| 10 | +本app尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更优质的服务,本应用会按照本隐私权政策的规定使用和披露您的个人信息。除本隐私权政策另有规定外,在未征得您事先许可的情况下,本应用不会将这些信息对外披露或向第三方提供。本应用会不时更新本隐私权政策。您在同意本应用服务使用协议之时,即视为您已经同意本隐私权政策全部内容。 | |
| 11 | +1.适用范围 | |
| 12 | +(a)在您注册本应用app帐号时,您根据app要求提供的个人注册信息; | |
| 13 | +(b)在您使用本应用网络服务,或访问本应用平台网页时,本应用自动接收并记录的您的浏览器和计算机上的信息,包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据; | |
| 14 | +(c)本应用通过合法途径从商业伙伴处取得的用户个人数据。 | |
| 15 | +(d)本应用严禁用户发布不良信息,如裸露、色情和亵渎内容,发布的内容我们会进行审核,一经发现不良信息,会禁用该用户的所有权限,予以封号处理。 | |
| 16 | +2.信息使用 | |
| 17 | +(a)本应用不会向任何无关第三方提供、出售、出租、分享或交易您的个人登录信息。如果我们存储发生维修或升级,我们会事先发出推送消息来通知您,请您提前允许本应用消息通知。 | |
| 18 | +(b)本应用亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。任何本应用平台用户如从事上述活动,一经发现,本应用有权立即终止与该用户的服务协议。 | |
| 19 | +(c)为服务用户的目的,本应用可能通过使用您的个人信息,向您提供您感兴趣的信息,包括但不限于向您发出产品和服务信息,或者与本应用合作伙伴共享信息以便他们向您发送有关其产品和服务的信息(后者需要您的事先同意)。 | |
| 20 | +3.信息披露 | |
| 21 | +在如下情况下,本应用将依据您的个人意愿或法律的规定全部或部分的披露您的个人信息: | |
| 22 | +(a)未经您事先同意,我们不会向第三方披露; | |
| 23 | +(b)为提供您所要求的产品和服务,而必须和第三方分享您的个人信息; | |
| 24 | +(c)根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露; | |
| 25 | +(d)如您出现违反中国有关法律、法规或者本应用服务协议或相关规则的情况,需要向第三方披露; | |
| 26 | +(e)如您是适格的知识产权投诉人并已提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷; | |
| 27 | +4.信息存储和交换 | |
| 28 | +本应用收集的有关您的信息和资料将保存在本应用及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家、地区或本应用收集信息和资料所在地的境外并在境外被访问、存储和展示。 | |
| 29 | +5. Cookie的使用 | |
| 30 | +(a)在您未拒绝接受cookies的情况下,本应用会在您的计算机上设定或取用cookies,以便您能登录或使用依赖于cookies的本应用平台服务或功能。本应用使用cookies可为您提供更加周到的个性化服务,包括推广服务。 | |
| 31 | +(b)您有权选择接受或拒绝接受cookies。您可以通过修改浏览器设置的方式拒绝接受cookies。但如果您选择拒绝接受cookies,则您可能无法登录或使用依赖于cookies的本应用网络服务或功能。 | |
| 32 | +(c)通过本应用所设cookies所取得的有关信息,将适用本政策。 | |
| 33 | +6.本隐私政策的更改 | |
| 34 | +(a)如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。 | |
| 35 | +(b)本公司保留随时修改本政策的权利,因此请经常查看。如对本政策作出重大更改,本公司会通过网站通知的形式告知。 | |
| 36 | +方披露自己的个人信息,如联络方式或者邮政地址。请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,尤其是本应用用户名及密码发生泄露,请您立即联络本应用客服,以便本应用采取相应措施。 | |
| 37 | +感谢您花时间了解我们的隐私政策!我们将尽全力保护您的个人信息和合法权益,再次感谢您的信任!<br/> | |
| 38 | +<div style="text-align: center"><button onclick="window.history.back(-1);" > 返回</button></div> | |
| 39 | +</body> | |
| 40 | +</html> | ... | ... |
public/serviceAgreement.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html lang="en"> | |
| 3 | +<head> | |
| 4 | + <meta charset="UTF-8"> | |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| 6 | + <title>小羚羊EBC用户服务协议</title> | |
| 7 | +</head> | |
| 8 | +<body> | |
| 9 | +一、前言 | |
| 10 | +小羚羊EBC依据《 小羚羊EBC(用户版)服务协议》(以下简称“本协议”)的规定提供服务,本协议具有合同效力。用户注册时,请您认真阅读本协议,审阅并接受或不接受本协议(未成年人应在法定监护人陪同下审阅)。若您已经注册为小羚羊EBC用户,即表示您已充分阅读、理解并同意自己与小羚羊EBC订立本协议,且您自愿受本协议的条款约束。小羚羊EBC有权随时变更本协议并在小羚羊EBC上予以公告。经修订的条款一经在小羚羊EBC公布后,立即自动生效。如您不同意相关变更,必须停止使用小羚羊EBC。本协议内容包括协议正文及所有小羚羊EBC已经发布的各类规则。所有规则为本协议不可分割的一部分,与本协议正文具有同等法律效力。一旦您继续使用小羚羊EBC,则表示您已接受并自愿遵守经修订后的条款。 | |
| 11 | +二、用户资格 | |
| 12 | +只有符合下列条件之一的自然人或法人才能申请成为小羚羊EBC用户,可以使用 | |
| 13 | +小羚羊EBC的服务: | |
| 14 | +a.年满十八周岁,并具有民事权利能力和民事行为能力的自然人; | |
| 15 | +b.无民事行为能力人或限制民事行为能力人应经过其监护人的同意; | |
| 16 | +c.根据中国法律、法规、行政规章成立并合法存在的机关、企事业单位、社团 组织和其他组织。无法人资格的单位或组织不应当注册为小羚羊EBC用户的,其与小羚羊EBC之间的协议自始无效,小羚羊EBC一经发现,有权立即终止对该用户的服务,并追究其使用小羚羊EBC服务的一切法律责任。 | |
| 17 | +三、用户的权利和义务 | |
| 18 | +1.用户有权根据本协议及小羚羊EBC发布的相关规则,利用羚羊ERP寻找专家咨询,向其他用户发送资料,参加小羚羊EBC的有关活动及有权享受小羚羊EBC提供的其他有关资讯及信息服务; | |
| 19 | +2.用户须自行负责自己的用户账号和密码,且须对在用户账号密码下发生的所有活动(包括但不限于发起咨询、 参加官方活动、发送及接受文件等)承担责任。用户有权根据需要更改登录和账户提现密码。因用户的过错导致的任何损失由用 户自行承担,该过错包括但不限于:不按照提示操作,未及时进行操作,遗忘或泄漏密码,密码被他人破解,您使用的移动端被他人侵入; | |
| 20 | +3.用户应当向小羚羊EBC提供真实准确的注册信息。同时,用户也应当在相关资料实际变更时及时更新有关注册资料; | |
| 21 | +4.用户不得以任何形式擅自转让或授权他人使用自己在小羚羊EBC的用户帐号; | |
| 22 | +5.用户有义务确保在小羚羊EBC上所咨询的内容真实有效; | |
| 23 | +6.用户在小羚羊EBC上进行咨询以及向专家咨询时所产生的信息,不得违反国家法律、法规、行政规章的规定、不得侵犯他人知识产权或其他合法权益的信息、不得违背社会公共利益或公共道德、不得违反 小羚羊EBC的相关规定; | |
| 24 | +7.用户在 小羚羊EBC咨询中应当遵守诚实信用原则,不得干预或操纵扰乱 小羚羊EBC秩序,不得进行与咨询无关的不当行为; | |
| 25 | +8.用户不得参与帮助专家提高信用度(包括但不限于刷邀约、刷好评等方式)的行为,或采用不正当手段恶意评价其他专家,降低其他专家信用度; | |
| 26 | +9.用户承诺自己在使用小羚羊EBC实施的所有行为遵守法律、法规、行政规章和小羚羊EBC的相关规定以及各种社会公共利益或公共道德。如有违反导致任何法律后果的发生,用户将以自己的名义独立承担相应的法律责任; | |
| 27 | +10.用户在 小羚羊EBC咨询过程中如与其他专家因咨询产生纠纷,可以请求小羚羊EBC | |
| 28 | + | |
| 29 | +从中予以协调处理。 用户如发现其他用户或专家有违法或违反本协议的行为,可以向 小羚羊EBC举报; | |
| 30 | +11.用户应当自行承担因咨询产生的相关费用; | |
| 31 | +12.未经 小羚羊EBC书面允许,用户不得将小羚羊EBC的任何资料以及在咨询平台上所展示的任何信息作商业性利用 (包括但不限于以复制、修改、翻译等形式制作衍生作品、分发或公开展示); | |
| 32 | +13.用户不得使用以下方式登录小羚羊EBC或破坏小羚羊EBC所提供的服务: | |
| 33 | +a.任何机器人软件或其它自动方式访问或登录小羚羊EBC; | |
| 34 | +b.通过任何方式对本公司内部结构造成或可能造成不合理或不合比例的重大负荷的行为; | |
| 35 | +14.通过任何方式干扰或试图干扰小羚羊EBC的正常工作或小羚羊EBC上进行的任何活动。 | |
| 36 | +15.用户同意接收来自小羚羊EBC的信息,包括但不限于活动信息、咨询信息等。 | |
| 37 | +四、用户行为规则: | |
| 38 | +1.为了提升咨询者的咨询体验,专家的良好服务,维护小羚羊EBC正常运营秩序,对于违反行为规范的用户,小羚羊EBC将按照本规则规定的情形对用户进行处罚。 | |
| 39 | +2.您将同意:本 App 有权对小羚羊EBC咨询中产生的违规行为进行处理。本App 处理举报完全基于您的委托,本 App承诺秉持公平、公正、透明的态度处理违规行为,但本 App 并非权力机构,对相关证据只能以普通人的立场进行形式和内容上的审查和判断, 不保证举报处理结果符合您的期望,亦不对违规行为的处理结果承担任何责任。 | |
| 40 | +3.本规则只适用于中华人民共和国大陆境内咨询产生的纠纷,涉及到此范围以外的争议,不适用本规则。 | |
| 41 | +4.用户的违规行为,通过小羚羊EBC用户、专家、其他第三方投诉或小羚羊EBC排查发现。 | |
| 42 | +5.本规则自公布之日起实行。本规则中的“天”,以24 小时计算。 | |
| 43 | +6.在用户违规处理期间,小羚羊EBC将按照本规则规定的情形对用户采取以下违规处理措施: | |
| 44 | +a.限制参加营销活动:指限制用户参加小羚羊EBC官方发起的营销活动; | |
| 45 | +b.查封账户:指禁止违规账户登录小羚羊EBC。 | |
| 46 | +c.警告:指对该用户的行为进行口头或书面的警告通知。 | |
| 47 | +7.用户可在被违规处理之时起15 天内向客服提交违规申诉申请。 | |
| 48 | +8.经小羚羊EBC判定为违规行为类型及处罚措施如下所示: | |
| 49 | +线下咨询:用户发起线下咨询,专家同意的,包括但不限于以下情形: | |
| 50 | +a.用户从小羚羊EBC获取专家信息,无论以何种形式进行线下咨询的; | |
| 51 | +b.用户从小羚羊EBC以外的途径获取专家信息,单次咨询中,部分款项通过 小羚羊EBC支付,而另一部分通过其他途径支付的。 | |
| 52 | +c.无论金额大小,永久查封账户。 | |
| 53 | +恶意举报:指通过举报干扰正常咨询的行为,包含但不限于以下情形: | |
| 54 | +1.用户自己或利用他人,对专家的正常信息(包括但不限于咨询,评价等), | |
| 55 | +在短时间内进行多次举报, 严重妨碍其他专家正常咨询活动的行为。无论是否对其他专家造成直接或间接的影响,则暂时封停账号。 | |
| 56 | +2.指用户利用自己或他人账号,对正常咨询进行干扰,妨碍他人进行合理操作 | |
| 57 | +的行为,如查证,暂时封停该账号。 | |
| 58 | +辱骂污蔑他人:包括但不限于以下两种情况: | |
| 59 | +1.用户自己或利用他人,通过捏造、散布虚伪事实等不正当手段,对其他专家进行恶意的诋毁、贬低,辱骂等行为,计次数,三次以下警告,累计三次或三次以上暂停服务。 | |
| 60 | +2.在咨询过程中,用户通过小羚羊EBC对专家进行辱骂、诋毁、人身攻击等行为, 计次数,一次警告,累计三次以上暂停服务。盗用他人账户: 指盗用他人 小羚羊EBC账户, 涉嫌侵犯他人财产权的行为。 永久查封账户。骗取他人财物: 指用户通过 小羚羊EBC以非法获利为目的 (例如盗用他人品牌形象行骗等),非法获取他人财物,涉嫌侵犯他人财产权的行为。永久查封账户。并保 留申报相应执法部门权利。图文传输含联系方式:指用户发布的图文传输含有联系方式(包括但不限于QQ,电话号码,邮箱,网址),包括但不限于以下情形: | |
| 61 | +五、若用户或专家发布的信息被认定为含有联系方式,App将屏蔽该信息。 | |
| 62 | +六、小羚羊EBC的权利和义务 | |
| 63 | +1.小羚羊EBC仅为用户提供一个咨询信息交流平台,是普通用户发起咨询和专家提 供解决方案的一个服务平台,小羚羊EBC对服务双方均不加以监视或控制,亦不介入服务具体的流程; | |
| 64 | +2.小羚羊EBC有义务在现有技术水平的基础上努力确保整个移动端平台的正常运行,尽力避免服务中断或将中断时间限制在最短时间内,保证专家及用户活动的顺利进行; | |
| 65 | +3.为保障使用流程公平安全,小羚羊EBC为用户提供代付(即指用户将咨询费用充值至平台,平台代为向专家支付)服务。 | |
| 66 | +4.小羚羊EBC有义务对用户在注册使用 小羚羊EBC信息平台中所遇到的与充值或注册有关的问题及反映的情况及时作出回复; | |
| 67 | +5.用户因在 小羚羊EBC咨询过程与其他用户或专家产生纠纷的,将纠纷告知小羚羊EBC,或小羚羊EBC知悉纠纷情况的,经审核后,小羚羊EBC有权通过电话或任何联系方式联系向纠纷双方了解纠纷情况, 并将所了解的情况通过电话或任何联系方式互相通知 | |
| 68 | +对方;两方若通过司法机关依照法定程序要求小羚羊EBC提供相关资料,小羚羊EBC将积极配合并提供有关资料; | |
| 69 | +6.因移动服务平台的特殊性,小羚羊EBC没有义务对用户的咨询行为、专家的解答 行为以及与咨询有关的其他事项(包含但不限于图文传输等)进行事先审查, 但如发生以下情形,小羚羊EBC有权无需征得用户的同意限制用户的活动、向用户核实有关资料、发出警告通知、暂时中止、无限期中止及拒绝向该用户提供服务: | |
| 70 | +a.用户违反本协议或因被提及而纳入本协议的相关规则; | |
| 71 | +b.存在用户、专家或其他第三方通知小羚羊EBC,认为某个用户的具体咨询事项存在违法或不当行为, 并提供相关证据, 而小羚羊EBC无法联系到该用户核证或验证该用户向小羚羊EBC提供的任何资料; | |
| 72 | +c.存在用户、专家或其他第三方通知小羚羊EBC,认为某个用户或具体咨询事项存 在违法或不当行为,并提供相关证据。小羚羊EBC以普通非专业知识水平标准对相关 内容进行判别, 可以明显认为这些内容或行为可能对 小羚羊EBC专家或用户或 小羚羊EBC 造成财务损失或法律责任。 | |
| 73 | +7.根据国家法律、法规、行政规章规定、本协议的内容和小羚羊EBC所掌握的事实依据,可以认定该专家或用户存在违法或违反本协议行为以及在小羚羊EBC中进行的其他不当行为,小羚羊EBC有权无需征得用户的同意在小羚羊EBC服务平台及所在 小羚羊EBC上以公告形式公布该用户的违法行为, 并有权随时作出删除相关信息、终止服务提 供 等 处 理 ; | |
| 74 | +8.小羚羊EBC有权在不通知专家或用户的前提下,删除或采取其他限制性措施处理下列信息:包括但不限于以规避费用为目的;以炒作信用为目的; 存在欺诈等恶意或虚假内容; 与咨询无关或不是以咨询为目的;存在恶意评价或其他试图扰乱正常咨询秩序因素;违反公共利益或可能严重损害小羚羊EBC和其他专家或用户合法利益的信息。 | |
| 75 | +七、服务的中断和终止 | |
| 76 | +1.小羚羊EBC可自行全权决定以任何理由 ( 包括但不限于 小羚羊EBC认为用户或专家已违反本协议及相关规则的字面意义和精神,以及专家或用户在超过180 日内未登录 | |
| 77 | +小羚羊EBC等) 终止对用户的服务, 并有权在两年内保存用户在 小羚羊EBC的全部资料(包括但不限于用户信息、产品信息、咨询信息等)。同时 小羚羊EBC可自行全权决定, 在发出通知或不发出通知的情况下, 随时停止提供全部或部分服务。 服务终止后, | |
| 78 | +小羚羊EBC没有义务为专家或用户保留原账户中或与之相关的任何信息,或转发任何未曾阅读或发送的信息给专家或用户或第三方; | |
| 79 | +2.若用户申请终止小羚羊EBC服务,需经 小羚羊EBC审核同意,方可解除与小羚羊EBC的协议关系,但 小羚羊EBC仍保留下列权利: | |
| 80 | +a.小羚羊EBC有权在法律、法规、行政规章规定的时间内保留该用户的资料,包括但不限于以前的用户资料、咨询记录等; | |
| 81 | +b.若终止服务之前,该用户在 小羚羊EBC服务平台上存在违法行为或违反本协议的行为,小羚羊EBC仍可行使本协议所规定的权利。3.用户存在下列情况, 小羚羊EBC可以终止向该用户提供服务; | |
| 82 | +a.用户违反本协议及相关规则规定时,小羚羊EBC有权终止向用户提供服务。 小羚羊EBC 将在中断服务时通知用户。 但该用户在被 小羚羊EBC终止提供服务后, 再一次直接或间接或以他人名义注册为 小羚羊EBC专家或用户的, 小羚羊EBC有权再次单方面终止为该用户提供服务; | |
| 83 | +b.小羚羊EBC发现用户注册资料中主要内容是虚假的, 小羚羊EBC有权随时终止为该用户提供服务; | |
| 84 | +c.本协议终止或更新时,用户未确认新的协议的; | |
| 85 | +d.其它 小羚羊EBC认为需终止服务的情况。 | |
| 86 | +八、小羚羊EBC的责任范围 | |
| 87 | +用户接受该协议时,用户应当明确了解并同意: | |
| 88 | +1.小羚羊EBC不能随时预见到任何技术上的问题或其他困难。该困难可能会导致数据损失或其他服务中断。小羚羊EBC是在现有技术基础上提供的服务。小羚羊EBC不保证以下事项∶ | |
| 89 | +a.小羚羊EBC将符合所有专家或用户的要求; | |
| 90 | +b.小羚羊EBC不受干扰、能够及时提供所有内容、安全可靠或免于出错; | |
| 91 | +c.本服务使用权的取得结果是正确或可靠的。 | |
| 92 | +2.是否经由 小羚羊EBC下载或取得其他专家或用户发送的任何资料,由用户自行考虑、衡量并且自负风险, 因下载任何资料而导致用户移动端系统的任何损坏或资料流失,用户应负完全责任。希望用户在使用小羚羊EBC时,小心谨慎并运用常识; 3.用户经由 小羚羊EBC取得的建议和咨询内容,无论其形式或表现,绝不构成本协议未明示规定的任何保证; | |
| 93 | +4.基于以下原因而造成的利润、商誉、使用、资料损失或其它无形损失,小羚羊EBC不承担任何直接、间接、附带、特别、衍生性或惩罚性赔偿: | |
| 94 | +a.小羚羊EBC的使用或无法使用; | |
| 95 | +b.用户的传输或资料遭到未获授权的存取或变更; | |
| 96 | +c.小羚羊EBC中任何第三方之声明或行为; | |
| 97 | +d.小羚羊EBC在服务中为用户提供咨询机会,推荐咨询对象; | |
| 98 | +e.小羚羊EBC其它相关事宜。 | |
| 99 | +九、知识产权 | |
| 100 | +1.小羚羊EBC及 小羚羊EBC所使用的任何相关软件、程序、内容,包括但不限于作品、 | |
| 101 | +图片、档案、资料、 小羚羊EBC构架、 小羚羊EBC版面的安排、页面设计、经由小羚羊EBC或广告商向专家或用户呈现的广告或资讯, 均由 小羚羊EBC或其它权利人依法享有相应的知识产权,包括但不限于著作权、商标权、专利权或其它专属权利等,受到相 关法律的保护。未经 小羚羊EBC或权利人明示授权,用户保证不修改、出租、出借、 出售、散布 小羚羊EBC及 小羚羊EBC所使用的上述任何资料和资源,或根据上述资料和资源制作成任何种类产品; | |
| 102 | +2.小羚羊EBC授予用户不可转移及非专属的使用权,使用户可以通过移动端使用小羚羊EBC的目标代码(以下简称 " 客户端 " ),但用户不得且不得允许任何第三方复制、修改、创作衍生作品、进行还原工程、反向组译,或以其它方式破译或试图 破译源代码, 或出售、转让" 客户端 " 或对" 客户端 " 进行再授权, 或以其它方式移转" 客户端 " 之任何权利。用户同意不以任何方式修改 " 客户端 " ,或使用修改后的" 客户端 " ; | |
| 103 | +1.用户不得经由非 小羚羊EBC所提供的界面使用 小羚羊EBC。 | |
| 104 | +2.隐私权 | |
| 105 | +3.信息使用: | |
| 106 | +a.小羚羊EBC不会向任何人出售或出借用户的个人或法人信息,除非事先得到用户的许可; | |
| 107 | +b.小羚羊EBC亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播用户 的个人或法人信息。任何用户如从事上述活动,一经发现, 小羚羊EBC有权立即终止与该用户的服务协议,查封其账号。 | |
| 108 | +4.信息披露:用户的个人或法人信息将在下述情况下部分或全部被披露: | |
| 109 | +a.经用户同意,向第三方披露; | |
| 110 | +b.若用户是合法的知识产权使用权人并提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷; | |
| 111 | +c.根据法律的有关规定,或者行政、司法机关的要求,向第三方或者行政、司法机关披露; | |
| 112 | +d.若用户出现违反中国有关法律或者 小羚羊EBC规定的情况,需要向第三方披露; | |
| 113 | +e.为提供你所要求的产品和服务,而必须和第三方分享用户的个人或法人信息; | |
| 114 | +f.其它 小羚羊EBC根据法律或者 小羚羊EBC规定认为合适的披露。 5.信息安全: | |
| 115 | +a.在使用 小羚羊EBC服务进行咨询时,请用户妥善保护自己的个人或法人信息,仅在必要的情形下向他人提供; | |
| 116 | +b.如果用户发现自己的个人或法人信息泄密,尤其是用户账户或“支付账户管理”账户及密码发生泄露, 请用户立即联络 小羚羊EBC客服,以便我们采取相应措施。 | |
| 117 | +十、不可抗力 | |
| 118 | +十一、因不可抗力或者其他意外事件,使得本协议的履行不可能、 不必要或者无意义的, 双方均不承担责任。 本合同所称之不可抗力意指不能预见、不能避免并不能克服的客观情况,包括但不限于战争、台风、水灾、火灾、雷击或地震、罢 工、暴动、法定疾病、黑客攻击、网络病毒、电信部门技术管制、政府行为或任 何其它自然或人为造成的灾难等客观情况。 | |
| 119 | +十二、保密 | |
| 120 | +十三、双方保证在对讨论、 签订、执行本协议中所获悉的属于对方的且无法自公开渠道获得的文件及资料(包括但不限于商业秘密、公司计划、运营活动、财务信息、技术信息、经营信息及其他商业秘密)予以保密。未经该资料和文件的原提供方同意,另一方不得向第三方泄露该商业秘密的全部或者部分内容。 但法律、法规、行政规章另有规定或者双方另有约定的除外。 | |
| 121 | +十四、咨询纠纷解决方式 | |
| 122 | +1.本协议及其规则的有效性、履行和与本协议及其规则效力有关的所有事宜,将受中华人民共和国法律管辖,任何争议仅适用中华人民共和国法律; | |
| 123 | +2.小羚羊EBC有权受理并调处您与其他专家或用户因咨询服务产生的纠纷,同时有权单方面独立判断其他专家或用户对您的举报及索偿是否成立。 小羚羊EBC没有使用自用资金进行偿付的义务, 但若进行了该等支付, 您应及时赔偿 小羚羊EBC的全部损失,否则 小羚羊EBC有权通过前述方式抵减相应资金或权益, 如仍无法弥补损失, 则 | |
| 124 | +小羚羊EBC保留继续追偿的权利。 因 小羚羊EBC对证据的鉴别能力及对纠纷的处理能力有限,受理咨询纠纷完全是基于您之委托,不保证处理结果符合您的期望,小羚羊EBC有权决定是否参与争议的调处; | |
| 125 | +3.凡因本协议及其规则发生的所有纠纷,双方可协商解决。 | |
| 126 | +十五、解释权 | |
| 127 | +小羚羊EBC对本服务协议包括基于本服务协议制定的各项规则拥有最终解释权。十六、附则在本协议中所使用的下列词语,除非另有定义,应具有以下含义: | |
| 128 | +“ 小羚羊EBC”在无特别说明的情况下, 均指 XX有限公司 "小羚羊EBC"产品(www.XX.cn)。 | |
| 129 | +“用户”:指所有正常途径注册的 XXAp(p 用户版)各项服务的使用者。 指在 小羚羊EBC上进行咨询等“支出”操作的用户。 | |
| 130 | +“专家”:是指在 小羚羊EBC上接受咨询等“收入”操作的用户。<br/> | |
| 131 | +<div style="text-align: center"><button onclick="window.history.back(-1);" > 返回</button></div> | |
| 132 | +</body> | |
| 133 | +</html> | ... | ... |
src/assets/disProcessSolution.svg
0 → 100644
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747115884917" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2636" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M416 121.6c-32 51.2-12.8 121.6 44.8 153.6 51.2 32 121.6 12.8 153.6-38.4S627.2 115.2 576 83.2c-25.6-12.8-57.6-19.2-83.2-12.8-38.4 6.4-64 25.6-76.8 51.2z m512 544c-38.4-38.4-89.6-44.8-134.4-19.2-44.8 25.6-64 76.8-51.2 121.6 6.4 25.6 25.6 51.2 51.2 70.4 51.2 32 121.6 12.8 153.6-38.4 25.6-38.4 19.2-96-19.2-134.4zM806.4 556.8c25.6-6.4 57.6-6.4 83.2 0V320l-192-89.6c-6.4 25.6-25.6 51.2-44.8 70.4l153.6 64v192z m-736 217.6c6.4 25.6 25.6 51.2 51.2 70.4 25.6 12.8 57.6 19.2 83.2 12.8 25.6-6.4 51.2-25.6 70.4-51.2 19.2-32 19.2-76.8 0-108.8s-57.6-57.6-96-57.6-76.8 19.2-96 57.6c-19.2 19.2-25.6 44.8-12.8 76.8z m147.2-217.6V371.2l147.2-64c-19.2-19.2-32-44.8-44.8-70.4l-192 89.6v236.8c38.4-12.8 64-12.8 89.6-6.4zM512 864l-147.2-64c-6.4 12.8-12.8 32-19.2 44.8-6.4 12.8-12.8 19.2-19.2 32l192 83.2 192-83.2c-19.2-19.2-32-44.8-44.8-70.4L512 864z" fill="#8a8a8a" p-id="2637"></path></svg> | ... | ... |
src/assets/disablereflesh.svg
0 → 100644
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646212973036" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1220" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M674.133333 878.933333l-98.133333-102.4c128-17.066667 230.4-123.733333 230.4-251.733333 0-123.733333-93.866667-230.4-217.6-251.733333l-89.6-89.6h38.4c196.266667 0 354.133333 153.6 354.133333 341.333333 0 128-76.8 243.2-183.466666 298.666667v85.333333l-34.133334-29.866667z m-93.866666-17.066666c-12.8 0-29.866667 4.266667-46.933334 4.266666-196.266667 0-354.133333-153.6-354.133333-341.333333 0-128 76.8-243.2 183.466667-298.666667V128l55.466666 55.466667 85.333334 85.333333c-132.266667 12.8-234.666667 123.733333-234.666667 256 0 128 98.133333 234.666667 226.133333 251.733333l85.333334 85.333334z" fill="#444444" p-id="1221"></path></svg> | |
| 0 | 2 | \ No newline at end of file | ... | ... |
src/assets/foot_logo.png
src/assets/hasCancel_english.png deleted
40 KB
src/assets/hasChecked.png deleted
107 KB
src/assets/hasChecked_big5.png deleted
106 KB
src/assets/hasChecked_english.png deleted
101 KB
src/assets/hasChecking_big5.png deleted
181 KB
src/assets/hasChecking_english.png deleted
170 KB
src/assets/haveCancel_big5.png deleted
40 KB
src/assets/haveCancel_english.png deleted
40 KB
src/assets/haveSubmit_english.png deleted
172 KB
src/assets/haveSubmit_english1.png deleted
172 KB
src/assets/haveSubmit_sBig5.png deleted
189 KB
src/assets/logo.png
src/assets/logo_pic.png
src/assets/mobile/6.png deleted
3.67 KB
src/assets/mobile/61.png deleted
3.64 KB
src/assets/paiban1.png
0 → 100644
21.3 KB
src/assets/paiban2.png
0 → 100644
86.3 KB
src/assets/panban.png
0 → 100644
141 KB
src/assets/processSolution.svg
0 → 100644
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747115884917" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2636" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M416 121.6c-32 51.2-12.8 121.6 44.8 153.6 51.2 32 121.6 12.8 153.6-38.4S627.2 115.2 576 83.2c-25.6-12.8-57.6-19.2-83.2-12.8-38.4 6.4-64 25.6-76.8 51.2z m512 544c-38.4-38.4-89.6-44.8-134.4-19.2-44.8 25.6-64 76.8-51.2 121.6 6.4 25.6 25.6 51.2 51.2 70.4 51.2 32 121.6 12.8 153.6-38.4 25.6-38.4 19.2-96-19.2-134.4zM806.4 556.8c25.6-6.4 57.6-6.4 83.2 0V320l-192-89.6c-6.4 25.6-25.6 51.2-44.8 70.4l153.6 64v192z m-736 217.6c6.4 25.6 25.6 51.2 51.2 70.4 25.6 12.8 57.6 19.2 83.2 12.8 25.6-6.4 51.2-25.6 70.4-51.2 19.2-32 19.2-76.8 0-108.8s-57.6-57.6-96-57.6-76.8 19.2-96 57.6c-19.2 19.2-25.6 44.8-12.8 76.8z m147.2-217.6V371.2l147.2-64c-19.2-19.2-32-44.8-44.8-70.4l-192 89.6v236.8c38.4-12.8 64-12.8 89.6-6.4zM512 864l-147.2-64c-6.4 12.8-12.8 32-19.2 44.8-6.4 12.8-12.8 19.2-19.2 32l192 83.2 192-83.2c-19.2-19.2-32-44.8-44.8-70.4L512 864z" fill="#1890ff" p-id="2637"></path></svg> | |
| 0 | 2 | \ No newline at end of file | ... | ... |
src/assets/reflesh.svg
0 → 100644
| 1 | +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646212973036" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1220" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M674.133333 878.933333l-98.133333-102.4c128-17.066667 230.4-123.733333 230.4-251.733333 0-123.733333-93.866667-230.4-217.6-251.733333l-89.6-89.6h38.4c196.266667 0 354.133333 153.6 354.133333 341.333333 0 128-76.8 243.2-183.466666 298.666667v85.333333l-34.133334-29.866667z m-93.866666-17.066666c-12.8 0-29.866667 4.266667-46.933334 4.266666-196.266667 0-354.133333-153.6-354.133333-341.333333 0-128 76.8-243.2 183.466667-298.666667V128l55.466666 55.466667 85.333334 85.333333c-132.266667 12.8-234.666667 123.733333-234.666667 256 0 128 98.133333 234.666667 226.133333 251.733333l85.333334 85.333334z" fill="#1296db" p-id="1221" data-spm-anchor-id="a313x.7781069.0.i0" class="selected"></path></svg> | |
| 0 | 2 | \ No newline at end of file | ... | ... |
src/components/AuditInformation/AuditInformation.js
| ... | ... | @@ -5,8 +5,8 @@ |
| 5 | 5 | // , Switch, Icon |
| 6 | 6 | import React, { Component } from 'react'; |
| 7 | 7 | import { Form } from '@ant-design/compatible'; |
| 8 | -// import '@ant-design/compatible/assets/index.css'; | |
| 9 | -import { Layout, Spin, Tabs, Avatar, message, Select, Input, Button } from 'antd-v4'; | |
| 8 | +import '@ant-design/compatible/assets/index.css'; | |
| 9 | +import { Layout, Spin, Tabs, Avatar, message, Select, Input, Button } from 'antd'; | |
| 10 | 10 | import * as commonFunc from './../Common/commonFunc';/* 通用单据方法 */ /* 通用单据方法 */ |
| 11 | 11 | import StaticEditTable from '../Common/CommonTable';/* 可编辑表格 */ |
| 12 | 12 | import styles from './../../index.less'; |
| ... | ... | @@ -14,7 +14,7 @@ import CommonView from './../Common/CommonView'; |
| 14 | 14 | import CommonBase from './../Common/CommonBase';/* 获取配置及数据 */ |
| 15 | 15 | import * as commonUtils from './../../utils/utils';/* 通用方法 */ |
| 16 | 16 | import * as commonBusiness from './../Common/commonBusiness';/* 单据业务功能 */ |
| 17 | -import commonConfig from './../../utils/config'; | |
| 17 | +import * as commonConfig from './../../utils/config'; | |
| 18 | 18 | import * as commonServices from './../../services/services';/* 服务类 */ |
| 19 | 19 | |
| 20 | 20 | const { TabPane } = Tabs; |
| ... | ... | @@ -33,7 +33,7 @@ class AuditInformation extends Component { |
| 33 | 33 | let { masterConfig, canSendMsg } = nextProps; |
| 34 | 34 | const { userinfo } = app; |
| 35 | 35 | if (commonUtils.isEmptyArr(masterConfig) && formData.length > 0) { |
| 36 | - const sId = currentId || nextProps.masterData?.sId || ''; | |
| 36 | + const sId = currentId !== undefined ? currentId : ''; | |
| 37 | 37 | /* 数据Id */ |
| 38 | 38 | masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 39 | 39 | const checkConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysbillcheckresult')[0]; |
| ... | ... | @@ -58,7 +58,7 @@ class AuditInformation extends Component { |
| 58 | 58 | /** 获取主表数据 */ |
| 59 | 59 | handleGetData = async (masterConfig, checkConfig) => { |
| 60 | 60 | const { currentId } = this.props; /* 当前页签数据 */ |
| 61 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 61 | + const sId = currentId !== undefined ? currentId : ''; | |
| 62 | 62 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' } }); |
| 63 | 63 | const { masterData } = this.props; |
| 64 | 64 | if (!commonUtils.isEmptyObject(checkConfig) && !commonUtils.isEmptyObject(masterData)) { |
| ... | ... | @@ -112,8 +112,8 @@ class AuditInformation extends Component { |
| 112 | 112 | } |
| 113 | 113 | }; |
| 114 | 114 | render() { |
| 115 | - const { masterData, sModelsType, app } = this.props; | |
| 116 | - const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app); | |
| 115 | + const { pageLoading, masterData } = this.props; | |
| 116 | + const imgSrc = commonBusiness.handleAddIcon(masterData); | |
| 117 | 117 | return ( |
| 118 | 118 | <Spin spinning={pageLoading}> |
| 119 | 119 | <WorkOrderComponent | ... | ... |
src/components/Charts/Bar/index.js
| 1 | 1 | import React, { PureComponent } from 'react'; |
| 2 | -import G2 from 'g2'; | |
| 2 | +import { Chart } from '@antv/g2'; | |
| 3 | 3 | import Debounce from 'lodash-decorators/debounce'; |
| 4 | 4 | import Bind from 'lodash-decorators/bind'; |
| 5 | 5 | import equal from '../equal'; |
| ... | ... | @@ -55,9 +55,8 @@ class Bar extends PureComponent { |
| 55 | 55 | if (this.chart) { |
| 56 | 56 | this.chart.destroy(); |
| 57 | 57 | } |
| 58 | - | |
| 59 | 58 | this.node.innerHTML = ''; |
| 60 | - const chart = new G2.Chart({ | |
| 59 | + const chart = new Chart({ | |
| 61 | 60 | container: this.node, |
| 62 | 61 | autoFit: true, /* 图标自适应 */ |
| 63 | 62 | height, | ... | ... |
src/components/Charts/Gauge/index.js
| 1 | 1 | import React, { PureComponent } from 'react'; |
| 2 | -import { Chart } from '@antv/g2'; | |
| 3 | -import debounce from 'lodash/debounce'; | |
| 2 | +import G2 from 'g2'; | |
| 3 | +import Bind from 'lodash-decorators/bind'; | |
| 4 | +import Debounce from 'lodash-decorators/debounce'; | |
| 5 | +import equal from '../equal'; | |
| 6 | + | |
| 7 | +const { Shape } = G2; | |
| 4 | 8 | |
| 5 | 9 | const primaryColor = '#2F9CFF'; |
| 6 | 10 | const backgroundColor = '#F0F2F5'; |
| 7 | 11 | |
| 12 | +/* eslint no-underscore-dangle: 0 */ | |
| 8 | 13 | class Gauge extends PureComponent { |
| 9 | 14 | componentDidMount() { |
| 10 | - this.renderChart(); | |
| 15 | + setTimeout(() => { | |
| 16 | + this.renderChart(); | |
| 17 | + }, 10); | |
| 11 | 18 | window.addEventListener('resize', this.resize); |
| 12 | 19 | } |
| 13 | 20 | |
| 14 | 21 | componentWillReceiveProps(nextProps) { |
| 15 | - if (!this.isEqual(this.props, nextProps)) { | |
| 16 | - this.renderChart(nextProps); | |
| 22 | + if (!equal(this.props, nextProps)) { | |
| 23 | + setTimeout(() => { | |
| 24 | + this.renderChart(nextProps); | |
| 25 | + }, 10); | |
| 17 | 26 | } |
| 18 | 27 | } |
| 19 | 28 | |
| 20 | 29 | componentWillUnmount() { |
| 21 | 30 | window.removeEventListener('resize', this.resize); |
| 31 | + // if (this.chart) { | |
| 32 | + // console.log('data', this.chart); | |
| 33 | + // this.chart.destroy(); | |
| 34 | + // } | |
| 22 | 35 | this.resize.cancel(); |
| 23 | - if (this.chart) { | |
| 24 | - this.chart.destroy(); | |
| 25 | - } | |
| 26 | 36 | } |
| 27 | 37 | |
| 28 | - resize = debounce(() => { | |
| 29 | - if (this.chart) { | |
| 30 | - this.chart.render(); | |
| 38 | + @Bind() | |
| 39 | + @Debounce(200) | |
| 40 | + resize() { | |
| 41 | + if (!this.node) { | |
| 42 | + return; | |
| 31 | 43 | } |
| 32 | - }, 200); | |
| 44 | + this.renderChart([]); | |
| 45 | + } | |
| 33 | 46 | |
| 34 | - isEqual = (prevProps, nextProps) => { | |
| 35 | - // Implement your own equality check logic | |
| 36 | - return prevProps.data === nextProps.data && prevProps.color === nextProps.color; | |
| 47 | + handleRef = (n) => { | |
| 48 | + this.node = n; | |
| 37 | 49 | }; |
| 38 | 50 | |
| 39 | - renderChart = (props = this.props) => { | |
| 40 | - const { data, color = primaryColor, bgColor = backgroundColor } = props; | |
| 41 | - const value = Math.min(Math.max(data, 0), 100); // Ensure value is between 0 and 100 | |
| 51 | + initChart(nextProps) { | |
| 52 | + const { xUnit, color = primaryColor } = nextProps || this.props; | |
| 53 | + | |
| 54 | + Shape.registShape('point', 'dashBoard', { | |
| 55 | + drawShape(cfg, group) { | |
| 56 | + const originPoint = cfg.points[0]; | |
| 57 | + const point = this.parsePoint({ x: originPoint.x, y: 0.4 }); | |
| 58 | + | |
| 59 | + const center = this.parsePoint({ | |
| 60 | + x: 0, | |
| 61 | + y: 0, | |
| 62 | + }); | |
| 63 | + | |
| 64 | + const shape = group.addShape('polygon', { | |
| 65 | + attrs: { | |
| 66 | + points: [ | |
| 67 | + [center.x, center.y], | |
| 68 | + [point.x + 8, point.y], | |
| 69 | + [point.x + 8, point.y - 2], | |
| 70 | + [center.x, center.y - 2], | |
| 71 | + ], | |
| 72 | + radius: 2, | |
| 73 | + lineWidth: 2, | |
| 74 | + arrow: false, | |
| 75 | + fill: color, | |
| 76 | + }, | |
| 77 | + }); | |
| 78 | + | |
| 79 | + group.addShape('Marker', { | |
| 80 | + attrs: { | |
| 81 | + symbol: 'circle', | |
| 82 | + lineWidth: 2, | |
| 83 | + fill: color, | |
| 84 | + radius: 8, | |
| 85 | + x: center.x, | |
| 86 | + y: center.y, | |
| 87 | + }, | |
| 88 | + }); | |
| 89 | + group.addShape('Marker', { | |
| 90 | + attrs: { | |
| 91 | + symbol: 'circle', | |
| 92 | + lineWidth: 2, | |
| 93 | + fill: '#fff', | |
| 94 | + radius: 5, | |
| 95 | + x: center.x, | |
| 96 | + y: center.y, | |
| 97 | + }, | |
| 98 | + }); | |
| 99 | + | |
| 100 | + const { origin } = cfg; | |
| 101 | + group.addShape('text', { | |
| 102 | + attrs: { | |
| 103 | + x: center.x, | |
| 104 | + y: center.y + 80, | |
| 105 | + text: `${origin._origin.value}%`, | |
| 106 | + textAlign: 'center', | |
| 107 | + fontSize: 24, | |
| 108 | + fill: 'rgba(0, 0, 0, 0.85)', | |
| 109 | + }, | |
| 110 | + }); | |
| 111 | + group.addShape('text', { | |
| 112 | + attrs: { | |
| 113 | + x: center.x, | |
| 114 | + y: center.y + 45, | |
| 115 | + text: xUnit, | |
| 116 | + textAlign: 'center', | |
| 117 | + fontSize: 14, | |
| 118 | + fill: 'rgba(0, 0, 0, 0.43)', | |
| 119 | + }, | |
| 120 | + }); | |
| 121 | + | |
| 122 | + return shape; | |
| 123 | + }, | |
| 124 | + }); | |
| 125 | + } | |
| 126 | + | |
| 127 | + renderChart(nextProps) { | |
| 128 | + if (this.node.offsetWidth === 0) { | |
| 129 | + return; | |
| 130 | + } | |
| 131 | + const { | |
| 132 | + height, color = primaryColor, bgColor = backgroundColor, xUnit, | |
| 133 | + } = nextProps || this.props; | |
| 134 | + const data = [{ name: xUnit, value: this.props.data }]; | |
| 42 | 135 | |
| 43 | 136 | if (this.chart) { |
| 137 | + this.chart.clear(); | |
| 138 | + } | |
| 139 | + if (this.chart) { | |
| 44 | 140 | this.chart.destroy(); |
| 45 | 141 | } |
| 142 | + if (this.node) { | |
| 143 | + this.node.innerHTML = ''; | |
| 144 | + } | |
| 46 | 145 | |
| 47 | - const chart = new Chart({ | |
| 146 | + this.initChart(nextProps); | |
| 147 | + const chart = new G2.Chart({ | |
| 48 | 148 | container: this.node, |
| 49 | - autoFit: true, | |
| 50 | - height: 200, | |
| 51 | - padding: [20, 20, 60, 20], | |
| 149 | + forceFit: true, | |
| 150 | + height, | |
| 151 | + animate: false, | |
| 152 | + plotCfg: { | |
| 153 | + margin: [10, 10, 30, 10], | |
| 154 | + }, | |
| 52 | 155 | }); |
| 53 | 156 | |
| 157 | + chart.source(data); | |
| 158 | + | |
| 54 | 159 | chart.tooltip(false); |
| 55 | 160 | |
| 56 | - chart.coordinate('polar', { | |
| 57 | - startAngle: -Math.PI / 2, | |
| 58 | - endAngle: Math.PI / 2, | |
| 59 | - radius: 0.9, | |
| 161 | + chart.coord('gauge', { | |
| 162 | + startAngle: -1.2 * Math.PI, | |
| 163 | + endAngle: 0.20 * Math.PI, | |
| 60 | 164 | }); |
| 61 | - | |
| 62 | - chart.axis('value', false); | |
| 63 | - | |
| 64 | - // Draw background arc | |
| 65 | - chart.guide().arc({ | |
| 66 | - start: [0, 0.95], | |
| 67 | - end: [100, 0.95], | |
| 68 | - style: { | |
| 69 | - stroke: bgColor, | |
| 70 | - lineWidth: 12, | |
| 71 | - }, | |
| 165 | + chart.col('value', { | |
| 166 | + type: 'linear', | |
| 167 | + nice: true, | |
| 168 | + min: 0, | |
| 169 | + max: 100, | |
| 170 | + tickCount: 6, | |
| 72 | 171 | }); |
| 73 | - | |
| 74 | - // Draw value arc | |
| 75 | - chart.guide().arc({ | |
| 76 | - start: [0, 0.95], | |
| 77 | - end: [value, 0.95], | |
| 78 | - style: { | |
| 172 | + chart.axis('value', { | |
| 173 | + subTick: false, | |
| 174 | + tickLine: { | |
| 79 | 175 | stroke: color, |
| 80 | - lineWidth: 12, | |
| 176 | + lineWidth: 2, | |
| 177 | + value: -14, | |
| 178 | + }, | |
| 179 | + labelOffset: -12, | |
| 180 | + formatter: (val) => { | |
| 181 | + switch (parseInt(val, 10)) { | |
| 182 | + case 20: | |
| 183 | + return '差'; | |
| 184 | + case 40: | |
| 185 | + return '中'; | |
| 186 | + case 60: | |
| 187 | + return '良'; | |
| 188 | + case 80: | |
| 189 | + return '优'; | |
| 190 | + default: | |
| 191 | + return ''; | |
| 192 | + } | |
| 81 | 193 | }, |
| 82 | 194 | }); |
| 195 | + chart.point().position('value').shape('dashBoard'); | |
| 196 | + draw(data); | |
| 197 | + | |
| 198 | + /* eslint no-shadow: 0 */ | |
| 199 | + function draw(data) { | |
| 200 | + const val = data[0].value; | |
| 201 | + const lineWidth = 12; | |
| 202 | + chart.guide().clear(); | |
| 203 | + | |
| 204 | + chart.guide().arc(() => { | |
| 205 | + return [0, 0.95]; | |
| 206 | + }, () => { | |
| 207 | + return [val, 0.95]; | |
| 208 | + }, { | |
| 209 | + stroke: color, | |
| 210 | + lineWidth, | |
| 211 | + }); | |
| 212 | + | |
| 213 | + chart.guide().arc(() => { | |
| 214 | + return [val, 0.95]; | |
| 215 | + }, (arg) => { | |
| 216 | + return [arg.max, 0.95]; | |
| 217 | + }, { | |
| 218 | + stroke: bgColor, | |
| 219 | + lineWidth, | |
| 220 | + }); | |
| 83 | 221 | |
| 84 | - // Draw center circle | |
| 85 | - chart.guide().html({ | |
| 86 | - position: [50, 0.95], | |
| 87 | - html: `<div style="text-align: center; font-size: 12px; color: rgba(0, 0, 0, 0.43); transform: translate(-50%, -50%);">${value}%</div>`, | |
| 88 | - }); | |
| 89 | - | |
| 90 | - chart.render(); | |
| 222 | + chart.changeData(data); | |
| 223 | + } | |
| 91 | 224 | |
| 92 | 225 | this.chart = chart; |
| 93 | - }; | |
| 94 | - | |
| 95 | - handleRef = (node) => { | |
| 96 | - this.node = node; | |
| 97 | - }; | |
| 226 | + } | |
| 98 | 227 | |
| 99 | 228 | render() { |
| 100 | - return <div ref={this.handleRef}></div>; | |
| 229 | + return ( | |
| 230 | + <div ref={this.handleRef} /> | |
| 231 | + ); | |
| 101 | 232 | } |
| 102 | 233 | } |
| 103 | 234 | |
| 104 | -export default Gauge; | |
| 105 | 235 | \ No newline at end of file |
| 236 | +export default Gauge; | ... | ... |
src/components/Charts/Pie/index.js
| 1 | 1 | /* eslint-disable no-undef, jsx-a11y/no-noninteractive-element-interactions */ |
| 2 | 2 | import React, { Component } from 'react'; |
| 3 | 3 | import G2 from 'g2'; |
| 4 | -import { Divider } from 'antd-v4'; | |
| 4 | +import { Divider } from 'antd'; | |
| 5 | 5 | import classNames from 'classnames'; |
| 6 | 6 | import ReactFitText from 'react-fittext'; |
| 7 | 7 | import Debounce from 'lodash-decorators/debounce'; |
| ... | ... | @@ -182,7 +182,7 @@ class Pie extends Component { |
| 182 | 182 | }); |
| 183 | 183 | // chart.changeSize(180, 216);// 设置图标的高度 |
| 184 | 184 | chart |
| 185 | - .interval() | |
| 185 | + .intervalStack() | |
| 186 | 186 | .position(Stat.summary.percent('y')) |
| 187 | 187 | .style({ lineWidth, stroke: '#fff' }) |
| 188 | 188 | .color('x', percent ? formatColor : defaultColors) | ... | ... |
src/components/Charts/Pie/index.less
src/components/Charts/PieGroup/index.js
src/components/Charts/TimeLineGroup/index.js
| 1 | 1 | /* eslint-disable object-curly-newline */ |
| 2 | 2 | import React, { Component } from 'react'; |
| 3 | -import { Row, Col, Tabs } from 'antd-v4'; | |
| 3 | +import { Row, Col, Tabs } from 'antd'; | |
| 4 | 4 | import TimeLineChart from '../TimelineChart'; |
| 5 | 5 | import NumberInfo from '../../NumberInfo'; |
| 6 | 6 | import Pie from '../Pie'; | ... | ... |
src/components/Charts/WaterWave/index.less
src/components/Charts/index.less
src/components/Common/AffixMenu.js
| 1 | 1 | /* eslint-disable */ |
| 2 | 2 | import React, { Component } from 'react'; |
| 3 | -import { Affix, Table, Checkbox, Input, Select, message, Tabs, Alert } from 'antd-v4'; | |
| 3 | +import fetch from 'dva/fetch'; | |
| 4 | +import { Affix, Table, Checkbox, Input, Select, message, Tabs, Alert } from 'antd'; | |
| 4 | 5 | import styles from '@/index.less'; |
| 5 | 6 | import lodash from 'lodash'; |
| 6 | 7 | import * as commonUtils from '@/utils/utils'; |
| 7 | -import config from '@/utils/config'; | |
| 8 | +import * as config from '@/utils/config'; | |
| 8 | 9 | import * as commonFunc from '@/components/Common/commonFunc'; |
| 9 | 10 | import AntdDraggableModal from '@/components/Common/AntdDraggableModal'; |
| 10 | 11 | import SvgIcon from '../SvgIcon'; |
| ... | ... | @@ -349,12 +350,7 @@ class AffixMenuComponent extends Component { |
| 349 | 350 | const columniFitWidth = commonFunc.showMessage(app.commonConst, 'columniFitWidth');/* 宽度 */ |
| 350 | 351 | const columnbVisible = commonFunc.showMessage(app.commonConst, 'columnbVisible');/* 是否显示 */ |
| 351 | 352 | const columnsName = commonFunc.showMessage(app.commonConst, 'columnsName');/* 字段名 */ |
| 352 | - const columnsReadOnly = commonFunc.showMessage(app.commonConst, 'columnsReadOnly') || '是否只读';/* 是否自读 */ | |
| 353 | - const columnsFontColor = commonFunc.showMessage(app.commonConst, 'columnsFontColor') || '字体颜色';/* 字体颜色 */ | |
| 354 | 353 | const isDefault = commonFunc.showMessage(app.commonConst, 'isDefault');/* 是否设置默认 */ |
| 355 | - const BtnSure = commonFunc.showMessage(app.commonConst, 'BtnSure') || '确认';/* 按钮确认 */ | |
| 356 | - const BtnCancel = commonFunc.showMessage(app.commonConst, 'BtnCancel') || '取消';/* 按钮取消 */ | |
| 357 | - const selectAll = commonFunc.showMessage(app.commonConst, 'selectAll') || '全选';/* 全选 */ | |
| 358 | 354 | // eslint-disable-next-line no-unused-vars |
| 359 | 355 | Object.keys(modalData).forEach((child, i) => { |
| 360 | 356 | const splitArr = commonUtils.isNotEmptyObject(child) && commonUtils.isNotEmptyArr(child.split('_')) ? child.split('_') : []; |
| ... | ... | @@ -409,11 +405,11 @@ class AffixMenuComponent extends Component { |
| 409 | 405 | visible += 1; |
| 410 | 406 | } |
| 411 | 407 | } |
| 412 | - checkAll = <span>{selectAll} <Checkbox indeterminate={visible !== len && visible} defaultChecked={visible === len} onChange={e => this.onCheckAll(e, child, count, configId)} /></span>; | |
| 408 | + checkAll = <span>全选 <Checkbox indeterminate={visible !== len && visible} defaultChecked={visible === len} onChange={e => this.onCheckAll(e, child, count, configId)} /></span>; | |
| 413 | 409 | } |
| 414 | 410 | if (this.props.app.userinfo.sType === 'sysadmin' || true) { /* 管理员设置列是否可修改 */ |
| 415 | 411 | columns.push({ |
| 416 | - title: columnsReadOnly, | |
| 412 | + title: '是否只读', | |
| 417 | 413 | dataIndex: 'bReadonly', |
| 418 | 414 | render: (text, record) => this.renderColumns(text, 'bReadonly', configId, record), |
| 419 | 415 | width: 80, |
| ... | ... | @@ -421,7 +417,7 @@ class AffixMenuComponent extends Component { |
| 421 | 417 | } |
| 422 | 418 | if (this.props.app.userinfo.sType === 'sysadmin' || true) { /* 管理员设置列颜色 */ |
| 423 | 419 | columns.push({ |
| 424 | - title: columnsFontColor, | |
| 420 | + title: '字体颜色', | |
| 425 | 421 | dataIndex: 'sFontColor', |
| 426 | 422 | render: (text, record) => this.renderColumns(text, 'sFontColor', configId, record), |
| 427 | 423 | width: 80, |
| ... | ... | @@ -489,8 +485,6 @@ class AffixMenuComponent extends Component { |
| 489 | 485 | onCancel={this.handlePpopUpPaneCancel.bind(this)} |
| 490 | 486 | onOk={this.handleOk.bind(this)} |
| 491 | 487 | width={1000} |
| 492 | - okText={BtnSure} | |
| 493 | - cancelText={BtnCancel} | |
| 494 | 488 | > |
| 495 | 489 | <div className={styles.modalsContent}> |
| 496 | 490 | { | ... | ... |
src/components/Common/AntdDraggableModal.js
src/components/Common/AssignmentField.js
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | */ |
| 4 | 4 | /* eslint-disable no-undef,import/first,prefer-destructuring,jsx-a11y/alt-text */ |
| 5 | 5 | import React, { Component } from 'react'; |
| 6 | -import { Modal } from 'antd-v4'; | |
| 6 | +import { Modal } from 'antd'; | |
| 7 | 7 | import styles from '@/index.less'; |
| 8 | 8 | import * as commonUtils from '@/utils/utils'; |
| 9 | 9 | import StaticEditTable from '@/components/Common/CommonTable';/* 可编辑表格 */ | ... | ... |
src/components/Common/BoxDesign/createAirplaneBox.js
| ... | ... | @@ -2,9 +2,8 @@ |
| 2 | 2 | // 创建飞机盒盒身 |
| 3 | 3 | const boxContent = (width, height, offsetX, offsetY) => { |
| 4 | 4 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 5 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} L ${offsetX + width} ${offsetY + height} L ${ | |
| 6 | - offsetX + width | |
| 7 | - } ${offsetY} L ${offsetX} ${offsetY} Z`; | |
| 5 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} L ${offsetX + width} ${offsetY + height} L ${offsetX + | |
| 6 | + width} ${offsetY} L ${offsetX} ${offsetY} Z`; | |
| 8 | 7 | svg.setAttribute("d", d); |
| 9 | 8 | svg.setAttribute("fill", "transparent"); |
| 10 | 9 | svg.setAttribute("stroke", "#333"); |
| ... | ... | @@ -15,9 +14,8 @@ const boxContent = (width, height, offsetX, offsetY) => { |
| 15 | 14 | // 创建飞机盒上盒部件 |
| 16 | 15 | const createBoxTop = (width, height, offsetX, offsetY, outerWidth) => { |
| 17 | 16 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 18 | - const d = `M ${offsetX} ${offsetY} L ${width} ${offsetY} A ${height} ${height} 0 0 1 ${width + outerWidth} ${offsetX} L ${offsetX - outerWidth} ${ | |
| 19 | - offsetY + height | |
| 20 | - } A ${height} ${height} 0 0 1 ${offsetX} ${offsetY}`; | |
| 17 | + const d = `M ${offsetX} ${offsetY} L ${width} ${offsetY} A ${height} ${height} 0 0 1 ${width + outerWidth} ${offsetX} L ${offsetX - | |
| 18 | + outerWidth} ${offsetY + height} A ${height} ${height} 0 0 1 ${offsetX} ${offsetY}`; | |
| 21 | 19 | svg.setAttribute("d", d); |
| 22 | 20 | svg.setAttribute("fill", "transparent"); |
| 23 | 21 | svg.setAttribute("stroke", "#333"); |
| ... | ... | @@ -27,9 +25,8 @@ const createBoxTop = (width, height, offsetX, offsetY, outerWidth) => { |
| 27 | 25 | // 创建飞机左上部件 |
| 28 | 26 | const createBoxLeftTop = (width, height, offsetX, offsetY, isLeft) => { |
| 29 | 27 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 30 | - const d = `M ${offsetX} ${offsetY} L ${offsetX - width + (isLeft ? 5 : -5)} ${offsetY + 5} A 10 10 0 0 ${isLeft ? 0 : 1} ${offsetX - width} ${ | |
| 31 | - offsetY + 15 | |
| 32 | - } L ${offsetX - width} ${offsetY + height - 15} | |
| 28 | + const d = `M ${offsetX} ${offsetY} L ${offsetX - width + (isLeft ? 5 : -5)} ${offsetY + 5} A 10 10 0 0 ${isLeft ? 0 : 1} ${offsetX - | |
| 29 | + width} ${offsetY + 15} L ${offsetX - width} ${offsetY + height - 15} | |
| 33 | 30 | A 10 10 0 0 ${isLeft ? 0 : 1} ${offsetX - width + (isLeft ? 5 : -5)} ${offsetY + height - 5} L ${offsetX} ${offsetY + height}`; |
| 34 | 31 | svg.setAttribute("d", d); |
| 35 | 32 | svg.setAttribute("fill", "transparent"); |
| ... | ... | @@ -96,16 +93,7 @@ export const createPathElement = (x, y, width, height, id, wrapperId) => { |
| 96 | 93 | svg.setAttribute("stroke-dasharray", "4"); // 添加虚线效果 |
| 97 | 94 | return svg; |
| 98 | 95 | }; |
| 99 | -export const createPathElements = (x, y, width, height, id, wrapperId) => { | |
| 100 | - const d = `M ${x} ${y} L ${x} ${y + height} L ${x + width} ${y + height} L ${x + width} ${y} L ${x} ${y} Z`; | |
| 101 | - const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); | |
| 102 | - svg.setAttribute("d", d); | |
| 103 | - svg.setAttribute("fill", "transparent"); | |
| 104 | - svg.setAttribute("stroke", "#7588B9"); | |
| 105 | - svg.setAttribute("stroke-width", "1"); | |
| 106 | - // svg.setAttribute("stroke-dasharray", "4"); // 添加虚线效果 | |
| 107 | - return svg; | |
| 108 | -}; | |
| 96 | + | |
| 109 | 97 | // |
| 110 | 98 | // 左边斜线贴边 |
| 111 | 99 | export const createTrapezoid = (height, offsetX, offsetY, size) => { |
| ... | ... | @@ -120,9 +108,9 @@ export const createTrapezoid = (height, offsetX, offsetY, size) => { |
| 120 | 108 | // 左上盒舌 盒舌 x轴原点 y轴原点 高度 x轴方向偏移 y轴方向偏移 是否瞬时针 是否镜像 type0 |
| 121 | 109 | export const createTopTongue = (width, offsetX, offsetY, size, xz, yz, clockwise, isMirror, az, jxY) => { |
| 122 | 110 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 123 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + xz} ${offsetY + az} L ${offsetX + xz} ${offsetY - size} L ${ | |
| 124 | - offsetX + width - (isMirror ? -(yz * 2) : yz * 2) | |
| 125 | - } ${offsetY - size} | |
| 111 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + xz} ${offsetY + az} L ${offsetX + xz} ${offsetY - size} L ${offsetX + | |
| 112 | + width - | |
| 113 | + (isMirror ? -(yz * 2) : yz * 2)} ${offsetY - size} | |
| 126 | 114 | A ${yz} ${yz} 0 0 ${clockwise} ${offsetX + width - (isMirror ? -yz : yz)} ${offsetY - size + jxY} L ${offsetX + width} ${offsetY}`; |
| 127 | 115 | svg.setAttribute("d", d); |
| 128 | 116 | svg.setAttribute("fill", "transparent"); |
| ... | ... | @@ -133,9 +121,9 @@ export const createTopTongue = (width, offsetX, offsetY, size, xz, yz, clockwise |
| 133 | 121 | // 下边 |
| 134 | 122 | export const createBottomTongue = (width, offsetX, offsetY, size, xz, yz, clockwise, isMirror, az, jxY) => { |
| 135 | 123 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 136 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + xz} ${offsetY + az} L ${offsetX + xz} ${offsetY - size} L ${ | |
| 137 | - offsetX + width - (isMirror ? -(yz * 2) : yz * 2) | |
| 138 | - } ${offsetY - size} | |
| 124 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + xz} ${offsetY + az} L ${offsetX + xz} ${offsetY - size} L ${offsetX + | |
| 125 | + width - | |
| 126 | + (isMirror ? -(yz * 2) : yz * 2)} ${offsetY - size} | |
| 139 | 127 | A ${yz} ${yz} 0 0 ${clockwise} ${offsetX + width - (isMirror ? -yz : yz)} ${offsetY - size + jxY} L ${offsetX + width} ${offsetY}`; |
| 140 | 128 | svg.setAttribute("d", d); |
| 141 | 129 | svg.setAttribute("fill", "transparent"); |
| ... | ... | @@ -146,9 +134,8 @@ export const createBottomTongue = (width, offsetX, offsetY, size, xz, yz, clockw |
| 146 | 134 | // 上盒舌类型1 |
| 147 | 135 | export const createTopTongueType1 = (width, offsetX, offsetY, size, xz, yz) => { |
| 148 | 136 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 149 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + xz} ${offsetY + size} L ${offsetX + width - xz + yz} ${offsetY + size} L${ | |
| 150 | - offsetX + width | |
| 151 | - } ${offsetY} `; | |
| 137 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + xz} ${offsetY + size} L ${offsetX + width - xz + yz} ${offsetY + size} L${offsetX + | |
| 138 | + width} ${offsetY} `; | |
| 152 | 139 | svg.setAttribute("d", d); |
| 153 | 140 | svg.setAttribute("fill", "transparent"); |
| 154 | 141 | svg.setAttribute("stroke", "#333"); |
| ... | ... | @@ -160,9 +147,8 @@ export const createDynamicTop = (width, height, deep, offsetX, offsetY, size) => |
| 160 | 147 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 161 | 148 | // 动态生成路径,基于输入参数 |
| 162 | 149 | const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY - deep - size + isSignNum} A 2 2 0 0 1 ${offsetX + 2} ${offsetY - deep - size} |
| 163 | - L ${offsetX + width - 2} ${offsetY - deep - size} A 2 2 0 0 1 ${offsetX + width} ${offsetY - deep - size + isSignNum} L ${offsetX + width} ${ | |
| 164 | - offsetY - deep | |
| 165 | - } | |
| 150 | + L ${offsetX + width - 2} ${offsetY - deep - size} A 2 2 0 0 1 ${offsetX + width} ${offsetY - deep - size + isSignNum} L ${offsetX + | |
| 151 | + width} ${offsetY - deep} | |
| 166 | 152 | L ${offsetX} ${offsetY - deep} L ${offsetX + width} ${offsetY - deep} L ${offsetX + width} ${offsetY} `; |
| 167 | 153 | svg.setAttribute("d", d); |
| 168 | 154 | svg.setAttribute("fill", "transparent"); |
| ... | ... | @@ -201,20 +187,19 @@ export const createText = (offsetX, offsetY, size, textContent) => { |
| 201 | 187 | text.setAttribute("dominant-baseline", "middle"); // 文字垂直居中 |
| 202 | 188 | text.setAttribute("fill", "#333"); // 文字颜色 |
| 203 | 189 | text.setAttribute("font-size", size); // 文字大小 |
| 204 | - text.textContent = textContent || ""; // 默认文字内容 | |
| 190 | + text.textContent = textContent || "Text"; // 默认文字内容 | |
| 205 | 191 | return text; |
| 206 | 192 | }; |
| 207 | 193 | // 竖向双箭头 |
| 208 | -export const createDoubleArrow = (height, offsetX, offsetY, scale) => { | |
| 209 | - const Y = -3 * (scale ? scale : 1); | |
| 194 | +export const createDoubleArrow = (height, offsetX, offsetY,scale) => { | |
| 195 | + const Y = -3 * (scale?scale:1) | |
| 210 | 196 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 211 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY - height / 2 - Y} L ${offsetX + Y} ${offsetY - height / 2 - Y} L ${offsetX} ${ | |
| 212 | - offsetY - height / 2 | |
| 213 | - } | |
| 197 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY - height / 2 - Y} L ${offsetX + Y} ${offsetY - height / 2 - Y} L ${offsetX} ${offsetY - | |
| 198 | + height / 2} | |
| 214 | 199 | L ${offsetX - Y} ${offsetY - height / 2 - Y} L ${offsetX} ${offsetY - height / 2 - Y} L ${offsetX} ${offsetY + height / 2 + Y} L |
| 215 | - ${offsetX - Y} ${offsetY + height / 2 + Y} L ${offsetX} ${offsetY + height / 2} L ${offsetX + Y} ${offsetY + height / 2 + Y} L ${offsetX} ${ | |
| 216 | - offsetY + height / 2 + Y | |
| 217 | - }`; | |
| 200 | + ${offsetX - Y} ${offsetY + height / 2 + Y} L ${offsetX} ${offsetY + height / 2} L ${offsetX + Y} ${offsetY + | |
| 201 | + height / 2 + | |
| 202 | + Y} L ${offsetX} ${offsetY + height / 2 + Y}`; | |
| 218 | 203 | svg.setAttribute("d", d); |
| 219 | 204 | svg.setAttribute("fill", "#F5AD6C"); |
| 220 | 205 | svg.setAttribute("stroke", "#F5AD6C"); |
| ... | ... | @@ -223,15 +208,14 @@ export const createDoubleArrow = (height, offsetX, offsetY, scale) => { |
| 223 | 208 | return svg; |
| 224 | 209 | }; |
| 225 | 210 | // 横向双箭头 |
| 226 | -export const createHorizontalDoubleArrow = (width, offsetX, offsetY, scale) => { | |
| 227 | - const Y = 3 * (scale ? scale : 1); | |
| 211 | +export const createHorizontalDoubleArrow = (width, offsetX, offsetY,scale) => { | |
| 212 | + const Y = 3 * (scale?scale:1) | |
| 228 | 213 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 229 | - const d = `M ${offsetX} ${offsetY} L ${offsetX - width / 2 + Y} ${offsetY} L ${offsetX - width / 2 + Y} ${offsetY - Y} L ${ | |
| 230 | - offsetX - width / 2 | |
| 231 | - } ${offsetY} | |
| 232 | - L ${offsetX - width / 2 + Y} ${offsetY + Y} L ${offsetX - width / 2 + Y} ${offsetY} L ${offsetX + width / 2 - Y} ${offsetY} L ${ | |
| 233 | - offsetX + width / 2 - Y | |
| 234 | - } ${offsetY + Y} L ${offsetX + width / 2} ${offsetY} | |
| 214 | + const d = `M ${offsetX} ${offsetY} L ${offsetX - width / 2 + Y} ${offsetY} L ${offsetX - width / 2 + Y} ${offsetY - Y} L ${offsetX - | |
| 215 | + width / 2} ${offsetY} | |
| 216 | + L ${offsetX - width / 2 + Y} ${offsetY + Y} L ${offsetX - width / 2 + Y} ${offsetY} L ${offsetX + width / 2 - Y} ${offsetY} L ${offsetX + | |
| 217 | + width / 2 - | |
| 218 | + Y} ${offsetY + Y} L ${offsetX + width / 2} ${offsetY} | |
| 235 | 219 | L ${offsetX + width / 2 - Y} ${offsetY - Y} L ${offsetX + width / 2 - Y} ${offsetY}`; |
| 236 | 220 | svg.setAttribute("d", d); |
| 237 | 221 | svg.setAttribute("fill", "#F5AD6C"); |
| ... | ... | @@ -444,10 +428,7 @@ export function createBoxs(slaveRowData) { |
| 444 | 428 | export function createHeavenBox(slaveRowData) { |
| 445 | 429 | const pathList = []; |
| 446 | 430 | const { W, L, D, dF, dF1, dD1, dZBJJ } = slaveRowData; |
| 447 | - const rectangles = [ | |
| 448 | - { x: 0, y: 0, width: L, height: W }, | |
| 449 | - { x: L + D + dZBJJ + dD1, y: -2, width: L + 4, height: W + 4 }, | |
| 450 | - ]; | |
| 431 | + const rectangles = [{ x: 0, y: 0, width: L, height: W }, { x: L + D + dZBJJ + dD1, y: -2, width: L + 4, height: W + 4 }]; | |
| 451 | 432 | rectangles.forEach(x => { |
| 452 | 433 | pathList.push(boxContent(x.width, x.height, x.x, x.y)); |
| 453 | 434 | }); |
| ... | ... | @@ -523,9 +504,8 @@ export function createDiscBox(slaveRowData) { |
| 523 | 504 | // 展示盒f1 |
| 524 | 505 | const createShowBoxF1 = (width, height, offsetX, offsetY, size) => { |
| 525 | 506 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 526 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + size} L ${offsetX - width} ${offsetY + size + 1} L ${offsetX - width} ${ | |
| 527 | - offsetY + height | |
| 528 | - } L ${offsetX} ${offsetY + height} Z`; | |
| 507 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + size} L ${offsetX - width} ${offsetY + size + 1} L ${offsetX - width} ${offsetY + | |
| 508 | + height} L ${offsetX} ${offsetY + height} Z`; | |
| 529 | 509 | svg.setAttribute("d", d); |
| 530 | 510 | svg.setAttribute("fill", "transparent"); |
| 531 | 511 | svg.setAttribute("stroke", "#333"); |
| ... | ... | @@ -557,11 +537,7 @@ const createShowBoxF2 = (width, height, offsetX, offsetY, size) => { |
| 557 | 537 | export function createShowBox(slaveRowData) { |
| 558 | 538 | const pathList = []; |
| 559 | 539 | const { L, W, D, dD2, dF1, dF2 } = slaveRowData; |
| 560 | - const rectangles = [ | |
| 561 | - { x: 0, y: 0, width: D, height: W }, | |
| 562 | - { x: D, y: 0, width: L, height: W }, | |
| 563 | - { x: D + L, y: 0, width: dD2, height: W }, | |
| 564 | - ]; | |
| 540 | + const rectangles = [{ x: 0, y: 0, width: D, height: W }, { x: D, y: 0, width: L, height: W }, { x: D + L, y: 0, width: dD2, height: W }]; | |
| 565 | 541 | rectangles.forEach(x => { |
| 566 | 542 | pathList.push(boxContent(x.width, x.height, x.x, x.y)); |
| 567 | 543 | }); |
| ... | ... | @@ -593,9 +569,8 @@ export function createShowBox(slaveRowData) { |
| 593 | 569 | // 内衬槽 |
| 594 | 570 | const createInnerLiningGroove = (width, height, offsetX, offsetY) => { |
| 595 | 571 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 596 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height - width / 2} A ${width / 2} ${width / 2} 0 0 0 ${offsetX - width} ${ | |
| 597 | - offsetY + height | |
| 598 | - } L ${offsetX - width} ${offsetY}`; | |
| 572 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height - width / 2} A ${width / 2} ${width / 2} 0 0 0 ${offsetX - width} ${offsetY + | |
| 573 | + height} L ${offsetX - width} ${offsetY}`; | |
| 599 | 574 | svg.setAttribute("d", d); |
| 600 | 575 | svg.setAttribute("fill", "transparent"); |
| 601 | 576 | svg.setAttribute("stroke", "#333"); |
| ... | ... | @@ -626,9 +601,8 @@ export function createLiningBox(slaveRowData) { |
| 626 | 601 | } |
| 627 | 602 | const createDiagonalEdging = (width, height, offsetX, offsetY) => { |
| 628 | 603 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 629 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + 5} ${offsetY + height} L ${offsetX + width - 5} ${offsetY + height} L${ | |
| 630 | - offsetX + width | |
| 631 | - } ${offsetY}`; | |
| 604 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + 5} ${offsetY + height} L ${offsetX + width - 5} ${offsetY + height} L${offsetX + | |
| 605 | + width} ${offsetY}`; | |
| 632 | 606 | svg.setAttribute("d", d); |
| 633 | 607 | svg.setAttribute("fill", "transparent"); |
| 634 | 608 | svg.setAttribute("stroke", "#333"); |
| ... | ... | @@ -666,8 +640,8 @@ const createSvg = d => { |
| 666 | 640 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 667 | 641 | svg.setAttribute("d", d); |
| 668 | 642 | svg.setAttribute("fill", "transparent"); |
| 669 | - svg.setAttribute("stroke", "#333"); | |
| 670 | - svg.setAttribute("stroke-width", "0.5"); | |
| 643 | + svg.setAttribute("stroke", "#7588B9"); | |
| 644 | + svg.setAttribute("stroke-width", "1"); | |
| 671 | 645 | return svg; |
| 672 | 646 | }; |
| 673 | 647 | const createDasharraySvg = d => { |
| ... | ... | @@ -688,16 +662,14 @@ export const createLineWeltTop = (width, height, offsetX, offsetY) => { |
| 688 | 662 | |
| 689 | 663 | // 上方盒舌等腰梯形 |
| 690 | 664 | export const createIsoscelesTrapezoidWeltTop = (width, height, offsetX, offsetY) => { |
| 691 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.1} ${offsetY + height} L ${offsetX + width * 0.9} ${offsetY + height} L ${ | |
| 692 | - offsetX + width | |
| 693 | - } ${offsetY}`; | |
| 665 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.1} ${offsetY + height} L ${offsetX + width * 0.9} ${offsetY + height} L ${offsetX + | |
| 666 | + width} ${offsetY}`; | |
| 694 | 667 | return createSvg(d); |
| 695 | 668 | }; |
| 696 | 669 | // 盒舌梯形 |
| 697 | 670 | export const createTrapezoidWeltTop = (width, height, offsetX, offsetY) => { |
| 698 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.5} ${offsetY + height} L ${offsetX + width * 0.9} ${offsetY + height} L ${ | |
| 699 | - offsetX + width | |
| 700 | - } ${offsetY}`; | |
| 671 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.5} ${offsetY + height} L ${offsetX + width * 0.9} ${offsetY + height} L ${offsetX + | |
| 672 | + width} ${offsetY}`; | |
| 701 | 673 | return createSvg(d); |
| 702 | 674 | }; |
| 703 | 675 | // 盒舌折叠 |
| ... | ... | @@ -717,260 +689,152 @@ export const createFoldWeltTopLine = (width, height, offsetX, offsetY) => { |
| 717 | 689 | export const createRoundedCornersWeltTop = (width, height, offsetX, offsetY) => { |
| 718 | 690 | const isNegative = (width > 0 && height > 0) || (width < 0 && height < 0); |
| 719 | 691 | |
| 720 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.1} ${offsetY + height * 0.9} L ${offsetX + width} ${offsetY + height} L ${ | |
| 721 | - offsetX + width | |
| 722 | - } ${offsetY}`; | |
| 692 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.1} ${offsetY + height * 0.9} L ${offsetX + width} ${offsetY + height} L ${offsetX + width} ${offsetY}` | |
| 723 | 693 | return createSvg(d); |
| 724 | 694 | }; |
| 725 | 695 | // 盒底组件 直角 |
| 726 | -export const createRightAngleBoxBottomComponent = (width, deep, size, offsetX, offsetY) => { | |
| 696 | +export const createRightAngleBoxBottomComponent = (width, deep,size, offsetX, offsetY) => { | |
| 727 | 697 | const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + size} L ${offsetX + width} ${offsetY + size} L ${offsetX + width} ${offsetY} |
| 728 | 698 | L ${offsetX + width} ${offsetY + size} L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + deep} ${offsetY} |
| 729 | 699 | L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + deep + width} ${offsetY + size} L ${offsetX + width + deep + width} ${offsetY} |
| 730 | - L ${offsetX + width + deep + width} ${offsetY + size} L ${offsetX + width + deep + width + deep} ${offsetY + size} L ${ | |
| 731 | - offsetX + width + deep + width + deep | |
| 732 | - } ${offsetY}`; | |
| 700 | + L ${offsetX + width + deep + width} ${offsetY + size} L ${offsetX + width + deep + width + deep} ${offsetY + size} L ${offsetX + width + deep + width + deep} ${offsetY}`; | |
| 733 | 701 | return createSvg(d); |
| 734 | 702 | }; |
| 735 | 703 | // 盒底组件 5002 |
| 736 | 704 | export const createBoxBottomComponent1 = (width, deep, size, offsetX, offsetY) => { |
| 737 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.2} ${offsetY + size * 0.5} L ${offsetX + width * 0.2} ${offsetY + size} L ${ | |
| 738 | - offsetX + width * 0.8 | |
| 739 | - } ${offsetY + size} L ${offsetX + width * 0.8} ${offsetY + size * 0.5} L ${offsetX + width} ${offsetY} | |
| 740 | - L ${offsetX + width} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${ | |
| 741 | - offsetY + size * 0.5 | |
| 742 | - } L ${offsetX + width + deep} ${offsetY} | |
| 743 | - L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + deep + width * 0.2} ${offsetY + size} L ${ | |
| 744 | - offsetX + width + deep + width * 0.2 | |
| 745 | - } ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.8} ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.8} ${ | |
| 746 | - offsetY + size | |
| 747 | - } | |
| 705 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.2} ${offsetY + size * 0.5} L ${offsetX + width * 0.2} ${offsetY + size} L ${offsetX + width * 0.8} ${offsetY + size} L ${offsetX + width * 0.8} ${offsetY + size *0.5} L ${offsetX + width} ${offsetY} | |
| 706 | + L ${offsetX + width} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${offsetY + size * 0.5} L ${offsetX + width + deep} ${offsetY} | |
| 707 | + L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + deep + width * 0.2} ${offsetY + size} L ${offsetX + width + deep + width * 0.2} ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.8} ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.8} ${offsetY + size} | |
| 748 | 708 | L ${offsetX + width + deep + width} ${offsetY + size} L ${offsetX + width + deep + width} ${offsetY} |
| 749 | - L ${offsetX + width + deep + width + deep * 0.5} ${offsetY + size * 0.5} L ${offsetX + width + deep + width + deep * 0.5} ${offsetY + size} L ${ | |
| 750 | - offsetX + width + deep + width + deep | |
| 751 | - } ${offsetY + size} L ${offsetX + width + deep + width + deep} ${offsetY} | |
| 752 | - `; | |
| 709 | + L ${offsetX + width + deep + width + deep *0.5} ${offsetY + size * 0.5} L ${offsetX + width + deep + width + deep * 0.5} ${offsetY + size} L ${offsetX + width + deep + width + deep} ${offsetY + size} L ${offsetX + width + deep + width + deep} ${offsetY} | |
| 710 | + ` | |
| 753 | 711 | return createSvg(d); |
| 754 | -}; | |
| 712 | +} | |
| 755 | 713 | // 盒底组件 5003 |
| 756 | 714 | export const createBoxBottomComponent2 = (width, deep, size, offsetX, offsetY) => { |
| 757 | 715 | const d = `M ${offsetX} ${offsetY} |
| 758 | 716 | L ${offsetX + width * 0.2} ${offsetY + size} L ${offsetX + width * 0.8} ${offsetY + size} L ${offsetX + width} ${offsetY} |
| 759 | - L ${offsetX + width} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${ | |
| 760 | - offsetY + size * 0.5 | |
| 761 | - } L ${offsetX + width + deep} ${offsetY} | |
| 762 | - L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + deep + width * 0.2} ${offsetY + size} L ${ | |
| 763 | - offsetX + width + deep + width * 0.2 | |
| 764 | - } ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.8} ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.8} ${ | |
| 765 | - offsetY + size | |
| 766 | - } ${offsetX + width + deep + width} ${offsetY + size} L ${offsetX + width + deep + width} ${offsetY} | |
| 767 | - L ${offsetX + width + deep + width + deep * 0.5} ${offsetY + size * 0.5} L ${offsetX + width + deep + width + deep * 0.5} ${offsetY + size} L ${ | |
| 768 | - offsetX + width + deep + width + deep | |
| 769 | - } ${offsetY + size} L ${offsetX + width + deep + width + deep} ${offsetY} | |
| 717 | + L ${offsetX + width} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${offsetY + size * 0.5} L ${offsetX + width + deep} ${offsetY} | |
| 718 | + L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + deep + width * 0.2} ${offsetY + size} L ${offsetX + width + deep + width * 0.2} ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.8} ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.8} ${offsetY + size} ${offsetX + width + deep + width} ${offsetY + size} L ${offsetX + width + deep + width} ${offsetY} | |
| 719 | + L ${offsetX + width + deep + width + deep *0.5} ${offsetY + size * 0.5} L ${offsetX + width + deep + width + deep * 0.5} ${offsetY + size} L ${offsetX + width + deep + width + deep} ${offsetY + size} L ${offsetX + width + deep + width + deep} ${offsetY} | |
| 770 | 720 | |
| 771 | - `; | |
| 721 | + ` | |
| 772 | 722 | return createSvg(d); |
| 773 | -}; | |
| 723 | +} | |
| 774 | 724 | // 盒底组件 5004 |
| 775 | 725 | export const createBoxBottomComponent3 = (width, deep, size, offsetX, offsetY) => { |
| 776 | 726 | const d = `M ${offsetX} ${offsetY} |
| 777 | - L ${offsetX + width * 0.05} ${offsetY + size} L ${offsetX + width * 0.25} ${offsetY + size} L ${offsetX + width * 0.5} ${offsetY + size * 0.5} L ${ | |
| 778 | - offsetX + width * 0.75 | |
| 779 | - } ${offsetY + size} L ${offsetX + width * 0.95} ${offsetY + size} L ${offsetX + width} ${offsetY} | |
| 780 | - L ${offsetX + width + deep * 0.1} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${offsetY + size} L ${offsetX + width + deep} ${offsetY} | |
| 781 | - L ${offsetX + width + deep + width * 0.05} ${offsetY + size} L ${offsetX + width + deep + width * 0.25} ${offsetY + size} L ${ | |
| 782 | - offsetX + width + deep + width * 0.5 | |
| 783 | - } ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.75} ${offsetY + size} L ${offsetX + width + deep + width * 0.95} ${ | |
| 784 | - offsetY + size | |
| 785 | - } L ${offsetX + width + deep + width} ${offsetY} | |
| 786 | - L ${offsetX + width * 2 + deep + deep * 0.5} ${offsetY + size} L ${offsetX + width * 2 + deep + deep * 0.9} ${offsetY + size} L ${ | |
| 787 | - offsetX + width * 2 + deep + deep | |
| 788 | - } ${offsetY + size} L ${offsetX + width * 2 + deep * 2} ${offsetY} | |
| 789 | - `; | |
| 727 | + L ${offsetX + width * 0.05} ${offsetY + size} L ${offsetX + width * 0.25} ${offsetY + size} L ${offsetX + width * 0.5} ${offsetY + size * 0.5} L ${offsetX + width * 0.75} ${offsetY + size} L ${offsetX + width *0.95} ${offsetY + size} L ${offsetX + width} ${offsetY} | |
| 728 | + L ${offsetX + width + deep * 0.1} ${offsetY + size} L ${offsetX + width + deep * 0.5} ${offsetY + size} L ${offsetX + width + deep} ${offsetY } | |
| 729 | + L ${offsetX + width + deep + width * 0.05} ${offsetY + size} L ${offsetX + width + deep + width * 0.25} ${offsetY + size} L ${offsetX + width + deep + width * 0.5} ${offsetY + size * 0.5} L ${offsetX + width + deep + width * 0.75} ${offsetY + size} L ${offsetX + width + deep + width *0.95} ${offsetY + size} L ${offsetX + width + deep + width} ${offsetY} | |
| 730 | + L ${offsetX + width * 2 +deep + deep *0.5} ${offsetY + size} L ${offsetX + width * 2 +deep + deep*0.9} ${offsetY + size} L ${offsetX + width * 2 +deep + deep} ${offsetY + size} L ${offsetX + width * 2 +deep * 2} ${offsetY} | |
| 731 | + ` | |
| 790 | 732 | return createSvg(d); |
| 791 | -}; | |
| 733 | +} | |
| 792 | 734 | // 盒底组件 5005 |
| 793 | 735 | export const createBoxBottomComponent4 = (width, deep, size, offsetX, offsetY) => { |
| 794 | 736 | const d = `M ${offsetX} ${offsetY} |
| 795 | - L ${offsetX} ${offsetY + size} L ${offsetX + width * 0.3} ${offsetY + size} L ${offsetX + width} ${offsetY} | |
| 796 | - L ${offsetX + width} ${offsetY + size} L ${offsetX + width + deep * 0.3} ${offsetY + size} L ${offsetX + width + deep} ${offsetY} | |
| 797 | - L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + deep + width * 0.3} ${offsetY + size} L ${offsetX + width * 2 + deep} ${offsetY} | |
| 798 | - L ${offsetX + width * 2 + deep} ${offsetY + size} L ${offsetX + width * 2 + deep + deep * 0.3} ${offsetY + size} L ${ | |
| 799 | - offsetX + width * 2 + deep * 2 | |
| 800 | - } ${offsetY} | |
| 801 | - `; | |
| 737 | + L ${offsetX } ${offsetY + size} L ${offsetX + width * 0.3} ${offsetY + size} L ${offsetX + width} ${offsetY} | |
| 738 | + L ${offsetX + width } ${offsetY + size} L ${offsetX + width + deep * 0.3} ${offsetY + size} L ${offsetX + width + deep} ${offsetY} | |
| 739 | + L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + deep + width * 0.3} ${offsetY + size} L ${offsetX + width * 2+ deep} ${offsetY} | |
| 740 | + L ${offsetX + width * 2 + deep } ${offsetY + size} L ${offsetX + width * 2 + deep + deep * 0.3} ${offsetY + size} L ${offsetX + width * 2+ deep * 2} ${offsetY} | |
| 741 | + ` | |
| 802 | 742 | return createSvg(d); |
| 803 | -}; // 盒底组件 5006 | |
| 743 | +}// 盒底组件 5006 | |
| 804 | 744 | export const createBoxBottomComponent5 = (width, deep, size, offsetX, offsetY) => { |
| 805 | 745 | const d = `M ${offsetX} ${offsetY} |
| 806 | - A ${width * 0.5} ${width * 0.5} 0 0 0 ${offsetX + width} ${offsetY} | |
| 807 | - A ${deep * 0.5} ${deep * 0.5} 0 0 0 ${offsetX + width + deep} ${offsetY} | |
| 808 | - A ${width * 0.5} ${width * 0.5} 0 0 0 ${offsetX + width * 2 + deep} ${offsetY} | |
| 809 | - A ${deep * 0.5} ${deep * 0.5} 0 0 0 ${offsetX + width * 2 + deep * 2} ${offsetY} | |
| 810 | - `; | |
| 746 | + A ${width * 0.5} ${width * 0.5 } 0 0 0 ${offsetX + width} ${offsetY } | |
| 747 | + A ${deep * 0.5} ${deep * 0.5 } 0 0 0 ${offsetX + width + deep} ${offsetY } | |
| 748 | + A ${width * 0.5} ${width * 0.5 } 0 0 0 ${offsetX + width * 2 + deep} ${offsetY } | |
| 749 | + A ${deep * 0.5} ${deep * 0.5 } 0 0 0 ${offsetX + width * 2 + deep * 2} ${offsetY } | |
| 750 | + ` | |
| 811 | 751 | return createSvg(d); |
| 812 | -}; | |
| 752 | +} | |
| 813 | 753 | // 盒底组件 5007 |
| 814 | 754 | export const createBoxBottomComponent6 = (width, deep, size, offsetX, offsetY) => { |
| 815 | 755 | const d = `M ${offsetX} ${offsetY} |
| 816 | - L ${offsetX} ${offsetY + size} L ${offsetX + width} ${offsetY + size} L ${offsetX + width} ${offsetY} | |
| 756 | + L ${offsetX } ${offsetY + size} L ${offsetX + width } ${offsetY + size} L ${offsetX + width} ${offsetY} | |
| 817 | 757 | L ${offsetX + width + deep * 0.2} ${offsetY + size * 0.7} A ${size * 0.1} ${size * 0.1} 0 0 0 ${offsetX + width + deep * 0.2} ${offsetY + size} |
| 818 | 758 | L ${offsetX + width + deep * 0.8} ${offsetY + size} A ${size * 0.1} ${size * 0.1} 0 0 0 ${offsetX + width + deep * 0.8} ${offsetY + size * 0.7} |
| 819 | 759 | L ${offsetX + width + deep} ${offsetY} |
| 820 | - L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + width + deep} ${offsetY + size} L ${offsetX + width + deep + width} ${offsetY} | |
| 821 | - L ${offsetX + width + deep + width + deep * 0.2} ${offsetY + size * 0.7} A ${size * 0.1} ${size * 0.1} 0 0 0 ${ | |
| 822 | - offsetX + width + deep + width + deep * 0.2 | |
| 823 | - } ${offsetY + size} | |
| 824 | - L ${offsetX + width + deep + width + deep * 0.8} ${offsetY + size} A ${size * 0.1} ${size * 0.1} 0 0 0 ${ | |
| 825 | - offsetX + width + deep + width + deep * 0.8 | |
| 826 | - } ${offsetY + size * 0.7} | |
| 760 | + L ${offsetX + width + deep} ${offsetY + size} L ${offsetX + width + width + deep } ${offsetY + size} L ${offsetX + width + deep+ width} ${offsetY} | |
| 761 | + L ${offsetX + width + deep + width + deep * 0.2} ${offsetY + size * 0.7} A ${size * 0.1} ${size * 0.1} 0 0 0 ${offsetX + width + deep + width + deep * 0.2} ${offsetY + size} | |
| 762 | + L ${offsetX + width + deep+ width + deep * 0.8} ${offsetY + size} A ${size * 0.1} ${size * 0.1} 0 0 0 ${offsetX + width + deep + width + deep * 0.8} ${offsetY + size * 0.7} | |
| 827 | 763 | L ${offsetX + width + deep + width + deep} ${offsetY} |
| 828 | - `; | |
| 764 | + ` | |
| 829 | 765 | return createSvg(d); |
| 830 | -}; | |
| 766 | +} | |
| 831 | 767 | // 部件 |
| 832 | -export const createBoxComponentNew = (width, deep, size, offsetX, offsetY) => { | |
| 768 | +export const createBoxComponentNew = (width, deep,size, offsetX, offsetY) => { | |
| 833 | 769 | const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + deep} L ${offsetX + width} ${offsetY + deep} L ${offsetX + width} ${offsetY} |
| 834 | - L ${offsetX + width} ${offsetY + deep + size} L ${offsetX} ${offsetY + deep + size} L ${offsetX} ${offsetY}`; | |
| 770 | + L ${offsetX + width} ${offsetY + deep + size} L ${offsetX} ${offsetY + deep + size} L ${offsetX} ${offsetY}` | |
| 835 | 771 | return createSvg(d); |
| 836 | -}; | |
| 772 | +} | |
| 837 | 773 | // 部件1 |
| 838 | -export const createBoxComponentNew1 = (width, deep, size, offsetX, offsetY) => { | |
| 839 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + size} L ${offsetX + width} ${offsetY + size} L ${offsetX + width} ${offsetY}`; | |
| 774 | +export const createBoxComponentNew1 = (width, deep,size, offsetX, offsetY) => { | |
| 775 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + size} L ${offsetX + width} ${offsetY + size} L ${offsetX + width} ${offsetY}` | |
| 840 | 776 | return createSvg(d); |
| 841 | -}; | |
| 777 | +} | |
| 842 | 778 | // 部件2 |
| 843 | -export const createBoxComponentNew2 = (width, deep, size, offsetX, offsetY) => { | |
| 844 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.4} ${offsetY} L ${offsetX + width * 0.4} ${offsetY + size} L ${offsetX + width * 0.6} ${ | |
| 845 | - offsetY + size | |
| 846 | - } L ${offsetX + width * 0.6} ${offsetY} L ${offsetX + width} ${offsetY}`; | |
| 779 | +export const createBoxComponentNew2 = (width, deep,size, offsetX, offsetY) => { | |
| 780 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + width * 0.4} ${offsetY} L ${offsetX + width * 0.4} ${offsetY + size} L ${offsetX + width * 0.6} ${offsetY + size} L ${offsetX + width * 0.6} ${offsetY} L ${offsetX + width} ${offsetY}` | |
| 847 | 781 | return createSvg(d); |
| 848 | -}; | |
| 782 | +} | |
| 849 | 783 | // 部件3 |
| 850 | -export const createBoxComponentNew3 = (width, deep, size, offsetX, offsetY) => { | |
| 851 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + deep * 2} L ${offsetX + width * 0.2} ${offsetY + deep * 2} L ${offsetX + width * 0.2} ${ | |
| 852 | - offsetY + deep * 2 + size | |
| 853 | - } L ${offsetX + width * 0.4} ${offsetY + deep * 2 + size} | |
| 854 | - L ${offsetX + width * 0.4} ${offsetY + deep * 2} L ${offsetX + width * 0.6} ${offsetY + deep * 2} L${offsetX + width * 0.6} ${ | |
| 855 | - offsetY + deep * 2 + size | |
| 856 | - } L ${offsetX + width * 0.8} ${offsetY + deep * 2 + size} L ${offsetX + width * 0.8} ${offsetY + deep * 2} | |
| 857 | - L ${offsetX + width} ${offsetY + deep * 2} L ${offsetX + width} ${offsetY + deep} L ${offsetX} ${offsetY + deep} L ${offsetX + width} ${ | |
| 858 | - offsetY + deep | |
| 859 | - } ${offsetX + width} ${offsetY}`; | |
| 784 | +export const createBoxComponentNew3 = (width, deep,size, offsetX, offsetY) => { | |
| 785 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + deep * 2} L ${offsetX + width * 0.2} ${offsetY + deep * 2} L ${offsetX + width * 0.2} ${offsetY + deep * 2 + size} L ${offsetX + width * 0.4} ${offsetY + deep * 2 + size} | |
| 786 | + L ${offsetX + width * 0.4} ${offsetY + deep * 2} L ${offsetX + width * 0.6} ${offsetY + deep * 2} L${offsetX + width * 0.6} ${offsetY + deep * 2 + size} L ${offsetX + width * 0.8} ${offsetY + deep * 2 + size} L ${offsetX + width * 0.8} ${offsetY + deep * 2} | |
| 787 | + L ${offsetX + width} ${offsetY + deep * 2} L ${offsetX + width} ${offsetY + deep} L ${offsetX} ${offsetY+deep} L ${offsetX + width} ${offsetY+deep} ${offsetX+width} ${offsetY}` | |
| 860 | 788 | return createSvg(d); |
| 861 | -}; | |
| 789 | +} | |
| 862 | 790 | // 部件4 |
| 863 | -export const createBoxComponentNew4 = (width, deep, size, offsetX, offsetY) => { | |
| 864 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + deep * 2} L ${offsetX + width} ${offsetY + deep * 2} L ${offsetX + width} ${ | |
| 865 | - offsetY + deep | |
| 866 | - } L ${offsetX} ${offsetY + deep} L ${offsetX + width} ${offsetY + deep} L ${offsetX + width} ${offsetY} | |
| 867 | - M ${offsetX + width * 0.3} ${offsetY + deep * 0.8} L ${offsetX + width * 0.3} ${offsetY + deep * 0.6} L ${offsetX + width * 0.7} ${ | |
| 868 | - offsetY + deep * 0.6 | |
| 869 | - } L ${offsetX + width * 0.7} ${offsetY + deep * 0.8} L ${offsetX + width * 0.3} ${offsetY + deep * 0.8} | |
| 870 | - M ${offsetX + width * 0.3} ${offsetY + deep + deep * 0.8} L ${offsetX + width * 0.3} ${offsetY + deep + deep * 0.6} L ${offsetX + width * 0.7} ${ | |
| 871 | - offsetY + deep + deep * 0.6 | |
| 872 | - } L ${offsetX + width * 0.7} ${offsetY + deep + deep * 0.8} L ${offsetX + width * 0.3} ${offsetY + deep + deep * 0.8} | |
| 873 | - `; | |
| 791 | +export const createBoxComponentNew4 = (width, deep,size, offsetX, offsetY) => { | |
| 792 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + deep * 2} L ${offsetX + width} ${offsetY + deep * 2} L ${offsetX + width} ${offsetY + deep} L ${offsetX} ${offsetY + deep} L ${offsetX + width} ${offsetY + deep} L ${offsetX + width} ${offsetY} | |
| 793 | + M ${offsetX + width * 0.3} ${offsetY + deep * 0.8} L ${offsetX + width * 0.3} ${offsetY + deep * 0.6} L ${offsetX + width * 0.7} ${offsetY + deep * 0.6} L ${offsetX + width * 0.7} ${offsetY + deep * 0.8} L ${offsetX + width * 0.3} ${offsetY + deep * 0.8} | |
| 794 | + M ${offsetX + width * 0.3} ${offsetY+ deep + deep * 0.8} L ${offsetX + width * 0.3} ${offsetY + deep + deep * 0.6} L ${offsetX + width * 0.7} ${offsetY+ deep + deep * 0.6} L ${offsetX + width * 0.7} ${offsetY+ deep + deep * 0.8} L ${offsetX + width * 0.3} ${offsetY+ deep + deep * 0.8} | |
| 795 | + ` | |
| 874 | 796 | return createSvg(d); |
| 875 | -}; | |
| 797 | +} | |
| 876 | 798 | // 部件4的小组件 |
| 877 | -export const createBoxComponentNew4_1 = (width, size, offsetX, offsetY) => { | |
| 878 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + size} L ${offsetX + width} ${offsetY + size} L ${offsetX + width} ${offsetY}Z`; | |
| 799 | +export const createBoxComponentNew4_1 = (width,size, offsetX, offsetY) => { | |
| 800 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + size} L ${offsetX + width} ${offsetY + size} L ${offsetX + width} ${offsetY}Z` | |
| 879 | 801 | return createSvg(d); |
| 880 | -}; | |
| 881 | - | |
| 882 | -// 部件5 | |
| 883 | -export const createBoxComponentNew5 = (width, deep, size, offsetX, offsetY) => { | |
| 884 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + deep} L ${offsetX + width} ${offsetY + deep} | |
| 885 | - L ${offsetX + width} ${offsetY} L ${offsetX + width} ${offsetY + deep} L ${offsetX + width * 0.9} ${offsetY + deep + size} | |
| 886 | - L ${offsetX + width * 0.1} ${offsetY + deep + size} L ${offsetX} ${offsetY + deep} | |
| 887 | - `; | |
| 888 | - return createSvg(d); | |
| 889 | -}; | |
| 890 | -// 手提盒部件 | |
| 891 | -export const createBoxComponentNew6 = (width, deep, size, offsetX, offsetY) => { | |
| 892 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + deep} L ${offsetX + width * 0.3} ${offsetY + deep} | |
| 893 | - L ${offsetX + width * 0.3} ${offsetY + deep + size * 0.5} L ${offsetX + width * 0.7} ${offsetY + deep + size * 0.5} | |
| 894 | - L ${offsetX + width * 0.7} ${offsetY + deep} L ${offsetX + width} ${offsetY + deep} L ${offsetX} ${offsetY + deep} | |
| 895 | - L ${offsetX} ${offsetY + deep + size} L ${offsetX + width * 0.1} ${offsetY + deep + size} | |
| 896 | - L ${offsetX + width * 0.1} ${offsetY + deep + size * 0.8} L ${offsetX + width * 0.2} ${offsetY + deep + size} | |
| 897 | - L ${offsetX + width * 0.8} ${offsetY + deep + size} L ${offsetX + width * 0.9} ${offsetY + deep + size * 0.8} | |
| 898 | - L ${offsetX + width * 0.9} ${offsetY + deep + size}L ${offsetX + width} ${offsetY + deep + size}L ${offsetX + width} ${offsetY} | |
| 899 | - `; | |
| 900 | - return createSvg(d); | |
| 901 | -}; | |
| 802 | +} | |
| 902 | 803 | // 贴边1 |
| 903 | -export const createWelt = (height, size, offsetX, offsetY) => { | |
| 904 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + size * 0.6} ${offsetY} L ${offsetX + size * 0.6} ${offsetY + height} L ${ | |
| 905 | - offsetX + size * 0.6 | |
| 906 | - } ${offsetY} L ${offsetX + size} ${offsetY + height * 0.1} L ${offsetX + size} ${offsetY + height * 0.9} L ${offsetX + size * 0.6} ${ | |
| 907 | - offsetY + height | |
| 908 | - } L ${offsetX} ${offsetY + height}`; | |
| 804 | +export const createWelt = (height,size,offsetX,offsetY) =>{ | |
| 805 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + size * 0.6} ${offsetY} L ${offsetX + size * 0.6} ${offsetY + height} L ${offsetX + size * 0.6} ${offsetY} L ${offsetX + size} ${offsetY + height * 0.1} L ${offsetX + size} ${offsetY + height * 0.9} L ${offsetX + size * 0.6} ${offsetY + height} L ${offsetX} ${offsetY + height}` | |
| 909 | 806 | return createSvg(d); |
| 910 | -}; | |
| 807 | +} | |
| 911 | 808 | // 贴边1 |
| 912 | -export const createWelt1 = (height, size, offsetX, offsetY) => { | |
| 913 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + size} ${offsetY + height * 0.1} L ${offsetX + size} ${offsetY + height * 0.9} L ${offsetX} ${ | |
| 914 | - offsetY + height | |
| 915 | - }`; | |
| 809 | +export const createWelt1 = (height,size,offsetX,offsetY) =>{ | |
| 810 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + size} ${offsetY + height * 0.1} L ${offsetX + size} ${offsetY + height * 0.9} L ${offsetX} ${offsetY + height}` | |
| 916 | 811 | return createSvg(d); |
| 917 | -}; | |
| 812 | +} | |
| 918 | 813 | // 贴边2 |
| 919 | -export const createWelt2 = (height, size, offsetX, offsetY) => { | |
| 920 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + size} ${offsetY} A ${size *0.3} ${size * 0.3} 0 0 1 ${offsetX } ${offsetY } L ${offsetX} ${offsetY + height} L | |
| 921 | - ${offsetX + size} ${offsetY + height} A ${size *0.3} ${size * 0.3} 0 0 0 ${offsetX} ${offsetY + height} L ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${offsetY} | |
| 922 | - ` | |
| 923 | - // A ${ size * 0.5 } ${size} 0 0 1 ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} A ${size * 0.5} ${size} 0 0 1 ${offsetX + size * 0.5} ${ | |
| 924 | - // offsetY + height + Math.abs(size) | |
| 925 | - // } A ${size * 0.5} ${size} 0 0 1 ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${offsetY} L ${offsetX + size} ${ | |
| 926 | - // offsetY + height | |
| 927 | - // } L ${offsetX} ${offsetY + height}`; | |
| 928 | - return createSvg(d); | |
| 929 | -}; | |
| 930 | -export const createWelt2Right = (height, size, offsetX, offsetY) => { | |
| 931 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + size} ${offsetY} A ${size * 0.3} ${size * 0.3} 0 0 0 ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} | |
| 932 | - L ${offsetX + size} ${offsetY + height} A ${size *0.3} ${size * 0.3} 0 0 1 ${offsetX} ${offsetY + height} L ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${offsetY} ` | |
| 933 | - // A ${ | |
| 934 | - // size * 0.5 | |
| 935 | - // } ${size} 0 0 0 ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} A ${size * 0.5} ${size} 0 0 0 ${offsetX + size * 0.5} ${ | |
| 936 | - // offsetY + height + Math.abs(size) | |
| 937 | - // } A ${size * 0.5} ${size} 0 0 0 ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${offsetY} L ${offsetX + size} ${ | |
| 938 | - // offsetY + height | |
| 939 | - // } L ${offsetX} ${offsetY + height}`; | |
| 814 | +export const createWelt2 = (height,size,offsetX,offsetY) =>{ | |
| 815 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + size} ${offsetY} A ${size * 0.5} ${size} 0 0 1 ${offsetX + size * 0.5} ${offsetY + size} A ${size * 0.5} ${size} 0 0 1 ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} A ${size * 0.5} ${size} 0 0 1 ${offsetX + size * 0.5} ${offsetY + height + Math.abs(size)} A ${size * 0.5} ${size} 0 0 1 ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${offsetY} L ${offsetX + size} ${offsetY + height} L ${offsetX} ${offsetY + height}` | |
| 940 | 816 | return createSvg(d); |
| 941 | -}; | |
| 942 | -export const createWelt3 = (height, size, offsetX, offsetY) => { | |
| 943 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} L ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${ | |
| 944 | - offsetY + size * 0.3 | |
| 945 | - } L ${offsetX} ${offsetY + size * 0.3} L ${offsetX} ${offsetY}`; | |
| 946 | - return createSvg(d); | |
| 947 | -}; | |
| 948 | -export const createWelt4 = (height, size, offsetX, offsetY, dSFHS, dXFHS) => { | |
| 949 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY - dSFHS} L ${offsetX + size} ${offsetY - dSFHS} L ${offsetX + size} ${offsetY + height+dXFHS} | |
| 950 | - L ${offsetX} ${offsetY + height+dXFHS} L ${offsetX} ${offsetY + height}`; | |
| 817 | +} | |
| 818 | +export const createWelt2Right = (height,size,offsetX,offsetY) =>{ | |
| 819 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + size} ${offsetY} A ${size * 0.5} ${size} 0 0 0 ${offsetX + size * 0.5} ${offsetY - size} A ${size * 0.5} ${size} 0 0 0 ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} A ${size * 0.5} ${size} 0 0 0 ${offsetX + size * 0.5} ${offsetY + height + Math.abs(size)} A ${size * 0.5} ${size} 0 0 0 ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${offsetY} L ${offsetX + size} ${offsetY + height} L ${offsetX} ${offsetY + height}` | |
| 951 | 820 | return createSvg(d); |
| 952 | -}; | |
| 953 | -export const createWelt3Right = (height, size, offsetX, offsetY) => { | |
| 954 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} L ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${ | |
| 955 | - offsetY - size * 0.3 | |
| 956 | - } L ${offsetX} ${offsetY - size * 0.3} L ${offsetX} ${offsetY}`; | |
| 821 | +} | |
| 822 | +export const createWelt3 = (height,size,offsetX,offsetY) =>{ | |
| 823 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} L ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${offsetY + size * 0.3} L ${offsetX} ${offsetY + size * 0.3} L ${offsetX} ${offsetY}` | |
| 957 | 824 | return createSvg(d); |
| 958 | -}; | |
| 959 | -export const createWelt4Right = (height, size, offsetX, offsetY, dSFHS, dXFHS) => { | |
| 960 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY - dSFHS} L ${offsetX + size} ${offsetY - dSFHS} | |
| 961 | - L ${offsetX + size} ${offsetY + height + dXFHS} L ${offsetX } ${offsetY + height + dXFHS} L ${offsetX} ${offsetY + height}`; | |
| 825 | +} | |
| 826 | +export const createWelt3Right = (height,size,offsetX,offsetY) =>{ | |
| 827 | + const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + height} L ${offsetX + size} ${offsetY + height} L ${offsetX + size} ${offsetY - size * 0.3} L ${offsetX} ${offsetY - size * 0.3} L ${offsetX} ${offsetY}` | |
| 962 | 828 | return createSvg(d); |
| 963 | -}; | |
| 829 | +} | |
| 964 | 830 | // 天地盒 |
| 965 | -export const createFullTelescope = (width, height, deep, offsetX, offsetY) => { | |
| 966 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + width} ${offsetY} L ${offsetX + width} ${offsetY + height} L ${offsetX} ${ | |
| 967 | - offsetY + height | |
| 968 | - } L ${offsetX} ${offsetY} | |
| 831 | +export const createFullTelescope = (width,height,deep,offsetX,offsetY) => { | |
| 832 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + width} ${offsetY} L ${offsetX + width} ${offsetY + height} L ${offsetX} ${offsetY + height} L ${offsetX} ${offsetY} | |
| 969 | 833 | L ${offsetX - deep} ${offsetY} L ${offsetX - deep} ${offsetY + height} L ${offsetX} ${offsetY + height} |
| 970 | 834 | L ${offsetX} ${offsetY + height + deep} L ${offsetX + width} ${offsetY + height + deep} L ${offsetX + width} ${offsetY + height} |
| 971 | 835 | L ${offsetX + width + deep} ${offsetY + height} L ${offsetX + width + deep} ${offsetY} L ${offsetX + width} ${offsetY} |
| 972 | 836 | L ${offsetX + width} ${offsetY - deep} L ${offsetX} ${offsetY - deep} L ${offsetX} ${offsetY} |
| 973 | - `; | |
| 837 | + ` | |
| 974 | 838 | const svg = document.createElementNS("http://www.w3.org/2000/svg", "path"); |
| 975 | 839 | svg.setAttribute("d", d); |
| 976 | 840 | svg.setAttribute("fill", "transparent"); |
| ... | ... | @@ -978,67 +842,41 @@ export const createFullTelescope = (width, height, deep, offsetX, offsetY) => { |
| 978 | 842 | svg.setAttribute("stroke-width", "1"); |
| 979 | 843 | svg.setAttribute("stroke-dasharray", "4"); // 添加虚线效果 |
| 980 | 844 | return svg; |
| 981 | -}; | |
| 845 | +} | |
| 982 | 846 | // 天地部件1 |
| 983 | -export const createBoxComponentNewFull = (width, deep, size, offsetX, offsetY) => { | |
| 847 | +export const createBoxComponentNewFull = (width, deep,size, offsetX, offsetY) => { | |
| 984 | 848 | const d = `M ${offsetX} ${offsetY} L ${offsetX + deep} ${offsetY} L ${offsetX + deep} ${offsetY + width} L ${offsetX + deep} ${offsetY} |
| 985 | - L ${offsetX + deep + size} ${offsetY} L ${offsetX + deep + size} ${offsetY + width} L ${offsetX} ${offsetY + width}`; | |
| 849 | + L ${offsetX + deep + size} ${offsetY} L ${offsetX+ deep + size} ${offsetY + width} L ${offsetX} ${offsetY + width}` | |
| 986 | 850 | return createSvg(d); |
| 987 | -}; | |
| 851 | +} | |
| 988 | 852 | // 天地部件2 |
| 989 | -export const createBoxComponentNewFull1 = (width, size, offsetX, offsetY) => { | |
| 990 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + size} ${offsetY} L ${offsetX + size} ${offsetY + width} L ${offsetX} ${offsetY + width}`; | |
| 853 | +export const createBoxComponentNewFull1 = (width,size, offsetX, offsetY) => { | |
| 854 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + size} ${offsetY} L ${offsetX + size} ${offsetY + width} L ${offsetX } ${offsetY + width}` | |
| 991 | 855 | return createSvg(d); |
| 992 | -}; | |
| 856 | +} | |
| 993 | 857 | // 天地部件3 |
| 994 | -export const createBoxComponentNewFull2 = (width, size, offsetX, offsetY) => { | |
| 995 | - const d = `M ${offsetX} ${offsetY} L ${offsetX} ${offsetY + width * 0.4} L ${offsetX + size} ${offsetY + width * 0.4} | |
| 858 | +export const createBoxComponentNewFull2 = (width,size, offsetX, offsetY) => { | |
| 859 | + const d = `M ${offsetX} ${offsetY} L ${offsetX } ${offsetY + width * 0.4} L ${offsetX + size} ${offsetY + width * 0.4} | |
| 996 | 860 | L ${offsetX + size} ${offsetY + width * 0.6} L ${offsetX} ${offsetY + width * 0.6} L ${offsetX} ${offsetY + width} |
| 997 | - `; | |
| 861 | + ` | |
| 998 | 862 | return createSvg(d); |
| 999 | -}; | |
| 863 | +} | |
| 1000 | 864 | // 天地部件4 |
| 1001 | -export const createBoxComponentNewFul3 = (width, deep, size, offsetX, offsetY) => { | |
| 865 | +export const createBoxComponentNewFul3 = (width, deep,size, offsetX, offsetY) => { | |
| 1002 | 866 | const d = `M ${offsetX} ${offsetY} L ${offsetX + deep} ${offsetY} L ${offsetX + deep} ${offsetY + width} L ${offsetX} ${offsetY + width} |
| 1003 | - L ${offsetX + deep * 2} ${offsetY + width} L ${offsetX + deep * 2} ${offsetY + width * 0.8} L ${offsetX + deep * 2 + size} ${offsetY + width * 0.8} | |
| 1004 | - L ${offsetX + deep * 2 + size} ${offsetY + width * 0.6} L ${offsetX + deep * 2} ${offsetY + width * 0.6} | |
| 1005 | - L ${offsetX + deep * 2} ${offsetY + width * 0.4} L ${offsetX + deep * 2 + size} ${offsetY + width * 0.4} | |
| 1006 | - L ${offsetX + deep * 2 + size} ${offsetY + width * 0.2} L ${offsetX + deep * 2} ${offsetY + width * 0.2} | |
| 1007 | - L ${offsetX + deep * 2} ${offsetY} L ${offsetX} ${offsetY} | |
| 1008 | - `; | |
| 867 | + L ${offsetX + deep * 2} ${offsetY + width} L ${offsetX + deep * 2} ${offsetY + width * 0.8} L ${offsetX + deep * 2+size} ${offsetY + width * 0.8} | |
| 868 | + L ${offsetX + deep * 2 + size} ${offsetY + width*0.6} L ${offsetX + deep * 2} ${offsetY + width*0.6} | |
| 869 | + L ${offsetX + deep * 2} ${offsetY + width*0.4} L ${offsetX + deep * 2 + size} ${offsetY + width*0.4} | |
| 870 | + L ${offsetX + deep * 2 + size} ${offsetY + width*0.2} L ${offsetX + deep * 2} ${offsetY + width*0.2} | |
| 871 | + L ${offsetX + deep * 2 } ${offsetY} L ${offsetX} ${offsetY} | |
| 872 | + ` | |
| 1009 | 873 | return createSvg(d); |
| 1010 | -}; | |
| 874 | +} | |
| 1011 | 875 | // 天地部件4 |
| 1012 | -export const createBoxComponentNewFul4 = (width, deep, size, offsetX, offsetY) => { | |
| 1013 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + deep * 2} ${offsetY} L ${offsetX + deep * 2} ${offsetY + width} L ${offsetX + deep} ${ | |
| 1014 | - offsetY + width | |
| 1015 | - } L ${offsetX + deep} ${offsetY} L ${offsetX + deep} ${offsetY + width} L ${offsetX} ${offsetY + width} | |
| 1016 | - M ${offsetX + deep * 0.8} ${offsetY + width * 0.3} L ${offsetX + deep * 0.6} ${offsetY + width * 0.3} L ${offsetX + deep * 0.6} ${ | |
| 1017 | - offsetY + width * 0.7 | |
| 1018 | - } L ${offsetX + deep * 0.8} ${offsetY + width * 0.7} L ${offsetX + deep * 0.8} ${offsetY + width * 0.3} | |
| 1019 | - M ${offsetX + deep + deep * 0.8} ${offsetY + width * 0.3} L ${offsetX + deep + deep * 0.6} ${offsetY + width * 0.3} L ${ | |
| 1020 | - offsetX + deep + deep * 0.6 | |
| 1021 | - } ${offsetY + width * 0.7} L ${offsetX + deep + deep * 0.8} ${offsetY + width * 0.7} L ${offsetX + deep + deep * 0.8} ${offsetY + width * 0.3} | |
| 1022 | - `; | |
| 876 | +export const createBoxComponentNewFul4 = (width, deep,size, offsetX, offsetY) => { | |
| 877 | + const d = `M ${offsetX} ${offsetY} L ${offsetX + deep * 2} ${offsetY} L ${offsetX + deep * 2} ${offsetY + width} L ${offsetX + deep} ${offsetY + width} L ${offsetX + deep} ${offsetY} L ${offsetX + deep} ${offsetY + width} L ${offsetX } ${offsetY+ width} | |
| 878 | + M ${offsetX + deep * 0.8} ${offsetY + width * 0.3} L ${offsetX + deep * 0.6} ${offsetY + width * 0.3} L ${offsetX+ deep * 0.6} ${offsetY + width * 0.7} L ${offsetX+ deep * 0.8} ${offsetY + width * 0.7} L ${offsetX+ deep * 0.8} ${offsetY + width * 0.3} | |
| 879 | + M ${offsetX + deep + deep * 0.8} ${offsetY+ width * 0.3} L ${offsetX + deep + deep * 0.6} ${offsetY+ width * 0.3} L ${offsetX+ deep + deep * 0.6} ${offsetY + width * 0.7} L ${offsetX+ deep + deep * 0.8} ${offsetY + width * 0.7} L ${offsetX+ deep + deep * 0.8 } ${offsetY + width * 0.3} | |
| 880 | + ` | |
| 1023 | 881 | return createSvg(d); |
| 1024 | -}; | |
| 1025 | -// 部件5 | |
| 1026 | -export const createBoxComponentNewFul5 = (width, deep, size, offsetX, offsetY) => { | |
| 1027 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + deep} ${offsetY} L ${offsetX + deep} ${offsetY + width} | |
| 1028 | - L ${offsetX + deep} ${offsetY} L ${offsetX + deep + size} ${offsetY + width * 0.1} L${offsetX + deep + size} ${offsetY + width * 0.9} | |
| 1029 | - L ${offsetX + deep} ${offsetY + width} L ${offsetX} ${offsetY + width} | |
| 1030 | - `; | |
| 1031 | - return createSvg(d); | |
| 1032 | -}; | |
| 1033 | -// 手提盒部件 | |
| 1034 | -export const createBoxComponentNewFul6 = (width, deep, size, offsetX, offsetY) => { | |
| 1035 | - const d = `M ${offsetX} ${offsetY} L ${offsetX + deep} ${offsetY} L ${offsetX + deep} ${offsetY + width * 0.3} | |
| 1036 | - L ${offsetX + deep + size * 0.5} ${offsetY + width * 0.3} L ${offsetX + deep + size * 0.5} ${offsetY + width * 0.7} | |
| 1037 | - L ${offsetX + deep} ${offsetY + width * 0.7} L ${offsetX + deep} ${offsetY + width} L ${offsetX + deep} ${offsetY} | |
| 1038 | - L ${offsetX + deep + size} ${offsetY} L ${offsetX + deep + size} ${offsetY + width * 0.1} | |
| 1039 | - L ${offsetX + deep + size * 0.8} ${offsetY + width * 0.1} L ${offsetX + deep + size} ${offsetY + width * 0.2} | |
| 1040 | - L ${offsetX + deep + size} ${offsetY + width * 0.8} L ${offsetX + deep + size * 0.8} ${offsetY + width * 0.9} | |
| 1041 | - L ${offsetX + deep + size} ${offsetY + width * 0.9}L ${offsetX + deep + size} ${offsetY + width}L ${offsetX} ${offsetY + width} | |
| 1042 | - `; | |
| 1043 | - return createSvg(d); | |
| 1044 | -}; | |
| 882 | +} | |
| 1045 | 883 | \ No newline at end of file | ... | ... |
src/components/Common/BoxDesignCompontent/compontents/doubleLayer.js deleted
| 1 | -/* eslint-disable */ | |
| 2 | -import React, { useRef, useState, useEffect } from "react"; | |
| 3 | -import styles from "../index.less"; | |
| 4 | -import SvgBox from "../svg"; | |
| 5 | -import { Select, Button, message, Input, Spin } from "antd-v4"; | |
| 6 | -import { CompressOutlined, ExpandOutlined } from "@ant-design/icons"; | |
| 7 | -import * as commonUtils from "@/utils/utils"; | |
| 8 | -import * as commonFunc from "@/components/Common/commonFunc"; | |
| 9 | -import * as commonBusiness from "@/components/Common/commonBusiness"; | |
| 10 | -import * as commonServices from "@/services/services"; | |
| 11 | -import CommonBase from "@/components/Common/CommonBase"; | |
| 12 | -import AntdDraggableModal from "@/components/Common/AntdDraggableModal"; | |
| 13 | -import CommonViewTable from "@/components/Common/CommonViewTable"; | |
| 14 | -import StaticEditTable from "@/components/Common/CommonTable"; | |
| 15 | -import jsPreviewPdf from "@js-preview/pdf"; | |
| 16 | -import commonConfig from "@/utils/config"; | |
| 17 | -const DoubleLayerBox = props => { | |
| 18 | - const { onCancel, onOk, title, loading, masterConfig, bFullScreen, tableData, options = [] } = props; | |
| 19 | - const { slaveData = {}, masterData = {} } = props.state; | |
| 20 | - const [boxList, setBoxList] = useState([]); | |
| 21 | - const [tableColum, setTableColum] = useState([]); // 盒身类型 | |
| 22 | - const [tableDataList, setTableDataList] = useState([]); // 盒长 | |
| 23 | - const [boxBodyList, setBoxBodyList] = useState([]); // 盒身信息 | |
| 24 | - const [isDefaultValue, setIsDefaultValue] = useState(true); // 是否默认值 | |
| 25 | - const [topBoxList, setTopBoxList] = useState([]); // 盒身信息 | |
| 26 | - const [leftBoxList, setLeftBoxList] = useState([]); // 左边 | |
| 27 | - const [rightBoxList, setRightBoxList] = useState([]); | |
| 28 | - // useEffect(() => { | |
| 29 | - // if (tableData && tableData.length) { | |
| 30 | - // const newTableColum = tableData.map(item => { | |
| 31 | - // return { | |
| 32 | - // ...item, | |
| 33 | - // isEditable: true, | |
| 34 | - // isSelect: false, | |
| 35 | - // selectImage: null, | |
| 36 | - // value: "", | |
| 37 | - // }; | |
| 38 | - // }); | |
| 39 | - // const newList = newTableColum.filter( | |
| 40 | - // item => item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽") | |
| 41 | - // ); | |
| 42 | - // const newLists = newTableColum.filter( | |
| 43 | - // item => | |
| 44 | - // !(item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽") || item.showName.includes("盒身")) | |
| 45 | - // ); | |
| 46 | - // const bodyList = newTableColum.filter(item => item.showName.includes("盒身")); | |
| 47 | - // newLists.forEach(x => { | |
| 48 | - // if (x.showName === "盒型类别") { | |
| 49 | - // x.showName = "盒型名称"; | |
| 50 | - // } | |
| 51 | - // }); | |
| 52 | - // setTableColum(newLists); | |
| 53 | - // setBoxBodyList(bodyList); | |
| 54 | - // newList.forEach(item => { | |
| 55 | - // let name = ""; | |
| 56 | - // if (item.showName === "盒长") { | |
| 57 | - // name = item.showName + "(L)"; | |
| 58 | - // } else if (item.showName === "盒宽") { | |
| 59 | - // name = item.showName + "(W)"; | |
| 60 | - // } else if (item.showName === "盒高") { | |
| 61 | - // name = item.showName + "(D)"; | |
| 62 | - // } | |
| 63 | - // item.sName = name; | |
| 64 | - // }); | |
| 65 | - // setTableDataList(newList); | |
| 66 | - // } | |
| 67 | - // }, [tableData]); | |
| 68 | - const titleList = [ | |
| 69 | - "左(上)插位组件", | |
| 70 | - "上插位组件", | |
| 71 | - "右(上)插位组件", | |
| 72 | - "左偏移", | |
| 73 | - "左插位组件", | |
| 74 | - "左(下)插位组件", | |
| 75 | - "右偏移", | |
| 76 | - "右插位组件", | |
| 77 | - "右(下)插位组件", | |
| 78 | - "盒型名称", | |
| 79 | - "盒身", | |
| 80 | - "个数", | |
| 81 | - "首盒长(L)", | |
| 82 | - "首盒宽(W)", | |
| 83 | - "次盒长(L)", | |
| 84 | - "次盒宽(W)", | |
| 85 | - ]; | |
| 86 | - const titleList1 = [ | |
| 87 | - { name: "左(上)插位组件", value: "dZSCW" }, | |
| 88 | - { name: "上插位组件", value: "dSCW" }, | |
| 89 | - { name: "右(上)插位组件", value: "dYSCW" }, | |
| 90 | - { name: "左偏移", value: "dZPY" }, | |
| 91 | - { name: "左插位组件", value: "dZCW" }, | |
| 92 | - { name: "左(下)插位组件", value: "dZXCW" }, | |
| 93 | - { name: "右偏移", value: "dYPY" }, | |
| 94 | - { name: "右插位组件", value: "dYCW" }, | |
| 95 | - { name: "右(下)插位组件", value: "dYXCW" }, | |
| 96 | - ]; | |
| 97 | - // tableColum.forEach(item => { | |
| 98 | - // titleList.push(item.showName); | |
| 99 | - // }); | |
| 100 | - // boxBodyList.forEach(item => { | |
| 101 | - // titleList.push(item.showName); | |
| 102 | - // }); | |
| 103 | - // tableDataList.forEach(item => { | |
| 104 | - // titleList.push(item.showName); | |
| 105 | - // }); | |
| 106 | - const newBoxList = []; | |
| 107 | - // 盒身信息 | |
| 108 | - titleList.forEach((item, index) => { | |
| 109 | - newBoxList.push({ | |
| 110 | - value: "", | |
| 111 | - sName: item, | |
| 112 | - isEditable: true, | |
| 113 | - isSelect: false, | |
| 114 | - selectValue: null, | |
| 115 | - selectLabel: "", | |
| 116 | - selectImage: null, | |
| 117 | - type: null, | |
| 118 | - show: true, | |
| 119 | - showName: item, // 参数名称 | |
| 120 | - sAssignFormula: null, | |
| 121 | - }); | |
| 122 | - }); | |
| 123 | - if (slaveData && slaveData.length) { | |
| 124 | - slaveData.forEach((item, index) => { | |
| 125 | - const i = titleList1.findIndex(i => { | |
| 126 | - return i.value === item.sCode; | |
| 127 | - }); | |
| 128 | - if (i !== -1) { | |
| 129 | - const x = newBoxList.findIndex(z => z.sName === titleList1[i].name); | |
| 130 | - newBoxList[x].value = item.iValue; | |
| 131 | - newBoxList[x].type = item.sTypes; | |
| 132 | - newBoxList[x].showName = item.sName; | |
| 133 | - newBoxList[x].selectImage = item.sMakeUpPath; | |
| 134 | - newBoxList[x].sName = titleList1[i].name; | |
| 135 | - newBoxList[x].sAssignFormula = item.sAssignFormula; | |
| 136 | - newBoxList[x].bVisible = item.bVisible; | |
| 137 | - } | |
| 138 | - }); | |
| 139 | - } | |
| 140 | - // 盒身信息 | |
| 141 | - if (masterData) { | |
| 142 | - newBoxList.forEach((item, index) => { | |
| 143 | - if (item.sName === "盒身") { | |
| 144 | - newBoxList[index].value = masterData.sBoxBody; | |
| 145 | - newBoxList[index].selectImage = masterData.sMakeUpPath; | |
| 146 | - newBoxList[index].type = masterData.sTypes; | |
| 147 | - } else if (item.sName === "盒长") { | |
| 148 | - newBoxList[index].value = masterData.dBoxLength; | |
| 149 | - } else if (item.sName === "盒宽") { | |
| 150 | - newBoxList[index].value = masterData.dBoxWidth; | |
| 151 | - } else if (item.sName === "盒高") { | |
| 152 | - newBoxList[index].value = masterData.dBoxHeight; | |
| 153 | - } else if (item.sName === "盒型名称") { | |
| 154 | - newBoxList[index].value = masterData.sName; | |
| 155 | - } | |
| 156 | - }); | |
| 157 | - } | |
| 158 | - const arraysAreEqual = (arr1, arr2) => { | |
| 159 | - if (arr1.length !== arr2.length) return false; | |
| 160 | - return arr1.every((item, index) => item.sName === arr2[index].sName); | |
| 161 | - }; | |
| 162 | - // 有数据的时候 盒型设计需要赋值 | |
| 163 | - useEffect(() => { | |
| 164 | - if (newBoxList.length > 0 && !arraysAreEqual(boxList, newBoxList)) { | |
| 165 | - setBoxList(newBoxList); | |
| 166 | - } | |
| 167 | - }, [newBoxList]); | |
| 168 | - const getImage = fileName => { | |
| 169 | - // const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&sModelsId=100&token=${props.token}`; | |
| 170 | - const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&scale=0.1&sModelsId=100&token=${props.token}`; | |
| 171 | - return imageUrl; | |
| 172 | - }; | |
| 173 | - // 下来框 | |
| 174 | - const renderOptionWithImage = option => { | |
| 175 | - return ( | |
| 176 | - <Select.Option key={option.sId} value={option.sCode} label={option.sName} image={getImage(option.sMakeUpPath)}> | |
| 177 | - <div style={{ display: "flex", alignItems: "center" }}> | |
| 178 | - {option.sMakeUpPath ? <img src={getImage(option.sMakeUpPath)} style={{ width: 24, height: 24, marginRight: 8 }} /> : ""} | |
| 179 | - <span>{option.sName}</span> | |
| 180 | - </div> | |
| 181 | - </Select.Option> | |
| 182 | - ); | |
| 183 | - }; | |
| 184 | - const svgBoxProps = { | |
| 185 | - ...props, | |
| 186 | - boxList, | |
| 187 | - showNew: 0, | |
| 188 | - }; | |
| 189 | - | |
| 190 | - useEffect(() => { | |
| 191 | - if (!boxList.length) return; | |
| 192 | - const slicedArray = boxList.slice(9, 12); | |
| 193 | - // 处理盒型部分 | |
| 194 | - setBoxBodyList(slicedArray); | |
| 195 | - }, [boxList]); | |
| 196 | - console.log(tableDataList, "boxList"); | |
| 197 | - | |
| 198 | - return ( | |
| 199 | - <div className={styles.boxBody}> | |
| 200 | - <div className={styles.boxTop}> | |
| 201 | - {topBoxList.map((topItem, index) => ( | |
| 202 | - <div key={index} className={styles.boxFlex} style={{ display: topItem.show ? "block" : "none" }}> | |
| 203 | - <div className={styles.boxTitle}>{topItem.sName}</div> | |
| 204 | - {topItem?.selectImage ? ( | |
| 205 | - <img | |
| 206 | - src={topItem?.selectImage} | |
| 207 | - alt={topItem.value} | |
| 208 | - style={{ width: 40, height: 30, marginRight: 8, position: "absolute", left: 20, top: 24, zIndex: 10 }} | |
| 209 | - /> | |
| 210 | - ) : ( | |
| 211 | - "" | |
| 212 | - )} | |
| 213 | - | |
| 214 | - <Select | |
| 215 | - optionLabelProp="label" | |
| 216 | - className="mySelects" | |
| 217 | - style={{ width: 180 }} | |
| 218 | - defaultValue={options.length ? options[0].value : ""} | |
| 219 | - onSelect={(value, option) => handleSelect(value, option, index, 0)} | |
| 220 | - onDropdownVisibleChange={async open => { | |
| 221 | - if (open) { | |
| 222 | - props.getSqlOptions(index + 1); // 在下拉菜单打开时调用 getSqlOptions | |
| 223 | - } | |
| 224 | - }} | |
| 225 | - > | |
| 226 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 227 | - </Select> | |
| 228 | - <div className={styles.boxInput}> | |
| 229 | - {/* <div className={styles.text}>参数:</div> */} | |
| 230 | - <Input | |
| 231 | - value={topItem?.showName} | |
| 232 | - onChange={e => handleChangeName(e, index)} | |
| 233 | - onFocus={e => handleFocus(e, index)} | |
| 234 | - onBlur={e => handleBlur(e, index)} | |
| 235 | - readOnly={!topItem?.isEditable} | |
| 236 | - className={styles.text} | |
| 237 | - /> | |
| 238 | - <Input | |
| 239 | - value={topItem?.value} | |
| 240 | - onChange={e => handleChange(e, index)} | |
| 241 | - onFocus={e => handleFocus(e, index)} | |
| 242 | - onBlur={e => handleBlur(e, index)} | |
| 243 | - readOnly={!topItem?.isEditable} | |
| 244 | - style={{ width: " 80%" }} | |
| 245 | - /> | |
| 246 | - </div> | |
| 247 | - </div> | |
| 248 | - ))} | |
| 249 | - </div> | |
| 250 | - <div className={styles.boxLeft}> | |
| 251 | - {leftBoxList.map((item, index) => ( | |
| 252 | - <div key={index + 3} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}> | |
| 253 | - <div className={styles.boxTitle}>{titleList[index + 3]}</div> | |
| 254 | - | |
| 255 | - <Select | |
| 256 | - optionLabelProp="label" | |
| 257 | - className="mySelects" | |
| 258 | - style={{ width: 180 }} | |
| 259 | - defaultValue={options.length ? options[0].value : ""} | |
| 260 | - onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)} | |
| 261 | - onDropdownVisibleChange={async open => { | |
| 262 | - if (open) { | |
| 263 | - props.getSqlOptions(findIndexBySname(item.sName) + 1); // 在下拉菜单打开时调用 getSqlOptions | |
| 264 | - } | |
| 265 | - }} | |
| 266 | - > | |
| 267 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 268 | - </Select> | |
| 269 | - <div className={styles.boxInput}> | |
| 270 | - {item?.selectImage ? ( | |
| 271 | - <img | |
| 272 | - src={item?.selectImage} | |
| 273 | - alt={item.value} | |
| 274 | - style={{ | |
| 275 | - width: 40, | |
| 276 | - height: 30, | |
| 277 | - marginRight: 8, | |
| 278 | - position: "absolute", | |
| 279 | - left: 20, | |
| 280 | - top: -35, | |
| 281 | - zIndex: 10, | |
| 282 | - }} | |
| 283 | - /> | |
| 284 | - ) : ( | |
| 285 | - "" | |
| 286 | - )} | |
| 287 | - <Input | |
| 288 | - value={item?.showName} | |
| 289 | - onChange={e => handleChangeName(e, findIndexBySname(item.sName))} | |
| 290 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 291 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 292 | - readOnly={!item?.isEditable} | |
| 293 | - className={styles.text} | |
| 294 | - /> | |
| 295 | - <Input | |
| 296 | - value={item?.value} | |
| 297 | - onChange={e => handleChange(e, findIndexBySname(item.sName))} | |
| 298 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 299 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 300 | - readOnly={!item?.isEditable} | |
| 301 | - style={{ width: " 80%" }} | |
| 302 | - /> | |
| 303 | - </div> | |
| 304 | - </div> | |
| 305 | - ))} | |
| 306 | - </div> | |
| 307 | - <div className={styles.boxRight}> | |
| 308 | - {rightBoxList.map((item, index) => ( | |
| 309 | - <div key={findIndexBySname(item.sName)} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}> | |
| 310 | - <div className={styles.boxTitle}>{titleList[findIndexBySname(item.sName)]}</div> | |
| 311 | - | |
| 312 | - <Select | |
| 313 | - optionLabelProp="label" | |
| 314 | - className="mySelects" | |
| 315 | - style={{ width: 180 }} | |
| 316 | - defaultValue={options.length ? options[0].value : ""} | |
| 317 | - onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)} | |
| 318 | - onDropdownVisibleChange={async open => { | |
| 319 | - if (open) { | |
| 320 | - props.getSqlOptions(findIndexBySname(item.sName) + 1); // 在下拉菜单打开时调用 getSqlOptions | |
| 321 | - } | |
| 322 | - }} | |
| 323 | - > | |
| 324 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 325 | - </Select> | |
| 326 | - <div className={styles.boxInput}> | |
| 327 | - {item?.selectImage ? ( | |
| 328 | - <img | |
| 329 | - src={item?.selectImage} | |
| 330 | - alt={item.value} | |
| 331 | - style={{ | |
| 332 | - width: 40, | |
| 333 | - height: 30, | |
| 334 | - marginRight: 8, | |
| 335 | - position: "absolute", | |
| 336 | - left: 20, | |
| 337 | - top: -35, | |
| 338 | - zIndex: 10, | |
| 339 | - }} | |
| 340 | - /> | |
| 341 | - ) : ( | |
| 342 | - "" | |
| 343 | - )} | |
| 344 | - | |
| 345 | - <Input | |
| 346 | - value={item?.showName} | |
| 347 | - onChange={e => handleChangeName(e, findIndexBySname(item.sName))} | |
| 348 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 349 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 350 | - readOnly={!item?.isEditable} | |
| 351 | - className={styles.text} | |
| 352 | - /> | |
| 353 | - <Input | |
| 354 | - value={item?.value} | |
| 355 | - onChange={e => handleChange(e, findIndexBySname(item.sName))} | |
| 356 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 357 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 358 | - readOnly={!item?.isEditable} | |
| 359 | - style={{ width: " 80%" }} | |
| 360 | - /> | |
| 361 | - </div> | |
| 362 | - </div> | |
| 363 | - ))} | |
| 364 | - </div> | |
| 365 | - <div className={styles.boxBottom}> | |
| 366 | - <div className={styles.svgBox}> | |
| 367 | - <SvgBox {...svgBoxProps} /> | |
| 368 | - </div> | |
| 369 | - <div className={styles.content}> | |
| 370 | - <div className={styles.content}> | |
| 371 | - {boxBodyList && boxBodyList.length | |
| 372 | - ? boxBodyList.map((item, index) => { | |
| 373 | - const uniqueIndex = index + 9; | |
| 374 | - return ( | |
| 375 | - <div key={uniqueIndex} className={styles.boxFlex}> | |
| 376 | - <div className={styles.boxInput}> | |
| 377 | - <div className={styles.text} style={{ width: "120px" }}> | |
| 378 | - {item.showName} | |
| 379 | - </div> | |
| 380 | - {boxList[uniqueIndex]?.selectImage ? ( | |
| 381 | - <img | |
| 382 | - src={boxList[uniqueIndex]?.selectImage} | |
| 383 | - alt={boxList[uniqueIndex].value} | |
| 384 | - style={{ width: 40, height: 30, marginRight: 8, position: "absolute", left: 120, top: 6, zIndex: 10 }} | |
| 385 | - /> | |
| 386 | - ) : ( | |
| 387 | - "" | |
| 388 | - )} | |
| 389 | - {isDefaultValue ? <div className={styles.defaultValue}>{boxList[uniqueIndex]?.value}</div> : ""} | |
| 390 | - <Select | |
| 391 | - optionLabelProp="label" | |
| 392 | - className="mySelects" | |
| 393 | - style={{ width: "80%" }} | |
| 394 | - defaultValue={boxList[uniqueIndex]?.value} | |
| 395 | - onSelect={(value, option) => handleSelect(value, option, uniqueIndex, 1)} | |
| 396 | - onDropdownVisibleChange={async open => { | |
| 397 | - if (open) { | |
| 398 | - props.getSqlOptions(10); // 盒身 | |
| 399 | - } | |
| 400 | - }} | |
| 401 | - > | |
| 402 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 403 | - </Select> | |
| 404 | - </div> | |
| 405 | - </div> | |
| 406 | - ); | |
| 407 | - }) | |
| 408 | - : ""} | |
| 409 | - </div> | |
| 410 | - </div> | |
| 411 | - </div> | |
| 412 | - </div> | |
| 413 | - ); | |
| 414 | -}; | |
| 415 | -export default DoubleLayerBox; |
src/components/Common/BoxDesignCompontent/index.js
| 1 | 1 | /* eslint-disable */ |
| 2 | 2 | import React, { useRef, useState, useEffect } from "react"; |
| 3 | -import { Select, Button, message, Input, Spin } from "antd-v4"; | |
| 3 | +import { Select, Button, message, Input, Spin } from "antd"; | |
| 4 | 4 | import { CompressOutlined, ExpandOutlined } from "@ant-design/icons"; |
| 5 | 5 | import * as commonUtils from "@/utils/utils"; |
| 6 | 6 | import * as commonFunc from "@/components/Common/commonFunc"; |
| ... | ... | @@ -11,7 +11,7 @@ import AntdDraggableModal from "@/components/Common/AntdDraggableModal"; |
| 11 | 11 | import CommonViewTable from "@/components/Common/CommonViewTable"; |
| 12 | 12 | import StaticEditTable from "@/components/Common/CommonTable"; |
| 13 | 13 | import jsPreviewPdf from "@js-preview/pdf"; |
| 14 | -import commonConfig from "@/utils/config"; | |
| 14 | +import * as commonConfig from "@/utils/config"; | |
| 15 | 15 | import SvgBox from "./svg"; |
| 16 | 16 | import styles from "./index.less"; |
| 17 | 17 | const BoxDesignEvent = props => { |
| ... | ... | @@ -53,13 +53,16 @@ const BoxDesignEvent = props => { |
| 53 | 53 | setLoading(false); |
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | - useEffect(() => { | |
| 57 | - if (!formData.length) return; | |
| 56 | + useEffect( | |
| 57 | + () => { | |
| 58 | + if (!formData.length) return; | |
| 58 | 59 | |
| 59 | - const data = formData[0].gdsconfigformslave.filter(Item => Item.bVisible); | |
| 60 | - setTableData(data); | |
| 61 | - props.onSaveState(pre => ({ ...pre, data })); | |
| 62 | - }, [formData.length]); | |
| 60 | + const data = formData[0].gdsconfigformslave.filter(Item => Item.bVisible); | |
| 61 | + setTableData(data); | |
| 62 | + props.onSaveState(pre => ({ ...pre, data })); | |
| 63 | + }, | |
| 64 | + [formData.length] | |
| 65 | + ); | |
| 63 | 66 | |
| 64 | 67 | return { |
| 65 | 68 | ...props, |
| ... | ... | @@ -77,83 +80,58 @@ const BoxDesignCompontent = baseProps => { |
| 77 | 80 | const [boxList, setBoxList] = useState([]); |
| 78 | 81 | const [tableColum, setTableColum] = useState([]); // 盒身类型 |
| 79 | 82 | const [tableDataList, setTableDataList] = useState([]); // 盒长 |
| 80 | - const [tableDataLists, setTableDataLists] = useState([]); // 盒长 | |
| 81 | 83 | const [boxBodyList, setBoxBodyList] = useState([]); // 盒身信息 |
| 82 | 84 | const [isDefaultValue, setIsDefaultValue] = useState(true); // 是否默认值 |
| 83 | 85 | const [topBoxList, setTopBoxList] = useState([]); // 盒身信息 |
| 84 | - const [topDoubleBoxList, setTopDoubleBoxList] = useState([]); // 盒身信息 | |
| 85 | 86 | const [leftBoxList, setLeftBoxList] = useState([]); // 左边 |
| 86 | - const [leftDoubleBoxList, setLeftDoubleBoxList] = useState([]); // 左边 | |
| 87 | 87 | const [rightBoxList, setRightBoxList] = useState([]); |
| 88 | - const [rightDoubleBoxList, setRightDoubleBoxList] = useState([]); | |
| 89 | 88 | const [boxKey, setBoxKey] = useState(new Date().getTime()); |
| 90 | - const [doubleLayerList, setDoubleLayerList] = useState([]); | |
| 91 | 89 | if (!boxVisible) return ""; |
| 92 | - // 1️⃣ 只负责 tableColum | |
| 93 | - useEffect(() => { | |
| 94 | - if (!tableData?.length) return; | |
| 95 | - | |
| 96 | - const newTableColum = tableData | |
| 97 | - .filter(item => item.bVisible) // 先过滤可见 | |
| 98 | - .map(item => ({ | |
| 99 | - ...item, | |
| 100 | - isEditable: true, | |
| 101 | - isSelect: false, | |
| 102 | - selectImage: null, | |
| 103 | - value: "", | |
| 104 | - })) | |
| 105 | - .filter( | |
| 106 | - item => | |
| 107 | - !(item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽") || item.showName.includes("盒身")) | |
| 108 | - ) | |
| 109 | - .map(item => (item.showName === "盒型类别" ? { ...item, showName: "盒型名称" } : item)); | |
| 110 | - | |
| 111 | - setTableColum(newTableColum); | |
| 112 | - }, [tableData]); | |
| 113 | - | |
| 114 | - // 2️⃣ 只负责 boxBodyList | |
| 115 | - useEffect(() => { | |
| 116 | - if (!tableData?.length) return; | |
| 117 | - | |
| 118 | - const bodyList = tableData | |
| 119 | - .filter(item => item.bVisible) | |
| 120 | - .map(item => ({ | |
| 121 | - ...item, | |
| 122 | - isEditable: true, | |
| 123 | - isSelect: false, | |
| 124 | - selectImage: null, | |
| 125 | - value: "", | |
| 126 | - })) | |
| 127 | - .filter(item => item.showName.includes("盒身")); | |
| 128 | - | |
| 129 | - setBoxBodyList(bodyList); | |
| 130 | - }, [tableData]); | |
| 131 | - | |
| 132 | - // 3️⃣ 只负责 tableDataList 和 tableDataLists | |
| 133 | - useEffect(() => { | |
| 134 | - if (!tableData?.length) return; | |
| 135 | - | |
| 136 | - const newList = tableData | |
| 137 | - .filter(item => item.bVisible) | |
| 138 | - .map(item => ({ | |
| 139 | - ...item, | |
| 140 | - isEditable: true, | |
| 141 | - isSelect: false, | |
| 142 | - selectImage: null, | |
| 143 | - value: "", | |
| 144 | - })) | |
| 145 | - .filter(item => item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽")) | |
| 146 | - .map(item => { | |
| 147 | - let name = ""; | |
| 148 | - if (item.showName === "盒长") name = "盒长(L)"; | |
| 149 | - if (item.showName === "盒宽") name = "盒宽(W)"; | |
| 150 | - if (item.showName === "盒高") name = "盒高(D)"; | |
| 151 | - return { ...item, sName: name }; | |
| 152 | - }); | |
| 153 | - | |
| 154 | - setTableDataList(newList); | |
| 155 | - setTableDataLists(newList); | |
| 156 | - }, [tableData]); | |
| 90 | + useEffect( | |
| 91 | + () => { | |
| 92 | + if (tableData && tableData.length) { | |
| 93 | + const newTableColum = tableData.map(item => { | |
| 94 | + return { | |
| 95 | + ...item, | |
| 96 | + isEditable: true, | |
| 97 | + isSelect: false, | |
| 98 | + selectImage: null, | |
| 99 | + value: "", | |
| 100 | + }; | |
| 101 | + }); | |
| 102 | + // const last = newTableColum.pop(); | |
| 103 | + // const newList = [last, ...newTableColum]; | |
| 104 | + const newList = newTableColum.filter( | |
| 105 | + item => item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽") | |
| 106 | + ); | |
| 107 | + const newLists = newTableColum.filter( | |
| 108 | + item => | |
| 109 | + !(item.showName.includes("盒长") || item.showName.includes("盒高") || item.showName.includes("盒宽") || item.showName.includes("盒身")) | |
| 110 | + ); | |
| 111 | + const bodyList = newTableColum.filter(item => item.showName.includes("盒身")); | |
| 112 | + newLists.forEach(x => { | |
| 113 | + if (x.showName === "盒型类别") { | |
| 114 | + x.showName = "盒型名称"; | |
| 115 | + } | |
| 116 | + }); | |
| 117 | + setTableColum(newLists); | |
| 118 | + setBoxBodyList(bodyList); | |
| 119 | + newList.forEach(item => { | |
| 120 | + let name = ""; | |
| 121 | + if (item.showName === "盒长") { | |
| 122 | + name = item.showName + "(L)"; | |
| 123 | + } else if (item.showName === "盒宽") { | |
| 124 | + name = item.showName + "(W)"; | |
| 125 | + } else if (item.showName === "盒高") { | |
| 126 | + name = item.showName + "(D)"; | |
| 127 | + } | |
| 128 | + item.sName = name; | |
| 129 | + }); | |
| 130 | + setTableDataList(newList); | |
| 131 | + } | |
| 132 | + }, | |
| 133 | + [tableData] | |
| 134 | + ); | |
| 157 | 135 | const titleList = [ |
| 158 | 136 | "上方盒舌", |
| 159 | 137 | "盒底组件", |
| ... | ... | @@ -176,46 +154,19 @@ const BoxDesignCompontent = baseProps => { |
| 176 | 154 | { name: "右贴边位", value: "dYTBW" }, |
| 177 | 155 | { name: "右(下)插位组件", value: "dYXCW" }, |
| 178 | 156 | ]; |
| 179 | - const doubleTitlieList = [ | |
| 180 | - "左上插位组件", | |
| 181 | - "上插位组件", | |
| 182 | - "右上插位组件", | |
| 183 | - "左偏移", | |
| 184 | - "左插位组件", | |
| 185 | - "左下插位组件", | |
| 186 | - "右偏移", | |
| 187 | - "右插位组件", | |
| 188 | - "右下插位组件", | |
| 189 | - ]; | |
| 190 | - const doubleTitlieList1 = [ | |
| 191 | - { name: "左上插位组件", value: "dZSCW" }, | |
| 192 | - { name: "上插位组件", value: "dSCW" }, | |
| 193 | - { name: "右上插位组件", value: "dYSCW" }, | |
| 194 | - { name: "左偏移", value: "dZPY" }, | |
| 195 | - { name: "左插位组件", value: "dZCW" }, | |
| 196 | - { name: "左下插位组件", value: "dZXCW" }, | |
| 197 | - { name: "右偏移", value: "dYPY" }, | |
| 198 | - { name: "右插位组件", value: "dYCW" }, | |
| 199 | - { name: "右下插位组件", value: "dYXCW" }, | |
| 200 | - { name: "首盒长", value: "dSHC" }, | |
| 201 | - { name: "首盒宽", value: "dSHK" }, | |
| 202 | - { name: "次盒长", value: "dCHC" }, | |
| 203 | - { name: "次盒宽", value: "dCHK" }, | |
| 204 | - ]; | |
| 205 | 157 | const newBoxList = []; |
| 206 | 158 | |
| 207 | 159 | // const boxs = titleList.length + tableData.length; |
| 208 | 160 | tableColum.forEach(item => { |
| 209 | 161 | titleList.push(item.showName); |
| 210 | 162 | }); |
| 163 | + console.log("🚀 ~ tableColum:", tableColum); | |
| 211 | 164 | boxBodyList.forEach(item => { |
| 212 | 165 | titleList.push(item.showName); |
| 213 | 166 | }); |
| 214 | 167 | tableDataList.forEach(item => { |
| 215 | 168 | titleList.push(item.showName); |
| 216 | 169 | }); |
| 217 | - // 这里处理双盒的初始数据 | |
| 218 | - titleList.push(...["首盒长", "首盒宽", "次盒长", "次盒宽"], ...doubleTitlieList); | |
| 219 | 170 | // 盒身信息 |
| 220 | 171 | titleList.forEach((item, index) => { |
| 221 | 172 | newBoxList.push({ |
| ... | ... | @@ -229,54 +180,29 @@ const BoxDesignCompontent = baseProps => { |
| 229 | 180 | type: null, |
| 230 | 181 | show: true, |
| 231 | 182 | showName: item, // 参数名称 |
| 232 | - sAssignFormula: null, | |
| 183 | + sAssignFormula:null | |
| 233 | 184 | }); |
| 234 | 185 | }); |
| 235 | 186 | // 部件信息 |
| 236 | - | |
| 237 | - const boxTypes = masterData.sTypes; | |
| 238 | 187 | if (slaveData && slaveData.length) { |
| 239 | - if (boxTypes !== "8") { | |
| 240 | - slaveData.forEach((item, index) => { | |
| 241 | - const i = titleList1.findIndex(i => { | |
| 242 | - return i.value === item.sCode; | |
| 243 | - }); | |
| 244 | - if (i !== -1) { | |
| 245 | - const x = newBoxList.findIndex(z => z.sName === titleList1[i].name); | |
| 246 | - newBoxList[x].value = item.iValue; | |
| 247 | - newBoxList[x].type = item.sTypes; | |
| 248 | - newBoxList[x].showName = item.sName; | |
| 249 | - newBoxList[x].selectImage = item.sMakeUpPath; | |
| 250 | - newBoxList[x].sName = titleList1[i].name; | |
| 251 | - newBoxList[x].sAssignFormula = item.sAssignFormula; | |
| 252 | - newBoxList[x].bVisible = item.bVisible; | |
| 253 | - } | |
| 254 | - }); | |
| 255 | - } else { | |
| 256 | - slaveData.forEach((item, index) => { | |
| 257 | - const i = doubleTitlieList1.findIndex(i => { | |
| 258 | - return i.value === item.sCode; | |
| 259 | - }); | |
| 260 | - if (i !== -1) { | |
| 261 | - const x = newBoxList.findIndex(z => z.sName === doubleTitlieList1[i].name); | |
| 262 | - newBoxList[x].value = item.iValue; | |
| 263 | - newBoxList[x].type = item.sTypes; | |
| 264 | - newBoxList[x].showName = item.sName; | |
| 265 | - newBoxList[x].selectImage = item.sMakeUpPath; | |
| 266 | - newBoxList[x].sName = doubleTitlieList1[i].name; | |
| 267 | - newBoxList[x].sAssignFormula = item.sAssignFormula; | |
| 268 | - newBoxList[x].bVisible = item.bVisible; | |
| 269 | - } | |
| 188 | + slaveData.forEach((item, index) => { | |
| 189 | + const i = titleList1.findIndex(i => { | |
| 190 | + return i.value === item.sCode; | |
| 270 | 191 | }); |
| 271 | - // 双盒盒型单独处理 | |
| 272 | - } | |
| 192 | + if (i !== -1) { | |
| 193 | + const x = newBoxList.findIndex(z => z.sName === titleList1[i].name); | |
| 194 | + newBoxList[x].value = item.iValue; | |
| 195 | + newBoxList[x].type = item.sTypes; | |
| 196 | + newBoxList[x].showName = item.sName; | |
| 197 | + newBoxList[x].selectImage = item.sMakeUpPath; | |
| 198 | + newBoxList[x].sName = titleList1[i].name; | |
| 199 | + newBoxList[x].sAssignFormula = item.sAssignFormula | |
| 200 | + newBoxList[x].bVisible = item.bVisible | |
| 201 | + } | |
| 202 | + }); | |
| 273 | 203 | } |
| 274 | 204 | // 盒身信息 |
| 275 | 205 | if (masterData) { |
| 276 | - const headLength = slaveData.find(item => item.sCode === "dSHC")?.iValue | |
| 277 | - const headWidth = slaveData.find(item => item.sCode === "dSHK")?.iValue | |
| 278 | - const orderLength = slaveData.find(item => item.sCode === "dCHC")?.iValue | |
| 279 | - const orderWidth = slaveData.find(item => item.sCode === "dCHK")?.iValue | |
| 280 | 206 | newBoxList.forEach((item, index) => { |
| 281 | 207 | if (item.sName === "盒身") { |
| 282 | 208 | newBoxList[index].value = masterData.sBoxBody; |
| ... | ... | @@ -290,121 +216,69 @@ const BoxDesignCompontent = baseProps => { |
| 290 | 216 | newBoxList[index].value = masterData.dBoxHeight; |
| 291 | 217 | } else if (item.sName === "盒型名称") { |
| 292 | 218 | newBoxList[index].value = masterData.sName; |
| 293 | - } else if (item.sName === "首盒长") { | |
| 294 | - newBoxList[index].value = headLength; | |
| 295 | - } else if (item.sName === "首盒宽") { | |
| 296 | - newBoxList[index].value = headWidth; | |
| 297 | - } else if (item.sName === "次盒长") { | |
| 298 | - newBoxList[index].value = orderLength; | |
| 299 | - } else if (item.sName === "次盒宽") { | |
| 300 | - newBoxList[index].value = orderWidth; | |
| 301 | - } | |
| 219 | + } | |
| 302 | 220 | }); |
| 303 | 221 | } |
| 304 | 222 | // 有数据的时候 盒型设计需要赋值 |
| 305 | - useEffect(() => { | |
| 306 | - if (newBoxList.length > 0 && !arraysAreEqual(boxList, newBoxList)) { | |
| 307 | - setBoxList(newBoxList); | |
| 308 | - } | |
| 309 | - }, [newBoxList]); | |
| 223 | + useEffect( | |
| 224 | + () => { | |
| 225 | + if (newBoxList.length > 0 && !arraysAreEqual(boxList, newBoxList)) { | |
| 226 | + setBoxList(newBoxList); | |
| 227 | + } | |
| 228 | + }, | |
| 229 | + [newBoxList] | |
| 230 | + ); | |
| 310 | 231 | |
| 311 | 232 | const arraysAreEqual = (arr1, arr2) => { |
| 312 | 233 | if (arr1.length !== arr2.length) return false; |
| 313 | 234 | return arr1.every((item, index) => item.sName === arr2[index].sName); |
| 314 | 235 | }; |
| 315 | - useEffect(() => { | |
| 316 | - const type = boxList.find(item => item.sName === "盒身")?.type; | |
| 317 | - const updateLists = () => { | |
| 318 | - const topBoxFilter = item => item.sName === "上方盒舌" || item.sName === "盒底组件" || item.sName === "下方盒舌"; | |
| 319 | - | |
| 320 | - const leftBoxFilter = item => item.sName === "左(上)插位组件" || item.sName === "左贴边位" || item.sName === "左(下)插位组件"; | |
| 321 | - | |
| 322 | - const rightBoxFilter = item => item.sName === "右(上)插位组件" || item.sName === "右贴边位" || item.sName === "右(下)插位组件"; | |
| 323 | - | |
| 324 | - if (type === "2" || type === 2 || type === "4" || type === 4 || type === 3 || type === "3" || type === 5 || type === "5") { | |
| 325 | - const box = [...boxList]; | |
| 326 | - box.forEach(x => { | |
| 327 | - x.show = true; | |
| 328 | - }); | |
| 329 | - if (type === "2" || type === 2) { | |
| 330 | - box.forEach(x => x.sName === "盒底组件" && (x.show = false)); | |
| 331 | - } else if (type === "4" || type === 4) { | |
| 332 | - const title = ["盒底组件", "左贴边位", "右贴边位"]; | |
| 333 | - box.forEach(x => title.includes(x.sName) && (x.show = false)); | |
| 334 | - } else if (type === "3" || type === 3) { | |
| 335 | - const title = ["左(上)插位组件", "右(下)插位组件", "盒底组件"]; | |
| 336 | - box.forEach(x => title.includes(x.sName) && (x.show = false)); | |
| 337 | - } else if (type === "5" || type === 5) { | |
| 338 | - const title = ["盒底组件"]; | |
| 339 | - box.forEach(x => title.includes(x.sName) && (x.show = false)); | |
| 340 | - } | |
| 341 | - setTopBoxList(box.filter(topBoxFilter)); | |
| 342 | - setLeftBoxList(box.filter(leftBoxFilter)); | |
| 343 | - if (type === 3 || type === "3") { | |
| 344 | - setRightBoxList(box.filter(rightBoxFilter).reverse()); | |
| 236 | + useEffect( | |
| 237 | + () => { | |
| 238 | + const type = boxList.find(item => item.sName === "盒身")?.type; | |
| 239 | + const updateLists = () => { | |
| 240 | + const topBoxFilter = item => item.sName === "上方盒舌" || item.sName === "盒底组件" || item.sName === "下方盒舌"; | |
| 241 | + | |
| 242 | + const leftBoxFilter = item => item.sName === "左(上)插位组件" || item.sName === "左贴边位" || item.sName === "左(下)插位组件"; | |
| 243 | + | |
| 244 | + const rightBoxFilter = item => item.sName === "右(上)插位组件" || item.sName === "右贴边位" || item.sName === "右(下)插位组件"; | |
| 245 | + | |
| 246 | + if (type === "2" || type === 2 || type === "4" || type === 4 || type === 3 || type === "3") { | |
| 247 | + const box = [...boxList]; | |
| 248 | + box.forEach(x => { | |
| 249 | + x.show = true; | |
| 250 | + }); | |
| 251 | + if (type === "2" || type === 2) { | |
| 252 | + box.forEach(x => x.sName === "盒底组件" && (x.show = false)); | |
| 253 | + } else if (type === "4" || type === 4) { | |
| 254 | + const title = ["盒底组件", "左贴边位", "右贴边位"]; | |
| 255 | + box.forEach(x => title.includes(x.sName) && (x.show = false)); | |
| 256 | + } else if (type === "3" || type === 3) { | |
| 257 | + const title = ["左(上)插位组件", "右(下)插位组件", "盒底组件"]; | |
| 258 | + box.forEach(x => title.includes(x.sName) && (x.show = false)); | |
| 259 | + } | |
| 260 | + setTopBoxList(box.filter(topBoxFilter)); | |
| 261 | + setLeftBoxList(box.filter(leftBoxFilter)); | |
| 262 | + if (type === 3 || type === "3") { | |
| 263 | + setRightBoxList(box.filter(rightBoxFilter).reverse()); | |
| 264 | + } else { | |
| 265 | + setRightBoxList(box.filter(rightBoxFilter)); | |
| 266 | + } | |
| 345 | 267 | } else { |
| 268 | + const box = [...boxList]; | |
| 269 | + box.forEach(x => { | |
| 270 | + x.show = true; | |
| 271 | + }); | |
| 272 | + setTopBoxList(box.filter(topBoxFilter)); | |
| 273 | + setLeftBoxList(box.filter(leftBoxFilter)); | |
| 346 | 274 | setRightBoxList(box.filter(rightBoxFilter)); |
| 347 | 275 | } |
| 348 | - } else if (type === "7" || type === 7) { | |
| 349 | - const box = [...boxList]; | |
| 350 | - box.forEach(x => { | |
| 351 | - x.show = true; | |
| 352 | - }); | |
| 353 | - const title = ["盒底组件", "左贴边位", "右贴边位", "上方盒舌", "下方盒舌"]; | |
| 354 | - box.forEach(x => title.includes(x.sName) && (x.show = false)); | |
| 355 | - setTopBoxList(box.filter(topBoxFilter)); | |
| 356 | - setLeftBoxList(box.filter(leftBoxFilter)); | |
| 357 | - setRightBoxList(box.filter(rightBoxFilter)); | |
| 358 | - } else if (type === "8" || type === 8) { | |
| 359 | - const box = [...boxList]; | |
| 360 | - box.forEach(x => { | |
| 361 | - x.show = true; | |
| 362 | - }); | |
| 363 | - const topBoxFilter = item => item.sName === "左上插位组件" || item.sName === "上插位组件" || item.sName === "右上插位组件"; | |
| 364 | - const leftBoxFilter = item => item.sName === "左偏移" || item.sName === "左插位组件" || item.sName === "左下插位组件"; | |
| 365 | - const rightBoxFilter = item => item.sName === "右偏移" || item.sName === "右插位组件" || item.sName === "右下插位组件"; | |
| 366 | - setTopDoubleBoxList(box.filter(topBoxFilter)); | |
| 367 | - setLeftDoubleBoxList(box.filter(leftBoxFilter)); | |
| 368 | - setRightDoubleBoxList(box.filter(rightBoxFilter)); | |
| 369 | - } else { | |
| 370 | - const box = [...boxList]; | |
| 371 | - box.forEach(x => { | |
| 372 | - x.show = true; | |
| 373 | - }); | |
| 374 | - setTopBoxList(box.filter(topBoxFilter)); | |
| 375 | - setLeftBoxList(box.filter(leftBoxFilter)); | |
| 376 | - setRightBoxList(box.filter(rightBoxFilter)); | |
| 377 | - } | |
| 378 | - }; | |
| 276 | + }; | |
| 379 | 277 | |
| 380 | - updateLists(); | |
| 381 | - }, [boxList]); | |
| 382 | - const boxType = boxList.find(item => item.sName === "盒身")?.type; | |
| 383 | - // 监听盒身类型 | |
| 384 | - useEffect(() => { | |
| 385 | - if (!boxType) return; | |
| 386 | - if (boxType === "8") { | |
| 387 | - const createBox = names => | |
| 388 | - names.map(sName => ({ | |
| 389 | - value: "", | |
| 390 | - sName, | |
| 391 | - isEditable: true, | |
| 392 | - isSelect: false, | |
| 393 | - selectValue: null, | |
| 394 | - selectLabel: "", | |
| 395 | - selectImage: null, | |
| 396 | - type: null, | |
| 397 | - show: true, | |
| 398 | - showName: sName, | |
| 399 | - sAssignFormula: null, | |
| 400 | - })); | |
| 401 | - setDoubleLayerList(createBox(["首盒长", "首盒宽", "次盒长", "次盒宽"])); | |
| 402 | - // setTopDoubleBoxList(createBox(["左上插位组件", "上插位组件", "右上插位组件"])); | |
| 403 | - // setLeftDoubleBoxList(createBox(["左偏移", "左插位组件", "左下插位组件"])); | |
| 404 | - // setRightDoubleBoxList(createBox(["右偏移", "右插位组件", "右下插位组件"])); | |
| 405 | - } else { | |
| 406 | - } | |
| 407 | - }, [boxType]); | |
| 278 | + updateLists(); | |
| 279 | + }, | |
| 280 | + [boxList] | |
| 281 | + ); | |
| 408 | 282 | |
| 409 | 283 | const handleFocus = (e, index) => { |
| 410 | 284 | if (boxList && boxList.length) { |
| ... | ... | @@ -461,17 +335,15 @@ const BoxDesignCompontent = baseProps => { |
| 461 | 335 | setBoxList(updatedBoxList); |
| 462 | 336 | }; |
| 463 | 337 | const getImage = fileName => { |
| 464 | - // const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&sModelsId=100&token=${props.token}`; | |
| 465 | - const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&scale=0.1&sModelsId=100&token=${props.token}`; | |
| 338 | + const imageUrl = `${commonConfig.file_host}file/download?savePathStr=${fileName}&sModelsId=100&token=${props.token}`; | |
| 466 | 339 | return imageUrl; |
| 467 | 340 | }; |
| 468 | - | |
| 469 | 341 | // 下来框 |
| 470 | 342 | const renderOptionWithImage = option => { |
| 471 | 343 | return ( |
| 472 | 344 | <Select.Option key={option.sId} value={option.sCode} label={option.sName} image={getImage(option.sMakeUpPath)}> |
| 473 | 345 | <div style={{ display: "flex", alignItems: "center" }}> |
| 474 | - {option.sMakeUpPath ? <img src={getImage(option.sMakeUpPath)} style={{ width: 24, height: 24, marginRight: 8 }} /> : ""} | |
| 346 | + {option.sMakeUpPath ? <img src={getImage(option.sMakeUpPath)} alt={option.sName} style={{ width: 24, height: 24, marginRight: 8 }} /> : ""} | |
| 475 | 347 | <span>{option.sName}</span> |
| 476 | 348 | </div> |
| 477 | 349 | </Select.Option> |
| ... | ... | @@ -480,11 +352,6 @@ const BoxDesignCompontent = baseProps => { |
| 480 | 352 | const svgBoxProps = { |
| 481 | 353 | ...props, |
| 482 | 354 | boxList, |
| 483 | - showNew: 0, | |
| 484 | - }; | |
| 485 | - const dobuleProps = { | |
| 486 | - ...props, | |
| 487 | - renderOptionWithImage, | |
| 488 | 355 | }; |
| 489 | 356 | // 计算展长展宽 |
| 490 | 357 | // 创建盒型 |
| ... | ... | @@ -493,26 +360,24 @@ const BoxDesignCompontent = baseProps => { |
| 493 | 360 | // 判断是新增还是修改 |
| 494 | 361 | |
| 495 | 362 | // 存储子表数据 |
| 496 | - const boxTypes = boxList.find(item => item.sName === "盒身")?.type; | |
| 497 | - const findList = boxTypes === "8" ? doubleTitlieList1 : titleList1; | |
| 498 | 363 | boxList.forEach((item, index) => { |
| 499 | - const i = findList.findIndex(i => i.name === item.sName); | |
| 500 | - const slave = slaveData.find(z => z.sCode === findList[i]?.value); | |
| 364 | + const i = titleList1.findIndex(i => i.name === item.sName); | |
| 365 | + const slave = slaveData.find(z => z.sCode === titleList1[i]?.value); | |
| 501 | 366 | if (i !== -1) { |
| 502 | 367 | const data = { |
| 503 | 368 | ...slaveData[0], |
| 504 | 369 | handleType: slave ? "update" : "add", |
| 505 | 370 | sName: item.showName, |
| 506 | - sCode: findList[i].value, | |
| 371 | + sCode: titleList1[i].value, | |
| 507 | 372 | iValue: item.value, |
| 508 | 373 | iOrder: index + 1, |
| 509 | 374 | iRowNum: index + 1, |
| 510 | 375 | sId: slave ? slave.sId : commonUtils.createSid(), |
| 511 | 376 | sMakeUpPath: item.selectImage, |
| 512 | 377 | sTypes: item.type, |
| 513 | - bVisible: item.value ? true : false, | |
| 378 | + bVisible: (item.value ? true : false), | |
| 514 | 379 | sParentId: masterData.sId, |
| 515 | - sAssignFormula: item.sAssignFormula, | |
| 380 | + sAssignFormula:item.sAssignFormula | |
| 516 | 381 | }; |
| 517 | 382 | // if (item.value !== "") { |
| 518 | 383 | newSlaveData.push(data); |
| ... | ... | @@ -527,337 +392,6 @@ const BoxDesignCompontent = baseProps => { |
| 527 | 392 | } |
| 528 | 393 | }); |
| 529 | 394 | submitSlaveData.concat(newSlaveData); |
| 530 | - | |
| 531 | - // 处理计算公式 | |
| 532 | - // 计算展长公式 sLengthFormula | |
| 533 | - let sLengthFormula = ""; | |
| 534 | - let sWidthFormula = ""; | |
| 535 | - const boxType = boxList.find(item => item.sName === "盒身")?.type; | |
| 536 | - if (boxType === "8") { | |
| 537 | - | |
| 538 | - } else { | |
| 539 | - const boxLength = Number(boxList.find(item => item.sName === "盒长")?.value); | |
| 540 | - const boxWidth = Number(boxList.find(item => item.sName === "盒宽")?.value); | |
| 541 | - const boxHeight = Number(boxList.find(item => item.sName === "盒高")?.value); | |
| 542 | - const zxcw = boxList.find(x => x.sName === "左(下)插位组件"); | |
| 543 | - const zscw = boxList.find(x => x.sName === "左(上)插位组件"); | |
| 544 | - const yscw = boxList.find(x => x.sName === "右(上)插位组件"); | |
| 545 | - const yxcw = boxList.find(x => x.sName === "右(下)插位组件"); | |
| 546 | - const hdzj = boxList.find(x => x.sName === "盒底组件"); | |
| 547 | - const zxcwType = zxcw?.type; | |
| 548 | - const zxcwValue = zxcw?.value; | |
| 549 | - const zscwType = zscw?.type; | |
| 550 | - const zscwValue = zscw?.value; | |
| 551 | - const yscwType = yscw?.type; | |
| 552 | - const yscwValue = yscw?.value; | |
| 553 | - const yxcwType = yxcw?.type; | |
| 554 | - const yxcwValue = yxcw?.value; | |
| 555 | - let leftTopValue = 0; | |
| 556 | - let leftTop = ""; | |
| 557 | - let rightTopValue = 0; | |
| 558 | - let rightTop = ""; | |
| 559 | - let leftBottomValue = 0; | |
| 560 | - let leftBottom = ""; | |
| 561 | - let rightBottomValue = 0; | |
| 562 | - let rightBottom = ""; | |
| 563 | - if (boxType && boxType === "1") { | |
| 564 | - // 四面盒 | |
| 565 | - const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value; | |
| 566 | - const ytbw = boxList.find(x => x.sName === "右贴边位")?.type && boxList.find(x => x.sName === "右贴边位")?.value; | |
| 567 | - sLengthFormula = (ztbw ? "dZTBW+ " : "") + "L * 2 + W * 2" + (ytbw ? " +dYTBW" : ""); | |
| 568 | - | |
| 569 | - if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") { | |
| 570 | - leftBottomValue = Number(zxcwValue) + boxHeight; | |
| 571 | - leftBottom = " + dZXCW + W"; | |
| 572 | - } else if (zxcwType === "4002" || zxcwType === "4003") { | |
| 573 | - leftBottomValue = Number(zxcwValue); | |
| 574 | - leftBottom = " + dZXCW"; | |
| 575 | - } else if (zxcwType === "4004") { | |
| 576 | - leftBottomValue = Number(zxcwValue) + boxHeight * 2; | |
| 577 | - leftBottom = " + dZXCW + W * 2"; | |
| 578 | - } else if (zxcwType === "4005") { | |
| 579 | - leftBottomValue = boxHeight * 2; | |
| 580 | - leftBottom = "+ W * 2"; | |
| 581 | - } | |
| 582 | - if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") { | |
| 583 | - rightTopValue = Number(yscwValue) + boxHeight; | |
| 584 | - rightTop = "dYSCW + W + "; | |
| 585 | - } else if (yscwType === "6002" || yscwType === "6003") { | |
| 586 | - rightTopValue = Number(yscwValue); | |
| 587 | - rightTop = "dYSCW + "; | |
| 588 | - } else if (yscwType === "6004") { | |
| 589 | - rightTopValue = Number(yscwValue) + boxHeight * 2; | |
| 590 | - rightTop = "dYSCW + W * 2+ "; | |
| 591 | - } else if (yscwType === "6005") { | |
| 592 | - rightTopValue = boxHeight * 2; | |
| 593 | - rightTop = "W * 2+ "; | |
| 594 | - } | |
| 595 | - if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") { | |
| 596 | - leftTopValue = Number(zscwValue) + boxHeight; | |
| 597 | - leftTop = "dZSCW + W +"; | |
| 598 | - } else if (zscwType === "3002" || zscwType === "3003") { | |
| 599 | - leftTopValue = Number(zscwValue); | |
| 600 | - leftTop = "dZSCW +"; | |
| 601 | - } else if (zscwType === "3004") { | |
| 602 | - leftTopValue = Number(zscwValue) + boxHeight * 2; | |
| 603 | - leftTop = "dZSCW + W * 2 +"; | |
| 604 | - } else if (zscwType === "3005") { | |
| 605 | - leftTopValue = boxHeight * 2; | |
| 606 | - leftTop = "W * 2 +"; | |
| 607 | - } | |
| 608 | - if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") { | |
| 609 | - rightBottomValue = Number(yxcwValue) + boxHeight; | |
| 610 | - rightBottom = "+ dYXCW + W"; | |
| 611 | - } else if (yxcwType === "7002" || yxcwType === "7003") { | |
| 612 | - rightBottomValue = Number(yxcwValue); | |
| 613 | - rightBottom = "+ dYXCW "; | |
| 614 | - } else if (yxcwType === "7004") { | |
| 615 | - rightBottomValue = Number(yxcwValue) + boxHeight * 2; | |
| 616 | - rightBottom = "+ dYXCW + W * 2"; | |
| 617 | - } else if (yxcwType === "7005") { | |
| 618 | - rightBottomValue = boxHeight * 2; | |
| 619 | - rightBottom = "+ W * 2"; | |
| 620 | - } | |
| 621 | - sWidthFormula = | |
| 622 | - (leftTopValue > rightTopValue ? leftTop : rightTop) + | |
| 623 | - "D" + | |
| 624 | - (hdzj ? " + dHDC" : leftBottomValue > rightBottomValue ? leftBottom : rightBottom); | |
| 625 | - } else if (boxType && boxType === "2") { | |
| 626 | - // 单折 | |
| 627 | - const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value; | |
| 628 | - const ytbw = boxList.find(x => x.sName === "右贴边位")?.type && boxList.find(x => x.sName === "右贴边位")?.value; | |
| 629 | - sLengthFormula = (ztbw ? "dZTBW+ " : "") + "L * 2 + W" + (ytbw ? " +dYTBW" : ""); | |
| 630 | - if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") { | |
| 631 | - leftBottomValue = Number(zxcwValue) + boxHeight; | |
| 632 | - leftBottom = " + dZXCW + W"; | |
| 633 | - } else if (zxcwType === "4002" || zxcwType === "4003") { | |
| 634 | - leftBottomValue = Number(zxcwValue); | |
| 635 | - leftBottom = " + dZXCW"; | |
| 636 | - } else if (zxcwType === "4004") { | |
| 637 | - leftBottomValue = Number(zxcwValue) + boxHeight * 2; | |
| 638 | - leftBottom = " + dZXCW + W * 2"; | |
| 639 | - } else if (zxcwType === "4005") { | |
| 640 | - leftBottomValue = boxHeight * 2; | |
| 641 | - leftBottom = "+ W * 2"; | |
| 642 | - } | |
| 643 | - if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") { | |
| 644 | - rightTopValue = Number(yscwValue) + boxHeight; | |
| 645 | - rightTop = "dYSCW + W + "; | |
| 646 | - } else if (yscwType === "6002" || yscwType === "6003") { | |
| 647 | - rightTopValue = Number(yscwValue); | |
| 648 | - rightTop = "dYSCW + "; | |
| 649 | - } else if (yscwType === "6004") { | |
| 650 | - rightTopValue = Number(yscwValue) + boxHeight * 2; | |
| 651 | - rightTop = "dYSCW + W * 2+ "; | |
| 652 | - } else if (yscwType === "6005") { | |
| 653 | - rightTopValue = boxHeight * 2; | |
| 654 | - rightTop = "W * 2+ "; | |
| 655 | - } | |
| 656 | - if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") { | |
| 657 | - leftTopValue = Number(zscwValue) + boxHeight; | |
| 658 | - leftTop = "dZSCW + W +"; | |
| 659 | - } else if (zscwType === "3002" || zscwType === "3003") { | |
| 660 | - leftTopValue = Number(zscwValue); | |
| 661 | - leftTop = "dZSCW +"; | |
| 662 | - } else if (zscwType === "3004") { | |
| 663 | - leftTopValue = Number(zscwValue) + boxHeight * 2; | |
| 664 | - leftTop = "dZSCW + W * 2 +"; | |
| 665 | - } else if (zscwType === "3005") { | |
| 666 | - leftTopValue = boxHeight * 2; | |
| 667 | - leftTop = "W * 2 +"; | |
| 668 | - } | |
| 669 | - if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") { | |
| 670 | - rightBottomValue = Number(yxcwValue) + boxHeight; | |
| 671 | - rightBottom = "+ dYXCW + W"; | |
| 672 | - } else if (yxcwType === "7002" || yxcwType === "7003") { | |
| 673 | - rightBottomValue = Number(yxcwValue); | |
| 674 | - rightBottom = "+ dYXCW "; | |
| 675 | - } else if (yxcwType === "7004") { | |
| 676 | - rightBottomValue = Number(yxcwValue) + boxHeight * 2; | |
| 677 | - rightBottom = "+ dYXCW + W * 2"; | |
| 678 | - } else if (yxcwType === "7005") { | |
| 679 | - rightBottomValue = boxHeight * 2; | |
| 680 | - rightBottom = "+ W * 2"; | |
| 681 | - } | |
| 682 | - sWidthFormula = (leftTopValue > rightTopValue ? leftTop : rightTop) + "D" + (leftBottomValue > rightBottomValue ? leftBottom : rightBottom); | |
| 683 | - } else if (boxType && boxType === "3") { | |
| 684 | - const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value; | |
| 685 | - const ytbw = boxList.find(x => x.sName === "右贴边位")?.type && boxList.find(x => x.sName === "右贴边位")?.value; | |
| 686 | - sLengthFormula = (ztbw ? "dZTBW+ " : "") + "L + W * 2" + (ytbw ? " +dYTBW" : ""); | |
| 687 | - if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") { | |
| 688 | - leftBottomValue = Number(zxcwValue) + boxHeight; | |
| 689 | - leftBottom = " + dZXCW + W"; | |
| 690 | - } else if (zxcwType === "4002" || zxcwType === "4003") { | |
| 691 | - leftBottomValue = Number(zxcwValue); | |
| 692 | - leftBottom = " + dZXCW"; | |
| 693 | - } else if (zxcwType === "4004") { | |
| 694 | - leftBottomValue = Number(zxcwValue) + boxHeight * 2; | |
| 695 | - leftBottom = " + dZXCW + W * 2"; | |
| 696 | - } else if (zxcwType === "4005") { | |
| 697 | - leftBottomValue = boxHeight * 2; | |
| 698 | - leftBottom = "+ W * 2"; | |
| 699 | - } | |
| 700 | - if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") { | |
| 701 | - rightTopValue = Number(yscwValue) + boxHeight; | |
| 702 | - rightTop = "dYSCW + W + "; | |
| 703 | - } else if (yscwType === "6002" || yscwType === "6003") { | |
| 704 | - rightTopValue = Number(yscwValue); | |
| 705 | - rightTop = "dYSCW + "; | |
| 706 | - } else if (yscwType === "6004") { | |
| 707 | - rightTopValue = Number(yscwValue) + boxHeight * 2; | |
| 708 | - rightTop = "dYSCW + W * 2+ "; | |
| 709 | - } else if (yscwType === "6005") { | |
| 710 | - rightTopValue = boxHeight * 2; | |
| 711 | - rightTop = "W * 2+ "; | |
| 712 | - } | |
| 713 | - if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") { | |
| 714 | - leftTopValue = Number(zscwValue) + boxHeight; | |
| 715 | - leftTop = "dZSCW + W +"; | |
| 716 | - } else if (zscwType === "3002" || zscwType === "3003") { | |
| 717 | - leftTopValue = Number(zscwValue); | |
| 718 | - leftTop = "dZSCW +"; | |
| 719 | - } else if (zscwType === "3004") { | |
| 720 | - leftTopValue = Number(zscwValue) + boxHeight * 2; | |
| 721 | - leftTop = "dZSCW + W * 2 +"; | |
| 722 | - } else if (zscwType === "3005") { | |
| 723 | - leftTopValue = boxHeight * 2; | |
| 724 | - leftTop = "W * 2 +"; | |
| 725 | - } | |
| 726 | - if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") { | |
| 727 | - rightBottomValue = Number(yxcwValue) + boxHeight; | |
| 728 | - rightBottom = "+ dYXCW + W"; | |
| 729 | - } else if (yxcwType === "7002" || yxcwType === "7003") { | |
| 730 | - rightBottomValue = Number(yxcwValue); | |
| 731 | - rightBottom = "+ dYXCW "; | |
| 732 | - } else if (yxcwType === "7004") { | |
| 733 | - rightBottomValue = Number(yxcwValue) + boxHeight * 2; | |
| 734 | - rightBottom = "+ dYXCW + W * 2"; | |
| 735 | - } else if (yxcwType === "7005") { | |
| 736 | - rightBottomValue = boxHeight * 2; | |
| 737 | - rightBottom = "+ W * 2"; | |
| 738 | - } | |
| 739 | - sWidthFormula = (leftTopValue > rightTopValue ? leftTop : rightTop) + "D" + (leftBottomValue > rightBottomValue ? leftBottom : rightBottom); | |
| 740 | - } else if (boxType && boxType === "4") { | |
| 741 | - // 天地盒 | |
| 742 | - const zxcw = boxList.find(x => x.sName === "左(下)插位组件"); | |
| 743 | - const zscw = boxList.find(x => x.sName === "左(上)插位组件"); | |
| 744 | - const yscw = boxList.find(x => x.sName === "右(上)插位组件"); | |
| 745 | - const yxcw = boxList.find(x => x.sName === "右(下)插位组件"); | |
| 746 | - const zxcwType = zxcw?.type; | |
| 747 | - const zxcwValue = zxcw?.value; | |
| 748 | - const zscwType = zscw?.type; | |
| 749 | - const zscwValue = zscw?.value; | |
| 750 | - const yscwType = yscw?.type; | |
| 751 | - const yscwValue = yscw?.value; | |
| 752 | - const yxcwType = yxcw?.type; | |
| 753 | - const yxcwValue = yxcw?.value; | |
| 754 | - let leftValue = ""; | |
| 755 | - let rightValue = ""; | |
| 756 | - let topValue = ""; | |
| 757 | - let bottomValue = ""; | |
| 758 | - if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") { | |
| 759 | - // leftValue = leftValue + Number(zxcwValue) + boxHeight * 2; | |
| 760 | - leftValue = "dZXCW + D * 2 +"; | |
| 761 | - } else if (zxcwType === "4002" || zxcwType === "4003") { | |
| 762 | - leftValue = "dZXCW + D +"; | |
| 763 | - } else if (zxcwType === "4004") { | |
| 764 | - leftValue = "dZXCW + D * 3 +"; | |
| 765 | - } else if (zxcwType === "4005") { | |
| 766 | - leftValue = "D * 3 +"; | |
| 767 | - } | |
| 768 | - if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") { | |
| 769 | - rightValue = "+ dYSCW + D * 2"; | |
| 770 | - } else if (yscwType === "6002" || yscwType === "6003") { | |
| 771 | - rightValue = "+ dYSCW + D"; | |
| 772 | - } else if (yscwType === "6004") { | |
| 773 | - rightValue = "+ dYSCW + D * 3"; | |
| 774 | - } else if (yscwType === "6005") { | |
| 775 | - rightValue = " + D * 3"; | |
| 776 | - } | |
| 777 | - if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") { | |
| 778 | - topValue = "dZSCW + D * 2 +"; | |
| 779 | - } else if (zscwType === "3002" || zscwType === "3003") { | |
| 780 | - topValue = "dZSCW + D +"; | |
| 781 | - } else if (zscwType === "3004") { | |
| 782 | - topValue = "dZSCW + D * 3 +"; | |
| 783 | - } else if (zscwType === "3005") { | |
| 784 | - topValue = "D * 3+"; | |
| 785 | - } | |
| 786 | - if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") { | |
| 787 | - bottomValue = "+ dYXCW + D * 2"; | |
| 788 | - } else if (yxcwType === "7002" || yxcwType === "7003") { | |
| 789 | - bottomValue = "+ dYXCW + D "; | |
| 790 | - } else if (yxcwType === "7004") { | |
| 791 | - bottomValue = "+ dYXCW + D * 3"; | |
| 792 | - } else if (yxcwType === "7005") { | |
| 793 | - bottomValue = "+ D * 3"; | |
| 794 | - } | |
| 795 | - // viewBoxWidth = Number(boxLength) + leftValue + rightValue; | |
| 796 | - // viewBoxHeight = Number(boxWidth) + topValue + bottomValue; | |
| 797 | - sLengthFormula = leftValue + "L" + rightValue; | |
| 798 | - sWidthFormula = topValue + "W" + bottomValue; | |
| 799 | - } else if (boxType && boxType === "5") { | |
| 800 | - // 飞机盒 | |
| 801 | - const ztbw = boxList.find(x => x.sName === "左贴边位")?.type && boxList.find(x => x.sName === "左贴边位")?.value; | |
| 802 | - const ytbw = boxList.find(x => x.sName === "右贴边位")?.type && boxList.find(x => x.sName === "右贴边位")?.value; | |
| 803 | - sLengthFormula = (ztbw ? "dZTBW+ " : "") + "D * 2 + W * 2" + (ytbw ? " +dYTBW" : ""); | |
| 804 | - if (zxcwType === "4001" || zxcwType === "4006" || zxcwType === "4007") { | |
| 805 | - leftBottomValue = Number(zxcwValue) + boxHeight; | |
| 806 | - leftBottom = " + dZXCW + D"; | |
| 807 | - } else if (zxcwType === "4002" || zxcwType === "4003") { | |
| 808 | - leftBottomValue = Number(zxcwValue); | |
| 809 | - leftBottom = " + dZXCW"; | |
| 810 | - } else if (zxcwType === "4004") { | |
| 811 | - leftBottomValue = Number(zxcwValue) + boxHeight * 2; | |
| 812 | - leftBottom = " + dZXCW + D * 2"; | |
| 813 | - } else if (zxcwType === "4005") { | |
| 814 | - leftBottomValue = boxHeight * 2; | |
| 815 | - leftBottom = "+ D * 2"; | |
| 816 | - } | |
| 817 | - if (yscwType === "6001" || yscwType === "6006" || yscwType === "6007") { | |
| 818 | - rightTopValue = Number(yscwValue) + boxHeight; | |
| 819 | - rightTop = "dYSCW + D + "; | |
| 820 | - } else if (yscwType === "6002" || yscwType === "6003") { | |
| 821 | - rightTopValue = Number(yscwValue); | |
| 822 | - rightTop = "dYSCW + "; | |
| 823 | - } else if (yscwType === "6004") { | |
| 824 | - rightTopValue = Number(yscwValue) + boxHeight * 2; | |
| 825 | - rightTop = "dYSCW + D * 2+ "; | |
| 826 | - } else if (yscwType === "6005") { | |
| 827 | - rightTopValue = boxHeight * 2; | |
| 828 | - rightTop = "D * 2+ "; | |
| 829 | - } | |
| 830 | - if (zscwType === "3001" || zscwType === "3006" || zscwType === "3007") { | |
| 831 | - leftTopValue = Number(zscwValue) + boxHeight; | |
| 832 | - leftTop = "dZSCW + D +"; | |
| 833 | - } else if (zscwType === "3002" || zscwType === "3003") { | |
| 834 | - leftTopValue = Number(zscwValue); | |
| 835 | - leftTop = "dZSCW +"; | |
| 836 | - } else if (zscwType === "3004") { | |
| 837 | - leftTopValue = Number(zscwValue) + boxHeight * 2; | |
| 838 | - leftTop = "dZSCW + D * 2 +"; | |
| 839 | - } else if (zscwType === "3005") { | |
| 840 | - leftTopValue = boxHeight * 2; | |
| 841 | - leftTop = "D * 2 +"; | |
| 842 | - } | |
| 843 | - if (yxcwType === "7001" || yxcwType === "7006" || yxcwType === "7007") { | |
| 844 | - rightBottomValue = Number(yxcwValue) + boxHeight; | |
| 845 | - rightBottom = "+ dYXCW + D"; | |
| 846 | - } else if (yxcwType === "7002" || yxcwType === "7003") { | |
| 847 | - rightBottomValue = Number(yxcwValue); | |
| 848 | - rightBottom = "+ dYXCW "; | |
| 849 | - } else if (yxcwType === "7004") { | |
| 850 | - rightBottomValue = Number(yxcwValue) + boxHeight * 2; | |
| 851 | - rightBottom = "+ dYXCW + D * 2"; | |
| 852 | - } else if (yxcwType === "7005") { | |
| 853 | - rightBottomValue = boxHeight * 2; | |
| 854 | - rightBottom = "+ D * 2"; | |
| 855 | - } | |
| 856 | - sWidthFormula = (leftTopValue > rightTopValue ? leftTop : rightTop) + "L" + (leftBottomValue > rightBottomValue ? leftBottom : rightBottom); | |
| 857 | - } | |
| 858 | - } | |
| 859 | - | |
| 860 | - // const sDoubleSize = JSON.stringify([headLength,headWidth,orderLength,orderWidth]) | |
| 861 | 395 | // 存储盒身数据 主表 |
| 862 | 396 | const newMasterData = { |
| 863 | 397 | ...masterData, |
| ... | ... | @@ -868,17 +402,13 @@ const BoxDesignCompontent = baseProps => { |
| 868 | 402 | sName: boxList.find(item => item.sName === "盒型名称")?.value || "", |
| 869 | 403 | sMakeUpPath: boxList.find(item => item.sName === "盒身")?.selectImage || "", |
| 870 | 404 | sTypes: boxList.find(item => item.sName === "盒身")?.type || "", |
| 871 | - sLengthFormula: masterData.sLengthFormula || sLengthFormula, | |
| 872 | - sWidthFormula: masterData.sWidthFormula || sWidthFormula, | |
| 873 | 405 | }; |
| 874 | - | |
| 875 | 406 | onOk({ slaveData: newSlaveData, masterData: newMasterData }); // 提交数据 |
| 876 | 407 | }; |
| 877 | 408 | const findIndexBySname = name => { |
| 878 | 409 | const i = boxList.findIndex(x => x.sName === name); |
| 879 | 410 | return i || 0; |
| 880 | 411 | }; |
| 881 | - | |
| 882 | 412 | return ( |
| 883 | 413 | <AntdDraggableModal |
| 884 | 414 | width="1000px" |
| ... | ... | @@ -899,344 +429,171 @@ const BoxDesignCompontent = baseProps => { |
| 899 | 429 | }} |
| 900 | 430 | > |
| 901 | 431 | {/* 盒身信息 */} |
| 902 | - | |
| 903 | 432 | <div className={styles.boxBody} key={boxKey}> |
| 904 | 433 | <div className={styles.boxTop}> |
| 905 | - {boxType !== "8" && | |
| 906 | - topBoxList.map((topItem, index) => ( | |
| 907 | - <div key={index} className={styles.boxFlex} style={{ display: topItem.show ? "block" : "none" }}> | |
| 908 | - <div className={styles.boxTitle}>{topItem.sName}</div> | |
| 909 | - {topItem?.selectImage ? ( | |
| 910 | - <img | |
| 911 | - src={topItem?.selectImage} | |
| 912 | - alt={topItem.value} | |
| 913 | - style={{ width: 40, height: 30, marginRight: 8, position: "absolute", left: 20, top: 24, zIndex: 10 }} | |
| 914 | - /> | |
| 915 | - ) : ( | |
| 916 | - "" | |
| 917 | - )} | |
| 918 | - | |
| 919 | - <Select | |
| 920 | - optionLabelProp="label" | |
| 921 | - className="mySelects" | |
| 922 | - style={{ width: 180 }} | |
| 923 | - defaultValue={options.length ? options[0].value : ""} | |
| 924 | - onSelect={(value, option) => handleSelect(value, option, index, 0)} | |
| 925 | - onDropdownVisibleChange={async open => { | |
| 926 | - if (open) { | |
| 927 | - props.getSqlOptions(index + 1); // 在下拉菜单打开时调用 getSqlOptions | |
| 928 | - } | |
| 929 | - }} | |
| 930 | - > | |
| 931 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 932 | - </Select> | |
| 933 | - <div className={styles.boxInput}> | |
| 934 | - {/* <div className={styles.text}>参数:</div> */} | |
| 935 | - <Input | |
| 936 | - value={topItem?.showName} | |
| 937 | - onChange={e => handleChangeName(e, index)} | |
| 938 | - onFocus={e => handleFocus(e, index)} | |
| 939 | - onBlur={e => handleBlur(e, index)} | |
| 940 | - readOnly={!topItem?.isEditable} | |
| 941 | - className={styles.text} | |
| 942 | - /> | |
| 943 | - <Input | |
| 944 | - value={topItem?.value} | |
| 945 | - onChange={e => handleChange(e, index)} | |
| 946 | - onFocus={e => handleFocus(e, index)} | |
| 947 | - onBlur={e => handleBlur(e, index)} | |
| 948 | - readOnly={!topItem?.isEditable} | |
| 949 | - style={{ width: " 80%" }} | |
| 950 | - /> | |
| 951 | - </div> | |
| 434 | + {topBoxList.map((topItem, index) => ( | |
| 435 | + <div key={index} className={styles.boxFlex} style={{ display: topItem.show ? "block" : "none" }}> | |
| 436 | + <div className={styles.boxTitle}>{topItem.sName}</div> | |
| 437 | + {topItem?.selectImage ? ( | |
| 438 | + <img | |
| 439 | + src={topItem?.selectImage} | |
| 440 | + alt={topItem.value} | |
| 441 | + style={{ width: 40, height: 30, marginRight: 8, position: "absolute", left: 20, top: 24, zIndex: 10 }} | |
| 442 | + /> | |
| 443 | + ) : ( | |
| 444 | + "" | |
| 445 | + )} | |
| 446 | + | |
| 447 | + <Select | |
| 448 | + optionLabelProp="label" | |
| 449 | + className="mySelects" | |
| 450 | + style={{ width: 180 }} | |
| 451 | + defaultValue={options.length ? options[0].value : ""} | |
| 452 | + onSelect={(value, option) => handleSelect(value, option, index, 0)} | |
| 453 | + onDropdownVisibleChange={async open => { | |
| 454 | + if (open) { | |
| 455 | + props.getSqlOptions(index + 1); // 在下拉菜单打开时调用 getSqlOptions | |
| 456 | + } | |
| 457 | + }} | |
| 458 | + > | |
| 459 | + {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 460 | + </Select> | |
| 461 | + <div className={styles.boxInput}> | |
| 462 | + {/* <div className={styles.text}>参数:</div> */} | |
| 463 | + <Input | |
| 464 | + value={topItem?.showName} | |
| 465 | + onChange={e => handleChangeName(e, index)} | |
| 466 | + onFocus={e => handleFocus(e, index)} | |
| 467 | + onBlur={e => handleBlur(e, index)} | |
| 468 | + readOnly={!topItem?.isEditable} | |
| 469 | + className={styles.text} | |
| 470 | + /> | |
| 471 | + <Input | |
| 472 | + value={topItem?.value} | |
| 473 | + onChange={e => handleChange(e, index)} | |
| 474 | + onFocus={e => handleFocus(e, index)} | |
| 475 | + onBlur={e => handleBlur(e, index)} | |
| 476 | + readOnly={!topItem?.isEditable} | |
| 477 | + style={{ width: " 80%" }} | |
| 478 | + /> | |
| 952 | 479 | </div> |
| 953 | - ))} | |
| 954 | - {boxType === "8" && | |
| 955 | - topDoubleBoxList.map((item, index) => ( | |
| 956 | - <div key={index} className={styles.boxFlex} style={{ display: item.show ? "block" : "none" }}> | |
| 957 | - <div className={styles.boxTitle}>{doubleTitlieList[index]}</div> | |
| 480 | + </div> | |
| 481 | + ))} | |
| 482 | + </div> | |
| 483 | + <div className={styles.boxLeft}> | |
| 484 | + {leftBoxList.map((item, index) => ( | |
| 485 | + <div key={index + 3} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}> | |
| 486 | + <div className={styles.boxTitle}>{titleList[index + 3]}</div> | |
| 487 | + | |
| 488 | + <Select | |
| 489 | + optionLabelProp="label" | |
| 490 | + className="mySelects" | |
| 491 | + style={{ width: 180 }} | |
| 492 | + defaultValue={options.length ? options[0].value : ""} | |
| 493 | + onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)} | |
| 494 | + onDropdownVisibleChange={async open => { | |
| 495 | + if (open) { | |
| 496 | + props.getSqlOptions(findIndexBySname(item.sName) + 1); // 在下拉菜单打开时调用 getSqlOptions | |
| 497 | + } | |
| 498 | + }} | |
| 499 | + > | |
| 500 | + {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 501 | + </Select> | |
| 502 | + <div className={styles.boxInput}> | |
| 958 | 503 | {item?.selectImage ? ( |
| 959 | 504 | <img |
| 960 | 505 | src={item?.selectImage} |
| 961 | 506 | alt={item.value} |
| 962 | - style={{ width: 40, height: 30, marginRight: 8, position: "absolute", left: 20, top: 24, zIndex: 10 }} | |
| 963 | - /> | |
| 964 | - ) : ( | |
| 965 | - "" | |
| 966 | - )} | |
| 967 | - | |
| 968 | - <Select | |
| 969 | - optionLabelProp="label" | |
| 970 | - className="mySelects" | |
| 971 | - style={{ width: 180 }} | |
| 972 | - defaultValue={options.length ? options[0].value : ""} | |
| 973 | - onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)} | |
| 974 | - onDropdownVisibleChange={async open => { | |
| 975 | - if (open) { | |
| 976 | - props.getSqlOptions(index + 11); // 在下拉菜单打开时调用 getSqlOptions | |
| 977 | - } | |
| 978 | - }} | |
| 979 | - > | |
| 980 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 981 | - </Select> | |
| 982 | - <div className={styles.boxInput}> | |
| 983 | - <Input | |
| 984 | - value={item?.showName} | |
| 985 | - onChange={e => handleChangeName(e, findIndexBySname(item.sName))} | |
| 986 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 987 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 988 | - readOnly={!item?.isEditable} | |
| 989 | - className={styles.text} | |
| 990 | - /> | |
| 991 | - <Input | |
| 992 | - value={item?.value} | |
| 993 | - onChange={e => handleChange(e, findIndexBySname(item.sName))} | |
| 994 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 995 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 996 | - readOnly={!item?.isEditable} | |
| 997 | - style={{ width: " 80%" }} | |
| 998 | - /> | |
| 999 | - </div> | |
| 1000 | - </div> | |
| 1001 | - ))} | |
| 1002 | - </div> | |
| 1003 | - <div className={styles.boxLeft}> | |
| 1004 | - {boxType !== "8" && | |
| 1005 | - leftBoxList.map((item, index) => ( | |
| 1006 | - <div key={index + 3} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}> | |
| 1007 | - <div className={styles.boxTitle}>{titleList[index + 3]}</div> | |
| 1008 | - | |
| 1009 | - <Select | |
| 1010 | - optionLabelProp="label" | |
| 1011 | - className="mySelects" | |
| 1012 | - style={{ width: 180 }} | |
| 1013 | - defaultValue={options.length ? options[0].value : ""} | |
| 1014 | - onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)} | |
| 1015 | - onDropdownVisibleChange={async open => { | |
| 1016 | - if (open) { | |
| 1017 | - props.getSqlOptions(findIndexBySname(item.sName) + 1); // 在下拉菜单打开时调用 getSqlOptions | |
| 1018 | - } | |
| 1019 | - }} | |
| 1020 | - > | |
| 1021 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 1022 | - </Select> | |
| 1023 | - <div className={styles.boxInput}> | |
| 1024 | - {item?.selectImage ? ( | |
| 1025 | - <img | |
| 1026 | - src={item?.selectImage} | |
| 1027 | - alt={item.value} | |
| 1028 | - style={{ | |
| 1029 | - width: 40, | |
| 1030 | - height: 30, | |
| 1031 | - marginRight: 8, | |
| 1032 | - position: "absolute", | |
| 1033 | - left: 20, | |
| 1034 | - top: -35, | |
| 1035 | - zIndex: 10, | |
| 1036 | - }} | |
| 1037 | - /> | |
| 1038 | - ) : ( | |
| 1039 | - "" | |
| 1040 | - )} | |
| 1041 | - <Input | |
| 1042 | - value={item?.showName} | |
| 1043 | - onChange={e => handleChangeName(e, findIndexBySname(item.sName))} | |
| 1044 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 1045 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 1046 | - readOnly={!item?.isEditable} | |
| 1047 | - className={styles.text} | |
| 1048 | - /> | |
| 1049 | - <Input | |
| 1050 | - value={item?.value} | |
| 1051 | - onChange={e => handleChange(e, findIndexBySname(item.sName))} | |
| 1052 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 1053 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 1054 | - readOnly={!item?.isEditable} | |
| 1055 | - style={{ width: " 80%" }} | |
| 1056 | - /> | |
| 1057 | - </div> | |
| 1058 | - </div> | |
| 1059 | - ))} | |
| 1060 | - {boxType === "8" && | |
| 1061 | - leftDoubleBoxList.map((item, index) => ( | |
| 1062 | - <div key={index + 3} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}> | |
| 1063 | - <div className={styles.boxTitle}>{doubleTitlieList[index + 3]}</div> | |
| 1064 | - | |
| 1065 | - {index !== 0 ? ( | |
| 1066 | - <Select | |
| 1067 | - optionLabelProp="label" | |
| 1068 | - className="mySelects" | |
| 1069 | - style={{ width: 180 }} | |
| 1070 | - defaultValue={options.length ? options[0].value : ""} | |
| 1071 | - onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)} | |
| 1072 | - onDropdownVisibleChange={async open => { | |
| 1073 | - if (open) { | |
| 1074 | - props.getSqlOptions(index + 13); // 在下拉菜单打开时调用 getSqlOptions | |
| 1075 | - } | |
| 507 | + style={{ | |
| 508 | + width: 40, | |
| 509 | + height: 30, | |
| 510 | + marginRight: 8, | |
| 511 | + position: "absolute", | |
| 512 | + left: 20, | |
| 513 | + top: -35, | |
| 514 | + zIndex: 10, | |
| 1076 | 515 | }} |
| 1077 | - > | |
| 1078 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 1079 | - </Select> | |
| 516 | + /> | |
| 1080 | 517 | ) : ( |
| 1081 | 518 | "" |
| 1082 | 519 | )} |
| 1083 | - <div className={styles.boxInput}> | |
| 1084 | - {item?.selectImage ? ( | |
| 1085 | - <img | |
| 1086 | - src={item?.selectImage} | |
| 1087 | - alt={item.value} | |
| 1088 | - style={{ | |
| 1089 | - width: 40, | |
| 1090 | - height: 30, | |
| 1091 | - marginRight: 8, | |
| 1092 | - position: "absolute", | |
| 1093 | - left: 20, | |
| 1094 | - top: -35, | |
| 1095 | - zIndex: 10, | |
| 1096 | - }} | |
| 1097 | - /> | |
| 1098 | - ) : ( | |
| 1099 | - "" | |
| 1100 | - )} | |
| 1101 | - <Input | |
| 1102 | - value={item?.showName} | |
| 1103 | - onChange={e => handleChangeName(e, findIndexBySname(item.sName))} | |
| 1104 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 1105 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 1106 | - readOnly={!item?.isEditable} | |
| 1107 | - className={styles.text} | |
| 1108 | - /> | |
| 1109 | - <Input | |
| 1110 | - value={item?.value} | |
| 1111 | - onChange={e => handleChange(e, findIndexBySname(item.sName))} | |
| 1112 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 1113 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 1114 | - readOnly={!item?.isEditable} | |
| 1115 | - style={{ width: " 80%" }} | |
| 1116 | - /> | |
| 1117 | - </div> | |
| 520 | + <Input | |
| 521 | + value={item?.showName} | |
| 522 | + onChange={e => handleChangeName(e, findIndexBySname(item.sName))} | |
| 523 | + onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 524 | + onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 525 | + readOnly={!item?.isEditable} | |
| 526 | + className={styles.text} | |
| 527 | + /> | |
| 528 | + <Input | |
| 529 | + value={item?.value} | |
| 530 | + onChange={e => handleChange(e, findIndexBySname(item.sName))} | |
| 531 | + onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 532 | + onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 533 | + readOnly={!item?.isEditable} | |
| 534 | + style={{ width: " 80%" }} | |
| 535 | + /> | |
| 1118 | 536 | </div> |
| 1119 | - ))} | |
| 537 | + </div> | |
| 538 | + ))} | |
| 1120 | 539 | </div> |
| 1121 | 540 | <div className={styles.boxRight}> |
| 1122 | - {boxType !== "8" && | |
| 1123 | - rightBoxList.map((item, index) => ( | |
| 1124 | - <div key={findIndexBySname(item.sName)} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}> | |
| 1125 | - <div className={styles.boxTitle}>{titleList[findIndexBySname(item.sName)]}</div> | |
| 1126 | - | |
| 1127 | - <Select | |
| 1128 | - optionLabelProp="label" | |
| 1129 | - className="mySelects" | |
| 1130 | - style={{ width: 180 }} | |
| 1131 | - defaultValue={options.length ? options[0].value : ""} | |
| 1132 | - onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)} | |
| 1133 | - onDropdownVisibleChange={async open => { | |
| 1134 | - if (open) { | |
| 1135 | - props.getSqlOptions(findIndexBySname(item.sName) + 1); // 在下拉菜单打开时调用 getSqlOptions | |
| 1136 | - } | |
| 1137 | - }} | |
| 1138 | - > | |
| 1139 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 1140 | - </Select> | |
| 1141 | - <div className={styles.boxInput}> | |
| 1142 | - {item?.selectImage ? ( | |
| 1143 | - <img | |
| 1144 | - src={item?.selectImage} | |
| 1145 | - alt={item.value} | |
| 1146 | - style={{ | |
| 1147 | - width: 40, | |
| 1148 | - height: 30, | |
| 1149 | - marginRight: 8, | |
| 1150 | - position: "absolute", | |
| 1151 | - left: 20, | |
| 1152 | - top: -35, | |
| 1153 | - zIndex: 10, | |
| 1154 | - }} | |
| 1155 | - /> | |
| 1156 | - ) : ( | |
| 1157 | - "" | |
| 1158 | - )} | |
| 1159 | - | |
| 1160 | - <Input | |
| 1161 | - value={item?.showName} | |
| 1162 | - onChange={e => handleChangeName(e, findIndexBySname(item.sName))} | |
| 1163 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 1164 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 1165 | - readOnly={!item?.isEditable} | |
| 1166 | - className={styles.text} | |
| 1167 | - /> | |
| 1168 | - <Input | |
| 1169 | - value={item?.value} | |
| 1170 | - onChange={e => handleChange(e, findIndexBySname(item.sName))} | |
| 1171 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 1172 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 1173 | - readOnly={!item?.isEditable} | |
| 1174 | - style={{ width: " 80%" }} | |
| 1175 | - /> | |
| 1176 | - </div> | |
| 1177 | - </div> | |
| 1178 | - ))} | |
| 1179 | - {boxType === "8" && | |
| 1180 | - rightDoubleBoxList.map((item, index) => ( | |
| 1181 | - <div key={index + 6} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}> | |
| 1182 | - <div className={styles.boxTitle}>{doubleTitlieList[index + 6]}</div> | |
| 1183 | - | |
| 1184 | - {index !== 0 ? ( | |
| 1185 | - <Select | |
| 1186 | - optionLabelProp="label" | |
| 1187 | - className="mySelects" | |
| 1188 | - style={{ width: 180 }} | |
| 1189 | - defaultValue={options.length ? options[0].value : ""} | |
| 1190 | - onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)} | |
| 1191 | - onDropdownVisibleChange={async open => { | |
| 1192 | - if (open) { | |
| 1193 | - props.getSqlOptions(index + 15); // 在下拉菜单打开时调用 getSqlOptions | |
| 1194 | - } | |
| 541 | + {rightBoxList.map((item, index) => ( | |
| 542 | + <div key={findIndexBySname(item.sName)} className={styles.boxFlex} style={{ display: item?.show ? "block" : "none" }}> | |
| 543 | + <div className={styles.boxTitle}>{titleList[findIndexBySname(item.sName)]}</div> | |
| 544 | + | |
| 545 | + <Select | |
| 546 | + optionLabelProp="label" | |
| 547 | + className="mySelects" | |
| 548 | + style={{ width: 180 }} | |
| 549 | + defaultValue={options.length ? options[0].value : ""} | |
| 550 | + onSelect={(value, option) => handleSelect(value, option, findIndexBySname(item.sName), 0)} | |
| 551 | + onDropdownVisibleChange={async open => { | |
| 552 | + if (open) { | |
| 553 | + props.getSqlOptions(findIndexBySname(item.sName) + 1); // 在下拉菜单打开时调用 getSqlOptions | |
| 554 | + } | |
| 555 | + }} | |
| 556 | + > | |
| 557 | + {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 558 | + </Select> | |
| 559 | + <div className={styles.boxInput}> | |
| 560 | + {item?.selectImage ? ( | |
| 561 | + <img | |
| 562 | + src={item?.selectImage} | |
| 563 | + alt={item.value} | |
| 564 | + style={{ | |
| 565 | + width: 40, | |
| 566 | + height: 30, | |
| 567 | + marginRight: 8, | |
| 568 | + position: "absolute", | |
| 569 | + left: 20, | |
| 570 | + top: -35, | |
| 571 | + zIndex: 10, | |
| 1195 | 572 | }} |
| 1196 | - > | |
| 1197 | - {!loading ? options.map(option => renderOptionWithImage(option)) : ""} | |
| 1198 | - </Select> | |
| 573 | + /> | |
| 1199 | 574 | ) : ( |
| 1200 | 575 | "" |
| 1201 | 576 | )} |
| 1202 | - <div className={styles.boxInput}> | |
| 1203 | - {item?.selectImage ? ( | |
| 1204 | - <img | |
| 1205 | - src={item?.selectImage} | |
| 1206 | - alt={item.value} | |
| 1207 | - style={{ | |
| 1208 | - width: 40, | |
| 1209 | - height: 30, | |
| 1210 | - marginRight: 8, | |
| 1211 | - position: "absolute", | |
| 1212 | - left: 20, | |
| 1213 | - top: -35, | |
| 1214 | - zIndex: 10, | |
| 1215 | - }} | |
| 1216 | - /> | |
| 1217 | - ) : ( | |
| 1218 | - "" | |
| 1219 | - )} | |
| 1220 | 577 | |
| 1221 | - <Input | |
| 1222 | - value={item?.showName} | |
| 1223 | - onChange={e => handleChangeName(e, findIndexBySname(item.sName))} | |
| 1224 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 1225 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 1226 | - readOnly={!item?.isEditable} | |
| 1227 | - className={styles.text} | |
| 1228 | - /> | |
| 1229 | - <Input | |
| 1230 | - value={item?.value} | |
| 1231 | - onChange={e => handleChange(e, findIndexBySname(item.sName))} | |
| 1232 | - onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 1233 | - onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 1234 | - readOnly={!item?.isEditable} | |
| 1235 | - style={{ width: " 80%" }} | |
| 1236 | - /> | |
| 1237 | - </div> | |
| 578 | + <Input | |
| 579 | + value={item?.showName} | |
| 580 | + onChange={e => handleChangeName(e, findIndexBySname(item.sName))} | |
| 581 | + onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 582 | + onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 583 | + readOnly={!item?.isEditable} | |
| 584 | + className={styles.text} | |
| 585 | + /> | |
| 586 | + <Input | |
| 587 | + value={item?.value} | |
| 588 | + onChange={e => handleChange(e, findIndexBySname(item.sName))} | |
| 589 | + onFocus={e => handleFocus(e, findIndexBySname(item.sName))} | |
| 590 | + onBlur={e => handleBlur(e, findIndexBySname(item.sName))} | |
| 591 | + readOnly={!item?.isEditable} | |
| 592 | + style={{ width: " 80%" }} | |
| 593 | + /> | |
| 1238 | 594 | </div> |
| 1239 | - ))} | |
| 595 | + </div> | |
| 596 | + ))} | |
| 1240 | 597 | </div> |
| 1241 | 598 | <div className={styles.boxBottom}> |
| 1242 | 599 | <div className={styles.svgBox}> |
| ... | ... | @@ -1305,7 +662,7 @@ const BoxDesignCompontent = baseProps => { |
| 1305 | 662 | }) |
| 1306 | 663 | : ""} |
| 1307 | 664 | <div className={styles.boxFlexs}> |
| 1308 | - {tableDataList && tableDataList.length && boxType !== "8" | |
| 665 | + {tableDataList && tableDataList.length | |
| 1309 | 666 | ? tableDataList.map((item, index) => { |
| 1310 | 667 | const uniqueIndex = index + 9 + tableColum.length + boxBodyList.length; |
| 1311 | 668 | |
| ... | ... | @@ -1325,28 +682,6 @@ const BoxDesignCompontent = baseProps => { |
| 1325 | 682 | }) |
| 1326 | 683 | : ""} |
| 1327 | 684 | </div> |
| 1328 | - | |
| 1329 | - <div className={styles.boxFlexs}> | |
| 1330 | - {doubleLayerList && doubleLayerList.length && boxType === "8" | |
| 1331 | - ? doubleLayerList.map((item, index) => { | |
| 1332 | - const uniqueIndex = index + 9 + tableColum.length + boxBodyList.length + tableDataList.length; | |
| 1333 | - | |
| 1334 | - return ( | |
| 1335 | - <div key={uniqueIndex} className={styles.boxInputs}> | |
| 1336 | - <div className={styles.text}>{item.sName}</div> | |
| 1337 | - <Input | |
| 1338 | - value={boxList[uniqueIndex]?.value} | |
| 1339 | - onChange={e => handleChange(e, uniqueIndex)} | |
| 1340 | - onFocus={e => handleFocus(e, uniqueIndex)} | |
| 1341 | - onBlur={e => handleBlur(e, uniqueIndex)} | |
| 1342 | - readOnly={!boxList[uniqueIndex]?.isEditable} | |
| 1343 | - style={{ width: " 60%" }} | |
| 1344 | - /> | |
| 1345 | - </div> | |
| 1346 | - ); | |
| 1347 | - }) | |
| 1348 | - : ""} | |
| 1349 | - </div> | |
| 1350 | 685 | </div> |
| 1351 | 686 | </div> |
| 1352 | 687 | </div> | ... | ... |
src/components/Common/BoxDesignCompontent/showSvg.js
| ... | ... | @@ -26,7 +26,6 @@ import { |
| 26 | 26 | createBoxComponentNew2, |
| 27 | 27 | createBoxComponentNew3, |
| 28 | 28 | createBoxComponentNew4, |
| 29 | - createBoxComponentNew5, | |
| 30 | 29 | createBoxComponentNew4_1, |
| 31 | 30 | createWelt, |
| 32 | 31 | createWelt1, |
| ... | ... | @@ -195,7 +194,7 @@ const SvgBox = props => { |
| 195 | 194 | } |
| 196 | 195 | // 左上部件 |
| 197 | 196 | pathList.push(createDynamicTopLeft(zsbj?.type, scaledWidth, -scaledHeight, -dZSCW * scale, 0, 0)); |
| 198 | - if ((zsbj?.type === "3001" && zsbj?.value )|| (zsbj?.type === "3006" && zsbj?.value)) { | |
| 197 | + if (zsbj?.type === "3001" && zsbj?.value) { | |
| 199 | 198 | pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.2, -scaledHeight / 2, scales)); |
| 200 | 199 | pathList.push(createText(scaledWidth * 0.2 + 10 * scales, -scaledHeight / 2, 10 * scales, "W")); |
| 201 | 200 | // 插位值 |
| ... | ... | @@ -350,7 +349,7 @@ const SvgBox = props => { |
| 350 | 349 | } |
| 351 | 350 | // 左上部件 |
| 352 | 351 | pathList.push(createDynamicTopLeft(zsbj?.type, scaledWidth, -scaledHeight, -dZSCW * scale, 0, 0)); |
| 353 | - if ((zsbj?.type === "3001" && zsbj?.value )|| (zsbj?.type === "3006" && zsbj?.value)) { | |
| 352 | + if (zsbj?.type === "3001" && zsbj?.value) { | |
| 354 | 353 | pathList.push(createDoubleArrow(scaledHeight, scaledWidth * 0.2, -scaledHeight / 2, scales)); |
| 355 | 354 | pathList.push(createText(scaledWidth * 0.2 + 10 * scales, -scaledHeight / 2, 10 * scales, "W")); |
| 356 | 355 | pathList.push(createText(scaledWidth / 2, -scaledHeight - dZSCW / 2 + 4, 10 * scales, dZSCW)); |
| ... | ... | @@ -579,7 +578,7 @@ const SvgBox = props => { |
| 579 | 578 | const zscw = valueList.find(x => x.sName === "左(上)插位组件"); |
| 580 | 579 | const yscw = valueList.find(x => x.sName === "右(上)插位组件"); |
| 581 | 580 | let top = 0; |
| 582 | - const one = ["6001", "3001", "4001", "7001", "3006", "4006", "6006", "7006"]; | |
| 581 | + const one = ["6001", "3001", "4001", "7001"]; | |
| 583 | 582 | const four = ["6004", "3004", "4004", "7004"]; |
| 584 | 583 | const five = ["6005", "3005", "4005", "7005"]; |
| 585 | 584 | const dYSCW = Number(yscw?.value) || 0; |
| ... | ... | @@ -634,7 +633,7 @@ const SvgBox = props => { |
| 634 | 633 | // 将找到的对象放入数组中,并过滤掉 undefined 值 |
| 635 | 634 | // 使用 reduce 方法比较 value 属性,找出最大的对象 |
| 636 | 635 | let top = 0; |
| 637 | - const one = ["6001", "3001", "4001", "7001", "3006", "4006", "6006", "7006"]; | |
| 636 | + const one = ["6001", "3001", "4001", "7001"]; | |
| 638 | 637 | const four = ["6004", "3004", "4004", "7004"]; |
| 639 | 638 | const five = ["6005", "3005", "4005", "7005"]; |
| 640 | 639 | const dYSCW = Number(yscw?.value) || 0; |
| ... | ... | @@ -872,9 +871,6 @@ const SvgBox = props => { |
| 872 | 871 | case "3005": |
| 873 | 872 | data = createBoxComponentNew4(width, height, size, offsetX, offsetY); |
| 874 | 873 | break; |
| 875 | - case "3006": | |
| 876 | - data = createBoxComponentNew5(width, height, size, offsetX, offsetY); | |
| 877 | - break; | |
| 878 | 874 | case "4001": |
| 879 | 875 | data = createBoxComponentNew(width, height, size, offsetX, offsetY); |
| 880 | 876 | break; |
| ... | ... | @@ -890,9 +886,6 @@ const SvgBox = props => { |
| 890 | 886 | case "4005": |
| 891 | 887 | data = createBoxComponentNew4(width, height, size, offsetX, offsetY); |
| 892 | 888 | break; |
| 893 | - case "4006": | |
| 894 | - data = createBoxComponentNew5(width, height, size, offsetX, offsetY); | |
| 895 | - break; | |
| 896 | 889 | case "6001": |
| 897 | 890 | data = createBoxComponentNew(width, height, size, offsetX, offsetY); |
| 898 | 891 | break; |
| ... | ... | @@ -908,9 +901,6 @@ const SvgBox = props => { |
| 908 | 901 | case "6005": |
| 909 | 902 | data = createBoxComponentNew4(width, height, size, offsetX, offsetY); |
| 910 | 903 | break; |
| 911 | - case "6006": | |
| 912 | - data = createBoxComponentNew5(width, height, size, offsetX, offsetY); | |
| 913 | - break; | |
| 914 | 904 | case "7001": |
| 915 | 905 | data = createBoxComponentNew(width, height, size, offsetX, offsetY); |
| 916 | 906 | break; |
| ... | ... | @@ -926,9 +916,6 @@ const SvgBox = props => { |
| 926 | 916 | case "7005": |
| 927 | 917 | data = createBoxComponentNew4(width, height, size, offsetX, offsetY); |
| 928 | 918 | break; |
| 929 | - case "7006": | |
| 930 | - data = createBoxComponentNew5(width, height, size, offsetX, offsetY); | |
| 931 | - break; | |
| 932 | 919 | default: |
| 933 | 920 | data = createNoneProject(); |
| 934 | 921 | break; | ... | ... |