This commit is contained in:
zwq 2025-06-22 21:32:20 +08:00
parent 6c73c78473
commit 566006e923
3 changed files with 23 additions and 8 deletions

View File

@ -36,6 +36,9 @@ export const rwflFindRwlxsByRwId = async (params: any) => {
export const rwzxSaveApi = async (params: any) => {
return await post("/api/rwzx/save", params);
};
export const rwzxExecutedInfoByRwIdAndJsApi = async (params: any) => {
return await get("/api/rwzx/executedInfoByRwIdAndJs", params);
};
export const rwFindInfoByRwId = async (params: any) => {

View File

@ -6,7 +6,7 @@
<view class="detail-header">
<view class="title-tag-row">
<text class="detail-title">{{ rw.rwmc }}</text>
<view class="tag" :class="messageDetail.tagType">{{ messageDetail.tagText }}</view>
<view class="tag" :class="rw.tagType">{{ rw.tagText }}</view>
</view>
<view class="detail-meta">
<text>{{ rw.rwkstime }}</text>
@ -18,7 +18,7 @@
</BasicForm>
</view>
<view class="detail-footer">
<view class="detail-footer" v-if="rwzxqds.length==0">
<button type="primary" class="action-button" @click="saveRwZx">处理</button>
</view>
</view>
@ -29,7 +29,7 @@
<script lang="ts" setup>
import {ref} from 'vue';
import {onLoad} from '@dcloudio/uni-app';
import {rwFindInfoByRwId, rwflFindRwlxsByRwId, rwzxSaveApi} from "@/api/base/server";
import {rwFindInfoByRwId, rwflFindRwlxsByRwId, rwzxExecutedInfoByRwIdAndJsApi, rwzxSaveApi} from "@/api/base/server";
import {useForm} from "@/components/BasicForm/hooks/useForm";
import {navigateBack, showToast} from "@/utils/uniapp";
import {useUserStore} from "@/store/modules/user";
@ -45,7 +45,7 @@ interface MessageDetail {
// Add other fields as necessary
}
const formData = ref({})
const formData: any = ref({})
const messageId = ref<string>('');
const messageDetail = ref<MessageDetail | null>({
id: 'todo1',
@ -65,7 +65,6 @@ const schema = reactive<FormsSchema[]>([])
const {getUser} = useUserStore()
async function saveRwZx() {
console.log(222, formData.value)
const result = [];
for (let i = 0; i < rwflx.value.length; i++) {
console.log(44, rwflx.value[i].id, formData.value[rwflx.value[i].id])
@ -87,6 +86,7 @@ async function saveRwZx() {
navigateBack()
}
const rwzxqds = ref([])
onLoad(async (options) => {
if (options && options.id) {
const {result} = await rwFindInfoByRwId({
@ -140,6 +140,18 @@ onLoad(async (options) => {
})
}
}
const res = await rwzxExecutedInfoByRwIdAndJsApi({
rwId: options.id,
mobile: getUser.mobile
});
if (res && res.result && res.result.length) {
rwzxqds.value = res.result;
const showData = {};
for (let i = 0; i < rwzxqds.value.length; i++) {
showData[rwzxqds.value[i].rwlxId] = rwzxqds.value[i].rwzxqdtx;
}
formData.value = showData;
}
} else {
console.error('Message ID/Data is missing!');
uni.showToast({title: '加载失败,缺少信息', icon: 'none'});

View File

@ -113,9 +113,9 @@ onMounted(() => {
});
const goToDetail = (data: any) => {
if (currentTab.value != 1) {
return;
}
// if (currentTab.value != 1) {
// return;
// }
// if(true){
// const encodedTitle = encodeURIComponent(" ()");
// uni.navigateTo({