|
@@ -230,7 +230,23 @@
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleChange(scope.row)"
|
|
|
v-hasPermi="['system:ownUser:adminChange']"
|
|
|
- >变更权限</el-button
|
|
|
+ >变更管理员</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleHandler(scope.row)"
|
|
|
+ v-hasPermi="['system:ownUser:handlerChange']"
|
|
|
+ >变更经办人</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="confirmHandler(scope.row)"
|
|
|
+ v-hasPermi="['system:ownUser:confirmChange']"
|
|
|
+ >确认变更</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
v-if="scope.row.userId !== 1"
|
|
@@ -353,6 +369,69 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 申请变更经办人-->
|
|
|
+ <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-upload
|
|
|
+ ref="upload"
|
|
|
+ class="upload-demo"
|
|
|
+ :class="{ uoloadSty: showBtnImg, disUoloadSty: noneBtnImg }"
|
|
|
+ action=""
|
|
|
+ accept=".jpg, .jpeg, .png, .JPG, .JPEG, .PNG"
|
|
|
+ :http-request="sfzRequest"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="beforeRemove"
|
|
|
+ :on-change="dealImgChange"
|
|
|
+ multiple
|
|
|
+ :limit="1"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ list-type="picture-card"
|
|
|
+ :file-list="sfzList"
|
|
|
+ :auto-upload="true"
|
|
|
+ >
|
|
|
+ <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>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="安心签用户信息变更申请表">
|
|
|
+ <el-upload
|
|
|
+ ref="upload"
|
|
|
+ class="upload-demo"
|
|
|
+ :class="{ uoloadSty: showsBtnImg, disUoloadSty: nonesBtnImg }"
|
|
|
+ action=""
|
|
|
+ accept=".jpg, .jpeg, .png, .JPG, .JPEG, .PNG"
|
|
|
+ :http-request="sqsRequest"
|
|
|
+ :on-preview="sqsPictureCardPreview"
|
|
|
+ :on-remove="beforeRemove"
|
|
|
+ :on-change="dealImgChange"
|
|
|
+ multiple
|
|
|
+ :limit="1"
|
|
|
+ :on-exceed="sqsExceed"
|
|
|
+ list-type="picture-card"
|
|
|
+ :file-list="sqsList"
|
|
|
+ :auto-upload="true"
|
|
|
+ >
|
|
|
+ <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>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitImg">确 定</el-button>
|
|
|
+ <el-button @click="cancelImg">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<!-- 重置密码 -->
|
|
|
<el-dialog
|
|
|
:title="title"
|
|
@@ -442,19 +521,36 @@ import {
|
|
|
getRoleDept,
|
|
|
companyList,
|
|
|
adminChange,
|
|
|
+ handlerChange
|
|
|
} 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 "@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'
|
|
|
|
|
|
export default {
|
|
|
name: "User",
|
|
|
components: { Treeselect, ColumnSetting },
|
|
|
data() {
|
|
|
return {
|
|
|
+ //图片预览
|
|
|
+ sfzImageUrl: "",
|
|
|
+ sfzVisible: false,
|
|
|
+ sqsImageUrl: "",
|
|
|
+ sqsVisible: false,
|
|
|
+ showBtnImg: false,
|
|
|
+ noneBtnImg: false,
|
|
|
+ showsBtnImg: false,
|
|
|
+ nonesBtnImg: false,
|
|
|
+
|
|
|
+ sfzList: [],
|
|
|
+ sqsList: [],
|
|
|
+
|
|
|
+ limitCountImg: 1,
|
|
|
//当前登录用户企业id
|
|
|
signCompanyId: "",
|
|
|
//姓名
|
|
@@ -477,11 +573,13 @@ export default {
|
|
|
userList: null,
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
+ titles: "",
|
|
|
// 部门树选项
|
|
|
deptOptions: undefined,
|
|
|
rodeptOptions: undefined,
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+ imgs: false,
|
|
|
openPassWord: false,
|
|
|
//离职日期
|
|
|
leave: false,
|
|
@@ -803,6 +901,11 @@ export default {
|
|
|
this.openPassWord = false;
|
|
|
this.reset();
|
|
|
},
|
|
|
+ // 取消按钮
|
|
|
+ cancelImg() {
|
|
|
+ this.imgs = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
@@ -847,6 +950,100 @@ export default {
|
|
|
this.single = selection.length != 1;
|
|
|
this.multiple = !selection.length;
|
|
|
},
|
|
|
+ //文件移除提示
|
|
|
+ beforeRemove(file, sfzList) {
|
|
|
+ for (let i = 0; i < this.sfzList.length; i++) {
|
|
|
+ if (file.uid == this.sfzList[i].uid) {
|
|
|
+ this.sfzList.splice(i, 1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.noneBtnImg = sfzList.length >= this.limitCountImg;
|
|
|
+ },
|
|
|
+ sqsRemove(file, sqsList) {
|
|
|
+ for (let i = 0; i < this.sqsList.length; i++) {
|
|
|
+ if (file.uid == this.sqsList[i].uid) {
|
|
|
+ this.sqsList.splice(i, 1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.nonesBtnImg = sqsList.length >= this.limitCountImg;
|
|
|
+ },
|
|
|
+ handleExceed(file, sfzList) {
|
|
|
+ this.$message.warning(`当前限制选择 1 个文件`);
|
|
|
+ },
|
|
|
+ sqsExceed(file, sqsList) {
|
|
|
+ this.$message.warning(`当前限制选择 1 个文件`);
|
|
|
+ },
|
|
|
+ //图片预览
|
|
|
+ handlePictureCardPreview(file) {
|
|
|
+ this.sfzImageUrl = file.url;
|
|
|
+ this.sfzVisible = true;
|
|
|
+ },
|
|
|
+ sqsPictureCardPreview(file) {
|
|
|
+ this.sqsImageUrl = file.url;
|
|
|
+ this.sqsVisible = true;
|
|
|
+ },
|
|
|
+ dealImgChange(file, sfzList) {
|
|
|
+ this.noneBtnImg = sfzList.length >= this.limitCountImg;
|
|
|
+ },
|
|
|
+ dealImgChange(file, sqsList) {
|
|
|
+ this.nonesBtnImg = sqsList.length >= this.limitCountImg;
|
|
|
+ },
|
|
|
+ //上传
|
|
|
+ // submitUpload() {
|
|
|
+ // this.$refs.upload.submit();
|
|
|
+ // },
|
|
|
+ // sqsUpload() {
|
|
|
+ // this.$refs.upload.submit();
|
|
|
+ // },
|
|
|
+ //手动上传文件触发
|
|
|
+ sfzRequest(param) {
|
|
|
+ let fileObj = param.file; // 相当于input里取得的files
|
|
|
+ let fd = new FormData(); // FormData 对象
|
|
|
+ fd.append("file", fileObj); // 文件对象
|
|
|
+ fd.append("fileType", "00"); //文件类型
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "Loading",
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ sqsRequest(param) {
|
|
|
+ let fileObj = param.file; // 相当于input里取得的files
|
|
|
+ let fd = new FormData(); // FormData 对象
|
|
|
+ fd.append("file", fileObj); // 文件对象
|
|
|
+ fd.append("fileType", "00"); //文件类型
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "Loading",
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.roleShow = true;
|
|
@@ -868,8 +1065,21 @@ export default {
|
|
|
this.form.password = this.initPassword;
|
|
|
});
|
|
|
},
|
|
|
- /** 修改按钮操作 */
|
|
|
+ /** 申请变更经办人 */
|
|
|
+ handleHandler(row) {
|
|
|
+ const userId = row.userId || this.ids;
|
|
|
+ this.form.userIds = userId;
|
|
|
+ this.imgs = true;
|
|
|
+ this.titles = "申请变更经办人";
|
|
|
+ },
|
|
|
+ /** 确认变更经办人*/
|
|
|
+ confirmHandler(row) {
|
|
|
+ Cookies.set("/user/detail/" + row.userId, this.$route.fullPath)
|
|
|
+ this.$router.push({ path: "/user/detail/" + row.userId });
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
+ console.log(row)
|
|
|
if (this.signCompanyId == "000000") {
|
|
|
this.rodeptShow = false;
|
|
|
} else if (this.signCompanyId != "000000") {
|
|
@@ -939,6 +1149,27 @@ 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();
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm: function () {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
@@ -1079,6 +1310,20 @@ export default {
|
|
|
`user_${new Date().getTime()}.xlsx`
|
|
|
);
|
|
|
},
|
|
|
+ /** 安心签开户及管理授权书(模板) */
|
|
|
+ authorizationTemplate() {
|
|
|
+ this.download(
|
|
|
+ "system_cc/ownUser/authorization",{},
|
|
|
+ `安心签开户及管理授权书(模板).docx`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ /** 安心签用户信息变更申请表 */
|
|
|
+ applicationTemplate() {
|
|
|
+ this.download(
|
|
|
+ "system_cc/ownUser/apply",{},
|
|
|
+ `安心签用户信息变更申请表.xlsx`
|
|
|
+ );
|
|
|
+ },
|
|
|
// 文件上传中处理
|
|
|
handleFileUploadProgress(event, file, fileList) {
|
|
|
this.upload.isUploading = true;
|