Переглянути джерело

设置新任命发布时间默认值

Xiao_123 2 місяців тому
батько
коміт
1bf6ffec45

+ 3 - 10
src/views/menduner/system/talentMap/maintenance/gather/components/webAnalysis.vue

@@ -31,12 +31,6 @@
         <template #header>
           <div class="flex items-center justify-between">
             <el-text class="flex-1" truncated>{{ content.url }}</el-text>
-            <!-- <el-button
-              type="primary"
-              plain
-              class="mt-10px"
-              @click="handleSubmit(content, index)"
-            >信息提取</el-button> -->
           </div>
         </template>
         <iframe
@@ -58,14 +52,13 @@ import TurndownService from 'turndown'
 import { talentWebParsingApi } from '@/api/menduner/system/talentMap/webParsing.ts'
 import { generateUUID } from '@/utils'
 import { ElLoading } from 'element-plus'
+import { timesTampChange } from '@/utils/transform/date.js'
 
 const emit = defineEmits(['analysis', 'reset'])
 const message = useMessage() // 消息弹窗
 const { t } = useI18n() // 国际化
 
 const queryParams = reactive({
-	// urls: 'https://mp.weixin.qq.com/s/JZ5qxaj9vXsEsswxxD1djA' // https://mp.weixin.qq.com/s/R1aJpn9z-Jf0dk9ttoYYeg
-	// urls: 'https://mp.weixin.qq.com/s/VAANL7NhIp2JogW2ZjSFKg'
   urls: ''
 })
 const queryFormRef = ref()
@@ -208,11 +201,11 @@ const showPage = (res) => {
     setTimeout(() => {
       tryExtractPublishTime(doc, html, (publishTime) => {
         if (publishTime) {
-          res.publish_time = publishTime
+          res.publish_time = publishTime && !['null', 'undefined'].includes(publishTime) ? publishTime
             .replace("年", "-")
             .replace("月", "-")
             .replace("日", "")
-            .split(" ")[0]
+            .split(" ")[0] : timesTampChange(new Date().getTime(), 'Y-M-D')
         }
       });
     }, 100); // 先等100ms让iframe初步渲染,再开始轮询

+ 1 - 1
src/views/menduner/system/talentMap/search/index.vue

@@ -133,7 +133,7 @@ import { talentSearchApi } from '@/api/menduner/system/talentMap/search'
 import { talentLabelingApi } from '@/api/menduner/system/talentMap/labeling'
 
 const message = useMessage() // 消息弹窗
-const searchValue = ref('酒店运营')
+const searchValue = ref(null)
 const formRef = ref()
 const loading = ref(false)
 const list = ref([])