提交 fd6661a1 authored 作者: liuluyu's avatar liuluyu

更新标准库文件预览

上级 0a043e02
......@@ -10,7 +10,7 @@
:loading="loading"
:edit-config="{ trigger: 'dblclick', mode: 'row' }"
:columnConfig="{ resizable: true }"
:row-config="{ isCurrent: true, isHover: true,useKey: true }"
:row-config="{ isCurrent: true, isHover: true, useKey: true }"
v-on="gridEvents"
@filter-change="filterChangeEvent"
>
......@@ -46,7 +46,7 @@
<template #toolbar_buttons>
<div v-show="isFileList">
<blockquote>
<span @click="showFileContent" v-html="fileDoc?.fileName"> </span>
<span @click="showFileContent(fileDoc)" v-html="fileDoc?.fileName"> </span>
<span @click="showFile()" style="color: black; margin-left: 20px"> 返回 </span>
</blockquote>
</div>
......@@ -63,7 +63,7 @@
</template>
<vxe-button mode="text" size="small" content="删除" @click="removeRowEvent(row)" />
<vxe-button mode="text" size="small" content="详情" @click="handleDetail(row)" />
<vxe-button v-if="gzltp=='4'" mode="text" size="small" content="风险跟踪" @click="handleFLow(row)" />
<vxe-button v-if="gzltp == '4'" mode="text" size="small" content="风险跟踪" @click="handleFLow(row)" />
<!-- <vxe-button mode="text" size="small" content="分配任务" @click="sendTask(row)" /> -->
</template>
<template #text_edit="{ row, column }">
......@@ -85,8 +85,8 @@
</div>
<component :is="currentComponent" @register="registerModal" @success="handleSuccess" @callback="callback" />
<AuditActListModal @register="refAuditActListModal" @saveRel="handleSaveRel" />
<AuditSetLableModal @register="regAddLableModal" modalTitle="添加标签" @saveLabel="saveLabels" />
<AuditActListModal @register="refAuditActListModal" @save-rel="handleSaveRel" />
<AuditSetLableModal @register="regAddLableModal" modalTitle="添加标签" @save-label="saveLabels" />
<MergeActModal @register="registerMergeActModal" @success="handleSuccess" />
<FileViewerModal @register="registerShowFileContentModal" :useStaticPrefixForDocx="true" />
......@@ -132,7 +132,7 @@
import FileViewerModal from '/@/components/onlinePreview/FileViewerModal.vue';
import { useUserStoreWithOut } from '/@/store/modules/user';
import { saveOrUpdateByTp, deleteByTp, saveBatchLabels, saveBatchActRels, queryActByIds, queryLabelByCodes } from '../index.api';
import { cloneDeep } from 'lodash-es';
import AuditProblemDetailFlowModal from '/@/views/newlib/AuditProblemDetailFlowModal.vue';
......@@ -260,9 +260,8 @@
let end = st + tablePage.pageSize;
curPageData.value = tableData.value.slice(st, end);
};
const gzltp = ref<string>('0');;
const gzltp = ref<string>('0');
async function setTableData(tp, list) {
gzltp.value = tp;
curtp.value = tp;
currentComponent.value = currentComponentAry.value[tp];
......@@ -600,41 +599,40 @@
async function setFilterOptions() {
if (!auditCols[curtp.value]) return;
let columns = cloneDeep(auditCols[curtp.value]);
let filerOprions = {};
columns.forEach(function (col) {
if (col.filterMethodTp == 'check') {
let colField = col.field;
// 过滤掉 null/undefined/空字符串 的值,并去重
filerOprions = listData.value
.map(obj => obj[colField])
.filter(value => value != null && value !== '') // 排除 null/undefined/空字符串
.map(value => ({
.map((obj) => obj[colField])
.filter((value) => value != null && value !== '') // 排除 null/undefined/空字符串
.map((value) => ({
label: String(value), // 确保 label 是字符串
value: value
value: value,
}));
// 更高效的去重方式
const uniqueOptions = [];
const seen = new Set();
filerOprions.forEach(option => {
filerOprions.forEach((option) => {
const key = `${option.value}`; // 使用字符串作为键
if (!seen.has(key)) {
seen.add(key);
uniqueOptions.push(option);
}
});
col.filters = uniqueOptions;
} else if (col.filterMethodTp == 'text') {
col.datas = [];
}
});
gridOptions.columns = [];
gridOptions.columns = columns;
}
......@@ -676,7 +674,7 @@
}
if (values[0]) {
console.log(listData.value,"listData.value")
console.log(listData.value, 'listData.value');
gridOptions.data = listData.value.filter((item) => values.indexOf(item[field]) > -1);
} else {
gridOptions.data = listData.value.filter((item) => datas.some((item) => item[field].includes(item)));
......@@ -717,13 +715,11 @@
handlePageChange({ currentPage: 1, pageSize: tablePage.pageSize });
}
const refStPlanManFlow = ref()
const refStPlanManFlow = ref();
function handleFLow(record: Recordable) {
console.log("----------- record",record);
console.log('----------- record', record);
//window.open(url.value+"&kjzlid="+record.id, '_blank');
refStPlanManFlow.value.iniPage(record);
}
defineExpose({
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论