Commit a8248294 by 李伟康

提交

1 parent b097374e
......@@ -15,7 +15,7 @@
"autoprefixer": "^8.0.0",
"core-js": "^3.6.4",
"dayjs": "^1.10.5",
"glsx-common": "^1.4.9",
"glsx-common": "^2.1.0",
"lib-flexible": "^0.3.2",
"postcss-loader": "^6.2.0",
"sha1": "^1.1.1",
......
const url = '/rop-scrm-entmicro/router'
export default {
/**客户列表 */
getCustomerList (data = {}) {
data.method = 'entmicro.api.qywechat.tagging.customer.list'
return window.$HTTP({
url,
data
})
},
}
\ No newline at end of file
......@@ -10,9 +10,12 @@ import ssoApi from './ssoApi'
import wwbenchApi from './wwbenchApi'
import wxConfig from './wxConfig'
import marketingApi from './marketingApi'
import entmicroApi from './entmicroApi'
export {
ssoApi,
wwbenchApi,
wxConfig,
marketingApi
marketingApi,
entmicroApi
}
\ No newline at end of file
......@@ -10,6 +10,10 @@ body .app {
height: 100%;
// overflow: hidden;
--themeColor: #3975C6;
/* 兼容 IOS<11.2 先constant再env */
--constantSafeAreaInsetBottom: constant(safe-area-inset-bottom);
/* 兼容 IOS>11.2 */
--envSafeAreaInsetBottom: env(safe-area-inset-bottom);
}
img {
......
.sprite-icon { background-image: url(../images/sprite.png);background-size: 311px 116px;}
.sprite-icon { background-image: url(../images/sprite.png);background-size: 311px 137px;}
.icon-arrow { width: 7px; height: 11px; background-position: 0px -126px;}
.icon-default-avatar { width: 44px; height: 44px; background-position: 0px -52px;}
.icon-down { width: 12px; height: 12px; background-position: -238px -52px;}
.icon-eye { width: 13px; height: 8px; background-position: -260px -52px;}
.icon-down { width: 12px; height: 12px; background-position: -264px -52px;}
.icon-eye { width: 13px; height: 8px; background-position: -286px -52px;}
.icon-file { width: 26px; height: 26px; background-position: -138px -52px;}
.icon-filter { width: 16px; height: 16px; background-position: -238px -52px;}
.icon-index-tips { width: 23px; height: 23px; background-position: -174px -52px;}
.icon-link { width: 32px; height: 32px; background-position: -96px -52px;}
.icon-pdf { width: 32px; height: 34px; background-position: -54px -52px;}
......

2.21 KB | W: | H:

1.7 KB | W: | H:

src/assets/images/icon/home-active.png
src/assets/images/icon/home-active.png
src/assets/images/icon/home-active.png
src/assets/images/icon/home-active.png
  • 2-up
  • Swipe
  • Onion skin

1.02 KB | W: | H:

1.69 KB | W: | H:

src/assets/images/icon/home.png
src/assets/images/icon/home.png
src/assets/images/icon/home.png
src/assets/images/icon/home.png
  • 2-up
  • Swipe
  • Onion skin

2.29 KB | W: | H:

1.89 KB | W: | H:

src/assets/images/icon/workbench-active.png
src/assets/images/icon/workbench-active.png
src/assets/images/icon/workbench-active.png
src/assets/images/icon/workbench-active.png
  • 2-up
  • Swipe
  • Onion skin

1.58 KB | W: | H:

1.88 KB | W: | H:

src/assets/images/icon/workbench.png
src/assets/images/icon/workbench.png
src/assets/images/icon/workbench.png
src/assets/images/icon/workbench.png
  • 2-up
  • Swipe
  • Onion skin

10.3 KB | W: | H:

12.3 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>
<form :class="['search-box','flex',{'max':!showDropdown}]" action="">
<form
:class="['search-box','flex',{'max':!showDropdown}]"
action=""
>
<van-search
v-model="searchValue"
:placeholder="placeholder"
......@@ -20,7 +23,10 @@
</div>
</van-dropdown-menu>
</template>
</form >
<template v-if="custom">
<slot></slot>
</template>
</form>
</template>
<script type='text/ecmascript-6'>
......@@ -44,7 +50,8 @@ export default {
maxlength: {
type: Number,
default: 30
}
},
custom: Boolean
},
data () {
return {
......@@ -58,8 +65,8 @@ export default {
searchValue: ''
}
},
mounted(){
console.log('searchValue',this.searchValue)
mounted () {
console.log('searchValue', this.searchValue)
},
watch: {
'updata' (n) {
......
......@@ -13,14 +13,10 @@
:to="`/${i.name}`"
:name="i.name"
>
{{i.title}}
<template #icon="props">
<img :src="props.active ? i.active : i.inactive" />
</template>
<div
class="line y-center"
v-if="index < data.length - 1"
></div>
<div class="text">{{i.title}}</div>
</van-tabbar-item>
</template>
</van-tabbar>
......@@ -57,26 +53,26 @@ export default {
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang='scss'>
.van-tabbar {
background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.04);
background: #fff;
// box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.04);
overflow: hidden;
z-index: 3;
.van-tabbar-item--active {
color: var(--themeColor);
}
border-radius: 16px 16px 0 0;
.van-tabbar-item {
font-size: 16px;
font-size: 12px;
position: relative;
.line {
width: 1px;
height: 34px;
background: #e9e9e9;
right: 0;
color: #B1B1B3;
.text{
line-height: 17px;
}
}
.van-tabbar-item--active {
color: var(--themeColor);
}
.van-tabbar-item__icon img {
width: 20px;
height: 20px;
width: 24px;
height: 25px;
}
}
</style>
<template>
<van-popup
v-model="show"
position="bottom"
class="tags-popup"
round
@close="close"
>
<div class="tab-box">
<template v-for="(i,index) in tagGroup">
<div
:key="index"
:class="['tab-item',{'active':status == i.value}]"
@click="changeType(i.value)"
>
{{ i.text }}
</div>
</template>
</div>
<van-search
v-model="keyword"
shape="round"
placeholder="输入关键词搜索"
/>
<div class="tags-view">
<template v-for="(i,index) in 10">
<div
:key="index"
class="tags-box"
>
<div class="tags-title">嘿嘿</div>
<div class="tags-list">
<template v-for="(k,ind) in 10">
<div
:class="['tags-item text-center',{'active':ind == 0}]"
:key="ind"
>
哈哈{{ k }}
</div>
</template>
</div>
</div>
</template>
</div>
<div class="tags-buttons flex">
<van-button
block
round
class="tags-btn cancel"
@click="confirmDate"
>取消</van-button>
<van-button
block
round
color="#3975C6"
class="tags-btn"
@click="confirmDate"
>查询</van-button>
</div>
</van-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'TagsPopup',
props: {
value: Boolean
},
data () {
return {
show: false,
status: '1',
keyword:'',
tagGroup: [
{
value: '1',
text: '群组标签'
},
{
value: '2',
text: '自店标签'
},
{
value: '3',
text: '系统标签'
}
]
}
},
watch: {
value (n) {
this.show = n
}
},
mounted () {
},
methods: {
changeType(e){
const {keyword} = this
if(keyword) return this.showToast('切换标签类型将重置查询条件')
this.status = e
},
close () {
this.$emit('update:value', false)
},
confirmDate () {
let { dateValue } = this
this.$emit('confirm', dateValue)
this.close()
}
}
}
</script>
<style scoped lang='scss'>
.tags-popup {
max-height: 95%;
.van-search {
padding: 8px 16px;
.van-cell {
padding: 6px 8px 6px 0;
}
}
.tab-box {
height: 56px;
background: #ffffff;
width: 100%;
display: flex;
align-items: center;
box-sizing: border-box;
margin-bottom: 6px;
.tab-item {
font-size: 14px;
color: #a9a9a9;
flex: 1;
text-align: center;
line-height: 56px;
}
.active {
font-weight: 500;
font-size: 16px;
color: #2c2c2c;
position: relative;
transition: all 0.25s;
&::after {
position: absolute;
left: 50%;
bottom: 0;
width: 40px;
height: 3px;
background: #3975c6;
content: '';
transform: translateX(-50%);
}
}
}
.tags-view {
height: 240px;
overflow-y: scroll;
padding: 8px 20px 25px;
box-sizing: border-box;
.tags-title {
font-weight: 500;
font-size: 14px;
color: #545454;
padding: 2px 0 10px;
}
.tags-box {
.tags-list {
display: flex;
flex-wrap: wrap;
.tags-item {
height: 28px;
background: #aaaaaa26;
border-radius: 14px;
padding: 0 10px;
color: #858585;
margin: 0 8px 8px 0;
}
.active {
color: #3975c6;
background: #3975c626;
}
}
}
}
.tags-buttons {
width: 100%;
padding: 10px 44px calc(var(--constantSafeAreaInsetBottom) + 10px);
padding: 10px 44px calc(var(--envSafeAreaInsetBottom) + 10px);
justify-content: space-between;
box-sizing: border-box;
box-shadow: 0 -0.5px 0 0 #E9E9E9;
.tags-btn {
width: 140px;
height: 36px;
background: #3975c6;
border-radius: 21px;
font-size: 14px;
}
.cancel{
color: #323233;
background: #FFFFFF;
}
}
}
</style>
\ No newline at end of file
......@@ -10,13 +10,13 @@
let config = require('./conf.js')
let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) {
if (isEnv) {
let { request } = config
Object.assign(request, { timeout })
return Promise.resolve(config)
}
// /**测试mock */ return window.fetch('https://oss-config.dev.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config', {}).then(res => res.json())
/**生产 */ return window.fetch('https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config', {}).then(res => res.json())
// if (isEnv) {
// let { request } = config
// Object.assign(request, { timeout })
// return Promise.resolve(config)
// }
let url = 'https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=wx-work-main'
return window.fetch(url, {}).then(res => res.json())
}
export const cfg = {
install (vue, config) {
......
......@@ -2,7 +2,7 @@ import { Notify, Dialog } from 'vant'
import { wwbenchApi, ssoApi, sopApi } from '@/api'
const { subsystemInfo, text } = window.$fetchConfig
export default {
data() {
data () {
return {
statusEnum: {
0: '去处理',
......@@ -27,10 +27,10 @@ export default {
taskType: '',
status: '',
statusOption: [
{ text: '待处理', value: '0' },
{ text: '处理中', value: '1' },
{ text: '已处理', value: '2' },
{ text: '全部', value: '' },
{ text: '待处理', value: 0 },
{ text: '处理中', value: 1 },
{ text: '已处理', value: 2 }
],
taskTypeOption: [
{ text: '全部', value: '' },
......@@ -67,11 +67,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) {
......@@ -85,7 +85,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
......@@ -94,7 +94,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))
......@@ -108,7 +108,7 @@ export default {
endDate
})
},
onConfirmCalendar(e) {
onConfirmCalendar (e) {
let { dateRangeFormat } = this
let [start, end] = e
let startDate = start.format(dateRangeFormat)
......@@ -121,7 +121,7 @@ export default {
endDate
})
},
changeType(e, target) {
changeType (e, target) {
let { dateRange } = this
let [startDate, endDate] = dateRange.split('-')
this[target] = e
......@@ -131,7 +131,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`
......@@ -153,7 +153,7 @@ export default {
this.tasksFlag = true
})
},
changeAccount(id) {
changeAccount (id) {
console.log(id)
let { accountList } = this
try {
......@@ -179,7 +179,7 @@ export default {
})
}
},
click(e) {
click (e) {
let { status, id, taskType } = e
if (status == 2 && (taskType != 6 || taskType != 8)) return
if (taskType == 6 || taskType == 8 || taskType == 9) {
......@@ -199,7 +199,7 @@ export default {
})
}
},
jump(e) {
jump (e) {
let { taskId, taskType } = e
let sessionId = this.getSessionId()
let { corpId } = this.getLocalStorage('dj_scrm_corpId')
......@@ -213,12 +213,12 @@ export default {
}[taskType]
let { path } =
subsystemInfo[
{
5: 'customer',
6: 'sop',
8: 'clew',
9: 'customer'
}[taskType]
{
5: 'customer',
6: 'sop',
8: 'clew',
9: 'customer'
}[taskType]
]
if (link) {
if (!['prod', 'production'].includes(process.env.NODE_ENV)) path = '/dj-scrm-wx-work-main-lwk/#/'
......
......@@ -42,6 +42,14 @@ const pages = [
keepAlive: true,
backgroundColor: '#F7F7F7'
},
},
{
name: 'customer',
meta: {
isTab: true,
keepAlive: true,
backgroundColor: '#F7F7F7'
},
}
]
const keepAlives = []
......
......@@ -71,6 +71,8 @@ const actions = {
let [redirectUrl] = window.location.href.split('?')
const code = getParams('code')
if (code) {
console.log(code)
return
const { corpId, agentId } = util.getLocalStorage('dj_scrm_corpId')
ssoApi
.login({
......@@ -79,6 +81,7 @@ const actions = {
getUserInfoFlag: agentId ? true : false
})
.then(({ code, data }) => {
return
let url = `${redirectUrl.split('#')[0]}#/`
let route = state.lastPath == 'home' ? '' : state.lastPath
if (code == '0') {
......@@ -223,10 +226,10 @@ const getParams = name => {
return name ? obj[name] : obj
}
const removeStoreage = () => {
util.removeLocalStorage('dj_scrm_userInfo')
util.removeLocalStorage('dj_scrm_accountList')
util.removeLocalStorage('dj_scrm_loginToken')
util.clearSessionId()
// util.removeLocalStorage('dj_scrm_userInfo')
// util.removeLocalStorage('dj_scrm_accountList')
// util.removeLocalStorage('dj_scrm_loginToken')
// util.clearSessionId()
}
export default {
state,
......
<template>
<div class="layout">
<div class="search">
<search-box
@search="search"
:keyword="keyword"
:showDropdown="false"
placeholder="输入关键字搜索"
@focus="focus"
custom
>
<div
class="filter text-center"
@click="showTagsPopup = true"
>
<div class="sprite-icon icon-filter"></div>
</div>
</search-box>
</div>
<div class="customer-box">
<template v-for="(i,index) in 10">
<div
:key="index"
class="item"
@click="jump"
>
<div class="sprite-icon icon-arrow"></div>
<div class="info">
<div class="head">
<img src="">
</div>
<div class="text">
<div class="name">奥迪-张女士</div>
18888888888
</div>
</div>
<div class="tags flex">
<template v-for="(c,ind) in 10">
<template v-if="ind < 3">
<div
:key="ind"
class="tag text-center"
>
嘻嘻
</div>
</template>
</template>
</div>
</div>
</template>
</div>
<tags-popup :value.sync="showTagsPopup"></tags-popup>
</div>
</template>
<script type='text/ecmascript-6'>
import { entmicroApi } from '@/api'
export default {
name: '',
data () {
return {
showTagsPopup: false,
keyword: ''
}
},
mounted () {
this.getCustomerList()
},
methods: {
search () {
},
focus () {
},
async getCustomerList () {
const res = await entmicroApi.getCustomerList({ keyWord: '', isMiniPro: true })
console.log(res)
},
jump () {
let id = 'wm_pmOEQAAN8pOfzzqZBO5ADHxOo9-cQ'
window.location.href = `/dj-scrm-wx-work-main-lwk/#/customer/detail?id=${id}`
}
}
}
</script>
<style scoped lang='scss'>
.search {
position: sticky;
top: 0;
z-index: 2;
.filter {
// width: 39px;
padding: 0 17px 0 6px;
height: 100%;
}
}
.customer-box {
height: calc(100vh - 100px - var(--constantSafeAreaInsetBottom));
height: calc(100vh - 100px - var(--envSafeAreaInsetBottom));
overflow-y: scroll;
box-sizing: border-box;
padding-bottom: 21px;
.item {
width: 343px;
height: 102px;
background: #ffffff;
border-radius: 4px;
margin: 10px auto 0;
box-sizing: border-box;
padding: 10px;
position: relative;
.icon-arrow {
position: absolute;
top: 18px;
right: 18px;
}
.info {
height: 48px;
display: flex;
.head {
width: 48px;
height: 48px;
border-radius: 22px;
overflow: hidden;
margin-right: 8px;
}
.text {
font-size: 14px;
color: #333333;
.name {
font-weight: 600;
margin: 2px 0 4px;
}
}
}
.tags {
margin-top: 10px;
overflow: hidden;
.tag {
height: 24px;
background: #eeeeee;
border-radius: 12px;
padding: 0 8px;
font-size: 12px;
color: #858585;
margin-right: 4px;
}
}
}
}
</style>
\ No newline at end of file
......@@ -34,10 +34,10 @@ export default {
active: require('@/assets/images/icon/workbench-active.png')
},
{
title: '营销素材',
name: 'psd',
inactive: require('@/assets/images/icon/psd.png'),
active: require('@/assets/images/icon/psd-active.png')
title: '客户',
name: 'customer',
inactive: require('@/assets/images/icon/customer.png'),
active: require('@/assets/images/icon/customer-active.png')
}
],
showWindow: false
......
......@@ -60,28 +60,17 @@
<div class="title flex">
我的任务
<span>({{ tasksList.length }})</span>
</div>
<div class="drop-down-box flex">
<div
class="time"
class="item flex left time"
@click="showCalendar = true"
>
{{ dateRange }}
<van-icon name="arrow-down" />
</div>
</div>
<div class="drop-down-box flex">
<div class="item flex left">
<div class="label">状态</div>
<van-dropdown-menu active-color="#3975C6">
<van-dropdown-item
v-model="status"
:options="statusOption"
@change="changeType($event, 'status')"
data-target="status"
/>
</van-dropdown-menu>
</div>
<div class="item flex">
<div class="label">类型</div>
<div class="label">类型:</div>
<van-dropdown-menu active-color="#3975C6">
<van-dropdown-item
v-model="taskType"
......@@ -91,6 +80,18 @@
</van-dropdown-menu>
</div>
</div>
<div class="tab-box">
<template v-for="(i,index) in statusOption">
<div
:key="index"
:class="['tab-item',{'active':status == i.value}]"
@click="changeType(i.value, 'status')"
data-target="status"
>
{{ i.text }}
</div>
</template>
</div>
</div>
<div class="task-list">
<template v-if="tasksFlag">
......@@ -282,17 +283,11 @@ export default {
font-size: 12px;
margin-left: 4px;
}
.time {
margin-left: auto;
font-weight: normal;
color: #666666;
font-size: 12px;
}
}
.drop-down-box {
height: 40px;
height: 34px;
color: #666666;
.item {
flex: 1;
......@@ -300,9 +295,9 @@ export default {
background-color: #f7f7f7;
font-size: 14px;
color: #666666;
justify-content: center;
justify-content: flex-end;
.label {
width: 53px;
width: 42px;
flex-shrink: 0;
}
......@@ -314,6 +309,43 @@ export default {
.left {
justify-content: flex-start;
}
.time {
font-size: 12px;
}
}
.tab-box {
height: 44px;
background: #ffffff;
width: calc(100% + 32px);
margin-left: -16px;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 0 3px;
.tab-item {
font-size: 14px;
color: #a9a9a9;
flex: 1;
text-align: center;
line-height: 44px;
}
.active {
font-weight: 500;
font-size: 16px;
color: #2c2c2c;
position: relative;
transition: all .25s;
&::after {
position: absolute;
left: 50%;
bottom: 0;
width: 40px;
height: 3px;
background: #3975c6;
content: '';
transform: translateX(-50%);
}
}
}
}
......@@ -321,7 +353,7 @@ export default {
padding-bottom: 100px;
.item {
margin-bottom: 16px;
margin-top: 16px;
background: #ffffff;
border-radius: 4px;
padding: 0 10px 15px;
......
......@@ -51,6 +51,7 @@ const spritesmithFunction = data => {
return `${shared}\n${perSprite}`
}
module.exports = {
// publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-lwk/', // 署应用包时的基本 URL。 vue-router hash 模式使用
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-lwk/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: '/dj-scrm-wx-work-main/', // 署应用包时的基本 URL。 vue-router history模式使用 微信开发环境需打开
outputDir: 'dist', // 生产环境构建文件的目录
......@@ -59,7 +60,8 @@ module.exports = {
productionSourceMap: false, // 如果不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
devServer: {
disableHostCheck: true,
port: 9527, // 端口
port: 9527, // 端口 dj-scrm-wx-work-lwk
// port: 9528, // 端口 dj-scrm-wx-work-main-lwk
open: false, // 启动后打开浏览器.
public:'http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-lwk/#/',
overlay: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!