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

@@ -7,7 +7,17 @@ import {
//轮播图
export const getEmploymentSurveyManage = (params) => request({
url: '/api/jobslink-api/content/employmentSurveyManage/list',
url: '/api/jobslink-api/content/questionnaireSurveyInfo/list',
method: 'get',
params
});
export const queryByIdQuestionnaireSurveyInfo = (params) => request({
url: '/api/jobslink-api/content/questionnaireSurveyInfo/queryById',
method: 'get',
params
});
export const replyQuestionnaireSurveyInfo = (params) => request({
url: '/api/jobslink-api/content/questionnaireSurveyInfo/reply',
method: 'post',
data: params
});

View File

@@ -1,5 +1,6 @@
<template>
<view class="">
<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}}
@@ -12,6 +13,8 @@
</view>
</block>
</view>
<empty v-else content="暂无问卷" mrTop="300"></empty>
</view>
</template>
<script>
@@ -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>

View File

@@ -707,13 +707,21 @@
}
},
{
"path": "help/mailbox",
"path": "setUserBase/applicationsRecord",
"style": {
"navigationBarTitleText": "咨询信箱列表",
"navigationBarTitleText": "问卷调查列表",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "setUserBase/sub/appliRecordsDeatil",
"style": {
"navigationBarTitleText": "问卷调查",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": false
}
},
{
"path": "help/questions/questionDetail",
"style": {

View File

@@ -62,7 +62,7 @@
咨询信箱
<image src="../../static/img/right.svg" mode=""></image>
</view>
<view class="btnList" @click="navTo('/pageMy/help/mailbox')">
<view class="btnList" @click="navTo('/pageMy/setUserBase/applicationsRecord')">
<image src="../../static/img/phone.svg" mode=""></image>
问卷调查
<image src="../../static/img/right.svg" mode=""></image>

View File

@@ -3,10 +3,10 @@ module.exports = {
port: 1887,
proxy: {
'/api': {
target: 'http://192.168.1.101:8200',
target: 'http://10.165.0.173:8000',
ws: true,
pathRewrite: {
'^/api/jobslink-api': '/'
'^/api': '/'
}
},
'/qq/map': {