Browse Source

项目修改

sunyadv 5 years ago
parent
commit
ef56801344

+ 2 - 2
ys_vue/src/routes.js

@@ -62,7 +62,7 @@ let routes = [
         iconCls: 'iconfont icon-ic_dashboard',
         children: [
             { path: '/project', component: project, name: '项目列表' },
-            { path: '/projectDetail', component: projectDetail, name: '项目详情', hidden: true },
+            { path: '/project/:id', component: projectDetail, name: '项目详情', hidden: true },
             { path: '/staff', component: staff, name: '人员管理' },
             { path: '/competence', component: competence, name: '权限管理' }
         ]
@@ -75,7 +75,7 @@ let routes = [
         iconCls: 'iconfont icon-moxing',
         children: [
             { path: '/moldList', component: moldList, name: '模具列表' },
-            { path: '/moldDetail', component: moldDetail, name: '模具详情', hidden: true },
+            { path: '/moldList/:id', component: moldDetail, name: '模具详情', hidden: true },
             { path: '/moldFile', component: moldFile, name: '文档审批' },
             { path: '/moldDownload', component: moldDownload, name: '文档下载' }
         ]

+ 7 - 1
ys_vue/src/views/detection/detection.vue

@@ -89,7 +89,13 @@ export default {
       this.getMoulds();
     },
     toMaintenance(id) {
-      this.$router.push("/detection/" + id);
+        this.$router.push({
+            path: '/detectionDetail',
+            query: {
+                id: row.id
+            }
+        });
+      //this.$router.push("/detection/" + id);
     },
     getMoulds(keyWord) {
       this.listLoading = true;

+ 1 - 1
ys_vue/src/views/mold/moldDetail.vue

@@ -128,7 +128,7 @@
     export default {
         data() {
             return {
-                detailId: this.$route.query.id,
+                detailId: this.$route.params.id,
                 //临时数据
                 moldDetail: {},
                 documents: [

+ 1 - 6
ys_vue/src/views/mold/moldList.vue

@@ -235,12 +235,7 @@
             },
             //详情
             toDetail(row) {
-                this.$router.push({
-                    path: '/moldDetail',
-                    query: {
-                        id: row.id
-                    }
-                });
+                this.$router.push('/moldList/' + row.id);
             },
 
             //添加界面

+ 16 - 26
ys_vue/src/views/project/project.vue

@@ -24,7 +24,7 @@
                     <el-link :underline="false" type="primary" @click="toDetail(scope.row)">{{scope.row.projectName}}</el-link>
 				</template>
 			</el-table-column>
-            <el-table-column prop="ownerCompanyName" label="生产方" width="250" sortable>
+            <el-table-column prop="customCompaniesStr" label="生产方" width="250" sortable>
 			</el-table-column>
             <el-table-column prop="charger" label="生产方负责人" width="200" align="center" sortable>
 			</el-table-column>
@@ -79,22 +79,6 @@
                         </el-select>
                     </el-form-item>
                 </el-col>
-                <!-- <el-col :span="24">
-                    <el-form-item label="本方参与人">
-                        <el-select v-model="addForm.userA" clearable filterable multiple placeholder="请选择本方参与人" style="width:510px">
-                            <el-option v-for="item in userA" :key="item.id" :label="item.username" :value="item.id">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="24">
-                    <el-form-item label="生产方参与人">
-                        <el-select v-model="addForm.userB" clearable filterable multiple placeholder="请选择生产方参与人" style="width:510px">
-                            <el-option v-for="item in userB" :key="item.id" :label="item.username" :value="item.id">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                </el-col> -->
 			</el-form>
 			<div slot="footer" class="dialog-footer">
 				<el-button @click.native="addFormVisible = false">取消</el-button>
@@ -220,6 +204,19 @@
                 }, res => {
                     this.listLoading = false;
                     if (res.code == "ok") {
+                        var list = res.data.list;
+                        for(var i in list){
+                            var customCompaniesStr = "";
+                            for(var j in list[i].customCompanies){
+                                if(j == list[i].customCompanies.length -1){
+                                    customCompaniesStr += list[i].customCompanies[j].companyName;
+                                } else {
+                                    customCompaniesStr += list[i].customCompanies[j].companyName + ",";
+                                }
+                                console.log(list[i].customCompanies[j])
+                            }
+                            list[i].customCompaniesStr = customCompaniesStr;
+                        }
                         this.list = res.data.list;
                         this.total = res.data.total;
                     } else {
@@ -239,12 +236,7 @@
 
             //详情
             toDetail(row) {
-                this.$router.push({
-                    path: '/projectDetail',
-                    query: {
-                        id: row.id
-                    }
-                });
+                this.$router.push('/project/' + row.id);
             },
 
             //选择公司切换人员
@@ -279,9 +271,7 @@
 				this.addForm = {
 					projectName: '',
                     customerCompany: '',
-                    managerId: '',
-                    // userA: [],
-                    // userB: []
+                    managerId: ''
 				};
             },
 

+ 1 - 1
ys_vue/src/views/project/projectDetail.vue

@@ -157,7 +157,7 @@
     export default {
         data() {
             return {
-                detailId: this.$route.query.id,
+                detailId: this.$route.params.id,
                 user: JSON.parse(sessionStorage.getItem('user')),
                 //临时数据
                 proDetail: {},