1、利用率走势分析和利用率分段分析页面优化表格数据加载方式,实现滚动条触底加载,解决数据量较大时网页请求速度慢问题
2、报警分析页面调整图表样式,更换表格组件为ant-design表格
3、登录页面登录后若用户密码为初始密码或密码已过期则出现修改密码弹窗
已修改6个文件
404 ■■■■ 文件已修改
src/components/tools/UserPassword.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue 228 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/Login.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/LoginAccount.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tools/UserPassword.vue
@@ -31,14 +31,13 @@
          label="确认新密码">
          <a-input type="password" @blur="handleConfirmBlur" placeholder="请确认新密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
        </a-form-item>
      </a-form>
    </a-spin>
  </a-modal>
</template>
<script>
  import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
  import { putAction } from '@/api/manage'
  export default {
@@ -57,9 +56,13 @@
          },
          password:{
            rules: [{
              required: true, message: '请输入新密码!',
              required: true, message: '请输入新密码!',trigger:'blur'
            }, {
              validator: this.validateToNextPassword,
            },
              {
                pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
                message: '密码由8位数字、大小写字母和特殊符号组成!',
            }],
          },
          confirmpassword:{
@@ -85,6 +88,9 @@
        username:"",
      }
    },
    created(){
      // this.initDictData('password_length')
    },
    methods: {
      show(uname){
        if(!uname){
@@ -95,6 +101,23 @@
          this.form.resetFields();
          this.visible = true;
        }
      },
      initDictData(dictCode) {
        //优先从缓存中读取字典配置
        if (getDictItemsFromCache(dictCode)) {
          return getDictItemsFromCache(dictCode);
        }
        //根据字典Code, 初始化字典数组
        ajaxGetDictItems(dictCode, null).then((res) => {
          if (res.success) {
            const regx = new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{12,}$/);
            this.validatorRules.password.rules[2]={
              pattern: regx,
              message: '密码由8位数字、大小写字母和特殊符号组成!',
            }
            return res.result
          }
        })
      },
      handleCancel () {
        this.close()
@@ -110,6 +133,7 @@
        // 触发表单验证
        this.form.validateFields((err, values) => {
          if (!err) {
            if(values.oldpassword!==values.confirmpassword){
            that.confirmLoading = true;
            let params = Object.assign({username:this.username},values)
            console.log("修改密码提交数据",params)
@@ -124,6 +148,9 @@
            }).finally(() => {
              that.confirmLoading = false;
            })
            }else{
              that.$message.warning('新密码与旧密码不能相同');
            }
          }
        })
      },
src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue
@@ -19,43 +19,57 @@
      </div>
      <div id="DeviceList">
        <div class="openRateTrendDg">
          <div id="Efficiency" class="container">
            <div class="table2">
              <table class="dataContent table" border="1" cellspacing="0" cellpadding="0"
                     style="white-space: nowrap;text-align: left;">
                <thead>
                <tr class="thead fixed equipname">
                  <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">报警号
                  </th>
                  <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">
                    出现次数
                  </th>
                  <th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">
                    合计持续时间
                  </th>
                  <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">
                    报警信息
                  </th>
                  <!--<template v-for="(tableHead, index) in tableHeads">-->
                  <!--<th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>-->
                  <!--</template>-->
                </tr>
                </thead>
                <tbody>
                <tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)">
                  <td class="tdgu  kaitou">{{item.alarmCode}}</td>
                  <td class="tdgu1  kaitou">{{item.count}}</td>
                  <td class="tdgu2 kaitou">{{getFormattedTime(item.timeCount)}}
                  <!--<td class="tdgu2 kaitou">{{item.timeCount}}</td>-->
                  <td class="tdgu3 kaitou">{{item.alarmContent}}</td>
                  <!--<template v-for="(tableHead, index) in item.dataList">-->
                  <!--<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>-->
                  <!--</template>-->
                </tr>
                </tbody>
              </table>
            </div>
          </div>
          <!--<div id="Efficiency" class="container">-->
          <!--<div class="table2">-->
          <!--<table class="dataContent table" border="1" cellspacing="0" cellpadding="0"-->
          <!--style="white-space: nowrap;text-align: left;">-->
          <!--<thead>-->
          <!--<tr class="thead fixed equipname">-->
          <!--<th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">报警号-->
          <!--</th>-->
          <!--<th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">-->
          <!--出现次数-->
          <!--</th>-->
          <!--<th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">-->
          <!--合计持续时间-->
          <!--</th>-->
          <!--<th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">-->
          <!--报警信息-->
          <!--</th>-->
          <!--&lt;!&ndash;<template v-for="(tableHead, index) in tableHeads">&ndash;&gt;-->
          <!--&lt;!&ndash;<th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>&ndash;&gt;-->
          <!--&lt;!&ndash;</template>&ndash;&gt;-->
          <!--</tr>-->
          <!--</thead>-->
          <!--<tbody>-->
          <!--<tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)">-->
          <!--<td class="tdgu  kaitou">{{item.alarmCode}}</td>-->
          <!--<td class="tdgu1  kaitou">{{item.count}}</td>-->
          <!--<td class="tdgu2 kaitou">{{getFormattedTime(item.timeCount)}}-->
          <!--&lt;!&ndash;<td class="tdgu2 kaitou">{{item.timeCount}}</td>&ndash;&gt;-->
          <!--<td class="tdgu3 kaitou">{{item.alarmContent}}</td>-->
          <!--&lt;!&ndash;<template v-for="(tableHead, index) in item.dataList">&ndash;&gt;-->
          <!--&lt;!&ndash;<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>&ndash;&gt;-->
          <!--&lt;!&ndash;</template>&ndash;&gt;-->
          <!--</tr>-->
          <!--</tbody>-->
          <!--</table>-->
          <!--</div>-->
          <!--</div>-->
          <a-table :columns="columns" :data-source="dataList" bordered :pagination="false" :scroll="{y:168}"
                   :customRow="customRow"
                   rowKey="alarmCode">
            <span slot="timeCount" slot-scope="text">{{getFormattedTime(text)}}</span>
            <!--<a-table-->
              <!--slot="expandedRowRender"-->
              <!--slot-scope="row"-->
              <!--:columns="innerColumns"-->
              <!--:data-source="row.innerDataList"-->
              <!--:pagination="false"-->
            <!--&gt;-->
              <!--<span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span>-->
            <!--</a-table>-->
          </a-table>
        </div>
        <div style="width: 100%;height: 55%;display: flex;">
          <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div>
@@ -75,6 +89,33 @@
  import {
    JeecgListMixin
  } from '@/mixins/JeecgListMixin'
  const columns = [
    { title: '报警号', dataIndex: 'alarmCode', key: 'alarmCode', align: 'center' },
    { title: '出现次数', dataIndex: 'count', key: 'count', align: 'center' },
    {
      title: '合计持续时间',
      dataIndex: 'timeCount',
      key: 'timeCount',
      scopedSlots: { customRender: 'timeCount' },
      align: 'center'
    },
    { title: '报警信息', dataIndex: 'alarmContent', key: 'alarmContent', align: 'center' }
  ]
  const innerColumns = [
    { title: '设备编号', dataIndex: 'equipmentId', key: 'equipmentId', align: 'center' },
    { title: '设备名称', dataIndex: 'equipmentName', key: 'equipmentName', align: 'center' },
    { title: '报警时间', dataIndex: 'alarmTime', key: 'alarmTime', align: 'center' },
    { title: '结束时间', dataIndex: 'endTime', key: 'endTime', align: 'center' },
    {
      title: '持续时间',
      dataIndex: 'duration',
      key: 'duration',
      scopedSlots: { customRender: 'duration' },
      align: 'center'
    }
  ]
  export default {
    // mixins: [JeecgListMixin],
@@ -115,7 +156,9 @@
        tableHeads: [],
        pieDate: [0],
        XData: [0],
        YData: [0]
        YData: [0],
        columns,
        innerColumns
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
@@ -344,6 +387,15 @@
          if (res.success) {
            // this.tableHeads = res.result.dates
            this.dataList = res.result
            this.dataList.forEach(item => item.innerDataList = [
              {
                equipmentId: '11234',
                equipmentName: '立体机床',
                alarmTime: 20,
                endTime: 20,
                duration: 123
              }
            ])
            // this.draw()
            // this.checkSameData(this.dataList)
            // this.checkSameData1(this.dataList)
@@ -360,7 +412,10 @@
          title: {
            text: '各设备出现此报警的比例',
            x: 'center',
            y: 'bottom'
            y: 'bottom',
            textStyle: {
              color: '#4FAEDC'
            }
          },
          tooltip: {
            trigger: 'item',
@@ -372,14 +427,18 @@
            radius: '60%',
            itemStyle: {
              normal: {
                /*color: function (params) {
                    var colorList = ['#4169E1', '#A8A8A8'];
                color: function(params) {
                  var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3']
                    return colorList[params.dataIndex]
                },*/
                },
                label: {
                  show: true,
                  position: 'top',
                  formatter: '{b}\n{c}'
                  // position: 'top',
                  formatter: '{b}\n{c}',
                  color: function(params) {
                    var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3']
                    return colorList[params.dataIndex]
                  }
                }
              }
            },
@@ -393,7 +452,10 @@
          title: {
            text: '每天出现此报警的数量走势',
            x: 'center',
            y: 'bottom'
            y: 'bottom',
            textStyle: {
              color: '#4FAEDC'
            }
          },
          tooltip: {
            trigger: 'axis'
@@ -406,13 +468,29 @@
              data: this.XData
              /*axisLabel :{
                  interval:0
              }*/
              }*/,
              axisLine: {
                //x轴线的颜色以及宽度
                show: true,
                lineStyle: {
                  width: 2,
                  color: '#4FAEDC'
                }
              }
            }
          ],
          yAxis: [
            {
              type: 'value',
              name: '次数'
              name: '次数',
              axisLine: {
                //x轴线的颜色以及宽度
                show: true,
                lineStyle: {
                  width: 2,
                  color: '#4FAEDC'
                }
              }
            }
          ],
          series: [
@@ -424,7 +502,15 @@
                data: [
                  { type: 'max', name: '最大值' },
                  { type: 'min', name: '最小值' }
                ]
                ],
                label: {
                  color: '#fff'
                }
              },
              itemStyle: {
                normal: {
                  color: '#2EC7C9'
                }
              }
            }
          ]
@@ -432,12 +518,46 @@
        equipmentWarningLine.setOption(equipmentWarningLineOption, true)
      },
      /**
       * 格式化时间
       * @param seconds 秒数
       * @returns 格式化后时间字符串
       */
      getFormattedTime(seconds){
        var hours = Math.floor(seconds / 3600);
        var minutes = Math.floor((seconds % 3600) / 60);
        var secs = seconds % 60;
        var hours = Math.floor(seconds / 3600)
        var minutes = Math.floor((seconds % 3600) / 60)
        var secs = seconds % 60
        if (hours == 0) {
          if (minutes == 0) {
            return `${secs}秒`
          } else {
            return `${minutes}分 ${secs}秒`
          }
        } else {
          if (minutes == 0 && secs == 0) {
            return `${hours}小时`
          } else if (minutes != 0 && secs == 0) {
            return `${hours}小时 ${minutes}分`
          }
        }
        return `${hours}小时 ${minutes}分 ${secs}秒`
      },
      /**
       * 自定义表格行触发
       * @param record 当前行信息
       * @param index 当前行下标
       * @returns {{on: {click: on.click}}} 返回对象
       */
      customRow(record, index) {
        return {
          on: {
            click: () => {
              this.TableDraw(index, record)
            }
          }
        }
      }
    }
  }
@@ -655,4 +775,10 @@
  .efficiency_list #DeviceList {
    height: 90% !important;
  }
  /deep/ .ant-table-body .ant-table-row td {
    padding-top: 10px;
    padding-bottom: 10px;
    cursor: pointer;
  }
</style>
src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue
@@ -115,7 +115,10 @@
        },
        tableHeads: [],
        XData: [0],
        YData: [0]
        YData: [0],
        isLazyRequest: '',// 是否开启懒加载
        requestAlldataSize: 8,// 总共请求的列表项数目
        everyRequestDataSize: 15// 每次请求的列表项数目
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
@@ -131,6 +134,12 @@
      this.queryParam.typeTree = '1'
      this.loadData1()
    },
    mounted() {
      this.tableScroll = document.querySelector('.table2')
    },
    beforeDestroy() {
      this.tableScroll.removeEventListener('scroll', this.tableScrollX)
    },
    watch: {
      Type(valmath) {
@@ -213,9 +222,12 @@
      dateParamChange(v1, v2) {
        this.queryParam.startDate = v2[0]
        this.queryParam.endDate = v2[1]
        this.dates = [v1[0], v1[1]]
      },
      searchQuery() {
        if (this.queryParam.startTime && this.queryParam.endTime && this.dates && this.dates.length > 0) {
        this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
        this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
        if (this.queryParam.startTime && this.queryParam.endTime && this.dates[0] && this.dates[1]) {
          if (this.queryParam.typeTree == '1') {
            this.queryParam.parentId = this.queryParamEquip.parentId
            this.queryParam.equipmentId = this.queryParamEquip.equipmentId
@@ -223,6 +235,7 @@
            this.queryParam.parentId = this.queryParamPeople.parentId
            this.queryParam.equipmentId = ''
          }
          this.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1
          this.loadData1()
        } else {
          this.$notification.warning({
@@ -306,6 +319,13 @@
        this.loading=true
        this.tableHeads = []
        this.dataList = []
        // 若日期选择器设置的查询请求数量超过15条则开启懒加载
        if (this.requestAlldataSize > 15) {
          // 开启懒加载后将结束日期设置为开始日期之后的14天,即先查询15天内的数据
          this.queryParam.endDate = moment(this.queryParam.startDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD')
          this.isLazyRequest = true
          this.tableScroll.removeEventListener('scroll', this.tableScrollX) // 为避免滚动条有滚动距离后后点击查询按钮触发滚动事件,因此在触发事件前移除事件
        }
        getAction(this.url.efficiencyList, this.queryParam).then(res => {
          if (res.success) {
            this.tableHeads = res.result.dates
@@ -316,7 +336,7 @@
            // this.checkSameData2(this.dataList)
            // this.combineCell();
            // this.initDeviceType(this.dataList)
            this.tableScroll.addEventListener('scroll', this.tableScrollX)
          }
        }).finally(()=>{
          this.loading=false
@@ -379,6 +399,41 @@
          ]
        }
        openRateTrendAnalysisChart.setOption(openRateTrendChartOptions, true)
      },
      /**
       * 滚动条触底刷新表格数据
       */
      tableScrollX() {
        // 当滚动条触底且懒加载开启时触发滚动条触底刷新
        if (Math.ceil(this.tableScroll.scrollLeft + this.tableScroll.clientWidth) + 1 >= this.tableScroll.scrollWidth && this.isLazyRequest) {
          this.loading = true
          this.queryParam.startDate = moment(this.queryParam.endDate).add(1, 'days').format('YYYYMMDD')
          // 判断设置懒加载后的结束时间是否超过时间选择器中设置的结束时间
          if (moment(this.queryParam.endDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') - moment(this.dates[1]).format('YYYYMMDD') < 0) {
            //再次查询后15天内的数据
            this.queryParam.endDate = moment(this.queryParam.endDate).add(this.everyRequestDataSize, 'days').format('YYYYMMDD')
          } else {
            // 如果不小于时间选择器中设置的时间则设置请求结束日期为时间选择器中设置的结束时间并且关闭懒加载(意味着最后一次触底刷新)
            this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
            this.isLazyRequest = false
          }
          getAction(this.url.efficiencyList, this.queryParam).then(res => {
            if (res.success) {
              this.tableHeads = [...this.tableHeads, ...res.result.dates]
              this.dataList.forEach(item1 => {
                res.result.mdcEfficiencyList.forEach(item2 => {
                  if (item1.equipmentId === item2.equipmentId) {
                    item1.dataList = [...item1.dataList, ...item2.dataList]
                  }
                })
              })
              this.draw()
            }
          }).finally(() => {
            this.loading = false
          })
        }
      }
    }
  }
src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue
@@ -108,7 +108,10 @@
        },
        tableHeads: [],
        XData: [0],
        YData: [0]
        YData: [0],
        isLazyRequest: '',// 是否开启懒加载
        requestAlldataSize: 8,// 总共请求的列表项数目
        everyRequestDataSize: 15// 每次请求的列表项数目
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
@@ -121,6 +124,12 @@
      this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
      this.queryParam.typeTree = '1'
      this.loadData1()
    },
    mounted() {
      this.tableScroll = document.querySelector('.table2')
    },
    beforeDestroy() {
      this.tableScroll.removeEventListener('scroll', this.tableScrollX)
    },
    watch: {
      Type(valmath) {
@@ -221,9 +230,13 @@
      dateParamChange(v1, v2) {
        this.queryParam.startDate = v2[0]
        this.queryParam.endDate = v2[1]
        this.dates = [v1[0], v1[1]]
      },
      searchQuery() {
        if (this.dates && this.dates.length > 0) {
        console.log('dates', this.dates)
        this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
        this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
        if (this.dates[0] && this.dates[1]) {
          if (this.queryParam.typeTree == '1') {
            this.queryParam.parentId = this.queryParamEquip.parentId
            this.queryParam.equipmentId = this.queryParamEquip.equipmentId
@@ -231,6 +244,7 @@
            this.queryParam.parentId = this.queryParamPeople.parentId
            this.queryParam.equipmentId = ''
          }
          this.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1
          this.loadData1()
        } else {
          this.$notification.warning({
@@ -313,6 +327,13 @@
        this.loading = true
        this.tableHeads = []
        this.dataList = []
        // 若日期选择器设置的查询请求数量超过15条则开启懒加载
        if (this.requestAlldataSize > 15) {
          // 开启懒加载后将结束日期设置为开始日期之后的14天,即先查询15天内的数据
          this.queryParam.endDate = moment(this.queryParam.startDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD')
          this.isLazyRequest = true
          this.tableScroll.removeEventListener('scroll', this.tableScrollX) // 为避免滚动条有滚动距离后后点击查询按钮触发滚动事件,因此在触发事件前移除事件
        }
        getAction(this.url.efficiencyList, this.queryParam).then(res => {
          if (res.success) {
            this.tableHeads = res.result.dates
@@ -323,6 +344,7 @@
            // this.checkSameData2(this.dataList)
            // this.combineCell();
            // this.initDeviceType(this.dataList)
            this.tableScroll.addEventListener('scroll', this.tableScrollX)
          }
        }).finally(() => {
          this.loading = false
@@ -385,6 +407,41 @@
          ]
        }
        openRateTrendAnalysisChart.setOption(openRateTrendChartOptions, true)
      },
      /**
       * 滚动条触底刷新表格数据
       */
      tableScrollX() {
        // 当滚动条触底且懒加载开启时触发滚动条触底刷新
        if (Math.ceil(this.tableScroll.scrollLeft + this.tableScroll.clientWidth) + 1 >= this.tableScroll.scrollWidth && this.isLazyRequest) {
          this.loading = true
          this.queryParam.startDate = moment(this.queryParam.endDate).add(1, 'days').format('YYYYMMDD')
          // 判断设置懒加载后的结束时间是否超过时间选择器中设置的结束时间
          if (moment(this.queryParam.endDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') - moment(this.dates[1]).format('YYYYMMDD') < 0) {
            //再次查询后15天内的数据
            this.queryParam.endDate = moment(this.queryParam.endDate).add(this.everyRequestDataSize, 'days').format('YYYYMMDD')
          } else {
            // 如果不小于时间选择器中设置的时间则设置请求结束日期为时间选择器中设置的结束时间并且关闭懒加载(意味着最后一次触底刷新)
            this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
            this.isLazyRequest = false
          }
          getAction(this.url.efficiencyList, this.queryParam).then(res => {
            if (res.success) {
              this.tableHeads = [...this.tableHeads, ...res.result.dates]
              this.dataList.forEach(item1 => {
                res.result.mdcEfficiencyList.forEach(item2 => {
                  if (item1.equipmentId === item2.equipmentId) {
                    item1.dataList = [...item1.dataList, ...item2.dataList]
                  }
                })
              })
              this.draw()
            }
          }).finally(() => {
            this.loading = false
          })
        }
      }
    }
  }
src/views/user/Login.vue
@@ -61,6 +61,7 @@
      @success="loginSelectOk"
    ></login-select-tenant>
    <!--<third-login ref="thirdLogin"></third-login>-->
    <user-password ref="userPassword"/>
  </div>
</template>
@@ -77,11 +78,11 @@
import LoginPhone from './LoginPhone'
import store from '@/store'
import { getAction } from '../../api/manage'
import AFormModelItem from 'ant-design-vue/es/form-model/FormItem'
import UserPassword from '../../components/tools/UserPassword'
export default {
  components: {
    AFormModelItem,
    UserPassword,
    LoginSelectTenant,
    TwoStepCaptcha,
    // ThirdLogin,
@@ -171,13 +172,25 @@
      // this.$refs.loginSelect.show(loginResult)
    },
    //登录后台失败
    requestFailed(err) {
    requestFailed(err,username) {
      let description = ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试"
      if(err.code!==5001&&err.code!==5002){
      this.$notification['error']({
        message: '登录失败',
        description: description,
        duration: 4,
      });
      }else{
        this.$notification['warning']({
          message: '提示',
          description: description,
          duration:1,
          onClose:()=>{
            console.log('err',err)
            this.$refs.userPassword.show(username)
          }
        });
      }
      //账户密码登录错误后更新验证码
      // if (this.customActiveKey === 'tab1' && description.indexOf('密码错误') > 0) {
      //   this.$refs.alogin.handleChangeCheckCode()
src/views/user/LoginAccount.vue
@@ -136,7 +136,7 @@
            this.Login(loginParams).then((res) => {
              this.$emit('success', res.result)
            }).catch((err) => {
              this.$emit('fail', err)
              this.$emit('fail', err,loginParams.username)
            });
          }else{
            this.$emit('validateFail')