2 lines
7.3 KiB
JavaScript
2 lines
7.3 KiB
JavaScript
import{I as G,y as H,w as J,D as K,C as Q,L as W,M as X,N as Y}from"./element-plus.517d4382.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as ee,a as oe}from"./index.8b1962e9.js";import{u as te}from"./usePaging.f6660143.js";import{u as ae}from"./useDictOptions.b5854a9e.js";import{d as le,a as g,e as ue}from"./competitor.4d4b3ebe.js";import"./lodash.1d82ee7c.js";import{_ as ne}from"./edit.vue_vue_type_script_setup_true_name_competitorEdit_lang.20245a0e.js";import ie from"./detail.6dcd2b88.js";import{d as U,s as x,r as b,a0 as re,ai as se,o as s,c as me,V as e,M as a,O as _,u as m,L as p,S as j,a as $,k as pe,T as d,n as h}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.b17dae19.js";import"./department.b8dec04d.js";import"./organization.5e75830a.js";import"./index.vue_vue_type_script_setup_true_lang.ed719f67.js";import"./project.a81dff6c.js";import"./index.vue_vue_type_script_setup_true_lang.6688b044.js";import"./customer_demand.ccb61d2f.js";import"./custom.99349afc.js";const ce=d("\u67E5\u8BE2"),de=d("\u91CD\u7F6E"),_e=d(" \u65B0\u589E "),fe=d(" \u5220\u9664 "),Fe={class:"mt-4"},Be=d(" \u7F16\u8F91 "),Ee=d(" \u5220\u9664 "),ve=d(" \u8BE6\u60C5 "),De={class:"flex mt-4 justify-end"},Ce=U({name:"competitorLists"}),Bo=U({...Ce,setup(we){const D=x(),B=x(),E=b(!1),C=b(!1),l=re({project_name:"",competitor_name:"",customer_demand_name:"",competitor_contacts_phone:"",custom_name:"",competitor_contacts:""}),w=b([]),L=i=>{w.value=i.map(({id:o})=>o)},{dictData:V}=ae(""),{pager:f,getLists:v,resetParams:P,resetPage:R}=te({fetchFun:le,params:l}),N=async()=>{var i;E.value=!0,await h(),(i=B.value)==null||i.open("add")},S=async i=>{var n,u;let o=await g({id:i.id});E.value=!0,await h(),(n=B.value)==null||n.open("edit"),(u=B.value)==null||u.setFormData(o)},k=async i=>{await ee.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ue({id:i}),v()},T=async i=>{var n,u;let o=await g({id:i.id});C.value=!0,await h(),(n=D.value)==null||n.open(),(u=D.value)==null||u.setFormData(o)};return v(),(i,o)=>{const n=G,u=H,c=J,I=K,y=Q,M=oe,r=W,q=X,O=Z,F=se("perms"),z=Y;return s(),me("div",null,[e(y,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(I,{class:"mb-[-16px]",model:l,inline:"","label-width":"auto"},{default:a(()=>[e(u,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name"},{default:a(()=>[e(n,{class:"w-[280px]",modelValue:l.project_name,"onUpdate:modelValue":o[0]||(o[0]=t=>l.project_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u7ADE\u4E89\u5BF9\u624B\u540D\u79F0",prop:"competitor_name"},{default:a(()=>[e(n,{class:"w-[280px]",modelValue:l.competitor_name,"onUpdate:modelValue":o[1]||(o[1]=t=>l.competitor_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7ADE\u4E89\u5BF9\u624B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u7ADE\u4E89\u5BF9\u624B\u8054\u7CFB\u4EBA",prop:"competitor_contacts"},{default:a(()=>[e(n,{class:"w-[280px]",modelValue:l.competitor_contacts,"onUpdate:modelValue":o[2]||(o[2]=t=>l.competitor_contacts=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7ADE\u4E89\u5BF9\u624B\u8054\u7CFB\u4EBA"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u8054\u7CFB\u4EBA\u7535\u8BDD",prop:"competitor_contacts_phone"},{default:a(()=>[e(n,{class:"w-[280px]",modelValue:l.competitor_contacts_phone,"onUpdate:modelValue":o[3]||(o[3]=t=>l.competitor_contacts_phone=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u5BA2\u6237\u540D\u79F0",prop:"custom_name"},{default:a(()=>[e(n,{class:"w-[280px]",modelValue:l.custom_name,"onUpdate:modelValue":o[4]||(o[4]=t=>l.custom_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(u,{label:"\u9700\u6C42\u540D\u79F0",prop:"customer_demand_name"},{default:a(()=>[e(n,{class:"w-[280px]",modelValue:l.customer_demand_name,"onUpdate:modelValue":o[5]||(o[5]=t=>l.customer_demand_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9700\u6C42\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(u,null,{default:a(()=>[e(c,{type:"primary",onClick:m(R)},{default:a(()=>[ce]),_:1},8,["onClick"]),e(c,{onClick:m(P)},{default:a(()=>[de]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((s(),p(y,{class:"!border-none",shadow:"never"},{default:a(()=>[_((s(),p(c,{type:"primary",onClick:N},{icon:a(()=>[e(M,{name:"el-icon-Plus"})]),default:a(()=>[_e]),_:1})),[[F,["project.competitor/add"]]]),_((s(),p(c,{disabled:!w.value.length,onClick:o[6]||(o[6]=t=>k(w.value))},{default:a(()=>[fe]),_:1},8,["disabled"])),[[F,["project.competitor/delete"]]]),$("div",Fe,[e(q,{data:m(f).lists,onSelectionChange:L},{default:a(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(r,{label:"\u9879\u76EE\u540D\u79F0",prop:"project_name","show-overflow-tooltip":""}),e(r,{label:"\u5BA2\u6237\u540D\u79F0",prop:"custom_name","show-overflow-tooltip":""}),e(r,{label:"\u5BA2\u6237\u9700\u6C42",prop:"customer_demand_name","show-overflow-tooltip":""}),e(r,{label:"\u7ADE\u4E89\u5BF9\u624B\u540D\u79F0",prop:"competitor_name","show-overflow-tooltip":""}),e(r,{label:"\u7ADE\u4E89\u5BF9\u624B\u8054\u7CFB\u4EBA",prop:"competitor_contacts","show-overflow-tooltip":""}),e(r,{label:"\u8054\u7CFB\u4EBA\u7535\u8BDD",prop:"competitor_contacts_phone","show-overflow-tooltip":""}),e(r,{label:"\u7ADE\u4E89\u80FD\u529B",prop:"competitive_power","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:a(({row:t})=>[_((s(),p(c,{type:"primary",link:"",onClick:A=>S(t)},{default:a(()=>[Be]),_:2},1032,["onClick"])),[[F,["project.competitor/edit"]]]),_((s(),p(c,{type:"danger",link:"",onClick:A=>k(t.id)},{default:a(()=>[Ee]),_:2},1032,["onClick"])),[[F,["project.competitor/delete"]]]),_((s(),p(c,{link:"",onClick:A=>T(t)},{default:a(()=>[ve]),_:2},1032,["onClick"])),[[F,["project.competitor/detail"]]])]),_:1})]),_:1},8,["data"])]),$("div",De,[e(O,{modelValue:m(f),"onUpdate:modelValue":o[7]||(o[7]=t=>pe(f)?f.value=t:null),onChange:m(v)},null,8,["modelValue","onChange"])])]),_:1})),[[z,m(f).loading]]),E.value?(s(),p(ne,{key:0,ref_key:"editRef",ref:B,"dict-data":m(V),onSuccess:m(v),onClose:o[8]||(o[8]=t=>E.value=!1)},null,8,["dict-data","onSuccess"])):j("",!0),C.value?(s(),p(ie,{key:1,ref_key:"detailRef",ref:D,"dict-data":m(V),onClose:o[9]||(o[9]=t=>C.value=!1)},null,8,["dict-data"])):j("",!0)])}}});export{Bo as default};
|