diff --git a/report-ui/src/api/axios.js b/report-ui/src/api/axios.js
index a7728adb..ba8a2036 100644
--- a/report-ui/src/api/axios.js
+++ b/report-ui/src/api/axios.js
@@ -1,6 +1,6 @@
import axios from 'axios';
import { Message, MessageBox } from 'element-ui';
-import { setItem, getItem, delItem } from '@/utils/storage';
+import { getItem, delItem } from '@/utils/storage';
import signUtil from '@/utils/signUtil';
import { deepClone } from "@/utils"
@@ -9,7 +9,7 @@ const service = axios.create({
withCredentials: false,
timeout: 60000,
headers: {
- 'Content-Type': 'application/json',
+ 'Content-Type': 'application/json'
}
})
@@ -17,8 +17,8 @@ service.interceptors.request.use(
config => {
// 在发送请求之前做些什么
var token = getItem('token');
- config = signUtil.sign(token, deepClone(config));
- // console.log(config, 'config')
+ // config = signUtil.sign(token, deepClone(config));
+ console.log(config, 'config')
return config
},
error => {
@@ -32,27 +32,24 @@ service.interceptors.request.use(
service.interceptors.response.use(
response => {
const res = response.data;
- if (res.repCode == '0000') {
+ if (res.code == 200) {
return res
}
- else if (res.repCode == '0024') {
-
+ else if (res.code == '0024') {
//登录超时或被登出,弹确认框,用户确认后,跳转到登录页面
MessageBox({
message: "当前登录已失效或异地登录,请重新登录",
type: 'error',
duration: 3 * 1000,
}).then(() => {
- console.log(1)
sessionStorage.clear();
localStorage.clear();
delItem('token')
// location.reload();
window.location.href = "/";
}).catch(err => {
- console.log(2)
})
- } else if (res.repCode == "3100" || res.repCode == "3101") {
+ } else if (res.code == "3100" || res.code == "3101") {
return res;
}
else {
@@ -65,13 +62,13 @@ service.interceptors.response.use(
}
},
error => {
- var errorStatus = error.response.status;
+ var errorStatus = error.response.code;
var errorData = error.response.data;
var messageTxt = "";
if (errorStatus != 200) {
messageTxt = "服务器内部错误,请联系管理员";
} else {
- messageTxt = '失败原因:' + errorData.repCode + '--' + errorData.repMsg;
+ messageTxt = '失败原因:' + errorData.code + '--' + errorData.repMsg;
}
Message({
message: messageTxt,
diff --git a/report-ui/src/api/common.js b/report-ui/src/api/common.js
index 36145251..d961b02b 100644
--- a/report-ui/src/api/common.js
+++ b/report-ui/src/api/common.js
@@ -8,15 +8,15 @@
import request from '@/utils/request'
// 数据字典接口
-export function dataDictionary(dictName) {
+export function dataDictionary (dictName) {
return request({
- url: `/gaeaDict/select/${dictName}`,
+ url: '/gaeaDict/select/' + dictName,
method: 'GET',
})
}
// 图片上传接口
-export function uploadImg(data) {
+export function uploadImg (data) {
return request({
url: '/file/upload',
method: 'POST',
diff --git a/report-ui/src/api/deviceInfo.js b/report-ui/src/api/deviceInfo.js
deleted file mode 100644
index 70e093b7..00000000
--- a/report-ui/src/api/deviceInfo.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import request from '@/utils/request'
-/** i18n版本*/
-export function add (data) {
- return request({
- url: 'deviceInfo',
- method: 'post',
- data,
- })
-}
-
-export function del (ids) {
- return request({
- url: 'deviceInfo/' + ids,
- method: 'delete',
- data: ids,
- })
-}
-
-export function edit (data) {
- return request({
- url: 'deviceInfo',
- method: 'put',
- data,
- })
-}
-
-export function preview (data) {
- return request({
- url: 'deviceInfo/' + data.id,
- method: 'get',
- params: data,
- })
-}
-
-export default { add, edit, del, preview }
diff --git a/report-ui/src/api/report.js b/report-ui/src/api/report.js
index 6c683351..8314d5bd 100644
--- a/report-ui/src/api/report.js
+++ b/report-ui/src/api/report.js
@@ -5,16 +5,15 @@
* @Last Modified time: 2021-03-04 10:46:26
*/
import request from '@/utils/request'
-import { add, del, edit, preview } from '@/api/deviceInfo'
// datasource
-export function pageList(params) {
+export function pageList (params) {
return request({
url: '/dataSource/pageList',
method: 'get',
params,
})
}
-export function dataSource(data) {
+export function dataSource (data) {
return request({
url: '/dataSource/' + data.id,
method: 'get',
@@ -22,28 +21,28 @@ export function dataSource(data) {
})
}
// delete datasource
-export function deleteDataSource(data) {
+export function deleteDataSource (data) {
return request({
url: '/dataSource/' + data.id,
method: 'delete',
data,
})
}
-export function testConnection(data) {
+export function testConnection (data) {
return request({
url: '/dataSource/testConnection',
method: 'post',
data,
})
}
-export function addDataSource(data) {
+export function addDataSource (data) {
return request({
url: '/dataSource',
method: 'post',
data,
})
}
-export function editDataSource(data) {
+export function editDataSource (data) {
return request({
url: '/dataSource',
method: 'put',
@@ -51,21 +50,21 @@ export function editDataSource(data) {
})
}
// resultset
-export function dataSetPreview(data) {
+export function dataSetPreview (data) {
return request({
url: `/dataSet/detailBysetId/${data.id}`,
method: 'get',
})
}
-export function addDataSet(data) {
+export function addDataSet (data) {
return request({
url: '/dataSet',
method: 'post',
data,
})
}
-export function editDataSet(data) {
+export function editDataSet (data) {
return request({
url: '/dataSet',
method: 'put',
@@ -73,7 +72,7 @@ export function editDataSet(data) {
})
}
// delete dataset
-export function deleteDataSet(data) {
+export function deleteDataSet (data) {
return request({
url: '/dataSet/' + data.id,
method: 'delete',
@@ -81,7 +80,7 @@ export function deleteDataSet(data) {
})
}
// 下拉数据源
-export function queryAllDataSourceSet(data) {
+export function queryAllDataSourceSet (data) {
return request({
url: '/dataSource/queryAllDataSource',
method: 'get',
@@ -89,7 +88,7 @@ export function queryAllDataSourceSet(data) {
})
}
// 数据集高级规则js验证
-export function verificationSet(data) {
+export function verificationSet (data) {
return request({
url: '/dataSetParam/verification',
method: 'post',
@@ -97,7 +96,7 @@ export function verificationSet(data) {
})
}
// 测试数据转换,以及返回数据table列表
-export function testTransformSet(data) {
+export function testTransformSet (data) {
return request({
url: '/dataSet/testTransform',
method: 'post',
@@ -106,7 +105,7 @@ export function testTransformSet(data) {
}
// report
-export function reportPageList(params) {
+export function reportPageList (params) {
return request({
url: '/report/pageList',
method: 'get',
@@ -114,7 +113,7 @@ export function reportPageList(params) {
})
}
// report
-export function addReport(data) {
+export function addReport (data) {
return request({
url: '/report',
method: 'post',
@@ -123,7 +122,7 @@ export function addReport(data) {
}
// report
-export function editReport(data) {
+export function editReport (data) {
return request({
url: '/report',
method: 'put',
@@ -132,7 +131,7 @@ export function editReport(data) {
}
// report
-export function delReport(data) {
+export function delReport (data) {
return request({
url: '/report/delReport',
method: 'delete',
@@ -141,7 +140,7 @@ export function delReport(data) {
}
// report
-export function detailReport(id, accessKey) {
+export function detailReport (id, accessKey) {
return request({
url: `/report/${id}?accessKey=${accessKey}`,
method: 'get',
@@ -149,7 +148,7 @@ export function detailReport(id, accessKey) {
}
// reportExcel
-export function addReportExcel(data) {
+export function addReportExcel (data) {
return request({
url: '/reportExcel',
method: 'post',
@@ -158,13 +157,10 @@ export function addReportExcel(data) {
}
// reportExcel
-export function editReportExcel(data) {
+export function editReportExcel (data) {
return request({
url: '/reportExcel',
method: 'put',
data,
})
-}
-
-
-export default { add, edit, del, preview }
+}
\ No newline at end of file
diff --git a/report-ui/src/router/index.js b/report-ui/src/router/index.js
index 72554b2c..ee7071d5 100644
--- a/report-ui/src/router/index.js
+++ b/report-ui/src/router/index.js
@@ -46,19 +46,55 @@ export const constantRouterMap = [
]
},
{
- path: '/report',
+ path: '/datasource',
component: Layout,
redirect: '/report/datasource',
- name: '报表管理',
- meta: { title: '报表管理', icon: 'iconnavicon-ywcs' },
+ name: '数据源',
+ meta: { title: '数据源', icon: 'iconnavicon-ywcs' },
children: [
{ path: 'datasource', name: 'datasource', component: () => import('@/views/report/datasource/index'), meta: { title: '数据源', icon: 'iconeventbridgexiaoxishijianzongxian', keepAlive: true, isBack: true } },
+ ]
+ },
+ {
+ path: '/resultset',
+ component: Layout,
+ redirect: '/report/resultset',
+ name: '数据集',
+ meta: { title: '数据集', icon: 'iconnavicon-ywcs' },
+ children: [
{ path: 'resultset', name: 'resultset', component: () => import('@/views/report/resultset/index'), meta: { title: '数据集', icon: 'iconalikafkaxiaoxiduilieKafka', keepAlive: true, isBack: true } },
+ ]
+ },
+ {
+ path: '/report',
+ component: Layout,
+ redirect: '/report/report',
+ name: '报表管理',
+ meta: { title: '报表管理', icon: 'iconnavicon-ywcs' },
+ children: [
{ path: 'report', name: 'reportIndex', component: () => import('@/views/report/report/index'), meta: { title: '报表管理', icon: 'iconnavicon-ywcs', keepAlive: true, isBack: true } },
+ ]
+ },
+ {
+ path: '/bigscreen',
+ component: Layout,
+ redirect: '/report/bigscreen',
+ name: '大屏报表',
+ meta: { title: '大屏报表', icon: 'iconnavicon-ywcs' },
+ children: [
{ path: 'bigscreen', name: 'bigscreen', component: () => import('@/views/report/bigscreen/index'), meta: { title: '大屏报表', icon: 'iconchufaqipeizhi-hui', keepAlive: true, isBack: true } },
- { path: 'excelreport', name: 'excelreport', component: () => import('@/views/report/excelreport/index'), meta: { title: '表格报表', icon: 'iconliebiao', keepAlive: true, isBack: true } },
]
},
+ // {
+ // path: '/report',
+ // component: Layout,
+ // redirect: '/report/excelreport',
+ // name: '表格报表',
+ // meta: { title: '表格报表', icon: 'iconnavicon-ywcs' },
+ // children: [
+ // { path: 'excelreport', name: 'excelreport', component: () => import('@/views/report/excelreport/index'), meta: { title: '表格报表', icon: 'iconliebiao', keepAlive: true, isBack: true } },
+ // ]
+ // },
{ path: '/404', component: () => import('@/views/404'), hidden: true },
{ path: '*', redirect: '/index', hidden: true },
]
diff --git a/report-ui/src/views/login.vue b/report-ui/src/views/login.vue
index 62687292..2aae5f88 100644
--- a/report-ui/src/views/login.vue
+++ b/report-ui/src/views/login.vue
@@ -28,7 +28,6 @@
在线大屏
-记住密码