2 lines
6.9 KiB
JavaScript
2 lines
6.9 KiB
JavaScript
import{B as z,C as K,M as G,N as H,w as J,D as W,I as X,O as Y,P as Z,Q as ee}from"./element-plus.b0ecf6ae.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.ebbecf1a.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.17266fa4.js";import{f as ae,b as oe}from"./index.9e5a9063.js";import{u as ue}from"./usePaging.2ad8e1e6.js";import{u as ne}from"./useDictOptions.adeec031.js";import{_ as pe,a as re,b as se}from"./edit.vue_vue_type_script_setup_true_name_appUpdateEdit_lang.4d89f912.js";import"./lodash.ffb5376d.js";import{d as $,s as ie,r as P,$ as de,af as me,o as n,c as E,U as e,L as a,u as t,T as h,a7 as x,K as s,R as v,M as F,a as A,k as ce,Q as _e,n as U}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.f9df025a.js";import"./vue-router.9f65afb1.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.4b0c77cb.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";import"./index.3a572f9b.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";const fe={class:"mt-4"},ve={class:"flex mt-4 justify-end"},be=$({name:"appUpdateLists"}),ol=$({...be,setup(Fe){const B=ie(),w=P(!1),u=de({title:"",content:"",type:"",version:"",dow_url:"",force:"",quiet:""}),V=P([]),L=r=>{V.value=r.map(({id:o})=>o)},{dictData:i}=ne("app_type,app_force_quiet"),{pager:b,getLists:C,resetParams:N,resetPage:R}=ue({fetchFun:se,params:u}),S=async()=>{var r;w.value=!0,await U(),(r=B.value)==null||r.open("add")},T=async r=>{var o,c;w.value=!0,await U(),(o=B.value)==null||o.open("edit"),(c=B.value)==null||c.setFormData(r)},D=async r=>{await ae.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await re({id:r}),C()};return C(),(r,o)=>{const c=z,d=K,_=G,k=H,f=J,I=W,q=X,M=oe,p=Y,g=te,O=Z,Q=le,y=me("perms"),j=ee;return n(),E("div",null,[e(q,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(I,{class:"mb-[-16px]",model:t(u),inline:""},{default:a(()=>[e(d,{label:"\u6807\u9898",prop:"title"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:t(u).title,"onUpdate:modelValue":o[0]||(o[0]=l=>t(u).title=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6807\u9898"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u5185\u5BB9",prop:"content"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:t(u).content,"onUpdate:modelValue":o[1]||(o[1]=l=>t(u).content=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9",type:"textarea",autosize:""},null,8,["modelValue"])]),_:1}),e(d,{label:"APP\u7C7B\u578B",prop:"type"},{default:a(()=>[e(k,{class:"w-[280px]",modelValue:t(u).type,"onUpdate:modelValue":o[2]||(o[2]=l=>t(u).type=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9APP\u7C7B\u578B"},{default:a(()=>[e(_,{label:"\u5168\u90E8",value:""}),(n(!0),E(h,null,x(t(i).app_type,(l,m)=>(n(),s(_,{key:m,label:l.name,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"\u7248\u672C",prop:"version"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:t(u).version,"onUpdate:modelValue":o[3]||(o[3]=l=>t(u).version=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7248\u672C"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u662F\u5426\u5F3A\u5236\u66F4\u65B0",prop:"force"},{default:a(()=>[e(k,{class:"w-[280px]",modelValue:t(u).force,"onUpdate:modelValue":o[4]||(o[4]=l=>t(u).force=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u5F3A\u5236\u66F4\u65B0"},{default:a(()=>[e(_,{label:"\u5168\u90E8",value:""}),(n(!0),E(h,null,x(t(i).app_force_quiet,(l,m)=>(n(),s(_,{key:m,label:l.name,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"\u662F\u5426\u9759\u9ED8\u66F4\u65B0",prop:"quiet"},{default:a(()=>[e(k,{class:"w-[280px]",modelValue:t(u).quiet,"onUpdate:modelValue":o[5]||(o[5]=l=>t(u).quiet=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u9759\u9ED8\u66F4\u65B0"},{default:a(()=>[e(_,{label:"\u5168\u90E8",value:""}),(n(!0),E(h,null,x(t(i).app_force_quiet,(l,m)=>(n(),s(_,{key:m,label:l.name,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,null,{default:a(()=>[e(f,{type:"primary",onClick:t(R)},{default:a(()=>[v("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(f,{onClick:t(N)},{default:a(()=>[v("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),F((n(),s(q,{class:"!border-none",shadow:"never"},{default:a(()=>[F((n(),s(f,{type:"primary",onClick:S},{icon:a(()=>[e(M,{name:"el-icon-Plus"})]),default:a(()=>[v(" \u65B0\u589E ")]),_:1})),[[y,["app_update/add"]]]),F((n(),s(f,{disabled:!t(V).length,onClick:o[6]||(o[6]=l=>D(t(V)))},{default:a(()=>[v(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[y,["app_update/delete"]]]),A("div",fe,[e(O,{data:t(b).lists,onSelectionChange:L},{default:a(()=>[e(p,{type:"selection",width:"55"}),e(p,{label:"\u6807\u9898",prop:"title","show-overflow-tooltip":""}),e(p,{label:"\u5185\u5BB9",prop:"content","show-overflow-tooltip":""}),e(p,{label:"APP\u7C7B\u578B",prop:"type"},{default:a(({row:l})=>[e(g,{options:t(i).app_type,value:l.type},null,8,["options","value"])]),_:1}),e(p,{label:"\u7248\u672C",prop:"version","show-overflow-tooltip":""}),e(p,{label:"app\u94FE\u63A5",prop:"dow_url","show-overflow-tooltip":""}),e(p,{label:"\u662F\u5426\u5F3A\u5236\u66F4\u65B0",prop:"force"},{default:a(({row:l})=>[e(g,{options:t(i).app_force_quiet,value:l.force},null,8,["options","value"])]),_:1}),e(p,{label:"\u662F\u5426\u9759\u9ED8\u66F4\u65B0",prop:"quiet"},{default:a(({row:l})=>[e(g,{options:t(i).app_force_quiet,value:l.quiet},null,8,["options","value"])]),_:1}),e(p,{label:"\u66F4\u65B0\u65F6\u95F4",prop:"update_time","show-overflow-tooltip":""}),e(p,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[F((n(),s(f,{type:"primary",link:"",onClick:m=>T(l)},{default:a(()=>[v(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[y,["app_update/edit"]]]),F((n(),s(f,{type:"danger",link:"",onClick:m=>D(l.id)},{default:a(()=>[v(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["app_update/delete"]]])]),_:1})]),_:1},8,["data"])]),A("div",ve,[e(Q,{modelValue:t(b),"onUpdate:modelValue":o[7]||(o[7]=l=>ce(b)?b.value=l:null),onChange:t(C)},null,8,["modelValue","onChange"])])]),_:1})),[[j,t(b).loading]]),t(w)?(n(),s(pe,{key:0,ref_key:"editRef",ref:B,"dict-data":t(i),onSuccess:t(C),onClose:o[8]||(o[8]=l=>w.value=!1)},null,8,["dict-data","onSuccess"])):_e("",!0)])}}});export{ol as default};
|