3 changed files with 152 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 获取菜单 分页列表
|
|||
export function getList(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysuserdefaultorg/getList', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 新增插件
|
|||
export function saveOrUpdate(data) { |
|||
return request({ |
|||
url: '/portal/v1/sysuserdefaultorg/saveOrUpdate', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
} |
@ -0,0 +1,119 @@ |
|||
<template> |
|||
<div class="content"> |
|||
<div class="right_cont"> |
|||
<table class="tishi" cellspacing="0" style="margin:0 auto 30px"> |
|||
<tr> |
|||
<td style="border-right: none;">设置默认组织机构</td> |
|||
<td> |
|||
<el-select v-model="formobj.orgNamePath" filterable placeholder="请选择" @change="changeoOrgNamePath" clearable> |
|||
<el-option v-for="item in orgNamePath_list" :key="item.orgSidPath" :label="item.orgNamePath" :value="item.orgNamePath"/> |
|||
</el-select> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<span slot="footer" class="dialog-footer" style="margin-left:40%;"> |
|||
<el-button style=" margin-left: 8%; width: 100px;height: 40px;" type="primary" @click="handleConfirm()">确认</el-button> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getList, saveOrUpdate } from '@/api/system/personalization/personalization' |
|||
|
|||
export default { |
|||
name: 'personalization', |
|||
data() { |
|||
return { |
|||
orgNamePath_list: [], |
|||
formobj: { |
|||
orgSidPath: '', |
|||
orgNamePath: '', |
|||
stafforgSid: '', |
|||
userSid: '' |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.init() |
|||
}, |
|||
methods: { |
|||
init() { |
|||
getList({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.orgNamePath = res.data.orgNamePath |
|||
this.formobj.orgSidPath = res.data.orgSidPath |
|||
this.orgNamePath_list = res.data.list |
|||
} |
|||
}) |
|||
}, |
|||
changeoOrgNamePath(value) { |
|||
const choose = this.orgNamePath_list.filter((item) => item.orgNamePath === value) |
|||
this.formobj.orgSidPath = choose[0].orgSidPath |
|||
this.formobj.staffOrgSid = choose[0].staffOrgSid |
|||
}, |
|||
handleConfirm() { |
|||
if (this.formobj.orgNamePath === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '默认组织机构不能为空' }) |
|||
return |
|||
} |
|||
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|||
saveOrUpdate(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '操作成功' }) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped="scoped" lang="scss"> |
|||
|
|||
.content { |
|||
width: 100%; |
|||
padding-top: 10px; |
|||
font-size: 16px; |
|||
color: #fff; |
|||
box-sizing: border-box; |
|||
} |
|||
.right_cont { |
|||
width: 100%; |
|||
height: 645px; |
|||
background-color: #fff; |
|||
margin: 0; |
|||
padding: 15px; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
.tishi { |
|||
width: 560px; |
|||
color: #000; |
|||
padding-left: 1.5%; |
|||
margin-bottom: 50px; |
|||
|
|||
tr { |
|||
height: 70px; |
|||
} |
|||
|
|||
td { |
|||
border: 1px solid #e6e9f0; |
|||
text-align: center; |
|||
} |
|||
|
|||
td:first-child { |
|||
background-color: #f7f9fc; |
|||
} |
|||
|
|||
.el-input, |
|||
input { |
|||
width: 80%; |
|||
} |
|||
|
|||
span { |
|||
font-size: 26px; |
|||
color: red; |
|||
margin-left: 10px; |
|||
} |
|||
} |
|||
</style> |
Loading…
Reference in new issue