Browse Source

修改样式

yunzhu
风继续吹 1 year ago
parent
commit
2aae7d66b8
1 changed files with 59 additions and 47 deletions
  1. +59
    -47
      pages/mine/details2.vue

+ 59
- 47
pages/mine/details2.vue View File

@@ -63,11 +63,11 @@
<text>常错词</text> <text>常错词</text>
</view> </view>
<view v-if="permissions.commonly3" class="tankuangcss-items" <view v-if="permissions.commonly3" class="tankuangcss-items"
@click="Addtheessence">
@click="publicEvents('sureRefinement')">
<image src="@/static/images/detail/icon3.png" mode=""></image> <image src="@/static/images/detail/icon3.png" mode=""></image>
<text>加精华</text> <text>加精华</text>
</view> </view>
<view class="tankuangcss-items" @click="Modifyrole(index,item)">
<view class="tankuangcss-items" @click="publicEvents('showRoleisshaw')">
<image src="@/static/images/detail/icon4.png" mode=""></image> <image src="@/static/images/detail/icon4.png" mode=""></image>
<text>修改角色</text> <text>修改角色</text>
</view> </view>
@@ -132,7 +132,7 @@
</view> </view>
<template v-else> <template v-else>
<view class="bottomboxs"> <view class="bottomboxs">
<view class="bottomboxs-item" @click="sureRefinement">确定</view>
<view class="bottomboxs-item" @click="surePublic">确定</view>
<view class="bottomboxs-item" @click="cancelAllAdd">取消</view> <view class="bottomboxs-item" @click="cancelAllAdd">取消</view>
</view> </view>
</template> </template>
@@ -197,9 +197,8 @@
<view class="jiajinghuatit">标记为顾问</view> <view class="jiajinghuatit">标记为顾问</view>
<view <view
style="width: 95%;display: flex;flex-wrap: wrap;margin: 0 auto;padding-top: 30rpx;padding-bottom: 30rpx;"> style="width: 95%;display: flex;flex-wrap: wrap;margin: 0 auto;padding-top: 30rpx;padding-bottom: 30rpx;">
<view class="viewclace" :class="roleindexbiaoji == index ? 'bosdttom' : ''"
@click="biaojixuanze(index)" v-for="(item,index) in tablist.slice(1,tablist.length)"
:key="index">
<view class="viewclace" v-for="(item,index) in tablists" :class="{bosdttom: item.checked}"
:key="item.name" @tap.stop="biaojixuanze(item)">
<view>{{item.name}}</view> <view>{{item.name}}</view>
</view> </view>
</view> </view>
@@ -673,6 +672,7 @@
prohibitedlist: [], prohibitedlist: [],
guanjianciishow: false, guanjianciishow: false,
tablist: [], tablist: [],
tablists: [], // 角色列表
roleindex: 0, roleindex: 0,


roleSelectArr: [0], // 当前选中的角色标记点 roleSelectArr: [0], // 当前选中的角色标记点
@@ -708,7 +708,6 @@
toptextindex: 0, //上拉 转写文件下标 toptextindex: 0, //上拉 转写文件下标
biojiisshow: false, biojiisshow: false,
speaker: '', speaker: '',
dshfkjsdkksodofydwfkhwdfkjh: 0,
userlistobj: {}, userlistobj: {},
Acquirecustomerintentlist: [], Acquirecustomerintentlist: [],
options1: [], options1: [],
@@ -769,6 +768,10 @@
projectId: uni.getStorageSync('buildingID').id, // 当前项目id projectId: uni.getStorageSync('buildingID').id, // 当前项目id
visitRecordNum: 1, // 默认到访次数 visitRecordNum: 1, // 默认到访次数
}, },


eventParams: '', // 触发的事件
consultant: '', // 顾问身份id字符串
}; };
}, },
computed: { computed: {
@@ -1104,32 +1107,33 @@
// 添加角色 // 添加角色
addRole() { addRole() {
this.tablist.push({ this.tablist.push({
name: String.fromCharCode(this.tablist.length + 64)
name: String.fromCharCode(this.tablist.length + 64),
checked: false,
}) })
}, },
rolexuanze(index) { rolexuanze(index) {
this.roleindexrow = index; this.roleindexrow = index;
}, },

// 修改角色
Modifyrole(dialog, item) {
this.roleisshaw = true;
this.roletiaoshu = dialog;
this.roleindexrow = this.dialogList[this.csdFileindex].message[this.roletiaoshu].speaker - 1;
showRoleisshaw() {
this.roleisshaw = true
}, },
// 修改角色
roletab() { roletab() {
// let itso=this.dialogList[this.csdFileindex].message[this.roletiaoshu];
let itso = Object.assign({}, this.dialogList[this.csdFileindex].message[this.roletiaoshu]);
itso.onebest = itso.onebest.replace(/<.*?>/ig, "");
this.$u.post("/corpus/updateRole", {
this.dialogList[this.csdFileindex].message.forEach(item => {
if (item.checked) {
item.speaker = this.roleindexrow + 1
}
})
this.$u.post("/corpus/batchUpdateRole", {
corpusId: this.luyinList[this.csdFileindex].id, corpusId: this.luyinList[this.csdFileindex].id,
transferContent: JSON.stringify([itso]),
transferContent: JSON.stringify(this.dialogList[this.csdFileindex].message),
speaker: this.roleindexrow + 1, speaker: this.roleindexrow + 1,
customerId: this.customerId customerId: this.customerId
}).then(res => { }).then(res => {
this.dialogList[this.csdFileindex].message[this.roletiaoshu].speaker = this.roleindexrow + 1 this.dialogList[this.csdFileindex].message[this.roletiaoshu].speaker = this.roleindexrow + 1
this.roleisshaw = false; this.roleisshaw = false;
this.cancelBeast() this.cancelBeast()
this.cancelAllAdd()
uni.showToast({ uni.showToast({
title: '修改成功', title: '修改成功',
duration: 2000 duration: 2000
@@ -1440,22 +1444,24 @@
}) })
}, },
//标记选择角色 //标记选择角色
biaojixuanze(index) {
this.roleindexbiaoji = index;
biaojixuanze(item) {
item.checked = !item.checked
this.$forceUpdate()
}, },
//标记顾问 //标记顾问
tagtap() { tagtap() {
this.tablists = this.tablist.slice(1, this.tablist.length)
this.biojiisshow = !this.biojiisshow; this.biojiisshow = !this.biojiisshow;
}, },
//取消标记 //取消标记
unmarktap() { unmarktap() {
this.biojiisshow = false; this.biojiisshow = false;
this.roleindexbiaoji = this.dshfkjsdkksodofydwfkhwdfkjh;
this.roleisshaw = false this.roleisshaw = false
}, },
//确认标记 //确认标记
Confirmthetag() { Confirmthetag() {
if (this.roleindexbiaoji == -1) {
let arr = this.tablists.filter(item => item.checked)
if (arr.lenght == 0) {
uni.showToast({ uni.showToast({
title: '请选择标记角色~', title: '请选择标记角色~',
duration: 2000 duration: 2000
@@ -1464,7 +1470,7 @@
} }
let params = { let params = {
id: this.luyinList[this.csdFileindex].id, id: this.luyinList[this.csdFileindex].id,
speaker: this.roleindexbiaoji + 1,
speaker: arr.map(item => { return item.speaker }).join(","),
customerId: this.customerId customerId: this.customerId
} }
this.$u.get(config.service.markConsultant, params).then((data) => { this.$u.get(config.service.markConsultant, params).then((data) => {
@@ -1522,13 +1528,15 @@
this.tablist.push({ this.tablist.push({
name: '全部', name: '全部',
select: false, select: false,
speaker: i
speaker: i,
checked: false,
}) })
} else { } else {
this.tablist.push({ this.tablist.push({
name: String.fromCharCode(i + 64), name: String.fromCharCode(i + 64),
select: false, select: false,
speaker: i
speaker: i,
checked: false,
}) })
} }
} }
@@ -1576,7 +1584,8 @@
this.roleSelectArr = [0] this.roleSelectArr = [0]
this.creatTabList(res.speakerNum) this.creatTabList(res.speakerNum)
this.tablist[0].select = true this.tablist[0].select = true
this.tablist[res.speaker].name = this.tablist[res.speaker].name + "顾问";
this.consultant = res.speaker
this.setConsultant()
} }
if (this.roleSelectArr.length == 0) { if (this.roleSelectArr.length == 0) {
this.tablist[0].select = true this.tablist[0].select = true
@@ -1591,7 +1600,17 @@
} }
}) })
}, },

// 设置顾问
setConsultant() {
let arr = this.consultant.split(',') || []
console.log(this.consultant,arr)
this.tablist.map(obj => {
if (arr.includes(obj.speaker.toString())) {
obj.name += '顾问'
}
})
},


toKeywordsearch() { toKeywordsearch() {
this.stateisshow = 1; this.stateisshow = 1;
@@ -1908,13 +1927,18 @@
}) })
}, },


//加精华
Addtheessence() {
// 触发事件
publicEvents(params) {
this.eventParams = params
this.refined = true this.refined = true
this.cancelBeast() this.cancelBeast()
}, },


// 重置选择加精的内容
surePublic() {
this[this.eventParams]()
},

// 重置选择的内容
cancelAllAdd() { cancelAllAdd() {
console.log('chufa') console.log('chufa')
this.dialogList.forEach(item => { this.dialogList.forEach(item => {
@@ -1964,15 +1988,7 @@
status: 1, status: 1,
startFile: this.duihuawenjianid, //对话所在录音文件id startFile: this.duihuawenjianid, //对话所在录音文件id
marketingId: this.biaoqianid, //对应一级父id marketingId: this.biaoqianid, //对应一级父id

// jjTransfer: this.changanitem.onebest, //选中对话
// endTime: this.changanitem.ed, //结束时间
// startTime: this.changanitem.bg, //开始时间

toDigestList: [], // 加精多选的内容 toDigestList: [], // 加精多选的内容
// jjTransfer: this.changanitem.onebest, //选中对话
// endTime: this.changanitem.ed, //结束时间
// startTime: this.changanitem.bg, //开始时间
} }
// 将数据筛选出来并排序并且翻转数据让后端获取第一条加精的数据在分点加精的学习列表使用 // 将数据筛选出来并排序并且翻转数据让后端获取第一条加精的数据在分点加精的学习列表使用
this.dialogList.forEach(items => { this.dialogList.forEach(items => {
@@ -2141,14 +2157,10 @@


this.creatTabList(data.data.data.speakerNum) this.creatTabList(data.data.data.speakerNum)
this.tablist[0].select = true // 默认选中第一个 this.tablist[0].select = true // 默认选中第一个
if (data.data.data.speaker == null) {
this.roleindexbiaoji = -1;
this.dshfkjsdkksodofydwfkhwdfkjh = -1;
} 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.speaker) {
this.consultant = data.data.data.speaker
this.setConsultant()
} }


//上拉标记点 //上拉标记点


Loading…
Cancel
Save