标品
This commit is contained in:
@@ -1,178 +0,0 @@
|
||||
<template>
|
||||
<div class="AppAiInput">
|
||||
<div class="content-info" v-if="text">{{text}}</div>
|
||||
<div class="problem-list">
|
||||
<p class="title">请一句话告诉我这些信息:</p>
|
||||
<div class="list-content">
|
||||
<p>“您排查的户主姓名”</p>
|
||||
<p>“户主的性别”</p>
|
||||
<p>“户主的联系电话”</p>
|
||||
<p>“户主的出生日期”</p>
|
||||
<p>“户主的民族”</p>
|
||||
<p>“户主家里的家庭人口数”</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="microphone-info">
|
||||
<div class="microphone-img" @touchstart="start" @touchend="end">
|
||||
<!-- <img src="./img/microphone.png" alt="" @longpress=""> -->
|
||||
<u-icon name="mic" color="#fff" size="140" style="margin-top:20px;"></u-icon>
|
||||
</div>
|
||||
<p class="text">{{isStart ? '松开结束说话' : '按住说话'}}</p>
|
||||
<div class="btn">
|
||||
<p class="cancel" @click="cancel">取消</p>
|
||||
<p class="confirm" @click="confirm" v-if="text">确定</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState, mapActions} from "vuex";
|
||||
export default {
|
||||
name: 'AppAiInput',
|
||||
appName: '百度AI输入',
|
||||
data() {
|
||||
return {
|
||||
isStart: false,
|
||||
text: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.injectJWeixin(['startRecord','stopRecord', 'translateVoice'])
|
||||
},
|
||||
onShow() {
|
||||
document.title = '婚姻家庭纠纷入户登记表'
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['injectJWeixin']),
|
||||
start() {
|
||||
wx.startRecord()
|
||||
this.isStart = true
|
||||
},
|
||||
end() {
|
||||
wx.stopRecord({
|
||||
success: (res)=> {
|
||||
wx.translateVoice({
|
||||
localId: res.localId, // 需要识别的音频的本地Id,由录音相关接口获得,音频时长不能超过60秒
|
||||
isShowProgressTips: 1, // 默认为1,显示进度提示
|
||||
success: (e)=> {
|
||||
this.isStart = false
|
||||
this.text = this.text + e.translateResult // 语音识别的结果
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
confirm() {
|
||||
uni.navigateTo({url: `./formEdit?word=${this.text}`})
|
||||
},
|
||||
cancel() {
|
||||
this.text = ''
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body {
|
||||
min-height: 100%;
|
||||
// height: 100vh;
|
||||
padding-top: 32px;
|
||||
background: #fff;
|
||||
}
|
||||
.AppAiInput {
|
||||
.content-info {
|
||||
margin: 0 0 32px 32px;
|
||||
width: 686px;
|
||||
height: 272px;
|
||||
background-image: linear-gradient(157deg, #F7FAFD 2%, #EDF6FF 99%);
|
||||
border-radius: 16px;
|
||||
padding: 24px 28px 28px 28px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #222;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.problem-list {
|
||||
margin: 0 0 32px 32px;
|
||||
width: 686px;
|
||||
height: 520px;
|
||||
background: #F5F6F8;
|
||||
border-radius: 16px;
|
||||
padding: 28px;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
line-height: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 32px;
|
||||
color: #6C768A;
|
||||
text-align: center;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
.list-content {
|
||||
width: 630px;
|
||||
height: 392px;
|
||||
background: #FFF;
|
||||
border-radius: 12px;
|
||||
overflow-y: scroll;
|
||||
padding: 28px;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #222;
|
||||
line-height: 56px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.microphone-info {
|
||||
position: fixed;
|
||||
bottom: 48px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
.microphone-img {
|
||||
width: 216px;
|
||||
height: 216px;
|
||||
border-radius: 50%;
|
||||
background-image: linear-gradient(180deg, #0262F2 25%, #148AFF 99%);
|
||||
text-align: center;
|
||||
margin-left: 272px;
|
||||
margin-bottom: 20px;
|
||||
img {
|
||||
width: 68px;
|
||||
height: 96px;
|
||||
margin-top: 62px;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 36px;
|
||||
color: #222;
|
||||
margin-bottom: 64px;
|
||||
}
|
||||
.btn {
|
||||
text-align: center;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 36px;
|
||||
p {
|
||||
display: inline-block;
|
||||
}
|
||||
.cancel {
|
||||
color: #999;
|
||||
}
|
||||
.confirm {
|
||||
color: #0262F2;
|
||||
margin-left: 120px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,231 +0,0 @@
|
||||
<template>
|
||||
<div class="formConfirm">
|
||||
<div class="list-content">
|
||||
<div class="item">
|
||||
<span class="tips">*</span>
|
||||
<div class="item-border">
|
||||
<div class="label">户主姓名</div>
|
||||
<div class="value">
|
||||
<u-input type="text" class="right" placeholder="请输入" height="44" input-align="right" v-model="info.name"></u-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="tips">*</span>
|
||||
<div class="item-border">
|
||||
<div class="label">性别</div>
|
||||
<div class="value" @click="showSex=true">
|
||||
<span :class="info.sex == null ? 'color-999' : ''">{{ $dict.getLabel('sex', info.sex) || '请选择'}}</span>
|
||||
<img src="./img/arrow-right.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="tips">*</span>
|
||||
<div class="item-border">
|
||||
<div class="label">联系电话</div>
|
||||
<div class="value">
|
||||
<u-input type="text" class="right" placeholder="请输入" height="44" input-align="right" v-model="info.phone"></u-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="tips">*</span>
|
||||
<div class="item-border">
|
||||
<div class="label">出生日期</div>
|
||||
<div class="value" @click="showDate=true">
|
||||
<span :class="info.birthday == null ? 'color-999' : ''">{{ info.birthday || '请选择'}}</span>
|
||||
<img src="./img/arrow-right.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="tips">*</span>
|
||||
<div class="item-border">
|
||||
<div class="label">民族</div>
|
||||
<div class="value" @click="showNation=true">
|
||||
<span :class="info.nation == null ? 'color-999' : ''">{{ $dict.getLabel('nation', info.nation) || '请选择'}}</span>
|
||||
<img src="./img/arrow-right.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="tips">*</span>
|
||||
<div class="item-border">
|
||||
<div class="label">家庭人口数</div>
|
||||
<div class="value">
|
||||
<u-input type="text" class="right" placeholder="请输入" height="44" input-align="right" v-model="info.householdNumber"></u-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn">
|
||||
<div class="confirm" @click="confirm('保存成功')">保存内容</div>
|
||||
<div class="confirm" @click="confirm('提交成功')">提交</div>
|
||||
<div class="cancel">取消</div>
|
||||
</div>
|
||||
<u-picker mode="time" v-model="showDate" :params="deteParams" start-year="1930" @confirm="dateConfirm">请选择</u-picker>
|
||||
<u-select v-model="showSex" :list="$dict.getDict('sex')" label-name="dictName" value-name="dictValue" @confirm="confirmSex"/>
|
||||
<u-select v-model="showNation" :list="$dict.getDict('nation')" label-name="dictName" value-name="dictValue" @confirm="confirmNation"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'formConfirm',
|
||||
data() {
|
||||
return {
|
||||
word: '',
|
||||
info: {},
|
||||
showSex: false,
|
||||
showNation: false,
|
||||
showDate: false,
|
||||
deteParams: {year: true, month: true, day: true, hour: false, minute: false, second: false},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
uni.showLoading({title: '加载中'})
|
||||
this.word = option.word
|
||||
this.$dict.load('sex', 'nation').then(() => {
|
||||
this.getInfo()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = '婚姻家庭纠纷入户登记表'
|
||||
},
|
||||
methods: {
|
||||
getInfo() {
|
||||
this.$http.post(`/app/appbaiduai/queryByInfo?word=${this.word}`).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.info = {...res.data}
|
||||
uni.hideLoading()
|
||||
}
|
||||
}).catch(res => {
|
||||
this.$u.toast(res)
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
confirmSex(e) {
|
||||
this.info.sex = e[0].value
|
||||
},
|
||||
confirmNation(e) {
|
||||
this.info.nation = e[0].value
|
||||
},
|
||||
dateConfirm(e) {
|
||||
this.info.birthday = `${e.year}-${e.month}-${e.day}`
|
||||
},
|
||||
confirm(successText) {
|
||||
if(this.info.name == null || !this.info.name) {
|
||||
return this.$u.toast('请输入户主姓名')
|
||||
}
|
||||
if(this.info.sex == null) {
|
||||
return this.$u.toast('请选择性别')
|
||||
}
|
||||
if(this.info.phone == null || !this.info.phone) {
|
||||
return this.$u.toast('请输入联系电话')
|
||||
}
|
||||
if(this.info.birthday == null) {
|
||||
return this.$u.toast('请选择出生日期')
|
||||
}
|
||||
if(this.info.nation == null) {
|
||||
return this.$u.toast('请选择民族')
|
||||
}
|
||||
if(this.info.householdNumber == null || !this.info.householdNumber) {
|
||||
return this.$u.toast('请输入家庭人口数')
|
||||
}
|
||||
this.$u.toast(successText)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body {
|
||||
min-height: 100%;
|
||||
// height: 100vh;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
.formConfirm {
|
||||
.list-content {
|
||||
padding-bottom: 328px;
|
||||
.item {
|
||||
padding-left: 32px;
|
||||
position: relative;
|
||||
margin-bottom: 16px;
|
||||
background-color: #fff;
|
||||
.tips {
|
||||
position: absolute;
|
||||
top: 34px;
|
||||
left: 8px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32px;
|
||||
color: #F46;
|
||||
}
|
||||
.item-border {
|
||||
padding: 34px 32px 34px 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #D8DDE6;
|
||||
display: flex;
|
||||
.label {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32px;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
width: 200px;
|
||||
}
|
||||
.value {
|
||||
width: calc(100% - 200px);
|
||||
text-align: right;
|
||||
.u-input {
|
||||
display: inline-block;
|
||||
width: calc(100% - 40px);
|
||||
vertical-align: sub;
|
||||
}
|
||||
img {
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-left: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.color-999 {
|
||||
color: rgb(192, 196, 204);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom-btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #F5F5F5;
|
||||
div {
|
||||
margin-left: 32px;
|
||||
width: 686px;
|
||||
height: 88px;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
text-align: center;
|
||||
line-height: 86px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.confirm {
|
||||
background: #3975C6;
|
||||
color: #fff;
|
||||
}
|
||||
.cancel {
|
||||
color: #666;
|
||||
border: 1px solid #CCC;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,269 +0,0 @@
|
||||
<template>
|
||||
<div class="formEdit">
|
||||
<div class="title">
|
||||
<span></span>请确认并校准您输入的内容:
|
||||
</div>
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<div class="label">
|
||||
<span>户主姓名</span>
|
||||
<div class="edit" @click="editName=true">
|
||||
<img src="./img/edit.png" alt="">修改
|
||||
</div>
|
||||
</div>
|
||||
<div class="value">
|
||||
<u-input type="text" class="right" placeholder="请输入" height="44" input-align="center" v-model="info.name" :clearable="false" v-if="editName"></u-input>
|
||||
<span v-else>{{info.name || '请输入'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">
|
||||
<span>性别</span>
|
||||
<div class="edit" @click="showSex=true">
|
||||
<img src="./img/edit.png" alt="">修改
|
||||
</div>
|
||||
</div>
|
||||
<div class="value">
|
||||
<span>{{ $dict.getLabel('sex', info.sex) || '请选择'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">
|
||||
<span>联系电话</span>
|
||||
<div class="edit" @click="editPhone=true">
|
||||
<img src="./img/edit.png" alt="">修改
|
||||
</div>
|
||||
</div>
|
||||
<div class="value">
|
||||
<u-input type="text" class="right" placeholder="请输入" height="44" input-align="center" v-model="info.phone" :clearable="false" v-if="editPhone"></u-input>
|
||||
<span v-else>{{info.phone || '请输入'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">
|
||||
<span>出生日期</span>
|
||||
<div class="edit" @click="showDate=true">
|
||||
<img src="./img/edit.png" alt="">修改
|
||||
</div>
|
||||
</div>
|
||||
<div class="value">
|
||||
<span>{{info.birthday || '请选择'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">
|
||||
<span>民族</span>
|
||||
<div class="edit" @click="showNation=true">
|
||||
<img src="./img/edit.png" alt="">修改
|
||||
</div>
|
||||
</div>
|
||||
<div class="value">
|
||||
<span>{{ $dict.getLabel('nation', info.nation) || '请选择'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">
|
||||
<span>家庭人口数</span>
|
||||
<div class="edit" @click="editHouseholdNumber=true">
|
||||
<img src="./img/edit.png" alt="">修改
|
||||
</div>
|
||||
</div>
|
||||
<div class="value">
|
||||
<u-input type="text" class="right" placeholder="请输入" height="44" input-align="center" v-model="info.householdNumber" :clearable="false" v-if="editHouseholdNumber"></u-input>
|
||||
<span v-else>{{info.householdNumber || '请输入'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn">
|
||||
<div class="confirm" @click="toConfirm">确认使用</div>
|
||||
<div class="cancel" @click="back">取消输入</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'formEdit',
|
||||
data() {
|
||||
return {
|
||||
word: '',
|
||||
info: {},
|
||||
showSex: false,
|
||||
showNation: false,
|
||||
showDate: false,
|
||||
deteParams: {year: true, month: true, day: true, hour: false, minute: false, second: false},
|
||||
editName: false,
|
||||
editPhone: false,
|
||||
editHouseholdNumber: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
uni.showLoading({title: '加载中'})
|
||||
this.word = option.word
|
||||
this.$dict.load('sex', 'nation').then(() => {
|
||||
this.getInfo()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = '婚姻家庭纠纷入户登记表'
|
||||
},
|
||||
methods: {
|
||||
getInfo() {
|
||||
this.$http.post(`/app/appbaiduai/queryByInfo?word=${this.word}`).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.info = {...res.data}
|
||||
uni.hideLoading()
|
||||
}
|
||||
}).catch(res => {
|
||||
this.$u.toast(res)
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
confirmSex(e) {
|
||||
this.info.sex = e[0].value
|
||||
},
|
||||
confirmNation(e) {
|
||||
this.info.nation = e[0].value
|
||||
},
|
||||
dateConfirm(e) {
|
||||
this.info.birthday = `${e.year}-${e.month}-${e.day}`
|
||||
},
|
||||
toConfirm() {
|
||||
if(this.info.name == null || !this.info.name) {
|
||||
return this.$u.toast('请输入户主姓名')
|
||||
}
|
||||
if(this.info.sex == null) {
|
||||
return this.$u.toast('请选择性别')
|
||||
}
|
||||
if(this.info.phone == null || !this.info.phone) {
|
||||
return this.$u.toast('请输入联系电话')
|
||||
}
|
||||
if(this.info.birthday == null) {
|
||||
return this.$u.toast('请选择出生日期')
|
||||
}
|
||||
if(this.info.nation == null) {
|
||||
return this.$u.toast('请选择民族')
|
||||
}
|
||||
if(this.info.householdNumber == null || !this.info.householdNumber) {
|
||||
return this.$u.toast('请输入家庭人口数')
|
||||
}
|
||||
uni.navigateTo({url: `./formConfirm?word=${this.word}`})
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body {
|
||||
min-height: 100%;
|
||||
// height: 100vh;
|
||||
background: #fff;
|
||||
padding-top: 26px;
|
||||
}
|
||||
.formEdit {
|
||||
.title {
|
||||
padding-left: 32px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 32px;
|
||||
color: #000;
|
||||
line-height: 48px;
|
||||
margin-bottom: 22px;
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 6px;
|
||||
height: 28px;
|
||||
background: #3399FF;
|
||||
border-radius: 3px;
|
||||
margin-right: 18px;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
padding-bottom: 272px;
|
||||
.item {
|
||||
text-align: center;
|
||||
margin-bottom: 64px;
|
||||
.label {
|
||||
margin-bottom: 18px;
|
||||
span {
|
||||
color: #999;
|
||||
font-size: 40px;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
.edit {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #3072F5;
|
||||
vertical-align: text-bottom;
|
||||
img {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
margin: 0 12px 0 32px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
.value {
|
||||
width: calc(100% - 150px);
|
||||
.u-input, span{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #3975c6;
|
||||
font-size: 40px;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
line-height: 60px;
|
||||
}
|
||||
::v-deep .uni-input-input {
|
||||
color: #3975c6;
|
||||
font-size: 40px;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
line-height: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom-btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
div {
|
||||
margin-left: 32px;
|
||||
width: 686px;
|
||||
height: 88px;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
text-align: center;
|
||||
line-height: 86px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.confirm {
|
||||
background: #3975C6;
|
||||
color: #fff;
|
||||
}
|
||||
.cancel {
|
||||
color: #666;
|
||||
border: 1px solid #CCC;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 395 B |
Binary file not shown.
|
Before Width: | Height: | Size: 734 B |
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB |
Reference in New Issue
Block a user