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
35edb95a
Commit
35edb95a
authored
Jul 13, 2021
by
陈浩玮
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/chw' into 'master'
地点 See merge request product/kim3-web-vue/starter-web-vue!45
parents
809b574e
905a5068
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
225 additions
and
8 deletions
+225
-8
src/api/index.js
src/api/index.js
+1
-1
src/api/ranger.js
src/api/ranger.js
+16
-0
src/components/table/table.vue
src/components/table/table.vue
+2
-2
src/pages/ranger/basic/place/add_edit.vue
src/pages/ranger/basic/place/add_edit.vue
+74
-0
src/pages/ranger/basic/place/exempt.vue
src/pages/ranger/basic/place/exempt.vue
+43
-0
src/pages/ranger/basic/place/index.vue
src/pages/ranger/basic/place/index.vue
+86
-2
src/pages/ranger/task_managment/center/index.vue
src/pages/ranger/task_managment/center/index.vue
+3
-3
No files found.
src/api/index.js
View file @
35edb95a
...
...
@@ -3,7 +3,7 @@ import Lang from '@/utils/langUtils';
export
*
from
'
./menu
'
;
export
*
from
'
./system
'
;
export
*
from
'
./task
'
;
export
*
from
'
./
xunjian
'
;
export
*
from
'
./
ranger
'
;
export
function
getUserDetailInfoApi
()
{
return
request
(
'
/api/v1/detail
'
,
METHOD
.
GET
);
...
...
src/api/
xunjian
.js
→
src/api/
ranger
.js
View file @
35edb95a
...
...
@@ -20,6 +20,22 @@ export function editRegionApi(data) {
return
putReq
(
`ranger/inspection/api/v1/region`
,
data
);
}
export
function
getPlaceInfoApi
(
id
)
{
return
getReq
(
`/ranger/inspection/api/v1/place/
${
id
}
`
);
}
export
function
addPlaceApi
(
data
)
{
return
postReq
(
'
/ranger/inspection/api/v1/place
'
,
data
);
}
export
function
editPlaceApi
(
data
)
{
return
putReq
(
'
/ranger/inspection/api/v1/place
'
,
data
);
}
export
function
getExemptionsListApi
(
data
)
{
return
getReq
(
`/ranger/inspection/api/v1/exemptions/valid`
,
data
);
}
export
function
addUnitApi
(
data
)
{
return
postReq
(
'
/ranger/inspection/api/v1/units
'
,
data
);
}
...
...
src/components/table/table.vue
View file @
35edb95a
...
...
@@ -90,7 +90,7 @@ export default {
noPage
:
Boolean
,
formatData
:
Function
,
rowKey
:
[
String
,
Function
],
selected
:
Array
,
selected
:
Object
,
drawerWidth
:
{
type
:
Number
,
default
:
600
,
...
...
@@ -154,7 +154,7 @@ export default {
rowSelection
()
{
return
{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
this
.
$emit
(
'
update:selected
'
,
[
selectedRowKeys
,
selectedRows
]
);
this
.
$emit
(
'
update:selected
'
,
{
keys
:
selectedRowKeys
,
rows
:
selectedRows
}
);
},
};
},
...
...
src/pages/ranger/basic/place/add_edit.vue
0 → 100644
View file @
35edb95a
<
template
>
<Wraper
:hidden=
"hidden"
:onOk=
"submit"
:refresh=
"refresh"
:noFooter=
"isView"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"form"
>
<a-form-model-item
label=
"地点名称"
prop=
"placeName"
>
<a-input
v-model=
"form.placeName"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"所属组织"
prop=
"regionId"
>
<UrlSelect
v-model=
"form.regionId"
url=
"/ranger/inspection/api/v1/region/list"
labelFiled=
"regionName"
valueFiled=
"regionId"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"二维码"
prop=
"qrCode"
>
<a-input
v-model=
"form.qrCode"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"二维码"
prop=
"electronicTag"
>
<a-input
v-model=
"form.electronicTag"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"备注"
prop=
"remark"
>
<a-textarea
placeholder=
"Basic usage"
:rows=
"4"
v-model=
"form.remark"
:disabled=
"isView"
/>
</a-form-model-item>
</a-form-model>
</Wraper>
</
template
>
<
script
>
import
Wraper
from
'
@/components/table/wraper.vue
'
;
import
UrlSelect
from
'
@/components/MySelect/url_select.vue
'
;
import
{
addPlaceApi
,
editPlaceApi
,
getPlaceInfoApi
}
from
'
@/api
'
;
export
default
{
components
:
{
Wraper
,
UrlSelect
},
props
:
{
hidden
:
Function
,
row
:
Object
,
type
:
String
,
refresh
:
Function
},
data
:
()
=>
({
form
:
{},
rules
:
{
placeName
:
[{
required
:
true
}],
regionId
:
[{
required
:
true
}],
qrCode
:
[{
required
:
true
}],
electronicTag
:
[{
required
:
true
}],
},
}),
computed
:
{
isView
()
{
return
this
.
type
===
'
view
'
;
},
isEdit
()
{
return
this
.
type
===
'
edit
'
;
},
isAdd
()
{
return
this
.
type
===
null
;
},
},
async
mounted
()
{
if
(
!
this
.
isAdd
)
{
this
.
form
=
await
getPlaceInfoApi
(
this
.
row
.
placeId
);
}
},
methods
:
{
async
submit
()
{
await
this
.
$refs
.
form
.
validate
();
if
(
this
.
isAdd
)
return
addPlaceApi
(
this
.
form
);
if
(
this
.
isEdit
)
return
editPlaceApi
(
this
.
form
);
},
},
};
</
script
>
src/pages/ranger/basic/place/exempt.vue
0 → 100644
View file @
35edb95a
<
template
>
<Wraper
:hidden=
"hidden"
noFooter
>
<a-list
:data-source=
"data"
:grid=
"
{ gutter: 16, xs: 1, sm: 1, md: 1, lg: 1, xl: 1, xxl: 1 }">
<a-list-item
slot=
"renderItem"
slot-scope=
"item"
>
<a-card>
<template
#title
>
<a-tag
v-if=
"item.exemptionState === 'EFFECTIVE'"
color=
"#87d068"
>
有效
</a-tag>
<a-tag
v-else
color=
"#f50"
>
无效
</a-tag>
{{
`${item.startTime
}
至 ${item.endTime
}
`
}}
<
/template
>
{{
item
.
exemptionReason
}}
<
/a-card
>
<
/a-list-item
>
<
/a-list
>
<
/Wraper
>
<
/template
>
<
script
>
import
Wraper
from
'
@/components/table/wraper.vue
'
;
import
{
getExemptionsListApi
}
from
'
@/api
'
;
export
default
{
components
:
{
Wraper
}
,
props
:
{
hidden
:
Function
,
row
:
Object
}
,
data
()
{
return
{
data
:
[],
loading
:
false
,
}
;
}
,
mounted
()
{
this
.
getList
();
}
,
methods
:
{
async
getList
()
{
const
{
placeId
,
regionId
}
=
this
.
row
;
this
.
loading
=
true
;
const
data
=
await
getExemptionsListApi
({
placeId
,
regionId
,
exemptionType
:
'
PLACE
'
}
);
this
.
data
=
data
;
this
.
loading
=
false
;
}
,
}
,
}
;
<
/script
>
src/pages/ranger/basic/place/index.vue
View file @
35edb95a
<
template
>
<div>
place
</div>
<Table
url=
"/ranger/inspection/api/v1/place/page"
rowKey=
"placeId"
:selected.sync=
"selected"
addBtn
:buttons=
"buttons"
ref=
"table"
>
<template
#search
="
{ query }">
<MoreItem
label=
"地区"
>
<UrlSelect
v-model=
"query.regionId"
url=
"/ranger/inspection/api/v1/region/list"
labelFiled=
"regionName"
valueFiled=
"regionId"
placeholder=
"选择地区"
/>
</MoreItem>
<MoreItem
label=
"搜索"
>
<a-input
v-model=
"query.inputValue"
placeholder=
"请输入地点名称/二维码/电子标签"
/>
</MoreItem>
</
template
>
<
template
#operation
>
<a-button
@
click=
"download"
>
导出
</a-button>
</
template
>
<
template
#drawer=
"drawer"
>
<AddAndEdit
v-if=
"drawer.type !== 'exempt'"
v-bind=
"drawer"
/>
<Exempt
v-else
v-bind=
"drawer"
/>
</
template
>
<a-table-column
title=
"地点名称"
data-index=
"placeName"
/>
<a-table-column
title=
"所属地区"
data-index=
"regionName"
/>
<a-table-column
title=
"二维码"
data-index=
"qrCode"
/>
<a-table-column
title=
"电子标签"
data-index=
"electronicTag"
/>
<a-table-column
title=
"修改人"
data-index=
"editorName"
/>
<a-table-column
title=
"修改时间"
data-index=
"editTime"
/>
</Table>
</template>
<
script
>
export
default
{};
import
Table
from
'
@/components/table/table.vue
'
;
import
UrlSelect
from
'
@/components/MySelect/url_select.vue
'
;
import
MoreItem
from
'
@/components/table/more_item.vue
'
;
import
{
downloadFileByUrl
}
from
'
@/utils
'
;
import
AddAndEdit
from
'
./add_edit.vue
'
;
import
Exempt
from
'
./exempt.vue
'
;
export
default
{
components
:
{
Table
,
UrlSelect
,
MoreItem
,
AddAndEdit
,
Exempt
},
data
()
{
return
{
buttons
:
[
{
label
:
'
编辑
'
,
click
:
this
.
edit
},
{
label
:
'
详情
'
,
click
:
this
.
view
},
{
label
:
'
免检
'
,
click
:
this
.
exempt
},
{
type
:
'
confirm
'
,
url
:
(
row
)
=>
`/ranger/inspection/api/v1/place/
${
row
.
placeId
}
`
,
after
:
this
.
refresh
,
},
],
selected
:
{},
};
},
methods
:
{
refresh
()
{
this
.
$refs
.
table
.
getData
();
},
edit
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
编辑
'
,
type
:
'
edit
'
});
},
view
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
查看
'
,
type
:
'
view
'
});
},
exempt
(
row
)
{
this
.
$refs
.
table
.
show
({
row
,
title
:
'
免检
'
,
type
:
'
exempt
'
});
},
download
()
{
if
(
!
this
.
selected
?.
keys
?.
length
)
return
this
.
$message
.
error
(
'
请选择需要导出的数据
'
);
downloadFileByUrl
(
`/ranger/inspection/api/v1/place/exportQrCodeData?placeIdList=
${
this
.
selected
.
keys
.
join
(
'
,
'
,
)}
`
,
);
},
},
};
</
script
>
src/pages/ranger/task_managment/center/index.vue
View file @
35edb95a
...
...
@@ -187,13 +187,13 @@ export default {
after
:
this
.
refresh
,
},
],
selected
:
[]
,
selected
:
{}
,
};
},
methods
:
{
async
download
()
{
if
(
!
this
.
selected
.
length
)
return
this
.
$message
.
error
(
'
请选择需要导出的数据
'
);
const
url
=
await
getXunJianDownloadUrlApi
(
this
.
selected
[
0
]
);
if
(
!
this
.
selected
?.
keys
?
.
length
)
return
this
.
$message
.
error
(
'
请选择需要导出的数据
'
);
const
url
=
await
getXunJianDownloadUrlApi
(
this
.
selected
.
keys
);
downloadFileByUrl
(
`
${
this
.
$fileUrl
}${
url
}
`
);
},
refresh
()
{
...
...
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