Commit cf321fac by 李伟康

添加SOP

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