|
|
|
@ -254,7 +254,7 @@
|
|
|
|
|
<el-table-column label="单位名称" align="center" key="nickName" prop="nickName">
|
|
|
|
|
<template slot-scope="scope">{{ scope.row.nickName }}</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单位类型" align="center" key="dwlx" prop="dwlx">
|
|
|
|
|
<el-table-column label="单位类型" width="100" align="center" key="dwlx" prop="dwlx">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.dwlx" :value="scope.row.dwlx"/>
|
|
|
|
|
</template>
|
|
|
|
@ -265,7 +265,7 @@
|
|
|
|
|
<!-- <el-table-column label="所属区域" align="center" key="ssqycounty" prop="ssqycounty">
|
|
|
|
|
<template slot-scope="scope">{{ getSsqu(scope.row) }}</template>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column label="所属行业" align="center" key="sshy" prop="sshy">
|
|
|
|
|
<el-table-column label="所属行业" width="80" align="center" key="sshy" prop="sshy">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.sshy" :value="scope.row.sshy"/>
|
|
|
|
|
<!-- {{ scope.row.sshy }} -->
|
|
|
|
@ -285,6 +285,11 @@
|
|
|
|
|
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;">
|
|
|
|
|
<span class="look-info" style="color: #1485EF;">编辑</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="roles.includes('admin')" style="display: flex;align-items: center;cursor: pointer; margin-left: 10px;" @click="changePassword(scope.row)">
|
|
|
|
|
<!-- <img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;"> -->
|
|
|
|
|
<i class="el-icon-refresh-right" style="width: 20px;margin-right: 5px;color: #1485EF;font-size: 20px;"></i>
|
|
|
|
|
<span class="look-info" style="color: #1485EF;">重置密码</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: flex;align-items: center;cursor: pointer; margin-left: 10px;" @click="handleDelete(scope.row)">
|
|
|
|
|
<img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;">
|
|
|
|
|
<span class="look-info" style="color: #F50C0C;">删除</span>
|
|
|
|
@ -338,19 +343,20 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
|
|
|
|
|
import { listUnit, delUnit } from "@/api/auditPagesApi/index";
|
|
|
|
|
import { deptTreeSelect } from "@/api/system/user";
|
|
|
|
|
import { listUnit, delUnit, editPassword } from "@/api/auditPagesApi/index";
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
import myPagination from "@/views/components/Pagination/index.vue"
|
|
|
|
|
|
|
|
|
|
import { MessageBox } from 'element-ui'
|
|
|
|
|
export default {
|
|
|
|
|
name: "User",
|
|
|
|
|
dicts: ['dwlx','sshy'],
|
|
|
|
|
components: { Treeselect, myPagination },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
roles: this.$store.state.user.roles,
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
@ -586,6 +592,38 @@ export default {
|
|
|
|
|
submitFileForm() {
|
|
|
|
|
this.$refs.upload.submit();
|
|
|
|
|
},
|
|
|
|
|
// admin修改密码
|
|
|
|
|
changePassword(row){
|
|
|
|
|
editPassword(row.id).then(res=>{
|
|
|
|
|
if(res.code == 200 && res.msg) {
|
|
|
|
|
let msg = res.msg
|
|
|
|
|
MessageBox.confirm(`${msg}`, '重置密码', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
showClose:false,
|
|
|
|
|
type:"success ",
|
|
|
|
|
callback: action => {
|
|
|
|
|
if (window.clipboardData) {
|
|
|
|
|
window.clipboardData.setData('text', msg);
|
|
|
|
|
} else {
|
|
|
|
|
(function () {
|
|
|
|
|
document.oncopy = function (e) {
|
|
|
|
|
e.clipboardData.setData('text', msg);
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
document.oncopy = null;
|
|
|
|
|
}
|
|
|
|
|
})(msg);
|
|
|
|
|
document.execCommand('Copy');
|
|
|
|
|
}
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: `密码复制成功: ${ msg }`
|
|
|
|
|
});
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 修改table背景色
|
|
|
|
|
tableRowClassName({row, rowIndex}){
|
|
|
|
|
if (rowIndex % 2 !== 0) {
|
|
|
|
|