Administrator
2021-12-20 7a525c53048e5508b44f468a7c738acff9f9790d
保安员管理新增排序
2 files modified
85 ■■■■ changed files
src/views/securityGuard/data.js 56 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 29 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/data.js
@@ -509,7 +509,8 @@
    {
        label: "性别",
        prop: "sexs",
        width: 80,
        sortable: true,
        width: 70,
        type: "select",
        dicData: [{
                label: "男",
@@ -532,7 +533,7 @@
        search: true,
        searchLabelWidth: 90,
        searchSpan: 5,
        minWidth: 150,
        width: 140,
        display: false
    },
    {
@@ -540,6 +541,8 @@
        prop: "avatar",
        type: "upload",
        listType: "picture-img",
        width: 60,
        display: false
    },
    {
        label: "籍贯",
@@ -554,7 +557,6 @@
        width: 55,
        display: false
    },
    {
        label: "出生日期",
        prop: "birthday",
@@ -568,31 +570,31 @@
        label: "年龄",
        prop: "age",
        width: 55,
        sortable: true,
        display: false
    },
    {
        label: "学历",
        prop: "education",
        display: false,
        width: 90,
        dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
        props: {
            label: "dictValue",
            value: "dictKey"
        },
        type: "select",
        // hide: true,
        rules: [{
            required: true,
            message: "请选择学历",
            trigger: "blur"
        }],
    },
    // {
    //     label: "学历",
    //     prop: "education",
    //     display: false,
    //     width: 90,
    //     dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
    //     props: {
    //         label: "dictValue",
    //         value: "dictKey"
    //     },
    //     type: "select",
    //     // hide: true,
    //     rules: [{
    //         required: true,
    //         message: "请选择学历",
    //         trigger: "blur"
    //     }],
    // },
    {
        label: "联系电话",
        prop: "phone",
        minWidth: 100,
        minWidth: 70,
        display: false
    },
    {
@@ -606,7 +608,8 @@
        prop: "securitynumber",
        search: true,
        searchLabelWidth: 90,
        minWidth: 115,
        sortable: true,
        width: 110,
        searchSpan: 5,
        addDisplay: false,
        editDisplay: false,
@@ -622,8 +625,10 @@
        label: '是否派遣',
        prop: 'dispatch',
        type: 'select',
        sortable: true,
        editDisplay: false,
        search: true,
        width: 80,
        searchSpan: 3,
        addDisplay: false,
        dicData: [{
@@ -644,6 +649,7 @@
        label: "是否持证",
        prop: "hold",
        slot: true,
        sortable: true,
        search: true,
        searchSpan: 3,
        width: 69,
@@ -673,6 +679,7 @@
        label: "是否制证",
        prop: "userType",
        type: "select",
        sortable: true,
        slot: true,
        search: true,
        // searchValue: 7,
@@ -787,6 +794,7 @@
        label: "审查状态",
        prop: "examinationType",
        type: "select",
        sortable: true,
        display: false,
        searchSpan: 3,
        search: false,
src/views/securityGuard/securityGuard.vue
@@ -602,6 +602,8 @@
      }
    };
    return {
      sort:"",
      sortName:"",
      nowCell: "", //空为手动,2为身份证设备读取
      // 表格数据
      defaults: {},
@@ -2390,7 +2392,25 @@
    },
    //排序
    sortChange(value) {
      console.log(value, 51151515);
      // console.log(value, 51151515);
      if(value.order=="ascending"){
        this.sort = "asc";
      }
      if(value.order=="descending"){
        this.sort = "desc";
      }
      this.sortName = value.prop;
      //字段匹配
      if(value.prop=="sexs"){
        this.sortName = "sex";
      }
      if(value.prop=="examinationType"){
        this.sortName = "examination_type";
      }
      if(value.prop=="userType"){
        this.sortName = "user_type";
      }
      this.onLoad(this.page,this.query);
    },
    onLoad(page, params = {}) {
      params = this.search;
@@ -2469,6 +2489,13 @@
              "/api/blade-system/dept/security_lazy-tree";
          }
          if(this.sort){
            params["sort"] = this.sort;
          }
          if(this.sortName){
            params["sortName"] = this.sortName;
          }
          let values = {
            ...params,
          };