Ver código fonte

样式修改

yanghao 4 dias atrás
pai
commit
f56f72d273

+ 2 - 0
components.d.ts

@@ -17,6 +17,7 @@ declare module 'vue' {
     ElButton: typeof import('element-plus/es')['ElButton']
     ElCard: typeof import('element-plus/es')['ElCard']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
+    ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
     ElDropdown: typeof import('element-plus/es')['ElDropdown']
     ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
@@ -35,6 +36,7 @@ declare module 'vue' {
     ElTabPane: typeof import('element-plus/es')['ElTabPane']
     ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']
+    ElUpload: typeof import('element-plus/es')['ElUpload']
     Footer: typeof import('./src/components/home/Footer.vue')['default']
     Header: typeof import('./src/components/home/header.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']

+ 2 - 2
src/components/home/header.vue

@@ -3,7 +3,7 @@
     class="fixed w-full top-0 z-100 bg-white border-b border-[#f0f2f5] shadow-sm"
   >
     <div
-      class="max-w-[1200px] mx-auto flex items-center justify-between px-5 h-15"
+      class="max-w-[1400px] mx-auto flex items-center justify-between px-5 h-15"
     >
       <div class="flex items-center gap-2 cursor-pointer" @click="goHome">
         <img :src="logo" alt="logo" class="w-9 h-9 rounded-md" />
@@ -17,7 +17,7 @@
         >
       </div>
 
-      <nav class="hidden lg:flex flex-1 mx-4 ml-80 text-sm">
+      <nav class="hidden lg:flex flex-1 mx-4 ml-150 text-sm">
         <ul class="flex items-center gap-6 text-[#303133] text-md">
           <!-- 首页 -->
           <li>

+ 26 - 0
src/views/drive/index.vue

@@ -81,6 +81,32 @@ const driveCards: DriveCard[] = [
     url: "https://report.deepoil.cc/webroot/decision/v10/entry/access/e836fb5b-092c-4d64-a324-3beeb4fac0cc?preview=true&page_number=1",
     bgColor: "#ca8a04",
   },
+
+  {
+    title: "供应链驾驶舱",
+    description: "查看供应链分析、物料需求与执行。",
+    icon: "mdi:shield-check",
+    url: "#",
+    bgColor: "#7c3aed",
+  },
+
+  // 市场驾驶舱
+  {
+    title: "市场驾驶舱",
+    description: "查看市场分析、销售数据与执行情况。",
+    icon: "mdi:chart-line",
+    url: "#",
+    bgColor: "#16a34a",
+  },
+
+  // QHSE驾驶舱
+  {
+    title: "QHSE驾驶舱",
+    description: "查看安全、健康、环境与质量数据。",
+    icon: "mdi:shield-alert",
+    url: "#",
+    bgColor: "#dc2626",
+  },
 ];
 
 const openDrive = async (option: DriveCard) => {

+ 3 - 3
src/views/flow/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="ehr-page">
     <Header />
-    <section class="hero max-w-[1300px] mx-auto">
+    <section class="hero max-w-[1400px] mx-auto">
       <div class="hero-inner">
         <!-- 判断上下午 -->
         <h1 class="hero-title">
@@ -15,7 +15,7 @@
     </section>
 
     <!-- 任务统计 -->
-    <section class="total max-w-[1300px] mx-auto">
+    <section class="total max-w-[1400px] mx-auto">
       <div class="total-card" v-for="(item, index) in stats" :key="index">
         <el-popover
           placement="top"
@@ -64,7 +64,7 @@
       </div>
     </section>
 
-    <div class="content max-w-[1300px] mx-auto">
+    <div class="content max-w-[1400px] mx-auto">
       <div class="search-bar">
         <div class="search-input">
           <Icon icon="mdi:magnify" class="search-icon" />

+ 144 - 15
src/views/index.vue

@@ -2,7 +2,7 @@
   <div class="portal-home min-h-screen bg-[#eef3f9] text-[#17345f]">
     <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">
         <div class="">
           <!-- 轮播容器 -->
@@ -267,16 +267,16 @@
           </section>
 
           <section
+            v-if="userStore.getUser.username"
             class="side-card side-card--placeholder rounded-md"
             :style="{ minHeight: '78px', backgroundColor: '#3575e4' }"
           >
             <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
                 class="bg-white text-sm text-center text-[#004098] py-1 px-2 rounded-full mt-2 w-[30%] cursor-pointer"
+                @click="openConsultDialog"
               >
                 立即咨询
               </div>
@@ -286,12 +286,63 @@
       </section>
     </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 />
   </div>
 </template>
 
 <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 dd from "dingtalk-jsapi";
 import Header from "@components/home/header.vue";
@@ -299,7 +350,7 @@ import Footer from "@components/home/Footer.vue";
 import { useRouter } from "vue-router";
 import axios from "axios";
 import { Icon } from "@iconify/vue";
-import { ElLoading } from "element-plus";
+import { ElLoading, ElMessage, type UploadProps, type UploadUserFile } from "element-plus";
 import {
   getMCSsoToken,
   ssoLogin,
@@ -370,6 +421,54 @@ type NoticeItem = {
 const router = useRouter();
 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 newsPanelTitle = "新闻中心";
 const noticeTabs = [
@@ -392,17 +491,18 @@ const portalSections: PortalSection[] = [
         active: true,
       },
       { label: "客户管理(CRM)", image: crmimage },
+      { label: "经营驾驶舱(MC)", image: driveimage },
+      { label: "项目管理(PM)", image: pmimage },
+      { label: "开发需求管理", image: jishuimage2 },
+      { label: "鸿盘", image: hongpan },
       { label: "人力资源(EHR)", image: ehrimage },
       { label: "供应商管理(SRM)", image: scmimage },
       { 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: zuzhiimage },
       { label: "风控合规管理", image: safeimage },
-      { label: "研发需求管理", image: jishuimage2 },
-      { label: "鸿盘", image: hongpan },
     ],
   },
   {
@@ -416,10 +516,10 @@ const portalSections: PortalSection[] = [
       { label: "质量安全管理(QHSE)", image: qhseimage },
       { label: "智慧连油", image: lianyouimage },
       { label: "智慧注气", image: zhuqiimage },
+      { label: "视频中心(VCS)", image: videoimage },
       { label: "智能钻井", image: zuanjingimage },
       { label: "智慧压裂", image: yalieimage },
       { label: "数字油藏", image: youimage },
-      { label: "视频中心(VCS)", image: videoimage },
     ],
   },
   {
@@ -447,10 +547,11 @@ let boldLabes = ref([
   "质量安全管理(QHSE)",
   "智慧注气",
   "视频中心(VCS)",
-  "发需求管理",
+  "发需求管理",
   "经营驾驶舱(MC)",
   "项目管理(PM)",
   "鸿盘",
+  "智能钻井",
 ]);
 
 const getGreeting = () => {
@@ -634,7 +735,7 @@ const handlePortalAppClick = async (app: PortalApp) => {
     }
   }
 
-  if (app.label === "发需求管理") {
+  if (app.label === "发需求管理") {
     if (userStore.getUser.username && getAccessToken()) {
       const res = await zentaoSsoLogin({
         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 (userStore.getUser.username && getAccessToken()) {
       window.open(`https://pan.keruioil.com:52180`, "_blank");
@@ -1385,4 +1494,24 @@ onUnmounted(() => {
   transition: all 0.3s ease;
   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>

+ 2 - 2
src/views/login.vue

@@ -21,7 +21,7 @@
         <h1 class="text-2xl font-bold text-center">登录</h1>
 
         <!-- 用户名密码登陆 -->
-        <!-- <div>
+        <div>
           <el-form
             :model="form"
             :rules="rules"
@@ -62,7 +62,7 @@
               >
             </div>
           </div>
-        </div> -->
+        </div>
 
         <!-- 钉钉登陆 -->
         <div class="text-center">

+ 22 - 1
src/views/news/index.vue

@@ -3,7 +3,23 @@
     <Header />
 
     <div class="content-wrapper mt-15 max-w-[1200px] mx-auto">
-      <h2 class="page-title">新闻中心</h2>
+      <h2 class="page-title">
+        新闻中心
+
+        <el-button
+          type="primary"
+          round
+          size="small"
+          color="#02409b"
+          @click="router.back()"
+          ><Icon
+            icon="mynaui:corner-up-left"
+            class="icon pr-1"
+            width="20"
+            height="20"
+          />返回</el-button
+        >
+      </h2>
 
       <!-- 新闻列表区域 - 使用 el-table -->
       <div v-loading="loading" class="table-wrapper">
@@ -86,9 +102,12 @@ import { ref, reactive, onMounted } from "vue";
 import Header from "@components/home/header.vue";
 import Footer from "@components/home/Footer.vue";
 import { ElLoading } from "element-plus";
+import { Icon } from "@iconify/vue";
 import { getNews, ssoLogin } from "@/api/user";
 import { useUserStore } from "@/stores/useUserStore";
+import { useRouter } from "vue-router";
 const userStore = useUserStore();
+const router = useRouter();
 // 状态定义
 const loading = ref(false);
 const newsList = ref([]);
@@ -212,6 +231,8 @@ onMounted(() => {
   color: #303133;
   border-left: 5px solid #409eff;
   padding-left: 10px;
+  display: flex;
+  gap: 20px;
 }
 
 .table-wrapper {

+ 19 - 1
src/views/notices/index.vue

@@ -5,6 +5,20 @@
     <div class="content-wrapper mt-15 max-w-[1200px] mx-auto">
       <h2 class="page-title">
         {{ route.query.tabKey === "notice" ? "通知公告" : "红头文件" }}
+
+        <el-button
+          type="primary"
+          round
+          size="small"
+          color="#02409b"
+          @click="router.back()"
+          ><Icon
+            icon="mynaui:corner-up-left"
+            class="icon pr-1"
+            width="20"
+            height="20"
+          />返回</el-button
+        >
       </h2>
 
       <!-- 新闻列表区域 - 使用 el-table -->
@@ -88,11 +102,13 @@ import { ref, reactive, onMounted } from "vue";
 import Header from "@components/home/header.vue";
 import Footer from "@components/home/Footer.vue";
 import { ElLoading } from "element-plus";
+import { Icon } from "@iconify/vue";
 import { getNews, ssoLogin, getNotices, getRedHeadFiles } from "@/api/user";
 import { useUserStore } from "@/stores/useUserStore";
-import { useRoute } from "vue-router";
+import { useRoute, useRouter } from "vue-router";
 const userStore = useUserStore();
 const route = useRoute();
+const router = useRouter();
 // 状态定义
 const loading = ref(false);
 const newsList = ref([]);
@@ -218,6 +234,8 @@ onMounted(() => {
   color: #303133;
   border-left: 5px solid #409eff;
   padding-left: 10px;
+  display: flex;
+  gap: 20px;
 }
 
 .table-wrapper {