falt:暂存

This commit is contained in:
Apcallover
2024-04-29 11:01:41 +08:00
parent e1580de161
commit 4d8d0335fb
10 changed files with 710 additions and 578 deletions

View File

@@ -1,16 +1,19 @@
<template>
<view class="">
<block v-for="(item, index) in dataSource" :key="item.id">
<view class="search-item" @click="toDetail(item)">
{{item.surveyTitle}}
<view style="flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{ item.workname }}
<view>
<view v-if="dataSource.length">
<block v-for="(item, index) in dataSource" :key="item.id">
<view class="search-item" @click="toDetail(item)">
{{item.surveyTitle}}
<view style="flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{ item.workname }}
</view>
<image src="../../static/img/eyeopen.svg" style="width: 32rpx;height: 32rpx;margin-right: 10rpx;"
mode="">
</image>
<view class="baddd"></view>
</view>
<image src="../../static/img/eyeopen.svg" style="width: 32rpx;height: 32rpx;margin-right: 10rpx;"
mode="">
</image>
<view class="baddd"></view>
</view>
</block>
</block>
</view>
<empty v-else content="暂无问卷" mrTop="300"></empty>
</view>
</template>
@@ -28,9 +31,15 @@
created() {
this.getList("refresh");
},
onReachBottom() {
this.getList();
},
onPullDownRefresh() {
this.getList("refresh");
},
methods: {
toDetail() {
toDetail(row) {
this.navTo(`/pageMy/setUserBase/sub/appliRecordsDeatil?id=${row.id}`)
},
async getList(type = 'add') {
if (type === "refresh") {
@@ -41,6 +50,7 @@
page: this.pageNumber
}
let resData = await getEmploymentSurveyManage(params)
uni.stopPullDownRefresh()
if (resData.data.code === 200) {
const {
current,

View File

@@ -113,6 +113,8 @@
addComplaint() {
if (this.isNext) {
this.isNext = false
} else {
return
}
this.$refs.uForm.validate().then(async (res) => {
let params = {

View File

@@ -15,8 +15,6 @@
<u-form-item label="咨询人电话:" prop="consultPhone" labelWidth="80" borderBottom>
<u--input v-model="fromData.consultPhone" border="surround" placeholder="请输入11位电话号码"></u--input>
</u-form-item>
</u--form>
<view class="btn_add">
<u-button type="primary" size="large" text="发送信件" @click="addConsult"></u-button>
@@ -84,7 +82,10 @@
addConsult() {
if (this.isNext) {
this.isNext = false
} else {
return
}
this.$refs.uForm.validate().then(async (res) => {
uni.showLoading({
title: '请求中'

View File

@@ -0,0 +1,101 @@
<template>
<view class="app_cotainer">
<view class="content">
<p>描述{{infoMation.surveyContent}}</p>
</view>
<u--form labelPosition="left" :fromData="fromData" :model="fromData" :rules="rules" ref="uForm1">
<u-form-item label="" prop="replyContent" labelWidth="80" borderBottom>
<u--textarea v-model="fromData.replyContent" placeholder="回复内容"></u--textarea>
</u-form-item>
</u--form>
<view class="btn_add">
<u-button type="primary" size="large" text="发送信件" @click="submit"></u-button>
</view>
</view>
</template>
<script>
const rules = {
'replyContent': {
type: 'string',
required: true,
message: '请填写投诉标题',
trigger: ['blur', 'change']
},
}
import {
queryByIdQuestionnaireSurveyInfo,
replyQuestionnaireSurveyInfo
} from '@/api/help.js'
export default {
data() {
return {
infoMation: {},
fromData: {},
rules: Object.assign({}, rules),
isNext: true,
}
},
onLoad({
id
}) {
this.getDetail(id)
},
created() {
},
methods: {
async submit() {
if (this.isNext) {
this.isNext = false
} else {
return
}
if (!this.fromData.replyContent) {
this.isNext = true
return this.$api.mag('请输入回复内容')
}
console.log('submit', this.fromData)
let params = {
surveyId: this.infoMation.id,
...this.fromData,
}
uni.showLoading({
title: '请求中'
})
let resData = await replyQuestionnaireSurveyInfo(params)
uni.hideLoading()
this.isNext = true
if (resData.data?.code === 200) {
uni.$u.toast(resData.data.msg)
this.$api.sleep(1000).then(() => {
uni.navigateBack(1)
})
}
},
getDetail(id) {
return new Promise(async (resolve, reject) => {
let resData = await queryByIdQuestionnaireSurveyInfo({
id
})
if (resData.data.code === 200) {
this.infoMation = resData.data.data
resolve(resData.data.data)
} else {
reject()
}
})
}
}
}
</script>
<style scoped>
.app_cotainer {
padding: 24rpx;
}
.content {
margin-bottom: 100rpx;
}
</style>