fix: 系统配置,图标等
This commit is contained in:
@@ -6,7 +6,7 @@ export default {
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "/auth/company",
|
redirect: "/auth/company",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "ep:apple",
|
icon: "ep:lollipop",
|
||||||
title: "auth管理",
|
title: "auth管理",
|
||||||
rank: 1
|
rank: 1
|
||||||
},
|
},
|
||||||
@@ -16,6 +16,7 @@ export default {
|
|||||||
name: "backendUser",
|
name: "backendUser",
|
||||||
component: () => import("@/views/auth/backendUser/index.vue"),
|
component: () => import("@/views/auth/backendUser/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
|
icon: "ri:admin-fill",
|
||||||
title: "管理端用户"
|
title: "管理端用户"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -24,6 +25,7 @@ export default {
|
|||||||
name: "company",
|
name: "company",
|
||||||
component: () => import("@/views/auth/company/index.vue"),
|
component: () => import("@/views/auth/company/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
|
icon: "ri:building-line",
|
||||||
title: "公司管理"
|
title: "公司管理"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -32,6 +34,7 @@ export default {
|
|||||||
name: "frontendUser",
|
name: "frontendUser",
|
||||||
component: () => import("@/views/auth/frontendUser/index.vue"),
|
component: () => import("@/views/auth/frontendUser/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
|
icon: "ri:admin-line",
|
||||||
title: "用户管理"
|
title: "用户管理"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -40,6 +43,7 @@ export default {
|
|||||||
name: "role",
|
name: "role",
|
||||||
component: () => import("@/views/auth/role/index.vue"),
|
component: () => import("@/views/auth/role/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
|
icon: "ri:shield-user-line",
|
||||||
title: "角色管理"
|
title: "角色管理"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export default {
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "/biz/issuanceBid",
|
redirect: "/biz/issuanceBid",
|
||||||
meta: {
|
meta: {
|
||||||
icon: "ep:apple",
|
icon: "ri:ubuntu-fill",
|
||||||
title: "biz管理",
|
title: "biz管理",
|
||||||
rank: 2
|
rank: 2
|
||||||
},
|
},
|
||||||
@@ -16,7 +16,7 @@ export default {
|
|||||||
name: "issuanceBid",
|
name: "issuanceBid",
|
||||||
component: () => import("@/views/biz/issuanceBid/index.vue"),
|
component: () => import("@/views/biz/issuanceBid/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
icon: "vscode-icons:file-type-biome",
|
icon: "ri:terminal-window-line",
|
||||||
title: "招标管理",
|
title: "招标管理",
|
||||||
showParent: true
|
showParent: true
|
||||||
}
|
}
|
||||||
@@ -26,6 +26,7 @@ export default {
|
|||||||
name: "bid",
|
name: "bid",
|
||||||
component: () => import("@/views/biz/bid/index.vue"),
|
component: () => import("@/views/biz/bid/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
|
icon: "ri:artboard-line",
|
||||||
title: "投标管理"
|
title: "投标管理"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -34,6 +35,7 @@ export default {
|
|||||||
name: "membershipPoint",
|
name: "membershipPoint",
|
||||||
component: () => import("@/views/biz/membershipPoint/index.vue"),
|
component: () => import("@/views/biz/membershipPoint/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
|
icon: "mingcute:coin-3-line",
|
||||||
title: "积分管理"
|
title: "积分管理"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -42,6 +44,7 @@ export default {
|
|||||||
name: "pointSpend",
|
name: "pointSpend",
|
||||||
component: () => import("@/views/biz/pointSpend/index.vue"),
|
component: () => import("@/views/biz/pointSpend/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
|
icon: "mdi:format-list-bulleted",
|
||||||
title: "积分消费记录"
|
title: "积分消费记录"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -50,6 +53,7 @@ export default {
|
|||||||
name: "purchase",
|
name: "purchase",
|
||||||
component: () => import("@/views/biz/purchase/index.vue"),
|
component: () => import("@/views/biz/purchase/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
|
icon: "material-symbols:tools-ladder",
|
||||||
title: "道具管理"
|
title: "道具管理"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -58,8 +62,27 @@ export default {
|
|||||||
name: "purchaseSpend",
|
name: "purchaseSpend",
|
||||||
component: () => import("@/views/biz/purchaseSpend/index.vue"),
|
component: () => import("@/views/biz/purchaseSpend/index.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
|
icon: "mdi:format-list-bulleted-square",
|
||||||
title: "道具消费记录"
|
title: "道具消费记录"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/biz/opsLog",
|
||||||
|
name: "opsLog",
|
||||||
|
component: () => import("@/views/biz/opsLog/index.vue"),
|
||||||
|
meta: {
|
||||||
|
icon: "ri:file-list-3-line",
|
||||||
|
title: "日志管理"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/biz/sysSettings",
|
||||||
|
name: "sysSettings",
|
||||||
|
component: () => import("@/views/biz/sysSettings/index.vue"),
|
||||||
|
meta: {
|
||||||
|
icon: "ri:settings-3-line",
|
||||||
|
title: "系统设置"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
} satisfies RouteConfigsTable;
|
} satisfies RouteConfigsTable;
|
||||||
|
|||||||
334
src/views/biz/opsLog/index.vue
Normal file
334
src/views/biz/opsLog/index.vue
Normal file
@@ -0,0 +1,334 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import { request, bizApi } from "@/api/utils";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "opsLog"
|
||||||
|
});
|
||||||
|
|
||||||
|
withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
height?: string;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
height: undefined
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// 定义查询参数
|
||||||
|
const queryParams = ref({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
userId: "",
|
||||||
|
isCompany: "",
|
||||||
|
companyId: "",
|
||||||
|
opsType: "",
|
||||||
|
keyWords: ""
|
||||||
|
});
|
||||||
|
|
||||||
|
// 定义表格数据
|
||||||
|
const tableData = ref([]);
|
||||||
|
const loading = ref(false);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
// 前端用户列表数据
|
||||||
|
const frontendUserOptions = ref([]);
|
||||||
|
// 获取前端用户列表
|
||||||
|
const getFrontendUserList = async () => {
|
||||||
|
try {
|
||||||
|
const res = await request(bizApi("getFrontendUserPrimaryInfo"), {
|
||||||
|
method: "POST"
|
||||||
|
});
|
||||||
|
if (res.status === 200) {
|
||||||
|
frontendUserOptions.value = res.data.map(item => ({
|
||||||
|
value: item.id,
|
||||||
|
label: item.name
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("获取用户列表失败:", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 公司列表数据
|
||||||
|
const companyOptions = ref([]);
|
||||||
|
// 获取公司列表
|
||||||
|
const getCompanyList = async () => {
|
||||||
|
try {
|
||||||
|
const res = await request(bizApi("getCompanyPrimaryInfo"), {
|
||||||
|
method: "POST"
|
||||||
|
});
|
||||||
|
if (res.status === 200) {
|
||||||
|
companyOptions.value = res.data.map(item => ({
|
||||||
|
value: item.id,
|
||||||
|
label: item.companyName
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("获取公司列表失败:", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 操作类型选项
|
||||||
|
const opsTypeOptions = [
|
||||||
|
{ value: 1, label: "登录" },
|
||||||
|
{ value: 2, label: "设置订阅" },
|
||||||
|
{ value: 3, label: "搜索" },
|
||||||
|
{ value: 4, label: "发标" },
|
||||||
|
{ value: 5, label: "投标" },
|
||||||
|
{ value: 6, label: "购买道具" }
|
||||||
|
];
|
||||||
|
|
||||||
|
// 获取日志列表
|
||||||
|
const getOpsLogList = async () => {
|
||||||
|
try {
|
||||||
|
loading.value = true;
|
||||||
|
const params = { ...queryParams.value };
|
||||||
|
const data = await request(bizApi("opsLogPage"), {
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify(params)
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.status === 200 && data.data != null) {
|
||||||
|
tableData.value = data.data.rows;
|
||||||
|
total.value = data.data.records;
|
||||||
|
} else {
|
||||||
|
ElMessage.error(data.msg || "获取数据失败");
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("获取日志列表失败:", error);
|
||||||
|
ElMessage.error(error.message || "获取数据失败");
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 搜索方法
|
||||||
|
const handleSearch = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getOpsLogList();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 重置方法
|
||||||
|
const handleReset = () => {
|
||||||
|
queryParams.value = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
userId: "",
|
||||||
|
isCompany: "",
|
||||||
|
companyId: "",
|
||||||
|
opsType: "",
|
||||||
|
keyWords: ""
|
||||||
|
};
|
||||||
|
getOpsLogList();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 分页改变
|
||||||
|
const handleSizeChange = (val: number) => {
|
||||||
|
queryParams.value.pageSize = val;
|
||||||
|
getOpsLogList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCurrentChange = (val: number) => {
|
||||||
|
queryParams.value.pageNum = val;
|
||||||
|
getOpsLogList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
label: "用户名称",
|
||||||
|
prop: "userId",
|
||||||
|
width: "120",
|
||||||
|
formatter: row => {
|
||||||
|
const user = frontendUserOptions.value.find(
|
||||||
|
item => item.value === row.userId
|
||||||
|
);
|
||||||
|
return user ? user.label : "";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否公司",
|
||||||
|
prop: "isCompany",
|
||||||
|
width: "90",
|
||||||
|
align: "center",
|
||||||
|
formatter: row => {
|
||||||
|
return row.isCompany === 1 ? "是" : "否";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "公司名称",
|
||||||
|
prop: "companyId",
|
||||||
|
width: "150",
|
||||||
|
align: "center",
|
||||||
|
formatter: row => {
|
||||||
|
const company = companyOptions.value.find(
|
||||||
|
item => item.value === row.companyId
|
||||||
|
);
|
||||||
|
return company ? company.label : "-";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "操作类型",
|
||||||
|
prop: "opsType",
|
||||||
|
width: "120",
|
||||||
|
align: "center",
|
||||||
|
formatter: row => {
|
||||||
|
const type = opsTypeOptions.find(item => item.value === row.opsType);
|
||||||
|
return type ? type.label : "-";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "关键词",
|
||||||
|
prop: "keyWords",
|
||||||
|
width: "200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "创建时间",
|
||||||
|
prop: "createTime",
|
||||||
|
width: "160",
|
||||||
|
formatter: row => {
|
||||||
|
return row.createTime
|
||||||
|
? dayjs(row.createTime).format("YYYY-MM-DD HH:mm:ss")
|
||||||
|
: "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// 页面加载时获取数据
|
||||||
|
onMounted(() => {
|
||||||
|
getOpsLogList();
|
||||||
|
getFrontendUserList();
|
||||||
|
getCompanyList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="ops-log-container">
|
||||||
|
<div class="search-box">
|
||||||
|
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="用户" prop="userId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.userId"
|
||||||
|
placeholder="请选择用户"
|
||||||
|
clearable
|
||||||
|
class="user-select"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in frontendUserOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="公司名称" prop="companyId">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.companyId"
|
||||||
|
placeholder="请选择公司"
|
||||||
|
clearable
|
||||||
|
class="company-select"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in companyOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="操作类型" prop="opsType">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.opsType"
|
||||||
|
placeholder="请选择操作类型"
|
||||||
|
clearable
|
||||||
|
class="type-select"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in opsTypeOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="关键词" prop="keyWords">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.keyWords"
|
||||||
|
placeholder="请输入关键词"
|
||||||
|
clearable
|
||||||
|
class="input-width"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<pure-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
:columns="columns"
|
||||||
|
:height="height"
|
||||||
|
row-key="id"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="pagination-container">
|
||||||
|
<el-pagination
|
||||||
|
v-model:current-page="queryParams.pageNum"
|
||||||
|
v-model:page-size="queryParams.pageSize"
|
||||||
|
:page-sizes="[10, 20, 30, 50]"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.ops-log-container {
|
||||||
|
padding: 20px;
|
||||||
|
|
||||||
|
.search-box {
|
||||||
|
padding: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-select {
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.company-select {
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-select {
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-width {
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
264
src/views/biz/sysSettings/index.vue
Normal file
264
src/views/biz/sysSettings/index.vue
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import { request, bizApi } from "@/api/utils";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "sysSettings"
|
||||||
|
});
|
||||||
|
|
||||||
|
// 定义配置数据
|
||||||
|
const settingsData = ref({
|
||||||
|
issuance_bids: {
|
||||||
|
max_vadlid_days: 7,
|
||||||
|
bidding_num: 3,
|
||||||
|
cut_in_num: 5
|
||||||
|
},
|
||||||
|
subscribe: {
|
||||||
|
subscribe_words: 3,
|
||||||
|
word_length: 10
|
||||||
|
},
|
||||||
|
purchases: [
|
||||||
|
{ purchase_type: 1, valid_day: 7, need_points: 2000 },
|
||||||
|
{ purchase_type: 2, need_points: 3000 },
|
||||||
|
{ purchase_type: 3, need_points: 300 },
|
||||||
|
{ purchase_type: 4, need_points: 200000 },
|
||||||
|
{ purchase_type: 5, need_points: 100 },
|
||||||
|
{ purchase_type: 6, need_points: 1000 }
|
||||||
|
],
|
||||||
|
membership_config: {
|
||||||
|
issuance_num_per_month_company: 10,
|
||||||
|
issuance_num_per_month_person: 5
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 道具类型映射
|
||||||
|
const purchaseTypeMap = {
|
||||||
|
1: "置顶卡",
|
||||||
|
2: "提升卡",
|
||||||
|
3: "排他卡",
|
||||||
|
4: "直通卡",
|
||||||
|
5: "插队卡",
|
||||||
|
6: "跳转卡"
|
||||||
|
};
|
||||||
|
|
||||||
|
// 加载设置数据
|
||||||
|
const loadSettings = async () => {
|
||||||
|
try {
|
||||||
|
const res = await request(bizApi("getSysSettings"), {
|
||||||
|
method: "POST"
|
||||||
|
});
|
||||||
|
console.info(res);
|
||||||
|
if (res.status === 200) {
|
||||||
|
res.data.forEach(item => {
|
||||||
|
settingsData.value[item.settingsKey] = JSON.parse(item.settingsContent);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("获取系统设置失败:", error);
|
||||||
|
ElMessage.error("获取系统设置失败");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 保存设置
|
||||||
|
const saveSettings = async (key: string) => {
|
||||||
|
try {
|
||||||
|
const params = {
|
||||||
|
settingsKey: key,
|
||||||
|
settingsContent: JSON.stringify(settingsData.value[key])
|
||||||
|
};
|
||||||
|
const res = await request(bizApi("updateSysSettings"), {
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify(params)
|
||||||
|
});
|
||||||
|
if (res.status === 200) {
|
||||||
|
ElMessage.success("保存成功");
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.msg || "保存失败");
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("保存系统设置失败:", error);
|
||||||
|
ElMessage.error("保存系统设置失败");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
loadSettings();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="settings-container">
|
||||||
|
<!-- 发标设置 -->
|
||||||
|
<el-card class="settings-card">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>发标设置</span>
|
||||||
|
<el-button type="primary" @click="saveSettings('issuance_bids')"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-form
|
||||||
|
label-width="160px"
|
||||||
|
:model="settingsData.issuance_bids"
|
||||||
|
class="settings-form"
|
||||||
|
>
|
||||||
|
<el-form-item label="最大有效天数">
|
||||||
|
<el-input-number
|
||||||
|
v-model="settingsData.issuance_bids.max_vadlid_days"
|
||||||
|
:min="1"
|
||||||
|
:max="30"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="投标数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="settingsData.issuance_bids.bidding_num"
|
||||||
|
:min="1"
|
||||||
|
:max="10"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="插队数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="settingsData.issuance_bids.cut_in_num"
|
||||||
|
:min="1"
|
||||||
|
:max="10"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 订阅设置 -->
|
||||||
|
<el-card class="settings-card">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>订阅设置</span>
|
||||||
|
<el-button type="primary" @click="saveSettings('subscribe')"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-form
|
||||||
|
label-width="160px"
|
||||||
|
:model="settingsData.subscribe"
|
||||||
|
class="settings-form"
|
||||||
|
>
|
||||||
|
<el-form-item label="订阅关键词数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="settingsData.subscribe.subscribe_words"
|
||||||
|
:min="1"
|
||||||
|
:max="10"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关键词最大长度">
|
||||||
|
<el-input-number
|
||||||
|
v-model="settingsData.subscribe.word_length"
|
||||||
|
:min="1"
|
||||||
|
:max="20"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 道具设置 -->
|
||||||
|
<el-card class="settings-card">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>道具设置</span>
|
||||||
|
<el-button type="primary" @click="saveSettings('purchases')"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-table :data="settingsData.purchases" border class="settings-table">
|
||||||
|
<el-table-column label="道具类型" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ purchaseTypeMap[row.purchase_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="有效天数" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-if="row.valid_day !== undefined"
|
||||||
|
v-model="row.valid_day"
|
||||||
|
:min="1"
|
||||||
|
:max="30"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="所需积分" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.need_points"
|
||||||
|
:min="1"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 会员配置 -->
|
||||||
|
<el-card class="settings-card">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>会员配置</span>
|
||||||
|
<el-button type="primary" @click="saveSettings('membership_config')"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-form
|
||||||
|
label-width="160px"
|
||||||
|
:model="settingsData.membership_config"
|
||||||
|
class="settings-form"
|
||||||
|
>
|
||||||
|
<el-form-item label="公司每月发标数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="
|
||||||
|
settingsData.membership_config.issuance_num_per_month_company
|
||||||
|
"
|
||||||
|
:min="1"
|
||||||
|
:max="100"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="个人每月发标数量">
|
||||||
|
<el-input-number
|
||||||
|
v-model="
|
||||||
|
settingsData.membership_config.issuance_num_per_month_person
|
||||||
|
"
|
||||||
|
:min="1"
|
||||||
|
:max="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.settings-container {
|
||||||
|
padding: 20px;
|
||||||
|
|
||||||
|
.settings-card {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-form {
|
||||||
|
max-width: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-table {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -47,8 +47,8 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
|||||||
"/auth": {
|
"/auth": {
|
||||||
target: "http://127.0.0.1:9098",
|
target: "http://127.0.0.1:9098",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: path => path.replace(/^\/auth/, "/auth/user/rd"),
|
rewrite: path => path.replace(/^\/auth/, "/auth/user/rd")
|
||||||
configure: (proxy, options) => {
|
/* configure: (proxy, options) => {
|
||||||
// 添加调试日志
|
// 添加调试日志
|
||||||
proxy.on("proxyReq", (proxyReq, req, res) => {
|
proxy.on("proxyReq", (proxyReq, req, res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@@ -69,7 +69,7 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
|||||||
console.log(req);
|
console.log(req);
|
||||||
console.error("代理错误:", err);
|
console.error("代理错误:", err);
|
||||||
});
|
});
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 预热文件以提前转换和缓存结果,降低启动期间的初始页面加载时长并防止转换瀑布
|
// 预热文件以提前转换和缓存结果,降低启动期间的初始页面加载时长并防止转换瀑布
|
||||||
|
|||||||
Reference in New Issue
Block a user