|
@@ -0,0 +1,81 @@
|
|
|
+<template>
|
|
|
+ <div id="index">
|
|
|
+ <el-col :span="24" class="debt">
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <topInfo :topTitle="topTitle" :display="display" @clickBtn="clickBtn"></topInfo>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="search">
|
|
|
+ <searchInfo></searchInfo>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <claimList :debtTable="debtTable" :total="total" @deleteRow="deleteRow" @clickRest="clickRest"></claimList>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import topInfo from '@/layout/common/topInfo.vue';
|
|
|
+import searchInfo from '@/layout/common/searchInfo.vue';
|
|
|
+import claimList from '@/layout/businessneed/claimList.vue';
|
|
|
+import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
+const { mapActions: otheruser } = createNamespacedHelpers('otheruser');
|
|
|
+const { mapActions: character } = createNamespacedHelpers('character');
|
|
|
+export default {
|
|
|
+ name: 'index',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ topInfo, //头部导航
|
|
|
+ searchInfo, //搜素
|
|
|
+ otheruserList, //其他用户列表
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ topTitle: '其他用户',
|
|
|
+ display: 'none',
|
|
|
+ debtTable: [],
|
|
|
+ total: '',
|
|
|
+ }),
|
|
|
+ created() {
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ methods: {
|
|
|
+ ...otheruser(['query', 'delete']),
|
|
|
+ ...character({ userquery: 'query' }),
|
|
|
+
|
|
|
+ ...otheruser(['query', 'delete', 'update']),
|
|
|
+ async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ const res = await this.query({ skip, limit, ...info });
|
|
|
+ this.$set(this, `debtTable`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ async deleteRow(id) {
|
|
|
+ const res = await this.delete(id);
|
|
|
+ this.$checkRes(res, '删除成功', '删除失败');
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
+ async clickRest(id) {
|
|
|
+ let data = {};
|
|
|
+ data.id = id;
|
|
|
+ data.passwd = '123456';
|
|
|
+ const res = await this.update(data);
|
|
|
+ if (res.errcode === 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '密码重置成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.debt {
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+.top {
|
|
|
+ border-bottom: 1px solid #ccc;
|
|
|
+}
|
|
|
+</style>
|