HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.2.20
System: Linux 825a8fd6cf8c 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User: apache (48)
PHP: 8.2.20
Disabled: NONE
Upload Files
File: /var/www/html/public/static/js/hookGenerate-9aea7446.js
import{getCompanyListWeb as H,getSubjectTree as K,getSubjectStems as q,RadomgeneralPaperWeb as Q,deleteCompanyWeb as V}from"./po-dbdb2684.js";import{d as f,u as F}from"./vue-router-a383d220.js";import{o as G}from"./index-81e4a901.js";import{b7 as s}from"./message-2472a54a.js";import{r as o,A as a,o as J}from"./runtime-core.esm-bundler-6128546f.js";import"./index-f0216e7e.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./utils-2ab4f76a.js";import"./focus-trap-53f1c6ab.js";import"./error-78e43d3e.js";function le(){f();const h=F();f();const g=o(),c=o(!1),b=o(!1),y=o(!1),j=o(!1),_=o(""),d=o([]),r=o([]),P=a({}),t=a({tableIndex:0,note:"",subjectId:"",num1:0,num2:0,selectNums:"",selectscope:"",noselectNums:"",paper_name:""}),m=a({}),A=a({}),S=a({}),w=a({}),C=a({}),l=a({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),u=a({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:""}),N=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"Company",prop:"company_name",minWidth:100,hide:({checkList:e})=>!e.includes("Company")},{label:"HST#",prop:"hst",minWidth:100,hide:({checkList:e})=>!e.includes("HST#")},{label:"Name",prop:"first_name",minWidth:100,hide:({checkList:e})=>!e.includes("Name")},{label:"Postal",prop:"postal",minWidth:100,hide:({checkList:e})=>!e.includes("Postal")},{label:"Phone",prop:"phone",minWidth:150,slot:"slotAction",hide:({checkList:e})=>!e.includes("Phone")},{label:"Email",prop:"email",minWidth:120,hide:({checkList:e})=>!e.includes("Email")},{label:"Address",prop:"address",minWidth:120,hide:({checkList:e})=>!e.includes("Address")},{label:"Provice",prop:"state",minWidth:120,hide:({checkList:e})=>!e.includes("Provice")},{label:"City",prop:"city",minWidth:120,hide:({checkList:e})=>!e.includes("City")},{label:"Action",fixed:"right",width:120,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],W=["勾选列","Company","HST#","Name","Postal","Phone","Email","Address","Provice","City","Action"];function E(){i()}function T(e){l.pageSize=e,i()}function k(e){l.currentPage=e,i()}async function i(){c.value=!0;const{data:e}=await H(Object.assign(P,{searchKey:u.searchKey}));d.value=e.data,c.value=!1}const x=(e,n)=>{};function D(e){Object.keys(e).map(n=>{m[n]=e[n]})}async function I(e){const{data:n}=await V(Object.assign(S,{company_id:e.id}));n.code==1?(i(),s({type:"success",message:n.msg})):s({type:"error",message:n.msg})}const L=e=>{G.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{I(e)}).catch(()=>{s({type:"info",message:"Canceled"})})};async function O(){const{data:e}=await K(Object.assign(A,{}));e.code==0&&(r.value=e.data[0].children)}function v(e){e.is_select==0?e.is_select=1:e.is_select==1&&(e.is_select=0);let n=[];r.value.forEach((p,U)=>{p.is_select==1&&n.push(p.id)});let B=n.toString();t.subjectId=B,R()}async function R(){const{data:e}=await q(Object.assign(w,{subject_id:t.subjectId}));e.code==1&&(t.num1=e.data.select,t.num2=e.data.noselect)}async function z(){if(t.subjectId==""){s({type:"error",message:"请选择分类"});return}if(t.selectNums==""){s({type:"error",message:"请输入选择题数"});return}if(t.selectNums>t.num1){s({type:"error",message:"抽取数不能大于总数"});return}if(t.selectscope==""){s({type:"error",message:"请输入分值"});return}if(t.noselectNums==""){s({type:"error",message:"请输入问答题数"});return}if(t.noselectNums>t.num2){s({type:"error",message:"抽取数不能大于总数"});return}if(t.paper_name==""){s({type:"error",message:"请输入生成试卷名称"});return}const{data:e}=await Q(Object.assign(C,{subject_id:t.subjectId,selectNums:t.selectNums,selectscope:t.selectscope,noselectNums:t.noselectNums,paper_name:t.paper_name}));e.code==1&&s({type:"success",message:e.msg})}function M(){h.push({name:"/crm/yuyue/importQue",query:{Multiple:1}})}return J(()=>{i(),O()}),{searchDetail:u,btnSearchPart:E,loading:c,small:j,selectList:W,columns:N,pagination:l,handleSizeChange:T,handleCurrentChange:k,PartList:d,order_date:_,deliverDialog:b,selectClick:x,itemArr:t,addLocationDialog:y,locationArr:m,EditLocation:D,btnDellocation:L,singleTableRef:g,subjectData:r,onSubjectData:v,btnRadomgeneralPaper:z,btnView:M}}export{le as useEqu};