|
@@ -8,7 +8,7 @@
|
8
|
8
|
@on-search="searchList()"
|
9
|
9
|
style="width: 150px"
|
10
|
10
|
/>
|
11
|
|
- <Button type="primary" class="primary_btn">新建</Button>
|
|
11
|
+ <Button type="primary" class="primary_btn" @click="toAdd()">新建</Button>
|
12
|
12
|
</div>
|
13
|
13
|
<div class="table_wrap">
|
14
|
14
|
<Table :columns="columns" :data="searchForm.list">
|
|
@@ -41,6 +41,65 @@
|
41
|
41
|
show-sizer
|
42
|
42
|
></Page>
|
43
|
43
|
</div>
|
|
44
|
+ <!-- 新建 -->
|
|
45
|
+ <Modal
|
|
46
|
+ class="modal1"
|
|
47
|
+ :mask-closable="false"
|
|
48
|
+ v-model="addInfo.show"
|
|
49
|
+ title="新建"
|
|
50
|
+ >
|
|
51
|
+ <Form
|
|
52
|
+ ref="addForm"
|
|
53
|
+ :model="addInfo"
|
|
54
|
+ :rules="rules"
|
|
55
|
+ :label-width="100"
|
|
56
|
+ inline
|
|
57
|
+ >
|
|
58
|
+ <FormItem label="区域名称" prop="areaname" style="width: 100%">
|
|
59
|
+ <Input
|
|
60
|
+ v-model="addInfo.areaname"
|
|
61
|
+ placeholder="请输入区域名称"
|
|
62
|
+ ></Input>
|
|
63
|
+ </FormItem>
|
|
64
|
+ <FormItem
|
|
65
|
+ label="管理员名称"
|
|
66
|
+ prop="admin"
|
|
67
|
+ style="width: calc(50% - 10px)"
|
|
68
|
+ >
|
|
69
|
+ <Input v-model="addInfo.admin" placeholder="请输入管理员名称"></Input>
|
|
70
|
+ </FormItem>
|
|
71
|
+ <FormItem
|
|
72
|
+ label="登录账号"
|
|
73
|
+ prop="loginname"
|
|
74
|
+ style="width: calc(50% - 10px)"
|
|
75
|
+ >
|
|
76
|
+ <Input
|
|
77
|
+ v-model="addInfo.loginname"
|
|
78
|
+ placeholder="请输入登录账号"
|
|
79
|
+ ></Input>
|
|
80
|
+ </FormItem>
|
|
81
|
+ <FormItem label="密码" prop="pwd" style="width: calc(50% - 10px)">
|
|
82
|
+ <Input v-model="addInfo.pwd" placeholder="请输入密码"></Input>
|
|
83
|
+ </FormItem>
|
|
84
|
+ <FormItem label="确认密码" prop="pwd1" style="width: calc(50% - 10px)">
|
|
85
|
+ <Input v-model="addInfo.pwd1" placeholder="请输入确认密码"></Input>
|
|
86
|
+ </FormItem>
|
|
87
|
+ <FormItem label="手机号码" prop="phone" style="width: calc(50% - 10px)">
|
|
88
|
+ <Input v-model="addInfo.phone" placeholder="请输入手机号码"></Input>
|
|
89
|
+ </FormItem>
|
|
90
|
+ <FormItem
|
|
91
|
+ label="短信验证码"
|
|
92
|
+ prop="code"
|
|
93
|
+ style="width: calc(50% - 10px)"
|
|
94
|
+ >
|
|
95
|
+ <Input v-model="addInfo.code" placeholder="请输入短信验证码"></Input>
|
|
96
|
+ </FormItem>
|
|
97
|
+ </Form>
|
|
98
|
+ <div slot="footer">
|
|
99
|
+ <Button @click="addInfo.show = false">取消</Button>
|
|
100
|
+ <Button @click="saveAddInfo()" type="primary">保存</Button>
|
|
101
|
+ </div>
|
|
102
|
+ </Modal>
|
44
|
103
|
</div>
|
45
|
104
|
</template>
|
46
|
105
|
|
|
@@ -57,6 +116,53 @@ export default {
|
57
|
116
|
list: [],
|
58
|
117
|
total: 0
|
59
|
118
|
},
|
|
119
|
+ addInfo: {
|
|
120
|
+ show: false,
|
|
121
|
+ areaname: "",
|
|
122
|
+ admin: "",
|
|
123
|
+ loginname: "",
|
|
124
|
+ pwd: "",
|
|
125
|
+ pwd1: "",
|
|
126
|
+ phone: "",
|
|
127
|
+ code: ""
|
|
128
|
+ },
|
|
129
|
+ rules: {
|
|
130
|
+ areaname: [
|
|
131
|
+ {
|
|
132
|
+ required: true,
|
|
133
|
+ message: "请输入区域名称",
|
|
134
|
+ trigger: "blur"
|
|
135
|
+ }
|
|
136
|
+ ],
|
|
137
|
+ admin: [
|
|
138
|
+ {
|
|
139
|
+ required: true,
|
|
140
|
+ message: "请输入管理员名称",
|
|
141
|
+ trigger: "blur"
|
|
142
|
+ }
|
|
143
|
+ ],
|
|
144
|
+ loginname: [
|
|
145
|
+ {
|
|
146
|
+ required: true,
|
|
147
|
+ message: "请输入请输入登录账号",
|
|
148
|
+ trigger: "blur"
|
|
149
|
+ }
|
|
150
|
+ ],
|
|
151
|
+ pwd: [
|
|
152
|
+ {
|
|
153
|
+ required: true,
|
|
154
|
+ message: "请输入密码",
|
|
155
|
+ trigger: "blur"
|
|
156
|
+ }
|
|
157
|
+ ],
|
|
158
|
+ pwd1: [
|
|
159
|
+ {
|
|
160
|
+ required: true,
|
|
161
|
+ message: "请输入确认密码",
|
|
162
|
+ trigger: "blur"
|
|
163
|
+ }
|
|
164
|
+ ]
|
|
165
|
+ },
|
60
|
166
|
columns: [
|
61
|
167
|
{
|
62
|
168
|
title: "序号",
|
|
@@ -113,19 +219,23 @@ export default {
|
113
|
219
|
this.searchList();
|
114
|
220
|
},
|
115
|
221
|
methods: {
|
|
222
|
+ // 搜索
|
116
|
223
|
searchList() {
|
117
|
224
|
this.searchForm.page = 1;
|
118
|
225
|
this.getList();
|
119
|
226
|
},
|
|
227
|
+ // 页码改变
|
120
|
228
|
pageChange(page) {
|
121
|
229
|
this.searchForm.page = page;
|
122
|
230
|
this.getList();
|
123
|
231
|
},
|
|
232
|
+ // 每页显示数量改变
|
124
|
233
|
pageSizeChange(size) {
|
125
|
234
|
this.searchForm.size = size;
|
126
|
235
|
this.searchForm.page = 1;
|
127
|
236
|
this.getList();
|
128
|
237
|
},
|
|
238
|
+ // 获取列表
|
129
|
239
|
getList() {
|
130
|
240
|
this.searchForm.list = [
|
131
|
241
|
{
|
|
@@ -155,9 +265,28 @@ export default {
|
155
|
265
|
];
|
156
|
266
|
this.searchForm.total = 3;
|
157
|
267
|
},
|
|
268
|
+ // 新建
|
|
269
|
+ toAdd() {
|
|
270
|
+ this.addInfo.show = true;
|
|
271
|
+ this.addInfo.areaname = "";
|
|
272
|
+ this.addInfo.admin = "";
|
|
273
|
+ this.addInfo.loginname = "";
|
|
274
|
+ this.addInfo.pwd = "";
|
|
275
|
+ this.addInfo.pwd1 = "";
|
|
276
|
+ this.addInfo.phone = "";
|
|
277
|
+ this.addInfo.code = "";
|
|
278
|
+ },
|
|
279
|
+ // 保存新建
|
|
280
|
+ saveAddInfo() {
|
|
281
|
+ this.addInfo.show = false;
|
|
282
|
+ },
|
|
283
|
+ // 进入
|
158
|
284
|
toEnter() {},
|
|
285
|
+ // 查看
|
159
|
286
|
toView() {},
|
|
287
|
+ // 编辑
|
160
|
288
|
toEdit() {},
|
|
289
|
+ // 删除
|
161
|
290
|
toDel() {}
|
162
|
291
|
}
|
163
|
292
|
};
|