1、设置打包环境公共文件夹路径;2、修复bug

master
chris 1 month ago
parent 4aa1d5604b
commit 4bfedb525d

@ -5,7 +5,7 @@ VITE_APP_TITLE = AEO系统
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'
# 若依管理系统/生产环境 # 若依管理系统/生产环境
VITE_APP_BASE_API = '/prod-api' VITE_APP_BASE_API = 'http://aeo.gdguanhui.com/aeo'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip

@ -151,7 +151,7 @@ function handleExceed() {
// //
function handleUploadSuccess(res, file) { function handleUploadSuccess(res, file) {
if (res.code === 200) { if (res.code === 200) {
uploadList.value.push({ name: res.fileName, url: res.fileName }); uploadList.value.push({ name: res.fileName, url: import.meta.env.VITE_APP_BASE_API + res.fileName });
uploadedSuccessfully(); uploadedSuccessfully();
} else { } else {
number.value--; number.value--;

@ -88,7 +88,7 @@ function logout() {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
userStore.logOut().then(() => { userStore.logOut().then(() => {
location.href = '/index'; location.href = '/';
}) })
}).catch(() => { }); }).catch(() => { });
} }

@ -1,6 +1,6 @@
import { createWebHistory, createRouter } from 'vue-router' import { createWebHistory, createRouter } from "vue-router";
/* Layout */ /* Layout */
import Layout from '@/layout' import Layout from "@/layout";
/** /**
* Note: 路由配置项 * Note: 路由配置项
@ -27,147 +27,147 @@ import Layout from '@/layout'
// 公共路由 // 公共路由
export const constantRoutes = [ export const constantRoutes = [
{ {
path: '/redirect', path: "/redirect",
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: '/redirect/:path(.*)', path: "/redirect/:path(.*)",
component: () => import('@/views/redirect/index.vue') component: () => import("@/views/redirect/index.vue"),
} },
] ],
}, },
{ {
path: '/login', path: "/login",
component: () => import('@/views/login'), component: () => import("@/views/login"),
hidden: true hidden: true,
}, },
{ {
path: '/register', path: "/register",
component: () => import('@/views/register'), component: () => import("@/views/register"),
hidden: true hidden: true,
}, },
{ {
path: "/:pathMatch(.*)*", path: "/:pathMatch(.*)*",
component: () => import('@/views/error/404'), component: () => import("@/views/error/404"),
hidden: true hidden: true,
}, },
{ {
path: '/401', path: "/401",
component: () => import('@/views/error/401'), component: () => import("@/views/error/401"),
hidden: true hidden: true,
}, },
{ {
path: '', path: "",
component: Layout, component: Layout,
redirect: '/index', redirect: "/index",
children: [ children: [
{ {
path: '/index', path: "/index",
component: () => import('@/views/index'), component: () => import("@/views/index"),
name: 'Index', name: "Index",
meta: { title: '首页', icon: 'dashboard', affix: true } meta: { title: "首页", icon: "dashboard", affix: true },
} },
] ],
}, },
{ {
path: '/user', path: "/user",
component: Layout, component: Layout,
hidden: true, hidden: true,
redirect: 'noredirect', redirect: "noredirect",
children: [ children: [
{ {
path: 'profile', path: "profile",
component: () => import('@/views/system/user/profile/index'), component: () => import("@/views/system/user/profile/index"),
name: 'Profile', name: "Profile",
meta: { title: '个人中心', icon: 'user' } meta: { title: "个人中心", icon: "user" },
} },
] ],
} },
] ];
// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [ export const dynamicRoutes = [
{ {
path: '/system/user-auth', path: "/system/user-auth",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['system:user:edit'], permissions: ["system:user:edit"],
children: [ children: [
{ {
path: 'role/:userId(\\d+)', path: "role/:userId(\\d+)",
component: () => import('@/views/system/user/authRole'), component: () => import("@/views/system/user/authRole"),
name: 'AuthRole', name: "AuthRole",
meta: { title: '分配角色', activeMenu: '/system/user' } meta: { title: "分配角色", activeMenu: "/system/user" },
} },
] ],
}, },
{ {
path: '/system/role-auth', path: "/system/role-auth",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['system:role:edit'], permissions: ["system:role:edit"],
children: [ children: [
{ {
path: 'user/:roleId(\\d+)', path: "user/:roleId(\\d+)",
component: () => import('@/views/system/role/authUser'), component: () => import("@/views/system/role/authUser"),
name: 'AuthUser', name: "AuthUser",
meta: { title: '分配用户', activeMenu: '/system/role' } meta: { title: "分配用户", activeMenu: "/system/role" },
} },
] ],
}, },
{ {
path: '/system/dict-data', path: "/system/dict-data",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['system:dict:list'], permissions: ["system:dict:list"],
children: [ children: [
{ {
path: 'index/:dictId(\\d+)', path: "index/:dictId(\\d+)",
component: () => import('@/views/system/dict/data'), component: () => import("@/views/system/dict/data"),
name: 'Data', name: "Data",
meta: { title: '字典数据', activeMenu: '/system/dict' } meta: { title: "字典数据", activeMenu: "/system/dict" },
} },
] ],
}, },
{ {
path: '/monitor/job-log', path: "/monitor/job-log",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['monitor:job:list'], permissions: ["monitor:job:list"],
children: [ children: [
{ {
path: 'index/:jobId(\\d+)', path: "index/:jobId(\\d+)",
component: () => import('@/views/monitor/job/log'), component: () => import("@/views/monitor/job/log"),
name: 'JobLog', name: "JobLog",
meta: { title: '调度日志', activeMenu: '/monitor/job' } meta: { title: "调度日志", activeMenu: "/monitor/job" },
} },
] ],
}, },
{ {
path: '/tool/gen-edit', path: "/tool/gen-edit",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['tool:gen:edit'], permissions: ["tool:gen:edit"],
children: [ children: [
{ {
path: 'index/:tableId(\\d+)', path: "index/:tableId(\\d+)",
component: () => import('@/views/tool/gen/editTable'), component: () => import("@/views/tool/gen/editTable"),
name: 'GenEdit', name: "GenEdit",
meta: { title: '修改生成配置', activeMenu: '/tool/gen' } meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
} },
] ],
} },
] ];
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),
routes: constantRoutes, routes: constantRoutes,
scrollBehavior(to, from, savedPosition) { scrollBehavior(to, from, savedPosition) {
if (savedPosition) { if (savedPosition) {
return savedPosition return savedPosition;
} }
return { top: 0 } return { top: 0 };
}, },
}); });

@ -71,15 +71,22 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="客户编码" align="center" prop="code" /> <el-table-column label="客户编码" align="center" prop="code" />
<el-table-column label="客户名称" align="center" prop="name" /> <el-table-column label="客户名称" align="center" prop="name" />
<el-table-column label="所属类别" align="center" prop="type" /> <el-table-column label="所属类别" align="center" prop="type">
<el-table-column label="业务状态" align="center" prop="businessStatus" /> <template #default="scope">
<dict-tag :options="customer_type" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="业务状态" align="center" prop="businessStatus">
<template #default="scope">
<dict-tag :options="customer_business_status" :value="scope.row.businessStatus"/>
</template>
</el-table-column>
<el-table-column label="联系人姓名" align="center" prop="contactsName" /> <el-table-column label="联系人姓名" align="center" prop="contactsName" />
<el-table-column label="联系人电话" align="center" prop="contactsPhone" /> <el-table-column label="联系人电话" align="center" prop="contactsPhone" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button <el-button
link link
size="mini"
icon="edit" icon="edit"
type="primary" type="primary"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
@ -87,7 +94,6 @@
>修改</el-button> >修改</el-button>
<el-button <el-button
link link
size="mini"
icon="delete" icon="delete"
type="danger" type="danger"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
@ -267,7 +273,7 @@ function handleUpdate(row) {
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
validateForm.then(() => { validateForm().then(() => {
if (form.value.id != null) { if (form.value.id != null) {
updateCustomer(form.value).then(response => { updateCustomer(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功"); proxy.$modal.msgSuccess("修改成功");

@ -61,11 +61,15 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="所属客户" align="center" prop="customerId" /> <el-table-column label="所属客户" align="center" prop="customerId" />
<el-table-column label="员工姓名" align="center" prop="name" /> <el-table-column label="员工姓名" align="center" prop="name" />
<el-table-column label="性别" align="center" prop="sex" /> <el-table-column label="性别" align="center" prop="sex">
<template #default="scope">
<dict-tag :options="customer_sex" :value="scope.row.sex"/>
</template>
</el-table-column>
<el-table-column label="员工职位" align="center" prop="post" /> <el-table-column label="员工职位" align="center" prop="post" />
<el-table-column label="员工电话" align="center" prop="phone" /> <el-table-column label="员工电话" align="center" prop="phone" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template #default="scope">
<el-button <el-button
link link
type="primary" type="primary"
@ -117,7 +121,7 @@
<el-input v-model="form.name" placeholder="请输入员工姓名" /> <el-input v-model="form.name" placeholder="请输入员工姓名" />
</el-form-item> </el-form-item>
<el-form-item label="员工性别" prop="sex"> <el-form-item label="员工性别" prop="sex">
<el-select v-model="form.type" placeholder="请选择性别"> <el-select v-model="form.sex" placeholder="请选择性别">
<el-option <el-option
v-for="item in customer_sex" v-for="item in customer_sex"
:key="item.value" :key="item.value"
@ -127,7 +131,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="员工职位" prop="post"> <el-form-item label="员工职位" prop="post">
<el-input v-model="form.name" placeholder="请输入员工职位" /> <el-input v-model="form.post" placeholder="请输入员工职位" />
</el-form-item> </el-form-item>
<el-form-item label="员工电话" prop="phone"> <el-form-item label="员工电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入员工电话" /> <el-input v-model="form.phone" placeholder="请输入员工电话" />
@ -274,7 +278,7 @@ function handleUpdate(row) {
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
validateForm.then(() => { validateForm().then(() => {
if (form.value.id != null) { if (form.value.id != null) {
updateCustomerStaff(form.value).then(response => { updateCustomerStaff(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功"); proxy.$modal.msgSuccess("修改成功");

@ -79,8 +79,8 @@ const systemName = import.meta.env.VITE_APP_TITLE;
const copyright = import.meta.env.VITE_APP_COPYRIGHT; const copyright = import.meta.env.VITE_APP_COPYRIGHT;
const loginForm = ref({ const loginForm = ref({
username: "admin", username: import.meta.env.VITE_APP_ENV == 'production' ? "" : 'admin',
password: "admin123", password: import.meta.env.VITE_APP_ENV == 'production' ? '' : "admin123",
rememberMe: false, rememberMe: false,
code: "", code: "",
uuid: "" uuid: ""

@ -67,13 +67,17 @@
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="recordList" @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" prop="code" />
<el-table-column label="产品名称" align="center" prop="name" /> <el-table-column label="产品名称" align="center" prop="name" />
<el-table-column label="产品别名" align="center" prop="alias" /> <el-table-column label="产品别名" align="center" prop="alias" />
<el-table-column label="产品编码" align="center" prop="code" /> <el-table-column label="产品类型" align="center" prop="productsTypeId" />
<el-table-column label="规格" align="center" prop="specs" /> <el-table-column label="规格" align="center" prop="specs" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="标签" align="center" prop="label" /> <el-table-column label="标签" align="center" prop="label" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="一级分类名称" align="center" prop="levelOne" />
<el-table-column label="二级分类名称" align="center" prop="levelTwo" />
<el-table-column label="三级分类名称" align="center" prop="levelThree" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button <el-button
@ -104,7 +108,7 @@
<!-- 添加或修改产品归档对话框 --> <!-- 添加或修改产品归档对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body> <el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="formRef" :model="form" :rules="rules" label-width="80px"> <el-form ref="formRef" :model="form" :rules="rules" label-width="90px">
<el-form-item label="产品名称" prop="name"> <el-form-item label="产品名称" prop="name">
<el-input v-model="form.name" placeholder="请输入产品名称" /> <el-input v-model="form.name" placeholder="请输入产品名称" />
</el-form-item> </el-form-item>
@ -126,6 +130,86 @@
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="产品类型" prop="productsTypeId">
<el-select
v-model="form.productsTypeId"
filterable
remote
placeholder="请输入关键词搜索"
remote-show-suffix
:remote-method="($event) => remoteMethod($event, remoteProductType)"
:loading="remoteLoading"
>
<el-option
v-for="item in productTypeList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="一级分类" prop="levelOneId">
<el-select
v-model="form.levelOneId"
filterable
remote
placeholder="请输入关键词搜索"
remote-show-suffix
:remote-method="($event) => remoteMethod($event, remoteCategory)"
:loading="remoteLoading"
@focus="remoteFocus(0)"
@change="handleLevelChange($event, 0)"
>
<el-option
v-for="item in categoryList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="二级分类" prop="levelTwoId">
<el-select
v-model="form.levelTwoId"
filterable
remote
placeholder="请输入关键词搜索"
remote-show-suffix
:disabled="form.levelOneId == null"
:remote-method="($event) => remoteMethod($event, remoteCategory)"
:loading="remoteLoading"
@focus="remoteFocus(1)"
@change="handleLevelChange($event, 1)"
>
<el-option
v-for="item in categoryList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="三级分类" prop="levelThreeId">
<el-select
v-model="form.levelThreeId"
filterable
remote
placeholder="请输入关键词搜索"
remote-show-suffix
:disabled="form.levelTwoId == null"
:remote-method="($event) => remoteMethod($event, remoteCategory)"
:loading="remoteLoading"
@focus="remoteFocus(2)"
@change="handleLevelChange($event, null)"
>
<el-option
v-for="item in categoryList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -137,8 +221,11 @@
<script setup> <script setup>
import { listProductsRecord, getProductsRecord, delProductsRecord, addProductsRecord, updateProductsRecord } from "@/api/product/productsRecord"; import { listProductsRecord, getProductsRecord, delProductsRecord, addProductsRecord, updateProductsRecord } from "@/api/product/productsRecord";
import { listCategory } from "@/api/product/category";
import { listProductsType } from "@/api/product/productsType";
import useForm from '@/hooks/useForm.js'; import useForm from '@/hooks/useForm.js';
import useRemote from "@/hooks/useRemote";
const defaultForm = { const defaultForm = {
id: null, id: null,
@ -180,21 +267,28 @@ const data = reactive({
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
recordList: [], recordList: [],
//
categoryList: [],
//
productTypeList: [],
// //
title: "", title: "",
// //
open: false, open: false,
// //
rules: { rules: {
} },
categoryType: null,
levelPIds: ['', ''],
}) })
const { loading, ids, single, multiple, showSearch, total, recordList, title, open, rules } = toRefs(data); const { loading, ids, single, multiple, showSearch, total, recordList, title, open, rules, categoryList, categoryType, productTypeList, levelPIds } = toRefs(data);
const { form, validateForm, resetForm } = useForm(formRef, defaultForm) const { form, validateForm, resetForm } = useForm(formRef, defaultForm)
const { form: queryParams, resetForm: resetQueryForm } = useForm(queryRef, defaultParams) const { form: queryParams, resetForm: resetQueryForm } = useForm(queryRef, defaultParams)
const { loading: remoteLoading, remoteMethod } = useRemote();
getList(); getList();
@ -207,6 +301,49 @@ function getList() {
}); });
} }
function remoteCategory (query) {
const params = {
pageNum: 1,
pageSize: 50,
type: categoryType.value,
name: query
}
if (categoryType.value) {
params.pid = levelPIds.value[categoryType.value - 1];
}
return listCategory(params).then(response => {
categoryList.value = response.rows;
});
}
function remoteProductType (query) {
const params = {
pageNum: 1,
pageSize: 50,
name: query
}
return listProductsType(params).then(response => {
productTypeList.value = response.rows;
});
}
function remoteFocus (type) {
// 0: 1 2
categoryList.value = [];
categoryType.value = type;
}
function handleLevelChange (id, index) {
if (index == null) return;
if (index === 0) {
form.value.levelTwoId = form.value.levelThreeId = null;
}
levelPIds.value[index] = id;
}
// //
function cancel() { function cancel() {
open.value = false; open.value = false;

@ -1,15 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="部门ID" prop="deptId"> <el-form-item label="类型" prop="name">
<el-input
v-model="queryParams.deptId"
placeholder="请输入部门ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="分类名称" prop="name">
<el-input <el-input
v-model="queryParams.name" v-model="queryParams.name"
placeholder="请输入分类名称" placeholder="请输入分类名称"
@ -17,14 +9,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="分类编码" prop="code">
<el-input
v-model="queryParams.code"
placeholder="请输入分类编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="search" @click="handleQuery"></el-button> <el-button type="primary" icon="search" @click="handleQuery"></el-button>
<el-button icon="refresh" @click="resetQuery"></el-button> <el-button icon="refresh" @click="resetQuery"></el-button>
@ -75,11 +59,10 @@
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange"> <el-table 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" prop="name" /> <el-table-column label="编码" align="center" prop="code" />
<el-table-column label="分类编码" align="center" prop="code" /> <el-table-column label="类型" align="center" prop="name" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template #default="scope">
<el-button <el-button
link link
type="primary" type="primary"
@ -109,14 +92,11 @@
<!-- 添加或修改产品类型对话框 --> <!-- 添加或修改产品类型对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body> <el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="formRef" :model="form" :rules="rules" label-width="80px"> <el-form ref="formRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="分类名称" prop="name"> <el-form-item label="编码" prop="code">
<el-input v-model="form.name" placeholder="请输入分类名称" />
</el-form-item>
<el-form-item label="分类编码" prop="code">
<el-input v-model="form.code" placeholder="请输入分类编码" /> <el-input v-model="form.code" placeholder="请输入分类编码" />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="类型" prop="name">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.name" placeholder="请输入分类名称" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -135,15 +115,13 @@ import useForm from '@/hooks/useForm.js';
const defaultForm = { const defaultForm = {
id: null, id: null,
name: null, name: null,
code: null, code: null
remark: null
} }
const defaultParams = { const defaultParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
name: null, name: null
code: null
} }
const formRef = ref(null); const formRef = ref(null);
@ -241,7 +219,7 @@ function handleUpdate(row) {
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
validateForm.then(() => { validateForm().then(() => {
if (form.value.id != null) { if (form.value.id != null) {
updateProductsType(form.value).then(response => { updateProductsType(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功"); proxy.$modal.msgSuccess("修改成功");

@ -167,7 +167,7 @@
<el-date-picker clearable <el-date-picker clearable
v-model="form.startTime" v-model="form.startTime"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="YYYY-MM-DD"
placeholder="请选择供应商经营开始时间"> placeholder="请选择供应商经营开始时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -239,7 +239,7 @@
<el-date-picker clearable <el-date-picker clearable
v-model="form.approvalTime" v-model="form.approvalTime"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="YYYY-MM-DD"
placeholder="请选择供应商核准时间"> placeholder="请选择供应商核准时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -259,7 +259,7 @@
<el-date-picker clearable <el-date-picker clearable
v-model="form.expirationTime" v-model="form.expirationTime"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="YYYY-MM-DD"
placeholder="请选择合同有效期"> placeholder="请选择合同有效期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -280,6 +280,7 @@
v-model="form.attachment" v-model="form.attachment"
placeholder="请选择" placeholder="请选择"
clearable clearable
@change="attachmentChanged"
> >
<el-option <el-option
v-for="item in [{ value: 0, label: '否' }, { value: 1, label: '是' }]" v-for="item in [{ value: 0, label: '否' }, { value: 1, label: '是' }]"
@ -290,9 +291,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-if="form.attachment"> <el-col :span="24" v-show="form.attachment">
<el-form-item label="执照相片" prop="licenseImg"> <el-form-item label="执照相片" prop="licenseImg">
<image-upload <image-upload
v-model="form.licenseImg"
:limit="1" :limit="1"
> >
</image-upload> </image-upload>
@ -392,6 +394,11 @@ function getList() {
}); });
} }
function attachmentChanged (value) {
if (value) return;
form.value.licenseImg = null;
}
// //
function cancel() { function cancel() {
open.value = false; open.value = false;
@ -442,7 +449,7 @@ function handleUpdate(row) {
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
validateForm.then(() => { validateForm().then(() => {
if (form.value.id != null) { if (form.value.id != null) {
updateSupplierRecord(form.value).then(response => { updateSupplierRecord(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功"); proxy.$modal.msgSuccess("修改成功");

@ -0,0 +1,11 @@
<template>
<div>
</div>
</template>
<script>
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,11 @@
<template>
<div>
</div>
</template>
<script>
</script>
<style lang="scss" scoped>
</style>

@ -10,7 +10,7 @@ export default defineConfig(({ mode, command }) => {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下vite 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下vite 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
base: VITE_APP_ENV === "production" ? "/" : "/", base: VITE_APP_ENV === "production" ? "" : "/",
plugins: createVitePlugins(env, command === "build"), plugins: createVitePlugins(env, command === "build"),
resolve: { resolve: {
// https://cn.vitejs.dev/config/#resolve-alias // https://cn.vitejs.dev/config/#resolve-alias
@ -31,7 +31,8 @@ export default defineConfig(({ mode, command }) => {
proxy: { proxy: {
// https://cn.vitejs.dev/config/#server-proxy // https://cn.vitejs.dev/config/#server-proxy
"/dev-api": { "/dev-api": {
target: "http://192.168.0.111:8080", // target: "http://192.168.0.111:8080",
target: "http://aeo.gdguanhui.com/aeo",
changeOrigin: true, changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, ""), rewrite: (p) => p.replace(/^\/dev-api/, ""),
}, },

Loading…
Cancel
Save