qy-vue-plugins 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/EventKeys-Cy8iJb0N.js +8 -0
- package/dist/chunks/EventKeys-D78tN5KT.js +1 -0
- package/dist/chunks/RenderFormItem.vue_vue_type_style_index_0_lang-CGxnSN-x.js +1 -0
- package/dist/chunks/{RenderFormItem.vue_vue_type_style_index_0_lang-BKjS65Ak.js → RenderFormItem.vue_vue_type_style_index_0_lang-LijDQik_.js} +68 -68
- package/dist/manageTable/FilterItem.cjs +1 -1
- package/dist/manageTable/FilterItem.mjs +71 -70
- package/dist/manageTable/RenderFormItem.cjs +1 -1
- package/dist/manageTable/RenderFormItem.mjs +1 -1
- package/dist/manageTable/SortItem.cjs +1 -1
- package/dist/manageTable/SortItem.mjs +44 -43
- package/dist/manageTable/index.cjs +1 -1
- package/dist/manageTable/index.mjs +7 -4
- package/dist/manageTable/manageTable.cjs +1 -1
- package/dist/manageTable/manageTable.mjs +187 -174
- package/dist/qy-vue-plugins.css +1 -1
- package/dist/types/manageTable/EventKeys.d.ts +4 -0
- package/dist/types/manageTable/index.d.ts +2 -1
- package/dist/types/types/manageTable.d.ts +1 -1
- package/package/manageTable/EventKeys.ts +9 -0
- package/package/manageTable/index.ts +2 -1
- package/package.json +1 -1
- package/dist/chunks/RenderFormItem.vue_vue_type_style_index_0_lang-DyQCqwfZ.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("@vueuse/core"),t=Symbol("upload-file");e.useEventBus(t);const s=Symbol("sort-event"),n=e.useEventBus(s),o=Symbol("filter-event"),u=e.useEventBus(o);exports.filterEventBus=u;exports.sortEventBus=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),O=require("@element-plus/icons-vue"),re=require("../manageTable/Block.cjs"),n=require("element-plus"),F=require("./ProvideKeys-BPenLFlD.js"),v=require("./utils-rH1yoZOz.js"),d=[];for(let o=0;o<256;++o)d.push((o+256).toString(16).slice(1));function ne(o,i=0){return(d[o[i+0]]+d[o[i+1]]+d[o[i+2]]+d[o[i+3]]+"-"+d[o[i+4]]+d[o[i+5]]+"-"+d[o[i+6]]+d[o[i+7]]+"-"+d[o[i+8]]+d[o[i+9]]+"-"+d[o[i+10]]+d[o[i+11]]+d[o[i+12]]+d[o[i+13]]+d[o[i+14]]+d[o[i+15]]).toLowerCase()}let U;const ie=new Uint8Array(16);function de(){if(!U){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");U=crypto.getRandomValues.bind(crypto)}return U(ie)}const se=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),q={randomUUID:se};function I(o,i,y){var u;if(q.randomUUID&&!o)return q.randomUUID();o=o||{};const p=o.random??((u=o.rng)==null?void 0:u.call(o))??de();if(p.length<16)throw new Error("Random bytes length must be >= 16");return p[6]=p[6]&15|64,p[8]=p[8]&63|128,ne(p)}const ce={class:"fromItem_style"},pe={class:"value"},fe={class:"link"},me={class:"voice-list",style:{"margin-top":"20px"}},ve=["src"],ye={style:{display:"flex","justify-content":"center",width:"auto"}},ke=["src"],Ve=e.defineComponent({__name:"RenderFormItem",props:{field:{type:Object,required:!0},data:null},emits:["change"],setup(o,{emit:i}){const y=e.inject(F.uploadFileKey),p=e.inject(F.speciesNameQueryKey);console.log("speciesList",p);const u=o,w=e.ref(!1),k=e.ref(!1),T=e.ref(),a=e.ref(null),P=e.computed(()=>u.field.layoutType=="singleSelect"),j=e.computed(()=>u.field.layoutType=="input"),M=e.computed(()=>u.field.layoutType=="number"),R=e.computed(()=>u.field.layoutType=="selectGroup"),E=e.computed(()=>u.field.layoutType=="multipleSelect"),A=e.computed(()=>u.field.layoutType=="textArea"),z=e.computed(()=>u.field.layoutType=="imageList"),J=e.computed(()=>u.field.layoutType=="voiceList"),$=e.computed(()=>u.field.layoutType=="cascader"),C=e.computed(()=>u.field.layoutType=="datePicker"||u.field.layout=="datePicker"),G=e.computed(()=>u.field.layoutType=="dateTimePicker"),Y=e.computed(()=>u.field.layoutType=="quadratChart"),D=e.computed(()=>(console.log("props.field.layoutType",u.field.layoutType),u.field.layoutType=="switch"));if(u.field.property)if(u.field.type=="custom"){if(a.value="",u.data.extra&&Object.keys(JSON.parse(u.data.extra)).length>0)if(a.value=JSON.parse(u.data.extra)[u.field.property],E.value)try{a.value=a.value!=""?a.value.split(/[,,、]/):[]}catch{a.value=[]}else C.value&&(a.value=a.value?n.dayjs(a.value).unix():n.dayjs().unix())}else if(D.value)a.value=u.data[u.field.property]==1;else if(E.value)try{let r=u.data[u.field.property];a.value=r!=""?r.split(/[,,、]/):[]}catch{a.value=[]}else a.value=u.data[u.field.property];if(u.field.propertyGroup){var S=[];u.field.propertyGroup.forEach(r=>{S.push(u.data[r])}),a.value=S}const V=i,c=()=>{u.field.type=="custom"&&C.value?V("change",n.dayjs(a.value*1e3).format("YYYY-MM-DD")):u.field.property=="speciesName"?V("change",{speciesName:a.value,latinName:b.value.canorical_me}):V("change",E.value?a.value.join("、"):a.value)},f=e.ref([]);if(u.field.layoutType=="imageList"&&(k.value=!0,a.value)){a.value=v.html_entity_decode(a.value);var x=JSON.parse(v.html_entity_decode(a.value));x.forEach(r=>{f.value.push({name:r.name,url:v.buildOriginUrl(r.url),imagePath:r.imagePath||"",id:r.id||"pc-"+I(),title:r.title||null,remark:r.remark||null,disabled:r.disabled||null})})}const K=r=>{T.value=r.url,w.value=!0},Q=()=>{a.value=JSON.stringify(f.value.map(r=>({...r,url:v.clearOssUrl(r.url)}))),c()},X=(r,t)=>{var l=new FormData;return l.append("file",r.file),l.append("type",t),y?y(l).then(s=>{f.value.forEach(m=>{m.uid==r.file.uid&&(console.log(m.uid,r.file.uid),m.url=s.info.url)})}).catch(s=>{n.ElMessage.error(s)}):Promise.reject(new Error("uploadFile function is not provided"))},g=e.ref(!1),h=e.ref([]);if(u.field.layoutType=="voiceList"&&(g.value=!0,a.value)){a.value=v.html_entity_decode(a.value);var x=JSON.parse(v.html_entity_decode(a.value));x.forEach(t=>{h.value.push(t)})}const H=(r,t)=>{var l=new FormData;l.append("file",r.file),l.append("type",t);const s=new FileReader;var m=0;return s.onload=function(B){const oe=new Blob([B.target.result]),ue=URL.createObjectURL(oe),L=new Audio(ue);L.addEventListener("loadedmetadata",function(){m=Math.round(L.duration/1e3)})},s.readAsArrayBuffer(r.file),y?y(l).then(B=>{h.value.push({name:r.file.name,url:B.info.url,id:"pc-"+I(),duration:m})}).catch(B=>{n.ElMessage.error(B.msg)}):Promise.reject(new Error("uploadFile function is not provided"))},W=()=>{a.value=JSON.stringify(h.value),c()},N=e.ref(!1);u.field.layoutType=="quadratChart"&&(N.value=!0);const Z=r=>{var t;(t=u.field.propertyGroup)==null||t.forEach((l,s)=>{a.value[l]=r[s]}),c()},_=()=>{c()};e.watch(()=>u.field,()=>{}),e.watch(f,()=>{});const ee=()=>{V("change",a.value?1:0)},le=async r=>{if(!p)throw new Error("speciesList is not provided");return(await p({species_name:r,page_size:100})).data},te=(r,t)=>{le(r).then(l=>{t(l)})},b=e.ref({}),ae=r=>{a.value=r.speciesC,b.value=r,V("change",{speciesName:a.value,latinName:b.value.canoricalMe})};return(r,t)=>(e.openBlock(),e.createElementBlock("div",ce,[j.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.field.property=="speciesName"?(e.openBlock(),e.createBlock(e.unref(n.ElAutocomplete),{key:0,modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=l=>a.value=l),"fetch-suggestions":te,"popper-class":"my-autocomplete",placeholder:o.field.placeholder,debounce:500,onBlur:c,onSelect:ae},{default:e.withCtx(({item:l})=>[e.createElementVNode("div",pe,e.toDisplayString(l.speciesC),1),e.createElementVNode("span",fe,e.toDisplayString(l.canoricalMe),1)]),_:1},8,["modelValue","placeholder"])):(e.openBlock(),e.createBlock(e.unref(n.ElInput),{key:1,modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=l=>a.value=l),placeholder:o.field.placeholder,onBlur:c,class:e.normalizeClass({"input-latin-name":u.field.property=="latinName"})},null,8,["modelValue","placeholder","class"]))],64)):P.value?(e.openBlock(),e.createBlock(e.unref(n.ElSelect),{key:1,modelValue:a.value,"onUpdate:modelValue":t[2]||(t[2]=l=>a.value=l),placeholder:o.field.placeholder,onBlur:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.field.selectOptions,l=>(e.openBlock(),e.createBlock(e.unref(n.ElOption),{key:l.label,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])):M.value?(e.openBlock(),e.createBlock(e.unref(n.ElInput),{key:2,modelValue:a.value,"onUpdate:modelValue":t[3]||(t[3]=l=>a.value=l),type:"number",placeholder:o.field.placeholder,onBlur:c},null,8,["modelValue","placeholder"])):R.value?(e.openBlock(),e.createBlock(e.unref(n.ElSelect),{key:3,modelValue:a.value,"onUpdate:modelValue":t[4]||(t[4]=l=>a.value=l),placeholder:o.field.placeholder,onBlur:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.field.selectOptions,l=>(e.openBlock(),e.createBlock(e.unref(n.ElOptionGroup),{key:l.label,label:l.label},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.children,s=>(e.openBlock(),e.createBlock(e.unref(n.ElOption),{key:s.label,label:s.label,value:s.value},null,8,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"])):E.value?(e.openBlock(),e.createBlock(e.unref(n.ElSelect),{key:4,modelValue:a.value,"onUpdate:modelValue":t[5]||(t[5]=l=>a.value=l),placeholder:o.field.placeholder,multiple:"","collapse-tags":"","collapse-tags-tooltip":"",onBlur:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.field.selectOptions,l=>(e.openBlock(),e.createBlock(e.unref(n.ElOption),{key:l.label,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])):A.value?(e.openBlock(),e.createBlock(e.unref(n.ElInput),{key:5,type:"textarea",modelValue:a.value,"onUpdate:modelValue":t[6]||(t[6]=l=>a.value=l),placeholder:o.field.placeholder,onBlur:c},null,8,["modelValue","placeholder"])):z.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[t[22]||(t[22]=e.createTextVNode(" 编辑中 ")),e.createVNode(e.unref(n.ElDialog),{center:"",modelValue:k.value,"onUpdate:modelValue":t[10]||(t[10]=l=>k.value=l),title:"图片管理","append-to-body":"",onClose:Q},{footer:e.withCtx(()=>[e.createVNode(e.unref(n.ElButton),{onClick:t[8]||(t[8]=l=>k.value=!1)},{default:e.withCtx(()=>t[20]||(t[20]=[e.createTextVNode("取 消")])),_:1,__:[20]}),e.createVNode(e.unref(n.ElButton),{type:"primary",onClick:t[9]||(t[9]=l=>k.value=!1)},{default:e.withCtx(()=>t[21]||(t[21]=[e.createTextVNode("确 定")])),_:1,__:[21]})]),default:e.withCtx(()=>[e.createVNode(e.unref(n.ElUpload),{"on-preview":K,style:{margin:"10px 0 0 0"},"file-list":f.value,"onUpdate:fileList":t[7]||(t[7]=l=>f.value=l),action:"","http-request":l=>X(l,"1"),accept:"image/*","list-type":"picture-card"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(O.Plus))]),_:1})]),_:1},8,["file-list","http-request"])]),_:1},8,["modelValue"])],64)):J.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[t[26]||(t[26]=e.createTextVNode(" 编辑中 ")),e.createVNode(e.unref(n.ElDialog),{center:"",modelValue:g.value,"onUpdate:modelValue":t[13]||(t[13]=l=>g.value=l),title:"声音管理","append-to-body":"",onClose:W},{footer:e.withCtx(()=>[e.createVNode(e.unref(n.ElButton),{onClick:t[11]||(t[11]=l=>g.value=!1)},{default:e.withCtx(()=>t[24]||(t[24]=[e.createTextVNode("取 消")])),_:1,__:[24]}),e.createVNode(e.unref(n.ElButton),{type:"primary",onClick:t[12]||(t[12]=l=>g.value=!1)},{default:e.withCtx(()=>t[25]||(t[25]=[e.createTextVNode("确 定")])),_:1,__:[25]})]),default:e.withCtx(()=>[e.createElementVNode("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("div",{key:s},[e.createElementVNode("audio",{src:l.url,controls:""},null,8,ve)]))),128)),h.value.length==0?(e.openBlock(),e.createBlock(e.unref(n.ElEmpty),{key:0,description:"没有声音文件"})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(n.ElUpload),{action:"","http-request":l=>H(l,"2"),"show-file-list":!1,accept:"audio/mpeg,audio/wav,audio/ogg,audio/flac,audio/mp3"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.ElButton),{type:"primary",style:{"margin-top":"10px"},size:"default"},{default:e.withCtx(()=>t[23]||(t[23]=[e.createTextVNode("上传声音文件")])),_:1,__:[23]})]),_:1},8,["http-request"])]),_:1},8,["modelValue"])],64)):C.value?(e.openBlock(),e.createBlock(e.unref(n.ElDatePicker),{key:8,modelValue:a.value,"onUpdate:modelValue":t[14]||(t[14]=l=>a.value=l),type:"date",placeholder:o.field.placeholder,"value-format":"X",onBlur:c},null,8,["modelValue","placeholder"])):G.value?(e.openBlock(),e.createBlock(e.unref(n.ElDatePicker),{key:9,modelValue:a.value,"onUpdate:modelValue":t[15]||(t[15]=l=>a.value=l),type:"datetime",placeholder:o.field.placeholder,"value-format":"X",onBlur:c},null,8,["modelValue","placeholder"])):$.value?(e.openBlock(),e.createBlock(e.unref(n.ElCascader),{key:10,modelValue:a.value,"onUpdate:modelValue":t[16]||(t[16]=l=>a.value=l),options:o.field.selectOptions,placeholder:o.field.placeholder,onChange:Z},null,8,["modelValue","options","placeholder"])):Y.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[e.createVNode(e.unref(n.ElIcon),{size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(O.Calendar))]),_:1}),e.createVNode(e.unref(n.ElDialog),{center:"",modelValue:N.value,"onUpdate:modelValue":t[17]||(t[17]=l=>N.value=l),title:"查看完成度","append-to-body":"",width:"650px",onClose:_},{default:e.withCtx(()=>[e.createVNode(re.default,{data:o.data},null,8,["data"])]),_:1},8,["modelValue"])],64)):D.value?(e.openBlock(),e.createBlock(e.unref(n.ElSwitch),{key:12,modelValue:a.value,"onUpdate:modelValue":t[18]||(t[18]=l=>a.value=l),onChange:ee},null,8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(n.ElDialog),{center:"",modelValue:w.value,"onUpdate:modelValue":t[19]||(t[19]=l=>w.value=l),"append-to-body":"","close-icon":"true"},{default:e.withCtx(()=>[e.createElementVNode("div",ye,[e.createElementVNode("img",{src:T.value,alt:"",style:{height:"700px","object-fit":"contain"}},null,8,ke)])]),_:1},8,["modelValue"])]))}});exports._sfc_main=Ve;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Se, inject as X, ref as V, computed as m, watch as H, createElementBlock as y, openBlock as n, createBlock as p, createCommentVNode as W, createVNode as f, Fragment as h, unref as r, withCtx as i, createElementVNode as w, toDisplayString as Z, normalizeClass as Te, renderList as N, createTextVNode as b } from "vue";
|
|
2
2
|
import { Plus as Ne, Calendar as Le } from "@element-plus/icons-vue";
|
|
3
3
|
import Oe from "../manageTable/Block.mjs";
|
|
4
|
-
import { dayjs as
|
|
4
|
+
import { dayjs as M, ElAutocomplete as Be, ElInput as A, ElSelect as z, ElOption as J, ElOptionGroup as Ie, ElDialog as B, ElUpload as _, ElIcon as ee, ElButton as L, ElEmpty as Pe, ElDatePicker as le, ElCascader as je, ElSwitch as qe, ElMessage as ae } from "element-plus";
|
|
5
5
|
import { u as Fe, s as Re } from "./ProvideKeys-jhgDnhL_.js";
|
|
6
|
-
import { h as I, b as
|
|
6
|
+
import { h as I, b as Me, c as Ae } from "./utils-DIRgjeAd.js";
|
|
7
7
|
const s = [];
|
|
8
|
-
for (let
|
|
9
|
-
s.push((
|
|
10
|
-
function ze(
|
|
11
|
-
return (s[
|
|
8
|
+
for (let t = 0; t < 256; ++t)
|
|
9
|
+
s.push((t + 256).toString(16).slice(1));
|
|
10
|
+
function ze(t, d = 0) {
|
|
11
|
+
return (s[t[d + 0]] + s[t[d + 1]] + s[t[d + 2]] + s[t[d + 3]] + "-" + s[t[d + 4]] + s[t[d + 5]] + "-" + s[t[d + 6]] + s[t[d + 7]] + "-" + s[t[d + 8]] + s[t[d + 9]] + "-" + s[t[d + 10]] + s[t[d + 11]] + s[t[d + 12]] + s[t[d + 13]] + s[t[d + 14]] + s[t[d + 15]]).toLowerCase();
|
|
12
12
|
}
|
|
13
13
|
let $;
|
|
14
14
|
const Je = new Uint8Array(16);
|
|
@@ -21,12 +21,12 @@ function $e() {
|
|
|
21
21
|
return $(Je);
|
|
22
22
|
}
|
|
23
23
|
const Ge = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), te = { randomUUID: Ge };
|
|
24
|
-
function ue(
|
|
25
|
-
var
|
|
26
|
-
if (te.randomUUID && !
|
|
24
|
+
function ue(t, d, C) {
|
|
25
|
+
var u;
|
|
26
|
+
if (te.randomUUID && !t)
|
|
27
27
|
return te.randomUUID();
|
|
28
|
-
|
|
29
|
-
const g =
|
|
28
|
+
t = t || {};
|
|
29
|
+
const g = t.random ?? ((u = t.rng) == null ? void 0 : u.call(t)) ?? $e();
|
|
30
30
|
if (g.length < 16)
|
|
31
31
|
throw new Error("Random bytes length must be >= 16");
|
|
32
32
|
return g[6] = g[6] & 15 | 64, g[8] = g[8] & 63 | 128, ze(g);
|
|
@@ -34,7 +34,7 @@ function ue(u, d, C) {
|
|
|
34
34
|
const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "link" }, Xe = {
|
|
35
35
|
class: "voice-list",
|
|
36
36
|
style: { "margin-top": "20px" }
|
|
37
|
-
}, He = ["src"], We = { style: { display: "flex", "justify-content": "center", width: "auto" } }, Ze = ["src"], ol = /* @__PURE__ */
|
|
37
|
+
}, He = ["src"], We = { style: { display: "flex", "justify-content": "center", width: "auto" } }, Ze = ["src"], ol = /* @__PURE__ */ Se({
|
|
38
38
|
__name: "RenderFormItem",
|
|
39
39
|
props: {
|
|
40
40
|
// 定义props
|
|
@@ -46,50 +46,50 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
46
46
|
data: null
|
|
47
47
|
},
|
|
48
48
|
emits: ["change"],
|
|
49
|
-
setup(
|
|
49
|
+
setup(t, { emit: d }) {
|
|
50
50
|
const C = X(Fe), g = X(Re);
|
|
51
51
|
console.log("speciesList", g);
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
if (
|
|
55
|
-
if (a.value = "",
|
|
56
|
-
if (a.value = JSON.parse(
|
|
52
|
+
const u = t, P = V(!1), E = V(!1), G = V(), a = V(null), oe = m(() => u.field.layoutType == "singleSelect"), re = m(() => u.field.layoutType == "input"), ne = m(() => u.field.layoutType == "number"), ie = m(() => u.field.layoutType == "selectGroup"), O = m(() => u.field.layoutType == "multipleSelect"), de = m(() => u.field.layoutType == "textArea"), se = m(() => u.field.layoutType == "imageList"), pe = m(() => u.field.layoutType == "voiceList"), fe = m(() => u.field.layoutType == "cascader"), j = m(() => u.field.layoutType == "datePicker" || u.field.layout == "datePicker"), ce = m(() => u.field.layoutType == "dateTimePicker"), ve = m(() => u.field.layoutType == "quadratChart"), Y = m(() => (console.log("props.field.layoutType", u.field.layoutType), u.field.layoutType == "switch"));
|
|
53
|
+
if (u.field.property)
|
|
54
|
+
if (u.field.type == "custom") {
|
|
55
|
+
if (a.value = "", u.data.extra && Object.keys(JSON.parse(u.data.extra)).length > 0)
|
|
56
|
+
if (a.value = JSON.parse(u.data.extra)[u.field.property], O.value)
|
|
57
57
|
try {
|
|
58
58
|
a.value = a.value != "" ? a.value.split(/[,,、]/) : [];
|
|
59
59
|
} catch {
|
|
60
60
|
a.value = [];
|
|
61
61
|
}
|
|
62
|
-
else j.value && (a.value = a.value ?
|
|
62
|
+
else j.value && (a.value = a.value ? M(a.value).unix() : M().unix());
|
|
63
63
|
} else if (Y.value)
|
|
64
|
-
a.value =
|
|
64
|
+
a.value = u.data[u.field.property] == 1;
|
|
65
65
|
else if (O.value)
|
|
66
66
|
try {
|
|
67
|
-
let o =
|
|
67
|
+
let o = u.data[u.field.property];
|
|
68
68
|
a.value = o != "" ? o.split(/[,,、]/) : [];
|
|
69
69
|
} catch {
|
|
70
70
|
a.value = [];
|
|
71
71
|
}
|
|
72
72
|
else
|
|
73
|
-
a.value =
|
|
74
|
-
if (
|
|
73
|
+
a.value = u.data[u.field.property];
|
|
74
|
+
if (u.field.propertyGroup) {
|
|
75
75
|
var K = [];
|
|
76
|
-
|
|
77
|
-
K.push(
|
|
76
|
+
u.field.propertyGroup.forEach((o) => {
|
|
77
|
+
K.push(u.data[o]);
|
|
78
78
|
}), a.value = K;
|
|
79
79
|
}
|
|
80
80
|
const x = d, v = () => {
|
|
81
|
-
|
|
81
|
+
u.field.type == "custom" && j.value ? x("change", M(a.value * 1e3).format("YYYY-MM-DD")) : u.field.property == "speciesName" ? x("change", {
|
|
82
82
|
speciesName: a.value,
|
|
83
83
|
latinName: R.value.canorical_me
|
|
84
84
|
}) : x("change", O.value ? a.value.join("、") : a.value);
|
|
85
85
|
}, k = V([]);
|
|
86
|
-
if (
|
|
86
|
+
if (u.field.layoutType == "imageList" && (E.value = !0, a.value)) {
|
|
87
87
|
a.value = I(a.value);
|
|
88
88
|
var q = JSON.parse(I(a.value));
|
|
89
89
|
q.forEach((o) => {
|
|
90
90
|
k.value.push({
|
|
91
91
|
name: o.name,
|
|
92
|
-
url:
|
|
92
|
+
url: Me(o.url),
|
|
93
93
|
imagePath: o.imagePath || "",
|
|
94
94
|
id: o.id || "pc-" + ue(),
|
|
95
95
|
title: o.title || null,
|
|
@@ -101,7 +101,7 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
101
101
|
const me = (o) => {
|
|
102
102
|
G.value = o.url, P.value = !0;
|
|
103
103
|
}, ye = () => {
|
|
104
|
-
a.value = JSON.stringify(k.value.map((o) => ({ ...o, url:
|
|
104
|
+
a.value = JSON.stringify(k.value.map((o) => ({ ...o, url: Ae(o.url) }))), v();
|
|
105
105
|
}, ge = (o, l) => {
|
|
106
106
|
var e = new FormData();
|
|
107
107
|
return e.append("file", o.file), e.append("type", l), C ? C(e).then((c) => {
|
|
@@ -111,12 +111,12 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
111
111
|
}).catch((c) => {
|
|
112
112
|
ae.error(c);
|
|
113
113
|
}) : Promise.reject(new Error("uploadFile function is not provided"));
|
|
114
|
-
},
|
|
115
|
-
if (
|
|
114
|
+
}, D = V(!1), S = V([]);
|
|
115
|
+
if (u.field.layoutType == "voiceList" && (D.value = !0, a.value)) {
|
|
116
116
|
a.value = I(a.value);
|
|
117
117
|
var q = JSON.parse(I(a.value));
|
|
118
118
|
q.forEach((l) => {
|
|
119
|
-
|
|
119
|
+
S.value.push(l);
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
const Ve = (o, l) => {
|
|
@@ -125,12 +125,12 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
125
125
|
const c = new FileReader();
|
|
126
126
|
var U = 0;
|
|
127
127
|
return c.onload = function(T) {
|
|
128
|
-
const xe = new Blob([T.target.result]),
|
|
128
|
+
const xe = new Blob([T.target.result]), De = URL.createObjectURL(xe), Q = new Audio(De);
|
|
129
129
|
Q.addEventListener("loadedmetadata", function() {
|
|
130
130
|
U = Math.round(Q.duration / 1e3);
|
|
131
131
|
});
|
|
132
132
|
}, c.readAsArrayBuffer(o.file), C ? C(e).then((T) => {
|
|
133
|
-
|
|
133
|
+
S.value.push({
|
|
134
134
|
name: o.file.name,
|
|
135
135
|
// @ts-ignore
|
|
136
136
|
url: T.info.url,
|
|
@@ -141,19 +141,19 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
141
141
|
ae.error(T.msg);
|
|
142
142
|
}) : Promise.reject(new Error("uploadFile function is not provided"));
|
|
143
143
|
}, he = () => {
|
|
144
|
-
a.value = JSON.stringify(
|
|
144
|
+
a.value = JSON.stringify(S.value), v();
|
|
145
145
|
}, F = V(!1);
|
|
146
|
-
|
|
146
|
+
u.field.layoutType == "quadratChart" && (F.value = !0);
|
|
147
147
|
const be = (o) => {
|
|
148
148
|
var l;
|
|
149
|
-
(l =
|
|
149
|
+
(l = u.field.propertyGroup) == null || l.forEach((e, c) => {
|
|
150
150
|
a.value[e] = o[c];
|
|
151
151
|
}), v();
|
|
152
152
|
}, ke = () => {
|
|
153
153
|
v();
|
|
154
154
|
};
|
|
155
155
|
H(
|
|
156
|
-
() =>
|
|
156
|
+
() => u.field,
|
|
157
157
|
() => {
|
|
158
158
|
}
|
|
159
159
|
), H(k, () => {
|
|
@@ -179,13 +179,13 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
179
179
|
};
|
|
180
180
|
return (o, l) => (n(), y("div", Ye, [
|
|
181
181
|
re.value ? (n(), y(h, { key: 0 }, [
|
|
182
|
-
|
|
182
|
+
u.field.property == "speciesName" ? (n(), p(r(Be), {
|
|
183
183
|
key: 0,
|
|
184
184
|
modelValue: a.value,
|
|
185
185
|
"onUpdate:modelValue": l[0] || (l[0] = (e) => a.value = e),
|
|
186
186
|
"fetch-suggestions": Ce,
|
|
187
187
|
"popper-class": "my-autocomplete",
|
|
188
|
-
placeholder:
|
|
188
|
+
placeholder: t.field.placeholder,
|
|
189
189
|
debounce: 500,
|
|
190
190
|
onBlur: v,
|
|
191
191
|
onSelect: Ee
|
|
@@ -195,51 +195,51 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
195
195
|
w("span", Qe, Z(e.canoricalMe), 1)
|
|
196
196
|
]),
|
|
197
197
|
_: 1
|
|
198
|
-
}, 8, ["modelValue", "placeholder"])) : (n(), p(r(
|
|
198
|
+
}, 8, ["modelValue", "placeholder"])) : (n(), p(r(A), {
|
|
199
199
|
key: 1,
|
|
200
200
|
modelValue: a.value,
|
|
201
201
|
"onUpdate:modelValue": l[1] || (l[1] = (e) => a.value = e),
|
|
202
|
-
placeholder:
|
|
202
|
+
placeholder: t.field.placeholder,
|
|
203
203
|
onBlur: v,
|
|
204
|
-
class: Te({ "input-latin-name":
|
|
204
|
+
class: Te({ "input-latin-name": u.field.property == "latinName" })
|
|
205
205
|
}, null, 8, ["modelValue", "placeholder", "class"]))
|
|
206
206
|
], 64)) : oe.value ? (n(), p(r(z), {
|
|
207
207
|
key: 1,
|
|
208
208
|
modelValue: a.value,
|
|
209
209
|
"onUpdate:modelValue": l[2] || (l[2] = (e) => a.value = e),
|
|
210
|
-
placeholder:
|
|
210
|
+
placeholder: t.field.placeholder,
|
|
211
211
|
onBlur: v
|
|
212
212
|
}, {
|
|
213
213
|
default: i(() => [
|
|
214
|
-
(n(!0), y(h, null, N(
|
|
215
|
-
key: e.
|
|
214
|
+
(n(!0), y(h, null, N(t.field.selectOptions, (e) => (n(), p(r(J), {
|
|
215
|
+
key: e.label,
|
|
216
216
|
label: e.label,
|
|
217
217
|
value: e.value
|
|
218
218
|
}, null, 8, ["label", "value"]))), 128))
|
|
219
219
|
]),
|
|
220
220
|
_: 1
|
|
221
|
-
}, 8, ["modelValue", "placeholder"])) : ne.value ? (n(), p(r(
|
|
221
|
+
}, 8, ["modelValue", "placeholder"])) : ne.value ? (n(), p(r(A), {
|
|
222
222
|
key: 2,
|
|
223
223
|
modelValue: a.value,
|
|
224
224
|
"onUpdate:modelValue": l[3] || (l[3] = (e) => a.value = e),
|
|
225
225
|
type: "number",
|
|
226
|
-
placeholder:
|
|
226
|
+
placeholder: t.field.placeholder,
|
|
227
227
|
onBlur: v
|
|
228
228
|
}, null, 8, ["modelValue", "placeholder"])) : ie.value ? (n(), p(r(z), {
|
|
229
229
|
key: 3,
|
|
230
230
|
modelValue: a.value,
|
|
231
231
|
"onUpdate:modelValue": l[4] || (l[4] = (e) => a.value = e),
|
|
232
|
-
placeholder:
|
|
232
|
+
placeholder: t.field.placeholder,
|
|
233
233
|
onBlur: v
|
|
234
234
|
}, {
|
|
235
235
|
default: i(() => [
|
|
236
|
-
(n(!0), y(h, null, N(
|
|
236
|
+
(n(!0), y(h, null, N(t.field.selectOptions, (e) => (n(), p(r(Ie), {
|
|
237
237
|
key: e.label,
|
|
238
238
|
label: e.label
|
|
239
239
|
}, {
|
|
240
240
|
default: i(() => [
|
|
241
241
|
(n(!0), y(h, null, N(e.children, (c) => (n(), p(r(J), {
|
|
242
|
-
key: c.
|
|
242
|
+
key: c.label,
|
|
243
243
|
label: c.label,
|
|
244
244
|
value: c.value
|
|
245
245
|
}, null, 8, ["label", "value"]))), 128))
|
|
@@ -252,26 +252,26 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
252
252
|
key: 4,
|
|
253
253
|
modelValue: a.value,
|
|
254
254
|
"onUpdate:modelValue": l[5] || (l[5] = (e) => a.value = e),
|
|
255
|
-
placeholder:
|
|
255
|
+
placeholder: t.field.placeholder,
|
|
256
256
|
multiple: "",
|
|
257
257
|
"collapse-tags": "",
|
|
258
258
|
"collapse-tags-tooltip": "",
|
|
259
259
|
onBlur: v
|
|
260
260
|
}, {
|
|
261
261
|
default: i(() => [
|
|
262
|
-
(n(!0), y(h, null, N(
|
|
263
|
-
key: e.
|
|
262
|
+
(n(!0), y(h, null, N(t.field.selectOptions, (e) => (n(), p(r(J), {
|
|
263
|
+
key: e.label,
|
|
264
264
|
label: e.label,
|
|
265
265
|
value: e.value
|
|
266
266
|
}, null, 8, ["label", "value"]))), 128))
|
|
267
267
|
]),
|
|
268
268
|
_: 1
|
|
269
|
-
}, 8, ["modelValue", "placeholder"])) : de.value ? (n(), p(r(
|
|
269
|
+
}, 8, ["modelValue", "placeholder"])) : de.value ? (n(), p(r(A), {
|
|
270
270
|
key: 5,
|
|
271
271
|
type: "textarea",
|
|
272
272
|
modelValue: a.value,
|
|
273
273
|
"onUpdate:modelValue": l[6] || (l[6] = (e) => a.value = e),
|
|
274
|
-
placeholder:
|
|
274
|
+
placeholder: t.field.placeholder,
|
|
275
275
|
onBlur: v
|
|
276
276
|
}, null, 8, ["modelValue", "placeholder"])) : se.value ? (n(), y(h, { key: 6 }, [
|
|
277
277
|
l[22] || (l[22] = b(" 编辑中 ")),
|
|
@@ -332,15 +332,15 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
332
332
|
l[26] || (l[26] = b(" 编辑中 ")),
|
|
333
333
|
f(r(B), {
|
|
334
334
|
center: "",
|
|
335
|
-
modelValue:
|
|
336
|
-
"onUpdate:modelValue": l[13] || (l[13] = (e) =>
|
|
335
|
+
modelValue: D.value,
|
|
336
|
+
"onUpdate:modelValue": l[13] || (l[13] = (e) => D.value = e),
|
|
337
337
|
title: "声音管理",
|
|
338
338
|
"append-to-body": "",
|
|
339
339
|
onClose: he
|
|
340
340
|
}, {
|
|
341
341
|
footer: i(() => [
|
|
342
342
|
f(r(L), {
|
|
343
|
-
onClick: l[11] || (l[11] = (e) =>
|
|
343
|
+
onClick: l[11] || (l[11] = (e) => D.value = !1)
|
|
344
344
|
}, {
|
|
345
345
|
default: i(() => l[24] || (l[24] = [
|
|
346
346
|
b("取 消")
|
|
@@ -350,7 +350,7 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
350
350
|
}),
|
|
351
351
|
f(r(L), {
|
|
352
352
|
type: "primary",
|
|
353
|
-
onClick: l[12] || (l[12] = (e) =>
|
|
353
|
+
onClick: l[12] || (l[12] = (e) => D.value = !1)
|
|
354
354
|
}, {
|
|
355
355
|
default: i(() => l[25] || (l[25] = [
|
|
356
356
|
b("确 定")
|
|
@@ -361,13 +361,13 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
361
361
|
]),
|
|
362
362
|
default: i(() => [
|
|
363
363
|
w("div", Xe, [
|
|
364
|
-
(n(!0), y(h, null, N(
|
|
364
|
+
(n(!0), y(h, null, N(S.value, (e, c) => (n(), y("div", { key: c }, [
|
|
365
365
|
w("audio", {
|
|
366
366
|
src: e.url,
|
|
367
367
|
controls: ""
|
|
368
368
|
}, null, 8, He)
|
|
369
369
|
]))), 128)),
|
|
370
|
-
|
|
370
|
+
S.value.length == 0 ? (n(), p(r(Pe), {
|
|
371
371
|
key: 0,
|
|
372
372
|
description: "没有声音文件"
|
|
373
373
|
})) : W("", !0)
|
|
@@ -401,7 +401,7 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
401
401
|
modelValue: a.value,
|
|
402
402
|
"onUpdate:modelValue": l[14] || (l[14] = (e) => a.value = e),
|
|
403
403
|
type: "date",
|
|
404
|
-
placeholder:
|
|
404
|
+
placeholder: t.field.placeholder,
|
|
405
405
|
"value-format": "X",
|
|
406
406
|
onBlur: v
|
|
407
407
|
}, null, 8, ["modelValue", "placeholder"])) : ce.value ? (n(), p(r(le), {
|
|
@@ -409,15 +409,15 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
409
409
|
modelValue: a.value,
|
|
410
410
|
"onUpdate:modelValue": l[15] || (l[15] = (e) => a.value = e),
|
|
411
411
|
type: "datetime",
|
|
412
|
-
placeholder:
|
|
412
|
+
placeholder: t.field.placeholder,
|
|
413
413
|
"value-format": "X",
|
|
414
414
|
onBlur: v
|
|
415
415
|
}, null, 8, ["modelValue", "placeholder"])) : fe.value ? (n(), p(r(je), {
|
|
416
416
|
key: 10,
|
|
417
417
|
modelValue: a.value,
|
|
418
418
|
"onUpdate:modelValue": l[16] || (l[16] = (e) => a.value = e),
|
|
419
|
-
options:
|
|
420
|
-
placeholder:
|
|
419
|
+
options: t.field.selectOptions,
|
|
420
|
+
placeholder: t.field.placeholder,
|
|
421
421
|
onChange: be
|
|
422
422
|
}, null, 8, ["modelValue", "options", "placeholder"])) : ve.value ? (n(), y(h, { key: 11 }, [
|
|
423
423
|
f(r(ee), { size: "20" }, {
|
|
@@ -436,7 +436,7 @@ const Ye = { class: "fromItem_style" }, Ke = { class: "value" }, Qe = { class: "
|
|
|
436
436
|
onClose: ke
|
|
437
437
|
}, {
|
|
438
438
|
default: i(() => [
|
|
439
|
-
f(Oe, { data:
|
|
439
|
+
f(Oe, { data: t.data }, null, 8, ["data"])
|
|
440
440
|
]),
|
|
441
441
|
_: 1
|
|
442
442
|
}, 8, ["modelValue"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("@element-plus/icons-vue"),t=require("element-plus"),w=require("../chunks/EventKeys-D78tN5KT.js"),x=require("../chunks/_plugin-vue_export-helper-BHFhmbuH.js"),N={class:"filter-container"},U=["onClick"],T={class:"add-field-container"},q={class:"dialog-footer"},F=e.defineComponent({__name:"FilterItem",emits:["callback"],setup(S,{expose:V,emit:B}){const i=e.ref(!1),s=e.ref([]),_=B,f={string:[{label:"等于",value:"eq"},{label:"不等于",value:"ne"},{label:"包含",value:"like"},{label:"不包含",value:"notlike"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],number:[{label:"等于",value:"eq"},{label:"不等于",value:"ne"},{label:"大于",value:"gt"},{label:"大于等于",value:"gte"},{label:"小于",value:"lt"},{label:"小于等于",value:"lte"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],date:[{label:"等于",value:"eq"},{label:"不等于",value:"ne"},{label:"大于",value:"gt"},{label:"大于等于",value:"gte"},{label:"小于",value:"lt"},{label:"小于等于",value:"lte"},{label:"为空",value:"null"},{label:"不为空",value:"notnull"}],select:[{label:"等于",value:"eq"},{label:"不等于",value:"ne"}],selectGroup:[{label:"等于",value:"eq"},{label:"不等于",value:"ne"}],cascader:[{label:"等于",value:"eq"},{label:"不等于",value:"ne"}],select_second:[{label:"等于",value:"eq"},{label:"不等于",value:"ne"}]};f.singleSelect=f.select;const c=e.ref([]),y=r=>{console.log(r),i.value=!0,s.value=r,c.value.length===0&&c.value.push({field:r[0].title,fieldType:r[0].filterAble,option:"eq",value:""})},h=()=>{c.value=[],i.value=!1,_("callback",{})},E=r=>{c.value.splice(r,1)},C=()=>{c.value.push({field:"",fieldType:"",option:"",value:""})},m=(r,n)=>{const l=s.value.find(u=>u.title===r);l&&(c.value[n].fieldType=l.filterAble,c.value[n].value="",f[l.filterAble].filter(u=>u.value===c.value[n].option).length===0&&(c.value[n].option="eq"))};var b={blockId:"showBlockId"};const g=()=>{i.value=!1;var r={};Object.assign([],c.value).forEach(l=>{console.log(l),(l.option=="null"||l.option=="notnull")&&(l.value=l.option),l.value!==""&&s.value.forEach(u=>{var o;u.title===l.field&&(u.filterAble==="cascader"?(o=u.propertyGroup)==null||o.forEach((v,a)=>{r[v+"__"+l.option]=l.value[a]}):u.property&&b[u.property]?r[b[u.property]+"__"+l.option]=l.value:r[u.property+"__"+l.option]=l.value)})}),w.filterEventBus.emit(r)};return V({showDialog:y,resetForm:()=>{c.value=[],i.value=!1,s.value=[]}}),(r,n)=>(e.openBlock(),e.createBlock(e.unref(t.ElDialog),{center:"",title:"设置筛选条件",modelValue:i.value,"onUpdate:modelValue":n[1]||(n[1]=l=>i.value=l),width:"650",class:"filter-dialog"},{footer:e.withCtx(()=>[e.createElementVNode("div",q,[e.createVNode(e.unref(t.ElButton),{type:"default",onClick:h,plain:"",icon:e.unref(p.Refresh)},{default:e.withCtx(()=>n[3]||(n[3]=[e.createTextVNode("重置")])),_:1,__:[3]},8,["icon"]),e.createVNode(e.unref(t.ElButton),{onClick:n[0]||(n[0]=l=>i.value=!1),icon:e.unref(p.Close),plain:""},{default:e.withCtx(()=>n[4]||(n[4]=[e.createTextVNode("取消")])),_:1,__:[4]},8,["icon"]),e.createVNode(e.unref(t.ElButton),{type:"primary",onClick:g,icon:e.unref(p.Check)},{default:e.withCtx(()=>n[5]||(n[5]=[e.createTextVNode("确定")])),_:1,__:[5]},8,["icon"])])]),default:e.withCtx(()=>[e.createElementVNode("div",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:"filter-item",key:u},[e.createVNode(e.unref(t.ElCol),{span:5,offset:0},{default:e.withCtx(()=>[e.createVNode(e.unref(t.ElSelect),{modelValue:l.field,"onUpdate:modelValue":o=>l.field=o,onChange:o=>m(o,u),placeholder:"选择字段",class:"field-select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,o=>(e.openBlock(),e.createBlock(e.unref(t.ElOption),{key:o.title,label:o.title,value:o.title},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1024),e.createVNode(e.unref(t.ElCol),{span:4,offset:0},{default:e.withCtx(()=>[e.createVNode(e.unref(t.ElSelect),{modelValue:l.option,"onUpdate:modelValue":o=>l.option=o,placeholder:"操作",class:"option-select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f[l.fieldType],o=>(e.openBlock(),e.createBlock(e.unref(t.ElOption),{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1024),l.option!="null"&&l.option!="notnull"?(e.openBlock(),e.createBlock(e.unref(t.ElCol),{key:0,span:13,offset:0},{default:e.withCtx(()=>{var o,v;return[l.fieldType=="date"?(e.openBlock(),e.createBlock(e.unref(t.ElDatePicker),{key:0,modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,type:"date",placeholder:"选择日期时间",style:{width:"100%"},"value-format":"X",class:"value-input"},null,8,["modelValue","onUpdate:modelValue"])):l.fieldType=="select"||l.fieldType=="singleSelect"?(e.openBlock(),e.createBlock(e.unref(t.ElSelect),{key:1,modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,style:{width:"100%"},placeholder:"请选择",class:"value-input"},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=s.value.find(d=>d.title==l.field))==null?void 0:a.selectOptions,d=>(e.openBlock(),e.createBlock(e.unref(t.ElOption),{key:d.label,label:d.label,value:d.value},null,8,["label","value"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])):l.fieldType=="selectGroup"?(e.openBlock(),e.createBlock(e.unref(t.ElSelect),{key:2,modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,style:{width:"100%"},placeholder:"请选择",class:"value-input"},{default:e.withCtx(()=>{var a;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((a=s.value.find(d=>d.title==l.field))==null?void 0:a.selectOptions,d=>(e.openBlock(),e.createBlock(e.unref(t.ElOptionGroup),{key:d.label,label:d.label},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.children,k=>(e.openBlock(),e.createBlock(e.unref(t.ElOption),{key:k.label,label:k.label,value:k.value},null,8,["label","value"]))),128))]),_:2},1032,["label"]))),128))]}),_:2},1032,["modelValue","onUpdate:modelValue"])):l.fieldType=="cascader"?(e.openBlock(),e.createBlock(e.unref(t.ElCascader),{key:3,modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,options:(o=s.value.find(a=>a.title==l.field))==null?void 0:o.selectOptions,placeholder:"请选择",style:{width:"100%"},class:"value-input"},null,8,["modelValue","onUpdate:modelValue","options"])):l.fieldType=="select_second"?(e.openBlock(),e.createBlock(e.unref(t.ElTreeSelect),{key:4,modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,data:(v=s.value.find(a=>a.title==l.field))==null?void 0:v.selectOptions,"check-strictly":"","render-after-expand":!1,"show-checkbox":"",style:{width:"100%"},class:"value-input"},null,8,["modelValue","onUpdate:modelValue","data"])):(e.openBlock(),e.createBlock(e.unref(t.ElInput),{key:5,modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,placeholder:"请输入",clearable:"",class:"value-input"},null,8,["modelValue","onUpdate:modelValue"]))]}),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(e.unref(t.ElCol),{span:2,offset:0},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"delete-button",onClick:o=>E(u)},[e.createVNode(e.unref(t.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(p.Close))]),_:1})],8,U)]),_:2},1024)]))),128)),e.createElementVNode("div",T,[e.createVNode(e.unref(t.ElButton),{type:"primary",plain:"",icon:e.unref(p.Plus),onClick:C,class:"add-button"},{default:e.withCtx(()=>n[2]||(n[2]=[e.createTextVNode(" 增加筛选字段 ")])),_:1,__:[2]},8,["icon"])])])]),_:1},8,["modelValue"]))}}),O=x._export_sfc(F,[["__scopeId","data-v-b054529c"]]);exports.default=O;
|