13937891274
2022-07-30 f91c24d2b2b513716ffe9f4259a8a343c841bb00
src/views/contingencyManagement/emergencyResources/emergencySupplies/index.vue
@@ -79,6 +79,7 @@
      <Maintain ref="seeRef" @myadd="onMaintainAdd"/>
    <Inspect ref="spectRef" @myadd="onInspectAdd"/>
      <OpenAdd ref="addRef" @myAdd="onMyAdd" />
    <OpenEdit ref="editRef" @myAdd="onMyAdds" />
<!--      <upData ref="upShow"></upData>-->
   </div>
</template>
@@ -107,6 +108,7 @@
import OpenAdd from '/@/views/contingencyManagement/emergencyResources/emergencySupplies/component/openAdd.vue';
import Maintain from '/@/views/contingencyManagement/emergencyResources/emergencySupplies/component/maintain.vue';
import Inspect from '/@/views/contingencyManagement/emergencyResources/emergencySupplies/component/inspect.vue';
import OpenEdit from '/@/views/contingencyManagement/emergencyResources/emergencySupplies/component/openEdit.vue';
import UpData from '/@/views/contingencyManagement/panManagement/component/upData.vue';
import {emergencySuppliesApi} from '/@/api/emergencyResources';
@@ -115,8 +117,8 @@
   components: {
      OpenAdd,
      Maintain,
      // OpenEdit,
      View,
    OpenEdit,
      EditPen,
      Plus,
      Edit,
@@ -128,8 +130,6 @@
      UpData,
   },
   setup() {
      // const multipleTableRef = ref<InstanceType<typeof ElTable>>();
      // const multipleSelection = ref<User[]>([]);
      // 列表参数
      const listQuery = reactive({
         pageIndex: 1,
@@ -230,11 +230,20 @@
      }
    };
      // 打开修改用户弹窗
    const editRef = ref();
    const onEdit = (val: string, row: object) => {
      if (val == '详情') {
        addRef.value.openDialog('查看应急物资代码',row,true);
        editRef.value.openDialog('查看应急物资代码',row,true);
      } else {
        addRef.value.openDialog('修改应急物资代码',row,false);
        editRef.value.openDialog('修改应急物资代码',row,false);
      }
    };
    // 新增后刷新
    const onMyAdds = (e: boolean) => {
      if (e) {
        listApi();
      } else {
        listApi();
      }
    };
      // 删除用户
@@ -312,8 +321,6 @@
         listQuery.pageIndex = val;
      };
      return {
         // multipleSelection,
         // multipleTableRef,
         // upButton,
         // upShow,
         tableData,
@@ -333,6 +340,7 @@
         submitReset,
      onMyAdd,
      onEdit,
      editRef,
      onDeleteAll,
      handleSelectionChange,
      warning,
@@ -341,6 +349,7 @@
      onInspect,
      onMaintainAdd,
      onInspectAdd,
      onMyAdds,
      };
   },
});