Commit 88610cd8 authored by 康振飞's avatar 康振飞

工作日历ok

parent 75f9a562
...@@ -63,7 +63,6 @@ export default { ...@@ -63,7 +63,6 @@ export default {
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
console.log(this.entity)
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
......
...@@ -101,6 +101,7 @@ data() { ...@@ -101,6 +101,7 @@ data() {
addOk() { addOk() {
this.$refs.grid.load() this.$refs.grid.load()
this.addModal = false this.addModal = false
this.$emit('on-ok')
this.$refs.addModal.entity = {} this.$refs.addModal.entity = {}
this.detailModal = false this.detailModal = false
this.editModal = false; this.editModal = false;
......
<template> <template>
<classView></classView> <classView @on-ok="onLaode"></classView>
</template> </template>
<script> <script>
import classView from './class/index' import classView from './class/index'
export default { export default {
components:{classView}, components:{classView},
methods:{
onLaode(){
alert("reloade")
console.log("123123")
},
},
} }
</script> </script>
<style lang="less"> <style lang="less">
......
...@@ -61,11 +61,6 @@ export default { ...@@ -61,11 +61,6 @@ export default {
this.selectAry() this.selectAry()
}, },
methods: { methods: {
selectAry() {
Api.getlist().then((res) => {
this.orderCatList = res.result
})
},
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
...@@ -102,6 +97,12 @@ export default { ...@@ -102,6 +97,12 @@ export default {
handleClose() { handleClose() {
this.$emit('on-close') this.$emit('on-close')
}, },
selectAry() {
Api.getlist().then((res) => {
console.log("加班日历",res)
this.orderCatList = res.result
})
},
getItems(v){ //获取所有选中项; getItems(v){ //获取所有选中项;
var items=this.orderCatList.filter(u=>{ var items=this.orderCatList.filter(u=>{
return v.indexOf(u.id)>-1 return v.indexOf(u.id)>-1
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
entity: { entity: {
id:[], id:[],
title:"", title:"",
calendarClassId:[], mesShiftWorkSchedIds:[],
calendarClassTitle:"", calendarClassTitle:"",
workHours:0 workHours:0
}, },
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
this.disabled = false this.disabled = false
if (r.success) { if (r.success) {
this.$Message.success('保存成功') this.$Message.success('保存成功')
this.entity.calendarClassId=[]; this.entity.mesShiftWorkSchedIds=[];
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.$emit('on-ok') this.$emit('on-ok')
} else { } else {
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
}) })
}, },
handleClose() { handleClose() {
this.orderCatList = [] // this.orderCatList = []
this.$emit('on-close') this.$emit('on-close')
}, },
selectAry() { selectAry() {
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
pageSize: 20 pageSize: 20
} }
Api.getlist().then((res) => { Api.getlist().then((res) => {
console.log(res) // console.log("工作日历",res)
this.orderCatList = res.result this.orderCatList = res.result
}) })
}, },
......
...@@ -144,6 +144,7 @@ export default { ...@@ -144,6 +144,7 @@ export default {
}, },
created(){ created(){
this.tableHeight = window.innerHeight - 230 this.tableHeight = window.innerHeight - 230
// this.$refs.addModal.entity = {}
}, },
mounted() { mounted() {
window.onresize = () => {///浏览器窗口大小变化 window.onresize = () => {///浏览器窗口大小变化
......
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