checkSchedule.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <div>
  3. <div style="height: 90%;margin-top:30px;margin-left: 20%" v-if="data.length>0">
  4. <el-steps direction="vertical"
  5. :active="active"
  6. space="150px"
  7. align-center
  8. style="font-size: 12px">
  9. <el-step :key="index"
  10. v-for="(item,index) in data"
  11. :title="item.title"
  12. :status="item.status"
  13. style="font-size: 14px !important;">
  14. <template slot="description" scope="scope">
  15. <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size: 14px">
  16. <tr>
  17. <td>
  18. <span >{{index === 0?'提交人:':'审批人:'}}&nbsp;&nbsp;&nbsp;</span><span>{{item.auditName}}</span>
  19. </td>
  20. </tr>
  21. <tr>
  22. <td>
  23. <span >{{index === 0?'提交日期:':'审批日期:'}}&nbsp;&nbsp;&nbsp;</span><span>{{item.auditOpTime}}</span>
  24. </td>
  25. </tr>
  26. <tr>
  27. <td>
  28. <span >{{index === 0?'备注':'审批意见'}}:&nbsp;&nbsp;&nbsp;</span><span>{{item.auditMsg}}</span>
  29. </td>
  30. </tr>
  31. </table>
  32. </template>
  33. </el-step>
  34. </el-steps>
  35. <div class="dialogButton">
  36. <el-button size="small" @click="$emit('choceScheduleFun')">关闭</el-button>
  37. </div>
  38. </div>
  39. <div style="height: 90%;margin-top:30px;" v-else>
  40. <div style="text-align: center">
  41. <i class="el-icon-document" style="font-size: 60px;"></i>
  42. <div style="margin: 10px auto">暂无记录</div>
  43. </div>
  44. <div class="dialogButton">
  45. <el-button size="small" @click="$emit('choceScheduleFun')">关闭</el-button>
  46. </div>
  47. </div>
  48. </div>
  49. </template>
  50. <script>
  51. import option from './config/mainList.json'
  52. import { auditProcessListXD } from "@/api/check/check";
  53. export default {
  54. name: "checkSchedule",
  55. props: {
  56. checkId: {
  57. type: String
  58. },
  59. batchNo:{
  60. type: String
  61. },
  62. times:{
  63. type: String
  64. },
  65. choceScheduleFun:{
  66. type: Function
  67. }
  68. },
  69. data(){
  70. return {
  71. loading:false,
  72. option:option,
  73. active:1,
  74. data:[],
  75. page: {
  76. pageSize: 10,
  77. pagerCount: 5,
  78. total: 0,
  79. },
  80. }
  81. },
  82. watch:{
  83. checkId(val, oldVal) {
  84. if(val != oldVal){
  85. this.init()
  86. }
  87. },
  88. batchNo(val, oldVal) {
  89. if(val != oldVal){
  90. this.init()
  91. }
  92. }
  93. },
  94. created() {
  95. },
  96. mounted() {
  97. this.init()
  98. },
  99. methods:{
  100. init(){
  101. this.times = this.times?this.times:''
  102. auditProcessListXD(this.checkId,this.batchNo,this.times).then(res =>{
  103. res.data.data.map((item,index) =>{
  104. if(item.auditStatus == "A"){
  105. this.active = index + 2
  106. item.title = "审批通过"
  107. item.status = "success"
  108. }
  109. if(item.auditStatus == "B"){
  110. item.title = "审批驳回"
  111. item.status = "error"
  112. }
  113. if(item.auditStatus == "S" || item.auditStatus == "N"){
  114. item.title = "待审批"
  115. }
  116. })
  117. let sendObject = {
  118. ... res.data.data[0],
  119. auditName:res.data.data[0].sendName,
  120. auditOpTime:res.data.data[0].sendTime,
  121. auditMsg:res.data.data[0].sendMsg,
  122. auditStatus:"O",
  123. title:"提交",
  124. }
  125. res.data.data.unshift(sendObject)
  126. this.data = res.data.data
  127. })
  128. }
  129. }
  130. }
  131. </script>
  132. <style scoped lang="scss">
  133. /*::v-deep .el-step__title{*/
  134. /* font-size: 14px;*/
  135. /*}*/
  136. </style>