diff --git a/CHANGELOG.md b/CHANGELOG.md index c6e6d54..2959082 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - | 日历页首页 | [561c8e6](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/561c8e6) - | 日历页添加 | [1b46a91](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b46a91) - | 审核插件的基本信息展示 | [aa4f17f](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/aa4f17f) + - | 审核插件的通过与驳回功能 | [03a7c35](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/03a7c35) - | 时间轴接口 | [a95d005](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a95d005) - | 时间轴页面 | [e926b75](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/e926b75) - | 时间轴展示 | [8b1b380](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8b1b380) diff --git a/apis/plugin.js b/apis/plugin.js index a3616b5..9be2729 100644 --- a/apis/plugin.js +++ b/apis/plugin.js @@ -1,13 +1,12 @@ import Config from '@/common/js/config.js'; -const apiUrl = Config.apiUrl; +const { apiUrl } = Config; const defaultwbs = `${apiUrl}/defaultwbs`; export function setupPlugin(app) { uni.$u.api = { ...uni.$u.api } || {}; // 获取插件信息 - uni.$u.api.getOtherPlugin = param => - uni.$u.post(`${apiUrl}/pluginshop/plugin/query?pluginId=${param.pluginId}&styleType=${param.styleType}`); + uni.$u.api.getOtherPlugin = param => uni.$u.post(`${apiUrl}/pluginshop/plugin/query?pluginId=${param.pluginId}&styleType=${param.styleType}`); // 查询子任务 uni.$u.api.findSonTask = param => uni.$u.post(`${defaultwbs}/task/findSonTask`, param); @@ -19,6 +18,7 @@ export function setupPlugin(app) { uni.$u.api.queryDeliverOfTask = param => uni.$u.post(`${defaultwbs}/deliver/queryDeliverOfTask`, param); // 检查交付物 uni.$u.api.checkDeliver = param => uni.$u.post(`${defaultwbs}/deliver/checkDeliver`, param); + // v4.0 // 根据任务id获取任务的交付物信息 uni.$u.api.getDeliverByTaskId = param => uni.$u.post(`${defaultwbs}/deliver/getDeliver`, param); } diff --git a/common/styles/theme/default.scss b/common/styles/theme/default.scss index 61807d2..bc7e4d8 100644 --- a/common/styles/theme/default.scss +++ b/common/styles/theme/default.scss @@ -4,13 +4,7 @@ .u-card { font-size: 16px !important; background-color: #f3f3f3 !important; - .btns{ - color: #007aff; - } - .active { - background-color: #2979ff; - color: #ffffff; - } + .mask { position: absolute; top: 0; @@ -19,10 +13,10 @@ height: 100%; z-index: 100; } - .boxModalBorder{ + .box-modal-border{ border-top:1px solid #D1D5DB; } - .deleteModalBorder{ + .delete-modal-border{ border-right:1px solid #D1D5DB ; } } diff --git a/components/Reviewer/Reviewer.vue b/components/Reviewer/Reviewer.vue index 135b903..59764e1 100644 --- a/components/Reviewer/Reviewer.vue +++ b/components/Reviewer/Reviewer.vue @@ -1,110 +1,44 @@ - - diff --git a/plugins/p-deliver-checker/p-deliver-checker.vue b/plugins/p-deliver-checker/p-deliver-checker.vue index 6a92759..8548b9f 100644 --- a/plugins/p-deliver-checker/p-deliver-checker.vue +++ b/plugins/p-deliver-checker/p-deliver-checker.vue @@ -79,8 +79,8 @@ - - 取消 + + 取消 确定 @@ -108,8 +108,8 @@ - - 取消 + + 取消 确定 diff --git a/plugins/p-deliver/p-deliver.vue b/plugins/p-deliver/p-deliver.vue index 8f33fc1..66c8fea 100644 --- a/plugins/p-deliver/p-deliver.vue +++ b/plugins/p-deliver/p-deliver.vue @@ -22,13 +22,13 @@ - - - + - 粘贴 - 文件 - 拍照 + 粘贴 + 文件 + 拍照 @@ -39,30 +39,26 @@ > 删除 - + - 交付物标题名称 - - - + 交付物标题名称 + - - 取消 - 确定 + + 取消 + 确定 - - - + @@ -71,13 +67,12 @@ import { ref, computed } from 'vue'; const props = defineProps({ task: { type: Object, default: () => {} } }); - // 插件名称 const deliverRef = ref(true); // 交付物插件的显示与销毁 const linkValue = ref(''); // 链接的值 const showMask = ref(false); // 编辑和删除页面 const showEditModal = ref(false); // 编辑交付物标题的modal -const newInputRef = ref(''); // 修改的插件名的值 +const newInputRef = ref(props.task.name); // 修改的插件名的值 const showDeleteModal = ref(false); // 删除二次提示的modal const content = '是否确定删除'; const uBadgeShow = ref(false); // u-badge的显示与隐藏 @@ -98,17 +93,31 @@ const submitState = computed(() => !linkValue.value); console.log('error: ', error); uni.$ui.showToast('获取交付物信息失败'); } -})(); +}()); -// 提交后验证链接并修改状态 -function submit() { +// 验证提交的交付物信息格式 +function validateDeliverForm() { const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/; if (!reg.test(linkValue.value)) { // 显示toast信息 uni.$ui.showToast('请输入正确的链接'); - } else { - uBadgeShow.value = true; + return false; + } + // 没有检查人 提示选择检查人 + if (!checkedDelivers.value || !checkedDelivers.value.length) { + uni.$ui.showToast('请选择检查人'); + return false; } + return true; +} + +// 提交后验证链接并修改状态 +function submit() { + if (!validateDeliverForm()) return; + // else { + // // + // uBadgeShow.value = true; + // } } // 查看历史记录 @@ -164,7 +173,6 @@ function confirmEditDeliverName() { // TODO: 提示不能为空 uni.$ui.showToast('输入不能为空'); } else { - // 请求成功 才会清空 请求失败保留 showEditModal.value = false; showMask.value = false; @@ -178,20 +186,19 @@ function confirmEditDeliverName() { function deleteDeliver() { showDeleteModal.value = true; } -// 删除二次确认 -async function confirmDelete() { +// 二次确认后删除 +async function confirmDeleDte() { // TODO: 删除二次确认 // TODO: 确定后 发删除交付物的请求 try { showDeleteModal.value = true; + deliverRef.value = false; await uni.$u.api.deleteDeliver(); uni.$ui.showToast('删除交付物成功'); } catch (error) { console.error('error: ', error); } - deliverRef.value = false; } - +