Преглед на файлове

Merge branch 'master' of http://121.42.8.157:13000/zengminguo/D-MAP

hao lei преди 1 година
родител
ревизия
800dcbf07b
променени са 1 файла, в които са добавени 127 реда и са изтрити 124 реда
  1. 127 124
      src/views/ordinaryPage/index.vue

+ 127 - 124
src/views/ordinaryPage/index.vue

@@ -997,133 +997,136 @@ export default {
       this.caseLanguage = row.language;
       this.currentCase = row;
 
-      for (let i = 0; i < this.caseList.length; i++) {
-        if (this.caseList[i].case_no == row.case_no) {
-          this.currentCaseIndex = i;
-          break;
+        for(let i = 0; i < this.caseList.length; i++) {
+          if (this.caseList[i].case_no == row.case_no) {
+            this.currentCaseIndex = i;
+            break;
+          }
         }
-      }
-      //this.caseContent =,
-    },
-    turnNextCase() {
-      debugger;
-      this.currentCaseIndex++;
-      if (this.currentCaseIndex == this.caseList.length) {
-        this.isShowCaseList = true;
-        this.isShowCaseCommit = false;
-      } else {
-        this.currentCase = this.caseList[this.currentCaseIndex];
-        this.caseName = this.currentCase.m_id;
-        this.caseProject = this.currentCase.precondition;
-        //this.caseActive =,
-        this.caseFunction = this.currentCase.action;
-        this.caseSubFunction = this.currentCase.expectation;
-        this.caseMarket = this.currentCase.market;
-        this.caseLanguage = this.currentCase.language;
-        this.isShowCaseCommit = false;
-        this.isShowCaseDetail = true;
-      }
-    },
-    selectRowIssue(id) {
-      let row = this.issueList.find((i) => i.id == id);
-      this.isShowIssueList = false;
-      this.isShowIssueDetail = true;
-      this.currentIssue = row;
-      console.log(row, "==============issue============");
-    },
-    clickBackToPlanList() {
-      this.isShowPlanList = true;
-      this.isShowCaseList = false;
-      this.caseList = [];
-    },
-    clickBackToAutoPlanList() {
-      this.isShowPlanList = true;
-      this.isShowAutoCaseList = false;
-      this.autoCaseList = [];
-    },
-    bmMapItemUnSelect() {
-      let items = document.getElementsByClassName("item-box");
-      for (var index = 0; index < items.length; index++) {
-        items[index].style.background = "#00000032";
-        let title = items[index].getElementsByClassName("item-title");
-        // console.log("textContent", title[0].textContent);
-        let itemOther = this.benchList.find(
-          (b) => parseInt(b.id) == parseInt(title[0].textContent)
-        );
-        itemOther.selected = false;
-        itemOther.scale = 1;
-      }
-    },
-    onFocus() {
-      this.isOpen = true;
-    },
-    onInput(value) {
-      this.inputValue = value;
-    },
-    onClickOutside() {
-      if (
-        this.$refs.searchbar.$el.contains(event.target) ||
-        this.$refs.dropdown.$el.contains(event.target)
-      ) {
-        return;
-      }
-      this.isOpen = false;
-    },
-    handleClickTask(taskId, auto) {
-      let task = that.taskList.find((t) => t.id == taskId);
-      // 获取手动测试plan列表
-      let manualList = task.plan_list[1];
-      // 获取自动测试plan列表
-      let autoList = task.plan_list[2];
-      autoList.forEach((at) => {
-        that.$store.dispatch("planList/fetchPlanDetail", {
-          planId: at < 100 ? at + 101 : at,
-        });
-      });
-      that.isShowPlanList = true;
-      that.isShowTaskList = false;
-      this.$store.commit("planList/setAutoPlanList", autoList);
-      this.$store.commit("planList/setPlanList", manualList);
-      that.taskName = task.name;
-      this.$nextTick(() => {
-        that.$store.dispatch("planList/fetchPlanList", {
-          page_num: 1,
-          page_size: 10000,
-        });
-      });
-      console.log(task, "任务详情");
-    },
-    handleClickIssue(issueId) {
-      console.log(issueId, "issueid");
-    },
-    showBenchPos(benchList) {
-      console.log("benchList", benchList);
-      for (var item of benchList) {
-        var currentBench = this.benchList.find((b) => b.id == item.benchId);
-        if (currentBench) {
-          //console.log('currentBench',currentBench);
-          currentBench.left = item.x;
-          currentBench.top = item.y;
-          currentBench.benchId = item.benchId;
-          currentBench.benchType = item.benchType;
-          if (currentBench.benchType == 2) {
-            currentBench.image = require("../../assets/mechine2.png");
-          } else {
-            currentBench.image = require("../../assets/mechine.png");
+        //this.caseContent =,
+      },
+      turnNextCase() {
+        debugger
+        this.currentCaseIndex++;
+        if (this.currentCaseIndex == this.caseList.length) {
+          this.isShowCaseList = true;
+          this.isShowCaseCommit = false;
+        } else {
+          this.currentCase = this.caseList[this.currentCaseIndex];
+          this.caseName = this.currentCase.m_id;
+          this.caseProject = this.currentCase.precondition
+          //this.caseActive =,
+          this.caseFunction = this.currentCase.action;
+          this.caseSubFunction = this.currentCase.expectation;
+          this.caseMarket = this.currentCase.market;
+          this.caseLanguage = this.currentCase.language;
+          this.isShowCaseCommit = false;
+          this.isShowCaseDetail = true;
+        }
+      },
+      selectRowIssue(id) {
+        let row = this.issueList.find(i => i.id == id);
+        this.isShowIssueList = false;
+        this.isShowIssueDetail = true;
+        this.currentIssue = row;
+        console.log(row, '==============issue============')
+      },
+      clickBackToPlanList()
+      {
+        this.isShowPlanList = true;
+        this.isShowCaseList = false;
+        this.caseList = [];
+      },
+      clickBackToAutoPlanList() {
+        this.isShowPlanList = true;
+        this.isShowAutoCaseList = false;
+        this.autoCaseList = [];
+      },
+      bmMapItemUnSelect() {
+        let items = document.getElementsByClassName('item-box');
+        for(var index = 0; index<items.length;index++)
+        {
+          items[index].style.background = "#00000032"
+          let title = items[index].getElementsByClassName('item-title');
+          console.log('textContent',title[0].textContent)
+          let itemOther = this.benchList.find(b => parseInt(b.id) == parseInt(title[0].textContent));
+          itemOther.selected = false;
+          itemOther.scale = 1;
+        }
+      },
+      onFocus() {
+          this.isOpen = true;
+      },
+      onInput(value) {
+          this.inputValue = value;
+      },
+      onClickOutside() {
+          if (
+              this.$refs.searchbar.$el.contains(event.target) ||
+              this.$refs.dropdown.$el.contains(event.target)
+          ) {
+              return;
+          }
+          this.isOpen = false;
+      },
+      handleClickTask(taskId, auto) {
+        let task = that.taskList.find(t => t.id == taskId);
+        // 获取手动测试plan列表
+        let manualList = task.plan_list[1];
+        // 获取自动测试plan列表
+        let autoList = task.plan_list[2];
+        autoList.forEach(at => {
+          that.$store.dispatch('planList/fetchPlanDetail', { planId: at < 100 ? at+101: at})
+        })
+        that.isShowPlanList = true;
+        that.isShowTaskList = false;
+        this.$store.commit('planList/setAutoPlanList', autoList)
+        this.$store.commit('planList/setPlanList', manualList)
+        that.taskName = task.name;
+        this.$nextTick(() => {
+          that.$store.dispatch('planList/fetchPlanList', {
+            page_num: 1,
+            page_size: 10000
+          })
+        })
+        console.log(task, '任务详情');
+      },
+      handleClickIssue(issueId) {
+        console.log(issueId, 'issueid')
+      },
+      showBenchPos(benchList) {
+        console.log('benchList',benchList);
+        for (var item of benchList) {
+          var currentBench = this.benchList.find(b => b.id == item.benchId);
+          if(currentBench)
+          {
+            //console.log('currentBench',currentBench);
+            currentBench.left = item.x - 548;
+            currentBench.top = item.y - 137;
+            currentBench.benchId = item.benchId;
+            currentBench.benchType = item.benchType;
+            if(currentBench.benchType == 2)
+            {
+              currentBench.image = require('../../assets/mechine2.png');
+            }
+            else
+            {
+              currentBench.image = require('../../assets/mechine.png');
+            }
           }
         }
-      }
-      this.renderBenchList = false;
-      setTimeout(() => {
-        this.renderBenchList = true;
-      }, 10);
-    },
-    planBack() {
-      that.isShowPlanList = false;
-      that.isShowTaskList = true;
-    },
-    taskRender(item) {
-      return `<div class="item-box" style="display:flex;align-items: top; justify-content: space-between;">
+        this.renderBenchList = false;
+        setTimeout(()=>{
+          this.renderBenchList = true;
+        },10)
+        
+      },
+      planBack() {
+        that.isShowPlanList = false;
+        that.isShowTaskList = true;
+      },
+      taskRender(item) {
+        return `<div class="item-box" style="display:flex;align-items: top; justify-content: space-between;">
               <div class="left">
                   <div style="">
                     <div class="item-title">${item.name}</div>