Browse Source

定期更新

zhuliu 1 year ago
parent
commit
70e13743c4

+ 46 - 16
src/views/components/import/conditionImport/components/projectListDialog.vue

@@ -157,6 +157,7 @@
               </el-option>
               </el-option>
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
+          
           <el-form-item label="是否更新" prop="ifUpdate" v-if="!form.patentNos || form.patentNos.length==0">
           <el-form-item label="是否更新" prop="ifUpdate" v-if="!form.patentNos || form.patentNos.length==0">
             <el-switch
             <el-switch
               v-model="form.ifUpdate"
               v-model="form.ifUpdate"
@@ -195,23 +196,44 @@
               </el-form-item> -->
               </el-form-item> -->
             </div>
             </div>
           </template>
           </template>
+          <el-form-item label="立即导入" prop="importNow" v-if="form.isUpdateCriteria && (!form.patentNos || form.patentNos.length==0)">
+            <el-switch
+              v-model="form.importNow"
+              :active-value="true"
+              :inactive-value="false"
+              active-color="#13ce66"
+            >
+            </el-switch>
+          </el-form-item>
         </el-form>
         </el-form>
         <div class="button">
         <div class="button">
-          <el-button
-            v-if="form.importToType == 0"
-            type="primary"
-            size="small"
-            @click="onSubmit(2)"
-            :loading="btnLoading2"
-            >仅保存为定期更新条件</el-button
-          >
-          <el-button
-            type="primary"
-            size="small"
-            @click="onSubmit(1)"
-            :loading="btnLoading"
-            >导入</el-button
-          >
+          <template v-if="form.isUpdateCriteria">
+            <el-button
+              v-if="form.importToType == 0"
+              type="primary"
+              size="small"
+              @click="onSubmit(2)"
+              :loading="btnLoading2"
+              >保存定期更新条件</el-button
+            >
+          </template>
+          <template v-else>
+            <el-button
+              v-if="form.importToType == 0"
+              type="primary"
+              size="small"
+              @click="onSubmit(2)"
+              :loading="btnLoading2"
+              >仅保存为定期更新条件</el-button
+            >
+            <el-button
+              type="primary"
+              size="small"
+              @click="onSubmit(1)"
+              :loading="btnLoading"
+              >导入</el-button
+            >
+          </template>
           <el-button size="small" @click="handleClose">取消</el-button>
           <el-button size="small" @click="handleClose">取消</el-button>
         </div>
         </div>
       </div>
       </div>
@@ -285,7 +307,11 @@ export default {
       if (this.form.importToId) {
       if (this.form.importToId) {
 
 
       }
       }
-      await this.getUpdateCycle()
+      if(this.form.isUpdateCriteria){
+        this.title = '保存定期更新条件'
+        this.$set(this.form,'ifUpdate',true)
+      }
+      // await this.getUpdateCycle()
       this.dialogVisible = true;
       this.dialogVisible = true;
     },
     },
     async getUpdateCycle(){
     async getUpdateCycle(){
@@ -478,6 +504,10 @@ export default {
     },
     },
     //保存定期更新条件
     //保存定期更新条件
     addUpdateCriteria(form){
     addUpdateCriteria(form){
+      if(form.importNow){
+        this.addImportTask(this.form)
+        return
+      }
       var conditionImport = this.$s.getSession('conditionImport')
       var conditionImport = this.$s.getSession('conditionImport')
       var params = {
       var params = {
         importToId:form.importToId,
         importToId:form.importToId,

+ 1 - 1
src/views/components/import/conditionImport/searchResult.vue

@@ -22,7 +22,7 @@
           <p><el-link style="width: 50px;color: #409EFF;" @click="searches">检索式</el-link></p>
           <p><el-link style="width: 50px;color: #409EFF;" @click="searches">检索式</el-link></p>
         </div>
         </div>
         <div>
         <div>
-          <el-button type="primary" size="small" @click="importToProject">导入专利</el-button>
+          <el-button type="primary" size="small" @click="importToProject">{{condition.isUpdateCriteria?'保存定期更新条件':'导入专利'}}</el-button>
           <el-button size="small" type="warning" @click="handleFieldManage">显示栏位管理</el-button>
           <el-button size="small" type="warning" @click="handleFieldManage">显示栏位管理</el-button>
         </div>
         </div>
       </el-header>
       </el-header>

+ 1 - 0
src/views/project/components/updateCriteria/updateCriteria.vue

@@ -178,6 +178,7 @@ export default {
             importToType:0,
             importToType:0,
             type:4,
             type:4,
             ifUpdate:this.update.ifUpdate,
             ifUpdate:this.update.ifUpdate,
+            isUpdateCriteria:true
         }
         }
         this.$commonJS.toImportParent(form,4)
         this.$commonJS.toImportParent(form,4)
     },
     },