fileTableList.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <div>
  3. <ele-pro-table
  4. ref="fileTable"
  5. :columns="jobColumns1"
  6. :datasource="fileTableList"
  7. :need-page="false"
  8. :immediate="true"
  9. >
  10. <template v-slot:action="{ row, $index }">
  11. <el-link type="primary" @click="fileDetails(row)">预览</el-link>
  12. </template>
  13. </ele-pro-table>
  14. </div>
  15. </template>
  16. <script>
  17. import { newFilePageAPI } from '@/api/inspectionWork';
  18. export default {
  19. components: {},
  20. props: {
  21. fileParam: {
  22. type: Array
  23. }
  24. },
  25. watch: {
  26. fileParam: {
  27. handler(val) {
  28. this.fileParamDatasource(val);
  29. },
  30. deep: true,
  31. immediate: true
  32. }
  33. },
  34. data() {
  35. return {
  36. fileTableList: []
  37. };
  38. },
  39. created() {},
  40. methods: {
  41. //工艺文件表格回显
  42. fileParamDatasource(fileParam) {
  43. let fileId = fileParam.map((item) => item.id).join(',');
  44. newFilePageAPI({
  45. ids: "'" + fileId + "'"
  46. }).then((res) => {
  47. this.fileTableList = res;
  48. });
  49. }
  50. }
  51. };
  52. </script>
  53. <style lang="scss" scoped>
  54. .content_box {
  55. width: 100%;
  56. margin-top: 12px;
  57. max-height: 42vh;
  58. overflow-y: scroll;
  59. }
  60. .content_ll_case {
  61. display: flex;
  62. flex-wrap: wrap;
  63. background: #e6f7ff;
  64. line-height: 30px;
  65. }
  66. .content_ll {
  67. height: 30px;
  68. width: 23%;
  69. display: flex;
  70. flex-direction: row;
  71. align-items: center;
  72. margin: auto;
  73. .name {
  74. color: #000;
  75. font-weight: 500;
  76. margin-right: 8px;
  77. }
  78. }
  79. ::v-deep .el-table--medium .el-table__cell {
  80. padding: 4px 0 !important;
  81. }
  82. ::v-deep .el-form-item__content {
  83. line-height: 28px !important;
  84. }
  85. </style>