微信小程序
This commit is contained in:
parent
5f5eac6d84
commit
8e2e810e69
|
@ -234,10 +234,10 @@
|
|||
</form-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<form-col :span="12" v-if="form.userId == undefined" label="用户账号" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
|
||||
<form-col :span="12" label="登录账号" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入登录账号" maxlength="30" />
|
||||
</form-col>
|
||||
<form-col :span="12" v-if="form.userId == undefined" label="用户密码" prop="password">
|
||||
<form-col :span="12" label="登录密码" prop="password" v-if="form.userId == null">
|
||||
<el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password/>
|
||||
</form-col>
|
||||
<form-col :span="12" label="账号状态" prop="status">
|
||||
|
@ -258,12 +258,12 @@
|
|||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</form-col>
|
||||
<form-col :span="12" label="手机号码" prop="phonenumber">
|
||||
<el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
|
||||
</form-col>
|
||||
<form-col :span="12" label="邮箱" prop="email">
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
||||
</form-col>
|
||||
<!-- <form-col :span="12" label="手机号码" prop="phonenumber">-->
|
||||
<!-- <el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />-->
|
||||
<!-- </form-col>-->
|
||||
<!-- <form-col :span="12" label="邮箱" prop="email">-->
|
||||
<!-- <el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />-->
|
||||
<!-- </form-col>-->
|
||||
<form-col :span="12" label="出生日期" prop="birthday">
|
||||
<el-date-picker style="width: 100%" clearable v-model="form.birthday" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"/>
|
||||
</form-col>
|
||||
|
@ -291,34 +291,13 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
|
||||
</div>
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<import-dialog
|
||||
:visible.sync="upload.open"
|
||||
template-url="/system/user/importTemplate"
|
||||
url="/system/user/importData"
|
||||
@success="getList"
|
||||
template-name="用户导入模板"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -331,12 +310,13 @@ import FormCol from "@/components/FormCol/index.vue";
|
|||
import {$showColumns} from "@/utils/mixins";
|
||||
import {calcBirthDay, calcFullYear} from "@/utils/date";
|
||||
import {parseTime} from "@/utils/ruoyi";
|
||||
import ImportDialog from "@/components/ImportDialog/index.vue";
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
mixins: [$showColumns],
|
||||
dicts: ['sys_normal_disable', 'sys_user_sex', 'user_employ_status'],
|
||||
components: {FormCol, Treeselect },
|
||||
components: {ImportDialog, FormCol, Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 排序方式
|
||||
|
@ -418,10 +398,17 @@ export default {
|
|||
],
|
||||
// 表单校验
|
||||
rules: {
|
||||
userNo: [
|
||||
{ required: true, message: "工号不能为空", trigger: "blur" }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: "用户名称不能为空", trigger: "blur" },
|
||||
{ min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||
],
|
||||
phonenumber: [
|
||||
{ required: true, message: "手机号码不能为空", trigger: "blur" },
|
||||
{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur"}
|
||||
],
|
||||
deptId: [
|
||||
{ required: true, message: "归属部门不能为空", trigger: "blur" }
|
||||
],
|
||||
|
@ -434,19 +421,8 @@ export default {
|
|||
{ pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }
|
||||
],
|
||||
email: [
|
||||
{
|
||||
type: "email",
|
||||
message: "请输入正确的邮箱地址",
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
{type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"]}
|
||||
],
|
||||
phonenumber: [
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -511,7 +487,7 @@ export default {
|
|||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
userId: undefined,
|
||||
userId: null,
|
||||
deptId: undefined,
|
||||
userName: undefined,
|
||||
nickName: undefined,
|
||||
|
|
|
@ -324,6 +324,7 @@
|
|||
template-url="/yh/price/importTemplate"
|
||||
url="/yh/price/importData"
|
||||
@success="getList"
|
||||
template-name="单价导入模板"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue
Block a user