-
+
+
-
+
-
{{ item.name }}
-
+
{{ format(item.sendTime, "dd") }}
@@ -190,8 +172,8 @@ function getMore() {
{{ item.titile }}
-
审批节点:{{ item.tag.nodeName }}
-
+
@@ -256,6 +238,7 @@ function getMore() {
.content {
display: flex;
+
.slider {
.icon {
width: 17px;
@@ -276,6 +259,7 @@ function getMore() {
align-items: center;
justify-content: space-between;
cursor: pointer;
+
&-active {
background: rgba(80, 122, 253, 0.1);
}
@@ -291,6 +275,7 @@ function getMore() {
font-weight: 600;
color: #333333;
margin-left: 12px;
+
&-active {
color: #507afd;
}
@@ -472,5 +457,4 @@ function getMore() {
// ::v-deep(.n-divider:not(.n-divider--vertical)) {
// margin-top: 12px;
// margin-bottom: 12px;
-// }
-
+// }
diff --git a/src/views/task/aside/Aside.vue b/src/views/task/aside/Aside.vue
index 16a90f6..d837b8d 100644
--- a/src/views/task/aside/Aside.vue
+++ b/src/views/task/aside/Aside.vue
@@ -21,8 +21,13 @@ import { getAllfieldList, getfieldList } from '@/api/home/filter'
import { useTaskStore } from '@/store/modules/task'
import emitter from '@/utils/mitt'
import { useConfig } from '@/store/modules/asideConfig'
-import { getConditionList } from "@/api/home/filter";
+import { getConditionList } from "@/api/home/filter";
import type { FilterSearchParam } from "/#/api";
+import { useRoute } from 'vue-router'
+
+
+const route = useRoute()
+const searchContent = route.query.searchContent as string;
const CustomFieldModalRef = ref(null)
const collapse = ref(false)
const taskStore = useTaskStore()
@@ -130,25 +135,25 @@ async function getshowFieldList() {
onMounted(() => {
getshowFieldList()
- window.addEventListener("keydown", handleKeydown);
- init()
+ window.addEventListener("keydown", handleKeydown);
+ init()
})
-async function init(){
+async function init() {
try {
const searchParam: FilterSearchParam = {
search_searchname: { value: "", op: "like", type: "string" },
};
- const result = await getConditionList(1, searchParam,2);
+ const result = await getConditionList(1, searchParam, 2);
const { data } = result;
- if(data[0]){
+ if (data[0]) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(data[0].searchname);
setTimeout(() => {
- filterHandler(data[0].id)
+ filterHandler(data[0].id)
}, 1000);
- //filterHandler(data[0].id);
+ //filterHandler(data[0].id);
}
// pagination.pageNo += 1
-
+
} catch (error) {
return [];
} finally {
@@ -156,7 +161,8 @@ async function init(){
//currentlySelectedAdvanced.value="邱霞"
}
function handleKeydown(event) {
- if (event.key === "s") setShowSearch(true)}
+ if (event.key === "s") setShowSearch(true)
+}
// 滚动容器,让key对应模块处于可视区域
function scrollHandler(key: string) {
const element = document.querySelector(`#${key}`)
@@ -200,6 +206,18 @@ defineExpose({
setAsideItemName,
})
+const initSerach = () => {
+ if (searchContent) {
+ setShowSearch(true);
+ const id_param = searchContent.match(/-\d+-/);
+ if (id_param) {
+ search.value = id_param[0].slice(1, -1);
+ inputHandler(id_param[0].slice(1, -1));
+ }
+ }
+}
+initSerach();
+
const handleOk = (item: any) => {
if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname);
@@ -212,19 +230,14 @@ const handleOk = (item: any) => {
- 审批节点:{{ item.tag.sendUserName }}
+
审批状态:{{ getStateText(item.tag.states) }}
+
-
- ([])
-const message = useMessage()
-const dialog = useDialog()
-const notPassModalRef = ref(null)
-const batchModalRef: any = ref(null)
-const totalCount = ref(0)
-const taskId: any = ref('') // 任务id
-const packageId: any = ref('') // 包id
-const CustomSettingModalRef = ref(null)
-const taskTableData = ref([])
-const route = useRoute()
-const isDetail = ref(false) // 是否是详情
-const finalStore = useFinal()
-const imgbigshow = ref(true)
+} from "@/api/task/task";
+import { useTask } from "@/store/modules/task";
+import { useUser } from "@/store/modules/user";
+import { isEmpty } from "@/utils";
+import { formatToDateHMS } from "@/utils/dateUtil";
+import { hideDownload } from "@/utils/image";
+
+const emit = defineEmits(["setAsideItemName"]);
+
+const router = useRouter();
+const loading = ref(false);
+const batch = ref(false);
+const batchtwo = ref(false);
+const selectItems = ref([]);
+const message = useMessage();
+const dialog = useDialog();
+const notPassModalRef = ref(null);
+const batchModalRef: any = ref(null);
+const totalCount = ref(0);
+const taskId: any = ref(""); // 任务id
+const packageId: any = ref(""); // 包id
+const CustomSettingModalRef = ref(null);
+const taskTableData = ref([]);
+const route = useRoute();
+const isDetail = ref(false); // 是否是详情
+const finalStore = useFinal();
+const imgbigshow = ref(true);
const sortBy: any = {
- orderType: 'desc',
- orderName: 'similarityScore',
-}
-const el = ref(null)
+ orderType: "desc",
+ orderName: "similarityScore",
+};
+const el = ref(null);
const pagination = reactive({
pageNo: 0,
pageSize: 30,
-})
+});
function onCheckChange(checked: any, item: any) {
- const index = selectItems.value.indexOf(item)
- item.checked = checked
+ const index = selectItems.value.indexOf(item);
+ item.checked = checked;
- if (index === -1 && checked)
- selectItems.value.push(item)
- else selectItems.value.splice(index, 1)
+ if (index === -1 && checked) selectItems.value.push(item);
+ else selectItems.value.splice(index, 1);
}
const showActions = computed(() => {
- return selectItems.value.length > 0 && batch
-})
+ return selectItems.value.length > 0 && batch;
+});
const taskpagination = reactive({
pageNo: 1,
pageSize: 30,
-})
-const taskStore = useTask()
-const overTask = ref(null)
-const overTasktwo = ref(null)
-const taskDetailInfo = ref({})
-const taskDetailPictureList = ref([])
-const userStore = useUser()
-const imageRef = ref()
-let processItems: any[] = []
-const isFullScreen = ref(false)
+});
+const taskStore = useTask();
+const overTask = ref(null);
+const overTasktwo = ref(null);
+const taskDetailInfo = ref({});
+const taskDetailPictureList = ref([]);
+const userStore = useUser();
+const imageRef = ref();
+let processItems: any[] = [];
+const isFullScreen = ref(false);
const fullscreenStyles = computed(() => ({
- width: isFullScreen.value ? '100vw' : '',
- height: isFullScreen.value ? '100vh' : '',
- position: isFullScreen.value ? 'fixed' : '',
- top: isFullScreen.value ? '0' : '',
- left: isFullScreen.value ? '0' : '',
- zIndex: isFullScreen.value ? '100' : '',
-}))
-
+ width: isFullScreen.value ? "100vw" : "",
+ height: isFullScreen.value ? "100vh" : "",
+ position: isFullScreen.value ? "fixed" : "",
+ top: isFullScreen.value ? "0" : "",
+ left: isFullScreen.value ? "0" : "",
+ zIndex: isFullScreen.value ? "100" : "",
+}));
+const fullscreenStylestwo = computed(() => ({
+ width: isFullScreen.value ? "100vw" : "",
+ height: isFullScreen.value ? "100vh" : "",
+ position: isFullScreen.value ? "fixed" : "",
+ top: isFullScreen.value ? "0" : "",
+ left: isFullScreen.value ? "0" : "",
+ zIndex: isFullScreen.value ? "160" : "",
+}));
onMounted(() => {
- window.addEventListener('keydown', handleKeydown)
+ window.addEventListener("keydown", handleKeydown);
if (route.query.id) {
- taskId.value = route.query.id
- packageId.value = route.query.packageid
- isDetail.value = true
- getDetail()
+ taskId.value = route.query.id;
+ packageId.value = route.query.packageid;
+ isDetail.value = true;
+ getDetail();
}
-})
+});
-let lastKeyPressTime = 0
-let keyPressTimer = null
+let lastKeyPressTime = 0;
+let keyPressTimer = null;
function changeimgbigshow() {
- imgbigshow.value = !imgbigshow.value
+ imgbigshow.value = !imgbigshow.value;
}
-const doubleClickInterval = 300 // 可以自定义间隔时间,单位是毫秒
+const doubleClickInterval = 300; // 可以自定义间隔时间,单位是毫秒
// 键盘左右箭头快捷切换
function handleKeydown(event) {
- if (event.key === 'ArrowLeft') { backHandler() }
+ if (event.key === "ArrowLeft") {
+ backHandler();
+ }
// 在这里执行左箭头的逻辑
- else if (event.key === 'ArrowRight') { forwardHandler() }
+ else if (event.key === "ArrowRight") {
+ forwardHandler();
+ }
// 在这里执行右箭头的逻辑
else if (event.keyCode === 67) {
- isFullScreen.value = false
+ isFullScreen.value = false;
// batchModalRef.value.closeModal()
- }
- else if (event.keyCode === 27) {
- overTask.value = null
- overTasktwo.value = null
- }
- else if (event.key === 'p' || event.key === 'P') {
+ } else if (event.keyCode === 27) {
+ overTask.value = null;
+ overTasktwo.value = null;
+ } else if (event.key === "p" || event.key === "P") {
// 获取当前时间
- const now = Date.now()
+ const now = Date.now();
// 如果两次按键时间间隔小于我们设定的双击间隔,则认为是双击
if (now - lastKeyPressTime < doubleClickInterval) {
// 清除已经设置的定时器(如果有的话)
- clearTimeout(keyPressTimer)
- const item = taskDetailInfo.value
+ clearTimeout(keyPressTimer);
+ const item = taskDetailInfo.value;
if (
- item?.userapprove?.statshis === 2
- || item?.userapprove?.statshis == 3
+ item?.userapprove?.statshis === 2 ||
+ item?.userapprove?.statshis == 3
) {
- overTask.value = null
- return
+ overTask.value = null;
+ return;
}
if (validate([item]) == null && batch.value === false)
- overTask.value = item
+ overTask.value = item;
// 执行想要的操作
- approvalHandler()
+ approvalHandler();
// 重置上次按键时间
- lastKeyPressTime = 0
- }
- else {
+ lastKeyPressTime = 0;
+ } else {
// 如果不是双击,则更新上次按键时间,并开始一个新的计时器
- lastKeyPressTime = now
+ lastKeyPressTime = now;
// 通过定时器重置上次按键时间
// 这可以防止如果用户只按了一次键,也会触发双击的情况
- clearTimeout(keyPressTimer)
+ clearTimeout(keyPressTimer);
keyPressTimer = setTimeout(() => {
- lastKeyPressTime = 0
- }, doubleClickInterval)
+ lastKeyPressTime = 0;
+ }, doubleClickInterval);
}
- }
- else if (event.key === 'x' || event.key === 'X') {
+ } else if (event.key === "x" || event.key === "X") {
// 获取当前时间
- const now = Date.now()
+ const now = Date.now();
// 如果两次按键时间间隔小于我们设定的双击间隔,则认为是双击
if (now - lastKeyPressTime < doubleClickInterval) {
// 清除已经设置的定时器(如果有的话)
- clearTimeout(keyPressTimer)
- const item = taskDetailInfo.value
+ clearTimeout(keyPressTimer);
+ const item = taskDetailInfo.value;
if (
- item?.userapprove?.statshis === 2
- || item?.userapprove?.statshis == 3
+ item?.userapprove?.statshis === 2 ||
+ item?.userapprove?.statshis == 3
) {
- overTask.value = null
- return
+ overTask.value = null;
+ return;
}
if (validate([item]) == null && batch.value === false)
- overTask.value = item
+ overTask.value = item;
// 执行想要的操作
- const modal = unref(notPassModalRef)! as any
- modal.showModal([taskDetailInfo.value])
+ const modal = unref(notPassModalRef)! as any;
+ modal.showModal([taskDetailInfo.value]);
// 重置上次按键时间
- lastKeyPressTime = 0
- }
- else {
+ lastKeyPressTime = 0;
+ } else {
// 如果不是双击,则更新上次按键时间,并开始一个新的计时器
- lastKeyPressTime = now
+ lastKeyPressTime = now;
// 通过定时器重置上次按键时间
// 这可以防止如果用户只按了一次键,也会触发双击的情况
- clearTimeout(keyPressTimer)
+ clearTimeout(keyPressTimer);
keyPressTimer = setTimeout(() => {
- lastKeyPressTime = 0
- }, doubleClickInterval)
+ lastKeyPressTime = 0;
+ }, doubleClickInterval);
}
}
}
@@ -212,27 +217,26 @@ function setBatch(value: boolean) {
// if (totalCount.value === 0)
// return
- batch.value = value
+ batch.value = value;
if (value === false) {
- taskDetailInfo.value.checked = false
- selectItems.value = []
+ taskDetailInfo.value.checked = false;
+ selectItems.value = [];
taskDetailPictureList.value.forEach((item) => {
- item.checked = false
- })
+ item.checked = false;
+ });
}
}
// 从store里面获取任务id
function currentTaskId() {
- const index = taskStore.getCurrentIndex
- return taskStore.getApprovalList[index]?.id || ''
+ const index = taskStore.getCurrentIndex;
+ return taskStore.getApprovalList[index]?.id || "";
}
// states:1未提交,2待审批,3通过,4不通过
function validate(items: any[]) {
- if (items.length === 0)
- return '至少选中一个任务'
+ if (items.length === 0) return "至少选中一个任务";
// const useInfo = userStore.getUserInfo
// const username = useInfo.loginname
@@ -249,182 +253,180 @@ function validate(items: any[]) {
// return '审批人不一致'
// }
- return null
+ return null;
}
function approvalHandler(items?: any) {
- let cloneItem: any
+ let cloneItem: any;
if (batch.value) {
- processItems = selectItems.value
- }
- else if (overTask.value) {
- cloneItem = clone(overTask.value)
- processItems = [cloneItem]
+ processItems = selectItems.value;
+ } else if (overTask.value) {
+ cloneItem = clone(overTask.value);
+ processItems = [cloneItem];
}
if (items !== undefined && !(items instanceof PointerEvent))
- processItems = items
+ processItems = items;
- const msg = validate(processItems)
+ const msg = validate(processItems);
if (msg !== null) {
- message.error(msg)
- return
+ message.error(msg);
+ return;
}
- console.log(processItems)
+ console.log(processItems);
- const list: any = []
+ const list: any = [];
processItems.forEach((item) => {
list.push({
formId: item.id,
taskId: item.taskId,
taskName: item.fromTaskName,
- })
- })
+ });
+ });
const param = {
result: true,
- comment: '',
- disposeType: '',
- disposeTypeId: '',
- failCauseId: '',
- failCauseName: '',
+ comment: "",
+ disposeType: "",
+ disposeTypeId: "",
+ failCauseId: "",
+ failCauseName: "",
flowTaskInfoList: list,
- }
+ };
dialog.info({
- title: '确认提示',
- content: '确认给该任务审批为【通过】吗?',
- positiveText: '确定',
- negativeText: '取消',
+ title: "确认提示",
+ content: "确认给该任务审批为【通过】吗?",
+ positiveText: "确定",
+ negativeText: "取消",
onPositiveClick: () => {
- doAudit(param)
- overTask.value = null
+ doAudit(param);
+ overTask.value = null;
},
onNegativeClick: () => {
- overTask.value = null
+ overTask.value = null;
},
- })
+ });
}
function approvalHandlerx(item?: any) {
- console.log(item)
- alert(1)
+ console.log(item);
+ alert(1);
}
function singleRejectHandlex(item?: any) {
- console.log(item)
- const modal = unref(notPassModalRef)! as any
+ console.log(item);
+ const modal = unref(notPassModalRef)! as any;
- modal.showModal([item])
+ modal.showModal([item]);
}
function rejectHandler(items?: any) {
- console.log(items)
- const modal = unref(notPassModalRef)! as any
- modal.showModal(items)
+ console.log(items);
+ const modal = unref(notPassModalRef)! as any;
+ modal.showModal(items);
}
function singleRejectHandler() {
- const modal = unref(notPassModalRef)! as any
- modal.showModal([taskDetailInfo.value])
+ const modal = unref(notPassModalRef)! as any;
+ modal.showModal([taskDetailInfo.value]);
}
function doAudit(param: any) {
audit(param).then((res) => {
- const { code } = res
- if (code === 'OK') {
- message.success(res.message)
- setBatch(false)
- reloadList(param, '通过')
- batchModalRef.value.reload()
+ const { code } = res;
+ if (code === "OK") {
+ message.success(res.message);
+ setBatch(false);
+ reloadList(param, "通过");
+ batchModalRef.value.reload();
}
- })
+ });
}
function showModal(modalRef: any) {
- const modal = unref(modalRef)! as any
- modal.showModal(taskId.value)
+ const modal = unref(modalRef)! as any;
+ modal.showModal(taskId.value);
}
function forwardHandler() {
- taskStore.forward()
+ taskStore.forward();
}
function backHandler() {
- taskStore.back()
+ taskStore.back();
}
async function handleDragEnd(event, item) {
- console.log(event, item)
+ console.log(event, item);
// 可以在这里添加拖拽结束后的逻辑
- const flag = taskStore.getInFile
+ const flag = taskStore.getInFile;
if (flag) {
- const res = await dubiousfileyd({ pictureid: item.pictureId })
- if (res.code === 'OK') {
- message.success('加入成功')
- setBatch(false)
- getTableData()
- getImgList()
+ const res = await dubiousfileyd({ pictureid: item.pictureId });
+ if (res.code === "OK") {
+ message.success("加入成功");
+ setBatch(false);
+ getTableData();
+ getImgList();
}
- taskStore.setInFile(false)
- taskStore.setInFile(item.pictureId)
+ taskStore.setInFile(false);
+ taskStore.setInFile(item.pictureId);
}
}
async function addSuspicious() {
- taskStore.setInFileId(taskDetailInfo.value.ocrPicture)
- console.log(taskDetailInfo.value.ocrPicture)
+ taskStore.setInFileId(taskDetailInfo.value.ocrPicture);
+ console.log(taskDetailInfo.value.ocrPicture);
if (taskDetailInfo.value.ocrPicture.pictureid) {
const res = await dubiousfileyd({
pictureid: taskDetailInfo.value.ocrPicture.id,
- })
-
- if (res.code === 'OK') {
- message.success('加入成功')
- setBatch(false)
- getTableData()
- getImgList()
- }
- else {
- message.error(res.message)
+ });
+
+ if (res.code === "OK") {
+ message.success("加入成功");
+ setBatch(false);
+ getTableData();
+ getImgList();
+ } else {
+ message.error(res.message);
}
- taskStore.setInFile(false)
+ taskStore.setInFile(false);
}
}
async function getTableData() {
- const useInfo = userStore.getUserInfo
- const listData = []
- const reviewType = 3 // 类型
- let res = await getAllfieldList(reviewType)
- const fieldList = (res as any)?.data
- res = await getfieldList(reviewType, useInfo.id)
- const userFieldList = (res as any)?.data.userFieldFixed
+ const useInfo = userStore.getUserInfo;
+ const listData = [];
+ const reviewType = 3; // 类型
+ let res = await getAllfieldList(reviewType);
+ const fieldList = (res as any)?.data;
+ res = await getfieldList(reviewType, useInfo.id);
+ const userFieldList = (res as any)?.data.userFieldFixed;
const blueList = [
- '拜访终端名称',
- '定位信息',
- '拜访日期',
- '定位距离',
- '拜访小结',
- '拜访项目类别',
- ]
+ "拜访终端名称",
+ "定位信息",
+ "拜访日期",
+ "定位距离",
+ "拜访小结",
+ "拜访项目类别",
+ ];
fieldList.map((v) => {
if (userFieldList.includes(v.name)) {
- let locationobj = { address: '' }
- if (v.name == 'location')
- locationobj = JSON.parse(taskDetailInfo.value.ocrPicture[v.name])
+ let locationobj = { address: "" };
+ if (v.name == "location")
+ locationobj = JSON.parse(taskDetailInfo.value.ocrPicture[v.name]);
const item = {
label: v.fieldDesc,
value:
- v.name == 'location'
+ v.name == "location"
? locationobj.address
: taskDetailInfo.value.ocrPicture[v.name],
key: v.name,
blue: blueList.includes(v.fieldDesc),
- }
- listData.push(item)
+ };
+ listData.push(item);
}
- })
- taskTableData.value = chunk(listData, 2)
+ });
+ taskTableData.value = chunk(listData, 2);
}
async function getImgList() {
@@ -433,227 +435,218 @@ async function getImgList() {
...taskpagination,
...sortBy,
pictureId: taskDetailInfo.value.ocrPicture.id,
- })
- taskDetailPictureList.value = data
- totalCount.value = total
- }
- else {
- taskDetailPictureList.value.length = 0
- totalCount.value = 0
+ });
+ taskDetailPictureList.value = data;
+ totalCount.value = total;
+ } else {
+ taskDetailPictureList.value.length = 0;
+ totalCount.value = 0;
}
}
function overTaskHandle() {
- const item = taskDetailInfo.value
+ const item = taskDetailInfo.value;
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
- overTask.value = null
- return
+ overTask.value = null;
+ return;
}
- if (validate([item]) == null && batch.value === false)
- overTask.value = item
+ if (validate([item]) == null && batch.value === false) overTask.value = item;
}
function leaveTaskHandler() {
- overTask.value = null
- overTasktwo.value = null
+ overTask.value = null;
+ overTasktwo.value = null;
}
function showActionsModal() {
- const modal = unref(CustomSettingModalRef)! as any
- modal.showModal()
+ const modal = unref(CustomSettingModalRef)! as any;
+ modal.showModal();
}
onUnmounted(() => {
- taskStore.reset()
- window.removeEventListener('keydown', handleKeydown)
-})
+ taskStore.reset();
+ window.removeEventListener("keydown", handleKeydown);
+});
function immersionHandler() {
+ imgbigshow.value = true;
// taskStore.updateImmersion()
- toggleFullScreen()
+ toggleFullScreen();
}
// 切换全屏状态
function toggleFullScreen() {
- isFullScreen.value = !isFullScreen.value
+ isFullScreen.value = !isFullScreen.value;
if (isFullScreen.value) {
- fetchData()
- window.addEventListener('scroll', checkBottom)
- }
- else {
- window.removeEventListener('scroll', checkBottom)
+ fetchData();
+ window.addEventListener("scroll", checkBottom);
+ } else {
+ window.removeEventListener("scroll", checkBottom);
}
}
function previewHandler(event: MouseEvent) {
- event.stopImmediatePropagation()
- event.stopPropagation()
+ event.stopImmediatePropagation();
+ event.stopPropagation();
if (imageRef.value && (imageRef.value as any).src)
- (imageRef.value as any).mergedOnClick()
+ (imageRef.value as any).mergedOnClick();
}
watch(
() => [taskStore.activeId],
() => {
if (!isEmpty(taskStore.getActiveId)) {
- packageId.value = taskStore.getPackageid
- taskId.value = taskStore.getActiveId
- getDetail()
+ packageId.value = taskStore.getPackageid;
+ taskId.value = taskStore.getActiveId;
+ getDetail();
}
- },
-)
+ }
+);
// 获取数据
async function getDetail() {
- taskDetailInfo.value = await getTaskDetailInfo(taskId.value, packageId.value)
- setBatch(false)
- getTableData()
- getImgList()
+ taskDetailInfo.value = await getTaskDetailInfo(taskId.value, packageId.value);
+ setBatch(false);
+ getTableData();
+ getImgList();
}
function notPassSuccess(param) {
- batchModalRef.value.reload()
- reloadList(param, '不通过')
- overTask.value = null
+ batchModalRef.value.reload();
+ reloadList(param, "不通过");
+ overTask.value = null;
}
function reloadList(param, text) {
// 修改左侧状态
- const id = currentTaskId()
+ const id = currentTaskId();
const hasCurrentId = param.flowTaskInfoList.find(
- item => item.formId === id,
- )
- finalStore.setListKey()
- if (hasCurrentId)
- emit('setAsideItemName', text)
+ (item) => item.formId === id
+ );
+ finalStore.setListKey();
+ if (hasCurrentId) emit("setAsideItemName", text);
- getDetail()
+ getDetail();
}
function goBack() {
- router.back()
+ router.back();
}
function switchBatch() {
- setBatch(!batch.value)
+ setBatch(!batch.value);
}
function getrowValue(e) {
- if (e.key == 'location') {
- const locationobj = JSON.parse(taskDetailInfo.value.ocrPicture.location)
- const lat = locationobj.lat.$numberDecimal
- const lng = locationobj.lng.$numberDecimal
- const name = e.value
- const protocol = window.location.protocol
- const hostname = window.location.hostname
- const port = window.location.port
- const hostWithPort = `${protocol}//${hostname}:${port}/`
- window.open(
- `${hostWithPort}map` + `?name=${name}&lat=${lat}&lng=${lng}`,
- )
+ if (e.key == "location") {
+ const locationobj = JSON.parse(taskDetailInfo.value.ocrPicture.location);
+ const lat = locationobj.lat.$numberDecimal;
+ const lng = locationobj.lng.$numberDecimal;
+ const name = e.value;
+ const protocol = window.location.protocol;
+ const hostname = window.location.hostname;
+ const port = window.location.port;
+ const hostWithPort = `${protocol}//${hostname}:${port}/`;
+ window.open(`${hostWithPort}map` + `?name=${name}&lat=${lat}&lng=${lng}`);
}
}
function overTaskHandelr(item: any) {
if (item?.historyStates === 2 || item?.historyStates == 3) {
- overTasktwo.value = null
- return
+ overTasktwo.value = null;
+ return;
}
if (validate([item]) == null && batchtwo.value === false)
- overTasktwo.value = item
+ overTasktwo.value = item;
}
function closePassno() {
- console.log(notPassModalRef.value)
- overTask.value = null
+ console.log(notPassModalRef.value);
+ overTask.value = null;
}
// const loadingx = ref(false);
-const items = ref([])
-const scrollContainer = ref(null)
-let debounceTimer
+const items = ref([]);
+const scrollContainer = ref(null);
+let debounceTimer;
async function fetchData() {
- if (loading.value)
- return // 如果已经在加载中,则不重复加载
+ if (loading.value) return; // 如果已经在加载中,则不重复加载
- loading.value = true
+ loading.value = true;
try {
- loadMore()
- }
- finally {
- loading.value = false
+ loadMore();
+ } finally {
+ loading.value = false;
}
}
// const throttledCheckScroll = throttle(checkBottom, 200);
-let num = 1
+let num = 1;
// 检查是否滚动到底部
function checkBottom() {
- const container = scrollContainer.value
+ const container = scrollContainer.value;
// console.log(1)
- if (!container)
- return
+ if (!container) return;
// const { scrollTop, clientHeight, scrollHeight } = container;
- const scrollTop = window.pageYOffset || document.documentElement.scrollTop
+ const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
// 获取视口的内部高度
- const clientHeight
- = window.innerHeight || document.documentElement.clientHeight
+ const clientHeight =
+ window.innerHeight || document.documentElement.clientHeight;
// 获取整个文档的高度
- const scrollHeight = document.documentElement.scrollHeight
+ const scrollHeight = document.documentElement.scrollHeight;
- clearTimeout(debounceTimer)
+ clearTimeout(debounceTimer);
debounceTimer = setTimeout(() => {
if (scrollTop + clientHeight >= scrollHeight - 10) {
- num = num + 1
- console.log(num)
- fetchData() // 接近底部时加载更多数据
+ num = num + 1;
+ console.log(num);
+ fetchData(); // 接近底部时加载更多数据
}
- }, 500)
+ }, 500);
}
async function loadMore() {
- console.log(loading.value)
+ console.log(loading.value);
if (loading.value) {
- const more = await fetchList()
- taskDetailPictureList.value.push(...more)
- console.log(taskDetailPictureList)
+ const more = await fetchList();
+ taskDetailPictureList.value.push(...more);
+ console.log(taskDetailPictureList);
}
}
-let canloadMore = true
+let canloadMore = true;
async function fetchList() {
try {
- pagination.pageNo += 1
+ pagination.pageNo += 1;
const { data, pageCount, total } = await getSimilarityList({
...pagination,
...sortBy,
pictureId: taskDetailInfo.value.ocrPicture.id,
- })
- canloadMore = pageCount >= pagination.pageNo && pageCount > 0
- totalCount.value = total
- return data
- }
- catch (error) {
- canloadMore = false
- return []
+ });
+ canloadMore = pageCount >= pagination.pageNo && pageCount > 0;
+ totalCount.value = total;
+ return data;
+ } catch (error) {
+ canloadMore = false;
+ return [];
}
}
async function reset() {
- pagination.pageNo = 0
- pagination.pageSize = 30
- taskDetailPictureList.value.length = 0
- loading.value = false
- canloadMore = true
+ pagination.pageNo = 0;
+ pagination.pageSize = 30;
+ taskDetailPictureList.value.length = 0;
+ loading.value = false;
+ canloadMore = true;
// layout()
}
async function refreshHandler() {
- getImgList()
+ getImgList();
}
-function sortHandler(orderby: 'similarityScore' | 'createdate') {
- sortBy.orderName = orderby
- sortBy.orderType = sortBy.orderType === 'asc' ? 'desc' : 'asc'
- refreshHandler()
+function sortHandler(orderby: "similarityScore" | "createdate") {
+ sortBy.orderName = orderby;
+ sortBy.orderType = sortBy.orderType === "asc" ? "desc" : "asc";
+ refreshHandler();
}
@@ -661,7 +654,7 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
+
+
+
-
+
-
+
diff --git a/src/views/task/aside/TaskList.vue b/src/views/task/aside/TaskList.vue
index 0e5eb93..acb1bba 100644
--- a/src/views/task/aside/TaskList.vue
+++ b/src/views/task/aside/TaskList.vue
@@ -76,7 +76,7 @@ async function fetchList() {
watch(
() => taskStore.activeId,
(newVal) => {
- // activeId.value = newVal
+ activeId.value = newVal
},
)
diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue
index 591a015..7b738b9 100644
--- a/src/views/task/content/Content.vue
+++ b/src/views/task/content/Content.vue
@@ -8,202 +8,207 @@ import {
ref,
unref,
watch,
-} from 'vue'
-import { chunk, clone } from 'lodash-es'
-import { useDialog, useMessage } from 'naive-ui'
-import { useRoute, useRouter } from 'vue-router'
-import { useInfiniteScroll } from '@vueuse/core'
-import BatchModal from '../modal/BatchModal.vue'
-import CustomSettingModal from '../modal/CustomSettingModal.vue'
-import PictureTable from './PictureTable.vue'
-import TaskTable from './TaskTable.vue'
-import History from './History.vue'
-import NotPassed from '@/components/Approval/NotPassed.vue'
-import { getAllfieldList, getfieldList } from '@/api/home/filter'
-import { TASK_STATUS_OBJ } from '@/enums/index'
-import { useFinal } from '@/store/modules/final'
+} from "vue";
+import { chunk, clone } from "lodash-es";
+import { useDialog, useMessage } from "naive-ui";
+import { useRoute, useRouter } from "vue-router";
+import { useInfiniteScroll } from "@vueuse/core";
+import BatchModal from "../modal/BatchModal.vue";
+import CustomSettingModal from "../modal/CustomSettingModal.vue";
+import PictureTable from "./PictureTable.vue";
+import TaskTable from "./TaskTable.vue";
+import History from "./History.vue";
+import NotPassed from "@/components/Approval/NotPassed.vue";
+import { getAllfieldList, getfieldList } from "@/api/home/filter";
+import { TASK_STATUS_OBJ } from "@/enums/index";
+import { useFinal } from "@/store/modules/final";
import {
audit,
dubiousfileyd,
getSimilarityList,
getTaskDetailInfo,
-} from '@/api/task/task'
-import { useTask } from '@/store/modules/task'
-import { useUser } from '@/store/modules/user'
-import { isEmpty } from '@/utils'
-import { formatToDateHMS } from '@/utils/dateUtil'
-import { hideDownload } from '@/utils/image'
-
-const emit = defineEmits(['setAsideItemName'])
-
-const router = useRouter()
-const loading = ref(false)
-const batch = ref(false)
-const batchtwo = ref(false)
-const selectItems = ref
-
+
-
-
+
-
+
@@ -742,14 +735,14 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
src="@/assets/images/task/btn-not-pass.png"
alt=""
@click.stop="rejectHandler(selectItems)"
- >
+ />
+ />

@@ -766,11 +759,26 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
:style="
isFullScreen
? {
- height: '596px',
- }
+ height: '596px',
+
+ }
: {}
"
>
+
@@ -795,24 +803,27 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
isFullScreen
? imgbigshow
? {
- 'position': 'relative',
- 'flex': 2,
- 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
- }
+ position: 'relative',
+ //width: '70vw',
+ flex: 1,
+ // flex: 0.75,
+ 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
+ }
: {
- 'height': '92vh',
- 'flex': 2,
+ height: '92vh',
+ //flex: 1,
+
+ 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
+ }
+ : {
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
}
- : {
- 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
- }
"
@mouseover="overTaskHandle"
@mouseleave="leaveTaskHandler"
@click="previewHandler"
>
-
-
+
+ />
+ />
+ />
@@ -896,11 +907,12 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
class="icon-status"
src="@/assets/images/task/similarity.png"
alt=""
- >
+ />
- {{ totalCount }}张
+ {{ totalCount }}张
相似匹配
@@ -930,8 +942,8 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
{{
taskDetailInfo?.ocrPicture?.submitDateTimestamp
? formatToDateHMS(
- Number(taskDetailInfo.ocrPicture.submitDateTimestamp),
- )
+ Number(taskDetailInfo.ocrPicture.submitDateTimestamp)
+ )
: "-"
}}
@@ -950,12 +962,15 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
class="right"
:style="
isFullScreen
- ? {
- width: '320px',
- borderLeft: '2px solid #507AFD',
- position: 'relative',
- }
- : {}
+ ? {flex: 0.3,
+ // flex: 0,
+ //width: '30vw',
+ borderLeft: '2px solid #507AFD',
+ position: 'relative',
+ borderRadius: 0,
+ height:'596px'
+ }
+ : { flex: 0.5}
"
>

-
+
+
相似图片({{ totalCount }})
+ />
+ />
-
+

{{ taskDetailInfo.fromtaskname }}
-
-
-
+
+
@@ -1096,11 +1113,15 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
-
+
+
+
@@ -1181,7 +1209,8 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
color: #333333;
font-family: PingFang SC, PingFang SC-Medium;
"
- >相似图片({{ totalCount }})
+ >相似图片({{ totalCount }})
{{ item[0].value }}
+ />
+ />
-->
import { ref, watch } from "vue";
-import * as XLSX from 'xlsx';
+import * as XLSX from "xlsx";
defineProps({
data: {
@@ -12,13 +12,13 @@ defineProps({
default: () => [[]],
},
});
-const emit = defineEmits(["showModal","getrowValue"]);
+const emit = defineEmits(["showModal", "getrowValue"]);
function showActionsModal() {
emit("showModal");
}
-function getrowvalue(row){
- emit("getrowValue",row);
+function getrowvalue(row) {
+ emit("getrowValue", row);
}
@@ -37,14 +37,28 @@ function getrowvalue(row){
{{ item[0].label }}
-
- {{ item[0].value }}
+
+
+
+ {{ item[0].value }}
{{ item[1].label }}
-
- {{ item[1].value }}
+
+
+
+
+ {{ item[1].value }}
diff --git a/src/views/task/index.vue b/src/views/task/index.vue
index 9eb6e38..467e92d 100644
--- a/src/views/task/index.vue
+++ b/src/views/task/index.vue
@@ -32,6 +32,9 @@ function setAsideItemName(text) {
:deep(.wrapper){
top:0
}
+:deep(.ip_box){
+ z-index: 50;
+}
.main {
display: flex;
flex-direction: row;
diff --git a/src/views/task/modal/CustomFieldModal.vue b/src/views/task/modal/CustomFieldModal.vue
index c50b804..4aaccbf 100644
--- a/src/views/task/modal/CustomFieldModal.vue
+++ b/src/views/task/modal/CustomFieldModal.vue
@@ -1,10 +1,12 @@
@@ -420,7 +416,7 @@ function queryData(value, type) {
@@ -449,9 +445,7 @@ function queryData(value, type) {
-
-

- 系统默认
-
+ 系统默认
{{ item.name }}
- 自定义配置
-
+ 自定义配置
-
- 确定
-
-
+ 确定
+
取消
diff --git a/src/views/worksheet/aside/Aside.vue b/src/views/worksheet/aside/Aside.vue
index e151339..d93aad1 100644
--- a/src/views/worksheet/aside/Aside.vue
+++ b/src/views/worksheet/aside/Aside.vue
@@ -18,7 +18,11 @@ import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import { useUser } from '@/store/modules/user'
import { useWorkOrder } from '@/store/modules/workOrder'
import { getViewportOffset } from '@/utils/domUtils'
+import { useRoute } from 'vue-router'
+const route = useRoute()
+const searchContent = route.query.searchContent;
+console.log(searchContent);
defineOptions({ name: 'AsideContent' })
const emit = defineEmits(['ApprovalOver'])
@@ -36,7 +40,7 @@ function collapseHandler() {
const mousetrap = inject('mousetrap') as any
mousetrap.bind('[', collapseHandler)
-const searchKeyword = ref('')
+const searchKeyword = ref(searchContent ? searchContent : '')
const asideWidth = computed(() => {
return collapse.value ? 0 : 308
@@ -157,15 +161,15 @@ const inputHandler = debounce((word) => {
function ApprovalOver(packageId) {
emit('ApprovalOver', packageId)
}
+
+if (searchContent) {
+ showSearch.value = true
+ inputHandler(searchContent)
+}
-
+
@@ -179,46 +183,23 @@ function ApprovalOver(packageId) {
所有任务包
-
+
@@ -237,6 +218,7 @@ function ApprovalOver(packageId) {
padding: 12px 16px;
width: 100%;
overflow: hidden;
+
.warpper {
display: flex;
justify-content: space-between;
diff --git a/src/views/worksheet/components/pictureCard.vue b/src/views/worksheet/components/pictureCard.vue
new file mode 100644
index 0000000..310c6b2
--- /dev/null
+++ b/src/views/worksheet/components/pictureCard.vue
@@ -0,0 +1,209 @@
+
+
+
+
-
-
+
+
-
+
-
+
+
+
+
+
diff --git a/src/views/worksheet/content/Content.vue b/src/views/worksheet/content/Content.vue
index 69e6015..c50ab8b 100644
--- a/src/views/worksheet/content/Content.vue
+++ b/src/views/worksheet/content/Content.vue
@@ -13,7 +13,16 @@ import { format } from 'date-fns'
import imagesloaded from 'imagesloaded'
import { clone, cloneDeep, debounce, pickBy } from 'lodash-es'
import { useDialog, useMessage } from 'naive-ui'
-import { computed, onMounted, onUnmounted, onUpdated, reactive, ref, unref, watch } from 'vue'
+import {
+ computed,
+ onMounted,
+ onUnmounted,
+ onUpdated,
+ reactive,
+ ref,
+ unref,
+ watch,
+} from 'vue'
import PictureInfo from '../components/PictureInfo.vue'
import ConfrimModal from '../modal/ConfrimModal.vue'
import type { ApprovalParam, SimilarityPictureSortParam } from '/#/api'
@@ -28,8 +37,7 @@ let _imagesload: any
function setBatch(value: boolean) {
if (value && batch.value)
batch.value = !value
- else
- batch.value = value
+ else batch.value = value
if (value === false) {
selectItems.value.forEach(item => (item.checked = false))
@@ -263,15 +271,23 @@ function leaveTaskHandler() {
overTask.value = null
}
function onEsc() {
- if (isFullScreen.value && !(document.querySelector('.n-modal-container')))
+ if (isFullScreen.value && !document.querySelector('.n-modal-container'))
isFullScreen.value = false
}
+
+function resizeImage() {
+ const container = document.querySelector('.image-container')!
+ const containerWidth = container.offsetWidth
+ const containerHeight = container.offsetHeight
+}
+
onUnmounted(() => {
workStore.reset()
document.removeEventListener('keydown', onEsc)
})
onMounted(() => {
document.addEventListener('keydown', onEsc)
+ window.addEventListener('resize', resizeImage)
})
function immersionHandler() {
// class="wrapper"
@@ -282,8 +298,8 @@ function immersionHandler() {
function showAction() {
const item = taskDetailInfo.value
- // if (item.historyStates === 2 || item.historyStates === 3)
- // return
+ if (item.historyStates === 2 || item.historyStates === 3)
+ return
if (batch.value === false)
overTask.value = item
@@ -379,7 +395,9 @@ function handleApproveMainImage(items?: any) {
const packageid = workStore.getActiveId
taskDetailInfo.value = await getTaskDetailInfo(packageid)
}
- else { message.error(res.message) }
+ else {
+ message.error(res.message)
+ }
})
},
onNegativeClick: () => {},
@@ -445,7 +463,9 @@ function doAudit(param: any) {
emitter.emit('refresh')
refreshHandler()
}
- else { message.error(res.message) }
+ else {
+ message.error(res.message)
+ }
})
}
@@ -467,10 +487,12 @@ function handleRejectdubiousfileyd() {
refreshHandler()
})
}
- else { message.error(res.message) }
+ else {
+ message.error(res.message)
+ }
})
},
- onNegativeClick: () => { },
+ onNegativeClick: () => {},
})
}
defineExpose({
@@ -483,8 +505,18 @@ defineExpose({
+
+
+
+
+
+
+
+
+
+
+
+
+ 

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ TASK_STATUS_OBJ[taskDetailInfo?.userapprove?.statshis]
+ }}
+ 审批状态
+
+
+
+
+
+
+
+ {{ totalCount }}张
+
+ 相似匹配
+
+
+
+ 

+
+
+
+
+ {{ taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-" }}
+
+
+
+
+ {{
+ taskDetailInfo?.ocrPicture?.submitDateTimestamp
+ ? formatToDateHMS(
+ Number(taskDetailInfo.ocrPicture.submitDateTimestamp),
+ )
+ : "-"
+ }}
+
+
+
+
+
+
{{ packageName }}
-
-
+
+
@@ -517,7 +549,10 @@ defineExpose({
返回
-
-
+
@@ -860,11 +958,14 @@ defineExpose({
.left {
flex: 0.6;
- background-size: cover;
+ background-size: auto 346px;
+
background-position: center;
background-repeat: no-repeat;
border-radius: 8px;
position: relative;
+ width: 632px;
+ height: 346px;
.preview {
position: absolute;
@@ -947,7 +1048,12 @@ defineExpose({
border-radius: 8px;
align-items: center;
justify-content: center;
- background: linear-gradient(180deg,rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.00) 29%, rgba(3,0,0,0.73))
+ background: linear-gradient(
+ 180deg,
+ rgba(0, 0, 0, 0) 0%,
+ rgba(0, 0, 0, 0) 29%,
+ rgba(3, 0, 0, 0.73)
+ );
}
.info {
@@ -1194,20 +1300,20 @@ defineExpose({
font-size: 14px;
.val {
position: absolute;
- left: 0;
- top: 0;
- display: block;
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 12px;
- font-family: PingFang SC, PingFang SC-Semibold;
- font-weight: Semibold;
- text-align: left;
- color: #ffffff;
- line-height: 24px;
+ left: 0;
+ top: 0;
+ display: block;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 12px;
+ font-family: PingFang SC, PingFang SC-Semibold;
+ font-weight: Semibold;
+ text-align: left;
+ color: #ffffff;
+ line-height: 24px;
}
}
@@ -1253,7 +1359,11 @@ defineExpose({
border-radius: 8px;
align-items: center;
justify-content: center;
- background: linear-gradient(180deg,rgba(0,0,0,0.01), rgba(0,0,0,0.44) 88%);
+ background: linear-gradient(
+ 180deg,
+ rgba(0, 0, 0, 0.01),
+ rgba(0, 0, 0, 0.44) 88%
+ );
}
}
}
+
@@ -542,13 +577,17 @@ defineExpose({
- {{ taskDetailInfo?.photoDateTimestamp }}
+ {{ taskDetailInfo?.photoDateTimestamp }}
+
{{
taskDetailInfo?.submitDateTimestamp
- ? format(taskDetailInfo?.submitDateTimestamp, "yyyy-MM-dd HH:mm:ss")
+ ? format(
+ taskDetailInfo?.submitDateTimestamp,
+ "yyyy-MM-dd HH:mm:ss",
+ )
: "-"
}}
@@ -556,11 +595,15 @@ defineExpose({
@@ -599,7 +642,7 @@ defineExpose({
-


+
@@ -611,20 +654,48 @@ defineExpose({
/>
-
-
-
-
+
+
+
+
任务包图片
-
+
@@ -726,30 +803,51 @@ defineExpose({
- {{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0)
+ {{
+ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0)
}}%
-
+
-
+