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 @@ ...@@ -13,7 +13,8 @@
"new": "plop", "new": "plop",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"test:unit": "jest --clearCache && vue-cli-service test:unit", "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": { "dependencies": {
"axios": "0.18.1", "axios": "0.18.1",
...@@ -49,7 +50,8 @@ ...@@ -49,7 +50,8 @@
"vue-splitpane": "1.0.4", "vue-splitpane": "1.0.4",
"vuedraggable": "2.20.0", "vuedraggable": "2.20.0",
"vuex": "3.1.0", "vuex": "3.1.0",
"xlsx": "0.14.1" "xlsx": "0.14.1",
"@sap/approuter": "^9.1.0"
}, },
"devDependencies": { "devDependencies": {
"@fullcalendar/core": "^5.9.0", "@fullcalendar/core": "^5.9.0",
......
...@@ -66,9 +66,9 @@ export default { ...@@ -66,9 +66,9 @@ export default {
externalLink: '外链', externalLink: '外链',
profile: '个人中心', profile: '个人中心',
customers: '客户', customers: '代理商',
potentialCustomers: '潜在客户', potentialCustomers: '省级代理商管理',
regularCustomers: '正式客户', regularCustomers: '城市级代理商管理',
enterpriseCustomers: '企业客户', enterpriseCustomers: '企业客户',
products: '产品', products: '产品',
......
...@@ -25,7 +25,7 @@ import customersRouter from './modules/customers' ...@@ -25,7 +25,7 @@ import customersRouter from './modules/customers'
// import flowRouter from './modules/flow' // import flowRouter from './modules/flow'
// import quotedPriceRouter from './modules/quotedPrice' // import quotedPriceRouter from './modules/quotedPrice'
// import invoiceRouter from './modules/invoice' // 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 * Note: sub-menu only appear when route children.length >= 1
...@@ -172,7 +172,7 @@ export const asyncRoutes = [ ...@@ -172,7 +172,7 @@ export const asyncRoutes = [
// forecastRouter, // forecastRouter,
// nestedRouter, // nestedRouter,
// flowRouter, // flowRouter,
messageRouter, // messageRouter,
// { // {
// path: '/permission', // path: '/permission',
// component: Layout, // component: Layout,
......
...@@ -17,7 +17,7 @@ const customersRouter = { ...@@ -17,7 +17,7 @@ const customersRouter = {
path: 'overview', path: 'overview',
component: () => import('@/views/customers/customers-overview'), component: () => import('@/views/customers/customers-overview'),
name: 'CustomersOverview', name: 'CustomersOverview',
meta: { title: '客户总览' } meta: { title: '总代管理' }
}, },
{ {
path: 'potential', path: 'potential',
...@@ -31,73 +31,73 @@ const customersRouter = { ...@@ -31,73 +31,73 @@ const customersRouter = {
name: 'RegularCustomers', name: 'RegularCustomers',
meta: { title: 'regularCustomers' } meta: { title: 'regularCustomers' }
}, },
{ // {
path: 'resource', // path: 'resource',
meta: { title: '资源池管理' }, // meta: { title: '资源池管理' },
component: () => import('@/views/customers/resource'), // component: () => import('@/views/customers/resource'),
redirect: '/customers/resource/pool', // redirect: '/customers/resource/pool',
name: 'ResourceManagement', // name: 'ResourceManagement',
children: [ // children: [
{ // {
path: 'pool', // path: 'pool',
component: () => import('@/views/customers/resource-pool'), // component: () => import('@/views/customers/resource-pool'),
name: 'ResourcePool', // name: 'ResourcePool',
meta: { title: '资源池' } // meta: { title: '资源池' }
}, // },
{ // {
path: 'release', // path: 'release',
component: () => import('@/views/customers/release-record'), // component: () => import('@/views/customers/release-record'),
name: 'ReleaseRecord', // name: 'ReleaseRecord',
meta: { title: '发布记录' } // meta: { title: '发布记录' }
}, // },
{ // {
path: 'release-detail', // path: 'release-detail',
component: () => import('@/views/customers/release-record/detail'), // component: () => import('@/views/customers/release-record/detail'),
name: 'ReleaseDetail', // name: 'ReleaseDetail',
hidden: true, // hidden: true,
meta: { title: '发布记录详情' } // meta: { title: '发布记录详情' }
}, // },
{ // {
path: 'detail', // path: 'detail',
component: () => import('@/views/customers/resource-detail/detail.vue'), // component: () => import('@/views/customers/resource-detail/detail.vue'),
name: 'ResourceDetail', // name: 'ResourceDetail',
meta: { title: '资源池客户详情' }, // meta: { title: '资源池客户详情' },
hidden: true // hidden: true
}, // },
{ // {
path: 'application', // path: 'application',
component: () => import('@/views/customers/application-record'), // component: () => import('@/views/customers/application-record'),
name: 'ApplicationRecord', // name: 'ApplicationRecord',
meta: { title: '申请记录' } // meta: { title: '申请记录' }
}, // },
{ // {
path: 'application-detail', // path: 'application-detail',
component: () => import('@/views/customers/application-record/detail.vue'), // component: () => import('@/views/customers/application-record/detail.vue'),
name: 'ApplicationDetail', // name: 'ApplicationDetail',
hidden: true, // hidden: true,
meta: { title: '申请记录详情' } // meta: { title: '申请记录详情' }
}, // },
{ // {
path: 'approval', // path: 'approval',
component: () => import('@/views/customers/approval-record'), // component: () => import('@/views/customers/approval-record'),
name: 'ApprovalRecord', // name: 'ApprovalRecord',
meta: { title: '审批记录' } // meta: { title: '审批记录' }
}, // },
{ // {
path: 'approval-detail', // path: 'approval-detail',
component: () => import('@/views/customers/approval-record/detail'), // component: () => import('@/views/customers/approval-record/detail'),
name: 'ApprovalDetail', // name: 'ApprovalDetail',
hidden: true, // hidden: true,
meta: { title: '审批记录详情' } // meta: { title: '审批记录详情' }
}, // },
{ // {
path: 'contact', // path: 'contact',
component: () => import('@/views/customers/contact'), // component: () => import('@/views/customers/contact'),
name: 'Contact', // name: 'Contact',
meta: { title: '联系人' } // meta: { title: '联系人' }
}, // },
] // ]
}, // },
{ {
path: 'enterprise', path: 'enterprise',
component: () => import('@/views/customers/enterprise-customers'), 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> <template>
<div class="dashboard-editor-container"> <div class="app-container">
<ele-search
<panel-group @handleSetLineChartData="handleSetLineChartData" /> :columns="tableConfig.columns"
@handleSearch="handleSearch"
<el-row :gutter="32"> @handleReset="handleReset"
<el-col @handleFilter="handleFilter"
:xs="24" />
:sm="24" <div class="table-container">
:lg="8" <TableBtns>
> <template v-slot:left>
<div class="chart-wrapper"> <el-button
<raddar-chart /> type="primary"
</div> icon="el-icon-plus"
</el-col> @click="handleAdd"
<el-col >添加</el-button>
:xs="24" </template>
:sm="24" </TableBtns>
:lg="8" <ele-table
> ref="eleTable"
<div class="chart-wrapper"> v-bind="tableConfig"
<pie-chart /> :expand-params="expandParams"
</div> :listeners="tableListeners"
</el-col> @handleSelectionChange="handleSelectionChange"
<el-col />
:xs="24" </div>
:sm="24"
:lg="8"
>
<div class="chart-wrapper">
<bar-chart />
</div>
</el-col>
</el-row>
</div> </div>
</template> </template>
<script> <script>
import PanelGroup from './components/PanelGroup' import constant from './constant'
import RaddarChart from './components/RaddarChart' import tableMixin from '@/mixins/table'
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]
}
}
export default { export default {
name: 'DashboardAdmin', mixins: [tableMixin],
components: { inject: ['reload'],
PanelGroup,
RaddarChart,
PieChart,
BarChart
},
data() { data() {
return { return {
lineChartData: lineChartData.newVisitis expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant
} }
}, },
methods: { created() {
handleSetLineChartData(type) { this.tableListeners = {
this.lineChartData = lineChartData[type] handleDetails: this.handleDetails, // 添加
handleTakeEffect: this.handleTakeEffect, // 生效
handleEdit: this.handleEdit, // 编辑
handleInvalid: this.handleInvalid // 失效
} }
} },
methods: {}
} }
</script> </script>
<style lang="scss" scoped> <style>
.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 = { ...@@ -50,7 +50,7 @@ module.exports = {
} }
} }
} }
}, }
}, },
port: port, port: port,
open: true, 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