This commit is contained in:
2023-07-11 11:53:16 +08:00
parent cbe1999b51
commit 1eaf929a99
20 changed files with 752 additions and 39 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@@ -13,6 +13,7 @@
<el-menu-item class="menu-item" index="/ranking"><i class="el-icon-trophy" style="color: #ffca00"></i>
</el-menu-item>
<el-menu-item class="menu-item" index="/paper"><i class="el-icon-s-management" style="color: #5b6bc9"></i> </el-menu-item>
<el-menu-item class="menu-item" index="/OneFile"><i class="el-icon-s-promotion" style="color: #fa7bf3"></i>OneFile</el-menu-item>
</el-menu>
<SearchInput class="HeaderInput"></SearchInput>
<el-button @click="openPublishProjects" v-if="this.$route.path!=='/paper'" class="HeaderSubmitBtn" type="success" round icon="el-icon-thumb">提交项目</el-button>

View File

@@ -70,7 +70,7 @@
append-to-body
:close-on-click-modal="false">
<div>
<el-form :model="resisterRuleForm" :rules="rules" ref="resisterRuleForm" class="form">
<el-form :model="resisterRuleForm" :rules="registerRules" ref="resisterRuleForm" class="form">
<el-form-item prop="username">
<!-- v-model双向绑定placeholder不输入内容之前提示 -->
<el-input
@@ -129,6 +129,47 @@
<script>
import axios from "axios";
import Vue from "vue";
const checkPassword = (rule, value, callback) => {
var s_1_1 = "`1234567890-=";
var s_1_2 = "qwertyuiop[]\\";
var s_1_3 = "asdfghjkl;'";
var s_1_4 = "zxcvbnm,./";
var s_2_1 = "`1234567890-=";
var s_2_2 = "QWERTYUIOP[]\\";
var s_2_3 = "ASDFGHJKL;'";
var s_2_4 = "ZXCVBNM,./";
var s_3_1 = "~!@#$%^&*()_+";
var s_3_2 = "QWERTYUIOP{}|";
var s_3_3 = 'ASDFGHJKL:"';
var s_3_4 = "ZXCVBNM<>?";
var boolean = true;
for (var n = 0; n < value.length - 2; n++) {
var char = value[n] + value[n + 1] + value[n + 2];
if (
s_1_1.indexOf(char) >= 0 ||
s_1_2.indexOf(char) >= 0 ||
s_1_3.indexOf(char) >= 0 ||
s_1_4.indexOf(char) >= 0 ||
s_2_1.indexOf(char) >= 0 ||
s_2_2.indexOf(char) >= 0 ||
s_2_3.indexOf(char) >= 0 ||
s_2_4.indexOf(char) >= 0 ||
s_3_1.indexOf(char) >= 0 ||
s_3_2.indexOf(char) >= 0 ||
s_3_3.indexOf(char) >= 0 ||
s_3_4.indexOf(char) >= 0
) {
boolean = false;
break;
}
}
console.log(boolean);
if (boolean == true) {
callback();
}
callback(new Error("密码中键盘顺序字符不得超过三个,请重新输入"));
};
export default {
name: "LoginDialog",
@@ -162,6 +203,25 @@ export default {
password: [{required: true, message: "请输入密码", trigger: "blur"}],
code: [{required: true, message: "请输入验证码", trigger: "blur"}],
},
registerRules: {
username: [
// required规则o失去焦点触发
{required: true, message: "请输入用户名", trigger: "blur"},
],
password: [{required: true, message: "请输入密码", trigger: "blur"},
{
//插入正则验证大小写、数字、至少8位、不常用字符
pattern:
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@#!%^*?&+-])[A-Za-z\d$@#!%^*?&+-]{8,}/,
message: "密码应当至少8位且含有数字、大小写字母及特殊字符",
},
//rule中插入比较复杂的验证方法
{ validator: checkPassword, trigger: "blur" },
],
code: [{required: true, message: "请输入验证码", trigger: "blur"}],
},
}
},
methods:{

View File

@@ -0,0 +1,124 @@
<template>
<div id="container">
<el-row>
<el-col :span="6" :offset="1">
<el-progress :percentage="onePercentage" :color="oneCustomColors" :format="oneFormat" :stroke-width="3"></el-progress>
</el-col>
<el-col :span="6" :offset="1">
<el-progress :percentage="twoPercentage" :color="twoCustomColors" :format="twoFormat" :stroke-width="3"></el-progress>
</el-col>
<el-col :span="6" :offset="1">
<el-progress :percentage="ThreePercentage" :color="ThreeCustomColors" :format="ThreeFormat" :stroke-width="3"></el-progress>
</el-col>
<el-col :span="2" :offset="1" style="line-height: 15px;">
{{content}}
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: "PasswordStrength",
model: {
event: 'change',
prop: 'password'
},
props: {
//密码
password: {
type: [String,Boolean,Number,Object],
required: true,
default: "",
},
},
watch:{
password(newValue){
const mode = this.checkPasswordStrength(newValue);
//逻辑处理
switch (mode) {
//初始化状态
case 0:
this.content = '';
this.onePercentage = 0;
this.twoPercentage = 0;
this.ThreePercentage = 0;
break;
case 1:
this.content = '弱';
this.onePercentage = 100;
this.twoPercentage = 0;
this.ThreePercentage = 0;
break;
case 2:
this.content = '中';
this.onePercentage = 100;
this.twoPercentage = 100;
this.ThreePercentage = 0;
break;
case 3:
this.content = '中';
this.onePercentage = 100;
this.twoPercentage = 100;
this.ThreePercentage = 0;
break;
default:
this.content = '高';
this.onePercentage = 100;
this.twoPercentage = 100;
this.ThreePercentage = 100;
break;
}
}
},
data(){
return{
content:"",
onePercentage:0,
twoPercentage:0,
ThreePercentage:0,
oneCustomColors: [
{color: '#f56c6c', percentage: 100}
],
twoCustomColors: [
{color: '#e6a23c', percentage: 100}
],
ThreeCustomColors: [
{color: '#67c23a', percentage: 100}
]
}
},
methods:{
oneFormat() {
return "";
},
twoFormat() {
return "";
},
ThreeFormat() {
return "";
},
//密码强度验证
checkPasswordStrength(value) {
let mode = 0;
//正则表达式验证符合要求的
if (value.length < 1) return mode;
if (/\d/.test(value)) mode++; //数字
if (/[a-z]/.test(value)) mode++; //小写
if (/[A-Z]/.test(value)) mode++; //大写
if (/\W/.test(value)) mode++; //特殊字符
return mode;
}
}
}
</script>
<style>
.el-progress__text {
display: none;
}
.el-progress-bar {
padding-right: 0px;
margin: 0px;
}
</style>

View File

@@ -265,12 +265,12 @@ export default {
.el-carousel__item:nth-child(2n) {
background-size: cover;
background-image: url("../../assets/images/WebsiteBanner.svg");
background-image: url("../../assets/svg/WebsiteBanner.svg");
}
.el-carousel__item:nth-child(2n+1) {
background-size: cover;
background-image: url("../../assets/images/WebsiteBanner.svg");
background-image: url("../../assets/svg/WebsiteBanner.svg");
}
.card_style{
height:390px;

View File

@@ -0,0 +1,104 @@
<template>
<div style="display:flex;flex-direction:row;flex-wrap: nowrap">
<div style="display: flex;flex-direction:column;flex-wrap: nowrap">
<div class="PageHeader">
<br/>
<el-page-header @back="goBack" style="justify-content:left;display: flex;">
<div slot="title" style="font-size:23px;font-weight: 600;"></div>
<div slot="content" class="test" style="font-size:23px;font-weight: 600;">
<div>OneFile</div>
</div>
</el-page-header>
</div>
<div class="PageContent" style="display: flex;flex-direction: column;flex-wrap: nowrap">
<el-card style="border: none">
<el-image :src="require('@/assets/images/oneFile.png')"></el-image>
<span style="text-align: left;display: flex;flex-direction: row;justify-content: flex-start;margin-top: 15px">
OneFile 汇集了一个文件运行简单一看就懂的开源项目 包括游戏编译器服务器工具实用库等有趣的开源项目而且复制代码就能跑点击即可在线查看源码和试玩
</span>
<div style="margin-top: 20px">
<template>
<el-table
border
:data="tableData"
style="width: 100%;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);border-radius: 10px;border: none">
<el-table-column
prop="name"
label="名称"
width="130">
</el-table-column>
<el-table-column
prop="language"
label="语言"
width="130">
</el-table-column>
<el-table-column
prop="description"
label="描述">
</el-table-column>
</el-table>
</template>
</div>
<el-card style="border: none;margin-top: 20px">
<div style="display: flex;flex-direction: column;flex-wrap: nowrap;justify-content: flex-start;text-align: left">
<b>OneFile:</b><span>一个开源项目在这里你可以找到有趣运行简单的程序同时它也是一个编程挑战你也可以提交一个文件接受挑战<el-link><b>点击加入</b></el-link> OneFile 编程挑战一个文件而已就写点有趣的代码吧</span>
</div>
</el-card>
</el-card>
</div>
</div>
<RightTools></RightTools>
</div>
</template>
<script>
import RightTools from "@/components/Home/RightTools.vue";
export default {
name: "OneFile",
components: {RightTools},
data(){
return{
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}]
}
},
methods:{
goBack() {
window.history.go(-1);
},
}
}
</script>
<style scoped>
::v-deep .el-page-header__left{
left:10px;
}
::v-deep .el-page-header__content{
flex:1;
}
::v-deep .el-table {
tr th,
tr td {
border-right: none;
}
}
</style>

View File

@@ -0,0 +1,63 @@
<template>
<div style="display:flex;flex-direction:row;flex-wrap: nowrap">
<div style="display: flex;flex-direction:column;flex-wrap: nowrap">
<div class="PageHeader">
<br/>
<el-page-header @back="goBack" style="justify-content:left;display: flex;">
<div slot="title" style="font-size:23px;font-weight: 600;"></div>
<div slot="content" class="test" style="font-size:23px;font-weight: 600;">
<div>OneFile</div>
</div>
</el-page-header>
</div>
<div class="PageContent" style="display: flex;flex-direction: column;flex-wrap: nowrap">
<el-card style="border: none">
<div style="display: flex;flex-direction: column;flex-wrap: nowrap;">
<el-card style="box-shadow: none;border-radius: 5px">
</el-card>
<el-card style="box-shadow: none;margin-top: 20px;border-radius: 5px">
</el-card>
</div>
</el-card>
</div>
</div>
<RightTools></RightTools>
</div>
</template>
<script>
import RightTools from "@/components/Home/RightTools.vue";
export default {
name: "OneFileDetail",
components: {RightTools},
data(){
return{
}
},
methods:{
goBack() {
window.history.go(-1);
},
}
}
</script>
<style scoped>
::v-deep .el-page-header__left{
left:10px;
}
::v-deep .el-page-header__content{
flex:1;
}
::v-deep .el-table {
tr th,
tr td {
border-right: none;
}
}
</style>

View File

@@ -74,7 +74,7 @@ export default {
},
// 截取文章内容的前 35 个字,并加上省略号
brief: function() {
return this.projectLists.projectDescription.substr(0, 40) + '...';
return this.projectLists.projectDescription.substr(0, 33) + '...';
},
},

View File

@@ -19,7 +19,7 @@
</div>
<div class="text item" style="display: flex;justify-content: flex-start">
<span style="font-size: 16px;color: #9ca3af">
登录时间: 2023-7-9
登录时间: {{loginTime}}
</span>
</div>
</el-card>
@@ -47,7 +47,7 @@
></i>
<div style="margin-left: 20px;display: flex;flex-direction: column;flex-wrap: nowrap;justify-content: center">
<span style="font-size: 30px;font-weight: bold">
678993 <span>/</span>
{{projectTotal}} <span>/</span>
</span>
<span style="font-size: 15px;color: #9ca3af">总共项目数量</span>
</div>
@@ -67,7 +67,7 @@
></i>
<div style="margin-left: 20px;display: flex;flex-direction: column;flex-wrap: nowrap;justify-content: center">
<span style="font-size: 30px;font-weight: bold">
678993 <span>/</span>
{{userTotal}} <span>/</span>
</span>
<span style="font-size: 15px;color: #9ca3af">总共用户数量</span>
</div>
@@ -87,7 +87,7 @@
></i>
<div style="margin-left: 20px;display: flex;flex-direction: column;flex-wrap: nowrap;justify-content: center">
<span style="font-size: 30px;font-weight: bold">
678993 <span>/</span>
{{AdminTotal}} <span>/</span>
</span>
<span style="font-size: 15px;color: #9ca3af">总共管理员数量</span>
</div>
@@ -107,7 +107,7 @@
></i>
<div style="margin-left: 20px;display: flex;flex-direction: column;flex-wrap: nowrap;justify-content: center">
<span style="font-size: 30px;font-weight: bold">
678993 <span>/</span>
{{ArticleTotal}} <span>/</span>
</span>
<span style="font-size: 15px;color: #9ca3af">总共文章数量</span>
</div>
@@ -127,7 +127,7 @@
></i>
<div style="margin-left: 20px;display: flex;flex-direction: column;flex-wrap: nowrap;justify-content: center">
<span style="font-size: 30px;font-weight: bold">
678993 <span>/</span>
{{CategoryTotal}} <span>/</span>
</span>
<span style="font-size: 15px;color: #9ca3af">总共标签数量</span>
</div>
@@ -147,7 +147,7 @@
></i>
<div style="margin-left: 20px;display: flex;flex-direction: column;flex-wrap: nowrap;justify-content: center">
<span style="font-size: 30px;font-weight: bold">
678993 <span>/</span>
{{CommentTotal}} <span>/</span>
</span>
<span style="font-size: 15px;color: #9ca3af">总共评论数量</span>
</div>
@@ -157,7 +157,9 @@
<!-- eChart -->
<div style="margin-top: 23px;margin-left: 40px">
<el-card style="border: none">
<div id="echart_2" style="width: 20vw;height: 30vh">
</div>
</el-card>
</div>
</div>
@@ -165,22 +167,340 @@
</template>
<script>
import * as echarts from 'echarts'
import Vue from "vue";
import axios from "axios";
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts;
export default {
data() {
return {
userTotal:null,
projectTotal:null,
loginTime:'',
ArticleTotal:'',
CategoryTotal:'',
CommentTotal:'',
AdminTotal:'',
date:[],
Month:[],
Year:[],
}
},
methods: {
getAdminLoginTime(){
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/retlogintime',
// URL 中的查询参数
params: {
adminName:this.$cookie.get('adminName')
}
}).then((res)=>{
that.loginTime=res.data;
});
},
getUserTotal(){
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/userNum',
// URL 中的查询参数
params: {
}
}).then((res)=>{
that.userTotal=res.data;
});
},
getProjectTotal(){
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/countNum',
// URL 中的查询参数
params: {
}
}).then((res)=>{
that.projectTotal=res.data;
});
},
getArticleTotal(){
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/countArticle',
// URL 中的查询参数
params: {
}
}).then((res)=>{
that.ArticleTotal=res.data;
});
},
getAdminTotal(){
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/countAdmin',
// URL 中的查询参数
params: {
}
}).then((res)=>{
that.AdminTotal=res.data;
});
},
getCommentTotal(){
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/countComment',
// URL 中的查询参数
params: {
}
}).then((res)=>{
that.CommentTotal=res.data;
});
},
getCategoryTotal(){
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/countCategory',
// URL 中的查询参数
params: {
}
}).then((res)=>{
that.CategoryTotal=res.data;
});
},
getProjectByTime(){
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/retProjectByTime',
// URL 中的查询参数
params: {
}
}).then((res)=>{
console.log(res);
that.date=res.data.Date;
that.Month=res.data.Month;
that.Year=res.data.Year;
console.log(that.date)
});
},
eChartPic1(){
var myChart =this.$echarts.init(document.getElementById('echart_2'));
const cols = ['#3BDBDB', '#6CEBEB', '#C2FFFF', '#FFFFFF']
var data = this.date;
var data2 = this.Month;
var data3 = this.Year;
var xData = [],
yData = [], xData2 = [],
yData2 = [], xData3 = [],
yData3 = [];
data.map(function (a) {
xData.push(a.date);
yData.push(a.num);
});
data2.map(function (a) {
xData2.push(a.date);
yData2.push(a.num);
});
data3.map(function (a) {
xData3.push(a.date);
yData3.push(a.num);
});
let unit = '个'
var option = {
// backgroundColor: '#FFF',
animation: false,
grid: {
top: '4%',
left: '2%',
right: '2%',
bottom: '2%',
containLabel: true,
},
tooltip: {
trigger: 'axis',
backgroundColor: '#FFF',
extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3)',
axisPointer: {
type: 'shadow'
}
},
xAxis: [{
type: 'category',
axisLabel: {
show: true,
},
axisLine: {
show: false,
lineStyle: {
color: '#8c8c8c',
}
},
axisTick: {
show: false,
alignWithLabel: true,
},
splitLine: {
show: false,
},
data: xData,
},
],
yAxis: [{
name: '数量(' + unit + ')',
type: 'value',
// max: this.setCeil(this.tz_filetransfer_dTotal),
// interval: this.setCeil(this.tz_filetransfer_dTotal)/10,//间隔
// min: 0,
axisLabel: {
show: true,
color: 'rgba(255, 255, 255,.8)',
},
axisLine: {
show: false,
lineStyle: {
color: '#8c8c8c',
}
},
axisTick: {
show: false,
alignWithLabel: true,
},
splitLine: {
show: true,
lineStyle: {
color: '#888888',
},
},
},
],
dataZoom: [
{
type: 'inside', //无滑动条内置缩放 type: 'slider', //缩放滑动条
show: true, //开启
// yAxisIndex: [0], //Y轴滑动
// xAxisIndex: [0],//X轴滑动
start: 1, //初始化时,滑动条宽度开始标度
end: 10, //初始化时,滑动条宽度结束标度
},
],
series: [{
name: '数量',
type: 'line',
symbolSize: 1,
symbol: 'circle',
smooth: true,
yAxisIndex: 0,
showSymbol: false,
lineStyle: {
width: 3,
color: cols[1],
},
itemStyle: {
color: cols[1],
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0.4,
color: 'rgba(194, 255, 255,0.1)',
},
{
offset: 1,
color: 'rgba(108, 235, 235,0.9)',
},
]),
},
},
data: yData,
},
],
}
myChart.setOption(option);
//图表大小变动从新渲染,动态自适应
window.addEventListener("resize", function () {
myChart.resize();
});
myChart.resize({
width: 647,
height: 147
});
let lastdiff = 0
myChart.on('dataZoom', function (params) {
let start = params.batch[0].start
let end = params.batch[0].end
let diff = end - start
// mircodiff > 1说明是放大而不是拖拽
let mircodiff = Math.abs(diff - lastdiff)
if (diff < 30 && mircodiff > 1) {
// 放大之后的操作
let option = myChart.getOption()
// option.xAxis[0].axisLabel.rotate = 0 // 当缩放程度小于40的时候让字体倾斜为0
option.xAxis[0].data = xData;
option.series[0].data = yData;
myChart.clear()
myChart.setOption(option, true)
} else if (diff > 50 && mircodiff > 1) {
// 放大之后的操作
let option = myChart.getOption()
// option.xAxis[0].axisLabel.rotate = 0 // 当缩放程度小于40的时候让字体倾斜为0
option.xAxis[0].data = xData2;
option.series[0].data = yData2;
myChart.clear()
myChart.setOption(option, true)
}
if (diff >= 80 && mircodiff > 1) {
// 缩小回去的操作
let option = myChart.getOption()
// option.xAxis[0].axisLabel.rotate = 50 // 当缩放程度大于40的时候让字体开始倾斜
option.xAxis[0].data = xData3;
option.series[0].data = yData3;
myChart.clear()
myChart.setOption(option, true)
}
lastdiff = diff;
});
}
},
mounted() {
this.getUserTotal();
this.getProjectTotal();
this.getAdminLoginTime();
this.getArticleTotal();
this.getCommentTotal();
this.getAdminTotal();
this.getCategoryTotal();
this.getProjectByTime();
this.eChartPic1();
}
}

View File

@@ -7,7 +7,7 @@
<div style="height:50px;width:100%;"></div>
<el-card shadow="always" class="card_style" >
<el-table :data="List" :header-row-style="{height:'20px'}" :cell-style="{padding:'2px'}" border>
<el-table :data="List" :header-row-style="{height:'20px'}" :cell-style="{padding:'2px'}" border @row-dblclick="toDetailPage" style=";cursor: pointer">
<el-table-column label="文章id" key="articleId" prop="articleId" width="100" align="center" />
<el-table-column label="文章标题" key="articleTitle" prop="articleTitle" width="200" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="发布者id" key="userId" prop="userId" width="100" align="center" />
@@ -48,9 +48,9 @@
<template slot-scope="scope">
<div class="ButtonBlock">
<img class="MyButton" @click="handleEdit(scope.row)"
src="../../../assets/images/EditButton.svg" style="width:60px">
src="../../../assets/svg/EditButton.svg" style="width:60px">
<img class="MyButton" @click="handleDelete(scope.row)"
src="../../../assets/images/DeleteButton.svg" style="width:60px">
src="../../../assets/svg/DeleteButton.svg" style="width:60px">
</div>
</template>
</el-table-column>
@@ -317,6 +317,14 @@ export default {
}
});
},
toDetailPage(row){
this.$router.push({
path:'/ArticleDetail',
query: {
id: row.articleId,
refresh: true
}})
}
}

View File

@@ -8,10 +8,14 @@
<el-card style="width:1000px;margin-left:200px;" shadow="always" class="card_style">
<div style="width:900px;margin-left:30px;">
<el-table width="400" :data="List" :header-row-style="{height:'20px'}" :cell-style="{padding:'2px'}" border>
<el-table-column label="标签名" key="categoryName" prop="categoryName" width="200" align="center" :show-overflow-tooltip="true"/>
<el-table width="400" :data="List" :header-row-style="{height:'20px'}" :cell-style="{padding:'2px'}" border style=";cursor: pointer">
<el-table-column label="标签id" key="categoryId" prop="categoryId" width="100" align="center" />
<el-table-column label="标签图标" key="category" prop="category" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="标签" key="categoryName" prop="categoryName" width="200" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="标签图标" key="category" prop="category" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-html="scope.row.category"></span>
</template>
</el-table-column>
<el-table-column label="是否有效" key="isValid" prop="isValid" align="center">
<template slot-scope="scope">
<el-switch
@@ -29,9 +33,9 @@
<template slot-scope="scope">
<div class="ButtonBlock">
<img class="MyButton" @click="handleEdit(scope.row)"
src="../../../assets/images/EditButton.svg" style="width:60px">
src="../../../assets/svg/EditButton.svg" style="width:60px">
<img class="MyButton" @click="handleDelete(scope.row)"
src="../../../assets/images/DeleteButton.svg" style="width:60px">
src="../../../assets/svg/DeleteButton.svg" style="width:60px">
</div>
</template>
</el-table-column>

View File

@@ -10,7 +10,7 @@
<el-table
:header-row-style="{height:'20px'}" :cell-style="{padding:'2px'}" border
:data="dataTable"
style="width: 100%;margin-top: 20px">
style="width: 100%;margin-top: 20px;cursor: pointer" @row-dblclick="toDetailPage">
<el-table-column
prop="commentId"
label="ID"
@@ -100,9 +100,9 @@
<template slot-scope="scope">
<div class="ButtonBlock">
<img class="MyButton" @click="handleEdit(scope.row)"
src="../../../assets/images/EditButton.svg" style="width:60px">
src="../../../assets/svg/EditButton.svg" style="width:60px">
<img class="MyButton" @click="handleDelete(scope.row)"
src="../../../assets/images/DeleteButton.svg" style="width:60px">
src="../../../assets/svg/DeleteButton.svg" style="width:60px">
</div>
</template>
</el-table-column>
@@ -191,6 +191,14 @@ export default {
}
},
methods:{
toDetailPage(row){
this.$router.push({
path:'/ProjectDetail',
query: {
id: row.projectId,
refresh: true
}})
},
editForm(){
this.isEdit=false;
},

View File

@@ -8,9 +8,9 @@
<el-card shadow="always" class="card_style">
<el-table
:header-row-style="{height:'20px'}" :cell-style="{padding:'2px'}" border
:header-row-style="{height:'20px'}" :cell-style="{padding:'2px'}" border @row-dblclick="toDetailPage"
:data="dataTable"
style="width: 100%;margin-top: 20px">
style="width: 100%;margin-top: 20px;cursor: pointer">
<el-table-column
prop="projectId"
label="ID"
@@ -124,9 +124,9 @@
<template slot-scope="scope">
<div class="ButtonBlock">
<img class="MyButton" @click="handleEdit(scope.row)"
src="../../../assets/images/EditButton.svg" style="width:60px">
src="../../../assets/svg/EditButton.svg" style="width:60px">
<img class="MyButton" @click="handleDelete(scope.row)"
src="../../../assets/images/DeleteButton.svg" style="width:60px">
src="../../../assets/svg/DeleteButton.svg" style="width:60px">
</div>
</template>
</el-table-column>
@@ -239,6 +239,14 @@ export default {
}
},
methods:{
toDetailPage(row){
this.$router.push({
path:'/ProjectDetail',
query: {
id: row.projectId,
refresh: true
}})
},
handleChangeStatus($event, id){
if ($event === 1) { // 这里判断一下
// 启用

View File

@@ -13,7 +13,7 @@
<el-table
:header-row-style="{height:'20px'}" :cell-style="{padding:'8px'}" border
:data="dataTable"
style="width: 100%;margin-top: 20px">
style="width: 100%;margin-top: 20px;cursor: pointer">
<el-table-column
prop="adminId"
label="ID"
@@ -57,9 +57,9 @@
<template slot-scope="scope">
<div class="ButtonBlock">
<img class="MyButton" @click="handleEdit(scope.row)"
src="../../../assets/images/EditButton.svg" style="width:60px">
src="../../../assets/svg/EditButton.svg" style="width:60px">
<img class="MyButton" @click="handleDelete(scope.row)"
src="../../../assets/images/DeleteButton.svg" style="width:60px">
src="../../../assets/svg/DeleteButton.svg" style="width:60px">
</div>
</template>
</el-table-column>

View File

@@ -10,7 +10,7 @@
<el-table
:header-row-style="{height:'20px'}" :cell-style="{padding:'2px'}" border
:data="dataTable"
style="width: 100%;margin-top: 20px">
style="width: 100%;margin-top: 20px;cursor: pointer">
<el-table-column
prop="userId"
label="ID"
@@ -61,9 +61,11 @@
<el-table-column
prop="userAvatar"
align="center"
label="头像">
width="120"
:show-overflow-tooltip="true">
label="头像"
width="120">
<template slot-scope="scope">
<img style="width: 50px;height: 50px" :src="'http://localhost:8082/helloGithub_war_exploded/retUserAv?username='+scope.row.userName"/>
</template>
</el-table-column>
<el-table-column
@@ -87,9 +89,9 @@
<template slot-scope="scope">
<div class="ButtonBlock">
<img class="MyButton" @click="handleEdit(scope.row)"
src="../../../assets/images/EditButton.svg" style="width:60px">
src="../../../assets/svg/EditButton.svg" style="width:60px">
<img class="MyButton" @click="handleDelete(scope.row)"
src="../../../assets/images/DeleteButton.svg" style="width:60px">
src="../../../assets/svg/DeleteButton.svg" style="width:60px">
</div>
</template>
</el-table-column>

View File

@@ -57,7 +57,7 @@ export default {
},
computed:{
brief:function(){
return this.project.projectDescription.substr(0, 45) + '...';
return this.project.projectDescription.substr(0, 38) + '...';
},
},
methods:{

View File

@@ -19,7 +19,8 @@ import projectManage from "@/components/System/Manage/projectManage.vue";
import commentManage from "@/components/System/Manage/commentManage.vue";
import categoryManage from "@/components/System/Manage/categoryManage.vue";
import articleManage from "@/components/System/Manage/articleManage.vue";
import OneFile from "@/components/OneFile/OneFile.vue";
import OneFileDetail from "@/components/OneFile/OneFileDetail.vue";
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
@@ -82,6 +83,16 @@ const routes = [
name: 'ArticleDetail',
component: ArticleDetail
},
{
path: '/OneFile',
name: 'OneFile',
component: OneFile
},
{
path: '/OneFileDetail',
name: 'OneFileDetail',
component: OneFileDetail
},
]
},
{