|
|
|
@ -9,17 +9,21 @@
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<!--分类数据-->
|
|
|
|
|
<el-col :span="4" :xs="24">
|
|
|
|
|
<div class="head-container">
|
|
|
|
|
<el-tree
|
|
|
|
|
:data="treeData"
|
|
|
|
|
node-key="id"
|
|
|
|
|
:expand-on-click-node="false"
|
|
|
|
|
:filter-node-method="filterNode"
|
|
|
|
|
ref="tree"
|
|
|
|
|
default-expand-all
|
|
|
|
|
@node-click="handleNodeClick"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<el-card >
|
|
|
|
|
<span>请选择设备类型:</span>
|
|
|
|
|
<div class="head-container" style="text-align: center">
|
|
|
|
|
<el-tree
|
|
|
|
|
:data="treeData1"
|
|
|
|
|
:props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
|
|
|
|
|
node-key="id"
|
|
|
|
|
:expand-on-click-node="false"
|
|
|
|
|
:filter-node-method="filterNode"
|
|
|
|
|
ref="tree"
|
|
|
|
|
default-expand-all
|
|
|
|
|
@node-click="handleNodeClick"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</el-card>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<!--设备数据-->
|
|
|
|
@ -80,7 +84,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listProcess, getProcess, delProcess, addProcess, updateProcess ,listEquipment,getEquipment} from "@/api/technology/process";
|
|
|
|
|
import { listProcess, getProcess, delProcess, addProcess, updateProcess ,listEquipment,getEquipment,getEquipmentTypeList} from "@/api/technology/process";
|
|
|
|
|
import { treeselect } from "@/api/wms/equipment";
|
|
|
|
|
// import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
// import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
@ -91,30 +95,7 @@ export default {
|
|
|
|
|
// components: { Treeselect },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
treeData: [{
|
|
|
|
|
id: '1',
|
|
|
|
|
label: '设备类别',
|
|
|
|
|
children: [{
|
|
|
|
|
id: 'equ_type_lg',
|
|
|
|
|
label: '料罐'
|
|
|
|
|
}, {
|
|
|
|
|
id: 'equ_type_cxj',
|
|
|
|
|
label: '成型机'
|
|
|
|
|
}, {
|
|
|
|
|
id: 'equ_type_hf',
|
|
|
|
|
label: '烘房'
|
|
|
|
|
}, {
|
|
|
|
|
id: 'equ_type_spj',
|
|
|
|
|
label: '收坯机'
|
|
|
|
|
}, {
|
|
|
|
|
id: 'equ_type_bzx',
|
|
|
|
|
label: '包装线'
|
|
|
|
|
},{
|
|
|
|
|
id: 'equ_type_dsj',
|
|
|
|
|
label: '吊筛机'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}],
|
|
|
|
|
treeData1:[],
|
|
|
|
|
showFlag:false,
|
|
|
|
|
// 选中数组
|
|
|
|
|
selectedItemId: undefined,
|
|
|
|
@ -133,10 +114,6 @@ export default {
|
|
|
|
|
itemTypeOptions: undefined,
|
|
|
|
|
//树名称
|
|
|
|
|
equipmentTypeCode: undefined,
|
|
|
|
|
defaultProps: {
|
|
|
|
|
id: "id",
|
|
|
|
|
label: "label"
|
|
|
|
|
},
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
@ -145,6 +122,7 @@ export default {
|
|
|
|
|
equipmentTypeCode: undefined,
|
|
|
|
|
itemTypeId: 0,
|
|
|
|
|
itemCodeGet: '',
|
|
|
|
|
itemCode : undefined,
|
|
|
|
|
},
|
|
|
|
|
// 列信息
|
|
|
|
|
columns: [
|
|
|
|
@ -156,11 +134,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
// this.getTreeselect();
|
|
|
|
|
this.getEquipmentType();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
@ -193,26 +170,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 查询分类下拉树结构 */
|
|
|
|
|
// getTreeselect() {
|
|
|
|
|
// treeselect().then(response => {
|
|
|
|
|
// this.itemTypeOptions = response.rows;
|
|
|
|
|
// console.log(response.rows);
|
|
|
|
|
// num = response.total;
|
|
|
|
|
// for (let id of response.rows) {
|
|
|
|
|
// if(id == 'equ_type_lg'){
|
|
|
|
|
// lable = '料罐';
|
|
|
|
|
// }else if(id == 'equ_type_hf'){
|
|
|
|
|
// lable = '烘房';
|
|
|
|
|
// }else if(id == 'equ_type_cpj'){
|
|
|
|
|
// lable = '收坯机';
|
|
|
|
|
// }else if(id == 'equ_type_bzx'){
|
|
|
|
|
// lable = '包装线';
|
|
|
|
|
// }else if(id == 'equ_type_cxj'){
|
|
|
|
|
// lable = '成型机';
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
getEquipmentType() {
|
|
|
|
|
getEquipmentTypeList().then(response => {
|
|
|
|
|
console.log(response.rows);
|
|
|
|
|
this.treeData1 = response.rows;
|
|
|
|
|
console.log(this.treeData1);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 筛选节点
|
|
|
|
|
filterNode(value, data) {
|
|
|
|
@ -223,9 +187,11 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 节点单击事件
|
|
|
|
|
handleNodeClick(data) {
|
|
|
|
|
this.queryParams.equipmentTypeCode = data.id;
|
|
|
|
|
console.log('id',data.id);
|
|
|
|
|
this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
|
|
|
|
|
console.log(this.equipmentTypeCode);
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
this.queryParams.equipmentTypeCode = null;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|