diff --git a/src/api/index.js b/src/api/index.js index 344e86d79e34cfc4d7de6e2205d2c53bad89372b..f46d32449e349fd420a8daa91661b526dd9c7d84 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -8,11 +8,11 @@ export * from './xunjian'; export function getUserDetailInfoApi() { return request('/api/v1/detail', METHOD.GET); } -export const getStaticParam = async staticKey => { +export const getStaticParam = async (staticKey) => { const res = await request('/api/v1/parameters/business/multi/list', METHOD.GET, { queryList: staticKey, }); - const curData = res.find(i => i.key === staticKey); + const curData = res.find((i) => i.key === staticKey); const newData = await formatObj(curData.businessParameterList || [], { value: 'paramValue', label: 'paramName', @@ -21,7 +21,7 @@ export const getStaticParam = async staticKey => { return newData; }; -export const getStaticDataApi = async data => { +export const getStaticDataApi = async (data) => { const res = await request('/api/v1/parameters/business/list', METHOD.GET, { ...data, paramLocale: Lang.get(), @@ -33,3 +33,7 @@ export const getStaticDataApi = async data => { }); return newData; }; + +export function getStaticDataByTwoParamsApi(paramModule, paramCode) { + return getStaticDataApi({ paramModule, paramCode }); +} diff --git a/src/api/xunjian.js b/src/api/xunjian.js index d4d106fef00de5afb33cee3e6520aeef7c0a3806..8f733ca4bd75a3d1a611a92d62fb29c1433c3075 100644 --- a/src/api/xunjian.js +++ b/src/api/xunjian.js @@ -1,32 +1,9 @@ import { getReq, postReq } from '@/utils/requestUtil'; -import langUtils from '@/utils/langUtils'; export function getXunJianDownloadUrlApi(idList) { return getReq('/ranger/inspection/api/v1/jobs/export', { jobIdList: idList.join(',') }); } -export function getAreaListDataApi() { - return getReq(`/ranger/inspection/api/v1/region/list`); -} - -export function getBusinessListApi() { - return getReq( - `/api/v1/parameters/business/list?paramModule=rpis_route_schedule¶mCode=inspection_state¶mLocale=${langUtils.get()}`, - ); -} - -export function getBanZuListApi() { - return getReq( - `/api/v1/parameters/business/list?paramModule=rpis_route_schedule¶mCode=shift_type¶mLocale=${langUtils.get()}`, - ); -} - -export function getTaskTypeApi() { - return getReq( - `/api/v1/parameters/business/list?paramModule=rpis_route_schedule¶mCode=job_type¶mLocale=${langUtils.get()}`, - ); -} - export function addXunJianTaskApi(data) { return postReq('/ranger/inspection/api/v1/jobs/temporary', data); } diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 1d3f085b7161698b5d8f8b355ffa61712fb09545..f74b18fe9217511a57cdc926f7fd93f68887049b 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -163,6 +163,7 @@ export default { methods: { async getData() { this.loading = true; + console.log(this.queryForm); try { this.noPage ? await this.getDataNoPage() : await this.getDataWithPage(); } catch (error) { diff --git a/src/components/table/weekly_select.vue b/src/components/table/weekly_select.vue new file mode 100644 index 0000000000000000000000000000000000000000..a6f8c3b4362673f948b70926a1da665fe19bed88 --- /dev/null +++ b/src/components/table/weekly_select.vue @@ -0,0 +1,24 @@ + + + diff --git a/src/pages/xunjian/report/weekly/index.js b/src/pages/xunjian/report/weekly/index.js new file mode 100644 index 0000000000000000000000000000000000000000..65e6b7ac8be7b3cdd19dfcbd0fd73f92df8aa640 --- /dev/null +++ b/src/pages/xunjian/report/weekly/index.js @@ -0,0 +1,3 @@ +import Index from './index.vue'; + +export default Index; diff --git a/src/pages/xunjian/report/weekly/index.vue b/src/pages/xunjian/report/weekly/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..04257efe221b0672cf15524b1075efc773cda69d --- /dev/null +++ b/src/pages/xunjian/report/weekly/index.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/pages/xunjian/task_managment/center/form.vue b/src/pages/xunjian/task_managment/center/form.vue index d92ed280ae49769982f8ec355c8251436f2a3618..abd319d09baae64581b1f014cac2b278582721fe 100644 --- a/src/pages/xunjian/task_managment/center/form.vue +++ b/src/pages/xunjian/task_managment/center/form.vue @@ -2,8 +2,8 @@ - - - getStaticDataByTwoParamsApi('rpis_route_schedule', 'inspection_state'), + getBanZuListApi: () => getStaticDataByTwoParamsApi('rpis_route_schedule', 'shift_type'), + getTaskTypeApi: () => getStaticDataByTwoParamsApi('rpis_route_schedule', 'job_type'), addBtn: { title: '新建临时任务', }, diff --git a/src/router/config.js b/src/router/config.js index fd033fbe9194c3e37acf6e28dac9701c37315eeb..f56b1fff97fd18dfa927da84021e9baebfa312ba 100644 --- a/src/router/config.js +++ b/src/router/config.js @@ -68,7 +68,19 @@ const hasAuthorityRoutes = [ { path: 'center', name: '任务中心', - component: () => import('@/pages/xunjian/task_managment/center/index'), + component: () => import('@/pages/xunjian/task_managment/center'), + }, + ], + }, + { + path: 'report', + name: '报表中心', + component: RouterView, + children: [ + { + path: 'week', + name: '巡检周报', + component: () => import('@/pages/xunjian/report/weekly'), }, ], },