Merge branch 'master' into dev/数据库统合
commit
bf3f141fe3
|
@ -14,6 +14,7 @@
|
|||
</div>
|
||||
<div v-if="showHeader" style="height: 2rem; background-color: #FFFFFF"></div>
|
||||
<div>
|
||||
<el-alert v-if="showAlert && edit" title="操作提示" description="你可以使用右键菜单管理节点" type="info" style="text-align: left"></el-alert>
|
||||
<vue-easy-tree
|
||||
class="flow-tree"
|
||||
ref="veTree"
|
||||
|
@ -65,6 +66,7 @@ export default {
|
|||
id: "treeId"
|
||||
},
|
||||
showCode: false,
|
||||
showAlert: true,
|
||||
searchSrt: "",
|
||||
chooseId: "",
|
||||
treeData: [],
|
||||
|
@ -101,6 +103,9 @@ export default {
|
|||
}
|
||||
}).then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
if (res.data.data.length > 0) {
|
||||
this.showAlert = false
|
||||
}
|
||||
resolve(res.data.data);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div v-if="showHeader" style="height: 2rem; background-color: #FFFFFF" ></div>
|
||||
<div >
|
||||
<div>
|
||||
<el-alert v-if="showAlert && edit" title="操作提示" description="你可以使用右键菜单管理节点" type="info" style="text-align: left"></el-alert>
|
||||
<vue-easy-tree
|
||||
class="flow-tree"
|
||||
ref="veTree"
|
||||
|
@ -63,6 +64,7 @@ export default {
|
|||
label: "name",
|
||||
},
|
||||
showCode: false,
|
||||
showAlert: true,
|
||||
searchSrt: "",
|
||||
chooseId: "",
|
||||
treeData: [],
|
||||
|
@ -99,6 +101,9 @@ export default {
|
|||
}
|
||||
}).then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
if (res.data.data.length > 0) {
|
||||
this.showAlert = false
|
||||
}
|
||||
resolve(res.data.data);
|
||||
}
|
||||
|
||||
|
|
|
@ -64,16 +64,22 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
style="text-align: right"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="currentChange"
|
||||
:current-page="currentPage"
|
||||
:page-size="count"
|
||||
:page-sizes="[10, 25, 35, 50, 200, 1000, 50000]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr">
|
||||
<div style="text-align: left; line-height: 32px">
|
||||
<i class="el-icon-info"></i>未找到通道,可在国标设备/通道中选择编辑按钮, 选择{{dataType === 'civilCode'?'行政区划':'父节点编码'}}
|
||||
</div>
|
||||
<el-pagination
|
||||
style="text-align: right"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="currentChange"
|
||||
:current-page="currentPage"
|
||||
:page-size="count"
|
||||
:page-sizes="[10, 25, 35, 50, 200, 1000, 50000]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="行政区划" prop="name">
|
||||
<el-input v-model="group.civilCode" >
|
||||
<el-button slot="append" @click="buildCivilCode(group.civilCode)">生成</el-button>
|
||||
<el-button slot="append" @click="buildCivilCode(group.civilCode)">选择</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
@ -37,17 +37,17 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
<channelCode ref="channelCode"></channelCode>
|
||||
<regionCode ref="regionCode"></regionCode>
|
||||
<chooseCivilCode ref="chooseCivilCode"></chooseCivilCode>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import channelCode from "./channelCode.vue";
|
||||
import regionCode from "./regionCode.vue";
|
||||
import ChooseCivilCode from "./chooseCivilCode.vue";
|
||||
|
||||
export default {
|
||||
name: "groupEdit",
|
||||
components: {channelCode, regionCode},
|
||||
components: {ChooseCivilCode, channelCode},
|
||||
computed: {},
|
||||
props: [],
|
||||
created() {},
|
||||
|
@ -116,11 +116,9 @@ export default {
|
|||
}, deviceId, 5 , lockContent);
|
||||
},
|
||||
buildCivilCode: function (deviceId){
|
||||
this.$refs.regionCode.openDialog(code=>{
|
||||
console.log("2222")
|
||||
console.log(code)
|
||||
this.$refs.chooseCivilCode.openDialog(code=>{
|
||||
this.group.civilCode = code;
|
||||
}, deviceId)
|
||||
});
|
||||
},
|
||||
close: function () {
|
||||
this.showDialog = false;
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
</el-button>
|
||||
<el-button size="mini" v-if="hasLink !=='true'" @click="addByDevice()">按设备添加</el-button>
|
||||
<el-button size="mini" v-if="hasLink ==='true'" @click="removeByDevice()">按设备移除</el-button>
|
||||
<el-button size="mini" v-if="hasLink !=='true'" @click="addAll()">全部添加</el-button>
|
||||
<el-button size="mini" v-if="hasLink ==='true'" @click="removeAll()">全部移除</el-button>
|
||||
<el-button size="mini" v-if="hasLink !=='true'" @click="addAll()">添加所有通道</el-button>
|
||||
<el-button size="mini" v-if="hasLink ==='true'" @click="removeAll()">移除所有通道</el-button>
|
||||
<el-button size="mini" @click="getChannelList()">刷新</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -218,7 +218,7 @@ export default {
|
|||
})
|
||||
},
|
||||
addAll: function (row) {
|
||||
this.$confirm("确定全部添加?", '提示', {
|
||||
this.$confirm("添加所有通道将包括已经添加到其他计划的通道,确定添加所有通道?", '提示', {
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
@ -275,7 +275,7 @@ export default {
|
|||
},
|
||||
removeAll: function (row) {
|
||||
|
||||
this.$confirm("确定全部移除?", '提示', {
|
||||
this.$confirm("确定移除所有通道?", '提示', {
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
<el-main style="padding: 5px;">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb separator="/" v-if="regionParents.length > 0">
|
||||
<el-breadcrumb-item v-for="key in regionParents" key="key">{{ key }}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div v-else style="color: #00c6ff">未选择虚拟组织</div>
|
||||
</div>
|
||||
<div class="page-header-btn">
|
||||
<div style="display: inline;">
|
||||
|
@ -121,7 +122,7 @@ export default {
|
|||
groupDeviceId: "",
|
||||
groupId: "",
|
||||
businessGroup: "",
|
||||
regionParents: ["请选择虚拟组织"],
|
||||
regionParents: [],
|
||||
multipleSelection: []
|
||||
};
|
||||
},
|
||||
|
@ -289,7 +290,11 @@ export default {
|
|||
treeNodeClickEvent: function (group) {
|
||||
if (group.deviceId === "" || group.deviceId === group.businessGroup) {
|
||||
this.channelList = []
|
||||
this.regionParents = ["请选择虚拟组织"];
|
||||
this.regionParents = [];
|
||||
this.$message.info({
|
||||
showClose: true,
|
||||
message: "当前为业务分组,挂载通道请选择其下的虚拟组织,如不存在可右键新建"
|
||||
})
|
||||
return
|
||||
}
|
||||
this.groupDeviceId = group.deviceId;
|
||||
|
|
|
@ -82,6 +82,7 @@ import uiHeader from '../layout/UiHeader.vue'
|
|||
import MediaServer from './service/MediaServer'
|
||||
import operationsFoShowLog from './dialog/operationsFoShowLog.vue'
|
||||
import moment from 'moment'
|
||||
import userService from "./service/UserService";
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
|
@ -154,16 +155,47 @@ export default {
|
|||
|
||||
},
|
||||
downloadFile(file) {
|
||||
const link = document.createElement('a');
|
||||
link.target = "_blank";
|
||||
link.download = file.fileName;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
link.href = `/debug/api/log/file/${file.fileName}`
|
||||
}else {
|
||||
link.href = `/api/log/file/${file.fileName}`
|
||||
}
|
||||
// const link = document.createElement('a');
|
||||
// link.target = "_blank";
|
||||
// link.download = file.fileName;
|
||||
// if (process.env.NODE_ENV === 'development') {
|
||||
// link.href = `/debug/api/log/file/${file.fileName}`
|
||||
// }else {
|
||||
// link.href = `/api/log/file/${file.fileName}`
|
||||
// }
|
||||
//
|
||||
// link.click();
|
||||
|
||||
link.click();
|
||||
|
||||
// 文件下载地址
|
||||
const fileUrl = ((process.env.NODE_ENV === 'development') ? process.env.BASE_API : baseUrl) + `/api/log/file/${file.fileName}`;
|
||||
|
||||
// 设置请求头
|
||||
const headers = new Headers();
|
||||
headers.append('access-token', userService.getToken()); // 设置授权头,替换YourAccessToken为实际的访问令牌
|
||||
// 发起 请求
|
||||
fetch(fileUrl, {
|
||||
method: 'GET',
|
||||
headers: headers,
|
||||
})
|
||||
.then(response => response.blob())
|
||||
.then(blob => {
|
||||
console.log(blob)
|
||||
// 创建一个虚拟的链接元素,模拟点击下载
|
||||
const link = document.createElement('a');
|
||||
link.target = "_blank";
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
link.download = file.fileName; // 设置下载文件名,替换filename.ext为实际的文件名和扩展名
|
||||
document.body.appendChild(link);
|
||||
|
||||
// 模拟点击
|
||||
link.click();
|
||||
|
||||
// 移除虚拟链接元素
|
||||
document.body.removeChild(link);
|
||||
this.$message.success("已申请截图",{closed: true})
|
||||
})
|
||||
.catch(error => console.error('下载失败:', error));
|
||||
},
|
||||
loadEnd() {
|
||||
this.playerTitle = this.file.fileName
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
<el-main style="padding: 5px;">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb separator="/" v-if="regionParents.length > 0">
|
||||
<el-breadcrumb-item v-for="key in regionParents" key="key">{{ key }}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div v-else style="color: #00c6ff">未选择行政区划</div>
|
||||
</div>
|
||||
<div class="page-header-btn">
|
||||
<div style="display: inline;">
|
||||
|
@ -116,7 +117,7 @@ export default {
|
|||
loadSnap: {},
|
||||
regionId: "",
|
||||
regionDeviceId: "",
|
||||
regionParents: ["请选择行政区划"],
|
||||
regionParents: [],
|
||||
multipleSelection: []
|
||||
};
|
||||
},
|
||||
|
@ -285,7 +286,7 @@ export default {
|
|||
this.regionDeviceId = region.deviceId;
|
||||
if (region.deviceId === "") {
|
||||
this.channelList = []
|
||||
this.regionParents = ["请选择行政区划"];
|
||||
this.regionParents = [];
|
||||
}
|
||||
this.initData();
|
||||
// 获取regionDeviceId对应的节点信息
|
||||
|
|
Loading…
Reference in New Issue