Browse Source

添加首页成果添加

zs 1 year ago
parent
commit
8fd85bad2f

+ 120 - 52
src/views/center/index.vue

@@ -2,56 +2,108 @@
   <div id="index">
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-        <div class="w_1200">
-          <el-form
-            ref="ruleFormRef"
-            :model="form"
-            :rules="rules"
-            label-width="80px"
-            class="form"
-            label-position="left"
-          >
-            <el-form-item label="账号" prop="account">
-              <el-input v-model="form.account" placeholder="请输入账号">
-                <template #prefix>
-                  <el-icon>
-                    <User />
-                  </el-icon>
-                </template>
-              </el-input>
-            </el-form-item>
-            <el-form-item label="昵称" prop="nick_name">
-              <el-input v-model="form.nick_name" placeholder="请输入昵称">
-                <template #prefix>
-                  <el-icon>
-                    <Avatar />
-                  </el-icon>
-                </template>
-              </el-input>
-            </el-form-item>
-            <el-form-item label="性别" prop="gender">
-              <el-select v-model="form.gender" placeholder="请选择性别">
-                <el-option
-                  v-for="(item, index) in genderList"
-                  :key="index"
-                  :label="item.label"
-                  :value="item.value"
-                />
-              </el-select>
-            </el-form-item>
-            <el-form-item label="手机号" prop="phone">
-              <el-input v-model="form.phone" placeholder="请输入手机号">
-                <template #prefix>
-                  <el-icon>
-                    <Iphone />
-                  </el-icon>
-                </template>
-              </el-input>
-            </el-form-item>
-            <el-col :span="24" class="button">
-              <el-button type="primary" @click="submitForm(ruleFormRef)">保存</el-button>
-            </el-col>
-          </el-form>
+        <div class="w_1200 one">
+          <el-col :span="24" class="one_1"> 基本信息</el-col>
+          <el-col :span="24" class="one_2">
+            <el-form
+              label-position="top"
+              ref="ruleFormRef"
+              :model="form"
+              :rules="rules"
+              label-width="80px"
+              class="form"
+            >
+              <el-form-item label="账号" prop="account">
+                <el-input v-model="form.account" placeholder="请输入账号">
+                  <template #prefix>
+                    <el-icon>
+                      <User />
+                    </el-icon>
+                  </template>
+                </el-input>
+              </el-form-item>
+              <el-form-item label="昵称" prop="nick_name">
+                <el-input v-model="form.nick_name" placeholder="请输入昵称">
+                  <template #prefix>
+                    <el-icon>
+                      <Avatar />
+                    </el-icon>
+                  </template>
+                </el-input>
+              </el-form-item>
+              <el-form-item label="性别" prop="gender">
+                <el-select v-model="form.gender" width="100%" placeholder="请选择性别">
+                  <el-option
+                    v-for="(item, index) in genderList"
+                    :key="index"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="手机号" prop="phone">
+                <el-input v-model="form.phone" placeholder="请输入手机号">
+                  <template #prefix>
+                    <el-icon>
+                      <Iphone />
+                    </el-icon>
+                  </template>
+                </el-input>
+              </el-form-item>
+            </el-form>
+          </el-col>
+          <el-col :span="24" class="one_1"> 个人基本资料</el-col>
+          <el-col :span="24" class="one_2">
+            <el-form
+              ref="ruleFormRef"
+              :model="form"
+              :rules="rules"
+              label-width="80px"
+              class="form"
+              label-position="top"
+            >
+              <el-form-item label="账号" prop="account">
+                <el-input v-model="form.account" placeholder="请输入账号">
+                  <template #prefix>
+                    <el-icon>
+                      <User />
+                    </el-icon>
+                  </template>
+                </el-input>
+              </el-form-item>
+              <el-form-item label="昵称" prop="nick_name">
+                <el-input v-model="form.nick_name" placeholder="请输入昵称">
+                  <template #prefix>
+                    <el-icon>
+                      <Avatar />
+                    </el-icon>
+                  </template>
+                </el-input>
+              </el-form-item>
+              <el-form-item label="性别" prop="gender">
+                <el-select v-model="form.gender" placeholder="请选择性别">
+                  <el-option
+                    v-for="(item, index) in genderList"
+                    :key="index"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="手机号" prop="phone">
+                <el-input v-model="form.phone" placeholder="请输入手机号">
+                  <template #prefix>
+                    <el-icon>
+                      <Iphone />
+                    </el-icon>
+                  </template>
+                </el-input>
+              </el-form-item>
+            </el-form>
+          </el-col>
+          <el-col :span="24" class="button">
+            <el-button type="primary" @click="submitForm(ruleFormRef)">保存</el-button>
+          </el-col>
         </div>
       </el-col>
     </el-row>
@@ -90,9 +142,25 @@ const search = async () => {}
 </script>
 <style scoped lang="scss">
 .main {
+  background-color: #f1f2f5;
   padding: 20px;
-  .button {
-    text-align: center;
+  .one {
+    background-color: #fff;
+    padding: 20px;
+    border-radius: 10px;
+    .one_1 {
+      line-height: 20px;
+      font-size: 16px;
+      font-weight: 500;
+      border-bottom: 1px solid #f9f9f9;
+      padding: 10px 0;
+    }
+    .one_2 {
+      padding: 10px;
+    }
+    .button {
+      text-align: center;
+    }
   }
 }
 </style>

+ 1 - 1
src/views/chat/index.vue

@@ -91,7 +91,7 @@ const route = useRoute()
 const loading = ref(false)
 // 是否弹框客服
 const dialog = ref(false)
-const _id = ref('')
+const _id = ref(route.query.id || '')
 const chatList = ref([
   { _id: '1', url: kf, name: '新浪微博', content: '内容', type: '0', time: '2024-03-30' },
   { _id: '2', url: kf, name: '新浪微博', content: '内容', type: '0', time: '2024-03-30' },

+ 3 - 3
src/views/chat/parts/chat.vue

@@ -66,7 +66,7 @@ const info = inject('info')
       position: sticky;
       top: 0;
       background: #eee;
-      z-index: 9999;
+      z-index: 1;
       height: 50px;
       box-sizing: border-box;
       line-height: 50px;
@@ -80,7 +80,7 @@ const info = inject('info')
       color: grey;
     }
     .Main {
-      height: 53vh;
+      height: 52vh;
       .list {
         .time {
           width: 100%;
@@ -146,7 +146,7 @@ const info = inject('info')
         .input {
           color: #333;
           width: 100%;
-          height: 85px;
+          height: 80px;
           display: block;
           box-sizing: border-box;
           padding: 0 8px 0 17px;

+ 2 - 5
src/views/help/index.vue

@@ -15,10 +15,7 @@
             </el-col>
             <el-col v-if="select === '1'" :span="18" class="right">
               <h2>关于我们</h2>
-              <el-col :span="24" class="other">
-                吉林省重点领域技术转移平台是全国最早开设的大型常设网上技术交易市场,为我国探索网上技术交易提供了大量的“浙江经验”。
-                吉林省重点领域技术转移平台3.0版按照全要素聚集、全链条服务、全球化生态的规划思路升级建设,将打造统一的科技成果交易体系、服务体系、统计监测分析体系,构建线上线下、有形无形、国际国内一体化的技术市场体系,形成“招拍挂、股改投”联动的技术交易模式和辐射全国、链接全球的技术交易生态。
-              </el-col>
+              <el-col :span="24" class="other"> 关于我们 </el-col>
             </el-col>
             <el-col v-else-if="select === '2'" :span="18" class="right">意见反馈</el-col>
             <el-col v-else-if="select === '3'" :span="18" class="right">
@@ -106,7 +103,7 @@ const onOpenChange = (item) => {
 .main {
   .help {
     padding: 10px 0;
-    min-height: 490px;
+    min-height: 650px;
 
     .left {
       display: flex;

+ 139 - 4
src/views/home/index.vue

@@ -213,6 +213,61 @@
               </el-col>
             </el-col>
           </el-col>
+          <el-col :span="24" class="one">
+            <el-col :span="24" class="one_1">
+              <el-col :span="12" class="left">汇聚各类优质的成果</el-col>
+              <el-col :span="12" class="right" @click="selectMenu('achievement')"
+                >查看更多成果</el-col
+              >
+            </el-col>
+            <el-col :span="24" class="one_6">
+              <el-col :span="10" class="left">
+                <vue3-seamless-scroll
+                  :list="achievementList"
+                  :hover="true"
+                  :step="0.5"
+                  :wheel="true"
+                  :isWatch="true"
+                >
+                  <el-col
+                    :span="24"
+                    class="list"
+                    v-for="(item, index) in achievementList"
+                    :key="index"
+                    @click="toView(item, '4')"
+                  >
+                    <el-col :span="1">
+                      <div class="i"></div>
+                    </el-col>
+                    <el-col :span="16" class="content textOver">
+                      <el-tooltip effect="dark" :content="item.name" placement="top">
+                        {{ item.name || '暂无名称' }}
+                      </el-tooltip>
+                    </el-col>
+                    <el-col :span="7" class="other textOver">
+                      {{ getDict(item.field || '暂无技术领域', 'field') }}
+                    </el-col>
+                  </el-col>
+                </vue3-seamless-scroll>
+              </el-col>
+              <el-col :span="14" class="right">
+                <el-col :span="24" class="right_1">
+                  <BuildTwoTone /> <span>热门技术领域</span>
+                </el-col>
+                <div class="right_2">
+                  <div
+                    class="list"
+                    v-for="(item, index) in fieldList"
+                    :key="index"
+                    @click="selectMenu('achievement')"
+                  >
+                    <RocketTwoTone />
+                    <span class="textOver">{{ item.label }}</span>
+                  </div>
+                </div>
+              </el-col>
+            </el-col>
+          </el-col>
         </div>
       </el-col>
     </el-row>
@@ -224,14 +279,16 @@ import moment from 'moment'
 const $checkRes = inject('$checkRes')
 import { get } from 'lodash-es'
 const selectMenu = inject('selectMenu')
-import { SearchOutlined } from '@ant-design/icons-vue'
+import { SearchOutlined, RocketTwoTone, BuildTwoTone } from '@ant-design/icons-vue'
 // 接口
 import { DictDataStore } from '@/store/api/system/dictData'
 import { ProjectStore } from '@/store/api/platform/project'
+import { AchievementStore } from '@/store/api/platform/achievement'
 import { NewsStore } from '@/store/api/platform/news'
 const newsStore = NewsStore()
 const store = ProjectStore()
 const dictDataStore = DictDataStore()
+const achievementStore = AchievementStore()
 // 路由
 const router = useRouter()
 // 图片引入
@@ -275,7 +332,9 @@ const projectList = ref([])
 const maturityList = ref([])
 const industryList = ref([])
 const statusList = ref([])
-
+const fieldList = ref([])
+// 成果
+const achievementList = ref([])
 // 专家
 const exportList = ref([
   {
@@ -481,6 +540,7 @@ onMounted(async () => {
   await searchOther()
   await search(active.value)
   await searchNews()
+  await searchAchieve()
   loading.value = false
 })
 const searchOther = async () => {
@@ -497,6 +557,9 @@ const searchOther = async () => {
   // 企业状态
   result = await dictDataStore.query({ code: 'companyStatus', is_use: '0' })
   if ($checkRes(result)) statusList.value = result.data
+  // 技术领域
+  result = await dictDataStore.query({ code: 'field', is_use: '0' })
+  if ($checkRes(result)) fieldList.value = result.data
 }
 const search = async (active) => {
   const info = {
@@ -509,17 +572,26 @@ const search = async (active) => {
   const res = await store.query(info)
   if (res.errcode == '0') list.value = res.data
 }
-const searchNews = async (active) => {
+const searchNews = async () => {
   const info = {
     skip: 0,
     limit: 6,
     is_use: '0',
     status: '1'
   }
-  if (active) info.type = active
   const res = await newsStore.query(info)
   if (res.errcode == '0') newsList.value = res.data
 }
+const searchAchieve = async () => {
+  const info = {
+    skip: 0,
+    limit: 10,
+    is_use: '0',
+    status: '1'
+  }
+  const res = await achievementStore.query(info)
+  if (res.errcode == '0') achievementList.value = res.data
+}
 // 字典数据转换
 const getDict = (data, model) => {
   let res
@@ -527,6 +599,7 @@ const getDict = (data, model) => {
   else if (model == 'maturity') res = maturityList.value.find((f) => f.value == data)
   else if (model == 'type') res = industryList.value.find((f) => f.value == data)
   else if (model == 'status') res = statusList.value.find((f) => f.value == data)
+  else if (model == 'field') res = fieldList.value.find((f) => f.value == data)
   return get(res, 'label')
 }
 // 地区显示
@@ -539,6 +612,8 @@ const toView = (item, type) => {
   else if (type == '1') router.push({ path: '/expert/detail', query: { id: item.id || item._id } })
   else if (type == '2') router.push({ path: '/company/detail', query: { id: item.id || item._id } })
   else if (type == '3') router.push({ path: '/news/detail', query: { id: item.id || item._id } })
+  else if (type == '4')
+    router.push({ path: '/achievement/detail', query: { id: item.id || item._id } })
 }
 // 类型
 const mouseOver = async (item) => {
@@ -904,6 +979,66 @@ const toChat = (item) => {
         }
       }
     }
+    .one_6 {
+      display: flex;
+      padding: 20px 22px;
+      background-color: #fbfcfd;
+      .left {
+        max-height: 300px;
+        overflow: hidden;
+        .list {
+          display: flex;
+          align-items: center;
+          height: 34px;
+          font-size: 14px;
+          .i {
+            display: inline-block;
+            vertical-align: middle;
+            margin-right: 10px;
+            width: 6px;
+            height: 6px;
+            background-color: #8ab7f1;
+            border-radius: 50%;
+          }
+          .other {
+            color: #145ca4;
+            text-align: center;
+          }
+        }
+      }
+      .right {
+        font-size: 16px;
+        .right_1 {
+          padding: 10px 30px;
+          span {
+            margin: 0 5px 0 0;
+          }
+        }
+        .right_2 {
+          display: flex;
+          justify-content: center;
+          flex-wrap: wrap;
+          margin: 10px 0 0 0;
+          .list {
+            display: flex;
+            align-items: center;
+            margin: 0 0 10px 10px;
+            padding-left: 15px;
+            width: 200px;
+            height: 50px;
+            line-height: 53px;
+            background-color: #eaeff7;
+            span {
+              margin: 0 5px 0 0;
+            }
+          }
+          .list:hover {
+            color: #2e70f1;
+            box-shadow: 0 0 10px 0 rgba(0, 69, 183, 0.3);
+          }
+        }
+      }
+    }
   }
 }
 </style>