Browse Source

111

master
wangxingyuan 6 months ago
parent
commit
da9cfc5aa1
74 changed files with 20772 additions and 3158 deletions
  1. +3
    -1
      package.json
  2. +4
    -0
      public/index.html
  3. BIN
      public/plugins/jessibucaPlayer/bg.jpg
  4. +1
    -0
      public/plugins/jessibucaPlayer/ff.js
  5. BIN
      public/plugins/jessibucaPlayer/ff.wasm
  6. +3
    -0
      public/plugins/jessibucaPlayer/index.js
  7. BIN
      public/plugins/jessibucaPlayer/libDecoder.wasm
  8. +7957
    -0
      public/plugins/zlmclient/ZLMRTCClient.js
  9. +1
    -0
      public/plugins/zlmclient/ZLMRTCClient.js.map
  10. +18
    -0
      src/api/algorithmConfiguration/index.js
  11. +52
    -0
      src/api/basedata/eqpbook/eqpbook.js
  12. +95
    -1
      src/api/basedata/patrolpointmnt/patrolpoint.js
  13. +131
    -12
      src/api/basedata/patrolpointmnt/patrolpointpreset.js
  14. +11
    -0
      src/api/basedata/patrolpointmnt/patroltype.js
  15. +255
    -0
      src/api/device.js
  16. +3
    -2
      src/api/equipment/equipment.js
  17. +60
    -0
      src/api/inspectionDataManage/alarmConfirm.js
  18. +13
    -0
      src/api/inspectionDataManage/exceptionPoints.js
  19. +49
    -0
      src/api/inspectionDataManage/inspectionArchive.js
  20. +21
    -0
      src/api/inspectionDataManage/inspectionReporter.js
  21. +7
    -0
      src/api/point/site_management.js
  22. BIN
      src/assets/images/collect.png
  23. BIN
      src/assets/images/eq.png
  24. BIN
      src/assets/images/ic01.png
  25. BIN
      src/assets/images/ic02.png
  26. BIN
      src/assets/images/ic03.png
  27. BIN
      src/assets/images/ic04.png
  28. BIN
      src/assets/images/r1.png
  29. BIN
      src/assets/images/r2.png
  30. BIN
      src/assets/images/r3.png
  31. BIN
      src/assets/images/r4.png
  32. BIN
      src/assets/images/r5.png
  33. BIN
      src/assets/images/r6.png
  34. BIN
      src/assets/images/r7.png
  35. BIN
      src/assets/images/r8.png
  36. BIN
      src/assets/images/renwuzhanbi.png
  37. BIN
      src/assets/images/yuntai1.png
  38. +157
    -0
      src/components/AsyncImage/index.vue
  39. +562
    -0
      src/components/Canvas/DrawShape.vue
  40. +125
    -0
      src/components/CardPagination/index.vue
  41. +442
    -0
      src/components/InspectionArchiveContrastDialog.vue
  42. +1
    -0
      src/components/VideoPlayerPlatform/index.vue
  43. +1
    -1
      src/components/VideoPlayerPlatform/players/livePlayer.vue
  44. +138
    -0
      src/components/cardBox.vue
  45. +0
    -387
      src/views/administration/administration.vue
  46. +417
    -704
      src/views/administration/edit_task.vue
  47. +389
    -646
      src/views/administration/new_task.vue
  48. +1
    -2
      src/views/area/area.vue
  49. +13
    -6
      src/views/basedata/alg/index.vue
  50. +12
    -3
      src/views/basedata/alg/subtype/index.vue
  51. +4
    -3
      src/views/basedata/bdconfig/deviceconvert/index.vue
  52. +15
    -7
      src/views/basedata/eqpbook/channel/index.vue
  53. +120
    -32
      src/views/basedata/patrolpointmnt/patrolpointpreset/index.vue
  54. +8
    -2
      src/views/basedata/patrolpointmnt/patroltype/index.vue
  55. +7
    -8
      src/views/basedata/station/index.vue
  56. +48
    -0
      src/views/common.js
  57. +151
    -48
      src/views/equipment/entry.vue
  58. +168
    -20
      src/views/equipment/equipment.vue
  59. +11
    -11
      src/views/equipment/equipment_type.vue
  60. +591
    -0
      src/views/point copy/components/site_VideoDialog copy.vue
  61. +696
    -0
      src/views/point copy/components/site_VideoDialog.vue
  62. +452
    -0
      src/views/point copy/point_mang.vue
  63. +1374
    -0
      src/views/point copy/site_management.vue
  64. +549
    -0
      src/views/point/algorithm.vue
  65. +534
    -0
      src/views/point/components/ImageAnnotation.vue
  66. +410
    -0
      src/views/point/components/chooseAlg.vue
  67. +222
    -0
      src/views/point/components/chooseDevices.vue
  68. +591
    -0
      src/views/point/components/site_VideoDialog copy.vue
  69. +119
    -14
      src/views/point/components/site_VideoDialog.vue
  70. +171
    -0
      src/views/point/components/uploadDialog.vue
  71. +531
    -0
      src/views/point/point_mang copy.vue
  72. +170
    -54
      src/views/point/point_mang.vue
  73. +2842
    -1161
      src/views/point/site_management.vue
  74. +46
    -33
      vue.config.js

+ 3
- 1
package.json View File

@ -36,13 +36,15 @@
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
},
"dependencies": {
"@riophae/vue-treeselect": "0.4.0",
"@liveqing/liveplayer": "^2.7.35",
"@riophae/vue-treeselect": "^0.4.0",
"axios": "0.28.1",
"clipboard": "2.0.8",
"core-js": "3.37.1",
"echarts": "5.4.0",
"element-ui": "2.15.14",
"file-saver": "2.0.5",
"flv.js": "^1.6.2",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
"js-beautify": "1.13.0",


+ 4
- 0
public/index.html View File

@ -8,6 +8,10 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<script src="<%= BASE_URL %>js/liveplayer-lib.min.js"></script>
<script src="<%= BASE_URL %>plugins/zlmclient/ZLMRTCClient.js"></script>
<script src="<%= BASE_URL %>plugins/jessibucaPlayer/index.js"></script>
<script src="<%= BASE_URL %>font/player/iconfont.js"></script>
<style>
html,
body,


BIN
public/plugins/jessibucaPlayer/bg.jpg View File

Before After
Width: 1000  |  Height: 599  |  Size: 145 KiB

+ 1
- 0
public/plugins/jessibucaPlayer/ff.js
File diff suppressed because it is too large
View File


BIN
public/plugins/jessibucaPlayer/ff.wasm View File


+ 3
- 0
public/plugins/jessibucaPlayer/index.js
File diff suppressed because it is too large
View File


BIN
public/plugins/jessibucaPlayer/libDecoder.wasm View File


+ 7957
- 0
public/plugins/zlmclient/ZLMRTCClient.js
File diff suppressed because it is too large
View File


+ 1
- 0
public/plugins/zlmclient/ZLMRTCClient.js.map
File diff suppressed because it is too large
View File


+ 18
- 0
src/api/algorithmConfiguration/index.js View File

@ -0,0 +1,18 @@
import request from '@/utils/request'
export function listPatroltype(query) {
return request({
url: "/basedata/alg/list",
method: "get",
params: query,
});
}
// 算法配置列表
export function listPartrolResult (query) {
return request({
url: '/basedata/subtype/list',
method: 'get',
params: query
})
}

+ 52
- 0
src/api/basedata/eqpbook/eqpbook.js View File

@ -0,0 +1,52 @@
import request from '@/utils/request'
// 查询基础数据-设备台账主列表
export function listEqpbook(query) {
return request({
url: '/basedata/eqpbook/list',
method: 'get',
params: query
})
}
// 查询基础数据-设备台账主详细
export function getEqpbook(eqpbookId) {
return request({
url: '/basedata/eqpbook/' + eqpbookId,
method: 'get'
})
}
// 新增基础数据-设备台账主
export function addEqpbook(data) {
return request({
url: '/basedata/eqpbook',
method: 'post',
data: data
})
}
// 修改基础数据-设备台账主
export function updateEqpbook(data) {
return request({
url: '/basedata/eqpbook/edit',
method: 'post',
data: data
})
}
// 删除基础数据-设备台账主
export function delEqpbook(eqpbookId) {
return request({
url: '/basedata/eqpbook/remove/' + eqpbookId,
method: 'post'
})
}
// 获取主系统字典
export function getMainSystems(){
return request({
url: '/basedata/bdconfig/mainsystem/list?pageNum=1&pageSize=10000',
method: 'get'
})
}

+ 95
- 1
src/api/basedata/patrolpointmnt/patrolpoint.js View File

@ -55,4 +55,98 @@ export function subtypeList(query) {
method: 'get',
// params: query
})
}
}
// ************
// 查询巡检点位列表
export function listPatrolpoint(query) {
return request({
url: '/basedata/patrolpointmnt/patrolpoint/list',
method: 'get',
params: query
})
}
// 查询巡检点位详细
export function getPatrolpoint(patrolpointId) {
return request({
url: '/basedata/patrolpointmnt/patrolpoint/' + patrolpointId,
method: 'get'
})
}
// 新增巡检点位
export function addPatrolpoint(data) {
return request({
url: '/basedata/patrolpointmnt/patrolpoint',
method: 'post',
data: data
})
}
// 修改巡检点位
export function updatePatrolpoint(data) {
return request({
url: '/basedata/patrolpointmnt/patrolpoint/edit',
method: 'post',
data: data
})
}
// 删除巡检点位
export function delPatrolpoint(patrolpointId) {
return request({
url: '/basedata/patrolpointmnt/patrolpoint/remove/' + patrolpointId,
method: 'post'
})
}
// 批量保存标准点位
export function addBatchList(data) {
return request({
url: '/basedata/patrolpointmnt/stdpatrolpoint/addBatchList',
method: 'post',
data: data
})
}
// 获取区域设备树
export function getAreaDeviceTree() {
return request({
url: '/basedata/prodevmnt/device/treeAreaDeviceSelect',
method: 'get'
})
}
//获取监控点位绑定的预置点列表
export function getPatroPointDevicePoints(patrolpointId) {
return request({
url: '/patrol/preset',
method: 'get',
params: {
patrolpointId
}
})
}
//解绑预置点
export function unbindPoint(presetPosIds) {
return request({
url: '/patrol/preset/remove/' + presetPosIds,
method: 'get'
})
}
//解绑预置点
export function getBdconfigMainsystem() {
return request({
url: '/basedata/bdconfig/mainsystem/getBdconfigMainsystem',
method: 'post'
})
}

+ 131
- 12
src/api/basedata/patrolpointmnt/patrolpointpreset.js View File

@ -9,17 +9,136 @@ export function getList(query) {
}
// 巡检点位
export function patrolpoint_list(query) {
return request({
url: 'basedata/patrolpointmnt/patrolpoint/list',
method: 'get',
params: query
})
}
return request({
url: '/basedata/patrolpointmnt/patrolpoint/list',
method: 'get',
params: query
})
}
// 新增
export function postAdd(query) {
return request({
url: '/basedata/patrolpointmnt/patrolpointpreset',
method: 'post',
data: query
})
}
return request({
url: '/basedata/patrolpointmnt/patrolpointpreset',
method: 'post',
data: query
})
}
// 编辑查询
export function getItem(query) {
return request({
url: `/basedata/patrolpointmnt/patrolpointpreset/${query}`,
method: 'get',
})
}
// ******
// 查询巡检点预置位列表
export function listPatrolpointpreset(query) {
return request({
url: '/basedata/patrolpointmnt/patrolpointpreset/list',
method: 'get',
params: query
})
}
// 查询巡检点预置位详细
export function getPatrolpointpreset(patrolpointPresetId) {
return request({
url: '/basedata/patrolpointmnt/patrolpointpreset/' + patrolpointPresetId,
method: 'get'
})
}
// 新增巡检点预置位
export function addPatrolpointpreset(data) {
return request({
url: '/basedata/patrolpointmnt/patrolpointpreset',
method: 'post',
data: data
})
}
// 修改巡检点预置位
export function updatePatrolpointpreset(data) {
return request({
url: '/basedata/patrolpointmnt/patrolpointpreset/edit',
method: 'post',
data: data
})
}
// 删除巡检点预置位
export function delPatrolpointpreset(patrolpointPresetId) {
return request({
url: '/basedata/patrolpointmnt/patrolpointpreset/remove/' + patrolpointPresetId,
method: 'post'
})
}
// 启用停用点位
export function editPoint(data) {
return request({
url: '/patrol/preset/param/edit',
method: 'post',
data
})
}
// 获取无人机红外图片
export function irUavImg(data) {
return request({
url: '/simulator/ir/channelImg',
method: 'post',
data
})
}
// 点位管理
// 传送无人机图片画框消息
export function capturePicture(data) {
return request({
url: '/simulator/ir/capturePicture',
method: 'post',
data
})
}
// 任务详情
// 获取已经画过的框的数据
export function selectBoxData(data) {
return request({
url: '/simulator/ir/selectBoxData',
method: 'post',
data
})
}
// 清楚所有框
export function clearBoxData(data) {
return request({
url: '/simulator/ir/deleteBoxData',
method: 'post',
data
})
}
// 保存画框的数据
export function addBoxData(data) {
return request({
url: '/simulator/ir/addBoxData',
method: 'post',
data
})
}
// 获取csv文件
export function downloadCsv(data) {
return request({
url: '/simulator/ir/downloadCsv',
method: 'post',
data
})
}

+ 11
- 0
src/api/basedata/patrolpointmnt/patroltype.js View File

@ -46,4 +46,15 @@ export function listPatroltype(query) {
method: "get",
params: query,
});
}
export function getDeviceList(deviceCode, channelCode) {
return request({
url: `/patrol/preset/listByEqIdAndChannelId`,
params: {
patroldeviceCode: deviceCode,
channelCode: channelCode,
},
method: "get",
});
}

+ 255
- 0
src/api/device.js View File

@ -0,0 +1,255 @@
import request from '@/utils/request'
import { type } from 'os'
/**
* 控制设备
* @param {*} data
* @returns
*/
export function invoke (data) {
return request({
url: '/manager/dev/control/invokeIotDevYunTaiXgFunction',
method: 'post',
data
})
}
/**
* 指定设备姿态
* @param {*} data
*/
export function invokeControl (data) {
return request({
url: '/manager/dev/control/invokeIotDevCtrlCommandFunctionForXg',
method: 'post',
data
})
}
/**
* 获取设备姿态
* @param {*}} deviceCode
*/
export function getDevicePosture (deviceCode) {
return request({
url: '/manager/dev/device/getDevStatusFromCacheByKey/' + deviceCode,
method: 'get'
})
}
/**
* 获取播放地址
* @param {*} deviceCode
* @param {*} channelCode
*/
export function getMediaUrl (deviceCode, channelCode, noAlert) {
return request({
noAlert,
url: "/patrol/video/realtime",
methods: 'get',
params: {
patroldeviceCode: deviceCode,
channelCode
}
})
}
/**
* 云台控制
* @param {*} params
*/
export function controlPanTilt (params) {
return request({
url: "/patrol/videotape/ptz",
methods: 'get',
params
})
}
/**
* 刷新联动数据
*/
export function refreshUnionTaskData () {
return request({
url: "/patrol/linkage/popup",
methods: 'get'
})
}
/**
* 获取通道列表
*/
export function getDeviceChannelList (deviceCode) {
return request({
url: "/basedata/eqpbook/channel/getChannelByEqpbookCode",
methods: 'get',
params: {
patroldeviceCode: deviceCode
}
})
}
/**
* 根据任务获取巡视设备及视频通道树
*/
export function taskByEqbookchannel (taskCode) {
return request({
url: "/patrol/task/taskByEqbookchannel",
methods: 'get',
params: {
taskCode: taskCode
}
})
}
/**
* 控制机器人
*/
export function controlRobot (deviceCode, type, command, value = null) {
const data = {
Code: deviceCode,
Type: type,
Command: command
}
if (value) {
data.Items = [
{
Value: value
}
]
}
return request({
url: "/patrol/client/send",
method: 'post',
data
})
}
/**
* 控制机器人带验证
*/
export function controlRobotWithVerifition (deviceCode, type, command, value = null) {
const data = {
Code: deviceCode,
Type: type,
Command: command
}
if (value) {
data.Items = [
{
Value: value
}
]
}
return request({
url: "/patrol/client/sendImportantMsg",
method: 'post',
data
})
}
/**
* 心跳
* @param {*} streamId
* @returns
*/
export function recordHeartbeat (streamId) {
return request({
url: '/patrol/videotape/heartbeat',
method: 'get',
params: {
streamId: streamId
}
})
}
/**
* 开始录像
* @param {*} streamId
* @param {*} action 0 / 1
* @returns
*/
export function record (streamId, action = 0) {
return request({
url: '/patrol/videotape/record',
method: 'get',
params: {
streamid: streamId,
action
}
})
}
/**
* 获取服务器信息
* @returns
*/
export function getServiceDeviceInfo () {
return request({
url: '/patrol/client/systemInfo',
method: 'get',
params: {}
})
}
/**
* 获取服务器信息
* @returns
*/
export function getTemperatureValue (shapeInfo, type, imgUrl) {
return request({
url: '/patrol/infrared',
method: 'get',
params: {
imgUrl,
coordinate: shapeInfo,
type
}
})
}
/**
* 获取nvr信息
* @returns
*/
export function getNvrInfoList () {
return request({
url: '/basedata/nvr/selectNewInfo',
method: 'post',
data: {}
})
}
/**
* 获取nvr信息在线状态
* @returns
*/
export function getAllNvrDeviceOlineStatusDataByCache () {
return request({
url: '/basedata/montdata/querydata/getAllNvrDeviceOlineStatusDataByCache',
method: 'get',
data: {}
})
}
/**
* 修改声纹
* @returns
*/
export function changeVoiceState (deviceId, bflag) {
return request({
url: '/voicedata/swOn',
method: 'get',
params: {
devId: deviceId,
flag: bflag ? 'ON' : 'OFF'
}
})
}

+ 3
- 2
src/api/equipment/equipment.js View File

@ -79,8 +79,9 @@ export function mainsystemList(query) {
// 导出
export function download(query) {
return request({
url: '/basedata/eqpbook/export',
url: `/basedata/eqpbook/export`,
method: 'post',
data: query
})
}
}
// 图片上传

+ 60
- 0
src/api/inspectionDataManage/alarmConfirm.js View File

@ -0,0 +1,60 @@
// 告警确认
import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";
// 告警确认列表
export function listAlarmConfirm(query) {
return request({
url: "/patrol/analysis/list",
method: "get",
params: query,
});
}
// 告警确认详情
export function getAlarmConfirmDetail(id) {
return request({
url: "/patrol/analysis/" + parseStrEmpty(id),
method: "get",
});
}
// 告警确认处理
export function handleAlarmConfirm(params) {
return request({
url: "/patrol/analysis/updateWarn",
method: "get",
params: params,
});
}
// 批量告警确认处理
export function handleBatchAlarmConfirm(params) {
return request({
url: "/patrol/analysis/updateWarn",
method: "get",
params: params,
});
}
// 设备树
export function getDeviceTree(params = {}) {
return request({
url: "/basedata/prodevmnt/device/treeAreaDeviceSelect",
method: "get",
params: params,
});
}
// 获取全部算法列表
export function getAllAlgorithmList() {
return request({
url: "/basedata/subtype/list",
method: "get",
params: {
pageNum: 1,
pageSize: 99999,
},
});
}

+ 13
- 0
src/api/inspectionDataManage/exceptionPoints.js View File

@ -0,0 +1,13 @@
// 异常点位
import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
// 异常点位列表
export function listAbnormalPoints(query) {
return request({
url: '/patrol/analysis/abnormal',
method: 'get',
params: query
})
}

+ 49
- 0
src/api/inspectionDataManage/inspectionArchive.js View File

@ -0,0 +1,49 @@
// 告警确认
import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
// 巡视结果列表
export function listPartrolResult (query) {
return request({
url: '/patrol/resultmain/list',
method: 'get',
params: query
})
}
// 巡视结果修正
export function correctPartrolResult (params) {
return request({
url: '/patrol/partrolresult/edit',
method: 'post',
data: params
})
}
// 巡视详情
export function partrolResultDetail (params) {
return request({
url: '/patrol/partrolresult/detail',
method: 'get',
params
})
}
// 巡视详情列表
export function listPartrolResultDetail (params) {
return request({
url: '/patrol/partrolresult/list',
method: 'get',
params
})
}
// 归档
export function partrolResultArchive (params) {
return request({
url: '/patrol/resultmain/updateInfo',
method: 'get',
params
})
}

+ 21
- 0
src/api/inspectionDataManage/inspectionReporter.js View File

@ -0,0 +1,21 @@
// 巡视报告
import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";
// 异常点位列表
export function listPatrolReport(query) {
return request({
url: "/patrol/insreport/list",
method: "get",
params: query,
});
}
export function getPatrolReport(lineId,filter) {
return request({
url: `/patrol/insreport/${lineId}/${filter}`,
method: "get",
params: {},
});
}

+ 7
- 0
src/api/point/site_management.js View File

@ -85,6 +85,13 @@ export function vl(){
// data:query
})
}
export function ir(){
return request({
url: `/patrol/preset/camera/ir`,
method: 'get',
// data:query
})
}
// 获取摄像头列表
export function listByEqIdAndChannelId(data){
return request({


BIN
src/assets/images/collect.png View File

Before After
Width: 17  |  Height: 100  |  Size: 998 B

BIN
src/assets/images/eq.png View File

Before After
Width: 258  |  Height: 184  |  Size: 28 KiB

BIN
src/assets/images/ic01.png View File

Before After
Width: 38  |  Height: 38  |  Size: 1.4 KiB

BIN
src/assets/images/ic02.png View File

Before After
Width: 36  |  Height: 8  |  Size: 1019 B

BIN
src/assets/images/ic03.png View File

Before After
Width: 39  |  Height: 40  |  Size: 1.3 KiB

BIN
src/assets/images/ic04.png View File

Before After
Width: 38  |  Height: 39  |  Size: 1.2 KiB

BIN
src/assets/images/r1.png View File

Before After
Width: 55  |  Height: 24  |  Size: 1.2 KiB

BIN
src/assets/images/r2.png View File

Before After
Width: 55  |  Height: 24  |  Size: 1.5 KiB

BIN
src/assets/images/r3.png View File

Before After
Width: 55  |  Height: 24  |  Size: 1.6 KiB

BIN
src/assets/images/r4.png View File

Before After
Width: 55  |  Height: 24  |  Size: 1.5 KiB

BIN
src/assets/images/r5.png View File

Before After
Width: 55  |  Height: 24  |  Size: 1.9 KiB

BIN
src/assets/images/r6.png View File

Before After
Width: 23  |  Height: 23  |  Size: 1.4 KiB

BIN
src/assets/images/r7.png View File

Before After
Width: 23  |  Height: 23  |  Size: 1.4 KiB

BIN
src/assets/images/r8.png View File

Before After
Width: 23  |  Height: 23  |  Size: 1.4 KiB

BIN
src/assets/images/renwuzhanbi.png View File

Before After
Width: 32  |  Height: 32  |  Size: 3.0 KiB

BIN
src/assets/images/yuntai1.png View File

Before After
Width: 334  |  Height: 334  |  Size: 24 KiB

+ 157
- 0
src/components/AsyncImage/index.vue View File

@ -0,0 +1,157 @@
<template>
<el-image
:fit="fit"
:preview-src-list="imageList"
:src="imgUrl"
@load="handleImageLoad"
@error="handleImageLoadError"
@click="onClicked"
>
<div slot="placeholder" class="image-slot">
加载中<span class="dot">...</span>
</div>
<div slot="error" class="image-slot">
{{ errorTips }}
</div>
</el-image>
</template>
<script>
// import { ftpImageViewUrl } from "@/utils/index";
import { mapGetters } from "vuex";
import { getConfigByKeys } from "@/api/system/config";
import store from "@/store";
export default {
name: "AsyncImage",
components: {},
props: {
fit: {
type: String,
default: "scale-down",
},
srcList: {
type: Array,
default: () => [],
},
src: {
type: String,
default: "",
},
errorTips: {
type: String,
default: "加载失败",
},
supportPreview: {
type: Boolean,
default: false,
},
},
async created() {},
data() {
return {
imgUrl: "",
loading: false,
imageList: [],
config: null,
};
},
computed: {
...mapGetters(["systemParams"]),
},
methods: {
async ftpImageViewUrl(url) {
if (url.startsWith("http://") || url.startsWith("https://")) {
return url;
}
if (!this.systemParams.ftpViewAddress) {
const systemParams = {};
await getConfigByKeys([
"EXTRANET_ADDRESS",
"EXTRANET_FTP_VIEW_ADDRESS",
"INTRANET_FTP_VIEW_ADDRESS",
"VIRTUAL_RTC_MEDIAURL",
"EXTRANET_MEDIA_URL",
"INTRANET_MEDIA_URL",
"VIRTUAL_FLV_MEDIAURL",
"INTRANET_FLV_MEDIA_URL",
"EXTRANET_FLV_MEDIA_URL",
]).then((res) => {
res.data.forEach((x) => {
systemParams[x.configKey] = x.configValue;
});
systemParams.PREFIX =
location.hostname === systemParams.EXTRANET_ADDRESS
? "EXTRANET"
: "INTRANET";
systemParams.ftpViewAddress =
systemParams[systemParams.PREFIX + "_FTP_VIEW_ADDRESS"];
systemParams.MEDIA_URL =
systemParams[systemParams.PREFIX + "_MEDIA_URL"];
systemParams.FLV_MEDIA_URL =
systemParams[systemParams.PREFIX + "_FLV_MEDIA_URL"];
});
return systemParams.ftpViewAddress + url;
} else {
return this.systemParams.ftpViewAddress + url;
}
},
async getUrls(val) {
this.imageList = [];
const urls = [];
for (let index = 0; index < val.length; index++) {
const element = val[index];
urls.push(await this.ftpImageViewUrl(element));
}
if (this.supportPreview) {
this.imageList = urls;
}
},
handleImageLoad(e) {
const imgOriginalHeight = e.target.naturalHeight;
const imgOriginalWidth = e.target.naturalWidth;
this.$emit("imgload", { imgOriginalHeight, imgOriginalWidth });
},
handleImageLoadError() {
this.$emit("imgloaderror");
},
onClicked() {
this.$emit("click");
},
},
watch: {
srcList: {
handler(val) {
this.getUrls(val);
},
immediate: true,
},
src: {
async handler(val) {
if (val && val.length > 0) {
this.imgUrl = await this.ftpImageViewUrl(val);
if (this.srcList.length === 0) {
this.getUrls([val]);
}
} else {
this.imgUrl = "";
}
},
immediate: true,
},
},
};
</script>
<style scoped>
.image-slot {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
color: #ddd;
}
</style>

+ 562
- 0
src/components/Canvas/DrawShape.vue View File

@ -0,0 +1,562 @@
<template>
<canvas class="drawCanvas" v-show="visible" ref="canvas" @contextmenu="canvasContextMenu" :width="canvasWidth"
:height="canvasHeight">
</canvas>
</template>
<script>
/**
* 所有图形类都继承形状基类
* 每个图形自己实现相关交互包括不限于响应点击鼠标移动鼠标按下鼠标抬起等事件
* 与canvas拖拽鼠标按下相关事件区分开
* 这样更好维护
*/
class Shape {
//
draw () { }
startDraw () { }
stopDraw () { }
getData () { }
setData () { }
constructor(canvasEl, context, hub) {
this.type = ''
this.canvasEl = canvasEl;
this.context = context;
//
this.x1 = 0;
this.y1 = 0;
//
this.isDragging = false;
//false
this.isStretching = false;
//
this.isActive = false;
//
this.isDrawing = false;
//线
this.hub = hub;
}
stopDraw () {
this.isDragging = false;
this.canvasEl.onmouseup = null;
this.canvasEl.onmousemove = null;
this.canvasEl.onmousedown = null;
}
}
/**
* 多边形
*/
class Polygon extends Shape {
constructor(hub, canvas, ctx) {
super(canvas, ctx, hub);
this.points = [];
this.type = 'Polygon'
this.clickCount = 0
}
setData (data) {
const temp = data.split(',')
const x = temp[0]
const y = temp[1]
const w = temp[2]
const h = temp[3]
const cw = temp[4]
const ch = temp[5]
}
getData () {
let data = []
this.points.forEach(p => {
data = data.concat(p)
})
data = data.concat([this.canvasEl.clientWidth, this.canvasEl.clientHeight])
return {
type: 'Polygon',
data: data.join(',')
}
}
/**
* 绘制方法
*/
draw (point) {
const rect = this;
//
this.context.strokeStyle = rect.color || "#FF0000";
this.context.clearRect(0, 0, this.canvasEl.clientWidth, this.canvasEl.clientHeight);
//
const points = point ? this.points.concat([point]) : this.points;
this.context.beginPath();
this.context.moveTo(points[0][0], points[0][1]);
for (let i = 1; i < points.length; i++) {
this.context.lineTo(points[i][0], points[i][1]);
}
this.context.closePath();
this.context.stroke();
}
startDraw () {
this.isDrawing = true;
this.clickCount = 0;
const me = this;
this.canvasEl.onmouseup = (e) => {
me.mouseUp(e);
};
this.canvasEl.onmousemove = (e) => {
me.mouseMove(e);
};
}
mouseUp (e) {
//
const point = [e.offsetX, e.offsetY];
if (this.isDrawing) {
// this.clickCount += 1;
if (e.button === 2) {
this.isDrawing = false;
this.hub({
key: 'drawFinish',
data: this
})
this.draw();
} else {
this.points.push(point)
}
this.draw();
}
//
this.isStretching = false;
this.isDragging = false;
}
mouseMove (e) {
//
const point = [e.offsetX, e.offsetY];
if (this.isDrawing) {
this.draw(point);
}
}
}
/**
* 折线非闭合用于现场管控
*/
class BrokenLine extends Shape {
constructor(hub, canvas, ctx) {
super(canvas, ctx, hub);
this.points = [];
this.type = 'BrokenLine'
this.clickCount = 0
// 线
this.lineCount = 0;
}
setData (data) {
const temp = data.split(',')
const x = temp[0]
const y = temp[1]
const w = temp[2]
const h = temp[3]
const cw = temp[4]
const ch = temp[5]
}
getData () {
let data = []
this.points.forEach(p => {
data = data.concat(p)
})
data = data.concat([this.canvasEl.clientWidth, this.canvasEl.clientHeight])
return {
type: 'BrokenLine',
data: data.join(',')
}
}
/**
* 绘制方法
*/
draw (point) {
const rect = this;
//
this.context.strokeStyle = rect.color || "#FF0000";
this.context.clearRect(0, 0, this.canvasEl.clientWidth, this.canvasEl.clientHeight);
//
const points = point ? this.points.concat([point]) : this.points;
this.context.beginPath();
this.context.moveTo(points[0][0], points[0][1]);
for (let i = 1; i < points.length; i++) {
this.context.lineTo(points[i][0], points[i][1]);
}
// this.context.closePath();
this.context.stroke();
}
startDraw () {
this.isDrawing = true;
this.clickCount = 0;
const me = this;
this.canvasEl.onmouseup = (e) => {
me.mouseUp(e);
};
this.canvasEl.onmousemove = (e) => {
me.mouseMove(e);
};
}
// 线
isNeedOverDraw () {
if (this.lineCount <= 0) {
return false
}
// 线-1
return (this.lineCount <= this.clickCount - 1)
}
mouseUp (e) {
//
const point = [e.offsetX, e.offsetY];
if (this.isDrawing) {
this.clickCount += 1;
if (e.button === 2) {
this.isDrawing = false;
this.hub({
key: 'drawFinish',
data: this
})
this.draw();
} else {
this.points.push(point)
}
//
if (this.isNeedOverDraw()) {
this.isDrawing = false;
this.hub({
key: 'drawFinish',
data: this
})
}
this.draw();
}
//
this.isStretching = false;
this.isDragging = false;
}
mouseMove (e) {
//
const point = [e.offsetX, e.offsetY];
if (this.isDrawing) {
this.draw(point);
}
}
}
/**
* 矩形类
*/
class Rectangle extends Shape {
/**
* 矩形类
* @param canvasEl canvas 元素对象
* @param context object canvas 上下文
* @param x int 默认 0
* @param y int 默认 0
* @param width 宽度 默认 100
* @param height 高度 默认 100
* @param lineColr string 绘制线的颜色
*/
constructor(hub, canvasEl, context, x, y, width, height, lineColor = '#FF0000') {
//
super(canvasEl, context, hub);
this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.color = lineColor;
this.type = 'Rectangle';
this.clickCount = 0;
}
setData (data) {
const temp = data.split(',')
const x = temp[0]
const y = temp[1]
const w = temp[2]
const h = temp[3]
const cw = temp[4]
const ch = temp[5]
}
getData () {
//
let data = [this.x, this.y, this.x + this.width, this.y, this.x + this.width, this.y + this.height, this.x, this.y + this.height, this.canvasEl.clientWidth, this.canvasEl.clientHeight]
if (this.width < 0 && this.height > 0) {
data = [this.x + this.width, this.y, this.x, this.y, this.x, this.y + this.height, this.x + this.width, this.y + this.height, this.canvasEl.clientWidth, this.canvasEl.clientHeight]
}
else if (this.width > 0 && this.height < 0) {
data = [this.x, this.y + this.height, this.x + this.width, this.y + this.height, this.x + this.width, this.y, this.x, this.y, this.canvasEl.clientWidth, this.canvasEl.clientHeight]
}
else if (this.width < 0 && this.height < 0) {
data = [this.x + this.width, this.y + this.height, this.x, this.y + this.height, this.x, this.y, this.x + this.width, this.y, this.canvasEl.clientWidth, this.canvasEl.clientHeight]
}
return {
type: 'Rectangle',
data: data.join(',')
}
}
/**
* 绘制方法
*/
draw () {
const rect = this;
//
this.context.strokeStyle = rect.color || "#FF0000";
if (this.isDrawing) {
this.context.clearRect(0, 0, this.canvasEl.clientWidth, this.canvasEl.clientHeight);
}
//
this.context.strokeRect(rect.x, rect.y, rect.width, rect.height);
}
startDraw () {
this.isDrawing = true;
this.clickCount = 0;
const me = this;
this.canvasEl.onmouseup = (e) => {
me.mouseUp(e);
};
this.canvasEl.onmousemove = (e) => {
me.mouseMove(e);
};
}
mouseUp (e) {
if (this.isDrawing) {
this.clickCount += 1;
if (this.clickCount === 1) {
const point = [e.offsetX, e.offsetY]
this.x = point[0];
this.y = point[1];
}
if (this.clickCount > 1) {
this.isDrawing = true;
this.clickCount = 0
this.hub({
key: 'drawFinish',
data: this
})
}
}
//
this.isStretching = false;
this.isDragging = false;
}
mouseMove (e) {
//
const point = [e.offsetX, e.offsetY];
if (this.isDrawing && this.clickCount > 0) {
//
this.width = point[0] - this.x;
this.height = point[1] - this.y;
this.draw();
}
}
}
/**
*
*/
class Point extends Shape {
constructor(hub, canvas, ctx) {
super(canvas, ctx, hub);
this.points = [];
this.type = "Point";
this.clickCount = 0;
}
setData (data) {
const temp = data.split(",");
const x = temp[0];
const y = temp[1];
const w = temp[2];
const h = temp[3];
const cw = temp[4];
const ch = temp[5];
}
getData () {
let data = [];
this.points.forEach((p) => {
data = data.concat(p);
});
data = data.concat([this.canvasEl.clientWidth, this.canvasEl.clientHeight]);
return {
type: "Point",
data: data.join(","),
};
}
/**
* 绘制方法
*/
draw (point) {
const rect = this;
//
this.context.strokeStyle = rect.color || "#FF0000";
this.context.clearRect(
0,
0,
this.canvasEl.clientWidth,
this.canvasEl.clientHeight
);
//
const points = point ? this.points.concat([point]) : this.points;
this.context.beginPath();
this.context.arc(point[0], point[1], 5, 0, 360, false);
// this.context.fillstyle="#FF0000";
this.context.fill();
// this.context.moveTo(points[0][0], points[0][1]);
// for (let i = 1; i < points.length; i++) {
// this.context.lineTo(points[i][0], points[i][1]);
// }
// this.context.closePath();
this.context.stroke();
}
startDraw () {
this.isDrawing = true;
this.clickCount = 0;
const me = this;
this.canvasEl.onmousedown = (e) => {
me.mousedown(e);
};
}
mousedown (e) {
// if (!this.isDrawing) {
// return
// }
//
const point = [e.offsetX, e.offsetY];
this.draw(point)
this.points = [point]
this.isDrawing = false;
this.hub({
key: 'drawFinish',
data: this
})
}
}
const ShapeEnum = {
"rect": "Rectangle",
"brokenline": "BrokenLine",
"polygon": "Polygon",
"point": "Point",
}
class ShapeFactory {
static createShape (shapeEnum, canvas, ctx, messageHub) {
switch (shapeEnum) {
case "Rectangle":
return new Rectangle(messageHub, canvas, ctx, 0, 0, 10, 10);
case "BrokenLine":
return new BrokenLine(messageHub, canvas, ctx);
case "Polygon":
return new Polygon(messageHub, canvas, ctx);
case "Point":
return new Point(messageHub, canvas, ctx);
}
}
}
/**
* 转换坐标系
*/
function toTargetRect (sourceRect, targetRect) {
const sourceX = sourceRect[0], sourceY = sourceRect[1], sourceWidth = sourceRect[2], sourceHeight = sourceRect[3], sourceCanvasWidth = sourceRect[4], sourceCanvasHeight = sourceRect[5];
let targetX = targetRect[0], targetY = targetRect[1], targetWidth = targetRect[2], targetHeight = targetRect[3], targetCanvasWidth = targetRect[4], targetCanvasHeight = targetRect[5];
const scaleX = targetCanvasWidth / sourceCanvasWidth, scaleY = targetCanvasHeight / sourceCanvasHeight;
targetX = sourceX * scaleX;
targetY = sourceY * scaleY;
targetWidth = sourceWidth * scaleX;
targetHeight = sourceHeight * scaleY;
return [targetX, targetY, targetWidth, targetHeight, targetCanvasWidth, targetCanvasHeight];
}
export {
Rectangle,
toTargetRect,
ShapeEnum
}
import lodash from 'lodash'
export default {
props: {
// 线线
brokenLineCount: {
type: Number,
default: 0
}
},
data () {
return {
visible: false,
canvasWidth: 400,
canvasHeight: 300,
// canvas
canvas: null,
context: null,
//
drawingShape: null
}
},
methods: {
canvasContextMenu (e) {
e.cancelBubble = true
e.preventDefault();
},
show () {
this.visible = true
},
hide () {
this.visible = false
},
startDraw (shapeEnum) {
const me = this
//
this.context.clearRect(0, 0, this.canvas.clientWidth, this.canvas.clientHeight);
if (this.drawingShape) {
this.drawingShape.stopDraw()
}
this.drawingShape = ShapeFactory.createShape(shapeEnum, this.canvas, this.context, ({ key }) => {
if (key === 'drawFinish') {
me.stopDraw();
}
});
// 线线
if (shapeEnum == ShapeEnum.brokenline) {
this.drawingShape.lineCount = this.brokenLineCount
}
this.drawingShape.startDraw();
},
stopDraw () {
this.$emit('drawComplete', lodash.cloneDeep(this.drawingShape));
},
clearShapes () {
this.context.clearRect(0, 0, this.canvas.clientWidth, this.canvas.clientHeight);
},
/**
* 初始化事件
*/
init () {
this.canvasWidth = this.$refs.canvas.clientWidth;
this.canvasHeight = this.$refs.canvas.clientHeight;
this.canvas = this.$refs.canvas;
this.context = this.canvas.getContext("2d");
}
}
}
</script>
<style scoped lang="scss">
.drawCanvas {
box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
border: 1px solid blueviolet;
// background-color: rgba(230, 214, 245, 0.562);
width: 100%;
height: 100%;
z-index: 100;
}
</style>

+ 125
- 0
src/components/CardPagination/index.vue View File

@ -0,0 +1,125 @@
<template>
<div :class="{ hidden: hidden }" class="pagination-container">
<el-pagination
:background="background"
:current-page.sync="currentPage"
:page-size.sync="pageSize"
:layout="layout"
:page-sizes="pageSizes"
:pager-count="pagerCount"
:total="total"
v-bind="$attrs"
popper-class="card-select-dropdown"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import { scrollTo } from "@/utils/scroll-to";
export default {
name: "CardPagination",
props: {
total: {
required: true,
type: Number,
},
page: {
type: Number,
default: 1,
},
limit: {
type: Number,
default: 20,
},
pageSizes: {
type: Array,
default() {
return [10, 20, 30, 50];
},
},
// 5
pagerCount: {
type: Number,
default: document.body.clientWidth < 992 ? 5 : 7,
},
layout: {
type: String,
default: "total, sizes, prev, pager, next, jumper",
},
background: {
type: Boolean,
default: true,
},
autoScroll: {
type: Boolean,
default: true,
},
hidden: {
type: Boolean,
default: false,
},
},
data() {
return {};
},
computed: {
currentPage: {
get() {
return this.page;
},
set(val) {
this.$emit("update:page", val);
},
},
pageSize: {
get() {
return this.limit;
},
set(val) {
this.$emit("update:limit", val);
},
},
},
methods: {
handleSizeChange(val) {
if (this.currentPage * val > this.total) {
this.currentPage = 1;
}
this.$emit("pagination", { page: this.currentPage, limit: val });
if (this.autoScroll) {
scrollTo(0, 800);
}
},
handleCurrentChange(val) {
this.$emit("pagination", { page: val, limit: this.pageSize });
if (this.autoScroll) {
scrollTo(0, 800);
}
},
},
};
</script>
<style lang="scss" scoped>
.pagination-container {
background: #fff;
padding: 0px 20px !important;
margin-top: 5px;
margin-bottom: 0px;
::v-deep .el-pagination span:not([class*="suffix"]),
::v-deep .el-pagination button {
font-size: 14px;
}
::v-deep .el-pager li {
font-size: 14px;
}
}
.pagination-container.hidden {
display: none;
}
</style>

+ 442
- 0
src/components/InspectionArchiveContrastDialog.vue View File

@ -0,0 +1,442 @@
<template>
<el-dialog
:title="title"
:visible.sync="visible"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
:before-close="handleClose"
width="90%"
append-to-body
>
<div v-if="showInfo">
<div
class="flex-row"
v-if="newInfo && originalInfo.value != newInfo.value"
>
<div class="data-wrap">
<el-card>
<div class="home_box_title">修正原数据</div>
<el-descriptions :column="1" border>
<el-descriptions-item>
<template slot="label"> </template>
{{ originalInfo.value }}
</el-descriptions-item>
</el-descriptions>
</el-card>
</div>
<div class="data-wrap">
<el-card>
<div class="home_box_title">修正后数据</div>
<el-descriptions :column="1" border>
<el-descriptions-item>
<template slot="label"> </template>
<span style="color: red">{{ newInfo.value }}</span>
</el-descriptions-item>
</el-descriptions>
</el-card>
</div>
</div>
<div style="padding: 10px">
<el-card>
<div class="home_box_title">详情数据</div>
<el-descriptions :column="3" border>
<el-descriptions-item>
<template slot="label"> 巡视设备 </template>
{{ showInfo.patroldeviceName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 巡视编号 </template>
{{ showInfo.patroldeviceCode }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 巡视任务执行ID </template>
{{ showInfo.taskPatrolledId }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 任务名称 </template>
{{ showInfo.taskName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 任务编码 </template>
{{ showInfo.taskCode }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 识别类型 </template>
<dict-tag
:options="dict.type.patrol_result_recognition_type"
:value="showInfo.recognitionType"
/>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 数据来源 </template>
{{ getDataTypeStr(showInfo.dataType) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 设备点位名称 </template>
{{ showInfo.deviceName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 设备点位ID </template>
{{ showInfo.deviceId }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 时间 </template>
{{ showInfo.time }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 值类型 </template>
<dict-tag
:options="dict.type.patrol_result_value_type"
:value="showInfo.valueType"
/>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> </template>
{{ showInfo.value }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 值带单位 </template>
{{ showInfo.valueUnit }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 单位 </template>
{{ showInfo.unit }}
</el-descriptions-item>
<!-- <el-descriptions-item>
<template slot="label"> 阈值 </template>
{{ showInfo.threshold }}
</el-descriptions-item> -->
<el-descriptions-item>
<template slot="label"> 结论 </template>
<dict-tag
:options="dict.type.patrol_result_valid_type"
:value="showInfo.valid"
/>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 归档状态 </template>
{{ originalInfo.patrolStatus == 1 ? "已归档" : "未归档" }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 审核人 </template>
{{ originalInfo.checkPerson }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 审核时间 </template>
{{ originalInfo.checkTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 巡视结论 </template>
{{ originalInfo.checkResult }}
</el-descriptions-item>
</el-descriptions>
<div class="file-info-wrap">
<div class="home_box_title">阈值</div>
<el-table :data="thresholdList">
<el-table-column label="序号" type="index" />
<el-table-column label="算法类型" align="center" prop="code">
<template slot-scope="scope">
<span>{{ getAlgorithmName(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column label="最小值" align="center" prop="lowerValue">
<template slot-scope="scope">
<span>{{
scope.row.lowerValue ? scope.row.lowerValue : "-"
}}</span>
</template>
</el-table-column>
<el-table-column label="最大值" align="center" prop="upperValue">
<template slot-scope="scope">
<span>{{
scope.row.upperValue ? scope.row.upperValue : "-"
}}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="file-info-wrap" v-if="showInfo.photo.length > 0">
<div class="home_box_title">识别图片</div>
<el-row>
<el-col
:span="12"
style="padding: 5px"
v-for="(item, index) in showInfo.photo"
:key="index"
>
<div
class="img-item-bg"
@click="previewImages(index, showInfo.photo)"
>
<!-- 图片 -->
<AsyncImage
style="width: 100%; height: 100%"
fit="contain"
:src="item"
></AsyncImage>
</div>
</el-col>
</el-row>
</div>
<div class="file-info-wrap" v-if="showInfo.infraRed.length > 0">
<div class="home_box_title">红外图谱</div>
<el-row>
<el-col
:span="12"
style="padding: 5px"
v-for="(item, index) in showInfo.infraRed"
:key="index"
>
<div
class="img-item-bg"
@click="previewImages(index, showInfo.infraRed)"
>
<!-- 图片 -->
<AsyncImage
style="width: 100%; height: 100%"
fit="contain"
:src="item"
></AsyncImage>
</div>
</el-col>
</el-row>
</div>
<div class="file-info-wrap" v-if="showInfo.visible.length > 0">
<div class="home_box_title">可见光照片</div>
<el-row>
<el-col
:span="12"
style="padding: 5px"
v-for="(item, index) in showInfo.visible"
:key="index"
>
<div
class="img-item-bg"
@click="previewImages(index, showInfo.visible)"
>
<!-- 图片 -->
<AsyncImage
style="width: 100%; height: 100%"
fit="contain"
:src="item"
></AsyncImage>
</div>
</el-col>
</el-row>
</div>
<div class="file-info-wrap" v-if="showInfo.audio.length > 0">
<div class="home_box_title">音频</div>
<el-row>
<el-col
:span="12"
style="padding: 5px"
v-for="(item, index) in showInfo.audio"
:key="index"
>
<div>
<audio controls :src="item"></audio>
</div>
</el-col>
</el-row>
</div>
<div class="file-info-wrap" v-if="showInfo.video.length > 0">
<div class="home_box_title">视频</div>
<el-row>
<el-col
:span="12"
style="padding: 5px"
v-for="(item, index) in showInfo.video"
:key="index"
>
<div class="img-item-bg">
<!-- 视频 -->
<AsyncVideo :src="item" />
</div>
</el-col>
</el-row>
</div>
</el-card>
</div>
</div>
<image-preview-dialog
:visible.sync="showPreviewImages"
:selectImgPosition="previewImagePos"
:imageUrls="showImgesUrls"
/>
</el-dialog>
</template>
<script>
import ImagePreviewDialog from "../../components/ImagePreviewDialog/index.vue";
import AsyncVideo from "../../components/AsyncVideo/index.vue";
import { getAllAlgorithmList } from "@/api/inspectionDataManage/alarmConfirm.js";
//
export default {
name: "InspectionArchiveContrastDialog",
components: { ImagePreviewDialog, AsyncVideo },
dicts: [
"patrol_result_value_type",
"patrol_result_recognition_type",
"patrol_result_valid_type",
],
props: {
//
title: {
type: String,
default: "巡视结果详情",
},
//
visible: {
type: Boolean,
default: false,
},
//
newInfo: {
type: Object,
require: true,
default: () => {
return {};
},
},
originalInfo: {
type: Object,
require: true,
default: () => {
return {};
},
},
},
data() {
return {
showPreviewImages: false,
previewImagePos: 0,
showImgesUrls: [],
algorithmList: [],
};
},
computed: {
//
showInfo() {
return this.newInfo ? this.newInfo : this.originalInfo;
},
thresholdList() {
if (!this.showInfo.threshold) {
return [];
}
return JSON.parse(this.showInfo.threshold);
},
},
created() {
this.getAlgorithmList();
},
methods: {
getAlgorithmList() {
getAllAlgorithmList().then((res) => {
this.algorithmList = res.rows;
});
},
//
getAlgorithmName(code) {
if (!this.algorithmList) {
return "";
}
const name = this.algorithmList.find(
(item) => item.algSubtypeCode == code
);
return name ? name.algSubtypeName : "";
},
handleClose(done) {
this.$emit("update:visible", false);
},
//
getDataTypeStr(dataType) {
switch (dataType) {
case 1:
return "摄像机";
case 2:
return "机器人";
case 3:
return "无人机";
case 4:
return "声纹";
case 5:
return "在线监测";
}
},
previewImages(index, imgUrls) {
this.previewImagePos = index;
this.showImgesUrls = imgUrls;
this.showPreviewImages = true;
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__header {
background-color: #001946;
color: #fff;
.el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.el-dialog__title {
color: #fff;
}
}
::v-deep .el-dialog__body {
background-color: #001946;
padding: 0px 20px 20px;
}
.flex-row {
display: flex;
}
.data-wrap {
flex: 1;
height: 100;
padding: 10px;
}
.home_box_title {
padding-bottom: 10px;
flex: 31px;
font-size: 20px;
&::before {
content: "";
width: 3px;
background: #1890ff;
height: 18px;
display: block;
margin-right: 5px;
float: left;
margin-top: 3px;
}
}
.file-info-wrap {
padding: 10px;
}
.img-item-bg {
background-color: #000;
width: 100%;
height: 100%;
}
</style>

+ 1
- 0
src/components/VideoPlayerPlatform/index.vue View File

@ -544,6 +544,7 @@ export default {
this.config["VIRTUAL_RTC_MEDIAURL"],
this.config.mediaHost
);
console.log("videoUrl", videoUrl);
}
return new Promise((resolve) => {
const playerObj = this.players[this.state.activeIndex];


+ 1
- 1
src/components/VideoPlayerPlatform/players/livePlayer.vue View File

@ -7,7 +7,7 @@ export default {
data () {
return {
visible: false,
videoUrl: ''
videoUrl: '',
}
},
components: {


+ 138
- 0
src/components/cardBox.vue View File

@ -0,0 +1,138 @@
<template>
<div class="card-box-bg" :style="cardBoxStyle">
<div v-if="showTitle" class="card-box-title-box" :style="titleStyle">
<div class="card-box-title">
<div
v-if="showBackBtn"
style="display: inline-block; cursor: pointer"
@click="handleBack"
>
<i class="el-icon-back"></i>
</div>
{{ title }}
</div>
<div class="title-btns-slot">
<slot name="title-btns"></slot>
</div>
</div>
<div class="content" :class="{ 'content-border': !bgImgURL }">
<slot />
</div>
</div>
</template>
<script>
export default {
name: "CardBox",
props: {
//
bgImgURL: {
type: String,
default: "",
},
//
title: {
type: String,
default: "",
},
// bgImgURL使
titleImgURL: {
type: String,
default: "",
},
showTitle: {
type: Boolean,
default: true,
},
showBackBtn: {
type: Boolean,
default: false,
},
},
data() {
return {};
},
computed: {
cardBoxStyle() {
if (this.bgImgURL) {
return {
backgroundImage: "url(" + this.bgImgURL + ")",
backgroundSize: "cover",
};
} else {
return {};
}
},
titleStyle() {
if (this.titleImgURL) {
return {
backgroundImage: "url(" + this.titleImgURL + ")",
backgroundSize: "cover",
};
} else {
return {};
}
},
},
created() {},
beforeDestroy() {},
methods: {
handleBack() {
this.$emit("onBack");
},
},
};
</script>
<style scoped>
.card-box-bg {
background-size: cover;
background-repeat: no-repeat;
background-position: center;
display: flex;
flex-direction: column;
}
.card-box-title-box {
display: flex;
flex-direction: row;
}
.card-box-title {
color: #fff;
font-size: 22px;
font-weight: bold;
height: 40px;
line-height: 40px;
margin-left: 60px;
flex: 2;
z-index: 1;
}
.title-btns-slot {
flex: 1;
display: flex;
align-items: flex-end;
justify-content: flex-end;
padding-bottom: 2px;
padding-right: 5px;
}
.content-border {
/* 分割线 */
border: 1px solid #40486a;
}
.content {
flex: 1;
height: 0;
padding: 15px;
}
</style>

+ 0
- 387
src/views/administration/administration.vue View File

@ -228,393 +228,6 @@
:limit.sync="queryParams.pageSize"
@pagination="init"
/>
<el-dialog :title="title" :visible.sync="dialogTableVisible">
<el-steps :active="active" style="margin-bottom: 20px">
<el-step :title="$t('administration.SetPlanObject')"></el-step>
<el-step :title="$t('administration.SelectInspectionObject')"></el-step>
<el-step :title="$t('administration.PointSetting')"></el-step>
</el-steps>
<el-form
ref="ruleForm"
:model="dialogForm"
label-width="110px"
:rules="rules"
>
<div v-if="dialogTableVisibleStep == 0">
<!-- 名称 -->
<el-form-item :label="$t('administration.name')" prop="taskName">
<el-input
v-model="dialogForm.taskName"
:placeholder="$t('share.PleaseEnter') + $t('administration.name')"
></el-input>
</el-form-item>
<!-- 优先级 -->
<el-form-item :label="$t('administration.priority')" prop="priority">
<el-select
v-model="dialogForm.priority"
:placeholder="$t('administration.priority')"
>
<el-option
:label="$t('administration.priority') + 1"
value="1"
></el-option>
<el-option
:label="$t('administration.priority') + 2"
value="2"
></el-option>
<el-option
:label="$t('administration.priority') + 3"
value="3"
></el-option>
<el-option
:label="$t('administration.priority') + 4"
value="4"
></el-option>
</el-select>
</el-form-item>
<!-- 任务类型 -->
<el-form-item :label="$t('administration.TaskType')" prop="type">
<el-select
v-model="dialogForm.type"
:placeholder="$t('administration.TaskType')"
>
<el-option
:label="item.patrolTypeName"
:value="item.patrolTypeId"
v-for="item in patroltype"
:key="item.patrolTypeId"
></el-option>
</el-select>
</el-form-item>
<!-- 任务执行方式 -->
<!-- <el-form-item
:label="$t('administration.TaskExecutionMethod')"
prop="executionMode"
>
<el-checkbox-group v-model="dialogForm.executionMode">
<el-checkbox label="0" name="type">{{
$t("administration.WalkThrough")
}}</el-checkbox>
</el-checkbox-group>
</el-form-item> -->
<!-- 巡检区域 -->
<el-form-item
:label="$t('administration.InspectionArea')"
prop="areaIdS"
>
<!-- :default-checked-keys="dialogForm.areaIdS" -->
<el-tree
:data="treeData"
show-checkbox
node-key="areaId"
ref="tree"
highlight-current
:props="defaultProps"
@check="setUpHandleCheckChange"
>
</el-tree>
</el-form-item>
<!-- 执行周期 -->
<el-form-item :label="$t('administration.executeCycle')">
<el-radio-group v-model="dialogForm.executionStatus">
<el-radio :label="1" :value="1">{{
$t("administration.RegularExecution")
}}</el-radio>
<el-radio :label="2" :value="2">{{
$t("administration.PeriodicExecution")
}}</el-radio>
<el-radio :label="4" :value="4">{{
$t("administration.IntervalExecution")
}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- 执行日期 -->
<el-form-item
:label="$t('administration.ExecutionDate')"
v-if="dialogForm.executionStatus == 1"
prop="fixedStartTime"
>
<el-date-picker
v-model="dialogForm.fixedStartTime"
type="datetime"
:placeholder="$t('administration.ExecutionDate')"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<div
v-if="dialogForm.executionStatus == 2"
style="margin-bottom: 20px"
>
<div class="cycle2">{{ $t("administration.timeSetting") }}</div>
<!-- 计划有效期 -->
<el-form-item
:label="$t('administration.PlanValidityPeriod')"
prop="PlanValidityPeriod"
>
<el-date-picker
v-model="dialogForm.value1"
type="datetimerange"
range-separator="-"
:start-placeholder="$t('share.StartTime')"
:end-placeholder="$t('share.EndTime')"
>
</el-date-picker>
</el-form-item>
<!-- 执行任务周期 -->
<el-form-item
:label="$t('administration.ExecutionTaskCycle')"
prop="ExecutionTaskCycle"
>
<el-select
v-model="dialogForm.region"
:placeholder="
$t('share.PleaseChoose') +
$t('administration.ExecutionTaskCycle')
"
>
<el-option
:label="$t('administration.SelectByWeek')"
value="shanghai"
></el-option>
<el-option
:label="$t('administration.MonthlySelection')"
value="beijing"
></el-option>
</el-select>
</el-form-item>
<!-- 执行日期添加 -->
<el-form-item
:label="$t('administration.ExecutionDate')"
prop="ExecutionDate"
>
<el-button type="primary" @click="executionTimeBtn"
>{{ $t("share.addTo") }}{{ executionTimeButton }}/7</el-button
>
</el-form-item>
<el-table
:data="executionTimeData"
style="width: 80%; margin-left: 10%"
>
<!-- 日期 -->
<el-table-column
:label="$t('administration.date')"
align="center"
>
<template slot-scope="scope">
<el-select
v-model="scope.row.day"
:placeholder="
$t('share.PleaseChoose') + $t('administration.date')
"
>
<el-option
:label="item.name"
:value="item.name"
v-for="(item, index) in weekData"
:key="item.id"
>{{ item.name }}</el-option
>
</el-select>
</template>
</el-table-column>
<!-- 时间 -->
<el-table-column
prop="name"
:label="$t('administration.time')"
align="center"
>
<template slot-scope="scope">
<el-time-picker
v-model="scope.row.time"
:placeholder="
$t('share.PleaseChoose') + $t('administration.time')
"
>
</el-time-picker>
</template>
</el-table-column>
<!-- 操作 -->
<el-table-column
prop="address"
:label="$t('share.delete')"
align="center"
>
<template slot-scope="scope">
<el-button
type="text"
icon="el-icon-delete"
@click="executionTimeDelet(scope.row)"
/>
</template>
</el-table-column>
</el-table>
</div>
<div
v-if="dialogForm.executionStatus == 4"
style="margin-bottom: 20px"
>
<!-- <div class="cycle2">时间设置</div> -->
<!-- 间隔 -->
<el-form-item
:label="$t('administration.interval')"
prop="interval"
>
<el-date-picker
v-model="dialogForm.value1"
type="datetimerange"
range-separator="-"
:start-placeholder="$t('share.StartTime')"
:end-placeholder="$t('share.EndTime')"
>
</el-date-picker>
</el-form-item>
<!-- 执行时间 -->
<el-form-item
:label="$t('administration.executionTime')"
prop="executionTime"
>
<el-time-picker
v-model="dialogForm.value1"
:placeholder="
$t('share.PleaseChoose') + $t('administration.executionTime')
"
>
</el-time-picker>
</el-form-item>
<!-- 间隔类型 -->
<el-form-item
:label="$t('administration.intervalType')"
prop="intervalType"
>
<el-select
v-model="dialogForm.region"
:placeholder="
$t('share.PleaseChoose') + $t('administration.intervalType')
"
>
<el-option :label="$t('share.hour')" value="小时"></el-option>
</el-select>
</el-form-item>
<!-- 数量 -->
<el-form-item
:label="$t('administration.quantity')"
prop="quantity"
>
<el-input-number
v-model="dialogForm.num"
:min="1"
></el-input-number>
</el-form-item>
</div>
<el-form-item>
<el-button @click="resetForm('ruleForm')">{{
$t("share.cancel")
}}</el-button>
<el-button type="primary" @click="submitForm(0)">{{
$t("administration.nextStep")
}}</el-button>
</el-form-item>
</div>
<!-- 选择巡检对象 -->
<div v-if="dialogTableVisibleStep == 1">
<div class="dialogTableVisibleStep1">
<div class="dialogTableVisibleStep1-content">
<div class="leftTotle">{{ $t("administration.region") }}</div>
<div
class="dialogTableVisibleStepQurey"
style="margin-bottom: 10px"
>
<el-input
:placeholder="$t('share.content')"
v-model="treeWatchInput"
>
</el-input>
<!-- <el-button
slot="append"
icon="el-icon-search"
type="primary"
></el-button> -->
</div>
<el-tree
:data="selectTreeData"
show-checkbox
node-key="areaId"
ref="selectTree"
highlight-current
:props="defaultProps"
@check="selectTreeHandleCheckChange"
:check-strictly="true"
:filter-node-method="selectTreeDataWacth"
>
</el-tree>
</div>
<div>
<el-transfer
v-model="transferValue"
:data="transferData"
:props="{ key: 'deviceId', label: 'deviceName' }"
:titles="[
$t('administration.ToBeAdded'),
$t('administration.Added'),
]"
></el-transfer>
</div>
</div>
<div
style="
margin-left: 80%;
margin-top: 20px;
display: flex;
justify-content: flex-end;
"
>
<el-button @click="returnCancel(0)">{{
$t("administration.PreviousStep")
}}</el-button>
<el-button type="primary" @click="submitForm(1)">{{
$t("administration.nextStep")
}}</el-button>
</div>
</div>
<!-- 点位设置 -->
<div v-if="dialogTableVisibleStep == 2">
<el-tree
:data="pointSettingsTreeData"
show-checkbox
node-key="areaId"
ref="pointSettingsTree"
highlight-current
:props="pointSettingsDefaultProps"
@check="pointSettingsTreeDataHandleCheckChange"
>
</el-tree>
<el-form-item
:label="$t('administration.IsItEnabled')"
prop="isenable"
>
<el-radio-group v-model="dialogForm.isenable">
<el-radio :label="0">{{ $t("share.Yes") }}</el-radio>
<el-radio :label="1">{{ $t("share.No") }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button @click="returnCancel(1)">{{
$t("administration.PreviousStep")
}}</el-button>
<el-button type="primary" @click="submitForm(2)">{{
$t("share.confirm")
}}</el-button>
</el-form-item>
</div>
<!-- <span slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm">下一步</el-button>
</span> -->
</el-form>
</el-dialog>
<!-- 复制弹框 -->
<el-dialog


+ 417
- 704
src/views/administration/edit_task.vue
File diff suppressed because it is too large
View File


+ 389
- 646
src/views/administration/new_task.vue
File diff suppressed because it is too large
View File


+ 1
- 2
src/views/area/area.vue View File

@ -351,6 +351,7 @@ export default {
});
},
handleAdd(areaId) {
this.type = 0;
this.dialogForm = {};
this.dialogForm.parentId = areaId;
let data = {
@ -364,8 +365,6 @@ export default {
this.dialogForm.parentId = val;
},
submitForm() {
console.log(this.dialogForm, 111111111);
// return
if (!this.dialogForm.parentId)
return this.$message.error("请选择上级区域");
if (this.type == 0) {


+ 13
- 6
src/views/basedata/alg/index.vue View File

@ -31,11 +31,6 @@
>{{ $t("share.new") }}</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button type="success" icon="el-icon-edit" plain size="mini">{{
$t("share.edit")
}}</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="danger"
@ -48,7 +43,7 @@
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" plain size="mini">{{
<el-button type="warning" icon="el-icon-download" plain size="mini" @click="handleExport">{{
$t("share.export")
}}</el-button>
</el-col>
@ -258,6 +253,18 @@ export default {
cancel() {
this.dialogVisible = false;
},
handleExport(){
this.download(
"/basedata/alg/export",
{
...this.queryParams,
},
`alg_${new Date().getTime()}.xlsx`
);
},
handleClose(){
this.dialogVisible = false;
}
},
};
</script>


+ 12
- 3
src/views/basedata/alg/subtype/index.vue View File

@ -64,7 +64,7 @@
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" plain size="mini">{{
<el-button type="warning" icon="el-icon-download" plain size="mini" @click="handleExport">{{
$t("share.export")
}}</el-button>
</el-col>
@ -106,7 +106,7 @@
>
</el-table-column>
<el-table-column
prop="lowerFlag"
prop="upperValue"
:label="$t('subtype.UpperLimitOfNormalRange')"
align="center"
>
@ -191,7 +191,7 @@
</el-form-item>
<el-form-item :label="$t('subtype.UpperLimitOfNormalRange')">
<el-input
v-model="dialogForm.lowerValue"
v-model="dialogForm.upperValue"
:placeholder="
$t('share.PleaseEnter') +
' ' +
@ -375,6 +375,15 @@ export default {
cancel() {
this.handleClose()
},
handleExport(){
this.download(
"/basedata/subtype/export",
{
...this.queryParams,
},
`subtype_${new Date().getTime()}.xlsx`
);
}
},
};
</script>


+ 4
- 3
src/views/basedata/bdconfig/deviceconvert/index.vue View File

@ -351,6 +351,7 @@ export default {
});
},
add() {
this.dialogForm = {};
this.type = 0;
this.dialogVisible = true;
this.title = this.$t("deviceconvert.AddBasicData-DeviceCorrespondence");
@ -436,12 +437,12 @@ export default {
},
//
handleQuery() {
this.init()
this.init();
},
//
resetQuery(){
resetQuery() {
this.queryParams = { pageNum: 1, pageSize: 10 };
this.init()
this.init();
},
//
handleExport() {


+ 15
- 7
src/views/basedata/eqpbook/channel/index.vue View File

@ -26,7 +26,7 @@
:label="item.patroldeviceName"
:value="item.eqpbookId"
v-for="item in eqpbookListData"
:key="item.areaId"
:key="item.eqpbookId"
></el-option>
</el-select>
</el-form-item>
@ -86,7 +86,7 @@
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" plain size="mini">{{
<el-button type="warning" icon="el-icon-download" plain size="mini" @click="handleExport">{{
$t("share.export")
}}</el-button>
</el-col>
@ -140,7 +140,6 @@
align="center"
>
</el-table-column>
<!-- 通道类型 -->
<el-table-column prop="channelType" label="通道类型" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.channelType == 'vl'">可见光</el-tag>
@ -306,7 +305,7 @@
"
></el-input>
</el-form-item>
<el-form-item label="设备来源">
<el-input
v-model="dialogForm.deviceSource"
@ -420,7 +419,7 @@ export default {
this.dialogVisible = false;
},
add() {
this.type=0;
this.type = 0;
this.dialogForm = {
channelName: "",
channelType: "",
@ -430,11 +429,11 @@ export default {
this.title = this.$t("channel.AddDeviceChannel");
},
handleEdit(id) {
this.type=1;
this.type = 1;
this.dialogVisible = true;
this.title = this.$t("channel.EditDeviceChannel");
getItem(id).then((res) => {
if(res.code==200){
if (res.code == 200) {
this.dialogForm = res.data;
}
});
@ -504,6 +503,15 @@ export default {
}
});
},
handleExport() {
this.download(
"/basedata/eqpbook/channel/export",
{
...this.queryParams,
},
`channel_${new Date().getTime()}.xlsx`
);
},
},
};
</script>


+ 120
- 32
src/views/basedata/patrolpointmnt/patrolpointpreset/index.vue View File

@ -3,6 +3,7 @@
<el-form v-model="queryParams" :inline="true">
<el-form-item :label="$t('patrolpointpreset.PointCode')">
<el-input
v-model="queryParams.channelCode"
:placeholder="
$t('share.PleaseEnter') + ' ' + $t('patrolpointpreset.PointCode')
"
@ -10,6 +11,7 @@
</el-form-item>
<el-form-item :label="$t('patrolpointpreset.InspectionEquipmentID')">
<el-input
v-model="queryParams.eqpBookId"
:placeholder="
$t('share.PleaseEnter') +
' ' +
@ -19,6 +21,7 @@
</el-form-item>
<el-form-item :label="$t('patrolpointpreset.ChannelNumber')">
<el-input
v-model="queryParams.channelId"
:placeholder="
$t('share.PleaseEnter') +
' ' +
@ -28,6 +31,7 @@
</el-form-item>
<el-form-item :label="$t('patrolpointpreset.PresetPointNumber')">
<el-input
v-model="queryParams.presetCode"
:placeholder="
$t('share.PleaseEnter') +
' ' +
@ -37,6 +41,7 @@
</el-form-item>
<el-form-item :label="$t('patrolpointpreset.PresetPointName')">
<el-input
v-model="queryParams.presetName"
:placeholder="
$t('share.PleaseEnter') +
' ' +
@ -79,9 +84,14 @@
>
</el-col> -->
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" plain size="mini">{{
$t("share.delete")
}}</el-button>
<el-button
type="danger"
icon="el-icon-delete"
plain
size="mini"
@click="handleDeleteAll"
>{{ $t("share.delete") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -94,36 +104,40 @@
>
</el-col>
</el-row>
<el-table :data="tableData" style="width: 100%; margin-bottom: 20px">
<el-table
:data="tableData"
style="width: 100%; margin-bottom: 20px"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
:label="$t('patrolpointpreset.PointID')"
prop="name"
prop="patrolDeviceName"
align="center"
/>
<el-table-column
:label="$t('patrolpointpreset.PointCode')"
prop="name"
prop="channelCode"
align="center"
/>
<el-table-column
:label="$t('patrolpointpreset.InspectionEquipmentID')"
prop="name"
prop="eqpBookId"
align="center"
/>
<el-table-column
:label="$t('patrolpointpreset.ChannelNumber')"
prop="name"
prop="channelId"
align="center"
/>
<el-table-column
:label="$t('patrolpointpreset.PresetPointNumber')"
prop="name"
prop="presetCode"
align="center"
/>
<el-table-column
:label="$t('patrolpointpreset.PresetPointName')"
prop="name"
prop="presetName"
align="center"
/>
<el-table-column :label="$t('share.operate')" align="center">
@ -131,13 +145,13 @@
<el-button
type="text"
size="small"
@click="handleEdit(scope.$index, scope.row)"
@click="handleEdit(scope.row.patrolPointPresetId)"
>{{ $t("share.edit") }}</el-button
>
<el-button
type="text"
size="small"
@click="handleDelete(scope.$index, scope.row)"
@click="handleDelete(scope.row.patrolPointPresetId)"
>{{ $t("share.delete") }}</el-button
>
</template>
@ -160,7 +174,7 @@
<el-form :model="dialogForm" :rules="rules" ref="ruleForm">
<el-form-item :label="$t('patrolpointpreset.ParentPointID')">
<span class="fatherID" @click="fatherIDFn">{{
dialogForm.patrolpointId || fatherID
dialogForm.patrolPointId || fatherID
}}</span>
<i
class="el-icon-close"
@ -168,17 +182,14 @@
></i>
</el-form-item>
<el-form-item :label="$t('patrolpointpreset.ParentPointCode')">
<span>{{ dialogForm.patrolpointCode }}</span>
<span>{{ dialogForm.patrolPointPresetId }}</span>
</el-form-item>
<el-form-item :label="$t('patrolpointpreset.ParentPointName')">
<span>{{ dialogForm.patrolpointName }}</span>
<span>{{ dialogForm.patrolPointName }}</span>
</el-form-item>
<el-form-item
:label="$t('patrolpointpreset.InspectionEquipmentID')"
prop="eqpbookId"
>
<el-form-item :label="$t('patrolpointpreset.InspectionEquipmentID')">
<el-input
v-model="dialogForm.eqpbookId"
v-model="dialogForm.eqpBookId"
:placeholder="
$t('share.PleaseEnter') +
' ' +
@ -264,11 +275,11 @@
>
</el-form-item>
</el-form>
<!-- :row-style="rowStyle" -->
<el-table
:data="dialogTableData"
style="width: 100%; margin-bottom: 20px"
height="500px"
:row-style="rowStyle"
@row-click="changeCurrentRow"
>
<el-table-column type="index" width="55" align="center" />
@ -326,6 +337,9 @@ import {
getList,
patrolpoint_list,
postAdd,
delPatrolpointpreset,
getItem,
updatePatrolpointpreset,
} from "@/api/basedata/patrolpointmnt/patrolpointpreset";
export default {
data() {
@ -364,7 +378,7 @@ export default {
pageNum: 1,
pageSize: 10,
},
tableDialogFormTotal:10
tableDialogFormTotal: 10,
};
},
mounted() {
@ -373,22 +387,30 @@ export default {
methods: {
init() {
getList(this.queryParams).then((res) => {
console.log(this.queryParams);
if (res.code == 200) {
this.tableData = res.rows;
}
});
},
add() {
this.dialogForm = {};
this.dialogVisible = true;
this.type = 0;
this.title = this.$t("patrolpointpreset.AddPresetInspectionPoints");
},
handleEdit() {
handleEdit(id) {
this.type = 1;
this.dialogVisible = true;
this.title = this.$t(
"patrolpointpreset.EditInspectionPointPresetPositions"
);
getItem(id).then((res) => {
console.log(res, 11111);
if (res.code == 200) {
this.dialogForm = res.data;
}
});
},
fatherIDFn() {
this.tableDialogVisible = true;
@ -404,10 +426,13 @@ export default {
},
tableDialogVisibleBtn() {
this.dialogForm = {
patrolpointName: this.deviceItem.patrolpointName,
patrolpointCode: this.deviceItem.patrolpointCode,
patrolpointId: this.deviceItem.patrolpointId,
patrolPointName: this.deviceItem.patrolpointName,
patrolPointPresetId: this.deviceItem.patrolpointCode,
patrolPointId: this.deviceItem.patrolpointId,
};
// patroldeviceCode: device.patroldeviceCode,
// eqpbookId: device.eqpbookId,
// patrolpointId: this.currentRow.patrolpointId,
this.tableDialogVisible = false;
},
rowStyle({ row }) {
@ -425,9 +450,10 @@ export default {
},
//
submitForm(ruleForm) {
// console.log(this.dialogForm, 111111111);
// return;
this.$refs[ruleForm].validate((v) => {
if (v) {
console.log(this.dialogForm, 111111111);
if (this.type == 0) {
postAdd(this.dialogForm).then((res) => {
if (res.code == 200) {
@ -441,18 +467,38 @@ export default {
});
} else {
//
updatePatrolpointpreset(this.dialogForm).then((res) => {
if (res.code == 200) {
this.$message({
type: "success",
message: "修改成功",
});
this.dialogVisible = false;
this.init();
}
});
}
}
});
},
handleQuery() {},
resetQuery() {},
handleQuery() {
this.init();
},
resetQuery() {
let { pageNum, pageSize } = { ...this.queryParams };
let data = {
pageNum,
pageSize,
};
this.queryParams = data;
this.init();
},
handleClose() {
this.dialogVisible = false;
},
tableDialogHandleQuery() {
console.log(this.tableDialogForm)
this.patrolpointList()
console.log(this.tableDialogForm);
this.patrolpointList();
// patrolpoint_list(this.tableDialogForm).then((res) => {
// if (res.code == 200) {
// this.dialogTableData = res.rows;
@ -465,7 +511,49 @@ export default {
this.tableDialogVisible = false;
},
handleExport() {},
handleExport() {
this.download(
"/basedata/patrolpointmnt/patrolpointpreset/export",
{
...this.queryParams,
},
`patrolpointpreset_${new Date().getTime()}.xlsx`
);
},
//
handleDelete(patrolPointPresetId) {
this.$confirm(`确定要删除Id为${patrolPointPresetId}的数据吗?`, "删除", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
delPatrolpointpreset(patrolPointPresetId).then((res) => {
if (res.code == 200) {
this.$message({
type: "success",
message: "删除成功!",
});
this.init();
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.patrolPointPresetId);
},
//
handleDeleteAll() {
let ids = this.ids.toString();
this.handleDelete(ids);
},
},
};
</script>


+ 8
- 2
src/views/basedata/patrolpointmnt/patroltype/index.vue View File

@ -76,7 +76,7 @@
>
</el-col>
<el-col :span="1.5">
<el-button type="warning" icon="el-icon-download" plain size="mini">{{
<el-button type="warning" icon="el-icon-download" plain size="mini" @click="handleExport">{{
$t("share.export")
}}</el-button>
</el-col>
@ -112,7 +112,7 @@
prop="patrolTypeLevel"
align="center"
/>
<el-table-column :label="$t('patroltype.notes')" align="center" />
<el-table-column :label="$t('patroltype.notes')" align="center" prop="patrolTypeRemark"/>
<el-table-column :label="$t('share.operate')" align="center">
<template slot-scope="scope">
<el-button
@ -338,6 +338,12 @@ export default {
let ids = this.ids.toString();
this.handleDelete(ids);
},
/** 导出按钮操作 */
handleExport() {
this.download('/basedata/patrolpointmnt/patroltype/export', {
...this.queryParams
}, `patroltype_${new Date().getTime()}.xlsx`)
}
},
};
</script>


+ 7
- 8
src/views/basedata/station/index.vue View File

@ -361,14 +361,13 @@ export default {
},
//
handleExport() {
Export(this.queryParams).then((res) => {
if (res.code == 200) {
this.$message({
type: "success",
message: "导出成功!",
});
}
});
this.download(
"/basedata/station/export",
{
...this.queryParams,
},
`station_${new Date().getTime()}.xlsx`
);
},
},
};


+ 48
- 0
src/views/common.js View File

@ -0,0 +1,48 @@
let messageId = 0;
/**
* 调用卡片系统弹窗
* @param {*} zhan_name 站点名称
* @param {*} sourceCardId 源卡片id
* @param {*} targetCardId 目标卡片id
* @param {*} dialogTitle 弹窗标题
* @param {*} dialogIsDrag 弹窗是否可拖拽 默认 true
* @param {*} positionTop 弹窗上边距
* @param {*} positionLeft 弹窗左边距
* @param {*} contentWidth 弹窗内容宽度
* @param {*} contentHeight 弹窗内容高度
* @param {*} params 要传递给卡片的参数
*/
export function openDialog({
zhan_name = "",
sourceCardId,
targetCardId,
dialogTitle,
dialogIsDrag = true,
positionTop = "30",
positionLeft = "30",
contentWidth = "1856",
contentHeight = "896",
params = {},
}) {
const id = "message_" + ++messageId;
var data = {
id,
sourceId: zhan_name + sourceCardId,
targetId: "main_frame_global_modal", // 基座系统弹窗ID
event: {
type: "SWITCH_GLOBAL_MODAL",
data: {
title: dialogTitle, // 弹窗标题
cardId: zhan_name + targetCardId,
isDrag: dialogIsDrag, // 弹窗是否可拖拽,默认为true可拖拽
positionTop, // 数字,弹窗上边距 positionTop
positionLeft, // 数字,弹窗左边距 positionLeft
contentWidth, // 数字,弹窗内容宽度
contentHeight, // 数字,弹窗内容高度
params, // 需要传递的参数
},
},
tm: new Date().getTime(), // 时间戳
};
window.parent.postMessage(JSON.stringify(data), "*");
}

+ 151
- 48
src/views/equipment/entry.vue View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="5">
<el-col :span="7">
<div class="grid-content">
<div class="operate-left">
<el-tooltip
@ -42,7 +42,7 @@
:content="$t('share.import')"
placement="top-start"
>
<i class="el-icon-upload2"></i>
<i class="el-icon-upload2" @click="handleUpload"></i>
</el-tooltip>
</div>
<el-input
@ -50,37 +50,39 @@
v-model="queryParams"
style="margin-bottom: 10px"
></el-input>
<el-tree
:data="treeData"
:props="defaultProps"
@node-click="handleNodeClick"
ref="tree"
default-expand-all
>
<span slot-scope="{ node, data }" class="slot-node">
<template>
<i
class="el-icon-box"
v-if="data.areaName"
style="margin-right: 5px"
></i>
<i
class="el-icon-takeaway-box"
v-if="data.powerMainEquFlag == 'Yes'"
style="margin-right: 5px; color: #409eff"
></i>
<i
class="el-icon-set-up"
v-if="data.powerMainEquFlag == 'No'"
style="margin-right: 5px; color: #a9c52b"
></i>
<span>{{ node.label }}</span>
</template>
</span>
</el-tree>
<div class="treeBox">
<el-tree
:data="treeData"
:props="defaultProps"
@node-click="handleNodeClick"
ref="tree"
default-expand-all
>
<span slot-scope="{ node, data }" class="slot-node">
<template>
<i
class="el-icon-box"
v-if="data.areaName"
style="margin-right: 5px"
></i>
<i
class="el-icon-takeaway-box"
v-if="data.powerMainEquFlag == 'Yes'"
style="margin-right: 5px; color: #409eff"
></i>
<i
class="el-icon-set-up"
v-if="data.powerMainEquFlag == 'No'"
style="margin-right: 5px; color: #a9c52b"
></i>
<span>{{ node.label }}</span>
</template>
</span>
</el-tree>
</div>
</div>
</el-col>
<el-col :span="19">
<el-col :span="17">
<el-empty
:description="$t('entry.RightSidePrompt')"
v-if="!show"
@ -219,17 +221,60 @@
</div>
</el-col>
</el-row>
<!-- <el-dialog
title="导入文件"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<file-upload ref="fileUpload" :file-type="['xlsx','xls']" :fileSize="100"></file-upload>
</el-dialog> -->
<el-dialog
title="生产设备导入"
v-model="upload.open"
width="400px"
append-to-body
:visible="upload.open"
>
<el-upload
ref="uploadRef"
:limit="1"
accept=".xlsx, .xls, .txt, .xml"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<template #tip>
<div class="el-upload__tip text-center">
<span>仅允许导入xlsxlsx格式文件</span>
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
</template>
<script >
import { getToken } from "@/utils/auth";
import {
treeAreaDeviceSelect,
devicetypeList,
deviceQuery,
insertMainDeviceAndCommByDeviceType,
deviceRemove,
deviceEdit
deviceEdit,
} from "@/api/equipment/entry";
export default {
name: "entry",
@ -284,24 +329,43 @@ export default {
trigger: "blur",
},
],
orderNum:[
{
orderNum: [
{
required: true,
message:"请输入排序",
message: "请输入排序",
trigger: "blur",
},
]
],
},
type: 0,
disabled: false,
formObj: {},
dialogVisible: false,
upload: {
open: false,
url: process.env.VUE_APP_BASE_API + "/basedata/prodevmnt/device/importData",
headers: { Authorization: "Bearer " + getToken() },
updateSupport: 0,
isUploading: false,
},
};
},
// watch: {
// deviceTypeData(newVal) {
// if (newVal.length > 0 && this.form.deviceId) {
// this.$nextTick(() => {
// // select
// this.form.devicetypeId = this.form.devicetypeId;
// });
// }
// },
// },
mounted() {
this.init();
devicetypeList().then((res) => {
console.log(res, 111);
if (res.code == 200) {
let arr = res.data.filter((item) => item.devicetypeName !== '设备类型');
let arr = res.data.filter((item) => item.devicetypeName !== "设备类型");
this.deviceTypeData = arr;
}
});
@ -315,9 +379,10 @@ export default {
});
},
handleNodeClick(data, e) {
this.formObj = data;
this.deviceId = data.deviceId;
this.titleName = data.areaName || data.deviceName;
this.disabled=true;
this.disabled = true;
(this.form.parentName = data.areaName), (this.form.areaId = data.areaId);
if (data.areaName) {
@ -330,17 +395,20 @@ export default {
this.deleteIcon = false;
this.addIcon = true;
deviceQuery(data.deviceId).then((res) => {
console.log(res, 1111);
if (res.code == 200) {
this.type = 1;
this.form = res.data;
this.form.devicetypeId = Number(this.form.devicetypeId);
}
});
}
},
add() {
this.form = {};
this.show = true;
this.type = 0;
this.disabled=false;
this.disabled = false;
},
remove() {
this.$confirm("是否确定删除", "系统提示", {
@ -361,6 +429,8 @@ export default {
});
},
onSubmit() {
this.form.areaId = this.formObj.areaId;
this.form.areaName = this.areaName;
this.$refs["ruleForm"].validate((v) => {
if (v) {
if (this.type == 0) {
@ -370,7 +440,7 @@ export default {
type: "success",
message: "新增成功",
});
this.form={}
this.form = {};
this.form = {
orderNum: 0,
positionX: 0,
@ -386,13 +456,13 @@ export default {
} else {
// this.form.handerType=2;
// this.form.updateTime=null;
deviceEdit(this.form).then(res=>{
if(res.code==200){
deviceEdit(this.form).then((res) => {
if (res.code == 200) {
this.$message({
type: "success",
message: "编辑成功",
});
this.form={}
this.form = {};
this.form = {
orderNum: 0,
positionX: 0,
@ -400,17 +470,17 @@ export default {
positionZ: 0,
handerType: 0,
boolAdd: 1,
}
};
this.init();
}
})
});
}
this.show = false;
}
});
},
//
handleExport() {
//
handleExport() {
this.download(
"/basedata/prodevmnt/device/export",
{
@ -419,6 +489,34 @@ export default {
`entry_${new Date().getTime()}.xlsx`
);
},
//
handleUpload() {
// this.dialogVisible = true;
this.upload.open = true;
},
handleClose() {
this.upload.open = false;
},
/**文件上传中处理 */
handleFileUploadProgress() {
this.upload.isUploading = true;
},
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs["uploadRef"].handleRemove(file);
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.init();
},
submitFileForm(){
this.$refs["uploadRef"].submit();
}
},
};
</script>
@ -467,4 +565,9 @@ export default {
color: #dddddd;
cursor: not-allowed;
}
.treeBox {
height: 80vh;
overflow: hidden;
overflow-y: scroll;
}
</style>

+ 168
- 20
src/views/equipment/equipment.vue View File

@ -83,9 +83,13 @@
>
</el-col>
<el-col :span="1.5">
<el-button plain icon="el-icon-upload2" size="mini">{{
$t("share.import")
}}</el-button>
<el-button
plain
icon="el-icon-upload2"
size="mini"
@click="handleUpload"
>{{ $t("share.import") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -341,7 +345,7 @@
size="mini"
type="text"
icon="el-icon-upload"
@click="uploadImg"
@click="handleUploadImg(scope.row.eqpbookId)"
>{{ $t("equipment.uploadPictures") }}</el-button
>
</template>
@ -681,10 +685,76 @@
<el-button type="primary" @click="onSubmit"> </el-button>
</span>
</el-dialog>
<el-dialog
title="监测设备导入"
v-model="upload.open"
width="400px"
append-to-body
:visible="upload.open"
>
<el-upload
ref="uploadRef"
:limit="1"
accept=".xlsx, .xls, .txt, .xml"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<template #tip>
<div class="el-upload__tip text-center">
<span>仅允许导入xlsxlsx格式文件</span>
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</template>
</el-dialog>
<el-dialog
title="图片上传"
v-model="uploadImg.open"
width="400px"
append-to-body
:visible="uploadImg.open"
>
<el-upload
ref="uploadRefImg"
:limit="1"
accept="image/*"
:headers="uploadImg.headers"
:action="uploadImg.url"
:data="{ eqpbookId: currentEqpbookId }"
:disabled="uploadImg.isUploading"
:on-progress="handleFileUploadProgressImg"
:on-success="handleFileSuccessImg"
:auto-upload="false"
drag
name="pic"
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileFormImg"> </el-button>
<el-button @click="uploadImg.open = false"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script >
import { getToken } from "@/utils/auth";
import {
getDeviceType,
getList,
@ -696,7 +766,7 @@ import {
eqpbook,
edit,
mainsystemList,
download
download,
} from "@/api/equipment/equipment";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@ -729,10 +799,26 @@ export default {
videoModeData: [],
type: 0,
mainSystemData: [],
modelData:[],
modelData: [],
upload: {
open: false,
url: process.env.VUE_APP_BASE_API + "/basedata/eqpbook/importData",
headers: { Authorization: "Bearer " + getToken() },
updateSupport: 0,
isUploading: false,
},
uploadImg: {
open: false,
url: process.env.VUE_APP_BASE_API + "/basedata/eqpbook/uploadPicMap",
headers: { Authorization: "Bearer " + getToken() },
updateSupport: 0,
isUploading: false,
},
currentEqpbookId: null,
};
},
mounted() {
console.log("API Base:", process.env.VUE_APP_BASE_API, 111111111);
this.init();
this.getDeviceTypeInit();
getTreeselect().then((res) => {
@ -852,7 +938,7 @@ export default {
},
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.eqpbookId);
this.modelData=selection;
this.modelData = selection;
// this.modelData=selection.map(item => {
// return {
// Code: item.areaId,
@ -875,7 +961,7 @@ export default {
//
handleEdit(id = null, type) {
this.dialogForm = {};
this.type = type;
this.type = 1;
if (type == 0) {
let eqpbookId = this.ids[0];
this.getEqpbookFn(eqpbookId);
@ -922,23 +1008,85 @@ export default {
},
//
handleExport() {
let data={
pageNum:this.queryParams.pageNum,
pageSize:this.queryParams.pageSize,
}
download(data).then(res=>{
console.log(res)
})
let data = {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
};
// download(data).then(res=>{
// console.log(res)
// })
this.download(
"/basedata/eqpbook/export",
{
...data,
},
`equipment_${new Date().getTime()}.xlsx`
);
},
goToAboutPage(id) {
this.$router.push("/basedata/eqpbook/channel");
},
//
uploadImg() {},
//
handleModel(){
console.log(this.modelData)
}
handleModel() {
console.log(this.modelData);
},
//
handleUpload() {
// this.dialogVisible = true;
this.upload.open = true;
},
// handleClose() {
// this.upload.open = false;
// },
/**文件上传中处理 */
handleFileUploadProgress() {
this.upload.isUploading = true;
},
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs["uploadRef"].handleRemove(file);
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.init();
},
submitFileForm() {
this.$refs["uploadRef"].submit();
},
//
handleUploadImg(id) {
// this.dialogVisible = true;
this.currentEqpbookId = id;
this.uploadImg.open = true;
},
// handleCloseImg() {
// this.uploadImg.open = false;
// },
/**文件上传中处理 */
handleFileUploadProgressImg() {
this.uploadImg.isUploading = true;
},
handleFileSuccessImg(response, file, fileList) {
this.uploadImg.open = false;
this.uploadImg.isUploading = false;
this.$refs["uploadRefImg"].handleRemove(file);
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.init();
},
submitFileFormImg() {
this.$refs["uploadRefImg"].submit();
},
},
};
</script>


+ 11
- 11
src/views/equipment/equipment_type.vue View File

@ -59,6 +59,7 @@
"
></el-input>
</el-form-item>
<el-form-item
:label="$t('equipment_type.EquipmentCategoryNumber')"
prop="devicetypeCode"
@ -75,17 +76,11 @@
:label="$t('equipment_type.ProfessionalAffiliation')"
prop="professionType"
>
<!-- <el-input
v-model="formData.professionTypeData"
:placeholder="
$t('share.PleaseEnter') +
$t('equipment_type.ProfessionalAffiliation')
"
></el-input> -->
<el-select
v-model="formData.professionType"
placeholder="请选择"
style="width: 100%"
:disabled="disabledForm"
>
<el-option
v-for="item in professionTypeData"
@ -98,7 +93,7 @@
</el-form-item>
<el-form-item :label="$t('equipment_type.NumberOfPhases')">
<el-radio-group v-model="formData.phaseNum">
<el-radio-group v-model="formData.phaseNum" :disabled="disabledForm">
<el-radio
:label="$t('equipment_type.NoPhaseNumber')"
></el-radio>
@ -113,7 +108,7 @@
:label="$t('equipment_type.Farewell')"
v-if="formData.phaseNum == '单相'"
>
<el-radio-group v-model="formData.phase">
<el-radio-group v-model="formData.phase" :disabled="disabledForm">
<!-- <el-radio
:label="$t('equipment_type.NoPhaseNumber')"
></el-radio> -->
@ -187,6 +182,8 @@ export default {
],
},
professionTypeData: [],
devicetypeId: null,
disabledForm:true,
};
},
mounted() {
@ -210,8 +207,10 @@ export default {
});
},
handleNodeClick(data) {
this.disabledForm=true;
console.log(data);
// this.type = data.type;
this.devicetypeId = data.devicetypeId;
if (data.devicetypeId == 1) {
this.rightTitle = this.$t("equipment_type.AddDevice");
this.show = false;
@ -224,6 +223,7 @@ export default {
}
},
addBtn() {
this.disabledForm=false;
this.formData = {};
this.show = true;
this.type = 0;
@ -240,9 +240,9 @@ export default {
} else if (this.formData.phaseNum == "三相") {
this.formData.phase = "ABC";
}
this.formData.powerMainEquFlag="Yes";
this.formData.powerMainEquFlag = "Yes";
if (this.type == 0) {
this.formData.parentId = 1;
this.formData.parentId = this.devicetypeId;
add(this.formData).then((res) => {
if (res.code == 200) {
this.$message({


+ 591
- 0
src/views/point copy/components/site_VideoDialog copy.vue View File

@ -0,0 +1,591 @@
<template>
<el-dialog
:title="pointDialogDataName"
:visible.sync="pointDialogShow"
width="70%"
:before-close="bindingMonitorPointClose"
>
<el-row :gutter="20">
<el-col :span="5">
<div class="bindingMonitorPointTree">
<el-tree
:data="dialogPointTree"
:props="defaultPropsMonitor"
@node-click="handleMonitor"
></el-tree>
</div>
</el-col>
<el-col :span="13">
<div class="bindingMonitorPointDiv">
<videoPlayer />
</div>
</el-col>
<el-col :span="6">
<div style="background: #eee; padding: 5px">
{{ $t("site_management.PTZ") }}
</div>
<div class="PTZ-content">
<img src="@/assets/images/PTZImg.png" alt="" class="PTZImg" />
<div class="r-ti2-pos">
<div @click="ptzBtn('UP', 'UP_STOP')"></div>
<div @click="ptzBtn('UP_RIGHT', 'UP_RIGHT_STOP')"></div>
<div @click="ptzBtn('RIGHT', 'RIGHT_STOP')"></div>
<div @click="ptzBtn('DOWN_RIGHT', 'DOWN_RIGHT_STOP')"></div>
<div @click="ptzBtn('DOWN', 'DOWN_STOP')"></div>
<div @click="ptzBtn('DOWN_LEFT', 'DOWN_LEFT_STOP')"></div>
<div @click="ptzBtn('LEFT', 'LEFT_STOP')"></div>
<div @click="ptzBtn('UP_LEFT', 'UP_LEFT_STOP')"></div>
</div>
</div>
<div class="r-ti3">
<div class="r-ti3-d1">
<img src="@/assets/images/searchImg.png" alt="" />
<div class="r-ti3-d2">
<div @click="ptzBtn('ZOOM_OUT', 'ZOOM_OUT_STOP')"></div>
<div @click="ptzBtn('ZOOM_IN', 'ZOOM_IN_STOP')"></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r2Img.png" alt="" />
<div class="r-ti3-d2">
<div @click="fiBtn('nearfocus', 'nearfocusstop')"></div>
<div @click="fiBtn('farfocus', 'farfocusstop')"></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r3Img.png" alt="" />
<div class="r-ti3-d2">
<div @click="fiBtn('apertureoff', 'apertureoffstop')"></div>
<div @click="fiBtn('apertureon', 'apertureonstop')"></div>
</div>
</div>
</div>
<div class="r-ti4">
<div style="display: flex">
<el-select
v-model="presetDotNum"
:placeholder="$t('site_management.PleaseSelectAPresetPoint')"
@change="presetDotBtn"
>
<el-option
:label="item.dictLabel"
:value="item.dictValue"
v-for="item in listByEqIdAndChanneData"
:key="item.dictValue"
>
</el-option>
</el-select>
<img
src="@/assets/images/playImg.png"
@click="editPresetDot1"
title="编辑预置点名称"
/>
<img src="@/assets/images/addImg.png" alt="" @click="popoverOpen" />
<el-popover
placement="top"
width="300"
v-model="popovervisible"
trigger="click"
>
<el-input placeholder="请输入内容" v-model="newpresetName" />
<div class="popover-footer">
<el-button
size="mini"
type="primary"
@click="popovervisibleShow"
>取消</el-button
>
<el-button size="mini" type="primary" @click="setPresetDot1"
>确定</el-button
>
</div>
</el-popover>
</div>
<div style="display: flex; margin-top: 20px">
<el-input
v-model="presetName"
:placeholder="$t('site_management.PleaseEnterTheContent')"
></el-input>
<img
src="@/assets/images/setImg.png"
alt=""
title="编辑预置点名称"
@click="editPresetDot2"
/>
</div>
</div>
</el-col>
</el-row>
<el-table
:data="bindingMonitorPointTableData"
style="width: 100%"
@header-click="clickFun"
>
<el-table-column :label="$t('site_management.ActionType')" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.actionType">
<el-option label="拍照" value="1" />
<el-option label="录像" value="2" />
</el-select>
</template>
</el-table-column>
<el-table-column
:label="$t('site_management.RecordingDuration')"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.videoTime"
v-if="scope.row.actionType == 2"
class="centered-input"
></el-input>
</template>
</el-table-column>
<el-table-column
:label="$t('site_management.NumberOfPhotosTaken')"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.photoCount"
v-if="scope.row.actionType == 1"
class="centered-input"
></el-input>
<!-- <span v-if="scope.row.actionType == 1">1</span> -->
</template>
</el-table-column>
<el-table-column
:label="$t('site_management.PhotoInterval')"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.photoSeper"
v-if="scope.row.actionType == 1"
class="centered-input"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
:render-header="(h, obj) => renderHeader(h, obj, $t('share.addTo'))"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="removeAction(scope.$index)"
>移除</el-button
>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="add-btn add-bth1 card-page">
<el-button type="primary" @click="saveDot1">确定</el-button>
<el-button @click="bindingMonitorPointClose">取消</el-button>
</div>
</template>
</el-dialog>
</template>
<script>
import videoPlayer from "@/components/videoPlayer/index.vue";
import {
vl,
listByEqIdAndChannelId,
realtime,
PZT,
fi,
goto,
issue,
bindingPreset,
} from "@/api/point/site_management";
export default {
components: { videoPlayer },
props: ["pointDialogDataName", "pointDialogShow", "dialogProp"],
data() {
return {
bindingMonitorPointTitle: "绑定可见光检测点",
// pointDialogShow: false,
dialogPointTree: [],
defaultPropsMonitor: {
children: "children",
label: "name",
},
listByEqIdAndChanneData: [],
bindingMonitorPointTableData: [],
presetDotNum: "",
PZTData: {},
presetName: "",
popovervisible: false,
newpresetName: "",
presetData: {
presetPosCode: "",
channelId: "",
eqpbookId: "",
patrolpointId: "",
stdparolPointId: "",
deviceId: "",
presetPosName: "",
stopTime: "",
channelImg: "",
description: "",
presetActionList: [],
presetParamList: [],
presetPointList: [],
},
};
},
methods: {
bindingMonitorPointClose() {
// this.pointDialogShow = false;
this.$emit("site_videoDialogClose",false);
},
//
handleMonitor(e) {
console.log(e, 111, this.dialogProp);
if (e.eqpbookId) {
this.presetData.patrolpointId = this.dialogProp.patrolpointId;
this.presetData.stdparolPointId = this.dialogProp.stdparolPointId;
this.presetData.deviceId = this.dialogProp.deviceId;
this.presetData.eqpbookId = e.eqpbookId;
this.presetData.channelId = e.channelId;
this.PZTData = e;
listByEqIdAndChannelId({
channelCode: e.channelCode,
patroldeviceCode: e.patroldeviceCode,
}).then((res) => {
if (res.code == 200) {
this.listByEqIdAndChanneData = res.data;
}
});
realtime({
patroldeviceCode: e.patroldeviceCode,
channelCode: e.channelCode,
}).then((res) => {
if (res.code == 200) {
// this.bindingMonitorPointTableData=res.data;
console.log(res, 1111);
}
});
}
},
renderHeader(h, { column, $index }, type) {
let that = this;
return h("div", [
//
h("span", column.label),
//
h(
"el-button",
{
props: {
type: "text",
size: "small",
},
style: "margin-left: 5px;",
on: {
click: function () {
that.clickButton(type);
},
},
},
this.$t("share.addTo")
),
]);
},
clickButton(type) {
// console.log("" + type + "");
this.bindingMonitorPointTableData.push({
actionType: "",
videoTime: "",
photoCount: "1",
photoSeper: "",
});
},
clickFun() {},
init() {
vl().then((res) => {
if (res.code == 200) {
this.dialogPointTree = res.data;
}
});
},
ptzBtn(start, stop) {
let startData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: start,
};
let stopData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: stop,
};
if (startData.patroldeviceCode && startData.channelCode) {
PZT(startData).then((res) => {
if (res.code) {
console.log(res, "start");
}
});
PZT(stopData).then((res) => {
if (res.code) {
console.log(res, "stop");
}
});
}
},
fiBtn(start, stop) {
let startData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: start,
};
let stopData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: stop,
};
if (startData.patroldeviceCode && startData.channelCode) {
fi(startData).then((res) => {
if (res.code) {
console.log(res, "start");
}
});
fi(stopData).then((res) => {
if (res.code) {
console.log(res, "stop");
}
});
}
},
presetDotBtn(value) {
this.presetData.presetPosCode = value;
this.listByEqIdAndChanneData.forEach((item) => {
if (item.dictValue == this.presetDotNum) {
this.presetName = item.dictLabel;
}
});
},
//
editPresetDot1() {
let data = {
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
presetDotNum: this.presetDotNum,
name: this.presetName,
};
goto(data).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
} else {
this.$message.error(res.msg);
}
});
},
popovervisibleShow() {
this.popovervisible = false;
this.newpresetName = "";
},
setPresetDot1() {
let data = {
presetCode: this.presetDotNum,
name: this.presetName,
channelCode: this.PZTData.channelCode,
patroldeviceCode: this.PZTData.patroldeviceCode,
};
issue(data).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.popovervisible = false;
} else {
this.$message.error(res.msg);
}
});
},
popoverOpen() {
this.popovervisible = true;
},
//
editPresetDot2() {
let data = {
presetCode: this.presetDotNum,
name: this.newpresetName,
channelCode: this.PZTData.channelCode,
patroldeviceCode: this.PZTData.patroldeviceCode,
};
},
//
removeAction() {
this.bindingMonitorPointTableData.splice(index, 1);
},
//
saveDot1() {
this.presetData.presetPosName = this.presetName;
this.presetData.presetActionList = this.bindingMonitorPointTableData;
bindingPreset(this.presetData).then((res) => {
console.log(res, 11111);
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.presetData = {
presetPosCode: "",
channelId: "",
eqpbookId: "",
patrolpointId: "",
stdparolPointId: "",
deviceId: "",
presetPosName: "",
stopTime: "",
channelImg: "",
description: "",
presetActionList: [],
presetParamList: [],
};
this.pointDialogShow=false;
this.$emit('site_saveDot1',true)
} else {
this.$message.error(res.msg);
}
});
},
},
mounted() {
this.init();
},
};
</script>
<style lang="scss" scoped>
.bindingMonitorPointTree {
width: 100%;
height: 37vh;
overflow-y: scroll;
}
.bindingMonitorPointDiv {
width: 100%;
height: 40vh;
// background: red;
}
.PTZ-content {
width: 170px;
margin: 10px auto;
position: relative;
img {
width: 100%;
}
}
.r-ti2-pos {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div {
position: absolute;
z-index: 999;
width: 20px;
height: 15px;
cursor: pointer;
}
div:first-child {
top: 32px;
left: 75px;
}
div:nth-child(2) {
top: 50px;
left: 102px;
}
div:nth-child(3) {
top: 77px;
right: 30px;
}
div:nth-child(4) {
bottom: 56px;
left: 102px;
}
div:nth-child(5) {
bottom: 36px;
left: 75px;
}
div:nth-child(6) {
bottom: 56px;
right: 100px;
}
div:nth-child(7) {
bottom: 80px;
left: 30px;
}
div:nth-child(8) {
top: 50px;
right: 102px;
}
}
.r-ti3 {
width: 100%;
display: flex;
padding-top: 10px;
-webkit-box-pack: justify;
justify-content: space-between;
}
.r-ti3-d1 {
width: 76px;
position: relative;
img {
width: 100%;
}
.r-ti3-d2 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div:first-child {
width: 50%;
height: 100%;
position: absolute;
top: 0;
left: 0;
cursor: pointer;
}
div:nth-child(2) {
width: 50%;
height: 100%;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
}
}
}
.r-ti4 {
padding-top: 20px;
img {
width: 24px;
height: 24px;
position: relative;
top: 6px;
cursor: pointer;
}
}
.popover-footer {
width: 100%;
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
</style>

+ 696
- 0
src/views/point copy/components/site_VideoDialog.vue View File

@ -0,0 +1,696 @@
<template>
<el-dialog
:title="pointDialogDataName"
:visible.sync="pointDialogShow"
width="70%"
:before-close="bindingMonitorPointClose"
>
<el-row :gutter="20">
<el-col :span="5">
<div class="bindingMonitorPointTree">
<el-tree
:data="dialogPointTree"
:props="defaultPropsMonitor"
@node-click="handleMonitor"
></el-tree>
</div>
</el-col>
<el-col :span="13">
<div class="bindingMonitorPointDiv">
<!-- <videoPlayer /> -->
<VideoPlayerPlatform
ref="playerPlayform"
@changeIndex="handleChangeIndex"
:showBottomToolBar="false"
:defaultLayout="'1x1'"
>
<template slot-scope="scope">
<DrawShape
@drawComplete="
(shape) => {
handleDrawComplete(scope, shape);
}
"
/>
</template>
</VideoPlayerPlatform>
</div>
</el-col>
<el-col :span="6">
<div style="background: #eee; padding: 5px">
{{ $t("site_management.PTZ") }}
</div>
<div class="PTZ-content">
<img src="@/assets/images/PTZImg.png" alt="" class="PTZImg" />
<div class="r-ti2-pos">
<div @click="ptzBtn('UP', 'UP_STOP')"></div>
<div @click="ptzBtn('UP_RIGHT', 'UP_RIGHT_STOP')"></div>
<div @click="ptzBtn('RIGHT', 'RIGHT_STOP')"></div>
<div @click="ptzBtn('DOWN_RIGHT', 'DOWN_RIGHT_STOP')"></div>
<div @click="ptzBtn('DOWN', 'DOWN_STOP')"></div>
<div @click="ptzBtn('DOWN_LEFT', 'DOWN_LEFT_STOP')"></div>
<div @click="ptzBtn('LEFT', 'LEFT_STOP')"></div>
<div @click="ptzBtn('UP_LEFT', 'UP_LEFT_STOP')"></div>
</div>
</div>
<div class="r-ti3">
<div class="r-ti3-d1">
<img src="@/assets/images/searchImg.png" alt="" />
<div class="r-ti3-d2">
<div @click="ptzBtn('ZOOM_OUT', 'ZOOM_OUT_STOP')"></div>
<div @click="ptzBtn('ZOOM_IN', 'ZOOM_IN_STOP')"></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r2Img.png" alt="" />
<div class="r-ti3-d2">
<div @click="fiBtn('nearfocus', 'nearfocusstop')"></div>
<div @click="fiBtn('farfocus', 'farfocusstop')"></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r3Img.png" alt="" />
<div class="r-ti3-d2">
<div @click="fiBtn('apertureoff', 'apertureoffstop')"></div>
<div @click="fiBtn('apertureon', 'apertureonstop')"></div>
</div>
</div>
</div>
<div class="r-ti4">
<div style="display: flex">
<el-select
v-model="presetDotNum"
:placeholder="$t('site_management.PleaseSelectAPresetPoint')"
@change="presetDotBtn"
>
<el-option
:label="item.dictLabel"
:value="item.dictValue"
v-for="item in listByEqIdAndChanneData"
:key="item.dictValue"
>
</el-option>
</el-select>
<img
src="@/assets/images/playImg.png"
@click="editPresetDot1"
title="编辑预置点名称"
/>
<img src="@/assets/images/addImg.png" alt="" @click="popoverOpen" />
<el-popover
placement="top"
width="300"
v-model="popovervisible"
trigger="click"
>
<el-input placeholder="请输入内容" v-model="newpresetName" />
<div class="popover-footer">
<el-button
size="mini"
type="primary"
@click="popovervisibleShow"
>取消</el-button
>
<el-button size="mini" type="primary" @click="setPresetDot1"
>确定</el-button
>
</div>
</el-popover>
</div>
<div style="display: flex; margin-top: 20px">
<el-input
v-model="presetName"
:placeholder="$t('site_management.PleaseEnterTheContent')"
></el-input>
<img
src="@/assets/images/setImg.png"
alt=""
title="编辑预置点名称"
@click="editPresetDot2"
/>
</div>
</div>
</el-col>
</el-row>
<el-table
:data="bindingMonitorPointTableData"
style="width: 100%"
@header-click="clickFun"
>
<el-table-column :label="$t('site_management.ActionType')" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.actionType">
<el-option label="拍照" value="1" />
<el-option label="录像" value="2" />
</el-select>
</template>
</el-table-column>
<el-table-column
:label="$t('site_management.RecordingDuration')"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.videoTime"
v-if="scope.row.actionType == 2"
class="centered-input"
></el-input>
</template>
</el-table-column>
<el-table-column
:label="$t('site_management.NumberOfPhotosTaken')"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.photoCount"
v-if="scope.row.actionType == 1"
class="centered-input"
></el-input>
<!-- <span v-if="scope.row.actionType == 1">1</span> -->
</template>
</el-table-column>
<el-table-column
:label="$t('site_management.PhotoInterval')"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.photoSeper"
v-if="scope.row.actionType == 1"
class="centered-input"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
:render-header="(h, obj) => renderHeader(h, obj, $t('share.addTo'))"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="removeAction(scope.$index)"
>移除</el-button
>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="add-btn add-bth1 card-page">
<el-button type="primary" @click="nextBtn" v-if="typeNextBtn"
>下一步,配置测温位置</el-button
>
<el-button type="primary" @click="saveDot1" v-if="!typeNextBtn">确定</el-button>
<el-button @click="bindingMonitorPointClose">取消</el-button>
</div>
</template>
</el-dialog>
</template>
<script>
import videoPlayer from "@/components/videoPlayer/index.vue";
import {
vl,
ir,
listByEqIdAndChannelId,
realtime,
PZT,
fi,
goto,
issue,
bindingPreset,
} from "@/api/point/site_management";
import {
listPatroltype,
getDeviceList,
} from "@/api/basedata/patrolpointmnt/patroltype";
import VideoPlayerPlatform from "@/components/VideoPlayerPlatform";
import DrawShape, {
toTargetRect,
ShapeEnum,
} from "@/components/Canvas/DrawShape.vue";
export default {
components: {
videoPlayer,
VideoPlayerPlatform,
DrawShape,
},
props: [
"pointDialogDataName",
"pointDialogShow",
"dialogProp",
"typeVideoDialog",
],
data() {
return {
bindingMonitorPointTitle: "绑定可见光检测点",
// pointDialogShow: false,
dialogPointTree: [],
defaultPropsMonitor: {
children: "children",
label: "name",
},
listByEqIdAndChanneData: [],
bindingMonitorPointTableData: [],
presetDotNum: "",
PZTData: {},
presetName: "",
popovervisible: false,
newpresetName: "",
presetData: {
presetPosCode: "",
channelId: "",
eqpbookId: "",
patrolpointId: "",
stdparolPointId: "",
deviceId: "",
presetPosName: "",
stopTime: "",
channelImg: "",
description: "",
presetActionList: [],
presetParamList: [],
presetPointList: [],
},
ShapeEnum: {
rect: "Rectangle",
brokenline: "BrokenLine",
polygon: "Polygon",
point: "Point",
} /* 绘制方式 */,
typeNextBtn: false,
};
},
watch: {
typeVideoDialog(newVal, oldVal) {
if (newVal !== oldVal) {
// typeVideoDialog
this.init(); // init
}
},
},
methods: {
bindingMonitorPointClose() {
// this.pointDialogShow = false;
this.$emit("site_videoDialogClose", false);
},
//
handleMonitor(e) {
console.log(e, 111, this.dialogProp);
if (e.eqpbookId) {
this.presetData.patrolpointId = this.dialogProp.patrolpointId;
this.presetData.stdparolPointId = this.dialogProp.stdparolPointId;
this.presetData.deviceId = this.dialogProp.deviceId;
this.presetData.eqpbookId = e.eqpbookId;
this.presetData.channelId = e.channelId;
this.PZTData = e;
listByEqIdAndChannelId({
channelCode: e.channelCode,
patroldeviceCode: e.patroldeviceCode,
}).then((res) => {
if (res.code == 200) {
this.listByEqIdAndChanneData = res.data;
}
});
realtime({
patroldeviceCode: e.patroldeviceCode,
channelCode: e.channelCode,
}).then((res) => {
if (res.code == 200) {
// this.bindingMonitorPointTableData=res.data;
console.log(res, 1111);
}
});
let data = {
patroldeviceCode: e.patroldeviceCode,
channelId: e.channelId,
channelCode: e.channelCode,
};
this.handleOpenChannel(data);
}
},
renderHeader(h, { column, $index }, type) {
let that = this;
return h("div", [
//
h("span", column.label),
//
h(
"el-button",
{
props: {
type: "text",
size: "small",
},
style: "margin-left: 5px;",
on: {
click: function () {
that.clickButton(type);
},
},
},
this.$t("share.addTo")
),
]);
},
clickButton(type) {
// console.log("" + type + "");
this.bindingMonitorPointTableData.push({
actionType: "",
videoTime: "",
photoCount: "1",
photoSeper: "",
});
},
clickFun() {},
init() {
if (this.typeVideoDialog == 0) {
this.typeNextBtn = false;
vl().then((res) => {
if (res.code == 200) {
this.dialogPointTree = res.data;
}
});
} else {
this.typeNextBtn = true;
ir().then((res) => {
if (res.code == 200) {
this.dialogPointTree = res.data;
}
});
}
},
ptzBtn(start, stop) {
let startData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: start,
};
let stopData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: stop,
};
if (startData.patroldeviceCode && startData.channelCode) {
PZT(startData).then((res) => {
if (res.code) {
console.log(res, "start");
}
});
PZT(stopData).then((res) => {
if (res.code) {
console.log(res, "stop");
}
});
}
},
fiBtn(start, stop) {
let startData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: start,
};
let stopData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: stop,
};
if (startData.patroldeviceCode && startData.channelCode) {
fi(startData).then((res) => {
if (res.code) {
console.log(res, "start");
}
});
fi(stopData).then((res) => {
if (res.code) {
console.log(res, "stop");
}
});
}
},
presetDotBtn(value) {
this.presetData.presetPosCode = value;
this.listByEqIdAndChanneData.forEach((item) => {
if (item.dictValue == this.presetDotNum) {
this.presetName = item.dictLabel;
}
});
},
//
editPresetDot1() {
let data = {
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
presetDotNum: this.presetDotNum,
name: this.presetName,
};
goto(data).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
} else {
this.$message.error(res.msg);
}
});
},
popovervisibleShow() {
this.popovervisible = false;
this.newpresetName = "";
},
setPresetDot1() {
let data = {
presetCode: this.presetDotNum,
name: this.presetName,
channelCode: this.PZTData.channelCode,
patroldeviceCode: this.PZTData.patroldeviceCode,
};
issue(data).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.popovervisible = false;
} else {
this.$message.error(res.msg);
}
});
},
popoverOpen() {
this.popovervisible = true;
},
//
editPresetDot2() {
let data = {
presetCode: this.presetDotNum,
name: this.newpresetName,
channelCode: this.PZTData.channelCode,
patroldeviceCode: this.PZTData.patroldeviceCode,
};
},
//
removeAction() {
this.bindingMonitorPointTableData.splice(index, 1);
},
//
saveDot1() {
this.presetData.presetPosName = this.presetName;
this.presetData.presetActionList = this.bindingMonitorPointTableData;
bindingPreset(this.presetData).then((res) => {
console.log(res, 11111);
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.presetData = {
presetPosCode: "",
channelId: "",
eqpbookId: "",
patrolpointId: "",
stdparolPointId: "",
deviceId: "",
presetPosName: "",
stopTime: "",
channelImg: "",
description: "",
presetActionList: [],
presetParamList: [],
};
this.pointDialogShow = false;
this.$emit("site_saveDot1", true);
} else {
this.$message.error(res.msg);
}
});
},
handleDrawComplete(scope, shape) {
setTimeout(() => {
this.addDot1(shape);
}, 100);
},
handleChangeIndex(e) {
this.currentPlayer = e.player;
// console.log(this.currentPlayer)
},
getDeviceList() {
getDeviceList(this.patroldeviceCode, this.channelCode).then(
({ data }) => {
this.presetArr = data;
}
);
},
handleOpenChannel(row, next) {
this.patroldeviceCode = row.patroldeviceCode;
this.channelCode = row.channelCode;
this.presetName = "";
this.presetNumber = "";
this.getDeviceList();
this.$nextTick(() => {
this.$refs[next ? "playerPlayform2" : "playerPlayform"]
.openChannel({
deviceId: 1,
deviceCode: row.patroldeviceCode,
channelId: row.channelId,
channelCode: row.channelCode,
playerType: "zl",
})
.then(() => {});
});
},
nextBtn() {},
},
mounted() {
// this.init();
},
};
</script>
<style lang="scss" scoped>
.bindingMonitorPointTree {
width: 100%;
height: 37vh;
overflow-y: scroll;
}
.bindingMonitorPointDiv {
width: 100%;
height: 40vh;
// background: red;
}
.PTZ-content {
width: 170px;
margin: 10px auto;
position: relative;
img {
width: 100%;
}
}
.r-ti2-pos {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div {
position: absolute;
z-index: 999;
width: 20px;
height: 15px;
cursor: pointer;
}
div:first-child {
top: 32px;
left: 75px;
}
div:nth-child(2) {
top: 50px;
left: 102px;
}
div:nth-child(3) {
top: 77px;
right: 30px;
}
div:nth-child(4) {
bottom: 56px;
left: 102px;
}
div:nth-child(5) {
bottom: 36px;
left: 75px;
}
div:nth-child(6) {
bottom: 56px;
right: 100px;
}
div:nth-child(7) {
bottom: 80px;
left: 30px;
}
div:nth-child(8) {
top: 50px;
right: 102px;
}
}
.r-ti3 {
width: 100%;
display: flex;
padding-top: 10px;
-webkit-box-pack: justify;
justify-content: space-between;
}
.r-ti3-d1 {
width: 76px;
position: relative;
img {
width: 100%;
}
.r-ti3-d2 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div:first-child {
width: 50%;
height: 100%;
position: absolute;
top: 0;
left: 0;
cursor: pointer;
}
div:nth-child(2) {
width: 50%;
height: 100%;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
}
}
}
.r-ti4 {
padding-top: 20px;
img {
width: 24px;
height: 24px;
position: relative;
top: 6px;
cursor: pointer;
}
}
.popover-footer {
width: 100%;
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
</style>

+ 452
- 0
src/views/point copy/point_mang.vue View File

@ -0,0 +1,452 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="4">
<div class="qurey">
<el-input
:placeholder="$t('point_mang.PleaseEnterTheContent')"
v-model="filterText"
class="input-with-select"
>
</el-input>
</div>
<el-tree
:data="treeData"
:props="defaultProps"
@node-click="handleNodeClick"
node-key="devicetypeId"
ref="tree"
:filter-node-method="filterNode"
></el-tree>
</el-col>
<el-col :span="20" v-if="devicetypeId">
<div>
<el-button type="primary" @click="addBtn">{{
$t("share.addTo")
}}</el-button>
<span>0/200{{ $t("point_mang.tableHeadMsg") }}</span>
</div>
<el-table :data="tableData" max-height="700" style="margin-top: 10px">
<el-table-column
prop="date"
:label="$t('point_mang.index')"
width="55"
type="index"
align="center"
></el-table-column>
<el-table-column
:label="$t('point_mang.equipmentClassification')"
:render-header="addRedStar"
align="center"
>
<template slot-scope="scope">
<el-select
:placeholder="
$t('share.PleaseChoose') +
$t('point_mang.equipmentClassification')
"
v-model="scope.row.componentDevicetypeId"
>
<el-option
:label="item.devicetypeName"
:value="item.devicetypeId"
v-for="item in DevicetypeIdOptions"
:key="item.devicetypeId"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
:label="$t('point_mang.InspectionStandards')"
:render-header="addRedStar"
align="center"
>
<template slot-scope="scope">
<el-input
type="textarea"
:placeholder="
$t('share.PleaseChoose') + $t('point_mang.PleaseEnter')
"
v-model="scope.row.patrolContent"
></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('point_mang.dataFormat')" align="center">
<template slot-scope="scope">
<!-- multiple
filterable
allow-create
default-first-option -->
<el-select
v-model="scope.row.mainDevicetypeId"
:placeholder="
$t('share.PleaseChoose') + $t('point_mang.dataFormat')
"
>
<el-option
v-for="item in options"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
:label="$t('point_mang.IntelligentRecognitionType')"
align="center"
>
<template slot-scope="scope">
<span
class="intelligenceType"
@click="intelligenceTypeBtn(scope.row)"
>{{
scope.row.algSubtypeName ? scope.row.algSubtypeName : "设置"
}}</span
>
</template>
</el-table-column>
<el-table-column :label="$t('share.operate')" align="center">
<template slot-scope="scope">
<el-button size="mini" type="primary">
{{ $t("share.copy") }}
</el-button>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row, scope.$index)"
>{{ $t("share.delete") }}</el-button
>
</template>
</el-table-column>
</el-table>
<div class="saveBtn">
<el-button type="primary" @click="submitForm">{{
$t("share.save")
}}</el-button>
</div>
</el-col>
<el-col :span="20" v-if="!devicetypeId">
<div style="line-height: 36px">请先选择左侧点位</div>
</el-col>
</el-row>
<el-dialog
:title="$t('point_mang.SetIntelligentRecognitionType')"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
border
>
<el-table
:data="intelligenceTypeData"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
default-expand-all
row-key="id"
@selection-change="handleSelectionChangeDialog"
ref="multipleTable"
>
<el-table-column
type="selection"
width="55"
align="center"
></el-table-column>
<el-table-column
type="index"
width="55"
align="center"
:label="$t('point_mang.index')"
></el-table-column>
<!-- <el-table-column
prop="algName"
align="center"
:label="$t('point_mang.AlgorithmName')"
></el-table-column> -->
<el-table-column :label="$t('patrolpoint.AlgorithmName')">
<template slot-scope="scope">
{{
scope.row.algSubtypeName
? scope.row.algSubtypeName
: scope.row.algName
}}
</template>
</el-table-column>
<el-table-column
prop="patrolContent"
align="center"
:label="$t('point_mang.ThresholdUpperLimit')"
:render-header="addRedStar"
>
<!-- <template slot-scope="scope">
<el-input></el-input>
</template> -->
</el-table-column>
<el-table-column
prop="mainDevicetypeId"
align="center"
:label="$t('point_mang.LowerThresholdLimit')"
:render-header="addRedStar"
>
<!-- <template slot-scope="scope">
<el-input></el-input>
</template> -->
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">{{ $t("share.cancel") }}</el-button>
<el-button type="primary" @click="dialogTableOk">{{
$t("share.confirm")
}}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getTreeAreaDeviceSelect,
cilikList,
devicetype,
dataFormat,
add,
remove,
algList,
subtypeList,
} from "@/api/point/point_mang";
export default {
data() {
return {
treeData: [],
defaultProps: {
children: "children",
label: "devicetypeName",
},
tableData: [],
DevicetypeIdOptions: [],
options: [],
value: [],
dialogVisible: false,
intelligenceTypeData: [],
devicetypeId: null,
dialogTableSelect: [],
stdpatrolPointId: null,
dialogTableSelectName: [],
filterText: null,
};
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
created() {},
mounted() {
this.init();
devicetype().then((res) => {
if (res.code == 200) {
res.data.forEach((item) => {
if (item.devicetypeId !== 1) {
this.DevicetypeIdOptions.push(item);
}
});
}
});
dataFormat().then((res) => {
if (res.code == 200) {
console.log(this.options, res.data);
res.data.forEach((item) => {
item.dictValue = String(item.dictValue);
});
this.options = res.data;
}
});
},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.devicetypeName.indexOf(value) !== -1;
},
init(qurey) {
getTreeAreaDeviceSelect(qurey).then((res) => {
this.tableData = [];
if (res.code == 200) {
res.data.forEach((item) => {
if (item.devicetypeId !== 1) {
this.treeData.push(item);
}
});
}
});
},
// *
addRedStar(h, { column }) {
return [
h("span", { style: "color: red" }, "*"),
h("span", " " + column.label),
];
},
intelligenceTypeBtn(row) {
this.stdpatrolPointId = row.stdpatrolPointId;
subtypeList().then((res0) => {
if (res0.code == 200) {
algList().then((res1) => {
if (res1.code == 200) {
let list = res1.rows;
list.forEach((item) => {
item.children = [];
item.id = `${item.algId}_${item.algId}`;
res0.rows.forEach((i) => {
i.id = i.algSubtypeId;
if (item.algId == i.algId && item.algName == i.algName) {
item.children.push(i);
}
});
});
this.intelligenceTypeData = list;
this.dialogVisible = true;
this.$nextTick(() => {
if (row.alarmThreshold) {
let data = JSON.parse(row.alarmThreshold);
let idArr = [];
data.forEach((item) => {
idArr.push(item.id.split("_")[1]);
});
idArr.forEach((id) => {
let show = res0.rows.find(
(item) => item.algSubtypeId == id
);
if (show) {
this.$refs.multipleTable.toggleRowSelection(show, true);
}
});
}
});
}
});
}
});
},
// *
addRedStar(h, { column }) {
return [
h("span", { style: "color: red" }, "*"),
h("span", " " + column.label),
];
},
//
handleNodeClick(data) {
console.log(data, 11111111111);
this.devicetypeId = data.devicetypeId;
this.tableData = [];
this.initClickList(data);
},
initClickList(data) {
cilikList(data.devicetypeId).then((res) => {
if (res.code == 200) {
console.log(res, 111);
this.tableData = res.rows;
}
});
},
addBtn() {
if (this.tableData.length < 200) {
this.tableData.push({});
} else {
this.$message({
type: "warning",
message: "最多添加200条数据!",
});
}
},
//
submitForm() {
if (!this.tableData.length) return;
let flag = this.tableData.every((item) => {
if (item.componentDevicetypeId && item.patrolContent) {
return true;
} else {
return false;
}
});
if (flag) {
add(this.tableData).then((res) => {
this.initClickList(this.devicetypeId);
});
} else {
this.$message({
type: "warning",
message: "必填项不能为空!",
});
}
},
//
handleDelete(row, index) {
if (!row.stdpatrolPointId) {
this.tableData.splice(index, 1);
} else {
remove(row.stdpatrolPointId).then((res) => {
if (res.code == 200) {
this.$message({
type: "success",
message: "删除成功!",
});
this.initClickList(row);
}
});
}
return;
},
//
handleSelectionChangeDialog(val) {
this.dialogTableSelect = [];
this.dialogTableSelectName = [];
val.forEach((item) => {
let data = {
id: `sub_${item.algSubtypeId}`,
code: item.algSubtypeCode || "",
upperValue: item.upperValue || "",
lowerValue: item.lowerValue || "",
algSubtypeName: item.algSubtypeName || "",
};
this.dialogTableSelect.push(data);
this.dialogTableSelectName.push(item.algSubtypeName);
});
},
dialogTableOk() {
this.dialogVisible = false;
console.log(this.dialogTableSelect, this.stdpatrolPointId);
this.tableData.forEach((item) => {
if (item.stdpatrolPointId == this.stdpatrolPointId) {
item.alarmThreshold = JSON.stringify(this.dialogTableSelect);
item.algSubtypeName = this.dialogTableSelectName.join(",");
}
});
},
handleClose() {
this.dialogVisible = false;
},
},
};
</script>
<style lang="scss" scoped>
.qurey {
display: flex;
margin-bottom: 10px;
::v-deep.el-button {
background-color: #46a6ff !important;
color: #fff !important ;
}
}
.intelligenceType {
color: rgb(17, 189, 217);
cursor: pointer;
}
.saveBtn {
text-align: center;
margin-top: 10px;
}
</style>

+ 1374
- 0
src/views/point copy/site_management.vue
File diff suppressed because it is too large
View File


+ 549
- 0
src/views/point/algorithm.vue View File

@ -0,0 +1,549 @@
<template>
<div>
<div class="page-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="75px"
>
<el-form-item label="算法类型" prop="taskType">
<el-select
style="width: 150px;"
v-model="queryParams.taskType"
placeholder="全部"
filterable
clearable
popper-class="card-select-dropdown"
>
<el-option
v-for="item in listPatroltype"
:key="item.algId"
:label="item.algName"
:value="item.algName"
/>
</el-select>
</el-form-item>
<el-form-item label="算法名称" prop="devType">
<el-select
style="width: 150px;"
v-model="queryParams.devType"
placeholder="全部"
filterable
clearable
popper-class="card-select-dropdown"
>
<el-option label="表记识别算法" value="0" />
<el-option label="机器人" value="1" />
<el-option label="视频" value="2" />
</el-select>
</el-form-item>
<el-form-item label="算法状态" prop="fileStatus">
<el-select
style="width: 150px;"
v-model="queryParams.fileStatus"
placeholder="全部"
filterable
clearable
popper-class="card-select-dropdown"
>
<el-option label="未归档" value="0" />
<el-option label="已归档" value="1" />
</el-select>
</el-form-item>
<el-form-item label="时间">
<el-date-picker
style="width: 200px;border-radius: 5px;border:1px"
v-model="timeValue"
type="date"
clearable
placeholder="选择时间"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions0"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<div class="table-card" ref="tableCardRef">
<el-table
class="card-table"
v-loading="loading"
:data="dataList"
height="500"
border
stripe
>
<el-table-column
label="序号"
type="index"
width="50"
align="center"
/>
<el-table-column label="算法标识" align="center" prop="algSubtypeCode" />
<el-table-column label="算法名称" align="center" prop="algSubtypeName" />
<el-table-column label="算法类型" align="center" prop="algName" />
<!-- <el-table-column label="厂商" align="center" prop="createTime" >
<template slot-scope="scope">
<span>**********</span>
</template>
</el-table-column> -->
<el-table-column label="时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<!-- 只有未归档才能修正 -->
<el-button v-if="scope.row.delFlag !=1"
size="mini"
type="primary"
@click="archiveInfo(scope.row)"
>启用
</el-button>
<el-button v-else
style="background-color: #909399;"
size="mini"
type="info"
@click="lookDetail(scope.row)"
>停用</el-button
>
</template>
</el-table-column>
</el-table>
<CardPagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</div>
<el-dialog
title="归档"
id="dialoga"
:visible.sync="showContrastEdit"
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
append-to-body
custom-class="card-dialog card-page card-dialog-height-auto"
>
<el-form
ref="contrastForm"
:model="contrastForm"
:rules="contrastRules"
label-width="100px"
label-position="top"
>
<el-form-item label="审核人" prop="chechkPerson">
<el-input
v-model="contrastForm.chechkPerson"
placeholder="请输入审核人"
/>
</el-form-item>
<el-form-item label="巡视结论" prop="taskResult">
<el-input
style="resize: none"
type="textarea"
:rows="3"
v-model="contrastForm.taskResult"
placeholder="请输入巡视结论"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
class="card-dialog-cancel-btn"
@click="() => (showContrastEdit = false)"
> </el-button
>
<el-button
type="primary"
class="card-dialog-sure-btn"
:loading="isArchiving"
:disable="isLock"
@click="handleArchiveClicked"
> </el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listPartrolResult,
} from "@/api/algorithmConfiguration/index";
import {
partrolResultArchive,
} from "@/api/inspectionDataManage/inspectionArchive";
// import InspectionArchiveContrastDialog from "@/views/components/InspectionArchiveContrastDialog.vue";
import debounce from "lodash.debounce";
import { listPatroltype } from "@/api/algorithmConfiguration/index";
import { openDialog } from "../common.js";
import CardPagination from "@/components/CardPagination/index.vue";
import CardBox from "@/components/cardBox.vue";
export default {
name: "InspectionArchive",
components: {
// InspectionArchiveContrastDialog,
CardPagination,
CardBox },
dicts: [
"patrol_result_value_type",
"patrol_result_recognition_type",
"patrol_result_valid_type",
// "patrol_type",
"device_type",
],
data() {
return {
pickerOptions0: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
}
},
timeValue:'',
//
loading: true,
isArchiving: false, //
isLock: false,
//
total: 0,
//
dataList: [],
//
dateRange: [],
dateRangePickerOptions: {
disabledDate(selectDate) {
return new Date().getTime() < selectDate.getTime();
},
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
taskType: null,
devType: null,
fileStatus: null,
},
//
showContrast: false,
//
showContrastEdit: false,
contrastForm: {
chechkPerson: null,
taskResult: null,
},
contrastRules: {
chechkPerson: [
{ required: true, message: "请输入审核人", trigger: "change" },
],
taskResult: [
{ required: true, message: "请输入巡视结论", trigger: "change" },
],
},
//
newInfo: null,
//
originalInfo: null,
listPatroltype: [],
};
},
created() {
//
this.setTableHeight = debounce(this.setTableHeight, 300);
window.addEventListener("resize", this.setTableHeight);
this.getlistPatroltype();
this.getList();
},
mounted() {
this.setTableHeight();
},
destroyed() {
this.setTableHeight.cancel();
window.removeEventListener("resize", this.setTableHeight);
},
methods: {
getlistPatroltype() {
listPatroltype().then((res) => {
this.listPatroltype = res.rows;
});
},
//
getPatrolTypeStr(type) {
const element = this.listPatroltype.find(
(item) => item.patrolTypeCode == type
);
if (element) {
return element.patrolTypeName;
}
return "";
},
setTableHeight() {
this.tableHeight = this.$refs.tableCardRef.clientHeight - 40;
},
/** 获取数据列表 */
getList() {
this.loading = true;
const params = { ...this.queryParams };
//
if (this.dateRange && this.dateRange.length === 2) {
params.beginTime = this.dateRange[0];
params.endTime = this.dateRange[1];
}
listPartrolResult(params).then((response) => {
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
//
getDeviceTypeStr(dataType) {
switch (dataType) {
case "0":
return "无人机";
case "1":
return "机器人";
case "2":
return "视频";
}
},
//
archiveInfo(info) {
this.contrastForm = {
lineId: info.lineId,
chechkPerson: null,
taskResult: null,
};
this.resetForm("contrastForm");
this.showContrastEdit = true;
},
//
lookDetail(info) {
this.$router.push({
name: "cardInspectionArchivePointInfo",
params: {
id: info.lineId,
},
});
// //
// if (process.env.VUE_APP_DIALOG == "true") {
// this.$router.push({
// name: "cardInspectionArchivePointInfo",
// params: {
// id: info.lineId,
// },
// });
// } else {
// sessionStorage.setItem("archiveLineId", JSON.stringify(info.lineId));
// openDialog({
// sourceCardId: "wuhan@videoMonitor-card-45",
// targetCardId: "wuhan@videoMonitor-card-46",
// dialogTitle: "",
// });
// }
},
//
handleArchiveClicked() {
this.$refs["contrastForm"].validate((valid) => {
if (valid) {
const params = { ...this.contrastForm };
this.isArchiving = true;
this.isLock = true;
partrolResultArchive(params)
.then((res) => {
this.$modal.msgSuccess("归档成功");
this.showContrastEdit = false;
this.getList();
})
.finally(() => {
this.isArchiving = false;
this.isLock = false;
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
.page-content {
width: 100%;
height: 856px;
}
.page-container {
height: 100%;
display: flex;
flex-direction: column;
}
.query-card {
margin-bottom: 15px;
::v-deep .el-form-item {
margin-bottom: 0;
}
}
.table-card {
flex: 1;
height: 0;
::v-deep .el-card__body {
height: 100%;
}
}
// #dialoga {
// height: 39vh;
// overflow: auto;
// }
</style>
<style>
.vue-treeselect__control {
background-color: rgb(0, 1, 1, 0) !important;
border: 1px solid #40486a !important;
}
.el-tree-node__content:hover {
/* background: RGBA(23, 37, 51, 1) !important; */
}
.el-tree-node:focus > .el-tree-node__content {
/* background-color: RGBA(23, 37, 51, 1) !important; */
}
.el-picker-panel {
/* background: #202f3e !important;
border: 1px solid #40486a !important; */
}
.el-picker-panel__footer {
/* background: #202f3e !important; */
}
.el-date-picker__time-header {
border-bottom: 1px solid #40486a !important;
}
.el-date-table th {
border-bottom: 1px solid #40486a !important;
}
.el-picker-panel__footer {
border-top: 1px solid #40486a !important;
}
.el-popper[x-placement^="top"] .popper__arrow::after {
border-top-color: #40486a !important;
}
.el-time-panel__footer {
border-top: 1px solid #40486a !important;
}
.el-button--medium,
.el-button.is-plain {
background-color: #247382 !important;
border: 1px solid #247382 !important;
}
.el-time-panel {
/* background-color: #202f3e !important;
border: 1px solid #40486a !important; */
}
.el-date-table td.disabled div {
background: RGBA(23, 37, 51, 1) !important;
}
.el-popper[x-placement^="bottom"] .popper__arrow::after {
border-bottom-color: #40486a !important;
}
.el-input-number--medium .el-input-number__increase {
background-color: rgb(1, 1, 1, 0) !important;
}
.el-transfer-panel {
/* background-color: #202f3e !important;
border-color: #40486a !important; */
/* border: 1px solid red; */
width: 300px !important;
}
.el-transfer-panel__header {
/* background-color: #202f3e !important;
border-color: #40486a !important; */
}
.el-step__head.is-finish {
color: #37cbd6 !important;
border-color: #37cbd6 !important;
}
.el-message-box {
/* background-color: #202f3e !important;
border: 1px solid #40486a !important; */
}
.el-button--small {
background-color: #247382 !important;
border: none !important;
}
.el-step__title.is-finish {
color: #37cbd6 !important;
}
.el-input__inner {
border-color: #40486a !important;
}
.el-select-dropdown {
/* background-color: #202f3e !important;
border: 1px solid #40486a !important; */
}
.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
background-color: RGBA(23, 37, 51, 1) !important;
}
</style>

+ 534
- 0
src/views/point/components/ImageAnnotation.vue View File

@ -0,0 +1,534 @@
<template>
<div class="image-annotation-container">
<!-- 控制面板 -->
<div class="control-panel">
<button @click="setMode('point')" :class="{ active: mode === 'point' }">
绘制点
</button>
<button @click="setMode('rect')" :class="{ active: mode === 'rect' }">
绘制矩形
</button>
<button @click="clearAll" class="clear-btn">清除所有</button>
<div class="config-options" v-if="mode">
<label v-if="mode === 'point'">
点大小:
<input type="range" v-model.number="pointSize" min="3" max="15" />
</label>
<label v-if="mode === 'rect'">
线宽:
<input type="range" v-model.number="lineWidth" min="1" max="10" />
</label>
<!-- <label>
颜色: <input type="color" v-model="drawColor">
</label> -->
</div>
</div>
<!-- 图片和画布容器 -->
<div class="image-wrapper" ref="imageWrapper">
<img
:src="imageSrc"
alt="标注图片"
ref="image"
@load="initCanvas"
@mousedown="handleMouseDown"
@mousemove="handleMouseMove"
@mouseup="handleMouseUp"
@mouseleave="handleMouseUp"
/>
<canvas ref="canvas"></canvas>
</div>
<!-- 标注信息面板 -->
<!-- <div class="annotation-panel">
<h3>标注信息 ({{ annotations.length }})</h3>
<div class="annotation-list">
<div
v-for="(annotation, index) in annotations"
:key="index"
class="annotation-item"
:class="annotation.type"
@click="highlightAnnotation(index)"
>
<div class="annotation-header">
<span class="annotation-type">
{{ annotation.type === 'point' ? '点' : '矩形' }} {{ index + 1 }}
</span>
<button @click.stop="removeAnnotation(index)" class="small-btn">
删除
</button>
</div>
</div>
</div>
</div> -->
</div>
</template>
<script>
export default {
name: "ImageAnnotation",
props: {
imageSrc: {
type: String,
required: true,
},
},
data() {
return {
mode: null, // : 'point' 'rect'
isDrawing: false, //
startX: 0, // X
startY: 0, // Y
annotations: [], //
drawColor: "red", //
pointSize: 6, //
lineWidth: 2, // 线
canvas: null, // canvas
ctx: null, // canvas
imgElement: null, // img
all_data: [],
};
},
watch: {
imageSrc() {
this.clearAll();
this.$nextTick(() => {
if (this.imgElement.complete) {
this.initCanvas();
}
});
},
},
mounted() {
// this.annotations = [];
// this.all_data = [];
this.imgElement = this.$refs.image;
this.canvas = this.$refs.canvas;
this.ctx = this.canvas.getContext("2d");
//
if (this.imgElement.complete) {
this.initCanvas();
}
},
methods: {
//
initCanvas() {
this.canvas.width = this.imgElement.width;
this.canvas.height = this.imgElement.height;
localStorage.setItem(
"imgElement",
JSON.stringify({
width: this.imgElement.width,
height: this.imgElement.height,
})
);
this.redrawAll();
},
//
setMode(mode) {
this.mode = mode;
this.imgElement.ondragstart = function () {
return false;
};
},
//
handleMouseDown(e) {
if (!this.mode || e.button !== 0) return; //
const rect = this.imgElement.getBoundingClientRect();
this.startX = e.clientX - rect.left;
this.startY = e.clientY - rect.top;
if (this.mode === "point") {
this.addPoint(this.startX, this.startY);
} else if (this.mode === "rect") {
this.isDrawing = true;
}
},
//
handleMouseMove(e) {
if (!this.isDrawing) return;
const rect = this.imgElement.getBoundingClientRect();
const currentX = e.clientX - rect.left;
const currentY = e.clientY - rect.top;
//
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
this.redrawAll();
//
this.drawRect(
this.startX,
this.startY,
currentX - this.startX,
currentY - this.startY,
this.drawColor,
this.lineWidth,
true //
);
},
//
handleMouseUp(e) {
if (!this.isDrawing) return;
this.isDrawing = false;
const rect = this.imgElement.getBoundingClientRect();
const endX = e.clientX - rect.left;
const endY = e.clientY - rect.top;
//
if (
Math.abs(endX - this.startX) > 5 &&
Math.abs(endY - this.startY) > 5
) {
this.addRectangle(
this.startX,
this.startY,
endX - this.startX,
endY - this.startY,
endX,
endY
);
}
this.redrawAll();
},
//
addPoint(x, y) {
var point_object = { firstX: Math.round(x), firstY: Math.round(y) };
this.all_data.push(point_object);
localStorage.setItem("drawData", JSON.stringify(this.all_data));
this.annotations.push({
type: "point",
x,
y,
color: this.drawColor,
size: this.pointSize,
});
this.redrawAll();
},
//
addRectangle(x, y, width, height, endX, endY) {
//
var point_object = {
firstX: Math.round(x),
firstY: Math.round(y),
secondX: Math.round(endX),
secondY: Math.round(endY),
};
this.all_data.push(point_object);
//
localStorage.setItem("drawData", JSON.stringify(this.all_data));
this.annotations.push({
type: "rect",
x,
y,
width,
height,
color: this.drawColor,
lineWidth: this.lineWidth,
});
},
//
drawPoint(x, y, color, size) {
this.ctx.fillStyle = color;
this.ctx.beginPath();
this.ctx.arc(x, y, size, 0, 2 * Math.PI);
this.ctx.fill();
//
this.ctx.fillStyle = "red";
this.ctx.beginPath();
this.ctx.arc(x, y, size / 2, 0, 2 * Math.PI);
this.ctx.fill();
},
//
drawRect(x, y, width, height, color, lineWidth, isTemporary = false) {
this.ctx.strokeStyle = color;
this.ctx.lineWidth = lineWidth;
this.ctx.strokeRect(x, y, width, height);
if (!isTemporary) {
//
this.ctx.fillStyle = "rgba(0, 0, 255, 0)"; //
// this.ctx.fillStyle = color.replace(')', ', 0)').replace('rgb', 'rgba');
this.ctx.fillRect(x, y, width, height);
}
},
//
redrawAll() {
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
this.annotations.forEach((annotation) => {
if (annotation.type === "point") {
this.drawPoint(
annotation.x,
annotation.y,
annotation.color,
annotation.size
);
} else {
this.drawRect(
annotation.x,
annotation.y,
annotation.width,
annotation.height,
annotation.color,
annotation.lineWidth
);
}
});
},
//
removeAnnotation(index) {
this.all_data = [];
this.annotations.splice(index, 1);
this.redrawAll();
},
//
highlightAnnotation(index) {
const annotation = this.annotations[index];
//
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
//
this.annotations.forEach((item, i) => {
if (i !== index) {
const alphaColor = item.color
.replace(")", ", 0.3)")
.replace("rgb", "rgba");
if (item.type === "point") {
this.drawPoint(item.x, item.y, alphaColor, item.size);
} else {
this.drawRect(
item.x,
item.y,
item.width,
item.height,
alphaColor,
item.lineWidth
);
}
}
});
//
if (annotation.type === "point") {
this.drawPoint(
annotation.x,
annotation.y,
annotation.color,
annotation.size * 1.5
);
} else {
this.drawRect(
annotation.x,
annotation.y,
annotation.width,
annotation.height,
annotation.color,
annotation.lineWidth * 2
);
}
// 3
setTimeout(() => {
this.redrawAll();
}, 3000);
},
//
clearAll() {
this.annotations = [];
this.all_data = [];
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
},
//
exportAnnotations() {
const data = {
imageWidth: this.imgElement.width,
imageHeight: this.imgElement.height,
annotations: this.annotations,
};
return data;
},
//
importAnnotations(data) {
if (
data.imageWidth === this.imgElement.width &&
data.imageHeight === this.imgElement.height
) {
this.annotations = data.annotations;
this.redrawAll();
return true;
}
return false;
},
},
};
</script>
<style scoped>
.image-annotation-container {
font-family: Arial, sans-serif;
max-width: 1000px;
height: 550px;
margin: 0 auto;
padding: 20px;
overflow: scroll;
}
.control-panel {
margin: 15px 0;
padding: 15px;
/* background: #f5f5f5; */
border-radius: 5px;
display: flex;
flex-wrap: wrap;
gap: 10px;
align-items: center;
border: 1px solid #555;
}
button {
padding: 8px 15px;
background: #4caf50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background 0.2s;
}
button:hover {
background: #45a049;
}
button.active {
background: #2e7d32;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}
.clear-btn {
background: #f44336;
}
.clear-btn:hover {
background: #d32f2f;
}
.small-btn {
padding: 3px 8px;
font-size: 12px;
background: #f44336;
}
.config-options {
display: flex;
gap: 15px;
align-items: center;
margin-left: auto;
}
.config-options label {
display: flex;
align-items: center;
gap: 5px;
font-size: 14px;
}
.image-wrapper {
position: relative;
display: inline-block;
margin-bottom: 20px;
border: 1px solid #555;
}
img {
display: block;
max-width: 100%;
max-height: 100%;
}
canvas {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
/* width: 100%;
height: 100%; */
/* width:780px;
height:445px; */
}
.annotation-panel {
border: 1px solid #ddd;
padding: 15px;
border-radius: 5px;
background: #f9f9f9;
}
.annotation-list {
max-height: 300px;
overflow-y: auto;
margin-top: 10px;
}
.annotation-item {
padding: 10px;
margin-bottom: 8px;
background: white;
border-radius: 4px;
border-left: 4px solid #4caf50;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
}
.annotation-item:hover {
transform: translateX(3px);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.annotation-item.point {
border-left-color: #2196f3;
}
.annotation-item.rect {
border-left-color: #ff9800;
}
.annotation-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 5px;
}
.annotation-type {
font-weight: bold;
}
.annotation-details {
font-size: 14px;
color: #555;
}
.empty-message {
color: #777;
font-style: italic;
text-align: center;
padding: 10px;
}
</style>

+ 410
- 0
src/views/point/components/chooseAlg.vue View File

@ -0,0 +1,410 @@
<template>
<el-dialog
:title="alertTitle"
:visible.sync="visible"
width="55%"
@close="handleClose"
:close-on-click-modal="false"
append-to-body
>
<el-row class="card-page">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="75px"
>
<el-form-item label="算法类型" prop="taskType">
<el-select
style="width: 150px"
v-model="queryParams.taskType"
placeholder="全部"
filterable
clearable
popper-class="card-select-dropdown"
>
<el-option
v-for="item in listPatroltype"
:key="item.algId"
:label="item.algName"
:value="item.algName"
/>
</el-select>
</el-form-item>
<el-form-item label="算法名称" prop="devType">
<el-select
style="width: 150px"
v-model="queryParams.devType"
placeholder="全部"
filterable
clearable
popper-class="card-select-dropdown"
>
<el-option label="表记识别算法" value="0" />
<el-option label="机器人" value="1" />
<el-option label="视频" value="2" />
</el-select>
</el-form-item>
<el-form-item label="算法状态" prop="fileStatus">
<el-select
style="width: 150px"
v-model="queryParams.fileStatus"
placeholder="全部"
filterable
clearable
popper-class="card-select-dropdown"
>
<el-option label="未归档" value="0" />
<el-option label="已归档" value="1" />
</el-select>
</el-form-item>
<el-form-item label="时间">
<el-date-picker
style="width: 200px; border-radius: 5px; border: 1px"
v-model="timeValue"
type="date"
clearable
placeholder="选择时间"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions0"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-form label-width="0px" :model="form" ref="ruleForm">
<el-col :span="24">
<el-table
v-loading="loading"
:data="algList"
row-key="id"
border
default-expand-all
height="400px"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column
type="selection"
align="center"
width="50"
v-if="!disableCheck"
>
<template #header>
<span></span>
</template>
<template slot-scope="scope">
<el-checkbox
:indeterminate="scope.row.isIndeterminate"
v-model="scope.row.checked"
@change="handleRowCheckedChange(scope.row)"
></el-checkbox>
</template>
</el-table-column>
<el-table-column
type="index"
align="center"
label="序号"
width="50"
/>
<el-table-column
prop="name"
header-align="center"
label="算法名称"
min-width="180"
>
</el-table-column>
<el-table-column label="算法类型" align="center" prop="name" />
<el-table-column label="时间" align="center" prop="name" />
<el-table-column prop="upperValue" align="center" width="180">
<template #header>
<div>阈值上限 <span style="color: red">*</span></div>
</template>
<template slot-scope="scope">
<el-form-item
style="margin-top: 0; margin-bottom: 0"
v-if="scope.row.upperFlag"
:prop="'algList[' + scope.$index + '].upperValue'"
:rules="{
required:
scope.row.upperFlag && scope.row.checked ? true : false,
message: '必填',
trigger: 'blur',
}"
>
<el-input
v-model="scope.row.upperValue"
:disabled="!scope.row.checked"
></el-input>
<span slot="error"> </span>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="lowerValue" align="center" width="180">
<template #header>
<div>阈值下限 <span style="color: red">*</span></div>
</template>
<template slot-scope="scope">
<el-form-item
style="margin-top: 0; margin-bottom: 0"
v-if="scope.row.lowerFlag"
:prop="'algList[' + scope.$index + '].lowerValue'"
:rules="{
required:
scope.row.lowerFlag && scope.row.checked ? true : false,
message: '必填',
trigger: 'blur',
}"
>
<el-input
v-model="scope.row.lowerValue"
:disabled="!scope.row.checked"
></el-input>
<span slot="error"> </span>
</el-form-item>
</template>
</el-table-column>
</el-table>
</el-col>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer card-page">
<el-button @click="eventOk" :disabled="loading" type="primary"
>确定</el-button
>
<el-button @click="visible = false">取消</el-button>
</span>
</el-dialog>
</template>
<script>
import { getAlgList, getAlgPartType } from "@/api/basedata/area/area";
import linq from "linq";
export default {
props: {
show: {
type: Boolean,
default: false,
},
// json
alarmThreshold: {
type: String,
default: "",
},
//
disableCheck: {
type: Boolean,
default: false,
},
//
filterCheckedAlgs: {
type: Boolean,
default: false,
},
},
watch: {
show(newVal) {
this.visible = newVal;
if (newVal === true) {
this.loadData();
}
},
},
data() {
return {
loading: false,
form: {
algList: [],
},
visible: false,
algList: [] /* 算法类型 */,
alertTitle: "设置智能识别类型" /* 弹窗标题 */,
rules: {
algId: [{ required: true, message: "必选", trigger: "blur" }],
algSubtypeId: [{ required: true, message: "必选", trigger: "blur" }],
upperValue: [{ required: true, message: "必选", trigger: "blur" }],
lowerValue: [{ required: true, message: "必选", trigger: "blur" }],
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
taskType: null,
devType: null,
fileStatus: null,
},
};
},
created() {},
computed: {},
methods: {
loadData() {
this.loading = true;
//
getAlgPartType()
.then((res) => {
//
if (this.filterCheckedAlgs) {
//
if (this.alarmThreshold.length > 0) {
const alarmThreshold = JSON.parse(this.alarmThreshold);
const chooseIds = linq
.from(alarmThreshold)
.select((x) => x.id.replace("sub_", ""))
.toArray();
res.rows = res.rows.filter((x) =>
chooseIds.includes(x.algSubtypeId.toString())
);
}
}
res.rows.forEach((x) => {
x.hasChildren = false;
x.children = [];
});
this.loading = false;
this.loading = true;
//
getAlgList()
.then((res1) => {
const treeData = [];
res1.rows.forEach((row) => {
const tmp = {
id: "alg_" + row.algId,
name: row.algName,
sourceId: row.algId,
checked: false,
isIndeterminate: false,
upperValue: "",
lowerValue: "",
lowerFlag: row.lowerFlag,
upperFlag: row.upperFlag,
code: "",
parent: null,
children: null,
};
tmp.children = linq
.from(res.rows)
.where((x) => x.algId === row.algId)
.select((alg) => {
return {
sourceId: alg.algSubtypeId,
id: "sub_" + alg.algSubtypeId,
name: alg.algSubtypeName,
checked: false,
isIndeterminate: false,
code: alg.algSubtypeCode,
upperValue: "",
lowerValue: "",
lowerFlag: alg.lowerFlag,
upperFlag: alg.upperFlag,
parent: tmp,
};
})
.toArray();
//
if (!(this.filterCheckedAlgs && tmp.children.length === 0)) {
treeData.push(tmp);
}
});
this.algList = treeData;
this.form.algList = this.treeToList(treeData);
this.loading = false;
this.renderData();
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
this.loading = false;
});
},
//
renderData() {
if (this.alarmThreshold.length > 0) {
const alarmThreshold = JSON.parse(this.alarmThreshold);
alarmThreshold.forEach((subAlg) => {
const tmpAlg = this.form.algList.find((c) => c.id === subAlg.id);
if (tmpAlg) {
tmpAlg.checked = true;
tmpAlg.lowerValue = subAlg.lowerValue;
tmpAlg.upperValue = subAlg.upperValue;
if (tmpAlg.parent) {
tmpAlg.parent.checked = linq
.from(tmpAlg.parent.children)
.all((x) => x.checked);
if (!tmpAlg.parent.checked) {
tmpAlg.parent.isIndeterminate = linq
.from(tmpAlg.parent.children)
.any((x) => x.checked);
}
}
}
});
}
},
treeToList(nodes) {
let result = [];
nodes.forEach((node) => {
result.push(node);
if (node.children && node.children.length > 0) {
result = result.concat(this.treeToList(node.children));
}
});
return result;
},
handleRowCheckedChange(row) {
//
row.children && row.children.forEach((x) => (x.checked = row.checked));
if (row.parent) {
row.parent.checked = linq
.from(row.parent.children)
.all((x) => x.checked);
if (!row.parent.checked) {
row.parent.isIndeterminate = linq
.from(row.parent.children)
.any((x) => x.checked);
}
} else {
if (row.checked) {
row.isIndeterminate = false;
}
}
},
//
handleClose() {
//
this.resetForm("ruleForm");
this.visible = false;
this.$emit("update:show", false);
},
//
eventOk() {
const me = this;
this.$refs.ruleForm.validate((ok) => {
if (ok) {
me.visible = false;
this.$emit(
"confirm",
this.form.algList.filter((x) => x.checked)
);
}
});
},
},
};
</script>

+ 222
- 0
src/views/point/components/chooseDevices.vue View File

@ -0,0 +1,222 @@
<template>
<el-dialog title="选择巡检设备" :visible.sync="visible" width="55%" style="height:100%" @close="handleClose" :close-on-click-modal="false" append-to-body>
<el-row class="card-page">
<el-form label-width="0px" :model="form" ref="ruleForm">
<el-col :span="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="设备类型" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择">
<el-option v-for="item in dict.type.device_type" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="设备名称" prop="patroldeviceName">
<el-input v-model="queryParams.patroldeviceName" placeholder="请输入设备名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="设备编码" prop="patroldeviceCode">
<el-input v-model="queryParams.patroldeviceCode" placeholder="请输入设备编码" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="生产厂家" prop="manufacturer">
<el-input v-model="queryParams.manufacturer" placeholder="请输入生产厂家" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="eqpbookList" @row-click="handleCurrentChange" :multiple="false" highlight-current-row>
<el-table-column label="设备名称" width="100" align="center" prop="patroldeviceName" fixed />
<el-table-column label="设备编码" width="100" align="center" prop="patroldeviceCode" fixed />
<el-table-column label="视频NVR编码" width="100" align="center" prop="videoNvrCode" fixed />
<el-table-column label="生产厂家" width="100" align="center" prop="manufacturer" fixed />
<el-table-column label="主系统编号" width="100" align="center" prop="mainSystemCode" fixed />
<el-table-column label="变电站名称" width="150" align="center" prop="stationName" />
<el-table-column label="变电站编码" width="100" align="center" prop="stationCode" />
<el-table-column label="区域名称" width="150" align="center" prop="areaName" />
<el-table-column label="设备类型" width="100" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_type" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="设备型号" width="100" align="center" prop="deviceModel" />
<el-table-column label="使用单位" width="100" align="center" prop="useUnit" />
<el-table-column label="设备来源" width="100" align="center" prop="deviceSource" />
<el-table-column label="生产日期" width="100" align="center" prop="productionDate" />
<el-table-column label="出厂编号" width="100" align="center" prop="productionCode" />
<el-table-column label="是否轮转" width="100" align="center" prop="istransport">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_transport" :value="scope.row.istransport" />
</template>
</el-table-column>
<el-table-column label="使用类型" width="100" align="center" prop="useMode">
<template slot-scope="scope">
<dict-tag :options="dict.type.use_mode" :value="scope.row.useMode" />
</template>
</el-table-column>
<el-table-column label="视频类型" width="100" align="center" prop="videoMode">
<template slot-scope="scope">
<dict-tag :options="dict.type.video_mode" :value="scope.row.videoMode" />
</template>
</el-table-column>
<el-table-column label="所属机器人" width="100" align="center" prop="robotsCode" />
<el-table-column label="ip地址" width="200" align="center" prop="ipAddr" />
<el-table-column label="端口" width="100" align="center" prop="port" />
<el-table-column label="用户" width="100" align="center" prop="user" />
<el-table-column label="密码" width="100" align="center" prop="password" />
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</el-col>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer card-page">
<el-button @click="eventOk" :disabled="loading" type="primary">确定</el-button>
<el-button @click="visible = false">取消</el-button>
</span>
</el-dialog>
</template>
<script>
import {
listEqpbook
} from "@/api/basedata/eqpbook/eqpbook";
import linq from 'linq'
export default {
dicts: ["device_type", "video_mode", "use_mode", "is_transport"],
props: {
show: {
type: Boolean,
default: false,
}
},
watch: {
show (newVal) {
this.visible = newVal
if (newVal === true) {
this.getList();
}
}
},
data () {
return {
currentRow: null,
total: 0,
loading: false,
// -
eqpbookList: [],
form: {
algList: []
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
stationName: null,
stationCode: null,
areaName: null,
patroldeviceName: null,
patroldeviceCode: null,
deviceModel: null,
manufacturer: null,
useUnit: null,
deviceSource: null,
productionDate: null,
productionCode: null,
istransport: null,
useMode: null,
videoMode: null,
place: null,
positionX: null,
positionY: null,
positionZ: null,
type: null,
patroldeviceInfo: null,
robotsCode: null,
ipAddr: null,
port: null,
user: null,
password: null,
video_mode: null,
use_mode: null,
is_transport: null,
},
//
ids: [],
//
single: true,
//
multiple: true,
visible: false,
algList: [],/* 算法类型 */
alertTitle: "设置智能识别类型", /* 弹窗标题 */
rules: {
algId: [{ required: true, message: "必选", trigger: "blur" }],
algSubtypeId: [{ required: true, message: "必选", trigger: "blur" }],
upperValue: [{ required: true, message: "必选", trigger: "blur" }],
lowerValue: [{ required: true, message: "必选", trigger: "blur" }],
}
}
},
created () {
},
computed: {
},
methods: {
/** 重置按钮操作 */
resetQuery () {
this.resetForm("queryForm");
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery () {
this.queryParams.pageNum = 1;
this.getList();
},
handleCurrentChange (row) {
this.currentRow = row;
},
//
handleSelectionChange (selection) {
this.ids = selection.map((item) => item.eqpbookId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 查询基础数据-设备台账主列表 */
getList () {
this.loading = true;
listEqpbook(this.queryParams).then((response) => {
this.eqpbookList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
handleClose () {
//
this.resetForm('queryForm');
this.visible = false;
this.$emit('update:show', false)
},
//
eventOk () {
const me = this;
if (this.currentRow === null) {
this.$message({
type: 'warning',
message: '请选中一行数据。'
})
return;
}
me.visible = false;
this.$emit('confirm', this.currentRow)
}
}
}
</script>

+ 591
- 0
src/views/point/components/site_VideoDialog copy.vue View File

@ -0,0 +1,591 @@
<template>
<el-dialog
:title="pointDialogDataName"
:visible.sync="pointDialogShow"
width="70%"
:before-close="bindingMonitorPointClose"
>
<el-row :gutter="20">
<el-col :span="5">
<div class="bindingMonitorPointTree">
<el-tree
:data="dialogPointTree"
:props="defaultPropsMonitor"
@node-click="handleMonitor"
></el-tree>
</div>
</el-col>
<el-col :span="13">
<div class="bindingMonitorPointDiv">
<videoPlayer />
</div>
</el-col>
<el-col :span="6">
<div style="background: #eee; padding: 5px">
{{ $t("site_management.PTZ") }}
</div>
<div class="PTZ-content">
<img src="@/assets/images/PTZImg.png" alt="" class="PTZImg" />
<div class="r-ti2-pos">
<div @click="ptzBtn('UP', 'UP_STOP')"></div>
<div @click="ptzBtn('UP_RIGHT', 'UP_RIGHT_STOP')"></div>
<div @click="ptzBtn('RIGHT', 'RIGHT_STOP')"></div>
<div @click="ptzBtn('DOWN_RIGHT', 'DOWN_RIGHT_STOP')"></div>
<div @click="ptzBtn('DOWN', 'DOWN_STOP')"></div>
<div @click="ptzBtn('DOWN_LEFT', 'DOWN_LEFT_STOP')"></div>
<div @click="ptzBtn('LEFT', 'LEFT_STOP')"></div>
<div @click="ptzBtn('UP_LEFT', 'UP_LEFT_STOP')"></div>
</div>
</div>
<div class="r-ti3">
<div class="r-ti3-d1">
<img src="@/assets/images/searchImg.png" alt="" />
<div class="r-ti3-d2">
<div @click="ptzBtn('ZOOM_OUT', 'ZOOM_OUT_STOP')"></div>
<div @click="ptzBtn('ZOOM_IN', 'ZOOM_IN_STOP')"></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r2Img.png" alt="" />
<div class="r-ti3-d2">
<div @click="fiBtn('nearfocus', 'nearfocusstop')"></div>
<div @click="fiBtn('farfocus', 'farfocusstop')"></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r3Img.png" alt="" />
<div class="r-ti3-d2">
<div @click="fiBtn('apertureoff', 'apertureoffstop')"></div>
<div @click="fiBtn('apertureon', 'apertureonstop')"></div>
</div>
</div>
</div>
<div class="r-ti4">
<div style="display: flex">
<el-select
v-model="presetDotNum"
:placeholder="$t('site_management.PleaseSelectAPresetPoint')"
@change="presetDotBtn"
>
<el-option
:label="item.dictLabel"
:value="item.dictValue"
v-for="item in listByEqIdAndChanneData"
:key="item.dictValue"
>
</el-option>
</el-select>
<img
src="@/assets/images/playImg.png"
@click="editPresetDot1"
title="编辑预置点名称"
/>
<img src="@/assets/images/addImg.png" alt="" @click="popoverOpen" />
<el-popover
placement="top"
width="300"
v-model="popovervisible"
trigger="click"
>
<el-input placeholder="请输入内容" v-model="newpresetName" />
<div class="popover-footer">
<el-button
size="mini"
type="primary"
@click="popovervisibleShow"
>取消</el-button
>
<el-button size="mini" type="primary" @click="setPresetDot1"
>确定</el-button
>
</div>
</el-popover>
</div>
<div style="display: flex; margin-top: 20px">
<el-input
v-model="presetName"
:placeholder="$t('site_management.PleaseEnterTheContent')"
></el-input>
<img
src="@/assets/images/setImg.png"
alt=""
title="编辑预置点名称"
@click="editPresetDot2"
/>
</div>
</div>
</el-col>
</el-row>
<el-table
:data="bindingMonitorPointTableData"
style="width: 100%"
@header-click="clickFun"
>
<el-table-column :label="$t('site_management.ActionType')" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.actionType">
<el-option label="拍照" value="1" />
<el-option label="录像" value="2" />
</el-select>
</template>
</el-table-column>
<el-table-column
:label="$t('site_management.RecordingDuration')"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.videoTime"
v-if="scope.row.actionType == 2"
class="centered-input"
></el-input>
</template>
</el-table-column>
<el-table-column
:label="$t('site_management.NumberOfPhotosTaken')"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.photoCount"
v-if="scope.row.actionType == 1"
class="centered-input"
></el-input>
<!-- <span v-if="scope.row.actionType == 1">1</span> -->
</template>
</el-table-column>
<el-table-column
:label="$t('site_management.PhotoInterval')"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.photoSeper"
v-if="scope.row.actionType == 1"
class="centered-input"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
:render-header="(h, obj) => renderHeader(h, obj, $t('share.addTo'))"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="removeAction(scope.$index)"
>移除</el-button
>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="add-btn add-bth1 card-page">
<el-button type="primary" @click="saveDot1">确定</el-button>
<el-button @click="bindingMonitorPointClose">取消</el-button>
</div>
</template>
</el-dialog>
</template>
<script>
import videoPlayer from "@/components/videoPlayer/index.vue";
import {
vl,
listByEqIdAndChannelId,
realtime,
PZT,
fi,
goto,
issue,
bindingPreset,
} from "@/api/point/site_management";
export default {
components: { videoPlayer },
props: ["pointDialogDataName", "pointDialogShow", "dialogProp"],
data() {
return {
bindingMonitorPointTitle: "绑定可见光检测点",
// pointDialogShow: false,
dialogPointTree: [],
defaultPropsMonitor: {
children: "children",
label: "name",
},
listByEqIdAndChanneData: [],
bindingMonitorPointTableData: [],
presetDotNum: "",
PZTData: {},
presetName: "",
popovervisible: false,
newpresetName: "",
presetData: {
presetPosCode: "",
channelId: "",
eqpbookId: "",
patrolpointId: "",
stdparolPointId: "",
deviceId: "",
presetPosName: "",
stopTime: "",
channelImg: "",
description: "",
presetActionList: [],
presetParamList: [],
presetPointList: [],
},
};
},
methods: {
bindingMonitorPointClose() {
// this.pointDialogShow = false;
this.$emit("site_videoDialogClose",false);
},
//
handleMonitor(e) {
console.log(e, 111, this.dialogProp);
if (e.eqpbookId) {
this.presetData.patrolpointId = this.dialogProp.patrolpointId;
this.presetData.stdparolPointId = this.dialogProp.stdparolPointId;
this.presetData.deviceId = this.dialogProp.deviceId;
this.presetData.eqpbookId = e.eqpbookId;
this.presetData.channelId = e.channelId;
this.PZTData = e;
listByEqIdAndChannelId({
channelCode: e.channelCode,
patroldeviceCode: e.patroldeviceCode,
}).then((res) => {
if (res.code == 200) {
this.listByEqIdAndChanneData = res.data;
}
});
realtime({
patroldeviceCode: e.patroldeviceCode,
channelCode: e.channelCode,
}).then((res) => {
if (res.code == 200) {
// this.bindingMonitorPointTableData=res.data;
console.log(res, 1111);
}
});
}
},
renderHeader(h, { column, $index }, type) {
let that = this;
return h("div", [
//
h("span", column.label),
//
h(
"el-button",
{
props: {
type: "text",
size: "small",
},
style: "margin-left: 5px;",
on: {
click: function () {
that.clickButton(type);
},
},
},
this.$t("share.addTo")
),
]);
},
clickButton(type) {
// console.log("" + type + "");
this.bindingMonitorPointTableData.push({
actionType: "",
videoTime: "",
photoCount: "1",
photoSeper: "",
});
},
clickFun() {},
init() {
vl().then((res) => {
if (res.code == 200) {
this.dialogPointTree = res.data;
}
});
},
ptzBtn(start, stop) {
let startData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: start,
};
let stopData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: stop,
};
if (startData.patroldeviceCode && startData.channelCode) {
PZT(startData).then((res) => {
if (res.code) {
console.log(res, "start");
}
});
PZT(stopData).then((res) => {
if (res.code) {
console.log(res, "stop");
}
});
}
},
fiBtn(start, stop) {
let startData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: start,
};
let stopData = {
speed: 5,
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
ptzControlType: stop,
};
if (startData.patroldeviceCode && startData.channelCode) {
fi(startData).then((res) => {
if (res.code) {
console.log(res, "start");
}
});
fi(stopData).then((res) => {
if (res.code) {
console.log(res, "stop");
}
});
}
},
presetDotBtn(value) {
this.presetData.presetPosCode = value;
this.listByEqIdAndChanneData.forEach((item) => {
if (item.dictValue == this.presetDotNum) {
this.presetName = item.dictLabel;
}
});
},
//
editPresetDot1() {
let data = {
patroldeviceCode: this.PZTData.patroldeviceCode,
channelCode: this.PZTData.channelCode,
presetDotNum: this.presetDotNum,
name: this.presetName,
};
goto(data).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
} else {
this.$message.error(res.msg);
}
});
},
popovervisibleShow() {
this.popovervisible = false;
this.newpresetName = "";
},
setPresetDot1() {
let data = {
presetCode: this.presetDotNum,
name: this.presetName,
channelCode: this.PZTData.channelCode,
patroldeviceCode: this.PZTData.patroldeviceCode,
};
issue(data).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.popovervisible = false;
} else {
this.$message.error(res.msg);
}
});
},
popoverOpen() {
this.popovervisible = true;
},
//
editPresetDot2() {
let data = {
presetCode: this.presetDotNum,
name: this.newpresetName,
channelCode: this.PZTData.channelCode,
patroldeviceCode: this.PZTData.patroldeviceCode,
};
},
//
removeAction() {
this.bindingMonitorPointTableData.splice(index, 1);
},
//
saveDot1() {
this.presetData.presetPosName = this.presetName;
this.presetData.presetActionList = this.bindingMonitorPointTableData;
bindingPreset(this.presetData).then((res) => {
console.log(res, 11111);
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.presetData = {
presetPosCode: "",
channelId: "",
eqpbookId: "",
patrolpointId: "",
stdparolPointId: "",
deviceId: "",
presetPosName: "",
stopTime: "",
channelImg: "",
description: "",
presetActionList: [],
presetParamList: [],
};
this.pointDialogShow=false;
this.$emit('site_saveDot1',true)
} else {
this.$message.error(res.msg);
}
});
},
},
mounted() {
this.init();
},
};
</script>
<style lang="scss" scoped>
.bindingMonitorPointTree {
width: 100%;
height: 37vh;
overflow-y: scroll;
}
.bindingMonitorPointDiv {
width: 100%;
height: 40vh;
// background: red;
}
.PTZ-content {
width: 170px;
margin: 10px auto;
position: relative;
img {
width: 100%;
}
}
.r-ti2-pos {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div {
position: absolute;
z-index: 999;
width: 20px;
height: 15px;
cursor: pointer;
}
div:first-child {
top: 32px;
left: 75px;
}
div:nth-child(2) {
top: 50px;
left: 102px;
}
div:nth-child(3) {
top: 77px;
right: 30px;
}
div:nth-child(4) {
bottom: 56px;
left: 102px;
}
div:nth-child(5) {
bottom: 36px;
left: 75px;
}
div:nth-child(6) {
bottom: 56px;
right: 100px;
}
div:nth-child(7) {
bottom: 80px;
left: 30px;
}
div:nth-child(8) {
top: 50px;
right: 102px;
}
}
.r-ti3 {
width: 100%;
display: flex;
padding-top: 10px;
-webkit-box-pack: justify;
justify-content: space-between;
}
.r-ti3-d1 {
width: 76px;
position: relative;
img {
width: 100%;
}
.r-ti3-d2 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
div:first-child {
width: 50%;
height: 100%;
position: absolute;
top: 0;
left: 0;
cursor: pointer;
}
div:nth-child(2) {
width: 50%;
height: 100%;
position: absolute;
top: 0;
right: 0;
cursor: pointer;
}
}
}
.r-ti4 {
padding-top: 20px;
img {
width: 24px;
height: 24px;
position: relative;
top: 6px;
cursor: pointer;
}
}
.popover-footer {
width: 100%;
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
</style>

+ 119
- 14
src/views/point/components/site_VideoDialog.vue View File

@ -17,7 +17,23 @@
</el-col>
<el-col :span="13">
<div class="bindingMonitorPointDiv">
<videoPlayer />
<!-- <videoPlayer /> -->
<VideoPlayerPlatform
ref="playerPlayform"
@changeIndex="handleChangeIndex"
:showBottomToolBar="false"
:defaultLayout="'1x1'"
>
<template slot-scope="scope">
<DrawShape
@drawComplete="
(shape) => {
handleDrawComplete(scope, shape);
}
"
/>
</template>
</VideoPlayerPlatform>
</div>
</el-col>
<el-col :span="6">
@ -182,7 +198,10 @@
</el-table>
<template #footer>
<div class="add-btn add-bth1 card-page">
<el-button type="primary" @click="saveDot1">确定</el-button>
<el-button type="primary" @click="nextBtn" v-if="typeNextBtn"
>下一步,配置测温位置</el-button
>
<el-button type="primary" @click="saveDot1" v-if="!typeNextBtn">确定</el-button>
<el-button @click="bindingMonitorPointClose">取消</el-button>
</div>
@ -191,8 +210,10 @@
</template>
<script>
import videoPlayer from "@/components/videoPlayer/index.vue";
import {
vl,
ir,
listByEqIdAndChannelId,
realtime,
PZT,
@ -201,13 +222,31 @@ import {
issue,
bindingPreset,
} from "@/api/point/site_management";
import {
listPatroltype,
getDeviceList,
} from "@/api/basedata/patrolpointmnt/patroltype";
import VideoPlayerPlatform from "@/components/VideoPlayerPlatform";
import DrawShape, {
toTargetRect,
ShapeEnum,
} from "@/components/Canvas/DrawShape.vue";
export default {
components: { videoPlayer },
props: ["pointDialogDataName", "pointDialogShow", "dialogProp"],
components: {
videoPlayer,
VideoPlayerPlatform,
DrawShape,
},
props: [
"pointDialogDataName",
"pointDialogShow",
"dialogProp",
"typeVideoDialog",
],
data() {
return {
bindingMonitorPointTitle: "绑定可见光检测点",
// pointDialogShow: false,
// pointDialogShow: false,
dialogPointTree: [],
defaultPropsMonitor: {
children: "children",
@ -235,12 +274,27 @@ export default {
presetParamList: [],
presetPointList: [],
},
ShapeEnum: {
rect: "Rectangle",
brokenline: "BrokenLine",
polygon: "Polygon",
point: "Point",
} /* 绘制方式 */,
typeNextBtn: false,
};
},
watch: {
typeVideoDialog(newVal, oldVal) {
if (newVal !== oldVal) {
// typeVideoDialog
this.init(); // init
}
},
},
methods: {
bindingMonitorPointClose() {
// this.pointDialogShow = false;
this.$emit("site_videoDialogClose",false);
this.$emit("site_videoDialogClose", false);
},
//
handleMonitor(e) {
@ -270,6 +324,12 @@ export default {
console.log(res, 1111);
}
});
let data = {
patroldeviceCode: e.patroldeviceCode,
channelId: e.channelId,
channelCode: e.channelCode,
};
this.handleOpenChannel(data);
}
},
renderHeader(h, { column, $index }, type) {
@ -308,11 +368,21 @@ export default {
clickFun() {},
init() {
vl().then((res) => {
if (res.code == 200) {
this.dialogPointTree = res.data;
}
});
if (this.typeVideoDialog == 0) {
this.typeNextBtn = false;
vl().then((res) => {
if (res.code == 200) {
this.dialogPointTree = res.data;
}
});
} else {
this.typeNextBtn = true;
ir().then((res) => {
if (res.code == 200) {
this.dialogPointTree = res.data;
}
});
}
},
ptzBtn(start, stop) {
let startData = {
@ -457,16 +527,51 @@ export default {
presetActionList: [],
presetParamList: [],
};
this.pointDialogShow=false;
this.$emit('site_saveDot1',true)
this.pointDialogShow = false;
this.$emit("site_saveDot1", true);
} else {
this.$message.error(res.msg);
}
});
},
handleDrawComplete(scope, shape) {
setTimeout(() => {
this.addDot1(shape);
}, 100);
},
handleChangeIndex(e) {
this.currentPlayer = e.player;
// console.log(this.currentPlayer)
},
getDeviceList() {
getDeviceList(this.patroldeviceCode, this.channelCode).then(
({ data }) => {
this.presetArr = data;
}
);
},
handleOpenChannel(row, next) {
this.patroldeviceCode = row.patroldeviceCode;
this.channelCode = row.channelCode;
this.presetName = "";
this.presetNumber = "";
this.getDeviceList();
this.$nextTick(() => {
this.$refs[next ? "playerPlayform2" : "playerPlayform"]
.openChannel({
deviceId: 1,
deviceCode: row.patroldeviceCode,
channelId: row.channelId,
channelCode: row.channelCode,
playerType: "zl",
})
.then(() => {});
});
},
nextBtn() {},
},
mounted() {
this.init();
// this.init();
},
};
</script>


+ 171
- 0
src/views/point/components/uploadDialog.vue View File

@ -0,0 +1,171 @@
<template>
<el-dialog :title="title" @close="handleClose" :visible.sync="visible" width="40%" append-to-body
:close-on-click-modal="false">
<el-upload :data="updata" :accept="accept" class="upload-demo" :headers="headers" v-loading="loading"
:with-credential="true" :action="action" :on-success="handleUploadSuccess" :on-error="handleUploadError"
:on-preview="handlePreview" :on-remove="handleRemove" :before-remove="beforeRemove" :limit="1"
:on-exceed="handleExceed" :file-list="fileList">
<div class="card-page">
<el-button size="small" type="primary">点击上传</el-button>
</div>
<!-- list-type="picture" -->
</el-upload>
<AsyncImage v-if="pendding" ref="asyncImage" class="xg_image_viewer" @imgload="handleImageLoad"
@imgloaderror="handleImageLoadError" :src="currentSrc" :srcList="currentSrcList" />
<span slot="footer" class="dialog-footer card-page">
<el-button type="primary" v-if="showConfirmBtn" @click="handleConfirm"> </el-button>
<el-button @click="visible = false"> </el-button>
</span>
</el-dialog>
</template>
<script>
import { getToken } from '@/utils/auth'
import AsyncImage from '@/components/AsyncImage'
import linq from 'linq'
export default {
components: {
AsyncImage
},
props: {
show: {
type: Boolean,
default: false
},
filePath: {
type: String,
default: ""
},
title: {
type: String,
default: "判别图片上传"
},
action: {
type: String,
default: process.env.VUE_APP_BASE_API + '/patrol/partrolresult/lasupload'
},
accept: {
type: String,
default: '*'
},
updata: {
type: Object,
default: function () {
return {}
}
},
showConfirmBtn: {
type: Boolean,
default: true
}
},
watch: {
show: {
handler (newVal) {
this.loading = false
this.visible = newVal
this.fileList = []
if (this.filePath && this.filePath.length > 0) {
this.fileList = linq.from(this.filePath.split(',')).select(x => { return { name: '缺陷判别图片.jpg', url: x } }).toArray()
} else {
this.fileList = []
}
}
}
},
data () {
return {
visible: false,
fileList: [],
loading: false,
currentSrc: "",
currentSrcList: [],
pendding: false,
headers: { 'Authorization': 'Bearer ' + getToken() }
};
},
methods: {
handleConfirm () {
this.visible = false
this.$emit('confirm', this.fileList)
},
//
handleUploadSuccess (response, file, fileList) {
this.fileList = []
if (typeof (file.response) !== 'string') {
if (file.response.code != 200) {
this.$message.error(`上传失败。消息:${file.response.msg}`)
return;
}
this.fileList.push({
name: '机器人点位文件.xml'
})
return;
}
this.fileList.push({
name: file.name,
url: file.response
// name: "_20220520095815.png"
// percentage: 100
// raw: File
// response: "/home/xgftp/_20220520095815.png"
// size: 699595
// status: "success"
// uid: 1653012695833
})
console.log(this.fileList)
// this.$emit('uploadSuccess', response)
},
//
handleClose () {
this.visible = false
this.fileList = []
this.$emit('update:show', false)
},
//
handleUploadError (err, file, fileList) {
this.$message.error(`上传失败,请检查文件或网络。`)
},
handleRemove (file, fileList) {
this.fileList = []
console.log(file, fileList);
},
handlePreview (file) {
this.pendding = false
this.$nextTick(() => {
this.pendding = true
this.currentSrc = file.url
this.currentSrcList = [file.url]
this.loading = true
})
},
handleImageLoad () {
this.loading = false;
this.$refs.asyncImage.$el.querySelector("img").click();
},
handleImageLoadError () {
this.loading = false;
},
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
}
}
}
</script>
<style lang="scss" scoped>
.xg_image_viewer {
position: fixed;
bottom: 0;
left: 0;
width: 50px;
height: 50px;
display: none;
}
</style>

+ 531
- 0
src/views/point/point_mang copy.vue View File

@ -0,0 +1,531 @@
el-button<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="4">
<div class="qurey">
<el-input
:placeholder="$t('point_mang.PleaseEnterTheContent')"
v-model="filterText"
class="input-with-select"
>
</el-input>
</div>
<el-tree
:data="treeDataNew"
:props="defaultProps"
@node-click="handleNodeClick"
node-key="devicetypeId"
ref="tree"
:filter-node-method="filterNode"
></el-tree>
</el-col>
<el-col :span="20" v-if="devicetypeId">
<div>
<el-button type="primary" @click="addBtn">{{
$t("share.addTo")
}}</el-button>
<span>0/200{{ $t("point_mang.tableHeadMsg") }}</span>
</div>
<el-table :data="tableData" style="margin-top: 10px">
<el-table-column
prop="date"
:label="$t('point_mang.index')"
width="55"
type="index"
align="center"
></el-table-column>
<el-table-column
:label="$t('point_mang.equipmentClassification')"
:render-header="addRedStar"
align="center"
>
<template slot-scope="scope">
<treeselect
v-model="scope.row.componentDevicetypeId"
:options="DevicetypeIdOptions"
:normalizer="normalizer"
:clearable="false"
/>
</template>
</el-table-column>
<el-table-column
:label="$t('point_mang.InspectionStandards')"
:render-header="addRedStar"
align="center"
>
<template slot-scope="scope">
<el-input
type="textarea"
:placeholder="
$t('share.PleaseChoose') + $t('point_mang.PleaseEnter')
"
v-model="scope.row.patrolContent"
></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('point_mang.dataFormat')" align="center">
<template slot-scope="scope">
<el-select
v-model="scope.row.mainDevicetypeId"
:placeholder="
$t('share.PleaseChoose') + $t('point_mang.dataFormat')
"
>
<el-option
v-for="item in options"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
:label="$t('point_mang.IntelligentRecognitionType')"
align="center"
>
<template slot-scope="scope">
<span
class="intelligenceType"
@click="intelligenceTypeBtn(scope.row)"
>{{
scope.row.algSubtypeName ? scope.row.algSubtypeName : "设置"
}}</span
>
</template>
</el-table-column>
<el-table-column :label="$t('share.operate')" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handleCopy(scope.row)"
>
{{ $t("share.copy") }}
</el-button>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.row, scope.$index)"
>{{ $t("share.delete") }}</el-button
>
</template>
</el-table-column>
</el-table>
<div class="saveBtn">
<el-button type="primary" @click="submitForm">{{
$t("share.save")
}}</el-button>
</div>
</el-col>
<el-col :span="20" v-if="!devicetypeId">
<div style="line-height: 36px">请先选择左侧点位</div>
</el-col>
</el-row>
<el-dialog
:title="$t('point_mang.SetIntelligentRecognitionType')"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
style="height: 70vh"
border
>
<el-table
:data="intelligenceTypeData"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
default-expand-all
row-key="id"
@selection-change="handleSelectionChangeDialog"
ref="multipleTable"
height="45vh"
>
<el-table-column
type="selection"
width="55"
align="center"
></el-table-column>
<el-table-column
type="index"
width="55"
align="center"
:label="$t('point_mang.index')"
></el-table-column>
<!-- <el-table-column
prop="algName"
align="center"
:label="$t('point_mang.AlgorithmName')"
></el-table-column> -->
<el-table-column :label="$t('patrolpoint.AlgorithmName')">
<template slot-scope="scope">
{{
scope.row.algSubtypeName
? scope.row.algSubtypeName
: scope.row.algName
}}
</template>
</el-table-column>
<el-table-column
prop="patrolContent"
align="center"
:label="$t('point_mang.ThresholdUpperLimit')"
:render-header="addRedStar"
>
<!-- <template slot-scope="scope">
<el-input></el-input>
</template> -->
</el-table-column>
<el-table-column
prop="mainDevicetypeId"
align="center"
:label="$t('point_mang.LowerThresholdLimit')"
:render-header="addRedStar"
>
<!-- <template slot-scope="scope">
<el-input></el-input>
</template> -->
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">{{ $t("share.cancel") }}</el-button>
<el-button type="primary" @click="dialogTableOk">{{
$t("share.confirm")
}}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getTreeAreaDeviceSelect,
cilikList,
devicetype,
dataFormat,
add,
remove,
algList,
subtypeList,
} from "@/api/point/point_mang";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
// import treeSelect from "./components/treeSelect.vue";
export default {
components: {
Treeselect,
// treeSelect,
},
data() {
return {
treeDataNew: [],
defaultProps: {
children: "children",
label: "devicetypeName",
},
tableData: [],
DevicetypeIdOptions: [],
options: [],
value: [],
dialogVisible: false,
intelligenceTypeData: [],
devicetypeId: null,
dialogTableSelect: [],
stdpatrolPointId: null,
dialogTableSelectName: [],
filterText: null,
normalizer(node) {
return {
id: node.devicetypeId,
label: node.devicetypeName,
children: node.children,
};
},
};
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
created() {},
mounted() {
this.init();
// devicetype().then((res) => {
// if (res.code == 200) {
// res.data.forEach((item) => {
// if (item.devicetypeId !== 1) {
// this.DevicetypeIdOptions.push(item);
// }
// });
// }
// });
dataFormat().then((res) => {
if (res.code == 200) {
console.log(this.options, res.data);
res.data.forEach((item) => {
item.dictValue = Number(item.dictValue);
});
this.options = res.data;
}
});
},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.devicetypeName.indexOf(value) !== -1;
},
init(qurey) {
devicetype(qurey).then((res) => {
this.treeDataNew = [];
this.tableData = [];
if (res.code == 200) {
res.data.forEach((item) => {
if (item.devicetypeId !== 1) {
this.treeDataNew.push(item);
}
});
}
});
},
// *
addRedStar(h, { column }) {
return [
h("span", { style: "color: red" }, "*"),
h("span", " " + column.label),
];
},
intelligenceTypeBtn(row) {
this.stdpatrolPointId = row.stdpatrolPointId;
subtypeList().then((res0) => {
if (res0.code == 200) {
algList().then((res1) => {
if (res1.code == 200) {
let list = res1.rows;
list.forEach((item) => {
item.children = [];
item.id = `${item.algId}_${item.algId}`;
res0.rows.forEach((i) => {
i.id = i.algSubtypeId;
if (item.algId == i.algId && item.algName == i.algName) {
item.children.push(i);
}
});
});
this.intelligenceTypeData = list;
this.dialogVisible = true;
this.$nextTick(() => {
if (row.alarmThreshold) {
let data = JSON.parse(row.alarmThreshold);
let idArr = [];
data.forEach((item) => {
idArr.push(item.id.split("_")[1]);
});
idArr.forEach((id) => {
let show = res0.rows.find(
(item) => item.algSubtypeId == id
);
if (show) {
this.$refs.multipleTable.toggleRowSelection(show, true);
}
});
}
});
}
});
}
});
},
// *
addRedStar(h, { column }) {
return [
h("span", { style: "color: red" }, "*"),
h("span", " " + column.label),
];
},
//
handleNodeClick(data) {
console.log(data, 11111111111);
this.devicetypeId = data.devicetypeId;
this.tableData = [];
this.initClickList(data);
},
initClickList(data) {
cilikList(data.devicetypeId).then((res) => {
if (res.code == 200) {
console.log(res, 111);
this.tableData = res.rows;
}
});
getTreeAreaDeviceSelect(data.devicetypeId).then((res) => {
console.log(res, 11111111);
if (res.code == 200) {
let obj = [];
res.data.forEach((item) => {
if (
item.devicetypeId !== 1 &&
item.devicetypeId &&
item.powerMainEquFlag == "Yes"
) {
// obj.push(item);
if(item.devicetypeId==907){
console.log(item.devicetype,"测试")
}
}
});
this.DevicetypeIdOptions = this.removeDuplicateNodes(obj);
}
});
},
removeDuplicateNodes(nodes) {
const map = new Map();
const result = [];
function traverse(nodeList) {
for (const node of nodeList) {
if (!map.has(node.devicetypeId)) {
map.set(node.devicetypeId, true);
result.push(node);
if (node.children) {
traverse(node.children);
}
}
}
}
traverse(nodes);
return result;
},
areaNormalizer(node) {
return {
id: node.devicetypeId,
label: node.devicetypeName,
children: node.children,
};
},
addBtn() {
if (this.tableData.length < 200) {
this.tableData.push({
componentDevicetypeId: null,
patrolContent: "",
mainDevicetypeId: null,
});
} else {
this.$message.warning("最多添加200条数据!");
}
},
//
submitForm() {
if (!this.tableData.length) return;
let flag = this.tableData.every((item) => {
if (item.componentDevicetypeId && item.patrolContent) {
return true;
} else {
return false;
}
});
if (flag) {
add(this.tableData).then((res) => {
this.initClickList(this.devicetypeId);
this.$message({
type: "success",
message: "保存成功",
});
});
} else {
this.$message({
type: "warning",
message: "必填项不能为空!",
});
}
},
//
handleDelete(row, index) {
if (!row.stdpatrolPointId) {
this.tableData.splice(index, 1);
} else {
remove(row.stdpatrolPointId).then((res) => {
if (res.code == 200) {
this.$message({
type: "success",
message: "删除成功!",
});
this.initClickList(row);
}
});
}
return;
},
//
handleSelectionChangeDialog(val) {
this.dialogTableSelect = [];
this.dialogTableSelectName = [];
val.forEach((item) => {
let data = {
id: `sub_${item.algSubtypeId}`,
code: item.algSubtypeCode || "",
upperValue: item.upperValue || "",
lowerValue: item.lowerValue || "",
algSubtypeName: item.algSubtypeName || "",
};
this.dialogTableSelect.push(data);
this.dialogTableSelectName.push(item.algSubtypeName);
});
},
dialogTableOk() {
this.dialogVisible = false;
console.log(this.dialogTableSelect, this.stdpatrolPointId);
this.tableData.forEach((item) => {
if (item.stdpatrolPointId == this.stdpatrolPointId) {
item.alarmThreshold = JSON.stringify(this.dialogTableSelect);
item.algSubtypeName = this.dialogTableSelectName.join(",");
}
});
},
handleClose() {
this.dialogVisible = false;
},
//
handleCopy(row) {
let { stdpatrolPointId, ...newObj } = row;
console.log(newObj, 111);
newObj.patrolContent = row.patrolContent + "_复制";
this.tableData.push(newObj);
},
handleNodeClickOption(data) {
console.log(data, 111);
},
},
};
</script>
<style lang="scss" scoped>
.qurey {
display: flex;
margin-bottom: 10px;
::v-deep.el-button {
background-color: #46a6ff !important;
color: #fff !important ;
}
}
.intelligenceType {
color: rgb(17, 189, 217);
cursor: pointer;
}
.saveBtn {
text-align: center;
margin-top: 10px;
}
// .tree-select {
// position: absolute;
// z-index: 9999999;
// width: 100%;
// max-height: 200px;
// overflow-y: auto;
// border: 1px solid #dcdfe6;
// border-radius: 4px;
// background: #fff;
// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
// }
</style>

+ 170
- 54
src/views/point/point_mang.vue View File

@ -1,4 +1,4 @@
<template>
el-button<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="4">
@ -11,7 +11,7 @@
</el-input>
</div>
<el-tree
:data="treeData"
:data="treeDataNew"
:props="defaultProps"
@node-click="handleNodeClick"
node-key="devicetypeId"
@ -26,7 +26,7 @@
}}</el-button>
<span>0/200{{ $t("point_mang.tableHeadMsg") }}</span>
</div>
<el-table :data="tableData" max-height="700" style="margin-top: 10px">
<el-table :data="tableData" style="margin-top: 10px">
<el-table-column
prop="date"
:label="$t('point_mang.index')"
@ -40,21 +40,30 @@
align="center"
>
<template slot-scope="scope">
<el-select
:placeholder="
$t('share.PleaseChoose') +
$t('point_mang.equipmentClassification')
"
v-model="scope.row.componentDevicetypeId"
<el-popover
v-model="showTreePopover"
placement="bottom"
trigger="click"
>
<el-option
:label="item.devicetypeName"
:value="item.devicetypeId"
v-for="item in DevicetypeIdOptions"
:key="item.devicetypeId"
>
</el-option>
</el-select>
<div class="popover-content">
<el-tree
:data="DevicetypeIdOptions"
:props="defaultPropsObj"
@node-click="
(node) => handleNodeClickInSelect(node, scope.row)
"
/>
</div>
<el-input
:key="scope.row.devicetypeName"
slot="reference"
v-model="scope.row.devicetypeName"
placeholder="请选择设备类型"
readonly
@click.native="showTreePopover = true"
/>
</el-popover>
</template>
</el-table-column>
@ -75,10 +84,6 @@
</el-table-column>
<el-table-column :label="$t('point_mang.dataFormat')" align="center">
<template slot-scope="scope">
<!-- multiple
filterable
allow-create
default-first-option -->
<el-select
v-model="scope.row.mainDevicetypeId"
:placeholder="
@ -111,7 +116,11 @@
</el-table-column>
<el-table-column :label="$t('share.operate')" align="center">
<template slot-scope="scope">
<el-button size="mini" type="primary">
<el-button
size="mini"
type="primary"
@click="handleCopy(scope.row)"
>
{{ $t("share.copy") }}
</el-button>
<el-button
@ -138,6 +147,7 @@
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
style="height: 70vh"
border
>
<el-table
@ -147,6 +157,7 @@
row-key="id"
@selection-change="handleSelectionChangeDialog"
ref="multipleTable"
height="45vh"
>
<el-table-column
type="selection"
@ -159,11 +170,6 @@
align="center"
:label="$t('point_mang.index')"
></el-table-column>
<!-- <el-table-column
prop="algName"
align="center"
:label="$t('point_mang.AlgorithmName')"
></el-table-column> -->
<el-table-column :label="$t('patrolpoint.AlgorithmName')">
<template slot-scope="scope">
{{
@ -179,9 +185,12 @@
:label="$t('point_mang.ThresholdUpperLimit')"
:render-header="addRedStar"
>
<!-- <template slot-scope="scope">
<el-input></el-input>
</template> -->
<template slot-scope="scope" v-if="scope.row.upperFlag == 1">
<el-input
v-model="scope.row.upperValue"
:disabled="disabledFn(scope.row)"
></el-input>
</template>
</el-table-column>
<el-table-column
prop="mainDevicetypeId"
@ -189,9 +198,12 @@
:label="$t('point_mang.LowerThresholdLimit')"
:render-header="addRedStar"
>
<!-- <template slot-scope="scope">
<el-input></el-input>
</template> -->
<template slot-scope="scope" v-if="scope.row.lowerFlag == 1">
<el-input
v-model="scope.row.lowerValue"
:disabled="disabledFn(scope.row)"
></el-input>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
@ -216,15 +228,16 @@ import {
subtypeList,
} from "@/api/point/point_mang";
export default {
components: {},
data() {
return {
treeData: [],
treeDataNew: [],
defaultProps: {
children: "children",
label: "devicetypeName",
},
tableData: [],
DevicetypeIdOptions: [],
// DevicetypeIdOptions: [],
options: [],
value: [],
dialogVisible: false,
@ -234,6 +247,13 @@ export default {
stdpatrolPointId: null,
dialogTableSelectName: [],
filterText: null,
showTreePopover: false,
selectedDeviceTypeName: "",
DevicetypeIdOptions: [],
defaultPropsObj: {
children: "children",
label: "devicetypeName",
},
};
},
watch: {
@ -244,37 +264,59 @@ export default {
created() {},
mounted() {
this.init();
devicetype().then((res) => {
if (res.code == 200) {
res.data.forEach((item) => {
if (item.devicetypeId !== 1) {
this.DevicetypeIdOptions.push(item);
}
});
}
});
// devicetype().then((res) => {
// if (res.code == 200) {
// res.data.forEach((item) => {
// if (item.devicetypeId !== 1) {
// this.DevicetypeIdOptions.push(item);
// }
// });
// }
// });
dataFormat().then((res) => {
if (res.code == 200) {
console.log(this.options, res.data);
res.data.forEach((item) => {
item.dictValue = String(item.dictValue);
item.dictValue = Number(item.dictValue);
});
this.options = res.data;
}
});
},
methods: {
handleNodeClickInSelect(data, row) {
if (row) {
row.componentDevicetypeId = data.devicetypeId;
row.devicetypeName = data.devicetypeName;
this.showTreePopover = false;
}
},
getDeviceTypeNameById(id) {
function findNode(nodes) {
for (const node of nodes) {
if (node.devicetypeId === id) return node.devicetypeName;
if (node.children) {
const result = findNode(node.children);
if (result) return result;
}
}
return "";
}
return findNode(this.DevicetypeIdOptions);
},
filterNode(value, data) {
if (!value) return true;
return data.devicetypeName.indexOf(value) !== -1;
},
init(qurey) {
getTreeAreaDeviceSelect(qurey).then((res) => {
devicetype(qurey).then((res) => {
this.treeDataNew = [];
this.tableData = [];
if (res.code == 200) {
res.data.forEach((item) => {
if (item.devicetypeId !== 1) {
this.treeData.push(item);
this.treeDataNew.push(item);
}
});
}
@ -345,19 +387,51 @@ export default {
initClickList(data) {
cilikList(data.devicetypeId).then((res) => {
if (res.code == 200) {
console.log(res, 111);
this.tableData = res.rows;
this.tableData = res.rows.map((row) => ({
...row,
devicetypeName: this.getDeviceTypeNameById(
row.componentDevicetypeId
),
}));
}
});
getTreeAreaDeviceSelect(data.devicetypeId).then((res) => {
if (res.code == 200) {
this.DevicetypeIdOptions = res.data.filter(
(item) => item.devicetypeId !== 1 && item.powerMainEquFlag == "Yes"
);
this.$nextTick(() => {
cilikList(data.devicetypeId).then((res2) => {
if (res2.code == 200) {
this.tableData = res2.rows.map((row) => ({
...row,
devicetypeName: this.getDeviceTypeNameById(
row.componentDevicetypeId
),
}));
}
});
});
}
});
},
areaNormalizer(node) {
return {
id: node.devicetypeId,
label: node.devicetypeName,
children: node.children,
};
},
addBtn() {
if (this.tableData.length < 200) {
this.tableData.push({});
} else {
this.$message({
type: "warning",
message: "最多添加200条数据!",
this.tableData.push({
componentDevicetypeId: null,
devicetypeName: "",
patrolContent: "",
mainDevicetypeId: null,
});
} else {
this.$message.warning("最多添加200条数据!");
}
},
//
@ -374,6 +448,10 @@ export default {
if (flag) {
add(this.tableData).then((res) => {
this.initClickList(this.devicetypeId);
this.$message({
type: "success",
message: "保存成功",
});
});
} else {
this.$message({
@ -428,6 +506,28 @@ export default {
handleClose() {
this.dialogVisible = false;
},
//
handleCopy(row) {
let { stdpatrolPointId, ...newObj } = row;
console.log(newObj, 111);
newObj.patrolContent = row.patrolContent + "_复制";
this.tableData.push(newObj);
},
handleNodeClickOption(data) {
console.log(data, 111);
},
disabledFn(row) {
console.log(
this.$refs.multipleTable.selection.some((item) => item.id === row.id)
? false
: false
);
return this.$refs.multipleTable.selection.some(
(item) => item.id === row.id
)
? false
: true;
},
},
};
</script>
@ -449,4 +549,20 @@ export default {
text-align: center;
margin-top: 10px;
}
.popover-content {
max-height: 200px;
overflow-y: auto;
padding: 5px 0;
}
// .tree-select {
// position: absolute;
// z-index: 9999999;
// width: 100%;
// max-height: 200px;
// overflow-y: auto;
// border: 1px solid #dcdfe6;
// border-radius: 4px;
// background: #fff;
// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
// }
</style>

+ 2842
- 1161
src/views/point/site_management.vue
File diff suppressed because it is too large
View File


+ 46
- 33
vue.config.js View File

@ -10,6 +10,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口
const CopyWebpackPlugin = require("copy-webpack-plugin");
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
@ -37,7 +38,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8080`,
target:'http://192.168.1.116:18888',
target: 'http://192.168.1.116:18888',
// target:'http://192.168.1.116:18890',
changeOrigin: true,
pathRewrite: {
@ -62,6 +63,18 @@ module.exports = {
}
},
plugins: [
new CopyWebpackPlugin([
{
from: 'node_modules/@liveqing/liveplayer/dist/component/crossdomain.xml'
},
{
from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer.swf'
},
{
from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer-lib.min.js',
to: 'js/'
}
]),
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
new CompressionPlugin({
cache: false, // 不启用文件缓存
@ -95,39 +108,39 @@ module.exports = {
.end()
config.when(process.env.NODE_ENV !== 'development', config => {
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
config
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
config.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
})
config.optimization.runtimeChunk('single')
config.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
},
commons: {
name: 'chunk-commons',
test: resolve('src/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
}
}
})
config.optimization.runtimeChunk('single')
})
}
}

Loading…
Cancel
Save