Browse Source

组织增加人员检索功能;

dev
luyan 1 year ago
parent
commit
dba0556a3b
  1. 954
      src/views/modules/base/organization/organization.vue
  2. 75
      src/views/modules/customer/customize/roleList.vue
  3. 73
      src/views/modules/customer/role.vue
  4. 58
      src/views/modules/home/index.vue
  5. 149
      src/views/modules/productConfig/workRoleAuth.vue
  6. 115
      src/views/modules/workSys/role/role.vue

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

File diff suppressed because it is too large

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

@ -3,91 +3,57 @@
<el-card class="flex1"> <el-card class="flex1">
<div class="now-name"> <div class="now-name">
当前客户: {{ customerName }} 当前客户: {{ customerName }}
<el-button type="primary" <el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button>
size="small"
@click="handleSaveSort">保存顺序</el-button>
</div> </div>
<el-table ref="roleTable" <el-table ref="roleTable" v-loading="loading1" :data="roleList" row-key="roleId" border style="width: 100%">
v-loading="loading1" <el-table-column type="index" width="50"></el-table-column>
: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="roleId" label="角色ID"></el-table-column> -->
<el-table-column prop="roleName" <el-table-column prop="roleName" label="角色名称" width="160">
label="角色名称"
width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.isEdit" <el-input v-if="scope.row.isEdit" v-model.trim="scope.row.roleName" clearable>
v-model.trim="scope.row.roleName"
clearable>
</el-input> </el-input>
<span v-else>{{ scope.row.constName }}</span> <span v-else>{{ scope.row.constName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!funcShow" <el-table-column v-if="!funcShow" prop="roleKey" label="角色Key"></el-table-column>
prop="roleKey"
label="角色Key"></el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" <el-button type="primary" size="mini"
size="mini"
@click="toOperationConfig(scope.row.roleId, scope.row.roleName)">功能权限</el-button> @click="toOperationConfig(scope.row.roleId, scope.row.roleName)">功能权限</el-button>
<span v-if="scope.row.isEdit" <span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;">
style="display: inline-block; margin-left: 10px;"> <el-button type="primary" size="small" @click="handleSaveChange(scope.row)">保存</el-button>
<el-button type="primary" <el-button size="small" @click="scope.row.isEdit = false">取消</el-button>
size="small"
@click="handleSaveChange(scope.row)">保存</el-button>
<el-button size="small"
@click="scope.row.isEdit=false">取消</el-button>
</span> </span>
<el-button v-else <el-button v-else type="primary" size="mini"
type="primary"
size="mini"
@click="handleChangeName(scope.row)">修改名称</el-button> @click="handleChangeName(scope.row)">修改名称</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card v-show="funcShow" <el-card v-show="funcShow" style="flex: 1; margin: 0 10px;">
style="flex: 1; margin: 0 10px;">
<div class="now-name">当前角色: {{ roleName }}</div> <div class="now-name">当前角色: {{ roleName }}</div>
<el-table v-loading="loading2" <el-table v-loading="loading2" max-height="580" ref="opeTable" :data="opeList" border style="width: 100%"
max-height="580"
ref="opeTable"
:data="opeList"
border
style="width: 100%"
@select="handleSelectionChange"> @select="handleSelectionChange">
<el-table-column type="selection" <el-table-column type="selection" width="55"></el-table-column>
width="55"></el-table-column>
<!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> --> <!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> -->
<el-table-column prop="operationName" <el-table-column prop="operationName" label="操作名称"></el-table-column>
label="操作名称"></el-table-column>
<!-- <el-table-column prop="brief" label="简介"></el-table-column> --> <!-- <el-table-column prop="brief" label="简介"></el-table-column> -->
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" <el-button type="primary" size="small"
size="small"
@click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">权限配置</el-button> @click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">权限配置</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card v-show="roleShow" <el-card v-show="roleShow" style="width: 250px;">
style="width: 250px;">
<div class="now-name">当前功能: {{ funcName }}</div> <div class="now-name">当前功能: {{ funcName }}</div>
<div> <div>
<el-row :gutter="12"> <el-row :gutter="12">
<el-col v-loading="loading3"> <el-col v-loading="loading3">
<el-card shadow="hover"> <el-card shadow="hover">
<el-checkbox-group class="t" <el-checkbox-group class="t" v-model.trim="checkedScopes" @change="roleChange">
v-model.trim="checkedScopes" <el-checkbox v-for="scope in scopeOptions" :label="scope.scopeKey"
@change="roleChange">
<el-checkbox v-for="scope in scopeOptions"
:label="scope.scopeKey"
:key="scope.scopeKey">{{ scope.scopeName }}</el-checkbox> :key="scope.scopeKey">{{ scope.scopeName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-card> </el-card>
@ -350,14 +316,17 @@ export default {
.role-container { .role-container {
display: flex; display: flex;
} }
.flex1 { .flex1 {
flex: 1; flex: 1;
} }
.now-name { .now-name {
/* display: flex; /* display: flex;
justify-content: space-between; */ justify-content: space-between; */
margin-bottom: 10px; margin-bottom: 10px;
} }
.aui-wrapper .el-card+.el-card { .aui-wrapper .el-card+.el-card {
margin-top: 0; margin-top: 0;
} }

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

@ -5,33 +5,21 @@
当前客户: {{customerName}} 当前客户: {{customerName}}
<el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button> <el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button>
</div> --> </div> -->
<el-table ref="roleTable" <el-table ref="roleTable" v-loading="loading1" :data="roleList" row-key="roleKey" border
v-loading="loading1"
:data="roleList"
row-key="roleKey"
border
style="width: 100%"> style="width: 100%">
<el-table-column type="index" <el-table-column type="index" width="50"></el-table-column>
width="50"></el-table-column>
<!-- <el-table-column prop="roleId" label="角色ID"></el-table-column> --> <!-- <el-table-column prop="roleId" label="角色ID"></el-table-column> -->
<el-table-column prop="roleName" <el-table-column prop="roleName" label="角色名称" width="160">
label="角色名称"
width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.isEdit" <el-input v-if="scope.row.isEdit" v-model.trim="scope.row.roleName" clearable>
v-model.trim="scope.row.roleName"
clearable>
</el-input> </el-input>
<span v-else>{{ scope.row.constName }}</span> <span v-else>{{ scope.row.constName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!funcShow" <el-table-column v-if="!funcShow" prop="roleKey" label="角色Key"></el-table-column>
prop="roleKey"
label="角色Key"></el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" <el-button type="primary" size="mini"
size="mini"
@click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button> @click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button>
<!-- <span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;"> <!-- <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 type="primary" size="small" @click="handleSaveChange(scope.row)">保存</el-button>
@ -42,60 +30,39 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-dialog :visible.sync="funcShow" <el-dialog :visible.sync="funcShow" :close-on-click-modal="false" :close-on-press-escape="false" width="70%"
:close-on-click-modal="false" top="30px" title="功能列表" @closed="handleDialogClosed">
:close-on-press-escape="false" <div class="role-flex" v-if="funcShow">
width="70%"
top="30px"
title="功能列表"
@closed="handleDialogClosed">
<div class="role-flex"
v-if="funcShow">
<el-card class="flex1"> <el-card class="flex1">
<div class="now-name">当前角色: {{ roleName }}</div> <div class="now-name">当前角色: {{ roleName }}</div>
<div class="now-name"> <div class="now-name">
<el-button type="primary" <el-button type="primary" size="small" @click="saveOperations4Role">保存功能</el-button>
size="small"
@click="saveOperations4Role">保存功能</el-button>
</div> </div>
<el-table v-loading="loading2" <el-table v-loading="loading2" height="580" ref="opeTable" :data="opeList" border
height="580"
ref="opeTable"
:data="opeList"
border
@select="handleSelectionChange"> @select="handleSelectionChange">
<el-table-column type="selection" <el-table-column type="selection" width="55"></el-table-column>
width="55"></el-table-column>
<!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> --> <!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> -->
<el-table-column prop="operationName" <el-table-column prop="operationName" label="操作名称"></el-table-column>
label="操作名称"></el-table-column>
<!-- <el-table-column prop="brief" label="简介"></el-table-column> --> <!-- <el-table-column prop="brief" label="简介"></el-table-column> -->
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" <el-button type="primary" size="small"
size="small"
@click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">范围配置</el-button> @click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">范围配置</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card v-show="roleShow" <el-card v-show="roleShow" style="width: 250px; margin-left: 10px;">
style="width: 250px; margin-left: 10px;">
<div class="now-name">当前功能: {{ funcName }}</div> <div class="now-name">当前功能: {{ funcName }}</div>
<div class="now-name"> <div class="now-name">
<el-button type="primary" <el-button type="primary" size="small" @click="saveSettings">保存范围</el-button>
size="small"
@click="saveSettings">保存范围</el-button>
</div> </div>
<div> <div>
<el-row :gutter="12"> <el-row :gutter="12">
<el-col v-loading="loading3"> <el-col v-loading="loading3">
<el-card shadow="hover"> <el-card shadow="hover">
<el-checkbox-group class="t" <el-checkbox-group class="t" v-model.trim="checkedScopes" @change="roleChange">
v-model.trim="checkedScopes" <el-checkbox v-for="scope in scopeOptions" :label="scope.scopeKey"
@change="roleChange">
<el-checkbox v-for="scope in scopeOptions"
:label="scope.scopeKey"
:key="scope.scopeKey">{{ scope.scopeName }}</el-checkbox> :key="scope.scopeKey">{{ scope.scopeName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-card> </el-card>
@ -374,17 +341,21 @@ export default {
.role-flex { .role-flex {
display: flex; display: flex;
} }
.flex1 { .flex1 {
flex: 1; flex: 1;
} }
.now-name { .now-name {
/* display: flex; /* display: flex;
justify-content: space-between; */ justify-content: space-between; */
margin-bottom: 10px; margin-bottom: 10px;
} }
.aui-wrapper .el-card+.el-card { .aui-wrapper .el-card+.el-card {
margin-top: 0; margin-top: 0;
} }
.role-container .el-dialog__body { .role-container .el-dialog__body {
padding: 0 20px 20px; padding: 0 20px 20px;
} }

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

@ -8,17 +8,20 @@
<span>社区查询</span> <span>社区查询</span>
</div> --> </div> -->
<div class="tabs"> <div class="tabs">
<div :class="{ 'z-on': searchData.type == 'jumin' }" @click="searchDataTab('jumin')">查居民</div> <div :class="{ 'z-on': searchData.type == 'jumin' }" @click="searchDataTab('jumin')">查居民
<div :class="{ 'z-on': searchData.type == 'fangwu' }" @click="searchDataTab('fangwu')">查房屋</div> </div>
<div :class="{ 'z-on': searchData.type == 'fangwu' }" @click="searchDataTab('fangwu')">查房屋
</div>
</div> </div>
<div class="search"> <div class="search">
<div class="search-input"> <div class="search-input">
<div class="input"> <div class="input">
<input type="text" :placeholder="typePlaceholder[searchData.type]" v-model.trim="searchData.searchKey" <input type="text" :placeholder="typePlaceholder[searchData.type]"
@keyup.enter="handleClickSearchBtn" /> 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" /> <img src="@/assets/img/shequ/close.png" />
</div> </div>
</div> </div>
@ -39,15 +42,19 @@
</div> </div>
</div> </div>
<div class="boxss"> <div class="boxss">
<div style="margin-top: 10px;" @click="handelClickToResi({residentCategory:'permanentFlag'})"> <div style="margin-top: 10px;"
<span style="color: #2683DB; font-size: 25px;">{{ pandectData.permanentResiCount }}</span> @click="handelClickToResi({ residentCategory: 'permanentFlag' })">
<span style="color: #2683DB; font-size: 25px;">{{ pandectData.permanentResiCount
}}</span>
<br> <br>
<span style="color: #858585; font-size: 12px;">常住人口</span> <span style="color: #858585; font-size: 12px;">常住人口</span>
</div> </div>
</div> </div>
<div class="boxss"> <div class="boxss">
<div style="margin-top: 10px;" @click="handelClickToResi({residentCategory:'FLOATING_FLAG'})"> <div style="margin-top: 10px;"
<span style="color: #2683DB; font-size: 25px;">{{ pandectData.floatingResiCount }}</span> @click="handelClickToResi({ residentCategory: 'FLOATING_FLAG' })">
<span style="color: #2683DB; font-size: 25px;">{{ pandectData.floatingResiCount
}}</span>
<br> <br>
<span style="color: #858585; font-size: 12px;">流动人口</span> <span style="color: #858585; font-size: 12px;">流动人口</span>
</div> </div>
@ -124,8 +131,9 @@
</div> </div>
<div class="item-title" <div class="item-title"
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 450px;"> 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;" <img v-if="item.msgType == 'resident_category'" class="thumbnail_1"
referrerpolicy="no-referrer" src="~@/assets/images/shuju/renfang/index/zhiding.png" />{{ style="width: 17px;" referrerpolicy="no-referrer"
src="~@/assets/images/shuju/renfang/index/zhiding.png" />{{
item.content }} item.content }}
</div> </div>
</div> </div>
@ -144,12 +152,17 @@
</div> </div>
<div class="m-box m-tx" style="position: relative;"> <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" <div class="header" style="display: flex;align-items: center;justify-content: space-between;">
src="https://lanhu.oss-cn-beijing.aliyuncs.com/pskhmf0717eflwg54wn73s6spnsg6u48r0f69e94b-2bc8-4156-8330-902087b72e0b" />更新设置</div> <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> </div>
<div style="width: 100%;margin-top:26px;overflow-y: scroll; height:calc(100% - 79px);padding-bottom:15px; box-sizing: border-box" > <div
<el-table :data="tableList" style="width: 100%;margin-top:26px;overflow-y: scroll; height:calc(100% - 79px);padding-bottom:15px; box-sizing: border-box">
border :cell-style="columnbackgroundStyle" class="m-table-item"> <el-table :data="tableList" border :cell-style="columnbackgroundStyle" class="m-table-item">
<el-table-column label="居民类别" align="center" width="105"> <el-table-column label="居民类别" align="center" width="105">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color:#989898">{{ scope.row.residentCategoryName }}</span> <span style="color:#989898">{{ scope.row.residentCategoryName }}</span>
@ -157,12 +170,14 @@
</el-table-column> </el-table-column>
<el-table-column label="总人数" width="105" align="center"> <el-table-column label="总人数" width="105" align="center">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="分类信息不完整数" align="center" :show-overflow-tooltip="true"> <el-table-column label="分类信息不完整数" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新负责人" :show-overflow-tooltip="true" align="center" v-if="showAll"> <el-table-column label="更新负责人" :show-overflow-tooltip="true" align="center" v-if="showAll">
@ -173,13 +188,16 @@
<el-table-column label="更新周期" align="center" width="105"> <el-table-column label="更新周期" align="center" width="105">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color:#989898;">{{ scope.row.updatePeriod ? scope.row.updatePeriod <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> == 'week' ? '每周' : '' : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新人数" align="center" width="105"> <el-table-column label="更新人数" align="center" width="105">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

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

@ -1,166 +1,97 @@
<template> <template>
<div class="role-container"> <div class="role-container">
<el-card class="flex1"> <el-card class="flex1">
<el-tabs v-model.trim="activeName" <el-tabs v-model.trim="activeName" @tab-click="tabClick" class="el-tabs">
@tab-click="tabClick" <el-tab-pane label="工作端" name="work">
class="el-tabs">
<el-tab-pane label="工作端"
name="work">
<div class="now-name"> <div class="now-name">
上下拖动可改变角色顺序 上下拖动可改变角色顺序
<el-button type="primary" <el-button type="primary" size="small" @click="handleSaveSort">保存顺序</el-button>
size="small"
@click="handleSaveSort">保存顺序</el-button>
</div> </div>
<el-table ref="roleTable" <el-table ref="roleTable" v-loading="loading1" :data="roleList" row-key="roleKey" border
v-loading="loading1"
:data="roleList"
row-key="roleKey"
border
style="width: 100%"> style="width: 100%">
<el-table-column type="index" <el-table-column type="index" header-align="left" align="left" width="50"></el-table-column>
header-align="left" <el-table-column prop="roleName" label="角色名称" header-align="left" align="left" width="180">
align="left"
width="50"></el-table-column>
<el-table-column prop="roleName"
label="角色名称"
header-align="left"
align="left"
width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.isEdit" <el-input v-if="scope.row.isEdit" v-model.trim="scope.row.roleName" clearable>
v-model.trim="scope.row.roleName"
clearable>
</el-input> </el-input>
<span v-else>{{ scope.row.constName }}</span> <span v-else>{{ scope.row.constName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!funcShow" <el-table-column v-if="!funcShow" prop="roleKey" header-align="left" align="left" label="角色Key"
prop="roleKey"
header-align="left"
align="left"
label="角色Key"
width="150"></el-table-column> width="150"></el-table-column>
<el-table-column prop="description" <el-table-column prop="description" label="角色职责" header-align="left" align="left">
label="角色职责"
header-align="left"
align="left">
<template slot-scope="scope"> <template slot-scope="scope">
<p style="text-align:left;margin:3px 0" <p style="text-align:left;margin:3px 0"
v-for="(item,index) in scope.row.descriptionList" v-for="(item, index) in scope.row.descriptionList" :key="index">{{ item }}</p>
:key="index">{{item}}</p>
<!-- <p>{{scope.row.description}}</p> --> <!-- <p>{{scope.row.description}}</p> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="450" <el-table-column width="450" label="操作">
label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" <el-button type="primary" size="mini"
size="mini"
@click="handelChangeDuty(scope.row)">修改职责</el-button> @click="handelChangeDuty(scope.row)">修改职责</el-button>
<el-button type="primary" <el-button type="primary" size="mini"
size="mini"
@click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button> @click="toOperationConfig(scope.row.roleKey, scope.row.roleName)">功能权限</el-button>
<span v-if="scope.row.isEdit" <span v-if="scope.row.isEdit" style="display: inline-block; margin-left: 10px;">
style="display: inline-block; margin-left: 10px;"> <el-button type="primary" size="small" @click="saveName(scope.row)">保存</el-button>
<el-button type="primary" <el-button size="small" @click="scope.row.isEdit = false">取消</el-button>
size="small"
@click="saveName(scope.row)">保存</el-button>
<el-button size="small"
@click="scope.row.isEdit=false">取消</el-button>
</span> </span>
<el-button v-else <el-button v-else type="primary" size="mini"
type="primary"
size="mini"
@click="handleChangeName(scope.row)">修改名称</el-button> @click="handleChangeName(scope.row)">修改名称</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="居民端" <el-tab-pane label="居民端" name="resi">
name="resi">
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-card> </el-card>
<!-- 角色职责弹出框 --> <!-- 角色职责弹出框 -->
<el-dialog :visible.sync="dutyShow" <el-dialog :visible.sync="dutyShow" :close-on-click-modal="false" :close-on-press-escape="false" title="角色职责"
:close-on-click-modal="false" width="30%" @closed="handleDutyClosed">
:close-on-press-escape="false" <div class="div_duty" v-if="dutyShow">
title="角色职责" <el-input type="textarea" :rows="8" v-model.trim="description"></el-input>
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"> <div class="div_btn">
<el-button type="primary" <el-button type="primary" size="small" @click="updateRole()">保存</el-button>
size="small" <el-button size="small" @click="dutyShow = false">取消</el-button>
@click="updateRole()">保存</el-button>
<el-button size="small"
@click="dutyShow=false">取消</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<!-- 功能配置弹出框 --> <!-- 功能配置弹出框 -->
<el-dialog :visible.sync="funcShow" <el-dialog :visible.sync="funcShow" :close-on-click-modal="false" :close-on-press-escape="false" width="70%"
:close-on-click-modal="false" top="30px" title="功能列表" @closed="handleDialogClosed">
:close-on-press-escape="false" <div class="role-flex" v-if="funcShow">
width="70%"
top="30px"
title="功能列表"
@closed="handleDialogClosed">
<div class="role-flex"
v-if="funcShow">
<el-card class="flex1"> <el-card class="flex1">
<div class="now-name">当前角色: {{ roleName }}</div> <div class="now-name">当前角色: {{ roleName }}</div>
<div class="now-name"> <div class="now-name">
<el-button type="primary" <el-button type="primary" size="small" @click="saveOperations4Role">保存功能</el-button>
size="small"
@click="saveOperations4Role">保存功能</el-button>
</div> </div>
<el-table v-loading="loading2" <el-table v-loading="loading2" height="580" ref="opeTable" :data="opeList" border
height="580"
ref="opeTable"
:data="opeList"
border
@select="handleSelectionChange"> @select="handleSelectionChange">
<el-table-column type="selection" <el-table-column type="selection" width="55"></el-table-column>
width="55"></el-table-column>
<!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> --> <!-- <el-table-column prop="operationKey" label="操作Key"></el-table-column> -->
<el-table-column prop="operationName" <el-table-column prop="operationName" label="操作名称"></el-table-column>
label="操作名称"></el-table-column>
<!-- <el-table-column prop="brief" label="简介"></el-table-column> --> <!-- <el-table-column prop="brief" label="简介"></el-table-column> -->
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" <el-button type="primary" size="small"
size="small"
@click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">范围配置</el-button> @click="toScopeConfig(scope.row.operationKey, scope.row.operationName)">范围配置</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card v-show="roleShow" <el-card v-show="roleShow" style="width: 250px; margin-left: 10px;">
style="width: 250px; margin-left: 10px;">
<div class="now-name">当前功能: {{ funcName }}</div> <div class="now-name">当前功能: {{ funcName }}</div>
<div class="now-name"> <div class="now-name">
<el-button type="primary" <el-button type="primary" size="small" @click="saveSettings">保存范围</el-button>
size="small" <el-button type="primary" size="small" @click="toAllClient">同步到所有客户</el-button>
@click="saveSettings">保存范围</el-button>
<el-button type="primary"
size="small"
@click="toAllClient">同步到所有客户</el-button>
</div> </div>
<div> <div>
<el-row :gutter="12"> <el-row :gutter="12">
<el-col v-loading="loading3"> <el-col v-loading="loading3">
<el-card shadow="hover"> <el-card shadow="hover">
<el-checkbox-group class="t" <el-checkbox-group class="t" v-model.trim="checkedScopes" @change="roleChange">
v-model.trim="checkedScopes" <el-checkbox v-for="scope in scopeOptions" :label="scope.scopeKey"
@change="roleChange">
<el-checkbox v-for="scope in scopeOptions"
:label="scope.scopeKey"
:key="scope.scopeKey">{{ scope.scopeName }}</el-checkbox> :key="scope.scopeKey">{{ scope.scopeName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-card> </el-card>
@ -480,24 +411,30 @@ export default {
.role-flex { .role-flex {
display: flex; display: flex;
} }
.flex1 { .flex1 {
flex: 1; flex: 1;
} }
.now-name { .now-name {
/* display: flex; /* display: flex;
justify-content: space-between; */ justify-content: space-between; */
margin-bottom: 10px; margin-bottom: 10px;
} }
.aui-wrapper .el-card+.el-card { .aui-wrapper .el-card+.el-card {
margin-top: 0; margin-top: 0;
} }
.role-container .el-dialog__body { .role-container .el-dialog__body {
padding: 0 20px 20px; padding: 0 20px 20px;
} }
.div_duty { .div_duty {
height: 300px; height: 300px;
position: relative; position: relative;
} }
.div_btn { .div_btn {
position: absolute; position: absolute;
bottom: 30px; bottom: 30px;

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

@ -1,16 +1,9 @@
<template> <template>
<div class="g-main"> <div class="g-main">
<div class="m-search"> <div class="m-search">
<el-form :inline="true" <el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'110px'">
:model="formData" <el-form-item label="角色名称" prop="name">
ref="ref_searchform" <el-input v-model.trim="formData.name" size="small" class="list_item_width_1" clearable
: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="请输入角色名称"> placeholder="请输入角色名称">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -26,114 +19,56 @@
placeholder="创建时间"> placeholder="创建时间">
</el-date-picker> </el-date-picker>
</el-form-item> --> </el-form-item> -->
<el-button style="margin-left:10px" <el-button style="margin-left:10px" size="small" class="diy-button--add"
size="small"
class="diy-button--add"
@click="handleSearch">查询</el-button> @click="handleSearch">查询</el-button>
<el-button style="margin-left:30px" <el-button style="margin-left:30px" size="small" class="diy-button--white"
size="small"
class="diy-button--white"
@click="resetSearch">重置</el-button> @click="resetSearch">重置</el-button>
</el-form> </el-form>
</div> </div>
<div class="m-table"> <div class="m-table">
<div class="div_btn"> <div class="div_btn">
<el-button class="diy-button--add" <el-button class="diy-button--add" size="small" @click="handleAdd">新增</el-button>
size="small"
@click="handleAdd">新增</el-button>
</div> </div>
<el-table class="table" <el-table class="table" ref="ref_table" :data="tableData" border :height="tableHeight"
ref="ref_table" v-loading="tableLoading" style="width: 100%">
:data="tableData" <el-table-column label="序号" header-align="center" align="center" type="index"
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> width="50"></el-table-column>
<el-table-column prop="name" <el-table-column prop="name" header-align="center" align="center" label="角色名称" min-width="100">
header-align="center"
align="center"
label="角色名称"
min-width="100">
</el-table-column> </el-table-column>
<el-table-column prop="defaultRole" <el-table-column prop="defaultRole" header-align="center" align="center" label="默认角色" in-width="30">
header-align="center"
align="center"
label="默认角色"
in-width="30">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.defaultRole == '0' ? 'X' : '√' }} {{ scope.row.defaultRole == '0' ? 'X' : '√' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="levelName" <el-table-column prop="levelName" header-align="center" align="center" label="级别" in-width="30">
header-align="center"
align="center"
label="级别"
in-width="30">
</el-table-column> </el-table-column>
<el-table-column prop="remark" <el-table-column prop="remark" header-align="center" align="center" label="备注" min-width="110">
header-align="center"
align="center"
label="备注"
min-width="110">
</el-table-column> </el-table-column>
<el-table-column prop="createdTime" <el-table-column prop="createdTime" header-align="center" align="center" label="创建时间" min-width="170">
header-align="center"
align="center"
label="创建时间"
min-width="170">
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" fixed="right" width="140" header-align="center" align="center"
fixed="right"
width="140"
header-align="center"
align="center"
class="operate"> class="operate">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="true" <el-button v-if="true" type="text" class="div-table-button--detail" size="small"
type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button> @click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" <el-button type="text" class="div-table-button--edit" size="small"
class="div-table-button--edit"
size="small"
@click="handleEdit(scope.row)">修改</el-button> @click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="scope.row.defaultRole!=='1'" <el-button v-if="scope.row.defaultRole !== '1'" type="text" class="div-table-button--delete "
type="text" size="small" @click="handleDelete(scope.row)">删除</el-button>
class="div-table-button--delete "
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div> <div>
<el-pagination @size-change="handleSizeChange" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
@current-change="handleCurrentChange" :current-page.sync="pageNo" :page-sizes="[20, 50, 100, 200]" :page-size="pageSize"
:current-page.sync="pageNo" layout="sizes, prev, pager, next, total" :total="total">
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
<!-- 修改弹出框 --> <!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow" <el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false"
:close-on-click-modal="false" :title="formTitle" width="850px" top="5vh" class="dialog-h" @closed="diaClose">
:close-on-press-escape="false" <role-form ref="ref_form" @dialogCancle="diaClose" @dialogOk="addFormOk"></role-form>
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<role-form ref="ref_form"
@dialogCancle="diaClose"
@dialogOk="addFormOk"></role-form>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>

Loading…
Cancel
Save