Commit dfd0be6e authored by 罗超's avatar 罗超

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

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