mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 04:46:44 +08:00
Merge remote-tracking branch 'origin/stat' into stat
This commit is contained in:
@@ -106,8 +106,8 @@ const ids=function (data){
|
|||||||
* }
|
* }
|
||||||
* */
|
* */
|
||||||
const exportExcel=function (data){
|
const exportExcel=function (data){
|
||||||
// return ajax.postJsonToFile(baseURL,'/xboe/subgroup/m/noteinfo/exportExcel',data);
|
return ajax.postJsonToFile(baseURL,'/xboe/subgroup/m/noteinfo/exportExcel',data);
|
||||||
return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/exportExcel',data);
|
// return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/exportExcel',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ const save=function (data){
|
|||||||
* 同兴趣人匹配查询
|
* 同兴趣人匹配查询
|
||||||
* 参数:下面那个接口的返回值直接传
|
* 参数:下面那个接口的返回值直接传
|
||||||
* */
|
* */
|
||||||
const list=function (data){
|
const list=function (aid){
|
||||||
return ajax.postJson(baseURL,'/xboe/subgroup/m/userhobby/list',data);
|
return ajax.get(baseURL,'/xboe/subgroup/m/userhobby/list?aid='+aid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ p{
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin-top: 70px;
|
margin-top: 70px;
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
|
img{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<el-row class="article-add">
|
<el-row class="article-add">
|
||||||
<el-form ref="form" :rules="rules" :model="addForm" label-position="right" label-width="80px">
|
<el-form ref="form" :rules="rules" :model="addForm" label-position="right" label-width="80px">
|
||||||
<el-form-item prop="title" label="标题">
|
<el-form-item prop="title" label="标题">
|
||||||
<el-input class="title-input" v-model.trim="addForm.title" placeholder="请输入文章标题,长度在 1 到 100 个字符" show-word-limit maxlength="100"></el-input>
|
<el-input class="title-input" v-model.trim="addForm.title" placeholder="请输入文章标题,长度在 1 到 50 个字符" show-word-limit maxlength="50"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="imgInstructions" label="封面">
|
<el-form-item class="imgInstructions" label="封面">
|
||||||
<div class="el-form-item__content">
|
<div class="el-form-item__content">
|
||||||
|
|||||||
@@ -407,7 +407,6 @@
|
|||||||
item.orgInfo=author.orgInfo;
|
item.orgInfo=author.orgInfo;
|
||||||
item.sex=author.sex;
|
item.sex=author.sex;
|
||||||
item.sign=author.sign
|
item.sign=author.sign
|
||||||
console.log(list,'评论信息')
|
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
disableOnInteraction: false ,
|
disableOnInteraction: false ,
|
||||||
delay: 2000,
|
delay: 2000,
|
||||||
},
|
},
|
||||||
speed: 1000, //切换速度,即slider自动滑动开始到结束的时间(单位ms)
|
speed: 2000, //切换速度,即slider自动滑动开始到结束的时间(单位ms)
|
||||||
loop:true, //循环切换
|
loop:true, //循环切换
|
||||||
observe:true,
|
observe:true,
|
||||||
peed: 300,//循环速度
|
peed: 300,//循环速度
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<el-dialog :close-on-click-modal='false' title="提问题" label-width="80px" :visible.sync="askQuestionDialog">
|
<el-dialog :close-on-click-modal='false' title="提问题" label-width="80px" :visible.sync="askQuestionDialog">
|
||||||
<!-- <el-form ref="askForm" :model="askForm" :rules="askFormRules" label-position="right" > -->
|
<!-- <el-form ref="askForm" :model="askForm" :rules="askFormRules" label-position="right" > -->
|
||||||
<el-form-item label="标题:" prop="title">
|
<el-form-item label="标题:" prop="title">
|
||||||
<el-input class="title-input" v-model="askForm.title" show-word-limit placeholder="请输入问题标题,字符长度不能高于100" maxlength="100"></el-input>
|
<el-input class="title-input" v-model="askForm.title" show-word-limit placeholder="请输入问题标题,字符长度不能高于50" maxlength="50"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="封面">
|
<el-form-item label="封面">
|
||||||
<imageUpload :value="imageShowUrl" dir="qa" width="410px" height="168px" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></imageUpload>
|
<imageUpload :value="imageShowUrl" dir="qa" width="410px" height="168px" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></imageUpload>
|
||||||
|
|||||||
@@ -148,6 +148,29 @@ export function formatDate(date){
|
|||||||
return newTime;
|
return newTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 把日期格式化为显示时间,yyyy-MM-dd
|
||||||
|
* @param {Object} date
|
||||||
|
*/
|
||||||
|
export function formatDateShort(date){
|
||||||
|
var year = date.getFullYear(),
|
||||||
|
month = date.getMonth() + 1,//月份是从0开始的
|
||||||
|
day = date.getDate(),
|
||||||
|
hour = date.getHours(),
|
||||||
|
min = date.getMinutes(),
|
||||||
|
sec = date.getSeconds();
|
||||||
|
if(month<10){month='0'+month}
|
||||||
|
if(day<10){day='0'+day}
|
||||||
|
if(hour<10){hour='0'+hour}
|
||||||
|
if(min<10){min='0'+min}
|
||||||
|
if(sec<10){sec='0'+sec}
|
||||||
|
var newTime = year + '-' + month + '-' + day;
|
||||||
|
return newTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export function numberToLetter(x){ //此方法和移到utils中去
|
export function numberToLetter(x){ //此方法和移到utils中去
|
||||||
let s = "";
|
let s = "";
|
||||||
while (x > 0) {
|
while (x > 0) {
|
||||||
|
|||||||
@@ -531,41 +531,38 @@
|
|||||||
|
|
||||||
//检查兴趣爱好是否已填报,
|
//检查兴趣爱好是否已填报,
|
||||||
//先检查本地session和 local 15天, 这两个值是在组件中设置的
|
//先检查本地session和 local 15天, 这两个值是在组件中设置的
|
||||||
// let sessionHobby=sessionStorage.getItem('user-hobby-'+this.userInfo.aid);
|
let sessionHobby=sessionStorage.getItem('user-hobby-'+this.userInfo.aid);
|
||||||
// let localHobbyTime=localStorage.getItem('notYet'+this.userInfo.aid);
|
let localHobbyTime=localStorage.getItem('notYet'+this.userInfo.aid);
|
||||||
// if(!sessionHobby){ //只有session中不存在,才会验证
|
console.log("sessionHobby:"+sessionHobby);
|
||||||
// //本地15天验证,localHobby,后续完善
|
if(!sessionHobby){ //只有session中不存在,才会验证
|
||||||
// let flag=true;//请求检查
|
//本地15天验证,localHobby,后续完善
|
||||||
// if(localHobbyTime) {
|
let flag=true;//请求检查
|
||||||
// let day = (new Date() - new Date(localHobbyTime))/(1000*60*60*24);
|
if(localHobbyTime) {
|
||||||
// if(day< 15){
|
let day = (new Date() - new Date(localHobbyTime))/(1000*60*60*24);
|
||||||
// flag = false;
|
if(day< 15){
|
||||||
// }
|
flag = false;
|
||||||
// }
|
}
|
||||||
// if(flag){
|
}
|
||||||
// apiUserhobby.has().then(res=>{
|
if(flag){
|
||||||
// if(res.status == 200) {
|
apiUserhobby.has().then(res=>{
|
||||||
// if(!res.result){
|
if(res.status == 200) {
|
||||||
// //设置需要显示兴趣爱好收集窗口
|
if(!res.result){
|
||||||
// this.userHobby.needShow=true;
|
//设置需要显示兴趣爱好收集窗口
|
||||||
// }
|
|
||||||
// }else{
|
|
||||||
// console.log('兴趣爱好检查失败'+res.message);
|
|
||||||
// }
|
|
||||||
// //检查引导页
|
|
||||||
// this.checkAndShowGuide();
|
|
||||||
// });
|
|
||||||
// }else{
|
|
||||||
// this.checkAndShowGuide();
|
|
||||||
// }
|
|
||||||
// }else{
|
|
||||||
// //不用检查引导页
|
|
||||||
// //this.checkAndShowGuide();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//测试环境中
|
|
||||||
this.userHobby.needShow=true;
|
this.userHobby.needShow=true;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
console.log('兴趣爱好检查失败'+res.message);
|
||||||
|
}
|
||||||
|
//检查引导页
|
||||||
this.checkAndShowGuide();
|
this.checkAndShowGuide();
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.checkAndShowGuide();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
//检查引导页
|
||||||
|
this.checkAndShowGuide();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -579,28 +576,29 @@
|
|||||||
checkAndShowGuide(){
|
checkAndShowGuide(){
|
||||||
//引导页弹框是否显示
|
//引导页弹框是否显示
|
||||||
//检查本地,减少服务器请求的次数
|
//检查本地,减少服务器请求的次数
|
||||||
// let localGuide=localStorage.getItem('user-guide-'+this.userInfo.aid);
|
let localGuide=localStorage.getItem('user-guide-'+this.userInfo.aid);
|
||||||
// if(!localGuide){
|
console.log("=== "+localGuide);
|
||||||
// apiGuide.hasUser().then(res=>{
|
if(!localGuide){
|
||||||
// if(res.status==200){
|
apiGuide.hasUser().then(res=>{
|
||||||
// if(!res.result){
|
if(res.status==200){
|
||||||
// this.$refs.guide.show();
|
if(!res.result){
|
||||||
// }else{
|
this.$refs.guide.show();
|
||||||
// if(this.userHobby.needShow){ this.$refs.userCollection.show();}
|
}else{
|
||||||
// }
|
if(this.userHobby.needShow){ this.$refs.userCollection.show();}
|
||||||
// localStorage.setItem('user-guide-'+this.userInfo.aid,1);
|
}
|
||||||
// }else{
|
localStorage.setItem('user-guide-'+this.userInfo.aid,1);
|
||||||
// console.log('获取引导页检查失败'+res.message);
|
}else{
|
||||||
// //this.$message.error('')
|
console.log('获取引导页检查失败'+res.message);
|
||||||
// if(this.userHobby.needShow){this.$refs.userCollection.show();}
|
//this.$message.error('')
|
||||||
// }
|
if(this.userHobby.needShow){this.$refs.userCollection.show();}
|
||||||
// });
|
}
|
||||||
// }else {
|
});
|
||||||
// if(this.userHobby.needShow){ this.$refs.userCollection.show();}
|
}else {
|
||||||
// }
|
if(this.userHobby.needShow){ this.$refs.userCollection.show();}
|
||||||
|
}
|
||||||
|
|
||||||
//测试情况下
|
//测试情况下
|
||||||
this.$refs.guide.show();
|
// this.$refs.guide.show();
|
||||||
},
|
},
|
||||||
closeGuide(){ //关闭引导页
|
closeGuide(){ //关闭引导页
|
||||||
if(this.userHobby.needShow){
|
if(this.userHobby.needShow){
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
userhobbyInfo() {
|
userhobbyInfo() {
|
||||||
let $this=this;
|
let $this=this;
|
||||||
$this.interestedList=[];
|
$this.interestedList=[];
|
||||||
apiUserhobby.list({aid:this.pageId}).then(res=>{
|
apiUserhobby.list(this.pageId).then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
let ids = res.result.map(item=>item.aid);
|
let ids = res.result.map(item=>item.aid);
|
||||||
const noReapetIds = [...new Set(ids)];
|
const noReapetIds = [...new Set(ids)];
|
||||||
|
|||||||
@@ -48,9 +48,13 @@
|
|||||||
<div v-else>
|
<div v-else>
|
||||||
<div v-if="dataList.list.length == 0">
|
<div v-if="dataList.list.length == 0">
|
||||||
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||||
<div v-else class="zan-wu">暂无数据</div>
|
<div v-else class="zan-wu">
|
||||||
|
<img :src="`${webBaseUrl}/images/nocouresimg.png`" alt="">
|
||||||
|
<div>暂无数据</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- </el-tab-pane> -->
|
<!-- </el-tab-pane> -->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,10 @@
|
|||||||
<div v-else>
|
<div v-else>
|
||||||
<div v-if="dataList.list.length == 0">
|
<div v-if="dataList.list.length == 0">
|
||||||
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
|
||||||
<div v-else class="zan-wu">暂无数据</div>
|
<div v-else class="zan-wu">
|
||||||
|
<img :src="`${webBaseUrl}/images/nocouresimg.png`" alt="">
|
||||||
|
<div>暂无数据</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </el-tab-pane> -->
|
<!-- </el-tab-pane> -->
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<span style="margin-left:14px">{{item.openType == 9?'公开':'私密'}}</span>
|
<span style="margin-left:14px">{{item.openType == 9?'公开':'私密'}}</span>
|
||||||
<h6>{{ item.sysUpdateTime }}</h6>
|
<h6>{{ item.sysUpdateTime }}</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="all-content">
|
<div class="all-content" style="word-break:break-all;">
|
||||||
<span v-if="item.contentType != 3">{{ item.content }}</span>
|
<span v-if="item.contentType != 3">{{ item.content }}</span>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<template v-for="img in item.content">
|
<template v-for="img in item.content">
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="export-dialog-right">
|
<div class="export-dialog-right">
|
||||||
<p>累计导出{{exportPreData.length}}条</p>
|
<p>累计导出{{exportPreData.length}}条</p>
|
||||||
<p style="margin-top:10px">导出时间:{{formatDate(new Date())}}</p>
|
<p style="margin-top:10px">导出时间:{{formatDateShort(new Date())}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -176,7 +176,7 @@ import interactBar from '@/components/Portal/interactBar.vue';
|
|||||||
import FileUpload from '@/components/NoteUpload/index.vue';
|
import FileUpload from '@/components/NoteUpload/index.vue';
|
||||||
import AuthorImg from '@/components/Portal/authorImg.vue';
|
import AuthorImg from '@/components/Portal/authorImg.vue';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import {formatDate} from '@/utils/tools.js';
|
import {formatDate,formatDateShort} from '@/utils/tools.js';
|
||||||
import apiUser from "@/api/system/user.js";
|
import apiUser from "@/api/system/user.js";
|
||||||
import htmlToPdf from '@/utils/htmlToPdf'
|
import htmlToPdf from '@/utils/htmlToPdf'
|
||||||
export default {
|
export default {
|
||||||
@@ -188,6 +188,7 @@ export default {
|
|||||||
return{
|
return{
|
||||||
userData:{},
|
userData:{},
|
||||||
formatDate,
|
formatDate,
|
||||||
|
formatDateShort,
|
||||||
noteFile:{
|
noteFile:{
|
||||||
contentType:null,
|
contentType:null,
|
||||||
type:2,
|
type:2,
|
||||||
|
|||||||
Reference in New Issue
Block a user