licp
2024-12-23 efdd0cfd0c5b65b01491835e94352e8afcb78085
报告编制预览修改
已修改2个文件
81 ■■■■ 文件已修改
src/components/do/b1-inspect-order-plan/humidity.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-report-preparation.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/humidity.vue
@@ -3,7 +3,7 @@
    <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>
@@ -11,7 +11,7 @@
          <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"
@@ -26,11 +26,11 @@
          <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"
@@ -55,7 +55,7 @@
              </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>
@@ -66,14 +66,14 @@
            <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">
@@ -88,7 +88,7 @@
          <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>
src/components/view/b1-report-preparation.vue
@@ -223,6 +223,17 @@
      <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>
@@ -387,7 +398,8 @@
        inLoading:false,
        imgList:[],
        imgVisible:false,
        currentImg:null
        currentImg:null,
        viewIssuedVisible:false
      }
    },
    computed: {
@@ -588,32 +600,65 @@
      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: {
        this.option = {
            url: this.javaApi + "/word/" + fileName,
            isEdit: false,
            fileType: "docx",
          fileType: fileType,
            title: fileName,
            lang: 'zh-CN',
            isPrint: true,
          isPrint: false,
            user_id: 1,
            user_name: userName,
          editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
          }
        })
        window.open(href, '_blank');
        // this.lookFileVisible = true
        // 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();
      },
      // 还原操作