write-report.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <div class="hc-page-box write-report" id="submit-report-layout-target">
  3. <HcCard>
  4. <template #header>
  5. <div class="hc-conclusion-header-box">
  6. <div class="hc-conclusion-icon-box">
  7. <HcIcon name="file-ppt-2" fill/>
  8. </div>
  9. <div class="ml-2 conclusion-name-box">
  10. <span class="text-xl text-cut conclusion-alias">编写结论、提交报告</span>
  11. <div class="text-xs text-cut conclusion-name">{{projectInfo['name']}}</div>
  12. </div>
  13. </div>
  14. </template>
  15. <template #extra>
  16. <el-button hc-btn type="primary" @click="onSubmitReportClick" v-if="state === 2">查看验收意见</el-button>
  17. <el-button hc-btn type="primary" v-if="state === 2">撤回提交</el-button>
  18. <el-button hc-btn type="primary" @click="submissionClick" v-if="state === 1">确认提交</el-button>
  19. <el-button hc-btn type="primary">暂存草稿</el-button>
  20. <el-button hc-btn @click="previousStep">上一步</el-button>
  21. <el-button hc-btn @click="toBackClick">返回主页</el-button>
  22. </template>
  23. <HcOnlineOffice :src="docxUrl" title="测试的文档.docx"/>
  24. </HcCard>
  25. <!--短信认证-->
  26. <HcSmsAuth :loading="SMSAuthLoading" :show="SMSAuthShow" @cancel="SMSAuthCancel" @confirm="SMSAuthConfirm"/>
  27. <!--历史报告-->
  28. <HcDrawer :show="isSubmitReportDrawer" to-id="submit-report-layout-target" uis="hc-submit-report-target"
  29. @close="onSubmitReportDrawerClose">
  30. <template #header>
  31. <div class="hc-select-view w-52">
  32. <el-select v-model="pdfDate" placeholder="选择日期">
  33. <el-option label="2022年12月24日" value="2022年12月24日"/>
  34. <el-option label="2022年12月25日" value="2022年12月25日"/>
  35. <el-option label="2022年12月26日" value="2022年12月26日"/>
  36. <el-option label="2022年12月27日" value="2022年12月27日"/>
  37. </el-select>
  38. </div>
  39. <div class="hc-title-view">试验资料(含工地试验室资质证书、仪器标定证书等)</div>
  40. <div class="hc-icon-view text-hover" @click="onSubmitReportDrawerClose">
  41. <HcIcon name="close"/>
  42. </div>
  43. </template>
  44. <HcPdf
  45. src="https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221212/ce9799c7d18efc03efefd6f242439f2e.pdf"/>
  46. </HcDrawer>
  47. </div>
  48. </template>
  49. <script setup>
  50. import {ref, onMounted} from "vue";
  51. import {useAppStore} from "~src/store";
  52. import {useRouter} from "vue-router";
  53. //变量
  54. const router = useRouter()
  55. const useAppState = useAppStore()
  56. const projectId = ref(useAppState.getProjectId);
  57. const contractId = ref(useAppState.getContractId);
  58. const projectInfo = ref(useAppState.getProjectInfo);
  59. //渲染完成
  60. onMounted(() => {
  61. setTimeout(() => {
  62. docxUrl.value = 'http://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com/upload/20230317/e2bdc6581e397b810b46ac7cd71b111b.docx'
  63. }, 1000)
  64. })
  65. const state = ref(1);
  66. const docxUrl = ref('')
  67. //const docxUrl = ref('https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20230317/e2bdc6581e397b810b46ac7cd71b111b.docx')
  68. //确认提交
  69. const submissionClick = () => {
  70. SMSAuthShow.value = true
  71. }
  72. //短信验证
  73. const SMSAuthLoading = ref(false)
  74. const SMSAuthShow = ref(false)
  75. const SMSAuthConfirm = () => {
  76. SMSAuthShow.value = false
  77. state.value = 2
  78. }
  79. const SMSAuthCancel = () => {
  80. SMSAuthShow.value = false
  81. }
  82. //上一步
  83. const previousStep = () => {
  84. router.back()
  85. }
  86. //返回主页
  87. const toBackClick = () => {
  88. router.push({
  89. name: 'transfer-initial-expert'
  90. })
  91. }
  92. //历史报告
  93. const isSubmitReportDrawer = ref(false)
  94. const onSubmitReportClick = () => {
  95. isSubmitReportDrawer.value = true
  96. }
  97. const pdfDate = ref(null)
  98. //历史报告
  99. const onSubmitReportDrawerClose = () => {
  100. isSubmitReportDrawer.value = false
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. @import '~style/transfer/scoped/submit-report.scss';
  105. .hc-conclusion-header-box {
  106. position: relative;
  107. display: flex;
  108. align-items: flex-start;
  109. .hc-conclusion-icon-box {
  110. font-size: 28px;
  111. color: var(--el-color-primary);
  112. }
  113. .conclusion-name-box {
  114. flex: auto;
  115. position: relative;
  116. overflow: hidden;
  117. .conclusion-alias {
  118. color: var(--el-color-primary);
  119. }
  120. .conclusion-name {
  121. margin-top: 4px;
  122. color: #838791;
  123. }
  124. }
  125. }
  126. </style>
  127. <style lang="scss">
  128. @import '~style/transfer/submit-report.scss';
  129. </style>