|
|
@@ -10,10 +10,26 @@
|
|
|
import { getQuestionReportDetail } from '@/api/questionReqort';
|
|
|
import { QuestionDetailRes } from '@/api/questionReqort/types';
|
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
|
-import { ref } from 'vue';
|
|
|
+import { computed, ref } from 'vue';
|
|
|
|
|
|
|
|
|
const questDetail = ref<QuestionDetailRes>()
|
|
|
+
|
|
|
+const statusText = computed(() => {
|
|
|
+ const status = questDetail.value?.status
|
|
|
+ if (status === 1) return '已解答'
|
|
|
+ if (status === 2) return '已上报'
|
|
|
+ return '待解答'
|
|
|
+})
|
|
|
+
|
|
|
+const personListText = computed(() => {
|
|
|
+ const personList = questDetail.value?.personList || ''
|
|
|
+ return personList
|
|
|
+ .split(/[,,、]+/)
|
|
|
+ .map(item => item.trim())
|
|
|
+ .filter(Boolean)
|
|
|
+ .join('、')
|
|
|
+})
|
|
|
onLoad(async (option) => {
|
|
|
if (option && option.id) {
|
|
|
const { id } = option;
|
|
|
@@ -31,6 +47,7 @@ onLoad(async (option) => {
|
|
|
<view class="value">{{ questDetail?.questionType }}</view>
|
|
|
<van-tag v-if="questDetail?.status === 0" color="red">待解答</van-tag>
|
|
|
<van-tag v-if="questDetail?.status === 1" color="green">已解答</van-tag>
|
|
|
+ <van-tag v-if="questDetail?.status === 2" color="#1989fa">已上报</van-tag>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 问题标题 -->
|
|
|
@@ -48,6 +65,25 @@ onLoad(async (option) => {
|
|
|
<view class="label">所在地:</view>
|
|
|
<view class="value">{{ questDetail?.addrName }}</view>
|
|
|
</view>
|
|
|
+ <view class="form-item">
|
|
|
+ <view class="label">状态:</view>
|
|
|
+ <view class="value">{{ statusText }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="form-item">
|
|
|
+ <view class="label">当事人:</view>
|
|
|
+ <view class="value" v-if="personListText">{{ personListText }}</view>
|
|
|
+ <view class="value text-[#e3e3e3]" v-else>暂无</view>
|
|
|
+ </view>
|
|
|
+ <view class="form-item">
|
|
|
+ <view class="label">联系人:</view>
|
|
|
+ <view class="value" v-if="questDetail?.contactPerson">{{ questDetail?.contactPerson }}</view>
|
|
|
+ <view class="value text-[#e3e3e3]" v-else>暂无</view>
|
|
|
+ </view>
|
|
|
+ <view class="form-item">
|
|
|
+ <view class="label">联系电话:</view>
|
|
|
+ <view class="value" v-if="questDetail?.contactPhone">{{ questDetail?.contactPhone }}</view>
|
|
|
+ <view class="value text-[#e3e3e3]" v-else>暂无</view>
|
|
|
+ </view>
|
|
|
<van-divider></van-divider>
|
|
|
<!-- 问题解答 -->
|
|
|
<view class="form-item">
|