更新
This commit is contained in:
@@ -16,9 +16,11 @@
|
||||
<div style="display: flex;flex-direction: row;">
|
||||
<el-avatar style="background-color: transparent" shape="square" :size="70" :src="github.avatar_url"></el-avatar>
|
||||
<div style="display: flex;flex-direction: column;justify-content: space-between;margin-left: 10px">
|
||||
<span v-if="projectName" style="font-size: 30px;color: black;font-weight: bold;display: flex;justify-content: flex-start;text-align: left">
|
||||
<el-link :underline="false" :href="projectUrl" target="_blank" type="primary">
|
||||
<span class="title" v-if="projectName" style="font-size: 30px;color: black;font-weight: bold;display: flex;justify-content: flex-start;text-align: left">
|
||||
{{ briefTopName }}
|
||||
</span>
|
||||
</el-link>
|
||||
<span style="text-align: left;display: flex;flex-direction:row;justify-content: flex-start;font-size: 20px;color: rgb(107 114 128);">
|
||||
{{projectTitle}}
|
||||
</span>
|
||||
@@ -41,7 +43,7 @@
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row;margin-top: 10px;justify-content: space-between">
|
||||
<div style="width: 250px;height: 60px;">
|
||||
<img :src="'https://starchart.cc/'+projectName+'.svg'" style="width: 250px;height: 60px;">
|
||||
<img v-if="projectName" :src="'https://starchart.cc/'+projectName+'.svg'" style="width: 250px;height: 60px;">
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: row;align-items: center;">
|
||||
<el-dropdown>
|
||||
@@ -936,4 +938,7 @@ export default {
|
||||
::v-deep .el-page-header__content{
|
||||
flex:1;
|
||||
}
|
||||
::v-deep .title:hover{
|
||||
color: #00b2ff !important;
|
||||
}
|
||||
</style>
|
@@ -7,13 +7,17 @@
|
||||
<div style="height:50px;width:100%;"></div>
|
||||
|
||||
<el-card shadow="always" class="card_style">
|
||||
<el-table v-model="List" :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>
|
||||
<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" />
|
||||
<el-table-column label="阅读量" key="readCount" prop="readCount" width="100" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="发布时间" key="publishTime" prop="publishTime" width="100" align="center" />
|
||||
<el-table-column label="文章图标" key="articleIco" prop="articleIco" width="150" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="文章图标" key="articleIco" prop="articleIco" width="150" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-image :src="scope.row.articleIco"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文章内容" key="articleContent" prop="articleContent" width="250" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip placement="top" width="150"
|
||||
@@ -35,6 +39,7 @@
|
||||
:inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="handleChangeStatus($event,scope.row.articleId)"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
@@ -92,7 +97,7 @@
|
||||
<el-form-item>
|
||||
<div style="display: flex;flex-direction: row;align-items: center;flex-wrap: nowrap;justify-content: space-between">
|
||||
<el-button @click="editForm()">编辑</el-button>
|
||||
<el-button @click="submit('ruleForm')" type="primary" style=";margin-top:10px">提交</el-button>
|
||||
<el-button @click="submit()" type="primary" style=";margin-top:10px">提交</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -127,6 +132,79 @@ export default {
|
||||
this.GetData();
|
||||
},
|
||||
methods:{
|
||||
handleChangeStatus($event, id){
|
||||
if ($event === 1) { // 这里判断一下
|
||||
// 启用
|
||||
this.$confirm('确认启用吗?', '操作确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/updateisValid_article',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
articleId:id,
|
||||
isValid:$event
|
||||
}
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 200) {
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
message: ('i', {style: 'color: teal'}, res.data.msg),
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
} else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: res.data.msg,
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
} else {
|
||||
// 禁用
|
||||
this.$confirm('确认禁用吗?', '操作确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/updateisValid_article',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
articleId:id,
|
||||
isValid:$event
|
||||
}
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 200) {
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
message: ('i', {style: 'color: teal'}, res.data.msg),
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
} else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: res.data.msg,
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
},
|
||||
GetData(){
|
||||
var that = this;
|
||||
axios({
|
||||
@@ -134,7 +212,7 @@ export default {
|
||||
url:'http://localhost:8082/helloGithub_war_exploded/selectAllArticleByadmin',
|
||||
params:{
|
||||
}
|
||||
}).then(function(res){
|
||||
}).then((res)=>{
|
||||
that.List = res.data;
|
||||
})
|
||||
// /selectAllArticleByadmin
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<el-card style="width:1000px;margin-left:200px;" shadow="always" class="card_style">
|
||||
<div style="width:900px;margin-left:30px;">
|
||||
<el-table width="400" v-model="List" :data="List" :header-row-style="{height:'20px'}" :cell-style="{padding:'2px'}" border>
|
||||
<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-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"/>
|
||||
@@ -20,6 +20,7 @@
|
||||
:inactive-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="handleChangeStatus($event,scope.row.categoryId)"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
@@ -104,6 +105,79 @@ export default {
|
||||
this.GetData();
|
||||
},
|
||||
methods:{
|
||||
handleChangeStatus($event, id){
|
||||
if ($event === 1) { // 这里判断一下
|
||||
// 启用
|
||||
this.$confirm('确认启用吗?', '操作确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/updateisValid_category',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
categoryId:id,
|
||||
isValid:$event
|
||||
}
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 200) {
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
message: ('i', {style: 'color: teal'}, res.data.msg),
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
} else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: res.data.msg,
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
} else {
|
||||
// 禁用
|
||||
this.$confirm('确认禁用吗?', '操作确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/updateisValid_category',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
categoryId:id,
|
||||
isValid:$event
|
||||
}
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 200) {
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
message: ('i', {style: 'color: teal'}, res.data.msg),
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
} else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: res.data.msg,
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
},
|
||||
GetData(){
|
||||
var that = this;
|
||||
axios({
|
||||
@@ -113,7 +187,6 @@ export default {
|
||||
}
|
||||
}).then(function(res){
|
||||
that.List = res.data;
|
||||
console.log(that.List);
|
||||
})
|
||||
// /selectAllArticleByadmin
|
||||
},
|
||||
|
@@ -42,6 +42,10 @@
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
label="是否使用过">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.isUsed===1" type="success">用过</el-tag>
|
||||
<el-tag v-if="scope.row.isUsed===0" type="warning">没用过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="commentTime"
|
||||
@@ -56,6 +60,20 @@
|
||||
align="center"
|
||||
label="项目评分">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="项目评分"
|
||||
width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-rate
|
||||
v-model="scope.row.star"
|
||||
disabled
|
||||
show-score
|
||||
text-color="#ff9900"
|
||||
score-template="{value}">
|
||||
</el-rate>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="likeNum"
|
||||
align="center"
|
||||
@@ -138,8 +156,8 @@
|
||||
|
||||
<el-form-item>
|
||||
<div style="display: flex;flex-direction: row;align-items: center;flex-wrap: nowrap;justify-content: space-between">
|
||||
<el-button @click="resetForm('ruleForm')">重置</el-button>
|
||||
<el-button @click="submit('ruleForm')" type="primary" style=";margin-top:10px">提交</el-button>
|
||||
<el-button @click="editForm()">编辑</el-button>
|
||||
<el-button @click="submit()" type="primary" style=";margin-top:10px">提交</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -173,6 +191,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
editForm(){
|
||||
this.isEdit=false;
|
||||
},
|
||||
handleChangeStatus($event, id){
|
||||
if ($event === 1) { // 这里判断一下
|
||||
// 启用
|
||||
|
@@ -38,6 +38,9 @@
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
label="项目地址">
|
||||
<template slot-scope="scope">
|
||||
<el-link :href="scope.row.projectUrl" :underline="false">{{scope.row.projectUrl}}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="projectIco"
|
||||
@@ -45,7 +48,11 @@
|
||||
width="100"
|
||||
show-overflow-tooltip
|
||||
label="图标">
|
||||
<template slot-scope="scope">
|
||||
<el-image :src="scope.row.projectIco" lazy />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="projectTitle"
|
||||
align="center"
|
||||
|
@@ -61,8 +61,8 @@
|
||||
<el-table-column
|
||||
prop="userAvatar"
|
||||
align="center"
|
||||
label="头像">
|
||||
width="120"
|
||||
label="头像"
|
||||
:show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
|
||||
@@ -132,9 +132,6 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="头像" prop="userAvatar">
|
||||
<el-input v-model="form.userAvatar" placeholder='头像' clearable :disabled="isEdit"></el-input>
|
||||
<template slot-scope="scope">
|
||||
<img :src="'http://localhost:8082/helloGithub_war_exploded/retUserAv?username='+scope.row.username" />
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否有效" prop="isValid">
|
||||
<el-radio-group v-model="form.isValid" :disabled="isEdit">
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<el-card style="border-radius: 10px;margin-top: 10px;">
|
||||
<div style="display: flex;flex-direction: row;flex-wrap: nowrap">
|
||||
<div style="width: 60px;height: 60px;">
|
||||
<el-avatar :size="60" :src="'http://localhost:8082/helloGithub_war_exploded/retUserAv?username='+comments.username">{{ this.$cookie.get('username') }}</el-avatar>
|
||||
<el-avatar v-if="comments.username" :size="60" :src="'http://localhost:8082/helloGithub_war_exploded/retUserAv?username='+comments.username">{{ this.$cookie.get('username') }}</el-avatar>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: nowrap;margin-left: 20px">
|
||||
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;align-items: center">
|
||||
|
@@ -15,7 +15,7 @@
|
||||
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;justify-content: flex-start">
|
||||
<div style="display: flex;flex-direction: row;justify-content: space-between">
|
||||
<div @click="changeAvatar" style="cursor: pointer;width: 100px;height: 100px;display: flex;flex-direction: row;align-items: center">
|
||||
<el-avatar style="display: flex;align-items: center;justify-content: center" :src="'http://localhost:8082/helloGithub_war_exploded/retUserAv?username='+username" :size="90"></el-avatar>
|
||||
<el-avatar v-if="username" style="display: flex;align-items: center;justify-content: center" :src="'http://localhost:8082/helloGithub_war_exploded/retUserAv?username='+username" :size="90"></el-avatar>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: column;margin-left: 15px;">
|
||||
<div style="display: flex;flex-direction: row;align-items: center;justify-content: flex-start;">
|
||||
@@ -145,7 +145,7 @@ export default {
|
||||
data(){
|
||||
return{
|
||||
activeName:'first',
|
||||
username: null,
|
||||
username: '',
|
||||
contributionValue:0,
|
||||
creatTime:null,
|
||||
projectNum:0,
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserInfo()
|
||||
this.getUserInfo();
|
||||
this.getUserDetail();
|
||||
setTimeout(()=>{
|
||||
this.updateUserLevel();
|
||||
@@ -173,13 +173,11 @@ export default {
|
||||
created() {
|
||||
this.updateUserLevel();
|
||||
this.getUserInfo();
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
$route () {
|
||||
if(this.$route.query.refresh){
|
||||
this.getUserInfo() //重新调用http请求实现页面的重新渲染
|
||||
this.getUserInfo(); //重新调用http请求实现页面的重新渲染
|
||||
this.getUserDetail();
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user