Commit e31c7a6d authored by qinj's avatar qinj

Merge branch 'dev' of http://120.25.63.219:6088/rex/portalhtml into dev

parents 5960e4fd 056df549
......@@ -13,7 +13,8 @@
"new": "plop",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit"
"test:ci": "npm run lint && npm run test:unit",
"start": "node node_modules/@sap/approuter/approuter.js"
},
"dependencies": {
"axios": "0.18.1",
......@@ -49,7 +50,8 @@
"vue-splitpane": "1.0.4",
"vuedraggable": "2.20.0",
"vuex": "3.1.0",
"xlsx": "0.14.1"
"xlsx": "0.14.1",
"@sap/approuter": "^9.1.0"
},
"devDependencies": {
"@fullcalendar/core": "^5.9.0",
......
......@@ -66,9 +66,9 @@ export default {
externalLink: '外链',
profile: '个人中心',
customers: '客户',
potentialCustomers: '潜在客户',
regularCustomers: '正式客户',
customers: '代理商',
potentialCustomers: '省级代理商管理',
regularCustomers: '城市级代理商管理',
enterpriseCustomers: '企业客户',
products: '产品',
......
......@@ -25,7 +25,7 @@ import customersRouter from './modules/customers'
// import flowRouter from './modules/flow'
// import quotedPriceRouter from './modules/quotedPrice'
// import invoiceRouter from './modules/invoice'
import messageRouter from './modules/message'
// import messageRouter from './modules/message'
/**
* Note: sub-menu only appear when route children.length >= 1
......@@ -172,7 +172,7 @@ export const asyncRoutes = [
// forecastRouter,
// nestedRouter,
// flowRouter,
messageRouter,
// messageRouter,
// {
// path: '/permission',
// component: Layout,
......
......@@ -17,7 +17,7 @@ const customersRouter = {
path: 'overview',
component: () => import('@/views/customers/customers-overview'),
name: 'CustomersOverview',
meta: { title: '客户总览' }
meta: { title: '总代管理' }
},
{
path: 'potential',
......@@ -31,73 +31,73 @@ const customersRouter = {
name: 'RegularCustomers',
meta: { title: 'regularCustomers' }
},
{
path: 'resource',
meta: { title: '资源池管理' },
component: () => import('@/views/customers/resource'),
redirect: '/customers/resource/pool',
name: 'ResourceManagement',
children: [
{
path: 'pool',
component: () => import('@/views/customers/resource-pool'),
name: 'ResourcePool',
meta: { title: '资源池' }
},
{
path: 'release',
component: () => import('@/views/customers/release-record'),
name: 'ReleaseRecord',
meta: { title: '发布记录' }
},
{
path: 'release-detail',
component: () => import('@/views/customers/release-record/detail'),
name: 'ReleaseDetail',
hidden: true,
meta: { title: '发布记录详情' }
},
{
path: 'detail',
component: () => import('@/views/customers/resource-detail/detail.vue'),
name: 'ResourceDetail',
meta: { title: '资源池客户详情' },
hidden: true
},
{
path: 'application',
component: () => import('@/views/customers/application-record'),
name: 'ApplicationRecord',
meta: { title: '申请记录' }
},
{
path: 'application-detail',
component: () => import('@/views/customers/application-record/detail.vue'),
name: 'ApplicationDetail',
hidden: true,
meta: { title: '申请记录详情' }
},
{
path: 'approval',
component: () => import('@/views/customers/approval-record'),
name: 'ApprovalRecord',
meta: { title: '审批记录' }
},
{
path: 'approval-detail',
component: () => import('@/views/customers/approval-record/detail'),
name: 'ApprovalDetail',
hidden: true,
meta: { title: '审批记录详情' }
},
{
path: 'contact',
component: () => import('@/views/customers/contact'),
name: 'Contact',
meta: { title: '联系人' }
},
]
},
// {
// path: 'resource',
// meta: { title: '资源池管理' },
// component: () => import('@/views/customers/resource'),
// redirect: '/customers/resource/pool',
// name: 'ResourceManagement',
// children: [
// {
// path: 'pool',
// component: () => import('@/views/customers/resource-pool'),
// name: 'ResourcePool',
// meta: { title: '资源池' }
// },
// {
// path: 'release',
// component: () => import('@/views/customers/release-record'),
// name: 'ReleaseRecord',
// meta: { title: '发布记录' }
// },
// {
// path: 'release-detail',
// component: () => import('@/views/customers/release-record/detail'),
// name: 'ReleaseDetail',
// hidden: true,
// meta: { title: '发布记录详情' }
// },
// {
// path: 'detail',
// component: () => import('@/views/customers/resource-detail/detail.vue'),
// name: 'ResourceDetail',
// meta: { title: '资源池客户详情' },
// hidden: true
// },
// {
// path: 'application',
// component: () => import('@/views/customers/application-record'),
// name: 'ApplicationRecord',
// meta: { title: '申请记录' }
// },
// {
// path: 'application-detail',
// component: () => import('@/views/customers/application-record/detail.vue'),
// name: 'ApplicationDetail',
// hidden: true,
// meta: { title: '申请记录详情' }
// },
// {
// path: 'approval',
// component: () => import('@/views/customers/approval-record'),
// name: 'ApprovalRecord',
// meta: { title: '审批记录' }
// },
// {
// path: 'approval-detail',
// component: () => import('@/views/customers/approval-record/detail'),
// name: 'ApprovalDetail',
// hidden: true,
// meta: { title: '审批记录详情' }
// },
// {
// path: 'contact',
// component: () => import('@/views/customers/contact'),
// name: 'Contact',
// meta: { title: '联系人' }
// },
// ]
// },
{
path: 'enterprise',
component: () => import('@/views/customers/enterprise-customers'),
......
import i18n from '@/lang'
import { customer } from '@/api/customers'
const tableConfig = {
url: customer.searchUrl,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
ID: {
label: '代理商名称',
showInSearch: true,
type: 'input',
fixed: 'left',
renderItem: (h, scope, listeners) => {
return h('el-button', {
on: {
click: (e) => listeners.handleDetails(scope.row)
},
props: {
type: 'text'
}
}, scope.row.ID)
}
},
// Ext_QuoteOppotunity_KUT: {
// type: 'input',
// label: '代理商类型',
// showInSearch: true
// },
handle: {
label: '操作',
fixed: 'right',
minWidth: 200,
hideInFilter: true,
renderItem: (h, scope, listeners) => {
return h('div', [
h('el-button', {
on: {
click: (e) => listeners.handleEdit(scope.row, 'edit')
},
props: {
icon: 'el-icon-edit-outline',
type: 'text'
}
}, i18n.t('table.edit')),
h('el-button', {
on: {
click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect')
},
props: {
icon: 'el-icon-circle-check',
type: 'text'
}
}, i18n.t('table.takeEffect')),
h('el-button', {
on: {
click: (e) => listeners.handleInvalid(scope.row, 'invalid')
},
props: {
icon: 'el-icon-circle-check',
type: 'text'
}
}, i18n.t('table.invalid'))
])
}
}
}
}
export default tableConfig
<template>
<div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row :gutter="32">
<el-col
:xs="24"
:sm="24"
:lg="8"
>
<div class="chart-wrapper">
<raddar-chart />
</div>
</el-col>
<el-col
:xs="24"
:sm="24"
:lg="8"
>
<div class="chart-wrapper">
<pie-chart />
</div>
</el-col>
<el-col
:xs="24"
:sm="24"
:lg="8"
>
<div class="chart-wrapper">
<bar-chart />
</div>
</el-col>
</el-row>
<div class="app-container">
<ele-search
:columns="tableConfig.columns"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<div class="table-container">
<TableBtns>
<template v-slot:left>
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd"
>添加</el-button>
</template>
</TableBtns>
<ele-table
ref="eleTable"
v-bind="tableConfig"
:expand-params="expandParams"
:listeners="tableListeners"
@handleSelectionChange="handleSelectionChange"
/>
</div>
</div>
</template>
<script>
import PanelGroup from './components/PanelGroup'
import RaddarChart from './components/RaddarChart'
import PieChart from './components/PieChart'
import BarChart from './components/BarChart'
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
import constant from './constant'
import tableMixin from '@/mixins/table'
export default {
name: 'DashboardAdmin',
components: {
PanelGroup,
RaddarChart,
PieChart,
BarChart
},
mixins: [tableMixin],
inject: ['reload'],
data() {
return {
lineChartData: lineChartData.newVisitis
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant
}
},
methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
created() {
this.tableListeners = {
handleDetails: this.handleDetails, // 添加
handleTakeEffect: this.handleTakeEffect, // 生效
handleEdit: this.handleEdit, // 编辑
handleInvalid: this.handleInvalid // 失效
}
}
},
methods: {}
}
</script>
<style lang="scss" scoped>
.dashboard-editor-container {
padding: 20px;
background-color: rgb(240, 242, 245);
position: relative;
.github-corner {
position: absolute;
top: 0px;
border: 0;
right: 0;
}
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
@media (max-width: 1024px) {
.chart-wrapper {
padding: 8px;
}
}
<style>
</style>
......@@ -50,7 +50,7 @@ module.exports = {
}
}
}
},
}
},
port: port,
open: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment