Commit 43b62683 authored by 仇晓婷's avatar 仇晓婷

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

parents b9611122 cb03fc46
...@@ -66,7 +66,6 @@ export default { ...@@ -66,7 +66,6 @@ export default {
props: { props: {
curId: { curId: {
type: String, type: String,
default: "",
}, },
}, },
created() { created() {
...@@ -93,9 +92,18 @@ export default { ...@@ -93,9 +92,18 @@ export default {
this.$api.post(`${material}/projectmain/list`, data).then((r) => { this.$api.post(`${material}/projectmain/list`, data).then((r) => {
if (r.result) { if (r.result) {
this.projectList = r.result; this.projectList = r.result;
this.downName = this.projectList[0].title; if (this.curId) {
this.curdId = this.projectList[0].id; this.projectList.map(u=>{
this.loadTree(this.projectList[0].id); if(u.id==this.curId){
this.downName = u.title;
}
})
} else {
this.downName = this.projectList[0].title;
this.curdId = this.projectList[0].id;
}
this.loadTree(this.curId);
} }
}); });
}, },
...@@ -221,17 +229,15 @@ export default { ...@@ -221,17 +229,15 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.tree-menu{ .tree-menu {
border: 1px solid #ddd; border: 1px solid #ddd;
.p-list { .p-list {
position: relative; position: relative;
}
} .icon-d {
.icon-d { position: absolute;
position: absolute; top: 0;
top: 0; right: 0;
right: 0; }
} }
}
</style> </style>
...@@ -104,9 +104,7 @@ ...@@ -104,9 +104,7 @@
<span class="ib" v-width="spaceWidth * item._level"></span> <span class="ib" v-width="spaceWidth * item._level"></span>
<a v-if="item._count > 0" class="expand" <a v-if="item._count > 0" class="expand"
><Icon :type="!item._expanded ? 'ios-add' : 'ios-remove'" /> </a ><Icon :type="!item._expanded ? 'ios-add' : 'ios-remove'" /> </a
><i v-else class="ms-tree-space"></i> {{ item._level }}v{{ ><i v-else class="ms-tree-space"></i>
item._count
}}:{{ show(item) }}
</span> </span>
<!-- 菜单名称、排序、请求地址 --> <!-- 菜单名称、排序、请求地址 -->
<label <label
......
<template> <template>
<Poptip placement="bottom-start" trigger="hover" width="240" transfer> <Poptip placement="bottom-start" trigger="hover" width="240" transfer>
<label v-if="mode=='text'" :class="css">{{ user.name }}</label> <label v-if="mode=='text'" :class="css">{{ user.name }}</label>
<Avatar v-else :style="{background:user.gender=='男'?'#1479D7':'red'}" <Avatar v-else :style="{background:user.gender=='男'?'#1479D7':'#f56a00'}"
:icon="user.gender=='男'?'md-person':'md-woman'" shape="square" :src="img">{{user.name}}</Avatar> :src="img">{{user.name}}</Avatar>
<div slot="content"> <div slot="content">
<Avatar v-if="user.face" size="large" :src="img"></Avatar> <Avatar v-if="user.face" size="large" :src="img"></Avatar>
<Avatar <Avatar
......
...@@ -17,12 +17,9 @@ ...@@ -17,12 +17,9 @@
:disabled="item.status == 0" :disabled="item.status == 0"
> >
<div class="user"> <div class="user">
<State <Icon v-if="item.authority==1" type="md-person" size="18" color="gold"/>
code="project.group.authority" <Icon v-if="item.authority==2" type="md-person" size="18" color="green"/>
:value="item.authority" <Icon v-if="item.authority==0" type="md-person" size="18" />
class="mr10"
type="tag"
/>
{{ item.note }} {{ item.note }}
<State <State
code="project.group.role" code="project.group.role"
......
...@@ -4,6 +4,9 @@ export default { ...@@ -4,6 +4,9 @@ export default {
paged(params){ paged(params){
return Api.post(`${material}/projectmain/paged`,params); return Api.post(`${material}/projectmain/paged`,params);
}, },
users(params){
return Api.post(`${material}/projectgroupuser/list`,params);
},
get(params){ get(params){
return Api.get(`${material}/projectmain/get`,params); return Api.get(`${material}/projectmain/get`,params);
}, },
......
<template> <template>
<div class=".detail-document"> <div class=".detail-document">
<div class="top-title"> <div class="top-title">
<div class="new-detail row-left"> <div class="new-detail row-left">
<Row> <Row>
<Filed :span="6" :name="l('title') + ':'">{{ entity.title }}</Filed> <Filed :span="6" :name="l('title') + ':'">{{ entity.title }}</Filed>
<Filed :span="6" :name="l('state') + ':'"> <Filed :span="6" :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('date') + ':'"> <Filed :span="12" :name="l('date') + ':'">
<DateRange v-model="entity"/> <DateRange v-model="entity" />
</Filed> </Filed>
<Filed :span="24" :name="l('users')+ ':'"> <Filed :span="24" :name="l('users') + ':'">
<User :value="1" mode="face"/> <User v-for="(u,i) in users" :value="u.userId" :key="u.userId" mode="text" class="mr10" />
<a><Avatar icon="md-add" size="24" /></a> <a @click="group"><Avatar icon="md-add" /></a>
</Filed> </Filed>
</Row> </Row>
</div> </div>
<ul> <ul>
<li> <li>
<a @click="details"> <a @click="details"> <Icon type="md-apps" size="18" />详情 </a>
<Icon type="ios-log-in" />详情 <span>|</span>
</a> </li>
&nbsp; <li>
<span>|</span> <a @click="template">
</li> <Icon
<li> type="md-git-network"
<a @click="template"> style="transform: rotate(180deg)"
<Icon type="ios-photos" />目录 size="18"
</a> />
&nbsp; 目录
<span>|</span> </a>
</li> &nbsp;
<li> <span>|</span>
<a @click="task"> </li>
<Icon type="md-create" />任务 <li>
</a> <a @click="task"> <Icon type="ios-list-box" size="18" />任务 </a>
&nbsp; &nbsp;
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="group"> <a @click="group"> <Icon type="ios-people" size="18" />成员 </a>
<Icon type="md-create" />成员 &nbsp;
</a> <span>|</span>
&nbsp; </li>
<span>|</span> <li>
</li> <a @click="log">
<li> <Icon type="md-notifications-outline" size="18" />动态
<a @click="log"> </a>
<Icon type="md-create" />动态 &nbsp;
</a> <span>|</span>
&nbsp; </li>
<span>|</span> </ul>
</li>
</ul>
</div> </div>
<div class="body-document"> <div class="body-document">
<h4 v-text="title"></h4> <h4 v-text="title"></h4>
<component v-bind:is="detail" :eid="eid" :data="entity"></component> <component v-bind:is="detail" :eid="eid" :data="entity"></component>
<!-- <keep-alive> <!-- <keep-alive>
</keep-alive> --> </keep-alive> -->
</div> </div>
</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 {
modal: false, modal: false,
title: "详细信息", title: "详细信息",
detail: null, detail: null,
curId: this.eid, curId: this.eid,
avatorPath: "", avatorPath: "",
entity: {}, entity: {},
rules: { users:[],
name: [{ rules: {
required: true, name: [
message: "必填", {
trigger: "blur" required: true,
}], message: "必填",
code: [{ trigger: "blur",
required: true, },
message: "必填", ],
trigger: "blur" code: [
}], {
}, required: true,
fileds: [], message: "必填",
parms: { trigger: "blur",
app: "material", },
eid: null, ],
name: "", },
field: "", fileds: [],
}, parms: {
}; app: "material",
}, eid: null,
props: ["eid"], name: "",
mounted() { field: "",
if (this.eid) { },
this.load(this.eid); };
} },
this.detail = () => import("./details"); props: ["eid"],
mounted() {
if (this.eid) {
this.load(this.eid);
}
this.detail = () => import("./details");
},
methods: {
load(v) {
Api.get({
id: v,
}).then((r) => {
this.entity = r.result;
// this.$emit("on-load");
});
this.loadUsers();
}, },
methods: {
load(v) {
Api.get({
id: v
}).then((r) => {
this.entity = r.result;
// this.$emit("on-load");
});
},
details() { details() {
this.title = "详细信息"; this.title = "详细信息";
this.detail = () => import("./details"); this.detail = () => import("./details");
}, },
template() { template() {
// this.curId = this.eid; // this.curId = this.eid;
this.title = "项目模板"; this.title = "项目模板";
this.detail = () => import("../plan"); this.detail = () => import("../plan");
}, },
task() { task() {
//this.curId = this.eid; //this.curId = this.eid;
this.title = "任务"; this.title = "任务";
this.detail = () => import("../task/index"); this.detail = () => import("../task/index");
// this.$router.push({ // this.$router.push({
// name: "project-task", // name: "project-task",
// params: { // params: {
// id: this.curId // id: this.curId
// } // }
// }); // });
},
group() {
this.title = "项目成员";
this.detail = () => import("../groupUser/list");
},
log() {
this.curId = this.eid;
this.title = "动态";
this.detail = () => import("../log/list");
},
l(key) {
key = "project_main" + "." + key;
return this.$t(key);
},
}, },
watch: { group() {
eid(v) { this.title = "项目成员";
if (v > 0) { this.detail = () => import("../groupUser/list");
this.load(v); },
} log() {
}, this.curId = this.eid;
this.title = "动态";
this.detail = () => import("../log/list");
},
l(key) {
key = "project_main" + "." + key;
return this.$t(key);
},
loadUsers() {
let params = {
conditions: [
{
fieldName: "projectId",
fieldValue: this.eid,
conditionalType: "Equal",
},
],
};
Api.users(params).then((r) => {
if (r.success) {
this.users = r.result;
}
});
}, },
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
}; };
</script> </script>
<style lang="less"> <style lang="less">
.top-title { .top-title {
// margin: 10px; // margin: 10px;
background: #fff; background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15); box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
position: relative; position: relative;
border-radius: 5px; border-radius: 5px;
.row-left { .row-left {
width: 1100px; width: 1100px;
} padding-bottom: 10px;
}
ul { ul {
display: -webkit-inline-box; display: -webkit-inline-box;
display: inline-box; display: inline-box;
position: absolute; position: absolute;
bottom: 5px; bottom: 5px;
right: 0px; right: 0px;
li { li {
width: 70px; width: 70px;
span { span {
color: #e0e0e0; color: #e0e0e0;
} }
}
} }
}
} }
.body-document { .body-document {
margin-top: 10px; margin-top: 10px;
background: #fff; background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15); box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
border-radius: 8px; border-radius: 8px;
min-height: 80vh; min-height: 80vh;
h4 { h4 {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
background: #515a6e; background: #515a6e;
padding: 0 10px; padding: 0 10px;
color: #f5f6fa; color: #f5f6fa;
border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
} }
.img-touxiang { .img-touxiang {
width: 230px; width: 230px;
height: 230px; height: 230px;
float: right; float: right;
margin-top: 10px; margin-top: 10px;
margin-right: 10px; margin-right: 10px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 5px; border-radius: 5px;
}
} }
}
.detail-d { .detail-d {
padding-left: 20px; padding-left: 20px;
.filed-d { .filed-d {
border-top: 1px solid #e0e0e0; border-top: 1px solid #e0e0e0;
}
} }
}
} }
.detail-document { .detail-document {
background-color: #f5f7f9 !important; background-color: #f5f7f9 !important;
} }
</style> </style>
...@@ -14,21 +14,21 @@ ...@@ -14,21 +14,21 @@
<Form ref="formInline" inline> <Form ref="formInline" inline>
<FormItem> <FormItem>
<div class="taskMenu"> <div class="taskMenu">
<Menu mode="horizontal" active-name="2" @on-select="onSelect"> <Menu mode="horizontal" active-name="1" @on-select="onSelect">
<MenuItem name="1"> <MenuItem name="1">
所有 所有
</MenuItem> </MenuItem>
<MenuItem name="2"> <MenuItem name="2">
未关闭 待确认
</MenuItem> </MenuItem>
<MenuItem name="3"> <MenuItem name="3">
指派给我 工作中
</MenuItem> </MenuItem>
<MenuItem name="4"> <MenuItem name="4">
由我参与 已完成
</MenuItem> </MenuItem>
<MenuItem name="5"> <MenuItem name="5">
延期 冻结
</MenuItem> </MenuItem>
<!-- <!--
<Submenu name="6"> <Submenu name="6">
......
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