src/views/system/UserList.vue
@@ -114,7 +114,7 @@
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">
        <template slot="avatarslot" slot-scope="text, record, index">
        <template slot="avatarslot" slot-scope="text, record">
          <div class="anty-img-wrap">
            <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
          </div>
@@ -189,6 +189,7 @@
  import UserRecycleBinModal from './modules/UserRecycleBinModal'
  import JSuperQuery from '@/components/jeecg/JSuperQuery'
  import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
  import {mapActions} from 'vuex'
  export default {
    name: "UserList",
@@ -234,41 +235,42 @@
          {
            title: '头像',
            align: "center",
            width: 120,
            width: 80,
            dataIndex: 'avatar',
            scopedSlots: {customRender: "avatarslot"}
          },
          {
            title: '性别',
            align: "center",
            width: 80,
            dataIndex: 'sex_dictText',
            sorter: true
          },
          {
            title: '生日',
            align: "center",
            width: 100,
            dataIndex: 'birthday'
          },
          {
            title: '手机号码',
            align: "center",
            width: 100,
            dataIndex: 'phone'
          },
          // {
          //   title: '性别',
          //   align: "center",
          //   width: 80,
          //   dataIndex: 'sex_dictText',
          //   sorter: true
          // },
          // {
          //   title: '生日',
          //   align: "center",
          //   width: 100,
          //   dataIndex: 'birthday'
          // },
          // {
          //   title: '手机号码',
          //   align: "center",
          //   width: 100,
          //   dataIndex: 'phone'
          // },
          {
            title: '部门',
            align: "center",
            width: 180,
            width: 240,
            dataIndex: 'orgCodeTxt'
          },
          {
            title: '车间',
            align: "center",
            width: 180,
            dataIndex: 'productionName'
            width: 240,
            dataIndex: 'productionName',
            ellipsis: true,
          },
          {
            title: '状态',
@@ -279,12 +281,14 @@
          {
            title: '操作',
            dataIndex: 'action',
            scopedSlots: {customRender: 'action'},
            scopedSlots: { customRender: 'action' },
            align: "center",
            width: 170
          }
            width: 80
          },
        ],
        isDepartType:'',
        superQueryFieldList: [
          { type: 'input', value: 'username', text: '用户账号', },
          { type: 'input', value: 'realname', text: '用户姓名', },
@@ -305,14 +309,180 @@
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      }
    },
    methods: {
      created() {
        this.queryTreeData()
      },
      methods: {
        ...mapActions(['QueryDepartTree']),
        queryTreeData() {
          this.QueryDepartTree().then(res => {
            if (res.success) {
              this.isDepartType = res.result[0].value
              if(this.isDepartType == -1){
                this.columns=[
                  {
                    title: '用户账号',
                    align: "center",
                    dataIndex: 'username',
                    width: 120,
                    sorter: true
                  },
                  {
                    title: '用户姓名',
                    align: "center",
                    width: 100,
                    dataIndex: 'realname',
                  },
                  {
                    title: '头像',
                    align: "center",
                    width: 80,
                    dataIndex: 'avatar',
                    scopedSlots: {customRender: "avatarslot"}
                  },
                  // {
                  //   title: '性别',
                  //   align: "center",
                  //   width: 80,
                  //   dataIndex: 'sex_dictText',
                  //   sorter: true
                  // },
                  // {
                  //   title: '生日',
                  //   align: "center",
                  //   width: 100,
                  //   dataIndex: 'birthday'
                  // },
                  // {
                  //   title: '手机号码',
                  //   align: "center",
                  //   width: 100,
                  //   dataIndex: 'phone'
                  // },
                  {
                    title: '车间',
                    align: "center",
                    width: 240,
                    dataIndex: 'productionName',
                    ellipsis: true,
                  },
                  {
                    title: '状态',
                    align: "center",
                    width: 80,
                    dataIndex: 'status_dictText'
                  },
                  {
                    title: '操作',
                    dataIndex: 'action',
                    scopedSlots: { customRender: 'action' },
                    align: "center",
                    width: 80
                  },
                ]
              }else{
                this.columns= [
                  {
                  title: '用户账号',
                  align: "center",
                  dataIndex: 'username',
                  width: 120,
                  sorter: true
                },
                  {
                    title: '用户姓名',
                    align: "center",
                    width: 100,
                    dataIndex: 'realname',
                  },
                  {
                    title: '头像',
                    align: "center",
                    width: 80,
                    dataIndex: 'avatar',
                    scopedSlots: {customRender: "avatarslot"}
                  },
                  // {
                  //   title: '性别',
                  //   align: "center",
                  //   width: 80,
                  //   dataIndex: 'sex_dictText',
                  //   sorter: true
                  // },
                  // {
                  //   title: '生日',
                  //   align: "center",
                  //   width: 100,
                  //   dataIndex: 'birthday'
                  // },
                  // {
                  //   title: '手机号码',
                  //   align: "center",
                  //   width: 100,
                  //   dataIndex: 'phone'
                  // },
                  {
                    title: '部门',
                    align: "center",
                    width: 240,
                    dataIndex: 'orgCodeTxt'
                  },
                  {
                    title: '车间',
                    align: "center",
                    width: 240,
                    dataIndex: 'productionName',
                    ellipsis: true,
                  },
                  {
                    title: '班组',
                    align: "center",
                    width: 240,
                    dataIndex: 'teamId_dictText'
                  },
                  {
                    title: '状态',
                    align: "center",
                    width: 80,
                    dataIndex: 'status_dictText'
                  },
                  {
                    title: '操作',
                    dataIndex: 'action',
                    scopedSlots: { customRender: 'action' },
                    align: "center",
                    width: 80
                  }
              ]
              }
            } else {
              // this.$message.warn(res.message)
              this.$notification.warning({
                message:'消息',
                description:res.message
              });
            }
          }).finally(() =>{
          })
        },
      getAvatarView: function (avatar) {
        return getFileAccessHttpUrl(avatar)
      },
      batchFrozen: function (status) {
        if (this.selectedRowKeys.length <= 0) {
          this.$message.warning('请选择一条记录!');
          // this.$message.warning('请选择一条记录!');
          this.$notification.warning({
            message:'消息',
            description:"请选择一条记录"
          });
          return false;
        } else {
          let ids = "";
@@ -365,10 +535,16 @@
        }
        frozenBatch({ids: id, status: status}).then((res) => {
          if (res.success) {
            that.$message.success(res.message);
            that.$notification.success({
              message:'消息',
              description:res.message
            });
            that.loadData();
          } else {
            that.$message.warning(res.message);
            that.$notification.warning({
              message:'消息',
              description:res.message
            });
          }
        });
      },