同步tplink代码与运维代码一致
This commit is contained in:
parent
cd8d501836
commit
4dd33cd28a
|
@ -59,7 +59,7 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
field: 'institutionId',
|
field: 'institutionId',
|
||||||
component: 'JDictSelectTag',
|
component: 'JDictSelectTag',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
dictCode: 'nu_admin_institution_area,inst_name,id,org_category = 1 order by inst_name asc',
|
dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc',
|
||||||
placeholder: '请选择机构',
|
placeholder: '请选择机构',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -107,7 +107,7 @@ export const formSchema: FormSchema[] = [
|
||||||
field: 'institutionId',
|
field: 'institutionId',
|
||||||
component: 'JDictSelectTag',
|
component: 'JDictSelectTag',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
dictCode: 'nu_admin_institution_area,inst_name,id,org_category = 1 order by inst_name asc',
|
dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc',
|
||||||
placeholder: '请选择机构',
|
placeholder: '请选择机构',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,7 +11,7 @@ enum Api {
|
||||||
add = '/iot/regionInfo/add',
|
add = '/iot/regionInfo/add',
|
||||||
edit = '/iot/regionInfo/edit',
|
edit = '/iot/regionInfo/edit',
|
||||||
delete = '/iot/regionInfo/delete',
|
delete = '/iot/regionInfo/delete',
|
||||||
queryChildrenByParentId = '/admin/institutionArea/queryChildrenByParentId',
|
queryChildrenByParentId = '/sys/sysDepart/queryChildrenByParentId',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<a-select v-model:value="model[field]" @change="(value,option) => handleChange(value,option,model)">
|
<a-select v-model:value="model[field]" @change="(value,option) => handleChange(value,option,model)">
|
||||||
<a-select-option :value="null">请选择…</a-select-option>
|
<a-select-option :value="null">请选择…</a-select-option>
|
||||||
<template v-for="item in areaOptions" :key="`${item.id}`">
|
<template v-for="item in areaOptions" :key="`${item.id}`">
|
||||||
<a-select-option :value="item.id" :label="item.instName">
|
<a-select-option :value="item.id" :label="item.departName">
|
||||||
{{item.instName}}
|
{{item.departName}}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</template>
|
</template>
|
||||||
</a-select>
|
</a-select>
|
||||||
|
@ -103,9 +103,9 @@
|
||||||
|
|
||||||
async function handleChange(value,option:Option,formData){
|
async function handleChange(value,option:Option,formData){
|
||||||
if(value == null){
|
if(value == null){
|
||||||
formData["regionName"] = model.value["regionName"];
|
formData["departName"] = model.value["departName"];
|
||||||
}else{
|
}else{
|
||||||
formData["regionName"] = option.label;
|
formData["departName"] = option.label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
<template #areaSelect ="{model,field}">
|
<template #areaSelect ="{model,field}">
|
||||||
<a-select v-model:value="model[field]" @change="(value,option) => handleChange(value,option,model)">
|
<a-select v-model:value="model[field]" @change="(value,option) => handleChange(value,option,model)">
|
||||||
<template v-for="item in areaOptions" :key="`${item.id}`">
|
<template v-for="item in areaOptions" :key="`${item.id}`">
|
||||||
<a-select-option :value="item.id" :label="item.instName">
|
<a-select-option :value="item.id" :label="item.departName">
|
||||||
{{item.instName}}
|
{{item.departName}}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</template>
|
</template>
|
||||||
</a-select>
|
</a-select>
|
||||||
|
@ -98,9 +98,9 @@ const fetchArea = async (institutionId) => {
|
||||||
|
|
||||||
async function handleChange(value,option:Option,formData){
|
async function handleChange(value,option:Option,formData){
|
||||||
if(value == null){
|
if(value == null){
|
||||||
formData["regionName"] = "";
|
formData["departName"] = "";
|
||||||
}else{
|
}else{
|
||||||
formData["regionName"] = option.label;
|
formData["departName"] = option.label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue