zhangzengfei
2022-10-11 351e360c9f5a9b59b22a668360b5cfbb3af3e853
优化用户管理表单查询交互
2个文件已修改
14 ■■■■■ 已修改文件
src/views/personalCenter/components/SubAccount.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/subAccount/entryLog.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personalCenter/components/SubAccount.vue
@@ -41,6 +41,7 @@
        :data="dataList"
        :fit="true"
        :default-sort="{ prop: 'createTime', order: 'descending' }"
        v-loading="tbLoading"
      >
        <el-table-column label="序号" width="55" class-name="index">
          <template slot-scope="scope">{{ scope.$index + 1 + (page - 1) * size }}</template>
@@ -272,6 +273,7 @@
      }
    }
    return {
      tbLoading: false,
      searchTime: [this.$moment().format("YYYY-MM-DD 00:00:00"), this.$moment().format("YYYY-MM-DD HH:mm:ss")], //搜索时间
      page: 1,
      size: 10, //分页相关
@@ -608,6 +610,7 @@
      })
    },
    findUserList() {
      this.tbLoading = true
      if (this.inputText.length) {
        this.inputText = this.inputText.trim()
      }
@@ -625,9 +628,12 @@
          } else {
            this.$notify.error("加载子账户列表失败")
          }
          this.tbLoading = false
        })
        .catch((e) => {
          this.$notify.error(e.msg)
          this.tbLoading = false
        })
    },
    goback() {
src/views/subAccount/entryLog.vue
@@ -19,6 +19,7 @@
        :data="dataList"
        :fit="true"
        :default-sort="{ prop: 'createTime', order: 'descending' }"
        v-loading="tbLoading"
      >
        <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
        <el-table-column prop="username" label="用户名" show-overflow-tooltip></el-table-column>
@@ -54,6 +55,7 @@
export default {
  data() {
    return {
      tbLoading: false,
      dataList: [],
      inputText: "",
      page: 1,
@@ -80,6 +82,8 @@
      this.timeLength = null
    },
    async lookUp() {
      this.tbLoading = true
      if (this.inputText.length) {
        this.inputText = this.inputText.trim()
      }
@@ -87,6 +91,10 @@
      let res = await findEntryLog({ page: this.page, size: this.size, inputText: this.inputText })
      this.dataList = res.data.list
      this.total = res.data.total
      setTimeout(() => {
        this.tbLoading = false
      }, 200)
    }
  }
}