fix: BUG修改
This commit is contained in:
parent
5ed70c5d45
commit
cb2e88eb88
@ -32,6 +32,7 @@ export const addVideoGroupApi = data => post('xmgl/videoGroup/add', data);
|
||||
export const deleteVideoGroupApi = data => post('xmgl/videoGroup/delete', data);
|
||||
export const editVideoGroupApi = data => post('xmgl/videoGroup/edit', data);
|
||||
export const getVideoGroupApi = data => post('xmgl/videoGroup/list', data);
|
||||
export const getVideoTreeGroupApi = data => get('xmgl/videoGroup/tree/list', data);
|
||||
|
||||
// 上传第三方平台
|
||||
export const sendVideoInfoApi = data => post('xmgl/videoItem/sendVideoInfo', data);
|
||||
|
||||
@ -84,7 +84,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
// axios.defaults.baseURL ='http://192.168.34.221:19111/' //郭圣雄本地
|
||||
axios.defaults.baseURL ='http://192.168.34.221:19111/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
@ -96,7 +96,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://47.93.215.234:9809/'//鞍钢正式地址(弃用)
|
||||
// axios.defaults.baseURL = 'http://42.180.188.17:9809/'//鞍钢正式地址
|
||||
// axios.defaults.baseURL = 'http://47.93.215.234:11211/'//鞍钢测试地址(弃用)
|
||||
axios.defaults.baseURL = 'http://42.180.188.17:11211/'//鞍钢测试地址
|
||||
// axios.defaults.baseURL = 'http://42.180.188.17:11211/'//鞍钢测试地址
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:19814/'//测试地址
|
||||
|
||||
} else if (process.env.NODE_ENV == 'debug') {
|
||||
|
||||
@ -36,15 +36,46 @@
|
||||
<span>{{ $t('message.videoManage.videoGrouping') }}</span>
|
||||
</div>
|
||||
<div class="list_content">
|
||||
<el-tree
|
||||
:data="videoTreeData"
|
||||
node-key="id"
|
||||
ref="treeNode"
|
||||
label="groupName"
|
||||
:expand-on-click-node="false"
|
||||
:default-expand-all="true"
|
||||
@node-click="checkVideo"
|
||||
>
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||||
<span :title="data.groupName">{{
|
||||
data.groupName
|
||||
}}</span>
|
||||
<!-- 企业删除与修改 -->
|
||||
<div class="flex2">
|
||||
<img
|
||||
src="@/assets/images/icon-edit.png"
|
||||
style="margin-right: 16px"
|
||||
class="icon"
|
||||
@click.stop="editGroupFn(data)"
|
||||
/>
|
||||
<img
|
||||
src="@/assets/images/icon-delete.png"
|
||||
class="icon"
|
||||
@click.stop="deleteGroupFn(data)"
|
||||
/>
|
||||
</div>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
<!-- <div class="list_content">
|
||||
<vue-scroll v-if="groupList.length > 0">
|
||||
<!-- <div
|
||||
<div
|
||||
class="flex content_data"
|
||||
:class="{ active: activeGroupIndex === '' }"
|
||||
@click="changeGroupFn(null, '')"
|
||||
>
|
||||
全部
|
||||
{{ $t('message.videoManage.whole') }}
|
||||
</div> -->
|
||||
</div>
|
||||
<div
|
||||
class="flex content_data"
|
||||
v-for="(item, index) in groupList"
|
||||
@ -81,13 +112,15 @@
|
||||
<div class="placeholderBox" v-else>
|
||||
{{ $t('message.personnelPosition.mapManage.no_data') }}
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div
|
||||
class="addFirm"
|
||||
@click="
|
||||
addGroupDialog = true
|
||||
isAddGroup = true
|
||||
addGroupForm.groupName = ''
|
||||
selectVal = ''
|
||||
selectTreeData = {}
|
||||
"
|
||||
>
|
||||
<!-- 新增分组 -->
|
||||
@ -1024,6 +1057,31 @@
|
||||
label-width="120px"
|
||||
class="dialogFormBox"
|
||||
>
|
||||
<el-form-item
|
||||
label="选择父级"
|
||||
prop="parentId"
|
||||
>
|
||||
<el-select
|
||||
v-model="selectVal"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
@change="selectChange"
|
||||
>
|
||||
<el-option style="height:auto" :value="[]">
|
||||
<el-tree
|
||||
:data="videoTreeData"
|
||||
node-key="id"
|
||||
ref="groupTree"
|
||||
highlight-current
|
||||
:props="defaultProps"
|
||||
:default-expand-all="false"
|
||||
@node-click="treeClick"
|
||||
>
|
||||
</el-tree>
|
||||
<!-- :default-expanded-keys="defaultExpandArr" -->
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 分组名称 -->
|
||||
<el-form-item
|
||||
:label="$t('message.videoManage.groupName')"
|
||||
@ -1080,6 +1138,7 @@ import {
|
||||
deleteVideoGroupApi,
|
||||
editVideoGroupApi,
|
||||
getVideoGroupApi,
|
||||
getVideoTreeGroupApi,
|
||||
sendVideoInfoApi,
|
||||
getvideoNvrApi,
|
||||
addvideoNvrApi,
|
||||
@ -1097,6 +1156,14 @@ import cameraListLc from './cameraList_lc'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 对应的字段
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "groupName",
|
||||
},
|
||||
selectTreeData: {},
|
||||
selectVal: "",
|
||||
videoTreeData: [],
|
||||
configInfoParams: {}, //储存配置信息参数,给新增和编辑使用
|
||||
operation: 'add', //新增或者编辑的判断
|
||||
Popup: {
|
||||
@ -1296,7 +1363,8 @@ export default {
|
||||
isAddGroup: true,
|
||||
addGroupDialog: false,
|
||||
addGroupForm: {
|
||||
groupName: ''
|
||||
groupName: '',
|
||||
parentId: ""
|
||||
},
|
||||
addGroupFormRules: {
|
||||
groupName: [
|
||||
@ -1378,12 +1446,43 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.projectSn = this.$store.state.projectSn
|
||||
this.getVideoGroup()
|
||||
// this.getVideoGroup()
|
||||
this.getVideoTreeGroup()
|
||||
this.getAccountList()
|
||||
this.getAll()
|
||||
},
|
||||
components: { cameraList, cameraListLc, gdMap },
|
||||
methods: {
|
||||
// 树形控件点击
|
||||
treeClick(data) {
|
||||
console.log(data,777888);
|
||||
this.selectVal = data.groupName;
|
||||
this.selectTreeData = data;
|
||||
this.addGroupForm.parentId = data.id;
|
||||
},
|
||||
// 选择父级组件框值修改
|
||||
selectChange(e){
|
||||
if(!e){
|
||||
this.selectVal = "";
|
||||
this.selectTreeData = {};
|
||||
this.addGroupForm.parentId = "";
|
||||
this.$refs.groupTree.setCurrentKey(null);
|
||||
}
|
||||
},
|
||||
// 切换视频分组
|
||||
checkVideo(value) {
|
||||
this.currentGroupInfo = value
|
||||
this.getVideoList()
|
||||
},
|
||||
//获取视频分组列表
|
||||
getVideoTreeGroup() {
|
||||
getVideoTreeGroupApi({ projectSn: this.$store.state.projectSn }).then(
|
||||
(res) => {
|
||||
console.log('获取视频分组列表', res)
|
||||
this.videoTreeData = res.result
|
||||
}
|
||||
)
|
||||
},
|
||||
//打开配置服务器弹框
|
||||
accountServerObj() {
|
||||
this.getProjectVideoConfigList()
|
||||
@ -1677,9 +1776,16 @@ export default {
|
||||
})
|
||||
},
|
||||
editGroupFn(item) {
|
||||
console.log(item,888999)
|
||||
this.isAddGroup = false
|
||||
this.addGroupDialog = true
|
||||
this.addGroupForm = JSON.parse(JSON.stringify(item))
|
||||
this.$nextTick(() => {
|
||||
if (this.addGroupForm.parentId) {
|
||||
this.selectVal = item.groupName;
|
||||
this.$refs.groupTree.setCurrentKey(this.addGroupForm.parentId);
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteGroupFn(item) {
|
||||
// 确定删除分组
|
||||
@ -1710,7 +1816,8 @@ export default {
|
||||
if (this.activeGroupIndex === -1) {
|
||||
this.activeGroupIndex = ''
|
||||
}
|
||||
this.getVideoGroup()
|
||||
// this.getVideoGroup()
|
||||
this.getVideoTreeGroup()
|
||||
|
||||
this.$message.success(
|
||||
this.$t('message.personnelPosition.delete_success')
|
||||
@ -1722,19 +1829,23 @@ export default {
|
||||
saveGroupFn() {
|
||||
this.$refs['addGroupForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
let requestData = {...this.addGroupForm}
|
||||
requestData.parentObj = JSON.stringify(this.selectTreeData);
|
||||
if (this.isAddGroup) {
|
||||
this.addGroupForm.projectSn = this.$store.state.projectSn
|
||||
addVideoGroupApi(this.addGroupForm).then((res) => {
|
||||
requestData.projectSn = this.$store.state.projectSn
|
||||
addVideoGroupApi(requestData).then((res) => {
|
||||
this.addGroupDialog = false
|
||||
this.getVideoGroup()
|
||||
// this.getVideoGroup()
|
||||
this.getVideoTreeGroup()
|
||||
this.$message.success(
|
||||
this.$t('message.personnelPosition.add_success')
|
||||
) //添加成功!
|
||||
})
|
||||
} else {
|
||||
editVideoGroupApi(this.addGroupForm).then((res) => {
|
||||
editVideoGroupApi(requestData).then((res) => {
|
||||
this.addGroupDialog = false
|
||||
this.getVideoGroup()
|
||||
// this.getVideoGroup()
|
||||
this.getVideoTreeGroup()
|
||||
this.$message.success(
|
||||
this.$t('message.personnelPosition.edit_success')
|
||||
) //编辑成功!
|
||||
@ -1833,11 +1944,12 @@ export default {
|
||||
},
|
||||
//获取视频列表
|
||||
getVideoList() {
|
||||
let id = ''
|
||||
if (this.activeGroupIndex !== '') {
|
||||
id = this.groupList[parseInt(this.activeGroupIndex)].id
|
||||
}
|
||||
console.log(id,77777777)
|
||||
// let id = ''
|
||||
// if (this.activeGroupIndex !== '') {
|
||||
// id = this.groupList[parseInt(this.activeGroupIndex)].id
|
||||
// }
|
||||
// console.log(id,77777777)
|
||||
let id = this.currentGroupInfo.id;
|
||||
this.$nextTick(() => {
|
||||
if (this.videoType === 1) {
|
||||
//萤石云
|
||||
@ -2167,6 +2279,14 @@ export default {
|
||||
padding: 10px 0;
|
||||
height: calc(100% - 87px - 20px);
|
||||
position: relative;
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 90%;
|
||||
padding-right: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.content_data {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user