From 5fd9ab0d9b04fd7c29d2a147e3717ab7eff431be Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 13 Jul 2021 20:52:33 +0800
Subject: [PATCH] 整合冲突
---
src/views/securityGuard/securityGuardDetail.vue | 122 ++++++++++++++++++++++++----------------
1 files changed, 72 insertions(+), 50 deletions(-)
diff --git a/src/views/securityGuard/securityGuardDetail.vue b/src/views/securityGuard/securityGuardDetail.vue
index e4501d0..f23308e 100644
--- a/src/views/securityGuard/securityGuardDetail.vue
+++ b/src/views/securityGuard/securityGuardDetail.vue
@@ -2,8 +2,7 @@
<div class="dispatch">
<avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs>
<span v-if="typeTABS.prop === 'tab1'">
- <avue-form ref="form" v-model="obj0" :option="option0">
- </avue-form>
+ <avue-form ref="form" v-model="obj0" :option="option0"> </avue-form>
</span>
<span v-else-if="typeTABS.prop === 'tab2'">
<avue-crud
@@ -32,9 +31,13 @@
</template>
<script>
-import { securityBaseInfoColumn, practitionersColumn,trackRecordColumn } from "./data";
-import {getUserPractitionersInfo} from "@/api/system/user";
-import {add,update,page,remove,getPerformanceInfo} from "@/api/performance/performance";
+import {
+ securityBaseInfoColumn,
+ practitionersColumn,
+ trackRecordColumn,
+} from "./data";
+import { getUserPractitionersInfo } from "@/api/system/user";
+import { add, update, page, remove } from "@/api/performance/performance";
export default {
data() {
return {
@@ -58,9 +61,9 @@
},
],
},
- current:1,
- size:10,
- cardid: "",
+ current: 1,
+ size: 10,
+ cardid: "",
name: "",
dispatcherCompany: "",
id: "",
@@ -70,7 +73,7 @@
option0: {
emptyBtn: false,
submitBtn: false,
- labelWidth:"110",
+ labelWidth: "110",
gutter: 30,
column: securityBaseInfoColumn,
},
@@ -91,34 +94,34 @@
data1: [],
data2: [],
option1: {
- card: false,
- menu:false,
- addBtn:false,
- height:'auto',
- widtd:"auto",
+ card: true,
+ menu: false,
+ addBtn: false,
+ height: "auto",
+ widtd: "auto",
calcHeight: 54,
border: false,
- stripe:true,
+ stripe: true,
tip: false,
index: true,
dialogClickModal: false,
- headerAlign: 'center',
- align: 'center',
+ headerAlign: "center",
+ align: "center",
column: practitionersColumn,
},
option2: {
card: true,
- menu:true,
- height:'auto',
- widtd:"auto",
+ menu: true,
+ height: "auto",
+ widtd: "auto",
calcHeight: 54,
border: false,
- stripe:true,
+ stripe: true,
tip: false,
index: true,
dialogClickModal: false,
- headerAlign: 'center',
- align: 'center',
+ headerAlign: "center",
+ align: "center",
column: trackRecordColumn,
},
};
@@ -138,40 +141,41 @@
if (column.prop == "tab1") {
this.loading1 = false;
} else if (column.prop == "tab2") {
- //查询当前保安员的从业记录信息
- this.getPractitionersPageInfo();
- this.loading1 = false;
+ //查询当前保安员的从业记录信息
+ this.getPractitionersPageInfo();
+ this.loading1 = false;
} else if (column.prop == "tab3") {
- //查询当前保安员的现实表现记录
- this.getPerformancePageInfo();
- this.loading2 = false;
+ //查询当前保安员的现实表现记录
+ this.getPerformancePageInfo();
+ this.loading2 = false;
}
},
//查询当前保安员的从业记录信息
- getPractitionersPageInfo(){
- var that = this;
- //获取用户从业信息
- getUserPractitionersInfo(this.cardid).then(res1 =>{
- that.data1 = res1.data.data;
- })
+ getPractitionersPageInfo() {
+ var that = this;
+ //获取用户从业信息
+ getUserPractitionersInfo(this.cardid).then((res1) => {
+ that.data1 = res1.data.data;
+ });
},
//查询当前保安员的现实表现记录信息
- getPerformancePageInfo(){
- //获取现实表现信息
- var param = {
- cardid:this.cardid
- }
- page(this.current,this.size,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;
- })
+ getPerformancePageInfo() {
+ //获取现实表现信息
+ var param = {
+ cardid: this.cardid,
+ };
+ page(this.current, this.size, 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.cardid = this.cardid;
- add(form).then((res) => {
+ add(form).then(
+ (res) => {
this.getPerformancePageInfo(this.page2);
this.$message({
type: "success",
@@ -223,8 +227,10 @@
},
mounted() {
this.typeTABS = this.optionTABS.column[0];
- if (this.$route.query.row) {
- var row = this.$route.query.row;
+ var data = JSON.parse(this.$route.query.row);
+ if (data) {
+ var row = data;
+ // var row = this.$route.query.row;
for (var k in row) {
this.obj0[k] = row[k];
}
@@ -234,6 +240,22 @@
this.dispatcherCompany = row.dispatcherCompany;
this.id = row.id;
}
+
+ var flag = false,
+ i = 0,
+ ind = null;
+ this.$store.state.tags.tagList.forEach((item, index) => {
+ if (item.label == "保安员详情") {
+ if (flag == false) {
+ ind = index;
+ flag = true;
+ }
+ i++;
+ }
+ });
+ if (i > 1) {
+ this.$store.state.tags.tagList.splice(ind, 1);
+ }
},
};
</script>
--
Gitblit v1.9.3