From bbb7ed59311d04ce1b07c25886cc12a6111bd140 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Thu, 28 Dec 2023 11:53:06 +0800
Subject: [PATCH] 装备添加字段,离职可上传图片
---
src/views/securityEquipment/equipments.js | 19 ++++
src/views/trainExam/index.vue | 18 ++++
src/api/system/user.js | 8 ++
src/views/securityGuard/securityGuard.vue | 99 +++++++++++++++++++++++-
src/views/trainExam/modifiedGrades.vue | 29 ++++++
src/views/securityEquipment/equipments.vue | 16 ++--
6 files changed, 172 insertions(+), 17 deletions(-)
diff --git a/src/api/system/user.js b/src/api/system/user.js
index 175b3b8..3a18ed5 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -123,6 +123,14 @@
})
}
+export const userLeave = (row) => {
+ return request({
+ url: '/api/blade-user/userLeave',
+ method: 'post',
+ data: row
+ })
+}
+
export const updateUser = (row) => {
return request({
diff --git a/src/views/securityEquipment/equipments.js b/src/views/securityEquipment/equipments.js
index 16bbe00..363da79 100644
--- a/src/views/securityEquipment/equipments.js
+++ b/src/views/securityEquipment/equipments.js
@@ -121,5 +121,20 @@
message: "请输入出厂日期",
trigger: "blur"
}]
-}
-]
\ No newline at end of file
+},
+ {
+ label: "领用日期",
+ prop: "receiveDate",
+ type: "date",
+ format: 'yyyy-MM-dd',
+ searchSpan: 4,
+ // span:8,
+ valueFormat: 'yyyy-MM-dd',
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请输入领用日期",
+ trigger: "blur"
+ }]
+ }
+]
diff --git a/src/views/securityEquipment/equipments.vue b/src/views/securityEquipment/equipments.vue
index e19f6ea..54f65a0 100644
--- a/src/views/securityEquipment/equipments.vue
+++ b/src/views/securityEquipment/equipments.vue
@@ -388,14 +388,14 @@
});
}
},
- mounted() {
- // this.Ourdata = data;
- // this.getData();
- // this.onLoad(this.page);
- // var dept_id = JSON.parse(
- // window.localStorage.getItem("saber-userInfo")
- // ).content.dept_id;
- }
+ // mounted() {
+ // // this.Ourdata = data;
+ // // this.getData();
+ // // this.onLoad(this.page);
+ // // var dept_id = JSON.parse(
+ // // window.localStorage.getItem("saber-userInfo")
+ // // ).content.dept_id;
+ // }
};
</script>
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index d18dcf6..b47d61e 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -100,8 +100,11 @@
</el-button>
<br v-if="permission.securityGuard_delete && row.status != 2" />
+<!-- <el-button icon="el-icon-circle-close" :size="size" :type="type"-->
+<!-- v-if="permission.securityGuard_delete && row.status != 2" @click.stop="rowStatus(row)">离职-->
+<!-- </el-button>-->
<el-button icon="el-icon-circle-close" :size="size" :type="type"
- v-if="permission.securityGuard_delete && row.status != 2" @click.stop="rowStatus(row)">离职
+ v-if="permission.securityGuard_delete && row.status != 2" @click.stop="rowLeaveStatus(row)">离职
</el-button>
<br v-if="permission.securityGuard_delete && row.status != 2" />
@@ -286,6 +289,18 @@
</avue-form>
</div>
</el-dialog>
+
+
+ <el-dialog title="离职信息填写" :visible.sync="leaveInfoVisible" width="width" :modal="true"
+ :modal-append-to-body="true" :append-to-body="true" :close-on-click-modal="false" :close-on-press-escape="false"
+ :before-close="dialogBeforeClose">
+ <div>
+ <avue-form ref="formLeaveInfo" :option="optionLeaveInfo" v-model="formLeaveInfo"
+ @submit="leaveInfoSubmit">
+ </avue-form>
+ </div>
+ </el-dialog>
+
<div style="position: fixed; top: 9999px; width: 100%; height: 100%">
<div class="certificate_box" id="certificateDom">
<div class="security_main" ref="certificateBox">
@@ -359,7 +374,7 @@
getUserPractitionersInfo,
updatePaperTime,
getzhiwen, //指纹
- checkAccountByUser, batchAudit
+ checkAccountByUser, batchAudit, userLeave
} from "@/api/system/user";
import { securityApply } from "@/api/accreditationRecords/accreditationRecords";
import { add } from "@/api/securityapplyRecord/securityapplyRecord";
@@ -1174,7 +1189,7 @@
hide: true,
},
{
- label: "受理公安机关",
+ label: "受理机关",
prop: "acceptancePoliceUnit",
hide: true,
},
@@ -1360,7 +1375,56 @@
]
},
tablevisible: true,
- onceTableChange: 1
+ onceTableChange: 1,
+
+ leaveInfoVisible:false,
+ formLeaveInfo:{},
+ optionLeaveInfo: {
+ height: "auto",
+ calcHeight: 30,
+ dialogWidth: 1000,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ dialogClickModal: false,
+ menuPosition:"center",
+ emptyBtn:false,
+ column: [
+ {
+ label: "离职原因",
+ labelWidth: 110,
+ span: 24,
+ type: "textarea",
+ prop: "reasonForLeav"
+ },
+ {
+ label: "离职单图片",
+ prop: "imgForLeav",
+ labelWidth: 110,
+ type: "upload",
+ span: 24,
+ listType: "picture-img",
+ tip: "上传jpg/png文件,图片不超过1M",
+ propsHttp: {
+ res: "data",
+ url: "url"
+ },
+ canvasOption: {
+ text: " ",
+ ratio: 1.0
+ },
+ action: "/api/blade-resource/oss/endpoint/put-files",
+ rules: [
+ {
+ required: false,
+ message: "请上传离职单图片",
+ trigger: "blur"
+ }
+ ]
+ },
+ ]
+ },
};
},
watch: {
@@ -2364,6 +2428,33 @@
}
);
},
+
+
+ leaveInfoSubmit(row, done, loading){
+
+ console.log(this.formLeaveInfo)
+ this.formLeaveInfo.status = "2"
+ var that = this;
+ userLeave(this.formLeaveInfo).then(() => {
+ that.$refs.formLeaveInfo.resetFields();
+ this.$message({
+ type: "success",
+ message: `操作成功`
+ });
+ this.leaveInfoVisible = false;
+ this.onLoad(this.page);
+ done();
+ });
+ error => {
+ window.console.log(error);
+ };
+
+ },
+ rowLeaveStatus(row){
+ this.formLeaveInfo = row
+ this.leaveInfoVisible = true;
+ },
+
rowStatus(row) {
this.$prompt("离职原因", "提示", {
confirmButtonText: "确定离职",
diff --git a/src/views/trainExam/index.vue b/src/views/trainExam/index.vue
index 664dd69..2a03331 100644
--- a/src/views/trainExam/index.vue
+++ b/src/views/trainExam/index.vue
@@ -499,6 +499,13 @@
]
},
{
+ label: "审核人",
+ display: false,
+ prop: "auditUserName",
+ width: 90,
+ overHidden: true
+ },
+ {
label: "审核时间",
prop: "auditTime",
type: "datetime",
@@ -621,6 +628,16 @@
},
mounted() {
this.$store.commit("setWindowSizeHeightAdd");
+
+ const auditUserName = this.findObject(this.questionBankOption.column, "auditUserName");
+ const auditTime = this.findObject(this.questionBankOption.column, "auditTime");
+
+ //非管理员隐藏审核人
+ // if (this.userInfo.role_name.indexOf("admin") == -1){
+ if (!this.permission.trainExam_check){
+ auditUserName.hide = true
+ auditTime.hide = true
+ }
},
computed: {
ids() {
@@ -694,6 +711,7 @@
// auditDetail:this.Audit.auditDetail,
// }
// console.log(data,654321);
+ row.auditUser = this.userInfo.user_id
updateAudit(row).then(
() => {
this.dialogFormVisible = false;
diff --git a/src/views/trainExam/modifiedGrades.vue b/src/views/trainExam/modifiedGrades.vue
index 10f5f3e..2564d18 100644
--- a/src/views/trainExam/modifiedGrades.vue
+++ b/src/views/trainExam/modifiedGrades.vue
@@ -388,7 +388,7 @@
trigger: "blur"
}
],
- width: 200,
+ // width: 200,
overHidden: true
},
@@ -549,7 +549,13 @@
viewDisplay: false,
width: 130
},
-
+ {
+ label: "审核人",
+ display: false,
+ prop: "auditUserName",
+ width: 90,
+ overHidden: true
+ },
{
label: "审核时间",
prop: "auditTime",
@@ -626,7 +632,8 @@
editDisplay: true,
// 表单编辑时是否为查看模式
editDetail: false,
- width: 68
+ width: 68,
+ overHidden: true
}
]
},
@@ -644,6 +651,13 @@
};
},
created() {
+
+
+ const auditUserName = this.findObject(this.questionBankOption.column, "auditUserName");
+ const auditTime = this.findObject(this.questionBankOption.column, "auditTime");
+
+
+
if (this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "民警") {
//判断是否为市局管理员
if (this.userInfo.jurisdiction == "1372091709474910209") {
@@ -658,6 +672,15 @@
this.checks = true;
this.questionBankOption.tip = true;
}
+
+
+ //非管理员隐藏审核人
+ // if (this.userInfo.role_name.indexOf("admin") == -1){
+ if (!(this.permission.score_audit_check || check)){
+ auditUserName.hide = true
+ auditTime.hide = true
+ }
+
},
mounted() {
this.$store.commit("setWindowSizeHeightAdd");
--
Gitblit v1.9.3