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) { ...@@ -37,3 +37,13 @@ export function queryDutyPlanInfo(data) {
data data
}) })
} }
//获取我的排班计划
export function queryMyDutyPlanPage(data) {
return request({
url: '/DutyPlan/GetMyDutyPlanPage',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
transition-show="scale" transition-show="scale"
transition-hide="scale" transition-hide="scale"
> >
<q-card style="width: 800px;max-width:900px;"> <q-card style="width: 850px;max-width:950px;">
<q-card-section> <q-card-section>
<div class="text-h6">设置课程价格</div> <div class="text-h6">设置课程价格</div>
</q-card-section> </q-card-section>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<td style="width:200px"> <td style="width:200px">
优惠类型 优惠类型
</td> </td>
<td style="width:150px"> <td style="width:200px">
优惠条件 优惠条件
</td> </td>
<td style="width:140px"> <td style="width:140px">
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
dense dense
v-model="item.EduCommissionMoney" v-model="item.EduCommissionMoney"
ref="EduCommissionMoney" ref="EduCommissionMoney"
label="销售返佣" label="教育同行"
@keyup.native="checkPrice(item, 'EduCommissionMoney')" @keyup.native="checkPrice(item, 'EduCommissionMoney')"
class="q-pr-none" class="q-pr-none"
style="width:100px" style="width:100px"
......
...@@ -40,8 +40,7 @@ ...@@ -40,8 +40,7 @@
</q-avatar> </q-avatar>
</q-item-section> --> </q-item-section> -->
<q-item-section avatar> <q-item-section avatar>
<q-avatar :style="{'background-color':'#e1f0ff'}" rounded size="40px" <q-avatar :style="{'background-color':'#e1f0ff'}" rounded size="40px" text-color="negative">
text-color="negative">
<inline-svg :class="['svg-icon',`svg-icon-primary`]" src="icons/svg/Shopping/Bag2.svg"></inline-svg> <inline-svg :class="['svg-icon',`svg-icon-primary`]" src="icons/svg/Shopping/Bag2.svg"></inline-svg>
</q-avatar> </q-avatar>
</q-item-section> </q-item-section>
...@@ -55,8 +54,9 @@ ...@@ -55,8 +54,9 @@
<none-data v-else></none-data> <none-data v-else></none-data>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="notify" class="scroll _scrollbar"> <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" <q-card flat v-for="(item,index) in noticeList" :key="index"
style="height:130px" @click="goNoticeDetail(item)"> 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"> <div class="gonggao-bg">
<img src="../../assets/images/noticeBg.png" /> <img src="../../assets/images/noticeBg.png" />
</div> </div>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
{{item.Title}} {{item.Title}}
</div> </div>
<div class="relative-position q-mt-md text-right"> <div class="relative-position q-mt-md text-right">
编号:{{item.Number}} 编号:{{item.Number}}
</div> </div>
</q-card> </q-card>
<div class="notifyLoadMore" v-if="noticeMsg.pageSize<Count" @click="getMoreNotify()"> <div class="notifyLoadMore" v-if="noticeMsg.pageSize<Count" @click="getMoreNotify()">
...@@ -106,10 +106,10 @@ ...@@ -106,10 +106,10 @@
type: Object, type: Object,
default: null default: null
}, },
socektObj:{ socektObj: {
type:Array, type: Array,
default: null default: null
} },
}, },
components: { components: {
noneData noneData
...@@ -259,20 +259,20 @@ ...@@ -259,20 +259,20 @@
imgCov: 'http://192.168.20.214:8130/Upload/studentIcon/20201201044129361.png', imgCov: 'http://192.168.20.214:8130/Upload/studentIcon/20201201044129361.png',
//通知请求参数 //通知请求参数
noticeMsg:{ noticeMsg: {
pageIndex:1, pageIndex: 1,
pageSize:5 pageSize: 5
}, },
Count:0, Count: 0,
noticeList:[], noticeList: [],
socektArr:[], socektArr: [],
} }
}, },
created() { created() {
this.init(); this.init();
this.getNotify(); this.getNotify();
this.getLogList(); this.socektArr = this.socektObj;
this.getMsg(); this.goMsgDetail('/course/prepareclassDetails?ClassId=5&ClassPlanId=2898');
}, },
methods: { methods: {
init() { init() {
...@@ -294,22 +294,19 @@ ...@@ -294,22 +294,19 @@
}, },
undefinedGongneng(item) { undefinedGongneng(item) {
this.$router.push("/AssetsShenpi") 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({ // this.$q.dialog({
// title: '功能提示', // title: '功能提示',
// message: '灰度测试功能,即将在下版本中开启' // message: '灰度测试功能,即将在下版本中开启'
// }).onOk(() => { // }).onOk(() => {
// }); // });
}, },
//获取日志列表
getLogList(){
GetMsgLogList().then(res => {
if (res.Code == 1) {
console.log(res,'日志数据');
this.socektArr = res.Data;
}
})
},
//请求公告数据 //请求公告数据
getNotify() { getNotify() {
GetMyNoticePageList(this.noticeMsg).then(res => { GetMyNoticePageList(this.noticeMsg).then(res => {
...@@ -320,106 +317,47 @@ ...@@ -320,106 +317,47 @@
}) })
}, },
//加载更多一次加载一条 //加载更多一次加载一条
getMoreNotify(){ getMoreNotify() {
this.noticeMsg.pageSize+=5; this.noticeMsg.pageSize += 5;
this.getNotify(); this.getNotify();
}, },
//跳转详情 //跳转详情
goNoticeDetail(item){ goNoticeDetail(item) {
var url = window.location.host; var url = window.location.host;
   let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
     path: "/noticeView", path: "/noticeView",
     query: {NoticeId:item.Id} query: {
   }); NoticeId: item.Id
   window.open(routeUrl.href, '_blank'); }
}, });
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)
}
}, },
/**
* 通过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){ goMsgDetail(url) {
if(url){ let locationName = window.location.hostname;
window.open(url); 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 = { let msg = {
Ids:[] Ids: []
} }
msg.Ids.push(Id); msg.Ids.push(Id);
BeatchReadMsgLog(msg).then(res => { BeatchReadMsgLog(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.socektArr.splice(index,1); this.socektArr.splice(index, 1);
} }
}) })
} }
...@@ -462,10 +400,12 @@ ...@@ -462,10 +400,12 @@
margin-top: -8%; margin-top: -8%;
margin-left: -5%; margin-left: -5%;
} }
.notifyLoadMore{
text-align:right; .notifyLoadMore {
text-align: right;
cursor: pointer; cursor: pointer;
font-size:12px; font-size: 12px;
color:#2961FE; color: #2961FE;
} }
</style> </style>
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
</q-tabs> </q-tabs>
<div class="q-pl-lg flex items-center"> <div class="q-pl-lg flex items-center">
<div class="wave_wrapper" @click="showNotify"> <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> </span>
<inline-svg class="svg-icon svg-icon-primary" src="icons/svg/Code/Compiling.svg"></inline-svg> <inline-svg class="svg-icon svg-icon-primary" src="icons/svg/Code/Compiling.svg"></inline-svg>
</div> </div>
...@@ -73,7 +75,7 @@ ...@@ -73,7 +75,7 @@
</div> </div>
</q-page-container> </q-page-container>
<user-info-box v-if="persistent" :show-obj="userInfo" @close="closeSaveForm"></user-info-box> <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> </q-layout>
</template> </template>
...@@ -83,6 +85,11 @@ ...@@ -83,6 +85,11 @@
} from 'vuex' } from 'vuex'
import userInfoBox from '../components/global/user-right-box' import userInfoBox from '../components/global/user-right-box'
import notify from '../components/global/notify' import notify from '../components/global/notify'
import {
GetMsgLogList
} from '../api/course/index'
import { import {
sendSock sendSock
} from '../api/common/socket' } from '../api/common/socket'
...@@ -112,6 +119,7 @@ ...@@ -112,6 +119,7 @@
isExpend: false, isExpend: false,
IsShowLeft: true, IsShowLeft: true,
userCenterMenuList: [], //用户中心菜单 userCenterMenuList: [], //用户中心菜单
socektArr:[], //消息数组
} }
}, },
components: { components: {
...@@ -170,6 +178,9 @@ ...@@ -170,6 +178,9 @@
if (this.userInfo && this.userInfo.MenuList) { if (this.userInfo && this.userInfo.MenuList) {
this.secondNavs = this.userInfo.MenuList.length > 0 ? this.userInfo.MenuList[i].SubList : [] this.secondNavs = this.userInfo.MenuList.length > 0 ? this.userInfo.MenuList[i].SubList : []
} }
this.getLogList();
this.getMsg();
}, },
methods: { methods: {
changeLeft() { changeLeft() {
...@@ -197,7 +208,90 @@ ...@@ -197,7 +208,90 @@
this.$router.push({ this.$router.push({
path: this.userInfo.MenuList[val].MenuUrl 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 @@ ...@@ -34,7 +34,7 @@
</q-btn> </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 @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>
<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>
<div v-if="chosenMenu==1" class="flex col" style="flex: 1"> <div v-if="chosenMenu==1" class="flex col" style="flex: 1">
......
<template> <template>
<div class="page-body"> <div class="page-body">
<div class="page-search row items-center"> <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>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
class="sticky-column-table" separator="none" title="我的排班计划" :data="dataList" separator="none" title="我的排班计划" :data="dataList" :columns="columns" row-key="name">
: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> -->
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
...@@ -36,23 +24,22 @@ ...@@ -36,23 +24,22 @@
</div> </div>
</template> </template>
<script> <script>
// import { import {
// queryClassRoomPage, queryMyDutyPlanPage,
// } from '../../api/school/index' } from '../../api/scheduling/schedu'
export default { export default {
meta: { meta: {
title: "我的排班计划" title: "我的排班计划"
}, },
components: { components: {},
},
data() { data() {
return { return {
currentUrl: "", currentUrl: "",
columns: [{ columns: [{
name: 'RoomName', name: 'PlanDate',
label: '日期', label: '日期',
align: 'left', align: 'left',
field: 'RoomName', field: 'PlanDate',
}, },
{ {
name: 'SchoolName', name: 'SchoolName',
...@@ -61,39 +48,39 @@ ...@@ -61,39 +48,39 @@
align: 'left' align: 'left'
}, },
{ {
name: 'StatusStr', name: 'ShiftName',
label: '时间(班次)', label: '时间(班次)',
align: 'left', align: 'left',
field: 'StatusStr' field: 'ShiftName'
}, },
{ {
name: 'UpdateByName', name: 'PlanList',
label: '任务清单', label: '任务清单',
align: 'left', align: 'left',
field: 'UpdateByName' field: 'PlanList'
}, },
{ {
name: 'UpdateTimeStr', name: 'ReciveMan',
label: '接班对象', label: '接班对象',
align: 'left', align: 'left',
field: 'UpdateTimeStr' field: 'ReciveMan'
}, },
{ {
name: 'UpdateTimeStr', name: 'GiveMan',
label: '交班对象', label: '交班对象',
align: 'left', align: 'left',
field: 'UpdateTimeStr' field: 'GiveMan'
}, },
{ {
name: 'UpdateTimeStr', name: 'CreateByName',
label: '排班人', label: '排班人',
align: 'left', align: 'left',
field: 'UpdateTimeStr' field: 'CreateByName'
}, },
{ {
name: 'optioned', name: 'optioned',
label: '操作', label: '操作',
field: 'RoomId' field: 'Id'
} }
], ],
dataList: [], dataList: [],
...@@ -102,33 +89,34 @@ ...@@ -102,33 +89,34 @@
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
RoomName: "",
School_Id: 0, //校区编号
Status: '-1', //状态
}, },
pageCount: 0, pageCount: 0,
} }
}, },
created() { created() {
//this.getSchool();
}, },
mounted() { mounted() {
this.getMyDutyPage();
}, },
methods: { methods: {
//获取校区列表 getMyDutyPage() {
getSchool() { this.loading = true;
getSchoolDropdown({}).then(res => { queryMyDutyPlanPage(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.pageCount = res.Data.Count;
} }
this.loading = false;
console.log("res", res);
}) })
}, },
//分页改变 //分页改变
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getClassRoomPage();
}, },
//开始值班 //开始值班
StartSchedule(){ StartSchedule() {
} }
}, },
......
...@@ -51,7 +51,9 @@ ...@@ -51,7 +51,9 @@
<q-td v-if="col.name == 'PlanId'" style="padding-right:0px"> <q-td v-if="col.name == 'PlanId'" style="padding-right:0px">
<div v-for="item in col.value"> <div v-for="item in col.value">
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px"> <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>
</div> </div>
</q-td> </q-td>
...@@ -157,15 +159,15 @@ ...@@ -157,15 +159,15 @@
getList() { getList() {
GetDutyPlanPage(this.msg).then(res => { GetDutyPlanPage(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
console.log(res, '列表数据');
this.dataList = res.Data.PageData; this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
} }
}) })
}, },
//分页改变 //分页改变
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getClassRoomPage(); this.getList();
}, },
//新增修改值班计划 //新增修改值班计划
EditSchedu(obj) { EditSchedu(obj) {
...@@ -182,16 +184,28 @@ ...@@ -182,16 +184,28 @@
}, },
//刷新页面 //刷新页面
refreshPage() { refreshPage() {
// if (!this.classRoomOption) { if (!this.scheduOption) {
// this.msg.pageIndex = 1; this.msg.pageIndex = 1;
// this.msg.RoomName = ""; }
// this.msg.School_Id = 0; this.getList()
// }
// this.getClassRoomPage()
}, },
getStatus(props,obj){ getStatus(props,obj){
console.log(props,'props'); let beginDateStr = props+' '+obj.StartTime;
console.log(obj,'objjjj'); 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