Commit efb1b8f4 authored by 仇晓婷's avatar 仇晓婷

排产结果

parent 673cc4d0
...@@ -182,7 +182,7 @@ const defaultStyle = { ...@@ -182,7 +182,7 @@ const defaultStyle = {
}; };
const defaultOptions = { const defaultOptions = {
title: { title: {
label: "任务甘特图", // label: "任务甘特图",
html: false html: false
}, },
locale: { locale: {
......
...@@ -27,20 +27,40 @@ ...@@ -27,20 +27,40 @@
<span>参数应用:{{li.routing_version}}</span> <span>参数应用:{{li.routing_version}}</span>
</div> </div>
</div> </div>
</Sider> </Sider>
<Content> <Content>
<h4 :text="title">{{title}}</h4> <Row class="i-row">
<a href="#" @click="comeBlck" class="black">返回</a> <Col span="2" v-if="blacks">
<a href="#" @click="gantChart" class="gant">甘特图</a> <h4 :text="title">{{title}}</h4>
</Col>
<Col span="10">
<a href="#" @click="comeBlck" class="black">返回</a>
</Col>
<Col span="10" style="text-align: right;">
<a href="#" @click="gantChart" class="gant">甘特图</a>
</Col>
</Row>
<component :is="detail" :eid="id" /> <component :is="detail" :eid="id" />
</Content> </Content>
</Layout> </Layout>
<div class="footer" v-if="showFooter">
<span>已选:{{total}}</span>&nbsp;&nbsp;&nbsp;
<Button type="primary" @click="submit">方案对比</Button>&nbsp;
<Button type="default" @click="cancel">取消</Button>
</div>
<Modal v-model="modal1Gant" fullscreen title="甘特图" footer-hide>
<Gantt />
</Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Gantt from "./gantt";
export default { export default {
components: {
Gantt
},
data() { data() {
return { return {
curId: null, curId: null,
...@@ -50,7 +70,11 @@ export default { ...@@ -50,7 +70,11 @@ export default {
name: "name1", name: "name1",
id: null, id: null,
contrastList: [], contrastList: [],
title: "" title: "",
modal1Gant: false,
showFooter: false,
total: 0,
blacks: false
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -69,7 +93,6 @@ export default { ...@@ -69,7 +93,6 @@ export default {
this.list.map(u => { this.list.map(u => {
u.checked = false; u.checked = false;
}); });
console.log(this.list);
} }
}) })
.catch(error => { .catch(error => {
...@@ -77,6 +100,7 @@ export default { ...@@ -77,6 +100,7 @@ export default {
}); });
}, },
listData(id, index) { listData(id, index) {
this.blacks = true;
this.detail = () => import("./result"); this.detail = () => import("./result");
this.isactive = index; this.isactive = index;
this.id = id; this.id = id;
...@@ -124,9 +148,12 @@ export default { ...@@ -124,9 +148,12 @@ export default {
}); });
}, },
//甘特图 //甘特图
gantChart() {}, gantChart() {
this.modal1Gant = true;
},
changeCheck(item) { changeCheck(item) {
this.isactive = null; this.isactive = null;
this.blacks = true;
if (item.checked == true) { if (item.checked == true) {
this.contrastList.push(item.schedule_Id); this.contrastList.push(item.schedule_Id);
} else if (item.checked == false) { } else if (item.checked == false) {
...@@ -136,9 +163,36 @@ export default { ...@@ -136,9 +163,36 @@ export default {
} }
} }
if (this.contrastList.length > 1) { if (this.contrastList.length > 1) {
this.showFooter = true;
}
this.total = this.contrastList.length;
if (this.total == 0) {
this.showFooter = false;
}
},
submit() {
if (this.total >= 2) {
this.detail = () => import("./compare"); this.detail = () => import("./compare");
this.title = "排产方案比对"; this.title = "排产方案比对";
this.list.map(u => {
if ((u.checked = true)) {
u.checked = false;
}
});
this.contrastList = [];
this.showFooter = false;
} else {
this.$Message.error("请选择大于等于2项方案进去比对");
} }
},
cancel() {
this.showFooter = false;
this.list.map(u => {
if ((u.checked = true)) {
u.checked = false;
}
});
this.contrastList = [];
} }
} }
}; };
......
...@@ -68,22 +68,26 @@ ...@@ -68,22 +68,26 @@
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15); box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 88vh; height: 88vh;
overflow: auto; overflow: auto;
position: relative;
.black { .i-row {
position: absolute; height: 45px;
top: 12px; line-height: 45px;
left: 120px; border-bottom: 1px solid #e4e6ed;
margin-bottom: 15px;
padding-left: 10px;
.ivu-col {
text-align: left;
}
} }
.black:hover { .black:hover {
font-weight: bold; font-weight: bold;
} }
.gant { .gant {
position: absolute; margin-right: -20px;
top: 15px;
right: 95px;
} }
.gant:hover { .gant:hover {
...@@ -98,10 +102,22 @@ ...@@ -98,10 +102,22 @@
.btn { .btn {
float: right; float: right;
margin-top: -52px; margin-top: -54px;
margin-right: 15px; margin-right: 15px;
} }
} }
.footer {
width: 100%;
position: absolute;
left: 0;
bottom: 0;
height: 60px;
line-height: 60px;
background: rgba(0, 0, 0, 0.6);
color: #fff;
padding-left: 50px;
}
} }
.compare { .compare {
......
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