zjk
1 天以前 95db3ac1352e1f98ba934da9e86fca00e661abe9
feat: IP地址判断
15个文件已修改
751 ■■■■■ 已修改文件
laboratory/src/utils/baseurl.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/utils/utils.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/chemistQa/pilotAndProduction/components/approval/index.vue 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/chemistQa/productApproval/add.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/chemistQa/productApproval/components/approval/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/chemistQa/projectTesting/components/approval/index.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/chemistQa/rawMaterials/components/approval/index.vue 125 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/deliveryAssessment/testingAndEvaluation/components/approval/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/feasibilityReport/components/approval/index.vue 93 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/feasibilityStudy/components/approval/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/processDevelopment/components/approval/index.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/projectProposalLibrary/components/approval/index.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/reportLibrary/verificationRelease/components/approval/index.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/views/system/user/components/add-edit.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/vue.config.js 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
laboratory/src/utils/baseurl.js
@@ -1,16 +1,16 @@
const apiConfig = {
  // 开发环境
  development: {
    baseURL: "/laboratory",
    baseURL: "/",
    imgUrl: "http://127.0.0.1:11222/laboratory/open/file/upload",
    // showImgUrl: "http://221.182.45.100:11222/",
    showImgUrl: "http://127.0.0.1:11222/",
    showImgUrl: "http://127.0.0.1:11222/images/",
  },
  // 生产环境
  production: {
    baseURL: "/laboratory",
    imgUrl: "http://127.0.0.1:11222/laboratory/open/file/upload",
    showImgUrl: "http://127.0.0.1:11222/",
    imgUrl: "/laboratory/open/file/upload",
    showImgUrl: "http://127.0.0.1:11222/images/",
  },
};
laboratory/src/utils/utils.js
@@ -1,5 +1,5 @@
import axios from 'axios';
import apiConfig from './baseurl';
import axios from "axios";
import apiConfig from "./baseurl";
export const customRequest = (params) => {
  const { file, onSuccess, onError } = params;
@@ -12,30 +12,37 @@
    });
};
export const customUploadRequest = ({ file, onSuccess, onError, action, headers }) => {
export const customUploadRequest = ({
  file,
  onSuccess,
  onError,
  action,
  headers,
}) => {
  // 默认 action 为 apiConfig.imgUrl
  const uploadUrl = action || apiConfig.imgUrl;
  // 默认 headers 带上 Authorization
  const uploadHeaders = {
    Authorization: sessionStorage.getItem('token') || '',
    ...headers
    Authorization: sessionStorage.getItem("token") || "",
    ...headers,
  };
  const formData = new FormData();
  formData.append('file', file);
  formData.append("file", file);
  axios.post(uploadUrl, formData, { headers: uploadHeaders })
    .then(res => {
  axios
    .post(uploadUrl, formData, { headers: uploadHeaders })
    .then((res) => {
      onSuccess(res.data);
    })
    .catch(err => {
    .catch((err) => {
      onError(err);
    });
};
export function getFullUrl(url) {
  if (!url) return '';
  if (!url) return "";
  if (/^https?:\/\//.test(url)) return url;
  return apiConfig.showImgUrl + url;
  return getAllocateIp() + url;
}
/**
@@ -44,19 +51,19 @@
 * @param {string} name 下载保存的文件名(可选)
 */
export function downloadFileByUrl(url, name) {
  console.log('22222222222222222222',url)
  console.log("22222222222222222222", url);
  if (!url) return;
  // 处理相对路径
  const fullUrl = getFullUrl(url);
  console.log('fullUrl fullUrl',fullUrl)
  const a = document.createElement('a');
  console.log("fullUrl fullUrl", fullUrl);
  const a = document.createElement("a");
  a.href = fullUrl;
  if (name) {
    a.download = name;
  } else {
    a.download = '';
    a.download = "";
  }
  a.style.display = 'none';
  a.style.display = "none";
  document.body.appendChild(a);
  a.click();
  document.body.removeChild(a);
@@ -69,5 +76,10 @@
export function openFileInNewTab(url) {
  if (!url) return;
  const fullUrl = getFullUrl(url);
  window.open(fullUrl, '_blank');
}
  window.open(fullUrl, "_blank");
}
export function getAllocateIp() {
  const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
  return userInfo.allocateIp ? userInfo.userInfo : apiConfig.showImgUrl;
}
laboratory/src/views/chemistQa/pilotAndProduction/components/approval/index.vue
@@ -1,12 +1,6 @@
<template>
  <el-dialog
    :title="dialogTitle"
    :visible.sync="dialogVisible"
    width="90%"
    top="5vh"
    :close-on-click-modal="false"
    @close="handleClose"
  >
  <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="90%" top="5vh" :close-on-click-modal="false"
    @close="handleClose">
    <div class="approval-dialog">
      <!-- 左侧审批内容 -->
      <div class="approval-content">
@@ -27,58 +21,23 @@
              </template>
            </Table>
            <el-form
              ref="form"
              :model="form"
              :rules="rules"
              inline
              label-position="top"
              style="margin-top: 18px"
            >
            <el-form ref="form" :model="form" :rules="rules" inline label-position="top" style="margin-top: 18px">
              <el-row :gutter="20">
                <el-col :span="24">
                  <el-form-item prop="reportTitle" label="报告标题">
                    <el-input
                      v-model="form.reportTitle"
                      style="width: 100%"
                      placeholder="请输入报告标题"
                      disabled
                    />
                    <el-input v-model="form.reportTitle" style="width: 100%" placeholder="请输入报告标题" disabled />
                  </el-form-item>
                  <el-form-item
                    prop="reportCode"
                    label="报告编号"
                    style="margin-left: 100px"
                  >
                    <el-input
                      v-model="form.reportCode"
                      style="width: 100%"
                      placeholder="请输入报告编号"
                      disabled
                    />
                  <el-form-item prop="reportCode" label="报告编号" style="margin-left: 100px">
                    <el-input v-model="form.reportCode" style="width: 100%" placeholder="请输入报告编号" disabled />
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item prop="developPerson" label="制定人">
                    <el-input
                      v-model="form.developPerson"
                      style="width: 100%"
                      placeholder="请输入制定人"
                      disabled
                    />
                    <el-input v-model="form.developPerson" style="width: 100%" placeholder="请输入制定人" disabled />
                  </el-form-item>
                  <el-form-item
                    prop="developDate"
                    label="制定日期"
                    style="margin-left: 100px"
                  >
                    <el-date-picker
                      :prefix-icon="null"
                      v-model="form.developDate"
                      type="date"
                      disabled
                      placeholder="请选择日期"
                    />
                  <el-form-item prop="developDate" label="制定日期" style="margin-left: 100px">
                    <el-date-picker :prefix-icon="null" v-model="form.developDate" type="date" disabled
                      placeholder="请选择日期" />
                  </el-form-item>
                </el-col>
              </el-row>
@@ -89,12 +48,7 @@
                </div>
              </div>
              <el-form-item prop="reportText" style="margin-top: 18px">
                <ai-editor
                  :value="form.reportText"
                  style="width: 100%"
                  placeholder="请输入报告正文"
                  :readOnly="true"
                />
                <ai-editor :value="form.reportText" style="width: 100%" placeholder="请输入报告正文" :readOnly="true" />
              </el-form-item>
              <div class="header-title" style="width: 100%">
                <div class="header-title-left">
@@ -103,12 +57,7 @@
                </div>
              </div>
              <el-form-item prop="name" style="margin-top: -18px">
                <el-upload
                  action="#"
                  :file-list="fileList"
                  disabled
                  :on-preview="handlePreview"
                >
                <el-upload action="#" :file-list="fileList" disabled :on-preview="handlePreview">
                  <!-- <el-button size="small" type="primary" disabled>点击上传</el-button> -->
                </el-upload>
              </el-form-item>
@@ -130,18 +79,10 @@
          <div class="status">
            <div class="status-title">审批结果</div>
            <div class="status-content">
              <div
                class="resolve"
                :class="status == '1' && 'activeStatus'"
                @click.stop="status = 1"
              >
              <div class="resolve" :class="status == '1' && 'activeStatus'" @click.stop="status = 1">
                通过
              </div>
              <div
                class="reject"
                :class="status == '2' && 'activeStatus'"
                @click.stop="status = 2"
              >
              <div class="reject" :class="status == '2' && 'activeStatus'" @click.stop="status = 2">
                驳回
              </div>
            </div>
@@ -150,20 +91,14 @@
        <el-col :span="12">
          <div class="remark">
            <div class="remark-title">审批意见</div>
            <el-input
              type="textarea"
              v-model="remark"
              placeholder="请输入审批意见"
            />
            <el-input type="textarea" v-model="remark" placeholder="请输入审批意见" />
          </div>
        </el-col>
      </el-row>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button @click="handleClose">取 消</el-button>
      <el-button type="primary" @click="handleApprove" v-if="type == 'approve'"
        >确 定</el-button
      >
      <el-button type="primary" @click="handleApprove" v-if="type == 'approve'">确 定</el-button>
    </div>
  </el-dialog>
</template>
@@ -173,6 +108,7 @@
import AiEditor from "@/components/AiEditor";
import { getDetail, audit } from "../../service";
import apiConfig from "@/utils/baseurl";
import { getAllocateIp } from "@/utils/utils";
export default {
  name: "ApprovalDialog",
@@ -238,10 +174,10 @@
    handlePreview(file) {
      console.log("url", file);
      if (file && file.url) {
        if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
        if (file.url && file.url.startsWith(getAllocateIp())) {
          window.open(file.url, "_blank");
        } else {
          let newUrl = apiConfig.showImgUrl + file.url;
          let newUrl = getAllocateIp() + file.url;
          window.open(newUrl, "_blank");
        }
      }
@@ -268,8 +204,8 @@
                  res.status == 2
                    ? "primary"
                    : res.status == 4
                    ? "primary"
                    : "warning",
                      ? "primary"
                      : "warning",
                mode: "list",
                fields: [
                  {
@@ -278,8 +214,8 @@
                      res.status == 2
                        ? "通过"
                        : res.status == 4
                        ? "驳回"
                        : "待审批",
                          ? "驳回"
                          : "待审批",
                  },
                  { label: "审批意见:", value: res.auditRemark || "" },
                  {
laboratory/src/views/chemistQa/productApproval/add.vue
@@ -77,7 +77,7 @@
import AiEditor from "@/components/AiEditor";
import chooseProject from "@/components/chooseProject";
import { addData, getDetail, editData } from "./service";
import { customUploadRequest, getFullUrl } from "@/utils/utils";
import { customUploadRequest, getFullUrl, getAllocateIp } from "@/utils/utils";
import { mapState } from "vuex";
import apiConfig from '@/utils/baseurl';
@@ -138,10 +138,10 @@
    handlePreview(file) {
      console.log('url', file)
      if (file && file.url) {
        if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
        if (file.url && file.url.startsWith(getAllocateIp())) {
          window.open(file.url, '_blank');
        } else {
          let newUrl = apiConfig.showImgUrl + file.url;
          let newUrl = getAllocateIp() + file.url;
          window.open(newUrl, '_blank');
        }
      }
laboratory/src/views/chemistQa/productApproval/components/approval/index.vue
@@ -62,10 +62,7 @@
                                </div>
                            </div>
                            <el-form-item prop="name" style="margin-top: 18px">
                                <el-upload action="#"
                                :file-list="fileList"
                                :on-preview="handlePreview"
                                disabled>
                                <el-upload action="#" :file-list="fileList" :on-preview="handlePreview" disabled>
                                    <!-- <el-button size="small" type="primary" disabled>点击上传</el-button> -->
                                </el-upload>
                            </el-form-item>
@@ -115,6 +112,7 @@
import AiEditor from '@/components/AiEditor'
import { getDetail, audit } from '../../service'
import apiConfig from '@/utils/baseurl';
import { getAllocateIp } from '@/utils/utils'
export default {
    name: "ApprovalDialog",
@@ -151,7 +149,7 @@
                teamId: "",
                qaReportFiles: [],
                commitPersonId: null,
                processData:[]
                processData: []
            },
            tableData: [],
            fileList: [], // 附件列表
@@ -180,10 +178,10 @@
        handlePreview(file) {
            console.log('url', file)
            if (file && file.url) {
                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
                if (file.url && file.url.startsWith(getAllocateIp())) {
                    window.open(file.url, '_blank');
                }else{
                    let newUrl=apiConfig.showImgUrl+file.url;
                } else {
                    let newUrl = getAllocateIp() + file.url;
                    window.open(newUrl, '_blank');
                }
            }
@@ -223,7 +221,7 @@
                                                : "待审批",
                                },
                                { label: "审批意见:", value: res.auditRemark || "" },
                                { label: "审核人:", value: res.auditPersonName || res.auditPersonId||"" },
                                { label: "审核人:", value: res.auditPersonName || res.auditPersonId || "" },
                                { label: "审核时间:", value: res.auditTime || "" },
                            ],
                        });
@@ -237,7 +235,7 @@
                        });
                    }
                    this.tableData = [{ ...res.projectTeamVO,staffName:res.projectTeamVO.staffs.map(item=>item.nickName).join(',')}]
                    this.tableData = [{ ...res.projectTeamVO, staffName: res.projectTeamVO.staffs.map(item => item.nickName).join(',') }]
                    this.fileList = res.qaReportFileList.map(item => {
                        return {
                            ...item,
@@ -294,7 +292,7 @@
.approval-dialog {
    display: flex;
    min-height: 60vh;
  max-height: 80vh;
    max-height: 80vh;
    .approval-content {
        flex: 1;
laboratory/src/views/chemistQa/projectTesting/components/approval/index.vue
@@ -1,6 +1,6 @@
<template>
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open" :close-on-click-modal="false"
        @close="handleClose">
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open"
        :close-on-click-modal="false" @close="handleClose">
        <div class="approval-dialog">
            <!-- 左侧审批内容 -->
            <div class="approval-content">
@@ -55,11 +55,8 @@
                                </div>
                            </div>
                            <el-form-item prop="name" style="margin-top: 18px">
                                <el-upload
                                 action="https://jsonplaceholder.typicode.com/posts/"
                                 :file-list="fileList"
                                 :on-preview="handlePreview"
                                 >
                                <el-upload action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList"
                                    :on-preview="handlePreview">
                                    <!-- <el-button size="small" type="primary">点击上传</el-button> -->
                                </el-upload>
                            </el-form-item>
@@ -112,7 +109,7 @@
import ApprovalProcess from '@/components/approvalProcess'
import AiEditor from '@/components/AiEditor'
import { getDetailInfo, getDetail, detailAuditReport } from '../../service'
import {getFullUrl} from '@/utils/utils'
import { getFullUrl, getAllocateIp } from '@/utils/utils'
import apiConfig from '@/utils/baseurl';
export default {
@@ -178,17 +175,17 @@
        handlePreview(file) {
            console.log('url', file)
            if (file && file.url) {
                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
                if (file.url && file.url.startsWith(getAllocateIp())) {
                    window.open(file.url, '_blank');
                }else{
                    let newUrl=apiConfig.showImgUrl+file.url;
                } else {
                    let newUrl = getAllocateIp() + file.url;
                    window.open(newUrl, '_blank');
                }
            }
        },
        open(){
            this.status=1;
            this.remark=''
        open() {
            this.status = 1;
            this.remark = ''
        },
        getDetailInfo() {
            getDetailInfo({ id: this.data.id }).then(res => {
@@ -312,6 +309,7 @@
    // height: 40vh;
    min-height: 60vh;
    max-height: 80vh;
    .approval-content {
        flex: 1;
        margin-right: 20px;
laboratory/src/views/chemistQa/rawMaterials/components/approval/index.vue
@@ -1,12 +1,6 @@
<template>
  <el-dialog
    :title="dialogTitle"
    :visible.sync="dialogVisible"
    width="90%"
    top="5vh"
    :close-on-click-modal="false"
    @close="handleClose"
  >
  <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="90%" top="5vh" :close-on-click-modal="false"
    @close="handleClose">
    <div class="approval-dialog">
      <!-- 左侧审批内容 -->
      <div class="approval-content">
@@ -27,58 +21,23 @@
              </template>
            </Table>
            <el-form
              ref="form"
              :model="form"
              :rules="rules"
              inline
              label-position="top"
              style="margin-top: 18px"
            >
            <el-form ref="form" :model="form" :rules="rules" inline label-position="top" style="margin-top: 18px">
              <el-row :gutter="20">
                <el-col :span="24">
                  <el-form-item prop="reportTitle" label="报告标题">
                    <el-input
                      v-model="form.reportTitle"
                      style="width: 100%"
                      placeholder="请输入报告标题"
                      disabled
                    />
                    <el-input v-model="form.reportTitle" style="width: 100%" placeholder="请输入报告标题" disabled />
                  </el-form-item>
                  <el-form-item
                    prop="reportCode"
                    label="报告编号"
                    style="margin-left: 100px"
                  >
                    <el-input
                      v-model="form.reportCode"
                      style="width: 100%"
                      placeholder="请输入报告编号"
                      disabled
                    />
                  <el-form-item prop="reportCode" label="报告编号" style="margin-left: 100px">
                    <el-input v-model="form.reportCode" style="width: 100%" placeholder="请输入报告编号" disabled />
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item prop="developPerson" label="制定人">
                    <el-input
                      v-model="form.developPerson"
                      style="width: 100%"
                      placeholder="请输入制定人"
                      disabled
                    />
                    <el-input v-model="form.developPerson" style="width: 100%" placeholder="请输入制定人" disabled />
                  </el-form-item>
                  <el-form-item
                    prop="developDate"
                    label="制定日期"
                    style="margin-left: 100px"
                  >
                    <el-date-picker
                      :prefix-icon="null"
                      v-model="form.developDate"
                      type="date"
                      disabled
                      placeholder="请选择日期"
                    />
                  <el-form-item prop="developDate" label="制定日期" style="margin-left: 100px">
                    <el-date-picker :prefix-icon="null" v-model="form.developDate" type="date" disabled
                      placeholder="请选择日期" />
                  </el-form-item>
                </el-col>
              </el-row>
@@ -89,12 +48,7 @@
                </div>
              </div>
              <el-form-item prop="reportText" style="margin-top: 18px">
                <ai-editor
                  :value="form.reportText"
                  style="width: 100%"
                  placeholder="请输入报告正文"
                  :readOnly="true"
                />
                <ai-editor :value="form.reportText" style="width: 100%" placeholder="请输入报告正文" :readOnly="true" />
              </el-form-item>
              <div class="header-title" style="width: 100%">
                <div class="header-title-left">
@@ -103,9 +57,7 @@
                </div>
              </div>
              <el-form-item prop="name" style="margin-top: 18px">
                <el-upload action="#" :file-list="fileList"
                :on-preview="handlePreview"
                disabled>
                <el-upload action="#" :file-list="fileList" :on-preview="handlePreview" disabled>
                  <!-- <el-button size="small" type="primary" disabled
                    >点击上传</el-button
                  > -->
@@ -128,18 +80,10 @@
          <div class="status">
            <div class="status-title">审批结果</div>
            <div class="status-content">
              <div
                class="resolve"
                :class="status == '1' && 'activeStatus'"
                @click.stop="status = 1"
              >
              <div class="resolve" :class="status == '1' && 'activeStatus'" @click.stop="status = 1">
                通过
              </div>
              <div
                class="reject"
                :class="status == '2' && 'activeStatus'"
                @click.stop="status = 2"
              >
              <div class="reject" :class="status == '2' && 'activeStatus'" @click.stop="status = 2">
                驳回
              </div>
            </div>
@@ -148,20 +92,14 @@
        <el-col :span="12">
          <div class="remark">
            <div class="remark-title">审批意见</div>
            <el-input
              type="textarea"
              v-model="remark"
              placeholder="请输入审批意见"
            />
            <el-input type="textarea" v-model="remark" placeholder="请输入审批意见" />
          </div>
        </el-col>
      </el-row>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button @click="handleClose">取 消</el-button>
      <el-button type="primary" @click="handleApprove" v-if="type == 'approve'"
        >确 定</el-button
      >
      <el-button type="primary" @click="handleApprove" v-if="type == 'approve'">确 定</el-button>
    </div>
  </el-dialog>
</template>
@@ -171,6 +109,7 @@
import AiEditor from "@/components/AiEditor";
import { getDetail, audit } from "../../service";
import apiConfig from '@/utils/baseurl';
import { getAllocateIp } from '@/utils/utils'
export default {
  name: "ApprovalDialog",
@@ -234,16 +173,16 @@
  },
  methods: {
    handlePreview(file) {
            console.log('url', file)
            if (file && file.url) {
                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
                    window.open(file.url, '_blank');
                }else{
                    let newUrl=apiConfig.showImgUrl+file.url;
                    window.open(newUrl, '_blank');
                }
            }
        },
      console.log('url', file)
      if (file && file.url) {
        if (file.url && file.url.startsWith(getAllocateIp())) {
          window.open(file.url, '_blank');
        } else {
          let newUrl = getAllocateIp() + file.url;
          window.open(newUrl, '_blank');
        }
      }
    },
    getDetail() {
      getDetail(this.data.id)
        .then((res) => {
@@ -266,8 +205,8 @@
                  res.status == 2
                    ? "primary"
                    : res.status == 4
                    ? "primary"
                    : "warning",
                      ? "primary"
                      : "warning",
                mode: "list",
                fields: [
                  {
@@ -276,8 +215,8 @@
                      res.status == 2
                        ? "通过"
                        : res.status == 4
                        ? "驳回"
                        : "待审批",
                          ? "驳回"
                          : "待审批",
                  },
                  { label: "审批意见:", value: res.auditRemark || "" },
                  {
@@ -365,7 +304,7 @@
}
.approval-dialog {
  display: flex;
  display: flex;
  min-height: 60vh;
  max-height: 80vh;
laboratory/src/views/deliveryAssessment/testingAndEvaluation/components/approval/index.vue
@@ -55,9 +55,8 @@
                                </div>
                            </div>
                            <el-form-item prop="name" style="margin-top: 18px">
                                <el-upload
                                :on-preview="handlePreview"
                                action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList">
                                <el-upload :on-preview="handlePreview"
                                    action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList">
                                    <!-- <el-button size="small" type="primary">点击上传</el-button> -->
                                </el-upload>
                            </el-form-item>
@@ -111,6 +110,7 @@
import AiEditor from '@/components/AiEditor'
import { getDetailInfo, getDetail, detailAuditReport } from '../../service'
import apiConfig from '@/utils/baseurl';
import { getAllocateIp } from '@/utils/utils'
export default {
    name: "ApprovalDialog",
    components: {
@@ -173,10 +173,10 @@
        handlePreview(file) {
            console.log('url', file)
            if (file && file.url) {
                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
                if (file.url && file.url.startsWith(getAllocateIp())) {
                    window.open(file.url, '_blank');
                }else{
                    let newUrl=apiConfig.showImgUrl+file.url;
                } else {
                    let newUrl = getAllocateIp() + file.url;
                    window.open(newUrl, '_blank');
                }
            }
laboratory/src/views/reportLibrary/feasibilityReport/components/approval/index.vue
@@ -1,17 +1,7 @@
<template>
  <el-dialog
    :title="dialogTitle"
    :visible.sync="visible"
    width="90%"
    @open="open"
    top="5vh"
    :close-on-click-modal="false"
    @close="handleClose"
  >
    <div
      class="approval-dialog"
      :style="{ height: obj.isDetail ? '80vh' : '60vh' }"
    >
  <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" @open="open" top="5vh"
    :close-on-click-modal="false" @close="handleClose">
    <div class="approval-dialog" :style="{ height: obj.isDetail ? '80vh' : '60vh' }">
      <!-- 左侧审批内容 -->
      <div class="approval-content">
        <Card class="approval-content-card">
@@ -31,14 +21,7 @@
              </template>
            </Table>
            <el-form
              ref="form"
              :model="form"
              :rules="rules"
              inline
              label-position="top"
              style="margin-top: 38px"
            >
            <el-form ref="form" :model="form" :rules="rules" inline label-position="top" style="margin-top: 38px">
              <div class="header-title" style="width: 100%">
                <div class="header-title-left">
                  <img src="@/assets/public/headercard.png" />
@@ -46,12 +29,7 @@
                </div>
              </div>
              <el-form-item prop="reportCode" style="margin-top: 38px">
                <el-input
                  disabled
                  v-model="form.reportCode"
                  style="width: 100%"
                  placeholder="请输入报告编号"
                />
                <el-input disabled v-model="form.reportCode" style="width: 100%" placeholder="请输入报告编号" />
              </el-form-item>
              <div class="header-title" style="width: 100%">
@@ -61,12 +39,7 @@
                </div>
              </div>
              <el-form-item prop="reportName" style="margin-top: 38px">
                <el-input
                  disabled
                  v-model="form.reportName"
                  style="width: 100%"
                  placeholder="请输入报告名称"
                />
                <el-input disabled v-model="form.reportName" style="width: 100%" placeholder="请输入报告名称" />
              </el-form-item>
              <div class="header-title" style="width: 100%">
@@ -76,12 +49,7 @@
                </div>
              </div>
              <el-form-item prop="reportText" style="margin-top: 38px">
                <ai-editor
                  :readOnly="true"
                  :value="form.reportText"
                  style="width: 100%"
                  placeholder="请输入报告正文"
                />
                <ai-editor :readOnly="true" :value="form.reportText" style="width: 100%" placeholder="请输入报告正文" />
              </el-form-item>
              <div class="header-title" style="width: 100%">
                <div class="header-title-left">
@@ -111,18 +79,10 @@
          <div class="status">
            <div class="status-title">审批结果</div>
            <div class="status-content">
              <div
                class="resolve"
                :class="status == '2' && 'activeStatus'"
                @click.stop="status = 2"
              >
              <div class="resolve" :class="status == '2' && 'activeStatus'" @click.stop="status = 2">
                通过
              </div>
              <div
                class="reject"
                :class="status == '4' && 'activeStatus'"
                @click.stop="status = 4"
              >
              <div class="reject" :class="status == '4' && 'activeStatus'" @click.stop="status = 4">
                驳回
              </div>
            </div>
@@ -131,11 +91,7 @@
        <el-col :span="12">
          <div class="remark">
            <div class="remark-title">审批意见</div>
            <el-input
              type="textarea"
              v-model="remark"
              placeholder="请输入审批意见"
            />
            <el-input type="textarea" v-model="remark" placeholder="请输入审批意见" />
          </div>
        </el-col>
      </el-row>
@@ -144,9 +100,7 @@
      <el-button @click="handleClose">{{
        obj.isDetail ? "关闭" : "取 消"
      }}</el-button>
      <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail"
        >确认</el-button
      >
      <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确认</el-button>
    </div>
  </el-dialog>
</template>
@@ -157,6 +111,7 @@
import { getDetail } from "../../service";
import { customUploadRequest, getFullUrl } from "@/utils/utils";
import apiConfig from '@/utils/baseurl';
import { getAllocateIp } from '@/utils/utils'
export default {
  name: "ApprovalDialog",
@@ -175,7 +130,7 @@
    },
    obj: {
      type: Object,
      default: () => {},
      default: () => { },
    },
  },
  data() {
@@ -213,16 +168,16 @@
  methods: {
    getFullUrl,
    handlePreview(file) {
            console.log('url', file)
            if (file && file.url) {
                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
                    window.open(file.url, '_blank');
                }else{
                    let newUrl=apiConfig.showImgUrl+file.url;
                    window.open(newUrl, '_blank');
                }
            }
        },
      console.log('url', file)
      if (file && file.url) {
        if (file.url && file.url.startsWith(getAllocateIp())) {
          window.open(file.url, '_blank');
        } else {
          let newUrl = getAllocateIp() + file.url;
          window.open(newUrl, '_blank');
        }
      }
    },
    open() {
      if (!this.obj.id) {
        this.$message.error("缺少必要参数");
@@ -249,7 +204,7 @@
                  uid: file.id,
                };
              });
            this.form.feasibilityReportFiles =data.feasibilityReportFiles;
            this.form.feasibilityReportFiles = data.feasibilityReportFiles;
          } else {
            this.fileList = [];
            this.form.feasibilityReportFiles = [];
laboratory/src/views/reportLibrary/feasibilityStudy/components/approval/index.vue
@@ -1,6 +1,6 @@
<template>
  <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open"  :close-on-click-modal="false"
    @close="handleClose">
  <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open"
    :close-on-click-modal="false" @close="handleClose">
    <div class="approval-dialog" :style="{ height: obj.isDetail ? '80vh' : '60vh' }">
      <!-- 左侧审批内容 -->
      <div class="approval-content">
@@ -109,7 +109,7 @@
import ApprovalProcess from "@/components/approvalProcess";
import AiEditor from "@/components/AiEditor";
import { getDetail } from "../../service";
import { customUploadRequest, getFullUrl } from "@/utils/utils";
import { customUploadRequest, getFullUrl, getAllocateIp } from "@/utils/utils";
import apiConfig from '@/utils/baseurl';
export default {
@@ -169,10 +169,10 @@
    handlePreview(file) {
      console.log('url', file)
      if (file && file.url) {
        if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
        if (file.url && file.url.startsWith(getAllocateIp())) {
          window.open(file.url, '_blank');
        } else {
          let newUrl = apiConfig.showImgUrl + file.url;
          let newUrl = getAllocateIp() + file.url;
          window.open(newUrl, '_blank');
        }
      }
laboratory/src/views/reportLibrary/processDevelopment/components/approval/index.vue
@@ -1,7 +1,7 @@
<template>
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" @open="open" top="5vh" :close-on-click-modal="false"
        @close="handleClose">
        <div class="approval-dialog" :style="{height: obj.isDetail ? '80vh' : '60vh'}">
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" @open="open" top="5vh"
        :close-on-click-modal="false" @close="handleClose">
        <div class="approval-dialog" :style="{ height: obj.isDetail ? '80vh' : '60vh' }">
            <!-- 左侧审批内容 -->
            <div class="approval-content">
                <Card class="approval-content-card">
@@ -57,15 +57,15 @@
                                    placeholder="请输入报告正文" />
                            </el-form-item>
                            <div class="header-title" style="width: 100%">
                <div class="header-title-left">
                  <img src="@/assets/public/headercard.png" />
                  <div>附件</div>
                </div>
              </div>
              <el-form-item prop="name" style="margin-top: -18px">
                <el-upload action="#" :on-preview="handlePreview":file-list="fileList" disabled>
                </el-upload>
              </el-form-item>
                                <div class="header-title-left">
                                    <img src="@/assets/public/headercard.png" />
                                    <div>附件</div>
                                </div>
                            </div>
                            <el-form-item prop="name" style="margin-top: -18px">
                                <el-upload action="#" :on-preview="handlePreview" :file-list="fileList" disabled>
                                </el-upload>
                            </el-form-item>
                        </el-form>
                    </template>
@@ -105,7 +105,7 @@
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button>
            <el-button @click="handleClose">{{ obj.isDetail ? '关闭' : '取 消' }}</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确定</el-button>
        </div>
    </el-dialog>
@@ -115,7 +115,7 @@
import ApprovalProcess from '@/components/approvalProcess'
import AiEditor from '@/components/AiEditor'
import { getDetail } from '../../service';
import { customUploadRequest, getFullUrl } from "@/utils/utils";
import { customUploadRequest, getFullUrl, getAllocateIp } from "@/utils/utils";
import apiConfig from '@/utils/baseurl';
@@ -176,10 +176,10 @@
        handlePreview(file) {
            console.log('url', file)
            if (file && file.url) {
                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
                if (file.url && file.url.startsWith(getAllocateIp())) {
                    window.open(file.url, '_blank');
                }else{
                    let newUrl=apiConfig.showImgUrl+file.url;
                } else {
                    let newUrl = getAllocateIp() + file.url;
                    window.open(newUrl, '_blank');
                }
            }
@@ -198,22 +198,22 @@
                    processData: []
                };
                if (
            data.feasibilityReportFiles &&
            data.feasibilityReportFiles.length > 0
          ) {
            this.fileList =
              data.feasibilityReportFiles.map((file) => {
                return {
                  name: file.fileName,
                  url: getFullUrl(file.fileUrl),
                  uid: file.id,
                };
              });
            this.form.feasibilityReportFiles =data.feasibilityReportFiles;
          } else {
            this.fileList = [];
            this.form.feasibilityReportFiles = [];
          }
                    data.feasibilityReportFiles &&
                    data.feasibilityReportFiles.length > 0
                ) {
                    this.fileList =
                        data.feasibilityReportFiles.map((file) => {
                            return {
                                name: file.fileName,
                                url: getFullUrl(file.fileUrl),
                                uid: file.id,
                            };
                        });
                    this.form.feasibilityReportFiles = data.feasibilityReportFiles;
                } else {
                    this.fileList = [];
                    this.form.feasibilityReportFiles = [];
                }
                this.tableData = data.projectTeam ?
                    [{ ...data.projectTeam, staffName: data.staffNames || '' }] :
@@ -235,7 +235,7 @@
                        type: "primary",
                        mode: "list",
                        fields: [
                        { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" },
                            { label: "审核结果:", value: data.status == 4 ? '驳回' : "通过" || "" },
                            { label: "审批意见:", value: data.auditRemark || "" },
                            { label: "审核人:", value: data.auditPersonName || "" },
                            { label: "审核时间:", value: data.auditTime || "" },
laboratory/src/views/reportLibrary/projectProposalLibrary/components/approval/index.vue
@@ -1,7 +1,7 @@
<template>
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open" po :close-on-click-modal="false"
        @close="handleClose">
        <div class="approval-dialog" :style="{height: obj.isDetail ? '80vh' : '60vh'}">
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open" po
        :close-on-click-modal="false" @close="handleClose">
        <div class="approval-dialog" :style="{ height: obj.isDetail ? '80vh' : '60vh' }">
            <!-- 左侧审批内容 -->
            <div class="approval-content">
                <Card class="approval-content-card">
@@ -58,15 +58,15 @@
                            </el-form-item>
                            <div class="header-title" style="width: 100%">
                <div class="header-title-left">
                  <img src="@/assets/public/headercard.png" />
                  <div>附件</div>
                </div>
              </div>
              <el-form-item prop="name" style="margin-top: -18px">
                <el-upload action="#" :file-list="fileList" :on-preview="handlePreview" disabled>
                </el-upload>
              </el-form-item>
                                <div class="header-title-left">
                                    <img src="@/assets/public/headercard.png" />
                                    <div>附件</div>
                                </div>
                            </div>
                            <el-form-item prop="name" style="margin-top: -18px">
                                <el-upload action="#" :file-list="fileList" :on-preview="handlePreview" disabled>
                                </el-upload>
                            </el-form-item>
                        </el-form>
                    </template>
@@ -106,7 +106,7 @@
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="handleClose">{{obj.isDetail ? '关闭' : '取 消'}}</el-button>
            <el-button @click="handleClose">{{ obj.isDetail ? '关闭' : '取 消' }}</el-button>
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">确定</el-button>
        </div>
    </el-dialog>
@@ -116,7 +116,7 @@
import ApprovalProcess from '@/components/approvalProcess'
import AiEditor from '@/components/AiEditor'
import { getDetail } from '../../service';
import { customUploadRequest, getFullUrl } from "@/utils/utils";
import { customUploadRequest, getFullUrl, getAllocateIp } from "@/utils/utils";
import apiConfig from '@/utils/baseurl';
@@ -177,10 +177,10 @@
        handlePreview(file) {
            console.log('url', file)
            if (file && file.url) {
                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
                if (file.url && file.url.startsWith(getAllocateIp())) {
                    window.open(file.url, '_blank');
                }else{
                    let newUrl=apiConfig.showImgUrl+file.url;
                } else {
                    let newUrl = getAllocateIp() + file.url;
                    window.open(newUrl, '_blank');
                }
            }
@@ -199,22 +199,22 @@
                    processData: []
                };
                if (
            data.feasibilityReportFiles &&
            data.feasibilityReportFiles.length > 0
          ) {
            this.fileList =
              data.feasibilityReportFiles.map((file) => {
                return {
                  name: file.fileName,
                  url: getFullUrl(file.fileUrl),
                  uid: file.id,
                };
              });
            this.form.feasibilityReportFiles =data.feasibilityReportFiles;
          } else {
            this.fileList = [];
            this.form.feasibilityReportFiles = [];
          }
                    data.feasibilityReportFiles &&
                    data.feasibilityReportFiles.length > 0
                ) {
                    this.fileList =
                        data.feasibilityReportFiles.map((file) => {
                            return {
                                name: file.fileName,
                                url: getFullUrl(file.fileUrl),
                                uid: file.id,
                            };
                        });
                    this.form.feasibilityReportFiles = data.feasibilityReportFiles;
                } else {
                    this.fileList = [];
                    this.form.feasibilityReportFiles = [];
                }
                this.tableData = data.projectTeam ?
                    [{ ...data.projectTeam, staffName: data.staffNames || '' }] :
@@ -289,7 +289,7 @@
.approval-dialog {
    display: flex;
    min-height: 60vh;
  max-height: 80vh;
    max-height: 80vh;
    .approval-content {
        flex: 1;
laboratory/src/views/reportLibrary/verificationRelease/components/approval/index.vue
@@ -1,6 +1,6 @@
<template>
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open" po :close-on-click-modal="false"
        @close="handleClose">
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="90%" top="5vh" @open="open" po
        :close-on-click-modal="false" @close="handleClose">
        <div class="approval-dialog" :style="{ height: obj.isDetail ? '80vh' : '60vh' }">
            <!-- 左侧审批内容 -->
            <div class="approval-content">
@@ -63,11 +63,7 @@
                                </div>
                            </div>
                            <el-form-item prop="feasibilityReportFiles" style="margin-top: -18px">
                                <el-upload
                                disabled
                                :on-preview="handlePreview"
                                    :file-list="fileList"
                                />
                                <el-upload disabled :on-preview="handlePreview" :file-list="fileList" />
                            </el-form-item>
                        </el-form>
@@ -118,7 +114,7 @@
import ApprovalProcess from '@/components/approvalProcess'
import AiEditor from '@/components/AiEditor'
import { getDetail } from '../../service';
import { customUploadRequest, getFullUrl } from "@/utils/utils";
import { customUploadRequest, getFullUrl, getAllocateIp } from "@/utils/utils";
import apiConfig from '@/utils/baseurl';
@@ -159,10 +155,10 @@
                updateBy: "",
                auditRemark: "",
                auditPersonName: "",
                feasibilityReportFiles:[],
                feasibilityReportFiles: [],
                auditTime: ""
            },
            fileList:[],
            fileList: [],
            tableData: [],
            rules: {},
            status: "2",
@@ -179,10 +175,10 @@
        handlePreview(file) {
            console.log('url', file)
            if (file && file.url) {
                if (file.url && file.url.startsWith(apiConfig.showImgUrl)) {
                if (file.url && file.url.startsWith(getAllocateIp())) {
                    window.open(file.url, '_blank');
                }else{
                    let newUrl=apiConfig.showImgUrl+file.url;
                } else {
                    let newUrl = getAllocateIp() + file.url;
                    window.open(newUrl, '_blank');
                }
            }
@@ -205,22 +201,22 @@
                    processData: []
                };
                if (
            data.feasibilityReportFiles &&
            data.feasibilityReportFiles.length > 0
          ) {
            this.fileList =
              data.feasibilityReportFiles.map((file) => {
                return {
                  name: file.fileName,
                  url: getFullUrl(file.fileUrl),
                  uid: file.id,
                };
              });
            this.form.feasibilityReportFiles =data.feasibilityReportFiles
          } else {
            this.fileList = [];
            this.form.feasibilityReportFiles = [];
          }
                    data.feasibilityReportFiles &&
                    data.feasibilityReportFiles.length > 0
                ) {
                    this.fileList =
                        data.feasibilityReportFiles.map((file) => {
                            return {
                                name: file.fileName,
                                url: getFullUrl(file.fileUrl),
                                uid: file.id,
                            };
                        });
                    this.form.feasibilityReportFiles = data.feasibilityReportFiles
                } else {
                    this.fileList = [];
                    this.form.feasibilityReportFiles = [];
                }
                this.tableData = data.projectTeam ?
                    [{ ...data.projectTeam, staffName: data.staffNames || '' }] :
@@ -237,7 +233,7 @@
                    ]
                });
                if (data.status == 2 || data.status == 4|| data.status==3) {
                if (data.status == 2 || data.status == 4 || data.status == 3) {
                    processData.push({
                        type: "primary",
                        mode: "list",
laboratory/src/views/system/user/components/add-edit.vue
@@ -23,6 +23,9 @@
        <el-form-item label="启动状态" prop="status">
          <el-switch v-model="form.status"></el-switch>
        </el-form-item>
        <el-form-item label="IP地址" prop="allocateIp">
          <el-input v-model="form.allocateIp" placeholder="请输入" style="width: 50%"></el-input>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input type="textarea" v-model="form.remark" placeholder="请输入" style="width: 50%"></el-input>
        </el-form-item>
@@ -64,7 +67,7 @@
        callback();
        return;
      }
      const phoneRegex = new RegExp(/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,'g'); // Regex for 11-digit Chinese mobile numbers
      const phoneRegex = new RegExp(/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, 'g'); // Regex for 11-digit Chinese mobile numbers
      if (!phoneRegex.test(value)) {
        callback(new Error('请输入有效的11位手机号码'));
      } else {
@@ -83,6 +86,7 @@
        roleId: [{ required: true, message: '请选择角色', trigger: 'change' }],
        userName: [{ required: true, message: '请输入登陆账号', trigger: 'blur' }],
        status: [{ required: true, message: '请选择启动状态', trigger: 'blur' }],
        allocateIp: [{ required: true, message: '请输入IP地址', trigger: 'blur' }],
      },
    }
  },
laboratory/vue.config.js
@@ -1,53 +1,54 @@
const path = require('path')
const path = require("path");
function resolve(dir) {
    return path.join(__dirname, dir)
  return path.join(__dirname, dir);
}
module.exports = {
    outputDir: 'laboratory', // 配置打包后的文件夹名称
    lintOnSave: false,
    publicPath: '/',
    devServer: {
        disableHostCheck: true, //禁用主机检查
        proxy: {
            "/": { // 设置以什么前缀开头的请求用来代理
                target: "http://221.182.45.100:11222", //要访问的跨域的域名
                secure: false, // 使用的是http协议则设置为false,https协议则设置为true
                changeOrigin: true, //开启代理
                pathRewrite: {
                    "^/": "/",
                },
            },
            "/": { // 设置以什么前缀开头的请求用来代理
                target: "http://221.182.45.100:11221", //要访问的跨域的域名
                secure: false, // 使用的是http协议则设置为false,https协议则设置为true
                changeOrigin: true, //开启代理
                pathRewrite: {
                    "^/": "/",
                },
            },
  outputDir: "laboratory", // 配置打包后的文件夹名称
  lintOnSave: false,
  publicPath: "/",
  devServer: {
    disableHostCheck: true, //禁用主机检查
    proxy: {
      "/": {
        // 设置以什么前缀开头的请求用来代理
        target: "http://192.168.110.34:11223", //要访问的跨域的域名
        secure: false, // 使用的是http协议则设置为false,https协议则设置为true
        changeOrigin: true, //开启代理
        pathRewrite: {
          "^/": "/",
        },
      },
      // "/": { // 设置以什么前缀开头的请求用来代理
      //     target: "http://221.182.45.100:11221", //要访问的跨域的域名
      //     secure: false, // 使用的是http协议则设置为false,https协议则设置为true
      //     changeOrigin: true, //开启代理
      //     pathRewrite: {
      //         "^/": "/",
      //     },
      // },
    },
    configureWebpack: {
        resolve: {
            alias: {
                '@': resolve('src'),
            }
  },
  configureWebpack: {
    resolve: {
      alias: {
        "@": resolve("src"),
      },
    },
    module: {
      rules: [
        {
          test: /\.m?js$/,
          include: /node_modules/,
          type: "javascript/auto",
          use: {
            loader: "babel-loader",
            options: {
              presets: ["@babel/preset-env"],
              plugins: ["@babel/plugin-proposal-nullish-coalescing-operator"],
            },
          },
        },
        module: {
            rules: [
                {
                    test: /\.m?js$/,
                    include: /node_modules/,
                    type: "javascript/auto",
                    use: {
                        loader: 'babel-loader',
                        options: {
                            presets: ['@babel/preset-env'],
                            plugins: ['@babel/plugin-proposal-nullish-coalescing-operator']
                        }
                    }
                }
            ]
        }
    }
};
      ],
    },
  },
};