From bed60230e71cbdcfbdefc08be80b885f773502eb Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期三, 27 七月 2022 15:23:35 +0800
Subject: [PATCH] 案件人员修改按钮 导出按钮 退群 删除 查看
---
src/api/common.js | 1
src/views/cause/Entry.vue | 678 ++++++++++++++++++++++++++++++++++++++++++++++----------
src/api/cause.js | 31 ++
3 files changed, 588 insertions(+), 122 deletions(-)
diff --git a/src/api/cause.js b/src/api/cause.js
index e54a1cb..55c26f1 100644
--- a/src/api/cause.js
+++ b/src/api/cause.js
@@ -23,9 +23,40 @@
})
}
+export function removeReport(params) {
+ return request({
+ url: '/report/deleteReporter?id='+params,
+ method: 'delete'
+ })
+}
+
+export function leaveReport(params,row) {
+ return request({
+ url: '/report/leaveGroup?id='+params+'&groupId='+row,
+ method: 'delete'
+ })
+}
+
+
export function user(params) {
return request({
url: '/cause/getManagerList',
method: 'get',
})
+}
+
+export function updataReportCasue(data) {
+ return request({
+ url: '/report/updateReport',
+ method: 'put',
+ data: data
+ })
+}
+
+export function exportReportExcel(params) {
+ return request({
+ url: '/report/exportReporter?id='+params,
+ method: 'post',
+ responseType:'blob'
+ })
}
\ No newline at end of file
diff --git a/src/api/common.js b/src/api/common.js
index 3a514a6..fd002a4 100644
--- a/src/api/common.js
+++ b/src/api/common.js
@@ -8,6 +8,7 @@
})
}
+
export function getImgUrl(val) {
return request({
url: '/minio/getUrl',
diff --git a/src/views/cause/Entry.vue b/src/views/cause/Entry.vue
index 54c4799..e39f3c0 100644
--- a/src/views/cause/Entry.vue
+++ b/src/views/cause/Entry.vue
@@ -53,7 +53,7 @@
<el-table-column label="鎿嶄綔" width="240" header-align="center" align="center">
<template slot-scope="scope">
<el-button type="text" size="medium" @click="updateCauseDialogVisible(scope.row)">缂栬緫</el-button>
- <el-button type="text" size="medium" @click="reporterVisible=true">鎶ユ浜哄憳</el-button>
+ <el-button type="text" size="medium" @click="reporterVisibleBefore(scope.row.id)">鎶ユ浜哄憳</el-button>
<el-button type="text" size="medium" @click="handleAudit(scope.row)">缇ゅ叕鍛�</el-button>
<el-button type="text" size="medium" @click="removeCause(scope.row.id)" style="color:#ff0000">鍒犻櫎
</el-button>
@@ -170,111 +170,232 @@
</span>
</el-dialog>
- <!--淇敼妗堜欢寮圭獥-->
- <el-dialog title="淇敼妗堜欢" :visible.sync="updateAduitDialogVisible" width="50%" :before-close="updateAduitClose">
+ <!--妗堜欢浜哄憳寮圭獥-->
+ <el-dialog title="鎶ユ浜哄憳" :visible.sync="reporterVisible" width="85%" :before-close="reporterVisibleClose">
<el-row :gutter="15">
- <el-form ref="addAduitForm" :model="updataCauseForm" :rules="rules" size="medium" label-width="100px">
- <el-col :span="18">
- <el-form-item label="妗堜欢缂栧彿 " prop="number">
- <el-input v-model="updataCauseForm.number" clearable :style="{ width: '100%' }">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <el-form-item label="妗堜欢鍚嶇О" prop="name">
- <el-input v-model="updataCauseForm.name" clearable :style="{ width: '100%' }">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <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>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <el-form-item label="妗堜欢鐘舵��" prop="status">
- <el-select v-model="updataCauseForm.status" clearable :style="{ width: '100%' }">
- <el-option v-for="item in causeOptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <el-form-item label="璐熻矗浜�" prop="userId">
- <el-select v-model="updataCauseForm.userName" clearable :style="{ width: '100%' }">
- <el-option v-for="item in user" :key="item.userId" :label="item.userName" :value="item.userId"
- :disabled="item.disabled"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <el-form-item label="妗堜欢鎻忚堪" prop="description">
- <el-input v-model="updataCauseForm.description" clearable :style="{ width: '100%', height: '50%' }">
- </el-input>
- </el-form-item>
- </el-col>
- </el-form>
- </el-row>
- <span slot="footer" class="dialog-footer">
- <el-button @click="updateAduitDialogVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="updateCause">纭� 瀹�</el-button>
- </span>
- </el-dialog>
+ <el-card style="height: 100%">
+ <template slot="header">
+ <el-form :inline="true" :model="queryInfoReport" class="demo-form-inline">
+ <el-form-item label="鎶ユ浜猴細">
+ <el-input placeholder="璇疯緭鍏ュ鍚嶆垨韬唤璇�" v-model="queryInfoReport.people"></el-input>
+ </el-form-item>
+ <el-form-item label="鎵嬫満鍙风爜锛�">
+ <el-input placeholder="璇疯緭鍏�" v-model="queryInfoReport.phoneNumber"></el-input>
+ </el-form-item>
+ <el-form-item label="鏄惁宸茶繘缇わ細">
+ <el-select v-model="queryInfoReport.isInGroup" placeholder="璇烽�夋嫨" style="width:50%">
+ <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 label="鎶ユ鏉愭枡锛�">
+ <el-select v-model="queryInfoReport.HavaMaterial" placeholder="璇烽�夋嫨" style="width:50%">
+ <el-option v-for="item in optionsMate" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
-
- <!--妗堜欢浜哄憳寮圭獥-->
- <el-dialog title="鎶ユ浜哄憳" :visible.sync="reporterVisible" width="50%" :before-close="updateAduitClose">
- <el-row :gutter="15">
- <el-form ref="addAduitForm" :model="updataCauseForm" :rules="rules" size="medium" label-width="100px">
- <el-col :span="18">
- <el-form-item label="妗堜欢缂栧彿 " prop="number">
- <el-input v-model="updataCauseForm.number" clearable :style="{ width: '100%' }">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <el-form-item label="妗堜欢鍚嶇О" prop="name">
- <el-input v-model="updataCauseForm.name" clearable :style="{ width: '100%' }">
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <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>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <el-form-item label="妗堜欢鐘舵��" prop="status">
- <el-select v-model="updataCauseForm.status" clearable :style="{ width: '100%' }">
- <el-option v-for="item in causeOptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <el-form-item label="璐熻矗浜�" prop="userId">
- <el-select v-model="updataCauseForm.userName" clearable :style="{ width: '100%' }">
- <el-option v-for="item in user" :key="item.userId" :label="item.userName" :value="item.userId"
- :disabled="item.disabled"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="18">
- <el-form-item label="妗堜欢鎻忚堪" prop="description">
- <el-input v-model="updataCauseForm.description" clearable :style="{ width: '100%', height: '50%' }">
- </el-input>
- </el-form-item>
- </el-col>
- </el-form>
+ <el-form-item>
+ <el-button type="primary" @click="search">鏌ヨ</el-button>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="addAduitDialogOpen">娣诲姞</el-button>
+ </el-form-item>
+ <!-- <el-form-item>
+ <el-button type="primary" @click="exportExcel">瀵煎叆</el-button>
+ </el-form-item> -->
+ <el-form-item>
+ <el-button type="primary" @click="exportExcel">鎶ユ鏉愭枡瀵煎嚭</el-button>
+ </el-form-item>
+
+ </el-form>
+ </template>
+ <el-table :data="reportList">
+ <el-table-column width="80" prop="pic" label="澶村儚">
+ <template slot-scope="scope">
+ <img :src="scope.row.pic" style="width: 40px;height: 40px; border-radius: 50%;">
+ </template>
+ </el-table-column>
+ <el-table-column width="80" prop="userName" label="鎶ユ浜�"></el-table-column>
+ <el-table-column width="120" prop="userMobile" label="鎵嬫満鍙风爜"></el-table-column>
+ <el-table-column width="180" prop="userIdcard" label="璇佷欢鍙风爜"></el-table-column>
+ <el-table-column width="100" prop="isCommission" label="鏄惁浠e姙">
+ <template slot-scope="scope">
+ <span v-if="scope.row.isCommission == 1">鏄�</span>
+ <span v-else>鍚�</span>
+ </template>
+ </el-table-column>
+ <el-table-column width="100" prop="isIntoGroup" label="鏄惁杩涚兢">
+ <template slot-scope="scope">
+ <span v-if="scope.row.isIntoGroup == 1">鏄�</span>
+ <span v-else>鍚�</span>
+ </template>
+ </el-table-column>
+ <el-table-column width="100" prop="amountInvolved" label="娑夋閲戦">
+ <template slot-scope="scope">
+ <span>{{ scope.row.amountInvolved === null ? 0 : scope.row.amountInvolved }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column width="100" prop="reportMaterials" label="鎶ユ鏉愭枡">
+ <template slot-scope="scope">
+ <span>{{ scope.row.reportMaterials === "" ? "鏈彁浜�" : "宸叉彁浜�" }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column width="200" prop="reportTime" label="鎶ユ鏃堕棿">
+ <template slot-scope="scope">
+ <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.isIntoGroup == 0">閫�缇� </el-button>
+ <el-button type="text" size="medium" @click="removeReport(scope.row.id, scope.row.causeId)"
+ style="color:#ff0000" :disabled="scope.row.isIntoGroup == 1">鍒犻櫎 </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <el-pagination @current-change="handleCurrentChange" :current-page="queryInfoReport.current"
+ :page-size="queryInfoReport.size" layout="prev, pager, next" :total="reportTotal"></el-pagination>
+ </el-card>
+ <!--淇敼妗堜欢浜哄憳寮圭獥-->
+ <el-dialog title="淇敼浜哄憳" :visible.sync="updateReportVisible" width="50%" :append-to-body="true"
+ :before-close="updateReportVisibleclose">
+ <el-row :gutter="20">
+ <el-form ref="updateReportForm" :model="updateReportForm" :rules="reportRules" 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" list-type="picture-card" accept="image/*" disabled>
+ <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)">
+ </el-image>
+ </el-upload>
+ </el-form-item> -->
+ <!-- </el-col> -->
+ <!-- <el-col :span="12">
+ <el-form-item label="鎶ユ浜� " prop="userName" >
+ <el-input v-model="updateReportForm.userName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable
+ :style="{ width: '100%' }">
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鎵嬫満鍙风爜" prop="userMobile">
+ <el-input v-model="updateReportForm.userMobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable
+ :style="{ width: '100%' }">
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="韬唤璇佸彿" prop="userIdcard">
+ <el-input v-model="updateReportForm.userIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable
+ :style="{ width: '100%' }">
+ </el-input>
+ </el-form-item>
+ </el-col> -->
+ <el-col :span="12">
+ <el-form-item prop="amountInvolved" label="娑夋閲戦">
+ <el-input v-model="updateReportForm.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" clearable
+ :style="{ width: '100%' }">
+ </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="閫夋嫨鏃ユ湡鏃堕棿"
+ :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ </el-form>
+ </el-row>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="updateReportVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="updateReportInCasue">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <!-- 鏌ョ湅璇︽儏寮圭獥
+ <el-dialog title="妗堜欢璇︽儏" :visible.sync="infoAduitDialogVisible" width="50%" :before-close="infoAduitClose">
+ <el-row :gutter="15">
+ <el-form ref="infoAduitForm" :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" list-type="picture-card" accept="image/*" disabled>
+ <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)">
+ </el-image>
+ </el-upload>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鎶ユ浜� ">
+ <el-input v-model="auditInfo.reporterName" disabled :style="{ width: '100%' }"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鎵嬫満鍙风爜">
+ <el-input v-model="auditInfo.mobile" disabled :style="{ width: '100%' }">
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="韬唤璇佸彿">
+ <el-input v-model="auditInfo.idcard" disabled :style="{ width: '100%' }">
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="琚獥鏃堕棿">
+ <el-date-picker v-model="auditInfo.tmpTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+ :style="{ width: '100%' }" format="yyyy-MM-dd HH:mm:ss" :value-format="auditFrom.cheatTime"
+ disabled>
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="娑夋閲戦">
+ <el-input v-model="auditInfo.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" :style="{ width: '100%' }"
+ disabled>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="妗堜欢鎻忚堪">
+ <el-input v-model="auditInfo.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" :style="{ width: '100%' }"
+ disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="琛ュ厖淇℃伅">
+ <el-input v-model="auditInfo.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�"
+ :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="鏉愭枡">
+ <div class="metalL"></div>
+ </el-form-item>
+ </el-col>
+ <el-col :span="24">
+ <el-form-item label="鍏宠仈妗堜欢" prop="causeId">
+ <el-select v-model="auditFrom.causeId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '50%' }"
+ disabled>
+ <el-option v-for="item in causeOptions" :key="item.id" :label="item.name" :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-form>
+ </el-row>
+ </el-dialog> -->
</el-row>
- <span slot="footer" class="dialog-footer">
- <el-button @click="updateAduitDialogVisible = false">鍙� 娑�</el-button>
+ <!-- <span slot="footer" class="dialog-footer">
+ <el-button @click="reporterVisible = false">鍙� 娑�</el-button>
<el-button type="primary" @click="updateCause">纭� 瀹�</el-button>
- </span>
+ </span> -->
</el-dialog>
</div>
</template>
@@ -283,14 +404,134 @@
import {
casueList,
remove,
+ removeReport,
+ leaveReport,
user,
+ updataReportCasue,
+ exportReportExcel
//saveSubject
} from '@/api/cause'
+
+import { getImgUrl, getReportById, report } from '@/api/common'
+
export default {
name: "Entry",
data() {
return {
+ causeId: '',
+ exportReportId: '',
+ queryInfoReport: {
+ people: '',
+ phoneNumber: '',
+ isInGroup: '5',
+ current: 1,
+ HavaMaterial: '5',
+ size: 10,
+ },
+ auditFrom: {
+ pic: '',
+ reporterName: '',
+ mobile: '',
+ idcard: '',
+ cheatTime: '',
+ amountInvolved: '',
+ reportDescription: '',
+ information: '',
+ reportMaterials: "",
+ causeId: '',
+ fileList: [],
+ tmpTime: '',
+ },
+ auditInfo: {},
+ picShow: "",
+ optionsGroup: [
+ {
+ value: '5',
+ label: '鍏ㄩ儴'
+ },
+ {
+ value: '0',
+ label: '鏄�'
+ },
+ {
+ value: '1',
+ label: '鍚�'
+ }
+ ],
+ optionsMate: [
+ {
+ value: '5',
+ label: '鍏ㄩ儴'
+ },
+ {
+ value: '0',
+ label: '宸叉彁浜�'
+ },
+ {
+ value: '1',
+ label: '鏈彁浜�'
+ }
+ ],
+ reportTotal: 0,
+ reportList: [],
+ addAduitDialogVisible: false,
+ infoAduitDialogVisible: false,
+ causeOptions: [],
+ reportRules: {
+ reporterName: [{
+ required: true,
+ message: '璇疯緭鍏ユ姤妗堜汉 ',
+ trigger: 'blur'
+ }],
+ mobile: [{
+ required: true,
+ message: '璇疯緭鍏ユ墜鏈哄彿鐮�',
+ trigger: 'blur'
+ }],
+ idcard: [{
+ required: true,
+ message: '璇疯緭鍏ヨ韩浠借瘉鍙�',
+ trigger: 'blur'
+ }],
+ tmpTime: [{
+ required: true,
+ message: '璇疯緭鍏ヨ楠楁椂闂�',
+ trigger: 'blur'
+ }],
+ amountInvolved: [{
+ required: true,
+ message: '璇疯緭鍏ユ秹妗堥噾棰�',
+ trigger: 'blur'
+ }],
+ reportDescription: [{
+ required: true,
+ message: '璇疯緭鍏ユ浠舵弿杩�',
+ trigger: 'blur'
+ }],
+ information: [{
+ required: true,
+ message: '璇疯緭鍏ヨˉ鍏呬俊鎭�',
+ trigger: 'blur'
+ }],
+ causeId: [{
+ required: true,
+ message: '璇烽�夋嫨涓嬫媺閫夋嫨',
+ trigger: 'change'
+ }],
+ },
+
+
+ updateReportForm: [],
+
+ //妗堜欢浜哄憳琛ㄦ牸鏁版嵁
+ updateReportPrams: {
+ id: '',
+ amountInvolved: '',
+ reportTime: '',
+ },
+
+ //妗堜欢琛ㄦ牸鏁版嵁
causeForm: {
name: '',
number: '',
@@ -369,7 +610,8 @@
total: 0,
addAduitDialogVisible: false,
updateAduitDialogVisible: false,
- reporterVisible:false,
+ reporterVisible: false,
+ updateReportVisible: false,
rules: {
reporterName: [{
required: true,
@@ -417,9 +659,173 @@
created() {
this.init();
this.userList();
+
},
methods:
{
+
+ //瀵煎嚭鏂囦欢
+ exportExcel() {
+ this.$http.post('/api/report/exportReporter?id=' + 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' })
+ const elink = document.createElement('a')
+ elink.download = fileName
+ elink.href = URL.createObjectURL(blob)
+ document.body.appendChild(elink)
+ elink.click()
+ document.body.removeChild(elink)
+ })
+ },
+
+ //妗堜欢浜哄憳缂栬緫琛ㄥ崟鎻愪氦
+ updateReportInCasue() {
+ this.updateReportPrams.id = this.updateReportForm.id;
+ this.updateReportPrams.amountInvolved = this.updateReportForm.amountInvolved;
+ this.updateReportPrams.reportTime = this.updateReportForm.reportTime;
+ let form = null;
+ form = this.updateReportPrams;
+ const data = form;
+ updataReportCasue(data).then(
+ res => {
+ this.$message({
+ message: '淇敼鎴愬姛',
+ type: 'success'
+ });
+ this.get(this.causeId);
+ }
+ );
+
+ this.updateReportVisible = false;
+ },
+
+ //缂栬緫妗堜欢浜哄憳
+ updataReport(val) {
+ this.updateReportVisible = true;
+ this.updateReportForm = Object.assign({}, val);
+ this.causeId = val.causeId;
+ },
+ //琛屼负鍏抽棴淇敼妗堜欢浜哄憳
+ updateReportVisibleclose() {
+ this.updateReportVisible = false;
+ },
+ //鎶ユ浜哄憳
+ reporterVisibleBefore(row) {
+ this.reporterVisible = true;
+ this.exportReportId = row;
+ this.get(row);
+ },
+ //鎶ユ浜哄憳鏌ヨ
+ get(param) {
+ this.$http.get('/api/cause/getReporterList?causeId=' + param).then(res => {
+
+ this.reportTotal = res.data.data.total
+ this.reportList = res.data.data.records
+ this.reportList.forEach(x => {
+ if (x.pic === '' || x.pic === null) {
+ x.pic = './logo.png';
+ } else {
+ getImgUrl(x.pic).then(res => {
+ x.pic = res
+ })
+ }
+ })
+ })
+ }
+ ,
+ infoAduitClose() {
+ this.infoAduitDialogVisible = false
+ this.$refs.infoAduitForm.resetFields()
+ },
+ addAduit() {
+ this.$refs.addAduitForm.validate(async (vaild) => {
+ if (!vaild) return this.$message.error('杈撳叆鏈夎')
+ this.auditFrom.reportMaterials = this.auditFrom.fileList.map(i => i.data).join(',')
+ report(this.auditFrom).then(res => {
+ this.$message.success('鎻愪氦鎴愬姛')
+ this.addAduitDialogVisible = false
+ this.getReportList()
+ }).catch(err => {
+ this.addAduitClose()
+ })
+ })
+ },
+ async getCauseOptions() {
+ const { data: data } = await this.$http.get('/api/cause/getCauseIdAndName');
+ this.causeOptions = data.data;
+ },
+ handleAvatarSuccess(res, file) {
+ this.auditFrom.pic = res.data
+
+ getImgUrl(res.data).then(res => {
+ this.picShow = res
+ })
+ },
+ async handleMaterialSuccess(res, file) {
+ this.auditFrom.fileList.push({
+ name: file.name,
+ url: await getImgUrl(res.data),
+ data: res.data
+ })
+ },
+ addAduitClose() {
+ this.addAduitDialogVisible = false
+ this.$refs.addAduitForm.resetFields()
+ this.picShow = ""
+ },
+ getReportList() {
+ let param = {}
+ param.people = this.queryInfoReport.people
+ param.phoneNumber = this.queryInfoReport.phoneNumber
+ param.current = this.queryInfoReport.current
+ param.size = this.queryInfoReport.size
+ param.isInGroup = this.queryInfoReport.isInGroup !== '5' ? this.queryInfoReport.isInGroup : ''
+ param.HavaMaterial = this.queryInfoReport.HavaMaterial !== '5' ? this.queryInfoReport.HavaMaterial : ''
+ getAuditList(param).then(res => {
+ this.total = res.total
+ this.list = res.records
+ this.list.forEach(x => {
+ if (x.pic === '' || x.pic === null) {
+ x.pic = './logo.png';
+ } else {
+ getImgUrl(x.pic).then(res => {
+ x.pic = res
+ })
+ }
+ })
+ })
+ },
+ search() {
+ this.getReportList()
+ },
+ addAduitDialogOpen() {
+ this.addAduitDialogVisible = true
+ },
+
+ handleCurrentChange(val) {
+ this.queryInfoReport.current = val;
+ this.getReportList();
+ },
+ details(id) {
+ getReportById(id).then(res => {
+ this.auditInfo = res
+ if (res.pic === '' || res.pic === null) {
+ this.picShow = './logo.png';
+ } else {
+ getImgUrl(res.pic).then(res => {
+ this.picShow = res
+ })
+ }
+ this.infoAduitDialogVisible = true
+ })
+ },
+ audit(id) {
+
+ },
+
+ //妗堜欢褰曞叆鐩稿叧
+
updateCauseDialogVisible(row) {
this.updateAduitDialogVisible = true,
this.updataCauseForm = Object.assign({}, row);
@@ -446,6 +852,9 @@
updateAduitClose() {
this.updateAduitDialogVisible = false
},
+ reporterVisibleClose() {
+ this.reporterVisible = false
+ },
async createCause() {
let form = null;
form = this.causeForm;
@@ -459,7 +868,7 @@
message: "娣诲姞鎴愬姛"
});
this.addAduitDialogVisible = false;
- this.getList();
+ this.getList();
} else {
this.$message({
type: "error",
@@ -508,21 +917,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();
@@ -589,8 +998,7 @@
,
addDialogOpen() {
},
- exportExcel() {
- },
+
handleCurrentChange(val) {
this.queryInfo.current = val;
this.getList();
@@ -605,7 +1013,33 @@
this.getList();
}
)
- }
+ },
+
+ removeReport(val, row) {
+ removeReport(val).then(
+ res => {
+ this.$message({
+ message: '鍒犻櫎鎴愬姛',
+ type: 'success'
+ });
+ this.get(row);
+ }
+ )
+ },
+
+
+ leaveReport(val, row, value) {
+ leaveReport(val, value).then(
+ res => {
+ this.$message({
+ message: '閫�缇ゆ垚鍔�',
+ type: 'success'
+ });
+ this.get(row);
+ }
+ )
+ },
+
}
}
</script>
--
Gitblit v1.8.0