Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Starter Web Vue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
product
kim3-web-vue
Starter Web Vue
Commits
00ae9982
Commit
00ae9982
authored
Jul 12, 2021
by
水落(YangLei)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 代码优化,增加周报页面
parent
1b45a3e4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
115 additions
and
41 deletions
+115
-41
src/api/index.js
src/api/index.js
+7
-3
src/api/xunjian.js
src/api/xunjian.js
+0
-23
src/components/table/table.vue
src/components/table/table.vue
+1
-0
src/components/table/weekly_select.vue
src/components/table/weekly_select.vue
+24
-0
src/pages/xunjian/report/weekly/index.js
src/pages/xunjian/report/weekly/index.js
+3
-0
src/pages/xunjian/report/weekly/index.vue
src/pages/xunjian/report/weekly/index.vue
+55
-0
src/pages/xunjian/task_managment/center/form.vue
src/pages/xunjian/task_managment/center/form.vue
+4
-5
src/pages/xunjian/task_managment/center/index.vue
src/pages/xunjian/task_managment/center/index.vue
+8
-9
src/router/config.js
src/router/config.js
+13
-1
No files found.
src/api/index.js
View file @
00ae9982
...
...
@@ -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
});
}
src/api/xunjian.js
View file @
00ae9982
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
);
}
src/components/table/table.vue
View file @
00ae9982
...
...
@@ -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
)
{
...
...
src/components/table/weekly_select.vue
0 → 100644
View file @
00ae9982
<
template
>
<a-week-picker
class=
"tw-w-full"
placeholder=
"Select week"
@
change=
"change"
v-bind=
"$attrs"
v-on=
"$listeners"
/>
</
template
>
<
script
>
export
default
{
props
:
{
year
:
String
,
week
:
String
,
},
methods
:
{
change
(
val
)
{
this
.
$emit
(
'
update:week
'
,
val
.
week
().
toString
());
this
.
$emit
(
'
update:year
'
,
val
.
year
().
toString
());
},
},
};
</
script
>
src/pages/xunjian/report/weekly/index.js
0 → 100644
View file @
00ae9982
import
Index
from
'
./index.vue
'
;
export
default
Index
;
src/pages/xunjian/report/weekly/index.vue
0 → 100644
View file @
00ae9982
<
template
>
<Table
url=
"/ranger/inspection/api/v1/analysis/reports/inspection/week"
rowKey=
"remotrId"
>
<template
#search
="
{ query }">
<MoreItem
label=
"周"
>
<WeeklySelect
placeholder=
"Select week"
:week.sync=
"query.week"
:year.sync=
"query.year"
/>
</MoreItem>
<MoreItem
label=
"地区"
>
<UrlSelect
url=
"/ranger/inspection/api/v1/region/list"
v-model=
"query.regionId"
labelFiled=
"regionName"
valueFiled=
"regionId"
/>
</MoreItem>
<MoreItem
label=
"专业"
>
<UrlSelect
:url=
"
query.regionId
? `/ranger/inspection/api/v1/specialities/valid/regions/$
{query.regionId}/list`
: ''
"
v-model="query.specialityId"
labelFiled="specialityName"
valueFiled="specialityId"
/>
</MoreItem>
</
template
>
<a-table-column
title=
"报表名称"
data-index=
"routeName"
/>
<a-table-column
title=
"地区"
data-index=
"specialityName"
/>
<a-table-column
title=
"专业"
data-index=
"regionName"
/>
<a-table-column
title=
"年"
data-index=
"shiftTypeName"
/>
<!-- <a-table-column title="周" data-index="shiftTypeName" />
<a-table-column title="任务数" data-index="shiftTypeName" />
<a-table-column title="项目数" data-index="shiftTypeName" />
<a-table-column title="正常数" data-index="shiftTypeName" />
<a-table-column title="异常数" data-index="shiftTypeName" />
<a-table-column title="已检数" data-index="shiftTypeName" />
<a-table-column title="免检数" data-index="shiftTypeName" />
<a-table-column title="未检数" data-index="shiftTypeName" />
<a-table-column title="未检率" data-index="shiftTypeName" />
<a-table-column title="异常率" data-index="shiftTypeName" /> -->
</Table>
</template>
<
script
>
import
Table
from
'
@/components/table/table.vue
'
;
import
MoreItem
from
'
@/components/table/more_item.vue
'
;
import
UrlSelect
from
'
@/components/MySelect/url_select.vue
'
;
import
WeeklySelect
from
'
@/components/table/weekly_select.vue
'
;
export
default
{
components
:
{
Table
,
MoreItem
,
UrlSelect
,
WeeklySelect
},
};
</
script
>
src/pages/xunjian/task_managment/center/form.vue
View file @
00ae9982
...
...
@@ -2,8 +2,8 @@
<Wraper
:hidden=
"hidden"
:onOk=
"submit"
:refresh=
"refresh"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"form"
>
<a-form-model-item
label=
"地区"
prop=
"regionId"
>
<
Request
Select
:request=
"getAreaListDataApi
"
<
Url
Select
url=
"/ranger/inspection/api/v1/region/list
"
v-model=
"form.regionId"
labelFiled=
"regionName"
valueFiled=
"regionId"
...
...
@@ -56,7 +56,7 @@ import Wraper from '@/components/table/wraper.vue';
import
RequestSelect
from
'
@/components/MySelect/RequestSelect.vue
'
;
import
SearchSelect
from
'
@/components/MySelect/search_select.vue
'
;
import
UrlSelect
from
'
@/components/MySelect/url_select.vue
'
;
import
{
get
AreaListDataApi
,
getBanZuList
Api
,
addXunJianTaskApi
}
from
'
@/api
'
;
import
{
get
StaticDataByTwoParams
Api
,
addXunJianTaskApi
}
from
'
@/api
'
;
export
default
{
props
:
{
...
...
@@ -66,8 +66,7 @@ export default {
components
:
{
Wraper
,
RequestSelect
,
SearchSelect
,
UrlSelect
},
data
()
{
return
{
getAreaListDataApi
,
getBanZuListApi
,
getBanZuListApi
:
getStaticDataByTwoParamsApi
(
'
rpis_route_schedule
'
,
'
shift_type
'
),
form
:
{},
rules
:
{
inspectionIdList
:
[{
required
:
true
}],
...
...
src/pages/xunjian/task_managment/center/index.vue
View file @
00ae9982
...
...
@@ -27,8 +27,8 @@
/>
</MoreItem>
<MoreItem
label=
"地区"
>
<
Request
Select
:request=
"getAreaListDataApi
"
<
Url
Select
url=
"/ranger/inspection/api/v1/region/list
"
v-model=
"query.regionId"
labelFiled=
"regionName"
valueFiled=
"regionId"
...
...
@@ -54,8 +54,8 @@
/>
</MoreItem>
<MoreItem
label=
"地区"
>
<
Request
Select
:request=
"getAreaListDataApi
"
<
Url
Select
url=
"/ranger/inspection/api/v1/region/list
"
v-model=
"query.regionId"
labelFiled=
"regionName"
valueFiled=
"regionId"
...
...
@@ -151,7 +151,7 @@ import { getXunJianDownloadUrlApi } from '@/api';
import
{
downloadFileByUrl
}
from
'
@/utils
'
;
import
RequestSelect
from
'
@/components/MySelect/RequestSelect.vue
'
;
import
SearchSelect
from
'
@/components/MySelect/search_select.vue
'
;
import
{
get
AreaListDataApi
,
getBusinessListApi
,
getBanZuListApi
,
getTaskType
Api
}
from
'
@/api
'
;
import
{
get
StaticDataByTwoParams
Api
}
from
'
@/api
'
;
import
Progress
from
'
./progress.vue
'
;
import
Detail
from
'
./detail.vue
'
;
import
MoreItem
from
'
@/components/table/more_item.vue
'
;
...
...
@@ -169,10 +169,9 @@ export default {
},
data
()
{
return
{
getAreaListDataApi
,
getBusinessListApi
,
getBanZuListApi
,
getTaskTypeApi
,
getBusinessListApi
:
()
=>
getStaticDataByTwoParamsApi
(
'
rpis_route_schedule
'
,
'
inspection_state
'
),
getBanZuListApi
:
()
=>
getStaticDataByTwoParamsApi
(
'
rpis_route_schedule
'
,
'
shift_type
'
),
getTaskTypeApi
:
()
=>
getStaticDataByTwoParamsApi
(
'
rpis_route_schedule
'
,
'
job_type
'
),
addBtn
:
{
title
:
'
新建临时任务
'
,
},
...
...
src/router/config.js
View file @
00ae9982
...
...
@@ -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
'
),
},
],
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment