Commit a46ff976 by 匡雅琴

Merge branch 'kyq_dev' into 'v2.12.0'

Kyq dev

See merge request !34
2 parents f3515c54 931751ba
......@@ -389,12 +389,12 @@ export default {
// })
console.log(this.previewList)
if (this.previewList.length) {
this.updateList(this.previewList, 1)
// this.previewList.map((item) => {
// if (item.materialType == ATT_TYPE.TEXT) {
// // this.textValue = item.materialContent
// }
// })
// this.updateList(this.previewList, 1)
this.previewList.map((item) => {
if (item.materialType == ATT_TYPE.TEXT) {
this.textValue = this.changeText(item.materialContent)
}
})
}
},
computed: {
......@@ -485,6 +485,24 @@ export default {
)
})
},
// 表情转换
changeText(val) {
let htm = val.replace(
/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi,
function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
}
)
return htm
},
// 上传图片
handleImgChange(e) {
let imgFlag = false
......@@ -870,6 +888,7 @@ export default {
this.previewList = utils.deepClone(val)
const obj = val.find((item) => item.materialType == this.ATT_TYPE.TEXT)
if (obj) {
console.log(obj, 'obj')
let materialContent
if (status) {
materialContent = obj.materialContent.replace(
......@@ -910,6 +929,7 @@ export default {
document.querySelector('.w-textarea_input').innerHTML = htm
}, 100)
} else {
console.log(343434343333)
this.textValue = ''
}
},
......
......@@ -224,7 +224,7 @@
:disabled="itm.repeatFlag"
v-model.trim="itm.repeatCount"
@blur="handleBlur(itm)"
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
oninput="value=value.replace(/^(1+)|[^\d]+/g,'')"
size="small"
></el-input>
<el-checkbox
......@@ -365,9 +365,9 @@ export default {
limitSize: 10, // 限制视频大小
// togetherItem: [ATT_TYPE.TEXT], // 只允许文本和图片
limitNum: 1, // 限制视频数量
limitWidth: 1280, // 限制视频宽度
limitHeight: 720, // 限制视频高度
limitTime: 30, // 限制视频时长
// limitWidth: 1280, // 限制视频宽度
// limitHeight: 720, // 限制视频高度
// limitTime: 30, // 限制视频时长
uploadApi: commonApi.uploadImgApi,
},
{
......@@ -832,7 +832,7 @@ export default {
console.log(itm)
if (itm.rewardType == 2) {
this.$nextTick(() => {
this.$set(itm, 'triggerValue', 0)
this.$set(itm, 'triggerValue', '')
// itm.triggerValue = ''
})
} else {
......@@ -846,15 +846,15 @@ export default {
rewardCountChange(itm) {
if (itm.rewardCount == 2) {
this.$nextTick(() => {
this.$set(itm, 'repeatCount', 0)
this.$set(itm, 'triggerValue', 0)
this.$set(itm, 'repeatCount', '')
this.$set(itm, 'triggerValue', '')
// itm.repeatCount = ''
// itm.triggerValue = ''
})
} else {
this.$nextTick(() => {
this.$set(itm, 'triggerValue', 0)
this.$set(itm, 'triggerValue', '')
// itm.triggerValue = ''
})
}
......@@ -979,7 +979,7 @@ export default {
// 取消
cancelSubmit() {
this.$root.to([
'任务中心(自测)',
'任务中心',
'任务平台',
'任务管理',
'任务模板管理',
......
......@@ -364,4 +364,7 @@ export default {
color: rgb(51, 51, 51);
line-height: 16px;
}
/deep/ .el-table .cell {
line-height: 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!