shiyue
2023-02-16 39da98555350150352419d634b99306b712aa279
2023-02-16更新
3个文件已修改
64 ■■■■ 已修改文件
src/views/cause/Entry.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/Audit.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/manager/User.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/cause/Entry.vue
@@ -16,7 +16,7 @@
            <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>
@@ -392,7 +392,7 @@
                  </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
@@ -1091,6 +1091,18 @@
  },
  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() {
@@ -1230,7 +1242,7 @@
      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;
@@ -1382,7 +1394,7 @@
          } else {
            this.$message({
              type: "error",
              message: "表单不能为空"
              message: res.data.msg
            })
          }
        }
@@ -1607,4 +1619,4 @@
::v-deep(.el-table thead) {
  color: #000000;
}
</style>
</style>
src/views/common/Audit.vue
@@ -165,7 +165,7 @@
    <!--审核弹窗-->
    <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"
@@ -347,6 +347,7 @@
        tmpTime: '',
      },
      auditInfo: {},
      picShow: "",
      reportData: [],
      optionsGroup: [
@@ -433,6 +434,11 @@
          trigger: 'change'
        }],
      },
      rules2:{
        causeId: [
          { required: true, message: '请选择活动区域', trigger: 'change' }
        ]
      }
    }
  },
  created() {
@@ -470,11 +476,19 @@
    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) {
@@ -493,6 +507,7 @@
            if (item === '' || item === null) {
              // this.reportData.push('./logo.jpg');
            } else {
              this.reportData=[];
              getImgUrl(item).then(res => {
                this.reportData.push(res);
              })
src/views/manager/User.vue
@@ -30,8 +30,9 @@
          <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>
@@ -202,13 +203,13 @@
  },
  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();
@@ -329,4 +330,4 @@
::v-deep(.el-table thead) {
  color: #000000;
}
</style>
</style>