Browse Source

项目管理first

panxiandiao_i 5 years ago
parent
commit
5d476f8c8d

+ 0 - 49
src/router/index.js

@@ -290,55 +290,6 @@ export const constantRoutes = [
             meta: { title: '更新Bug' }
           }
         ]
-      },
-      {
-        path: '/Platform/setUp',
-        // component: Layout,
-        name: '设置',
-        // meta: { title: '设置' },
-        component: () =>
-            import('@/views/Platform/setUp/testa'),
-        meta: { title: '设置' },
-        children: [{
-          path: 'bizPage',
-          name: '业务线',
-          // hidden: true,
-          component: () =>
-                    import('@/views/Platform/setUp/bizPage'),
-          meta: { title: '业务线' }
-        },
-        {
-          path: 'modulePage',
-          name: '业务模块',
-          hidden: true,
-          component: () =>
-                    import('@/views/Platform/setUp/modulePage'),
-          meta: { title: '业务模块' }
-        },
-        {
-          path: 'platformPage',
-          name: '平台类型',
-          hidden: true,
-          component: () =>
-                    import('@/views/Platform/setUp/platformPage'),
-          meta: { title: '平台类型' }
-        },
-        {
-          path: 'projectPage',
-          name: '工程模块',
-          hidden: true,
-          component: () =>
-                    import('@/views/Platform/setUp/projectPage'),
-          meta: { title: '工程模块' }
-        },
-        {
-          path: 'teamPage',
-          name: '团队设置',
-          component: () =>
-                    import('@/views/Platform/setUp/teamPage'),
-          meta: { title: '团队设置' }
-        }
-        ]
       }
     ]
   },

+ 13 - 4
src/views/projectManage/projectList/projectCreate.vue

@@ -99,8 +99,9 @@ export default {
     this.bugListSelect()
     if (this.$route.query.id) {
       this.idDetail()
+    } else {
+      this.forkdown()
     }
-    this.forkDown()
   },
   mounted() {
     if (!this.$route.query.id) {
@@ -121,7 +122,15 @@ export default {
       })
     },
     // 根据id获取数据
-    idDetail() {
+    async idDetail() {
+      // 业务线数据获取
+      await projectGetTypeMap().then(res => {
+        if (res.code === 200) {
+          this.bizOptions = res.data
+        } else {
+          this.errorFun('业务线数据获取失败')
+        }
+      })
       getProjectData(this.$route.query.id).then(res => {
         if (res.code === 200) {
           this.form = res.data
@@ -134,13 +143,13 @@ export default {
           }
           editor.create()
           editor.txt.html(this.editorContent)
+          this.platformTypeStr = this.bizOptions.filter(value => value.code === this.form.bizId)[0].child
         } else {
           this.errorFun('data collection')
         }
       })
     },
-    // 业务线数据获取
-    forkDown() {
+    forkdown() {
       projectGetTypeMap().then(res => {
         if (res.code === 200) {
           this.bizOptions = res.data

+ 10 - 4
src/views/projectManage/projectList/projectListIndex.vue

@@ -63,14 +63,14 @@
                 <template v-slot="scope">
                   <div>
                     <el-button size="mini" type="primary" plain @click="projectShowData(scope.row.id)">编辑</el-button>
-                    <el-button size="mini" type="danger" plain @click="dialogVisible = true">删除</el-button>
+                    <el-button size="mini" type="danger" plain @click="dialogBug(scope.row.id)">删除</el-button>
                     <el-dialog
                       :visible.sync="dialogVisible"
                       width="30%"
                     >
                       <span>确定要删除这条项目信息吗</span>
                       <span slot="footer" class="dialog-footer">
-                        <el-button type="primary" size="mini" @click="delHmVirtual(scope.row.id)">确 定</el-button>
+                        <el-button type="primary" size="mini" @click="delHmVirtual()">确 定</el-button>
                         <el-button type="danger" size="mini" @click="dialogVisible = false">取 消</el-button>
                       </span>
                     </el-dialog>
@@ -103,6 +103,7 @@ export default {
       total: 0,
       dialogVisible: false,
       statusOptionss: [],
+      pauseId: '',
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
       statusOptions: []
@@ -115,10 +116,15 @@ export default {
     this.getList()
   },
   methods: {
+    // id Bug
+    dialogBug(e) {
+      this.dialogVisible = true
+      this.pauseId = e
+    },
     // 删除项目
-    delHmVirtual(e) {
+    delHmVirtual() {
       this.userData = { id: '', ename: this.userInformation, name: this.userNames }
-      deleteProject(e, this.userData).then(response => {
+      deleteProject(this.pauseId, this.userData).then(response => {
         if (response.code === 200) {
           this.getList()
           this.successFun('delete')

+ 43 - 5
src/views/projectManage/taskList/taskListIndex.vue

@@ -35,11 +35,14 @@
                     width="80"
                   />
                   <el-table-column
-                    prop="name"
                     label="项目名称"
                     align="center"
                     width="200"
-                  />
+                  >
+                    <template slot-scope="scope">
+                      <el-tag class="tag" style="cursor:pointer;" @click="taskShow(scope.row.id)">{{ scope.row.name }}</el-tag>
+                    </template>
+                  </el-table-column>
                   <el-table-column
                     label="状态"
                     align="center"
@@ -59,10 +62,20 @@
                     align="center"
                     width="300"
                   >
-                    <template slot-scope="scope">
+                    <template v-slot="scope">
                       <div>
                         <el-button size="mini" type="primary" plain @click="projectShowData(scope.row.id)">编辑</el-button>
-                        <el-button size="mini" type="danger" plain>删除</el-button>
+                        <el-button size="mini" type="danger" plain @click="dialogBug(scope.row.id)">删除</el-button>
+                        <el-dialog
+                          :visible.sync="dialogVisible"
+                          width="30%"
+                        >
+                          <span>确定要删除这条项目信息吗</span>
+                          <span slot="footer" class="dialog-footer">
+                            <el-button type="primary" size="mini" @click="delHmVirtual()">确 定</el-button>
+                            <el-button type="danger" size="mini" @click="dialogVisible = false">取 消</el-button>
+                          </span>
+                        </el-dialog>
                       </div>
                     </template>
                   </el-table-column>
@@ -83,18 +96,23 @@
 <script>
 import { taskListCreate } from '@/api/defectManage'
 import { bugGetEnum } from '@/api/defectManage' // 下拉菜单data
+import { deleteTaskData } from '@/api/projectPage.js'
 
 export default {
   data() {
     return {
       tableData: [],
       form: {},
+      dialogVisible: false,
       bizJson: localStorage.getItem('key'),
+      userInformation: localStorage.getItem('username'),
+      userNames: localStorage.getItem('realname'),
       queryCode: {},
       curIndex: 1,
       pageSize: 20,
       total: 0,
       activeName: 'first',
+      pauseId: '',
       processStatusEnumList: []
     }
   },
@@ -113,7 +131,6 @@ export default {
       taskListCreate({ bizId: this.bizJson }).then(response => {
         this.tableData = response.data
         this.total = response.data.length
-        this.tableData.map((item) => { item })
         // const processStatusEnumMap = this.processStatusEnumList.reduce((a, c) => {
         //   return {
         //     ...a,
@@ -141,12 +158,33 @@ export default {
     createdCode() {
       this.$router.push({ name: '任务创建' })
     },
+    // id Bug
+    dialogBug(e) {
+      this.dialogVisible = true
+      this.pauseId = e
+    },
+    // 删除任务
+    delHmVirtual() {
+      this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      deleteTaskData(this.pauseId, this.userData).then(response => {
+        if (response.code === 200) {
+          this.bugListSelectBeforeGet()
+          this.successFun('delete')
+        } else {
+          this.errorFun('delete')
+        }
+      })
+      this.dialogVisible = false
+    },
     handleSizeChange(size) {
       this.pageSize = size
     },
     handleCurrentChange(curIndex) {
       this.curIndex = curIndex
     },
+    taskShow(e) {
+      this.$router.push({ name: '任务查看', query: { id: e }})
+    },
     projectShowData(e) {
       this.$router.push({ name: '任务更新', query: { id: e }})
     },

+ 157 - 82
src/views/projectManage/taskList/taskPreview.vue

@@ -5,57 +5,57 @@
         <div class="operate-flex">
           <div style="width:100%">
             <span>状态</span>
-            <el-select v-model="form.statusString" size="medium" style="width:27%;margin-right: 15px;" clearable placeholder="状态">
-              <el-option v-for="item in statusOptions" :key="item.value" :label="item.name" :value="item.value" />
+            <el-select v-model="form.status" size="medium" style="width:30%;margin-right: 15px;" clearable placeholder="状态">
+              <el-option v-for="item in processStatusEnumList" :key="item.code" :label="item.name" :value="item.code" />
             </el-select>
             <span>优先级</span>
-            <el-select v-model="form.statusString" size="medium" style="width:27%;margin-right: 15px;" clearable placeholder="优先级">
-              <el-option v-for="item in statusOptions" :key="item.value" :label="item.name" :value="item.value" />
+            <el-select v-model="form.priority" size="medium" style="width:30%;margin-right: 15px;" clearable placeholder="优先级">
+              <el-option v-for="item in bugLevelStr" :key="item.code" :label="item.name" :value="item.code" />
             </el-select>
           </div>
           <div style="display:flex">
+            <el-button type="primary" plain size="medium">新建提测报告</el-button>
             <el-button type="primary" plain size="medium">新建日报报告</el-button>
             <el-button type="primary" plain size="medium">新建准出报告</el-button>
-            <el-button type="primary" plain size="medium">新建日报</el-button>
             <el-button type="primary" plain size="medium">新建bug</el-button>
             <el-button type="primary" plain size="medium">编辑</el-button>
           </div>
         </div>
         <div class="display-messege">
-          任务名称 :&nbsp;&nbsp;&nbsp;222
+          任务名称 :&nbsp;&nbsp;&nbsp;{{ form.name }}
         </div>
         <div class="display-messege">
-          <div class="divide-fourparts">业务线 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-fourparts">任务类型 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-fourparts">产品 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-fourparts">分组 :&nbsp;&nbsp;&nbsp;222</div>
+          <div class="divide-fourparts">业务线 :&nbsp;&nbsp;&nbsp;{{ form.bizIdString }}</div>
+          <div class="divide-fourparts">任务类型 :&nbsp;&nbsp;&nbsp;{{ form.taskType }}</div>
+          <div class="divide-fourparts">产品 :&nbsp;&nbsp;&nbsp;{{ form.pm }}</div>
+          <div class="divide-fourparts">分组 :&nbsp;&nbsp;&nbsp;{{ form.group }}</div>
         </div>
         <div class="display-messege">
-          <div class="divide-fourparts">平台类型 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-fourparts">是否免测 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-fourparts">测试 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-fourparts">标签 :&nbsp;&nbsp;&nbsp;222</div>
+          <div class="divide-fourparts">平台类型 :&nbsp;&nbsp;&nbsp;{{ form.type }}</div>
+          <div class="divide-fourparts">是否免测 :&nbsp;&nbsp;&nbsp;{{ form.noTestString }}</div>
+          <div class="divide-fourparts">测试 :&nbsp;&nbsp;&nbsp;{{ form.qa }}</div>
+          <div class="divide-fourparts">标签 :&nbsp;&nbsp;&nbsp;{{ form.tag }}</div>
         </div>
         <div class="display-messege">
-          <div class="divide-fourparts">业务模块 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-fourparts">打回次数 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-fourparts">开发 :&nbsp;&nbsp;&nbsp;222</div>
+          <div class="divide-fourparts">业务模块 :&nbsp;&nbsp;&nbsp;{{ form.clientTypeString }}</div>
+          <div class="divide-fourparts">打回次数 :&nbsp;&nbsp;&nbsp;{{ form.reopen }}</div>
+          <div class="divide-fourparts">开发 :&nbsp;&nbsp;&nbsp;{{ form.rd }}</div>
         </div>
         <div class="display-messege-end-one">
-          描述 :&nbsp;&nbsp;&nbsp;222
+          描述 :&nbsp;&nbsp;&nbsp;{{ form.description }}
         </div>
         <div class="display-messege-end">
-          技术文档 :&nbsp;&nbsp;&nbsp;222
+          技术文档 :&nbsp;&nbsp;&nbsp;{{ form.devUrl }}
         </div>
         <div class="display-messege-end">
-          需求文档 :&nbsp;&nbsp;&nbsp;222
+          需求文档 :&nbsp;&nbsp;&nbsp;{{ form.mrdUrl }}
         </div>
       </div>
       <div class="block">
         <el-tabs v-model="activeName">
           <el-tab-pane label="提测报告" name="first">
             <el-table
-              :data="tableData"
+              :data="listTaskDatas"
               height="215"
               border
               style="width: 100%"
@@ -68,18 +68,24 @@
                 width="80"
               />
               <el-table-column
-                prop="vehicleId"
+                prop="name"
                 label="标题名称"
                 align="center"
               />
               <el-table-column
-                prop="vehicleVersion"
                 label="状态"
                 align="center"
                 width="130"
-              />
+              >
+                <template slot-scope="scope">
+                  <el-tag
+                    :type="scope.row.statusString === '打回' ? 'danger' : 'success'"
+                    disable-transitions
+                  >{{ scope.row.statusString }}</el-tag>
+                </template>
+              </el-table-column>
               <el-table-column
-                prop="ecuId"
+                prop="gmtCreate"
                 label="创建时间"
                 align="center"
               />
@@ -88,18 +94,29 @@
                 align="center"
                 width="300"
               >
-                <template>
+                <template slot-scope="scope">
                   <div>
-                    <el-button size="mini" type="primary" plain>编辑</el-button>
-                    <el-button size="mini" type="danger" plain>打回</el-button>
+                    <el-button size="mini" type="primary" plain @click="pass(1,scope.row.id)">通过</el-button>
+                    <el-button size="mini" type="danger" plain @click="back(2,scope.row.id)">打回</el-button>
+                    <el-dialog
+                      title="打回原因"
+                      :visible.sync="centerDialogVisible"
+                      width="30%"
+                    >
+                      <el-input v-model="CallBackTheReason" type="textarea" :rows="3" />
+                      <span slot="footer" class="dialog-footer">
+                        <el-button type="primary" size="mini" @click="passOrBackSend()">确 定</el-button>
+                        <el-button type="danger" size="mini" @click="centerDialogVisible = false">取 消</el-button>
+                      </span>
+                    </el-dialog>
                   </div>
                 </template>
               </el-table-column>
             </el-table>
           </el-tab-pane>
-          <el-tab-pane label="每日报告" name="second">
+          <el-tab-pane label="日报告" name="second">
             <el-table
-              :data="tableData"
+              :data="dailyTestReports"
               height="215"
               border
               style="width: 100%"
@@ -112,12 +129,12 @@
                 width="80"
               />
               <el-table-column
-                prop="vehicleId"
+                prop="reportName"
                 label="标题名称"
                 align="center"
               />
               <el-table-column
-                prop="name"
+                prop="gmtCreate"
                 label="创建时间"
                 align="center"
               />
@@ -125,7 +142,7 @@
           </el-tab-pane>
           <el-tab-pane label="准出报告" name="third">
             <el-table
-              :data="tableData"
+              :data="projectTestReports"
               height="215"
               border
               style="width: 100%"
@@ -138,26 +155,32 @@
                 width="80"
               />
               <el-table-column
-                prop="vehicleId"
+                prop="reportName"
                 label="标题名称"
                 align="center"
               />
               <el-table-column
-                prop="vehicleVersion"
                 label="状态"
                 align="center"
                 width="130"
-              />
+              >
+                <template slot-scope="scope">
+                  <el-tag
+                    :type="scope.row.statusString === '打回' ? 'danger' : 'success'"
+                    disable-transitions
+                  >{{ scope.row.statusString }}</el-tag>
+                </template>
+              </el-table-column>
               <el-table-column
-                prop="name"
+                prop="gmtCreate"
                 label="创建时间"
                 align="center"
               />
             </el-table>
           </el-tab-pane>
-          <el-tab-pane label="Bug" name="forth">
+          <el-tab-pane label="Bug报告" name="forth">
             <el-table
-              :data="tableData"
+              :data="projectBug"
               height="215"
               border
               style="width: 100%"
@@ -170,23 +193,29 @@
                 width="80"
               />
               <el-table-column
-                prop="vehicleId"
+                prop="bugName"
                 label="标题名称"
                 align="center"
               />
               <el-table-column
-                prop="vehicleVersion"
                 label="状态"
                 align="center"
                 width="130"
-              />
+              >
+                <template slot-scope="scope">
+                  <el-tag
+                    :type="scope.row.bugStatusName === '打回' ? 'danger' : 'success'"
+                    disable-transitions
+                  >{{ scope.row.bugStatusName }}</el-tag>
+                </template>
+              </el-table-column>
               <el-table-column
-                prop="ecuId"
+                prop="gmtCreate"
                 label="创建时间"
                 align="center"
               />
               <el-table-column
-                prop="name"
+                prop="currentHandler"
                 label="当前处理人"
                 align="center"
               />
@@ -196,27 +225,27 @@
       </div>
       <div class="block-end">
         <div class="display-messege">
-          <div class="divide-twoparts">需求评审时间 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-twoparts">计划提测时间 :&nbsp;&nbsp;&nbsp;222</div>
+          <div class="divide-twoparts">需求评审时间 :&nbsp;&nbsp;&nbsp;{{ form.mrdTime }}</div>
+          <div class="divide-twoparts">计划提测时间 :&nbsp;&nbsp;&nbsp;{{ form.launchTestPlanTime }}</div>
         </div>
         <div class="display-messege">
-          <div class="divide-twoparts">冒烟测试完成时间 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-twoparts">实际提测时间 :&nbsp;&nbsp;&nbsp;222</div>
+          <div class="divide-twoparts">冒烟测试完成时间 :&nbsp;&nbsp;&nbsp;{{ form.smokeTestFinishTime }}</div>
+          <div class="divide-twoparts">实际提测时间 :&nbsp;&nbsp;&nbsp;{{ form.launchTestRealTime }}</div>
         </div>
         <div class="display-messege">
-          <div class="divide-twoparts">实际开始开发时间 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-twoparts">实际开始测试时间 :&nbsp;&nbsp;&nbsp;222</div>
+          <div class="divide-twoparts">实际开始开发时间 :&nbsp;&nbsp;&nbsp;{{ form.startDevRealTime }}</div>
+          <div class="divide-twoparts">计划测试完成时间 :&nbsp;&nbsp;&nbsp;{{ form.testFinishPlanTime }}</div>
         </div>
         <div class="display-messege">
-          <div class="divide-twoparts">计划开始开发时间 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-twoparts">计划开始测试时间 :&nbsp;&nbsp;&nbsp;222</div>
+          <div class="divide-twoparts">计划开始开发时间 :&nbsp;&nbsp;&nbsp;{{ form.startDevPlanTime }}</div>
+          <div class="divide-twoparts">实际测试完成时间 :&nbsp;&nbsp;&nbsp;{{ form.testFinishRealTime }}</div>
         </div>
         <div class="display-messege">
-          <div class="divide-twoparts">计划上线时间 :&nbsp;&nbsp;&nbsp;222</div>
-          <div class="divide-twoparts">实际上线时间 :&nbsp;&nbsp;&nbsp;222</div>
+          <div class="divide-twoparts">计划上线时间 :&nbsp;&nbsp;&nbsp;{{ form.onlinePlanTime }}</div>
+          <div class="divide-twoparts">实际上线时间 :&nbsp;&nbsp;&nbsp;{{ form.onlineRealTime }}</div>
         </div>
         <div class="display-messege">
-          备注 :&nbsp;&nbsp;&nbsp;222
+          备注 :&nbsp;&nbsp;&nbsp;{{ form.remark }}
         </div>
       </div>
     </div>
@@ -224,37 +253,80 @@
 </template>
 
 <script>
+import { getTaskData, launchTestUpdate } from '@/api/projectPage.js'
+import { bugGetEnum } from '@/api/defectManage' // 下拉菜单data
+
 export default {
   data() {
     return {
       form: {},
-      statusOptions: [],
-      activeName: 'first',
-      tableData: [{
-        date: '2016-05-03',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }, {
-        date: '2016-05-02',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }, {
-        date: '2016-05-04',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }, {
-        date: '2016-05-01',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }, {
-        date: '2016-05-08',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }, {
-        date: '2016-05-06',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }]
+      CallBackTheReason: '',
+      userInformation: localStorage.getItem('username'),
+      userNames: localStorage.getItem('realname'),
+      bizJson: localStorage.getItem('key'),
+      listTaskDatas: [], // 提测报告table
+      dailyTestReports: [], // 日报报告table
+      projectTestReports: [], // 准出报告table
+      projectBug: [], // bug报告table
+      CallBackStatus: '',
+      CallBackId: '',
+      centerDialogVisible: false,
+      processStatusEnumList: [],
+      bugLevelStr: [],
+      activeName: 'first'
+    }
+  },
+  created() {
+    this.bugListSelect()
+    this.getList()
+  },
+  methods: {
+    // id get
+    getList() {
+      getTaskData(this.$route.query.id).then(res => {
+        this.form = res.data
+        this.listTaskDatas = res.data.launchTestInfoList
+        // this.listTaskDatas.statusString = this.form.statusString
+        this.projectTestReports = res.data.projectTestReports
+        // this.projectTestReports.statusString = this.form.statusString
+        this.dailyTestReports = res.data.dailyTestReports
+        this.projectBug = res.data.bugBaseInfoDOS
+      })
+    },
+    // 打回
+    back(e, ele) {
+      this.centerDialogVisible = true
+      this.CallBackStatus = e
+      this.CallBackId = ele
+    },
+    // 通过
+    pass(e, ele) {
+      this.CallBackStatus = e
+      this.CallBackId = ele
+      this.passOrBackSend()
+    },
+    passOrBackSend() {
+      this.centerDialogVisible = false
+      const tt = { status: this.CallBackStatus, id: this.CallBackId }
+      this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+      this.objData = { launchTestInfo: tt, user: this.userData }
+      launchTestUpdate(this.objData).then(res => {
+        res.code === 200 ? this.successFun('operate') : this.errorFun('operate')
+        this.getList()
+      })
+    },
+    // 所有下拉菜单数据
+    bugListSelect() {
+      bugGetEnum().then(res => {
+        this.bugLevelStr = res.data.priorityEnumList
+        this.processStatusEnumList = res.data.processStatusEnumList
+      })
+    },
+    successFun(successText) {
+      this.$notify({ title: 'Success', message: `${successText} Successfully`, type: 'success', duration: 2000 })
+    },
+    errorFun(errorText) {
+      this.$notify({ title: 'Failed', message: `${errorText} Failed`, type: 'error', duration: 2000 })
     }
   }
 }
@@ -277,6 +349,9 @@ export default {
       background-color white
     .block >>> th
       background-color #F0F2F4 !important
+    .block >>> .el-dialog__header
+      padding 20px 20px 0px 20px
+      display flex
     .block-end
       background-color rgba(255,255,255,1)
       box-shadow 0px 0px 11px 0px rgba(238,240,245,1)

+ 13 - 11
src/views/projectManage/taskList/taskUpdateCreate.vue

@@ -178,7 +178,6 @@ export default {
   },
   created() {
     this.bugListSelect()
-    this.forkDown()
     this.idDetail()
   },
   methods: {
@@ -192,22 +191,25 @@ export default {
       })
     },
     // 根据id获取数据
-    idDetail() {
-      taskListCreate({ id: this.$route.query.id }).then(res => {
+    async idDetail() {
+      // 业务线数据获取
+      await projectGetTypeMap().then(res => {
         if (res.code === 200) {
-          this.form = res.data[0]
+          this.bizIdEnumList = res.data
         } else {
-          this.errorFun('data collection')
+          this.errorFun('业务线数据获取失败')
         }
       })
-    },
-    // 业务线数据获取
-    forkDown() {
-      projectGetTypeMap().then(res => {
+      taskListCreate({ id: this.$route.query.id }).then(res => {
         if (res.code === 200) {
-          this.bizIdEnumList = res.data
+          this.form = res.data[0]
+          this.typeString = this.bizIdEnumList.filter(value => value.code === this.form.bizId)[0].child
+          if (this.form.clientType) {
+            this.businessTypeShow = true
+            this.businessTypeStr = this.typeString.filter(value => value.code === this.form.type)[0].child
+          }
         } else {
-          this.errorFun('业务线数据获取失败')
+          this.errorFun('data collection')
         }
       })
     },

+ 10 - 4
src/views/virtualDevices/HMvehicle.vue

@@ -105,14 +105,14 @@
                     <div>
                       <el-button size="mini" type="success" plain @click="activate(scope.row.ecuId, scope.row.vehicleId, scope.row.batteryId, scope.row.imsi, scope.row.imei, scope.row.vehicleVersion, scope.row.cityName)">激活</el-button>
                       <el-button size="mini" type="info" plain @click="offHmvirtual(scope.row.ecuId)">下线</el-button>
-                      <el-button size="mini" type="danger" @click="dialogVisible = true">删除</el-button>
+                      <el-button size="mini" type="danger" @click="dialogBug(scope.row.ecuId)">删除</el-button>
                       <el-dialog
                         :visible.sync="dialogVisible"
                         width="30%"
                       >
                         <span>确定要删除这条车辆信息吗</span>
                         <span slot="footer" class="dialog-footer">
-                          <el-button type="primary" size="mini" @click="delHmVirtual(scope.row.ecuId)">确 定</el-button>
+                          <el-button type="primary" size="mini" @click="delHmVirtual()">确 定</el-button>
                           <el-button type="danger" size="mini" @click="dialogVisible = false">取 消</el-button>
                         </span>
                       </el-dialog>
@@ -157,6 +157,7 @@ export default {
       curIndex: 1,
       pageSize: 20,
       total: 0,
+      pauseId: '',
       city: cityJson,
       value: '',
       dialogVisible: false,
@@ -302,8 +303,13 @@ export default {
         }
       })
     },
-    delHmVirtual(ecuId) {
-      const params = { ecuId: ecuId }
+    // id Bug
+    dialogBug(e) {
+      this.dialogVisible = true
+      this.pauseId = e
+    },
+    delHmVirtual() {
+      const params = { ecuId: this.pauseId }
       delHmVirtualDevice(params).then(res => {
         if (res.success === 1) {
           this.successFun('delete')