|
|
@ -48,7 +48,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import debounce from 'lodash/debounce' |
|
|
import debounce from 'lodash/debounce' |
|
|
import Cookies from "js-cookie"; |
|
|
import Cookies from 'js-cookie' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
data () { |
|
|
data () { |
|
|
@ -62,21 +62,11 @@ |
|
|
policeNo: '', |
|
|
policeNo: '', |
|
|
deptName: '', |
|
|
deptName: '', |
|
|
deptId: '', |
|
|
deptId: '', |
|
|
displayFlag: '1', |
|
|
displayFlag: '1' |
|
|
delFlag: '', |
|
|
|
|
|
revision: '', |
|
|
|
|
|
createdBy: '', |
|
|
|
|
|
createdTime: '', |
|
|
|
|
|
updatedBy: '', |
|
|
|
|
|
updatedTime: '', |
|
|
|
|
|
allDeptIds: '', |
|
|
|
|
|
allDeptNames: '', |
|
|
|
|
|
parentDeptIds: '', |
|
|
|
|
|
parentDeptNames: '' |
|
|
|
|
|
}, |
|
|
}, |
|
|
options: [], |
|
|
options: [], |
|
|
loading: false, |
|
|
loading: false, |
|
|
uploadUrl: '', |
|
|
uploadUrl: '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created () { |
|
|
created () { |
|
|
@ -107,36 +97,6 @@ |
|
|
], |
|
|
], |
|
|
displayFlag: [ |
|
|
displayFlag: [ |
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
], |
|
|
|
|
|
delFlag: [ |
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
|
|
], |
|
|
|
|
|
revision: [ |
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
|
|
], |
|
|
|
|
|
createdBy: [ |
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
|
|
], |
|
|
|
|
|
createdTime: [ |
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
|
|
], |
|
|
|
|
|
updatedBy: [ |
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
|
|
], |
|
|
|
|
|
updatedTime: [ |
|
|
|
|
|
{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'} |
|
|
|
|
|
], |
|
|
|
|
|
parentDeptIds: [ |
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
|
|
], |
|
|
|
|
|
parentDeptNames: [ |
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'} |
|
|
|
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -144,8 +104,8 @@ |
|
|
methods: { |
|
|
methods: { |
|
|
init () { |
|
|
init () { |
|
|
// 获取下拉菜单 |
|
|
// 获取下拉菜单 |
|
|
this.getByLoginUser(); |
|
|
this.getByLoginUser() |
|
|
this.visible = true; |
|
|
this.visible = true |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs['dataForm'].resetFields() |
|
|
this.$refs['dataForm'].resetFields() |
|
|
if (this.dataForm.id) { |
|
|
if (this.dataForm.id) { |
|
|
@ -182,7 +142,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
deptHandleChange (value) { |
|
|
deptHandleChange (value) { |
|
|
this.dataForm.deptId = value.slice(-1).shift(); |
|
|
this.dataForm.deptId = value.slice(-1).shift() |
|
|
}, |
|
|
}, |
|
|
handleAvatarActSuccess (res, file) { |
|
|
handleAvatarActSuccess (res, file) { |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
@ -196,7 +156,7 @@ |
|
|
}, |
|
|
}, |
|
|
// 表单提交 |
|
|
// 表单提交 |
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
dataFormSubmitHandle: debounce(function () { |
|
|
this.dataForm.deptName = this.$refs['grid'].inputValue; |
|
|
this.dataForm.deptName = this.$refs['grid'].inputValue |
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
if (!valid) { |
|
|
if (!valid) { |
|
|
return false |
|
|
return false |
|
|
|