|
@@ -2,7 +2,7 @@
|
|
|
<div class="portal-home min-h-screen bg-[#eef3f9] text-[#17345f]">
|
|
<div class="portal-home min-h-screen bg-[#eef3f9] text-[#17345f]">
|
|
|
<Header />
|
|
<Header />
|
|
|
|
|
|
|
|
- <main class="mx-auto max-w-[1200px] px-6 pb-8 pt-20">
|
|
|
|
|
|
|
+ <main class="mx-auto max-w-[1400px] px-6 pb-8 pt-20">
|
|
|
<section class="hero-banner overflow-hidden rounded-[6px] relative">
|
|
<section class="hero-banner overflow-hidden rounded-[6px] relative">
|
|
|
<div class="">
|
|
<div class="">
|
|
|
<!-- 轮播容器 -->
|
|
<!-- 轮播容器 -->
|
|
@@ -267,16 +267,16 @@
|
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
|
<section
|
|
<section
|
|
|
|
|
+ v-if="userStore.getUser.username"
|
|
|
class="side-card side-card--placeholder rounded-md"
|
|
class="side-card side-card--placeholder rounded-md"
|
|
|
:style="{ minHeight: '78px', backgroundColor: '#3575e4' }"
|
|
:style="{ minHeight: '78px', backgroundColor: '#3575e4' }"
|
|
|
>
|
|
>
|
|
|
<div class="placeholder-panel flex flex-col text-left">
|
|
<div class="placeholder-panel flex flex-col text-left">
|
|
|
- <div class="text-sm">需要帮助?</div>
|
|
|
|
|
- <div class="text-[10px]">
|
|
|
|
|
- 遇到系统操作问题?我们的7 x 24 小时AI助手随时待命。
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <!-- <div class="text-sm">需要帮助?</div> -->
|
|
|
|
|
+ <div class="text-[10px]">需要帮助?遇到系统操作问题?</div>
|
|
|
<div
|
|
<div
|
|
|
class="bg-white text-sm text-center text-[#004098] py-1 px-2 rounded-full mt-2 w-[30%] cursor-pointer"
|
|
class="bg-white text-sm text-center text-[#004098] py-1 px-2 rounded-full mt-2 w-[30%] cursor-pointer"
|
|
|
|
|
+ @click="openConsultDialog"
|
|
|
>
|
|
>
|
|
|
立即咨询
|
|
立即咨询
|
|
|
</div>
|
|
</div>
|
|
@@ -286,12 +286,63 @@
|
|
|
</section>
|
|
</section>
|
|
|
</main>
|
|
</main>
|
|
|
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="consultDialogVisible"
|
|
|
|
|
+ title="在线咨询"
|
|
|
|
|
+ width="560px"
|
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
|
+ class="consult-dialog"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ ref="consultFormRef"
|
|
|
|
|
+ :model="consultForm"
|
|
|
|
|
+ :rules="consultRules"
|
|
|
|
|
+ label-position="top"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form-item label="问题描述" prop="description">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="consultForm.description"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ :rows="5"
|
|
|
|
|
+ maxlength="500"
|
|
|
|
|
+ show-word-limit
|
|
|
|
|
+ placeholder="请尽量描述清楚问题现象、操作步骤和报错信息"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="上传图片">
|
|
|
|
|
+ <el-upload
|
|
|
|
|
+ v-model:file-list="consultImages"
|
|
|
|
|
+ list-type="picture-card"
|
|
|
|
|
+ accept="image/*"
|
|
|
|
|
+ :limit="3"
|
|
|
|
|
+ :on-exceed="handleConsultExceed"
|
|
|
|
|
+ :before-upload="handleConsultBeforeUpload"
|
|
|
|
|
+ :on-remove="handleConsultRemove"
|
|
|
|
|
+ :auto-upload="false"
|
|
|
|
|
+ >
|
|
|
|
|
+ <Icon icon="mdi:plus" class="text-[22px] text-[#409eff]" />
|
|
|
|
|
+ </el-upload>
|
|
|
|
|
+ <div class="mt-2 text-[12px] text-[#8a9ab0]">
|
|
|
|
|
+ 最多 3 张,仅支持图片文件
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="flex justify-end gap-2">
|
|
|
|
|
+ <el-button @click="consultDialogVisible = false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="submitConsult">提交</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
<Footer />
|
|
<Footer />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { computed, onMounted, onUnmounted, ref } from "vue";
|
|
|
|
|
|
|
+import { computed, onMounted, onUnmounted, reactive, ref } from "vue";
|
|
|
import * as authUtil from "@/utils/auth";
|
|
import * as authUtil from "@/utils/auth";
|
|
|
import * as dd from "dingtalk-jsapi";
|
|
import * as dd from "dingtalk-jsapi";
|
|
|
import Header from "@components/home/header.vue";
|
|
import Header from "@components/home/header.vue";
|
|
@@ -299,7 +350,7 @@ import Footer from "@components/home/Footer.vue";
|
|
|
import { useRouter } from "vue-router";
|
|
import { useRouter } from "vue-router";
|
|
|
import axios from "axios";
|
|
import axios from "axios";
|
|
|
import { Icon } from "@iconify/vue";
|
|
import { Icon } from "@iconify/vue";
|
|
|
-import { ElLoading } from "element-plus";
|
|
|
|
|
|
|
+import { ElLoading, ElMessage, type UploadProps, type UploadUserFile } from "element-plus";
|
|
|
import {
|
|
import {
|
|
|
getMCSsoToken,
|
|
getMCSsoToken,
|
|
|
ssoLogin,
|
|
ssoLogin,
|
|
@@ -370,6 +421,54 @@ type NoticeItem = {
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
|
|
|
|
|
|
|
|
+const consultDialogVisible = ref(false);
|
|
|
|
|
+const consultFormRef = ref();
|
|
|
|
|
+const consultForm = reactive({
|
|
|
|
|
+ description: "",
|
|
|
|
|
+});
|
|
|
|
|
+const consultImages = ref<UploadUserFile[]>([]);
|
|
|
|
|
+const consultRules = {
|
|
|
|
|
+ description: [
|
|
|
|
|
+ { required: true, message: "请先填写问题描述", trigger: "blur" },
|
|
|
|
|
+ ],
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const openConsultDialog = () => {
|
|
|
|
|
+ consultDialogVisible.value = true;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const handleConsultBeforeUpload: UploadProps["beforeUpload"] = (file) => {
|
|
|
|
|
+ const isImage = file.type.startsWith("image/");
|
|
|
|
|
+ if (!isImage) {
|
|
|
|
|
+ ElMessage.error("仅支持上传图片文件");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ return true;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const handleConsultExceed: UploadProps["onExceed"] = () => {
|
|
|
|
|
+ ElMessage.warning("最多只能上传 3 张图片");
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const handleConsultRemove: UploadProps["onRemove"] = (_, fileList) => {
|
|
|
|
|
+ consultImages.value = fileList;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const resetConsultForm = () => {
|
|
|
|
|
+ consultForm.description = "";
|
|
|
|
|
+ consultImages.value = [];
|
|
|
|
|
+ consultFormRef.value?.resetFields?.();
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const submitConsult = async () => {
|
|
|
|
|
+ await consultFormRef.value?.validate(async (valid: boolean) => {
|
|
|
|
|
+ if (!valid) return;
|
|
|
|
|
+ ElMessage.success("咨询内容已提交");
|
|
|
|
|
+ consultDialogVisible.value = false;
|
|
|
|
|
+ resetConsultForm();
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const todoPanelTitle = "待办中心";
|
|
const todoPanelTitle = "待办中心";
|
|
|
const newsPanelTitle = "新闻中心";
|
|
const newsPanelTitle = "新闻中心";
|
|
|
const noticeTabs = [
|
|
const noticeTabs = [
|
|
@@ -392,17 +491,18 @@ const portalSections: PortalSection[] = [
|
|
|
active: true,
|
|
active: true,
|
|
|
},
|
|
},
|
|
|
{ label: "客户管理(CRM)", image: crmimage },
|
|
{ label: "客户管理(CRM)", image: crmimage },
|
|
|
|
|
+ { label: "经营驾驶舱(MC)", image: driveimage },
|
|
|
|
|
+ { label: "项目管理(PM)", image: pmimage },
|
|
|
|
|
+ { label: "开发需求管理", image: jishuimage2 },
|
|
|
|
|
+ { label: "鸿盘", image: hongpan },
|
|
|
{ label: "人力资源(EHR)", image: ehrimage },
|
|
{ label: "人力资源(EHR)", image: ehrimage },
|
|
|
{ label: "供应商管理(SRM)", image: scmimage },
|
|
{ label: "供应商管理(SRM)", image: scmimage },
|
|
|
{ label: "财务管理(FM)", image: erpimage },
|
|
{ label: "财务管理(FM)", image: erpimage },
|
|
|
- { label: "经营驾驶舱(MC)", image: driveimage },
|
|
|
|
|
- { label: "项目管理(PM)", image: pmimage },
|
|
|
|
|
- { label: "技术研发管理", image: jishuimage2 },
|
|
|
|
|
|
|
+
|
|
|
|
|
+ { label: "技术研发管理(R&D)", image: jishuimage2 },
|
|
|
{ label: "战略解码与执行", image: zhanlueimage },
|
|
{ label: "战略解码与执行", image: zhanlueimage },
|
|
|
{ label: "组织资产管理", image: zuzhiimage },
|
|
{ label: "组织资产管理", image: zuzhiimage },
|
|
|
{ label: "风控合规管理", image: safeimage },
|
|
{ label: "风控合规管理", image: safeimage },
|
|
|
- { label: "研发需求管理", image: jishuimage2 },
|
|
|
|
|
- { label: "鸿盘", image: hongpan },
|
|
|
|
|
],
|
|
],
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -416,10 +516,10 @@ const portalSections: PortalSection[] = [
|
|
|
{ label: "质量安全管理(QHSE)", image: qhseimage },
|
|
{ label: "质量安全管理(QHSE)", image: qhseimage },
|
|
|
{ label: "智慧连油", image: lianyouimage },
|
|
{ label: "智慧连油", image: lianyouimage },
|
|
|
{ label: "智慧注气", image: zhuqiimage },
|
|
{ label: "智慧注气", image: zhuqiimage },
|
|
|
|
|
+ { label: "视频中心(VCS)", image: videoimage },
|
|
|
{ label: "智能钻井", image: zuanjingimage },
|
|
{ label: "智能钻井", image: zuanjingimage },
|
|
|
{ label: "智慧压裂", image: yalieimage },
|
|
{ label: "智慧压裂", image: yalieimage },
|
|
|
{ label: "数字油藏", image: youimage },
|
|
{ label: "数字油藏", image: youimage },
|
|
|
- { label: "视频中心(VCS)", image: videoimage },
|
|
|
|
|
],
|
|
],
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -447,10 +547,11 @@ let boldLabes = ref([
|
|
|
"质量安全管理(QHSE)",
|
|
"质量安全管理(QHSE)",
|
|
|
"智慧注气",
|
|
"智慧注气",
|
|
|
"视频中心(VCS)",
|
|
"视频中心(VCS)",
|
|
|
- "研发需求管理",
|
|
|
|
|
|
|
+ "开发需求管理",
|
|
|
"经营驾驶舱(MC)",
|
|
"经营驾驶舱(MC)",
|
|
|
"项目管理(PM)",
|
|
"项目管理(PM)",
|
|
|
"鸿盘",
|
|
"鸿盘",
|
|
|
|
|
+ "智能钻井",
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
const getGreeting = () => {
|
|
const getGreeting = () => {
|
|
@@ -634,7 +735,7 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (app.label === "研发需求管理") {
|
|
|
|
|
|
|
+ if (app.label === "开发需求管理") {
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
const res = await zentaoSsoLogin({
|
|
const res = await zentaoSsoLogin({
|
|
|
username: userStore.getUser.username,
|
|
username: userStore.getUser.username,
|
|
@@ -650,6 +751,14 @@ const handlePortalAppClick = async (app: PortalApp) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (app.label === "智能钻井") {
|
|
|
|
|
+ if (userStore.getUser.username && getAccessToken()) {
|
|
|
|
|
+ window.open(`http://172.21.0.224:8001/#/login`, "_blank");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ router.push({ path: "/login" });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (app.label === "鸿盘") {
|
|
if (app.label === "鸿盘") {
|
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
if (userStore.getUser.username && getAccessToken()) {
|
|
|
window.open(`https://pan.keruioil.com:52180`, "_blank");
|
|
window.open(`https://pan.keruioil.com:52180`, "_blank");
|
|
@@ -1385,4 +1494,24 @@ onUnmounted(() => {
|
|
|
transition: all 0.3s ease;
|
|
transition: all 0.3s ease;
|
|
|
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
|
|
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.consult-dialog :deep(.el-dialog__header) {
|
|
|
|
|
+ margin-right: 0;
|
|
|
|
|
+ padding-bottom: 12px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.consult-dialog :deep(.el-dialog__body) {
|
|
|
|
|
+ padding-top: 8px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.consult-dialog :deep(.el-upload--picture-card) {
|
|
|
|
|
+ --el-upload-picture-card-size: 92px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+@media (max-width: 640px) {
|
|
|
|
|
+ .consult-dialog :deep(.el-dialog) {
|
|
|
|
|
+ width: calc(100vw - 24px) !important;
|
|
|
|
|
+ margin-top: 8vh !important;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|