{
+ this.options = response.rows;
+ });
},
+ //查询
+ getEquList() {
+ this.loading = true;
+ this.queryParams.equipmentCode = this.queryParams.itemCode;
+ this.queryParams.equipmentName = this.queryParams.itemName;
+ getEquList(this.queryParams).then((response) => {
+ this.itemList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+
+
/** 查询分类下拉树结构 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
- console.log(response.rows);
- this.treeData1 = response.rows;
- console.log(this.treeData1);
+ this.treeData = response.rows;
});
},
@@ -236,23 +274,24 @@ export default {
// 节点单击事件
handleNodeClick(data) {
- console.log("id", data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
- console.log(this.equipmentTypeCode);
- this.handleQuery();
+ console.log(this.queryParams.equipmentTypeCode);
+ this.queryParams.pageNum = 1;
+ this.getList();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
- this.getList();
+ this.getEquList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
- this.handleQuery();
+ this.queryParams.pageNum = 1;
+ this.getList()
},
// 多选框选中数据
@@ -279,7 +318,6 @@ export default {
this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null;
this.getList();
- console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
@@ -288,7 +326,6 @@ export default {
cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null;
this.getList();
- console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
},
},
diff --git a/src/views/device/repairOrder/selectSingleEquipment.vue b/src/views/device/repairOrder/selectSingleEquipment.vue
index e06246a..5ba78bf 100644
--- a/src/views/device/repairOrder/selectSingleEquipment.vue
+++ b/src/views/device/repairOrder/selectSingleEquipment.vue
@@ -4,7 +4,7 @@
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
- width="1100px"
+ width="1200px"
center
:before-close="cancelEquipmentForm"
>
@@ -15,7 +15,7 @@
请选择设备类型:
@@ -52,10 +52,28 @@
v-model="queryParams.itemName"
placeholder="请输入设备名称"
clearable
- style="width: 240px"
+ style="width: 160px"
@keyup.enter.native="handleQuery"
/>
+
+
+
+
+
+
+
+
{
+ this.options = response.rows;
+ });
},
+ //查询
+ getEquList() {
+ this.loading = true;
+ this.queryParams.equipmentCode = this.queryParams.itemCode;
+ this.queryParams.equipmentName = this.queryParams.itemName;
+ getEquList(this.queryParams).then((response) => {
+ this.itemList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+
+
/** 查询分类下拉树结构 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
- console.log(response.rows);
- this.treeData1 = response.rows;
- console.log(this.treeData1);
+ this.treeData = response.rows;
});
},
@@ -237,23 +274,24 @@ export default {
// 节点单击事件
handleNodeClick(data) {
- console.log("id", data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
- console.log(this.equipmentTypeCode);
- this.handleQuery();
+ console.log(this.queryParams.equipmentTypeCode);
+ this.queryParams.pageNum = 1;
+ this.getList();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
- this.getList();
+ this.getEquList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
- this.handleQuery();
+ this.queryParams.pageNum = 1;
+ this.getList()
},
// 多选框选中数据
@@ -267,7 +305,7 @@ export default {
submitEquipmentForm() {
const data = this.ids;
if (data.length > 1) {
- Message.warning("只能选择一个报修机器,请勿选择多个!");
+ Message.warning("只能选择一个维修机器,请勿选择多个!");
} else {
const equipmentCode = data.toString();
if (this.queryParams.itemCodeGet == "") {
@@ -280,7 +318,6 @@ export default {
this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null;
this.getList();
- console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
@@ -289,7 +326,6 @@ export default {
cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null;
this.getList();
- console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
},
},