pull/1/head
Dragon 2 years ago
parent 29781a80ed
commit febface968

1
components.d.ts vendored

@ -17,6 +17,7 @@ declare module 'vue' {
NCollapse: typeof import('naive-ui')['NCollapse'] NCollapse: typeof import('naive-ui')['NCollapse']
NCollapseItem: typeof import('naive-ui')['NCollapseItem'] NCollapseItem: typeof import('naive-ui')['NCollapseItem']
NConfigProvider: typeof import('naive-ui')['NConfigProvider'] NConfigProvider: typeof import('naive-ui')['NConfigProvider']
NDataTable: typeof import('naive-ui')['NDataTable']
NDatePicker: typeof import('naive-ui')['NDatePicker'] NDatePicker: typeof import('naive-ui')['NDatePicker']
NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider'] NDivider: typeof import('naive-ui')['NDivider']

@ -1,11 +1,13 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onBeforeMount, reactive, ref, toRefs, unref } from 'vue' import { computed, onBeforeMount, reactive, ref, toRefs, unref } from 'vue'
import { useDialog, useMessage } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import { audit } from '@/api/task/task' import { audit } from '@/api/task/task'
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'commit', rejectId: any, backId: any, isOther: boolean) (e: 'commit', rejectId: any, backId: any, isOther: boolean)
}>() }>()
const message = useMessage()
const dictonaryStore = useDictionary() const dictonaryStore = useDictionary()
const state: any = reactive({ const state: any = reactive({
@ -20,6 +22,7 @@ const cardStyle = {
} }
function showModal(value) { function showModal(value) {
console.log(value)
state.detail = value state.detail = value
show.value = true show.value = true
} }
@ -48,23 +51,24 @@ const comomitValue = computed(() => {
async function handleSumbit(e: MouseEvent) { async function handleSumbit(e: MouseEvent) {
e.preventDefault() e.preventDefault()
closeModal()
// selectRejectId.value === 'other' // selectRejectId.value === 'other'
// emit('commit', unref(comomitValue), unref(selectBackId), showOther.value) // emit('commit', unref(comomitValue), unref(selectBackId), showOther.value)
console.log(state.detail) console.log(state.detail)
// const param = { console.log(comomitValue)
// formid: formIds, const param = {
// taskId: taskIds, formid: [state.detail.id],
// approvd: false, taskId: ['66b06dda-e673-11ee-a934-0242bc74e4f3'],
// taskComment: idOrDesc, approvd: false,
// taskname: isOther ? tasknames : [''], taskComment: comomitValue.value,
// } taskname: showOther.value ? state.detail.detail.tasks : ['其他'],
// audit(param).then((res) => { }
// const { code } = res audit(param).then((res) => {
// if (code === 'OK') const { code } = res
// reload() if (code === 'OK')
// else message.error(res.message) closeModal()
// }) else message.error(res.message)
})
} }
onBeforeMount(async () => { onBeforeMount(async () => {

@ -305,7 +305,7 @@ async function formatColumns() {
return h(SvgIcon, { name: 'sort-3' }) return h(SvgIcon, { name: 'sort-3' })
}, },
render(row: any) { render(row: any) {
return row.similarityscore ? `<span></span>${row.similarityscore}%` : '' return row.similarityscore ? `${row.similarityscore}%` : ''
}, },
} }
} }

@ -68,7 +68,10 @@ async function reject() {
} }
async function viewRepeat(e: MouseEvent) { async function viewRepeat(e: MouseEvent) {
emit('notPass', state.detail) emit('notPass', {
id: state.taskId,
detail: state.detail,
})
e.preventDefault() e.preventDefault()
closeModal() closeModal()
} }

Loading…
Cancel
Save