Commit 0f531b3b authored by renjintao's avatar renjintao

group user

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