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/securityUnitChild/manager.vue | 154 ++++++++++++++++++++++++++++++++++++++------------
1 files changed, 116 insertions(+), 38 deletions(-)
diff --git a/src/views/securityUnitChild/manager.vue b/src/views/securityUnitChild/manager.vue
index e6f1947..22b640d 100644
--- a/src/views/securityUnitChild/manager.vue
+++ b/src/views/securityUnitChild/manager.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"
@@ -69,12 +73,12 @@
getDetail2,
adddata2,
update2,
- remove2,
-} from "@/api/securityUnit/securityUnit";
+ remove2
+} from "@/api/securityUnit/securityUnit";
import { mapGetters } from "vuex";
import { getToken } from "@/util/auth";
export default {
- props: ["deptid"],
+ props: ["deptid", "stats"],
data() {
var deptid = this.deptid;
if (deptid == undefined) {
@@ -91,7 +95,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
- ...this.$store.state.control.changePageSize,
+ ...this.$store.state.control.changePageSize
},
selectionList: [],
option: {
@@ -99,9 +103,9 @@
searchSize: "mini",
searchMenuSpan: 8,
height: "auto",
- editBtn:true,
- delBtn:true,
- viewBtn:true,
+ editBtn: true,
+ delBtn: true,
+ viewBtn: true,
menuWidth: 200,
menuAlign: "center",
align: "center",
@@ -113,34 +117,88 @@
prop: "creditcode",
hide: true,
addDisplay: false,
- editDisplay: false,
+ editDisplay: false
},
{
label: "id",
prop: "id",
hide: true,
addDisplay: false,
- editDisplay: false,
+ editDisplay: false
},
{
label: "姓名",
prop: "name",
search: true,
+ searchLabelWidth: 55,
+ searchSpan: 4,
+ rules: [
+ {
+ required: true,
+ message: "请输入姓名",
+ trigger: "blur"
+ }
+ ]
},
{
label: "职务",
prop: "post",
search: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入职务",
+ trigger: "blur"
+ }
+ ]
},
{
label: "身份证",
- prop: "cardid",
+ prop: "cardid"
},
{
label: "联系电话",
- prop: "cell",
+ prop: "cell"
},
- ],
+ {
+ label: "学历",
+ prop: "education",
+ display: false,
+ row: true,
+ hide: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择学历",
+ trigger: "blur"
+ }
+ ],
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationTypes",
+ search: false,
+ searchSpan: 4,
+ type: "select",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number"
+ },
+ {
+ label: "证书",
+ prop: "paper",
+ type: "upload",
+ dataType: "string",
+ listType: "picture-card",
+ span: 24,
+ propsHttp: {
+ res: "data"
+ },
+ tip: "只能上传jpg/png格式图片,且不超过2Mb",
+ action: "/api/blade-resource/oss/endpoint/put-files",
+ display: false,
+ hide: true
+ }
+ ]
},
data: [],
excelForm: {},
@@ -156,23 +214,34 @@
loadText: "模板上传中,请稍等",
span: 24,
propsHttp: {
- res: "data",
+ res: "data"
},
tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "/api/member/import-member",
+ action: "/api/member/import-member"
},
{
label: "模板下载",
prop: "excelTemplate",
formslot: true,
- span: 24,
- },
- ],
- },
+ span: 24
+ }
+ ]
+ }
};
},
created() {
this.option.height = this.windowHeight - 320;
+ if (this.stats == "1") {
+ //学校
+ const educationcolumn = this.findObject(this.option.column, "education");
+ const papercolumn = this.findObject(this.option.column, "paper");
+ //学历证书
+ educationcolumn.display = true;
+ educationcolumn.hide = false;
+ educationcolumn.search = true;
+ papercolumn.display = true;
+ papercolumn.hide = false;
+ }
},
computed: {
...mapGetters(["permission", "userInfo", "windowHeight"]),
@@ -186,42 +255,51 @@
// },
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) {
- row['deptId'] = this.deptid;
+ row["deptId"] = this.deptid;
+ if (this.stats != "1") {
+ delete row.paper;
+ }
adddata2(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
loading();
window.console.log(error);
}
);
},
rowUpdate(row, index, done, loading) {
- row['deptId'] = this.deptid;
+ row["deptId"] = this.deptid;
+ if (this.stats != "1") {
+ delete row.paper;
+ }
update2(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
done();
},
- (error) => {
+ error => {
loading();
console.log(error);
}
@@ -231,7 +309,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove2(row.id);
@@ -240,7 +318,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
});
},
@@ -250,7 +328,7 @@
);
},
uploadAfter(res, done, loading, column) {
- window.console.log(column);
+ // window.console.log(column);
this.excelBox = false;
this.refreshChange();
done();
@@ -266,7 +344,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning",
+ type: "warning"
})
.then(() => {
return remove2(this.ids);
@@ -275,14 +353,14 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
- getDetail2(this.form.id).then((res) => {
+ getDetail2(this.form.id).then(res => {
this.form = res.data.data;
});
}
@@ -321,17 +399,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