DataSummary.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <div>
  3. <el-dialog v-dialogDrag :title="title" :visible.sync="visible" :close-on-click-modal="false" :modal-append-to-body="false" width="60%" @close="closeDialog">
  4. <p v-if="isShowText">共xxx家客户,其中x家客户有多份合同</p>
  5. <el-table :data="tableData" border style="margin: 20px 0; height: 400px">
  6. <el-table-column v-for="(col, index) in columns" :key="index" :prop="col.prop" :label="col.label" align="center">
  7. <template slot-scope="{ row }" v-if="col.label === '操作'">
  8. <span style="color: #409eff; cursor: pointer; font-size: 14px; margin-right: 20px" @click="historicalNotesClickHandler(row)">历史备注</span>
  9. </template>
  10. </el-table-column>
  11. </el-table>
  12. </el-dialog>
  13. <HistoricalNotesDlg :historicalNotesDlgVisible.sync="historicalNotesDlgVisible" :CompanyId.sync="historicalNotesId" />
  14. </div>
  15. </template>
  16. <script>
  17. import HistoricalNotesDlg from "@/components/historicalNotesDlg.vue";
  18. export default {
  19. name: "",
  20. components: { HistoricalNotesDlg },
  21. props: {
  22. visible: {
  23. type: Boolean,
  24. default: false,
  25. },
  26. title: {
  27. type: String,
  28. default: "",
  29. },
  30. columns: {
  31. type: Array,
  32. default: [],
  33. },
  34. },
  35. data() {
  36. return {
  37. tableData: [],
  38. historicalNotesDlgVisible: false, //历史备注的弹框
  39. historicalNotesId: 0,
  40. };
  41. },
  42. computed: {
  43. isShowText() {
  44. return ["新签合同", "到期合同", "续约合同", "确认不续约合同"].includes(this.title);
  45. },
  46. },
  47. watch: {},
  48. created() {},
  49. mounted() {},
  50. methods: {
  51. closeDialog() {},
  52. // 点击了历史留言
  53. historicalNotesClickHandler(row) {
  54. this.historicalNotesDlgVisible = true;
  55. this.historicalNotesId = Number(this.companyId);
  56. },
  57. },
  58. };
  59. </script>
  60. <style scoped lang=""></style>