From a38281e697cde9f45926a6af0c88bec14501fec0 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Tue, 15 Feb 2022 11:06:34 +0800
Subject: [PATCH] 68个表格在1366*768下的适配,保安单位情况智能分析中的图表的适配以及其按钮会被遮住不能点击
---
src/views/system/tenant.vue | 117 +++++++++++++++++++++++++++++++---------------------------
1 files changed, 62 insertions(+), 55 deletions(-)
diff --git a/src/views/system/tenant.vue b/src/views/system/tenant.vue
index 95bd359..13d3c6f 100644
--- a/src/views/system/tenant.vue
+++ b/src/views/system/tenant.vue
@@ -1,8 +1,12 @@
<template>
<basic-container
- :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ :class="[
+ $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
+ ]"
>
<avue-crud
+ class="tablesss"
:option="option"
:table-loading="loading"
:data="data"
@@ -93,7 +97,7 @@
update,
add,
setting,
- datasource,
+ datasource
} from "@/api/system/tenant";
import { mapGetters } from "vuex";
@@ -110,7 +114,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
- ...this.$store.state.control.changePageSize,
+ ...this.$store.state.control.changePageSize
},
option: {
height: "auto",
@@ -141,9 +145,9 @@
{
required: true,
message: "请输入保安单位ID",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "保安企业名称",
@@ -157,9 +161,9 @@
{
required: true,
message: "请输入参数名称",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "联系人",
@@ -172,14 +176,14 @@
{
required: true,
message: "请输入联系人",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "联系电话",
prop: "contactNumber",
- width: 150,
+ width: 150
},
{
label: "联系地址",
@@ -187,7 +191,7 @@
span: 24,
minRows: 2,
type: "textarea",
- hide: true,
+ hide: true
},
{
label: "账号额度",
@@ -195,7 +199,7 @@
width: 90,
slot: true,
addDisplay: false,
- editDisplay: false,
+ editDisplay: false
},
{
label: "过期时间",
@@ -203,12 +207,12 @@
width: 180,
slot: true,
addDisplay: false,
- editDisplay: false,
+ editDisplay: false
},
{
label: "绑定域名",
prop: "domain",
- span: 24,
+ span: 24
},
{
label: "系统背景",
@@ -218,12 +222,12 @@
action: "/api/blade-resource/oss/endpoint/put-file",
propsHttp: {
res: "data",
- url: "link",
+ url: "link"
},
hide: true,
- span: 24,
- },
- ],
+ span: 24
+ }
+ ]
},
data: [],
settingForm: {},
@@ -233,7 +237,7 @@
label: "账号额度",
prop: "accountNumber",
type: "number",
- span: 24,
+ span: 24
},
{
label: "过期时间",
@@ -241,9 +245,9 @@
type: "date",
format: "yyyy-MM-dd hh:mm:ss",
valueFormat: "yyyy-MM-dd hh:mm:ss",
- span: 24,
- },
- ],
+ span: 24
+ }
+ ]
},
datasourceForm: {},
datasourceOption: {
@@ -257,18 +261,18 @@
dicUrl: "/api/blade-develop/datasource/select",
props: {
label: "name",
- value: "id",
+ value: "id"
},
rules: [
{
required: true,
message: "请选择数据源",
- trigger: "blur",
- },
- ],
- },
- ],
- },
+ trigger: "blur"
+ }
+ ]
+ }
+ ]
+ }
};
},
computed: {
@@ -278,19 +282,22 @@
addBtn: this.vaildData(this.permission.tenant_add, false),
viewBtn: this.vaildData(this.permission.tenant_view, false),
delBtn: this.vaildData(this.permission.tenant_delete, false),
- editBtn: this.vaildData(this.permission.tenant_edit, false),
+ editBtn: this.vaildData(this.permission.tenant_edit, false)
};
},
ids() {
let ids = [];
- this.selectionList.forEach((ele) => {
+ this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
},
tenantId() {
return this.selectionList[0].tenantId;
- },
+ }
+ },
+ mounted() {
+ this.$store.commit("setWindowSizeHeightAdd");
},
methods: {
rowSave(row, done, loading) {
@@ -299,11 +306,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -315,11 +322,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -329,7 +336,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(row.id);
@@ -338,13 +345,13 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
});
},
beforeOpen(done, type) {
if (["view"].includes(type)) {
- getDetail(this.form.id).then((res) => {
+ getDetail(this.form.id).then(res => {
const data = res.data.data;
if (!(data.accountNumber > 0)) {
data.accountNumber = "不限制";
@@ -382,7 +389,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(this.ids);
@@ -391,7 +398,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
@@ -402,7 +409,7 @@
return;
}
if (this.selectionList.length === 1) {
- getDetail(this.selectionList[0].id).then((res) => {
+ getDetail(this.selectionList[0].id).then(res => {
const data = res.data.data;
this.settingForm.accountNumber = data.accountNumber;
this.settingForm.expireTime = data.expireTime;
@@ -422,7 +429,7 @@
this.$message.warning("只能选择一条数据");
return;
}
- getDetail(this.selectionList[0].id).then((res) => {
+ getDetail(this.selectionList[0].id).then(res => {
const data = res.data.data;
this.datasourceForm.datasourceId = data.datasourceId;
});
@@ -434,12 +441,12 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "配置成功!",
+ message: "配置成功!"
});
done();
this.box = false;
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -450,12 +457,12 @@
() => {
this.$message({
type: "success",
- message: "配置成功!",
+ message: "配置成功!"
});
done();
this.datasourceBox = false;
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -476,17 +483,17 @@
page.currentPage,
page.pageSize,
Object.assign(params, this.query)
- ).then((res) => {
+ ).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
+ this.$store.commit("setWindowSizeHeightAdd");
this.selectionClear();
});
- },
- },
+ }
+ }
};
</script>
-<style>
-</style>
+<style></style>
--
Gitblit v1.9.3