- 弹窗提示
+
+
+
{{ list[0].typeName }}
+
{{ list[0].content }}
+
{{ list[0].remindTime }}
+
@@ -9,320 +16,87 @@ import { requestPost } from "@/js/dai/request2";
import nextTick from "dai-js/tools/nextTick";
export default {
- components: { },
+ components: {},
data() {
return {
- agencyId: "",
-
- tableData: [],
-
- currentIndex: 0,
+ displayed: false,
+
+ lastTime: 0,
+
+ list: [
+ {
+ memoId: "1",
+ type: "work_diary",
+ typeName: "工作日志",
+ content:
+ "提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容",
+ remindTime: "2022-02-22 22:22",
+ },
+ ],
};
},
- computed: {
- },
+ computed: {},
watch: {
- currentIndex() {
- },
+ currentIndex() {},
},
async mounted() {
- await this.loadAgency();
- await this.getTableData();
+ this.poll();
},
methods: {
- async handleDel() {
- if (!confirm("删除后不可恢复,确定删除?")) return;
-
- const item = this.tableData[this.currentIndex];
- const url = "/gov/org/icpartyservicecenter/del";
-
- const { data, code, msg } = await requestPost(url, [
- item.partyServiceCenterId,
- ]);
+ async poll() {
+ let nowTime = new Date().getTime();
+ if (nowTime - this.lastTime > 60 * 1000) {
+ this.lastTime = nowTime;
+ this.getList();
+ }
+ await nextTick(1000);
+ this.poll();
+ },
- if (code === 0) {
- this.$message.success("删除成功!");
- this.getTableData();
+ checkInfo() {
+ const { memoId, type } = this.list[0];
+ if (type == "work_diary") {
+ this.$router.push({
+ path: `/main/visual-basicinfo-people/${uid}`,
+ });
+ } else if (type == "concern") {
+ } else if (type == "difficulty") {
}
+
+ this.read();
},
- async getTableData() {
- const oldLen = this.tableData.length;
- const url = "/gov/org/icpartyservicecenter/partyservicecenterlist";
+ async read() {
+ const item = this.list[0];
+ const url = "/gov/project/memoAttr/setReaded";
+
const { data, code, msg } = await requestPost(url, {
- orgId: this.agencyId,
- orgType: "agency",
+ memoId: item.memoId,
});
- if (code === 0) {
- console.log("列表请求成功!!!!!!!!!!!!!!");
- this.tableData = data;
-
- if (data.length > 0 && oldLen == 0) {
- await nextTick(100);
- this.initMap();
- this.setMap();
- }
+ if (code === 0) {
+ // this.$message.success("删除成功!");
+ this.displayed = false;
+ this.getList();
}
},
- //加载组织
- async loadAgency() {
- const url = "/epmetuser/customerstaff/staffbasicinfo";
- let params = {};
-
- const { data, code, msg } = await requestPost(url, params);
-
+ async getList() {
+ const url = "/gov/project/memoAttr/memosToRemind";
+ const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
- this.agencyId = data.agencyId;
+ console.log("列表请求成功!!!!!!!!!!!!!!");
+ this.displayed = true;
+ this.lastTime = new Date().getTime();
+ // this.list = data;
}
},
},
};
-
+