Commit d33fbf21 authored by renjintao's avatar renjintao

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

parents 91adb124 142cbf51
<template> <template>
<div style="padding: 0;" class="excute"> <div style="padding: 0;" class="excute">
<DataGrid <DataGrid
style="margin-top:2px; margin-bottom: -20px;" style="margin-top:2px; margin-bottom: -5px;"
:columns="columns" :columns="columns"
ref="grid" ref="grid"
:easy="false" :easy="false"
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
:set="false" :set="false"
:border="false" :border="false"
:data="data1" :data="data1"
:page="false"
:height="gridHeight" :height="gridHeight"
:page="false"
:size="size" :size="size"
></DataGrid> ></DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800"> <Modal v-model="editModal" title="编辑" footer-hide width="800">
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
insertlModal: false, insertlModal: false,
rowIndex: null, rowIndex: null,
curId: 0, curId: 0,
gridHeight: 50, gridHeight: 150,
size: "small", size: "small",
columns: [ columns: [
{ title: " ", width: 130 }, { title: " ", width: 130 },
......
...@@ -28,13 +28,17 @@ ...@@ -28,13 +28,17 @@
<Icon type="md-git-compare" /> <Icon type="md-git-compare" />
</a> </a>
<DropdownMenu slot="list" style="text-align: center;"> <DropdownMenu slot="list" style="text-align: center;">
<DropdownItem v-for="li in items" :key="li.value" v-dragging="{ item: li, list: items}"> <DropdownItem
v-for="li in items"
:key="li.value"
v-dragging="{ item: li, list: items}"
>
<a href="#"> <a href="#">
<Icon type="md-apps" /> <Icon type="md-apps" />
</a> </a>
<span>{{li.name}}</span> <span>{{li.name}}</span>
</DropdownItem> </DropdownItem>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
</div> </div>
<div class="slider"> <div class="slider">
...@@ -111,7 +115,7 @@ ...@@ -111,7 +115,7 @@
<span slot="close"></span> <span slot="close"></span>
</i-switch> </i-switch>
</FormItem> </FormItem>
<FormItem :label="l('discrete_percent')" prop="discrete_percent"> <FormItem :label="l('discrete_percent')" prop="discrete_percent">
<Slider <Slider
v-model="entity.discrete_percent" v-model="entity.discrete_percent"
:step="1" :step="1"
...@@ -126,10 +130,10 @@ ...@@ -126,10 +130,10 @@
:disabled="count==0" :disabled="count==0"
:min="1" :min="1"
:max="count==0?1:count" :max="count==0?1:count"
@on-change="setDiscrete" @on-change="setDiscrete"
></InputNumber> ></InputNumber>
<!-- <span>{{count}}</span> --> <!-- <span>{{count}}</span> -->
</FormItem> </FormItem>
</div> </div>
</Col> </Col>
</Row> </Row>
...@@ -145,7 +149,12 @@ import Api from "./api"; ...@@ -145,7 +149,12 @@ import Api from "./api";
export default { export default {
data() { data() {
return { return {
items:[{name:"是否多台",value:"multiple"},{name:"转序规则",value:"planState"},{name:"加班策略",value:"over"},{name:"是否离散",value:"dis"}], items: [
{ name: "是否多台", value: "multiple" },
{ name: "转序规则", value: "planState" },
{ name: "加班策略", value: "over" },
{ name: "是否离散", value: "dis" }
],
entity: { entity: {
partTaskPk: 0, partTaskPk: 0,
opTaskPk: 0, opTaskPk: 0,
...@@ -158,10 +167,10 @@ export default { ...@@ -158,10 +167,10 @@ export default {
overTime: "不加班", //"六日加班", 不加班 加班 overTime: "不加班", //"六日加班", 不加班 加班
efficiencyValue: 11, // 效率系数, 必须大于 0 efficiencyValue: 11, // 效率系数, 必须大于 0
shopId: -1, shopId: -1,
dis:false, dis: false,
isDiscrete: "否",//是否离散 是否 isDiscrete: "否", //是否离散 是否
discrete: 1, //离散数值 必须大于 1 discrete: 1, //离散数值 必须大于 1
discrete_percent:0, discrete_percent: 0,
multiple: false, multiple: false,
multipleEquip: "否", //"是否多台安排设备", 否 是 multipleEquip: "否", //"是否多台安排设备", 否 是
multipleCount: 1, //多台数量 multipleCount: 1, //多台数量
...@@ -235,12 +244,12 @@ export default { ...@@ -235,12 +244,12 @@ export default {
this.apsGet(); //获取参数级别和转序等的关系 this.apsGet(); //获取参数级别和转序等的关系
}, },
mounted() { mounted() {
this.$dragging.$on('dragged', ({ value }) => { this.$dragging.$on("dragged", ({ value }) => {
localStorage.setItem("apsitems",JSON.stringify(value.list)); localStorage.setItem("apsitems", JSON.stringify(value.list));
}) });
var items=localStorage.getItem("apsitems"); var items = localStorage.getItem("apsitems");
if(items){ if (items) {
this.items=JSON.parse(items); this.items = JSON.parse(items);
} }
}, },
methods: { methods: {
...@@ -264,13 +273,13 @@ export default { ...@@ -264,13 +273,13 @@ export default {
}); });
}, },
setParameter(v) { setParameter(v) {
this.entity.multiple=false; this.entity.multiple = false;
this.entity.planState=false; this.entity.planState = false;
this.entity.over=false; this.entity.over = false;
this.entity.dis=false; this.entity.dis = false;
for(var i=0;i<v;i++){ for (var i = 0; i < v; i++) {
this.entity[this.items[i].value]=true; this.entity[this.items[i].value] = true;
} }
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
...@@ -284,10 +293,10 @@ export default { ...@@ -284,10 +293,10 @@ export default {
this.entity.flog = 1; this.entity.flog = 1;
return; return;
} }
if(this.entity.multipleEquipPks){ if (this.entity.multipleEquipPks) {
this.entity.multipleEquipIds = this.entity.multipleEquipPks.join(); this.entity.multipleEquipIds = this.entity.multipleEquipPks.join();
} }
// //
this.entity.planMethod = !this.entity.planState ? "重叠" : "平行"; this.entity.planMethod = !this.entity.planState ? "重叠" : "平行";
this.entity.overTime = !this.entity.over ? "不加班" : "加班"; this.entity.overTime = !this.entity.over ? "不加班" : "加班";
this.entity.isDiscrete = this.entity.dis ? "是" : "否"; this.entity.isDiscrete = this.entity.dis ? "是" : "否";
...@@ -314,13 +323,14 @@ export default { ...@@ -314,13 +323,14 @@ export default {
let vkey = "mes_op_task_plan_simulate" + "." + key; let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
}, },
setPercent(v){ setPercent(v) {
this.entity.discrete=Math.round(((this.count-1)*v-this.count)/100); this.entity.discrete = Math.round(
((this.count - 1) * v - this.count) / 100
);
}, },
setDiscrete(v){ setDiscrete(v) {
this.entity.discrete_percent=( this.entity.discrete_percent =
(100 * this.count - 100 * this.entity.discrete) / (this.count - 1) (100 * this.count - 100 * this.entity.discrete) / (this.count - 1);
);
} }
}, },
computed: { computed: {
...@@ -346,36 +356,38 @@ export default { ...@@ -346,36 +356,38 @@ export default {
}, },
opTaskPk(v, n) { opTaskPk(v, n) {
this.entity.opTaskPk = v; this.entity.opTaskPk = v;
if(v>0){ if (v > 0) {
console.log("detail",this.row); console.log("detail", this.row);
let entity={ let entity = {
partTaskPk: this.row.part_task_pk, partTaskPk: this.row.part_task_pk,
opTaskPk: this.row.op_task_pk, opTaskPk: this.row.op_task_pk,
taskSeq: this.row.task_seq, taskSeq: this.row.task_seq,
flog: 0, //参数应用范围 flog: 0, //参数应用范围
calId: -1, calId: parseInt(this.row.cal_id),
planState: this.row.plan_method=="平行", planState: this.row.plan_method == "平行",
planMethod: this.row.plan_method, // 平行 重叠 planMethod: this.row.plan_method, // 平行 重叠
over: this.row.over_time=="加班", over: this.row.over_time == "加班",
overTime: this.row.over_time, //"六日加班", 不加班 加班 overTime: this.row.over_time, //"六日加班", 不加班 加班
efficiencyValue:this.row.efficiency_value|1, // 效率系数, 必须大于 0 efficiencyValue: this.row.efficiency_value | 1, // 效率系数, 必须大于 0
shopId: -1, shopId: -1,
isDiscrete: this.row.isdiscrete=="是", dis: this.row.isdiscrete == "是",
discrete: this.row.discrete_value|1, //离散数值 必须大于 1 isDiscrete: this.row.isdiscrete ? "是" : "否", //是否离散 是否
multiple: this.row.multi_machine=="是", discrete: this.row.discrete_value | 1, //离散数值 必须大于 1
multipleEquip: this.row.multi_machine|"否", //"是否多台安排设备", 否 是 multiple: this.row.multi_machine == "是",
multipleEquip: this.row.multi_machine | "否", //"是否多台安排设备", 否 是
multipleCount: 1, //多台数量 multipleCount: 1, //多台数量
multipleEquipPks: [], multipleEquipPks: [],
multipleEquipIds: "", //"设备id", 用英文逗号分隔 multipleEquipIds: "" //"设备id", 用英文逗号分隔
} };
this.entity=entity this.entity = entity;
console.warn("detail", this.entity, this.row);
} }
this.entity.taskSeq = this.taskSeq; this.entity.taskSeq = this.taskSeq;
}, },
count(v, n) { count(v, n) {
this.entity.discrete = 1; this.entity.discrete = 1;
}, }
} }
}; };
</script> </script>
......
<template> <template>
<div> <div>
<div id="myChart" style="width:380px;height:300px;margin:0 auto;top: 0px;"></div> <div id="myChart" style="width:380px;height:400px;margin:0 auto;top: 30px;"></div>
</div> </div>
</template> </template>
<script> <script>
......
...@@ -118,9 +118,7 @@ export default { ...@@ -118,9 +118,7 @@ export default {
} }
}, },
downUrl: fileUrlDown, downUrl: fileUrlDown,
columns: { columns: [],
count:7,
},
comondata:[ comondata:[
{ {
productName: "受电弓", productName: "受电弓",
......
.new_body{
&{
background: #fff;
}
}
.set_card{ .set_card{
padding: 12px 30px 0; padding: 12px 30px 0;
.set_card_box{ .set_card_box{
...@@ -18,6 +23,7 @@ ...@@ -18,6 +23,7 @@
width: 150px; width: 150px;
height: 120px; height: 120px;
text-align: center; text-align: center;
margin: 0 auto;
} }
.statu_box{ .statu_box{
line-height: 30px; line-height: 30px;
...@@ -32,11 +38,11 @@ ...@@ -32,11 +38,11 @@
margin: 0 10px 0 0; margin: 0 10px 0 0;
} }
.set_masage{ .set_masage{
min-height: 125px; height: 125px;
line-height: 25px; line-height: 25px;
.time_bg{ .time_bg{
background: #267feb49; background: #267feb49;
line-height: 34px; margin: 0 auto;
width: 160px; width: 160px;
text-align: center; text-align: center;
border-radius: 3px; border-radius: 3px;
...@@ -44,8 +50,13 @@ ...@@ -44,8 +50,13 @@
} }
.set_masage02{ .set_masage02{
line-height: 35px; line-height: 35px;
height: 144px;
text-align: center;
} }
} }
.echarts02{
height: 462px;
}
} }
} }
#echarts{ #echarts{
...@@ -58,7 +69,7 @@ ...@@ -58,7 +69,7 @@
.tips_item{ .tips_item{
background: #eff1f7; background: #eff1f7;
margin: 20px; margin: 20px;
line-height: 38px; line-height: 58px;
padding: 0 20px; padding: 0 20px;
.item_top{ .item_top{
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
@import "./mnc.less"; @import "./mnc.less";
</style> </style>
<template> <template>
<div> <div class="new_body">
<a class="back_href" @click="goView"> <a class="back_href" @click="goView">
<Icon type="ios-undo-outline" size="24" />返回设备监控 <Icon type="ios-undo-outline" size="24" />返回设备监控
</a> </a>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<p class="set_top">设备状态</p> <p class="set_top">设备状态</p>
<div class="set_card_body"> <div class="set_card_body">
<Row> <Row>
<Col span="9"> <Col span="24">
<div class="set_img statu_box"> <div class="set_img statu_box">
<img v-if="formData.statu=='关机'" src="../image/guan.png" alt=""> <img v-if="formData.statu=='关机'" src="../image/guan.png" alt="">
<img v-else-if="formData.statu=='空闲'" src="../image/kong.png" alt=""> <img v-else-if="formData.statu=='空闲'" src="../image/kong.png" alt="">
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<p>{{formData.statu}}</p> <p>{{formData.statu}}</p>
</div> </div>
</Col> </Col>
<Col span="15"> <Col span="24">
<div class="set_masage set_masage02"> <div class="set_masage set_masage02">
<p>当前状态开始时间:</p> <p>当前状态开始时间:</p>
<p class="time_bg">11:45:05</p> <p class="time_bg">11:45:05</p>
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
</div> </div>
<div class="set_card_box"> <div class="set_card_box">
<p class="set_top">加工状态统计</p> <p class="set_top">加工状态统计</p>
<div class="center"> <div class="center echarts02">
<Echart2 ></Echart2> <Echart2 ></Echart2>
</div> </div>
</div> </div>
......
This diff is collapsed.
...@@ -37,7 +37,6 @@ export const actions = { ...@@ -37,7 +37,6 @@ export const actions = {
// token 代表用户当前登录状态 建议在网络请求中携带 token // token 代表用户当前登录状态 建议在网络请求中携带 token
// 如有必要 token 需要定时更新,默认保存一天,可在 setting.js 中修改 // 如有必要 token 需要定时更新,默认保存一天,可在 setting.js 中修改
// 如果你的 token 不是通过 cookie 携带,而是普通字段,也可视情况存储在 localStorage // 如果你的 token 不是通过 cookie 携带,而是普通字段,也可视情况存储在 localStorage
console.warn(res);
if (res.result) { if (res.result) {
util.cookies.set('uuid', res.result.userId); util.cookies.set('uuid', res.result.userId);
......
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