Commit 7acc712f authored by renjintao's avatar renjintao

task page

parent 65b1c011
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row> <Row>
<Col :span="12">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<InputNumber v-model="entity.isDeleted"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input> <FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem> </FormItem>
...@@ -118,7 +83,6 @@ ...@@ -118,7 +83,6 @@
</Form> </Form>
</template> </template>
<script> <script>
import Api from './api' import Api from './api'
export default { export default {
......
<template> <template>
<div> <Layout class="full">
<DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch"> <Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" />
</Sider>
<div v-if="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" />
</a>
</div>
<Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"><Input placeholder="请输入关键字标题/项目标题/计划名称" v-model="easySearch.keys.value" /> </FormItem> <FormItem>
<div class="taskMenu">
<Menu mode="horizontal" active-name="2" @on-select="onSelect">
<MenuItem name="1">
所有
</MenuItem>
<MenuItem name="2">
未关闭
</MenuItem>
<MenuItem name="3">
指派给我
</MenuItem>
<MenuItem name="4">
由我参与
</MenuItem>
<MenuItem name="5">
已延期
</MenuItem>
<Submenu name="6">
<template slot="title">
更多
</template>
<MenuGroup title="更多">
<MenuItem name="6-1">状态1</MenuItem>
<MenuItem name="6-2">状态2</MenuItem>
<MenuItem name="6-3">状态3</MenuItem>
</MenuGroup>
</Submenu>
</Menu>
</div>
<div class="taskTab" v-if="false">
<Tabs value="statu2">
<TabPane label="所有" name="statu1" />
<TabPane label="未关闭" name="statu2" />
<TabPane label="指派给我" name="statu3" />
<TabPane label="由我参与" name="statu4" />
<TabPane label="已延期" name="statu5" />
</Tabs>
</div>
</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>
<Button @click="highSearch" type="text">
<Icon type="md-search" />高级
</Button>
</FormItem>
</Form> </Form>
</template> </template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
...@@ -16,16 +68,19 @@ ...@@ -16,16 +68,19 @@
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </Content>
</Layout>
</template> </template>
<script> <script>
import Api from './api' import Api from './api'
import Search from './search' import Search from './search'
import ProductTree from "@/components/page/productTree.vue";
export default { export default {
name: 'list', name: 'list',
components: { components: {
Search Search,
ProductTree
}, },
head: { head: {
title: "", title: "",
...@@ -35,12 +90,14 @@ export default { ...@@ -35,12 +90,14 @@ export default {
data() { data() {
return { return {
action: Api.index, action: Api.index,
showMenu: true,
easySearch: { easySearch: {
keys: { keys: {
op: "title,projectTitle,planTitle", op: "title,projectTitle,planTitle",
value: null value: null
} }
}, },
theme1: 'light',
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
...@@ -48,49 +105,6 @@ export default { ...@@ -48,49 +105,6 @@ export default {
columns: [{ columns: [{
key: "id", key: "id",
title: this.$t("id"), title: this.$t("id"),
hide: true,
align: "left",
high: true
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
high: true
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
align: "left",
high: true
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
align: "left",
high: true
},
{
key: "isDeleted",
title: this.l("isDeleted"),
align: "left",
high: true
},
{
key: "deletionTime",
title: this.l("deletionTime"),
align: "left",
high: true
},
{
key: "deleterUserId",
title: this.l("deleterUserId"),
align: "left", align: "left",
high: true high: true
}, },
...@@ -101,18 +115,6 @@ export default { ...@@ -101,18 +115,6 @@ export default {
easy: true, easy: true,
high: true high: true
}, },
{
key: "planId",
title: this.l("planId"),
align: "left",
high: true
},
{
key: "projectId",
title: this.l("projectId"),
align: "left",
high: true
},
{ {
key: "level", key: "level",
title: this.l("level"), title: this.l("level"),
...@@ -121,26 +123,43 @@ export default { ...@@ -121,26 +123,43 @@ export default {
code: 'mes.project_task.Level' code: 'mes.project_task.Level'
}, },
{ {
key: "status", key: "planId",
title: this.l("status"), title: this.l("planId"),
align: "left", align: "left",
high: true, high: true,
code: 'mes.project_task.Status' hide: true,
},
{
key: "projectId",
title: this.l("projectId"),
align: "left",
high: true,
hide: true,
}, },
{ {
key: "projectTitle", key: "projectTitle",
title: this.l("projectTitle"), title: this.l("projectTitle"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
hide: true,
}, },
{ {
key: "planTitle", key: "planTitle",
title: this.l("planTitle"), title: this.l("planTitle"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
hide: true,
}, },
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: 'mes.project_task.Status'
},
{ {
key: "userId", key: "userId",
title: this.l("userId"), title: this.l("userId"),
...@@ -189,6 +208,55 @@ export default { ...@@ -189,6 +208,55 @@ export default {
align: "left", align: "left",
high: true high: true
}, },
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
high: true,
hide: true,
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
hide: true,
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
align: "left",
high: true,
hide: true,
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
align: "left",
high: true,
hide: true,
},
{
key: "isDeleted",
title: this.l("isDeleted"),
align: "left",
high: true,
hide: true,
},
{
key: "deletionTime",
title: this.l("deletionTime"),
align: "left",
high: true,
hide: true,
},
{
key: "deleterUserId",
title: this.l("deleterUserId"),
align: "left",
high: true,
hide: true,
},
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
...@@ -253,6 +321,12 @@ export default { ...@@ -253,6 +321,12 @@ export default {
this.detail = () => import('./add') this.detail = () => import('./add')
this.modal = true; this.modal = true;
}, },
highSearch() {
this.curId = 0;
this.title = "高级搜索";
this.detail = () => import('./search')
this.modal = true;
},
copy(id) { copy(id) {
this.curId = id; this.curId = id;
this.title = "克隆"; this.title = "克隆";
...@@ -283,6 +357,26 @@ export default { ...@@ -283,6 +357,26 @@ export default {
this.curId = 0; this.curId = 0;
this.modal = false this.modal = false
}, },
onHide() {
// this.$Message.info("收起左侧树")
this.showMenu = false;
},
showMenuFn() {
//this.$Message.info("展开左侧树")
this.showMenu = true;
},
productSearch(id, item, productIds, ids) {
let where = {
bomId: {
op: "In",
value: ids
}
};
this.$refs.grid.reload(where);
},
onSelect(val) {
// alert(val)
},
l(key) { l(key) {
let vkey = "project_task" + "." + key; let vkey = "project_task" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key
...@@ -292,4 +386,39 @@ export default { ...@@ -292,4 +386,39 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.full {
margin-top: 0;
.content {
margin-top: 10px;
.ivu-icon-ios-add:before {
content: "\f341";
}
.ivu-icon-ios-remove:before {
content: "\f33d";
}
}
}
.taskTab .ivu-tabs-bar {
border-bottom: 1px solid #fff;
margin-bottom: 2px;
}
.taskMenu {
font-size: 12px;
.ivu-menu-horizontal {
height: 30px;
line-height: 30px;
}
.ivu-menu-light {
&:after {
height: 0px !important;
}
}
}
</style> </style>
...@@ -99,6 +99,10 @@ ...@@ -99,6 +99,10 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<FormItem>
<Button type="primary" :disabled="disabled">搜索</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form> </Form>
</template> </template>
......
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