Commit 42674c85 authored by 仇晓婷's avatar 仇晓婷

工序参数设置

parent ce4853fc
......@@ -86,7 +86,7 @@
</Dropdown>
</div>
<div class="slider">
<Slider v-model="entity.value1" :step="25" show-stops></Slider>
<Slider v-model="entity.level" :step="20" show-stops></Slider>
<div class="slow"></div>
<div class="fast"></div>
</div>
......@@ -112,11 +112,15 @@
</Col>
</Row>
<FormItem label="班组结构">
<Select v-model="entity.select6" style="width:150px">
<Option value="beijing">结构1</Option>
<Option value="shanghai">结构2</Option>
<Option value="shenzhen">结构3</Option>
<Option value="shenzhen">结构4</Option>
<Select v-model="entity.shopId" placeholder="请选择" style="width:150px" prop="shopId">
<Option
v-for="(item,index) in list"
:key="index"
:value="item.value"
:label="item.title"
style="display:none"
></Option>
<Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree>
</Select>
</FormItem>
<div class="check-box">
......@@ -158,10 +162,16 @@ export default {
data() {
return {
entity: {
value1: 100,
flog: 0, //参数应用
planMethod: "转序规则", // 平行 重叠
shopId: null,
level: 100,
value2: 100,
fruit: []
},
list: [],
data1: [],
listCal: [],
visible: false,
rules: {
......@@ -171,7 +181,9 @@ export default {
};
},
mounted() {
this.getCal();
this.getCal(); //获取连班策略
this.apsGet(); //获取参数级别和转序等的关系
this.initTree(); //获取当前登录人所在车间下的所有部门
},
methods: {
getCal() {
......@@ -181,6 +193,13 @@ export default {
}
});
},
apsGet() {
Api.apsGetall().then(res => {
// if (res.success) {
// }
});
},
handleSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
......@@ -193,6 +212,47 @@ export default {
}
});
},
initTree() {
var sumData = [];
Api.userdepartmentsofworkshop()
.then(r => {
if (r.result) {
this.data1 = r.result;
} else {
this.$Message.error("加载部门失败!");
}
})
.catch(err => {});
},
renderContent(h, { root, node, data }) {
//渲染树的样式
return h(
"span",
{
style: {
cursor: "pointer"
},
on: {
click: () => {
this.handleSelect(data); //手动选择树节点
}
}
},
data.title
);
},
handleSelect(data) {
let obj = {
label: data.title,
value: data.value
};
this.list = [];
this.list.push(obj);
alert(this.list[0].value)
this.entity.shopId = this.list[0].value;
},
handleClose() {
this.$emit("on-close");
},
......
......@@ -64,4 +64,16 @@ export default {
apsschedulupdateparameter(params) {
return Api.post(`${apsUrl}/ser/apsschedulupdateparameter`, params);
},
//获取参数级别和转序等的关系
apsGetall(params) {
return Api.get(`${apsUrl}/apsparaconfig/getall`, params);
},
//获取所在班组的设备或根据设备类型过滤
getequiplist(params) {
return Api.get(`${apsUrl}/mes_equip_info/getequiplist`, params);
},
//获取当前登录人所在车间下的所有部门
userdepartmentsofworkshop(params) {
return Api.get(`${systemUrl}/user/userdepartmentsofworkshop`, params);
},
}
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