Commit 32031657 by xinla

--no commit message

1 parent bdfe903d
...@@ -58,7 +58,11 @@ export default { ...@@ -58,7 +58,11 @@ export default {
} }
}, },
watch: {}, watch: {},
computed: {}, computed: {
isSync() {
return (+new Date() - +new Date(this.lastSyncTime)) / 3600000 < 2
}
},
created() { created() {
this.getList() this.getList()
this.getListTag() this.getListTag()
...@@ -89,7 +93,7 @@ export default { ...@@ -89,7 +93,7 @@ export default {
api api
.getListNew(this.query) .getListNew(this.query)
.then(({ rows, total, lastSyncTime, noRepeatCustomerTotal }) => { .then(({ rows, total, lastSyncTime, noRepeatCustomerTotal }) => {
rows.forEach(element => { rows.forEach((element) => {
if (element.tagIds && element.tagNames) { if (element.tagIds && element.tagNames) {
element.tagIds = element.tagIds.split(',') element.tagIds = element.tagIds.split(',')
element.tagNames = element.tagNames.split(',') element.tagNames = element.tagNames.split(',')
...@@ -116,8 +120,8 @@ export default { ...@@ -116,8 +120,8 @@ export default {
getListTag(refresh) { getListTag(refresh) {
getListTag().then(({ rows }) => { getListTag().then(({ rows }) => {
this.listTagOneArray = [] this.listTagOneArray = []
rows.forEach(element => { rows.forEach((element) => {
element.weTags.forEach(d => { element.weTags.forEach((d) => {
this.listTagOneArray.push(d) this.listTagOneArray.push(d)
}) })
}) })
...@@ -158,9 +162,9 @@ export default { ...@@ -158,9 +162,9 @@ export default {
let hasErrorTag = [] let hasErrorTag = []
let repeat = [] let repeat = []
row.tags && row.tags &&
row.tags.forEach(unit => { row.tags.forEach((unit) => {
// 判断是否有重复标签 // 判断是否有重复标签
let isRepeat = this.selectedTag.some(d => { let isRepeat = this.selectedTag.some((d) => {
return d.tagId === unit.tagId return d.tagId === unit.tagId
}) })
// 去重 // 去重
...@@ -168,7 +172,7 @@ export default { ...@@ -168,7 +172,7 @@ export default {
repeat.push(unit.tagName) repeat.push(unit.tagName)
return return
} }
let filter = this.listTagOneArray.find(d => { let filter = this.listTagOneArray.find((d) => {
return d.tagId === unit.tagId return d.tagId === unit.tagId
}) })
// 如果没有匹配到,则说明该便签处于异常状态,可能已被删除或破坏 // 如果没有匹配到,则说明该便签处于异常状态,可能已被删除或破坏
...@@ -214,7 +218,7 @@ export default { ...@@ -214,7 +218,7 @@ export default {
loading.close() loading.close()
this.msgSuccess('后台开始同步数据,请稍后关注进度') this.msgSuccess('后台开始同步数据,请稍后关注进度')
}) })
.catch(fail => { .catch((fail) => {
loading.close() loading.close()
console.log(fail) console.log(fail)
}) })
...@@ -230,18 +234,18 @@ export default { ...@@ -230,18 +234,18 @@ export default {
.then(function() { .then(function() {
return api.exportCustomer(queryParams) return api.exportCustomer(queryParams)
}) })
.then(response => { .then((response) => {
this.download(response.msg) this.download(response.msg)
}) })
.catch(function() {}) .catch(function() {})
}, },
selectedUser(list) { selectedUser(list) {
this.queryUser = list this.queryUser = list
this.query.userIds = list.map(d => d.userId) + '' this.query.userIds = list.map((d) => d.userId) + ''
}, },
submitSelectTag(selected) { submitSelectTag(selected) {
if (this.tagDialogType.type === 'query') { if (this.tagDialogType.type === 'query') {
this.query.tagIds = selected.map(d => d.tagId) + '' this.query.tagIds = selected.map((d) => d.tagId) + ''
// debugger; // debugger;
this.queryTag = selected this.queryTag = selected
this.dialogVisible = false this.dialogVisible = false
...@@ -306,7 +310,7 @@ export default { ...@@ -306,7 +310,7 @@ export default {
takeoverUserId: this.extendStaff, //接受人 takeoverUserId: this.extendStaff, //接受人
externalUserid: this.currentEidt.externalUserid //客户id,多个客户使用逗号隔开 externalUserid: this.currentEidt.externalUserid //客户id,多个客户使用逗号隔开
} }
api.jobExtends(data).then(res => { api.jobExtends(data).then((res) => {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
this.dialogVisibleExtend = false this.dialogVisibleExtend = false
this.getList() this.getList()
...@@ -416,13 +420,21 @@ export default { ...@@ -416,13 +420,21 @@ export default {
<!-- 共 <!-- 共
<span class="num">{{ total }}</span> 位客户,实际客户 <span class="num">{{ total }}</span> 位客户,实际客户
<span class="num">{{ total }}</span> 位。 --> <span class="num">{{ total }}</span> 位。 -->
<el-button <el-tooltip
v-hasPermi="['customerManage:customer:sync']" :disabled="isSync"
v-preventReClick class="item"
type="primary" content="由于企业微信开放平台的限制,两小时内不得重复同步操作"
@click="sync" placement="top-start"
>同步客户</el-button
> >
<el-button
v-hasPermi="['customerManage:customer:sync']"
v-preventReClick
:disabled="isSync"
type="primary"
@click="sync"
>同步客户</el-button
>
</el-tooltip>
<!-- <el-button v-hasPermi="['customerManage:customer:checkRepeat']" type="primary">查看重复客户</el-button> --> <!-- <el-button v-hasPermi="['customerManage:customer:checkRepeat']" type="primary">查看重复客户</el-button> -->
<span> 最近同步:{{ lastSyncTime }} </span> <span> 最近同步:{{ lastSyncTime }} </span>
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!