From 6150cb98194814c285e8f72d7e8c11bbd8b9a121 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 15 Sep 2021 21:09:21 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_regulatory_ys
---
src/views/securityGuardManagement/register.vue | 259 ++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 194 insertions(+), 65 deletions(-)
diff --git a/src/views/securityGuardManagement/register.vue b/src/views/securityGuardManagement/register.vue
index a90f75f..ef4afa4 100644
--- a/src/views/securityGuardManagement/register.vue
+++ b/src/views/securityGuardManagement/register.vue
@@ -2,7 +2,7 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: liu
- * @Last Modified time: 2021-09-10 16:47:56
+ * @Last Modified time: 2021-09-14 17:56:13
* menu-name 保安员注册查询
*/
<template>
@@ -93,6 +93,13 @@
>荣誉录入</el-button
>
<el-button
+ icon="el-icon-finished"
+ :size="size"
+ :type="type"
+ @click.stop="trackRecord(row)"
+ >现实表现
+ </el-button>
+ <el-button
:size="size"
:type="type"
class="zhengJian-icon"
@@ -107,10 +114,21 @@
:size="size"
:type="type"
class="zhengJian-icon"
- :disabled="row.hold != 1"
- :title="row.hold != 1 ? '暂无证件或已吊销' : ''"
+ v-if="row.hold != 3"
@click.stop="handleCredentials(row)"
+ :title="row.hold == 2 ? '暂无证件' : ''"
+ :disabled="row.hold == 2"
>证件吊销</el-button
+ >
+
+ <el-button
+ icon="icon-zhengjian"
+ :size="size"
+ :type="type"
+ class="zhengJian-icon"
+ v-if="row.hold == 3"
+ @click.stop="handleCredentialssee(row)"
+ >吊销原因</el-button
>
</template>
</avue-crud>
@@ -201,6 +219,16 @@
}}</span>
</div>
<div class="bmb-b">
+ 地址:<span class="bmb-b-s">{{
+ objVisiblecertificates.address
+ }}</span>
+ </div>
+ <div class="bmb-b">
+ 身份证:<span class="bmb-b-s">{{
+ objVisiblecertificates.cardid
+ }}</span>
+ </div>
+ <div class="bmb-b">
发证机关:<span class="bmb-b-s">南昌市公安局</span>
</div>
<div class="bmb-b">
@@ -254,6 +282,22 @@
</span>
</div> -->
</div>
+ <el-dialog
+ title="现实表现"
+ append-to-body
+ :visible.sync="trackRecordVisible"
+ >
+ <avue-crud
+ :option="option2"
+ :data="data2"
+ :page.sync="page2"
+ @row-save="rowSave2"
+ @row-update="rowUpdate2"
+ @row-del="rowDel2"
+ :table-loading="loading2"
+ >
+ </avue-crud>
+ </el-dialog>
</div>
</template>
@@ -269,6 +313,15 @@
import website from "@/config/website";
import { getToken } from "@/util/auth";
import { addhonor, getER } from "@/api/register/honor";
+
+import {
+ //现实表现
+ trackRecordadd,
+ trackRecordupdate,
+ trackRecordpage,
+ trackRecordremove,
+} from "@/api/performance/performance";
+import { trackRecordColumn } from "./data";
export default {
data() {
@@ -289,6 +342,36 @@
}
};
return {
+ //现实表现
+ securityid2: "",
+ loading2: true,
+ page2: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ query2: {},
+ data2: [],
+ option2: {
+ menu: false,
+ height: 400,
+ addBtn: false,
+ delBtn: false,
+ editBtn: false,
+ widtd: "auto",
+ calcHeight: 54,
+ border: true, //liu
+ stripe: true,
+ tip: false,
+ index: true,
+ dialogClickModal: false,
+ headerAlign: "center",
+ align: "center",
+ column: trackRecordColumn,
+ },
+ trackRecordData: [],
+ trackRecordVisible: false,
+
dialogVisiblecertificates: false,
objVisiblecertificates: {},
erweima: "", //二维码
@@ -325,7 +408,13 @@
],
},
{
- label: "荣誉内容",
+ label: "发证机关",
+ prop: "paperUnit",
+ span: 24,
+ labelWidth: 110,
+ },
+ {
+ label: "荣誉情况",
prop: "honor",
span: 24,
type: "textarea",
@@ -371,63 +460,41 @@
treeLoad: function (node, resolve) {
const parentId = node.level === 0 ? 0 : node.data.id;
-
-
if (parentId == 0) {
getDeptLazyTree(parentId).then((res) => {
-
resolve(
-
res.data.data.map((item) => {
-
return {
...item,
leaf: !item.hasChildren,
};
-
})
-
);
-
});
- } else if (parentId == '1372091709474910209') {
-
+ } else if (parentId == "1372091709474910209") {
getDeptLazyTree(parentId).then((res) => {
-
resolve(
-
res.data.data[0].children.map((item) => {
-
return {
...item,
leaf: !item.hasChildren,
};
-
})
-
);
-
});
} else {
getDeptLazyTree(parentId).then((res) => {
res.data.data = [];
resolve(
-
res.data.data.map((item) => {
-
return {
...item,
leaf: !item.hasChildren,
};
-
})
-
);
-
});
}
-
-
},
addBtn: false,
menu: false,
@@ -449,6 +516,8 @@
height: "auto",
calcHeight: 80,
tip: false,
+ // 操作栏宽度
+ menuWidth: 398,
searchShowBtn: false,
searchShow: true,
border: true,
@@ -457,8 +526,6 @@
viewBtn: false,
//dialogType: 'drawer',
dialogClickModal: false,
- // 操作栏宽度
- menuWidth: 310,
column: [
{
label: "姓名",
@@ -810,6 +877,78 @@
}
},
methods: {
+ //现实表现↓
+ trackRecord(row) {
+ // console.log(row);
+ this.securityid2 = row.id;
+ this.getPerformancePageInfo(this.page2);
+ },
+ getPerformancePageInfo(page) {
+ var param = {
+ securityid: this.securityid2,
+ };
+ this.trackRecordVisible = true;
+ trackRecordpage(page.currentPage, page.pageSize, param).then((res2) => {
+ const data = res2.data.data;
+ this.page2.total = data.total;
+ this.data2 = data.records;
+ // console.log(this.data2, 1);
+ this.loading2 = false;
+ });
+ },
+ rowSave2(form, done, loading) {
+ form.securityid = this.securityid2;
+ trackRecordadd(form).then(
+ (res) => {
+ this.getPerformancePageInfo(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ // }
+ },
+ rowUpdate2(row, index, done, loading) {
+ row.securityid = this.securityid2;
+ trackRecordupdate(row).then(
+ () => {
+ this.getPerformancePageInfo(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel2(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return trackRecordremove(row.id);
+ })
+ .then(() => {
+ this.getPerformancePageInfo(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ //现实表现↑
rowClickSelf(row) {
console.log(row, "baoan");
this.$router.push({
@@ -1058,41 +1197,31 @@
},
// 证件吊销事件
handleCredentials(row) {
- console.log(row);
- // return;
- if (row.hold == 2) {
- this.$message({
- type: "info",
- message: "证件未拥有!",
- });
- } else if (row.hold == 3) {
- this.$message({
- type: "info",
- message: "证件已吊销!",
- });
- } else if (row.hold == 1) {
- this.$confirm("是否吊销该人员的证件?", "提示", {
- confirmButtonText: "是",
- cancelButtonText: "否",
- type: "warning",
- })
- .then(() => {
- updateHold(3, row.cardid).then((res) => {
- console.log(res);
- this.$message({
- type: "success",
- message: "吊销成功!",
- });
- this.refreshChange();
+ // console.log(row);
+ this.$prompt("证件吊销原因", "提示", {
+ confirmButtonText: "确定吊销",
+ cancelButtonText: "取消",
+ inputErrorMessage: "",
+ })
+ .then(({ value }) => {
+ // console.log(value);
+
+ updateHold(3, row.cardid, value).then((res) => {
+ this.$message({
+ type: "success",
+ message: "操作成功",
});
- })
- .catch(() => {
- // this.$message({
- // type: "info",
- // message: "已取消删除",
- // });
+ this.refreshChange();
});
- }
+ })
+ .catch(() => {});
+ },
+ handleCredentialssee(see) {
+ var str = ` <div><span>吊销时间:</span><span>${see.holdvtime}</span></div>
+ <div><span>吊销内容:</span><span>${see.holdv}</span></div>`;
+ this.$alert(str, "吊销原因", {
+ dangerouslyUseHTMLString: true,
+ });
},
},
};
@@ -1278,15 +1407,15 @@
.bmb-b {
padding-left: 20px;
box-sizing: border-box;
- height: 3.9rem;
+ height: 2.9rem;
margin-left: 3rem;
width: 100%;
- font-size: 2rem;
+ font-size: 1.5rem;
font-weight: 300;
.bmb-b-s {
display: inline-block;
width: 20rem;
- font-size: 2rem;
+ font-size: 1.5rem;
font-weight: 300;
}
}
--
Gitblit v1.9.3