diff --git a/app/src/components/AccountManage.vue b/app/src/components/AccountManage.vue
index 7eef7fa..3125e4e 100644
--- a/app/src/components/AccountManage.vue
+++ b/app/src/components/AccountManage.vue
@@ -58,12 +58,14 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -123,12 +125,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -143,7 +145,7 @@
修改
@@ -179,12 +181,12 @@
id: "",
},
modifyItem: {
- account: "",
- department: "",
- level: "",
- pwd: "",
- username: "",
- id: "",
+ account: "",
+ department: "",
+ level: "",
+ pwd: "",
+ username: "",
+ id: "",
},
progress: false,
levelSelectItem: [{'text': '超級管理員', 'value': '0'},
@@ -203,10 +205,8 @@
};
this.getDepartments();
},
- computed: {
- },
- watch: {
- },
+ computed: {},
+ watch: {},
methods: {
openDialogModify(item) {
console.log(item.department);
@@ -255,6 +255,9 @@
modifyOne() {
this.$axios.put(`/account/account`, this.modifyItem).then(() => {
this.getUsers();
+ Object.keys(this.modifyItem).forEach((key) => {
+ this.modifyItem[key] = '';
+ });
this.close();
}
);
diff --git a/src/main/java/com/moze/rms/utils/ExcelExpoter.java b/src/main/java/com/moze/rms/utils/ExcelExpoter.java
index 129d665..026cbd9 100644
--- a/src/main/java/com/moze/rms/utils/ExcelExpoter.java
+++ b/src/main/java/com/moze/rms/utils/ExcelExpoter.java
@@ -9,6 +9,8 @@ import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.ss.util.RegionUtil;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -205,6 +207,15 @@ public class ExcelExpoter {
pageRowNo = 0; //新建了工作表,重置工作表的行號為0
// -----------定義表頭-----------
nRow = sheet.createRow(pageRowNo++);
+ HSSFCellStyle titleStyle = (HSSFCellStyle) wb.createCellStyle();
+ titleStyle.setAlignment(HorizontalAlignment.CENTER);
+ Cell cell_tem_title = nRow.createCell(0);
+ cell_tem_title.setCellStyle(titleStyle);
+ cell_tem_title.setCellValue("資訊資產清冊 " + sheetName + "類");
+ CellRangeAddress cra =new CellRangeAddress(0, 0, 0, titleKeyList.size() - 1);
+ sheet.addMergedRegion(cra);
+ rowNo++;
+ nRow = sheet.createRow(pageRowNo++);
HSSFCellStyle headerStyle = (HSSFCellStyle) wb.createCellStyle();
headerStyle.setFillForegroundColor(HSSFColor.HSSFColorPredefined.DARK_BLUE.getIndex());
headerStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
@@ -215,11 +226,15 @@ public class ExcelExpoter {
headerStyle.setBorderLeft(BorderStyle.THIN);
headerStyle.setBorderTop(BorderStyle.THIN);
headerStyle.setBorderRight(BorderStyle.THIN);
+ headerStyle.setVerticalAlignment(VerticalAlignment.TOP);
// 列數 titleKeyList.size()
for (int i = 0; i < titleKeyList.size(); i++) {
Cell cell_tem = nRow.createCell(i);
cell_tem.setCellValue(titleMap.get(titleKeyList.get(i)));
cell_tem.setCellStyle(headerStyle);
+ if (i != 0) {
+ sheet.setColumnWidth(i, 4500);
+ }
}
rowNo++;
nRow = sheet.createRow(pageRowNo++);
@@ -233,13 +248,15 @@ public class ExcelExpoter {
descriptStyle.setBorderLeft(BorderStyle.THIN);
descriptStyle.setBorderTop(BorderStyle.THIN);
descriptStyle.setBorderRight(BorderStyle.THIN);
+ descriptStyle.setVerticalAlignment(VerticalAlignment.TOP);
+ descriptStyle.setWrapText(true);
for (int i = 0; i < descriptMap.size(); i++) {
Cell cell_tem = nRow.createCell(i);
cell_tem.setCellValue(descriptMap.get(titleKeyList.get(i)));
cell_tem.setCellStyle(descriptStyle);
}
rowNo++;
- sheet.createFreezePane(0, 2);
+ sheet.createFreezePane(0, 3);
// ---------------------------
}
rowNo++;
@@ -272,7 +289,8 @@ public class ExcelExpoter {
String xlsFile_name = "SeverList.xls"; //輸出xls檔名稱
//記憶體中只建立100個物件
Workbook wb = new HSSFWorkbook(); //關鍵語句
- Iterator>>> iterator = src_lists.entrySet().iterator();
+// Iterator>>> iterator = src_lists.entrySet().iterator();
+ Iterator> iterator = sheetNames.entrySet().iterator();
while (iterator.hasNext()) {
Sheet sheet = null; //工作表物件
Row nRow = null; //行物件
@@ -282,9 +300,9 @@ public class ExcelExpoter {
int pageRowNo = 0; //頁行號
- Map.Entry>> next = iterator.next();
+ Map.Entry next = iterator.next();
String key = next.getKey();
- List