Commit 03e05b40 by 前端

Merge branch 'develop' into 'master'

v2.1.0线索管理代码合并

See merge request !3
2 parents 48274733 eb6bcf3b
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no,viewport-fit=cover">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
......
const url = '/rop-scrm-entmicro/router'
const url = '/rop-scrm-wwbench/router'
// const url = 'http://192.168.1.78:8064/rop-scrm-entmicro/router'
export default {
/** 侧边栏-客户跟进 */
getCustomerDetail(data) {
data.method = 'entmicro.api.customer.detail'
/** 工作台-线索管理列表 */
getClueList(data) {
data.method = 'scrm.api.wwbench.clue.listByUser'
return window.$HTTP({
url,
data
data,
returnAll: true
})
},
/** 侧边栏-群客户跟进-群基本信息 */
getCustomerBaseDetail(data) {
data.method = 'entmicro.api.customer.base.detail'
/** 工作台-线索管理-详情 */
getClueDetail(data) {
data.method = 'scrm.api.wwbench.clue.updateTaskStatus'
return window.$HTTP({
url,
data
data,
returnAll: true
})
},
/** 侧边栏-群客户跟进-统计接口 */
getCustomerBaseDetailStatics(data) {
data.method = 'entmicro.api.customer.base.detail.statics'
/** 工作台-线索管理-添加跟进记录 */
addFollow(data) {
data.method = 'scrm.api.wwbench.clue.follow.insertOrUpdate'
return window.$HTTP({
url,
data
})
},
/** 侧边栏-群客户跟进-群客户列表 */
getCustomerCustList(data) {
data.method = 'entmicro.api.customer.base.cust.list'
return window.$HTTP({
url,
data
})
},
/** 侧边栏-群客户跟进-群员工列表 */
getCustomerStaffList(data) {
data.method = 'entmicro.api.customer.base.staff.list'
return window.$HTTP({
url,
data
data,
returnAll: true
})
}
}
@import './normalize.scss';
@import './sprite.scss';
*{
* {
margin: 0;
padding: 0;
}
......@@ -8,7 +8,7 @@ html,
body .app {
color: #333333;
font-family: Arial, Helvetica, 'STHeiti STXihei', 'Microsoft YaHei', Tohoma, sans-serif;
background-color: #fff;
background-color: #F7F7F7;
-webkit-overflow-scrolling: touch;
height: 100%;
// overflow: hidden;
......@@ -25,6 +25,9 @@ img {
align-items: center;
}
.center{
text-align:center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
......@@ -45,6 +48,16 @@ img {
align-items: center;
justify-content: center;
}
.text-space {
display: flex;
align-items: center;
justify-content: space-between;
}
.text-start {
display: flex;
align-items: flex-start;
justify-content: space-between;
}
.x-center {
position: absolute;
......@@ -61,47 +74,75 @@ img {
.sticky {
position: static;
}
.text-12{
.text-12 {
font-size: 12px;
font-weight: 400;
color: #FFFFFF;
}
.text-20{
.text-14 {
font-size: 14px;
font-weight: 400;
}
.text-17 {
font-size: 14px;
}
.text-20 {
font-size: 20px;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
}
.text-16 {
font-size: 16px;
}
.color-3 {
color: #333333;
}
.line-28{
.color-6 {
color: #666666;
}
.color-32 {
color: #323232;
}
.color-9 {
color: #999999;
}
.line-28 {
line-height: 28px;
}
.line-17{
.line-17 {
line-height: 17px;
}
.text-14{
font-size: 14px;
.line-22 {
line-height: 22px;
}
.line-60{
line-height: 60px;
}
.weight-6 {
font-weight: 600;
}
.weight-5 {
font-weight: 500;
}
.weight-4 {
font-weight: 400;
color: #333333;
line-height: 20px;
}
.hg{
.hg {
height: 28px;
}
.button{
.button {
width: 343px;
height: 42px;
background: #3975C6;
border-radius: 21px;
font-size: 14px;
font-weight: 500;
color: #FFFFFF;
line-height: 42px;
text-align: center;
margin:0 auto;
}
.bottom{
vertical-align:bottom;
height: 42px;
background: #3975c6;
border-radius: 21px;
font-size: 14px;
font-weight: 500;
color: #ffffff;
line-height: 42px;
text-align: center;
margin: 0 auto;
}
.bottom {
vertical-align: bottom;
}
.sprite-icon { background-image: url(../images/sprite.png);background-size: 44px 44px;}
.icon-avatar { width: 44px; height: 44px; background-position: 0px 0px;}
\ No newline at end of file
.sprite-icon { background-image: url(../images/sprite.png);background-size: 103px 49px;}
.icon-avatar { width: 44px; height: 44px; background-position: -59px 0px;}
.icon-success { width: 49px; height: 49px; background-position: 0px 0px;}
\ No newline at end of file

980 Bytes | W: | H:

3.44 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<van-empty class="custom-image" :image="empty" :description="description" />
<van-empty class="custom-image" :description="description" />
</template>
<script>
export default {
name: 'empty',
data() {
return {
empty: require('../assets/images/empty.png')
// empty: require('../assets/images/empty.png')
}
},
props: {
......@@ -22,8 +22,8 @@ export default {
padding-top: 79px;
}
.custom-image /deep/ .van-empty__image {
width: 88px;
height: 56px;
}
</style>
\ No newline at end of file
// .custom-image /deep/ .van-empty__image {
// width: 88px;
// height: 56px;
// }
</style>
<template>
<div :class="['scroll-view', ScrollViewclass]" id="van-list" >
<div :class="['scroll-view', ScrollViewclass]" id="van-list">
<van-list v-model="loading" :finished="finished" finished-text="到底啦!!" @load="onLoad" offset="100" :immediate-check="false">
<slot></slot>
</van-list>
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
export default {
name: 'ScrollView',
data() {
......@@ -17,8 +17,8 @@ export default {
},
props: ['ScrollViewclass'],
mounted() {
},
methods: {
onLoad() {
......@@ -28,12 +28,12 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.scroll-view {
overflow-y: scroll;
box-sizing: border-box;
}
.van-list {
background-color: #ffffff;
// background-color: #ffffff;
}
</style>
\ No newline at end of file
</style>
......@@ -15,7 +15,8 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout })
return Promise.resolve(config)
}
return window.fetch('https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-customer-config', {}).then(res => res.json())
// return window.fetch('https://oss-config.dev.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-clew-config', {}).then(res => res.json())
return window.fetch('https://oss-config.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-clew-config', {}).then(res => res.json())
}
export const cfg = {
install(vue, config) {
......
......@@ -5,14 +5,15 @@ const pages = {
meta: {
title: '线索管理',
backgroundColor: '#F7F7F7',
keepAlive: true
keepAlive: false
}
},
{
name: 'detail',
meta: {
title: '详情',
keepAlive: true
keepAlive: false,
backgroundColor: '#F7F7F7'
}
}
]
......
......@@ -128,7 +128,7 @@ const actions = {
}
},
navigation({ dispatch }) {
let { sessionId, corpId } = getParams()
let { sessionId, corpId, taskId } = getParams()
const storage_corpId = util.getLocalStorage('dj_scrm_corpId')
if (!corpId) corpId = storage_corpId && storage_corpId.corpId
if (corpId && storage_corpId) {
......@@ -138,6 +138,9 @@ const actions = {
}
}
util.setLocalStorage('dj_scrm_corpId', { corpId })
if (taskId) {
util.setLocalStorage('dj_scrm_taskId', { taskId })
}
const storage_sessionId = util.getSessionId()
if (sessionId || storage_sessionId) {
state.showWindow = true
......@@ -170,4 +173,4 @@ export default {
state,
mutations,
actions
}
\ No newline at end of file
}
<template>
<div>
线索详情
<div class="layoutIndex">
<tab class="tabber-wrap" :list="list" :index="tabIndex" @change="changeTab" v-if="initShow"></tab>
<template v-if="flag">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<template v-if="clewList.length > 0">
<template v-for="item in clewList">
<div class="content-item" :key="item.id" @click="gotoDetail(item)">
<div class="content-item-des text-space">
<div class="content-item-name weight-6 text-16 color-3 line-22 text-hide">{{ item.name }}</div>
<div class="content-item-phone text-12 color-9 line-17">{{ item.phone }}</div>
</div>
<div class="content-item-info">
<span class="text-12 color-9 weight-4 line-17">
线索类型
<label>{{ item.type == 1 ? '客户意见' : item.type == 2 ? '卖车询价' : item.type == 3 ? '救援服务' : item.type == 4 ? '新车询价' : item.type == 5 ? '试驾预约' : '维保预约' }}</label>
</span>
<span class="text-12 color-9 weight-4 line-17">
创建时间
<label>{{ item.createdDate }}</label>
</span>
</div>
</div>
</template>
</template>
<template v-else>
<empty description="暂无数据" />
</template>
</scroll-view>
</template>
</div>
</template>
<script type="text/ecmascript-6">
import { Notify } from 'vant'
import { clewApi } from '@/api'
export default {
name: '',
data() {
return {
flag: false,
list: ['跟进中', '已完成'],
tabIndex: 0,
clewList: [],
initShow: false,
page: {
pageNum: 1,
pageSize: 10
}
}
},
props: {
},
watch: {
},
props: {},
watch: {},
created() {
},
mounted() {
this.getClueList()
},
mounted() {},
methods: {
gotoDetail(data) {
this.$router.push({ name: 'clew.detail', query: { taskId: data.id } })
},
getClueList() {
const status = this.tabIndex === 0 ? 1 : 2
const params = {
...this.page,
status
}
const clewList = this.clewList
this.showLoading()
clewApi.getClueList({ ...params }).then(({ code, data, message }) => {
this.hideLoading()
if (code === '0') {
if (status === 1) {
this.list = [`跟进中(${data.total})`, '已完成']
this.initShow = true
}
this.flag = true
if (data.list.length > 0) {
this.clewList = [...clewList, ...data.list]
this.page.pageNum > 1 ? (this.$refs.scrollView.loading = false) : ''
} else {
this.page.pageNum > 1 ? (this.$refs.scrollView.finished = true) : ''
this.page.pageNum > 1 ? (this.$refs.scrollView.loading = false) : ''
}
} else {
Notify(message)
}
})
},
changeTab(index) {
this.flag = false
this.clewList = []
this.page.pageNum = 1
this.tabIndex = index
this.getClueList()
},
onReachBottom() {
console.log('触底')
this.page.pageNum = this.page.pageNum + 1
this.getClueList()
}
}
}
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss">
.layoutIndex {
height: 100vh;
overflow: hidden;
.content {
height: calc(100vh - 82px);
margin: 16px 15px;
box-sizing: border-box;
&-item {
width: 100%;
height: 118px;
background: #ffffff;
box-shadow: 0px 4px 8px 0px rgba(224, 224, 224, 0.5);
border-radius: 4px;
margin-bottom: 11px;
&-des {
height: 47px;
border-bottom: 1px solid rgba(195, 195, 195, 0.3);
// width:100%;
padding: 16px 16px 9px 16px;
box-sizing: border-box;
.content-item-name{
width: calc(100% - 100px);
}
}
&-info {
padding: 10px 16px 16px 16px;
box-sizing: border-box;
span {
display: block;
label {
margin-left: 20px;
}
}
}
&-info :nth-child(1) {
margin-bottom: 10px;
}
}
}
}
</style>
......@@ -4,48 +4,50 @@ const defaultSettings = require('./src/config/conf.js')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const resolve = dir => path.join(__dirname, dir)
// page title
const name = defaultSettings.title || 'vue mobile template'
// 生产环境,测试和正式
// page title
const name = defaultSettings.title || '嘀加企微助手'
// 生产环境,测试和正式
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
// externals
// const externals = {
// vue: 'Vue',
// 'vue-router': 'VueRouter',
// vuex: 'Vuex',
// vant: 'vant',
// axios: 'axios'
// }
// CDN外链,会插入到index.html中
// const cdn = {
// // 开发环境
// dev: {
// css: [],
// js: []
// },
// // 生产环境
// build: {
// css: ['https://cdn.jsdelivr.net/npm/vant@2.4.7/lib/index.css'],
// js: [
// 'https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js',
// 'https://cdn.jsdelivr.net/npm/vue-router@3.1.5/dist/vue-router.min.js',
// 'https://cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js',
// 'https://cdn.jsdelivr.net/npm/vuex@3.1.2/dist/vuex.min.js',
// 'https://cdn.jsdelivr.net/npm/vant@2.4.7/lib/index.min.js'
// ]
// }
// }
/**
* 雪碧图插件
*/
// externals
// const externals = {
// vue: 'Vue',
// 'vue-router': 'VueRouter',
// vuex: 'Vuex',
// vant: 'vant',
// axios: 'axios'
// }
// CDN外链,会插入到index.html中
// const cdn = {
// // 开发环境
// dev: {
// css: [],
// js: []
// },
// // 生产环境
// build: {
// css: ['https://cdn.jsdelivr.net/npm/vant@2.4.7/lib/index.css'],
// js: [
// 'https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js',
// 'https://cdn.jsdelivr.net/npm/vue-router@3.1.5/dist/vue-router.min.js',
// 'https://cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js',
// 'https://cdn.jsdelivr.net/npm/vuex@3.1.2/dist/vuex.min.js',
// 'https://cdn.jsdelivr.net/npm/vant@2.4.7/lib/index.min.js'
// ]
// }
// }
/**
* 雪碧图插件
*/
const SpritesmithPlugin = require('webpack-spritesmith')
const spritesmithFunction = data => {
let { spritesheet, sprites } = data
let shared = `.sprite-icon { background-image: url(${data.sprites[0].image});background-size: ${spritesheet.width / 2}px ${spritesheet.height / 2}px;}`
let perSprite = sprites.map(sprite => {
let { name, width, height, offset_x, offset_y } = sprite
return `.icon-${name} { width: ${width / 2}px; height: ${height / 2}px; background-position: ${offset_x / 2}px ${offset_y / 2}px;}`
}).join('\n')
let perSprite = sprites
.map(sprite => {
let { name, width, height, offset_x, offset_y } = sprite
return `.icon-${name} { width: ${width / 2}px; height: ${height / 2}px; background-position: ${offset_x / 2}px ${offset_y / 2}px;}`
})
.join('\n')
return `${shared}\n${perSprite}`
}
module.exports = {
......@@ -106,13 +108,16 @@ module.exports = {
image: path.resolve(__dirname, './src/assets/images/sprite.png'),
// 生成SCSS
css: [
[path.resolve(__dirname, './src/assets/css/sprite.scss'), {
format: 'function_based_template'
}]
[
path.resolve(__dirname, './src/assets/css/sprite.scss'),
{
format: 'function_based_template'
}
]
]
},
customTemplates: {
'function_based_template': spritesmithFunction,
function_based_template: spritesmithFunction
},
//background引用路径
apiOptions: {
......@@ -125,11 +130,11 @@ module.exports = {
})
]
config.plugins = [...config.plugins, ...Plugins]
// 为生产环境修改配置...
// if (IS_PROD) {
// // externals
// config.externals = externals
// }
// 为生产环境修改配置...
// if (IS_PROD) {
// // externals
// config.externals = externals
// }
},
chainWebpack: config => {
......@@ -170,26 +175,30 @@ module.exports = {
return options
})
.end()
/**
* 打包分析
*/
/**
* 打包分析
*/
if (IS_PROD) {
config.plugin('webpack-report').use(BundleAnalyzerPlugin, [{
analyzerMode: 'static'
}])
config.plugin('webpack-report').use(BundleAnalyzerPlugin, [
{
analyzerMode: 'static'
}
])
}
config
// https://webpack.js.org/configuration/devtool/#development
// https://webpack.js.org/configuration/devtool/#development
.when(!IS_PROD, config => config.devtool('cheap-source-map'))
config.when(IS_PROD, config => {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// 将 runtime 作为内联引入不单独存在
inline: /runtime\..*\.js$/
}])
.use('script-ext-html-webpack-plugin', [
{
// 将 runtime 作为内联引入不单独存在
inline: /runtime\..*\.js$/
}
])
.end()
config.optimization.splitChunks({
chunks: 'all',
......@@ -218,4 +227,4 @@ module.exports = {
config.optimization.runtimeChunk('single')
})
}
}
\ No newline at end of file
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!