|
@@ -7,41 +7,119 @@
|
|
|
<el-button type="primary" size="mini" @click="add">添加</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="list">
|
|
|
- <el-table :data="list" stripe style="width: 100%" border>
|
|
|
- <el-table-column prop="col_name" label="所属栏目" align="center"> </el-table-column>
|
|
|
- <el-table-column prop="title" label="标题" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
- <el-table-column prop="publish_time" label="发布时间" align="center"> </el-table-column>
|
|
|
- <el-table-column prop="publish_unit" label="发布单位" align="center"> </el-table-column>
|
|
|
- <el-table-column label="状态" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{
|
|
|
- scope.row.status == '0'
|
|
|
- ? '草稿'
|
|
|
- : scope.row.status == '1'
|
|
|
- ? '审核中'
|
|
|
- : scope.row.status == '2'
|
|
|
- ? '审核通过'
|
|
|
- : scope.row.status == '3'
|
|
|
- ? '审核拒绝'
|
|
|
- : '未识别'
|
|
|
- }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="220">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button size="mini" @click="examineBtn(scope.row)">查看</el-button>
|
|
|
- <el-button size="mini" type="success" v-if="scope.row.status == '0'" @click="submitInfo(scope.row)">发布</el-button>
|
|
|
- <el-button size="mini" type="danger" @click="deleteBtn(scope.row.id)">删除</el-button>
|
|
|
- <el-button v-if="user.type === '0' || user.type === '1'" type="success" size="mini" @click="refer(scope.row.id, { status: '2' })"
|
|
|
- >审核通过</el-button
|
|
|
- >
|
|
|
- <el-button v-if="user.type === '0' || user.type === '1'" type="warning" size="mini" @click="refer(scope.row.id, { status: '3' })"
|
|
|
- >审核拒绝</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <page :total="total" position="right" @query="searchInfo"></page>
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="待审核" name="first">
|
|
|
+ <el-table :data="list" stripe style="width: 100%" border>
|
|
|
+ <el-table-column prop="col_name" label="所属栏目" align="center"> </el-table-column>
|
|
|
+ <el-table-column prop="title" label="标题" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column prop="publish_time" label="发布时间" align="center"> </el-table-column>
|
|
|
+ <el-table-column prop="publish_unit" label="发布单位" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column label="状态" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{
|
|
|
+ scope.row.status == '0'
|
|
|
+ ? '草稿'
|
|
|
+ : scope.row.status == '1'
|
|
|
+ ? '审核中'
|
|
|
+ : scope.row.status == '2'
|
|
|
+ ? '审核通过'
|
|
|
+ : scope.row.status == '3'
|
|
|
+ ? '审核拒绝'
|
|
|
+ : '未识别'
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="220">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" @click="examineBtn(scope.row)">查看</el-button>
|
|
|
+ <el-button size="mini" type="success" v-if="scope.row.status == '0'" @click="submitInfo(scope.row)">发布</el-button>
|
|
|
+ <el-button size="mini" type="danger" @click="deleteBtn(scope.row.id)">删除</el-button>
|
|
|
+ <el-button v-if="user.type === '0' || user.type === '1'" type="success" size="mini" @click="refer(scope.row.id, { status: '2' })"
|
|
|
+ >审核通过</el-button
|
|
|
+ >
|
|
|
+ <!-- <el-button v-if="user.type === '0' || user.type === '1'" type="warning" size="mini" @click="refer(scope.row.id, { status: '3' })"
|
|
|
+ >审核拒绝</el-button
|
|
|
+ > -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <page :total="total" position="right" @query="searchInfo1"></page
|
|
|
+ ></el-tab-pane>
|
|
|
+ <el-tab-pane label="审核成功" name="second">
|
|
|
+ <el-table :data="list" stripe style="width: 100%" border>
|
|
|
+ <el-table-column prop="col_name" label="所属栏目" align="center"> </el-table-column>
|
|
|
+ <el-table-column prop="title" label="标题" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column prop="publish_time" label="发布时间" align="center"> </el-table-column>
|
|
|
+ <el-table-column prop="publish_unit" label="发布单位" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column label="状态" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{
|
|
|
+ scope.row.status == '0'
|
|
|
+ ? '草稿'
|
|
|
+ : scope.row.status == '1'
|
|
|
+ ? '审核中'
|
|
|
+ : scope.row.status == '2'
|
|
|
+ ? '审核通过'
|
|
|
+ : scope.row.status == '3'
|
|
|
+ ? '审核拒绝'
|
|
|
+ : '未识别'
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="220">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" @click="examineBtn(scope.row)">查看</el-button>
|
|
|
+ <el-button size="mini" type="success" v-if="scope.row.status == '0'" @click="submitInfo(scope.row)">发布</el-button>
|
|
|
+ <el-button size="mini" type="danger" @click="deleteBtn(scope.row.id)">删除</el-button>
|
|
|
+ <el-button v-if="user.type === '0' || user.type === '1'" type="success" size="mini" @click="refer(scope.row.id, { status: '2' })"
|
|
|
+ >审核通过</el-button
|
|
|
+ >
|
|
|
+ <!-- <el-button v-if="user.type === '0' || user.type === '1'" type="warning" size="mini" @click="refer(scope.row.id, { status: '3' })"
|
|
|
+ >审核拒绝</el-button
|
|
|
+ > -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <page :total="total" position="right" @query="searchInfo2"></page
|
|
|
+ ></el-tab-pane>
|
|
|
+ <el-tab-pane label="已删除" name="third">
|
|
|
+ <el-table :data="list" stripe style="width: 100%" border>
|
|
|
+ <el-table-column prop="col_name" label="所属栏目" align="center"> </el-table-column>
|
|
|
+ <el-table-column prop="title" label="标题" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column prop="publish_time" label="发布时间" align="center"> </el-table-column>
|
|
|
+ <el-table-column prop="publish_unit" label="发布单位" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column label="状态" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{
|
|
|
+ scope.row.status == '0'
|
|
|
+ ? '草稿'
|
|
|
+ : scope.row.status == '1'
|
|
|
+ ? '审核中'
|
|
|
+ : scope.row.status == '2'
|
|
|
+ ? '审核通过'
|
|
|
+ : scope.row.status == '3'
|
|
|
+ ? '审核拒绝'
|
|
|
+ : '未识别'
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="220">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" @click="examineBtn(scope.row)">查看</el-button>
|
|
|
+ <el-button size="mini" type="success" v-if="scope.row.status == '0'" @click="submitInfo(scope.row)">发布</el-button>
|
|
|
+ <!-- <el-button size="mini" type="danger" v-if="scope.row.is_del == '0'" @click="deleteBtn(scope.row.id)">删除</el-button>
|
|
|
+ <el-button v-if="user.type === '0' || user.type === '1'" type="success" size="mini" @click="refer(scope.row.id, { status: '2' })"
|
|
|
+ >审核通过</el-button
|
|
|
+ > -->
|
|
|
+ <!-- <el-button v-if="user.type === '0' || user.type === '1'" type="warning" size="mini" @click="refer(scope.row.id, { status: '3' })"
|
|
|
+ >审核拒绝</el-button
|
|
|
+ > -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <page :total="total" position="right" @query="searchInfo3"></page
|
|
|
+ ></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
</el-col>
|
|
|
</span>
|
|
|
<span v-else>
|
|
@@ -125,14 +203,14 @@
|
|
|
<el-radio label="0">草稿</el-radio>
|
|
|
<el-radio label="1">待审核</el-radio>
|
|
|
<el-radio v-if="user.type == '0' || user.type == '1'" label="2">审核通过</el-radio>
|
|
|
- <el-radio v-if="user.type == '0' || user.type == '1'" label="3">审核拒绝</el-radio>
|
|
|
+ <!-- <el-radio v-if="user.type == '0' || user.type == '1'" label="3">审核拒绝</el-radio> -->
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-col :span="24" style="text-align:center;">
|
|
|
<el-button type="primary" @click="submitDraft('form')">保存</el-button>
|
|
|
<el-button type="danger" @click="resetForm('form')">取消</el-button>
|
|
|
<el-button type="success" v-if="user.type == '0' || user.type == '1'" @click="examineIn()">审核通过</el-button>
|
|
|
- <el-button type="danger" v-if="user.type == '0' || user.type == '1'" @click="examineOut()">审核拒绝</el-button>
|
|
|
+ <!-- <el-button type="danger" v-if="user.type == '0' || user.type == '1'" @click="examineOut()">审核拒绝</el-button> -->
|
|
|
</el-col>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
@@ -202,15 +280,51 @@ export default {
|
|
|
img_url: [{ required: false, message: '请上传图片', trigger: 'blur' }],
|
|
|
is_top: [{ required: false, message: '请选择', trigger: 'blur' }],
|
|
|
},
|
|
|
+ activeName: 'first',
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.searchInfo();
|
|
|
+ this.searchInfo1();
|
|
|
},
|
|
|
methods: {
|
|
|
...news({ newsQuery: 'query', newsCreate: 'create', newsUpdate: 'update', newsDelete: 'delete' }),
|
|
|
- async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
- let res = await this.newsQuery({ skip, limit, ...info });
|
|
|
+ handleClick(tab, event) {
|
|
|
+ if (tab.index == 0) {
|
|
|
+ this.searchInfo1();
|
|
|
+ } else if (tab.index == 1) {
|
|
|
+ this.searchInfo2();
|
|
|
+ } else if (tab.index == 2) {
|
|
|
+ this.searchInfo3();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 待审核查询数据
|
|
|
+ async searchInfo1({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ if (this.user.type === '4') {
|
|
|
+ info = { publisher: this.user.uid, ...info };
|
|
|
+ }
|
|
|
+ let res = await this.newsQuery({ skip, limit, ...info, status: '1', is_del: '0' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 审核成功查询数据
|
|
|
+ async searchInfo2({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ if (this.user.type === '4') {
|
|
|
+ info = { publisher: this.user.uid, ...info };
|
|
|
+ }
|
|
|
+ let res = await this.newsQuery({ skip, limit, ...info, status: '2', is_del: '0' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 已删除查询数据
|
|
|
+ async searchInfo3({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ if (this.user.type === '4') {
|
|
|
+ info = { publisher: this.user.uid, ...info };
|
|
|
+ }
|
|
|
+ let res = await this.newsQuery({ skip, limit, ...info, is_del: '1' });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `list`, res.data);
|
|
|
this.$set(this, `total`, res.total);
|
|
@@ -223,7 +337,7 @@ export default {
|
|
|
message: '信息修改成功',
|
|
|
type: 'success',
|
|
|
});
|
|
|
- this.searchInfo();
|
|
|
+ this.searchInfo1();
|
|
|
} else {
|
|
|
this.$message.error('信息修改失败');
|
|
|
}
|
|
@@ -247,7 +361,7 @@ export default {
|
|
|
message: '发布信息成功',
|
|
|
type: 'success',
|
|
|
});
|
|
|
- this.searchInfo();
|
|
|
+ this.searchInfo1();
|
|
|
}
|
|
|
},
|
|
|
// 列表审核打开
|
|
@@ -269,7 +383,7 @@ export default {
|
|
|
type: 'success',
|
|
|
});
|
|
|
this.display = 'list';
|
|
|
- this.searchInfo();
|
|
|
+ this.searchInfo1();
|
|
|
}
|
|
|
},
|
|
|
// 详情审核拒绝
|
|
@@ -282,7 +396,7 @@ export default {
|
|
|
type: 'error',
|
|
|
});
|
|
|
this.display = 'list';
|
|
|
- this.searchInfo();
|
|
|
+ this.searchInfo1();
|
|
|
}
|
|
|
},
|
|
|
// 保存草稿
|
|
@@ -298,7 +412,7 @@ export default {
|
|
|
});
|
|
|
this.form = {};
|
|
|
this.display = 'list';
|
|
|
- this.searchInfo();
|
|
|
+ this.searchInfo1();
|
|
|
}
|
|
|
} else {
|
|
|
this.form.publisher = this.user.uid;
|
|
@@ -310,7 +424,7 @@ export default {
|
|
|
});
|
|
|
this.form = {};
|
|
|
this.display = 'list';
|
|
|
- this.searchInfo();
|
|
|
+ this.searchInfo1();
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -323,17 +437,17 @@ export default {
|
|
|
resetForm(formName) {
|
|
|
this.$refs[formName].resetFields();
|
|
|
this.display = 'list';
|
|
|
- this.searchInfo();
|
|
|
+ this.searchInfo1();
|
|
|
},
|
|
|
// 删除
|
|
|
async deleteBtn(id) {
|
|
|
- let res = await this.newsDelete(id);
|
|
|
+ const res = await this.newsUpdate({ id, is_del: '1' });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$message({
|
|
|
message: '删除信息成功',
|
|
|
type: 'success',
|
|
|
});
|
|
|
- this.searchInfo();
|
|
|
+ this.searchInfo1();
|
|
|
}
|
|
|
},
|
|
|
// 图片
|