|
|
@ -53,13 +53,7 @@ |
|
|
|
propertyName: '', |
|
|
|
propertyTel: '', |
|
|
|
propertyManager: '', |
|
|
|
propertyAddress: '', |
|
|
|
revision: '', |
|
|
|
delFlag: '', |
|
|
|
parentDeptIds: '', |
|
|
|
parentDeptNames: '', |
|
|
|
allDeptIds: '', |
|
|
|
allDeptNames: '' |
|
|
|
propertyAddress: '' |
|
|
|
}, |
|
|
|
options: [] |
|
|
|
} |
|
|
@ -81,24 +75,6 @@ |
|
|
|
], |
|
|
|
propertyAddress: [ |
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
], |
|
|
|
revision: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
], |
|
|
|
delFlag: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
], |
|
|
|
parentDeptIds: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
], |
|
|
|
parentDeptNames: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
], |
|
|
|
allDeptIds: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
], |
|
|
|
allDeptNames: [ |
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
@ -106,8 +82,8 @@ |
|
|
|
methods: { |
|
|
|
init () { |
|
|
|
// 获取下拉菜单 |
|
|
|
this.getByLoginUser(); |
|
|
|
this.visible = true; |
|
|
|
this.getByLoginUser() |
|
|
|
this.visible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['dataForm'].resetFields() |
|
|
|
if (this.dataForm.id) { |
|
|
@ -117,20 +93,20 @@ |
|
|
|
}, |
|
|
|
getByLoginUser () { |
|
|
|
this.$http |
|
|
|
.get(`/sys/user/deptOptions/getDeptAuthByUser`) |
|
|
|
.get(`/sys/user/deptOptions/getBusinessDeptByUser`) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
this.options = res.data.options |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleChange (value) { |
|
|
|
this.dataForm.gridId = value.slice(-1).shift(); |
|
|
|
this.dataForm.gridId = value.slice(-1).shift() |
|
|
|
}, |
|
|
|
// 获取信息 |
|
|
|
getInfo () { |
|
|
@ -141,16 +117,16 @@ |
|
|
|
this.dataForm = { |
|
|
|
...this.dataForm, |
|
|
|
...res.data |
|
|
|
}; |
|
|
|
this.dataForm.allDeptIds = res.data.allDeptIds.split(",").slice(1); |
|
|
|
this.loading = false; |
|
|
|
} |
|
|
|
this.dataForm.allDeptIds = res.data.allDeptIds.split(',').slice(1) |
|
|
|
this.loading = false |
|
|
|
}).catch(() => { |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
|
this.dataForm.allDeptNames = this.$refs['grid'].inputValue; |
|
|
|
this.dataForm.allDeptNames = this.$refs['grid'].inputValue |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|
if (!valid) { |
|
|
|
return false |
|
|
|