Browse Source

Merge branch 'dev'

tid1509
刘嘉炜 1 year ago
parent
commit
97f29d2efa
  1. 81
      src/subpackage/blacklist/pages/abnormal_list/abnormal_list.vue
  2. 8
      src/subpackage/device/js/device_fun.js
  3. 68
      src/subpackage/device/pages/audio_manage/audio_manage.vue

81
src/subpackage/blacklist/pages/abnormal_list/abnormal_list.vue

@ -12,13 +12,20 @@
</picker> </picker>
</view> </view>
<view class="al-date"> <view class="al-date">
<picker :range="timeTabs" @change="timeTabChange" range-key="name">
<view class="ad-content">
<view class="ac-txt">{{ curTimeTab.name || '-' }}</view>
<image class="ac-icon" mode="aspectFit" src="/subpackage/blacklist/static/images/triangle.png"></image>
</view>
</picker>
<picker mode="date" @change="dateChange"> <picker mode="date" @change="dateChange">
<view class="ad-content"> <view class="ad-content">
<view class="ac-txt">核销日期{{ curDate || '' }}</view>
<view class="ac-txt">{{ curDate || '' }}</view>
<image class="ac-icon" mode="aspectFit" src="/subpackage/blacklist/static/images/triangle.png"></image> <image class="ac-icon" mode="aspectFit" src="/subpackage/blacklist/static/images/triangle.png"></image>
</view> </view>
</picker> </picker>
</view> </view>
<view class="al-list"> <view class="al-list">
<view class="al-item" v-for="(e, i) in blackLs" :key="i"> <view class="al-item" v-for="(e, i) in blackLs" :key="i">
<view class="al-title">{{ e.extension.stadium_name || '-' }}</view> <view class="al-title">{{ e.extension.stadium_name || '-' }}</view>
@ -39,6 +46,9 @@
<view class="ai-txt">核销时间{{ e.verify_time || '-' }}</view> <view class="ai-txt">核销时间{{ e.verify_time || '-' }}</view>
</view> </view>
<view class="ai-line"> <view class="ai-line">
<view class="ai-txt">抓拍时间{{ e.img_time || '-' }}</view>
</view>
<view class="ai-line">
<view class="ai-txt">抓拍图片</view> <view class="ai-txt">抓拍图片</view>
<view class="ai-img"> <view class="ai-img">
<image <image
@ -64,38 +74,67 @@
import server from '../../js/server'; import server from '../../js/server';
import util from '../../../../utils/util'; import util from '../../../../utils/util';
import { BLACKLIST_API } from '../../js/api'; import { BLACKLIST_API } from '../../js/api';
/**
*
* 20231129
* 接口参数 verify_time -> img_time
* 核销日期 -> 抓拍日期
* 新增 抓拍时间
*
* 20231130
* 新增核销日期和拍照日期切换
*
* */
let _timeTabs = [ { name: '抓拍日期', label: 'img_time' }, { name: '核销日期', label: 'verify_time' }, ];
export default { export default {
data(){ data(){
return { return {
timeTabs: _timeTabs,
stadiumLs: [], stadiumLs: [],
selectStadium: {}, selectStadium: {},
curDate: '', curDate: '',
blackLs: [], blackLs: [],
page: 1
page: 1,
curTimeTab: _timeTabs[0] || {},
} }
}, },
async onLoad(options){ async onLoad(options){
try{ try{
let _date = this.curDate = util.formatDate({}); let _date = this.curDate = util.formatDate({});
let _stadiumLs = await this.getStoreList({}); let _stadiumLs = await this.getStoreList({});
let { curTimeTab } = this;
this.getRecords({ this.getRecords({
brand_id: options.brand_id, brand_id: options.brand_id,
verify_time: _date
[ curTimeTab?.label || '-' ]: _date
}); });
}catch(err){ }catch(err){
console.warn('get records ls err --->', err); console.warn('get records ls err --->', err);
} }
}, },
onReachBottom(){ onReachBottom(){
let { selectStadium, curDate, page } = this;
let { selectStadium, curDate, page, curTimeTab } = this;
this.getRecords({ this.getRecords({
brand_id: selectStadium.brand_id, brand_id: selectStadium.brand_id,
stadium_id: selectStadium.id, stadium_id: selectStadium.id,
verify_time: curDate,
[ curTimeTab?.label || '-' ]: curDate,
page: ++page page: ++page
}) })
}, },
methods: { methods: {
timeTabChange(e){
let { value } = e.detail || {};
let { timeTabs, curDate, selectStadium } = this;
this.blackLs = [];
this.page = 1;
this.curTimeTab = timeTabs[value] || {};
this.getRecords({
brand_id: selectStadium.brand_id,
stadium_id: selectStadium.id,
[ timeTabs[value]?.label || '-' ]: curDate,
})
},
previewImg(url){ previewImg(url){
uni.previewImage({ urls: [url] }); uni.previewImage({ urls: [url] });
}, },
@ -105,15 +144,19 @@ export default {
stadium_id = '', stadium_id = '',
page = 1, page = 1,
page_size = 10, page_size = 10,
verify_time = ''
verify_time = '',
img_time = '',
}){ }){
util.showLoad(); util.showLoad();
server.get({
let _qry = {
authority, brand_id, page, page_size,
stadium_id: stadium_id || ''
}
if(img_time)_qry['img_time'] = img_time;
if(verify_time)_qry['verify_time'] = verify_time;
server.post({
url: BLACKLIST_API.identifyRecords, url: BLACKLIST_API.identifyRecords,
data: {
authority, brand_id, page, page_size,
stadium_id: stadium_id || '', verify_time
},
data: _qry,
failMsg: '加载列表失败!' failMsg: '加载列表失败!'
}) })
.then(res => { .then(res => {
@ -127,7 +170,7 @@ export default {
}) })
}, },
dateChange(e){ dateChange(e){
let { selectStadium } = this;
let { selectStadium, curTimeTab } = this;
let _date = e.detail.value || '-' let _date = e.detail.value || '-'
this.curDate = _date; this.curDate = _date;
this.page = 1; this.page = 1;
@ -135,11 +178,11 @@ export default {
this.getRecords({ this.getRecords({
brand_id: selectStadium.brand_id, brand_id: selectStadium.brand_id,
stadium_id: selectStadium.id, stadium_id: selectStadium.id,
verify_time: _date,
[ curTimeTab?.label || '-' ]: _date,
}) })
}, },
stadiumChange(e){ stadiumChange(e){
let { stadiumLs, curDate } = this;
let { stadiumLs, curDate, curTimeTab } = this;
let _curStadium = stadiumLs[e.detail.value] || {}; let _curStadium = stadiumLs[e.detail.value] || {};
this.selectStadium = _curStadium; this.selectStadium = _curStadium;
this.page = 1; this.page = 1;
@ -147,7 +190,7 @@ export default {
this.getRecords({ this.getRecords({
brand_id: _curStadium.brand_id, brand_id: _curStadium.brand_id,
stadium_id: _curStadium.id, stadium_id: _curStadium.id,
verify_time: curDate,
[ curTimeTab?.label || '-' ]: curDate,
}) })
}, },
operateBtn(e, idx){ operateBtn(e, idx){
@ -270,6 +313,13 @@ export default {
} }
.al-date{ .al-date{
padding: 0 24upx; padding: 0 24upx;
@include centerFlex(flex-start);
.ad-name{
line-height: 44upx;
font-weight: 500;
font-size: 32upx;
color: #1a1a1a;
}
.ad-content{ .ad-content{
@include centerFlex(flex-start); @include centerFlex(flex-start);
.ac-txt{ .ac-txt{
@ -279,6 +329,7 @@ export default {
color: #1a1a1a; color: #1a1a1a;
} }
.ac-icon{ .ac-icon{
margin-right: 14upx;
flex-grow: 0; flex-grow: 0;
flex-shrink: 0; flex-shrink: 0;
margin-left: 16upx; margin-left: 16upx;

8
src/subpackage/device/js/device_fun.js

@ -11,12 +11,12 @@ var DEVICE_FUN = {
场景: 目前需求只要求照明(中控状态更新,灯操控) 其它需要再对接 场景: 目前需求只要求照明(中控状态更新,灯操控) 其它需要再对接
注意: 涉及deviceApi.ouxuanac 接口的,理论上来说都需要做兼容去在逻辑中传入硬件信息判断是否是云中控 注意: 涉及deviceApi.ouxuanac 接口的,理论上来说都需要做兼容去在逻辑中传入硬件信息判断是否是云中控
*/ */
AC_filterCloudACData(data,switchInfo){
console.log("云中控参数检测 AC_filterCloudACData",data,switchInfo);
AC_filterCloudACData(data, switchInfo){
console.log("云中控参数检测 AC_filterCloudACData", data, switchInfo);
//处理云中控专用参数 //处理云中控专用参数
// 这里device是设备名 一旦出现云中控 设备id被 (OUXUANAC_CLOUD_+hardware_net_addr) 串起来的字符串覆盖 // 这里device是设备名 一旦出现云中控 设备id被 (OUXUANAC_CLOUD_+hardware_net_addr) 串起来的字符串覆盖
if(!!switchInfo&&switchInfo.hardware_connect_method=="YZK"){
data.device = "OUXUANAC_CLOUD_"+switchInfo.hardware_net_addr;
if(switchInfo?.hardware_connect_method=="YZK"){
data.device = "OUXUANAC_CLOUD_" + switchInfo.hardware_net_addr;
} }
return data return data

68
src/subpackage/device/pages/audio_manage/audio_manage.vue

@ -45,18 +45,6 @@
</view> </view>
</view> </view>
</block> </block>
<!-- <block v-else>
<view class="si-bottom" v-if="pageInfo.isOpen || pageInfo.isClose">
<view v-if="pageInfo.isOpen" @click="operateBtn({ switchInfo: e, status: 1 })">
<image mode="aspectFit" :src="pageInfo.openIcon || ''"></image>
<view>{{pageInfo.openName || '-'}}</view>
</view>
<view v-if="pageInfo.isClose" @click="operateBtn({ switchInfo: e, status: 0 })">
<image mode="aspectFit" :src="pageInfo.closeIcon || ''"></image>
<view>{{pageInfo.closeName || '-'}}</view>
</view>
</view>
</block> -->
</view> </view>
</view> </view>
@ -90,6 +78,13 @@
</template> </template>
<script> <script>
/**
* 20231129
* fix 语音发送云中控参数 AC_filterCloudACData
* 新增 value.text
*
*
* */
const recorderManager = uni.getRecorderManager(); const recorderManager = uni.getRecorderManager();
const innerAudioContext = uni.createInnerAudioContext(); const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true; innerAudioContext.autoplay = true;
@ -97,8 +92,11 @@
import store_name from '../../components/store_name/store_name'; import store_name from '../../components/store_name/store_name';
import deviceServer from '../../js/device_server'; import deviceServer from '../../js/device_server';
import deviceApi from '../../js/device_api'; import deviceApi from '../../js/device_api';
const showArr = {
import { mapState } from 'vuex';
import util from '../../../../utils/util';
import DEVICE_FUN from '../../js/device_fun.js';
const showArr = {
's14': { 's14': {
id: 14, id: 14,
name: '音响管理', name: '音响管理',
@ -111,14 +109,7 @@
hardware_type: 'AudioPlayer', hardware_type: 'AudioPlayer',
tips: "点击对应音响的麦克风可以进行说话,说话内容将通过音响播放。", tips: "点击对应音响的麦克风可以进行说话,说话内容将通过音响播放。",
}, },
} }
import {
mapState
} from 'vuex';
import util from '../../../../utils/util';
import DEVICE_FUN from '../../js/device_fun.js';
export default { export default {
components: { components: {
@ -148,7 +139,7 @@
hardware_type: this.pageInfo.hardware_type hardware_type: this.pageInfo.hardware_type
}) })
}
},
}, },
data() { data() {
return { return {
@ -161,7 +152,10 @@
voicePath: "", voicePath: "",
voiceUrl: "", voiceUrl: "",
}, },
voiceLevel:0
voiceLevel:0,
// 20231129 fix
curSwitch: null,
} }
}, },
onLoad(options) { onLoad(options) {
@ -305,14 +299,15 @@
"data": { "data": {
"name": "audio-player", "name": "audio-player",
"value": { "value": {
"url": _url
"url": _url,
"text": this.voicePadConfig?.txt || ''
} }
}, },
// "token": "f0d5c19b-b87e-11eb-bc7d-5254005df464" // "token": "f0d5c19b-b87e-11eb-bc7d-5254005df464"
} }
// //
if(_url)this.operateReq({ if(_url)this.operateReq({
data: _data
data: DEVICE_FUN.AC_filterCloudACData(_data, that.curSwitch),
}) })
}, },
@ -397,33 +392,12 @@
switchInfo, switchInfo,
status status
}) { }) {
this.curSwitch = switchInfo || {};
if (switchInfo.hardware_type === "AudioPlayer") return this.HandleVoiceOperate({ if (switchInfo.hardware_type === "AudioPlayer") return this.HandleVoiceOperate({
switchInfo, switchInfo,
status status
}); //0704 }); //0704
let _data = this.getOperateReqData({
switchInfo,
status
})
_data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
//->& 20201224 5
if (switchInfo.hardware_type === 'AccessControl' && status == 1) {
this.operateReq({
data: this.getOperateReqData({
switchInfo,
status: 0
}),
isTip: false,
isLoad: false
});
}
this.operateReq({
data: _data
});
}, 300, 300), }, 300, 300),
@ -519,7 +493,7 @@
// }) // })
//TODO , //TODO ,
// _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo); // _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
// ...
util.showLoad(); util.showLoad();
setTimeout(()=>util.hideLoad(),1000) setTimeout(()=>util.hideLoad(),1000)
}, 300, 300), }, 300, 300),

Loading…
Cancel
Save