优化代码

This commit is contained in:
wuxw 2024-07-19 14:59:15 +08:00
parent e7629b79e1
commit 842e3305c8
3 changed files with 44 additions and 27 deletions

20
app.js
View File

@ -43,20 +43,20 @@ let opts = {
}
// todo 测试环境 测试使用生产环境请用nginx带来
app.use('/callComponent', proxy('http://192.168.100.108:8088', opts));
app.use('/app', proxy('http://192.168.100.108:8088', opts));
app.use('/ws', createProxyMiddleware({
target: 'http://192.168.100.108:8008',
changeOrigin: true,
ws: true
}));
// app.use('/callComponent', proxy('http://192.168.100.108:8088', opts));
// app.use('/app', proxy('http://192.168.100.108:8088', opts));
// app.use('/ws', createProxyMiddleware({
// target: 'http://192.168.100.108:8008',
// changeOrigin: true,
// ws: true
// }));
// todo 本机 开发用生产环境请用nginx带来
// app.use('/ws', proxy('http://127.0.0.1:8008', opts));
// app.use('/callComponent', proxy('http://127.0.0.1:8008', opts));
// app.use('/app', proxy('http://127.0.0.1:8008', opts));
app.use('/ws', proxy('http://127.0.0.1:8008', opts));
app.use('/callComponent', proxy('http://127.0.0.1:8008', opts));
app.use('/app', proxy('http://127.0.0.1:8008', opts));
//app.listen(3000);
app.use(express.json());

View File

@ -1,34 +1,51 @@
<div>
<div class="row">
<div class="col-md-6">
<h6><span><vc:i18n name="我的摄像头" namespace="cameraControlVideo"></vc:i18n></span></h6>
<h6>
<vc:i18n name="我的摄像头" namespace="cameraControlVideo"></vc:i18n>
</h6>
</div>
<div class="col-md-6 text-right">
<button type="button" class="btn-white btn btn-sm margin-right-sm" v-on:click="_changeCameras()"><span><vc:i18n name="摄像头" namespace="cameraControlVideo"></vc:i18n></span>
<button type="button" class="btn-white btn btn-sm margin-right-sm" v-on:click="_changeCameras()">
<vc:i18n name="摄像头" namespace="cameraControlVideo"></vc:i18n>
</button>
<div class="btn-group" role="group" aria-label="Basic example">
<button type="button" class="btn btn-light btn-sm" v-bind:class="{'btn-primary': cameraControlVideoInfo.cameraCount == 4}" v-on:click="_changeCount(4)"><span><vc:i18n name="四路" namespace="cameraControlVideo"></vc:i18n></span>
</button>
<button type="button" class="btn btn-light btn-sm" v-bind:class="{'btn-primary': cameraControlVideoInfo.cameraCount == 6}" v-on:click="_changeCount(6)"><span><vc:i18n name="六路" namespace="cameraControlVideo"></vc:i18n></span>
</button>
<button type="button" class="btn btn-light btn-sm"
v-bind:class="{'btn-primary': cameraControlVideoInfo.cameraCount == 4}"
v-on:click="_changeCount(4)">
<vc:i18n name="四路" namespace="cameraControlVideo"></vc:i18n>
</button>
<button type="button" class="btn btn-light btn-sm"
v-bind:class="{'btn-primary': cameraControlVideoInfo.cameraCount == 6}"
v-on:click="_changeCount(6)">
<vc:i18n name="六路" namespace="cameraControlVideo"></vc:i18n>
</button>
</div>
</div>
</div>
<div class="row margin-top">
<!-- 2*2-->
<div class="col-md-6" v-if="cameraControlVideoInfo.cameraCount == 4" v-for="(item,index) in cameraControlVideoInfo.machines">
<div class="col-md-6" v-if="cameraControlVideoInfo.cameraCount == 4"
v-for="(item,index) in cameraControlVideoInfo.machines">
<div class="form-group">
<video :id="item.machineId" controls autoplay="autoplay" muted width="100%" height="400px" style="background-color: #000;"></video>
<span><span><vc:i18n name="摄像头" namespace="cameraControlVideo"></vc:i18n></span>{{item.machineName}}</span>
<video :id="item.machineId" controls autoplay="autoplay" muted width="100%" height="400px"
style="background-color: #000;"></video>
<span><span>
<vc:i18n name="摄像头" namespace="cameraControlVideo"></vc:i18n>
</span>{{item.machineName}}</span>
</div>
</div>
<div class="col-md-4" v-if="cameraControlVideoInfo.cameraCount == 6" v-for="(item,index) in cameraControlVideoInfo.machines">
<div class="col-md-4" v-if="cameraControlVideoInfo.cameraCount == 6"
v-for="(item,index) in cameraControlVideoInfo.machines">
<div class="form-group">
<video :id="item.machineId" controls autoplay="autoplay" muted width="100%" height="400px" style="background-color: #000;"></video>
<span><span><vc:i18n name="摄像头" namespace="cameraControlVideo"></vc:i18n></span>{{item.machineName}}</span>
<video :id="item.machineId" controls autoplay="autoplay" muted width="100%" height="400px"
style="background-color: #000;"></video>
<span><span>
<vc:i18n name="摄像头" namespace="cameraControlVideo"></vc:i18n>
</span>{{item.machineName}}</span>
</div>
</div>
</div>
<vc:create path="property/chooseCamera"></vc:create>
</div>
</div>

View File

@ -2,9 +2,9 @@
<div class="ibox ">
<div class="ibox-title">
<h5><span>
<vc:i18n name="查询条件"></vc:i18n>
</span></h5>
<h5>
<vc:i18n name="查询条件"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
</div>
@ -20,7 +20,7 @@
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请选择用户名称','integralGiftDetailManage')"
v-model="integralGiftDetailManageInfo.conditions.userName" class=" form-control">
v-model="integralGiftDetailManageInfo.conditions.userNameLike" class=" form-control">
</div>
</div>
<div class="col-sm-2">