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

@ -61,29 +61,35 @@ defineExpose({
</script>
<template>
<n-modal v-model:show="show" transform-origin="center">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<n-modal v-model:show="show" transform-origin="center" class="modal_wrap">
<div class="wrapper">
<div class="close" @click="closeModal">
<SvgIcon size="24" name="clear" />
<div class="closed">
<SvgIcon
style="cursor: pointer"
name="cut-down"
width="32"
@click="closeModal"
/>
</div>
<div class="wrapper-header">
<span style="font-weight: bold;">任务小结重复任务</span>
<span><span class="count">{{ total }}</span></span>
<div style="font-weight: bold;">
任务小结重复任务
</div>
<div><span class="total">{{ total }}</span></div>
</div>
<div class="wrapper-content">
<n-scrollbar style="max-height: 200px;">
<n-scrollbar style="max-height: 214px;">
<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">
<n-gi span="3">
<span style="color:#8b8d8f;">任务小结内容:</span>
</n-gi>
<n-gi span="8">
<span>{{ item.content }}</span>
</n-gi>
<n-gi span="4">
<n-gi span="3">
<span style="color:#8b8d8f;">任务重复数量</span>
</n-gi>
<n-gi span="8">
@ -98,37 +104,55 @@ defineExpose({
</div>
</div>
</div>
</n-card>
</n-modal>
</template>
<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 {
display: flex;
position: relative;
flex-direction: column;
.close{
position: absolute;
right: 0px;
top:-45px;
cursor: pointer;
left: calc(50% - 350px);
.closed {
position: relative;
top: 0px;
left: 90%;
}
.wrapper-header {
padding-top: 40px;
text-align: center;
.wrapper-title {
text-align: center;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Semibold;
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;
}
&-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;
padding-top: 0;
margin: 45px 12px 35px 38px;
.imgwrapper {
width: 160px;
@ -153,25 +177,93 @@ defineExpose({
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 {
color: #6684fa;
font-weight: bold;
font-size: 16px;
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;
.total {
color: #6684fa;
font-weight: bold;
font-size: 22px;
margin: 0px 5px
}
::v-deep(.n-divider:not(.n-divider--vertical)) {
margin-top: 0px;
margin-bottom: 0px;
}
</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) {
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) {

@ -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) {
const item: any = izstatusList.value.find(
(item: any) => item.value == states,
@ -91,7 +112,7 @@ onMounted(() => {
审批人{{ item.username }}
</div>
<div class="label label3">
审批结果{{ getLabel(item.statshis) }}
审批结果{{ getItemLabel(item.statshis) }}
</div>
<div class="label">
备注{{ item.taskcomment }}

Loading…
Cancel
Save