|
@@ -11,22 +11,21 @@
|
|
|
<el-button type="success" icon="el-icon-paperclip" size="small" @click="showDeviceBindBatch()">批量绑定</el-button>
|
|
<el-button type="success" icon="el-icon-paperclip" size="small" @click="showDeviceBindBatch()">批量绑定</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template slot="menu" slot-scope="scope">
|
|
|
|
|
|
|
+ <template slot="menu" slot-scope="{row}">
|
|
|
<el-button-group>
|
|
<el-button-group>
|
|
|
- <el-button size="mini" icon="el-icon-video-play" type="success" v-if="permission.vcdevice_play && scope.row.enable == 1" @click="play(scope.row)">播放</el-button>
|
|
|
|
|
- <el-button size="mini" icon="el-icon-close" type="danger" v-if="permission.vcdevice_stop && scope.row.enable == 1" @click="stop(scope.row)">停用</el-button>
|
|
|
|
|
- <el-button size="mini" icon="el-icon-check" type="primary" :loading="startBtnLoading" v-if="permission.vcdevice_start && scope.row.enable != 1" @click="start(scope.row)">获取视频</el-button>
|
|
|
|
|
|
|
+ <el-button size="mini" icon="el-icon-refresh" plain v-if="permission.vcdevice_sync" @click="rowSync(row, row.$index)">刷新</el-button>
|
|
|
|
|
+ <el-button size="mini" icon="el-icon-video-play" type="success" v-if="permission.vcdevice_play && row.enable == 1" @click="play(row)">播放</el-button>
|
|
|
|
|
+ <el-button size="mini" icon="el-icon-close" type="danger" v-if="permission.vcdevice_stop && row.enable == 1" @click="stop(row)">停用</el-button>
|
|
|
|
|
+ <el-button size="mini" icon="el-icon-check" type="primary" :loading="startBtnLoading" v-if="permission.vcdevice_start && row.enable != 1 && row.isOnline == 1" @click="start(row)">获取视频</el-button>
|
|
|
<el-button size="mini">
|
|
<el-button size="mini">
|
|
|
<el-dropdown>
|
|
<el-dropdown>
|
|
|
<span>
|
|
<span>
|
|
|
更多<i class="el-icon-arrow-down el-icon--right"></i>
|
|
更多<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</span>
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item icon="el-icon-view" type="text" @click.native="view(scope.row)">查看</el-dropdown-item>
|
|
|
|
|
- <!--<el-dropdown-item icon="el-icon-edit" type="text" @click.native="edit(scope.row)">编辑</el-dropdown-item>-->
|
|
|
|
|
- <el-dropdown-item icon="el-icon-delete" type="text" @click.native="delete(scope.row)">删除</el-dropdown-item>
|
|
|
|
|
- <!--<el-dropdown-item icon="el-icon-video-camera" type="text" @click.native="showVideo(scope.row)">查看监控</el-dropdown-item>-->
|
|
|
|
|
- <el-dropdown-item icon="el-icon-paperclip" type="text" @click.native="showDeviceBind(scope.row)">{{!scope.row.residentialId ? '设备绑定' : '设备改绑'}}</el-dropdown-item>
|
|
|
|
|
|
|
+ <el-dropdown-item icon="el-icon-view" type="text" @click.native="view(row)">查看</el-dropdown-item>
|
|
|
|
|
+ <el-dropdown-item icon="el-icon-delete" type="text" @click.native="rowDel(row)">删除</el-dropdown-item>
|
|
|
|
|
+ <el-dropdown-item icon="el-icon-paperclip" type="text" @click.native="showDeviceBind(row)">{{!row.residentialId ? '设备绑定' : '设备改绑'}}</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
|
|
|
|
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
@@ -36,6 +35,10 @@
|
|
|
<!--<el-button icon="el-icon-paperclip" type="text" @click="showDeviceBind(scope.row)">{{!scope.row.residentialId ? '设备绑定' : '设备改绑'}}</el-button>-->
|
|
<!--<el-button icon="el-icon-paperclip" type="text" @click="showDeviceBind(scope.row)">{{!scope.row.residentialId ? '设备绑定' : '设备改绑'}}</el-button>-->
|
|
|
<!--<el-button icon="el-icon-video-camera" type="text" @click="showVideo(scope.row)">查看监控</el-button>-->
|
|
<!--<el-button icon="el-icon-video-camera" type="text" @click="showVideo(scope.row)">查看监控</el-button>-->
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template slot="isOnline" slot-scope="{row}">
|
|
|
|
|
+ <el-tag v-if="row.isOnline == 1" type="success">在线</el-tag>
|
|
|
|
|
+ <el-tag v-else type="info">离线</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
|
|
|
|
|
@@ -99,7 +102,8 @@ import {
|
|
|
remove,
|
|
remove,
|
|
|
start,
|
|
start,
|
|
|
stop,
|
|
stop,
|
|
|
- play
|
|
|
|
|
|
|
+ play,
|
|
|
|
|
+ sync
|
|
|
} from "../../../../api/device/videoclouddevice.js";
|
|
} from "../../../../api/device/videoclouddevice.js";
|
|
|
import {
|
|
import {
|
|
|
mapGetters
|
|
mapGetters
|
|
@@ -139,7 +143,7 @@ export default {
|
|
|
|
|
|
|
|
option: {
|
|
option: {
|
|
|
menu: true,
|
|
menu: true,
|
|
|
- menuWidth:300,
|
|
|
|
|
|
|
+ menuWidth:320,
|
|
|
height: 'auto',
|
|
height: 'auto',
|
|
|
calcHeight: 30,
|
|
calcHeight: 30,
|
|
|
tip: false,
|
|
tip: false,
|
|
@@ -182,6 +186,7 @@ export default {
|
|
|
label: "设备号",
|
|
label: "设备号",
|
|
|
prop: "deviceNum",
|
|
prop: "deviceNum",
|
|
|
span: 12,
|
|
span: 12,
|
|
|
|
|
+ search: true,
|
|
|
rules: [{
|
|
rules: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
message: "请输入设备号",
|
|
message: "请输入设备号",
|
|
@@ -199,24 +204,6 @@ export default {
|
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
|
}]
|
|
}]
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- label: "设备类型",
|
|
|
|
|
- prop: "deviceType",
|
|
|
|
|
- span: 12,
|
|
|
|
|
- search: true,
|
|
|
|
|
- dataType: "number",
|
|
|
|
|
- type: "select",
|
|
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=video_device_type",
|
|
|
|
|
- props: {
|
|
|
|
|
- label: 'dictValue',
|
|
|
|
|
- value: 'dictKey'
|
|
|
|
|
- },
|
|
|
|
|
- rules: [{
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "请输入设备类型(132:IPC;111:DVR;118:NVR,114:解码器)",
|
|
|
|
|
- trigger: "blur"
|
|
|
|
|
- }]
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
label: "型号",
|
|
label: "型号",
|
|
|
prop: "modelSequence",
|
|
prop: "modelSequence",
|
|
@@ -243,7 +230,9 @@ export default {
|
|
|
{
|
|
{
|
|
|
label: "是否在线",
|
|
label: "是否在线",
|
|
|
prop: "isOnline",
|
|
prop: "isOnline",
|
|
|
- span: 12,
|
|
|
|
|
|
|
+ slot: true,
|
|
|
|
|
+ width: 100,
|
|
|
|
|
+ align: "center",
|
|
|
dataType: "number",
|
|
dataType: "number",
|
|
|
type: "select",
|
|
type: "select",
|
|
|
search: true,
|
|
search: true,
|
|
@@ -314,7 +303,7 @@ export default {
|
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
|
}]
|
|
}]
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
|
|
+ /*{
|
|
|
label: "是否支持云台",
|
|
label: "是否支持云台",
|
|
|
prop: "isSupportPtz",
|
|
prop: "isSupportPtz",
|
|
|
span: 12,
|
|
span: 12,
|
|
@@ -340,7 +329,7 @@ export default {
|
|
|
message: "请输入是否支持云台(0:不支持,1:支持)",
|
|
message: "请输入是否支持云台(0:不支持,1:支持)",
|
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
|
}]
|
|
}]
|
|
|
- },
|
|
|
|
|
|
|
+ },*/
|
|
|
{
|
|
{
|
|
|
// label: "是否支持移动侦测(0:不支持,1:支持)",
|
|
// label: "是否支持移动侦测(0:不支持,1:支持)",
|
|
|
label: "是否支持移动侦测",
|
|
label: "是否支持移动侦测",
|
|
@@ -433,23 +422,23 @@ export default {
|
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
|
}]
|
|
}]
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- label: "云存储类别",
|
|
|
|
|
- prop: "cloudStorageType",
|
|
|
|
|
- span: 12,
|
|
|
|
|
- type: "select",
|
|
|
|
|
- dataType: "number",
|
|
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=cloud_storage_type",
|
|
|
|
|
- props: {
|
|
|
|
|
- label: 'dictValue',
|
|
|
|
|
- value: 'dictKey'
|
|
|
|
|
- },
|
|
|
|
|
- rules: [{
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "请输入云存储类别(0:无云存储,1:电信分布式存储,2:21cn存储)",
|
|
|
|
|
- trigger: "blur"
|
|
|
|
|
- }]
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: "云存储类别",
|
|
|
|
|
+ // prop: "cloudStorageType",
|
|
|
|
|
+ // span: 12,
|
|
|
|
|
+ // type: "select",
|
|
|
|
|
+ // dataType: "number",
|
|
|
|
|
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=cloud_storage_type",
|
|
|
|
|
+ // props: {
|
|
|
|
|
+ // label: 'dictValue',
|
|
|
|
|
+ // value: 'dictKey'
|
|
|
|
|
+ // },
|
|
|
|
|
+ // rules: [{
|
|
|
|
|
+ // required: true,
|
|
|
|
|
+ // message: "请输入云存储类别(0:无云存储,1:电信分布式存储,2:21cn存储)",
|
|
|
|
|
+ // trigger: "blur"
|
|
|
|
|
+ // }]
|
|
|
|
|
+ // },
|
|
|
{
|
|
{
|
|
|
label: "云存储配置id",
|
|
label: "云存储配置id",
|
|
|
prop: "cloudStorageConfId",
|
|
prop: "cloudStorageConfId",
|
|
@@ -711,10 +700,11 @@ export default {
|
|
|
}]
|
|
}]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: "所属账户",
|
|
|
|
|
|
|
+ label: "视频云账号",
|
|
|
prop: "accountName",
|
|
prop: "accountName",
|
|
|
|
|
+ search: true,
|
|
|
|
|
+ searchLabelWidth: 100,
|
|
|
span: 12,
|
|
span: 12,
|
|
|
- hide: true,
|
|
|
|
|
rules: [{
|
|
rules: [{
|
|
|
required: true,
|
|
required: true,
|
|
|
message: "请输入所属账户",
|
|
message: "请输入所属账户",
|
|
@@ -895,6 +885,7 @@ export default {
|
|
|
dataType: "number",
|
|
dataType: "number",
|
|
|
type: "select",
|
|
type: "select",
|
|
|
search: true,
|
|
search: true,
|
|
|
|
|
+ slot: true,
|
|
|
dicData:[
|
|
dicData:[
|
|
|
{
|
|
{
|
|
|
label:'在线',
|
|
label:'在线',
|
|
@@ -962,33 +953,33 @@ export default {
|
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
|
}]
|
|
}]
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- label: "是否支持云台",
|
|
|
|
|
- prop: "isSupportPtz",
|
|
|
|
|
- span: 12,
|
|
|
|
|
- dataType: "number",
|
|
|
|
|
- type: "select",
|
|
|
|
|
- dicData:[
|
|
|
|
|
- {
|
|
|
|
|
- label:'支持',
|
|
|
|
|
- value:1
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label:'不支持',
|
|
|
|
|
- value:0
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
- // dicUrl: "/api/blade-system/dict-biz/dictionary?code=is_support",
|
|
|
|
|
- // props: {
|
|
|
|
|
- // label: 'dictValue',
|
|
|
|
|
- // value: 'dictKey'
|
|
|
|
|
- // },
|
|
|
|
|
- rules: [{
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "请输入是否支持云台(0:不支持,1:支持)",
|
|
|
|
|
- trigger: "blur"
|
|
|
|
|
- }]
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label: "是否支持云台",
|
|
|
|
|
+ // prop: "isSupportPtz",
|
|
|
|
|
+ // span: 12,
|
|
|
|
|
+ // dataType: "number",
|
|
|
|
|
+ // type: "select",
|
|
|
|
|
+ // dicData:[
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label:'支持',
|
|
|
|
|
+ // value:1
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // label:'不支持',
|
|
|
|
|
+ // value:0
|
|
|
|
|
+ // }
|
|
|
|
|
+ // ],
|
|
|
|
|
+ // // dicUrl: "/api/blade-system/dict-biz/dictionary?code=is_support",
|
|
|
|
|
+ // // props: {
|
|
|
|
|
+ // // label: 'dictValue',
|
|
|
|
|
+ // // value: 'dictKey'
|
|
|
|
|
+ // // },
|
|
|
|
|
+ // rules: [{
|
|
|
|
|
+ // required: true,
|
|
|
|
|
+ // message: "请输入是否支持云台(0:不支持,1:支持)",
|
|
|
|
|
+ // trigger: "blur"
|
|
|
|
|
+ // }]
|
|
|
|
|
+ // },
|
|
|
{
|
|
{
|
|
|
// label: "是否支持移动侦测(0:不支持,1:支持)",
|
|
// label: "是否支持移动侦测(0:不支持,1:支持)",
|
|
|
label: "是否支持移动侦测",
|
|
label: "是否支持移动侦测",
|
|
@@ -1457,6 +1448,25 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ //同步设备
|
|
|
|
|
+ rowSync(row, index){
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ sync(row).then(res => {
|
|
|
|
|
+ if(res.data.success){
|
|
|
|
|
+ let result = res.data.data;
|
|
|
|
|
+ that.$set(that.data, index, result)
|
|
|
|
|
+ that.$message({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ message: res.data.msg
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ that.$message({
|
|
|
|
|
+ type: "fail",
|
|
|
|
|
+ message: res.data.msg
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
//获取视频并开启
|
|
//获取视频并开启
|
|
|
start(row){
|
|
start(row){
|
|
|
let that = this;
|
|
let that = this;
|