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

项目ok

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