|
|
|
@ -9,6 +9,7 @@ |
|
|
|
|
v-model="queryForm.selectName" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
style="width: 240px" |
|
|
|
|
@change="resetSelect" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
@ -20,13 +21,30 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6" v-if="queryForm.selectName != undefined"> |
|
|
|
|
<el-col |
|
|
|
|
:span="6" |
|
|
|
|
v-if=" |
|
|
|
|
queryForm.selectName !== undefined && |
|
|
|
|
queryForm.selectName !== 'regionAreaId' |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryForm.selectValue" |
|
|
|
|
placeholder="请输入" |
|
|
|
|
style="width: 300px" |
|
|
|
|
/> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6" v-if="queryForm.selectName === 'regionAreaId'"> |
|
|
|
|
<el-tree-select |
|
|
|
|
v-model="queryForm.selectValue" |
|
|
|
|
placeholder="请选择所属管理域" |
|
|
|
|
:data="domainOptions" |
|
|
|
|
filterable |
|
|
|
|
check-strictly |
|
|
|
|
style="width: 300px" |
|
|
|
|
:render-after-expand="false" |
|
|
|
|
/> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="buttonColSpan"> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" :icon="Search" @click="queryCustomer" |
|
|
|
@ -140,6 +158,7 @@ import { |
|
|
|
|
import { ElTable } from "element-plus"; |
|
|
|
|
import { CustomerVO } from "@/api/customer/types"; |
|
|
|
|
import { customerPage, deleteCustom, updateStatus } from "@/api/customer"; |
|
|
|
|
import { getDomainOptions } from "@/api/domain"; |
|
|
|
|
defineOptions({ |
|
|
|
|
name: "Customer", |
|
|
|
|
inheritAttrs: false, |
|
|
|
@ -153,7 +172,11 @@ const loading = ref<boolean>(false); |
|
|
|
|
const tableData = ref<CustomerVO[]>([]); |
|
|
|
|
const total = ref<number>(0); |
|
|
|
|
const router = useRouter(); |
|
|
|
|
const options = ref<OptionType[]>([{ label: "客户名称", value: "customName" }]); |
|
|
|
|
const domainOptions = ref<OptionType[]>([]); |
|
|
|
|
const options = ref<OptionType[]>([ |
|
|
|
|
{ label: "客户名称", value: "customName" }, |
|
|
|
|
{ label: "系统管理域", value: "regionAreaId" }, |
|
|
|
|
]); |
|
|
|
|
const buttonColSpan = computed(() => { |
|
|
|
|
return queryForm.value.selectName === undefined ? 18 : 12; |
|
|
|
|
}); |
|
|
|
@ -222,6 +245,17 @@ const skipAddCustom = () => { |
|
|
|
|
path: `/resources/custom-add`, |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
const resetSelect = () => { |
|
|
|
|
queryForm.value.selectValue = undefined; |
|
|
|
|
}; |
|
|
|
|
async function loadDomainOptions() { |
|
|
|
|
await getDomainOptions().then(({ data }) => { |
|
|
|
|
domainOptions.value = data; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
onMounted(() => { |
|
|
|
|
loadDomainOptions(); |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped></style> |
|
|
|
|