9 files modified
1 files added
| | |
| | | <!-- |
| | | * @Author : yuan |
| | | * @Date : 2025-06-14 15:19:16 |
| | | * @LastEditors : yuan |
| | | * @LastEditTime : 2025-06-25 16:56:30 |
| | | * @FilePath : \src\components\basic-container\main.vue |
| | | * @Description : |
| | | * Copyright 2025 OBKoro1, All Rights Reserved. |
| | | * 2025-06-14 15:19:16 |
| | | --> |
| | | <template> |
| | | <div class="basic-container" :style="styleName" :class="{ 'basic-container--block': block }"> |
| | | <el-card class="basic-container__card"> |
| | |
| | | }, |
| | | }, |
| | | computed: { |
| | | styleName() { |
| | | styleName () { |
| | | return { |
| | | borderRadius: `${this.radius}px`, |
| | | background: this.background, |
| | | }; |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .basic-container { |
| | | padding: 0 10px; |
| | | box-sizing: border-box; |
| | | height: 0; |
| | | flex: 1; |
| | | |
| | | padding: 10px; |
| | | // box-sizing: border-box; |
| | | // height: 100%; |
| | | |
| | | .basic-container__card{ |
| | | .basic-container__card { |
| | | height: 100% !important; |
| | | overflow: auto; |
| | | overflow: hidden; |
| | | |
| | | .el-card__body { |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: 100% !important; |
| | | overflow: hidden; |
| | | box-sizing: border-box; |
| | | |
| | | &>div { |
| | | height: 0; |
| | | flex: 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | &--block { |
| New file |
| | |
| | | <!-- |
| | | * @Author : yuan |
| | | * @Date : 2025-06-14 15:19:16 |
| | | * @LastEditors : yuan |
| | | * @LastEditTime : 2025-06-25 16:37:40 |
| | | * @FilePath : \src\components\basic-main-content\main.vue |
| | | * @Description : |
| | | * Copyright 2025 OBKoro1, All Rights Reserved. |
| | | * 2025-06-14 15:19:16 |
| | | --> |
| | | <template> |
| | | <div class="basic-main-content"> |
| | | <slot></slot> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'basicMainContent', |
| | | props: { |
| | | radius: { |
| | | type: [String, Number], |
| | | default: 10, |
| | | }, |
| | | background: { |
| | | type: String, |
| | | }, |
| | | block: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }, |
| | | computed: { |
| | | styleName () { |
| | | return { |
| | | borderRadius: `${this.radius}px`, |
| | | background: this.background, |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .basic-main-content { |
| | | height: 0; |
| | | flex: 1; |
| | | } |
| | | </style> |
| | |
| | | import avueUeditor from 'avue-plugin-ueditor' |
| | | import basicBlock from 'components/basic-block/main.vue' |
| | | import basicContainer from 'components/basic-container/main.vue' |
| | | import basicMainContent from 'components/basic-main-content/main.vue' |
| | | |
| | | import thirdRegister from './components/third-register/main.vue' |
| | | import NfDesignBase from '@saber/nf-design-base-elp' |
| | | import flowDesign from './components/flow-design/main.vue' |
| | |
| | | window.DC = Object.create(DC) |
| | | import { onResize } from '@/utils/rem' |
| | | onResize() |
| | | const { VITE_APP_BASE,VITE_APP_CESIUM_TOKEN } = import.meta.env |
| | | const { VITE_APP_BASE, VITE_APP_CESIUM_TOKEN } = import.meta.env |
| | | window.CESIUM_BASE_URL = `${VITE_APP_BASE}/cesiumPu` |
| | | Cesium.Ion.defaultAccessToken = VITE_APP_CESIUM_TOKEN |
| | | |
| | |
| | | app.component(key, component) |
| | | } |
| | | app.component('basicContainer', basicContainer) |
| | | app.component('basicMainContent', basicMainContent) |
| | | |
| | | app.component('basicBlock', basicBlock) |
| | | app.component('thirdRegister', thirdRegister) |
| | | app.component('flowDesign', flowDesign) |
| | |
| | | <div class="tags-box"> |
| | | <tags /> |
| | | </div> |
| | | <search class="avue-view" v-show="isSearch"></search> |
| | | <search class="main-avue-view-container" v-show="isSearch"></search> |
| | | <!-- 主体视图层 --> |
| | | <div id="avue-view" v-show="!isSearch" v-if="isRefresh"> |
| | | <div class="main-avue-view-container" v-show="!isSearch" v-if="isRefresh"> |
| | | <router-view #="{ Component }"> |
| | | <keep-alive :include="$store.getters.tagsKeep"> |
| | | <component :is="Component" /> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import index from '@/mixins/index'; |
| | | import wechat from './wechat.vue'; |
| | | import index from '@/mixins/index' |
| | | import wechat from './wechat.vue' |
| | | //import { validatenull } from 'utils/validate'; |
| | | import { mapGetters } from 'vuex'; |
| | | import tags from './tags.vue'; |
| | | import search from './search.vue'; |
| | | import logo from './logo.vue'; |
| | | import top from './top/index.vue'; |
| | | import sidebar from './sidebar/index.vue'; |
| | | import { mapGetters } from 'vuex' |
| | | import tags from './tags.vue' |
| | | import search from './search.vue' |
| | | import logo from './logo.vue' |
| | | import top from './top/index.vue' |
| | | import sidebar from './sidebar/index.vue' |
| | | |
| | | export default { |
| | | mixins: [index], |
| | |
| | | wechat, |
| | | }, |
| | | name: 'index', |
| | | provide() { |
| | | provide () { |
| | | return { |
| | | index: this, |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters([ |
| | |
| | | 'menu', |
| | | 'setting', |
| | | ]), |
| | | validSidebar() { |
| | | validSidebar () { |
| | | return !( |
| | | (this.$route.meta || {}).menu === false || (this.$route.query || {}).menu === 'false' |
| | | ); |
| | | ) |
| | | }, |
| | | }, |
| | | props: [], |
| | | methods: { |
| | | //打开菜单 |
| | | openMenu(item = {}) { |
| | | openMenu (item = {}) { |
| | | this.$store.dispatch('GetMenu', item.id).then(data => { |
| | | if (data.length !== 0) { |
| | | this.$router.$avueRouter.formatRoutes(data, true) |
| | | |
| | | // 获取url里面的redirect |
| | | const redirect = decodeURIComponent(this.$route.query.redirect || ''); |
| | | if (redirect){ |
| | | console.log('redirect',redirect); |
| | | const [path, queryString] = redirect.split('?'); |
| | | const query = queryString ? Object.fromEntries(new URLSearchParams(queryString)) : {}; |
| | | this.$router.push({ path,query}) |
| | | const redirect = decodeURIComponent(this.$route.query.redirect || '') |
| | | if (redirect) { |
| | | console.log('redirect', redirect) |
| | | const [path, queryString] = redirect.split('?') |
| | | const query = queryString ? Object.fromEntries(new URLSearchParams(queryString)) : {} |
| | | this.$router.push({ path, query }) |
| | | } |
| | | } |
| | | //当点击顶部菜单后默认打开第一个菜单 |
| | |
| | | }, itemActive.meta) |
| | | }); |
| | | }*/ |
| | | }); |
| | | }) |
| | | }, |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | :deep(.basic-container){ |
| | | height: none !important;} |
| | | // #avue-view{ |
| | | // :deep(){ |
| | | // .avue-crud__body{ |
| | |
| | | // } |
| | | // } |
| | | |
| | | .tags-box{ |
| | | .tags-box { |
| | | background: transparent; |
| | | padding: 0 10px; |
| | | --el-color-primary: rgba(20, 65, 255, 1); |
| | |
| | | |
| | | .avue-layout { |
| | | display: flex; |
| | | height: 1080px; |
| | | width: 1920px; |
| | | background: url("@/assets/images/layoutBg.png") no-repeat center / 100% 100%; |
| | | width: 100%; |
| | | height: 100%; |
| | | background: url("@/assets/images/layoutBg.png") no-repeat center / 100% 100%; |
| | | overflow: hidden; |
| | | |
| | | &--horizontal { |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .avue-view { |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | .main-avue-view-container { |
| | | height: 0; |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avue-footer { |
| | |
| | | } |
| | | } |
| | | |
| | | .ztzf-cesium{ |
| | | .ztzf-cesium { |
| | | .cesium-viewer { |
| | | height: 100%; |
| | | overflow: hidden; |
| | |
| | | .cesium-viewer-bottom { |
| | | display: none; |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <basic-container> |
| | | <basic-main-content> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" ref="crud" @row-del="rowDel" |
| | | v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen" |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
| | |
| | | <DockControlPanel v-if="remoteDebuggingShow" :sn="curDeviceInfo.device_sn" :deviceInfo="curDeviceInfo"> |
| | | </DockControlPanel> |
| | | </el-drawer> |
| | | </basic-container> |
| | | </basic-main-content> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | option: { |
| | | lazy: true, |
| | | tree: true, |
| | | // height: '400', |
| | | calcHeight: 32, |
| | | |
| | | dialogWidth: 1050, |
| | | tip: false, |
| | | searchShow: true, |
| | |
| | | addBtn: false, |
| | | dialogClickModal: false, |
| | | grid: false, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 180, |
| | | |
| | | column: [ |
| | | { |
| | | label: '设备型号', |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud |
| | | id="device" |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page="page" |
| | | @update:page="handlePageChange" |
| | | ref="crud" |
| | | @row-del="rowDel" |
| | | v-model="form" |
| | | :permission="permissionList" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | :before-open="beforeOpen" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | > |
| | | <basic-main-content> |
| | | <avue-crud id="device" :option="option" :table-loading="loading" :data="data" :page="page" |
| | | @update:page="handlePageChange" ref="crud" @row-del="rowDel" v-model="form" :permission="permissionList" |
| | | @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen" @search-change="searchChange" |
| | | @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange" |
| | | @size-change="sizeChange" @refresh-change="refreshChange"> |
| | | <template #menu-left> |
| | | <el-button |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.workspace_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | <el-button type="danger" icon="el-icon-delete" plain v-if="permission.workspace_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> |
| | | <template #dept_name="{ row }"> |
| | |
| | | <template #status="{ row }"> |
| | | <div v-if="row.status == true" class="onlineStatus"> |
| | | <div class="onlineStatus-dot"></div> |
| | | <span class="online" >在线</span> |
| | | <span class="online">在线</span> |
| | | </div> |
| | | <div v-if="row.status == false" class="onlineStatus"> |
| | | <div class="onlineStatus-dot1"></div> |
| | |
| | | </div> |
| | | </template> |
| | | <template #menu="scope"> |
| | | <el-button |
| | | type="primary" |
| | | text |
| | | icon="el-icon-setting" |
| | | v-if="permission.operate_password_set" |
| | | @click.stop="handleOperatePassword(scope.row, scope.index)" |
| | | >操控密码设置 |
| | | <el-button type="primary" text icon="el-icon-setting" v-if="permission.operate_password_set" |
| | | @click.stop="handleOperatePassword(scope.row, scope.index)">操控密码设置 |
| | | </el-button> |
| | | <!-- <el-button |
| | | type="primary" |
| | |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="操控密码设置" append-to-body v-model="operatePasswordSetBox" width="455px"> |
| | | <el-form |
| | | :model="passwordForm" |
| | | ref="passwordForm" |
| | | label-width="80px" |
| | | :rules="rules" |
| | | v-loading="loadingForm" |
| | | > |
| | | <el-form :model="passwordForm" ref="passwordForm" label-width="80px" :rules="rules" v-loading="loadingForm"> |
| | | <el-form-item label="密码" prop="password"> |
| | | <el-input |
| | | type="password" |
| | | v-model="passwordForm.password" |
| | | placeholder="请输入密码" |
| | | show-password |
| | | ></el-input> |
| | | <el-input type="password" v-model="passwordForm.password" placeholder="请输入密码" show-password></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="确认密码" prop="password2"> |
| | | <el-input |
| | | type="password" |
| | | v-model="passwordForm.password2" |
| | | placeholder="请输入确认密码" |
| | | show-password |
| | | ></el-input> |
| | | <el-input type="password" v-model="passwordForm.password2" placeholder="请输入确认密码" show-password></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | <el-dialog title="操控密码查看" append-to-body v-model="operatePasswordViewBox" width="455px"> |
| | | <el-input v-model="operate_password" disabled></el-input> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </basic-main-content> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | getDetail, |
| | | getOperatePassword, |
| | | operatePasswordUpdate, |
| | | } from '@/api/device/device'; |
| | | import { mapGetters } from 'vuex'; |
| | | } from '@/api/device/device' |
| | | import { mapGetters } from 'vuex' |
| | | |
| | | export default { |
| | | data() { |
| | | data () { |
| | | const validatePass = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请输入密码')); |
| | | callback(new Error('请输入密码')) |
| | | } else { |
| | | callback(); |
| | | callback() |
| | | } |
| | | }; |
| | | } |
| | | const validatePass2 = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请再次输入密码')); |
| | | callback(new Error('请再次输入密码')) |
| | | } else if (value !== this.passwordForm.password) { |
| | | callback(new Error('两次输入密码不一致!')); |
| | | callback(new Error('两次输入密码不一致!')) |
| | | } else { |
| | | callback(); |
| | | callback() |
| | | } |
| | | }; |
| | | } |
| | | return { |
| | | loadingForm: false, |
| | | rules: { |
| | |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | // height: '460', |
| | | // calcHeight: 32, |
| | | // dialogWidth: 950, |
| | | tip: false, |
| | | searchShow: true, |
| | |
| | | excelBtn: false, |
| | | dialogClickModal: false, |
| | | grid: false, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 180, |
| | | |
| | | column: [ |
| | | { |
| | | label: '设备型号', |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permission']), |
| | | permissionList() { |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.validData(this.permission.fly_add, true), |
| | | viewBtn: this.validData(this.permission.fly_view, true), |
| | | delBtn: this.validData(this.permission.fly_delete, true), |
| | | editBtn: this.validData(this.permission.fly_edit, true), |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(','); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(',') |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 设置无人机操作密码 |
| | | setOperatePasswordConfirm() { |
| | | var that = this; |
| | | setOperatePasswordConfirm () { |
| | | var that = this |
| | | this.$refs.passwordForm.validate(valid => { |
| | | if (valid) { |
| | | this.loadingForm = true; |
| | | this.loadingForm = true |
| | | const data = { |
| | | id: this.passwordForm.id, |
| | | operate_password: this.passwordForm.password, |
| | | }; |
| | | } |
| | | // 提交 |
| | | operatePasswordUpdate(data).then(res => { |
| | | this.loadingForm = false; |
| | | this.operatePasswordSetBox = false; |
| | | that.passwordForm = {}; |
| | | this.onLoad(this.page); |
| | | this.loadingForm = false |
| | | this.operatePasswordSetBox = false |
| | | that.passwordForm = {} |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | console.log('error submit!!') |
| | | return false |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | // 操作密码设置 |
| | | handleOperatePassword(row) { |
| | | this.operatePasswordSetBox = true; |
| | | this.passwordForm.id = row.id; |
| | | handleOperatePassword (row) { |
| | | this.operatePasswordSetBox = true |
| | | this.passwordForm.id = row.id |
| | | }, |
| | | viewOperatePassword(row) { |
| | | this.operatePasswordViewBox = true; |
| | | viewOperatePassword (row) { |
| | | this.operatePasswordViewBox = true |
| | | // 查询密码 |
| | | getOperatePassword(row.id).then(res => { |
| | | this.operate_password = res.data.data; |
| | | }); |
| | | this.operate_password = res.data.data |
| | | }) |
| | | }, |
| | | init() { |
| | | init () { |
| | | (this.page = { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }), |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | rowSave (row, done, loading) { |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | rowUpdate (row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | done(); |
| | | }) |
| | | done() |
| | | }, |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | window.console.log(error) |
| | | loading() |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | rowDel(row) { |
| | | rowDel (row) { |
| | | this.$confirm('确定将选择数据删除?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | handleDelete() { |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning('请选择至少一条数据'); |
| | | return; |
| | | this.$message.warning('请选择至少一条数据') |
| | | return |
| | | } |
| | | this.$confirm('确定将选择数据删除?', { |
| | | confirmButtonText: '确定', |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | beforeOpen (done, type) { |
| | | if (['edit', 'view'].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | this.form = res.data.data |
| | | }) |
| | | } |
| | | done(); |
| | | done() |
| | | }, |
| | | handlePageChange(val) { |
| | | this.page = val; |
| | | this.onLoad(this.page); |
| | | handlePageChange (val) { |
| | | this.page = val |
| | | this.onLoad(this.page) |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | this.onLoad(this.page); |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | this.onLoad(this.page) |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page) |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { releaseTimeRange } = this.query; |
| | | onLoad (page, params = {}) { |
| | | const { releaseTimeRange } = this.query |
| | | let values = { |
| | | ...params, |
| | | ...this.query, |
| | | }; |
| | | } |
| | | if (releaseTimeRange) { |
| | | values = { |
| | | ...values, |
| | | releaseTime_datege: releaseTimeRange[0], |
| | | releaseTime_datelt: releaseTimeRange[1], |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } |
| | | values.releaseTimeRange = null |
| | | } |
| | | values['domain'] = 0; |
| | | this.loading = true; |
| | | values['domain'] = 0 |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | }, |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | height: 655px !important; |
| | | overflow: auto; |
| | | } |
| | | |
| | | .online { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .onlineStatus1 { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | } |
| | | |
| | | .onlineStatus { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | } |
| | | |
| | | .onlineStatus-dot { |
| | | width: 15px; |
| | | height: 15px; |
| | | background-color: #40cb8b; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .onlineStatus-dot1 { |
| | | width: 15px; |
| | | height: 15px; |
| | |
| | | <!-- |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-09-09 11:40:40 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-09-09 12:02:50 |
| | | * @FilePath: \drone-web-manage\src\views\device\index.vue |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2024 by shuishen, All Rights Reserved. |
| | | * @Author : yuan |
| | | * @Date : 2025-04-27 21:01:20 |
| | | * @LastEditors : yuan |
| | | * @LastEditTime : 2025-06-25 16:23:45 |
| | | * @FilePath : \src\views\device\index.vue |
| | | * @Description : |
| | | * Copyright 2025 OBKoro1, All Rights Reserved. |
| | | * 2025-04-27 21:01:20 |
| | | --> |
| | | <template> |
| | | <basic-container> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapGetters } from 'vuex'; |
| | | import airport from './airport.vue'; |
| | | import fly from './fly.vue'; |
| | | import { mapGetters } from 'vuex' |
| | | import airport from './airport.vue' |
| | | import fly from './fly.vue' |
| | | export default { |
| | | components: { airport, fly }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | activeName: '1', |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permission']), |
| | | permissionList() { |
| | | return {}; |
| | | permissionList () { |
| | | return {} |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(','); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(',') |
| | | }, |
| | | }, |
| | | created(){ |
| | | created () { |
| | | // 默认打开机场页面 |
| | | }, |
| | | methods: { |
| | | handleClick(tab, event) { |
| | | handleClick (tab, event) { |
| | | if (tab.index == 1) { |
| | | this.$refs.fly.init(); |
| | | this.$refs.fly.init() |
| | | } |
| | | if (tab.index == 0) { |
| | | this.$refs.airport.init(); |
| | | this.$refs.airport.init() |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
| | | <style lang="scss" scoped> |
| | | ::v-deep(.el-tabs) { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .el-tabs__header { |
| | | order: 1; |
| | | } |
| | | |
| | | .el-tabs__content { |
| | | order: 2; |
| | | } |
| | | |
| | | .el-tabs__content { |
| | | height: 0; |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .el-tab-pane { |
| | | height: 0; |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model:page="page" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" |
| | | :permission="permissionList" :before-open="beforeOpen" v-model:page="page" @search-change="searchChange" |
| | | @search-reset="searchReset" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getApiList, getApiLogs } from '@/api/logs'; |
| | | import { mapGetters } from 'vuex'; |
| | | import { getApiList, getApiLogs } from '@/api/logs' |
| | | import { mapGetters } from 'vuex' |
| | | |
| | | export default { |
| | | data() { |
| | | data () { |
| | | return { |
| | | form: {}, |
| | | selectionList: [], |
| | |
| | | delBtn: false, |
| | | menuWidth: 120, |
| | | dialogType: 'drawer', |
| | | |
| | | height: 'auto', |
| | | calcHeight: 0, |
| | | |
| | | column: [ |
| | | { |
| | | label: '操作名称', |
| | |
| | | label: '操作时间', |
| | | prop: 'daterange', |
| | | type: 'daterange', |
| | | search:true, |
| | | search: true, |
| | | searchRange: true, |
| | | searchSpan:6, |
| | | searchSpan: 6, |
| | | format: 'YYYY-MM-DD', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | startPlaceholder: '开始时间', |
| | | endPlaceholder: '结束时间', |
| | | viewDisplay:false, |
| | | viewDisplay: false, |
| | | hide: true, |
| | | rules: [ |
| | | { |
| | |
| | | ], |
| | | }, |
| | | data: [], |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | ...mapGetters(['permission']), |
| | | permissionList() { |
| | | permissionList () { |
| | | return { |
| | | viewBtn: this.validData(this.permission.log_api_view, false), |
| | | }; |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | beforeOpen(done, type) { |
| | | beforeOpen (done, type) { |
| | | if (['edit', 'view'].includes(type)) { |
| | | getApiLogs(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | this.form = res.data.data |
| | | }) |
| | | } |
| | | done(); |
| | | done() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { daterange } = this.query; |
| | | onLoad (page, params = {}) { |
| | | const { daterange } = this.query |
| | | let values = { |
| | | ...params, |
| | | ...this.query, |
| | | }; |
| | | } |
| | | if (daterange) { |
| | | values = { |
| | | ...values, |
| | | startTime: daterange[0], |
| | | endTime: daterange[1], |
| | | }; |
| | | values.daterange = null; |
| | | } |
| | | values.daterange = null |
| | | } |
| | | this.loading = true; |
| | | this.loading = true |
| | | getApiList(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | :deep(){ |
| | | .avue-crud__body{ |
| | | .el-form{ |
| | | height: 745px; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | <style scoped lang="scss"></style> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | v-model:page="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" :permission="permissionList" |
| | | :before-open="beforeOpen" v-model="form" ref="crud" @row-del="rowDel" @search-change="searchChange" |
| | | @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange" |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <template #menu-left> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | v-if="permission.attach_upload" |
| | | icon="el-icon-upload" |
| | | @click="handleUpload" |
| | | >上 传 |
| | | <el-button type="primary" plain v-if="permission.attach_upload" icon="el-icon-upload" @click="handleUpload">上 传 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.attach_delete" |
| | | @click="handleDelete" |
| | | >删 除 |
| | | <el-button type="danger" icon="el-icon-delete" plain v-if="permission.attach_delete" @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template #menu="scope"> |
| | | <el-button |
| | | type="primary" |
| | | text |
| | | icon="el-icon-download" |
| | | v-if="permission.attach_download" |
| | | @click="handleDownload(scope.row)" |
| | | >下载 |
| | | <el-button type="primary" text icon="el-icon-download" v-if="permission.attach_download" |
| | | @click="handleDownload(scope.row)">下载 |
| | | </el-button> |
| | | </template> |
| | | <template #attachSize="{ row }"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, getDetail, removeAttachAndData } from '@/api/resource/attach'; |
| | | import { mapGetters } from 'vuex'; |
| | | import func from '@/utils/func'; |
| | | import { getList, getDetail, removeAttachAndData } from '@/api/resource/attach' |
| | | import { mapGetters } from 'vuex' |
| | | import func from '@/utils/func' |
| | | |
| | | export default { |
| | | data() { |
| | | data () { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | |
| | | // grid: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | |
| | | height: 'auto', |
| | | calcHeight: 0, |
| | | |
| | | column: [ |
| | | { |
| | | label: '附件地址', |
| | |
| | | label: '附件名称', |
| | | prop: 'name', |
| | | search: true, |
| | | searchSpan:4, |
| | | searchSpan: 4, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: '附件原名', |
| | | prop: 'originalName', |
| | | search: true, |
| | | searchSpan:4, |
| | | searchSpan: 4, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: '附件拓展名', |
| | | prop: 'extension', |
| | | search: true, |
| | | searchSpan:4, |
| | | searchLabelWidth:95, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 95, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: '创建日期', |
| | | prop: 'daterange', |
| | | type: 'daterange', |
| | | search:true, |
| | | search: true, |
| | | searchRange: true, |
| | | searchSpan:6, |
| | | searchSpan: 6, |
| | | format: 'YYYY-MM-DD', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | startPlaceholder: '开始时间', |
| | | endPlaceholder: '结束时间', |
| | | viewDisplay:false, |
| | | viewDisplay: false, |
| | | hide: true, |
| | | rules: [ |
| | | { |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | } |
| | | }, |
| | | computed: { |
| | | func() { |
| | | return func; |
| | | func () { |
| | | return func |
| | | }, |
| | | ...mapGetters(['permission']), |
| | | permissionList() { |
| | | permissionList () { |
| | | return { |
| | | addBtn: false, |
| | | editBtn: false, |
| | | viewBtn: false, |
| | | delBtn: this.validData(this.permission.attach_delete, false), |
| | | }; |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(','); |
| | | ids.push(ele.id) |
| | | }) |
| | | return ids.join(',') |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleUpload() { |
| | | this.attachBox = true; |
| | | handleUpload () { |
| | | this.attachBox = true |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.attachBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | uploadAfter (res, done, loading, column) { |
| | | window.console.log(column) |
| | | this.attachBox = false |
| | | this.refreshChange() |
| | | done() |
| | | }, |
| | | handleDownload(row) { |
| | | window.open(`${row.link}`); |
| | | handleDownload (row) { |
| | | window.open(`${row.link}`) |
| | | }, |
| | | rowDel(row) { |
| | | rowDel (row) { |
| | | this.$confirm('确定将选择数据及对应的文件删除?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | return removeAttachAndData(row.id); |
| | | return removeAttachAndData(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | handleDelete() { |
| | | handleDelete () { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning('请选择至少一条数据'); |
| | | return; |
| | | this.$message.warning('请选择至少一条数据') |
| | | return |
| | | } |
| | | this.$confirm('确定将选择数据及对应的文件删除?', { |
| | | confirmButtonText: '确定', |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | return removeAttachAndData(this.ids); |
| | | return removeAttachAndData(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }) |
| | | this.$refs.crud.toggleSelection() |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | beforeOpen (done, type) { |
| | | if (['edit', 'view'].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | this.form = res.data.data |
| | | }) |
| | | } |
| | | done(); |
| | | done() |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | searchReset () { |
| | | this.query = {} |
| | | this.onLoad(this.page) |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | searchChange (params, done) { |
| | | this.query = params |
| | | this.page.currentPage = 1 |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | selectionChange (list) { |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | selectionClear () { |
| | | this.selectionList = [] |
| | | this.$refs.crud.toggleSelection() |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const { daterange } = this.query; |
| | | onLoad (page, params = {}) { |
| | | const { daterange } = this.query |
| | | let values = { |
| | | ...params, |
| | | ...this.query, |
| | | }; |
| | | } |
| | | if (daterange) { |
| | | values = { |
| | | ...values, |
| | | startTime: daterange[0], |
| | | endTime: daterange[1], |
| | | }; |
| | | values.daterange = null; |
| | | } |
| | | values.daterange = null |
| | | } |
| | | this.loading = true; |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | const data = res.data.data |
| | | this.page.total = data.total |
| | | this.data = data.records |
| | | this.loading = false |
| | | this.selectionClear() |
| | | }) |
| | | }, |
| | | }, |
| | | }; |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | :deep(){ |
| | | .avue-crud__body{ |
| | | .el-form{ |
| | | height: 745px; |
| | | overflow: auto; |
| | | } |
| | | :deep() { |
| | | .avue-crud__body { |
| | | .el-form { |
| | | height: 745px; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | </style> |