From 8bdedd7370d5ba129bb35b4fc828daf878558781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Fri, 5 Apr 2024 20:13:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A1=E3=80=81=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=B7=A6=E4=BE=A7=E8=8F=9C=E5=8D=95=E6=94=B6=E7=BC=A9?= =?UTF-8?q?=E6=8C=89=E9=92=AE=20=20=20=20=20=202=E3=80=81meta=20=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=20=20=20=20=20=203=E3=80=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9F=A5=E8=AF=A2tinyint=E8=BD=ACshort?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- root/api/user.js | 2 +- root/index.html | 9 +++- root/metadata/dataList.html | 35 +++++++++---- root/metadata/metaService.html | 7 ++- root/res/css/red-kit.css | 52 +++++++++++++++---- .../tccn/base/dbq/jdbc/api/DbSourceMysql.java | 3 ++ 6 files changed, 85 insertions(+), 23 deletions(-) diff --git a/root/api/user.js b/root/api/user.js index 09fadbd..bad7994 100644 --- a/root/api/user.js +++ b/root/api/user.js @@ -1,7 +1,7 @@ //import red from '../res/js/red' const login = ({username, pwd}) => { - return red.postX("/user/login", {username, pwd, plattoken: 'xx'}) + return red.postX("/user/login", {username, pwd, plattoken: ''}) } const logout = () => { diff --git a/root/index.html b/root/index.html index e21f948..ba31ac9 100644 --- a/root/index.html +++ b/root/index.html @@ -75,15 +75,20 @@ 绝尘 -->
+ +
+ +
- diff --git a/root/metadata/dataList.html b/root/metadata/dataList.html index 30d79a0..c430159 100644 --- a/root/metadata/dataList.html +++ b/root/metadata/dataList.html @@ -86,16 +86,17 @@
- {{filter.label}} + {{filter.label}} @@ -298,7 +299,8 @@ } }) }, - service() { + service(v) { + red.setData("meta:service", v) this.loadCfg(function () { vm.limit = {pn: 1, ps: 20, total: 0}; vm.findList(); @@ -326,9 +328,20 @@ return; }, serviceList() { - getServiceList(json => { - vm.services = json; - vm.service = json[0].name; + getServiceList(res => { + vm.services = res; + + // 如果有缓存数据,优先取上一次访问页面 + if (red.getData("meta:service")) { + for (let i in res) { + if (res[i].name === red.getData("meta:service")) { + vm.service = res[i].name; + break + } + } + } else { + vm.service = res[0].name; + } }); }, loadCfg(back) { @@ -536,7 +549,11 @@ }, showInfo() { $('#f-info').modal({moveable: true}) - } + }, + getDict(code) { + console.log(this.dictData[code]) + return this.dictData[code] || [] + }, }, mounted() { this.serviceList(); diff --git a/root/metadata/metaService.html b/root/metadata/metaService.html index ab9d485..aebdb0f 100644 --- a/root/metadata/metaService.html +++ b/root/metadata/metaService.html @@ -365,8 +365,11 @@ - + +