From d4211fd96865e58217d63efaf4d8f6609fb24ae6 Mon Sep 17 00:00:00 2001 From: mh-two-thousand-and-two <17391232786@163.com> Date: 星期二, 16 四月 2024 17:43:33 +0800 Subject: [PATCH] 更新数据 --- src/pages.json | 3 src/pages/territory/territory.vue | 2 package-lock.json | 299 +++++-- src/pages/characterRelation/characterRelation.vue | 288 +++++-- src/store/index.js | 19 src/utils/request/req1.js | 4 src/pages/index/index.vue | 10 src/pages/changePassword/changePassword.vue | 106 -- src/store/module/user.js | 2 src/pages/knowledgeBase/knowledgeBase.vue | 697 +++++++++++++----- src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue | 2 src/utils/Crypto.js | 44 + src/components/advancedSearch/advancedSearch.vue | 3 src/uni_modules/next-search-more/components/next-search-more/next-search-more.vue | 2 src/pages/Register/Register.vue | 155 +-- src/pages/characterMap/characterMap.vue | 2 src/api/index.js | 54 + src/pages/repository/repository.vue | 2 package.json | 1 src/components/headNav/headNav.vue | 6 src/components/form/form.vue | 2 src/pages/Login/Login.vue | 35 src/pages/forgetPass/forgetPass.vue | 206 ++--- src/pages/TcmSystem/TcmSystem.vue | 196 +--- 24 files changed, 1,292 insertions(+), 848 deletions(-) diff --git a/package-lock.json b/package-lock.json index 621c99f..f2b4604 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3793,11 +3793,90 @@ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, "hash-sum": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-2.0.0.tgz", "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", "dev": true + }, + "loader-utils": { + "version": "2.0.4", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.8.3", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/vue-loader/-/vue-loader-16.8.3.tgz", + "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + } } } }, @@ -4200,6 +4279,15 @@ "resolved": "https://registry.npmmirror.com/address/-/address-1.2.2.tgz", "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", "dev": true + }, + "adler-32": { + "version": "1.2.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/adler-32/-/adler-32-1.2.0.tgz", + "integrity": "sha512-/vUqU/UY4MVeFsg+SsK6c+/05RZXIHZMGJA+PX5JyWI0ZRcBpupnRuPLU/NXXoFwMYCPCoxIfElM2eS+DUXCqQ==", + "requires": { + "exit-on-epipe": "~1.0.1", + "printj": "~1.1.0" + } }, "after": { "version": "0.8.2", @@ -4924,6 +5012,11 @@ "resolved": "https://registry.npmmirror.com/blob/-/blob-0.0.5.tgz", "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==" }, + "blob.js": { + "version": "1.0.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/blob.js/-/blob.js-1.0.1.tgz", + "integrity": "sha512-TkPuWPeCHBbN+LWFg7BlXdSh6stRxwmAbuirKfiiHTMmo/uQfKFQMx2jrxVUkueKRiG+Tc7Os1Zn618Yc0MZpg==" + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz", @@ -5405,6 +5498,22 @@ "resolved": "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, + "cfb": { + "version": "1.2.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "requires": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + }, + "dependencies": { + "adler-32": { + "version": "1.3.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==" + } + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz", @@ -5694,6 +5803,22 @@ "q": "^1.1.2" } }, + "codepage": { + "version": "1.14.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/codepage/-/codepage-1.14.0.tgz", + "integrity": "sha512-iz3zJLhlrg37/gYRWgEPkaFTtzmnEv1h+r7NgZum2lFElYQPi0/5bnmuDfODHxfp0INEfnRqyfyeIJDbb7ahRw==", + "requires": { + "commander": "~2.14.1", + "exit-on-epipe": "~1.0.1" + }, + "dependencies": { + "commander": { + "version": "2.14.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/commander/-/commander-2.14.1.tgz", + "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" + } + } + }, "collect-v8-coverage": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", @@ -5753,8 +5878,7 @@ "commander": { "version": "2.17.1", "resolved": "https://registry.npmmirror.com/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" }, "commondir": { "version": "1.0.1", @@ -6098,6 +6222,11 @@ "js-yaml": "^3.13.1", "parse-json": "^4.0.0" } + }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" }, "create-ecdh": { "version": "4.0.4", @@ -7488,6 +7617,11 @@ "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true }, + "exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==" + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmmirror.com/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -7786,6 +7920,11 @@ "schema-utils": "^2.5.0" } }, + "file-saver": { + "version": "1.3.8", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/file-saver/-/file-saver-1.3.8.tgz", + "integrity": "sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg==" + }, "file-type": { "version": "9.0.0", "resolved": "https://registry.npmmirror.com/file-type/-/file-type-9.0.0.tgz", @@ -7942,6 +8081,11 @@ "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true + }, + "frac": { + "version": "1.1.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==" }, "fragment-cache": { "version": "0.2.1", @@ -11010,6 +11154,17 @@ "resolved": "https://mirrors.huaweicloud.com/repository/npm/js-cookie/-/js-cookie-3.0.5.tgz", "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==" }, + "js-export-excel": { + "version": "1.1.4", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/js-export-excel/-/js-export-excel-1.1.4.tgz", + "integrity": "sha512-19m7e3Gnn4CRfHXoFrLYj4fFfJ/KpvI7HRRn25p4GXYD+AlTV+1oU24NH6S904Ksi44tSx7futxhouOPAQ22oQ==", + "requires": { + "blob.js": "^1.0.1", + "file-saver": "^1.3.3", + "script-loader": "0.7.2", + "xlsx": "0.16.3" + } + }, "js-message": { "version": "1.0.7", "resolved": "https://registry.npmmirror.com/js-message/-/js-message-1.0.7.tgz", @@ -13489,6 +13644,11 @@ } } }, + "printj": { + "version": "1.1.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/printj/-/printj-1.1.2.tgz", + "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==" + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz", @@ -13691,6 +13851,11 @@ "iconv-lite": "0.4.24", "unpipe": "1.0.0" } + }, + "raw-loader": { + "version": "0.5.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/raw-loader/-/raw-loader-0.5.1.tgz", + "integrity": "sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q==" }, "rc": { "version": "1.2.8", @@ -14312,6 +14477,14 @@ "@types/json-schema": "^7.0.5", "ajv": "^6.12.4", "ajv-keywords": "^3.5.2" + } + }, + "script-loader": { + "version": "0.7.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/script-loader/-/script-loader-0.7.2.tgz", + "integrity": "sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA==", + "requires": { + "raw-loader": "~0.5.1" } }, "select-hose": { @@ -15043,6 +15216,14 @@ "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true + }, + "ssf": { + "version": "0.11.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "requires": { + "frac": "~1.1.2" + } }, "sshpk": { "version": "1.18.0", @@ -16394,94 +16575,6 @@ "vue-style-loader": "^4.1.0" } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.8.3", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/vue-loader/-/vue-loader-16.8.3.tgz", - "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "hash-sum": { - "version": "2.0.0", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/hash-sum/-/hash-sum-2.0.0.tgz", - "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.4", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-style-loader": { "version": "4.1.3", "resolved": "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz", @@ -17216,6 +17309,16 @@ "has-tostringtag": "^1.0.2" } }, + "wmf": { + "version": "1.0.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==" + }, + "word": { + "version": "0.3.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==" + }, "word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.5.tgz", @@ -17330,6 +17433,22 @@ "xtend": "^4.0.0" } }, + "xlsx": { + "version": "0.16.3", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/xlsx/-/xlsx-0.16.3.tgz", + "integrity": "sha512-LInZ1OK6vpe+Em8XDZ5gDH3WixARwxI7UWc+3chLeafI6gUwECEgL43k4Tjbs1uRfkxpM7wQFy5DLE0hFBRqRw==", + "requires": { + "adler-32": "~1.2.0", + "cfb": "^1.1.4", + "codepage": "~1.14.0", + "commander": "~2.17.1", + "crc-32": "~1.2.0", + "exit-on-epipe": "~1.0.1", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + } + }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz", diff --git a/package.json b/package.json index b5c182a..3c55ef8 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "element-ui": "^2.15.14", "flyio": "^0.6.2", "js-cookie": "^3.0.5", + "js-export-excel": "^1.1.4", "querystring": "^0.2.1", "sass": "^1.74.1", "uview-ui": "^2.0.37", diff --git a/src/api/index.js b/src/api/index.js index 7880278..e77eeec 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -12,17 +12,14 @@ // 楠岃瘉鐮� /account/verifyCode export const getverifyCode = (req) => { - return new Promise((resolve, reject) => { - return req1.post('/account/verifyCode', { - data: qs.encode(req), - headers: { - "Content-Type": "application/x-www-form-urlencoded", - } - }).then((res) => { - resolve(res) - }).catch((err) => { - reject(err) - }) + console.log(req, qs.encode(req), 'rrr'); + return req1({ + url: "/account/verifyCode", + method: "post", + data: req, + headers: { + 'Content-Type': 'multipart/form-data' + } }) } @@ -126,7 +123,7 @@ data: Obj }) } -// 鍖诲浜虹墿鐭ヨ瘑搴撳熀纭�妫�绱� +// 鍖诲浜虹墿鐭ヨ瘑搴� 鍩虹妫�绱� export const getFuzzySearch = (Obj) => { console.log(Obj, 'sss'); return req1({ @@ -135,7 +132,8 @@ // data:Obj }) } -// 鍖诲浜虹墿鐭ヨ瘑搴撻珮绾ф绱� + +// 鍖诲浜虹墿鐭ヨ瘑搴� 楂樼骇妫�绱� export const getAdvanceSearch = (Obj) => { return req1({ url: '/person/advanceSearch', @@ -157,14 +155,23 @@ } // 鍖诲浜虹墿鐭ヨ瘑搴� +// 妫�绱㈤〉 // 鍩虹銆侀珮绾ф绱� ------------------------------ -export const getList = (person) => { +export const getPList = (person) => { return req1({ url: '/person/list', method: 'post', data: person }) } +// 妫�绱㈡暟鎹埌鍑� +export const getPDownload = () => { + return req1({ + url: '/person/download', + method: 'post' + }) +} +// -------------------------P @@ -182,7 +189,7 @@ return req1({ url: '/medical/list', method: 'post', - data:data + data: data }) } // 璇︽儏 @@ -190,7 +197,7 @@ return req1({ url: '/medical/details', method: 'post', - data:Obj + data: Obj }) } // 鍙栧�硷細RDF銆丯T銆乆ML銆丣SON @@ -198,7 +205,18 @@ return req1({ url: '/medical/dataOutput', method: 'post', - data:Obj + data: Obj }) } -// ----------- \ No newline at end of file + +// ----------- + +// 涓浗鍖诲浜虹墿鐭ヨ瘑搴� +// 鏁版嵁缁熻 +export const getPDataStatistics = () => { + return req1({ + url: '/person/dataStatistics', + method: 'post' + }) +} +// ---------------- \ No newline at end of file diff --git a/src/components/advancedSearch/advancedSearch.vue b/src/components/advancedSearch/advancedSearch.vue index 1fb2b98..047158e 100644 --- a/src/components/advancedSearch/advancedSearch.vue +++ b/src/components/advancedSearch/advancedSearch.vue @@ -134,7 +134,8 @@ // console.log(val); }, onSubmit(val) { - console.log(val); + this.$emit('onSubmit', val) + // console.log(val); }, } } diff --git a/src/components/form/form.vue b/src/components/form/form.vue index 90b8bbd..19805f9 100644 --- a/src/components/form/form.vue +++ b/src/components/form/form.vue @@ -5,7 +5,7 @@ <el-row :gutter="10"> <el-form-item style="width: 30%;" v-for="(item, i) in from.from" :key="i" :label="item.label"> <el-input v-if="item.type === 'input'" v-model="item.value" :placeholder="item.label"></el-input> - <el-input v-if="item.type === 'number'" type="number" v-model.number="item.value" + <el-input v-if="item.type === 'number'" min="1" type="number" v-model.number="item.value" :placeholder="item.label"></el-input> <el-select v-else-if="item.type === 'select'" v-model="item.value" :placeholder="item.label"> <el-option v-for="(option, optionIndex) in item.options" :key="optionIndex" diff --git a/src/components/headNav/headNav.vue b/src/components/headNav/headNav.vue index 91eef40..6e4b97f 100644 --- a/src/components/headNav/headNav.vue +++ b/src/components/headNav/headNav.vue @@ -3,7 +3,7 @@ <view class="NavTop flex" :style="{backgroundImage: 'url('+ bg + ')'}"> <view class="santiaogang" style="width: .34rem;height: .34rem;margin-right: 3rem;" @click="menuNav = !menuNav"><img style="width: 100%;height: 100%;" - src="../../static/涓尰浜虹墿鐭ヨ瘑搴�0201/涓夋潯鏉�.png" alt="" /></view> + src="@/static/涓尰浜虹墿鐭ヨ瘑搴�0201/涓夋潯鏉�.png" alt="" /></view> <view class="flex" style="letter-spacing: 5rpx;"> <view class="logo"></view> <view class="" style="margin-left: .19rem;font-size: .24rem;font-family: cursive;font-weight: 900;"> @@ -21,8 +21,6 @@ :style="{'backgroundColor':searchBg==true?'#244A7B':'#DA7A2B'}" style="background-color: #000;border-radius: 50%;margin-top: -4rpx;"></view> </view> - <!-- <img style="border-radius: 50%;display: inline-block;" src="../../static/image/search.png" alt="" /> --> - <!-- <img class="cursor" @click="changePassword(1)" src="@/static/image/profile.svg" alt="" /> --> <el-dropdown trigger="click" @command="handleCommand"> <!-- <view @click="iconClick(2)" class="s2 ss1 "></view> --> <img class="cursor" @click="changePassword(1)" src="@/static/image/profile.svg" alt="" /> @@ -223,7 +221,7 @@ }); } else if (index === '1') { uni.navigateTo({ - url: '/pages/repository/repository?id=' + 1 + url:'/pages/characterRelation/characterRelation?id=' + 1 }); } else if (index === '2') { uni.navigateTo({ diff --git a/src/pages.json b/src/pages.json index 494937a..b6317fe 100644 --- a/src/pages.json +++ b/src/pages.json @@ -141,7 +141,8 @@ "style" : { "navigationBarTitleText" : "", - "enablePullDownRefresh" : false + "enablePullDownRefresh" : false, + "navigationStyle": "custom" } } ], diff --git a/src/pages/Login/Login.vue b/src/pages/Login/Login.vue index c76d138..0975d76 100644 --- a/src/pages/Login/Login.vue +++ b/src/pages/Login/Login.vue @@ -18,6 +18,7 @@ <view class="LoginBg"></view> <view class=""> </view> </view> + <el-form :hide-required-asterisk="true" ref="formLogin1" label-position="top" :rules="rules1" :model="loginData"> <el-form-item label="鐧诲綍璐﹀彿" prop="loginID"> @@ -52,7 +53,9 @@ </template> <script> - import CryptoJS from 'crypto-js'; + import { + encryptAES,decryptAES + } from '@/utils/Crypto.js' import { nextTick } from "vue"; @@ -104,7 +107,9 @@ required: true, message: '璇疯緭鍏ョ櫥褰曡处鍙�', trigger: 'blur' - }], + }, + + ], pass: [{ required: true, message: '璇疯緭鍏ュ瘑鐮�', @@ -174,8 +179,8 @@ // 鐧诲綍鐢ㄦ埛璐﹀彿 loginData: { // 璐﹀彿 - loginID: 'bbb', - pass: 'acy2jnwt/loR44ytIPPZBg==' + loginID: '', + pass: '' }, // 涔︾睄鏁版嵁 listData: [{ @@ -269,19 +274,14 @@ }, // 鐢ㄦ埛鐧诲綍 async Login(formName) { - // let Obj = { - // username: this.loginData.loginID, - // password: this.loginData.pass, - // } - // AES 鍔犲瘑 - console.log(this.loginData.pass); - const encrypted = CryptoJS.AES.encrypt(this.loginData.pass, 'secret passphrase'); + console.log(decryptAES(this.loginData.pass),'this.loginData.pass'); + let Obj = { + username: this.loginData.loginID, + // encryptAES(this.loginData.pass) | this.loginData.pass + password: encryptAES(this.loginData.pass), + } + console.log(Obj, 'Obj'); - // 灏嗗姞瀵嗙粨鏋滆浆鎹负 Base64 - const base64Result = encrypted.toString(CryptoJS.enc.Base64); - - // 杈撳嚭鍔犲瘑鍚庡苟杞崲涓� Base64 鐨勭粨鏋� - console.log('Encrypted and Base64 encoded password:', base64Result); let res = await getLogin(Obj) console.log(res, 'sfdsf'); if (res.success) { @@ -293,6 +293,9 @@ await getUserInfo().then(res => { console.log(res, 'rrrrrrrrrrsd'); }) + // 灏嗚处鍙峰瓨鍏ュ埌vuex涓� + this.$store.dispatch('setUserName',res.object.username) + uni.redirectTo({ url: '/pages/index/index' }) diff --git a/src/pages/Register/Register.vue b/src/pages/Register/Register.vue index f7cd1fb..32492c2 100644 --- a/src/pages/Register/Register.vue +++ b/src/pages/Register/Register.vue @@ -62,15 +62,18 @@ <view class="fff"></view> <!-- 搴曢儴鑺辩殑鑳屾櫙鍥惧彸渚� --> <view class="rrr"></view> - <Footer1 /> </view> </template> <script> import { - getaddLogin,getverifyCode + getaddLogin, + getverifyCode } from '@/api/index.js' + import { + encryptAES + } from '@/utils/Crypto.js' import { nextTick } from "vue"; @@ -115,10 +118,16 @@ // 娉ㄥ唽鐢ㄦ埛璐﹀彿鐨勬牎楠� rules: { loginID: [{ - required: true, - message: '璇疯緭鍏ョ櫥褰曡处鍙�', - trigger: 'blur' - }], + required: true, + message: '璇疯緭鍏ョ櫥褰曡处鍙�', + trigger: 'blur' + }, + { + pattern: /^[a-zA-Z0-9]{3,15}$/, + message: '璇疯緭鍏�3-15涓瓧绗︾殑瀛楁瘝鎴栨暟瀛�', + trigger: 'blur' + } // 鑷畾涔夋牎楠岃鍒欙紝浣跨敤姝e垯琛ㄨ揪寮� + ], pass: [{ required: true, message: '璇疯緭鍏ュ瘑鐮�', @@ -126,7 +135,7 @@ }, { min: 6, - max: 12, + max: 10, message: '瀵嗙爜闀垮害鍦� 6 鍒� 12 涓瓧绗�', trigger: 'blur' }, @@ -150,16 +159,10 @@ } ], verifyCode: [{ - required: true, - message: '璇疯緭鍏ラ獙璇佺爜', - trigger: 'blur' - }, - { - validator: (rule, value, callback) => this.validateVerificationCode(rule, value, - callback), - trigger: 'blur' - } - ] + required: true, + message: '璇疯緭鍏ラ獙璇佺爜', + trigger: 'blur' + }] }, // 鐧诲綍娉ㄥ唽妗� loginTrue: true, @@ -231,13 +234,12 @@ // console.log(number); if (number == 1) { console.log('鏈嶅姟鏉℃'); - uni.navigateTo({ - url:'/pages/userAgreement/userAgreement' - }) + window.open(`#/pages/userAgreement/userAgreement`) + // uni.navigateTo({ + // url: '/pages/userAgreement/userAgreement' + // }) } else if (number == 2) { - uni.navigateTo({ - url:'/pages/userAgreement/userAgreement' - }) + window.open(`#/pages/userAgreement/userAgreement`) console.log('鐢ㄦ埛闅愮淇濇姢鍜屼釜浜轰俊鎭潯娆�'); } }, @@ -252,50 +254,25 @@ let Obj = { communicateParam: this.registerData.cellphoneORmailbox, } + console.log(Obj); let code = await getverifyCode(Obj) - console.log(code); - console.log('鑾峰彇楠岃瘉鐮�'); - }, - // 鍒楄〃椤硅烦杞� - listDataClick(item) { - console.log(item); - // 鍦ㄥ綋鍓嶉〉闈㈣缃叏灞�鍙橀噺 - // uni.setStorageSync('globalData', { id: 123, name: 'example' }); - if (item.id == 1) { - uni.navigateTo({ - url: '/pages/repository/repository?id=' + item.id - }) - } else if (item.id == 2) { - console.log(item.name); - // uni.navigateTo({ - // url:'/pages/repository/repository?id='+item.id - // }) - } else if (item.id == 3) { - uni.navigateTo({ - url: '/pages/dataDisplay/dataDisplay?id=' + item.id - }) - } else if (item.id == 4) { - uni.navigateTo({ - url: '/pages/territory/territory?id=' + item.id - }) - } else if (item.id == 5) { - uni.navigateTo({ - url: '/pages/TcmSystem/TcmSystem?id=' + item.id - }) - } + console.log(code, '鑾峰彇楠岃瘉鐮�'); + // console.log('鑾峰彇楠岃瘉鐮�'); }, // 楠岃瘉鐮佹牎楠� validateVerificationCode(rule, value, callback) { if (value !== '123456') { - callback(new Error('楠岃瘉鐮侀敊璇�')); + // callback(new Error('楠岃瘉鐮侀敊璇�')); + callback() } else { callback(); } }, // 鎵嬫満鍙�/鎴栬�呴偖绠� validateContact(rule, value, callback) { - const regPhone = /^1[3456789]\d{9}$/; - const regEmail = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; + const regPhone = /^1[0-9]{10}$/; + const regEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; + console.log(value, regPhone.test(value), regEmail.test(value)); if (regPhone.test(value) || regEmail.test(value)) { callback(); // 鏍¢獙閫氳繃 } else { @@ -311,41 +288,49 @@ }, // 鐢ㄦ埛娉ㄥ唽 async Login(formName) { + console.log(formName); let Obj = { - // username: this.registerData.loginID, - // password: this.registerData.pass, + username: this.registerData.loginID, + password: encryptAES(this.registerData.pass), communicateParam: this.registerData.cellphoneORmailbox, - // verifyCode: this.registerData.verifyCode, - // "username": "bbbcccccc", - // "password": "EmgTXx6Iz/QrbL5nrP0h2g==", - // "communicateParam": "eacpjls@foxmails.com", - // "verifyCode": "LE5GVP" - + verifyCode: this.registerData.verifyCode, } - // uni.request({ - // url: 'http://icmm.test.xyinde.com/api/account/register', - // method: 'POST', - // data: Obj, - // success: (res) => { - // console.log(res.data); - // // this.text = 'request success'; - // } - // }) + this.$refs[formName].validate(async (valid) => { + if (valid) { + // alert('submit!'); + console.log('sdfds'); + await getaddLogin(Obj).then(res => { + console.log(res, '娉ㄥ唽鎴愬姛'); + if(res.success==true){ + uni.showToast({ + title: res.errorText, + icon: 'success' + }); + uni.navigateTo({ + url: '/pages/Login/Login' + }) + }else{ + uni.showToast({ + title: res.errorText, + icon: 'error' + }); + } + }) + // encryptAES + // uni.navigateTo({ + // url: '/pages/Login/Login' + // }) + } else { + console.log('error submit!!'); + return false; + } + }); + // console.log(Obj, '鐢ㄦ埛鐧诲綍鐨勭櫥褰曟寜閽�'); - + // let res = await getaddLogin(Obj) // console.log('sdfdsfs', res); - // this.$refs[formName].validate((valid) => { - // if (valid) { - // alert('submit!鎴愬姛'); - // uni.navigateTo({ - // url: '/pages/Login/Login' - // }) - // } else { - // console.log('error submit!!澶辫触'); - // return false; - // } - // }); + }, } } diff --git a/src/pages/TcmSystem/TcmSystem.vue b/src/pages/TcmSystem/TcmSystem.vue index f72f1f5..266ad30 100644 --- a/src/pages/TcmSystem/TcmSystem.vue +++ b/src/pages/TcmSystem/TcmSystem.vue @@ -26,15 +26,15 @@ <ul style="margin-top: 10rpx;"> <!-- background-color: #d6e3f4;border-radius: 60rpx; --> <li class="flex" - :style="{'background':institution.index === item.dynastyId ? '#DDE8F6' :'','borderRadius': institution.index === item.dynastyId ? '60rpx' :''}" + :style="{'background':institution.index === item.dynastyId ? '#DDE8F6' :'','borderRadius': institution.index === item.dynastyId ? '60rpx' :'',display:index+1>institutionIndex?'none':'flex'}" v-for="(item,index) in institution.list" :key="index" style="padding:0 20rpx;color: #2C2C2C;" @click="handInstitCLick(item,'a')"> <view class="">{{item.dynastyName}}</view> <view class="">{{item.count}}</view> </li> </ul> - <view class="flex flex-center toggleButton1"> - <view class="toggleButton" style="color: #244A7B;" @click="shrinkClick('a')"> + <view v-if="institution.list.length-1 >3" class="flex flex-center "> + <view class="toggleButton" style="color: #244A7B;" @click="shrinkClick('a','鏈烘瀯')"> {{ activeBox !== 'a' ? '鏇村 锕�' : '鏀惰捣 锔�' }} </view> </view> @@ -46,15 +46,15 @@ <ul style="margin-top: 10rpx;"> <!-- background-color: #d6e3f4;border-radius: 60rpx; --> <li class="flex" - :style="{'background':officials.index === item.dynastyId ? '#DDE8F6' :'','borderRadius': officials.index == item.dynastyId ? '10rem' :''}" + :style="{'background':officials.index === item.dynastyId ? '#DDE8F6' :'','borderRadius': officials.index == item.dynastyId ? '10rem' :'',display:index+1>officialsIndex?'none':'flex'}" v-for="(item,index) in officials.list" :key="index" style="padding:0 20rpx;" @click="handInstitCLick(item,'b')"> <view class="">{{item.dynastyName}}</view> <view class="">{{item.count}}</view> </li> </ul> - <view class="flex flex-center toggleButton1"> - <view class="toggleButton" style="color: #244A7B;" @click="shrinkClick('b')"> + <view v-if="officials.list.length-1 >3" class="flex flex-center "> + <view class="toggleButton" style="color: #244A7B;" @click="shrinkClick('b','鑱屽畼')"> {{ activeBox !== 'b' ? '鏇村 锕�' : '鏀惰捣 锔�' }} </view> </view> @@ -132,7 +132,6 @@ @current-change="CurrentChange" @prev-click="PrevClick" @next-click="NextClick" prev-text="涓婁竴椤�" next-text="涓嬩竴椤�" background layout="prev, pager, next"> </el-pagination> - </el-pagination> </el-row> </view> </view> @@ -155,9 +154,9 @@ </view> <ul class="flex creatureXinxi3"> <li @click="PDFClick(ListDetails,1)">RDF</li> - <li @click="PDFClick(2)">NT</li> - <li @click="PDFClick(3)">XML</li> - <li @click="PDFClick(4)">JSON</li> + <li @click="PDFClick(ListDetails,2)">NT</li> + <li @click="PDFClick(ListDetails,3)">XML</li> + <li @click="PDFClick(ListDetails,4)">JSON</li> </ul> </view> </view> @@ -230,26 +229,10 @@ institution: { title: '鏈烘瀯缁熻', index: 0, - list: [{ - dynastyName: '鍏ㄩ儴', - id: 1, - count: 829 - }, - { - dynastyName: '鍖诲', - id: 2, - count: 90 - }, { - dynastyName: '涓栧尰', - id: 3, - count: 81 - }, { - dynastyName: '瀹环鍖�', - id: 4, - count: 83 - }, - ] + list: [ ] }, + // 鏄剧ず澶氬皯鏉¤亴瀹樻暟鎹� + institutionIndex:4, // 鏈烘瀯鍜岃亴瀹樼殑绫诲瀷 鍙栧�硷細OFFICIAL->鑱屽畼 INSTITUTION->鏈烘瀯 ALL->鑱屽畼銆佹満鏋� classifyType: 'ALL', // 鏈烘瀯鍜岃亴瀹樼殑id @@ -258,42 +241,15 @@ officials: { title: '鑱屽畼缁熻', index: 0, - list: [{ - dynastyName: '鍏ㄩ儴', - id: 1, - count: 829 - }, - { - dynastyName: '鍖诲', - id: 2, - count: 90 - }, { - dynastyName: '涓栧尰', - id: 3, - count: 81 - }, { - dynastyName: '瀹环鍖�', - id: 4, - count: 83 - }, - ] + list: [ ] }, + // 鏄剧ず澶氬皯鏉¤亴瀹樻暟鎹� + officialsIndex:4, // 鏉ユ簮 source: { title: '鏉ユ簮', index: 0, - list: [{ - source: '涓浗鍖讳簨鍒跺害杈炲吀', - id: 1, - }, - { - source: '涓尰鍖讳簨澶у叏', - id: 2, - }, { - source: '涓浗鍖讳簨鍒跺害鐮旂┒', - id: 3, - } - ] + list: [ ] }, // 灞曞紑鍜屾敹缂╃殑鎸夐挳闇�瑕� activeBox: null, @@ -314,19 +270,7 @@ }], // 鐑棬鎼滅储 - hot: [{ - id: 1, - name: '鏉庢椂鐝�', - bgColor: false - }, { - id: 2, - name: '鏉庢椂鐝�2', - bgColor: false - }, { - id: 3, - name: '鏉庢椂鐝�3', - bgColor: false - }, ], + hot: [], // 鐐瑰嚮鐨勬悳绱㈤」 HotBg: false, // 鎺掑簭涓嬫媺鑿滃崟 @@ -339,65 +283,11 @@ }], rankVal: 'NAME', // 鍒楄〃椤� - CommodityList: [{ - id: 1, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍙や唬鍖荤枟鏈烘瀯鍚嶇О锛屽お鍖婚櫌鍚嶇О濮嬩簬閲戜唬锛屾壙琚簬鍞愬畫鐨勫お鍖荤讲銆佸お鍖诲眬锛屼互鍚庡巻浠e潎绔嬫湁澶尰闄㈡満鏋勫巻浠e潎绔嬫湁澶尰闄㈡満鏋�' - }, - { - id: 2, - post: '鑱屽畼', - name: '澶尰闄�', - dynasty: '鍞愭湞', - color: '#DA7A2B', - anotherNamer: '鍒О----------', - content: '鍙や唬鍖荤枟鏈烘瀯鍚嶇О锛屽お鍖婚櫌鍚嶇О濮嬩簬閲戜唬锛屽彜浠e尰鐤楁満鏋勫悕绉帮紝澶尰闄㈠悕绉板浜庨噾浠o紝鍙や唬鍖荤枟鏈烘瀯鍚嶇О锛屽お鍖婚櫌鍚嶇О濮嬩簬閲戜唬锛屽彜浠e尰鐤楁満鏋勫悕绉帮紝澶尰闄㈠悕绉板浜庨噾浠o紝鍙や唬鍖荤枟鏈烘瀯鍚嶇О锛屽お鍖婚櫌鍚嶇О濮嬩簬閲戜唬锛�' - }, - { - id: 3, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍐呭++++++++++++++++++++++++++++++' - }, - { - id: 3, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍐呭++++++++++++++++++++++++++++++' - }, - { - id: 3, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍐呭++++++++++++++++++++++++++++++' - }, - { - id: 3, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍐呭++++++++++++++++++++++++++++++' - } - ], + CommodityList: [ ], // 鍒楄〃鐨勮鎯呮暟鎹� ListDetails: {}, // 鍒嗛〉鐨勬�绘暟 - total: 100, + total: 0, // 褰撳墠椤� CurrentPage: 1, // 涓�椤垫樉绀哄灏戞潯鏁版嵁 @@ -462,6 +352,7 @@ // [{name:'sdf',number}] console.log(res, '鎺ュ彛鎴愬姛sdsdfsdsfs'); }) + }, // 鍙充晶鐨刲ist鏁版嵁 async getMList(obj) { @@ -512,16 +403,19 @@ // 宸︿晶鐨勬満鏋勭粺璁$瓑绛夋寜閽� handInstitCLick(item, name) { if (name == 'a') { + this.CurrentPage = 1 this.institution.index = item.dynastyId this.classifyId = item.dynastyId this.classifyType = 'INSTITUTION' this.getMList() } else if (name == 'b') { + this.CurrentPage = 1 this.officials.index = item.dynastyId this.classifyId = item.dynastyId this.classifyType = 'OFFICIAL' this.getMList() } else if (name == 'c') { + this.CurrentPage = 1 this.source.index = item.bookId this.getMList() console.log(); @@ -529,14 +423,23 @@ console.log(item, name); }, // 灞曞紑鏀剁缉 - shrinkClick(box) { + shrinkClick(box,name) { console.log(box); - if (this.activeBox === box) { - console.log('sdfs'); - this.activeBox = null; - } else { - this.activeBox = box; + if(name=='鏈烘瀯'){ + this.institutionIndex = this.institutionIndex < this.institution.list.length ? this.institution.list.length : 4; + this.officialsIndex=4 + this.activeBox = this.activeBox === 'a' ? null : 'a'; + }else if(name=='鑱屽畼'){ + this.officialsIndex = this.officialsIndex < this.officials.list.length ? this.officials.list.length : 4; + this.institutionIndex=4 + this.activeBox = this.activeBox === 'b' ? null : 'b'; } + // if (this.activeBox === box) { + // console.log('sdfs'); + // this.activeBox = null; + // } else { + // this.activeBox = box; + // } }, //鍙栧�硷細RDF銆丯T銆乆ML銆丣SON async PDFClick(item,index) { @@ -553,9 +456,22 @@ // url:`/pages/RDF/RDF?${queryString}` // }) window.open(`#/pages/RDF/RDF?${queryString}`) - // await getMedicalDataOutput(Obj).then(res=>{ - // console.log(res,'ressres'); - // }) + }else if(index ==2){ + Obj.outputType='NT' + let queryString = Object.keys(Obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(Obj[key])}`).join('&'); + window.open(`#/pages/NT/NT?${queryString}`) + }else if(index==3){ + Obj.outputType='XML' + console.log('XML'); + await getMedicalDataOutput(Obj).then(res=>{ + console.log(res,'鎺ュ彛XML'); + }) + }else if(index ==4){ + Obj.outputType='JSON' + console.log('JSON'); + await getMedicalDataOutput(Obj).then(res=>{ + console.log(res,'鎺ュ彛JSON'); + }) } // console.log(Obj.id,); }, @@ -1039,10 +955,6 @@ } } - .a, - .b { - min-height: 3rem !important; - } .paixu { /* margin-right: .3rem; diff --git a/src/pages/changePassword/changePassword.vue b/src/pages/changePassword/changePassword.vue index 28c6e12..1225c57 100644 --- a/src/pages/changePassword/changePassword.vue +++ b/src/pages/changePassword/changePassword.vue @@ -24,16 +24,16 @@ <el-form :hide-required-asterisk="true" ref="formLogin2" label-position="right" :rules="rules" :model="amendDataPass"> <el-form-item label="鐧诲綍璐﹀彿" prop="loginID"> - <el-input v-model="amendDataPass.loginID"></el-input> + <el-input v-model="amendDataPass.loginID"></el-input> </el-form-item> <el-form-item label="鍘熷瘑鐮�" prop="rawPass"> - <el-input v-model="amendDataPass.rawPass"></el-input> + <el-input type="password" v-model="amendDataPass.rawPass"></el-input> </el-form-item> <el-form-item label="鏂板瘑鐮�" prop="newPass"> - <el-input v-model="amendDataPass.newPass"></el-input> + <el-input type="password" v-model="amendDataPass.newPass"></el-input> </el-form-item> <el-form-item label="纭鏂板瘑鐮�" prop="checkPass"> - <el-input v-model="amendDataPass.checkPass"></el-input> + <el-input type="password" v-model="amendDataPass.checkPass"></el-input> </el-form-item> <el-form-item class="btn"> <el-button class="font-family" @@ -58,6 +58,9 @@ import { getchangePassword } from '@/api/index.js' + import { + encryptAES + } from '@/utils/Crypto.js' import { nextTick } from "vue"; @@ -110,7 +113,7 @@ trigger: 'blur' }, { - min: 6, + min: 5, max: 12, message: '瀵嗙爜闀垮害鍦� 6 鍒� 12 涓瓧绗�', trigger: 'blur' @@ -164,7 +167,7 @@ value: 'sdfdsf', // 淇敼瀵嗙爜 amendDataPass: { - loginID: '', + loginID: this.$store.state.username, rawPass: "", newPass: "", checkPass: "" @@ -209,47 +212,6 @@ // }) uni.navigateBack(); }, - // 鑾峰彇楠岃瘉鐮� - verifyCodeClick() { - console.log('鑾峰彇楠岃瘉鐮�'); - }, - // 鍒楄〃椤硅烦杞� - listDataClick(item) { - console.log(item); - // 鍦ㄥ綋鍓嶉〉闈㈣缃叏灞�鍙橀噺 - // uni.setStorageSync('globalData', { id: 123, name: 'example' }); - if (item.id == 1) { - uni.navigateTo({ - url: '/pages/repository/repository?id=' + item.id - }) - } else if (item.id == 2) { - console.log(item.name); - // uni.navigateTo({ - // url:'/pages/repository/repository?id='+item.id - // }) - } else if (item.id == 3) { - uni.navigateTo({ - url: '/pages/dataDisplay/dataDisplay?id=' + item.id - }) - } else if (item.id == 4) { - uni.navigateTo({ - url: '/pages/territory/territory?id=' + item.id - }) - } else if (item.id == 5) { - uni.navigateTo({ - url: '/pages/TcmSystem/TcmSystem?id=' + item.id - }) - } - }, - // 楠岃瘉鐮佹牎楠� - validateVerificationCode(rule, value, callback) { - console.log(value) - if (value !== '123456') { - callback(new Error('楠岃瘉鐮侀敊璇�')); - } else { - callback(); - } - }, getElementWidth() { this.$nextTick(() => { var width = this.$refs.Rtop.$el.clientWidth; @@ -259,40 +221,32 @@ }, // 蹇樿瀵嗙爜 async Login2(formName) { - console.log('蹇樿瀵嗙爜鐨勭櫥褰曟寜閽�'); let Obj = { username: this.amendDataPass.loginID, - password: this.amendDataPass.rawPass, - newPassword:this.amendDataPass.newPass, + password: encryptAES(this.amendDataPass.rawPass) , + newPassword:encryptAES(this.amendDataPass.newPass), } console.log(Obj); - let res = await getchangePassword(Obj) - console.log(res, 'sfdsf'); - // if (res.success) { - // uni.showToast({ - // title: '鐧诲綍鎴愬姛', - // }) - // // 灏唗oken瀛樺偍鍐嶆湰鍦颁腑 - // window.localStorage.setItem("access_token", res.results.token) - // await getUserInfo().then(res => { - // console.log(res, 'rrrrrrrrrrsd'); - // }) - // uni.redirectTo({ - // url: '/pages/index/index' - // }) - // } else { - // console.log('sdfdsfsdf'); - // uni.showToast({ - // title: res.errorText, - // icon: 'error' - // }) - // // alert("sdfdsf") - // this.loginData.pass = '' - // } - this.$refs[formName].validate((valid) => { + this.$refs[formName].validate(async (valid) => { if (valid) { - alert('submit!鎴愬姛'); - // uni.redirectTo({ + // alert('submit!鎴愬姛'); + await getchangePassword(Obj).then(res=>{ + // console.log(res,'淇敼瀵嗙爜鎴愬姛'); + if(res.success==true){ + uni.showToast({ + title: res.object, + icon: 'none' + }); + uni.navigateBack(); + console.log('淇敼鎴愬姛',res); + }else{ + uni.showToast({ + title: res.errorText, + icon: 'none' + }); + } + }) + // uni.redirectTo({ encryptAES // url: '/pages/Login/Login' // }) } else { diff --git a/src/pages/characterMap/characterMap.vue b/src/pages/characterMap/characterMap.vue index c252de6..17e3c8f 100644 --- a/src/pages/characterMap/characterMap.vue +++ b/src/pages/characterMap/characterMap.vue @@ -43,7 +43,7 @@ import 'echarts/extension/bmap/bmap'; import { loadBMap - } from "../../static/map.js" + } from "@/static/map.js" export default { data() { diff --git a/src/pages/characterRelation/characterRelation.vue b/src/pages/characterRelation/characterRelation.vue index ee78364..daf5abe 100644 --- a/src/pages/characterRelation/characterRelation.vue +++ b/src/pages/characterRelation/characterRelation.vue @@ -3,7 +3,7 @@ <headNav idIndex="1" text="涓尰浜虹墿鏁版嵁搴�" /> <!-- 楂樼骇鎼滅储 --> <view style="margin: .35rem 0 .16rem 0; "> - <advancedSearch @onSearch="onSearch" :from="From" placehold="杈撳叆濮撳悕/鍒悕/鏈濅唬/浼犱富鑱屼笟鎼滅储" /> + <advancedSearch @onSearch="onSearch" @onSubmit="onSubmit" :from="From" placehold="杈撳叆濮撳悕/鍒悕/鏈濅唬/浼犱富鑱屼笟鎼滅储" /> </view> <!-- 鐑棬鎼滅储 --> <view class="flex flex-center hotSearch"> @@ -14,6 +14,7 @@ </li> </ul> </view> + <view class="" style="margin-left: .2rem;">涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�</view> <!-- 鍏崇郴琛ㄥ湴鍥� --> <view id="relation" style="margin-top: .2rem; height: 70vh;width: 100%;"></view> <!-- 鏈濅唬 --> @@ -38,14 +39,19 @@ import { getDataStatistics, getHotSearch, - getFuzzySearch + getFuzzySearch, + getAdvanceSearch, + getPDataStatistics } from '@/api/index.js' import * as echarts from 'echarts'; export default { data() { return { // echarts鏁版嵁 - nodes: ['鏉庢椂鐝�'], + nodes: [{ + name: '鏉庢椂鐝�', + id: 23 + }], // echarts涓よ�呯殑鍏崇郴 relationships: [{ source: '鏉庢椂鐝�', @@ -82,39 +88,60 @@ name: 'alias', value: '' }, { - type: 'number', - label: 'inst', - name: 'inst', - value: '' - }, { type: 'input', - label: 'location', + label: '绫嶈疮', name: 'location', value: '' }, { + type: 'select', + label: '鑱屼笟', + name: 'sdId', + value: '', + options: [{ + label: '鏈寚鏄�', + value: 'UNKNOWN' + }, ] + }, { type: 'input', - label: 'office', + label: '瀹樿亴', name: 'office', value: '' }, { - type: 'number', - label: 'page', - name: 'page', - value: '' - }, { - type: 'number', - label: 'pageSize', - name: 'pageSize', - value: '' + type: 'select', + label: '鎬у埆', + value: '', + name: 'genderTypeEO', + options: [{ + label: '鏈寚鏄�', + value: 'UNKNOWN' + }, { + label: '鐢�', + value: 'MALE' + }, + { + label: '濂�', + value: 'WOMAN' + } + ] }, { type: 'input', - label: 'period', + label: '鏃堕棿', name: 'period', value: '' }, { type: 'input', - label: 'sdId', - name: 'sdId', + label: '鏈烘瀯', + name: 'inst', + value: '' + }, { + type: 'number', + label: '椤电爜', + name: 'page', + value: '' + }, { + type: 'number', + label: '椤靛ぇ灏�', + name: 'pageSize', value: '' }, ] }, @@ -219,7 +246,6 @@ }, methods: { - // 鍏崇郴鍥捐氨 relation() { var chartDom = document.getElementById('relation'); @@ -251,60 +277,73 @@ } // 鏍规嵁鍏崇郴鏁版嵁鐢熸垚杩炴帴绾� var links = []; - relationships.forEach(function(relationship) { - var sourceIndex = nodes.indexOf(relationship.source); - var targetIndex = nodes.indexOf(relationship.target); - // console.log(sourceIndex, targetIndex); - if (sourceIndex !== -1 && targetIndex !== -1) { - links.push({ - source: sourceIndex, - target: targetIndex, - label: { - show: true, - formatter: function(params) { // 浣跨敤鍑芥暟鍔ㄦ�佺敓鎴愭爣绛惧唴瀹� - return relationships.find(rel => rel.source === nodes[params.data - .source] && rel.target === nodes[params.data.target]) - .relation; - }, // 璁剧疆鍏崇郴鏍囩鍐呭涓�"Child-Parent" - color: '#2C2C2C', - fontSize: FontSize - 2, - backgroundColor: 'rgba(255, 255, 255, 1)', - padding: [3, 8], - borderRadius: 30, - position: 'middle', // 璁剧疆鏍囩鏂囨湰鍦ㄧ嚎鐨勪腑闂翠綅缃笂灞呬腑鏄剧ず - // bottom: -(FontSize+10), - z: 10, // 璁剧疆鏍囩鐨剒杞撮珮搴︼紝浣垮叾姣旇繛鎺ョ嚎鏇撮珮 - // offset: [0, 15] ,// 寰�涓嬬Щ鍔� 10 鍍忕礌 - distance: -(Distance + 1), // 灏嗘爣绛炬斁缃湪杩炴帴绾夸笂 - } - }); + relationships.forEach((relationship, i) => { + // 闈� + var sourceIndex = nodes.findIndex((node) => node.name === relationship.source); + var targetIndex = nodes.findIndex((node) => node.name === relationship.target); + if (relationship.relation) { + if (sourceIndex !== -1 && targetIndex !== -1) { + console.log(relationship.source, relationship.target); + links.push({ + source: sourceIndex, + target: targetIndex, + label: { + show: true, + formatter: function(params) { // 浣跨敤鍑芥暟鍔ㄦ�佺敓鎴愭爣绛惧唴瀹� + // console.log(params, 'paramsparamsparamsparamsparams'); + // return relationships.find(rel => rel.source === nodes[params.data + // .source] && rel.target === nodes[params.data.target]) + // .relation; + return relationship.relation; + }, // 璁剧疆鍏崇郴鏍囩鍐呭涓�"Child-Parent" + color: '#2C2C2C', + fontSize: FontSize - 2, + backgroundColor: 'rgba(255, 255, 255, 1)', + padding: [3, 8], + borderRadius: 30, + position: 'middle', // 璁剧疆鏍囩鏂囨湰鍦ㄧ嚎鐨勪腑闂翠綅缃笂灞呬腑鏄剧ず + // bottom: -(FontSize+10), + z: 10, // 璁剧疆鏍囩鐨剒杞撮珮搴︼紝浣垮叾姣旇繛鎺ョ嚎鏇撮珮 + // offset: [0, 15] ,// 寰�涓嬬Щ鍔� 10 鍍忕礌 + distance: -(Distance + 1), // 灏嗘爣绛炬斁缃湪杩炴帴绾夸笂 + } + }); + } } - }); - console.log(links); // 鏍规嵁nodes鍔ㄦ�佺敓鎴愯妭鐐规暟鎹� var nodeData = nodes.map(function(node, index) { return { - name: node, + name: node.name, + id: node.id, x: Math.random() * 2000, // 璁剧疆闅忔満x鍧愭爣浣嶇疆 y: Math.random() * 600, // 璁剧疆闅忔満y鍧愭爣浣嶇疆 itemStyle: { - color: getColorByIndex(index), // 鍙互鏍规嵁绱㈠紩璁剧疆涓嶅悓鐨勯鑹� + color: getColorByIndex(), // 鍙互鏍规嵁绱㈠紩璁剧疆涓嶅悓鐨勯鑹� borderWidth: BorderWidth, - borderColor: getColorByIndex(index + 1) + borderColor: getColorByIndex() } }; }); // 璁剧疆棰滆壊 - function getColorByIndex(index) { - var colors = ['#ecf4ff', '#dd9795', '#f1edbe', '#ecf4ff', '#c5dbd8']; // 鍙互鏍规嵁瀹為檯鎯呭喌璁剧疆棰滆壊鏁扮粍 - return colors[index % colors.length]; + function getColorByIndex() { + // 鐢熸垚闅忔満鐨� R銆丟銆丅 鍒嗛噺鍊硷紝闄愬埗鍦ㄦ洿楂樼殑鑼冨洿鍐� + var r = Math.floor(Math.random() * 106) + 150; // 150 鍒� 255 涔嬮棿鐨勯殢鏈烘暟 + var g = Math.floor(Math.random() * 106) + 150; // 150 鍒� 255 涔嬮棿鐨勯殢鏈烘暟 + var b = Math.floor(Math.random() * 106) + 150; // 150 鍒� 255 涔嬮棿鐨勯殢鏈烘暟 + // 灏� R銆丟銆丅 鍒嗛噺鍊艰浆鎹负鍗佸叚杩涘埗锛屽苟纭繚姣忎釜鍒嗛噺鍊奸兘鏄袱浣嶆暟 + var hexR = r.toString(16).padStart(2, '0'); // 浣跨敤 padStart 鏂规硶纭繚鐢熸垚鐨勫崄鍏繘鍒舵暟涓轰袱浣� + var hexG = g.toString(16).padStart(2, '0'); + var hexB = b.toString(16).padStart(2, '0'); + // 鎷兼帴鍗佸叚杩涘埗棰滆壊鍊� + var color = '#' + hexR + hexG + hexB; + return color; } var option; option = { title: { // text: '涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�', - subtext: '涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�', + // subtext: '', left: 'center', top: FontSize + 10, // textStyle: { @@ -345,11 +384,8 @@ } }] }; - // 灏嗙敓鎴愮殑杩炴帴绾挎坊鍔犲埌echarts鍥捐〃鐨刼ption涓� option.series[0].links = links; - - // 璁剧疆鐐瑰嚮浜嬩欢鐩戝惉 myChart.on('click', (params) => { // menuNav2 = !menuNav1 @@ -365,13 +401,13 @@ }) option && myChart.setOption(option); }, - // 鍏崇郴鍥� + // 鍏崇郴鍥� 鐐瑰嚮閲岄潰鐨勫厓绱� spaceTimeArr(Arr) { // 鍏崇郴鍥剧殑鏁版嵁 console.log(Arr); - // uni.navigateTo({ - // url: '/pages/repository/repository' - // }) + uni.navigateTo({ + url: '/pages/repository/repository' + }) }, // 鑾峰彇鏈濅唬echarts鐨勬暟鎹� async echartsArr() { @@ -387,59 +423,141 @@ }) console.log(this.dynasty, 'sdfsfd'); }) + }, // 鐑棬鎼滅储 async hotSearch() { await getHotSearch().then(res => { console.log(res, 'saaadfds'); - this.hot= Object.keys(res.object).map(key => { - return { id: parseInt(key), name: res.object[key] }; + this.hot = Object.keys(res.object).map(key => { + return { + id: parseInt(key), + name: res.object[key] + }; }) // this.hot = res.list }) }, + // 鍩虹鎼滅储 async onSearch(val) { console.log(val); await getFuzzySearch(val.text).then(res => { + console.log(res, 'jieko'); if (res.list) { this.nodes = [] - this.nodes[0] = res.list[0].name1 - this.nodes[1] = res.list[0].name2 - for (let i = 1; i < res.list.length; i++) { - this.nodes.push(res.list[i].name2); - } - this.nodes = [...new Set(this.nodes)] - this.relationships = this.nodes.slice(1).map(item => { - return { - source: this.nodes[0], - target: item, - relation: '' - }; + this.relationships = [] + res.list.forEach((item, index) => { + let exists1 = this.nodes.some(node => (node.id === item.identifier1 && node + .name === item.name1)); + let exists2 = this.nodes.some(node => (node.id === item.identifier2 && node + .name === item.name2)); + // 璇佹槑涓嶅瓨鍦� + if (exists1 !== true) { + this.nodes.push({ + name: item.name1, + id: item.identifier1 + }) + } + if (exists2 !== true) { + this.nodes.push({ + name: item.name2, + id: item.identifier2 + }) + } + let obj = { + source: item.name1, + target: item.name2, + relation: item.relationName || + '' // 濡傛灉瀛樺湪 relationName 瀛楁鍒欎娇鐢紝鍚﹀垯涓虹┖瀛楃涓� + } + // 鍙湁褰� item.relationName 瀛樺湪鏃讹紝鎵嶅悜 obj 瀵硅薄涓坊鍔� relation 瀛楁 + if (item.relationName) { + obj.relation = item.relationName; + } + this.relationships.push(obj) + }); - + // this.nodes = [] + // this.nodes[0] = { + // name: res.list[0].name1, + // id: res.list[0].identifier1 + // } + // this.nodes[1] = { + // name: res.list[1].name1, + // id: res.list[1].identifier1 + // } + // for (let i = 1; i < res.list.length; i++) { + // let node1 = { + // name: res.list[i].name1, + // id: res.list[i].identifier1 + // } + // this.nodes.push(node1); + // // console.log(i); + // } + // this.nodes = [...new Set(this.nodes.map(node => JSON.stringify(node)))].map(node => + // JSON.parse(node)); + // console.log(this.nodes,'nodesnodesnodesnodes'); + // this.relationships = this.nodes.slice(1).map((item, index) => { + // console.log(item,res.list[index].relationName, 'iiiiiiiiiiiiisdfdsf'); + // return { + // source: this.nodes[0].name, + // target: item.name, + // relation: res.list[index].relationName + // }; + // }); } else { - alert('娌℃湁鎼滅储鍒版暟鎹�') + // alert('娌℃湁鎼滅储鍒版暟鎹�') } + this.relation() console.log(res); - }) - this.relation() + }) + + }, + // 楂樼骇鎼滅储 + async onSubmit(val) { + console.log(val); + await getAdvanceSearch(val).then(res => { + console.log(res, '鎺ュ彛璋冪敤鎴愬姛'); + }) }, // 鐐瑰嚮涓嬮潰鐨勬湞浠f寜閽� dynastyBottomClick(item) { + this.dynastyColor = item.id this.onSearch({ text: item.name }) }, + // 楂樼骇鎼滅储閲岄潰鑱屼笟鐨勪笅鎷夎彍鍗� + async innt() { + await getPDataStatistics().then(res => { + const professionIndex = this.From.from.findIndex(field => field.label === '鑱屼笟'); + // 濡傛灉鎵惧埌浜嗚亴涓氬瓧娈� + if (professionIndex !== -1) { + // 灏� profession.list 杞崲涓� options 鏍煎紡 + const options = res.object.occupationStatistic.details.map(item => ({ + label: item.tagName, + value: item.tagId.toString() // 灏� id 杞崲涓哄瓧绗︿覆锛岀‘淇濅笌 value 绫诲瀷涓�鑷� + })); + // 鏇存柊鑱屼笟瀛楁鐨� options 灞炴�� + this.$set(this.From.from[professionIndex], 'options', options); + } + }) + } }, mounted() { - // 鍏崇郴鍥捐氨 this.relation() this.echartsArr() this.hotSearch() + this.onSearch({ + text: '' + }) // 鐩戝惉绐楀彛澶у皬鍙樺寲 window.addEventListener('resize', this.relation); + + + this.innt() } } </script> diff --git a/src/pages/forgetPass/forgetPass.vue b/src/pages/forgetPass/forgetPass.vue index 94388ed..313040f 100644 --- a/src/pages/forgetPass/forgetPass.vue +++ b/src/pages/forgetPass/forgetPass.vue @@ -34,11 +34,11 @@ 鑾峰彇楠岃瘉鐮�</view> </view> </el-form-item> - <el-form-item label="鏂板瘑鐮�" prop="pass"> - <el-input v-model="resetDataPass.newPass"></el-input> + <el-form-item label="鏂板瘑鐮�" prop="newPass"> + <el-input type="password" v-model="resetDataPass.newPass"></el-input> </el-form-item> <el-form-item label="纭鏂板瘑鐮�" prop="checkPass"> - <el-input v-model="resetDataPass.checkPass"></el-input> + <el-input type="password" v-model="resetDataPass.checkPass"></el-input> </el-form-item> <el-form-item class="btn"> <el-button class="font-family" @@ -61,9 +61,19 @@ <script> import { + getRestPassword, + getverifyCode + } from '@/api/index.js' + import { + encryptAES + } from '@/utils/Crypto.js' + import { nextTick } from "vue"; import Footer1 from '@/components/footer/footer.vue' + import { + Message + } from 'element-ui' export default { components: { Footer1 @@ -74,7 +84,7 @@ if (value === '') { callback(new Error('璇疯緭鍏ュ瘑鐮�')); } else { - if (this.registerData.checkPass !== '') { + if (this.resetDataPass.checkPass !== '') { this.$nextTick(() => { this.$refs.formLogin.validateField('checkPass'); }); @@ -86,7 +96,7 @@ var validatePass2 = (rule, value, callback) => { if (value === '') { callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�')); - } else if (value !== this.registerData.pass) { + } else if (value !== this.resetDataPass.newPass) { callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!')); } else { callback(); @@ -108,14 +118,14 @@ message: '璇疯緭鍏ョ櫥褰曡处鍙�', trigger: 'blur' }], - pass: [{ + newPass: [{ required: true, message: '璇疯緭鍏ュ瘑鐮�', trigger: 'blur' }, { min: 6, - max: 12, + max: 10, message: '瀵嗙爜闀垮害鍦� 6 鍒� 12 涓瓧绗�', trigger: 'blur' }, @@ -130,43 +140,19 @@ }], cellphoneORmailbox: [{ required: true, - message: '璇疯緭鍏ラ偖绠卞湴鍧�', + message: '璇疯緭鍏ユ墜鏈哄彿鎴栭偖绠�', trigger: 'blur' }, { - type: 'email', - message: '璇疯緭鍏ユ纭殑閭鍦板潃', - trigger: ['blur', 'change'] + validator: this.validateContact, + trigger: 'blur' } ], verifyCode: [{ - required: true, - message: '璇疯緭鍏ラ獙璇佺爜', - trigger: 'blur' - }, - { - validator: (rule, value, callback) => this.validateVerificationCode(rule, value, callback), - trigger: 'blur' - } - ] - }, - // 鐧诲綍娉ㄥ唽妗� - loginTrue: true, - Rtop1: 0, - value: 'sdfdsf', - // 娉ㄥ唽鐢ㄦ埛瀵瑰簲鐨勬暟鎹� - registerData: { - loginID: '', - pass: '', - checkPass: '', - cellphoneORmailbox: '', - verifyCode: '' - }, - // 鐧诲綍鐢ㄦ埛璐﹀彿 - loginData: { - // 璐﹀彿 - loginID: '', - pass: '' + required: true, + message: '璇疯緭鍏ラ獙璇佺爜', + trigger: 'blur' + }] }, // 閲嶇疆瀵嗙爜 resetDataPass: { @@ -175,32 +161,6 @@ newPass: "", checkPass: "" }, - // 淇敼瀵嗙爜 - amendDataPass: { - loginID: '', - originalPass: "", - newPass: "", - checkPass: "" - }, - // 涔︾睄鏁版嵁 - listData: [{ - name: '鍘嗕唬鍖诲浼犺搴�', - id: 1, - }, { - name: '涓栧尰鍖诲搴�', - id: 2, - }, { - name: '鍖诲瀛︽湳娴佹淳', - id: 3, - }, { - name: '涓浗鍦板煙鍖昏氨', - id: 4, - }, { - name: '涓浗鍖讳簨鍒跺害', - id: 5, - }, - - ] } }, onLoad() { @@ -222,8 +182,14 @@ }) }, // 鑾峰彇楠岃瘉鐮� - verifyCodeClick() { + async verifyCodeClick() { console.log('鑾峰彇楠岃瘉鐮�'); + let Obj = { + communicateParam: this.resetDataPass.cellphoneORmailbox, + } + await getverifyCode(Obj).then(res => { + console.log(res, '楠岃瘉鐮佽幏鍙栨垚鍔�'); + }) }, // 鍒楄〃椤硅烦杞� listDataClick(item) { @@ -253,13 +219,16 @@ }) } }, - // 楠岃瘉鐮佹牎楠� - validateVerificationCode(rule, value, callback) { - console.log(value) - if (value !== '123456') { - callback(new Error('楠岃瘉鐮侀敊璇�')); + + // 鎵嬫満鍙�/鎴栬�呴偖绠� + validateContact(rule, value, callback) { + const regPhone = /^1[0-9]{10}$/; + const regEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; + console.log(value, regPhone.test(value), regEmail.test(value)); + if (regPhone.test(value) || regEmail.test(value)) { + callback(); // 鏍¢獙閫氳繃 } else { - callback(); + callback(new Error('璇疯緭鍏ユ纭殑鎵嬫満鍙锋垨閭')); // 鏍¢獙澶辫触 } }, getElementWidth() { @@ -269,30 +238,31 @@ console.log('Element width:', width); }) }, - // 鐢ㄦ埛鐧诲綍 - Login(formName) { - console.log('鐢ㄦ埛鐧诲綍鐨勭櫥褰曟寜閽�'); - this.$refs[formName].validate((valid) => { - if (valid) { - alert('submit!鎴愬姛'); - uni.navigateTo({ - url: '/pages/Login/Login' - }) - } else { - console.log('error submit!!澶辫触'); - return false; - } - }); - }, // 蹇樿瀵嗙爜 Login2(formName) { - console.log('蹇樿瀵嗙爜鐨勭櫥褰曟寜閽�'); - this.$refs[formName].validate((valid) => { + let Obj = { + "communicateParam": this.resetDataPass.cellphoneORmailbox, //鎵嬫満鎴栭偖绠� + "verifyCode": this.resetDataPass.verifyCode, //楠岃瘉鐮� + "newPassword": encryptAES(this.resetDataPass.newPass) //鏂板瘑鐮� + } + console.log(Obj); + this.$refs[formName].validate(async (valid) => { if (valid) { - alert('submit!鎴愬姛'); - uni.redirectTo({ - url: '/pages/Login/Login' + await getRestPassword(Obj).then(res => { + console.log(res, '鎺ュ彛'); + if (res.success) { + console.log('蹇樿瀵嗙爜鐨勬帴鍙f嬁鍒版暟鎹簡'); + uni.navigateTo({ + url: '/pages/Login/Login' + }) + } else { + Message.error(res.errorText || '') + } }) + // alert('submit!鎴愬姛'); + // uni.redirectTo({ + // url: '/pages/Login/Login' + // }) } else { console.log('error submit!!澶辫触'); return false; @@ -408,127 +378,129 @@ .asdf { margin-bottom: .1rem !important; } - + .LoginBg { margin: 0 !important; height: .3rem !important; } - + ::v-deep .el-card { top: 80% !important; padding: 0 !important; } - + ::v-deep .el-card__body { padding: .25rem .5rem !important; } - + ::v-deep .el-form { padding-left: .1rem !important; } - + ::v-deep .el-form-item__error { font-size: .13rem !important; } - + ::v-deep .el-input__inner { height: .35rem !important; } - + .hua { height: 5rem !important; } - + .LoginTop { margin-bottom: .25rem !important; } - + .yzm { top: 15% !important; } - + .fff { width: 2.4rem !important; height: 4rem !important; } - + .rrr { width: 2rem !important; height: 2.5rem !important; } - + .btn ::v-deep .el-button { margin-top: 0.2rem !important; /* font-size: 0.2rem !important; width: 100%; padding: 0.12rem !important; */ } - + .asdf { margin-bottom: .1rem !important; } } - @media screen and (min-width: 1920px) and (max-width:2560px){ + + @media screen and (min-width: 1920px) and (max-width:2560px) { .LoginBg { margin: 0 !important; height: .3rem !important; } - + ::v-deep .el-card { top: 80% !important; padding: 0 !important; } - + ::v-deep .el-card__body { padding: .25rem .5rem !important; } - + ::v-deep .el-form { padding-left: .1rem !important; } - + ::v-deep .el-form-item__error { font-size: .13rem !important; } - + ::v-deep .el-input__inner { height: .35rem !important; } - + .hua { height: 5rem !important; } - + .LoginTop { margin-bottom: .25rem !important; } - + .yzm { top: 15% !important; } - + .fff { width: 2.4rem !important; height: 4rem !important; } - + .rrr { width: 2rem !important; height: 2.5rem !important; } - + .btn ::v-deep .el-button { margin-top: 0.2rem !important; /* font-size: 0.2rem !important; width: 100%; padding: 0.12rem !important; */ } - + .asdf { margin-bottom: .1rem !important; } } + .LoginBg { width: 1.2rem; height: .37rem; diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 16483d0..068b697 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -16,7 +16,7 @@ <view class="flex searchCss" :style="{'backgroundColor': isExpanded==true?'#fff':''}" style="border-radius: .5rem; height: 75%; width: 2.33rem;margin-right: .30rem;justify-content: flex-end;"> <!-- overflow: hidden; --> - <input :style="{'display': isExpanded == true ? 'block' : 'none'}" type="text" + <input :style="{'display': isExpanded == true ? 'block' : 'none'}" @confirm="toggleSearch" type="text" style="margin-left: .05rem;color: #2C2C2C; flex: 1; background-color: #fff; font-size: .13rem;" class="search-input" v-model="searchInput" placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" /> <view class="search-logo" @click="toggleSearch" @@ -152,9 +152,8 @@ // 鎼滅储 onSearch(val) { uni.navigateTo({ - url: '/pages/knowledgeBase/knowledgeBase?name=' + val + url: '/pages/knowledgeBase/knowledgeBase?name=' + val.text }) - console.log('vv', val); }, // 鎼滅储 // 鍒囨崲鎼滅储妗嗙殑灞曞紑鍜屾敹璧风姸鎬� @@ -164,7 +163,10 @@ this.isExpanded = !this.isExpanded; this.$nextTick(() => { if (this.searchInput.trim() !== '') { - console.log('鎼滅储', this.searchInput); + uni.navigateTo({ + url: '/pages/knowledgeBase/knowledgeBase?name=' + this.searchInput + }) + // console.log('鎼滅储', this.searchInput); } else { console.log('涓嶆悳绱�'); } diff --git a/src/pages/knowledgeBase/knowledgeBase.vue b/src/pages/knowledgeBase/knowledgeBase.vue index 1e38a16..2581ee6 100644 --- a/src/pages/knowledgeBase/knowledgeBase.vue +++ b/src/pages/knowledgeBase/knowledgeBase.vue @@ -1,7 +1,7 @@ <template> <view> <!-- 椤堕儴 --> - <headNav text="涓浗鍖诲浜虹墿鐭ヨ瘑搴�"/> + <headNav idIndex="0" text="涓浗鍖诲浜虹墿鐭ヨ瘑搴�" /> <!-- 鎼滅储 --> <view class="flex flex-center Search"> <!-- <luanqing-search class="search_bar" @onSearch="onSearch"></luanqing-search> --> @@ -17,7 +17,8 @@ :style="{color:item.bgColor==true?'#5879a4':'#000'}"> {{item.name}} </li>--> - <li v-for="item in hot" @click="hotSearchClick(item)" :key="item.id" class="cursor" style="color: #5879a4;"> + <li v-for="item in hot" @click="hotSearchClick(item)" :key="item.id" class="cursor" + style="color: #5879a4;"> {{item.name}} </li> </ul> @@ -30,27 +31,30 @@ </view> </view> <uni-row class="demo-uni-row zhushuju flex flex-items-start" style="padding: 0 230rpx; "> - <uni-col :span="5" class="fbox"> + <!-- 宸︿晶 --> + <view class="fbox2" style="width: 2.6rem;"> <!-- 鑱屼笟 --> - <view class="demo-uni-col zhiye dark box boox" - style="margin-bottom: 40rpx;background-color: #fff; border: 2rpx solid #e0e0e0;"> + <view class="demo-uni-col zhiye dark box boox" + style="width: 2.6rem; margin-bottom: 40rpx;background-color: #fff; border: 2rpx solid #e0e0e0;min-height: 2rem;"> <h3>{{profession.title}}</h3> - <ul style="margin-top: 10rpx;" :class="{ 'a': activeBox === 'a'?'a':'' }"> + <ul style="margin-top: 10rpx;" :class="{ 'a': activeBox === 'a'?'a':'' }"> <!-- background-color: #d6e3f4;border-radius: 60rpx; --> <li class="flex" - :style="{'background':profession.index === index ? '#d6e3f4' :'','borderRadius': profession.index === index ? '60rpx' :''}" - v-for="(item,index) in profession.list" :key="index" style="padding:0 20rpx;" @click="handInstitCLick(index,'a')"> - <view class="">{{item.name}}</view> - <view class="">{{item.number}}</view> + :style="{'background':profession.index === item.tagId ? '#d6e3f4' :'','borderRadius': profession.index === item.tagId ? '60rpx' :'',display:index+1>professionIndex?'none':'flex'}" + v-for="(item,index) in profession.list" :key="index" + style="padding:0 20rpx;line-height: .3rem;height: .3rem;" + @click="handInstitCLick(item,'a')"> + <view class="">{{item.tagName}}</view> + <view class="">{{item.count}}</view> </li> </ul> - <view v-if="profession.list.length-1 >3" class="flex flex-center toggleButton1"> - <view class="toggleButton" style="color: #C1D3EA;" @click="shrinkClick('a')"> + <view v-if="profession.list.length-1 >3" class="flex flex-center "> + <view class="toggleButton" style="color: #C1D3EA;" @click="shrinkClick('a','鑱屼笟')"> {{ activeBox !== 'a' ? '鏇村 锕�' : '鏀惰捣 锔�' }} </view> </view> </view> - <!-- 涓栦唬 --> + <!-- 鏃舵湡 --> <view class="demo-uni-col dark box boox zhongjianleft" style="background-color: #fff;border: 2rpx solid #e0e0e0;" :style="{'marginBottom': isAdvancedSearch ===true ? '0': '40rpx'}"> @@ -58,14 +62,15 @@ <ul style="margin-top: 10rpx;" :class="{ 'b': activeBox === 'b'?'b':'' }"> <!-- background-color: #d6e3f4;border-radius: 60rpx; --> <li class="flex" - :style="{'background':dynasty.index === index ? '#d6e3f4' :'','borderRadius': dynasty.index === index ? '60rpx' :''}" - v-for="(item,index) in dynasty.list" :key="index" style="padding:0 20rpx;" @click="handInstitCLick(index,'b')"> - <view class="">{{item.name}}</view> - <view class="">{{item.number}}</view> + :style="{'background':dynasty.index === item.dynastyId ? '#d6e3f4' :'','borderRadius': dynasty.index === item.dynastyId ? '60rpx' :'',display:index+1>dynastyIndex?'none':'flex'}" + v-for="(item,index) in dynasty.list" :key="index" style="padding:0 20rpx;" + @click="handInstitCLick(item,'b')"> + <view class="">{{item.dynastyName}}</view> + <view class="">{{item.count}}</view> </li> </ul> - <view v-if="dynasty.list.length-1 >3" class="flex flex-center toggleButton1"> - <view class="toggleButton" style="color: #C1D3EA;" @click="shrinkClick('b')"> + <view v-if="dynasty.list.length-1 >3" class="flex flex-center "> + <view class="toggleButton" style="color: #C1D3EA;" @click="shrinkClick('b','鏃舵湡')"> {{ activeBox !== 'b' ? '鏇村 锕�' : '鏀惰捣 锔�' }} </view> </view> @@ -77,38 +82,45 @@ <ul class="laiyuan" style="margin-top: 10rpx;" :class="{ 'b': activeBox === 'b'?'b':'' }"> <!-- background-color: #d6e3f4;border-radius: 60rpx; --> <li class="flex liClick" v-for="(item,index) in source.list" :key="index" - style="padding:0 20rpx;color: #244A7B;"> - <view class="">{{ index+1 + '. ' +item.name}}</view> - <view class="">{{item.number}}</view> + style="padding:0 20rpx;color: #244A7B;" @click="handInstitCLick(item,'c')"> + <view class="">{{ index+1 + '. ' +item.source}}</view> </li> </ul> <!-- <view class="flex flex-center"> - <view class="toggleButton" style="font-size: 25rpx;color: #C1D3EA;" @click="shrinkClick('b')"> - {{ activeBox !== 'b' ? '鏇村 锕�' : '鏀惰捣 锔�' }}</view> - </view> --> + <view class="toggleButton" style="font-size: 25rpx;color: #C1D3EA;" @click="shrinkClick('b')"> + {{ activeBox !== 'b' ? '鏇村 锕�' : '鏀惰捣 锔�' }} + </view> + </view> --> </view> - </uni-col> - <uni-col :span="19" class="rightList"> - <view class="demo-uni-col light fbox1" - style=" background-color: #fff;border: 1px solid #e0e0e0;padding: 10rpx 20rpx;"> - <view class="flex lightTop" style="margin:10rpx 0"> - <view class="" style="color: #2C2C2C;">鍏�1374鏉�</view> - <el-button>涓嬭浇</el-button> - </view> - <el-table :data="tableData" class="lightBo" style="width: 100%"> - <el-table-column prop="serialNumber" label="搴忓彿" width="110"></el-table-column> - <el-table-column prop="name" label="濮撳悕"></el-table-column> - <el-table-column prop="another" label="鍒悕"></el-table-column> - <el-table-column prop="gender" label="鎬у埆" width="70"></el-table-column> - <el-table-column prop="epoch" label="鏃舵湡"></el-table-column> - <el-table-column prop="year" label="鐢熷勾" width="130"></el-table-column> - <el-table-column prop="death" label="鍗掑勾" width="130"></el-table-column> - <el-table-column prop="nativePlace" label="绫嶈疮"></el-table-column> - <el-table-column prop="socialIdentity" label="绀句細韬唤"></el-table-column> - <el-table-column prop="officialPosition" label="瀹樿亴"></el-table-column> - </el-table> + </view> + <!-- 鍙充晶 --> + <view class="rightList demo-uni-col light fbox3 relative flex flex-column flex-grow: 1;" + style="width: 100%; margin-left: .2rem; background-color: #fff;border: 1px solid #C1D3EA;padding: 10rpx 20rpx;"> + <view class="flex lightTop" style="width: 100%; margin:.1rem 0"> + <view class="" style="color: #2C2C2C;">鍏�1374鏉�</view> + <el-button size="small" @click="exportClick">涓嬭浇</el-button> </view> - </uni-col> + <el-table :data="tableData" class="lightBo" style="width: 100%"> + <el-table-column prop="id" label="搴忓彿" width="110"></el-table-column> + <el-table-column prop="personName" label="濮撳悕"></el-table-column> + <el-table-column prop="personAlias" label="鍒悕"></el-table-column> + <el-table-column prop="gender" label="鎬у埆" width="70"></el-table-column> + <el-table-column prop="period" label="鏃舵湡"></el-table-column> + <el-table-column prop="birthYear" label="鐢熷勾" width="130"></el-table-column> + <el-table-column prop="deathYear" label="鍗掑勾" width="130"></el-table-column> + <el-table-column prop="nativePlace" label="绫嶈疮"></el-table-column> + <el-table-column prop="socialDistinction" label="绀句細韬唤"></el-table-column> + <el-table-column prop="official" label="瀹樿亴"></el-table-column> + </el-table> + <!-- 鍒嗛〉 --> + <el-row class="fenye" style="position: absolute;bottom: .1rem;"> + <el-pagination class="paging flex" :current-page="CurrentPage" :total="total" :page-size="pageSize" + @current-change="CurrentChange" @prev-click="PrevClick" @next-click="NextClick" prev-text="涓婁竴椤�" + next-text="涓嬩竴椤�" background layout="prev, pager, next"> + </el-pagination> + </el-row> + </view> + </uni-row> <div class="abox"></div> <Footer1 /> @@ -118,6 +130,14 @@ <script> import Footer1 from '@/components/footer/footer' import MyForm from '@/components/form/form.vue' + // 涓嬭浇闇�瑕佸鍏ョ殑渚濊禆 + import ExportJsonExcel from "js-export-excel"; + import { + getPDataStatistics, + getPDownload, + getPList, + getHotSearch + } from '@/api/index.js' export default { components: { Footer1, @@ -146,12 +166,12 @@ label: '绫嶈疮', name: 'nativePlace', value: '' - }, + }, { type: 'select', label: '鑱屼笟', value: '', - name: 'occupation', + name: 'tagId', options: [{ label: '鍖诲', value: '1' @@ -165,28 +185,31 @@ { type: 'input', label: '鑱屽畼', - name: 'officials', + name: 'official', value: '' }, { type: 'select', label: '鎬у埆', value: '', - name: 'sex', + name: 'genderType', options: [{ + label: '鏈寚鏄�', + value: 'UNKNOWN' + }, { label: '鐢�', - value: '鐢�' + value: 'MALE' }, { label: '濂�', - value: '濂�' + value: 'WOMAN' } ] }, { type: 'input', label: '鏃舵湡', - name: 'time', + name: 'dynasty', value: '' }, { @@ -197,147 +220,190 @@ } ] }, + // 鐑棬鎼滅储 - hot: [{ - id: 1, - name: '鏉庢椂鐝�', - bgColor: false - }, { - id: 2, - name: '鏉庢椂鐝�2', - bgColor: false - }, { - id: 3, - name: '鏉庢椂鐝�3', - bgColor: false - }, ], + hot: [], // 鑱屼笟 profession: { title: '鑱屼笟', index: 0, - list: [{ - name: '鍏ㄩ儴', - id: 1, - number: 829 - }, - { - name: '鍖诲', - id: 2, - number: 90 - }, { - name: '涓栧尰', - id: 3, - number: 81 - }, { - name: '瀹环鍖�', - id: 4, - number: 83 - },{ - name: '瀹环鍖�1', - id: 5, - number: 83 - }, - ] + id: 0, + list: [] }, + // 鐜板湪澶氬皯鏉¤亴涓氭暟鎹� + professionIndex: 4, // 灞曞紑鍜屾敹缂╃殑鎸夐挳闇�瑕� activeBox: null, - // 涓栦唬 + // 鏃舵湡 dynasty: { title: '鏃舵湡', + id: 0, index: 0, - list: [{ - name: '鍏ㄩ儴', - id: 1, - number: 829 - }, - { - name: '鍞�', - id: 2, - number: 90 - }, { - name: '瀹�', - id: 3, - number: 81 - }, { - name: '鍏�', - id: 4, - number: 83 - }, - ] + list: [] }, + // 鐜板湪澶氬皯鏉℃椂鏈熸暟鎹� + dynastyIndex: 4, // 鏉ユ簮 source: { title: '鏉ユ簮', - list: [{ - name: '涓浗K灏忓埗搴旇枦鍏�', - id: 1 - }, { - name: '涓尰鍖讳簨澶т細', - id: 2 - }, { - name: '涓浗鍖讳腑鍒跺害鐮旂┒', - id: 3 - }, ] + index: 0, + id: 0, + list: [] }, - tableData: [{ - serialNumber: 1, - name: '鐜嬪皬铏�', - another: '灏忚檸', - gender: '鐢�', - epoch: '鍞愪唬', - year: 1234, - death: 1332, - nativePlace: '娌冲寳', - socialIdentity: '涓栧尰', - officialPosition: '闄㈠垽' - }, { - serialNumber: 2, - name: '鐜媤灏忚檸', - another: 'w灏忚檸', - gender: 'w鐢�', - epoch: '鍞恮浠�', - year: 1234, - death: 1332, - nativePlace: '娌冲寳', - socialIdentity: '涓栧尰', - officialPosition: '闄㈠垽' - }, { - serialNumber: 1, - name: '鐜嬪皬铏�', - another: '灏忚檸', - gender: '鐢�', - epoch: '鍞愪唬', - year: 1234, - death: 1332, - nativePlace: '娌冲寳', - socialIdentity: '涓栧尰', - officialPosition: '闄㈠垽' - }] + // 琛ㄦ牸鐨勬暟缁� + tableData: [], + // 鍒嗛〉鐨勬�绘暟 + total: 100, + // 褰撳墠椤� + CurrentPage: 1, + // 涓�椤垫樉绀哄灏戞潯鏁版嵁 + pageSize: 6, + dataTable: [], + option: {} } + }, + onLoad(options) { + this.onSearch({text:options.name}) }, mounted() { // 淇敼涓ゆ鐨勯珮搴︿繚鎸佷竴鑷� - var box1Height = document.querySelector('.fbox').offsetHeight; - document.querySelector('.fbox1').style.height = box1Height + 'px'; + var box1Height = document.querySelector('.fbox2').offsetHeight; + document.querySelector('.fbox3').style.height = box1Height + (box1Height / 18) + 'px'; + console.log(box1Height, 'box1Height'); + this.getStatistics() + // 榛樿鍏堣皟鐢ㄦ悳绱竴娆� + this.onSearch('') }, methods: { + // ExportJsonExcel瀹炰緥 + Ture() { + // 鍒涘缓ExportJsonExcel瀹炰緥瀵硅薄 + let toExcel = new ExportJsonExcel(this.option); + // 璋冪敤淇濆瓨鏂规硶 + toExcel.saveExcel(); + }, + // 涓嬭浇鎸夐挳 + exportClick() { + const dataList = this.tableData; + let dataTable = []; // dataTable浠h〃excel鏂囦欢涓殑鏁版嵁鍐呭 + if (dataList) { + for (let i in dataList) { + let obj = { + 搴忓彿: dataList[i].id, + 濮撳悕: dataList[i].personName, + 鍒悕: dataList[i].personAlias, + 鎬у埆: dataList[i].gender, + 鏃舵湡: dataList[i].period, + 鐢熷勾: dataList[i].birthYear, + 鍗掑勾: dataList[i].deathYear, + 绫嶈疮: dataList[i].nativePlace, + 绀句細韬唤: dataList[i].socialDistinction, + 瀹樿亴: dataList[i].official, + }; + + dataTable.push(obj); // 璁剧疆excel姣忓垪鑾峰彇鐨勬暟鎹簮 + } + } + this.option.fileName = "涓尰鍖诲浜虹墿鐭ヨ瘑搴�"; //excel鏂囦欢鍚� + //excel鏂囦欢鏁版嵁 + this.option.datas = [{ + // excel鏂囦欢鐨勬暟鎹簮 + sheetData: dataTable, + // excel鏂囦欢sheet鐨勮〃鍚� + sheetName: "sheet", + // excel鏂囦欢琛ㄥご鍚� + sheetHeader: ["搴忓彿", "濮撳悕", "鍒悕", "鎬у埆", "鍒悕", "鏃舵湡", "鐢熷勾", "鍗掑勾", "绫嶈疮", "绀句細韬唤", "瀹樿亴"], + // excel鏂囦欢鍒楀悕 + sheetFilter: ["搴忓彿", "濮撳悕", "鍒悕", "鎬у埆", "鍒悕", "鏃舵湡", "鐢熷勾", "鍗掑勾", "绫嶈疮", "绀句細韬唤", "瀹樿亴"], + // columnWidths: ['10', '10', '20'] //excel鍒楀搴﹁缃� + }, ]; + this.Ture(); + }, + // 鎺ュ彛 + async getStatistics() { + // 鐑棬鎼滅储 + await getHotSearch().then(res => { + console.log(res, '鐑棬鎼滅储'); + this.hot = Object.keys(res.object).map(key => { + return { + id: parseInt(key), + name: res.object[key] + }; + }) + }) + // 鍙充晶鑱屼笟銆佹椂鏈熴�佹潵婧愮殑鏁版嵁 + await getPDataStatistics().then(res => { + console.log(res, '鎺ュ彛鎴愬姛sdsdfsdsfs'); + let totalCount1 = res.object.occupationStatistic.details.reduce((total, item) => total + + item.count, 0); + let totalCount2 = res.object.dynastyStatistic.details.reduce((total, item) => total + item + .count, 0); + // 鑱屼笟 + this.profession.list = [ + ...res.object.occupationStatistic.details, + ] + // 楂樼骇鎼滅储閲岄潰鐨勮亴涓�-------------------------------------------------- + // 鎵惧埌鑱屼笟瀛楁鍦� from 瀵硅薄涓殑绱㈠紩 + const professionIndex = this.from.from.findIndex(field => field.label === '鑱屼笟'); + // 濡傛灉鎵惧埌浜嗚亴涓氬瓧娈� + if (professionIndex !== -1) { + // 灏� profession.list 杞崲涓� options 鏍煎紡 + const options = this.profession.list.map(item => ({ + label: item.tagName, + value: item.tagId.toString() // 灏� id 杞崲涓哄瓧绗︿覆锛岀‘淇濅笌 value 绫诲瀷涓�鑷� + })); + + // 鏇存柊鑱屼笟瀛楁鐨� options 灞炴�� + this.$set(this.from.from[professionIndex], 'options', options); + } + // -------------------------------------------------- + this.profession.index = this.profession.list[0].tagId + // 鏃舵湡 + this.dynasty.list = [ + ...res.object.dynastyStatistic.details + ] + // 鏉ユ簮 + this.source.list = res.object.sourceStatistic.details + this.source.index = this.source.list[0].bookId + }) + }, // 鐑棬鎼滅储 - hotSearchClick(item){ - console.log(item); + hotSearchClick(item) { + this.onSearch({text:item.name}) + console.log(item, '鐑棬鎼滅储'); }, // 宸︿晶鐨勬満鏋勭粺璁$瓑绛夋寜閽� - handInstitCLick(index, name) { + handInstitCLick(item, name) { + this.dynasty.id = 0 + this.source.id = 0 + this.profession.id = 0 + this.CurrentPage = 1 if (name == 'a') { - this.profession.index = index - }else if(name == 'b'){ - this.dynasty.index = index + this.profession.index = item.tagId + this.profession.id = item.tagId + this.CurrentPage = 1 + + } else if (name == 'b') { + this.dynasty.index = item.dynastyId + this.dynasty.id = item.dynastyId + this.CurrentPage = 1 + console.log(item); + + } else if (name == 'c') { + this.source.index = item.bookId + this.source.id = item.bookId + this.CurrentPage = 1 + console.log('鏉ユ簮'); + } - console.log(index, name); + this.onSearch('') + + + console.log(item, name); }, isAvancedClick() { this.isAdvancedSearch = !this.isAdvancedSearch this.$nextTick(() => { - var box1Height = document.querySelector('.fbox').offsetHeight; // let box2Height= document.querySelector('.fbox1').style.height = box1Height + 'px'; let box2Height = document.querySelector('.fbox1').offsetHeight @@ -347,12 +413,64 @@ } }) }, - onSubmit(val) { + // 楂樼骇鎼滅储 + async onSubmit(val) { + console.log(val); + this.CurrentPage = 1 + let Obj = { + "keywords": '', //鎼滅储妗嗘绱� + "name": val.name, //濮撳悕 + "alias": val.alias, //鍒悕 + "nativePlace": val.nativePlace, //鏈哄叧 + "tagId": val.tagId !== '' ? val.tagId : null, //鑱屼笟id + "official": val.official, //鑱屽畼 + "genderType": val.genderType !== '' ? val.genderType : null, //鎬у埆 + "dynasty": val.dynasty, //鏈濅唬id + "dynastyId": null, //鏈濅唬id + "institution": val.institution, //鏈烘瀯 + "bookId": null, //鏉ユ簮id + "page": this.CurrentPage, + "pageSize": this.pageSize + } + // // 鎼滅储 + await getPList(Obj).then(res => { + console.log(res); + if (res.success) { + console.log(res, '鎼滅储鎺ュ彛'); + this.tableData = res.list + // 鎬绘暟閲� + this.total = res.npage.totalCount + } + }) console.log(val); }, - onSearch(val) { - - console.log(val); + // 鍩虹鎼滅储 + async onSearch(val) { + let Obj = { + "keywords": val.text, //鎼滅储妗嗘绱� + "name": "", //濮撳悕 + "alias": "", //鍒悕 + "nativePlace": "", //鏈哄叧 + "tagId": this.profession.id, //鑱屼笟id + "official": "", //鑱屽畼 + "genderType": null, //鎬у埆 + "dynasty": null, //鏈濅唬id + "dynastyId": this.dynasty.id, //鏈濅唬id + "institution": "", //鏈烘瀯 + "bookId": this.source.id, //鏉ユ簮id + "page": this.CurrentPage, + "pageSize": this.pageSize + } + // // 鎼滅储 + await getPList(Obj).then(res => { + if (res.success) { + console.log(res, '鎼滅储鎺ュ彛'); + this.tableData = res.list + // 鎬绘暟閲� + this.total = res.npage.totalCount + } + }) + // console.log(val, '澹ぇ澶絾鏄�'); }, // 鐑棬鎼滅储 HotClick(id) { @@ -368,22 +486,171 @@ }, // 灞曞紑鏀剁缉 - shrinkClick(box) { + shrinkClick(box, name) { console.log(box); - if (this.activeBox === box) { - this.activeBox = null; + console.log(this.dynasty.list); + + // this.activeBox = this.activeBox === 'a' ? null : 'a'; + if (name == '鑱屼笟') { + console.log('鑱屼笟'); + this.professionIndex = this.professionIndex < this.profession.list.length ? this.profession.list + .length : 4; + this.dynastyIndex = 4 + this.activeBox = this.activeBox === 'a' ? null : 'a'; } else { - this.activeBox = box; + console.log('鏃舵湡'); + this.dynastyIndex = this.dynastyIndex < this.dynasty.list.length ? this.dynasty.list.length : 4; + this.professionIndex = 4 + this.activeBox = this.activeBox === 'b' ? null : 'b'; + } + }, + // 鍒嗛〉褰撳墠椤佃Е鍙戜簨浠� + CurrentChange(val) { + if (this.CurrentPage != val) { + this.CurrentPage = val + console.log('褰撳墠椤�', val); + this.onSearch('') + } + }, + // 涓婁竴椤� + PrevClick(val) { + if (this.CurrentPage != val) { + this.CurrentPage = val + // console.log('涓婁竴椤�', val); + // console.log(this.CurrentPage); + this.onSearch('') + } + }, + // 涓嬩竴椤� + NextClick(val) { + if (this.CurrentPage != val) { + // console.log('涓嬩竴椤�',val); + this.CurrentPage = val + // console.log(this.CurrentPage); + this.onSearch('') } } } } </script> -<style> - .abox{ +<style scoped> + /* 琛ㄥご */ + ::v-deep .el-table__header { + margin-bottom: .02rem; + } + + ::v-deep .has-gutter tr>th { + background-color: #DDE8F6 !important; + font-weight: normal; + + } + + ::v-deep .el-table__header th { + height: .3rem; + line-height: .3rem; + font-size: .14rem; + color: #2C2C2C; + /* 琛ㄥご鏂囧瓧棰滆壊涓虹櫧鑹诧紝澧炲姞瀵规瘮搴� */ + margin-bottom: .02rem !important; + } + + ::v-deep .el-table::before { + border: 0; + background-color: #fff; + } + + /* 琛ㄦ牸 */ + ::v-deep .el-table__body td { + height: .3rem; + line-height: .3rem; + font-size: .14rem; + color: #2C2C2C !important; + font-weight: normal; + } + + .abox { height: 1rem; } + + /* 鍒嗛〉 */ + .paging ::v-deep .btn-prev, + .paging ::v-deep .btn-next { + border: 0; + } + + .paging ::v-deep .btn-prev span, + .paging ::v-deep .btn-next span { + font-size: .12rem; + height: .3rem; + line-height: .3rem; + background-color: #fff; + color: #9E9E9E; + text-align: center; + border: 1px solid #9E9E9E; + padding: 0 .1rem; + } + + .paging ::v-deep .el-pager li { + font-size: .1rem; + width: .28rem; + height: .3rem; + line-height: .3rem; + background-color: #fff; + color: #9E9E9E; + text-align: center; + border: 1px solid #9E9E9E; + } + + /* -------------- */ + /* 鍙充晶 */ + .rightList { + padding-left: .2rem !important; + + .light { + padding: .1rem .2rem !important; + } + + .lightTop { + font-size: .14rem !important; + } + + .el-button { + font-size: .12rem !important; + padding: .05rem .18rem !important; + } + + .lightBo { + font-size: .14rem !important; + + .is-leaf { + background-color: #C1D3EA !important; + color: #2C2C2C !important; + font-weight: 400; + + .cell { + + height: .3rem !important; + line-height: .3rem !important; + } + } + } + + .el-table__body-wrapper { + .el-table__row { + height: .46rem !important; + line-height: .46rem !important; + + .cell { + + height: .3rem !important; + line-height: .3rem !important; + } + } + + } + } + @media screen and (min-width:2560px)and (max-width:3840px) { /* 鎼滅储 */ @@ -545,15 +812,16 @@ .lightBo { font-size: .14rem !important; - + .is-leaf { background-color: #C1D3EA !important; color: #2C2C2C !important; font-weight: 400; - .cell{ - - height: .3rem !important; - line-height: .3rem !important; + + .cell { + + height: .3rem !important; + line-height: .3rem !important; } } } @@ -562,10 +830,11 @@ .el-table__row { height: .46rem !important; line-height: .46rem !important; - .cell{ - - height: .3rem !important; - line-height: .3rem !important; + + .cell { + + height: .3rem !important; + line-height: .3rem !important; } } @@ -599,7 +868,9 @@ margin: 0 .1rem; } } - + .advancedSeaTrue1{ + border: 1px solid #C1D3EA; + } .advancedSeaTrue, .zhushuju { padding: 0 1.24rem !important; @@ -715,8 +986,9 @@ } /* -------------------- */ -/* 鍙充晶 */ + /* 鍙充晶 */ .rightList { + width: 100%; padding-left: .2rem !important; .light { @@ -734,15 +1006,16 @@ .lightBo { font-size: .14rem !important; - + .is-leaf { background-color: #C1D3EA !important; color: #2C2C2C !important; font-weight: 400; - .cell{ - - height: .3rem !important; - line-height: .3rem !important; + + .cell { + + height: .3rem !important; + line-height: .3rem !important; } } } @@ -751,10 +1024,11 @@ .el-table__row { height: .46rem !important; line-height: .46rem !important; - .cell{ - - height: .3rem !important; - line-height: .3rem !important; + + .cell { + + height: .3rem !important; + line-height: .3rem !important; } } @@ -776,13 +1050,13 @@ } } - .a { + /* .a { height: 2rem; } .b { height: 100px; - } + } */ .box { transition: height 0.3s; @@ -792,20 +1066,45 @@ } + /* 宸﹁竟鐨� */ .boox { + width: 100%; padding: .1rem .09rem; + min-height: 2rem !important; + position: relative; + border: 1px solid #c1d3ea !important; + + ul { + margin-top: .16rem !important; + } h3 { font-size: .14rem; + margin-left: .1rem; + } + + li { + height: .3rem; + line-height: .3rem; + padding: 0 .2rem !important; + margin: .05rem 0 !important; + border-radius: .3rem !important; + font-size: .14rem; + } + + .toggleButton1 { + position: absolute; + bottom: .1rem !important; + left: 40% !important; + } + + .toggleButton { + font-size: .14rem !important; } } ::v-deep .el-table th, ::v-deep .el-table td { text-align: center; - } - - ::v-deep .has-gutter tr>th { - background-color: #DDE8F6 !important; } </style> \ No newline at end of file diff --git a/src/pages/repository/repository.vue b/src/pages/repository/repository.vue index 7f1adf4..2d8c355 100644 --- a/src/pages/repository/repository.vue +++ b/src/pages/repository/repository.vue @@ -152,7 +152,7 @@ import 'echarts/extension/bmap/bmap'; import { loadBMap - } from "../../static/map.js" + } from "@/static/map.js" import Table1 from '@/components/table1/table1.vue' export default { components: { diff --git a/src/pages/territory/territory.vue b/src/pages/territory/territory.vue index 069c25c..53352f1 100644 --- a/src/pages/territory/territory.vue +++ b/src/pages/territory/territory.vue @@ -76,7 +76,7 @@ <script> import { loadBMap - } from "../../static/map.js" + } from "@/static/map.js" import * as echarts from 'echarts'; import 'echarts/extension/bmap/bmap'; export default { diff --git a/src/store/index.js b/src/store/index.js index 1e278da..e97f289 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,7 +6,24 @@ const store = new Vuex.Store({ strict: true, + state:{ + // 鐢ㄦ埛璐﹀彿 + username:'sdf', + // 涓浗浜虹墿鏁版嵁搴撲腑鐨刬d + }, getters, + mutations:{ + Set_UserName(state,username){ + console.log(username,'uuu'); + state.username=username + } + }, + actions:{ + setUserName({commit},user){ + + commit('Set_UserName',user) + } + }, modules: { user }, plugins:[function(store){ // 鐩戝惉mutaions 璁板綍state鍒版湰鍦板瓨鍌� @@ -16,7 +33,7 @@ }) // 璇诲彇缂撳瓨涓璼tate if(uni.getStorageSync('state')){ - console.log(state,'aaaaaaaaastatestatestate'); + // console.log(state,'aaaaaaaaastatestatestate'); store.replaceState(Object.assign({},store.state,uni.getStorageSync('state'))) } }] diff --git a/src/store/module/user.js b/src/store/module/user.js index 96d419c..858f170 100644 --- a/src/store/module/user.js +++ b/src/store/module/user.js @@ -9,7 +9,7 @@ // token瀛樺偍鍦╟ookie token: '', // 鐢ㄦ埛id - id: 11 + id: 11, }, mutations: { set_token: (state, params) => (state.token = params), diff --git a/src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue b/src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue index cc37ee4..179a355 100644 --- a/src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue +++ b/src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue @@ -1,7 +1,7 @@ <template> <view class="widget_style" > <view class="ffff" style="display: flex;height: 100%;"> - <input placeholder-class="widget_input_placehold" v-model="content" class="widget_input" :style="style1" :placeholder="placehold" /> + <input placeholder-class="widget_input_placehold" @confirm="onClickSearch" v-model="content" class="widget_input" :style="style1" :placeholder="placehold" /> <view class="widget_button" v-if="isSearchTrue" @click="onClickSearch">{{buttonText}}</view> <view class="widget_button searchBg" v-else @click="onClickSearch"></view> </view> diff --git a/src/uni_modules/next-search-more/components/next-search-more/next-search-more.vue b/src/uni_modules/next-search-more/components/next-search-more/next-search-more.vue index 2d61d70..3063357 100644 --- a/src/uni_modules/next-search-more/components/next-search-more/next-search-more.vue +++ b/src/uni_modules/next-search-more/components/next-search-more/next-search-more.vue @@ -15,7 +15,7 @@ <view class="content-box" :class="{ center: mode === 'center' }"> <!-- <text class="icon icon-search"></text> --> <text style="display: inline-block;padding-left: 20rpx;"></text> - <input class="input" :class="{ center: !active && mode === 'center' }" :focus="isFocus" + <input class="input" @confirm="search" :class="{ center: !active && mode === 'center' }" :focus="isFocus" :placeholder="' '+placeholder" v-model="inputVal" id="sdf" @input="input" @focus="focus" @blur="blur" /> <text v-if="isDelShow" class="icon icon-del" @click="clear"></text> </view> diff --git a/src/utils/Crypto.js b/src/utils/Crypto.js new file mode 100644 index 0000000..785cb56 --- /dev/null +++ b/src/utils/Crypto.js @@ -0,0 +1,44 @@ +import CryptoJS from 'crypto-js'; +// 鍔犲瘑 +// export const encryptAES = (data, key) => { +// // AES 鍔犲瘑 +// let encrypted = CryptoJS.AES.encrypt(data, '8m5Jzz1r9waf4CMd').toString(); +// // 灏嗗姞瀵嗙粨鏋滆浆鎹负 Base64 +// let base64Result = btoa(encrypted) +// return base64Result +// } +// 瑙e瘑 +// export const decryptAES = (encryptedData, key) => { +// let str = atob(encryptedData) +// let bytes = CryptoJS.AES.decrypt(str, '8m5Jzz1r9waf4CMd'); +// let decrypted = bytes.toString(CryptoJS.enc.Utf8); +// return decrypted +// } + +//绉橀挜 +const CRYPTOJSKEY = "8m5Jzz1r9waf4CMd"; +// 鍔犲瘑 +export const encryptAES=(plaintText) =>{ + var plaintText = plaintText; + var options = { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }; + var key = CryptoJS.enc.Utf8.parse(CRYPTOJSKEY); + var encryptedData = CryptoJS.AES.encrypt(plaintText, key, options); + var encryptedBase64Str = encryptedData.toString().replace(/\//g, "_"); + encryptedBase64Str = encryptedBase64Str.replace(/\+/g, "-"); + return encryptedBase64Str; +} +//瑙e瘑 +export const decryptAES =(encryptedBase64Str)=> { + var vals = encryptedBase64Str.replace(/\-/g, '+').replace(/_/g, '/'); + var options = { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }; + var key = CryptoJS.enc.Utf8.parse(CRYPTOJSKEY); + var decryptedData = CryptoJS.AES.decrypt(vals, key, options); + var decryptedStr = CryptoJS.enc.Utf8.stringify(decryptedData); + return decryptedStr; +} \ No newline at end of file diff --git a/src/utils/request/req1.js b/src/utils/request/req1.js index 38b781f..6ab88dc 100644 --- a/src/utils/request/req1.js +++ b/src/utils/request/req1.js @@ -21,8 +21,8 @@ // 鍝嶅簲鎷︽埅 req.interceptors.response.use( (res) => { - // 鍒ゆ柇token杩囨湡鏃剁殑涓�浜涘鐞� - if (res.data.success ==false||res.data.errorCode == '11') { + // 鍒ゆ柇token杩囨湡鏃剁殑涓�浜涘鐞� + if (res.data.success== false&& res.data.errorText=='闇�瑕侀獙璇佽韩浠�'&&res.data.errorCode == '11') { console.log('token杩囨湡浜�'); Message.error(res.data.errorText || '') // 娓呮token -- Gitblit v1.9.1