diff --git a/src/api/oceanus.js b/src/api/oceanus.js index f4aebfa40864cd766f9c37076e4164ecc2726515..6d6d215339c0e12fe23a0a29a32baafbfec9c535 100644 --- a/src/api/oceanus.js +++ b/src/api/oceanus.js @@ -14,7 +14,7 @@ function delOceanusTreeApi(data) { } function getAttributesApi(data) { - return getReq('/oceanus/api/v1/categories/attributes', data); + return getReq('/oceanus/api/v1/categories/attributes', data); } function addAttributesApi(data) { @@ -45,31 +45,38 @@ function getEquipmentsInfoApi(data) { return getReq(`/oceanus/api/v1/equipments/${data.catalogValue}`); } function getEquipmentsAttributesApi(data) { - return getReq('/oceanus/api/v1/equipments/attributes', data); + return getReq('/oceanus/api/v1/equipments/attributes', data); } function addEquipmentsAttributesApi(data) { - return postReq('/oceanus/api/v1/equipments/attributes', data); + return postReq('/oceanus/api/v1/equipments/attributes', data); } function updateEquipmentsAttributesApi(data) { - return putReq('/oceanus/api/v1/equipments/attributes', data); + return putReq('/oceanus/api/v1/equipments/attributes', data); } function topEquipmentsAttributesApi(data) { - return putReq(`/oceanus/api/v1/equipments/attributes/top/${data.instanceId}`,{}); + return putReq(`/oceanus/api/v1/equipments/attributes/top/${data.instanceId}`, {}); } function bottomEquipmentsAttributesApi(data) { - return putReq(`/oceanus/api/v1/equipments/attributes/bottom/${data.instanceId}`,{}); + return putReq(`/oceanus/api/v1/equipments/attributes/bottom/${data.instanceId}`, {}); +} +function getEquipmentsEventsApi(data) { + return getReq('/oceanus/api/v1/equipments/events', data); +} +function addEquipmentsEventsApi(data) { + return postReq('/oceanus/api/v1/equipments/events', data); +} +function updateEquipmentsEventsApi(data) { + return putReq('/oceanus/api/v1/equipments/events', data); } - - export default { getOceanusTree: getOceanusTreeApi, addOceanusTree: addOceanusTreeApi, updateOceanusTree: updateOceanusTreeApi, delOceanusTree: delOceanusTreeApi, - getAttributes:getAttributesApi, + getAttributes: getAttributesApi, addAttributes: addAttributesApi, updateAttributes: updateAttributesApi, movementAttributes: movementAttributesApi, @@ -78,9 +85,12 @@ export default { updateEquipmentsTree: updateEquipmentsTreeApi, delEquipmentsTree: delEquipmentsTreeApi, getEquipmentsInfo: getEquipmentsInfoApi, - getEquipmentsAttributes:getEquipmentsAttributesApi, - addEquipmentsAttributes:addEquipmentsAttributesApi, - updateEquipmentsAttributes:updateEquipmentsAttributesApi, - topEquipmentsAttributes:topEquipmentsAttributesApi, - bottomEquipmentsAttributes:bottomEquipmentsAttributesApi, + getEquipmentsAttributes: getEquipmentsAttributesApi, + addEquipmentsAttributes: addEquipmentsAttributesApi, + updateEquipmentsAttributes: updateEquipmentsAttributesApi, + topEquipmentsAttributes: topEquipmentsAttributesApi, + bottomEquipmentsAttributes: bottomEquipmentsAttributesApi, + getEquipmentsEvents: getEquipmentsEventsApi, + addEquipmentsEvents: addEquipmentsEventsApi, + updateEquipmentsEvents: updateEquipmentsEventsApi, }; diff --git a/src/components/MySelect/RequestSelect.vue b/src/components/MySelect/RequestSelect.vue index 57228accf305812430fa4312957e734d3ecc0d49..c6faef080a1bca7db92c8c48cbcb46286c2f899b 100644 --- a/src/components/MySelect/RequestSelect.vue +++ b/src/components/MySelect/RequestSelect.vue @@ -24,6 +24,7 @@ export default { request: Function, formatData: { type: Object, default: undefined }, getName: Function, + param: { type: Object, default: () => ({}) }, labelFiled: String, // 和 formatData 一样 传一种就行了 valueFiled: String, }, @@ -34,7 +35,7 @@ export default { }, async mounted() { if (this.request) { - const newArr = await this.request(); + const newArr = await this.request(this.param); this.data = this.formatData ? await formatObj(newArr, this.formatData) : newArr; this.data = this.labelFiled ? formatObj(newArr, { label: this.labelFiled, value: this.valueFiled, key: this.valueFiled }) diff --git a/src/pages/oceanus/equipment/Left/LeftTree.vue b/src/pages/oceanus/equipment/Left/LeftTree.vue index f1b35f1bbfc5d812e90f609300318c8e66b5a8d1..c33a3adfd2118934e0bb417fde65996b68988ae9 100644 --- a/src/pages/oceanus/equipment/Left/LeftTree.vue +++ b/src/pages/oceanus/equipment/Left/LeftTree.vue @@ -167,6 +167,7 @@ export default { ...data, catalogId: curData.catalogId, catalogType: curData.catalogType, + catalogName: curData.catalogName, }; this.treeData = [...this.treeData]; } @@ -220,13 +221,13 @@ export default { if (type === 1) { const { equipmentForm, catalogForm } = data; const { equipmentName } = equipmentForm; - const { catalogId, catalogType } = catalogForm; - console.log(this.treeNode); + const { catalogId, catalogType, catalogName } = catalogForm; this.treeNode.dataRef.catalogName = equipmentName; const newData = { ...equipmentForm, catalogId, catalogType, + catalogName, }; this.treeData = [...this.treeData]; this.$emit('change', newData); diff --git a/src/pages/oceanus/equipment/Left/TreeDrawer.vue b/src/pages/oceanus/equipment/Left/TreeDrawer.vue index 71ef33ca253aa96f0c74f259a46d952e60fd0499..58a2206c8e39a6dd2dc4601c8110d051892f8b8a 100644 --- a/src/pages/oceanus/equipment/Left/TreeDrawer.vue +++ b/src/pages/oceanus/equipment/Left/TreeDrawer.vue @@ -126,11 +126,12 @@ export default { return Api.updateEquipmentsTree(data); }, colesAfter() { - const { catalogId, catalogType, installTime, runTime, ...rest } = this.form; + const { catalogId, catalogType, installTime, runTime, catalogName, ...rest } = this.form; const data = { catalogForm: { catalogId, catalogType, + catalogName, }, equipmentForm: { installTime: installTime && installTime.format('YYYY-MM-DD hh:mm:ss'), diff --git a/src/pages/oceanus/equipment/Right/EventDrawer.vue b/src/pages/oceanus/equipment/Right/EventDrawer.vue new file mode 100644 index 0000000000000000000000000000000000000000..861b1fea8878fdefa81eeba81a1fe8192eeb657d --- /dev/null +++ b/src/pages/oceanus/equipment/Right/EventDrawer.vue @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/oceanus/equipment/Right/RightBox.vue b/src/pages/oceanus/equipment/Right/RightBox.vue index 4704f5f1e707d10c067bb27af51ad9bc44feae5d..d4948bb75223500bd570d81645cca8c649e752f1 100644 --- a/src/pages/oceanus/equipment/Right/RightBox.vue +++ b/src/pages/oceanus/equipment/Right/RightBox.vue @@ -7,16 +7,19 @@ - Content of Tab Pane 3 + + + - diff --git a/src/pages/oceanus/equipment/Right/SearchPopover.vue b/src/pages/oceanus/equipment/Right/SearchPopover.vue new file mode 100644 index 0000000000000000000000000000000000000000..b8e140c8aac8a7b22db980cfb01bc00fb9197e12 --- /dev/null +++ b/src/pages/oceanus/equipment/Right/SearchPopover.vue @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + 取消 + 重置 + 确定 + + + + + + + + 搜索 + + + + + diff --git a/src/pages/oceanus/equipment/Right/TabThree.vue b/src/pages/oceanus/equipment/Right/TabThree.vue new file mode 100644 index 0000000000000000000000000000000000000000..e5dc94473192545348f8e384c9c9e91bf557a8af --- /dev/null +++ b/src/pages/oceanus/equipment/Right/TabThree.vue @@ -0,0 +1,144 @@ + + + + 新增 + + + 记录数 + + + setPage(10)">10 + + + setPage(20)">20 + + + setPage(30)">30 + + + setPage(50)">50 + + + setPage(100)">100 + + + + + + + + + + + + {{ item.equipmentName }} [{{ item.equipmentCode }}] + + + + + {{ item.eventTypeName }} + {{ item.occurTime }} + + {{ item.eventDescription }} + + onEdit(item)">编辑 + + + + + + + + +