{"remainingRequest":"/data/jenkins/workspace/mer.mall2.baibaodun.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/mer.mall2.baibaodun.cn/src/views/user/list/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/mer.mall2.baibaodun.cn/src/views/user/list/index.vue","mtime":1720764823963},{"path":"/data/jenkins/workspace/mer.mall2.baibaodun.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/mer.mall2.baibaodun.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.mall2.baibaodun.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//\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//\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//\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~2023 https://www.crmeb.com All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权\n// +----------------------------------------------------------------------\n// | Author: CRMEB Team \n// +----------------------------------------------------------------------\n\nimport { userListApi } from '@/api/user';\nimport userList from '@/components/userList';\nimport detailUser from './userDetails.vue';\nimport { checkPermi } from '@/utils/permission'; // 权限判断函数\nimport { Debounce } from '@/utils/validate';\nexport default {\n name: 'UserIndex',\n components: { detailUser },\n filters: {\n sexFilter(status) {\n const statusMap = {\n 0: '未知',\n 1: '男',\n 2: '女',\n 3: '保密',\n };\n return statusMap[status];\n },\n typeFilter(value) {\n const statusMap = {\n facebook: 'Facebook',\n twitter: 'Twitter',\n google: 'Google',\n email: 'Email',\n phone: 'Phone',\n visitor: '游客',\n };\n return statusMap[value];\n },\n },\n data() {\n return {\n registerTypeList: [\n {\n value: 'wechat',\n label: '公众号',\n },\n {\n value: 'routine',\n label: '小程序',\n },\n {\n value: 'h5',\n label: 'H5',\n },\n {\n value: 'iosWx',\n label: '微信ios',\n },\n {\n value: 'androidWx',\n label: '微信安卓',\n },\n {\n value: 'ios',\n label: 'ios',\n },\n ],\n tableHeight: 0,\n formExtension: {\n image: '',\n spreadUid: '',\n userId: '',\n },\n ruleInline: {},\n extensionVisible: false,\n userVisible: false,\n levelInfo: '',\n pickerOptions: this.$timeOptions,\n loadingBtn: false,\n PointValidateForm: {\n integralType: 2,\n integralValue: 0,\n moneyType: 2,\n moneyValue: 0,\n uid: '',\n },\n loadingPoint: false,\n VisiblePoint: false,\n visible: false,\n userIds: '',\n dialogVisible: false,\n levelVisible: false,\n levelData: [],\n groupData: [],\n labelData: [],\n selData: [],\n labelPosition: 'right',\n collapse: false,\n props: {\n children: 'child',\n label: 'name',\n value: 'name',\n emitPath: false,\n },\n propsCity: {\n children: 'child',\n label: 'name',\n value: 'name',\n },\n listLoading: false,\n tableData: {\n data: [],\n total: 0,\n },\n nikename: '',\n userFrom: {\n registerType: '',\n sex: '',\n dateLimit: '',\n nikename: '',\n page: 1,\n limit: 15,\n phone: '',\n },\n grid: {\n xl: 8,\n lg: 12,\n md: 12,\n sm: 24,\n xs: 24,\n },\n levelList: [],\n labelLists: [],\n groupList: [],\n selectedData: [],\n timeVal: [],\n dynamicValidateForm: {\n groupId: [],\n },\n loading: false,\n groupIdFrom: [],\n selectionList: [],\n batchName: '',\n uid: 0,\n Visible: false,\n keyNum: 0,\n address: [],\n multipleSelectionAll: [],\n idKey: 'uid',\n card_select_show: false,\n checkAll: false,\n checkedCities: ['ID', '头像', '昵称', '用户等级', '分组', '推荐人', '手机号', '余额', '积分'],\n columnData: ['ID', '头像', '昵称', '用户等级', '分组', '推荐人', '手机号', '余额', '积分'],\n isIndeterminate: true,\n };\n },\n created() {\n // 浏览器高度\n let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;\n\n // 此处减去100即为当前屏幕内除了表格高度以外其它内容的总高度,\n // this.tableHeight = windowHeight - 388;\n },\n activated() {\n this.userFrom.nikename = '';\n if (checkPermi(['merchant:user:page:list'])) this.getList(1);\n },\n mounted() {\n if (checkPermi(['merchant:user:page:list'])) this.getList();\n this.$nextTick(() => {\n let tableHeader = this.$refs.tableheader.offsetHeight;\n this.tableHeight = this.$selfUtil.getTableHeight(tableHeader + 100);\n });\n },\n methods: {\n checkPermi,\n filterRegisterType(status) {\n const statusMap = {\n wechat: '#FD5ACC',\n routine: '#A277FF',\n h5: '#E8B600',\n iosWx: '#1BBE6B',\n androidWx: '#EF9C20',\n ios: '#1890FF',\n };\n return statusMap[status];\n },\n onCollapse() {\n this.collapse = !this.collapse;\n this.$nextTick(() => {\n let tableHeader = this.$refs.tableheader.offsetHeight;\n this.tableHeight = this.$selfUtil.getTableHeight(tableHeader + 150);\n });\n },\n getTemplateRow(row) {\n this.formExtension.image = row.avatar;\n this.formExtension.spreadUid = row.uid;\n },\n // setExtension(row){\n // this.formExtension = {\n // image: '',\n // spreadUid: '',\n // userId: row.uid\n // };\n // this.extensionVisible = true\n // },\n handleCloseExtension() {\n this.extensionVisible = false;\n },\n modalPicTap() {\n this.userVisible = true;\n },\n resetForm() {\n this.visible = false;\n },\n reset(formName) {\n this.userFrom = {\n userType: '',\n sex: '',\n phone: '',\n dateLimit: '',\n nikename: '',\n page: 1,\n limit: 15,\n };\n this.nikename = '';\n this.levelData = [];\n this.groupData = [];\n this.labelData = [];\n this.timeVal = [];\n this.getList();\n },\n // 发送文章\n sendNews() {\n if (this.selectionList.length === 0) return this.$message.warning('请先选择用户');\n const _this = this;\n this.$modalArticle(function (row) {}, 'send');\n },\n // 发送优惠劵\n onSend() {\n if (this.selectionList.length === 0) return this.$message.warning('请选择要设置的用户');\n const _this = this;\n this.$modalCoupon(\n 'send',\n (this.keyNum += 1),\n [],\n function (row) {\n _this.formValidate.give_coupon_ids = [];\n _this.couponData = [];\n row.map((item) => {\n _this.formValidate.give_coupon_ids.push(item.coupon_id);\n _this.couponData.push(item.title);\n });\n _this.selectionList = [];\n },\n this.userIds,\n 'user',\n );\n },\n Close() {\n this.Visible = false;\n this.levelVisible = false;\n },\n // 账户详情\n onDetails(id) {\n this.$refs.userDetailFrom.getUserDetail(id);\n this.$refs.userDetailFrom.dialogUserDetail = true;\n },\n // 等级\n // onLevel(id,level){\n // var userLevel = new Object();\n // this.levelList.forEach(item=>{\n // if(item.id == level){\n // userLevel.gradeLevel = item.grade;\n // }\n // })\n // userLevel.uid = id;\n // userLevel.level = level;\n // this.levelInfo = userLevel;\n // this.levelVisible = true;\n // },\n // 积分余额\n editPoint(id) {\n this.uid = id;\n this.VisiblePoint = true;\n },\n // 积分余额\n submitPointForm: Debounce(function (formName) {\n this.$refs[formName].validate((valid) => {\n if (valid) {\n this.PointValidateForm.uid = this.uid;\n this.loadingBtn = true;\n foundsApi(this.PointValidateForm)\n .then((res) => {\n this.$message.success('设置成功');\n this.loadingBtn = false;\n this.handlePointClose();\n this.getList();\n })\n .catch(() => {\n this.loadingBtn = false;\n });\n } else {\n return false;\n }\n });\n }),\n // 积分余额\n handlePointClose() {\n this.VisiblePoint = false;\n this.PointValidateForm = {\n integralType: 2,\n integralValue: 0,\n moneyType: 2,\n moneyValue: 0,\n uid: '',\n };\n },\n handleClose() {\n this.dialogVisible = false;\n this.$refs['dynamicValidateForm'].resetFields();\n },\n // 搜索\n userSearchs() {\n this.userFrom.page = 1;\n this.getList();\n },\n // 选择国家\n changeCountry() {\n if (this.userFrom.country === 'OTHER' || !this.userFrom.country) {\n this.selectedData = [];\n this.userFrom.province = '';\n this.userFrom.city = '';\n this.address = [];\n }\n },\n // 选择地址\n handleChange(value) {\n this.userFrom.province = value[0];\n this.userFrom.city = value[1];\n },\n // 具体日期\n onchangeTime(e) {\n this.timeVal = e;\n this.userFrom.dateLimit = e ? this.timeVal.join(',') : '';\n },\n // 列表\n getList(num) {\n this.listLoading = true;\n this.userFrom.page = num ? num : this.userFrom.page;\n this.userFrom.nikename = encodeURIComponent(this.nikename);\n // this.userFrom.level = this.levelData.join(',')\n this.userFrom.groupId = this.groupData.join(',');\n this.userFrom.labelId = this.labelData.join(',');\n userListApi(this.userFrom)\n .then((res) => {\n this.tableData.data = res.list;\n this.tableData.total = res.total;\n this.listLoading = false;\n })\n .catch(() => {\n this.listLoading = false;\n });\n this.checkedCities = this.$cache.local.has('user_stroge')\n ? this.$cache.local.getJSON('user_stroge')\n : this.checkedCities;\n this.$set(this, 'card_select_show', false);\n },\n pageChange(page) {\n this.$selfUtil.changePageCoreRecordData(\n this.multipleSelectionAll,\n this.multipleSelection,\n this.tableData.data,\n (e) => {\n this.multipleSelectionAll = e;\n },\n );\n this.userFrom.page = page;\n this.getList();\n },\n handleSizeChange(val) {\n this.$selfUtil.changePageCoreRecordData(\n this.multipleSelectionAll,\n this.multipleSelection,\n this.tableData.data,\n (e) => {\n this.multipleSelectionAll = e;\n },\n );\n this.userFrom.limit = val;\n this.getList();\n },\n renderHeader(h) {\n return (\n

\n 操作\n

\n );\n //this.handleAddItem()}>\n },\n handleAddItem() {\n if (this.card_select_show) {\n this.$set(this, 'card_select_show', false);\n } else if (!this.card_select_show) {\n this.$set(this, 'card_select_show', true);\n }\n },\n handleCheckAllChange(val) {\n this.checkedCities = val ? this.columnData : [];\n this.isIndeterminate = false;\n },\n handleCheckedCitiesChange(value) {\n let checkedCount = value.length;\n this.checkAll = checkedCount === this.columnData.length;\n this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnData.length;\n },\n checkSave() {\n this.$modal.loading('正在保存到本地,请稍候...');\n this.$cache.local.setJSON('user_stroge', this.checkedCities);\n setTimeout(this.$modal.closeLoading(), 1000);\n },\n },\n};\n",null]}