|
@@ -329,13 +329,27 @@
|
|
|
</div>
|
|
|
<span class="addspan" @click="tiaddfun">更多</span>
|
|
|
<div class="num1-box">
|
|
|
- <div class="num1-box-div">
|
|
|
- <div class="num1-box-l">通知公告通知公告通知公告</div>
|
|
|
+ <div
|
|
|
+ class="num1-box-div"
|
|
|
+ v-for="item in noticeList"
|
|
|
+ :key="item.noticeId"
|
|
|
+ @click="tzggfun(item)"
|
|
|
+ >
|
|
|
+ <div class="num1-box-l">{{ item.noticeTitle }}</div>
|
|
|
<div class="num1-box-r">
|
|
|
- <img src="../assets/images/通知.png" alt />
|
|
|
+ <img
|
|
|
+ src="../assets/images/通知.png"
|
|
|
+ v-if="item.start == 1"
|
|
|
+ alt
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ src="../assets/images/通知 拷贝 3.png"
|
|
|
+ v-if="item.start == 0"
|
|
|
+ alt
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="num1-box-div">
|
|
|
+ <!-- <div class="num1-box-div">
|
|
|
<div class="num1-box-l">通知公告通知公告通知公告</div>
|
|
|
<div class="num1-box-r">
|
|
|
<img src="../assets/images/通知 拷贝 3.png" alt />
|
|
@@ -358,7 +372,7 @@
|
|
|
<div class="num1-box-r">
|
|
|
<img src="../assets/images/通知 拷贝 3.png" alt />
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -463,7 +477,7 @@
|
|
|
<el-dialog
|
|
|
title="添加通知公告"
|
|
|
:visible.sync="open5"
|
|
|
- width="700px"
|
|
|
+ width="800px"
|
|
|
append-to-body
|
|
|
>
|
|
|
<div class="jiben">基本信息</div>
|
|
@@ -476,14 +490,22 @@
|
|
|
>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="公告标题" prop="noticeTitle">
|
|
|
+ <el-form-item label="公告标题" prop="noticeTitle">
|
|
|
<el-input
|
|
|
v-model="form.noticeTitle"
|
|
|
placeholder="请输入公告标题"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <!-- <el-form-item label="公告标题" prop="noticeTitle">
|
|
|
+ <el-input
|
|
|
+
|
|
|
+ v-model="form.noticeTitle"
|
|
|
+ placeholder="请输入公告标题"
|
|
|
+ style="width: 300px"
|
|
|
+ />
|
|
|
+ </el-form-item> -->
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="12" v-if="ggflg">
|
|
|
<el-form-item label="公告类型" prop="noticeType">
|
|
|
<el-select v-model="form.noticeType" placeholder="请选择">
|
|
|
<el-option
|
|
@@ -495,13 +517,18 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" style="margin-top: 15px; margin-bottom: 10px">
|
|
|
+ <el-col
|
|
|
+ :span="24"
|
|
|
+ style="margin-top: 15px; margin-bottom: 10px"
|
|
|
+ v-if="ggflg"
|
|
|
+ >
|
|
|
<el-form-item label="状态">
|
|
|
<el-radio-group v-model="form.status">
|
|
|
<el-radio
|
|
|
v-for="dict in dict.type.sys_notice_status"
|
|
|
:key="dict.value"
|
|
|
:label="dict.value"
|
|
|
+ style="margin-right:20px;"
|
|
|
>{{ dict.label }}</el-radio
|
|
|
>
|
|
|
</el-radio-group>
|
|
@@ -525,16 +552,8 @@
|
|
|
</el-col>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button
|
|
|
- style="margin-top: 15px; width: 55px; height: 25px"
|
|
|
- @click="submitForm"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- style="width: 55px; height: 25px; margin-top: 15px"
|
|
|
- @click="cancel"
|
|
|
- >取 消</el-button
|
|
|
- >
|
|
|
+ <button class="button1" v-if="ggflg" @click="submitForm">确 定</button>
|
|
|
+ <button @click="cancel">取 消</button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -547,7 +566,13 @@ import {
|
|
|
printPeople,
|
|
|
printEachTrigger,
|
|
|
} from "@/api/PrintsManage/manage";
|
|
|
-import { workEachTrigger, workTrigger, addNotice } from "@/api/pt";
|
|
|
+import {
|
|
|
+ workEachTrigger,
|
|
|
+ workTrigger,
|
|
|
+ addNotice,
|
|
|
+ listNotice,
|
|
|
+ updateNotice,
|
|
|
+} from "@/api/pt";
|
|
|
import Cookies from "js-cookie";
|
|
|
export default {
|
|
|
dicts: ["sys_notice_status", "sys_notice_type"],
|
|
@@ -561,6 +586,7 @@ export default {
|
|
|
open4: false,
|
|
|
timer2: null,
|
|
|
open5: false,
|
|
|
+ ggflg: false,
|
|
|
form: "",
|
|
|
rules: "",
|
|
|
title: "",
|
|
@@ -577,6 +603,7 @@ export default {
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
+ noticeList: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -589,10 +616,16 @@ export default {
|
|
|
if (this.$route.params.name) {
|
|
|
this.$modal.msgSuccess(this.$route.params.name);
|
|
|
}
|
|
|
-
|
|
|
+ this.getlist();
|
|
|
// console.log(this.$route.params.name)
|
|
|
},
|
|
|
methods: {
|
|
|
+ getlist() {
|
|
|
+ listNotice().then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ this.noticeList = res.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
@@ -808,20 +841,40 @@ export default {
|
|
|
tongzhifun() {
|
|
|
this.title = "添加通知通告";
|
|
|
this.open5 = true;
|
|
|
+ this.ggflg = true;
|
|
|
},
|
|
|
submitForm() {
|
|
|
addNotice(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open5 = false;
|
|
|
- // this.getList();
|
|
|
+ this.ggflg = false;
|
|
|
+ this.getlist();
|
|
|
});
|
|
|
},
|
|
|
cancel() {
|
|
|
this.open5 = false;
|
|
|
+ this.ggflg = false;
|
|
|
+ this.getlist();
|
|
|
},
|
|
|
tiaddfun() {
|
|
|
this.$router.push({ path: "/system/notice" }).catch(() => {});
|
|
|
},
|
|
|
+ tzggfun(item) {
|
|
|
+ // console.log(item);
|
|
|
+ // item.start = 1;
|
|
|
+ this.form = item;
|
|
|
+ updateNotice({
|
|
|
+ noticeId: item.noticeId,
|
|
|
+ start: 1,
|
|
|
+ noticeTitle: item.noticeTitle,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getlist();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.open5 = true;
|
|
|
+ this.ggflg = false;
|
|
|
+ },
|
|
|
},
|
|
|
destroyed() {
|
|
|
clearInterval(this.timer); // 清除定时器
|
|
@@ -1128,7 +1181,7 @@ hr {
|
|
|
background: #004d86 !important;
|
|
|
}
|
|
|
::v-deep .el-textarea__inner {
|
|
|
- width: 660px;
|
|
|
+ width: 760px;
|
|
|
height: 104px;
|
|
|
margin: auto !important;
|
|
|
}
|
|
@@ -1148,7 +1201,7 @@ hr {
|
|
|
width: 100px !important;
|
|
|
}
|
|
|
::v-deep .el-input__inner {
|
|
|
- width: 200px !important;
|
|
|
+ width: 250px !important;
|
|
|
height: 36px;
|
|
|
background: transparent;
|
|
|
color: #fff;
|
|
@@ -1159,13 +1212,14 @@ hr {
|
|
|
}
|
|
|
/* 基本信息背景 */
|
|
|
.jiben {
|
|
|
- width: 660px;
|
|
|
+ width: 760px;
|
|
|
height: 32px;
|
|
|
background-image: url("../images/小标题底.png");
|
|
|
margin-bottom: 25px;
|
|
|
color: #fff;
|
|
|
padding-left: 16px;
|
|
|
line-height: 32px;
|
|
|
+ margin-top: 10px;
|
|
|
}
|
|
|
/*调整表单间距 */
|
|
|
::v-deep .el-form-item__content {
|
|
@@ -1356,4 +1410,19 @@ hr {
|
|
|
border-radius: 6px;
|
|
|
border: none;
|
|
|
}
|
|
|
+.dialog-footer button {
|
|
|
+ width: 60px;
|
|
|
+ height: 25px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 21px;
|
|
|
+ color: #000;
|
|
|
+ border-radius: 3px;
|
|
|
+ border: none;
|
|
|
+ background-color: #fff;
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+.dialog-footer .button1 {
|
|
|
+ background-color: #409eff;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
</style>
|