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/dept.vue | 97 +++++++++++++++++++++++++-----------------------
1 files changed, 51 insertions(+), 46 deletions(-)
diff --git a/src/views/system/dept.vue b/src/views/system/dept.vue
index 4a23d3d..e8e2266 100644
--- a/src/views/system/dept.vue
+++ b/src/views/system/dept.vue
@@ -2,10 +2,12 @@
<basic-container
:class="[
'hasButTwo',
- $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
]"
>
<avue-crud
+ class="tablesss"
:option="option"
:table-loading="loading"
:data="data"
@@ -61,7 +63,7 @@
update,
add,
getDept,
- getDeptTree,
+ getDeptTree
} from "@/api/system/dept";
import { mapGetters } from "vuex";
import website from "@/config/website";
@@ -78,7 +80,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
- ...this.$store.state.control.changePageSize,
+ ...this.$store.state.control.changePageSize
},
option: {
lazy: true,
@@ -104,9 +106,9 @@
{
required: true,
message: "请输入机构名称",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
// {
// label: "所属保安单位",
@@ -143,9 +145,9 @@
{
required: true,
message: "请输入机构全称",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "上级机构",
@@ -155,15 +157,15 @@
hide: true,
addDisabled: false,
props: {
- label: "title",
+ label: "title"
},
rules: [
{
required: false,
message: "请选择上级机构",
- trigger: "click",
- },
- ],
+ trigger: "click"
+ }
+ ]
},
{
label: "机构类型",
@@ -172,7 +174,7 @@
dicUrl: "/api/blade-system/dict/dictionary?code=org_category",
props: {
label: "dictValue",
- value: "dictKey",
+ value: "dictKey"
},
dataType: "number",
width: 120,
@@ -182,9 +184,9 @@
{
required: true,
message: "请输入机构类型",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "排序",
@@ -196,9 +198,9 @@
{
required: true,
message: "请输入排序",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "备注",
@@ -207,14 +209,14 @@
{
required: false,
message: "请输入备注",
- trigger: "blur",
- },
+ trigger: "blur"
+ }
],
- hide: true,
- },
- ],
+ hide: true
+ }
+ ]
},
- data: [],
+ data: []
};
},
computed: {
@@ -224,20 +226,23 @@
addBtn: this.vaildData(this.permission.dept_add, false),
viewBtn: this.vaildData(this.permission.dept_view, false),
delBtn: this.vaildData(this.permission.dept_delete, false),
- editBtn: this.vaildData(this.permission.dept_edit, false),
+ editBtn: this.vaildData(this.permission.dept_edit, false)
};
},
ids() {
let ids = [];
- this.selectionList.forEach((ele) => {
+ this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
- },
+ }
+ },
+ mounted() {
+ this.$store.commit("setWindowSizeHeightAdd");
},
methods: {
initData() {
- getDeptTree().then((res) => {
+ getDeptTree().then(res => {
const column = this.findObject(this.option.column, "parentId");
column.dicData = res.data.data;
});
@@ -251,7 +256,7 @@
},
rowSave(row, done, loading) {
add(row).then(
- (res) => {
+ res => {
// 获取新增数据的相关字段
const data = res.data.data;
row.id = data.id;
@@ -259,12 +264,12 @@
row.tenantId = data.tenantId;
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
// 数据回调进行刷新
done(row);
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -275,12 +280,12 @@
() => {
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
// 数据回调进行刷新
done(row);
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -290,7 +295,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(row.id);
@@ -298,7 +303,7 @@
.then(() => {
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
// 数据回调进行刷新
done(row);
@@ -312,7 +317,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(this.ids);
@@ -327,7 +332,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
});
},
@@ -355,7 +360,7 @@
this.initData();
}
if (["edit", "view"].includes(type)) {
- getDept(this.form.id).then((res) => {
+ getDept(this.form.id).then(res => {
this.form = res.data.data;
});
}
@@ -380,22 +385,22 @@
onLoad(page, params = {}) {
this.loading = true;
getLazyList(this.parentId, Object.assign(params, this.query)).then(
- (res) => {
+ res => {
this.data = res.data.data;
this.loading = false;
+ this.$store.commit("setWindowSizeHeightAdd");
this.selectionClear();
}
);
},
treeLoad(tree, treeNode, resolve) {
const parentId = tree.id;
- getLazyList(parentId).then((res) => {
+ getLazyList(parentId).then(res => {
resolve(res.data.data);
});
- },
- },
+ }
+ }
};
</script>
-<style>
-</style>
+<style></style>
--
Gitblit v1.9.3