Commit 0f531b3b authored by renjintao's avatar renjintao

group user

parent ce60b8bf
......@@ -45,7 +45,7 @@ export default {
fullscreen: false,
title: "新增",
detail: null,
curId: 0,
curId: '',
columns: [{
key: "title",
title: this.l("title"),
......@@ -115,7 +115,7 @@ export default {
oprate: 'edit'
},
on: {
click: () => this.openGroupUser(params.row.id)
click: () => this.openGroupUser(params.row)
}
}, '项目团队'),
])
......@@ -137,13 +137,13 @@ export default {
ok() {
this.$refs.grid.load()
this.modal = false
this.curId = 0;
this.curId = '';
},
search() {
this.$refs.grid.reload(this.easySearch)
},
add() {
this.curId = 0;
this.curId = '';
this.title = "新增";
this.fullscreen = false;
this.detail = () => import('./add')
......@@ -178,15 +178,15 @@ export default {
}
})
},
openGroupUser(id) {
this.curId = id;
this.title = "项目团队";
openGroupUser(row) {
this.curId = row.id;
this.title = "项目团队---" + row.title;
this.fullscreen = true;
this.detail = () => import('../groupUser/index1')
this.modal = true;
},
cancel() {
this.curId = 0;
this.curId = '';
this.modal = false
},
l(key) {
......@@ -198,4 +198,5 @@ export default {
</script>
<style lang="less">
</style>
......@@ -81,10 +81,10 @@ export default {
},
props: {
v: Object,
eid: Number
eid: String
},
mounted() {
if (this.eid > 0) {
if (this.eid != '' && this.eid != null) {
this.load(this.eid);
}
},
......
......@@ -5,6 +5,9 @@ export default {
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);
},
......
......@@ -2,23 +2,16 @@
<div class="detail">
<Row>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
<Filed :span="12" :name="l('userId')">
<User :value="entity.userId"></User>
</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('userId')">{{entity.userId}}</Filed>
<Filed :span="12" :name="l('role')">{{entity.role}}</Filed>
<Filed :span="12" :name="l('projectId')">{{entity.projectId}}</Filed>
<Filed :span="12" :name="l('planId')">{{entity.planId}}</Filed>
<Filed :span="12" :name="l('note')">{{entity.note}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="12" :name="l('groupName')">{{entity.groupName}}</Filed>
<Filed :span="12" :name="l('groupId')">{{entity.groupId}}</Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
</Row>
</div>
......@@ -46,10 +39,10 @@ export default {
}
},
props: {
eid: Number
eid: String
},
mounted() {
if (this.eid > 0) {
if (this.eid != '' && this.eid != null) {
this.load(this.eid);
}
},
......@@ -72,7 +65,7 @@ export default {
},
watch: {
eid(v) {
if (v > 0) {
if (v != '' && v != null) {
this.load(v);
}
}
......
<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('userId')" prop="userId">
<InputNumber v-model="entity.userId"></InputNumber>
......@@ -43,17 +8,7 @@
</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>
<Dictionary code="project.groupuser.Role" v-model="entity.role"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
......@@ -62,15 +17,7 @@
</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>
<Dictionary code="project.group.user.Status" v-model="entity.status"></Dictionary>
</FormItem>
</Col>
</Row>
......@@ -99,10 +46,10 @@ export default {
}
},
props: {
eid: Number
eid: String
},
mounted() {
if (this.eid > 0) {
if (this.eid != '' && this.eid != null) {
this.load(this.eid);
}
},
......@@ -144,7 +91,7 @@ export default {
},
watch: {
eid(v) {
if (v != 0) {
if (v != '' && v != null) {
this.load(v);
}
}
......
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action" :easy="false" :set="false" :height="300">
<template slot="buttons">
<Button type="primary" @click="add">团队管理</Button>
</template>
</DataGrid>
<Table border :columns="columns" :data="list" ref="table" class="tableCommon" stripe></Table>
<div class="footerWidth"><Button type="primary" long>新增</Button></div>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
......@@ -14,12 +10,8 @@
<script>
import Api from './api'
import Search from './search'
export default {
name: 'list',
components: {
Search
},
head: {
title: "项目成员人",
author: "henq",
......@@ -27,13 +19,7 @@ export default {
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "groupName",
value: null
}
},
modal: false,
title: "新增",
detail: null,
......@@ -109,11 +95,17 @@ export default {
])
}
},
]
],
list: []
}
},
props: {
eid: String
},
mounted() {
console.log(this);
if (this.eid != '' && this.eid != null) {
this.load(this.eid)
}
},
async fetch({
store,
......@@ -122,13 +114,24 @@ export default {
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.$refs.grid.load()
this.load(this.eid)
this.modal = false
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch)
this.curId = '';
},
add() {
this.curId = 0;
......@@ -157,22 +160,33 @@ export default {
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.load(this.eid)
this.$Message.success('删除成功')
}
})
},
cancel() {
this.curId = 0;
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>
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