Browse Source

feat: 审核插件的通过与驳回功能

deliver
Min5203 4 years ago
parent
commit
03a7c35d72
  1. 3
      CHANGELOG.md
  2. 21
      common/styles/tailwind.scss
  3. 25
      common/styles/theme/default.scss
  4. 82
      plugins/p-deliver-checker/p-deliver-checker.vue
  5. 20
      plugins/p-deliver/p-deliver.vue

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 1.0.0 (2022-01-17) # 1.0.0 (2022-01-18)
### 🌟 新功能 ### 🌟 新功能
范围|描述|commitId 范围|描述|commitId
@ -74,6 +74,7 @@
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
- | 交付物插件代码审查 | [5f4d47b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5f4d47b) - | 交付物插件代码审查 | [5f4d47b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5f4d47b)
- | 审核插件的基本信息展示 | [4f2815f](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/4f2815f)
- | 完善历史记录页面和修改插件的TODO | [3d58c15](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3d58c15) - | 完善历史记录页面和修改插件的TODO | [3d58c15](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3d58c15)
- | 项目列表 | [0486e98](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/0486e98) - | 项目列表 | [0486e98](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/0486e98)
- | 修改插件名的输入框和查看历史记录 | [99fb88e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/99fb88e) - | 修改插件名的输入框和查看历史记录 | [99fb88e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/99fb88e)

21
common/styles/tailwind.scss

@ -2213,7 +2213,13 @@
.border-l-2 { .border-l-2 {
border-left-width: 2px; border-left-width: 2px;
} }
.border-b{
border-bottom-width: 1px;
}
.border-gray-400{
--tw-border-opacity: 1;
border-color: rgba(156, 163, 175, var(--tw-border-opacity));
}
.border-gray-300 { .border-gray-300 {
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgba(209, 213, 219, var(--tw-border-opacity)); border-color: rgba(209, 213, 219, var(--tw-border-opacity));
@ -4563,7 +4569,20 @@ border-radius: 0.375rem;
.w-32{ .w-32{
width: 8rem width: 8rem
} }
.w-58{
width: 14.5rem;
}
.h-16{
height: 4rem;
}
.break-all{ .break-all{
word-break: break-all; word-break: break-all;
} }
.h-1-4{
height: 1.4rem;
}
.leading-1-4{
line-height: 1.4rem;
}

25
common/styles/theme/default.scss

@ -30,18 +30,13 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 50%; height: 100%;
} }
.rect { .rect {
width: 80%; width: 80%;
height: 375rpx; height: 375rpx;
background-color: #fff; background-color: #fff;
} }
.rect2{
width: 80%;
height: 500rpx;
background-color: #fff;
}
.linkBox{ .linkBox{
::v-deep .input{ ::v-deep .input{
.u-input__input{ .u-input__input{
@ -49,4 +44,22 @@
} }
} }
} }
// 审核插件
.common-list{
height: 12.5rem;
overflow-y: scroll;
view{
border-bottom: 1px solid #E5E7EB;
}
}
.rect2{
width: 80%;
height: 1000rpx;
background-color: #fff;
}
.rect3{
width: 80%;
height: 895rpx;
background-color: #fff;
}
} }

82
plugins/p-deliver-checker/p-deliver-checker.vue

@ -22,8 +22,8 @@
<!-- 当前审核人自己 --> <!-- 当前审核人自己 -->
<view class="mt-3"> <view class="mt-3">
<span class="text-sm mr-4">冯教授</span> <span class="text-sm mr-4">冯教授</span>
<u-button size="mini" shape="circle" class="btn mr-4" type="primary" @click="approved">通过</u-button> <u-button size="mini" shape="circle" class="mr-4 h-1-4 leading-1-4" type="primary" @click="approved">通过</u-button>
<u-button size="mini" shape="circle" class="btn" type="error" @click="rebut">驳回</u-button> <u-button size="mini" shape="circle" class="h-1-4 leading-1-4" type="error" @click="rebut">驳回</u-button>
</view> </view>
<!-- 其他审核人 --> <!-- 其他审核人 -->
<view class="mt-3 text-sm flex justify-between"> <view class="mt-3 text-sm flex justify-between">
@ -65,11 +65,52 @@
</view> </view>
</view> </view>
<view> <view>
<u-input :border="true" class="m-5" placeholder="请输入通过建议" type="textarea"></u-input> <textarea class="border-solid border border-gray-300 m-5 w-58 h-16 p-2 rounded-md"
placeholder="请输入通过建议"
maxlength="30"
v-model="adviceRef"
></textarea>
<!-- <view @click="adviceRef = '加油,再接再厉!' " class="mx-5">
加油再接再厉
</view> -->
<view class="common-list">
<view v-for="item in commonWords" class="h-12 leading-12 w-62 mx-5" @click="adviceRef = item">
{{item}}
</view>
</view>
</view> </view>
<view class="flex justify-around h-12 mt-7 justify-self-stretch boxModalBorder"> <view class="flex justify-around h-12 mt-7 justify-self-stretch boxModalBorder">
<view class="leading-12 flex-1 text-center deleteModalBorder"> 取消 </view> <view class="leading-12 flex-1 text-center deleteModalBorder" @click="approvedModal = false"> 取消 </view>
<view class="text-blue-700 leading-12 flex-1 text-center"> 确定 </view> <view class="text-blue-700 leading-12 flex-1 text-center" @click="confirmAdvice"> 确定 </view>
</view>
</view>
</view>
</u-mask>
<!-- 审批驳回的modal -->
<u-mask :show="rebutModal" @click="rebutModal = false">
<view class="warp">
<view class="rect3" @tap.stop>
<!-- 通过modal的标题 -->
<view class="text-center my-6 font-semibold"> 审核驳回 </view>
<view>
<textarea class="border-solid border border-gray-300 m-5 w-58 h-16 p-2 rounded-md"
placeholder="请输入通过建议"
maxlength="30"
v-model="rebutRef"
></textarea>
<!-- <view @click="adviceRef = '加油,再接再厉!' " class="mx-5">
加油再接再厉
</view> -->
<view class="common-list">
<view v-for="item in rebutWordes" class="h-12 leading-12 w-62 mx-5" @click="rebutRef = item">
{{item}}
</view>
</view>
</view>
<view class="flex justify-around h-12 mt-7 justify-self-stretch boxModalBorder">
<view class="leading-12 flex-1 text-center deleteModalBorder" @click="rebutModal = false"> 取消 </view>
<view class="text-blue-700 leading-12 flex-1 text-center" @click="confirmReject"> 确定 </view>
</view> </view>
</view> </view>
</view> </view>
@ -80,29 +121,44 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
const nameRef = ref('入职插件V0.8原型输出'); const nameRef = ref('入职插件V0.8原型输出');
const iconRef = ref(false); const iconRef = ref(false);
const submitter = ref('黛西'); const submitter = ref('黛西');
const timeRef = ref('12/28 15:55'); const timeRef = ref('12/28 15:55');
const approvedModal = ref(false); const approvedModal = ref(false); //modal
const score = ref(1); const rebutModal = ref(false) //modal
const score = ref(1); //
const adviceRef = ref('') //
const rebutRef = ref('') //
const commonWords = ['加油,再接再厉!','很棒!','不错,很详细!','加油,再接再厉'] //
const rebutWordes = ['不详细','还有需要改进的地方','驳回审批1','驳回审批2'] //
//
function approved() { function approved() {
// console.log('') // console.log('')
approvedModal.value = true; approvedModal.value = true;
} }
//
function rebut() { function rebut() {
rebutModal.value = true
console.log('驳回'); console.log('驳回');
} }
//
function confirmAdvice(){
// TODO:
// console.log('')
approvedModal.value = false
}
//
function confirmReject(){
// TODO:
rebutModal.value = false
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.btn {
height: 1.4rem;
line-height: 1.4rem;
}
.progressDot { .progressDot {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;

20
plugins/p-deliver/p-deliver.vue

@ -70,14 +70,14 @@
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
const props = defineProps({ task: { type: Object, default: () => {} } }); const props = defineProps({ task: { type: Object, default: () => {} } });
// console.log(props.task.name)
// //
const deliverRef = ref(true); // const deliverRef = ref(true); //
const linkValue = ref(''); // const linkValue = ref(''); //
const showMask = ref(false); // const showMask = ref(false); //
const showEditModal = ref(false); // modal const showEditModal = ref(false); // modal
const newInputRef = ref(taskRef.task.name); // const newInputRef = ref(''); //
const showDeleteModal = ref(false); // modal const showDeleteModal = ref(false); // modal
const content = '是否确定删除'; const content = '是否确定删除';
const uBadgeShow = ref(false); // u-badge const uBadgeShow = ref(false); // u-badge
@ -98,20 +98,7 @@ const submitState = computed(() => !linkValue.value);
console.log('error: ', error); console.log('error: ', error);
uni.$ui.showToast('获取交付物信息失败'); uni.$ui.showToast('获取交付物信息失败');
} }
}()); })();
// (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() { function submit() {
@ -177,6 +164,7 @@ function confirmEditDeliverName() {
// TODO: // TODO:
uni.$ui.showToast('输入不能为空'); uni.$ui.showToast('输入不能为空');
} else { } else {
// //
showEditModal.value = false; showEditModal.value = false;
showMask.value = false; showMask.value = false;

Loading…
Cancel
Save