Commit cf321fac by 李伟康

添加SOP

1 parent ea640074
const url = '/rop-scrm-wwbench/router'
export default {
/**统计我的待办数据 */
getTaskData(data = {}) {
getTaskData (data = {}) {
data.method = 'scrm.api.wwbench.user.task.list.count'
return window.$HTTP({
url,
......@@ -9,9 +9,9 @@ export default {
})
},
/** 查询我的待办 */
getTasksList(data = {}) {
getTasksList (data = {}) {
data.method = 'scrm.api.wwbench.user.task.list.get'
data.taskTypes = [3, 4, 5]
data.taskTypes = [3, 4, 5, 6]
return window.$HTTP({
url,
data,
......@@ -19,7 +19,7 @@ export default {
})
},
/**更新待办状态 */
updateTasks(data = {}) {
updateTasks (data = {}) {
data.method = 'scrm.api.wwbench.user.task.list.update'
return window.$HTTP({
url,
......
......@@ -37,5 +37,23 @@ module.exports = {
source: "scrm-main",
v: "1.0.0",
},
vconsole: true
vconsole: true,
text: '群发助手',
subsystemInfo: {
activity: {
path: '/dj-scrm-wx-work-attachment-activity/#/'
},
customer: {
path: '/dj-scrm-wx-work-attachment-customer/#/'
},
report: {
path: '/dj-scrm-wx-work-attachment-report/#/'
},
upload: {
path: '/dj-scrm-wx-work-file-upload/#/'
},
sop: {
path: '/dj-scrm-wx-work-sop/#/'
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ import { Notify, Dialog } from 'vant'
import { wwbenchApi, ssoApi } from '@/api'
const { subsystemInfo, text } = window.$fetchConfig
export default {
data() {
data () {
return {
statusEnum: {
0: '去处理',
......@@ -14,7 +14,8 @@ export default {
2: '直播群发任务',
3: '客户群发',
4: '客户群群发',
5: '客户资料完善'
5: '客户资料完善',
6: '营销sop-任务'
},
userInfo: {},
accountList: [],
......@@ -35,7 +36,8 @@ export default {
// { text: '直播群发任务', value: 2 },
{ text: '客户群发', value: 3 },
{ text: '客户群群发', value: 4 },
{ text: '客户资料完善', value: 5 }
{ text: '客户资料完善', value: 5 },
{ text: '营销sop', value: 6 }
],
list: [
{
......@@ -61,11 +63,11 @@ export default {
tasksFlag: false
}
},
mounted() {
mounted () {
this.init()
},
methods: {
init() {
init () {
this.userInfo = this.getLocalStorage('dj_scrm_userInfo')
let accountList = this.getLocalStorage('dj_scrm_accountList')
if (accountList) {
......@@ -79,7 +81,7 @@ export default {
this.getTaskData()
this.initDate()
},
getTaskData() {
getTaskData () {
wwbenchApi.getTaskData().then(data => {
let sum = Number(data.finishTaskCount + data.unFinishTaskCount) || 0
let num = Math.round(Number((Number(data.finishTaskCount) / sum) * 100)) || 0
......@@ -88,7 +90,7 @@ export default {
this.taskCountData = data
})
},
initDate() {
initDate () {
let { dateRangeFormat } = this
let now = new Date()
let minDate = new Date(new Date().setDate(now.getDate() - 30))
......@@ -102,7 +104,7 @@ export default {
endDate
})
},
onConfirmCalendar(e) {
onConfirmCalendar (e) {
let { dateRangeFormat } = this
let [start, end] = e
let startDate = start.format(dateRangeFormat)
......@@ -115,7 +117,7 @@ export default {
endDate
})
},
changeType(e, target) {
changeType (e, target) {
let { dateRange } = this
let [startDate, endDate] = dateRange.split('-')
this[target] = e
......@@ -125,7 +127,7 @@ export default {
endDate
})
},
getTasksList({ startDate = '', endDate = '' }) {
getTasksList ({ startDate = '', endDate = '' }) {
this.showLoading()
let { status, taskType } = this
if (startDate) startDate = `${startDate.replace(/\./g, '-')} 00:00:00`
......@@ -147,7 +149,7 @@ export default {
this.tasksFlag = true
})
},
changeAccount(id) {
changeAccount (id) {
console.log(id)
let { accountList } = this
try {
......@@ -173,7 +175,7 @@ export default {
})
}
},
click(e) {
click (e) {
let { status, taskId, id, taskType } = e
if (status == 2) return
wwbenchApi.updateTasks({ id }).then(res => {
......@@ -182,7 +184,7 @@ export default {
message: `请去企业微信“消息”列表-“${text}”中进行转发`,
theme: 'round-button',
confirmButtonText: '我知道了',
confirmButtonColor: 'var(--themeColor)'
confirmButtonColor: '#3975C6'
})
} else {
let sessionId = this.getSessionId()
......@@ -190,10 +192,14 @@ export default {
let link = {
1: 'customerDetails',
2: 'customerGroup/mass',
5: 'customer/information'
5: 'customer/information',
6: 'home'
}[taskType]
if (link) {
let { path } = subsystemInfo['customer']
let { path } = subsystemInfo[{
5: 'customer',
6: 'sop'
}[taskType]]
let url = `${path}${link}?sessionId=${sessionId}&corpId=${corpId}`
if (taskId) url = `${url}&taskId=${taskId}`
window.location.href = url
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!