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/zc/zc.vue | 83 ++++++++++++++++++++++-------------------
1 files changed, 45 insertions(+), 38 deletions(-)
diff --git a/src/views/zc/zc.vue b/src/views/zc/zc.vue
index 384943d..4e91383 100644
--- a/src/views/zc/zc.vue
+++ b/src/views/zc/zc.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"
@@ -76,7 +80,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
- ...this.$store.state.control.changePageSize,
+ ...this.$store.state.control.changePageSize
},
selectionList: [],
option: {
@@ -101,14 +105,14 @@
searchLabelWidth: 55,
search: true,
disabled: true,
- prop: "username",
+ prop: "username"
},
{
label: "密码",
hide: true,
editDisplay: false,
viewDisplay: false,
- prop: "password",
+ prop: "password"
},
{
label: "姓名",
@@ -117,19 +121,19 @@
searchSpan: 4,
searchLabelWidth: 55,
disabled: true,
- prop: "sname",
+ prop: "sname"
},
{
label: "身份证号",
disabled: true,
search: true,
display: false,
- prop: "cardid",
+ prop: "cardid"
},
{
label: "部门",
editDisplay: false,
- prop: "deptName",
+ prop: "deptName"
},
{
label: "角色",
@@ -138,8 +142,8 @@
dicData: [],
type: "tree",
props: {
- label: "title",
- },
+ label: "title"
+ }
},
{
label: "审核状态",
@@ -151,26 +155,26 @@
dicData: [
{
label: "未审核",
- value: "0",
+ value: "0"
},
{
label: "审核通过",
- value: "1",
+ value: "1"
},
{
label: "审核不通过",
- value: "2",
- },
- ],
- },
- ],
+ value: "2"
+ }
+ ]
+ }
+ ]
},
- data: [],
+ data: []
};
},
- created(){
- if(this.userInfo.role_name=="保安公司管理员"){
- this.search['type'] = "0";
+ created() {
+ if (this.userInfo.role_name == "保安公司管理员") {
+ this.search["type"] = "0";
}
},
computed: {
@@ -180,20 +184,23 @@
addBtn: this.vaildData(this.permission.zc_add, false),
viewBtn: this.vaildData(this.permission.zc_view, true),
delBtn: this.vaildData(this.permission.zc_delete, false),
- editBtn: this.vaildData(this.permission.zc_edit, false),
+ editBtn: this.vaildData(this.permission.zc_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(d) {
- getRoleTree().then((res) => {
+ getRoleTree().then(res => {
const column = this.findObject(this.option.column, "parentId");
var k = res.data.data;
var b = [];
@@ -220,11 +227,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
loading();
window.console.log(error);
}
@@ -236,11 +243,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
loading();
console.log(error);
}
@@ -250,7 +257,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(row.id);
@@ -259,7 +266,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
});
},
@@ -271,7 +278,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(this.ids);
@@ -280,14 +287,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;
});
}
@@ -326,17 +333,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