123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <template>
- <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="visible" :append-to-body="true" width="600px">
- <el-descriptions title="详细信息" :column="2" border>
- <el-descriptions-item :span="2" label="章节">{{progress.chapName}}</el-descriptions-item>
- <el-descriptions-item :span="2" label="细分章节">{{progress.subChapName}}</el-descriptions-item>
- <el-descriptions-item :span="2" label="二级细分章节">{{progress.secSubChapName}}</el-descriptions-item>
- <el-descriptions-item :span="2" label="内容">{{progress.content}}</el-descriptions-item>
- <el-descriptions-item :span="1" label="审计文档">
- <el-button
- size="mini"
- type="text"
- @click="handleDoc(progress.questionnaireId)"
- >查看</el-button>
- </el-descriptions-item>
- <el-descriptions-item :span="1" label="负责人">
- <span
- v-for="dict in userOptions"
- v-if="progress.personInCharge==dict.dictValue"
- v-text="dict.dictLabel"
- ></span>
- </el-descriptions-item>
- <el-descriptions-item :span="1" label="支持人">
- <span
- v-for="dict in userOptions"
- v-if="progress.supporter==dict.dictValue"
- v-text="dict.dictLabel"
- ></span>
- </el-descriptions-item>
- <el-descriptions-item :span="1" label="开始日期">{{progress.startDate}}</el-descriptions-item>
- <el-descriptions-item :span="1" label="目标日期">{{progress.targetDate}}</el-descriptions-item>
- <el-descriptions-item :span="1" label="实际完成日期">{{progress.finishDate}}</el-descriptions-item>
- <el-descriptions-item :span="1" label="准备情况">
- <span
- v-for="dict in dict.type.t_progress_preparation"
- v-if="progress.preparation==dict.value"
- v-text="dict.label"
- ></span>
- </el-descriptions-item>
- <el-descriptions-item :span="1" label="进度描述">
- <span
- v-for="dict in dict.type.t_progress_description"
- v-if="progress.progress==dict.value"
- v-text="dict.label"
- ></span>
- </el-descriptions-item>
- <el-descriptions-item :span="2" label="备注">{{progress.remarks}}</el-descriptions-item>
- </el-descriptions>
- <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%; margin-top: 10px;">
- <el-table-column width="100" prop="taskName" header-align="center" align="center" label="流程进度"></el-table-column>
- <el-table-column width="80" prop="userName" header-align="center" align="center" label="处理人"></el-table-column>
- <el-table-column prop="comment" header-align="center" align="center" label="备注 / 审批意见"></el-table-column>
- <el-table-column width="100" prop="taskCreateTime" header-align="center" align="center" label="开始时间"></el-table-column>
- <el-table-column width="100" prop="taskEndTime" header-align="center" align="center" label="结束时间"></el-table-column>
- </el-table>
- <el-form ref="taskForm" :model="taskForm" label-width="68px" style="margin-top: 10px;" v-if="type == 2">
- <el-form-item label="备注">
- <el-input clearable v-model="taskForm.comment" placeholder="请填写备注"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button v-if="type == 2" type="success" @click="dataFormSubmit(1)">通 过</el-button>
- <el-button v-if="type == 2" type="info" @click="dataFormSubmit(0)">驳 回</el-button>
- <el-button @click="visible = false">返回</el-button>
- </div>
- </el-dialog>
- </template>
- <script>
- import { getToken } from "@/utils/auth";
- import {getHistorylist} from "@/api/rc/approvedanger";
- import { handleQuestionnaire } from "@/api/rc/questionnaire";
- import { listAllUser } from "@/api/system/user";
- export default {
- name: "questionnaire-detail",
- components: { },
- dicts: ['t_progress_preparation', 't_progress_description' ],
- data() {
- return {
- rules: {
- },
- taskForm: {},
- title: null,
- visible: false,
- deptOptions: [],
- //流转列表
- historyList: [],
- // rejectList: [],
- historyLoading: true,
- dialogType: 0,
- progress: {
- chapName: null,
- subChapName: null,
- secSubChapName: null,
- content: null,
- personInCharge: null,
- supporter: null,
- startDate: null,
- targetDate: null,
- finishDate: null,
- preparation: null,
- progress: null,
- remarks: null,
- },
- type: 0,
- // 用户列表
- userOptions: [],
- }
- },
- created() {
- },
- methods: {
- handleDoc(id) {
- this.visible = false;
- this.$router.push({
- path: '/rc/file',
- query: {
- linkId: id,
- linkName: 'questionnaire',
- auditResult: '绿区',
- }
- })
- },
- init(progress, taskId, processId, taskName, type) {
- this.getUserList();
- this.progress = progress;
- this.type = type;
- this.taskForm.progress = progress;
- this.taskForm.taskId = taskId;
- this.taskForm.processId = processId;
- this.taskForm.taskName = taskName;
- // 流转列表
- getHistorylist({ "processId": processId }).then(response => {
- this.historyList = response.rows;
- this.historyLoading = false
- });
- this.visible = true;
- },
- /** 查询用户列表 */
- getUserList() {
- this.userOptions = [];
- listAllUser().then(response => {
- let data = response.data;
- for (let i = 0; i < data.length; i++) {
- // 非顶级节点
- if (data[i].parentId !== 0) {
- // 插入装置列表
- this.userOptions.push({"dictLabel": data[i].nickName, "dictValue": data[i].userId});
- }
- }
- });
- },
- dataFormSubmit(condition) {
- this.taskForm.condition = condition;
- handleQuestionnaire(this.taskForm).then(response => {
- this.visible = false;
- this.$modal.msgSuccess("提交成功");
- // refreshDataList事件:调用父组件getList方法刷新页面
- this.$emit('refreshDataList');
- });
- },
- }
- }
- </script>
|