|
@@ -171,7 +171,10 @@ export const GET_TEAM_DIALOG_HTML = (item: ResourceItemDetail) => {
|
|
|
};
|
|
|
|
|
|
|
|
|
-export const GET_SINGLE_DEVICE_DIALOG_HTML = (item: SingleDeviceItem) => {
|
|
|
+export const GET_SINGLE_DEVICE_DIALOG_HTML = (
|
|
|
+ item: SingleDeviceItem,
|
|
|
+ callback: Function
|
|
|
+) => {
|
|
|
const el = document.createElement('div');
|
|
|
el.innerHTML = `
|
|
|
<div>
|
|
@@ -181,15 +184,21 @@ export const GET_SINGLE_DEVICE_DIALOG_HTML = (item: SingleDeviceItem) => {
|
|
|
<div><span>设备号:</span><span>${item.deviceCode ?? '-'}</span></div>
|
|
|
<div><span>定位时间:</span><span>${item.time ?? '-'}</span></div>
|
|
|
</div>
|
|
|
- <div class="action">
|
|
|
- <button class="el-button el-button--primary el-button--small" type="button">
|
|
|
- <span>查看单兵</span>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
+
|
|
|
<i class="card-border-bottom-left"></i>
|
|
|
<i class="card-border-bottom-right"></i>
|
|
|
</div>
|
|
|
`;
|
|
|
+ const action = document.createElement('div');
|
|
|
+ action.className = 'action';
|
|
|
+ const button = document.createElement('button');
|
|
|
+ button.className = 'el-button el-button--primary el-button--small';
|
|
|
+ button.innerHTML = '查看单兵';
|
|
|
+ action.appendChild(button);
|
|
|
+ button.addEventListener('click', callback);
|
|
|
+
|
|
|
+ el.appendChild(action);
|
|
|
+
|
|
|
return el;
|
|
|
};
|
|
|
|