@@ -17,7 +17,10 @@ Vue.prototype.$zaudio = zaudio | |||||
Vue.prototype.$dayjs = dayjs; | Vue.prototype.$dayjs = dayjs; | ||||
Vue.prototype.$store = store; | Vue.prototype.$store = store; | ||||
import common from 'utils/common.js' | |||||
Vue.prototype.$noMultipleClicks = common.noMultipleClicks; | |||||
// 引入全局uView | // 引入全局uView | ||||
import uView from 'uview-ui' | import uView from 'uview-ui' | ||||
Vue.use(uView); | Vue.use(uView); | ||||
@@ -328,7 +328,25 @@ | |||||
<!-- 加入常错词 --> | <!-- 加入常错词 --> | ||||
<view class="zhezhoa" v-if="isshow2" @tap="Cancelout"></view> | <view class="zhezhoa" v-if="isshow2" @tap="Cancelout"></view> | ||||
<view class="bounced" v-if="isshow2"> | |||||
<u-modal v-model="isshow2" title="添加常错词" :show-cancel-button="true" @cancel="Cancelout" @confirm="Confirmtheexit"> | |||||
<view class="tian-view"> | |||||
<viwe class="tian-view-t1"></viwe> | |||||
<viwe class="tian-view-t2">常错词:</viwe> | |||||
<viwe class="tian-view-t3"> | |||||
<textarea :auto-height="true" type="text" v-model="thewrongword" :disabled="isNum" class="tian-input" placeholder="请输入" /> | |||||
</viwe> | |||||
</view> | |||||
<view class="tian-view" style="margin-bottom: 74rpx;"> | |||||
<viwe class="tian-view-t1"></viwe> | |||||
<viwe class="tian-view-t2">正确词:</viwe> | |||||
<viwe class="tian-view-t3"> | |||||
<input class="tian-input" v-model="reswrongword" type="text" placeholder="请输入" /> | |||||
</viwe> | |||||
</view> | |||||
</u-modal> | |||||
<!-- <view class="bounced" v-if="isshow2"> | |||||
<view class="tian-view"> | <view class="tian-view"> | ||||
<viwe class="tian-view-t1"></viwe> | <viwe class="tian-view-t1"></viwe> | ||||
<viwe class="tian-view-t2">常错词:</viwe> | <viwe class="tian-view-t2">常错词:</viwe> | ||||
@@ -347,7 +365,7 @@ | |||||
<view class="bounced3-1" @tap="Cancelout">取消</view> | <view class="bounced3-1" @tap="Cancelout">取消</view> | ||||
<view class="bounced3-2" @tap="Confirmtheexit">确认</view> | <view class="bounced3-2" @tap="Confirmtheexit">确认</view> | ||||
</view> | </view> | ||||
</view> | |||||
</view> --> | |||||
<!-- 加精华 --> | <!-- 加精华 --> | ||||
<view class="zhezhoa" v-if="isshow3" @tap="Cancelout2"></view> | <view class="zhezhoa" v-if="isshow3" @tap="Cancelout2"></view> | ||||
@@ -2353,4 +2371,7 @@ | |||||
background: #2BC805 !important; | background: #2BC805 !important; | ||||
color: #FFFFFF; | color: #FFFFFF; | ||||
} | } | ||||
/deep/ .u-model-title{ | |||||
padding: 34rpx 0 16rpx !important; | |||||
} | |||||
</style> | </style> |
@@ -162,6 +162,7 @@ | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
noClick:true, | |||||
// tabbar配置项 | // tabbar配置项 | ||||
current: 0, | current: 0, | ||||
tabbarList: tabbarList, | tabbarList: tabbarList, | ||||
@@ -319,17 +320,25 @@ | |||||
content: "确定更改当前客户接待状态为结束?", | content: "确定更改当前客户接待状态为结束?", | ||||
cancelColor: "#999999", | cancelColor: "#999999", | ||||
success: res => { | success: res => { | ||||
if (res.confirm) { | |||||
this.$u.post("/customer/endReception", { | |||||
id: id, | |||||
houseId: this.buildingID | |||||
}).then(res => { | |||||
uni.showToast({ | |||||
icon: "none", | |||||
title: "操作成功" | |||||
}) | |||||
this.init(); | |||||
}); | |||||
if (this.noClick) { | |||||
this.noClick= false; | |||||
if (res.confirm) { | |||||
this.$u.post("/customer/endReception", { | |||||
id: id, | |||||
houseId: this.buildingID | |||||
}).then(res => { | |||||
uni.showToast({ | |||||
icon: "none", | |||||
title: "操作成功" | |||||
}) | |||||
this.init(); | |||||
}); | |||||
} | |||||
setTimeout(()=> { | |||||
this.noClick= true; | |||||
}, 2000) | |||||
} else { | |||||
// 这里是重复点击的判断 | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
@@ -15,7 +15,7 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="settingGroup box"> | <view class="settingGroup box"> | ||||
<navigator class="line" url="/pages/mine/messageList"> | |||||
<!-- <navigator class="line" url="/pages/mine/messageList"> | |||||
<view class="title" style="width: 19%;"> | <view class="title" style="width: 19%;"> | ||||
<image src="/static/images/studyhot.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | <image src="/static/images/studyhot.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | ||||
消息 | 消息 | ||||
@@ -23,7 +23,7 @@ | |||||
<view class="right"> | <view class="right"> | ||||
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | ||||
</view> | </view> | ||||
</navigator> | |||||
</navigator> --> | |||||
<navigator class="line" url="/pages/mine/Myprofile"> | <navigator class="line" url="/pages/mine/Myprofile"> | ||||
<view class="title"> | <view class="title"> | ||||
<image src="/static/images/setting.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | <image src="/static/images/setting.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | ||||
@@ -53,7 +53,7 @@ | |||||
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="line" @click="scan"> | |||||
<!-- <view class="line" @click="scan"> | |||||
<view class="title" style="width: 220rpx;"> | <view class="title" style="width: 220rpx;"> | ||||
<image src="/static/images/reg.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | <image src="/static/images/reg.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | ||||
访客登记码 | 访客登记码 | ||||
@@ -61,7 +61,7 @@ | |||||
<view class="right"> | <view class="right"> | ||||
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | ||||
</view> | </view> | ||||
</view> | |||||
</view> --> | |||||
<view class="loginout" @click="logout" style="border: none;"> | <view class="loginout" @click="logout" style="border: none;"> | ||||
<view class="title"> | <view class="title"> | ||||
@@ -107,12 +107,30 @@ | |||||
</view> | </view> | ||||
<!-- 加入常错词 --> | <!-- 加入常错词 --> | ||||
<view class="zhezhoa" v-if="isshow2" @tap="Cancelout"></view> | <view class="zhezhoa" v-if="isshow2" @tap="Cancelout"></view> | ||||
<view class="bounced" v-if="isshow2"> | |||||
<u-modal v-model="isshow2" title="添加常错词" :show-cancel-button="true" @cancel="Cancelout" @confirm="Confirmtheexit"> | |||||
<view class="tian-view"> | <view class="tian-view"> | ||||
<viwe class="tian-view-t1"></viwe> | <viwe class="tian-view-t1"></viwe> | ||||
<viwe class="tian-view-t2">常错词:</viwe> | <viwe class="tian-view-t2">常错词:</viwe> | ||||
<viwe class="tian-view-t3"> | <viwe class="tian-view-t3"> | ||||
<input type="text" v-model="thewrongword" :disabled="true" class="tian-input" placeholder="请输入" /> | |||||
<textarea :auto-height="true" type="text" v-model="thewrongword" :disabled="isNum" class="tian-input" placeholder="请输入" /> | |||||
</viwe> | |||||
</view> | |||||
<view class="tian-view" style="margin-bottom: 74rpx;"> | |||||
<viwe class="tian-view-t1"></viwe> | |||||
<viwe class="tian-view-t2">正确词:</viwe> | |||||
<viwe class="tian-view-t3"> | |||||
<input class="tian-input" v-model="reswrongword" type="text" placeholder="请输入" /> | |||||
</viwe> | |||||
</view> | |||||
</u-modal> | |||||
<!-- <view class="bounced" v-if="isshow2"> | |||||
<view class="tian-view"> | |||||
<viwe class="tian-view-t1"></viwe> | |||||
<viwe class="tian-view-t2">常错词:</viwe> | |||||
<viwe class="tian-view-t3"> | |||||
<input type="text" v-model="thewrongword" :disabled="isNum" class="tian-input" placeholder="请输入" /> | |||||
</viwe> | </viwe> | ||||
</view> | </view> | ||||
<view class="tian-view"> | <view class="tian-view"> | ||||
@@ -126,7 +144,7 @@ | |||||
<view class="bounced3-1" @tap="Cancelout">取消</view> | <view class="bounced3-1" @tap="Cancelout">取消</view> | ||||
<view class="bounced3-2" @tap="Confirmtheexit">确认</view> | <view class="bounced3-2" @tap="Confirmtheexit">确认</view> | ||||
</view> | </view> | ||||
</view> | |||||
</view> --> | |||||
<!-- 加精华 --> | <!-- 加精华 --> | ||||
<view class="zhezhoa" v-if="isshow3" @tap="Cancelout2"></view> | <view class="zhezhoa" v-if="isshow3" @tap="Cancelout2"></view> | ||||
<view class="bounced" v-if="isshow3"> | <view class="bounced" v-if="isshow3"> | ||||
@@ -165,7 +183,7 @@ | |||||
</view> | </view> | ||||
<view class="bounced3"> | <view class="bounced3"> | ||||
<view class="bounced3-1" @click="effective=false">取消</view> | <view class="bounced3-1" @click="effective=false">取消</view> | ||||
<view class="bounced3-2" @click="effectiveAdd()">确认</view> | |||||
<view class="bounced3-2" @click="$noMultipleClicks(effectiveAdd)">确认</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -250,6 +268,7 @@ | |||||
ACTION: Symbol('zaudios'), // 唯一值区分每个页面的方法 | ACTION: Symbol('zaudios'), // 唯一值区分每个页面的方法 | ||||
isPageHide: false, // 是否息屏 | isPageHide: false, // 是否息屏 | ||||
isNum:false | |||||
}; | }; | ||||
}, | }, | ||||
@@ -351,27 +370,35 @@ | |||||
//标记 | //标记 | ||||
alllogo() { | alllogo() { | ||||
let msg = ''; | let msg = ''; | ||||
var that = this; | |||||
if (this.userlistobj.validInvalid != 0) { | if (this.userlistobj.validInvalid != 0) { | ||||
msg = '是否标记为"有效录音"?'; | msg = '是否标记为"有效录音"?'; | ||||
uni.showModal({ | uni.showModal({ | ||||
title: '提示', | title: '提示', | ||||
content: msg, | content: msg, | ||||
success: (res) => { | success: (res) => { | ||||
if (res.confirm) { | |||||
let parames = { | |||||
id: this.customerId, | |||||
validInvalid: '', | |||||
invalidReason: 0 | |||||
} | |||||
if (this.userlistobj.validInvalid == 0) { | |||||
parames.validInvalid = 1; | |||||
} else { | |||||
parames.validInvalid = 0; | |||||
} | |||||
this.$u.post("/customer/updateValidInvalid", parames).then(res => { | |||||
console.log(res) | |||||
this.gituserlist() | |||||
}) | |||||
if (that.noClick) { | |||||
that.noClick= false; | |||||
if (res.confirm) { | |||||
let parames = { | |||||
id: this.customerId, | |||||
validInvalid: '', | |||||
invalidReason: 0 | |||||
} | |||||
if (this.userlistobj.validInvalid == 0) { | |||||
parames.validInvalid = 1; | |||||
} else { | |||||
parames.validInvalid = 0; | |||||
} | |||||
this.$u.post("/customer/updateValidInvalid", parames).then(res => { | |||||
console.log(res) | |||||
this.gituserlist() | |||||
}) | |||||
} | |||||
setTimeout(()=> { | |||||
that.noClick= true; | |||||
}, 2000) | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
@@ -583,50 +610,58 @@ | |||||
}, | }, | ||||
//确认加入常错词 | //确认加入常错词 | ||||
Confirmtheexit() { | Confirmtheexit() { | ||||
let reg = /^[0-9]+$/ | |||||
if(reg.test(this.thewrongword)){ | |||||
if(this.reswrongword.length>8 || this.thewrongword.length>8){ | |||||
this.$refs.uToast.show({ | this.$refs.uToast.show({ | ||||
title: '错误词不能为纯数字', | |||||
title: '正确词错误词不能超过8个字', | |||||
type: 'warning', | type: 'warning', | ||||
}) | }) | ||||
}else{ | }else{ | ||||
if (this.thewrongword) { | |||||
if (this.reswrongword) { | |||||
let parames = { | |||||
customerId: this.customerId, | |||||
cupid: this.luyinList[this.csdFileindex].id, | |||||
wrongWord: this.thewrongword, //错误词 | |||||
correctWord: this.reswrongword, //正确词 | |||||
translateHtmlContent: this.messagelisy, | |||||
} | |||||
this.isshow2 = false; | |||||
let sas = this.textItself.replace(this.thewrongword, this.reswrongword) | |||||
this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas | |||||
this.dialogList.forEach(res => { | |||||
res.message.forEach(asd => { | |||||
asd.isshow = false; | |||||
}) | |||||
}) | |||||
this.$u.post("/corpus/addCorrectWord", parames).then(data => { | |||||
this.thewrongword = ""; | |||||
this.reswrongword = ""; | |||||
let reg = /^[0-9]+$/ | |||||
if(reg.test(this.thewrongword)){ | |||||
this.$refs.uToast.show({ | |||||
title: '错误词不能为纯数字', | |||||
type: 'warning', | |||||
}) | }) | ||||
}else{ | |||||
if (this.thewrongword) { | |||||
if (this.reswrongword) { | |||||
let parames = { | |||||
customerId: this.customerId, | |||||
cupid: this.luyinList[this.csdFileindex].id, | |||||
wrongWord: this.thewrongword, //错误词 | |||||
correctWord: this.reswrongword, //正确词 | |||||
translateHtmlContent: this.messagelisy, | |||||
} | |||||
this.isshow2 = false; | |||||
let sas = this.textItself.replace(this.thewrongword, this.reswrongword) | |||||
this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas | |||||
this.dialogList.forEach(res => { | |||||
res.message.forEach(asd => { | |||||
asd.isshow = false; | |||||
}) | |||||
}) | |||||
this.$u.post("/corpus/addCorrectWord", parames).then(data => { | |||||
this.thewrongword = ""; | |||||
this.reswrongword = ""; | |||||
}) | |||||
} else { | |||||
uni.showToast({ | |||||
title: '正确值不能为空', | |||||
duration: 2000 | |||||
}); | |||||
return | |||||
} | |||||
} else { | } else { | ||||
uni.showToast({ | uni.showToast({ | ||||
title: '正确值不能为空', | |||||
title: '错误词不能为空', | |||||
duration: 2000 | duration: 2000 | ||||
}); | }); | ||||
return | return | ||||
} | } | ||||
} else { | |||||
uni.showToast({ | |||||
title: '错误词不能为空', | |||||
duration: 2000 | |||||
}); | |||||
return | |||||
} | |||||
} | |||||
} | } | ||||
}, | }, | ||||
//取消加入常错词 | //取消加入常错词 | ||||
Cancelout() { | Cancelout() { | ||||
@@ -639,8 +674,13 @@ | |||||
}, | }, | ||||
//加入长错词 | //加入长错词 | ||||
Oftenthewrongword() { | Oftenthewrongword() { | ||||
this.isNum = false; | |||||
this.reswrongword = ""; | this.reswrongword = ""; | ||||
this.isshow2 = true; | this.isshow2 = true; | ||||
let reg = /^[0-9]+$/ | |||||
if (reg.test(this.thewrongword)) { | |||||
this.isNum = true | |||||
} | |||||
}, | }, | ||||
//加精华 | //加精华 | ||||
Addtheessence() { | Addtheessence() { | ||||
@@ -1575,4 +1615,7 @@ | |||||
color: #333333; | color: #333333; | ||||
} | } | ||||
} | } | ||||
/deep/ .u-model-title{ | |||||
padding: 34rpx 0 16rpx !important; | |||||
} | |||||
</style> | </style> |
@@ -140,12 +140,30 @@ | |||||
<!-- 加入常错词 --> | <!-- 加入常错词 --> | ||||
<view class="zhezhoa" v-if="isshow2" @tap="Cancelout"></view> | <view class="zhezhoa" v-if="isshow2" @tap="Cancelout"></view> | ||||
<view class="bounced" v-if="isshow2"> | |||||
<u-modal v-model="isshow2" title="添加常错词" :show-cancel-button="true" @cancel="Cancelout" @confirm="Confirmtheexit"> | |||||
<view class="tian-view"> | |||||
<viwe class="tian-view-t1"></viwe> | |||||
<viwe class="tian-view-t2">常错词:</viwe> | |||||
<viwe class="tian-view-t3"> | |||||
<textarea :auto-height="true" v-model="thewrongword" :disabled="isNum" class="tian-input" placeholder="请输入" /> | |||||
</viwe> | |||||
</view> | |||||
<view class="tian-view" style="margin-bottom: 74rpx;"> | |||||
<viwe class="tian-view-t1"></viwe> | |||||
<viwe class="tian-view-t2">正确词:</viwe> | |||||
<viwe class="tian-view-t3"> | |||||
<input class="tian-input" v-model="reswrongword" type="text" placeholder="请输入" /> | |||||
</viwe> | |||||
</view> | |||||
</u-modal> | |||||
<!-- <view class="bounced" v-if="isshow2"> | |||||
<view class="tian-view"> | <view class="tian-view"> | ||||
<viwe class="tian-view-t1"></viwe> | <viwe class="tian-view-t1"></viwe> | ||||
<viwe class="tian-view-t2">错误词:</viwe> | <viwe class="tian-view-t2">错误词:</viwe> | ||||
<viwe class="tian-view-t3"> | <viwe class="tian-view-t3"> | ||||
<input type="text" v-model="thewrongword" :disabled="true" class="tian-input" maxlength="8" placeholder="请输入" /> | |||||
<input type="text" v-model="thewrongword" :disabled="isNum" class="tian-input" maxlength="8" placeholder="请输入" /> | |||||
</viwe> | </viwe> | ||||
</view> | </view> | ||||
<view class="tian-view"> | <view class="tian-view"> | ||||
@@ -159,7 +177,7 @@ | |||||
<view class="bounced3-1" @tap="Cancelout">取消</view> | <view class="bounced3-1" @tap="Cancelout">取消</view> | ||||
<view class="bounced3-2" @tap="Confirmtheexit">确认</view> | <view class="bounced3-2" @tap="Confirmtheexit">确认</view> | ||||
</view> | </view> | ||||
</view> | |||||
</view> --> | |||||
<!-- 加精华 --> | <!-- 加精华 --> | ||||
<view class="zhezhoa" v-if="isshow3" @tap="Cancelout2"></view> | <view class="zhezhoa" v-if="isshow3" @tap="Cancelout2"></view> | ||||
@@ -389,7 +407,7 @@ | |||||
</view> | </view> | ||||
<view class="bounced3"> | <view class="bounced3"> | ||||
<view class="bounced3-1" @click="effective=false">取消</view> | <view class="bounced3-1" @click="effective=false">取消</view> | ||||
<view class="bounced3-2" @click="effectiveAdd()">确认</view> | |||||
<view class="bounced3-2" @click="$noMultipleClicks(effectiveAdd)">确认</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -526,6 +544,7 @@ | |||||
isPageHide: false, // 是否息屏 | isPageHide: false, // 是否息屏 | ||||
duration: '', // 总时长 | duration: '', // 总时长 | ||||
refresh: false, // 默认false | refresh: false, // 默认false | ||||
isNum:false | |||||
}; | }; | ||||
}, | }, | ||||
computed: { | computed: { | ||||
@@ -850,20 +869,28 @@ | |||||
title: '提示', | title: '提示', | ||||
content: msg, | content: msg, | ||||
success: function(res) { | success: function(res) { | ||||
if (res.confirm) { | |||||
let parames = { | |||||
id: that.customerId, | |||||
validInvalid: '', | |||||
invalidReason: 0 | |||||
} | |||||
if (that.userlistobj.validInvalid == 0) { | |||||
parames.validInvalid = 1; | |||||
} else { | |||||
parames.validInvalid = 0; | |||||
} | |||||
that.$u.post("/customer/updateValidInvalid", parames).then(res => { | |||||
that.Thetapeidisshow = false; | |||||
}) | |||||
if (that.noClick) { | |||||
that.noClick= false; | |||||
if (res.confirm) { | |||||
let parames = { | |||||
id: that.customerId, | |||||
validInvalid: '', | |||||
invalidReason: 0 | |||||
} | |||||
if (that.userlistobj.validInvalid == 0) { | |||||
parames.validInvalid = 1; | |||||
} else { | |||||
parames.validInvalid = 0; | |||||
} | |||||
that.$u.post("/customer/updateValidInvalid", parames).then(res => { | |||||
that.Thetapeidisshow = false; | |||||
}) | |||||
} | |||||
setTimeout(()=> { | |||||
that.noClick= true; | |||||
}, 2000) | |||||
} else { | |||||
// 这里是重复点击的判断 | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
@@ -1253,50 +1280,63 @@ | |||||
}, | }, | ||||
//确认加入常错词 | //确认加入常错词 | ||||
Confirmtheexit() { | Confirmtheexit() { | ||||
let reg = /^[0-9]+$/ | |||||
if(reg.test(this.thewrongword)){ | |||||
if(this.reswrongword.length>8 || this.thewrongword.length>8){ | |||||
this.$refs.uToast.show({ | this.$refs.uToast.show({ | ||||
title: '错误词不能为纯数字', | |||||
title: '正确词错误词不能超过8个字', | |||||
type: 'warning', | type: 'warning', | ||||
}) | }) | ||||
}else{ | |||||
if (this.thewrongword) { | |||||
if (this.reswrongword) { | |||||
let parames = { | |||||
customerId: this.customerId, | |||||
cupid: this.luyinList[this.csdFileindex].id, | |||||
wrongWord: this.thewrongword, //错误词 | |||||
correctWord: this.reswrongword, //正确词 | |||||
translateHtmlContent: this.messagelisy, | |||||
} | |||||
this.isshow2 = false; | |||||
let sas = this.textItself.replace(this.thewrongword, this.reswrongword) | |||||
this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas | |||||
this.dialogList.forEach(res => { | |||||
res.message.forEach(asd => { | |||||
asd.isshow = false; | |||||
this.isshow2 = true; | |||||
}else{ | |||||
let reg = /^[0-9]+$/ | |||||
if(reg.test(this.thewrongword)){ | |||||
this.$refs.uToast.show({ | |||||
title: '错误词不能为纯数字', | |||||
type: 'warning', | |||||
}) | |||||
this.isshow2 = true; | |||||
}else{ | |||||
if (this.thewrongword) { | |||||
if (this.reswrongword) { | |||||
let parames = { | |||||
customerId: this.customerId, | |||||
cupid: this.luyinList[this.csdFileindex].id, | |||||
wrongWord: this.thewrongword, //错误词 | |||||
correctWord: this.reswrongword, //正确词 | |||||
translateHtmlContent: this.messagelisy, | |||||
} | |||||
this.isshow2 = false; | |||||
let sas = this.textItself.replace(this.thewrongword, this.reswrongword) | |||||
this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas | |||||
this.dialogList.forEach(res => { | |||||
res.message.forEach(asd => { | |||||
asd.isshow = false; | |||||
}) | |||||
}) | }) | ||||
}) | |||||
this.$u.post("/corpus/addCorrectWord", parames).then(data => { | |||||
this.thewrongword = ""; | |||||
this.reswrongword = ""; | |||||
}) | |||||
this.$u.post("/corpus/addCorrectWord", parames).then(data => { | |||||
this.thewrongword = ""; | |||||
this.reswrongword = ""; | |||||
}) | |||||
} else { | |||||
this.$refs.uToast.show({ | |||||
title: '正确值不能为空', | |||||
type: 'warning', | |||||
}) | |||||
this.isshow2 = true; | |||||
return | |||||
} | |||||
} else { | } else { | ||||
uni.showToast({ | |||||
title: '正确值不能为空', | |||||
duration: 2000 | |||||
}); | |||||
this.$refs.uToast.show({ | |||||
title: '错误词不能为空', | |||||
type: 'warning', | |||||
}) | |||||
this.isshow2 = true; | |||||
return | return | ||||
} | } | ||||
} else { | |||||
uni.showToast({ | |||||
title: '错误词不能为空', | |||||
duration: 2000 | |||||
}); | |||||
return | |||||
} | } | ||||
} | } | ||||
@@ -1312,8 +1352,13 @@ | |||||
}, | }, | ||||
//加入长错词 | //加入长错词 | ||||
Oftenthewrongword() { | Oftenthewrongword() { | ||||
this.isNum = false; | |||||
this.reswrongword = ""; | this.reswrongword = ""; | ||||
this.isshow2 = true; | this.isshow2 = true; | ||||
let reg = /^[0-9]+$/ | |||||
if (reg.test(this.thewrongword)) { | |||||
this.isNum = true | |||||
} | |||||
}, | }, | ||||
//加精华 | //加精华 | ||||
Addtheessence() { | Addtheessence() { | ||||
@@ -2589,4 +2634,7 @@ | |||||
background: #2BC805 !important; | background: #2BC805 !important; | ||||
color: #FFFFFF; | color: #FFFFFF; | ||||
} | } | ||||
/deep/ .u-model-title{ | |||||
padding: 34rpx 0 16rpx !important; | |||||
} | |||||
</style> | </style> |
@@ -71,7 +71,7 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="clive" @click="save">确定</view> | |||||
<view class="clive" @click="$noMultipleClicks(save)">确定</view> | |||||
<u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list" | <u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list" | ||||
@cancel="cancel" @confirm="confirm"></u-select> | @cancel="cancel" @confirm="confirm"></u-select> | ||||
@@ -89,7 +89,8 @@ | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | |||||
return { | |||||
noClick: true, | |||||
Showhiddenunits: false, | Showhiddenunits: false, | ||||
list: [{ | list: [{ | ||||
label: '自然到访', | label: '自然到访', | ||||
@@ -0,0 +1,25 @@ | |||||
// 防止处理多次点击 | |||||
function noMultipleClicks(methods, info) { | |||||
// methods是点击后需要执行的函数, info是函数需要传的参数 | |||||
let that = this; | |||||
if (that.noClick) { | |||||
// 第一次点击 | |||||
console.log(methods) | |||||
that.noClick= false; | |||||
if((info && info !== '') || info ==0) { | |||||
// info是执行函数需要传的参数 | |||||
methods(info); | |||||
} else { | |||||
methods(); | |||||
} | |||||
setTimeout(()=> { | |||||
that.noClick= true; | |||||
}, 2000) | |||||
} else { | |||||
// 这里是重复点击的判断 | |||||
} | |||||
} | |||||
//导出 | |||||
export default { | |||||
noMultipleClicks, // 禁止多次点击 | |||||
} |