#
Junjie
2024-09-10 a54f85deb9d8c8778ec77ae115b8db4cabc934be
zy-asrs-admin/src/views/base/locTypeBind/index.vue
@@ -18,6 +18,11 @@
const editChild = ref(null)
const initChild = ref(null)
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
let currentLocType = ref(null)
let tableData = ref([]);
getPage();
@@ -99,10 +104,7 @@
  },
];
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
const hasSelected = computed(() => state.selectedRowKeys.length > 0);
const start = () => {
  state.loading = true;
@@ -118,6 +120,7 @@
};
function getPage() {
  state.loading = true;
  post('/api/locTypeBind/page', {
    current: currentPage,
    pageSize: pageSize,
@@ -128,6 +131,8 @@
    if (result.code == 200) {
      let data = result.data;
      tableData.value = data;
      state.loading = false;
    } else if (result.code === 401) {
      message.error(result.msg);
      logout()
@@ -279,7 +284,7 @@
      <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
        :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id"
        :pagination="{ total: tableData.total, onChange: onPageChange }"
        :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns">
        :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" :loading="state.loading">
        <template #bodyCell="{ column, text, record }">
          <template v-if="column.dataIndex === 'oper'">
            <div style="display: flex;justify-content: space-evenly;">