Dragon 2 years ago
parent a4e121ecb0
commit 4c65bd38c1

@ -40,7 +40,7 @@ const actions = computed(() => {
<style scoped> <style scoped>
.normal { .normal {
color: blue color: #507AFD
} }
.gap { .gap {
@ -48,6 +48,6 @@ const actions = computed(() => {
} }
.reject { .reject {
color: red; color: #FF4E4F;
} }
</style> </style>

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { DataTableColumns, DataTableRowKey, PaginationProps } from 'naive-ui' import type { DataTableColumns, DataTableRowKey, PaginationProps } from 'naive-ui'
import { NDataTable, useDialog, useMessage } from 'naive-ui' import { NButton, NDataTable, useDialog, useMessage } from 'naive-ui'
import { import {
computed, computed,
h, h,
@ -210,7 +210,35 @@ async function getColumns() {
async function formatColumns() { async function formatColumns() {
// TODO // TODO
let index let index
index = columnsRef.value.findIndex(v => v.title == '任务ID')
if (index > -1) {
columnsRef.value[index] = {
title: '任务ID',
key: columnsRef.value[index].key, // "id"
fixed: columnsRef.value[index].fixed || undefined,
width: 200,
render(row) {
const item: any = izstatusList.value.find(
(item: any) => item.value == row.states,
)
return h(
NButton,
{
'strong': true,
'tertiary': true,
'text': true,
'size': 'small',
'text-color': '#507AFD',
'onClick': () => goDetail(row),
},
{ default: () => row.id },
)
},
}
}
index = columnsRef.value.findIndex(v => v.title == '任务名称') index = columnsRef.value.findIndex(v => v.title == '任务名称')
if (index > -1) { if (index > -1) {
columnsRef.value[index] = { columnsRef.value[index] = {
@ -538,6 +566,10 @@ function validate(items: any[]) {
return null return null
} }
function goDetail(row) {
console.log(row)
}
function resetHandler() { function resetHandler() {
dialog.info({ dialog.info({
title: '确认提示', title: '确认提示',
@ -688,9 +720,9 @@ async function refreshHandler(searchId?: any) {
<SvgIcon size="32" name="magnifying" /> <SvgIcon size="32" name="magnifying" />
</div> </div>
<div> <div>
<n-button class="xjcc" text @click="showModal(repeatModalRef)"> <NButton class="xjcc" text @click="showModal(repeatModalRef)">
小结查重 小结查重
</n-button> </NButton>
<div class="btn" @click="batchApproval"> <div class="btn" @click="batchApproval">
<SvgIcon style="margin-right: 6px" size="14" name="tf" /> <SvgIcon style="margin-right: 6px" size="14" name="tf" />
批量审批 批量审批

Loading…
Cancel
Save