zhuangyunsheng 1 час назад
Родитель
Сommit
3bd67e17c2

+ 2 - 2
.env.development

@@ -5,8 +5,8 @@ NODE_ENV = development
 VUE_APP_TITLE = EasyDo_AiBox
 
 # 接口地址
-VUE_APP_API_BASEURL = http://192.168.101.242/
-VUE_APP_IMAGE_BASEURL = http://192.168.101.242/
+VUE_APP_API_BASEURL = http://192.168.101.248/
+VUE_APP_IMAGE_BASEURL = http://192.168.101.248/
 
 # 本地端口
 VUE_APP_PORT = 6060

+ 0 - 20
src/api/model/speaker.js

@@ -1,20 +0,0 @@
-import config from "@/config"
-import http from "@/utils/request"
-
-export default {
-	list: {
-		url: `${config.API_URL}/api/getBroadcast`,
-		name: "音柱配置",
-		get: async function (data = {}) {
-			return await http.post(this.url, data);
-		}
-	},
-
-	edit: {
-		url: `${config.API_URL}/api/updateBroadcast`,
-		name: "音柱配置",
-		post: async function (data = {}) {
-			return await http.post(this.url, data);
-		}
-	}
-}

+ 0 - 5
src/config/route.js

@@ -14,11 +14,6 @@ const routes = [
         meta: { title: "NVR配置", icon: "nvr" },
         name: "NVR配置",
         path: "/nvr"
-    }, {
-        component: "speaker",
-        meta: { title: "音柱配置", icon: "speaker" },
-        name: "音柱配置",
-        path: "/speaker"
     }, {
         component: "channel",
         meta: { title: "摄像头列表", icon: "channel" },

+ 2 - 11
src/views/channel/channel.vue

@@ -16,8 +16,8 @@
 			<el-form-item v-if="$TOOL.data.get('CONFIG_TYPE') == 2" label="通道号" prop="channel">
 				<el-input-number v-model="form.channel" :min="1" :max="99" placeholder="输入通道号" :controls="false" />
             </el-form-item>
-            <el-form-item label="音柱MAC地址" prop="broadcast" :rules="{ required: speakerOnline == 1, message: '请输入音柱MAC地址' }">
-                <el-input v-model="form.broadcast" placeholder="输入音柱MAC地址"></el-input>
+            <el-form-item label="音柱IP地址">
+                <el-input v-model.trim="form.broadcast" clearable placeholder="输入音柱IP地址"></el-input>
             </el-form-item>
 		</el-form>
 		<template #footer>
@@ -42,7 +42,6 @@
 				},
 				visible: false,
 				isSaveing: false,
-                speakerOnline: 0,
 
 				form: Object.assign({}, channelData),
 				rules: {
@@ -55,15 +54,7 @@
 			}
 		},
 
-        mounted() {
-            this.getBroadcast();
-        },
-
 		methods: {
-            getBroadcast() {
-                this.$API.speaker.list.get().then(res => this.speakerOnline = res.isOpen).catch(() => this.speakerOnline = 0);
-            },
-
 			/* 通道补0 */
 			formatChannel(num) {
 				if (num >= 10) return num;

+ 1 - 1
src/views/channel/index.vue

@@ -26,7 +26,7 @@
                     <el-table-column label="IP" prop="ip" align="center"></el-table-column>
                     <el-table-column label="用户名" prop="user" align="center"></el-table-column>
                     <el-table-column label="密码" prop="password" align="center"></el-table-column>
-                    <el-table-column label="音柱MAC地址" prop="broadcast" align="center"></el-table-column>
+                    <el-table-column label="音柱IP地址" prop="broadcast" align="center"></el-table-column>
                     <el-table-column label="状态" prop="status" align="center">
                         <template #default="scope">
                             <el-tag v-if="formatStatus(scope.$index)" type="success">在线</el-tag>

+ 2 - 2
src/views/config/main.js

@@ -46,8 +46,8 @@ export const channelData = {
     user: "",
     password: "",
     device: "",
-    channel: null,
-    broadcast: null
+    channel: "",
+    broadcast: ""
 }
 
 export const fullScreenPoints = [{ x: 0, y: 0 }, { x: 0, y: 1440 }, { x: 2560, y: 1440 }, { x: 2560, y: 0 }]

+ 0 - 87
src/views/speaker/index.vue

@@ -1,87 +0,0 @@
-<template>
-    <el-container class="aminui-main-container__table-main">
-        <el-header>
-            <div class="left-panel"><scTitle>音柱配置</scTitle></div>
-        </el-header>
-        <el-main class="nopadding">
-            <el-form ref="nvrForm" :model="speakerData" :rules="rules" label-width="140">
-                <el-form-item label="是否启用" required>
-                    <el-radio-group v-model="speakerData.isOpen">
-                        <el-radio :value="0">否</el-radio>
-                        <el-radio :value="1">是</el-radio>
-                    </el-radio-group>
-                </el-form-item>
-                <el-form-item label="盒子服务地址" prop="address">
-                    <el-input v-model="speakerData.address" placeholder="输入服务地址"></el-input>
-                </el-form-item>
-
-                <el-form-item class="btn-group-item">
-                    <el-button class="sc-button-primary" @click="table_edit">保存</el-button>
-                    <el-button class="sc-button-info" @click="reloadTable">取消</el-button>
-                </el-form-item>
-            </el-form>
-        </el-main>
-    </el-container>
-</template>
-
-<script>
-    export default {
-        data() {
-			return {
-				isSaveing: false,
-                speakerData: {
-                    isOpen: 0,
-                    address: null
-                },
-
-                rules: {
-					address: [{ required: true, message: "请输入服务地址" }]
-				}
-            }
-        },
-
-        mounted() {
-            this.reloadTable();
-        },
-
-		methods: {
-            reloadTable() {
-                this.$API.speaker.list.get().then(res => this.speakerData = Object.assign({}, res)).catch(() => this.speakerData = { isOpen: 0, address: null });
-            },
-
-			// 编辑配置
-			table_edit() {
-				this.$refs.nvrForm.validate(valid => {
-					if (valid) {
-						this.isSaveing = true;
-						this.$API.speaker.edit.post(this.speakerData).then(() => {
-							this.isSaveing = false;
-							this.$message.success("操作成功");
-                            this.reloadTable();
-						}).catch(() => this.isSaveing = false);
-					} else {
-						return false;
-					}
-				});
-			}
-        }
-    }
-</script>
-
-<style lang="scss" scoped>
-.aminui-main-container__table-main {
-    width: 100%;
-    padding: 15px;
-    overflow: auto;
-
-    .el-form {
-        width: 650px;
-        margin: 40px auto 0;
-
-        --el-disabled-bg-color: #fff;
-        --el-disabled-text-color: #000;
-        .el-form-item {margin-bottom: 24px;}
-        .el-form-item.btn-group-item :deep(.el-form-item__content) {justify-content: flex-end;}
-    }
-}
-</style>