xm-audit-reader-list.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <div style="padding: 20px; padding-top: 0" class="reporttablecardxm">
  3. <div
  4. style="position: absolute; padding-top: 10px; line-height: 32px"
  5. class="header_sd-header_common"
  6. >
  7. <div :class="$style.titlepoint"></div>
  8. <span :class="['toptitle', $style.toptitle]">工作动态: {{ params.title }} 阅读情况</span>
  9. </div>
  10. <br />
  11. <br />
  12. <sd-data-table
  13. ref="dataTable"
  14. :columns="columns"
  15. :projectlist="true"
  16. :data-url="dataUrl"
  17. :actions="actions"
  18. :process-req="processReq"
  19. :process-res="processRes"
  20. :defultpagination-pagesize="50"
  21. >
  22. <template slot="islink" slot-scope="text, record">
  23. {{ record.isRead === 'true' ? '是' : '否' }}
  24. </template>
  25. </sd-data-table>
  26. </div>
  27. </template>
  28. <script>
  29. import components from './_import-components/xm-audit-reader-list-import'
  30. export default {
  31. name: 'XmAuditorReaderList',
  32. metaInfo: {
  33. title: '阅读者列表',
  34. },
  35. components,
  36. data() {
  37. return {
  38. params: {},
  39. columns: [],
  40. year: '',
  41. data: [],
  42. unitName: '',
  43. unitCode: '',
  44. actions: [],
  45. }
  46. },
  47. computed: {
  48. dataUrl() {
  49. return `api/xcoa-mobile/v1/portal/getAuditorReaderList?formId=${this.params.formId}&beanId=${this.params.beanId}`
  50. },
  51. },
  52. mounted() {
  53. const params = JSON.parse(this.$route.query.params)
  54. this.params = params
  55. this.columns.push({ title: '姓名', dataIndex: 'name' })
  56. this.columns.push({ title: '公司', dataIndex: 'orgName' })
  57. this.columns.push({
  58. title: '是否已阅',
  59. dataIndex: 'isReader',
  60. scopedSlots: { customRender: 'islink' },
  61. })
  62. },
  63. methods: {
  64. processRes(res) {
  65. return res
  66. },
  67. processReq(req) {
  68. const params = JSON.parse(this.$route.query.params)
  69. if (req.data.pageIndex === undefined) {
  70. req.data.pageIndex = req.data.startPosition
  71. }
  72. if (req.data.pageSize === undefined) {
  73. req.data.pageSize = 10
  74. }
  75. return req
  76. },
  77. },
  78. }
  79. </script>
  80. <style module lang="scss">
  81. @use '@/common/design' as *;
  82. .titlepoint {
  83. position: absolute;
  84. top: 12px;
  85. left: 20px;
  86. width: 8px;
  87. height: 27px;
  88. background: #1890ff;
  89. border-radius: 8px;
  90. }
  91. .toptitle {
  92. position: absolute;
  93. top: 9px;
  94. left: 40px;
  95. width: 1250px;
  96. font-size: 22px;
  97. font-weight: bold;
  98. color: #404040;
  99. }
  100. </style>