no message
BIN
src/assets/img/crm/board.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/img/crm/business.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/assets/img/crm/contacts.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/assets/img/crm/contract.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/assets/img/crm/customer.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/assets/img/crm/customer_not.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/crm/invoice.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/assets/img/crm/leads.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/img/crm/leads_not.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/img/crm/marketing.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/img/crm/nearby.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/crm/nearby_not.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/crm/product.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/img/crm/receivables.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/assets/img/crm/receivables_plan.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/assets/img/crm/seas.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/img/crm/seas_not.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/crm/todo.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/img/crm/visit.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
80
src/components/Flexbox/Flexbox.vue
Executable file
@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{
|
||||
'vux-flex-col': orient === 'vertical',
|
||||
'vux-flex-row': orient === 'horizontal'
|
||||
}"
|
||||
:style="styles"
|
||||
class="vux-flexbox">
|
||||
<slot/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Flexbox',
|
||||
props: {
|
||||
gutter: {
|
||||
type: Number,
|
||||
default: 8
|
||||
},
|
||||
orient: {
|
||||
type: String,
|
||||
default: 'horizontal'
|
||||
},
|
||||
justify: String,
|
||||
align: String,
|
||||
wrap: String,
|
||||
direction: String
|
||||
},
|
||||
computed: {
|
||||
styles() {
|
||||
const styles = {
|
||||
'justify-content': this.justify,
|
||||
'-webkit-justify-content': this.justify,
|
||||
'align-items': this.align,
|
||||
'-webkit-align-items': this.align,
|
||||
'flex-wrap': this.wrap,
|
||||
'-webkit-flex-wrap': this.wrap,
|
||||
'flex-direction': this.direction,
|
||||
'-webkit-flex-direction': this.direction
|
||||
}
|
||||
return styles
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.vux-flexbox {
|
||||
text-align: left;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
box-align: center;
|
||||
align-items: center;
|
||||
.vux-flexbox-item {
|
||||
flex: 1;
|
||||
-webkit-flex: 1;
|
||||
min-width: 20px;
|
||||
width: 0%;
|
||||
&:first-child {
|
||||
margin-left: 0 !important;
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vux-flex-row {
|
||||
box-direction: row;
|
||||
box-orient: horizontal;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.vux-flex-col {
|
||||
box-orient: vertical;
|
||||
flex-direction: column;
|
||||
> .vux-flexbox-item {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
62
src/components/Flexbox/FlexboxItem.vue
Executable file
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div
|
||||
:style="style"
|
||||
class="vux-flexbox-item">
|
||||
<slot/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const prefixList = ['-moz-box-', '-webkit-box-', '']
|
||||
|
||||
export default {
|
||||
name: 'FlexboxItem',
|
||||
props: {
|
||||
span: [Number, String],
|
||||
order: [Number, String]
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bodyWidth: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
style() {
|
||||
const styles = {}
|
||||
const marginName =
|
||||
this.$parent.orient === 'horizontal' ? 'marginLeft' : 'marginTop'
|
||||
|
||||
if (this.$parent.gutter * 1 !== 0) {
|
||||
styles[marginName] = `${this.$parent.gutter}px`
|
||||
}
|
||||
|
||||
if (this.span) {
|
||||
for (let i = 0; i < prefixList.length; i++) {
|
||||
styles[`${prefixList[i]}flex`] = `0 0 ${this.buildWidth(this.span) *
|
||||
100}%`
|
||||
}
|
||||
}
|
||||
if (typeof this.order !== 'undefined') {
|
||||
styles.order = this.order
|
||||
}
|
||||
return styles
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
this.bodyWidth = document.documentElement.offsetWidth
|
||||
},
|
||||
methods: {
|
||||
buildWidth(width) {
|
||||
if (typeof width === 'number') {
|
||||
if (width < 1) {
|
||||
return width
|
||||
} else {
|
||||
return width / 12
|
||||
}
|
||||
} else if (typeof width === 'string') {
|
||||
return width.replace('px', '') / this.bodyWidth
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
7
src/components/Flexbox/index.js
Executable file
@ -0,0 +1,7 @@
|
||||
import Flexbox from './Flexbox'
|
||||
import FlexboxItem from './FlexboxItem'
|
||||
|
||||
export {
|
||||
Flexbox,
|
||||
FlexboxItem
|
||||
}
|
99
src/components/XrMenu/XrMenuItem.vue
Normal file
@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{'is-select':select}"
|
||||
class="xr-menu-item">
|
||||
<i
|
||||
:style="{backgroundColor: select ? iconColor || '#2362FB' : '#edf2f6'}"
|
||||
:class="['xr-menu-item__icon', iconClass]" />
|
||||
<span class="xr-menu-item__label">{{ label }}</span>
|
||||
<el-badge
|
||||
v-if="num > 0"
|
||||
:max="99"
|
||||
:value="num"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
// 菜单
|
||||
name: 'XrMenuItem',
|
||||
components: {},
|
||||
props: {
|
||||
iconClass: String,
|
||||
iconColor: String,
|
||||
label: String,
|
||||
// 关键字
|
||||
name: String,
|
||||
num: [String, Number],
|
||||
select: Boolean
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
mounted() {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.xr-menu-item {
|
||||
padding: 12px 20px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
|
||||
&__icon {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
padding: 6px;
|
||||
/* border-radius: $xr-border-radius-base;*/
|
||||
background-color: #edf2f6;
|
||||
color: #8a94a6;;
|
||||
}
|
||||
|
||||
&__label {
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
&.is-select {
|
||||
.xr-menu-item__icon {
|
||||
/* background-color: $xr-color-primary;*/
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.xr-menu-item.is-select,
|
||||
.xr-menu-item:hover {
|
||||
background-color: #f6f8fa;
|
||||
}
|
||||
|
||||
.xr-menu-item::before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 2px;
|
||||
background-color: #2362fb;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.xr-menu-item.is-select::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.el-badge .el-badge__content {
|
||||
border: none;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.el-badge {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 15px;
|
||||
}
|
||||
</style>
|
48
src/components/XrMenu/index.vue
Normal file
@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div>
|
||||
<xr-menu-item
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:name="item.name"
|
||||
:icon-color="item.iconColor"
|
||||
:icon-class="item.iconClass"
|
||||
@click.native="menuClick(index)"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import XrMenuItem from './XrMenuItem'
|
||||
|
||||
export default {
|
||||
// 菜单
|
||||
name: 'XrMenu',
|
||||
components: {
|
||||
XrMenuItem
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: 0
|
||||
},
|
||||
list: Array
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
mounted() {},
|
||||
|
||||
beforeDestroy() {},
|
||||
methods: {
|
||||
menuClick(index) {
|
||||
this.$emit('input', index)
|
||||
this.$emit('select', index)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
@ -49,7 +49,7 @@
|
||||
<td>
|
||||
<x-item v-model="data" :item="item"></x-item>
|
||||
</td>
|
||||
<td v-if="item.operators.length>0">
|
||||
<td v-if="item.operators && item.operators.length>0">
|
||||
<el-select v-model="item.operator" placeholder="运算符">
|
||||
<el-option v-for="ope in item.operators || operator" :key="ope.value" v-bind="ope"></el-option>
|
||||
</el-select>
|
||||
|
@ -3,7 +3,7 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="x-dialog" ref="xDialog">
|
||||
<el-dialog ref="dialog" v-model="dialogVisible" :fullscreen="isFullscreen" v-bind="$attrs" :show-close="false">
|
||||
<el-dialog ref="dialog" :draggable="true" v-model="dialogVisible" :fullscreen="isFullscreen" v-bind="$attrs" :show-close="false">
|
||||
<template #header>
|
||||
<slot name="header">
|
||||
<span class="el-dialog__title">{{ title }}</span>
|
||||
|
@ -1,10 +1,5 @@
|
||||
<!--
|
||||
* @Descripttion: 处理iframe持久化,涉及store(VUEX)
|
||||
* @version: 1.0
|
||||
* @Author: sakuya
|
||||
* @Date: 2021年6月30日13:20:41
|
||||
* @LastEditors:
|
||||
* @LastEditTime:
|
||||
-->
|
||||
|
||||
<template>
|
||||
@ -47,6 +42,15 @@
|
||||
methods: {
|
||||
push(route){
|
||||
if(route.meta.type == 'iframe'){
|
||||
|
||||
|
||||
// 是否最大化打开
|
||||
if (route.meta.maximize) {
|
||||
document.getElementById('app').classList.add('main-maximize')
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(this.ismobile || !this.layoutTags){
|
||||
this.$store.commit("setIframeList", route)
|
||||
}else{
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</header>
|
||||
<section class="aminui-wrapper">
|
||||
<div v-if="!ismobile && nextMenu.length>0 || !pmenu.component" :class="menuIsCollapse?'aminui-side isCollapse':'aminui-side'">
|
||||
<div v-if="!ismobile && nextMenu.length>0" :class="menuIsCollapse?'aminui-side isCollapse':'aminui-side'">
|
||||
<div v-if="!menuIsCollapse" class="adminui-side-top" style="height:35px; line-height:35px">
|
||||
<h2 style="text-align: center;">{{ pmenu.meta.title }}</h2>
|
||||
</div>
|
||||
@ -37,7 +37,7 @@
|
||||
<Side-m v-if="ismobile"></Side-m>
|
||||
<div class="aminui-body el-container">
|
||||
<!-- <Topbar v-if="!ismobile"></Topbar> -->
|
||||
<Tags v-if="!ismobile && layoutTags"></Tags>
|
||||
<Tags ref="tags" v-if="!ismobile && layoutTags"></Tags>
|
||||
<div class="adminui-main" id="adminui-main">
|
||||
<router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
@ -79,7 +79,7 @@
|
||||
<Side-m v-if="ismobile"></Side-m>
|
||||
<div class="aminui-body el-container">
|
||||
<Topbar v-if="!ismobile"></Topbar>
|
||||
<Tags v-if="!ismobile && layoutTags"></Tags>
|
||||
<Tags ref="tags" v-if="!ismobile && layoutTags"></Tags>
|
||||
<div class="adminui-main" id="adminui-main">
|
||||
<router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
@ -113,7 +113,7 @@
|
||||
</header>
|
||||
<section class="aminui-wrapper">
|
||||
<div class="aminui-body el-container">
|
||||
<Tags v-if="!ismobile && layoutTags"></Tags>
|
||||
<Tags ref="tags" v-if="!ismobile && layoutTags"></Tags>
|
||||
<div class="adminui-main" id="adminui-main">
|
||||
<router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
@ -167,7 +167,7 @@
|
||||
<Topbar>
|
||||
<userbar></userbar>
|
||||
</Topbar>
|
||||
<Tags v-if="!ismobile && layoutTags"></Tags>
|
||||
<Tags ref="tags" v-if="!ismobile && layoutTags"></Tags>
|
||||
<div class="adminui-main" id="adminui-main">
|
||||
<router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }">
|
||||
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
|
||||
@ -273,7 +273,7 @@
|
||||
showMenu(route) {
|
||||
this.pmenu = route;
|
||||
this.nextMenu = this.filterUrl(route.children);
|
||||
if((!route.children || route.children.length == 0) && route.component){
|
||||
if((!route.children || route.children.length == 0) && ( route.meta.type=='iframe' || route.component)){
|
||||
this.$router.push({path: route.path})
|
||||
}
|
||||
},
|
||||
|
@ -76,7 +76,7 @@ a,button,input,textarea{-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing: bo
|
||||
.right-panel-search {display: flex;align-items: center;}
|
||||
.right-panel-search > * + * {margin-left:10px;}
|
||||
|
||||
.adminui-tags {height:35px;background: #fff;border-bottom: 1px solid #e6e6e6;}
|
||||
.adminui-tags {height:34px;background: #fff;border-bottom: 1px solid #e6e6e6;}
|
||||
.adminui-tags ul {display: flex;overflow: hidden;}
|
||||
.adminui-tags li {cursor: pointer;display: inline-block;float: left;height:34px;line-height: 34px;position: relative;flex-shrink: 0;}
|
||||
.adminui-tags li::after {content: " ";width:1px;height:100%;position: absolute;right:0px;background-image: linear-gradient(#fff, #e6e6e6);}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<template v-else>
|
||||
<el-col :lg="12">
|
||||
<h2>{{form.meta.title || "新增菜单"}}</h2>
|
||||
<el-form :model="form" :rules="rules" ref="dialogForm" label-width="80px" label-position="left">
|
||||
<el-form :model="form" :rules="rules" ref="dialogForm" label-width="100px" label-position="left">
|
||||
<el-form-item label="显示名称" prop="meta.title">
|
||||
<el-input v-model="form.meta.title" clearable placeholder="菜单显示名字"></el-input>
|
||||
</el-form-item>
|
||||
@ -55,6 +55,9 @@
|
||||
<el-form-item label="整页路由" prop="fullpage">
|
||||
<el-switch v-model="form.meta.fullpage" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最大化打开" prop="maximize" v-if="form.meta.type=='iframe'">
|
||||
<el-switch v-model="form.meta.maximize" />
|
||||
</el-form-item>
|
||||
<el-form-item label="表单名称" prop="tablename">
|
||||
<el-input v-model="form.meta.tablename" clearable placeholder="表单名称,读取配置及表头"></el-input>
|
||||
</el-form-item>
|
||||
|
@ -79,7 +79,10 @@
|
||||
},
|
||||
async submit(){
|
||||
this.submitloading = true;
|
||||
this.$http.post('system/setting/submit', {info:this.info,extend:this.extend});
|
||||
var res = this.$http.post('system/setting/submit', {info:this.info,extend:this.extend});
|
||||
this.submitloading = false;
|
||||
this.$message.success(res.message || "操作成功")
|
||||
|
||||
},
|
||||
table_add(){
|
||||
var newRow = {
|
||||
|
@ -40,28 +40,28 @@
|
||||
<el-form-item label="操作部分" prop="key">
|
||||
<el-checkbox-group v-model="form.operationtype">
|
||||
<el-checkbox-button label="plus">添加</el-checkbox-button>
|
||||
<el-checkbox-button label="delete">删除</el-checkbox-button>
|
||||
<el-checkbox-button label="edit">编辑</el-checkbox-button>
|
||||
<el-checkbox-button label="delete">删除</el-checkbox-button>
|
||||
<el-checkbox-button label="batchdeletion">批量删除</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="10" v-show="form.operationtype.includes('batchdeletion')">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="批量删除按钮" prop="label">
|
||||
<el-input v-model="form.operation.batchdeletion.label" placeholder="名称"></el-input>
|
||||
<el-row :gutter="10" v-show="form.operationtype.includes('plus')">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="添加按钮" prop="key">
|
||||
<el-input v-model="form.operation.plus.label" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="批量删除请求" prop="url">
|
||||
<el-input v-model="form.operation.batchdeletion.url" placeholder="请求 URL"></el-input>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="添加请求" prop="plus">
|
||||
<el-input v-model="form.operation.plus.url" placeholder="请求 URL"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="form.operation.batchdeletion.type" placeholder="选择">
|
||||
<el-select v-model="form.operation.plus.type" placeholder="选择">
|
||||
<el-option value="primary" key="primary" label="Primary"> Primary </el-option>
|
||||
<el-option value="success" key="success" label="Success"> Success </el-option>
|
||||
<el-option value="warning" key="warning" label="Warning"> Warning </el-option>
|
||||
@ -71,19 +71,26 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="远程链接" prop="edit">
|
||||
<el-input v-model="form.operation.plus.remoteurl" placeholder="远程链接, 添加此链接由远程配置调用"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-show="form.operationtype.includes('edit')">
|
||||
<el-col :span="6">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="编辑按钮" prop="key">
|
||||
<el-input v-model="form.operation.edit.label" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="编辑请求" prop="edit">
|
||||
<el-input v-model="form.operation.edit.url" placeholder="请求 URL"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="form.operation.edit.type" placeholder="选择">
|
||||
<el-option value="primary" key="primary" label="Primary"> Primary </el-option>
|
||||
@ -95,19 +102,25 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="远程链接" prop="edit">
|
||||
<el-input v-model="form.operation.edit.remoteurl" placeholder="远程链接, 添加此链接由远程配置调用"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-show="form.operationtype.includes('delete')">
|
||||
<el-col :span="6">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="下架按钮" prop="key">
|
||||
<el-input v-model="form.operation.delete.label" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="下架请求" prop="delete">
|
||||
<el-input v-model="form.operation.delete.url" placeholder="请求 URL"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="form.operation.delete.type" placeholder="选择">
|
||||
<el-option value="primary" key="primary" label="Primary"> Primary </el-option>
|
||||
@ -120,20 +133,22 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-show="form.operationtype.includes('plus')">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="添加按钮" prop="key">
|
||||
<el-input v-model="form.operation.plus.label" placeholder="名称"></el-input>
|
||||
|
||||
|
||||
<el-row :gutter="10" v-show="form.operationtype.includes('batchdeletion')">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="批量删除按钮" prop="label">
|
||||
<el-input v-model="form.operation.batchdeletion.label" placeholder="名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="添加请求" prop="plus">
|
||||
<el-input v-model="form.operation.plus.url" placeholder="请求 URL"></el-input>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批量删除请求" prop="url">
|
||||
<el-input v-model="form.operation.batchdeletion.url" placeholder="请求 URL"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="form.operation.plus.type" placeholder="选择">
|
||||
<el-select v-model="form.operation.batchdeletion.type" placeholder="选择">
|
||||
<el-option value="primary" key="primary" label="Primary"> Primary </el-option>
|
||||
<el-option value="success" key="success" label="Success"> Success </el-option>
|
||||
<el-option value="warning" key="warning" label="Warning"> Warning </el-option>
|
||||
@ -146,6 +161,7 @@
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
<sc-title title="统计标签"></sc-title>
|
||||
<sc-form-table v-model="form.stat" :addTemplate="addTemplate" drag-sort placeholder="暂无数据">
|
||||
<el-table-column prop="label" label="名称">
|
||||
|
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" @selection-change="selectionChange" stripe remoteSort remoteFilter>
|
||||
<scTable ref="table" @selection-change="selectionChange" stripe remoteSort remoteFilter>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column label="UID" prop="uid" width="80" sortable='custom'></el-table-column>
|
||||
<el-table-column label="头像" width="80" column-key="filterAvatar" :filters="[{text: '已上传', value: '1'}, {text: '未上传', value: '0'}]">
|
||||
@ -74,7 +74,6 @@
|
||||
showGrouploading: false,
|
||||
groupFilterText: '',
|
||||
group: [],
|
||||
apiObj: this.$api.system.user.list,
|
||||
selection: [],
|
||||
search: {
|
||||
name: null
|
||||
@ -149,7 +148,10 @@
|
||||
//加载树数据
|
||||
async getGroup(){
|
||||
this.showGrouploading = true;
|
||||
var res = await this.$api.system.dept.list.get();
|
||||
// var res = await this.$api.system.dept.list.get();
|
||||
var res = {
|
||||
data:[]
|
||||
};
|
||||
this.showGrouploading = false;
|
||||
var allNode ={id: '', label: '所有'}
|
||||
res.data.unshift(allNode);
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close @closed="$emit('closed')">
|
||||
<x-dialog :title="titleMap[mode]" v-model="visible" :width="500" destroy-on-close @closed="$emit('closed')">
|
||||
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="left">
|
||||
<el-form-item label="头像" prop="avatar">
|
||||
<sc-upload v-model="form.avatar" title="上传头像"></sc-upload>
|
||||
@ -31,7 +31,7 @@
|
||||
<el-button @click="visible=false" >取 消</el-button>
|
||||
<el-button v-if="mode!='show'" type="primary" :loading="isSaveing" @click="submit()">保 存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</x-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
663
src/views/user/trajectory/compenents/CRMMessage.vue
Normal file
@ -0,0 +1,663 @@
|
||||
<template>
|
||||
<div class="ec-container">
|
||||
<div class="title">
|
||||
<i
|
||||
:class="['title-icon', iconData.iconClass]"
|
||||
:style="{ backgroundColor: iconData.color }" />{{ infoTitle }}
|
||||
<el-tooltip
|
||||
v-if="infoTips"
|
||||
:content="infoTips"
|
||||
effect="dark"
|
||||
placement="top">
|
||||
<i class="wk wk-help wk-help-tips"/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="option-bar">
|
||||
<div v-if="selectionList.length == 0">
|
||||
<el-select
|
||||
v-if="showOptions"
|
||||
v-model="optionsType"
|
||||
@change="refreshList">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-if="showSubType"
|
||||
v-model="isSubType"
|
||||
:style="{'margin-left': showOptions ? '10px' : 0}"
|
||||
style="width: 120px;"
|
||||
@change="refreshList">
|
||||
<el-option
|
||||
v-for="item in [{name: '我的', value: 1}, {name: '我下属的', value: 2}]"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
v-if="showFilterView"
|
||||
style="margin-left: 10px;"
|
||||
type="primary"
|
||||
class="filter-button el-button--margin "
|
||||
icon="wk wk-screening"
|
||||
@click="getFilterFieldInfo">高级筛选</el-button>
|
||||
<filter-form
|
||||
:field-list="filterFieldList"
|
||||
:dialog-visible.sync="showFilter"
|
||||
:obj="filterObj"
|
||||
:crm-type="crmType"
|
||||
:save-scene="false"
|
||||
@filter="handleFilter"/>
|
||||
<el-button
|
||||
:disabled="!canMark"
|
||||
class="el-button--margin "
|
||||
icon="wk wk-tag"
|
||||
style="margin-left: 10px;"
|
||||
type="primary" plain @click="allMarkReadClick">全部标记已处理</el-button>
|
||||
</div>
|
||||
<flexbox
|
||||
v-else
|
||||
class="selection-bar">
|
||||
<div class="selected—title">已选中<span class="selected—count">{{ selectionList.length }}</span>项</div>
|
||||
<flexbox class="selection-items-box">
|
||||
<el-button
|
||||
v-for="(item, index) in selectionButtonList"
|
||||
:icon="item.icon"
|
||||
:key="index"
|
||||
type="primary"
|
||||
@click.native="selectionBarClick(item.type)">{{ item.name }}</el-button>
|
||||
</flexbox>
|
||||
</flexbox>
|
||||
</div>
|
||||
<filter-content
|
||||
v-if="filterObj.form && filterObj.form.length > 0"
|
||||
:obj="filterObj"
|
||||
@delete="handleDeleteField"/>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
id="crm-table"
|
||||
:data="list"
|
||||
:height="tableHeight"
|
||||
:cell-class-name="cellClassName"
|
||||
class="n-table--border"
|
||||
stripe
|
||||
border
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
@row-click="handleRowClick"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:selectable="selectionDisabled"
|
||||
show-overflow-tooltip
|
||||
type="selection"
|
||||
align="center"
|
||||
width="55"/>
|
||||
<el-table-column
|
||||
v-for="(item, index) in fieldList"
|
||||
:key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
:width="item.width"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<template v-if="item.prop == 'deal_status'">
|
||||
<i :class="scope.row[item.prop] | dealIcon"/>
|
||||
<span>{{ scope.row[item.prop] | dealName }}</span>
|
||||
</template>
|
||||
<template v-else-if="item.prop == 'is_lock' && crmType === 'customer'">
|
||||
<i
|
||||
v-if="scope.row.is_lock == 1"
|
||||
class="wk wk-circle-password customer-lock"/>
|
||||
</template>
|
||||
<template v-else-if="item.prop == 'check_status'">
|
||||
<span :style="getStatusStyle(scope.row.check_status)" class="status-mark"/>
|
||||
<span>{{ getCRMStatusName(scope.row.check_status) }}</span>
|
||||
</template>
|
||||
<template v-else-if="item.prop == 'invoice_type'">
|
||||
{{ fieldFormatter(scope.row, scope.column, scope.row[scope.column.property], item) }}
|
||||
</template>
|
||||
<wk-field-view
|
||||
v-else
|
||||
:props="item"
|
||||
:form_type="item.form_type"
|
||||
:value="scope.row[scope.column.property]"
|
||||
>
|
||||
<template slot-scope="{ data }">
|
||||
{{ fieldFormatter(scope.row, scope.column, scope.row[scope.column.property], item) }}
|
||||
</template>
|
||||
</wk-field-view>
|
||||
<!-- <template v-else>
|
||||
{{ fieldFormatter(scope.row, scope.column) }}
|
||||
</template> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :resizable="false"/>
|
||||
</el-table>
|
||||
<div class="p-contianer">
|
||||
<el-pagination
|
||||
:current-page="currentPage"
|
||||
:page-sizes="pageSizes"
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
class="p-bar"
|
||||
background
|
||||
layout="prev, pager, next, sizes, total, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import crmTypeModel from '@/views/crm/model/crmTypeModel'
|
||||
// import { filterIndexfieldsAPI } from '@/api/crm/common'
|
||||
// import { crmLeadsSetFollowAPI } from '@/api/crm/leads'
|
||||
// import { crmCustomerSetFollowAPI } from '@/api/crm/customer'
|
||||
// import {
|
||||
// crmMessagAllDealAPI,
|
||||
// crmMessagzealByIdAPI
|
||||
// } from '@/api/crm/message'
|
||||
// import MessageTableMixin from '../mixins/MessageTable'
|
||||
// import FilterForm from '@/views/crm/components/FilterForm'
|
||||
// import FilterContent from '@/views/crm/components/FilterForm/FilterContent'
|
||||
// import WkFieldView from '@/components/NewCom/WkForm/WkFieldView'
|
||||
|
||||
// import { invoiceFilterFields } from '../../invoice/js/fields'
|
||||
|
||||
export default {
|
||||
/** 客户管理 的待审核系统 */
|
||||
name: 'CRMMessage',
|
||||
|
||||
components: {
|
||||
// FilterForm,
|
||||
// FilterContent,
|
||||
// CRMAllDetail,
|
||||
// WkFieldView
|
||||
},
|
||||
|
||||
filters: {
|
||||
dealIcon(statu) {
|
||||
return statu == '已成交' ? 'wk wk-success deal-suc' : 'wk wk-close deal-un'
|
||||
},
|
||||
|
||||
dealName(statu) {
|
||||
return statu == '已成交' ? '已成交' : '未成交'
|
||||
}
|
||||
},
|
||||
|
||||
// mixins: [MessageTableMixin],
|
||||
|
||||
props: {
|
||||
// crm类型
|
||||
crmType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// crm某个类型下的类型数据
|
||||
infoType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
infoTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
infoTips: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
// 标示信息
|
||||
iconData: Object,
|
||||
|
||||
// 展示的时候 才发请求
|
||||
show: Boolean,
|
||||
|
||||
// 待办模块 用于 标记
|
||||
model: Number
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
optionsType: 0,
|
||||
isSubType: 1, // 是否是下属
|
||||
/** 高级筛选 */
|
||||
showFilter: false, // 控制筛选框
|
||||
filterFieldList: [],
|
||||
filterObj: { form: [] }, // 筛选确定数据
|
||||
/** 勾选数据操作 */
|
||||
selectionList: [], // 勾选的数据
|
||||
/** 控制详情展示 */
|
||||
rowID: '', // 行信息
|
||||
rowType: '', // 详情类型
|
||||
showDview: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 展示勾选框
|
||||
showFollow() {
|
||||
if (this.infoType == 'followLeads' || this.infoType == 'followCustomer') {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
},
|
||||
|
||||
// 操作按钮列表
|
||||
selectionButtonList() {
|
||||
const temps = this.showFollow ? [{
|
||||
name: '已跟进',
|
||||
type: 'follow',
|
||||
icon: 'wk wk-edit'
|
||||
}] : []
|
||||
temps.push({
|
||||
name: '标记已处理',
|
||||
type: 'mark-deal',
|
||||
icon: 'wk wk-tag'
|
||||
})
|
||||
return temps
|
||||
},
|
||||
|
||||
// 展示筛选
|
||||
showFilterView() {
|
||||
if (this.crmType == 'receivables_plan') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
|
||||
// 展示审核状态
|
||||
showCheckStatus() {
|
||||
if (this.crmType == 'contract' || this.crmType == 'receivables') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
|
||||
// 展示客户池天数
|
||||
showPoolDay() {
|
||||
if (this.crmType == 'customer') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
|
||||
// 展示我的/下属筛选
|
||||
showSubType() {
|
||||
if (
|
||||
this.infoType == 'todayCustomer' ||
|
||||
this.infoType == 'todayBusiness' ||
|
||||
this.infoType == 'todayLeads' ||
|
||||
this.infoType == 'putInPoolRemind' ||
|
||||
this.infoType == 'returnVisitRemind'
|
||||
) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
|
||||
// 下拉数据
|
||||
options() {
|
||||
if (this.infoType == 'todayCustomer' ||
|
||||
this.infoType == 'todayBusiness' ||
|
||||
this.infoType == 'todayLeads') {
|
||||
return [
|
||||
{ name: '今日需联系', value: 1 },
|
||||
{ name: '已逾期', value: 2 },
|
||||
{ name: '已联系', value: 3 }
|
||||
]
|
||||
} else if (
|
||||
this.infoType == 'followLeads' ||
|
||||
this.infoType == 'followCustomer'
|
||||
) {
|
||||
return [{ name: '待跟进', value: 1 }, { name: '已跟进', value: 2 }]
|
||||
} else if (
|
||||
this.infoType == 'checkContract' ||
|
||||
this.infoType == 'checkReceivables' ||
|
||||
this.infoType == 'checkInvoice'
|
||||
) {
|
||||
return [{ name: '待审核', value: 1 }, { name: '已审核', value: 2 }]
|
||||
} else if (this.infoType == 'remindReceivablesPlan') {
|
||||
return [
|
||||
{ name: '待回款', value: 1 },
|
||||
{ name: '已回款', value: 2 },
|
||||
{ name: '已逾期', value: 3 }
|
||||
]
|
||||
} else if (this.infoType == 'endContract') {
|
||||
return [{ name: '即将到期', value: 1 }, { name: '已到期', value: 2 }]
|
||||
}
|
||||
|
||||
return []
|
||||
},
|
||||
|
||||
/**
|
||||
* 能标记
|
||||
*/
|
||||
canMark() {
|
||||
if (this.options.length) {
|
||||
if (this.showSubType && this.showOptions) {
|
||||
return this.optionsType == 1 && this.isSubType == 1
|
||||
}
|
||||
|
||||
if (this.showSubType) {
|
||||
return this.isSubType == 1
|
||||
}
|
||||
|
||||
if (this.showOptions) {
|
||||
return this.optionsType == 1
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
show() {
|
||||
if (this.showOptions && this.options.length > 0) {
|
||||
this.optionsType = this.options[0].value
|
||||
}
|
||||
this.initTableHead()
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if (this.showOptions && this.options.length > 0) {
|
||||
this.optionsType = this.options[0].value
|
||||
}
|
||||
|
||||
this.initTableHead()
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 初始化表头数据
|
||||
*/
|
||||
initTableHead() {
|
||||
if (this.show) {
|
||||
this.currentPage = 1
|
||||
if (this.fieldList.length == 0) {
|
||||
this.getFieldList()
|
||||
} else {
|
||||
this.getList(false)
|
||||
this.$store.dispatch('GetMessageNum')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 刷新列表
|
||||
*/
|
||||
refreshList() {
|
||||
this.currentPage = 1
|
||||
if (this.fieldList.length > 0) {
|
||||
this.getList()
|
||||
} else {
|
||||
this.getFieldList()
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 勾选数据
|
||||
*/
|
||||
handleSelectionChange(val) {
|
||||
this.selectionList = val // 勾选的行
|
||||
},
|
||||
|
||||
/**
|
||||
* 勾选后的操作
|
||||
*/
|
||||
selectionBarClick(type) {
|
||||
if (type == 'follow') {
|
||||
this.$confirm('您确定此操作吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
const request = {
|
||||
followLeads: crmLeadsSetFollowAPI,
|
||||
followCustomer: crmCustomerSetFollowAPI
|
||||
}[this.infoType]
|
||||
request({
|
||||
type: 'crm_' + this.crmType,
|
||||
type_id: this.selectionList
|
||||
.map(item => item[this.crmType + '_id'])
|
||||
}).then(res => {
|
||||
this.$message.success('操作成功')
|
||||
this.$parent.requestNumCount()
|
||||
|
||||
this.$emit('on-handle', {
|
||||
type: 'follow',
|
||||
value: this.selectionList.length,
|
||||
infoType: this.infoType
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
})
|
||||
.catch(() => {})
|
||||
} else if (type == 'mark-deal') {
|
||||
const params = { type: this.infoType }
|
||||
params.type_id = this.selectionList
|
||||
.map(item => {
|
||||
let temp = []
|
||||
const fieldKey = this.crmType === 'receivables_plan' ? 'plan_id' : `${this.crmType}_id`
|
||||
// temp.typeId = item[fieldKey]
|
||||
temp = item[fieldKey]
|
||||
// 待进入公海提醒 需要的公海id
|
||||
// if (this.infoType == 'putInPoolRemind') {
|
||||
// temp.poolIds = item.poolIds
|
||||
// }
|
||||
return temp
|
||||
})
|
||||
crmMessagzealByIdAPI(params).then(res => {
|
||||
this.$message.success('操作成功')
|
||||
this.getList()
|
||||
this.$parent.requestNumCount()
|
||||
}).catch(() => {})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取高级筛选字段数据后展示
|
||||
*/
|
||||
getFilterFieldInfo() {
|
||||
if (this.crmType == 'invoice') {
|
||||
this.filterFieldList = invoiceFilterFields
|
||||
this.showFilter = true
|
||||
} else {
|
||||
filterIndexfieldsAPI({
|
||||
// types: crmTypeModel[this.crmType]
|
||||
})
|
||||
.then(res => {
|
||||
this.filterFieldList = res.data || []
|
||||
this.showFilter = true
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择筛选字段
|
||||
*/
|
||||
handleFilter(form) {
|
||||
this.filterObj = form
|
||||
this.showFilter = false
|
||||
this.updateTableHeight()
|
||||
this.refreshList()
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除筛选字段
|
||||
*/
|
||||
handleDeleteField(data) {
|
||||
this.filterObj = data.obj
|
||||
this.updateTableHeight()
|
||||
this.refreshList()
|
||||
},
|
||||
|
||||
/**
|
||||
* 通过回调控制class
|
||||
*/
|
||||
cellClassName({ row, column, rowIndex, columnIndex }) {
|
||||
if (
|
||||
(column.property === 'name' && this.crmType != 'contract') ||
|
||||
column.property === 'number' ||
|
||||
column.property === 'leads_name' ||
|
||||
column.property === 'customer_name' ||
|
||||
column.property === 'business_name' ||
|
||||
column.property === 'contacts_name' ||
|
||||
(column.property === 'num' && this.crmType != 'receivables_plan') ||
|
||||
column.property === 'visitNumber' ||
|
||||
column.property === 'invoice_apple_number' ||
|
||||
column.property === 'contract_name'
|
||||
) {
|
||||
return 'can-visit--underline'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 全部标记为已读
|
||||
*/
|
||||
allMarkReadClick() {
|
||||
crmMessagAllDealAPI({
|
||||
// model: this.model,
|
||||
isSub: this.isSubType == 1 ? 0 : 2,
|
||||
type: this.infoType
|
||||
}).then(res => {
|
||||
this.$message.success('操作成功')
|
||||
this.$parent.requestNumCount()
|
||||
this.getList()
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
/**
|
||||
* 不能进行勾选操作
|
||||
*/
|
||||
selectionDisabled() {
|
||||
return this.canMark
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/*@import '../../styles/table.scss';*/
|
||||
/** 场景和筛选 */
|
||||
.filtrate-button {
|
||||
cursor: pointer;
|
||||
margin-left: 10px;
|
||||
display: inline-block;
|
||||
&-img {
|
||||
vertical-align: middle;
|
||||
margin: 0 5px;
|
||||
width: 12px;
|
||||
}
|
||||
}
|
||||
.filtrate-button:hover {
|
||||
/* color: $xr-color-primary;*/
|
||||
}
|
||||
|
||||
.ec-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 10px 20px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
|
||||
.title-icon {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
padding: 6px;
|
||||
/* border-radius: $xr-border-radius-base;*/
|
||||
color: white;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.wk-help {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.option-bar {
|
||||
padding: 15px 20px;
|
||||
}
|
||||
|
||||
/** 勾选操作 */
|
||||
.selection-bar {
|
||||
font-size: 12px;
|
||||
height: 35px;
|
||||
color: #777;
|
||||
|
||||
.selected—title {
|
||||
flex-shrink: 0;
|
||||
padding-right: 20px;
|
||||
color: #333;
|
||||
.selected—count {
|
||||
/* color: $xr-color-primary;*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.selection-items-box {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
padding: 0 15px;
|
||||
|
||||
.el-button {
|
||||
color: #666;
|
||||
/* background-color: $xr--background-color-base;*/
|
||||
/* border-color: $xr--background-color-base;*/
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
border-radius: 14px;
|
||||
i {
|
||||
font-size: 12px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-button--primary:hover {
|
||||
/* background: $xr-color-primary;*/
|
||||
/* border-color: $xr-color-primary;*/
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.el-button + .el-button {
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.n-table--border {
|
||||
/* border-top: 1px solid $xr-border-line-color;*/
|
||||
}
|
||||
|
||||
.el-button--primary.is-plain {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.el-button--primary.is-plain:focus,
|
||||
.el-button--primary.is-plain:active,
|
||||
.el-button--primary.is-plain:hover {
|
||||
/* color: $xr-color-primary;*/
|
||||
}
|
||||
|
||||
// 拉开图标与文字距离
|
||||
.el-button--margin {
|
||||
i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
346
src/views/user/trajectory/index.vue
Normal file
@ -0,0 +1,346 @@
|
||||
<template>
|
||||
<div style="height:100%;">
|
||||
<flexbox class="message-header">
|
||||
<img src="@/assets/img/crm/todo.png" class="title-icon">
|
||||
<span class="title">待办事项</span>
|
||||
</flexbox>
|
||||
<div class="message-body">
|
||||
<div
|
||||
v-loading="loading"
|
||||
class="message-content">
|
||||
<div class="message-body-side">
|
||||
<xr-menu-item
|
||||
v-for="(item, index) in showLeftSides"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:num="item.num"
|
||||
:icon-class="item.iconClass"
|
||||
:icon-color="item.color"
|
||||
:select="leftType==item.infoType"
|
||||
@click="sideClick(item)"/>
|
||||
</div>
|
||||
<div class="message-body-content">
|
||||
<!-- <c-r-m-message
|
||||
v-for="(item, index) in showLeftSides"
|
||||
v-show="leftType==item.infoType"
|
||||
:key="index"
|
||||
:crm-type="item.crmType"
|
||||
:info-type="item.infoType"
|
||||
:info-title="item.name"
|
||||
:info-tips="item.tips"
|
||||
:model="item.model"
|
||||
:show="leftType==item.infoType"
|
||||
:icon-data="item"
|
||||
@on-handle="messageHandle"/> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import CRMMessage from './compenents/CRMMessage' // 系统消息
|
||||
// import { mapGetters } from 'vuex'
|
||||
// import { objDeepCopy } from '@/utils'
|
||||
import XrMenuItem from '@/components/XrMenu/XrMenuItem'
|
||||
|
||||
export default {
|
||||
/** 客户管理 的 消息列表 */
|
||||
name: 'Message',
|
||||
|
||||
components: {
|
||||
// CRMMessage,
|
||||
XrMenuItem,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
leftType: '',
|
||||
/**
|
||||
* model 1今日需联系客户 2分配给我的线索 3分配给我的客户 4待进入公海的客户 5待审核合同 6待审核回款 7待回款提醒 8即将到期的合同 9待回访合同 10待审核发票
|
||||
*/
|
||||
leftSides: [
|
||||
{
|
||||
name: '今日需联系线索',
|
||||
crmType: 'leads',
|
||||
color: '#2362FB',
|
||||
iconClass: 'wk wk-leads',
|
||||
infoType: 'todayLeads',
|
||||
model: 11,
|
||||
num: 0,
|
||||
tips: '下次跟进时间为今日的线索',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '今日需联系客户',
|
||||
crmType: 'customer',
|
||||
color: '#2362FB',
|
||||
iconClass: 'wk wk-customer',
|
||||
infoType: 'todayCustomer',
|
||||
model: 1,
|
||||
num: 0,
|
||||
tips: '下次跟进时间为今日的客户',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '今日需联系商机',
|
||||
crmType: 'business',
|
||||
color: '#2362FB',
|
||||
iconClass: 'wk wk-business',
|
||||
infoType: 'todayBusiness',
|
||||
model: 12,
|
||||
num: 0,
|
||||
tips: '下次跟进时间为今日的商机',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '分配给我的线索',
|
||||
crmType: 'leads',
|
||||
color: '#704AFD',
|
||||
iconClass: 'wk wk-leads',
|
||||
infoType: 'followLeads',
|
||||
model: 2,
|
||||
num: 0,
|
||||
tips: '转移之后未跟进的线索',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '分配给我的客户',
|
||||
crmType: 'customer',
|
||||
color: '#19B5F6',
|
||||
iconClass: 'wk wk-s-seas',
|
||||
infoType: 'followCustomer',
|
||||
model: 3,
|
||||
num: 0,
|
||||
tips: '转移、领取、分配之后未跟进的客户,默认显示自己负责的客户',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '待进入公海的客户',
|
||||
crmType: 'customer',
|
||||
color: '#26D4DA',
|
||||
iconClass: 'wk wk-seas',
|
||||
infoType: 'putInPoolRemind',
|
||||
model: 4,
|
||||
num: 0,
|
||||
tips: '',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '待审核合同',
|
||||
crmType: 'contract',
|
||||
color: '#FD5B4A',
|
||||
iconClass: 'wk wk-contract',
|
||||
infoType: 'checkContract',
|
||||
model: 5,
|
||||
num: 0,
|
||||
tips: '',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '待审核回款',
|
||||
crmType: 'receivables',
|
||||
color: '#FFB940',
|
||||
iconClass: 'wk wk-receivables',
|
||||
infoType: 'checkReceivables',
|
||||
model: 6,
|
||||
num: 0,
|
||||
tips: '',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '待回款提醒',
|
||||
crmType: 'receivables_plan',
|
||||
color: '#27BA4A',
|
||||
iconClass: 'wk wk-bell',
|
||||
infoType: 'remindReceivablesPlan',
|
||||
model: 7,
|
||||
num: 0,
|
||||
tips: '',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '即将到期的合同',
|
||||
crmType: 'contract',
|
||||
color: '#FF7A38',
|
||||
iconClass: 'wk wk-contract',
|
||||
infoType: 'endContract',
|
||||
model: 8,
|
||||
num: 0,
|
||||
tips: '根据“合同到期时间”及设置的“提前提醒天数”提醒',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '待回访合同',
|
||||
crmType: 'contract',
|
||||
color: '#ff9232',
|
||||
iconClass: 'wk wk-house',
|
||||
infoType: 'returnVisitRemind',
|
||||
model: 9,
|
||||
num: 0,
|
||||
tips: '',
|
||||
hidden: false
|
||||
},
|
||||
{
|
||||
name: '待审核发票',
|
||||
crmType: 'invoice',
|
||||
color: '#ff9232',
|
||||
iconClass: 'wk wk-invoice',
|
||||
infoType: 'checkInvoice',
|
||||
model: 10,
|
||||
num: 0,
|
||||
tips: '',
|
||||
hidden: false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
// ...mapGetters(['messageNum']),
|
||||
|
||||
showLeftSides() {
|
||||
return this.leftSides.filter(item => {
|
||||
return !item.hidden
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
/** 变化就刷新数据 */
|
||||
messageNum() {
|
||||
this.refreshNum()
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// this.loading = true
|
||||
this.requestNumCount()
|
||||
/** 控制table的高度 */
|
||||
window.onresize = () => {
|
||||
var offsetHei = document.documentElement.clientHeight
|
||||
this.$bus.emit('message-scroll', offsetHei - 300)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
requestNumCount() {
|
||||
// this.$store
|
||||
// .dispatch('GetMessageNum')
|
||||
// .then(res => {
|
||||
// this.loading = false
|
||||
// this.refreshNum()
|
||||
// })
|
||||
// .catch(() => {
|
||||
// this.loading = false
|
||||
// })
|
||||
},
|
||||
|
||||
/**
|
||||
* 刷新消息数据
|
||||
*/
|
||||
refreshNum() {
|
||||
for (let index = 0; index < this.leftSides.length; index++) {
|
||||
const element = this.leftSides[index]
|
||||
// if (this.messageNum.hasOwnProperty(element.infoType)) {
|
||||
// element.num = this.messageNum[element.infoType] || 0
|
||||
element.hidden = false
|
||||
// } else {
|
||||
// element.hidden = true
|
||||
// }
|
||||
}
|
||||
|
||||
if (!this.leftType && this.showLeftSides.length > 0) {
|
||||
this.leftType = this.showLeftSides[0].infoType
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 消息页面点击操作
|
||||
*/
|
||||
messageHandle(data) {
|
||||
if (data.type == 'follow') {
|
||||
// const copyNum = objDeepCopy(this.messageNum)
|
||||
|
||||
const copyNum={}
|
||||
const num = parseInt(copyNum[data.infoType]) - data.value
|
||||
copyNum[data.infoType] = num > 0 ? num : 0
|
||||
this.$store.commit('SET_MESSAGENUM', copyNum)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 侧边点击
|
||||
*/
|
||||
sideClick(item) {
|
||||
this.leftType = item.infoType
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.message-header {
|
||||
margin-left: 28px;
|
||||
height: 60px;
|
||||
.title-icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.message-body {
|
||||
position: relative;
|
||||
height: calc(100% - 70px);
|
||||
padding-left: 10px;
|
||||
}
|
||||
.message-content {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.message-body-side {
|
||||
padding: 20px 0;
|
||||
width: 180px;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
border: 1px solid #e6e6e6;
|
||||
border-radius: 4px;
|
||||
overflow-y: auto;
|
||||
.side-item {
|
||||
position: relative;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding: 0 20px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
i {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.message-body-content {
|
||||
margin-left: 190px;
|
||||
margin-right: 10px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: white;
|
||||
border: 1px solid #e6e6e6;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
</style>
|
6
src/x.js
@ -27,6 +27,10 @@ import scWaterMark from './components/scWaterMark'
|
||||
import scQrCode from './components/scQrCode'
|
||||
import scStatusIndicator from './components/scMini/scStatusIndicator'
|
||||
import scTrend from './components/scMini/scTrend'
|
||||
import {
|
||||
Flexbox,
|
||||
FlexboxItem
|
||||
} from './components/Flexbox'
|
||||
import auth from './directives/auth'
|
||||
import auths from './directives/auths'
|
||||
import authsAll from './directives/authsAll'
|
||||
@ -46,6 +50,8 @@ export default {
|
||||
app.config.globalProperties.$auth = permission;
|
||||
app.config.globalProperties.$role = rolePermission;
|
||||
//注册全局组件
|
||||
app.component('flexbox', Flexbox)
|
||||
app.component('flexbox-item', FlexboxItem)
|
||||
app.component('XItem', XItem);
|
||||
app.component('xUser', xUser);
|
||||
app.component('xAvatar', xAvatar);
|
||||
|