|
@@ -1,159 +1,247 @@
|
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
-
|
|
|
-<head>
|
|
|
+ <head>
|
|
|
<title>员工管理</title>
|
|
|
#parse("sys/header.html")
|
|
|
-</head>
|
|
|
+ </head>
|
|
|
|
|
|
-<body>
|
|
|
+ <body>
|
|
|
<div id="rrapp" v-cloak>
|
|
|
- <div v-show="showList">
|
|
|
- <Row :gutter="16">
|
|
|
- <div class="search-group">
|
|
|
- <i-col span="8">
|
|
|
- <div style="display: inline-block;">
|
|
|
- <i-input v-model="q.key" @on-enter="query" placeholder="员工名称" />
|
|
|
- </div>
|
|
|
- <!-- <div style="display: inline-block;">
|
|
|
+ <div v-show="showList">
|
|
|
+ <Row :gutter="16">
|
|
|
+ <div class="search-group">
|
|
|
+ <i-col span="8">
|
|
|
+ <div style="display: inline-block">
|
|
|
+ <i-input
|
|
|
+ v-model="q.key"
|
|
|
+ @on-enter="query"
|
|
|
+ placeholder="员工名称"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- <div style="display: inline-block;">
|
|
|
<i-select v-model="q.deptId" placeholder="请选择所属公司">
|
|
|
<i-option value=" ">全部</i-option>
|
|
|
<i-option v-for="(item,i) in brands" :key="i" :value="item.id">{{item.name}}</i-option>
|
|
|
</i-select>
|
|
|
</div> -->
|
|
|
- <div style="display: inline-block;">
|
|
|
- <i-input v-model="q.deptName" @on-enter="query" placeholder="所属公司" />
|
|
|
- </div>
|
|
|
- <div style="display: inline-block;">
|
|
|
- <i-button @click="query">查询</i-button>
|
|
|
- </div>
|
|
|
- <!-- <div v-if="userRole!=5&&userRole!=6" style="display: inline-block;margin-left: 10px;">可新增数量为 {{lessNum}} 个</div> -->
|
|
|
- <div v-if="userRole==6" style="display: inline-block;margin-left: 10px;">可新增数量为 {{lessNum}} 个
|
|
|
- </div>
|
|
|
- </i-col>
|
|
|
-
|
|
|
- </div>
|
|
|
- <div class="buttons-group">
|
|
|
- <div class="buttons-group">
|
|
|
- <i-button
|
|
|
- v-if="(localStorage.getItem('userExpTime') > Date.now() && userRole == 6) || (localStorage.getItem('userExpTime') == 'null' && userRole == 6)"
|
|
|
- type="info" @click="add"><i class="fa fa-plus"></i> 新增</i-button>
|
|
|
- <i-button
|
|
|
- v-if="(localStorage.getItem('userExpTime') > Date.now() && userRole == 6) || (localStorage.getItem('userExpTime') == 'null' && userRole == 6)"
|
|
|
- type="warning" @click="update"><i class="fa fa-pencil-square-o"></i> 修改</i-button>
|
|
|
- <i-button
|
|
|
- v-if="(localStorage.getItem('userExpTime') > Date.now() && userRole == 6) || (localStorage.getItem('userExpTime') == 'null' && userRole == 6)"
|
|
|
- type="error" @click="checkDel"><i class="fa fa-trash-o"></i> 删除</i-button>
|
|
|
-
|
|
|
- <!-- #if($shiro.hasPermission("user:save"))
|
|
|
+ <div style="display: inline-block">
|
|
|
+ <i-input
|
|
|
+ v-model="q.deptName"
|
|
|
+ @on-enter="query"
|
|
|
+ placeholder="所属公司"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div style="display: inline-block">
|
|
|
+ <i-button @click="query">查询</i-button>
|
|
|
+ </div>
|
|
|
+ <!-- <div v-if="userRole!=5&&userRole!=6" style="display: inline-block;margin-left: 10px;">可新增数量为 {{lessNum}} 个</div> -->
|
|
|
+ <div
|
|
|
+ v-if="userRole==6"
|
|
|
+ style="display: inline-block; margin-left: 10px"
|
|
|
+ >
|
|
|
+ 可新增数量为 {{lessNum}} 个
|
|
|
+ </div>
|
|
|
+ </i-col>
|
|
|
+ </div>
|
|
|
+ <div class="buttons-group">
|
|
|
+ <div class="buttons-group">
|
|
|
+ <i-button
|
|
|
+ v-if="(localStorage.getItem('userExpTime') > Date.now() && userRole == 6) || (localStorage.getItem('userExpTime') == 'null' && userRole == 6)"
|
|
|
+ type="info"
|
|
|
+ @click="add"
|
|
|
+ ><i class="fa fa-plus"></i> 新增</i-button
|
|
|
+ >
|
|
|
+ <i-button
|
|
|
+ v-if="(localStorage.getItem('userExpTime') > Date.now() && userRole == 6) || (localStorage.getItem('userExpTime') == 'null' && userRole == 6)"
|
|
|
+ type="warning"
|
|
|
+ @click="update"
|
|
|
+ ><i class="fa fa-pencil-square-o"></i> 修改</i-button
|
|
|
+ >
|
|
|
+ <i-button
|
|
|
+ v-if="(localStorage.getItem('userExpTime') > Date.now() && userRole == 6) || (localStorage.getItem('userExpTime') == 'null' && userRole == 6)"
|
|
|
+ type="error"
|
|
|
+ @click="checkDel"
|
|
|
+ ><i class="fa fa-trash-o"></i> 删除</i-button
|
|
|
+ >
|
|
|
+
|
|
|
+ <!-- #if($shiro.hasPermission("user:save"))
|
|
|
<i-button v-if="(localStorage.getItem('userExpTime') > Date.now() && userRole == 6) || (localStorage.getItem('userExpTime') == 'null' && userRole == 6)" type="info" @click="add"><i class="fa fa-plus"></i> 新增</i-button>
|
|
|
#end #if($shiro.hasPermission("user:update"))
|
|
|
<i-button v-if="(localStorage.getItem('userExpTime') > Date.now() && userRole == 6) || (localStorage.getItem('userExpTime') == 'null' && userRole == 6)" type="warning" @click="update"><i class="fa fa-pencil-square-o"></i> 修改</i-button>
|
|
|
#end #if($shiro.hasPermission("user:delete"))
|
|
|
<i-button v-if="(localStorage.getItem('userExpTime') > Date.now() && userRole == 6) || (localStorage.getItem('userExpTime') == 'null' && userRole == 6)" type="error" @click="del"><i class="fa fa-trash-o"></i> 删除</i-button>
|
|
|
#end -->
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </Row>
|
|
|
- <table id="jqGrid"></table>
|
|
|
- <div id="jqGridPager"></div>
|
|
|
- </div>
|
|
|
- <Modal v-model="show_delModal" title="删除员工">
|
|
|
- <p v-if="delInfo.type==1" style="padding:10px 0 20px 20px;">是否确定删除员工?</p>
|
|
|
- <p v-if="delInfo.type==2" style="padding:10px 0 20px 20px;">删除失败,公司仅剩一名员工,不可进行删除</p>
|
|
|
- <p v-if="delInfo.type==3" style="padding:10px 0 20px 20px;">请将当前员工的直播间数据进行迁移后,再删除员工</p>
|
|
|
-
|
|
|
- <div v-if="delInfo.type==3">
|
|
|
- <i-form :model="delInfo" :label-width="120" ref="formDelValidate" :rules="delValidate">
|
|
|
- <Form-item label="选择迁移的员工" prop="select">
|
|
|
- <i-select v-model="delInfo.select" placeholder="请选择">
|
|
|
- <i-option :value="i" v-for="i in delInfo.list">{{i}}</i-option>
|
|
|
- </i-select>
|
|
|
- </Form-item>
|
|
|
- </i-form>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div slot="footer">
|
|
|
- <i-button type="primary" size="large" @click="comfirmDel">确定</i-button>
|
|
|
- <i-button type="text" size="large" v-if="delInfo.type!=2" @click="cancelDel">取消</i-button>
|
|
|
-
|
|
|
</div>
|
|
|
- </Modal>
|
|
|
- <Card v-show="!showList">
|
|
|
- <p slot="title">{{title}}</p>
|
|
|
- <i-form ref="formValidate" :model="user" :rules="ruleValidate" :label-width="80">
|
|
|
- <div style="width: 100%;">
|
|
|
-
|
|
|
- <Form-item label="手机号" prop="mobile">
|
|
|
- <div class="c-winput">
|
|
|
- <i-input :maxlength='11' v-model="user.mobile" placeholder="手机号" />
|
|
|
- </div>
|
|
|
- <div class="ivu-form-item-error-tip" style="display: none;" id="isSign">手机号未在指房宝APP中进行注册</div>
|
|
|
- <Tooltip content="" placement="right">
|
|
|
- <i class="ivu-icon ivu-icon-help-circled"></i>
|
|
|
- <div slot="content">
|
|
|
- <p>手机号需在指房宝APP注册后才可新增</p>
|
|
|
- </div>
|
|
|
- </Tooltip>
|
|
|
- </Form-item>
|
|
|
-
|
|
|
- <Form-item label="员工名称" prop="username">
|
|
|
- <div class="c-winput">
|
|
|
- <i-input :maxlength='20' v-model="user.username" placeholder="请输入员工名称" />
|
|
|
- </div>
|
|
|
- </Form-item>
|
|
|
-
|
|
|
- <Form-item label="角色" prop="roleId">
|
|
|
- <Radio-group v-model="user.roleId">
|
|
|
- <Radio :key="role" :value="role.roleId" :label="role.roleId" v-for="role in roleList">
|
|
|
- {{role.roleName}}</Radio>
|
|
|
- </Radio-group>
|
|
|
- </Form-item>
|
|
|
+ </div>
|
|
|
+ </Row>
|
|
|
+ <table id="jqGrid"></table>
|
|
|
+ <div id="jqGridPager"></div>
|
|
|
+ </div>
|
|
|
+ <Modal v-model="show_delModal" title="删除员工">
|
|
|
+ <p v-if="delInfo.type==1" style="padding: 10px 0 20px 20px">
|
|
|
+ 是否确定删除员工?
|
|
|
+ </p>
|
|
|
+ <p v-if="delInfo.type==2" style="padding: 10px 0 20px 20px">
|
|
|
+ 删除失败,公司仅剩一名员工,不可进行删除
|
|
|
+ </p>
|
|
|
+ <p v-if="delInfo.type==3" style="padding: 10px 0 20px 20px">
|
|
|
+ 请将当前员工的直播间数据进行迁移后,再删除员工
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <div v-if="delInfo.type==3">
|
|
|
+ <i-form
|
|
|
+ :model="delInfo"
|
|
|
+ :label-width="120"
|
|
|
+ ref="formDelValidate"
|
|
|
+ :rules="delValidate"
|
|
|
+ >
|
|
|
+ <Form-item label="选择迁移的员工" prop="select">
|
|
|
+ <i-select v-model="delInfo.select" placeholder="请选择">
|
|
|
+ <i-option :value="i" v-for="i in delInfo.list">{{i}}</i-option>
|
|
|
+ </i-select>
|
|
|
+ </Form-item>
|
|
|
+ </i-form>
|
|
|
+ </div>
|
|
|
|
|
|
- <Form-item label="状态" prop="status">
|
|
|
- <Radio-group v-model="user.status">
|
|
|
- <Radio value="1" label="1">
|
|
|
- <span>正常</span>
|
|
|
- </Radio>
|
|
|
- <Radio value="0" label="0">
|
|
|
- <span>禁用</span>
|
|
|
- </Radio>
|
|
|
- </Radio-group>
|
|
|
- </Form-item>
|
|
|
- <Form-item>
|
|
|
- <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
|
|
|
- <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
|
|
|
- <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置
|
|
|
- </i-button>
|
|
|
- </Form-item>
|
|
|
+ <div slot="footer">
|
|
|
+ <i-button type="primary" size="large" @click="comfirmDel"
|
|
|
+ >确定</i-button
|
|
|
+ >
|
|
|
+ <i-button
|
|
|
+ type="text"
|
|
|
+ size="large"
|
|
|
+ v-if="delInfo.type!=2"
|
|
|
+ @click="cancelDel"
|
|
|
+ >取消</i-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ <Card v-show="!showList">
|
|
|
+ <p slot="title">{{title}}</p>
|
|
|
+ <i-form
|
|
|
+ ref="formValidate"
|
|
|
+ :model="user"
|
|
|
+ :rules="ruleValidate"
|
|
|
+ :label-width="80"
|
|
|
+ >
|
|
|
+ <div style="width: 100%">
|
|
|
+ <Form-item label="手机号" prop="mobile">
|
|
|
+ <div class="c-winput">
|
|
|
+ <i-input
|
|
|
+ :maxlength="11"
|
|
|
+ v-model="user.mobile"
|
|
|
+ placeholder="手机号"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="ivu-form-item-error-tip"
|
|
|
+ style="display: none"
|
|
|
+ id="isSign"
|
|
|
+ >
|
|
|
+ 手机号未在指房宝APP中进行注册
|
|
|
+ </div>
|
|
|
+ <Tooltip content="" placement="right">
|
|
|
+ <i class="ivu-icon ivu-icon-help-circled"></i>
|
|
|
+ <div slot="content">
|
|
|
+ <p>手机号需在指房宝APP注册后才可新增</p>
|
|
|
</div>
|
|
|
- </i-form>
|
|
|
- </Card>
|
|
|
-
|
|
|
- <Modal v-model="modal1" title="添加VR场景关联" @on-ok="ok" @on-cancel="cancel">
|
|
|
- <!--
|
|
|
+ </Tooltip>
|
|
|
+ </Form-item>
|
|
|
+
|
|
|
+ <Form-item label="员工名称" prop="username">
|
|
|
+ <div class="c-winput">
|
|
|
+ <i-input
|
|
|
+ :maxlength="20"
|
|
|
+ v-model="user.username"
|
|
|
+ placeholder="请输入员工名称"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </Form-item>
|
|
|
+
|
|
|
+ <Form-item label="角色" prop="roleId">
|
|
|
+ <Radio-group v-model="user.roleId">
|
|
|
+ <Radio
|
|
|
+ :key="role"
|
|
|
+ :value="role.roleId"
|
|
|
+ :label="role.roleId"
|
|
|
+ v-for="role in roleList"
|
|
|
+ v-if="role.roleId!==9"
|
|
|
+ >
|
|
|
+ {{role.roleName}}</Radio
|
|
|
+ >
|
|
|
+ </Radio-group>
|
|
|
+ </Form-item>
|
|
|
+
|
|
|
+ <Form-item label="状态" prop="status">
|
|
|
+ <Radio-group v-model="user.status">
|
|
|
+ <Radio value="1" label="1">
|
|
|
+ <span>正常</span>
|
|
|
+ </Radio>
|
|
|
+ <Radio value="0" label="0">
|
|
|
+ <span>禁用</span>
|
|
|
+ </Radio>
|
|
|
+ </Radio-group>
|
|
|
+ </Form-item>
|
|
|
+ <Form-item>
|
|
|
+ <i-button type="primary" @click="handleSubmit('formValidate')"
|
|
|
+ >提交</i-button
|
|
|
+ >
|
|
|
+ <i-button type="warning" @click="reload" style="margin-left: 8px"
|
|
|
+ >返回</i-button
|
|
|
+ >
|
|
|
+ <i-button
|
|
|
+ type="ghost"
|
|
|
+ @click="handleReset('formValidate')"
|
|
|
+ style="margin-left: 8px"
|
|
|
+ >重置
|
|
|
+ </i-button>
|
|
|
+ </Form-item>
|
|
|
+ </div>
|
|
|
+ </i-form>
|
|
|
+ </Card>
|
|
|
+
|
|
|
+ <Modal
|
|
|
+ v-model="modal1"
|
|
|
+ title="添加VR场景关联"
|
|
|
+ @on-ok="ok"
|
|
|
+ @on-cancel="cancel"
|
|
|
+ >
|
|
|
+ <!--
|
|
|
<CheckboxGroup v-model="social" @on-change="checkAllGroupChange">
|
|
|
<Checkbox :label="brand.name" v-for="(brand,idx) in brandsList" :key='idx'>
|
|
|
<span>{{brand.name}}</span>
|
|
|
</Checkbox>
|
|
|
</CheckboxGroup> -->
|
|
|
|
|
|
- <div class="checkbox-item" @click="clickCheck(brand,idx)" v-for="(brand,idx) in brandsList" :key='idx'>
|
|
|
- <span class="checkbox-kuang"></span>
|
|
|
- <img v-if="brand.checked" src="http://4d-tjw.oss-cn-shenzhen.aliyuncs.com/images/fdsq-click.png" alt="">
|
|
|
- <span>{{brand.name}}</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <Page style="margin-top: 20px;" :total="brandTotal" @on-change="pageChange" :page-size='brandPerPage'
|
|
|
- :current='brandPage' size="small" />
|
|
|
- </Modal>
|
|
|
+ <div
|
|
|
+ class="checkbox-item"
|
|
|
+ @click="clickCheck(brand,idx)"
|
|
|
+ v-for="(brand,idx) in brandsList"
|
|
|
+ :key="idx"
|
|
|
+ >
|
|
|
+ <span class="checkbox-kuang"></span>
|
|
|
+ <img
|
|
|
+ v-if="brand.checked"
|
|
|
+ src="http://4d-tjw.oss-cn-shenzhen.aliyuncs.com/images/fdsq-click.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <span>{{brand.name}}</span>
|
|
|
+ </div>
|
|
|
|
|
|
+ <Page
|
|
|
+ style="margin-top: 20px"
|
|
|
+ :total="brandTotal"
|
|
|
+ @on-change="pageChange"
|
|
|
+ :page-size="brandPerPage"
|
|
|
+ :current="brandPage"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
<!-- 选择公司 -->
|
|
|
- <div id="deptLayer" style="display: none;padding:10px;">
|
|
|
- <ul id="deptTree" class="ztree"></ul>
|
|
|
+ <div id="deptLayer" style="display: none; padding: 10px">
|
|
|
+ <ul id="deptTree" class="ztree"></ul>
|
|
|
</div>
|
|
|
<script src="${rc.contextPath}/js/shop/staff.js?_${date.systemTime}"></script>
|
|
|
-</body>
|
|
|
-
|
|
|
-</html>
|
|
|
+ </body>
|
|
|
+</html>
|