Commit 9dc65f96 authored by 仇晓婷's avatar 仇晓婷

项目管理

parent 6b5b68d7
...@@ -155,12 +155,12 @@ export default { ...@@ -155,12 +155,12 @@ export default {
picture: "", picture: "",
attachment: "", attachment: "",
phase: null, phase: null,
startDate: null, startDate: "",
endDate: null, endDate: "",
businessUnits: "", businessUnits: "",
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], title: [{ required: true, message: "必填", trigger: "blur" }],
}, },
parmsName: "app=material&eid=1&name=ProjectMain", parmsName: "app=material&eid=1&name=ProjectMain",
parms: { parms: {
...@@ -221,6 +221,8 @@ export default { ...@@ -221,6 +221,8 @@ export default {
this.entity.id = 0; this.entity.id = 0;
}); });
}, },
//时间相关end
l(key) { l(key) {
key = "project_main" + "." + key; key = "project_main" + "." + key;
return this.$t(key); return this.$t(key);
......
<template> <template>
<div class="detail"> <div class="detail">
<Row>
<Row> <Filed :span="12" :name="l('creationTime')">{{
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed> entity.creationTime
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed> }}</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed> <Filed :span="12" :name="l('creatorUserId')">
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed> <User :value="entity.creatorUserId" />
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed> </Filed>
<Filed :span="12" :name="l('deletionTime')">{{entity.deletionTime}}</Filed> <!-- <Filed :span="12" :name="l('lastModificationTime')">{{
<Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed> entity.lastModificationTime
<Filed :span="12" :name="l('title')">{{entity.title}}</Filed> }}</Filed>
<Filed :span="24" :name="l('note')">{{entity.note}}</Filed> <Filed :span="12" :name="l('lastModifierUserId')">{{
<Filed :span="12" :name="l('state')">{{entity.state}}</Filed> entity.lastModifierUserId
<Filed :span="12" :name="l('type')">{{entity.type}}</Filed> }}</Filed>
<Filed :span="12" :name="l('picture')">{{entity.picture}}</Filed> <Filed :span="12" :name="l('isDeleted')">{{ entity.isDeleted }}</Filed>
<Filed :span="12" :name="l('attachment')">{{entity.attachment}}</Filed> <Filed :span="12" :name="l('deletionTime')">{{
<Filed :span="12" :name="l('phase')">{{entity.phase}}</Filed> entity.deletionTime
<Filed :span="12" :name="l('startDate')">{{entity.startDate}}</Filed> }}</Filed>
<Filed :span="12" :name="l('endDate')">{{entity.endDate}}</Filed> <Filed :span="12" :name="l('deleterUserId')">{{
<Filed :span="12" :name="l('businessUnits')">{{entity.businessUnits}}</Filed> entity.deleterUserId
</Row> }}</Filed> -->
<Filed :span="12" :name="l('title')">{{ entity.title }}</Filed>
</div> <Filed :span="12" :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('startDate')">{{ entity.startDate }}</Filed>
<Filed :span="12" :name="l('endDate')">{{ entity.endDate }}</Filed>
<!-- <Filed :span="12" :name="l('businessUnits')">{{
entity.businessUnits
}}</Filed> -->
<Filed :span="12" :name="l('type')">
<state code="project.main.type" :value="entity.type" />
</Filed>
<Filed :span="12" :name="l('picture')">{{ entity.picture }}</Filed>
<Filed :span="12" :name="l('attachment')">{{ entity.attachment }}</Filed>
<Filed :span="24" :name="l('note')">{{ entity.note }}</Filed>
</Row>
</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: [{ required: true, message: '必填', trigger: 'blur' }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: '必填', trigger: 'blur' }] code: [{ required: true, message: "必填", trigger: "blur" }],
} },
} };
}, },
props: { props: ["eid"],
eid: Number mounted() {
}, this.load(this.eid);
mounted() { },
if (this.eid > 0) { methods: {
this.load(this.eid); load(v) {
} Api.get({ id: v }).then((r) => {
}, this.entity = r.result;
methods: { this.entity.type = r.result.type+'';
load(v) { this.entity.state = r.result.state+'';
Api.get({ id: v }).then(r => { this.$emit("on-load");
this.entity = r.result; });
this.$emit('on-load') },
}) handleClose() {
}, this.$emit("on-close");
handleClose() { },
this.$emit('on-close') l(key) {
}, key = "project_main" + "." + key;
l(key) { return this.$t(key);
key = "project_main" + "." + key; },
return this.$t(key) },
watch: {
eid(v) {
if (v) {
this.load(v);
} }
}, },
watch: { },
eid(v) { };
if (v > 0) {
this.load(v);
}
}
}
}
</script> </script>
\ No newline at end of file
This diff is collapsed.
<template> <template>
<div> <div class="project">
<DataGrid <DataGrid
:columns="columns" :columns="columns"
ref="grid" ref="grid"
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
><Input ><Input
placeholder="请输入关键字标题" placeholder="请输入关键字标题"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
clearable
/> />
</FormItem> </FormItem>
<FormItem <FormItem
...@@ -35,15 +36,29 @@ ...@@ -35,15 +36,29 @@
<template slot="card" slot-scope="{ row }"> <template slot="card" slot-scope="{ row }">
<div class="body-card"> <div class="body-card">
<Row class="title-i"> <Row class="title-i">
<Col :span="12"> <Col :span="10" class="title-l">
<Ellipsis :text="row.name" :length="18" tooltip /> <Ellipsis :text="row.title" :length="18" tooltip />
</Col>
<Col :span="10" class="btn-click">
<!-- <Ellipsis :text="row.code" :length="18" tooltip/> -->
</Col>
<Col :span="4">
<div class="statuBg" :style="tdStyle(row.state)"></div>
<div class="boxTitle">
<div class="text">
<state
code="project.main.state"
ref="state"
:value="row.state"
type="text"
:color="false"
></state>
</div>
</div>
</Col> </Col>
<Col :span="12" class="btn-click">
<Ellipsis :text="row.code" :length="18" tooltip
/></Col>
</Row> </Row>
<Row class="row-down" :gutter="10"> <Row class="row-down" :gutter="10">
<Col span="7"> <Col span="10">
<div class="img-i"> <div class="img-i">
<!-- <img :src="downUrl + row.img" v-if="row.img" /> --> <!-- <img :src="downUrl + row.img" v-if="row.img" /> -->
<Pictrue :src="row.img" v-if="row.img" /> <Pictrue :src="row.img" v-if="row.img" />
...@@ -55,24 +70,27 @@ ...@@ -55,24 +70,27 @@
/> />
</div> </div>
</Col> </Col>
<Col span="17"> <Col span="14">
<div class="c"> <div class="c">
<div>版本:{{ row.version }}</div> <div>创建人: <User :value="row.creatorUserId" /></div>
<div> <div>
状态: 创建时间:{{ row.creationTime }}
<state code="word.document.status" :value="row.status" /> <!-- <state code="word.document.status" :value="row.status" /> -->
</div> </div>
<!-- <div> <div>开始时间:{{ row.startDate }}</div>
创建人: <div>结束时间:{{ row.endDate }}</div>
<User :value="row.creatorUserId" />
</div>-->
<div class="shuo-ming"> <div class="shuo-ming">
<span>文档说明</span> <span>备注</span>
<Ellipsis :text="row.description" :length="12" tooltip /> <Ellipsis :text="row.note" :length="12" tooltip />
</div> </div>
</div> </div>
</Col>
</Row>
<Row class="bottom-b">
<Col span="6"
><state code="project.main.type" :value="row.type"
/></Col>
<Col span="18">
<div class="a-icon"> <div class="a-icon">
<a @click="edit(row.id)"> <Icon type="md-create" />编辑 </a <a @click="edit(row.id)"> <Icon type="md-create" />编辑 </a
>&nbsp; >&nbsp;
...@@ -177,55 +195,100 @@ export default { ...@@ -177,55 +195,100 @@ export default {
{ {
key: "state", key: "state",
title: this.l("state"), title: this.l("state"),
align: "left", align: "center",
high: true, high: true,
code: "mes.project_main.State", code: "project.main.state",
}, },
{ {
key: "type", key: "type",
title: this.l("type"), title: this.l("type"),
align: "left", align: "center",
high: true, high: true,
code: "mes.project_main.Type", code: "project.main.type",
}, },
{ key: "picture", title: this.l("picture"), align: "left", high: true },
{ {
key: "attachment", key: "picture",
title: this.l("attachment"), title: this.l("picture"),
align: "left", align: "center",
high: true, high: true,
render: (h, params) => {
return h(
"a",
{
on: { click: () => this.viewImg(params.row) },
},
"查看图片"
);
},
}, },
{ {
key: "phase", key: "attachment",
title: this.l("phase"), title: this.l("attachment"),
align: "left", align: "center",
high: true, high: true,
code: "mes.project_main.Phase", render: (h, params) => {
return h(
"a",
{
on: { click: () => this.view(params.row.id) },
},
"查看附件"
);
},
}, },
// {
// key: "phase",
// title: this.l("phase"),
// align: "left",
// high: true,
// code: "mes.project_main.Phase",
// },
{ {
key: "startDate", key: "startDate",
title: this.l("startDate"), title: this.l("startDate"),
align: "left", align: "center",
high: true, high: true,
render: (h, params) => {
return h(
"span",
params.row.startDate
? this.sliceStr(params.row.startDate + " ", 0, 10)
: ""
);
},
}, },
{ key: "endDate", title: this.l("endDate"), align: "left", high: true },
{ {
key: "businessUnits", key: "endDate",
title: this.l("businessUnits"), title: this.l("endDate"),
align: "left", align: "center",
high: true, high: true,
render: (h, params) => {
return h(
"span",
params.row.endDate
? this.sliceStr(params.row.endDate + " ", 0, 10)
: ""
);
},
}, },
// {
// key: "businessUnits",
// title: this.l("businessUnits"),
// align: "left",
// high: true,
// },
{ {
key: "creationTime", key: "creationTime",
title: this.l("creationTime"), title: this.l("creationTime"),
align: "left", align: "center",
hide: false, hide: false,
}, },
{ {
key: "creatorUserId", key: "creatorUserId",
title: this.l("creatorUserId"), title: this.l("creatorUserId"),
align: "left", align: "center",
high: true, high: true,
type: "user",
}, },
{ {
title: "操作", title: "操作",
...@@ -275,6 +338,19 @@ export default { ...@@ -275,6 +338,19 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
tdStyle(val) {
//动态根据状态值加载状态值对应的颜色
let temDic = this.$store.getters.dictionaryByKey("taskList.status");
let temColor = "#666";
temDic.forEach((data) => {
if (Number(data.code) == val) {
temColor = data.color;
}
});
var style = {};
style["border-top"] = " solid 38px " + temColor;
return style;
},
changeShwo() { changeShwo() {
//显示模式切换 //显示模式切换
if (this.typeInfo == "card") { if (this.typeInfo == "card") {
...@@ -287,6 +363,10 @@ export default { ...@@ -287,6 +363,10 @@ export default {
this.titleInfo = "卡片模式"; this.titleInfo = "卡片模式";
} }
}, },
viewImg(row) {
console.log(row);
window.open(fileUrlDown + row.picture, "_blank");
},
ok() { ok() {
this.$refs.grid.load(); this.$refs.grid.load();
this.modal = false; this.modal = false;
...@@ -302,6 +382,7 @@ export default { ...@@ -302,6 +382,7 @@ export default {
this.modal = true; this.modal = true;
}, },
copy(id) { copy(id) {
console.log(id);
this.curId = id; this.curId = id;
this.title = "克隆"; this.title = "克隆";
this.detail = () => import("./add"); this.detail = () => import("./add");
...@@ -331,6 +412,10 @@ export default { ...@@ -331,6 +412,10 @@ export default {
this.curId = 0; this.curId = 0;
this.modal = false; this.modal = false;
}, },
//截取字符串
sliceStr(str, lenS, lenE) {
return str.slice(lenS, lenE);
},
l(key) { l(key) {
let vkey = "project_main" + "." + key; let vkey = "project_main" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
...@@ -339,4 +424,89 @@ export default { ...@@ -339,4 +424,89 @@ export default {
}; };
</script> </script>
<style lang="less"> <style lang="less">
.project {
.body-card {
border: 1px solid rgba(38, 128, 235, 1);
margin: 5px 0;
border-radius: 4px;
height: 280px;
.title-i {
border-bottom: 1px solid #2680eb;
// padding: 0 10px;
height: 35px;
line-height: 35px;
background: rgba(38, 128, 235, 0.2);
color: #2680eb;
.title-l {
padding-left: 10px;
}
.btn-click {
text-align: right;
}
.statuBg {
height: 0px;
width: 0;
border-left: solid 50px transparent;
float: right;
margin-right: -1px;
}
.boxTitle {
color: white;
float: right;
margin-top: -40px;
/* Rotate div */
transform: rotate(37deg);
-ms-transform: rotate(37deg);
/* Internet Explorer */
-moz-transform: rotate(37deg);
/* Firefox */
-webkit-transform: rotate(37deg);
/* Safari 和 Chrome */
-o-transform: rotate(37deg);
/* Opera */
.text {
font-size: 8px;
font-weight: normal;
padding-right: 5px;
}
}
}
.row-down {
padding: 14px;
// height: 110px;
.img-i {
height: 170px;
width: 170px;
// img {
// width: 90px;
// height: 90px;
// }
}
.c {
padding-left: 14px;
height: 170px;
div {
height: 30px;
}
}
.shuo-ming {
display: -webkit-inline-box;
// display: inline-block;
}
}
.bottom-b {
line-height: 40px;
padding-left: 14px;
.a-icon {
text-align: right;
}
}
}
}
</style> </style>
\ No newline at end of file
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<Input <Input
placeholder="请输入文档名称/编号" placeholder="请输入文档名称/编号"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
clearable
/> />
</FormItem> </FormItem>
<FormItem> <FormItem>
...@@ -429,6 +430,7 @@ export default { ...@@ -429,6 +430,7 @@ export default {
} }
.shuo-ming { .shuo-ming {
display: -webkit-inline-box; display: -webkit-inline-box;
// display: inline-block;
} }
.a-icon { .a-icon {
text-align: right; text-align: right;
......
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