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

更新查询

parent 4ad51720
...@@ -24,6 +24,9 @@ export default { ...@@ -24,6 +24,9 @@ export default {
url: '/vue/schedule/save-new' + urlEnd url: '/vue/schedule/save-new' + urlEnd
}, },
saveEditSchedule: {
url: '/vue/schedule/save-edit' + urlEnd
},
// 删除待办事项 // 删除待办事项
deleteSchedule: { deleteSchedule: {
url: '/vue/schedule/delete' + urlEnd url: '/vue/schedule/delete' + urlEnd
......
...@@ -94,11 +94,6 @@ ...@@ -94,11 +94,6 @@
import depSelect from './depSelect' import depSelect from './depSelect'
import singleRadio from '../common/singleRadio' import singleRadio from '../common/singleRadio'
import settingMixin from '../common/settingMixin' import settingMixin from '../common/settingMixin'
import { setModule } from '@/lib/viewHelper'
import {
requestAPI,
api
} from '@/lib/commonMixin'
export default { export default {
name: 'scheduleForm', name: 'scheduleForm',
...@@ -136,9 +131,6 @@ export default { ...@@ -136,9 +131,6 @@ export default {
}, },
created () { created () {
// if (this.isCreate) {
// this.queryOaDeptViaJanus()
// }
}, },
mounted () { mounted () {
...@@ -152,48 +144,6 @@ export default { ...@@ -152,48 +144,6 @@ export default {
}, },
methods: { 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> </script>
......
...@@ -29,6 +29,7 @@ export default { ...@@ -29,6 +29,7 @@ export default {
return { return {
diaVis: false, diaVis: false,
model: { model: {
id: '',
client_id: '', client_id: '',
client_name: '', client_name: '',
schedule_title: '', schedule_title: '',
...@@ -46,7 +47,6 @@ export default { ...@@ -46,7 +47,6 @@ export default {
methods: { methods: {
show (model) { show (model) {
console.log(model)
model && UTIL.flatten(this.model, model) model && UTIL.flatten(this.model, model)
this.model.client_name = model.client.name this.model.client_name = model.client.name
this.diaVis = true this.diaVis = true
...@@ -60,10 +60,12 @@ export default { ...@@ -60,10 +60,12 @@ export default {
save () { save () {
let _params = Object.assign({}, setModule(this.model, 'Schedules')) 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) => { .then((res) => {
this.diaVis = false this.diaVis = false
this.$message.success('添加待办事项成功') this.$message.success('操作成功')
}) })
} }
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:item="item" :item="item"
:key="item.id"> :key="item.id">
<span slot="opearate" class="obear-opearate-button"> <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"><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="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> <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 { ...@@ -143,8 +143,8 @@ export default {
}, },
updateForm (form) { updateForm (form) {
// Object.assign(this.form, form) Object.assign(this.form, form)
// this.getList() this.getScheduleList()
}, },
getFilter () { 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