|
|
|
@ -156,8 +156,8 @@ async function getColumns() {
|
|
|
|
|
const useList = res.data;
|
|
|
|
|
const userFieldFixed = useList.userFieldFixed?.split(",");
|
|
|
|
|
const userFieldUnFixed = useList.userFieldUnFixed?.split(",");
|
|
|
|
|
console.log(userFieldFixed,userFieldUnFixed,'userFieldUnFixed')
|
|
|
|
|
console.log(allList,'allList')
|
|
|
|
|
console.log(userFieldFixed, userFieldUnFixed, "userFieldUnFixed");
|
|
|
|
|
console.log(allList, "allList");
|
|
|
|
|
allList?.map((v) => {
|
|
|
|
|
if (!userFieldFixed?.length && !userFieldUnFixed?.length) {
|
|
|
|
|
if (v.isrequired == 2) {
|
|
|
|
@ -201,7 +201,10 @@ async function getColumns() {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
formatColumns();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function formatColumns() {
|
|
|
|
|
// TODO处理特殊字段
|
|
|
|
|
let index;
|
|
|
|
|
index = columnsRef.value.findIndex((v) => v.title == "任务名称");
|
|
|
|
@ -220,7 +223,7 @@ async function getColumns() {
|
|
|
|
|
if (index > -1) {
|
|
|
|
|
columnsRef.value[index] = {
|
|
|
|
|
title: "审批状态",
|
|
|
|
|
key: "states",
|
|
|
|
|
key: columnsRef.value[index]["key"],
|
|
|
|
|
width: 100,
|
|
|
|
|
sorter: "default",
|
|
|
|
|
renderSorterIcon: ({ order }) => {
|
|
|
|
@ -240,7 +243,7 @@ async function getColumns() {
|
|
|
|
|
if (index > -1) {
|
|
|
|
|
columnsRef.value[index] = {
|
|
|
|
|
title: "图片相似度",
|
|
|
|
|
key: "similarityscore",
|
|
|
|
|
key: columnsRef.value[index]["key"],
|
|
|
|
|
width: 150,
|
|
|
|
|
sorter: "default",
|
|
|
|
|
renderSorterIcon: ({ order }) => {
|
|
|
|
@ -257,7 +260,7 @@ async function getColumns() {
|
|
|
|
|
if (index > -1) {
|
|
|
|
|
columnsRef.value[index] = {
|
|
|
|
|
title: "提报时间",
|
|
|
|
|
key: "createdate",
|
|
|
|
|
key: columnsRef.value[index]["key"],
|
|
|
|
|
width: 200,
|
|
|
|
|
sorter: "default",
|
|
|
|
|
renderSorterIcon: ({ order }) => {
|
|
|
|
@ -275,7 +278,7 @@ async function getColumns() {
|
|
|
|
|
if (index > -1) {
|
|
|
|
|
columnsRef.value[index] = {
|
|
|
|
|
title: "更新时间",
|
|
|
|
|
key: "updatetime",
|
|
|
|
|
key: columnsRef.value[index]["key"],
|
|
|
|
|
width: 200,
|
|
|
|
|
render(row: any) {
|
|
|
|
|
return row.updatetime ? formatToDateHMS(row.updatetime) : "";
|
|
|
|
@ -462,7 +465,6 @@ function sucessHandler(excelData) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function commitHandler(columns) {
|
|
|
|
|
console.log(columns, "commitHandler");
|
|
|
|
|
columnsRef.value = [
|
|
|
|
|
...columns,
|
|
|
|
|
{
|
|
|
|
@ -481,6 +483,7 @@ function commitHandler(columns) {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
formatColumns();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function actionHandler(action: any, row: any) {
|
|
|
|
|