Commit 927edc02 by 李俊

chore: 备份最新代码

1 parent 24fbbb4f
Showing with 5611 additions and 653 deletions
src/client/* src/client/*
src/components/select/*
\ No newline at end of file
...@@ -24,6 +24,7 @@ module.exports = { ...@@ -24,6 +24,7 @@ module.exports = {
// add your custom rules here // add your custom rules here
rules: { rules: {
"no-control-regex": 0,
// allow debugger during development // allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
...@@ -55,7 +56,7 @@ module.exports = { ...@@ -55,7 +56,7 @@ module.exports = {
'no-unneeded-ternary': 2, // 禁止不必要的嵌套 'no-unneeded-ternary': 2, // 禁止不必要的嵌套
'no-nested-ternary': 2, // 禁用嵌套的三目运算符 'no-nested-ternary': 0, // 禁用嵌套的三目运算符
'no-const-assign': 2, // 禁止修改 const 变量 'no-const-assign': 2, // 禁止修改 const 变量
......
stages:
- build-dev
variables:
CONFIG_DEV: ./public/config.js
# 开发构建
build-dev:
stage: build-dev
script:
- docker-compose build && docker-compose -p device_manage up -d
only:
- develop
tags:
- develop
FROM node:lts-alpine3.12 as build
RUN npm config set registry https://registry.npm.taobao.org
WORKDIR /tmp/cache
COPY package.json .
COPY package-lock.json .
RUN npm install
COPY . .
RUN npm run build
FROM socialengine/nginx-spa:latest as nginx
COPY default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /tmp/cache/dist /app
# pushState friendly!
# The setup:
# * website name is `_`
# * javascript app is located at `/app`
charset utf-8;
tcp_nopush on;
tcp_nodelay off;
client_header_timeout 10s;
client_body_timeout 10s;
client_max_body_size 128k;
reset_timedout_connection on;
gzip on;
gzip_types
text/css
text/javascript
text/xml
text/plain
application/javascript
application/x-javascript
application/json
application/xml
application/rss+xml
application/atom+xml
font/truetype
font/opentype
image/svg+xml;
server {
listen 80;
server_name localhost;
root /app;
expires $expires;
# To make sure any assets can get through :)
location / {
try_files $uri @rewrites;
}
location /front {
proxy_pass https://hzdev.seetatech.com:9997;
proxy_ssl_verify off;
}
# If no asset matches, send it to your javascript app. Hopefully it's a route in the app!
location @rewrites {
rewrite ^(.+)$ /index.html last;
}
}
\ No newline at end of file
version: "3.7"
services:
device_manage:
container_name: device_manage
restart: always
image: device_manage:${CI_COMMIT_REF_NAME}
build:
dockerfile: Dockerfile
context: .
volumes:
- /ssl:/app/ssl
ports:
- 9998:80
\ No newline at end of file
...@@ -2628,6 +2628,65 @@ ...@@ -2628,6 +2628,65 @@
} }
} }
}, },
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"dev": true,
"requires": {
"chalk": "^1.1.3",
"esutils": "^2.0.2",
"js-tokens": "^3.0.2"
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
"dev": true
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
}
},
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
"dev": true
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
"dev": true
}
}
},
"babel-eslint": { "babel-eslint": {
"version": "10.1.0", "version": "10.1.0",
"resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz", "resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz",
...@@ -2642,6 +2701,133 @@ ...@@ -2642,6 +2701,133 @@
"resolve": "^1.12.0" "resolve": "^1.12.0"
} }
}, },
"babel-helper-builder-binary-assignment-operator-visitor": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz",
"integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=",
"dev": true,
"requires": {
"babel-helper-explode-assignable-expression": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-types": "^6.24.1"
}
},
"babel-helper-call-delegate": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz",
"integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=",
"dev": true,
"requires": {
"babel-helper-hoist-variables": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1"
}
},
"babel-helper-define-map": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz",
"integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=",
"dev": true,
"requires": {
"babel-helper-function-name": "^6.24.1",
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"lodash": "^4.17.4"
}
},
"babel-helper-explode-assignable-expression": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz",
"integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1"
}
},
"babel-helper-function-name": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
"integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=",
"dev": true,
"requires": {
"babel-helper-get-function-arity": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1",
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1"
}
},
"babel-helper-get-function-arity": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz",
"integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
"babel-types": "^6.24.1"
}
},
"babel-helper-hoist-variables": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz",
"integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
"babel-types": "^6.24.1"
}
},
"babel-helper-optimise-call-expression": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz",
"integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
"babel-types": "^6.24.1"
}
},
"babel-helper-regex": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz",
"integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=",
"dev": true,
"requires": {
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"lodash": "^4.17.4"
}
},
"babel-helper-remap-async-to-generator": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz",
"integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=",
"dev": true,
"requires": {
"babel-helper-function-name": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1",
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1"
}
},
"babel-helper-replace-supers": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz",
"integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=",
"dev": true,
"requires": {
"babel-helper-optimise-call-expression": "^6.24.1",
"babel-messages": "^6.23.0",
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1",
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1"
}
},
"babel-helper-vue-jsx-merge-props": { "babel-helper-vue-jsx-merge-props": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz", "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
...@@ -2659,6 +2845,24 @@ ...@@ -2659,6 +2845,24 @@
"schema-utils": "^2.6.5" "schema-utils": "^2.6.5"
} }
}, },
"babel-messages": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-check-es2015-constants": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
"integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-dynamic-import-node": { "babel-plugin-dynamic-import-node": {
"version": "2.3.3", "version": "2.3.3",
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
...@@ -2698,6 +2902,417 @@ ...@@ -2698,6 +2902,417 @@
"@babel/helper-define-polyfill-provider": "^0.2.2" "@babel/helper-define-polyfill-provider": "^0.2.2"
} }
}, },
"babel-plugin-syntax-async-functions": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz",
"integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=",
"dev": true
},
"babel-plugin-syntax-exponentiation-operator": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz",
"integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=",
"dev": true
},
"babel-plugin-syntax-jsx": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",
"integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=",
"dev": true
},
"babel-plugin-syntax-trailing-function-commas": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz",
"integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=",
"dev": true
},
"babel-plugin-transform-async-to-generator": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz",
"integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=",
"dev": true,
"requires": {
"babel-helper-remap-async-to-generator": "^6.24.1",
"babel-plugin-syntax-async-functions": "^6.8.0",
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-arrow-functions": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
"integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-block-scoped-functions": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz",
"integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-block-scoping": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz",
"integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=",
"dev": true,
"requires": {
"babel-runtime": "^6.26.0",
"babel-template": "^6.26.0",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"lodash": "^4.17.4"
}
},
"babel-plugin-transform-es2015-classes": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz",
"integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=",
"dev": true,
"requires": {
"babel-helper-define-map": "^6.24.1",
"babel-helper-function-name": "^6.24.1",
"babel-helper-optimise-call-expression": "^6.24.1",
"babel-helper-replace-supers": "^6.24.1",
"babel-messages": "^6.23.0",
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1",
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1"
}
},
"babel-plugin-transform-es2015-computed-properties": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz",
"integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1"
}
},
"babel-plugin-transform-es2015-destructuring": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz",
"integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-duplicate-keys": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz",
"integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
"babel-types": "^6.24.1"
}
},
"babel-plugin-transform-es2015-for-of": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz",
"integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-function-name": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz",
"integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=",
"dev": true,
"requires": {
"babel-helper-function-name": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-types": "^6.24.1"
}
},
"babel-plugin-transform-es2015-literals": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz",
"integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-modules-amd": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz",
"integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=",
"dev": true,
"requires": {
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1"
}
},
"babel-plugin-transform-es2015-modules-commonjs": {
"version": "6.26.2",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz",
"integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==",
"dev": true,
"requires": {
"babel-plugin-transform-strict-mode": "^6.24.1",
"babel-runtime": "^6.26.0",
"babel-template": "^6.26.0",
"babel-types": "^6.26.0"
}
},
"babel-plugin-transform-es2015-modules-systemjs": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz",
"integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=",
"dev": true,
"requires": {
"babel-helper-hoist-variables": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1"
}
},
"babel-plugin-transform-es2015-modules-umd": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz",
"integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=",
"dev": true,
"requires": {
"babel-plugin-transform-es2015-modules-amd": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1"
}
},
"babel-plugin-transform-es2015-object-super": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz",
"integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=",
"dev": true,
"requires": {
"babel-helper-replace-supers": "^6.24.1",
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-parameters": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz",
"integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=",
"dev": true,
"requires": {
"babel-helper-call-delegate": "^6.24.1",
"babel-helper-get-function-arity": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1",
"babel-traverse": "^6.24.1",
"babel-types": "^6.24.1"
}
},
"babel-plugin-transform-es2015-shorthand-properties": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz",
"integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
"babel-types": "^6.24.1"
}
},
"babel-plugin-transform-es2015-spread": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz",
"integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-sticky-regex": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz",
"integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=",
"dev": true,
"requires": {
"babel-helper-regex": "^6.24.1",
"babel-runtime": "^6.22.0",
"babel-types": "^6.24.1"
}
},
"babel-plugin-transform-es2015-template-literals": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz",
"integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-typeof-symbol": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz",
"integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-es2015-unicode-regex": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz",
"integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=",
"dev": true,
"requires": {
"babel-helper-regex": "^6.24.1",
"babel-runtime": "^6.22.0",
"regexpu-core": "^2.0.0"
},
"dependencies": {
"jsesc": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
"dev": true
},
"regexpu-core": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
"integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
"dev": true,
"requires": {
"regenerate": "^1.2.1",
"regjsgen": "^0.2.0",
"regjsparser": "^0.1.4"
}
},
"regjsgen": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
"dev": true
},
"regjsparser": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
"dev": true,
"requires": {
"jsesc": "~0.5.0"
}
}
}
},
"babel-plugin-transform-exponentiation-operator": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz",
"integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=",
"dev": true,
"requires": {
"babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1",
"babel-plugin-syntax-exponentiation-operator": "^6.8.0",
"babel-runtime": "^6.22.0"
}
},
"babel-plugin-transform-regenerator": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz",
"integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=",
"dev": true,
"requires": {
"regenerator-transform": "^0.10.0"
},
"dependencies": {
"regenerator-transform": {
"version": "0.10.1",
"resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz",
"integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==",
"dev": true,
"requires": {
"babel-runtime": "^6.18.0",
"babel-types": "^6.19.0",
"private": "^0.1.6"
}
}
}
},
"babel-plugin-transform-strict-mode": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",
"integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
"babel-types": "^6.24.1"
}
},
"babel-plugin-transform-vue-jsx": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-3.7.0.tgz",
"integrity": "sha512-W39X07/n3oJMQd8tALBO+440NraGSF//Lo1ydd/9Nme3+QiRGFBb1Q39T9iixh0jZPPbfv3so18tNoIgLatymw==",
"dev": true,
"requires": {
"esutils": "^2.0.2"
}
},
"babel-preset-env": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz",
"integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==",
"dev": true,
"requires": {
"babel-plugin-check-es2015-constants": "^6.22.0",
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
"babel-plugin-transform-async-to-generator": "^6.22.0",
"babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
"babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0",
"babel-plugin-transform-es2015-block-scoping": "^6.23.0",
"babel-plugin-transform-es2015-classes": "^6.23.0",
"babel-plugin-transform-es2015-computed-properties": "^6.22.0",
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
"babel-plugin-transform-es2015-duplicate-keys": "^6.22.0",
"babel-plugin-transform-es2015-for-of": "^6.23.0",
"babel-plugin-transform-es2015-function-name": "^6.22.0",
"babel-plugin-transform-es2015-literals": "^6.22.0",
"babel-plugin-transform-es2015-modules-amd": "^6.22.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.23.0",
"babel-plugin-transform-es2015-modules-systemjs": "^6.23.0",
"babel-plugin-transform-es2015-modules-umd": "^6.23.0",
"babel-plugin-transform-es2015-object-super": "^6.22.0",
"babel-plugin-transform-es2015-parameters": "^6.23.0",
"babel-plugin-transform-es2015-shorthand-properties": "^6.22.0",
"babel-plugin-transform-es2015-spread": "^6.22.0",
"babel-plugin-transform-es2015-sticky-regex": "^6.22.0",
"babel-plugin-transform-es2015-template-literals": "^6.22.0",
"babel-plugin-transform-es2015-typeof-symbol": "^6.23.0",
"babel-plugin-transform-es2015-unicode-regex": "^6.22.0",
"babel-plugin-transform-exponentiation-operator": "^6.22.0",
"babel-plugin-transform-regenerator": "^6.22.0",
"browserslist": "^3.2.6",
"invariant": "^2.2.2",
"semver": "^5.3.0"
},
"dependencies": {
"browserslist": {
"version": "3.2.8",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz",
"integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==",
"dev": true,
"requires": {
"caniuse-lite": "^1.0.30000844",
"electron-to-chromium": "^1.3.47"
}
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true
}
}
},
"babel-runtime": { "babel-runtime": {
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
...@@ -2719,6 +3334,79 @@ ...@@ -2719,6 +3334,79 @@
} }
} }
}, },
"babel-template": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
"dev": true,
"requires": {
"babel-runtime": "^6.26.0",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"babylon": "^6.18.0",
"lodash": "^4.17.4"
}
},
"babel-traverse": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
"dev": true,
"requires": {
"babel-code-frame": "^6.26.0",
"babel-messages": "^6.23.0",
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"babylon": "^6.18.0",
"debug": "^2.6.8",
"globals": "^9.18.0",
"invariant": "^2.2.2",
"lodash": "^4.17.4"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"globals": {
"version": "9.18.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
"dev": true
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
}
}
},
"babel-types": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
"dev": true,
"requires": {
"babel-runtime": "^6.26.0",
"esutils": "^2.0.2",
"lodash": "^4.17.4",
"to-fast-properties": "^1.0.3"
},
"dependencies": {
"to-fast-properties": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
"dev": true
}
}
},
"babel-walk": { "babel-walk": {
"version": "3.0.0-canary-5", "version": "3.0.0-canary-5",
"resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz",
...@@ -2727,6 +3415,12 @@ ...@@ -2727,6 +3415,12 @@
"@babel/types": "^7.9.6" "@babel/types": "^7.9.6"
} }
}, },
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
"dev": true
},
"balanced-match": { "balanced-match": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.2.tgz?cache=0&sync_timestamp=1617714233441&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbalanced-match%2Fdownload%2Fbalanced-match-1.0.2.tgz", "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.2.tgz?cache=0&sync_timestamp=1617714233441&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbalanced-match%2Fdownload%2Fbalanced-match-1.0.2.tgz",
...@@ -7086,6 +7780,11 @@ ...@@ -7086,6 +7780,11 @@
"sshpk": "^1.7.0" "sshpk": "^1.7.0"
} }
}, },
"https": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz",
"integrity": "sha1-PDfHrhqO65ZpBKKtHpdaGUt+06Q="
},
"https-browserify": { "https-browserify": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/https-browserify/download/https-browserify-1.0.0.tgz", "resolved": "https://registry.npm.taobao.org/https-browserify/download/https-browserify-1.0.0.tgz",
...@@ -7436,6 +8135,15 @@ ...@@ -7436,6 +8135,15 @@
} }
} }
}, },
"invariant": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"dev": true,
"requires": {
"loose-envify": "^1.0.0"
}
},
"ip": { "ip": {
"version": "1.1.5", "version": "1.1.5",
"resolved": "https://registry.npm.taobao.org/ip/download/ip-1.1.5.tgz", "resolved": "https://registry.npm.taobao.org/ip/download/ip-1.1.5.tgz",
...@@ -8551,6 +9259,15 @@ ...@@ -8551,6 +9259,15 @@
"integrity": "sha1-AF/eL15uRwaPk1/yhXPhJe9y8Zc=", "integrity": "sha1-AF/eL15uRwaPk1/yhXPhJe9y8Zc=",
"dev": true "dev": true
}, },
"loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
},
"loud-rejection": { "loud-rejection": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
...@@ -10616,6 +11333,12 @@ ...@@ -10616,6 +11333,12 @@
"renderkid": "^2.0.4" "renderkid": "^2.0.4"
} }
}, },
"private": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
"dev": true
},
"process": { "process": {
"version": "0.11.10", "version": "0.11.10",
"resolved": "https://registry.npm.taobao.org/process/download/process-0.11.10.tgz", "resolved": "https://registry.npm.taobao.org/process/download/process-0.11.10.tgz",
...@@ -12215,6 +12938,11 @@ ...@@ -12215,6 +12938,11 @@
} }
} }
}, },
"sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"source-list-map": { "source-list-map": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz", "resolved": "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz",
...@@ -13858,6 +14586,14 @@ ...@@ -13858,6 +14586,14 @@
"integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=",
"dev": true "dev": true
}, },
"vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"requires": {
"sortablejs": "1.10.2"
}
},
"vuex": { "vuex": {
"version": "3.6.2", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
"dompurify": "^2.0.7", "dompurify": "^2.0.7",
"element-ui": "^2.15.3", "element-ui": "^2.15.3",
"exif-js": "^2.3.0", "exif-js": "^2.3.0",
"https": "^1.0.0",
"jquery": "^3.3.1", "jquery": "^3.3.1",
"lodash": "^4.17.20", "lodash": "^4.17.20",
"moment": "^2.24.0", "moment": "^2.24.0",
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
"vue-property-decorator": "^9.1.2", "vue-property-decorator": "^9.1.2",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vue-showdown": "^2.4.1", "vue-showdown": "^2.4.1",
"vuedraggable": "^2.24.3",
"vuex": "^3.0.1", "vuex": "^3.0.1",
"vuex-persistedstate": "^4.0.0-beta.3", "vuex-persistedstate": "^4.0.0-beta.3",
"xregexp": "^4.2.4", "xregexp": "^4.2.4",
...@@ -58,7 +60,11 @@ ...@@ -58,7 +60,11 @@
"@vue/eslint-config-standard": "^4.0.0", "@vue/eslint-config-standard": "^4.0.0",
"@vue/eslint-config-typescript": "^4.0.0", "@vue/eslint-config-typescript": "^4.0.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-plugin-dynamic-import-node": "^2.3.3", "babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-env": "^1.7.0",
"echarts": "^4.8.0", "echarts": "^4.8.0",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
......
window.g = { window.g = {
baseURL: 'http://218.94.122.141:8089/api', baseURL: 'https://hzdev.seetatech.com:9997',
defaultLang: 'zh-CN', // 目前支持 zh-CN / ja-JP defaultLang: 'zh-CN', // 目前支持 zh-CN / ja-JP
} }
\ No newline at end of file
import axios from './http'
const GET = 'get'
const POST = 'post'
const FRONT = '/front'
const USER = '/user'
export const loginApi = data => axios(POST, FRONT + USER + '/login', data)
export const logoutApi = data => axios(GET, FRONT + USER + '/logout', data)
export const getUsers = data => axios(GET, FRONT + USER + '/query_list', data)
export const createUser = data => axios(POST, FRONT + USER + '/add', data)
export const deleteUser = data => axios(GET, FRONT + USER + '/delete', data)
export const editUser = data => axios(POST, FRONT + USER + '/change', data)
const PARAMETER = '/parameter'
export const getParameter = data => axios(GET, FRONT + PARAMETER + '/query_list', data)
export const createParameter = data => axios(POST, FRONT + PARAMETER + '/create', data)
export const deleteParameter = data => axios(GET, FRONT + PARAMETER + '/delete', data)
export const editParameter = data => axios(POST, FRONT + PARAMETER + '/change', data)
export const detailParameter = data => axios(GET, FRONT + PARAMETER + '/query', data)
const TABLE = '/table'
export const getTable = data => axios(GET, FRONT + TABLE + '/query_list', data)
export const createTable = data => axios(POST, FRONT + TABLE + '/create', data)
export const deleteTable = data => axios(GET, FRONT + TABLE + '/delete', data)
export const addData = data => axios(POST, FRONT + TABLE + '/data/insert', data)
export const getData = data => axios(GET, FRONT + TABLE + '/data/query_list', data)
export const deleteData = data => axios(POST, FRONT + TABLE + '/data/delete', data)
const APPID = '/appid'
export const getApp = data => axios(GET, FRONT + APPID + '/query_list', data)
export const deleteApp = data => axios(GET, FRONT + APPID + '/delete', data)
export const setApp = data => axios(GET, FRONT + APPID + '/set', data)
export const addApp = data => axios(POST, FRONT + APPID + '/add', data)
const DEVICE = '/device'
export const getDevice = data => axios(POST, FRONT + DEVICE + '/query_list', data)
export const getDeviceService = data => axios(GET, FRONT + DEVICE + '/service/query')
export const getTag = data => axios(GET, FRONT + DEVICE + '/tag/query_list')
export const getServiceParamter = data => axios(GET, FRONT + DEVICE + '/service/parameter/query', data)
export const setServiceParamter = data => axios(POST, FRONT + DEVICE + '/service/parameter/change', data)
export const deleteTag = data => axios(GET, FRONT + DEVICE + '/tag/delete', data)
export const addTag = data => axios(POST, FRONT + DEVICE + '/tag/add', data)
export const postServiceRequest = data => axios(POST, FRONT + DEVICE + '/service/direct', data)
export const postServiceCommand = data => axios(POST, FRONT + DEVICE + '/service/command ', data)
const SERVICE = '/service'
export const getService = data => axios(POST, FRONT + SERVICE + '/query_list', data)
export const getServiceDevice = data => axios(GET, FRONT + SERVICE + '/device/query', data)
...@@ -10,12 +10,13 @@ ...@@ -10,12 +10,13 @@
//- body //- body
.confirm-body(slot="body") .confirm-body(slot="body")
//- span.dialog-icon.iconfont(:class="[mode, iconClass]") //- span.dialog-icon.iconfont(:class="[mode, iconClass]")
.title //- .title
span.dialog-icon.iconfont(:class="[mode, iconClass]") span.dialog-icon.iconfont(:class="[mode, iconClass]")
span.text {{ title }} span.text {{ title }}
p.caption(v-if="message") p.caption(v-if="message")
//- 支持html格式 //- 支持html格式
span(v-html="message") {{ message }} i.el-icon-warning(style="color: #F6AD3D;font-size: 22px;margin-right: 10px;float:left")
span(v-html="message" style="height: 22px;line-height: 22px") {{ message }}
.options(v-if="options && options.length") .options(v-if="options && options.length")
.option(v-for="option in options") .option(v-for="option in options")
...@@ -170,7 +171,7 @@ export default { ...@@ -170,7 +171,7 @@ export default {
.caption .caption
color: #4C4C4C color: #4C4C4C
font-size: 14px font-size: 14px
margin-top: 20px // margin-top: 20px
color: $--color-text-regular color: $--color-text-regular
.options .options
margin-top: 15px margin-top: 15px
......
...@@ -24,6 +24,7 @@ import seetaTable from './seeta-ui/seeta-table' ...@@ -24,6 +24,7 @@ import seetaTable from './seeta-ui/seeta-table'
// import seetaTooltip from './seeta-ui/seeta-tooltip.vue' // import seetaTooltip from './seeta-ui/seeta-tooltip.vue'
import seetaTabs from './seeta-ui/seeta-tabs.vue' import seetaTabs from './seeta-ui/seeta-tabs.vue'
import seetaSelect from './seeta-ui/seeta-select.vue' import seetaSelect from './seeta-ui/seeta-select.vue'
import packSelect from './select'
import seetaMenu from './seeta-ui/seeta-menu.vue' import seetaMenu from './seeta-ui/seeta-menu.vue'
import seetaCrumb from './seeta-ui/seeta-crumb.vue' import seetaCrumb from './seeta-ui/seeta-crumb.vue'
// import dateRange from './list-filter/date-range.vue' // import dateRange from './list-filter/date-range.vue'
...@@ -68,6 +69,7 @@ Vue.component('popup', popup) ...@@ -68,6 +69,7 @@ Vue.component('popup', popup)
// Vue.component('st-tooltip', seetaTooltip) // Vue.component('st-tooltip', seetaTooltip)
Vue.component('st-tabs', seetaTabs) Vue.component('st-tabs', seetaTabs)
Vue.component('st-select', seetaSelect) Vue.component('st-select', seetaSelect)
Vue.component('pack-select', packSelect)
Vue.component('st-menu', seetaMenu) Vue.component('st-menu', seetaMenu)
Vue.component('st-crumb', seetaCrumb) Vue.component('st-crumb', seetaCrumb)
Vue.component('puzzle-validator', puzzlevalidator) Vue.component('puzzle-validator', puzzlevalidator)
...@@ -24,15 +24,16 @@ export default class nameFilter extends Vue { ...@@ -24,15 +24,16 @@ export default class nameFilter extends Vue {
} }
search() { search() {
const routeQuery = this.$route.query this.$emit('startSearch', this.name)
// 避免重复搜索 // const routeQuery = this.$route.query
if (this.name === routeQuery.name || this.name === '') return // // 避免重复搜索
const query = { // if (this.name === routeQuery.name || this.name === '') return
...routeQuery, // const query = {
name: this.name, // ...routeQuery,
page_index: '1', // name: this.name,
} // page_index: '1',
this.$router.replace({ query: _.omitBy(query, item => item === '') }) // }
// this.$router.replace({ query: _.omitBy(query, item => item === '') })
} }
} }
</script> </script>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="table-box" ref="tableBox"> <div class="table-box" ref="tableBox">
<el-table <el-table
ref="table" ref="table"
stripe :stripe="stripe"
v-bind="$attrs" v-bind="$attrs"
v-on="$listeners" v-on="$listeners"
v-loading="isLoading" v-loading="isLoading"
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<template slot-scope="props"> <template slot-scope="props">
<el-table <el-table
stripe stripe
:data="childTableData"> :data="props.row.child">
<template <template
v-for="col in childOptions"> v-for="col in childOptions">
<!-- 插槽 --> <!-- 插槽 -->
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
<!-- 普通列 --> <!-- 普通列 -->
<!-- 表头居中 --> <!-- 表头居中 -->
<el-table-column <el-table-column
show-overflow-tooltip
header-align="left" header-align="left"
align="left" align="left"
v-else-if="!(typeof col.render === 'function')" v-else-if="!(typeof col.render === 'function')"
...@@ -177,6 +178,7 @@ ...@@ -177,6 +178,7 @@
</template> </template>
<slot></slot> <slot></slot>
</el-table> </el-table>
<div class="pagination"><slot name="pagination"></slot></div>
<div class="pagination" v-if="pagination"> <div class="pagination" v-if="pagination">
<el-pagination <el-pagination
:current-page.sync="currentPage" :current-page.sync="currentPage"
...@@ -205,6 +207,7 @@ export default class seetaTableIndex extends Vue { ...@@ -205,6 +207,7 @@ export default class seetaTableIndex extends Vue {
@Prop({ type: Array, default: () => [] }) options @Prop({ type: Array, default: () => [] }) options
// 子表格列表参数 // 子表格列表参数
@Prop({ type: Array, default: () => [] }) childOptions @Prop({ type: Array, default: () => [] }) childOptions
@Prop({ type: Boolean, default: true }) stripe
// 数据加载函数 // 数据加载函数
@Prop({ type: Function, default: () => { return {} } }) loadFunction @Prop({ type: Function, default: () => { return {} } }) loadFunction
@Prop({ type: Number, default: 30 }) pageSize @Prop({ type: Number, default: 30 }) pageSize
...@@ -303,7 +306,7 @@ export default class seetaTableIndex extends Vue { ...@@ -303,7 +306,7 @@ export default class seetaTableIndex extends Vue {
// 计算列表高度 // 计算列表高度
getTableHeight() { getTableHeight() {
this.$nextTick(() => { this.$nextTick(() => {
this.tableHeight = this.refTableBox.getBoundingClientRect().height - 66 this.tableHeight = this.pagination ? this.refTableBox.getBoundingClientRect().height - 66 : this.refTableBox.getBoundingClientRect().height - 25
// console.log(this.tableHeight) // console.log(this.tableHeight)
}) })
} }
...@@ -460,6 +463,8 @@ export default class seetaTableIndex extends Vue { ...@@ -460,6 +463,8 @@ export default class seetaTableIndex extends Vue {
opacity: 0.6 opacity: 0.6
transform: scale(1) transform: scale(1)
::v-deep .el-table__row ::v-deep .el-table__row
.status-icon + .any-slot
display: inline-block
.status-icon, .status-icon-animation .status-icon, .status-icon-animation
width: 6px width: 6px
height: 6px height: 6px
...@@ -550,6 +555,7 @@ export default class seetaTableIndex extends Vue { ...@@ -550,6 +555,7 @@ export default class seetaTableIndex extends Vue {
::v-deep .el-icon-arrow-down:hover ::v-deep .el-icon-arrow-down:hover
color: #409EFF !important color: #409EFF !important
.any-slot .any-slot
display: inline-block // display: inline-block
vertical-align: middle vertical-align: middle
overflow: hidden
</style> </style>
import Select from './src/select';
/* istanbul ignore next */
Select.install = function(Vue) {
Vue.component(Select.name, Select);
};
export default Select;
export default {
data() {
return {
hoverOption: -1
};
},
computed: {
optionsAllDisabled() {
return this.options.filter(option => option.visible).every(option => option.disabled);
}
},
watch: {
hoverIndex(val) {
if (typeof val === 'number' && val > -1) {
this.hoverOption = this.options[val] || {};
}
this.options.forEach(option => {
option.hover = this.hoverOption === option;
});
}
},
methods: {
navigateOptions(direction) {
if (!this.visible) {
this.visible = true;
return;
}
if (this.options.length === 0 || this.filteredOptionsCount === 0) return;
if (!this.optionsAllDisabled) {
if (direction === 'next') {
this.hoverIndex++;
if (this.hoverIndex === this.options.length) {
this.hoverIndex = 0;
}
} else if (direction === 'prev') {
this.hoverIndex--;
if (this.hoverIndex < 0) {
this.hoverIndex = this.options.length - 1;
}
}
const option = this.options[this.hoverIndex];
if (option.disabled === true ||
option.groupDisabled === true ||
!option.visible) {
this.navigateOptions(direction);
}
this.$nextTick(() => this.scrollToOption(this.hoverOption));
}
}
}
};
<template>
<ul class="el-select-group__wrap" v-show="visible">
<li class="el-select-group__title">{{ label }}</li>
<li>
<ul class="el-select-group">
<slot></slot>
</ul>
</li>
</ul>
</template>
<script type="text/babel">
import Emitter from 'element-ui/src/mixins/emitter';
export default {
mixins: [Emitter],
name: 'ElOptionGroup',
componentName: 'ElOptionGroup',
props: {
label: String,
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
visible: true
};
},
watch: {
disabled(val) {
this.broadcast('ElOption', 'handleGroupDisabled', val);
}
},
methods: {
queryChange() {
this.visible = this.$children &&
Array.isArray(this.$children) &&
this.$children.some(option => option.visible === true);
}
},
created() {
this.$on('queryChange', this.queryChange);
},
mounted() {
if (this.disabled) {
this.broadcast('ElOption', 'handleGroupDisabled', this.disabled);
}
}
};
</script>
<template>
<li
@mouseenter="hoverItem"
@click.stop="selectOptionClick"
class="el-select-dropdown__item"
v-show="visible"
:class="{
'selected': itemSelected,
'is-disabled': disabled || groupDisabled || limitReached,
'hover': hover
}">
<slot>
<span>{{ currentLabel }}</span>
</slot>
</li>
</template>
<script type="text/babel">
import Emitter from 'element-ui/src/mixins/emitter';
import { getValueByPath, escapeRegexpString } from 'element-ui/src/utils/util';
export default {
mixins: [Emitter],
name: 'ElOption',
componentName: 'ElOption',
inject: ['select'],
props: {
value: {
required: true
},
label: [String, Number],
created: Boolean,
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
index: -1,
groupDisabled: false,
visible: true,
hitState: false,
hover: false
};
},
computed: {
isObject() {
return Object.prototype.toString.call(this.value).toLowerCase() === '[object object]';
},
currentLabel() {
return this.label || (this.isObject ? '' : this.value);
},
currentValue() {
return this.value || this.label || '';
},
itemSelected() {
if (!this.select.multiple) {
return this.isEqual(this.value, this.select.value);
} else {
return this.contains(this.select.value, this.value);
}
},
limitReached() {
if (this.select.multiple) {
return !this.itemSelected &&
(this.select.value || []).length >= this.select.multipleLimit &&
this.select.multipleLimit > 0;
} else {
return false;
}
}
},
watch: {
currentLabel() {
if (!this.created && !this.select.remote) this.dispatch('ElSelect', 'setSelected');
},
value(val, oldVal) {
const { remote, valueKey } = this.select;
if (!this.created && !remote) {
if (valueKey && typeof val === 'object' && typeof oldVal === 'object' && val[valueKey] === oldVal[valueKey]) {
return;
}
this.dispatch('ElSelect', 'setSelected');
}
}
},
methods: {
isEqual(a, b) {
if (!this.isObject) {
return a === b;
} else {
const valueKey = this.select.valueKey;
return getValueByPath(a, valueKey) === getValueByPath(b, valueKey);
}
},
contains(arr = [], target) {
if (!this.isObject) {
return arr && arr.indexOf(target) > -1;
} else {
const valueKey = this.select.valueKey;
return arr && arr.some(item => {
return getValueByPath(item, valueKey) === getValueByPath(target, valueKey);
});
}
},
handleGroupDisabled(val) {
this.groupDisabled = val;
},
hoverItem() {
if (!this.disabled && !this.groupDisabled) {
this.select.hoverIndex = this.select.options.indexOf(this);
}
},
selectOptionClick() {
if (this.disabled !== true && this.groupDisabled !== true) {
this.dispatch('ElSelect', 'handleOptionClick', [this, true]);
}
},
queryChange(query) {
this.visible = new RegExp(escapeRegexpString(query), 'i').test(this.currentLabel) || this.created;
if (!this.visible) {
this.select.filteredOptionsCount--;
}
}
},
created() {
this.select.options.push(this);
this.select.cachedOptions.push(this);
this.select.optionsCount++;
this.select.filteredOptionsCount++;
this.$on('queryChange', this.queryChange);
this.$on('handleGroupDisabled', this.handleGroupDisabled);
},
beforeDestroy() {
const { selected, multiple } = this.select;
let selectedOptions = multiple ? selected : [selected];
let index = this.select.cachedOptions.indexOf(this);
let selectedIndex = selectedOptions.indexOf(this);
// if option is not selected, remove it from cache
if (index > -1 && selectedIndex < 0) {
this.select.cachedOptions.splice(index, 1);
}
this.select.onOptionDestroy(this.select.options.indexOf(this));
}
};
</script>
<template>
<div
class="el-select-dropdown el-popper"
:class="[{ 'is-multiple': $parent.multiple }, popperClass]"
:style="{ minWidth: minWidth }">
<slot></slot>
</div>
</template>
<script type="text/babel">
import Popper from 'element-ui/src/utils/vue-popper';
export default {
name: 'ElSelectDropdown',
componentName: 'ElSelectDropdown',
mixins: [Popper],
props: {
placement: {
default: 'bottom-start'
},
boundariesPadding: {
default: 0
},
popperOptions: {
default() {
return {
gpuAcceleration: false
};
}
},
visibleArrow: {
default: true
},
appendToBody: {
type: Boolean,
default: true
}
},
data() {
return {
minWidth: ''
};
},
computed: {
popperClass() {
return this.$parent.popperClass;
}
},
watch: {
'$parent.inputWidth'() {
this.minWidth = this.$parent.$el.getBoundingClientRect().width + 'px';
}
},
mounted() {
this.referenceElm = this.$parent.$refs.reference.$el;
this.$parent.popperElm = this.popperElm = this.$el;
this.$on('updatePopper', () => {
if (this.$parent.visible) this.updatePopper();
});
this.$on('destroyPopper', this.destroyPopper);
}
};
</script>
<template>
<div
class="el-select"
:class="[selectSize ? 'el-select--' + selectSize : '']"
@click="toggleMenu"
v-clickoutside="handleClose">
<div
class="el-select__tags"
v-if="multiple"
ref="tags"
:style="{ 'max-width': inputWidth - 32 + 'px', width: '100%' }">
<span v-if="collapseTags && selected.length">
<el-tag
:closable="!selectDisabled"
:size="collapseTagSize"
:hit="selected[0].hitState"
type="info"
@close="deleteTag($event, selected[0])"
disable-transitions>
<span class="el-select__tags-text">{{ selected[0].currentLabel }}</span>
</el-tag>
<el-tag
v-if="selected.length > 1"
:closable="false"
:size="collapseTagSize"
type="info"
disable-transitions>
<span class="el-select__tags-text">+ {{ selected.length - 1 }}</span>
</el-tag>
</span>
<transition-group @after-leave="resetInputHeight" v-if="!collapseTags">
<el-tag
v-for="item in selected"
:key="getValueKey(item)"
:closable="!selectDisabled"
:size="collapseTagSize"
:hit="item.hitState"
type="info"
@close="deleteTag($event, item)"
disable-transitions>
<span class="el-select__tags-text">{{ item.currentLabel }}</span>
</el-tag>
</transition-group>
<input
type="text"
class="el-select__input"
:class="[selectSize ? `is-${ selectSize }` : '']"
:disabled="selectDisabled"
:autocomplete="autoComplete || autocomplete"
@focus="handleFocus"
@blur="softFocus = false"
@keyup="managePlaceholder"
@keydown="resetInputState"
@keydown.down.prevent="navigateOptions('next')"
@keydown.up.prevent="navigateOptions('prev')"
@keydown.enter.prevent="selectOption"
@keydown.esc.stop.prevent="visible = false"
@keydown.delete="deletePrevTag"
@keydown.tab="visible = false"
@compositionstart="handleComposition"
@compositionupdate="handleComposition"
@compositionend="handleComposition"
v-model="query"
@input="debouncedQueryChange"
v-if="filterable"
:style="{ 'flex-grow': '1', width: inputLength / (inputWidth - 32) + '%', 'max-width': inputWidth - 42 + 'px' }"
ref="input">
</div>
<el-input
ref="reference"
v-model="selectedLabel"
type="text"
:placeholder="currentPlaceholder"
:name="name"
:id="id"
:autocomplete="autoComplete || autocomplete"
:size="selectSize"
:disabled="selectDisabled"
:readonly="readonly"
:validate-event="false"
:class="{ 'is-focus': visible }"
:tabindex="(multiple && filterable) ? '-1' : null"
@focus="handleFocus"
@blur="handleBlur"
@keyup.native="debouncedOnInputChange"
@keydown.native.down.stop.prevent="navigateOptions('next')"
@keydown.native.up.stop.prevent="navigateOptions('prev')"
@keydown.native.enter.prevent="selectOption"
@keydown.native.esc.stop.prevent="visible = false"
@keydown.native.tab="visible = false"
@paste.native="debouncedOnInputChange"
@mouseenter.native="inputHovering = true"
@mouseleave.native="inputHovering = false">
<template slot="prefix" v-if="$slots.prefix">
<slot name="prefix"></slot>
</template>
<template slot="suffix">
<i v-show="!showClose" :class="['el-select__caret', 'el-input__icon', 'el-icon-' + iconClass]"></i>
<i v-if="showClose" class="el-select__caret el-input__icon el-icon-circle-close" @click="handleClearClick"></i>
</template>
</el-input>
<transition
name="el-zoom-in-top"
@before-enter="handleMenuEnter"
@after-leave="doDestroy">
<el-select-menu
ref="popper"
:append-to-body="popperAppendToBody"
v-show="visible && emptyText !== false">
<el-scrollbar
tag="ul"
wrap-class="el-select-dropdown__wrap"
view-class="el-select-dropdown__list"
ref="scrollbar"
:class="{ 'is-empty': !allowCreate && query && filteredOptionsCount === 0 }"
v-show="options.length > 0 && !loading">
<el-option
:value="query"
created
v-if="showNewOption">
</el-option>
<slot></slot>
</el-scrollbar>
<template v-if="emptyText && (!allowCreate || loading || (allowCreate && options.length === 0 ))">
<slot name="empty" v-if="$slots.empty"></slot>
<p class="el-select-dropdown__empty" v-else>
{{ emptyText }}
</p>
</template>
</el-select-menu>
</transition>
</div>
</template>
<script type="text/babel">
import Emitter from 'element-ui/src/mixins/emitter';
import Focus from 'element-ui/src/mixins/focus';
import Locale from 'element-ui/src/mixins/locale';
import ElInput from 'element-ui/packages/input';
import ElSelectMenu from './select-dropdown.vue';
import ElOption from './option.vue';
import ElTag from 'element-ui/packages/tag';
import ElScrollbar from 'element-ui/packages/scrollbar';
import debounce from 'throttle-debounce/debounce';
import Clickoutside from 'element-ui/src/utils/clickoutside';
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';
import scrollIntoView from 'element-ui/src/utils/scroll-into-view';
import { getValueByPath, valueEquals, isIE, isEdge } from 'element-ui/src/utils/util';
import NavigationMixin from './navigation-mixin';
import { isKorean } from 'element-ui/src/utils/shared';
export default {
mixins: [Emitter, Locale, Focus('reference'), NavigationMixin],
name: 'ElSelect',
componentName: 'ElSelect',
inject: {
elForm: {
default: ''
},
elFormItem: {
default: ''
}
},
provide() {
return {
'select': this
};
},
computed: {
_elFormItemSize() {
return (this.elFormItem || {}).elFormItemSize;
},
readonly() {
return !this.filterable || this.multiple || (!isIE() && !isEdge() && !this.visible);
},
showClose() {
let hasValue = this.multiple
? Array.isArray(this.value) && this.value.length > 0
: this.value !== undefined && this.value !== null && this.value !== '';
let criteria = this.clearable &&
!this.selectDisabled &&
this.inputHovering &&
hasValue;
return criteria;
},
iconClass() {
return this.remote && this.filterable ? '' : (this.visible ? 'arrow-up is-reverse' : 'arrow-up');
},
debounce() {
return this.remote ? 300 : 0;
},
emptyText() {
if (this.loading) {
return this.loadingText || this.t('el.select.loading');
} else {
if (this.remote && this.query === '' && this.options.length === 0) return false;
if (this.filterable && this.query && this.options.length > 0 && this.filteredOptionsCount === 0) {
return this.noMatchText || this.t('el.select.noMatch');
}
if (this.options.length === 0) {
return this.noDataText || this.t('el.select.noData');
}
}
return null;
},
showNewOption() {
let hasExistingOption = this.options.filter(option => !option.created)
.some(option => option.currentLabel === this.query);
return this.filterable && this.allowCreate && this.query !== '' && !hasExistingOption;
},
selectSize() {
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
},
selectDisabled() {
return this.disabled || (this.elForm || {}).disabled;
},
collapseTagSize() {
return ['small', 'mini'].indexOf(this.selectSize) > -1
? 'mini'
: 'small';
},
propPlaceholder() {
return typeof this.placeholder !== 'undefined' ? this.placeholder : this.t('el.select.placeholder');
}
},
components: {
ElInput,
ElSelectMenu,
ElOption,
ElTag,
ElScrollbar
},
directives: { Clickoutside },
props: {
name: String,
id: String,
value: {
required: true
},
autocomplete: {
type: String,
default: 'off'
},
/** @Deprecated in next major version */
autoComplete: {
type: String,
validator(val) {
process.env.NODE_ENV !== 'production' &&
console.warn('[Element Warn][Select]\'auto-complete\' property will be deprecated in next major version. please use \'autocomplete\' instead.');
return true;
}
},
automaticDropdown: Boolean,
size: String,
disabled: Boolean,
clearable: Boolean,
filterable: Boolean,
allowCreate: Boolean,
loading: Boolean,
popperClass: String,
remote: Boolean,
loadingText: String,
noMatchText: String,
noDataText: String,
remoteMethod: Function,
filterMethod: Function,
multiple: Boolean,
multipleLimit: {
type: Number,
default: 0
},
placeholder: {
type: String,
required: false
},
defaultFirstOption: Boolean,
reserveKeyword: Boolean,
valueKey: {
type: String,
default: 'value'
},
collapseTags: Boolean,
popperAppendToBody: {
type: Boolean,
default: true
}
},
data() {
return {
options: [],
cachedOptions: [],
createdLabel: null,
createdSelected: false,
selected: this.multiple ? [] : {},
inputLength: 20,
inputWidth: 0,
initialInputHeight: 0,
cachedPlaceHolder: '',
optionsCount: 0,
filteredOptionsCount: 0,
visible: false,
softFocus: false,
selectedLabel: '',
hoverIndex: -1,
query: '',
previousQuery: null,
inputHovering: false,
currentPlaceholder: '',
menuVisibleOnFocus: false,
isOnComposition: false,
isSilentBlur: false
};
},
watch: {
selectDisabled() {
this.$nextTick(() => {
this.resetInputHeight();
});
},
propPlaceholder(val) {
this.cachedPlaceHolder = this.currentPlaceholder = val;
},
value(val, oldVal) {
if (this.multiple) {
this.resetInputHeight();
if ((val && val.length > 0) || (this.$refs.input && this.query !== '')) {
this.currentPlaceholder = '';
} else {
this.currentPlaceholder = this.cachedPlaceHolder;
}
if (this.filterable && !this.reserveKeyword) {
this.query = '';
this.handleQueryChange(this.query);
}
}
this.setSelected();
if (this.filterable && !this.multiple) {
this.inputLength = 20;
}
if (!valueEquals(val, oldVal)) {
this.dispatch('ElFormItem', 'el.form.change', val);
}
},
visible(val) {
if (!val) {
this.broadcast('ElSelectDropdown', 'destroyPopper');
if (this.$refs.input) {
this.$refs.input.blur();
}
this.query = '';
this.previousQuery = null;
this.selectedLabel = '';
this.inputLength = 20;
this.menuVisibleOnFocus = false;
this.resetHoverIndex();
this.$nextTick(() => {
if (this.$refs.input &&
this.$refs.input.value === '' &&
this.selected.length === 0) {
this.currentPlaceholder = this.cachedPlaceHolder;
}
});
if (!this.multiple) {
if (this.selected) {
if (this.filterable && this.allowCreate &&
this.createdSelected && this.createdLabel) {
this.selectedLabel = this.createdLabel;
} else {
this.selectedLabel = this.selected.currentLabel;
}
if (this.filterable) this.query = this.selectedLabel;
}
if (this.filterable) {
this.currentPlaceholder = this.cachedPlaceHolder;
}
}
} else {
this.broadcast('ElSelectDropdown', 'updatePopper');
if (this.filterable) {
this.query = this.remote ? '' : this.selectedLabel;
this.handleQueryChange(this.query);
if (this.multiple) {
this.$refs.input.focus();
} else {
if (!this.remote) {
this.broadcast('ElOption', 'queryChange', '');
this.broadcast('ElOptionGroup', 'queryChange');
}
if (this.selectedLabel) {
this.currentPlaceholder = this.selectedLabel;
this.selectedLabel = '';
}
}
}
}
this.$emit('visible-change', val);
},
options() {
if (this.$isServer) return;
this.$nextTick(() => {
this.broadcast('ElSelectDropdown', 'updatePopper');
});
if (this.multiple) {
this.resetInputHeight();
}
let inputs = this.$el.querySelectorAll('input');
if ([].indexOf.call(inputs, document.activeElement) === -1) {
this.setSelected();
}
if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
this.checkDefaultFirstOption();
}
}
},
methods: {
handleComposition(event) {
const text = event.target.value;
if (event.type === 'compositionend') {
this.isOnComposition = false;
this.$nextTick(_ => this.handleQueryChange(text));
} else {
const lastCharacter = text[text.length - 1] || '';
this.isOnComposition = !isKorean(lastCharacter);
}
},
handleQueryChange(val) {
if (this.previousQuery === val || this.isOnComposition) return;
if (
this.previousQuery === null &&
(typeof this.filterMethod === 'function' || typeof this.remoteMethod === 'function')
) {
this.previousQuery = val;
return;
}
this.previousQuery = val;
this.$nextTick(() => {
if (this.visible) this.broadcast('ElSelectDropdown', 'updatePopper');
});
this.hoverIndex = -1;
if (this.multiple && this.filterable) {
this.$nextTick(() => {
const length = this.$refs.input.value.length * 15 + 20;
this.inputLength = this.collapseTags ? Math.min(50, length) : length;
this.managePlaceholder();
this.resetInputHeight();
});
}
if (this.remote && typeof this.remoteMethod === 'function') {
this.hoverIndex = -1;
this.remoteMethod(val);
} else if (typeof this.filterMethod === 'function') {
this.filterMethod(val);
this.broadcast('ElOptionGroup', 'queryChange');
} else {
this.filteredOptionsCount = this.optionsCount;
this.broadcast('ElOption', 'queryChange', val);
this.broadcast('ElOptionGroup', 'queryChange');
}
if (this.defaultFirstOption && (this.filterable || this.remote) && this.filteredOptionsCount) {
this.checkDefaultFirstOption();
}
},
scrollToOption(option) {
const target = Array.isArray(option) && option[0] ? option[0].$el : option.$el;
if (this.$refs.popper && target) {
const menu = this.$refs.popper.$el.querySelector('.el-select-dropdown__wrap');
scrollIntoView(menu, target);
}
this.$refs.scrollbar && this.$refs.scrollbar.handleScroll();
},
handleMenuEnter() {
this.$nextTick(() => this.scrollToOption(this.selected));
},
emitChange(val) {
if (!valueEquals(this.value, val)) {
this.$emit('change', val);
}
},
getOption(value) {
let option;
const isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
const isNull = Object.prototype.toString.call(value).toLowerCase() === '[object null]';
const isUndefined = Object.prototype.toString.call(value).toLowerCase() === '[object undefined]';
for (let i = this.cachedOptions.length - 1; i >= 0; i--) {
const cachedOption = this.cachedOptions[i];
const isEqual = isObject
? getValueByPath(cachedOption.value, this.valueKey) === getValueByPath(value, this.valueKey)
: cachedOption.value === value;
if (isEqual) {
option = cachedOption;
break;
}
}
if (option) return option;
const label = (!isObject && !isNull && !isUndefined)
? String(value) : '';
let newOption = {
value: value,
currentLabel: label
};
if (this.multiple) {
newOption.hitState = false;
}
return newOption;
},
setSelected() {
if (!this.multiple) {
let option = this.getOption(this.value);
if (option.created) {
this.createdLabel = option.currentLabel;
this.createdSelected = true;
} else {
this.createdSelected = false;
}
this.selectedLabel = option.currentLabel;
this.selected = option;
if (this.filterable) this.query = this.selectedLabel;
return;
}
let result = [];
if (Array.isArray(this.value)) {
this.value.forEach(value => {
result.push(this.getOption(value));
});
}
this.selected = result;
this.$nextTick(() => {
this.resetInputHeight();
});
},
handleFocus(event) {
if (!this.softFocus) {
if (this.automaticDropdown || this.filterable) {
this.visible = true;
if (this.filterable) {
this.menuVisibleOnFocus = true;
}
}
this.$emit('focus', event);
} else {
this.softFocus = false;
}
},
blur() {
this.visible = false;
this.$refs.reference.blur();
},
handleBlur(event) {
setTimeout(() => {
if (this.isSilentBlur) {
this.isSilentBlur = false;
} else {
this.$emit('blur', event);
}
}, 50);
this.softFocus = false;
},
handleClearClick(event) {
this.deleteSelected(event);
},
doDestroy() {
this.$refs.popper && this.$refs.popper.doDestroy();
},
handleClose() {
this.visible = false;
},
toggleLastOptionHitState(hit) {
if (!Array.isArray(this.selected)) return;
const option = this.selected[this.selected.length - 1];
if (!option) return;
if (hit === true || hit === false) {
option.hitState = hit;
return hit;
}
option.hitState = !option.hitState;
return option.hitState;
},
deletePrevTag(e) {
if (e.target.value.length <= 0 && !this.toggleLastOptionHitState()) {
const value = this.value.slice();
value.pop();
this.$emit('input', value);
this.emitChange(value);
}
},
managePlaceholder() {
if (this.currentPlaceholder !== '') {
this.currentPlaceholder = this.$refs.input.value ? '' : this.cachedPlaceHolder;
}
},
resetInputState(e) {
if (e.keyCode !== 8) this.toggleLastOptionHitState(false);
this.inputLength = this.$refs.input.value.length * 15 + 20;
this.resetInputHeight();
},
resetInputHeight() {
if (this.collapseTags && !this.filterable) return;
this.$nextTick(() => {
if (!this.$refs.reference) return;
let inputChildNodes = this.$refs.reference.$el.childNodes;
let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
const tags = this.$refs.tags;
const sizeInMap = this.initialInputHeight || 40;
input.style.height = this.selected.length === 0
? sizeInMap + 'px'
: Math.max(
tags ? (tags.clientHeight + (tags.clientHeight > sizeInMap ? 6 : 0)) : 0,
sizeInMap
) + 'px';
if (this.visible && this.emptyText !== false) {
this.broadcast('ElSelectDropdown', 'updatePopper');
}
});
},
resetHoverIndex() {
setTimeout(() => {
if (!this.multiple) {
this.hoverIndex = this.options.indexOf(this.selected);
} else {
if (this.selected.length > 0) {
this.hoverIndex = Math.min.apply(null, this.selected.map(item => this.options.indexOf(item)));
} else {
this.hoverIndex = -1;
}
}
}, 300);
},
handleOptionSelect(option, byClick) {
if (this.multiple) {
const value = (this.value || []).slice();
const optionIndex = this.getValueIndex(value, option.value);
if (optionIndex > -1) {
value.splice(optionIndex, 1);
} else if (this.multipleLimit <= 0 || value.length < this.multipleLimit) {
value.push(option.value);
}
this.$emit('input', value);
this.emitChange(value);
if (option.created) {
this.query = '';
this.handleQueryChange('');
this.inputLength = 20;
}
if (this.filterable) this.$refs.input.focus();
} else {
this.$emit('input', option.value);
this.emitChange(option.value);
this.visible = false;
}
this.isSilentBlur = byClick;
this.setSoftFocus();
if (this.visible) return;
this.$nextTick(() => {
this.scrollToOption(option);
});
},
setSoftFocus() {
this.softFocus = true;
const input = this.$refs.input || this.$refs.reference;
if (input) {
input.focus();
}
},
getValueIndex(arr = [], value) {
const isObject = Object.prototype.toString.call(value).toLowerCase() === '[object object]';
if (!isObject) {
return arr.indexOf(value);
} else {
const valueKey = this.valueKey;
let index = -1;
arr.some((item, i) => {
if (getValueByPath(item, valueKey) === getValueByPath(value, valueKey)) {
index = i;
return true;
}
return false;
});
return index;
}
},
toggleMenu() {
if (!this.selectDisabled) {
if (this.menuVisibleOnFocus) {
this.menuVisibleOnFocus = false;
} else {
this.visible = !this.visible;
}
if (this.visible) {
(this.$refs.input || this.$refs.reference).focus();
}
}
},
selectOption() {
if (!this.visible) {
this.toggleMenu();
} else {
if (this.options[this.hoverIndex]) {
this.handleOptionSelect(this.options[this.hoverIndex]);
}
}
},
deleteSelected(event) {
event.stopPropagation();
const value = this.multiple ? [] : '';
this.$emit('input', value);
this.emitChange(value);
this.visible = false;
this.$emit('clear');
},
deleteTag(event, tag) {
let index = this.selected.indexOf(tag);
if (index > -1 && !this.selectDisabled) {
const value = this.value.slice();
value.splice(index, 1);
this.$emit('input', value);
this.emitChange(value);
this.$emit('remove-tag', tag.value);
}
event.stopPropagation();
},
onInputChange() {
if (this.filterable && this.query !== this.selectedLabel) {
this.query = this.selectedLabel;
this.handleQueryChange(this.query);
}
},
onOptionDestroy(index) {
if (index > -1) {
this.optionsCount--;
this.filteredOptionsCount--;
this.options.splice(index, 1);
}
},
resetInputWidth() {
this.inputWidth = this.$refs.reference.$el.getBoundingClientRect().width;
},
handleResize() {
this.resetInputWidth();
if (this.multiple) this.resetInputHeight();
},
checkDefaultFirstOption() {
this.hoverIndex = -1;
// highlight the created option
let hasCreated = false;
for (let i = this.options.length - 1; i >= 0; i--) {
if (this.options[i].created) {
hasCreated = true;
this.hoverIndex = i;
break;
}
}
if (hasCreated) return;
for (let i = 0; i !== this.options.length; ++i) {
const option = this.options[i];
if (this.query) {
// highlight first options that passes the filter
if (!option.disabled && !option.groupDisabled && option.visible) {
this.hoverIndex = i;
break;
}
} else {
// highlight currently selected option
if (option.itemSelected) {
this.hoverIndex = i;
break;
}
}
}
},
getValueKey(item) {
if (Object.prototype.toString.call(item.value).toLowerCase() !== '[object object]') {
return item.value;
} else {
return getValueByPath(item.value, this.valueKey);
}
}
},
created() {
this.cachedPlaceHolder = this.currentPlaceholder = this.propPlaceholder;
if (this.multiple && !Array.isArray(this.value)) {
this.$emit('input', []);
}
if (!this.multiple && Array.isArray(this.value)) {
this.$emit('input', '');
}
this.debouncedOnInputChange = debounce(this.debounce, () => {
this.onInputChange();
});
this.debouncedQueryChange = debounce(this.debounce, (e) => {
this.handleQueryChange(e.target.value);
});
this.$on('handleOptionClick', this.handleOptionSelect);
this.$on('setSelected', this.setSelected);
},
mounted() {
if (this.multiple && Array.isArray(this.value) && this.value.length > 0) {
this.currentPlaceholder = '';
}
addResizeListener(this.$el, this.handleResize);
const reference = this.$refs.reference;
if (reference && reference.$el) {
const sizeMap = {
medium: 36,
small: 32,
mini: 28
};
const input = reference.$el.querySelector('input');
this.initialInputHeight = input.getBoundingClientRect().height || sizeMap[this.selectSize];
}
if (this.remote && this.multiple) {
this.resetInputHeight();
}
this.$nextTick(() => {
if (reference && reference.$el) {
this.inputWidth = reference.$el.getBoundingClientRect().width;
}
});
this.setSelected();
},
beforeDestroy() {
if (this.$el && this.handleResize) removeResizeListener(this.$el, this.handleResize);
}
};
</script>
'use strict' 'use strict'
import Axios from 'axios' import Axios from 'axios'
import { getToken } from '@/utils/user'
// import * as api from '../src/client'
import { baseUrl } from '../src/config'
import browserStorage from '@/services/local-storage' import browserStorage from '@/services/local-storage'
import store from '@/store' import store from '@/store'
import { Notification } from 'element-ui' import { Notification } from 'element-ui'
import Router from '@/router/index.js' import Router from '@/router/index.js'
import { baseUrl } from '@/config'
// 配置默认进度条事件
Axios.defaults.onUploadProgress = p => {
const obj = document.querySelector('.uploadForm .el-icon-circle-check')
if (obj) {
const percent = ((p.loaded / p.total) * 100) | 0
obj.setAttribute('data-text', percent + '%')
store.dispatch('setChangeUploadPercent', percent)
}
}
function notificationError(title: any, msg: any, duration: number = 1500) { function notificationError(title: any, msg: any, duration: number = 1500) {
Notification.error({ Notification.error({
...@@ -27,58 +15,24 @@ function notificationError(title: any, msg: any, duration: number = 1500) { ...@@ -27,58 +15,24 @@ function notificationError(title: any, msg: any, duration: number = 1500) {
}) })
} }
interface resData { code: string, text: string, msg: string } // Axios.defaults.baseURL = baseUrl
interface optionsType {
allow_throw: boolean,
valid_code: boolean,
error_page: boolean,
must_fields?: [],
routerCancel?: boolean,
cancelToken?: any,
}
const m = new Map()
// 获取请求头
function getHeaders() {
const token = getToken()
return token ? { Authorization: token } : null
}
// 全局错误提示
function throwErr(resData: resData) {
vm.$notify.error({
title: resData.text,
message: resData.msg,
})
}
function validBackendCode(resData: resData, options: optionsType) {
if (resData.code === 'Success') return true
if (options.error_page) { export default (method, url, data, config) => {
if (resData.code === 'NoAuthority') vm.$router.replace('/403') method = method.toLowerCase()
if (resData.code === 'RecordNotFoundError') vm.$router.replace('/404') switch (method) {
} case 'get':
return Axios({ method: 'get', url, headers: { 'Token': browserStorage.getItem('token') }, params: data })
if (options.allow_throw) { case 'post':
const code = resData.code return Axios({ method: 'post', url, headers: { 'Token': browserStorage.getItem('token') }, data })
const d = new Date() default:
if (m.has(code)) {
if (d.getTime() - m.get(code) > 2000) {
throwErr(resData)
m.set(code, d.getTime())
}
} else {
throwErr(resData)
m.set(code, d.getTime())
}
}
return false return false
}
} }
// 添加请求拦截器 // 添加请求拦截器
Axios.interceptors.request.use(function(config) { Axios.interceptors.request.use(function(config) {
for (const key in config.params) {
if (config.params[key] === '' || config.params[key] === undefined) delete config.params[key]
}
const urlBase = config.url.split('?')[0] const urlBase = config.url.split('?')[0]
const urlQueryArr = Array.from(new URLSearchParams(config.url.split('?')[1])) const urlQueryArr = Array.from(new URLSearchParams(config.url.split('?')[1]))
let result = '?' let result = '?'
...@@ -105,6 +59,9 @@ Axios.interceptors.response.use(res => { ...@@ -105,6 +59,9 @@ Axios.interceptors.response.use(res => {
store.commit('removeAxiosCancelArr', index) store.commit('removeAxiosCancelArr', index)
} }
}) })
if (res && res.data && res.data.code !== 0) {
notificationError('提示', res.data.msg)
}
return res return res
}, error => { }, error => {
error.response && error.response.data && notificationError('提示', error.response.data.message) error.response && error.response.data && notificationError('提示', error.response.data.message)
...@@ -131,13 +88,3 @@ Axios.interceptors.response.use(res => { ...@@ -131,13 +88,3 @@ Axios.interceptors.response.use(res => {
// }) // })
} }
}) })
// const configuration = new api.Configuration({
// // basePath: process.env.API_URL,
// basePath: baseUrl,
// apiKey() {
// // TODO: 从localStorage中获取Token,Organization-Id
// return browserStorage.getItem('id')
// }
// })
// export const usersApi = new api.UsersApi(configuration)
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
return this.$route.name return this.$route.name
}, },
menuList() { menuList() {
const routerList = JSON.parse(JSON.stringify(this.$router.options.routes.filter(item => item.children))) const routerList = JSON.parse(JSON.stringify(this.$router.options.routes.filter(item => item.children && !item.meta.hidden)))
const result = [] const result = []
routerList.map(item => { routerList.map(item => {
const children = [] const children = []
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</ul> </ul>
<template v-slot:reference> <template v-slot:reference>
<span class="user-info flex right"> <span class="user-info flex right">
<span v-if="userData.info">{{ userData.info.username }}</span> <span v-if="userData.info">{{ userData.info.creater }}</span>
<i class="iconfont icon-mianxingxiala" <i class="iconfont icon-mianxingxiala"
:class="{ :class="{
'expand': showInfo, 'expand': showInfo,
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<script lang="ts"> <script lang="ts">
import { Vue, Prop, Component, Watch } from 'vue-property-decorator' import { Vue, Prop, Component, Watch } from 'vue-property-decorator'
import { getUser, removeUser } from '@/utils/user' import { getUser, removeUser } from '@/utils/user'
import { logoutApi } from '@/axios'
import Dialog from '@/helpers/dialog' import Dialog from '@/helpers/dialog'
import seetaPopover from '@/components/seeta-ui/seeta-popover.vue' import seetaPopover from '@/components/seeta-ui/seeta-popover.vue'
...@@ -47,13 +48,14 @@ export default class userInfo extends Vue { ...@@ -47,13 +48,14 @@ export default class userInfo extends Vue {
} }
toPersonal() { toPersonal() {
const routeUrl = this.$router.resolve({ name: 'personal' }) // const routeUrl = this.$router.resolve({ name: 'personal' })
window.open(routeUrl.href, '_blank') // window.open(routeUrl.href, '_blank')
// this.$router.push({ name: 'personal' }) this.$router.push({ name: 'personal' })
} }
async logout() { async logout() {
removeUser() removeUser()
const res = await logoutApi()
this.$router.replace({ name: 'login' }) this.$router.replace({ name: 'login' })
} }
......
...@@ -30,13 +30,13 @@ VueRouter.prototype.push = function push(location) { ...@@ -30,13 +30,13 @@ VueRouter.prototype.push = function push(location) {
// 取消转圈圈 // 取消转圈圈
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
// if ((!browserStorage.getItem('id') || !browserStorage.getItem('userId')) && to.path !== '/login' && to.path !== '/register') { if (!browserStorage.getItem('token') && to.path !== '/login' && to.path !== '/register') {
// notificationError('提示', 'token无效或过期') notificationError('提示', 'token无效或过期')
// next({ name: 'login' }) next({ name: 'login' })
// return return
// } }
// NProgress.start() NProgress.start()
// store.commit('CHNAGE_BREADCRUMB', to.path) store.commit('CHNAGE_BREADCRUMB', to.path)
next() next()
}) })
router.afterEach((to, from) => { router.afterEach((to, from) => {
......
export default [ export default [
{ {
path: '/', path: '/',
redirect: '/device' redirect: '/login'
}, },
{ {
path: '/login', path: '/login',
...@@ -16,7 +16,7 @@ export default [ ...@@ -16,7 +16,7 @@ export default [
{ {
path: '/device', path: '/device',
name: 'device', name: 'device',
meta: { title: '设备列表', icon: 'icon-yingyongguanli' }, meta: { title: '设备列表', icon: 'icon-shebei' },
component: () => import('@layouts/basicLayout'), component: () => import('@layouts/basicLayout'),
children: [{ children: [{
path: '/device', path: '/device',
...@@ -38,7 +38,7 @@ export default [ ...@@ -38,7 +38,7 @@ export default [
{ {
path: '/service', path: '/service',
name: 'service', name: 'service',
meta: { title: '服务列表', icon: 'icon-jiankongzhongxin' }, meta: { title: '服务列表', icon: 'icon-fuwu' },
component: () => import('@layouts/basicLayout'), component: () => import('@layouts/basicLayout'),
children: [{ children: [{
path: '/service', path: '/service',
...@@ -50,31 +50,51 @@ export default [ ...@@ -50,31 +50,51 @@ export default [
{ {
path: '/params', path: '/params',
name: 'params', name: 'params',
meta: { title: '参数模板', icon: 'icon-shebeiguanli' }, meta: { title: '参数模板', icon: 'icon-canshumoban' },
component: () => import('@layouts/basicLayout'), component: () => import('@layouts/basicLayout'),
children: [{ children: [{
path: '/params', path: '/params',
name: 'params', name: 'params',
meta: { title: '参数模板' }, meta: { title: '参数模板' },
component: () => import('@views/ParamsModel') component: () => import('@views/ParamsModel')
}, {
path: '/params/edit',
name: 'params',
meta: { title: '编辑' },
component: () => import('@views/ParamsModel/edit')
}, {
path: '/params/detail',
name: 'params',
meta: { title: '详情' },
component: () => import('@views/ParamsModel/detail')
}, {
path: '/params/add',
name: 'params',
meta: { title: '添加' },
component: () => import('@views/ParamsModel/add')
}] }]
}, },
{ {
path: '/data', path: '/data',
name: 'data', name: 'data',
meta: { title: '数据列表', icon: 'icon-OTA' }, meta: { title: '数据列表', icon: 'icon-shuju' },
component: () => import('@layouts/basicLayout'), component: () => import('@layouts/basicLayout'),
children: [{ children: [{
path: '/data', path: '/data',
name: 'data', name: 'data',
meta: { title: '数据列表' }, meta: { title: '数据列表' },
component: () => import('@views/DataList') component: () => import('@views/DataList')
}, {
path: '/data/edit',
name: 'data',
meta: { title: '编辑' },
component: () => import('@views/DataList/edit')
}] }]
}, },
{ {
path: '/apply', path: '/apply',
name: 'apply', name: 'apply',
meta: { title: '应用中心', icon: 'icon-wendanggongju' }, meta: { title: '应用中心', icon: 'icon-yingyong' },
component: () => import('@layouts/basicLayout'), component: () => import('@layouts/basicLayout'),
children: [{ children: [{
path: '/apply', path: '/apply',
...@@ -86,7 +106,7 @@ export default [ ...@@ -86,7 +106,7 @@ export default [
{ {
path: '/setting', path: '/setting',
name: 'setting', name: 'setting',
meta: { title: '设置中心', icon: 'icon-wendanggongju' }, meta: { title: '设置中心', icon: 'icon-shebeiguanli' },
component: () => import('@layouts/basicLayout'), component: () => import('@layouts/basicLayout'),
children: [{ children: [{
path: '/setting', path: '/setting',
...@@ -98,7 +118,7 @@ export default [ ...@@ -98,7 +118,7 @@ export default [
{ {
path: '/account', path: '/account',
name: 'account', name: 'account',
meta: { title: '账户中心', icon: 'icon-wendanggongju' }, meta: { title: '账户中心', icon: 'icon-qianbao1' },
component: () => import('@layouts/basicLayout'), component: () => import('@layouts/basicLayout'),
children: [{ children: [{
path: '/account', path: '/account',
...@@ -107,6 +127,18 @@ export default [ ...@@ -107,6 +127,18 @@ export default [
component: () => import('@views/Account') component: () => import('@views/Account')
}] }]
}, },
{
path: '/personal',
name: 'personal',
meta: { title: '个人中心', icon: 'icon-wendanggongju', hidden: true },
component: () => import('@layouts/basicLayout'),
children: [{
path: '/personal',
name: 'personal',
meta: { title: '个人中心' },
component: () => import('@views/PersonInfo')
}]
},
// 匹配不到,展示404 // 匹配不到,展示404
{ {
path: '/*', path: '/*',
......
...@@ -3,7 +3,9 @@ import browserStorage from '@/services/local-storage' ...@@ -3,7 +3,9 @@ import browserStorage from '@/services/local-storage'
const state = () => ({ const state = () => ({
lang: browserStorage.getItem('lang') || 'zh-CN', lang: browserStorage.getItem('lang') || 'zh-CN',
routerStatus: 0, routerStatus: 0,
currentProduct: {} currentProduct: {},
currentDevice: '',
currentService: {},
}) })
const mutations = { const mutations = {
...@@ -16,6 +18,12 @@ const mutations = { ...@@ -16,6 +18,12 @@ const mutations = {
}, },
changeCurrentProduct(state, item) { changeCurrentProduct(state, item) {
state.currentProduct = JSON.parse(JSON.stringify(item)) state.currentProduct = JSON.parse(JSON.stringify(item))
},
changeCurrentDevice(state, item) {
state.currentDevice = item
},
changeCurrentService(state, item) {
state.currentService = JSON.parse(JSON.stringify(item))
} }
} }
...@@ -26,7 +34,9 @@ const actions = { ...@@ -26,7 +34,9 @@ const actions = {
const getters = { const getters = {
lang: state => state.lang, lang: state => state.lang,
routerStatus: state => state.routerStatus, routerStatus: state => state.routerStatus,
currentProduct: state => state.currentProduct currentProduct: state => state.currentProduct,
currentDevice: state => state.currentDevice,
currentService: state => state.currentService
} }
export default { export default {
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2598158 */ font-family: "iconfont"; /* Project id 2741238 */
src: url('iconfont.woff2?t=1623308852405') format('woff2'), src: url('iconfont.woff2?t=1628763203270') format('woff2'),
url('iconfont.woff?t=1623308852405') format('woff'), url('iconfont.woff?t=1628763203270') format('woff'),
url('iconfont.ttf?t=1623308852405') format('truetype'); url('iconfont.ttf?t=1628763203270') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,64 +13,84 @@ ...@@ -13,64 +13,84 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-tupianzhanshi:before { .icon-shuju:before {
content: "\e786"; content: "\e60c";
} }
.icon-liebiaozhanshi:before { .icon-fuwu:before {
content: "\e78d"; content: "\e6c7";
} }
.icon-duihao:before { .icon-shebei:before {
content: "\e77f"; content: "\e874";
} }
.icon-guanbi:before { .icon-canshumoban:before {
content: "\e780"; content: "\e78e";
} }
.icon-shanchu:before { .icon-yingyong:before {
content: "\e781"; content: "\e693";
} }
.icon-shangchuan:before { .icon-qianbao1:before {
content: "\e782"; content: "\e621";
} }
.icon-fuzhi:before { .icon-guanyuwomen:before {
content: "\e783"; content: "\e76e";
} }
.icon-fanhui:before { .icon-caidanzhankai:before {
content: "\e784"; content: "\e76f";
} }
.icon-right1:before { .icon-chanpinwendang:before {
content: "\e785"; content: "\e770";
} }
.icon-xiazai:before { .icon-caidanshouqi:before {
content: "\e787"; content: "\e771";
} }
.icon-fujian:before { .icon-yingyongguanli:before {
content: "\e788"; content: "\e772";
} }
.icon-riqi:before { .icon-wendanggongju:before {
content: "\e789"; content: "\e773";
} }
.icon-sousuo:before { .icon-OTA:before {
content: "\e78a"; content: "\e774";
} }
.icon-left:before { .icon-jiankongzhongxin:before {
content: "\e78b"; content: "\e775";
} }
.icon-tianjia:before { .icon-shebeiguanli:before {
content: "\e78c"; content: "\e776";
}
.icon-mianxingxiala:before {
content: "\e777";
}
.icon-mianxingshangla:before {
content: "\e778";
}
.icon-unfold:before {
content: "\e779";
}
.icon-right:before {
content: "\e77a";
}
.icon-fold:before {
content: "\e77b";
} }
.icon-jinggao:before { .icon-jinggao:before {
...@@ -85,59 +105,63 @@ ...@@ -85,59 +105,63 @@
content: "\e77e"; content: "\e77e";
} }
.icon-mianxingxiala:before { .icon-duihao:before {
content: "\e777"; content: "\e77f";
} }
.icon-mianxingshangla:before { .icon-guanbi:before {
content: "\e778"; content: "\e780";
} }
.icon-unfold:before { .icon-shanchu:before {
content: "\e779"; content: "\e781";
} }
.icon-right:before { .icon-shangchuan:before {
content: "\e77a"; content: "\e782";
} }
.icon-fold:before { .icon-fuzhi:before {
content: "\e77b"; content: "\e783";
} }
.icon-guanyuwomen:before { .icon-fanhui:before {
content: "\e76e"; content: "\e784";
} }
.icon-caidanzhankai:before { .icon-right1:before {
content: "\e76f"; content: "\e785";
} }
.icon-chanpinwendang:before { .icon-xiazai:before {
content: "\e770"; content: "\e787";
} }
.icon-caidanshouqi:before { .icon-fujian:before {
content: "\e771"; content: "\e788";
} }
.icon-yingyongguanli:before { .icon-riqi:before {
content: "\e772"; content: "\e789";
} }
.icon-wendanggongju:before { .icon-sousuo:before {
content: "\e773"; content: "\e78a";
} }
.icon-OTA:before { .icon-left:before {
content: "\e774"; content: "\e78b";
} }
.icon-jiankongzhongxin:before { .icon-tianjia:before {
content: "\e775"; content: "\e78c";
} }
.icon-shebeiguanli:before { .icon-tupianzhanshi:before {
content: "\e776"; content: "\e786";
}
.icon-liebiaozhanshi:before {
content: "\e78d";
} }
!function(a){var h,l,o,i,t,e,n='<svg><symbol id="icon-tupianzhanshi" viewBox="0 0 1024 1024"><path d="M928 576a96 96 0 0 1 96 96v256a96 96 0 0 1-96 96h-256A96 96 0 0 1 576 928v-256A96 96 0 0 1 672 576z m-576 0A96 96 0 0 1 448 672v256A96 96 0 0 1 352 1024h-256A96 96 0 0 1 0 928v-256A96 96 0 0 1 96 576z m576 64h-256a32 32 0 0 0-32 32v256a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32v-256a32 32 0 0 0-32-32z m-576 0h-256a32 32 0 0 0-32 32v256a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32v-256a32 32 0 0 0-32-32z m0-640A96 96 0 0 1 448 96v256A96 96 0 0 1 352 448h-256A96 96 0 0 1 0 352v-256A96 96 0 0 1 96 0z m576 0A96 96 0 0 1 1024 96v256A96 96 0 0 1 928 448h-256A96 96 0 0 1 576 352v-256A96 96 0 0 1 672 0z m-576 64h-256a32 32 0 0 0-32 32v256a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32v-256a32 32 0 0 0-32-32z m576 0h-256a32 32 0 0 0-32 32v256a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32v-256a32 32 0 0 0-32-32z" ></path></symbol><symbol id="icon-liebiaozhanshi" viewBox="0 0 1170 1024"><path d="M1133.714286 950.857143a36.571429 36.571429 0 0 1 0 73.142857H36.571429a36.571429 36.571429 0 0 1 0-73.142857h1097.142857z m0-475.428572a36.571429 36.571429 0 0 1 0 73.142858H36.571429a36.571429 36.571429 0 0 1 0-73.142858h1097.142857z m0-475.428571a36.571429 36.571429 0 0 1 0 73.142857H36.571429a36.571429 36.571429 0 0 1 0-73.142857h1097.142857z" ></path></symbol><symbol id="icon-duihao" viewBox="0 0 1464 1024"><path d="M1314.187609 25.878835a87.72982 87.72982 0 0 1 133.787974 112.586601l-10.235145 12.135959-852.002765 843.668431a102.351456 102.351456 0 0 1-125.161209 14.91407l-12.720824-9.065415L33.03981 652.562179a87.72982 87.72982 0 0 1 99.719562-143.730688l13.013256 9.065415 363.640102 304.56869L1314.187609 25.732618z" ></path></symbol><symbol id="icon-guanbi" viewBox="0 0 1024 1024"><path d="M1006.01344 18.0224a61.44 61.44 0 0 1 0 86.8352L598.66624 512l407.2448 407.2448a61.44 61.44 0 0 1-86.8352 86.8352L511.83104 598.7328 104.89344 1005.7728a61.44 61.44 0 1 1-86.8352-86.9376L424.99584 512 18.26304 105.2672a61.44 61.44 0 0 1 86.8352-86.9376l406.7328 406.7328L919.07584 18.0224a61.44 61.44 0 0 1 86.9376 0z" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1026 1024"><path d="M121.479021 14.714262l10.727288 8.939406L512.003351 403.45071 891.800394 23.653668a76.623479 76.623479 0 0 1 117.489334 97.822641l-8.939406 10.599581L620.553279 512.000639l379.797043 379.924748a76.623479 76.623479 0 0 1-97.822641 117.361628l-10.727287-8.939406L512.003351 620.550567 132.206309 1000.347609a76.623479 76.623479 0 0 1-117.489334-97.822641l8.939405-10.599581L403.453423 512.000639 23.65638 132.07589A76.623479 76.623479 0 0 1 121.479021 14.714262z" ></path></symbol><symbol id="icon-shangchuan" viewBox="0 0 1024 1024"><path d="M972.8 503.381333a51.2 51.2 0 0 1 50.517333 42.922667l0.682667 8.277333V930.133333a93.866667 93.866667 0 0 1-83.626667 93.354667L930.133333 1024H93.866667a93.866667 93.866667 0 0 1-93.354667-83.626667L0 930.133333V554.581333a51.2 51.2 0 0 1 101.717333-8.277333l0.682667 8.277333v366.933334h819.2V554.666667a51.2 51.2 0 0 1 42.922667-50.517334l8.277333-0.682666zM545.28 8.789333l8.533333 5.717334 202.837334 158.378666a51.2 51.2 0 0 1-56.064 85.333334l-6.997334-4.608-130.645333-102.144v445.781333a51.2 51.2 0 0 1-101.632 8.277333L460.629333 597.333333l-0.085333-445.781333-130.56 102.144a51.2 51.2 0 0 1-66.218667-2.730667l-5.632-6.144a51.2 51.2 0 0 1 2.730667-66.218666l6.144-5.632L469.76 14.506667A68.266667 68.266667 0 0 1 545.28 8.789333z" ></path></symbol><symbol id="icon-fuzhi" viewBox="0 0 1024 1024"><path d="M673.962667 256.426667a93.866667 93.866667 0 0 1 93.866666 93.866666V930.133333A93.866667 93.866667 0 0 1 674.048 1024H93.866667A93.866667 93.866667 0 0 1 0 930.133333V350.293333a93.866667 93.866667 0 0 1 93.866667-93.952z m-8.533334 102.4H102.4v562.602666h563.029333V358.912zM930.133333 0a93.866667 93.866667 0 0 1 93.354667 83.626667L1024 93.866667v589.141333a93.866667 93.866667 0 0 1-83.626667 93.44l-10.24 0.512h-34.389333a51.2 51.2 0 0 1-8.362667-101.802667l8.362667-0.682666h25.770667V102.4H358.4l0.085333 25.685333a51.2 51.2 0 0 1-42.922666 50.602667l-8.277334 0.597333a51.2 51.2 0 0 1-50.517333-42.922666L256 128.085333v-34.133333A93.866667 93.866667 0 0 1 339.626667 0.512L349.952 0H930.133333z" ></path></symbol><symbol id="icon-fanhui" viewBox="0 0 1024 1024"><path d="M770.549646 10.975569a51.180082 51.180082 0 0 1 68.496011 75.746522l-6.226911 5.544509-548.821083 419.676675 548.821083 420.188477a51.180082 51.180082 0 0 1 14.074523 64.828104l-4.520907 6.909312a51.180082 51.180082 0 0 1-64.828105 14.074522l-6.994611-4.520907L204.071434 579.927485a85.300137 85.300137 0 0 1-8.103513-128.547307l8.103513-7.079912L770.549646 10.975569z" ></path></symbol><symbol id="icon-right1" viewBox="0 0 1024 1024"><path d="M256 0l512 512-512 512z" ></path></symbol><symbol id="icon-xiazai" viewBox="0 0 1024 1024"><path d="M972.8 512.256a51.2 51.2 0 0 1 50.517333 42.922667l0.682667 8.362666v323.84c0 71.253333-54.613333 129.706667-124.16 136.021334L887.466667 1024H136.533333a136.533333 136.533333 0 0 1-135.936-124.16L0 887.381333V563.541333a51.2 51.2 0 0 1 101.717333-8.362666l0.682667 8.362666v323.84a34.133333 34.133333 0 0 0 27.306667 33.450667l6.826666 0.682667h750.933334a34.133333 34.133333 0 0 0 33.450666-27.306667l0.682667-6.826667V563.541333a51.2 51.2 0 0 1 51.2-51.2zM512 0a51.2 51.2 0 0 1 50.602667 42.922667L563.2 51.2 563.2 633.173333l165.973333-186.368a51.2 51.2 0 0 1 82.005334 60.757334l-5.461334 7.424-223.573333 251.221333c-3.669333 4.010667-3.669333 4.010667-7.68 7.68a93.866667 93.866667 0 0 1-124.757333 0.170667l-7.765334-7.765334-223.914666-251.306666a51.2 51.2 0 0 1 69.717333-74.496l6.741333 6.314666L460.8 633.344V51.2A51.2 51.2 0 0 1 512 0z" ></path></symbol><symbol id="icon-fujian" viewBox="0 0 1024 1024"><path d="M329.376183 1024c-133.12 0-253.147429-83.456-304.201143-211.309714-50.980571-127.926857-23.04-275.163429 70.948571-373.248L512.013897 11.556571a37.156571 37.156571 0 0 1 53.76 0 38.546286 38.546286 0 0 1 0 55.296L149.883611 495.323429c-98.962286 104.009143-98.084571 271.725714 1.828572 374.637714A247.808 247.808 0 0 0 512.013897 867.986286l391.753143-406.454857a177.737143 177.737143 0 0 0 48.420571-122.221715 175.250286 175.250286 0 0 0-48.420571-122.002285 159.012571 159.012571 0 0 0-117.540571-50.468572 160.987429 160.987429 0 0 0-122.660572 49.590857L273.348754 623.908571a85.065143 85.065143 0 0 0 0 115.785143c14.482286 15.506286 34.816 24.137143 56.027429 23.698286 20.992 0.219429 41.106286-8.338286 55.369143-23.698286l412.16-428.470857a37.010286 37.010286 0 0 1 53.76 0 40.667429 40.667429 0 0 1 0 55.954286l-414.427429 428.470857a152.137143 152.137143 0 0 1-109.056 46.518857c-63.268571 2.194286-121.197714-36.864-145.188571-97.865143a162.011429 162.011429 0 0 1 37.595428-175.542857l391.533715-407.405714a235.52 235.52 0 0 1 171.300571-73.142857c97.572571 0 185.563429 61.074286 223.012571 154.843428a258.706286 258.706286 0 0 1-51.785142 273.627429l-391.753143 407.332571a321.097143 321.097143 0 0 1-232.594286 99.986286l0.073143 0.073143z" ></path></symbol><symbol id="icon-riqi" viewBox="0 0 1024 1024"><path d="M731.428571 0a36.571429 36.571429 0 0 1 36.571429 36.571429V146.285714h146.285714A109.714286 109.714286 0 0 1 1024 256v658.285714a109.714286 109.714286 0 0 1-109.714286 109.714286h-804.571428A109.714286 109.714286 0 0 1 0 914.285714v-658.285714A109.714286 109.714286 0 0 1 109.714286 146.285714h146.285714V36.571429a36.571429 36.571429 0 0 1 73.142857 0V146.285714h365.714286V36.571429A36.571429 36.571429 0 0 1 731.428571 0z m219.428572 438.857143H73.142857v475.428571a36.571429 36.571429 0 0 0 36.571429 36.571429h804.571428a36.571429 36.571429 0 0 0 36.571429-36.571429V438.857143z m-658.285714 365.714286a36.571429 36.571429 0 0 1 0 73.142857H219.428571a36.571429 36.571429 0 0 1 0-73.142857h73.142858z m256 0a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858z m256 0a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM292.571429 658.285714a36.571429 36.571429 0 0 1 0 73.142857H219.428571a36.571429 36.571429 0 0 1 0-73.142857h73.142858z m256 0a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM804.571429 658.285714a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM292.571429 512a36.571429 36.571429 0 0 1 0 73.142857H219.428571a36.571429 36.571429 0 0 1 0-73.142857h73.142858z m256 0a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM804.571429 512a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM256 219.428571h-146.285714a36.571429 36.571429 0 0 0-36.571429 36.571429V365.714286h877.714286V256a36.571429 36.571429 0 0 0-36.571429-36.571429h-146.285714v36.571429a36.571429 36.571429 0 0 1-73.142857 0V219.428571h-365.714286v36.571429a36.571429 36.571429 0 0 1-73.142857 0V219.428571z" ></path></symbol><symbol id="icon-sousuo" viewBox="0 0 1024 1024"><path d="M475.424836 0a475.424836 475.424836 0 0 1 351.375525 795.714891l184.90369 164.350708a36.571141 36.571141 0 0 1-48.566476 54.710428l-189.877365-168.739246A475.424836 475.424836 0 1 1 475.424836 0z m0 73.142282a402.282553 402.282553 0 1 0 0 804.565107 402.282553 402.282553 0 0 0 0-804.565107z" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M768 0L256 512l512 512z" ></path></symbol><symbol id="icon-tianjia" viewBox="0 0 1024 1024"><path d="M511.914669 0a51.198421 51.198421 0 0 1 50.515776 42.836013L563.198421 51.198421l-0.08533 409.587371h409.587371a51.198421 51.198421 0 0 1 8.277078 101.714198l-8.277078 0.682645-409.587371-0.085331V972.770006a51.198421 51.198421 0 0 1-101.628867 8.362409l-0.682645-8.362409L460.630917 563.182635H51.214208a51.198421 51.198421 0 0 1-8.277079-101.543536L51.214208 460.785792h409.416709V51.198421a51.198421 51.198421 0 0 1 51.198422-51.198421z" ></path></symbol><symbol id="icon-jinggao" viewBox="0 0 1024 1024"><path d="M512 0c282.763636 0 512 229.236364 512 512s-229.236364 512-512 512S0 794.763636 0 512 229.236364 0 512 0z m0 698.181818a46.545455 46.545455 0 1 0 0 93.090909 46.545455 46.545455 0 0 0 0-93.090909z m0-465.454545a46.545455 46.545455 0 0 0-46.545455 46.545454v279.272728a46.545455 46.545455 0 1 0 93.09091 0V279.272727a46.545455 46.545455 0 0 0-46.545455-46.545454z" ></path></symbol><symbol id="icon-cuowu" viewBox="0 0 1024 1024"><path d="M512 0c282.763636 0 512 229.236364 512 512s-229.236364 512-512 512S0 794.763636 0 512 229.236364 0 512 0zM400.896 335.592727a46.545455 46.545455 0 0 0-61.44 69.678546L446.138182 512l-106.682182 106.728727-3.863273 4.375273a46.545455 46.545455 0 0 0 69.678546 61.44L512 577.861818l106.728727 106.682182 4.375273 3.863273a46.545455 46.545455 0 0 0 61.44-69.678546L577.861818 512l106.682182-106.728727 3.863273-4.375273a46.545455 46.545455 0 0 0-69.678546-61.44L512 446.138182 405.271273 339.456z" ></path></symbol><symbol id="icon-zhengque" viewBox="0 0 1024 1024"><path d="M512 0c282.763636 0 512 229.236364 512 512s-229.236364 512-512 512S0 794.763636 0 512 229.236364 0 512 0z m265.634909 339.316364a46.917818 46.917818 0 0 0-65.815273 0L442.181818 606.021818l-106.728727-105.565091-4.375273-3.863272a46.917818 46.917818 0 0 0-61.44 3.863272 45.707636 45.707636 0 0 0 0 65.117091l106.728727 105.565091 5.911273 5.399273a93.835636 93.835636 0 0 0 125.719273-5.399273l269.637818-266.752 3.863273-4.328727a45.707636 45.707636 0 0 0-3.863273-60.788364z" ></path></symbol><symbol id="icon-mianxingxiala" viewBox="0 0 2048 1024"><path d="M516.04022194 302.92563864l503.48205605 503.48205604 503.48205604-503.48205605z" ></path></symbol><symbol id="icon-mianxingshangla" viewBox="0 0 2048 1024"><path d="M1039.65213909 174.92563866L536.17008305 678.4076947h1006.96411209z" ></path></symbol><symbol id="icon-unfold" viewBox="0 0 1639 1024"><path d="M1050.0755654 334.35931574a46.66864151 46.66864151 0 0 1 76.45879113 52.89112714l-4.82242607 6.8447342-234.74326783 281.56747137a85.55917654 85.55917654 0 0 1-124.60527286 7.31142033l-6.84473418-7.31142033L520.93095017 394.09517708A46.66864151 46.66864151 0 0 1 586.73373472 328.37017354l5.91136154 5.9891422L821.2436591 608.77092844 1050.0755654 334.35931574z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M389.6208716 315.73265759a31.21704903 31.21704903 0 0 1 39.30651646-7.10421218l4.66700075 3.21504497 187.56157129 156.60380025c24.21654772 20.22366963 27.43159268 56.21143025 7.15606762 80.37612252l-3.42246711 3.73360051-3.78545594 3.42246711L433.54253338 712.16843634a31.21704903 31.21704903 0 0 1-43.92166178-3.94102265 31.11333774 31.11333774 0 0 1 0-39.82507242l3.94102265-3.99287849 182.79085928-152.24793251L393.51003882 359.55060811A31.11333774 31.11333774 0 0 1 386.40582664 320.3478025L389.6208716 315.73265759z" ></path></symbol><symbol id="icon-fold" viewBox="0 0 1637 1024"><path d="M756.090845 348.32879171A85.45763938 85.45763938 0 0 1 876.46247887 337.36470901l5.67643998 5.20988337 5.20988374 5.75419933 234.67803047 281.48922205a46.65567203 46.65567203 0 0 1-65.70673797 65.78449772l-5.90971847-5.98747823L821.79758298 415.12416243l-228.61279327 274.49087082a46.65567203 46.65567203 0 0 1-58.70838749 10.80856434l-6.99835087-4.82108611a46.65567203 46.65567203 0 0 1-10.73080458-58.78614687l4.82108611-6.92059148L756.090845 348.32879171z" ></path></symbol><symbol id="icon-guanyuwomen" viewBox="0 0 1024 1024"><path d="M510.942633 0a283.857018 283.857018 0 0 1 145.107707 527.860511c194.498829 48.823407 317.238603 203.752568 365.323983 460.416083a28.385702 28.385702 0 1 1-55.749519 10.445939C911.181028 708.734203 761.418065 567.714036 510.942633 567.714036c-250.475433 0-400.238396 141.020167-454.682172 431.008497a28.385702 28.385702 0 0 1-55.749518-10.445939c48.085379-256.663516 170.825154-411.592676 365.323982-460.472855A283.857018 283.857018 0 0 1 510.942633 0z m0 56.771404a227.085614 227.085614 0 1 0 0 454.171229 227.085614 227.085614 0 0 0 0-454.171229z" ></path></symbol><symbol id="icon-caidanzhankai" viewBox="0 0 1024 1024"><path d="M995.555556 967.111111a28.444444 28.444444 0 0 1 0 56.888889H28.444444a28.444444 28.444444 0 0 1 0-56.888889h967.111112zM6.485333 320.568889a28.444444 28.444444 0 0 1 39.196445-8.988445l282.168889 176.64a28.444444 28.444444 0 0 1-0.056889 48.241778l-282.168889 175.843556a28.444444 28.444444 0 0 1-43.52-24.120889V335.701333a28.444444 28.444444 0 0 1 4.380444-15.132444zM995.555556 654.222222a28.444444 28.444444 0 0 1 0 56.888889h-512a28.444444 28.444444 0 0 1 0-56.888889h512z m0-341.333333a28.444444 28.444444 0 0 1 0 56.888889h-512a28.444444 28.444444 0 0 1 0-56.888889h512z m0-312.888889a28.444444 28.444444 0 0 1 0 56.888889H28.444444a28.444444 28.444444 0 0 1 0-56.888889h967.111112z" ></path></symbol><symbol id="icon-chanpinwendang" viewBox="0 0 1024 1024"><path d="M881.777778 0a85.333333 85.333333 0 0 1 84.935111 77.141333L967.111111 85.333333V625.777778c27.591111 0 51.086222 19.797333 56.32 49.208889L1024 682.666667v256c0 43.406222-32.597333 79.815111-77.084444 84.878222L938.666667 1024h-853.333334a85.674667 85.674667 0 0 1-84.878222-77.084444L0 938.666667V682.666667c0-27.591111 19.797333-51.086222 49.208889-56.32L56.888889 625.777778V85.333333A85.333333 85.333333 0 0 1 134.030222 0.398222L142.222222 0h739.555556z m85.276444 682.609778L702.805333 682.666667l-2.161777 7.054222a199.281778 199.281778 0 0 1-177.834667 134.826667L512 824.888889a199.224889 199.224889 0 0 1-188.643556-135.168L321.137778 682.666667l-261.688889-0.113778L56.888889 682.666667v254.350222l0.170667 5.006222A28.444444 28.444444 0 0 0 85.333333 967.111111h851.683556l5.006222-0.170667A28.444444 28.444444 0 0 0 967.111111 938.666667l0.113778-253.44-0.170667-2.616889zM881.777778 56.888889h-739.555556a28.444444 28.444444 0 0 0-27.989333 23.324444L113.777778 85.333333V625.777778h254.008889l3.982222 23.779555a142.222222 142.222222 0 0 0 280.462222 0l3.982222-23.722666L910.222222 625.777778V85.333333a28.444444 28.444444 0 0 0-23.324444-27.989333L881.777778 56.888889z m-113.777778 341.333333a28.444444 28.444444 0 1 1 0 56.888889h-512a28.444444 28.444444 0 1 1 0-56.888889h512z m0-170.666666a28.444444 28.444444 0 1 1 0 56.888888h-512a28.444444 28.444444 0 1 1 0-56.888888h512z" ></path></symbol><symbol id="icon-caidanshouqi" viewBox="0 0 1024 1024"><path d="M995.555556 967.111111a28.444444 28.444444 0 0 1 0 56.888889H28.444444a28.444444 28.444444 0 0 1 0-56.888889h967.111112zM337.009778 320.682667A28.444444 28.444444 0 0 1 341.333333 335.758222v352.483556a28.444444 28.444444 0 0 1-43.52 24.177778L15.473778 536.120889a28.444444 28.444444 0 0 1 0-48.241778l282.339555-176.298667a28.444444 28.444444 0 0 1 39.253334 9.102223z m658.773333 333.539555c15.587556 0 28.216889 12.743111 28.216889 28.444445s-12.629333 28.444444-28.216889 28.444444H484.067556a28.330667 28.330667 0 0 1-28.216889-28.444444c0-15.701333 12.629333-28.444444 28.216889-28.444445h511.715555z m0-341.333333c15.587556 0 28.216889 12.743111 28.216889 28.444444s-12.629333 28.444444-28.216889 28.444445H484.067556a28.330667 28.330667 0 0 1-28.216889-28.444445c0-15.701333 12.629333-28.444444 28.216889-28.444444h511.715555zM995.555556 0a28.444444 28.444444 0 0 1 0 56.888889H28.444444a28.444444 28.444444 0 0 1 0-56.888889h967.111112z" ></path></symbol><symbol id="icon-yingyongguanli" viewBox="0 0 1024 1024"><path d="M369.777778 568.888889A85.333333 85.333333 0 0 1 455.111111 654.222222v284.444445A85.333333 85.333333 0 0 1 369.777778 1024h-284.444445A85.333333 85.333333 0 0 1 0 938.666667v-284.444445A85.333333 85.333333 0 0 1 85.333333 568.888889z m568.888889 0a85.333333 85.333333 0 0 1 85.333333 85.333333v284.444445a85.333333 85.333333 0 0 1-85.333333 85.333333h-284.444445a85.333333 85.333333 0 0 1-85.333333-85.333333v-284.444445a85.333333 85.333333 0 0 1 85.333333-85.333333z m-568.888889 56.888889h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v284.444445a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-284.444445a28.444444 28.444444 0 0 0-28.444444-28.444444z m568.888889 0h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v284.444445a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-284.444445a28.444444 28.444444 0 0 0-28.444444-28.444444zM369.777778 0A85.333333 85.333333 0 0 1 455.111111 85.333333v284.444445A85.333333 85.333333 0 0 1 369.777778 455.111111h-284.444445A85.333333 85.333333 0 0 1 0 369.777778v-284.444445A85.333333 85.333333 0 0 1 85.333333 0z m568.888889 0A85.333333 85.333333 0 0 1 1024 85.333333v284.444445A85.333333 85.333333 0 0 1 938.666667 455.111111h-284.444445A85.333333 85.333333 0 0 1 568.888889 369.777778v-284.444445A85.333333 85.333333 0 0 1 654.222222 0z m-568.888889 56.888889h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v284.444445a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-284.444445a28.444444 28.444444 0 0 0-28.444444-28.444444z m568.888889 0h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v284.444445a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-284.444445a28.444444 28.444444 0 0 0-28.444444-28.444444z" ></path></symbol><symbol id="icon-wendanggongju" viewBox="0 0 1024 1024"><path d="M938.666667 0a85.333333 85.333333 0 0 1 84.935111 77.141333L1024 85.333333V796.444444a85.333333 85.333333 0 0 1-77.141333 84.935112l-8.192 0.398222h-56.888889v56.888889A85.333333 85.333333 0 0 1 796.444444 1024H85.333333A85.333333 85.333333 0 0 1 0 938.666667V227.555556a85.333333 85.333333 0 0 1 85.333333-85.333334h56.888889v-56.888889A85.333333 85.333333 0 0 1 219.363556 0.398222L227.555556 0h711.111111zM796.444444 199.111111H85.333333A28.444444 28.444444 0 0 0 56.888889 227.555556v711.111111a28.444444 28.444444 0 0 0 28.444444 28.444444H796.444444a28.444444 28.444444 0 0 0 28.444445-28.444444V227.555556a28.444444 28.444444 0 0 0-28.444445-28.444445zM938.666667 56.888889H227.555556a28.444444 28.444444 0 0 0-27.989334 23.324444L199.111111 85.333333v56.888889H796.444444A85.333333 85.333333 0 0 1 881.777778 227.555556v597.333333h56.888889a28.444444 28.444444 0 0 0 27.989333-23.324445L967.111111 796.444444V85.333333a28.444444 28.444444 0 0 0-23.324444-27.989333L938.666667 56.888889z m-284.444445 682.666667a28.444444 28.444444 0 0 1 0 56.888888h-398.222222a28.444444 28.444444 0 0 1 0-56.888888h398.222222z m0-199.111112a28.444444 28.444444 0 0 1 0 56.888889h-398.222222a28.444444 28.444444 0 0 1 0-56.888889h398.222222z m0-199.111111a28.444444 28.444444 0 0 1 0 56.888889h-398.222222a28.444444 28.444444 0 0 1 0-56.888889h398.222222z" ></path></symbol><symbol id="icon-OTA" viewBox="0 0 1024 1024"><path d="M938.666667 0A85.333333 85.333333 0 0 1 1024 85.333333v853.333334a85.333333 85.333333 0 0 1-85.333333 85.333333h-853.333334A85.333333 85.333333 0 0 1 0 938.666667v-853.333334A85.333333 85.333333 0 0 1 85.333333 0z m0 56.888889h-853.333334a28.444444 28.444444 0 0 0-28.444444 28.444444v853.333334a28.444444 28.444444 0 0 0 28.444444 28.444444h853.333334a28.444444 28.444444 0 0 0 28.444444-28.444444v-853.333334a28.444444 28.444444 0 0 0-28.444444-28.444444zM246.272 369.777778c43.52 0 77.767111 14.051556 102.741333 42.211555 23.893333 26.567111 35.84 61.838222 35.84 105.927111 0 43.52-11.946667 78.734222-35.84 105.528889-24.974222 27.875556-59.164444 41.813333-102.741333 41.813334-43.52 0-77.767111-14.051556-102.741333-42.211556-23.608889-26.794667-35.441778-61.838222-35.441778-105.130667 0-43.52 11.832889-78.734222 35.441778-105.528888 24.462222-28.444444 58.652444-42.609778 102.741333-42.609778z m393.443556 5.575111v39.822222H546.531556v244.508445h-46.592V415.175111H406.755556v-39.822222h232.96z m167.651555 0l108.714667 284.330667h-49.777778l-25.884444-71.281778H721.351111l-25.884444 71.281778h-49.777778l108.714667-284.330667h52.963555z m-561.095111 35.441778c-29.184 0-52.053333 9.955556-68.494222 29.866666-15.36 18.830222-23.096889 44.600889-23.096889 77.255111 0 32.426667 7.68 58.026667 23.096889 76.856889 15.928889 19.626667 38.741333 29.468444 68.494222 29.468445 29.468444 0 52.167111-9.443556 68.096-28.273778 15.644444-18.830222 23.495111-44.885333 23.495111-78.051556 0-33.166222-7.850667-59.448889-23.495111-78.848-15.644444-18.830222-38.343111-28.273778-68.096-28.273777z m535.608889 14.734222h-1.592889l-44.999111 124.643555h91.192889l-44.600889-124.643555z" ></path></symbol><symbol id="icon-jiankongzhongxin" viewBox="0 0 1024 1024"><path d="M824.888889 967.111111a28.444444 28.444444 0 0 1 0 56.888889h-625.777778a28.444444 28.444444 0 0 1 0-56.888889h625.777778z m113.777778-967.111111A85.333333 85.333333 0 0 1 1024 85.333333v682.666667a85.333333 85.333333 0 0 1-85.333333 85.333333h-853.333334A85.333333 85.333333 0 0 1 0 768v-682.666667A85.333333 85.333333 0 0 1 85.333333 0z m0 56.888889h-853.333334a28.444444 28.444444 0 0 0-28.444444 28.444444v682.666667a28.444444 28.444444 0 0 0 28.444444 28.444444h853.333334a28.444444 28.444444 0 0 0 28.444444-28.444444v-682.666667a28.444444 28.444444 0 0 0-28.444444-28.444444zM522.808889 241.607111a34.133333 34.133333 0 0 1 19.512889 16.668445l2.048 4.892444 83.000889 248.888889 55.751111-148.593778a34.133333 34.133333 0 0 1 26.680889-21.731555L715.036444 341.333333H881.777778a28.444444 28.444444 0 0 1 5.12 56.433778L881.777778 398.222222h-150.983111l-72.760889 194.048a34.133333 34.133333 0 0 1-15.530667 17.976889l-5.632 2.446222a34.133333 34.133333 0 0 1-40.96-16.497777l-2.218667-5.12L512 345.941333l-82.488889 247.352889a34.133333 34.133333 0 0 1-12.515555 16.952889l-4.551112 2.787556a34.133333 34.133333 0 0 1-42.951111-10.524445l-2.844444-4.721778L266.808889 398.222222H142.222222a28.444444 28.444444 0 0 1-27.989333-23.324444L113.777778 369.777778a28.444444 28.444444 0 0 1 23.324444-27.989334L142.222222 341.333333h138.695111a34.133333 34.133333 0 0 1 27.704889 14.222223l2.844445 4.664888 81.464889 162.929778 86.698666-259.982222a34.133333 34.133333 0 0 1 43.178667-21.560889z" ></path></symbol><symbol id="icon-shebeiguanli" viewBox="0 0 1024 1024"><path d="M706.204113 10.974008l149.997057 84.380452c32.978883 18.536407 49.752625 56.575842 41.280464 93.421215-9.438784 40.939303-9.495644 76.363172-0.568602 106.385327 8.187861 27.463449 31.273079 48.956583 71.984941 64.706843A85.290214 85.290214 0 0 1 1023.48371 439.358324v144.140463a85.290214 85.290214 0 0 1-52.425051 78.694438 119.974902 119.974902 0 0 0-64.138242 60.612912c-14.613057 30.135876-17.626644 67.49299-8.24472 112.867384a85.233354 85.233354 0 0 1-41.678485 91.54483l-151.646001 85.290214a85.290214 85.290214 0 0 1-97.230845-9.438784c-29.112393-24.847882-60.840353-36.959093-96.377942-36.959093-35.480729 0-67.265549 12.11121-96.377942 36.959093a85.290214 85.290214 0 0 1-97.230845 9.438784l-150.736238-84.835333a85.233354 85.233354 0 0 1-41.280464-93.364355c9.950525-43.213709 8.415301-78.580718-3.695909-106.783348-11.82691-27.520309-34.855268-48.786003-70.734018-64.138241A85.290214 85.290214 0 0 1 0.001138 585.034011V440.097506a85.290214 85.290214 0 0 1 52.538772-78.751298c27.463449-11.372029 48.729142-31.6711 64.365682-61.863835 16.262001-31.443659 19.673609-68.061591 9.723084-111.047859a85.233354 85.233354 0 0 1 41.280464-93.478075L317.280735 10.974008A85.290214 85.290214 0 0 1 415.193901 21.038253C442.714211 45.033233 474.44217 56.860143 511.742424 56.860143c37.243394 0 69.028214-11.82691 96.548523-35.82189A85.290214 85.290214 0 0 1 706.204113 10.974008z m-60.499192 52.879933A198.100738 198.100738 0 0 1 511.742424 113.663426a198.100738 198.100738 0 0 1-133.962497-49.809485 28.430071 28.430071 0 0 0-32.637722-3.411609L195.77061 144.595343a28.430071 28.430071 0 0 0-13.760155 31.159359c12.907252 55.55236 8.187861 105.930446-14.613056 149.940197-21.606854 41.792205-52.879933 71.58692-93.023194 88.246942A28.430071 28.430071 0 0 0 56.861281 440.154366v144.879645c0 11.372029 6.823217 21.606854 17.228623 26.098805 48.615422 20.867672 82.674648 52.311331 100.585593 93.989816 17.285483 40.256981 19.332449 87.735201 6.823217 141.922917a28.430071 28.430071 0 0 0 13.760155 31.102498l150.793099 84.835334a28.430071 28.430071 0 0 0 32.410281-3.127308c39.233499-33.490624 84.039291-50.548667 133.280175-50.548667 49.240884 0 94.046676 17.058043 133.280175 50.548667a28.430071 28.430071 0 0 0 32.410282 3.127308l151.646001-85.290215a28.430071 28.430071 0 0 0 13.930735-30.533897c-11.77005-56.860143-7.78984-106.897069 12.736672-149.144154 19.90105-40.939303 51.344709-70.734018 93.421215-88.303802a28.430071 28.430071 0 0 0 17.456064-26.155666V439.301464a28.430071 28.430071 0 0 0-18.195246-26.496826c-56.007241-21.606854-92.284012-55.495499-105.987307-101.495355-11.94063-40.143261-11.94063-85.347075-0.398021-135.327141a28.430071 28.430071 0 0 0-13.760154-31.159358L678.342643 60.499192a28.430071 28.430071 0 0 0-32.637722 3.354749zM511.742424 284.186994a227.383712 227.383712 0 1 1-227.440572 227.326852 227.383712 227.383712 0 0 1 227.440572-227.326852z m0 56.860143a170.580429 170.580429 0 1 0-0.05686 341.047138A170.580429 170.580429 0 0 0 511.742424 340.990277z" ></path></symbol></svg>',m=(m=document.getElementsByTagName("script"))[m.length-1].getAttribute("data-injectcss");if(m&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(a){console&&console.log(a)}}function s(){t||(t=!0,o())}h=function(){var a,h,l;(l=document.createElement("div")).innerHTML=n,n=null,(h=l.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",a=h,(l=document.body).firstChild?(h=l.firstChild).parentNode.insertBefore(a,h):l.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),h()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(o=h,i=a.document,t=!1,(e=function(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(e,50)}s()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,s())})}(window); !function(a){var h,o,l,i,t,c='<svg><symbol id="icon-shuju" viewBox="0 0 1024 1024"><path d="M945.3 960.32H38.91V104.03c0-22.47 18.23-40.7 40.7-40.7s40.7 18.23 40.7 40.7v774.88H945.3c22.47 0 40.7 18.23 40.7 40.7s-18.23 40.71-40.7 40.71z" ></path><path d="M319.1 776.16c-22.47 0-40.7-18.23-40.7-40.7V493.08c0-22.47 18.23-40.7 40.7-40.7s40.7 18.23 40.7 40.7v242.38c0 22.46-18.23 40.7-40.7 40.7z m222.03 0c-22.47 0-40.7-18.23-40.7-40.7V266.04c0-22.47 18.23-40.7 40.7-40.7s40.7 18.23 40.7 40.7v469.41c0 22.47-18.23 40.71-40.7 40.71z m232.33 0c-22.47 0-40.7-18.23-40.7-40.7V338.28c0-22.47 18.23-40.7 40.7-40.7 22.47 0 40.7 18.23 40.7 40.7v397.18c0 22.46-18.23 40.7-40.7 40.7z" ></path></symbol><symbol id="icon-fuwu" viewBox="0 0 1024 1024"><path d="M357 484H127C57 484 0 427 0 357V127C0 57 57 0 127 0h230c70 0 127 57 127 127v230c0 70-57 127-127 127zM127 56c-39.1 0-71 31.9-71 71v230c0 39.1 31.9 71 71 71h230c39.1 0 71-31.9 71-71V127c0-39.1-31.9-71-71-71H127zM357 1024H127C57 1024 0 967 0 897V667c0-70 57-127 127-127h230c70 0 127 57 127 127v230c0 70-57 127-127 127zM127 596c-39.1 0-71 31.9-71 71v230c0 39.1 31.9 71 71 71h230c39.1 0 71-31.9 71-71V667c0-39.1-31.9-71-71-71H127zM996 156.6H568c-15.4 0-28-12.6-28-28s12.6-28 28-28h428c15.4 0 28 12.6 28 28s-12.6 28-28 28zM996 386H568c-15.4 0-28-12.6-28-28s12.6-28 28-28h428c15.4 0 28 12.6 28 28s-12.6 28-28 28zM996 720.6H568c-15.4 0-28-12.6-28-28s12.6-28 28-28h428c15.4 0 28 12.6 28 28s-12.6 28-28 28zM996 950H568c-15.4 0-28-12.6-28-28s12.6-28 28-28h428c15.4 0 28 12.6 28 28s-12.6 28-28 28z" ></path></symbol><symbol id="icon-shebei" viewBox="0 0 1024 1024"><path d="M852.204308 994.461538H169.668923a140.681846 140.681846 0 0 1-140.681846-140.642461V170.141538C28.987077 92.553846 92.002462 29.538462 169.629538 29.538462h682.535385c77.666462 0 140.681846 63.015385 140.681846 140.642461V853.858462c0 77.627077-63.015385 140.642462-140.642461 140.642461z m73.334154-137.846153V167.384615c0-38.006154-30.916923-68.923077-68.923077-68.923077H167.384615c-38.006154 0-68.923077 30.916923-68.923077 68.923077v689.23077c0 38.006154 30.916923 68.923077 68.923077 68.923077h689.23077c38.006154 0 68.923077-30.916923 68.923077-68.923077zM271.320615 340.755692H270.178462A33.910154 33.910154 0 0 1 236.307692 306.845538v-1.063384c0-18.747077 15.202462-33.949538 33.910154-33.949539h1.102769c18.707692 0 33.910154 15.202462 33.910154 33.949539v1.063384a33.910154 33.910154 0 0 1-33.910154 33.910154z m481.910154 0h-344.615384a34.422154 34.422154 0 1 1 0-68.923077h344.615384a34.422154 34.422154 0 1 1 0 68.923077zM271.320615 548.627692H270.178462A33.910154 33.910154 0 0 1 236.307692 514.678154v-1.063385c0-18.747077 15.202462-33.910154 33.910154-33.910154h1.102769c18.707692 0 33.910154 15.163077 33.910154 33.910154v1.063385a33.910154 33.910154 0 0 1-33.910154 33.949538z m481.910154 0h-344.615384a34.422154 34.422154 0 1 1 0-68.923077h344.615384a34.422154 34.422154 0 1 1 0 68.923077zM271.320615 752.167385H270.178462A33.910154 33.910154 0 0 1 236.307692 718.217846v-1.063384c0-18.747077 15.202462-33.910154 33.910154-33.910154h1.102769c18.707692 0 33.910154 15.163077 33.910154 33.910154v1.063384a33.910154 33.910154 0 0 1-33.910154 33.949539z m481.910154 0h-344.615384a34.422154 34.422154 0 1 1 0-68.923077h344.615384a34.422154 34.422154 0 1 1 0 68.923077z" ></path></symbol><symbol id="icon-canshumoban" viewBox="0 0 1024 1024"><path d="M369.777778 455.111111A85.333333 85.333333 0 0 1 455.111111 540.444444v398.222223A85.333333 85.333333 0 0 1 369.777778 1024h-284.444445A85.333333 85.333333 0 0 1 0 938.666667v-398.222223A85.333333 85.333333 0 0 1 85.333333 455.111111z m568.888889 170.666667a85.333333 85.333333 0 0 1 85.333333 85.333333v227.555556a85.333333 85.333333 0 0 1-85.333333 85.333333h-284.444445a85.333333 85.333333 0 0 1-85.333333-85.333333v-227.555556a85.333333 85.333333 0 0 1 85.333333-85.333333z m-568.888889-113.777778h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v398.222223a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-398.222223a28.444444 28.444444 0 0 0-28.444444-28.444444z m568.888889 170.666667h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v227.555556a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-227.555556a28.444444 28.444444 0 0 0-28.444444-28.444444z m0-682.666667A85.333333 85.333333 0 0 1 1024 85.333333v341.333334A85.333333 85.333333 0 0 1 938.666667 512h-284.444445A85.333333 85.333333 0 0 1 568.888889 426.666667v-341.333334A85.333333 85.333333 0 0 1 654.222222 0z m0 56.888889h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v341.333334a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-341.333334a28.444444 28.444444 0 0 0-28.444444-28.444444z m-568.888889-56.888889A85.333333 85.333333 0 0 1 455.111111 85.333333v170.666667A85.333333 85.333333 0 0 1 369.777778 341.333333h-284.444445A85.333333 85.333333 0 0 1 0 256v-170.666667A85.333333 85.333333 0 0 1 85.333333 0z m0 56.888889h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v170.666667a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-170.666667a28.444444 28.444444 0 0 0-28.444444-28.444444z" ></path></symbol><symbol id="icon-yingyong" viewBox="0 0 1024 1024"><path d="M937.425 249.367L528.756 26.997a35.212 35.212 0 0 0-33.512 0l-408.67 222.37a31.418 31.418 0 0 0-16.756 27.392v444.858c0 11.311 6.423 21.714 16.757 27.392l408.669 222.488c5.166 2.77 11.03 4.212 16.756 4.212s11.59-1.443 16.756-4.212l408.67-222.488c10.333-5.678 16.756-16.058 16.756-27.392V276.76a31.418 31.418 0 0 0-16.757-27.392z m-50.292 454.051L512 907.636 136.89 703.418v-408.32L512 90.903l375.133 204.172v408.343z" ></path><path d="M238.895 349.79c-9.356 15.08-3.817 34.35 12.474 43.007l236.497 126.371V769.21c0 17.455 15.15 31.465 33.978 31.465 18.851 0 34.002-14.034 34.002-31.465V519.587L793.228 392.68c16.267-8.658 21.783-27.928 12.45-43.008-9.355-15.081-30.16-20.201-46.452-11.544l-236.94 126.65L285.37 338.13c-16.29-8.657-37.003-3.397-46.475 11.66z" ></path></symbol><symbol id="icon-qianbao1" viewBox="0 0 1024 1024"><path d="M116.70069 247.384276l570.544551-210.202483A105.931034 105.931034 0 0 1 829.793103 136.580414V247.172414h35.310345a105.931034 105.931034 0 0 1 105.931035 105.931034v70.62069a35.310345 35.310345 0 0 1-70.62069 0v-70.62069a35.310345 35.310345 0 0 0-35.310345-35.310345H123.586207a35.310345 35.310345 0 0 0-35.310345 35.310345v564.965518a35.310345 35.310345 0 0 0 35.310345 35.310344h741.517241a35.310345 35.310345 0 0 0 35.310345-35.310344v-70.62069a35.310345 35.310345 0 0 1 70.62069 0v70.62069a105.931034 105.931034 0 0 1-105.931035 105.931034H123.586207a105.931034 105.931034 0 0 1-105.931035-105.931034V353.103448a105.931034 105.931034 0 0 1 99.045518-105.719172zM321.57131 247.172414H759.172414V136.580414a35.310345 35.310345 0 0 0-47.527724-33.121104L321.57131 247.172414zM723.862069 494.344828h141.241379a141.241379 141.241379 0 1 1 0 282.482758h-141.241379a141.241379 141.241379 0 1 1 0-282.482758z m0 70.620689a70.62069 70.62069 0 1 0 0 141.24138h141.241379a70.62069 70.62069 0 1 0 0-141.24138h-141.241379z" ></path></symbol><symbol id="icon-guanyuwomen" viewBox="0 0 1024 1024"><path d="M510.942633 0a283.857018 283.857018 0 0 1 145.107707 527.860511c194.498829 48.823407 317.238603 203.752568 365.323983 460.416083a28.385702 28.385702 0 1 1-55.749519 10.445939C911.181028 708.734203 761.418065 567.714036 510.942633 567.714036c-250.475433 0-400.238396 141.020167-454.682172 431.008497a28.385702 28.385702 0 0 1-55.749518-10.445939c48.085379-256.663516 170.825154-411.592676 365.323982-460.472855A283.857018 283.857018 0 0 1 510.942633 0z m0 56.771404a227.085614 227.085614 0 1 0 0 454.171229 227.085614 227.085614 0 0 0 0-454.171229z" ></path></symbol><symbol id="icon-caidanzhankai" viewBox="0 0 1024 1024"><path d="M995.555556 967.111111a28.444444 28.444444 0 0 1 0 56.888889H28.444444a28.444444 28.444444 0 0 1 0-56.888889h967.111112zM6.485333 320.568889a28.444444 28.444444 0 0 1 39.196445-8.988445l282.168889 176.64a28.444444 28.444444 0 0 1-0.056889 48.241778l-282.168889 175.843556a28.444444 28.444444 0 0 1-43.52-24.120889V335.701333a28.444444 28.444444 0 0 1 4.380444-15.132444zM995.555556 654.222222a28.444444 28.444444 0 0 1 0 56.888889h-512a28.444444 28.444444 0 0 1 0-56.888889h512z m0-341.333333a28.444444 28.444444 0 0 1 0 56.888889h-512a28.444444 28.444444 0 0 1 0-56.888889h512z m0-312.888889a28.444444 28.444444 0 0 1 0 56.888889H28.444444a28.444444 28.444444 0 0 1 0-56.888889h967.111112z" ></path></symbol><symbol id="icon-chanpinwendang" viewBox="0 0 1024 1024"><path d="M881.777778 0a85.333333 85.333333 0 0 1 84.935111 77.141333L967.111111 85.333333V625.777778c27.591111 0 51.086222 19.797333 56.32 49.208889L1024 682.666667v256c0 43.406222-32.597333 79.815111-77.084444 84.878222L938.666667 1024h-853.333334a85.674667 85.674667 0 0 1-84.878222-77.084444L0 938.666667V682.666667c0-27.591111 19.797333-51.086222 49.208889-56.32L56.888889 625.777778V85.333333A85.333333 85.333333 0 0 1 134.030222 0.398222L142.222222 0h739.555556z m85.276444 682.609778L702.805333 682.666667l-2.161777 7.054222a199.281778 199.281778 0 0 1-177.834667 134.826667L512 824.888889a199.224889 199.224889 0 0 1-188.643556-135.168L321.137778 682.666667l-261.688889-0.113778L56.888889 682.666667v254.350222l0.170667 5.006222A28.444444 28.444444 0 0 0 85.333333 967.111111h851.683556l5.006222-0.170667A28.444444 28.444444 0 0 0 967.111111 938.666667l0.113778-253.44-0.170667-2.616889zM881.777778 56.888889h-739.555556a28.444444 28.444444 0 0 0-27.989333 23.324444L113.777778 85.333333V625.777778h254.008889l3.982222 23.779555a142.222222 142.222222 0 0 0 280.462222 0l3.982222-23.722666L910.222222 625.777778V85.333333a28.444444 28.444444 0 0 0-23.324444-27.989333L881.777778 56.888889z m-113.777778 341.333333a28.444444 28.444444 0 1 1 0 56.888889h-512a28.444444 28.444444 0 1 1 0-56.888889h512z m0-170.666666a28.444444 28.444444 0 1 1 0 56.888888h-512a28.444444 28.444444 0 1 1 0-56.888888h512z" ></path></symbol><symbol id="icon-caidanshouqi" viewBox="0 0 1024 1024"><path d="M995.555556 967.111111a28.444444 28.444444 0 0 1 0 56.888889H28.444444a28.444444 28.444444 0 0 1 0-56.888889h967.111112zM337.009778 320.682667A28.444444 28.444444 0 0 1 341.333333 335.758222v352.483556a28.444444 28.444444 0 0 1-43.52 24.177778L15.473778 536.120889a28.444444 28.444444 0 0 1 0-48.241778l282.339555-176.298667a28.444444 28.444444 0 0 1 39.253334 9.102223z m658.773333 333.539555c15.587556 0 28.216889 12.743111 28.216889 28.444445s-12.629333 28.444444-28.216889 28.444444H484.067556a28.330667 28.330667 0 0 1-28.216889-28.444444c0-15.701333 12.629333-28.444444 28.216889-28.444445h511.715555z m0-341.333333c15.587556 0 28.216889 12.743111 28.216889 28.444444s-12.629333 28.444444-28.216889 28.444445H484.067556a28.330667 28.330667 0 0 1-28.216889-28.444445c0-15.701333 12.629333-28.444444 28.216889-28.444444h511.715555zM995.555556 0a28.444444 28.444444 0 0 1 0 56.888889H28.444444a28.444444 28.444444 0 0 1 0-56.888889h967.111112z" ></path></symbol><symbol id="icon-yingyongguanli" viewBox="0 0 1024 1024"><path d="M369.777778 568.888889A85.333333 85.333333 0 0 1 455.111111 654.222222v284.444445A85.333333 85.333333 0 0 1 369.777778 1024h-284.444445A85.333333 85.333333 0 0 1 0 938.666667v-284.444445A85.333333 85.333333 0 0 1 85.333333 568.888889z m568.888889 0a85.333333 85.333333 0 0 1 85.333333 85.333333v284.444445a85.333333 85.333333 0 0 1-85.333333 85.333333h-284.444445a85.333333 85.333333 0 0 1-85.333333-85.333333v-284.444445a85.333333 85.333333 0 0 1 85.333333-85.333333z m-568.888889 56.888889h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v284.444445a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-284.444445a28.444444 28.444444 0 0 0-28.444444-28.444444z m568.888889 0h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v284.444445a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-284.444445a28.444444 28.444444 0 0 0-28.444444-28.444444zM369.777778 0A85.333333 85.333333 0 0 1 455.111111 85.333333v284.444445A85.333333 85.333333 0 0 1 369.777778 455.111111h-284.444445A85.333333 85.333333 0 0 1 0 369.777778v-284.444445A85.333333 85.333333 0 0 1 85.333333 0z m568.888889 0A85.333333 85.333333 0 0 1 1024 85.333333v284.444445A85.333333 85.333333 0 0 1 938.666667 455.111111h-284.444445A85.333333 85.333333 0 0 1 568.888889 369.777778v-284.444445A85.333333 85.333333 0 0 1 654.222222 0z m-568.888889 56.888889h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v284.444445a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-284.444445a28.444444 28.444444 0 0 0-28.444444-28.444444z m568.888889 0h-284.444445a28.444444 28.444444 0 0 0-28.444444 28.444444v284.444445a28.444444 28.444444 0 0 0 28.444444 28.444444h284.444445a28.444444 28.444444 0 0 0 28.444444-28.444444v-284.444445a28.444444 28.444444 0 0 0-28.444444-28.444444z" ></path></symbol><symbol id="icon-wendanggongju" viewBox="0 0 1024 1024"><path d="M938.666667 0a85.333333 85.333333 0 0 1 84.935111 77.141333L1024 85.333333V796.444444a85.333333 85.333333 0 0 1-77.141333 84.935112l-8.192 0.398222h-56.888889v56.888889A85.333333 85.333333 0 0 1 796.444444 1024H85.333333A85.333333 85.333333 0 0 1 0 938.666667V227.555556a85.333333 85.333333 0 0 1 85.333333-85.333334h56.888889v-56.888889A85.333333 85.333333 0 0 1 219.363556 0.398222L227.555556 0h711.111111zM796.444444 199.111111H85.333333A28.444444 28.444444 0 0 0 56.888889 227.555556v711.111111a28.444444 28.444444 0 0 0 28.444444 28.444444H796.444444a28.444444 28.444444 0 0 0 28.444445-28.444444V227.555556a28.444444 28.444444 0 0 0-28.444445-28.444445zM938.666667 56.888889H227.555556a28.444444 28.444444 0 0 0-27.989334 23.324444L199.111111 85.333333v56.888889H796.444444A85.333333 85.333333 0 0 1 881.777778 227.555556v597.333333h56.888889a28.444444 28.444444 0 0 0 27.989333-23.324445L967.111111 796.444444V85.333333a28.444444 28.444444 0 0 0-23.324444-27.989333L938.666667 56.888889z m-284.444445 682.666667a28.444444 28.444444 0 0 1 0 56.888888h-398.222222a28.444444 28.444444 0 0 1 0-56.888888h398.222222z m0-199.111112a28.444444 28.444444 0 0 1 0 56.888889h-398.222222a28.444444 28.444444 0 0 1 0-56.888889h398.222222z m0-199.111111a28.444444 28.444444 0 0 1 0 56.888889h-398.222222a28.444444 28.444444 0 0 1 0-56.888889h398.222222z" ></path></symbol><symbol id="icon-OTA" viewBox="0 0 1024 1024"><path d="M938.666667 0A85.333333 85.333333 0 0 1 1024 85.333333v853.333334a85.333333 85.333333 0 0 1-85.333333 85.333333h-853.333334A85.333333 85.333333 0 0 1 0 938.666667v-853.333334A85.333333 85.333333 0 0 1 85.333333 0z m0 56.888889h-853.333334a28.444444 28.444444 0 0 0-28.444444 28.444444v853.333334a28.444444 28.444444 0 0 0 28.444444 28.444444h853.333334a28.444444 28.444444 0 0 0 28.444444-28.444444v-853.333334a28.444444 28.444444 0 0 0-28.444444-28.444444zM246.272 369.777778c43.52 0 77.767111 14.051556 102.741333 42.211555 23.893333 26.567111 35.84 61.838222 35.84 105.927111 0 43.52-11.946667 78.734222-35.84 105.528889-24.974222 27.875556-59.164444 41.813333-102.741333 41.813334-43.52 0-77.767111-14.051556-102.741333-42.211556-23.608889-26.794667-35.441778-61.838222-35.441778-105.130667 0-43.52 11.832889-78.734222 35.441778-105.528888 24.462222-28.444444 58.652444-42.609778 102.741333-42.609778z m393.443556 5.575111v39.822222H546.531556v244.508445h-46.592V415.175111H406.755556v-39.822222h232.96z m167.651555 0l108.714667 284.330667h-49.777778l-25.884444-71.281778H721.351111l-25.884444 71.281778h-49.777778l108.714667-284.330667h52.963555z m-561.095111 35.441778c-29.184 0-52.053333 9.955556-68.494222 29.866666-15.36 18.830222-23.096889 44.600889-23.096889 77.255111 0 32.426667 7.68 58.026667 23.096889 76.856889 15.928889 19.626667 38.741333 29.468444 68.494222 29.468445 29.468444 0 52.167111-9.443556 68.096-28.273778 15.644444-18.830222 23.495111-44.885333 23.495111-78.051556 0-33.166222-7.850667-59.448889-23.495111-78.848-15.644444-18.830222-38.343111-28.273778-68.096-28.273777z m535.608889 14.734222h-1.592889l-44.999111 124.643555h91.192889l-44.600889-124.643555z" ></path></symbol><symbol id="icon-jiankongzhongxin" viewBox="0 0 1024 1024"><path d="M824.888889 967.111111a28.444444 28.444444 0 0 1 0 56.888889h-625.777778a28.444444 28.444444 0 0 1 0-56.888889h625.777778z m113.777778-967.111111A85.333333 85.333333 0 0 1 1024 85.333333v682.666667a85.333333 85.333333 0 0 1-85.333333 85.333333h-853.333334A85.333333 85.333333 0 0 1 0 768v-682.666667A85.333333 85.333333 0 0 1 85.333333 0z m0 56.888889h-853.333334a28.444444 28.444444 0 0 0-28.444444 28.444444v682.666667a28.444444 28.444444 0 0 0 28.444444 28.444444h853.333334a28.444444 28.444444 0 0 0 28.444444-28.444444v-682.666667a28.444444 28.444444 0 0 0-28.444444-28.444444zM522.808889 241.607111a34.133333 34.133333 0 0 1 19.512889 16.668445l2.048 4.892444 83.000889 248.888889 55.751111-148.593778a34.133333 34.133333 0 0 1 26.680889-21.731555L715.036444 341.333333H881.777778a28.444444 28.444444 0 0 1 5.12 56.433778L881.777778 398.222222h-150.983111l-72.760889 194.048a34.133333 34.133333 0 0 1-15.530667 17.976889l-5.632 2.446222a34.133333 34.133333 0 0 1-40.96-16.497777l-2.218667-5.12L512 345.941333l-82.488889 247.352889a34.133333 34.133333 0 0 1-12.515555 16.952889l-4.551112 2.787556a34.133333 34.133333 0 0 1-42.951111-10.524445l-2.844444-4.721778L266.808889 398.222222H142.222222a28.444444 28.444444 0 0 1-27.989333-23.324444L113.777778 369.777778a28.444444 28.444444 0 0 1 23.324444-27.989334L142.222222 341.333333h138.695111a34.133333 34.133333 0 0 1 27.704889 14.222223l2.844445 4.664888 81.464889 162.929778 86.698666-259.982222a34.133333 34.133333 0 0 1 43.178667-21.560889z" ></path></symbol><symbol id="icon-shebeiguanli" viewBox="0 0 1024 1024"><path d="M706.204113 10.974008l149.997057 84.380452c32.978883 18.536407 49.752625 56.575842 41.280464 93.421215-9.438784 40.939303-9.495644 76.363172-0.568602 106.385327 8.187861 27.463449 31.273079 48.956583 71.984941 64.706843A85.290214 85.290214 0 0 1 1023.48371 439.358324v144.140463a85.290214 85.290214 0 0 1-52.425051 78.694438 119.974902 119.974902 0 0 0-64.138242 60.612912c-14.613057 30.135876-17.626644 67.49299-8.24472 112.867384a85.233354 85.233354 0 0 1-41.678485 91.54483l-151.646001 85.290214a85.290214 85.290214 0 0 1-97.230845-9.438784c-29.112393-24.847882-60.840353-36.959093-96.377942-36.959093-35.480729 0-67.265549 12.11121-96.377942 36.959093a85.290214 85.290214 0 0 1-97.230845 9.438784l-150.736238-84.835333a85.233354 85.233354 0 0 1-41.280464-93.364355c9.950525-43.213709 8.415301-78.580718-3.695909-106.783348-11.82691-27.520309-34.855268-48.786003-70.734018-64.138241A85.290214 85.290214 0 0 1 0.001138 585.034011V440.097506a85.290214 85.290214 0 0 1 52.538772-78.751298c27.463449-11.372029 48.729142-31.6711 64.365682-61.863835 16.262001-31.443659 19.673609-68.061591 9.723084-111.047859a85.233354 85.233354 0 0 1 41.280464-93.478075L317.280735 10.974008A85.290214 85.290214 0 0 1 415.193901 21.038253C442.714211 45.033233 474.44217 56.860143 511.742424 56.860143c37.243394 0 69.028214-11.82691 96.548523-35.82189A85.290214 85.290214 0 0 1 706.204113 10.974008z m-60.499192 52.879933A198.100738 198.100738 0 0 1 511.742424 113.663426a198.100738 198.100738 0 0 1-133.962497-49.809485 28.430071 28.430071 0 0 0-32.637722-3.411609L195.77061 144.595343a28.430071 28.430071 0 0 0-13.760155 31.159359c12.907252 55.55236 8.187861 105.930446-14.613056 149.940197-21.606854 41.792205-52.879933 71.58692-93.023194 88.246942A28.430071 28.430071 0 0 0 56.861281 440.154366v144.879645c0 11.372029 6.823217 21.606854 17.228623 26.098805 48.615422 20.867672 82.674648 52.311331 100.585593 93.989816 17.285483 40.256981 19.332449 87.735201 6.823217 141.922917a28.430071 28.430071 0 0 0 13.760155 31.102498l150.793099 84.835334a28.430071 28.430071 0 0 0 32.410281-3.127308c39.233499-33.490624 84.039291-50.548667 133.280175-50.548667 49.240884 0 94.046676 17.058043 133.280175 50.548667a28.430071 28.430071 0 0 0 32.410282 3.127308l151.646001-85.290215a28.430071 28.430071 0 0 0 13.930735-30.533897c-11.77005-56.860143-7.78984-106.897069 12.736672-149.144154 19.90105-40.939303 51.344709-70.734018 93.421215-88.303802a28.430071 28.430071 0 0 0 17.456064-26.155666V439.301464a28.430071 28.430071 0 0 0-18.195246-26.496826c-56.007241-21.606854-92.284012-55.495499-105.987307-101.495355-11.94063-40.143261-11.94063-85.347075-0.398021-135.327141a28.430071 28.430071 0 0 0-13.760154-31.159358L678.342643 60.499192a28.430071 28.430071 0 0 0-32.637722 3.354749zM511.742424 284.186994a227.383712 227.383712 0 1 1-227.440572 227.326852 227.383712 227.383712 0 0 1 227.440572-227.326852z m0 56.860143a170.580429 170.580429 0 1 0-0.05686 341.047138A170.580429 170.580429 0 0 0 511.742424 340.990277z" ></path></symbol><symbol id="icon-mianxingxiala" viewBox="0 0 2048 1024"><path d="M516.04022194 302.92563864l503.48205605 503.48205604 503.48205604-503.48205605z" ></path></symbol><symbol id="icon-mianxingshangla" viewBox="0 0 2048 1024"><path d="M1039.65213909 174.92563866L536.17008305 678.4076947h1006.96411209z" ></path></symbol><symbol id="icon-unfold" viewBox="0 0 1639 1024"><path d="M1050.0755654 334.35931574a46.66864151 46.66864151 0 0 1 76.45879113 52.89112714l-4.82242607 6.8447342-234.74326783 281.56747137a85.55917654 85.55917654 0 0 1-124.60527286 7.31142033l-6.84473418-7.31142033L520.93095017 394.09517708A46.66864151 46.66864151 0 0 1 586.73373472 328.37017354l5.91136154 5.9891422L821.2436591 608.77092844 1050.0755654 334.35931574z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M389.6208716 315.73265759a31.21704903 31.21704903 0 0 1 39.30651646-7.10421218l4.66700075 3.21504497 187.56157129 156.60380025c24.21654772 20.22366963 27.43159268 56.21143025 7.15606762 80.37612252l-3.42246711 3.73360051-3.78545594 3.42246711L433.54253338 712.16843634a31.21704903 31.21704903 0 0 1-43.92166178-3.94102265 31.11333774 31.11333774 0 0 1 0-39.82507242l3.94102265-3.99287849 182.79085928-152.24793251L393.51003882 359.55060811A31.11333774 31.11333774 0 0 1 386.40582664 320.3478025L389.6208716 315.73265759z" ></path></symbol><symbol id="icon-fold" viewBox="0 0 1637 1024"><path d="M756.090845 348.32879171A85.45763938 85.45763938 0 0 1 876.46247887 337.36470901l5.67643998 5.20988337 5.20988374 5.75419933 234.67803047 281.48922205a46.65567203 46.65567203 0 0 1-65.70673797 65.78449772l-5.90971847-5.98747823L821.79758298 415.12416243l-228.61279327 274.49087082a46.65567203 46.65567203 0 0 1-58.70838749 10.80856434l-6.99835087-4.82108611a46.65567203 46.65567203 0 0 1-10.73080458-58.78614687l4.82108611-6.92059148L756.090845 348.32879171z" ></path></symbol><symbol id="icon-jinggao" viewBox="0 0 1024 1024"><path d="M512 0c282.763636 0 512 229.236364 512 512s-229.236364 512-512 512S0 794.763636 0 512 229.236364 0 512 0z m0 698.181818a46.545455 46.545455 0 1 0 0 93.090909 46.545455 46.545455 0 0 0 0-93.090909z m0-465.454545a46.545455 46.545455 0 0 0-46.545455 46.545454v279.272728a46.545455 46.545455 0 1 0 93.09091 0V279.272727a46.545455 46.545455 0 0 0-46.545455-46.545454z" ></path></symbol><symbol id="icon-cuowu" viewBox="0 0 1024 1024"><path d="M512 0c282.763636 0 512 229.236364 512 512s-229.236364 512-512 512S0 794.763636 0 512 229.236364 0 512 0zM400.896 335.592727a46.545455 46.545455 0 0 0-61.44 69.678546L446.138182 512l-106.682182 106.728727-3.863273 4.375273a46.545455 46.545455 0 0 0 69.678546 61.44L512 577.861818l106.728727 106.682182 4.375273 3.863273a46.545455 46.545455 0 0 0 61.44-69.678546L577.861818 512l106.682182-106.728727 3.863273-4.375273a46.545455 46.545455 0 0 0-69.678546-61.44L512 446.138182 405.271273 339.456z" ></path></symbol><symbol id="icon-zhengque" viewBox="0 0 1024 1024"><path d="M512 0c282.763636 0 512 229.236364 512 512s-229.236364 512-512 512S0 794.763636 0 512 229.236364 0 512 0z m265.634909 339.316364a46.917818 46.917818 0 0 0-65.815273 0L442.181818 606.021818l-106.728727-105.565091-4.375273-3.863272a46.917818 46.917818 0 0 0-61.44 3.863272 45.707636 45.707636 0 0 0 0 65.117091l106.728727 105.565091 5.911273 5.399273a93.835636 93.835636 0 0 0 125.719273-5.399273l269.637818-266.752 3.863273-4.328727a45.707636 45.707636 0 0 0-3.863273-60.788364z" ></path></symbol><symbol id="icon-duihao" viewBox="0 0 1464 1024"><path d="M1314.187609 25.878835a87.72982 87.72982 0 0 1 133.787974 112.586601l-10.235145 12.135959-852.002765 843.668431a102.351456 102.351456 0 0 1-125.161209 14.91407l-12.720824-9.065415L33.03981 652.562179a87.72982 87.72982 0 0 1 99.719562-143.730688l13.013256 9.065415 363.640102 304.56869L1314.187609 25.732618z" ></path></symbol><symbol id="icon-guanbi" viewBox="0 0 1024 1024"><path d="M1006.01344 18.0224a61.44 61.44 0 0 1 0 86.8352L598.66624 512l407.2448 407.2448a61.44 61.44 0 0 1-86.8352 86.8352L511.83104 598.7328 104.89344 1005.7728a61.44 61.44 0 1 1-86.8352-86.9376L424.99584 512 18.26304 105.2672a61.44 61.44 0 0 1 86.8352-86.9376l406.7328 406.7328L919.07584 18.0224a61.44 61.44 0 0 1 86.9376 0z" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1026 1024"><path d="M121.479021 14.714262l10.727288 8.939406L512.003351 403.45071 891.800394 23.653668a76.623479 76.623479 0 0 1 117.489334 97.822641l-8.939406 10.599581L620.553279 512.000639l379.797043 379.924748a76.623479 76.623479 0 0 1-97.822641 117.361628l-10.727287-8.939406L512.003351 620.550567 132.206309 1000.347609a76.623479 76.623479 0 0 1-117.489334-97.822641l8.939405-10.599581L403.453423 512.000639 23.65638 132.07589A76.623479 76.623479 0 0 1 121.479021 14.714262z" ></path></symbol><symbol id="icon-shangchuan" viewBox="0 0 1024 1024"><path d="M972.8 503.381333a51.2 51.2 0 0 1 50.517333 42.922667l0.682667 8.277333V930.133333a93.866667 93.866667 0 0 1-83.626667 93.354667L930.133333 1024H93.866667a93.866667 93.866667 0 0 1-93.354667-83.626667L0 930.133333V554.581333a51.2 51.2 0 0 1 101.717333-8.277333l0.682667 8.277333v366.933334h819.2V554.666667a51.2 51.2 0 0 1 42.922667-50.517334l8.277333-0.682666zM545.28 8.789333l8.533333 5.717334 202.837334 158.378666a51.2 51.2 0 0 1-56.064 85.333334l-6.997334-4.608-130.645333-102.144v445.781333a51.2 51.2 0 0 1-101.632 8.277333L460.629333 597.333333l-0.085333-445.781333-130.56 102.144a51.2 51.2 0 0 1-66.218667-2.730667l-5.632-6.144a51.2 51.2 0 0 1 2.730667-66.218666l6.144-5.632L469.76 14.506667A68.266667 68.266667 0 0 1 545.28 8.789333z" ></path></symbol><symbol id="icon-fuzhi" viewBox="0 0 1024 1024"><path d="M673.962667 256.426667a93.866667 93.866667 0 0 1 93.866666 93.866666V930.133333A93.866667 93.866667 0 0 1 674.048 1024H93.866667A93.866667 93.866667 0 0 1 0 930.133333V350.293333a93.866667 93.866667 0 0 1 93.866667-93.952z m-8.533334 102.4H102.4v562.602666h563.029333V358.912zM930.133333 0a93.866667 93.866667 0 0 1 93.354667 83.626667L1024 93.866667v589.141333a93.866667 93.866667 0 0 1-83.626667 93.44l-10.24 0.512h-34.389333a51.2 51.2 0 0 1-8.362667-101.802667l8.362667-0.682666h25.770667V102.4H358.4l0.085333 25.685333a51.2 51.2 0 0 1-42.922666 50.602667l-8.277334 0.597333a51.2 51.2 0 0 1-50.517333-42.922666L256 128.085333v-34.133333A93.866667 93.866667 0 0 1 339.626667 0.512L349.952 0H930.133333z" ></path></symbol><symbol id="icon-fanhui" viewBox="0 0 1024 1024"><path d="M770.549646 10.975569a51.180082 51.180082 0 0 1 68.496011 75.746522l-6.226911 5.544509-548.821083 419.676675 548.821083 420.188477a51.180082 51.180082 0 0 1 14.074523 64.828104l-4.520907 6.909312a51.180082 51.180082 0 0 1-64.828105 14.074522l-6.994611-4.520907L204.071434 579.927485a85.300137 85.300137 0 0 1-8.103513-128.547307l8.103513-7.079912L770.549646 10.975569z" ></path></symbol><symbol id="icon-right1" viewBox="0 0 1024 1024"><path d="M256 0l512 512-512 512z" ></path></symbol><symbol id="icon-xiazai" viewBox="0 0 1024 1024"><path d="M972.8 512.256a51.2 51.2 0 0 1 50.517333 42.922667l0.682667 8.362666v323.84c0 71.253333-54.613333 129.706667-124.16 136.021334L887.466667 1024H136.533333a136.533333 136.533333 0 0 1-135.936-124.16L0 887.381333V563.541333a51.2 51.2 0 0 1 101.717333-8.362666l0.682667 8.362666v323.84a34.133333 34.133333 0 0 0 27.306667 33.450667l6.826666 0.682667h750.933334a34.133333 34.133333 0 0 0 33.450666-27.306667l0.682667-6.826667V563.541333a51.2 51.2 0 0 1 51.2-51.2zM512 0a51.2 51.2 0 0 1 50.602667 42.922667L563.2 51.2 563.2 633.173333l165.973333-186.368a51.2 51.2 0 0 1 82.005334 60.757334l-5.461334 7.424-223.573333 251.221333c-3.669333 4.010667-3.669333 4.010667-7.68 7.68a93.866667 93.866667 0 0 1-124.757333 0.170667l-7.765334-7.765334-223.914666-251.306666a51.2 51.2 0 0 1 69.717333-74.496l6.741333 6.314666L460.8 633.344V51.2A51.2 51.2 0 0 1 512 0z" ></path></symbol><symbol id="icon-fujian" viewBox="0 0 1024 1024"><path d="M329.376183 1024c-133.12 0-253.147429-83.456-304.201143-211.309714-50.980571-127.926857-23.04-275.163429 70.948571-373.248L512.013897 11.556571a37.156571 37.156571 0 0 1 53.76 0 38.546286 38.546286 0 0 1 0 55.296L149.883611 495.323429c-98.962286 104.009143-98.084571 271.725714 1.828572 374.637714A247.808 247.808 0 0 0 512.013897 867.986286l391.753143-406.454857a177.737143 177.737143 0 0 0 48.420571-122.221715 175.250286 175.250286 0 0 0-48.420571-122.002285 159.012571 159.012571 0 0 0-117.540571-50.468572 160.987429 160.987429 0 0 0-122.660572 49.590857L273.348754 623.908571a85.065143 85.065143 0 0 0 0 115.785143c14.482286 15.506286 34.816 24.137143 56.027429 23.698286 20.992 0.219429 41.106286-8.338286 55.369143-23.698286l412.16-428.470857a37.010286 37.010286 0 0 1 53.76 0 40.667429 40.667429 0 0 1 0 55.954286l-414.427429 428.470857a152.137143 152.137143 0 0 1-109.056 46.518857c-63.268571 2.194286-121.197714-36.864-145.188571-97.865143a162.011429 162.011429 0 0 1 37.595428-175.542857l391.533715-407.405714a235.52 235.52 0 0 1 171.300571-73.142857c97.572571 0 185.563429 61.074286 223.012571 154.843428a258.706286 258.706286 0 0 1-51.785142 273.627429l-391.753143 407.332571a321.097143 321.097143 0 0 1-232.594286 99.986286l0.073143 0.073143z" ></path></symbol><symbol id="icon-riqi" viewBox="0 0 1024 1024"><path d="M731.428571 0a36.571429 36.571429 0 0 1 36.571429 36.571429V146.285714h146.285714A109.714286 109.714286 0 0 1 1024 256v658.285714a109.714286 109.714286 0 0 1-109.714286 109.714286h-804.571428A109.714286 109.714286 0 0 1 0 914.285714v-658.285714A109.714286 109.714286 0 0 1 109.714286 146.285714h146.285714V36.571429a36.571429 36.571429 0 0 1 73.142857 0V146.285714h365.714286V36.571429A36.571429 36.571429 0 0 1 731.428571 0z m219.428572 438.857143H73.142857v475.428571a36.571429 36.571429 0 0 0 36.571429 36.571429h804.571428a36.571429 36.571429 0 0 0 36.571429-36.571429V438.857143z m-658.285714 365.714286a36.571429 36.571429 0 0 1 0 73.142857H219.428571a36.571429 36.571429 0 0 1 0-73.142857h73.142858z m256 0a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858z m256 0a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM292.571429 658.285714a36.571429 36.571429 0 0 1 0 73.142857H219.428571a36.571429 36.571429 0 0 1 0-73.142857h73.142858z m256 0a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM804.571429 658.285714a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM292.571429 512a36.571429 36.571429 0 0 1 0 73.142857H219.428571a36.571429 36.571429 0 0 1 0-73.142857h73.142858z m256 0a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM804.571429 512a36.571429 36.571429 0 0 1 0 73.142857h-73.142858a36.571429 36.571429 0 0 1 0-73.142857h73.142858zM256 219.428571h-146.285714a36.571429 36.571429 0 0 0-36.571429 36.571429V365.714286h877.714286V256a36.571429 36.571429 0 0 0-36.571429-36.571429h-146.285714v36.571429a36.571429 36.571429 0 0 1-73.142857 0V219.428571h-365.714286v36.571429a36.571429 36.571429 0 0 1-73.142857 0V219.428571z" ></path></symbol><symbol id="icon-sousuo" viewBox="0 0 1024 1024"><path d="M475.424836 0a475.424836 475.424836 0 0 1 351.375525 795.714891l184.90369 164.350708a36.571141 36.571141 0 0 1-48.566476 54.710428l-189.877365-168.739246A475.424836 475.424836 0 1 1 475.424836 0z m0 73.142282a402.282553 402.282553 0 1 0 0 804.565107 402.282553 402.282553 0 0 0 0-804.565107z" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M768 0L256 512l512 512z" ></path></symbol><symbol id="icon-tianjia" viewBox="0 0 1024 1024"><path d="M511.914669 0a51.198421 51.198421 0 0 1 50.515776 42.836013L563.198421 51.198421l-0.08533 409.587371h409.587371a51.198421 51.198421 0 0 1 8.277078 101.714198l-8.277078 0.682645-409.587371-0.085331V972.770006a51.198421 51.198421 0 0 1-101.628867 8.362409l-0.682645-8.362409L460.630917 563.182635H51.214208a51.198421 51.198421 0 0 1-8.277079-101.543536L51.214208 460.785792h409.416709V51.198421a51.198421 51.198421 0 0 1 51.198422-51.198421z" ></path></symbol><symbol id="icon-tupianzhanshi" viewBox="0 0 1024 1024"><path d="M928 576a96 96 0 0 1 96 96v256a96 96 0 0 1-96 96h-256A96 96 0 0 1 576 928v-256A96 96 0 0 1 672 576z m-576 0A96 96 0 0 1 448 672v256A96 96 0 0 1 352 1024h-256A96 96 0 0 1 0 928v-256A96 96 0 0 1 96 576z m576 64h-256a32 32 0 0 0-32 32v256a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32v-256a32 32 0 0 0-32-32z m-576 0h-256a32 32 0 0 0-32 32v256a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32v-256a32 32 0 0 0-32-32z m0-640A96 96 0 0 1 448 96v256A96 96 0 0 1 352 448h-256A96 96 0 0 1 0 352v-256A96 96 0 0 1 96 0z m576 0A96 96 0 0 1 1024 96v256A96 96 0 0 1 928 448h-256A96 96 0 0 1 576 352v-256A96 96 0 0 1 672 0z m-576 64h-256a32 32 0 0 0-32 32v256a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32v-256a32 32 0 0 0-32-32z m576 0h-256a32 32 0 0 0-32 32v256a32 32 0 0 0 32 32h256a32 32 0 0 0 32-32v-256a32 32 0 0 0-32-32z" ></path></symbol><symbol id="icon-liebiaozhanshi" viewBox="0 0 1170 1024"><path d="M1133.714286 950.857143a36.571429 36.571429 0 0 1 0 73.142857H36.571429a36.571429 36.571429 0 0 1 0-73.142857h1097.142857z m0-475.428572a36.571429 36.571429 0 0 1 0 73.142858H36.571429a36.571429 36.571429 0 0 1 0-73.142858h1097.142857z m0-475.428571a36.571429 36.571429 0 0 1 0 73.142857H36.571429a36.571429 36.571429 0 0 1 0-73.142857h1097.142857z" ></path></symbol></svg>',m=(m=document.getElementsByTagName("script"))[m.length-1].getAttribute("data-injectcss"),v=function(a,h){h.parentNode.insertBefore(a,h)};if(m&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(a){console&&console.log(a)}}function n(){t||(t=!0,l())}function e(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(e,50)}n()}h=function(){var a,h;(h=document.createElement("div")).innerHTML=c,c=null,(a=h.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",h=a,(a=document.body).firstChild?v(h,a.firstChild):a.appendChild(h))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),h()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(l=h,i=a.document,t=!1,e(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,n())})}(window);
\ No newline at end of file \ No newline at end of file
{ {
"id": "2598158", "id": "2741238",
"name": "SeetaAIOT", "name": "设备管理后台",
"font_family": "iconfont", "font_family": "iconfont",
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{ {
"icon_id": "22178639", "icon_id": "18005150",
"name": "图片展示", "name": "数据 (4)",
"font_class": "tupianzhanshi", "font_class": "shuju",
"unicode": "e786", "unicode": "e60c",
"unicode_decimal": 59270 "unicode_decimal": 58892
}, },
{ {
"icon_id": "22178640", "icon_id": "3242865",
"name": "列表展示", "name": "列表",
"font_class": "liebiaozhanshi", "font_class": "fuwu",
"unicode": "e78d", "unicode": "e6c7",
"unicode_decimal": 59277 "unicode_decimal": 59079
},
{
"icon_id": "11564596",
"name": "列表",
"font_class": "shebei",
"unicode": "e874",
"unicode_decimal": 59508
},
{
"icon_id": "23505565",
"name": "参数模板",
"font_class": "canshumoban",
"unicode": "e78e",
"unicode_decimal": 59278
},
{
"icon_id": "13415761",
"name": "应用中心",
"font_class": "yingyong",
"unicode": "e693",
"unicode_decimal": 59027
},
{
"icon_id": "16069276",
"name": "钱包",
"font_class": "qianbao1",
"unicode": "e621",
"unicode_decimal": 58913
},
{
"icon_id": "22095875",
"name": "关于我们",
"font_class": "guanyuwomen",
"unicode": "e76e",
"unicode_decimal": 59246
},
{
"icon_id": "22095876",
"name": "菜单展开",
"font_class": "caidanzhankai",
"unicode": "e76f",
"unicode_decimal": 59247
},
{
"icon_id": "22095877",
"name": "产品文档",
"font_class": "chanpinwendang",
"unicode": "e770",
"unicode_decimal": 59248
},
{
"icon_id": "22095878",
"name": "菜单收起",
"font_class": "caidanshouqi",
"unicode": "e771",
"unicode_decimal": 59249
},
{
"icon_id": "22095879",
"name": "应用管理",
"font_class": "yingyongguanli",
"unicode": "e772",
"unicode_decimal": 59250
},
{
"icon_id": "22095880",
"name": "文档&工具",
"font_class": "wendanggongju",
"unicode": "e773",
"unicode_decimal": 59251
},
{
"icon_id": "22095881",
"name": "OTA",
"font_class": "OTA",
"unicode": "e774",
"unicode_decimal": 59252
},
{
"icon_id": "22095882",
"name": "监控中心",
"font_class": "jiankongzhongxin",
"unicode": "e775",
"unicode_decimal": 59253
},
{
"icon_id": "22095883",
"name": "设备管理",
"font_class": "shebeiguanli",
"unicode": "e776",
"unicode_decimal": 59254
},
{
"icon_id": "22095902",
"name": "面性下拉",
"font_class": "mianxingxiala",
"unicode": "e777",
"unicode_decimal": 59255
},
{
"icon_id": "22095903",
"name": "面性上拉",
"font_class": "mianxingshangla",
"unicode": "e778",
"unicode_decimal": 59256
},
{
"icon_id": "22095904",
"name": "unfold",
"font_class": "unfold",
"unicode": "e779",
"unicode_decimal": 59257
},
{
"icon_id": "22095905",
"name": "right",
"font_class": "right",
"unicode": "e77a",
"unicode_decimal": 59258
},
{
"icon_id": "22095906",
"name": "fold",
"font_class": "fold",
"unicode": "e77b",
"unicode_decimal": 59259
},
{
"icon_id": "22096387",
"name": "警告",
"font_class": "jinggao",
"unicode": "e77c",
"unicode_decimal": 59260
},
{
"icon_id": "22096388",
"name": "错误",
"font_class": "cuowu",
"unicode": "e77d",
"unicode_decimal": 59261
},
{
"icon_id": "22096389",
"name": "正确",
"font_class": "zhengque",
"unicode": "e77e",
"unicode_decimal": 59262
}, },
{ {
"icon_id": "22096432", "icon_id": "22096432",
...@@ -111,123 +258,18 @@ ...@@ -111,123 +258,18 @@
"unicode_decimal": 59276 "unicode_decimal": 59276
}, },
{ {
"icon_id": "22096387", "icon_id": "22178639",
"name": "警告", "name": "图片展示",
"font_class": "jinggao", "font_class": "tupianzhanshi",
"unicode": "e77c", "unicode": "e786",
"unicode_decimal": 59260 "unicode_decimal": 59270
},
{
"icon_id": "22096388",
"name": "错误",
"font_class": "cuowu",
"unicode": "e77d",
"unicode_decimal": 59261
},
{
"icon_id": "22096389",
"name": "正确",
"font_class": "zhengque",
"unicode": "e77e",
"unicode_decimal": 59262
},
{
"icon_id": "22095902",
"name": "面性下拉",
"font_class": "mianxingxiala",
"unicode": "e777",
"unicode_decimal": 59255
},
{
"icon_id": "22095903",
"name": "面性上拉",
"font_class": "mianxingshangla",
"unicode": "e778",
"unicode_decimal": 59256
},
{
"icon_id": "22095904",
"name": "unfold",
"font_class": "unfold",
"unicode": "e779",
"unicode_decimal": 59257
},
{
"icon_id": "22095905",
"name": "right",
"font_class": "right",
"unicode": "e77a",
"unicode_decimal": 59258
},
{
"icon_id": "22095906",
"name": "fold",
"font_class": "fold",
"unicode": "e77b",
"unicode_decimal": 59259
},
{
"icon_id": "22095875",
"name": "关于我们",
"font_class": "guanyuwomen",
"unicode": "e76e",
"unicode_decimal": 59246
},
{
"icon_id": "22095876",
"name": "菜单展开",
"font_class": "caidanzhankai",
"unicode": "e76f",
"unicode_decimal": 59247
},
{
"icon_id": "22095877",
"name": "产品文档",
"font_class": "chanpinwendang",
"unicode": "e770",
"unicode_decimal": 59248
},
{
"icon_id": "22095878",
"name": "菜单收起",
"font_class": "caidanshouqi",
"unicode": "e771",
"unicode_decimal": 59249
},
{
"icon_id": "22095879",
"name": "应用管理",
"font_class": "yingyongguanli",
"unicode": "e772",
"unicode_decimal": 59250
},
{
"icon_id": "22095880",
"name": "文档&工具",
"font_class": "wendanggongju",
"unicode": "e773",
"unicode_decimal": 59251
},
{
"icon_id": "22095881",
"name": "OTA",
"font_class": "OTA",
"unicode": "e774",
"unicode_decimal": 59252
},
{
"icon_id": "22095882",
"name": "监控中心",
"font_class": "jiankongzhongxin",
"unicode": "e775",
"unicode_decimal": 59253
}, },
{ {
"icon_id": "22095883", "icon_id": "22178640",
"name": "设备管理", "name": "列表展示",
"font_class": "shebeiguanli", "font_class": "liebiaozhanshi",
"unicode": "e776", "unicode": "e78d",
"unicode_decimal": 59254 "unicode_decimal": 59277
} }
] ]
} }
...@@ -83,3 +83,12 @@ export function copyText(item) { ...@@ -83,3 +83,12 @@ export function copyText(item) {
}) })
document.body.removeChild(transfer) document.body.removeChild(transfer)
} }
export function calculateByte(base64) {
if (base64.indexOf('base64,') !== -1) {
base64 = base64.substring(base64.indexOf('base64,') + 7)
}
if (base64.indexOf('=') !== -1) {
base64 = base64.substring(0, base64.indexOf('='))
}
return base64.length * 0.75
}
export const fileToBase64 = file => {
return new Promise((resolve, reject) => {
try {
const read = new FileReader()
read.onload = function(e) {
resolve(e.target.result)
}
read.readAsDataURL(file)
} catch (err) {
reject(err)
}
})
}
export const base64ToFile = (base64, fileName) => {
const arr = base64.split(',')
const mime = arr[0].match(/:(.*?);/)[1]
const bstr = atob(arr[1])
let n = bstr.length
const u8arr = new Uint8Array(n)
while (n--) {
u8arr[n] = bstr.charCodeAt(n)
}
const blob = new Blob([u8arr], { type: mime })
return new File([blob], fileName, { type: mime })
}
export const stringToBase64 = str => {
// 对字符串进行编码
const encode = encodeURI(str)
// 对编码的字符串转化base64
const base64 = btoa(encode)
return base64
}
export const base64ToString = base64 => {
// 对base64转编码
const decode = atob(base64)
const temp = decode.replace(/%/g, '%25')
// 编码转字符串
const str = decodeURI(temp)
return str
}
export const isASCII = str => {
return /^[\x00-\x7F]*$/.test(str)
}
<template> <template>
<div> <div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'账户中心'}}</span>
</div>
<div class="page-nav">
<div class="search-fields">
<span class="fields">用户名:</span>
<st-input width="240px" class="align contents" id="align-input" v-model="userName"></st-input>
<!-- <input type="text" id="raw-input" autocomplete="off" class="align contents" :style="{borderColor: borderColor}" placeholder="请输入" @blur="getData" v-model.trim="deviceName" @keyup.enter="getData" @input="checkSearchContent"> -->
<span class="fields">用户角色:</span>
<st-select
v-model="userRole"
:options="userRoleOptions"
size="small"
style="width: 240px"
class="contents"
clearable
@change="getData"
>
</st-select>
<span class="fields">创建日期:</span>
<el-date-picker
v-model="created_at"
type="daterange"
@change="getData"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
</div>
<div class="page-content">
<div class="content-header">
<st-button type="primary" @click="handleCreate">
<i class="iconfont icon-tianjia"></i><span class="text">{{'增加用户'}}</span>
</st-button>
</div>
<div class="table-list">
<div class="list-content">
<st-table
ref="vTable"
:options="definitions"
:data="{
list: tokenList,
total: total,
}"
:outerLoading="loadingStatus">
<div slot="operate" slot-scope="row">
<span class="operate" @click="handleEdit(row)">编辑</span>
<span class="operate operate-delete" @click="handleDelete(row)">删除</span>
</div>
</st-table>
</div>
</div>
</div>
<st-dialog
:show.sync="showDialog"
class="update-dialog"
@dismiss="cancelSubmit"
>
<div slot="header" class="popup-header">{{submitType === 'create' ? '增加用户' : '编辑用户'}}</div>
<div slot="body" class="popup-body">
<st-form
label-width="90px"
ref="form"
:model="form"
:rules="rules">
<st-form-item
:label="'账号:'">
<st-input v-model="form.username" :disabled="submitType === 'edit'"></st-input>
</st-form-item>
<st-form-item
:label="'角色:'">
<st-input v-model="form.role"></st-input>
</st-form-item>
<st-form-item
:label="'邮箱:'">
<st-input v-model="form.email"></st-input>
</st-form-item>
<st-form-item v-if="submitType === 'create'"
:label="'初始密码:'">
<st-input v-model="form.passwd" type="password"></st-input>
</st-form-item>
<st-form-item v-if="submitType === 'create'"
:label="'重复密码:'">
<st-input v-model="form.confirmPwd" type="password"></st-input>
</st-form-item>
<st-form-item v-if="submitType === 'edit'"
:label="'原密码:'">
<st-input v-model="form.passwordd" type="password"></st-input>
</st-form-item>
<st-form-item v-if="submitType === 'edit'"
:label="'新密码:'">
<st-input v-model="form.new_passwordd" type="password"></st-input>
</st-form-item>
</st-form>
</div>
<div slot="footer" class="popup-footer flex right">
<st-button @click="cancelSubmit">{{$t('public.cancel')}}</st-button>
<st-button type="primary" @click="submit">{{'确定'}}</st-button>
</div>
</st-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getUsers, createUser, deleteUser, editUser } from '@/axios'
import browserStorage from '@/services/local-storage'
import { rTimeMin } from '@/utils/system.js'
import Dialog from '@/helpers/dialog'
export default { export default {
data() { data() {
const validatePasswordConfirmation = (rule, value, callback) => {
if (value === '') {
callback(new Error('请确认密码'))
} else if (value !== this.form.passwd && value !== this.form.ConfirmPwd) {
callback(new Error('两次密码输入不一致'))
} else {
callback()
}
}
return { return {
// 查询字段
userName: '',
userRole: '',
created_at: [],
showDialog: false,
submitType: 'create',
form: {},
userRoleOptions: [],
currentPage: 1,
currentSize: 10,
loadingStatus: false,
definitions: [
{
label: '账号',
render: 'username'
},
{
label: '角色',
render: 'role'
},
{
label: '邮箱',
render: 'email'
},
{
label: '创建人',
render: 'creater'
},
{
label: '创建日期',
render: 'create_date'
},
{
label: '备注',
render: 'desc'
},
{
label: '操作',
type: 'slot',
width: '150px',
slotName: 'operate'
},
],
tokenList: [],
total: 0,
rules: { // 表单校验
passwordConfirmation: [
{ required: true, message: '请确认密码', trigger: 'blur' },
{ validator: validatePasswordConfirmation, trigger: 'blur' }
]
},
}
},
watch: {
'$route.query': {
handler(val) {
if (JSON.stringify(val) === '{}') return
this.currentPage = Number(val.page_index) || 1
this.currentSize = Number(val.page_size) || 10
this.getData()
},
immediate: true,
deep: true
}
},
mounted() {
// this.getData()
},
methods: {
async submit() {
this.$refs.form.validate(async valid => {
if (valid) {
let res = ''
let submitForm = ''
switch (this.submitType) {
case 'create':
submitForm = JSON.parse(JSON.stringify(this.form))
delete submitForm.email
delete submitForm.confirmPwd
submitForm.creater = 'admin'
res = await createUser(submitForm)
if (res && res.data && res.data.code === 0) {
this.getData()
}
this.showDialog = false
break
case 'edit':
submitForm = JSON.parse(JSON.stringify(this.form))
delete submitForm.email
delete submitForm.confirmPwd
submitForm.creater = 'admin'
res = await editUser(submitForm)
if (res && res.data && res.data.code === 0) {
this.getData()
}
this.showDialog = false
break
default:
this.showDialog = false
break
}
}
})
},
cancelSubmit() {
this.showDialog = false
},
handleCreate() {
this.submitType = 'create'
this.showDialog = true
this.form = {}
},
handleEdit(row) {
this.submitType = 'edit'
this.showDialog = true
this.form = JSON.parse(JSON.stringify(row))
},
async handleDelete(row) {
const confirmDelete = await Dialog.confirm('提示', { message: '是否删除此账号?' })
if (!confirmDelete) return
const res = await deleteUser({ username: row.username })
if (res) {
Toast.success('操作成功')
this.getData()
}
},
async getData() {
this.loadingStatus = true
const res = await getUsers({ pages: this.currentPage - 1, pagesize: this.currentSize })
if (res && res.data && res.data.code === 0) {
this.tokenList = res.data.data.users
this.total = res.data.data.total
} }
this.loadingStatus = false
} }
},
} }
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
.popup-body
::v-deep.el-form-item
height: 32px
line-height: 32px
::v-deep.el-form-item__label
height: 32px!important
line-height: 32px!important
::v-deep.el-form-item__content
height: 32px!important
line-height: 32px!important
.search-fields
::v-deep input
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
.el-date-editor
width: 240px
height: 32px
float: right
::v-deep .el-range__icon
line-height: 24px
::v-deep .el-range-separator
width: 12%
line-height: 24px
</style> </style>
<template> <template>
<div> <div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'应用中心'}}</span>
</div>
<div class="page-content">
<div class="content-header">
<st-button type="primary" id="btn" @click="showDialog = true">
<i class="iconfont icon-tianjia"></i><span class="text">{{'申请应用'}}</span></st-button>
</div>
<div class="table-list">
<div class="list-content">
<st-table
ref="vTable"
:options="definitions"
:data="{
list: tokenList,
total: total,
}"
:outerLoading="loadingStatus">
<div slot="secret" slot-scope="row">
<span v-if="showSecret === row.appid" class="secret-box">{{row.secret}}</span>
<span v-else class="secret-box">********</span>
<i class="el-icon-view eye-btn" @mousedown="showSecret = row.appid" @mouseup="showSecret = ''"></i>
</div>
<div slot="operate" slot-scope="row">
<span class="operate" v-if="row.ismainapp === 0" @click="setHostApp(row)">设置为主应用</span>
<span class="operate" v-else @click="cancelHostApp(row)">取消设置为主应用</span>
<span class="operate operate-delete" @click="handleDelete(row)">删除</span>
</div>
</st-table>
</div>
</div>
</div>
<st-dialog
:show.sync="showDialog"
class="update-dialog"
@dismiss="cancelSubmit"
>
<div slot="header" class="popup-header">{{'申请应用'}}</div>
<div slot="body" class="popup-body">
<st-form
label-width="90px"
ref="form"
:model="form">
<st-form-item :label="'appId:'"><st-input v-model="form.appid"></st-input></st-form-item>
<st-form-item :label="'secret:'"><st-input v-model="form.secret"></st-input></st-form-item>
<st-form-item
:label="'说明:'">
<st-input
type="textarea"
placeholder="请输入应用描述"
v-model="form.description"
maxlength="100"
show-word-limit
>
</st-input>
</st-form-item>
</st-form>
</div>
<div slot="footer" class="popup-footer flex right">
<st-button @click="cancelSubmit">{{$t('public.cancel')}}</st-button>
<st-button type="primary" @click="submit">{{'确定'}}</st-button>
</div>
</st-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getApp, deleteApp, setApp, addApp } from '@/axios'
import Dialog from '@/helpers/dialog'
import browserStorage from '@/services/local-storage'
export default { export default {
data() { data() {
return { return {
showSecret: '',
loadingStatus: false,
form: {},
showDialog: false,
definitions: [
{
label: 'APPID',
render: 'appid'
},
{
label: 'Secret',
type: 'slot',
slotName: 'secret'
},
{
label: '创建时间',
render: 'create_date'
},
{
label: '设备数量',
render: 'devices'
},
{
label: '说明',
render: 'description'
},
{
label: '操作',
type: 'slot',
width: '150px',
slotName: 'operate'
},
],
tokenList: [],
total: 0,
currentPage: 1,
currentSize: 10
}
},
watch: {
'$route.query': {
handler(val) {
if (JSON.stringify(val) === '{}') return
this.currentPage = Number(val.page_index) || 1
this.currentSize = Number(val.page_size) || 10
this.getData()
},
immediate: true,
deep: true
}
},
mounted() {
// this.getData()
},
methods: {
async getData() {
this.loadingStatus = true
const res = await getApp({ pages: this.currentPage - 1, pagesize: this.currentSize })
if (res && res.data && res.data.code === 0) {
this.tokenList = res.data.data.apps
this.total = res.data.data.total
}
this.loadingStatus = false
},
cancelSubmit() {
this.form = {}
this.showDialog = false
},
async submit() {
const userInfo = JSON.parse(browserStorage.getItem('user'))
const res = await addApp({ ...this.form, creater: userInfo.creater })
if (res && res.data && res.data.code === 0) {
Toast.success('操作成功')
this.getData()
}
this.showDialog = false
this.form = {}
},
async handleDelete(row) {
const confirmDelete = await Dialog.confirm('提示', { message: '是否删除此应用?' })
if (!confirmDelete) return
const res = await deleteApp({ appid: row.appid })
if (res && res.data && res.data.code === 0) {
Toast.success('操作成功')
this.getData()
}
},
async setHostApp(row) {
const res = await setApp({ appid: row.appid, mainapp: 1, username: 'test' })
if (res && res.data && res.data.code === 0) {
Toast.success('操作成功')
this.getData()
}
},
async cancelHostApp(row) {
const res = await setApp({ appid: row.appid, mainapp: 0, username: 'test' })
if (res && res.data && res.data.code === 0) {
Toast.success('操作成功')
this.getData()
}
} }
} }
} }
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
.update-dialog
::v-deep input
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
::v-deep.el-input__inner, ::v-deep.el-textarea, ::v-deep.el-textarea__inner
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color: #333
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
.eye-btn
margin-left: 10px
color: #409EFF
.secret-box
display: inline-block
width: 60px
</style> </style>
<template>
<div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'数据列表 / 编辑'}}</span>
</div>
<div class="page-content" @click="handleClick">
<div class="content-header">
<st-button type="primary" @click="addTableData">
<i class="iconfont icon-tianjia"></i><span class="text">{{'插入数据'}}</span></st-button>
<div class="search-box">
<el-checkbox v-model="isBase64">Base64</el-checkbox>
<st-select
v-model="inputVal"
:options="orderOptions"
size="small"
class="select-order"
clearable
placeholder="序号"
>
</st-select>
<div class="search">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="inputVal">
<i class="el-input__icon el-icon-search"></i>
</div>
</div>
</div>
<div class="table-list">
<div class="list-content">
<el-table :max-height="flexHeight"
ref="singleTable"
:data="tableData.concat(insertData)"
highlight-current-row
@current-change="currentChange"
@row-click="rowClick"
@cell-click="cellClick"
style="width: 100%"
v-loading="loadingStatus">
<el-table-column label="序号" width="100px">
<template slot-scope="scope">
<span style="margin-left: 12px">{{scope.row.id}}</span>
</template>
</el-table-column>
<el-table-column v-for="index of totalColumns" :key="index" :label="`列${index}`" :min-width="index === columnIndex ? '220px' : ''">
<template slot-scope="scope">
<div style="display: flex">
<span type="text" v-if="scope.row.id !== ''" class="cell-span">
<span :class="{ 'cell-blob': scope.row.binary[index - 1] === 'blob' }">{{scope.row.binary[index - 1]}}</span>
</span>
<pack-select v-if="scope.row.id === ''" v-model="scope.row.binary[index - 1].type" @blur="handleBlur" @change="value => handleTypeChange(value, scope.row.binary[index - 1])" placeholder="请选择" class="none-display" style="margin-right: 10px">
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</pack-select>
<input type="text" v-if="scope.row.id === ''" v-model="scope.row.binary[index - 1].value" @blur="handleBlur" placeholder="请输入" class="cell-value"
:style="{border: scope.row.binary[index - 1].type === 'base64' && !base64Pattern.test(scope.row.binary[index - 1]) ? '1px solid #F56C6C' : 'none'}"
@input="event => checkBase64(event.target, scope.row.binary[index - 1])"
@focus="event => handleFocus(event.target, scope.row.binary[index - 1])">
</div>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<span @click="handleDelete(scope.row, scope.$index)" class="delete-btn">删除</span>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
@size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page="1"
:page-sizes="[10, 20, 50, 100]"
:page-size="10"
layout="total, prev, pager, next, sizes, jumper"
:total="total">
</el-pagination>
</div>
</div>
</div>
<div class="buttons">
<st-button @click="cancel" :disabled="!insertData.length"><span class="text">{{'取消'}}</span></st-button>
<st-button type="primary" @click="save" :disabled="!insertData.length"><span class="text">{{'保存'}}</span></st-button>
</div>
</div>
</div>
</template>
<script>
import { addData, getData, deleteData } from '@/axios'
import Dialog from '@/helpers/dialog'
import { base64ToString, stringToBase64, isASCII } from '@/utils/typeConversion'
export default {
data() {
return {
inputVal: '',
isBase64: false,
loadingStatus: false,
totalColumns: Number(this.$route.query.columns),
typeOptions: [{
value: 'base64',
label: 'base64'
}, {
value: 'string',
label: 'string'
}],
orderOptions: [],
currentPage: 1,
currentSize: 10,
tableData: [],
insertData: [],
total: 0,
agoCell: null,
currentInput: null,
base64Pattern: /^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/,
flexHeight: 0,
columnIndex: 0
}
},
created() {
this.setFlexHeight()
},
mounted() {
this.setFlexHeight()
window.onresize = () => {
setTimeout(() => {
this.setFlexHeight()
}, 10)
}
this.getData()
},
methods: {
async getData() {
this.loadingStatus = true
const res = await getData({ name: this.$route.query.name, pages: this.currentPage - 1, pagesize: this.currentSize })
if (res && res.data && res.data.code === 0) {
this.tableData = res.data.table.data.map(item => {
item.binary = item.binary.map(base64 => {
const decode = base64ToString(base64)
const str = decode.length > 64 ? 'blob' : isASCII(decode) ? decode : 'blob'
return str
})
return item
})
this.total = res.data.table.total
}
this.loadingStatus = false
},
handleTypeChange(value, param) {
this.checkBase64(this.currentInput, param)
},
handleFocus(target, param) {
this.currentInput = target
this.checkBase64(this.currentInput, param)
},
checkBase64(target, param) {
if (param.type === 'string') {
target.style.border = 'none'
return
}
if (param.type === 'base64' && param.value && !this.base64Pattern.test(param.value)) {
target.style.border = '1px solid #F56C6C'
} else {
target.style.border = 'none'
}
},
cancel() {
this.getData() // 取消后所有修改都撤销
this.insertData = [] // 取消后所有修改都撤销
this.clearCell(this.agoCell)
this.setCurrent()
},
async save() {
this.clearCell(this.agoCell)
this.setCurrent()
const binaryData = []
const insertData = this.insertData.map(item => {
return item.binary
})
insertData.map(item => {
const binaryItem = []
item.map(ite => {
if (ite.type === 'string') {
binaryItem.push(stringToBase64(ite.value))
}
if (ite.type === 'base64') {
binaryItem.push(ite.value)
}
})
if (binaryItem.length === Number(this.$route.query.columns)) {
binaryData.push(binaryItem)
}
})
const res = await addData({
name: this.$route.query.name,
binary: binaryData
})
if (res && res.data && res.data.code === 0) {
this.insertData = []
Toast.success('操作成功')
this.getData()
}
},
setFlexHeight() {
const ele = document.getElementsByClassName('list-content') && document.getElementsByClassName('list-content')[0]
this.flexHeight = ele && ele.clientHeight
},
addTableData() {
const binary = []
for (let i = 0; i < Number(this.$route.query.columns); i++) {
binary.push({ type: '', value: '' })
}
this.insertData.push({
id: '',
binary
})
},
async handleDelete(row, index) {
if (!row.id) {
this.insertData.splice(index - this.tableData.length, 1)
return
}
const confirmDelete = await Dialog.confirm('提示', { message: '是否删除此数据?' })
if (!confirmDelete) return
const res = await deleteData({ name: this.$route.query.name, id: [row.id] })
if (res && res.data && res.data.code === 0) {
Toast.success('操作成功')
this.getData()
}
},
handleBlur(event) {
event.path.map(item => {
if (item.classList && Array.from(item.classList).includes('cell')) {
this.agoCell = item
}
})
},
clearCell(cell) {
if (!cell) return
this.columnIndex = 0
const select = cell.getElementsByClassName('el-select')
const input = cell.getElementsByTagName('input')
select && select[0] && select[0].classList.add('none-display')
input && input[0] && input[0].classList.remove('write')
input && input[1] && input[1].classList.remove('write')
},
cellClick(row, column, cell, event) {
if (column.label === '序号' || column.label === '操作') return
if (this.agoCell !== cell) {
this.clearCell(this.agoCell)
}
this.columnIndex = Number(column.label.substring(1))
cell.getElementsByClassName('el-select')[0] && cell.getElementsByClassName('el-select')[0].classList.remove('none-display')
if (cell.getElementsByTagName('input')[0] && cell.getElementsByTagName('input')[1]) {
cell.getElementsByTagName('input')[0].classList.add('write')
cell.getElementsByTagName('input')[1].classList.add('write')
cell.getElementsByTagName('input')[1].focus()
}
},
rowClick(row, column, event) {
if (column.label === '序号' || column.label === '操作') return
this.setCurrent(row)
},
setCurrent(row) {
this.$refs.singleTable.setCurrentRow(row)
},
currentChange(currentRow, oldCurrentRow) {
this.clearCell(this.agoCell)
},
handleClick(event) {
if (['content-header', 'list-content', 'el-pagination', 'buttons'].includes(event.target.classList[0])) {
this.clearCell(this.agoCell)
this.setCurrent()
}
},
handleSizeChange(val) {
this.currentSize = val
this.getData()
},
handlePageChange(val) {
this.currentPage = val
this.getData()
}
}
}
</script>
<style lang="sass" scoped>
.page-content
position: relative
.list-content
height: calc(100% - 120px)!important
.column-box
position: relative
::v-deep input
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
::v-deep.el-select
position: absolute
width: 10px
right: 0
z-index: 100
.el-input__inner
text-align: right
padding: 0
width: 0px
.el-input__suffix
width: 15px
&:hover
width: 70px
.el-input__inner
width: 50px
color: #999
::v-deep.el-icon-arrow-up
&::before
content: '\e78f'
::v-deep.el-table tbody tr:hover>td
background: #ecf5ff!important
::v-deep.el-table tbody tr.current-row input[type=text]
background: rgba(0, 0, 0, 0)
::v-deep.el-table tbody tr.current-row input[type=text].write
background: #fff
::v-deep.el-table tbody tr.current-row>td
background: #ecf5ff!important
.el-table
::v-deep .el-input__icon
line-height: 32px
::v-deep .myselect
border: none
width: 194px
height: 32px
background: rgba(0, 0, 0, 0)
font-family: PingFangSC-Regular, PingFang SC, Avenir, Helvetica, Arial, sans-serif
font-size: 14px
color: #666
::v-deep input[type=text], ::v-deep input[type=password], ::v-deep input[type=number], ::v-deep textarea
border: none
font-family: PingFangSC-Regular, PingFang SC, Avenir, Helvetica, Arial, sans-serif
font-size: 14px
color: #666
background: rgba(0, 0, 0, 0)
height: 32px
::v-deep thead
font-size: 14px
font-family: PingFang-SC-Bold, PingFang-SC
font-weight: bold
color: #333333
line-height: 20px
::v-deep th
font-weight: 'bold'
border-top: 1px solid #E8EBF2
padding-left: 12px
background: #F5F7FA
::v-deep td
padding: 6px 0
.delete-btn
margin-left: 12px
color: #F56C6C
cursor: pointer
.content-header
display: flex
flex-direction: row
justify-content: space-between
.search-box
display: flex
::v-deep.el-checkbox
line-height: 32px
::v-deep input[type=checkbox]
position: absolute
::v-deep input
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
.select-order
width: 240px!important
margin: 0 10px
.search
width: 240px
height: 32px
position: relative
.search-input
width: 100%
padding-right: 35px
.el-icon-search
line-height: 32px
position: absolute
right: 0
font-size: 18px
color: #CCC
cursor: pointer
width: 44px
height: 32px
text-align: center
::v-deep input
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#333
height: 32px
line-height: 32px
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
.pagination
text-align: center
margin: 20px 0
.el-pagination
white-space: nowrap
padding: 2px 5px
color: #333
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
::v-deep .el-pagination__total
font-size: 14px
::v-deep .el-pager
font-weight: 500
::v-deep.el-pagination__sizes, ::v-deep.el-pagination__jump, ::v-deep.el-pagination__total
font-weight: 400
::v-deep .btn-next, ::v-deep .btn-prev
color: #666
&:disabled
color: #C0C4CC
.none-display
display: none
.cell-value
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999!important
.cell-span
display: inline-block
height: 32px
line-height: 32px
padding-left: 10px
.cell-blob
display: inline-block
height: 26px
line-height: 26px
padding: 0 10px
color: #fff
background: #ccc
border-radius: 4px
.buttons
position: absolute
bottom: 0
right: 0
height: 60px
line-height: 60px
border-top: 1px solid #ddd
width: 100%
padding: 0 20px
text-align: right
</style>
<template> <template>
<div> <div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'数据列表'}}</span>
</div>
<div class="page-content">
<div class="content-header">
<st-button type="primary" id="btn" @click="showDialog = true">
<i class="iconfont icon-tianjia"></i><span class="text">{{'创建数据表'}}</span></st-button>
<div class="search">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="inputVal">
<i class="el-input__icon el-icon-search"></i>
</div>
</div>
<div class="table-list">
<div class="list-content">
<st-table
ref="vTable"
:options="definitions"
:data="{
list: tokenList,
total: total,
}"
:outerLoading="loadingStatus">
<div slot="operate" slot-scope="row">
<span class="operate" @click="$router.push({ path: '/data/edit', query: { name: row.name, columns: row.columns } })">编辑</span>
<span class="operate operate-delete" @click="handleDelete(row)">删除</span>
</div>
</st-table>
</div>
</div>
</div>
<st-dialog
:show.sync="showDialog"
class="update-dialog"
@dismiss="cancelSubmit"
>
<div slot="header" class="popup-header">{{'创建数据表'}}</div>
<div slot="body" class="popup-body">
<st-form
label-width="90px"
ref="form"
:model="form">
<st-form-item
:label="'名称:'">
<st-input v-model="form.name"></st-input>
</st-form-item>
<st-form-item
:label="'列数:'">
<st-input v-model="form.columns"></st-input>
</st-form-item>
</st-form>
</div>
<div slot="footer" class="popup-footer flex right">
<st-button @click="cancelSubmit">{{$t('public.cancel')}}</st-button>
<st-button type="primary" @click="submit">{{'确定'}}</st-button>
</div>
</st-dialog>
</div> </div>
</template> </template>
<script> <script>
import { createTable, getTable, deleteTable } from '@/axios'
import Dialog from '@/helpers/dialog'
export default { export default {
data() { data() {
return { return {
inputVal: '',
showDialog: false,
loadingStatus: false,
form: {},
definitions: [
{
label: '序号',
render: 'order'
},
{
label: '名称',
render: 'name'
},
{
label: '列数',
render: 'columns'
},
{
label: '行数',
render: 'rows'
},
{
label: '容量',
render: 'storage'
},
{
label: '创建时间',
render: 'create_date'
},
{
label: '修改时间',
render: 'update_date'
},
{
label: '操作',
type: 'slot',
width: '150px',
slotName: 'operate'
},
],
tokenList: [],
currentPage: 1,
currentSize: 10,
total: 0
}
},
watch: {
'$route.query': {
handler(val) {
if (JSON.stringify(val) === '{}') return
this.currentPage = Number(val.page_index) || 1
this.currentSize = Number(val.page_size) || 10
this.getData()
},
immediate: true,
deep: true
}
},
mounted() {
// this.getData()
},
methods: {
async getData() {
this.loadingStatus = true
const res = await getTable({ pages: this.currentPage - 1, pagesize: this.currentSize })
if (res && res.data && res.data.code === 0) {
this.tokenList = res.data.data.tables.map((item, index) => {
item.order = index + 1 + (this.currentPage - 1) * this.currentSize
return item
})
this.total = res.data.data.total
}
this.loadingStatus = false
},
cancelSubmit() {
this.form = {}
this.showDialog = false
},
async submit() {
const res = await createTable(this.form)
if (res && res.data && res.data.code === 0) {
Toast.success('操作成功')
this.getData()
}
this.showDialog = false
this.form = {}
},
async handleDelete(row) {
const confirmDelete = await Dialog.confirm('提示', { message: '是否删除此数据表?' })
if (!confirmDelete) return
const res = await deleteTable({ name: row.name })
if (res) {
Toast.success('操作成功')
this.getData()
} }
},
} }
} }
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
.page-content
#btn
width: 116px!important
text-align: left
.search
width: 240px
height: 32px
position: relative
float: right
.search-input
width: 100%
padding-right: 35px
.el-icon-search
line-height: 32px
position: absolute
right: 0
font-size: 18px
color: #CCC
cursor: pointer
width: 44px
height: 32px
text-align: center
::v-deep input
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#333
height: 32px
line-height: 32px
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
</style> </style>
...@@ -17,17 +17,20 @@ ...@@ -17,17 +17,20 @@
:pagination="false" :pagination="false"
> >
<div slot='codeSlot' slot-scope="row"> <div slot='codeSlot' slot-scope="row">
<span>{{ simplify(row.code, 3) }}</span> <span>{{ simplify(row.deviceid, 3) }}</span>
<i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.code)"></i> <i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.deviceid)"></i>
</div> </div>
<div slot='status' slot-scope="row"> <div slot='status' slot-scope="row" class="status">
<span class="circleStatus" :style="{color: getStatusColor(row.status)}">{{ getStatusText(row.status) }}</span> <span class="circleStatus" :style="{color: getStatusColor(row.state)}">{{ getStatusText(row.state) }}</span>
</div>
<div slot='ipSlot' slot-scope="row" class="ipSlot">
<span >{{ simplify(row.ip, 14) }}</span>
</div> </div>
<div slot='structureSlot' slot-scope="row"> <div slot='structureSlot' slot-scope="row">
<span>{{ simplify(row.structure, 6) }}</span> <span>{{ simplify(row.structure, 6) }}</span>
</div> </div>
<div slot='registerTimeSlot' slot-scope="row"> <div slot='registerTimeSlot' slot-scope="row">
<span>{{ rTimeMin(row.registerTime) }}</span> <span>{{ (row.register_date) }}</span>
</div> </div>
<div slot='tagsSlot' slot-scope="row"> <div slot='tagsSlot' slot-scope="row">
<div class="tagsItem"> <div class="tagsItem">
...@@ -50,15 +53,14 @@ ...@@ -50,15 +53,14 @@
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 添加标签</el-button> <el-button v-else class="button-new-tag" size="small" @click="showInput">+ 添加标签</el-button>
</div> </div>
</el-tooltip> </el-tooltip>
<!-- <el-tag v-for="(item, index) in row.tags" :key="index" :disable-transitions="false" @close="handleClose(row, item)" closable class="label label-primary table-label">{{ simplify(item, 7) }}</el-tag> -->
</div> </div>
</div> </div>
<div slot='servicesSlot' slot-scope="row"> <div slot='servicesSlot' slot-scope="row">
<el-tooltip class="item" effect="dark" :content="row.services ? row.services.join('、') : ''" placement="top"> <el-tooltip class="item" effect="dark" :content="getServiceName(row.services)" placement="top">
<!-- 必须要套一层 --> <!-- 必须要套一层 -->
<div> <div>
<template v-for="(item, index) in row.services"> <template v-for="(item, index) in row.services">
<span v-if="[0, 2].indexOf(index) !== -1" :key="index" class="service-item">{{ simplify(item, 4) }}</span> <span v-if="[0, 1, 2].indexOf(index) !== -1" :key="index" class="service-item">{{ simplify(item.name, 4) }}</span>
</template> </template>
<span v-if="(row.services && row.services.length) > 10">共: {{(row.services && row.services.length) ? row.services.length : 0}} 条</span> <span v-if="(row.services && row.services.length) > 10">共: {{(row.services && row.services.length) ? row.services.length : 0}} 条</span>
</div> </div>
...@@ -77,22 +79,28 @@ ...@@ -77,22 +79,28 @@
:options="serviceDefinitions" :options="serviceDefinitions"
:data="{ :data="{
list: serviceTokenList, list: serviceTokenList,
total: servicTtotal, total: servicTotal,
}" }"
:outerLoading="serviceLoadingStatus" :outerLoading="serviceLoadingStatus"
:pagination="false" :pagination="false"
> >
<div slot='nameSlot' slot-scope="row">
<span>{{ simplify(row.name, 8) }}</span>
</div>
<div slot='portSlot' slot-scope="row">
<span>{{ simplify(row.port, 6) }}</span>
</div>
<div slot='codeSlot' slot-scope="row"> <div slot='codeSlot' slot-scope="row">
<span>{{ simplify(row.code, 3) }}</span> <span>{{ simplify(row.potuid, 3) }}</span>
<i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.code)"></i> <i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.potuid)"></i>
</div> </div>
<div slot='descSlot' slot-scope="row"> <div slot='descSlot' slot-scope="row">
<span>{{ simplify(row.desc, 10) }}</span> <span>{{ simplify(row.description, 10) }}</span>
</div> </div>
<div slot='operate' slot-scope="row"> <div slot='operate' slot-scope="row">
<span class="operate-text" @click="seeServiceParams(row.id)">{{ '查看参数' }}</span> <span class="operate-text" @click="seeServiceParams(row.potuid)">{{ '查看参数' }}</span>
<span class="operate-text" @click="sendReq(row.id)">{{ '发送请求' }}</span> <span class="operate-text" @click="sendReq(row.potuid)">{{ '发送请求' }}</span>
<span class="operate-text" @click="sendOrder(row.id)">{{ '发送指令' }}</span> <span class="operate-text" @click="sendOrder(row.potuid)">{{ '发送指令' }}</span>
</div> </div>
</st-table> </st-table>
</div> </div>
...@@ -105,6 +113,7 @@ import browserStorage from '@/services/local-storage' ...@@ -105,6 +113,7 @@ import browserStorage from '@/services/local-storage'
import Dialog from '@/helpers/dialog' import Dialog from '@/helpers/dialog'
import validate from '@/components/seeta-ui/seeta-form/validator' import validate from '@/components/seeta-ui/seeta-form/validator'
import { rTimeMin, copyText } from '@/utils/system.js' import { rTimeMin, copyText } from '@/utils/system.js'
import { getServiceDevice, deleteTag, addTag } from '@/axios'
export default { export default {
data() { data() {
return { return {
...@@ -120,17 +129,12 @@ export default { ...@@ -120,17 +129,12 @@ export default {
time2: '', time2: '',
// 表格数据 // 表格数据
tokenList: [ tokenList: [
{ tags: ['标签1', '标签2'], name: '小1', code: '110123124325', child: { service: '11', code: '123', port: '1234', desc: '这是服务1' } },
], ],
inputVisible: false, inputVisible: false,
inputValue: '', inputValue: '',
serviceTokenList: [ serviceTokenList: [
{ service: '11', code: '123', port: '1234', desc: '这是服务1' },
{ service: '12', code: '123', port: '1234', desc: '这是服务2' },
{ service: '13', code: '123', port: '1234', desc: '这是服务3' },
], ],
total: 1, total: 1,
servicTtotal: 3,
// 编辑和添加表单 // 编辑和添加表单
form: { form: {
}, },
...@@ -138,11 +142,11 @@ export default { ...@@ -138,11 +142,11 @@ export default {
{ {
label: '服务', label: '服务',
type: 'slot', type: 'slot',
slotName: 'childServiceSlot', slotName: 'nameSlot',
}, { }, {
label: '编号', label: '编号',
type: 'slot', type: 'slot',
slotName: 'childCodeSlot' slotName: 'codeSlot'
}, { }, {
label: '端口', label: '端口',
type: 'slot', type: 'slot',
...@@ -154,7 +158,7 @@ export default { ...@@ -154,7 +158,7 @@ export default {
}, { }, {
label: '操作', label: '操作',
type: 'slot', type: 'slot',
slotName: 'childOperate', slotName: 'operate',
}, },
], ],
definitions: [ definitions: [
...@@ -167,13 +171,13 @@ export default { ...@@ -167,13 +171,13 @@ export default {
type: 'slot', type: 'slot',
slotName: 'status', slotName: 'status',
statusColor: item => { statusColor: item => {
switch (item.status) { switch (item.state) {
case 'online': case 1:
return '#67C23A' return '#67C23A'
case 'offline': case 2:
return '#999999'
default:
return '#F56C6C' return '#F56C6C'
default:
return '#999999'
} }
} }
}, { }, {
...@@ -186,7 +190,8 @@ export default { ...@@ -186,7 +190,8 @@ export default {
slotName: 'systemSlot' slotName: 'systemSlot'
}, { }, {
label: 'IP', label: 'IP',
render: 'IP' type: 'slot',
slotName: 'ipSlot'
}, { }, {
label: '注册时间', label: '注册时间',
type: 'slot', type: 'slot',
...@@ -212,19 +217,26 @@ export default { ...@@ -212,19 +217,26 @@ export default {
}, },
tagList: [{ label: '标签一', value: 0 }, { label: '标签二', value: 1 }, { label: '标签三', value: 2 }, { label: '标签四', value: 3 }], tagList: [{ label: '标签一', value: 0 }, { label: '标签二', value: 1 }, { label: '标签三', value: 2 }, { label: '标签四', value: 3 }],
serviceList: [{ label: '标签一', value: 0 }, { label: '标签二', value: 1 }, { label: '标签三', value: 2 }, { label: '标签四', value: 3 }], serviceList: [{ label: '标签一', value: 0 }, { label: '标签二', value: 1 }, { label: '标签三', value: 2 }, { label: '标签四', value: 3 }],
currentDeviceId: '',
servicTotal: 0
} }
}, },
computed: { computed: {
getServiceName() {
return item => {
return item.map(t1 => t1.name).join()
}
},
// 获取设备状态颜色 // 获取设备状态颜色
getStatusColor() { getStatusColor() {
return item => { return item => {
switch (item) { switch (item) {
case 'online': case 1:
return '#67C23A' return '#67C23A'
case 'offline': case 2:
return '#999999'
default:
return '#F56C6C' return '#F56C6C'
default:
return '#999999'
} }
} }
}, },
...@@ -232,12 +244,12 @@ export default { ...@@ -232,12 +244,12 @@ export default {
getStatusText() { getStatusText() {
return item => { return item => {
switch (item) { switch (item) {
case 'online': case 1:
return '在线' return '在线'
case 'offline': case 2:
return '离线'
default:
return '异常' return '异常'
default:
return '离线'
} }
} }
}, },
...@@ -260,8 +272,9 @@ export default { ...@@ -260,8 +272,9 @@ export default {
}, },
sendOrder(id) { sendOrder(id) {
}, },
handleClose(row, tag) { async handleClose(row, tag) {
row.tags.splice(row.tags.indexOf(tag), 1) const res = await deleteTag({ name: tag })
this.getData()
}, },
showInput() { showInput() {
this.inputVisible = true this.inputVisible = true
...@@ -269,10 +282,14 @@ export default { ...@@ -269,10 +282,14 @@ export default {
this.$refs.saveTagInput.$refs.input.focus() this.$refs.saveTagInput.$refs.input.focus()
}) })
}, },
handleInputConfirm(row) { async handleInputConfirm(row) {
const inputValue = this.inputValue const inputValue = this.inputValue
if (inputValue) { if (inputValue) {
row.tags.push(inputValue) const res = await addTag({
id: row.id,
tags: [inputValue]
})
this.getData()
} }
this.inputVisible = false this.inputVisible = false
this.inputValue = '' this.inputValue = ''
...@@ -300,6 +317,20 @@ export default { ...@@ -300,6 +317,20 @@ export default {
detail(id) { detail(id) {
}, },
delete(id) { delete(id) {
},
async getData() {
const res = await getServiceDevice({ deviceid: this.currentDeviceId })
if (res && res.data && res.data.device) {
this.tokenList = [JSON.parse(JSON.stringify(res.data.device))]
this.serviceTokenList = JSON.parse(JSON.stringify(res.data.device.services))
this.total = 1
this.servicTotal = res.data.device.services.length
} else {
this.tokenList = []
this.total = 0
this.serviceTokenList = []
this.servicTotal = 0
}
} }
}, },
watch: { watch: {
...@@ -311,6 +342,11 @@ export default { ...@@ -311,6 +342,11 @@ export default {
} }
}, },
mounted() { mounted() {
if (this.$store.getters.currentDevice !== '') {
sessionStorage.setItem('currentDevice', this.$store.getters.currentDevice)
}
this.currentDeviceId = sessionStorage.getItem('currentDevice')
this.getData()
}, },
destroyed() { destroyed() {
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="list-item"> <div class="list-item">
<span class="list-item-title">{{'服务编号:'}}</span> <span class="list-item-title">{{'服务编号:'}}</span>
<div class="list-item-content"> <div class="list-item-content">
<span>{{'wefhweifhew'}}</span> <span>{{currentService.potuid}}</span>
</div> </div>
</div> </div>
<div class="list-item"> <div class="list-item">
...@@ -14,30 +14,40 @@ ...@@ -14,30 +14,40 @@
<div class="list-item-content"> <div class="list-item-content">
<div> <div>
<span>{{'AppKey:'}}</span> <span>{{'AppKey:'}}</span>
<st-input width="240px" class="list-item-input"></st-input> <st-input width="240px" class="list-item-input" v-model="currentService.appid" show-password></st-input>
</div> </div>
<div> <div>
<span>{{'Secret:'}}</span> <span>{{'Secret:'}}</span>
<st-input width="240px" class="list-item-input"></st-input> <st-input width="240px" class="list-item-input" v-model="currentService.secretkey" show-password></st-input>
</div> </div>
<div class="list-item-icon"> <!-- <div class="list-item-icon">
<i class="el-icon-view blue-text"></i> <i class="el-icon-view blue-text"></i>
</div> </div> -->
</div> </div>
</div> </div>
<div class="list-item"> <div class="list-item">
<span class="list-item-title param-template-text">{{'参数模板:'}}</span> <span class="list-item-title param-template-text">{{'参数模板:'}}</span>
<div class="list-item-content"> <div class="list-item-content">
<div class="tags"> <div class="tags">
<el-tooltip class="item" effect="dark" :content="dynamicTags.join(',')" placement="top" style="display: inline-block"> <vuedraggable
<div> class="wrapper"
<template v-for="(item, index) in dynamicTags"> :list="dynamicTags"
<el-tag :key="index" >{{item.length > 4 ? item.slice(0, 3) + '...' : item}}</el-tag> @end="endSort"
>
<transition-group>
<template v-for="(item) in dynamicTags" class="item">
<el-tag el-tag closable :key="item" >{{item}}</el-tag>
</template> </template>
<span v-if="dynamicTags.length > 10">共: {{dynamicTags.length}} 条</span> </transition-group>
</vuedraggable>
<!-- <template v-for="(item, index) in dynamicTags">
<el-tooltip :key="index" class="item" effect="dark" :content="item" placement="top" style="display: inline-block">
<div>
<el-tag>{{item.length > 4 ? item.slice(0, 3) + '...' : item}}</el-tag>
</div> </div>
</el-tooltip> </el-tooltip>
<el-input </template> -->
<!-- <el-input
class="input-new-tag" class="input-new-tag"
v-if="inputVisible" v-if="inputVisible"
v-model="inputValue" v-model="inputValue"
...@@ -46,7 +56,14 @@ ...@@ -46,7 +56,14 @@
@keyup.enter.native="handleInputConfirm" @keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm" @blur="handleInputConfirm"
> >
</el-input> </el-input> -->
<el-cascader
v-model="inputValue"
v-if="inputVisible"
:options="options"
:props="{ multiple: true, checkStrictly: true }"
clearable>
</el-cascader>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 添加标签</el-button> <el-button v-else class="button-new-tag" size="small" @click="showInput">+ 添加标签</el-button>
</div> </div>
</div> </div>
...@@ -66,36 +83,36 @@ ...@@ -66,36 +83,36 @@
> >
<div slot='fieldSlot' slot-scope="scope"> <div slot='fieldSlot' slot-scope="scope">
<template> <template>
<div v-if="!(scope.p1 && scope.p1.ifEdit)" @click="changeStatus(scope, scope.index, 'p1', true)" class="pointer">{{scope.p1 ? scope.p1.value : ''}}</div> <div v-if="!(scope.field && scope.field.ifEdit)" @click="changeStatus(scope, scope.index, 'field', true)" :class="{'pointer': scope.configurable !== 'noedit'}">{{scope.field ? scope.field.value : ''}}</div>
<st-input ref="myInput" @change="updateScope(scope, scope.index)" @blur="changeStatus(scope, scope.index, 'p1', false)" @keyup.enter.native="changeStatus(scope, scope.index, 'p1', false)" v-model="currentInput" v-else class="field-input"></st-input> <st-input ref="myInput" @change="updateScope(scope, scope.index)" @blur="changeStatus(scope, scope.index, 'field', false)" @keyup.enter.native="changeStatus(scope, scope.index, 'field', false)" v-model="currentInput" v-else class="field-input"></st-input>
</template> </template>
</div> </div>
<div slot='typeSlot' slot-scope="scope"> <div slot='typeSlot' slot-scope="scope">
<template> <template>
<div v-if="!(scope.p2 && scope.p2.ifEdit)" @click="changeStatus(scope, scope.index, 'p2', true)" class="pointer">{{scope.p2 ? scope.p2.value : ''}}</div> <div v-if="!(scope.type && scope.type.ifEdit)" @click="changeStatus(scope, scope.index, 'type', true)" :class="{'pointer': scope.configurable !== 'noedit'}">{{scope.type ? scope.type.value : ''}}</div>
<st-input ref="myInput" @change="updateScope(scope, scope.index)" @blur="changeStatus(scope, scope.index, 'p2', false)" @keyup.enter.native="changeStatus(scope, scope.index, 'p2', false)" v-model="currentInput" v-else class="field-input"></st-input> <st-input ref="myInput" @change="updateScope(scope, scope.index)" @blur="changeStatus(scope, scope.index, 'type', false)" @keyup.enter.native="changeStatus(scope, scope.index, 'type', false)" v-model="currentInput" v-else class="field-input"></st-input>
</template> </template>
</div> </div>
<div slot='valueSlot' slot-scope="row"> <div slot='valueSlot' slot-scope="row">
<template v-if="row.p3 && !row.p3.ifEdit && row.p3.valueType === 'text'"> <template v-if="row.value && !row.value.ifEdit && row.value.valueType === 'text'">
<span @click="changeStatus(row, row.index, 'p3', true)" class="pointer">{{row.p3.value}}</span> <span @click="changeStatus(row, row.index, 'value', true)" :class="{'pointer': row.configurable !== 'noedit'}">{{row.value.value}}</span>
</template> </template>
<template v-else-if="row.p3 && !row.p3.ifEdit && row.p3.valueType === 'a'"> <template v-else-if="row.value && !row.value.ifEdit && row.value.valueType === 'a'">
<a href="javascript:;" class="link-text" @click="linkToTable">{{row.p3.value}}</a> <a href="javascript:;" class="link-text" @click="linkToTable">{{row.value.value}}</a>
</template> </template>
<template v-else-if="row.p3 && !row.p3.ifEdit && row.p3.valueType === 'img'"> <template v-else-if="row.value && !row.value.ifEdit && row.value.valueType === 'img'">
<span class="preview-text">{{getBlobSize(row.p3.value)}}</span> <span class="preview-text">{{getBlobSize(row.value.value)}}</span>
<span v-if='!ifBlobPreview(row.p3.value)'>{{'(不可预览)'}}</span> <span v-if='!ifBlobPreview(row.value.value)'>{{'(不可预览)'}}</span>
<el-image <el-image
class="preview-img" class="preview-img"
v-else v-else
style="width: 42px; height: 28px" style="width: 42px; height: 28px"
:src="getBlobimgUrl(row.p3.value)" :src="row.value.value"
:preview-src-list="getBlobimgUrlList(row.p3.value)"> :preview-src-list="getBlobimgUrlList(row.value.value)">
</el-image> </el-image>
</template> </template>
<template v-else> <template v-else>
<st-input ref="myInput" @change="updateScope(row, row.index)" @blur="changeStatus(row, row.index, 'p3', false)" @keyup.enter.native="changeStatus(row, row.index, 'p3', false)" v-model="currentInput" class="field-input"></st-input> <st-input ref="myInput" @change="updateScope(row, row.index)" @blur="changeStatus(row, row.index, 'value', false)" @keyup.enter.native="changeStatus(row, row.index, 'value', false)" v-model="currentInput" class="field-input"></st-input>
</template> </template>
</div> </div>
<div slot='operate' slot-scope="row"> <div slot='operate' slot-scope="row">
...@@ -123,7 +140,12 @@ ...@@ -123,7 +140,12 @@
<script> <script>
import { rTimeMin, copyText } from '@/utils/system.js' import { rTimeMin, copyText } from '@/utils/system.js'
import Dialog from '@/helpers/dialog' import Dialog from '@/helpers/dialog'
import { getServiceParamter, setServiceParamter } from '@/axios'
import vuedraggable from 'vuedraggable'
export default { export default {
components: {
vuedraggable
},
computed: { computed: {
// 计算blob大小 // 计算blob大小
getBlobSize() { getBlobSize() {
...@@ -134,8 +156,11 @@ export default { ...@@ -134,8 +156,11 @@ export default {
// 是否可预览 // 是否可预览
ifBlobPreview() { ifBlobPreview() {
return item => { return item => {
if (item.indexOf('data:image/jpeg;base64,') !== -1) {
return true return true
} }
return false
}
}, },
// 获取图片封面 // 获取图片封面
getBlobimgUrl() { getBlobimgUrl() {
...@@ -147,8 +172,7 @@ export default { ...@@ -147,8 +172,7 @@ export default {
getBlobimgUrlList() { getBlobimgUrlList() {
return item => { return item => {
return [ return [
'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg', item
'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
] ]
} }
}, },
...@@ -190,14 +214,15 @@ export default { ...@@ -190,14 +214,15 @@ export default {
}, },
data() { data() {
return { return {
dynamicTags: ['标签一', '标签二', '标签三'], dynamicTags: [],
inputVisible: false, inputVisible: false,
inputValue: '', inputValue: [],
tokenList: [ // tokenList: [
{ p1: { value: '小2', ifEdit: false }, p2: { value: '小2', ifEdit: false }, p3: { value: 'xxx', valueType: 'img', ifEdit: false }, index: 0, configurable: 'edit', editing: false }, // { p1: { value: '小2', ifEdit: false }, p2: { value: '小2', ifEdit: false }, p3: { value: 'xxx', valueType: 'img', ifEdit: false }, index: 0, configurable: 'edit', editing: false },
{ p1: { value: '小3', ifEdit: false }, p2: { value: '小3', ifEdit: false }, p3: { value: 'fein_fe', valueType: 'a', ifEdit: false }, index: 1, configurable: 'edit', editing: false }, // { p1: { value: '小3', ifEdit: false }, p2: { value: '小3', ifEdit: false }, p3: { value: 'fein_fe', valueType: 'a', ifEdit: false }, index: 1, configurable: 'edit', editing: false },
{ p1: { value: '小4', ifEdit: false }, p2: { value: '小4', ifEdit: false }, p3: { value: '122', valueType: 'text', ifEdit: false }, index: 2, configurable: 'edit', editing: false }, // { p1: { value: '小4', ifEdit: false }, p2: { value: '小4', ifEdit: false }, p3: { value: '122', valueType: 'text', ifEdit: false }, index: 2, configurable: 'edit', editing: false },
], // ],
tokenList: [],
tokenListCopy: [], tokenListCopy: [],
total: 0, total: 0,
loadingStatus: false, loadingStatus: false,
...@@ -242,6 +267,7 @@ export default { ...@@ -242,6 +267,7 @@ export default {
'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg', 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg' 'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
], ],
options: [],
definitions: [ definitions: [
{ {
label: '字段', label: '字段',
...@@ -261,15 +287,23 @@ export default { ...@@ -261,15 +287,23 @@ export default {
slotName: 'operate', slotName: 'operate',
}, },
], ],
currentService: {}
} }
}, },
methods: { methods: {
rTimeMin, rTimeMin,
endSort(evt) {
console.log('evt end index', evt.newIndex)
console.log(this.dynamicTags, 'dynamicTags')
},
handleClose(tag) { handleClose(tag) {
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1) this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1)
}, },
// 切换表格项内容 // 切换表格项内容
changeStatus(row, index, item, status) { changeStatus(row, index, item, status) {
if (row.configurable === 'noedit') {
return null
}
if (status) { if (status) {
this.$set(this, 'currentInput', row[item].value) this.$set(this, 'currentInput', row[item].value)
} else { } else {
...@@ -313,28 +347,65 @@ export default { ...@@ -313,28 +347,65 @@ export default {
this.tokenList.forEach((item, index) => { this.tokenList.forEach((item, index) => {
item.index = index item.index = index
}) })
console.log(this.tokenList, 'new')
}, },
addRow() { addRow() {
const newRow = { p1: { value: 'newone', ifEdit: false }, p2: { value: 'newone', ifEdit: false }, p3: { value: 'newone', valueType: 'text', ifEdit: false }, index: this.tokenList.length, configurable: 'add', editing: false } const newRow = { field: { value: 'newone', ifEdit: false }, type: { value: 'newone', ifEdit: false }, value: { value: 'newone', valueType: 'text', ifEdit: false }, index: this.tokenList.length, configurable: 'add', editing: false }
this.tokenList.push(newRow) this.tokenList.push(newRow)
}, },
cancleAll() { cancleAll() {
}, },
async saveAll() { async saveAll() {
this.tokenListCopy = JSON.parse(JSON.stringify(this.tokenList))
const resultParameters = { dd: 0.8 }
this.tokenList.forEach(item => { this.tokenList.forEach(item => {
item.p1.ifEdit = false item.field.ifEdit = false
item.p2.ifEdit = false item.type.ifEdit = false
item.p3.ifEdit = false item.value.ifEdit = false
item.configurable = 'edit' item.configurable = 'edit'
item.editing = false item.editing = false
}) })
this.tokenListCopy = JSON.parse(JSON.stringify(this.tokenList)) const res = await setServiceParamter({
potuid: this.currentService.potuid,
appid: this.currentService.appid,
secretkey: this.currentService.secretkey,
parameters: resultParameters
})
},
async getData() {
let countIndex = 0
this.tokenList = []
const res = await getServiceParamter({ potuid: this.currentService.potuid })
if (res && res.data) {
const binaryObj = res.data.parameters.binary
const scalarsObj = res.data.parameters.scalars
const tableObj = res.data.parameters.table
this.dynamicTags = JSON.parse(JSON.stringify(res.data.templates))
for (const key in binaryObj) {
this.tokenList.push({ field: { value: key, ifEdit: false }, type: { value: 'blob', ifEdit: false }, value: { value: binaryObj[key], valueType: 'img', ifEdit: false }, index: countIndex, configurable: 'noedit', editing: false })
countIndex++
} }
for (const key in scalarsObj) {
this.tokenList.push({ field: { value: key, ifEdit: false }, type: { value: typeof scalarsObj[key], ifEdit: false }, value: { value: scalarsObj[key], valueType: 'text', ifEdit: false }, index: countIndex, configurable: 'noedit', editing: false })
countIndex++
}
for (const key in tableObj) {
this.tokenList.push({ field: { value: key, ifEdit: false }, type: { value: 'table', ifEdit: false }, value: { value: tableObj[key], valueType: 'a', ifEdit: false }, index: countIndex, configurable: 'noedit', editing: false })
countIndex++
}
} else {
this.tokenList = []
this.total = 0
}
},
}, },
mounted() { mounted() {
this.tokenListCopy = JSON.parse(JSON.stringify(this.tokenList)) this.tokenListCopy = JSON.parse(JSON.stringify(this.tokenList))
if (JSON.stringify(this.$store.getters.currentService) !== '{}') {
sessionStorage.setItem('currentService', JSON.stringify(this.$store.getters.currentService))
}
this.currentService = JSON.parse(sessionStorage.getItem('currentService'))
this.getData()
} }
} }
</script> </script>
...@@ -397,7 +468,7 @@ export default { ...@@ -397,7 +468,7 @@ export default {
left: -20px left: -20px
.add .add
cursor: pointer cursor: pointer
margin-top: 16px margin-top: 3px
width: 100% width: 100%
height: 32px height: 32px
line-height: 32px line-height: 32px
...@@ -462,4 +533,6 @@ export default { ...@@ -462,4 +533,6 @@ export default {
line-height: 32px line-height: 32px
.param-template-text .param-template-text
line-height: 32px line-height: 32px
::v-deep .el-tooltip
text-align: left
</style> </style>
...@@ -15,49 +15,28 @@ ...@@ -15,49 +15,28 @@
:outerLoading="loadingStatus" :outerLoading="loadingStatus"
:pagination="false" :pagination="false"
> >
<div slot='fieldSlot' slot-scope="row"> <div slot='description' slot-scope="row">
<template v-if="!row.ifEdit"> <span>{{ simplify(row.description, 16) }}</span>
<span>{{row.type}}</span>
</template>
<template v-else>
<st-inpt v-model="row.type"></st-inpt>
</template>
</div> </div>
<div slot='valueSlot' slot-scope="row"> <div slot='operate'>
<template v-if="!row.ifEdit && row.valueType === 'text'"> <span class="operate-text">{{ '-'}}</span>
<span>{{row.value}}</span>
</template>
<template v-else-if="!row.ifEdit && row.valueType === 'a'">
<a href="#">{{row.value}}</a>
</template>
<template v-else-if="!row.ifEdit && row.valueType === 'img'">
<span></span>
<el-image></el-image>
</template>
<template v-else>
<st-inpt v-model="row.value"></st-inpt>
</template>
</div>
<div slot='childOperate' slot-scope="row">
<span class="operate-text" @click="seeServiceParams(row.id)">{{ '撤销覆盖' }}</span>
<span class="operate-text" @click="sendReq(row.id)">{{ '删除' }}</span>
<span class="operate-text">{{'-'}}</span>
</div> </div>
</st-table> </st-table>
</div> </div>
</div> </div>
<div class="content-item"> <div class="content-item">
<span class="content-item-title">{{'指令:'}}</span> <span class="content-item-title">{{'指令:'}}</span>
<st-input type="textarea" placeholder="请输入Json" class="content-item-one"></st-input> <st-input type="textarea" placeholder="请输入Json" class="content-item-one" v-model="commandContent"></st-input>
</div> </div>
</div> </div>
<st-button type="primary" width="80px" class="sendBtn">{{'发送'}}</st-button> <st-button type="primary" width="80px" class="sendBtn" :loading="buttonLoading" @click="send">{{'发送'}}</st-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { rTimeMin, copyText } from '@/utils/system.js' import { rTimeMin, copyText } from '@/utils/system.js'
import { postServiceCommand } from '@/axios'
export default { export default {
computed: { computed: {
// 获取设备状态颜色 // 获取设备状态颜色
...@@ -98,12 +77,12 @@ export default { ...@@ -98,12 +77,12 @@ export default {
}, },
data() { data() {
return { return {
commandContent: '',
buttonLoading: false,
dynamicTags: ['标签一', '标签二', '标签三'], dynamicTags: ['标签一', '标签二', '标签三'],
inputVisible: false, inputVisible: false,
inputValue: '', inputValue: '',
tokenList: [ tokenList: [],
{ p1: '小1' },
],
total: 0, total: 0,
loadingStatus: false, loadingStatus: false,
activeTab: 'getParams', activeTab: 'getParams',
...@@ -143,16 +122,17 @@ export default { ...@@ -143,16 +122,17 @@ export default {
definitions: [ definitions: [
{ {
label: '服务', label: '服务',
render: 'p1' render: 'name'
}, { }, {
label: '编号', label: '编号',
render: 'p2' render: 'potuid'
}, { }, {
label: '端口', label: '端口',
render: 'p3' render: 'port'
}, { }, {
label: '描述', label: '描述',
render: 'p3' type: 'slot',
slotName: 'description'
}, { }, {
label: '操作', label: '操作',
type: 'slot', type: 'slot',
...@@ -161,8 +141,33 @@ export default { ...@@ -161,8 +141,33 @@ export default {
], ],
} }
}, },
mounted() {
this.getData()
},
methods: { methods: {
rTimeMin, rTimeMin,
async send() {
const currentService = JSON.parse(sessionStorage.getItem('currentService'))
this.buttonLoading = true
const res = await postServiceCommand({
pots: [currentService.potuid],
command: JSON.parse(this.commandContent)
})
this.buttonLoading = false
if (res && res.data) {
// this.resValue = res.data
}
},
async getData() {
const currentService = JSON.parse(sessionStorage.getItem('currentService'))
this.tokenList = [{
name: currentService.name,
potuid: currentService.potuid,
port: currentService.port,
description: currentService.description,
}]
this.total = 1
},
handleClose(tag) { handleClose(tag) {
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1) this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1)
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="wrapper"> <div class="wrapper">
<div class="content"> <div class="content">
<div class="content-item"> <div class="content-item">
<span class="content-item-title">{{'服务参数:'}}</span> <span class="content-item-title service-params">{{'服务参数:'}}</span>
<div class="content-table"> <div class="content-table">
<st-table <st-table
ref="vTable" ref="vTable"
...@@ -15,33 +15,11 @@ ...@@ -15,33 +15,11 @@
:outerLoading="loadingStatus" :outerLoading="loadingStatus"
:pagination="false" :pagination="false"
> >
<div slot='fieldSlot' slot-scope="row"> <div slot='description' slot-scope="row">
<template v-if="!row.ifEdit"> <span>{{ simplify(row.description, 16) }}</span>
<span>{{row.type}}</span>
</template>
<template v-else>
<st-inpt v-model="row.type"></st-inpt>
</template>
</div> </div>
<div slot='valueSlot' slot-scope="row"> <div slot='operate'>
<template v-if="!row.ifEdit && row.valueType === 'text'"> <span class="operate-text">{{ '-'}}</span>
<span>{{row.value}}</span>
</template>
<template v-else-if="!row.ifEdit && row.valueType === 'a'">
<a href="#">{{row.value}}</a>
</template>
<template v-else-if="!row.ifEdit && row.valueType === 'img'">
<span></span>
<el-image></el-image>
</template>
<template v-else>
<st-inpt v-model="row.value"></st-inpt>
</template>
</div>
<div slot='childOperate' slot-scope="row">
<span class="operate-text" @click="seeServiceParams(row.id)">{{ '撤销覆盖' }}</span>
<span class="operate-text" @click="sendReq(row.id)">{{ '删除' }}</span>
<span class="operate-text">{{'-'}}</span>
</div> </div>
</st-table> </st-table>
</div> </div>
...@@ -52,10 +30,12 @@ ...@@ -52,10 +30,12 @@
size="small" size="small"
width="200px" width="200px"
class="content-select" class="content-select"
:options="requestList"
v-model="requestType"
> >
</st-select> </st-select>
<st-input width="400px" placeholder="输入URL" class="content-item-url"></st-input> <st-input width="400px" placeholder="输入URL" class="content-item-url" v-model="requestUrl"></st-input>
<st-button type="primary" width="80px">{{'发送'}}</st-button> <st-button type="primary" width="80px" @click="send" :loading="buttonLoading">{{'发送'}}</st-button>
</div> </div>
<div class="content-item"> <div class="content-item">
<span class="content-item-title">{{'Header:'}}</span> <span class="content-item-title">{{'Header:'}}</span>
...@@ -102,6 +82,7 @@ ...@@ -102,6 +82,7 @@
<script> <script>
import { rTimeMin, copyText } from '@/utils/system.js' import { rTimeMin, copyText } from '@/utils/system.js'
import { postServiceRequest } from '@/axios'
export default { export default {
computed: { computed: {
// 获取设备状态颜色 // 获取设备状态颜色
...@@ -140,6 +121,9 @@ export default { ...@@ -140,6 +121,9 @@ export default {
} }
} }
}, },
mounted() {
this.getData()
},
data() { data() {
return { return {
bodyValue: '', bodyValue: '',
...@@ -148,20 +132,7 @@ export default { ...@@ -148,20 +132,7 @@ export default {
dynamicTags: ['标签一', '标签二', '标签三'], dynamicTags: ['标签一', '标签二', '标签三'],
inputVisible: false, inputVisible: false,
inputValue: '', inputValue: '',
tokenList: [ tokenList: [],
{ key: { value: 'A', ifEdit: false }, value: { value: 'B', ifEdit: false } },
{ key: { value: 'C', ifEdit: false }, value: { value: 'D', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
],
headDefinitions: [ headDefinitions: [
{ {
label: '键', label: '键',
...@@ -174,16 +145,17 @@ export default { ...@@ -174,16 +145,17 @@ export default {
slotName: 'valueSlot' slotName: 'valueSlot'
} }
], ],
headTokenList: [ // headTokenList: [
{ key: { value: 'A', ifEdit: false }, value: { value: 'B', ifEdit: false } }, // { key: { value: 'A', ifEdit: false }, value: { value: 'B', ifEdit: false } },
{ key: { value: 'C', ifEdit: false }, value: { value: 'D', ifEdit: false } }, // { key: { value: 'C', ifEdit: false }, value: { value: 'D', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } }, // { key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } }, // { key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } }, // { key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } }, // { key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } }, // { key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
{ key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } }, // { key: { value: 'E', ifEdit: false }, value: { value: 'F', ifEdit: false } },
], // ],
headTokenList: [],
total: 0, total: 0,
loadingStatus: false, loadingStatus: false,
activeTab: 'getParams', activeTab: 'getParams',
...@@ -201,48 +173,60 @@ export default { ...@@ -201,48 +173,60 @@ export default {
name: 'sendOrder', name: 'sendOrder',
}, },
], ],
// definitions: [
// {
// label: '字段',
// type: 'slot',
// slotName: 'paramsSlot',
// }, {
// label: '类型',
// type: 'slot',
// slotName: 'typeSlot',
// }, {
// label: '值',
// type: 'slot',
// slotName: 'valueSlot'
// }, {
// label: '操作',
// type: 'slot',
// slotName: 'operate',
// },
// ],
definitions: [ definitions: [
{ {
label: '服务', label: '服务',
render: 'p1' render: 'name'
}, { }, {
label: '编号', label: '编号',
render: 'p2' render: 'potuid'
}, { }, {
label: '端口', label: '端口',
render: 'p3' render: 'port'
}, { }, {
label: '描述', label: '描述',
render: 'p3' type: 'slot',
slotName: 'description'
}, { }, {
label: '操作', label: '操作',
type: 'slot', type: 'slot',
slotName: 'operate', slotName: 'operate',
}, },
], ],
requestList: [
{ label: 'GET', value: 'GET' },
{ label: 'POST', value: 'POST' },
],
requestType: '',
requestUrl: '',
buttonLoading: false
} }
}, },
methods: { methods: {
rTimeMin, rTimeMin,
async send() {
const currentService = JSON.parse(sessionStorage.getItem('currentService'))
const headers = this.headTokenList.map(item => {
return {
keyname: item.key.value,
keyvalue: item.value.value.trim()
}
})
console.log(typeof this.bodyValue, 'type')
const body = JSON.parse(this.bodyValue)
this.buttonLoading = true
const res = await postServiceRequest({
potuid: currentService.potuid,
method: this.requestType,
url: this.requestUrl,
headers: headers,
body: body
})
this.buttonLoading = false
if (res && res.data) {
// this.resValue = res.data
}
},
handleClose(tag) { handleClose(tag) {
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1) this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1)
}, },
...@@ -268,23 +252,34 @@ export default { ...@@ -268,23 +252,34 @@ export default {
row[item].value = this.currentInput row[item].value = this.currentInput
} }
row[item].ifEdit = status row[item].ifEdit = status
this.$set(this.tokenList, index, row) this.$set(this.headTokenList, index, row)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.myInput && this.$refs.myInput.$children[0].focus() this.$refs.myInput && this.$refs.myInput.$children[0].focus()
}) })
}, },
updateScope(row, index) { updateScope(row, index) {
row.editing = true row.editing = true
this.$set(this.tokenList, index, row) this.$set(this.headTokenList, index, row)
}, },
addRow() { addRow() {
const newRow = { key: { value: 'newone', ifEdit: false }, value: { value: 'newone', ifEdit: false } } const newRow = { key: { value: 'newone', ifEdit: false }, value: { value: 'newone', ifEdit: false } }
this.headTokenList.push(newRow) this.headTokenList.push(newRow)
}, },
async getData() {
const currentService = JSON.parse(sessionStorage.getItem('currentService'))
this.tokenList = [{
name: currentService.name,
potuid: currentService.potuid,
port: currentService.port,
description: currentService.description,
}]
this.total = 1
}
} }
} }
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
.service-params
::v-deep .el-table__body-wrapper.is-scrolling-none ::v-deep .el-table__body-wrapper.is-scrolling-none
max-height: 224px !important max-height: 224px !important
.table-box .table-box
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</div> </div>
<div class="page-nav"> <div class="page-nav">
<div class="page-nav-title"> <div class="page-nav-title">
<span>{{'AIPS'}}</span> <span>{{$store.getters.currentService.serviceName}}</span>
</div> </div>
<st-table <st-table
ref="vTable" ref="vTable"
...@@ -18,17 +18,17 @@ ...@@ -18,17 +18,17 @@
:pagination="false" :pagination="false"
> >
<div slot='codeSlot' slot-scope="row"> <div slot='codeSlot' slot-scope="row">
<span>{{ simplify(row.code, 3) }}</span> <span>{{ simplify(row.deviceid, 3) }}</span>
<i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.code)"></i> <i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.deviceid)"></i>
</div> </div>
<div slot='status' slot-scope="row"> <div slot='status' slot-scope="row" class="status">
<span class="circleStatus" :style="{color: getStatusColor(row.status)}">{{ getStatusText(row.status) }}</span> <span class="circleStatus" :style="{color: getStatusColor(row.state)}">{{ getStatusText(row.state) }}</span>
</div> </div>
<div slot='structureSlot' slot-scope="row"> <div slot='structureSlot' slot-scope="row">
<span>{{ simplify(row.structure, 6) }}</span> <span>{{ simplify(row.structure, 6) }}</span>
</div> </div>
<div slot='registerTimeSlot' slot-scope="row"> <div slot='registerTimeSlot' slot-scope="row">
<span>{{ rTimeMin(row.registerTime) }}</span> <span>{{ (row.register_date) }}</span>
</div> </div>
<div slot='tagsSlot' slot-scope="row"> <div slot='tagsSlot' slot-scope="row">
<el-tooltip class="item" effect="dark" :content="row.tags ? row.tags.join('、') : ''" placement="top"> <el-tooltip class="item" effect="dark" :content="row.tags ? row.tags.join('、') : ''" placement="top">
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
</el-tooltip> </el-tooltip>
</div> </div>
<div slot='servicesSlot' slot-scope="row"> <div slot='servicesSlot' slot-scope="row">
<el-tooltip class="item" effect="dark" :content="row.services ? row.services.join('、') : ''" placement="top"> <el-tooltip class="item" effect="dark" :content="getServiceName(row.services)" placement="top">
<!-- 必须要套一层 --> <!-- 必须要套一层 -->
<div> <div>
<template v-for="(item, index) in row.services"> <template v-for="(item, index) in row.services">
<span v-if="[0, 2].indexOf(index) !== -1" :key="index" class="service-item">{{ simplify(item, 4) }}</span> <span v-if="[0, 1, 2].indexOf(index) !== -1" :key="index" class="service-item">{{ simplify(item.name, 4) }}</span>
</template> </template>
<span v-if="(row.services && row.services.length) > 10">共: {{(row.services && row.services.length) ? row.services.length : 0}} 条</span> <span v-if="(row.services && row.services.length) > 10">共: {{(row.services && row.services.length) ? row.services.length : 0}} 条</span>
</div> </div>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<span>{{ simplify(row.system, 7) }}</span> <span>{{ simplify(row.system, 7) }}</span>
</div> </div>
<div slot='operate' slot-scope="row"> <div slot='operate' slot-scope="row">
<span class="operate-text" @click="delete(row.id)">{{'详情'}}</span> <span class="operate-text" @click="detail(row.deviceid)">{{'详情'}}</span>
</div> </div>
</st-table> </st-table>
</div> </div>
...@@ -77,6 +77,8 @@ import getParams from './components/GetParams.vue' ...@@ -77,6 +77,8 @@ import getParams from './components/GetParams.vue'
import sendRequest from './components/SendRequest.vue' import sendRequest from './components/SendRequest.vue'
import sendOrder from './components/SendOrder.vue' import sendOrder from './components/SendOrder.vue'
import { rTimeMin, copyText } from '@/utils/system.js' import { rTimeMin, copyText } from '@/utils/system.js'
import { getService, getServiceDevice } from '@/axios'
export default { export default {
components: { components: {
getParams, getParams,
...@@ -84,16 +86,21 @@ export default { ...@@ -84,16 +86,21 @@ export default {
sendOrder sendOrder
}, },
computed: { computed: {
getServiceName() {
return item => {
return item.map(t1 => t1.name).join()
}
},
// 获取设备状态颜色 // 获取设备状态颜色
getStatusColor() { getStatusColor() {
return item => { return item => {
switch (item) { switch (item) {
case 'online': case 1:
return '#67C23A' return '#67C23A'
case 'offline': case 2:
return '#999999'
default:
return '#F56C6C' return '#F56C6C'
default:
return '#999999'
} }
} }
}, },
...@@ -101,12 +108,12 @@ export default { ...@@ -101,12 +108,12 @@ export default {
getStatusText() { getStatusText() {
return item => { return item => {
switch (item) { switch (item) {
case 'online': case 1:
return '在线' return '在线'
case 'offline': case 2:
return '离线'
default:
return '异常' return '异常'
default:
return '离线'
} }
} }
}, },
...@@ -123,7 +130,6 @@ export default { ...@@ -123,7 +130,6 @@ export default {
data() { data() {
return { return {
tokenList: [ tokenList: [
{ name: '小1', code: '110123124325' },
], ],
total: 0, total: 0,
loadingStatus: false, loadingStatus: false,
...@@ -152,13 +158,13 @@ export default { ...@@ -152,13 +158,13 @@ export default {
type: 'slot', type: 'slot',
slotName: 'status', slotName: 'status',
statusColor: item => { statusColor: item => {
switch (item.status) { switch (item.state) {
case 'online': case 1:
return '#67C23A' return '#67C23A'
case 'offline': case 2:
return '#999999'
default:
return '#F56C6C' return '#F56C6C'
default:
return '#999999'
} }
} }
}, { }, {
...@@ -171,7 +177,7 @@ export default { ...@@ -171,7 +177,7 @@ export default {
slotName: 'systemSlot' slotName: 'systemSlot'
}, { }, {
label: 'IP', label: 'IP',
render: 'IP' render: 'ip'
}, { }, {
label: '注册时间', label: '注册时间',
type: 'slot', type: 'slot',
...@@ -190,14 +196,44 @@ export default { ...@@ -190,14 +196,44 @@ export default {
slotName: 'operate', slotName: 'operate',
}, },
], ],
currentDeviceId: '',
} }
}, },
methods: { methods: {
rTimeMin rTimeMin,
async getServiceParams() {
const res = await getServiceParams(this.serviceId)
},
async getData() {
const res = await getServiceDevice({ deviceid: this.currentDeviceId })
if (res && res.data && res.data.device) {
this.tokenList = [JSON.parse(JSON.stringify(res.data.device))]
this.total = 1
} else {
this.tokenList = []
this.total = 0
}
},
// 跳转到设备详情页面
detail(deviceid) {
this.$store.commit('changeCurrentDevice', deviceid)
this.$router.push({ name: 'device-detail' })
},
},
mounted() {
if (this.$store.getters.currentDevice !== '') {
sessionStorage.setItem('currentDevice', this.$store.getters.currentDevice)
} }
this.currentDeviceId = sessionStorage.getItem('currentDevice')
this.getData()
},
} }
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
.service-item
margin-right: 20px
.circleStatus
margin-left: 6px
.icon-fuzhi-text .icon-fuzhi-text
margin-left: 6px margin-left: 6px
color: #409EFF color: #409EFF
...@@ -227,6 +263,12 @@ export default { ...@@ -227,6 +263,12 @@ export default {
flex: 1 0 0 flex: 1 0 0
overflow-y: visible overflow-y: visible
overflow-x: hidden overflow-x: hidden
.page-nav
::v-deep.el-table__body-wrapper
max-height: none !important
::v-deep.pagination
margin-top: 0
margin-bottom: 0
.table-list .table-list
flex: 1 0 0 !important flex: 1 0 0 !important
overflow: visible !important overflow: visible !important
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<div class="search-item"> <div class="search-item">
<span class="search-title">状态:</span> <span class="search-title">状态:</span>
<el-checkbox-group v-model="search.checkList" class="inline-div"> <el-checkbox-group v-model="search.checkList" class="inline-div">
<el-checkbox label="1" class="check-title">在线</el-checkbox> <el-checkbox :label="1" class="check-title">在线</el-checkbox>
<el-checkbox label="2" class="check-title">离线</el-checkbox> <el-checkbox :label="0" class="check-title">离线</el-checkbox>
<el-checkbox label="3" class="check-title">异常</el-checkbox> <el-checkbox :label="2" class="check-title">异常</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div v-if="!isCollapse"> <div v-if="!isCollapse">
...@@ -94,7 +94,8 @@ ...@@ -94,7 +94,8 @@
<div class="page-content"> <div class="page-content">
<div class="content-header flex-right-content"> <div class="content-header flex-right-content">
<nameFilter <nameFilter
placeholder="请输入搜索内容"> placeholder="请输入搜索内容"
@startSearch="startSearch">
</nameFilter> </nameFilter>
</div> </div>
<div class="table-list"> <div class="table-list">
...@@ -111,17 +112,17 @@ ...@@ -111,17 +112,17 @@
:childOptions="childDefinitions" :childOptions="childDefinitions"
> >
<div slot='codeSlot' slot-scope="row"> <div slot='codeSlot' slot-scope="row">
<span>{{ simplify(row.code, 3) }}</span> <span>{{ simplify(row.deviceid, 3) }}</span>
<i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.code)"></i> <i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.code)"></i>
</div> </div>
<div slot='status' slot-scope="row"> <div slot='status' slot-scope="row" class="status">
<span class="circleStatus" :style="{color: getStatusColor(row.status)}">{{ getStatusText(row.status) }}</span> <span class="circleStatus" :style="{color: getStatusColor(row.state)}">{{ getStatusText(row.state) }}</span>
</div> </div>
<div slot='structureSlot' slot-scope="row"> <div slot='structureSlot' slot-scope="row">
<span>{{ simplify(row.structure, 6) }}</span> <span>{{ simplify(row.structure, 6) }}</span>
</div> </div>
<div slot='registerTimeSlot' slot-scope="row"> <div slot='registerTimeSlot' slot-scope="row">
<span>{{ rTimeMin(row.registerTime) }}</span> <span>{{ (row.register_date) }}</span>
</div> </div>
<div slot='tagsSlot' slot-scope="row"> <div slot='tagsSlot' slot-scope="row">
<el-tooltip class="item" effect="dark" :content="row.tags ? row.tags.join('、') : ''" placement="top"> <el-tooltip class="item" effect="dark" :content="row.tags ? row.tags.join('、') : ''" placement="top">
...@@ -135,11 +136,11 @@ ...@@ -135,11 +136,11 @@
</el-tooltip> </el-tooltip>
</div> </div>
<div slot='servicesSlot' slot-scope="row"> <div slot='servicesSlot' slot-scope="row">
<el-tooltip class="item" effect="dark" :content="row.services ? row.services.join('、') : ''" placement="top"> <el-tooltip class="item" effect="dark" :content="getServiceName(row.services)" placement="top">
<!-- 必须要套一层 --> <!-- 必须要套一层 -->
<div> <div>
<template v-for="(item, index) in row.services"> <template v-for="(item, index) in row.services">
<span v-if="[0, 2].indexOf(index) !== -1" :key="index" class="service-item">{{ simplify(item, 4) }}</span> <span v-if="[0, 1, 2].indexOf(index) !== -1" :key="index" class="service-item">{{ simplify(item.name, 4) }}</span>
</template> </template>
<span v-if="(row.services && row.services.length) > 10">共: {{(row.services && row.services.length) ? row.services.length : 0}} 条</span> <span v-if="(row.services && row.services.length) > 10">共: {{(row.services && row.services.length) ? row.services.length : 0}} 条</span>
</div> </div>
...@@ -149,23 +150,23 @@ ...@@ -149,23 +150,23 @@
<span>{{ simplify(row.system, 7) }}</span> <span>{{ simplify(row.system, 7) }}</span>
</div> </div>
<div slot='operate' slot-scope="row"> <div slot='operate' slot-scope="row">
<span class="operate-text" @click="detail(row.id)">{{ '详情 '}}</span> <span class="operate-text" @click="detail(row.deviceid)">{{ '详情 '}}</span>
</div> </div>
<!-- eslint-disable-next-line --> <!-- eslint-disable-next-line -->
<div slot='childServiceSlot' slot-scope="row"> <div slot='childServiceSlot' slot-scope="row">
<span>{{ row.service }}</span> <span>{{ row.name }}</span>
</div> </div>
<div slot='childCodeSlot' slot-scope="row"> <div slot='childCodeSlot' slot-scope="row">
<span>{{ row.code }}</span> <span>{{ row.potuid }}</span>
</div> </div>
<div slot='portSlot' slot-scope="row"> <div slot='portSlot' slot-scope="row">
<span>{{ row.port }}</span> <span>{{ row.port }}</span>
</div> </div>
<div slot='descSlot' slot-scope="row"> <div slot='descSlot' slot-scope="row">
<span>{{ simplify(row.desc, 10) }}</span> <span>{{ simplify(row.description, 10) }}</span>
</div> </div>
<div slot='childOperate' slot-scope="row"> <div slot='childOperate' slot-scope="row">
<span class="operate-text" @click="seeServiceParams(row.id)">{{ '查看参数' }}</span> <span class="operate-text" @click="seeServiceParams(row)">{{ '查看参数' }}</span>
<span class="operate-text" @click="sendReq(row.id)">{{ '发送请求' }}</span> <span class="operate-text" @click="sendReq(row.id)">{{ '发送请求' }}</span>
<span class="operate-text" @click="sendOrder(row.id)">{{ '发送指令' }}</span> <span class="operate-text" @click="sendOrder(row.id)">{{ '发送指令' }}</span>
</div> </div>
...@@ -180,6 +181,7 @@ import browserStorage from '@/services/local-storage' ...@@ -180,6 +181,7 @@ import browserStorage from '@/services/local-storage'
import Dialog from '@/helpers/dialog' import Dialog from '@/helpers/dialog'
import validate from '@/components/seeta-ui/seeta-form/validator' import validate from '@/components/seeta-ui/seeta-form/validator'
import { rTimeMin, copyText } from '@/utils/system.js' import { rTimeMin, copyText } from '@/utils/system.js'
import { getDevice, getDeviceService, getTag } from '@/axios'
export default { export default {
data() { data() {
return { return {
...@@ -194,9 +196,8 @@ export default { ...@@ -194,9 +196,8 @@ export default {
time2: '', time2: '',
// 表格数据 // 表格数据
tokenList: [ tokenList: [
{ name: '小1', code: '110123124325', child: { service: '11', code: '123', port: '1234', desc: '这是服务1' } },
], ],
total: 1, total: 0,
// 编辑和添加表单 // 编辑和添加表单
form: { form: {
}, },
...@@ -227,7 +228,7 @@ export default { ...@@ -227,7 +228,7 @@ export default {
definitions: [ definitions: [
{ {
label: '序号', label: '序号',
render: 'orderNumber', render: 'id',
}, { }, {
label: '编号', label: '编号',
type: 'slot', type: 'slot',
...@@ -237,13 +238,13 @@ export default { ...@@ -237,13 +238,13 @@ export default {
type: 'slot', type: 'slot',
slotName: 'status', slotName: 'status',
statusColor: item => { statusColor: item => {
switch (item.status) { switch (item.state) {
case 'online': case 1:
return '#67C23A' return '#67C23A'
case 'offline': case 2:
return '#999999'
default:
return '#F56C6C' return '#F56C6C'
default:
return '#999999'
} }
} }
}, { }, {
...@@ -256,7 +257,7 @@ export default { ...@@ -256,7 +257,7 @@ export default {
slotName: 'systemSlot' slotName: 'systemSlot'
}, { }, {
label: 'IP', label: 'IP',
render: 'IP' render: 'ip'
}, { }, {
label: '注册时间', label: '注册时间',
type: 'slot', type: 'slot',
...@@ -284,16 +285,21 @@ export default { ...@@ -284,16 +285,21 @@ export default {
} }
}, },
computed: { computed: {
getServiceName() {
return item => {
return item.map(t1 => t1.name).join()
}
},
// 获取设备状态颜色 // 获取设备状态颜色
getStatusColor() { getStatusColor() {
return item => { return item => {
switch (item) { switch (item) {
case 'online': case 1:
return '#67C23A' return '#67C23A'
case 'offline': case 2:
return '#999999'
default:
return '#F56C6C' return '#F56C6C'
default:
return '#999999'
} }
} }
}, },
...@@ -301,12 +307,12 @@ export default { ...@@ -301,12 +307,12 @@ export default {
getStatusText() { getStatusText() {
return item => { return item => {
switch (item) { switch (item) {
case 'online': case 1:
return '在线' return '在线'
case 'offline': case 2:
return '离线'
default:
return '异常' return '异常'
default:
return '离线'
} }
} }
}, },
...@@ -323,7 +329,12 @@ export default { ...@@ -323,7 +329,12 @@ export default {
methods: { methods: {
rTimeMin, rTimeMin,
copyText, copyText,
seeServiceParams(id) { startSearch(value) {
this.getData()
},
seeServiceParams(row) {
this.$store.commit('changeCurrentDevice', row.deviceId)
this.$store.commit('changeCurrentService', row)
this.$router.push({ name: 'device-service' }) this.$router.push({ name: 'device-service' })
}, },
sendReq(id) { sendReq(id) {
...@@ -350,8 +361,57 @@ export default { ...@@ -350,8 +361,57 @@ export default {
} }
}, },
// 跳转到设备详情页面 // 跳转到设备详情页面
detail(id) { detail(deviceid) {
this.$store.commit('changeCurrentDevice', deviceid)
this.$router.push({ name: 'device-detail' }) this.$router.push({ name: 'device-detail' })
},
async getData() {
const res = await getDevice({
state: this.search.checkList,
pages: this.pi,
pagesize: this.ps,
structure: this.search.structure,
system: this.search.system,
register_date: this.search.registerTime && this.search.registerTime.length ? this.search.registerTime[0] : '',
online_date: this.search.onlineTime && this.search.onlineTime.length ? this.search.onlineTime[0] : '',
tag: this.search.tags,
service: this.search.services
})
if (res && res.data) {
this.tokenList = JSON.parse(JSON.stringify(res.data.data.devices))
this.tokenList.forEach(item => {
item.services.forEach(s1 => {
s1.deviceId = item.deviceid
})
item.child = JSON.parse(JSON.stringify(item.services))
})
this.total = res.data.data.total
} else {
this.tokenList = []
this.total = 0
}
},
async getService() {
const res = await getDeviceService()
if (res) {
this.serviceList = res.data.services.map(item => {
return {
label: item,
value: item
}
})
}
},
async getTag() {
const res = await getTag()
if (res) {
this.tagList = res.data.tags.map(item => {
return {
label: item,
value: item
}
})
}
} }
}, },
watch: { watch: {
...@@ -363,6 +423,9 @@ export default { ...@@ -363,6 +423,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.getData()
this.getService()
this.getTag()
}, },
destroyed() { destroyed() {
}, },
...@@ -373,6 +436,11 @@ export default { ...@@ -373,6 +436,11 @@ export default {
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
.service-item
margin-right: 20px
.cell
::v-deep .any-slot
display: inline-block
.page-nav .page-nav
font-family: PingFangSC-Regular font-family: PingFangSC-Regular
font-size: 14px font-size: 14px
......
<template>
<div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'参数模板 / 添加'}}</span>
</div>
<div class="page-content">
<st-form class="flex-form"
ref="form"
label-width="100px"
:model="form"
:rules="rules">
<st-form-item
:label="'模板名称'+':'"
prop="name">
<st-input v-model="form.name"></st-input>
</st-form-item>
<st-form-item
:label="'模板类型'+':'"
prop="type">
<st-input v-model="form.type"></st-input>
</st-form-item>
<st-form-item
:label="'基础模板'+':'"
prop="base">
<!-- <st-select
v-model="form.base"
:options="baseOptions"
size="small"
class="contents"
clearable
>
</st-select> -->
<el-select v-model="form.base" placeholder="请选择" style="width: 400px;height: 32px;line-height: 32px">
<el-option
v-for="item in baseOptions"
:key="item.name"
:label="item.name"
:value="item.name">
</el-option>
</el-select>
</st-form-item>
<st-form-item class="textarea"
:label="'描述'+':'"
prop="description">
<st-input
type="textarea"
placeholder="请输入描述"
v-model="form.description"
maxlength="100"
show-word-limit
>
</st-input>
</st-form-item>
<st-form-item class="flex-item"
:label="'参数'+':'"
prop="description">
<div>
<el-table :max-height="flexHeight"
ref="singleTable"
:data="tableData"
highlight-current-row
@current-change="handleCurrentChange"
@row-click="rowClick"
@cell-click="cellClick"
style="width: 100%">
<el-table-column label="字段">
<template slot-scope="scope">
<input type="text" v-model="scope.row.field" @blur="handleBlur" placeholder="请输入">
</template>
</el-table-column>
<el-table-column label="类型">
<template slot-scope="scope">
<pack-select v-model="scope.row.type" placeholder="请选择" @blur="handleBlur" @visible-change="handleVisibleChange" @change="handleChange(scope.row)">
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</pack-select>
</template>
</el-table-column>
<el-table-column label="值">
<template slot-scope="scope">
<input v-if="scope.row.type === 'string' || scope.row.type === 'number'" type="text" v-model="scope.row.value" @blur="handleBlur" placeholder="请输入">
<div class="btn-box" v-if="scope.row.type === 'blob'">
<span class="upload-btn" v-if="!scope.row.value">Select File</span>
<input type="file" @blur="handleBlur" @change="(event) => handleUpload(event, scope.row)" class="input-btn" v-if="!scope.row.value">
<span v-if="scope.row.value">
<span style="float: left;margin-right: 10px">{{calculateByte(scope.row.value)}}字节</span>
<el-image style="width: 42px; height: 28px;overflow: visible" :src="scope.row.value" fit="fit">
<div slot="error" style="width: 80px; height: 28px;overflow: visible">(不可预览)</div>
</el-image>
</span>
</div>
<div v-if="scope.row.type === 'table'">
<pack-select v-model="scope.row.value" placeholder="请选择" @blur="handleBlur" @visible-change="handleVisibleChange">
<el-option
v-for="item in tableOptions"
:key="item.name"
:label="item.name"
:value="item.name">
</el-option>
</pack-select>
</div>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<span @click="handleDelete(scope.$index)" class="delete-btn">删除</span>
</template>
</el-table-column>
</el-table>
<div class="add-btn" @click="insertTableData">
<span class="add-btn-text"><i class="iconfont icon-tianjia"></i> 添加</span>
</div>
</div>
</st-form-item>
</st-form>
<div class="buttons">
<st-button @click="cancel"><span class="text">{{'取消'}}</span></st-button>
<st-button type="primary" @click="save"><span class="text">{{'保存'}}</span></st-button>
</div>
</div>
</div>
</template>
<script>
import { createParameter, getTable, getParameter } from '@/axios'
import { fileToBase64 } from '@/utils/typeConversion'
import { calculateByte } from '@/utils/system'
import Dialog from '@/helpers/dialog'
export default {
data() {
return {
form: {},
rules: [],
typeOptions: [{
value: 'number',
label: 'number'
}, {
value: 'string',
label: 'string'
}, {
value: 'table',
label: 'table'
}, {
value: 'blob',
label: 'blob'
}],
tableOptions: [],
baseOptions: [],
tableData: [],
flexHeight: 0,
currentRow: ''
}
},
created() {
this.setFlexHeight()
},
mounted() {
this.setFlexHeight()
window.onresize = () => {
setTimeout(() => {
this.setFlexHeight()
}, 10)
}
this.getTableOptions()
this.getBaseOptions()
},
methods: {
calculateByte: base64 => calculateByte(base64),
async getTableOptions() {
const res = await getTable({ pages: 0, pagesize: 10000000000 })
if (res && res.data && res.data.code === 0) {
this.tableOptions = res.data.data.tables
}
},
async getBaseOptions() {
if (this.$route.query.level === '1') return
const res = await getParameter({ base: 1, pages: 0, pagesize: 10000000000 })
if (res && res.data && res.data.code === 0) {
this.baseOptions = res.data.parameters.datas
}
},
async save() {
const tableData = this.tableData.filter(item => item.field && item.value)
const scalarsArr = tableData.filter(item => item.type === 'string' || item.type === 'number')
const binaryArr = tableData.filter(item => item.type === 'blob')
const tableArr = tableData.filter(item => item.type === 'table')
const scalarsObj = {}
const binaryObj = {}
const tableObj = {}
for (let i = 0; i < scalarsArr.length; i++) {
scalarsObj[scalarsArr[i].field] = scalarsArr[i].value
}
for (let j = 0; j < binaryArr.length; j++) {
binaryObj[binaryArr[j].field] = binaryArr[j].value
}
for (let k = 0; k < tableArr.length; k++) {
tableObj[tableArr[k].field] = tableArr[k].value
}
const res = await createParameter({
...this.form,
parameters: {
scalars: scalarsObj,
binary: binaryObj,
table: tableObj
}
})
if (res && res.data && res.data.code === 0) {
Toast.success('操作成功')
this.$router.push({ path: '/params' })
}
},
cancel() {
this.$router.push({ path: '/params' })
},
async handleUpload(event, row) {
row.value = await fileToBase64(event.target.files[0])
},
insertTableData() {
this.tableData.push({ field: '', type: '', value: '' })
},
handleDelete(index) {
this.tableData.splice(index, 1)
},
setFlexHeight() {
const ele = document.getElementsByClassName('flex-item') && document.getElementsByClassName('flex-item')[0]
this.flexHeight = ele && ele.clientHeight
},
handleChange(row) {
row.value = ''
},
handleVisibleChange(val) {
if (!val) {
this.setCurrent()
}
},
handleBlur(event) {
this.setCurrent()
event.target && event.target.classList && event.target.classList.remove('write')
},
cellClick(row, column, cell, event) {
if (cell.getElementsByTagName('input')[0]) {
cell.getElementsByTagName('input')[0].classList.add('write')
cell.getElementsByTagName('input')[0].focus()
}
},
rowClick(row, column, event) {
this.setCurrent(row)
},
setCurrent(row) {
this.$refs.singleTable.setCurrentRow(row)
},
handleCurrentChange(val) {
this.currentRow = val
}
}
}
</script>
<style lang="sass" scoped>
.page-content
text-align: left
position: relative
::v-deep input
height: 32px
line-height: 32px
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
::v-deep.el-input__icon
height: 32px
line-height: 32px
::v-deep.el-form-item, ::v-deep.el-form-item__label, ::v-deep.el-form-item__content
height: 32px
line-height: 32px
margin-bottom: 24px
::v-deep.el-form-item.textarea
height: 100px
::v-deep.el-input__inner, ::v-deep.el-textarea, ::v-deep.el-textarea__inner
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color: #333
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
::v-deep.el-table tbody tr:hover>td
background: #ecf5ff!important
::v-deep.el-table tbody tr.current-row input[type=text]
background: rgba(0, 0, 0, 0)
::v-deep.el-table tbody tr.current-row input[type=text].write
background: #fff
::v-deep.el-table tbody tr.current-row>td
background: #ecf5ff!important
.el-table
::v-deep .el-input__icon
line-height: 32px
::v-deep .myselect
border: none
width: 194px
height: 32px
background: rgba(0, 0, 0, 0)
font-family: PingFangSC-Regular, PingFang SC, Avenir, Helvetica, Arial, sans-serif
font-size: 14px
color: #666
::v-deep input[type=text], ::v-deep input[type=password], ::v-deep input[type=number], ::v-deep textarea
border: none
font-family: PingFangSC-Regular, PingFang SC, Avenir, Helvetica, Arial, sans-serif
font-size: 14px
color: #666
background: rgba(0, 0, 0, 0)
height: 32px
::v-deep thead
font-size: 14px
font-family: PingFang-SC-Bold, PingFang-SC
font-weight: bold
color: #333333
line-height: 20px
::v-deep th
font-weight: 'bold'
border-top: 1px solid #E8EBF2
padding-left: 12px
background: #F5F7FA
::v-deep td
padding: 6px 0
.flex-form
height: calc(100% - 60px)
overflow: hidden
.flex-item
height: calc(100% - 370px)
.delete-btn
margin-left: 12px
color: #F56C6C
cursor: pointer
.add-btn
height: 32px
line-height: 28px
margin-top: 30px
border: 2px dashed #D7DAE0
border-radius: 2px
border-radius: 2px
text-align: center
.add-btn-text
display: inline-block
height: 28px
line-height: 28px
.icon-tianjia
color: #666
.buttons
position: absolute
bottom: 0
right: 0
height: 60px
line-height: 60px
border-top: 1px solid #ddd
width: 100%
padding: 0 20px
text-align: right
.btn-box
// width: 80px
height: 24px
margin-left: 14px
position: relative
&:hover .upload-btn
background: #ccc
.upload-btn
background: #ddd
width: 80px
height: 24px
border-radius: 4px
text-align: center
position: absolute
.input-btn
width: 80px
height: 24px
opacity: 0
position: absolute
.file-btn
height: 24px
position: absolute
border: 1px solid #CCC
border-radius: 4px
padding: 0 24px 0 10px
.icon-guanbi
position: absolute
top: 0
right: 0
font-size: 10px
width: 24px
text-align: center
</style>
<template>
<div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'参数模板 / 详情'}}</span>
</div>
<div class="page-content">
<st-form class="flex-form"
ref="form"
label-width="100px"
:model="form">
<st-form-item :label="'模板名称'+':'">
<span>{{form.name}}</span>
</st-form-item>
<st-form-item :label="'模板类型'+':'">
<span>{{form.type}}</span>
</st-form-item>
<st-form-item :label="'基础模板'+':'">
<span>{{form.base}}</span>
</st-form-item>
<st-form-item :label="'描述'+':'">
<span>{{form.description}}</span>
</st-form-item>
<st-form-item :label="'参数'+':'" class="flex1">
<st-table
ref="vTable"
:options="definitions"
:pagination="false"
:data="{
list: tokenList,
total: total,
}"
:outerLoading="loadingStatus">
<div slot="value" slot-scope="row">
<span v-if="row.type === 'number' || row.type === 'string'">{{row.value}}</span>
<span v-if="row.type === 'blob'" style="line-height: 28px">
<!-- TODO -->
<span style="float: left;margin-right: 10px">{{calculateByte(row.value)}}字节</span>
<el-image style="width: 42px; height: 28px;overflow: visible" :src="row.value" fit="fit">
<div slot="error" style="width: 80px; height: 28px;overflow: visible">(不可预览)</div>
</el-image>
</span>
<span v-if="row.type === 'table'" style="color: #409EFF; cursor: pointer" @click="$router.push({ path: '/data' })">{{row.value}}</span>
</div>
</st-table>
</st-form-item>
</st-form>
</div>
</div>
</template>
<script>
import { detailParameter } from '@/axios'
import { calculateByte } from '@/utils/system'
export default {
data() {
return {
form: {},
loadingStatus: false,
definitions: [
{
label: '字段',
render: 'field'
},
{
label: '类型',
render: 'type'
},
{
label: '值',
type: 'slot',
slotName: 'value'
}
],
tokenList: [],
total: 0
}
},
async mounted() {
this.loadingStatus = true
const res = await detailParameter({ name: this.$route.query.name })
if (res && res.data && res.data.code === 0) {
this.form = res.data
const binaryObj = res.data.parameters.binary
const scalarsObj = res.data.parameters.scalars
const tableObj = res.data.parameters.table
for (const key in binaryObj) {
this.tokenList.push({ field: key, type: 'blob', value: binaryObj[key] })
}
for (const key in scalarsObj) {
this.tokenList.push({ field: key, type: typeof scalarsObj[key], value: scalarsObj[key] })
}
for (const key in tableObj) {
this.tokenList.push({ field: key, type: 'table', value: tableObj[key] })
}
}
this.loadingStatus = false
},
methods: {
calculateByte: base64 => calculateByte(base64),
}
}
</script>
<style lang="sass" scoped>
.page-content
::v-deep.el-form-item
margin-bottom: 20px
.flex-form
display: flex
flex-direction: column
height: 100%
text-align: left
.flex1
flex: 1
::v-deep.el-form-item__content
height: 100%!important
::v-deep .el-table__row
height: 48px
::v-deep td
padding: 10px 0
::v-deep .cell
height: 28px
line-height: 28px!important
</style>
<template>
<div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'参数模板 / 编辑'}}</span>
</div>
<div class="page-content">
<st-form class="flex-form"
ref="form"
label-width="100px"
:model="form"
:rules="rules">
<st-form-item
:label="'模板名称'+':'"
prop="name">
<st-input v-model="form.name" :disabled="true"></st-input>
</st-form-item>
<st-form-item
:label="'模板类型'+':'"
prop="type">
<st-input v-model="form.type"></st-input>
</st-form-item>
<st-form-item
:label="'基础模板'+':'"
prop="base">
<!-- <st-select
v-model="form.name"
:options="modelOptions"
size="small"
class="contents"
clearable
>
</st-select> -->
<el-select v-model="form.base" placeholder="请选择" style="width: 400px;height: 32px;line-height: 32px">
<el-option
v-for="item in baseOptions"
:key="item.name"
:label="item.name"
:value="item.name">
</el-option>
</el-select>
</st-form-item>
<st-form-item class="textarea"
:label="'描述'+':'"
prop="description">
<st-input
type="textarea"
placeholder="请输入描述"
v-model="form.description"
maxlength="100"
show-word-limit
>
</st-input>
</st-form-item>
<st-form-item class="flex-item"
:label="'参数'+':'"
prop="description">
<div>
<el-table :max-height="flexHeight"
ref="singleTable"
:data="tableData"
highlight-current-row
@current-change="handleCurrentChange"
@row-click="rowClick"
@cell-click="cellClick"
style="width: 100%"
v-loading="loadingStatus">
<el-table-column label="字段">
<template slot-scope="scope">
<input type="text" v-model="scope.row.field" @blur="handleBlur" placeholder="请输入">
</template>
</el-table-column>
<el-table-column label="类型">
<template slot-scope="scope">
<pack-select v-model="scope.row.type" placeholder="请选择" @blur="handleBlur" @visible-change="handleVisibleChange" @change="handleChange(scope.row)">
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</pack-select>
</template>
</el-table-column>
<el-table-column label="值">
<template slot-scope="scope">
<input v-if="scope.row.type === 'string' || scope.row.type === 'number'" type="text" v-model="scope.row.value" @blur="handleBlur" placeholder="请输入">
<div class="btn-box" v-if="scope.row.type === 'blob'">
<span class="upload-btn" v-if="!scope.row.value">Select File</span>
<input type="file" @blur="handleBlur" @change="(event) => handleUpload(event, scope.row)" class="input-btn" v-if="!scope.row.value">
<span v-if="scope.row.value" style="float: left;margin-right: 10px">{{calculateByte(scope.row.value)}}字节</span>
<el-image v-if="scope.row.value" style="width: 42px; height: 28px;overflow: visible" :src="scope.row.value" fit="fit">
<div slot="error" style="width: 80px; height: 28px;overflow: visible">(不可预览)</div>
</el-image>
</div>
<div v-if="scope.row.type === 'table'">
<pack-select v-model="scope.row.value" placeholder="请选择" @blur="handleBlur" @visible-change="handleVisibleChange">
<el-option
v-for="item in tableOptions"
:key="item.name"
:label="item.name"
:value="item.name">
</el-option>
</pack-select>
</div>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<span @click="handleDelete(scope.$index)" class="delete-btn">删除</span>
</template>
</el-table-column>
</el-table>
<div class="add-btn" @click="insertTableData">
<span class="add-btn-text"><i class="iconfont icon-tianjia"></i> 添加</span>
</div>
</div>
</st-form-item>
</st-form>
<div class="buttons">
<st-button @click="cancel"><span class="text">{{'取消'}}</span></st-button>
<st-button type="primary" @click="save"><span class="text">{{'保存'}}</span></st-button>
</div>
</div>
</div>
</template>
<script>
import { editParameter, getParameter, detailParameter, getTable } from '@/axios'
import { fileToBase64 } from '@/utils/typeConversion'
import { calculateByte } from '@/utils/system'
import Dialog from '@/helpers/dialog'
export default {
data() {
return {
form: {},
rules: [],
file: '',
loadingStatus: false,
typeOptions: [{
value: 'number',
label: 'number'
}, {
value: 'string',
label: 'string'
}, {
value: 'table',
label: 'table'
}, {
value: 'blob',
label: 'blob'
}],
tableOptions: [],
baseOptions: [],
tableData: [],
flexHeight: 0,
currentRow: ''
}
},
created() {
this.setFlexHeight()
},
mounted() {
this.setFlexHeight()
window.onresize = () => {
setTimeout(() => {
this.setFlexHeight()
}, 10)
}
this.getData()
this.getTableOptions()
this.getBaseOptions()
},
methods: {
calculateByte: base64 => calculateByte(base64),
async getTableOptions() {
const res = await getTable({ pages: 0, pagesize: 10000000000 })
if (res && res.data && res.data.code === 0) {
this.tableOptions = res.data.data.tables
}
},
async getBaseOptions() {
if (this.$route.query.level === '1') return
const res = await getParameter({ base: 1, pages: 0, pagesize: 10000000000 })
if (res && res.data && res.data.code === 0) {
this.baseOptions = res.data.parameters.datas
}
},
async getData() {
this.loadingStatus = true
const res = await detailParameter({ name: this.$route.query.name })
if (res && res.data && res.data.code === 0) {
this.form = res.data
const binaryObj = res.data.parameters.binary
const scalarsObj = res.data.parameters.scalars
const tableObj = res.data.parameters.table
for (const key in binaryObj) {
this.tableData.push({ field: key, type: 'blob', value: binaryObj[key] })
}
for (const key in scalarsObj) {
this.tableData.push({ field: key, type: typeof scalarsObj[key], value: scalarsObj[key] })
}
for (const key in tableObj) {
this.tableData.push({ field: key, type: 'table', value: tableObj[key] })
}
}
this.loadingStatus = false
},
cancel() {
this.$router.push({ path: '/params' })
},
async save() {
const tableData = this.tableData.filter(item => item.field && item.value)
const scalarsArr = tableData.filter(item => item.type === 'string' || item.type === 'number')
const binaryArr = tableData.filter(item => item.type === 'blob')
const tableArr = tableData.filter(item => item.type === 'table')
const scalarsObj = {}
const binaryObj = {}
const tableObj = {}
for (let i = 0; i < scalarsArr.length; i++) {
scalarsObj[scalarsArr[i].field] = scalarsArr[i].value
}
for (let j = 0; j < binaryArr.length; j++) {
binaryObj[binaryArr[j].field] = binaryArr[j].value
}
for (let k = 0; k < tableArr.length; k++) {
tableObj[tableArr[k].field] = tableArr[k].value
}
const res = await editParameter({
...this.form,
parameters: {
scalars: scalarsObj,
binary: binaryObj,
table: tableObj
}
})
if (res && res.data && res.data.code === 0) {
Toast.success('操作成功')
this.$router.push({ path: '/params' })
}
},
async handleUpload(event, row) {
row.value = await fileToBase64(event.target.files[0])
},
insertTableData() {
this.tableData.push({ field: '', type: '', value: '' })
},
handleDelete(index) {
this.tableData.splice(index, 1)
},
handleChange(row) {
row.value = ''
},
handleVisibleChange(val) {
if (!val) {
this.setCurrent()
}
},
setFlexHeight() {
const ele = document.getElementsByClassName('flex-item') && document.getElementsByClassName('flex-item')[0]
this.flexHeight = ele && ele.clientHeight
},
handleBlur(event) {
this.setCurrent()
event.target && event.target.classList && event.target.classList.remove('write')
},
cellClick(row, column, cell, event) {
if (cell.getElementsByTagName('input')[0]) {
cell.getElementsByTagName('input')[0].classList.add('write')
cell.getElementsByTagName('input')[0].focus()
}
},
rowClick(row, column, event) {
this.setCurrent(row)
},
setCurrent(row) {
this.$refs.singleTable.setCurrentRow(row)
},
handleCurrentChange(val) {
this.currentRow = val
}
}
}
</script>
<style lang="sass" scoped>
.page-content
text-align: left
position: relative
::v-deep input
height: 32px
line-height: 32px
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
::v-deep.el-input__icon
height: 32px
line-height: 32px
::v-deep.el-form-item, ::v-deep.el-form-item__label, ::v-deep.el-form-item__content
height: 32px
line-height: 32px
margin-bottom: 24px
::v-deep.el-form-item.textarea
height: 100px
::v-deep.el-input__inner, ::v-deep.el-textarea, ::v-deep.el-textarea__inner
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color: #333
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
::v-deep.el-table tbody tr:hover>td
background: #ecf5ff!important
::v-deep.el-table tbody tr.current-row input[type=text]
background: rgba(0, 0, 0, 0)
::v-deep.el-table tbody tr.current-row input[type=text].write
background: #fff
::v-deep.el-table tbody tr.current-row>td
background: #ecf5ff!important
.el-table
::v-deep .el-input__icon
line-height: 32px
::v-deep .myselect
border: none
width: 194px
height: 32px
background: rgba(0, 0, 0, 0)
font-family: PingFangSC-Regular, PingFang SC, Avenir, Helvetica, Arial, sans-serif
font-size: 14px
color: #666
::v-deep input[type=text], ::v-deep input[type=password], ::v-deep input[type=number], ::v-deep textarea
border: none
font-family: PingFangSC-Regular, PingFang SC, Avenir, Helvetica, Arial, sans-serif
font-size: 14px
color: #666
background: rgba(0, 0, 0, 0)
height: 32px
::v-deep thead
font-size: 14px
font-family: PingFang-SC-Bold, PingFang-SC
font-weight: bold
color: #333333
line-height: 20px
::v-deep th
font-weight: 'bold'
border-top: 1px solid #E8EBF2
padding-left: 12px
background: #F5F7FA
::v-deep td
padding: 6px 0
.flex-form
height: calc(100% - 60px)
overflow: hidden
.flex-item
height: calc(100% - 370px)
.delete-btn
margin-left: 12px
color: #F56C6C
cursor: pointer
.add-btn
height: 32px
line-height: 28px
margin-top: 30px
border: 2px dashed #D7DAE0
border-radius: 2px
border-radius: 2px
text-align: center
.add-btn-text
display: inline-block
height: 28px
line-height: 28px
.icon-tianjia
color: #666
.buttons
position: absolute
bottom: 0
right: 0
height: 60px
line-height: 60px
border-top: 1px solid #ddd
width: 100%
padding: 0 20px
text-align: right
.btn-box
// width: 80px
height: 24px
margin-left: 14px
position: relative
&:hover .upload-btn
background: #ccc
.upload-btn
background: #ddd
width: 80px
height: 24px
border-radius: 4px
text-align: center
position: absolute
.input-btn
width: 80px
height: 24px
opacity: 0
position: absolute
.file-btn
height: 24px
position: absolute
border: 1px solid #CCC
border-radius: 4px
padding: 0 24px 0 10px
.icon-guanbi
position: absolute
top: 0
right: 0
font-size: 10px
width: 24px
text-align: center
</style>
<template> <template>
<div> <div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'参数模板'}}</span>
</div>
<div class="page-content">
<div class="level level-one">
<div class="content-header">
<st-button type="primary" @click="$router.push({ path: '/params/add', query: { level: 1 } })">
<i class="iconfont icon-tianjia"></i><span class="text">{{'添加'}}</span></st-button>
<div class="search">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="oneVal">
<i class="el-input__icon el-icon-search"></i>
</div>
</div>
<div class="table-list">
<div class="list-content">
<st-table
ref="vTable"
:options="definitions"
:data="{
list: oneList,
total: oneTotal,
}"
:pagination="false"
highlight-current-row
@row-click="handleClickRow"
:outerLoading="loadingOne">
<div slot="operate" slot-scope="row">
<span class="operate" @click="$router.push({ path: '/params/detail', query: { name: row.name }})">详情</span>
<span class="operate" @click="$router.push({ path: '/params/edit', query: { name: row.name, level: 1 } })">编辑</span>
<span class="operate operate-delete" @click="handleDelete(row, 1)">删除</span>
</div>
<el-pagination slot="pagination" layout="prev, pager, next"
@current-change="handleOneCurrentChange"
:current-page="oneCurrentPage"
:total="oneTotal">
</el-pagination>
</st-table>
</div>
</div>
</div>
<div class="blanking"></div>
<div class="level level-two">
<div class="content-header">
<st-button type="primary" @click="$router.push({ path: '/params/add', query: { level: 2 } })">
<i class="iconfont icon-tianjia"></i><span class="text">{{'添加'}}</span></st-button>
<div class="search">
<input type="text" class="search-input" placeholder="请输入搜索内容" v-model="twoVal">
<i class="el-input__icon el-icon-search"></i>
</div>
</div>
<div class="table-list">
<div class="list-content">
<st-table
ref="vTable"
:options="definitions"
:pagination="false"
:data="{
list: twoList,
total: twoTotal,
}"
:empty-text="parentLevel ? '暂无数据' : '未选择一级参数模板'"
:outerLoading="loadingTwo">
<div slot="operate" slot-scope="row">
<span class="operate" @click="$router.push({ path: '/params/detail', query: { name: row.name } })">详情</span>
<span class="operate" @click="$router.push({ path: '/params/edit', query: { name: row.name, level: 2 } })">编辑</span>
<span class="operate operate-delete" @click="handleDelete(row, 2)">删除</span>
</div>
<el-pagination slot="pagination" layout="prev, pager, next"
@current-change="handleTwoCurrentChange"
:current-page="twoCurrentPage"
:total="twoTotal">
</el-pagination>
</st-table>
</div>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { getParameter, deleteParameter } from '@/axios'
import Dialog from '@/helpers/dialog'
export default { export default {
data() { data() {
return { return {
oneVal: '',
twoVal: '',
oneList: [],
twoList: [],
oneTotal: 0,
twoTotal: 0,
oneCurrentPage: 1,
twoCurrentPage: 1,
loadingOne: false,
loadingTwo: false,
parentLevel: '',
definitions: [
{
label: '序号',
render: 'order'
},
{
label: '名称',
render: 'name'
},
{
label: '类别',
render: 'type'
},
{
label: '描述',
render: 'description'
},
{
label: '操作',
type: 'slot',
width: '200px',
slotName: 'operate'
},
],
}
},
mounted() {
this.getOneData()
this.getTwoData()
},
methods: {
async getOneData() {
this.loadingOne = true
const oneLevel = await getParameter({ base: 1, pages: this.oneCurrentPage - 1, pagesize: 10 })
if (oneLevel && oneLevel.data && oneLevel.data.code === 0) {
this.oneList = oneLevel.data.parameters.datas.map((item, index) => {
item.order = index + 1 + (this.oneCurrentPage - 1) * 10
return item
})
this.oneTotal = oneLevel.data.parameters.total
}
this.loadingOne = false
},
async getTwoData() {
this.loadingTwo = true
const twoLevel = await getParameter({ parent: this.parentLevel === '' ? 0 : this.parentLevel, pages: this.twoCurrentPage - 1, pagesize: 10 })
if (twoLevel && twoLevel.data && twoLevel.data.code === 0) {
this.twoList = twoLevel.data.parameters.datas.map((item, index) => {
item.order = index + 1 + (this.twoCurrentPage - 1) * 10
return item
})
this.twoTotal = twoLevel.data.parameters.total
}
this.loadingTwo = false
},
async handleDelete(row, level) {
const confirmDelete = await Dialog.confirm('提示', { message: '是否删除此模板?' })
if (!confirmDelete) return
const res = await deleteParameter({ name: row.name })
if (res) {
Toast.success('操作成功')
if (level === 1) this.getOneData()
if (level === 2) this.getTwoData()
}
},
handleClickRow(row, column, event) {
this.parentLevel = row.name
this.getTwoData()
},
handleOneCurrentChange(val) {
this.oneCurrentPage = val
this.getOneData()
},
handleTwoCurrentChange(val) {
this.twoCurrentPage = val
this.getTwoData()
} }
} }
} }
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
.page-content
display: flex
flex-direction: row
padding: 0
.blanking
width: 20px
background: #EBEEF5
.level
width: calc(50% - 10px)
padding: 14px 20px
.table-list
height: calc(100% - 60px)
.list-content
height: 100%
.table-box
height: 100%
::v-deep.el-table
max-height: 100%!important
.content-header
display: flex
justify-content: space-between
margin-bottom: 20px
.search
width: 240px
height: 32px
position: relative
display: inline-block
.search-input
width: 100%
padding-right: 35px
.el-icon-search
line-height: 32px
position: absolute
right: 0
font-size: 18px
color: #CCC
cursor: pointer
width: 44px
height: 32px
text-align: center
::v-deep.el-pagination__total
display: none
::v-deep.el-pagination__sizes
display: none
::v-deep.el-pagination__jump
display: none
::v-deep.current-row td
background: #ecf5ff!important
::v-deep input
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#333
height: 32px
line-height: 32px
&::placeholder
font-size: 14px
font-family: PingFangSC-Regular, PingFang SC
font-weight: 400
color:#999999
</style> </style>
<template>
<div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'个人中心'}}</span>
</div>
<div class="page-content">
<st-form
ref="form"
label-width="70px"
:model="userData">
<st-form-item
style="margin-bottom:10px"
:label="'头像'+':'">
<el-image style="width: 80px; height: 80px" :src="userData.image" fit="fit"></el-image>
</st-form-item>
<st-form-item
style="margin-bottom:10px"
:label="'账户'+':'">
<span>{{userData.role}}</span>
</st-form-item>
<st-form-item
style="margin-bottom:10px"
:label="'姓名'+':'">
<span>{{userData.creater}}</span><span class="btn-text" @click="showDialog = true;type = 'name'">编辑</span>
</st-form-item>
<st-form-item
style="margin-bottom:10px"
:label="'邮箱'+':'">
<span>{{userData.email}}</span><span class="btn-text" @click="showDialog = true;type = 'email'">编辑</span>
</st-form-item>
<st-form-item
style="margin-bottom:10px"
:label="'密码'+':'">
<span class="btn-text" style="margin-left: 0" @click="showDialog = true;type = 'password'">修改密码</span>
</st-form-item>
</st-form>
</div>
<st-dialog
:show.sync="showDialog"
class="update-dialog"
@dismiss="cancelSubmit"
>
<div slot="header" class="popup-header">{{'编辑'}}</div>
<div slot="body" class="popup-body">
<st-form
:label-width="type === 'password' ? '90px' : ''"
ref="form">
<st-form-item v-if="type === 'email'"
:label="'邮箱:'">
<st-input v-model="email"></st-input>
</st-form-item>
<st-form-item v-if="type === 'name'"
:label="'姓名:'">
<st-input v-model="name"></st-input>
</st-form-item>
<div v-if="type === 'password'">
<st-form-item
:label="'当前密码:'">
<st-input v-model="password"></st-input>
</st-form-item>
<st-form-item
:label="'新密码:'">
<st-input v-model="newPwd"></st-input>
</st-form-item>
<st-form-item
:label="'新密码:'">
<st-input v-model="confirmPwd"></st-input>
</st-form-item>
</div>
</st-form>
</div>
<div slot="footer" class="popup-footer flex right">
<st-button @click="cancelSubmit">{{$t('public.cancel')}}</st-button>
<st-button type="primary" @click="submit">{{'确定'}}</st-button>
</div>
</st-dialog>
</div>
</template>
<script>
import { getUser } from '@/utils/user'
export default {
data() {
return {
showDialog: false,
userData: {},
type: '',
email: '',
name: '',
password: '',
newPwd: '',
confirmPwd: ''
}
},
mounted() {
this.userData = getUser().info
},
methods: {
submit() {
this.showDialog = false
},
cancelSubmit() {
this.showDialog = false
}
}
}
</script>
<style lang="sass" scoped>
.page-content
text-align: left
.btn-text
color: #409EFF
margin-left: 30px
font-size: 14px
</style>
<template> <template>
<div class="data-list-common flex column main-content flex-1"> <div class="data-list-common flex column main-content flex-1">
<div class="header"> <div class="header">
<span class="title">{{'设备列表'}}</span> <span class="title">{{'服务列表'}}</span>
</div> </div>
<div class="page-nav"> <div class="page-nav">
<div class="search-fields" :class="{'search-fields-collapse': isCollapse}"> <div class="search-fields" :class="{'search-fields-collapse': isCollapse}">
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<div class="search-item"> <div class="search-item">
<span class="search-title">状态:</span> <span class="search-title">状态:</span>
<el-checkbox-group v-model="search.checkList" class="inline-div"> <el-checkbox-group v-model="search.checkList" class="inline-div">
<el-checkbox label="1" class="check-title">在线</el-checkbox> <el-checkbox :label="1" class="check-title">在线</el-checkbox>
<el-checkbox label="2" class="check-title">离线</el-checkbox> <el-checkbox :label="0" class="check-title">离线</el-checkbox>
<el-checkbox label="3" class="check-title">异常</el-checkbox> <el-checkbox :label="2" class="check-title">异常</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div v-if="!isCollapse"> <div v-if="!isCollapse">
...@@ -94,7 +94,8 @@ ...@@ -94,7 +94,8 @@
<div class="page-content"> <div class="page-content">
<div class="content-header flex-right-content"> <div class="content-header flex-right-content">
<nameFilter <nameFilter
placeholder="请输入搜索内容"> placeholder="请输入搜索内容"
@startSearch="startSearch">
</nameFilter> </nameFilter>
</div> </div>
<div class="table-list"> <div class="table-list">
...@@ -107,19 +108,20 @@ ...@@ -107,19 +108,20 @@
total: total, total: total,
}" }"
:outerLoading="loadingStatus" :outerLoading="loadingStatus"
:doubleTable="false"
> >
<div slot='codeSlot' slot-scope="row"> <div slot='codeSlot' slot-scope="row">
<span>{{ simplify(row.code, 3) }}</span> <span>{{ simplify(row.potuid, 3) }}</span>
<i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.code)"></i> <i class="iconfont icon-fuzhi icon-fuzhi-text" @click="copyText(row.potuid)"></i>
</div> </div>
<div slot='status' slot-scope="row"> <div slot='status' slot-scope="row">
<span class="circleStatus" :style="{color: getStatusColor(row.status)}">{{ getStatusText(row.status) }}</span> <span class="circleStatus" :style="{color: getStatusColor(row.state)}">{{ getStatusText(row.state) }}</span>
</div> </div>
<div slot='structureSlot' slot-scope="row"> <div slot='structureSlot' slot-scope="row">
<span>{{ simplify(row.structure, 6) }}</span> <span>{{ simplify(row.structure, 6) }}</span>
</div> </div>
<div slot='registerTimeSlot' slot-scope="row"> <div slot='registerTimeSlot' slot-scope="row">
<span>{{ rTimeMin(row.registerTime) }}</span> <span>{{ (row.register_date) }}</span>
</div> </div>
<div slot='tagsSlot' slot-scope="row"> <div slot='tagsSlot' slot-scope="row">
<el-tooltip class="item" effect="dark" :content="row.tags ? row.tags.join('、') : ''" placement="top"> <el-tooltip class="item" effect="dark" :content="row.tags ? row.tags.join('、') : ''" placement="top">
...@@ -133,14 +135,8 @@ ...@@ -133,14 +135,8 @@
</el-tooltip> </el-tooltip>
</div> </div>
<div slot='servicesSlot' slot-scope="row"> <div slot='servicesSlot' slot-scope="row">
<el-tooltip class="item" effect="dark" :content="row.services ? row.services.join('、') : ''" placement="top"> <el-tooltip class="item" effect="dark" :content="row.name" placement="top">
<!-- 必须要套一层 --> <span>{{row.name.length > 10 ? row.name.slice(0, 9) + '...' : row.name}}</span>
<div>
<template v-for="(item, index) in row.services">
<span v-if="[0, 2].indexOf(index) !== -1" :key="index" class="service-item">{{ simplify(item, 4) }}</span>
</template>
<span v-if="(row.services && row.services.length) > 10">共: {{(row.services && row.services.length) ? row.services.length : 0}} 条</span>
</div>
</el-tooltip> </el-tooltip>
</div> </div>
<div slot='systemSlot' slot-scope="row"> <div slot='systemSlot' slot-scope="row">
...@@ -163,6 +159,7 @@ import browserStorage from '@/services/local-storage' ...@@ -163,6 +159,7 @@ import browserStorage from '@/services/local-storage'
import Dialog from '@/helpers/dialog' import Dialog from '@/helpers/dialog'
import validate from '@/components/seeta-ui/seeta-form/validator' import validate from '@/components/seeta-ui/seeta-form/validator'
import { rTimeMin, copyText } from '@/utils/system.js' import { rTimeMin, copyText } from '@/utils/system.js'
import { getService, getDeviceService, getTag } from '@/axios'
export default { export default {
data() { data() {
return { return {
...@@ -210,7 +207,11 @@ export default { ...@@ -210,7 +207,11 @@ export default {
definitions: [ definitions: [
{ {
label: '序号', label: '序号',
render: 'orderNumber', render: 'id',
}, {
label: '服务',
type: 'slot',
slotName: 'servicesSlot'
}, { }, {
label: '编号', label: '编号',
type: 'slot', type: 'slot',
...@@ -220,13 +221,13 @@ export default { ...@@ -220,13 +221,13 @@ export default {
type: 'slot', type: 'slot',
slotName: 'status', slotName: 'status',
statusColor: item => { statusColor: item => {
switch (item.status) { switch (item.state) {
case 'online': case 1:
return '#67C23A' return '#67C23A'
case 'offline': case 2:
return '#999999'
default:
return '#F56C6C' return '#F56C6C'
default:
return '#999999'
} }
} }
}, { }, {
...@@ -239,24 +240,22 @@ export default { ...@@ -239,24 +240,22 @@ export default {
slotName: 'systemSlot' slotName: 'systemSlot'
}, { }, {
label: 'IP', label: 'IP',
render: 'IP' render: 'ip'
}, { }, {
label: '注册时间', label: '注册时间',
type: 'slot', type: 'slot',
slotName: 'registerTimeSlot' slotName: 'registerTimeSlot',
width: 110
}, { }, {
label: '标签', label: '标签',
type: 'slot', type: 'slot',
slotName: 'tagsSlot' slotName: 'tagsSlot',
}, { width: 120
label: '服务',
type: 'slot',
slotName: 'servicesSlot'
}, { }, {
label: '操作', label: '操作',
type: 'slot', type: 'slot',
slotName: 'operate', slotName: 'operate',
width: 300 width: 200
}, },
], ],
/* 搜索栏条件 */ /* 搜索栏条件 */
...@@ -268,16 +267,21 @@ export default { ...@@ -268,16 +267,21 @@ export default {
} }
}, },
computed: { computed: {
getServiceName() {
return item => {
return item.map(t1 => t1.name).join()
}
},
// 获取设备状态颜色 // 获取设备状态颜色
getStatusColor() { getStatusColor() {
return item => { return item => {
switch (item) { switch (item) {
case 'online': case 1:
return '#67C23A' return '#67C23A'
case 'offline': case 2:
return '#999999'
default:
return '#F56C6C' return '#F56C6C'
default:
return '#999999'
} }
} }
}, },
...@@ -285,12 +289,12 @@ export default { ...@@ -285,12 +289,12 @@ export default {
getStatusText() { getStatusText() {
return item => { return item => {
switch (item) { switch (item) {
case 'online': case 1:
return '在线' return '在线'
case 'offline': case 2:
return '离线'
default:
return '异常' return '异常'
default:
return '离线'
} }
} }
}, },
...@@ -307,7 +311,54 @@ export default { ...@@ -307,7 +311,54 @@ export default {
methods: { methods: {
rTimeMin, rTimeMin,
copyText, copyText,
seeServiceParams(id) { startSearch(value) {
this.getData()
},
async getData() {
const res = await getService({
state: this.search.checkList,
pages: this.pi,
pagesize: this.ps,
structure: this.search.structure,
system: this.search.system,
register_date: this.search.registerTime && this.search.registerTime.length ? this.search.registerTime[0] : '',
online_date: this.search.onlineTime && this.search.onlineTime.length ? this.search.onlineTime[0] : '',
tag: this.search.tags,
service: this.search.services
})
if (res && res.data) {
this.tokenList = JSON.parse(JSON.stringify(res.data.data.services))
this.total = res.data.data.total
} else {
this.tokenList = []
this.total = 0
}
},
async getServiceList() {
const res = await getDeviceService()
if (res) {
this.serviceList = res.data.services.map(item => {
return {
label: item,
value: item
}
})
}
},
async getTag() {
const res = await getTag()
if (res) {
this.tagList = res.data.tags.map(item => {
return {
label: item,
value: item
}
})
}
},
seeServiceParams(row) {
this.$store.commit('changeCurrentDevice', row.deviceId)
this.$store.commit('changeCurrentService', row)
this.$router.push({ name: 'device-service' }) this.$router.push({ name: 'device-service' })
}, },
sendReq(id) { sendReq(id) {
...@@ -334,9 +385,10 @@ export default { ...@@ -334,9 +385,10 @@ export default {
} }
}, },
// 跳转到设备详情页面 // 跳转到设备详情页面
detail(id) { detail(deviceid) {
this.$store.commit('changeCurrentDevice', deviceid)
this.$router.push({ name: 'device-detail' }) this.$router.push({ name: 'device-detail' })
} },
}, },
watch: { watch: {
// 监听route的改变进行pi ,ps的改变 // 监听route的改变进行pi ,ps的改变
...@@ -347,6 +399,9 @@ export default { ...@@ -347,6 +399,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.getData()
this.getServiceList()
this.getTag()
}, },
destroyed() { destroyed() {
}, },
......
<template> <template>
<div> <div class="data-list-common flex column main-content flex-1">
<div class="header">
<span class="title">{{'设置中心'}}</span>
</div>
<div class="page-content">
</div>
</div> </div>
</template> </template>
...@@ -7,8 +12,11 @@ ...@@ -7,8 +12,11 @@
export default { export default {
data() { data() {
return { return {
} }
},
mounted() {
},
methods: {
} }
} }
</script> </script>
......
...@@ -122,9 +122,10 @@ import crypto from 'crypto-js' ...@@ -122,9 +122,10 @@ import crypto from 'crypto-js'
import browserStorage from '@/services/local-storage' import browserStorage from '@/services/local-storage'
import seetaPopover from '@/components/seeta-ui/seeta-popover' import seetaPopover from '@/components/seeta-ui/seeta-popover'
import { saveUser } from '@/utils/user' import { saveUser } from '@/utils/user'
// import { usersApi } from '../../http' import { loginApi } from '@/axios'
import { langList } from '@/i18n/utils' import { langList } from '@/i18n/utils'
import axios from 'axios'
import https from 'https'
export default { export default {
name: 'login', name: 'login',
components: { components: {
...@@ -271,40 +272,30 @@ export default { ...@@ -271,40 +272,30 @@ export default {
async prelogin(val) { async prelogin(val) {
}, },
async login() { async login() {
const res = await usersApi.login({ const res = await loginApi({
username: this.userName, username: this.userName,
password: this.userPassWord password: this.userPassWord
}) })
if (res) { // const res = await axios({
// httpsAgent: new https.Agent({
// rejectUnauthorized: false
// }),
// data: {
// username: this.userName,
// password: this.userPassWord
// },
// method: 'post',
// url: '/front/user/login',
// })
// .then(response => console.log(response.data))
// .catch(e => console.log(e))
if (res && res.data && res.data.code === 0) {
// TokenId // TokenId
browserStorage.setItem('id', res.data.id) browserStorage.setItem('token', res.data.token)
const resInfo = await usersApi.getUser(res.data.subject_id) browserStorage.setItem('user', JSON.stringify(res.data))
if (resInfo) { this.$router.push({ path: '/params' })
// 如果subjectID和个人信息ID重复则只存一个
if (res.data.subject_id === resInfo.data.id) {
// 用户ID
browserStorage.setItem('userId', res.data.subject_id)
} else {
// 个人信息的ID
browserStorage.setItem('reqId', resInfo.data.id)
// 用户ID
browserStorage.setItem('userId', res.data.subject_id)
}
browserStorage.setItem('username', resInfo.data.username)
// UUID
browserStorage.setItem('uuid', resInfo.data.uuid)
// 页面右上角用户名显示
browserStorage.setItem('user', JSON.stringify({ username: this.userName }))
// 进入欢迎页
this.$router.push({ name: 'apply' })
} else {
vm.$notify.error({
title: '请求错误',
message: '获取用户信息失败,请重新登录',
})
}
} else { } else {
this.errmsg = this.$store.getters.errorInfo.msg Toast.danger(res.data.msg)
} }
}, },
// 管理员登录 // 管理员登录
......
...@@ -40,22 +40,34 @@ module.exports = { ...@@ -40,22 +40,34 @@ module.exports = {
happyPackMode: false happyPackMode: false
}) })
.end() .end()
.end()
config.module
.rule('thejs')
.test(/\.js$/)
.include
.add(resolve('src'))
.add(resolve('node_modules/element-ui/packages'))
.end()
.use('babel-loader')
.loader('babel-loader')
.end()
},
devServer: {
// development server port 8000
// port: 8080,
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
// 配置代理,解决跨域
proxy: {
// 匹配到/api才使用代理,避免路由冲突
'/front': {
target: 'https://218.94.122.141:9997',
secure: false,
changeOrigin: true,
pathRewrite: {
// 路径重写
'^/front': '/front' // 这个意思就是以api开头的,定向到哪里, 如果你的后边还有路径的话, 会自动拼接上
}
}
}
}, },
// devServer: {
// // development server port 8000
// port: 9000,
// // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
// // 配置代理,解决跨域
// proxy: {
// // 匹配到/api才使用代理,避免路由冲突
// '/api': {
// target: 'http://218.94.122.141:8089',
// changeOrigin: true,
// pathRewrite: {
// // 路径重写
// '^/api': '/' // 这个意思就是以api开头的,定向到哪里, 如果你的后边还有路径的话, 会自动拼接上
// }
// }
// }
// },
} }
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!