Commit fbf9bc9f by pangchong

fix: bug修复

parent 7f8f1a83
...@@ -18,10 +18,10 @@ export const getMcoDetailsApi = (data, config) => { ...@@ -18,10 +18,10 @@ export const getMcoDetailsApi = (data, config) => {
}) })
} }
export const addBackApi = (data, config) => { export const getBackApi = (data, config) => {
return http({ return http({
method: 'POST', method: 'POST',
url: '/workbench/addBack', url: '/workbench/getBack',
data, data,
config config
}) })
......
...@@ -80,16 +80,6 @@ const useMcoStore = defineStore('mco', { ...@@ -80,16 +80,6 @@ const useMcoStore = defineStore('mco', {
} }
}, },
// 配置持久化 // 配置持久化
persist: { persist: false
// 调整为兼容多端的API
storage: {
setItem(key, value) {
uni.setStorageSync(key, value)
},
getItem(key) {
return uni.getStorageSync(key)
}
}
}
}) })
export default useMcoStore export default useMcoStore
import useUserStore from 'mocp/store/user' import useUserStore from 'mocp/store/user'
const baseURL = 'https://hna-platform.anyremote.cn' //测试 const baseURL = 'https://hna-platform.anyremote.cn' //测试
// const baseURL = 'https://moc.hnatechnic.com/api'//生产 // const baseURL = 'https://moc.hnatechnic.com/api' //生产
class ServiceLoading { class ServiceLoading {
open(loading) { open(loading) {
......
...@@ -11,6 +11,13 @@ ...@@ -11,6 +11,13 @@
<up-cell title="工作人" :value="getFeedBackDetails.staff || '-'"></up-cell> <up-cell title="工作人" :value="getFeedBackDetails.staff || '-'"></up-cell>
<up-cell title="总实际工时" :value="getFeedBackDetails.actualWork || '-'"></up-cell> <up-cell title="总实际工时" :value="getFeedBackDetails.actualWork || '-'"></up-cell>
<up-cell title="反馈内容" :label="getFeedBackDetails.content || '无'"></up-cell> <up-cell title="反馈内容" :label="getFeedBackDetails.content || '无'"></up-cell>
<up-cell title="附件">
<template #label>
<view style="margin-top: 16rpx">
<global-upload :fileList="contentFile" :showUpload="false"></global-upload>
</view>
</template>
</up-cell>
</up-cell-group> </up-cell-group>
</view> </view>
</template> </template>
...@@ -20,9 +27,25 @@ ...@@ -20,9 +27,25 @@
<script setup> <script setup>
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import useMcoStore from 'mocp/store/mco' import useMcoStore from 'mocp/store/mco'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { getBackApi } from 'mocp/api/mco'
const mcoStore = useMcoStore() const mcoStore = useMcoStore()
const { getFeedBackDetails } = storeToRefs(mcoStore) const { getFeedBackDetails, feedBackType, details } = storeToRefs(mcoStore)
//获取文件
const contentFile = ref()
const getBack = async () => {
const res = await getBackApi({ stepType: feedBackType.value, mcoNumber: details.value?.mcoNumber }, { loading: true })
if (res.code == 200) {
contentFile.value = res.data[0].contentFile
} else {
uni.$mocpMessage.error(res.message)
}
}
onLoad(() => {
getBack()
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mocp-cell { .mocp-cell {
......
...@@ -21,6 +21,13 @@ ...@@ -21,6 +21,13 @@
<up-cell title="工作人" :value="getStepBackDetails.staff || '-'"></up-cell> <up-cell title="工作人" :value="getStepBackDetails.staff || '-'"></up-cell>
<up-cell title="实际工时" :value="getStepBackDetails.actualWork || '-'"></up-cell> <up-cell title="实际工时" :value="getStepBackDetails.actualWork || '-'"></up-cell>
<up-cell title="反馈内容" :label="getStepBackDetails.content || '无'"></up-cell> <up-cell title="反馈内容" :label="getStepBackDetails.content || '无'"></up-cell>
<up-cell title="附件">
<template #label>
<view style="margin-top: 16rpx">
<global-upload :fileList="getStepBackDetails.contentFile" :showUpload="false"></global-upload>
</view>
</template>
</up-cell>
</up-cell-group> </up-cell-group>
</view> </view>
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment