Compare commits
2 Commits
eea0925899
...
0861dae12d
| Author | SHA1 | Date | |
|---|---|---|---|
| 0861dae12d | |||
| e8dc354c10 |
@@ -1,6 +1,6 @@
|
|||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
VITE_APP_API_VERSION = "" #版本号
|
VITE_APP_API_VERSION = "" #版本号
|
||||||
VITE_APP_API_BASEURL = https://opsscmapi.f2b211.com/api/ #请求地址
|
VITE_APP_API_BASEURL = https://newwms.api.f2b211.com/ #请求地址
|
||||||
VITE_APP_SSO_LOGINURL = https://uc.v3.f2b211.com/uc/login
|
VITE_APP_SSO_LOGINURL = https://uc.v3.f2b211.com/uc/login
|
||||||
VITE_APP_SSO_APPID = 100664627590856707
|
VITE_APP_SSO_APPID = 100664627590856707
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<!-- <el-icon v-show="item.meta.icon && globalStore.breadcrumbIcon" class="breadcrumb-icon">
|
<!-- <el-icon v-show="item.meta.icon && globalStore.breadcrumbIcon" class="breadcrumb-icon">
|
||||||
<component :is="item.meta.icon"></component>
|
<component :is="item.meta.icon"></component>
|
||||||
</el-icon> -->
|
</el-icon> -->
|
||||||
|
<!-- {{ breadcrumbList }} -->
|
||||||
<span class="breadcrumb-title">{{ item.meta.title }}</span>
|
<span class="breadcrumb-title">{{ item.meta.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
@@ -28,13 +28,22 @@ const route = useRoute();
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const globalStore = useGlobalStore();
|
const globalStore = useGlobalStore();
|
||||||
|
// const routeName: any = ref(router.currentRoute.value.name);
|
||||||
const breadcrumbList = computed(() => {
|
const breadcrumbList = computed(() => {
|
||||||
let breadcrumbData = authStore.breadcrumbListGet[route.matched[route.matched.length - 1].path] ?? [];
|
let breadcrumbData = authStore.breadcrumbListGet[route.matched[route.matched.length - 1].path] ?? [];
|
||||||
// 🙅♀️不需要首页面包屑可删除以下判断
|
// 🙅♀️不需要首页面包屑可删除以下判断
|
||||||
if (breadcrumbData[0].path !== HOME_URL) {
|
if (breadcrumbData[0].path !== HOME_URL) {
|
||||||
breadcrumbData = [{ path: HOME_URL, meta: { icon: "HomeFilled", title: "首页" } }, ...breadcrumbData];
|
breadcrumbData = [{ path: HOME_URL, meta: { icon: "HomeFilled", title: "首页" } }, ...breadcrumbData];
|
||||||
}
|
}
|
||||||
|
if (route.query.title === "新增订阅" || "编辑订阅") {
|
||||||
|
breadcrumbData.forEach((item: any) => {
|
||||||
|
if (item.name === "foundationSubscribeListAdd") {
|
||||||
|
item.meta.title = route.query.title;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log("");
|
||||||
|
}
|
||||||
|
|
||||||
return breadcrumbData;
|
return breadcrumbData;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ watch(
|
|||||||
() => {
|
() => {
|
||||||
if (route.meta.isFull) return;
|
if (route.meta.isFull) return;
|
||||||
tabsMenuValue.value = route.fullPath;
|
tabsMenuValue.value = route.fullPath;
|
||||||
|
|
||||||
let title: any = route.query.title ? route.query.title : route.meta.title;
|
let title: any = route.query.title ? route.query.title : route.meta.title;
|
||||||
|
|
||||||
const tabsParams = {
|
const tabsParams = {
|
||||||
|
|||||||
@@ -10,4 +10,5 @@ export interface TabsMenuProps {
|
|||||||
/* TabsState */
|
/* TabsState */
|
||||||
export interface TabsState {
|
export interface TabsState {
|
||||||
tabsMenuList: TabsMenuProps[];
|
tabsMenuList: TabsMenuProps[];
|
||||||
|
isSubscribeAdd: Boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import piniaPersistConfig from "@/config/piniaPersist";
|
|||||||
export const useTabsStore = defineStore({
|
export const useTabsStore = defineStore({
|
||||||
id: "wms-tabs",
|
id: "wms-tabs",
|
||||||
state: (): TabsState => ({
|
state: (): TabsState => ({
|
||||||
|
isSubscribeAdd: false,
|
||||||
tabsMenuList: [
|
tabsMenuList: [
|
||||||
{
|
{
|
||||||
icon: "", // 首页的icon,按实际路由meta.icon填写(如"Home")
|
icon: "", // 首页的icon,按实际路由meta.icon填写(如"Home")
|
||||||
@@ -133,6 +134,10 @@ export const useTabsStore = defineStore({
|
|||||||
this.tabsMenuList.forEach(item => {
|
this.tabsMenuList.forEach(item => {
|
||||||
if (item.path == nowFullPath) item.title = title;
|
if (item.path == nowFullPath) item.title = title;
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
async setSIsSubscribeAdd(is: any) {
|
||||||
|
console.log(is, "==========is========");
|
||||||
|
this.isSubscribeAdd = is;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
persist: piniaPersistConfig("wms-tabs")
|
persist: piniaPersistConfig("wms-tabs")
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ import { BUTTON } from "./constant/add/button";
|
|||||||
import { useUserStore } from "@/stores/modules/user";
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
import $Bus from "@/utils/mittBus";
|
import $Bus from "@/utils/mittBus";
|
||||||
|
// import { useTabsStore } from "@/stores/modules/tabs";
|
||||||
|
// const tabStore = useTabsStore();
|
||||||
const dataStore = reactive({
|
const dataStore = reactive({
|
||||||
formData: cloneDeep(FORM_DATA),
|
formData: cloneDeep(FORM_DATA),
|
||||||
ruleForm: cloneDeep(RULE_FORM),
|
ruleForm: cloneDeep(RULE_FORM),
|
||||||
@@ -53,28 +55,37 @@ const init = () => {
|
|||||||
init();
|
init();
|
||||||
//新增
|
//新增
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
if (
|
if ($route.query.title === "编辑订阅") {
|
||||||
dataStore.ruleForm?.customer_number?.length ||
|
$router.replace({
|
||||||
dataStore.ruleForm?.org_number ||
|
path: "/foundation/subscribe/list/add",
|
||||||
dataStore.ruleForm?.product_lines ||
|
query: {
|
||||||
dataStore.ruleForm?.subscriber_dduid
|
title: "新增订阅"
|
||||||
) {
|
}
|
||||||
ElMessageBox.confirm("当前数据未提交, 确认放弃新增数据?", "温馨提示", {
|
});
|
||||||
confirmButtonText: "确定",
|
}
|
||||||
cancelButtonText: "取消",
|
if ($route.query.title === "新增订阅") {
|
||||||
type: "warning"
|
if (
|
||||||
})
|
dataStore.ruleForm?.customer_number?.length ||
|
||||||
.then(async () => {
|
dataStore.ruleForm?.org_number ||
|
||||||
dataStore.ruleForm = cloneDeep(RULE_FORM);
|
dataStore.ruleForm?.product_lines ||
|
||||||
dataStore.ruleForm.org_number = ["101"];
|
dataStore.ruleForm?.subscriber_dduid
|
||||||
dataStore.isAdd = true;
|
) {
|
||||||
detailsRef?.value?.formElement?.resetFields();
|
ElMessageBox.confirm("当前数据未提交, 确认放弃新增数据?", "温馨提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.then(async () => {
|
||||||
|
dataStore.ruleForm = cloneDeep(RULE_FORM);
|
||||||
|
dataStore.ruleForm.org_number = ["101"];
|
||||||
|
dataStore.isAdd = true;
|
||||||
|
detailsRef?.value?.formElement?.resetFields();
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleGoList = () => {
|
const handleGoList = () => {
|
||||||
detailsRef?.value?.formElement?.resetFields();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
$router.replace({ path: "/foundation/subscribe/list/index" });
|
$router.replace({ path: "/foundation/subscribe/list/index" });
|
||||||
$Bus.emit("setResetList");
|
$Bus.emit("setResetList");
|
||||||
@@ -88,6 +99,8 @@ const getSubscribeAdd = async (params: any) => {
|
|||||||
useMsg("success", "新增成功 !");
|
useMsg("success", "新增成功 !");
|
||||||
dataStore.ruleForm = cloneDeep(RULE_FORM);
|
dataStore.ruleForm = cloneDeep(RULE_FORM);
|
||||||
dataStore.ruleForm.org_number = ["101"];
|
dataStore.ruleForm.org_number = ["101"];
|
||||||
|
detailsRef?.value?.formElement?.resetFields();
|
||||||
|
handleGoList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//更新
|
//更新
|
||||||
|
|||||||
Reference in New Issue
Block a user