Karsa 3 місяців тому
батько
коміт
39ec252fe4

+ 32 - 13
src/views/dataEntry_manage/thirdBase/components/addToBaseDia.vue

@@ -54,16 +54,27 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column align="center" width="280px">
+            <el-table-column align="center" width="320px">
                 <template slot="header" slot-scope="scope">
-                    <span style="margin-right:40px;display:inline-block">目录</span>
-                    <el-radio-group 
-                      v-model="classifyType"
-                      @change="handleClassifyTypeChange"
-                    >
-                        <el-radio :label="0">分目录</el-radio>
-                        <el-radio :label="1">同目录</el-radio>
-                    </el-radio-group>
+                      
+                    <div class="header-cell">
+                      <el-radio-group 
+                        v-model="classifyType"
+                        @change="handleClassifyTypeChange"
+                      >
+                          <el-radio :label="0" style="margin-right:10px;">分目录</el-radio>
+                          <el-radio :label="1">同目录</el-radio>
+                      </el-radio-group>
+                      <el-cascader
+                          v-model="defaultClassifyId"
+                          :options="classifyOpt"
+                          :props="levelProps"
+                          placeholder="请选择指标目录"
+                          @change="handleClassifyChange(row)"
+                          style="width:120px"
+                          :disabled="classifyType===0"
+                        />
+                    </div>
                 </template>
                 <template slot-scope="{row,$index}">
                       <el-cascader
@@ -71,8 +82,7 @@
                         :options="classifyOpt"
                         :props="levelProps"
                         placeholder="请选择指标目录"
-                        :disabled="(classifyType===1&&$index>0)"
-                        @change="handleClassifyChange(row,$index)"
+                        :disabled="classifyType===1"
                         class="cascader-wrapper"
                       />
                 </template>
@@ -128,7 +138,9 @@ export default {
         emitPath:false
 			},
 
-      existNameArr:[]
+      existNameArr:[],
+
+      defaultClassifyId: 0,
     };
   },
   watch: {
@@ -164,6 +176,8 @@ export default {
     },
 
     cancelHandle() {
+      this.classifyType = 0;
+      this.defaultClassifyId = 0;
       this.existNameArr = [];
       this.$emit('update:isShow',false)
     },
@@ -173,7 +187,7 @@ export default {
         if(this.classifyType===1){
           // 修改所有的指标的目录为第一个
           this.tableData.forEach(item=>{
-              item.ClassifyId=e.ClassifyId
+              item.ClassifyId=this.defaultClassifyId
           })
         }
     },
@@ -241,6 +255,11 @@ export default {
       color: #f00;
     }
   }
+  .header-cell {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
 }
 </style>
 <style lang="scss">

+ 1 - 1
src/views/dataEntry_manage/thirdBase/components/edbDataDetail.vue

@@ -15,7 +15,7 @@
 
       <span 
         class="editsty" 
-        v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_opera_clear')" 
+        v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_opera_clear')&&edbInfo.ClassifyId!==0" 
         @click="$emit('handle',{item:edbInfo,type:'clear'})
       "><!-- 移除 -->{{$t('SciHongqiPage.handle_clear')}}</span>