|
|
@ -2,7 +2,8 @@ |
|
|
|
<el-dialog :visible.sync="visible" |
|
|
|
:title="!dataForm.id ? $t('add') : $t('update')" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false"> |
|
|
|
:close-on-press-escape="false" |
|
|
|
customClass="customWidth"> |
|
|
|
<el-form :model="dataForm" |
|
|
|
:rules="dataRule" |
|
|
|
ref="dataForm" |
|
|
@ -11,12 +12,12 @@ |
|
|
|
<el-form-item prop="name" |
|
|
|
:label="$t('dept.name')"> |
|
|
|
<el-input v-model="dataForm.name" |
|
|
|
:placeholder="$t('dept.name')"></el-input> |
|
|
|
:placeholder="$t('dept.name')" style="width: 75%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="partyCode" |
|
|
|
:label="$t('dept.partyCode')"> |
|
|
|
<el-input v-model="dataForm.partyCode" |
|
|
|
:placeholder="$t('dept.partyCode')" :disabled="true"></el-input> |
|
|
|
:placeholder="$t('dept.partyCode')" :disabled="true" style="width: 75%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="parentName" |
|
|
|
:label="$t('dept.parentName')" |
|
|
@ -38,7 +39,7 @@ |
|
|
|
<el-input v-model="dataForm.parentName" |
|
|
|
v-popover:deptListPopover |
|
|
|
:readonly="true" |
|
|
|
:placeholder="$t('dept.parentName')" :disabled="true"> |
|
|
|
:placeholder="$t('dept.parentName')" :disabled="true" style="width: 75%"> |
|
|
|
<i v-if="$store.state.user.superAdmin === 1 && dataForm.pid !== '0'" |
|
|
|
slot="suffix" |
|
|
|
@click.stop="deptListTreeSetDefaultHandle()" |
|
|
@ -50,7 +51,7 @@ |
|
|
|
prop="typeKey"> |
|
|
|
<el-select v-model="dataForm.typeKey" |
|
|
|
@change="changeOrgType" |
|
|
|
placeholder="机构类型" :disabled="true"> |
|
|
|
placeholder="机构类型" :disabled="true" style="width: 75%"> |
|
|
|
<el-option v-for="item in secondOrgDictList" |
|
|
|
:key="item.dictValue" |
|
|
|
:label="item.dictName" |
|
|
@ -63,13 +64,13 @@ |
|
|
|
<el-input-number v-model="dataForm.sort" |
|
|
|
controls-position="right" |
|
|
|
:min="0" |
|
|
|
:label="$t('dept.sort')"></el-input-number> |
|
|
|
:label="$t('dept.sort')" style="width: 75%"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<template slot="footer"> |
|
|
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
@click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
|
|
|
@click="dataFormSubmitHandle()" :disabled="isAble">{{ $t('confirm') }}</el-button> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</template> |
|
|
@ -82,6 +83,7 @@ export default { |
|
|
|
visible: false, |
|
|
|
deptList: [], |
|
|
|
deptListVisible: false, |
|
|
|
isAble: false, |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
name: '', |
|
|
@ -179,15 +181,18 @@ export default { |
|
|
|
if (!valid) { |
|
|
|
return false |
|
|
|
} |
|
|
|
this.isAble = true |
|
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/cloudAnalysis/metaSysdeptManager', this.dataForm).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.isAble = false |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.isAble = false |
|
|
|
this.visible = false |
|
|
|
this.$emit('refreshDataList') |
|
|
|
} |
|
|
@ -208,4 +213,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.customWidth { |
|
|
|
width:30%; |
|
|
|
} |
|
|
|
</style> |
|
|
|