baizonghao
2023-05-25 3c4d54bcb66d7cec4a35defc999250e200b4fdd2
src/views/cause/Entry.vue
@@ -16,13 +16,13 @@
            <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-upload name="multipartFile" class="upload-demo" action="/api/cause/upload " :show-file-list="false"
              :before-upload="beforeAvatarUpload" :on-success="respond" :limit="1">
              <el-button type="primary">导入</el-button>
<!--              <el-button type="primary">导入</el-button>-->
            </el-upload>
          </el-form-item>
        </el-form>
@@ -41,11 +41,12 @@
          </el-table-column>
          <el-table-column prop="status" label="案件状态" width="110" header-align="center" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.status == 0">受理中</span>
              <span v-if="scope.row.status == 1">不予立案</span>
              <span v-if="scope.row.status == 2">以立案</span>
              <span v-if="scope.row.status == 3">已结案</span>
              <span v-if="scope.row.status == 4">已立案</span>
              <span v-if="scope.row.status == 5">不予立案</span>
              <span v-if="scope.row.status == 0">立案</span>
              <span v-if="scope.row.status == 1">初查</span>
              <span v-if="scope.row.status == 2">受理</span>
              <span v-if="scope.row.status == 3">移送起诉</span>
              <span v-if="scope.row.status == 4">结案</span>
            </template>
          </el-table-column>
          <el-table-column prop="userName" label="负责人" width="130" header-align="center" align="center">
@@ -70,7 +71,7 @@
    <!--添加案件弹窗-->
    <el-dialog title="添加案件" :visible.sync="addAduitDialogVisible" :before-close="addAduitClose">
      <el-row :gutter="15">
        <el-form ref="causeForm" :model="causeForm" :rules="addCauseRules" size="medium" label-width="100px">
        <el-form ref="causeForm" :model="causeForm" :rules="addCauseRules" size="medium" label-width="140px">
          <el-col :span="12">
            <el-form-item label="案件编号 " prop="number">
              <el-input v-model="causeForm.number" clearable :style="{ width: '100%' }" placeholder="输入案件编号">
@@ -89,10 +90,10 @@
                placeholder="输入预估总金额"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="最早发案" prop="firstTime">
          <el-col :span="24">
            <el-form-item label="最早发案时间" prop="firstTime">
              <el-date-picker v-model="causeForm.firstTime" type="datetime" placeholder="选择日期时间" clearable
                :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
                :style="{ width: '40%' }" value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker>
            </el-form-item>
          </el-col>
@@ -150,7 +151,7 @@
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="最发早案时间" prop="firstTime">
            <el-form-item label="最早发案时间" prop="firstTime">
              <el-date-picker v-model="updataCauseForm.firstTime" type="datetime" placeholder="选择日期时间"
                :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker>
@@ -194,7 +195,7 @@
          <template slot="header">
            <el-form :inline="true" :model="queryInfoReport" class="demo-form-inline">
              <el-form-item label="报案人:">
                <el-input placeholder="请输入姓名或身份证" v-model="queryInfoReport.people" :style="{ width: '180px' }">
                <el-input placeholder="请输入姓名" v-model="queryInfoReport.people" :style="{ width: '180px' }">
                </el-input>
              </el-form-item>
              <el-form-item label="手机号码:">
@@ -206,30 +207,31 @@
                  <el-option v-for="item in optionsGroup" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
<!--              </el-form-item>-->
              <el-form-item label="报案材料:">
                <el-select v-model="queryInfoReport.HavaMaterial" :style="{ width: '100px' }">
                  <el-option v-for="item in optionsMate" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
<!--              <el-form-item label="报案材料:">-->
<!--                <el-select v-model="queryInfoReport.HavaMaterial" :style="{ width: '100px' }">-->
<!--                  <el-option v-for="item in optionsMate" :key="item.value" :label="item.label" :value="item.value">-->
<!--                  </el-option>-->
<!--                </el-select>-->
<!--              </el-form-item>-->
              <el-form-item>
<!--              <el-form-item>-->
                <el-button type="primary" @click="searchByCondition">查询</el-button>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="addVisibelReport">添加</el-button>
                <el-button type="primary" @click="exportExcel">导出</el-button>
              </el-form-item>
              <el-form-item>
                <el-upload name="multipartFile" class="upload-demo" action="/api/cause/reporterUpload"
                  :show-file-list="false" :data="{ causeId: this.reportCauseId }" :before-upload="beforeAvatarUpload"
                  :on-success="reporterRespond" :limit="1">
                  <el-button type="primary">导入</el-button>
<!--                  <el-button type="primary">导入</el-button>-->
                </el-upload>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="exportExcel">报案材料导出</el-button>
<!--                <el-button type="primary" @click="exportExcel">报案材料导出</el-button>-->
              </el-form-item>
            </el-form>
@@ -266,19 +268,21 @@
}}</span>
              </template>
            </el-table-column>
            <el-table-column width="200" prop="ctime" label="报案时间">
            <el-table-column width="200" prop="reportTime" label="报案时间">
              <template slot-scope="scope">
                <span>{{ scope.row.ctime === null ? "2022-07-12 10:32:56" : scope.row.ctime }}</span>
                <span>{{ scope.row.reportTime === null ? "2022-07-12 10:32:56" : scope.row.reportTime }}</span>
              </template>
            </el-table-column>
            <el-table-column label="操作">
              <template slot-scope="scope">
                <el-button type="text" size="medium" @click="updataReport(scope.row)">编辑</el-button>
                <el-button type="text" size="medium"
                  @click="leaveReport(scope.row.id, scope.row.causeId, scope.row.groupId)" style="color:#ff0000"
                  :disabled="scope.row.isInGroup == 0">退群 </el-button>
<!--                <el-button type="text" size="medium" @click="updataReport(scope.row)">编辑</el-button>-->
<!--                <el-button type="text" size="medium"-->
<!--                  @click="leaveReport(scope.row.id, scope.row.causeId, scope.row.groupId)" style="color:#ff0000"-->
<!--                  :disabled="scope.row.isInGroup == 0">退群 </el-button>-->
<!--                <el-button type="text" size="medium" @click="removeReport(scope.row.id, scope.row.causeId)"-->
<!--                  style="color:#ff0000" :disabled="scope.row.isInGroup == 1">删除 </el-button>-->
                <el-button type="text" size="medium" @click="removeReport(scope.row.id, scope.row.causeId)"
                  style="color:#ff0000" :disabled="scope.row.isInGroup == 1">删除 </el-button>
                           style="color:#ff0000" >删除 </el-button>
              </template>
            </el-table-column>
          </el-table>
@@ -392,14 +396,14 @@
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
              <!-- <el-col :span="12">
                <el-form-item prop="reportTime" label="报案时间">
                  <el-date-picker v-model="updateReportForm.reportTime" type="datetime" placeholder="选择日期时间" clearable
                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              </el-col> -->
              <el-col :span="12">
                <el-form-item label="被骗时间" prop="cheatTime">
                  <el-date-picker v-model="updateReportForm.cheatTime" type="datetime" placeholder="选择日期时间" clearable
@@ -429,6 +433,7 @@
                <el-form-item label="上传" prop="fileList" required>
                  <el-upload ref="reportMaterials" :file-list="updateReportForm.fileList" action="/api/minio/upload"
                    list-type="picture" :on-success="handleReporterMaterialSuccess">
                    <img v-if="updateReportForm.reportMaterials!=''" :src="'/minio/img/'+updateReportForm.reportMaterials" style="width: 145px;height: 145px">
                    <el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
                  </el-upload>
                </el-form-item>
@@ -812,9 +817,7 @@
      reportCauseId: null,
      reportTotal: 0,
      reportList: [],
      addAduitDialogVisible: false,
      infoAduitDialogVisible: false,
      causeOptions: [],
      groupAnVisible: false,
      addCauseRules: {
        number: [{
@@ -969,50 +972,54 @@
          label: '全部'
        },
        {
          value: '0',
          label: '受理中'
        },
        {
          value: '1',
          value: '5',
          label: '不予立案'
        },
        {
          value: '0',
          label: '立案'
        },
        {
          value: '1',
          label: '初查'
        },
        {
          value: '2',
          label: '已立案'
          label: '受理'
        },
        {
          value: '3',
          label: '已结案'
          label: '移送起诉'
        },
        {
          value: '4',
          label: '已撤案'
          label: '结案'
        }
      ],
      causeOptions: [
        {
          value: null,
          label: '全部'
        },
        {
          value: '0',
          label: '未审核'
        },
        {
          value: '1',
          value: '5',
          label: '不予立案'
        },
        {
          value: '2',
          label: '受理中'
          value: 0,
          label: '立案'
        },
        {
          value: '3',
          label: '已结案'
          value: 1,
          label: '初查'
        },
        {
          value: '4',
          label: '已撤案'
          value: 2,
          label: '受理'
        },
        {
          value: 3,
          label: '移送起诉'
        },
        {
          value: 4,
          label: '结案'
        }
      ],
      total: null,
@@ -1091,6 +1098,21 @@
  },
  methods:
  {
    expExcel(){
    },
    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() {
@@ -1200,7 +1222,7 @@
    //案件人员
    //导出文件
    exportExcel() {
      this.$http.post('/api/report/exportReporter?id=' + this.exportReportId, {}, { responseType: 'blob' })
      this.$http.post('/api//cause/exp?causeId=' + this.exportReportId, {}, { responseType: 'blob' })
        .then(res => {
          const fileName = decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1])
          const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
@@ -1230,7 +1252,7 @@
      this.updateReportPrams.groupId = this.updateReportForm.groupId
      this.updateReportPrams.id = this.updateReportForm.id
      this.updateReportPrams.reportMaterials = this.updateReportPrams.fileList.map(i => i.data).join(',')
      debugger
      this.updateReportPrams.pic=this.updateReportForm.pic
      let form = null;
      form = this.updateReportPrams;
@@ -1249,7 +1271,6 @@
    //编辑案件人员
    updataReport(val) {
      debugger
      this.updateReportVisible = true;
      this.updateReportForm = Object.assign({}, val);
      this.causeId = val.causeId;
@@ -1335,25 +1356,25 @@
    //案件录入相关
    updateCauseDialogVisible(row) {
      this.updateAduitDialogVisible = true,
        this.updataCauseForm = Object.assign({}, row);
      if (this.updataCauseForm.status == 0) {
        this.updataCauseForm.status = '未审核';
      };
      if (this.updataCauseForm.status == 1) {
        this.updataCauseForm.status = '不予立案';
      };
      if (this.updataCauseForm.status == 2) {
        this.updataCauseForm.status = '受理中';
      };
      if (this.updataCauseForm.status == 3) {
        this.updataCauseForm.status = '已结案';
      };
      if (this.updataCauseForm.status == 4) {
        this.updataCauseForm.status = '已撤案';
      };
    }
    ,
      this.updateAduitDialogVisible = true;
      this.updataCauseForm = Object.assign({}, row);
      // if (this.updataCauseForm.status == 0) {
      //   this.updataCauseForm.status = '未审核';
      // };
      // if (this.updataCauseForm.status == 1) {
      //   this.updataCauseForm.status = '不予立案';
      // };
      // if (this.updataCauseForm.status == 2) {
      //   this.updataCauseForm.status = '受理中';
      // };
      // if (this.updataCauseForm.status == 3) {
      //   this.updataCauseForm.status = '已结案';
      // };
      // if (this.updataCauseForm.status == 4) {
      //   this.updataCauseForm.status = '已撤案';
      // };
    },
    addAduitClose() {
      this.addAduitDialogVisible = false
    },
@@ -1383,7 +1404,7 @@
          } else {
            this.$message({
              type: "error",
              message: "表单不能为空"
              message: res.data.msg
            })
          }
        }
@@ -1407,21 +1428,21 @@
          data.userId = this.user[key].userId;
        }
      }
      if (data.status == '未审核') {
        data.status = 0;
      }
      if (data.status == '不予立案') {
        data.status = 1;
      }
      if (data.status == '受理中') {
        data.status = 2;
      }
      if (data.status == '已结案') {
        data.status = 3;
      }
      if (data.status == '已撤案') {
        data.status = 4;
      }
      // if (data.status == '未审核') {
      //   data.status = 0;
      // }
      // if (data.status == '不予立案') {
      //   data.status = 1;
      // }
      // if (data.status == '受理中') {
      //   data.status = 2;
      // }
      // if (data.status == '已结案') {
      //   data.status = 3;
      // }
      // if (data.status == '已撤案') {
      //   data.status = 4;
      // }
      this.$http.put('/api/cause/updateCause?id=' + data.id,
        data
      ).then(res => {
@@ -1430,21 +1451,21 @@
            type: "success",
            message: "修改成功"
          });
          if (this.updataCauseForm.status == 0) {
            this.updataCauseForm.status = '未审核';
          };
          if (this.updataCauseForm.status == 1) {
            this.updataCauseForm.status = '不予立案';
          };
          if (this.updataCauseForm.status == 2) {
            this.updataCauseForm.status = '受理中';
          };
          if (this.updataCauseForm.status == 3) {
            this.updataCauseForm.status = '已结案';
          };
          if (this.updataCauseForm.status == 4) {
            this.updataCauseForm.status = '已撤案';
          };
          // if (this.updataCauseForm.status == 0) {
          //   this.updataCauseForm.status = '未审核';
          // };
          // if (this.updataCauseForm.status == 1) {
          //   this.updataCauseForm.status = '不予立案';
          // };
          // if (this.updataCauseForm.status == 2) {
          //   this.updataCauseForm.status = '受理中';
          // };
          // if (this.updataCauseForm.status == 3) {
          //   this.updataCauseForm.status = '已结案';
          // };
          // if (this.updataCauseForm.status == 4) {
          //   this.updataCauseForm.status = '已撤案';
          // };
          this.updateAduitDialogVisible = false;
          // location.reload();
          this.getList();
@@ -1608,4 +1629,4 @@
::v-deep(.el-table thead) {
  color: #000000;
}
</style>
</style>