优化代码

This commit is contained in:
wuxw 2024-11-11 16:16:55 +08:00
parent a6090875aa
commit b3b308b7c9
2 changed files with 90 additions and 80 deletions

View File

@ -2,43 +2,44 @@
<div class="text-left">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddRoleCommunityModal()">
<i class="fa fa-plus"></i>
<span><vc:i18n name="关联小区"></vc:i18n></span>
<span>
<vc:i18n name="关联小区"></vc:i18n>
</span>
</button>
</div>
<table class="footable table table-stripped toggle-arrow-tiny margin-top" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<span><vc:i18n name="小区编号" namespace="roleCommunity"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="小区名称" namespace="roleCommunity"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="操作" namespace="roleCommunity"></vc:i18n></span>
</th>
</tr>
<tr>
<th class="text-center">
<span>
<vc:i18n name="小区编号" namespace="roleCommunity"></vc:i18n>
</span>
</th>
<th class="text-center">
<span>
<vc:i18n name="小区名称" namespace="roleCommunity"></vc:i18n>
</span>
</th>
<th class="text-center">
<span>
<vc:i18n name="操作" namespace="roleCommunity"></vc:i18n>
</span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="roleCommunity in roleCommunityInfo.roleCommunitys">
<td class="text-center">{{roleCommunity.communityId}}</td>
<td class="text-center">{{roleCommunity.communityName}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openDeleteRoleCommunityModel(roleCommunity)">
<span><vc:i18n name="删除"></vc:i18n></span>
</button>
</div>
</td>
</tr>
<tr v-for="roleCommunity in roleCommunityInfo.roleCommunitys">
<td class="text-center">{{roleCommunity.communityId}}</td>
<td class="text-center">{{roleCommunity.communityName}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openDeleteRoleCommunityModel(roleCommunity)">
<vc:i18n name="删除"></vc:i18n>
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<!-- <vc:create path="frame/pagination"></vc:create> -->

View File

@ -3,73 +3,82 @@
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请填写员工名称','org')" v-model="roleStaffInfo.staffName"
class="form-control form-control-sm">
class="form-control form-control-sm">
</div>
</div>
<div class="col-sm-4">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryRoleStaffMethod()">
<i class="fa fa-search"></i>
<span><vc:i18n name="查询" namespace="room"></vc:i18n></span>
<span>
<vc:i18n name="查询" namespace="room"></vc:i18n>
</span>
</button>
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddRoleStaffModal()">
<i class="fa fa-plus"></i>
<span><vc:i18n name="关联员工"></vc:i18n></span>
<span>
<vc:i18n name="关联员工"></vc:i18n>
</span>
</button>
</div>
</div>
</div>
<table class="footable table table-stripped toggle-arrow-tiny margin-top" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<span><vc:i18n name="名称" namespace="staff"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="手机号" namespace="staff"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="邮箱" namespace="staff"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="地址" namespace="staff"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="性别" namespace="staff"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="操作" namespace="staff"></vc:i18n></span>
</th>
</tr>
<tr>
<th class="text-center">
<span>
<vc:i18n name="名称" namespace="staff"></vc:i18n>
</span>
</th>
<th class="text-center">
<span>
<vc:i18n name="手机号" namespace="staff"></vc:i18n>
</span>
</th>
<th class="text-center">
<span>
<vc:i18n name="邮箱" namespace="staff"></vc:i18n>
</span>
</th>
<th class="text-center">
<span>
<vc:i18n name="地址" namespace="staff"></vc:i18n>
</span>
</th>
<th class="text-center">
<span>
<vc:i18n name="性别" namespace="staff"></vc:i18n>
</span>
</th>
<th class="text-center">
<span>
<vc:i18n name="操作" namespace="staff"></vc:i18n>
</span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="staff in roleStaffInfo.staffs">
<td class="text-center">{{staff.name}}</td>
<td class="text-center">{{staff.tel}}</td>
<td class="text-center">{{staff.email}}</td>
<td class="text-center">{{staff.address}}</td>
<td class="text-center">{{staff.sex == 0 ? '男' : '女'}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openDeleteRoleStaffModel(staff)"
v-if="vc.hasPrivilege('502022082920040010','502023011946550001')">
<span><vc:i18n name="删除"></vc:i18n></span>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_toStaffDetail(staff)">
<span><vc:i18n name="详情"></vc:i18n></span>
</button>
</div>
</td>
</tr>
<tr v-for="staff in roleStaffInfo.staffs">
<td class="text-center">{{staff.name}}</td>
<td class="text-center">{{staff.tel}}</td>
<td class="text-center">{{staff.email}}</td>
<td class="text-center">{{staff.address}}</td>
<td class="text-center">{{staff.sex == 0 ? '男' : '女'}}</td>
<td class="text-center">
<div class="btn-group">
<!-- v-if="vc.hasPrivilege('502022082920040010','502023011946550001')"-->
<button class="btn-white btn btn-xs" v-on:click="_openDeleteRoleStaffModel(staff)">
<vc:i18n name="删除"></vc:i18n>
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_toStaffDetail(staff)">
<vc:i18n name="详情"></vc:i18n>
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<!-- <vc:create path="frame/pagination"></vc:create> -->