Commit 35a08557 authored by 周远喜's avatar 周远喜

vk31

parent ebc06c43
<template>
<div style="padding: 0;" class="excute">
<DataGrid
style="margin-top: -25px; margin-bottom: -25px;"
style="margin-top:2px; margin-bottom: -20px;"
:columns="columns"
ref="grid"
:easy="false"
......
......@@ -11,11 +11,10 @@
@on-selection-change="onSelect"
:batch="true"
:border="true"
:easy="false"
:easy="true"
>
<template slot="easySearch"></template>
<template slot="searchBack">
<Select
<template slot="easySearch">
<div><Select
placeholder="选择排序优先级"
v-model="tempValue"
style="width: 150px;"
......@@ -29,9 +28,17 @@
</a>
<a style="font-weight: bold;" @click="openDuration">
<Icon type="md-create" size="14" />&nbsp;修改外协工期
</a>&nbsp;&nbsp;&nbsp;&nbsp;
<Select placeholder="选择历史方案" style="width: 150px;"></Select>&nbsp;&nbsp;&nbsp;&nbsp;
<DatePicker
</a>
<Select placeholder="选择历史方案" style="width: 150px;"></Select>
</div>
</template>
<template slot="searchBack">
</template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<DatePicker
type="date"
placeholder="设置基准日期"
style="width: 150px;"
......@@ -41,11 +48,6 @@
<a style="font-weight: bold;" @click="openAddModel(1)">
<Icon type="ios-options" size="14" />&nbsp;工序参数调整
</a>
</template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<Button
type="primary"
@click="goResults"
......
......@@ -28,34 +28,13 @@
<Icon type="md-git-compare" />
</a>
<DropdownMenu slot="list" style="text-align: center;">
<DropdownItem>
<DropdownItem v-for="li in items" :key="li" v-dragging="{ item: li, list: items}">
<a href="#">
<Icon type="md-apps" />
</a>
<span>转序规则</span>
</DropdownItem>
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>加班策略</span>
</DropdownItem>
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>任务平衡</span>
</DropdownItem>
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>是否离散</span>
</DropdownItem>
<!-- <div>
<Button type="text" class="ib" @click="handleOk">确定</Button><Button type="text" class="ib" @click="handle">关闭</Button>
</div>-->
</DropdownMenu>
<span>{{li}}</span>
</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
<div class="slider">
......@@ -126,8 +105,8 @@
</Row>
<Divider />
<FormItem :label="l('isDiscrete')" prop="isDiscrete">
<i-switch v-model="entity.isDiscrete" size="large">
<FormItem :label="l('isDiscrete')" prop="dis">
<i-switch v-model="entity.dis" size="large">
<span slot="open"></span>
<span slot="close"></span>
</i-switch>
......@@ -159,22 +138,24 @@ import Api from "./api";
export default {
data() {
return {
items:["是否多台","转序规则","加班策略","是否离散"],
entity: {
partTaskPk: 0,
opTaskPk: 0,
taskSeq: "",
flog: 5, //参数应用范围
calId: null,
planState: true,
calId: -1,
planState: false,
planMethod: "重叠", // 平行 重叠
over: false,
overTime: "不加班", //"六日加班", 不加班 加班
efficiencyValue: 11, // 效率系数, 必须大于 0
shopId: null,
isDiscrete: true,//是否离散 是否
shopId: -1,
dis:false,
isDiscrete: "否",//是否离散 是否
discrete: 1, //离散数值 必须大于 1
multiple: true,
multipleEquip: "", //"是否多台安排设备", 否 是
multiple: false,
multipleEquip: "", //"是否多台安排设备", 否 是
multipleCount: 1, //多台数量
multipleEquipPks: [],
multipleEquipIds: "" //"设备id", 用英文逗号分隔
......@@ -245,7 +226,13 @@ export default {
this.getCal(); //获取连班策略
this.apsGet(); //获取参数级别和转序等的关系
},
mounted() {},
mounted() {
this.$dragging.$on('dragged', ({ value }) => {
console.log(value.item)
console.log(value.list)
console.log(value.otherData)
})
},
methods: {
getCal() {
Api.getallcal().then(res => {
......@@ -298,9 +285,9 @@ export default {
this.entity.multipleEquipIds = this.entity.multipleEquipPks.join();
}
//
this.entity.planMethod = this.entity.planState ? "重叠" : "平行";
this.entity.overTime = this.entity.over ? "不加班" : "加班";
this.entity.isDiscrete = this.entity.isDiscrete ? "是" : "否";
this.entity.planMethod = !this.entity.planState ? "重叠" : "平行";
this.entity.overTime = !this.entity.over ? "不加班" : "加班";
this.entity.isDiscrete = this.entity.dis ? "是" : "否";
this.entity.multipleEquip = this.entity.multiple ? "是" : "否";
Api.apsschedulupdateparameter(this.entity)
.then(res => {
......@@ -356,13 +343,13 @@ export default {
opTaskPk: this.row.op_task_pk,
taskSeq: this.row.task_seq,
flog: 5, //参数应用范围
calId: null,
calId: -1,
planState: this.row.plan_method=="平行",
planMethod: this.row.plan_method, // 平行 重叠
over: this.row.over_time=="加班",
overTime: this.row.over_time, //"六日加班", 不加班 加班
efficiencyValue:this.row.efficiency_value|1, // 效率系数, 必须大于 0
shopId: null,
shopId: -1,
isDiscrete: this.row.isdiscrete=="是",
discrete: this.row.discrete_value|1, //离散数值 必须大于 1
multiple: this.row.multi_machine=="是",
......
......@@ -126,10 +126,10 @@ service.interceptors.response.use(
},
error => {
if (error && error.response) {
// if(error.response.status=="401"){
// window.location.href = '/account/login';
// return;
// }
if(error.response.status=="401"){
window.location.href = '/account/login';
return;
}
switch (error.response.status) {
case 400: error.message = '请求错误'; break;
case 401: error.message = '未授权,请登录'; break;
......
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