修改所有页面站点 使用站点组件

This commit is contained in:
熊丽君
2022-01-18 18:02:56 +08:00
parent 3f52fdaa7b
commit 5cbca31d98
11 changed files with 57 additions and 280 deletions

View File

@ -0,0 +1,39 @@
<template>
<el-cascader
size="small"
style="width: 240px"
v-model="tenant_id"
clearable
separator="-"
placeholder="请选择,支持搜索"
:options="tenantOptions"
filterable
:props="{ emitPath: false, value: 'id', label: 'name' }"
></el-cascader>
</template>
<script>
import { tenantSelect } from "@/api/subPlatform/tenant";
export default {
data() {
return {
tenantOptions: [],
tenant_id: undefined,
};
},
watch: {
tenant_id(newVal, oldVal) {
this.$emit("handleChange", newVal);
},
},
created() {
tenantSelect().then((res) => {
for (const key in res.data) {
if (Object.hasOwnProperty.call(res.data, key)) {
const item = res.data[key];
this.tenantOptions.push(item);
}
}
});
},
};
</script>