diff --git a/client/src/api/cma.js b/client/src/api/cma.js index 243c370..5688896 100644 --- a/client/src/api/cma.js +++ b/client/src/api/cma.js @@ -7,6 +7,14 @@ export function getCMAList(query) { params: query }) } +export function getCNASList(query) { + return request({ + url: '/ability/cnas/', + method: 'get', + params: query + }) +} + export function createCMA(data) { return request({ url: '/ability/cma/', @@ -34,4 +42,11 @@ export function importCMA(data) { method: 'post', data }) +} +export function importCNAS(data) { + return request({ + url: `/ability/cnas/import/`, + method: 'post', + data + }) } \ No newline at end of file diff --git a/client/src/main.js b/client/src/main.js index 66b8721..6021d6d 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -41,7 +41,7 @@ Vue.prototype.openLoading = function() { }) setTimeout(function () { // 设定定时器,超时5S后自动关闭遮罩层,避免请求失败时,遮罩层一直存在的问题 loading.close(); // 关闭遮罩层 - },20000) + },50000) return loading; } new Vue({ diff --git a/client/src/router/index.js b/client/src/router/index.js index fe423a1..9becff7 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -50,7 +50,7 @@ export const constantRoutes = [ path: 'cma', name: 'CMA', component: () => import('@/views/ability/cma'), - meta: { title: 'CMA检测能力', icon: 'table' } + meta: { title: '检测能力', icon: 'table' } }] } // { diff --git a/client/src/utils/request.js b/client/src/utils/request.js index 3a02422..6a0e35c 100644 --- a/client/src/utils/request.js +++ b/client/src/utils/request.js @@ -61,7 +61,7 @@ service.interceptors.response.use( duration: 5 * 1000 }) - // return Promise.reject(new Error(res.error || '请求出错')) + return Promise.reject(new Error(res.msg || '请求出错')) } else { return res } diff --git a/client/src/views/ability/cma.vue b/client/src/views/ability/cma.vue index 4251d1c..8eec922 100644 --- a/client/src/views/ability/cma.vue +++ b/client/src/views/ability/cma.vue @@ -23,7 +23,7 @@ >刷新重置
- 新增 +
- 导入能力 + 导入CMA能力 + + +

导入能力列表压缩包.

+
+ + 上传导入 + +
+ + 导入CNAS能力
@@ -109,6 +130,60 @@ @pagination="getList" /> + + + + + + + + + + + + + + + + + + + + + + + + @@ -126,7 +201,7 @@