Commit a03847f8 by 潘建波

【NEW】20181手动拉取

1 parent fea99263
{"commit":"c5d19691ac1b1f4dbf13ab54d0ee6cdbd7922f34","commitDate":"2021-7-2 14:45","buildDate":"2021-7-5 15:2","version":"2.1.0","info":"【BUG】账号锁定不生效"}
\ No newline at end of file
{"commit":"fea992631da194b9776cba2116a9162aa351378e","commitDate":"2021-7-5 15:22","buildDate":"2021-7-15 11:45","version":"2.1.0","info":"提交导入少token问题"}
\ No newline at end of file
......@@ -4,7 +4,7 @@ import axios from "axios";
switch (process.env.NODE_ENV) {
case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl = window.config.https?"https://192.168.9.245:20070":"http://192.168.9.245:20080"; // 测试环境url
baseUrl = window.config.https?"https://192.168.9.245:20070":"http://192.168.9.233:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
......
......@@ -17,7 +17,7 @@ export default {
let url = "";
switch (devname) {
case "外部设备":
url = "/vchan_struct?vchan_type=extern";
url = "/devconf_fx/device_catalogs";
break;
case "内部设备":
url = "/vchan_struct?vchan_type=camera";
......@@ -26,11 +26,12 @@ export default {
url = "/vchans?vchan_type=vfile";
break;
}
if(window.config.bigtree) {
if(window.config.bigtree && devname == "外部设备") {
return `${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}` //ztree版本
} else if(devname == "外部设备"){
return api.get(`${baseUrl}/api/v1/${url}`, params);
} else {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`, params);
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`, params);
}
},
......@@ -81,5 +82,11 @@ export default {
},
gpuresource:(params)=> {
return api.get(`${baseUrl}/api/v1/gpu/resource`,params)
},
getcatadev:(params)=> {
return api.get(`${baseUrl}/api/v1/devconf_fx/device_catalogs`,params)
},
postcatadev:(params)=> {
return api.post(`${baseUrl}/api/v1/devconf_fx/device_catalogs`,params)
}
};
......@@ -126,5 +126,15 @@ export default {
`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/${id3}/sip_server`,
params
);
},
getcatalogs(){
return api.get(
`${baseUrl}/api/v1/devconf_fx/device_catalogs`
);
},
refreshcatlog(){
return api.post(
`${baseUrl}/api/v1/devconf_fx/device_catalogs`
);
}
};
......@@ -146,9 +146,12 @@ export default {
this.loginMount(res, "user");
} else {
if (res.ecode == "1000") {
debugger
sessionStorage.setItem("user_unid", res.user_unid);
localStorage.setItem("atoken", res.atoken);
this.$router.push("/resetpass")
} else {
this.$logs.oplogs(res, "serv_login", res.enote);
this.$message({
type: "error",
message: res.enote,
......
......@@ -107,6 +107,7 @@ export default {
message: res.enote
});
} else {
this.$logs.oplogs(res, "serv_login", `修改密码${res.enote}`);
this.$message({
type: "error",
message: res.enote
......
......@@ -75,13 +75,13 @@
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="锁定"
:content="scope.row.lock==null||scope.row.lock?'解锁':'锁定'"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
:class="{'el-icon-lock editIcon':scope.row.lock,'el-icon-unlock delIcon':scope.row.lock==null||scope.row.lock==false}"
:class="{'el-icon-lock delIcon':scope.row.lock,'el-icon-unlock editIcon':scope.row.lock==null||scope.row.lock==false}"
@click="clockuser(scope.$index, scope.row)"
></span>
</el-tooltip>
......@@ -358,15 +358,25 @@ export default {
},
//注销用户
logoutuser(index,row){
localStorage.removeItem("menu");
localStorage.removeItem("curmenu");
let uid = sessionStorage.getItem("user_unid");
this.$api.login.logout(row.user_unid).then((res) => {
this.$store.commit(types.ATOKEN, "");
this.$logs.oplogs("", "serv_auth", `注销用户${row.username}`);
localStorage.removeItem("atoken");
localStorage.removeItem("menu");
localStorage.removeItem("curmenu");
let uid = sessionStorage.getItem("user_unid");
this.$api.login.logout(row.user_unid).then((res) => {
if(res.ecode == "200") {
this.$message({
type: "success",
message: "注销成功!"
});
this.$logs.oplogs("", "serv_auth", `注销用户${row.username}`);
} else {
this.$message({
type: "error",
message: "注销失败!"
});
this.$logs.oplogs("", "serv_auth", `注销用户${row.username}失败`);
}
// localStorage.removeItem("atoken");
});
},
clockuser(index, row){
let text = row.lock?"此操作将解锁该用户":"此操作将锁定该用户"
......@@ -381,13 +391,13 @@ export default {
user_type:'user'
}
this.$api.ops.lockUser(row.user_unid, params).then(res => {
if (!res.ecode) {
if (res.ecode == "200") {
this.$message({
type: "success",
message: params.lock?"锁定成功!":"解锁成功!"
});
this.getTableList();
this.$logs.oplogs(res,'serv_auth',`删除用户${row.username}`);
this.$logs.oplogs(res,'serv_auth',`${params.lock?"锁定成功!":"解锁成功!"}${row.username}`);
} else {
this.$message({
type: "error",
......
......@@ -6,7 +6,7 @@
<el-form
label-position="left"
label-width="120px"
:model="addVideoParam"
:model="initParam"
ref="cameraDialog"
inline-message
hide-required-asterisk
......@@ -24,14 +24,14 @@
<el-input v-model="initParam.addr_name" disabled></el-input>
</el-form-item>
<el-form-item label="IP地址">
<el-input v-model="addVideoParam.ip"></el-input>
<el-input v-model="initParam.ip"></el-input>
</el-form-item>
<el-form-item label="端口" prop="port">
<el-input v-model="addVideoParam.port"></el-input>
<el-input v-model="initParam.port"></el-input>
</el-form-item>
<el-form-item label="协议">
<el-select
v-model="addVideoParam.video_protocol_id"
v-model="initParam.video_protocol_id"
placeholder="请选择协议"
:popper-append-to-body="false"
>
......@@ -40,25 +40,25 @@
</el-select>
</el-form-item>
<el-form-item label="取流地址" prop="video_source_url">
<el-input v-model="addVideoParam.video_source_url"></el-input>
<el-input v-model="initParam.video_source_url"></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="addVideoParam.user_name"></el-input>
<el-input v-model="initParam.user_name"></el-input>
</el-form-item>
<el-form-item label="密码">
<el-input v-model="addVideoParam.password"></el-input>
<el-input v-model="initParam.password"></el-input>
</el-form-item>
<el-form-item label="经度">
<el-input v-model="addVideoParam.longitude"></el-input>
<el-input v-model="initParam.longitude"></el-input>
</el-form-item>
<el-form-item label="纬度">
<el-input v-model="addVideoParam.latitude"></el-input>
<el-input v-model="initParam.latitude"></el-input>
</el-form-item>
<el-form-item label="扩展字段1">
<el-input v-model="addVideoParam.extend_1"></el-input>
<el-input v-model="initParam.extend_1"></el-input>
</el-form-item>
<el-form-item label="扩展字段2">
<el-input v-model="addVideoParam.extend_2"></el-input>
<el-input v-model="initParam.extend_2"></el-input>
</el-form-item>
</el-form>
</div>
......@@ -73,7 +73,6 @@
export default {
data() {
return {
addVideoParam:{},
initParam: {},
cameraAddVisible: false,
type: "",
......
......@@ -2,7 +2,6 @@
<div class="sync-tree scrollbar">
<el-tree
ref="synctree"
v-if="isLoadingTree"
:accordion="true"
:filter-node-method="filterNode"
:data="syncTreeData"
......@@ -10,7 +9,18 @@
node-key="id"
:expand-on-click-node="false"
@node-click="handleNodeClick"
></el-tree>
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>
<span class="tree-label">{{
data.label
}}</span>
</span>
<span class="tree-btn" v-if="node.label=='平台同步资源'">
<i :class="{'el-icon-refresh':true,'animterefresh':refreshload}" @click.stop="nodeRefreshClick(node, data)"></i>
</span>
</span>
</el-tree>
</div>
</template>
......@@ -20,6 +30,7 @@ export default {
data() {
return {
isLoadingTree: false,
refreshload:false,
syncTreeData: [
{
id: "0",
......@@ -48,7 +59,6 @@ export default {
components: {},
watch: {
filterText(val) {
debugger;
// this.$refs.synctree.filter(val);
setTimeout(() => {
this.$refs.synctree.filter(val);
......@@ -61,6 +71,7 @@ export default {
methods: {
initTree(data) {
this.syncTreeData[0].children = data;
this.refreshload = false;
this.isLoadingTree = true;
},
filterNode(value, data) {
......@@ -68,8 +79,10 @@ export default {
return data.label.indexOf(value) !== -1;
},
handleNodeClick(data) {
if (data.label === "平台同步资源") return;
this.$emit("syncTable", data);
debugger
if (data.label !== "平台同步资源" && data.is_leaf) {
this.$emit("syncTable", data);
};
},
handleRefresh(s, d, n) {
// console.log(s, d, n)
......@@ -83,6 +96,10 @@ export default {
}
];
this.$parent.getSyncTree();
},
nodeRefreshClick(){
this.refreshload = true;
this.$emit('refreshData')
}
}
};
......@@ -93,4 +110,14 @@ export default {
/* max-height: 216px; */
/* overflow: hidden; */
}
.animterefresh{
animation:turn 1s linear infinite;
}
@keyframes turn{
0%{-webkit-transform:rotate(0deg);}
25%{-webkit-transform:rotate(90deg);}
50%{-webkit-transform:rotate(180deg);}
75%{-webkit-transform:rotate(270deg);}
100%{-webkit-transform:rotate(360deg);}
}
</style>
......@@ -9,7 +9,7 @@
v-model="searchText"
>
</el-input>
<SyncTree ref="syncRef" :filterText="searchText" :treeDatas="syncTree" @syncTable="syncTable">
<SyncTree ref="syncRef" :filterText="searchText" :treeDatas="syncTree" @syncTable="syncTable" @refreshData="refreshData">
</SyncTree>
<cameraTree
:filterText="searchText"
......@@ -279,16 +279,10 @@ export default {
},
getSyncTree() {
this.tableType = "sync";
this.$api.resource
.treeList(
{
vchan_type: "extern"
},
this.dev_unid
)
this.$api.device.getcatadev()
.then(m => {
if (m.vchan_struct.length > 0) {
var sync_data = this.syncBuildTree(m.vchan_struct);
if (m.ecode == 200) {
var sync_data = this.syncBuildTree(m.result.childs);
this.$refs.syncRef.initTree(sync_data);
} else {
let emptyChild = [];
......@@ -324,13 +318,16 @@ export default {
let newData = [];
for (var i = 0; i < data.length; i++) {
let obj = {};
obj["id"] = data[i].refid;
obj["label"] = data[i].name === "" ? "未命名" : data[i].name;
obj["typea"] = data[i].typea;
obj["url"] = data[i].url;
obj["root"] = "平台同步资源";
obj["id"] = data[i].DeviceID;
obj["label"] = data[i].Name === "" ? "未命名" : data[i].Name;
obj["is_leaf"] = data[i].is_leaf;
obj["ParentID"] = data[i].ParentID;
obj["ip"] = data[i].IPAddress;
obj["port"] = data[i].Port;
obj["latitude"] = data[i].Latitude;
obj["longitude"] = data[i].Longitude;
if (data[i].childs) {
obj["children"] = this.syncBuildChild(data[i].childs);
obj["children"] = this.syncBuildTree(data[i].childs);
} else {
obj["children"] = [];
}
......@@ -338,24 +335,33 @@ export default {
}
return newData;
},
syncBuildChild(data) {
var childData = [];
for (var i = 0; i < data.length; i++) {
let obj = {};
obj["id"] = data[i].refid;
obj["label"] = data[i].name === "" ? "未命名" : data[i].name;
obj["typea"] = data[i].typea;
obj["url"] = data[i].url;
obj["root"] = "平台同步资源";
if (data[i].childs) {
obj["children"] = this.syncBuildTree(data[i].childs);
childData.push(obj);
} else {
obj["children"] = [];
childData.push(obj);
}
}
return childData;
//重新拉取28181树形结构
refreshData(){
this.$api.device.postcatadev()
.then(m => {
if (m.ecode == 200) {
this.$message({
type: 'success',
message: m.enote
})
this.getSyncTree()
} else {
let emptyChild = [];
this.$refs.syncRef.initTree(emptyChild);
this.$message({
type: 'error',
message: data
})
}
})
.catch(err => {
console.log(err.message);
let emptyData = [];
// this.$message({
// type: 'error',
// message: '获取同步平台资源失败!' + err.message
// })
});
},
//处理树状图数据
cameraBuildTree(data, orgObject, addrObject) {
......
......@@ -411,17 +411,16 @@ export default {
.getDevtree(this.dev_unid, node.data.name, params)
.then(data => {
// let node = require('../../assets/js/vchan_struct')
let vchans = data.vchan_struct || data.list_data;
let vchans = data.vchan_struct || data.list_data || data.result.childs;
for (let i in vchans) {
const vchan = vchans[i];
vchan.leaf =
vchan.typea == 1 ||
vchan.leaf = vchan.is_leaf ||
vchan.vchan_type == "camera" ||
Boolean(vchan.vchan_refid);
vchan.disabled = !vchan.leaf;
vchan.name =
vchan.name || vchan.org_name || vchan.vchan_name || "未命名";
vchan.leafNode = vchan.typea
vchan.name || vchan.org_name || vchan.vchan_name || vchan.Name ||"未命名";
vchan.leafNode = vchan.DeviceID
? "extern"
: vchan.vchan_type === "vfile"
? "vfile"
......@@ -429,7 +428,7 @@ export default {
if (vchan.leaf) {
vchan.childs = "";
}
vchan.vchan_refid = vchan.refid || vchan.vchan_refid;
vchan.vchan_refid = vchan.refid || vchan.vchan_refid || vchan.DeviceID;
}
resolve(vchans);
this.checkvckan();
......@@ -440,17 +439,18 @@ export default {
const element = node.data.childs[i];
// console.log(element.childs)
// element.leaf = (element.typea == 1&&element.childs&&element.childs.length < 1)|| element.vchan_type == "camera" ;
element.leaf = element.typea == 1 || element.vchan_type == "camera" ;
element.leaf = element.typea == 1 || element.vchan_type == "camera" || element.is_leaf;
element.disabled = !element.leaf;
debugger
element.name =
element.name || element.org_name || element.vchan_name || "未命名";
element.leafNode = element.typea
element.name || element.org_name || element.vchan_name || element.Name || "未命名";
element.leafNode = element.DeviceID
? "extern"
: element.vchan_type === "vfile"
? "vfile"
: "camera";
}
if (!node.data.childs.length) {
if (!node.data.childs || !node.data.childs.length ) {
this.$message({
type: "info",
message: "该组织下没有像机"
......@@ -476,7 +476,8 @@ export default {
);
},
vchanClick(node) {
if (!node.refid && !node.vchan_refid) {
if (!node.refid && !node.vchan_refid && !node.DeviceID) {
return;
}
try {
......@@ -519,7 +520,7 @@ export default {
alert("播放地址不存在!");
}
} else {
this.getSipSetting(node.refid);
this.getSipSetting(node.DeviceID);
}
// } else {
// this.getSendingCount = 1;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!