Commit d1fb8f34 by 杨明

fixed

1 parent 8e8679ca
...@@ -60,6 +60,17 @@ const importsRecord = params => { ...@@ -60,6 +60,17 @@ const importsRecord = params => {
sign: true sign: true
}) })
} }
const datacubeNotice = params => {
params.method = 'entmicro.api.datacube.notice.pc'
params.sessionId = session
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const importsCount = params => { const importsCount = params => {
params.method = 'entmicro.api.imports.count' params.method = 'entmicro.api.imports.count'
params.sessionId = session params.sessionId = session
...@@ -89,6 +100,15 @@ const findLoginCount = params => { ...@@ -89,6 +100,15 @@ const findLoginCount = params => {
sign: true sign: true
}) })
} }
const queryCrowdTree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: 'rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
importsUpload, importsUpload,
downloadModel, downloadModel,
...@@ -97,5 +117,7 @@ export default { ...@@ -97,5 +117,7 @@ export default {
importsKey, importsKey,
findLoginCount, findLoginCount,
datacubeUpload, datacubeUpload,
merchantConfig merchantConfig,
datacubeNotice,
queryCrowdTree
} }
...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(cfg) return Promise.resolve(cfg)
} }
return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config') return new Http({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
// return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config') // return new Http({ request: { timeout: 100000 } }).get('https://oss-config.dev.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
} }
export const config = { export const config = {
......
...@@ -2,13 +2,12 @@ import Vue from 'vue' ...@@ -2,13 +2,12 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLTable, GLButton, GLFooter } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLTable, GLButton, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
import GLCombiForm from '@/components/GlCombiForm'
Vue.use(GLCombiForm) Vue.use(GLCombiForm)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) // Vue.component('GLTable', GLTable)
...@@ -24,7 +23,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -24,7 +23,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: 'scrm-base-dae97168-46da-4484-8386-f33fb5844878-rop' } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_tag = new common.Http({ response, request: request_tag, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_tag = new common.Http({ response, request: request_tag, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
......
...@@ -86,7 +86,7 @@ util.downloadUrl = function(url) { ...@@ -86,7 +86,7 @@ util.downloadUrl = function(url) {
link.click() link.click()
document.body.removeChild(link) document.body.removeChild(link)
} }
util.getArrayIsSubset = (arr1, arr2) => { util.getArrayIsSubset = (arr2, arr1) => {
return arr1.every(item => { return arr1.every(item => {
return arr2.includes(item) return arr2.includes(item)
}) })
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<div class="poster-item-box" v-loading="item.loadingImg"> <div class="poster-item-box" v-loading="item.loadingImg">
<img <img
:src="item.thumbnailUrl?item.thumbnailUrl:item.autoUrl" :src="item.thumbnailUrl ? item.thumbnailUrl : item.autoUrl"
class="poster-image" class="poster-image"
v-if="item.imgWidth" v-if="item.imgWidth"
:style="{ :style="{
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
this.$message.info('图片格式不正确') this.$message.info('图片格式不正确')
return false return false
} }
if (file.size / 1024 / 1000 > 10) { if (file.size / 1024 / 1000 > 40) {
this.$message.info('请上传小于10M的图片') this.$message.info('请上传小于10M的图片')
return return
} }
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
} else { } else {
self.loading = false self.loading = false
} }
self.$refs.file.value = ''; self.$refs.file.value = ''
}) })
} }
} }
...@@ -232,13 +232,13 @@ export default { ...@@ -232,13 +232,13 @@ export default {
listChannelCodeBill.forEach(item => { listChannelCodeBill.forEach(item => {
item.show = false item.show = false
item.loadingImg = true item.loadingImg = true
let backUrl = item.thumbnailUrl?item.thumbnailUrl: item.autoUrl let backUrl = item.thumbnailUrl ? item.thumbnailUrl : item.autoUrl
this.backUrl = backUrl this.backUrl = backUrl
let img = new Image() let img = new Image()
img.src = backUrl img.src = backUrl
this.loadingImg = true this.loadingImg = true
this.loadingDrag = false this.loadingDrag = false
img.onload = function () { img.onload = function() {
if (img.width > img.height) { if (img.width > img.height) {
item.imgWidth = 280 item.imgWidth = 280
item.imgHeight = (img.height * 280) / img.width item.imgHeight = (img.height * 280) / img.width
...@@ -256,7 +256,7 @@ export default { ...@@ -256,7 +256,7 @@ export default {
let img = new Image() let img = new Image()
img.src = img_url img.src = img_url
let self = this let self = this
img.onload = function () { img.onload = function() {
self.dragHeight = (img.height * 375) / img.width self.dragHeight = (img.height * 375) / img.width
self.dialogVisible = true self.dialogVisible = true
self.loading = false self.loading = false
...@@ -268,7 +268,7 @@ export default { ...@@ -268,7 +268,7 @@ export default {
this.getPoster() this.getPoster()
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.channel-main { .channel-main {
...@@ -384,4 +384,4 @@ export default { ...@@ -384,4 +384,4 @@ export default {
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
this.tableSearchForm.beginTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/') this.tableSearchForm.beginTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/') this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
} }
delete this.tableSearchForm.createTime // delete this.tableSearchForm.createTime
resolve() resolve()
}) })
}, },
......
<template> <template>
<div class="import-main"> <div class="import-main" v-loading="loading">
<div class="upload-container"> <div class="upload-container">
<div class="upload-item" v-for="(item, index) in fileList" :key="item"> <div class="upload-item" v-for="(item, index) in fileList" :key="item">
<div class="upload-label"> <div class="upload-label" :style="{ width: textNum * 18 + 'px' }">
<label v-if="item.flag">*</label> <label v-if="item.flag">*</label>
{{ item.templateName }}: {{ item.templateName }}:
</div> </div>
...@@ -10,25 +10,25 @@ ...@@ -10,25 +10,25 @@
<div class="upload-btn"> <div class="upload-btn">
<el-button size="small"> <el-button size="small">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
{{ item.fileName ? '上传文件' : '更换文件' }} {{ item.fileName ? '更换文件' : '上传文件' }}
</el-button> </el-button>
<input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile($event, item, index)" /> <input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile($event, item, index)" />
</div> </div>
<a :href="item.templateUrl">下载模板</a> <a :href="item.templateUrl">下载模板</a>
<div class="upload-tips" v-if="!item.fileName && !item.fileUrl">支持扩展名:xlsx、xls</div> <div class="upload-tips" v-if="!item.fileName && !item.fileInfo">支持扩展名:xlsx、xls</div>
<div class="upload-tips" v-if="item.fileUrl"> <div class="upload-tips" v-if="item.fileInfo">
<i class="el-icon-success"></i> <i class="el-icon-success"></i>
文件格式正确({{ item.fileName }}) 文件格式正确({{ item.fileName }})
</div> </div>
<div class="upload-tips" v-if="item.fileName && !item.fileUrl"> <div class="upload-tips" v-if="item.fileName && !item.fileInfo">
<i class="el-icon-error"></i> <i class="el-icon-error"></i>
文件格式错误,请更换文件({{ item.fileName }}) 文件格式错误,请更换文件({{ item.fileName }})
</div> </div>
</div> </div>
</div> </div>
<div class="upload-item"> <div class="upload-item">
<div class="upload-label"> <div class="upload-label" :style="{ width: textNum * 20 + 'px' }">
备注: 备注:
</div> </div>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
</div> </div>
<div class="upload-item"> <div class="upload-item">
<div class="upload-label"> <div class="upload-label" :style="{ width: textNum * 20 + 'px' }">
跟进人 跟进人
<el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。"> <el-popover placement="top" width="400" trigger="hover" content="用户点击短信中的链接后,将自动分配以下某位员工的企微名片,客户添加好友将自动回复后台所配置的欢迎语。">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
...@@ -78,6 +78,8 @@ export default { ...@@ -78,6 +78,8 @@ export default {
}, },
data() { data() {
return { return {
textNum: 0,
loading: false,
staffIdList: [], staffIdList: [],
tabelHeader: [], tabelHeader: [],
tabelHeaderModel: [], tabelHeaderModel: [],
...@@ -90,20 +92,23 @@ export default { ...@@ -90,20 +92,23 @@ export default {
}, },
methods: { methods: {
async merchantConfig() { async merchantConfig() {
this.loading = true
const fileList = await this.$apis.square.merchantConfig({}) const fileList = await this.$apis.square.merchantConfig({})
this.fileList = fileList.map(item => { this.fileList = fileList.map(item => {
this.textNum = this.textNum > item.templateName.length ? this.textNum : item.templateName.length + 1
return { return {
size: '', size: '',
flag: parseInt(item.mustUpload), flag: !parseInt(item.mustUpload),
fileName: '', fileName: '',
templateName: item.templateName, templateName: item.templateName,
fileUrl: '', fileUrl: '',
fileInfo: '',
templateUrl: item.templateUrl, templateUrl: item.templateUrl,
BusinessTypeId: item.businessType, BusinessTypeId: item.businessType,
businessTypeName: item.businessName businessTypeName: item.businessName
} }
}) })
console.log(fileList) this.loading = false
this.readWorkbookFromRemoteFile() this.readWorkbookFromRemoteFile()
}, },
getUploadInfo() { getUploadInfo() {
...@@ -112,7 +117,7 @@ export default { ...@@ -112,7 +117,7 @@ export default {
this.$message.error('请上传' + f.templateName) this.$message.error('请上传' + f.templateName)
return false return false
} }
if (!f.fileUrl && f.fileName) { if (!f.fileInfo && f.fileName) {
this.$message.error(f.templateName + '文件格式错误,请更换文件') this.$message.error(f.templateName + '文件格式错误,请更换文件')
return false return false
} }
...@@ -213,8 +218,9 @@ export default { ...@@ -213,8 +218,9 @@ export default {
this.$message.error('单文件体积需小于30M') this.$message.error('单文件体积需小于30M')
return return
} }
this.loading = true
const header = await this.compareHeader(file) const header = await this.compareHeader(file)
console.log(header, this.tabelHeaderModel[index])
if (util.getArrayIsSubset(header, this.tabelHeaderModel[index])) { if (util.getArrayIsSubset(header, this.tabelHeaderModel[index])) {
const reader = new FileReader() const reader = new FileReader()
reader.readAsDataURL(file) reader.readAsDataURL(file)
...@@ -222,17 +228,22 @@ export default { ...@@ -222,17 +228,22 @@ export default {
const imgFile = event.target.result const imgFile = event.target.result
const arrBase64 = imgFile.split(',') const arrBase64 = imgFile.split(',')
const fileInfo = file.name.split('.')[1] + '@' + arrBase64[1] const fileInfo = file.name.split('.')[1] + '@' + arrBase64[1]
this.$apis.common.pictureUpload({ file: fileInfo }).then(res => { uploadItem.fileInfo = fileInfo
uploadItem.fileUrl = res uploadItem.size = size
uploadItem.size = size uploadItem.fileName = file.name
uploadItem.fileName = file.name this.loading = false
this.$refs.file.value = '' // this.$apis.common.pictureUpload({ file: fileInfo }).then(res => {
}) // uploadItem.fileUrl = res
// uploadItem.size = size
// uploadItem.fileName = file.name
// this.$refs.file.value = ''
// this.loading = false
// })
} }
} else { } else {
uploadItem.fileName = file.name uploadItem.fileName = file.name
this.loading = false
} }
// // 转码base64
}, },
// uploadFile(e, uploadItem, index) { // uploadFile(e, uploadItem, index) {
// const file = e.srcElement.files[0] // const file = e.srcElement.files[0]
...@@ -327,12 +338,12 @@ export default { ...@@ -327,12 +338,12 @@ export default {
.upload-item { .upload-item {
display: flex; display: flex;
margin-top: 30px; margin-top: 30px;
font-size: 14px;
.upload-label { .upload-label {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
min-width: 100px;
text-align: right; text-align: right;
label { label {
color: #eb4e4e; color: #eb4e4e;
......
<template> <template>
<div class="import-main"> <div class="import-main">
<div class="upload-process"> <div class="upload-process">
<div class="upload-process-item" v-for="item in process" :key="item"> <div class="upload-process-item" v-for="(item, index) in process" :key="item">
<div class="process-item-label"> <div class="process-item-label">
<label>*</label> <label>*</label>
{{ item.templateName }}: {{ item.templateName }}:
...@@ -14,11 +14,14 @@ ...@@ -14,11 +14,14 @@
<div class="process-item-name">{{ item.fileName }}</div> <div class="process-item-name">{{ item.fileName }}</div>
<div class="process-item-num"> <div class="process-item-num">
<el-progress :show-text="false" :stroke-width="6" :percentage="item.percentage" :color="item.percentage != 100 ? '#5850FF' : '#2CCA74'"></el-progress> <el-progress :show-text="false" :stroke-width="6" :percentage="item.percentage" :color="item.percentage != 100 ? '#5850FF' : '#2CCA74'"></el-progress>
<div class="process-num-status" v-if="item.percentage > 0">上传中</div> <div class="process-num-status" v-if="item.percentage > 0 && item.percentage < 100">上传中</div>
<div class="process-num-status process-refresh" v-if="item.percentage == 0"> <div class="process-num-status process-refresh" v-if="item.percentage == 0 && !dialogVisible" @click="refresh(index)">
重试 重试
<i class="el-icon-refresh-right"></i> <i class="el-icon-refresh-right"></i>
</div> </div>
<div class="process-num-status process-refresh" v-if="item.percentage == 0 && dialogVisible">
等待上传
</div>
<div class="process-num-status" v-if="item.percentage == 100"><i class="el-icon-success"></i></div> <div class="process-num-status" v-if="item.percentage == 100"><i class="el-icon-success"></i></div>
</div> </div>
</div> </div>
...@@ -34,7 +37,7 @@ ...@@ -34,7 +37,7 @@
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false"> <el-button size="small" @click="handleCancel">
取 消 取 消
</el-button> </el-button>
<el-button size="small" type="primary" @click="handleSure">确 定</el-button> <el-button size="small" type="primary" @click="handleSure">确 定</el-button>
...@@ -44,29 +47,43 @@ ...@@ -44,29 +47,43 @@
</template> </template>
<script> <script>
import { utils } from 'glsx-common'
export default { export default {
name: 'step-second', name: 'step-second',
props: {}, props: {},
data() { data() {
return { return {
resultNum: 0,
dialogVisible: false, dialogVisible: false,
setInter: null, setInter: [],
process: [{ percentage: 0 }, { percentage: 0 }, { percentage: 0 }], process: [{ percentage: 0 }, { percentage: 0 }, { percentage: 0 }],
uploadItem: '' uploadItem: ''
} }
}, },
mounted() {}, mounted() {},
beforeDestroy() { beforeDestroy() {
clearInterval(this.setInter) this.resultNum = 0
this.setInter.forEach(item => {
clearInterval(this.setInter)
})
}, },
methods: { methods: {
handleSure() { handleSure: utils.debounce(function() {
this.datacubeUpload() this.fileUpload()
this.dialogVisible = false
}, 300),
handleCancel() {
this.$emit('excelCancel')
this.dialogVisible = false this.dialogVisible = false
}, },
startUpload(item, info) { handleClose() {
this.handleCancel()
},
startUpload(info) {
this.uploadItem = info this.uploadItem = info
this.process = item.map(p => { const fileList = info.fileList
this.process = fileList.map(p => {
return { return {
percentage: 0, percentage: 0,
fileName: p.fileName, fileName: p.fileName,
...@@ -74,39 +91,112 @@ export default { ...@@ -74,39 +91,112 @@ export default {
size: p.size.toFixed(2) size: p.size.toFixed(2)
} }
}) })
console.log(info)
this.dialogVisible = true this.dialogVisible = true
}, },
async refresh(index) {
this.process[index].percentage = 100
this.setInter[index] = setInterval(this.addProcess(index), 300)
try {
this.uploadItem.fileList[index].fileUrl = await this.$apis.common.pictureUpload({ file: this.uploadItem.fileList[index].fileInfo })
this.resultNum++
this.process[index].percentage = 100
clearInterval(this.setInter[index])
if (this.resultNum == this.process.length) {
this.datacubeUpload()
}
} catch (e) {
this.process[index].percentage = 0
clearInterval(this.setInter[index])
}
},
datacubeUpload() { datacubeUpload() {
this.uploadItem.fileList = this.uploadItem.fileList.filter(item => item.fileUrl) const fileList = this.uploadItem.fileList.map(item => {
this.uploadItem.createdStaffId = this.$globalState.session.id return {
this.$apis.square.datacubeUpload(this.uploadItem).then(res => { templateName: item.templateName,
fileName: item.fileName,
fileUrl: item.fileUrl,
templateUrl: item.templateUrl,
BusinessTypeId: item.BusinessTypeId,
businessTypeName: item.businessTypeName
}
})
let params = { fileList, createdStaffId: this.$globalState.session.id }
this.$apis.square.datacubeUpload(params).then(res => {
if (res) { if (res) {
const result = res.failFile this.$emit('handleSuccess')
this.process.forEach(p => {
p.percentage = Math.random() * 30
})
this.setInter = setInterval(this.addProcess, 1000)
let resultNum = 0
result.forEach((item, index) => {
if (item.uploadSuccess == 0) {
this.process[index].percentage = 100
resultNum++
} else {
this.process[index].percentage = 0
}
if (resultNum == result.length) {
this.$emit('handleSuccess')
}
})
} }
clearInterval(this.setInter)
}) })
}, },
addProcess() { fileUpload() {
this.process.forEach(p => { this.process.forEach(p => {
p.percentage = p.percentage > 90 ? p.percentage : p.percentage + Math.random() * 5 p.percentage = Math.random() * 30
}) })
this.resultNum = 0
this.uploadItem.fileList.forEach(async (item, index) => {
this.$set(this.setInter, index, setInterval(this.addProcess(index), 300))
try {
this.uploadItem.fileList[index].fileUrl = await this.$apis.common.pictureUpload({ file: item.fileInfo })
this.process[index].percentage = 100
this.resultNum++
clearInterval(this.setInter[index])
if (this.resultNum == this.process.length) {
this.datacubeUpload()
}
} catch (e) {
this.process[index].percentage = 0
clearInterval(this.setInter[index])
}
// setTimeout(() => {
// clearInterval(this.setInter)
// this.$emit('handleSuccess')
// }, 1000)
// }
// this.$apis.common
// .pictureUpload({ file: item.fileInfo })
// .then(res => {
// resultNum++
// item.fileUrl = res
// this.process[index].percentage = 100
// })
// .catch(() => {
// this.process[index].percentage = 0
// })
})
// this.uploadItem.fileList = this.uploadItem.fileList.filter(item => item.fileUrl)
// this.uploadItem.createdStaffId = this.$globalState.session.id
// this.$apis.square
// .datacubeUpload(this.uploadItem)
// .then(res => {
// if (res) {
// const result = res.failFile
// let resultNum = 0
// result.forEach((item, index) => {
// if (item.uploadSuccess == 0) {
// this.process[index].percentage = 100
// resultNum++
// } else {
// this.process[index].percentage = 0
// }
// })
// if (resultNum == result.length) {
// setTimeout(() => {
// clearInterval(this.setInter)
// this.$emit('handleSuccess')
// }, 1000)
// }
// }
// })
// .catch(() => {
// this.process.forEach(p => {
// p.percentage = 0
// })
// })
},
addProcess(index) {
this.process[index].percentage = this.process[index].percentage > 90 ? this.process[index].percentage : this.process[index].percentage + Math.random() * 5
} }
} }
} }
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<div class="upload-list"> <div class="upload-list">
<!-- <component :is="stepName"></component> --> <!-- <component :is="stepName"></component> -->
<step-first v-show="stepName == 'stepFirst'" ref="firstForm"></step-first> <step-first v-show="stepName == 'stepFirst'" ref="firstForm"></step-first>
<step-second v-show="stepName == 'stepSecond'" ref="secondForm" @handleSuccess="handleSuccess"></step-second> <step-second v-show="stepName == 'stepSecond'" ref="secondForm" @handleSuccess="handleSuccess" @excelCancel="excelCancel"></step-second>
<step-third v-show="stepName == 'stepThird'" ref="thirdForm"></step-third> <step-third v-show="stepName == 'stepThird'" ref="thirdForm"></step-third>
</div> </div>
</div> </div>
...@@ -136,6 +136,9 @@ export default { ...@@ -136,6 +136,9 @@ export default {
handleSuccess() { handleSuccess() {
this.activeIndex = 3 this.activeIndex = 3
}, },
excelCancel() {
this.activeIndex = 1
},
changeItem(e) { changeItem(e) {
this.active = e + 1 this.active = e + 1
}, },
...@@ -148,11 +151,11 @@ export default { ...@@ -148,11 +151,11 @@ export default {
this.$refs.carousel.handleMouseEnter = () => {} this.$refs.carousel.handleMouseEnter = () => {}
}, },
handleNext() { handleNext() {
const uploadInfo = this.$refs.firstForm.getUploadInfo() let uploadInfo = this.$refs.firstForm.getUploadInfo()
uploadInfo.fileList = uploadInfo.fileList.filter(item => item.fileInfo)
if (uploadInfo) { if (uploadInfo) {
this.activeIndex++ this.activeIndex++
const fileList = uploadInfo.fileList.filter(item => item.fileUrl) this.$refs.secondForm.startUpload(uploadInfo)
this.$refs.secondForm.startUpload(fileList, uploadInfo)
} }
}, },
changeInput(e) { changeInput(e) {
...@@ -288,7 +291,6 @@ export default { ...@@ -288,7 +291,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.squre-title { .squre-title {
margin-top: 20px;
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
...@@ -413,6 +415,7 @@ export default { ...@@ -413,6 +415,7 @@ export default {
.squre-safe-panel { .squre-safe-panel {
padding: 40px; padding: 40px;
margin-top: 20px; margin-top: 20px;
// margin-bottom: 60px;
/deep/ { /deep/ {
.el-carousel__indicators, .el-carousel__indicators,
.el-carousel__arrow { .el-carousel__arrow {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="square-num-count"> <div class="square-num-count">
<span class="detail-content"> <span class="detail-content">
{{ countAll.magicCount | overThousandFilter }} {{ countAll.magicCount | overThousandFilter }}
<GLButton @click="jumpDetail(0)" class="detail-btn" fn="客户明细" mode="label"></GLButton> <div @click="jumpDetail(0)" class="detail-btn" fn="客户明细" mode="label"></div>
</span> </span>
</div> </div>
</div> </div>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div class="square-num-count"> <div class="square-num-count">
<span class="detail-content"> <span class="detail-content">
{{ countAll.qyCount | overThousandFilter }} {{ countAll.qyCount | overThousandFilter }}
<GLButton @click="jumpDetail(1)" class="detail-btn" fn="客户明细" mode="label"></GLButton> <div @click="jumpDetail(1)" class="detail-btn" fn="客户明细" mode="label"></div>
</span> </span>
</div> </div>
</div> </div>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<span class="detail-content"> <span class="detail-content">
{{ countAll.unQyCount | overThousandFilter }} {{ countAll.unQyCount | overThousandFilter }}
<label>人</label> <label>人</label>
<GLButton @click="jumpDetailGroup" class="detail-btn" fn="客户明细" mode="label"></GLButton> <div @click="jumpDetailGroup" class="detail-btn" fn="客户明细" mode="label"></div>
</span> </span>
</div> </div>
</div> </div>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<i class="el-icon-warning-outline"></i> <i class="el-icon-warning-outline"></i>
数据已处理: 表示所导出的数据已进入系统。由于每个系统标签的统计规则不同,具体更新时间有所差异。 数据已处理: 表示所导出的数据已进入系统。由于每个系统标签的统计规则不同,具体更新时间有所差异。
</div> </div>
<GLButton plain size="small" @click="handleImport" fn="魔方导入"> <GLButton plain size="small" @click="handleImport" fn="导入数据">
导入数据 导入数据
</GLButton> </GLButton>
</div> </div>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</div> </div>
</div> </div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<a type="text" :href="scope.scope" v-if="scope.scope.state">异常数据</a> <a type="text" :href="scope.scope.failDataUrl" v-if="scope.scope.state == 1 && scope.scope.failDataUrl">异常数据</a>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -172,12 +172,13 @@ export default { ...@@ -172,12 +172,13 @@ export default {
return time.getTime() > Date.now() return time.getTime() > Date.now()
} }
}, },
crowdId: '',
createTime: '', createTime: '',
countAll: {}, countAll: {},
dialogVisible: false, dialogVisible: false,
tableSearchForm: { tableSearchForm: {
createTime: '', createTime: '',
state: '' state: null
}, },
searchFormData: [ searchFormData: [
{ {
...@@ -308,7 +309,7 @@ export default { ...@@ -308,7 +309,7 @@ export default {
this.$history.push(url) this.$history.push(url)
}, },
jumpDetailGroup() { jumpDetailGroup() {
this.$history.push(`/custom/clientDataOverview/group/12/1`) this.$history.push(`/custom/clientDataOverview/group/${this.crowdId}/1`)
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -325,17 +326,43 @@ export default { ...@@ -325,17 +326,43 @@ export default {
this.dialogVisible = true this.dialogVisible = true
} }
}) })
},
datacubeNotice() {
this.$apis.square.datacubeNotice({}).then(res => {
if (res && res.length) {
for (let k of res) {
setTimeout(() => {
this.$notify({
title: '数据魔方已处理完成',
message: '批次' + k,
type: 'success',
duration: 2000
})
}, 100)
}
}
})
},
queryCrowdTree() {
const params = {
req: {
pageSize: 1000,
pageNum: 1,
merchantId: this.$globalState.session.merchantId,
crowdType: 1
}
}
this.$apis.square.queryCrowdTree(params).then(res => {
const crowdUnitList = res.crowdUnitList.find(item => item.crowdName == '已加企微,待匹配客户')
this.crowdId = crowdUnitList.crowdId
})
} }
}, },
mounted() { mounted() {
this.$notify({
title: '数据魔方已处理完成',
message: '批次 202201005',
type: 'success',
duration: 5000
})
this.importsCount() this.importsCount()
this.findLogin() this.findLogin()
this.datacubeNotice()
this.queryCrowdTree()
}, },
beforeDestroy() { beforeDestroy() {
this.$notify.closeAll() this.$notify.closeAll()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!