严智鑫
2024-08-23 86739d74c6a28421d6a92edd50b01953146adbad
UI-Project/src/views/User/userlist.vue
@@ -107,6 +107,20 @@
  window.localStorage.setItem('id', row.id)
function closeDialog(row) {
     add.value = false;
     userName.value = '';
     nickName.value = '';
     password.value = '';
     selectedProjectNoa.value = '';
}
function closeDialoga(row) {
     adda.value = false;
     userName.value = '';
     nickName.value = '';
     password.value = '';
}
// 添加 
const getTableRow = async () => {
  try {
@@ -131,7 +145,7 @@
     tableData.value = response.data;
    } else {
      // 请求失败,显示错误消息
      ElMessage.error(response.msg);
      ElMessage.error(response.message);
    }
  } catch (error) {
    // 处理错误
@@ -202,7 +216,7 @@
     <el-button type="primary" style="margin-top: 10px;margin-left: 10px;"  size="mini" id="searchButton" @click="add = true">{{ $t('productStock.addusers') }}</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="240" ref="table"
        <el-table height="500" ref="table"
        @selection-change="handleSelectionChange"
        :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
          <el-table-column prop="userName" align="center" :label="$t('productStock.username')" min-width="180" />
@@ -281,7 +295,7 @@
        <el-button type="primary" @click="getTableRow">
          {{ $t('productStock.sure') }}
        </el-button>
        <el-button @click="add = false">{{ $t('productStock.cancel') }}</el-button>
        <el-button @click="closeDialog">{{ $t('productStock.cancel') }}</el-button>
      </div>
    </template>
  </el-dialog> 
@@ -328,7 +342,7 @@
        <el-button type="primary" @click="getTableRowa">
          {{ $t('productStock.sure') }}
        </el-button>
        <el-button @click="adda = false">{{ $t('productStock.cancel') }}</el-button>
        <el-button @click="closeDialoga">{{ $t('productStock.cancel') }}</el-button>
      </div>
    </template>
  </el-dialog>