Commit 59b92e45 authored by 黄奎's avatar 黄奎

员工列表修改

parent 1d27c6f5
...@@ -31,6 +31,13 @@ ...@@ -31,6 +31,13 @@
</el-table-column> </el-table-column>
<el-table-column prop="CreateDateStr" label="添加日期" width="220"> <el-table-column prop="CreateDateStr" label="添加日期" width="220">
</el-table-column> </el-table-column>
<el-table-column prop="Status" label="状态" width="220">
<template slot-scope="scope">
<el-switch v-model="scope.row.Status" active-color="#409EFF" :active-value="0" :inactive-value="1"
@change="RemmoveRole(scope.row)">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" width="260"> <el-table-column label="操作" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip slot="label" class="item" effect="dark" content="编辑" placement="top"> <el-tooltip slot="label" class="item" effect="dark" content="编辑" placement="top">
...@@ -40,9 +47,6 @@ ...@@ -40,9 +47,6 @@
<img @click="upPwddialog=true,pwdMsg.EmpId=scope.row.EmpId" style="margin:0 10px;" <img @click="upPwddialog=true,pwdMsg.EmpId=scope.row.EmpId" style="margin:0 10px;"
src="../../assets/img/userman/change.png" alt=""> src="../../assets/img/userman/change.png" alt="">
</el-tooltip> </el-tooltip>
<el-tooltip slot="label" class="item" effect="dark" content="删除" placement="top">
<img @click="RemmoveRole(scope.row)" src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -142,7 +146,7 @@ ...@@ -142,7 +146,7 @@
trigger: "blur" trigger: "blur"
}] }]
}, },
LoginUrl:"",//登录地址 LoginUrl: "", //登录地址
}; };
}, },
created() { created() {
...@@ -158,7 +162,7 @@ ...@@ -158,7 +162,7 @@
hostUrl += window.location.host; hostUrl += window.location.host;
} }
hostUrl += "/#/login?mall_id=" + this.getLocalStorage().MallBaseId; hostUrl += "/#/login?mall_id=" + this.getLocalStorage().MallBaseId;
this.LoginUrl=hostUrl; this.LoginUrl = hostUrl;
}, },
UpdatePwd() { UpdatePwd() {
this.apipost("/api/Employee/SetEmployeePwd", this.pwdMsg, res => { this.apipost("/api/Employee/SetEmployeePwd", this.pwdMsg, res => {
...@@ -240,17 +244,40 @@ ...@@ -240,17 +244,40 @@
//删除 //删除
RemmoveRole(item) { RemmoveRole(item) {
var that = this; var that = this;
that.Confirm("是否要删除?", function () { var msg = "";
if (item.Status == 1) {
msg = "是否要删除此【" + item.EmpName + "】?删除后将无法使用系统!";
} else {
msg = "是否要恢复此【" + item.EmpName + "】?恢复后可以登录系统!";
}
that.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.apipost("/api/Employee/RemoveEmployee", { that.apipost("/api/Employee/RemoveEmployee", {
EmpId: item.EmpId EmpId: item.EmpId,
status: item.Status
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.Success("操作成功!");
that.getList(); that.getList();
} else { } else {
if (item.Status == 1) {
item.Status = 0;
} else if (item.Status == 0) {
item.Status = 1;
}
that.Info(res.data.message); that.Info(res.data.message);
} }
}) });
}) }).catch(() => {
if (item.Status == 1) {
item.Status = 0;
} else if (item.Status == 0) {
item.Status = 1;
}
});
}, },
handleCheckAllChange(val) { handleCheckAllChange(val) {
this.checkArr = []; this.checkArr = [];
...@@ -264,7 +291,6 @@ ...@@ -264,7 +291,6 @@
let checkedCount = value.length; let checkedCount = value.length;
this.checkAll = checkedCount === this.RoleList.length; this.checkAll = checkedCount === this.RoleList.length;
}, },
copyCode() { copyCode() {
var copycode = document.getElementById("my_Link").innerHTML; var copycode = document.getElementById("my_Link").innerHTML;
var input = document.createElement("input"); // 直接构建input var input = document.createElement("input"); // 直接构建input
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment