|
@@ -2,13 +2,13 @@
|
|
<div class="translation">
|
|
<div class="translation">
|
|
<!-- 文本 -->
|
|
<!-- 文本 -->
|
|
<template v-if="renderType[configuration.renderIndex] === 'text'">
|
|
<template v-if="renderType[configuration.renderIndex] === 'text'">
|
|
- <span v-if="corporateWeChat">
|
|
|
|
|
|
+ <span v-if="corporateWeChat && !noRender.includes(translationValue)">
|
|
<ww-open-data :type='configuration.openType' :openid='translationValue'></ww-open-data>
|
|
<ww-open-data :type='configuration.openType' :openid='translationValue'></ww-open-data>
|
|
</span>
|
|
</span>
|
|
- <span v-if="dingdingPlatform">
|
|
|
|
|
|
+ <span v-else-if="dingdingPlatform && !noRender.includes(translationValue)">
|
|
<dt-open-data :open-type='configuration.openType' :open-id='translationValue'></dt-open-data>
|
|
<dt-open-data :open-type='configuration.openType' :open-id='translationValue'></dt-open-data>
|
|
</span>
|
|
</span>
|
|
- <span v-if="!corporateWeChat && !dingdingPlatform">{{ translationValue }}</span>
|
|
|
|
|
|
+ <span v-else>{{ translationValue }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 数组 -->
|
|
<!-- 数组 -->
|
|
<template v-if="renderType[configuration.renderIndex] === 'array'">
|
|
<template v-if="renderType[configuration.renderIndex] === 'array'">
|
|
@@ -53,6 +53,8 @@ export default {
|
|
openId: '',
|
|
openId: '',
|
|
renderIndex: 0,
|
|
renderIndex: 0,
|
|
}, // 配置对象
|
|
}, // 配置对象
|
|
|
|
+
|
|
|
|
+ noRender: ['全部人员', '未分配']
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -73,15 +75,22 @@ export default {
|
|
const { userNameNeedTranslate, dingdingUserid } = this.user
|
|
const { userNameNeedTranslate, dingdingUserid } = this.user
|
|
if (userNameNeedTranslate) {
|
|
if (userNameNeedTranslate) {
|
|
this.corporateWeChat = true
|
|
this.corporateWeChat = true
|
|
- this.dingdingPlatform = dingdingUserid ? true : false
|
|
|
|
|
|
+ if(dingdingUserid) {
|
|
|
|
+ this.dingdingPlatform = true
|
|
|
|
+ this.corporateWeChat = false
|
|
|
|
+ } else {
|
|
|
|
+ this.dingdingPlatform = false
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.corporateWeChat = false
|
|
this.corporateWeChat = false
|
|
this.dingdingPlatform = false
|
|
this.dingdingPlatform = false
|
|
}
|
|
}
|
|
console.log(this.corporateWeChat, this.dingdingPlatform, this.configurationItems)
|
|
console.log(this.corporateWeChat, this.dingdingPlatform, this.configurationItems)
|
|
|
|
+ // console.log(this.corporateWeChat, '<=== 企业微信转译')
|
|
|
|
+ // console.log(this.dingdingPlatform, '<=== 钉钉转译')
|
|
|
|
+ this.assignmentValue(this.configurationItems)
|
|
},
|
|
},
|
|
assignmentValue(value) {
|
|
assignmentValue(value) {
|
|
- console.log(value)
|
|
|
|
const { openType, openId, renderIndex = 0 } = value
|
|
const { openType, openId, renderIndex = 0 } = value
|
|
this.configuration = { openType, openId, renderIndex }
|
|
this.configuration = { openType, openId, renderIndex }
|
|
const type = this.renderType[renderIndex]
|
|
const type = this.renderType[renderIndex]
|
|
@@ -99,6 +108,7 @@ export default {
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
+ console.log(this.translationValue, '<=== 转译文本')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
}
|
|
}
|