Merge remote-tracking branch 'origin/master'

yangwl
wws 1 year ago
commit fdbf1021a0

@ -94,3 +94,11 @@ export function getWorkCenterList() {
method: 'get' method: 'get'
}); });
} }
// 查询设备类型
export function getEquipmentTypeList() {
return request({
url: '/technology/pro/process/getEquipmentTypeList',
method: 'get'
});
}

@ -9,17 +9,21 @@
<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 >
<el-tree <span>请选择设备类型</span>
:data="treeData" <div class="head-container" style="text-align: center">
node-key="id" <el-tree
:expand-on-click-node="false" :data="treeData1"
:filter-node-method="filterNode" :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
ref="tree" node-key="id"
default-expand-all :expand-on-click-node="false"
@node-click="handleNodeClick" :filter-node-method="filterNode"
/> ref="tree"
</div> default-expand-all
@node-click="handleNodeClick"
/>
</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;
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */

@ -9,17 +9,21 @@
<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 >
<el-tree <span>请选择设备类型</span>
:data="treeData" <div class="head-container" style="text-align: center">
node-key="id" <el-tree
:expand-on-click-node="false" :data="treeData1"
:filter-node-method="filterNode" :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
ref="tree" node-key="id"
default-expand-all :expand-on-click-node="false"
@node-click="handleNodeClick" :filter-node-method="filterNode"
/> ref="tree"
</div> default-expand-all
@node-click="handleNodeClick"
/>
</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;
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */

Loading…
Cancel
Save