This commit is contained in:
许允枞 2025-02-27 18:00:10 +08:00
parent 2b07763429
commit 4fdb6b8d2e
17 changed files with 763 additions and 89 deletions

View File

@ -0,0 +1,149 @@
package com.ruoyi.cms.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.cms.domain.vo.SchoolImport;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* @Description: 学校相关接口
* @Author: 86187
* @Date: 2025/02/27 14:41
* @Version: 1.0
*/
@RequestMapping("/school")
@RestController
public class SchoolController extends BaseController {
@Autowired
private ISysDictDataService sysDictDataService;
/**
* 获取学校列表
*
* @param schoolName
* @return
*/
@GetMapping("/getSchoolList")
public TableDataInfo getSchoolList(@RequestParam(required=false) String schoolName) {
SysDictData dictData = new SysDictData();
dictData.setDictType("school_name");
if (StringUtils.isNotEmpty(schoolName)) {
dictData.setDictLabel(schoolName);
}
startPage();
List<SysDictData> sysDictData = sysDictDataService.selectDictDataList(dictData);
return getDataTable(sysDictData);
}
/**
* 添加学校
* @param dictData
* @return
*/
@PostMapping("/add")
public AjaxResult add(@RequestBody SysDictData dictData) {
if (StringUtils.isEmpty(dictData.getDictLabel())) {
return AjaxResult.error("学校名称不能为空");
}
//查询是否有重复
dictData.setDictType("school_name");
dictData.setDictValue(dictData.getDictLabel());
String s = sysDictDataService.selectDictLabel(dictData.getDictType(), dictData.getDictLabel());
if (StringUtils.isNotEmpty(s)) {
return AjaxResult.error("学校已存在");
}
dictData.setDictSort(1L);
startPage();
int i = sysDictDataService.insertDictData(dictData);
return AjaxResult.success();
}
@DeleteMapping("/deleteSchool/{id}")
public AjaxResult delete(@PathVariable("id") Long dictCode) {
sysDictDataService.deleteDictDataByIds(new Long[]{dictCode});
return AjaxResult.success();
}
/**
* 获取学校信息
* @param dictCode
* @return
*/
@GetMapping("/getSchoolInfo")
public AjaxResult getSchoolInfo(Long dictCode) {
SysDictData sysDictData1 = sysDictDataService.selectDictDataById(dictCode);
return AjaxResult.success(sysDictData1);
}
@PutMapping("/updateSchool")
public AjaxResult updateSchool(@RequestBody SysDictData sysDictData) {
sysDictDataService.updateDictData(sysDictData);
return AjaxResult.success();
}
/**
* 导出模板
*
* @param response
*/
@PostMapping("/exportSchoolTemplate")
public void exportSchoolTemplate(HttpServletResponse response) {
ExcelUtil<SchoolImport> util = new ExcelUtil<>(SchoolImport.class);
util.importTemplateExcel(response, "学校数据");
}
/**
* 导入学校数据
*
* @param file
* @return
* @throws IOException
*/
@PostMapping("/importSchoolData")
public AjaxResult importData(MultipartFile file) throws IOException {
ExcelUtil<SchoolImport> util = new ExcelUtil<>(SchoolImport.class);
List<SchoolImport> list = util.importExcel(file.getInputStream());
//查询所有的学校
SysDictData query = new SysDictData();
query.setDictType("school_name");
List<SysDictData> result = sysDictDataService.selectDictDataList(query);
List<SysDictData> sysDictDataList = new ArrayList<>();
for (SchoolImport schoolImport : list) {
//判断是否为空
if (ObjectUtil.isEmpty(schoolImport)) {
continue;
}
//判断名称是否重复
if (result.stream().anyMatch(item -> item.getDictLabel().equals(schoolImport.getSchoolName()))) {
continue;
}
SysDictData sysDictData = new SysDictData();
sysDictData.setDictType("school_name");
sysDictData.setDictLabel(schoolImport.getSchoolName());
sysDictData.setDictValue(schoolImport.getSchoolName());
sysDictData.setDictSort(1L);
sysDictDataList.add(sysDictData);
}
if(CollUtil.isNotEmpty(sysDictDataList)) {
sysDictDataService.insertBatchDictData(sysDictDataList);
}
return AjaxResult.success(list);
}
}

View File

@ -0,0 +1,16 @@
package com.ruoyi.cms.domain.vo;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* @Description: 学校导入
* @Author: 86187
* @Date: 2025/02/27 14:44
* @Version: 1.0
*/
@Data
public class SchoolImport {
@Excel(name = "学校名称")
public String schoolName;
}

View File

@ -287,10 +287,10 @@ public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCa
*/
@Override
public List<CmsContent> getLeavesContentList(Long id) {
return contentMapper.selectList(new QueryWrapper<CmsContent>().and(item -> {
item.eq("category_id", id)
.eq("del_flag", 0);
}));
return contentMapper.selectList(new QueryWrapper<CmsContent>().and(item -> {
item.eq("category_id", id)
.eq("del_flag", 0);
}));
}
/**

View File

@ -2,7 +2,7 @@
/* */
"imageActionName": "uploadimage", /* action */
"imageFieldName": "upfile", /* */
"imageMaxSize": 2048000, /* B */
"imageMaxSize": 104857600, /* B */
"imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp", '.webp'], /* */
"imageCompressEnable": true, /* ,true */
"imageCompressBorder": 1600, /* */
@ -24,7 +24,7 @@
"scrawlActionName": "uploadscrawl", /* action */
"scrawlFieldName": "upfile", /* */
"scrawlPathFormat": "image/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */
"scrawlMaxSize": 2048000, /* B */
"scrawlMaxSize": 104857600, /* B */
"scrawlUrlPrefix": "", /* 访 */
"scrawlInsertAlign": "none", /* */
"snapscreenActionName": "uploadimage", /* action */

View File

@ -92,4 +92,6 @@ public interface SysDictDataMapper
* @return 结果
*/
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
int insertBatchDictData(@Param("dictDatas") List<SysDictData> dictDatas);
}

View File

@ -50,6 +50,14 @@ public interface ISysDictDataService
*/
public int insertDictData(SysDictData dictData);
/**
* 新增保存字典数据信息
*
* @param dictDatas 字典数据信息
* @return 结果
*/
public int insertBatchDictData(List<SysDictData> dictDatas);
/**
* 修改保存字典数据信息
*

View File

@ -91,6 +91,18 @@ public class SysDictDataServiceImpl implements ISysDictDataService
return row;
}
/**
* 新增保存字典数据信息
*
* @param dictDatas 字典数据信息
* @return 结果
*/
@Override
public int insertBatchDictData(List<SysDictData> dictDatas) {
dictDataMapper.insertBatchDictData(dictDatas);
return 0;
}
/**
* 修改保存字典数据信息
*

View File

@ -120,5 +120,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sysdate()
)
</insert>
<insert id="insertBatchDictData">
insert into sys_dict_data(
<if test="dictDatas != null and dictDatas.size() > 0">
<foreach collection="dictDatas" item="dictData" separator=",">
<if test="dictData.dictSort != null">dict_sort,</if>
<if test="dictData.dictLabel != null and dictData.dictLabel != ''">dict_label,</if>
<if test="dictData.dictValue != null and dictData.dictValue != ''">dict_value,</if>
<if test="dictData.dictType != null and dictData.dictType != ''">dict_type,</if>
<if test="dictData.cssClass != null and dictData.cssClass != ''">css_class,</if>
<if test="dictData.listClass != null and dictData.listClass != ''">list_class,</if>
<if test="dictData.isDefault != null and dictData.isDefault != ''">is_default,</if>
<if test="dictData.status != null">status,</if>
<if test="dictData.remark != null and dictData.remark != ''">remark,</if>
<if test="dictData.createBy != null and dictData.createBy != ''">create_by,</if>
create_time
</foreach>
</if>
)
values
<foreach collection="dictDatas" item="dictData" separator=",">
(
<if test="dictData.dictSort != null">#{dictData.dictSort},</if>
<if test="dictData.dictLabel != null and dictData.dictLabel != ''">#{dictData.dictLabel},</if>
<if test="dictData.dictValue != null and dictData.dictValue != ''">#{dictData.dictValue},</if>
<if test="dictData.dictType != null and dictData.dictType != ''">#{dictData.dictType},</if>
<if test="dictData.cssClass != null and dictData.cssClass != ''">#{dictData.cssClass},</if>
<if test="dictData.listClass != null and dictData.listClass != ''">#{dictData.listClass},</if>
<if test="dictData.isDefault != null and dictData.isDefault != ''">#{dictData.isDefault},</if>
<if test="dictData.status != null">#{dictData.status},</if>
<if test="dictData.remark != null and dictData.remark != ''">#{dictData.remark},</if>
<if test="dictData.createBy != null and dictData.createBy != ''">#{dictData.createBy},</if>
sysdate()
)
</foreach>
</insert>
</mapper>

View File

@ -0,0 +1,49 @@
import request from '@/utils/request'
// 查询教师信息列表
export function listSchool(query) {
return request({
url: '/school/getSchoolList',
method: 'get',
params: query
})
}
// 查询教师信息列表
export function deleteSchool(id) {
return request({
url: '/school/deleteSchool/' + id,
method: 'delete',
})
}
// 新增教师信息
export function addSchool(data) {
return request({
url: '/school/add',
method: 'post',
data: data
})
}
// 新增教师信息
export function exportTemplate() {
return request({
url: '/school/exportSchoolTemplate',
method: 'post',
})
}
// 新增教师信息
export function getSchoolInfo(query) {
return request({
url: '/school/getSchoolInfo',
method: 'get',
params: query
})
}
// 新增教师信息
export function updateSchool(data) {
return request({
url: '/school/updateSchool',
method: 'put',
data: data
})
}

View File

@ -48,20 +48,22 @@ service.interceptors.request.use(config => {
console.warn(`[${config.url}]: ` + '请求数据大小超出允许的5M限制无法进行防重复提交验证。')
return config;
}
const sessionObj = cache.session.getJSON('sessionObj')
const sessionObj = cache.session.getJSON(requestObj.url)
if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
cache.session.setJSON('sessionObj', requestObj)
cache.session.setJSON(requestObj.url, requestObj)
} else {
const s_url = sessionObj.url; // 请求地址
const s_data = sessionObj.data; // 请求数据
const s_time = sessionObj.time; // 请求时间
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
const interval = 1;
console.log(requestObj.time,s_time,'111')
// 间隔时间(ms),小于此时间视为重复提交
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
const message = '数据正在处理,请勿重复提交';
console.warn(`[${s_url}]: ` + message)
return Promise.reject(new Error(message))
} else {
cache.session.setJSON('sessionObj', requestObj)
cache.session.setJSON(requestObj.url, requestObj)
}
}
}

View File

@ -265,10 +265,14 @@ export default {
getLeavesCategoryList().then(response => {
this.categoryList = response.data
console.log(this.temp)
console.log('category', this.categoryList)
this.form.categoryId = this.$route.query.categoryId + ''
console.log('categoryId', this.form.categoryId)
if (!!this.$route.query.categoryId){
console.log('执行')
let flag = false;
this.categoryList.forEach(item => {
if (item.id === this.$route.query.categoryId) {
if (item.id == this.$route.query.categoryId) {
this.form.categoryId = this.$route.query.categoryId.toString()
flag = true;
}
@ -276,6 +280,7 @@ export default {
this.form.categoryId = ""
}
})
console.log('最终的categoryId', this.form.categoryId)
}
})
},

View File

@ -0,0 +1,392 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="教师姓名" prop="teacherName">
<el-input
v-model="queryParams.teacherName"
placeholder="请输入教师姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="学校名称" prop="schoolName">
<el-input
v-model="queryParams.schoolName"
placeholder="请输入学校名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="teacherNumber">
<el-input
v-model="queryParams.teacherNumber"
placeholder="请输入教师手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="年份" prop="year">
<el-date-picker
v-model="queryParams.year"
type="year"
placeholder="选择年份"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport('student')"
>导入学生成绩
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="HitRegistrationTeachInfoList" @selection-change="handleSelectionChange">
<el-table-column label="学校" align="center" prop="dictLabel"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改教师信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="学校姓名" prop="dictLabel">
<el-input v-model="form.dictLabel" placeholder="请输入学校名称"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport"/>
是否更新已经存在的用户数据
</div>
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
@click="importTemplate"
>下载模板
</el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listHitRegistrationTeachInfo,
getHitRegistrationTeachInfo,
delHitRegistrationTeachInfo,
addHitRegistrationTeachInfo,
updateHitRegistrationTeachInfo
} from '@/api/hit/teacherInfo'
import { addSchool, deleteSchool, getSchoolInfo, listSchool, updateSchool } from '@/api/hit/school'
import { getToken } from '@/utils/auth'
export default {
name: 'HitRegistrationTeachInfo',
dicts: ['com_region'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
baseUrl: process.env.VUE_APP_BASE_API,
//
total: 0,
//
HitRegistrationTeachInfoList: [],
//
title: '',
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
dictLabel: null,
teacherNumber: null,
type: null,
year: new Date().getFullYear().toString()
},
upload: {
//
open: false,
//
title: '',
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: 'Bearer ' + getToken() },
//
url: process.env.VUE_APP_BASE_API + '/school/importData'
},
//
form: {},
//
rules: {
dictLabel: [
{ required: true, message: '学校不能为空', trigger: 'blur' }
],
teacherJob: [
{ required: true, message: '教师职务不能为空', trigger: 'blur' }
],
teacherNumber: [
{ required: true, message: '教师手机号不能为空', trigger: 'blur' }
],
teacherEmail: [
{ required: true, message: '教师email不能为空', trigger: 'blur' }
],
teacherSchool: [
{ required: true, message: '教师所在系及专业不能为空', trigger: 'blur' }
],
delFlag: [
{ required: true, message: '逻辑删除0未删除1真删除不能为空', trigger: 'blur' }
]
}
}
},
created() {
this.getList()
},
methods: {
/** 查询教师信息列表 */
getList() {
this.loading = true
this.queryParams.year = new Date(this.queryParams.year).getFullYear().toString()
listSchool(this.queryParams).then(response => {
this.HitRegistrationTeachInfoList = response.rows
this.total = response.total
this.loading = false
})
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert('<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' + response.msg + '</div>', '导入结果', { dangerouslyUseHTMLString: true })
this.getList()
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
hitRegId: null,
teacherName: null,
teacherJob: null,
teacherNumber: null,
teacherEmail: null,
teacherSchool: null,
remark: null,
delFlag: null,
createTime: null,
createBy: null,
updateTime: null,
updateBy: null,
type: null
}
this.resetForm('form')
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
/** 下载模板操作 */
importTemplate() {
let filename = '学校模板_'
const url = 'school/exportSchoolTemplate'
filename = '学生成绩模板_'
this.download(url, {}, filename + new Date().getTime() + '.xlsx')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
//
submitFileForm() {
this.$refs.upload.submit()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加学校信息'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
const data = { dictCode: row.dictCode }
getSchoolInfo(data).then(response => {
this.form = response.data
this.open = true
this.title = '修改学校信息'
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.dictCode != null) {
updateSchool(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addSchool(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},
auditRecord(data, status) {
data.status = status
updateHitRegistrationTeachInfo(data).then(response => {
this.$modal.msgSuccess('成功')
}).finally(res => {
this.getList()
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.dictCode || this.ids
this.$modal.confirm('是否确认删除学校信息编号为"' + ids + '"的数据项?').then(function() {
return deleteSchool(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {
this.download('HitRegistrationTeachInfo/HitRegistrationTeachInfo/export', {
...this.queryParams
}, `HitRegistrationTeachInfo_${new Date().getTime()}.xlsx`)
},
/** 导入按钮操作 */
handleImport(e) {
this.upload.title = '学校导入'
this.upload.open = true
//
this.upload.url = process.env.VUE_APP_BASE_API + '/school/importSchoolData'
}
}
}
</script>

View File

@ -3,7 +3,7 @@
<div class="footer">
<div class="logo">
<div class="d-s">
<div class="logo-box">
<div class="logo-box" style="background: #383838">
<img :src="baseInfo.webImg" />
</div>
<div class="logo-size">
@ -11,13 +11,12 @@
</div>
</div>
<div class="footer-contact">
<div class="p">
<!-- <div class="p">-->
<img src="../../../assets/gw/tel.png" alt="">
<div class="pp">电话{{ this.baseInfo.contactNumber }}</div>
</div>
<!-- <img src="../../../assets/gw/tel.png" alt="">-->
<!-- <div class="pp">电话{{ this.baseInfo.contactNumber }}</div>-->
<!-- </div>-->
<div class="p">
<img src="../../../assets/gw/email.png" alt="">

View File

@ -38,12 +38,12 @@
<img src="../../assets/images/l_img.png" alt="">
</div>
<!-- main -->
<div v-if="currentActive == 0" style="width: 75%;background: #fff;">
<div v-if="currentActive == 0" style="width: 80%;background: #fff;">
<div class="n-box" v-for="(item,index) in onelist" @click="goDeatail(item)" >
<div>
<div class="v-time" >{{item.publishDate}}111</div>
<div class="v-title">{{item.contentTitle}}111</div>
<div class="v-size">{{item.summary || '' }}11</div>
<div class="v-time" >{{item.publishDate}}</div>
<div class="v-title">{{item.contentTitle}}</div>
<div class="v-size">{{item.summary || '' }}</div>
</div>
<div>
<img :src=" imgurl + item.contentImg" style="width: 420px; height: 263px; ">
@ -52,17 +52,17 @@
<page-util style="background: #fff;z-index: 999;position:relative" :category-id="categoryId" @event-message="handleDataFromPage" />
</div>
<div v-else>
<div class="about-conts-item1" v-if="currentActive == 2">
<div class="about-conts-item1" v-if="currentActive == 2 || currentActive == 1">
<div class="noticeRsr" v-html="twolist" >
</div>
</div>
<div class="about-conts-item1" v-if="currentActive == 1">
<div class="dataClass">
<div v-for="(item, index) in dataList">
{{item.contentTitle}}
</div>
</div>
</div>
<!-- <div class="about-conts-item1" v-if="currentActive == 1">-->
<!-- <div class="dataClass">-->
<!-- <div v-for="(item, index) in dataList">-->
<!-- {{item.contentTitle}}-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
@ -189,10 +189,10 @@ export default {
return
}
this.currentActive = value
if (value === 1){
this.getContentByCategoryId(this.nav[value].id)
}
if (value === 2){
// if (value === 1){
// this.getContentByCategoryId(this.nav[value].id)
// }
if (value === 2 || value === 1){
this.getContentDetail()
}
},
@ -667,7 +667,7 @@ export default {
justify-content: space-between;
border-bottom: 1px solid #DDDDDD;
box-sizing: border-box;
padding: 15px 0px;
padding: 15px;
background: #fff;
}
.noticeRsr:hover{

View File

@ -601,7 +601,7 @@ export default {
justify-content: space-between;
border-bottom: 1px solid #DDDDDD;
box-sizing: border-box;
padding: 15px 0px;
padding: 15px;
background: #fff;
}
.noticeRsr:hover{

View File

@ -31,38 +31,38 @@
<img src="../../assets/images/l_img.png" alt="">
</div>
<!-- main -->
<!-- <div v-for="(item, index) in nav " :key=index @click="goDeatail(item)">-->
<!-- <div class="about-conts-item1" v-show="currentActive == 1">-->
<!-- <div class="neirong" v-html="pageContext"></div>-->
<!-- </div>-->
<!-- </div>-->
<div v-for="(item, index) in nav " :key=index @click="goDeatail(item)">
<div class="about-conts-item1">
<div class="neirong" v-html="pageContext"></div>
</div>
</div>
<!-- 专业平台介绍-->
<!-- <div class="ayptjs" v-show="currentActive == 0">-->
<div class="ayptjs">
<!-- <div class="ayptjs">-->
<div class="ayptjs-list">
<div class="item" v-for="(item, index) in onelist" @click="goDeatail(item)" >
<div class="img">
<img :src="imgurl+item.contentImg" alt="">
</div>
<div class="text">
<div class="tts">{{item.contentTitle}}</div>
<div class="desc" >
{{item.summary}}
</div>
</div>
<div class="more">
<div class="xian"></div>
<p>查看详情</p>
</div>
</div>
</div>
<div style="background: #fff;z-index: 999;position:relative">
<page-util :category-id="categoryId" @event-message="handleDataFromPage" />
</div>
<!-- <div class="ayptjs-list">-->
<!-- <div class="item" v-for="(item, index) in onelist" @click="goDeatail(item)" >-->
<!-- <div class="img">-->
<!-- <img :src="imgurl+item.contentImg" alt="">-->
<!-- </div>-->
<!-- <div class="text">-->
<!-- <div class="tts">{{item.contentTitle}}</div>-->
<!-- <div class="desc" >-->
<!-- {{item.summary}}-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="more">-->
<!-- <div class="xian"></div>-->
<!-- <p>查看详情</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div style="background: #fff;z-index: 999;position:relative">-->
<!-- <page-util :category-id="categoryId" @event-message="handleDataFromPage" />-->
<!-- </div>-->
<!-- <div class="neirong" v-html="professionalResources"></div>-->
</div>
<!--&lt;!&ndash; <div class="neirong" v-html="professionalResources"></div>&ndash;&gt;-->
<!-- </div>-->
<!-- 软硬件资源介绍
<div class="about-conts-item1" v-if="currentActive == 1">
@ -170,7 +170,7 @@ export default {
}
this.currentActive = value
// if (value === 1){
// this.getContentDetail();
this.getContentDetail();
// }
this.categoryId = this.nav[this.currentActive].id
// getCategoryByParentId(this.routeParam.categoryId).then(res => {
@ -189,6 +189,7 @@ export default {
getCategoryByParentId(this.routeParam.categoryId).then(res => {
this.nav = res.data
this.categoryId = res.data[0].id
this.getContentDetail()
})
},
}

View File

@ -31,30 +31,30 @@
</div>
<!-- 教学成果 -->
<div class="ayptjs" v-if="currentActive == 1">
<div class="tt">教学成果</div>
<div class="ayptjs-list">
<div class="item" v-for="(item, index) in teachingAchievements" :key="index" @click="showDetails(item)">
<div class="img">
<img :src="imgurl + item.contentImg" alt="">
<!-- <img src="../../assets/gw/Snipaste_2024-07-23_22-51-23.jpg" alt=""> -->
</div>
<div class="text">
<div class="tts">{{ item.contentTitle }}</div>
<div class="desc">
<div class="desc" v-html="item.summary"></div>
</div>
</div>
<div class="more">
<div class="xian"></div>
<p>查看详情</p>
</div>
</div>
</div>
</div>
<!-- <div class="ayptjs" v-if="currentActive == 1">-->
<!-- <div class="tt">教学成果</div>-->
<!-- <div class="ayptjs-list">-->
<!-- <div class="item" v-for="(item, index) in teachingAchievements" :key="index" @click="showDetails(item)">-->
<!-- <div class="img">-->
<!-- <img :src="imgurl + item.contentImg" alt="">-->
<!-- &lt;!&ndash; <img src="../../assets/gw/Snipaste_2024-07-23_22-51-23.jpg" alt=""> &ndash;&gt;-->
<!-- </div>-->
<!-- <div class="text">-->
<!-- <div class="tts">{{ item.contentTitle }}</div>-->
<!-- <div class="desc">-->
<!-- <div class="desc" v-html="item.summary"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="more">-->
<!-- <div class="xian"></div>-->
<!-- <p>查看详情</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- 教学团队 -->
<div class="team" v-if="currentActive == 0">
<div class="team">
<div class="team-list">
<div class="qxing" style="width: 100%;" v-html="teachingTeam"></div>
@ -171,9 +171,13 @@ export default {
}
this.currentActive = value
this.isShowDetails = false;
if (value === 1){
this.categoryId = this.nav[value].id
}
this.routeParam.categoryId = this.nav[value].id
getPageData(this.routeParam).then(response => {
this.teachingTeam = response.data.list[0].contentDetail
})
},
initPageData() {
getCategoryByParentId(this.routeParam.categoryId).then(res => {