fix: 监控大屏 行政区划 查询条件 改 id
This commit is contained in:
parent
b680f1b817
commit
15d172fbee
|
@ -42,6 +42,7 @@
|
||||||
"clipboard": "2.0.6",
|
"clipboard": "2.0.6",
|
||||||
"core-js": "3.8.1",
|
"core-js": "3.8.1",
|
||||||
"cron-parser": "^3.3.0",
|
"cron-parser": "^3.3.0",
|
||||||
|
"crypto-js": "^4.1.1",
|
||||||
"debounce": "^1.2.1",
|
"debounce": "^1.2.1",
|
||||||
"echarts": "^5.3.3",
|
"echarts": "^5.3.3",
|
||||||
"element-ui": "2.14.1",
|
"element-ui": "2.14.1",
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
import CryptoJS from 'crypto-js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
//随机生成指定数量的16进制key
|
||||||
|
generatekey(num) {
|
||||||
|
let library = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||||
|
let key = "";
|
||||||
|
for (var i = 0; i < num; i++) {
|
||||||
|
let randomPoz = Math.floor(Math.random() * library.length);
|
||||||
|
key += library.substring(randomPoz, randomPoz + 1);
|
||||||
|
}
|
||||||
|
return key;
|
||||||
|
},
|
||||||
|
|
||||||
|
//加密
|
||||||
|
encrypt(word, keyStr) {
|
||||||
|
keyStr = keyStr ? keyStr : 'abcdsxyzhkj12345'; //判断是否存在ksy,不存在就用定义好的key
|
||||||
|
var key = CryptoJS.enc.Utf8.parse(keyStr);
|
||||||
|
var srcs = CryptoJS.enc.Utf8.parse(word);
|
||||||
|
console.log('cryptoJS:', CryptoJS);
|
||||||
|
var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.NoPadding });
|
||||||
|
return encrypted.toString();
|
||||||
|
},
|
||||||
|
//解密
|
||||||
|
decrypt(word, keyStr) {
|
||||||
|
keyStr = keyStr ? keyStr : 'abcdsxyzhkj12345';
|
||||||
|
var key = CryptoJS.enc.Utf8.parse(keyStr);
|
||||||
|
var decrypt = CryptoJS.AES.decrypt(word, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });
|
||||||
|
return CryptoJS.enc.Utf8.stringify(decrypt).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -171,7 +171,7 @@ export default {
|
||||||
projectList: [],
|
projectList: [],
|
||||||
projectId: null,
|
projectId: null,
|
||||||
regionalismId: null,
|
regionalismId: null,
|
||||||
regionalismLabel: "",
|
regionalismId: "",
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
thisScrollTopY: 0,
|
thisScrollTopY: 0,
|
||||||
userLoginType: "",
|
userLoginType: "",
|
||||||
|
@ -324,7 +324,7 @@ export default {
|
||||||
},
|
},
|
||||||
eventRegionalism(data) {
|
eventRegionalism(data) {
|
||||||
// this.regionalismId = data;
|
// this.regionalismId = data;
|
||||||
this.regionalismLabel = data.label;
|
this.regionalismId = data.id;
|
||||||
this.getProjectList();
|
this.getProjectList();
|
||||||
},
|
},
|
||||||
resize_window() {
|
resize_window() {
|
||||||
|
@ -351,7 +351,7 @@ export default {
|
||||||
if (this.$store.getters.userType !== "PERSONAL") {
|
if (this.$store.getters.userType !== "PERSONAL") {
|
||||||
bigScreenProjectList({
|
bigScreenProjectList({
|
||||||
// regionalismId: this.regionalismId,
|
// regionalismId: this.regionalismId,
|
||||||
projectAddress: this.regionalismLabel,
|
regionalismId: this.regionalismId,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.projectList = response.data;
|
this.projectList = response.data;
|
||||||
});
|
});
|
||||||
|
|
|
@ -2926,6 +2926,11 @@ crypto-browserify@^3.11.0:
|
||||||
randombytes "^2.0.0"
|
randombytes "^2.0.0"
|
||||||
randomfill "^1.0.3"
|
randomfill "^1.0.3"
|
||||||
|
|
||||||
|
crypto-js@^4.1.1:
|
||||||
|
version "4.1.1"
|
||||||
|
resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf"
|
||||||
|
integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==
|
||||||
|
|
||||||
css-color-names@0.0.4, css-color-names@^0.0.4:
|
css-color-names@0.0.4, css-color-names@^0.0.4:
|
||||||
version "0.0.4"
|
version "0.0.4"
|
||||||
resolved "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz"
|
resolved "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz"
|
||||||
|
|
Loading…
Reference in New Issue