fix: 自动对话修改

release_1.0.0
xiangcongshuai 1 year ago
parent 9486fb6f35
commit a546a88664

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

@ -132,9 +132,16 @@ onMounted(() => {
.nodeList" .nodeList"
:key="index" :key="index"
> >
<div class="value"> <div v-if="item.correct === 1" class="correct">
<span>正确</span>
<span style="margin-left: 4px">{{ item.recordName }}</span>
</div>
<div v-if="item.correct === 0" class="error">
<span>{{ item.recordName }}</span> <span>{{ item.recordName }}</span>
</div> </div>
<div v-if="item.correct === 2" class="value">
<span style="padding-left: 60px">{{ item.recordName }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -195,95 +202,106 @@ onMounted(() => {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.evaluate { .evaluate {
background-image: url("@/assets/inquiry/main_bg.png");
background-size: 100% 100%;
flex: 1; flex: 1;
padding: 24px; padding: 24px;
margin: 0 12px 26px 0;
padding: 52px 50px 32px 32px; padding: 52px 50px 32px 32px;
margin: 0 12px 26px 0;
background-image: url("@/assets/inquiry/main_bg.png");
background-size: 100% 100%;
:deep(.el-collapse-item__header) { :deep(.el-collapse-item__header) {
width: 100%; width: 100%;
height: 40px; height: 40px;
background-image: url("@/assets/inquiry/long_title.png"); background-image: url("@/assets/inquiry/long_title.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
.evaluate_main { .evaluate_main {
overflow: auto;
height: calc(100vh - 295px); height: calc(100vh - 295px);
overflow: auto;
} }
.title { .title {
margin-left: 34px;
display: flex; display: flex;
align-items: center; align-items: center;
margin-left: 34px;
span { span {
margin-left: 10px;
font-size: 16px; font-size: 16px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #283c51; color: #283c51;
margin-left: 10px;
} }
} }
:deep(.el-collapse-item__content) { :deep(.el-collapse-item__content) {
padding: 0; padding: 0;
} }
.evaluate_content { .evaluate_content {
background: rgba(91, 139, 255, 0.05);
padding: 16px; padding: 16px;
margin-top: 8px; margin-top: 8px;
background: rgb(91 139 255 / 5%);
} }
:deep(.el-collapse-item) { :deep(.el-collapse-item) {
margin-bottom: 24px; margin-bottom: 24px;
} }
:deep(.el-collapse-item__wrap) { :deep(.el-collapse-item__wrap) {
background-color: unset !important; background-color: unset !important;
} }
:deep(.el-collapse) { :deep(.el-collapse) {
border: 0; border: 0;
} }
.evaluate_text { .evaluate_text {
font-size: 14px; font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #364c63; color: #364c63;
} }
.evaluate_desc { .evaluate_desc {
.evaluate_desc_title { .evaluate_desc_title {
display: flex; display: flex;
height: 32px; height: 32px;
img { img {
width: 20px; width: 20px;
height: 20px; height: 20px;
} }
span { span {
margin-left: 8px;
font-size: 12px; font-size: 12px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #4287ff; color: #4287ff;
margin-left: 8px;
} }
} }
} }
.userDiagnosisResult { .userDiagnosisResult {
border-radius: 6px 6px 6px 6px;
border: 1px solid #ffffff;
padding: 16px; padding: 16px;
margin-top: 8px; margin-top: 8px;
border: 1px solid #fff;
border-radius: 6px;
.correct { .correct {
font-size: 14px; font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #0db274; color: #0db274;
} }
.error { .error {
padding-left: 60px;
font-size: 14px; font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #ff3b39; color: #ff3b39;
padding-left: 60px;
} }
.value { .value {
font-size: 14px; font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400; font-weight: 400;
} }
} }
@ -291,9 +309,9 @@ onMounted(() => {
</style> </style>
<style lang="scss"> <style lang="scss">
.evaluate .el-collapse-item__header:hover { .evaluate .el-collapse-item__header:hover {
box-sizing: border-box;
height: 40px;
background-image: url("@/assets/inquiry/act_long_title.png"); background-image: url("@/assets/inquiry/act_long_title.png");
background-size: 100% 100%; background-size: 100% 100%;
height: 40px;
box-sizing: border-box;
} }
</style> </style>

@ -31,7 +31,7 @@ onMounted(() => {
function checkSpeaking() { function checkSpeaking() {
intervalId = setInterval(() => { intervalId = setInterval(() => {
const dataArray = audioRecorder.getRecordAnalyseData(); const dataArray = audioRecorder.getRecordAnalyseData();
const isSpeaking = Array.from(dataArray).some(value => value > 128); const isSpeaking = Array.from(dataArray).some(value => value > 138);
if (isSpeaking) { if (isSpeaking) {
if (recordType.value === "0") { if (recordType.value === "0") {
recordType.value = "1"; recordType.value = "1";
@ -64,15 +64,16 @@ async function stopRecording() {
const { data } = await receiveVoiceFile(params); const { data } = await receiveVoiceFile(params);
text.value = data; text.value = data;
recordType.value = "3"; recordType.value = "3";
sendVoiceOption();
} }
const emit = defineEmits(["changeType", "save"]); const emit = defineEmits(["changeType", "save"]);
const reset = () => { // const reset = () => {
text.value = defultText; // text.value = defultText;
recordType.value = "0"; // recordType.value = "0";
startRecording(); // startRecording();
checkSpeaking(); // checkSpeaking();
}; // };
onClickOutside(container, () => emit("changeType", 0)); onClickOutside(container, () => emit("changeType", 0));
const sendVoiceOption = () => { const sendVoiceOption = () => {
@ -94,7 +95,7 @@ onBeforeUnmount(() => {
<img v-show="recordType !== '3'" :src="tokeGifImg" alt="" /> <img v-show="recordType !== '3'" :src="tokeGifImg" alt="" />
<span>{{ text }}</span> <span>{{ text }}</span>
</div> </div>
<div v-show="recordType === '3'" class="btn_list"> <!-- <div v-show="recordType === '3'" class="btn_list">
<span @click="reset"></span> <span @click="reset"></span>
<el-button <el-button
class="btn" class="btn"
@ -103,53 +104,56 @@ onBeforeUnmount(() => {
type="primary" type="primary"
>发送</el-button >发送</el-button
> >
</div> </div> -->
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.voiceInquiry { .voiceInquiry {
height: 104px;
background-image: url(@/assets/inquiry/voice_bg.png);
background-size: 100% 100%;
position: fixed; position: fixed;
width: calc(100vw - 642px);
bottom: 48px; bottom: 48px;
display: flex; display: flex;
justify-content: center; justify-content: center;
width: calc(100vw - 642px);
height: 104px;
background-image: url("@/assets/inquiry/voice_bg.png");
background-size: 100% 100%;
.voice_footer_cotent { .voice_footer_cotent {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
img { img {
width: 300px; width: 300px;
height: 40px; height: 40px;
margin-top: 16px; margin-top: 16px;
cursor: pointer; cursor: pointer;
} }
span { span {
margin-top: 6px;
font-size: 14px; font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #364c63; color: #364c63;
margin-top: 6px;
} }
} }
.btn_list { .btn_list {
position: absolute; position: absolute;
top: 15px;
right: 16px; right: 16px;
display: flex; display: flex;
top: 15px;
align-items: center; align-items: center;
height: 104px; height: 104px;
span { span {
margin-right: 16px;
font-size: 16px; font-size: 16px;
font-family: Inter-Regular, Inter;
font-weight: 400; font-weight: 400;
color: #4287ff; color: #4287ff;
cursor: pointer; cursor: pointer;
margin-right: 16px;
} }
img { img {
width: 24px; width: 24px;
height: 24px; height: 24px;

Loading…
Cancel
Save