index.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <script>
  2. import {downFileBase64, reminderDetails} from "@/api/commitment";
  3. import buriedPoint from "@/utils/dd.buriedPoint";
  4. export default {
  5. watch: {
  6. /* 提醒uuid */
  7. '$route.query.uuid': {
  8. handler() {
  9. if (this.$route.query.uuid && this.$route.path === '/subPages/pages/commitment/remindDetail/index') {
  10. this.handleGetDetail()
  11. }
  12. },
  13. immediate: true,
  14. deep: true
  15. }
  16. },
  17. activated() {
  18. this.handleGetDetail()
  19. },
  20. data() {
  21. return {
  22. reminderDetail: {},
  23. }
  24. },
  25. onLoad(){
  26. buriedPoint('提醒详情','3-2','subPages/pages/commitment/remindDetail/index')
  27. },
  28. methods: {
  29. handleGetDetail() {
  30. reminderDetails({
  31. uuid: this.$route.query.uuid,
  32. type: this.$route.query.type // 0:整改提醒 1:系统提醒
  33. }).then(res => {
  34. if (res) {
  35. this.reminderDetail = res.data
  36. }
  37. })
  38. },
  39. /* 附件下载 */
  40. handleFileDown(uuid) {
  41. downFileBase64({
  42. uuid: uuid
  43. }).then(res => {
  44. if (res) {
  45. const a = document.createElement('a')
  46. a.href = res.data
  47. a.download = '附件'
  48. a.click()
  49. }
  50. })
  51. },
  52. handleClose() {
  53. window.history.go(-1)
  54. },
  55. handleIndicateBody(indicatorInputBody) {
  56. if (indicatorInputBody.includes('&')) {
  57. return this.reminderDetail.inputBody ? indicatorInputBody.replace('&', this.reminderDetail.inputBody + this.reminderDetail.inputSegment) : indicatorInputBody
  58. } else {
  59. return indicatorInputBody
  60. }
  61. }
  62. }
  63. }
  64. </script>
  65. <template>
  66. <view class="remind-page">
  67. <view class="remind-content">
  68. <view class="top">
  69. <view class="title">提醒编号:{{ reminderDetail.code }}</view>
  70. <view class="status">
  71. <span v-if="$route.query.type === '0'" style="color: #D9001B">红灯提醒</span>
  72. <span v-if="$route.query.type === '1'" style="color: #F59A23">黄灯提醒</span>
  73. </view>
  74. </view>
  75. <view class="remind">
  76. {{ reminderDetail.content }}
  77. </view>
  78. <van-divider></van-divider>
  79. <view>
  80. <view class="indicator-body">
  81. {{ reminderDetail.indicatorInputBody ? handleIndicateBody(reminderDetail.indicatorInputBody) : '' }}
  82. </view>
  83. <view>
  84. <view class="other-title">
  85. 监管核查
  86. <view style="color: #FF6B00" v-if="reminderDetail.approvalStatus === 0">
  87. 审批状态:待审批
  88. </view>
  89. <view style="color: #15BE50" v-if="reminderDetail.approvalStatus === 1">
  90. 审批状态:已通过
  91. </view>
  92. <view style="color: #D40000" v-if="reminderDetail.approvalStatus === 2">
  93. 审批状态:已拒绝
  94. </view>
  95. </view>
  96. <van-divider/>
  97. <van-form>
  98. <!--核查结果-->
  99. <van-field
  100. name="auditResult"
  101. label="核查结果"
  102. >
  103. <template #input>
  104. <view v-if="reminderDetail.auditResult === 0">符合</view>
  105. <view v-if="reminderDetail.auditResult === 1">整改</view>
  106. <view v-if="reminderDetail.auditResult === 2">整改扣分</view>
  107. </template>
  108. </van-field>
  109. <!--核查得分-->
  110. <van-field
  111. name="auditScore"
  112. label="核查得分"
  113. >
  114. <template #input>
  115. <span v-if="reminderDetail.auditResult === 1">
  116. 0分
  117. </span>
  118. <span v-if="reminderDetail.auditResult === 2">
  119. -10分
  120. </span>
  121. </template>
  122. </van-field>
  123. <!--核查说明-->
  124. <van-field
  125. name="auditRemark"
  126. label="核查说明"
  127. >
  128. <template #input>
  129. <view>{{ reminderDetail.auditRemark }}</view>
  130. </template>
  131. </van-field>
  132. <van-field
  133. name="expandStr"
  134. label="附件"
  135. >
  136. <template #input>
  137. <view v-if="reminderDetail.expandStr" class="file-style">
  138. <view v-for="(item,index) in reminderDetail.expandStr.split(',')" :key="index"
  139. @click="handleFileDown(item.uuid)">
  140. 附件{{ index + 1 }}
  141. </view>
  142. </view>
  143. </template>
  144. </van-field>
  145. <!--核查人员-->
  146. <van-field
  147. style="margin-top: 16px"
  148. name="auditor"
  149. label="核查人员"
  150. >
  151. <template #input>
  152. {{ reminderDetail.auditor }}
  153. </template>
  154. </van-field>
  155. <!--核查时间-->
  156. <van-field
  157. name="auditTime"
  158. label="核查时间"
  159. >
  160. <template #input>
  161. {{ reminderDetail.updateTime | date }}
  162. </template>
  163. </van-field>
  164. </van-form>
  165. </view>
  166. </view>
  167. </view>
  168. <view class="page-bottom">
  169. <van-button plain type="primary" @click="handleClose">关闭</van-button>
  170. <van-button type="info" @click="handleFileDown(reminderDetail.attachmentId)">下载PDF</van-button>
  171. </view>
  172. </view>
  173. </template>
  174. <style scoped lang="scss">
  175. .remind-page {
  176. height: 100vh;
  177. background-color: #fff;
  178. padding: 20px;
  179. overflow: hidden;
  180. display: flex;
  181. box-sizing: border-box;
  182. flex-direction: column;
  183. }
  184. .remind {
  185. margin-top: 10px;
  186. }
  187. .remind-page .top {
  188. display: flex;
  189. font-weight: bold;
  190. justify-content: space-between;
  191. align-items: center;
  192. .title {
  193. font-size: 28rpx;
  194. color: #333333;
  195. }
  196. .status {
  197. font-size: 24rpx;
  198. }
  199. }
  200. .indicator-body {
  201. margin-top: 40px;
  202. background: #F6F6F6;
  203. border-radius: 4px;
  204. font-weight: 400;
  205. font-size: 15px;
  206. color: #666666;
  207. text-align: justify;
  208. padding: 5px;
  209. min-height: 40px;
  210. }
  211. .other-title {
  212. font-size: 14px;
  213. font-weight: bold;
  214. color: #333;
  215. margin-top: 10px;
  216. display: flex;
  217. justify-content: space-between;
  218. view {
  219. font-size: 12px;
  220. }
  221. }
  222. .file-style {
  223. font-size: 14px;
  224. font-weight: 400;
  225. color: #1492FF;
  226. margin-top: 10px;
  227. display: flex;
  228. flex-direction: column;
  229. cursor: pointer;
  230. }
  231. .remind-content {
  232. flex: 1;
  233. overflow-y: auto;
  234. }
  235. .page-bottom {
  236. height: 50px;
  237. display: flex;
  238. width: 100%;
  239. }
  240. /* 默认情况下,每个按钮平分空间 */
  241. .page-bottom .van-button {
  242. flex: 1;
  243. margin-right: 10px;
  244. }
  245. /* 取消最后一个按钮的右侧间距 */
  246. .page-bottom .van-button:last-child {
  247. margin-right: 0;
  248. }
  249. /* 当只有两个按钮时的样式 */
  250. .page-bottom .van-button:first-child:nth-last-child(2) {
  251. flex: 1; /* 第一个按钮占 1/3 */
  252. }
  253. .page-bottom .van-button:nth-child(2):last-child {
  254. flex: 3; /* 第二个按钮占 2/3 */
  255. }
  256. </style>