guhongwei il y a 3 ans
Parent
commit
c7c63a35f8

+ 2 - 0
src/views/adminCenter/adminCate/dataInfo.vue

@@ -98,6 +98,8 @@ export default {
         this.$router.push({ path: '/adminCate' });
       } else if (this.type == '6') {
         this.$router.push({ path: '/adminHaveCert' });
+      } else if (this.type == '7') {
+        this.$router.push({ path: '/userCert' });
       }
     },
   },

+ 2 - 1
src/views/adminCenter/adminCate/detail.vue

@@ -103,7 +103,8 @@ export default {
           message: '信息临时保存成功',
           type: 'success',
         });
-        this.back();
+        this.search();
+        // this.back();
       }
     },
     // 上一步

+ 31 - 7
src/views/adminCenter/adminCate/parts/five.vue

@@ -18,6 +18,11 @@
               <el-table-column prop="zc" label="技术职称" align="center"> </el-table-column>
               <el-table-column prop="major" label="现从事专业" align="center"> </el-table-column>
               <el-table-column prop="work" label="在项目中承担的主要工作" align="center"> </el-table-column>
+              <el-table-column fixed="right" label="操作" width="100" align="center">
+                <template slot-scope="scope">
+                  <el-button type="text" size="small" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
+                </template>
+              </el-table-column>
             </el-table>
           </el-col>
         </el-col>
@@ -29,7 +34,16 @@
         </el-col>
       </el-col>
     </el-row>
-    <el-dialog class="dialog" title="研发人员信息管理" width="50%" :visible.sync="dialog" @closed="handleClose" :destroy-on-close="true">
+    <el-dialog
+      class="dialog"
+      title="研发人员信息管理"
+      width="50%"
+      :visible.sync="dialog"
+      @closed="handleClose"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      :close-on-click-modal="false"
+    >
       <el-form :model="researchForm" :rules="rules" ref="researchForm" label-width="130px">
         <el-form-item label="姓名" prop="name">
           <el-input v-model="researchForm.name" placeholder="请输入姓名"></el-input>
@@ -88,7 +102,7 @@
           ></el-input>
         </el-form-item>
         <div class="btn">
-          <p>请谨慎填写成果参加人员信息,一旦提交不允许修改!</p>
+          <p>请谨慎填写成果参加人员信息,一旦提交只允许修改,不允许删除!</p>
           <el-button type="primary" size="mini" @click="handleClose">取消</el-button>
           <el-button type="primary" size="mini" @click="onSubmit('researchForm')">保存</el-button>
         </div>
@@ -116,7 +130,7 @@ export default {
         age: [{ required: false, message: '请输入年龄', trigger: 'blur' }],
         birth: [{ required: false, message: '请选择出生年月', trigger: 'change' }],
         zc: [{ required: true, message: '请输入技术职称', trigger: 'blur' }],
-        education: [{ required: true, message: '请输入学历', trigger: 'blur' }],
+        education: [{ required: false, message: '请输入学历', trigger: 'blur' }],
         degree: [{ required: false, message: '请输入学位', trigger: 'blur' }],
         major: [{ required: false, message: '请输入现从事专业', trigger: 'blur' }],
         abroad: [{ required: false, message: '请选择', trigger: 'change' }],
@@ -151,16 +165,26 @@ export default {
     onSubmit(formName) {
       this.$refs[formName].validate(valid => {
         if (valid) {
-          let data = _.cloneDeep(this.form.research);
-          data.push(this.researchForm);
-          this.$set(this.form, `research`, data);
-          this.handleClose();
+          if (this.researchForm.index == undefined) {
+            let data = _.cloneDeep(this.form.research);
+            data.push(this.researchForm);
+            this.$set(this.form, `research`, data);
+            this.handleClose();
+          } else {
+            this.handleClose();
+          }
         } else {
           console.log('error submit!!');
           return false;
         }
       });
     },
+    // 编辑
+    toEdit(index, row) {
+      row.index = index;
+      this.$set(this, `researchForm`, row);
+      this.dialog = true;
+    },
   },
   computed: {
     ...mapState(['user']),

+ 8 - 7
src/views/adminCenter/adminHaveCert/index.vue

@@ -40,11 +40,11 @@ export default {
     return {
       opera: [
         {
-          label: '资料查看',
+          label: '申报资料',
           method: 'load',
         },
         {
-          label: '证书查看',
+          label: '证书资料',
           method: 'cert',
         },
       ],
@@ -73,14 +73,15 @@ export default {
         this.$set(this, `total`, res.total);
       }
     },
-    // 证书查看
-    toCert({ data }) {
-      this.$router.push({ path: '/userCommon/certDetail', query: { id: data.id } });
-    },
-    // 资料预览
+    // 申报资料查看
     toLoad({ data }) {
+      this.$router.push({ path: '/userCommon/dataInfo', query: { id: data.id, type: '0' } });
+    },
+    // 证书资料查看
+    toCert({ data }) {
       this.$router.push({ path: '/adminCate/dataInfo', query: { id: data.id, type: '6' } });
     },
+
     async toApply(data) {
       this.$set(this, 'apply', data);
       this.applyDialog = true;

+ 6 - 5
src/views/userCenter/userCert/index.vue

@@ -33,11 +33,11 @@ export default {
       active: 'first',
       opera: [
         {
-          label: '资料查看',
+          label: '申报资料',
           method: 'view',
         },
         {
-          label: '证书查看',
+          label: '证书资料',
           method: 'cert',
           display: i => i.status === '7',
         },
@@ -98,13 +98,14 @@ export default {
       this.$set(this, `active`, tab.name);
       this.search();
     },
-    // 资料查看
+    // 申报资料
     toView({ data }) {
       this.$router.push({ path: '/userCommon/dataInfo', query: { id: data.id, type: '5' } });
     },
-    // 证书查看
+    // 证书资料
     toCert({ data }) {
-      this.$router.push({ path: '/userCommon/certDetail', query: { id: data.id } });
+      this.$router.push({ path: '/adminCate/dataInfo', query: { id: data.id, type: '7' } });
+      // this.$router.push({ path: '/userCommon/certDetail', query: { id: data.id } });
     },
   },
   computed: {