diff --git a/src/api/administration.js b/src/api/administration.js
index 9d39b45..d50dc3b 100644
--- a/src/api/administration.js
+++ b/src/api/administration.js
@@ -54,3 +54,27 @@ export function getTreeProMainDevicePatrolEquSelect(query) {
method: 'get',
})
}
+// 复制任务
+export function getCopyTask(query) {
+ return request({
+ url: `/patrol/task/copyTask`,
+ method: 'get',
+ params: query
+ })
+}
+// 立即执行
+export function getControlChange(query) {
+ return request({
+ url: `/patrol/taskstatus/controlChange`,
+ method: 'get',
+ params: query
+ })
+}
+// 任务下发
+export function getTaskIsSue(query) {
+ return request({
+ url: `/patrol/task/issue`,
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/api/equipment/entry.js b/src/api/equipment/entry.js
index 058a58d..06a3de4 100644
--- a/src/api/equipment/entry.js
+++ b/src/api/equipment/entry.js
@@ -7,36 +7,35 @@ export function treeAreaDeviceSelect(query) {
})
}
export function devicetypeList(query) {
- return request({
- url: '/basedata/devicetype/list',
- method: 'get',
- params: {
- powerMainEquFlag:'Yes'
- }
- })
- }
+ return request({
+ url: '/basedata/devicetype/list',
+ method: 'get',
+ params: {
+ powerMainEquFlag: 'Yes'
+ }
+ })
+}
- export function deviceQuery(id) {
- return request({
- url:`/basedata/prodevmnt/device/${id}?id=${id}`,
- method: 'get',
+export function deviceQuery(id) {
+ return request({
+ url: `/basedata/prodevmnt/device/${id}?id=${id}`,
+ method: 'get',
// params: query
- })
- }
- export function insertMainDeviceAndCommByDeviceType(data) {
- return request({
- url:`/basedata/prodevmnt/device/insertMainDeviceAndCommByDeviceType`,
- method: 'post',
- data:data
- })
- }
+ })
+}
+export function insertMainDeviceAndCommByDeviceType(data) {
+ return request({
+ url: `/basedata/prodevmnt/device/insertMainDeviceAndCommByDeviceType`,
+ method: 'post',
+ data: data
+ })
+}
- export function deviceRemove(id) {
- console.log(id)
- // return
- return request({
- url:`/basedata/prodevmnt/device/remove/${id}`,
- method: 'post',
- })
- }
-
\ No newline at end of file
+export function deviceRemove(id) {
+ console.log(id)
+ // return
+ return request({
+ url: `/basedata/prodevmnt/device/remove/${id}`,
+ method: 'post',
+ })
+}
diff --git a/src/api/equipment/equipment.js b/src/api/equipment/equipment.js
index c6da3ce..30752b3 100644
--- a/src/api/equipment/equipment.js
+++ b/src/api/equipment/equipment.js
@@ -14,3 +14,27 @@ export function getList(query) {
params: query
})
}
+
+// 区域名称选择Tree树
+export function getTreeselect(query) {
+ return request({
+ url: '/basedata/area/treeselect',
+ method: 'get',
+ params: query
+ })
+}
+//
+// 删除
+export function postRemove(query) {
+ return request({
+ url: `/basedata/eqpbook/remove/${query}`,
+ method: 'post',
+ })
+}
+// 单条数据查询
+export function getEqpbook(query) {
+ return request({
+ url: `/basedata/eqpbook/${query}`,
+ method: 'get',
+ })
+}
\ No newline at end of file
diff --git a/src/api/equipment/equipment_type.js b/src/api/equipment/equipment_type.js
new file mode 100644
index 0000000..9e14512
--- /dev/null
+++ b/src/api/equipment/equipment_type.js
@@ -0,0 +1,8 @@
+import request from '@/utils/request';
+export function getProDeviceTypeTreeSelect(query) {
+ return request({
+ url: '/basedata/devicetype/getProDeviceTypeTreeSelect',
+ method: 'get',
+ // params: query
+ })
+}
\ No newline at end of file
diff --git a/src/api/monitor/job.js b/src/api/monitor/job.js
index ebe280e..e851af4 100644
--- a/src/api/monitor/job.js
+++ b/src/api/monitor/job.js
@@ -29,7 +29,7 @@ export function addJob(data) {
// 修改定时任务调度
export function updateJob(data) {
return request({
- url: '/monitor/job',
+ url: '/schedule/job/edit',
method: 'put',
data: data
})
diff --git a/src/api/point/point_mang.js b/src/api/point/point_mang.js
new file mode 100644
index 0000000..4a5a578
--- /dev/null
+++ b/src/api/point/point_mang.js
@@ -0,0 +1,9 @@
+import request from '@/utils/request';
+// 初始化树结构
+export function getTreeAreaDeviceSelect(query) {
+ return request({
+ url: '/basedata/prodevmnt/device/treeAreaDeviceSelect',
+ method: 'get',
+ // params: query
+ })
+}
\ No newline at end of file
diff --git a/src/api/point/site_management.js b/src/api/point/site_management.js
new file mode 100644
index 0000000..a017041
--- /dev/null
+++ b/src/api/point/site_management.js
@@ -0,0 +1,25 @@
+import request from '@/utils/request';
+// 初始化树结构
+export function getTreeAreaDeviceSelect(query) {
+ return request({
+ url: '/basedata/prodevmnt/device/treeAreaDeviceSelect',
+ method: 'get',
+ // params: query
+ })
+}
+// 点击树结构查询
+export function getMonitor(query) {
+ return request({
+ url: '/basedata/patrolpointmnt/patrolpoint/list/monitor',
+ method: 'get',
+ params: query
+ })
+}
+//
+// 巡检类型
+export function getPatroltypeList(query) {
+ return request({
+ url: `/basedata/patrolpointmnt/patroltype/list`,
+ method: 'get',
+ })
+}
\ No newline at end of file
diff --git a/src/lang/en/index.js b/src/lang/en/index.js
index 453cfb7..a41c134 100644
--- a/src/lang/en/index.js
+++ b/src/lang/en/index.js
@@ -18,7 +18,8 @@ import patroltype from './basedata/patrolpointmnt/patroltype.json';
import mainsystem from './basedata/bdconfig/mainsystem.json';
import algconvert from './basedata/bdconfig/algconvert.json';
import deviceconvert from './basedata/bdconfig/deviceconvert.json';
-
+// 提示信息
+import prompt from './prompt.json'
export default {
routerIl8n: {
homePage: 'homePage'
@@ -93,5 +94,6 @@ export default {
patroltype:patroltype,
mainsystem:mainsystem,
algconvert:algconvert,
- deviceconvert:deviceconvert
+ deviceconvert:deviceconvert,
+ prompt
}
\ No newline at end of file
diff --git a/src/lang/en/prompt.json b/src/lang/en/prompt.json
new file mode 100644
index 0000000..4ef7226
--- /dev/null
+++ b/src/lang/en/prompt.json
@@ -0,0 +1,11 @@
+{
+ "success": {
+ "queryWasSuccessful":"query was successful",
+ "taskCopySuccess": "Task copied successfully",
+ "OperationSuccessful":"Operation successful"
+ },
+ "error": {
+ "PleaseSelectATime": "Please select a time",
+ "delete_Data":"Please select the data to be deleted"
+ }
+}
\ No newline at end of file
diff --git a/src/lang/zh/index.js b/src/lang/zh/index.js
index 43ee997..69212ed 100644
--- a/src/lang/zh/index.js
+++ b/src/lang/zh/index.js
@@ -17,6 +17,9 @@ import patroltype from './basedata/patrolpointmnt/patroltype.json';
import mainsystem from './basedata/bdconfig/mainsystem.json';
import algconvert from './basedata/bdconfig/algconvert.json';
import deviceconvert from './basedata/bdconfig/deviceconvert.json';
+// 提示信息
+import prompt from './prompt.json'
+
export default {
routerIl8n: {
homePage: '首页'
@@ -90,5 +93,6 @@ export default {
patroltype:patroltype,
mainsystem:mainsystem,
algconvert:algconvert,
- deviceconvert:deviceconvert
+ deviceconvert:deviceconvert,
+ prompt
}
\ No newline at end of file
diff --git a/src/lang/zh/prompt.json b/src/lang/zh/prompt.json
new file mode 100644
index 0000000..e8a21c3
--- /dev/null
+++ b/src/lang/zh/prompt.json
@@ -0,0 +1,11 @@
+{
+ "success": {
+ "queryWasSuccessful":"查询成功",
+ "taskCopySuccess": "任务复制成功",
+ "OperationSuccessful":"操作成功"
+ },
+ "error": {
+ "PleaseSelectATime": "请选择时间",
+ "delete_Data":"请选择要删除的数据"
+ }
+}
\ No newline at end of file
diff --git a/src/views/administration/administration.vue b/src/views/administration/administration.vue
index 03c8f99..7bdd45b 100644
--- a/src/views/administration/administration.vue
+++ b/src/views/administration/administration.vue
@@ -177,13 +177,21 @@
>
- {{
- $t("administration.ImmediateExecution")
- }}
+ {{ $t("administration.ImmediateExecution") }}
- {{
- $t("administration.issue")
- }}
+ {{ $t("administration.issue") }}
@@ -516,13 +525,16 @@
class="dialogTableVisibleStepQurey"
style="margin-bottom: 10px"
>
-
+
-
+ > -->
@@ -608,11 +621,17 @@
width="30%"
:before-close="handleClose"
>
-
+
+
@@ -627,6 +646,9 @@ import {
getAreaList,
getProDeviceTreeSelect,
getTreeProMainDevicePatrolEquSelect,
+ getCopyTask,
+ getControlChange,
+ getTaskIsSue,
} from "@/api/administration";
export default {
data() {
@@ -814,8 +836,18 @@ export default {
},
],
},
+ copyTask: {
+ taskId: null,
+ time: null,
+ },
+ treeWatchInput: "",
};
},
+ watch: {
+ treeWatchInput(val) {
+ this.$refs.selectTree.filter(val);
+ },
+ },
mounted() {
this.init();
},
@@ -827,6 +859,10 @@ export default {
this.loading = false;
this.dataList = res.rows;
this.total = res.total;
+ this.$message({
+ message: this.$t("prompt.success.queryWasSuccessful"),
+ type: "success",
+ });
}
});
},
@@ -893,12 +929,26 @@ export default {
handleDeleteAll() {
if (this.ids.length <= 0) {
this.$message({
- message: "请选择要删除的数据",
+ message: this.$t("prompt.error.delete_Data"),
type: "warning",
});
return;
} else {
- console.log(this.ids);
+ console.log(this.ids.toString());
+ postRemove(this.ids.toString()).then((res) => {
+ if (res.code == 200) {
+ this.$message({
+ message: this.$t("prompt.success.queryWasSuccessful"),
+ type: "success",
+ });
+ this.init();
+ } else {
+ this.$message({
+ message: res.msg,
+ type: "warning",
+ });
+ }
+ });
}
},
// 多选框选中数据
@@ -975,7 +1025,6 @@ export default {
getProDeviceTreeSelect(areaIdS.join(",")).then((res) => {
if (res.code == 200) {
this.proDeviceTreeSelect = res.data;
- console.log(this.proDeviceTreeSelect);
}
});
}
@@ -1021,6 +1070,7 @@ export default {
},
// 复制任务
handleCopy(row) {
+ this.copyTask.taskId = row.taskId;
this.copyDialogVisible = true;
},
// 编辑任务
@@ -1030,6 +1080,53 @@ export default {
handleClose() {
this.copyDialogVisible = false;
},
+ // 复制任务确定
+ copyOk() {
+ console.log(this.copyTask.time);
+ if (this.copyTask.time) {
+ getCopyTask(this.copyTask).then((res) => {
+ if (res.code == 200) {
+ this.$message({
+ message: this.$t("prompt.success.taskCopySuccess"),
+ type: "success",
+ });
+ this.init();
+ this.copyDialogVisible = false;
+ }
+ });
+ } else {
+ this.$message.error(this.$t("prompt.error.PleaseSelectATime"));
+ }
+ },
+ // 立即执行
+ handleImmediateExecution(taskId) {
+ getControlChange({ taskId }).then((res) => {
+ console.log(res, 111111111);
+ if (res.code == 200) {
+ this.$message({
+ message: this.$t("prompt.success.OperationSuccessful"),
+ type: "success",
+ });
+ }
+ });
+ },
+ // 任务下发
+ handleIssue(taskId) {
+ getTaskIsSue({ taskId }).then((res) => {
+ if (res.code == 200) {
+ this.$message({
+ message: this.$t("prompt.success.OperationSuccessful"),
+ type: "success",
+ });
+ }
+ });
+ },
+ // 第二部Tree过滤
+ selectTreeDataWacth(value, data) {
+ console.log(value, data, 11111111);
+ if (!value) return true;
+ return data.areaName.indexOf(value) !== -1;
+ },
},
};
diff --git a/src/views/equipment/equipment.vue b/src/views/equipment/equipment.vue
index 5294ab3..cba4aba 100644
--- a/src/views/equipment/equipment.vue
+++ b/src/views/equipment/equipment.vue
@@ -3,36 +3,36 @@
-
+
@@ -67,7 +67,7 @@
icon="el-icon-edit"
size="mini"
:disabled="single"
- @click="handleUpdate"
+ @click="handleEdit(null,0)"
>{{ $t("share.edit") }}
@@ -78,7 +78,7 @@
icon="el-icon-delete"
size="mini"
:disabled="multiple"
- @click="handleDelete"
+ @click="handleDeleteAll"
>{{ $t("share.delete") }}
@@ -102,12 +102,16 @@
>
- {{
+ {{
$t("equipment.ModelSynchronization")
}}
-
+
+
+
+
+
+ {{ typeFn(scope.row.type) }}
+
+
-
+
{{ $t("share.edit") }}
{{ $t("share.delete") }}
{{
@@ -335,6 +342,7 @@
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
+ @pagination="init"
/>
-
-
+
+
-
-
-
+ />
-
+
+
+
+
+
+
-
@@ -439,7 +447,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -609,7 +632,7 @@
-
-
-
+
+
@@ -266,4 +280,14 @@ export default {
cursor: pointer;
}
}
+.treeScroll {
+ height: 80vh;
+ // overflow: hidden;
+ overflow-y: scroll;
+ padding: 10px;
+ margin-top: 10px;
+}
+::v-deep .el-tree-node__content {
+ height: 30px;
+}
diff --git a/src/views/point/point_mang.vue b/src/views/point/point_mang.vue
index 568869b..fa858c7 100644
--- a/src/views/point/point_mang.vue
+++ b/src/views/point/point_mang.vue
@@ -175,6 +175,7 @@