Commit a1ad66df authored by 周远喜's avatar 周远喜

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

parents c6a7dd25 d2663a62
...@@ -1881,5 +1881,35 @@ export default { ...@@ -1881,5 +1881,35 @@ export default {
note: '备注', note: '备注',
attachment: '附件', attachment: '附件',
taskId: '任务id', taskId: '任务id',
},
project_group: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
projectId: '项目id',
planId: '计划id',
title: '名称',
content:'备注信息'
},
project_group_user: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
userId: '用户',
role: '角色',
projectId: '项目id',
planId: '计划id',
note: '备注',
status: '状态',
groupName: '项目组名称',
groupId: '项目组Id',
} }
} }
<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="24">
<FormItem :label="l('content')" prop="content"> <Input v-model="entity.content"> </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: '',
title: "",
content: ''
},
rules: {
title: [{
required: true,
message: '必填',
trigger: 'blur'
}]
}
}
},
props: {
v: Object,
eid: String
},
mounted() {
if (this.eid != '' && this.eid != null) {
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_group" + "." + 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}/projectgroup/paged`,
paged(params){
return Api.post(`${material}/projectgroup/paged`,params);
},
get(params){
return Api.get(`${material}/projectgroup/get`,params);
},
create(params){
return Api.post(`${material}/projectgroup/create`,params);
},
update(params){
return Api.post(`${material}/projectgroup/update`,params);
},
delete(id) {
return Api.delete(`${material}/projectgroup/delete`,{params:{id:id}});
},
deletes(params) {
return Api.post(`${material}/projectgroup/batchdelete`,params);
}
}
\ No newline at end of file
<template>
<div class="detail" style="width:100%;">
<Row>
<Filed :span="12" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="12" :name="l('content')">{{entity.content}}</Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
</Row>
</div>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
entity: {},
}
},
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')
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_group" + "." + 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('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('content')" prop="content"> <Input v-model="entity.content"> </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: 'Edit',
data() {
return {
disabled: false,
entity: {},
rules: {
title: [{
required: true,
message: '必填',
trigger: 'blur'
}]
}
}
},
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;
})
},
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_group" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != '' && v != null) {
this.load(v);
}
}
}
}
</script>
<template>
<div class="full">
<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 :fullscreen="fullscreen">
<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_group 10/21/2020 11:24:04 AM",
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "title",
value: null
}
},
modal: false,
fullscreen: false,
title: "新增",
detail: null,
curId: '',
columns: [{
key: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true
},
{
key: "content",
title: this.l("content"),
align: "left",
easy: true,
high: true
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "center",
high: true,
type: 'date',
width: 180
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
type: 'user',
width: 180
},
{
title: '操作',
key: 'action',
width: 220,
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)
}
}, '删除'),
h('op', {
attrs: {
oprate: 'edit'
},
on: {
click: () => this.openGroupUser(params.row)
}
}, '项目团队'),
])
}
},
]
}
},
mounted() {
console.log(this);
},
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load()
this.modal = false
this.curId = '';
},
search() {
this.$refs.grid.reload(this.easySearch)
},
add() {
this.curId = '';
this.title = "新增";
this.fullscreen = false;
this.detail = () => import('./add')
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('删除成功')
}
})
},
openGroupUser(row) {
this.curId = row.id;
this.title = "项目团队---" + row.title;
this.fullscreen = true;
this.detail = () => import('../groupUser/index1')
this.modal = true;
},
cancel() {
this.curId = '';
this.modal = false
},
l(key) {
let vkey = "project_group" + "." + key;
return this.$t(vkey) || key
}
}
}
</script>
<style lang="less">
</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.title.show">
<FormItem :label="l('title')" prop="title"> <Input v-model="condition.title.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
},
title: {
op: "Equal",
value: null,
show: true
},
},
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_group" + "." + key;
return this.$t(key)
}
}
}
</script>
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem :label="l('userId')" prop="userId">
<InputNumber v-model="entity.userId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('role')" prop="role">
<Dictionary code="mes.project_group_user.Role" v-model="entity.role"></Dictionary>
</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('planId')" prop="planId">
<InputNumber v-model="entity.planId"></InputNumber>
</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('status')" prop="status">
<Dictionary code="mes.project_group_user.Status" v-model="entity.status"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('groupName')" prop="groupName"> <Input v-model="entity.groupName"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('groupId')" prop="groupId"> <Input v-model="entity.groupId"> </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,
userId: null,
role: null,
projectId: null,
planId: null,
note: "",
status: null,
groupName: "",
groupId: ""
},
rules: {
name: [{
required: true,
message: '必填',
trigger: 'blur'
}]
}
}
},
props: {
v: Object,
eid: String
},
mounted() {
if (this.eid != '' && this.eid != null) {
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_group_user" + "." + 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}/projectgroupuser/paged`,
paged(params){
return Api.post(`${material}/projectgroupuser/paged`,params);
},
list(params){
return Api.post(`${material}/projectgroupuser/list`,params);
},
get(params){
return Api.get(`${material}/projectgroupuser/get`,params);
},
create(params){
return Api.post(`${material}/projectgroupuser/create`,params);
},
update(params){
return Api.post(`${material}/projectgroupuser/update`,params);
},
delete(id) {
return Api.delete(`${material}/projectgroupuser/delete`,{params:{id:id}});
},
deletes(params) {
return Api.post(`${material}/projectgroupuser/batchdelete`,params);
}
}
\ No newline at end of file
<template>
<div class="detail">
<Row>
<Filed :span="12" :name="l('userId')">
<User :value="entity.userId"></User>
</Filed>
<Filed :span="12" :name="l('role')">{{entity.role}}</Filed>
<Filed :span="12" :name="l('note')">{{entity.note}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</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: 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')
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_group_user" + "." + 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('userId')" prop="userId">
<InputNumber v-model="entity.userId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('role')" prop="role">
<Dictionary code="project.group.role" v-model="entity.role"></Dictionary>
</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('status')" prop="status">
<Dictionary code="project.group.status" v-model="entity.status"></Dictionary>
</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: 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;
})
},
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_group_user" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != '' && v != null) {
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_group_user 10/21/2020 11:46:56 AM",
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "groupName",
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: "userId",
title: this.l("userId"),
align: "left",
high: true
},
{
key: "role",
title: this.l("role"),
align: "left",
high: true,
code: 'mes.project_group_user.Role'
},
{
key: "projectId",
title: this.l("projectId"),
align: "left",
high: true
},
{
key: "planId",
title: this.l("planId"),
align: "left",
high: true
},
{
key: "note",
title: this.l("note"),
align: "left",
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: 'mes.project_group_user.Status'
},
{
key: "groupName",
title: this.l("groupName"),
align: "left",
easy: true,
high: true
},
{
key: "groupId",
title: this.l("groupId"),
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_group_user" + "." + key;
return this.$t(vkey) || key
}
}
}
</script>
<style lang="less">
</style>
<template>
<div>
<Table border :columns="columns" :data="list" ref="table" class="tableCommon" stripe>
<template slot-scope="{ row, index }" slot="userId">
<span v-if="edit != index" v-text="row.userId"></span>
<Input v-else type="text" v-model.trim="cur.userId" />
</template>
</Table>
<div class="footerWidth"><Button type="primary" long @click="addList">新增人员</Button></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'
export default {
name: 'list',
head: {
title: "项目成员人",
author: "henq",
description: "project_group_user 10/21/2020 11:46:56 AM",
},
data() {
return {
modal: false,
title: "新增",
detail: null,
curId: '',
edit: -1,
columns: [{
key: "userId",
title: this.l("userId"),
align: "left",
high: true,
type: 'user',
slot: 'userId'
},
{
key: "role",
title: this.l("role"),
align: "left",
high: true,
code: 'project.group.role'
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: 'project.group.status'
},
{
key: "note",
title: this.l("note"),
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)
}
}, '删除')
])
}
},
],
list: []
}
},
props: {
eid: String
},
mounted() {
if (this.eid != '' && this.eid != null) {
this.load(this.eid)
}
},
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods: {
load(v) {
let params = {
conditions: [{
fieldName: "groupId",
fieldValue: v,
conditionalType: "Equal",
}],
}
Api.list(params).then(r => {
if (r.success) {
this.list = r.result
}
})
},
ok() {
this.load(this.eid)
this.modal = false
this.curId = '';
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import('./add')
this.modal = true;
},
addList() {
this.edit = this.list.length;
this.cur = {
userId: null,
};
this.list.push(this.cur);
},
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.load(this.eid)
this.$Message.success('删除成功')
}
})
},
cancel() {
this.curId = this.eid;
this.modal = false
},
l(key) {
let vkey = "project_group_user" + "." + key;
return this.$t(vkey) || key
}
},
watch: {
eid(v) {
if (v != '' && v != null) {
this.load(v);
}
}
}
}
</script>
<style lang="less">
.footerWidth {
width: calc(100%);
margin-top: 5px;
}
</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.userId.show">
<FormItem :label="l('userId')" prop="userId"> <Input v-model="condition.userId.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.role.show">
<FormItem :label="l('role')" prop="role">
<Dictionary code="mes.project_group_user.Role" v-model="condition.role.value"></Dictionary>
</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.note.show">
<FormItem :label="l('note')" prop="note"> <Input v-model="condition.note.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_group_user.Status" v-model="condition.status.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.groupName.show">
<FormItem :label="l('groupName')" prop="groupName"> <Input v-model="condition.groupName.value"> </Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.groupId.show">
<FormItem :label="l('groupId')" prop="groupId"> <Input v-model="condition.groupId.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
},
userId: {
op: "Equal",
value: null,
show: true
},
role: {
op: "Equal",
value: null,
show: true
},
projectId: {
op: "Equal",
value: null,
show: true
},
planId: {
op: "Equal",
value: null,
show: true
},
note: {
op: "Equal",
value: null,
show: true
},
status: {
op: "Equal",
value: null,
show: true
},
groupName: {
op: "Equal",
value: null,
show: true
},
groupId: {
op: "Equal",
value: null,
show: true
},
},
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_group_user" + "." + key;
return this.$t(key)
}
}
}
</script>
...@@ -137,7 +137,6 @@ export default { ...@@ -137,7 +137,6 @@ export default {
name: "Add", name: "Add",
data() { data() {
return { return {
imgName: "", imgName: "",
avatorPath: "", avatorPath: "",
entity: { entity: {
...@@ -196,7 +195,6 @@ export default { ...@@ -196,7 +195,6 @@ export default {
} }
Api.create(this.entity) Api.create(this.entity)
.then((r) => { .then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
...@@ -205,7 +203,6 @@ export default { ...@@ -205,7 +203,6 @@ export default {
} }
}) })
.catch((err) => { .catch((err) => {
this.$Message.error("保存失败"); this.$Message.error("保存失败");
console.warn(err); console.warn(err);
}); });
......
<template> <template>
<div class="detail"> <div class=".detail-document">
<div class="top-title">
<div class="new-detail row-left">
<Row> <Row>
<Filed :span="12" :name="l('creationTime')">{{ <Filed :span="12" :name="l('title') + ':'">{{ entity.title }}</Filed>
entity.creationTime <Filed :span="12" :name="l('state') + ':'">
}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">
<User :value="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('title')">{{ entity.title }}</Filed>
<Filed :span="12" :name="l('state')">
<state code="project.main.state" :value="entity.state" <state code="project.main.state" :value="entity.state"
/></Filed> /></Filed>
<!-- <Filed :span="12" :name="l('phase')">{{ entity.phase }}</Filed> --> <!-- <Filed :span="12" :name="l('phase')">{{ entity.phase }}</Filed> -->
<Filed :span="12" :name="l('startDate')">{{ entity.startDate }}</Filed> <Filed :span="12" :name="l('startDate') + ':'">{{
<Filed :span="12" :name="l('endDate')">{{ entity.endDate }}</Filed> entity.startDate
<!-- <Filed :span="12" :name="l('businessUnits')">{{ }}</Filed>
entity.businessUnits <Filed :span="12" :name="l('endDate') + ':'">{{
}}</Filed> --> entity.endDate
<Filed :span="12" :name="l('type')"> }}</Filed>
<state code="project.main.type" :value="entity.type" />
</Filed>
<Filed :span="12" :name="l('picture')"
><a @click="imgClick(entity.picture)">查看图片</a></Filed
>
<Filed :span="12" :name="l('attachment')">
<files ref="refFile" :parms="parms" fileFormat :showList="false" />
</Filed>
<Filed :span="24" :name="l('note')">{{ entity.note }}</Filed>
</Row> </Row>
</div> </div>
<ul>
<li>
<a @click="details"> <Icon type="ios-log-in" />&nbsp;详情 </a>
&nbsp;
<span>|</span>
</li>
<li>
<a @click="template"> <Icon type="ios-photos" />&nbsp;模板 </a>
&nbsp;
<span>|</span>
</li>
<li>
<a @click="task"> <Icon type="md-create" />&nbsp;任务 </a>
&nbsp;
<span>|</span>
</li>
</ul>
</div>
<div class="body-document">
<h4 v-text="title"></h4>
<keep-alive>
<component v-bind:is="detail" :eid="eid"></component>
</keep-alive>
</div>
</div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
...@@ -49,11 +48,18 @@ export default { ...@@ -49,11 +48,18 @@ export default {
name: "Add", name: "Add",
data() { data() {
return { return {
modal: false,
title: "详细信息",
detail: null,
curId: this.eid,
avatorPath: "",
downUrl: fileUrlDown,
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }], code: [{ required: true, message: "必填", trigger: "blur" }],
}, },
fileds: [],
parms: { parms: {
app: "material", app: "material",
eid: null, eid: null,
...@@ -64,25 +70,34 @@ export default { ...@@ -64,25 +70,34 @@ export default {
}, },
props: ["eid"], props: ["eid"],
mounted() { mounted() {
if (this.eid) {
this.load(this.eid); this.load(this.eid);
}
// this.detail = () => import("./details");
// this.parms.eid = this.$u.guid();
// this.parms.eid = r.result.attachment;
}, },
methods: { methods: {
imgClick(img) {
window.open(fileUrlDown + img, "_blank");
},
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then((r) => {
this.entity = r.result; this.entity = r.result;
this.entity.type = r.result.type + ""; // this.$emit("on-load");
this.entity.state = r.result.state + "";
this.parms.eid = r.result.attachment;
this.$emit("on-load");
}); });
}, },
handleClose() {
this.$emit("on-close"); details() {
this.title = "详细信息";
this.detail = () => import("./details");
},
template() {
// this.curId = this.eid;
this.title = "模板";
// this.detail = () => import("./add");
},
task() {
// this.curId = this.eid;
this.title = "任务";
// this.detail = () => import("./add");
}, },
l(key) { l(key) {
key = "project_main" + "." + key; key = "project_main" + "." + key;
...@@ -91,10 +106,71 @@ export default { ...@@ -91,10 +106,71 @@ export default {
}, },
watch: { watch: {
eid(v) { eid(v) {
if (v) { if (v > 0) {
this.load(v); this.load(v);
} }
}, },
}, },
}; };
</script> </script>
<style lang="less">
.top-title {
// margin: 10px;
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
position: relative;
border-radius: 5px;
.row-left {
width: 1100px;
}
ul {
display: -webkit-inline-box;
display: inline-box;
position: absolute;
bottom: 5px;
right: 0px;
li {
width: 70px;
span {
color: #e0e0e0;
}
}
}
}
.body-document {
margin-top: 10px;
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
border-radius: 8px;
min-height: 80vh;
h4 {
height: 50px;
line-height: 50px;
background: #515a6e;
padding: 0 10px;
color: #f5f6fa;
border-radius: 5px 5px 0 0;
}
.img-touxiang {
width: 230px;
height: 230px;
float: right;
margin-top: 10px;
margin-right: 10px;
img {
width: 100%;
height: 100%;
border-radius: 5px;
}
}
.detail-d {
padding-left: 20px;
.filed-d {
border-top: 1px solid #e0e0e0;
}
}
}
.detail-document {
background-color: #f5f7f9 !important;
}
</style>
\ No newline at end of file
<template>
<div>
<Row>
<Col span="20">
<div class="new-detail detail-d">
<Row>
<Filed :span="8" :name="l('creationTime') + ':'">{{
entity.creationTime
}}</Filed>
<Filed :span="8" :name="l('creatorUserId') + ':'">
<User :value="entity.creatorUserId" />
</Filed>
<Filed :span="8" :name="l('type') + ':'">
<state code="project.main.type" :value="entity.type" />
</Filed>
<Filed :span="24" :name="l('note') + ':'">{{ entity.note }}</Filed>
<Filed :span="24" :name="l('attachment') + ':'">
<files
ref="refFile"
:parms="parms"
fileFormat
:showList="false"
/>
</Filed>
</Row>
</div>
</Col>
<Col span="4" class="dcm-right">
<div class="img-touxiang">
<Pictrue :src="avatorPath" v-if="avatorPath" />
<img
src="@/assets/images/files_header.png"
v-else
width="100%"
height="100%"
/>
</div>
</Col>
</Row>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
avatorPath: "",
downUrl: fileUrlDown,
entity: this.row,
parms: {
app: "material",
eid: null,
name: "",
field: "",
},
};
},
props: ["eid"],
mounted() {
if (this.eid) {
this.load(this.eid);
}
this.parms.eid = this.$u.guid();
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.entity.type = r.result.type + "";
this.entity.state = r.result.state + "";
this.parms.eid = r.result.attachment;
this.$emit("on-load");
});
},
l(key) {
key = "project_main" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
};
</script>
\ No newline at end of file
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<Col span="10"> <Col span="10">
<div class="img-i"> <div class="img-i">
<!-- <img :src="downUrl + row.img" v-if="row.img" /> --> <!-- <img :src="downUrl + row.img" v-if="row.img" /> -->
<Pictrue :src="row.img" v-if="row.img" /> <Pictrue :src="row.picture" v-if="row.picture" />
<img <img
src="@/assets/images/files_header.png" src="@/assets/images/files_header.png"
v-else v-else
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
>&nbsp; >&nbsp;
<a @click="remove(row.id)"> <Icon type="ios-trash" />删除 </a <a @click="remove(row.id)"> <Icon type="ios-trash" />删除 </a
>&nbsp; >&nbsp;
<a @click="view(row.id)"> <Icon type="md-document" />详情 </a> <a @click="view(row.id)"> <Icon type="md-document" />查看 </a>
&nbsp; &nbsp;
<!-- <a @click="sub(row.id)" v-if="row.status == 1 && row.schemaId"> <!-- <a @click="sub(row.id)" v-if="row.status == 1 && row.schemaId">
<Icon type="md-color-wand" />送审 <Icon type="md-color-wand" />送审
...@@ -113,7 +113,18 @@ ...@@ -113,7 +113,18 @@
</Card> </Card>
</template> </template>
</DataGrid> </DataGrid>
<<<<<<< HEAD
<Modal v-model="modal" :title="title" width="1200" footer-hide :mask-closable="false" > <Modal v-model="modal" :title="title" width="1200" footer-hide :mask-closable="false" >
=======
<Modal
v-model="modal"
:title="title"
width="1200"
footer-hide
:mask-closable="false"
:fullscreen="fullscreen"
>
>>>>>>> d2663a62c98f5257aee5b0294c066fda5b9d4d6d
<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> </div>
...@@ -137,7 +148,7 @@ export default { ...@@ -137,7 +148,7 @@ export default {
easySearch: { easySearch: {
keys: { op: "title", value: null }, keys: { op: "title", value: null },
}, },
// single: false, fullscreen: false,
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
...@@ -228,21 +239,21 @@ export default { ...@@ -228,21 +239,21 @@ export default {
); );
}, },
}, },
{ // {
key: "attachment", // key: "attachment",
title: this.l("attachment"), // title: this.l("attachment"),
align: "center", // align: "center",
high: true, // high: true,
render: (h, params) => { // render: (h, params) => {
return h( // return h(
"a", // "a",
{ // {
on: { click: () => this.view(params.row.id) }, // on: { click: () => this.view(params.row.id) },
}, // },
"查看附件" // "查看附件"
); // );
}, // },
}, // },
// { // {
// key: "phase", // key: "phase",
// title: this.l("phase"), // title: this.l("phase"),
...@@ -300,7 +311,7 @@ export default { ...@@ -300,7 +311,7 @@ export default {
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 140, width: 160,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
...@@ -390,25 +401,28 @@ export default { ...@@ -390,25 +401,28 @@ export default {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
add() { add() {
this.fullscreen = false;
this.curId = 0; this.curId = 0;
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
}, },
copy(id) { copy(id) {
console.log(id); this.fullscreen = false;
this.curId = id; this.curId = id;
this.title = "克隆"; this.title = "克隆";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
}, },
view(id) { view(id) {
this.fullscreen = true;
this.curId = id; this.curId = id;
this.title = "详情"; this.title = "详情";
this.detail = () => import("./detail"); this.detail = () => import("./detail");
this.modal = true; this.modal = true;
}, },
edit(id) { edit(id) {
this.fullscreen = false;
this.curId = id; this.curId = id;
this.title = "编辑"; this.title = "编辑";
this.detail = () => import("./edit"); this.detail = () => import("./edit");
...@@ -499,6 +513,11 @@ export default { ...@@ -499,6 +513,11 @@ export default {
.img-i { .img-i {
height: 170px; height: 170px;
width: 170px; width: 170px;
img {
height: 170px;
width: 170px;
border-radius: 5px;
}
} }
.c { .c {
padding-left: 14px; padding-left: 14px;
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<Row> <Row>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed> <Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed> <Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed> <Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed>
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed> <Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed>
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed> <Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed>
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="110">
<Row> <Row>
<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>
</Col> </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"> <Col :span="12">
<FormItem :label="l('level')" prop="level"> <FormItem :label="l('level')" prop="level">
<Dictionary code="mes.project_task.Level" v-model="entity.level"></Dictionary> <Dictionary code="project.task.level" v-model="entity.level"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('status')" prop="status"> <FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_task.Status" v-model="entity.status"></Dictionary> <Dictionary code="project.task.status" v-model="entity.status"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -33,21 +24,22 @@ ...@@ -33,21 +24,22 @@
<FormItem :label="l('planTitle')" prop="planTitle"> <Input v-model="entity.planTitle"> </Input> <FormItem :label="l('planTitle')" prop="planTitle"> <Input v-model="entity.planTitle"> </Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="12" v-if="false">
<FormItem :label="l('userIds')" prop="userIds"> <Input v-model="entity.userIds" type="textarea" :rows="5"></Input> <FormItem :label="l('planId')" prop="planId">
<Input v-model="entity.planId"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12" v-if="false">
<FormItem :label="l('userId')" prop="userId"> <Input v-model="entity.userId"> </Input> <FormItem :label="l('projectId')" prop="projectId">
<Input v-model="entity.projectId"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('endDate')" prop="endDate"> <FormItem :label="l('userId')" prop="userId"> <Input v-model="entity.userId"> </Input>
<DatePicker type="date" v-model="entity.endDate"></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="24">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input> <FormItem :label="l('userIds')" prop="userIds"> <Input v-model="entity.userIds" type="textarea" :rows="5"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -56,6 +48,11 @@ ...@@ -56,6 +48,11 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <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('plansToStartDate')" prop="plansToStartDate"> <FormItem :label="l('plansToStartDate')" prop="plansToStartDate">
<DatePicker type="date" v-model="entity.plansToStartDate"></DatePicker> <DatePicker type="date" v-model="entity.plansToStartDate"></DatePicker>
</FormItem> </FormItem>
...@@ -71,6 +68,10 @@ ...@@ -71,6 +68,10 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('upTaskId')" prop="upTaskId"> <FormItem :label="l('upTaskId')" prop="upTaskId">
<InputNumber v-model="entity.upTaskId"></InputNumber> <InputNumber v-model="entity.upTaskId"></InputNumber>
</FormItem> </FormItem>
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<div class="detail"> <div class="detail">
<Row style="height:180px"> <Row style="height:180px">
<Filed :span="6" :name="l('creationTime')">{{entity.creationTime}}</Filed> <Filed :span="6" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="6" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed> <Filed :span="6" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
<Filed :span="6" :name="l('title')">{{entity.title}}</Filed> <Filed :span="6" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="6" :name="l('level')">{{entity.level}}</Filed> <Filed :span="6" :name="l('level')">{{entity.level}}</Filed>
<Filed :span="6" :name="l('status')">{{entity.status}}</Filed> <Filed :span="6" :name="l('status')">{{entity.status}}</Filed>
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="110">
<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>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('planId')" prop="planId"> <FormItem :label="l('planId')" prop="planId">
<InputNumber v-model="entity.planId"></InputNumber> <Input v-model="entity.planId"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('projectId')" prop="projectId"> <FormItem :label="l('projectId')" prop="projectId">
<InputNumber v-model="entity.projectId"></InputNumber> <Input v-model="entity.projectId"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('level')" prop="level"> <FormItem :label="l('level')" prop="level">
<Dictionary code="mes.project_task.Level" v-model="entity.level"></Dictionary> <Dictionary code="project.task.level" v-model="entity.level"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('status')" prop="status"> <FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_task.Status" v-model="entity.status"></Dictionary> <Dictionary code="project.task.status" v-model="entity.status"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -77,17 +42,13 @@ ...@@ -77,17 +42,13 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('endDate')" prop="endDate"> <FormItem :label="l('startDate')" prop="startDate">
<DatePicker type="date" v-model="entity.endDate"></DatePicker> <DatePicker type="date" v-model="entity.startDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('startDate')" prop="startDate"> <FormItem :label="l('endDate')" prop="endDate">
<DatePicker type="date" v-model="entity.startDate"></DatePicker> <DatePicker type="date" v-model="entity.endDate"></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -105,9 +66,13 @@ ...@@ -105,9 +66,13 @@
<InputNumber v-model="entity.completePercentage"></InputNumber> <InputNumber v-model="entity.completePercentage"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input>
</FormItem>
</Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('upTaskId')" prop="upTaskId"> <FormItem :label="l('upTaskId')" prop="upTaskId">
<InputNumber v-model="entity.upTaskId"></InputNumber> <Input v-model="entity.upTaskId"></Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -136,10 +101,10 @@ export default { ...@@ -136,10 +101,10 @@ export default {
} }
}, },
props: { props: {
eid: Number eid: String
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid != '' && this.eid != null) {
this.load(this.eid); this.load(this.eid);
} }
}, },
...@@ -181,7 +146,7 @@ export default { ...@@ -181,7 +146,7 @@ export default {
}, },
watch: { watch: {
eid(v) { eid(v) {
if (v != 0) { if (v != '' && v != null) {
this.load(v); this.load(v);
} }
} }
......
...@@ -139,23 +139,9 @@ export default { ...@@ -139,23 +139,9 @@ export default {
{ {
key: "level", key: "level",
title: this.l("level"), title: this.l("level"),
align: "left", align: "center",
high: true,
code: 'mes.project_task.Level'
},
{
key: "planId",
title: this.l("planId"),
align: "left",
high: true, high: true,
hide: true, code: 'project.task.level'
},
{
key: "projectId",
title: this.l("projectId"),
align: "left",
high: true,
hide: true,
}, },
{ {
key: "projectTitle", key: "projectTitle",
...@@ -176,46 +162,45 @@ export default { ...@@ -176,46 +162,45 @@ export default {
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
align: "left", align: "center",
high: true, high: true,
code: 'mes.project_task.Status' code: 'project.task.status'
}, },
{ {
key: "userId", key: "userId",
title: this.l("userId"), title: this.l("userId"),
align: "left", align: "left",
high: true high: true,
}, type: 'user'
{
key: "endDate",
title: this.l("endDate"),
align: "left",
high: true
},
{
key: "note",
title: this.l("note"),
align: "left",
high: true
}, },
{ {
key: "startDate", key: "startDate",
title: this.l("startDate"), title: this.l("startDate"),
align: "left", align: "center",
high: true high: true,
type: 'date'
},
{
key: "endDate",
title: this.l("endDate"),
align: "center",
high: true,
type: 'date'
}, },
{ {
key: "plansToStartDate", key: "plansToStartDate",
title: this.l("plansToStartDate"), title: this.l("plansToStartDate"),
align: "left", align: "center",
high: true high: true,
type: 'date'
}, },
{ {
key: "plansToEndTime", key: "plansToEndTime",
title: this.l("plansToEndTime"), title: this.l("plansToEndTime"),
align: "left", align: "center",
high: true high: true,
type: 'date'
}, },
{ {
key: "completePercentage", key: "completePercentage",
...@@ -224,10 +209,11 @@ export default { ...@@ -224,10 +209,11 @@ export default {
high: true high: true
}, },
{ {
key: "upTaskId", key: "note",
title: this.l("upTaskId"), title: this.l("note"),
align: "left", align: "left",
high: true high: true,
hide: true
}, },
{ {
key: "creationTime", key: "creationTime",
...@@ -242,41 +228,7 @@ export default { ...@@ -242,41 +228,7 @@ export default {
align: "left", align: "left",
high: true, high: true,
hide: true, hide: true,
}, type: 'user'
{
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: '操作',
...@@ -287,31 +239,49 @@ export default { ...@@ -287,31 +239,49 @@ export default {
return h('div', { return h('div', {
class: "action" 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', { h('op', {
attrs: { attrs: {
oprate: 'detail' icon: "ios-play",
type: "icon",
title: "继续",
color: "#19be6b",
}, },
on: { on: {
click: () => this.view(params.row.id) click: () => this.edit(params.row.id)
} }
}, '查看'), }),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h('op', { h('op', {
attrs: { attrs: {
oprate: 'edit' icon: "ios-create-outline",
type: "icon",
title: "修改",
color: "#2b85e4",
}, },
on: { on: {
click: () => this.edit(params.row.id) click: () => this.edit(params.row.id)
} }
}, '编辑'), }),
h('op', { h('op', {
attrs: { attrs: {
oprate: 'delete' icon: "ios-trash-outline",
type: "icon",
title: "删除",
color: "#ed4014",
}, },
on: { on: {
click: () => this.remove(params.row.id) click: () => this.remove(params.row.id)
} }
}, '删除') })
]) ])
} }
}, },
......
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