Commit dfd0be6e authored by 罗超's avatar 罗超

新增待办消息气泡和动态切换消息通知功能

parent 4cf4355a
......@@ -50,6 +50,7 @@
:isComponents="true"
:billId="msg.billId"
:receipt="msg.receipt"
@success="refreshPage"
></changeClassManager>
</div>
</div>
......@@ -82,6 +83,9 @@ export default {
}
})
.catch(() => {});
},
refreshPage() {
this.$root.$emit("updateTodoList");
}
}
};
......
......@@ -282,6 +282,7 @@ export default {
},
refreshPage() {
this.getStudent();
this.$root.$emit("updateTodoList");
}
}
};
......
......@@ -106,6 +106,7 @@ export default {
},
refreshPage() {
this.getStudent();
this.$root.$emit("updateTodoList");
},
changePage() {
this.getStudent();
......
......@@ -41,15 +41,10 @@
</div>
<div style="height:calc(100% - 158px)">
<stulist
:dataList="stus"
@reload="getStudent"
@success="refreshPage"
:loading="loading"
ref="stuList"
:showHeader="false"
:isJudgeTrans="isJudgeTrans"
height="100%"
:noSelect="true"
:outData="stus"
:outLoading="loading"
:pageSize="msg.pageSize"
:isComponent="true"
></stulist>
</div>
<div class="row" style="justify-content: flex-end;padding: 5px 20px">
......@@ -67,7 +62,7 @@
</template>
<script>
import stulist from "../school/student/stulist";
import stulist from "../../pages/stuMan/stuList.vue";
import { getGraduateStudent } from "../../api/stuMan/index";
export default {
components: { stulist },
......@@ -80,7 +75,7 @@ export default {
pageCount: 0,
msg: {
PageIndex: 1,
pageSize: 12,
pageSize: 15,
KeyWords: ""
}
};
......@@ -110,6 +105,7 @@ export default {
},
refreshPage() {
this.getStudent();
this.$root.$emit("updateTodoList");
},
changePage() {
this.getStudent();
......
......@@ -14,7 +14,22 @@
:name="x.id.toString()"
:icon="`iconfont ${x.icon}`"
:label="x.name"
></q-tab>
content-class="todo-box-tab-class"
>
<div
class="col row justify-end"
v-if="
childTodoTipList[`${x.value}`] &&
childTodoTipList[`${x.value}`] != 0
"
>
<q-badge
rounded
color="red"
:label="childTodoTipList[`${x.value}`]"
/>
</div>
</q-tab>
</q-tabs>
</div>
<div class="col bg-white rounded-borders full-height">
......@@ -80,6 +95,7 @@ import payee from "./payee.vue";
import business from "./business.vue";
import financialDocuments from "../../pages/financial/financalDocument/FinancialDocuments.vue";
export default {
inject: ["todoTipList"],
components: {
todoToday,
todoStu,
......@@ -101,67 +117,83 @@ export default {
id: 1,
name: "今日需联系线索",
msg: 0,
icon: "icon-xiansuo"
icon: "icon-xiansuo",
value: "TodayClueCount"
},
{
id: 2,
name: "今日需联系学员",
msg: 0,
icon: "icon-xueyuan2"
icon: "icon-xueyuan2",
value: "TodayConnectCount"
},
{
id: 3,
name: "分配给我的线索",
msg: 0,
icon: "icon-fenpei"
icon: "icon-fenpei",
value: "MyClueCount"
},
{
id: 4,
name: "分配给我的学员",
msg: 0,
icon: "icon-fenpeijiaose"
icon: "icon-fenpeijiaose",
value: "MyStudentCount"
},
{
id: 5,
name: "待申领合同",
msg: 0,
icon: "icon-hetong"
icon: "icon-hetong",
value: "MyOrderNotReceiveContractCount"
},
{
id: 6,
name: "待收款提醒",
msg: 0,
icon: "icon-shoukuan"
icon: "icon-shoukuan",
value: "MyOrderNotBalanceCount"
},
{
id: 7,
name: "今日被跟进学员",
msg: 0,
icon: "icon-genjin"
icon: "icon-genjin",
value: "TodayFollowCount"
},
{
id: 8,
name: "即将毕业学员",
msg: 0,
icon: "icon-biyejieye"
icon: "icon-biyejieye",
value: "GraduateStudentCount"
},
{
id: 9,
name: "待审核财务单据",
msg: 0,
icon: "icon-caiwu1"
icon: "icon-caiwu1",
value: "todoFincal"
},
{
id: 10,
name: "待审核业务单据",
msg: 0,
icon: "icon-yewu"
icon: "icon-yewu",
value: "NotBusinessBillCount"
}
]
};
},
computed: {
childTodoTipList() {
return this.todoTipList.result;
}
},
mounted() {
this.currentMenu = this.menulist[0].id.toString();
//console.log(this.todoTipList);
},
methods: {}
};
......@@ -175,5 +207,9 @@ export default {
.q-tabs--vertical .justify-center,
.q-tabs--vertical .flex-center {
justify-content: unset !important;
width: 100%;
}
.todo-box-tab-class {
width: 100%;
}
</style>
......@@ -108,6 +108,7 @@ export default {
},
refreshPage() {
this.getStudent();
this.$root.$emit("updateTodoList");
},
changePage() {
this.getStudent();
......
......@@ -106,6 +106,7 @@ export default {
},
refreshPage() {
this.getStudent();
this.$root.$emit("updateTodoList");
},
changePage() {
this.getStudent();
......
......@@ -87,6 +87,8 @@ export default {
},
mounted() {
this.getStudent();
this.$root.$emit("updateTodoList");
//@TODO:添加查询条件
},
methods: {
getStudent() {
......
......@@ -106,6 +106,7 @@ export default {
},
refreshPage() {
this.getStudent();
this.$root.$emit("updateTodoList");
},
changePage() {
this.getStudent();
......
......@@ -106,6 +106,7 @@ export default {
},
refreshPage() {
this.getStudent();
this.$root.$emit("updateTodoList");
},
changePage() {
this.getStudent();
......
......@@ -20,7 +20,15 @@
:color="chosenMenu == 7 ? 'primary' : 'blue-grey-14'"
:class="[chosenMenu == 7 ? 'text-weight-bold' : '']"
label="待办工作"
></q-btn>
>
<q-badge
rounded
color="red"
:label="todoCount"
v-if="todoCount > 0"
floating
/>
</q-btn>
<q-btn
flat
@click="changeMenu(5)"
......@@ -125,7 +133,7 @@
<script>
import { GetMyNoticePageList } from "../api/course/index";
import { getTodayStatic } from "../api/stuMan/index";
import teachplan from "./course/teacherLesson";
import okr from "./okr/index";
import alignView from "./okr/okr-align-view";
......@@ -164,12 +172,21 @@ export default {
pageSize: 1,
LookTime: ""
},
todoList: { result: null },
todoCount: 0,
isShowNotice: false,
noticeObj: {},
autoSendTodo: null,
TimeList: [] //存放时间作为比较
};
},
created() {},
created() {
this.$root.$on("updateTodoList", this.initTodoList);
},
beforeDestroy() {
this.$root.$off("updateTodoList", this.initTodoList);
clearInterval(this.autoSendTodo);
},
mounted() {
let userInfo = this.getLocalStorage();
this.AccountType = userInfo.AccountType;
......@@ -195,8 +212,35 @@ export default {
this.noticeMsg.LookTime = notifyTime;
}
this.getNoticeList();
this.initTodoList();
this.autoSendTodo = setInterval(() => {
this.initTodoList();
}, 60 * 1000);
},
provide() {
return {
todoTipList: this.todoList
};
},
methods: {
initTodoList() {
getTodayStatic().then(r => {
console.log(r);
let d = r.Data;
this.todoList.result = d;
let tempCount = 0;
tempCount += d.GraduateStudentCount;
tempCount += d.MyClueCount;
tempCount += d.MyOrderNotBalanceCount;
tempCount += d.MyOrderNotReceiveContractCount;
tempCount += d.MyStudentCount;
tempCount += d.NotBusinessBillCount;
tempCount += d.TodayClueCount;
tempCount += d.TodayConnectCount;
tempCount += d.TodayFollowCount;
this.todoCount = tempCount;
});
},
changeMenu(i) {
if (i == 1) {
this.okrMenu = 1;
......
This diff is collapsed.
......@@ -648,6 +648,9 @@ export default {
this.isShowAssessmentForm = false;
this.billObj = {};
this.getStuBackBill();
if (this.isComponents) {
this.$emit("success");
}
},
//获取下拉数据
getEducationType() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment