Commit 531a1010 by xinla

Merge remote-tracking branch 'origin/front_end_dev_2.0' into develop

2 parents ef8e0f0a 9ae6dc39
......@@ -28,14 +28,36 @@ export function getWeCustomerInfo(data) {
}
})
}
// 获取当前系统所有可用标签
//
/**
* 获取当前系统所有可用标签
* @param {*} params
* groupTagType 是 1:企业客户标签;3:个人标签
userId 员工的id 当groupTagType为3的时候需要传该字段
* @returns
*/
export function getAllTags(params) {
return request({
url: service + '/findAllTags',
params
})
}
// 更新客户画像标签
//
/**
* 更新客户画像标签
* @param {*} data
* {
"externalUserid": "wmiGuBCgAApTcSW-3caqljFmKhm0r-bQ",//客户id
"userId": "ShengXiYong",//当前员工id
"isCompanyTag": false,//是否是企业标签true是;false:不是
"addTag": [
{
"tagId": "1471332704915922947"//标签id
}
]
}
* @returns
*/
export function updateWeCustomerPorTraitTag(data) {
return request({
url: service + '/updateWeCustomerPorTraitTag',
......@@ -58,8 +80,8 @@ export function findAddGroupNum(params) {
}
// 获取轨迹信息
/**
*
* @param {*}
*
* @param {*}
{
pageNum:
pageSize:
......@@ -67,7 +89,7 @@ trajectoryType: 轨迹类型(1:信息动态;2:社交动态;3:活动规则;4:待
userId: 员工的id
externalUserid: 客户id
}
* @returns
* @returns
*/
export function findTrajectory(params) {
return request({
......@@ -97,3 +119,39 @@ export function handleWait(params) {
method: 'delete'
})
}
/**
* 客户画像个人标签新增或更新
* @param {*} params
* {
"gourpName": "个人标签分组", //标签组名
"groupId": "1471327408994738177",//标签组id,新增的时候没有则传 null
"weTags": [
{
"groupId": "1471327408994738177",//标签组id,新增的时候没有则传 null
"name": "个人标签3",//标签名
"tagId": "1471327409208647681"//标签id,新增的时候没有则传 null
}
]
}
* @returns
*/
export function addOrUpdatePersonTags(data) {
return request({
url: service + '/addOrUpdatePersonTags/',
method: 'post',
data
})
}
/**
* 删除个人标签
* @ids {*} ids 标签id,多个用逗号隔开
* @returns
*/
export function deletePersonTag(ids) {
return request({
url: service + '/deletePersonTag/' + ids,
method: 'delete'
})
}
......@@ -72,7 +72,7 @@
<div class="userlabel">
<div class="detail">
<div>企业标签</div>
<div class="data" is-link @click="labelEdit">编辑</div>
<div class="data" is-link @click="labelEdit()">编辑</div>
</div>
<div v-if="form.tags" class="labelstyle mt10">
<div class="label" v-for="(unit, unique) in form.tags" :key="unique">
......@@ -87,7 +87,7 @@
<div class="userlabel">
<div class="detail">
<div>个人标签</div>
<div class="data" is-link @click="labelEdit">编辑</div>
<div class="data" is-link @click="labelEdit('person')">编辑</div>
</div>
<div v-if="form.tags" class="labelstyle mt10">
<div class="label" v-for="(unit, unique) in form.personTags" :key="unique">
......@@ -154,15 +154,33 @@
:key="unique"
class="label"
:style="addTag.some((e) => e.tagId == unit.tagId) ? isActive : ''"
@click="userLabel(unit)"
@click="clickLabel(unit)"
>
{{ unit.name }}
</div>
</div>
</div>
</div>
<van-button type="info" class="saveinfo" round @click="saveInfo">保存</van-button>
<div v-if="editLabelType === 'person'" class="ac" @click="showAddTag = true">
添加标签
</div>
<van-button type="info" class="saveinfo" round @click="saveCustomerTag">保存</van-button>
</van-action-sheet>
<van-dialog
v-model="showAddTag"
title="添加标签"
show-cancel-button
@confirm="submitNewPersonTag"
>
<van-field
v-model="newPersonTag"
placeholder="请输入标签(不超过15字)"
required
:rules="[{ required: true, message: '请输入标签(不超过15字)' }]"
class="conagency"
/>
</van-dialog>
<!-- 点击客户标签里的编辑触发弹出框结束 -->
<!-- 点击添加待办触发弹出框开始 -->
......@@ -248,9 +266,7 @@
</van-action-sheet> -->
<!-- 保存 -->
<div style="margin: 30px">
<van-button round block type="info" native-type="submit" @click="saveInfo2"
>保存</van-button
>
<van-button round block type="info" native-type="submit">保存</van-button>
</div>
</van-form>
</van-action-sheet>
......@@ -318,7 +334,8 @@ export default {
position: '', // 职业
remarkCorpName: '', // 公司
description: '', // 其他描述
weTagGroupList: [] // 客户标签合集
tags: [], // 企业标签合集
personTags: [] // 个人标签合集
},
alllabel: [], // 标签组
// 点击测试组标签获取的变量
......@@ -352,7 +369,10 @@ export default {
3: { name: '已成交', color: 'primary' },
4: { name: '无意向', color: 'warning' },
5: { name: '已流失', color: 'danger' }
})
}),
editLabelType: '', // 编辑标签类型
showAddTag: false,
newPersonTag: ''
}
},
watch: {
......@@ -423,7 +443,6 @@ export default {
_this.findAddGroupNum()
_this.getCustomerInfo()
_this.findTrajectory()
_this.getAllTags()
} else {
//错误处理
_this.$dialog({ message: '进入失败:' + JSON.stringify(res) })
......@@ -437,8 +456,17 @@ export default {
}
})
},
getAllTags() {
getAllTags()
getAllTags(type) {
let params = {
groupTagType: 1
}
if (type === 'person') {
params = {
groupTagType: 3,
userId: this.userId
}
}
getAllTags(params)
.then(({ data }) => {
this.alllabel = data
......@@ -453,8 +481,6 @@ export default {
console.log(err)
})
},
// 客户待办点击保存事件
saveInfo2() {},
// 添加或编辑轨迹
addOrEditWaitHandle(form) {
addOrEditWaitHandle(form)
......@@ -498,7 +524,7 @@ export default {
this.findTrajectory()
},
// 添加代办
// 表单提交
// 客户待办点击保存事件
onSubmit() {
let form = {
trajectoryType: 4,
......@@ -564,8 +590,8 @@ export default {
}
})
},
// 第一层标签
userLabel(item) {
// 点击选择标签
clickLabel(item) {
let index = this.addTag.findIndex((e) => {
return item.tagId == e.tagId
})
......@@ -581,12 +607,13 @@ export default {
this.addTag.splice(index, 1)
}
},
saveInfo() {
saveCustomerTag() {
// 更新客户画像标签 [{ groupId: this.groupId, name: this.name, tagId: this.tagId }]
updateWeCustomerPorTraitTag({
externalUserid: this.externalUserid,
userId: this.userId,
addTag: this.addTag
isCompanyTag: this.editLabelType !== 'person', //是否是企业标签true是;false:不是
addTag: this.addTag.map((e) => ({ tagId: e.tagId }))
})
.then((res) => {
// console.log(res);
......@@ -604,13 +631,17 @@ export default {
})
},
// 点击编辑按钮
labelEdit() {
let tags = this.form.tags
async labelEdit(type) {
this.editLabelType = type
await this.getAllTags(type)
this.addTag = []
let tags = this.form[type === 'person' ? 'personTags' : 'tags']
let hasErrorTag = [] // 异常活已经删除的标签
let repeat = [] // 重复的标签
tags.forEach((unit) => {
// 判断是否有重复标签
let isRepeat = this.addTag.some((d) => {
let isRepeat = this.listTagOneArray.some((d) => {
return d.tagId === unit.tagId
})
// 去重
......@@ -696,7 +727,10 @@ export default {
.catch((err) => {
console.log(err)
})
}
},
// 添加个人标签
submitNewPersonTag() {}
}
}
</script>
......
......@@ -17,7 +17,7 @@ export default {
},
computed: {
disabled() {
return this.lastSyncTime ? (+new Date() - +new Date(this.lastSyncTime)) / 3600000 < 2 : true
return this.lastSyncTime ? (+new Date() - +new Date(this.lastSyncTime)) / 3600000 < 2 : false
}
},
watch: {},
......@@ -36,18 +36,24 @@ export default {
</script>
<template>
<el-tooltip
effect="light"
:disabled="!disabled"
class="item"
content="由于企业微信开放平台的限制,两小时内不得重复同步操作"
placement="top-start"
>
<el-tag v-if="disabled" type="info" size="default"><slot></slot></el-tag>
<div class="button-sync">
<el-tooltip
v-if="disabled"
effect="light"
class="item"
content="由于企业微信开放平台的限制,两小时内不得重复同步操作"
placement="top-start"
>
<el-tag type="info" size="default"><slot></slot></el-tag>
</el-tooltip>
<el-button v-else v-preventReClick type="primary" @click="sync">
<slot></slot>
</el-button>
</el-tooltip>
</div>
</template>
<style lang="less" scoped></style>
<style lang="scss" scoped>
.button-sync {
display: inline-block;
}
</style>
......@@ -168,14 +168,14 @@
// console.log(data, checked, indeterminate);
this.userList = this.unique(this.userList)
},
unique(arr){
for(var i=0; i<arr.length; i++){
for(var j=i+1; j<arr.length; j++){
if(arr[i].userId.split('_')[0] == arr[j].userId.split('_')[0]){
arr.splice(j,1);
j--;
}
unique (arr) {
for (var i = 0; i < arr.length; i++) {
for (var j = i + 1; j < arr.length; j++) {
if (arr[i].userId.split('_')[0] == arr[j].userId.split('_')[0]) {
arr.splice(j, 1);
j--;
}
}
}
return arr;
},
......@@ -200,7 +200,7 @@
<el-row :gutter="20">
<el-col :span="12" :xs="24">
<div class="head-container">
<el-tree node-key="userId" ref="tree" lazy accordion show-checkbox :check-on-click-node="false" :expand-on-click-node="true" :default-checked-keys="defaultCheckedKeys" :load="loadNode" :props="defaultProps" :check-strictly="!isOnlyLeaf" @check-change="handleCheckChange"></el-tree>
<el-tree node-key="userId" ref="tree" lazy accordion show-checkbox :check-on-click-node="false" :expand-on-click-node="true" :default-checked-keys="defaultCheckedKeys" :load="loadNode" :props="defaultProps" :check-strictly="isOnlyLeaf" @check-change="handleCheckChange"></el-tree>
</div>
</el-col>
<el-col :span="12" :xs="24" class="user-list">
......
......@@ -280,7 +280,7 @@
showMore () {
let exit = true
if (this.isSingle) {
if (this.form.materialMsgList.length === 3) {
if (this.form.materialMsgList.length === 1) {
exit = false
}
}
......@@ -316,12 +316,12 @@
if (val) {
const textIndex = $textarea.selectionStart
if (textIndex == 0 && document.activeElement != $textarea) {
this.form.welcomeMsg += '#客户昵称#'
this.form.welcomeMsg += '%客户昵称%'
} else {
this.form.welcomeMsg = msg.slice(0, textIndex) + '#客户昵称#' + msg.slice(textIndex)
this.form.welcomeMsg = msg.slice(0, textIndex) + '%客户昵称%' + msg.slice(textIndex)
}
} else {
this.form.welcomeMsg = msg.replace(/\#客户昵称\#/, '')
this.form.welcomeMsg = msg.replace(/\%客户昵称\%/, '')
}
},
onChooseMaterial (materialType, rowIndex) {
......
import { parseTime } from './common'
/**
* 表格时间格式化
*/
export function formatDate(cellValue) {
if (cellValue == null || cellValue == '') return ''
var date = new Date(cellValue)
var year = date.getFullYear()
var month =
date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var minutes =
date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var seconds =
date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return (
year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
)
// 日期时间格式化
export function dateFormat(dateString, fmt = 'yyyy-MM-dd hh:mm:ss') {
if (!dateString) {
return
}
var date = new Date(dateString.replace(/-/g, '/'))
var o = {
'M+': date.getMonth() + 1, //月份
'd+': date.getDate(), //日
'h+': date.getHours(), //小时
'm+': date.getMinutes(), //分
's+': date.getSeconds(), //秒
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
'S+': date.getMilliseconds(), //毫秒
'w+': '星期' + '日一二三四五六'.charAt(date.getDay()) //星期
}
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
}
for (var k in o) {
if (new RegExp('(' + k + ')').test(fmt)) {
fmt = fmt.replace(
RegExp.$1,
RegExp.$1.length == 1 || String(o[k]).length > 1 ? o[k] : '0' + o[k]
)
}
}
return fmt
}
/**
......@@ -50,15 +63,7 @@ export function formatTime(time, option) {
return parseTime(time, option)
} else {
return (
d.getMonth() +
1 +
'月' +
d.getDate() +
'日' +
d.getHours() +
'时' +
d.getMinutes() +
'分'
d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分'
)
}
}
......@@ -196,8 +201,7 @@ export function toggleClass(element, className) {
classString += '' + className
} else {
classString =
classString.substr(0, nameIndex) +
classString.substr(nameIndex + className.length)
classString.substr(0, nameIndex) + classString.substr(nameIndex + className.length)
}
element.className = classString
}
......@@ -354,7 +358,7 @@ export const beautifierConf = {
indent_inner_html: true,
comma_first: false,
e4x: true,
indent_empty_lines: true,
indent_empty_lines: true
},
js: {
indent_size: '2',
......@@ -373,8 +377,8 @@ export const beautifierConf = {
indent_inner_html: true,
comma_first: false,
e4x: true,
indent_empty_lines: true,
},
indent_empty_lines: true
}
}
// 首字母大小
......@@ -404,7 +408,7 @@ export const pickerOptions = {
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end])
},
}
},
{
text: '最近一个月',
......@@ -413,7 +417,7 @@ export const pickerOptions = {
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end])
},
}
},
{
text: '最近三个月',
......@@ -422,7 +426,7 @@ export const pickerOptions = {
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit('pick', [start, end])
},
},
],
}
}
]
}
......@@ -44,7 +44,7 @@ service.interceptors.response.use(
type: 'warning'
}).then(() => {
store.dispatch('LogOut').then(() => {
location.href = '/'
location.href = process.env.VUE_APP_BASE_URL
})
})
} else if (code === 500) {
......
<script>
import { getSummary, getFollowUpRecord, getCustomerInfoByUserId } from '@/api/customer'
import { dictTrackState } from '@/utils/dictionary'
import record from './record'
export default {
name: '',
......@@ -9,6 +10,10 @@ export default {
type: String,
default: ''
}
// trackUsers: {
// type: Array,
// default: ''
// }
},
components: {
record
......@@ -27,14 +32,11 @@ export default {
active: '0',
openedTabs: ['0'],
openTrack: ['0'],
lastSyncTime: 0
}
},
computed: {
disabled() {
return (+new Date() - +new Date(this.lastSyncTime)) / 3600000 < 2
lastSyncTime: null,
dictTrackState
}
},
computed: {},
watch: {},
created() {
this.userId ? this.getCustomerInfoByUserId() : this.getSummary()
......@@ -105,15 +107,15 @@ export default {
:key="index"
:class="['flex', index && 'mt20']"
>
<div class="name oe">{{ item.userName }}</div>
:
<!-- 汇总的场景显示名字 -->
<template v-if="!userId">
<div class="name oe">{{ item.userName }}</div>
:
</template>
<template v-if="item.tagNames">
<el-tag
type="info"
v-for="(unit, unique) in item.tagNames.split(',')"
:key="unique"
>{{ unit }}</el-tag
>
<el-tag v-for="(unit, unique) in item.tagNames.split(',')" :key="unique">{{
unit
}}</el-tag>
</template>
<div v-else class="sub-text-color ac">
暂无标签
......@@ -133,8 +135,11 @@ export default {
:key="index"
:class="['flex', index && 'mt20']"
>
<div class="name oe">{{ item.userName }}</div>
:
<!-- 汇总的场景显示名字 -->
<template v-if="!userId">
<div class="name oe">{{ item.userName }}</div>
:
</template>
<template v-if="item.tagNames">
<el-tag
type="info"
......@@ -156,19 +161,23 @@ export default {
<el-card class="mb10" shadow="never">
<div slot="header" class="card-title">跟进状态</div>
<template v-if="portrayalSum.trackStates && portrayalSum.trackStates.length">
<div class="flex mb20" v-for="(item, index) of portrayalSum.trackStates" :key="index">
<div class="name oe">{{ item.userName }}</div>
:
<div
v-for="(item, index) of portrayalSum.trackStates"
:key="index"
:class="['flex', index && 'mt20']"
>
<!-- 汇总的场景显示名字 -->
<template v-if="!userId">
<div class="name oe">{{ item.userName }}</div>
:
</template>
<template v-if="item.trackStateList.length">
<el-steps
style="flex:auto;"
:active="item.trackStateList.length"
finish-status="success"
>
<el-steps style="flex:auto;" :active="item.trackStateList.length">
<el-step
v-for="(unit, unique) of item.trackStateList"
:key="unique"
:title="dictTrackState[~~unit.trackState + ''].name"
:status="dictTrackState[~~unit.trackState + ''].color"
:description="unit.trackTime"
></el-step>
</el-steps>
......@@ -183,19 +192,22 @@ export default {
<el-card shadow="never">
<div slot="header" class="card-title">跟进记录</div>
<!-- 单个人的场景 -->
<record v-if="userId" :userId="userId" viewType="1"></record>
<!-- 汇总的场景 -->
<el-tabs
v-if="portrayalSum.trackStates && portrayalSum.trackStates.length"
v-else-if="portrayalSum.trackUsers && portrayalSum.trackUsers.length"
value="0"
@tab-click="changeTab"
>
<el-tab-pane
v-for="(item, index) in portrayalSum.trackStates"
v-for="(item, index) in portrayalSum.trackUsers"
:key="index"
:label="item.userName"
>
<record
v-if="openedTabs.includes(index + '')"
:userId="item.userId"
:userId="item.trackUserId"
viewType="1"
></record>
</el-tab-pane>
......@@ -231,6 +243,7 @@ export default {
v-show="item === active"
:key="index"
:userId="userId"
:lastSyncTime.sync="lastSyncTime"
:trajectoryType="item == 0 ? null : item"
></record>
</template>
......@@ -280,4 +293,7 @@ export default {
float: right;
top: -11px;
}
.sub-text-color {
flex: auto;
}
</style>
<script>
import { getFollowUpRecord, syncTrack } from '@/api/customer'
import { dictTrackState } from '@/utils/dictionary'
import { dateFormat } from '@/utils'
export default {
name: '',
props: {
......@@ -14,16 +15,18 @@ export default {
type: String,
default: null
},
// 视图展示类型 1:表格展示,2:轨迹时间线展示
viewType: {
type: String,
default: ''
}
},
lastSyncTime: String
},
components: {},
data() {
return {
query: {
pageNum: 1,
pageNum: 0,
pageSize: 10,
externalUserid: '', // 是 当前客户id
userId: null, // 当前跟进人id,
......@@ -32,13 +35,14 @@ export default {
loading: false,
total: 0,
list: [], // 列表
dictTrackState
dictTrackState,
dateFormat
}
},
computed: {},
watch: {},
created() {
this.viewType && this.getList()
this.viewType && this.getList(1)
},
mounted() {},
methods: {
......@@ -56,13 +60,36 @@ export default {
}
this.loading = true
getFollowUpRecord(this.query)
.then(({ rows, total }) => {
.then(({ rows, total, lastSyncTime }) => {
if (this.viewType) {
this.list = rows
} else {
this.list = this.list.concat(rows)
let list = []
let dayList = []
// 提取天
rows.forEach((ele) => {
let date = this.dateFormat(ele.createTime, 'yyyyMMdd')
dayList.includes(date) || dayList.push(date)
})
dayList.sort((a, b) => b - a)
// 提取每天的时间点
for (let i = 0; i < dayList.length; i++) {
let timeList = []
for (let j = 0; j < rows.length; j++) {
// console.log(rows[j].createTime);
if (dayList[i] == this.dateFormat(rows[j].createTime, 'yyyyMMdd')) {
timeList.push(rows[j])
}
}
list.push(timeList)
}
this.list = this.list.concat(list)
}
this.total = +total
this.$emit('update:lastSyncTime', lastSyncTime)
this.loading = false
})
.catch(() => {
......@@ -116,24 +143,63 @@ export default {
</div>
</template>
<ul v-else class="infinite-list" v-infinite-scroll="getList" style="overflow:auto">
<!-- <li v-for="i in list" class="infinite-list-item" :key="i">
<div>2021-02-16 星期二</div>
</li> -->
<el-timeline v-if="list.length">
<el-timeline-item
v-for="(item, index) in list"
:key="index"
:timestamp="item.trackTime"
placement="top"
>
<p>{{ item.title }}</p>
<p>{{ item.trackContent }}</p>
</el-timeline-item>
</el-timeline>
<el-empty v-else :image-size="150"></el-empty>
</ul>
<div v-else class="timeline-time-wrap">
<ul class="infinite-list" v-infinite-scroll="getList" style="overflow:auto">
<template v-if="list.length">
<li v-for="(unit, i) in list" class="infinite-list-item" :key="i">
<div class="timeline-time">{{ dateFormat(unit[0].createTime, 'yyyy-MM-dd w') }}</div>
<el-timeline class="timeline-box">
<el-timeline-item
v-for="(item, index) in unit"
:key="index"
class="timeline-box-item"
:timestamp="item.trackTime"
placement="top"
type="primary"
>
<p class="timeline-box-item-title">{{ item.title || '无数据' }}</p>
<p>{{ item.trackContent || '无数据' }}</p>
</el-timeline-item>
</el-timeline>
</li>
</template>
<el-empty v-else :image-size="150"></el-empty>
</ul>
</div>
</div>
</template>
<style lang="less" scoped></style>
<style lang="scss" scoped>
.timeline-time-wrap {
display: flex;
justify-content: center;
}
.timeline-time {
font-size: 14px;
color: #999999;
line-height: 48px;
}
.el-timeline > .timeline-box-item:first-child /deep/ .el-timeline-item__node {
border-radius: 0 !important;
}
.timeline-box {
padding-left: 70px;
&-item {
/deep/ .el-timeline-item__timestamp {
position: absolute;
top: 4px;
left: -45px;
margin: 0;
}
&-title {
font-weight: 700;
line-height: 25px;
}
}
}
/deep/ .el-timeline-item__tail {
border-left-color: #3c88f0;
}
</style>
......@@ -62,11 +62,15 @@ export default {
getDetail(this.$route.query).then(({ data }) => {
data.companyTags && (data.companyTags = data.companyTags.split(','))
this.customer = data
if (data.trackUsers && data.trackUsers.length === 1) {
this.openedTabs = [data.trackUsers[0].trackUserId]
}
this.birthday = data.birthday
})
},
changeTab(tab) {
this.openedTabs.includes(tab.id) || this.openedTabs.push(tab.id)
this.openedTabs.includes(tab.$attrs.id) || this.openedTabs.push(tab.$attrs.id)
}
// remark(item) {
......
......@@ -147,6 +147,7 @@ export default {
})
api.sync().then((r) => {
loading.close()
this.getList(1)
this.msgSuccess('后台开始同步数据,请稍后关注进度')
})
},
......
......@@ -138,7 +138,7 @@
</SelectTag>
<!-- 选择使用员工弹窗 -->
<SelectUser :key="codeForm.qrType" :defaultValues="selectedUserList" :visible.sync="dialogVisibleSelectUser" title="选择使用员工" :isOnlyLeaf="codeForm.qrType !== 2" :isSigleSelect="codeForm.qrType == 1" @success="selectedUser"></SelectUser>
<SelectUser :key="codeForm.qrType" :defaultValues="selectedUserList" :visible.sync="dialogVisibleSelectUser" title="选择使用员工" :isOnlyLeaf="true" :isSigleSelect="codeForm.qrType == 1" @success="selectedUser"></SelectUser>
</div>
</template>
......
......@@ -18,8 +18,9 @@
</div>
<div>
<div style="margin:10px 0;display:flex;">
<el-button type="primary" size="mini" @click="gotoRoute">发表动态</el-button>
<el-button type="primary" :disabled="disable" size="mini" @click="syncFn">同步朋友圈</el-button>
<el-button type="primary" size="mini" @click="gotoRoute" style="margin-right:10px;">发表动态</el-button>
<!-- <el-button type="primary" :disabled="disable" size="mini" @click="syncFn">同步朋友圈</el-button> -->
<ButtonSync :lastSyncTime="lastSyncTime" @click="syncFn">同步朋友圈</ButtonSync>
<div class="time" v-if="lastSyncTime">最近同步:{{lastSyncTime}}</div>
<div class="time" v-else>暂无记录,请手动点击同步</div>
</div>
......
......@@ -195,7 +195,7 @@ export default {
syncHMoments({ filterType: 1 }).then((res) => {
if (res.code === 200) {
this.msgSuccess(res.msg)
this.getList()
this.getList(1)
}
})
},
......@@ -224,7 +224,7 @@ export default {
}),
(this.userArray = [])
this.value1 = []
this.getList()
this.getList(1)
},
getList(type) {
type && (this.query.pageNum = type)
......
......@@ -203,13 +203,15 @@
if (dd.annexType === 'link') {
let reUrl = /(http|https):\/\/([\w.]+\/?)\S*/
if (!reUrl.test(dd.annexUrl)) {
console.log(123)
goto = false
dd.contentError = '必须以 http://或 https://开头'
}
}
})
this.$forceUpdate()
if (!this.form.otherContent.length) {
this.form.contentType = 'text'
}
if (goto) {
gotoPublish(this.form).then(res => {
if (res.code === 200) {
......
......@@ -169,7 +169,7 @@ export default {
},
methods: {
getCode() {
getCodeImg().then(res => {
getCodeImg().then((res) => {
this.codeUrl = 'data:image/gif;base64,' + res.img
this.loginForm.uuid = res.uuid
})
......@@ -185,7 +185,7 @@ export default {
}
},
handleLogin() {
this.$refs.loginForm.validate(valid => {
this.$refs.loginForm.validate((valid) => {
if (valid) {
this.loading = true
if (this.loginForm.rememberMe) {
......@@ -204,7 +204,7 @@ export default {
this.$store
.dispatch('Login', this.loginForm)
.then(() => {
this.$router.push({ path: this.redirect || '/' })
this.$router.push({ path: this.redirect || process.env.VUE_APP_BASE_URL })
})
.catch(() => {
this.loading = false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!