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/desk/notice.vue | 103 ++++++++++++++++++++++++++-------------------------
1 files changed, 53 insertions(+), 50 deletions(-)
diff --git a/src/views/desk/notice.vue b/src/views/desk/notice.vue
index 3c26640..ddcf661 100644
--- a/src/views/desk/notice.vue
+++ b/src/views/desk/notice.vue
@@ -2,10 +2,12 @@
<basic-container
:class="[
'desk1',
- $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"
@@ -83,7 +85,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
- ...this.$store.state.control.changePageSize,
+ ...this.$store.state.control.changePageSize
},
selectionList: [],
option: {
@@ -118,9 +120,9 @@
{
required: true,
message: "请输入通知标题",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "通知类型",
@@ -128,7 +130,7 @@
dicUrl: "/api/blade-system/dict/dictionary?code=notice",
props: {
label: "dictValue",
- value: "dictKey",
+ value: "dictKey"
},
dataType: "number",
slot: true,
@@ -142,9 +144,9 @@
{
required: true,
message: "请输入通知类型",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "发布单位",
@@ -153,7 +155,7 @@
dicUrl: "/api/blade-system/dept/lazy-tree",
props: {
label: "title",
- value: "id",
+ value: "id"
},
addDisplay: false,
editDisplay: false,
@@ -161,9 +163,9 @@
{
required: true,
message: "所属组织机构",
- trigger: "click",
- },
- ],
+ trigger: "click"
+ }
+ ]
},
{
label: "通知时间",
@@ -182,9 +184,9 @@
{
required: true,
message: "请输入通知时间",
- trigger: "blur",
- },
- ],
+ trigger: "blur"
+ }
+ ]
},
{
label: "通知日期",
@@ -196,9 +198,9 @@
{
required: true,
message: "请输入通知日期",
- trigger: "click",
- },
- ],
+ trigger: "click"
+ }
+ ]
},
{
label: "通知内容",
@@ -208,16 +210,16 @@
action: "/api/blade-resource/oss/endpoint/put-file",
props: {
res: "data",
- url: "link",
- },
+ url: "link"
+ }
},
hide: true,
minRows: 6,
- span: 24,
- },
- ],
+ span: 24
+ }
+ ]
},
- data: [],
+ data: []
};
},
computed: {
@@ -227,28 +229,29 @@
addBtn: this.vaildData(this.permission.notice_add, false),
viewBtn: this.vaildData(this.permission.notice_view, false),
delBtn: this.vaildData(this.permission.notice_delete, false),
- editBtn: this.vaildData(this.permission.notice_edit, false),
+ editBtn: this.vaildData(this.permission.notice_edit, false)
};
},
ids() {
let ids = [];
- this.selectionList.forEach((ele) => {
+ this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
},
...mapState({
- userInfo: (state) => state.user.userInfo,
- }),
+ userInfo: state => state.user.userInfo
+ })
},
mounted() {
this.getDeptInfo(this.userInfo.dept_id);
+ this.$store.commit("setWindowSizeHeightAdd");
},
methods: {
//获取当前用户部门信息
getDeptInfo(deptId) {
var that = this;
- getDept(deptId).then((res) => {
+ getDept(deptId).then(res => {
var deptCategory = res.data.data.deptCategory;
deptCategory == 1
? (that.deptCategory = true)
@@ -261,8 +264,8 @@
path: `/resource/uploadNotice`,
query: {
deptId: row.deptId,
- noticeId: row.id,
- },
+ noticeId: row.id
+ }
});
},
rowSave(row, done, loading) {
@@ -278,11 +281,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -300,11 +303,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -314,7 +317,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(row.id);
@@ -323,7 +326,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
});
},
@@ -352,7 +355,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(this.ids);
@@ -361,14 +364,14 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
- getNotice(this.form.id).then((res) => {
+ getNotice(this.form.id).then(res => {
this.form = res.data.data;
});
}
@@ -390,7 +393,7 @@
//获取当前用户部门信息,判断是否为公安,如果是公安,则只能查看公告信息
var that = this;
- getDept(this.deptId).then((res) => {
+ getDept(this.deptId).then(res => {
var deptCategory = res.data.data.deptCategory;
deptCategory == 1
? (that.deptCategory = true)
@@ -402,37 +405,37 @@
this.userInfo.role_name == "保安" ||
this.userInfo.role_name == "装备管理员"
) {
- params['deptId'] = this.userInfo.dept_id;
+ params["deptId"] = this.userInfo.dept_id;
}
const { releaseTimeRange } = this.query;
params["jurisdiction"] = this.jurisdiction;
params["type"] = 1;
let values = {
- ...params,
+ ...params
};
if (releaseTimeRange) {
values = {
...params,
startTime: releaseTimeRange[0],
endTime: releaseTimeRange[1],
- ...this.query,
+ ...this.query
};
values.releaseTimeRange = null;
}
this.loading = true;
- getListPage(page.currentPage, page.pageSize, values).then((res) => {
+ getListPage(page.currentPage, page.pageSize, values).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