|
@@ -304,6 +304,7 @@ import {
|
|
|
roadshowInterence,
|
|
|
getBusinessCode,
|
|
|
} from "api/api.js";
|
|
|
+import { getPublicSettingsApi } from '@/api/modules/oldApi';
|
|
|
import PwdDlg from "@/components/pwdDlg.vue";
|
|
|
import questionMsgDia from "@/components/questionMsgDia.vue";
|
|
|
import EventBus from "@/api/bus.js";
|
|
@@ -463,6 +464,7 @@ export default {
|
|
|
} else {
|
|
|
this.getMenuList();
|
|
|
}
|
|
|
+ this.getPublicSettings();
|
|
|
},
|
|
|
methods: {
|
|
|
//判断是否为初始密码
|
|
@@ -710,152 +712,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- /* 待办事项列表 */
|
|
|
- getNotice() {
|
|
|
- customInterence.noticeList().then((res) => {
|
|
|
- if (res.Ret === 200) {
|
|
|
- res.Data.Company.List &&
|
|
|
- res.Data.Company.List.forEach((item) => {
|
|
|
- item.CreateTime = item.CreateTime.replace(/-/g, ".");
|
|
|
- });
|
|
|
- res.Data.Contract.List &&
|
|
|
- res.Data.Contract.List.forEach((item) => {
|
|
|
- item.CreateTime = item.CreateTime.replace(/-/g, ".");
|
|
|
- });
|
|
|
- res.Data.Seal.List &&
|
|
|
- res.Data.Seal.List.forEach((item) => {
|
|
|
- item.CreateTime = item.CreateTime.replace(/-/g, ".");
|
|
|
- });
|
|
|
- res.Data.EdbReplace.List &&
|
|
|
- res.Data.EdbReplace.List.forEach(
|
|
|
- (item) => (item.CreateTime = item.CreateTime.replace(/-/g, "."))
|
|
|
- );
|
|
|
- res.Data.BusinessTrip.List &&
|
|
|
- res.Data.BusinessTrip.List.forEach(
|
|
|
- (item) => (item.CreateTime = item.CreateTime.replace(/-/g, "."))
|
|
|
- );
|
|
|
-
|
|
|
- this.noticeList = res.Data;
|
|
|
- this.noticeCount =
|
|
|
- this.Role === "admin"
|
|
|
- ? res.Data.EdbReplace.Total + res.Data.BusinessTrip.Total
|
|
|
- : res.Data.Company.Total +
|
|
|
- res.Data.Contract.Total +
|
|
|
- res.Data.Seal.Total +
|
|
|
- res.Data.EdbReplace.Total +
|
|
|
- res.Data.BusinessTrip.Total;
|
|
|
-
|
|
|
- this.noticeType = this.Role === "admin" ? "更新" : "客户";
|
|
|
- // 默认显示客户
|
|
|
- this.currentNoticeList =
|
|
|
- this.Role === "admin"
|
|
|
- ? res.Data.EdbReplace.List
|
|
|
- : res.Data.Company.List;
|
|
|
-
|
|
|
- // 检查是否有未读的
|
|
|
- if (this.Role != "admin") {
|
|
|
- this.flag1 = res.Data.Company.List.some((item) => {
|
|
|
- return item.MessageStatus === 0;
|
|
|
- });
|
|
|
- this.flag2 = res.Data.Contract.List.some((item) => {
|
|
|
- return item.MessageStatus === 0;
|
|
|
- });
|
|
|
- this.flag3 = res.Data.Seal.List.some((item) => {
|
|
|
- return item.MessageStatus === 0;
|
|
|
- });
|
|
|
- }
|
|
|
|
|
|
- this.flag5 = res.Data.ETATrial.List.some((item) => {
|
|
|
- return item.MessageStatus === 0;
|
|
|
- });
|
|
|
- this.flag6 = res.Data.BusinessTrip.List.some((item) => {
|
|
|
- return item.MessageStatus === 0;
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- /* 点击消息列表 跳转审批列表 */
|
|
|
- noticeClick(item) {
|
|
|
- customInterence
|
|
|
- .readNotice({
|
|
|
- Id: Number(item.Id),
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.Ret === 200) {
|
|
|
- item.MessageStatus = 1;
|
|
|
- if (this.noticeType === "客户") {
|
|
|
- if (this.$route.path != "/approvalList") {
|
|
|
- this.$router.push({
|
|
|
- path: "/approvalList",
|
|
|
- });
|
|
|
- } else {
|
|
|
- window.location.reload();
|
|
|
- }
|
|
|
- } else if (this.noticeType === "合同") {
|
|
|
- let Role = localStorage.getItem("Role");
|
|
|
- // 主管跳转合同审批列表
|
|
|
- if (Role === "ficc_admin" || Role === "rai_admin") {
|
|
|
- if (this.$route.path != "/contractapprovallist") {
|
|
|
- this.$router.push({
|
|
|
- path: "/contractapprovallist",
|
|
|
- });
|
|
|
- } else {
|
|
|
- window.location.reload();
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (this.$route.path != "/contractmanagelist") {
|
|
|
- this.$router.push({
|
|
|
- path: "/contractmanagelist",
|
|
|
- });
|
|
|
- } else {
|
|
|
- window.location.reload();
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (this.noticeType === "用印") {
|
|
|
- // 用印
|
|
|
- if (this.$route.path != "/sealApprovalList") {
|
|
|
- this.$router.push({
|
|
|
- path: "/sealApprovalList",
|
|
|
- });
|
|
|
- } else {
|
|
|
- window.location.reload();
|
|
|
- }
|
|
|
- } else if (this.noticeType === "ETA试用") {
|
|
|
- const path = this.$route.path;
|
|
|
- let pushPath = "/etaApprovalList";
|
|
|
- //非管理员:若通过跳转用户列表,若驳回跳转审批列表
|
|
|
- //const etaApprovalListType = item.Content.includes('通过')?'approved':'all'
|
|
|
- const etaApprovalListType =
|
|
|
- item.Redirect === 1 ? "approved" : "all";
|
|
|
- sessionStorage.setItem(
|
|
|
- "etaApprovalListType",
|
|
|
- etaApprovalListType
|
|
|
- );
|
|
|
- if (path == pushPath) {
|
|
|
- window.location.reload();
|
|
|
- } else {
|
|
|
- this.$router.push(pushPath);
|
|
|
- }
|
|
|
- } else if (this.noticeType === "出差") {
|
|
|
- const path = this.$route.path;
|
|
|
- let pushPath;
|
|
|
- if (item.ApprovalStatus != 1) {
|
|
|
- // 跳到申请列表
|
|
|
- pushPath = "/businessTripApplication";
|
|
|
- } else {
|
|
|
- // 跳到审批列表
|
|
|
- pushPath = "/businessTripApproval";
|
|
|
- }
|
|
|
- if (path == pushPath) {
|
|
|
- window.location.reload();
|
|
|
- } else {
|
|
|
- this.$router.push(pushPath);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
resetpwd() {
|
|
|
//修改密码
|
|
|
this.$router.push({ path: "/resetpsd" });
|
|
@@ -942,6 +799,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.linkSystems = linkArr
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 获取动态配置 外部动态链接 */
|
|
|
+ async getPublicSettings() {
|
|
|
+ const res = await getPublicSettingsApi();
|
|
|
+ if(res.Ret !== 200) return
|
|
|
+
|
|
|
+ this.$store.commit('SET_DYNAMIC_LINK',res.Data)
|
|
|
}
|
|
|
},
|
|
|
};
|