{"remainingRequest":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/components/userList/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/components/userList/index.vue","mtime":1701742078547},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n// +----------------------------------------------------------------------\n// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权\n// +----------------------------------------------------------------------\n// | Author: CRMEB Team <admin@crmeb.com>\n// +----------------------------------------------------------------------\n\nimport { userListApi } from '@/api/user';\nexport default {\n  name: 'UserList',\n  filters: {\n    saxFilter(status) {\n      const statusMap = {\n        0: '未知',\n        1: '男',\n        2: '女',\n      };\n      return statusMap[status];\n    },\n    statusFilter(status) {\n      const statusMap = {\n        wechat: '微信用户',\n        routine: '小程序用户',\n      };\n      return statusMap[status];\n    },\n  },\n  data() {\n    return {\n      templateRadio: 0,\n      loading: false,\n      tableData: {\n        data: [],\n        total: 0,\n      },\n      tableFrom: {\n        page: 1,\n        limit: 10,\n        keywords: '',\n      },\n    };\n  },\n  mounted() {\n    this.getList();\n  },\n  methods: {\n    getTemplateRow(idx, row) {\n      this.$emit('getTemplateRow', row);\n    },\n    // 列表\n    getList() {\n      this.loading = true;\n      userListApi(this.tableFrom)\n        .then((res) => {\n          this.tableData.data = res.list;\n          this.tableData.total = res.total;\n          this.loading = false;\n        })\n        .catch((res) => {\n          this.$message.error(res.message);\n          this.loading = false;\n        });\n    },\n    search() {\n      this.loading = true;\n      userListApi({ keywords: this.tableFrom.keywords })\n        .then((res) => {\n          this.tableData.data = res.list;\n          this.tableData.total = res.total;\n          this.loading = false;\n        })\n        .catch((res) => {\n          this.$message.error(res.message);\n          this.loading = false;\n        });\n    },\n    pageChange(page) {\n      this.tableFrom.page = page;\n      this.getList();\n    },\n    handleSizeChange(val) {\n      this.tableFrom.limit = val;\n      this.getList();\n    },\n  },\n};\n",null]}