baizonghao
2023-05-19 ef85af030be4daed22ad6845e3a248150309438a
src/views/cause/Entry.vue
@@ -41,11 +41,11 @@
          </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 == 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 +70,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 +89,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 +150,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 +194,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,20 +206,21 @@
                  <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"
@@ -229,7 +230,7 @@
                </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>
@@ -274,11 +275,13 @@
            <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="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>
@@ -429,6 +432,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 +816,7 @@
      reportCauseId: null,
      reportTotal: 0,
      reportList: [],
      addAduitDialogVisible: false,
      infoAduitDialogVisible: false,
      causeOptions: [],
      groupAnVisible: false,
      addCauseRules: {
        number: [{
@@ -970,49 +972,46 @@
        },
        {
          value: '0',
          label: '受理中'
          label: '立案'
        },
        {
          value: '1',
          label: '不予立案'
          label: '初查'
        },
        {
          value: '2',
          label: '已立案'
          label: '受理'
        },
        {
          value: '3',
          label: '已结案'
          label: '移送起诉'
        },
        {
          value: '4',
          label: '已撤案'
          label: '结案'
        }
      ],
      causeOptions: [
        {
          value: null,
          label: '全部'
          value: 0,
          label: '立案'
        },
        {
          value: '0',
          label: '未审核'
          value: 1,
          label: '初查'
        },
        {
          value: '1',
          label: '不予立案'
          value: 2,
          label: '受理'
        },
        {
          value: '2',
          label: '受理中'
          value: 3,
          label: '移送起诉'
        },
        {
          value: '3',
          label: '已结案'
        },
        {
          value: '4',
          label: '已撤案'
          value: 4,
          label: '结案'
        }
      ],
      total: null,
@@ -1091,6 +1090,9 @@
  },
  methods:
  {
    expExcel(){
    },
    addAduitAnJian(){
      let date=(new Date()).valueOf();//获取时间戳
      let txt = '1234567890';//生成的随机机器码
@@ -1212,7 +1214,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' })
@@ -1346,25 +1348,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
    },
@@ -1418,21 +1420,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 => {
@@ -1441,21 +1443,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();