liuyg
2021-07-15 bec79d7b98d7aaf67e9c8f56083ff9f689f266c3
蓝色主题 修改 和监管处罚创建
6 files modified
4 files added
990 ■■■■■ changed files
src/api/regulatoryInformation/regulatoryInformation.js 40 ●●●●● patch | view | raw | blame | history
src/router/views/index.js 17 ●●●● patch | view | raw | blame | history
src/styles/element-ui.scss 242 ●●●●● patch | view | raw | blame | history
src/styles/media.scss 12 ●●●● patch | view | raw | blame | history
src/styles/ourBackgroundColor.scss 22 ●●●●● patch | view | raw | blame | history
src/styles/sidebar.scss 7 ●●●● patch | view | raw | blame | history
src/styles/tags.scss 10 ●●●●● patch | view | raw | blame | history
src/styles/top.scss 11 ●●●● patch | view | raw | blame | history
src/views/regulatoryInformation/data.js 271 ●●●●● patch | view | raw | blame | history
src/views/regulatoryInformation/index.vue 358 ●●●●● patch | view | raw | blame | history
src/api/regulatoryInformation/regulatoryInformation.js
New file
@@ -0,0 +1,40 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
    return request({
        url: '/api/punish/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
export const adddata = (row) => {
    return request({
        url: '/api/punish/save',
        // url: 'http://192.168.0.104:80/punish/save',
        method: 'post',
        data: row
    })
}
export const update = (row) => {
    return request({
        url: '/api/punish/update',
        method: 'post',
        data: row
    })
}
export const remove = (ids) => {
    return request({
        url: '/api/punish/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}
src/router/views/index.js
@@ -134,7 +134,7 @@
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
    }]
  },{
  }, {
    path: '/attach',
    redirect: '/resource/attach',
    component: Layout,
@@ -191,5 +191,18 @@
    path: '/map',
    component: () =>
      import( /* webpackChunkName: "views" */ '@/views/mapHome/index')
  },
  }, {
    path: '/regulatoryInformation',
    redirect: '/regulatoryInformation/index',
    component: Layout,
    children: [{
      path: 'index',
      name: '监管信息',
      meta: {
        i18n: 'index',
      },
      component: () =>
        import( /* webpackChunkName: "views" */ '@/views/regulatoryInformation/index')
    }]
  }
]
src/styles/element-ui.scss
@@ -1,3 +1,4 @@
@import "./ourBackgroundColor.scss";
.el-dropdown-menu__item {
  font-size: 12px !important;
  line-height: 28px !important;
@@ -25,7 +26,6 @@
  display: none;
}
.el-message__icon,
.el-message__content {
  display: inline-block;
@@ -49,12 +49,19 @@
  padding: 0 !important;
}
.el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-submenu .el-submenu__title:hover {
.el-dropdown-menu__item--divided:before,
.el-menu,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
  background-color: transparent;
}
.el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-submenu .el-submenu__title:hover {
.el-dropdown-menu__item--divided:before,
.el-menu,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
  background-color: transparent !important;
}
@@ -62,10 +69,237 @@
  padding: 6px 18px !important;
}
//部分全局颜色设置
.el-card__body {
  background-color: $mainB !important;
  // border:1px solid $mainB !important;
  //padding: 16px !important;
}
.el-divider--horizontal {
  margin: 12px 0 !important;
}
.avue-group .el-collapse,
.avue-group .el-collapse-item__wrap {
  border-color: $mainB !important;
  background-color: $mainB !important;
}
.el-form-item__label {
  color: $fontColor !important;
}
.avue-crud__menu {
  background-color: $mainB !important;
}
.el-table {
  background-color: $mainB !important;
  color: $fontColor !important;
}
.el-table th,
.el-table tr {
  background-color: $mainB !important;
  color: $fontColor !important;
}
.el-table__body tr.hover-row > td {
  background-color: $mainBhover !important;
}
.el-button--text {
  color: $fontColor !important;
}
.el-card {
  background-color: $mainB !important;
}
.el-tabs__item {
  color: $fontColor !important;
}
//标签栏活动按钮
.el-tabs__item.is-active {
  color: $fontColorActive1 !important;
}
.el-input.is-disabled .el-input__inner {
  color: $fontColor !important;
}
.el-textarea.is-disabled .el-textarea__inner {
  color: $fontColor !important;
}
.el-textarea.is-disabled .el-textarea__inner {
  background-color: $mainB !important;
}
.el-pagination__jump,
.el-pagination__total {
  color: $fontColor !important;
}
.avue-sidebar .el-menu-item i,
.avue-sidebar .el-menu-item span,
.avue-sidebar .el-submenu__title i,
.avue-sidebar .el-submenu__title span {
  color: $fontColor !important;
}
.el-menu-item:hover {
  // background-color: $mainBhover !important;
  color: red !important;
}
.el-input__inner {
  background-color: $inputB !important;
  color: $fontColor !important;
}
.el-tree-node__content {
  background-color: $mainB !important;
  color: $fontColor !important;
}
.el-tree-node__content:hover {
  background-color: $mainBhover !important;
}
//el按钮
.el-button {
  background-color: $mainBhover !important;
  color: $fontColor !important;
}
.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
  background-color: $inputB !important;
  color: $fontColor !important;
}
.el-tree {
  background-color: $inputB !important;
  color: $fontColor !important;
}
.el-table th {
  background-color: $inputB1 !important;
}
//弹窗
.el-dialog__header {
  background-color: $inputB !important;
}
.avue-dialog .el-dialog__title,
.avue-dialog .el-drawer__header,
.el-dialog__title {
  color: $fontColor !important;
}
.el-dialog__body {
  background-color: $inputB !important;
  color: $fontColor !important;
}
.w-e-toolbar {
  background-color: $inputB !important;
  color: $fontColor !important;
}
.el-collapse-item__content {
  color: $fontColor !important;
}
//表格等待
.el-loading-mask {
  background-color: $inputB1 !important;
}
//附件上传弹窗中心
.el-upload-dragger {
  background-color: $inputB1 !important;
}
.el-upload-dragger .el-upload__text,
.el-upload-dragger .el-icon-upload {
  color: $fontColor !important;
}
//单选
.el-radio {
  color: $fontColor !important;
}
//多行输入
.el-textarea__inner {
  background-color: $inputB1 !important;
}
// 数字type input
.el-input-number__decrease,
.el-input-number__increase {
  background-color: $inputB1 !important;
}
//菜单图标
.el-input-group__append,
.el-input-group__prepend {
  background-color: $inputB1 !important;
  color: $fontColor !important;
}
//登入表单 恢复按钮
.login-border .el-input__inner {
  background-color: #fff !important;
  color: #606266 !important;
}
//菜单编辑删除按钮
.el-button + .el-button {
  padding-left: 8px;
  padding-right: 8px;
}
//菜单自定义按钮
.el-button--text,
.el-button--text.is-disabled,
.el-button--text.is-disabled:focus,
.el-button--text.is-disabled:hover,
.el-button--text:active {
  padding-left: 8px !important;
  padding-right: 8px !important;
}
//菜单按钮
.login-border .el-button {
  background-color: $buttonB !important;
  color: #fff !important;
}
//bug窗口
.el-dialog,
.el-pager li {
  background-color: $mainB !important;
}
//导航搜索 下拉
.el-autocomplete-suggestion__wrap {
  background-color: $mainB !important;
}
.el-autocomplete-suggestion li {
  color: $fontColor !important;
}
.el-autocomplete-suggestion li:hover {
  background-color: $inputB1 !important;
}
//总标签栏 更多 下拉框
.el-dropdown-menu {
  background-color: $mainB !important;
}
.el-dropdown-menu__item {
  color: $fontColor !important;
}
.el-dropdown-menu__item:hover {
  background-color: $inputB1 !important;
  color: $fontColor !important;
}
//总标签栏
.avue-tags {
  background-color: $mainBx1 !important;
  color: $fontColor !important;
}
//通知弹窗
.el-popover {
  background-color: $mainB !important;
}
.avue-notice__subtitle,
.avue-notice__title {
  color: $fontColor !important;
}
//左侧导航栏
.avue-logo {
  background-color: $mainB !important;
}
.avue-sidebar {
  background-color: $mainB !important;
}
src/styles/media.scss
@@ -1,3 +1,7 @@
@import "./ourBackgroundColor.scss";
.avue-logo{
  background-color: $leftMenuTop;
}
.avue-left,
.avue-header,
.avue-top,
@@ -11,7 +15,8 @@
.avue-contail {
  width: 100%;
  height: 100%;
  background: #f0f2f5;
  // background: #f0f2f5;
  background: $black;
  background-size: 100%;
  background-repeat: no-repeat;
}
@@ -45,7 +50,7 @@
.avue-header {
  padding-left: 240px;
  width: 100%;
  background-color: #fff;
  background-color: $black;
  box-sizing: border-box;
}
@@ -59,7 +64,8 @@
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.5s;
  background: #f0f2f5;
  // background: #f0f2f5;
  background: $black;
  z-index: 1026;
  &--fullscreen {
src/styles/ourBackgroundColor.scss
New file
@@ -0,0 +1,22 @@
$black: #03277c;
$leftMenuB: #1446dd;
$leftMenuTop: #1446dd;
$fontColor: #fff;
$mainB2: #0048e5;
$mainB: #004ca7;
$mainBx1: #013e8a;
$mainBhover: #1d5ce4;
$fontColorActive: #2f96ff;
$fontColorActive1: #52a9ff;
$inputB: #0246e1;
$buttonB: #7cbdff;
$inputB1: rgb(25, 88, 233);
src/styles/sidebar.scss
@@ -29,13 +29,16 @@
    }
    
}
@import "./ourBackgroundColor.scss";
.avue-sidebar {
    user-select: none; 
    position: relative;
    padding-top: 60px;
    height: 100%;
    position: relative;
    background-color: #20222a;
    background-color: $leftMenuB;
    // background-color: #20222a;
    transition: width .2s;
    box-sizing: border-box;
    box-shadow: 2px 0 6px rgba(0,21,41,.35);
@@ -81,7 +84,7 @@
                background: #409eff;
                position: absolute;
            }
            background-color: rgba(0,0,0,.8);
            background-color: $black;
            i,span{
                color:#fff;
            }
src/styles/tags.scss
@@ -1,5 +1,5 @@
@import "./ourBackgroundColor.scss";
.avue-tags {
    user-select: none; 
    position: relative;
@@ -7,8 +7,10 @@
    margin-bottom: 10px;
    box-sizing: border-box;
    overflow: hidden;
    border-top: 1px solid #f6f6f6;
    background-color: #fff;
    border-top: 1px solid $black;
    // border-top: 1px solid #f6f6f6;
    background-color: $black;
    // background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
    .el-tabs--card>.el-tabs__header {
        margin: 0;
@@ -27,7 +29,7 @@
        line-height:40px;
        font-size: 13px;
        font-weight: normal;
        color: #ccc;
        color: $fontColor;
        &.is-active {
            color: #409EFF;
            border-bottom: 3px solid #409EFF;
src/styles/top.scss
@@ -1,9 +1,14 @@
@import "./ourBackgroundColor.scss";
$height:64px;
.el-dropdown{
    color: $fontColor !important;
}
.avue-top {
    padding: 0 20px;
    position: relative;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, .65);
    box-shadow: 0 1px 2px 0 $fontColor;
    // color: rgba(0, 0, 0, .65);
    color: $fontColor;
    font-size: 28px;
    height: $height;
    line-height: $height;
@@ -17,6 +22,7 @@
    .el-menu--horizontal>.el-menu-item {
      height: $height;
      line-height: $height;
      color: $fontColor !important;
    }
}
.avue-breadcrumb {
@@ -44,6 +50,7 @@
    top:0;
    width: 400px !important;
    .el-input__inner {
        border: 1px solid #fff !important;
        font-size: 13px;
        border: none;
        background-color: transparent;
src/views/regulatoryInformation/data.js
New file
@@ -0,0 +1,271 @@
var DIC = [
    {
        label: '招聘中',
        value: 1,
    }, {
        label: '停止招聘',
        value: 2,
    }
]
var DIC1 = [
    {
        label: '拥有',
        value: 1,
    }, {
        label: '未拥有',
        value: 2,
    }
]
var w = 160
    , s = 12;
export var column = [
    {
        label: "id",
        prop: "id",
        hide: true,
        editDisplay: false,
        addDisplay: false,
        viewDisplay: false,
    },
    // {
    //     label: "保安单位",
    //     prop: "tenantName",
    //     hide: true,
    //     editDisplay: false,
    //     addDisplay: false
    // },
    // {
    //     label: "保安id",
    //     prop: "deptId",
    //     hide: true,
    //     editDisplay: false,
    //     addDisplay: false,
    //     value: JSON.parse(window.localStorage.getItem("saber-userInfo")).content.dept_id
    // },//上面不显示
    {
        label: "保安公司",
        prop: "deptId",
        rules: [{
            required: true,
            message: "请输入保安公司",
            trigger: "blur"
        }],
        // addDisplay: true,
        // editDisplay: true,
        // viewDisplay: true,
        overHidden: true,
        searchSpan: 4,
        dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
        props: {
            label: "title",
            value: "id"
        },
        hide: true,
        // search: true,
        type: "select",
    },
    {
        label: "招聘岗位",
        prop: "name",
        hide: true,
        // search: true,
    },
    {
        label: "招聘人数",
        prop: "number",
        width: 70,
        hide: true,
        // search: true,
    },
    {
        label: "保安证",
        prop: "permit",
        // addDisplay: true,
        // editDisplay: true,
        // viewDisplay: true,
        filter: false,
        type: 'tree',
        dicData: DIC1,
        searchSpan: 4,
        hide: true,
        // dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
        // props: {
        //     label: "dictValue",
        //     value: "dictKey"
        // },
        // search: true,
        // type: "select",
    },
    {
        label: "学历要求",
        prop: "education",
        addDisplay: true,
        editDisplay: true,
        viewDisplay: true,
        searchSpan: 4,
        dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
        props: {
            label: "dictValue",
            value: "dictKey"
        },
        hide: true,
        // search: true,
        type: "select",
        // rules: [{
        //     required: true,
        //     message: "请选择学历",
        //     trigger: "blur"
        // }],
    },
    {
        label: "工作经验",
        prop: "experience",
        addDisplay: true,
        editDisplay: true,
        viewDisplay: true,
        hide: true,
        searchSpan: 4,
        dicUrl: "/api/blade-system/dict-biz/dictionary?code=experienceType",
        props: {
            label: "dictValue",
            value: "dictKey"
        },
        // search: true,
        type: "select",
        // rules: [{
        //     required: true,
        //     message: "请选择工作经验",
        //     trigger: "blur"
        // }],
    },
    {
        label: "工作任务",
        prop: "workDesc",
        // search: true,
        // width: 110,
        overHidden: true
    },
    {
        label: "福利",
        prop: "welfare",
        search: true,
        searchSpan: 5,
        overHidden: true
    },
    {
        label: "最低薪资",
        prop: "minSalary",
        width: 100,
        // search: true,
        searchSpan: 4,
    },
    {
        label: "最高薪资",
        prop: "maxSalary",
        width: 100,
        // search: true,
        searchSpan: 4,
    },
    {
        label: "单位性质",
        prop: "unitsNature",
        width: 70,
        addDisplay: true,
        editDisplay: true,
        viewDisplay: true,
        searchSpan: 4,
        dicUrl: "/api/blade-system/dict-biz/dictionary?code=unitsNatureType",
        props: {
            label: "dictValue",
            value: "dictKey"
        },
        // search: true,
        type: "select",
        // rules: [{
        //     required: false,
        //     message: "请选择单位规模",
        //     trigger: "blur"
        // }],
    },
    {
        label: "单位规模",
        prop: "unitsScale",
        addDisplay: true,
        editDisplay: true,
        viewDisplay: true,
        width: 150,
        searchSpan: 4,
        dicUrl: "/api/blade-system/dict-biz/dictionary?code=unitsScaleType",
        props: {
            label: "dictValue",
            value: "dictKey"
        },
        search: true,
        type: "select",
        // rules: [{
        //     required: true,
        //     message: "请选择单位规模",
        //     trigger: "blur"
        // }],
    },
    {
        label: "联系人",
        prop: "linkman",
        hide: true,
        // search: true,
    },
    {
        label: "联系人电话",
        prop: "phone",
        hide: true,
        // search: true,
        width: 110,
    },
    {
        label: "详细地址",
        prop: "address",
        width: 110,
        // search: true,
        hide: true,
        overHidden: true
    },
    {
        label: "开始时间",
        prop: "startTime",
        // search: true,
        hide: true,
        type: "date",
        format: "yyyy-MM-dd hh:mm:ss",
        valueFormat: "yyyy-MM-dd hh:mm:ss",
        width: 88,
    },
    {
        label: "结束时间",
        prop: "endTime",
        // search: true,
        hide: true,
        type: "date",
        format: "yyyy-MM-dd hh:mm:ss",
        valueFormat: "yyyy-MM-dd hh:mm:ss",
        width: 88,
    },
    {
        label: "招聘状态",
        // prop: "status",
        // search: true,
        // searchSpan: 4,
        width: 70,
        prop: 'status',
        hide: true,
        filter: false,
        type: 'tree',
        dicData: DIC,
        // rules: [{
        //     required: true,
        //     message: "请选择单位规模",
        //     trigger: "blur"
        // }],
    },
]
src/views/regulatoryInformation/index.vue
New file
@@ -0,0 +1,358 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-07 17:30:05
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-10 16:06:14
 * menu-name 监管信息
 */
<template>
  <basic-container>
    <avue-crud
      :option="option"
      :table-loading="loading"
      :data="data"
      :page.sync="page"
      :permission="permissionList"
      v-model="form"
      ref="crud"
      @row-update="rowUpdates"
      @row-save="rowSave"
      @row-del="rowDel"
      @search-change="searchChange"
      @search-reset="searchReset"
      @selection-change="selectionChange"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
    >
    </avue-crud>
  </basic-container>
</template>
<script>
import {
  getList,
  getDetail,
  adddata,
  update,
  remove,
} from "@/api/regulatoryInformation/regulatoryInformation";
import { mapGetters } from "vuex";
export default {
  data() {
    var dic = [
      {
        label: "警告",
        value: "0",
      },
      {
        label: "罚款",
        value: "1",
      },
      {
        label: "没收违法所得",
        value: "2",
      },
      {
        label: "没收非法财物",
        value: "3",
      },
      {
        label: "责令停止施工",
        value: "4",
      },
      {
        label: "责令停止使用",
        value: "5",
      },
      {
        label: "责令停止违法行为",
        value: "6",
      },
      {
        label: "责令停业",
        value: "7",
      },
    ];
    return {
      form: {},
      query: {},
      loading: true,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      selectionList: [],
      option: {
        // 操作栏多余按钮去除
        // delBtn: false,
        // editBtn: false,
        // addBtn: false,
        // selection: false,
        // menu: false,
        align: "center",
        height: "auto",
        calcHeight: 30,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        index: true,
        viewBtn: true,
        dialogClickModal: false,
        column: [
          {
            label: "保安公司",
            prop: "deptid",
            labelWidth: 120,
            searchLabelWidth: 120,
            searchSpan: 5,
            dicUrl:
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
            props: {
              label: "title",
              value: "id",
            },
            search: true,
            overHidden: true,
            type: "select",
            rules: [
              {
                required: true,
                message: "请输入保安公司",
                trigger: "blur",
              },
            ],
          },
          {
            label: "处罚类型",
            prop: "punishtype",
            type: "select",
            labelWidth: 120,
            // display: false,
            dicData: dic,
            // props: {
            //   label: "label",
            //   value: "value",
            // },
            searchSpan: 5,
            search: true,
            width: 120,
          },
          {
            label: "处罚原因",
            prop: "punishreason",
            // display: false,
            labelWidth: 120,
            width: 200,
          },
          {
            label: "处罚结果",
            prop: "punishresult",
            // display: false,
            width: 200,
            labelWidth: 120,
            overHidden: true,
          },
          {
            label: "处罚日期",
            prop: "punishtime",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            mock: {
              type: "datetime",
              labelWidth: 120,
              format: "yyyy-MM-dd",
            },
            // search: true,
            searchSpan: 4,
            // display: false,
            width: 180,
          },
          {
            label: "处罚批准文号",
            prop: "punisnum",
            labelWidth: 120,
            // display: false,
          },
        ],
        // group: [
        //   {
        //     label: "详细信息",
        //     prop: "baseInfo",
        //     icon: "el-icon-user-solid",
        //     column: [
        //       {
        //         label: "公司名称",
        //         prop: "enterprisename",
        //         display: false,
        //       },
        //     ],
        //   },
        //   {
        //     label: "详细信息",
        //     prop: "detailInfo",
        //     icon: "el-icon-s-order",
        //     column: [],
        //   },
        //   {
        //     label: "职责信息",
        //     prop: "dutyInfo",
        //     icon: "el-icon-s-custom",
        //     column: [],
        //   },
        // ],
      },
      data: [
        // {
        //   deptid: "江西众泰保安公司",
        //   punishtype: 2,
        //   punishreason: "非法施工",
        //   punishresult: "没收全部非法所得财产,并罚款3W元",
        //   punishtime: "2021-01-01",
        //   punisnum: 110110110120,
        // },
      ],
    };
  },
  computed: {
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.post_add, false),
        viewBtn: this.vaildData(this.permission.post_view, false),
        delBtn: this.vaildData(this.permission.post_delete, false),
        editBtn: this.vaildData(this.permission.post_edit, false),
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
  },
  methods: {
    rowSave(row, done, loading) {
      adddata(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
    },
    rowUpdates(row, index, done, loading) {
      // console.log(42342);
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
    },
    rowDel(row) {
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          return remove(row.id);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    // beforeOpen(done, type) {
    //   if (["edit", "view"].includes(type)) {
    //     getDetail(this.form.id).then((res) => {
    //       this.form = res.data.data;
    //     });
    //   }
    //   done();
    // },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
      // this.loading = false;
      this.loading = true;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        // this.selectionClear();
      });
    },
    // 行单击
    handleRowClick(row) {
      // delete (row["name"]);
      var obj = row;
      obj["name"] = "保安公司详细资料";
      this.$router.push({
        path: `/securityCompany/index`,
        query: obj,
      });
    },
  },
};
</script>
<style>
</style>