| | |
| | | <div v-if="pictureList.length > 0" class="image-box"> |
| | | <div v-for="image in pictureList" :class="{ 'image-box-item': true, 'image-box-item-cover': isShowUpload }"> |
| | | <span v-if="isShowUpload" @click="handleDeletePicture(image)" class="image-delete-icon el-icon-delete"></span> |
| | | <el-image :key="image" class="image-content" :src="image"></el-image> |
| | | <el-image :key="image" class="image-content" :src="image" :preview-src-list="[image]"></el-image> |
| | | </div> |
| | | </div> |
| | | <el-upload |
| | |
| | | <updatePassword /> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="baseInformationVisible" width="35%" title="基本信息" v-if="baseInformationVisible" |
| | | :before-close="handleClose"> |
| | | > |
| | | <el-form :model="info" class="info" label-width="6vw"> |
| | | <el-form-item label="用户ID" min-width="6"> |
| | | <el-input v-model="info.id"></el-input> |
| | |
| | | }, |
| | | { |
| | | label: '视频巡查', |
| | | checked: false, |
| | | checked: true, |
| | | url: '', |
| | | id: '2f' |
| | | }, |
| | | { |
| | | label: '执法管理', |
| | | checked: false, |
| | | checked: true, |
| | | url: '', |
| | | if: '3f', |
| | | }, |
| | |
| | | if (data.id === '1f') { |
| | | window.open('http://cockpit.patstech.net:28081/cockpit/dist/board.html#/share-board/zfu0LsJ9', '_blank'); |
| | | } |
| | | if (data.id === '2f') { |
| | | this.$router.push({path: "/home/video"}) |
| | | } |
| | | |
| | | } |
| | | } |
| | | }; |
| | |
| | | </el-dialog> |
| | | <!-- 编辑 --> |
| | | <el-dialog :visible.sync="dialogEdit" width="60%" title="编辑车辆信息" v-if="dialogEdit" |
| | | :before-close="handleClose"> |
| | | > |
| | | <MyEditLaw v-if="mystatus === 1" @closeDialog="closeDialog" :info="info"></MyEditLaw> |
| | | <MyEditSoil v-else @closeDialog="closeDialog" :info="info"></MyEditSoil> |
| | | </el-dialog> |
| | |
| | | </el-table> |
| | | <!-- 修改页面 --> |
| | | <el-dialog :visible.sync="dialogUpdate" width="45%" :title="updateFlag ? '权限设置' :'查看角色信息'" |
| | | v-if="dialogUpdate" :before-close="handleClose"> |
| | | v-if="dialogUpdate" > |
| | | <updateUser :updateFlag="updateFlag" :userInfo=userInfo |
| | | :getRoleList=" context ? getRoleList : getRoleList" @changeDialog="changeDialog" /> |
| | | </el-dialog> |
| | | <!-- 查看页面 --> |
| | | <el-dialog :visible.sync="dialogView" width="45%" title="查看角色信息" v-if="dialogView" |
| | | :before-close="handleClose"> |
| | | > |
| | | <MyView :userInfo=userInfo @changeDialog="changeDialog" /> |
| | | </el-dialog> |
| | | <!-- tools --> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="启用" min-width="5"> |
| | | <template slot-scope="scope"> |
| | | <template slot-scope="scope" > |
| | | <!-- @change="handleChangeStatus(scope.row)" --> |
| | | <el-switch |
| | | class="switchStyle" |
| | |
| | | <span @click="handleChangeRole(scope.row, 'depart')" |
| | | >修改部门</span |
| | | > |
| | | <span class="line">|</span> |
| | | <span @click="handleChangeStatus(scope.row)">{{scope.row.status === true ?'停用':'启用' }}</span> |
| | | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | // 修改用户状态 |
| | | handleChangeStatus(obj) { |
| | | let { id, status } = obj; |
| | | status == true ? (status = 1) : (status = 0); |
| | | status == true ? (status = 0) : (status = 1); |
| | | this.$axios |
| | | .post(`sccg/admin/updateStatus/` + id + "?status=" + status) |
| | | .then((res) => { |
| | | this.getUserList(); |
| | | }); |
| | | }, |
| | | // 获取用户列表 |
| | |
| | | const checkNewPwd = (rule, value, callback) => { |
| | | if (!value) { |
| | | callback(new Error('新密码不能为空')) |
| | | }else if(value === this.user.password){ |
| | | } else if (value === this.user.password) { |
| | | callback(new Error('新密码不能和旧密码一样')) |
| | | } else { |
| | | callback(); |
| | |
| | | methods: { |
| | | // 提交 |
| | | handleSubmit() { |
| | | const { userInfo,user } = this; |
| | | const { userInfo, user } = this; |
| | | this.$refs.pwd.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios({ |
| | | method:'post', |
| | | url:'sccg/admin/updatePassword', |
| | | data:{ |
| | | newPassword:user.newPwd, |
| | | oldPassword:user.password, |
| | | username:userInfo.username |
| | | method: 'post', |
| | | url: 'sccg/admin/updatePassword', |
| | | data: { |
| | | newPassword: user.newPwd, |
| | | oldPassword: user.password, |
| | | username: userInfo.username |
| | | } |
| | | }) |
| | | .then(res=>{ |
| | | if(res.code === 200){ |
| | | this.$emit('closeDialog',{flag:false}); |
| | | this.$message({ |
| | | type:'success', |
| | | message:'密码修改成功' |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | type:'warning', |
| | | message:res.message |
| | | }) |
| | | } |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.$emit('closeDialog', { flag: false }); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '密码修改成功' |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | |
| | | // 清空表单 |
| | | resetForm() { |
| | | this.$refs.pwd.resetFields(); |
| | | this.$emit('closeDialog',{flag:false}); |
| | | this.$emit('closeDialog', { flag: false }); |
| | | } |
| | | } |
| | | } |