diff --git a/src/api/device/faultDescription.js b/src/api/device/faultDescription.js new file mode 100644 index 0000000..b808e25 --- /dev/null +++ b/src/api/device/faultDescription.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询故障描述列表 +export function listFaultDescription(query) { + return request({ + url: '/device/faultDescription/list', + method: 'get', + params: query + }); +} + +// 查询故障描述详细 +export function getFaultDescription(faultId) { + return request({ + url: '/device/faultDescription/' + faultId, + method: 'get' + }); +} + +// 新增故障描述 +export function addFaultDescription(data) { + return request({ + url: '/device/faultDescription', + method: 'post', + data: data + }); +} + +// 修改故障描述 +export function updateFaultDescription(data) { + return request({ + url: '/device/faultDescription', + method: 'put', + data: data + }); +} + +// 删除故障描述 +export function delFaultDescription(faultId) { + return request({ + url: '/device/faultDescription/' + faultId, + method: 'delete' + }); +} diff --git a/src/api/device/faultMeasures.js b/src/api/device/faultMeasures.js new file mode 100644 index 0000000..c2d7c41 --- /dev/null +++ b/src/api/device/faultMeasures.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询故障维修措施列表 +export function listFaultMeasures(query) { + return request({ + url: '/device/faultMeasures/list', + method: 'get', + params: query + }); +} + +// 查询故障维修措施详细 +export function getFaultMeasures(faultId) { + return request({ + url: '/device/faultMeasures/' + faultId, + method: 'get' + }); +} + +// 新增故障维修措施 +export function addFaultMeasures(data) { + return request({ + url: '/device/faultMeasures', + method: 'post', + data: data + }); +} + +// 修改故障维修措施 +export function updateFaultMeasures(data) { + return request({ + url: '/device/faultMeasures', + method: 'put', + data: data + }); +} + +// 删除故障维修措施 +export function delFaultMeasures(faultId) { + return request({ + url: '/device/faultMeasures/' + faultId, + method: 'delete' + }); +} diff --git a/src/api/device/faultReason.js b/src/api/device/faultReason.js new file mode 100644 index 0000000..03583cb --- /dev/null +++ b/src/api/device/faultReason.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询故障原因列表 +export function listFaultReason(query) { + return request({ + url: '/device/faultReason/list', + method: 'get', + params: query + }); +} + +// 查询故障原因详细 +export function getFaultReason(faultId) { + return request({ + url: '/device/faultReason/' + faultId, + method: 'get' + }); +} + +// 新增故障原因 +export function addFaultReason(data) { + return request({ + url: '/device/faultReason', + method: 'post', + data: data + }); +} + +// 修改故障原因 +export function updateFaultReason(data) { + return request({ + url: '/device/faultReason', + method: 'put', + data: data + }); +} + +// 删除故障原因 +export function delFaultReason(faultId) { + return request({ + url: '/device/faultReason/' + faultId, + method: 'delete' + }); +} diff --git a/src/api/device/faultReport.js b/src/api/device/faultReport.js index a89c5ea..ad5344f 100644 --- a/src/api/device/faultReport.js +++ b/src/api/device/faultReport.js @@ -77,3 +77,12 @@ export function getRepairPersonList(query) { params: query }); } + +// 查询组线列表 +export function getGroupLineList(query) { + return request({ + url: '/device/faultReport/getGroupLineList', + method: 'get', + params: query + }); +} diff --git a/src/api/device/faultType.js b/src/api/device/faultType.js index 007c1b7..eb6c28c 100644 --- a/src/api/device/faultType.js +++ b/src/api/device/faultType.js @@ -2,43 +2,43 @@ import request from '@/utils/request' // 查询故障类型维护列表 export function listFaultType(query) { - return request({ - url: '/device/faultType/list', - method: 'get', - params: query - }); + return request({ + url: '/device/faultType/list', + method: 'get', + params: query + }); } // 查询故障类型维护详细 export function getFaultType(faultId) { - return request({ - url: '/device/faultType/' + faultId, - method: 'get' - }); + return request({ + url: '/device/faultType/' + faultId, + method: 'get' + }); } // 新增故障类型维护 export function addFaultType(data) { - return request({ - url: '/device/faultType', - method: 'post', - data: data - }); + return request({ + url: '/device/faultType', + method: 'post', + data: data + }); } // 修改故障类型维护 export function updateFaultType(data) { - return request({ - url: '/device/faultType', - method: 'put', - data: data - }); + return request({ + url: '/device/faultType', + method: 'put', + data: data + }); } // 删除故障类型维护 export function delFaultType(faultId) { - return request({ - url: '/device/faultType/' + faultId, - method: 'delete' - }); + return request({ + url: '/device/faultType/' + faultId, + method: 'delete' + }); } diff --git a/src/views/device/faultInformation/index.vue b/src/views/device/faultInformation/index.vue new file mode 100644 index 0000000..542cc8a --- /dev/null +++ b/src/views/device/faultInformation/index.vue @@ -0,0 +1,112 @@ + + + diff --git a/src/views/device/faultInformation/itemFaultDescription.vue b/src/views/device/faultInformation/itemFaultDescription.vue new file mode 100644 index 0000000..515ecdd --- /dev/null +++ b/src/views/device/faultInformation/itemFaultDescription.vue @@ -0,0 +1,444 @@ + + + diff --git a/src/views/device/faultInformation/itemFaultMeasures.vue b/src/views/device/faultInformation/itemFaultMeasures.vue new file mode 100644 index 0000000..75bd3ea --- /dev/null +++ b/src/views/device/faultInformation/itemFaultMeasures.vue @@ -0,0 +1,430 @@ + + + diff --git a/src/views/device/faultInformation/itemFaultReason.vue b/src/views/device/faultInformation/itemFaultReason.vue new file mode 100644 index 0000000..f092fc0 --- /dev/null +++ b/src/views/device/faultInformation/itemFaultReason.vue @@ -0,0 +1,444 @@ + + + diff --git a/src/views/device/faultType/index.vue b/src/views/device/faultInformation/itemFaultType.vue similarity index 94% rename from src/views/device/faultType/index.vue rename to src/views/device/faultInformation/itemFaultType.vue index ed927bc..b32ee21 100644 --- a/src/views/device/faultType/index.vue +++ b/src/views/device/faultInformation/itemFaultType.vue @@ -5,12 +5,13 @@ - + @@ -82,6 +84,17 @@ placeholder="请输入创建人" clearable @keyup.enter.native="handleQuery" + style="width: 140px" + /> + + + @@ -97,15 +110,6 @@ :picker-options="pickerOptions"> - - - - + @@ -231,11 +235,11 @@ - + - + - + - + @@ -323,7 +327,7 @@ export default { // 总条数 total: 0, // 故障类型维护表格数据 - faultTypeList: [], + faultList: [], // 弹出层标题 title: "", // 是否显示弹出层 @@ -363,7 +367,7 @@ export default { getList() { this.loading = true; listFaultType(this.queryParams).then(response => { - this.faultTypeList = response.rows; + this.faultList = response.rows; this.total = response.total; this.loading = false; }); @@ -458,18 +462,18 @@ export default { var faultCodes = ''; // 处理信息 - for (let i = 0; i < this.faultTypeList.length; i++) { + for (let i = 0; i < this.faultList.length; i++) { for (let j = 0; j < faultIds.length; j++) { - if (faultIds[j] == this.faultTypeList[i].faultId) { - faultCodes = faultCodes + this.faultTypeList[i].faultCode + ','; + if (faultIds[j] == this.faultList[i].faultId) { + faultCodes = faultCodes + this.faultList[i].faultCode + ','; } } } if (faultCodes == '') { - for (let i = 0; i < this.faultTypeList.length; i++) { - if (faultIds == this.faultTypeList[i].faultId) { - faultCodes = this.faultTypeList[i].faultCode; + for (let i = 0; i < this.faultList.length; i++) { + if (faultIds == this.faultList[i].faultId) { + faultCodes = this.faultList[i].faultCode; } } } diff --git a/src/views/device/faultInformation/selectSingleEquipment.vue b/src/views/device/faultInformation/selectSingleEquipment.vue new file mode 100644 index 0000000..bf9dee9 --- /dev/null +++ b/src/views/device/faultInformation/selectSingleEquipment.vue @@ -0,0 +1,333 @@ + + + diff --git a/src/views/device/faultInformation/selectSinglePerson.vue b/src/views/device/faultInformation/selectSinglePerson.vue new file mode 100644 index 0000000..7009fba --- /dev/null +++ b/src/views/device/faultInformation/selectSinglePerson.vue @@ -0,0 +1,229 @@ + + + diff --git a/src/views/device/faultReport/selectSingleEquipment.vue b/src/views/device/faultReport/selectSingleEquipment.vue index d35b063..bf9dee9 100644 --- a/src/views/device/faultReport/selectSingleEquipment.vue +++ b/src/views/device/faultReport/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; }); }, @@ -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; }, },