| | |
| | | <table border="1" cellpadding="10" class="thermal-table" style="margin-bottom: 20px;"> |
| | | <template v-for="(item,index) in insProductList"> |
| | | <tr> |
| | | <td style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;" colspan="6">{{ item.inspectionItemSubclass }}</td> |
| | | <td style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;" :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?7:6">{{ item.inspectionItemSubclass }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td style="font-size: 16px;background-color: #F0F1F5;">规格型号</td> |
| | |
| | | <td style="font-size: 16px;background-color: #F0F1F5;">试验方法</td> |
| | | <td>{{item.methodS}}</td> |
| | | <td style="font-size: 16px;background-color: #F0F1F5;">设备编号</td> |
| | | <td> |
| | | <td :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?2:1"> |
| | | <el-select v-model="item.equipValue" placeholder="请选择" size="small" :disabled="state>1" @focus="methodFocus(item)" @change="m=>handleEquip(m,item)"> |
| | | <el-option |
| | | v-for="item in equipOptions" |
| | |
| | | <td style="font-size: 16px;background-color: #F0F1F5;">试验要求</td> |
| | | <td colspan="3" style="text-align: left;">{{item.tell}}</td> |
| | | <td style="font-size: 16px;background-color: #F0F1F5;">设备名称</td> |
| | | <td>{{ item.equipName }}</td> |
| | | <td :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?2:1">{{ item.equipName }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td style="font-size: 16px;background-color: #F0F1F5;">实验前样品检查</td> |
| | | <td :colspan="item.beforeCheck=='破损'?1:2"> |
| | | <td :colspan="item.beforeCheck=='破损'?1:(insProductList&&insProductList.find(m=>m.list0.length==6)?3:2)"> |
| | | <el-select v-model="item.beforeCheck" placeholder="请选择" size="small" :disabled="state>1" @change="save(item)"> |
| | | <el-option |
| | | v-for="item in options" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | <td v-if="item.afterCheck=='破损'"> |
| | | <td v-if="item.afterCheck=='破损'" :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?2:1"> |
| | | <el-input v-model="item.afterNote" placeholder="破损说明" size="small" :disabled="state>1" style="display: inline-block;width: 100%;" @change="save(item)" type="textarea" |
| | | :rows="3"></el-input> |
| | | </td> |
| | |
| | | <el-input v-model="m.value" :placeholder="'第'+(i+1)+'次'" size="small" :disabled="state>1" style="display: inline-block;width: 50%;" @change="save(item)"></el-input> |
| | | <el-button icon="el-icon-minus" circle size="mini" type="danger" |
| | | :disabled="state>1" style="margin: 5px;display: inline-block;" @click="deleteList(item.list0,i,m)" ></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" :disabled="state>1" style="margin: 5px;display: inline-block;" v-if="i==item.list0.length-1&&i<4" @click="addList(item.list0,item.list0.length-1)"></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" :disabled="state>1" style="margin: 5px;display: inline-block;" v-if="i==item.list0.length-1&&i<5" @click="addList(item.list0,item.list0.length-1)"></el-button> |
| | | </td> |
| | | </tr> |
| | | <tr style="background-color: #F0F1F5;"> |
| | | <td colspan="2">时间</td> |
| | | <td colspan="1">温度</td> |
| | | <td colspan="1">湿度</td> |
| | | <td colspan="2">操作</td> |
| | | <td :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?3:2">操作</td> |
| | | </tr> |
| | | <tr v-for="(m,i) in item.list" :key="i+item.id"> |
| | | <td colspan="2"> |
| | |
| | | <td colspan="1"> |
| | | <el-input v-model="m.humidity" placeholder="湿度" size="small" @change ="a=>handleReplace(m,'%rh','humidity',item)" :disabled="state>1"></el-input> |
| | | </td> |
| | | <td colspan="2"> |
| | | <td :colspan="insProductList&&insProductList.find(m=>m.list0.length==6)?3:2"> |
| | | <el-button icon="el-icon-minus" circle size="mini" type="danger" |
| | | @click="deleteList(item.list,i,item)" :disabled="state>1" style="margin: 5px;"></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(item.list,i,'out')" :disabled="state>1" style="margin: 5px;"></el-button> |
| | |
| | | <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url" |
| | | :currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/> |
| | | </el-dialog> |
| | | <!--报告查看--> |
| | | <el-dialog :fullscreen="fullscreen" top="5vh" :modal-append-to-body="false" :visible.sync="viewIssuedVisible" title="报告查看" |
| | | width="80vw"> |
| | | <div class="full-screen"> |
| | | <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"></i> |
| | | <img v-else alt="" src="../../../static/img/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;" > |
| | | </div> |
| | | <div v-if="viewIssuedVisible" style="height: 80vh;"> |
| | | <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | inLoading:false, |
| | | imgList:[], |
| | | imgVisible:false, |
| | | currentImg:null |
| | | currentImg:null, |
| | | viewIssuedVisible:false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | async selectAllByOne(row) { |
| | | // let url = row.urlS ? row.urlS : row.url; |
| | | // this.currentFile.url = this.javaApi + url; |
| | | // let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS |
| | | // fileName = fileName.replace('/word/','') |
| | | // const userName = JSON.parse(localStorage.getItem("user")).name; |
| | | // //参考vabOnlyOffice组件参数配置 |
| | | // const { href } = this.$router.resolve({ |
| | | // path: `/wordEdit`, |
| | | // query: { |
| | | // url: this.javaApi + "/word/" + fileName, |
| | | // isEdit: false, |
| | | // fileType: "docx", |
| | | // title: fileName, |
| | | // lang: 'zh-CN', |
| | | // isPrint: true, |
| | | // user_id: 1, |
| | | // user_name: userName, |
| | | // } |
| | | // }) |
| | | // window.open(href, '_blank'); |
| | | // this.lookFileVisible = true |
| | | this.currentInfo = row; |
| | | console.log(`output->row`,row); |
| | | let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS |
| | | let fileType = "docx" |
| | | if (row.tempUrlPdf != null || row.tempUrlPdf === '') { |
| | | fileName = row.tempUrlPdf |
| | | fileType = "pdf" |
| | | } |
| | | fileName = fileName.replace('/word/','') |
| | | const userName = JSON.parse(localStorage.getItem("user")).name; |
| | | //参考vabOnlyOffice组件参数配置 |
| | | const { href } = this.$router.resolve({ |
| | | path: `/wordEdit`, |
| | | query: { |
| | | url: this.javaApi + "/word/" + fileName, |
| | | isEdit: false, |
| | | fileType: "docx", |
| | | title: fileName, |
| | | lang: 'zh-CN', |
| | | isPrint: true, |
| | | user_id: 1, |
| | | user_name: userName, |
| | | } |
| | | }) |
| | | window.open(href, '_blank'); |
| | | // this.lookFileVisible = true |
| | | this.option = { |
| | | url: this.javaApi + "/word/" + fileName, |
| | | isEdit: false, |
| | | fileType: fileType, |
| | | title: fileName, |
| | | lang: 'zh-CN', |
| | | isPrint: false, |
| | | user_id: 1, |
| | | user_name: userName, |
| | | editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName |
| | | } |
| | | // console.log(this.javaApi + "/word/" + fileName); |
| | | this.viewIssuedVisible = true; |
| | | }, |
| | | download(row) { |
| | | // 判断row对象中是否存在urlS属性,若存在则使用urlS,否则使用url |
| | | let url = row.urlS ? row.urlS : row.url; |
| | | |
| | | // 创建一个<a>标签元素 |
| | | const link = document.createElement('a'); |
| | | |
| | | // 设置<a>标签的href属性,为javaApi和url的组合 |
| | | link.href = this.javaApi + url; |
| | | |
| | | // 设置<a>标签的target属性为'_blank',表示在新窗口中打开链接 |
| | | link.target = '_blank'; |
| | | |
| | | // 将<a>标签添加到文档的主体中 |
| | | document.body.appendChild(link); |
| | | |
| | | link.click(); |
| | | }, |
| | | // 还原操作 |