dialog.detail.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <div class="rule-type">
  3. <DialogCom title="履职任务详情" :visible.sync="isShow" width="1500px">
  4. <el-descriptions :column="4" border>
  5. <el-descriptions-item label="任务名称">{{
  6. formData.planName
  7. }}</el-descriptions-item>
  8. <el-descriptions-item label="任务类型">{{
  9. getLabel(dict.type.resumption_plan_type,formData.planType)
  10. }}</el-descriptions-item>
  11. <el-descriptions-item label="任务周期">{{
  12. getLabel(dict.type.resumption_plan_cycle,formData.planCycle)
  13. }}</el-descriptions-item>
  14. <el-descriptions-item label="任务时间">{{
  15. getLabel(dict.type.resumption_plan_exec,formData.planExec)
  16. }}</el-descriptions-item>
  17. <el-descriptions-item label="机构类型">{{
  18. getLabel(orgTypeOptions,formData.execOrgType)
  19. }}</el-descriptions-item>
  20. <el-descriptions-item label="履职人员">
  21. {{resumptionRoles.filter(r=>formData.roleList.includes(r.id)).map(r=>r.name).join("、")}}
  22. </el-descriptions-item>
  23. <el-descriptions-item label="任务次数" :span="2">{{
  24. formData.count
  25. }}</el-descriptions-item>
  26. <el-descriptions-item label="备注" :span="4">{{
  27. formData.note
  28. }}</el-descriptions-item>
  29. </el-descriptions>
  30. <el-table :data="tableData" style="width: 100%" height="400px">
  31. <el-table-column prop="ruleName" label="履职手册"> </el-table-column>
  32. <el-table-column prop="itemName" label="履职项"> </el-table-column>
  33. <el-table-column prop="pointName" label="履职内容" width="300px">
  34. <template slot-scope="scope">
  35. <pre>{{ scope.row.pointName }}</pre>
  36. </template>
  37. </el-table-column>
  38. <el-table-column v-if="false" prop="ofOrgId" label="所属机构id">
  39. </el-table-column>
  40. <el-table-column prop="areaName" label="履职区域"> </el-table-column>
  41. <el-table-column prop="checkName" label="履职点位" v-if="false">
  42. </el-table-column>
  43. <el-table-column label="是否扫描">
  44. <template v-slot="{ row }">
  45. {{ row.pointScan ? "是" : "否" }}
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="必完成项">
  49. <template v-slot="{ row }">
  50. {{ row.required ? "是" : "否" }}
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. <div slot="footer" class="dialog-footer" style="margin-top:20px">
  55. <el-button @click="onHide">关闭</el-button>
  56. </div>
  57. </DialogCom>
  58. </div>
  59. </template>
  60. <script>
  61. import { findAllRole } from "@/api/system/role";
  62. import * as api from "@/api/resumption/plan";
  63. import { getLabel } from "@/views/commonOption.js";
  64. export default {
  65. dicts: [
  66. "resumption_plan_type",
  67. "resumption_plan_cycle",
  68. "resumption_org_type",
  69. "resumption_plan_status",
  70. "sys_org_type",
  71. "resumption_plan_exec",
  72. ],
  73. props: {
  74. orgTypeOptions: {
  75. type: Array,
  76. },
  77. ruleTypeOptions: {
  78. type: Array,
  79. },
  80. },
  81. data() {
  82. return {
  83. isShow: false,
  84. tableData: [],
  85. formData: {
  86. roleList:[]
  87. },
  88. resumptionRoles:[],
  89. };
  90. },
  91. methods: {
  92. getLabel,
  93. show(id) {
  94. this.tableData = null;
  95. api.get(id).then((r) => {
  96. this.formData = r.data;
  97. this.tableData = r.data.itemList;
  98. this.isShow = true;
  99. if (this.formData.execOrgType) {
  100. this.getRolesByOrg();
  101. }
  102. });
  103. },
  104. getRolesByOrg() {
  105. if (this.formData.execOrgType != null) {
  106. let params = {
  107. orgType: this.formData.execOrgType,
  108. };
  109. debugger
  110. findAllRole(params).then((res) => {
  111. this.resumptionRoles = res.data;
  112. });
  113. }
  114. },
  115. onHide() {
  116. this.isShow = false;
  117. },
  118. },
  119. };
  120. </script>
  121. <style></style>