Browse Source

BUG3216 引申【系统DVP】基本信息页面,点击保存按钮没反应,控制台报错

dongfeng 8 tháng trước cách đây
mục cha
commit
1d0f6db2f4
1 tập tin đã thay đổi với 5 bổ sung4 xóa
  1. 5 4
      src/views/systemDVP/baseInfo/baseInfo/index.vue

+ 5 - 4
src/views/systemDVP/baseInfo/baseInfo/index.vue

@@ -126,11 +126,11 @@
           <!-- 需求负责人 -->
           <a-col :xl="12" :lg="8" :md="12" :sm="24" :xs="24">
             <a-form-item :label="$t('base.info.requirement.owner')">
-              <span v-if="!isEdit" class="ml8">{{ baseInfo.owner }}</span>
+              <span v-if="!isEdit" class="ml8">{{ owner }}</span>
               <a-select
                 v-else
                 class="select-width"
-                v-model="owner"
+                v-model="baseInfo.owner"
                 :filter-option="filterOption"
                 :placeholder="$t('base.info.please-choose-owner')"
                 showSearch
@@ -192,6 +192,7 @@ export default {
       _that.$api.systemDvpBasicInformation(data).then(res => {
         if (res.flag){
           _that.baseInfo = res.data;
+          _that.owner = res.data.owner;
           //处理"年",只显示年份不显示后面日期与时间
           if (_that.baseInfo.year){
             _that.baseInfo.year = _that.baseInfo.year.slice(0,4)
@@ -208,7 +209,7 @@ export default {
       }
       let data = {
         dvpId: this.dvpId,
-        ownerId: this.owner,
+        ownerId: this.baseInfo.ownerId,
         dvpType: 1,
       };
       this.$api.updateDvpBasicInformation(data).then(res => {
@@ -227,7 +228,7 @@ export default {
     },
     // 责任人下拉选项变换时
     changeOwner(value, options) {
-      this.owner = options ? options.data.key : undefined;
+      this.baseInfo.ownerId = options ? options.data.key : undefined;
     },
 		// 下拉选项过滤
 		filterOption(input, option) {