Commit 4bce0d03 by 前端

待提交

1 parent ce0771ea
......@@ -4,20 +4,24 @@
"version" : "0.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"h5" : {
"launchtype" : "local"
},
"mp-weixin" : {
"launchtype" : "local"
},
"provider" : "aliyun",
"type" : "uniCloud"
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"h5" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"provider" : "aliyun",
"type" : "uniCloud"
},
{
"playground" : "standard",
......
<template>
<view class="step">
<MessageBox
ref="formRef"
@cancel="cancel"
@confirm="submit"
:cancelBtnText="`${step == 1? '取消' : '上一步'}`"
:confirmBtnText="`${sceneType == 0 ?step == 1? '下一步' : '完成接待': '完成接待'}`"
:title="`${step == 1? '客户信息完善' : '结果反馈'}`"
:popupW="820"
:maxHeight="820"
:isAutoClose="false"
>
<MessageBox ref="formRef" @cancel="cancel" @confirm="submit" :cancelBtnText="`${step == 1 ? '取消' : '上一步'}`" :confirmBtnText="`${sceneType == 0 ? (step == 1 ? '下一步' : '完成接待') : '完成接待'}`" :title="`${step == 1 ? '客户信息完善' : '结果反馈'}`" :popupW="820" :maxHeight="820" :isAutoClose="false">
<view name="content">
<template v-if="step == 1">
<template v-if="!check(true)">
<view
class="error-tip"
v-if="errorTip"
>以下信息不能为空,请完善信息后保存</view>
<view
class="pop-tips"
v-else
>{{tips}}</view>
<view class="error-tip" v-if="errorTip">以下信息不能为空,请完善信息后保存</view>
<view class="pop-tips" v-else>{{ tips }}</view>
</template>
<view class="form">
<template v-for="(i, index) in formObject">
<view
class="form-item"
:key="index"
>
<view :class="['label',{required:i.required}]">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) && i.required },{disabled:customerType == 0 || i.disabled}]">
<view class="form-item" :key="index">
<view :class="['label', { required: i.required }]">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) && i.required }, { disabled: customerType == 0 || i.disabled }]">
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="formData[i.key]"
class="input"
:placeholder="i.placeholder"
:disabled="customerType == 0"
@input="inputCustomer"
placeholder-style="color:#c9c9c9;"
/>
<input :type="i.inputType" :maxlength="i.maxlength" v-model="formData[i.key]" class="input" :placeholder="i.placeholder" :disabled="customerType == 0" @input="inputCustomer" placeholder-style="color:#c9c9c9;" />
</template>
<template v-else>
<view
:class="['select', `${formData[i.key]? '' : 'placeholder'}`]"
@click="showPopup(i)"
>
<view :class="['select', `${formData[i.key] ? '' : 'placeholder'}`]" @click="showPopup(i)">
{{ formData[i.key] || i.placeholder }}
<uni-icons
class="arrow"
type="down"
:size="16"
></uni-icons>
<uni-icons class="arrow" type="down" :size="16"></uni-icons>
</view>
</template>
</view>
......@@ -64,42 +29,25 @@
<template v-else>
<view class="pop-tips">请完善本次接待结果</view>
<view class="choose-box">
<template v-for="(i,index) in resultList">
<view
:class="['choose-item', `${i.status == receptionStatus ? i.status == 1 ? 'success' : 'error' : ''}`]"
:key="index"
@click="chooseResult(i.status)"
>
<view :class="['sprite-icon' , `icon-face-${i.status == receptionStatus ? `${i.icon}-active` : i.icon }`]"></view>
{{ i.text}}
<template v-for="(i, index) in resultList">
<view :class="['choose-item', `${i.status == receptionStatus ? (i.status == 1 ? 'success' : 'error') : ''}`]" :key="index" @click="chooseResult(i.status)">
<view :class="['sprite-icon', `icon-face-${i.status == receptionStatus ? `${i.icon}-active` : i.icon}`]"></view>
{{ i.text }}
</view>
</template>
</view>
</template>
</view>
</MessageBox>
<car-brands
ref="carBrandListVisible"
@select="handleSelect($event,'carBrandListVisible')"
/>
<employee
ref="employeeBoxVisible"
@select="handleSelect($event,'employeeBoxVisible')"
/>
<uni-popup
ref="successRef"
type="message"
>
<uni-popup-message
type="success"
message="数据保存成功"
:duration="1500"
></uni-popup-message>
<car-brands ref="carBrandListVisible" @select="handleSelect($event, 'carBrandListVisible')" />
<employee ref="employeeBoxVisible" @select="handleSelect($event, 'employeeBoxVisible')" />
<uni-popup ref="successRef" type="message">
<uni-popup-message type="success" message="数据保存成功" :duration="1500"></uni-popup-message>
</uni-popup>
</view>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import Employee from '@/components/Employee.vue'
import CarBrands from '@/components/CarBrands.vue'
import { mapMutations } from "vuex";
......@@ -305,7 +253,6 @@ export default {
},
success (receptionStatus) {
this.$refs.successRef.open();
this.setReceptionStatus(receptionStatus);
this.$emit('submit', receptionStatus)
},
inputCustomer () {
......@@ -346,12 +293,13 @@ export default {
},
chooseResult (val) {
this.receptionStatus = val
this.setReceptionStatus(val);
}
}
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.pop-tips {
background: rgba(44, 102, 247, 0.1);
color: #2c66f7;
......@@ -470,4 +418,4 @@ export default {
border-color: #f247241a;
}
}
</style>
\ No newline at end of file
</style>
......@@ -115,7 +115,8 @@ export default {
},
mounted() {
this.customerInfo = utils.deepClone(this.customerInfoVal)
const i = this.receptionList.findIndex(e => e.value == this.customerInfo.receptionStatus)
console.log(this.customerInfo)
const i = this.receptionList.findIndex(e => e.value === this.customerInfo.receptionStatus)
this.$set(this.customerInfo, 'receptionStatus', i == -1?'':this.receptionList[i].label)
},
methods: {
......
......@@ -158,7 +158,8 @@ export default {
this.setAudioInfo({ audioList: [], audioStatus: 'start' })
recorderManager.onStart(() => {
setTimeout(() => {
interruptRecord.addPreRecords()
const params = this.getParams(this.$store.state.user.customerInfo, this.booksList, this.receptionStatus)
interruptRecord.addPreRecords(params)
}, 1000)
})
recorderManager.start({
......
......@@ -2,17 +2,19 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-10-14 17:38:35
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-18 16:46:07
* @LastEditTime: 2024-10-18 18:09:15
* @FilePath: \gl-tape\utils\recordManager\interruptRecord.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import RecordManager from '../RecordManager.js'
import utils from '@/utils/utils.js'
import { storageApi } from '../cache'
// import store from '@/store'
import store from '@/store'
class InterruptRecord extends RecordManager {
constructor() {
super()
const records = this.getRecords()
store.dispatch('audio/setPerRecordNumber', records.length)
// console.log(store)
// storageApi.removeRecords('preRecordList')
// storageApi.removeRecords('preRecordId')
......@@ -54,10 +56,9 @@ class InterruptRecord extends RecordManager {
* @param {string} name - 录音文件目录名
* @returns {void} - 此函数不返回任何值
*/
async addPreRecords() {
async addPreRecords(params) {
console.log(storageApi.getRecords('preRecordId'), 6666)
if (storageApi.getRecords('preRecordId')) {
console.log(888)
this.addPreAudio()
return
}
......@@ -71,6 +72,7 @@ class InterruptRecord extends RecordManager {
console.log(ids, 'id')
this.records = {
id,
...params,
audioPath: [audioPath]
}
const records = this.getRecords() || []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!