优化测试环境域名配置问题

This commit is contained in:
BianLzhaoMin 2024-05-29 19:57:35 +08:00
parent 3aec63eef9
commit ffa9ffd534
4 changed files with 382 additions and 466 deletions

View File

@ -5,5 +5,5 @@ VUE_APP_TITLE = 施工装备管理系统
ENV = 'production' ENV = 'production'
# 若依管理系统/生产环境 # 若依管理系统/生产环境
VUE_APP_BASE_API = '/sgzbgl' VUE_APP_BASE_API = '/sgzbgl-api'

View File

@ -1,12 +1,15 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head>
<head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="favicon.ico"> <link rel="icon" href="/favicon.ico">
<title><%= webpackConfig.name %></title> <title>
<%= webpackConfig.name %>
</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style> <style>
html, html,
@ -16,6 +19,7 @@
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
} }
.chromeframe { .chromeframe {
margin: 0.2em 0; margin: 0.2em 0;
background: #ccc; background: #ccc;
@ -92,6 +96,7 @@
-ms-transform: rotate(0deg); -ms-transform: rotate(0deg);
transform: rotate(0deg); transform: rotate(0deg);
} }
100% { 100% {
-webkit-transform: rotate(360deg); -webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg); -ms-transform: rotate(360deg);
@ -105,6 +110,7 @@
-ms-transform: rotate(0deg); -ms-transform: rotate(0deg);
transform: rotate(0deg); transform: rotate(0deg);
} }
100% { 100% {
-webkit-transform: rotate(360deg); -webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg); -ms-transform: rotate(360deg);
@ -194,8 +200,9 @@
opacity: 0.5; opacity: 0.5;
} }
</style> </style>
</head> </head>
<body>
<body>
<div id="app"> <div id="app">
<div id="loader-wrapper"> <div id="loader-wrapper">
<div id="loader"></div> <div id="loader"></div>
@ -204,5 +211,6 @@
<div class="load_title">正在加载系统资源,请耐心等待</div> <div class="load_title">正在加载系统资源,请耐心等待</div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -1,13 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="关键字" prop="keyWord"> <el-form-item label="关键字" prop="keyWord">
<el-input <el-input
v-model="queryParams.keyWord" v-model="queryParams.keyWord"
@ -27,13 +20,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="待办事件" prop="taskTypeId"> <el-form-item label="待办事件" prop="taskTypeId">
<el-select <el-select v-model="queryParams.taskTypeId" placeholder="待办事件" clearable filterable style="width: 240px">
v-model="queryParams.taskTypeId"
placeholder="待办事件"
clearable
filterable
style="width: 240px"
>
<el-option <el-option
v-for="types in taskTypeList" v-for="types in taskTypeList"
:key="types.taskTypeId" :key="types.taskTypeId"
@ -54,19 +41,8 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -126,67 +102,26 @@
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>--> <!-- </el-row>-->
<el-table <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
v-loading="loading"
:data="typeList"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" width="80" type="index"> <el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope"> <template slot-scope="scope">
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span> <span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="任务单号" align="center" prop="taskCode" :show-overflow-tooltip="true" />
label="任务单号" <el-table-column label="待办任务" align="center" prop="taskType" :show-overflow-tooltip="true" />
align="center" <el-table-column label="待办事件" align="center" prop="taskEvent"></el-table-column>
prop="taskCode" <el-table-column label="任务创建人" align="center" prop="createName" :show-overflow-tooltip="true" />
:show-overflow-tooltip="true" <el-table-column label="创建时间" align="center" prop="createTime" width="180">
/>
<el-table-column
label="待办任务"
align="center"
prop="taskType"
:show-overflow-tooltip="true"
/>
<el-table-column label="待办事件" align="center" prop="taskEvent">
</el-table-column>
<el-table-column
label="任务创建人"
align="center"
prop="createName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"> </el-button>
size="mini" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"> </el-button>
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
> </el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
> </el-button
>
<!-- <el-button--> <!-- <el-button-->
<!-- size="mini"--> <!-- size="mini"-->
<!-- type="text"--> <!-- type="text"-->
@ -207,41 +142,23 @@
/> />
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
:title="title"
:visible.sync="open"
width="500px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="dictName"> <el-form-item label="字典名称" prop="dictName">
<el-input <el-input v-model="form.dictName" placeholder="请输入字典名称" />
v-model="form.dictName"
placeholder="请输入字典名称"
/>
</el-form-item> </el-form-item>
<el-form-item label="字典类型" prop="dictType"> <el-form-item label="字典类型" prop="dictType">
<el-input <el-input v-model="form.dictType" placeholder="请输入字典类型" />
v-model="form.dictType"
placeholder="请输入字典类型"
/>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
<el-radio <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">
v-for="dict in dict.type.sys_normal_disable" {{ dict.label }}
:key="dict.value" </el-radio>
:label="dict.value"
>{{ dict.label }}</el-radio
>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
v-model="form.remark"
type="textarea"
placeholder="请输入内容"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -253,16 +170,9 @@
</template> </template>
<script> <script>
import { import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'
listType, import { getToDoList, getTaskTypeList } from '@/api/index'
getType, export default {
delType,
addType,
updateType,
refreshCache,
} from '@/api/system/dict/type'
import { getToDoList, getTaskTypeList } from '@/api/index'
export default {
name: 'Dict', name: 'Dict',
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
data() { data() {
@ -323,7 +233,7 @@
}, },
methods: { methods: {
getTaskTypeList() { getTaskTypeList() {
getTaskTypeList().then((response) => { getTaskTypeList().then(response => {
this.taskTypeList = response.data this.taskTypeList = response.data
}) })
}, },
@ -338,7 +248,7 @@
this.queryParams.startTime = '' this.queryParams.startTime = ''
this.queryParams.endTime = '' this.queryParams.endTime = ''
} }
getToDoList(this.queryParams).then((response) => { getToDoList(this.queryParams).then(response => {
this.typeList = response.rows this.typeList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
@ -379,7 +289,7 @@
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.dictId) this.ids = selection.map(item => item.dictId)
this.single = selection.length != 1 this.single = selection.length != 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -395,16 +305,16 @@
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function () {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
if (this.form.dictId != undefined) { if (this.form.dictId != undefined) {
updateType(this.form).then((response) => { updateType(this.form).then(response => {
this.$modal.msgSuccess('修改成功') this.$modal.msgSuccess('修改成功')
this.open = false this.open = false
this.getList() this.getList()
}) })
} else { } else {
addType(this.form).then((response) => { addType(this.form).then(response => {
this.$modal.msgSuccess('新增成功') this.$modal.msgSuccess('新增成功')
this.open = false this.open = false
this.getList() this.getList()
@ -417,9 +327,7 @@
handleDelete(row) { handleDelete(row) {
const dictIds = row.dictId || this.ids const dictIds = row.dictId || this.ids
this.$modal this.$modal
.confirm( .confirm('是否确认删除所选择的数据项?')
'是否确认删除所选择的数据项?',
)
.then(function () { .then(function () {
return delType(dictIds) return delType(dictIds)
}) })
@ -436,7 +344,7 @@
{ {
...this.queryParams, ...this.queryParams,
}, },
`type_${new Date().getTime()}.xlsx`, `type_${new Date().getTime()}.xlsx`
) )
}, },
/** 刷新缓存按钮操作 */ /** 刷新缓存按钮操作 */
@ -447,5 +355,5 @@
}) })
}, },
}, },
} }
</script> </script>

View File

@ -19,7 +19,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === 'production' ? './' : '/', ///gl/ publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', ///gl/
// 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist // 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist
outputDir: 'dist', outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)