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) => { export const rwzxSaveApi = async (params: any) => {
return await post("/api/rwzx/save", params); 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) => { export const rwFindInfoByRwId = async (params: any) => {

View File

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

View File

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