checkSchedule.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <div>
  3. <div style="height: 90%;margin-top:30px;margin-left: 20%">
  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 >备注:&nbsp;&nbsp;&nbsp;</span><span>{{item.auditMsg}}</span>
  29. </td>
  30. </tr>
  31. </table>
  32. </template>
  33. </el-step>
  34. </el-steps>
  35. <div style="margin-left: 80%;padding: 10px">
  36. <el-button size="small" @click="$emit('choceScheduleFun')">关闭</el-button>
  37. </div>
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. import option from './config/mainList.json'
  43. import { auditProcessList } from "@/api/check/check";
  44. export default {
  45. name: "checkSchedule",
  46. props: {
  47. checkId: {
  48. type: String
  49. },
  50. choceScheduleFun:{
  51. type: Function
  52. }
  53. },
  54. data(){
  55. return {
  56. loading:false,
  57. option:option,
  58. active:1,
  59. data:[],
  60. page: {
  61. pageSize: 10,
  62. pagerCount: 5,
  63. total: 0,
  64. },
  65. }
  66. },
  67. created() {
  68. auditProcessList(this.checkId).then(res =>{
  69. res.data.data.map((item,index) =>{
  70. if(item.auditStatus == "A"){
  71. this.active = index + 2
  72. item.title = "审批通过"
  73. item.status = "success"
  74. }
  75. if(item.auditStatus == "B"){
  76. item.title = "审批驳回"
  77. item.status = "error"
  78. }
  79. if(item.auditStatus == "S" || item.auditStatus == "N"){
  80. item.title = "待审批"
  81. }
  82. })
  83. let sendObject = {
  84. ... res.data.data[0],
  85. auditName:res.data.data[0].sendName,
  86. auditOpTime:res.data.data[0].sendTime,
  87. auditMsg:res.data.data[0].sendMsg,
  88. auditStatus:"O",
  89. title:"提交",
  90. }
  91. res.data.data.unshift(sendObject)
  92. this.data = res.data.data
  93. })
  94. },
  95. methods:{
  96. refreshChange(){
  97. },
  98. onLoad(){
  99. }
  100. }
  101. }
  102. </script>
  103. <style scoped lang="scss">
  104. /*::v-deep .el-step__title{*/
  105. /* font-size: 14px;*/
  106. /*}*/
  107. </style>