| | |
| | | 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/", |
| | | }, |
| | | }; |
| | | |
| | |
| | | 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; |
| | |
| | | }); |
| | | }; |
| | | |
| | | 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; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @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); |
| | |
| | | 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; |
| | | } |
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | </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"> |
| | |
| | | </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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | import AiEditor from "@/components/AiEditor"; |
| | | import { getDetail, audit } from "../../service"; |
| | | import apiConfig from "@/utils/baseurl"; |
| | | import { getAllocateIp } from "@/utils/utils"; |
| | | |
| | | export default { |
| | | name: "ApprovalDialog", |
| | |
| | | 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"); |
| | | } |
| | | } |
| | |
| | | res.status == 2 |
| | | ? "primary" |
| | | : res.status == 4 |
| | | ? "primary" |
| | | : "warning", |
| | | ? "primary" |
| | | : "warning", |
| | | mode: "list", |
| | | fields: [ |
| | | { |
| | |
| | | res.status == 2 |
| | | ? "通过" |
| | | : res.status == 4 |
| | | ? "驳回" |
| | | : "待审批", |
| | | ? "驳回" |
| | | : "待审批", |
| | | }, |
| | | { label: "审批意见:", value: res.auditRemark || "" }, |
| | | { |
| | |
| | | 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'; |
| | | |
| | |
| | | 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'); |
| | | } |
| | | } |
| | |
| | | </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> |
| | |
| | | import AiEditor from '@/components/AiEditor' |
| | | import { getDetail, audit } from '../../service' |
| | | import apiConfig from '@/utils/baseurl'; |
| | | import { getAllocateIp } from '@/utils/utils' |
| | | |
| | | export default { |
| | | name: "ApprovalDialog", |
| | |
| | | teamId: "", |
| | | qaReportFiles: [], |
| | | commitPersonId: null, |
| | | processData:[] |
| | | processData: [] |
| | | }, |
| | | tableData: [], |
| | | fileList: [], // 附件列表 |
| | |
| | | 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'); |
| | | } |
| | | } |
| | |
| | | : "待审批", |
| | | }, |
| | | { label: "审批意见:", value: res.auditRemark || "" }, |
| | | { label: "审核人:", value: res.auditPersonName || res.auditPersonId||"" }, |
| | | { label: "审核人:", value: res.auditPersonName || res.auditPersonId || "" }, |
| | | { label: "审核时间:", value: res.auditTime || "" }, |
| | | ], |
| | | }); |
| | |
| | | }); |
| | | } |
| | | |
| | | 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, |
| | |
| | | .approval-dialog { |
| | | display: flex; |
| | | min-height: 60vh; |
| | | max-height: 80vh; |
| | | max-height: 80vh; |
| | | |
| | | .approval-content { |
| | | flex: 1; |
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | 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 { |
| | |
| | | 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 => { |
| | |
| | | // height: 40vh; |
| | | min-height: 60vh; |
| | | max-height: 80vh; |
| | | |
| | | .approval-content { |
| | | flex: 1; |
| | | margin-right: 20px; |
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | </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"> |
| | |
| | | </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 |
| | | > --> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | import AiEditor from "@/components/AiEditor"; |
| | | import { getDetail, audit } from "../../service"; |
| | | import apiConfig from '@/utils/baseurl'; |
| | | import { getAllocateIp } from '@/utils/utils' |
| | | |
| | | export default { |
| | | name: "ApprovalDialog", |
| | |
| | | }, |
| | | 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) => { |
| | |
| | | res.status == 2 |
| | | ? "primary" |
| | | : res.status == 4 |
| | | ? "primary" |
| | | : "warning", |
| | | ? "primary" |
| | | : "warning", |
| | | mode: "list", |
| | | fields: [ |
| | | { |
| | |
| | | res.status == 2 |
| | | ? "通过" |
| | | : res.status == 4 |
| | | ? "驳回" |
| | | : "待审批", |
| | | ? "驳回" |
| | | : "待审批", |
| | | }, |
| | | { label: "审批意见:", value: res.auditRemark || "" }, |
| | | { |
| | |
| | | } |
| | | |
| | | .approval-dialog { |
| | | display: flex; |
| | | display: flex; |
| | | min-height: 60vh; |
| | | max-height: 80vh; |
| | | |
| | |
| | | </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> |
| | |
| | | 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: { |
| | |
| | | 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'); |
| | | } |
| | | } |
| | |
| | | <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"> |
| | |
| | | </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" /> |
| | |
| | | </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%"> |
| | |
| | | </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%"> |
| | |
| | | </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"> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | import { getDetail } from "../../service"; |
| | | import { customUploadRequest, getFullUrl } from "@/utils/utils"; |
| | | import apiConfig from '@/utils/baseurl'; |
| | | import { getAllocateIp } from '@/utils/utils' |
| | | |
| | | export default { |
| | | name: "ApprovalDialog", |
| | |
| | | }, |
| | | obj: { |
| | | type: Object, |
| | | default: () => {}, |
| | | default: () => { }, |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | 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("缺少必要参数"); |
| | |
| | | uid: file.id, |
| | | }; |
| | | }); |
| | | this.form.feasibilityReportFiles =data.feasibilityReportFiles; |
| | | this.form.feasibilityReportFiles = data.feasibilityReportFiles; |
| | | } else { |
| | | this.fileList = []; |
| | | this.form.feasibilityReportFiles = []; |
| | |
| | | <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"> |
| | |
| | | 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 { |
| | |
| | | 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'); |
| | | } |
| | | } |
| | |
| | | <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"> |
| | |
| | | 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> |
| | |
| | | |
| | | </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> |
| | |
| | | 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'; |
| | | |
| | | |
| | |
| | | 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'); |
| | | } |
| | | } |
| | |
| | | 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 || '' }] : |
| | |
| | | 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 || "" }, |
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | |
| | | </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> |
| | |
| | | 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'; |
| | | |
| | | |
| | |
| | | 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'); |
| | | } |
| | | } |
| | |
| | | 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 || '' }] : |
| | |
| | | .approval-dialog { |
| | | display: flex; |
| | | min-height: 60vh; |
| | | max-height: 80vh; |
| | | max-height: 80vh; |
| | | |
| | | .approval-content { |
| | | flex: 1; |
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | 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'; |
| | | |
| | | |
| | |
| | | updateBy: "", |
| | | auditRemark: "", |
| | | auditPersonName: "", |
| | | feasibilityReportFiles:[], |
| | | feasibilityReportFiles: [], |
| | | auditTime: "" |
| | | }, |
| | | fileList:[], |
| | | fileList: [], |
| | | tableData: [], |
| | | rules: {}, |
| | | status: "2", |
| | |
| | | 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'); |
| | | } |
| | | } |
| | |
| | | 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 || '' }] : |
| | |
| | | ] |
| | | }); |
| | | |
| | | 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", |
| | |
| | | <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> |
| | |
| | | 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 { |
| | |
| | | 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' }], |
| | | }, |
| | | } |
| | | }, |
| | |
| | | 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'] |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }; |
| | | ], |
| | | }, |
| | | }, |
| | | }; |