|
|
@@ -1076,31 +1076,55 @@ export default {
|
|
|
},
|
|
|
//删除机构或部门
|
|
|
deleteMechanism(data) {
|
|
|
- let that = this;
|
|
|
- that
|
|
|
- .$confirm("此操作将删除该数据, 是否继续?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- that.$api.dept.deleteDept(data.id).then((res) => {
|
|
|
+ this.$prompt('请输入密码', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPattern: /.+/,
|
|
|
+ inputErrorMessage: '请输入密码'
|
|
|
+ }).then(({ value }) => {
|
|
|
+ this.$api.dept.deptDelete({password:value ,deptId:data.id,code:'dept'}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
this.findSubDeptPage();
|
|
|
this.findTreeData();
|
|
|
this.currentTreeNode = null;
|
|
|
- that.$message({
|
|
|
+ this.$message({
|
|
|
type: "success",
|
|
|
message: "删除成功!",
|
|
|
});
|
|
|
- } else {
|
|
|
- that.$message({
|
|
|
- type: "warning",
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
message: res.msg,
|
|
|
});
|
|
|
}
|
|
|
- });
|
|
|
})
|
|
|
+ })
|
|
|
+ // let that = this;
|
|
|
+ // that
|
|
|
+ // .$confirm("此操作将删除该数据, 是否继续?", "提示", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // type: "warning",
|
|
|
+ // })
|
|
|
+ // .then(() => {
|
|
|
+ // that.$api.dept.deleteDept(data.id).then((res) => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.findSubDeptPage();
|
|
|
+ // this.findTreeData();
|
|
|
+ // this.currentTreeNode = null;
|
|
|
+ // that.$message({
|
|
|
+ // type: "success",
|
|
|
+ // message: "删除成功!",
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // that.$message({
|
|
|
+ // type: "warning",
|
|
|
+ // message: res.msg,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // })
|
|
|
},
|
|
|
handleDeleteFlag(data) {
|
|
|
let that = this;
|