From 405eeb045cfecff07b80a33582033be6cc52ed33 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期三, 14 十二月 2022 14:36:06 +0800
Subject: [PATCH] 样式修改
---
src/views/systemSetting/device/handheldTerminal/index.vue | 64 +++++++++++++++++++-------------
1 files changed, 38 insertions(+), 26 deletions(-)
diff --git a/src/views/systemSetting/device/handheldTerminal/index.vue b/src/views/systemSetting/device/handheldTerminal/index.vue
index e130306..58a4d30 100644
--- a/src/views/systemSetting/device/handheldTerminal/index.vue
+++ b/src/views/systemSetting/device/handheldTerminal/index.vue
@@ -23,10 +23,7 @@
<main>
<div class="main-content">
<div class="main-title">
- <el-button
- class="el-icon-plus"
- type="primary"
- @click="dialogCreate = true"
+ <el-button class="el-icon-plus button-addition" type="primary" @click="handleAdd"
>娣诲姞</el-button
>
</div>
@@ -53,7 +50,7 @@
</el-table-column>
<el-table-column prop="phone" label="鑱旂郴鏂瑰紡" min-width="10">
</el-table-column>
- <el-table-column prop="pDepartName" label="鎵�灞為儴闂�" min-width="10">
+ <el-table-column prop="pdepartName" label="鎵�灞為儴闂�" min-width="10">
</el-table-column>
<el-table-column prop="departName" label="鎵�灞炲ぇ闃�" min-width="10">
</el-table-column>
@@ -68,7 +65,7 @@
<el-table-column prop="operation" label="鎿嶄綔" min-width="20">
<template slot-scope="scope">
- <div class="btn">
+ <div class="operation">
<span @click="handleEdit(scope.row)">缂栬緫</span>
<span class="line">|</span>
<span @click="handleDelete(scope.row)">鍒犻櫎</span>
@@ -105,7 +102,7 @@
width="60%"
:before-close="handleClose"
>
- <MyForm :info="handheldTerminal" :closeDialog="setTableData"></MyForm>
+ <MyForm :info="handheldTerminal" @closeDialog="handleCallBack"></MyForm>
</el-dialog>
</footer>
</div>
@@ -142,31 +139,47 @@
pageSize: 10,
currentPage: 1,
renderFlag: false,
- handheldTerminal: {
- id: 0,
- name: "",
- code: "",
- user: "",
- phone: "",
- departId: 0,
- },
+ handheldTerminal: {},
};
},
created() {
this.setTableData();
},
methods: {
- ...mapActions([
- "getHandheldTerminalList",
- "saveHandheldTerminal",
- "updateHandheldTerminal",
- ]),
+ ...mapActions(["getHandheldTerminalList", "deleteHandheldTerminal"]),
+ handleAdd() {
+ this.handheldTerminal = {
+ id: 0,
+ name: "",
+ code: "",
+ user: "",
+ phone: "",
+ departId: 0,
+ departName: "",
+ };
+ this.dialogCreate = true;
+ },
handleEdit(row) {
-
this.handheldTerminal = row;
this.dialogCreate = true;
},
- handleDelete(row) {},
+ handleDelete(row) {
+ this.$confirm("纭鍒犻櫎锛�").then((_) => {
+ this.deleteHandheldTerminal(row.id).then((res) => {
+ this.$message({
+ type: "success",
+ message: "鍒犻櫎鎴愬姛锛�",
+ });
+ this.setTableData();
+ });
+ });
+ },
+
+ handleCallBack(e) {
+ this.currentPage = 1;
+ this.dialogCreate = false;
+ this.setTableData();
+ },
formatSate(row, column) {
return row.state == 1 ? "鍦ㄧ嚎" : "绂荤嚎";
},
@@ -183,6 +196,7 @@
// 寮圭獥鍏抽棴
handleClose(done) {
this.$confirm("纭鍏抽棴?").then((_) => {
+ this.dialogCreate = false;
done();
});
},
@@ -194,10 +208,8 @@
pageSize,
state: context,
}).then((res) => {
- if (res.data.code == 200) {
- this.list = res.data.data.records;
- this.totalNum = res.data.data.total;
- }
+ this.list = res.records;
+ this.totalNum = res.total;
});
},
handleStateChange(e) {
--
Gitblit v1.8.0