Commit c7fb948a authored by ccc2wdd's avatar ccc2wdd

列表:审核状态样式调整

parent 690037a6
......@@ -144,7 +144,7 @@ const engineeringProject: AppRouteModule = {
{
path: 'completedEdit',
name: 'completedEdit',
component: () => import('@/views/completed//completedEdit/completedEdit.vue'),
component: () => import('@/views/completed/completedEdit/completedEdit.vue'),
meta: {
hideMenu: true,
auth: '/www/dist/index.html#/completed/index',
......
......@@ -9,13 +9,10 @@
<template #bodyCell="{ column, text, record, index }">
<!-- 当前列是序号列时,显示序号 -->
<span v-if="column.dataIndex === 'serialNumber'">{{ index + 1 }}</span>
<template v-if="column.key === 'reviewStatus'">
<Tag color="processing">
{{ record.reviewStatus == 1 ? '已审核' : '未审核' }}
</Tag>
<Tag color="warning" v-if="record.reviewStatus === '0'"> 未审核</Tag>
<Tag color="success" v-if="record.reviewStatus === '1'"> 已审核</Tag>
</template>
<template v-if="column.key === 'action'">
<TableAction
:actions="[
......
......@@ -480,7 +480,7 @@
dataTwo[j].ownFunds = Number(dataTwo[j].ownFunds);
}
var obj = {
startTime: res.time? res.time[0] : '',
startTime: res.time ? res.time[0] : '',
endTime: res.time ? res.time[1] : '',
proId: item.proId,
amountList: data,
......
......@@ -89,9 +89,8 @@
<span v-if="column.dataIndex === 'serialNumber'">{{ index + 1 }}</span>
<template v-if="column.key === 'auditResult'">
<Tag color="processing">
{{ record.auditResult == 1 ? '已审核' : '未审核' }}
</Tag>
<Tag color="warning" v-if="record.auditResult === '0'"> 未审核</Tag>
<Tag color="success" v-if="record.auditResult === '1'"> 已审核</Tag>
</template>
<template v-if="column.key === 'action'">
......
......@@ -87,11 +87,9 @@
<span v-if="column.dataIndex === 'serialNumber'">{{ index + 1 }}</span>
<template v-if="column.key === 'planResult'">
<Tag color="processing">
{{ record.planResult == 1 ? '已审核' : '未审核' }}
</Tag>
<Tag color="warning" v-if="record.planResult === '0'"> 未审核</Tag>
<Tag color="success" v-if="record.planResult === '1'"> 已审核</Tag>
</template>
<template v-if="column.key === 'action'">
<TableAction
:actions="[
......
......@@ -3,7 +3,6 @@
<div>
<div v-if="deptId == 100 || deptId == 0" style="margin: 16px">
<PageCard title="数据填报周期">
<Row>
<Col :span="20">
<div class="cycleFrame">
......@@ -13,22 +12,33 @@
</div>
<div class="characte">
<div class="top">填报周期</div>
<div @click="selectCycle" class="bottom" style="color: #0d84ff; text-decoration: underline; cursor: pointer">{{ mothCycle.fillCycle}}</div>
<div
@click="selectCycle"
class="bottom"
style="color: #0d84ff; text-decoration: underline; cursor: pointer"
>{{ mothCycle.fillCycle }}</div
>
</div>
</div>
<Divider type="vertical" style="height: 36px; border-color: rgba(22,106,203,0.30)" dashed />
<Divider
type="vertical"
style="height: 36px; border-color: rgba(22, 106, 203, 0.3)"
dashed
/>
<div class="card">
<div class="cycleIcon">
<img src="@/assets/icons/shenyutianshu.png" />
</div>
<div class="characte">
<div class="top">剩余天数</div>
<div class="bottom" style="color:#DFAA21 ">{{
daysReturn() + '天'
}}</div>
<div class="bottom" style="color: #dfaa21">{{ daysReturn() + '天' }}</div>
</div>
</div>
<Divider type="vertical" style="height: 36px; border-color: rgba(22,106,203,0.30)" dashed />
<Divider
type="vertical"
style="height: 36px; border-color: rgba(22, 106, 203, 0.3)"
dashed
/>
<div class="card">
<div class="cycleIcon">
......@@ -36,12 +46,14 @@
</div>
<div class="characte">
<div class="top">企业未完成</div>
<div class="bottom" style="color:#DB4343">{{
mothCycle.noNum + '家'
}}</div>
<div class="bottom" style="color: #db4343">{{ mothCycle.noNum + '家' }}</div>
</div>
</div>
<Divider type="vertical" style="height: 36px; border-color: rgba(22,106,203,0.30)" dashed />
<Divider
type="vertical"
style="height: 36px; border-color: rgba(22, 106, 203, 0.3)"
dashed
/>
<div class="card">
<div class="cycleIcon">
......@@ -49,17 +61,15 @@
</div>
<div class="characte">
<div class="top">企业已完成</div>
<div class="bottom" style="color:#16CB28">{{
mothCycle.deptNum - mothCycle.noNum + '家'
}}</div>
<div class="bottom" style="color: #16cb28">{{
mothCycle.deptNum - mothCycle.noNum + '家'
}}</div>
</div>
</div>
</div>
</Col>
<Col :span="4">
<a-button class="btn" @click="getFillDetails">
查看填报详情
</a-button>
<a-button class="btn" @click="getFillDetails"> 查看填报详情 </a-button>
<a-button class="btn" type="primary" @click="returnEdit">
{{ mothCycle.isEdit === '1' ? '开启本轮填报' : '结束本轮填报' }}
</a-button>
......@@ -77,9 +87,8 @@
<!-- 当前列是序号列时,显示序号 -->
<span v-if="column.dataIndex === 'serialNumber'">{{ index + 1 }}</span>
<template v-if="column.key === 'examineStatus'">
<Tag color="processing">
{{ record.examineStatus == 1 ? '已审核' : '未审核' }}
</Tag>
<Tag color="warning" v-if="record.examineStatus === '0'"> 未审核</Tag>
<Tag color="success" v-if="record.examineStatus === '1'"> 已审核</Tag>
</template>
<!-- 其他列正常显示 -->
<span v-else>{{ text }}</span>
......@@ -131,12 +140,12 @@
<!-- 点击新建后的选择填报周期的弹窗 -->
<yearModal @register="register" @close="handleNew" />
<CycleModel @register="registerCycleModel" :user-data="mothCycle" @get-cycle="getSetCycle" />
<FillDetailsModel @register="registerFillDetail"></FillDetailsModel>
<FillDetailsModel @register="registerFillDetail" />
</div>
</template>
<script lang="ts" setup>
//审核相关操作
import {Divider,Row, Col} from 'ant-design-vue'
import { Divider, Row, Col } from 'ant-design-vue';
import { operateType, addItemApi, addItemData } from '@/api/operations/operations';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import {
......@@ -145,7 +154,8 @@
auditItem,
selectCount,
getMothCycel,
SetMothCycelEdit, SetEditStatus,
SetMothCycelEdit,
SetEditStatus,
} from '@/api/project/monthlyPlan';
import { Tag } from 'ant-design-vue';
......@@ -162,12 +172,12 @@
import { useUserStore } from '@/store/modules/user';
import PageCard from '@/components/Page/src/PageCard.vue';
import CycleModel from '@/views/monthlyPlan/cycleModel/cycleModel.vue';
import FillDetailsModel from "@/views/monthlyPlan/fillDetailsModel/fillDetailsModel.vue";
import FillDetailsModel from '@/views/monthlyPlan/fillDetailsModel/fillDetailsModel.vue';
const mothCycle = ref({
beginTime: '2024-07-01',
endTime: '2024-09-02',
fillCycle:'2024-09',
fillCycle: '2024-09',
isEdit: '0',
deptNum: 12,
noNum: 6,
......@@ -176,36 +186,36 @@
// 获取今天的日期
const today = new Date();
// 获取目标年份和月份
// 获取目标年份和月份
let targetYear = Number.parseInt(mothCycle.value.fillCycle.split('-')[0]);
let targetMonth= Number.parseInt(mothCycle.value.fillCycle.split('-')[1]);
let targetMonth = Number.parseInt(mothCycle.value.fillCycle.split('-')[1]);
// 创建目标日期(2024年9月30日)
// 创建目标日期(2024年9月30日)
const targetDate = new Date(targetYear, targetMonth, 0); // 0表示上一个月的最后一天,即9月30日
// 计算时间差(毫秒)
// 计算时间差(毫秒)
const timeDifference = targetDate - today;
// 计算天数差(天数 = 毫秒差 / 每天的毫秒数)
// 计算天数差(天数 = 毫秒差 / 每天的毫秒数)
const daysUntilTarget = Math.max(0, Math.ceil(timeDifference / (1000 * 60 * 60 * 24)));
return daysUntilTarget ;
return daysUntilTarget;
}
function selectCycle() {
openCycleModel(true, {
data: mothCycle.value,
id:1,
type:'moth'
id: 1,
type: 'moth',
});
}
function getFillDetails(){
openFillDetailModel(true,{
data:mothCycle.value,
url:'/pro/monthEngineer/businessComDetails',
module:'Month'
})
function getFillDetails() {
openFillDetailModel(true, {
data: mothCycle.value,
url: '/pro/monthEngineer/businessComDetails',
module: 'Month',
});
}
async function getSetCycle() {
const cycle = await getMothCycel({id:'1',module:'Moth'});
const cycle = await getMothCycel({ id: '1', module: 'Moth' });
mothCycle.value = cycle;
}
onMounted(async () => {
......@@ -259,7 +269,7 @@
query: {
id: record.id,
moth: record.monthYear,
examineStatus:record.examineStatus,
examineStatus: record.examineStatus,
disabled: String(disabled),
},
});
......@@ -315,24 +325,26 @@
margin-right: 10px;
margin-top: 8px;
}
.cycleFrame{
border: 1px solid rgba(22, 106, 203, 0.10);
.cycleFrame {
border: 1px solid rgba(22, 106, 203, 0.1);
border-radius: 6px;
padding: 20px 50px;
margin-right: 20px;
display: flex;
justify-content: space-between;
.card{
.card {
display: flex;
.cycleIcon{
.cycleIcon {
margin-right: 10px;
}
.characte{
.characte {
display: flex;
flex-direction: column;
justify-content: space-around;
.top{}
.bottom{}
.top {
}
.bottom {
}
}
}
}
......
......@@ -96,9 +96,8 @@
<!-- 当前列是序号列时,显示序号 -->
<span v-if="column.dataIndex === 'serialNumber'">{{ index + 1 }}</span>
<template v-if="column.key === 'completionResult'">
<Tag color="processing">
{{ record.completionResult == 1 ? '已审核' : '未审核' }}
</Tag>
<Tag color="warning" v-if="record.completionResult === '0'"> 未审核</Tag>
<Tag color="success" v-if="record.completionResult === '1'"> 已审核</Tag>
</template>
<template v-if="column.key === 'action'">
<TableAction
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment