Commit 39081619 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/confucius into master

parents 140800b6 4f63bc65
......@@ -37,3 +37,13 @@ export function queryDutyPlanInfo(data) {
data
})
}
//获取我的排班计划
export function queryMyDutyPlanPage(data) {
return request({
url: '/DutyPlan/GetMyDutyPlanPage',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -6,7 +6,7 @@
transition-show="scale"
transition-hide="scale"
>
<q-card style="width: 800px;max-width:900px;">
<q-card style="width: 850px;max-width:950px;">
<q-card-section>
<div class="text-h6">设置课程价格</div>
</q-card-section>
......@@ -60,7 +60,7 @@
<td style="width:200px">
优惠类型
</td>
<td style="width:150px">
<td style="width:200px">
优惠条件
</td>
<td style="width:140px">
......@@ -203,7 +203,7 @@
dense
v-model="item.EduCommissionMoney"
ref="EduCommissionMoney"
label="销售返佣"
label="教育同行"
@keyup.native="checkPrice(item, 'EduCommissionMoney')"
class="q-pr-none"
style="width:100px"
......
......@@ -40,8 +40,7 @@
</q-avatar>
</q-item-section> -->
<q-item-section avatar>
<q-avatar :style="{'background-color':'#e1f0ff'}" rounded size="40px"
text-color="negative">
<q-avatar :style="{'background-color':'#e1f0ff'}" rounded size="40px" text-color="negative">
<inline-svg :class="['svg-icon',`svg-icon-primary`]" src="icons/svg/Shopping/Bag2.svg"></inline-svg>
</q-avatar>
</q-item-section>
......@@ -55,8 +54,9 @@
<none-data v-else></none-data>
</q-tab-panel>
<q-tab-panel name="notify" class="scroll _scrollbar">
<q-card flat v-for="(item,index) in noticeList" :key="index" class="relative-position overflow-hidden q-pa-md text-grey-1 cursor-pointer q-mb-md"
style="height:130px" @click="goNoticeDetail(item)">
<q-card flat v-for="(item,index) in noticeList" :key="index"
class="relative-position overflow-hidden q-pa-md text-grey-1 cursor-pointer q-mb-md" style="height:130px"
@click="goNoticeDetail(item)">
<div class="gonggao-bg">
<img src="../../assets/images/noticeBg.png" />
</div>
......@@ -73,7 +73,7 @@
{{item.Title}}
</div>
<div class="relative-position q-mt-md text-right">
编号:{{item.Number}}
编号:{{item.Number}}
</div>
</q-card>
<div class="notifyLoadMore" v-if="noticeMsg.pageSize<Count" @click="getMoreNotify()">
......@@ -106,10 +106,10 @@
type: Object,
default: null
},
socektObj:{
type:Array,
socektObj: {
type: Array,
default: null
}
},
},
components: {
noneData
......@@ -259,20 +259,20 @@
imgCov: 'http://192.168.20.214:8130/Upload/studentIcon/20201201044129361.png',
//通知请求参数
noticeMsg:{
pageIndex:1,
pageSize:5
noticeMsg: {
pageIndex: 1,
pageSize: 5
},
Count:0,
noticeList:[],
socektArr:[],
Count: 0,
noticeList: [],
socektArr: [],
}
},
created() {
this.init();
this.getNotify();
this.getLogList();
this.getMsg();
this.socektArr = this.socektObj;
this.goMsgDetail('/course/prepareclassDetails?ClassId=5&ClassPlanId=2898');
},
methods: {
init() {
......@@ -294,22 +294,19 @@
},
undefinedGongneng(item) {
this.$router.push("/AssetsShenpi")
this.$router.push({path:"/AssetsShenpi",query:{Id:115,compType:"shenpi"}})
this.$router.push({
path: "/AssetsShenpi",
query: {
Id: 115,
compType: "shenpi"
}
})
// this.$q.dialog({
// title: '功能提示',
// message: '灰度测试功能,即将在下版本中开启'
// }).onOk(() => {
// });
},
//获取日志列表
getLogList(){
GetMsgLogList().then(res => {
if (res.Code == 1) {
console.log(res,'日志数据');
this.socektArr = res.Data;
}
})
},
//请求公告数据
getNotify() {
GetMyNoticePageList(this.noticeMsg).then(res => {
......@@ -320,106 +317,47 @@
})
},
//加载更多一次加载一条
getMoreNotify(){
this.noticeMsg.pageSize+=5;
getMoreNotify() {
this.noticeMsg.pageSize += 5;
this.getNotify();
},
//跳转详情
goNoticeDetail(item){
var url = window.location.host;
   let routeUrl = this.$router.resolve({
     path: "/noticeView",
     query: {NoticeId:item.Id}
   });
   window.open(routeUrl.href, '_blank');
},
getMsg() {
let userinfo = this.getLocalStorage();
var SendData = {
AppId: "JiaHeJiaoYu",
ClientId: userinfo.Id,
};
sendSock(SendData, this.getDataFunc)
},
getDataFunc(e) {
console.log("socketData",e);
if (e.data) {
var newData = JSON.parse(e.data)
console.log(newData,'newData');
this.socektArr = this.socektArr.concat(newData)
this.showNotification(newData[0].Title, newData[0].Content, newData.CoverImg)
}
goNoticeDetail(item) {
var url = window.location.host;
let routeUrl = this.$router.resolve({
path: "/noticeView",
query: {
NoticeId: item.Id
}
});
window.open(routeUrl.href, '_blank');
},
/**
* 通过Html调用显示系统通知
* @param title
* @param msg
* @param imgUrl
*/
showNotification(title, msg, imgUrl) {
var Notification = window.Notification || window.mozNotification || window.webkitNotification;
// 判断浏览器是否支持桌面通知
if (Notification) {
Notification.requestPermission(function (result) {
//result 默认值'default'等同于拒绝 'denied' -用户选择了拒绝 'granted' -用户同意启用通知
if ("granted" != result) {
console.log('请授权浏览器能够进行通知!');
return false;
} else {
var tag = "sds" + Math.random();
var notify = new Notification(
title, {
dir: 'auto',
lang: 'zh-CN',
tag: tag, //实例化的notification的id
icon: imgUrl, //通知的缩略图,icon 支持ico、png、jpg、jpeg格式
title: title, //通知的标题
body: msg //通知的具体内容
}
);
// 定义通知窗口点击函数
notify.onclick = function () {
//如果通知消息被点击,通知窗口将被激活
window.focus();
};
// 定义通知错误事件
notify.onerror = function () {
// console.log("");
};
// 定义通知显示事件 可以设置多少秒之后关闭 也可以不设置关闭
notify.onshow = function () {
// 窗口显示3S后关闭
setTimeout(function () {
notify.close();
}, 3000);
};
// 定义通知关闭事件
notify.onclose = function () {
};
}
});
} else {
// 提示不支持系统通知
console.log('您的浏览器不支持系统通知,建议使用Chrome浏览');
}
},
//跳转链接 新页面打开
goMsgDetail(url){
if(url){
window.open(url);
goMsgDetail(url) {
let locationName = window.location.hostname;
var host = window.location.host;
var newurl = ""
if (url != null && url.length > 0) {
if (url.indexOf('http://') == -1 || url.indexOf('https://') == -1) {
newurl = "http://" + locationName + (host != 80 ? ":" + host : "") + "/#" + url;
} else {
newurl = url
}
}
console.log("newurl", newurl);
//window.open(url, "_blank");
},
//看过后删除
readMsgLog(Id,index){
readMsgLog(Id, index) {
let msg = {
Ids:[]
Ids: []
}
msg.Ids.push(Id);
BeatchReadMsgLog(msg).then(res => {
if (res.Code == 1) {
this.socektArr.splice(index,1);
this.socektArr.splice(index, 1);
}
})
}
......@@ -462,10 +400,12 @@
margin-top: -8%;
margin-left: -5%;
}
.notifyLoadMore{
text-align:right;
.notifyLoadMore {
text-align: right;
cursor: pointer;
font-size:12px;
color:#2961FE;
font-size: 12px;
color: #2961FE;
}
</style>
......@@ -16,7 +16,9 @@
</q-tabs>
<div class="q-pl-lg flex items-center">
<div class="wave_wrapper" @click="showNotify">
<span class="dona wave_scale">
<!-- <span class="dona wave_scale">
</span> -->
<span :class="{'dona':socektArr.length>0,'wave_scale':socektArr.length>0}">
</span>
<inline-svg class="svg-icon svg-icon-primary" src="icons/svg/Code/Compiling.svg"></inline-svg>
</div>
......@@ -73,7 +75,7 @@
</div>
</q-page-container>
<user-info-box v-if="persistent" :show-obj="userInfo" @close="closeSaveForm"></user-info-box>
<notify v-if="persistentNotify" :show-obj="userInfo" @close="closeSaveForm"></notify>
<notify v-if="persistentNotify" :show-obj="userInfo" :socekt-obj="socektArr" @close="closeSaveForm"></notify>
</q-layout>
</template>
......@@ -83,6 +85,11 @@
} from 'vuex'
import userInfoBox from '../components/global/user-right-box'
import notify from '../components/global/notify'
import {
GetMsgLogList
} from '../api/course/index'
import {
sendSock
} from '../api/common/socket'
......@@ -112,6 +119,7 @@
isExpend: false,
IsShowLeft: true,
userCenterMenuList: [], //用户中心菜单
socektArr:[], //消息数组
}
},
components: {
......@@ -170,6 +178,9 @@
if (this.userInfo && this.userInfo.MenuList) {
this.secondNavs = this.userInfo.MenuList.length > 0 ? this.userInfo.MenuList[i].SubList : []
}
this.getLogList();
this.getMsg();
},
methods: {
changeLeft() {
......@@ -197,7 +208,90 @@
this.$router.push({
path: this.userInfo.MenuList[val].MenuUrl
})
}
},
//获取日志列表
getLogList(){
GetMsgLogList().then(res => {
if (res.Code == 1) {
console.log(res,'mainLayout日志数据');
this.socektArr = res.Data;
}
})
},
getMsg() {
let userinfo = this.getLocalStorage();
var SendData = {
AppId: "JiaHeJiaoYu",
ClientId: userinfo.Id,
};
sendSock(SendData, this.getDataFunc)
},
getDataFunc(e) {
console.log("socketData",e);
if (e.data) {
var newData = JSON.parse(e.data)
console.log(newData,'newData');
this.socektArr = this.socektArr.concat(newData)
console.log(this.socektArr,'this.socektArr');
this.showNotification(newData[0].Title, newData[0].Content, newData.CoverImg)
}
},
/**
* 通过Html调用显示系统通知
* @param title
* @param msg
* @param imgUrl
*/
showNotification(title, msg, imgUrl) {
var Notification = window.Notification || window.mozNotification || window.webkitNotification;
// 判断浏览器是否支持桌面通知
if (Notification) {
Notification.requestPermission(function (result) {
//result 默认值'default'等同于拒绝 'denied' -用户选择了拒绝 'granted' -用户同意启用通知
if ("granted" != result) {
console.log('请授权浏览器能够进行通知!');
return false;
} else {
var tag = "sds" + Math.random();
var notify = new Notification(
title, {
dir: 'auto',
lang: 'zh-CN',
tag: tag, //实例化的notification的id
icon: imgUrl, //通知的缩略图,icon 支持ico、png、jpg、jpeg格式
title: title, //通知的标题
body: msg //通知的具体内容
}
);
// 定义通知窗口点击函数
notify.onclick = function () {
//如果通知消息被点击,通知窗口将被激活
window.focus();
};
// 定义通知错误事件
notify.onerror = function () {
// console.log("");
};
// 定义通知显示事件 可以设置多少秒之后关闭 也可以不设置关闭
notify.onshow = function () {
// 窗口显示3S后关闭
setTimeout(function () {
notify.close();
}, 3000);
};
// 定义通知关闭事件
notify.onclose = function () {
};
}
});
} else {
// 提示不支持系统通知
console.log('您的浏览器不支持系统通知,建议使用Chrome浏览');
}
},
},
}
......
......@@ -34,7 +34,7 @@
</q-btn>
<q-btn @click="changeMenu(2)" v-if="AccountType==2 || ispower==true" flat :color="chosenMenu==2?'primary':'blue-grey-14'" :class="[chosenMenu==2?'text-weight-bold':'']" label="备课管理">
</q-btn>
<q-btn flat @click="changeMenu(3)" label="我的排班计划"></q-btn>
<q-btn flat @click="changeMenu(3)" :color="chosenMenu==3?'primary':'blue-grey-14'" :class="[chosenMenu==3?'text-weight-bold':'']" label="我的排班计划"></q-btn>
</div>
<div v-if="chosenMenu==1" class="flex col" style="flex: 1">
......
<template>
<div class="page-body">
<div class="page-search row items-center">
<!-- <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.RoomName" label="教室名称"
@clear="resetSearch" maxlength="30" />
</div>
</div> -->
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table" separator="none" title="我的排班计划" :data="dataList"
:columns="columns" row-key="name">
<!-- <template v-slot:top="props">
<div class="col-2 q-table__title">教室信息</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" icon="add" label="新增教室" @click="EditClassRoom(null)" />
</div>
</template> -->
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" title="我的排班计划" :data="dataList" :columns="columns" row-key="name">
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
......@@ -36,23 +24,22 @@
</div>
</template>
<script>
// import {
// queryClassRoomPage,
// } from '../../api/school/index'
import {
queryMyDutyPlanPage,
} from '../../api/scheduling/schedu'
export default {
meta: {
title: "我的排班计划"
},
components: {
},
components: {},
data() {
return {
currentUrl: "",
columns: [{
name: 'RoomName',
name: 'PlanDate',
label: '日期',
align: 'left',
field: 'RoomName',
field: 'PlanDate',
},
{
name: 'SchoolName',
......@@ -61,39 +48,39 @@
align: 'left'
},
{
name: 'StatusStr',
name: 'ShiftName',
label: '时间(班次)',
align: 'left',
field: 'StatusStr'
field: 'ShiftName'
},
{
name: 'UpdateByName',
name: 'PlanList',
label: '任务清单',
align: 'left',
field: 'UpdateByName'
field: 'PlanList'
},
{
name: 'UpdateTimeStr',
name: 'ReciveMan',
label: '接班对象',
align: 'left',
field: 'UpdateTimeStr'
field: 'ReciveMan'
},
{
name: 'UpdateTimeStr',
name: 'GiveMan',
label: '交班对象',
align: 'left',
field: 'UpdateTimeStr'
field: 'GiveMan'
},
{
name: 'UpdateTimeStr',
name: 'CreateByName',
label: '排班人',
align: 'left',
field: 'UpdateTimeStr'
field: 'CreateByName'
},
{
name: 'optioned',
label: '操作',
field: 'RoomId'
field: 'Id'
}
],
dataList: [],
......@@ -102,33 +89,34 @@
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
RoomName: "",
School_Id: 0, //校区编号
Status: '-1', //状态
},
pageCount: 0,
}
},
created() {
//this.getSchool();
},
mounted() {
this.getMyDutyPage();
},
methods: {
//获取校区列表
getSchool() {
getSchoolDropdown({}).then(res => {
getMyDutyPage() {
this.loading = true;
queryMyDutyPlanPage(this.msg).then(res => {
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.pageCount = res.Data.Count;
}
this.loading = false;
console.log("res", res);
})
},
//分页改变
changePage(val) {
this.msg.pageIndex = val;
this.getClassRoomPage();
},
//开始值班
StartSchedule(){
StartSchedule() {
}
},
......
......@@ -51,7 +51,9 @@
<q-td v-if="col.name == 'PlanId'" style="padding-right:0px">
<div v-for="item in col.value">
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px">
{{getStatus(props,item)}}
<span v-if="getStatus(props.row.PlanDate,item)==1" style="color:blue">未开始</span>
<span v-if="getStatus(props.row.PlanDate,item)==2" style="color:green">进行中</span>
<span v-if="getStatus(props.row.PlanDate,item)==3" style="color:red">已结束</span>
</div>
</div>
</q-td>
......@@ -157,15 +159,15 @@
getList() {
GetDutyPlanPage(this.msg).then(res => {
if (res.Code == 1) {
console.log(res, '列表数据');
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
},
//分页改变
changePage(val) {
this.msg.pageIndex = val;
this.getClassRoomPage();
this.getList();
},
//新增修改值班计划
EditSchedu(obj) {
......@@ -182,16 +184,28 @@
},
//刷新页面
refreshPage() {
// if (!this.classRoomOption) {
// this.msg.pageIndex = 1;
// this.msg.RoomName = "";
// this.msg.School_Id = 0;
// }
// this.getClassRoomPage()
if (!this.scheduOption) {
this.msg.pageIndex = 1;
}
this.getList()
},
getStatus(props,obj){
console.log(props,'props');
console.log(obj,'objjjj');
let beginDateStr = props+' '+obj.StartTime;
let endDateStr = props+' '+obj.EndTime;
let str=0;
let curDate = new Date();
let beginDate = new Date(beginDateStr);
let endDate = new Date(endDateStr);
if(curDate<beginDate){
str=1 //未开始
}
if(curDate>=beginDate&&curDate<=endDate){
str=2 //进行中
}
if(curDate>endDate){
str=3 //已结束
}
return str;
}
},
}
......
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