From 79d9fc857559982b00b68b2d709807bdc4cd286f Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 11 Apr 2022 10:58:17 +0800
Subject: [PATCH] minio 地址修改
---
src/views/workreport/workreport.vue | 148 ++++++++++++++++++++++++++++++++++---------------
1 files changed, 102 insertions(+), 46 deletions(-)
diff --git a/src/views/workreport/workreport.vue b/src/views/workreport/workreport.vue
index a955138..1e19ab7 100644
--- a/src/views/workreport/workreport.vue
+++ b/src/views/workreport/workreport.vue
@@ -1,6 +1,12 @@
<template>
- <basic-container class="workreply">
+ <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"
@@ -48,11 +54,11 @@
remove,
update,
add,
- getDetail,
+ getDetail
} from "@/api/workreport/workreport";
import { getDept } from "@/api/system/dept";
import { mapGetters } from "vuex";
-
+import { getDictionaryBiz } from "@/api/system/dict";
export default {
data() {
return {
@@ -70,6 +76,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize
},
selectionList: [],
option: {
@@ -91,8 +98,9 @@
menuWidth: 320,
dialogClickModal: false,
column: workreportColumn,
+ ...this.$store.state.control.clearOtherBut
},
- data: [],
+ data: []
};
},
computed: {
@@ -102,21 +110,23 @@
addBtn: this.vaildData(this.permission.workreport_add, false),
viewBtn: this.vaildData(this.permission.workreport_view, false),
delBtn: this.vaildData(this.permission.workreport_delete, false),
- editBtn: this.vaildData(this.permission.workreport_edit, false),
+ editBtn: this.vaildData(this.permission.workreport_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() {},
+ mounted() {
+ this.$store.commit("setWindowSizeHeightAdd");
+ },
methods: {
rowSave(row, done, loading) {
row.receivedIds = row.receivedIds.join(",");
@@ -127,11 +137,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -146,11 +156,11 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
@@ -160,7 +170,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(row.id);
@@ -169,7 +179,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
});
},
@@ -198,7 +208,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove(this.ids);
@@ -207,14 +217,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;
});
}
@@ -245,41 +255,87 @@
// ? (that.deptCategory = true)
// : (that.deptCategory = false);
-
-
- //1:保安公司 2:公安 3:培训公司
- if(this.userInfo.role_name=="保安公司管理员"
- || this.userInfo.role_name=="保安"
- || this.userInfo.role_name=="未持证保安"
- ){
- const column = that.findObject(that.option.column, "category");
- column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=securityWorkReportCategory";
- const columnReceivedIds = that.findObject(that.option.column, "receivedIds");
- columnReceivedIds.dicUrl = "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId="+that.userInfo.dept_id;
- }
- if(this.userInfo.role_name=="公安管理员"){
- const column = that.findObject(that.option.column, "category");
- column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=workReportCategory";
- const columnReceivedIds = that.findObject(that.option.column, "receivedIds");
- columnReceivedIds.dicUrl = "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId="+that.userInfo.dept_id;
- }
- params["deptId"] = this.deptId;
- params["userId"] = this.userId;
- // }
- let values = {
- ...params,
+ //1:保安公司 2:公安 3:培训公司
+ if (
+ this.userInfo.role_name == "保安公司管理员" ||
+ this.userInfo.role_name == "保安"
+ ) {
+ const column = that.findObject(that.option.column, "category");
+ var code = {
+ code: "securityWorkReportCategory"
};
- this.loading = true;
- getListPage(page.currentPage, page.pageSize, values).then((res) => {
+
+ getDictionaryBiz(code).then(res => {
+ // column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=securityWorkReportCategory";
+ column.dicData = res.data.data;
+ const columnReceivedIds = that.findObject(
+ that.option.column,
+ "receivedIds"
+ );
+ columnReceivedIds.dicUrl =
+ "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId=" +
+ that.userInfo.dept_id;
+
+ params["deptId"] = this.deptId;
+ params["userId"] = this.userId;
+ // }
+
+ let values = {
+ ...params
+ };
+ this.loading = true;
+ 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();
+ });
+ });
+ } else if (this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "民警") {
+ const column = that.findObject(that.option.column, "category");
+ var code1 = { code: "workReportCategory" };
+ getDictionaryBiz(code1).then(res => {
+ // column.dicUrl = "/api/blade-system/dict-biz/dictionary?code=workReportCategory";
+ column.dicData = res.data.data;
+ const columnReceivedIds = that.findObject(
+ that.option.column,
+ "receivedIds"
+ );
+ columnReceivedIds.dicUrl =
+ "/api/blade-system/dept/lazy-tree-users?type={{key}}&deptId=" +
+ that.userInfo.dept_id;
+
+ params["deptId"] = this.deptId;
+ params["userId"] = this.userId;
+ // }
+
+ let values = {
+ ...params
+ };
+ this.loading = true;
+ 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();
+ });
+ });
+ } else if (this.userInfo.role_name == "administrator") {
+ getListPage(page.currentPage, page.pageSize, params).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>
--
Gitblit v1.9.3