Browse Source

详情页面角色筛选

yun
douzhuo 2 years ago
parent
commit
87014362ee
2 changed files with 110 additions and 149 deletions
  1. +108
    -147
      pages/mine/details2.vue
  2. +2
    -2
      utils/domain.js

+ 108
- 147
pages/mine/details2.vue View File

@@ -15,11 +15,9 @@
@change="tapspagek" inactive-color="#b1b1b1" active-color="#008ef2" :list="tablist"
:is-scroll="true">
</u-tabs> -->
<block v-for="(item,index) in tablist">
<view class="mytab" :key="index" @click="tapspagek(item, index)">
<view class="tab-item" :class="{tabActive: item.select}">{{item.name}}</view>
</view>
</block>
<view class="mytab" v-for="(item,index) in tablist" :key="index" @click="tapspagek(item, index)">
<view class="tab-item" :class="{tabActive: item.select}">{{item.name}}</view>
</view>
</view>
<view class="headpade">
<view class="biaoji" @tap="tagtap()">标记</view>
@@ -545,7 +543,8 @@
guanjianciishow: false,
Aimg: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAACqVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/f3////9/f39/f3////////9/f3////////////9/f3////9/f39/f3////9/f3////////9/f3////9/f3////////////////9/f39/f3////////9/f39/f3////9/f39/f3////////9/f39/f3////////9/f39/f39/f3////////////////+/v7+/v7////+/v7////+/v7////+/v7+/v7////////+/v7+/v7////+/v7////+/v7////////////////////////////+/v7////+/v7////+/v7+/v7////////////+/v7////+/v7////+/v7+/v7////////+/v7////+/v7////////+/v7////////+/v7////+/v7+/v7+/v7////////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7+/v7////+/v5jdC9iAAAA4nRSTlMAAQIDBAUGBwgLDA0ODxARExQVFhgbHB4fICEiIyQmJygpKy4wMTIzNDY3ODk6Oz0+P0BBQkRGR0lKTE5PUFFTVFVXWFlcXV9gYWJj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SaAt1UCm2CzpOk6QTonqfQJdBdSKGkD5pKWqZCU7iHQtdB10KxWmjOpqUJmtMp9gB091LsIWiCtCyFZiHFXoZuHcW+hiZGy0vQvE2xT6DbTolKAI/R8hmA4SmKdUG3jxIhAG/QkigAZlAi6QJQTJk2AF1MGwXcRRkfgJGU2V8EHzP8wBeUqQQwllKTcCozpuFESk0AMJNSC3AxM8KYT6lpAFootRGLmLEQ6ynVCCBAqcSQ1cy4f8ghSs0HcMzvlKp+lRmvVFMqNQ6aaIoyd3Yy49vllOmuh+H4WZFIpFnTpJmjadTM1oQ1oVAgFNQENA0N9f01BIKh8OzGOU3NkbmXzwuV41/wNztgHKhu7WKTAAAAAElFTkSuQmCC",
tablist: [],
roleindex: 0,
roleindex: 0, // 当前选中的角色标记点(旧版本的)
roleSelectArr: [], // 当前选中的角色标记点
roleindexbiaoji: 0,
audioPlay: false, //当前的播放状态控制
sliderValue: 0, //进度条最小值
@@ -658,7 +657,6 @@
this.customerId = options.customerId;
this.KeyWordsfraction = options.wordFraction == 'undefined' ? 0 : options.wordFraction;
this.itemobj = uni.getStorageSync('searchobj');
console.log(this.itemobj)
this.stateisshow = options.stateisshow;
this.$zaudio.autoPlay = true
//注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响;
@@ -709,10 +707,11 @@
if (this.userInfo.dataCode == 6) {
this.jiaoseshow = false
}
this.roleindex = 0;
// this.roleindex = 0;
if (this.stateisshow == 2) {
this.infos = this.itemobj;
}!this.isPageHide && this.init(this.infos);
}
!this.isPageHide && this.init(this.infos);
this.gituserlist()

},
@@ -1146,116 +1145,105 @@
console.log(res)
})
},
//分角色
tapspagek(item, index) {
console.log(item, index)
item.select = !item.select
// this.roleindex = index;
// this.newluyinList = [];
// this.fenjiaoseunfo()
// this.$forceUpdate()
},
//------------------------------------分角色标记刷新
fenjiaoseunfo() {
var bgcd = this.playNow * 1000;
this.newluyinList = [];
this.dialogList = [];
let voFlagValue;
if (this.roleindex == 0) {
voFlagValue = 0
tapspagek(data, index) {
if (index == 0) this.resetTabList();
else this.resetAll();
data.select = !data.select
this.roleSelectArr = []
if (index != 0) {
this.tablist.forEach(item => {
if (item.select) {
this.roleSelectArr.push(item.speaker)
}
})
} else {
voFlagValue = 1
this.roleSelectArr.push(0)
}
let tempRoleIndex;
if (this.isSw) {
if (this.roleindex == this.tablist.length - 1) {
tempRoleIndex = 0
this.fenjiaoseunfo()
},
// 选中全部时互斥全部选项与角色选项
resetTabList() {
this.tablist.forEach(item => {
item.select = false
})
},
// 选中角色时将全部反选
resetAll() {
this.tablist[0].select = false
},
// 生成角色列表
creatTabList(num) {
for (var i = 0; i <= num; i++) {
if (i === 0) {
this.tablist.push({
name: '全部',
select: false,
speaker: i
})
} else {
tempRoleIndex = this.roleindex
this.tablist.push({
name: String.fromCharCode(i + 64),
select: false,
speaker: i
})
}
} else {
tempRoleIndex = this.roleindex
}
uni.request({
url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id +
"&bg=" + bgcd + "&speaker=" + tempRoleIndex + "&voFlag=" + voFlagValue +
'&num=50', //仅为示例,并非真实接口地址。
method: "GET",
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
this.tablist = [];
let jsonInfo = JSON.parse(data.data.data.audioContent);
for (var i = 0; i <= data.data.data.speakerNum; i++) {
if (i === 0) {
this.tablist.push({
name: '全部',
select: true
})
} else {
this.tablist.push({
name: String.fromCharCode(i + 64),
select: false
})
}
}

if (data.data.data.speaker == null) {
this.roleindexbiaoji = 0;
this.dshfkjsdkksodofydwfkhwdfkjh = 0;
} else {
if (data.data.data.viewNameFlag == 1) {
this.tablist[data.data.data.speaker].name = this.tablist[data.data.data
.speaker]
.name;
} else {
this.tablist[data.data.data.speaker].name = this.tablist[data.data.data
.speaker]
.name + "顾问";
}
this.roleindexbiaoji = data.data.data.speaker - 1;
this.dshfkjsdkksodofydwfkhwdfkjh = data.data.data.speaker - 1;
}

if (data.data.data.viewNameFlag == 1) {
let p = [{
name: '顾问'
}]
this.tablist = [...this.tablist, ...p]
}

if (this.roleindex > this.tablist.length - 1) {
this.roleindex = this.tablist.length - 1
this.fenjiaoseunfo()
}


this.speaker = data.data.data.speaker;
//上拉标记点
this.textindex = data.data.data.index;
//下拉标记点
this.toptextindex = data.data.data.index;
this.isShowMark = data.data.data.viewNameFlag;
jsonInfo.forEach(item => {
item.message = JSON.parse(item.onebest)
item.backindex = this.csdFileindex
console.log(item.message, '123u8123u89i123io')
item.message.forEach(info => {
info.checked = false
})
},
// 选中选中的标记
resetTabListChoose() {
this.tablist.forEach(item => {
if (this.roleSelectArr.findIndex(obj => obj == item.speaker) != -1) {
item.select = true
}
})
},
// 获取flag
getVoFlagValue() {
return this.roleSelectArr.findIndex(item => item == 0) == -1 ? 1 : 0
},
//分角色标记刷新
fenjiaoseunfo() {
this.newluyinList = [];
this.dialogList = [];
let speakerStr = ''
if (this.roleSelectArr.findIndex(item => item == 0) == -1) {
speakerStr = this.roleSelectArr.join(',')
}
let str = `?corpusId=${this.luyinList[this.csdFileindex].id}&bg=${this.playNow * 1000}&speaker=0&voFlag=${this.getVoFlagValue()}&num=50&speakerStr=${speakerStr}`
this.$u.get(`${config.service.getCorpusAnal}${str}`).then(res => {
let jsonInfo = JSON.parse(res.audioContent);
//上拉标记点
this.textindex = res.index;
//下拉标记点
this.toptextindex = res.index;
jsonInfo.forEach(item => {
item.message = JSON.parse(item.onebest)
item.backindex = this.csdFileindex
item.message.forEach(info => {
info.checked = false
})
this.newluyinList = jsonInfo;
if (this.textindex == null) {
return
} else {
this.dialogList.push(jsonInfo[this.textindex]);
}
})
this.newluyinList = jsonInfo;
if (this.textindex == null) {
return
} else {
this.dialogList.push(jsonInfo[this.textindex]);
}
}).catch(e => {
console.log(e)
})
},
// 关键词搜索
toKeywordsearch() {
this.stateisshow = 1;
uni.navigateTo({
@@ -1263,7 +1251,8 @@
"&skpl=" + "1" + '&UpDateEvent=DETAILS2INIT'
})
},

// 播放器当前播放时间变化
TimeUpdate(currentTime) {
this.playNow = Math.ceil(currentTime)
if (this.dialogList.length == 0) {
@@ -1274,8 +1263,6 @@
for (let i = 0; i < message.length; i++) {
if (Math.floor(message[i].bg / 1000) <= this.playNow && this.playNow < Math.floor(message[i].ed /
1000)) {
console.log(message[i].bg, '我是active', message[i].ed, '我是currentTime', this.playNow)
console.log(message[i].onebest)
this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
break;
}
@@ -1752,8 +1739,7 @@
this.newluyinList = []
uni.request({
url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id +
"&bg=" + info.bg + "&speaker=" + this.roleindex + '&voFlag=0' +
'&num=50', //仅为示例,并非真实接口地址。
"&bg=" + info.bg + "&speaker=" + this.roleindex + '&voFlag=0' + '&num=50', //仅为示例,并非真实接口地址。
method: "GET",
header: {
'content-type': 'application/json',
@@ -1761,53 +1747,27 @@
},
success: (data) => {
this.LOADING = false
this.isShowMark = data.data.data.viewNameFlag
this.tablist = [];
this.roleindexbiaoji = 0;
let jsonInfo = JSON.parse(data.data.data.audioContent);

for (var i = 0; i <= data.data.data.speakerNum; i++) {
if (i === 0) {
this.tablist.push({
name: '全部',
select: true,
})
} else {
this.tablist.push({
name: String.fromCharCode(i + 64),
select: false,
})
}
}
this.creatTabList(data.data.data.speakerNum)
this.tablist[0].select = true // 默认选中第一个
if (data.data.data.speaker == null) {
this.dshfkjsdkksodofydwfkhwdfkjh = 0;
} else {
if (data.data.data.viewNameFlag == 1) {
this.tablist[data.data.data.speaker].name = this.tablist[data.data.data
.speaker].name;
} else {
if (data.data.data.viewNameFlag != 1) {
this.tablist[data.data.data.speaker].name = this.tablist[data.data.data
.speaker].name + "顾问";
}
this.roleindexbiaoji = data.data.data.speaker - 1;
this.dshfkjsdkksodofydwfkhwdfkjh = data.data.data.speaker - 1;
}

if (data.data.data.viewNameFlag == 1) {
let p = [{
name: '顾问'
}]
this.tablist = [...this.tablist, ...p]
this.isSw = true
} else {
this.isSw = false
}

this.speaker = data.data.data.speaker;
//上拉标记点
this.textindex = data.data.data.index;
//下拉标记点
this.toptextindex = data.data.data.index;
jsonInfo.forEach(item => {
item.message = JSON.parse(item.onebest)
item.backindex = this.csdFileindex;
@@ -2090,6 +2050,8 @@
display: flex;
align-items: center;



.headovfu {
flex: 1;
height: 88rpx;
@@ -2099,7 +2061,6 @@

.mytab {
margin-left: 20rpx;
flex-shrink: 0;

.tab-item {
padding: 0 20rpx;
@@ -2930,4 +2891,4 @@
background: #2BC805 !important;
color: #FFFFFF;
}
</style>
</style>

+ 2
- 2
utils/domain.js View File

@@ -1,8 +1,8 @@
// http.js使用域名
const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试
// const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试
// const baseUrl = 'http://127.0.0.1:8080/autoSR/api'; // 本地
// const baseUrl = 'http://192.168.31.169:8080/autoSR/api'; // 长龙
// const baseUrl = 'http://192.168.31.149:9090/api'; // 盛浩
const baseUrl = 'http://192.168.31.149:9090/api'; // 盛浩
// const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式
// const baseUrl = 'https://hfju.com/api'; // 数智正式
// const baseUrl = 'https://xitong.pachira.cn/api'; // AI营销辅助 普强使用


Loading…
Cancel
Save