|
@@ -6,7 +6,7 @@
|
|
|
<el-col :span="8">
|
|
|
<div class="searchBox">
|
|
|
<div class="searchTitle">栏目名称:</div>
|
|
|
- <el-input v-model="getApiData.name" placeholder="请输入栏目名称" :clearable="true" @clear="onInputClear"/>
|
|
|
+ <el-input v-model="getApiData.name" placeholder="请输入栏目名称" :clearable="true" @clear="onInputClear" />
|
|
|
<!-- <el-input placeholder="请输入栏目名称" autocomplete="off" v-model="getApiData.name" /> -->
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -28,19 +28,15 @@
|
|
|
<tableTitle :name="tableDivTitle" />
|
|
|
<el-row>
|
|
|
<template>
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%"
|
|
|
- row-key="id"
|
|
|
- :default-expand-all="isExpandAll"
|
|
|
- :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
- >
|
|
|
+ <el-table :data="tableData" style="width: 100%" row-key="id" :default-expand-all="isExpandAll"
|
|
|
+ :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
|
|
|
<el-table-column fixed prop="id" label="编号" width="150"></el-table-column>
|
|
|
<el-table-column prop="name" label="栏目名称">
|
|
|
<template slot-scope="scope">
|
|
|
- <span :class="{ highlight: isHighlight(scope.row, search) }" v-if="scope.row.pid==0">{{ scope.row.name }}</span>
|
|
|
- <span :class="{ highlight: isHighlight(scope.row, search)}" v-else>____{{ scope.row.name }}</span>
|
|
|
- </template>
|
|
|
+ <span :class="{ highlight: isHighlight(scope.row, search) }" v-if="scope.row.pid == 0">{{ scope.row.name
|
|
|
+ }}</span>
|
|
|
+ <span :class="{ highlight: isHighlight(scope.row, search) }" v-else>____{{ scope.row.name }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="是否外链" align="center">
|
|
|
<template slot-scope="scope">
|
|
@@ -54,9 +50,11 @@
|
|
|
<el-table-column fixed="right" label="操作" width="230" header-align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="listBtnBox">
|
|
|
- <div class="listDeleteBtn" @click="deleteData(scope.row.id, tableData)"><i class="el-icon-delete"></i>删除</div>
|
|
|
- <div class="listEditBtn" @click="getDataMain(scope.row.id, tableData)"><i class="el-icon-edit-outline"></i>编辑</div>
|
|
|
- <div class="listMainBtn" @click="addCategoryList(scope.row)"><i class="el-icon-document-add"></i>添加</div>
|
|
|
+ <div class="listDeleteBtn" @click="deleteData(scope.row.id, tableData)"><i
|
|
|
+ class="el-icon-delete"></i>删除</div>
|
|
|
+ <div class="listEditBtn" @click="getDataMain(scope.row.id, tableData)"><i
|
|
|
+ class="el-icon-edit-outline"></i>编辑</div>
|
|
|
+ <!-- <div class="listMainBtn" @click="addCategoryList(scope.row)"><i class="el-icon-document-add"></i>添加</div> -->
|
|
|
</div>
|
|
|
<!-- <el-button @click.native.prevent="deleteData(scope.row.id, tableData)" type="text" size="small">删除</el-button>
|
|
|
<el-button @click.native.prevent="getDataMain(scope.row.id, tableData)" type="text" size="small">编辑</el-button> -->
|
|
@@ -92,14 +90,14 @@
|
|
|
<el-form-item label="外链地址:" :label-width="formLabelWidth" prop="web_url" class="custom-align-right">
|
|
|
<el-input v-model="form.web_url" autocomplete="off" placeholder="请输入外链地址"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="栏目标题:" :label-width="formLabelWidth" prop="seo_title" class="custom-align-right">
|
|
|
+ <el-form-item label="栏目标题:" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
<el-input v-model="form.seo_title" autocomplete="off" placeholder="请输入栏目标题"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="栏目关键词:" :label-width="formLabelWidth" prop="seo_keywords" class="custom-align-right">
|
|
|
+ <el-form-item label="栏目关键词:" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
<!-- <el-input v-model="form.seo_keywords" autocomplete="off" placeholder="请输入栏目关键词"></el-input> -->
|
|
|
<inputTag :initialTags="tags" @tags-updated="updateTags" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="栏目描述:" :label-width="formLabelWidth" prop="seo_description" class="custom-align-right">
|
|
|
+ <el-form-item label="栏目描述:" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
<el-input type="textarea" v-model="form.seo_description" placeholder="请输入栏目描述"></el-input>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="排序:" :label-width="formLabelWidth" class="custom-align-right">
|
|
@@ -118,7 +116,7 @@
|
|
|
<el-cascader :key="parentKey" v-model="form.pid_arr" placeholder="请选择要绑定的父级栏目" :props="parentData"
|
|
|
filterable clearable></el-cascader>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="栏目标题:" :label-width="formLabelWidth" prop="seo_title" class="custom-align-right">
|
|
|
+ <el-form-item label="栏目标题:" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
<template #label>
|
|
|
<span class="askBox">
|
|
|
栏目标题:
|
|
@@ -130,7 +128,7 @@
|
|
|
</template>
|
|
|
<el-input v-model="form.seo_title" autocomplete="off" placeholder="请输入栏目标题"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="栏目关键词:" :label-width="formLabelWidth" prop="seo_keywords" class="custom-align-right">
|
|
|
+ <el-form-item label="栏目关键词:" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
<template #label>
|
|
|
<span class="askBox">
|
|
|
栏目关键词:
|
|
@@ -142,7 +140,7 @@
|
|
|
<!-- <el-input v-model="form.seo_keywords" autocomplete="off" placeholder="请输入栏目关键词"></el-input> -->
|
|
|
<inputTag :initialTags="tags" @tags-updated="updateTags" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="栏目描述:" :label-width="formLabelWidth" prop="seo_description" class="custom-align-right">
|
|
|
+ <el-form-item label="栏目描述:" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
<template #label>
|
|
|
<span class="askBox">
|
|
|
栏目描述:
|
|
@@ -184,7 +182,7 @@ export default {
|
|
|
InputTag
|
|
|
},
|
|
|
data() {
|
|
|
-
|
|
|
+
|
|
|
//0.全局操作 start ------------------------------------------------------------>
|
|
|
//表单验证
|
|
|
const validateEmpty = (rule, value, callback) => {
|
|
@@ -416,7 +414,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- onInputClear(){
|
|
|
+ onInputClear() {
|
|
|
this.isExpandAll = false;
|
|
|
this.getData();
|
|
|
},
|
|
@@ -424,10 +422,10 @@ export default {
|
|
|
//1.列表和分页相关 start ------------------------------------------------------------>
|
|
|
//1.1 开始请求列表信息方法
|
|
|
getData(type) {
|
|
|
- if(type=='search'){
|
|
|
- this.getApiData.page=1
|
|
|
+ if (type == 'search') {
|
|
|
+ this.getApiData.page = 1
|
|
|
this.isExpandAll = true;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.isExpandAll = false;
|
|
|
}
|
|
|
//搜索条件
|
|
@@ -440,7 +438,7 @@ export default {
|
|
|
// this.getApiData.city_id = this.getApiData.city_id[this.getApiData.city_id.length - 1];
|
|
|
// }
|
|
|
//如果是搜索,重新加载第一页
|
|
|
-
|
|
|
+
|
|
|
this.$store.dispatch('pool/getCategoryList', this.getApiData).then(res => {
|
|
|
// console.log("=============:",res.data)
|
|
|
this.tableData = res.data.rows; //��与内容
|
|
@@ -524,19 +522,19 @@ export default {
|
|
|
},
|
|
|
//2.1.1 添加栏目池
|
|
|
addCategoryList(row) {
|
|
|
- this.form.pid_arr =[];
|
|
|
+ this.form.pid_arr = [];
|
|
|
this.show_url = false;
|
|
|
// this.form.is_url = 0;
|
|
|
this.editId = 0;
|
|
|
this.editBtn = false;
|
|
|
this.tags = []
|
|
|
- if(row){
|
|
|
- if(row.pid==0){
|
|
|
+ if (row) {
|
|
|
+ if (row.pid == 0) {
|
|
|
this.form.pid_arr.push(row.id)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
let pidArr = [];
|
|
|
// console.log("fuck:",row.pid_arr);
|
|
|
- pidArr = JSON.parse(row.pid_arr)
|
|
|
+ pidArr = JSON.parse(row.pid_arr)
|
|
|
pidArr.push(row.id)
|
|
|
this.form.pid_arr = pidArr
|
|
|
// console.log('追加id:',this.form.pid_arr)
|
|
@@ -757,6 +755,7 @@ export default {
|
|
|
::v-deep .highlight {
|
|
|
background-color: yellow;
|
|
|
}
|
|
|
+
|
|
|
//表单微调 start------------------------------------------------------------>*/
|
|
|
::v-deep .custom-form-item>.el-form-item__label {
|
|
|
line-height: 140px !important;
|
|
@@ -771,43 +770,44 @@ export default {
|
|
|
text-align: right;
|
|
|
/* 设置标签文字右对齐 */
|
|
|
}
|
|
|
-.collector {
|
|
|
- margin-left: 0px;
|
|
|
- padding-left: 0px;
|
|
|
- margin-right: 20px;
|
|
|
- width: 76px;
|
|
|
- height: 36px;
|
|
|
- line-height: 36px;
|
|
|
- position: relative;
|
|
|
-
|
|
|
- .collectorIcon {
|
|
|
- display: inline-block;
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
- background: url("../../assets/advertise/Graph.png");
|
|
|
- vertical-align: middle;
|
|
|
- margin-right: 6px;
|
|
|
- }
|
|
|
|
|
|
- .collectorIcon1 {
|
|
|
- position: absolute;
|
|
|
- top: 12px;
|
|
|
- left: 8px;
|
|
|
- }
|
|
|
+.collector {
|
|
|
+ margin-left: 0px;
|
|
|
+ padding-left: 0px;
|
|
|
+ margin-right: 20px;
|
|
|
+ width: 76px;
|
|
|
+ height: 36px;
|
|
|
+ line-height: 36px;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .collectorIcon {
|
|
|
+ display: inline-block;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ background: url("../../assets/advertise/Graph.png");
|
|
|
+ vertical-align: middle;
|
|
|
+ margin-right: 6px;
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
+ .collectorIcon1 {
|
|
|
+ position: absolute;
|
|
|
+ top: 12px;
|
|
|
+ left: 8px;
|
|
|
+ }
|
|
|
|
|
|
+}
|
|
|
|
|
|
- .collector {
|
|
|
- text-align: center;
|
|
|
- border-radius: 8px;
|
|
|
- cursor: pointer;
|
|
|
- color: #519C66;
|
|
|
- background-color: rgba(81, 156, 102, 0.16);
|
|
|
|
|
|
- >i {
|
|
|
- padding-right: 8px;
|
|
|
- }
|
|
|
- }
|
|
|
+.collector {
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 8px;
|
|
|
+ cursor: pointer;
|
|
|
+ color: #519C66;
|
|
|
+ background-color: rgba(81, 156, 102, 0.16);
|
|
|
+
|
|
|
+ >i {
|
|
|
+ padding-right: 8px;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
//表单微调 end------------------------------------------------------------>*/</style>
|