Administrator
2021-07-13 b8cae8bc0cf10a9807e34c8ffc0b61e747f41073
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 {
  securityBaseInfoColumn,
  practitionersColumn,
  trackRecordColumn,
} from "./data";
import {getUserPractitionersInfo} from "@/api/system/user";
import {add,update,page,remove,getPerformanceInfo} from "@/api/performance/performance";
import { add, update, page, remove } from "@/api/performance/performance";
export default {
  data() {
    return {
@@ -91,10 +94,10 @@
      data1: [],
      data2: [],
      option1: {
        card: false,
        card: true,
        menu:false,
        addBtn:false,
        height:'auto',
        height: "auto",
        widtd:"auto",
        calcHeight: 54,
        border: false,
@@ -102,14 +105,14 @@
        tip: false,
        index: true,
        dialogClickModal: false,
        headerAlign: 'center',
        align: 'center',
        headerAlign: "center",
        align: "center",
        column: practitionersColumn,
      },
      option2: {
        card: true,
        menu:true,
        height:'auto',
        height: "auto",
        widtd:"auto",
        calcHeight: 54,
        border: false,
@@ -117,8 +120,8 @@
        tip: false,
        index: true,
        dialogClickModal: false,
        headerAlign: 'center',
        align: 'center',
        headerAlign: "center",
        align: "center",
        column: trackRecordColumn,
      },
    };
@@ -151,27 +154,28 @@
    getPractitionersPageInfo(){
        var that = this;
        //获取用户从业信息
        getUserPractitionersInfo(this.cardid).then(res1 =>{
      getUserPractitionersInfo(this.cardid).then((res1) => {
            that.data1 = res1.data.data;
        })
      });
    },
    //查询当前保安员的现实表现记录信息
    getPerformancePageInfo(){
        //获取现实表现信息
        var param = {
          cardid:this.cardid
        }
        page(this.current,this.size,param).then(res2 =>{
        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>