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/post.vue | 91 ++++++++++++++++++++++++---------------------
1 files changed, 49 insertions(+), 42 deletions(-)
diff --git a/src/views/system/post.vue b/src/views/system/post.vue
index a682b9d..79fd426 100644
--- a/src/views/system/post.vue
+++ b/src/views/system/post.vue
@@ -1,8 +1,12 @@
<template>
- <basic-container :class="[
-$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
-]">
+ <basic-container
+ :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"
@@ -55,7 +59,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
- ...this.$store.state.control.changePageSize,
+ ...this.$store.state.control.changePageSize
},
selectionList: [],
option: {
@@ -82,16 +86,16 @@
span: 24,
props: {
label: "tenantName",
- value: "tenantId",
+ value: "tenantId"
},
hide: !website.tenantMode,
rules: [
{
required: true,
message: "请输入所属保安单位",
- trigger: "click",
- },
- ],
+ trigger: "click"
+ }
+ ]
},
{
label: "岗位类型",
@@ -100,7 +104,7 @@
dicUrl: "/api/blade-system/dict/dictionary?code=post_category",
props: {
label: "dictValue",
- value: "dictKey",
+ value: "dictKey"
},
dataType: "number",
slot: true,
@@ -109,9 +113,9 @@
{
required: true,
message: "请选择岗位类型",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "岗位编号",
@@ -121,9 +125,9 @@
{
required: true,
message: "请输入岗位编号",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "岗位名称",
@@ -133,9 +137,9 @@
{
required: true,
message: "请输入岗位名称",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "岗位排序",
@@ -145,9 +149,9 @@
{
required: true,
message: "请输入岗位排序",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "岗位描述",
@@ -155,11 +159,11 @@
type: "textarea",
span: 24,
minRows: 6,
- hide: true,
- },
- ],
+ hide: true
+ }
+ ]
},
- data: [],
+ data: []
};
},
computed: {
@@ -169,16 +173,19 @@
addBtn: this.vaildData(this.permission.post_add, false),
viewBtn: this.vaildData(this.permission.post_view, false),
delBtn: this.vaildData(this.permission.post_delete, false),
- editBtn: this.vaildData(this.permission.post_edit, false),
+ editBtn: this.vaildData(this.permission.post_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: {
rowSave(row, done, loading) {
@@ -187,11 +194,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -203,11 +210,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -217,7 +224,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(row.id);
@@ -226,7 +233,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
});
},
@@ -238,7 +245,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(this.ids);
@@ -247,14 +254,14 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
- getDetail(this.form.id).then((res) => {
+ getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
@@ -292,17 +299,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