Merge branch 'master' into dev/数据库统合

dev/数据库统合
648540858 2024-12-11 09:52:56 +08:00
commit bf3f141fe3
8 changed files with 90 additions and 38 deletions

View File

@ -14,6 +14,7 @@
</div> </div>
<div v-if="showHeader" style="height: 2rem; background-color: #FFFFFF"></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 <vue-easy-tree
class="flow-tree" class="flow-tree"
ref="veTree" ref="veTree"
@ -65,6 +66,7 @@ export default {
id: "treeId" id: "treeId"
}, },
showCode: false, showCode: false,
showAlert: true,
searchSrt: "", searchSrt: "",
chooseId: "", chooseId: "",
treeData: [], treeData: [],
@ -101,6 +103,9 @@ export default {
} }
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
if (res.data.data.length > 0) {
this.showAlert = false
}
resolve(res.data.data); resolve(res.data.data);
} }

View File

@ -12,7 +12,8 @@
</div> </div>
</div> </div>
<div v-if="showHeader" style="height: 2rem; background-color: #FFFFFF" ></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 <vue-easy-tree
class="flow-tree" class="flow-tree"
ref="veTree" ref="veTree"
@ -63,6 +64,7 @@ export default {
label: "name", label: "name",
}, },
showCode: false, showCode: false,
showAlert: true,
searchSrt: "", searchSrt: "",
chooseId: "", chooseId: "",
treeData: [], treeData: [],
@ -99,6 +101,9 @@ export default {
} }
}).then((res) => { }).then((res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
if (res.data.data.length > 0) {
this.showAlert = false
}
resolve(res.data.data); resolve(res.data.data);
} }

View File

@ -64,16 +64,22 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <div style="display: grid; grid-template-columns: 1fr 1fr">
style="text-align: right" <div style="text-align: left; line-height: 32px">
@size-change="handleSizeChange" <i class="el-icon-info"></i>未找到通道可在国标设备/通道中选择编辑按钮 选择{{dataType === 'civilCode'?'行政区划':'父节点编码'}}
@current-change="currentChange" </div>
:current-page="currentPage" <el-pagination
:page-size="count" style="text-align: right"
:page-sizes="[10, 25, 35, 50, 200, 1000, 50000]" @size-change="handleSizeChange"
layout="total, sizes, prev, pager, next" @current-change="currentChange"
:total="total"> :current-page="currentPage"
</el-pagination> :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> </el-dialog>
</div> </div>
</template> </template>

View File

@ -22,7 +22,7 @@
</el-form-item> </el-form-item>
<el-form-item label="行政区划" prop="name"> <el-form-item label="行政区划" prop="name">
<el-input v-model="group.civilCode" > <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-input>
</el-form-item> </el-form-item>
@ -37,17 +37,17 @@
</div> </div>
</el-dialog> </el-dialog>
<channelCode ref="channelCode"></channelCode> <channelCode ref="channelCode"></channelCode>
<regionCode ref="regionCode"></regionCode> <chooseCivilCode ref="chooseCivilCode"></chooseCivilCode>
</div> </div>
</template> </template>
<script> <script>
import channelCode from "./channelCode.vue"; import channelCode from "./channelCode.vue";
import regionCode from "./regionCode.vue"; import ChooseCivilCode from "./chooseCivilCode.vue";
export default { export default {
name: "groupEdit", name: "groupEdit",
components: {channelCode, regionCode}, components: {ChooseCivilCode, channelCode},
computed: {}, computed: {},
props: [], props: [],
created() {}, created() {},
@ -116,11 +116,9 @@ export default {
}, deviceId, 5 , lockContent); }, deviceId, 5 , lockContent);
}, },
buildCivilCode: function (deviceId){ buildCivilCode: function (deviceId){
this.$refs.regionCode.openDialog(code=>{ this.$refs.chooseCivilCode.openDialog(code=>{
console.log("2222")
console.log(code)
this.group.civilCode = code; this.group.civilCode = code;
}, deviceId) });
}, },
close: function () { close: function () {
this.showDialog = false; this.showDialog = false;

View File

@ -37,8 +37,8 @@
</el-button> </el-button>
<el-button size="mini" v-if="hasLink !=='true'" @click="addByDevice()"></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="removeByDevice()"></el-button>
<el-button size="mini" v-if="hasLink !=='true'" @click="addAll()"></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="removeAll()"></el-button>
<el-button size="mini" @click="getChannelList()"></el-button> <el-button size="mini" @click="getChannelList()"></el-button>
</div> </div>
</div> </div>
@ -218,7 +218,7 @@ export default {
}) })
}, },
addAll: function (row) { addAll: function (row) {
this.$confirm("确定全部添加?", '提示', { this.$confirm("添加所有通道将包括已经添加到其他计划的通道,确定添加所有通道", '提示', {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -275,7 +275,7 @@ export default {
}, },
removeAll: function (row) { removeAll: function (row) {
this.$confirm("确定全部移除?", '提示', { this.$confirm("确定移除所有通道", '提示', {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

View File

@ -8,9 +8,10 @@
<el-main style="padding: 5px;"> <el-main style="padding: 5px;">
<div class="page-header"> <div class="page-header">
<div class="page-title"> <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-item v-for="key in regionParents" key="key">{{ key }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div v-else style="color: #00c6ff">未选择虚拟组织</div>
</div> </div>
<div class="page-header-btn"> <div class="page-header-btn">
<div style="display: inline;"> <div style="display: inline;">
@ -121,7 +122,7 @@ export default {
groupDeviceId: "", groupDeviceId: "",
groupId: "", groupId: "",
businessGroup: "", businessGroup: "",
regionParents: ["请选择虚拟组织"], regionParents: [],
multipleSelection: [] multipleSelection: []
}; };
}, },
@ -289,7 +290,11 @@ export default {
treeNodeClickEvent: function (group) { treeNodeClickEvent: function (group) {
if (group.deviceId === "" || group.deviceId === group.businessGroup) { if (group.deviceId === "" || group.deviceId === group.businessGroup) {
this.channelList = [] this.channelList = []
this.regionParents = ["请选择虚拟组织"]; this.regionParents = [];
this.$message.info({
showClose: true,
message: "当前为业务分组,挂载通道请选择其下的虚拟组织,如不存在可右键新建"
})
return return
} }
this.groupDeviceId = group.deviceId; this.groupDeviceId = group.deviceId;

View File

@ -82,6 +82,7 @@ import uiHeader from '../layout/UiHeader.vue'
import MediaServer from './service/MediaServer' import MediaServer from './service/MediaServer'
import operationsFoShowLog from './dialog/operationsFoShowLog.vue' import operationsFoShowLog from './dialog/operationsFoShowLog.vue'
import moment from 'moment' import moment from 'moment'
import userService from "./service/UserService";
export default { export default {
name: 'app', name: 'app',
@ -154,16 +155,47 @@ export default {
}, },
downloadFile(file) { downloadFile(file) {
const link = document.createElement('a'); // const link = document.createElement('a');
link.target = "_blank"; // link.target = "_blank";
link.download = file.fileName; // link.download = file.fileName;
if (process.env.NODE_ENV === 'development') { // if (process.env.NODE_ENV === 'development') {
link.href = `/debug/api/log/file/${file.fileName}` // link.href = `/debug/api/log/file/${file.fileName}`
}else { // }else {
link.href = `/api/log/file/${file.fileName}` // 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() { loadEnd() {
this.playerTitle = this.file.fileName this.playerTitle = this.file.fileName

View File

@ -8,9 +8,10 @@
<el-main style="padding: 5px;"> <el-main style="padding: 5px;">
<div class="page-header"> <div class="page-header">
<div class="page-title"> <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-item v-for="key in regionParents" key="key">{{ key }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div v-else style="color: #00c6ff">未选择行政区划</div>
</div> </div>
<div class="page-header-btn"> <div class="page-header-btn">
<div style="display: inline;"> <div style="display: inline;">
@ -116,7 +117,7 @@ export default {
loadSnap: {}, loadSnap: {},
regionId: "", regionId: "",
regionDeviceId: "", regionDeviceId: "",
regionParents: ["请选择行政区划"], regionParents: [],
multipleSelection: [] multipleSelection: []
}; };
}, },
@ -285,7 +286,7 @@ export default {
this.regionDeviceId = region.deviceId; this.regionDeviceId = region.deviceId;
if (region.deviceId === "") { if (region.deviceId === "") {
this.channelList = [] this.channelList = []
this.regionParents = ["请选择行政区划"]; this.regionParents = [];
} }
this.initData(); this.initData();
// regionDeviceId // regionDeviceId