yangfeng
2023-09-21 8d0ee0a2c32c7a99afc01b0a0c795d708a9b7955
src/views/overview/OverviewListView.vue
@@ -27,14 +27,14 @@
      v-if="editConfig.visible"
      :work-type="workType"
      :edit-common-config="editConfig"
      :add-name="this.$route.query.name"
      :add-name="this.$route.params.name"
    />
  </div>
</template>
<script>
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import { getProductList } from "@/api/product/product"
import { getOperation } from "@/api/overview/overview"
// import DetailProduct from "@/views/productManage/product/DetailProduct"
import AddOverviewDialog from "@/views/overview/AddOverviewDialog"
@@ -59,12 +59,13 @@
        title: "新建",
        infomation: {}
      },
      workType: this.$route.query.workType
      workType: this.$route.params.workType
    }
  },
  created() {
    this.setTable()
    this.getData()
    console.log(this.$route.params.workType)
  },
  methods: {
    setTable() {
@@ -175,23 +176,21 @@
      this.tableList.tableColumn = this.setTableColumn(val)
    },
    // 请求数据
    async getData(val, content) {
      await getProductList({
        [val]: content,
    async getData() {
      await getOperation({
        operationTypeId: this.$route.params.id,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
        console.log(res.data.data)
        if (res.data.code === 200) {
          const list = res.data.data.list.map((item) => {
          const list = res.data.data.map((item) => {
            return {
              ...item,
              supplierNumber: item.supplier.number,
              status: "就绪",
              preTime: "2023-09-04 11:20:00"
              ...item
            }
          })
          this.tableList.tableInfomation = list || []
          this.pagerOptions.totalCount = res.data.data.total
          this.pagerOptions.totalCount = res.data.total
        }
      })
    },