| | |
| | | <el-row :gutter="2" style="height: 2.2rem"> |
| | | <el-col :span="3"> |
| | | <el-form-item label="ç»å½è´¦å·:"> |
| | | <span style="font-size: 1rem; font-weight: bold">dsfuis</span> |
| | | <span style="font-size: 1rem; font-weight: bold">{{ |
| | | userInfo.userName |
| | | }}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="3" |
| | |
| | | </template> |
| | | <el-input |
| | | size="small" |
| | | v-model="form.name" |
| | | v-model="form.userName" |
| | | placeholder="请è¾å
¥" |
| | | style="width: 18.375rem" |
| | | /> |
| | |
| | | > |
| | | </template> |
| | | <el-input |
| | | v-model="form.name" |
| | | v-model="form.phoneNo" |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | style="width: 18.375rem" |
| | |
| | | action="#" |
| | | list-type="picture-card" |
| | | :auto-upload="false" |
| | | :limit="3" |
| | | > |
| | | <el-icon><Plus /></el-icon> |
| | | |
| | |
| | | <template #title> |
| | | <div style="font-size: 1.25rem; font-weight: bold">å¯ç ä¿®æ¹</div> |
| | | </template> |
| | | <el-form :model="form"> |
| | | <el-form :model="Passwordform" ref="PasswordformRef" :rules="rules"> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="form.name" |
| | | v-model="Passwordform.oldPwd" |
| | | autocomplete="off" |
| | | placeholder="请è¾å
¥åå¯ç " |
| | | style="width: 21.25rem; height: 2.8125rem; font-size: 1rem" |
| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="form.name" |
| | | v-model="Passwordform.newPwd" |
| | | autocomplete="off" |
| | | placeholder="请è¾å
¥æ°å¯ç " |
| | | style="width: 21.25rem; height: 2.8125rem; font-size: 1rem" |
| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="form.name" |
| | | v-model="newPwd" |
| | | autocomplete="off" |
| | | placeholder="确认å¯ç " |
| | | style="width: 21.25rem; height: 2.8125rem; font-size: 1rem" |
| | |
| | | style="display: flex; justify-content: center" |
| | | > |
| | | <el-button |
| | | @click="dialogVisible = false" |
| | | @click="clickPassword(PasswordformRef)" |
| | | type="primary" |
| | | style=" |
| | | width: 21.25rem; |
| | |
| | | </template> |
| | | <script setup> |
| | | import { ref, reactive } from "vue"; |
| | | import { GetUserInfo, UpdatePassword, UpdateUser } from "@/api/user"; |
| | | import { ElMessage } from "element-plus"; |
| | | const formInline = reactive({ |
| | | user: "", |
| | | region: "", |
| | | date: "", |
| | | }); |
| | | const form = reactive({ |
| | | name: "", |
| | | region: "", |
| | | date1: "", |
| | | date2: "", |
| | | delivery: false, |
| | | type: [], |
| | | resource: "", |
| | | desc: "", |
| | | }); |
| | | |
| | | const form = ref({}); |
| | | const newPwd = ref(""); |
| | | const onSubmit = () => { |
| | | // UpdateUser().then((res) => {}); |
| | | console.log(form.value); |
| | | |
| | | console.log("submit!"); |
| | | }; |
| | | const rules = reactive({ |
| | | oldPwd: [{ required: true, message: "请è¾å
¥æ§å¯ç ", trigger: "blur" }], |
| | | newPwd: [{ required: true, message: "请è¾å
¥æ°å¯ç ", trigger: "blur" }], |
| | | }); |
| | | const PasswordformRef = ref(); |
| | | const Passwordform = ref({ |
| | | oldPwd: "", |
| | | newPwd: "", |
| | | }); |
| | | const clickPassword = async (formEl) => { |
| | | if (!formEl) return; |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | UpdatePassword(Passwordform.value).then((res) => { |
| | | ElMessage({ |
| | | message: "ä¿®æ¹æå", |
| | | type: "success", |
| | | }); |
| | | console.log(res); |
| | | }); |
| | | } else { |
| | | console.log("error submit!", fields); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const userInfo = ref({}); |
| | | GetUserInfo({}).then((res) => { |
| | | userInfo.value = res.data; |
| | | form.value = res.data; |
| | | console.log(res); |
| | | }); |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .personal { |