parent
a3da6dcfea
commit
b056cc76e1
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="type === 1 ? '年中绩效目标' : '年末绩效目标'" :visible.sync="isShow" width="54%">
|
||||
<el-input :value="type === 1 ? form.year_midst : form.year_end"
|
||||
type="textarea"
|
||||
:autosize="{ minRows:6 }"
|
||||
:placeholder="type === 1 ? '请填写年中绩效目标' : '请填写年末绩效目标'"
|
||||
@input="input"></el-input>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="hidden">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { editorBudget,detailBudget } from "@/api/budget/budget";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
isShow: false,
|
||||
type: 1,//1年中 2年末
|
||||
form: {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
this.isShow = true
|
||||
},
|
||||
hidden() {
|
||||
this.isShow = false
|
||||
},
|
||||
setId(id) {
|
||||
this.id = id;
|
||||
},
|
||||
|
||||
input(e) {
|
||||
this.type === 1 ? this.form.year_midst = e : this.form.year_end = e
|
||||
},
|
||||
|
||||
submit() {
|
||||
editorBudget(this.form).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: "保存成功"
|
||||
})
|
||||
this.hidden();
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
isShow(val) {
|
||||
if(val) {
|
||||
detailBudget({id: this.id}).then(res => this.form = res )
|
||||
}else{
|
||||
this.form = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
Loading…
Reference in new issue