1.屏蔽新增用户按钮,调整表单校验

master
x_z 3 years ago
parent aaa6c804a1
commit 02806afe41

@ -28,11 +28,12 @@
@click="onReset" @click="onReset"
></el-button> ></el-button>
<el-button type="primary" icon="search" @click="onSubmit" <el-button type="primary" icon="search" @click="onSubmit"
>查询</el-button >查询
</el-button
> >
<el-button type="primary" @click.native="handleForm(null, null)" <!--<el-button type="primary" @click.native="handleForm(null, null)"
>新增</el-button >新增</el-button
> >-->
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -44,7 +45,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.userFlag | statusFilterType">{{ <el-tag :type="scope.row.userFlag | statusFilterType">{{
scope.row.userFlag | statusFilterName scope.row.userFlag | statusFilterName
}}</el-tag> }}
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="comments" fixed></el-table-column> <el-table-column label="备注" prop="comments" fixed></el-table-column>
@ -157,7 +159,8 @@
v-for="item in roles" v-for="item in roles"
:key="item.id" :key="item.id"
:label="item.id" :label="item.id"
>{{ item.name }}</el-checkbox >{{ item.name }}
</el-checkbox
> >
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
@ -169,7 +172,8 @@
size="small" size="small"
@click.native="formSubmit()" @click.native="formSubmit()"
:loading="formLoading" :loading="formLoading"
>提交</el-button >提交
</el-button
> >
</div> </div>
</el-dialog> </el-dialog>
@ -179,13 +183,12 @@
<script> <script>
import { import {
authAdminList, authAdminList,
authAdminRoleList,
authAdminSave, authAdminSave,
authAdminDelete, authAdminDelete,
roleCustomers roleCustomers
} from "../../../api/auth/authAdmin"; } from "../../../api/auth/authAdmin";
import store from "../../../store/index"; import store from "../../../store/index";
const formJson = { const formJson = {
id: "", id: "",
passWord: "", passWord: "",
@ -350,13 +353,7 @@
} }
}, },
formSubmit() { formSubmit() {
console.log( this.$refs["formData"].validate(valid => {
this.formData.userName +
"-----" +
this.formData.employeeName +
this.formData.userFlag
);
this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
this.formLoading = true; this.formLoading = true;
let data = Object.assign({}, this.formData); let data = Object.assign({}, this.formData);
@ -431,7 +428,8 @@
return statusMap[status]; return statusMap[status];
} }
}, },
mounted() {}, mounted() {
},
created() { created() {
// //
let query = this.$route.query; let query = this.$route.query;

Loading…
Cancel
Save