Commit 524c765d authored by zhengke's avatar zhengke

1

parents 68b16b8b 9a9fddd5
......@@ -57,3 +57,37 @@ export function delScrollShiftInfo(data) {
data
})
}
/**
* 获取上课时段列表
* @param {JSON参数} data
*/
export function getScrollCourseTimeList(data) {
return request({
url: '/Scroll/GetScrollCourseTimeList',
method: 'post',
data
})
}
/**
* 新增修改上课时段
* @param {JSON参数} data
*/
export function setScrollCourseTimeInfo(data) {
return request({
url: '/Scroll/SetScrollCourseTimeInfo',
method: 'post',
data
})
}
/**
* 删除上课时段
* @param {JSON参数} data
*/
export function delScrollCourseTimeInfo(data) {
return request({
url: '/Scroll/DelScrollCourseTimeInfo',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -21,34 +21,34 @@
</div>
<div class="row wrap">
<div class="col-12">
<el-input v-model="objOption.GoalMoney" placeholder="金额"
@keyup.native="checkInteger(objOption,'GoalMoney')"></el-input>
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.GoalMoney" ref="GoalMoney2"
label="目标金额" :rules="[val => !!val || '请填写目标金额']" />
</div>
</div>
<div class="row wrap" style="margin-top:10px;">
<div class="col-12">
<selectTree :treeData='DeptList' :defaultArray="returnString" nodeKey="DeptId" :multiple="false"
labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild"></selectTree>
<q-select filled stack-label v-model="objOption.Dept_Id" :options="DeptList" emit-value map-options
label="所属部门" option-label="DeptName" option-value="DeptId" />
</div>
</div>
</template>
<template v-if="isShow==2">
<div class="row wrap">
<div class="col-12">
<el-date-picker v-model="value2" style="width:100%" type="month"
value-format="yyyy-MM" placeholder="选择月">
<el-date-picker v-model="value2" style="width:100%" type="month" value-format="yyyy-MM" placeholder="选择月">
</el-date-picker>
</div>
</div>
<div class="row wrap" style="margin-top:10px;">
<div class="col-12">
<el-input v-model="updateMsg.GoalMoney" placeholder="金额" @keyup.native="checkInteger(updateMsg,'GoalMoney')"></el-input>
<q-input filled stack-label maxlength="20" :dense="false" v-model="updateMsg.GoalMoney" ref="GoalMoney2"
label="目标金额" :rules="[val => !!val || '请填写目标金额']" />
</div>
</div>
<div class="row wrap" style="margin-top:10px;">
<div class="col-12">
<selectTree :treeData='DeptList' :defaultArray="returnString2" nodeKey="DeptId" :multiple="false"
labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild"></selectTree>
<q-select filled stack-label v-model="updateMsg.Dept_Id" :options="DeptList" emit-value map-options
label="所属部门" option-label="DeptName" option-value="DeptId" />
</div>
</div>
</template>
......@@ -56,10 +56,10 @@
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" v-if="isShow==1" :loading="saveLoading"
@click="saveNeed" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" v-if="isShow==2" :loading="saveLoading"
@click="saveTarget" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" v-if="isShow==1"
:loading="saveLoading" @click="saveNeed" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" v-if="isShow==2"
:loading="saveLoading" @click="saveTarget" />
</q-card-actions>
</q-card>
</q-dialog>
......@@ -72,7 +72,6 @@
} from '../../api/system/index'
//部门
import {
getDeptTree,
getDeptList
} from '../../api/system/dept'
import selectTree from '../../components/common/select-tree'
......@@ -93,7 +92,7 @@
value: '',
objOption: {
GoalMoney: "",
Dept_Id: 0,
Dept_Id: 13,
TimeList: [],
},
updateMsg: {
......@@ -105,39 +104,25 @@
},
optionTitle: "",
DeptList: [], // 部门下拉
returnString: [], //默认岗位
isShow: 1,
value2:'',
returnString2:[]
value2: '',
}
},
created() {
this.queryDeptList();
},
mounted() {
this.initObj();
this.queryDeptTree();
},
methods: {
//获取部门结构树
queryDeptTree() {
getDeptTree({}).then(res => {
if (res.Code == 1) {
queryDeptList() {
var qMsg = {};
getDeptList(qMsg).then(res => {
this.DeptList = res.Data;
}
})
});
},
getChild(deptArray) {
var tempStr = "";
if (deptArray && deptArray != '') {
tempStr = deptArray;
}
if (tempStr) {
this.objOption.Dept_Id = tempStr;
this.updateMsg.Dept_Id = tempStr;
} else {
this.objOption.Dept_Id = 0;
this.updateMsg.Dept_Id = 0;
}
},
//选择月份
dateChange(val) {
this.objOption.TimeList.push(val) // 这里记得格式化
......@@ -156,9 +141,8 @@
this.updateMsg.MonthStr = res.Data.MonthStr;
this.updateMsg.GoalMoney = res.Data.GoalMoney;
this.updateMsg.Dept_Id = res.Data.Dept_Id;
this.returnString2.push(res.Data.Dept_Id);
this.isShow = 2;
this.value2 = this.updateMsg.YearStr+'-'+this.updateMsg.MonthStr;
this.value2 = this.updateMsg.YearStr + '-' + this.updateMsg.MonthStr;
})
this.optionTitle = "修改目标"
} else {
......@@ -192,12 +176,12 @@
})
},
//修改保存
saveTarget(){
if(this.value2){
saveTarget() {
if (this.value2) {
let myDate = this.value2.split('-');
this.updateMsg.YearStr = myDate[0];
this.updateMsg.MonthStr = myDate[1];
}else{
} else {
this.updateMsg.YearStr = '';
this.updateMsg.MonthStr = '';
}
......@@ -219,5 +203,4 @@
}
}
}
</script>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -9,6 +9,7 @@
.singeRowTable tr th {
border: 1px solid #d2d2d2;
background: #FFF;
background-clip: padding-box;
}
.workutaTeaching td:first-child{position: sticky;left:0px;background-color: #FFF;}
.workutaTeaching th:first-child{position: sticky;left:0px;}
......@@ -22,6 +23,16 @@
border-radius: 50%;
margin-right: 10px;
}
.onetext{
width: 100px;
white-space: nowrap;
overflow: hidden;text-overflow:ellipsis;
}
.onetext2{
width: 64px;
white-space: nowrap;
overflow: hidden;text-overflow:ellipsis;
}
</style>
<template>
<div class="page-body workutaTeaching">
......@@ -55,7 +66,12 @@
</th>
</tr>
<tr v-for="(item,index) in dataList.TeacherList" :key="index" v-if="dataList.TeacherList && dataList.TeacherList.length>0">
<td>{{item.TeacherName}}</td>
<td >
<div class="onetext">
{{item.TeacherName}}
</div>
</td>
<td v-for="(x,y) in item.RDateList" :key="y" class="finger" @click="choicedate(item,x,index,y)" :style="{background:getcolor(x).background,color:getcolor(x).color}">
{{x.ShiftName?x.ShiftName.substring(0,1):''}}
<q-popup-proxy>
......@@ -97,8 +113,12 @@
<tr v-for="(item,index) in dataList.ShiftList" :key="index" v-if="dataList.TeacherList && dataList.TeacherList.length>0">
<td width="100" style="min-width: 100px;">
<div style="display: flex;align-items: center;justify-content: center;padding: 0 5px;">
<span class="yuan" :style="{ background: getcolor(item).background }" ></span>
{{item.ShiftName}}
<div class="onetext2">{{item.ShiftName}}</div>
</div>
</td>
<td width="50" style="min-width: 50px;" v-for="(x,y) in item.RDateList" :key="y" class="finger" >
<!-- <span v-if="x.Number==0">{{x.Number}}</span> -->
......@@ -269,7 +289,7 @@ export default {
index:index,
y:y,
row: JSON.parse(JSON.stringify(x)),
TeacherId:item.TeacherId
AccountId:item.TeacherId
};
if(this.InfoMsg.row.ShiftId==-1){
this.InfoMsg.row.ShiftId = '';
......@@ -295,7 +315,7 @@ export default {
Date:this.InfoMsg.row.Date,
ShiftId:this.InfoMsg.row.ShiftId,
RoomId:this.InfoMsg.row.RoomId,
TeacherId:this.InfoMsg.TeacherId,
AccountId:this.InfoMsg.AccountId,
}
if(addMsg.ShiftId===''){
this.$q.notify({
......
......@@ -3,13 +3,14 @@
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top="props">
<template v-slot:top>
<div class="col-2 q-table__title">目标管理</div>
<q-space />
<div class="page-option">
<el-date-picker v-model="dateTime" size="small" style="margin-right:10px;" type="month" value-format="yyyy-MM" @change="dateChange" placeholder="选择月">
<el-date-picker v-model="dateTime" size="small" style="margin-right:10px;" type="month"
value-format="yyyy-MM" @change="dateChange" placeholder="选择月">
</el-date-picker>
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增阶段" @click="addObj(null)" />
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增目标" @click="addObj(null)" />
</div>
</template>
<template v-slot:body-cell-Id="props">
......@@ -49,25 +50,46 @@
data() {
return {
columns: [{
name: 'DeptName',
label: '部门',
field: 'DeptName',
align: 'left'
},
{
name: 'YearStr',
label: '年份',
field: 'YearStr',
align: 'left'
}, {
},
{
name: 'MonthStr',
label: '月份',
field: 'MonthStr',
align: 'left'
},
{
name: 'GoalMoney',
label: '金额',
field: 'GoalMoney',
align: 'left'
}, {
name: 'CreateBy',
name: 'CreateByName',
label: '创建人',
align: 'left',
field: 'CreateBy'
}, {
field: 'CreateByName'
},
{
name: 'CreateTimeStr',
label: '创建时间',
align: 'left',
field: 'CreateTimeStr'
},
{
name: 'Id',
label: '操作',
field: 'Id'
}],
}
],
msg: {
pageIndex: 1,
pageSize: 12,
......@@ -80,7 +102,7 @@
loading: true,
isShowTargetForm: false,
customObj: {},
dateTime:''
dateTime: ''
}
},
mounted() {
......@@ -88,12 +110,12 @@
},
methods: {
//选择日期
dateChange(val){
if(val){
dateChange(val) {
if (val) {
let myDate = val.split('-');
this.msg.YearStr = myDate[0];
this.msg.MonthStr = myDate[1];
}else{
} else {
this.msg.YearStr = '';
this.msg.MonthStr = '';
}
......@@ -159,10 +181,8 @@
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
......@@ -1150,6 +1150,12 @@ const routes = [{
component: () =>
import("pages/course/workutaTeaching.vue")
},
{
path: "/course/classHours", //教学中心 上课时段列表
component: () =>
import("pages/course/classHours.vue")
},
{
path: "/user/backbill", //退课单据
......
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