|
|
@ -8,9 +8,9 @@ |
|
|
|
<!-- TODO: 可能会有多个交付物 需要遍历 或者展示第一个 --> |
|
|
|
<!-- TODO: 应该是交付物的名称 --> |
|
|
|
<view class="flex-1"> |
|
|
|
<span class="relative px-1"> |
|
|
|
<span class="relative px-1" v-if="deliver && deliver.deliverName"> |
|
|
|
<u-badge :is-dot="true" is-center v-if="uBadgeShow"></u-badge> |
|
|
|
{{ task.name }} |
|
|
|
{{ deliver.deliverName }} |
|
|
|
</span> |
|
|
|
</view> |
|
|
|
|
|
|
@ -66,8 +66,8 @@ |
|
|
|
<script setup> |
|
|
|
import { ref, computed} from 'vue'; |
|
|
|
|
|
|
|
const taskRef = defineProps({ task: { type: Object, default: () => {} } }) |
|
|
|
// console.log(taskRef.task.name) |
|
|
|
const props = defineProps({ task: { type: Object, default: () => {} } }) |
|
|
|
// console.log(props.task.name) |
|
|
|
|
|
|
|
|
|
|
|
// 插件名称 |
|
|
@ -77,15 +77,29 @@ const linkValue = ref(''); // 链接的值 |
|
|
|
const historyIcon = ref(false); // 查看历史记录的图标 |
|
|
|
const showMask = ref(false); // 编辑和删除页面 |
|
|
|
const showEditModal = ref(false); // 编辑交付物标题的modal |
|
|
|
const newInputRef = ref(taskRef.task.name); // 修改的插件名的值 |
|
|
|
const newInputRef = ref(props.task.name); // 修改的插件名的值 |
|
|
|
// const reviewerData = ref(); // 获取选中的审核人 |
|
|
|
const showDeleteModal = ref(false) // 删除二次提示的modal |
|
|
|
const content = ref('是否确定删除') |
|
|
|
const uBadgeShow = ref(false) //u-badge的显示与隐藏 |
|
|
|
const deliver = ref(null); |
|
|
|
|
|
|
|
// 判断提交按钮的状态 |
|
|
|
const submitState = computed(() => !linkValue.value); |
|
|
|
|
|
|
|
// 根据任务id获取交付物信息 |
|
|
|
(async function getDeliverData() { |
|
|
|
try{ |
|
|
|
const { id: taskId } = props.task; |
|
|
|
if (!taskId) return; |
|
|
|
const param = { "taskId": props.task.id } |
|
|
|
const data = await uni.$u.api.getDeliverByTaskId(param) |
|
|
|
deliver.value = data; |
|
|
|
}catch(error){ |
|
|
|
console.log('error: ', error); |
|
|
|
uni.$ui.showToast('获取交付物信息失败'); |
|
|
|
} |
|
|
|
})(); |
|
|
|
|
|
|
|
// 提交后验证链接并修改状态 |
|
|
|
function submit() { |
|
|
@ -115,7 +129,6 @@ function paste() { |
|
|
|
} |
|
|
|
|
|
|
|
// 文件上传 |
|
|
|
|
|
|
|
async function uploadFile(){ |
|
|
|
try{ |
|
|
|
const data = await uni.$upload.chooseAndUpload('https://test.tall.wiki/filedeal/file/upload/multiple',{}, ['.xls', '.xlsx','.zip','.exe','.pdf','.doc','.docx','.ppt','.pptx'] , 'files') |
|
|
@ -129,7 +142,6 @@ async function uploadFile(){ |
|
|
|
|
|
|
|
// 拍照上传 |
|
|
|
async function uploadPhoto() { |
|
|
|
|
|
|
|
try{ |
|
|
|
const data = await uni.$upload.chooseAndUpload('https://test.tall.wiki/filedeal/file/upload/multiple',{}, ['.xls', '.xlsx','.zip','.exe','.pdf','.doc','.docx','.ppt','.pptx'] , 'files') |
|
|
|
// console.log(data[0]) |
|
|
@ -137,7 +149,6 @@ async function uploadPhoto() { |
|
|
|
}catch(error){ |
|
|
|
console.error('error: ', error); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 确定修改交付物名称 |
|
|
|