|
@@ -10,11 +10,11 @@
|
|
|
:model="searchForm"
|
|
|
saveKey="level-student-rule"
|
|
|
>
|
|
|
- <el-form-item prop="name">
|
|
|
+ <el-form-item prop="keyword">
|
|
|
<el-input
|
|
|
- v-model.trim="searchForm.name"
|
|
|
+ v-model.trim="searchForm.keyword"
|
|
|
clearable
|
|
|
- placeholder="请输入风采标题"
|
|
|
+ placeholder="简章标题"
|
|
|
@keyup.enter.native="
|
|
|
e => {
|
|
|
e.target.blur();
|
|
@@ -24,31 +24,16 @@
|
|
|
"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="city">
|
|
|
- <el-select
|
|
|
- v-model.trim="searchForm.organId"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- placeholder="请选择分部"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in selects.branchs"
|
|
|
- :key="index"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-select
|
|
|
class="multiple"
|
|
|
- v-model.trim="searchForm.degreeType"
|
|
|
+ v-model.trim="searchForm.status"
|
|
|
filterable
|
|
|
clearable
|
|
|
placeholder="请选择状态"
|
|
|
>
|
|
|
- <el-option :value="4" label="停用"></el-option>
|
|
|
- <el-option :value="3" label="启用"></el-option>
|
|
|
+ <el-option :value="true" label="启用"></el-option>
|
|
|
+ <el-option :value="false" label="停用"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
@@ -57,12 +42,12 @@
|
|
|
</el-form-item>
|
|
|
</save-form>
|
|
|
<el-button
|
|
|
- v-permission="'/teacherOperationAdd'"
|
|
|
+ v-permission="'degreeNews/save'"
|
|
|
type="primary"
|
|
|
@click="onOperation()"
|
|
|
style="margin-bottom:20px"
|
|
|
>
|
|
|
- 新增风采
|
|
|
+ 新增帮助
|
|
|
</el-button>
|
|
|
<div class="tableWrap">
|
|
|
<el-table
|
|
@@ -70,30 +55,38 @@
|
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
>
|
|
|
<el-table-column width="90px" prop="id" label="编号"> </el-table-column>
|
|
|
- <el-table-column prop="name" label="标题">
|
|
|
+ <el-table-column prop="name" label="简章标题" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <overflow-text :text="scope.row.name"></overflow-text>
|
|
|
+ <overflow-text :text="scope.row.title"></overflow-text>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="分部">
|
|
|
- <template slot-scope="scope">
|
|
|
- <copy-text>{{ scope.row.name }}</copy-text>
|
|
|
- </template>
|
|
|
+ <el-table-column prop="operatorName" label="发布人" align="center">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="状态">
|
|
|
+ <el-table-column prop="createTime" label="发布时间" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="状态" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <copy-text>{{ scope.row.name }}</copy-text>
|
|
|
+ {{ scope.row.status == 1 ? "启用" : "停用" }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" fixed="right">
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" @click="onOperation('update', scope.row)"
|
|
|
- >停用</el-button
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="$helpers.permission('degreeNews/enable')"
|
|
|
+ @click="onChangeStatus(scope.row)"
|
|
|
+ >{{ scope.row.status == 1 ? "停用" : "启用" }}</el-button
|
|
|
>
|
|
|
- <el-button type="text" @click="onOperation('update', scope.row)"
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="$helpers.permission('degreeNews/update')"
|
|
|
+ @click="onOperation('update', scope.row)"
|
|
|
>修改</el-button
|
|
|
>
|
|
|
- <el-button type="text" @click="onOperation('update', scope.row)"
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="$helpers.permission('degreeNews/remove')"
|
|
|
+ @click="onRemove(scope.row)"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -116,12 +109,20 @@
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import informationOperation from "../model/information-operation";
|
|
|
+import {
|
|
|
+ degreeNewsPage,
|
|
|
+ degreeNewsEnable,
|
|
|
+ degreeNewsRemove
|
|
|
+} from "../levelManageApi";
|
|
|
export default {
|
|
|
components: { pagination, informationOperation },
|
|
|
name: "student-rule",
|
|
|
data() {
|
|
|
return {
|
|
|
- searchForm: {},
|
|
|
+ searchForm: {
|
|
|
+ keyword: "",
|
|
|
+ status: null
|
|
|
+ },
|
|
|
tableList: [],
|
|
|
pageInfo: {
|
|
|
// 分页规则
|
|
@@ -133,18 +134,69 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.$store.dispatch("setBranchs");
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
onSearch() {
|
|
|
this.pageInfo.page = 1;
|
|
|
- // this.getList();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
onReSet() {
|
|
|
this.$refs.searchForm.resetFields();
|
|
|
- // this.search();
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ async getList() {
|
|
|
+ try {
|
|
|
+ let { orderDate, ...rest } = this.searchForm;
|
|
|
+ let params = {
|
|
|
+ ...rest,
|
|
|
+ type: "GRADING_NOTICE",
|
|
|
+ page: this.pageInfo.page,
|
|
|
+ rows: this.pageInfo.limit
|
|
|
+ };
|
|
|
+ const { data } = await degreeNewsPage(params);
|
|
|
+ this.tableList = data.rows || [];
|
|
|
+ this.pageInfo.total = data.total;
|
|
|
+ } catch {}
|
|
|
+ },
|
|
|
+ async onChangeStatus(row) {
|
|
|
+ let tempStr = row.status == 1 ? "停用" : "启用";
|
|
|
+
|
|
|
+ this.$confirm(`确定是否${tempStr}?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(async () => {
|
|
|
+ try {
|
|
|
+ await degreeNewsEnable({ newsId: row.id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success(tempStr + "成功");
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async onRemove(row) {
|
|
|
+ this.$confirm(`确定是否删除?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(async () => {
|
|
|
+ try {
|
|
|
+ await degreeNewsRemove({ id: row.id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch {}
|
|
|
+ });
|
|
|
},
|
|
|
- async getList() {},
|
|
|
onOperation(type, row) {
|
|
|
const dialogType = type || "create";
|
|
|
/**
|
|
@@ -152,7 +204,7 @@ export default {
|
|
|
* @param 类型
|
|
|
* @params 值
|
|
|
*/
|
|
|
- this.$refs.informationOperation.openDialog(dialogType, "student", row);
|
|
|
+ this.$refs.informationOperation.openDialog(dialogType, "notice", row);
|
|
|
}
|
|
|
}
|
|
|
};
|