questionnaire-detail.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="visible" :append-to-body="true" width="600px">
  3. <el-descriptions title="详细信息" :column="2" border>
  4. <el-descriptions-item :span="2" label="章节">{{progress.chapName}}</el-descriptions-item>
  5. <el-descriptions-item :span="2" label="细分章节">{{progress.subChapName}}</el-descriptions-item>
  6. <el-descriptions-item :span="2" label="二级细分章节">{{progress.secSubChapName}}</el-descriptions-item>
  7. <el-descriptions-item :span="2" label="内容">{{progress.content}}</el-descriptions-item>
  8. <el-descriptions-item :span="1" label="审计文档">
  9. <el-button
  10. size="mini"
  11. type="text"
  12. @click="handleDoc(progress.questionnaireId)"
  13. >查看</el-button>
  14. </el-descriptions-item>
  15. <el-descriptions-item :span="1" label="负责人">
  16. <span
  17. v-for="dict in userOptions"
  18. v-if="progress.personInCharge==dict.dictValue"
  19. v-text="dict.dictLabel"
  20. ></span>
  21. </el-descriptions-item>
  22. <el-descriptions-item :span="1" label="支持人">
  23. <span
  24. v-for="dict in userOptions"
  25. v-if="progress.supporter==dict.dictValue"
  26. v-text="dict.dictLabel"
  27. ></span>
  28. </el-descriptions-item>
  29. <el-descriptions-item :span="1" label="开始日期">{{progress.startDate}}</el-descriptions-item>
  30. <el-descriptions-item :span="1" label="目标日期">{{progress.targetDate}}</el-descriptions-item>
  31. <el-descriptions-item :span="1" label="实际完成日期">{{progress.finishDate}}</el-descriptions-item>
  32. <el-descriptions-item :span="1" label="准备情况">
  33. <span
  34. v-for="dict in dict.type.t_progress_preparation"
  35. v-if="progress.preparation==dict.value"
  36. v-text="dict.label"
  37. ></span>
  38. </el-descriptions-item>
  39. <el-descriptions-item :span="1" label="进度描述">
  40. <span
  41. v-for="dict in dict.type.t_progress_description"
  42. v-if="progress.progress==dict.value"
  43. v-text="dict.label"
  44. ></span>
  45. </el-descriptions-item>
  46. <el-descriptions-item :span="2" label="备注">{{progress.remarks}}</el-descriptions-item>
  47. </el-descriptions>
  48. <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%; margin-top: 10px;">
  49. <el-table-column width="100" prop="taskName" header-align="center" align="center" label="流程进度"></el-table-column>
  50. <el-table-column width="80" prop="userName" header-align="center" align="center" label="处理人"></el-table-column>
  51. <el-table-column prop="comment" header-align="center" align="center" label="备注 / 审批意见"></el-table-column>
  52. <el-table-column width="100" prop="taskCreateTime" header-align="center" align="center" label="开始时间"></el-table-column>
  53. <el-table-column width="100" prop="taskEndTime" header-align="center" align="center" label="结束时间"></el-table-column>
  54. </el-table>
  55. <el-form ref="taskForm" :model="taskForm" label-width="68px" style="margin-top: 10px;" v-if="type == 2">
  56. <el-form-item label="备注">
  57. <el-input clearable v-model="taskForm.comment" placeholder="请填写备注"></el-input>
  58. </el-form-item>
  59. </el-form>
  60. <div slot="footer" class="dialog-footer">
  61. <el-button v-if="type == 2" type="success" @click="dataFormSubmit(1)">通 过</el-button>
  62. <el-button v-if="type == 2" type="info" @click="dataFormSubmit(0)">驳 回</el-button>
  63. <el-button @click="visible = false">返回</el-button>
  64. </div>
  65. </el-dialog>
  66. </template>
  67. <script>
  68. import { getToken } from "@/utils/auth";
  69. import {getHistorylist} from "@/api/rc/approvedanger";
  70. import { handleQuestionnaire } from "@/api/rc/questionnaire";
  71. import { listAllUser } from "@/api/system/user";
  72. export default {
  73. name: "questionnaire-detail",
  74. components: { },
  75. dicts: ['t_progress_preparation', 't_progress_description' ],
  76. data() {
  77. return {
  78. rules: {
  79. },
  80. taskForm: {},
  81. title: null,
  82. visible: false,
  83. deptOptions: [],
  84. //流转列表
  85. historyList: [],
  86. // rejectList: [],
  87. historyLoading: true,
  88. dialogType: 0,
  89. progress: {
  90. chapName: null,
  91. subChapName: null,
  92. secSubChapName: null,
  93. content: null,
  94. personInCharge: null,
  95. supporter: null,
  96. startDate: null,
  97. targetDate: null,
  98. finishDate: null,
  99. preparation: null,
  100. progress: null,
  101. remarks: null,
  102. },
  103. type: 0,
  104. // 用户列表
  105. userOptions: [],
  106. }
  107. },
  108. created() {
  109. },
  110. methods: {
  111. handleDoc(id) {
  112. this.visible = false;
  113. this.$router.push({
  114. path: '/rc/file',
  115. query: {
  116. linkId: id,
  117. linkName: 'questionnaire',
  118. auditResult: '绿区',
  119. }
  120. })
  121. },
  122. init(progress, taskId, processId, taskName, type) {
  123. this.getUserList();
  124. this.progress = progress;
  125. this.type = type;
  126. this.taskForm.progress = progress;
  127. this.taskForm.taskId = taskId;
  128. this.taskForm.processId = processId;
  129. this.taskForm.taskName = taskName;
  130. // 流转列表
  131. getHistorylist({ "processId": processId }).then(response => {
  132. this.historyList = response.rows;
  133. this.historyLoading = false
  134. });
  135. this.visible = true;
  136. },
  137. /** 查询用户列表 */
  138. getUserList() {
  139. this.userOptions = [];
  140. listAllUser().then(response => {
  141. let data = response.data;
  142. for (let i = 0; i < data.length; i++) {
  143. // 非顶级节点
  144. if (data[i].parentId !== 0) {
  145. // 插入装置列表
  146. this.userOptions.push({"dictLabel": data[i].nickName, "dictValue": data[i].userId});
  147. }
  148. }
  149. });
  150. },
  151. dataFormSubmit(condition) {
  152. this.taskForm.condition = condition;
  153. handleQuestionnaire(this.taskForm).then(response => {
  154. this.visible = false;
  155. this.$modal.msgSuccess("提交成功");
  156. // refreshDataList事件:调用父组件getList方法刷新页面
  157. this.$emit('refreshDataList');
  158. });
  159. },
  160. }
  161. }
  162. </script>