Commit 2b519d93 authored by 仇晓婷's avatar 仇晓婷

项目管理

parent 052957f9
...@@ -33,8 +33,12 @@ ...@@ -33,8 +33,12 @@
<Filed :span="12" :name="l('type')"> <Filed :span="12" :name="l('type')">
<state code="project.main.type" :value="entity.type" /> <state code="project.main.type" :value="entity.type" />
</Filed> </Filed>
<Filed :span="12" :name="l('picture')">{{ entity.picture }}</Filed> <Filed :span="12" :name="l('picture')"
<Filed :span="12" :name="l('attachment')">{{ entity.attachment }}</Filed> ><a @click="imgClick(entity.picture)">查看图片</a></Filed
>
<Filed :span="12" :name="l('attachment')">
<files ref="refFile" :parms="parms" fileFormat :showList="false" />
</Filed>
<Filed :span="24" :name="l('note')">{{ entity.note }}</Filed> <Filed :span="24" :name="l('note')">{{ entity.note }}</Filed>
</Row> </Row>
</div> </div>
...@@ -50,6 +54,12 @@ export default { ...@@ -50,6 +54,12 @@ export default {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }], code: [{ required: true, message: "必填", trigger: "blur" }],
}, },
parms: {
app: "material",
eid: null,
name: "",
field: "",
},
}; };
}, },
props: ["eid"], props: ["eid"],
...@@ -57,11 +67,17 @@ export default { ...@@ -57,11 +67,17 @@ export default {
this.load(this.eid); this.load(this.eid);
}, },
methods: { methods: {
imgClick(img) {
window.open(fileUrlDown + img, "_blank");
},
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then((r) => {
this.entity = r.result; this.entity = r.result;
this.entity.type = r.result.type+''; this.entity.type = r.result.type + "";
this.entity.state = r.result.state+''; this.entity.state = r.result.state + "";
this.parms.eid = r.result.attachment;
this.$emit("on-load"); this.$emit("on-load");
}); });
}, },
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:conditions="easySearch" :conditions="easySearch"
:type="typeInfo" :type="typeInfo"
:span="6" :span="6"
:format="formatFun"
><template slot="easySearch" ><template slot="easySearch"
><Form ref="formInline" :model="easySearch" inline ><Form ref="formInline" :model="easySearch" inline
><FormItem prop="keys" ><FormItem prop="keys"
...@@ -34,11 +35,16 @@ ...@@ -34,11 +35,16 @@
></Button> ></Button>
</template> </template>
<template slot="card" slot-scope="{ row }"> <template slot="card" slot-scope="{ row }">
<div class="body-card"> <Card
class="body-card"
:style="row._checked ? 'border:1px solid #2680eb;' : ''"
>
<Row class="title-i"> <Row class="title-i">
<Col :span="10" class="title-l"> <Col :span="10" class="title-l">
<Checkbox v-model="row._checked"></Checkbox>
<Ellipsis :text="row.title" :length="18" tooltip /> <Ellipsis :text="row.title" :length="18" tooltip />
</Col> </Col>
<Col :span="10" class="btn-click"> <Col :span="10" class="btn-click">
<!-- <Ellipsis :text="row.code" :length="18" tooltip/> --> <!-- <Ellipsis :text="row.code" :length="18" tooltip/> -->
</Col> </Col>
...@@ -104,7 +110,7 @@ ...@@ -104,7 +110,7 @@
</div> </div>
</Col> </Col>
</Row> </Row>
</div> </Card>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
...@@ -131,6 +137,7 @@ export default { ...@@ -131,6 +137,7 @@ export default {
easySearch: { easySearch: {
keys: { op: "title", value: null }, keys: { op: "title", value: null },
}, },
// single: false,
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
...@@ -338,10 +345,17 @@ export default { ...@@ -338,10 +345,17 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
//格式化原始数据
formatFun(data) {
data.map((e) => {
return (e._checked = false);
});
return data;
},
tdStyle(val) { tdStyle(val) {
//动态根据状态值加载状态值对应的颜色 //动态根据状态值加载状态值对应的颜色 #19c919
let temDic = this.$store.getters.dictionaryByKey("taskList.status"); let temDic = this.$store.getters.dictionaryByKey("project.main.state");
let temColor = "#666"; let temColor = "#19c919";
temDic.forEach((data) => { temDic.forEach((data) => {
if (Number(data.code) == val) { if (Number(data.code) == val) {
temColor = data.color; temColor = data.color;
...@@ -425,21 +439,25 @@ export default { ...@@ -425,21 +439,25 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.project { .project {
.ivu-card-body {
padding: 0 !important;
}
.body-card { .body-card {
border: 1px solid rgba(38, 128, 235, 1); // border: 1px solid rgba(38, 128, 235, 1);
margin: 5px 0; margin: 5px 0;
border-radius: 4px; border-radius: 4px;
height: 280px; // height: 280px;
.title-i { .title-i {
border-bottom: 1px solid #2680eb; // border-bottom: 1px solid #2680eb;
// padding: 0 10px; // padding: 0 10px;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
background: rgba(38, 128, 235, 0.2); background: rgba(38, 128, 235, 0.2);
color: #2680eb; color: #2680eb;
padding-left: 10px;
.title-l { .title-l {
padding-left: 10px; display: -webkit-inline-box;
} }
.btn-click { .btn-click {
text-align: right; text-align: right;
...@@ -477,22 +495,18 @@ export default { ...@@ -477,22 +495,18 @@ export default {
} }
.row-down { .row-down {
padding: 14px; padding: 14px;
// height: 110px;
.img-i { .img-i {
height: 170px; height: 170px;
width: 170px; width: 170px;
// img {
// width: 90px;
// height: 90px;
// }
} }
.c { .c {
padding-left: 14px; padding-left: 14px;
height: 170px; height: 170px;
div { div {
height: 30px; height: 33px;
line-height: 33px;
} }
} }
.shuo-ming { .shuo-ming {
...@@ -501,8 +515,8 @@ export default { ...@@ -501,8 +515,8 @@ export default {
} }
} }
.bottom-b { .bottom-b {
line-height: 40px; // line-height: 40px;
padding-left: 14px; padding: 0 0 6px 14px;
.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