27133
This commit is contained in:
@@ -8,8 +8,15 @@
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right">
|
||||
<el-form-item label="地区" style="width: 100%;" prop="codeName">
|
||||
<span style="color: #666;">{{ form.areaName }}</span>
|
||||
<el-form-item label="地区" style="width: 100%;" prop="areaId" :rules="[{ required: true, message: '请选择地区', trigger: 'change' }]">
|
||||
<ai-area-select
|
||||
placeholder="请选择地区"
|
||||
clearable
|
||||
always-show
|
||||
:instance="instance"
|
||||
v-model="form.areaId"
|
||||
@fullname="v => form.areaName = v"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%" label="名称" prop="name" :rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]">
|
||||
<el-input size="small" placeholder="请输入名称" show-word-limit v-model="form.name" :maxlength="30"></el-input>
|
||||
@@ -77,13 +84,6 @@
|
||||
},
|
||||
|
||||
created () {
|
||||
this.getAreaList()
|
||||
|
||||
if (this.params && this.params.areaId && !this.params.id) {
|
||||
this.form.areaId = this.params.areaId
|
||||
this.form.areaName = this.params.areaName
|
||||
}
|
||||
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getInfo(this.params.id)
|
||||
@@ -99,23 +99,6 @@
|
||||
})
|
||||
},
|
||||
|
||||
getAreaList() {
|
||||
this.instance.post(`/admin/area/queryAreaByParentId?id=341021104000`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.areaList = res.data.map(item => {
|
||||
item.dictName = item.name
|
||||
item.dictValue = item.id
|
||||
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onClose () {
|
||||
this.form.explain = ''
|
||||
},
|
||||
|
||||
confirm () {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
Reference in New Issue
Block a user