|
@ -58,25 +58,25 @@ |
|
|
v-loading="tableLoading" |
|
|
v-loading="tableLoading" |
|
|
:data="tableData" |
|
|
:data="tableData" |
|
|
:default-expand-all="true" |
|
|
:default-expand-all="true" |
|
|
row-key="id" |
|
|
row-key="areaCode" |
|
|
border |
|
|
border |
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
|
|
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|
|
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|
|
:height="tableHeight"> |
|
|
:height="tableHeight"> |
|
|
<el-table-column prop="areaName" label="区域名称"></el-table-column> |
|
|
<el-table-column prop="areaName" label="区域名称"></el-table-column> |
|
|
<el-table-column prop="customerName" label="客户名称" header-align="center" align="center"></el-table-column> |
|
|
<el-table-column prop="customerName" label="客户名称" header-align="center" align="center"></el-table-column> |
|
|
<el-table-column prop="status" label="是否启用" header-align="center" align="center"> |
|
|
<!--<el-table-column prop="status" label="是否启用" header-align="center" align="center">--> |
|
|
<template slot-scope="scope"> |
|
|
<!--<template slot-scope="scope">--> |
|
|
<el-tag v-if="scope.row.status === 'open' && scope.row.parentCustomerId !== '0'" size="small" type="success">{{ '启用' }}</el-tag> |
|
|
<!--<el-tag v-if="scope.row.status === 'open' && scope.row.parentCustomerId !== '0'" size="small" type="success">{{ '启用' }}</el-tag>--> |
|
|
<el-tag v-if="scope.row.status === 'close' && scope.row.parentCustomerId !== '0'" size="small" type="danger">{{ '禁用' }}</el-tag> |
|
|
<!--<el-tag v-if="scope.row.status === 'close' && scope.row.parentCustomerId !== '0'" size="small" type="danger">{{ '禁用' }}</el-tag>--> |
|
|
</template> |
|
|
<!--</template>--> |
|
|
</el-table-column> |
|
|
<!--</el-table-column>--> |
|
|
<el-table-column label="操作" align="center" width="300"> |
|
|
<!--<el-table-column label="操作" align="center" width="300">--> |
|
|
<template slot-scope="scope"> |
|
|
<!--<template slot-scope="scope">--> |
|
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id, $t('update'))">{{ $t('update') }}</el-button> |
|
|
<!--<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id, $t('update'))">{{ $t('update') }}</el-button>--> |
|
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
|
|
<!--<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>--> |
|
|
</template> |
|
|
<!--</template>--> |
|
|
</el-table-column> |
|
|
<!--</el-table-column>--> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<!-- 弹窗, 新增 / 修改 --> |
|
|
<!-- 弹窗, 新增 / 修改 --> |
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|
@ -94,7 +94,7 @@ export default { |
|
|
return { |
|
|
return { |
|
|
mixinViewModuleOptions: { |
|
|
mixinViewModuleOptions: { |
|
|
createdIsNeed: false, |
|
|
createdIsNeed: false, |
|
|
getDataListURL: '/oper/crm/customerRelation/customertree', |
|
|
getDataListURL: '/gov/org/agency/customertree', |
|
|
getDataListIsPage: true, |
|
|
getDataListIsPage: true, |
|
|
deleteURL: '/oper/crm/customerRelation', |
|
|
deleteURL: '/oper/crm/customerRelation', |
|
|
deleteIsBatch: true |
|
|
deleteIsBatch: true |
|
@ -117,7 +117,7 @@ export default { |
|
|
// 查询列表 |
|
|
// 查询列表 |
|
|
async getTableData () { |
|
|
async getTableData () { |
|
|
this.tableLoading = true |
|
|
this.tableLoading = true |
|
|
await this.$http.get('/oper/crm/customerRelation/customertree').then(({ data: res }) => { |
|
|
await this.$http.get('/gov/org/agency/customertree').then(({ data: res }) => { |
|
|
if (res.code !== 0) { |
|
|
if (res.code !== 0) { |
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
} else { |
|
|
} else { |
|
|