Commit ceb19374 by xinla

新客自动拉群

1 parent 41b1c321
......@@ -116,3 +116,27 @@ export function remove(ids) {
method: 'DELETE',
})
}
/**
* 批量下载
* @param {*} 员工活码ids,多个逗号隔开
*/
export function downloadBatch(ids) {
return request({
url: service + '/downloadBatch',
params: {
ids,
},
responseType: 'blob',
})
}
export function download(id) {
return request({
url: service + '/download',
params: {
id,
},
responseType: 'blob',
})
}
......@@ -44,14 +44,6 @@ export default {
this.$emit('update:visible', val)
},
},
Ptype: {
get() {
return this.type
},
set(val) {
this.$emit('update:type', val)
},
},
},
created() {
this.getList()
......@@ -167,12 +159,7 @@ export default {
<el-table-column label="实际群码总数" align="center">
<template #default="{ row }">
<el-button
type="text"
@click="handleRealCodeDialogOpen(row.id, -1)"
>
{{ (row.actualList && row.actualList.length) || 0 }}
</el-button>
{{ (row.actualList && row.actualList.length) || 0 }}
</template>
</el-table-column>
......@@ -192,9 +179,7 @@ export default {
<i slot="reference" class="el-icon-warning expire-icon"></i>
</el-popover>
<el-button type="text" @click="handleRealCodeDialogOpen(row.id, 0)">
{{ row.availableCodes }}
</el-button>
{{ row.availableCodes }}
</template>
</el-table-column>
</el-table>
......
<script>
import { getDetail, add, update, getQrcode } from '@/api/drainageCode/staff'
import { getList } from '@/api/drainageCode/welcome'
import { getDetail, add, update } from '@/api/communityOperating/newCustomer'
// import { getList } from '@/api/drainageCode/welcome'
import PhoneDialog from '@/components/PhoneDialog'
import SelectUser from '@/components/SelectUser'
import SelectTag from '@/components/SelectTag'
......@@ -76,21 +76,15 @@ export default {
},
// 选择人员变化事件
selectedUser(users) {
let params = { userIds: [], departmentIds: [] }
// debugger
this.form.weEmpleCodeUseScops = users.map((d) => {
d.userId && params.userIds.push(d.userId)
d.id && params.departmentIds.push(d.id)
return {
businessId: d.id || d.userId,
businessName: d.name,
businessIdType: d.userId ? 2 : 1,
mobile: d.mobile,
}
})
params.userIds += ''
params.departmentIds += ''
getQrcode(params).then(({ data }) => {
this.$set(this.form, 'qrCode', data.qr_code)
})
},
submitSelectTag(data) {
this.form.weEmpleCodeTags = data.map((d) => ({
......@@ -99,10 +93,8 @@ export default {
}))
},
// 选择二维码确认按钮
submitSelectQrCode(text, image, file) {
this.form.mediaId = image.id
this.materialSelected = image.materialUrl
this.dialogVisibleSelectQrCode = false
submitSelectQrCode(data) {
this.form.qrCode = data.codeUrl
},
removeMaterial() {
this.form.mediaId = ''
......
<script>
import { getList, remove } from '@/api/communityOperating/newCustomer'
import {
getList,
remove,
download,
downloadBatch,
} from '@/api/communityOperating/newCustomer'
export default {
components: {},
......@@ -9,7 +14,7 @@ export default {
query: {
pageNum: 1,
pageSize: 10,
activityScene: '',
empleCodeName: '',
createBy: '',
beginTime: '', // "开始时间",
endTime: '', // "结束时间"
......@@ -91,8 +96,8 @@ export default {
})
.catch(function() {})
},
download(id, userName, activityScene) {
let name = userName + '-' + activityScene + '.png'
download(id, userName, empleCodeName) {
let name = userName + '-' + empleCodeName + '.png'
download(id).then((res) => {
if (res != null) {
let blob = new Blob([res], { type: 'application/zip' })
......@@ -143,8 +148,8 @@ export default {
class="top-search"
size="small"
>
<el-form-item label="活码名称" prop="name">
<el-input v-model="query.name" placeholder="请输入"></el-input>
<el-form-item label="活码名称">
<el-input v-model="query.empleCodeName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="创建人">
<el-input v-model="query.createBy" placeholder="请输入"></el-input>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!