zhengpz
2021-08-27 27c0c8c3769d5725b201ed897ca1ec2ff27a4e86
src/views/securityCompany/confess.vue
@@ -2,8 +2,8 @@
 * @Author: Morpheus
 * @Date: 2021-07-07 17:30:05
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 16:07:26
 * menu-name 自招保安单位查询
 * @Last Modified time: 2021-07-10 16:01:42
 * menu-name 保安服务公司查询
 */
<template>
  <basic-container>
@@ -25,13 +25,29 @@
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @row-click="handleRowClick"
      @on-load="onLoad"
    >
      <!-- @row-click="handleRowClick" -->
      <template slot-scope="{ row }" slot="znum">
        <el-tag
          class="rowClickSelf"
          @click="rowClickSelf(row)"
          title="点击查看保安人员情况"
          >{{ row.znum }}</el-tag
        >
      </template>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-s-custom"
          :size="size"
          :type="type"
          @click.stop="handleRowClick(row)"
          >查看
        </el-button>
        <el-button
          :size="size"
          :type="type"
          icon="el-icon-warning"
          class="zhengJian-icon"
          @click.stop="punish(row)"
          >处罚</el-button
@@ -80,8 +96,8 @@
  add,
  update,
  remove,
} from "@/api/securityCompany/confess";
import { savePunish } from "@/api/securityCompany/security";
  savePunish,
} from "@/api/securityCompany/security";
import { mapGetters } from "vuex";
import { companyColimn } from "./column";
@@ -165,101 +181,22 @@
        delBtn: false,
        editBtn: false,
        addBtn: false,
        menuWidth: 100,
        selection: true,
        searchShowBtn: false,
        // menu: false,
        border: true,
        align: "center",
        height: "auto",
        calcHeight: 30,
        tip: false,
        searchShow: true,
        menuWidth: 160,
        searchMenuSpan: 6,
        index: true,
        searchShowBtn: false,
        viewBtn: true,
        dialogClickModal: false,
        column: companyColimn,
        // [
        //   {
        //     label: "公司名称",
        //     prop: "enterprisename",
        //     search: true,
        //     searchSpan: 4,
        //     // width: 300,
        //     minWidth: 120,
        //     overHidden: true,
        //     display: false,
        //   },
        //   {
        //     label: "法定代表人",
        //     prop: "representative",
        //     display: false,
        //     width: 86,
        //   },
        //   {
        //     label: "法人电话",
        //     prop: "representativecell",
        //     display: false,
        //     width: 95,
        //   },
        //   {
        //     label: "注册时间",
        //     prop: "establishtime",
        //     type: "date",
        //     format: "yyyy-MM-dd",
        //     valueFormat: "yyyy-MM-dd",
        //     mock: {
        //       type: "datetime",
        //       format: "yyyy-MM-dd",
        //     },
        //     search: true,
        //     searchSpan: 4,
        //     display: false,
        //     width: 140,
        //   },
        //   {
        //     label: "注册资金",
        //     prop: "registeredcapital",
        //     display: false,
        //     width: 110,
        //   },
        //   {
        //     label: "实缴资金",
        //     prop: "capital",
        //     display: false,
        //     width: 110,
        //   },
        //   // {
        //   //   label: "公司类型",
        //   //   prop: "enterprises",
        //   //   display: false,
        //   //   width: 220,
        //   //   overHidden: true,
        //   // },
        //   {
        //     label: "联系人",
        //     prop: "contacts",
        //     display: false,
        //     overHidden: true,
        //     width: 95,
        //   },
        //   {
        //     label: "联系电话",
        //     prop: "contactscell",
        //     display: false,
        //     overHidden: true,
        //     width: 95,
        //   },
        //   {
        //     label: "注册地址",
        //     prop: "address",
        //     display: false,
        //     overHidden: true,
        //   },
        // ],
        group: [
          {
            label: "详细信息",
@@ -309,14 +246,12 @@
    },
  },
  methods: {
    punish(row) {
      //打开处罚
      // console.log(row);
      this.objf = {
        deptid: row.departmentid,
        enterprisename: row.enterprisename,
      };
      this.dialogVisible = true;
    rowClickSelf(val) {
      console.log(val.departmentid);
      this.$router.push({
        path: "/securityGuardManagement/registerOnce",
        query: { departmentid: val.departmentid },
      });
    },
    close(row) {
      this.dialogVisible = false;
@@ -350,7 +285,7 @@
      this.objf = {};
    },
    errorf(err) {
      this.$message.success("操作失败");
      this.$message.success("请查看控制台");
      console.log(err);
    },
    handleClose(done) {
@@ -362,6 +297,15 @@
        punisnum: "",
      };
      done();
    },
    punish(row) {
      //打开处罚
      // console.log(row);
      this.objf = {
        deptid: row.departmentid,
        enterprisename: row.enterprisename,
      };
      this.dialogVisible = true;
    },
    rowSave(row, done, loading) {
      add(row).then(
@@ -457,7 +401,7 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        console.log(this.data, "自招单位");
        console.log(this.data);
        this.loading = false;
        this.selectionClear();
      });
@@ -467,7 +411,8 @@
    handleRowClick(row) {
      // delete (row["name"]);
      var obj = row;
      obj["name"] = "保安公司详细资料";
      obj["name"] = "保安公司详细信息";
      console.log(obj, "obj");
      this.$router.push({
        path: `/securityCompany/index`,
        query: obj,
@@ -477,5 +422,5 @@
};
</script>
<style>
<style lang="scss">
</style>