Commit 5ebffb4e by ym

test

1 parent 229777a0
{
"name": "home",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.4",
"glsx-components": "^1.0.4",
"glsx-table": "^1.0.9"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3",
"babel-plugin-component": "^1.1.1",
"element-theme-chalk": "^2.15.6",
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.10"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
\ No newline at end of file
"name": "home",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6",
"glsx-components": "^1.0.8",
"glsx-table": "^1.0.9"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3",
"babel-plugin-component": "^1.1.1",
"element-theme-chalk": "^2.15.6",
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.10"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
......@@ -5,6 +5,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="referrer" content="no-referrer">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- 使用CDN的CSS文件 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
......
......@@ -106,12 +106,12 @@ img {
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 8px;
width: 6px;
height: 1px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 7px;
background-color: #E9E8FF;
border-radius: 4px;
background-color: rgba(144, 147, 153, .3);
}
\ No newline at end of file

27.9 KB | W: | H:

23.8 KB | W: | H:

src/assets/img/home/guide2.png
src/assets/img/home/guide2.png
src/assets/img/home/guide2.png
src/assets/img/home/guide2.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<div class="glsx-table" :class="{ hasTableContent: showClass }">
<el-table
id="initTable"
:ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'"
:data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
:border="border"
:highlight-current-row="true"
:stripe="true"
@sort-change="sortChange"
@selection-change="handleSelect"
:size="size"
:header-cell-style="headerStyle"
>
<el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection"
width="55"
:selectable="checkSelectable"
:reserve-selection="true"
></el-table-column>
<el-table-column
v-if="hasNum"
align="center"
width="60px"
label="序号"
type="index"
:index="
(index) =>
index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1
"
></el-table-column>
<el-table-column
v-for="(item, index) in tableColumns"
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
:min-width="item.minWidth"
:align="item.align || 'center'"
:sortable="item.sortable"
>
<div class="glsx-table">
<el-table style="width: 100%" id="initTable" :ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'" :data="getListApi ? data : tableData" :row-key="tableParams.mutiSelectUniqueKey || ''" v-loading="loading" :height="tableHeightValues" :border="border" :tableId="tableId" :highlight-current-row="true" :stripe="true" @sort-change="sortChange" @selection-change="handleSelect" :size="size" :header-cell-style="headerStyle">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" type="selection" width="55" :selectable="checkSelectable" :reserve-selection="true"></el-table-column>
<el-table-column v-if="hasNum" align="center" width="60px" label="序号" type="index" :index="index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"></el-table-column>
<el-table-column v-for="(item, index) in tableColumns" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :align="item.align || 'center'" :sortable="item.sortable">
<template slot-scope="scope">
<slot
v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
:prop="item.prop"
:width="item.width"
></slot>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
<span
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }"
:title="item.formatter(scope.row)"
v-text="item.formatter(scope.row)"
></span>
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="item.formatter(scope.row)" v-text="item.formatter(scope.row)"></span>
</template>
<template v-else-if="getListApi">
<span
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }"
:title="scope.row[item.prop]"
v-text="scope.row[item.prop]"
></span>
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="scope.row[item.prop]" v-text="scope.row[item.prop]"></span>
</template>
<template v-else>
<span
class="line-ellipsis"
:style="{ '-webkit-line-clamp': item.line ? item.line : '' }"
:title="tableData[scope.$index][item.prop]"
v-text="tableData[scope.$index][item.prop]"
></span>
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="tableData[scope.$index][item.prop]" v-text="tableData[scope.$index][item.prop]"></span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
</el-table-column>
<el-table-column
v-if="tableParams.tableOption"
label="操作"
:align="tableParams.tableOption.align || 'center'"
:width="tableParams.tableOption.width || '200'"
fixed="right"
>
<el-table-column v-if="tableParams.tableOption" label="操作" :align="tableParams.tableOption.align || 'center'" :width="tableParams.tableOption.width || '200'" fixed="right">
<template slot-scope="scope">
<slot name="auth-button" :scope="scope.row"></slot>
</template>
</el-table-column>
<div slot="empty" class="emptyBg">
<template slot="empty" class="emptyBg">
<img class="noDataImg" :src="noDataImg" v-if="noDataImg" alt="" />
<div>{{ noDataText }}</div>
<slot name="additionalContent"></slot>
</div>
</template>
</el-table>
<el-pagination
v-if="hasPage"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page[this.pageConf.pageNum]"
:page-sizes="[10, 20, 30, 40]"
:page-size="page[this.pageConf.pageSize]"
:total="getListApi ? total : tableTotal"
:layout="layout"
></el-pagination>
<el-pagination v-if="hasPage" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page[this.pageConf.pageNum]" :page-sizes="[10, 20, 30, 40]" :page-size="page[this.pageConf.pageSize]" :total="getListApi ? total : tableTotal" :layout="layout"></el-pagination>
</div>
</template>
<script>
import { Table, TableColumn, Pagination } from "element-ui";
import { Table, TableColumn, Pagination } from 'element-ui'
export default {
name: "GLTable",
name: 'GLTable',
components: {
[Table.name]: Table,
[TableColumn.name]: TableColumn,
[Pagination.name]: Pagination,
[Pagination.name]: Pagination
},
props: {
size: {
type: String,
default: "medium",
default: 'medium'
},
height: {
type: String,
default: "",
default: ''
},
// maxHeight:{
// type:String,
......@@ -136,80 +61,85 @@ export default {
// },
noDataImg: {
type: String,
default: "",
default: ''
},
noDataText: {
type: String,
default: "暂无数据",
default: '暂无数据'
},
border: {
type: Boolean,
default: false,
default: false
},
headerStyle: {
type: Object,
default: () => {},
default: () => {}
},
//表格需要多传入一个id的情况
tableId: {
type: String,
default: ''
},
// 搜索条件
searchForm: {
type: Object,
default: () => {},
default: () => {}
},
// 是否定制表头
isCustomHead: {
type: Boolean,
default: false,
default: false
},
// 表头展示
customHeadShowList: {
type: Array,
default: () => [],
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => [],
default: () => []
},
tableTotal: {
type: Number,
default: 0,
default: 0
},
// 获取列表接口
getListApi: {
type: Function,
default: null,
default: null
},
// 搜索前操作
beforeSearchFn: {
type: Function,
default: () => {
return new Promise((resolve, reject) => {
resolve();
});
},
resolve()
})
}
},
// 分页,默认有
hasPage: {
type: Boolean,
default: true,
default: true
},
pageConf: {
type: Object,
default: () => ({
pageSize: "pageSize",
pageNum: "pageNum",
totalCount: "totalCount",
}),
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'totalCount'
})
},
// 分页组件配置
layout: {
type: String,
default: "sizes,total,->,prev,pager,next,jumper",
default: 'sizes,total,->,prev,pager,next,jumper'
},
// 序号,默认有
hasNum: {
type: Boolean,
default: true,
default: true
},
tableParams: {
type: Object,
......@@ -228,17 +158,17 @@ export default {
// 设置禁止选中的行数据
checkSelectKey: {
type: String,
default: "",
default: ''
},
// 设置禁止选中的值
checkSelectVal: {
type: Array,
default: () => [],
default: () => []
},
// 后端返回列表参数名
listName: {
type: String,
default: "",
default: ''
},
// 表格操作,默认没有
// tableOption: {
......@@ -248,11 +178,11 @@ export default {
// 表格栏
tableColumns: {
type: Array,
default: () => [],
},
};
},
},
default: () => []
}
}
}
}
},
data() {
......@@ -267,151 +197,143 @@ export default {
tableColumns: [],
showClass: false,
};
tableHeightValues: null
}
},
watch: {
customHeadShowList(val) {
this.isCustomHead && this.findShowHeadCol();
},
data: {
immediate: true,
handler(val) {
this.showClass = val.length > 0 ? true : false;
},
deep: true,
},
this.isCustomHead && this.findShowHeadCol()
}
// data: {
// immediate: true,
// handler(val) {
// this.showClass = val.length > 0 ? true : false
// },
// deep: true
// }
},
methods: {
findShowHeadCol() {
this.tableColumns = [];
this.tableParams.tableColumns.forEach((item) => {
let isCustomCol = item.hasOwnProperty("isCustomCol");
if (
!isCustomCol ||
(isCustomCol && this.customHeadShowList.includes(item.label))
) {
this.tableColumns.push(item);
this.tableColumns = []
this.tableParams.tableColumns.forEach(item => {
let isCustomCol = item.hasOwnProperty('isCustomCol')
if (!isCustomCol || (isCustomCol && this.customHeadShowList.includes(item.label))) {
this.tableColumns.push(item)
}
});
})
},
// 设置禁止选中的行数据
checkSelectable(row) {
if (this.tableParams.checkSelectKey && this.tableParams.checkSelectVal.length > 0) {
return (
this.tableParams.checkSelectVal.indexOf(row[this.tableParams.checkSelectKey]) ==
-1
);
return this.tableParams.checkSelectVal.indexOf(row[this.tableParams.checkSelectKey]) == -1
} else {
return true;
return true
}
},
// 排序
sortChange({ column, prop, order }) {
this.$emit("sortChange", { column, prop, order });
this.$emit('sortChange', { column, prop, order })
},
// 多选
handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val;
this.mutiSelectArr[this.tableParams.mutiSelectName] = val
},
// 清空多选
clearMutiSelect() {
this.mutiSelectArr[this.tableParams.mutiSelectName] = [];
this.$refs[this.tableParams.mutiSelectName + "MutiTable"].clearSelection();
this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection()
},
//设置表格高度
setTableHeightFun(navHeight = 0) {
//navHeight 传值底部高度
let paginationHeight;
if(document.querySelector(".el-pagination")) {
paginationHeight = document.querySelector(".el-pagination").clientHeight + 20;
}else {
paginationHeight = 0;
var baseNavEle = document.querySelector('.scrm-base-nav')
var baseSubNavEle = document.querySelector('.scrm-base-sub-nav')
var baseNavEleHeight = 0
var baseSubNavEleHeight = 0
if (baseNavEle && baseNavEle) {
baseNavEleHeight = baseNavEle.clientHeight //60
baseSubNavEleHeight = baseSubNavEle.clientHeight //14
}
let paginationHeight
if (document.querySelector('.el-pagination')) {
paginationHeight = document.querySelector('.el-pagination').clientHeight + 20
} else {
paginationHeight = 0
}
let offsettop = document.getElementById("initTable").offsetTop;
let clientHeight = document.documentElement.clientHeight;
let offsettop = document.getElementById('initTable').offsetTop
let clientHeight = document.documentElement.clientHeight
document.getElementById("initTable").style.height =
clientHeight - offsettop - paginationHeight - navHeight + "px";
// document.getElementById('initTable').style.height = clientHeight - offsettop - paginationHeight - navHeight + 'px'
// document.querySelector('.el-table__empty-block').style.height=(clientHeight - offsettop - paginationHeight - navHeight)+'px';
this.tableHeightValues = clientHeight - offsettop - paginationHeight - baseNavEleHeight - baseSubNavEleHeight - 10 - 30 - 20 + 'px'
},
refreshTable(isResetPageNum = true, isClearMuti = true) {
this.beforeSearchFn().then((res) => {
this.beforeSearchFn().then(res => {
// 清空多选
isClearMuti && this.clearMutiSelect();
this.loading = true;
isResetPageNum && (this.page[this.pageConf.pageNum] = 1);
isClearMuti && this.clearMutiSelect()
this.loading = true
isResetPageNum && (this.page[this.pageConf.pageNum] = 1)
var params = {
...this.page,
...this.searchForm,
};
...this.searchForm
}
if (this.tableId) {
params.id = this.tableId
}
this.getListApi(params)
.then((res) => {
console.log(res);
this.data = this.findVal(res, this.tableParams.listName);
this.total = this.findVal(res, this.pageConf.totalCount);
this.loading = false;
.then(res => {
console.log(res)
this.data = this.findVal(res, this.tableParams.listName)
this.total = this.findVal(res, this.pageConf.totalCount)
this.loading = false
if (this.data.length) {
this.$emit('setTableFinishFun', this.data) //表格请求到数据
}
})
.catch(() => {
this.loading = false;
});
});
this.loading = false
})
})
},
// 找返回值
findVal(res, rankStr) {
var rankList = rankStr.split(".");
var rankList = rankStr.split('.')
if (!rankStr) {
return res;
return res
}
return this.findVal(res[rankList[0]], rankList.splice(1).join("."));
return this.findVal(res[rankList[0]], rankList.splice(1).join('.'))
},
// 每页条数
handleSizeChange(value) {
let offsettop = document.getElementById("initTable").offsetTop;
console.log("表格距离顶部1", offsettop);
let offsettop = document.getElementById('initTable').offsetTop
console.log('表格距离顶部1', offsettop)
this.page[this.pageConf.pageSize] = value;
this.getListApi
? this.refreshTable(false, false)
: this.$emit("refreshTable", this.page);
this.page[this.pageConf.pageSize] = value
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
},
// 页码
handleCurrentChange(value) {
this.page[this.pageConf.pageNum] = value;
this.getListApi
? this.refreshTable(false, false)
: this.$emit("refreshTable", this.page);
},
this.page[this.pageConf.pageNum] = value
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
}
},
mounted() {
this.isCustomHead
? this.findShowHeadCol()
: (this.tableColumns = this.tableParams.tableColumns);
this.page = {};
this.page[this.pageConf.pageSize] = 10;
this.page[this.pageConf.pageNum] = 1;
this.getListApi && this.refreshTable();
// this.$nextTick(() => {
// var _this=this
// setTimeout(() => {
// // 使用getListApi获取和返回数组为空时算高度 !(_this.getListApi && _this.data.length==0)
// if(_this.getListApi ){
// }
// }, 200)
// })
},
};
this.isCustomHead ? this.findShowHeadCol() : (this.tableColumns = this.tableParams.tableColumns)
this.page = {}
this.page[this.pageConf.pageSize] = 10
this.page[this.pageConf.pageNum] = 1
this.getListApi && this.refreshTable()
}
}
</script>
<style>
......@@ -437,14 +359,61 @@ export default {
padding-right: 14px !important;
}
.glsx-table .emptyBg {
display: inline-block;
/* margin-top: 150px; */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
}
.glsx-table .emptyBg div {
margin: -20px 0 10px;
height: 100%;
.el-table__body-wrapper::-webkit-scrollbar {
width: 10px;
height: 10px;
/* display: none; */
}
/*正常情况下滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/* background-color: rgba(0, 0, 0, 0.2); */
background: #e9e8ff;
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
/* &::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
} */
/*正常时候的主干部分*/
.el-table__body-wrapper::-webkit-scrollbar-track {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*鼠标悬浮在滚动条上的主干部分*/
/* .el-table__body-wrapper::-webkit-scrollbar-track:hover {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.01);
} */
/* .hasTableContent .el-table__body{
height: 100%;
} */
......
......@@ -17,7 +17,7 @@ module.exports = {
code_message_map: {}
},
request: {
baseURL: 'https://scrm.test.glsx.com.cn',
baseURL: 'http://192.168.1.254',
// 设置超时时间
timeout: 180000,
// 携带凭证
......
......@@ -11,8 +11,14 @@ VueRouter.prototype.push = function push(location) {
function getRoutes(routesData) {
return routesData.reduce((routes, route) => {
routes.push({...route,
component: () =>
import ('@/views' + route.path + '.vue')
component: () => {
if (route.path == '/home/index' && Vue.prototype.$globalState.session.accountLevel != 4) {
return import ('@/views/ehome/index.vue')
} else {
return import ('@/views' + route.path + '.vue')
}
}
})
return routes
}, [])
......
......@@ -5,12 +5,6 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/home/index.vue`], resolve)
},
{
name: 'Ehome',
path: '/ehome/index',
meta: {},
component: resolve => require([`@/views/ehome/index.vue`], resolve)
},
{
name: 'EnterpriseWechat',
path: '/enterpriseWechat/index',
component: resolve => require([`@/views/enterpriseWechat/index.vue`], resolve),
......
......@@ -8,6 +8,8 @@ import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
import 'glsx-components/src/theme/theme.scss'
import '@/assets/css/common.scss'
let routes = []
......
......@@ -18,14 +18,20 @@ const render = (base, routes) => {
mode: 'history'
})
router.beforeEach((to, from, next) => {
if (from.path == '/' && (to.path == '/home/index' || to.path == '/ehome/index')) {
next();
let modelStatus = false;
if (Vue.prototype.$globalState.session.merchantModel == 1 && Vue.prototype.$globalState.session.accountLevel == 1) {
modelStatus = true;
}
if (Vue.prototype.$globalState.session.merchantModel == 2 && Vue.prototype.$globalState.session.accountLevel == 4) {
modelStatus = true;
}
if (from.path == '/' && (to.path == '/home/index' || to.path == '/ehome/index') && modelStatus) {
Vue.prototype.$apis.ww.getStatus({}).then((res) => {
// if (res.status != 'SUCCESS') {
// next('/enterpriseWechat/index')
// } else {
// next()
// }
if (res.status != 'SUCCESS') {
next('/enterpriseWechat/index')
} else {
next()
}
})
} else {
next();
......
......@@ -12,9 +12,9 @@
</el-radio-group>
</div>
<div class="summary-ranking-th">
<div class="summary-ranking-sno">序号</div>
<div class="summary-ranking-name">名店名称</div>
<div class="summary-ranking-value">总产值</div>
<div class="summary-ranking-sno">排名</div>
<div class="summary-ranking-name">门店名称</div>
<div class="summary-ranking-value">加企微客户数</div>
</div>
<div class="chart-empty" v-if="custSortList.length == 0">
<img src="@/assets/img/empty.png" />
......@@ -40,10 +40,11 @@
<div class="summary-progress-barout"></div>
<div
class="summary-progress-barin"
:style="{ width: (100 * item.addEntmicroCount) / custSortMax + '%' }"
:style="{ width: (100 * item.custCount) / custSortMax + '%' }"
></div>
<div class="summary-progress-avg" :style="{ width: (100 * custAvergCount) / custSortMax + '%' }"></div>
</div>
<div class="summary-progress-value">{{ item.addEntmicroCount }}</div>
<div class="summary-progress-value">{{ item.custCount }}</div>
</div>
</div>
</div>
......@@ -61,8 +62,8 @@
</el-radio-group>
</div>
<div class="summary-ranking-th">
<div class="summary-ranking-sno">序号</div>
<div class="summary-ranking-name">名店名称</div>
<div class="summary-ranking-sno">排名</div>
<div class="summary-ranking-name">门店名称</div>
<div class="summary-ranking-value">总产值</div>
</div>
<div class="chart-empty" v-if="summaryArr.length == 0">
......@@ -110,6 +111,7 @@ export default {
dialogVisible: false,
rankHeight: 0,
custSortMax: 0,
custAvergCount: 0,
chartStatus: false,
radioStore: "1",
radioOutput: "1",
......@@ -134,6 +136,7 @@ export default {
})
.then((res) => {
this.custSortList = res.custSortList;
this.custAvergCount = res.custAvergCount;
if (this.custSortList.length == 0) {
this.dialogVisible = true;
return;
......@@ -164,8 +167,10 @@ export default {
display: flex;
.summary-ranking-box {
width: 50%;
margin-right: 20px;
min-height: 100px;
min-height: 220px;
&:first-child {
margin-right: 20px;
}
}
.summary-ranking-title {
height: 64px;
......@@ -254,13 +259,19 @@ export default {
position: absolute;
top: 0px;
left: 0px;
width: 50%;
height: 100%;
background-color: #5850ff;
}
.summary-progress-avg {
position: absolute;
bottom: -5px;
left: 0px;
height: 2px;
background-color: #FE9C1C;
}
}
.summary-progress-value {
width: 80px;
width: 64px;
margin-left: 20px;
}
}
......
......@@ -11,6 +11,7 @@
type="date"
placeholder="选择日期"
:clearable="false"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
......@@ -139,6 +140,11 @@ export default {
packmenberCount: 0,
todayAddPackmenberCount: 0,
summaryTime: util.getBeforeDate(),
pickerOptions: {
disabledDate:(time)=>{
return time.getTime() > Date.now();
}
},
expandStatus: true,
chartStatus: false,
echartId1: "customerEchartId1",
......@@ -258,21 +264,18 @@ export default {
{
name: "每日新增企微用户",
type: "line",
stack: "总量",
lineStyle: { color: "#5850FF " },
data: custEntmicroAdds,
},
{
name: "每日新增产值",
type: "line",
stack: "总量",
lineStyle: { color: "#2CCA74 " },
data: [],
},
{
name: "每日企微消失用户",
type: "line",
stack: "总量",
lineStyle: { color: "#FF6D00 " },
data: custLoseList,
},
......@@ -284,6 +287,8 @@ export default {
},
mounted() {
console.log(document.URL)
this.getViewData();
this.getChart();
window.addEventListener("resize", () => {
......
......@@ -303,7 +303,8 @@ export default {
timer: null,
timerQrcode: null,
statusQrcode: "",
URL: "wwww.baidu.com",
URL: "",
nextStatus: false,
Token: "",
Secret_1: "",
Secret_2: "",
......@@ -324,7 +325,7 @@ export default {
window.open(url);
},
jumpHome() {
this.$router.push("/home/index");
this.$router.push("/home/index?id=2");
},
jumpStore() {
this.$history.push("/settings/account/index");
......@@ -363,12 +364,14 @@ export default {
type: "success",
});
},
jumpConfig() {
window.open("https://www.baidu.com");
},
handleNext() {
if (this.active == 1) {
this.statusQrcode == "SUCCESS"?this.active = 3 : this.handleGetSecret();
if(this.statusQrcode == "SUCCESS") {
this.nextStatus?this.active = 2 : this.active = 3;
}else {
this.handleGetSecret();
}
return
}
if (this.active == 2) {
if (this.statusQrcode == "SUCCESS") {
......@@ -389,6 +392,9 @@ export default {
}
},
handlePrev() {
if(this.active == 3) {
this.nextStatus = true;
}
this.active--;
},
closeDalog() {
......
......@@ -103,7 +103,8 @@ export default {
methods: {
init() {
(this.newTag = ""), (this.innerTags = []);
this.newTag = "";
this.innerTags = [];
this.empTypeValue = "";
},
listEntFollowerType() {
......@@ -272,8 +273,8 @@ export default {
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 32px;
height: 35px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
display: flex;
......@@ -284,6 +285,9 @@ export default {
outline: none !important;
border: none !important;
}
/deep/ .el-input {
width: 150px;
}
}
.el-tag {
......
......@@ -66,7 +66,7 @@ export default {
},
{
label: "职务",
prop: "departmentName",
prop: "staffTitle",
},
],
},
......@@ -78,6 +78,10 @@ export default {
listDepartmentTree() {
this.$apis.emp.listDepartmentTree({ id: 1 }).then((res) => {
this.listTree = res;
this.$nextTick(() => {
document.getElementsByClassName('el-tree-node__expand-icon')[0].click();
document.getElementsByClassName('el-tree-node__content')[0].click();
});
});
},
clearSelect(arr) {
......@@ -104,7 +108,6 @@ export default {
let clientHeight = document.documentElement.clientHeight;
this.treeHeight = clientHeight - 450;
this.listDepartmentTree();
this.listEntmicroStaff();
},
};
</script>
......
......@@ -118,23 +118,23 @@ export default {
tableColumns: [
{
label: "姓名",
prop: "staffName",
prop: "staffName"
},
{
label: "部门",
prop: "departmentName",
prop: "departmentName"
},
{
label: "跟进专员类型",
prop: "followerTypeName",
prop: "followerTypeName"
},
{
label: "手机号",
prop: "staffPhone",
prop: "staffPhone"
},
{
label: "首次开通时间",
prop: "followerCreatedTime",
prop: "followerCreatedTime"
},
{
label: "是否有外部联系人权限",
......@@ -163,7 +163,9 @@ export default {
methods: {
openDrawer() {
this.drawer = true;
this.$refs.drawerForm.init();
this.$nextTick(() => {
this.$refs.drawerForm.init();
})
},
beforeSearchFn() {
return new Promise((resolve) => {
......
......@@ -25,6 +25,7 @@
type="date"
placeholder="选择日期"
:clearable="false"
:picker-options="pickerOptions"
>
</el-date-picker>
</div>
......@@ -63,7 +64,7 @@
class="guide-btn"
:style="{
left: guideLeft - imgWidth / 2 - borderLeft + 'px',
top: guideTop + 30 + 'px',
top: guideTop + imgHeight/2 + 'px',
}"
>
我知道了
......@@ -101,7 +102,7 @@
width: imgWidth + 'px',
height: imgHeight + 'px',
left: guideLeft - imgWidth - borderLeft + 'px',
top: guideTop - borderTop + 'px',
top: guideTop - borderTop - 40 + 'px',
}"
/>
<img
......@@ -175,6 +176,11 @@ export default {
data() {
return {
summaryTime: util.getBeforeDate(),
pickerOptions: {
disabledDate:(time)=>{
return time.getTime() > Date.now();
}
},
guideStatus: false,
step: 1,
headHeight: 0,
......@@ -210,14 +216,14 @@ export default {
this.imgHeight = (this.imgWidth * 246) / 541;
this.guideLeft = this.borderLeft;
this.guideTop =
document.querySelector(".header-panel").offsetTop + this.borderTop;
document.querySelector(".header-panel").offsetTop + this.borderTop - 2;
} else if (this.step == 2) {
this.guideWidth = document.querySelector(".consult-box").offsetWidth;
this.guideHeight = document.querySelector(".consult-box").offsetHeight;
this.imgHeight = this.guideHeight;
this.imgWidth = (this.imgHeight * 614) / 222;
this.imgHeight = this.guideHeight/2;
this.imgWidth = (this.imgHeight * 759) / 128;
this.guideLeft =
document.querySelector(".consult-box").offsetLeft + this.borderLeft - 44;
document.querySelector(".consult-box").offsetLeft + this.borderLeft - 42;
this.guideTop = document.querySelector(".consult-box").offsetTop + this.borderTop;
} else {
let top = document.querySelector(".accurate-sercives").offsetTop + 150;
......@@ -277,17 +283,18 @@ export default {
position: absolute;
background: #f4c647;
border-radius: 4px;
padding: 0.6em 0.9em;
padding: 6px 9px;
font-size: 10px;
font-weight: 500;
color: #ffffff;
line-height: 12px;
cursor: pointer;
bottom: 7px;
bottom: 8px;
left: 73.5%!important;
}
> img {
width: 100%;
height: auto;
height: 100%;
}
}
.main-isScroll {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!