瀏覽代碼

修复路由

Reiskuchen 6 年之前
父節點
當前提交
a82ada11ca
共有 2 個文件被更改,包括 25 次插入16 次删除
  1. 7 3
      ys_vue/src/routes.js
  2. 18 13
      ys_vue/src/views/mold/moldDownload.vue

+ 7 - 3
ys_vue/src/routes.js

@@ -13,6 +13,8 @@ import competence from './views/project/competence.vue'
 
 import moldList from './views/mold/moldList.vue'
 import moldFile from './views/mold/moldFile.vue'
+import moldDetail from './views/mold/moldDetail.vue'
+import moldDownload from './views/mold/moldDownload.vue'
 
 import role from './views/base/role.vue'
 import comp from './views/base/comp.vue'
@@ -45,7 +47,7 @@ let routes = [
         leaf: true,//只有一个节点
         children: [
             { path: '/detection', component: detection, name: '运行检测' },
-            { path: '/detection/:id', component: maintenance, name: '运行检测详情',hidden: true }
+            { path: '/detection/:id', component: maintenance, name: '运行检测详情', hidden: true }
         ]
     },
     // 项目管理
@@ -56,7 +58,7 @@ let routes = [
         iconCls: 'iconfont icon-ic_dashboard',
         children: [
             { path: '/project', component: project, name: '项目列表' },
-            { path: '/staff', component: staff, name: '人员管理'},
+            { path: '/staff', component: staff, name: '人员管理' },
             { path: '/competence', component: competence, name: '权限管理' }
         ]
     },
@@ -68,7 +70,9 @@ let routes = [
         iconCls: 'iconfont icon-moxing',
         children: [
             { path: '/moldList', component: moldList, name: '模具列表' },
-            { path: '/moldFile', component: moldFile, name: '模具文档' }
+            { path: '/moldDetail/:id', component: moldDetail, name: '模具详情', hidden: true },
+            { path: '/moldFile', component: moldFile, name: '文档审批' },
+            { path: '/moldDownload', component: moldDownload, name: '文档下载' }
         ]
     },
     // 基础管理

+ 18 - 13
ys_vue/src/views/mold/moldDownload.vue

@@ -21,7 +21,7 @@
           <el-button type="primary">查询</el-button>
         </el-form-item>
         <el-form-item style="float: right;">
-          <el-button type="primary" id="aa">下载</el-button>
+          <el-button type="primary">下载</el-button>
         </el-form-item>
       </el-form>
     </el-col>
@@ -37,19 +37,19 @@
       <el-table-column type="index" width="60"></el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox @change="checkName($event,0)">
+          <el-checkbox @change="checkChanged(0, 0)">
             <span>模具名称</span>
           </el-checkbox>
         </template>
         <template slot-scope="scope">
-          <el-checkbox>
+          <el-checkbox @change="checkChanged(0, scope.$index)">
             <span>{{scope.row.name}}</span>
           </el-checkbox>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox>
+          <el-checkbox @change="checkChanged(1, 0)">
             <span>模具3D图档</span>
           </el-checkbox>
         </template>
@@ -57,13 +57,13 @@
           <span v-if="scope.row.states[0] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[0] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox>已通过</el-checkbox>
+            <el-checkbox @change="checkChanged(1, scope.$index)">已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox>
+          <el-checkbox @change="checkChanged(2, 0)">
             <span>模具2D图档</span>
           </el-checkbox>
         </template>
@@ -71,13 +71,13 @@
           <span v-if="scope.row.states[1] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[1] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox>已通过</el-checkbox>
+            <el-checkbox @change="checkChanged(2, scope.$index)">已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox>
+          <el-checkbox @change="checkChanged(3, 0)">
             <span>零件3D图档</span>
           </el-checkbox>
         </template>
@@ -85,13 +85,13 @@
           <span v-if="scope.row.states[2] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[2] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox>已通过</el-checkbox>
+            <el-checkbox @change="checkChanged(3, scope.$index)">已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox>
+          <el-checkbox @change="checkChanged(4, 0)">
             <span>零件2D图档</span>
           </el-checkbox>
         </template>
@@ -99,13 +99,13 @@
           <span v-if="scope.row.states[3] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[3] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox>已通过</el-checkbox>
+            <el-checkbox @change="checkChanged(4, scope.$index)">已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
       <el-table-column width="200">
         <template slot="header">
-          <el-checkbox>
+          <el-checkbox @change="checkChanged(5, 0)">
             <span>保养方案</span>
           </el-checkbox>
         </template>
@@ -113,7 +113,7 @@
           <span v-if="scope.row.states[4] == 0" style="padding-left: 24px;">未上传</span>
           <span v-else-if="scope.row.states[4] == 1" style="padding-left: 24px;">审批中</span>
           <span v-else>
-            <el-checkbox>已通过</el-checkbox>
+            <el-checkbox @change="checkChanged(5, scope.$index)">已通过</el-checkbox>
           </span>
         </template>
       </el-table-column>
@@ -197,6 +197,11 @@ export default {
     },
     selsChange(sels) {
       this.sels = sels;
+    },
+    // 点击复选框事件
+    checkChanged(x, y) {
+      this.checkBoxArray[x][y].value=!this.checkBoxArray[x][y].value;
+      console.log("x="+x+" y="+y+" value="+this.checkBoxArray[x][y].value);
     }
   },
   created() {