|
@@ -14,14 +14,15 @@
|
|
|
<Time v-show="record.createTime" :value="record.createTime" mode="datetime" />
|
|
|
</template>
|
|
|
<template #incrementEndTime="{ record }">
|
|
|
- <Time v-show="record.incrementEndTime" :value="record.incrementEndTime" mode="datetime" />
|
|
|
+ <span v-if="record.status" style="color: #ed6f6f">已过期</span>
|
|
|
+ <Time v-else :value="record.incrementEndTime" mode="datetime" />
|
|
|
</template>
|
|
|
<template #action="{ record }">
|
|
|
<TableAction
|
|
|
:actions="[
|
|
|
{
|
|
|
label: '授权',
|
|
|
- ifShow: !record.snCode,
|
|
|
+ ifShow: !record.snCode && !record.status,
|
|
|
color: 'success',
|
|
|
onClick: handleDelete.bind(null, record),
|
|
|
},
|
|
@@ -50,6 +51,7 @@
|
|
|
import { cameraDetailList, unbindCamera } from '/@/api/rightsEnterprises/list';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
// import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard';
|
|
|
+ import dayjs from 'dayjs';
|
|
|
import { RoleEnum } from '/@/enums/roleEnum';
|
|
|
import { useGo } from '/@/hooks/web/usePage';
|
|
|
import { Time } from '/@/components/Time';
|
|
@@ -103,9 +105,7 @@
|
|
|
deep: true,
|
|
|
},
|
|
|
);
|
|
|
- onMounted(() => {
|
|
|
- getNumByStaffData();
|
|
|
- });
|
|
|
+ onMounted(() => {});
|
|
|
|
|
|
const columns: BasicColumn[] = [
|
|
|
{
|
|
@@ -209,8 +209,14 @@
|
|
|
pagination: { pageSize: 20 },
|
|
|
searchInfo: modelRef,
|
|
|
afterFetch: (T) => {
|
|
|
- getNumByStaffData();
|
|
|
- return T;
|
|
|
+ let newDate = dayjs();
|
|
|
+ return T.map((ele) => {
|
|
|
+ if (ele.incrementEndTime) {
|
|
|
+ ele.status = dayjs(ele.incrementEndTime).isAfter(newDate) ? 0 : 1;
|
|
|
+ }
|
|
|
+ console.log('newDate', ele);
|
|
|
+ return ele;
|
|
|
+ });
|
|
|
},
|
|
|
bordered: true,
|
|
|
sortFn: (sortInfo) => {
|
|
@@ -247,12 +253,6 @@
|
|
|
function handleEdit(record: Recordable) {
|
|
|
openDetaileModal(true, record);
|
|
|
}
|
|
|
- function getNumByStaffData() {
|
|
|
- // getNumByStaff({}).then((res) => {
|
|
|
- // surplusSubNum.value.lookNum = res.lookNum;
|
|
|
- // surplusSubNum.value.shotNum = res.shotNum;
|
|
|
- // });
|
|
|
- }
|
|
|
async function handleDelete(record) {
|
|
|
return openDelListeModal(true, {
|
|
|
...record,
|
|
@@ -290,7 +290,6 @@
|
|
|
RoleEnum,
|
|
|
surplusSubNum,
|
|
|
getCheckRole,
|
|
|
- getNumByStaffData,
|
|
|
};
|
|
|
},
|
|
|
});
|