|
@@ -77,7 +77,17 @@
|
|
|
<el-table v-loading="loading" :data="publicizeList" @selection-change="handleSelectionChange" :height="clientHeight" border>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="编号" align="center" prop="publicizeId" width="80" />
|
|
|
- <el-table-column label="标题" align="center" prop="publicizeTitle" />
|
|
|
+ <el-table-column
|
|
|
+ label="标题"
|
|
|
+ align="center"
|
|
|
+ prop="publicizeTitle"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag type="success" v-if="scope.row.isPinned == 1">已置顶</el-tag>
|
|
|
+ {{scope.row.publicizeTitle}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="创建者" align="center" prop="createBy" width="100" />
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
|
|
|
<template slot-scope="scope">
|
|
@@ -86,6 +96,22 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" fixed="right" width="240" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-select"
|
|
|
+ @click="handlePin (scope.row)"
|
|
|
+ v-if="scope.row.isPinned == 0"
|
|
|
+ v-hasPermi="['branch:publicize:edit']"
|
|
|
+ >置顶</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-select"
|
|
|
+ @click="handlePin (scope.row)"
|
|
|
+ v-if="scope.row.isPinned == 1"
|
|
|
+ v-hasPermi="['branch:publicize:edit']"
|
|
|
+ >取消置顶</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
@@ -171,7 +197,7 @@
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="标题" prop="demeanorTitle">
|
|
|
+ <el-form-item label="标题" prop="publicizeTitle">
|
|
|
<el-input v-model="form.publicizeTitle" placeholder="请输入标题" v-bind:disabled="check"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -276,6 +302,35 @@ export default {
|
|
|
this.getTreeselect();
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 处理置顶 */
|
|
|
+ handlePin(row) {
|
|
|
+ let publicize = row;
|
|
|
+ if (publicize.isPinned == 0) {
|
|
|
+ this.$confirm('是否确认置顶编号为 '+ ' '+publicize.publicizeId+ ' 的数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ publicize.isPinned = 1;
|
|
|
+ updatePublicize(publicize).then(() => {
|
|
|
+ this.$modal.msgSuccess('置顶成功');
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$confirm('是否确认取消置顶编号为 '+ ' '+publicize.publicizeId+ ' 的数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ publicize.isPinned = 0;
|
|
|
+ updatePublicize(publicize).then(() => {
|
|
|
+ this.$modal.msgSuccess('取消置顶成功');
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 查看 **/
|
|
|
handleSelect(row) {
|
|
|
this.reset();
|