zhuzhuanzhuan
2023-08-25 487754376a1eb675d430a64b7a4aa9e7ffeb405b
src/views/system/UserList.vue
@@ -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",
@@ -279,12 +280,14 @@
          {
            title: '操作',
            dataIndex: 'action',
            scopedSlots: {customRender: 'action'},
            scopedSlots: { customRender: 'action' },
            align: "center",
            width: 80
          }
          },
        ],
        isDepartType:'',
        superQueryFieldList: [
          { type: 'input', value: 'username', text: '用户账号', },
          { type: 'input', value: 'realname', text: '用户姓名', },
@@ -305,7 +308,161 @@
        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'
                  },
                  {
                    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'
                  },
                  {
                    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)
      },