Commit 0fee44df authored by 周远喜's avatar 周远喜

团队管理

parent a4d2c6db
...@@ -1085,7 +1085,6 @@ html [type=button] { ...@@ -1085,7 +1085,6 @@ html [type=button] {
} }
i { i {
font-size: 16px;
padding: 4px; padding: 4px;
border-radius: 3px; border-radius: 3px;
} }
...@@ -1094,7 +1093,6 @@ html [type=button] { ...@@ -1094,7 +1093,6 @@ html [type=button] {
background: #1890FF; background: #1890FF;
color: #fff; color: #fff;
} }
background: transparent; background: transparent;
} }
...@@ -1105,66 +1103,45 @@ html [type=button] { ...@@ -1105,66 +1103,45 @@ html [type=button] {
a.add { a.add {
color: #249E91; color: #249E91;
} }
// a.add:hover {
// // color: #27AB9D;
// }
a.edit { a.edit {
// color: #32B187;
color: rgb(6, 147, 212) color: rgb(6, 147, 212)
} }
// a.edit:hover {
// color: #35BD90
// }
a.remove, a.remove,
a.delete { a.delete {
color: #FF7A8B;
i:hover { i:hover {
background: #FF7A8B; background: orange;
color: #fff; color: #fff;
} }
} }
a.delete {
color: #FF7A8B;
}
a.empower { a.empower {
color: #FFBD59; color: #FFBD59;
} }
a.disable {
color: #CAD1D9;
}
a.icon { a.icon {
display: inline-block; display: inline-block;
width: 28px; width: 22px;
height: 28px; height: 22px;
line-height: 28px; line-height: 22px;
margin: 0px 0 0 0; margin: 0px 0 0 0;
border-radius: 50%; border-radius: 50%;
color: #515A6E; color: #515A6E;
background: #F5F6FA; background: #F5F6FA;
.ivu-icon { .ivu-icon {
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 20px;
}
}
a.disable {
color: #CAD1D9;
cursor: help;
i:hover {
background:#CAD1D9;
} }
} }
// a.icon:hover {
// background: #27AB9D;
// color: #fff;
// }
// a.icon:active {
// background: #229185;
// color: #fff;
// }
} }
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
name: 'dtSpan', name: 'dtSpan',
data() { data() {
return { return {
date:"33333" date:""
} }
}, },
props: { props: {
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
color: { color: {
type: String, type: String,
}, },
disalbed: { disalbe: {
// 0 启用 1 禁用 2权限不足 // 0 启用 1 禁用 2权限不足
type: Number, type: Number,
default: 0, default: 0,
...@@ -66,12 +66,15 @@ export default { ...@@ -66,12 +66,15 @@ export default {
} else if (this.oprate) { } else if (this.oprate) {
this.css = this.oprate; this.css = this.oprate;
} else if (this.type == "icon") { } else if (this.type == "icon") {
this.css = "icon"; this.css = "icon";
}
if(this.disalbe){
this.css="disable"
} }
}, },
methods: { methods: {
handler() { handler() {
if (this.disalbed == 0) { if (this.disalbe == 0) {
if (this.oprate == "delete" || this.oprate == "remove") { if (this.oprate == "delete" || this.oprate == "remove") {
this.$Modal.confirm({ this.$Modal.confirm({
title: this.title, title: this.title,
...@@ -83,10 +86,10 @@ export default { ...@@ -83,10 +86,10 @@ export default {
} else { } else {
this.$emit("click", event); this.$emit("click", event);
} }
}else if(this.disabled==1){ }else if(this.disalbe==1){
this.$Message.info("不能操作") this.$Message.warning("不能操作")
}else{ }else{
this.$Message.info("没有权限") this.$Message.warning("没有权限")
} }
}, },
}, },
......
<template>
<div>
<Select
:placeholder="placeholder"
v-model="name"
@on-change="change"
:multiple="multiple"
clearable
filterable
transfer
>
<Option
v-for="item in users"
:value="item.userId"
:key="item.userId"
:disabled="item.status==1"
>
<div class="user">
<State v-show="item.authority" code="project.group.authority" :value="item.authority" class="mr10"/> {{item.note}} <User :value="item.userId"/></span><Tag>{{item.role}}</Tag>
</div>
</Option>
</Select>
</div>
</template>
<script>
export default {
model: {
prop: "value",
event: "on-change",
},
data() {
return {
name: this.value,
users: this.data,
};
},
created() {
this.load();
},
props: {
value: [String, Number, Array],
placeholder: {
type: String,
default: "请选择人员",
},
multiple:{
type:Boolean,
default:false,
},
projectId:{
type:String
}
},
methods: {
load() {
var params={
// codition:[{fieldName: "groupId", fieldValue: "b9d6fa9e-e033-4a3e-9925-c1f4437d970c", conditionalType: "Equal"}]
codition:[{fieldName: "projectId", fieldValue: this.projectId, conditionalType: "Equal"}]
}
this.$api.post(`${material}/projectplan/list`, params).then(r=>{
this.users=r.result;
})
},
change(event) {
let name = "";
this.data.forEach((e) => {
if (e.id == event) {
name = e.label;
}
});
this.$emit("on-change", event, name);
},
// 加载人员
},
};
</script>
<style lang="less">
@import "../../assets/css/custom.less";
.userGroup {
}
</style>
...@@ -93,7 +93,6 @@ export default { ...@@ -93,7 +93,6 @@ export default {
click: () => this.view(params.row.id) 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: 'edit' oprate: 'edit'
...@@ -111,13 +110,10 @@ export default { ...@@ -111,13 +110,10 @@ export default {
} }
}, '删除'), }, '删除'),
h('op', { h('op', {
attrs: {
oprate: 'edit'
},
on: { on: {
click: () => this.openGroupUser(params.row) click: () => this.openGroupUser(params.row)
} }
}, '项目团队'), }, '成员'),
]) ])
} }
}, },
......
<template> <template>
<div class="detail"> <div class="detail">
<Row> <Row>
<Filed :span="12" :name="l('userId')"> <Filed :span="12" :name="l('userId')">
<User :value="entity.userId"></User> <User :value="entity.userId"></User>
</Filed> </Filed>
<Filed :span="12" :name="l('role')">{{entity.role}}</Filed> <Filed :span="12" :name="l('role')">
<Filed :span="12" :name="l('note')">{{entity.note}}</Filed> <State code="project.group.role" :value="entity.role" />
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed> </Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed> <Filed :span="12" :name="l('authority')">
<Filed :span="12" :name="l('creatorUserId')"> <State code="project.group.authority" :value="entity.authority" />
<User :value="entity.creatorUserId"></User> </Filed>
</Filed> <!-- <Filed :span="12" name="姓名">{{ entity.note }}</Filed> -->
<Filed :span="12" :name="l('status')">
<State code="project.group.status" :value="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> </Row>
</div>
</div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
export default { export default {
name: 'Add', name: "Add",
data() { data() {
return { return {
entity: {}, entity: {},
rules: { rules: {
name: [{ name: [
required: true, {
message: '必填', required: true,
trigger: 'blur' message: "必填",
}], trigger: "blur",
code: [{ },
required: true, ],
message: '必填', code: [
trigger: 'blur' {
}] 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");
});
}, },
props: { handleClose() {
eid: String this.$emit("on-close");
}, },
mounted() { l(key) {
if (this.eid != '' && this.eid != null) { key = "project_group_user" + "." + key;
this.load(this.eid); return this.$t(key);
}
}, },
methods: { },
load(v) { watch: {
Api.get({ eid(v) {
id: v if (v != "" && v != null) {
}).then(r => { this.load(v);
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> </script>
This diff is collapsed.
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
></Col> ></Col>
<Col :span="12" <Col :span="12"
><FormItem :label="l('executor')" prop="executor"> ><FormItem :label="l('executor')" prop="executor">
<UserSelect v-model="entity.executor" multiple></UserSelect> <UserGroup v-model="entity.executor" multiple :projectId="v.projectId"></UserGroup>
</FormItem> </FormItem>
</Col </Col
> >
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
></Col> ></Col>
<Col :span="12" <Col :span="12"
><FormItem :label="l('executor')" prop="executor"> ><FormItem :label="l('executor')" prop="executor">
<UserSelect v-model="entity.executor" multiple></UserSelect> <UserGroup v-model="entity.executor" multiple :projectId="entity.projectId"></UserGroup>
</FormItem> </FormItem>
</Col </Col
> >
......
...@@ -100,6 +100,7 @@ export default { ...@@ -100,6 +100,7 @@ export default {
type: "icon", type: "icon",
title: "派发", title: "派发",
oprate: "edit", oprate: "edit",
disalbe:1,
}, },
on: { click: () => this.copy(params.row.id) }, on: { click: () => this.copy(params.row.id) },
}, },
...@@ -117,7 +118,7 @@ export default { ...@@ -117,7 +118,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { icon: "md-eye", attrs: { icon: "md-create",
type: "icon", type: "icon",
title: "编辑", title: "编辑",
oprate: "edit", }, oprate: "edit", },
......
...@@ -33,13 +33,11 @@ ...@@ -33,13 +33,11 @@
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="task"> <Icon type="md-create" />成员 </a> <a @click="group"> <Icon type="md-create" />成员 </a>
&nbsp;
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="task"> <Icon type="md-create" />动态 </a> <a @click="task"> <Icon type="md-create" />动态 </a>
&nbsp;
<span>|</span> <span>|</span>
</li> </li>
</ul> </ul>
...@@ -105,6 +103,11 @@ export default { ...@@ -105,6 +103,11 @@ export default {
// this.curId = this.eid; // this.curId = this.eid;
this.title = "项目任务"; this.title = "项目任务";
// this.detail = () => import("./add"); // this.detail = () => import("./add");
},
group() {
// this.curId = this.eid;
this.title = "成员管理";
this.detail = () => import("../groupUser/index1");
}, },
l(key) { l(key) {
key = "project_main" + "." + key; key = "project_main" + "." + key;
......
...@@ -26,6 +26,7 @@ import Tools from '@/components/page/tool.vue' ...@@ -26,6 +26,7 @@ import Tools from '@/components/page/tool.vue'
import State from '@/components/page/state.vue' import State from '@/components/page/state.vue'
import Dictionary from '@/components/page/dictionary.vue' import Dictionary from '@/components/page/dictionary.vue'
import UserSelect from '@/components/page/userSelect.vue' import UserSelect from '@/components/page/userSelect.vue'
import UserGroup from '@/components/page/userGroup.vue'
import Materiel from '@/components/page/materiel.vue' import Materiel from '@/components/page/materiel.vue'
import RoleSelect from '@/components/page/roleSelect.vue' import RoleSelect from '@/components/page/roleSelect.vue'
import UserExamSelect from '@/components/page/userExamSelect.vue' import UserExamSelect from '@/components/page/userExamSelect.vue'
...@@ -129,6 +130,7 @@ Vue.component("WorkShopSelect", WorkShopSelect) ...@@ -129,6 +130,7 @@ Vue.component("WorkShopSelect", WorkShopSelect)
Vue.component("WorkShopName",WorkShopName) Vue.component("WorkShopName",WorkShopName)
Vue.component("workShopDefault", workShopDefault) Vue.component("workShopDefault", workShopDefault)
Vue.component("WorkShop", WorkShop) Vue.component("WorkShop", WorkShop)
Vue.component("UserGroup", UserGroup)
Vue.component("EquipSelect", EquipSelect) Vue.component("EquipSelect", EquipSelect)
Vue.component("EquipTypeSelect", EquipTypeSelect) Vue.component("EquipTypeSelect", EquipTypeSelect)
Vue.component("ResourceSelect", ResourceSelect) Vue.component("ResourceSelect", ResourceSelect)
......
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