yangg 6 годин тому
батько
коміт
432354d280

+ 1 - 1
.env.development

@@ -4,7 +4,7 @@ port = 8080
 # base api
 #VUE_APP_BASE_AI_API='https://ylaiapi.raycos.com.cn'
 VUE_APP_BASE_AI_API = 'http://192.168.100.101:8082'
-VUE_APP_BASE_API = 'http://192.168.100.101:8084'
+VUE_APP_BASE_API = 'http://192.168.66.101:8084'
 #192.168.66.187
 #朱:192.168.66.163
 #测试服务器:121.36.251.245

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/index.html


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/css/app.2137b3f6.css


+ 1 - 0
dist/static/css/chunk-0ee3f871.2adbb911.css

@@ -0,0 +1 @@
+.gpu-list[data-v-fbc5c11a]{padding:20px}.filter-section[data-v-fbc5c11a]{margin-bottom:20px}.ml-15[data-v-fbc5c11a]{margin-left:15px}.pagination[data-v-fbc5c11a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin-top:15px}.progress-wrapper[data-v-fbc5c11a],.status-wrapper[data-v-fbc5c11a]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:none!important;transition:none!important}.progress-wrapper[data-v-fbc5c11a]{padding:2px}.progress-wrapper[data-v-fbc5c11a] .el-progress{line-height:1;-webkit-transition:none!important;transition:none!important}.progress-wrapper[data-v-fbc5c11a] .el-progress .el-progress__text{font-size:12px!important;color:inherit;-webkit-transition:none!important;transition:none!important}.progress-wrapper[data-v-fbc5c11a] .el-progress .el-progress-circle{margin:0;-webkit-transition:none!important;transition:none!important}.progress-wrapper[data-v-fbc5c11a] .el-progress .el-progress-circle__path,.progress-wrapper[data-v-fbc5c11a] .el-progress .el-progress-circle__track,.progress-wrapper[data-v-fbc5c11a] .el-progress svg{-webkit-transition:none!important;transition:none!important}

+ 0 - 1
dist/static/css/chunk-25461074.dc3495c5.css

@@ -1 +0,0 @@
-.gpu-list[data-v-1daaa1f9]{padding:20px}.filter-section[data-v-1daaa1f9]{margin-bottom:20px}.ml-15[data-v-1daaa1f9]{margin-left:15px}.pagination[data-v-1daaa1f9]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin-top:15px}.progress-wrapper[data-v-1daaa1f9],.status-wrapper[data-v-1daaa1f9]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:none!important;transition:none!important}.progress-wrapper[data-v-1daaa1f9]{padding:2px}.progress-wrapper[data-v-1daaa1f9] .el-progress{line-height:1;-webkit-transition:none!important;transition:none!important}.progress-wrapper[data-v-1daaa1f9] .el-progress .el-progress__text{font-size:12px!important;color:inherit;-webkit-transition:none!important;transition:none!important}.progress-wrapper[data-v-1daaa1f9] .el-progress .el-progress-circle{margin:0;-webkit-transition:none!important;transition:none!important}.progress-wrapper[data-v-1daaa1f9] .el-progress .el-progress-circle__path,.progress-wrapper[data-v-1daaa1f9] .el-progress .el-progress-circle__track,.progress-wrapper[data-v-1daaa1f9] .el-progress svg{-webkit-transition:none!important;transition:none!important}

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/app.6d85b957.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/app.98333296.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-0ec56e2a.c3fa7773.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-0ee3f871.cdb8742c.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-25461074.feeb8291.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-730da84c.5eb33b1d.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-949d9832.81370a1d.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/chunk-a23e70e2.1a84e568.js


+ 2 - 1
src/api/template.js

@@ -5,7 +5,8 @@ export function searchTemplateCategory(data) {
   return request({
     url: '/template/category/search',
     method: 'post',
-    data
+    data,
+    timeout:0
   })
 }
 /* 获取全部分类接口 /template/category/selcetList*/

+ 1 - 1
src/layout/index.vue

@@ -12,7 +12,7 @@
         <settings />
       </right-panel>
     </div>
-    <chat-icon />
+    <!-- <chat-icon /> -->
   </div>
 </template>
 

+ 1 - 1
src/utils/request.js

@@ -7,7 +7,7 @@ import qs from 'qs'
 const service = axios.create({
   baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
   // withCredentials: true, // send cookies when cross-domain requests
-  timeout: 30000 // request timeout
+  timeout: 60000 // request timeout
 })
 
 // request interceptor

+ 242 - 8
src/views/middPage/list.vue

@@ -329,16 +329,18 @@
                     >
                       <i class="el-icon-refresh"></i> 重新处理
                     </el-dropdown-item>
-                    <!-- <el-dropdown-item
-                      @click.native="firstHandleUpload(scope.$index, scope.row)"
+                    <el-dropdown-item
+                      @click.native="handleRemoveTag(row)"
+                      v-if="row.tags && row.tags.length > 0"
                     >
-                      <i class="el-icon-refresh"></i> 批量处理
-                    </el-dropdown-item> -->
-                    <!--  <el-dropdown-item
-                      @click.native="firstHandleDelete(scope.$index, scope.row)"
+                      <i class="el-icon-delete"></i> 删除绑定标签
+                    </el-dropdown-item>
+                    <el-dropdown-item
+                      @click.native="handleRemoveProject(row)"
+                      v-if="row.projects && row.projects.length > 0"
                     >
-                      <i class="el-icon-delete"></i> 删除
-                    </el-dropdown-item> -->
+                      <i class="el-icon-delete"></i> 删除关联项目
+                    </el-dropdown-item>
                   </el-dropdown-menu>
                 </template>
               </el-dropdown>
@@ -570,6 +572,91 @@
         </span>
       </template>
     </el-dialog>
+
+    <!-- 删除标签对话框 -->
+    <el-dialog
+      title="删除标签"
+      :visible.sync="removeTagDialogVisible"
+      width="800px"
+    >
+      <el-form :model="removeTagForm" label-width="150px">
+        <el-form-item label="标签分类:">
+          <el-select
+            v-model="removeTagForm.category_id"
+            placeholder="请选择分类"
+            clearable
+            style="width: 350px"
+            @change="handleRemoveTagCategoryChange"
+          >
+            <el-option label="全部分类" value="" />
+            <el-option
+              v-for="item in categoriesList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="标签:">
+          <el-select
+            style="width: 350px"
+            v-model="removeTagForm.tags"
+            multiple
+            filterable
+            remote
+            reserve-keyword
+            :remote-method="handleRemoveTagSearch"
+            :loading="removeTagsLoading"
+            placeholder="请选择要删除的标签"
+          >
+            <el-option
+              v-for="tag in currentRowTags"
+              :key="tag.id"
+              :label="tag.name"
+              :value="tag.id"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="removeTagDialogVisible = false">取消</el-button>
+          <el-button type="primary" @click="submitRemoveTag">确定</el-button>
+        </span>
+      </template>
+    </el-dialog>
+
+    <!-- 删除项目对话框 -->
+    <el-dialog
+      title="删除项目"
+      :visible.sync="removeProjectDialogVisible"
+      width="800px"
+    >
+      <el-form :model="removeProjectForm" label-width="150px">
+        <el-form-item label="项目:">
+          <el-select
+            style="width: 350px"
+            v-model="removeProjectForm.projects"
+            multiple
+            filterable
+            placeholder="请选择要删除的项目"
+          >
+            <el-option
+              v-for="project in currentRowProjects"
+              :key="project.id"
+              :label="project.name"
+              :value="project.id"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="removeProjectDialogVisible = false">取消</el-button>
+          <el-button type="primary" @click="submitRemoveProject">确定</el-button>
+        </span>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -677,6 +764,23 @@ export default {
       },
       /* SOTA详情 总数 */
       Stoa_total: 0,
+      
+      /* 删除标签相关 */
+      removeTagDialogVisible: false,
+      removeTagForm: {
+        tags: [],
+        category_id: "",
+      },
+      removeTagsLoading: false,
+      currentRowTags: [], // 当前行的标签列表
+      currentRow: null, // 当前选中的行
+
+      /* 删除项目相关 */
+      removeProjectDialogVisible: false,
+      removeProjectForm: {
+        projects: [],
+      },
+      currentRowProjects: [], // 当前行的项目列表
     };
   },
 
@@ -1690,6 +1794,136 @@ export default {
       return undefined;
     },
 
+    // 处理删除标签按钮点击
+    handleRemoveTag(row) {
+      this.currentRow = row;
+      this.currentRowTags = row.tags || [];
+      this.removeTagDialogVisible = true;
+      this.removeTagForm = {
+        tags: [],
+        category_id: "",
+      };
+      this.fetchCategories();
+    },
+
+    // 处理删除标签分类变更
+    async handleRemoveTagCategoryChange(categoryId) {
+      this.removeTagForm.tags = [];
+      const filteredTags = this.currentRowTags.filter(tag => 
+        categoryId === "" || tag.category_id === categoryId
+      );
+      this.currentRowTags = filteredTags;
+    },
+
+    // 处理删除标签搜索
+    async handleRemoveTagSearch(query) {
+      if (query !== "") {
+        this.removeTagsLoading = true;
+        try {
+          const filteredTags = this.currentRowTags.filter(tag => 
+            tag.name.toLowerCase().includes(query.toLowerCase())
+          );
+          this.currentRowTags = filteredTags;
+        } catch (error) {
+          this.$message.error("搜索标签失败");
+        } finally {
+          this.removeTagsLoading = false;
+        }
+      } else {
+        this.currentRowTags = this.currentRow.tags || [];
+      }
+    },
+
+    // 提交删除标签
+    async submitRemoveTag() {
+      try {
+        if (this.removeTagForm.tags.length === 0) {
+          this.$message.warning("请选择要删除的标签");
+          return;
+        }
+
+        const params = {
+          literature_ids: [this.currentRow.id],
+          tag_ids: this.removeTagForm.tags
+        };
+
+        const response = await axios.post(
+          `${process.env.VUE_APP_BASE_API}/literature-tags/remove_tags/`,
+          params,
+          {
+            headers: {
+              "Content-Type": "application/json",
+            },
+          }
+        );
+
+        if (response.status === 200) {
+          this.$message.success("标签删除成功");
+          this.removeTagDialogVisible = false;
+          
+          // 更新当前行的标签列表
+          this.currentRow.tags = this.currentRow.tags.filter(
+            tag => !this.removeTagForm.tags.includes(tag.id)
+          );
+          
+          // 刷新列表
+          await this.fetchGpuList();
+        }
+      } catch (error) {
+        this.$message.error(error.response?.data?.message || "标签删除失败");
+      }
+    },
+
+    // 处理删除项目按钮点击
+    handleRemoveProject(row) {
+      this.currentRow = row;
+      this.currentRowProjects = row.projects || [];
+      this.removeProjectDialogVisible = true;
+      this.removeProjectForm = {
+        projects: [],
+      };
+    },
+
+    // 提交删除项目
+    async submitRemoveProject() {
+      try {
+        if (this.removeProjectForm.projects.length === 0) {
+          this.$message.warning("请选择要删除的项目");
+          return;
+        }
+
+        const params = {
+          literature_ids: [this.currentRow.id],
+          project_ids: this.removeProjectForm.projects
+        };
+
+        const response = await axios.post(
+          `${process.env.VUE_APP_BASE_API}/literature/batch_unassociate_from_projects`,
+          params,
+          {
+            headers: {
+              "Content-Type": "application/json",
+            },
+          }
+        );
+
+        if (response.status === 200) {
+          this.$message.success("项目删除成功");
+          this.removeProjectDialogVisible = false;
+          
+          // 更新当前行的项目列表
+          this.currentRow.projects = this.currentRow.projects.filter(
+            project => !this.removeProjectForm.projects.includes(project.id)
+          );
+          
+          // 刷新列表
+          await this.fetchGpuList();
+        }
+      } catch (error) {
+        this.$message.error(error.response?.data?.message || "项目删除失败");
+      }
+    },
+
     // 格式化百分比
     percentFormat(percentage) {
       return `${percentage}%`;

Деякі файли не було показано, через те що забагато файлів було змінено