|
@ -23,6 +23,19 @@ |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="机构类型" |
|
|
|
|
|
prop="typeKeyList"> |
|
|
|
|
|
<el-select v-model="dataForm.typeKeyList" |
|
|
|
|
|
@change="changeOrgType" |
|
|
|
|
|
multiple |
|
|
|
|
|
placeholder="机构类型"> |
|
|
|
|
|
<el-option v-for="item in secondOrgDictList" |
|
|
|
|
|
:key="item.dictValue" |
|
|
|
|
|
:label="item.dictName" |
|
|
|
|
|
:value="item.dictValue"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item label="排序" |
|
|
<el-form-item label="排序" |
|
|
prop="sort"> |
|
|
prop="sort"> |
|
|
<el-input-number v-model="dataForm.sort" |
|
|
<el-input-number v-model="dataForm.sort" |
|
@ -70,8 +83,10 @@ export default { |
|
|
createdTime: '', |
|
|
createdTime: '', |
|
|
updatedBy: '', |
|
|
updatedBy: '', |
|
|
updatedTime: '', |
|
|
updatedTime: '', |
|
|
categoryCode: '' |
|
|
categoryCode: '', |
|
|
|
|
|
typeKeyList: [] |
|
|
}, |
|
|
}, |
|
|
|
|
|
secondOrgDictList: [], |
|
|
options: [{ |
|
|
options: [{ |
|
|
id: '0', |
|
|
id: '0', |
|
|
name: '不可用' |
|
|
name: '不可用' |
|
@ -113,6 +128,9 @@ export default { |
|
|
], |
|
|
], |
|
|
updatedTime: [ |
|
|
updatedTime: [ |
|
|
{ required: false, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
{ required: false, message: this.$t('validate.required'), trigger: 'blur' } |
|
|
|
|
|
], |
|
|
|
|
|
typeKeyList: [ |
|
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'change' } |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -126,6 +144,33 @@ export default { |
|
|
this.getInfo() |
|
|
this.getInfo() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
this.getSecondOrgDicList() |
|
|
|
|
|
}, |
|
|
|
|
|
// 改变机构类型 |
|
|
|
|
|
changeOrgType (item) { |
|
|
|
|
|
var branch = '' |
|
|
|
|
|
var type_key = '' |
|
|
|
|
|
for (var i = 0; i < item.length; i++) { |
|
|
|
|
|
if (item[i] === 'branch_grid_party' || item[i] === 'branch_enterprise_party') { |
|
|
|
|
|
branch += (item[i] + ',') |
|
|
|
|
|
} else { |
|
|
|
|
|
type_key += (item[i] + ',') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
var key = branch + type_key |
|
|
|
|
|
if (key.length > 0) { |
|
|
|
|
|
key = key.substring(0, key.length - 1) |
|
|
|
|
|
} |
|
|
|
|
|
this.dataForm.typeKey = key |
|
|
|
|
|
}, |
|
|
|
|
|
// 获取二级党委字典列表 |
|
|
|
|
|
getSecondOrgDicList () { |
|
|
|
|
|
this.$http.get(`/sys/dict/listSimple/org_type`).then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
this.secondOrgDictList = res.data |
|
|
|
|
|
}).catch(() => { }) |
|
|
}, |
|
|
}, |
|
|
// 获取信息 |
|
|
// 获取信息 |
|
|
getInfo () { |
|
|
getInfo () { |
|
@ -133,10 +178,14 @@ export default { |
|
|
if (res.code !== 0) { |
|
|
if (res.code !== 0) { |
|
|
return this.$message.error(res.msg) |
|
|
return this.$message.error(res.msg) |
|
|
} |
|
|
} |
|
|
|
|
|
this.dataForm.typeKey = '' |
|
|
this.dataForm = { |
|
|
this.dataForm = { |
|
|
...this.dataForm, |
|
|
...this.dataForm, |
|
|
...res.data |
|
|
...res.data |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.dataForm.typeKey !== '' && this.dataForm.typeKey !== null) { |
|
|
|
|
|
this.dataForm.typeKeyList = this.dataForm.typeKey.split(',') |
|
|
|
|
|
} |
|
|
}).catch(() => {}) |
|
|
}).catch(() => {}) |
|
|
}, |
|
|
}, |
|
|
// 表单提交 |
|
|
// 表单提交 |
|
|