feat: 运营管理开发
parent
73f21f1ed9
commit
ff60507e8e
@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
/** 查询任务列表 */
|
||||||
|
export function queryTaskList(data, page, size) {
|
||||||
|
return request({
|
||||||
|
url: `/taskRecord/taskList?page=${page}&size=${size}`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 取消任务 */
|
||||||
|
export function cancelTask(data) {
|
||||||
|
return request({
|
||||||
|
url: `/taskRecord/cancelTask`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除任务 */
|
||||||
|
export function deleteTask(data) {
|
||||||
|
return request({
|
||||||
|
url: `/taskRecord/deleteTask`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 查询案件列表 */
|
||||||
|
export function queryCaseList(data, page, size) {
|
||||||
|
return request({
|
||||||
|
url: `/mro/caseList?page=${page}&size=${size}`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 案件一键分析 */
|
||||||
|
export function caseAnalysis(data) {
|
||||||
|
return request({
|
||||||
|
url: `/mro/caseAnalysis`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,148 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="content">
|
||||||
|
<cs-search title="案件批量处理" :data="searchData" :span="6" direction="row" @onSearch="onSearch" @getData="onSearch" />
|
||||||
|
<div class="index-content">
|
||||||
|
<div class="header">
|
||||||
|
<el-button type="primary" icon="el-icon-video-play" @click="handleAnalysisAll">一键分析</el-button>
|
||||||
|
</div>
|
||||||
|
<vxe-grid ref="modelTable" :checkbox-config="{ checkMethod: checCheckboxkMethod}" :row-config="{isHover: true}" v-bind="gridOptions" style="margin-top: 20px">
|
||||||
|
<template #operate="{row}">
|
||||||
|
<el-button :disabled="['1'].includes(row.analysisStatus)" type="text" @click="handleAnalysis(row)">模型分析</el-button>
|
||||||
|
</template>
|
||||||
|
<template #identifyResult="{row}">
|
||||||
|
<span>{{ getTypeName(row.identifyResult,'identify_result') }}</span>
|
||||||
|
</template>
|
||||||
|
<template #analysisStatus="{row}">
|
||||||
|
<span>{{ getTypeName(row.analysisStatus,'case_analysis_status') }}</span>
|
||||||
|
</template>
|
||||||
|
</vxe-grid>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<cs-page
|
||||||
|
:page.sync="queryForm.page"
|
||||||
|
:limit.sync="queryForm.size"
|
||||||
|
:total="queryForm.total"
|
||||||
|
@pagination="fetchData"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import mixin from '@/views/mixin'
|
||||||
|
import { queryCaseList, caseAnalysis } from '@/api/operationManagement'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'HandleCases',
|
||||||
|
mixins: [mixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 筛选数据
|
||||||
|
searchData: [
|
||||||
|
{ label: '案件名称', model: 'caseName', type: 'input' },
|
||||||
|
{ label: '认定结果', model: 'identifyResult', type: 'selectMultiple', option: JSON.parse(sessionStorage.getItem('identify_result')) },
|
||||||
|
{ label: '分析状态', model: 'analysisStatus', type: 'selectMultiple', option: JSON.parse(sessionStorage.getItem('case_analysis_status')) }
|
||||||
|
],
|
||||||
|
// 表格配置
|
||||||
|
gridOptions: {
|
||||||
|
...mixin.data().gridOptions,
|
||||||
|
columns: [
|
||||||
|
{ type: 'checkbox', width: '50px' },
|
||||||
|
// { type: 'checkbox', width: '50px', disabled: function(row) {
|
||||||
|
// return ['1', '2'].includes(row.analysisStatus)
|
||||||
|
// } },
|
||||||
|
{ title: '序号', type: 'seq', width: '50px' },
|
||||||
|
{ title: '案件名称', field: 'caseName' },
|
||||||
|
{ title: '认定结果', field: 'identifyResult', slots: { default: 'identifyResult' }},
|
||||||
|
{ title: '分析状态', field: 'analysisStatus', slots: { default: 'analysisStatus' }},
|
||||||
|
{ title: '最新分析时间', field: 'analysisSuccessTime' },
|
||||||
|
{ title: '操作', slots: { default: 'operate' }, fixed: 'right', width: '150px' }
|
||||||
|
],
|
||||||
|
data: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.tableHeight(390)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 数据查询
|
||||||
|
fetchData() {
|
||||||
|
queryCaseList({ ...this.searchFormData }, this.queryForm.page, this.queryForm.size).then(res => {
|
||||||
|
this.gridOptions.data = res.data.records
|
||||||
|
this.queryForm.total = res.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
checCheckboxkMethod({ row }) {
|
||||||
|
// 这里写你的条件
|
||||||
|
if (['1'].includes(row.analysisStatus)) {
|
||||||
|
return false// 禁用 ture为可用
|
||||||
|
} else {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleAnalysisAll() {
|
||||||
|
const item = this.$refs.modelTable.getCheckboxRecords()
|
||||||
|
if (item.length === 0) {
|
||||||
|
this.$baseMessage.error('请至少选择一条数据!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const list = []
|
||||||
|
for (const items of item) {
|
||||||
|
list.push(items.caseId)
|
||||||
|
}
|
||||||
|
this.handlecaseAnalysis(list)
|
||||||
|
},
|
||||||
|
getTypeName(val, type) {
|
||||||
|
for (const item of JSON.parse(sessionStorage.getItem(type))) {
|
||||||
|
if (item.value === val) {
|
||||||
|
return item.label
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handlecaseAnalysis(list) {
|
||||||
|
const loading = this.$baseLoading(1, '执行中...')
|
||||||
|
const res = await caseAnalysis(list)
|
||||||
|
loading.close()
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$baseMessage.success('分析成功')
|
||||||
|
this.fetchData()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleAnalysis(row) {
|
||||||
|
row.analysisStatus = '1'
|
||||||
|
this.handlecaseAnalysis([row.caseId])
|
||||||
|
},
|
||||||
|
// 筛选
|
||||||
|
onSearch(data, callback) {
|
||||||
|
this.searchFormData = Object.assign({}, data)
|
||||||
|
this.queryForm.page = 1
|
||||||
|
this.fetchData()
|
||||||
|
if (callback) callback(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.content {
|
||||||
|
height: 100%;
|
||||||
|
.index-content {
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
}
|
||||||
|
border-radius: 8px;
|
||||||
|
background: white;
|
||||||
|
padding: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 10px;
|
||||||
|
height: calc(100% - 123px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,218 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<cs-drawer
|
||||||
|
:drawer-option="drawerOption"
|
||||||
|
@onReset="handleReset"
|
||||||
|
@onSubmit="handleSubmit"
|
||||||
|
>
|
||||||
|
<template slot="content">
|
||||||
|
<div class="DataExtract">
|
||||||
|
<div class="header">
|
||||||
|
<span style="margin-bottom: 16px;">{{ dataInfo.name }}</span>
|
||||||
|
<span>{{ getTypeName(dataInfo.type) }}</span>
|
||||||
|
</div>
|
||||||
|
<el-form ref="myForm" :model="ruleForm" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="提取范围" prop="type">
|
||||||
|
<el-radio-group v-model="ruleForm.type" @change="changeType">
|
||||||
|
<el-radio :label="0">全部案件</el-radio>
|
||||||
|
<el-radio :label="1">指定案件</el-radio>
|
||||||
|
<el-radio :label="2">指定笔录</el-radio>
|
||||||
|
<el-radio :disabled="dataInfo.type === '1'" :label="3">指定证据</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-show="ruleForm.type === 1" label="案件名称" prop="caseIdList">
|
||||||
|
<el-select v-model="ruleForm.caseIdList" multiple style="width: 100%;" placeholder="请选择案件名称">
|
||||||
|
<el-option
|
||||||
|
v-for="item in caseOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.caseName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="ruleForm.type === 2 || ruleForm.type === 3 " label="案件名称" prop="caseId">
|
||||||
|
<el-select v-model="ruleForm.caseId" style="width: 100%;" placeholder="请选择案件名称" @change="selectCase">
|
||||||
|
<el-option
|
||||||
|
|
||||||
|
v-for="item in caseOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.caseName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="ruleForm.type === 2" label="案件笔录" prop="recordIdList">
|
||||||
|
<el-select v-model="ruleForm['recordIdList']" multiple style="width: 100%;" placeholder="请选择案件笔录">
|
||||||
|
<el-option
|
||||||
|
v-for="item in recordOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.confessionMaterial"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="ruleForm.type === 3" label="案件证据" prop="evidenceIdList">
|
||||||
|
<el-select v-model="ruleForm['evidenceIdList']" multiple style="width: 100%;" placeholder="请选择案件证据">
|
||||||
|
<el-option
|
||||||
|
v-for="item in evidenceOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.evidenceName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</cs-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { queryCaseList } from '@/api/caseManagement'
|
||||||
|
import { queryRecordList, queryEvidenceList } from '@/api/caseDetails'
|
||||||
|
import { executePromptExtractTask } from '@/api/promptManagement'
|
||||||
|
export default {
|
||||||
|
name: 'DataExtract',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
drawerOption: {
|
||||||
|
show: false,
|
||||||
|
title: '数据提取任务',
|
||||||
|
width: '40%'
|
||||||
|
},
|
||||||
|
dataInfo: {
|
||||||
|
name: '',
|
||||||
|
type: ''
|
||||||
|
},
|
||||||
|
promptType: JSON.parse(sessionStorage.getItem('prompt_type')),
|
||||||
|
ruleForm: {
|
||||||
|
type: 0,
|
||||||
|
caseId: '',
|
||||||
|
caseIdList: [],
|
||||||
|
recordIdList: [],
|
||||||
|
evidenceIdList: []
|
||||||
|
|
||||||
|
},
|
||||||
|
caseOptions: [],
|
||||||
|
recordOptions: [],
|
||||||
|
evidenceOptions: [],
|
||||||
|
rules: {
|
||||||
|
type: [{ required: true, message: '请选择提取范围!', trigger: 'change' }],
|
||||||
|
caseIdList: [{ required: true, message: '请选择案件名称!', trigger: 'change' }],
|
||||||
|
caseId: [{ required: true, message: '请选择案件名称!', trigger: 'change' }],
|
||||||
|
recordIdList: [{ required: true, message: '请选择案件笔录!', trigger: 'change' }],
|
||||||
|
evidenceIdList: [{ required: true, message: '请选择案件证据!', trigger: 'change' }]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getCaseList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 显示弹窗
|
||||||
|
show(data) {
|
||||||
|
this.dataInfo = JSON.parse(JSON.stringify(data))
|
||||||
|
this.drawerOption.show = true
|
||||||
|
this.ruleForm = {
|
||||||
|
type: 0,
|
||||||
|
caseId: '',
|
||||||
|
caseIdList: [],
|
||||||
|
recordIdList: [],
|
||||||
|
evidenceIdList: []
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getCaseList() {
|
||||||
|
queryCaseList({}, 1, 9999).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.caseOptions = res.data.records
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询笔录
|
||||||
|
getRecordData() {
|
||||||
|
queryRecordList({ caseId: this.ruleForm.caseId }, 1, 999999).then(res => {
|
||||||
|
this.recordOptions = res.data.result
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询证据
|
||||||
|
getEvidenceData() {
|
||||||
|
queryEvidenceList({ caseId: this.ruleForm.caseId }, 1, 999999).then(res => {
|
||||||
|
this.evidenceOptions = res.data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTypeName(val) {
|
||||||
|
for (const item of this.promptType) {
|
||||||
|
if (item.value === val) {
|
||||||
|
return item.label
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
handleReset() {
|
||||||
|
this.$refs.myForm.resetFields()
|
||||||
|
this.$refs.myForm.clearValidate()
|
||||||
|
},
|
||||||
|
changeType(val) {
|
||||||
|
this.$refs.myForm.resetFields()
|
||||||
|
this.ruleForm.caseId = ''
|
||||||
|
this.ruleForm.caseIdList = []
|
||||||
|
this.ruleForm.recordIdList = []
|
||||||
|
this.ruleForm.evidenceIdList = []
|
||||||
|
this.ruleForm.type = val
|
||||||
|
this.$refs.myForm.clearValidate()
|
||||||
|
console.log('11111', this.ruleForm)
|
||||||
|
},
|
||||||
|
selectCase() {
|
||||||
|
this.getRecordData()
|
||||||
|
this.getEvidenceData()
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
this.$refs.myForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
const loading = this.$baseLoading(1, '保存中...')
|
||||||
|
const params = {
|
||||||
|
type: this.ruleForm.type,
|
||||||
|
promptId: this.dataInfo.id
|
||||||
|
}
|
||||||
|
if (this.ruleForm.type === 1) {
|
||||||
|
params.caseId = this.ruleForm.caseIdList.join(',')
|
||||||
|
} else if (this.ruleForm.type === 2) {
|
||||||
|
params.caseId = this.ruleForm.caseId
|
||||||
|
params.recordId = this.ruleForm.recordIdList.join(',')
|
||||||
|
} else if (this.ruleForm.type === 3) {
|
||||||
|
params.caseId = this.ruleForm.caseId
|
||||||
|
params.evidenceId = this.ruleForm.evidenceIdList.join(',')
|
||||||
|
}
|
||||||
|
executePromptExtractTask(params).then(res => {
|
||||||
|
loading.close()
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.drawerOption.show = false
|
||||||
|
this.$baseMessage.success('提取成功')
|
||||||
|
}
|
||||||
|
}).catch(() => { loading.close() })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.DataExtract {
|
||||||
|
.header {
|
||||||
|
background: #F6F8F9;
|
||||||
|
border-radius: 8px 8px 8px 8px;
|
||||||
|
padding: 16px;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-left: 36px;
|
||||||
|
span {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue