(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["duplicate-review-page"],{1447:function(e,t,i){"use strict";var a=i("04c2"),r=i("203c"),s=i("db2f"),o=i("62f1"),n=i("ed14"),l=i("d5f7"),d=i("8dda"),c=i("00c3"),u=i("56ce"),v=TypeError,h=u((function(){[].keys().reduce((function(){}),void 0)})),p=!h&&d("reduce",v);a({target:"Iterator",proto:!0,real:!0,forced:h||p},{reduce:function(e){o(this);try{s(e)}catch(u){l(this,"throw",u)}var t=arguments.length<2,i=t?void 0:arguments[1];if(p)return c(p,this,t?[e]:[e,i]);var a=n(this),d=0;if(r(a,(function(a){t?(t=!1,i=a):i=e(i,a,d),d++}),{IS_RECORD:!0}),t)throw new v("Reduce of empty iterator with no initial value");return i}})},3739:function(e,t,i){"use strict";var a=i("04c2"),r=i("ac1e"),s=i("203c"),o=i("db2f"),n=i("62f1"),l=i("ed14"),d=i("d5f7"),c=i("8dda"),u=c("find",TypeError);a({target:"Iterator",proto:!0,real:!0,forced:u},{find:function(e){n(this);try{o(e)}catch(a){d(this,"throw",a)}if(u)return r(u,this,e);var t=l(this),i=0;return s(t,(function(t,a){if(e(t,i++))return a(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},4498:function(e,t,i){},"4c15":function(e,t,i){"use strict";var a=i("79b9"),r=i("e833"),s=i("8270"),o=function(e){return r.slice(0,e.length)===e};e.exports=function(){return o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":a.Bun&&"string"==typeof Bun.version?"BUN":a.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(a.process)?"NODE":a.window&&a.document?"BROWSER":"REST"}()},"50b7":function(e,t,i){"use strict";var a=i("f43f"),r=i("42ee"),s=i("62fc"),o=URLSearchParams.prototype,n=r(o.forEach);a&&!("size"in o)&&s(o,"size",{get:function(){var e=0;return n(this,(function(){e++})),e},configurable:!0,enumerable:!0})},5545:function(e,t,i){"use strict";var a=i("768e"),r=i("42ee"),s=i("bd47"),o=i("de54"),n=URLSearchParams,l=n.prototype,d=r(l.append),c=r(l["delete"]),u=r(l.forEach),v=r([].push),h=new n("a=1&a=2&b=3");h["delete"]("a",1),h["delete"]("b",void 0),h+""!=="a=2"&&a(l,"delete",(function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return c(this,e);var a=[];u(this,(function(e,t){v(a,{key:t,value:e})})),o(t,1);var r,n=s(e),l=s(i),h=0,p=a.length;while(h
{var i,a,r;const s=String((null===e||void 0===e?void 0:e.targetCaseNo)||(null===e||void 0===e?void 0:e.target_case_no)||"").trim();if(!s)return null;const o=null!==(i=null!==(a=null===e||void 0===e?void 0:e.targetMaterialId)&&void 0!==a?a:null===e||void 0===e?void 0:e.target_material_id)&&void 0!==i?i:null,n=String((null===e||void 0===e?void 0:e.targetFileHash)||(null===e||void 0===e?void 0:e.target_file_hash)||"").trim(),l=Boolean(null===e||void 0===e?void 0:e.openable)&&Boolean(s);return{key:`${s}-${null!==(r=null!==o&&void 0!==o?o:n)&&void 0!==r?r:t}`,targetCaseNo:s,targetPolicyNo:String((null===e||void 0===e?void 0:e.targetPolicyNo)||(null===e||void 0===e?void 0:e.target_policy_no)||"").trim(),targetMaterialId:o,targetMaterialType:String((null===e||void 0===e?void 0:e.targetMaterialType)||(null===e||void 0===e?void 0:e.target_material_type)||"").trim(),targetFileHash:n,openable:l,disabledReason:String((null===e||void 0===e?void 0:e.disabledReason)||(null===e||void 0===e?void 0:e.disabled_reason)||"").trim(),matchCountInCase:Number((null===e||void 0===e?void 0:e.matchCountInCase)||(null===e||void 0===e?void 0:e.match_count_in_case)||0)||0}}).filter(Boolean)}function r(e={}){return o("/calculatorTool/medicalThreeColumn",e)}function s(e,t,i){const a=Array.isArray(e)?e:[],r=void 0===t||null===t?"":String(t),s=r?a.find(e=>String((null===e||void 0===e?void 0:e.material_id)||(null===e||void 0===e?void 0:e.id)||"")===r):null;return s&&null!==i&&void 0!==i&&i[r]?s:a.find(e=>{const t=(null===e||void 0===e?void 0:e.material_id)||(null===e||void 0===e?void 0:e.id);return void 0!==t&&null!==t&&Boolean(null===i||void 0===i?void 0:i[String(t)])})||null}function o(e,t={}){const i=new URLSearchParams,a=(e,t)=>{void 0!==t&&null!==t&&""!==t&&i.set(e,String(t))};a("caseNo",t.caseNo),a("focusMaterialId",t.focusMaterialId),a("focusFileHash",t.focusFileHash),a("focusMaterialType",t.focusMaterialType),a("sourceCaseNo",t.sourceCaseNo),a("sourceMaterialId",t.sourceMaterialId);const r=i.toString();return r?`${e}?${r}`:e}function n(e){if(void 0===e||null===e||""===e)return!1;const t=String(e).trim();if(!t)return!1;const i=Number(t);return Number.isFinite(i)&&i<0}function l(e){const t=void 0===e||null===e?"":String(e).trim();if(!t)return[];const i=[t],a=Number(t);if(Number.isFinite(a)&&0!==a){const e=String(Math.abs(a)),t="-"+e;i.includes(e)||i.push(e),i.includes(t)||i.push(t)}return i}function d(e,t,i){const a=Array.isArray(e)?e:[],r=l(t);if(r.length){const e=a.find(e=>{const t=String((null===e||void 0===e?void 0:e.material_id)||(null===e||void 0===e?void 0:e.id)||"").trim();return t&&r.includes(t)});if(e)return e}const s=String(i||"").trim();return s&&a.find(e=>{const t=String((null===e||void 0===e?void 0:e.file_hash)||(null===e||void 0===e?void 0:e.fileHash)||(null===e||void 0===e?void 0:e.imgMark)||"").trim();return t&&t===s})||null}function c(e,t){const i=Array.isArray(e)?e:[],a=String(t||"").trim();return a&&i.find(e=>{const t=String((null===e||void 0===e?void 0:e.materials_type)||(null===e||void 0===e?void 0:e.pipeline_materials_type)||(null===e||void 0===e?void 0:e.category)||"").trim();return t&&t===a})||null}},"84e0":function(e,t,i){},"865d":function(e,t,i){"use strict";var a=i("04c2"),r=i("f370").left,s=i("d1da"),o=i("4de2"),n=i("c3c0"),l=!n&&o>79&&o<83,d=l||!s("reduce");a({target:"Array",proto:!0,forced:d},{reduce:function(e){var t=arguments.length;return r(this,e,t,t>1?arguments[1]:void 0)}})},"86dc":function(e,t,i){"use strict";i("d0a5")},"8ba0":function(e,t,i){"use strict";i("ac48")},"972c":function(e,t,i){"use strict";i("84e0")},aaf6:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"duplicate-review-page public_box"},[t("div",{staticClass:"duplicate-review-page__header"},[t("div",[t("div",{staticClass:"duplicate-review-page__nav"},[t("el-button",{attrs:{size:"mini",plain:""},on:{click:e.goWorkbench}},[e._v("返回核验工作台")]),t("el-button",{attrs:{size:"mini",type:"text"},on:{click:e.goSimilarImageReview}},[e._v("切换到相似图片核验")])],1),t("h2",[e._v("重复图片复核页面")]),t("p",[e._v("集中判断 confirmed_duplicate_hash_record 里的候选图片,是否值得进入深挖风险页面继续使用")])]),t("duplicate-review-filter-bar",{attrs:{"only-pending":e.filters.onlyPending,"llm-category-level1":e.filters.llmCategoryLevel1},on:{input:e.handleReviewStatusChange,"toggle-only-pending":e.handleOnlyPendingToggle,"category-change":e.handleCategoryChange},model:{value:e.filters.reviewStatus,callback:function(t){e.$set(e.filters,"reviewStatus",t)},expression:"filters.reviewStatus"}})],1),e.errorMessage?t("el-alert",{staticClass:"duplicate-review-page__alert",attrs:{type:"error",closable:!1,title:e.errorMessage}}):e._e(),e.loading||e.records.length?e._e():t("el-empty",{attrs:{description:"当前无可复核记录"}}),e.records.length?t("div",{staticClass:"duplicate-review-page__batch-bar"},[t("div",{staticClass:"duplicate-review-page__batch-summary"},[e._v(" 当前页共 "+e._s(e.records.length)+" 条,可一键批量判断 ")]),t("div",{staticClass:"duplicate-review-page__batch-actions"},[t("el-radio-group",{staticClass:"duplicate-review-page__batch-group",attrs:{size:"mini"},model:{value:e.batchDecision,callback:function(t){e.batchDecision=t},expression:"batchDecision"}},[t("el-radio-button",{attrs:{label:"pending"}},[e._v("待定")]),t("el-radio-button",{attrs:{label:"useful"}},[e._v("有用")]),t("el-radio-button",{attrs:{label:"not-useful"}},[e._v("无用")])],1),t("el-button",{attrs:{size:"mini",type:"primary",loading:e.batchSaving},on:{click:e.handleBatchSaveConfirm}},[e._v(" 当前页批量保存 ")])],1)]):e._e(),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"duplicate-review-page__list"},e._l(e.records,(function(i){return t("duplicate-review-card",{key:i.reviewRecordId,attrs:{record:i,"duplicate-cases":e.resolveRecordDuplicateCases(i),"case-state":e.ensureCaseState(i),"history-visible":!!e.historyVisibleMap[i.reviewRecordId],"history-loading":!!e.historyLoadingMap[i.reviewRecordId],"history-items":e.historyMap[i.reviewRecordId]||[]},on:{"open-duplicate-case":function(t){return e.handleOpenDuplicateCase(i,t)},"toggle-case-list":function(t){return e.handleToggleCaseList(i)},"change-case-page":function(t){return e.handleCasePageChange(i,t)}},scopedSlots:e._u([{key:"actions",fn:function(){return[t("duplicate-review-decision-panel",{attrs:{saving:e.savingRecordId===i.reviewRecordId,"history-visible":!!e.historyVisibleMap[i.reviewRecordId]},on:{save:function(t){return e.handleSave(i)},"toggle-history":function(t){return e.toggleHistory(i)}},model:{value:e.draftStatusMap[i.reviewRecordId],callback:function(t){e.$set(e.draftStatusMap,i.reviewRecordId,t)},expression:"draftStatusMap[record.reviewRecordId]"}})]},proxy:!0}],null,!0)})})),1),t("div",{staticClass:"duplicate-review-page__pagination"},[t("el-pagination",{attrs:{background:"",layout:"prev, pager, next","current-page":e.filters.pageNo,"page-size":e.filters.pageSize,total:e.total},on:{"current-change":e.handlePageChange}})],1)],1)},r=[],s=(i("0f5d"),i("b138"),i("865d"),i("8f26"),i("d9d9"),i("666b"),i("963e"),i("1447"),function(){var e=this,t=e._self._c;return t("el-card",{staticClass:"duplicate-review-card",attrs:{shadow:"hover"}},[t("div",{staticClass:"duplicate-review-card__header"},[t("div",[t("div",{staticClass:"duplicate-review-card__title"},[e._v("复核记录 #"+e._s(e.record.reviewRecordId||"-"))]),t("div",{staticClass:"duplicate-review-card__meta"},[t("span",[e._v("64位 hash:"+e._s(e.sourceHashText))]),t("span",[e._v("32位 md5:"+e._s(e.md5HashText))]),e.record.llmCategoryLevel1?t("span",[e._v("一级分类:"+e._s(e.record.llmCategoryLevel1))]):e._e(),t("el-tag",{attrs:{size:"mini",type:e.recordStatusType}},[e._v(e._s(e.record.recordStatus||"unknown"))])],1)]),t("el-tag",{attrs:{size:"mini",type:e.reviewStatusType}},[e._v(e._s(e.statusLabel))])],1),t("div",{staticClass:"duplicate-review-card__body"},[t("div",{staticClass:"duplicate-review-card__preview"},[t("div",{staticClass:"duplicate-review-card__image-title"},[e._v(" "+e._s(e.record.leftMaterialLabel||"候选图片")+" ")]),e.showLeftLoading?t("div",{staticClass:"duplicate-review-card__loading"},[t("i",{staticClass:"el-icon-loading duplicate-review-card__loading-icon"}),t("span",[e._v("图片加载中")])]):e.showLeftImage?t("img",{ref:"leftImage",staticClass:"duplicate-review-card__image",attrs:{src:e.leftDisplayUrl,loading:"lazy",decoding:"async",fetchpriority:"low"},on:{load:e.handleLeftImageLoad,error:e.handleLeftImageError}}):t("div",{staticClass:"duplicate-review-card__placeholder"},[e._v("候选图片不可用")])]),t("div",{staticClass:"duplicate-review-card__cases"},[t("div",{staticClass:"duplicate-review-card__cases-header"},[t("div",{staticClass:"duplicate-review-card__cases-title"},[t("span",[e._v("包含该图片的案件")]),t("el-tag",{attrs:{size:"mini",type:"info"}},[e._v(e._s(e.record.duplicateCaseCount||0))])],1),e.showCaseToggle?t("button",{staticClass:"duplicate-review-card__toggle",attrs:{type:"button"},on:{click:function(t){return e.$emit("toggle-case-list")}}},[e._v(" "+e._s(e.caseToggleLabel)+" ")]):e._e()]),e.showCaseSummary?t("div",{staticClass:"duplicate-review-card__case-summary"},[e._v(" 默认展示前 "+e._s(e.previewCaseCount)+" 个案件,点击后按页加载更多 ")]):e._e(),e.caseState.loading?t("div",{staticClass:"duplicate-review-card__case-loading"},[t("i",{staticClass:"el-icon-loading duplicate-review-card__loading-icon"}),t("span",[e._v("关联案件加载中")])]):e._e(),e.caseState.error?t("div",{staticClass:"duplicate-review-card__warning"},[e._v(e._s(e.caseState.error))]):e._e(),e.duplicateCases.length?t("div",{staticClass:"duplicate-review-card__case-list",class:{"duplicate-review-card__case-list--collapsed":!e.caseState.expanded}},e._l(e.duplicateCases,(function(i){return t("button",{key:i.key||`${i.targetCaseNo}-${i.targetMaterialId||i.targetFileHash}`,staticClass:"duplicate-review-card__case-item",attrs:{type:"button"},on:{click:function(t){return e.$emit("open-duplicate-case",i)}}},[t("span",{staticClass:"duplicate-review-card__case-no"},[e._v(e._s(i.targetCaseNo))]),i.targetMaterialType?t("span",{staticClass:"duplicate-review-card__case-type"},[e._v(e._s(i.targetMaterialType))]):e._e(),i.matchCountInCase?t("span",{staticClass:"duplicate-review-card__case-count"},[e._v("命中 "+e._s(i.matchCountInCase)+" 张")]):e._e()])})),0):t("div",{staticClass:"duplicate-review-card__case-empty"},[e._v("暂无关联案件")]),e.showCasePagination?t("div",{staticClass:"duplicate-review-card__case-pagination"},[t("el-pagination",{attrs:{small:"",background:"",layout:"prev, pager, next","current-page":e.caseState.pageNo||1,"page-size":e.caseState.pageSize||e.defaultCasePageSize,total:e.caseState.total||0},on:{"current-change":function(t){return e.$emit("change-case-page",t)}}})],1):e._e()]),t("div",{staticClass:"duplicate-review-card__side"},[t("div",{staticClass:"duplicate-review-card__context"},[e._v(e._s(e.record.contextSummary||"暂无上下文摘要"))]),e._t("actions"),e.historyVisible?t("div",{staticClass:"duplicate-review-card__history"},[t("div",{staticClass:"duplicate-review-card__history-title"},[e._v("历史变更记录和原因")]),e.historyItems.length?t("el-timeline",e._l(e.historyItems,(function(i){return t("el-timeline-item",{key:`${e.record.riskEventId||e.record.reviewRecordId}-${i.historyId}`,attrs:{timestamp:i.changedAt}},[t("div",{staticClass:"duplicate-review-card__history-reason"},[e._v(" "+e._s(i.reasonDesc||i.reasonCode||"无原因")+" ")]),t("div",{staticClass:"duplicate-review-card__history-detail"},[e._v(" "+e._s(e.buildHistorySummary(i))+" ")])])})),1):e.historyLoading?e._e():t("el-empty",{attrs:{"image-size":60,description:"暂无历史"}})],1):e._e()],2)])])}),o=[],n={name:"DuplicateReviewCard",props:{record:{type:Object,default(){return{}}},duplicateCases:{type:Array,default(){return[]}},caseState:{type:Object,default(){return{}}},historyVisible:{type:Boolean,default:!1},historyLoading:{type:Boolean,default:!1},historyItems:{type:Array,default(){return[]}}},data(){return{leftImageFailed:!1,leftImageLoaded:!1,leftDisplayUrl:""}},created(){this.refreshImageUrls()},mounted(){this.syncLeftImageLoadedState()},computed:{previewCaseCount(){return 12},defaultCasePageSize(){return 20},reviewStatusType(){switch(this.record.reviewStatus){case"useful":return"success";case"not-useful":return"info";default:return"warning"}},recordStatusType(){switch(this.record.recordStatus){case"ready":return"success";case"partial":return"warning";default:return"danger"}},statusLabel(){switch(this.record.reviewStatus){case"useful":return"有用";case"not-useful":return"无用";default:return"待定"}},sourceHashText(){const e=[this.record.sourceHash,this.record.sourceCaseNo],t=e.find(e=>/^[a-fA-F0-9]{64}$/.test(String(e||"").trim()));return t||"-"},md5HashText(){const e=[this.record.md5Hash,this.record.targetFileHash,this.record.targetCaseNo],t=e.find(e=>/^[a-fA-F0-9]{32}$/.test(String(e||"").trim()));return t||"-"},hasLeftImage(){return Boolean(this.record.leftImageUrl)},showLeftLoading(){return this.hasLeftImage&&!this.leftDisplayUrl&&!this.leftImageFailed},showLeftImage(){return Boolean(this.leftDisplayUrl)&&!this.leftImageFailed},hiddenCaseCount(){const e=Number(this.caseState.total||this.record.duplicateCaseCount||0)||0;return Math.max(e-this.previewCaseCount,0)},showCaseToggle(){const e=Number(this.caseState.total||this.record.duplicateCaseCount||0)||0;return e>this.previewCaseCount||this.caseState.expanded},showCaseSummary(){return this.showCaseToggle&&!this.caseState.expanded},caseToggleLabel(){if(this.caseState.expanded)return"收起";const e=Number(this.caseState.total||this.record.duplicateCaseCount||0)||0;return e>this.previewCaseCount?`查看更多案件(共 ${e} 个)`:"查看案件"},showCasePagination(){if(!this.caseState.expanded)return!1;const e=Number(this.caseState.total||0)||0,t=Number(this.caseState.pageSize||this.defaultCasePageSize)||this.defaultCasePageSize;return e>t}},watch:{"record.leftImageUrl"(){this.leftImageFailed=!1,this.leftImageLoaded=!1,this.refreshImageUrls()},"record.reviewRecordId"(){this.leftImageFailed=!1,this.leftImageLoaded=!1,this.refreshImageUrls()},leftDisplayUrl(){this.$nextTick(()=>{this.syncLeftImageLoadedState()})}},methods:{refreshImageUrls(){var e;this.leftDisplayUrl=String((null===(e=this.record)||void 0===e?void 0:e.leftImageUrl)||"").trim()},syncLeftImageLoadedState(){const e=this.$refs.leftImage;e&&this.leftDisplayUrl&&e.complete&&e.naturalWidth>0&&(this.leftImageLoaded=!0)},handleLeftImageLoad(){this.leftImageLoaded=!0},handleLeftImageError(){this.leftImageFailed=!0},resolveStatusLabel(e){const t={pending:"待定",useful:"有用","not-useful":"无用"};return t[e]||(null===e||void 0===e||""===e?"-":String(e))},buildHistorySummary(e={}){const t=this.resolveStatusLabel(e.beforeReviewDecision||e.beforeReviewStatus),i=this.resolveStatusLabel(e.afterReviewDecision||e.afterReviewStatus),a=e.beforeRecordStatus||"-",r=e.afterRecordStatus||"-";return`核验结果 ${t} → ${i};记录状态 ${a} → ${r}`}}},l=n,d=(i("8ba0"),i("1805")),c=Object(d["a"])(l,s,o,!1,null,"b9e5787e",null),u=c.exports,v=function(){var e=this,t=e._self._c;return t("div",{staticClass:"duplicate-review-decision-panel"},[t("el-radio-group",{staticClass:"duplicate-review-decision-panel__group",attrs:{value:e.value,size:"mini"},on:{input:function(t){return e.$emit("input",t)}}},[t("el-radio-button",{attrs:{label:"pending"}},[e._v("待定")]),t("el-radio-button",{attrs:{label:"useful"}},[e._v("有用")]),t("el-radio-button",{attrs:{label:"not-useful"}},[e._v("无用")])],1),t("el-button",{staticClass:"duplicate-review-decision-panel__action",attrs:{size:"mini",type:"primary",loading:e.saving},on:{click:function(t){return e.$emit("save")}}},[e._v(" 保存 ")]),t("el-button",{staticClass:"duplicate-review-decision-panel__action",attrs:{size:"mini"},on:{click:function(t){return e.$emit("toggle-history")}}},[e._v(" "+e._s(e.historyVisible?"收起历史":"查看历史")+" ")])],1)},h=[],p={name:"DuplicateReviewDecisionPanel",props:{value:{type:String,default:"pending"},saving:{type:Boolean,default:!1},historyVisible:{type:Boolean,default:!1}}},g=p,f=(i("b633"),Object(d["a"])(g,v,h,!1,null,"079faff6",null)),y=f.exports,m=function(){var e=this,t=e._self._c;return t("div",{staticClass:"duplicate-review-filter-bar"},[t("el-switch",{attrs:{value:e.onlyPending,"active-text":"只看待复核"},on:{input:function(t){return e.$emit("toggle-only-pending",t)}}}),t("el-radio-group",{attrs:{value:e.value,size:"mini",disabled:e.onlyPending},on:{input:function(t){return e.$emit("input",t)}}},[t("el-radio-button",{attrs:{label:"pending"}},[e._v("待定")]),t("el-radio-button",{attrs:{label:"useful"}},[e._v("有用")]),t("el-radio-button",{attrs:{label:"not-useful"}},[e._v("无用")]),t("el-radio-button",{attrs:{label:"all"}},[e._v("全部")])],1),t("span",{staticClass:"duplicate-review-filter-bar__label"},[e._v("一级分类")]),t("el-select",{staticClass:"duplicate-review-filter-bar__input",attrs:{value:e.llmCategoryLevel1,size:"mini",clearable:"",filterable:"",placeholder:"选择一级分类"},on:{input:function(t){return e.$emit("category-change",t)}}},e._l(e.level1Options,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)},w=[],_={name:"DuplicateReviewFilterBar",data(){return{level1Options:["医疗类","物损类","单据类","现场类","证件类","其他"]}},props:{value:{type:String,default:"pending"},onlyPending:{type:Boolean,default:!0},llmCategoryLevel1:{type:String,default:""}}},C=_,b=(i("86dc"),Object(d["a"])(C,m,w,!1,null,"799a4500",null)),S=b.exports,I=i("61a9"),R=i("d5c9"),L={name:"DuplicateReviewPage",inject:{injectedInterfaceUrl:{from:"interfaceUrl",default:""}},components:{DuplicateReviewCard:u,DuplicateReviewDecisionPanel:y,DuplicateReviewFilterBar:S},data(){return{loading:!1,savingRecordId:null,records:[],total:0,errorMessage:"",filters:{reviewStatus:"pending",onlyPending:!0,llmCategoryLevel1:"",pageNo:1,pageSize:20},draftStatusMap:{},caseStateMap:{},historyMap:{},historyVisibleMap:{},historyLoadingMap:{},batchDecision:"useful",batchSaving:!1,internalInterfaceUrl:""}},created(){this.hydrateFiltersFromRoute(),this.internalInterfaceUrl=this.getResolvedInterfaceUrl(),this.fetchRecords()},methods:{getDefaultInterfaceUrl(){return""},goWorkbench(){this.$router.push({path:"/calculatorTool/reviewWorkbench"})},goSimilarImageReview(){this.$router.push({path:"/calculatorTool/similarImageReview"})},getResolvedInterfaceUrl(){return this.internalInterfaceUrl||this.injectedInterfaceUrl||this.getDefaultInterfaceUrl()},hydrateFiltersFromRoute(){const e=this.$route&&this.$route.query||{},t="false"!==e.onlyPending;this.filters.onlyPending=t,this.filters.reviewStatus=t?"pending":e.reviewStatus||"all",this.filters.llmCategoryLevel1=e.llmCategoryLevel1||"",this.filters.pageNo=Number(e.pageNo)>0?Number(e.pageNo):1},syncRouteQuery(){this.$router&&this.$route&&this.$router.replace({query:{onlyPending:this.filters.onlyPending?"true":"false",reviewStatus:this.filters.reviewStatus,llmCategoryLevel1:this.filters.llmCategoryLevel1||void 0,pageNo:this.filters.pageNo>1?String(this.filters.pageNo):void 0}}).catch(()=>{})},async fetchRecords(){this.loading=!0,this.errorMessage="";try{const e=await Object(R["c"])(this.getResolvedInterfaceUrl(),{riskType:R["a"].DUPLICATE_REVIEW,reviewStatus:"all",reviewDecision:this.filters.onlyPending?"pending":this.filters.reviewStatus,pageNo:this.filters.pageNo,pageSize:this.filters.pageSize,extFilter1:this.filters.llmCategoryLevel1||""},this.instance,e=>{var t,i,a,r,s,o,n,l,d,c,u,v,h,p,g,f;return{...e,sourceHash:(null===e||void 0===e?void 0:e.bizKey)||(null===e||void 0===e||null===(t=e.detailPayload)||void 0===t?void 0:t.sourceHash)||"",md5Hash:(null===e||void 0===e||null===(i=e.detailPayload)||void 0===i?void 0:i.md5Hash)||"",sourceCaseNo:(null===e||void 0===e?void 0:e.primaryCaseNo)||(null===e||void 0===e||null===(a=e.detailPayload)||void 0===a?void 0:a.sourceCaseNo)||(null===e||void 0===e?void 0:e.bizKey)||"",targetCaseNo:(null===e||void 0===e||null===(r=e.detailPayload)||void 0===r?void 0:r.targetCaseNo)||"",leftImageUrl:(null===e||void 0===e||null===(s=e.detailPayload)||void 0===s?void 0:s.leftImageUrl)||(null===e||void 0===e||null===(o=e.detailPayload)||void 0===o?void 0:o.sourceImageUrl)||"",rightImageUrl:(null===e||void 0===e||null===(n=e.detailPayload)||void 0===n?void 0:n.rightImageUrl)||(null===e||void 0===e||null===(l=e.detailPayload)||void 0===l?void 0:l.targetImageUrl)||"",leftMaterialLabel:(null===e||void 0===e||null===(d=e.detailPayload)||void 0===d?void 0:d.leftMaterialLabel)||(null===e||void 0===e||null===(c=e.detailPayload)||void 0===c?void 0:c.llmCategoryLevel1)||(null===e||void 0===e?void 0:e.extStr1)||"",rightMaterialLabel:(null===e||void 0===e||null===(u=e.detailPayload)||void 0===u?void 0:u.rightMaterialLabel)||(null===e||void 0===e||null===(v=e.detailPayload)||void 0===v?void 0:v.llmCategoryLevel2)||"",contextSummary:(null===e||void 0===e||null===(h=e.detailPayload)||void 0===h?void 0:h.contextSummary)||(null===e||void 0===e?void 0:e.summary)||"",llmCategoryLevel1:(null===e||void 0===e||null===(p=e.detailPayload)||void 0===p?void 0:p.llmCategoryLevel1)||(null===e||void 0===e?void 0:e.extStr1)||"",duplicateCaseCount:Number((null===e||void 0===e?void 0:e.extNum1)||(null===e||void 0===e||null===(g=e.detailPayload)||void 0===g?void 0:g.duplicateCaseCount)||0),duplicateCases:Object(I["f"])((null===e||void 0===e||null===(f=e.detailPayload)||void 0===f?void 0:f.duplicateCases)||[]),duplicateCaseLoadFailed:!1,duplicateCaseLoadMessage:"",reviewStatus:(null===e||void 0===e?void 0:e.reviewDecision)||(null===e||void 0===e?void 0:e.reviewStatus)||"pending",recordStatus:(null===e||void 0===e?void 0:e.recordStatus)||"active",reviewUpdatedAt:(null===e||void 0===e?void 0:e.reviewedAt)||(null===e||void 0===e?void 0:e.updatedAt),updatedBy:(null===e||void 0===e?void 0:e.reviewerName)||(null===e||void 0===e?void 0:e.reviewerId)||""}}),t=e&&e.data||{};if(1!==t.code&&void 0!==t.code)throw new Error(t.message||"复核记录加载失败");const i=t.data||{};this.records=(Array.isArray(i.items)?i.items:[]).map(e=>({...e,sourceHash:(null===e||void 0===e?void 0:e.sourceHash)||(null===e||void 0===e?void 0:e.source_hash)||(null===e||void 0===e?void 0:e.sourceCaseNo)||"",md5Hash:(null===e||void 0===e?void 0:e.md5Hash)||(null===e||void 0===e?void 0:e.md5_hash)||(null===e||void 0===e?void 0:e.targetCaseNo)||"",duplicateCases:Object(I["f"])((null===e||void 0===e?void 0:e.duplicateCases)||(null===e||void 0===e?void 0:e.duplicate_cases)||[])})),this.total=i.total||0,this.draftStatusMap=this.records.reduce((e,t)=>(e[t.reviewRecordId]=t.reviewStatus||"pending",e),{}),this.caseStateMap=this.records.reduce((e,t)=>{const i=Object(I["f"])((null===t||void 0===t?void 0:t.duplicateCases)||[]),a=Number((null===t||void 0===t?void 0:t.duplicateCaseCount)||i.length||0)||0;return e[t.reviewRecordId]={expanded:!1,loading:!1,error:null!==t&&void 0!==t&&t.duplicateCaseLoadFailed?(null===t||void 0===t?void 0:t.duplicateCaseLoadMessage)||"关联案件加载失败":"",items:i,pageNo:1,pageSize:20,total:a},e},{}),this.resetHistoryState(this.records.map(e=>e.reviewRecordId))}catch(e){this.records=[],this.total=0,this.caseStateMap={},this.historyMap={},this.historyVisibleMap={},this.historyLoadingMap={},this.errorMessage=e&&e.message?e.message:"复核记录加载失败"}finally{this.loading=!1}},resetHistoryState(e=[]){e.forEach(e=>{this.$delete(this.historyMap,e),this.$delete(this.historyVisibleMap,e),this.$delete(this.historyLoadingMap,e)})},ensureCaseState(e){if(null===e||void 0===e||!e.reviewRecordId)return{expanded:!1,loading:!1,error:"",items:[],pageNo:1,pageSize:20,total:0};if(!this.caseStateMap[e.reviewRecordId]){const t=Object(I["f"])((null===e||void 0===e?void 0:e.duplicateCases)||[]);this.$set(this.caseStateMap,e.reviewRecordId,{expanded:!1,loading:!1,error:null!==e&&void 0!==e&&e.duplicateCaseLoadFailed?(null===e||void 0===e?void 0:e.duplicateCaseLoadMessage)||"关联案件加载失败":"",items:t,pageNo:1,pageSize:20,total:Number((null===e||void 0===e?void 0:e.duplicateCaseCount)||t.length||0)||0})}return this.caseStateMap[e.reviewRecordId]},resolveRiskEventId(e){const t=String((null===e||void 0===e?void 0:e.riskEventId)||"").trim();return/^\d+$/.test(t)?t:""},resolveRecordDuplicateCases(e){const t=this.ensureCaseState(e);return Array.isArray(t.items)?t.items:[]},async fetchDuplicateCases(e,t=1){const i=this.ensureCaseState(e);i.loading=!0,i.error="";try{const a=Object(I["f"])((null===e||void 0===e?void 0:e.duplicateCases)||[]);i.items=a,i.pageNo=Number(t||1)||1,i.pageSize=Number(i.pageSize||20)||20,i.total=Number((null===e||void 0===e?void 0:e.duplicateCaseCount)||a.length||0)||0;const r=this.resolveRiskEventId(e);if(!r)throw new Error("核验记录ID缺失");const s=await Object(R["b"])(this.getResolvedInterfaceUrl(),r,this.instance),o=s&&s.data||{};if(1!==o.code&&void 0!==o.code)throw new Error(o.message||"历史加载失败")}catch(a){i.error=a&&a.message?a.message:"关联案件加载失败"}finally{i.loading=!1,this.$set(this.caseStateMap,e.reviewRecordId,{...i})}},async handleToggleCaseList(e){const t=this.ensureCaseState(e);if(t.expanded)return t.expanded=!1,void this.$set(this.caseStateMap,e.reviewRecordId,{...t});t.expanded=!0,this.$set(this.caseStateMap,e.reviewRecordId,{...t});const i=Array.isArray(t.items)?t.items.length:0,a=Number(t.total||(null===e||void 0===e?void 0:e.duplicateCaseCount)||0)||0;(t.error||a>i)&&await this.fetchDuplicateCases(e,1)},async handleCasePageChange(e,t){const i=Number(t)||1;await this.fetchDuplicateCases(e,i),"undefined"!==typeof window&&window.scrollTo({top:Math.max(window.scrollY-120,0),behavior:"smooth"})},handleFilterChange(){this.filters.pageNo=1,this.syncRouteQuery(),this.fetchRecords()},handleReviewStatusChange(e){this.filters.reviewStatus=e,this.handleFilterChange()},handleOnlyPendingToggle(e){this.filters.onlyPending=e,this.filters.reviewStatus=e?"pending":"all",this.handleFilterChange()},handleCategoryChange(e){this.filters.llmCategoryLevel1=e,this.handleFilterChange()},handleBatchSaveConfirm(){if(!this.records.length)return void this.$message.warning("当前页没有可保存的记录");const e={pending:"待定",useful:"有用","not-useful":"无用"},t=e[this.batchDecision]||this.batchDecision||"待定";this.$confirm(`确认将当前页 ${this.records.length} 条记录统一标记为「${t}」吗?`,"批量保存确认",{confirmButtonText:"确认保存",cancelButtonText:"取消",type:"warning"}).then(()=>this.handleBatchSave()).catch(()=>{})},handlePageChange(e){this.filters.pageNo=e,this.records=[],this.draftStatusMap={},this.historyMap={},this.historyVisibleMap={},this.historyLoadingMap={},this.syncRouteQuery(),"undefined"!==typeof window&&window.scrollTo({top:0,behavior:"smooth"}),this.fetchRecords()},async handleSave(e){const t=this.resolveRiskEventId(e);if(!t)return void this.$message.error("核验记录ID缺失");const i=this.draftStatusMap[e.reviewRecordId]||"pending";this.savingRecordId=e.reviewRecordId;try{const a=await Object(R["e"])(this.getResolvedInterfaceUrl(),t,{decision:i},this.instance),r=a&&a.data||{};if(1!==r.code&&void 0!==r.code)throw new Error(r.message||"保存失败");const s=r.data;this.draftStatusMap={...this.draftStatusMap,[e.reviewRecordId]:i};const o=this.records.map(t=>t.reviewRecordId===e.reviewRecordId?{...t,...s||{},sourceHash:(null===s||void 0===s?void 0:s.sourceHash)||(null===s||void 0===s?void 0:s.source_hash)||(null===t||void 0===t?void 0:t.sourceHash)||(null===t||void 0===t?void 0:t.sourceCaseNo)||"",md5Hash:(null===s||void 0===s?void 0:s.md5Hash)||(null===s||void 0===s?void 0:s.md5_hash)||(null===t||void 0===t?void 0:t.md5Hash)||(null===t||void 0===t?void 0:t.targetCaseNo)||"",duplicateCases:Object(I["f"])((null===s||void 0===s?void 0:s.duplicateCases)||(null===s||void 0===s?void 0:s.duplicate_cases)||(null===t||void 0===t?void 0:t.duplicateCases)||[]),reviewStatus:i}:t);this.filters.onlyPending&&"pending"!==i?(this.records=o.filter(t=>t.reviewRecordId!==e.reviewRecordId),this.total=Math.max(0,Number(this.total||0)-1),!this.records.length&&this.total>0&&await this.fetchRecords()):this.records=o,this.$message.success("判断结果已保存")}catch(a){this.$message.error(a&&a.message?a.message:"保存失败")}finally{this.savingRecordId=null}},async toggleHistory(e){const t=e&&e.reviewRecordId;if(!t)return void this.$message.warning("核验记录ID缺失");const i=Boolean(this.historyVisibleMap[t]);if(this.$set(this.historyVisibleMap,t,!i),i||Object.prototype.hasOwnProperty.call(this.historyMap,t))return;const a=this.resolveRiskEventId(e);if(a){this.$set(this.historyLoadingMap,t,!0);try{const e=await Object(R["b"])(this.getResolvedInterfaceUrl(),a,this.instance),i=e&&e.data||{};if(1!==i.code&&void 0!==i.code)throw new Error(i.message||"历史加载失败");this.$set(this.historyMap,t,Array.isArray(i.data)?i.data:[])}catch(r){this.$set(this.historyMap,t,[]),this.$message.error(r&&r.message?r.message:"历史加载失败")}finally{this.$set(this.historyLoadingMap,t,!1)}}else this.$set(this.historyMap,t,[])},async handleBatchSave(){const e=this.records.map(e=>this.resolveRiskEventId(e)).filter(e=>Boolean(e));if(!e.length)return void this.$message.warning("当前页没有可保存的记录");const t=this.batchDecision||"pending";this.batchSaving=!0;try{var i;const a=await Object(R["d"])(this.getResolvedInterfaceUrl(),{riskType:R["a"].DUPLICATE_REVIEW,riskEventIds:e,decision:t},this.instance),r=a&&a.data||{};if(1!==r.code&&void 0!==r.code)throw new Error(r.message||"批量保存失败");this.draftStatusMap=this.records.reduce((i,a)=>(e.includes(this.resolveRiskEventId(a))&&(i[a.reviewRecordId]=t),i),{...this.draftStatusMap}),this.filters.onlyPending&&"pending"!==t?(this.records=[],this.total=Math.max(0,Number(this.total||0)-e.length),await this.fetchRecords()):this.records=this.records.map(i=>({...i,reviewStatus:e.includes(this.resolveRiskEventId(i))?t:i.reviewStatus}));const s=Number((null===r||void 0===r||null===(i=r.data)||void 0===i?void 0:i.updatedCount)||e.length)||e.length;this.$message.success(`已批量保存 ${s} 条判断结果`)}catch(a){this.$message.error(a&&a.message?a.message:"批量保存失败")}finally{this.batchSaving=!1}},handleOpenDuplicateCase(e,t){if(null===t||void 0===t||!t.openable)return void this.$message.warning((null===t||void 0===t?void 0:t.disabledReason)||"当前案件暂不可跳转");const i=Object(I["b"])({caseNo:t.targetCaseNo,focusMaterialId:t.targetMaterialId,focusFileHash:t.targetFileHash||e.md5Hash||e.targetCaseNo||e.sourceHash||e.sourceCaseNo,focusMaterialType:t.targetMaterialType});window.open(i,"_blank")}}},N=L,M=(i("972c"),Object(d["a"])(N,a,r,!1,null,"bb53f2e4",null));t["default"]=M.exports},ac48:function(e,t,i){},b633:function(e,t,i){"use strict";i("4498")},c3c0:function(e,t,i){"use strict";var a=i("4c15");e.exports="NODE"===a},d0a5:function(e,t,i){},d1da:function(e,t,i){"use strict";var a=i("56ce");e.exports=function(e,t){var i=[][e];return!!i&&a((function(){i.call(null,t||function(){return 1},1)}))}},d5c9:function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"c",(function(){return _})),i.d(t,"b",(function(){return C})),i.d(t,"e",(function(){return b})),i.d(t,"d",(function(){return S}));i("0f5d"),i("8f26"),i("d9d9"),i("963e"),i("209c");var a=i("5923"),r=i("eb06"),s=i.n(r);const o={DUPLICATE_REVIEW:"duplicate_review",SIMILAR_IMAGE_REVIEW:"similar_image_review",CLAIM_RISK:"claim_risk",VIN_PLATE_REPEAT:"vin_plate_repeat",RIDER_THIRD_PARTY:"rider_third_party"};function n(e){var t;const i=e||(null===(t=a["default"].prototype)||void 0===t?void 0:t.instance)||s.a.create();return i&&"function"===typeof i.get?i:s.a.create()}function l(e,t){var i;const a=String(e||"").trim();if(a)return a.replace(/\/$/,"");const r=String((null===t||void 0===t||null===(i=t.defaults)||void 0===i?void 0:i.baseURL)||"").trim();return r.replace(/\/$/,"")}function d(e,t){const i=t.startsWith("/")?t:"/"+t,a=String(e||"").trim().replace(/\/$/,"");return a?`${a}/unified-review${i}`:"/unified-review"+i}function c(e,t){const i=t.startsWith("/")?t:"/"+t,a=String(e||"").trim().replace(/\/$/,"");return a?`${a}/manager/unified-review${i}`:"/manager/unified-review"+i}function u(e){var t;const i=Number((null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status)||0);return 404===i||405===i}function v(e,t){return e().catch(e=>{if(!u(e))throw e;return t()})}function h(e){return Array.isArray(e)?e:e?String(e).split(",").map(e=>e.trim()).filter(Boolean):[]}function p(e){if(!e)return{};if("object"===typeof e)return e;try{return JSON.parse(e)}catch(t){return{}}}function g(e){return Boolean(e&&"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"code")&&Object.prototype.hasOwnProperty.call(e,"message"))}function f(e){if(g(e))return e;const t=e&&e.data;return g(t)?t:t||{}}function y(e={}){const t=e.primaryCaseNo||e.primary_case_no||"",i=h(e.relatedCaseNoList||e.related_case_no_list),a=p(e.detailPayload||e.detail_payload),r=p(e.rulePayload||e.rule_payload),s=p(e.excludePayload||e.exclude_payload),o=e.riskEventId||e.risk_event_id||e.reviewRecordId,n=null==o?"":String(o),l=e.reviewRecordId||e.riskEventId||e.risk_event_id,d=null==l?"":String(l);return{...e,reviewRecordId:d,riskEventId:n,primaryCaseNo:t,relatedCaseNoList:i,detailPayload:a,rulePayload:r,excludePayload:s}}function m(e,t){const i=f(e),a=i.data||{},r=Array.isArray(a.items)?a.items.map(e=>t(y(e))):[];return{...e,data:{...i,data:{...a,items:r}}}}function w(e,t){const i=f(e),a=Array.isArray(i.data)?i.data.map(e=>t({...e,snapshotPayload:p(e.snapshotPayload||e.snapshot_payload),changedAt:e.changedAt||e.createdAt||e.created_at})):[];return{...e,data:{...i,data:a}}}function _(e="",t={},i,a=(e=>e)){const r=n(i),s=l(e,r);return v(()=>r.post(d(s,"/query"),t||{}),()=>r.post(c(s,"/query"),t||{})).then(e=>m(e,a))}function C(e="",t,i,a=(e=>e)){if(!t)throw new Error("riskEventId 不能为空");const r=n(i),s=l(e,r);return v(()=>r.get(d(s,`/${t}/history`),{params:{}}),()=>r.get(c(s,`/${t}/history`),{params:{}})).then(e=>w(e,a))}function b(e="",t,i={},a,r=(e=>e)){if(!t)throw new Error("riskEventId 不能为空");if(!i.decision)throw new Error("payload.decision 必须提供");const s=n(a),o=l(e,s);return v(()=>s.post(d(o,`/${t}/decision`),i),()=>s.post(c(o,`/${t}/decision`),i)).then(e=>{const t=f(e);return{...e,data:{...t,data:r(y(t.data||{}))}}})}function S(e="",t={},i){if(!Array.isArray(t.riskEventIds)||!t.riskEventIds.length)throw new Error("payload.riskEventIds 必须提供");if(!t.decision)throw new Error("payload.decision 必须提供");const a=n(i),r=l(e,a);return v(()=>a.post(d(r,"/batch-decision"),t),()=>a.post(c(r,"/batch-decision"),t))}},de54:function(e,t,i){"use strict";var a=TypeError;e.exports=function(e,t){if(e