zuozhengqing
2023-12-20 f1aa97dacb7367a0babc0ecd68ccd708ca4e854b
菜单数据存储进vuex中
2个文件已修改
7 ■■■■■ 已修改文件
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/supplierManage/supplier/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -6,7 +6,7 @@
import purchaseRouter from "./purchase/index.js"
import productRouter from "./product/index.js"
import {getMenuTreeByRole} from "@/api/menus/index"
import store from '@/store/index.js'; // 替换为实际的存储实例路径
import store from '@/store/index.js';
Vue.use(Router)
const login = (resolve) => require(["@/views/other/login/index"], resolve)
src/views/supplierManage/supplier/index.vue
@@ -356,7 +356,7 @@
    async enableClick(row, value) {
      let status = value === "启用" ? 1 : 0
      await changeSupplierStatus({
        id: row.ID,
        id:Number(row.id),
        status: status
      }).then((res) => {
        if (res.code === 200) {
@@ -418,7 +418,6 @@
      this.selValueList = list
    },
    tableRowClick(row) {
      console.log(row)
      this.productPagerOptions.currPage = 1
      this.selectRow = row
      this.supplierId = row.id
@@ -426,7 +425,7 @@
    },
    // 详情
    async selCommonClick(row) {
      await getPurchaseList({ pageSize: 10, page: 1, supplierId: row.ID }).then((res) => {
      await getPurchaseList({ pageSize: 10, page: 1, supplierId: Number(row.id) }).then((res) => {
        this.commonDetail.productListInfo = res.data.list
      })
      this.commonDetail.visible = true