wangfei
2025-04-18 41091ccf87e8e77b4a1a50f5a7bf62d14c604d39
UI-Project/src/views/User/userlist.vue
@@ -36,8 +36,7 @@
    } else {  
      ElMessage.warning(response.data);  
    }  
  } catch (error) {
    console.error('Error fetching options:', error);
  } catch (error) {
  }  
}; 
// 重置密码
@@ -54,7 +53,6 @@
    );
    if (confirmResult === 'confirm') {
      var url="/loadGlass/sys/user/resetPassword?userId="+row.id;
      console.log(url);
      const response = await request.post(url, {
        esdId: row.esdId
    })
@@ -65,7 +63,6 @@
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  }  
}; 
const titleSelectJsona = ref({
@@ -86,8 +83,7 @@
    } else {  
      ElMessage.warning(response.data);  
    }  
  } catch (error) {
    console.error('Error fetching options:', error);
  } catch (error) {
  }  
}; 
// 处理编辑按钮点击  
@@ -134,7 +130,6 @@
      ElMessage.error(response.message);
    }
  } catch (error) {
    console.error(error);
  }
};
// 编辑
@@ -159,7 +154,6 @@
      ElMessage.error(response.message);
    }
  } catch (error) {
    console.error(error);
  }
};
// 删除 
@@ -184,17 +178,15 @@
      }  
    }  
  } catch (error) {
    console.error('发生错误:', error);
  }  
};   
</script>
<template>
  <div>
     <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">
     <el-button type="primary" style="margin-top: 10px;margin-left: 10px;"  id="searchButton" @click="add = true">{{ $t('productStock.addusers') }}</el-button>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" >
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="750" 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" />
          <el-table-column align="center" :label="$t('productStock.role')" min-width="80">
@@ -206,9 +198,9 @@
            </el-table-column>
          <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
            <template #default="scope">
              <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('productStock.resetpassword') }}</el-button>
              <el-button size="mini" type="text" plain @click="handleEdit(scope.row)">{{ $t('productStock.exit') }}</el-button>
              <el-button size="mini" type="text" plain @click="opena(scope.row)">{{ $t('productStock.delete') }}</el-button>
              <el-button type="text" plain @click="open(scope.row)">{{ $t('productStock.resetpassword') }}</el-button>
              <el-button type="text" plain @click="handleEdit(scope.row)">{{ $t('productStock.exit') }}</el-button>
              <el-button type="text" plain @click="opena(scope.row)">{{ $t('productStock.delete') }}</el-button>
            </template>
        </el-table-column>
        </el-table>
@@ -217,8 +209,8 @@
  </div>
  <el-dialog v-model="add" top="23vh" width="37%" :title="$t('productStock.addusers')">
    <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
            <el-form  size="mini" label-width="150px">
      <el-form label-width="100px" label-position="right">
            <el-form  label-width="150px">
      <el-form label-width="105px" label-position="right">
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
@@ -278,8 +270,8 @@
  </el-dialog> 
  <el-dialog v-model="adda" top="23vh" width="37%" :title="$t('productStock.reusername')" >
    <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
            <el-form ref="formRef" size="mini" label-width="150px">
      <el-form label-width="100px" label-position="right">
            <el-form ref="formRef" label-width="150px">
      <el-form label-width="105px" label-position="right">
        <el-row style="margin-top: -15px;margin-bottom: -2px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">