lrf402788946 vor 4 Jahren
Ursprung
Commit
8166ab189c

+ 10 - 10
src/views/techolchat/list/detail-model/fields.js

@@ -32,11 +32,11 @@ export const three = [
     type: 'array',
     children: [
       { label: '负责人', model: 'charge', list: 'gCharge', type: 'select' },
-      { label: '年龄', model: 'age', list: 'age', type: 'select' },
-      { label: '学历', model: 'edu', list: 'edu', type: 'select' },
-      { label: '技术职称', model: 'teckRank', list: 'teckRank', type: 'select' },
-      { label: '专业', model: 'major', list: 'major', type: 'select' },
-      { label: '专业契合度', model: 'agreePer', list: 'agreePer', type: 'select' },
+      { label: '年龄', model: 'gage', list: 'age', type: 'select' },
+      { label: '学历', model: 'gedu', list: 'edu', type: 'select' },
+      { label: '技术职称', model: 'gteckRank', list: 'teckRank', type: 'select' },
+      { label: '专业', model: 'gmajor', list: 'major', type: 'select' },
+      { label: '专业契合度', model: 'gagreePer', list: 'agreePer', type: 'select' },
     ],
   },
   {
@@ -45,11 +45,11 @@ export const three = [
     type: 'object',
     children: [
       { label: '技术顾问团', model: 'gnum', list: 'gwNum', type: 'select' },
-      { label: '平均年龄', model: 'age', list: 'age', type: 'select' },
-      { label: '最高学历', model: 'edu', list: 'edu', type: 'select' },
-      { label: '技术职称', model: 'teckRank', list: 'teckRank', type: 'select' },
-      { label: '专业', model: 'major', list: 'major', type: 'select' },
-      { label: '专业契合度', model: 'agreePer', list: 'agreePer', type: 'select' },
+      { label: '平均年龄', model: 'gwage', list: 'age', type: 'select' },
+      { label: '最高学历', model: 'gwedu', list: 'edu', type: 'select' },
+      { label: '技术职称', model: 'gwteckRank', list: 'teckRank', type: 'select' },
+      { label: '专业', model: 'gwmajor', list: 'major', type: 'select' },
+      { label: '专业契合度', model: 'gwagreePer', list: 'agreePer', type: 'select' },
     ],
   },
 ];

+ 32 - 2
src/views/techolchat/list/detail-model/parts-models/thr.vue

@@ -14,7 +14,7 @@
                     {{ f.label }}
                   </el-col>
                   <el-col :span="24">
-                    <el-select v-model="form[f.model]">
+                    <el-select v-model="form[f.model]" :disabled="disabled[f.model]" @change="toChange">
                       <el-option v-for="(item, index) in getList(f.list)" :key="index" :value="item" :label="item"></el-option>
                     </el-select>
                   </el-col>
@@ -29,6 +29,7 @@
 </template>
 
 <script>
+const _ = require('lodash');
 import { three } from '../fields.js';
 import * as select from '../select.js';
 import { mapState, createNamespacedHelpers } from 'vuex';
@@ -45,7 +46,7 @@ export default {
   components: {},
   data: function() {
     return {
-      disabled: false,
+      disabled: {},
       question: three,
     };
   },
@@ -55,6 +56,35 @@ export default {
     getList(type) {
       return select[type];
     },
+    // 修改disabled
+    toChange() {
+      console.log('in function:');
+      const d1 = _.get(this.form, 'charge');
+      const d2 = _.get(this.form, 'gnum');
+      console.log(d1, d2);
+      let obj = {};
+      if (d1 === '无技术团队') {
+        const r = three.find(f => f.model === 'group');
+        if (r) {
+          const { children } = r;
+          const keys = _.drop(children, 1).map(i => i.model);
+          for (const key of keys) {
+            obj[key] = true;
+          }
+        }
+      }
+      if (d2 === '无顾问团队') {
+        const r = three.find(f => f.model === 'gw_group');
+        if (r) {
+          const { children } = r;
+          const keys = _.drop(children, 1).map(i => i.model);
+          for (const key of keys) {
+            obj[key] = true;
+          }
+        }
+      }
+      this.$set(this, `disabled`, obj);
+    },
   },
   computed: {
     ...mapState(['user']),