Commit cc77fa5a by qinjianhui

Merge branch 'dev' of http://47.99.244.21:9999/chehuidong/saas-manage into dev

parents e9632873 822bfec6
......@@ -2012,6 +2012,49 @@
"webpack-merge": "^5.7.3",
"webpack-virtual-modules": "^0.4.2",
"whatwg-fetch": "^3.6.2"
},
"dependencies": {
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"json5": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
}
},
"loader-utils": {
"version": "1.4.2",
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz",
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^1.0.1"
}
}
}
},
"@vue/cli-shared-utils": {
......@@ -2172,47 +2215,6 @@
"eslint-import-resolver-webpack": "^0.13.1"
}
},
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.10.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.1.tgz",
"integrity": "sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
},
"json5": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
}
},
"loader-utils": {
"version": "1.4.2",
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz",
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^1.0.1"
}
}
}
},
"@vue/web-component-wrapper": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz",
......
......@@ -17,6 +17,7 @@
"lodash": "~4.17.20",
"vue": "^2.6.14",
"vue-router": "^3.5.1",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2",
"vxe-table": "^3.5.9",
"xe-utils": "^3.5.7"
......
......@@ -83,6 +83,12 @@ const routes = [
name: 'system_abbreviation',
meta: { title: '州省简称' },
},
{
path: '/saas/management',
component: () => import('@/views/system/management.vue'),
name: 'system_management',
meta: { title: '客户管理' },
},
],
},
]
......
......@@ -220,6 +220,14 @@ export default {
index: '/saas/abbreviation',
children: [],
},
{
id: 8,
path: '',
label: '客户管理',
icon: 'el-icon-s-custom',
index: '/saas/management',
children: [],
},
],
},
],
......
<template>
<div class='wraper'>
<div class='page_left'>
<el-tree
:data='treeData'
:props='defaultProps'
highlight-current
:node-key="'userStatus'"
current-node-key=''
@node-click='handleNodeClick'>
<span class='custom-tree-node' slot-scope='{ node, data }'>
<span v-html='node.label'></span>
<span>({{ data.count }})</span>
</span>
</el-tree>
</div>
<div class='page_right'>
<!-- <el-form :inline='true' size='mini' :model='searchForm' class='search_form'>
<el-form-item label='公司名称' prop=''>
<el-input
v-model='searchForm.companyName'
placeholder='公司名称'
style='width: 120px'
clearable></el-input>
</el-form-item>
<el-form-item label='职位' prop=''>
<el-input
v-model='searchForm.job'
placeholder='职位'
style='width: 120px'
clearable></el-input>
</el-form-item>
<el-form-item label=''>
<el-button type='primary' @click='getList()'>查询</el-button>
</el-form-item>
</el-form> -->
<div class='my-table-cont my-flex-1'>
<my-table
:sourceData='userData'
ref='multipleTable'
:selection='true'
:tableColumns='tableColumns'
@selectionChange='selectionChange'
@current-change='currentTabFn'></my-table>
</div>
<pagination
:setValue='setpaginationOptions'
:options='paginationOptions' />
</div>
<!-- 弹出层 -->
<el-dialog
:close-on-click-modal='false'
title="状态修改"
:visible.sync='dialogVisible'
width='500px'>
<el-form
label-position='right'
label-width='130px'
size='mini'
:inline='true'
:model='addcurrencyform'
ref='addcurrencyform'>
<el-row type='flex' class='row-bg' justify='center'>
<el-col>
<el-form-item label='客户状态' prop='userStatus'>
<el-select
v-model='addcurrencyform.userStatus'
style='width: 164px'
placeholder='请选择客户状态'
filterable>
<el-option
v-for='item in continentList'
:key='item.userStatus'
:label="item.userStatusName"
:value='item.userStatus'>
{{ item.userStatusName }}
</el-option>
</el-select>
</el-form-item>
<el-form-item label='备注信息' prop='remark'>
<el-input
type="textarea"
class="textRemark"
v-model='addcurrencyform.remark'
placeholder='请输入备注信息'></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot='footer'>
<el-button
@click='dialogVisible = false'
size='mini'
style='width: 80px'>
取消
</el-button>
<el-button
type='primary'
@click='addCurrency()'
size='mini'
style='width: 80px'>
确认
</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { get, post } from '../../common/api/axios'
import MyTable from '@/common/components/base/tableView.vue'
export default {
name: 'basics_countryCode',
components: {
MyTable,
},
data() {
return {
paginationOptions: {
currentPage: 1,
total: 0,
pageSize: 100,
},
userData: [],
dialogVisible: false,
addcurrencyform: {
userStatus: '',
remark: '',
},
userStatusId: '',
continentList: [],
selection: [],
formId: null,
treeData: [],
defaultProps: {
children: 'children',
label: 'userStatusName',
},
searchForm: {
companyName: '',
job: '',
},
}
},
created() {
this.getList(1)
this.loadTreeData()
},
computed: {
tableColumns() {
return [
{
label: '公司名称',
key: 'companyName',
},
{
label: '职位',
key: 'job',
},
{
label: '邮箱',
key: 'email',
},
{
label: '手机号',
key: 'phoneNumber',
},
{
label: '客户状态',
key: 'userStatus',
render: (item) => (
<span>
{item.userStatus === 'TOBECOMMUNICATED' ? '待沟通' : item.userStatus === 'FOLLOWINGUP' ? '跟进中' : item.userStatus === 'FINISH' ? '已完成' : ''}
</span>
),
},
{
label: '客户备注',
key: 'remark',
},
{
label: '创建时间',
key: 'createTime',
},
{
label: '相关操作',
key: '',
width: 80,
render: (item) => (
<div>
{(
<span class='icon-view icon-edit-view' title='编辑'>
<i
class='el-icon-edit'
onClick={() => this.addDialog(item)}></i>
</span>
)}
</div>
),
},
]
},
},
methods: {
loadTreeData() {
get('business/user/statusList').then((res) => {
this.continentList = res.data
const totalData = res.data.reduce((acc, cur) => {
return acc + cur.count
}, 0)
this.treeData = [
{
userStatus: '',
count: totalData,
userStatusName: '全部',
},
...res.data,
]
})
},
handleNodeClick(data) {
this.treeStatus = data.userStatus
this.getList()
},
setpaginationOptions(opt) {
for (const key in opt) {
this.paginationOptions[key] = opt[key]
}
this.getList()
},
currentTabFn(val) {
if (val) {
this.formId = val.id
} else {
this.formId = null
}
},
addDialog(item) {
console.log(item)
this.userStatusId = item.id
this.addcurrencyform = item
this.dialogVisible = true
},
addCurrency(item) {
post('business/user/changeUserStatus', {
id: this.userStatusId,
userStatus: this.addcurrencyform.userStatus,
remark: this.addcurrencyform.remark,
}).then((res) => {
if (res.code === 200) {
this.loadTreeData()
this.getList()
this.dialogVisible = false
this.$message.success(res.message)
}
})
},
/**
* @description {查询}
*/
getList() {
const {
pageSize,
currentPage,
} = this.paginationOptions
post('business/user/list', {
pageSize,
currentPage,
// ...this.searchForm,
userStatus: this.treeStatus,
}).then((res) => {
if (res.code === 200) {
this.userData = res.data.records
this.paginationOptions.total = res.data.total
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true,
})
}
})
},
selectionChange(selection) {
this.selection = selection
},
},
}
</script>
<style lang='scss' scoped>
.wraper {
height: 100%;
display: flex;
overflow: hidden;
.page_left {
width: 200px;
min-width: 200px;
background: #fff;
border-radius: 5px;
margin-right: 10px;
}
.page_right {
flex: 1;
display: flex;
flex-direction: column;
background: #fff;
border-radius: 5px;
overflow: hidden;
}
.search_form {
margin-top: 5px;
margin-left: 10px;
}
.search_form > .el-form-item {
margin-bottom: 5px;
}
.search_form {
margin-top: 5px;
margin-left: 10px;
}
.content {
max-height: 61vh;
overflow: auto;
}
.textRemark{
width: 175%;
::v-deep .el-textarea__inner{
height: 100px;
}
}
}
</style>
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