|
@@ -229,7 +229,15 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {listNotice, getNotice, delNotice, addNotice, updateNotice, insertReadHis} from "@/api/system/notice";
|
|
|
+import {
|
|
|
+ listNotice,
|
|
|
+ getNotice,
|
|
|
+ delNotice,
|
|
|
+ addNotice,
|
|
|
+ updateNotice,
|
|
|
+ insertReadHis,
|
|
|
+ listByUserId
|
|
|
+} from "@/api/system/notice";
|
|
|
import Editor from '@/components/Editor';
|
|
|
|
|
|
export default {
|
|
@@ -298,6 +306,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ //查询公告是否已读
|
|
|
+
|
|
|
+
|
|
|
/** 查询公告列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
@@ -367,6 +379,7 @@ export default {
|
|
|
},
|
|
|
/** 查看 **/
|
|
|
handleSelect(row) {
|
|
|
+ debugger;
|
|
|
this.reset();
|
|
|
const noticeId = row.noticeId || this.ids
|
|
|
getNotice(noticeId).then(response => {
|
|
@@ -375,9 +388,11 @@ export default {
|
|
|
this.check= true;
|
|
|
this.title = this.$t('查看') + " " + this.$t('公告');
|
|
|
});
|
|
|
-
|
|
|
- insertReadHis(row.noticeId,userId);
|
|
|
-
|
|
|
+ //点击查询,判断是否已有该条数据若已有则不添加,没有则向关联表添加一条数据
|
|
|
+ insertReadHis(row.noticeId).then(response => {
|
|
|
+ this.msgSuccess(this.$t('已读'));
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm: function() {
|