You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fu-hsi-web/src/views/caseManagement/components/ModelAnalysis.vue

164 lines
5.1 KiB
Vue

10 months ago
<!--
* @description: 模型分析弹窗
* @fileName: ModelAnalysis
* @author: 17076
* @date: 2024/6/13-下午3:22
* @version: V1.0.0
-->
<template>
<cs-dialog
:dialog="dialogOption"
>
<div slot="content">
<p style="margin-top: 0">分析<span style="font-weight: bold">{{ `${caseData['caseName']}` }}</span>获取智能取证分析结果</p>
<el-form :model="caseData" label-width="60px">
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="行为人">
<div class="flex-row">
10 months ago
<el-input v-model="caseData['lawActorName']" :disabled="!doreEdit" />
10 months ago
<el-button v-show="false" :plain="!doreEdit" type="primary" style="margin-left: 10px" @click="handelDore">{{ doreEdit ? '' : '' }}</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="当事人">
<div class="flex-row">
<el-input v-model="caseData['lawParty']" :disabled="!victimEdit" />
<el-button v-show="false" :plain="!victimEdit" type="primary" style="margin-left: 10px" @click="handleVictim">{{ victimEdit ? '' : '' }}</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<h4>原子指标人工判别项</h4>
<vxe-grid ref="xTable" v-bind="gridOptions">
<template #result_edit="{row}">
10 months ago
<el-select v-model="row['atomicResult']" placeholder="请选择">
10 months ago
<el-option
v-for="item in resultOptions"
:key="item.value"
:value="item.value"
:label="item.label"
/>
</el-select>
</template>
10 months ago
<template #remark_edit="{row}">
<el-input v-model="row['remark']" placeholder="请输入" />
</template>
10 months ago
</vxe-grid>
<div style="text-align: center;margin-top: 10px">
<el-button type="primary" plain style="width: 80px" @click="() => { dialogOption.show = false }">取消</el-button>
<el-button type="primary" style="width: 80px" @click="handelSave"></el-button>
<el-button type="primary" style="width: 80px" @click="handleExecute"></el-button>
</div>
</div>
</cs-dialog>
</template>
<script>
import mixin from '@/views/mixin'
10 months ago
import { listCaseAtomicIndex, saveCaseAtomicResult } from '@/api/caseDetails'
10 months ago
export default {
name: 'ModelAnalysis',
mixins: [mixin],
data() {
return {
dialogOption: {
show: false,
// width: '30%',
top: '50px',
hiddenFooter: true,
title: {
title: '确定执行模型分析'
}
},
// 行为人是否可编辑
doreEdit: false,
// 受害人是否可编辑
victimEdit: false,
caseData: {},
caseId:"",
10 months ago
// 人工指标判别项
gridOptions: {
...mixin.data().gridOptions,
editConfig: {
trigger: 'click',
mode: 'cell'
},
editRules: {
result: [{ required: true, message: '判断结果不能为空!' }]
},
columns: [
{ title: '序号', type: 'seq', width: '50px' },
{ title: '指标名称', field: 'indexName' },
10 months ago
{ title: '原子指标', field: 'automicIndexName' },
{ title: '判断结果', field: 'atomicResult', formatter: ({ cellValue }) => {
10 months ago
return cellValue ? this.resultOptions.find(item => item.value === cellValue).label : ''
10 months ago
}, editRender: {}, slots: { edit: 'result_edit' }},
{ title: '备注', field: 'remark', formatter: ({ cellValue }) => {
return cellValue || ''
}, editRender: {}, slots: { edit: 'remark_edit' }}
10 months ago
],
data: []
},
resultOptions: JSON.parse(sessionStorage.getItem('judge_result'))
}
},
methods: {
// 显示弹窗
show(data) {
debugger
this.caseId = data.id
10 months ago
this.dialogOption.show = true
this.caseData = data
10 months ago
this.fetchData()
10 months ago
},
// 修改/保存行为人
handelDore() {
this.doreEdit = !this.doreEdit
},
// 修改/保存当事人
handleVictim() {
this.victimEdit = !this.victimEdit
},
// 保存
async handelSave() {
const error = await this.$refs.xTable.validate(true)
console.log(error, 666)
10 months ago
this.save()
},
async save() {
const res = await saveCaseAtomicResult({
caseAtomicIndexList: this.gridOptions.data,
caseId: this.caseId
10 months ago
})
if (res.code === 200) {
this.$baseMessage.success('保存成功')
this.dialogOption.show = false
}
10 months ago
},
// 确认执行
10 months ago
async handleExecute() {
await this.save()
10 months ago
this.$emit('confirm', this.caseData)
this.dialogOption.show = false
10 months ago
},
// 获取数据
fetchData() {
const params = {
caseId: this.caseId
10 months ago
}
listCaseAtomicIndex(params).then(res => {
this.gridOptions.data = res.data
})
10 months ago
}
}
}
</script>
<style scoped lang="scss">
</style>