部署
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
liukang 2025-02-11 15:50:34 +08:00
parent 4663a8c262
commit 880c43a9ea
10 changed files with 1106 additions and 1063 deletions

View File

@ -9,3 +9,4 @@ VUE_APP_BASE_API = '/dev-api'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
VITE_BASE_PATH = ''

View File

@ -5,4 +5,5 @@ VUE_APP_TITLE = 若依管理系统
ENV = 'production' ENV = 'production'
# 若依管理系统/生产环境 # 若依管理系统/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/weverse-prod-api'
VITE_BASE_PATH = '/weverse/'

View File

@ -9,4 +9,5 @@ NODE_ENV = production
ENV = 'staging' ENV = 'staging'
# 若依管理系统/测试环境 # 若依管理系统/测试环境
VUE_APP_BASE_API = '/stage-api' VUE_APP_BASE_API = '/weverse-stage-api'
VITE_BASE_PATH = '/weverse/'

View File

@ -35,10 +35,11 @@ export function updateApply(data) {
}) })
} }
// 删除申请 export function toConfirm(id) {
export function delApply(id) {
return request({ return request({
url: '/system/apply/' + id, url: '/system/apply/confirm/' + id,
method: 'delete' method: 'post'
}) })
} }

View File

@ -102,7 +102,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.href = '/index'; location.href = process.env.VITE_BASE_PATH;
}) })
}).catch(() => {}); }).catch(() => {});
} }

View File

@ -12,13 +12,13 @@ import store from './store'
import router from './router' import router from './router'
import directive from './directive' // directive import directive from './directive' // directive
import plugins from './plugins' // plugins import plugins from './plugins' // plugins
import { download } from '@/utils/request' import {download} from '@/utils/request'
import './assets/icons' // icon import './assets/icons' // icon
import './permission' // permission control import './permission' // permission control
import { getDicts } from "@/api/system/dict/data"; import {getDicts} from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config"; import {getConfigKey} from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; import {parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree} from "@/utils/ruoyi";
// 分页组件 // 分页组件
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
// 自定义表格工具组件 // 自定义表格工具组件
@ -79,6 +79,7 @@ Vue.use(Element, {
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ new Vue({
base: process.env.VUE_APP_SUB_PATH,
el: '#app', el: '#app',
router, router,
store, store,

View File

@ -87,7 +87,7 @@ service.interceptors.response.use(res => {
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
isRelogin.show = false; isRelogin.show = false;
store.dispatch('LogOut').then(() => { store.dispatch('LogOut').then(() => {
location.href = '/index'; location.href = process.env.VITE_BASE_PATH;
}) })
}).catch(() => { }).catch(() => {
isRelogin.show = false; isRelogin.show = false;

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,17 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="演出" prop="performId">
<el-select v-model="queryParams.performId" placeholder="请选择演出" style="width: 300px" clearable>
<el-option
v-for="dict in allPerform"
:key="dict.id"
:label="dict.name+' '+dict.startTime"
:value="dict.id"
/>
</el-select>
</el-form-item>
<el-form-item label="weverse账号" prop="weverseEmail"> <el-form-item label="weverse账号" prop="weverseEmail">
<el-input <el-input
v-model="queryParams.weverseEmail" v-model="queryParams.weverseEmail"
@ -79,6 +90,14 @@
v-hasPermi="['system:apply:edit']" v-hasPermi="['system:apply:edit']"
>修改 >修改
</el-button> </el-button>
<el-button v-if="scope.row.status==='0'"
size="mini"
type="text"
icon="el-icon-check"
@click="confirm(scope.row)"
v-hasPermi="['system:apply:confirm']"
>确认收款
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -138,13 +157,16 @@
</template> </template>
<script> <script>
import {listApply, getApply, delApply, addApply, updateApply} from "@/api/system/apply"; import {listApply, getApply, addApply, updateApply, toConfirm} from "@/api/system/apply";
import {getAll} from "@/api/system/perform";
export default { export default {
name: "Apply", name: "Apply",
dicts: ['apply_status'], dicts: ['apply_status'],
data() { data() {
return { return {
//
allPerform: [],
// //
loading: true, loading: true,
// //
@ -200,12 +222,20 @@ export default {
wechatNum: [ wechatNum: [
{required: true, message: "微信号不能为空", trigger: "blur"} {required: true, message: "微信号不能为空", trigger: "blur"}
], ],
status: [
{ required: true, message: "状态不能为空", trigger: "change" }
],
} }
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
mounted() {
getAll().then(response => {
this.allPerform = response.data;
});
},
methods: { methods: {
/** 查询申请列表 */ /** 查询申请列表 */
getList() { getList() {
@ -267,6 +297,14 @@ export default {
this.title = "修改申请"; this.title = "修改申请";
}); });
}, },
/**
* 确认收款
*/
async confirm(row) {
await toConfirm(row.id);
this.$modal.msgSuccess("确认成功");
this.getList();
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

View File

@ -18,7 +18,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" ? "/" : "/", publicPath: process.env.VITE_BASE_PATH,
// 在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) 的;(项目打包之后,静态资源会放在这个文件夹下)
@ -48,7 +48,7 @@ module.exports = {
css: { css: {
loaderOptions: { loaderOptions: {
sass: { sass: {
sassOptions: { outputStyle: "expanded" } sassOptions: {outputStyle: "expanded"}
} }
} }
}, },
@ -93,39 +93,39 @@ module.exports = {
.end() .end()
config.when(process.env.NODE_ENV !== 'development', config => { config.when(process.env.NODE_ENV !== 'development', config => {
config config
.plugin('ScriptExtHtmlWebpackPlugin') .plugin('ScriptExtHtmlWebpackPlugin')
.after('html') .after('html')
.use('script-ext-html-webpack-plugin', [{ .use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime` // `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/ inline: /runtime\..*\.js$/
}]) }])
.end() .end()
config.optimization.splitChunks({ config.optimization.splitChunks({
chunks: 'all', chunks: 'all',
cacheGroups: { cacheGroups: {
libs: { libs: {
name: 'chunk-libs', name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
priority: 10, priority: 10,
chunks: 'initial' // only package third parties that are initially dependent chunks: 'initial' // only package third parties that are initially dependent
}, },
elementUI: { elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package name: 'chunk-elementUI', // split elementUI into a single package
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
}, },
commons: { commons: {
name: 'chunk-commons', name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number minChunks: 3, // minimum common number
priority: 5, priority: 5,
reuseExistingChunk: true reuseExistingChunk: true
} }
} }
}) })
config.optimization.runtimeChunk('single') config.optimization.runtimeChunk('single')
}) })
} }
} }