Browse Source

组织增加人员检索功能;

dev
luyan 1 year ago
parent
commit
dba0556a3b
  1. 1188
      src/views/modules/base/organization/organization.vue
  2. 125
      src/views/modules/customer/customize/roleList.vue
  3. 123
      src/views/modules/customer/role.vue
  4. 86
      src/views/modules/home/index.vue
  5. 209
      src/views/modules/productConfig/workRoleAuth.vue
  6. 159
      src/views/modules/workSys/role/role.vue

1188
src/views/modules/base/organization/organization.vue

File diff suppressed because it is too large

125
src/views/modules/customer/customize/roleList.vue

@ -2,93 +2,59 @@
<div class="role-container">
<el-card class="flex1">
<div class="now-name">
当前客户: {{customerName}}
<el-button type="primary"
size="small"
@click="handleSaveSort">保存顺序</el-button>
当前客户: {{ customerName }}
<el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button>
</div>
<el-table ref="roleTable"
v-loading="loading1"
:data="roleList"
row-key="roleId"
border
style="width: 100%">
<el-table-column type="index"
width="50"></el-table-column>
<el-table ref="roleTable" v-loading="loading1" :data="roleList" row-key="roleId" border style="width: 100%">
<el-table-column type="index" width="50"></el-table-column>
<!-- <el-table-column prop="roleId" label="角色ID"></el-table-column> -->
<el-table-column prop="roleName"
label="角色名称"
width="160">
<el-table-column prop="roleName" label="角色名称" width="160">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit"
v-model.trim="scope.row.roleName"
clearable>
<el-input v-if="scope.row.isEdit" v-model.trim="scope.row.roleName" clearable>
</el-input>
<span v-else>{{scope.row.constName}}</span>
<span v-else>{{ scope.row.constName }}</span>
</template>
</el-table-column>
<el-table-column v-if="!funcShow"
prop="roleKey"
label="角色Key"></el-table-column>
<el-table-column v-if="!funcShow" prop="roleKey" label="角色Key"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary"
size="mini"
<el-button type="primary" size="mini"
@click="toOperationConfig(scope.row.roleId, scope.row.roleName)">功能权限</el-button>
<span v-if="scope.row.isEdit"
style="display: inline-block; margin-left: 10px;">
<el-button type="primary"
size="small"
@click="handleSaveChange(scope.row)">保存</el-button>
<el-button size="small"
@click="scope.row.isEdit=false">取消</el-button>
<span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;">
<el-button type="primary" size="small" @click="handleSaveChange(scope.row)">保存</el-button>
<el-button size="small" @click="scope.row.isEdit = false">取消</el-button>
</span>
<el-button v-else
type="primary"
size="mini"
<el-button v-else type="primary" size="mini"
@click="handleChangeName(scope.row)">修改名称</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card v-show="funcShow"
style="flex: 1; margin: 0 10px;">
<div class="now-name">当前角色: {{roleName}}</div>
<el-table v-loading="loading2"
max-height="580"
ref="opeTable"
:data="opeList"
border
style="width: 100%"
<el-card v-show="funcShow" style="flex: 1; margin: 0 10px;">
<div class="now-name">当前角色: {{ roleName }}</div>
<el-table v-loading="loading2" max-height="580" ref="opeTable" :data="opeList" border style="width: 100%"
@select="handleSelectionChange">
<el-table-column type="selection"
width="55"></el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> -->
<el-table-column prop="operationName"
label="操作名称"></el-table-column>
<el-table-column prop="operationName" label="操作名称"></el-table-column>
<!-- <el-table-column prop="brief" label="简介"></el-table-column> -->
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary"
size="small"
<el-button type="primary" size="small"
@click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">权限配置</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card v-show="roleShow"
style="width: 250px;">
<div class="now-name">当前功能: {{funcName}}</div>
<el-card v-show="roleShow" style="width: 250px;">
<div class="now-name">当前功能: {{ funcName }}</div>
<div>
<el-row :gutter="12">
<el-col v-loading="loading3">
<el-card shadow="hover">
<el-checkbox-group class="t"
v-model.trim="checkedScopes"
@change="roleChange">
<el-checkbox v-for="scope in scopeOptions"
:label="scope.scopeKey"
:key="scope.scopeKey">{{scope.scopeName}}</el-checkbox>
<el-checkbox-group class="t" v-model.trim="checkedScopes" @change="roleChange">
<el-checkbox v-for="scope in scopeOptions" :label="scope.scopeKey"
:key="scope.scopeKey">{{ scope.scopeName }}</el-checkbox>
</el-checkbox-group>
</el-card>
</el-col>
@ -123,7 +89,7 @@ export default {
default: ''
}
},
data () {
data() {
return {
loading1: false,
loading2: false,
@ -143,13 +109,13 @@ export default {
roleId: ''
}
},
created () {
created() {
this.listRolesByCustomerId(this.customerId)
},
mounted () {
mounted() {
this.dragRoleSort()
},
beforeDestroy () {
beforeDestroy() {
let _data = this.$data
for (let n in _data) {
if (typeof _data[n] === 'boolean') _data[n] = false
@ -158,7 +124,7 @@ export default {
}
},
methods: {
listRolesByCustomerId (customerId) {
listRolesByCustomerId(customerId) {
this.loading1 = true
this.$http
.post('/epmetuser/govstaffrole/rolesbycustomer/' + customerId)
@ -178,12 +144,12 @@ export default {
}, 500)
})
},
listOperations4AccessConfig (roleId) {
listOperations4AccessConfig(roleId) {
this.roleId = roleId
this.loading2 = true
this.$http.post('/gov/access/config/roleopes/' + roleId).then((resp) => {
this.opeList = resp.data.data
this.$nextTick(function() {
this.$nextTick(function () {
this.defaultCheck() //
})
setTimeout(() => {
@ -191,7 +157,7 @@ export default {
}, 500)
})
},
listSettingOptions (operationKey) {
listSettingOptions(operationKey) {
let params = {
roleId: this.roleId,
operationKey: operationKey
@ -214,7 +180,7 @@ export default {
}, 500)
})
},
defaultCheck () {
defaultCheck() {
for (var index in this.opeList) {
let role = this.opeList[index]
if (role.assigned) {
@ -222,20 +188,20 @@ export default {
}
}
},
toOperationConfig (roleId, roleName) {
toOperationConfig(roleId, roleName) {
this.roleName = roleName
this.funcShow = true
this.opeList = []
this.listOperations4AccessConfig(roleId)
},
toScopeConfig (operationKey, operationName) {
toScopeConfig(operationKey, operationName) {
this.roleShow = true
this.operationKey = operationKey
this.funcName = operationName
this.checkedScopes = []
this.listSettingOptions(operationKey)
},
saveOperations4Role (val) {
saveOperations4Role(val) {
let param = {
roleId: this.roleId,
opes: val,
@ -251,7 +217,7 @@ export default {
}
)
},
saveSettings (val) {
saveSettings(val) {
let param = {
roleId: this.roleId,
operationKey: this.operationKey,
@ -269,16 +235,16 @@ export default {
}
)
},
roleChange (val) {
roleChange(val) {
this.saveSettings(val)
},
handleSelectionChange (val) {
handleSelectionChange(val) {
this.saveOperations4Role(val)
},
handleChangeName (row) {
handleChangeName(row) {
row.isEdit = true
},
handleSaveChange (row) {
handleSaveChange(row) {
let data = {
roleId: row.roleId,
roleName: row.roleName
@ -301,7 +267,7 @@ export default {
}
})
},
dragRoleSort () {
dragRoleSort() {
const el = this.$refs.roleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
this.sortTable = Sortable.create(el, {
group: 'dragTable',
@ -319,7 +285,7 @@ export default {
}
})
},
handleSaveSort () {
handleSaveSort() {
let data = {
roleIdList: this.roleList.map(item => {
return item.roleId
@ -350,15 +316,18 @@ export default {
.role-container {
display: flex;
}
.flex1 {
flex: 1;
}
.now-name {
/* display: flex;
justify-content: space-between; */
margin-bottom: 10px;
}
.aui-wrapper .el-card + .el-card {
.aui-wrapper .el-card+.el-card {
margin-top: 0;
}
</style>

123
src/views/modules/customer/role.vue

@ -5,33 +5,21 @@
当前客户: {{customerName}}
<el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button>
</div> -->
<el-table ref="roleTable"
v-loading="loading1"
:data="roleList"
row-key="roleKey"
border
<el-table ref="roleTable" v-loading="loading1" :data="roleList" row-key="roleKey" border
style="width: 100%">
<el-table-column type="index"
width="50"></el-table-column>
<el-table-column type="index" width="50"></el-table-column>
<!-- <el-table-column prop="roleId" label="角色ID"></el-table-column> -->
<el-table-column prop="roleName"
label="角色名称"
width="160">
<el-table-column prop="roleName" label="角色名称" width="160">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit"
v-model.trim="scope.row.roleName"
clearable>
<el-input v-if="scope.row.isEdit" v-model.trim="scope.row.roleName" clearable>
</el-input>
<span v-else>{{scope.row.constName}}</span>
<span v-else>{{ scope.row.constName }}</span>
</template>
</el-table-column>
<el-table-column v-if="!funcShow"
prop="roleKey"
label="角色Key"></el-table-column>
<el-table-column v-if="!funcShow" prop="roleKey" label="角色Key"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary"
size="mini"
<el-button type="primary" size="mini"
@click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button>
<!-- <span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;">
<el-button type="primary" size="small" @click="handleSaveChange(scope.row)">保存</el-button>
@ -42,61 +30,40 @@
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="funcShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
top="30px"
title="功能列表"
@closed="handleDialogClosed">
<div class="role-flex"
v-if="funcShow">
<el-dialog :visible.sync="funcShow" :close-on-click-modal="false" :close-on-press-escape="false" width="70%"
top="30px" title="功能列表" @closed="handleDialogClosed">
<div class="role-flex" v-if="funcShow">
<el-card class="flex1">
<div class="now-name">当前角色: {{roleName}}</div>
<div class="now-name">当前角色: {{ roleName }}</div>
<div class="now-name">
<el-button type="primary"
size="small"
@click="saveOperations4Role">保存功能</el-button>
<el-button type="primary" size="small" @click="saveOperations4Role">保存功能</el-button>
</div>
<el-table v-loading="loading2"
height="580"
ref="opeTable"
:data="opeList"
border
<el-table v-loading="loading2" height="580" ref="opeTable" :data="opeList" border
@select="handleSelectionChange">
<el-table-column type="selection"
width="55"></el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> -->
<el-table-column prop="operationName"
label="操作名称"></el-table-column>
<el-table-column prop="operationName" label="操作名称"></el-table-column>
<!-- <el-table-column prop="brief" label="简介"></el-table-column> -->
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary"
size="small"
<el-button type="primary" size="small"
@click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">范围配置</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card v-show="roleShow"
style="width: 250px; margin-left: 10px;">
<div class="now-name">当前功能: {{funcName}}</div>
<el-card v-show="roleShow" style="width: 250px; margin-left: 10px;">
<div class="now-name">当前功能: {{ funcName }}</div>
<div class="now-name">
<el-button type="primary"
size="small"
@click="saveSettings">保存范围</el-button>
<el-button type="primary" size="small" @click="saveSettings">保存范围</el-button>
</div>
<div>
<el-row :gutter="12">
<el-col v-loading="loading3">
<el-card shadow="hover">
<el-checkbox-group class="t"
v-model.trim="checkedScopes"
@change="roleChange">
<el-checkbox v-for="scope in scopeOptions"
:label="scope.scopeKey"
:key="scope.scopeKey">{{scope.scopeName}}</el-checkbox>
<el-checkbox-group class="t" v-model.trim="checkedScopes" @change="roleChange">
<el-checkbox v-for="scope in scopeOptions" :label="scope.scopeKey"
:key="scope.scopeKey">{{ scope.scopeName }}</el-checkbox>
</el-checkbox-group>
</el-card>
</el-col>
@ -121,7 +88,7 @@ export default {
default: ''
}
},
data () {
data() {
return {
loading1: false,
loading2: false,
@ -142,13 +109,13 @@ export default {
scopeSection: [] //
}
},
created () {
created() {
this.listRolesByCustomerId()
},
mounted () {
mounted() {
this.dragRoleSort()
},
beforeDestroy () {
beforeDestroy() {
let _data = this.$data
for (let n in _data) {
if (typeof _data[n] === 'boolean') _data[n] = false
@ -157,7 +124,7 @@ export default {
}
},
methods: {
handleDialogClosed () {
handleDialogClosed() {
this.roleName = ''
this.roleKey = ''
this.funcName = ''
@ -166,7 +133,7 @@ export default {
this.funcShow = false
this.roleShow = false
},
listRolesByCustomerId (customerId) {
listRolesByCustomerId(customerId) {
this.loading1 = true
this.$http
.post('/epmetuser/govstaffrole/roletemplates')
@ -186,12 +153,12 @@ export default {
}, 500)
})
},
listOperations4AccessConfig (roleKey) {
listOperations4AccessConfig(roleKey) {
this.roleKey = roleKey
this.loading2 = true
this.$http.post('/gov/access/config/roledefaultops/' + roleKey).then((resp) => {
this.opeList = resp.data.data
this.$nextTick(function() {
this.$nextTick(function () {
this.defaultCheck() //
})
setTimeout(() => {
@ -199,7 +166,7 @@ export default {
}, 500)
})
},
listSettingOptions (operationKey) {
listSettingOptions(operationKey) {
let params = {
roleKey: this.roleKey,
operationKey: operationKey
@ -222,7 +189,7 @@ export default {
}, 500)
})
},
defaultCheck () {
defaultCheck() {
for (var index in this.opeList) {
let role = this.opeList[index]
if (role.assigned) {
@ -230,20 +197,20 @@ export default {
}
}
},
toOperationConfig (roleKey, roleName) {
toOperationConfig(roleKey, roleName) {
this.roleName = roleName
this.funcShow = true
this.opeList = []
this.listOperations4AccessConfig(roleKey)
},
toScopeConfig (operationKey, operationName) {
toScopeConfig(operationKey, operationName) {
this.roleShow = true
this.operationKey = operationKey
this.funcName = operationName
this.checkedScopes = []
this.listSettingOptions(operationKey)
},
saveOperations4Role () {
saveOperations4Role() {
let param = {
roleKey: this.roleKey,
operationKeys: this.operateSection.map(item => item.operationKey)
@ -266,7 +233,7 @@ export default {
}
)
},
saveSettings () {
saveSettings() {
let param = {
roleKey: this.roleKey,
operationKey: this.operationKey,
@ -290,18 +257,18 @@ export default {
}
)
},
roleChange (val) {
roleChange(val) {
this.scopeSection = val
// this.saveSettings(val)
},
handleSelectionChange (val) {
handleSelectionChange(val) {
this.operateSection = val
// this.saveOperations4Role(val)
},
handleChangeName (row) {
handleChangeName(row) {
row.isEdit = true
},
handleSaveChange (row) {
handleSaveChange(row) {
let data = {
roleKey: row.roleKey,
roleName: row.roleName
@ -324,7 +291,7 @@ export default {
}
})
},
dragRoleSort () {
dragRoleSort() {
const el = this.$refs.roleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
this.sortTable = Sortable.create(el, {
group: 'dragTable',
@ -342,7 +309,7 @@ export default {
}
})
},
handleSaveSort () {
handleSaveSort() {
let data = {
roleIdList: this.roleList.map(item => {
return item.roleKey
@ -374,17 +341,21 @@ export default {
.role-flex {
display: flex;
}
.flex1 {
flex: 1;
}
.now-name {
/* display: flex;
justify-content: space-between; */
margin-bottom: 10px;
}
.aui-wrapper .el-card + .el-card {
.aui-wrapper .el-card+.el-card {
margin-top: 0;
}
.role-container .el-dialog__body {
padding: 0 20px 20px;
}

86
src/views/modules/home/index.vue

@ -8,17 +8,20 @@
<span>社区查询</span>
</div> -->
<div class="tabs">
<div :class="{ 'z-on': searchData.type == 'jumin' }" @click="searchDataTab('jumin')">查居民</div>
<div :class="{ 'z-on': searchData.type == 'fangwu' }" @click="searchDataTab('fangwu')">查房屋</div>
<div :class="{ 'z-on': searchData.type == 'jumin' }" @click="searchDataTab('jumin')">查居民
</div>
<div :class="{ 'z-on': searchData.type == 'fangwu' }" @click="searchDataTab('fangwu')">查房屋
</div>
</div>
<div class="search">
<div class="search-input">
<div class="input">
<input type="text" :placeholder="typePlaceholder[searchData.type]" v-model.trim="searchData.searchKey"
@keyup.enter="handleClickSearchBtn" />
<input type="text" :placeholder="typePlaceholder[searchData.type]"
v-model.trim="searchData.searchKey" @keyup.enter="handleClickSearchBtn" />
<div class="close-btn" v-if="searchData.searchKey != ''" @click="searchData.searchKey = ''">
<div class="close-btn" v-if="searchData.searchKey != ''"
@click="searchData.searchKey = ''">
<img src="@/assets/img/shequ/close.png" />
</div>
</div>
@ -39,15 +42,19 @@
</div>
</div>
<div class="boxss">
<div style="margin-top: 10px;" @click="handelClickToResi({residentCategory:'permanentFlag'})">
<span style="color: #2683DB; font-size: 25px;">{{ pandectData.permanentResiCount }}</span>
<div style="margin-top: 10px;"
@click="handelClickToResi({ residentCategory: 'permanentFlag' })">
<span style="color: #2683DB; font-size: 25px;">{{ pandectData.permanentResiCount
}}</span>
<br>
<span style="color: #858585; font-size: 12px;">常住人口</span>
</div>
</div>
<div class="boxss">
<div style="margin-top: 10px;" @click="handelClickToResi({residentCategory:'FLOATING_FLAG'})">
<span style="color: #2683DB; font-size: 25px;">{{ pandectData.floatingResiCount }}</span>
<div style="margin-top: 10px;"
@click="handelClickToResi({ residentCategory: 'FLOATING_FLAG' })">
<span style="color: #2683DB; font-size: 25px;">{{ pandectData.floatingResiCount
}}</span>
<br>
<span style="color: #858585; font-size: 12px;">流动人口</span>
</div>
@ -124,8 +131,9 @@
</div>
<div class="item-title"
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 450px;">
<img v-if="item.msgType == 'resident_category'" class="thumbnail_1" style="width: 17px;"
referrerpolicy="no-referrer" src="~@/assets/images/shuju/renfang/index/zhiding.png" />{{
<img v-if="item.msgType == 'resident_category'" class="thumbnail_1"
style="width: 17px;" referrerpolicy="no-referrer"
src="~@/assets/images/shuju/renfang/index/zhiding.png" />{{
item.content }}
</div>
</div>
@ -144,12 +152,17 @@
</div>
<div class="m-box m-tx" style="position: relative;">
<div class="header" style="display: flex;align-items: center;justify-content: space-between;"> <div class="newqsa"><span >居民信息更新情况</span> <span style="color: #cccccc;">数据截止到{{yesterdayDate}}</span></div> <div class="update-settings" @click="jumpToJuMin()" v-show="showAll"><img referrerpolicy="no-referrer"
src="https://lanhu.oss-cn-beijing.aliyuncs.com/pskhmf0717eflwg54wn73s6spnsg6u48r0f69e94b-2bc8-4156-8330-902087b72e0b" />更新设置</div>
<div class="header" style="display: flex;align-items: center;justify-content: space-between;">
<div class="newqsa"><span>居民信息更新情况</span> <span
style="color: #cccccc;">数据截止到{{ yesterdayDate }}</span></div>
<div class="update-settings" @click="jumpToJuMin()" v-show="showAll"><img
referrerpolicy="no-referrer"
src="https://lanhu.oss-cn-beijing.aliyuncs.com/pskhmf0717eflwg54wn73s6spnsg6u48r0f69e94b-2bc8-4156-8330-902087b72e0b" />更新设置
</div>
<div style="width: 100%;margin-top:26px;overflow-y: scroll; height:calc(100% - 79px);padding-bottom:15px; box-sizing: border-box" >
<el-table :data="tableList"
border :cell-style="columnbackgroundStyle" class="m-table-item">
</div>
<div
style="width: 100%;margin-top:26px;overflow-y: scroll; height:calc(100% - 79px);padding-bottom:15px; box-sizing: border-box">
<el-table :data="tableList" border :cell-style="columnbackgroundStyle" class="m-table-item">
<el-table-column label="居民类别" align="center" width="105">
<template slot-scope="scope">
<span style="color:#989898">{{ scope.row.residentCategoryName }}</span>
@ -157,29 +170,34 @@
</el-table-column>
<el-table-column label="总人数" width="105" align="center">
<template slot-scope="scope">
<span style="color:#006fd6;cursor: pointer;" @click="handelClickToResi(scope.row)">{{scope.row.total}}</span>
<span style="color:#006fd6;cursor: pointer;"
@click="handelClickToResi(scope.row)">{{ scope.row.total }}</span>
</template>
</el-table-column>
<el-table-column label="分类信息不完整数" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span style="color:#ff1200;cursor: pointer;" @click="handelCLickJump(scope.row,'cateNonIntegrity')">{{scope.row.nonIntegratedNum}}</span>
<span style="color:#ff1200;cursor: pointer;"
@click="handelCLickJump(scope.row, 'cateNonIntegrity')">{{ scope.row.nonIntegratedNum }}</span>
</template>
</el-table-column>
<el-table-column label="更新负责人" :show-overflow-tooltip="true" align="center" v-if="showAll">
<template slot-scope="scope">
<span style="color:#989898;">{{scope.row.userName}}</span>
<span style="color:#989898;">{{ scope.row.userName }}</span>
</template>
</el-table-column>
<el-table-column label="更新周期" align="center" width="105">
<template slot-scope="scope">
<span style="color:#989898;">{{ scope.row.updatePeriod ? scope.row.updatePeriod
== 'month' ? '每自然月' : scope.row.updatePeriod == 'halfMonth' ? '每半自然月' : scope.row.updatePeriod
== 'month' ? '每自然月' : scope.row.updatePeriod == 'halfMonth' ? '每半自然月' :
scope.row.updatePeriod
== 'week' ? '每周' : '' : '' }}</span>
</template>
</el-table-column>
<el-table-column label="更新人数" align="center" width="105">
<template slot-scope="scope">
<span style="color:#006fd6;cursor: pointer;" @click="handelCLickJump(scope.row,'updateResiList')">{{scope.row.updateResiNum}}</span><span style="color:#989898;">({{scope.row.updatePeriodName?scope.row.updatePeriodName:'--'}})</span>
<span style="color:#006fd6;cursor: pointer;"
@click="handelCLickJump(scope.row, 'updateResiList')">{{ scope.row.updateResiNum }}</span><span
style="color:#989898;">({{ scope.row.updatePeriodName ? scope.row.updatePeriodName : '--' }})</span>
</template>
</el-table-column>
</el-table>
@ -203,7 +221,7 @@ export default {
data() {
return {
yesterdayDate:null,
yesterdayDate: null,
searchStatus: "ini", //ing over
searchData: {
type: "jumin",
@ -340,7 +358,7 @@ export default {
left: "3%",
right: "4%",
bottom: "13%",
top:'5',
top: '5',
containLabel: true,
},
toolbox: {
@ -462,15 +480,15 @@ export default {
name: '居民详情',
resiId: targetId,
});
}else if(item.msgType == "resident_category"){
} else if (item.msgType == "resident_category") {
this.$router.push({
name: "base-resi",
query: {
category: item.category || null,
type:"residentCategory"
type: "residentCategory"
},
});
} else if(item.msgType == "sys_version_upgrade_publish"){
} else if (item.msgType == "sys_version_upgrade_publish") {
let { targetId } = item
this.$router.push({ path: `notice-version`, query: { version_id: targetId } });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
@ -594,7 +612,7 @@ export default {
this.$message.error(msg);
}
},
handelClickToResi(e){
handelClickToResi(e) {
this.$router.push({
name: "base-resi",
query: {
@ -602,21 +620,21 @@ export default {
},
});
},
handelCLickJump(e,type){
if(type === 'updateResiList'){
handelCLickJump(e, type) {
if (type === 'updateResiList') {
this.$router.push({
path: "base-resi",
query: {
category: e.residentCategory,
type:'updateResi'
type: 'updateResi'
}
});
}else{
} else {
this.$router.push({
path: "/main/base-nonIntResi",
query: {
resiCategory: e.residentCategory,
type:type
type: type
}
});
}
@ -764,7 +782,7 @@ export default {
this.$router.push({
path: "/main/base-nonIntResi",
query: {
type:'cateNonIntegrity',
type: 'cateNonIntegrity',
resiCategory: e.data.extraProperty,
}
});
@ -781,7 +799,7 @@ export default {
<style lang="scss" src="@/assets/scss/modules/index.scss" scoped></style>
<style lang="scss" scoped>
.z-on{
.z-on {
margin-left: 0 !important;
}
</style>

209
src/views/modules/productConfig/workRoleAuth.vue

@ -1,167 +1,98 @@
<template>
<div class="role-container">
<el-card class="flex1">
<el-tabs v-model.trim="activeName"
@tab-click="tabClick"
class="el-tabs">
<el-tab-pane label="工作端"
name="work">
<el-tabs v-model.trim="activeName" @tab-click="tabClick" class="el-tabs">
<el-tab-pane label="工作端" name="work">
<div class="now-name">
上下拖动可改变角色顺序
<el-button type="primary"
size="small"
@click="handleSaveSort">保存顺序</el-button>
<el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button>
</div>
<el-table ref="roleTable"
v-loading="loading1"
:data="roleList"
row-key="roleKey"
border
<el-table ref="roleTable" v-loading="loading1" :data="roleList" row-key="roleKey" border
style="width: 100%">
<el-table-column type="index"
header-align="left"
align="left"
width="50"></el-table-column>
<el-table-column prop="roleName"
label="角色名称"
header-align="left"
align="left"
width="180">
<el-table-column type="index" header-align="left" align="left" width="50"></el-table-column>
<el-table-column prop="roleName" label="角色名称" header-align="left" align="left" width="180">
<template slot-scope="scope">
<el-input v-if="scope.row.isEdit"
v-model.trim="scope.row.roleName"
clearable>
<el-input v-if="scope.row.isEdit" v-model.trim="scope.row.roleName" clearable>
</el-input>
<span v-else>{{scope.row.constName}}</span>
<span v-else>{{ scope.row.constName }}</span>
</template>
</el-table-column>
<el-table-column v-if="!funcShow"
prop="roleKey"
header-align="left"
align="left"
label="角色Key"
<el-table-column v-if="!funcShow" prop="roleKey" header-align="left" align="left" label="角色Key"
width="150"></el-table-column>
<el-table-column prop="description"
label="角色职责"
header-align="left"
align="left">
<el-table-column prop="description" label="角色职责" header-align="left" align="left">
<template slot-scope="scope">
<p style="text-align:left;margin:3px 0"
v-for="(item,index) in scope.row.descriptionList"
:key="index">{{item}}</p>
v-for="(item, index) in scope.row.descriptionList" :key="index">{{ item }}</p>
<!-- <p>{{scope.row.description}}</p> -->
</template>
</el-table-column>
<el-table-column width="450"
label="操作">
<el-table-column width="450" label="操作">
<template slot-scope="scope">
<el-button type="primary"
size="mini"
<el-button type="primary" size="mini"
@click="handelChangeDuty(scope.row)">修改职责</el-button>
<el-button type="primary"
size="mini"
<el-button type="primary" size="mini"
@click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button>
<span v-if="scope.row.isEdit"
style="display: inline-block; margin-left: 10px;">
<el-button type="primary"
size="small"
@click="saveName(scope.row)">保存</el-button>
<el-button size="small"
@click="scope.row.isEdit=false">取消</el-button>
<span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;">
<el-button type="primary" size="small" @click="saveName(scope.row)">保存</el-button>
<el-button size="small" @click="scope.row.isEdit = false">取消</el-button>
</span>
<el-button v-else
type="primary"
size="mini"
<el-button v-else type="primary" size="mini"
@click="handleChangeName(scope.row)">修改名称</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="居民端"
name="resi">
<el-tab-pane label="居民端" name="resi">
</el-tab-pane>
</el-tabs>
</el-card>
<!-- 角色职责弹出框 -->
<el-dialog :visible.sync="dutyShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
title="角色职责"
width="30%"
@closed="handleDutyClosed">
<div class="div_duty"
v-if="dutyShow">
<el-input type="textarea"
:rows="8"
v-model.trim="description"></el-input>
<el-dialog :visible.sync="dutyShow" :close-on-click-modal="false" :close-on-press-escape="false" title="角色职责"
width="30%" @closed="handleDutyClosed">
<div class="div_duty" v-if="dutyShow">
<el-input type="textarea" :rows="8" v-model.trim="description"></el-input>
<div class="div_btn">
<el-button type="primary"
size="small"
@click="updateRole()">保存</el-button>
<el-button size="small"
@click="dutyShow=false">取消</el-button>
<el-button type="primary" size="small" @click="updateRole()">保存</el-button>
<el-button size="small" @click="dutyShow = false">取消</el-button>
</div>
</div>
</el-dialog>
<!-- 功能配置弹出框 -->
<el-dialog :visible.sync="funcShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
top="30px"
title="功能列表"
@closed="handleDialogClosed">
<div class="role-flex"
v-if="funcShow">
<el-dialog :visible.sync="funcShow" :close-on-click-modal="false" :close-on-press-escape="false" width="70%"
top="30px" title="功能列表" @closed="handleDialogClosed">
<div class="role-flex" v-if="funcShow">
<el-card class="flex1">
<div class="now-name">当前角色: {{roleName}}</div>
<div class="now-name">当前角色: {{ roleName }}</div>
<div class="now-name">
<el-button type="primary"
size="small"
@click="saveOperations4Role">保存功能</el-button>
<el-button type="primary" size="small" @click="saveOperations4Role">保存功能</el-button>
</div>
<el-table v-loading="loading2"
height="580"
ref="opeTable"
:data="opeList"
border
<el-table v-loading="loading2" height="580" ref="opeTable" :data="opeList" border
@select="handleSelectionChange">
<el-table-column type="selection"
width="55"></el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> -->
<el-table-column prop="operationName"
label="操作名称"></el-table-column>
<el-table-column prop="operationName" label="操作名称"></el-table-column>
<!-- <el-table-column prop="brief" label="简介"></el-table-column> -->
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary"
size="small"
<el-button type="primary" size="small"
@click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">范围配置</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card v-show="roleShow"
style="width: 250px; margin-left: 10px;">
<div class="now-name">当前功能: {{funcName}}</div>
<el-card v-show="roleShow" style="width: 250px; margin-left: 10px;">
<div class="now-name">当前功能: {{ funcName }}</div>
<div class="now-name">
<el-button type="primary"
size="small"
@click="saveSettings">保存范围</el-button>
<el-button type="primary"
size="small"
@click="toAllClient">同步到所有客户</el-button>
<el-button type="primary" size="small" @click="saveSettings">保存范围</el-button>
<el-button type="primary" size="small" @click="toAllClient">同步到所有客户</el-button>
</div>
<div>
<el-row :gutter="12">
<el-col v-loading="loading3">
<el-card shadow="hover">
<el-checkbox-group class="t"
v-model.trim="checkedScopes"
@change="roleChange">
<el-checkbox v-for="scope in scopeOptions"
:label="scope.scopeKey"
:key="scope.scopeKey">{{scope.scopeName}}</el-checkbox>
<el-checkbox-group class="t" v-model.trim="checkedScopes" @change="roleChange">
<el-checkbox v-for="scope in scopeOptions" :label="scope.scopeKey"
:key="scope.scopeKey">{{ scope.scopeName }}</el-checkbox>
</el-checkbox-group>
</el-card>
</el-col>
@ -187,7 +118,7 @@ export default {
default: ''
}
},
data () {
data() {
return {
activeName: "work",
loading1: false,
@ -215,13 +146,13 @@ export default {
scopeSection: [] //
}
},
created () {
created() {
this.listRoles()
},
mounted () {
mounted() {
this.dragRoleSort()
},
beforeDestroy () {
beforeDestroy() {
let _data = this.$data
for (let n in _data) {
if (typeof _data[n] === 'boolean') _data[n] = false
@ -230,10 +161,10 @@ export default {
}
},
methods: {
tabClick () {
tabClick() {
},
//
listRoles () {
listRoles() {
this.loading1 = true
this.$http
.post('/epmetuser/govstaffrole/roletemplates')
@ -255,30 +186,30 @@ export default {
})
},
//
handleDutyClosed () {
handleDutyClosed() {
this.selRoleId = ''
this.roleName = ''
this.description = ''
this.dutyShow = false
},
//
handelChangeDuty (row) {
handelChangeDuty(row) {
this.selRoleId = row.id
this.description = row.description
this.roleName = row.roleName
this.dutyShow = true
},
handleChangeName (row) {
handleChangeName(row) {
row.isEdit = true
},
saveName (row) {
saveName(row) {
this.selRoleId = row.id
this.description = row.description
this.roleName = row.roleName
this.updateRole()
},
//
async updateRole () {
async updateRole() {
console.log(this.description)
const url = "/epmetuser/govstaffrole/updatedefaultrole"
const params = {
@ -295,7 +226,7 @@ export default {
}
},
//
async toAllClient () {
async toAllClient() {
const url = "/gov/access/config/add-ope-and-scopes-4role/by-default-conf"
const params = {
roleKey: this.roleKey,
@ -309,7 +240,7 @@ export default {
}
},
//
handleDialogClosed () {
handleDialogClosed() {
this.roleName = ''
this.roleKey = ''
this.funcName = ''
@ -319,18 +250,18 @@ export default {
this.roleShow = false
},
//
toOperationConfig (roleKey, roleName) {
toOperationConfig(roleKey, roleName) {
this.roleName = roleName
this.funcShow = true
this.opeList = []
this.listOperations4AccessConfig(roleKey)
},
listOperations4AccessConfig (roleKey) {
listOperations4AccessConfig(roleKey) {
this.roleKey = roleKey
this.loading2 = true
this.$http.post('/gov/access/config/roledefaultops/' + roleKey).then((resp) => {
this.opeList = resp.data.data
this.$nextTick(function() {
this.$nextTick(function () {
this.defaultCheck() //
})
setTimeout(() => {
@ -338,7 +269,7 @@ export default {
}, 500)
})
},
listSettingOptions (operationKey) {
listSettingOptions(operationKey) {
let params = {
roleKey: this.roleKey,
operationKey: operationKey
@ -360,7 +291,7 @@ export default {
}, 500)
})
},
defaultCheck () {
defaultCheck() {
for (var index in this.opeList) {
let role = this.opeList[index]
if (role.assigned) {
@ -368,14 +299,14 @@ export default {
}
}
},
toScopeConfig (operationKey, operationName) {
toScopeConfig(operationKey, operationName) {
this.roleShow = true
this.operationKey = operationKey
this.funcName = operationName
this.checkedScopes = []
this.listSettingOptions(operationKey)
},
saveOperations4Role () {
saveOperations4Role() {
let param = {
roleKey: this.roleKey,
operationKeys: this.operateSection.map(item => item.operationKey)
@ -398,7 +329,7 @@ export default {
}
)
},
saveSettings () {
saveSettings() {
let param = {
roleKey: this.roleKey,
operationKey: this.operationKey,
@ -422,15 +353,15 @@ export default {
}
)
},
roleChange (val) {
roleChange(val) {
this.scopeSection = val
// this.saveSettings(val)
},
handleSelectionChange (val) {
handleSelectionChange(val) {
this.operateSection = val
// this.saveOperations4Role(val)
},
dragRoleSort () {
dragRoleSort() {
const el = this.$refs.roleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
this.sortTable = Sortable.create(el, {
group: 'dragTable',
@ -448,7 +379,7 @@ export default {
}
})
},
handleSaveSort () {
handleSaveSort() {
let data = {
roleIdList: this.roleList.map(item => {
return item.id
@ -480,24 +411,30 @@ export default {
.role-flex {
display: flex;
}
.flex1 {
flex: 1;
}
.now-name {
/* display: flex;
justify-content: space-between; */
margin-bottom: 10px;
}
.aui-wrapper .el-card + .el-card {
.aui-wrapper .el-card+.el-card {
margin-top: 0;
}
.role-container .el-dialog__body {
padding: 0 20px 20px;
}
.div_duty {
height: 300px;
position: relative;
}
.div_btn {
position: absolute;
bottom: 30px;

159
src/views/modules/workSys/role/role.vue

@ -1,16 +1,9 @@
<template>
<div class="g-main">
<div class="m-search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'110px'">
<el-form-item label="角色名称"
prop="name">
<el-input v-model.trim="formData.name"
size="small"
class="list_item_width_1"
clearable
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'110px'">
<el-form-item label="角色名称" prop="name">
<el-input v-model.trim="formData.name" size="small" class="list_item_width_1" clearable
placeholder="请输入角色名称">
</el-input>
</el-form-item>
@ -26,114 +19,56 @@
placeholder="创建时间">
</el-date-picker>
</el-form-item> -->
<el-button style="margin-left:10px"
size="small"
class="diy-button--add"
<el-button style="margin-left:10px" size="small" class="diy-button--add"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:30px"
size="small"
class="diy-button--white"
<el-button style="margin-left:30px" size="small" class="diy-button--white"
@click="resetSearch">重置</el-button>
</el-form>
</div>
<div class="m-table">
<div class="div_btn">
<el-button class="diy-button--add"
size="small"
@click="handleAdd">新增</el-button>
<el-button class="diy-button--add" size="small" @click="handleAdd">新增</el-button>
</div>
<el-table class="table"
ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
<el-table class="table" ref="ref_table" :data="tableData" border :height="tableHeight"
v-loading="tableLoading" style="width: 100%">
<el-table-column label="序号" header-align="center" align="center" type="index"
width="50"></el-table-column>
<el-table-column prop="name"
header-align="center"
align="center"
label="角色名称"
min-width="100">
<el-table-column prop="name" header-align="center" align="center" label="角色名称" min-width="100">
</el-table-column>
<el-table-column prop="defaultRole"
header-align="center"
align="center"
label="默认角色"
in-width="30">
<el-table-column prop="defaultRole" header-align="center" align="center" label="默认角色" in-width="30">
<template slot-scope="scope">
{{ scope.row.defaultRole == '0' ? 'X' : '√' }}
</template>
</el-table-column>
<el-table-column prop="levelName"
header-align="center"
align="center"
label="级别"
in-width="30">
<el-table-column prop="levelName" header-align="center" align="center" label="级别" in-width="30">
</el-table-column>
<el-table-column prop="remark"
header-align="center"
align="center"
label="备注"
min-width="110">
<el-table-column prop="remark" header-align="center" align="center" label="备注" min-width="110">
</el-table-column>
<el-table-column prop="createdTime"
header-align="center"
align="center"
label="创建时间"
min-width="170">
<el-table-column prop="createdTime" header-align="center" align="center" label="创建时间" min-width="170">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="140"
header-align="center"
align="center"
<el-table-column label="操作" fixed="right" width="140" header-align="center" align="center"
class="operate">
<template slot-scope="scope">
<el-button v-if="true"
type="text"
class="div-table-button--detail"
size="small"
<el-button v-if="true" type="text" class="div-table-button--detail" size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text"
class="div-table-button--edit"
size="small"
<el-button type="text" class="div-table-button--edit" size="small"
@click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="scope.row.defaultRole!=='1'"
type="text"
class="div-table-button--delete "
size="small"
@click="handleDelete(scope.row)">删除</el-button>
<el-button v-if="scope.row.defaultRole !== '1'" type="text" class="div-table-button--delete "
size="small" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="pageNo" :page-sizes="[20, 50, 100, 200]" :page-size="pageSize"
layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<role-form ref="ref_form"
@dialogCancle="diaClose"
@dialogOk="addFormOk"></role-form>
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="850px" top="5vh" class="dialog-h" @closed="diaClose">
<role-form ref="ref_form" @dialogCancle="diaClose" @dialogOk="addFormOk"></role-form>
</el-dialog>
</div>
</template>
@ -144,11 +79,11 @@ import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
data() {
return {
loading: false,
total: 0,
pageSize:window.localStorage.getItem('pageSize') || 20,
pageSize: window.localStorage.getItem('pageSize') || 20,
pageNo: 0,
tableLoading: false,
isResiUser: true,
@ -167,25 +102,25 @@ export default {
components: {
roleForm
},
async created () {
async created() {
},
async mounted () {
async mounted() {
const { user } = this.$store.state
this.agencyId = user.agencyId
await this.loadTable()
},
activated () {
activated() {
this.$refs['ref_table'].doLayout()
},
methods: {
async handleSearch () {
async handleSearch() {
this.isResiUser = this.formData.orgType === 'current'
await this.loadTable()
this.$nextTick(() => {
this.$refs.ref_table.doLayout() //
})
},
async loadTable () {
async loadTable() {
this.tableLoading = true
const url = "/gov/access/govrole/page"
let params = {
@ -202,7 +137,7 @@ export default {
}
this.tableLoading = false
},
handleTimeChange (time) {
handleTimeChange(time) {
if (time) {
this.formData.startTime = time[0]
this.formData.endTime = time[1]
@ -211,36 +146,36 @@ export default {
this.formData.endTime = ''
}
},
diaClose () {
diaClose() {
this.$refs.ref_form.resetData()
this.formShow = false
},
handleAdd () {
handleAdd() {
this.formTitle = '新增'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('add', null)
})
},
handleEdit (row) {
handleEdit(row) {
this.formTitle = '修改'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row.id, row.defaultRole)
})
},
handleDetail (row) {
handleDetail(row) {
this.formTitle = '详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row.id)
})
},
addFormOk () {
addFormOk() {
this.formShow = false
this.loadTable()
},
async handleDelete (row) {
async handleDelete(row) {
let message = '确认删除?'
this.$confirm(message, "提示", {
confirmButtonText: "确定",
@ -253,7 +188,7 @@ export default {
.catch(err => {
});
},
async deleteRole (row) {
async deleteRole(row) {
const url = "/gov/access/govrole/del"
let params = [row.id]
const { data, code, msg } = await requestPost(url, params)
@ -268,24 +203,24 @@ export default {
}
},
//
resetSearch () {
resetSearch() {
this.formData = {
name: '',//
}
this.pageNo = 0
this.loadTable()
},
handleSizeChange (val) {
handleSizeChange(val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
handleCurrentChange(val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
@ -293,7 +228,7 @@ export default {
})
},
//
endLoading () {
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
@ -301,7 +236,7 @@ export default {
}
},
computed: {
tableHeight () {
tableHeight() {
return this.$store.state.inIframe ? this.clientHeight - 360 + this.iframeHeight : this.clientHeight - 360
},
...mapGetters(['clientHeight', 'iframeHeight'])
@ -312,6 +247,6 @@ export default {
}
}
</script>
<style lang="scss" scoped >
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/epidemic.scss";
</style>

Loading…
Cancel
Save