Commit 343145f3 by 潘建波

【BUG】参数多次保存出现值为空的情况

1 parent c06b62d1
...@@ -4,7 +4,7 @@ window.config = { ...@@ -4,7 +4,7 @@ window.config = {
"logintitle":"AI视频分析平台",//展示标题 "logintitle":"AI视频分析平台",//展示标题
"https": false, "https": false,
"isvideo":0, "isvideo":0,
"bigtree":false,//大数据展示树 "bigtree":true,//大数据展示树
"host":"http://10.1.200.100:20080", "host":"http://10.1.200.100:20080",
"ddurl":"http://aaa.zzgx.gov.cn", "ddurl":"http://aaa.zzgx.gov.cn",
"ddloginurl":"http://10.1.200.97:29090", "ddloginurl":"http://10.1.200.97:29090",
...@@ -13,7 +13,7 @@ window.config = { ...@@ -13,7 +13,7 @@ window.config = {
"isdd":false, //是否开启钉钉登录 "isdd":false, //是否开启钉钉登录
"version":"2.1.0", "version":"2.1.0",
"encrypt":false,//是否加密true采用sha1加密,false不加密 "encrypt":false,//是否加密true采用sha1加密,false不加密
"nvsUrl":'', "nvsUrl":'http://47.94.37.10:8888',
"nvsRegex":'', "nvsRegex":'rtsp://47.94.37.10/lskjapp/',
"isNvs3000":true,//是否开启nvs3000拉取功能 "isNvs3000":true,//是否开启nvs3000拉取功能
} }
{"commit":"6ad19ddfe788a0e2a7d6aabcd3fc71e4755f27d9","commitDate":"2021-7-20 19:36","buildDate":"2021-8-9 19:25","version":"2.1.0","info":"【BUG】修改28181无法下发任务问题"}
\ No newline at end of file \ No newline at end of file
{"commit":"c06b62d1ed010a40df2e0aa8ef5895ab14020d03","commitDate":"2021-8-10 15:20","buildDate":"2021-9-6 13:47","version":"2.1.0","info":"【NEW】添加nvs3000拉取功能"}
\ No newline at end of file \ No newline at end of file
...@@ -17,7 +17,7 @@ export default { ...@@ -17,7 +17,7 @@ export default {
let url = ""; let url = "";
switch (devname) { switch (devname) {
case "外部设备": case "外部设备":
url = "/devconf_fx/device_catalogs"; url = "/device_catalogs";
break; break;
case "内部设备": case "内部设备":
url = "/vchan_struct?vchan_type=camera"; url = "/vchan_struct?vchan_type=camera";
...@@ -27,11 +27,13 @@ export default { ...@@ -27,11 +27,13 @@ export default {
break; break;
} }
if(window.config.bigtree && devname == "外部设备") { if(window.config.bigtree && devname == "外部设备") {
return `${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}` //ztree版本 return `${baseUrl}/api/v1/devconf_fx${url}` //ztree版本
} else if(devname == "外部设备"){ } else if(devname == "外部设备"){
return api.get(`${baseUrl}/api/v1/${url}`, params); return api.get(`${baseUrl}/api/v1/devconf_fx/${url}`, params);
} else { } else if(window.config.bigtree){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`, params); return `${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`
}else {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`)
} }
}, },
...@@ -90,6 +92,6 @@ export default { ...@@ -90,6 +92,6 @@ export default {
return api.post(`${baseUrl}/api/v1/devconf_fx/device_catalogs`,params) return api.post(`${baseUrl}/api/v1/devconf_fx/device_catalogs`,params)
}, },
getNvs3000:(params)=>{ getNvs3000:(params)=>{
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/nvs3000`,params) return api.post(`${baseUrl}/api/v1/devconf_fx/devs/nvs3000`,params)
}, },
}; };
...@@ -134,9 +134,9 @@ export default { ...@@ -134,9 +134,9 @@ export default {
params params
); );
}, },
getcatalogs(){ getcatalogs(params){
return api.get( return api.get(
`${baseUrl}/api/v1/devconf_fx/device_catalogs` `${baseUrl}/api/v1/devconf_fx/device_catalogs`,params
); );
}, },
refreshcatlog(){ refreshcatlog(){
......
...@@ -25,11 +25,10 @@ ...@@ -25,11 +25,10 @@
this.videoDialogVisible = true; this.videoDialogVisible = true;
this.domTimer = setTimeout(() => { this.domTimer = setTimeout(() => {
this.player = document.getElementById('playerVideo'); this.player = document.getElementById('playerVideo');
console.log(this.player)
this.player.loop = true; this.player.loop = true;
if(window.config.https) { if(window.config.https) {
let loc = location.host let loc = location.host
this.player.src = `https://${loc}/${play_url.split(":20070")[1]}` this.player.src = `https://${loc}/${play_url.split(":20080")[1]}`
} else { } else {
this.player.src = play_url; this.player.src = play_url;
} }
...@@ -37,6 +36,8 @@ ...@@ -37,6 +36,8 @@
}, 100); }, 100);
}, },
closeVideoDialog: function () { closeVideoDialog: function () {
let _this = this;
window.clearTimeout(_this.domTimer)
this.domTimer = null; this.domTimer = null;
this.player.src = ''; this.player.src = '';
this.player = ''; this.player = '';
......
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
logout() { logout() {
localStorage.removeItem("menu"); localStorage.removeItem("menu");
localStorage.removeItem("curmenu"); localStorage.removeItem("curmenu");
let uid = sessionStorage.getItem("user_unid"); let uid = localStorage.getItem("user_unid");
this.$api.login.logout(uid).then((res) => { this.$api.login.logout(uid).then((res) => {
this.$store.commit(types.ATOKEN, ""); this.$store.commit(types.ATOKEN, "");
this.$logs.oplogs("", "serv_login", `登出了平台`); this.$logs.oplogs("", "serv_login", `登出了平台`);
......
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
this.loginMount(res, "user"); this.loginMount(res, "user");
} else { } else {
if (res.ecode == "1000") { if (res.ecode == "1000") {
sessionStorage.setItem("user_unid", res.user_unid); localStorage.setItem("user_unid", res.user_unid);
localStorage.setItem("atoken", res.atoken); localStorage.setItem("atoken", res.atoken);
this.$router.push("/resetpass") this.$router.push("/resetpass")
} else { } else {
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
loginMount(res, logintype) { loginMount(res, logintype) {
this.$store.commit(types.ATOKEN, res.atoken); this.$store.commit(types.ATOKEN, res.atoken);
// localStorage.setItem('rtoken',m.data.rtoken) // localStorage.setItem('rtoken',m.data.rtoken)
sessionStorage.setItem("user_unid", res.user_unid); localStorage.setItem("user_unid", res.user_unid);
//本系统可以直接用本地缓存做 //本系统可以直接用本地缓存做
localStorage.setItem("atoken", res.atoken); localStorage.setItem("atoken", res.atoken);
localStorage.setItem("uname", res.user_name); localStorage.setItem("uname", res.user_name);
......
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
let user_unid = sessionStorage.getItem("user_unid"); let user_unid = localStorage.getItem("user_unid");
this.$api.ops.resetPwd(data, user_unid).then(res => { this.$api.ops.resetPwd(data, user_unid).then(res => {
if(res.ecode == 200){ if(res.ecode == 200){
this.$logs.oplogs(res, "serv_login", `修改密码`); this.$logs.oplogs(res, "serv_login", `修改密码`);
......
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
loginMount(res, logintype) { loginMount(res, logintype) {
this.$store.commit(types.ATOKEN, res.atoken); this.$store.commit(types.ATOKEN, res.atoken);
// localStorage.setItem('rtoken',m.data.rtoken) // localStorage.setItem('rtoken',m.data.rtoken)
sessionStorage.setItem("user_unid", res.user_unid); localStorage.setItem("user_unid", res.user_unid);
//本系统可以直接用本地缓存做 //本系统可以直接用本地缓存做
localStorage.setItem("atoken", res.atoken); localStorage.setItem("atoken", res.atoken);
localStorage.setItem("uname", res.user_name); localStorage.setItem("uname", res.user_name);
......
#!/usr/bin/evn python
# coding=utf-8
from flask import Blueprint,request,redirect,url_for
import flask
#from werkzeug import secure_filename
import requests,json,re,time,io
import sys
import os
import uuid
from commons.util import *
import gbvar.ws_serv_global as sv_global
import gbvar.database_global as database
import gbvar.dict_properties as dict_p
from threading import Thread
#配置文件路径
pro_path = "/root/UserApp/apps"
con_path = '/'.join((pro_path, 'special.properties'))
print con_path
dictProperties=Properties(con_path).getProperties()
import commons.editXml as editXml
import commons.event_to_local as etl
import dao.firebird_dao as dbmanipulation
import commons.data_process as proc
import gbvar.ws_global as global_ws_list
import gbvar.ws_list as wsdic
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
tx1_box = Blueprint('tx1_box', __name__)
#数据接收接口
@tx1_box.route('/events', methods=["POST"])
def dataRecv():
data = request.get_data()
dataDic = json.loads(data)
if type(dataDic) is dict:
subtask_id = None
if dataDic.has_key ( 'subtask_id' ):
subtask_id = dataDic['subtask_id']
# recvThird(dataDic)
t = Thread(target=recvThird, args=(dataDic,))
t.start()
print "subtask=%s" % subtask_id
try:
res = etl.eventToLocal.saveEventToLocal ( dataDic )
print res
#print type(res)
outPicsPath = res[2]
print outPicsPath
pics = dataDic['pics']
index = 0
for pic in pics:
del pic['pic_base64']
pic_src = outPicsPath[index]
#pic_src = pic_src[pic_src.find ( 'data' ) + 4:len ( pic_src )]
print pic_src
# pic['src_url'] = dict_p.get_value()['pic_url'] % pic_src
pic['src_url'] = "http://%s:20070/%s" % (wsdic.get_host_ip(), pic_src)
index = index + 1
#pic_src = outPicsPath[0]
#print "pics=%s" % pic_src
#pic_src = pic_src[pic_src.find('data')+4:len(pic_src)]
#print pic_src
#del dataDic['pics'][0]['pic_base64']
#dataDic['pics'][0]['src_url'] = dict_p.get_value()['pic_url'] % pic_src
send_by_ws ( json.dumps(dataDic), subtask_id )
print(res)
except Exception, a:
print a
pass
#存入本地数据库
# save_alarm_data(data,res)
else:
print('error: data to dict failed, data:{}'.format(data))
return json.dumps({"ecode":200,"enote":'ok'})
@tx1_box.route('/events/list', methods=["GET"])
def getEventList():
save_alarm_data('','')
return ''
# arguments = request.args()
# for item in arguments:
# print(item)
# sql = 'select * from TB_TRAFFIC_EVENT ROWS 1 TO 19'
#
# eventResult = dbmanipulation.selectDb(sql)
# print 'test'
# # print database.get_value()
# res = flask.make_response(json.dumps(eventResult, encoding="UTF-8", ensure_ascii=False, sort_keys=False, indent=4).encode('utf-8'))
# res.headers['Access-Control-Allow-Origin'] = '*'
# res.headers['Access-Control-Allow-Methods'] = 'POST,GET,OPTIONS'
# res.headers['Access-Control-Allow-Headers'] = 'x-requested-with,content-type'
# return res
def send_by_ws(data,subtask_id):
for unid, ws in wsdic.getAllWs().iteritems ():
old_task_id = wsdic.get_task_by_unid ( unid )
print "old_task_id=%s" % old_task_id
if ws and old_task_id == subtask_id:
ws.send(data)
# 给所有用户发送信息
def send_all_data(sv, data):
if sv.users is not None and len ( sv.users ) > 0:
for addr in sv.users:
print ('addr=%s' % addr)
sv.send_data (data, addr )
#系统初始化:读取配置文件获取初始化任务列表
def get_task_info():
dictProperties = dict_p.get_value()
result_list = []
if dictProperties:
for i in range(4):
result_data = {}
task_id = 'task_%s' % i
ds = dictProperties[task_id]
if ds.find ( "@" ) != -1:
task_inf = re.split ( '[@]', ds )
result_data.setdefault ( "task_id",i+1 )
result_data.setdefault ( "task_name", task_inf[1] )
result_data.setdefault ( "task_info", readerXml(task_inf[0]) )
result_list.append ( result_data )
else:
continue
return json.dumps ( result_list, ensure_ascii=False )
# 初始化报警数据
def save_alarm_data(adata, src):
setting = ''
with open("text", 'r') as f:
setting = json.loads(f.read())
data = setting
dataType = data['event_type']
proc.dataProcess.initData(data)
trffic_data = proc.dataProcess.trffic_data()
dbmanipulation.save_trrfic_Db(trffic_data)
if (dataType == 'vehicle' or dataType == 'xcycle' or dataType == 'pedestrian'):
if (data.has_key('driver')):
if(data['driver'].has_key('face')):
face_data = proc.dataProcess.face_data()
dbmanipulation.save_face_Db(face_data)
else:
return '人脸不存在'
elif (dataType == 'pflow' or dataType == 'tflow' or dataType == 'pdensity'):
flow_data = proc.dataProcess.flow_data()
dbmanipulation.save_flow_data_Db(flow_data)
flow_event = proc.dataProcess.flow_event()
dbmanipulation.save_flow_event_Db(flow_event)
#初始化任务详情信息:包含algo_args信息、calibration标定参数信息以及roi信息的组合
def creat_mtasks():
'''任务配置参数'''
mtasks = []
'''场景'''
scenes = []
'''标定信息'''
callibration = {}
'''rois信息'''
rois = []
'''最新设置的算法配置参数'''
config = {}
'''basicConfig系统默认算法参数'''
basicConfig = {}
'''play_urls待分析的原始视频源的输入地址'''
play_urls = {}
return mtasks
#读取任务信息参数
def readerXml(file_path):
return editXml.readerXml ( file_path )
@tx1_box.route('/pic_cut', methods=["POST"])
def post_test():
data_1 = request.get_data ()
print data_1
data = {}
data.setdefault('pic_base64','123123123123123123123123')
return json.dumps ( data, ensure_ascii=False )
headers = {
"Content-Type":"application/json"
}
def recvThird(rdata):
url = dictProperties["third_party_url"]
if url:
try:
# r = requests.post(url,rdata, timeout=20)
r = requests.post(url=url,data=json.dumps(rdata),headers=headers)
print r
except Exception as e:
print "发送失败: err: " + str(e)
...@@ -188,7 +188,6 @@ ...@@ -188,7 +188,6 @@
this.getData(); this.getData();
}, },
showlogtype(data){ showlogtype(data){
debugger
let sname = ''; let sname = '';
this.srevarr.map(ele => { this.srevarr.map(ele => {
if(ele.serv_type == data){ if(ele.serv_type == data){
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
editVisible:false, editVisible:false,
roleList:[], roleList:[],
uname:"", uname:"",
userId:sessionStorage.getItem('user_unid'), userId:localStorage.getItem('user_unid'),
rules: { rules: {
role_name: [ role_name: [
{ validator: checkRole, trigger: 'change' } { validator: checkRole, trigger: 'change' }
......
...@@ -340,7 +340,7 @@ export default { ...@@ -340,7 +340,7 @@ export default {
}); });
} else { } else {
let exportFileUrl = res.file_path; let exportFileUrl = res.file_path;
this.$logs.oplogs(res,'serv_system',`备份导出`);
window.location.href = exportFileUrl; window.location.href = exportFileUrl;
} }
}); });
...@@ -361,7 +361,8 @@ export default { ...@@ -361,7 +361,8 @@ export default {
} else { } else {
let exportFileUrl = res.enote; let exportFileUrl = res.enote;
this.$logs.oplogs(res,'serv_system',`备份导出`); this.$logs.oplogs(res,'serv_system',`备份导出`);
window.location.href = exportFileUrl; let url = window.config.https?exportFileUrl.replace('http','https').replace('20080','20070'):exportFileUrl;
window.location.href = url;
} }
}); });
}, },
......
...@@ -360,7 +360,7 @@ export default { ...@@ -360,7 +360,7 @@ export default {
logoutuser(index,row){ logoutuser(index,row){
localStorage.removeItem("menu"); localStorage.removeItem("menu");
localStorage.removeItem("curmenu"); localStorage.removeItem("curmenu");
let uid = sessionStorage.getItem("user_unid"); let uid = localStorage.getItem("user_unid");
this.$api.login.logout(row.user_unid).then((res) => { this.$api.login.logout(row.user_unid).then((res) => {
if(res.ecode == "200") { if(res.ecode == "200") {
this.$message({ this.$message({
......
...@@ -26,8 +26,6 @@ export default { ...@@ -26,8 +26,6 @@ export default {
props: ["playurl", "type"], props: ["playurl", "type"],
methods: { methods: {
videoPlay: function() { videoPlay: function() {
debugger
this.urlFlag = false; this.urlFlag = false;
console.log(this.playurl); console.log(this.playurl);
if (!this.playurl.sip_serv_ip) { if (!this.playurl.sip_serv_ip) {
...@@ -53,13 +51,14 @@ export default { ...@@ -53,13 +51,14 @@ export default {
console.log(error); console.log(error);
} }
} else { } else {
debugger
let OcxResponse = document let OcxResponse = document
.getElementById("VionVideo") .getElementById("VionVideo")
.StartPlaySip( .StartPlaySip(
this.playurl.sip_serv_id, this.playurl.sip_serv_id,
this.playurl.sip_serv_ip, this.playurl.sip_serv_ip,
this.playurl.sip_serv_port, this.playurl.sip_serv_port,
this.playurl.sip_unid, this.playurl.sip_dev_id,
this.playurl.sip_password, this.playurl.sip_password,
this.playurl.devId, this.playurl.devId,
0 0
......
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
sip_username: [{ validator: validateUser, trigger: "change" }], sip_username: [{ validator: validateUser, trigger: "change" }],
sip_password: [{ validator: validatePass, trigger: "change" }] sip_password: [{ validator: validatePass, trigger: "change" }]
}, },
user_unid: sessionStorage.getItem("user_unid"), user_unid: localStorage.getItem("user_unid"),
dev_unid: localStorage.getItem("dev_unid"), dev_unid: localStorage.getItem("dev_unid"),
isGetted: false, isGetted: false,
sipSetting: { sipSetting: {
......
...@@ -314,19 +314,19 @@ export default { ...@@ -314,19 +314,19 @@ export default {
this.$refs.catree.remove(data.vchan_refid) this.$refs.catree.remove(data.vchan_refid)
}, },
getNvs(node, data){ getNvs(node, data){
this.$confirm("拉取NVS300到该地点?", "提示", { this.$confirm("拉取NVS3000到该地点?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
let params = { let params = {
"devUnid": this.dev_unid, "devUnid": this.dev_unid,
"addressUnid": data.event_code, "addressUnid": data.unid,
"nvsUrl": window.config.nvsUrl, "nvsUrl": window.config.nvsUrl,
"nvsRegex": window.config.nvsRegex "nvsRegex": window.config.nvsRegex
} }
this.$api.device.getNvs3000(params).then(res => { this.$api.device.getNvs3000(params).then(res => {
this.orgServ(); this.$emit("getTree");
}) })
}) })
}, },
......
...@@ -318,14 +318,14 @@ export default { ...@@ -318,14 +318,14 @@ export default {
let newData = []; let newData = [];
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
let obj = {}; let obj = {};
obj["id"] = data[i].DeviceID; obj["id"] = data[i].deviceid;
obj["label"] = data[i].Name === "" ? "未命名" : data[i].Name; obj["label"] = data[i].name === "" ? "未命名" : data[i].name;
obj["is_leaf"] = data[i].is_leaf; obj["is_leaf"] = data[i].is_leaf;
obj["ParentID"] = data[i].ParentID; obj["ParentID"] = data[i].parentid;
obj["ip"] = data[i].IPAddress; obj["ip"] = data[i].ipaddress;
obj["port"] = data[i].Port; obj["port"] = data[i].port;
obj["latitude"] = data[i].Latitude; obj["latitude"] = data[i].latitude;
obj["longitude"] = data[i].Longitude; obj["longitude"] = data[i].longitude;
if (data[i].childs) { if (data[i].childs) {
obj["children"] = this.syncBuildTree(data[i].childs); obj["children"] = this.syncBuildTree(data[i].childs);
} else { } else {
......
...@@ -492,7 +492,7 @@ export default { ...@@ -492,7 +492,7 @@ export default {
} }
}, },
created() { created() {
this.user_unid = window.sessionStorage.getItem("user_unid"); this.user_unid = window.localStorage.getItem("user_unid");
}, },
watch: { watch: {
......
...@@ -80,7 +80,10 @@ export default { ...@@ -80,7 +80,10 @@ export default {
//ifram 传递回来的饿xml //ifram 传递回来的饿xml
this.XMLStr = this.$refs.iframe.contentWindow.xmlStr; this.XMLStr = this.$refs.iframe.contentWindow.xmlStr;
this.handleClose(); this.handleClose();
if(this.XMLStr) {
this.$parent.submit(this.XMLStr, "config"); this.$parent.submit(this.XMLStr, "config");
}
}, },
handleClose(done) { handleClose(done) {
this.dialogVisible = false; this.dialogVisible = false;
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
this.playulr.sip_serv_id, this.playulr.sip_serv_id,
this.playulr.sip_serv_ip, this.playulr.sip_serv_ip,
this.playulr.sip_serv_port, this.playulr.sip_serv_port,
this.playulr.sip_unid, this.playulr.sip_dev_id,
this.playulr.sip_password, this.playulr.sip_password,
this.playulr.devId, this.playulr.devId,
0 0
......
...@@ -348,7 +348,7 @@ export default { ...@@ -348,7 +348,7 @@ export default {
let vchans = childNodes.vchan_struct || childNodes.list_data; let vchans = childNodes.vchan_struct || childNodes.list_data;
treenode = vchans treenode = vchans
} else { } else {
treenode = childNodes.vchan_struct; treenode = childNodes.result.childs;
} }
return treenode; return treenode;
}, },
...@@ -586,11 +586,12 @@ export default { ...@@ -586,11 +586,12 @@ export default {
var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, zNodes); var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, zNodes);
return return
} }
this.$api.device.getDevtreeLike(this.dev_unid,'外部设备',{vchan_name_like:this.searchText }).then(res => { this.$api.resource.getcatalogs({vchan_name_like:this.searchText }).then(res => {
this.$api.device.getDevtreeLike(this.dev_unid,'内部设备',{vchan_name_like:this.searchText }).then(camerares => { this.$api.device.getDevtreeLike(this.dev_unid,'内部设备',{vchan_name_like:this.searchText }).then(camerares => {
this.$api.device.getDevtreeLike(this.dev_unid,'短视频',{vchan_name_like:this.searchText }).then(vchanres => { this.$api.device.getDevtreeLike(this.dev_unid,'短视频',{vchan_name_like:this.searchText }).then(vchanres => {
setTimeout(() => { setTimeout(() => {
this.zNodes[0].childs = res.vchan_struct debugger
this.zNodes[0].childs = res.result.childs
this.zNodes[1].childs = camerares.vchan_struct this.zNodes[1].childs = camerares.vchan_struct
this.zNodes[2].childs = vchanres.list_data this.zNodes[2].childs = vchanres.list_data
var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes); var ztree = $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes);
...@@ -665,7 +666,7 @@ export default { ...@@ -665,7 +666,7 @@ export default {
alert("播放地址不存在!"); alert("播放地址不存在!");
} }
} else { } else {
this.getSipSetting(node.refid); this.getSipSetting(node.vchan_refid);
} }
// } else { // } else {
// this.getSendingCount = 1; // this.getSendingCount = 1;
...@@ -678,6 +679,7 @@ export default { ...@@ -678,6 +679,7 @@ export default {
if (this.dev_unid) { if (this.dev_unid) {
this.$api.device.sipSet(this.dev_unid, this.user_unid).then((res) => { this.$api.device.sipSet(this.dev_unid, this.user_unid).then((res) => {
if (!res.ecode) { if (!res.ecode) {
debugger
console.log("获取sip配置返回:", JSON.stringify(res)); console.log("获取sip配置返回:", JSON.stringify(res));
this.play_url = res; this.play_url = res;
this.play_url.devId = refid; this.play_url.devId = refid;
...@@ -738,7 +740,7 @@ export default { ...@@ -738,7 +740,7 @@ export default {
}, },
}, },
created() { created() {
this.user_unid = window.sessionStorage.getItem("user_unid"); this.user_unid = window.localStorage.getItem("user_unid");
// this.getData(); // this.getData();
}, },
}; };
......
...@@ -596,7 +596,7 @@ export default { ...@@ -596,7 +596,7 @@ export default {
} }
}, },
created() { created() {
this.user_unid = window.sessionStorage.getItem("user_unid"); this.user_unid = window.localStorage.getItem("user_unid");
} }
}; };
</script> </script>
......
...@@ -417,8 +417,7 @@ export default { ...@@ -417,8 +417,7 @@ export default {
for (let i in vchans) { for (let i in vchans) {
const vchan = vchans[i]; const vchan = vchans[i];
vchan.leaf = vchan.is_leaf || vchan.leaf = vchan.is_leaf ||
vchan.vchan_type == "camera" || vchan.vchan_type == "camera"
Boolean(vchan.vchan_refid);
vchan.disabled = !vchan.leaf; vchan.disabled = !vchan.leaf;
vchan.name = vchan.name =
vchan.name || vchan.org_name || vchan.vchan_name || vchan.Name ||"未命名"; vchan.name || vchan.org_name || vchan.vchan_name || vchan.Name ||"未命名";
...@@ -522,7 +521,7 @@ export default { ...@@ -522,7 +521,7 @@ export default {
alert("播放地址不存在!"); alert("播放地址不存在!");
} }
} else { } else {
this.getSipSetting(node.DeviceID); this.getSipSetting(node.deviceid);
} }
// } else { // } else {
// this.getSendingCount = 1; // this.getSendingCount = 1;
...@@ -599,7 +598,7 @@ export default { ...@@ -599,7 +598,7 @@ export default {
} }
}, },
created() { created() {
this.user_unid = window.sessionStorage.getItem("user_unid"); this.user_unid = window.localStorage.getItem("user_unid");
} }
}; };
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!