优化调试
This commit is contained in:
parent
34d22642ef
commit
689d9b0efd
|
|
@ -14,7 +14,8 @@
|
||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "意见收集"
|
"navigationBarTitleText": "custom",
|
||||||
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content" v-if="!isError">
|
<!-- <view class="content" v-if="!isError">
|
||||||
<text class="text-box">   {{ taskDescribe }} </text>
|
<text class="text-box">   {{ taskDescribe }} </text>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
@tap="onSubmitOptions"
|
@tap="onSubmitOptions"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -36,8 +36,11 @@ const getTaskDetailsData = async () => {
|
||||||
taskType.value = res.type
|
taskType.value = res.type
|
||||||
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
isError.value = false
|
// isError.value = false
|
||||||
taskDescribe.value = res.data.taskDescribe
|
// taskDescribe.value = res.data.taskDescribe
|
||||||
|
uni.redirectTo({
|
||||||
|
url: `/pages/opinion/index?taskId=${taskId.value}&taskType=${taskType.value}`,
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
isError.value = true
|
isError.value = true
|
||||||
uni.redirectTo({ url: `/pages/error/index?code=${res.code}&time=${res.data.startTime}` })
|
uni.redirectTo({ url: `/pages/error/index?code=${res.code}&time=${res.data.startTime}` })
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
<text class="text-box">   {{ taskDescribe }} </text>
|
||||||
|
|
||||||
<!-- 意见收集 -->
|
<!-- 意见收集 -->
|
||||||
<template v-if="!isSuccess">
|
<template v-if="!isSuccess">
|
||||||
<up-form
|
<up-form
|
||||||
|
|
@ -106,11 +108,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { submitOptionsApi } from '@/services/options.js'
|
import { submitOptionsApi, getTaskDetailsApi } from '@/services/options.js'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
const sendLoading = ref(false)
|
const sendLoading = ref(false)
|
||||||
|
const taskDescribe = ref('')
|
||||||
|
|
||||||
// 表单数据源
|
// 表单数据源
|
||||||
const opinionModel = ref({
|
const opinionModel = ref({
|
||||||
|
|
@ -148,9 +151,18 @@ const opinionRules = ref({
|
||||||
|
|
||||||
const isRequired = ref(false)
|
const isRequired = ref(false)
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad(async (option) => {
|
||||||
if (option.taskId) {
|
if (option.taskId) {
|
||||||
opinionModel.value.taskId = option.taskId
|
opinionModel.value.taskId = option.taskId
|
||||||
|
|
||||||
|
const { data: res } = await getTaskDetailsApi({
|
||||||
|
id: option.taskId,
|
||||||
|
})
|
||||||
|
|
||||||
|
if (res.code == 200) {
|
||||||
|
// isError.value = false
|
||||||
|
taskDescribe.value = res.data.taskDescribe
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (option.taskType && option.taskType == 1) {
|
if (option.taskType && option.taskType == 1) {
|
||||||
isRequired.value = true
|
isRequired.value = true
|
||||||
|
|
@ -327,6 +339,12 @@ const afterRead = async (event) => {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
.text-box {
|
||||||
|
padding: 20px;
|
||||||
|
line-height: 2.2;
|
||||||
|
font-size: 12px;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
::v-deep .opinion-form {
|
::v-deep .opinion-form {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue