spring
4 天以前 26c1bdffec1f61fbc7014a4457d239c1597e3d50
src/views/productionManagement/productStructure/index.vue
@@ -14,25 +14,28 @@
        <el-button
            type="primary"
            text
            @click="() =>{
              currentRowId = row.id;
              showEdit = true;
            }"
        >{{ row.productName }}
            @click="showDetail(row.id)">{{ row.productName }}
        </el-button>
      </template>
    </PIMTable>
    <StructureEdit v-if="showEdit" v-model:show-model="showEdit" :product-model-id="currentRowId"/>
    <StructureEdit v-if="showEdit" v-model:show-model="showEdit" :record="currentRow"/>
  </div>
</template>
<script setup>
import {ref} from "vue";
import {productModelList} from "@/api/basicData/productModel.js";
import { useRouter } from 'vue-router'
const router = useRouter()
const StructureEdit = defineAsyncComponent(() => import('@/views/productionManagement/productStructure/StructureEdit.vue'))
const tableColumn = ref([
  {
    label: "产品编码",
    prop: "productCode",
    slot: "detail"
  },
  {
    label: "产品名称",
    prop: "productName",
@@ -52,7 +55,7 @@
const tableLoading = ref(false);
const showEdit = ref(false);
const selectedRows = ref([]);
const currentRowId = ref(0);
const currentRow = ref({});
const page = reactive({
  current: 1,
  size: 10,
@@ -84,6 +87,15 @@
  page.size = obj.limit;
  getModelList();
};
const showDetail = (id) => {
  router.push({
    path: '/productionManagement/productStructureDetail',
    query: {
      id: id
    }
  })
}
const getModelList = () => {
  tableLoading.value = true;
  productModelList({