dialog.info.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <div class="edu-training-edit">
  3. <DialogCom title="演练范本详情" :visible.sync="isShow" width="1000px" append-to-body>
  4. <div class="page-body">
  5. <el-descriptions
  6. class="contentArea"
  7. :column="1"
  8. size="medium"
  9. border
  10. :contentStyle="content_style"
  11. :label-style="labelStyle"
  12. >
  13. <el-descriptions-item labelClassName="gx_info_label" label="演练项目">
  14. {{
  15. getLabel(dict.type.core_drill_type, formData.drillType, "未知")
  16. }}
  17. </el-descriptions-item>
  18. <el-descriptions-item labelClassName="gx_info_label" label="演练场景">
  19. {{ formData.drillProjects }}
  20. </el-descriptions-item>
  21. <el-descriptions-item
  22. labelClassName="gx_info_label"
  23. span="2"
  24. label="预设案由"
  25. >
  26. <span class="text_nbsp"> {{ formData.defaultCause }}</span>
  27. </el-descriptions-item>
  28. </el-descriptions>
  29. </div>
  30. <div slot="footer" class="dialog-footer">
  31. <el-button @click="onHide">关闭</el-button>
  32. </div>
  33. </DialogCom>
  34. </div>
  35. </template>
  36. <script>
  37. import { mapState, mapMutations } from "vuex";
  38. import { getDrillDictionary } from "@/api/core/drill/drillDictionary";
  39. import { getLabel } from "@/views/commonOption";
  40. export default {
  41. components: { },
  42. dicts: ["drill_task_status", "core_drill_type"],
  43. data() {
  44. const params = this.$route.params;
  45. return {
  46. id: params ? params.id : null,
  47. isShow: false,
  48. formData: this.reset(),
  49. drillTypeOptions: [],
  50. formFileListDefualtValue: [],
  51. labelStyle: {
  52. color: "#000",
  53. "text-align": "center",
  54. height: "40px",
  55. "min-width": "150px",
  56. "word-break": "keep-all",
  57. },
  58. content_style: {
  59. "text-align": "left",
  60. "min-width": "300px",
  61. "word-break": "break-all",
  62. },
  63. iconClasses: ["icon-rate-face-1", "icon-rate-face-2", "icon-rate-face-3"], // 等同于 { 2: 'icon-rate-face-1', 4: { value: 'icon-rate-face-2', excluded: true }, 5: 'icon-rate-face-3' }
  64. };
  65. },
  66. props: {},
  67. watch: {},
  68. computed: {
  69. ...mapState(["loginUser"]),
  70. },
  71. methods: {
  72. ...mapMutations([]),
  73. getLabel,
  74. reset(other = {}) {
  75. return {
  76. id: null,
  77. drillType: null,
  78. defaultCause: null,
  79. drillProjects: null,
  80. ...other,
  81. };
  82. },
  83. async refresh(id, other) {
  84. if (!id) {
  85. this.reset(other);
  86. } else {
  87. getDrillDictionary(id).then((response) => {
  88. this.formData = response.data;
  89. this.loading = false;
  90. });
  91. // getDrillTask(id).then((response) => {
  92. // this.formData = response.data;
  93. // this.formFileListDefualtValue = response.data.fileList;
  94. // this.formData.signImageList = this.getSingImageList();
  95. // this.loading = false;
  96. // });
  97. }
  98. },
  99. async show(id, other = {}) {
  100. this.id = id;
  101. await this.refresh(id, other);
  102. this.isShow = true;
  103. },
  104. // 事件
  105. onHide() {
  106. this.isShow = false;
  107. },
  108. initDrillTypeOptions() {
  109. initList().then((response) => {
  110. this.drillTypeOptions = response;
  111. });
  112. },
  113. // 事件
  114. //apimark//
  115. },
  116. mounted() {},
  117. };
  118. </script>
  119. <style lang="scss" scoped></style>