|
|
|
@ -1,15 +1,96 @@ |
|
|
|
<!--编辑客户--> |
|
|
|
<template> |
|
|
|
<view class="assemble"> |
|
|
|
<!--切换--> |
|
|
|
<view class="tab_section"> |
|
|
|
<fui-segmented-control |
|
|
|
:values="optionTable" |
|
|
|
:current="(Number(optionTableId))" |
|
|
|
type="button" |
|
|
|
radius="8" |
|
|
|
height="80" |
|
|
|
color="#465cff" |
|
|
|
bold="true" |
|
|
|
@click="segmented"> |
|
|
|
</fui-segmented-control> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 客户资源修改记录--> |
|
|
|
<scroll-view |
|
|
|
v-show="filteredData.type == `resource`" |
|
|
|
scroll-y="true" |
|
|
|
:lower-threshold="lowerThreshold" |
|
|
|
@scrolltolower="loadMoreData" |
|
|
|
style="margin-top:40rpx;height: 80vh;" |
|
|
|
> |
|
|
|
<!--时间轴--> |
|
|
|
<view class="table_list"> |
|
|
|
<fui-timeaxis background="#f8f8f8" :padding="['36rpx','16rpx']"> |
|
|
|
<fui-timeaxis-node |
|
|
|
:lineColor="k<3?v.activeColor:'#ccc'" |
|
|
|
:lined="k!==tableList.length-1" |
|
|
|
v-for="(v,k) in tableList" |
|
|
|
:key="k" |
|
|
|
> |
|
|
|
<!--inco--> |
|
|
|
<view |
|
|
|
class="fui-node" |
|
|
|
:style="{borderColor:(k != tableList.length-1 ? '#465CFF' :'' ) }" |
|
|
|
> |
|
|
|
</view> |
|
|
|
<template v-slot:right> |
|
|
|
<view |
|
|
|
class="fui-process__node table_itme" |
|
|
|
:style="{paddingBottom:(k !== tableList.length-1 ? '50rpx' :'0rpx')}" |
|
|
|
:class="{'fui-node__pb':k!==tableList.length-1}" |
|
|
|
> |
|
|
|
|
|
|
|
<view class="fui-title"> |
|
|
|
<!--修改时间--> |
|
|
|
{{v.modification_time}} |
|
|
|
</view> |
|
|
|
<view class="itme_box"> |
|
|
|
<view class="title_name">修改人:{{v.staff_id_name}} 修改了如下内容</view> |
|
|
|
<view class="table_section"> |
|
|
|
<table class="table_box"> |
|
|
|
<!-- 自定义表头 --> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">字段名称</th> |
|
|
|
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">原数据</th> |
|
|
|
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">新数据</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
|
|
|
|
<!-- 自定义每一行数据 --> |
|
|
|
<tbody> |
|
|
|
<tr v-for="(row, index) in v.update_arr" :key="index"> |
|
|
|
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td> |
|
|
|
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td> |
|
|
|
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</fui-timeaxis-node> |
|
|
|
</fui-timeaxis> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<!-- 六要素修改记录--> |
|
|
|
<scroll-view |
|
|
|
v-show="filteredData.type == `six_speed`" |
|
|
|
scroll-y="true" |
|
|
|
:lower-threshold="lowerThreshold" |
|
|
|
@scrolltolower="loadMoreData" |
|
|
|
style="margin-top:40rpx;height: 88vh;" |
|
|
|
style="margin-top:40rpx;height: 80vh;" |
|
|
|
> |
|
|
|
<!--时间轴--> |
|
|
|
<view class="table_list"> |
|
|
|
<fui-timeaxis background="#fff" :padding="['36rpx','16rpx']"> |
|
|
|
<fui-timeaxis background="#f8f8f8" :padding="['36rpx','16rpx']"> |
|
|
|
<fui-timeaxis-node |
|
|
|
:lineColor="k<3?v.activeColor:'#ccc'" |
|
|
|
:lined="k!==tableList.length-1" |
|
|
|
@ -30,10 +111,12 @@ |
|
|
|
> |
|
|
|
|
|
|
|
<view class="fui-title"> |
|
|
|
2025-04-01 23:05:05 |
|
|
|
<!--修改时间--> |
|
|
|
{{v.modification_time}} |
|
|
|
</view> |
|
|
|
<view class="itme_box"> |
|
|
|
<view class="title_name">修改人:张三 修改了如下内容</view> |
|
|
|
<view class="title_name">修改人:{{v.staff_id_name}} 修改了如下内容</view> |
|
|
|
<view class="table_section"> |
|
|
|
<table class="table_box"> |
|
|
|
<!-- 自定义表头 --> |
|
|
|
<thead> |
|
|
|
@ -46,20 +129,22 @@ |
|
|
|
|
|
|
|
<!-- 自定义每一行数据 --> |
|
|
|
<tbody> |
|
|
|
<tr v-for="(row, index) in customTableData" :key="index"> |
|
|
|
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.field }}</td> |
|
|
|
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.oldValue }}</td> |
|
|
|
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.newValue }}</td> |
|
|
|
<tr v-for="(row, index) in v.update_arr" :key="index"> |
|
|
|
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td> |
|
|
|
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td> |
|
|
|
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</fui-timeaxis-node> |
|
|
|
</fui-timeaxis> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -79,48 +164,33 @@ export default { |
|
|
|
page:1,//当前页码 |
|
|
|
limit:10,//每页返回数据条数 |
|
|
|
total:10,//数据总条数 |
|
|
|
resource_id: '',//客户资源表id |
|
|
|
type:'resource',//查询类型|resource=客户资源,six_speed=六要素 |
|
|
|
customer_resource_id: '',//客户资源表id |
|
|
|
}, |
|
|
|
//数据列表 |
|
|
|
tableList:[{ |
|
|
|
title: '入场', |
|
|
|
time: '07:00', |
|
|
|
activeColor: '#465CFF' |
|
|
|
}, { |
|
|
|
title: '主场演讲', |
|
|
|
time: '08:00', |
|
|
|
descr: '马云(阿里巴巴)', |
|
|
|
activeColor: '#465CFF' |
|
|
|
}, { |
|
|
|
title: '世界互联经济', |
|
|
|
time: '08:30', |
|
|
|
descr: '马云(阿里巴巴)', |
|
|
|
activeColor: '#465CFF' |
|
|
|
}, { |
|
|
|
title: '打造自己的互联帝国', |
|
|
|
time: '09:30', |
|
|
|
descr: '马化腾(腾讯)', |
|
|
|
activeColor: '#FFB703' |
|
|
|
}, { |
|
|
|
title: '散场', |
|
|
|
time: '11:00', |
|
|
|
descr: '请带走垃圾,有序散场。' |
|
|
|
}],//表格数据 |
|
|
|
|
|
|
|
customTableData:[ |
|
|
|
tableList:[],//表格数据 |
|
|
|
|
|
|
|
//tab切换 |
|
|
|
optionTableId:0,//分段器初始选中项索引 |
|
|
|
optionTable:[ |
|
|
|
{ |
|
|
|
field:'姓名', |
|
|
|
oldValue:'张三', |
|
|
|
newValue:'11李四李四李四李四李四李四李四李四李四李四李四123', |
|
|
|
id: 0, |
|
|
|
name: '客户资源修改记录', |
|
|
|
type:'resource', |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: 1, |
|
|
|
name: '六要素修改记录', |
|
|
|
type:'six_speed', |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
this.filteredData.resource_id = options.resource_id//客户资源表id |
|
|
|
this.filteredData.customer_resource_id = options.resource_id//客户资源表id |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
// this.init() |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
//下拉刷新 |
|
|
|
async onPullDownRefresh() { |
|
|
|
@ -150,7 +220,7 @@ export default { |
|
|
|
this.filteredData.limit = 10//每页返回数据条数 |
|
|
|
this.filteredData.total = 10//数据总条数 |
|
|
|
}, |
|
|
|
//获取列表-我的客户 |
|
|
|
//获取列表-客户信息修改记录 |
|
|
|
async getList(){ |
|
|
|
this.loading = true |
|
|
|
|
|
|
|
@ -170,7 +240,7 @@ export default { |
|
|
|
this.tableList = [] |
|
|
|
} |
|
|
|
|
|
|
|
let res = await apiRoute.xs_resourceSharingIndex(data) |
|
|
|
let res = await apiRoute.xs_customerResourcesGetEditLogList(data) |
|
|
|
this.loading = false |
|
|
|
this.isReachedBottom = false; |
|
|
|
if (res.code != 1){ |
|
|
|
@ -181,6 +251,8 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
console.log(123123123,res) |
|
|
|
|
|
|
|
this.tableList = this.tableList.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中 |
|
|
|
|
|
|
|
console.log('列表1',this.tableList) |
|
|
|
@ -189,6 +261,18 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//切换tag列表 |
|
|
|
async segmented(e) { |
|
|
|
console.log('切换',e) |
|
|
|
//e.id|0=基础信息 1=六要素 |
|
|
|
let status = e.id |
|
|
|
this.optionTableId = String(status) |
|
|
|
this.filteredData.type = e.type//查询类型|resource=客户资源,six_speed=六要素 |
|
|
|
|
|
|
|
await this.resetFilteredData() |
|
|
|
await this.getList() |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
@ -199,17 +283,20 @@ export default { |
|
|
|
height: 100%; |
|
|
|
//background-color: #292929; |
|
|
|
overflow: auto; |
|
|
|
.tab_section{ |
|
|
|
padding: 0 20rpx; |
|
|
|
padding-top: 30rpx; |
|
|
|
} |
|
|
|
.table_list{ |
|
|
|
border: 1px solid red; |
|
|
|
|
|
|
|
.itme_box { |
|
|
|
margin-top: 30rpx; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
gap: 20rpx; |
|
|
|
gap: 25rpx; |
|
|
|
.title_name{ |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
.table_section{ |
|
|
|
.table_box{ |
|
|
|
width: 100%; |
|
|
|
border-collapse: collapse; |
|
|
|
@ -217,6 +304,8 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .fui-timeaxis__wrap{ |
|
|
|
|
|
|
|
} |
|
|
|
|