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

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

@ -8,17 +8,7 @@
@submit.native.prevent
>
<el-form-item label="所属站点" prop="tenant_id" v-if="is_super">
<el-cascader
size="small"
style="width: 240px"
v-model="queryParams.tenant_id"
clearable
separator="-"
placeholder="请选择,支持搜索"
:options="tenantOptions"
filterable
:props="{ emitPath: false, value: 'id', label: 'name' }"
></el-cascader>
<SiteOptions @handleChange="queryParams.tenant_id = $event" />
</el-form-item>
<el-form-item>
<el-button
@ -99,15 +89,7 @@
<el-dialog :title="title" :visible.sync="open" width="40%">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="所属站点:" prop="tenant_id" v-if="is_super">
<el-cascader
v-model="form.tenant_id"
clearable
separator="-"
placeholder="请选择,支持搜索"
:options="tenantOptions"
filterable
:props="{ emitPath: false, value: 'id', label: 'name' }"
></el-cascader>
<SiteOptions @handleChange="form.tenant_id = $event" />
</el-form-item>
<el-form-item label="启用状态:" prop="status">
<el-radio v-model="form.status" :label="1">启用</el-radio>
@ -135,14 +117,12 @@ import {
agreementEdit,
agreementDelete,
} from "@/api/website/siteSet";
import { tenantSelect } from "@/api/subPlatform/tenant";
export default {
data() {
return {
is_super: this.$store.getters.is_super,
loading: true,
showSearch: true,
tenantOptions: [],
queryParams: {
title: undefined,
tenant_id: undefined,
@ -260,14 +240,6 @@ export default {
},
created() {
this.getList();
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>

View File

@ -21,17 +21,7 @@
></el-cascader>
</el-form-item>
<el-form-item label="所属站点" prop="tenant_id" v-if="is_super">
<el-cascader
size="small"
style="width: 240px"
v-model="queryParams.tenant_id"
clearable
separator="-"
placeholder="请选择,支持搜索"
:options="tenantOptions"
filterable
:props="{ emitPath: false, value: 'id', label: 'name' }"
></el-cascader>
<SiteOptions @handleChange="queryParams.tenant_id = $event" />
</el-form-item>
<el-form-item>
<el-button
@ -119,15 +109,7 @@
<el-dialog :title="title" :visible.sync="open" width="500px">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="所属站点:" prop="tenant_id" v-if="is_super">
<el-cascader
v-model="form.tenant_id"
clearable
separator="-"
placeholder="请选择,支持搜索"
:options="tenantOptions"
filterable
:props="{ emitPath: false, value: 'id', label: 'name' }"
></el-cascader>
<SiteOptions @handleChange="form.tenant_id = $event" />
</el-form-item>
<el-form-item label="所在位置:" prop="local">
<div style="display: flex">
@ -203,7 +185,6 @@ import {
bannerEdit,
bannerDelete,
} from "@/api/website/siteSet";
import { tenantSelect } from "@/api/subPlatform/tenant";
export default {
data() {
return {
@ -211,7 +192,6 @@ export default {
loading: true,
showSearch: true,
bannerLocalList: [],
tenantOptions: [],
queryParams: {
title: undefined,
mode: undefined,
@ -395,14 +375,6 @@ export default {
created() {
this.getList();
this.getBannerLocal();
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>

View File

@ -9,17 +9,7 @@
@submit.native.prevent
>
<el-form-item label="所属站点" prop="tenant_id">
<el-cascader
size="small"
style="width: 240px"
v-model="queryParams.tenant_id"
clearable
separator="-"
placeholder="请选择,支持搜索"
:options="tenantOptions"
filterable
:props="{ emitPath: false, value: 'id', label: 'name' }"
></el-cascader>
<SiteOptions @handleChange="queryParams.tenant_id = $event" />
</el-form-item>
<el-form-item>
<el-button
@ -109,15 +99,7 @@
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="所属站点:" prop="tenant_id">
<el-cascader
v-model="form.tenant_id"
clearable
separator="-"
placeholder="请选择,支持搜索"
:options="tenantOptions"
filterable
:props="{ emitPath: false, value: 'id', label: 'name' }"
></el-cascader>
<SiteOptions @handleChange="form.tenant_id = $event" />
</el-form-item>
<el-form-item label="上级导航" prop="parent_id">
<treeselect
@ -152,7 +134,6 @@ import {
} from "@/api/website/siteSet";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { tenantSelect } from "@/api/subPlatform/tenant";
export default {
components: { Treeselect },
@ -163,7 +144,6 @@ export default {
loading: true,
// 显示搜索条件
showSearch: true,
tenantOptions: [],
// 导航表格树数据
dataList: [],
// 导航树选项
@ -198,14 +178,6 @@ export default {
},
created() {
this.getList();
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);
}
}
});
},
methods: {
/** 查询导航列表 */