소스 검색

v2完整版

Tang 2 년 전
부모
커밋
fbb3952065

+ 35 - 0
src/api/XfSysBussiness.js

@@ -277,4 +277,39 @@ export default {
             tokenName
         })
     },
+    //获取通知活动列表
+    XfSysBussinessGetActivityList(data) {
+        return request({
+            url: '/api/XfSysBussiness/GetActivityList',
+            method: 'get',
+            params: data,
+            tokenName
+        })
+    },
+    //通知活动详情
+    XfSysBussinessGetActivity(data) {
+        return request({
+            url: '/api/XfSysBussiness/GetActivity/' + data,
+            method: 'get',
+            tokenName
+        })
+    },
+    //保存通知活动以及发送会员
+    XfSysBussinessSaveActivityDetail(data) {
+        return request({
+            url: '/api/XfSysBussiness/SaveActivityDetail',
+            method: 'post',
+            data: data,
+            tokenName
+        })
+    },
+    //重发邮件
+    XfSysBussinessResendActivityMember(data) {
+        return request({
+            url: '/api/XfSysBussiness/ResendActivityMember',
+            method: 'post',
+            data: data,
+            tokenName
+        })
+    },
 }

BIN
src/assets/images/BG-1@2x.png


BIN
src/assets/images/BG_01@2x.png


BIN
src/assets/images/BG_db@2x.png


BIN
src/assets/images/Rectangle158@2x.png


BIN
src/assets/images/banner-01.jpg


BIN
src/assets/images/icon_hytd@2x.png


BIN
src/assets/images/icon_pxjd@2x.png


BIN
src/assets/images/icon_xhqk@2x.png


BIN
src/assets/images/icon_zjzk@2x.png


BIN
src/assets/images/zxzx@2x.png


+ 1 - 0
src/components/Scroller/index.vue

@@ -39,6 +39,7 @@ export default {
 .ul_style {
   display: flex;
   align-items: center;
+  word-break: keep-all;
   animation: ulAnimation 60s linear infinite;
   .li_style {
     font-size: 14px;

+ 52 - 20
src/components/nav-tab/index.vue

@@ -8,7 +8,7 @@
           class="el-menu-demo"
           mode="horizontal"
           @select="handleSelect"
-          background-color="#c9001f"
+          background-color="#3975C6"
           text-color="#fff"
           active-text-color="#fff"
           router
@@ -36,22 +36,45 @@
               :index="`menuList?ParentId=${item.ParentId}&MenuId=${item.MenuId}`"
             >
               <template slot="title">{{ item.Name }}</template>
-              <el-menu-item
-                v-for="(items, indexs) in item.ChildList"
-                :key="indexs"
-                :index="
-                  items.WebUrl
-                    ? null
-                    : `menuList?ParentId=${items.ParentId}&MenuId=${items.MenuId}`
-                "
-                ><a
-                  v-if="items.WebUrl"
-                  :href="items.WebUrl"
-                  target="_blank"
-                  style="color: #fff; display: block"
-                  >{{ items.Name }}</a
-                ><span v-else>{{ items.Name }}</span></el-menu-item
-              >
+              <template v-for="(items, indexs) in item.ChildList">
+                <el-menu-item
+                  v-if="items.Type === 2"
+                  :key="indexs"
+                  :index="
+                    items.WebUrl
+                      ? null
+                      : `menuList?ParentId=${items.ParentId}&MenuId=${items.MenuId}`
+                  "
+                  ><a
+                    v-if="items.WebUrl"
+                    :href="items.WebUrl"
+                    target="_blank"
+                    style="color: #fff; display: block"
+                    >{{ items.Name }}</a
+                  ><span v-else>{{ items.Name }}</span></el-menu-item
+                ><el-submenu
+                  v-else
+                  :index="`menuList?ParentId=${items.ParentId}&MenuId=${items.MenuId}`"
+                >
+                  <template slot="title">{{ items.Name }}</template>
+                  <template v-for="(itemsxt, indexsxt) in items.ChildList">
+                    <el-menu-item
+                      :index="
+                        itemsxt.WebUrl
+                          ? null
+                          : `menuList?ParentId=${itemsxt.ParentId}&MenuId=${itemsxt.MenuId}`
+                      "
+                      ><a
+                        v-if="itemsxt.WebUrl"
+                        :href="itemsxt.WebUrl"
+                        target="_blank"
+                        style="color: #fff; display: block"
+                        >{{ itemsxt.Name }}</a
+                      ><span v-else>{{ itemsxt.Name }}</span></el-menu-item
+                    >
+                  </template>
+                </el-submenu>
+              </template>
             </el-submenu>
           </template>
         </el-menu>
@@ -131,8 +154,17 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-::v-deep .el-menu-item,
-::v-deep .el-submenu__title {
+// ::v-deep .el-menu-item,
+// ::v-deep .el-submenu__title {
+//   font-size: 20px;
+// }
+::v-deep .el-menu-item *{
+  vertical-align: unset;
+}
+::v-deep .el-submenu > .el-submenu__title{
+  font-size: 20px;
+}
+.el-menu--horizontal > .el-menu-item{
   font-size: 20px;
 }
 ::v-deep .el-menu.el-menu--horizontal {
@@ -166,7 +198,7 @@ export default {
 }
 .navbar {
   font-size: 20px;
-  background-color: #c9001f;
+  background-color: #3975c6;
   & > .nav_box {
     height: 60px;
     display: flex;

+ 3 - 2
src/components/top-header/index.vue

@@ -135,6 +135,7 @@ export default {
   margin: 0 auto;
 }
 .dis_just {
+  font-size: 14px;
   padding-top: 28px;
   padding-bottom: 28px;
   display: flex;
@@ -162,14 +163,14 @@ export default {
     align-items: center;
     & > .input_x {
       padding: 11px;
-      border: 1px solid #c9001f;
+      border: 1px solid #3975C6;
       height: 40px;
       line-height: 40px;
     }
     & > .btn {
       width: 52px;
       height: 40px;
-      background-color: #c9001f;
+      background-color: #3975C6;
       display: flex;
       justify-content: center;
       align-items: center;

+ 2 - 1
src/utils/element.js

@@ -1,7 +1,7 @@
 import Vue from 'vue';
 import {
   Button, Menu, Submenu, MenuItem, MenuItemGroup, Carousel, CarouselItem, Tabs, TabPane, Pagination, Backtop, Breadcrumb, BreadcrumbItem, Empty, Dialog, Form, FormItem, Input, Message, MessageBox, Tooltip
-  , Table, TableColumn, RadioGroup, Radio, Col, Row, InputNumber, Tree, Dropdown, DropdownMenu, DropdownItem, Checkbox, Select, Option, Upload, DatePicker, Loading,Cascader,Image
+  , Table, TableColumn, RadioGroup,Main, Radio, Col, Row, InputNumber, Tree, Dropdown, DropdownMenu, DropdownItem, Checkbox, Select, Option, Upload, DatePicker, Loading,Cascader,Image
 } from 'element-ui';
 
 Vue.use(Button);
@@ -43,6 +43,7 @@ Vue.use(Loading);
 Vue.use(Loading.directive);
 Vue.use(Cascader)
 Vue.use(Image)
+Vue.use(Main)
 
 Vue.prototype.$message = Message;
 Vue.prototype.$confirm = MessageBox.confirm;

+ 4 - 2
src/utils/request.js

@@ -6,8 +6,10 @@ import { set } from 'nprogress'
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
-export const BASE_URL = 'http://xfxh.gdzzkj.net/'
-export const BASE_IMG_URL = 'http://xfxh.gdzzkj.net'
+export const BASE_URL = 'http://gzxfxh.gdzzkj.net/'
+export const BASE_IMG_URL = 'http://gzxfxh.gdzzkj.net'
+// export const BASE_URL = 'http://192.168.1.28:8032/'
+// export const BASE_IMG_URL = 'http://192.168.1.28:8032'
 // export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 
 const service = axios.create({

+ 5 - 0
src/views/System/contentSet/article/index.vue

@@ -188,6 +188,11 @@ export default {
       this.$api
         .XfSysBussinessGetNewsDetail({ newsid: item.NewsId })
         .then((res) => {
+          if (res.Data.CreateTime) {
+            res.Data.CreateTime = this.$methods.onlyFormaHao(
+              res.Data.CreateTime
+            );
+          }
           this.$refs.operation.showInit(res.Data);
         });
     },

+ 16 - 2
src/views/System/contentSet/article/operation.vue

@@ -77,6 +77,18 @@
               </el-radio-group></el-form-item
             >
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="创建时间" prop="CreateTime">
+              <el-date-picker
+                v-model="ruleForm.CreateTime"
+                type="datetime"
+                placeholder="选择创建日期时间"
+                format="yyyy-MM-dd HH:mm:ss"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker
+            ></el-form-item>
+          </el-col>
 
           <el-col :span="24">
             <el-form-item label="文章内容" prop="NewContent">
@@ -116,6 +128,7 @@ export default {
         Status: 1,
         MenuId: "",
         ImageUrl: "",
+        CreateTime: "",
       },
       rules: {
         Title: [{ required: true, message: "请输入标题", trigger: "blur" }],
@@ -145,6 +158,7 @@ export default {
           Status: 1,
           ImageUrl: "",
           MenuId: "",
+          CreateTime: "",
         };
       }
       this.dialogVisible = true;
@@ -155,8 +169,8 @@ export default {
       if (file === undefined) {
         return;
       }
-      if (file.size > 0.3 * 1024 * 1024) {
-        self.$message.error("图片不得大于300kb");
+      if (file.size > 0.6 * 1024 * 1024) {
+        self.$message.error("图片不得大于600kb");
         return;
       }
       var type = e.target.value.toLowerCase().split(".").splice(-1);

+ 115 - 0
src/views/System/vip/notice/index.vue

@@ -0,0 +1,115 @@
+<template>
+  <div id="">
+    <Search
+      ref="search"
+      :formList="formList"
+      :formData="formData"
+      @onSubmit="search"
+    ></Search>
+    <div style="text-align: right; margin-bottom: 10px">
+      <el-button :size="$store.state.defaultSize" @click="add" type="primary"
+        >新增</el-button
+      >
+    </div>
+    <Table
+      ref="table"
+      :tableData="tableData"
+      :tableList="tableList"
+      :rowKey="'ActivityId'"
+    >
+      <template #right="scope"
+        ><el-button @click="edit(scope.row)" type="text" size="small"
+          >详情</el-button
+        >
+        <el-button @click="again(scope.row)" type="text" size="small"
+          >重发</el-button
+        >
+      </template>
+    </Table>
+    <Pagination
+      :pageindex="formData.pageindex"
+      :pagesize="formData.pagesize"
+      :total="total"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    ></Pagination>
+    <Operation ref="operation"></Operation>
+  </div>
+</template>
+
+<script>
+import Search from "@/components/search/index.vue";
+import Table from "@/components/table/index.vue";
+import Operation from "./operation.vue";
+import Pagination from "@/components/pagination/index.vue";
+export default {
+  components: { Search, Table, Pagination, Operation },
+  data() {
+    return {
+      formList: [
+        {
+          label: "标题:",
+          prop: "Title",
+        },
+      ],
+      formData: { pageindex: 1, pagesize: 10 },
+      tableData: [],
+      tableList: [
+        {
+          label: "编号",
+          prop: "ActivityId",
+        },
+        {
+          label: "标题",
+          prop: "Title",
+        },
+        {
+          label: "发送时间",
+          prop: "CreateTime",
+          scope: "time",
+        },
+      ],
+      total: 0,
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    add() {
+      this.$refs.operation.showInit();
+    },
+    edit(item) {
+      this.$refs.operation.showInit(item.ActivityId);
+    },
+    again(item) {
+      this.$api
+        .XfSysBussinessResendActivityMember({ type: item.ActivityId })
+        .then((res) => {
+          this.$message.success("操作成功");
+          this.search()
+        });
+    },
+    search(e) {
+      if (e === "init") {
+        this.formData = { pageindex: 1, pagesize: 10 };
+      }
+      this.$api.XfSysBussinessGetActivityList(this.formData).then((res) => {
+        this.tableData = res.Data.List || [];
+        this.total = res.Data.TotalCount;
+      });
+    },
+    handleCurrentChange(e) {
+      this.formData.pageindex = e;
+      this.search();
+    },
+    handleSizeChange(e) {
+      this.formData.pageindex = 1;
+      this.formData.pagesize = e;
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 269 - 0
src/views/System/vip/notice/operation.vue

@@ -0,0 +1,269 @@
+<template>
+  <div id="">
+    <el-dialog
+      :close-on-click-modal="false"
+      title="通知"
+      :visible.sync="dialogVisible"
+      width="1000px"
+      :before-close="close"
+    >
+      <el-form
+        :model="ruleForm"
+        :rules="rules"
+        ref="ruleForm"
+        label-width="100px"
+        class="demo-ruleForm"
+      >
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="标题" prop="Title">
+              <el-input v-model.trim="ruleForm.Title"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="通知" prop="EmailContent">
+              <editor
+                v-model="ruleForm.EmailContent"
+                :min-height="300"
+                :max-height="500"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <Search
+              ref="search"
+              :formList="formList"
+              :formData="formData"
+              @onSubmit="search"
+            ></Search>
+            <Table
+              :loading="loading"
+              :tableData="tableData"
+              :tableList="tableList"
+              :rowKey="'MemberId'"
+              :check="true"
+              ref="tables"
+              :rightStatus="false"
+              @selectionChange="selectionChange"
+            >
+              <template #right="scope"> </template>
+            </Table>
+            <Pagination
+              :pageindex="formData.pageindex"
+              :pagesize="formData.pagesize"
+              :total="total"
+              @handleSizeChange="handleSizeChange"
+              @handleCurrentChange="handleCurrentChange"
+            ></Pagination>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+        <el-button
+          v-if="!disClick"
+          size="small"
+          type="primary"
+          @click="submit('ruleForm')"
+          :loading="loading"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Search from "@/components/search/index.vue";
+import Table from "@/components/table/index.vue";
+import Pagination from "@/components/pagination/index.vue";
+import Editor from "@/components/Editor";
+export default {
+  components: { Search, Table, Pagination, Editor },
+  data() {
+    return {
+      dialogVisible: false,
+      ruleForm: {
+        Title: "",
+        EmailContent: "",
+      },
+      rules: {
+        Title: [{ required: true, message: "请输入标题", trigger: "blur" }],
+        EmailContent: [
+          { required: true, message: "请输入通知", trigger: "blur" },
+        ],
+      },
+      loading: false,
+      formData: { pageindex: 1, pagesize: 10 },
+      formList: [
+        {
+          label: "企业名称/联系人:",
+          prop: "MemberName",
+        },
+        {
+          label: "申请时间:",
+          prop: "time",
+          scope: "dateTime",
+        },
+      ],
+      tableData: [],
+      // 表单
+      tableList: [
+        {
+          label: "单位归类",
+          prop: "CompanyTypeName",
+        },
+        {
+          label: "账号",
+          prop: "Account",
+        },
+        {
+          label: "单位名称",
+          prop: "MemberName",
+        },
+        {
+          label: "负责人电话",
+          prop: "Mobile",
+        },
+        {
+          label: "会员级别",
+          prop: "MemberLevelName",
+        },
+        {
+          label: "企业负责人",
+          prop: "LegalPerson",
+        },
+        {
+          label: "经办人",
+          prop: "Operator",
+        },
+        {
+          label: "入会代表是否法人",
+          prop: "OperIsLegal",
+          scope: "options",
+          options: [
+            { label: "是", value: true },
+            { label: "否", value: false },
+          ],
+        },
+        {
+          label: "联系人电话",
+          prop: "OperatorPhone",
+        },
+        {
+          label: "日常工作联络人",
+          prop: "DailyOperator",
+        },
+        {
+          label: "电子邮箱",
+          prop: "Email",
+        },
+        {
+          label: "状态",
+          prop: "Status",
+          scope: "options",
+          options: [
+            { label: "启用", value: 1 },
+            { label: "停用", value: 0 },
+            { label: "待审核", value: 2 },
+          ],
+        },
+      ],
+      total: 0,
+      disClick: false,
+    };
+  },
+  methods: {
+    selectionChange(e) {
+      this.ruleForm.ItemList = e;
+    },
+    showInit(e) {
+      if (e) {
+        this.disClick = true;
+        this.$api.XfSysBussinessGetActivity(e).then((res) => {
+          this.ruleForm = res.Data;
+          res.Data.ItemList.forEach((item) => {
+            this.$refs.tables.$refs.table.toggleRowSelection(item);
+          });
+        });
+      } else {
+        this.disClick = false;
+        this.ruleForm = {
+          Title: "",
+          EmailContent: "",
+          ItemList: [],
+        };
+      }
+      this.formData = { pageindex: 1, pagesize: 10 };
+      this.search();
+      this.dialogVisible = true;
+    },
+    clearCheck() {
+      this.$refs.tables.$refs.table.clearSelection();
+    },
+    search(e) {
+      if (e === "init") {
+        this.formData = { pageindex: 1, pagesize: 10 };
+        this.clearCheck();
+      }
+      this.loading = true;
+      var data = JSON.parse(JSON.stringify(this.formData));
+      if (data.time && data.time.length > 0) {
+        data.beginTime = data.time[0];
+        data.endTime = data.time[1];
+        delete data.time;
+      }
+      this.$api
+        .XfSysBussinessGetMemberList(data)
+        .then((res) => {
+          this.tableData = res.Data.List || [];
+          this.total = res.Data.TotalCount;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    handleCurrentChange(e) {
+      this.formData.pageindex = e;
+      this.search();
+    },
+    handleSizeChange(e) {
+      this.formData.pageindex = 1;
+      this.formData.pagesize = e;
+      this.search();
+    },
+    close(done) {
+      this.clearCheck();
+      this.loading = false;
+      this.$refs["ruleForm"].resetFields();
+      done();
+    },
+    submit(formName) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          this.$api
+            .XfSysBussinessSaveActivityDetail(this.ruleForm)
+            .then((res) => {
+              this.dialogVisible = false;
+              this.$parent.search();
+            });
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.btn {
+  border: 1px solid #666;
+  padding: 4px 6px;
+  border-radius: 8px;
+  cursor: pointer;
+  user-select: none;
+  margin-left: 18px;
+}
+</style>

+ 91 - 33
src/views/home/index.vue

@@ -21,7 +21,20 @@
         </ul>
       </div>
       <div class="novt_box">
-        <el-tabs type="border-card" style="width: 620px; height: 350px">
+        <el-carousel height="350px" style="width: 560px" class="carousel">
+          <el-carousel-item v-for="(item, index) in BannerList2" :key="index">
+            <img
+              style="width: 100%; height: 100%"
+              :src="$methods.splitImgHost(item.ImageUrl)"
+              alt=""
+            />
+            <h3>
+              <span>{{ item.Title }}</span
+              ><span>{{ $methods.onlyFormaHao(item.CreateTime, false) }}</span>
+            </h3>
+          </el-carousel-item>
+        </el-carousel>
+        <el-tabs type="border-card" style="width: 560px; height: 350px">
           <el-tab-pane label="通知通告" class="tabBox">
             <ul>
               <li
@@ -50,19 +63,6 @@
             </div>
           </el-tab-pane>
         </el-tabs>
-        <el-carousel height="350px" style="width: 560px" class="carousel">
-          <el-carousel-item v-for="(item, index) in BannerList2" :key="index">
-            <img
-              style="width: 100%; height: 100%"
-              :src="$methods.splitImgHost(item.ImageUrl)"
-              alt=""
-            />
-            <h3>
-              <span>{{ item.Title }}</span
-              ><span>{{ $methods.onlyFormaHao(item.CreateTime, false) }}</span>
-            </h3>
-          </el-carousel-item>
-        </el-carousel>
       </div>
       <div class="margin_28">
         <div
@@ -228,6 +228,15 @@
         </div>
       </div>
     </div>
+    <div class="infoBox">
+      <div class="center_1200 dis_ffx">
+        <img :src="$methods.splitImgHost(list5.NewsImg)" alt="" />
+        <div class="text_r">
+          <h2>{{ list5.Title }}</h2>
+          <p v-html="list5.NewContent"></p>
+        </div>
+      </div>
+    </div>
     <div style="padding: 15px 0px; overflow: hidden">
       <h2 class="link_s">友情链接</h2>
       <Scroller :lists="lists"></Scroller>
@@ -299,11 +308,16 @@ export default {
         pagesize: 5, //每页内容条数
         pageindex: 1, //当前第几页
       },
+      formData5: {
+        pagesize: 1, //每页内容条数
+        pageindex: 1, //当前第几页
+      },
       lists: [], //友情链接
       list1: [], //协会动态列表
       list2: [], //行业新闻列表
       list3: [], //政策法规列表
       list4: [], //会员天地列表
+      list5: {}, //首页列表
       BannerList1: [], //Banner1列表
       BannerList2: [], //Banner2列表
       tableData: [], //最新3条文章
@@ -338,7 +352,7 @@ export default {
       this.$refs.swiper.$swiper.slideNext();
     },
     handleClickSlide(index) {
-      this.jumpInfo(this.list4[index])
+      this.jumpInfo(this.list4[index]);
     },
     onSwiper(swiper) {
       console.log(swiper);
@@ -357,12 +371,13 @@ export default {
     },
     // 首页通告等
     getNewPositionList() {
-      // seat:0全部,1通知通告,3协会动态,4行业新闻,5政策法规,6会员天地
+      // seat:0全部,1通知通告,3协会动态,4行业新闻,5政策法规,6会员天地,7首页简介
       this.getList();
       this.getList1();
       this.getList2();
       this.getList3();
       this.getList4();
+      this.getList5();
     },
     //通知列表
     getList() {
@@ -409,6 +424,14 @@ export default {
           this.total4 = res.Data.TotalCount;
         });
     },
+    //会员天地
+    getList5() {
+      this.$api
+        .XfWebApiGetNewPositionList({ seat: 7, ...this.formData5 })
+        .then((res) => {
+          this.list5 = res.Data.List[0] || {};
+        });
+    },
     // 获取首页广告轮播Banner列表
     getBannerList() {
       //type:1首页2新闻3飘窗广告
@@ -460,12 +483,44 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .el-tabs--border-card > .el-tabs__header {
+  background-color: rgba(223, 225, 227, 0.659);
+}
 ::v-deep .carousel .el-carousel__indicators--horizontal {
   display: none;
 }
-#home {
-  background: url("../../assets/images/BG_01@2x.png") no-repeat center center;
+.infoBox {
+  padding: 60px 0px 80px;
+  margin-top: 40px;
+  background: url("../../assets/images/BG-1@2x.png") no-repeat center center;
   background-size: cover;
+  & > .dis_ffx {
+    display: flex;
+    & > img {
+      width: 381px;
+      height: 370px;
+      flex-shrink: 0;
+      margin-right: 80px;
+    }
+    & > .text_r {
+      flex: 1;
+      & > h2 {
+        margin-bottom: 17px;
+        font-size: 36px;
+        font-weight: 800;
+        color: #333333;
+      }
+      & > p {
+        font-size: 16px;
+        font-weight: 500;
+        color: #828282;
+      }
+    }
+  }
+}
+#home {
+  background: url("../../assets/images/BG_01@2x.png") repeat center center;
+  background-size: contain;
 }
 .p_text {
   word-break: break-all;
@@ -478,7 +533,7 @@ export default {
 .newClass {
   margin-bottom: 28px;
   padding: 3px 24px;
-  background-color: #fff1f3;
+  background-color: #ebf3ff;
   display: flex;
   align-items: center;
   .logo {
@@ -505,16 +560,18 @@ export default {
         display: -webkit-box;
         -webkit-line-clamp: 2;
         -webkit-box-orient: vertical;
+        font-size: 14px;
       }
       .foot {
         display: flex;
         align-items: center;
         justify-content: space-between;
+        font-size: 13px;
         .left {
           color: #828282;
         }
         .right {
-          color: #c9001f;
+          color: #3975c6;
           user-select: none;
           cursor: pointer;
         }
@@ -535,13 +592,13 @@ export default {
     background-color: #ebebeb;
     padding: 11px 24px;
     box-sizing: border-box;
-    border: 1px solid #c9001f;
+    border: 1px solid #3975c6;
     display: flex;
     align-items: center;
     transition: all 0.2s;
     &:hover {
       // transform: scale(1.1);
-      box-shadow: 0px 0px 8px 4px rgba($color: #c9001f, $alpha: 0.5);
+      box-shadow: 0px 0px 8px 4px rgba($color: #3975c6, $alpha: 0.5);
     }
     img {
       width: 88px;
@@ -571,6 +628,7 @@ export default {
       justify-content: space-between;
       height: 45px;
       border-bottom: 1px solid #e0e0e0;
+      background: rgb(234, 235, 237);
       & > .left {
         width: 120px;
         height: 45px;
@@ -579,13 +637,13 @@ export default {
         font-weight: bold;
         font-size: 20px;
         color: #fff;
-        background-color: #c9001f;
+        background-color: #3975c6;
       }
       & > .right {
         user-select: none;
         cursor: pointer;
         font-size: 15px;
-        color: #c9001f;
+        color: #3975c6;
         margin-right: 20px;
       }
     }
@@ -619,7 +677,7 @@ export default {
       user-select: none;
       cursor: pointer;
       font-size: 15px;
-      color: #c9001f;
+      color: #3975c6;
     }
   }
   .swiperBox {
@@ -628,18 +686,18 @@ export default {
     align-items: center;
     justify-content: space-between;
     & > .left {
-      color: red;
+      color: #3975c6;
       font-size: 28px;
       font-weight: bold;
       margin-right: 10px;
       cursor: pointer;
       user-select: none;
     }
-    & > .swiper-container{
+    & > .swiper-container {
       flex: 1;
     }
     & > .right {
-      color: red;
+      color: #3975c6;
       font-size: 28px;
       font-weight: bold;
       margin-left: 10px;
@@ -699,7 +757,7 @@ export default {
       margin-bottom: 30px;
       & > i {
         position: absolute;
-        background: #c9001f;
+        background: #3975c6;
         width: 40px;
         height: 5px;
         left: 0px;
@@ -797,11 +855,11 @@ export default {
   cursor: pointer;
   transition: all 0.3s;
   &:hover {
-    color: #c9001f;
+    color: #3975c6;
   }
   & > i {
     transform: scale(0.8);
-    color: #c9001f;
+    color: #3975c6;
     margin-right: 6px;
   }
   & > .title_li {
@@ -832,8 +890,8 @@ export default {
   background-color: #d3dce6;
 }
 ::v-deep .el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
-  color: #c9001f;
+  color: #3975c6;
   font-weight: bold;
-  border-top: 3px solid #c9001f;
+  border-top: 3px solid #3975c6;
 }
 </style>

+ 48 - 21
src/views/menuList/index.vue

@@ -11,15 +11,17 @@
           <p>introduce</p>
         </div>
         <ul>
-          <li
-            v-for="(item, index) in routerNs[0].ChildList"
-            :key="index"
-            class="hyLi"
-            :class="{ active_hyLi: active == item.MenuId }"
-            @click="jump(item.MenuId, item.ParentId, item.WebUrl)"
+          <template v-for="(item, index) in routerNs[0].ChildList">
+            <li
+              v-if="item.Type === 2"
+              :key="index"
+              class="hyLi"
+              :class="{ active_hyLi: active == item.MenuId }"
+              @click="jump(item.MenuId, item.ParentId, item.WebUrl)"
+            >
+              {{ item.Name }}
+            </li></template
           >
-            {{ item.Name }}
-          </li>
         </ul>
       </div>
       <div class="ins-main">
@@ -34,13 +36,13 @@
             </template>
           </el-breadcrumb>
         </div>
-        <div v-if="ShowType == 1">
+        <el-main v-loading="loading" v-if="ShowType == 1">
           <div v-if="listData.length > 0" v-html="listData[0].NewContent"></div>
           <el-empty v-else :image-size="200"></el-empty>
-        </div>
-        <ul v-else>
+        </el-main>
+        <el-main v-loading="loading" v-else>
           <el-empty v-if="!listData.length" :image-size="200"></el-empty>
-          <template v-else>
+          <ul v-else>
             <li
               class="li_list"
               v-for="(item, index) in listData"
@@ -61,8 +63,8 @@
               :total="total"
             >
             </el-pagination>
-          </template>
-        </ul>
+          </ul>
+        </el-main>
       </div>
     </div>
   </div>
@@ -78,6 +80,7 @@ export default {
       listData: [],
       routerNs: [],
       ShowType: null,
+      loading: false,
     };
   },
   watch: {
@@ -97,6 +100,20 @@ export default {
     },
   },
   methods: {
+    getCl(data, pid) {
+      let array = [];
+      for (let i = 0; i < data.length; i++) {
+        if (data[i].MenuId == pid) {
+          array.push(data[i]);
+          break;
+        } else {
+          if (data[i].ChildList && data[i].ChildList.length > 0) {
+            array = this.getCl(data[i].ChildList, pid);
+          }
+        }
+      }
+      return array;
+    },
     menuName() {
       var name = "";
       for (let i = 0; i < this.routerNs[0].ChildList.length; i++) {
@@ -113,16 +130,26 @@ export default {
       this.init();
     },
     changeRouterData() {
-      this.routerNs = this.$store.state.asyncRouter.filter((item) => {
-        return item.MenuId == this.$route.query.ParentId;
-      });
+      this.routerNs = this.getCl(
+        this.$store.state.asyncRouter,
+        this.$route.query.ParentId
+      );
+      // this.routerNs = this.$store.state.asyncRouter.filter(
+      //   (item) => item.MenuId == this.$route.query.ParentId
+      // );
       this.active = this.$route.query.MenuId;
     },
     init() {
-      this.$api.XfWebApiGetNewsList(this.formData).then((res) => {
-        this.listData = res.Data.List || [];
-        this.total = res.Data.TotalCount;
-      });
+      this.loading = true;
+      this.$api
+        .XfWebApiGetNewsList(this.formData)
+        .then((res) => {
+          this.listData = res.Data.List || [];
+          this.total = res.Data.TotalCount;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
     },
     jump(MenuId, ParentId, url) {
       if (url) {

+ 41 - 31
src/views/searchKey/index.vue

@@ -1,30 +1,33 @@
 <template>
   <div id="">
-    <div class="center_1200" v-if="notList.length > 0">
-      <ul style="width:918px;margin:0 auto;">
-        <li
-          class="li_list"
-          v-for="(item, index) in notList"
-          :key="index"
-          @click="jumpInfo(item)"
+    <div class="center_1200">
+      <el-main v-loading="loading">
+        <ul style="width: 918px; margin: 0 auto" v-if="notList.length > 0">
+          <li
+            class="li_list"
+            v-for="(item, index) in notList"
+            :key="index"
+            @click="jumpInfo(item)"
+          >
+            <div class="title_li">{{ item.Title }}</div>
+            <div class="time_li">
+              {{ $methods.onlyFormaHao(item.CreateTime) }}
+            </div>
+          </li>
+        </ul>
+        <el-empty v-else :image-size="200"></el-empty>
+        <el-pagination
+          v-if="notList.length > 0"
+          class="paginations"
+          @current-change="handleCurrentChange"
+          :current-page.sync="formData.pageindex"
+          :page-size="formData.pagesize"
+          layout="total, prev, pager, next"
+          :total="total"
         >
-          <div class="title_li">{{ item.Title }}</div>
-          <div class="time_li">
-            {{ $methods.onlyFormaHao(item.CreateTime) }}
-          </div>
-        </li>
-      </ul>
-      <el-pagination
-        class="paginations"
-        @current-change="handleCurrentChange"
-        :current-page.sync="formData.pageindex"
-        :page-size="formData.pagesize"
-        layout="total, prev, pager, next"
-        :total="total"
-      >
-      </el-pagination>
+        </el-pagination>
+      </el-main>
     </div>
-    <el-empty v-else :image-size="200"></el-empty>
   </div>
 </template>
 
@@ -39,6 +42,7 @@ export default {
         pageindex: 1,
       },
       total: 0,
+      loading: false,
     };
   },
   watch: {
@@ -54,13 +58,19 @@ export default {
   },
   methods: {
     search() {
-      this.$api.XfWebApiGetNewsList(this.formData).then((res) => {
-        this.notList = res.Data.List || [];
-        this.total = res.Data.TotalCount;
-      });
+      this.loading = true;
+      this.$api
+        .XfWebApiGetNewsList(this.formData)
+        .then((res) => {
+          this.notList = res.Data.List || [];
+          this.total = res.Data.TotalCount;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
     },
     handleCurrentChange(e) {
-      this.formData.pageindex++;
+      this.formData.pageindex = e;
       this.search();
     },
     //跳转详情页
@@ -101,8 +111,8 @@ export default {
     word-spacing: 0px;
   }
 }
-.paginations{
-    text-align: center;
-    margin: 20px;
+.paginations {
+  text-align: center;
+  margin: 20px;
 }
 </style>