pull/1/head
Dragon 1 year ago
parent fd41813169
commit 7061efe2ec

@ -61,74 +61,98 @@ defineExpose({
</script> </script>
<template> <template>
<n-modal v-model:show="show" transform-origin="center"> <n-modal v-model:show="show" transform-origin="center" class="modal_wrap">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true"> <div class="wrapper">
<div class="wrapper"> <div class="closed">
<div class="close" @click="closeModal"> <SvgIcon
<SvgIcon size="24" name="clear" /> style="cursor: pointer"
</div> name="cut-down"
<div class="wrapper-header"> width="32"
<span style="font-weight: bold;">任务小结重复任务</span> @click="closeModal"
<span><span class="count">{{ total }}</span></span> />
</div>
<div class="wrapper-header">
<div style="font-weight: bold;">
任务小结重复任务
</div> </div>
<div class="wrapper-content"> <div><span class="total">{{ total }}</span></div>
<n-scrollbar style="max-height: 200px;"> </div>
<div v-for="item in detail" :key="item.id" class="item"> <div class="wrapper-content">
<!-- <div class="imgwrapper" /> --> <n-scrollbar style="max-height: 214px;">
<img class="imgwrapper" :src="item.imgUrl"> <div v-for="item in detail" :key="item.id" class="item">
<n-grid x-gap="12" y-gap="0" :cols="12"> <!-- <div class="imgwrapper" /> -->
<n-gi span="4"> <img class="imgwrapper" :src="item.imgUrl">
<span style="color:#8b8d8f;">任务小结内容:</span> <n-grid x-gap="12" y-gap="0" :cols="12">
</n-gi> <n-gi span="3">
<n-gi span="8"> <span style="color:#8b8d8f;">任务小结内容:</span>
<span>{{ item.content }}</span> </n-gi>
</n-gi> <n-gi span="8">
<n-gi span="4"> <span>{{ item.content }}</span>
<span style="color:#8b8d8f;">任务重复数量</span> </n-gi>
</n-gi> <n-gi span="3">
<n-gi span="8"> <span style="color:#8b8d8f;">任务重复数量</span>
<span><span class="count">{{ item.count }}</span></span> </n-gi>
</n-gi> <n-gi span="8">
</n-grid> <span><span class="count">{{ item.count }}</span></span>
</div> </n-gi>
</n-scrollbar> </n-grid>
<div class="footer">
<SvgIcon style="cursor: pointer;" name="r1" width="162" height="54" @click="reject" />
<SvgIcon style="cursor: pointer;" name="r4" width="162" height="54" @click="viewRepeat" />
</div> </div>
</n-scrollbar>
<div class="footer">
<SvgIcon style="cursor: pointer;" name="r1" width="162" height="54" @click="reject" />
<SvgIcon style="cursor: pointer;" name="r4" width="162" height="54" @click="viewRepeat" />
</div> </div>
</div> </div>
</n-card> </div>
</n-modal> </n-modal>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>
.modal_wrap {
background-image: url(../../../assets/images/approval_modal_bg.png);
background-repeat: no-repeat;
background-size: 100%;
width: 700px;
height: 500px;
box-shadow: none !important;
}
.wrapper { .wrapper {
display: flex; position: absolute;
position: relative; left: calc(50% - 350px);
flex-direction: column; .closed {
position: relative;
.close{ top: 0px;
position:absolute; left: 90%;
right: 0px;
top:-45px;
cursor: pointer;
} }
.wrapper-header {
&-header { padding-top: 40px;
display: flex; text-align: center;
flex-direction: column; .wrapper-title {
justify-content: center; text-align: center;
align-items: center; font-size: 16px;
padding: 10px; font-family: PingFang SC, PingFang SC-Semibold;
height: 60px; font-weight: Semibold;
text-align: center;
color: #333333;
line-height: 32px;
}
.wrapper-mark {
text-align: center;
font-size: 13px;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Regular;
font-weight: Regular;
text-align: center;
color: #666666;
line-height: 18px;
}
} }
&-content { &-content {
flex: 1; flex: 1;
border-radius: 8px; border-radius: 8px;
background-color: #FFF;
padding: 16px; padding: 16px;
padding-top: 0;
margin: 45px 12px 35px 38px;
.imgwrapper { .imgwrapper {
width: 160px; width: 160px;
@ -153,25 +177,93 @@ defineExpose({
margin-top: 20px; margin-top: 20px;
} }
} }
// .wrapper-content {
// flex: 1;
// border-radius: 8px;
// margin: 105px 60px 35px 120px;
// .item {
// display: flex;
// flex-flow: row nowrap;
// align-items: center;
// margin: 20px 0;
// }
// .imgwrapper {
// width: 200px;
// height: 120px;
// margin-right: 20px;
// border-radius: 8px;
// background-image: url("../../../assets/images/test.png");
// background-repeat: no-repeat;
// background-size: cover;
// }
// .content {
// .task_id {
// font-size: 14px;
// font-family: PingFang SC, PingFang SC-Regular;
// font-weight: Regular;
// text-align: left;
// color: #333333;
// line-height: 20px;
// }
// .tag_box {
// display: flex;
// flex-flow: row nowrap;
// margin: 8px 0;
// .tag_item {
// background: rgba(80, 122, 253, 0.1);
// border-radius: 2px;
// font-size: 12px;
// font-family: PingFang SC, PingFang SC-Regular;
// font-weight: Regular;
// text-align: left;
// color: #507afd;
// line-height: 16px;
// margin-right: 10px;
// }
// .error {
// background: rgba(255, 78, 79, 0.1);
// color: #ff4e4f;
// }
// }
// .time_box {
// font-size: 14px;
// font-family: PingFang SC, PingFang SC-Regular;
// font-weight: Regular;
// text-align: left;
// color: #333333;
// line-height: 20px;
// }
// }
// .mark_text {
// font-size: 13px;
// font-family: PingFang SC, PingFang SC-Regular;
// font-weight: Regular;
// text-align: left;
// color: #666666;
// line-height: 16px;
// }
// .footer {
// display: flex;
// flex-flow: row nowrap;
// align-items: center;
// justify-content: center;
// margin: 20px 30px 0 0;
// }
// }
.count { .count {
color: #6684fa; color: #6684fa;
font-weight: bold; font-weight: bold;
font-size: 16px;
margin: 0px 5px margin: 0px 5px
} }
}
::v-deep(.n-card.n-card--content-segmented > .n-card__content:not(:first-child)) { .total {
border: 0px; color: #6684fa;
} font-weight: bold;
font-size: 22px;
::v-deep(.n-card > .n-card-header) { margin: 0px 5px
--n-padding-top: 0px; }
--n-padding-bottom: 12px;
}
::v-deep(.n-divider:not(.n-divider--vertical)) {
margin-top: 0px;
margin-bottom: 0px;
} }
</style> </style>

@ -0,0 +1,177 @@
<script lang="ts" setup>
import { reactive, ref, toRefs } from 'vue'
import { repetitionTask } from '@/api/final/index'
const emit = defineEmits<{
(e: 'reject', params: any)
(e: 'viewrepeat')
}>()
const cardStyle = {
'width': '450px',
'--n-padding-bottom': '10px',
'--n-padding-left': '0px',
}
const state: any = reactive({
detail: [],
total: 0,
taskId: '',
})
const { detail, total } = toRefs(state)
const show = ref(false)
function showModal(id) {
getDetail(id)
}
async function getDetail(id) {
const res = await repetitionTask()
if (res.code === 'OK') {
state.detail = res.data
state.detail.forEach((item) => {
state.total += item.count
})
show.value = true
}
}
// function showModal() {
// show.value = true
// }
function closeModal() {
show.value = false
}
async function reject() {
emit('reject', { a: 'todo' })
closeModal()
}
async function viewRepeat(e: MouseEvent) {
emit('viewrepeat')
e.preventDefault()
closeModal()
}
defineExpose({
showModal,
})
</script>
<template>
<n-modal v-model:show="show" transform-origin="center">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<div class="wrapper">
<div class="close" @click="closeModal">
<SvgIcon size="24" name="clear" />
</div>
<div class="wrapper-header">
<span style="font-weight: bold;">任务小结重复任务</span>
<span><span class="count">{{ total }}</span></span>
</div>
<div class="wrapper-content">
<n-scrollbar style="max-height: 200px;">
<div v-for="item in detail" :key="item.id" class="item">
<!-- <div class="imgwrapper" /> -->
<img class="imgwrapper" :src="item.imgUrl">
<n-grid x-gap="12" y-gap="0" :cols="12">
<n-gi span="4">
<span style="color:#8b8d8f;">任务小结内容:</span>
</n-gi>
<n-gi span="8">
<span>{{ item.content }}</span>
</n-gi>
<n-gi span="4">
<span style="color:#8b8d8f;">任务重复数量</span>
</n-gi>
<n-gi span="8">
<span><span class="count">{{ item.count }}</span></span>
</n-gi>
</n-grid>
</div>
</n-scrollbar>
<div class="footer">
<SvgIcon style="cursor: pointer;" name="r1" width="162" height="54" @click="reject" />
<SvgIcon style="cursor: pointer;" name="r4" width="162" height="54" @click="viewRepeat" />
</div>
</div>
</div>
</n-card>
</n-modal>
</template>
<style lang="less" scoped>
.wrapper {
display: flex;
position: relative;
flex-direction: column;
.close{
position:absolute;
right: 0px;
top:-45px;
cursor: pointer;
}
&-header {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 10px;
height: 60px;
}
&-content {
flex: 1;
border-radius: 8px;
background-color: #FFF;
padding: 16px;
.imgwrapper {
width: 160px;
height: 70px;
margin-right: 20px;
border-radius: 8px;
// background-image: url('../../../assets/images/test.png');
// background-repeat: no-repeat;
// background-size: cover;
}
.item {
display: flex;
padding: 20px 0px;
border-bottom: 1px solid #e4e6eb;
}
.footer {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
}
}
.count {
color: #6684fa;
font-weight: bold;
margin: 0px 5px
}
}
::v-deep(.n-card.n-card--content-segmented > .n-card__content:not(:first-child)) {
border: 0px;
}
::v-deep(.n-card > .n-card-header) {
--n-padding-top: 0px;
--n-padding-bottom: 12px;
}
::v-deep(.n-divider:not(.n-divider--vertical)) {
margin-top: 0px;
margin-bottom: 0px;
}
</style>

@ -77,7 +77,8 @@ function switchTab(type: number) {
} }
function goFinalDetail(row) { function goFinalDetail(row) {
router.push({ name: 'final-detail', query: { id: row.id, packageid: row.packageid } }) console.log(row)
router.push({ name: 'final-detail', query: { id: row.tag.taskId, packageid: row.packageid } })
} }
function goDetail(item) { function goDetail(item) {

@ -27,6 +27,27 @@ watch(
}, },
) )
function getItemLabel(states) {
const list = [
{
value: 1,
label: '待审批',
},
{
value: 2,
label: '通过',
},
{
value: 3,
label: '不通过',
},
]
const item: any = list.find(
(item: any) => item.value == states,
)
return item ? item.label : ''
}
function getLabel(states) { function getLabel(states) {
const item: any = izstatusList.value.find( const item: any = izstatusList.value.find(
(item: any) => item.value == states, (item: any) => item.value == states,
@ -91,7 +112,7 @@ onMounted(() => {
审批人{{ item.username }} 审批人{{ item.username }}
</div> </div>
<div class="label label3"> <div class="label label3">
审批结果{{ getLabel(item.statshis) }} 审批结果{{ getItemLabel(item.statshis) }}
</div> </div>
<div class="label"> <div class="label">
备注{{ item.taskcomment }} 备注{{ item.taskcomment }}

Loading…
Cancel
Save