Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
赵啸非
smart_gov_platform
Commits
852fcaa9
Commit
852fcaa9
authored
Mar 21, 2025
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加社保配置
parent
259a448f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
504 additions
and
0 deletions
+504
-0
base-manager-ui/admin/src/pages/basicset/social/Social.vue
base-manager-ui/admin/src/pages/basicset/social/Social.vue
+230
-0
base-manager-ui/admin/src/pages/basicset/social/modal/AddSocial.vue
...er-ui/admin/src/pages/basicset/social/modal/AddSocial.vue
+234
-0
base-manager-ui/admin/src/router/config.js
base-manager-ui/admin/src/router/config.js
+8
-0
base-manager-ui/admin/src/services/basicsetApi.js
base-manager-ui/admin/src/services/basicsetApi.js
+8
-0
base-manager-ui/admin/src/services/social.js
base-manager-ui/admin/src/services/social.js
+24
-0
No files found.
base-manager-ui/admin/src/pages/basicset/social/Social.vue
0 → 100644
View file @
852fcaa9
<
template
>
<div
class=
"social"
>
<TabHeader
label=
"社保配置"
></TabHeader>
<div
class=
"content"
>
<div
class=
"control"
>
<a-space>
<div>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleAdd"
>
新增
</a-button
>
<a-button
type=
"danger"
@
click=
"handleDelAll"
>
批量删除
</a-button>
</div>
</a-space>
</div>
<YTable
:columns=
"columns"
:data=
"tableData"
:pageSize.sync=
"size"
:page.sync=
"page"
:total=
"total"
:loading=
"loading"
:scroll=
"
{ y: 560 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
@changePagination="getDataList"
>
<template
slot=
"action"
slot-scope=
"
{ record }">
<a-space
size=
"middle"
>
<span
class=
"primary pointer"
@
click=
"handleEdit(record)"
>
编辑
</span
>
<span
class=
"delete pointer"
@
click=
"handleDel(record.id)"
>
删除
</span
>
</a-space>
</
template
>
</YTable>
</div>
<!-- 新增、编辑 -->
<AddSocial
ref=
"AddSocial"
:show.sync=
"show"
:title=
"title"
@
success=
"getDataList"
></AddSocial>
</div>
</template>
<
script
>
import
TabHeader
from
"
@/components/TabHeader
"
;
import
YTable
from
"
@/components/YTable.vue
"
;
import
local
from
"
@/utils/local
"
;
import
{
getSocialSetList
,
delSocialSet
}
from
"
@/services/social
"
;
import
AddSocial
from
"
./modal/AddSocial.vue
"
;
export
default
{
components
:
{
TabHeader
,
YTable
,
AddSocial
,
},
data
()
{
return
{
title
:
"
新增
"
,
show
:
false
,
siteId
:
local
.
getLocal
(
"
siteId
"
),
columns
:
[
{
title
:
"
序号
"
,
width
:
"
65px
"
,
customRender
:
(
text
,
record
,
index
)
=>
{
return
this
.
page
*
this
.
size
-
this
.
size
+
index
+
1
;
},
},
{
title
:
"
接入标识
"
,
dataIndex
:
"
appid
"
,
},
{
title
:
"
渠道标识
"
,
dataIndex
:
"
accessKey
"
,
},
{
title
:
"
密钥
"
,
dataIndex
:
"
privatKey
"
,
},
{
title
:
"
渠道密钥
"
,
dataIndex
:
"
key
"
,
},
{
title
:
"
机具编码
"
,
dataIndex
:
"
az400
"
,
},
{
title
:
"
机具密钥
"
,
dataIndex
:
"
sm4key
"
,
},
{
title
:
"
排号认证码
"
,
dataIndex
:
"
serviceCode
"
,
},
{
title
:
"
业务认证码
"
,
dataIndex
:
"
busCode
"
,
},
{
title
:
"
统一社会信用代码
"
,
dataIndex
:
"
orgCode
"
,
},
{
title
:
"
状态
"
,
dataIndex
:
"
enabled
"
,
customRender
:
(
text
)
=>
{
if
(
text
===
1
)
{
return
<
a
-
tag
color
=
"
green
"
>
启用
<
/a-tag>
;
}
else
if
(
text
===
0
)
{
return
<
a
-
tag
color
=
"
red
"
>
停用
<
/a-tag>
;
}
},
},
{
title
:
"
操作
"
,
width
:
"
120px
"
,
scopedSlots
:
{
customRender
:
"
action
"
},
},
],
tableData
:
[],
loading
:
false
,
selectedRowKeys
:
[],
size
:
10
,
page
:
1
,
total
:
0
,
searchValue
:
""
,
};
},
created
()
{
this
.
getDataList
();
},
methods
:
{
async
getDataList
()
{
this
.
loading
=
true
;
let
res
=
await
getSocialSetList
({
siteId
:
this
.
siteId
,
page
:
this
.
page
,
size
:
this
.
size
,
});
this
.
loading
=
false
;
if
(
res
.
data
.
code
===
1
)
{
let
{
data
,
total
}
=
res
.
data
.
data
;
if
(
!
data
.
length
&&
this
.
page
>
1
)
{
this
.
page
-=
1
;
this
.
getDataList
();
}
this
.
tableData
=
data
;
this
.
total
=
total
;
}
},
handleAdd
()
{
this
.
title
=
"
新增
"
;
this
.
$refs
.
AddSocial
.
onAdd
();
this
.
show
=
true
;
},
handleDelAll
()
{
if
(
!
this
.
selectedRowKeys
.
length
)
{
this
.
$message
.
warning
(
"
请先勾选数据
"
);
return
;
}
let
ids
=
this
.
selectedRowKeys
.
join
(
"
,
"
);
this
.
handleDel
(
ids
);
},
onSelectChange
(
keys
)
{
this
.
selectedRowKeys
=
keys
;
},
handleEdit
(
row
)
{
this
.
title
=
"
新增
"
;
this
.
$refs
.
AddSocial
.
onEdit
(
row
);
this
.
show
=
true
;
},
handleDel
(
id
)
{
this
.
$confirm
({
title
:
"
系统提示
"
,
content
:
"
删除不可恢复,确定要删除吗?
"
,
okText
:
"
确定
"
,
okType
:
"
danger
"
,
cancelText
:
"
取消
"
,
centered
:
true
,
icon
:
"
exclamation-circle
"
,
maskClosable
:
true
,
onOk
:
async
()
=>
{
let
res
=
await
delSocialSet
({
id
});
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
$message
.
success
(
msg
);
this
.
selectedRowKeys
=
[];
this
.
getDataList
();
}
},
onCancel
()
{
console
.
log
(
"
Cancel
"
);
},
});
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.social {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.content {
flex: 1;
padding: 15px;
.control {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
}
</
style
>
base-manager-ui/admin/src/pages/basicset/social/modal/AddSocial.vue
0 → 100644
View file @
852fcaa9
<
template
>
<div>
<a-modal
v-model=
"Visible"
:maskClosable=
"false"
:title=
"title"
@
cancel=
"handleClose"
width=
"45%"
>
<template
slot=
"footer"
>
<a-button
@
click=
"handleReset"
>
重置
</a-button>
<a-button
type=
"primary"
@
click=
"handleOk"
>
确定
</a-button>
</
template
>
<a-form-model
ref=
"ruleForm"
:model=
"formData"
:rules=
"rules"
:label-col=
"{ span: 7 }"
:wrapper-col=
"{ span: 17 }"
>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"接入标识"
prop=
"appid"
>
<a-input
v-model=
"formData.appid"
placeholder=
"请输入接入标识"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"渠道标识"
prop=
"accessKey"
>
<a-input
v-model=
"formData.accessKey"
placeholder=
"请输入渠道标识"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"密钥"
prop=
"privatKey"
>
<a-input
v-model=
"formData.privatKey"
placeholder=
"请输入密钥"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"渠道密钥"
prop=
"key"
>
<a-input
v-model=
"formData.key"
placeholder=
"请输入渠道密钥"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"机具编码"
prop=
"az400"
>
<a-input
v-model=
"formData.az400"
placeholder=
"请输入机具编码"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"机具密钥"
prop=
"sm4key"
>
<a-input
v-model=
"formData.sm4key"
placeholder=
"请输入机具密钥"
/>
</a-form-model-item
></a-col>
</a-row>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"排号认证码"
prop=
"serviceCode"
>
<a-input
v-model=
"formData.serviceCode"
placeholder=
"请输入排号认证码"
/>
</a-form-model-item
></a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"业务认证码"
prop=
"busCode"
>
<a-input
v-model=
"formData.busCode"
placeholder=
"请输入业务认证码"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"12"
><a-form-model-item
label=
"机构名称"
prop=
"orgName"
>
<a-input
v-model=
"formData.orgName"
placeholder=
"请输入机构名称"
/>
</a-form-model-item
></a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"机具使用地址"
prop=
"address"
>
<a-input
v-model=
"formData.address"
placeholder=
"请输入机具使用地址"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"统一社会信用代码"
prop=
"orgCode"
>
<a-input
v-model=
"formData.orgCode"
placeholder=
"请输入统一社会信用代码"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"区域码"
prop=
"regionCode"
>
<a-input
v-model=
"formData.regionCode"
placeholder=
"请输入区域码"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"备注"
prop=
"remark"
>
<a-input
type=
"textarea"
v-model=
"formData.remark"
placeholder=
"请输入备注"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"启用开关"
prop=
"enabled"
>
<YSwitch
v-model=
"formData.enabled"
></YSwitch>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</div>
</template>
<
script
>
import
{
saveSocialSet
}
from
"
@/services/social
"
;
import
YSwitch
from
"
@/components/yswitch/YSwitch.vue
"
;
import
local
from
"
@/utils/local
"
;
export
default
{
props
:
{
title
:
{
required
:
true
,
type
:
String
,
default
:
""
,
},
show
:
{
type
:
Boolean
,
required
:
true
,
default
:
false
,
},
},
components
:
{
YSwitch
,
},
data
()
{
return
{
formData
:
{
siteId
:
local
.
getLocal
(
"
siteId
"
),
appid
:
""
,
// 渠道标识
accessKey
:
""
,
// 接入标识
privatKey
:
""
,
// 密钥
key
:
""
,
// 渠道密钥
az400
:
""
,
// 机具编码
sm4key
:
""
,
// 机具密钥
serviceCode
:
""
,
// 排号认证码
enabled
:
1
,
// 起停用
remark
:
""
,
// 备注
busCode
:
""
,
// 业务认证码
orgName
:
""
,
// 机构名称
address
:
""
,
// 机具使用地址
regionCode
:
""
,
// 区域码
orgCode
:
""
,
// 统一社会信用代码
},
rules
:
{
appid
:
[{
required
:
true
,
message
:
"
请输入渠道标识
"
,
trigger
:
"
blur
"
}],
accessKey
:
[
{
required
:
true
,
message
:
"
请输入接入标识
"
,
trigger
:
"
blur
"
},
],
privatKey
:
[{
required
:
true
,
message
:
"
请输入密钥
"
,
trigger
:
"
blur
"
}],
key
:
[{
required
:
true
,
message
:
"
请输入渠道密钥
"
,
trigger
:
"
blur
"
}],
},
};
},
computed
:
{
Visible
:
{
get
()
{
return
this
.
show
;
},
set
(
val
)
{
this
.
$emit
(
"
update:show
"
,
val
);
},
},
},
methods
:
{
// 新增
onAdd
()
{
Object
.
assign
(
this
.
formData
,
this
.
$options
.
data
().
formData
);
this
.
formData
.
id
&&
this
.
$delete
(
this
.
formData
,
"
id
"
);
},
// 编辑
onEdit
(
data
)
{
this
.
$nextTick
(()
=>
{
this
.
formData
=
{
...
data
};
});
},
// 关闭弹窗
handleClose
()
{
this
.
handleReset
();
this
.
Visible
=
false
;
},
// 保存
handleOk
()
{
this
.
$refs
.
ruleForm
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
let
res
=
await
saveSocialSet
(
this
.
formData
);
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
$message
.
success
(
msg
);
this
.
$emit
(
"
success
"
);
this
.
handleClose
();
}
}
});
},
// 重置
handleReset
()
{
this
.
$refs
.
ruleForm
.
resetFields
();
},
},
};
</
script
>
<
style
lang=
"less"
scoped
></
style
>
base-manager-ui/admin/src/router/config.js
View file @
852fcaa9
...
...
@@ -230,6 +230,14 @@ const options = {
},
component
:
()
=>
import
(
"
@/pages/basicset/sms/configurat
"
),
},
{
path
:
"
/social
"
,
name
:
"
社保配置
"
,
meta
:
{
icon
:
"
contacts
"
,
},
component
:
()
=>
import
(
"
@/pages/basicset/social/Social
"
),
},
{
path
:
"
/appmarket
"
,
...
...
base-manager-ui/admin/src/services/basicsetApi.js
View file @
852fcaa9
...
...
@@ -417,4 +417,12 @@ module.exports = {
save
:
`
${
BASE_URL
}
/base/device/blackapp/save`
,
delete
:
`
${
BASE_URL
}
/base/device/blackapp/delete`
,
},
// 社保管理
social
:
{
list
:
`
${
BASE_URL
}
/base/social/security/set/list`
,
info
:
`
${
BASE_URL
}
/base/social/security/set/info`
,
save
:
`
${
BASE_URL
}
/base/social/security/set/save`
,
batchSave
:
`
${
BASE_URL
}
/base/social/security/set/batchSave`
,
delete
:
`
${
BASE_URL
}
/base/social/security/set/delete`
,
},
};
base-manager-ui/admin/src/services/social.js
0 → 100644
View file @
852fcaa9
import
{
social
}
from
"
@/services/basicsetApi
"
;
import
{
request
,
METHOD
}
from
"
@/utils/request
"
;
// 获取社保配置列表
export
async
function
getSocialSetList
(
data
)
{
return
request
(
social
.
list
,
METHOD
.
POST
,
data
);
}
// 查看社保配置信息
export
async
function
getSocialSetInfo
(
data
)
{
return
request
(
social
.
info
,
METHOD
.
GET
,
data
);
}
// 保存社保配置
export
async
function
saveSocialSet
(
data
)
{
return
request
(
social
.
save
,
METHOD
.
POST
,
data
);
}
// 批量保存社保配置
export
async
function
saveSocialSetBatch
(
data
)
{
return
request
(
social
.
batchSave
,
METHOD
.
POST
,
data
);
}
// 删除社保配置
export
async
function
delSocialSet
(
data
)
{
return
request
(
social
.
delete
,
METHOD
.
GET
,
data
);
}
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