mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-10 18:02:55 +00:00
feat: 添加举报功能
This commit is contained in:
parent
ac6bdc07ec
commit
30676fb761
144
app/Http/Controllers/Api/ComplaintController.php
Executable file
144
app/Http/Controllers/Api/ComplaintController.php
Executable file
@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use Request;
|
||||
use App\Models\User;
|
||||
use App\Module\Base;
|
||||
use App\Models\Complaint;
|
||||
use App\Models\WebSocketDialog;
|
||||
|
||||
/**
|
||||
* @apiDefine dialog
|
||||
*
|
||||
* 投诉
|
||||
*/
|
||||
class ComplaintController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @api {get} api/complaint/lists 01. 获取举报投诉列表
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup dialog
|
||||
* @apiName lists
|
||||
*
|
||||
* @apiParam {Number} [type] 类型
|
||||
* @apiParam {Number} [status] 状态
|
||||
*
|
||||
* @apiParam {Number} [page] 当前页,默认:1
|
||||
* @apiParam {Number} [pagesize] 每页显示数量,默认:50,最大:100
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$user = User::auth();
|
||||
$user->identity('admin');
|
||||
//
|
||||
$type = intval(Request::input('type'));
|
||||
$status = Request::input('status');
|
||||
//
|
||||
$complaints = Complaint::query()
|
||||
->when($type, function($q) use($type) {
|
||||
$q->where('type', $type);
|
||||
})
|
||||
->when($status != "", function($q) use($status) {
|
||||
$q->where('status', $status);
|
||||
})
|
||||
->orderByDesc('id')
|
||||
->paginate(Base::getPaginate(100, 50));
|
||||
//
|
||||
return Base::retSuccess('success', $complaints);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/complaint/submit 02. 举报投诉
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup dialog
|
||||
* @apiName submit
|
||||
*
|
||||
* @apiParam {Number} dialog_id 对话ID
|
||||
* @apiParam {Number} type 类型
|
||||
* @apiParam {String} reason 原因
|
||||
* @apiParam {String} imgs 图片
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
*/
|
||||
public function submit()
|
||||
{
|
||||
$user = User::auth();
|
||||
//
|
||||
$dialog_id = intval(Request::input('dialog_id'));
|
||||
$type = intval(Request::input('type'));
|
||||
$reason = trim(Request::input('reason'));
|
||||
$imgs = Request::input('imgs');
|
||||
//
|
||||
WebSocketDialog::checkDialog($dialog_id);
|
||||
//
|
||||
if (!$type) {
|
||||
return Base::retError('请选择举报类型');
|
||||
}
|
||||
if (!$reason) {
|
||||
return Base::retError('请填写举报原因');
|
||||
}
|
||||
//
|
||||
$report_imgs = [];
|
||||
if (!empty($imgs) && is_array($imgs)) {
|
||||
foreach ($imgs as $img) {
|
||||
$report_imgs[] = Base::unFillUrl($img['path']);
|
||||
}
|
||||
}
|
||||
//
|
||||
Complaint::createInstance([
|
||||
'dialog_id' => $dialog_id,
|
||||
'userid' => $user->userid,
|
||||
'type' => $type,
|
||||
'reason' => $reason,
|
||||
'imgs' => $report_imgs,
|
||||
])->save();
|
||||
//
|
||||
return Base::retSuccess('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/complaint/action 03. 举报投诉 - 操作
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup dialog
|
||||
* @apiName action
|
||||
*
|
||||
* @apiParam {Number} id ID
|
||||
* @apiParam {Number} type 类型
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
*/
|
||||
public function action()
|
||||
{
|
||||
$user = User::auth();
|
||||
$user->identity('admin');
|
||||
//
|
||||
$id = intval(Request::input('id'));
|
||||
$type = trim(Request::input('type'));
|
||||
//
|
||||
if ($type == 'handle') {
|
||||
Complaint::whereId($id)->update([
|
||||
"status" => 1
|
||||
]);
|
||||
}
|
||||
if ($type == 'delete') {
|
||||
Complaint::whereId($id)->delete();
|
||||
}
|
||||
//
|
||||
return Base::retSuccess('success');
|
||||
}
|
||||
}
|
||||
41
app/Models/Complaint.php
Normal file
41
app/Models/Complaint.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
|
||||
/**
|
||||
* App\Models\Complaint
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $dialog_id 对话ID
|
||||
* @property int|null $userid 举报人id
|
||||
* @property int|null $type 举报类型
|
||||
* @property string|null $reason 举报原因
|
||||
* @property string|null $imgs 举报图片
|
||||
* @property int|null $status 状态 0待处理、1已处理、2已删除
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint whereDialogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint whereImgs($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint whereReason($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint whereType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Complaint whereUserid($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Complaint extends AbstractModel
|
||||
{
|
||||
|
||||
}
|
||||
@ -11,6 +11,8 @@ use App\Exceptions\ApiException;
|
||||
* @property int $id
|
||||
* @property int|null $project_id 项目ID
|
||||
* @property int|null $task_id 任务ID
|
||||
* @property int|null $userid 用户ID
|
||||
* @property string|null $desc 内容描述
|
||||
* @property string|null $content 内容
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
@ -25,10 +27,12 @@ use App\Exceptions\ApiException;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereDesc($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereProjectId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereTaskId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereUserid($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ProjectTaskContent extends AbstractModel
|
||||
|
||||
@ -13,15 +13,15 @@ use Carbon\Carbon;
|
||||
* App\Models\User
|
||||
*
|
||||
* @property int $userid
|
||||
* @property array $identity 身份
|
||||
* @property array $department 所属部门
|
||||
* @property array $identity
|
||||
* @property array $department
|
||||
* @property string|null $az A-Z
|
||||
* @property string|null $pinyin 拼音(主要用于搜索)
|
||||
* @property string|null $email 邮箱
|
||||
* @property string|null $email
|
||||
* @property string|null $tel 联系电话
|
||||
* @property string $nickname 昵称
|
||||
* @property string|null $profession 职位/职称
|
||||
* @property string $userimg 头像
|
||||
* @property string $nickname
|
||||
* @property string|null $profession
|
||||
* @property string $userimg
|
||||
* @property string|null $encrypt
|
||||
* @property string|null $password 登录密码
|
||||
* @property int|null $changepass 登录需要修改密码
|
||||
@ -32,7 +32,7 @@ use Carbon\Carbon;
|
||||
* @property string|null $line_at 最后在线时间(接口)
|
||||
* @property int|null $task_dialog_id 最后打开的任务会话ID
|
||||
* @property string|null $created_ip 注册IP
|
||||
* @property string|null $disable_at 禁用时间(离职时间)
|
||||
* @property string|null $disable_at
|
||||
* @property int|null $email_verity 邮箱是否已验证
|
||||
* @property int|null $bot 是否机器人
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateComplaintsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('complaints', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('dialog_id')->nullable()->default(0)->comment('对话ID');
|
||||
$table->bigInteger('userid')->nullable()->default(0)->comment('举报人id');
|
||||
$table->bigInteger('type')->nullable()->default(0)->comment('举报类型');
|
||||
$table->string('reason', 500)->nullable()->default('')->comment('举报原因');
|
||||
$table->text('imgs')->nullable()->comment('举报图片');
|
||||
$table->bigInteger('status')->nullable()->default(0)->comment('状态 0待处理、1已处理、2已删除');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('complaints');
|
||||
}
|
||||
}
|
||||
@ -494,3 +494,6 @@ Api接口文档
|
||||
|
||||
注册失败
|
||||
会议已结束
|
||||
|
||||
请选择举报类型
|
||||
请填写举报原因
|
||||
|
||||
@ -1569,3 +1569,25 @@ License Key
|
||||
任务描述历史记录
|
||||
描述
|
||||
数据加载失败
|
||||
|
||||
举报管理
|
||||
举报类型
|
||||
举报状态
|
||||
已处理
|
||||
诈骗诱导转账
|
||||
引流下载其他APP付费
|
||||
敲诈勒索
|
||||
照片与本人不一致
|
||||
色情低俗
|
||||
频繁广告骚扰
|
||||
其他问题
|
||||
举报人
|
||||
你确定要处理吗?
|
||||
你确定要删除吗?
|
||||
请选择举报类型
|
||||
请填写举报原因
|
||||
举报成功
|
||||
匿名举报
|
||||
请输入举报类型:
|
||||
请输入举报原因:
|
||||
请输入填写详细的举报原因,以使我们更好的帮助你解决问题
|
||||
|
||||
@ -20205,5 +20205,236 @@
|
||||
"de": "Datenproblem nicht geladen.",
|
||||
"fr": "Échec du chargement des données",
|
||||
"id": "Pemuatan data gagal"
|
||||
},
|
||||
{
|
||||
"key": "请选择举报类型",
|
||||
"zh": "",
|
||||
"zh-CHT": "請選擇舉報類型",
|
||||
"en": "Please select a report type",
|
||||
"ko": "제보 유형을 선택하세요",
|
||||
"ja": "通報の種類を選択します。",
|
||||
"de": "Bitte wählen sie den art der meldung",
|
||||
"fr": "Veuillez sélectionner un type de dénonciation",
|
||||
"id": "Silahkan pilih jenis laporan"
|
||||
},
|
||||
{
|
||||
"key": "请填写举报原因",
|
||||
"zh": "",
|
||||
"zh-CHT": "請填寫舉報原因",
|
||||
"en": "Please fill in the report reason",
|
||||
"ko": "고발 사유를 기재하시오",
|
||||
"ja": "通報理由をお願いします。",
|
||||
"de": "Bitte füllen sie ihren bericht aus",
|
||||
"fr": "Veuillez renseigner la raison du signalement",
|
||||
"id": "Silahkan mengisi untuk alasan pelaporan"
|
||||
},
|
||||
{
|
||||
"key": "举报管理",
|
||||
"zh": "",
|
||||
"zh-CHT": "舉報管理",
|
||||
"en": "Reporting management",
|
||||
"ko": "고발 관리",
|
||||
"ja": "通報管理です",
|
||||
"de": "Management meldet:",
|
||||
"fr": "Gestion des signalements",
|
||||
"id": "Melaporkan manajemen"
|
||||
},
|
||||
{
|
||||
"key": "举报类型",
|
||||
"zh": "",
|
||||
"zh-CHT": "舉報類型",
|
||||
"en": "Reporting type",
|
||||
"ko": "신고 유형",
|
||||
"ja": "通報タイプです",
|
||||
"de": "Art der meldung",
|
||||
"fr": "Types de signalements",
|
||||
"id": "Tipe pelaporan"
|
||||
},
|
||||
{
|
||||
"key": "举报状态",
|
||||
"zh": "",
|
||||
"zh-CHT": "舉報狀態",
|
||||
"en": "Reporting status",
|
||||
"ko": "신고 상태",
|
||||
"ja": "通報状態です",
|
||||
"de": "Meldung über den stand.",
|
||||
"fr": "État des signalements",
|
||||
"id": "Laporkan status"
|
||||
},
|
||||
{
|
||||
"key": "已处理",
|
||||
"zh": "",
|
||||
"zh-CHT": "已處理",
|
||||
"en": "Processed",
|
||||
"ko": "처리됨",
|
||||
"ja": "処理済みです",
|
||||
"de": "Wir kümmern uns darum.",
|
||||
"fr": "A été traité",
|
||||
"id": "Sudah ditangani"
|
||||
},
|
||||
{
|
||||
"key": "诈骗诱导转账",
|
||||
"zh": "",
|
||||
"zh-CHT": "詐騙誘導轉賬",
|
||||
"en": "Fraud-induced transfer",
|
||||
"ko": "사기 유도 이체",
|
||||
"ja": "詐欺誘導振り込みです",
|
||||
"de": "Ein köder.",
|
||||
"fr": "Transferts induits par fraude",
|
||||
"id": "Melakukan penipuan"
|
||||
},
|
||||
{
|
||||
"key": "引流下载其他APP付费",
|
||||
"zh": "",
|
||||
"zh-CHT": "引流下載其他APP付費",
|
||||
"en": "Diversion download other apps pay",
|
||||
"ko": "유료 다운로드 다른 앱",
|
||||
"ja": "有料で他のアプリをダウンロードします",
|
||||
"de": "Weitere APP gratis downloaden",
|
||||
"fr": "Drainage télécharger autre APP payer",
|
||||
"id": "- download streaming untuk aplikasi lain"
|
||||
},
|
||||
{
|
||||
"key": "敲诈勒索",
|
||||
"zh": "",
|
||||
"zh-CHT": "敲詐勒索",
|
||||
"en": "Extortion",
|
||||
"ko": "사기를 쳐서 재물을 갈취하다.",
|
||||
"ja": "ゆすりゆすりです",
|
||||
"de": "Erpressung und so weiter.",
|
||||
"fr": "Extorsion et extorsion",
|
||||
"id": "Pemerasan."
|
||||
},
|
||||
{
|
||||
"key": "照片与本人不一致",
|
||||
"zh": "",
|
||||
"zh-CHT": "照片與本人不一致",
|
||||
"en": "The photo does not match me",
|
||||
"ko": "사진이 본인과 일치하지 않다",
|
||||
"ja": "写真と本人が一致しません",
|
||||
"de": "Das foto passt nicht zu dem bild",
|
||||
"fr": "La photo ne correspond pas à moi",
|
||||
"id": "Foto tidak sesuai dengan saya"
|
||||
},
|
||||
{
|
||||
"key": "色情低俗",
|
||||
"zh": "",
|
||||
"zh-CHT": "色情低俗",
|
||||
"en": "Pornographic and vulgar",
|
||||
"ko": "색정적이고 저속하다.",
|
||||
"ja": "下品なポルノです",
|
||||
"de": "Pornografie ist vulgär.",
|
||||
"fr": "Érotique vulgaire",
|
||||
"id": "Porno kotor"
|
||||
},
|
||||
{
|
||||
"key": "频繁广告骚扰",
|
||||
"zh": "",
|
||||
"zh-CHT": "頻繁廣告騷擾",
|
||||
"en": "Frequent advertising harassment",
|
||||
"ko": "잦은 광고 소동",
|
||||
"ja": "頻繁な広告ハラスメントです",
|
||||
"de": "Unmengen Von anzeigen.",
|
||||
"fr": "Harcèlement publicitaire fréquent",
|
||||
"id": "Sering mengganggu iklan"
|
||||
},
|
||||
{
|
||||
"key": "其他问题",
|
||||
"zh": "",
|
||||
"zh-CHT": "其他問題",
|
||||
"en": "Other questions",
|
||||
"ko": "그 밖의 문제",
|
||||
"ja": "その他の問題です",
|
||||
"de": "Noch andere fragen.",
|
||||
"fr": "Pour toute autre question",
|
||||
"id": "Masalah lain"
|
||||
},
|
||||
{
|
||||
"key": "举报人",
|
||||
"zh": "",
|
||||
"zh-CHT": "舉報人",
|
||||
"en": "Informer",
|
||||
"ko": "고발인",
|
||||
"ja": "通報者です",
|
||||
"de": "Der anrufer.",
|
||||
"fr": "Le dénonciateur",
|
||||
"id": "Pembawa berita"
|
||||
},
|
||||
{
|
||||
"key": "你确定要处理吗?",
|
||||
"zh": "",
|
||||
"zh-CHT": "你確定要處理嗎?",
|
||||
"en": "Are you sure you want to handle this?",
|
||||
"ko": "정말로 처리하실 겁니까?",
|
||||
"ja": "処理することは確実ですか?",
|
||||
"de": "Hast du wirklich vor, dich darum zu kümmern?",
|
||||
"fr": "Êtes-vous sûr de vouloir traiter?",
|
||||
"id": "Kau yakin ingin menanganinya?"
|
||||
},
|
||||
{
|
||||
"key": "你确定要删除吗?",
|
||||
"zh": "",
|
||||
"zh-CHT": "你確定要刪除嗎?",
|
||||
"en": "Are you sure you want to delete it?",
|
||||
"ko": "정말로 삭제하시겠습니까?",
|
||||
"ja": "削除しますか?",
|
||||
"de": "Willst du es wirklich löschen?",
|
||||
"fr": "Êtes-vous sûr de vouloir supprimer?",
|
||||
"id": "Kau yakin ingin menghapusnya?"
|
||||
},
|
||||
{
|
||||
"key": "举报成功",
|
||||
"zh": "",
|
||||
"zh-CHT": "舉報成功",
|
||||
"en": "Report success",
|
||||
"ko": "신고가 성공하다",
|
||||
"ja": "通報できました",
|
||||
"de": "Melde erfolg.",
|
||||
"fr": "Signaler un succès",
|
||||
"id": "Laporkan sukses"
|
||||
},
|
||||
{
|
||||
"key": "匿名举报",
|
||||
"zh": "",
|
||||
"zh-CHT": "匿名舉報",
|
||||
"en": "Anonymous report",
|
||||
"ko": "익명으로 고발하다.",
|
||||
"ja": "匿名の通報です",
|
||||
"de": "Anonymer tipp.",
|
||||
"fr": "Signaler de manière anonyme",
|
||||
"id": "Laporan anonim"
|
||||
},
|
||||
{
|
||||
"key": "请输入举报类型:",
|
||||
"zh": "",
|
||||
"zh-CHT": "請輸入舉報類型:",
|
||||
"en": "Please enter the report type:",
|
||||
"ko": "제보 유형을 입력하십시오:",
|
||||
"ja": "通報の種類を入力してくださいます:",
|
||||
"de": "Bitte geben sie den melanchentyp ein:",
|
||||
"fr": "Veuillez entrer le type de signalement:",
|
||||
"id": "Silakan masukkan tipe laporan:"
|
||||
},
|
||||
{
|
||||
"key": "请输入举报原因:",
|
||||
"zh": "",
|
||||
"zh-CHT": "請輸入舉報原因:",
|
||||
"en": "Please enter the reason for reporting:",
|
||||
"ko": "제보하는 이유를 입력해주세요:",
|
||||
"ja": "通報理由を入力してくださいます:",
|
||||
"de": "Bitte geben sie einen grund ein:",
|
||||
"fr": "Veuillez saisir la raison de votre signalement:",
|
||||
"id": "Mohon masukkan alasan pelaporan:"
|
||||
},
|
||||
{
|
||||
"key": "请输入填写详细的举报原因,以使我们更好的帮助你解决问题",
|
||||
"zh": "",
|
||||
"zh-CHT": "請輸入填寫詳細的舉報原因,以使我們更好的幫助你解決問題",
|
||||
"en": "Please fill in the detailed report reason, so that we can better help you solve the problem",
|
||||
"ko": "자세한 제보 원인을 입력하여 기입하십시요, 더 나은 문제 해결에 도움이 되도록",
|
||||
"ja": "通報の詳細な原因を記入してください、あなたの問題を解決するために私たちを助けます。",
|
||||
"de": "Bitte geben sie einen detaillierten hinweis ein, warum sie ihre probleme lösen sollen",
|
||||
"fr": "S’il vous plaît entrer la raison de remplir les détails pour nous permettre de mieux vous aider à résoudre le problème",
|
||||
"id": "Silakan ketik alasan kami mengisi laporan lengkap untuk memberikan bantuan yang lebih baik dalam memecahkan masalah anda"
|
||||
}
|
||||
]
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||
["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||
2
public/language/web/de.js
vendored
2
public/language/web/de.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/en.js
vendored
2
public/language/web/en.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/fr.js
vendored
2
public/language/web/fr.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/id.js
vendored
2
public/language/web/id.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/ja.js
vendored
2
public/language/web/ja.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/key.js
vendored
2
public/language/web/key.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/ko.js
vendored
2
public/language/web/ko.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/zh-CHT.js
vendored
2
public/language/web/zh-CHT.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/zh.js
vendored
2
public/language/web/zh.js
vendored
@ -1 +1 @@
|
||||
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||
@ -281,6 +281,14 @@
|
||||
<ProjectManagement v-if="allProjectShow"/>
|
||||
</DrawerOverlay>
|
||||
|
||||
<!--举报投诉管理-->
|
||||
<DrawerOverlay
|
||||
v-model="reportShow"
|
||||
placement="right"
|
||||
:size="1200">
|
||||
<ComplaintManagement v-if="reportShow"/>
|
||||
</DrawerOverlay>
|
||||
|
||||
<!--查看归档项目-->
|
||||
<DrawerOverlay
|
||||
v-model="archivedProjectShow"
|
||||
@ -325,6 +333,7 @@ import ApproveExport from "./manage/components/ApproveExport";
|
||||
import notificationKoro from "notification-koro1";
|
||||
import {Store} from "le5le-store";
|
||||
import MicroApps from "../components/MicroApps.vue";
|
||||
import ComplaintManagement from "./manage/components/ComplaintManagement";
|
||||
import {MarkdownPreview} from "../store/markdown";
|
||||
|
||||
export default {
|
||||
@ -344,7 +353,8 @@ export default {
|
||||
ProjectManagement,
|
||||
TeamManagement,
|
||||
ProjectArchived,
|
||||
MicroApps
|
||||
MicroApps,
|
||||
ComplaintManagement
|
||||
},
|
||||
directives: {longpress},
|
||||
data() {
|
||||
@ -399,6 +409,8 @@ export default {
|
||||
operateItem: {},
|
||||
|
||||
needStartHome: false,
|
||||
|
||||
reportShow: false,
|
||||
}
|
||||
},
|
||||
|
||||
@ -572,6 +584,7 @@ export default {
|
||||
{path: 'archivedProject', name: '已归档的项目'},
|
||||
|
||||
{path: 'team', name: '团队管理', divided: true},
|
||||
{path: 'report', name: '举报管理', divided: true},
|
||||
])
|
||||
} else {
|
||||
array.push(...[
|
||||
@ -769,6 +782,9 @@ export default {
|
||||
path:'/manage/apps/' + ( path == 'okrManage' ? '/#/list' : '/#/analysis'),
|
||||
});
|
||||
return;
|
||||
case 'report':
|
||||
this.reportShow = true;
|
||||
return;
|
||||
case 'logout':
|
||||
$A.modalConfirm({
|
||||
title: '退出登录',
|
||||
|
||||
@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<div class="project-management">
|
||||
<div class="management-title">
|
||||
{{ $L('举报管理') }}
|
||||
<div class="title-icon">
|
||||
<Loading v-if="loadIng > 0" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-container lr">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="search-label">
|
||||
{{ $L("举报类型") }}
|
||||
</div>
|
||||
<div class="search-content">
|
||||
<Select v-model="keys.type" :placeholder="$L('全部')">
|
||||
<Option value=" ">{{ $L('全部') }}</Option>
|
||||
<Option v-for="(item, index) in typeList" :key="index" :value="item.id">{{ $L(item.label) }}
|
||||
</Option>
|
||||
</Select>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="search-label">
|
||||
{{ $L("举报状态") }}
|
||||
</div>
|
||||
<div class="search-content">
|
||||
<Select v-model="keys.status" :placeholder="$L('全部')">
|
||||
<Option value=" ">{{ $L('全部') }}</Option>
|
||||
<Option :value="0">{{ $L('待处理') }}</Option>
|
||||
<Option :value="1">{{ $L('已处理') }}</Option>
|
||||
</Select>
|
||||
</div>
|
||||
</li>
|
||||
<li class="search-button">
|
||||
<Tooltip theme="light" placement="right" transfer-class-name="search-button-clear" transfer>
|
||||
<Button :loading="loadIng > 0" type="primary" icon="ios-search"
|
||||
@click="onSearch">{{ $L('搜索') }}</Button>
|
||||
<div slot="content">
|
||||
<Button v-if="keyIs" type="text" @click="keyIs = false">{{ $L('取消筛选') }}</Button>
|
||||
<Button v-else :loading="loadIng > 0" type="text" @click="getLists">{{ $L('刷新') }}</Button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="table-page-box">
|
||||
<Table :columns="columns" :data="list" :loading="loadIng > 0" :no-data-text="$L(noText)" stripe />
|
||||
<Page :total="total" :current="page" :page-size="pageSize" :disabled="loadIng > 0" :simple="windowPortrait"
|
||||
:page-size-opts="[10, 20, 30, 50, 100]" show-elevator show-sizer show-total @on-change="setPage"
|
||||
@on-page-size-change="setPageSize" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ComplaintManagement",
|
||||
data() {
|
||||
const typeList = [
|
||||
{ id: 10, label: "诈骗诱导转账" },
|
||||
{ id: 20, label: "引流下载其他APP付费" },
|
||||
{ id: 30, label: "敲诈勒索" },
|
||||
{ id: 40, label: "照片与本人不一致" },
|
||||
{ id: 50, label: "色情低俗" },
|
||||
{ id: 60, label: "频繁广告骚扰" },
|
||||
{ id: 70, label: "其他问题" }
|
||||
];
|
||||
|
||||
return {
|
||||
loadIng: 0,
|
||||
|
||||
keys: {},
|
||||
keyIs: false,
|
||||
|
||||
typeList: typeList,
|
||||
|
||||
columns: [
|
||||
{
|
||||
title: 'ID',
|
||||
key: 'id',
|
||||
width: 80,
|
||||
render: (h, { row, column }) => {
|
||||
return h('TableAction', {
|
||||
props: {
|
||||
column: column,
|
||||
align: 'left'
|
||||
}
|
||||
}, [
|
||||
h("div", row.id),
|
||||
]);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$L('举报类型'),
|
||||
key: 'type',
|
||||
minWidth: 80,
|
||||
render: (h, { row }) => {
|
||||
const arr = [h('AutoTip', this.$L(typeList.find(h => h.id == row.type).label))];
|
||||
return h('div', arr)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$L('状态'),
|
||||
key: 'status',
|
||||
minWidth: 60,
|
||||
render: (h, { row }) => {
|
||||
let text = row.status == 0 ? '未处理': '已处理';
|
||||
return h('div', this.$L(text))
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$L('举报原因'),
|
||||
minWidth: 120,
|
||||
render: (h, { row }) => {
|
||||
return h('div', [h('AutoTip', row.reason)])
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$L('举报图'),
|
||||
minWidth: 100,
|
||||
render: (h, { row }) => {
|
||||
const arr = [];
|
||||
const imgs = JSON.parse(row.imgs)?.map(path => {
|
||||
return {
|
||||
src: $A.apiUrl("../" + path),
|
||||
}
|
||||
});
|
||||
imgs.forEach((item, index) => {
|
||||
arr.push(h('img', {
|
||||
attrs: {
|
||||
src: item.src,
|
||||
width: 70
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.$store.dispatch("previewImage", { index: index, list: imgs })
|
||||
}
|
||||
}
|
||||
}))
|
||||
});
|
||||
return h('div', {
|
||||
attrs: {
|
||||
style: "display: flex;padding: 4px 0;gap: 10px;"
|
||||
}
|
||||
}, arr)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$L('举报人'),
|
||||
minWidth: 60,
|
||||
render: (h, { row }) => {
|
||||
return h('UserAvatar', {
|
||||
props: {
|
||||
showName: true,
|
||||
size: 22,
|
||||
userid: row.userid,
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$L('创建时间'),
|
||||
key: 'created_at',
|
||||
width: 168,
|
||||
},
|
||||
{
|
||||
title: this.$L('操作'),
|
||||
align: 'center',
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
const vNode = [
|
||||
params.row.status == 0 && h('Poptip', {
|
||||
props: {
|
||||
title: this.$L('你确定要处理吗?'),
|
||||
confirm: true,
|
||||
transfer: true,
|
||||
placement: 'left',
|
||||
okText: this.$L('确定'),
|
||||
cancelText: this.$L('取消'),
|
||||
},
|
||||
style: {
|
||||
fontSize: '13px',
|
||||
cursor: 'pointer',
|
||||
color: '#84C56A',
|
||||
},
|
||||
on: {
|
||||
'on-ok': () => {
|
||||
this.handle(params.row);
|
||||
}
|
||||
},
|
||||
}, this.$L('处理')),
|
||||
h('Poptip', {
|
||||
props: {
|
||||
title: this.$L('你确定要删除吗?'),
|
||||
confirm: true,
|
||||
transfer: true,
|
||||
placement: 'left',
|
||||
okText: this.$L('确定'),
|
||||
cancelText: this.$L('取消'),
|
||||
},
|
||||
style: {
|
||||
marginLeft: '8px',
|
||||
fontSize: '13px',
|
||||
cursor: 'pointer',
|
||||
color: '#f00',
|
||||
},
|
||||
on: {
|
||||
'on-ok': () => {
|
||||
this.delete(params.row);
|
||||
}
|
||||
},
|
||||
}, this.$L('删除'))
|
||||
];
|
||||
return h('TableAction', {
|
||||
props: {
|
||||
column: params.column
|
||||
}
|
||||
}, vNode);
|
||||
},
|
||||
}
|
||||
],
|
||||
list: [],
|
||||
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
noText: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getLists();
|
||||
},
|
||||
watch: {
|
||||
keyIs(v) {
|
||||
if (!v) {
|
||||
this.keys = {}
|
||||
this.setPage(1)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSearch() {
|
||||
this.page = 1;
|
||||
this.getLists();
|
||||
},
|
||||
|
||||
getLists() {
|
||||
this.loadIng++;
|
||||
this.$store.dispatch("call", {
|
||||
url: 'complaint/lists',
|
||||
data: {
|
||||
type: this.keys.type,
|
||||
status: this.keys.status,
|
||||
page: Math.max(this.page, 1),
|
||||
pagesize: Math.max($A.runNum(this.pageSize), 10),
|
||||
},
|
||||
}).then(({ data }) => {
|
||||
this.page = data.current_page;
|
||||
this.total = data.total;
|
||||
this.list = data.data;
|
||||
this.noText = '没有相关的数据';
|
||||
}).catch(() => {
|
||||
this.noText = '数据加载失败';
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
})
|
||||
},
|
||||
|
||||
setPage(page) {
|
||||
this.page = page;
|
||||
this.getLists();
|
||||
},
|
||||
|
||||
setPageSize(pageSize) {
|
||||
this.page = 1;
|
||||
this.pageSize = pageSize;
|
||||
this.getLists();
|
||||
},
|
||||
|
||||
handle(row) {
|
||||
this.loadIng++;
|
||||
this.$store.dispatch("call", {
|
||||
url: 'complaint/action',
|
||||
data: {
|
||||
id: row.id,
|
||||
type: 'handle'
|
||||
},
|
||||
}).then(() => {
|
||||
this.getLists();
|
||||
}).catch(({ msg }) => {
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
})
|
||||
},
|
||||
|
||||
delete(row) {
|
||||
this.list = this.list.filter(({ id }) => id != row.id);
|
||||
this.loadIng++;
|
||||
this.$store.dispatch("call", {
|
||||
url: 'complaint/action',
|
||||
data: {
|
||||
id: row.id,
|
||||
type: 'delete'
|
||||
},
|
||||
}).then(() => {
|
||||
this.getLists();
|
||||
}).catch(({ msg }) => {
|
||||
$A.modalError(msg);
|
||||
this.getLists();
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<div class="dialog-complaint-info">
|
||||
<div class="group-complaint-title">{{ $L('匿名举报') }}</div>
|
||||
<div class="group-complaint-title underline required">{{ $L('请输入举报类型:') }}</div>
|
||||
<div class="group-complaint-list">
|
||||
<List>
|
||||
<ListItem v-for="(item, index) in typeList" :key="index" :class="{ 'active': typeId == item.id }">
|
||||
<div class="text" @click="onSelectType(item)">{{ $L(item.label) }}</div>
|
||||
<RadioGroup v-model="typeId">
|
||||
<Radio :label="item.id" :model-value="typeId"> </Radio>
|
||||
</RadioGroup>
|
||||
</ListItem>
|
||||
</List>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="group-complaint-title required">{{ $L('请输入举报原因:') }}</div>
|
||||
<div class="group-complaint-reason">
|
||||
<Input v-model="reason" type="textarea" maxlength="500" :autosize="{ minRows: 4, maxRows: 8 }"
|
||||
:placeholder="$L('请输入填写详细的举报原因,以使我们更好的帮助你解决问题')" />
|
||||
</div>
|
||||
<div class="group-complaint-img">
|
||||
<ImgUpload v-model="imgs" :num="5" :width="512" :height="512" :whcut="1"></ImgUpload>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="group-info-button">
|
||||
<Button @click="onSubmit" type="primary" icon="md-add">{{ $L("提交") }}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ImgUpload from "../../../components/ImgUpload";
|
||||
|
||||
export default {
|
||||
name: "DialogComplaint",
|
||||
components: { ImgUpload },
|
||||
props: {
|
||||
dialogId: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
typeList: [
|
||||
{ id: 10, label: "诈骗诱导转账" },
|
||||
{ id: 20, label: "引流下载其他APP付费" },
|
||||
{ id: 30, label: "敲诈勒索" },
|
||||
{ id: 40, label: "照片与本人不一致" },
|
||||
{ id: 50, label: "色情低俗" },
|
||||
{ id: 60, label: "频繁广告骚扰" },
|
||||
{ id: 70, label: "其他问题" }
|
||||
],
|
||||
typeId: 0,
|
||||
reason: '',
|
||||
imgs: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSelectType(item) {
|
||||
if (this.typeId == item.id) {
|
||||
this.typeId = 0;
|
||||
} else {
|
||||
this.typeId = item.id;
|
||||
}
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
if (!this.typeId) {
|
||||
return $A.modalError("请选择举报类型");
|
||||
}
|
||||
if (!this.reason) {
|
||||
return $A.modalError("请填写举报原因");
|
||||
}
|
||||
//
|
||||
this.$store.dispatch("call", {
|
||||
url: 'complaint/submit',
|
||||
data: {
|
||||
dialog_id: this.dialogId,
|
||||
reason: this.reason,
|
||||
type: this.typeId,
|
||||
imgs: this.imgs
|
||||
}
|
||||
}).then(({ data }) => {
|
||||
$A.modalSuccess("举报成功");
|
||||
this.$emit("on-close")
|
||||
}).catch(({ msg }) => {
|
||||
$A.modalError(msg);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -80,6 +80,9 @@
|
||||
<EDropdownItem command="searchMsg">
|
||||
<div>{{$L('搜索消息')}}</div>
|
||||
</EDropdownItem>
|
||||
<EDropdownItem v-if="dialogData.bot == 0" command="report">
|
||||
<div>{{$L('举报投诉')}}</div>
|
||||
</EDropdownItem>
|
||||
<template v-if="dialogData.type === 'user'">
|
||||
<EDropdownItem v-if="isManageBot" command="modifyNormal">
|
||||
<div>{{$L('修改资料')}}</div>
|
||||
@ -556,6 +559,14 @@
|
||||
<DialogGroupInfo v-if="groupInfoShow" :dialogId="dialogId" @on-close="groupInfoShow=false"/>
|
||||
</DrawerOverlay>
|
||||
|
||||
<!--举报投诉-->
|
||||
<DrawerOverlay
|
||||
v-model="reportShow"
|
||||
placement="right"
|
||||
:size="500">
|
||||
<DialogComplaint v-if="reportShow" :dialogId="dialogId" @on-close="reportShow=false"/>
|
||||
</DrawerOverlay>
|
||||
|
||||
<!--群转让-->
|
||||
<Modal
|
||||
v-model="groupTransferShow"
|
||||
@ -660,6 +671,7 @@ import UserSelect from "../../../components/UserSelect.vue";
|
||||
import UserAvatarTip from "../../../components/UserAvatar/tip.vue";
|
||||
import DialogGroupWordChain from "./DialogGroupWordChain";
|
||||
import DialogGroupVote from "./DialogGroupVote";
|
||||
import DialogComplaint from "./DialogComplaint";
|
||||
import touchclick from "../../../directives/touchclick";
|
||||
|
||||
export default {
|
||||
@ -678,6 +690,7 @@ export default {
|
||||
ApproveDetails,
|
||||
DialogGroupWordChain,
|
||||
DialogGroupVote,
|
||||
DialogComplaint,
|
||||
},
|
||||
directives: {touchclick},
|
||||
|
||||
@ -754,6 +767,7 @@ export default {
|
||||
openId: 0,
|
||||
dialogDrag: false,
|
||||
groupInfoShow: false,
|
||||
reportShow: false,
|
||||
|
||||
groupTransferShow: false,
|
||||
groupTransferLoad: 0,
|
||||
@ -2467,6 +2481,10 @@ export default {
|
||||
case "exit":
|
||||
this.onExitGroup()
|
||||
break;
|
||||
|
||||
case "report":
|
||||
this.reportShow = true
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -28,3 +28,4 @@
|
||||
@import "task-exist-tips";
|
||||
@import "calendar";
|
||||
@import "dialog-droup-word-chain";
|
||||
@import "dialog-complaint-info";
|
||||
|
||||
60
resources/assets/sass/pages/components/dialog-complaint-info.scss
vendored
Normal file
60
resources/assets/sass/pages/components/dialog-complaint-info.scss
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
.dialog-complaint-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
.group-complaint-title {
|
||||
margin: 18px 24px 0;
|
||||
color: #303133;
|
||||
&.required:after {
|
||||
content: "*";
|
||||
color: #e61f1f;
|
||||
font-size: 22px;
|
||||
}
|
||||
&.underline {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #e8eaec;
|
||||
}
|
||||
}
|
||||
|
||||
.group-complaint-list {
|
||||
margin: 0 24px 0;
|
||||
.ivu-list-item {
|
||||
border-bottom: 1px solid #f9f9f9;
|
||||
padding: 0;
|
||||
&:active {
|
||||
background-color: #fbfbfb;
|
||||
}
|
||||
.text {
|
||||
width: calc(100% - 32px);
|
||||
height: 100%;
|
||||
padding: 12px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.group-complaint-reason {
|
||||
margin: 12px 24px 18px;
|
||||
padding: auto;
|
||||
}
|
||||
|
||||
.group-complaint-img {
|
||||
margin: 12px 24px 18px;
|
||||
}
|
||||
|
||||
.group-info-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 18px 24px;
|
||||
cursor: pointer;
|
||||
|
||||
> button {
|
||||
margin: 0 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8,8 +8,9 @@ use App\Http\Controllers\Api\DialogController;
|
||||
use App\Http\Controllers\Api\PublicController;
|
||||
use App\Http\Controllers\Api\ReportController;
|
||||
use App\Http\Controllers\Api\SystemController;
|
||||
use App\Http\Controllers\Api\ProjectController;
|
||||
use App\Http\Controllers\Api\ApproveController;
|
||||
use App\Http\Controllers\Api\ProjectController;
|
||||
use App\Http\Controllers\Api\ComplaintController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -51,6 +52,9 @@ Route::prefix('api')->middleware(['webapi'])->group(function () {
|
||||
// 审批
|
||||
Route::any('approve/{method}', ApproveController::class);
|
||||
Route::any('approve/{method}/{action}', ApproveController::class);
|
||||
// 投诉
|
||||
Route::any('complaint/{method}', ComplaintController::class);
|
||||
Route::any('complaint/{method}/{action}', ComplaintController::class);
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user