task-review.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <hc-new-dialog v-model="isShow" :footer="false" is-table widths="96%" title="任务审核" @close="cancelClick">
  3. <template #header="{ titleId, titleClass }">
  4. <div class="hc-card-header flex items-center">
  5. <div :id="titleId" :class="titleClass">任务审核 【已开启电签】</div>
  6. </div>
  7. </template>
  8. <div class="relative h-full">
  9. <div class="hc-task-name relative">【{{ taskInfo.taskName }}】2019-10-17 中间计量申请 【第1期】 审批信息</div>
  10. <div class="hc-task-body relative flex">
  11. <div class="hc-task-time">
  12. <hc-body padding="10px" scrollbar style="background: #f7f7f7;">
  13. 111
  14. </hc-body>
  15. </div>
  16. <div class="hc-task-table">
  17. <hc-body padding="10px" scrollbar style="background: #f7f7f7;">
  18. 222
  19. </hc-body>
  20. </div>
  21. <div class="hc-task-form">
  22. <hc-body padding="10px" scrollbar style="background: #f7f7f7;">
  23. 222
  24. </hc-body>
  25. </div>
  26. </div>
  27. </div>
  28. </hc-new-dialog>
  29. </template>
  30. <script setup>
  31. import { ref, watch } from 'vue'
  32. const props = defineProps({
  33. tabs: {
  34. type: [String, Number],
  35. default: '',
  36. },
  37. row: {
  38. type: Object,
  39. default: () => ({}),
  40. },
  41. })
  42. //事件
  43. const emit = defineEmits(['finish', 'close'])
  44. //双向绑定
  45. // eslint-disable-next-line no-undef
  46. const isShow = defineModel('modelValue', {
  47. default: false,
  48. })
  49. //监听
  50. const tabsKey = ref(props.tabs)
  51. const rowInfo = ref(props.row)
  52. const taskInfo = ref({})
  53. watch(() => [
  54. props.tabs,
  55. props.row,
  56. ], ([key, row]) => {
  57. tabsKey.value = key
  58. rowInfo.value = row
  59. }, {
  60. immediate: true,
  61. deep: true,
  62. })
  63. //监听显示
  64. watch(isShow, (val) => {
  65. if (val) setTaskInfo()
  66. })
  67. //设置任务信息
  68. const setTaskInfo = async () => {
  69. }
  70. //表格数据
  71. const tableColumn = ref([
  72. { key: 'key1', name: '名称' },
  73. ])
  74. const tableData = ref([])
  75. const tableRowClick = () => {
  76. }
  77. //确认审批
  78. const confirmLoading = ref(false)
  79. const confirmClick = () => {
  80. //emit('finish')
  81. }
  82. //取消审批
  83. const cancelClick = () => {
  84. isShow.value = false
  85. taskInfo.value = {}
  86. rowInfo.value = {}
  87. tabsKey.value = ''
  88. emit('close')
  89. }
  90. </script>
  91. <style lang="scss" scoped>
  92. .hc-task-name {
  93. font-weight: bold;
  94. color: #1A1a1a;
  95. padding-bottom: 10px;
  96. border-bottom: 1px solid #f5f5f5;
  97. }
  98. .hc-task-body {
  99. height: calc(100% - 27px);
  100. .hc-task-time {
  101. position: relative;
  102. height: 100%;
  103. flex-shrink: 0;
  104. width: 200px;
  105. }
  106. .hc-task-table, .hc-task-form {
  107. position: relative;
  108. height: 100%;
  109. flex: 1;
  110. flex-basis: auto;
  111. }
  112. .hc-task-table {
  113. border-left: 1px solid #e5e5e5;
  114. border-right: 1px solid #e5e5e5;
  115. }
  116. }
  117. </style>