|
|
@@ -7,6 +7,7 @@
|
|
|
</template>
|
|
|
</ElInput>
|
|
|
<ElButton :icon="Plus" @click="onEdit()">添加</ElButton>
|
|
|
+ <ElButton :icon="Refresh" @click="onUpdateStatistics()">更新统计数据</ElButton>
|
|
|
</template>
|
|
|
<ElTableColumn prop="id" label="#" width="80" />
|
|
|
<ElTableColumn prop="name" label="渠道名" align="center" />
|
|
|
@@ -57,7 +58,7 @@
|
|
|
import { inject, onMounted, ref } from 'vue'
|
|
|
import PagingTable from '@/components/PagingTable.vue'
|
|
|
import { useTimeFormatter } from '@/utils/formatter'
|
|
|
-import { Plus, Search } from '@vicons/tabler'
|
|
|
+import { Plus, Refresh, Search } from '@vicons/tabler'
|
|
|
import EditDialog from '@/components/EditDialog.vue'
|
|
|
import { setupEditDialog } from '@/utils/editDialog'
|
|
|
import { http } from '@/plugins/http'
|
|
|
@@ -97,4 +98,14 @@ async function getTableData() {
|
|
|
const res = await http.post('/ocrChannel/findApiChannel')
|
|
|
tableData.value = [res]
|
|
|
}
|
|
|
+
|
|
|
+async function onUpdateStatistics() {
|
|
|
+ try {
|
|
|
+ await http.post('/ocrChannel/updateStatistics')
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e)
|
|
|
+ ElMessage.error('更新失败:' + e)
|
|
|
+ }
|
|
|
+ ElMessage.success('更新成功')
|
|
|
+}
|
|
|
</script>
|