|
|
@@ -44,7 +44,7 @@
|
|
44
|
44
|
<script setup lang="ts">
|
|
45
|
45
|
import { Plus, Search, RefreshRight } from "@element-plus/icons-vue";
|
|
46
|
46
|
import { ref, reactive } from "vue";
|
|
47
|
|
-import { getDriverList, deleteDriver } from "@/api/PowermanagementPositioning";
|
|
|
47
|
+import { getDriverList, deleteDriver, getCrasUrl } from "@/api/PowermanagementPositioning";
|
|
48
|
48
|
import router from "@/router";
|
|
49
|
49
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
50
|
50
|
import { useDict } from "@/hooks/dict";
|
|
|
@@ -85,13 +85,43 @@ const clearSearch = () => {
|
|
85
|
85
|
};
|
|
86
|
86
|
getList();
|
|
87
|
87
|
};
|
|
|
88
|
+
|
|
|
89
|
+const buildUrlWithParams = (baseUrl: string, params: any) => {
|
|
|
90
|
+ let queryString = "";
|
|
|
91
|
+ for (let key in params) {
|
|
|
92
|
+ if (params.hasOwnProperty(key)) {
|
|
|
93
|
+ if (queryString.length > 0) {
|
|
|
94
|
+ queryString += "&";
|
|
|
95
|
+ }
|
|
|
96
|
+ queryString += key + "=" + encodeURIComponent(params[key]);
|
|
|
97
|
+ }
|
|
|
98
|
+ }
|
|
|
99
|
+
|
|
|
100
|
+ // 如果存在查询字符串,则将其添加到baseUrl后面
|
|
|
101
|
+ if (queryString.length > 0) {
|
|
|
102
|
+ return baseUrl + "?" + queryString;
|
|
|
103
|
+ } else {
|
|
|
104
|
+ return baseUrl;
|
|
|
105
|
+ }
|
|
|
106
|
+};
|
|
|
107
|
+
|
|
88
|
108
|
/** 添加/修改/查看进入详情操作 */
|
|
89
|
109
|
const openDetail = (row: any, type: string) => {
|
|
90
|
|
- setQuery("/Powermanagement/PositioningDetail", { id: row.id, type: type });
|
|
91
|
|
- // router.push({
|
|
92
|
|
- // path: "/InformationFilling/outIssueDetail",
|
|
93
|
|
- // query: {id: row.outboundId, type: type}
|
|
94
|
|
- // });
|
|
|
110
|
+ if (type == "look") {
|
|
|
111
|
+ getCrasUrl(row.id).then((res: any) => {
|
|
|
112
|
+ if (res.code === 0) {
|
|
|
113
|
+ const data = res.data;
|
|
|
114
|
+ const baseUrl = "https://public.zczy100.com/#/openTrackPlayback";
|
|
|
115
|
+ const url = buildUrlWithParams(baseUrl, data);
|
|
|
116
|
+ window.open(url);
|
|
|
117
|
+ }
|
|
|
118
|
+ });
|
|
|
119
|
+ return;
|
|
|
120
|
+ }
|
|
|
121
|
+ if (type == "edit") {
|
|
|
122
|
+ } else {
|
|
|
123
|
+ setQuery("/Powermanagement/PositioningDetail", { id: row.id, type: type });
|
|
|
124
|
+ }
|
|
95
|
125
|
};
|
|
96
|
126
|
/** 列表数据获取 */
|
|
97
|
127
|
const getList = () => {
|