Commit e39a3209 authored by renjintao's avatar renjintao

task record project

parent 85296545
...@@ -123,15 +123,15 @@ export default { ...@@ -123,15 +123,15 @@ export default {
this.detail = () => import("../plan"); this.detail = () => import("../plan");
}, },
task() { task() {
this.curId = this.eid; //this.curId = this.eid;
this.title = "任务"; this.title = "任务";
//this.detail = () => import("../task/index"); this.detail = () => import("../task/index");
this.$router.push({ // this.$router.push({
name: "project-task", // name: "project-task",
params: { // params: {
id: this.curId // id: this.curId
} // }
}); // });
}, },
group() { group() {
this.title = "项目成员"; this.title = "项目成员";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('workHour')" prop="workHour"> <FormItem :label="l('workHour')" prop="workHour">
<InputNumber v-model="entity.workHour"></InputNumber> <InputNumber v-model="entity.workHour" :min="0"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
deleterUserId: null, deleterUserId: null,
projectId: "", projectId: "",
planId: "", planId: "",
workHour: null, workHour: 0,
status: null, status: null,
title: "", title: "",
note: "", note: "",
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</a> </a>
</div> </div>
<Content class="content" :class="!showMenu?'con_bord':''"> <Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true" :set="false">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" inline> <Form ref="formInline" inline>
<FormItem> <FormItem>
...@@ -56,11 +56,13 @@ ...@@ -56,11 +56,13 @@
</FormItem> </FormItem>
<FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem> <FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem> <FormItem><Button type="primary" @click="search">查询</Button></FormItem>
<!--
<FormItem> <FormItem>
<Button @click="highSearch" type="text"> <Button @click="highSearch" type="text">
<Icon type="md-search" />高级 <Icon type="md-search" />高级
</Button> </Button>
</FormItem> </FormItem>
-->
</Form> </Form>
</template> </template>
<template slot="buttons"> <template slot="buttons">
...@@ -251,7 +253,6 @@ export default { ...@@ -251,7 +253,6 @@ export default {
type: "icon", type: "icon",
oprate: "edit", oprate: "edit",
title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '', title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '',
// color: "#19be6b",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true //disable: (params.row.status == 0 || params.row.status == 2) ? false : true
}, },
on: { on: {
...@@ -263,7 +264,6 @@ export default { ...@@ -263,7 +264,6 @@ export default {
// icon: "ios-pause", // icon: "ios-pause",
// type: "icon", // type: "icon",
// title: "暂停", // title: "暂停",
// //color: "#19be6b",
// //disable: params.row.status == 1 ? false : true // //disable: params.row.status == 1 ? false : true
// }, // },
// on: { // on: {
...@@ -276,7 +276,6 @@ export default { ...@@ -276,7 +276,6 @@ export default {
type: "icon", type: "icon",
oprate: "edit", oprate: "edit",
title: "完成", title: "完成",
//color: "#19be6b",
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true //disable: (params.row.status != 0 && params.row.status != 3) ? false : true
}, },
on: { on: {
...@@ -289,7 +288,6 @@ export default { ...@@ -289,7 +288,6 @@ export default {
type: "icon", type: "icon",
oprate: "add", oprate: "add",
title: "新增记录", title: "新增记录",
//color: "#19be6b",
// disable: (params.row.status != 3 && params.row.status != 4) ? false : true // disable: (params.row.status != 3 && params.row.status != 4) ? false : true
}, },
on: { on: {
...@@ -302,7 +300,6 @@ export default { ...@@ -302,7 +300,6 @@ export default {
type: "icon", type: "icon",
oprate: "edit", oprate: "edit",
title: "修改", title: "修改",
// color: "#2b85e4",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true //disable: (params.row.status == 0 || params.row.status == 2) ? false : true
}, },
on: { on: {
...@@ -315,7 +312,6 @@ export default { ...@@ -315,7 +312,6 @@ export default {
type: "icon", type: "icon",
title: "删除", title: "删除",
oprate: 'delete', oprate: 'delete',
//color: "#ed4014",
// disable: (params.row.status == 0 || params.row.status == 3) ? false : true // disable: (params.row.status == 0 || params.row.status == 3) ? false : true
}, },
on: { on: {
...@@ -335,6 +331,9 @@ export default { ...@@ -335,6 +331,9 @@ export default {
planIdsCur: [] planIdsCur: []
} }
}, },
props: {
eid: String
},
async fetch({ async fetch({
store, store,
params params
...@@ -342,15 +341,18 @@ export default { ...@@ -342,15 +341,18 @@ export default {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch('loadDictionary') // 加载数据字典
}, },
created() { created() {
if (this.$route.params.id != '') { if (this.eid != '') {
this.projectId = this.$route.params.id this.projectId = this.eid
this.easySearch.projectId.value = this.$route.params.id this.easySearch.projectId.value = this.eid
} }
this.treeHeight = window.innerHeight - 150; this.treeHeight = window.innerHeight - 150;
}, },
mounted() { mounted() {
if (this.eid != "") {
this.easySearch.projectId.value = this.eid
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
console.log(this.easySearch); }
}, },
methods: { methods: {
ok() { ok() {
...@@ -427,7 +429,7 @@ export default { ...@@ -427,7 +429,7 @@ export default {
}, },
projectId: { projectId: {
op: "Equal", op: "Equal",
value: this.$route.params.id value: this.eid
}, },
}; };
this.$refs.grid.reload(where); this.$refs.grid.reload(where);
...@@ -470,7 +472,7 @@ export default { ...@@ -470,7 +472,7 @@ export default {
addRecord(id) { addRecord(id) {
this.curId = id; this.curId = id;
this.title = "新增记录"; this.title = "新增记录";
this.fullScreen = true; this.fullScreen = false;
this.detail = () => import('../record/add') this.detail = () => import('../record/add')
this.modal = true; this.modal = true;
}, },
...@@ -478,6 +480,13 @@ export default { ...@@ -478,6 +480,13 @@ export default {
let vkey = "project_task" + "." + key; let vkey = "project_task" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key
} }
},
watch: {
eid(v) {
if (v != "") {
this.eid = v
}
}
} }
} }
</script> </script>
......
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