From 8a3046817d6bf207f38accd0cd6b65d770db3bea Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 12 九月 2025 17:20:08 +0800
Subject: [PATCH] 1. 修改静安第三方接口url地址 2. 修改静安新增设备匹配功能中,上传的经纬度信息为我方的信息
---
src/views/fysp/task/components/CompDayTask.vue | 31 ++++++++++++++++++++++++++++---
1 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/src/views/fysp/task/components/CompDayTask.vue b/src/views/fysp/task/components/CompDayTask.vue
index f476c5b..678b26f 100644
--- a/src/views/fysp/task/components/CompDayTask.vue
+++ b/src/views/fysp/task/components/CompDayTask.vue
@@ -41,14 +41,16 @@
<CompSubTaskList
v-model="curSubTaskList"
:height="height"
+ @submit="deleteSubtasks"
></CompSubTaskList>
</el-col>
</el-row>
</template>
<script setup>
-import { ref, watch, onMounted } from 'vue';
+import { ref, watch, onMounted, inject } from 'vue';
import { useCloned } from '@vueuse/core';
import { useRoute, useRouter } from 'vue-router';
+import { ElMessage, ElNotification, ElMessageBox } from 'element-plus';
import taskApi from '@/api/fysp/taskApi';
import subtaskApi from '@/api/fysp/subtaskApi';
import TaskProxy from '../TaskProxy';
@@ -65,6 +67,8 @@
dayTask: Object,
mObjList: Array
});
+
+const emit = defineEmits(['submit'])
/*************************** 鏁版嵁鍒濆鍖� ************************************/
// 宸℃煡瀛愪换鍔¢泦鍚�
@@ -127,7 +131,7 @@
function createSubtasks(executors) {
const dt = props.dayTask;
const subtasks = seletedSceneList.value.map((_) => {
- const s = _.scene
+ const s = _.scene;
return {
// 涓婚敭鐢辨湇鍔$鍒涘缓
stguid: undefined,
@@ -157,7 +161,28 @@
remark: undefined
};
});
- subtaskApi.putSubtasks(subtasks)
+
+ // 鏇存柊鍦烘櫙鐩戠娆℃暟
+ seletedSceneList.value.forEach((s) => {
+ s.extension1 = s.extension1 ? parseInt(s.extension1) + 1 + '' : '1';
+ });
+ taskApi.updateMonitorObject(seletedSceneList.value).then((res) => {
+ if (res > 0) {
+ subtaskApi.putSubtasks(subtasks).then((res) => {
+ seletedSceneList.value = [];
+ fetchSubTask(props.dayTask.guid);
+ ElMessage({
+ message: '宸℃煡浠诲姟娣诲姞鎴愬姛',
+ type: 'success'
+ });
+ emit('submit')
+ });
+ }
+ });
+}
+
+function deleteSubtasks() {
+ emit('submit')
}
</script>
<style scoped></style>
--
Gitblit v1.9.3