|
@@ -38,10 +38,10 @@
|
|
>
|
|
>
|
|
<template #content>
|
|
<template #content>
|
|
<div class="task-info">
|
|
<div class="task-info">
|
|
- <div v-for="item in taskInfoList" :key="item.id" class="task-info-item" @click="getInfoDetailClick">
|
|
|
|
|
|
+ <div v-for="item in taskInfoList" :key="item.taskId" v-loading="taskListLoad" class="task-info-item" @click="getInfoDetailClick(item)">
|
|
<div class="task-info-item-left">
|
|
<div class="task-info-item-left">
|
|
- <span>{{ item.date }}</span>
|
|
|
|
- <span v-if="item.state" class="ml-2">待生成</span>
|
|
|
|
|
|
+ <span>{{ item.taskTime }}</span>
|
|
|
|
+ <span v-if="item.status === 1" class="ml-2">待生成</span>
|
|
<span v-else class="ml-2">生成</span>
|
|
<span v-else class="ml-2">生成</span>
|
|
<span class="text-red">{{ item.num }}</span>
|
|
<span class="text-red">{{ item.num }}</span>
|
|
<span>条AI数据</span>
|
|
<span>条AI数据</span>
|
|
@@ -56,7 +56,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" keys="archives_tuning_btn_ai" @click="AiClick">
|
|
|
|
|
|
+ <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" keys="archives_tuning_btn_ai" :loading="aiLoading" @click="AiClick" @mouseenter="getTaskInfoList">
|
|
AI题名
|
|
AI题名
|
|
</el-button>
|
|
</el-button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
@@ -371,6 +371,7 @@ import { rowsToId, rowsToIdNumArr } from '~uti/tools'
|
|
|
|
|
|
import tuningApi from '~api/archiveConfig/tuning.js'
|
|
import tuningApi from '~api/archiveConfig/tuning.js'
|
|
import archiveFileApi from '~api/archiveFile/archiveFileAuto.js'
|
|
import archiveFileApi from '~api/archiveFile/archiveFileAuto.js'
|
|
|
|
+import aiApi from '~api/ai/ai.js'
|
|
|
|
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
@@ -1247,27 +1248,58 @@ const mergeDataColumn = [
|
|
{ key: 'name', name: '案卷题名', align: 'center' },
|
|
{ key: 'name', name: '案卷题名', align: 'center' },
|
|
|
|
|
|
]
|
|
]
|
|
-const AiClick = ()=>{
|
|
|
|
-
|
|
|
|
|
|
+const aiLoading = ref(false)
|
|
|
|
+
|
|
|
|
+const AiClick = async ()=>{
|
|
|
|
+ // 检查是否有被锁定的案卷
|
|
|
|
+ const lockedArchives = tableCheckedKeys.value.filter(item => item.isLock === 1)
|
|
|
|
+ if (lockedArchives.length > 0) {
|
|
|
|
+ window.$message.warning('选择的案卷中包含被锁定的项,无法进行AI题名')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let ids = ''
|
|
|
|
+ const rows = tableCheckedKeys.value
|
|
|
|
+ ids = rowsToId(rows)
|
|
|
|
+ aiLoading.value = true
|
|
|
|
+ const { error, code, data, msg } = await aiApi.creatFileNameFormAI({
|
|
|
|
+ ids: ids,
|
|
|
|
+ projectId:projectId.value,
|
|
|
|
+ contractId:contractId.value,
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ aiLoading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window.$message?.success(msg)
|
|
|
|
+ getTableData()
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ window.$message?.error(msg)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-const taskInfoList = ref([
|
|
|
|
- { date:'2020年6月30日', num:30, state:true, id:1 },
|
|
|
|
- { date:'2020年6月30日12:43:30', num:30, state:false, id:2 },
|
|
|
|
- { date:'2020年6月30日12:43:30', num:30, state:false, id:3 },
|
|
|
|
- { date:'2020年6月30日 ', num:30, state:true, id:4 },
|
|
|
|
- { date:'2020年6月30日12:43:30', num:30, state:false, id:5 },
|
|
|
|
-
|
|
|
|
- { date:'2020年6月30日', num:30, state:true, id:1 },
|
|
|
|
- { date:'2020年6月30日12:43:30', num:30, state:false, id:2 },
|
|
|
|
- { date:'2020年6月30日12:43:30', num:30, state:false, id:3 },
|
|
|
|
- { date:'2020年6月30日 ', num:30, state:true, id:4 },
|
|
|
|
- { date:'2020年6月30日12:43:30', num:30, state:false, id:5 },
|
|
|
|
-
|
|
|
|
|
|
|
|
-])
|
|
|
|
-const getInfoDetailClick = ()=>{
|
|
|
|
|
|
+const taskInfoList = ref([])
|
|
|
|
+const getInfoDetailClick = (item)=>{
|
|
console.log('详情')
|
|
console.log('详情')
|
|
- router.push({ path: '/archives/manage/ai' })//ai
|
|
|
|
|
|
+ router.push({ path: '/archives/manage/ai', query:item.taskId })//ai
|
|
|
|
+}
|
|
|
|
+const taskListLoad = ref(false)
|
|
|
|
+const getTaskInfoList = async ()=>{
|
|
|
|
+
|
|
|
|
+ taskListLoad.value = true
|
|
|
|
+ const { error, code, data } = await aiApi.getArchiveAiTask({
|
|
|
|
+
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+ contractId: contractId.value,
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ taskListLoad.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ taskInfoList.value = getArrValue(data?.records)
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ taskInfoList.value = []
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|