|
@@ -2,11 +2,11 @@
|
|
|
<div>
|
|
|
<el-dialog v-dialogDrag :title="title" :visible.sync="visible" :close-on-click-modal="false" :modal-append-to-body="false" width="60%" @close="closeDialog">
|
|
|
<p v-if="isShowText">共{{ CompanyNum }}家客户,其中{{ CompanyMultiple }}家客户有多份合同</p>
|
|
|
- <el-table :data="tableData" border style="margin: 20px 0; height: 400px;overflow: auto;">
|
|
|
+ <el-table :data="tableData" border style="margin: 20px 0" height="400">
|
|
|
<el-table-column v-for="(col, index) in columns" :key="index" :prop="col.prop" :label="col.label" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
<span v-if="col.label === '操作'" style="color: #409eff; cursor: pointer; font-size: 14px; margin-right: 20px" @click="historicalNotesClickHandler(row)">历史备注</span>
|
|
|
- <span v-else>{{ row[col.prop] }}</span>
|
|
|
+ <span v-else>{{ handleRowContent(row, col) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -81,6 +81,7 @@ export default {
|
|
|
this.CompanyMultiple = 0;
|
|
|
this.CompanyNum = 0;
|
|
|
this.$emit("update:visible", false);
|
|
|
+ this.$emit("update:dataItem", {});
|
|
|
},
|
|
|
// 点击了历史留言
|
|
|
historicalNotesClickHandler(row) {
|
|
@@ -107,6 +108,13 @@ export default {
|
|
|
this.CompanyNum = res.Data.CompanyNum;
|
|
|
}
|
|
|
},
|
|
|
+ // 处理表格内容
|
|
|
+ handleRowContent(row, col) {
|
|
|
+ if (col.label === "合同期限") {
|
|
|
+ return `${row.StartDate} ~ ${row.EndDate}`;
|
|
|
+ }
|
|
|
+ return row[col.prop];
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|