(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["duplicate-review-page"],{"17fc":function(e,t,i){"use strict";var a=i("cb46");e.exports=function(e,t){var i=[][e];return!!i&&a((function(){i.call(null,t||function(){return 1},1)}))}},3307:function(e,t,i){"use strict";var a=TypeError;e.exports=function(e,t){if(e79&&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)}})},"61a9":function(e,t,i){"use strict";i.d(t,"f",(function(){return a})),i.d(t,"b",(function(){return r})),i.d(t,"g",(function(){return s})),i.d(t,"a",(function(){return o})),i.d(t,"e",(function(){return n})),i.d(t,"c",(function(){return d})),i.d(t,"d",(function(){return c}));i("1159"),i("4f71"),i("2ddc"),i("74ad"),i("aeb2"),i("fee5"),i("9cf4"),i("b460");function a(e){const t=Array.isArray(e)?e:[];return t.map((e,t)=>{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}},"6ce8":function(e,t,i){"use strict";var a=i("8509"),r=i("bd3f"),s=i("7f5a"),o=i("f05e"),n=i("cd97"),l=i("d9ff"),d=i("bf0b"),c=i("c804"),u=i("cb46"),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}})},"74ad":function(e,t,i){"use strict";var a=i("8509"),r=i("ba59"),s=i("bd3f"),o=i("7f5a"),n=i("f05e"),l=i("cd97"),d=i("d9ff"),c=i("bf0b"),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}})},"84e0":function(e,t,i){},"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")},"97c0":function(e,t,i){"use strict";var a=i("7f5a"),r=i("96f2"),s=i("9c0f"),o=i("30bf"),n=TypeError,l="Reduce of empty array with no initial value",d=function(e){return function(t,i,d,c){var u=r(t),v=s(u),h=o(u);if(a(i),0===h&&d<2)throw new n(l);var p=e?h-1:0,g=e?-1:1;if(d<2)while(1){if(p in v){c=v[p],p+=g;break}if(p+=g,e?p<0:h<=p)throw new n(l)}for(;e?p>=0:h>p;p+=g)p in v&&(c=i(c,v[p],p,u));return c}};e.exports={left:d(!1),right:d(!0)}},"9cf4":function(e,t,i){"use strict";var a=i("a078"),r=i("40ee"),s=i("6a20"),o=i("3307"),n=URLSearchParams,l=n.prototype,d=r(l.getAll),c=r(l.has),u=new n("a=1");!u.has("a",2)&&u.has("a",void 0)||a(l,"has",(function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return c(this,e);var a=d(this,e);o(t,1);var r=s(i),n=0;while(n/^[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){},b460:function(e,t,i){"use strict";var a=i("2ff2"),r=i("40ee"),s=i("c094"),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})},b633:function(e,t,i){"use strict";i("4498")},d0a5:function(e,t,i){},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("7b3c"),i("4f71"),i("2ddc"),i("aeb2"),i("640e");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))}},e866:function(e,t,i){"use strict";var a=i("4cd4");e.exports="NODE"===a},fee5:function(e,t,i){"use strict";var a=i("a078"),r=i("40ee"),s=i("6a20"),o=i("3307"),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