前后端补正
This commit is contained in:
parent
e522044ed6
commit
dc467d9327
@ -37,6 +37,24 @@ public class CMSCategoryAPI extends BaseController {
|
||||
*/
|
||||
@PostMapping("/content")
|
||||
public AjaxResult getContentById(@RequestBody CmsContentQuery contentQuery){
|
||||
if (contentQuery.getCategoryId() == null) return success();
|
||||
return success(categoryService.getContentById(contentQuery));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取某个子栏目的内容
|
||||
*/
|
||||
@PostMapping("/contentPart")
|
||||
public AjaxResult getContentByIdPart(@RequestBody CmsContentQuery contentQuery){
|
||||
if (contentQuery.getCategoryId() == null) return success();
|
||||
return success(categoryService.getContentByIdPart(contentQuery));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取某个栏目的子栏目
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getCategoryIdByParentId(@PathVariable Long id){
|
||||
return success(categoryService.getCategoryIdByParentId(id));
|
||||
}
|
||||
}
|
||||
|
@ -41,9 +41,7 @@ public class CMSContentAPI extends BaseController {
|
||||
*/
|
||||
@GetMapping("/listById/{id}")
|
||||
public AjaxResult getListById(@PathVariable Long id){
|
||||
return success(contentService.list(new QueryWrapper<CmsContent>().and(item -> {
|
||||
item.eq("category_id", id).eq("del_flag", 0);
|
||||
})));
|
||||
return success(contentService.selectCmsContentAllById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,6 +30,14 @@ public interface CmsContentMapper extends BaseMapper<CmsContent>
|
||||
*/
|
||||
public List<CmsContent> selectCmsContentList(CmsContent cmsContent);
|
||||
|
||||
/**
|
||||
* 查询内容列表
|
||||
*
|
||||
* @param cmsContent 内容
|
||||
* @return 内容集合
|
||||
*/
|
||||
public List<CmsContent> selectCmsContentPart(CmsContent cmsContent);
|
||||
|
||||
/**
|
||||
* 新增内容
|
||||
*
|
||||
|
@ -113,6 +113,12 @@ public interface ICmsCategoryService extends IService<CmsCategory>
|
||||
*/
|
||||
public PageInfo<CmsContent> getContentById(CmsContentQuery contentQuery);
|
||||
|
||||
/**
|
||||
* 按ID查文章
|
||||
* @return
|
||||
*/
|
||||
public PageInfo<CmsContent> getContentByIdPart(CmsContentQuery contentQuery);
|
||||
|
||||
/**
|
||||
* 获取所有的叶子节点
|
||||
* @return
|
||||
@ -123,4 +129,9 @@ public interface ICmsCategoryService extends IService<CmsCategory>
|
||||
* 按ID查询所有文章
|
||||
*/
|
||||
List<CmsContent> getLeavesContentList(Long id);
|
||||
|
||||
/**
|
||||
* 获取某个栏目的子栏目
|
||||
*/
|
||||
List<CmsCategory> getCategoryIdByParentId(Long id);
|
||||
}
|
||||
|
@ -79,4 +79,9 @@ public interface ICmsContentService extends IService<CmsContent>
|
||||
* @return
|
||||
*/
|
||||
List<CmsContent> searchContent(String query);
|
||||
|
||||
/**
|
||||
* 二级栏目下的所有
|
||||
*/
|
||||
List<CmsContent> selectCmsContentAllById(Long id);
|
||||
}
|
||||
|
@ -28,6 +28,8 @@ import com.ruoyi.cms.mapper.CmsCategoryMapper;
|
||||
import com.ruoyi.cms.domain.CmsCategory;
|
||||
import com.ruoyi.cms.service.ICmsCategoryService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 栏目Service业务层处理
|
||||
*
|
||||
@ -36,10 +38,10 @@ import com.ruoyi.cms.service.ICmsCategoryService;
|
||||
*/
|
||||
@Service
|
||||
public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCategory> implements ICmsCategoryService {
|
||||
@Autowired
|
||||
@Resource
|
||||
private Snowflake snowflake;
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private CmsContentMapper contentMapper;
|
||||
|
||||
/**
|
||||
@ -247,6 +249,17 @@ public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCa
|
||||
return new PageInfo<CmsContent>(contents);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<CmsContent> getContentByIdPart(CmsContentQuery contentQuery) {
|
||||
PageHelper.startPage(contentQuery.getPageNum(), contentQuery.getPageSize());
|
||||
CmsContent content = new CmsContent();
|
||||
content.setCategoryId(contentQuery.getCategoryId());
|
||||
content.setStatus("1");
|
||||
content.setDelFlag(0);
|
||||
List<CmsContent> contents = contentMapper.selectCmsContentPart(content);
|
||||
return new PageInfo<CmsContent>(contents);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的叶子节点
|
||||
*
|
||||
@ -267,4 +280,12 @@ public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCa
|
||||
.eq("del_flag", 0);
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取某个栏目的子栏目
|
||||
*/
|
||||
@Override
|
||||
public List<CmsCategory> getCategoryIdByParentId(Long id){
|
||||
return baseMapper.selectList(new QueryWrapper<CmsCategory>().eq("parent_id", id));
|
||||
}
|
||||
}
|
||||
|
@ -181,4 +181,16 @@ public class CmsContentServiceImpl extends ServiceImpl<CmsContentMapper, CmsCont
|
||||
);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 二级栏目下的所有
|
||||
*/
|
||||
@Override
|
||||
public List<CmsContent> selectCmsContentAllById(Long id){
|
||||
CmsContent content = new CmsContent();
|
||||
content.setCategoryId(id);
|
||||
content.setDelFlag(0);
|
||||
content.setStatus("1");
|
||||
return baseMapper.selectCmsContentPart(content);
|
||||
}
|
||||
}
|
||||
|
@ -101,6 +101,61 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<sql id="selectCmsContentVoNew">
|
||||
select id,
|
||||
category_id,
|
||||
content_type,
|
||||
image_url,
|
||||
video_url,
|
||||
content_title,
|
||||
content_img,
|
||||
source,
|
||||
source_url,
|
||||
original,
|
||||
author,
|
||||
editor,
|
||||
summary,
|
||||
status,
|
||||
publish_date,
|
||||
offline_date,
|
||||
is_accessory,
|
||||
accessory_url,
|
||||
remark,
|
||||
del_flag,
|
||||
create_time,
|
||||
create_by,
|
||||
update_time,
|
||||
update_by,
|
||||
link_type,
|
||||
link,
|
||||
count
|
||||
from cms_content
|
||||
</sql>
|
||||
<select id="selectCmsContentPart" resultMap="CmsContentResult">
|
||||
<include refid="selectCmsContentVoNew"></include>
|
||||
<where>
|
||||
<if test="categoryId != null ">and category_id = #{categoryId}</if>
|
||||
<if test="contentType != null ">and content_type = #{contentType}</if>
|
||||
<if test="contentTitle != null and contentTitle != ''">and content_title like concat('%', #{contentTitle},
|
||||
'%')
|
||||
</if>
|
||||
<if test="contentImg != null and contentImg != ''">and content_img = #{contentImg}</if>
|
||||
<if test="source != null and source != ''">and source = #{source}</if>
|
||||
<if test="sourceUrl != null and sourceUrl != ''">and source_url = #{sourceUrl}</if>
|
||||
<if test="original != null ">and original = #{original}</if>
|
||||
<if test="author != null and author != ''">and author = #{author}</if>
|
||||
<if test="editor != null and editor != ''">and editor = #{editor}</if>
|
||||
<if test="summary != null and summary != ''">and summary = #{summary}</if>
|
||||
<if test="status != null ">and status = #{status}</if>
|
||||
<if test="publishDate != null ">and publish_date = #{publishDate}</if>
|
||||
<if test="offlineDate != null ">and offline_date = #{offlineDate}</if>
|
||||
<if test="isAccessory != null ">and is_accessory = #{isAccessory}</if>
|
||||
<if test="accessoryUrl != null and accessoryUrl != ''">and accessory_url = #{accessoryUrl}</if>
|
||||
<if test="delFlag != null">and del_flag = #{delFlag}</if>
|
||||
</where>
|
||||
order by create_time desc, update_time desc
|
||||
</select>
|
||||
|
||||
<insert id="insertCmsContent" parameterType="CmsContent">
|
||||
insert into cms_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -25,6 +25,15 @@ export function getinfo(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取二级内容
|
||||
export function getinfoPart(data) {
|
||||
return request({
|
||||
url: '/api/category/contentPart',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getBaseInfo(){
|
||||
return request({
|
||||
url: "/api/baseInfo",
|
||||
|
@ -35,3 +35,10 @@ export function getListById(id){
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
||||
export function getCategoryByParentId(id){
|
||||
return request({
|
||||
url: "/api/category/" + id,
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="top-box">
|
||||
<headers :msg='Serial' ></headers>
|
||||
<headers></headers>
|
||||
|
||||
<div style="overflow: hidden;position: relative;" class="mySwiper">
|
||||
<swiper ref="mySwiper" :options="swiperOptions" style="width: 100%">
|
||||
@ -27,18 +27,18 @@
|
||||
<!-- new -->
|
||||
<div class="new-box">
|
||||
<div class="new-title">
|
||||
{{ indexList[0].categoryName }}
|
||||
{{ indexList[0].label }}
|
||||
</div>
|
||||
<div class="new-gang"></div>
|
||||
<div class="new-container">
|
||||
<div class="new-list">
|
||||
<div class="list-box" v-for="(item, index) in this.newList[0]" :key="index" @click="goDeatail(item)" >
|
||||
<div class="list-box" v-for="(item, index) in newList[0]" :key="index" @click="goDeatail(item)">
|
||||
<div class="list-bs">
|
||||
<img :src="item.contentImg" style=" ">
|
||||
<div class="new-wb">{{ item.contentTitle }}</div>
|
||||
</div>
|
||||
<div class="list-bs" style="margin-top: 15px;">
|
||||
<div class="icon-title">{{ indexList[0].categoryName }}</div>
|
||||
<div class="icon-title">{{ indexList[0].label }}</div>
|
||||
<div class="time-">{{ parseTime(item.createTime, "{y}-{m}-{d}") }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -60,12 +60,13 @@
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
<div class="swiper-pagination"></div>
|
||||
<div style=" width: 156px;height: 42px;position: absolute;bottom: 30px; z-index: 99 " @click="golist(indexList[0])" >
|
||||
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px" >
|
||||
<div style=" width: 156px;height: 42px;position: absolute;bottom: 30px; z-index: 99 "
|
||||
@click="golist(indexList[0])">
|
||||
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px">
|
||||
</div>
|
||||
</div>
|
||||
<div class="new-list">
|
||||
<div class="list-box" v-for="(item, index) in this.newList[1]" :key="index" @click="goDeatail(item)" >
|
||||
<div class="list-box" v-for="(item, index) in newList[1]" :key="index" @click="goDeatail(item)">
|
||||
<div class="list-bs">
|
||||
<img :src="item.contentImg" style="">
|
||||
<div class="new-wb">{{ item.contentTitle }}</div>
|
||||
@ -78,71 +79,72 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gongao">
|
||||
<div class="new-title">
|
||||
{{ indexList[1].categoryName }}
|
||||
</div>
|
||||
<div class="new-gang"></div>
|
||||
<div class="list">
|
||||
<swiper ref="mySwiper" :options="swiperOptions1" style="width: 100%">
|
||||
<swiper-slide class="gongao-item" v-for="item in this.noticeList" @click="goDeatail(item)">
|
||||
<div class="bj" @click="goDeatail(item)">
|
||||
<div class="tt">{{ item.contentTitle }}</div>
|
||||
<div class="p">
|
||||
<div class="tags">
|
||||
{{ indexList[1].categoryName }}
|
||||
</div>
|
||||
<div class="time">
|
||||
{{ parseTime(item.createTime, "{y}-{m}-{d}") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{ item.summary }}
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
|
||||
</swiper>
|
||||
<div class="page">
|
||||
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-button-next"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news11">
|
||||
<div class="new-title">
|
||||
{{ indexList[2].categoryName }}
|
||||
</div>
|
||||
<div class="new-gang"></div>
|
||||
<div class="news11-list">
|
||||
<div class="news11-list-item" v-for="(item, index) in this.xlist" :key="index" @click="goDeatails(item)">
|
||||
<div class="img">
|
||||
<div class="yl-right" v-if="item.imitationType == 1" > 国一流</div>
|
||||
<div class="yl-right" v-if="item.imitationType == 2" > 省一流</div>
|
||||
<img :src=" imgurl + item.imitationImage" class="imgWO" style="width: 100%; height: 100% ">
|
||||
<div class="gongao">
|
||||
<div class="new-title">
|
||||
{{ indexList[1].label }}
|
||||
</div>
|
||||
<div class="tt">
|
||||
{{ item.imitationTitle }}
|
||||
</div>
|
||||
<div class="tags">
|
||||
<div class="p">{{ item.imitationSchool }} | {{item.imitationTeach}} </div>
|
||||
<div class="icon"><i class="el-icon-user"></i>
|
||||
{{ item.imitationCount }}
|
||||
<div class="new-gang"></div>
|
||||
<div class="list">
|
||||
<swiper ref="mySwiper" :options="swiperOptions1" style="width: 100%">
|
||||
<swiper-slide class="gongao-item" v-for="item in noticeList" @click="goDeatail(item)">
|
||||
<div class="bj" @click="goDeatail(item)">
|
||||
<div class="tt">{{ item.contentTitle }}</div>
|
||||
<div class="p">
|
||||
<div class="tags">
|
||||
{{ indexList[1].label }}
|
||||
</div>
|
||||
<div class="time">
|
||||
{{ parseTime(item.createTime, "{y}-{m}-{d}") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="desc">
|
||||
{{ item.summary }}
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
|
||||
</swiper>
|
||||
<div class="page">
|
||||
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-button-next"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="backmo">
|
||||
<p>{{ item.imitationTitle }}</p>
|
||||
<div style="color: #54a3fd">{{ item.imitationSchool }} | {{item.imitationTeach}}</div>
|
||||
<p class="psize"> {{item.imitationSummary}}</p>
|
||||
</div>
|
||||
|
||||
<div class="news11">
|
||||
<div class="new-title">
|
||||
{{ indexList[2].label }}
|
||||
</div>
|
||||
<div class="new-gang"></div>
|
||||
<div class="news11-list">
|
||||
<div class="news11-list-item" v-for="(item, index) in this.xlist" :key="index" @click="goDeatails(item)">
|
||||
<div class="img">
|
||||
<div class="yl-right" v-if="item.imitationType == 1" > 国一流</div>
|
||||
<div class="yl-right" v-if="item.imitationType == 2" > 省一流</div>
|
||||
<img :src=" imgurl + item.imitationImage" class="imgWO" style="width: 100%; height: 100% ">
|
||||
</div>
|
||||
<div class="tt">
|
||||
{{ item.imitationTitle }}
|
||||
</div>
|
||||
<div class="tags">
|
||||
<div class="p">{{ item.imitationSchool }} | {{item.imitationTeach}} </div>
|
||||
<div class="icon"><i class="el-icon-user"></i>
|
||||
{{ item.imitationCount }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="backmo">
|
||||
<p>{{ item.imitationTitle }}</p>
|
||||
<div style="color: #54a3fd">{{ item.imitationSchool }} | {{item.imitationTeach}}</div>
|
||||
<p class="psize"> {{item.imitationSummary}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 动画-->
|
||||
</div>
|
||||
<div style=" width: 156px;height: 42px;margin: 50px auto;cursor: pointer" @click="godx()" >
|
||||
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 动画-->
|
||||
</div>
|
||||
<div style=" width: 156px;height: 42px;margin: 50px auto;cursor: pointer" @click="godx()" >
|
||||
<img src="../assets/gw/anniu.png" style=" width: 156px;height: 42px">
|
||||
</div>
|
||||
</div>
|
||||
<footers></footers>
|
||||
</div>
|
||||
</template>
|
||||
@ -150,7 +152,7 @@
|
||||
<script>
|
||||
import {Swiper, SwiperSlide} from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getTab, getbanner, getBaseInfo, imitationList, imitationId } from '@/api/gw/home'
|
||||
import {getTab, getbanner, getBaseInfo, imitationList, imitationId, getinfo, getinfoPart} from '@/api/gw/home'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
|
||||
@ -162,39 +164,27 @@ export default {
|
||||
footers
|
||||
},
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
},
|
||||
// props: {
|
||||
// msg: String
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
imgurl:process.env.VUE_APP_BASE_API,
|
||||
Serial:0,
|
||||
baseInfo:"",
|
||||
imgurl: process.env.VUE_APP_BASE_API,
|
||||
Serial: 0,
|
||||
baseInfo: "",
|
||||
categoryQuery: {
|
||||
categoryId: "",
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
input4:'',
|
||||
xlist:[],
|
||||
indexList:[],
|
||||
newList:[[], []],
|
||||
input4: '',
|
||||
xlist: [],
|
||||
indexList: [],
|
||||
newList: [[], []],
|
||||
noticeList: [],
|
||||
show_search: true,
|
||||
nationalVirtualLass: [],
|
||||
tablist: [
|
||||
{name: '首页'},
|
||||
{name: '中心概括'},
|
||||
{name: '教学资源'},
|
||||
{name: '教学平台'},
|
||||
{name: '教学团队'},
|
||||
{name: '专业委员会'},
|
||||
{name: '教学研讨活动'},
|
||||
{name: '虚仿专业频道'},
|
||||
{name: '大赛风采'},
|
||||
{name: '实践平台'},
|
||||
{name: '合作企业'},
|
||||
{name: '联系我们'},
|
||||
],
|
||||
bannerlist: [],
|
||||
isMounted: false,
|
||||
@ -267,10 +257,11 @@ export default {
|
||||
"http://124.221.227.225:1255/assets/banner.png",
|
||||
"http://124.221.227.225:1255/assets/banner.png"
|
||||
],
|
||||
newList2: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.$route.query.id)
|
||||
// console.log(this.$route.query.id)
|
||||
// 页面加载完毕调用
|
||||
this.tabLsit();
|
||||
this.getWebBaseInfo()
|
||||
@ -289,43 +280,41 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
godx(){
|
||||
godx() {
|
||||
this.$router.push({
|
||||
name: 'xufang',
|
||||
query:{ id: '1813829868593483776' }
|
||||
query: {id: '1813829868593483776'}
|
||||
});
|
||||
},
|
||||
golist(row){
|
||||
golist(row) {
|
||||
// console.log('跳转',id)
|
||||
console.log(row)
|
||||
this.$router.push({
|
||||
name: 'list',
|
||||
query:{ id: row.id, categoryTitle: row.categoryName }
|
||||
query: {id: row.id, categoryTitle: row.label}
|
||||
});
|
||||
},
|
||||
tabClick(item){
|
||||
if(item.label=="联系我们"){
|
||||
tabClick(item) {
|
||||
if (item.label == "联系我们") {
|
||||
this.$router.push('/contact');
|
||||
}
|
||||
},
|
||||
goDeatails(data){
|
||||
goDeatails(data) {
|
||||
|
||||
imitationId(data.id).then(res=>{
|
||||
console.log(res,'调用成功')
|
||||
imitationId(data.id).then(res => {
|
||||
// console.log(res,'调用成功')
|
||||
})
|
||||
window.open(data.imitationLink, '_blank');
|
||||
},
|
||||
goDeatail(data){
|
||||
console.log(data)
|
||||
if(data.linkType == 0){
|
||||
goDeatail(data) {
|
||||
// console.log(data)
|
||||
if (data.linkType == 0) {
|
||||
this.$router.push({
|
||||
name: 'details',
|
||||
query:{ id: data.id }
|
||||
query: {id: data.id}
|
||||
});
|
||||
}
|
||||
if(data.linkType == 1){
|
||||
imitationId(data.id).then(res=>{
|
||||
console.log(res,'调用成功')
|
||||
if (data.linkType == 1) {
|
||||
imitationId(data.id).then(res => {
|
||||
})
|
||||
window.open(data.link, '_blank');
|
||||
}
|
||||
@ -335,45 +324,32 @@ export default {
|
||||
getTab().then(response => {
|
||||
if (response.code == 200) {
|
||||
this.tablist = response.data;
|
||||
console.log('所有id',this.tablist)
|
||||
this.categoryQuery.categoryId = this.tablist[0].id
|
||||
getbanner(this.categoryQuery).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.indexList = res.data
|
||||
console.log('indexList',this.indexList)
|
||||
res.data[3].children.list.forEach(item => {
|
||||
this.bannerlist.push(process.env.VUE_APP_BASE_API + item.imageUrl[0])
|
||||
})
|
||||
|
||||
//新闻
|
||||
let index = 0;
|
||||
res.data[0].children.list.forEach(item => {
|
||||
item.contentImg = process.env.VUE_APP_BASE_API + item.contentImg
|
||||
if (index < 4) {
|
||||
this.newList[0].push(item)
|
||||
} else if (index < 8) {
|
||||
this.newList[1].push(item)
|
||||
}
|
||||
index += 1
|
||||
})
|
||||
console.log('newList',this.newList)
|
||||
// 通知公告赋值
|
||||
this.noticeList = res.data[1].children.list
|
||||
|
||||
// 比赛
|
||||
this.nationalVirtualLass = res.data[2].children.list
|
||||
console.log( '362', this.nationalVirtualLass)
|
||||
this.nationalVirtualLass.forEach(item => {
|
||||
item.contentImg = process.env.VUE_APP_BASE_API + item.contentImg
|
||||
})
|
||||
}
|
||||
});
|
||||
let indexIds = this.tablist[0].children;
|
||||
this.categoryQuery.categoryId = indexIds[3].id
|
||||
getinfo(this.categoryQuery).then(res => {
|
||||
res.data.list.forEach(item => {
|
||||
this.bannerlist.push(process.env.VUE_APP_BASE_API + item.imageUrl)
|
||||
})
|
||||
})
|
||||
this.indexList = indexIds
|
||||
this.categoryQuery.categoryId = indexIds[0].id
|
||||
getinfoPart(this.categoryQuery).then(res => {
|
||||
res.data.list.forEach(item => {
|
||||
item.contentImg = process.env.VUE_APP_BASE_API + item.contentImg
|
||||
})
|
||||
this.newList[0] = res.data.list.slice(0, 4)
|
||||
this.newList[1] = res.data.list.slice(4, 8)
|
||||
})
|
||||
this.categoryQuery.categoryId = indexIds[1].id
|
||||
getinfoPart(this.categoryQuery).then(res => {
|
||||
this.noticeList = res.data.list
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getWebBaseInfo() {
|
||||
imitationList().then(res =>{
|
||||
console.log(res,'虚')
|
||||
imitationList().then(res => {
|
||||
// console.log(res,'虚')
|
||||
var firstEightItems = res.rows.slice(0, 8);
|
||||
firstEightItems.forEach(item => {
|
||||
this.xlist.push(item);
|
||||
@ -421,7 +397,8 @@ export default {
|
||||
height: 50px;
|
||||
background: #fff;
|
||||
}
|
||||
.logo-box img{
|
||||
|
||||
.logo-box img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
@ -737,12 +714,15 @@ export default {
|
||||
height: 240px;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.gongao .list .gongao-item .bj {
|
||||
padding: 20px;
|
||||
}
|
||||
.bj:hover{
|
||||
|
||||
.bj:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.gongao .list .gongao-item .tt {
|
||||
font-size: 20px;
|
||||
line-height: 28px;
|
||||
@ -900,7 +880,7 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
.backmo{
|
||||
.backmo {
|
||||
width: 0%;
|
||||
height: 0%;
|
||||
position: absolute;
|
||||
@ -920,7 +900,7 @@ export default {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.news11 .news11-list .news11-list-item:hover>.backmo {
|
||||
.news11 .news11-list .news11-list-item:hover > .backmo {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
@ -931,16 +911,18 @@ export default {
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
|
||||
.news11 .news11-list .news11-list-item .img {
|
||||
width: 100%;
|
||||
height: 194px;
|
||||
border-radius: 10px ;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 15px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.yl-right{
|
||||
|
||||
.yl-right {
|
||||
position: absolute;
|
||||
background: #da4925;
|
||||
left: 0px;
|
||||
@ -948,7 +930,7 @@ export default {
|
||||
color: #fff;
|
||||
border-radius: 0px 0px 10px 0px;
|
||||
font-size: 12px;
|
||||
padding: 5px ;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.news11 .news11-list .news11-list-item .img img {
|
||||
@ -971,7 +953,8 @@ export default {
|
||||
-webkit-line-clamp: 2;
|
||||
/** 显示的行数 **/
|
||||
}
|
||||
.psize{
|
||||
|
||||
.psize {
|
||||
overflow: hidden;
|
||||
/** 隐藏超出的内容 **/
|
||||
word-break: break-all;
|
||||
|
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getbanner, getBaseInfo, getTab } from '@/api/gw/home'
|
||||
import { getBaseInfo, getTab } from '@/api/gw/home'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -54,9 +54,6 @@ export default {
|
||||
],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
msg: String
|
||||
},
|
||||
mounted() {
|
||||
// 页面加载完毕调用
|
||||
this.tabLsit();
|
||||
|
@ -16,7 +16,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getPageData} from "@/api/officialWebsite/getPageData";
|
||||
import {getinfoPart} from "@/api/gw/home";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
@ -65,11 +65,14 @@ export default {
|
||||
// console.log(1, this.queryParams)
|
||||
// console.log(this.queryParams.pageNum)
|
||||
if (this.queryParams.categoryId !== ''){
|
||||
getPageData(this.queryParams).then(res => {
|
||||
// console.log('列表',res)
|
||||
this.listinfo = res.data.list;
|
||||
this.total =res.data.total;
|
||||
this.$emit('event-message', this.listinfo)
|
||||
getinfoPart(this.queryParams).then(res => {
|
||||
if (res.data){
|
||||
this.listinfo = res.data.list;
|
||||
this.total =res.data.total;
|
||||
this.$emit('event-message', this.listinfo)
|
||||
}else{
|
||||
this.$emit('event-message', [])
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.$emit('event-message', [])
|
||||
|
@ -10,12 +10,12 @@
|
||||
<!-- new -->
|
||||
<div class="navigation">
|
||||
<div class="content">
|
||||
<div class="left"> <img src="../../assets/gw/home.png" alt="">
|
||||
<div class="left"><img src="../../assets/gw/home.png" alt="">
|
||||
<p><a href="/gw">首页</a><i class="el-icon-arrow-right"></i> <span href="">中心概况</span></p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="nav-item" v-for="(item, index) in nav" v-bind:class="[index === currentActive ? 'active' : '']"
|
||||
@click="getCurrentActive(index)">
|
||||
@click="getCurrentActive(index)">
|
||||
{{ item.categoryName }}
|
||||
</div>
|
||||
</div>
|
||||
@ -25,72 +25,17 @@
|
||||
<!-- main -->
|
||||
<div v-for="(item, index) in nav " :key=index>
|
||||
<div class="about-conts-item1" v-if="currentActive == index && currentActive !== 1">
|
||||
<div class="neirong" v-html="pageContextList[index]"></div>
|
||||
<div class="neirong" v-html="pageContext"></div>
|
||||
</div>
|
||||
<div class="about-conts-item1" v-if="currentActive == index && currentActive === 1">
|
||||
<div class="dataClass">
|
||||
<div v-for="(item, index) in dataList">
|
||||
{{item.contentTitle}}
|
||||
</div>
|
||||
<div class="dataClass">
|
||||
<div v-for="(item, index) in dataList">
|
||||
{{ item.contentTitle }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 中心简介 -->
|
||||
<!-- <div class="about-conts-item1" v-if="currentActive == 0"> -->
|
||||
<!-- <div class="neirong" v-html="content"></div> -->
|
||||
<!-- </div> -->
|
||||
<!-- 组织机构 -->
|
||||
<!-- <div class="about-conts-item1" v-if="currentActive == 1"> -->
|
||||
<!-- <div class="div" v-for="(item, index) in orgList">
|
||||
{{ item.contentDetail }}
|
||||
</div> -->
|
||||
<!-- <div class="neirong" v-html="orgList"></div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- 现任领导 -->
|
||||
<!-- <div class="about-conts-item1" v-if="currentActive == 2"> -->
|
||||
<!-- <div class="about-conts-item3-div" v-for="postList">
|
||||
<div class="left">
|
||||
主任
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="divs" v-for="(item, index) in 2">
|
||||
<div class="img">
|
||||
<img src="https://www.guanwenw.com/uploads/images/20240618/7cf62814ae1ceaaffb6a60b1f0a7075a.jpg" alt="">
|
||||
</div>
|
||||
<div class="tt">钟离</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="about-conts-item3-div">
|
||||
<div class="left">
|
||||
主任
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="divs" v-for="(item, index) in 1">
|
||||
<div class="img">
|
||||
<img src="https://www.guanwenw.com/uploads/images/20240618/7cf62814ae1ceaaffb6a60b1f0a7075a.jpg" alt="">
|
||||
</div>
|
||||
<div class="tt">钟离</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-conts-item3-div">
|
||||
<div class="left">
|
||||
主任
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="divs" v-for="(item, index) in 4">
|
||||
<div class="img">
|
||||
<img src="https://www.guanwenw.com/uploads/images/20240618/7cf62814ae1ceaaffb6a60b1f0a7075a.jpg" alt="">
|
||||
</div>
|
||||
<div class="tt">钟离</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="neirong" v-html="leaderList"></div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
<footers></footers>
|
||||
@ -98,9 +43,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import {Swiper, SwiperSlide} from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn, getListById } from "@/api/officialWebsite/getPageData";
|
||||
import { getListById, getCategoryByParentId} from "@/api/officialWebsite/getPageData";
|
||||
import {getinfo} from "@/api/gw/home";
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
|
||||
@ -122,38 +68,26 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
pageContextList: [],
|
||||
pageContext: "",
|
||||
nav: [
|
||||
// { name: '中心简介' },
|
||||
// { name: '组织机构' },
|
||||
// { name: '现任领导' },
|
||||
],
|
||||
currentActive: 0,
|
||||
isMounted: false,
|
||||
orgList: "",
|
||||
postList: [],
|
||||
// content: `<p style="box-sizing: inherit; text-align: justify; text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
|
||||
// <span style="font-family: 微软雅黑, "Microsoft YaHei"; font-size: 18px;">淄博瑞安输变电工程有限公司成立于2006年,公司原属国网淄博供电公司下属施工企业,现为山东泉舜控股集团有限公司全资子公司,注册资本5000万元。公司设立于历史悠久的齐文化发祥地淄博市,并在济南、青岛、聊城、东营、潍坊、济宁、泰安、李庄、邯郸等各地设有分支机构。企业人才结构合理,大专以上学历及具有各种专业技术职称的近300余人,是一支经过国家电网公司多年锻造、专业技术强、电力工程施工经验丰富的的铁军队伍。<br/></span>
|
||||
// </p>
|
||||
// <p style="text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
|
||||
// <span style="font-family: 微软雅黑, "Microsoft YaHei"; font-size: 18px;">公司主要经营范围包括:220千伏及以下电力工程总承包施工,电力输配电线路架设施工,变电站电气设备安装,建筑物土建施工,城市及道路照明工程施工;高低压电气设备修试:电力技术咨询;输配变电电力线路设备巡视、维护、维修及带电作业服务;电力销售;房屋、设备、车辆租赁及新能源技术开发、技术转让、技术服务。</span>
|
||||
// </p>
|
||||
// <p style="text-indent: 2em; margin-bottom: 5px; margin-top: 5px; line-height: 1.75em;">
|
||||
// <span style="font-family: 微软雅黑, "Microsoft YaHei"; font-size: 18px;">公司秉承山东泉舜控股集团有限公司建设“泉心立业、舜势百年”的百年企业的美好愿景,坚持“专业、规范、服务、诚信、创新、实力”的经营宗旨,为广大客户提供“电保姆”式的电力全产业链服务!</span>
|
||||
// </p>
|
||||
// <p style="box-sizing: inherit; margin-top: 0px; text-align: justify; text-indent: 2em; margin-bottom: 5px; line-height: 1.75em;">
|
||||
// <span style="box-sizing: inherit; font-family: 微软雅黑, MicrosoftYaHei;"></span><br/>
|
||||
// </p>`
|
||||
content: "",
|
||||
leaderList: "",
|
||||
queryForm:{
|
||||
categoryId: this.$route.query.id || "",
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
// 页面加载完毕调用
|
||||
debugger;
|
||||
// debugger;
|
||||
this.initPageData();
|
||||
},
|
||||
|
||||
@ -164,76 +98,31 @@ export default {
|
||||
return
|
||||
}
|
||||
this.currentActive = value
|
||||
if (value === 1){
|
||||
if (value === 1) {
|
||||
this.getContentByCategoryId(this.nav[value].id)
|
||||
}else {
|
||||
this.getContent()
|
||||
}
|
||||
},
|
||||
getContentByCategoryId(id){
|
||||
getContentByCategoryId(id) {
|
||||
getListById(id).then(res => {
|
||||
this.dataList = res.data
|
||||
})
|
||||
},
|
||||
initPageData() {
|
||||
console.log("123123", this.$route.query.id);
|
||||
|
||||
let routeParam = {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getPageColumn(routeParam).then(response => {
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
let context = "";
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
context += element.contentDetail;
|
||||
});
|
||||
|
||||
this.pageContextList.push(context);
|
||||
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
// let introduction_center_param = {
|
||||
// "categoryId": "1813827591224823808",
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 1000
|
||||
// };
|
||||
// getPageData(introduction_center_param).then(response => {
|
||||
// response.data.list.forEach(element => {
|
||||
// this.content += element.contentDetail;
|
||||
// });
|
||||
|
||||
// });
|
||||
|
||||
// let organizational_structure_param = {
|
||||
// "categoryId": "1813827750121836544",
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 1000
|
||||
// };
|
||||
// getPageData(organizational_structure_param).then(response => {
|
||||
// response.data.list.forEach(element => {
|
||||
// // this.orgList.push(element);
|
||||
// this.orgList += element.contentDetail;
|
||||
// });
|
||||
|
||||
// });
|
||||
|
||||
// let current_leader_param = {
|
||||
// "categoryId": "1813827861774209024",
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 1000
|
||||
// };
|
||||
// getPageData(current_leader_param).then(response => {
|
||||
// response.data.list.forEach(element => {
|
||||
// this.leaderList += element.contentDetail;
|
||||
// });
|
||||
|
||||
// });
|
||||
|
||||
getCategoryByParentId(this.queryForm.categoryId).then(res => {
|
||||
this.nav = res.data
|
||||
if (this.currentActive === 0){
|
||||
this.getContent()
|
||||
}
|
||||
})
|
||||
},
|
||||
getContent(){
|
||||
this.queryForm.categoryId = this.nav[this.currentActive].id
|
||||
getinfo(this.queryForm).then(res => {
|
||||
this.pageContext = res.data.list[0].contentDetail
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -519,7 +408,8 @@ export default {
|
||||
/* align-items: center; */
|
||||
}
|
||||
|
||||
.index-footer .footer .logo .footer-contact {}
|
||||
.index-footer .footer .logo .footer-contact {
|
||||
}
|
||||
|
||||
.index-footer .footer .logo .footer-contact .p {
|
||||
display: inline-block;
|
||||
@ -629,11 +519,13 @@ export default {
|
||||
line-height: 18px;
|
||||
|
||||
}
|
||||
.dataClass{
|
||||
|
||||
.dataClass {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.dataClass > div {
|
||||
border: 1px solid black;
|
||||
font-size: 18px;
|
||||
|
@ -69,10 +69,10 @@
|
||||
<script>
|
||||
import {Swiper, SwiperSlide} from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import {getPageData, getPageColumn} from "@/api/officialWebsite/getPageData";
|
||||
import {getPageData, getListById,getCategoryByParentId} from "@/api/officialWebsite/getPageData";
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import {getTab, getbanner, getinfo} from "@/api/gw/home";
|
||||
import {getTab, getinfo} from "@/api/gw/home";
|
||||
import PageUtil from '@/views/officialWebsite/Components/page'
|
||||
|
||||
export default {
|
||||
@ -122,22 +122,13 @@ export default {
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getPageColumn(routeParam).then(response => {
|
||||
// this.categoryId = response.data[0].id
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
this.teachingAchievements.push(element);
|
||||
});
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
getCategoryByParentId(routeParam.categoryId).then(res => {
|
||||
getListById(res.data[0].id).then(response => {
|
||||
this.teachingAchievements = response.data
|
||||
})
|
||||
})
|
||||
},
|
||||
handleDataFromPage(data){
|
||||
// this.nav[this.currentActive].children.list = data
|
||||
// console.log(data)
|
||||
this.teachingAchievements = data
|
||||
}
|
||||
}
|
||||
|
@ -36,14 +36,9 @@
|
||||
<div>
|
||||
|
||||
<div class="about-conts-item1" v-if="currentActive == 2">
|
||||
<div class="noticeRsr" v-html="twolist[0].contentDetail" >
|
||||
<!-- <div >{{item.contentTitle}}</div>-->
|
||||
<!-- <div >{{item.publishDate}}</div>-->
|
||||
<div class="noticeRsr" v-html="twolist" >
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-show="currentActive == 2">-->
|
||||
<!-- <page-util :category-id="categoryId" @event-message="handleDataFromPage" />-->
|
||||
<!-- </div>-->
|
||||
<div class="about-conts-item1" v-if="currentActive == 1">
|
||||
<div class="dataClass">
|
||||
<div v-for="(item, index) in dataList">
|
||||
@ -52,9 +47,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-show="currentActive !== 1 && currentActive !== 2">-->
|
||||
<!-- -->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<footers></footers>
|
||||
@ -64,7 +56,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import {getPageData, getPageColumn, getListById} from "@/api/officialWebsite/getPageData";
|
||||
import {getPageData, getCategoryByParentId, getListById} from "@/api/officialWebsite/getPageData";
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import PageUtil from '@/views/officialWebsite/Components/page/index.vue'
|
||||
@ -94,7 +86,12 @@ export default {
|
||||
],
|
||||
currentActive: 0,
|
||||
isMounted: false,
|
||||
input4: ""
|
||||
input4: "",
|
||||
routeParam : {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -106,23 +103,19 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
getContentDetail(){
|
||||
this.routeParam.categoryId = this.nav[this.currentActive].id
|
||||
getPageData(this.routeParam).then(res => {
|
||||
this.twolist = res.data.list[0].contentDetail
|
||||
})
|
||||
},
|
||||
handleDataFromPage(data){
|
||||
console.log(data)
|
||||
if (this.currentActive === 0){
|
||||
this.onelist = data
|
||||
}
|
||||
if (this.currentActive === 2){
|
||||
this.twolist = data
|
||||
}
|
||||
// if (this.currentActive == 0){
|
||||
// this.onelist = data
|
||||
// }
|
||||
// if (this.currentActive == 2){
|
||||
// this.twolist = data
|
||||
// }
|
||||
|
||||
},
|
||||
goDeatail(data){
|
||||
// console.log(data)
|
||||
if(data.linkType == 0){
|
||||
this.$router.push({
|
||||
name: 'details',
|
||||
@ -140,16 +133,8 @@ export default {
|
||||
},
|
||||
// 触发导航
|
||||
getCurrentActive(value) {
|
||||
// console.log(1,value, this.currentActive, this.categoryId)
|
||||
if (this.value !== 1){
|
||||
this.categoryId = this.nav[value].id
|
||||
}
|
||||
// console.log(2, this.currentActive, this.categoryId)
|
||||
// if (this.currentActive === 0){
|
||||
// this.categoryId = this.oneid
|
||||
// }
|
||||
// if (this.currentActive === 1){
|
||||
// this.categoryId = this.twoid
|
||||
// if (value !== 1){
|
||||
// this.categoryId = this.nav[value].id
|
||||
// }
|
||||
if (this.currentActive == value) {
|
||||
return
|
||||
@ -158,37 +143,15 @@ export default {
|
||||
if (value === 1){
|
||||
this.getContentByCategoryId(this.nav[value].id)
|
||||
}
|
||||
|
||||
if (value === 2){
|
||||
this.getContentDetail()
|
||||
}
|
||||
},
|
||||
initPageData() {
|
||||
|
||||
let routeParam = {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getPageColumn(routeParam).then(response => {
|
||||
|
||||
console.log('routeParam',response)
|
||||
this.onelist = response.data[0].children.list
|
||||
this.oneid = response.data[0].id
|
||||
this.twolist = response.data[2].children.list
|
||||
this.twoid = response.data[2].id
|
||||
this.categoryId = response.data[0].id
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
let context = "";
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
context += element.contentDetail;
|
||||
});
|
||||
|
||||
this.pageContextList.push(context);
|
||||
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
getCategoryByParentId(this.routeParam.categoryId).then(res => {
|
||||
this.nav = res.data
|
||||
this.categoryId = this.nav[0].id
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -211,25 +211,25 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- main -->
|
||||
<div v-if="currentActive == 3" v-html="nav[currentActive].children.list[0].contentDetail"></div>
|
||||
<div v-show="currentActive == 3" v-html="pageContext"></div>
|
||||
<div v-for="(item, index) in nav " :key=index>
|
||||
<div class="about-conts-item1" v-if="currentActive == index">
|
||||
<div v-if="currentActive == 0 || currentActive == 1 " class="neirong" v-html="pageContextList[index]"></div>
|
||||
<div class="about-conts-item1" v-show="currentActive == index">
|
||||
<div v-show="currentActive == 0 || currentActive == 1 " class="neirong" v-html="pageContext"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="currentActive == 2 " class="wrapbox">
|
||||
<div class="rsr" v-for="(item,index) in nav[currentActive].children.list" @click="goDeatail(item)" >
|
||||
<div v-show="currentActive == 2 " class="wrapbox">
|
||||
<div class="rsr" v-for="(item,index) in otherList" @click="goDeatail(item)" >
|
||||
<img :src=" imgurl + item.contentImg" style="width: 255px;height: 220px">
|
||||
<div class="size-t">{{item.contentTitle}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="currentActive == 4 " class="wrapbox">
|
||||
<div class="newRsr" v-for="(item,index) in nav[currentActive].children.list" @click="goDeatail(item)" >
|
||||
<div v-show="currentActive == 4 " class="wrapbox">
|
||||
<div class="newRsr" v-for="(item,index) in otherList" @click="goDeatail(item)" >
|
||||
<img :src=" imgurl + item.contentImg" style="width: 255px;height: 220px">
|
||||
<div class="size-t">{{item.contentTitle}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="currentActive == 5 " class="wrapbox">
|
||||
<div v-show="currentActive == 5 " class="wrapbox">
|
||||
<div class="noticeRsr" v-for="(item,index) in noticeList" @click="goDeatail(item)" >
|
||||
<div >{{item.contentTitle}}</div>
|
||||
<div >{{item.publishDate}}</div>
|
||||
@ -238,7 +238,7 @@
|
||||
<div v-show="currentActive == 2 || currentActive == 4 || currentActive === 5" >
|
||||
<page-util :category-id="categoryId" @event-message="handleDataFromPage" />
|
||||
</div>
|
||||
<div class="anniu" v-if="registerStatus == 1 && currentActive == 0" @click="toRegister" >去报名</div>
|
||||
<div class="anniu" v-show="registerStatus == 1 && currentActive == 0" @click="toRegister" >去报名</div>
|
||||
</div>
|
||||
|
||||
<footers></footers>
|
||||
@ -248,7 +248,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn,getbaseInfo } from "@/api/officialWebsite/getPageData";
|
||||
import { getPageData, getCategoryByParentId,getbaseInfo } from "@/api/officialWebsite/getPageData";
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import PageUtil from '@/views/officialWebsite/Components/page'
|
||||
@ -340,19 +340,20 @@ export default {
|
||||
{ required: true, message: "邮寄地址不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
pageContextList: [],
|
||||
pageContext: '',
|
||||
nav: [
|
||||
// { name: '大赛信息' },
|
||||
// { name: '比赛通知' },
|
||||
// { name: '报名信息' },
|
||||
// { name: '获奖信息' },
|
||||
// { name: '赛事风采' },
|
||||
],
|
||||
currentActive: 0,
|
||||
isMounted: false,
|
||||
input4: "",
|
||||
categoryId: "",
|
||||
noticeList:[],
|
||||
routeParam : {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
},
|
||||
otherList:[],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -408,40 +409,29 @@ export default {
|
||||
|
||||
if (value === 5){
|
||||
this.categoryId = this.getNoticeId()
|
||||
}else {
|
||||
}else if (value === 0 || value === 1 || value === 3) {
|
||||
this.pageContext = ""
|
||||
this.getContentDetail()
|
||||
}else{
|
||||
this.otherList = []
|
||||
this.categoryId = this.nav[value].id;
|
||||
}
|
||||
// console.log(this.nav,'nav' )
|
||||
},
|
||||
initPageData() {
|
||||
getbaseInfo().then(res=>{
|
||||
this.registerStatus = res.data.registerStatus
|
||||
console.log(res,'5')
|
||||
})
|
||||
this.categoryId = this.$route.query.id
|
||||
// console.log(this.$route.query.id, this.categoryId)
|
||||
let routeParam = {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getPageColumn(routeParam).then(response => {
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
let context = "";
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
context += element.contentDetail;
|
||||
});
|
||||
|
||||
this.pageContextList.push(context);
|
||||
|
||||
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
getCategoryByParentId(this.routeParam.categoryId).then(res => {
|
||||
this.nav = res.data
|
||||
this.getContentDetail()
|
||||
})
|
||||
},
|
||||
getContentDetail(){
|
||||
this.routeParam.categoryId = this.nav[this.currentActive].id
|
||||
getPageData(this.routeParam).then(response => {
|
||||
this.pageContext = response.data.list[0].contentDetail
|
||||
})
|
||||
},
|
||||
getNoticeId(){
|
||||
getTab().then(res => {
|
||||
@ -450,14 +440,14 @@ export default {
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getbanner(query).then(res => {
|
||||
getCategoryByParentId(query.categoryId).then(res => {
|
||||
this.categoryId = res.data[1].id
|
||||
})
|
||||
})
|
||||
},
|
||||
handleDataFromPage(data){
|
||||
if (this.currentActive === 2 || this.currentActive == 4){
|
||||
this.nav[this.currentActive].children.list = data
|
||||
this.otherList = data
|
||||
}
|
||||
if (this.currentActive === 5){
|
||||
this.noticeList = data
|
||||
|
@ -29,7 +29,7 @@
|
||||
<div class="info-item" v-for="(item,index) in fourlist" :key="index">
|
||||
<img :src="imgurl + item.contentImg" alt="">
|
||||
<div class="p">{{item.contentTitle}}</div>
|
||||
<div class="desc" v-html="item.contentDetail"></div>
|
||||
<div class="desc" v-html="item.summary"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -42,10 +42,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTab, getbanner, getinfo } from "@/api/gw/home";
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import {getCategoryByParentId} from "@/api/officialWebsite/getPageData";
|
||||
import {getinfo} from "@/api/gw/home";
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
export default {
|
||||
@ -95,16 +95,23 @@ export default {
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
debugger;
|
||||
getPageColumn(routeParam).then(response => {
|
||||
debugger;
|
||||
|
||||
response.data[0].children.list.forEach(cloumnItem => {
|
||||
this.fourlist.push(cloumnItem);
|
||||
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
getCategoryByParentId(routeParam.categoryId).then(res => {
|
||||
routeParam.categoryId = res.data[0].id
|
||||
getinfo(routeParam).then(response => {
|
||||
this.fourlist = response.data.list
|
||||
})
|
||||
})
|
||||
// getinfoPart(routeParam).then(res => {
|
||||
// console.log(res.data)
|
||||
// })
|
||||
// getPageColumn(routeParam).then(response => {
|
||||
//
|
||||
// response.data[0].children.list.forEach(cloumnItem => {
|
||||
// this.fourlist.push(cloumnItem);
|
||||
//
|
||||
// // cloumnItem.categoryName
|
||||
// });
|
||||
// });
|
||||
|
||||
},
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getContent, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import { getContent } from "@/api/officialWebsite/getPageData";
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
|
||||
@ -88,20 +88,20 @@ export default {
|
||||
this.currentActive = value
|
||||
},
|
||||
initPageData() {
|
||||
console.log("文章", this.$route.query.id);
|
||||
// console.log("文章", this.$route.query.id);
|
||||
|
||||
let id = this.$route.query.id
|
||||
getContent(id).then(response => {
|
||||
console.log(response)
|
||||
// console.log(response)
|
||||
this.info = response.data;
|
||||
if(response.data.contentType == 0){
|
||||
console.log('文章')
|
||||
// console.log('文章')
|
||||
}
|
||||
if(response.data.contentType == 1){
|
||||
console.log('图片')
|
||||
// console.log('图片')
|
||||
}
|
||||
if(response.data.contentType == 2){
|
||||
console.log('视频')
|
||||
// console.log('视频')
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import { getPageData, } from "@/api/officialWebsite/getPageData";
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
|
||||
@ -85,7 +85,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
goDeatail(data){
|
||||
console.log(data)
|
||||
// console.log(data)
|
||||
if(data.linkType == 0){
|
||||
this.$router.push({
|
||||
name: 'details',
|
||||
@ -111,7 +111,7 @@ export default {
|
||||
// console.log(this.queryParams)
|
||||
if (!this.queryParams.categoryId) return;
|
||||
getPageData(this.queryParams).then(res => {
|
||||
console.log('列表',res)
|
||||
// console.log('列表',res)
|
||||
this.listinfo = res.data.list;
|
||||
this.total =res.data.total;
|
||||
})
|
||||
|
@ -22,13 +22,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="news">
|
||||
<div v-if="currentActive == 0">
|
||||
<div v-show="currentActive == 0">
|
||||
<div class="noticeRsr" v-for="(item,index) in onelist" @click="goDeatail(item)" >
|
||||
<div >{{item.contentTitle}}</div>
|
||||
<div >{{item.publishDate}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="currentActive == 1"> <div class="noticeRsr" v-for="(item,index) in twolist" @click="goDeatail(item)" >
|
||||
<div v-show="currentActive == 1"> <div class="noticeRsr" v-for="(item,index) in twolist" @click="goDeatail(item)" >
|
||||
<div >{{item.contentTitle}}</div>
|
||||
<div >{{item.publishDate}}</div>
|
||||
</div></div>
|
||||
@ -50,7 +50,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import { getPageData, getCategoryByParentId } from "@/api/officialWebsite/getPageData";
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import PageUtil from '@/views/officialWebsite/Components/page'
|
||||
@ -83,7 +83,7 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
created() {
|
||||
// 页面加载完毕调用
|
||||
this.initPageData();
|
||||
},
|
||||
@ -106,12 +106,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.currentActive = value
|
||||
if (this.currentActive === 0){
|
||||
this.categoryId = this.oneid
|
||||
}
|
||||
if (this.currentActive === 1){
|
||||
this.categoryId = this.twoid
|
||||
}
|
||||
this.categoryId = this.nav[value].id
|
||||
},
|
||||
goDeatail(data){
|
||||
// console.log(data)
|
||||
@ -131,28 +126,10 @@ export default {
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
|
||||
getPageColumn(routeParam).then(response => {
|
||||
console.log(response,"97")
|
||||
this.onelist = response.data[0].children.list
|
||||
this.oneid = response.data[0].id
|
||||
this.twolist = response.data[1].children.list
|
||||
this.twoid = response.data[1].id
|
||||
this.categoryId = response.data[0].id
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
let context = "";
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
context += element.contentDetail;
|
||||
});
|
||||
|
||||
this.pageContextList.push(context);
|
||||
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
getCategoryByParentId(routeParam.categoryId).then(res => {
|
||||
this.nav = res.data
|
||||
this.categoryId = res.data[0].id
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
<!-- main -->
|
||||
<div v-for="(item, index) in nav " :key=index>
|
||||
<div class="about-conts-item1" v-show="currentActive == 1">
|
||||
<div class="neirong" v-html="pageContextList[1]"></div>
|
||||
<div class="neirong" v-html="pageContext"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 专业平台介绍 -->
|
||||
@ -66,7 +66,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import { getPageData, getCategoryByParentId } from "@/api/officialWebsite/getPageData";
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import PageUtil from '@/views/officialWebsite/Components/page/index.vue'
|
||||
@ -88,7 +88,7 @@ export default {
|
||||
categoryId:'',
|
||||
onelist:[],
|
||||
dataList: [],
|
||||
pageContextList: [],
|
||||
pageContext:"",
|
||||
nav: [
|
||||
// { name: '专业平台介绍' },
|
||||
// { name: '软硬件资源介绍' },
|
||||
@ -97,10 +97,14 @@ export default {
|
||||
isMounted: false,
|
||||
professionalResources: "",
|
||||
content: "",
|
||||
|
||||
routeParam : {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
created() {
|
||||
// 页面加载完毕调用
|
||||
this.initPageData();
|
||||
},
|
||||
@ -121,7 +125,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleDataFromPage(data){
|
||||
console.log(data)
|
||||
// console.log(data)
|
||||
this.onelist = data
|
||||
},
|
||||
// 触发导航
|
||||
@ -130,32 +134,22 @@ export default {
|
||||
return
|
||||
}
|
||||
this.currentActive = value
|
||||
if (value === 1){
|
||||
this.getContentDetail();
|
||||
}
|
||||
},
|
||||
getContentDetail() {
|
||||
this.routeParam.categoryId = this.nav[this.currentActive].id
|
||||
getPageData(this.routeParam).then(response => {
|
||||
console.log(response)
|
||||
this.pageContext = response.data.list[0].contentDetail
|
||||
})
|
||||
},
|
||||
initPageData() {
|
||||
|
||||
let routeParam = {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getPageColumn(routeParam).then(response => {
|
||||
console.log(response,'119')
|
||||
this.onelist = response.data[0].children.list
|
||||
this.categoryId = response.data[0].id
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
let context = "";
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
context += element.contentDetail;
|
||||
});
|
||||
|
||||
this.pageContextList.push(context);
|
||||
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
getCategoryByParentId(this.routeParam.categoryId).then(res => {
|
||||
this.nav = res.data
|
||||
this.categoryId = res.data[0].id
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -38,37 +38,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 实践项目 -->
|
||||
<!-- <div v-else-if="currentActive === 2" class="swiper-list">-->
|
||||
<!-- <div class="item" v-for="(item, index) in teachingAchievements2" :key="index">-->
|
||||
<!-- <div class="img">-->
|
||||
<!-- <img :src="imgurl + item.contentImg" alt="" class="imgWO">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="tt">{{ item.contentTitle }}</div>-->
|
||||
<!-- <div class="desc">-->
|
||||
<!-- {{ item.summary }}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="time">{{ item.publishDate }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- 自制仪器设备 -->
|
||||
<!-- <div v-else-if="currentActive === 3" class="swiper-list">-->
|
||||
<!-- <div class="item" v-for="(item, index) in teachingAchievements3" :key="index">-->
|
||||
<!-- <div class="img">-->
|
||||
<!-- <img :src="imgurl + item.contentImg" alt="">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="tt">{{ item.contentTitle }}</div>-->
|
||||
<!-- <!– <div class="desc">-->
|
||||
<!-- {{ item.summary }}-->
|
||||
<!-- </div> –>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- 通用 -->
|
||||
<div class="neirong" v-html="pageContextList[index]" v-else></div>
|
||||
<div class="neirong" v-html="pageContext" v-else></div>
|
||||
|
||||
<!-- 详情数据穿透 -->
|
||||
<div class="team" v-if="currentActive == 999 && isShowDetails">
|
||||
@ -152,7 +124,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import { getPageData, getCategoryByParentId } from "@/api/officialWebsite/getPageData";
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import PageUtil from '@/views/officialWebsite/Components/page'
|
||||
@ -176,7 +148,7 @@ export default {
|
||||
teachingAchievements: [],
|
||||
teachingAchievements2: [],
|
||||
teachingAchievements3: [],
|
||||
pageContextList: [],
|
||||
pageContext: "",
|
||||
categoryId: "",
|
||||
pageNum: 1,
|
||||
input4: "",
|
||||
@ -201,6 +173,11 @@ export default {
|
||||
<p style="box-sizing: inherit; margin-top: 0px; text-align: justify; text-indent: 2em; margin-bottom: 5px; line-height: 1.75em;">
|
||||
<span style="box-sizing: inherit; font-family: 微软雅黑, MicrosoftYaHei;"></span><br/>
|
||||
</p>`,
|
||||
routeParam : {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -230,45 +207,16 @@ export default {
|
||||
this.isShowDetails = false;
|
||||
},
|
||||
initPageData() {
|
||||
|
||||
let routeParam = {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getPageColumn(routeParam).then(response => {
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
let context = "";
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
context += element.contentDetail;
|
||||
});
|
||||
|
||||
this.pageContextList.push(context);
|
||||
// //实践平台
|
||||
// if (cloumnItem.id == "1813831828977618944") {
|
||||
// cloumnItem.children.list.forEach(element => {
|
||||
// this.teachingAchievements.push(element);
|
||||
// });
|
||||
// }
|
||||
// //实践项目
|
||||
// if (cloumnItem.id == "1813831932748894208") {
|
||||
// cloumnItem.id
|
||||
// cloumnItem.children.list.forEach(element => {
|
||||
// this.teachingAchievements2.push(element);
|
||||
// });
|
||||
// }
|
||||
// //自制仪器设备
|
||||
// if (cloumnItem.id == "1813832045458231296") {
|
||||
// cloumnItem.children.list.forEach(element => {
|
||||
// this.teachingAchievements3.push(element);
|
||||
// });
|
||||
// }
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
getCategoryByParentId(this.routeParam.categoryId).then(res => {
|
||||
this.nav = res.data
|
||||
this.getContentDetail()
|
||||
})
|
||||
},
|
||||
getContentDetail(){
|
||||
this.routeParam.categoryId = this.nav[this.currentActive].id
|
||||
getPageData(this.routeParam).then(response => {
|
||||
this.pageContext = response.data.list[0].contentDetail
|
||||
})
|
||||
},
|
||||
handleDataFromPage(data){
|
||||
if (this.currentActive !== 0){
|
||||
|
@ -24,14 +24,14 @@
|
||||
<div class="teaching" v-bind:class="[currentActive == 0 ? 'bj' : '']">
|
||||
<!-- main -->
|
||||
<div class="wrap-box">
|
||||
<div class="box-l" v-if="currentActive == 0" v-for="(item,index) in onelist" :key="index">
|
||||
<div class="box-l" v-if="currentActive == 0" v-for="(item,index) in dataList" :key="index">
|
||||
<div class="img-s">
|
||||
<img :src="imgurl+item.contentImg" style="width: 100%;height: 195px;">
|
||||
</div>
|
||||
<div class="kuang">
|
||||
<div class="time_">{{item.publishDate}}</div>
|
||||
<div class="size_">{{item.contentTitle}}</div>
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div class="d-s" style="justify-content: right ">
|
||||
|
||||
<!-- <el-button type="primary" style="background:#015375 " >在线预览</el-button>-->
|
||||
<el-button @click="goDeatail(item)" >查看详情</el-button>
|
||||
@ -39,14 +39,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-l" v-if="currentActive == 1" v-for="(item,index) in twolist" :key="index">
|
||||
<div class="box-l" v-if="currentActive == 1" v-for="(item,index) in dataList" :key="index">
|
||||
<div class="img-s">
|
||||
<img :src="imgurl+item.contentImg" style="width: 100%;height: 195px;">
|
||||
</div>
|
||||
<div class="kuang">
|
||||
<div class="time_">{{item.publishDate}}</div>
|
||||
<div class="size_">{{item.contentTitle}}</div>
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div class="d-s" style="justify-content: right">
|
||||
|
||||
<!-- <el-button type="primary" style="background:#015375 " >在线预览</el-button>-->
|
||||
<el-button @click="goDeatail(item)" >查看详情</el-button>
|
||||
@ -54,14 +54,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-l" v-if="currentActive == 2" v-for="(item,index) in threelist" :key="index">
|
||||
<div class="box-l" v-if="currentActive == 2" v-for="(item,index) in dataList" :key="index">
|
||||
<div class="img-s">
|
||||
<img :src="imgurl+item.contentImg" style="width: 100%;height: 195px;">
|
||||
</div>
|
||||
<div class="kuang">
|
||||
<div class="time_">{{item.publishDate}}</div>
|
||||
<div class="size_">{{item.contentTitle}}</div>
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<div class="d-s" style="justify-content: right">
|
||||
|
||||
<!-- <el-button type="primary" style="background:#015375 " >在线预览</el-button>-->
|
||||
<el-button @click="goDeatail(item)" >查看详情</el-button>
|
||||
@ -81,7 +81,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import { getPageData, getCategoryByParentId } from "@/api/officialWebsite/getPageData";
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
|
||||
@ -120,10 +120,15 @@ export default {
|
||||
resourceSharing: "",
|
||||
guideBook: "",
|
||||
syllabus: "",
|
||||
|
||||
routeParam : {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
},
|
||||
dataList: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
created() {
|
||||
// 页面加载完毕调用
|
||||
this.initPageData();
|
||||
},
|
||||
@ -145,15 +150,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleDataFromPage(data){
|
||||
if (this.currentActive == 0){
|
||||
this.onelist = data
|
||||
}
|
||||
if (this.currentActive == 1){
|
||||
this.twolist = data
|
||||
}
|
||||
if (this.currentActive == 2){
|
||||
this.threelist = data
|
||||
}
|
||||
this.dataList = data
|
||||
},
|
||||
// 触发导航
|
||||
getCurrentActive(value) {
|
||||
@ -161,71 +158,14 @@ export default {
|
||||
return
|
||||
}
|
||||
this.currentActive = value
|
||||
this.categoryId = this.nav[value].id
|
||||
this.dataList = []
|
||||
},
|
||||
initPageData() {
|
||||
|
||||
let routeParam = {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getPageColumn(routeParam).then(response => {
|
||||
console.log(response)
|
||||
this.onelist = response.data[0].children.list
|
||||
this.oneid = response.data[0].id
|
||||
this.twolist = response.data[1].children.list
|
||||
this.twoid = response.data[1].id
|
||||
this.threelist = response.data[2].children.list
|
||||
this.threeid = response.data[2].id
|
||||
this.categoryId = response.data[0].id
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
let context = "";
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
context += element.contentDetail;
|
||||
});
|
||||
|
||||
this.pageContextList.push(context);
|
||||
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
// //资源共享
|
||||
// let resourceSharingParam = {
|
||||
// "categoryId": "1816771402032877568",
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 10
|
||||
// }
|
||||
// getPageData(resourceSharingParam).then(response => {
|
||||
// response.data.list.forEach(element => {
|
||||
// this.resourceSharing += element.contentDetail;
|
||||
// });
|
||||
// })
|
||||
// //实验指导书
|
||||
// let guideBookParam = {
|
||||
// "categoryId": "1813828546838269952",
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 10
|
||||
// }
|
||||
// getPageData(guideBookParam).then(response => {
|
||||
// response.data.list.forEach(element => {
|
||||
// this.guideBook += element.contentDetail;
|
||||
// });
|
||||
// })
|
||||
// //教学大纲
|
||||
// let syllabusParam = {
|
||||
// "categoryId": "1813828322673692672",
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 10
|
||||
// }
|
||||
// getPageData(syllabusParam).then(response => {
|
||||
// response.data.list.forEach(element => {
|
||||
// this.syllabus += element.contentDetail;
|
||||
// });
|
||||
// })
|
||||
|
||||
getCategoryByParentId(this.routeParam.categoryId).then(res => {
|
||||
this.nav = res.data
|
||||
this.categoryId = this.nav[0].id
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -50,13 +50,7 @@
|
||||
<div class="team" v-if="currentActive == 0">
|
||||
<div class="tt">教学团队</div>
|
||||
<div class="team-list">
|
||||
<div v-html="teachingTeam[0].contentDetail"></div>
|
||||
<!-- <div class="item" v-for="(item, index) in teachingTeam" :key="index">-->
|
||||
<!-- <div class="img">-->
|
||||
<!-- <img :src="imgurl + item.contentImg" alt="" class="imgWO">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="tts">{{ item.contentTitle }}</div>-->
|
||||
<!-- </div>-->
|
||||
<div v-html="teachingTeam"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -78,7 +72,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import {getCategoryByParentId, getPageData} from "@/api/officialWebsite/getPageData";
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import PageUtil from "@/views/officialWebsite/Components/page"
|
||||
@ -108,7 +102,12 @@ export default {
|
||||
],
|
||||
currentActive: 0,
|
||||
isMounted: false,
|
||||
categoryId: "0"
|
||||
categoryId: "",
|
||||
routeParam : {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -137,48 +136,18 @@ export default {
|
||||
}
|
||||
},
|
||||
initPageData() {
|
||||
|
||||
let routeParam = {
|
||||
"categoryId": this.$route.query.id,
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getPageColumn(routeParam).then(response => {
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
//教学团队
|
||||
if (cloumnItem.id == "1816773589098172416") {
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
this.teachingAchievements.push(element);
|
||||
});
|
||||
}
|
||||
//教学团队
|
||||
if (cloumnItem.id == "1816773517664980992") {
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
this.teachingTeam.push(element);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
getCategoryByParentId(this.routeParam.categoryId).then(res => {
|
||||
this.nav = res.data
|
||||
this.routeParam.categoryId = this.nav[0].id
|
||||
getPageData(this.routeParam).then(response => {
|
||||
this.teachingTeam = response.data.list[0].contentDetail
|
||||
})
|
||||
})
|
||||
},
|
||||
handleDataFromPage(data){
|
||||
if (this.currentActive !== 0){
|
||||
this.teachingAchievements = data
|
||||
}
|
||||
// if (this.currentActive === 2 || this.currentActive == 4){
|
||||
// this.nav[this.currentActive].children.list = data
|
||||
// }
|
||||
// if (this.currentActive === 5){
|
||||
// this.noticeList = data
|
||||
// }
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,6 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import { getTab, getbanner, getBaseInfo, imitationList, imitationId } from '@/api/gw/home'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
@ -137,7 +136,7 @@ export default {
|
||||
goDeatail(data){
|
||||
|
||||
imitationId(data.id).then(res=>{
|
||||
console.log(res,'调用成功')
|
||||
// console.log(res,'调用成功')
|
||||
})
|
||||
window.open(data.imitationLink, '_blank');
|
||||
|
||||
@ -163,33 +162,6 @@ export default {
|
||||
"pageNum": 1,
|
||||
"pageSize": 10
|
||||
}
|
||||
getPageColumn(routeParam).then(response => {
|
||||
response.data.forEach(cloumnItem => {
|
||||
this.nav.push(cloumnItem);
|
||||
|
||||
let context = "";
|
||||
cloumnItem.children.list.forEach(element => {
|
||||
context += element.contentDetail;
|
||||
});
|
||||
|
||||
this.pageContextList.push(context);
|
||||
// 虚拟专业频道
|
||||
if (cloumnItem.id == "1818243334464999424") {
|
||||
if (cloumnItem.children) {
|
||||
//取首条数据作为顶部块展示
|
||||
// this.topSwiperData = cloumnItem.children.list[0];
|
||||
//除首条以外,用作下部块展示
|
||||
for (let i = 0; i < cloumnItem.children.list.length; i++) {
|
||||
|
||||
this.teachingAchievements.push(cloumnItem.children.list[i]);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// cloumnItem.categoryName
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user