| | |
| | | background: '#F5F5F5', |
| | | 'font-size': '14px', |
| | | 'font-weight': '650', |
| | | 'line-height': '45px', |
| | | 'line-height': '45px' |
| | | }" |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | :row-class-name="tableRowClassName" |
| | | @selection-change="tableChange" |
| | | > |
| | | <el-table-column type="selection" min-width="5"> </el-table-column> |
| | | <el-table-column type="selection" min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column label="用户ID" min-width="6"> |
| | | <template slot-scope="scope">{{ scope.row.id }}</template> |
| | | </el-table-column> |
| | |
| | | <span>{{ filterRole(scope.row.roles) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="departName" label="所属部门" min-width="10"> |
| | | <el-table-column |
| | | prop="departName" |
| | | label="所属部门" |
| | | min-width="10" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ filterDepart(scope.row.depart) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="jobTitle" label="所属职务" min-width="8"> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" min-width="10"> |
| | | <el-table-column |
| | | prop="createTime" |
| | | label="创建时间" |
| | | min-width="10" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ changeTime(scope.row) }}</span> |
| | | </template> |
| | |
| | | <el-table-column prop="operation" label="操作" min-width="20"> |
| | | <template slot-scope="scope"> |
| | | <div class="operation"> |
| | | <span @click="handleChangeRole(scope.row, 'role')">修改角色</span> |
| | | <span @click="handleChange(scope.row)">修改</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleFind(scope.row)">查看</span> |
| | | <span class="line">|</span> |
| | | <span @click="handleChangeRole(scope.row, 'password')" |
| | | <span |
| | | @click="handleChangeRole(scope.row, 'password')" |
| | | >修改密码</span |
| | | > |
| | | <span class="line">|</span> |
| | |
| | | > |
| | | <span class="line">|</span> |
| | | <span @click="handleChangeStatus(scope.row)">{{ |
| | | scope.row.status === true ? "停用" : "启用" |
| | | scope.row.status === true ? '停用' : '启用' |
| | | }}</span> |
| | | </div> |
| | | </template> |
| | |
| | | :getUserList="getUserList" |
| | | v-if="!flag.password" |
| | | /> |
| | | <MyPwd v-else :userInfo="userInfo" @closeDialog="closeDialog"></MyPwd> |
| | | <MyPwd |
| | | v-else |
| | | :userInfo="userInfo" |
| | | @closeDialog="closeDialog" |
| | | ></MyPwd> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | :visible.sync="dialogCreate" |
| | | title="新增账户" |
| | | width="800px" |
| | | v-if="dialogCreate" |
| | | :before-close="handleClose" |
| | | > |
| | | <createUser @sendDialog="sendDialog" :userInfo="userInfo" /> |
| | | </el-dialog> |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | <el-checkbox v-model="all" @change="selectAll()" |
| | | >全选</el-checkbox |
| | | > |
| | | </div> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)" |
| | | <el-checkbox |
| | | v-model="unsame" |
| | | @change="disSame(tableData)" |
| | | >反选</el-checkbox |
| | | > |
| | | </div> |
| | |
| | | </template> |
| | | <script> |
| | | import helper from "@/utils/mydate"; |
| | | import createUser from "../createUser"; |
| | | import updateUser from "../updateUser"; |
| | | import MyPwd from "../password"; |
| | | import MyView from "../myView"; |
| | | export default { |
| | | components: { |
| | | createUser, |
| | | updateUser, |
| | | MyPwd, |
| | | MyView, |
| | |
| | | return { |
| | | tableData: [], |
| | | search: "", |
| | | dialogCreate: false, |
| | | dialogUpdate: false, |
| | | dialogView: false, |
| | | updateFlag: false, |
| | |
| | | }, |
| | | methods: { |
| | | async selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | this.preMyIdx = list; |
| | | if (list === 3) { |
| | |
| | | }, |
| | | // 批量删除用户信息 |
| | | mulDelte(idArr) { |
| | | console.log(idArr); |
| | | this.$confirm("您确定要进行批量删除用户吗?") |
| | | .then((_) => { |
| | | this.$axios({ |
| | |
| | | }, |
| | | // 批量修改账号 |
| | | mulUpdateStatus(idArr, flag) { |
| | | console.log(flag); |
| | | this.$confirm( |
| | | flag === 1 |
| | | ? "您确定要进行批量启用用户吗?" |
| | |
| | | }) |
| | | .catch((_) => {}); |
| | | }, |
| | | sendDialog(flag) { |
| | | this.dialogCreate = flag.flag; |
| | | this.$emit('setDialog', { flag: true }) |
| | | }, |
| | | closeDialog({ flag }) { |
| | | this.dialogUpdate = flag; |
| | | this.getUserList(); |
| | |
| | | this.getUserList(); |
| | | }, |
| | | // 修改角色 |
| | | handleChange(obj) { |
| | | this.dialogCreate = true; |
| | | this.userInfo = obj; |
| | | }, |
| | | // 修改角色 |
| | | handleChangeRole(obj, mykey) { |
| | | this.dialogUpdate = true; |
| | | this.updateFlag = true; |