| | |
| | | data
|
| | | })
|
| | | }
|
| | | export function SelectPassword() {
|
| | | return request({
|
| | | url: '/home/SelectPassword',
|
| | | method: 'get',
|
| | | data :""
|
| | | })
|
| | | }
|
| | | export function home2(data) {
|
| | | return request({
|
| | | url: '/home/loads',
|
| | |
| | | }) |
| | | } |
| | | |
| | | export function yanzhengmima(data) { |
| | | return request({ |
| | | url: '/api/user/verifyPassword', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 注册 |
| | |
| | | "Are you sure to perform this operation ?":"Are you sure to perform this operation ?",
|
| | | "prompt":"prompt",
|
| | | "Yes":"Yes",
|
| | | "No":"No"
|
| | | "No":"No",
|
| | | "ElectricalPassword":"ElectricalPassword"
|
| | |
|
| | | } |
| | |
| | | "alarmid": "id",
|
| | | "alacontent": "报警内容",
|
| | | "time-on": "开始时间",
|
| | | "End-Time": "结束时间"
|
| | | "End-Time": "结束时间",
|
| | | "ElectricalPassword":"电气密码"
|
| | | } |
| | |
| | | background-color="#222f3e" text-color="#fff" active-text-color="#ffd04b" |
| | | :collapse="isCollapse" :unique-opened="true" |
| | | :collapse-transition="false" :router="true"> |
| | | <!-- <el-menu-item index="/" @click="goToHome"> |
| | | <!-- <el-menu-item index="/" @click="youhua"> |
| | | <template slot="title"> |
| | | |
| | | <i class="el-icon-menu"></i> |
| | | |
| | | <span>{{ $t('home') }}</span> |
| | | <span>优化</span> |
| | | </template> |
| | | </el-menu-item> --> |
| | | <!--一级菜单--> |
| | |
| | | goToHome() { |
| | | this.$router.push('/home'); |
| | | }, |
| | | youhua() { |
| | | this.$router.push('/device/talk'); |
| | | }, |
| | | ...mapMutations('tags', ['addTag', 'removeTag', 'switchTag']), |
| | | addTag(router) { |
| | | let submenuItem; |
| | |
| | | path: '/home', |
| | | component: () => import('../views/home') |
| | | }, |
| | | |
| | | |
| | | |
| | | { |
| | |
| | | component: () => import('../views/device/parameter'), |
| | | |
| | | }, |
| | | { |
| | | path: '/device/talk', |
| | | component: () => import('../views/device/talkvue'), |
| | | |
| | | }, |
| | | |
| | | { |
| | | path: '/device/alarm', |
| | | component: () => import('../views/device/alarm') |
| | |
| | | path: '/device/iostate', |
| | | component: () => import('../views/device/iostate') |
| | | }, |
| | | { |
| | | path: '/device/talkvue', |
| | | component: () => import('../views/device/talkvue') |
| | | }, |
| | | |
| | | { |
| | | path: '/device/control', |
| | | component: () => import('../views/device/control') |
| | |
| | | </template> |
| | | |
| | | <script > |
| | | import { SelectPassword } from "../../api/home"; |
| | | import LanguageMixin from '../../lang/LanguageMixin' |
| | | let socket; |
| | | export default { |
| | |
| | | }, |
| | | created () { |
| | | this.init(); |
| | | SelectPassword().then(res => { |
| | | this.password = res.data.password; |
| | | }); |
| | | this.$prompt(this.$t('Are you sure to perform this operation?'), this.$t('prompt'), { |
| | | inputType: 'password', |
| | | inputPlaceholder: this.$t('Please enter the password'), |
| | | confirmButtonText: this.$t('Yes'), |
| | | cancelButtonText: this.$t('No'), |
| | | type: 'warning' |
| | | }).then(({ value }) => { |
| | | if (this.password === value) { |
| | | // 密码正确,执行相应操作 |
| | | } else { |
| | | this.$message.success(this.$t('Password error')); // 密码错误 |
| | | } |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: this.$t('Operation canceled') |
| | | }); |
| | | }); |
| | | }, |
| | | methods: { |
| | | setActiveButton(buttonName) { |
| | |
| | |
|
| | | </div>
|
| | | </el-form>
|
| | |
|
| | | <div>
|
| | | |
| | | </div>
|
| | | </div>
|
| | |
|
| | |
|
| | | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { SelectPassword } from "../../api/home";
|
| | |
|
| | | let socket;
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | export default {
|
| | |
| | | mixins: [LanguageMixin],
|
| | | data () {
|
| | | return {
|
| | | dialogVisible: true,
|
| | | password: '',
|
| | | activeButton: '',
|
| | | record: {
|
| | | params: [100, 200, 10, 10, 10, 10],
|
| | |
| | | created () {
|
| | | this.initWebSocket();
|
| | | this.isButtonDisabled = true;
|
| | | SelectPassword().then(res => {
|
| | | this.password = res.data.password;
|
| | | });
|
| | | this.$prompt(this.$t('Are you sure to perform this operation?'), this.$t('prompt'), {
|
| | | inputType: 'password',
|
| | | inputPlaceholder: this.$t('Please enter the password'),
|
| | | confirmButtonText: this.$t('Yes'),
|
| | | cancelButtonText: this.$t('No'),
|
| | | type: 'warning'
|
| | | }).then(({ value }) => {
|
| | | if (this.password === value) {
|
| | | // 密码正确,执行相应操作
|
| | | } else {
|
| | | this.$message.success(this.$t('Password error')); // 密码错误
|
| | | }
|
| | | }).catch(() => {
|
| | | this.$message({
|
| | | type: 'info',
|
| | | message: this.$t('Operation canceled')
|
| | | });
|
| | | });
|
| | | |
| | | },
|
| | | methods: {
|
| | | |
| | | |
| | | |
| | | setActiveButton(buttonName) {
|
| | | this.activeButton = buttonName;
|
| | | },
|
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('ElectricalPassword')" prop="dianqimima"> |
| | | <el-input v-model="editUserForm.dianqimima"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="editDialogVisible = false">{{ $t('langCancel') }}</el-button> |
| | |
| | | password: [ |
| | | { required: true, message: '请输入密码', trigger: 'blur' }, |
| | | { min: 5, max: 15, message: '长度在 5 到 15 个字符', trigger: 'blur' } |
| | | ], |
| | | email: [ |
| | | { required: true, message: '请输入邮箱', trigger: 'blur' }, |
| | | { type: 'email', message: '请输入正确格式的邮箱地址', trigger: 'blur' } |
| | | ] |
| | | |
| | | }, |
| | | // 控制添加用户弹框的显示和隐藏 |
| | | addDialogVisible: false, |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "登录") |
| | | @CrossOrigin(origins = "http://localhost:8080", allowCredentials = "true") |
| | | |
| | | @PostMapping("/login") |
| | | public Result login(@RequestBody UserVo userVO) { |
| | | ValidatorUtil.validateEntity(userVO); |
| | |
| | | |
| | | private class UpdatePasswordRequest { |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @NotBlank(message = "密码不能为空") |
| | | @ApiModelProperty("密码") |
| | | private String password; |
| | | @NotBlank(message = "邮箱不能为空") |
| | | @Email(message = "邮箱格式不正确") |
| | | |
| | | @ApiModelProperty("邮箱") |
| | | private String email; |
| | | @ApiModelProperty("qq") |
| | | private String qq; |
| | | @ApiModelProperty("电气密码") |
| | | private String dianqimima; |
| | | @ApiModelProperty("联系电话") |
| | | private String phone; |
| | | @ApiModelProperty("状态 0/禁止 1/正常") |
| | |
| | | private Object data; |
| | | |
| | | |
| | | |
| | | |
| | | public static Result success(Object data) { |
| | | Result result = new Result(); |
| | | result.setCode(1); |
| | |
| | | private String username; |
| | | @NotBlank(message = "密码不能为空") |
| | | private String password; |
| | | private String dianqimima; |
| | | private String email; |
| | | private String qq; |
| | | private String phone; |
| | |
| | | private Date createTime; |
| | | private Date updateTime; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | List<Long> selectChild(Long id, Boolean bool); |
| | | |
| | | User getByDianqimima(String newPassword); |
| | | } |
| | |
| | | public User selectByUsername(String username) { |
| | | return lambdaQuery().select(User::getId, User::getRoleId, User::getUsername, User::getPassword, User::getState).eq(User::getUsername, username).one(); |
| | | } |
| | | |
| | | public User getByDianqimima(String newPassword) { |
| | | return lambdaQuery().select(User::getPassword).one(); |
| | | } |
| | | public User getByUser(String admin) { |
| | | return lambdaQuery().select(User::getUsername).one(); |
| | | } |
| | | public Integer countByUsername(String username) { |
| | | return lambdaQuery().eq(User::getUsername, username).count(); |
| | | } |
| | |
| | | u.qq qq, |
| | | u.phone phone, |
| | | u.state state, |
| | | u.dianqimima dianqimima, |
| | | u.create_time createTime |
| | | from user u |
| | | <where> |