Commit d35b12a9 authored by huai.li's avatar huai.li

更新查询

parent 4ad51720
......@@ -24,6 +24,9 @@ export default {
url: '/vue/schedule/save-new' + urlEnd
},
saveEditSchedule: {
url: '/vue/schedule/save-edit' + urlEnd
},
// 删除待办事项
deleteSchedule: {
url: '/vue/schedule/delete' + urlEnd
......
......@@ -94,11 +94,6 @@
import depSelect from './depSelect'
import singleRadio from '../common/singleRadio'
import settingMixin from '../common/settingMixin'
import { setModule } from '@/lib/viewHelper'
import {
requestAPI,
api
} from '@/lib/commonMixin'
export default {
name: 'scheduleForm',
......@@ -136,9 +131,6 @@ export default {
},
created () {
// if (this.isCreate) {
// this.queryOaDeptViaJanus()
// }
},
mounted () {
......@@ -152,48 +144,6 @@ export default {
},
methods: {
getActById (id) {
let param = { actHandleReq: { actId: id } }
this.$model.normalGetAct(param)
.then((res) => {
this.edit(res)
})
},
saveEvent () {
this.$refs['form'].validate((valid) => {
if (valid) {
let _params = Object.assign({}, setModule(this.model, 'Schedules'))
console.log(_params)
requestAPI(api.requestAPI, _params)
.then((res) => {
console.log(res)
})
}
})
},
editEvent () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$model.editFullCutAct()
.then((res) => {
this.$message.success('编辑成功')
this.go()
})
}
})
},
returnEvent () {
this.go()
},
go () {
this.$router.push({
path: '/fullCutHome/actlist'
})
}
}
}
</script>
......
......@@ -29,6 +29,7 @@ export default {
return {
diaVis: false,
model: {
id: '',
client_id: '',
client_name: '',
schedule_title: '',
......@@ -46,7 +47,6 @@ export default {
methods: {
show (model) {
console.log(model)
model && UTIL.flatten(this.model, model)
this.model.client_name = model.client.name
this.diaVis = true
......@@ -60,10 +60,12 @@ export default {
save () {
let _params = Object.assign({}, setModule(this.model, 'Schedules'))
requestAPI(Object.assign(api.saveNewSchedule, { method: 'POST' }), _params)
let _apiUrl = !this.model.id ? api.saveNewSchedule : api.saveEditSchedule
!this.model.id && delete _params['Schedules[id]']
requestAPI(Object.assign(_apiUrl, { method: 'POST' }), _params)
.then((res) => {
this.diaVis = false
this.$message.success('添加待办事项成功')
this.$message.success('操作成功')
})
}
}
......
......@@ -20,7 +20,7 @@
:item="item"
:key="item.id">
<span slot="opearate" class="obear-opearate-button">
<el-button type="primary" size="mini" @click.prevent.stop="leaveMessageSch(item)"><span class="badge">6</span><i class="fa fa-commenting"></i>留言</el-button>
<el-button type="primary" size="mini" @click.prevent.stop="leaveMessageSch(item)"><span class="badge" v-if="item.unread">{{ item.unread ? item.unread : '' }}</span><i class="fa fa-commenting"></i>留言</el-button>
<el-button type="primary" size="mini"><i class="fa fa-calendar-check-o"></i>汇报</el-button>
<el-button type="primary" size="mini" @click.prevent.stop="editSch(item)"><i class="fa fa-edit animated"></i>编辑</el-button>
<el-button type="primary" size="mini" @click.prevent.stop="deleteSch(item.id)"><i class="fa fa-trash-o animated-hove"></i>删除</el-button>
......@@ -143,8 +143,8 @@ export default {
},
updateForm (form) {
// Object.assign(this.form, form)
// this.getList()
Object.assign(this.form, form)
this.getScheduleList()
},
getFilter () {
......
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