pull/1/head
lizijiee 1 year ago
commit dbc055d4ac

@ -11,7 +11,8 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"cleanup": "rimraf node_modules && rimraf pnpm-lock.yaml",
"prepare": "husky install"
"prepare": "husky install",
"postinstall": "patch-package"
},
"dependencies": {
"@vueup/vue-quill": "^1.2.0",
@ -26,6 +27,7 @@
"mitt": "^3.0.1",
"mockjs": "^1.1.0",
"naive-ui": "^2.38.1",
"patch-package": "^8.0.0",
"pinia": "^2.0.33",
"qs": "^6.11.2",
"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,
},
],
showQuickJumper: true,
});
const tableData = ref<Array<RowData>>([]);
const keyword = ref("");

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

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

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

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

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

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

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

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

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

@ -7,7 +7,7 @@ import imagesloaded from "imagesloaded";
import ConfrimModal from "../modal/ConfrimModal.vue";
import type { PictureSortParam, SetTFParam } from "/#/api";
import { useWorkOrder } from "@/store/modules/workOrder";
import { formatToDateHMS } from '@/utils/dateUtil'
import { formatToDateHMS } from "@/utils/dateUtil";
import {
clearTF,
getPackageTaskList,
@ -341,6 +341,11 @@ async function clearMark() {
}
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;
}
@ -579,6 +584,10 @@ function previewHandler(event: MouseEvent) {
class="img-wrapper"
: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">
<n-checkbox
v-show="batch"
@ -925,10 +934,10 @@ function previewHandler(event: MouseEvent) {
.time {
position: absolute;
z-index: 3;
left: 2%;
bottom: 2%;
left: 5%;
bottom: 5%;
color: #fff;
display: flex;
align-items: center;
}
}
</style>

Loading…
Cancel
Save