|
@@ -236,7 +236,7 @@
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
- width="160"
|
|
|
+ width="600"
|
|
|
class-name="small-padding fixed-width"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
@@ -254,7 +254,11 @@
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleChange(scope.row)"
|
|
|
v-hasPermi="['system:ownUser:adminChange']"
|
|
|
- v-if="scope.row.scyStatus=='03'&&scope.row.scyId!='000000'&&scope.row.sucr_handler=='0'"
|
|
|
+ v-if="
|
|
|
+ scope.row.scyType == '03' &&
|
|
|
+ scope.row.company != '000000' &&
|
|
|
+ scope.row.sucrHandler == '0'
|
|
|
+ "
|
|
|
>变更管理员</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -263,8 +267,13 @@
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleHandler(scope.row)"
|
|
|
v-hasPermi="['system:ownUser:handlerChange']"
|
|
|
- v-if="scope.row.scyStatus!='03'&&scope.row.zhcStatus!='00'&&scope.row.sucr_handler=='0'
|
|
|
- &&scope.row.scyId!='000000'"
|
|
|
+ v-if="
|
|
|
+ scope.row.scyType != '03' &&
|
|
|
+ scope.row.qperator == '1' &&
|
|
|
+ scope.row.sucrHandler == '0' &&
|
|
|
+ scope.row.handleCompany == '01' &&
|
|
|
+ scope.row.company != '000000'
|
|
|
+ "
|
|
|
>申请变更经办人</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -273,7 +282,12 @@
|
|
|
icon="el-icon-edit"
|
|
|
@click="confirmHandler(scope.row)"
|
|
|
v-hasPermi="['system:ownUser:confirmChange']"
|
|
|
- v-if="scope.row.scyStatus!='03'&&scope.row.zhcStatus=='00'&&scope.row.scyId!='000000'"
|
|
|
+ v-if="
|
|
|
+ scope.row.scyType != '03' &&
|
|
|
+ scope.row.qperator == '1' &&
|
|
|
+ scope.row.handleChange == '00' &&
|
|
|
+ scope.row.company == '000000'
|
|
|
+ "
|
|
|
>确认变更经办人</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -286,7 +300,7 @@
|
|
|
>删除</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- v-if="scope.row.status == '0' "
|
|
|
+ v-if="scope.row.status == '0'"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-key"
|
|
@@ -295,7 +309,7 @@
|
|
|
>重置</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- v-if="scope.row.status != '0' "
|
|
|
+ v-if="scope.row.status != '0'"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-key"
|
|
@@ -408,10 +422,15 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <!-- 申请变更经办人-->
|
|
|
- <el-dialog :title="titles" :visible.sync="imgs" width="700px" append-to-body>
|
|
|
+ <!-- 申请变更经办人-->
|
|
|
+ <el-dialog
|
|
|
+ :title="titles"
|
|
|
+ :visible.sync="imgs"
|
|
|
+ width="700px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="安心签开户及管理授权书(模板)">
|
|
|
+ <el-form-item label="安心签开户及管理授权书(模板)">
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
class="upload-demo"
|
|
@@ -420,6 +439,7 @@
|
|
|
accept=".jpg, .jpeg, .png, .JPG, .JPEG, .PNG"
|
|
|
:http-request="sfzRequest"
|
|
|
:on-preview="handlePictureCardPreview"
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
:on-remove="beforeRemove"
|
|
|
:on-change="dealImgChange"
|
|
|
multiple
|
|
@@ -432,13 +452,18 @@
|
|
|
<el-button slot="trigger" size="small" type="primary"
|
|
|
>点击选择</el-button
|
|
|
>
|
|
|
- <div class="el-upload__tip" slot="tip">
|
|
|
- <!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据 -->
|
|
|
- <el-link type="info" style="font-size:12px" @click="authorizationTemplate">下载模板</el-link>
|
|
|
- </div>
|
|
|
+ <div class="el-upload__tip" slot="tip">
|
|
|
+ <!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据 -->
|
|
|
+ <el-link
|
|
|
+ type="info"
|
|
|
+ style="font-size: 12px"
|
|
|
+ @click="authorizationTemplate"
|
|
|
+ >下载模板</el-link
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="安心签用户信息变更申请表">
|
|
|
+ <el-form-item label="安心签用户信息变更申请表">
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
class="upload-demo"
|
|
@@ -447,6 +472,7 @@
|
|
|
accept=".jpg, .jpeg, .png, .JPG, .JPEG, .PNG"
|
|
|
:http-request="sqsRequest"
|
|
|
:on-preview="sqsPictureCardPreview"
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
:on-remove="beforeRemove"
|
|
|
:on-change="dealImgChange"
|
|
|
multiple
|
|
@@ -459,10 +485,15 @@
|
|
|
<el-button slot="trigger" size="small" type="primary"
|
|
|
>点击选择</el-button
|
|
|
>
|
|
|
- <div class="el-upload__tip" slot="tip">
|
|
|
- <!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据 -->
|
|
|
- <el-link type="info" style="font-size:12px" @click="applicationTemplate">下载模板</el-link>
|
|
|
- </div>
|
|
|
+ <div class="el-upload__tip" slot="tip">
|
|
|
+ <!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据 -->
|
|
|
+ <el-link
|
|
|
+ type="info"
|
|
|
+ style="font-size: 12px"
|
|
|
+ @click="applicationTemplate"
|
|
|
+ >下载模板</el-link
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -561,23 +592,27 @@ import {
|
|
|
companyList,
|
|
|
adminChange,
|
|
|
handlerChange,
|
|
|
- selectNormalUser
|
|
|
+ selectNormalUser,
|
|
|
+ qperatorQuery,
|
|
|
+ handlerDo,
|
|
|
+ handleUser,
|
|
|
} from "@/api/system/user";
|
|
|
import { uploadFileNew } from "@/api/common/file";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import { treeselect } from "@/api/system/dept";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import { getOwnCompany } from "@/api/common/company";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import { columnQuery, columnfilter } from "@/api/common/columnSetting";
|
|
|
import ColumnSetting from "../../../components/Table/columnSetting.vue";
|
|
|
-import Cookies from 'js-cookie'
|
|
|
+import Cookies from "js-cookie";
|
|
|
|
|
|
export default {
|
|
|
name: "User",
|
|
|
components: { Treeselect, ColumnSetting },
|
|
|
data() {
|
|
|
return {
|
|
|
- //图片预览
|
|
|
+ //图片预览
|
|
|
sfzImageUrl: "",
|
|
|
sfzVisible: false,
|
|
|
sqsImageUrl: "",
|
|
@@ -621,7 +656,7 @@ export default {
|
|
|
open: false,
|
|
|
imgs: false,
|
|
|
openPassWord: false,
|
|
|
- isName:false,
|
|
|
+ isName: false,
|
|
|
//离职日期
|
|
|
leave: false,
|
|
|
// 部门名称
|
|
@@ -743,8 +778,8 @@ export default {
|
|
|
{
|
|
|
pattern: /^[A-Za-z\u4e00-\u9fa5]+$/,
|
|
|
message: "用户姓名不能带有特殊字符",
|
|
|
- trigger: ["blur","change"]
|
|
|
- }
|
|
|
+ trigger: ["blur", "change"],
|
|
|
+ },
|
|
|
],
|
|
|
deptId: [
|
|
|
{
|
|
@@ -798,7 +833,7 @@ export default {
|
|
|
pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/,
|
|
|
message: "密码请包含数字,英文,字符中的两种以上,长度6-20位",
|
|
|
trigger: ["blur", "change"],
|
|
|
- }
|
|
|
+ },
|
|
|
],
|
|
|
},
|
|
|
peoplpeName: false,
|
|
@@ -810,7 +845,7 @@ export default {
|
|
|
deptName(val) {
|
|
|
this.$refs.tree.filter(val);
|
|
|
},
|
|
|
- 'form.userName':'getLoginName'
|
|
|
+ "form.userName": "getLoginName",
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
@@ -857,15 +892,15 @@ export default {
|
|
|
}
|
|
|
columnfilter(this.selfDom);
|
|
|
},
|
|
|
- getLoginName(item){
|
|
|
+ getLoginName(item) {
|
|
|
const userName = item;
|
|
|
selectNormalUser(userName).then((response) => {
|
|
|
- console.log(response,"根据手机号获取用户姓名")
|
|
|
- if(response.data.length > 0){
|
|
|
+ console.log(response, "根据手机号获取用户姓名");
|
|
|
+ if (response.data.length > 0) {
|
|
|
this.$set(this.form, "nickName", response.data[0].nickName);
|
|
|
this.isName = true;
|
|
|
- }else{
|
|
|
- this.$set(this.form, "nickName", '');
|
|
|
+ } else {
|
|
|
+ this.$set(this.form, "nickName", "");
|
|
|
this.isName = false;
|
|
|
}
|
|
|
});
|
|
@@ -910,6 +945,25 @@ export default {
|
|
|
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
|
|
|
(response) => {
|
|
|
this.userList = response.rows;
|
|
|
+ getOwnCompany().then((response) => {
|
|
|
+ this.company = response.data;
|
|
|
+ console.log(this.company.scyId);
|
|
|
+ });
|
|
|
+ qperatorQuery().then((response) => {
|
|
|
+ for (let i = 0; i < this.userList.length; i++) {
|
|
|
+ this.userList[i].qperator = response.data[0].sucrHandler;
|
|
|
+ this.userList[i].company = this.company.scyId;
|
|
|
+ console.log(this.userList[i].userId);
|
|
|
+ handlerDo(this.userList[i]).then((response) => {
|
|
|
+ this.userList[i].handleChange = response.data.handleChange;
|
|
|
+ console.log(response.data.handleChange);
|
|
|
+ });
|
|
|
+ handleUser().then((response) => {
|
|
|
+ this.userList[i].handleCompany = response.data.handleCompany;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ console.log(this.userList);
|
|
|
+ });
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
}
|
|
@@ -941,7 +995,7 @@ export default {
|
|
|
handleStatusChange(row) {
|
|
|
const userId = row.userId || this.ids;
|
|
|
const nickNames = row.nickName || this.ids;
|
|
|
- const status = '0';
|
|
|
+ const status = "0";
|
|
|
this.$confirm(
|
|
|
'是否确认解冻用户姓名为"' + nickNames + '"的数据项?',
|
|
|
"警告",
|
|
@@ -971,7 +1025,7 @@ export default {
|
|
|
this.openPassWord = false;
|
|
|
this.reset();
|
|
|
},
|
|
|
- // 取消按钮
|
|
|
+ // 取消按钮
|
|
|
cancelImg() {
|
|
|
this.imgs = false;
|
|
|
this.reset();
|
|
@@ -1080,19 +1134,21 @@ export default {
|
|
|
spinner: "el-icon-loading",
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
|
- uploadFileNew(fd).then((response) => {
|
|
|
- if (response) {
|
|
|
- this.sfzList.push({
|
|
|
- uid: response.fileId,
|
|
|
- url: response.url + "/" + getToken(),
|
|
|
- });
|
|
|
- setTimeout(() => {
|
|
|
- loading.close();
|
|
|
- }, 2000);
|
|
|
- }
|
|
|
- }).catch((response) => {
|
|
|
- loading.close();
|
|
|
+ uploadFileNew(fd)
|
|
|
+ .then((response) => {
|
|
|
+ if (response) {
|
|
|
+ this.sfzList.push({
|
|
|
+ uid: response.fileId,
|
|
|
+ url: response.url + "/" + getToken(),
|
|
|
});
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.close();
|
|
|
+ }, 2000);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
},
|
|
|
sqsRequest(param) {
|
|
|
let fileObj = param.file; // 相当于input里取得的files
|
|
@@ -1105,19 +1161,21 @@ export default {
|
|
|
spinner: "el-icon-loading",
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
});
|
|
|
- uploadFileNew(fd).then((response) => {
|
|
|
- if (response) {
|
|
|
- this.sqsList.push({
|
|
|
- uid: response.fileId,
|
|
|
- url: response.url + "/" + getToken(),
|
|
|
- });
|
|
|
- setTimeout(() => {
|
|
|
- loading.close();
|
|
|
- }, 2000);
|
|
|
- }
|
|
|
- }).catch((response) => {
|
|
|
- loading.close();
|
|
|
+ uploadFileNew(fd)
|
|
|
+ .then((response) => {
|
|
|
+ if (response) {
|
|
|
+ this.sqsList.push({
|
|
|
+ uid: response.fileId,
|
|
|
+ url: response.url + "/" + getToken(),
|
|
|
});
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.close();
|
|
|
+ }, 2000);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
@@ -1143,16 +1201,22 @@ export default {
|
|
|
},
|
|
|
/** 申请变更经办人 */
|
|
|
handleHandler(row) {
|
|
|
- const userId = row.userId || this.ids;
|
|
|
- this.form.userIds = userId;
|
|
|
- this.imgs = true;
|
|
|
- this.titles = "申请变更经办人";
|
|
|
+ const userId = row.userId || this.ids;
|
|
|
+ this.form.userIds = userId;
|
|
|
+ this.imgs = true;
|
|
|
+ this.titles = "申请变更经办人";
|
|
|
},
|
|
|
/** 确认变更经办人*/
|
|
|
confirmHandler(row) {
|
|
|
+ console.log(row);
|
|
|
this.resetQuery();
|
|
|
- Cookies.set("/user/detail/" + row.userId, this.$route.fullPath)
|
|
|
- this.$router.push({ path: "/user/detail/" + row.userId });
|
|
|
+ Cookies.set(
|
|
|
+ "/user/detail/" + row.userId + "/" + row.scyId,
|
|
|
+ this.$route.fullPath
|
|
|
+ );
|
|
|
+ this.$router.push({
|
|
|
+ path: "/user/detail/" + row.userId + "/" + row.scyId,
|
|
|
+ });
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -1171,29 +1235,29 @@ export default {
|
|
|
const scyId = row.scyId;
|
|
|
const remark = row.remark;
|
|
|
const email = row.email;
|
|
|
- const deptId = row.deptId;
|
|
|
+ const deptId = row.deptId;
|
|
|
const nickName = row.nickName;
|
|
|
const userName = row.userName;
|
|
|
- if(remark){
|
|
|
- this.$set(this.form, "remark", remark);
|
|
|
+ if (remark) {
|
|
|
+ this.$set(this.form, "remark", remark);
|
|
|
}
|
|
|
- if(email){
|
|
|
- this.$set(this.form, "email", email);
|
|
|
+ if (email) {
|
|
|
+ this.$set(this.form, "email", email);
|
|
|
}
|
|
|
- if(deptId){
|
|
|
- this.$set(this.form, "deptId", deptId);
|
|
|
+ if (deptId) {
|
|
|
+ this.$set(this.form, "deptId", deptId);
|
|
|
}
|
|
|
- if(nickName){
|
|
|
- this.$set(this.form, "nickName", nickName);
|
|
|
+ if (nickName) {
|
|
|
+ this.$set(this.form, "nickName", nickName);
|
|
|
}
|
|
|
- if(userName){
|
|
|
- this.$set(this.form, "userName", userName);
|
|
|
+ if (userName) {
|
|
|
+ this.$set(this.form, "userName", userName);
|
|
|
}
|
|
|
- if(userId){
|
|
|
- this.$set(this.form, "userId", userId);
|
|
|
+ if (userId) {
|
|
|
+ this.$set(this.form, "userId", userId);
|
|
|
}
|
|
|
- if(scyId){
|
|
|
- this.$set(this.form, "scyId", scyId);
|
|
|
+ if (scyId) {
|
|
|
+ this.$set(this.form, "scyId", scyId);
|
|
|
}
|
|
|
getUser(userId, scyId).then((response) => {
|
|
|
this.uinParams.ssId = response.data.staffCode;
|
|
@@ -1241,26 +1305,26 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- /** 申请变更经办人 */
|
|
|
+ /** 申请变更经办人 */
|
|
|
submitImg() {
|
|
|
- this.form.sfzList = this.sfzList
|
|
|
- this.form.sqsList = this.sqsList
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: "Loading",
|
|
|
- spinner: "el-icon-loading",
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
- });
|
|
|
- handlerChange(this.form)
|
|
|
- .then((response) => {
|
|
|
- loading.close();
|
|
|
- this.msgSuccess("申请成功");
|
|
|
- this.imgs = false;
|
|
|
- this.getList();
|
|
|
- })
|
|
|
- .catch((response) => {
|
|
|
- loading.close();
|
|
|
- });
|
|
|
+ this.form.sfzList = this.sfzList;
|
|
|
+ this.form.sqsList = this.sqsList;
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ handlerChange(this.form)
|
|
|
+ .then((response) => {
|
|
|
+ loading.close();
|
|
|
+ this.msgSuccess("申请成功");
|
|
|
+ this.imgs = false;
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm: function () {
|
|
@@ -1406,17 +1470,35 @@ export default {
|
|
|
/** 安心签开户及管理授权书(模板) */
|
|
|
authorizationTemplate() {
|
|
|
this.download(
|
|
|
- "system_cc/ownUser/authorization",{},
|
|
|
+ "system_cc/ownUser/authorization",
|
|
|
+ {},
|
|
|
`安心签开户及管理授权书(模板).docx`
|
|
|
);
|
|
|
},
|
|
|
- /** 安心签用户信息变更申请表 */
|
|
|
+ /** 安心签用户信息变更申请表 */
|
|
|
applicationTemplate() {
|
|
|
- this.download(
|
|
|
- "system_cc/ownUser/apply",{},
|
|
|
+ this.download(
|
|
|
+ "system_cc/ownUser/apply",
|
|
|
+ {},
|
|
|
`安心签用户信息变更申请表.xlsx`
|
|
|
);
|
|
|
},
|
|
|
+ //上传前校验
|
|
|
+ beforeAvatarUpload(file) {
|
|
|
+ const isJPG =
|
|
|
+ file.type === "image/jpeg" ||
|
|
|
+ file.type === "image/png" ||
|
|
|
+ file.type === "image/bmp";
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 3;
|
|
|
+
|
|
|
+ if (!isJPG) {
|
|
|
+ this.$message.error("上传图片只能是 JPG/PNG/BMP 格式");
|
|
|
+ }
|
|
|
+ if (!isLt2M) {
|
|
|
+ this.$message.error("上传图片大小不能超过 3MB");
|
|
|
+ }
|
|
|
+ return isJPG && isLt2M;
|
|
|
+ },
|
|
|
// 文件上传中处理
|
|
|
handleFileUploadProgress(event, file, fileList) {
|
|
|
this.upload.isUploading = true;
|