detail-dialog.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <ele-modal
  3. title="证照详情"
  4. :visible.sync="dialogVisible"
  5. width="60%"
  6. :maxable="true"
  7. >
  8. <div class="switch">
  9. <div class="switch_left">
  10. <ul>
  11. <li
  12. v-for="item in tabOptions"
  13. :key="item.key"
  14. :class="{ active: activeComp == item.key }"
  15. @click="activeComp = item.key"
  16. >
  17. {{ item.name }}
  18. </li>
  19. </ul>
  20. </div>
  21. </div>
  22. <el-descriptions title="" :column="3" size="medium" border
  23. v-if="activeComp == 'main'"
  24. >
  25. <el-descriptions-item>
  26. <template slot="label"> 证照编号 </template>
  27. {{ form.code }}
  28. </el-descriptions-item>
  29. <el-descriptions-item>
  30. <template slot="label"> 类型 </template>
  31. {{
  32. getDictValue(
  33. form.holderType == 1 ? '证件类型' : '客户/供应商资质类型',
  34. form.type
  35. )
  36. }}
  37. </el-descriptions-item>
  38. <el-descriptions-item>
  39. <template slot="label"> 持证对象</template>
  40. {{ form.holder }}
  41. </el-descriptions-item>
  42. <el-descriptions-item :span="2">
  43. <template slot="label"> 有效期至 </template>
  44. {{ form.validityStartTime + ' — ' + form.validityEndTime }}
  45. </el-descriptions-item>
  46. <el-descriptions-item>
  47. <template slot="label"> 状态 </template>
  48. {{ getDictValue('规则状态', form.status) }}
  49. </el-descriptions-item>
  50. <el-descriptions-item>
  51. <template slot="label"> 颁发时间 </template>
  52. {{ form.enactorTime }}
  53. </el-descriptions-item>
  54. <el-descriptions-item>
  55. <template slot="label"> 创建人 </template>
  56. {{ form.createUserName }}
  57. </el-descriptions-item>
  58. <!-- <el-descriptions-item>
  59. <template slot="label"> 创建机构 </template>
  60. {{ form.createUserDeptName }}
  61. </el-descriptions-item> -->
  62. <el-descriptions-item>
  63. <template slot="label"> 创建时间 </template>
  64. {{ form.createTime }}
  65. </el-descriptions-item>
  66. <el-descriptions-item :span="3">
  67. <template slot="label"> 附件 </template>
  68. <fileMain v-model="form.fileObj" type="view"></fileMain>
  69. </el-descriptions-item>
  70. <el-descriptions-item :span="3">
  71. <template slot="label"> 备注 </template>
  72. {{ form.remark }}
  73. </el-descriptions-item>
  74. </el-descriptions>
  75. <bpmDetail
  76. v-if="activeComp == 'bpm' && form.processInstanceId"
  77. :id="form.processInstanceId"
  78. ></bpmDetail>
  79. <div slot="footer" class="dialog-footer">
  80. <el-button size="small" @click="dialogVisible = false">关 闭</el-button>
  81. </div>
  82. </ele-modal>
  83. </template>
  84. <script>
  85. import { getPhotoInfo } from '@/api/documentManagement';
  86. import dictMixins from '@/mixins/dictMixins';
  87. // import fileMain from '@/components/addDoc/index.vue';
  88. import bpmDetail from '@/views/bpm/processInstance/businessDetail.vue';
  89. export default {
  90. mixins: [dictMixins],
  91. components: { bpmDetail },
  92. //注册组件
  93. data() {
  94. return {
  95. dialogVisible: false,
  96. form: {},
  97. activeComp: 'main',
  98. tabOptions: [
  99. { key: 'main', name: '详情' },
  100. { key: 'bpm', name: '审批流程' }
  101. ],
  102. };
  103. },
  104. computed: {},
  105. created() {
  106. this.requestDict('证件类型');
  107. this.requestDict('客户/供应商资质类型');
  108. this.requestDict('规则状态');
  109. },
  110. methods: {
  111. open(row) {
  112. this.activeComp='main'
  113. this.dialogVisible = true;
  114. this.getInfo(row.id);
  115. },
  116. async getInfo(id) {
  117. const data = await getPhotoInfo(id);
  118. this.form = data;
  119. }
  120. }
  121. };
  122. </script>
  123. <style lang="scss">
  124. .el-form-item {
  125. margin-bottom: 20px !important;
  126. }
  127. </style>