Commit a7d41c3f authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 141a8423 ed1b43bc
...@@ -1837,5 +1837,49 @@ export default { ...@@ -1837,5 +1837,49 @@ export default {
startDate: '开始日期', startDate: '开始日期',
endDate: '结束日期', endDate: '结束日期',
businessUnits: '业务单位', businessUnits: '业务单位',
},
//项目任务
project_task: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
title: '标题',
planId: '计划id',
projectId: '项目id',
level: '级别',
status: '状态',
projectTitle: '项目标题',
planTitle: '计划名称',
userIds: '执行组',
userId: '执行人',
endDate: '完成日期',
note: '备注',
startDate: '开始日期',
plansToStartDate: '计划开始日期',
plansToEndTime: '计划结束时间',
completePercentage: '完成百分比',
upTaskId: '上级任务Id',
},
//工资记录
project_plan_record: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
projectId: '项目id',
planId: '计划id',
workHour: '工作时间',
status: '状态',
title: '标题',
note: '备注',
attachment: '附件',
taskId: '任务id',
} }
} }
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<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">
<FormItem :label="l('projectId')" prop="projectId"> <Input v-model="entity.projectId"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planId')" prop="planId"> <Input v-model="entity.planId"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('workHour')" prop="workHour">
<InputNumber v-model="entity.workHour"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_plan_record.Status" v-model="entity.status"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('attachment')" prop="attachment"> <Input v-model="entity.attachment"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('taskId')" prop="taskId">
<Input v-model="entity.taskId"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
disabled: false,
entity: {
creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deletionTime: null,
deleterUserId: null,
projectId: "",
planId: "",
workHour: null,
status: null,
title: "",
note: "",
attachment: "",
taskId: ""
},
rules: {
name: [{
required: true,
message: '必填',
trigger: 'blur'
}]
}
}
},
props: {
v: Object,
eid: String
},
mounted() {
if (this.eid != "") {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.create(this.entity).then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
} else {
this.$Message.error('保存失败')
}
}).catch(err => {
this.disabled = false;
this.$Message.error('保存失败')
console.warn(err)
})
}
})
},
handleClose() {
this.$emit('on-close')
},
load(v) {
Api.get({
id: v
}).then(r => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "project_plan_record" + "." + key;
return this.$t(key)
}
},
watch: {
v() {
this.entity = this.$u.clone(this.v)
},
eid(v) {
if (v != "") {
this.load(v);
}
}
}
}
</script>
import Api from '@/plugins/request'
export default {
index:`${material}/projectplanrecord/paged`,
paged(params){
return Api.post(`${material}/projectplanrecord/paged`,params);
},
get(params){
return Api.get(`${material}/projectplanrecord/get`,params);
},
create(params){
return Api.post(`${material}/projectplanrecord/create`,params);
},
update(params){
return Api.post(`${material}/projectplanrecord/update`,params);
},
delete(id) {
return Api.delete(`${material}/projectplanrecord/delete`,{params:{id:id}});
},
deletes(params) {
return Api.post(`${material}/projectplanrecord/batchdelete`,params);
}
}
\ No newline at end of file
<template>
<div class="detail">
<Row>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed>
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed>
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed>
<Filed :span="12" :name="l('deletionTime')">{{entity.deletionTime}}</Filed>
<Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed>
<Filed :span="12" :name="l('projectId')">{{entity.projectId}}</Filed>
<Filed :span="12" :name="l('planId')">{{entity.planId}}</Filed>
<Filed :span="12" :name="l('workHour')">{{entity.workHour}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="12" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="12" :name="l('note')">{{entity.note}}</Filed>
<Filed :span="12" :name="l('attachment')">{{entity.attachment}}</Filed>
<Filed :span="12" :name="l('taskId')">{{entity.taskId}}</Filed>
</Row>
</div>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
entity: {},
rules: {
name: [{
required: true,
message: '必填',
trigger: 'blur'
}],
code: [{
required: true,
message: '必填',
trigger: 'blur'
}]
}
}
},
props: {
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({
id: v
}).then(r => {
this.entity = r.result;
this.$emit('on-load')
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_plan_record" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
}
}
}
</script>
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<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">
<FormItem :label="l('projectId')" prop="projectId"> <Input v-model="entity.projectId"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planId')" prop="planId"> <Input v-model="entity.planId"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('workHour')" prop="workHour">
<InputNumber v-model="entity.workHour"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_plan_record.Status" v-model="entity.status"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('attachment')" prop="attachment"> <Input v-model="entity.attachment"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('taskId')" prop="taskId">
<InputNumber v-model="entity.taskId"></InputNumber>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Edit',
data() {
return {
disabled: false,
entity: {},
rules: {
name: [{
required: true,
message: '必填',
trigger: 'blur'
}]
}
}
},
props: {
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({
id: v
}).then(r => {
this.entity = r.result;
})
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.update(this.entity).then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
} else {
this.$Message.error('保存失败')
}
}).catch(err => {
this.disabled = false;
this.$Message.error('保存失败')
console.warn(err)
})
}
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_plan_record" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
}
}
}
</script>
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from './api'
import Search from './search'
export default {
name: 'list',
components: {
Search
},
head: {
title: "项目的工作记录",
author: "henq",
description: "project_plan_record 10/20/2020 2:55:13 PM",
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "title",
value: null
}
},
modal: false,
title: "新增",
detail: null,
curId: 0,
columns: [{
key: "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",
high: true
},
{
key: "projectId",
title: this.l("projectId"),
align: "left",
high: true
},
{
key: "planId",
title: this.l("planId"),
align: "left",
high: true
},
{
key: "workHour",
title: this.l("workHour"),
align: "left",
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: 'mes.project_plan_record.Status'
},
{
key: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true
},
{
key: "note",
title: this.l("note"),
align: "left",
high: true
},
{
key: "attachment",
title: this.l("attachment"),
align: "left",
high: true
},
{
key: "taskId",
title: this.l("taskId"),
align: "left",
high: true
},
{
title: '操作',
key: 'action',
width: 140,
align: 'center',
render: (h, params) => {
return h('div', {
class: "action"
}, [
h('op', {
attrs: {
oprate: 'detail'
},
on: {
click: () => this.view(params.row.id)
}
}, '查看'),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h('op', {
attrs: {
oprate: 'edit'
},
on: {
click: () => this.edit(params.row.id)
}
}, '编辑'),
h('op', {
attrs: {
oprate: 'delete'
},
on: {
click: () => this.remove(params.row.id)
}
}, '删除')
])
}
},
]
}
},
mounted() {
console.log(this);
},
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load()
this.modal = false
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch)
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import('./add')
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import('./add')
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import('./detail')
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import('./edit')
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success('删除成功')
}
})
},
cancel() {
this.curId = 0;
this.modal = false
},
l(key) {
let vkey = "project_plan_record" + "." + key;
return this.$t(vkey) || key
}
}
}
</script>
<style lang="less">
</style>
<template>
<div>
<div class="formBg">
<Form ref="formInline" :model="easySearch" inline>
<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>
<MenuItem name="6">
本月
</MenuItem>
<MenuItem name="7">
上月
</MenuItem>
<Submenu name="8">
<template slot="title">
按用户查看
</template>
<MenuGroup title="按用户查看">
<MenuItem name="8-1">用户类型1</MenuItem>
<MenuItem name="8-2">用户类型2</MenuItem>
<MenuItem name="8-3">用户类型3</MenuItem>
</MenuGroup>
</Submenu>
</Menu>
</div>
</FormItem>
<FormItem style="float:right">
<Button type="primary" @click="add">新增</Button>
</FormItem>
</Form>
</div>
<div class="group">
<Row>
<Col span="3">
<div class="fr boxBoder">
<List>
<ListItem>
<ListItemMeta>
<template slot="title">
<h3>今天</h3>
</template>
<template slot="description">
2020-10-20
</template>
</ListItemMeta>
<template slot="action">
<li>
<Icon type="md-arrow-dropright" size="24" color="#2d8cf0" />
</li>
</template>
</ListItem>
</List>
</div>
</Col>
<Col span="2">
<Divider class="dividerpram" />
</Col>
<Col span="19">
<div class="boxBoder">
<Timeline>
<TimelineItem>
<p class="content">16:51</p>
<p class="content">管理员 关闭了 任务 1089 测试任务</p>
</TimelineItem>
<TimelineItem>
<p class="content">12:13</p>
<p class="content">管理员 继续了 任务 1089 测试任务</p>
</TimelineItem>
<TimelineItem>
<p class="content">11:54</p>
<p class="content">管理员 暂停了 任务 1089 测试任务</p>
</TimelineItem>
<TimelineItem>
<p class="content">09:20</p>
<p class="content">管理员 开启了 任务 1089 测试任务</p>
</TimelineItem>
<TimelineItem>
<p class="content">09:08</p>
<p class="content">管理员 创建了 任务 1089 测试任务</p>
</TimelineItem>
</Timeline>
</div>
</Col>
</Row>
</div>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from './api'
import Search from './search'
export default {
name: 'list',
components: {
Search
},
head: {
title: "项目的工作记录",
author: "henq",
description: "project_plan_record 10/20/2020 2:55:13 PM",
},
props: {
eid: String
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "title",
value: null
}
},
modal: false,
title: "新增",
detail: null,
curId: '',
columns: [{
key: "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",
high: true
},
{
key: "projectId",
title: this.l("projectId"),
align: "left",
high: true
},
{
key: "planId",
title: this.l("planId"),
align: "left",
high: true
},
{
key: "workHour",
title: this.l("workHour"),
align: "left",
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: 'mes.project_plan_record.Status'
},
{
key: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true
},
{
key: "note",
title: this.l("note"),
align: "left",
high: true
},
{
key: "attachment",
title: this.l("attachment"),
align: "left",
high: true
},
{
key: "taskId",
title: this.l("taskId"),
align: "left",
high: true
},
{
title: '操作',
key: 'action',
width: 140,
align: 'center',
render: (h, params) => {
return h('div', {
class: "action"
}, [
h('op', {
attrs: {
oprate: 'detail'
},
on: {
click: () => this.view(params.row.id)
}
}, '查看'),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h('op', {
attrs: {
oprate: 'edit'
},
on: {
click: () => this.edit(params.row.id)
}
}, '编辑'),
h('op', {
attrs: {
oprate: 'delete'
},
on: {
click: () => this.remove(params.row.id)
}
}, '删除')
])
}
},
]
}
},
mounted() {
if (this.eid != '' && this.eid != null) {
this.load(this.eid);
}
},
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods: {
load(v) {
alert("aaa____" + v)
},
ok() {
this.$refs.grid.load()
this.modal = false
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch)
},
add() {
this.curId = 0;
this.title = "新增记录";
this.detail = () => import('./add')
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import('./add')
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import('./detail')
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import('./edit')
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success('删除成功')
}
})
},
cancel() {
this.curId = 0;
this.modal = false
},
l(key) {
let vkey = "project_plan_record" + "." + key;
return this.$t(vkey) || key
}
},
watch: {
eid(v) {
if (v != '' && v != null) {
this.load(v);
}
}
}
}
</script>
<style lang="less">
.formBg {
padding-top: 10px;
background: #f5f5f5;
line-height: 30px;
}
.formBg .taskMenu .ivu-menu-horizontal {
background: #f5f5f5;
}
.group {
margin-top: 15px;
}
.group .ivu-row {
border: none
}
.time {
font-size: 14px;
font-weight: bold;
}
.content {
padding-left: 5px;
}
.boxBoder {
border: 2px solid #2db7f5;
border-radius: 5px;
padding: 10px 20px
}
.dividerpram {
background-color: #2db7f5;
height: 2px
}
</style>
<template>
<Form ref="form" :model="condition" :label-width="90">
<Row>
<Col :span="12" :v-if="condition.id.show">
<FormItem :label="$t('id')" prop="id"> <Input v-model="condition.id.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.creationTime.show">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.creatorUserId.show">
<FormItem :label="l('creatorUserId')" prop="creatorUserId"> <Input v-model="condition.creatorUserId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.lastModificationTime.show">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.lastModifierUserId.show">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId"> <Input v-model="condition.lastModifierUserId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.deletionTime.show">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="daterange" v-model="condition.deletionTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.projectId.show">
<FormItem :label="l('projectId')" prop="projectId"> <Input v-model="condition.projectId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.planId.show">
<FormItem :label="l('planId')" prop="planId"> <Input v-model="condition.planId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.workHour.show">
<FormItem :label="l('workHour')" prop="workHour"> <Input v-model="condition.workHour.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_plan_record.Status" v-model="condition.status.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.title.show">
<FormItem :label="l('title')" prop="title"> <Input v-model="condition.title.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.note.show">
<FormItem :label="l('note')" prop="note"> <Input v-model="condition.note.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.attachment.show">
<FormItem :label="l('attachment')" prop="attachment"> <Input v-model="condition.attachment.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.taskId.show">
<FormItem :label="l('taskId')" prop="taskId"> <Input v-model="condition.taskId.value"> </Input>
</FormItem>
</Col>
</Row>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
condition: {
id: {
op: "Equal",
value: null,
show: true
},
creationTime: {
op: "Range",
value: null,
show: true
},
creatorUserId: {
op: "Equal",
value: null,
show: true
},
lastModificationTime: {
op: "Range",
value: null,
show: true
},
lastModifierUserId: {
op: "Equal",
value: null,
show: true
},
deletionTime: {
op: "Range",
value: null,
show: true
},
projectId: {
op: "Equal",
value: null,
show: true
},
planId: {
op: "Equal",
value: null,
show: true
},
workHour: {
op: "Equal",
value: null,
show: true
},
status: {
op: "Equal",
value: null,
show: true
},
title: {
op: "Equal",
value: null,
show: true
},
note: {
op: "Equal",
value: null,
show: true
},
attachment: {
op: "Equal",
value: null,
show: true
},
taskId: {
op: "Equal",
value: null,
show: true
},
},
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_plan_record" + "." + key;
return this.$t(key)
}
}
}
</script>
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planId')" prop="planId">
<Input v-model="entity.planId"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('projectId')" prop="projectId">
<Input v-model="entity.projectId"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('level')" prop="level">
<Dictionary code="mes.project_task.Level" v-model="entity.level"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_task.Status" v-model="entity.status"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('projectTitle')" prop="projectTitle"> <Input v-model="entity.projectTitle"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planTitle')" prop="planTitle"> <Input v-model="entity.planTitle"> </Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('userIds')" prop="userIds"> <Input v-model="entity.userIds" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('userId')" prop="userId"> <Input v-model="entity.userId"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('endDate')" prop="endDate">
<DatePicker type="date" v-model="entity.endDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('startDate')" prop="startDate">
<DatePicker type="date" v-model="entity.startDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('plansToStartDate')" prop="plansToStartDate">
<DatePicker type="date" v-model="entity.plansToStartDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('plansToEndTime')" prop="plansToEndTime">
<DatePicker type="date" v-model="entity.plansToEndTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('completePercentage')" prop="completePercentage">
<InputNumber v-model="entity.completePercentage"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('upTaskId')" prop="upTaskId">
<InputNumber v-model="entity.upTaskId"></InputNumber>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
disabled: false,
entity: {
creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deletionTime: null,
deleterUserId: null,
title: "",
planId: null,
projectId: null,
level: null,
status: null,
projectTitle: "",
planTitle: "",
userIds: "",
userId: "",
endDate: null,
note: "",
startDate: null,
plansToStartDate: null,
plansToEndTime: null,
completePercentage: null,
upTaskId: null
},
rules: {
name: [{
required: true,
message: '必填',
trigger: 'blur'
}]
}
}
},
props: {
v: Object,
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.create(this.entity).then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
} else {
this.$Message.error('保存失败')
}
}).catch(err => {
this.disabled = false;
this.$Message.error('保存失败')
console.warn(err)
})
}
})
},
handleClose() {
this.$emit('on-close')
},
load(v) {
Api.get({
id: v
}).then(r => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "project_task" + "." + key;
return this.$t(key)
}
},
watch: {
v() {
this.entity = this.$u.clone(this.v)
},
eid(v) {
if (v > 0) {
this.load(v);
}
}
}
}
</script>
import Api from '@/plugins/request'
export default {
index:`${material}/projecttask/paged`,
paged(params){
return Api.post(`${material}/projecttask/paged`,params);
},
get(params){
return Api.get(`${material}/projecttask/get`,params);
},
create(params){
return Api.post(`${material}/projecttask/create`,params);
},
update(params){
return Api.post(`${material}/projecttask/update`,params);
},
delete(id) {
return Api.delete(`${material}/projecttask/delete`,{params:{id:id}});
},
deletes(params) {
return Api.post(`${material}/projecttask/batchdelete`,params);
}
}
\ No newline at end of file
<template>
<div class="detail">
<Row style="height:180px">
<Filed :span="6" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="6" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed>
<Filed :span="6" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="6" :name="l('level')">{{entity.level}}</Filed>
<Filed :span="6" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="6" :name="l('projectTitle')">{{entity.projectTitle}}</Filed>
<Filed :span="6" :name="l('planTitle')">{{entity.planTitle}}</Filed>
<Filed :span="6" :name="l('userIds')">{{entity.userIds}}</Filed>
<Filed :span="6" :name="l('userId')">{{entity.userId}}</Filed>
<Filed :span="6" :name="l('endDate')">{{entity.endDate}}</Filed>
<Filed :span="6" :name="l('note')">{{entity.note}}</Filed>
<Filed :span="6" :name="l('startDate')">{{entity.startDate}}</Filed>
<Filed :span="6" :name="l('plansToStartDate')">{{entity.plansToStartDate}}</Filed>
<Filed :span="6" :name="l('plansToEndTime')">{{entity.plansToEndTime}}</Filed>
<Filed :span="6" :name="l('completePercentage')">{{entity.completePercentage}}</Filed>
<Filed :span="6" :name="l('upTaskId')">{{entity.upTaskId}}</Filed>
</Row>
<component :is="detail" :eid="curId" />
</div>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
entity: {},
rules: {
name: [{
required: true,
message: '必填',
trigger: 'blur'
}],
code: [{
required: true,
message: '必填',
trigger: 'blur'
}]
},
detail: null,
curId: '',
}
},
props: {
eid: String
},
mounted() {
if (this.eid != '' && this.eid != null) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({
id: v
}).then(r => {
this.entity = r.result;
this.$emit('on-load')
this.curId = v
this.detail = () => import('../record/index1')
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_task" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != '' && v != null) {
this.load(v);
}
}
}
}
</script>
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<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">
<FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planId')" prop="planId">
<InputNumber v-model="entity.planId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('projectId')" prop="projectId">
<InputNumber v-model="entity.projectId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('level')" prop="level">
<Dictionary code="mes.project_task.Level" v-model="entity.level"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_task.Status" v-model="entity.status"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('projectTitle')" prop="projectTitle"> <Input v-model="entity.projectTitle"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planTitle')" prop="planTitle"> <Input v-model="entity.planTitle"> </Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('userIds')" prop="userIds"> <Input v-model="entity.userIds" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('userId')" prop="userId"> <Input v-model="entity.userId"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('endDate')" prop="endDate">
<DatePicker type="date" v-model="entity.endDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('startDate')" prop="startDate">
<DatePicker type="date" v-model="entity.startDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('plansToStartDate')" prop="plansToStartDate">
<DatePicker type="date" v-model="entity.plansToStartDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('plansToEndTime')" prop="plansToEndTime">
<DatePicker type="date" v-model="entity.plansToEndTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('completePercentage')" prop="completePercentage">
<InputNumber v-model="entity.completePercentage"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('upTaskId')" prop="upTaskId">
<InputNumber v-model="entity.upTaskId"></InputNumber>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Edit',
data() {
return {
disabled: false,
entity: {},
rules: {
name: [{
required: true,
message: '必填',
trigger: 'blur'
}]
}
}
},
props: {
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({
id: v
}).then(r => {
this.entity = r.result;
})
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.update(this.entity).then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
} else {
this.$Message.error('保存失败')
}
}).catch(err => {
this.disabled = false;
this.$Message.error('保存失败')
console.warn(err)
})
}
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_task" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
}
}
}
</script>
<template>
<Layout class="full">
<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>
<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 @click="highSearch" type="text">
<Icon type="md-search" />高级
</Button>
</FormItem>
</Form>
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
<template slot="batch">
<Button type="primary" class="mr10 ml10">开始</Button>
<Button type="primary" class="mr10 ml10">暂停</Button>
<Button type="primary" class="mr10 ml10">继续</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" :fullscreen="fullScreen" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</Content>
</Layout>
</template>
<script>
import Api from './api'
import Search from './search'
import ProductTree from "@/components/page/productTree.vue";
export default {
name: 'list',
components: {
Search,
ProductTree
},
head: {
title: "",
author: "henq",
description: "project_task 10/20/2020 9:27:58 AM",
},
data() {
return {
action: Api.index,
showMenu: true,
easySearch: {
keys: {
op: "title,projectTitle,planTitle",
value: null
}
},
theme1: 'light',
modal: false,
title: "新增",
detail: null,
curId: '',
fullScreen: false,
columns: [{
key: "selection",
type: "selection",
width: 50,
align: "center"
}, {
key: "id",
title: this.$t("id"),
align: "left",
high: true
},
{
key: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true,
render: (h, params) => {
return h('a', {
attrs: {
oprate: 'detail'
},
on: {
click: () => this.addRecord(params.row.id)
}
}, params.row.title)
}
},
{
key: "level",
title: this.l("level"),
align: "left",
high: true,
code: 'mes.project_task.Level'
},
{
key: "planId",
title: this.l("planId"),
align: "left",
high: true,
hide: true,
},
{
key: "projectId",
title: this.l("projectId"),
align: "left",
high: true,
hide: true,
},
{
key: "projectTitle",
title: this.l("projectTitle"),
align: "left",
easy: true,
high: true,
hide: true,
},
{
key: "planTitle",
title: this.l("planTitle"),
align: "left",
easy: true,
high: true,
hide: true,
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: 'mes.project_task.Status'
},
{
key: "userId",
title: this.l("userId"),
align: "left",
high: true
},
{
key: "endDate",
title: this.l("endDate"),
align: "left",
high: true
},
{
key: "note",
title: this.l("note"),
align: "left",
high: true
},
{
key: "startDate",
title: this.l("startDate"),
align: "left",
high: true
},
{
key: "plansToStartDate",
title: this.l("plansToStartDate"),
align: "left",
high: true
},
{
key: "plansToEndTime",
title: this.l("plansToEndTime"),
align: "left",
high: true
},
{
key: "completePercentage",
title: this.l("completePercentage"),
align: "left",
high: true
},
{
key: "upTaskId",
title: this.l("upTaskId"),
align: "left",
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: '操作',
key: 'action',
width: 140,
align: 'center',
render: (h, params) => {
return h('div', {
class: "action"
}, [
h('op', {
attrs: {
oprate: 'detail'
},
on: {
click: () => this.view(params.row.id)
}
}, '查看'),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h('op', {
attrs: {
oprate: 'edit'
},
on: {
click: () => this.edit(params.row.id)
}
}, '编辑'),
h('op', {
attrs: {
oprate: 'delete'
},
on: {
click: () => this.remove(params.row.id)
}
}, '删除')
])
}
},
],
data1: [{
id: 1,
title: '测试title'
}]
}
},
mounted() {
console.log(this);
},
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load()
this.modal = false
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch)
},
add() {
this.curId = 0;
this.title = "新增";
this.fullScreen = false;
this.detail = () => import('./add')
this.modal = true;
},
highSearch() {
this.curId = 0;
this.title = "高级搜索";
this.fullScreen = false;
this.detail = () => import('./search')
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.fullScreen = false;
this.detail = () => import('./add')
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.fullScreen = false;
this.detail = () => import('./detail')
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.fullScreen = false;
this.detail = () => import('./edit')
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success('删除成功')
}
})
},
cancel() {
this.curId = 0;
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) {
this.$refs.grid.reload(this.easySearch)
},
addRecord(id) {
this.curId = id;
this.title = "新增记录";
this.fullScreen = true;
this.detail = () => import('./detail')
this.modal = true;
},
l(key) {
let vkey = "project_task" + "." + key;
return this.$t(vkey) || key
}
}
}
</script>
<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>
<template>
<Form ref="form" :model="condition" :label-width="90">
<Row>
<Col :span="12" :v-if="condition.id.show">
<FormItem :label="$t('id')" prop="id"> <Input v-model="condition.id.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.creationTime.show">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.creatorUserId.show">
<FormItem :label="l('creatorUserId')" prop="creatorUserId"> <Input v-model="condition.creatorUserId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.lastModificationTime.show">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.lastModifierUserId.show">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId"> <Input v-model="condition.lastModifierUserId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.deletionTime.show">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="daterange" v-model="condition.deletionTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.title.show">
<FormItem :label="l('title')" prop="title"> <Input v-model="condition.title.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.planId.show">
<FormItem :label="l('planId')" prop="planId"> <Input v-model="condition.planId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.projectId.show">
<FormItem :label="l('projectId')" prop="projectId"> <Input v-model="condition.projectId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.level.show">
<FormItem :label="l('level')" prop="level">
<Dictionary code="mes.project_task.Level" v-model="condition.level.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_task.Status" v-model="condition.status.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.projectTitle.show">
<FormItem :label="l('projectTitle')" prop="projectTitle"> <Input v-model="condition.projectTitle.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.planTitle.show">
<FormItem :label="l('planTitle')" prop="planTitle"> <Input v-model="condition.planTitle.value"> </Input>
</FormItem>
</Col>
<Col :span="24" :v-if="condition.userIds.show">
<FormItem :label="l('userIds')" prop="userIds"> <Input v-model="condition.userIds.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.userId.show">
<FormItem :label="l('userId')" prop="userId"> <Input v-model="condition.userId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.endDate.show">
<FormItem :label="l('endDate')" prop="endDate">
<DatePicker type="daterange" v-model="condition.endDate.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.note.show">
<FormItem :label="l('note')" prop="note"> <Input v-model="condition.note.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.startDate.show">
<FormItem :label="l('startDate')" prop="startDate">
<DatePicker type="daterange" v-model="condition.startDate.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.plansToStartDate.show">
<FormItem :label="l('plansToStartDate')" prop="plansToStartDate">
<DatePicker type="daterange" v-model="condition.plansToStartDate.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.plansToEndTime.show">
<FormItem :label="l('plansToEndTime')" prop="plansToEndTime">
<DatePicker type="daterange" v-model="condition.plansToEndTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.completePercentage.show">
<FormItem :label="l('completePercentage')" prop="completePercentage"> <Input v-model="condition.completePercentage.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.upTaskId.show">
<FormItem :label="l('upTaskId')" prop="upTaskId"> <Input v-model="condition.upTaskId.value"> </Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" :disabled="disabled">搜索</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
condition: {
id: {
op: "Equal",
value: null,
show: true
},
creationTime: {
op: "Range",
value: null,
show: true
},
creatorUserId: {
op: "Equal",
value: null,
show: true
},
lastModificationTime: {
op: "Range",
value: null,
show: true
},
lastModifierUserId: {
op: "Equal",
value: null,
show: true
},
deletionTime: {
op: "Range",
value: null,
show: true
},
title: {
op: "Equal",
value: null,
show: true
},
planId: {
op: "Equal",
value: null,
show: true
},
projectId: {
op: "Equal",
value: null,
show: true
},
level: {
op: "Equal",
value: null,
show: true
},
status: {
op: "Equal",
value: null,
show: true
},
projectTitle: {
op: "Equal",
value: null,
show: true
},
planTitle: {
op: "Equal",
value: null,
show: true
},
userIds: {
op: "Equal",
value: null,
show: true
},
userId: {
op: "Equal",
value: null,
show: true
},
endDate: {
op: "Range",
value: null,
show: true
},
note: {
op: "Equal",
value: null,
show: true
},
startDate: {
op: "Range",
value: null,
show: true
},
plansToStartDate: {
op: "Range",
value: null,
show: true
},
plansToEndTime: {
op: "Range",
value: null,
show: true
},
completePercentage: {
op: "Equal",
value: null,
show: true
},
upTaskId: {
op: "Equal",
value: null,
show: true
},
},
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_task" + "." + key;
return this.$t(key)
}
}
}
</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