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/CompSubTaskSelect.vue | 68 ++++++++++++++++++++-------------
1 files changed, 41 insertions(+), 27 deletions(-)
diff --git a/src/views/fysp/task/components/CompSubTaskSelect.vue b/src/views/fysp/task/components/CompSubTaskSelect.vue
index cdf66b9..738df23 100644
--- a/src/views/fysp/task/components/CompSubTaskSelect.vue
+++ b/src/views/fysp/task/components/CompSubTaskSelect.vue
@@ -70,15 +70,12 @@
/**
* 宸℃煡瀛愪换鍔″垱寤�
*/
-import { ref, reactive, watch, computed, onMounted } from 'vue';
+import { ref, reactive, watch, computed, onMounted, inject } from 'vue';
import { ElMessageBox, ElNotification, ElMessage } from 'element-plus';
import taskApi from '@/api/fysp/taskApi';
+import TaskProxy from '../TaskProxy';
-onMounted(() => {
- // if (props.height) {
- // scrollHeight.value =
- // }
-});
+// const topTask = inject('topTask');
const props = defineProps({
// 瀛愪换鍔¢泦鍚�
@@ -91,7 +88,7 @@
dayTask: Object
});
-const emit = defineEmits(['delete']);
+const emit = defineEmits(['submit', 'delete']);
const scrollHeight = ref('14vh');
@@ -120,10 +117,17 @@
fail('鏈�夋嫨鐩戠鍦烘櫙');
} else {
success();
+ // 灏嗕换鍔℃墽琛屼汉鏍煎紡鍖栧苟浼犻��
+ const param = TaskProxy.getExecutors(v.value.executor, executors.value);
+ emit('submit', param);
}
}
/************************* 浠诲姟鎵ц浜轰笅鎷夐�夋 *******************************/
+// onMounted(() => {
+// getExecutors(topTask.value);
+// });
+
const executors = ref([]);
// 鏄惁鍏ㄩ��
const checkAll = ref(false);
@@ -138,36 +142,46 @@
formInfo.value.executor = [];
}
}
+
+function getExecutors(t) {
+ const ids = t.executorguids.split('#');
+ const userNames = t.executorusernames.split('#');
+ const realNames = t.executorrealnames.split('#');
+ const list = [];
+ ids.forEach((e, i) => {
+ if (i < userNames.length && i < realNames.length) {
+ list.push({
+ label: realNames[i],
+ value: e,
+ data: {
+ id: e,
+ userName: userNames[i],
+ realName: realNames[i]
+ }
+ });
+ }
+ });
+
+ executors.value = list;
+}
+// watch(topTask, (nV, oV) => {
+// if (nV != oV) {
+// getExecutors(nV);
+// }
+// });
+
watch(
() => props.dayTask,
(nV, oV) => {
if (nV != oV) {
taskApi.fetchTaskById(nV.guid).then((res) => {
- const ids = res.executorguids.split('#');
- const userNames = res.executorusernames.split('#');
- const realNames = res.executorrealnames.split('#');
- const list = [];
- ids.forEach((e, i) => {
- if (i < userNames.length && i < realNames.length) {
- list.push({
- label: realNames[i],
- value: e,
- data: {
- id: e,
- userName: userNames[i],
- realName: realNames[i]
- }
- });
- }
- });
-
- executors.value = list;
+ getExecutors(res);
});
}
},
{ immediate: true }
);
-//
+
watch(
() => formInfo.value.executor,
(val) => {
--
Gitblit v1.9.3