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 { ...@@ -389,12 +389,12 @@ export default {
// }) // })
console.log(this.previewList) console.log(this.previewList)
if (this.previewList.length) { if (this.previewList.length) {
this.updateList(this.previewList, 1) // this.updateList(this.previewList, 1)
// this.previewList.map((item) => { this.previewList.map((item) => {
// if (item.materialType == ATT_TYPE.TEXT) { if (item.materialType == ATT_TYPE.TEXT) {
// // this.textValue = item.materialContent this.textValue = this.changeText(item.materialContent)
// } }
// }) })
} }
}, },
computed: { computed: {
...@@ -485,6 +485,24 @@ export default { ...@@ -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) { handleImgChange(e) {
let imgFlag = false let imgFlag = false
...@@ -870,6 +888,7 @@ export default { ...@@ -870,6 +888,7 @@ export default {
this.previewList = utils.deepClone(val) this.previewList = utils.deepClone(val)
const obj = val.find((item) => item.materialType == this.ATT_TYPE.TEXT) const obj = val.find((item) => item.materialType == this.ATT_TYPE.TEXT)
if (obj) { if (obj) {
console.log(obj, 'obj')
let materialContent let materialContent
if (status) { if (status) {
materialContent = obj.materialContent.replace( materialContent = obj.materialContent.replace(
...@@ -910,6 +929,7 @@ export default { ...@@ -910,6 +929,7 @@ export default {
document.querySelector('.w-textarea_input').innerHTML = htm document.querySelector('.w-textarea_input').innerHTML = htm
}, 100) }, 100)
} else { } else {
console.log(343434343333)
this.textValue = '' this.textValue = ''
} }
}, },
......
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
:disabled="itm.repeatFlag" :disabled="itm.repeatFlag"
v-model.trim="itm.repeatCount" v-model.trim="itm.repeatCount"
@blur="handleBlur(itm)" @blur="handleBlur(itm)"
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" oninput="value=value.replace(/^(1+)|[^\d]+/g,'')"
size="small" size="small"
></el-input> ></el-input>
<el-checkbox <el-checkbox
...@@ -365,9 +365,9 @@ export default { ...@@ -365,9 +365,9 @@ export default {
limitSize: 10, // 限制视频大小 limitSize: 10, // 限制视频大小
// togetherItem: [ATT_TYPE.TEXT], // 只允许文本和图片 // togetherItem: [ATT_TYPE.TEXT], // 只允许文本和图片
limitNum: 1, // 限制视频数量 limitNum: 1, // 限制视频数量
limitWidth: 1280, // 限制视频宽度 // limitWidth: 1280, // 限制视频宽度
limitHeight: 720, // 限制视频高度 // limitHeight: 720, // 限制视频高度
limitTime: 30, // 限制视频时长 // limitTime: 30, // 限制视频时长
uploadApi: commonApi.uploadImgApi, uploadApi: commonApi.uploadImgApi,
}, },
{ {
...@@ -832,7 +832,7 @@ export default { ...@@ -832,7 +832,7 @@ export default {
console.log(itm) console.log(itm)
if (itm.rewardType == 2) { if (itm.rewardType == 2) {
this.$nextTick(() => { this.$nextTick(() => {
this.$set(itm, 'triggerValue', 0) this.$set(itm, 'triggerValue', '')
// itm.triggerValue = '' // itm.triggerValue = ''
}) })
} else { } else {
...@@ -846,15 +846,15 @@ export default { ...@@ -846,15 +846,15 @@ export default {
rewardCountChange(itm) { rewardCountChange(itm) {
if (itm.rewardCount == 2) { if (itm.rewardCount == 2) {
this.$nextTick(() => { this.$nextTick(() => {
this.$set(itm, 'repeatCount', 0) this.$set(itm, 'repeatCount', '')
this.$set(itm, 'triggerValue', 0) this.$set(itm, 'triggerValue', '')
// itm.repeatCount = '' // itm.repeatCount = ''
// itm.triggerValue = '' // itm.triggerValue = ''
}) })
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
this.$set(itm, 'triggerValue', 0) this.$set(itm, 'triggerValue', '')
// itm.triggerValue = '' // itm.triggerValue = ''
}) })
} }
...@@ -979,7 +979,7 @@ export default { ...@@ -979,7 +979,7 @@ export default {
// 取消 // 取消
cancelSubmit() { cancelSubmit() {
this.$root.to([ this.$root.to([
'任务中心(自测)', '任务中心',
'任务平台', '任务平台',
'任务管理', '任务管理',
'任务模板管理', '任务模板管理',
......
...@@ -364,4 +364,7 @@ export default { ...@@ -364,4 +364,7 @@ export default {
color: rgb(51, 51, 51); color: rgb(51, 51, 51);
line-height: 16px; line-height: 16px;
} }
/deep/ .el-table .cell {
line-height: 20px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!