pull/1/head
lizijiee 1 year ago
commit dbc055d4ac

@ -11,7 +11,8 @@
"lint": "eslint .", "lint": "eslint .",
"lint:fix": "eslint . --fix", "lint:fix": "eslint . --fix",
"cleanup": "rimraf node_modules && rimraf pnpm-lock.yaml", "cleanup": "rimraf node_modules && rimraf pnpm-lock.yaml",
"prepare": "husky install" "prepare": "husky install",
"postinstall": "patch-package"
}, },
"dependencies": { "dependencies": {
"@vueup/vue-quill": "^1.2.0", "@vueup/vue-quill": "^1.2.0",
@ -26,6 +27,7 @@
"mitt": "^3.0.1", "mitt": "^3.0.1",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"naive-ui": "^2.38.1", "naive-ui": "^2.38.1",
"patch-package": "^8.0.0",
"pinia": "^2.0.33", "pinia": "^2.0.33",
"qs": "^6.11.2", "qs": "^6.11.2",
"sortablejs": "^1.15.1", "sortablejs": "^1.15.1",

@ -0,0 +1,13 @@
diff --git a/node_modules/naive-ui/es/pagination/src/Pagination.mjs b/node_modules/naive-ui/es/pagination/src/Pagination.mjs
index 5bd975b..e1c6ebc 100644
--- a/node_modules/naive-ui/es/pagination/src/Pagination.mjs
+++ b/node_modules/naive-ui/es/pagination/src/Pagination.mjs
@@ -702,7 +702,7 @@ export default defineComponent({
theme: mergedTheme.peers.Input,
themeOverrides: mergedTheme.peerOverrides.Input,
onChange: handleQuickJumperChange
- })) : null;
+ }),h('span',{},'页')) : null;
default:
return null;
}

@ -107,6 +107,7 @@ const pagination = reactive({
value: 50, value: 50,
}, },
], ],
showQuickJumper: true,
}); });
const tableData = ref<Array<RowData>>([]); const tableData = ref<Array<RowData>>([]);
const keyword = ref(""); const keyword = ref("");

@ -121,6 +121,7 @@ const pagination = reactive({
value: 50, value: 50,
}, },
], ],
showQuickJumper: true,
}) })
const tableData = ref<Array<RowData>>([]) const tableData = ref<Array<RowData>>([])
const selectionIds = ref<DataTableRowKey[]>([]) const selectionIds = ref<DataTableRowKey[]>([])

@ -397,6 +397,7 @@ const pagination = reactive({
value: 50, value: 50,
}, },
], ],
showQuickJumper: true,
}) })
const tableData = ref<Array<RowData>>([]) const tableData = ref<Array<RowData>>([])
const selectionIds = ref<DataTableRowKey[]>([]) const selectionIds = ref<DataTableRowKey[]>([])

@ -2,7 +2,8 @@
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
const item = { const item = {
img: "/src/assets/images/test.png", // img: "/src/assets/images/test.png",
img:'http://47.93.59.251/api/image/thumbnail_1752999610491604992.jpeg',
checked: false, checked: false,
title: "YP4567890545", title: "YP4567890545",
date: "2023-12-19 12:09:18", date: "2023-12-19 12:09:18",
@ -10,7 +11,7 @@ const item = {
const data = ref<any[]>([]); const data = ref<any[]>([]);
onMounted(() => { onMounted(() => {
for (let i = 0; i < 10; i++) { for (let i = 0; i < 20; i++) {
data.value.push(item as any); data.value.push(item as any);
} }
}); });
@ -36,7 +37,7 @@ onMounted(() => {
:key="index" :key="index"
:style="index == 2 ? 'color:#02C984' : 'color:#507AFD'" :style="index == 2 ? 'color:#02C984' : 'color:#507AFD'"
> >
待确认 {{ index==1?'待确认':'张思' }}
</div> </div>
</div> </div>
</div> </div>
@ -85,8 +86,7 @@ onMounted(() => {
.title, .title,
.date { .date {
font-size: 11px; font-size: 11px;
font-family: PingFang SC, PingFang SC-Medium; font-weight: bolder;
font-weight: Medium;
text-align: left; text-align: left;
color: #323233; color: #323233;
line-height: 16px; line-height: 16px;
@ -101,8 +101,7 @@ onMounted(() => {
width: 31px; width: 31px;
height: 14px; height: 14px;
font-size: 10px; font-size: 10px;
font-family: PingFang SC, PingFang SC-Regular; font-weight: bolder;
font-weight: Regular;
text-align: left; text-align: left;
// color: #507afd; // color: #507afd;
line-height: 14px; line-height: 14px;
@ -118,16 +117,14 @@ onMounted(() => {
justify-content: flex-end; justify-content: flex-end;
.resovle_action { .resovle_action {
font-size: 12px; font-size: 12px;
font-family: PingFang SC, PingFang SC-Medium; font-weight: bolder;
font-weight: Medium;
text-align: left; text-align: left;
color: #507afd; color: #507afd;
line-height: 17px; line-height: 17px;
} }
.reject_action { .reject_action {
font-size: 12px; font-size: 12px;
font-family: PingFang SC, PingFang SC-Medium; font-weight: bolder;
font-weight: Medium;
text-align: left; text-align: left;
color: #ff4e4f; color: #ff4e4f;
line-height: 17px; line-height: 17px;

@ -15,9 +15,10 @@ const showList = ref(false);
<Aside /> <Aside />
<!-- 内容 --> <!-- 内容 -->
<Content @changeShow="showList=true" v-if="!showList"/> <Content @changeShow="showList=true" />
<!-- 任务管理 --> <!-- 任务管理 -->
<ListContent v-else /> <!-- TODO:本地演示即可 上传注释注释 -->
<!-- <ListContent /> -->
</div> </div>
</template> </template>

@ -1,12 +1,12 @@
<script lang="ts" setup> <script lang="ts" setup>
import { favorite, getConditionList, unfavorite } from "@/api/home/filter"; import { favorite, getConditionList, unfavorite, sort } from "@/api/home/filter";
import { asideMap } from "@/config/aside"; import { asideMap } from "@/config/aside";
import { useInfiniteScroll } from "@vueuse/core"; import { useInfiniteScroll } from "@vueuse/core";
import { debounce } from "lodash-es"; import { debounce } from "lodash-es";
import { onMounted, reactive, ref, watch } from "vue"; import { onMounted, reactive, ref, watch } from "vue";
import type { FilterSearchParam } from "/#/api"; import type { FilterSearchParam } from "/#/api";
import type { Filter, FilterEntity } from "/#/home"; import type { Filter, FilterEntity } from "/#/home";
import { VueDraggable } from 'vue-draggable-plus' import { VueDraggable } from "vue-draggable-plus";
defineOptions({ name: "AdvanceFilter" }); defineOptions({ name: "AdvanceFilter" });
@ -74,7 +74,6 @@ useInfiniteScroll(
{ distance: 10, interval: 300, canLoadMore: () => false } { distance: 10, interval: 300, canLoadMore: () => false }
); );
const showClick = () => { const showClick = () => {
console.log("showClick");
inputHandler(""); inputHandler("");
}; };
@ -110,7 +109,7 @@ async function featchList() {
// //
function generateFilterEntityList(data) { function generateFilterEntityList(data) {
const filterEntityList = data.map((item) => { const filterEntityList = data.map((item) => {
const { searchname, iztop, ocrUsersearchchildList, id } = item; const { searchname, iztop, ocrUsersearchchildList, id, reorder } = item;
const list = ocrUsersearchchildList.map((item) => { const list = ocrUsersearchchildList.map((item) => {
const { searchfield, searchvalue } = item; const { searchfield, searchvalue } = item;
@ -133,6 +132,7 @@ function generateFilterEntityList(data) {
favorite: iztop, favorite: iztop,
isDefaultFilter: false, isDefaultFilter: false,
filterList: list, filterList: list,
reorder,
}; };
}); });
@ -145,6 +145,11 @@ function selectHandler(item: FilterEntity) {
} }
const inputHandler = debounce((word) => { const inputHandler = debounce((word) => {
if (word) {
pagination.pageSize = 300;
} else {
pagination.pageSize = 10;
}
keyword.value = word; keyword.value = word;
featchList().then((list) => { featchList().then((list) => {
let dataArr: FilterEntity[] = []; let dataArr: FilterEntity[] = [];
@ -157,8 +162,12 @@ const inputHandler = debounce((word) => {
unDataArr.push(item); unDataArr.push(item);
} }
}); });
data.value = dataArr; data.value = dataArr.sort(
unData.value = unDataArr; (a, b) => Number((a as any).reorder) - Number((b as any).reorder)
);
unData.value = unDataArr.sort(
(a, b) => Number((a as any).reorder) - Number((b as any).reorder)
);
}); });
}, 300); }, 300);
@ -171,6 +180,15 @@ function favoriteHandler(event: MouseEvent, item: any) {
if (!isDefaultFilter) { if (!isDefaultFilter) {
item.favorite = true; item.favorite = true;
favorite(id); favorite(id);
data.value.map((v, index) => {
if (v.id == id) {
sort(v.id, 0);
} else {
sort(v.id, index + 1);
}
});
inputHandler(keyword.value);
} }
} }
@ -183,8 +201,15 @@ function unFavoriteHandler(event: MouseEvent, item) {
if (!isDefaultFilter) { if (!isDefaultFilter) {
item.favorite = false; item.favorite = false;
unfavorite(id); unfavorite(id);
inputHandler(keyword.value);
} }
} }
const moveEnd = () => {
unData.value.map((v, index) => {
sort(v.id, index);
});
};
</script> </script>
<template> <template>
@ -248,6 +273,7 @@ function unFavoriteHandler(event: MouseEvent, item) {
<div v-html="item.name" /> <div v-html="item.name" />
</li> </li>
<VueDraggable <VueDraggable
@end="moveEnd"
v-model="unData" v-model="unData"
filter=".draggable-li[draggable='false']" filter=".draggable-li[draggable='false']"
class="draggable-ul" class="draggable-ul"

@ -79,8 +79,9 @@ const pagination = reactive({
page: 1, page: 1,
pageCount: 1, pageCount: 1,
pageSize: 10, pageSize: 10,
showSizePicker:true, showSizePicker: true,
pageSizes: [ pageSizes: [
{ {
label: "10 每页", label: "10 每页",
value: 10, value: 10,
@ -98,6 +99,7 @@ const pagination = reactive({
value: 50, value: 50,
}, },
], ],
showQuickJumper: true,
}); });
const tableData = ref<Array<RowData>>([]); const tableData = ref<Array<RowData>>([]);
const keyword = ref(""); const keyword = ref("");
@ -302,7 +304,7 @@ const inputHandler = debounce((word) => {
<SvgIcon size="14px" name="magnifying-1" color="#fff" /> <SvgIcon size="14px" name="magnifying-1" color="#fff" />
</template> </template>
</n-input> </n-input>
<n-button type="info" style="background:#507AFD" @click="handleClick"> <n-button type="info" style="background: #507afd" @click="handleClick">
创建 创建
<template #icon> <template #icon>
<img <img
@ -323,7 +325,7 @@ const inputHandler = debounce((word) => {
:pagination="pagination" :pagination="pagination"
:row-key="rowKey" :row-key="rowKey"
@update:page="handlePageChange" @update:page="handlePageChange"
@update-page-size="handlePageSizeChange" @update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck" @update:checked-row-keys="handleCheck"
/> />
</div> </div>

@ -135,6 +135,7 @@ function handleSure(e) {
} }
function close() { function close() {
loading.value = false;
emit("close"); emit("close");
} }
@ -177,6 +178,7 @@ function startCount() {
} }
function forget() { function forget() {
loading.value = false;
emit("forget"); emit("forget");
} }
</script> </script>

@ -141,6 +141,7 @@ function close() {
} }
function switchTab(type: number) { function switchTab(type: number) {
loading.value = false;
tab.value = type; tab.value = type;
} }

@ -310,6 +310,10 @@ const currentTaskId = computed(() => {
function overTaskHandle() { function overTaskHandle() {
const item = taskDetailInfo.value const item = taskDetailInfo.value
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
overTask.value = null;
return;
}
if (validate([item]) == null && batch.value === false) if (validate([item]) == null && batch.value === false)
overTask.value = item overTask.value = item

@ -7,7 +7,7 @@ import imagesloaded from "imagesloaded";
import ConfrimModal from "../modal/ConfrimModal.vue"; import ConfrimModal from "../modal/ConfrimModal.vue";
import type { PictureSortParam, SetTFParam } from "/#/api"; import type { PictureSortParam, SetTFParam } from "/#/api";
import { useWorkOrder } from "@/store/modules/workOrder"; import { useWorkOrder } from "@/store/modules/workOrder";
import { formatToDateHMS } from '@/utils/dateUtil' import { formatToDateHMS } from "@/utils/dateUtil";
import { import {
clearTF, clearTF,
getPackageTaskList, getPackageTaskList,
@ -341,6 +341,11 @@ async function clearMark() {
} }
function overTaskHandelr(item: any) { function overTaskHandelr(item: any) {
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
overTask.value = null;
return;
}
if (validate([item]) == null && batch.value === false) overTask.value = item; if (validate([item]) == null && batch.value === false) overTask.value = item;
} }
@ -455,9 +460,9 @@ function previewHandler(event: MouseEvent) {
/> />
</div> </div>
<div class="time"> <div class="time">
<SvgIcon color="#FFF" size="16" name="time" /> <SvgIcon color="#FFF" size="16" name="time" />
<span>{{ formatToDateHMS(taskDetailInfo.createdate || 0) }}</span> <span>{{ formatToDateHMS(taskDetailInfo.createdate || 0) }}</span>
</div> </div>
<!-- 右下信息 --> <!-- 右下信息 -->
<div class="info"> <div class="info">
<n-grid x-gap="16" y-gap="0" :cols="12"> <n-grid x-gap="16" y-gap="0" :cols="12">
@ -579,6 +584,10 @@ function previewHandler(event: MouseEvent) {
class="img-wrapper" class="img-wrapper"
:style="{ 'background-image': `url(${item.thumburl})` }" :style="{ 'background-image': `url(${item.thumburl})` }"
/> />
<div class="time">
<SvgIcon color="#FFF" size="16" name="time" />
<span>{{ formatToDateHMS(item.createdate || 0) }}</span>
</div>
<div class="check"> <div class="check">
<n-checkbox <n-checkbox
v-show="batch" v-show="batch"
@ -923,12 +932,12 @@ function previewHandler(event: MouseEvent) {
} }
.time { .time {
position: absolute; position: absolute;
z-index: 3; z-index: 3;
left: 2%; left: 5%;
bottom: 2%; bottom: 5%;
color: #fff; color: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
} }
</style> </style>

Loading…
Cancel
Save