|
|
@ -39,18 +39,6 @@ |
|
|
|
<el-table-column v-if="settings[0].show" type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
<el-table-column v-if="settings[0].show" type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> |
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> |
|
|
|
<el-table-column v-if="settings[1].show" show-overflow-tooltip prop="title" label="标题" align="center" min-width="150"></el-table-column> |
|
|
|
<el-table-column v-if="settings[1].show" show-overflow-tooltip prop="title" label="标题" align="center" min-width="150"></el-table-column> |
|
|
|
<el-table-column prop="sequence" label="文章排序" align="center" min-width="110" sortable="custom"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-if="scope.row.editing" |
|
|
|
|
|
|
|
class="squ-input" |
|
|
|
|
|
|
|
v-model.number="scope.row.sequence" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
<span v-else>{{ scope.row.sequence }}</span> |
|
|
|
|
|
|
|
<i v-if="scope.row.editing" class="el-icon-check squ-icon" @click="submitSequence(scope.row)"></i> |
|
|
|
|
|
|
|
<i v-auth="'/site/list:' + siteName + ':内容管理:文章管理:文章排序设置'" v-else class="el-icon-edit squ-icon" @click="editSequence(scope.row)"></i> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column v-if="settings[2].show" prop="columnName" label="栏目" align="center" min-width="120"></el-table-column> |
|
|
|
<el-table-column v-if="settings[2].show" prop="columnName" label="栏目" align="center" min-width="120"></el-table-column> |
|
|
|
<el-table-column prop="classificationName" label="所属分类" align="center" min-width="120"></el-table-column> |
|
|
|
<el-table-column prop="classificationName" label="所属分类" align="center" min-width="120"></el-table-column> |
|
|
|
<el-table-column v-if="settings[3].show" prop="typeId" label="栏目类型" align="center" min-width="100"> |
|
|
|
<el-table-column v-if="settings[3].show" prop="typeId" label="栏目类型" align="center" min-width="100"> |
|
|
@ -68,13 +56,18 @@ |
|
|
|
{{ scope.row.isRelease ? '已发布' : '草稿' }} |
|
|
|
{{ scope.row.isRelease ? '已发布' : '草稿' }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-if="settings[10].show" label="操作" align="center" width="210"> |
|
|
|
<el-table-column v-auth="'/site/list:' + siteName + ':内容管理:文章管理:置顶'" prop="sequence" label="置顶" align="center" min-width="80" sortable="custom"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<i v-if="scope.row.isRelease" :class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']" @click="sticky(scope.row)"></i> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column v-if="settings[10].show" label="操作" align="center" width="190"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:置顶'" type="text" @click="sticky(scope.row)">置顶</el-button> |
|
|
|
|
|
|
|
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:预览'" type="text" @click="preview(scope.row)">预览</el-button> |
|
|
|
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:预览'" type="text" @click="preview(scope.row)">预览</el-button> |
|
|
|
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:编辑'" type="text" @click="edit(scope.row)">编辑</el-button> |
|
|
|
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:编辑'" type="text" @click="edit(scope.row)">编辑</el-button> |
|
|
|
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button> |
|
|
|
<el-button v-auth="'/site/list:' + siteName + ':内容管理:文章管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button> |
|
|
|
<el-switch |
|
|
|
<el-switch |
|
|
|
|
|
|
|
v-if="scope.row.isRelease" |
|
|
|
v-auth="'/site/list:' + siteName + ':内容管理:文章管理:禁用'" |
|
|
|
v-auth="'/site/list:' + siteName + ':内容管理:文章管理:禁用'" |
|
|
|
class="m-l-10" |
|
|
|
class="m-l-10" |
|
|
|
v-model="scope.row.isDisable" |
|
|
|
v-model="scope.row.isDisable" |
|
|
@ -362,7 +355,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 置顶 |
|
|
|
// 置顶 |
|
|
|
sticky(row) { |
|
|
|
sticky(row) { |
|
|
|
this.$post(`${this.api.modifiedSort}?articleId=${row.id}&sequenceNumber=1`).then(res => { |
|
|
|
this.$post(`${this.api.articleTopOperation}?articleId=${row.id}&isTop=${row.isTop ? 0 : 1}`).then(res => { |
|
|
|
this.initData() |
|
|
|
this.initData() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -391,8 +384,13 @@ export default { |
|
|
|
text-overflow: ellipsis; |
|
|
|
text-overflow: ellipsis; |
|
|
|
} |
|
|
|
} |
|
|
|
.squ-icon { |
|
|
|
.squ-icon { |
|
|
|
margin-left: 5px; |
|
|
|
font-size: 16px; |
|
|
|
|
|
|
|
font-weight: 600; |
|
|
|
cursor: pointer; |
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
color: #f70000; |
|
|
|
|
|
|
|
&.el-icon-check { |
|
|
|
|
|
|
|
color: #05991e; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/deep/.squ-input { |
|
|
|
/deep/.squ-input { |
|
|
|
width: auto; |
|
|
|
width: auto; |
|
|
|