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
6aad0cad
Commit
6aad0cad
authored
Jul 14, 2021
by
陈浩玮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
4721fe3b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
215 additions
and
4 deletions
+215
-4
src/api/ranger.js
src/api/ranger.js
+0
-1
src/pages/ranger/basic/line/add_edit.vue
src/pages/ranger/basic/line/add_edit.vue
+74
-0
src/pages/ranger/basic/line/exempt.vue
src/pages/ranger/basic/line/exempt.vue
+43
-0
src/pages/ranger/basic/line/index.vue
src/pages/ranger/basic/line/index.vue
+91
-0
src/router/config.js
src/router/config.js
+7
-3
No files found.
src/api/ranger.js
View file @
6aad0cad
...
...
@@ -48,7 +48,6 @@ export function getUnitInfoApi(id) {
return
getReq
(
`/ranger/inspection/api/v1/units/
${
id
}
`
);
}
<<<<<<<
src
/
api
/
ranger
.
js
export
function
getItemsInfoApi
(
id
)
{
return
getReq
(
`/ranger/inspection/api/v1/items/
${
id
}
`
);
}
...
...
src/pages/ranger/basic/line/add_edit.vue
0 → 100644
View file @
6aad0cad
<
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/line/exempt.vue
0 → 100644
View file @
6aad0cad
<
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/line/index.vue
0 → 100644
View file @
6aad0cad
<
template
>
<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
>
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/router/config.js
View file @
6aad0cad
...
...
@@ -81,15 +81,19 @@ const hasAuthorityRoutes = [
component
:
()
=>
import
(
'
@/pages/ranger/basic/unit
'
),
},
{
path
:
'
item
'
,
name
:
'
项目配置
'
,
component
:
()
=>
import
(
'
@/pages/ranger/basic/item
'
),
},{
},
{
path
:
'
line
'
,
name
:
'
线路配置
'
,
component
:
()
=>
import
(
'
@/pages/ranger/basic/line
'
),
},
{
path
:
'
exemption
'
,
name
:
'
免检配置
'
,
component
:
()
=>
import
(
'
@/pages/ranger/basic/exemption
'
),
},
],
},
...
...
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