Commit ed4ed059 by xinla

Merge branch 'front_end_dev_1.5'

2 parents c911fea6 491b1261
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
# 仟微管理系统/开发环境 # 基础api(根据实际情况,自行配置,下为示例)
VUE_APP_BASE_API = 'http://demo.linkwechat.cn/api' VUE_APP_BASE_API = 'http://demo.linkwechat.cn'
# VUE_APP_BASE_API = 'http://n3rpzt.natappfree.cc'
# 开发环境IP
VUE_APP_BASE_URL = 'http://119.45.28.29:8090'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'
# 仟微管理系统/生产环境api # 基础api
VUE_APP_BASE_API = 'http://119.45.28.29:8090' VUE_APP_BASE_API = 'http://demo.linkwechat.cn'
# 生产环境IP # 路由基础路径
VUE_APP_BASE_URL = 'http://119.45.28.29:8090' VUE_APP_BASE_URL = '/'
\ No newline at end of file \ No newline at end of file
# 测试环境配置
ENV = 'test'
# 基础api
VUE_APP_BASE_API = 'http://demo.linkwechat.cn'
# 路由基础路径
VUE_APP_BASE_URL = '/test/'
# Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": [],
"msbuild_toolset": "v141",
"msvs_windows_target_platform_version": "10.0.17763.0"
},
"variables": {
"asan": 0,
"build_v8_with_gn": "false",
"coverage": "false",
"dcheck_always_on": 0,
"debug_nghttp2": "false",
"debug_node": "false",
"enable_lto": "false",
"enable_pgo_generate": "false",
"enable_pgo_use": "false",
"error_on_warn": "false",
"force_dynamic_crt": 0,
"host_arch": "x64",
"icu_data_in": "..\\..\\deps\\icu-tmp\\icudt67l.dat",
"icu_endianness": "l",
"icu_gyp_path": "tools/icu/icu-generic.gyp",
"icu_path": "deps/icu-small",
"icu_small": "false",
"icu_ver_major": "67",
"is_debug": 0,
"napi_build_version": "7",
"nasm_version": "2.14",
"node_byteorder": "little",
"node_debug_lib": "false",
"node_enable_d8": "false",
"node_install_npm": "true",
"node_module_version": 83,
"node_no_browser_globals": "false",
"node_prefix": "/usr/local",
"node_release_urlbase": "https://nodejs.org/download/release/",
"node_shared": "false",
"node_shared_brotli": "false",
"node_shared_cares": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "false",
"node_shared_nghttp2": "false",
"node_shared_openssl": "false",
"node_shared_zlib": "false",
"node_tag": "",
"node_target_type": "executable",
"node_use_bundled_v8": "true",
"node_use_dtrace": "false",
"node_use_etw": "true",
"node_use_node_code_cache": "true",
"node_use_node_snapshot": "true",
"node_use_openssl": "true",
"node_use_v8_platform": "true",
"node_with_ltcg": "true",
"node_without_node_options": "false",
"openssl_fips": "",
"openssl_is_fips": "false",
"ossfuzz": "false",
"shlib_suffix": "so.83",
"target_arch": "x64",
"v8_enable_31bit_smis_on_64bit_arch": 0,
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_enable_inspector": 1,
"v8_enable_lite_mode": 0,
"v8_enable_object_print": 1,
"v8_enable_pointer_compression": 0,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 1,
"v8_promise_internal_field_count": 1,
"v8_random_seed": 0,
"v8_trace_maps": 0,
"v8_use_siphash": 1,
"want_separate_host_toolset": 0,
"nodedir": "C:\\Users\\77514\\AppData\\Local\\node-gyp\\Cache\\14.15.0",
"standalone_static_library": 1,
"msbuild_path": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe"
}
}
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"build:test": "vue-cli-service build --mode test",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src", "lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit", "test:unit": "jest --clearCache && vue-cli-service test:unit",
......
...@@ -7,7 +7,7 @@ const service = window.CONFIG.services.wecom + '/weapp' ...@@ -7,7 +7,7 @@ const service = window.CONFIG.services.wecom + '/weapp'
*/ */
export function getList() { export function getList() {
return request({ return request({
url: service + '/list', url: service + '/list'
}) })
} }
...@@ -30,6 +30,15 @@ export function update(data) { ...@@ -30,6 +30,15 @@ export function update(data) {
return request({ return request({
url: service + '/updateWeApp', url: service + '/updateWeApp',
method: 'put', method: 'put',
data, data
})
}
// 添加
export function add(data) {
return request({
url: service + '/addWeApp',
method: 'post',
data
}) })
} }
import request from '@/utils/request' import request from '@/utils/request'
const getTree = (params) => { const getExternalChatList = (params) => {
return request({ return request({
url: '/chat/mapping/list', url: '/chat/msg/selectExternalChatList/'+ params.fromId,
method: 'get'
})
}
const selectAloneChatList = (params) => {
return request({
url: '/chat/msg/selectAloneChatList\n/',
method: 'get', method: 'get',
params, params
})
}
const getInternalChatList = (params) => {
return request({
url: '/chat/msg/selectInternalChatList/'+ params.fromId,
method: 'get'
})
}
const getGroupChatList = (params) => {
return request({
url: '/chat/msg/selectGroupChatList/'+ params.fromId,
method: 'get'
}) })
} }
const chatList = (params) => { const chatList = (params) => {
return request({ return request({
url: '/wecom/finance/getChatContactList', url: '/chat/msg/list',
method: 'get', method: 'get',
params, params,
}) })
...@@ -26,14 +48,7 @@ const indexEchart = () => { ...@@ -26,14 +48,7 @@ const indexEchart = () => {
method: 'get' method: 'get'
}) })
} }
//
const chatGrounpList = (params) => {
return request({
url: '/wecom/finance/getChatRoomContactList',
method: 'get',
params,
})
}
const listByCustomer = (params) => { const listByCustomer = (params) => {
return request({ return request({
url: '/wecom/customer/list', url: '/wecom/customer/list',
...@@ -41,9 +56,9 @@ const listByCustomer = (params) => { ...@@ -41,9 +56,9 @@ const listByCustomer = (params) => {
params, params,
}) })
} }
const getChatAllList = (params) => { const getFullSearchChatList = (params) => {
return request({ return request({
url: '/wecom/finance/getChatAllList', url: '/chat/msg/selectFullSearchChatList',
method: 'get', method: 'get',
params, params,
}) })
...@@ -52,9 +67,11 @@ const getChatAllList = (params) => { ...@@ -52,9 +67,11 @@ const getChatAllList = (params) => {
export const content = { export const content = {
indexEchart, indexEchart,
indexTable, indexTable,
getTree, getExternalChatList,
selectAloneChatList,
getInternalChatList,
getGroupChatList,
chatList, chatList,
listByCustomer, listByCustomer,
getChatAllList, getFullSearchChatList
chatGrounpList
} }
...@@ -113,6 +113,9 @@ export default { ...@@ -113,6 +113,9 @@ export default {
this.$emit('update:fileName', res.data.fileName) this.$emit('update:fileName', res.data.fileName)
this.$emit('update:file', file) this.$emit('update:file', file)
// this.fileUrl = URL.createObjectURL(file.raw) // this.fileUrl = URL.createObjectURL(file.raw)
} else {
this.loading = false
this.$message.error(res.msg)
} }
}, },
onError(err, file, fileList) { onError(err, file, fileList) {
......
...@@ -6,129 +6,138 @@ const baseURL = process.env.VUE_APP_BASE_API ...@@ -6,129 +6,138 @@ const baseURL = process.env.VUE_APP_BASE_API
// 日期格式化 // 日期格式化
export function parseTime(time, pattern) { export function parseTime(time, pattern) {
if (arguments.length === 0 || !time) { if (arguments.length === 0 || !time) {
return null return null
} }
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
let date let date
if (typeof time === 'object') { if (typeof time === 'object') {
date = time date = time
} else { } else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
time = parseInt(time) time = parseInt(time)
} else if (typeof time === 'string') { } else if (typeof time === 'string') {
time = time.replace(new RegExp(/-/gm), '/'); time = time.replace(new RegExp(/-/gm), '/')
} }
if ((typeof time === 'number') && (time.toString().length === 10)) { if (typeof time === 'number' && time.toString().length === 10) {
time = time * 1000 time = time * 1000
} }
date = new Date(time) date = new Date(time)
} }
const formatObj = { const formatObj = {
y: date.getFullYear(), y: date.getFullYear(),
m: date.getMonth() + 1, m: date.getMonth() + 1,
d: date.getDate(), d: date.getDate(),
h: date.getHours(), h: date.getHours(),
i: date.getMinutes(), i: date.getMinutes(),
s: date.getSeconds(), s: date.getSeconds(),
a: date.getDay() a: date.getDay()
} }
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key] let value = formatObj[key]
// Note: getDay() returns 0 on Sunday // Note: getDay() returns 0 on Sunday
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } if (key === 'a') {
if (result.length > 0 && value < 10) { return ['日', '一', '二', '三', '四', '五', '六'][value]
value = '0' + value }
} if (result.length > 0 && value < 10) {
return value || 0 value = '0' + value
}) }
return time_str return value || 0
})
return time_str
} }
// 表单重置 // 表单重置
export function resetForm(refName) { export function resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields()
} }
} }
//年月日格式 //年月日格式
export function yearMouthDay(data) { export function yearMouthDay(data) {
var time = new Date(data); var time = new Date(data)
var year = time.getFullYear(); var year = time.getFullYear()
var month = time.getMonth()+1; var month = time.getMonth() + 1
var date = time.getDate(); var date = time.getDate()
console.log(year+'-'+add0(month)+'-'+add0(date)) console.log(year + '-' + add0(month) + '-' + add0(date))
return year+'-'+add0(month)+'-'+add0(date) return year + '-' + add0(month) + '-' + add0(date)
}
function add0(m) {
return m < 10 ? '0' + m : m
} }
function add0(m){return m<10?'0'+m:m }
// 添加日期范围 // 添加日期范围
export function addDateRange(params, dateRange) { export function addDateRange(params, dateRange) {
var search = params; var search = params
search.beginTime = ""; search.beginTime = ''
search.endTime = ""; search.endTime = ''
if (null != dateRange && '' != dateRange) { if (null != dateRange && '' != dateRange) {
search.beginTime = this.dateRange[0]; search.beginTime = this.dateRange[0]
search.endTime = this.dateRange[1]; search.endTime = this.dateRange[1]
} }
return search; return search
} }
// 回显数据字典 // 回显数据字典
export function selectDictLabel(datas, value) { export function selectDictLabel(datas, value) {
var actions = []; var actions = []
Object.keys(datas).some((key) => { Object.keys(datas).some((key) => {
if (datas[key].dictValue == ('' + value)) { if (datas[key].dictValue == '' + value) {
actions.push(datas[key].dictLabel); actions.push(datas[key].dictLabel)
return true; return true
} }
}) })
return actions.join(''); return actions.join('')
} }
// 回显数据字典(字符串数组) // 回显数据字典(字符串数组)
export function selectDictLabels(datas, value, separator) { export function selectDictLabels(datas, value, separator) {
var actions = []; var actions = []
var currentSeparator = undefined === separator ? "," : separator; var currentSeparator = undefined === separator ? ',' : separator
var temp = value.split(currentSeparator); var temp = value.split(currentSeparator)
Object.keys(value.split(currentSeparator)).some((val) => { Object.keys(value.split(currentSeparator)).some((val) => {
Object.keys(datas).some((key) => { Object.keys(datas).some((key) => {
if (datas[key].dictValue == ('' + temp[val])) { if (datas[key].dictValue == '' + temp[val]) {
actions.push(datas[key].dictLabel + currentSeparator); actions.push(datas[key].dictLabel + currentSeparator)
} }
}) })
}) })
return actions.join('').substring(0, actions.join('').length - 1); return actions.join('').substring(0, actions.join('').length - 1)
} }
// 通用下载方法 // 通用下载方法
export function download(fileName) { export function download(fileName) {
window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; window.location.href =
baseURL +
'/common/download?fileName=' +
encodeURI(fileName) +
'&delete=' +
true
} }
// 字符串格式化(%s ) // 字符串格式化(%s )
export function sprintf(str) { export function sprintf(str) {
var args = arguments, flag = true, i = 1; var args = arguments,
str = str.replace(/%s/g, function () { flag = true,
var arg = args[i++]; i = 1
if (typeof arg === 'undefined') { str = str.replace(/%s/g, function() {
flag = false; var arg = args[i++]
return ''; if (typeof arg === 'undefined') {
} flag = false
return arg; return ''
}); }
return flag ? str : ''; return arg
})
return flag ? str : ''
} }
// 转换字符串,undefined,null等转化为"" // 转换字符串,undefined,null等转化为""
export function praseStrEmpty(str) { export function praseStrEmpty(str) {
if (!str || str == "undefined" || str == "null") { if (!str || str == 'undefined' || str == 'null') {
return ""; return ''
} }
return str; return str
} }
/** /**
...@@ -139,70 +148,46 @@ export function praseStrEmpty(str) { ...@@ -139,70 +148,46 @@ export function praseStrEmpty(str) {
* @param {*} children 孩子节点字段 默认 'children' * @param {*} children 孩子节点字段 默认 'children'
*/ */
export function handleTree(data, id, parentId, children) { export function handleTree(data, id, parentId, children) {
id = id || 'id' id = id || 'id'
parentId = parentId || 'parentId' parentId = parentId || 'parentId'
children = children || 'children' children = children || 'children'
let result = []; let result = []
data = JSON.parse(JSON.stringify(data)) data = JSON.parse(JSON.stringify(data))
if (!Array.isArray(data)) { if (!Array.isArray(data)) {
return result return result
} }
data.forEach(item => { data.forEach((item) => {
delete item[children]; delete item[children]
}); })
let map = {}; let map = {}
data.forEach(item => { data.forEach((item) => {
map[item[id]] = item; map[item[id]] = item
}); })
data.forEach(item => { data.forEach((item) => {
let parent = map[item[parentId]]; let parent = map[item[parentId]]
if (parent) { if (parent) {
parent[children] || (parent[children] = []) parent[children] || (parent[children] = [])
parent[children].push(item); parent[children].push(item)
} else { } else {
result.push(item); result.push(item)
} }
}); })
return result; return result
} }
/** /**
* dataURL转化为File对象 * dataURL转化为File对象
* @param {*} dataURL 本地数据 base64 * @param {*} dataURL 本地数据 base64
*/ */
export function dataURLtoFile (dataURL) { export function dataURLtoFile(dataURL) {
const arr = dataURL.split(',') const arr = dataURL.split(',')
const mime = arr[0].match(/:(.*?);/)[1] const mime = arr[0].match(/:(.*?);/)[1]
const bstr = atob(arr[1]) const bstr = atob(arr[1])
let n = bstr.length let n = bstr.length
const u8arr = new Uint8Array(n) const u8arr = new Uint8Array(n)
while (n) { while (n) {
u8arr[n - 1] = bstr.charCodeAt(n - 1) u8arr[n - 1] = bstr.charCodeAt(n - 1)
n -= 1 // to make eslint happy n -= 1 // to make eslint happy
}
return new File([u8arr], '', { type: mime })
}
/**
* 整理echat 数据
* @param {*} arrData 数据
*/
export function arrData (data) {
let obj={
arr1:[],
arr2:[],
arr3:[],
arr4:[],
btm1:[],
}
data.forEach((a,b)=>{
obj.arr1.push(a.newApplyCnt)
obj.btm1.push(a.xtime)
obj.arr3.push(a.newMemberCnt)
obj.arr2.push(a.newContactCnt)
obj.arr4.push(a.negativeFeedbackCnt)
})
console.log(obj)
return obj
} }
return new File([u8arr], '', { type: mime })
}
<script> <script>
import { getList, update } from '@/api/appTool/selfApp' import { getList, update, add } from '@/api/appTool/selfApp'
// import clipboard from "clipboard"; // import clipboard from "clipboard";
export default { export default {
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
submit() { submit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
update(this.form) ;(this.form.id ? update : add)(this.form)
.then(() => { .then(() => {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
this.dialogVisible = false this.dialogVisible = false
...@@ -262,6 +262,8 @@ export default { ...@@ -262,6 +262,8 @@ export default {
display: flex; display: flex;
border: 1px solid #eee; border: 1px solid #eee;
margin: 0 20px 20px 0; margin: 0 20px 20px 0;
background: #fff;
border-radius: 6px;
.el-image { .el-image {
margin-right: 10px; margin-right: 10px;
width: 50px; width: 50px;
......
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="tableData" border style="width: 100%"> <el-table :data="tableData">
<el-table-column prop="taskName" label="群裂变名称"> </el-table-column> <el-table-column prop="taskName" label="群裂变名称"> </el-table-column>
<el-table-column prop="fissNum" label="裂变客户数量"> </el-table-column> <el-table-column prop="fissNum" label="裂变客户数量"> </el-table-column>
<el-table-column prop="fissStatus" label="活动状态"> <el-table-column prop="fissStatus" label="活动状态">
......
...@@ -218,7 +218,11 @@ export default { ...@@ -218,7 +218,11 @@ export default {
components: { PhoneDialog, SelectMaterial, SelectCustomerGroup }, components: { PhoneDialog, SelectMaterial, SelectCustomerGroup },
data() { data() {
const checkContent = (rule, value, callback) => { const checkContent = (rule, value, callback) => {
if (!this.form.content && this.form.picList.length === 0 && this.form.materialIdList.length === 0) { if (
!this.form.content &&
this.form.picList.length === 0 &&
this.form.materialIdList.length === 0
) {
callback(new Error('该项为必填项')) callback(new Error('该项为必填项'))
} else { } else {
callback() callback()
...@@ -246,7 +250,10 @@ export default { ...@@ -246,7 +250,10 @@ export default {
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
// return time.getTime() < Date.now() // return time.getTime() < Date.now()
return time.getTime() < new Date(new Date(new Date().toLocaleDateString()).getTime()) return (
time.getTime() <
new Date(new Date(new Date().toLocaleDateString()).getTime())
)
} }
}, },
uploadImageUrl: '', uploadImageUrl: '',
...@@ -256,9 +263,7 @@ export default { ...@@ -256,9 +263,7 @@ export default {
ruleName: [ ruleName: [
{ required: true, message: '该项为必填项', trigger: 'blur' } { required: true, message: '该项为必填项', trigger: 'blur' }
], ],
title: [ title: [{ required: true, message: '该项为必填项', trigger: 'blur' }],
{ required: true, message: '该项为必填项', trigger: 'blur' }
],
chatIdList: [ chatIdList: [
{ required: true, message: '该项为必填项', trigger: 'change' } { required: true, message: '该项为必填项', trigger: 'change' }
], ],
...@@ -268,8 +273,8 @@ export default { ...@@ -268,8 +273,8 @@ export default {
content: [ content: [
// { required: true, message: '该项为必填项', trigger: 'change' }, // { required: true, message: '该项为必填项', trigger: 'change' },
{ validator: checkContent, trigger: 'change' } { validator: checkContent, trigger: 'change' }
], ]
}), })
} }
}, },
watch: { watch: {
...@@ -279,7 +284,7 @@ export default { ...@@ -279,7 +284,7 @@ export default {
this.form.startExeTime = '' this.form.startExeTime = ''
this.form.stopExeTime = '' this.form.stopExeTime = ''
} else { } else {
[ this.form.startExeTime, this.form.stopExeTime ] = dateRange ;[this.form.startExeTime, this.form.stopExeTime] = dateRange
} }
}, },
customerGroups(groups) { customerGroups(groups) {
...@@ -293,11 +298,11 @@ export default { ...@@ -293,11 +298,11 @@ export default {
}, },
computed: { computed: {
imageMaterialUrls() { imageMaterialUrls() {
const urls = this.imageMaterialList.map(m => m.materialUrl) const urls = this.imageMaterialList.map((m) => m.materialUrl)
return urls return urls
}, },
messageList() { messageList() {
const texts = this.textMaterialList.map(t => t.content) const texts = this.textMaterialList.map((t) => t.content)
return texts return texts
}, },
imageList() { imageList() {
...@@ -313,37 +318,44 @@ export default { ...@@ -313,37 +318,44 @@ export default {
/** 获取详情 */ /** 获取详情 */
getDetail(id) { getDetail(id) {
this.loading = true this.loading = true
getDetail(id) getDetail(id).then(({ data }) => {
.then(({ data }) => { this.dateRange = [data.startExeTime || '', data.stopExeTime || '']
this.dateRange = [data.startExeTime || '', data.stopExeTime || ''] this.customerGroups = data.groupList || []
this.customerGroups = data.groupList || []
this.form.ruleName = data.ruleName || ''
this.form.title = data.title || ''
this.form.content = data.content || ''
this.form.picList = data.picList || []
this.form.materialIdList = [] this.form.ruleName = data.ruleName || ''
this.form.title = data.title || ''
this.form.content = data.content || ''
this.form.picList = data.picList || []
const materialList = data.materialList || [] this.form.materialIdList = []
for (let material of materialList) { const materialList = data.materialList || []
if (material.materialUrl) {
this.imageMaterialList.push(material)
} else {
this.textMaterialList.push(material)
}
this.form.materialIdList.push(material.id) for (let material of materialList) {
if (material.materialUrl) {
this.imageMaterialList.push(material)
} else {
this.textMaterialList.push(material)
} }
this.loading = false this.form.materialIdList.push(material.id)
}) }
this.loading = false
})
}, },
// 选择素材确认按钮 // 选择素材确认按钮
submitSelectMaterial(text, image, file) { submitSelectMaterial(text, image, file) {
text && text.id && !this.form.materialIdList.includes(text.id) && this.form.materialIdList.push(text.id) && this.textMaterialList.push(text) text &&
image && image.id && !this.form.materialIdList.includes(image.id) && this.form.materialIdList.push(image.id) && this.imageMaterialList.push(image) text.id &&
!this.form.materialIdList.includes(text.id) &&
this.form.materialIdList.push(text.id) &&
this.textMaterialList.push(text)
image &&
image.id &&
!this.form.materialIdList.includes(image.id) &&
this.form.materialIdList.push(image.id) &&
this.imageMaterialList.push(image)
this.$refs.form.validateField('content') this.$refs.form.validateField('content')
}, },
// 选择客户群聊确认 // 选择客户群聊确认
...@@ -379,22 +391,25 @@ export default { ...@@ -379,22 +391,25 @@ export default {
}) })
}, },
goRoute() { goRoute() {
const pathName = this.activeName === '0' ? 'Text' : 'Image' let contentType = ['text', 'image', 'file']
window.open('#/customerMaintain/material/' + contentType[this.activeName])
this.$router.push({
name: pathName,
})
}, },
removeImage(url) { removeImage(url) {
this.form.picList.splice(this.form.picList.indexOf(url), 1) this.form.picList.splice(this.form.picList.indexOf(url), 1)
}, },
removeImageMaterial(image) { removeImageMaterial(image) {
this.imageMaterialList.splice(this.imageMaterialList.indexOf(image), 1) this.imageMaterialList.splice(this.imageMaterialList.indexOf(image), 1)
this.form.materialIdList.splice(this.form.materialIdList.indexOf(image.id), 1) this.form.materialIdList.splice(
this.form.materialIdList.indexOf(image.id),
1
)
}, },
removeTextMaterial(text) { removeTextMaterial(text) {
this.textMaterialList.splice(this.textMaterialList.indexOf(text), 1) this.textMaterialList.splice(this.textMaterialList.indexOf(text), 1)
this.form.materialIdList.splice(this.form.materialIdList.indexOf(text.id), 1) this.form.materialIdList.splice(
this.form.materialIdList.indexOf(text.id),
1
)
} }
} }
} }
...@@ -402,12 +417,7 @@ export default { ...@@ -402,12 +417,7 @@ export default {
<template> <template>
<div class="wrap" v-loading="loading"> <div class="wrap" v-loading="loading">
<el-form <el-form :model="form" ref="form" :rules="rules" label-width="100px">
:model="form"
ref="form"
:rules="rules"
label-width="100px"
>
<el-form-item label="规则名称" prop="ruleName"> <el-form-item label="规则名称" prop="ruleName">
<el-input <el-input
v-model="form.ruleName" v-model="form.ruleName"
...@@ -444,10 +454,7 @@ export default { ...@@ -444,10 +454,7 @@ export default {
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="执行时间" prop="startExeTime">
label="执行时间"
prop="startExeTime"
>
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -505,11 +512,7 @@ export default { ...@@ -505,11 +512,7 @@ export default {
@click="removeImageMaterial(image)" @click="removeImageMaterial(image)"
></el-button> ></el-button>
</div> </div>
<div <div v-for="url in form.picList" :key="url" class="image-wrapper">
v-for="url in form.picList"
:key="url"
class="image-wrapper"
>
<el-image :src="url" fit="fit"></el-image> <el-image :src="url" fit="fit"></el-image>
<el-button <el-button
icon="el-icon-close" icon="el-icon-close"
...@@ -519,10 +522,7 @@ export default { ...@@ -519,10 +522,7 @@ export default {
></el-button> ></el-button>
</div> </div>
<upload <upload :fileUrl.sync="uploadImageUrl" class="image-uploader">
:fileUrl.sync="uploadImageUrl"
class="image-uploader"
>
<i class="el-icon-plus uploader-icon"></i> <i class="el-icon-plus uploader-icon"></i>
</upload> </upload>
</el-tab-pane> </el-tab-pane>
...@@ -655,7 +655,8 @@ export default { ...@@ -655,7 +655,8 @@ export default {
top: 5px; top: 5px;
} }
} }
.text-wrapper, .image-wrapper { .text-wrapper,
.image-wrapper {
margin: 5px; margin: 5px;
.remove-btn { .remove-btn {
......
...@@ -4,40 +4,40 @@ ...@@ -4,40 +4,40 @@
<li v-for="(item, index) in allChat" :key="index"> <li v-for="(item, index) in allChat" :key="index">
<!-- <span v-if="item.fromInfo.name">{{item.fromInfo.name}}</span> --> <!-- <span v-if="item.fromInfo.name">{{item.fromInfo.name}}</span> -->
<div :style="{ color: item.action == 'send' ? '#199ed8' : '#999' }"> <div :style="{ color: item.action == 'send' ? '#199ed8' : '#999' }">
<span v-if="item.fromInfo">{{ item.fromInfo.name }}</span> <span v-if="item">{{ item.name }}</span>
<span <span
:style="{ color: item.action == 'send' ? '#199ed8' : '#999' }" :style="{ color: item.action == 'send' ? '#199ed8' : '#999' }"
>{{ parseTime(item.msgTime) }}</span >{{ item.msgTime }}</span
> >
</div> </div>
<div v-if="item.msgType == 'text'" class="msgtypetext"> <div v-if="item.msgType == 'text'" class="msgtypetext">
{{ item.text.content }} {{ JSON.parse(item.contact).content }}
</div> </div>
<div v-else-if="item.msgType == 'image'" class="msgtypeimg"> <div v-else-if="item.msgType == 'image'" class="msgtypeimg">
<img :src="item.image.attachment" @click="showImg(item)" /> <img :src="JSON.parse(item.contact).attachment" @click="showImg(JSON.parse(item.contact))" />
</div> </div>
<div <div
v-else-if="item.msgType == 'file'" v-else-if="item.msgType == 'file'"
class="msgtypefile" class="msgtypefile"
@click="down(item.file)" @click="down(JSON.parse(item.contact))"
> >
{{ item.file.fileName }} {{ JSON.parse(item.contact).fileName }}
</div> </div>
<div v-else-if="item.msgType == 'voice'" class="msgtypevoice"> <div v-else-if="item.msgType == 'voice'" class="msgtypevoice">
<i <i
class="el-icon-microphone" class="el-icon-microphone"
style=" font-size: 40px; color: #199ed8;" style=" font-size: 40px; color: #199ed8;"
@click="playVideo(item)" @click="playVideo(JSON.parse(item.contact))"
></i> ></i>
</div> </div>
<div v-else-if="item.msgType == 'emotion'" class="msgtypeimg"> <div v-else-if="item.msgType == 'emotion'" class="msgtypeimg">
<img :src="item.emotion.attachment" @click="showImg(item)" /> <img :src="JSON.parse(item.contact).attachment" @click="showImg(item)" />
</div> </div>
<div v-else-if="item.msgType == 'video'" class="msgtypevideo"> <div v-else-if="item.msgType == 'video'" class="msgtypevideo">
<i <i
class="el-icon-video-play" class="el-icon-video-play"
style=" font-size: 40px; color: #199ed8;" style=" font-size: 40px; color: #199ed8;"
@click="play(item, 'video')" @click="play(JSON.parse(item.contact), 'video')"
></i> ></i>
</div> </div>
<div v-else-if="item.msgType == 'location'" class="msgtypecard"> <div v-else-if="item.msgType == 'location'" class="msgtypecard">
...@@ -45,24 +45,24 @@ ...@@ -45,24 +45,24 @@
<el-amap <el-amap
ref="map" ref="map"
vid="amapDemo" vid="amapDemo"
:center="[item.location.longitude, item.location.latitude]" :center="[JSON.parse(item.contact).longitude, JSON.parse(item.contact).latitude]"
:zoom="zoom" :zoom="zoom"
class="amap-demo" class="amap-demo"
style="pointer-events: none;" style="pointer-events: none;"
> >
<el-amap-marker <el-amap-marker
:position="[item.location.longitude, item.location.latitude]" :position="[JSON.parse(item.contact).longitude, iJSON.parse(item.contact).latitude]"
></el-amap-marker> ></el-amap-marker>
</el-amap> </el-amap>
</div> </div>
<div class="card_foot">{{ item.location.address }}</div> <div class="card_foot">{{ JSON.parse(item.contact).address }}</div>
</div> </div>
<div v-else-if="item.msgType == 'weapp'" class="msgtypecard"> <div v-else-if="item.msgType == 'weapp'" class="msgtypecard">
<div class="card_name">{{ item.weApp.title }}</div> <div class="card_name">{{ JSON.parse(item.contact).title }}</div>
<div class="card_foot">小程序</div> <div class="card_foot">小程序</div>
</div> </div>
<div v-else-if="item.msgType == 'card'" class="msgtypecard "> <div v-else-if="item.msgType == 'card'" class="msgtypecard ">
<div class="card_name">{{ item.card.corpName }}</div> <div class="card_name">{{ JSON.parse(item.contact).corpName }}</div>
<div class="card_foot">个人名片</div> <div class="card_foot">个人名片</div>
</div> </div>
</li> </li>
...@@ -165,20 +165,20 @@ export default { ...@@ -165,20 +165,20 @@ export default {
mp3.pause() mp3.pause()
}, },
playVideo(e) { playVideo(e) {
this.vioceSrc = [e.voice.attachment] this.vioceSrc = [e.attachment]
this.diavioce = true this.diavioce = true
}, },
onBeforePlay(next) { onBeforePlay(next) {
next() // 开始播放 next() // 开始播放
}, },
showImg(e) { showImg(e) {
this.imgSrc = e.image.attachment this.imgSrc = e.attachment
this.dialogVisible = true this.dialogVisible = true
}, },
play(e) { play(e) {
this.dia = true this.dia = true
const player = this.$refs.videoPlayer.player const player = this.$refs.videoPlayer.player
this.playerOptions['sources'][0]['src'] = e.video.attachment this.playerOptions['sources'][0]['src'] = e.attachment
player.play() player.play()
}, },
down(e) { down(e) {
......
...@@ -8,18 +8,14 @@ ...@@ -8,18 +8,14 @@
@click="liClick(item)" @click="liClick(item)"
> >
<el-row style="padding:10px"> <el-row style="padding:10px">
<el-col :span="3" <el-col :span="3"><img :src="item.avatar"/></el-col>
><img :src="item.receiveWeUser.avatarMediaid"
/></el-col>
<el-col :span="21"> <el-col :span="21">
<p> <p>
{{ item.receiveWeUser.name }} {{ item.name }}
<span class="fr gray">{{ <span class="fr gray">{{ item.msgTime }}</span>
parseTime(item.finalChatContext.msgtime)
}}</span>
</p> </p>
<p class="gray padt10" v-if="item.finalChatContext.text"> <p class="gray padt10" v-if="item.contact">
{{ item.finalChatContext.text.content }} {{ JSON.parse(item.contact).content }}
</p> </p>
</el-col> </el-col>
</el-row> </el-row>
...@@ -58,7 +54,7 @@ export default { ...@@ -58,7 +54,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.list { .list {
overflow-y: scroll; overflow-y: scroll;
height: 651px; height: calc(100vh - 328px);
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
......
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList"> <div v-if="personList.length">
<ul> <ul>
<li <li
v-for="(item, index) in personList" v-for="(item, index) in personList"
:key="index" :key="index"
@click="liClick(item)" @click="liClick(item)"
> >
<el-row <el-row type="flex" v-if="item.msgType == 'text'">
style="padding:10px" <div class="ninebox">
v-if="item.finalChatContext.msgtype == 'text'" <ul v-if="item.avatar">
> <li v-for="(a, i) in item.avatar.split(',')" :key="i">
<span class="fl"> <img :src="a" />
<div class="ninebox"> </li>
<ul v-if="item.roomInfo"> </ul>
<li </div>
v-for="(a, i) in item.roomInfo.avatar.split(',')" <div class="fl" style="margin-left:8px;line-height:60px">
:key="i"
>
<img :src="a" />
</li>
</ul>
</div>
</span>
<span class="fl" style="margin-left:8px;line-height:60px">
<p> <p>
{{ item.finalChatContext.roomInfo.name }} {{ item.name }}
<span class="fr gray">{{ <!-- <span class="fr gray">{{ item.msgTime }}</span> -->
parseTime(item.finalChatContext.fromInfo.updateTime)
}}</span>
</p> </p>
<p class="gray" v-if="item.finalChatContext.fromInfo"> <!-- <p class="gray" v-if="item">
{{ item.finalChatContext.fromInfo.name }}:{{ {{ item.name }}:
item.finalChatContext.text.content {{ item.content }}
}} </p> -->
</p> </div>
</span>
</el-row> </el-row>
<!-- <el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='file'"> <!-- <el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='file'">
<el-col :span="3">&nbsp;</el-col> <el-col :span="3">&nbsp;</el-col>
...@@ -43,13 +32,15 @@ ...@@ -43,13 +32,15 @@
<p><span class="fr gray">{{parseTime(item.finalChatContext.msgtime)}}</span></p> <p><span class="fr gray">{{parseTime(item.finalChatContext.msgtime)}}</span></p>
<p class="gray padt10" >{{item.finalChatContext.from}}: <p class="gray padt10" >{{item.finalChatContext.from}}:
<span v-if="item.finalChatContext.file.fileext=='mp4'">[视频]</span> <span v-if="item.finalChatContext.file.fileext=='mp4'">[视频]</span>
</p> </p>
</el-col> </el-col>
</el-row> --> </el-row> -->
</li> </li>
</ul> </ul>
</div> </div>
<div v-else></div> <div class="ac" v-else>
暂无数据
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -80,6 +71,7 @@ export default { ...@@ -80,6 +71,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ninebox { .ninebox {
flex: none;
width: 54px; width: 54px;
height: 52px; height: 52px;
border: 1px solid #199ed8; border: 1px solid #199ed8;
...@@ -93,6 +85,7 @@ export default { ...@@ -93,6 +85,7 @@ export default {
} }
.list { .list {
overflow-y: scroll; overflow-y: scroll;
height: calc(100vh - 328px);
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
......
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList.length >= 1"> <div v-if="personList.length">
<ul> <ul>
<li <li
v-for="(item, index) in personList" v-for="(item, index) in personList"
...@@ -8,17 +8,17 @@ ...@@ -8,17 +8,17 @@
@click="liClick(item)" @click="liClick(item)"
> >
<el-row style="padding:10px"> <el-row style="padding:10px">
<span class="fl"> <span class="fl"> <img :src="item.avatar"/></span>
<img :src="item.finalChatContext.fromInfo.avatarMediaid"
/></span>
<span class="fl" style="margin-left:8px"> <span class="fl" style="margin-left:8px">
<p>{{ item.finalChatContext.fromInfo.name }}</p> <p>{{ item.name }}</p>
</span> </span>
</el-row> </el-row>
</li> </li>
</ul> </ul>
</div> </div>
<div v-else></div> <div class="ac" v-else>
暂无数据
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -51,7 +51,8 @@ export default { ...@@ -51,7 +51,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.list { .list {
overflow-y: scroll; overflow-y: scroll;
height: 708px; height: calc(100vh - 328px);
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
......
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList.length >= 1"> <div v-if="personList.length">
<ul> <ul>
<li <li
v-for="(item, index) in personList" v-for="(item, index) in personList"
:key="index" :key="index"
@click="liClick(item)" @click="liClick(item)"
> >
<el-row style="padding:10px"> <el-row>
<span class="fl"> <img :src="item.receiveWeCustomer.avatar"/></span> <span class="fl"> <img :src="item.avatar"/></span>
<span class="fl" style="margin-left:8px"> <span class="fl" style="margin-left:8px">
<p>{{ item.receiveWeCustomer.name }}</p> <p>{{ item.name }}</p>
</span> </span>
<!-- <span class="fl">
<p>{{ item.contact }}</p>
</span> -->
</el-row> </el-row>
</li> </li>
</ul> </ul>
</div> </div>
<div v-else></div> <div class="ac" v-else>
暂无数据
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -32,7 +37,6 @@ export default { ...@@ -32,7 +37,6 @@ export default {
defluat: false defluat: false
} }
}, },
data() { data() {
return { return {
loadings: true loadings: true
...@@ -42,6 +46,14 @@ export default { ...@@ -42,6 +46,14 @@ export default {
liClick(e) { liClick(e) {
console.log(e, 'liClick') console.log(e, 'liClick')
this.$emit('chatFn', e) this.$emit('chatFn', e)
},
msgContentType(type, msg) {
console.log(type, msg, 'msgContentType')
//消息获取
/*case msg = JSON.parse(msg);
switch (type){
case "text":
}*/
} }
} }
} }
...@@ -49,7 +61,7 @@ export default { ...@@ -49,7 +61,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.list { .list {
overflow-y: scroll; overflow-y: scroll;
height: 708px; height: calc(100vh - 328px);
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</el-input> </el-input>
</div> </div>
</div> </div>
<div class="ct_box ct_boxFirst"> <div class="ct_box ct_boxFirst" style="height: calc(100vh - 288px)">
<ul> <ul>
<li <li
v-for="(i, t) in CList" v-for="(i, t) in CList"
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
placeholder="搜索聊天记录" placeholder="搜索聊天记录"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="chatContent" v-model="chatContent"
@keyup.enter.native="chatMsgList"
> >
</el-input> </el-input>
</div> </div>
...@@ -249,7 +250,7 @@ import list from '../component/customerList.vue' ...@@ -249,7 +250,7 @@ import list from '../component/customerList.vue'
import chats from '../component/chat.vue' import chats from '../component/chat.vue'
import grouplist from '../component/groupList.vue' import grouplist from '../component/groupList.vue'
import { content } from '@/api/content.js' import { content } from '@/api/conversation/content.js'
import { yearMouthDay } from '@/utils/common.js' import { yearMouthDay } from '@/utils/common.js'
export default { export default {
components: { components: {
...@@ -271,7 +272,7 @@ export default { ...@@ -271,7 +272,7 @@ export default {
CList: [], CList: [],
personList: [], personList: [],
loading: false, loading: false,
employId: '', fromId: '',
chatData: {}, chatData: {},
allChat: [], allChat: [],
...@@ -288,7 +289,7 @@ export default { ...@@ -288,7 +289,7 @@ export default {
methods: { methods: {
chatFn(data) { chatFn(data) {
this.chatData = data this.chatData = data
console.log(data) console.log(data, '<><><><>><')
this.activeNameThreeClick() this.activeNameThreeClick()
}, },
groupFn(data) { groupFn(data) {
...@@ -305,29 +306,43 @@ export default { ...@@ -305,29 +306,43 @@ export default {
personCheck(data, e) { personCheck(data, e) {
this.personIndex = e this.personIndex = e
this.talkName = data.name this.talkName = data.name
this.employId = data.externalUserid this.fromId = data.externalUserid
this.getChatList() this.getChatList()
}, },
getChatList(flag) { getChatList(flag) {
if (!this.employId) { if (!this.fromId) {
return return
} }
if (flag) { if (flag) {
this.loading = true this.loading = true
} }
this.personList = [] this.personList = []
content if (this.activeName == '0') {
.getTree({ content
fromId: this.employId, .selectAloneChatList({
searchType: this.activeName fromId: this.fromId,
}) contact: this.chatContent
.then(({ rows }) => { })
this.loading = false .then(({ data }) => {
this.personList = rows this.loading = false
}) this.personList = data
.catch((err) => { })
this.loading = false .catch((err) => {
}) this.loading = false
})
} else {
content
.getGroupChatList({
fromId: this.fromId
})
.then(({ data }) => {
this.loading = false
this.personList = data
})
.catch((err) => {
this.loading = false
})
}
}, },
activeNameThreeClick(page, group) { activeNameThreeClick(page, group) {
if (!!!page) { if (!!!page) {
...@@ -345,8 +360,8 @@ export default { ...@@ -345,8 +360,8 @@ export default {
} else if (this.activeNameThree == 4) { } else if (this.activeNameThree == 4) {
msgType = 'voice' msgType = 'voice'
} }
let query = { let query = {
fromId: this.chatData.fromId,
msgType, msgType,
pageSize: '10', pageSize: '10',
pageNum: this.currentPage, pageNum: this.currentPage,
...@@ -354,12 +369,13 @@ export default { ...@@ -354,12 +369,13 @@ export default {
endTime: this.takeTime ? yearMouthDay(this.takeTime[1]) : '' endTime: this.takeTime ? yearMouthDay(this.takeTime[1]) : ''
} }
if (group) { if (group) {
query.roomId = this.chatData.roomId query.roomId = this.chatData.receiver
} else { } else {
query.receiveId = this.chatData.receiveId query.fromId = this.fromId
query.toList = this.chatData.receiver
} }
if (group) { if (group) {
content.chatGrounpList(query).then((res) => { content.chatList(query).then((res) => {
this.total = Number(res.total) this.total = Number(res.total)
this.resortData(res) this.resortData(res)
}) })
...@@ -392,11 +408,6 @@ export default { ...@@ -392,11 +408,6 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 999, pageSize: 999,
name: this.employName, name: this.employName,
userId: '',
tagIds: '',
beginTime: '',
endTime: '',
status: '',
isOpenChat: '1' isOpenChat: '1'
} }
content.listByCustomer(querys).then((res) => { content.listByCustomer(querys).then((res) => {
...@@ -404,6 +415,9 @@ export default { ...@@ -404,6 +415,9 @@ export default {
this.CList = res.rows this.CList = res.rows
this.employAmount = res.total this.employAmount = res.total
}) })
},
chatMsgList() {
this.getChatList()
} }
}, },
mounted() { mounted() {
...@@ -426,7 +440,6 @@ export default { ...@@ -426,7 +440,6 @@ export default {
.employ { .employ {
background: #f6f6f9; background: #f6f6f9;
min-height: 800px;
.hd_tabs { .hd_tabs {
background: #fff; background: #fff;
...@@ -446,7 +459,6 @@ export default { ...@@ -446,7 +459,6 @@ export default {
.hd_tabs_content { .hd_tabs_content {
width: 100%; width: 100%;
min-height: 653px;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
} }
...@@ -458,13 +470,11 @@ export default { ...@@ -458,13 +470,11 @@ export default {
} }
.ct_boxFirst { .ct_boxFirst {
height: 700px;
} }
.ct_box { .ct_box {
background: white; background: white;
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
min-height: 709px;
padding: 10px; padding: 10px;
overflow-y: scroll; overflow-y: scroll;
color: #999; color: #999;
......
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
groupId: undefined, groupId: undefined,
memberName: undefined, name: undefined,
}, },
joinScene: { joinScene: {
1: '由成员邀请入群(直接邀请入群)', 1: '由成员邀请入群(直接邀请入群)',
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
<el-input <el-input
size="normal" size="normal"
placeholder="请输入群成员" placeholder="请输入群成员"
v-model="query.memberName" v-model="query.name"
class class
> >
<el-button type="primary" slot="append" @click="getList(1)"> <el-button type="primary" slot="append" @click="getList(1)">
...@@ -94,9 +94,9 @@ export default { ...@@ -94,9 +94,9 @@ export default {
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column width="55" /> <el-table-column width="55" />
<el-table-column label="群成员" prop="memberName"> <el-table-column label="群成员" prop="name">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.memberName }} {{ scope.row.name }}
<!-- <span <!-- <span
:style="{color: scope.row.joinType == 1 ? '#4bde03' : '#f9a90b'}" :style="{color: scope.row.joinType == 1 ? '#4bde03' : '#f9a90b'}"
>{{ ({1: '@微信', 2: '@企业微信'})[scope.row.joinType] }}</span>--> >{{ ({1: '@微信', 2: '@企业微信'})[scope.row.joinType] }}</span>-->
......
...@@ -49,11 +49,7 @@ export default { ...@@ -49,11 +49,7 @@ export default {
<template> <template>
<div class="page"> <div class="page">
<el-steps <el-steps :active="active" finish-status="success" align-center>
:active="active"
finish-status="success"
align-center
>
<el-step title="基本信息" description="设置群活码基本信息"></el-step> <el-step title="基本信息" description="设置群活码基本信息"></el-step>
<el-step title="实际群码" description="添加并管理微信实际群码"></el-step> <el-step title="实际群码" description="添加并管理微信实际群码"></el-step>
<el-step title="群活码" description="设置完成后生成群活码"></el-step> <el-step title="群活码" description="设置完成后生成群活码"></el-step>
...@@ -61,17 +57,25 @@ export default { ...@@ -61,17 +57,25 @@ export default {
<div class="page-content"> <div class="page-content">
<div v-if="active === 0"> <div v-if="active === 0">
<BaseInfo ref="baseInfo" :groupCodeId="groupCodeId" @next="next"></BaseInfo> <BaseInfo
ref="baseInfo"
:groupCodeId="groupCodeId"
@next="next"
></BaseInfo>
</div> </div>
<div v-if="active === 1"> <div v-if="active === 1">
<RealCode ref="realCode" :groupCodeId="groupCodeId" @next="next"></RealCode> <RealCode
ref="realCode"
:groupCodeId="groupCodeId"
@next="next"
></RealCode>
</div> </div>
<div v-if="active === 2"> <div v-if="active === 2">
<GroupCode :groupCodeId="groupCodeId"></GroupCode> <GroupCode :groupCodeId="groupCodeId"></GroupCode>
</div> </div>
</div> </div>
<div class="fr"> <div class="ac">
<template v-if="active === 0"> <template v-if="active === 0">
<el-button @click="$router.back()"> 取消 </el-button> <el-button @click="$router.back()"> 取消 </el-button>
<el-button type="primary" @click="handleGroupCode"> 下一步 </el-button> <el-button type="primary" @click="handleGroupCode"> 下一步 </el-button>
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
query: { query: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
companyName: '', companyName: ''
}, },
total: 0, total: 0,
form: {}, form: {},
...@@ -22,9 +22,9 @@ export default { ...@@ -22,9 +22,9 @@ export default {
companyName: [{ required: true, message: '必填项', trigger: 'blur' }], companyName: [{ required: true, message: '必填项', trigger: 'blur' }],
corpId: [{ required: true, message: '必填项', trigger: 'blur' }], corpId: [{ required: true, message: '必填项', trigger: 'blur' }],
corpSecret: [{ required: true, message: '必填项', trigger: 'blur' }], corpSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
contactSecret: [{ required: true, message: '必填项', trigger: 'blur' }], contactSecret: [{ required: true, message: '必填项', trigger: 'blur' }]
}), }),
status: ['正常', '停用'], status: ['正常', '停用']
} }
}, },
watch: {}, watch: {},
...@@ -75,8 +75,8 @@ export default { ...@@ -75,8 +75,8 @@ export default {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
this.getList() this.getList()
}) })
}, }
}, }
} }
</script> </script>
...@@ -271,6 +271,9 @@ export default { ...@@ -271,6 +271,9 @@ export default {
<el-form-item label="会话私钥" prop="financePrivateKey"> <el-form-item label="会话私钥" prop="financePrivateKey">
<el-input v-model="form.financePrivateKey"></el-input> <el-input v-model="form.financePrivateKey"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="消息提醒agentId" prop="agentId">
<el-input v-model="form.agentId"></el-input>
</el-form-item>
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
......
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
// 新建素材按钮 // 新建素材按钮
goRoute() { goRoute() {
let contentType = ['text', 'image', 'file'] let contentType = ['text', 'image', 'file']
window.open('#/material/' + contentType[this.activeName]) window.open('#/customerMaintain/material/' + contentType[this.activeName])
}, },
// 选择素材确认按钮 // 选择素材确认按钮
submitSelectMaterial(text, image, file) { submitSelectMaterial(text, image, file) {
......
...@@ -259,8 +259,7 @@ ...@@ -259,8 +259,7 @@
</template> </template>
<script> <script>
var elementResizeDetectorMaker = require('element-resize-detector') var elementResizeDetectorMaker = require('element-resize-detector')
import { arrData } from '@/utils/common.js' import { content } from '@/api/conversation/content.js'
import { content } from '@/api/content.js'
import echarts from 'echarts' import echarts from 'echarts'
export default { export default {
name: 'Index', name: 'Index',
...@@ -319,12 +318,6 @@ export default { ...@@ -319,12 +318,6 @@ export default {
} }
}, },
methods: { methods: {
canvansData(obj, name, arr, btmarr, color) {
let bkdata = arrData(this.erchatsTable.dataList)
let data = bkdata[arr]
this.xAxis = bkdata[btmarr]
this.drawLine(obj, name, data, color)
},
timeTypeCheck(type) { timeTypeCheck(type) {
switch (type) { switch (type) {
case 'today': case 'today':
...@@ -360,10 +353,25 @@ export default { ...@@ -360,10 +353,25 @@ export default {
}) })
}, },
serErchat() { serErchat() {
this.canvansData('main', ['发起申请数'], 'arr1', 'btm1', '#088AEE') let data = {
this.canvansData('main2', ['新增客户数'], 'arr2', 'btm2', '#E74E59') arr1: [],
this.canvansData('main3', ['群新增人数'], 'arr3', 'btm3', '#14BF48') arr2: [],
this.canvansData('main4', ['流失客户数'], 'arr4', 'btm4', '#FA7216') arr3: [],
arr4: [],
time: []
}
this.erchatsTable.dataList.forEach((a) => {
data.arr1.push(a.newApplyCnt)
data.time.push(a.xtime)
data.arr3.push(a.newMemberCnt)
data.arr2.push(a.newContactCnt)
data.arr4.push(a.negativeFeedbackCnt)
})
this.xAxis = data.time
this.drawLine('main', ['发起申请数'], data.arr1, '#088AEE')
this.drawLine('main2', ['新增客户数'], data.arr2, '#E74E59')
this.drawLine('main3', ['群新增人数'], data.arr3, '#14BF48')
this.drawLine('main4', ['流失客户数'], data.arr4, '#FA7216')
}, },
drawLine(id, arrData, data, color) { drawLine(id, arrData, data, color) {
let obj = document.getElementById(id) let obj = document.getElementById(id)
......
'use strict' 'use strict'
const path = require('path') const path = require('path')
const performancePlugin = require('performance_test_plugins_milk')
function resolve(dir) { function resolve(dir) {
return path.join(__dirname, dir) return path.join(__dirname, dir)
...@@ -14,7 +13,7 @@ module.exports = { ...@@ -14,7 +13,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.xx.cn/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.xx.cn/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.xx.cn/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.xx.cn/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', publicPath: process.env.VUE_APP_BASE_URL || '/',
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: 'dist', outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
...@@ -35,30 +34,27 @@ module.exports = { ...@@ -35,30 +34,27 @@ module.exports = {
target: process.env.VUE_APP_BASE_API, target: process.env.VUE_APP_BASE_API,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^/api']: '', ['^/api']: ''
}, }
}, }
}, },
disableHostCheck: true, disableHostCheck: true
// https: true, // https: true,
}, },
css: { css: {
loaderOptions: { loaderOptions: {
sass: { sass: {
//依次导入的公用的scss变量,公用的scss混入,共用的默认样式 //依次导入的公用的scss变量,公用的scss混入,共用的默认样式
prependData: `@import "./src/styles/variables.scss";`, prependData: `@import "./src/styles/variables.scss";`
}, }
}, }
}, },
configureWebpack: { configureWebpack: {
resolve: { resolve: {
alias: { alias: {
'@': resolve('src'), '@': resolve('src')
}, }
}, }
plugins: [
new performancePlugin()
]
}, },
chainWebpack(config) { chainWebpack(config) {
// 修复HMR // 修复HMR
...@@ -76,7 +72,7 @@ module.exports = { ...@@ -76,7 +72,7 @@ module.exports = {
.use('svg-sprite-loader') .use('svg-sprite-loader')
.loader('svg-sprite-loader') .loader('svg-sprite-loader')
.options({ .options({
symbolId: 'icon-[name]', symbolId: 'icon-[name]'
}) })
.end() .end()
...@@ -85,8 +81,8 @@ module.exports = { ...@@ -85,8 +81,8 @@ module.exports = {
rel: 'preload', rel: 'preload',
// to ignore runtime.js // to ignore runtime.js
fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/], fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
include: 'initial', include: 'initial'
}, }
]) ])
// when there are many pages, it will cause too many meaningless requests // when there are many pages, it will cause too many meaningless requests
...@@ -99,8 +95,8 @@ module.exports = { ...@@ -99,8 +95,8 @@ module.exports = {
.use('script-ext-html-webpack-plugin', [ .use('script-ext-html-webpack-plugin', [
{ {
// `runtime` must same as runtimeChunk name. default is `runtime` // `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/, inline: /runtime\..*\.js$/
}, }
]) ])
.end() .end()
...@@ -117,27 +113,27 @@ module.exports = { ...@@ -117,27 +113,27 @@ module.exports = {
name: 'chunk-libs', name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
priority: 10, priority: 10,
chunks: 'initial', // only package third parties that are initially dependent chunks: 'initial' // only package third parties that are initially dependent
}, },
elementUI: { elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
}, },
commons: { commons: {
name: 'chunk-commons', name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number minChunks: 3, // minimum common number
priority: 5, priority: 5,
reuseExistingChunk: true, reuseExistingChunk: true
}, }
}, }
}) })
config.optimization.runtimeChunk('single'), config.optimization.runtimeChunk('single'),
{ {
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
to: './', //到根目录下 to: './' //到根目录下
} }
}) })
}, }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!