cbim-common-components
Version:
``` npm install --save cbim-common-components ```
1,010 lines • 79.3 kB
JavaScript
import { resolveComponent as G, createBlock as V, openBlock as _, withCtx as B, renderSlot as xe, createElementBlock as k, createCommentVNode as Q, createElementVNode as i, toDisplayString as S, Fragment as R, createVNode as U, normalizeClass as te, withDirectives as Se, normalizeStyle as ve, vShow as Fe, defineComponent as ne, ref as g, watch as q, onMounted as ce, createTextVNode as X, createStaticVNode as fe, renderList as le, unref as W, withModifiers as Le, computed as Ce, mergeProps as Te } from "vue";
import { message as se } from "ant-design-vue";
import Y from "axios";
import { PesFlowChart as $e, PesApproval as Pe } from "cbim-pes-component-private";
const De = {
props: {
title: {
type: String,
default: ""
},
width: {
type: Number,
default: 450
},
visible: {
type: Boolean,
default: !1
},
selfZIndex: {
type: Number,
default: 0
},
// isModalFullscreen: {
// type: Boolean,
// default: false
// },
modalIndex: {
type: Number,
default: 100
},
showTitle: {
type: Boolean,
default: !0
},
maskClosable: {
type: Boolean,
default: !1
},
closeable: {
type: Boolean,
default: !0
},
fullScreen: {
type: Boolean,
default: !1
},
destroyOnClose: {
type: Boolean,
default: !1
},
showMask: {
type: Boolean,
default: !0
}
},
data() {
return {
/**
* showMask
* fullScreen
* draggable
* closeable
*/
isModalFullscreen: !1
};
},
computed: {
zIndex() {
const d = this.modalIndex;
return /^\d+$/.test(d + "") ? +d : 1e3;
}
},
watch: {
isModalFullscreen(d) {
this.$emit("modalFullscreenChange", d);
}
},
created() {
},
methods: {
cancel() {
this.$emit("closeModal");
}
}
}, ae = (d, r) => {
const e = d.__vccOpts || d;
for (const [t, l] of r)
e[t] = l;
return e;
}, Oe = {
key: 0,
class: "common-components-modal-header"
}, Ue = { class: "modal-operation-list" }, Ne = { key: 0 }, Me = { key: 1 }, Ae = { key: 1 };
function je(d, r, e, t, l, n) {
const a = G("a-button"), p = G("a-modal");
return _(), V(p, {
centered: "",
visible: e.visible,
mask: e.showMask,
width: e.width,
closable: !1,
destroyOnClose: e.destroyOnClose,
maskClosable: e.closeable && e.maskClosable,
onCancel: n.cancel,
wrapClassName: ["common-components-modal-wrapper", l.isModalFullscreen ? "full-screen-modal" : ""].join(" "),
footer: !1,
zIndex: e.selfZIndex ? e.selfZIndex : n.zIndex
}, {
title: B(() => [
e.showTitle ? (_(), k("div", Oe, [
i("h3", null, S(e.title), 1),
i("ul", Ue, [
e.fullScreen ? (_(), k(R, { key: 0 }, [
l.isModalFullscreen ? (_(), k("li", Ne, [
U(a, {
title: "最小化",
onClick: r[0] || (r[0] = (I) => l.isModalFullscreen = !l.isModalFullscreen)
}, {
default: B(() => r[2] || (r[2] = [
i("i", { class: "iconfont iconexitfullscreen" }, null, -1)
])),
_: 1
})
])) : (_(), k("li", Me, [
U(a, {
title: "最大化",
onClick: r[1] || (r[1] = (I) => l.isModalFullscreen = !l.isModalFullscreen)
}, {
default: B(() => r[3] || (r[3] = [
i("i", { class: "iconfont iconfullscreen" }, null, -1)
])),
_: 1
})
]))
], 64)) : Q("", !0),
e.closeable ? (_(), k("li", Ae, [
U(a, {
title: "关闭",
onClick: n.cancel
}, {
default: B(() => r[4] || (r[4] = [
i("i", { class: "iconfont iconclear" }, null, -1)
])),
_: 1
}, 8, ["onClick"])
])) : Q("", !0)
])
])) : Q("", !0)
]),
default: B(() => [
xe(d.$slots, "default")
]),
_: 3
}, 8, ["visible", "mask", "width", "destroyOnClose", "maskClosable", "onCancel", "wrapClassName", "zIndex"]);
}
const ke = /* @__PURE__ */ ae(De, [["render", je]]), Ee = "data:image/svg+xml,%3csvg%20width='160.000000'%20height='160.000000'%20viewBox='0%200%20160%20160'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdesc%3e%20Created%20with%20Pixso.%20%3c/desc%3e%3cdefs%3e%3cclipPath%20id='clip911_70087'%3e%3crect%20id='无内容'%20width='160.000000'%20height='160.000000'%20transform='translate(-0.750000%200.000000)'%20fill='white'%20fill-opacity='0'/%3e%3c/clipPath%3e%3clinearGradient%20x1='81.231277'%20y1='106.418907'%20x2='85.432457'%20y2='132.500137'%20id='paint_linear_911_70089_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.083969'%20stop-color='%23BFC4CE'/%3e%3cstop%20offset='0.709924'%20stop-color='%23E6E7E7'%20stop-opacity='0.000000'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='71.250061'%20y1='37.821777'%20x2='71.250061'%20y2='113.166321'%20id='paint_linear_911_70092_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFFFF'/%3e%3cstop%20offset='0.992366'%20stop-color='%23DCE0EA'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='73.250061'%20y1='37.821777'%20x2='73.250061'%20y2='113.166321'%20id='paint_linear_911_70095_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23BBBFC9'/%3e%3cstop%20offset='1.000000'%20stop-color='%23DDE1EB'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='128.546509'%20y1='26.055443'%20x2='86.469521'%20y2='45.626282'%20id='paint_linear_911_70096_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F1F2F4'%20stop-opacity='0.000000'/%3e%3cstop%20offset='1.000000'%20stop-color='%239AA1B3'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='36.915379'%20y1='50.661804'%20x2='15.561500'%20y2='42.450741'%20id='paint_linear_911_70097_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2398A1B3'/%3e%3cstop%20offset='1.000000'%20stop-color='%23DADFE9'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='80.583336'%20y1='60.500000'%20x2='80.583336'%20y2='113.833336'%20id='paint_linear_911_70098_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFFFF'/%3e%3cstop%20offset='0.992366'%20stop-color='%23DCE0EA'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='80.916656'%20y1='61.166992'%20x2='80.916656'%20y2='113.833664'%20id='paint_linear_911_70099_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23BCC1CB'/%3e%3cstop%20offset='1.000000'%20stop-color='%23DFE3ED'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='54.492157'%20y1='-34.913971'%20x2='77.004303'%20y2='46.455650'%20id='paint_linear_911_70101_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E2E5EE'/%3e%3cstop%20offset='0.999600'%20stop-color='%23C0C4CE'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='88.905510'%20y1='130.044037'%20x2='88.905510'%20y2='117.559013'%20id='paint_linear_911_70103_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B2BDD4'/%3e%3cstop%20offset='1.000000'%20stop-color='%23667696'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='106.704765'%20y1='130.044037'%20x2='106.704765'%20y2='117.559013'%20id='paint_linear_911_70105_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B2BDD4'/%3e%3cstop%20offset='1.000000'%20stop-color='%23667696'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='42.681900'%20y1='51.272411'%20x2='105.114532'%20y2='138.613266'%20id='paint_linear_911_70107_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2397A4C0'/%3e%3cstop%20offset='0.999400'%20stop-color='%23606F8F'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='73.715248'%20y1='104.633347'%20x2='73.715248'%20y2='129.983139'%20id='paint_linear_911_70108_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F2F2F2'/%3e%3cstop%20offset='0.999400'%20stop-color='%23303030'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='78.985329'%20y1='48.215206'%20x2='142.083847'%20y2='141.504913'%20id='paint_linear_911_70109_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2397A4C0'/%3e%3cstop%20offset='0.999400'%20stop-color='%23606F8F'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='121.448242'%20y1='104.633400'%20x2='121.448242'%20y2='129.983200'%20id='paint_linear_911_70110_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F2F2F2'/%3e%3cstop%20offset='0.999400'%20stop-color='%23303030'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='67.891861'%20y1='55.864288'%20x2='130.990463'%20y2='149.154053'%20id='paint_linear_911_70111_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%238E9BB6'/%3e%3cstop%20offset='0.999400'%20stop-color='%23A7B5D3'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='88.457977'%20y1='94.968178'%20x2='87.828773'%20y2='120.488007'%20id='paint_linear_911_70120_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CBCFD9'/%3e%3cstop%20offset='0.999400'%20stop-color='%23AEBCD7'/%3e%3c/linearGradient%3e%3clinearGradient%20x1='107.008881'%20y1='94.968178'%20x2='106.379677'%20y2='120.488007'%20id='paint_linear_911_70122_0'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CBCFD9'/%3e%3cstop%20offset='0.999400'%20stop-color='%23AEBCD7'/%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20clip-path='url(%23clip911_70087)'%3e%3cpath%20id='矢量%201'%20d='M62.81%20131.55L28.25%20113.81L116.47%20101.83L145%20114.34C146.2%20114.86%20146.01%20116.62%20144.73%20116.87L66.69%20132.1C65.37%20132.36%2064%20132.16%2062.81%20131.55Z'%20fill='url(%23paint_linear_911_70089_0)'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20id='减去顶层'%20d='M27.5834%2040.4888L27.5834%20113.167L114.917%20101.746L114.917%2054.3433C114.917%2052.9473%20113.84%2051.7871%20112.447%2051.6841L69.238%2048.48C68.3006%2048.4106%2067.4361%2047.9487%2066.8575%2047.2075L61.9528%2040.9282C61.366%2040.1772%2060.4857%2039.7129%2059.5344%2039.6533L30.417%2037.8271C28.8816%2037.731%2027.5834%2038.9502%2027.5834%2040.4888ZM59.0235%2043.626L38.128%2042.6367C37.0659%2042.5864%2036.1774%2043.4341%2036.1774%2044.4971C36.1774%2045.4917%2036.9586%2046.3105%2037.9519%2046.3579L58.8474%2047.3467C59.9094%2047.397%2060.798%2046.5498%2060.798%2045.4863C60.798%2044.4922%2060.0168%2043.6729%2059.0235%2043.626Z'%20clip-rule='evenodd'%20fill='url(%23paint_linear_911_70092_0)'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20id='减去顶层'%20d='M29.5834%2040.4888L29.5834%20113.167L116.917%20101.746L116.917%2054.3433C116.917%2052.9473%20115.84%2051.7871%20114.447%2051.6841L72.1211%2048.5454C70.6213%2048.4346%2069.2381%2047.6948%2068.3123%2046.5098L64.5063%2041.6367C63.5675%2040.4351%2062.1591%2039.6924%2060.6369%2039.5972L32.417%2037.8271C30.8816%2037.731%2029.5834%2038.9502%2029.5834%2040.4888ZM59.1655%2043.626L38.2699%2042.6367C37.2079%2042.5864%2036.3194%2043.4341%2036.3194%2044.4971C36.3194%2045.4917%2037.1005%2046.3105%2038.0938%2046.3579L58.9893%2047.3467C60.0514%2047.397%2060.9399%2046.5498%2060.9399%2045.4863C60.9399%2044.4922%2060.1588%2043.6729%2059.1655%2043.626Z'%20clip-rule='evenodd'%20fill='url(%23paint_linear_911_70095_0)'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20id='矢量%209'%20d='M131.25%2026C114.91%2039%2098.25%2046.66%2082.24%2047.66C66.24%2048.66%2067.29%2038.82%2069.58%2036.33C73.25%2032.33%2078.94%2033.71%2080.58%2037.33C83.17%2043.05%2075.54%2057.73%2041.79%2056.66'%20stroke='url(%23paint_linear_911_70096_0)'%20stroke-opacity='1.000000'%20stroke-width='0.666667'/%3e%3cpath%20id='矢量%2010'%20d='M27.72%2047.76C19.22%2043.83%2017.22%2039.24%2017.22%2039.24C14.99%2044.52%2015.87%2053.02%2019.84%2057.16C25.45%2063.01%2031.7%2058.43%2031.7%2058.43C24.71%2056.87%2019.21%2051.83%2019.03%2046.88C19.03%2046.88%2021.46%2053.7%2030.88%2056.77C32.96%2057.31%2038.12%2057.8%2037.47%2056.35C34.94%2056.36%2033.13%2056.04%2033.13%2056.04C33.13%2056.04%2032.94%2050.55%2027.72%2047.76Z'%20fill='url(%23paint_linear_911_70097_0)'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20id='矢量%202'%20d='M48.59%2064.25L27.58%20113.33L28.08%20113.83L116.34%20102.05L132.78%2064.85C133.16%2063.98%20132.55%2063%20131.6%2062.97L54.29%2060.62C51.82%2060.54%2049.56%2061.99%2048.59%2064.25Z'%20fill='url(%23paint_linear_911_70098_0)'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cpath%20id='矢量%201'%20d='M50.32%2064.82L28.25%20113.83L116.14%20102.05L132.75%2065.53C133.14%2064.66%20132.53%2063.67%20131.58%2063.64L55.97%2061.29C53.55%2061.21%2051.31%2062.61%2050.32%2064.82Z'%20fill='url(%23paint_linear_911_70099_0)'%20fill-opacity='1.000000'%20fill-rule='evenodd'/%3e%3cg%20opacity='0.400000'%3e%3cellipse%20id='ellipse'%20cx='97.749252'%20cy='121.438477'%20rx='23.683187'%20ry='1.894951'%20fill='url(%23paint_linear_911_70101_0)'%20fill-opacity='1.000000'/%3e%3c/g%3e%3crect%20id='rect'%20x='86.115173'%20y='107.219238'%20width='5.579566'%20height='13.218100'%20fill='url(%23paint_linear_911_70103_0)'%20fill-opacity='1.000000'/%3e%3crect%20id='rect'%20x='103.914429'%20y='107.219238'%20width='5.579566'%20height='13.218100'%20fill='url(%23paint_linear_911_70105_0)'%20fill-opacity='1.000000'/%3e%3cpath%20id='path'%20d='M75.45%2099.36L73.87%20103.5C76.16%20104.64%2080.45%20105.63%2082.56%20104.95C84.69%20104.27%2084.68%20101.52%2084.68%20101.52C79.74%20101.71%2077.17%20101.02%2075.45%2099.36Z'%20fill='url(%23paint_linear_911_70107_0)'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M73.49%2098.67C71.95%2098.79%2070.8%20100.16%2070.92%20101.71C71.04%20103.27%2072.39%20104.43%2073.93%20104.31C75.47%20104.18%2076.62%20102.82%2076.5%20101.26C76.38%2099.71%2075.03%2098.55%2073.49%2098.67Z'%20fill='url(%23paint_linear_911_70108_0)'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M119.56%2099.58L121.43%20103.6C119.21%20104.9%20115.02%20106.2%20112.86%20105.67C110.68%20105.14%20110.5%20102.4%20110.5%20102.4C115.45%20102.23%20117.96%20101.36%20119.56%2099.58Z'%20fill='url(%23paint_linear_911_70109_0)'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M121.46%2098.75C123.01%2098.76%20124.25%20100.04%20124.25%20101.6C124.24%20103.16%20122.97%20104.41%20121.43%20104.4C119.88%20104.39%20118.64%20103.12%20118.65%20101.56C118.66%2099.99%20119.92%2098.74%20121.46%2098.75Z'%20fill='url(%23paint_linear_911_70110_0)'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M115%20108.08L115%2092.12C115%2091.33%20114.59%2090.6%20113.93%2090.19L98.94%2080.98C98.24%2080.55%2097.37%2080.55%2096.67%2080.98L81.69%2090.19C81.03%2090.6%2080.62%2091.33%2080.62%2092.12L80.62%20108.08C80.62%20108.87%2081.03%20109.6%2081.69%20110.01L96.67%20119.21C97.38%20119.64%2098.25%20119.64%2098.94%20119.21L113.93%20110C114.59%20109.6%20115%20108.87%20115%20108.08Z'%20fill='url(%23paint_linear_911_70111_0)'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M114.92%20120.95C114.92%20118.44%20112.17%20116.41%20108.78%20116.41C105.39%20116.41%20102.64%20118.44%20102.64%20120.95L114.92%20120.95Z'%20fill='%23000000'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M80.62%20120.95C80.62%20118.44%2083.38%20116.41%2086.78%20116.41C90.19%20116.41%2092.94%20118.44%2092.94%20120.95L80.62%20120.95Z'%20fill='%23000000'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M112.31%2094.76C106.64%2093.98%20101.79%2092.55%2098.57%2090.63C98.31%2090.47%2098.01%2090.39%2097.71%2090.39C97.41%2090.39%2097.1%2090.47%2096.84%2090.63C93.62%2092.56%2089.05%2093.99%2083.38%2094.76C82.07%2094.95%2081.55%2096.42%2082.5%2097.26C86.45%20100.72%2087.78%20104.14%2088.51%20106.09C88.73%20106.67%2089.34%20107.06%2090.02%20107.06L97.71%20107.06L105.4%20107.06C106.08%20107.06%20106.69%20106.67%20106.91%20106.09C107.65%20104.14%20109.25%20100.72%20113.2%2097.26C114.15%2096.42%20113.62%2094.95%20112.31%2094.76Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M90.84%2099.39C90.84%20100.79%2089.72%20101.92%2088.34%20101.92C86.96%20101.92%2085.84%20100.79%2085.84%2099.39C85.84%2098%2086.96%2096.87%2088.34%2096.87C89.73%2096.87%2090.84%2098%2090.84%2099.39Z'%20fill='url(%23paint_linear_911_70120_0)'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M109.39%2099.39C109.39%20100.79%20108.27%20101.92%20106.89%20101.92C105.51%20101.92%20104.39%20100.79%20104.39%2099.39C104.39%2098%20105.51%2096.87%20106.89%2096.87C108.27%2096.87%20109.39%2098%20109.39%2099.39Z'%20fill='url(%23paint_linear_911_70122_0)'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M95.01%2097.83C95.01%2099.63%2093.56%20101.1%2091.77%20101.1C89.98%20101.1%2088.53%2099.63%2088.53%2097.83C88.53%2096.02%2089.98%2094.56%2091.77%2094.56C93.56%2094.56%2095.01%2096.02%2095.01%2097.83Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M94.18%2097.83C94.18%2099.13%2093.13%20100.19%2091.84%20100.19C90.55%20100.19%2089.5%2099.13%2089.5%2097.83C89.5%2096.52%2090.55%2095.47%2091.84%2095.47C93.13%2095.47%2094.18%2096.52%2094.18%2097.83Z'%20fill='%23000000'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M94.18%2097.83C94.18%2099.13%2093.13%20100.19%2091.84%20100.19C90.55%20100.19%2089.5%2099.13%2089.5%2097.83C89.5%2096.52%2090.55%2095.47%2091.84%2095.47C93.13%2095.47%2094.18%2096.52%2094.18%2097.83Z'%20fill='%23000000'%20fill-opacity='0'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M91.84%20100.19C90.55%20100.19%2089.5%2099.13%2089.5%2097.83C89.5%2096.52%2090.55%2095.47%2091.84%2095.47C93.13%2095.47%2094.18%2096.52%2094.18%2097.83C94.18%2099.13%2093.13%20100.19%2091.84%20100.19Z'%20stroke='%23000000'%20stroke-opacity='1.000000'%20stroke-width='0.051333'/%3e%3cpath%20id='path'%20d='M107.08%2097.83C107.08%2099.55%20105.69%20100.94%20103.99%20100.94C102.29%20100.94%20100.91%2099.55%20100.91%2097.83C100.91%2096.11%20102.29%2094.71%20103.99%2094.71C105.69%2094.71%20107.08%2096.11%20107.08%2097.83Z'%20fill='%23FFFFFF'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M106.22%2097.83C106.22%2099.07%20105.22%20100.08%20103.99%20100.08C102.76%20100.08%20101.77%2099.07%20101.77%2097.83C101.77%2096.58%20102.76%2095.58%20103.99%2095.58C105.22%2095.58%20106.22%2096.58%20106.22%2097.83Z'%20fill='%23000000'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cellipse%20id='ellipse'%20rx='2.248126'%20ry='2.228082'%20transform='matrix(0.187341%20-0.982295%200.981618%200.190858%20103.996%2097.8291)'%20fill='%23000000'%20fill-opacity='0'/%3e%3cellipse%20id='ellipse'%20rx='2.248126'%20ry='2.228082'%20transform='matrix(0.187341%20-0.982295%200.981618%200.190858%20103.996%2097.8291)'%20stroke='%23000000'%20stroke-opacity='1.000000'%20stroke-width='0.051335'/%3e%3cpath%20id='path'%20d='M93%20102.81C93%20100.44%2095.16%2098.52%2097.82%2098.52C100.48%2098.52%20102.64%20100.44%20102.64%20102.81L93%20102.81Z'%20fill='%23000000'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3cpath%20id='path'%20d='M97.18%20103.56L98.5%20103.56C98.81%20103.56%2098.99%20103.96%2098.82%20104.27L98.15%20105.45C98%20105.72%2097.67%20105.72%2097.51%20105.44L96.86%20104.26C96.69%20103.96%2096.88%20103.56%2097.18%20103.56Z'%20fill='%23000000'%20fill-opacity='1.000000'%20fill-rule='nonzero'/%3e%3c/g%3e%3c/svg%3e", Be = {
name: "empty",
props: {
isWord: {
type: Boolean,
default: () => !0
},
emptyText: {
type: String,
default: "暂无内容"
},
size: {
type: Number,
default: 100
},
type: {
type: String,
default: () => "empty-person"
},
font: {
type: Number,
default: 12
},
isBlock: {
type: Boolean,
default: () => !1
},
fullHeight: {
type: Boolean,
default: () => !0
}
},
data() {
return {
emptyImg: Ee
};
}
}, Ge = { class: "flex-column align-center-v" }, Re = ["src"];
function Ke(d, r, e, t, l, n) {
return _(), k("div", {
class: te(["cbim-empty align-center-h align-center-v", { isBlock: e.isBlock, "height-100": e.fullHeight }])
}, [
i("div", Ge, [
Se(i("img", {
class: "cbim-empty-icon",
src: l.emptyImg,
style: ve({ width: `${e.size}px`, height: `${e.size}px` })
}, null, 12, Re), [
[Fe, e.isWord]
]),
i("div", {
style: ve([{ fontSize: `${e.font}px` }, { "margin-top": "8px", "user-select": "none" }])
}, S(e.emptyText), 5)
])
], 2);
}
const oe = /* @__PURE__ */ ae(Be, [["render", Ke], ["__scopeId", "data-v-3829798c"]]), he = {
set: function(d, r, e = 1, t) {
const l = /* @__PURE__ */ new Date();
l.setTime(l.getTime() + e * 24 * 60 * 60 * 1e3);
const n = t ? ";domain=cbim.org.cn" : "";
window.document.cookie = `${d}=${r};path=/;expires=${l.toUTCString()}${n}`;
},
get: function(d) {
const r = window.document.cookie.match("(^|;) ?" + d + "=([^;]*)(;|$)");
return r ? r[2] : null;
},
delete: function(d) {
this.set(d, "", -1);
},
clear() {
const d = document.cookie.match(/[^ =;]+(?==)/g);
if (d)
for (let r = d.length; r--; )
document.cookie = d[r] + "=0; domain=cbim.org.cn; path=/; expires=" + (/* @__PURE__ */ new Date(0)).toUTCString();
}
};
function Ze() {
return localStorage.getItem("CIM-AUTHORIZATION") || he.get("CBIM-SESSION") || he.get("SESSION") || "";
}
const ze = (d = {
prefix: "/api",
hideErrors: !1
}) => {
const r = Y.create({
baseURL: d.prefix,
timeout: 6e4,
headers: {
"Content-Type": "application/json"
},
maxContentLength: 2e3
});
return r.interceptors.request.use(
(e) => {
e.baseURL = window.__ProjDocArchiveSelectorBaseURL__, e.headers.applicationName = "microApplication", e.headers.sessionkey = Ze();
try {
JSON.parse(localStorage.getItem("Doc-ProjectId-tmp")) && (e.headers["Doc-ProjectId"] = JSON.parse(localStorage.getItem("Doc-ProjectId-tmp")));
} catch (t) {
console.log(t);
}
return e;
},
(e) => Promise.reject(e)
), r.interceptors.response.use(
(e) => {
const { code: t, data: l } = e.data;
return t === 0 || t === 200 || t === 201 || t === "200" ? Promise.resolve(e.data) : t === 403 || t === 401 || t === 403 || t === 802 ? (!d.hideErrors && se.error(e.data.message), Promise.reject({
message: e.data.message,
data: l
})) : t === 206 || t === 404 ? Promise.resolve(e.data) : Promise.reject({
message: e.data.message,
data: l,
code: t
});
},
(e) => Promise.reject({
message: "请求失败",
data: e
})
), {
get: (e, t) => new Promise((l, n) => {
r.get(
e,
{ params: t }
).then((a) => {
l(a);
}, (a) => {
n(a);
});
}),
post: (e, t, l) => new Promise((n, a) => {
r.post(e, t, l).then((p) => {
n(p);
}, (p) => {
a(p);
});
}),
put: (e, t) => new Promise((l, n) => {
r.put(
e,
t
).then((a) => {
l(a);
}, (a) => {
n(a);
});
}),
patch: (e, t) => new Promise((l, n) => {
r.patch(
e,
{ params: t }
).then((a) => {
l(a);
}, (a) => {
n(a);
});
}),
delete: (e, t) => new Promise((l, n) => {
r.get(
e,
{ params: t }
).then((a) => {
l(a);
}, (a) => {
n(a);
});
}),
upload: (e, t, l) => new Promise((n, a) => {
r.post(e, t, {
headers: {
"Content-Type": "multipart/form-data"
},
onUploadProgress: (p) => {
p.lengthComputable && l && l(p);
}
}).then((p) => {
n(p || {});
}, (p) => {
a(p);
});
}),
download: (e, t) => new Promise((l, n) => {
Y({
url: e,
method: "get",
responseType: "blob",
onDownloadProgress: (a) => {
a.lengthComputable && t && t(a);
}
}).then((a) => {
l(a.data.data || {});
}, (a) => {
n(a);
});
}),
axios: Y
};
}, ie = ze({ prefix: "/", hideErrors: !1 }), re = "cbim-app-doc-refactor", me = (d, r) => ie.post(`${re}/resources/list?space=${d.space}§ion=${d.projectId === "-1" ? "NO_PROJECT" : "ALL"}`, r), Ve = () => ie.get(`${re}/bucket/app/rootPath`), He = (d) => ie.get(`${re}/task/tree?projectId=${d.projectId}`), Je = (d) => ie.get(`${re}/task/file/list?taskId=${d.taskId}`), We = () => ie.get(`${re}/resources/draw/folder/list`), qe = (d) => ie.get(`${re}/resources/draw/file/list?folderId=${d.folderId}`), Qe = { class: "left" }, Xe = { class: "folder-tree" }, Ye = { key: 0 }, et = { style: { color: "#f50" } }, tt = { key: 1 }, at = { class: "mid-list" }, lt = { class: "list-main" }, st = { class: "list-item" }, ot = { class: "file-checkbox" }, nt = ["title"], it = { class: "file-version" }, rt = { class: "file-uploader" }, ct = { class: "right-selected" }, dt = {
key: 0,
class: "selected-file-content"
}, ut = { class: "file-list-header" }, pt = { class: "file-count" }, ft = { class: "list-content" }, vt = ["title"], ht = ["onClick"], mt = /* @__PURE__ */ ne({
__name: "taskFile",
props: ["projectId", "selectedTaskFileList"],
emits: ["handleChangeSelectedTaskFileList"],
setup(d, { emit: r }) {
const e = d, t = r, l = g(""), n = g([]), a = g([]), p = g([]), I = g([]);
let N = [];
const j = (v) => {
let o = [];
for (const s of v) {
const { children: m, ...y } = s;
m && m.length && (o = o.concat(j(m))), o.push(y);
}
return o;
}, L = (v, o) => {
var s, m;
for (let y in v) {
if (v[y].key === o)
return [v[y].key];
if (((m = (s = v[y]) == null ? void 0 : s.children) == null ? void 0 : m.length) > 0) {
let c = L(v[y].children, o);
if (c !== void 0)
return c.concat(v[y].key);
}
}
};
q(() => l.value, (v) => {
if (v === "") {
p.value = [];
return;
}
const o = N.filter((s) => s.title.indexOf(v) > -1);
p.value = [], o.forEach((s) => {
const m = L(n.value, s == null ? void 0 : s.key);
if ((m == null ? void 0 : m.length) > 0) {
const y = /* @__PURE__ */ new Map();
p.value = [...p.value, ...m].filter((c) => !y.has(c) && y.set(c, c));
}
});
});
const K = (v) => {
a.value = v;
}, M = () => {
Je({ taskId: a.value[0] }).then((v) => {
v.code == 200 && (I.value = v.data, I.value.forEach((o, s) => {
$.value.indexOf(o.id) > -1 ? I.value[s].checked = !0 : I.value[s].checked = !1;
}));
});
};
q(
() => a.value,
() => {
a.value.length > 0 && M();
}
);
const $ = g([]);
q(
() => e.selectedTaskFileList,
() => {
$.value = e.selectedTaskFileList.map((v) => v.id), I.value.forEach((v, o) => {
$.value.indexOf(v.id) > -1 ? I.value[o].checked = !0 : I.value[o].checked = !1;
}), console.log("=================:", $);
}
);
const P = (v, o, s) => {
console.log("handleChange", v, o), v.target.checked ? (o.tagFlag = "任务", o.fromTab = "任务文档", o.fileId = o.fileId, o.fileName = o.originalFileName, o.fileVersion = o.fileDmsVersion, t("handleChangeSelectedTaskFileList", [o], !0), I.value[s].checked = !0) : (t("handleChangeSelectedTaskFileList", [o], !1), I.value[s].checked = !1);
}, Z = (v) => {
t("handleChangeSelectedTaskFileList", [v], !1);
}, z = () => {
t("handleChangeSelectedTaskFileList", [], !1);
}, h = (v) => "任务", f = (v) => "app-task";
return ce(() => {
He({ projectId: e.projectId }).then((v) => {
v.code == 200 && (n.value = v.data != null ? [v.data] : [], console.log("---------treeData:", n), n.value.length > 0 && (a.value = [n.value[0].key]), N = j(n.value));
});
}), (v, o) => {
const s = G("a-input"), m = G("a-tree"), y = G("a-checkbox");
return _(), k(R, null, [
i("div", Qe, [
U(s, {
placeholder: "搜索文件夹",
value: l.value,
"onUpdate:value": o[0] || (o[0] = (c) => l.value = c),
"allow-clear": ""
}, {
prefix: B(() => o[4] || (o[4] = [
i("i", { class: "iconfont iconsearch" }, null, -1)
])),
_: 1
}, 8, ["value"]),
i("div", Xe, [
U(m, {
expandedKeys: p.value,
"onUpdate:expandedKeys": o[1] || (o[1] = (c) => p.value = c),
selectedKeys: a.value,
"onUpdate:selectedKeys": o[2] || (o[2] = (c) => a.value = c),
"tree-data": n.value,
onSelect: K
}, {
title: B(({ title: c }) => [
c.indexOf(l.value) > -1 ? (_(), k("span", Ye, [
X(S(c.substr(0, c.indexOf(l.value))) + " ", 1),
i("span", et, S(l.value), 1),
X(" " + S(c.substr(c.indexOf(l.value) + l.value.length)), 1)
])) : (_(), k("span", tt, S(c), 1))
]),
_: 1
}, 8, ["expandedKeys", "selectedKeys", "tree-data"])
])
]),
i("div", at, [
I.value.length ? (_(), k(R, { key: 0 }, [
o[5] || (o[5] = fe('<div class="list-item list-header" data-v-16971ec0><div class="file-checkbox" data-v-16971ec0></div><div class="file-name" data-v-16971ec0>文档名称</div><div class="file-version" data-v-16971ec0>版本</div><div class="file-uploader" data-v-16971ec0>上传人</div></div>', 1)),
i("div", lt, [
(_(!0), k(R, null, le(I.value, (c, u) => (_(), k("div", {
key: c.id
}, [
i("div", st, [
i("div", ot, [
U(y, {
checked: c.checked,
"onUpdate:checked": (x) => c.checked = x,
onChange: (x) => P(x, c, u)
}, null, 8, ["checked", "onUpdate:checked", "onChange"])
]),
i("div", {
class: "file-name",
title: c.originalFileName
}, S(c.originalFileName), 9, nt),
i("div", it, "V" + S(c.fileDmsVersion), 1),
i("div", rt, S(c.uploadByName), 1)
])
]))), 128))
])
], 64)) : (_(), V(oe, {
key: 1,
"empty-text": "暂无文件"
}))
]),
i("div", ct, [
e.selectedTaskFileList.length ? (_(), k("div", dt, [
i("div", ut, [
i("div", pt, "已选择 " + S(e.selectedTaskFileList.length) + " 个文档", 1),
i("div", {
class: "delete-all",
onClick: o[3] || (o[3] = (c) => z())
}, "清空")
]),
i("div", ft, [
(_(!0), k(R, null, le(e.selectedTaskFileList, (c) => (_(), k("div", {
class: "list-info",
key: c.key
}, [
i("div", {
class: te(["file-app", f()])
}, S(h()), 3),
i("div", {
class: "file-name",
title: c.name
}, S(c.fileName), 9, vt),
i("i", {
class: "delete-button iconfont iconclose",
onClick: (u) => Z(c)
}, null, 8, ht)
]))), 128))
])
])) : (_(), V(oe, {
key: 1,
"empty-text": "暂无已选文件"
}))
])
], 64);
};
}
}), _t = /* @__PURE__ */ ae(mt, [["__scopeId", "data-v-16971ec0"]]), gt = { class: "left" }, yt = { class: "folder-tree" }, Ct = { key: 0 }, kt = { style: { color: "#f50" } }, bt = { key: 1 }, It = { class: "mid-list" }, wt = { class: "list-main" }, xt = { class: "list-item" }, St = { class: "file-checkbox" }, Ft = ["title"], Lt = { class: "file-version" }, Tt = { class: "file-uploader" }, $t = { class: "right-selected" }, Pt = {
key: 0,
class: "selected-file-content"
}, Dt = { class: "file-list-header" }, Ot = { class: "file-count" }, Ut = { class: "list-content" }, Nt = ["title"], Mt = ["onClick"], At = /* @__PURE__ */ ne({
__name: "dwgFile",
props: ["projectId", "selectedDrawFileList"],
emits: ["handleChangeSelectedDrawFileList"],
setup(d, { emit: r }) {
const e = d, t = r, l = g(""), n = g([]), a = g([]), p = g([]), I = g([]), N = g({
title: "name",
key: "id"
});
let j = [];
const L = (o) => {
let s = [];
for (const m of o) {
const { children: y, ...c } = m;
y && y.length && (s = s.concat(L(y))), s.push(c);
}
return s;
}, K = (o, s) => {
var m, y;
for (let c in o) {
if (o[c].key === s)
return [o[c].key];
if (((y = (m = o[c]) == null ? void 0 : m.children) == null ? void 0 : y.length) > 0) {
let u = K(o[c].children, s);
if (u !== void 0)
return u.concat(o[c].key);
}
}
};
q(() => l.value, (o) => {
const s = j.filter((m) => m.title.indexOf(o) > -1);
p.value = [], s.forEach((m) => {
const y = K(n.value, m == null ? void 0 : m.key);
if ((y == null ? void 0 : y.length) > 0) {
const c = /* @__PURE__ */ new Map();
p.value = [...p.value, ...y].filter((u) => !c.has(u) && c.set(u, u));
}
});
});
const M = (o) => {
a.value = o;
}, $ = () => {
qe({ folderId: a.value[0] }).then((o) => {
o.code == 200 && (I.value = o.data, I.value.forEach((s, m) => {
P.value.indexOf(s.id) > -1 ? I.value[m].checked = !0 : I.value[m].checked = !1;
}));
});
};
q(
() => a.value,
() => {
a.value.length > 0 && $();
}
);
const P = g([]);
q(
() => e.selectedDrawFileList,
() => {
P.value = e.selectedDrawFileList.map((o) => o.id), I.value.forEach((o, s) => {
P.value.indexOf(o.id) > -1 ? I.value[s].checked = !0 : I.value[s].checked = !1;
}), console.log("=================:", P);
}
);
const Z = (o, s, m) => {
console.log("handleChange", o, s), o.target.checked ? (s.tagFlag = "图纸", s.fromTab = "图纸文件", s.fileId = s.srcId, s.fileName = s.srcName, s.fileVersion = s.version, s.from = "图纸文档", t("handleChangeSelectedDrawFileList", [s], !0), I.value[m].checked = !0) : (t("handleChangeSelectedDrawFileList", [s], !1), I.value[m].checked = !1);
}, z = (o) => {
t("handleChangeSelectedDrawFileList", [o], !1);
}, h = () => {
t("handleChangeSelectedDrawFileList", [], !1);
}, f = (o) => "图纸", v = (o) => "app-draw";
return ce(() => {
We().then((o) => {
o.code == 200 && (n.value = o.data != null ? o.data : [], n.value.forEach((s, m) => {
n.value[m].key = s.id, n.value[m].title = s.name;
}), console.log("---------treeData:", n), n.value.length > 0 && (a.value = [n.value[0].id]), j = L(n.value));
});
}), (o, s) => {
const m = G("a-input"), y = G("a-tree"), c = G("a-checkbox");
return _(), k(R, null, [
i("div", gt, [
U(m, {
placeholder: "搜索文件夹",
value: l.value,
"onUpdate:value": s[0] || (s[0] = (u) => l.value = u),
"allow-clear": ""
}, {
prefix: B(() => s[4] || (s[4] = [
i("i", { class: "iconfont iconsearch" }, null, -1)
])),
_: 1
}, 8, ["value"]),
i("div", yt, [
U(y, {
expandedKeys: p.value,
"onUpdate:expandedKeys": s[1] || (s[1] = (u) => p.value = u),
selectedKeys: a.value,
"onUpdate:selectedKeys": s[2] || (s[2] = (u) => a.value = u),
"tree-data": n.value,
"field-names": N.value,
onSelect: M
}, {
title: B(({ title: u }) => [
u.indexOf(l.value) > -1 ? (_(), k("span", Ct, [
X(S(u.substr(0, u.indexOf(l.value))) + " ", 1),
i("span", kt, S(l.value), 1),
X(" " + S(u.substr(u.indexOf(l.value) + l.value.length)), 1)
])) : (_(), k("span", bt, S(u), 1))
]),
_: 1
}, 8, ["expandedKeys", "selectedKeys", "tree-data", "field-names"])
])
]),
i("div", It, [
I.value.length ? (_(), k(R, { key: 0 }, [
s[5] || (s[5] = fe('<div class="list-item list-header" data-v-3d9f3318><div class="file-checkbox" data-v-3d9f3318></div><div class="file-name" data-v-3d9f3318>文档名称</div><div class="file-version" data-v-3d9f3318>版本</div><div class="file-uploader" data-v-3d9f3318>上传人</div></div>', 1)),
i("div", wt, [
(_(!0), k(R, null, le(I.value, (u, x) => (_(), k("div", {
key: u.id
}, [
i("div", xt, [
i("div", St, [
U(c, {
checked: u.checked,
"onUpdate:checked": (D) => u.checked = D,
onChange: (D) => Z(D, u, x)
}, null, 8, ["checked", "onUpdate:checked", "onChange"])
]),
i("div", {
class: "file-name",
title: u.name
}, S(u.name), 9, Ft),
i("div", Lt, "V" + S(u.version), 1),
i("div", Tt, S(u.uploader), 1)
])
]))), 128))
])
], 64)) : (_(), V(oe, {
key: 1,
"empty-text": "暂无文件"
}))
]),
i("div", $t, [
e.selectedDrawFileList.length ? (_(), k("div", Pt, [
i("div", Dt, [
i("div", Ot, "已选择 " + S(e.selectedDrawFileList.length) + " 个文档", 1),
i("div", {
class: "delete-all",
onClick: s[3] || (s[3] = (u) => h())
}, "清空")
]),
i("div", Ut, [
(_(!0), k(R, null, le(e.selectedDrawFileList, (u) => (_(), k("div", {
class: "list-info",
key: u.id
}, [
i("div", {
class: te(["file-app", v()])
}, S(f()), 3),
i("div", {
class: "file-name",
title: u.name
}, S(u.fileName), 9, Nt),
i("i", {
class: "delete-button iconfont iconclose",
onClick: (x) => z(u)
}, null, 8, Mt)
]))), 128))
])
])) : (_(), V(oe, {
key: 1,
"empty-text": "暂无已选文件"
}))
])
], 64);
};
}
}), jt = /* @__PURE__ */ ae(At, [["__scopeId", "data-v-3d9f3318"]]), Et = { class: "left" }, Bt = { class: "folder-tree" }, Gt = { class: "mid-list" }, Rt = { class: "list-main" }, Kt = { class: "list-item" }, Zt = { class: "file-checkbox" }, zt = ["title"], Vt = { class: "file-version" }, Ht = { class: "file-uploader" }, Jt = { class: "right-selected" }, Wt = {
key: 0,
class: "selected-file-content"
}, qt = { class: "file-list-header" }, Qt = { class: "file-count" }, Xt = { class: "list-content" }, Yt = ["title"], e0 = ["onClick"], t0 = /* @__PURE__ */ ne({
__name: "docFile",
props: ["projectId", "selectedDocFileList"],
emits: ["handleChangeSelectedDocFileList"],
setup(d, { emit: r }) {
const e = d, t = r, l = g(
[
{
name: "共享空间",
absolutePath: "/team",
title: "共享空间",
key: "/team"
},
{
name: "应用空间",
absolutePath: "1",
title: "应用空间",
key: "1"
}
]
), n = g([]), a = g([]), p = g([]), I = (h) => {
n.value = h;
};
q(
() => n.value,
() => {
n.value.length > 0 && (n.value[0] !== "1" ? me({ space: `${n.value[0].indexOf("/team") >= 0 ? "SHARE" : "APP"}` }, {
filterOptions: {
foldersFirst: !1,
includeFiles: !0,
includeFolders: !1,
mustIncludeName: !0,
recursive: !1
},
pageRequest: {
pageNo: 1,
pageSize: 9999
},
sort: {
sortBy: "creatTime",
sortOrder: "asc"
},
spaceQuery: {
bucketId: "-1",
folder: `${n.value[0]}`
}
}).then((h) => {
var v;
const f = JSON.parse(JSON.stringify(((v = h == null ? void 0 : h.data) == null ? void 0 : v.list) || []));
p.value = f, p.value.forEach((o, s) => {
if (N.value.indexOf(o.id) > -1 ? p.value[s].checked = !0 : p.value[s].checked = !1, o.absolutePath.indexOf("/team") >= 0) {
let m = !1;
for (let y = 0; y < f[s].authRanges.length; y++)
f[s].authRanges[y].authType === "ARCHIVE" && f[s].authRanges[y].possess === 1 && (m = !0);
p.value[s].archiveAuth = m;
} else
p.value[s].archiveAuth = !0;
});
}).catch((h) => {
se.warning(h);
}) : p.value = []);
}
);
const N = g([]);
q(
() => e.selectedDocFileList,
() => {
N.value = e.selectedDocFileList.map((h) => h.id), p.value.forEach((h, f) => {
N.value.indexOf(h.id) > -1 ? p.value[f].checked = !0 : p.value[f].checked = !1;
}), console.log("=================:", N);
}
);
const j = (h, f, v) => {
console.log("handleChange", h, f), h.target.checked ? (f.tagFlag = M(f), f.fromTab = "文档中心", f.fileId = f.id, f.fileName = f.name, f.fileVersion = f.version, t("handleChangeSelectedDocFileList", [f], !0), p.value[v].checked = !0) : (t("handleChangeSelectedDocFileList", [f], !1), p.value[v].checked = !1);
}, L = (h) => {
t("handleChangeSelectedDocFileList", [h], !1);
}, K = () => {
t("handleChangeSelectedDocFileList", [], !1);
}, M = (h) => {
let f = "任务";
return h.absolutePath.indexOf("/team/") >= 0 ? f = "文档" : h.absolutePath.indexOf("/app/comm/") >= 0 ? f = "沟通" : h.absolutePath.indexOf("/app/task/") >= 0 ? f = "任务" : h.absolutePath.indexOf("/tool/") >= 0 ? f = "工具" : f = "文档", f;
}, $ = (h) => {
let f = "";
return h.absolutePath.indexOf("/team/") >= 0 ? f = "app-doc" : h.absolutePath.indexOf("/app/comm/") >= 0 ? f = "app-comm" : h.absolutePath.indexOf("/app/task/") >= 0 ? f = "app-task" : h.absolutePath.indexOf("/tool/") >= 0 ? f = "app-tool" : f = "app-doc", f;
}, P = g([]), Z = (h) => (console.log("-----children:", h.dataRef.children), new Promise(async (f) => {
if (h.dataRef.children) {
f();
return;
}
h.dataRef.absolutePath === "1" ? (h.dataRef.children = P.value, l.value = [...l.value], console.log("-----------treeData.value:", l.value), f()) : me({ space: `${h.dataRef.absolutePath.indexOf("/team") >= 0 ? "SHARE" : "APP"}`, projectId: e.projectId }, {
filterOptions: {
foldersFirst: !1,
includeFiles: !1,
includeFolders: !0,
mustIncludeName: !0,
recursive: !1
},
pageRequest: {
pageNo: 1,
pageSize: 9999
},
sort: {
sortBy: "creatTime",
sortOrder: "asc"
},
spaceQuery: {
bucketId: "",
folder: `${h.dataRef.absolutePath}`
}
}).then((v) => {
var o, s;
if ((s = (o = v == null ? void 0 : v.data) == null ? void 0 : o.list) != null && s.length) {
const m = v.data.list.map((y) => (y.key = y.absolutePath, y.title = y.name, y));
h.dataRef.children = m;
} else
h.dataRef.children = [];
l.value = [...l.value], f();
}).catch((v) => {
se.warning(v);
});
})), z = () => {
Ve().then((h) => {
var v;
let f = [];
f = (v = h.data) == null ? void 0 : v.map((o) => (o.key = o.absolutePath, o.title = o.name, o)), P.value = f;
}).catch((h) => {
console.log(h);
});
};
return ce(() => {
z();
}), (h, f) => {
const v = G("a-tree"), o = G("a-checkbox");
return _(), k(R, null, [
i("div", Et, [
i("div", Bt, [
U(v, {
expandedKeys: a.value,
"onUpdate:expandedKeys": f[0] || (f[0] = (s) => a.value = s),
selectedKeys: n.value,
"onUpdate:selectedKeys": f[1] || (f[1] = (s) => n.value = s),
"load-data": Z,
"tree-data": l.value,
onSelect: I
}, null, 8, ["expandedKeys", "selectedKeys", "tree-data"])
])
]),
i("div", Gt, [
p.value.length ? (_(), k(R, { key: 0 }, [
f[3] || (f[3] = fe('<div class="list-item list-header" data-v-e3fbb212><div class="file-checkbox" data-v-e3fbb212></div><div class="file-name" data-v-e3fbb212>文档名称</div><div class="file-version" data-v-e3fbb212>版本</div><div class="file-uploader" data-v-e3fbb212>上传人</div></div>', 1)),
i("div", Rt, [
(_(!0), k(R, null, le(p.value, (s, m) => (_(), k("div", {
key: s.id
}, [
i("div", Kt, [
i("div", Zt, [
U(o, {
checked: s.checked,
"onUpdate:checked": (y) => s.checked = y,
onChange: (y) => j(y, s, m)
}, null, 8, ["checked", "onUpdate:checked", "onChange"])
]),
i("div", {
class: "file-name",
title: s.name
}, S(s.name), 9, zt),
i("div", Vt, "V" + S(s.version), 1),
i("div", Ht, S(s.creatorName), 1)
])
]))), 128))
])
], 64)) : (_(), V(oe, {
key: 1,
"empty-text": "暂无文件"
}))
]),
i("div", Jt, [
e.selectedDocFileList.length ? (_(), k("div", Wt, [
i("div", qt, [
i("div", Qt, "已选择 " + S(e.selectedDocFileList.length) + " 个文档", 1),
i("div", {
class: "delete-all",
onClick: f[2] || (f[2] = (s) => K())
}, "清空")
]),
i("div", Xt, [
(_(!0), k(R, null, le(e.selectedDocFileList, (s) => (_(), k("div", {
class: "list-info",
key: s.id
}, [
i("div", {
class: te(["file-app", $(s)])
}, S(M(s)), 3),
i("div", {
class: "file-name",
title: s.name
}, S(s.fileName), 9, Yt),
i("i", {
class: "delete-button iconfont iconclose",
onClick: (m) => L(s)
}, null, 8, e0)
]))), 128))
])
])) : (_(), V(oe, {
key: 1,
"empty-text": "暂无已选文件"
}))
])
], 64);
};
}
}), a0 = /* @__PURE__ */ ae(t0, [["__scopeId", "data-v-e3fbb212"]]), l0 = { class: "file-main" }, s0 = { className: "header" }, o0 = { className: "type-content" }, n0 = { class: "content" }, i0 = { class: "footer" }, r0 = { style: { display: "flex", "justify-content": "space-between" } }, c0 = {
class: "all-selected-list",
style: { width: "476px", height: "328px", overflow: "auto" }
}, d0 = {
key: 0,
class: "list-content"
}, u0 = {
class: "left-item",
style: { display: "flex", gap: "10px" }
}, p0 = ["title"], f0 = {
class: "right-item",
style: { display: "flex", gap: "10px" }
}, v0 = ["onClick"], h0 = { class: "footer-button" }, m0 = /* @__PURE__ */ ne({
__name: "index",
props: {
title: {
type: String,
default: "归档表单选择"
},
from: {
type: String,
default: ""
// doc
},
single: {
type: Boolean,
default: !1
},
isFolder: {
type: Boolean,
default: !1
},
showMask: {
type: Boolean,
default: !1
},
destroyOnClose: {
type: Boolean,
default: !1
},
// accountId: {
// type: String,
// default: "",
// },
projectId: {
type: String,
default: ""
},
docProjectId: {
type: String,
default: ""
},
// targetFolderId: {
// type: String,
// default: "",
// },
// targetFolderPath: {
// type: String,
// default: "",
// },
errorTipText: {
type: String,
default: "请选择文件"
},
baseURL: {
type: String,
default: ""
}
},
emits: ["onSave"],
setup(d, { expose: r, emit: e }) {
const t = d;
window.__ProjDocArchiveSelectorBaseURL__ = t.baseURL;
const { title: l, projectId: n, showMask: a, destroyOnClose: p } = t, I = e, N = g("0"), j = g([]), L = g([]), K = (c, u) => {
if (u) {
let x = [...L.value];
t.single ? x = [...c] : x.push(...c);
const D = /* @__PURE__ */ new Map();
L.value = x.filter(
(F) => !D.has(F.id) && D.set(F.id, F)
);
} else
c.length === 0 ? L.value = [] : L.value = L.value.filter((x) => !c.some((F) => F.id == x.id));
}, M = g([]), $ = (c, u) => {
if (u) {
let x = [...M.value];
t.single ? x = [...c] : x.push(...c);
const D = /* @__PURE__ */ new Map();