王震
2023-12-27 b1dbfd44f6bafaa4d24e0c1c3a0f7ae548e77f60
src/views/basic/staff/index.vue
@@ -43,7 +43,7 @@
        // 是否展示上传EXCEL以及对应的url
        isShow: true,
        url: '/mes/staff/upload',
        Download: true,
        download: true,
        fileName: '员工模板'
      },
      prelang: 'operation',
@@ -211,14 +211,7 @@
          }
        ],
        toolbar: [],
        operator: [
          {
            text: '删除',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
          }
        ],
        operator: null,
        operatorConfig: {
          fixed: 'right',
          label: '操作',
@@ -254,10 +247,6 @@
    },
    // 删除
    deleteHandle(row) {
      if(!this.permissions.basic_staff_del){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.$confirm('是否确认删除人员名称为:' + row.staffName, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
@@ -290,6 +279,16 @@
  },
  created() {
    this.uploadInfo.isShow = this.permissions.basic_staff_upload
    if(this.permissions.basic_staff_del){
      this.table.operator = [
          {
            text: '删除',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
          }
        ]
    }
    this.initPersonNatureSelect()
  }
}