ysy 2 lat temu
rodzic
commit
3e3938ca0f

+ 5 - 10
src/views/classifyManage/treeClassify/components/list-edit.vue

@@ -68,6 +68,7 @@
       <!-- 子节点 -->
       <template v-else>
         <el-form-item label="父级节点:">
+        
           {{ parentData.name }}
         </el-form-item>
         <el-form-item label="层级全览:">
@@ -149,16 +150,10 @@
         typeList: [
           { 
             value: '1',
-            label: '品组'
+            label: '品组'
           },
-          {
-            value: '2',
-            label: '设备组',
-          },
-          {
-            value: '3',
-            label: '物料组'
-          }
+     
+        
         ],
 
         // 表单验证规则
@@ -223,7 +218,7 @@
           if (!this.data?.id && this.parentData?.id) {
             params.parentId =
               this.rootId == this.data?.id ? 0 : this.parentData.id;
-            params.type = this.parentData.type;
+          
 
           }
           if (this.data?.id) {

+ 51 - 54
src/views/technology/productParam/components/process.vue

@@ -16,55 +16,51 @@
 
         <!-- 展开内容 -->
         <template v-slot:expand="{ row }">
-          <div style="width:100%; height: 200px">
-            <ele-pro-table ref="table" :datasource="row.produceList" :columns="columns">
-            <!-- 表头工具栏 -->
-            <template v-slot:toolbar>
-
-              <el-button size="small" icon="el-icon-plus" class="ele-btn-icon" type="primary"
-                @click.native="openParam">添加参数</el-button>
-
-            </template>
-
-            <!-- 默认值 -->
-            <template v-slot:defaultValue="{ row }">
-              <el-input v-if="row.textType == 1 || row.textType == 4" v-model="row.defaultValue"
-                placeholder="请输入"></el-input>
-              <el-select v-if="row.textType == 2" v-model="row.defaultValue" placeholder="请选择">
-                <el-option label="TRUE" :value="'TRUE'" />
-                <el-option label="FALSE" :value="'FALSE'" />
-              </el-select>
-
-            </template>
-
-            <!-- 上限 -->
-            <template v-slot:maxValue="{ row }">
-              <el-input v-if="row.textType == 3" v-model="row.maxValue" placeholder="请输入"></el-input>
-            </template>
-            <!-- 下限 -->
-            <template v-slot:minValue="{ row }">
-              <el-input v-if="row.textType == 3" v-model="row.minValue" placeholder="请输入"></el-input>
-            </template>
-
-            <!-- 单位 -->
-            <template v-slot:unitName="{ row }">
-              <DictSelection v-if="row.textType != 2" dictName="工艺参数单位" clearable filterable v-model="row.unitName">
-              </DictSelection>
-            </template>
-
-
-
-            <!-- 操作列 -->
-            <template v-slot:action="{ row }">
-              <el-popconfirm class="ele-action" title="确定要删除当前参数吗?" @confirm="remove(row)">
-                <template v-slot:reference>
-                  <el-link type="danger" :underline="false" icon="el-icon-delete">
-                    删除
-                  </el-link>
-                </template>
-              </el-popconfirm>
-            </template>
-          </ele-pro-table>    
+         
+          <div style="width:100%; min-height: 200px" v-if="row.produceList">
+            <ele-pro-table ref="table2"  :need-page="false" :datasource="row.produceList"
+              :columns="columns2"  row-key="code">
+
+
+              <!-- 默认值 -->
+              <template v-slot:defaultValue="{ row }">
+                <el-input v-if="row.textType == 1 || row.textType == 4" v-model="row.defaultValue"
+                  placeholder="请输入"></el-input>
+                <el-select v-if="row.textType == 2" v-model="row.defaultValue" placeholder="请选择">
+                  <el-option label="TRUE" :value="'TRUE'" />
+                  <el-option label="FALSE" :value="'FALSE'" />
+                </el-select>
+
+              </template>
+
+              <!-- 上限 -->
+              <template v-slot:maxValue="{ row }">
+                <el-input v-if="row.textType == 3" v-model="row.maxValue" placeholder="请输入"></el-input>
+              </template>
+              <!-- 下限 -->
+              <template v-slot:minValue="{ row }">
+                <el-input v-if="row.textType == 3" v-model="row.minValue" placeholder="请输入"></el-input>
+              </template>
+
+              <!-- 单位 -->
+              <template v-slot:unitName="{ row }">
+                <DictSelection v-if="row.textType != 2" dictName="工艺参数单位" clearable filterable v-model="row.unitName">
+                </DictSelection>
+              </template>
+
+
+
+              <!-- 操作列 -->
+              <template v-slot:action="{ row }">
+                <el-popconfirm class="ele-action" title="确定要删除当前参数吗?" @confirm="remove(row)">
+                  <template v-slot:reference>
+                    <el-link type="danger" :underline="false" icon="el-icon-delete">
+                      删除
+                    </el-link>
+                  </template>
+                </el-popconfirm>
+              </template>
+            </ele-pro-table>
           </div>
         </template>
 
@@ -257,17 +253,18 @@ export default {
     },
 
     chooseModal(data, current) {
+ 
       let tableList = []
       tableList = this.$refs.table.getData()
 
-
-      tableList.map((m) => {
-        if (m.id = current.id) {
-          m.produceList = data
+      tableList.forEach(e => {
+        if(e.id = current.id) {
+          e.produceList = data
         }
       })
 
-      console.log(tableList)
+      this.$refs.table.setData([...tableList]);
+      
     },