Commit 83522017 by 杨北旺

提交修改

1 parent 231c59ed
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="topSet flex"> <div class="topSet flex">
<span>发送时间:积分到账</span> <span>发送时间:积分到账</span>
<div class="set-int"> <div class="set-int">
<el-input class="intTime" v-model="formObj[item.attr].time" maxlength="4" oninput="if(value){value=value.replace(/[^\d]/g,'')} if(value<=0){value=''} if(value>1000){value=1000}" placeholder="请输入"></el-input> <el-input @change="onchangeInput" class="intTime" v-model="formObj[item.attr].time" maxlength="4" oninput="if(value){value=value.replace(/[^\d]/g,'')} if(value<=0){value=''} if(value>1000){value=1000}" placeholder="请输入"></el-input>
</div> </div>
<span>小时后,未提现或兑换发送</span> <span>小时后,未提现或兑换发送</span>
</div> </div>
...@@ -198,14 +198,16 @@ export default { ...@@ -198,14 +198,16 @@ export default {
} }
this.formObj[type].messageContext = html this.formObj[type].messageContext = html
this.formObj[type].text = linkText this.formObj[type].text = linkText
this.editStatus = true
}, },
// 点击标签 // 点击标签
handleSelectMessage(e, type, textName) { handleSelectMessage(e, type, textName) {
const _refs = this.$refs[type][0] const _refs = this.$refs[type][0]
if (_refs.currentText.indexOf(`#${textName}#`) != -1) { // if (_refs.currentText.indexOf(`#${textName}#`) != -1) {
return // return
} // }
_refs.addTag(`#${textName}#`) _refs.addTag(`#${textName}#`)
this.editStatus = true
}, },
// 提交 // 提交
handleSave() { handleSave() {
...@@ -227,7 +229,19 @@ export default { ...@@ -227,7 +229,19 @@ export default {
} }
}, },
handleCancel() { handleCancel() {
if (this.editStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$router.back() this.$router.back()
})
.catch(() => {})
} else {
this.$router.back()
}
}, },
//处理提交参数 //处理提交参数
handlerParams() { handlerParams() {
...@@ -296,15 +310,15 @@ export default { ...@@ -296,15 +310,15 @@ export default {
customerName = '#客户姓名#' customerName = '#客户姓名#'
if (tagContent.includes(shortLink)) { if (tagContent.includes(shortLink)) {
const rid = `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}` const rid = `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}`
tagContent = tagContent.replace(shortLink, `<span></span><wise id="${rid}">${shortLink}</wise>`) tagContent = tagContent.replaceAll(shortLink, `<span></span><wise id="${rid}">${shortLink}</wise>`)
} }
if (tagContent.includes(customerJf)) { if (tagContent.includes(customerJf)) {
const rid = `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}` const rid = `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}`
tagContent = tagContent.replace(customerJf, `<span></span><wise id="${rid}">${customerJf}</wise>`) tagContent = tagContent.replaceAll(customerJf, `<span></span><wise id="${rid}">${customerJf}</wise>`)
} }
if (tagContent.includes(customerName)) { if (tagContent.includes(customerName)) {
const rid = `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}` const rid = `r${new Date().getTime()}d${Math.ceil(Math.random() * 1000)}`
tagContent = tagContent.replace(customerName, `<span></span><wise id="${rid}">${customerName}</wise>`) tagContent = tagContent.replaceAll(customerName, `<span></span><wise id="${rid}">${customerName}</wise>`)
} }
return tagContent return tagContent
}, },
...@@ -353,6 +367,9 @@ export default { ...@@ -353,6 +367,9 @@ export default {
} }
}) })
} }
},
onchangeInput(){
this.editStatus = true
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!