| | |
| | | <el-button type="primary" @click="search">查询</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="addAduitDialogVisible = true">添加</el-button> |
| | | <el-button type="primary" @click="addAduitAnJian">添加</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item prop="reportTime" label="报案时间"> |
| | | <el-date-picker v-model="updateReportForm.reportTime" type="datetime" placeholder="选择日期时间" clearable |
| | |
| | | }, |
| | | methods: |
| | | { |
| | | addAduitAnJian(){ |
| | | let date=(new Date()).valueOf();//获取时间戳 |
| | | let txt = '1234567890';//生成的随机机器码 |
| | | let len =13;//机器码有多少位 |
| | | let pwd = '';//定义空变量用来接收机器码 |
| | | for (let i = 0; i < len; i++) { |
| | | pwd += txt.charAt(Math.floor(Math.random() * txt.length));//循环机器码位数随机填充 |
| | | } |
| | | let id= date+pwd; |
| | | this.causeForm.number=id; |
| | | this.addAduitDialogVisible=true; |
| | | }, |
| | | |
| | | //关闭案件的案件人员添加 |
| | | addReportVisibleClose() { |
| | |
| | | this.updateReportPrams.groupId = this.updateReportForm.groupId |
| | | this.updateReportPrams.id = this.updateReportForm.id |
| | | this.updateReportPrams.reportMaterials = this.updateReportPrams.fileList.map(i => i.data).join(',') |
| | | |
| | | |
| | | this.updateReportPrams.pic=this.updateReportForm.pic |
| | | let form = null; |
| | | form = this.updateReportPrams; |
| | |
| | | } else { |
| | | this.$message({ |
| | | type: "error", |
| | | message: "表单不能为空" |
| | | message: res.data.msg |
| | | }) |
| | | } |
| | | } |
| | |
| | | ::v-deep(.el-table thead) { |
| | | color: #000000; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <!--审核弹窗--> |
| | | <el-dialog title="审核" :visible.sync="checkVisible" width="50%" :before-close="infoAduitClose"> |
| | | <el-row :gutter="15"> |
| | | <el-form ref="infoAduitForm" :model="auditInfo" size="medium" label-width="100px"> |
| | | <el-form ref="infoAduitForm" :rules="rules2" :model="auditInfo" size="medium" label-width="100px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="头像" prop="pic" required> |
| | | <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess" |
| | |
| | | tmpTime: '', |
| | | }, |
| | | auditInfo: {}, |
| | | |
| | | picShow: "", |
| | | reportData: [], |
| | | optionsGroup: [ |
| | |
| | | trigger: 'change' |
| | | }], |
| | | }, |
| | | rules2:{ |
| | | causeId: [ |
| | | { required: true, message: '请选择活动区域', trigger: 'change' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | checkAdd() { |
| | | let form = null; |
| | | form = this.auditInfo; |
| | | checkPass(form).then(res => { |
| | | this.$message.success('提交成功') |
| | | this.getList() |
| | | this.checkVisible = false; |
| | | this.$refs.infoAduitForm.validate((valid)=>{ |
| | | if(valid){ |
| | | checkPass(form).then(res => { |
| | | this.$message.success('提交成功') |
| | | this.getList() |
| | | this.checkVisible = false; |
| | | }) |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | }) |
| | | |
| | | }, |
| | | //审核 |
| | | check(val) { |
| | |
| | | if (item === '' || item === null) { |
| | | // this.reportData.push('./logo.jpg'); |
| | | } else { |
| | | this.reportData=[]; |
| | | getImgUrl(item).then(res => { |
| | | this.reportData.push(res); |
| | | }) |
| | |
| | | <el-table-column label="操作" align="conter"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="medium" @click="details(scope.row)">编辑</el-button> |
| | | <el-button type="text" size="medium" @click="reset(scope.row.id)">重置密码</el-button> |
| | | <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">删除 |
| | | <!-- <el-button type="text" size="medium" @click="reset(scope.row.id)">重置密码</el-button>--> |
| | | <!-- <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">删除--> |
| | | <el-button type="text" size="medium" @click="updateStatus(scope.row.id,scope.row.status)">{{scope.row.status==1?"禁用":"启用"}} |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | }, |
| | | methods: |
| | | { |
| | | //删除 |
| | | remove(val) { |
| | | //更新用户状态 |
| | | updateStatus(id,status) { |
| | | var _this = this; |
| | | this.$confirm('确认删除?').then(() => { |
| | | _this.$http.delete('/api/user', { params: { id: val } }).then(res => { |
| | | this.$confirm('确认修改账户状态吗?').then(() => { |
| | | _this.$http.get('/api/user/status', { params: { id: id ,status:status} }).then(res => { |
| | | _this.$message({ |
| | | message: '删除成功', |
| | | message: '修改成功', |
| | | type: 'success' |
| | | }) |
| | | this.search(); |
| | |
| | | ::v-deep(.el-table thead) { |
| | | color: #000000; |
| | | } |
| | | </style> |
| | | </style> |