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