Commit 334e1e7b by xuyl

更新页面内容

1 parent 95d89b40
...@@ -3085,16 +3085,6 @@ ...@@ -3085,16 +3085,6 @@
"integrity": "sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg==", "integrity": "sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg==",
"dev": true "dev": true
}, },
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"cliui": { "cliui": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
...@@ -3121,24 +3111,12 @@ ...@@ -3121,24 +3111,12 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true "dev": true
}, },
"emojis-list": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
"dev": true
},
"fast-deep-equal": { "fast-deep-equal": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true "dev": true
}, },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
...@@ -3232,15 +3210,6 @@ ...@@ -3232,15 +3210,6 @@
"strip-ansi": "^6.0.1" "strip-ansi": "^6.0.1"
} }
}, },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"terser-webpack-plugin": { "terser-webpack-plugin": {
"version": "2.3.8", "version": "2.3.8",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz",
...@@ -3289,30 +3258,6 @@ ...@@ -3289,30 +3258,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
},
"wrap-ansi": { "wrap-ansi": {
"version": "6.2.0", "version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
...@@ -14596,6 +14541,85 @@ ...@@ -14596,6 +14541,85 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"emojis-list": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.3.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.3.tgz",
......
...@@ -52,11 +52,34 @@ const atchmessagingCreate = params => { ...@@ -52,11 +52,34 @@ const atchmessagingCreate = params => {
sign: true sign: true
}) })
} }
const getStoreList = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.create.merchant'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const recordSend = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.record.send'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
// 企微高级群发查看预计群发人数
export default { export default {
querylabeltree, querylabeltree,
queryCrowdtree, queryCrowdtree,
batchmessagingRecord, batchmessagingRecord,
atchmessagingCustomercount, atchmessagingCustomercount,
atchmessagingCreate atchmessagingCreate,
getStoreList,
recordSend
} }
...@@ -7,10 +7,24 @@ ...@@ -7,10 +7,24 @@
<el-button class="table-btn" @click="handleqrCode" :size="size" type="primary" plain mode="el-button">企微接入授权</el-button> <el-button class="table-btn" @click="handleqrCode" :size="size" type="primary" plain mode="el-button">企微接入授权</el-button>
</div> </div>
</div> </div>
<GLTable ref="activeTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"></GLTable> <GLTable ref="activeTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="staffName" slot-scope="scope">
<div class="staffName">
<span>{{ scope.scope.staffName }}</span>
<span class="entmicroName" v-if="scope.scope.entmicroName">@{{ scope.scope.entmicroName }}</span>
</div>
</div>
<div slot="loginStatus" slot-scope="scope">
<div class="loginStatus" v-if="scope.scope.loginStatus">
<span class="cycle" :style="{ background: scope.scope.loginStatus == '1' ? '#2CCA74' : scope.scope.loginStatus == '0' ? '#999999' : '' }"></span>
{{ scope.scope.loginStatus == '1' ? '在线' : scope.scope.loginStatus == '0' ? '离线' : '' }}
</div>
<div v-else>--</div>
</div>
</GLTable>
<GLDialog :title="'授权登入二维码'" mode="small" :visible.sync="qrCodeVisible"> <GLDialog :title="'授权登入二维码'" mode="small" :visible.sync="qrCodeVisible">
<div class="qrIMGbox"> <div class="qrIMGbox">
<img class="qrIMG" :src="url" /> <img class="qrIMG" :src="qrcodeUrl" />
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="refreshQrcode">刷新</el-button> <el-button type="primary" size="small" @click="refreshQrcode">刷新</el-button>
...@@ -26,17 +40,14 @@ export default { ...@@ -26,17 +40,14 @@ export default {
data() { data() {
return { return {
url, url,
qrcodeUrl: '',
qrCodeVisible: false, qrCodeVisible: false,
searchForm: { qrcodeId: '',
belongWechat: '', searchForm: {},
staffName: '',
telphone: '',
status: ''
},
searchFormData: [ searchFormData: [
{ {
label: '所属企微', label: '所属企微',
name: 'belongWechat', name: 'entmicroName',
type: 'input', type: 'input',
isClear: true isClear: true
}, },
...@@ -48,13 +59,13 @@ export default { ...@@ -48,13 +59,13 @@ export default {
}, },
{ {
label: '手机号码', label: '手机号码',
name: 'telphone', name: 'staffPhone',
type: 'input', type: 'input',
isClear: true isClear: true
}, },
{ {
label: '状态', label: '状态',
name: 'status', name: 'loginStatus',
type: 'select', type: 'select',
optionList: [ optionList: [
{ {
...@@ -76,36 +87,34 @@ export default { ...@@ -76,36 +87,34 @@ export default {
} }
], ],
tableParams: { tableParams: {
listName: 'list', listName: 'data',
tableColumns: [ tableColumns: [
{ {
label: '员工企微', label: '员工企微',
prop: 'staffNum' prop: 'staffName',
addHtml: 'staffName'
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'telphone' prop: 'staffPhone'
}, },
{ {
label: '所属门店', label: '所属门店',
prop: 'belongStore' prop: 'merchantName'
},
{
label: '所属企微',
prop: 'belongWechat'
}, },
{ {
label: '最后同步时间', label: '最后同步时间',
prop: 'time' prop: 'lastLoginTime'
}, },
{ {
label: '状态', label: '状态',
prop: 'status' prop: 'loginStatus',
addHtml: 'loginStatus'
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' } pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
// getListApi: this.$apis.accountConfig.listCustomizedAgentWithPage, getListApi: this.$apis.collocation.wechatDepositList
} }
}, },
methods: { methods: {
...@@ -114,11 +123,7 @@ export default { ...@@ -114,11 +123,7 @@ export default {
}, },
// 重置搜索框搜索 // 重置搜索框搜索
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {}
isBuyPermit: '',
merchantId: '',
merchantName: ''
}
this.handleSearch() this.handleSearch()
}, },
setTableFinishFun() { setTableFinishFun() {
...@@ -127,9 +132,42 @@ export default { ...@@ -127,9 +132,42 @@ export default {
}, },
handleqrCode() { handleqrCode() {
this.qrCodeVisible = true this.qrCodeVisible = true
// this.$apis.collocation
// .getLoginQcCode({})
// .then(res => {
// if (res.code == '-1') {
// this.qrCodeVisible = false
// } else {
// this.qrcodeUrl = `data:image/png;base64,${res.data}`
// this.this.qrcodeId = res.id
// this.qrCodeVisible = true
// }
// })
// .catch(err => {
// this.qrCodeVisible = false
// })
},
verifyQRCodeIsInvalid() {
this.qrCodeInterval = setInterval(() => {
// this.$apis.collocation.getQcCodeDetail({ id: this.qrcodeId }).then(res => {
// if (res && res.data == true) {
// return
// } else {
// }
// })
}, 3000000)
}, },
refreshQrcode() { refreshQrcode() {
console.log('1111') this.handleqrCode()
}
},
watch: {
qrCodeVisible(newVal) {
if (newVal == true) {
this.verifyQRCodeIsInvalid()
} else {
clearInterval(this.qrCodeInterval)
}
} }
} }
} }
...@@ -154,7 +192,7 @@ export default { ...@@ -154,7 +192,7 @@ export default {
color: #5850ff; color: #5850ff;
border: 1px solid #5850ff; border: 1px solid #5850ff;
} }
.qrIMGbox{ .qrIMGbox {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -163,6 +201,24 @@ export default { ...@@ -163,6 +201,24 @@ export default {
height: 150px; height: 150px;
} }
} }
/deep/.loginStatus {
display: flex;
align-items: center;
.cycle {
margin-right: 8px;
width: 6px;
height: 6px;
display: inline-block;
border-radius: 50%;
}
}
.staffName {
display: flex;
align-items: center;
.entmicroName {
font-size: 12px;
color: #fb8f28;
}
}
} }
</style> </style>
...@@ -9,25 +9,12 @@ ...@@ -9,25 +9,12 @@
<el-form-item label="群发名称:" prop="groupName"> <el-form-item label="群发名称:" prop="groupName">
<el-input size="small" v-model="basicForm.groupName"></el-input> <el-input size="small" v-model="basicForm.groupName"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="选择门店:">--> <el-form-item label="选择门店:" prop="selectStore">
<!-- <el-select--> <!-- <SearchDropDown :label="'msgMerchantName'" :value="'msgMerchantId'"></SearchDropDown>-->
<!-- clearable--> <el-select clearable filterable remote :remote-method="remoteMethod" v-el-select-loadmore="loadmore" v-model="basicForm.selectStore" placeholder="请选择门店" @change="selectChange">
<!-- filterable--> <el-option v-for="(item, i) in dataItems" :key="i" :label="item.msgMerchantName" :value="item.msgMerchantId"></el-option>
<!-- remote--> </el-select>
<!-- :remote-method="remoteMethod"--> </el-form-item>
<!-- v-el-select-loadmore="loadmore"-->
<!-- v-model="ruleForm.merchant"-->
<!-- placeholder="请选择商户"-->
<!-- @change="selectChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(x, i) in dataItems"-->
<!-- :key="i"-->
<!-- :label="x.merchantName"-->
<!-- :value="x.merchantName"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="选择客户:" prop="selectType"> <el-form-item label="选择客户:" prop="selectType">
<el-radio-group @change="radioChange" v-model="basicForm.selectType"> <el-radio-group @change="radioChange" v-model="basicForm.selectType">
<el-radio :label="1">标签筛选</el-radio> <el-radio :label="1">标签筛选</el-radio>
...@@ -39,9 +26,11 @@ ...@@ -39,9 +26,11 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
选择标签 选择标签
</el-button> </el-button>
<div class="selectLen" v-show="taggingList.length != 0">(已选 <div class="selectLen" v-show="taggingList.length != 0">
<span class="num">{{taggingList.length}}</span> (已选
个标签)</div> <span class="num">{{ taggingList.length }}</span>
个标签)
</div>
</div> </div>
<div v-show="tagging.length != 0" :key="key" class="el-input-tag input-tag-wrapper"> <div v-show="tagging.length != 0" :key="key" class="el-input-tag input-tag-wrapper">
<span v-for="(tag, idx) in tagging" :key="idx"> <span v-for="(tag, idx) in tagging" :key="idx">
...@@ -75,7 +64,7 @@ ...@@ -75,7 +64,7 @@
<el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="154px"> <el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="154px">
<el-form-item prop="attachmentList"> <el-form-item prop="attachmentList">
<label slot="label" class="required">群发内容:</label> <label slot="label" class="required">群发内容:</label>
<GLEditor ref="welcome" :form="'customer'" style="line-height: 12px;" :btnList="btnList" ></GLEditor> <GLEditor ref="welcome" :form="'customer'" style="line-height: 12px;" :btnList="btnList"></GLEditor>
<div v-show="attachmentShow" class="el-form-item__error">{{ attachmentText }}</div> <div v-show="attachmentShow" class="el-form-item__error">{{ attachmentText }}</div>
</el-form-item> </el-form-item>
<div class="transform-text"> <div class="transform-text">
...@@ -104,11 +93,14 @@ const combineType = { ...@@ -104,11 +93,14 @@ const combineType = {
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
import SelectCrowd from './components/selectCrowd.vue' import SelectCrowd from './components/selectCrowd.vue'
import SelectLabel from './components/SelectLabel.vue' import SelectLabel from './components/SelectLabel.vue'
// import SearchDropDown from './components/searchDropDown/index'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
export default { export default {
components: { components: {
SelectLabel, SelectLabel,
SelectCrowd SelectCrowd,
// SearchDropDown
}, },
data() { data() {
const validatorUser = (rule, value, callback) => { const validatorUser = (rule, value, callback) => {
...@@ -245,15 +237,15 @@ export default { ...@@ -245,15 +237,15 @@ export default {
attachmentShow: false, attachmentShow: false,
attachmentText: '', attachmentText: '',
basicRules: { basicRules: {
groupName:[{ required: true, message: '请选择群发名称', trigger: 'blur' }], groupName: [{ required: true, message: '请选择群发名称', trigger: 'blur' }],
selectStore:[{ required: true, message: '请选择门店', trigger: 'change' }], selectStore: [{ required: true, message: '请选择门店', trigger: 'change' }],
userList: [{ validator: validatorUser, trigger: 'change' }], userList: [{ validator: validatorUser, trigger: 'change' }],
selectType: [{ required: true, message: '请选择客户类型', trigger: 'change' }], selectType: [{ required: true, message: '请选择客户类型', trigger: 'change' }]
}, },
basicForm: { basicForm: {
groupName:'', groupName: '',
selectStore: '', selectStore: '',
selectType: 1, selectType: 1
}, },
groupList: [], groupList: [],
selectData: [], selectData: [],
...@@ -267,6 +259,12 @@ export default { ...@@ -267,6 +259,12 @@ export default {
footerWidth: 500, footerWidth: 500,
viewLoading: false, viewLoading: false,
isSelectCrowd: false, isSelectCrowd: false,
pageData: {
//懒加载相关参数,这里代表从第一条数据开始加载,一次加载40项
pageNum: 1,
pageSize: 10000
},
dataItems: []
} }
}, },
watch: { watch: {
...@@ -293,6 +291,9 @@ export default { ...@@ -293,6 +291,9 @@ export default {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200 this.boxHeight = clientHeight - 200
this.$apis.wechatGroup.getStoreList(this.pageData).then(res => {
this.dataItems = res.data
})
}, },
methods: { methods: {
// 返回 // 返回
...@@ -313,13 +314,13 @@ export default { ...@@ -313,13 +314,13 @@ export default {
}, },
// 打开标签筛选弹框 // 打开标签筛选弹框
openLabel() { openLabel() {
// if (!this.basicForm.selectStore) { if (!this.basicForm.selectStore) {
// this.$message({ this.$message({
// type: 'error', type: 'error',
// message: '请先选择门店' message: '请先选择门店'
// }) })
// return return
// } }
this.dialogVisible = !this.dialogVisible this.dialogVisible = !this.dialogVisible
this.$refs.selectLabel.init(this.tagging) this.$refs.selectLabel.init(this.tagging)
}, },
...@@ -376,8 +377,7 @@ export default { ...@@ -376,8 +377,7 @@ export default {
const countParams = this.getSiftMembers() const countParams = this.getSiftMembers()
if (countParams) { if (countParams) {
this.addLoading = true this.addLoading = true
this.$apis.wechatGroup this.$apis.wechatGroup.atchmessagingCreate(params).then(res => {
.atchmessagingCreate(params).then(res => {
if (res.code == '-1') { if (res.code == '-1') {
this.$message({ this.$message({
type: 'error', type: 'error',
...@@ -554,7 +554,7 @@ export default { ...@@ -554,7 +554,7 @@ export default {
return return
} }
this.$refs.selectCrowd.init(this.basicForm.crowdList) this.$refs.selectCrowd.init(this.basicForm.crowdList)
}, }
// 获取人群数据(根据人群筛选获取群发账号人群数据) // 获取人群数据(根据人群筛选获取群发账号人群数据)
// getCrowdData(val) { // getCrowdData(val) {
// if (val.length) { // if (val.length) {
...@@ -653,14 +653,14 @@ export default { ...@@ -653,14 +653,14 @@ export default {
.basic-form { .basic-form {
padding: 32px 0 20px 20px; padding: 32px 0 20px 20px;
.selectedLabel{ .selectedLabel {
display: flex; display: flex;
.selectLen{ .selectLen {
margin-left: 20px; margin-left: 20px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
.num{ .num {
color: #5850FF; color: #5850ff;
} }
} }
} }
......
import { http } from '@/main'
const URL = 'rop-scrm-entmicro/router'
const getStoreList = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.create.merchant'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
getStoreList
}
<template>
<el-select ref="selectRef" clearable filterable remote :remote-method="remoteMethod" v-el-select-loadmore="loadmore" v-model="inputVal" placeholder="请选择门店" @change="selectChange">
<el-option v-for="(item, i) in dataItems" :key="i" :label="item[label]" :value="item[value]"></el-option>
</el-select>
</template>
<script>
import { getStoreList } from './api'
export default {
name: 'SearchDropDown',
props: ['inputBoxSearchValue', 'label', 'value'],
data() {
return {
searchContentStorage: '',
inputVal: '',
dataItems: [],
arrBack:[],
totalNum:'',
pageData: {
//懒加载相关参数,这里代表从第一条数据开始加载,一次加载40项
pageNum: 1,
pageSize: 10
}
}
},
directives: {
/** 下拉框懒加载 */
'el-select-loadmore': {
bind(el, binding) {
const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
SELECTWRAP_DOM.addEventListener('scroll', function() {
const condition = this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
}
}
},
mounted() {
this.loadUpData(this.pageData)
},
watch: {
// 'inputVal'(newVal, oldVal) {
// console.log(newVal,oldVal)
// // if (oldVal !== newVal) {
// // this.dataItems = []
// // this.loadUpData({
// // pageNum: 1,
// // pageSize: 10
// // },newVal)
// // }
// }
'inputVal': {
handler(val) {
console.log(val)
if (!val) {
this.dataItems = []
this.loadUpData({
pageNum: 1,
pageSize: 10
})
}
}
}
},
methods: {
async loadUpData(pageData, searchVal) {
let params = {
...pageData,
merchantName: searchVal
}
await this.$apis.wechatGroup.getStoreList(params).then(res => {
this.totalNum = res.count
this.arrBack = res.data
})
this.dataItems = [...this.dataItems,...this.arrBack]
},
loadmore() {
this.pageData.pageNum++
let acquireCount = this.pageData.pageNum * this.pageData.pageSize
if (acquireCount - this.totalNum >= this.pageData.pageSize){
return
}
if (this.searchContentStorage) {
this.loadUpData(this.pageData, this.searchContentStorage)
} else {
this.loadUpData(this.pageData, '') //类似于分页查询
}
},
// 远程搜索
async remoteMethod(searchValue) {
console.log(this.inputVal)
if (searchValue !== '') {
this.searchContentStorage = searchValue
this.dataItems = []
this.timer = setTimeout(() => {
this.loadUpData(this.pageData, searchValue)
}, 300)
} else {
this.dataItems = []
this.loadUpData({
pageNum: 1,
pageSize: 10
},'')
}
},
// 根据所选商户获取品牌和地址
async selectChange(label) {
if (label) {
let obj = this.dataItems.filter(el => {
return el['incomingDisplayLabel'] == label
})
}
}
}
}
</script>
<style scoped></style>
...@@ -7,12 +7,21 @@ ...@@ -7,12 +7,21 @@
</el-button> </el-button>
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm :formObj="searchForm" :rowNumber="1" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"> <GLCombiForm :formObj="searchForm" :rowNumber="1" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div slot="optionBtns"> <GLTable ref="activeTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchFormTable" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="sendRecord" @click="traceRecord">发送记录</div> <div slot="optionBtns" slot-scope="scope">
<div v-if="scope.scope.sendState == '1'">
<span class="sendRecord" @click="traceRecord(scope.scope)">发送记录</span>
</div> </div>
</GLCombiForm> </div>
<GLTable ref="groupTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"></GLTable> <div slot="sendState" slot-scope="scope">
<div class="loginStatus" v-if="scope.scope.sendState">
<span class="cycle" :style="{ background: scope.scope.sendState == '1' ? '#2CCA74' : scope.scope.sendState == '2' ? '#EB4E4E' : scope.scope.sendState == '0' ? '#FDB757' : '' }"></span>
{{ scope.scope.sendState == '1' ? '已完成' : scope.scope.sendState == '2' ? '发送失败' : scope.scope.sendState == '0' ? '发送中' : '' }}
</div>
<div v-else>--</div>
</div>
</GLTable>
</div> </div>
<el-drawer size="40%" title="发送记录" :visible.sync="sendRecordDrawer.isVisible" :direction="sendRecordDrawer.direction"> <el-drawer size="40%" title="发送记录" :visible.sync="sendRecordDrawer.isVisible" :direction="sendRecordDrawer.direction">
<div class="horizon"></div> <div class="horizon"></div>
...@@ -24,7 +33,7 @@ ...@@ -24,7 +33,7 @@
</div> </div>
</div> </div>
</div> </div>
<GLTable ref="sendRecordDrawer.ref" :noDataImg="url" :getListApi="sendRecordDrawer.getListApi" :searchForm="sendRecordDrawer.searchForm" :tableParams="sendRecordDrawer.tableParams" :pageConf="sendRecordDrawer.pageConf"></GLTable> <GLTable ref="sendRecordDrawerRef" :noDataImg="url" :getListApi="sendRecordDrawer.getListApi" :searchForm="sendRecordDrawer.searchForm" :tableParams="sendRecordDrawer.tableParams" :pageConf="sendRecordDrawer.pageConf"></GLTable>
</el-drawer> </el-drawer>
</div> </div>
</template> </template>
...@@ -43,43 +52,40 @@ export default { ...@@ -43,43 +52,40 @@ export default {
{ {
title: '发送成功', title: '发送成功',
id: '1', id: '1',
num: 22, num: '',
color: '#2CCA74' color: '#2CCA74'
}, },
{ {
title: '发送失败', title: '发送失败',
id: '2', id: '2',
num: 4, num: '',
color: '#EB4E4E ' color: '#EB4E4E '
} }
], ],
ref: 'sendRecordDrawerRef', searchForm: {
getListApi: '', messagingId: ''
searchForm: '', },
tableParams: { tableParams: {
listName: 'list', listName: 'data',
tableColumns: [ tableColumns: [
{ {
label: '客户', label: '客户',
prop: 'sendName' prop: 'customerName'
}, },
{ {
label: '发送时间', label: '发送时间',
prop: 'senaStore' prop: 'sendTime'
}, },
{ {
label: '发送结果', label: '发送结果',
prop: 'customerNum' prop: 'sendResult'
} }
] ]
}, },
getListApi: this.$apis.wechatGroup.recordSend,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' } pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}, },
searchForm: { searchForm: {},
sendName: '',
sendTime: '',
store: ''
},
searchFormData: [ searchFormData: [
{ {
label: '群发名称', label: '群发名称',
...@@ -89,9 +95,15 @@ export default { ...@@ -89,9 +95,15 @@ export default {
}, },
{ {
label: '群发时间', label: '群发时间',
name: 'sendTime', name: 'daterange',
type: 'datePicker', type: 'datePicker',
isClear: true isClear: true,
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
}, },
{ {
label: '群发门店', label: '群发门店',
...@@ -100,16 +112,17 @@ export default { ...@@ -100,16 +112,17 @@ export default {
isClear: true isClear: true
} }
], ],
searchFormTable: {},
tableParams: { tableParams: {
listName: 'list', listName: 'data',
tableColumns: [ tableColumns: [
{ {
label: '群发名称', label: '群发名称',
prop: 'messagingName' prop: 'msgName'
}, },
{ {
label: '群发门店', label: '群发门店',
prop: 'messagingMerchant' prop: 'msgMerchant'
}, },
{ {
label: '客户数', label: '客户数',
...@@ -125,7 +138,8 @@ export default { ...@@ -125,7 +138,8 @@ export default {
}, },
{ {
label: '发送状态', label: '发送状态',
prop: 'sendState' prop: 'sendState',
addHtml: 'sendState'
}, },
{ {
label: '发送成功', label: '发送成功',
...@@ -140,13 +154,13 @@ export default { ...@@ -140,13 +154,13 @@ export default {
{ {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '66px', width: '100px',
addHtml: 'optionBtns', addHtml: 'optionBtns',
fixed: 'right' fixed: 'right'
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
getListApi: this.$apis.wechatGroup.batchmessagingRecord getListApi: this.$apis.wechatGroup.batchmessagingRecord
} }
}, },
...@@ -156,13 +170,26 @@ export default { ...@@ -156,13 +170,26 @@ export default {
}, },
// 重置搜索框搜索 // 重置搜索框搜索
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {}
isBuyPermit: '',
merchantId: '',
merchantName: ''
}
this.handleSearch() this.handleSearch()
}, },
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.startTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.startTime) delete params.startTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() {
return new Promise(async resolve => {
this.searchFormTable = this.getParams()
resolve()
})
},
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.activeTable.data.length ? (this.$refs.activeTable.tableHeightValues = '') : this.$refs.activeTable.setTableHeightFun() this.$refs.activeTable.data.length ? (this.$refs.activeTable.tableHeightValues = '') : this.$refs.activeTable.setTableHeightFun()
...@@ -171,8 +198,16 @@ export default { ...@@ -171,8 +198,16 @@ export default {
addSendGroup() { addSendGroup() {
this.$router.push('/wechatGroup/addWechatGroup') this.$router.push('/wechatGroup/addWechatGroup')
}, },
traceRecord() { async traceRecord(scope) {
const { msgId, successCompletion, failCompletion } = scope
this.sendRecordDrawer.traceFailandSuccess[0].num = successCompletion
this.sendRecordDrawer.traceFailandSuccess[1].num = failCompletion
this.sendRecordDrawer.searchForm.messagingId = msgId
// await this.$refs.sendRecordDrawerRef.refreshTable()
this.sendRecordDrawer.isVisible = true this.sendRecordDrawer.isVisible = true
this.$nextTick(() => {
this.$refs.sendRecordDrawerRef.refreshTable()
})
} }
} }
} }
...@@ -202,6 +237,18 @@ export default { ...@@ -202,6 +237,18 @@ export default {
} }
.sendRecord { .sendRecord {
color: #5850ff; color: #5850ff;
cursor: pointer;
}
/deep/.loginStatus {
display: flex;
align-items: center;
.cycle {
margin-right: 8px;
width: 6px;
height: 6px;
display: inline-block;
border-radius: 50%;
}
} }
} }
.horizon { .horizon {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!