| | |
| | | batchDel: function () { |
| | | console.log(this.checkedKeys) |
| | | if (this.checkedKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!') |
| | | // this.$message.warning('请选择一条记录!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadTree() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | that.departTree.push(temp) |
| | | } |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | if (!this.currSelected.id) { |
| | | this.$message.warning('请点击选择要修改部门!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请点击选择要修改部门" |
| | | }); |
| | | return |
| | | } |
| | | |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success('保存成功!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"保存成功" |
| | | }); |
| | | this.loadTree() |
| | | } else { |
| | | this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } else if (num == 2) { |
| | | let key = this.currSelected.key |
| | | if (!key) { |
| | | this.$message.warning('请先点击选中上级部门!') |
| | | // this.$message.warning('请先点击选中上级部门!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请先点击选中上级部门!" |
| | | }); |
| | | return false |
| | | } |
| | | this.$refs.departModal.add(this.selectedKeys) |
| | |
| | | if (resp.success) { |
| | | //删除成功后,去除已选中中的数据 |
| | | that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1); |
| | | that.$message.success('删除成功!') |
| | | // that.$message.success('删除成功!') |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:"删除成功" |
| | | }); |
| | | that.loadTree() |
| | | //删除后同步清空右侧基本信息内容 |
| | | let orgCode=that.model.orgCode; |
| | |
| | | that.onClearSelected() |
| | | } |
| | | } else { |
| | | that.$message.warning('删除失败!') |
| | | // that.$message.warning('删除失败!') |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"删除失败" |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | } |
| | | //---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------ |
| | | |
| | | |
| | | }, |
| | | created() { |
| | | this.currFlowId = this.$route.params.id |