| | |
| | | <template> |
| | | <el-dialog :title="dialogTitle" :visible.sync="visible" width="80%" @open="open" po :close-on-click-modal="false" |
| | | <el-dialog :title="dialogTitle" :visible.sync="visible" width="80%" @open="open" po :close-on-click-modal="false" |
| | | @close="handleClose"> |
| | | <div class="approval-dialog" :style="{ height: obj?.isDetail ? '50vh' : '40vh' }"> |
| | | <!-- 左侧审批内容 --> |
| | |
| | | <el-form-item prop="reportContent" style="margin-top: 38px"> |
| | | <ai-editor :readOnly="true" :value="form.reportContent" style="width: 100%;" |
| | | placeholder="请输入报告正文" /> |
| | | </el-form-item> |
| | | |
| | | <div class="header-title" style="width: 100%;"> |
| | | <div class="header-title-left"> |
| | | <img src="@/assets/public/headercard.png" /> |
| | | <span>附件</span> |
| | | </div> |
| | | </div> |
| | | <el-form-item prop="name" style="margin-top: 38px"> |
| | | <el-upload action="#" :file-list="fileList" disabled list-type="text" :on-preview="handlePreview"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | |
| | | <div class="header-title" style="width: 100%;"> |
| | |
| | | auditPersonName: "", |
| | | auditTime: "" |
| | | }, |
| | | fileList:[], |
| | | assessmentTable: [ |
| | | { |
| | | category: '1.该分题的菌种专业知识', |
| | |
| | | computed: { |
| | | dialogTitle() { |
| | | |
| | | return !this.obj.isDetail? "审批" : "详情"; |
| | | return !this.obj.isDetail ? "审批" : "详情"; |
| | | }, |
| | | totalScore() { |
| | | return this.assessmentTable.reduce((sum, item) => sum + (item.selectedScore || 0), 0); |
| | |
| | | }, |
| | | methods: { |
| | | open() { |
| | | |
| | | |
| | | |
| | | if (!this.obj.id) { |
| | | this.$message.error('缺少必要参数'); |
| | |
| | | }; |
| | | |
| | | let arr = data.evaluate.split(',') |
| | | |
| | | this.fileList = (data.enclosureUrl ? JSON.parse(data.enclosureUrl) : []) |
| | | |
| | | this.assessmentTable = this.assessmentTable.map((item, index) => { |
| | | item.selectedScore = Number(arr[index]) |
| | |
| | | ] |
| | | }); |
| | | |
| | | if (data.status >=2) { |
| | | if (data.status >= 2) { |
| | | processData.push({ |
| | | type: data.status >= 2 && data.status != 4 ? "primary" : "danger", |
| | | mode: "list", |
| | |
| | | this.form.pageSize = size |
| | | this.getList() |
| | | }, |
| | | handlePreview(file) { |
| | | if (file.url) { |
| | | window.open(file.url, '_blank'); |
| | | } else { |
| | | this.$message.warning('无可预览地址'); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |