|
@@ -1,8 +1,15 @@
|
|
|
import { IncidentItem } from '@/api/incident';
|
|
|
-import { ResourceItemDetail, SingleDeviceItem } from '@/api/resource';
|
|
|
+import {
|
|
|
+ ResourceItemDetail,
|
|
|
+ SingleDeviceItem,
|
|
|
+ getResourceItem,
|
|
|
+ ResourceItemDetailResponse,
|
|
|
+} from '@/api/resource';
|
|
|
import { useCommonStore } from '@/store';
|
|
|
import { MarkerType } from "@/store/useMarkerStore";
|
|
|
|
|
|
+
|
|
|
+
|
|
|
export const GET_INCIDENT_DIALOG_HTML = (
|
|
|
item: MarkerType,
|
|
|
callback = () => {},
|
|
@@ -93,24 +100,27 @@ export const GET_VIDEO_DIALOG_HTML = (
|
|
|
// f.按钮(方式一:跳转应急仓库详情查看物资情况,方式二:在按钮旁边打开一个列表,该列表显示应急仓库的物资情况:物资名称、型号、数量)
|
|
|
|
|
|
export const GET_WAREHOUSE_DIALOG_HTML = (item: ResourceItemDetail) => {
|
|
|
+ var header = ['序号', '名称', '型号', '规格', '仓储数量', '可用数量', '单位'];
|
|
|
const el = document.createElement('div');
|
|
|
el.innerHTML = `
|
|
|
- <div>
|
|
|
+ <div class="ckbg">
|
|
|
<div class="title">应急仓库信息</div>
|
|
|
<div class="content">
|
|
|
- <div><span>名称:</span><span>${item.name ?? '-'}</span></div>
|
|
|
+ <div><span>仓库名称:</span><span>${item.name ?? '-'}</span></div>
|
|
|
<div><span>地点:</span><span>${item.address ?? '-'}</span></div>
|
|
|
<div><span>管理单位:</span><span>${item.manageUnit ?? '-'}</span></div>
|
|
|
<div><span>联系人:</span><span>${item.contactName ?? '-'}</span></div>
|
|
|
+ <div><span>更新时间:</span><span>${item.updateTime ?? '-'}</span></div>
|
|
|
<div><span>联系方式:</span><span>${item.contactPhone ?? '-'}</span></div>
|
|
|
</div>
|
|
|
- <div class="action">
|
|
|
- <button class="el-button el-button--primary el-button--small" type="button">
|
|
|
- <span>查看物资情况</span>
|
|
|
- </button>
|
|
|
+ <div class="wz">
|
|
|
+ <table id="tbl-${item.id}">
|
|
|
+ <tr>
|
|
|
+ ${ header.map((i) => '<th>' + i + '</th>').join("")}
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ </table>
|
|
|
</div>
|
|
|
- <i class="card-border-bottom-left"></i>
|
|
|
- <i class="card-border-bottom-right"></i>
|
|
|
</div>
|
|
|
`;
|
|
|
return el;
|