From e4100ecc3a88273dcdbc2c1452d4e9f00736f3db Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 28 Aug 2021 10:17:44 +0800
Subject: [PATCH] 派遣单位管理修改,考试成绩查询样式微调
---
src/views/securityGuard/securityGuardDetail.vue | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 102 insertions(+), 15 deletions(-)
diff --git a/src/views/securityGuard/securityGuardDetail.vue b/src/views/securityGuard/securityGuardDetail.vue
index d9e4c90..b388b1a 100644
--- a/src/views/securityGuard/securityGuardDetail.vue
+++ b/src/views/securityGuard/securityGuardDetail.vue
@@ -10,6 +10,9 @@
:data="data1"
:page.sync="page1"
:table-loading="loading1"
+ @row-save="rowSave1"
+ @row-update="rowUpdate1"
+ @row-del="rowDel1"
@refresh-change="refreshChange1"
>
</avue-crud>
@@ -38,9 +41,11 @@
<img :src="obj0.myPicture" alt="" v-else />
</div>
<div class="imgs">
- <!-- <div v-if="obj0.myPicture">暂无二维码</div> -->
- <!-- <img :src="obj0.myPicture" alt="" v-else/> -->
- <img src="/img/register/ewm.png" alt="" />
+ <div v-if="erweima == ''">暂无二维码</div>
+ <img :src="erweima" alt="" v-else />
+ <!-- <img src="/img/register/ewm.png" alt="" /> -->
+ <!-- logoSrc="/img/register/ewm.png" -->
+ <!-- <vue-qr :text="goToUrl" :size="200"></vue-qr> -->
</div>
<!-- <img src="/img/mock/card/card-1.jpg" alt="" /> -->
@@ -85,14 +90,25 @@
practitionersColumn,
trackRecordColumn,
} from "./data";
-import { getUserPractitionersInfo } from "@/api/system/user";
+import {
+ addExperience,
+ updateExperience,
+ getExperienceDetail,
+ experienceRemove,
+ getExperienceList
+} from "@/api/experience/experience";
+
import {
getPerformanceInfo,
add,
update,
page,
remove,
+ getER,
} from "@/api/performance/performance";
+
+// import vueQr from "vue-qr";
+
export default {
data() {
return {
@@ -102,7 +118,7 @@
column: [
{
// icon: "el-icon-info",
- label: "保安员入职登记基本信息",
+ label: "保安员基本信息",
prop: "tab1",
},
{
@@ -152,12 +168,12 @@
total: 0,
},
query1: {},
+ query2: {},
data1: [],
data2: [],
option1: {
card: true,
- menu: false,
- addBtn: false,
+ menu: true,
height: "auto",
widtd: "auto",
calcHeight: 54,
@@ -185,8 +201,12 @@
align: "center",
column: trackRecordColumn,
},
+ erweima: "",
};
},
+ // components: {
+ // vueQr,
+ // },
computed: {
ids1() {
let ids1 = [];
@@ -195,6 +215,12 @@
});
return ids1.join(",");
},
+ // goToUrl() {
+ // var url =
+ // "http://s16s652780.51mypc.cn/securityInfo/securityInfo.html?securityNumber=" +
+ // this.obj0.securitynumber;
+ // return url;
+ // },
},
methods: {
Print() {
@@ -221,24 +247,30 @@
//查询当前保安员的现实表现记录
this.getPerformancePageInfo();
this.loading2 = false;
+ } else if (column.prop == "tab4") {
+ getER(this.obj0.securitynumber).then((res) => {
+ this.erweima = res.data;
+ // console.log(res.data);
+ });
}
},
//查询当前保安员的从业记录信息
getPractitionersPageInfo() {
- var that = this;
+ var param = {
+ securityid: this.id,
+ };
//获取用户从业信息
console.log(this.id, "cid");
- getUserPractitionersInfo(this.id).then((res1) => {
- that.data1 = res1.data.data;
+ getExperienceList(this.current, this.size,param).then((res1) => {
+ const data = res1.data.data;
+ this.page1.total = data.total;
+ this.data1 = data.records;
+ this.loading1 = false;
});
},
//查询当前保安员的现实表现记录信息
getPerformancePageInfo() {
//获取现实表现信息
- // getPerformanceInfo(this.id).then((res) => {
- // that.data2 = res1.data.data;
- // console.log(that.data2, 1);
- // });
var param = {
securityid: this.id,
};
@@ -250,11 +282,32 @@
this.loading2 = false;
});
},
+
+
rowSave2(form, done, loading) {
form.securityid = this.id;
add(form).then(
(res) => {
this.getPerformancePageInfo(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ // }
+ },
+ //从业记录新增
+ rowSave1(form, done, loading) {
+ form.securityid = this.id;
+ addExperience(form).then(
+ (res) => {
+ this.getPractitionersPageInfo(this.page1);
this.$message({
type: "success",
message: "操作成功!",
@@ -285,6 +338,23 @@
}
);
},
+ rowUpdate1(row, index, done, loading) {
+ row.securityid = this.id;
+ updateExperience(row).then(
+ () => {
+ this.getPractitionersPageInfo(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
rowDel2(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
@@ -296,6 +366,23 @@
})
.then(() => {
this.getPerformancePageInfo(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ rowDel1(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return experienceRemove(row.id);
+ })
+ .then(() => {
+ this.getPractitionersPageInfo(this.page1);
this.$message({
type: "success",
message: "操作成功!",
@@ -423,7 +510,7 @@
height: 110px;
border-radius: 10px;
position: absolute;
- border: 1px solid rgba($color: #888888, $alpha: 0.5);
+ // border: 1px solid rgba($color: #888888, $alpha: 0.5);
top: 330px;
right: 103px;
display: flex;
--
Gitblit v1.9.3