gengx
This commit is contained in:
@@ -335,6 +335,7 @@ export default {
|
||||
width:450px;
|
||||
background-image: url("../../assets/images/最新月刊.png");
|
||||
}
|
||||
|
||||
.card_style{
|
||||
height:390px;
|
||||
font-size: 18px;
|
||||
|
@@ -28,6 +28,7 @@
|
||||
<el-menu-item index="/articleManage"><i class="el-icon-s-management"></i><span v-show="!isCollapse">文章管理</span></el-menu-item>
|
||||
<el-menu-item index="/categoryManage"><i class="el-icon-s-flag"></i><span v-show="!isCollapse">标签管理</span></el-menu-item>
|
||||
<el-menu-item index="/commentManage"><i class="el-icon-s-comment"></i><span v-show="!isCollapse">评论管理</span></el-menu-item>
|
||||
<el-menu-item index="/oneFileManage"><i class="el-icon-files"></i><span v-show="!isCollapse">oneFile管理</span></el-menu-item>
|
||||
|
||||
</el-menu>
|
||||
</div>
|
||||
|
@@ -157,11 +157,11 @@
|
||||
<!-- eChart 图-->
|
||||
<div style="margin-top: 23px;margin-left: 40px;">
|
||||
<el-card style="border: none;height:450px">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="日期统计" name="first">日期统计</el-tab-pane>
|
||||
<el-tab-pane label="月度统计" name="second">月度统计</el-tab-pane>
|
||||
<el-tab-pane label="年度统计" name="third">年度统计</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">-->
|
||||
<!-- <el-tab-pane label="日期统计" name="first">日期统计</el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="月度统计" name="second">月度统计</el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="年度统计" name="third">年度统计</el-tab-pane>-->
|
||||
<!-- </el-tabs>-->
|
||||
<div ref="echart2" style="width: 20vw;height: 30vh">
|
||||
|
||||
</div>
|
||||
@@ -328,13 +328,13 @@ export default {
|
||||
that.date=res.data.Date;
|
||||
that.Month=res.data.Month;
|
||||
that.Year=res.data.Year;
|
||||
Object.keys(that.date).forEach(key=>{
|
||||
that.datecate.push(that.date[key]['date']);
|
||||
let num = parseInt(that.date[key]['num']);
|
||||
let datefac = {"value":num,"date":that.date[key]['date'],"type":"line"};
|
||||
console.log(datefac);
|
||||
console.log(that.date);
|
||||
for(let i=0;i<that.date.length;i++){
|
||||
that.datecate.push(that.date[i]['date']);
|
||||
let num = parseInt(that.date[i]['num']);
|
||||
let datefac = {"value":num,"date":that.date[i]['date'],"type":"line"};
|
||||
that.dateLine.push(datefac);
|
||||
})
|
||||
}
|
||||
console.log(that.dateLine);
|
||||
console.log(that.datecate);
|
||||
});
|
||||
|
239
src/components/System/Manage/oneFileManage.vue
Normal file
239
src/components/System/Manage/oneFileManage.vue
Normal file
@@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="HeadLine">
|
||||
<div class="HeadSquare"></div>
|
||||
<div class="TitleFont">用户管理</div>
|
||||
</div>
|
||||
<div style="height:50px;width:100%;"></div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
name: "oneFileManage",
|
||||
data(){
|
||||
return{
|
||||
isEdit:true,
|
||||
List:[],
|
||||
dialogVisible:false,
|
||||
form:{
|
||||
articleId:'',
|
||||
userId: '',
|
||||
articleContent: '',
|
||||
articleTitle: '',
|
||||
articleIco: '',
|
||||
readCount: '',
|
||||
isValid: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
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({
|
||||
method:'post',
|
||||
url:'http://localhost:8082/helloGithub_war_exploded/selectAllArticleByadmin',
|
||||
params:{
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.List = res.data;
|
||||
})
|
||||
// /selectAllArticleByadmin
|
||||
},
|
||||
closeDialog() {
|
||||
// 先重置
|
||||
this.GetData();
|
||||
// 后关闭
|
||||
this.dialogVisible = false;
|
||||
this.isEdit=true;
|
||||
},
|
||||
editForm(){
|
||||
this.isEdit=false;
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
openDialog(){
|
||||
this.dialogVisible=true;
|
||||
},
|
||||
handleEdit(index) {
|
||||
this.openDialog();
|
||||
// 深拷贝
|
||||
this.form = index;
|
||||
},
|
||||
handleDelete(index) {
|
||||
var that=this;
|
||||
this.$confirm('此操作将永久删除该文章, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/deleteArticleByAdmin',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
articleId: index.articleId,
|
||||
}
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 500) {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: res.data.msg,
|
||||
offset: 50
|
||||
});
|
||||
} else {
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
message: ('i', {style: 'color: teal'}, "删除成功"),
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
that.GetData();
|
||||
}
|
||||
|
||||
});
|
||||
}).catch(() => {
|
||||
// 点击取消:不删除了
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
var _this = this;
|
||||
//调用方法提交
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/updateArticleByAdmin',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
articleId: this.form.articleId,
|
||||
userId: this.form.userId,
|
||||
articleContent: this.form.articleContent,
|
||||
articleTitle: this.form.articleTitle,
|
||||
articleIco: this.form.articleIco,
|
||||
readCount: this.form.readCount,
|
||||
isValid: this.form.isValid,
|
||||
}
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 500) {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: res.data.msg,
|
||||
offset: 50
|
||||
});
|
||||
|
||||
} else {
|
||||
_this.isEdit=true;
|
||||
_this.dialogVisible = false;
|
||||
_this.GetData();
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
message: ('i', {style: 'color: teal'}, "更新成功!"),
|
||||
type: 'success',
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
toDetailPage(row){
|
||||
this.$router.push({
|
||||
path:'/ArticleDetail',
|
||||
query: {
|
||||
id: row.articleId,
|
||||
refresh: true
|
||||
}})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@@ -21,6 +21,7 @@ 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";
|
||||
import oneFileManage from "@/components/System/Manage/oneFileManage.vue";
|
||||
const originalPush = VueRouter.prototype.push
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
@@ -111,6 +112,12 @@ const routes = [
|
||||
meta: {title: '首页'},
|
||||
component: AdminHome
|
||||
},
|
||||
{
|
||||
path: '/oneFileManage',
|
||||
name: 'oneFileManage',
|
||||
meta: {title: 'oneFile管理'},
|
||||
component: oneFileManage
|
||||
},
|
||||
{
|
||||
path: '/systemManage',
|
||||
meta: {title: '系统管理'},
|
||||
|
Reference in New Issue
Block a user