2024.5.13 后台优化

This commit is contained in:
libao 2024-05-13 11:18:05 +08:00
parent 23362cd6e5
commit e689f0e99c
4 changed files with 119 additions and 90 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

After

Width:  |  Height:  |  Size: 803 KiB

View File

@ -9,86 +9,86 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建人ID" prop="userId"> <!-- <el-form-item label="创建人ID" prop="userId">-->
<el-input <!-- <el-input-->
v-model="queryParams.userId" <!-- v-model="queryParams.userId"-->
placeholder="请输入创建人ID" <!-- placeholder="请输入创建人ID"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="部门ID" prop="deptId"> <!-- <el-form-item label="部门ID" prop="deptId">-->
<el-input <!-- <el-input-->
v-model="queryParams.deptId" <!-- v-model="queryParams.deptId"-->
placeholder="请输入部门ID" <!-- placeholder="请输入部门ID"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="描述" prop="description"> <!-- <el-form-item label="描述" prop="description">-->
<el-input <!-- <el-input-->
v-model="queryParams.description" <!-- v-model="queryParams.description"-->
placeholder="请输入描述" <!-- placeholder="请输入描述"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="审核状态" prop="auditState"> <!-- <el-form-item label="审核状态" prop="auditState">-->
<el-input <!-- <el-input-->
v-model="queryParams.auditState" <!-- v-model="queryParams.auditState"-->
placeholder="请输入审核状态" <!-- placeholder="请输入审核状态"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="编码" prop="code"> <!-- <el-form-item label="编码" prop="code">-->
<el-input <!-- <el-input-->
v-model="queryParams.code" <!-- v-model="queryParams.code"-->
placeholder="请输入编码" <!-- placeholder="请输入编码"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="宽度" prop="width"> <!-- <el-form-item label="宽度" prop="width">-->
<el-input <!-- <el-input-->
v-model="queryParams.width" <!-- v-model="queryParams.width"-->
placeholder="请输入宽度" <!-- placeholder="请输入宽度"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="高度" prop="height"> <!-- <el-form-item label="高度" prop="height">-->
<el-input <!-- <el-input-->
v-model="queryParams.height" <!-- v-model="queryParams.height"-->
placeholder="请输入高度" <!-- placeholder="请输入高度"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="点击数" prop="hit"> <!-- <el-form-item label="点击数" prop="hit">-->
<el-input <!-- <el-input-->
v-model="queryParams.hit" <!-- v-model="queryParams.hit"-->
placeholder="请输入点击数" <!-- placeholder="请输入点击数"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="点赞数" prop="upVote"> <!-- <el-form-item label="点赞数" prop="upVote">-->
<el-input <!-- <el-input-->
v-model="queryParams.upVote" <!-- v-model="queryParams.upVote"-->
placeholder="请输入点赞数" <!-- placeholder="请输入点赞数"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="是否开启评论" prop="commentFlag"> <!-- <el-form-item label="是否开启评论" prop="commentFlag">-->
<el-input <!-- <el-input-->
v-model="queryParams.commentFlag" <!-- v-model="queryParams.commentFlag"-->
placeholder="请输入是否开启评论" <!-- placeholder="请输入是否开启评论"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -174,7 +174,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"

View File

@ -107,10 +107,10 @@
<el-table-column label="分类名称" align="center" prop="categoryName" /> <el-table-column label="分类名称" align="center" prop="categoryName" />
<!-- <el-table-column label="父ID" align="center" prop="parentId" />--> <!-- <el-table-column label="父ID" align="center" prop="parentId" />-->
<!-- <el-table-column label="ids" align="center" prop="ancestors" />--> <!-- <el-table-column label="ids" align="center" prop="ancestors" />-->
<el-table-column label="排序" align="center" prop="sort" /> <!-- <el-table-column label="排序" align="center" prop="sort" />-->
<el-table-column label="分类描述" align="center" prop="description" /> <el-table-column label="分类描述" align="center" prop="description" />
<el-table-column label="语言标签" align="center" prop="categoryTags" /> <el-table-column label="语言标签" align="center" prop="tagName" />
<el-table-column label="状态" align="center" prop="status" /> <!-- <el-table-column label="状态" align="center" prop="status" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -145,8 +145,15 @@
<el-form-item label="分类名称" prop="categoryName"> <el-form-item label="分类名称" prop="categoryName">
<el-input v-model="form.categoryName" placeholder="请输入分类名称" /> <el-input v-model="form.categoryName" placeholder="请输入分类名称" />
</el-form-item> </el-form-item>
<el-form-item label="上级分类" prop="parentId"> <!-- <el-form-item label="上级分类" prop="parentId">-->
<el-input v-model="form.parentId" placeholder="请选择上级分类" /> <!-- <el-input v-model="form.parentId" placeholder="请选择上级分类" />-->
<!-- </el-form-item>-->
<el-form-item label="上级分类" prop="ids">
<el-select v-model="form.parentId" clearable>
<el-option v-for="(item, index) in columnList" :key="index"
:label="item.categoryName" :value="item.categoryId"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="排序" prop="sort"> <el-form-item label="排序" prop="sort">
<el-input v-model="form.sort" placeholder="请输入排序" /> <el-input v-model="form.sort" placeholder="请输入排序" />
@ -157,8 +164,15 @@
<!-- <el-form-item label="删除标志" prop="delFlag">--> <!-- <el-form-item label="删除标志" prop="delFlag">-->
<!-- <el-input v-model="form.delFlag" placeholder="请输入删除标志" />--> <!-- <el-input v-model="form.delFlag" placeholder="请输入删除标志" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="语言标签" prop="categoryTags"> <!-- <el-form-item label="语言标签" prop="categoryTags">-->
<el-input v-model="form.categoryTags" placeholder="请选择语言标签" /> <!-- <el-input v-model="form.categoryTags" placeholder="请选择语言标签" />-->
<!-- </el-form-item>-->
<el-form-item label="语言标签" prop="tags">
<el-select v-model="form.categoryTags" clearable>
<el-option v-for="(item, index) in tagList" :key="index"
:label="item.tagName" :value="item.tagId"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -171,6 +185,8 @@
<script> <script>
import { listCategory, getCategory, delCategory, addCategory, updateCategory } from "@/api/system/category"; import { listCategory, getCategory, delCategory, addCategory, updateCategory } from "@/api/system/category";
// import { listCategory } from "@/api/system/category";
import { listTags } from "@/api/system/tags";
export default { export default {
name: "Category", name: "Category",
@ -190,6 +206,8 @@ export default {
total: 0, total: 0,
// //
categoryList: [], categoryList: [],
columnList:[], //
tagList:[], //
// //
title: "", title: "",
// //
@ -215,6 +233,8 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
//
this.getColumList()
}, },
methods: { methods: {
/** 查询文章分类管理列表 */ /** 查询文章分类管理列表 */
@ -226,6 +246,14 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getColumList(){
listCategory().then(res=>{
this.columnList = res.rows
})
listTags().then(res=>{
this.tagList = res.rows
})
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -278,6 +306,7 @@ export default {
const categoryId = row.categoryId || this.ids const categoryId = row.categoryId || this.ids
getCategory(categoryId).then(response => { getCategory(categoryId).then(response => {
this.form = response.data; this.form = response.data;
this.form.categoryTags = Number( this.form.categoryTags)
this.open = true; this.open = true;
this.title = "修改文章分类管理"; this.title = "修改文章分类管理";
}); });

View File

@ -291,12 +291,12 @@ export default {
methods: { methods: {
// input(data){ // input(data){
// console.log(data) // console.log(data)
// }, // },
openDialog(){ openDialog(){
this.$refs.materialDialog.init() this.$refs.materialDialog.init()
}, },
/** 查询素材管理列表 */ /** 查询素材管理列表 */
getList() { getList() {
this.loading = true; this.loading = true;