if (typeof Promise !== "undefined" && !Promise.prototype.finally) { Promise.prototype.finally = function(callback) { const promise = this.constructor; return this.then( (value) => promise.resolve(callback()).then(() => value), (reason) => promise.resolve(callback()).then(() => { throw reason; }) ); }; } ; if (typeof uni !== "undefined" && uni && uni.requireGlobal) { const global2 = uni.requireGlobal(); ArrayBuffer = global2.ArrayBuffer; Int8Array = global2.Int8Array; Uint8Array = global2.Uint8Array; Uint8ClampedArray = global2.Uint8ClampedArray; Int16Array = global2.Int16Array; Uint16Array = global2.Uint16Array; Int32Array = global2.Int32Array; Uint32Array = global2.Uint32Array; Float32Array = global2.Float32Array; Float64Array = global2.Float64Array; BigInt64Array = global2.BigInt64Array; BigUint64Array = global2.BigUint64Array; } ; if (uni.restoreGlobal) { uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval); } (function(vue, shared) { "use strict"; const icons = { "uicon-level": "", "uicon-column-line": "", "uicon-checkbox-mark": "", "uicon-folder": "", "uicon-movie": "", "uicon-star-fill": "", "uicon-star": "", "uicon-phone-fill": "", "uicon-phone": "", "uicon-apple-fill": "", "uicon-chrome-circle-fill": "", "uicon-backspace": "", "uicon-attach": "", "uicon-cut": "", "uicon-empty-car": "", "uicon-empty-coupon": "", "uicon-empty-address": "", "uicon-empty-favor": "", "uicon-empty-permission": "", "uicon-empty-news": "", "uicon-empty-search": "", "uicon-github-circle-fill": "", "uicon-rmb": "", "uicon-person-delete-fill": "", "uicon-reload": "", "uicon-order": "", "uicon-server-man": "", "uicon-search": "", "uicon-fingerprint": "", "uicon-more-dot-fill": "", "uicon-scan": "", "uicon-share-square": "", "uicon-map": "", "uicon-map-fill": "", "uicon-tags": "", "uicon-tags-fill": "", "uicon-bookmark-fill": "", "uicon-bookmark": "", "uicon-eye": "", "uicon-eye-fill": "", "uicon-mic": "", "uicon-mic-off": "", "uicon-calendar": "", "uicon-calendar-fill": "", "uicon-trash": "", "uicon-trash-fill": "", "uicon-play-left": "", "uicon-play-right": "", "uicon-minus": "", "uicon-plus": "", "uicon-info": "", "uicon-info-circle": "", "uicon-info-circle-fill": "", "uicon-question": "", "uicon-error": "", "uicon-close": "", "uicon-checkmark": "", "uicon-android-circle-fill": "", "uicon-android-fill": "", "uicon-ie": "", "uicon-IE-circle-fill": "", "uicon-google": "", "uicon-google-circle-fill": "", "uicon-setting-fill": "", "uicon-setting": "", "uicon-minus-square-fill": "", "uicon-plus-square-fill": "", "uicon-heart": "", "uicon-heart-fill": "", "uicon-camera": "", "uicon-camera-fill": "", "uicon-more-circle": "", "uicon-more-circle-fill": "", "uicon-chat": "", "uicon-chat-fill": "", "uicon-bag-fill": "", "uicon-bag": "", "uicon-error-circle-fill": "", "uicon-error-circle": "", "uicon-close-circle": "", "uicon-close-circle-fill": "", "uicon-checkmark-circle": "", "uicon-checkmark-circle-fill": "", "uicon-question-circle-fill": "", "uicon-question-circle": "", "uicon-share": "", "uicon-share-fill": "", "uicon-shopping-cart": "", "uicon-shopping-cart-fill": "", "uicon-bell": "", "uicon-bell-fill": "", "uicon-list": "", "uicon-list-dot": "", "uicon-zhihu": "", "uicon-zhihu-circle-fill": "", "uicon-zhifubao": "", "uicon-zhifubao-circle-fill": "", "uicon-weixin-circle-fill": "", "uicon-weixin-fill": "", "uicon-twitter-circle-fill": "", "uicon-twitter": "", "uicon-taobao-circle-fill": "", "uicon-taobao": "", "uicon-weibo-circle-fill": "", "uicon-weibo": "", "uicon-qq-fill": "", "uicon-qq-circle-fill": "", "uicon-moments-circel-fill": "", "uicon-moments": "", "uicon-qzone": "", "uicon-qzone-circle-fill": "", "uicon-baidu-circle-fill": "", "uicon-baidu": "", "uicon-facebook-circle-fill": "", "uicon-facebook": "", "uicon-car": "", "uicon-car-fill": "", "uicon-warning-fill": "", "uicon-warning": "", "uicon-clock-fill": "", "uicon-clock": "", "uicon-edit-pen": "", "uicon-edit-pen-fill": "", "uicon-email": "", "uicon-email-fill": "", "uicon-minus-circle": "", "uicon-minus-circle-fill": "", "uicon-plus-circle": "", "uicon-plus-circle-fill": "", "uicon-file-text": "", "uicon-file-text-fill": "", "uicon-pushpin": "", "uicon-pushpin-fill": "", "uicon-grid": "", "uicon-grid-fill": "", "uicon-play-circle": "", "uicon-play-circle-fill": "", "uicon-pause-circle-fill": "", "uicon-pause": "", "uicon-pause-circle": "", "uicon-eye-off": "", "uicon-eye-off-outline": "", "uicon-gift-fill": "", "uicon-gift": "", "uicon-rmb-circle-fill": "", "uicon-rmb-circle": "", "uicon-kefu-ermai": "", "uicon-server-fill": "", "uicon-coupon-fill": "", "uicon-coupon": "", "uicon-integral": "", "uicon-integral-fill": "", "uicon-home-fill": "", "uicon-home": "", "uicon-hourglass-half-fill": "", "uicon-hourglass": "", "uicon-account": "", "uicon-plus-people-fill": "", "uicon-minus-people-fill": "", "uicon-account-fill": "", "uicon-thumb-down-fill": "", "uicon-thumb-down": "", "uicon-thumb-up": "", "uicon-thumb-up-fill": "", "uicon-lock-fill": "", "uicon-lock-open": "", "uicon-lock-opened-fill": "", "uicon-lock": "", "uicon-red-packet-fill": "", "uicon-photo-fill": "", "uicon-photo": "", "uicon-volume-off-fill": "", "uicon-volume-off": "", "uicon-volume-fill": "", "uicon-volume": "", "uicon-red-packet": "", "uicon-download": "", "uicon-arrow-up-fill": "", "uicon-arrow-down-fill": "", "uicon-play-left-fill": "", "uicon-play-right-fill": "", "uicon-rewind-left-fill": "", "uicon-rewind-right-fill": "", "uicon-arrow-downward": "", "uicon-arrow-leftward": "", "uicon-arrow-rightward": "", "uicon-arrow-upward": "", "uicon-arrow-down": "", "uicon-arrow-right": "", "uicon-arrow-left": "", "uicon-arrow-up": "", "uicon-skip-back-left": "", "uicon-skip-forward-right": "", "uicon-rewind-right": "", "uicon-rewind-left": "", "uicon-arrow-right-double": "", "uicon-arrow-left-double": "", "uicon-wifi-off": "", "uicon-wifi": "", "uicon-empty-data": "", "uicon-empty-history": "", "uicon-empty-list": "", "uicon-empty-page": "", "uicon-empty-order": "", "uicon-man": "", "uicon-woman": "", "uicon-man-add": "", "uicon-man-add-fill": "", "uicon-man-delete": "", "uicon-man-delete-fill": "", "uicon-zh": "", "uicon-en": "" }; const ON_LOAD = "onLoad"; function formatAppLog(type, filename, ...args) { if (uni.__log__) { uni.__log__(type, filename, ...args); } else { console[type].apply(console, [...args, filename]); } } function resolveEasycom(component, easycom2) { return shared.isString(component) ? easycom2 : component; } const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => { !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target); }; const onLoad = /* @__PURE__ */ createHook(ON_LOAD); const version = "3"; { formatAppLog("log", "at node_modules/uview-plus/libs/config/config.js:5", ` %c uview-plus V${version} %c https://ijry.github.io/uview-plus/ `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;"); } const config$1 = { v: version, version, // 主题名称 type: [ "primary", "success", "info", "error", "warning" ], // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持 color: { "u-primary": "#2979ff", "u-warning": "#ff9900", "u-success": "#19be6b", "u-error": "#fa3534", "u-info": "#909399", "u-main-color": "#303133", "u-content-color": "#606266", "u-tips-color": "#909399", "u-light-color": "#c0c4cc" }, // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx unit: "px" }; const ActionSheet = { // action-sheet组件 actionSheet: { show: false, title: "", description: "", actions: () => [], index: "", cancelText: "", closeOnClickAction: true, safeAreaInsetBottom: true, openType: "", closeOnClickOverlay: true, round: 0 } }; const Album = { // album 组件 album: { urls: () => [], keyName: "", singleSize: 180, multipleSize: 70, space: 6, singleMode: "scaleToFill", multipleMode: "aspectFill", maxCount: 9, previewFullImage: true, rowCount: 3, showMore: true } }; const Alert = { // alert警告组件 alert: { title: "", type: "warning", description: "", closable: false, showIcon: false, effect: "light", center: false, fontSize: 14 } }; const Avatar = { // avatar 组件 avatar: { src: "", shape: "circle", size: 40, mode: "scaleToFill", text: "", bgColor: "#c0c4cc", color: "#ffffff", fontSize: 18, icon: "", mpAvatar: false, randomBgColor: false, defaultUrl: "", colorIndex: "", name: "" } }; const AvatarGroup = { // avatarGroup 组件 avatarGroup: { urls: () => [], maxCount: 5, shape: "circle", mode: "scaleToFill", showMore: true, size: 40, keyName: "", gap: 0.5, extraValue: 0 } }; const Backtop = { // backtop组件 backtop: { mode: "circle", icon: "arrow-upward", text: "", duration: 100, scrollTop: 0, top: 400, bottom: 100, right: 20, zIndex: 9, iconStyle: () => ({ color: "#909399", fontSize: "19px" }) } }; const Badge = { // 徽标数组件 badge: { isDot: false, value: "", show: true, max: 999, type: "error", showZero: false, bgColor: null, color: null, shape: "circle", numberType: "overflow", offset: () => [], inverted: false, absolute: false } }; const Button = { // button组件 button: { hairline: false, type: "info", size: "normal", shape: "square", plain: false, disabled: false, loading: false, loadingText: "", loadingMode: "spinner", loadingSize: 15, openType: "", formType: "", appParameter: "", hoverStopPropagation: true, lang: "en", sessionFrom: "", sendMessageTitle: "", sendMessagePath: "", sendMessageImg: "", showMessageCard: false, dataName: "", throttleTime: 0, hoverStartTime: 0, hoverStayTime: 200, text: "", icon: "", iconColor: "", color: "" } }; const Calendar$1 = { // calendar 组件 calendar: { title: "日期选择", showTitle: true, showSubtitle: true, mode: "single", startText: "开始", endText: "结束", customList: () => [], color: "#3c9cff", minDate: 0, maxDate: 0, defaultDate: null, maxCount: Number.MAX_SAFE_INTEGER, // Infinity rowHeight: 56, formatter: null, showLunar: false, showMark: true, confirmText: "确定", confirmDisabledText: "确定", show: false, closeOnClickOverlay: false, readonly: false, showConfirm: true, maxRange: Number.MAX_SAFE_INTEGER, // Infinity rangePrompt: "", showRangePrompt: true, allowSameDay: false, round: 0, monthNum: 3 } }; const CarKeyboard = { // 车牌号键盘 carKeyboard: { random: false } }; const Cell = { // cell组件的props cell: { customClass: "", title: "", label: "", value: "", icon: "", disabled: false, border: true, center: false, url: "", linkType: "navigateTo", clickable: false, isLink: false, required: false, arrowDirection: "", iconStyle: {}, rightIconStyle: {}, rightIcon: "arrow-right", titleStyle: {}, size: "", stop: true, name: "" } }; const CellGroup = { // cell-group组件的props cellGroup: { title: "", border: true, customStyle: {} } }; const Checkbox = { // checkbox组件 checkbox: { name: "", shape: "", size: "", checkbox: false, disabled: "", activeColor: "", inactiveColor: "", iconSize: "", iconColor: "", label: "", labelSize: "", labelColor: "", labelDisabled: "" } }; const CheckboxGroup = { // checkbox-group组件 checkboxGroup: { name: "", value: () => [], shape: "square", disabled: false, activeColor: "#2979ff", inactiveColor: "#c8c9cc", size: 18, placement: "row", labelSize: 14, labelColor: "#303133", labelDisabled: false, iconColor: "#ffffff", iconSize: 12, iconPlacement: "left", borderBottom: false } }; const CircleProgress = { // circleProgress 组件 circleProgress: { percentage: 30 } }; const Code = { // code 组件 code: { seconds: 60, startText: "获取验证码", changeText: "X秒重新获取", endText: "重新获取", keepRunning: false, uniqueKey: "" } }; const CodeInput = { // codeInput 组件 codeInput: { adjustPosition: true, maxlength: 6, dot: false, mode: "box", hairline: false, space: 10, value: "", focus: false, bold: false, color: "#606266", fontSize: 18, size: 35, disabledKeyboard: false, borderColor: "#c9cacc", disabledDot: true } }; const Col = { // col 组件 col: { span: 12, offset: 0, justify: "start", align: "stretch", textAlign: "left" } }; const Collapse = { // collapse 组件 collapse: { value: null, accordion: false, border: true } }; const CollapseItem = { // collapseItem 组件 collapseItem: { title: "", value: "", label: "", disabled: false, isLink: true, clickable: true, border: true, align: "left", name: "", icon: "", duration: 300 } }; const ColumnNotice = { // columnNotice 组件 columnNotice: { text: "", icon: "volume", mode: "", color: "#f9ae3d", bgColor: "#fdf6ec", fontSize: 14, speed: 80, step: false, duration: 1500, disableTouch: true } }; const CountDown = { // u-count-down 计时器组件 countDown: { time: 0, format: "HH:mm:ss", autoStart: true, millisecond: false } }; const CountTo = { // countTo 组件 countTo: { startVal: 0, endVal: 0, duration: 2e3, autoplay: true, decimals: 0, useEasing: true, decimal: ".", color: "#606266", fontSize: 22, bold: false, separator: "" } }; const DatetimePicker = { // datetimePicker 组件 datetimePicker: { show: false, showToolbar: true, value: "", title: "", mode: "datetime", maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(), minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(), minHour: 0, maxHour: 23, minMinute: 0, maxMinute: 59, filter: null, formatter: null, loading: false, itemHeight: 44, cancelText: "取消", confirmText: "确认", cancelColor: "#909193", confirmColor: "#3c9cff", visibleItemCount: 5, closeOnClickOverlay: false, defaultIndex: () => [] } }; const Divider = { // divider组件 divider: { dashed: false, hairline: true, dot: false, textPosition: "center", text: "", textSize: 14, textColor: "#909399", lineColor: "#dcdfe6" } }; const Empty = { // empty组件 empty: { icon: "", text: "", textColor: "#c0c4cc", textSize: 14, iconColor: "#c0c4cc", iconSize: 90, mode: "data", width: 160, height: 160, show: true, marginTop: 0 } }; const Form = { // form 组件 form: { model: () => ({}), rules: () => ({}), errorType: "message", borderBottom: true, labelPosition: "left", labelWidth: 45, labelAlign: "left", labelStyle: () => ({}) } }; const GormItem = { // formItem 组件 formItem: { label: "", prop: "", borderBottom: "", labelWidth: "", rightIcon: "", leftIcon: "", required: false, leftIconStyle: "" } }; const Gap = { // gap组件 gap: { bgColor: "transparent", height: 20, marginTop: 0, marginBottom: 0, customStyle: {} } }; const Grid = { // grid组件 grid: { col: 3, border: false, align: "left" } }; const GridItem = { // grid-item组件 gridItem: { name: null, bgColor: "transparent" } }; const { color: color$5 } = config$1; const Icon = { // icon组件 icon: { name: "", color: color$5["u-content-color"], size: "16px", bold: false, index: "", hoverClass: "", customPrefix: "uicon", label: "", labelPos: "right", labelSize: "15px", labelColor: color$5["u-content-color"], space: "3px", imgMode: "", width: "", height: "", top: 0, stop: false } }; const Image = { // image组件 image: { src: "", mode: "aspectFill", width: "300", height: "225", shape: "square", radius: 0, lazyLoad: true, showMenuByLongpress: true, loadingIcon: "photo", errorIcon: "error-circle", showLoading: true, showError: true, fade: true, webp: false, duration: 500, bgColor: "#f3f4f6" } }; const IndexAnchor = { // indexAnchor 组件 indexAnchor: { text: "", color: "#606266", size: 14, bgColor: "#dedede", height: 32 } }; const IndexList = { // indexList 组件 indexList: { inactiveColor: "#606266", activeColor: "#5677fc", indexList: () => [], sticky: true, customNavHeight: 0 } }; const Input = { // index 组件 input: { value: "", type: "text", fixed: false, disabled: false, disabledColor: "#f5f7fa", clearable: false, password: false, maxlength: -1, placeholder: null, placeholderClass: "input-placeholder", placeholderStyle: "color: #c0c4cc", showWordLimit: false, confirmType: "done", confirmHold: false, holdKeyboard: false, focus: false, autoBlur: false, disableDefaultPadding: false, cursor: -1, cursorSpacing: 30, selectionStart: -1, selectionEnd: -1, adjustPosition: true, inputAlign: "left", fontSize: "15px", color: "#303133", prefixIcon: "", prefixIconStyle: "", suffixIcon: "", suffixIconStyle: "", border: "surround", readonly: false, shape: "square", formatter: null } }; const Keyboard = { // 键盘组件 keyboard: { mode: "number", dotDisabled: false, tooltip: true, showTips: true, tips: "", showCancel: true, showConfirm: true, random: false, safeAreaInsetBottom: true, closeOnClickOverlay: true, show: false, overlay: true, zIndex: 10075, cancelText: "取消", confirmText: "确定", autoChange: false } }; const Line = { // line组件 line: { color: "#d6d7d9", length: "100%", direction: "row", hairline: true, margin: 0, dashed: false } }; const LineProgress = { // lineProgress 组件 lineProgress: { activeColor: "#19be6b", inactiveColor: "#ececec", percentage: 0, showText: true, height: 12 } }; const { color: color$4 } = config$1; const Link = { // link超链接组件props参数 link: { color: color$4["u-primary"], fontSize: 15, underLine: false, href: "", mpTips: "链接已复制,请在浏览器打开", lineColor: "", text: "" } }; const List = { // list 组件 list: { showScrollbar: false, lowerThreshold: 50, upperThreshold: 0, scrollTop: 0, offsetAccuracy: 10, enableFlex: false, pagingEnabled: false, scrollable: true, scrollIntoView: "", scrollWithAnimation: false, enableBackToTop: false, height: 0, width: 0, preLoadScreen: 1 } }; const ListItem = { // listItem 组件 listItem: { anchor: "" } }; const { color: color$3 } = config$1; const LoadingIcon = { // loading-icon加载中图标组件 loadingIcon: { show: true, color: color$3["u-tips-color"], textColor: color$3["u-tips-color"], vertical: false, mode: "spinner", size: 24, textSize: 15, text: "", timingFunction: "ease-in-out", duration: 1200, inactiveColor: "" } }; const LoadingPage = { // loading-page组件 loadingPage: { loadingText: "正在加载", image: "", loadingMode: "circle", loading: false, bgColor: "#ffffff", color: "#C8C8C8", fontSize: 19, iconSize: 28, loadingColor: "#C8C8C8" } }; const Loadmore = { // loadmore 组件 loadmore: { status: "loadmore", bgColor: "transparent", icon: true, fontSize: 14, iconSize: 17, color: "#606266", loadingIcon: "spinner", loadmoreText: "加载更多", loadingText: "正在加载...", nomoreText: "没有更多了", isDot: false, iconColor: "#b7b7b7", marginTop: 10, marginBottom: 10, height: "auto", line: false, lineColor: "#E6E8EB", dashed: false } }; const Modal = { // modal 组件 modal: { show: false, title: "", content: "", confirmText: "确认", cancelText: "取消", showConfirmButton: true, showCancelButton: false, confirmColor: "#2979ff", cancelColor: "#606266", buttonReverse: false, zoom: true, asyncClose: false, closeOnClickOverlay: false, negativeTop: 0, width: "650rpx", confirmButtonShape: "" } }; const color$2 = { primary: "#3c9cff", info: "#909399", default: "#909399", warning: "#f9ae3d", error: "#f56c6c", success: "#5ac725", mainColor: "#303133", contentColor: "#606266", tipsColor: "#909399", lightColor: "#c0c4cc", borderColor: "#e4e7ed" }; const Navbar = { // navbar 组件 navbar: { safeAreaInsetTop: true, placeholder: false, fixed: true, border: false, leftIcon: "arrow-left", leftText: "", rightText: "", rightIcon: "", title: "", bgColor: "#ffffff", titleWidth: "400rpx", height: "44px", leftIconSize: 20, leftIconColor: color$2.mainColor, autoBack: false, titleStyle: "" } }; const NoNetwork = { // noNetwork noNetwork: { tips: "哎呀,网络信号丢失", zIndex: "", image: "data:image/png;base64,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" } }; const NoticeBar = { // noticeBar noticeBar: { text: () => [], direction: "row", step: false, icon: "volume", mode: "", color: "#f9ae3d", bgColor: "#fdf6ec", speed: 80, fontSize: 14, duration: 2e3, disableTouch: true, url: "", linkType: "navigateTo" } }; const Notify = { // notify组件 notify: { top: 0, type: "primary", color: "#ffffff", bgColor: "", message: "", duration: 3e3, fontSize: 15, safeAreaInsetTop: false } }; const NumberBox = { // 步进器组件 numberBox: { name: "", value: 0, min: 1, max: Number.MAX_SAFE_INTEGER, step: 1, integer: false, disabled: false, disabledInput: false, asyncChange: false, inputWidth: 35, showMinus: true, showPlus: true, decimalLength: null, longPress: true, color: "#323233", buttonSize: 30, bgColor: "#EBECEE", cursorSpacing: 100, disableMinus: false, disablePlus: false, iconStyle: "" } }; const NumberKeyboard = { // 数字键盘 numberKeyboard: { mode: "number", dotDisabled: false, random: false } }; const Overlay = { // overlay组件 overlay: { show: false, zIndex: 10070, duration: 300, opacity: 0.5 } }; const Parse = { // parse parse: { copyLink: true, errorImg: "", lazyLoad: false, loadingImg: "", pauseVideo: true, previewImg: true, setTitle: true, showImgMenu: true } }; const Picker = { // picker picker: { show: false, showToolbar: true, title: "", columns: () => [], loading: false, itemHeight: 44, cancelText: "取消", confirmText: "确定", cancelColor: "#909193", confirmColor: "#3c9cff", visibleItemCount: 5, keyName: "text", closeOnClickOverlay: false, defaultIndex: () => [], immediateChange: false } }; const Popup = { // popup组件 popup: { show: false, overlay: true, mode: "bottom", duration: 300, closeable: false, overlayStyle: () => { }, closeOnClickOverlay: true, zIndex: 10075, safeAreaInsetBottom: true, safeAreaInsetTop: false, closeIconPos: "top-right", round: 0, zoom: true, bgColor: "", overlayOpacity: 0.5 } }; const Radio = { // radio组件 radio: { name: "", shape: "", disabled: "", labelDisabled: "", activeColor: "", inactiveColor: "", iconSize: "", labelSize: "", label: "", labelColor: "", size: "", iconColor: "", placement: "" } }; const RadioGroup = { // radio-group组件 radioGroup: { value: "", disabled: false, shape: "circle", activeColor: "#2979ff", inactiveColor: "#c8c9cc", name: "", size: 18, placement: "row", label: "", labelColor: "#303133", labelSize: 14, labelDisabled: false, iconColor: "#ffffff", iconSize: 12, borderBottom: false, iconPlacement: "left" } }; const Rate = { // rate组件 rate: { value: 1, count: 5, disabled: false, size: 18, inactiveColor: "#b2b2b2", activeColor: "#FA3534", gutter: 4, minCount: 1, allowHalf: false, activeIcon: "star-fill", inactiveIcon: "star", touchable: true } }; const ReadMore = { // readMore readMore: { showHeight: 400, toggle: false, closeText: "展开阅读全文", openText: "收起", color: "#2979ff", fontSize: 14, textIndent: "2em", name: "" } }; const Row = { // row row: { gutter: 0, justify: "start", align: "center" } }; const RowNotice = { // rowNotice rowNotice: { text: "", icon: "volume", mode: "", color: "#f9ae3d", bgColor: "#fdf6ec", fontSize: 14, speed: 80 } }; const ScrollList = { // scrollList scrollList: { indicatorWidth: 50, indicatorBarWidth: 20, indicator: true, indicatorColor: "#f2f2f2", indicatorActiveColor: "#3c9cff", indicatorStyle: "" } }; const Search = { // search search: { shape: "round", bgColor: "#f2f2f2", placeholder: "请输入关键字", clearabled: true, focus: false, showAction: true, actionStyle: () => ({}), actionText: "搜索", inputAlign: "left", inputStyle: () => ({}), disabled: false, borderColor: "transparent", searchIconColor: "#909399", searchIconSize: 22, color: "#606266", placeholderColor: "#909399", searchIcon: "search", margin: "0", animation: false, value: "", maxlength: "-1", height: 32, label: null } }; const Section = { // u-section组件 section: { title: "", subTitle: "更多", right: true, fontSize: 15, bold: true, color: "#303133", subColor: "#909399", showLine: true, lineColor: "", arrow: true } }; const Skeleton = { // skeleton skeleton: { loading: true, animate: true, rows: 0, rowsWidth: "100%", rowsHeight: 18, title: true, titleWidth: "50%", titleHeight: 18, avatar: false, avatarSize: 32, avatarShape: "circle" } }; const Slider = { // slider组件 slider: { value: 0, blockSize: 18, min: 0, max: 100, step: 1, activeColor: "#2979ff", inactiveColor: "#c0c4cc", blockColor: "#ffffff", showValue: false, disabled: false, blockStyle: () => { } } }; const StatusBar = { // statusBar statusBar: { bgColor: "transparent" } }; const Steps = { // steps组件 steps: { direction: "row", current: 0, activeColor: "#3c9cff", inactiveColor: "#969799", activeIcon: "", inactiveIcon: "", dot: false } }; const StepsItem = { // steps-item组件 stepsItem: { title: "", desc: "", iconSize: 17, error: false } }; const Sticky = { // sticky组件 sticky: { offsetTop: 0, customNavHeight: 0, disabled: false, bgColor: "transparent", zIndex: "", index: "" } }; const Subsection = { // subsection组件 subsection: { list: [], current: 0, activeColor: "#3c9cff", inactiveColor: "#303133", mode: "button", fontSize: 12, bold: true, bgColor: "#eeeeef", keyName: "name" } }; const SwipeAction = { // swipe-action组件 swipeAction: { autoClose: true } }; const SwipeActionItem = { // swipeActionItem 组件 swipeActionItem: { show: false, name: "", disabled: false, threshold: 20, autoClose: true, options: [], duration: 300 } }; const Swiper = { // swiper 组件 swiper: { list: () => [], indicator: false, indicatorActiveColor: "#FFFFFF", indicatorInactiveColor: "rgba(255, 255, 255, 0.35)", indicatorStyle: "", indicatorMode: "line", autoplay: true, current: 0, currentItemId: "", interval: 3e3, duration: 300, circular: false, previousMargin: 0, nextMargin: 0, acceleration: false, displayMultipleItems: 1, easingFunction: "default", keyName: "url", imgMode: "aspectFill", height: 130, bgColor: "#f3f4f6", radius: 4, loading: false, showTitle: false } }; const SwipterIndicator = { // swiperIndicator 组件 swiperIndicator: { length: 0, current: 0, indicatorActiveColor: "", indicatorInactiveColor: "", indicatorMode: "line" } }; const Switch = { // switch switch: { loading: false, disabled: false, size: 25, activeColor: "#2979ff", inactiveColor: "#ffffff", value: false, activeValue: true, inactiveValue: false, asyncChange: false, space: 0 } }; const Tabbar = { // tabbar tabbar: { value: null, safeAreaInsetBottom: true, border: true, zIndex: 1, activeColor: "#1989fa", inactiveColor: "#7d7e80", fixed: true, placeholder: true } }; const TabbarItem = { // tabbarItem: { name: null, icon: "", badge: null, dot: false, text: "", badgeStyle: "top: 6px;right:2px;" } }; const Tabs = { // tabs: { duration: 300, list: () => [], lineColor: "#3c9cff", activeStyle: () => ({ color: "#303133" }), inactiveStyle: () => ({ color: "#606266" }), lineWidth: 20, lineHeight: 3, lineBgSize: "cover", itemStyle: () => ({ height: "44px" }), scrollable: true, current: 0, keyName: "name" } }; const Tag = { // tag 组件 tag: { type: "primary", disabled: false, size: "medium", shape: "square", text: "", bgColor: "", color: "", borderColor: "", closeColor: "#C6C7CB", name: "", plainFill: false, plain: false, closable: false, show: true, icon: "" } }; const Text = { // text 组件 text: { type: "", show: true, text: "", prefixIcon: "", suffixIcon: "", mode: "", href: "", format: "", call: false, openType: "", bold: false, block: false, lines: "", color: "#303133", size: 15, iconStyle: () => ({ fontSize: "15px" }), decoration: "none", margin: 0, lineHeight: "", align: "left", wordWrap: "normal" } }; const Textarea = { // textarea 组件 textarea: { value: "", placeholder: "", placeholderClass: "textarea-placeholder", placeholderStyle: "color: #c0c4cc", height: 70, confirmType: "done", disabled: false, count: false, focus: false, autoHeight: false, fixed: false, cursorSpacing: 0, cursor: "", showConfirmBar: true, selectionStart: -1, selectionEnd: -1, adjustPosition: true, disableDefaultPadding: false, holdKeyboard: false, maxlength: 140, border: "surround", formatter: null } }; const Toast = { // toast组件 toast: { zIndex: 10090, loading: false, text: "", icon: "", type: "", loadingMode: "", show: "", overlay: false, position: "center", params: () => { }, duration: 2e3, isTab: false, url: "", callback: null, back: false } }; const Toolbar = { // toolbar 组件 toolbar: { show: true, cancelText: "取消", confirmText: "确认", cancelColor: "#909193", confirmColor: "#3c9cff", title: "" } }; const Tooltip = { // tooltip 组件 tooltip: { text: "", copyText: "", size: 14, color: "#606266", bgColor: "transparent", direction: "top", zIndex: 10071, showCopy: true, buttons: () => [], overlay: true, showToast: true } }; const Transition = { // transition动画组件的props transition: { show: false, mode: "fade", duration: "300", timingFunction: "ease-out" } }; const Upload = { // upload组件 upload: { accept: "image", capture: () => ["album", "camera"], compressed: true, camera: "back", maxDuration: 60, uploadIcon: "camera-fill", uploadIconColor: "#D3D4D6", useBeforeRead: false, previewFullImage: true, maxCount: 52, disabled: false, imageMode: "aspectFill", name: "", sizeType: () => ["original", "compressed"], multiple: false, deletable: true, maxSize: Number.MAX_VALUE, fileList: () => [], uploadText: "", width: 80, height: 80, previewImage: true } }; const props$i = { ...ActionSheet, ...Album, ...Alert, ...Avatar, ...AvatarGroup, ...Backtop, ...Badge, ...Button, ...Calendar$1, ...CarKeyboard, ...Cell, ...CellGroup, ...Checkbox, ...CheckboxGroup, ...CircleProgress, ...Code, ...CodeInput, ...Col, ...Collapse, ...CollapseItem, ...ColumnNotice, ...CountDown, ...CountTo, ...DatetimePicker, ...Divider, ...Empty, ...Form, ...GormItem, ...Gap, ...Grid, ...GridItem, ...Icon, ...Image, ...IndexAnchor, ...IndexList, ...Input, ...Keyboard, ...Line, ...LineProgress, ...Link, ...List, ...ListItem, ...LoadingIcon, ...LoadingPage, ...Loadmore, ...Modal, ...Navbar, ...NoNetwork, ...NoticeBar, ...Notify, ...NumberBox, ...NumberKeyboard, ...Overlay, ...Parse, ...Picker, ...Popup, ...Radio, ...RadioGroup, ...Rate, ...ReadMore, ...Row, ...RowNotice, ...ScrollList, ...Search, ...Section, ...Skeleton, ...Slider, ...StatusBar, ...Steps, ...StepsItem, ...Sticky, ...Subsection, ...SwipeAction, ...SwipeActionItem, ...Swiper, ...SwipterIndicator, ...Switch, ...Tabbar, ...TabbarItem, ...Tabs, ...Tag, ...Text, ...Textarea, ...Toast, ...Toolbar, ...Tooltip, ...Transition, ...Upload }; const props$h = { props: { // 图标类名 name: { type: String, default: props$i.icon.name }, // 图标颜色,可接受主题色 color: { type: String, default: props$i.icon.color }, // 字体大小,单位px size: { type: [String, Number], default: props$i.icon.size }, // 是否显示粗体 bold: { type: Boolean, default: props$i.icon.bold }, // 点击图标的时候传递事件出去的index(用于区分点击了哪一个) index: { type: [String, Number], default: props$i.icon.index }, // 触摸图标时的类名 hoverClass: { type: String, default: props$i.icon.hoverClass }, // 自定义扩展前缀,方便用户扩展自己的图标库 customPrefix: { type: String, default: props$i.icon.customPrefix }, // 图标右边或者下面的文字 label: { type: [String, Number], default: props$i.icon.label }, // label的位置,只能右边或者下边 labelPos: { type: String, default: props$i.icon.labelPos }, // label的大小 labelSize: { type: [String, Number], default: props$i.icon.labelSize }, // label的颜色 labelColor: { type: String, default: props$i.icon.labelColor }, // label与图标的距离 space: { type: [String, Number], default: props$i.icon.space }, // 图片的mode imgMode: { type: String, default: props$i.icon.imgMode }, // 用于显示图片小图标时,图片的宽度 width: { type: [String, Number], default: props$i.icon.width }, // 用于显示图片小图标时,图片的高度 height: { type: [String, Number], default: props$i.icon.height }, // 用于解决某些情况下,让图标垂直居中的用途 top: { type: [String, Number], default: props$i.icon.top }, // 是否阻止事件传播 stop: { type: Boolean, default: props$i.icon.stop } } }; const mpMixin = {}; const mixin = { // 定义每个组件都可能需要用到的外部样式以及类名 props: { // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式 customStyle: { type: [Object, String], default: () => ({}) }, customClass: { type: String, default: "" }, // 跳转的页面路径 url: { type: String, default: "" }, // 页面跳转的类型 linkType: { type: String, default: "navigateTo" } }, data() { return {}; }, onLoad() { this.$u.getRect = this.$uGetRect; }, created() { this.$u.getRect = this.$uGetRect; }, computed: { // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式 // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大) $u() { return uni.$u.deepMerge(uni.$u, { props: void 0, http: void 0, mixin: void 0 }); }, /** * 生成bem规则类名 * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用 * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式 * @param {String} name 组件名称 * @param {Array} fixed 一直会存在的类名 * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名 * @returns {Array|string} */ bem() { return function(name, fixed, change) { const prefix = `u-${name}--`; const classes = {}; if (fixed) { fixed.map((item) => { classes[prefix + this[item]] = true; }); } if (change) { change.map((item) => { this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item]; }); } return Object.keys(classes); }; } }, methods: { // 跳转某一个页面 openPage(urlKey = "url") { const url2 = this[urlKey]; if (url2) { this.$u.route({ type: this.linkType, url: url2 }); } }, // 查询节点信息 // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21) // 解决办法为在组件根部再套一个没有任何作用的view元素 $uGetRect(selector, all) { return new Promise((resolve) => { uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => { if (all && Array.isArray(rect) && rect.length) { resolve(rect); } if (!all && rect) { resolve(rect); } }).exec(); }); }, getParentData(parentName = "") { if (!this.parent) this.parent = {}; this.parent = uni.$u.$parent.call(this, parentName); if (this.parent.children) { this.parent.children.indexOf(this) === -1 && this.parent.children.push(this); } if (this.parent && this.parentData) { Object.keys(this.parentData).map((key) => { this.parentData[key] = this.parent[key]; }); } }, // 阻止事件冒泡 preventEvent(e2) { e2 && typeof e2.stopPropagation === "function" && e2.stopPropagation(); }, // 空操作 noop(e2) { this.preventEvent(e2); } }, onReachBottom() { uni.$emit("uOnReachBottom"); }, beforeDestroy() { if (this.parent && uni.$u.test.array(this.parent.children)) { const childrenList = this.parent.children; childrenList.map((child, index2) => { if (child === this) { childrenList.splice(index2, 1); } }); } } }; const _export_sfc = (sfc, props2) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props2) { target[key] = val; } return target; }; const _sfc_main$1k = { name: "u-icon", data() { return {}; }, emits: ["click"], mixins: [mpMixin, mixin, props$h], computed: { uClasses() { let classes = []; classes.push(this.customPrefix + "-" + this.name); if (this.color && uni.$u.config.type.includes(this.color)) classes.push("u-icon__icon--" + this.color); return classes; }, iconStyle() { let style = {}; style = { fontSize: uni.$u.addUnit(this.size), lineHeight: uni.$u.addUnit(this.size), fontWeight: this.bold ? "bold" : "normal", // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中 top: uni.$u.addUnit(this.top) }; if (this.color && !uni.$u.config.type.includes(this.color)) style.color = this.color; return style; }, // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式 isImg() { return this.name.indexOf("/") !== -1; }, imgStyle() { let style = {}; style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size); style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size); return style; }, // 通过图标名,查找对应的图标 icon() { return icons["uicon-" + this.name] || this.name; } }, methods: { clickHandler(e2) { this.$emit("click", this.index); this.stop && this.preventEvent(e2); } } }; function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "u-icon__img", src: _ctx.name, mode: _ctx.imgMode, style: vue.normalizeStyle([$options.imgStyle, _ctx.$u.addStyle(_ctx.customStyle)]) }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: vue.normalizeClass(["u-icon__icon", $options.uClasses]), style: vue.normalizeStyle([$options.iconStyle, _ctx.$u.addStyle(_ctx.customStyle)]), "hover-class": _ctx.hoverClass }, vue.toDisplayString($options.icon), 15, ["hover-class"])), vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '), _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "u-icon__label", style: vue.normalizeStyle({ color: _ctx.labelColor, fontSize: _ctx.$u.addUnit(_ctx.labelSize), marginLeft: _ctx.labelPos == "right" ? _ctx.$u.addUnit(_ctx.space) : 0, marginTop: _ctx.labelPos == "bottom" ? _ctx.$u.addUnit(_ctx.space) : 0, marginRight: _ctx.labelPos == "left" ? _ctx.$u.addUnit(_ctx.space) : 0, marginBottom: _ctx.labelPos == "top" ? _ctx.$u.addUnit(_ctx.space) : 0 }) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); } const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$z], ["__scopeId", "data-v-1c933a9a"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-icon/u-icon.vue"]]); const props$g = { props: { // 是否展示组件 show: { type: Boolean, default: props$i.transition.show }, // 使用的动画模式 mode: { type: String, default: props$i.transition.mode }, // 动画的执行时间,单位ms duration: { type: [String, Number], default: props$i.transition.duration }, // 使用的动画过渡函数 timingFunction: { type: String, default: props$i.transition.timingFunction } } }; const getClassNames = (name) => ({ enter: `u-${name}-enter u-${name}-enter-active`, "enter-to": `u-${name}-enter-to u-${name}-enter-active`, leave: `u-${name}-leave u-${name}-leave-active`, "leave-to": `u-${name}-leave-to u-${name}-leave-active` }); const transition = { methods: { // 组件被点击发出事件 clickHandler() { this.$emit("click"); }, // vue版本的组件进场处理 async vueEnter() { const classNames = getClassNames(this.mode); this.status = "enter"; this.$emit("beforeEnter"); this.inited = true; this.display = true; this.classes = classNames.enter; await vue.nextTick(); { this.$emit("enter"); this.transitionEnded = false; this.$emit("afterEnter"); this.classes = classNames["enter-to"]; } }, // 动画离场处理 async vueLeave() { if (!this.display) return; const classNames = getClassNames(this.mode); this.status = "leave"; this.$emit("beforeLeave"); this.classes = classNames.leave; await vue.nextTick(); { this.transitionEnded = false; this.$emit("leave"); setTimeout(this.onTransitionEnd, this.duration); this.classes = classNames["leave-to"]; } }, // 完成过渡后触发 onTransitionEnd() { if (this.transitionEnded) return; this.transitionEnded = true; this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter"); if (!this.show && this.display) { this.display = false; this.inited = false; } } } }; const _sfc_main$1j = { name: "u-transition", data() { return { inited: false, // 是否显示/隐藏组件 viewStyle: {}, // 组件内部的样式 status: "", // 记录组件动画的状态 transitionEnded: false, // 组件是否结束的标记 display: false, // 组件是否展示 classes: "" // 应用的类名 }; }, emits: ["click", "beforeEnter", "enter", "afterEnter", "beforeLeave", "leave", "afterLeave"], computed: { mergeStyle() { const { viewStyle, customStyle } = this; return { transitionDuration: `${this.duration}ms`, // display: `${this.display ? '' : 'none'}`, transitionTimingFunction: this.timingFunction, // 避免自定义样式影响到动画属性,所以写在viewStyle前面 ...uni.$u.addStyle(customStyle), ...viewStyle }; } }, // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象 mixins: [mpMixin, mixin, transition, props$g], watch: { show: { handler(newVal) { newVal ? this.vueEnter() : this.vueLeave(); }, // 表示同时监听初始化时的props的show的意思 immediate: true } } }; function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) { return $data.inited ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-transition", $data.classes]), ref: "u-transition", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)), style: vue.normalizeStyle([$options.mergeStyle]), onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 38 /* CLASS, STYLE, HYDRATE_EVENTS */ )) : vue.createCommentVNode("v-if", true); } const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$y], ["__scopeId", "data-v-0573594d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-transition/u-transition.vue"]]); const props$f = { props: { // 图片地址 src: { type: String, default: props$i.image.src }, // 裁剪模式 mode: { type: String, default: props$i.image.mode }, // 宽度,单位任意 width: { type: [String, Number], default: props$i.image.width }, // 高度,单位任意 height: { type: [String, Number], default: props$i.image.height }, // 图片形状,circle-圆形,square-方形 shape: { type: String, default: props$i.image.shape }, // 圆角,单位任意 radius: { type: [String, Number], default: props$i.image.radius }, // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序 lazyLoad: { type: Boolean, default: props$i.image.lazyLoad }, // 开启长按图片显示识别微信小程序码菜单 showMenuByLongpress: { type: Boolean, default: props$i.image.showMenuByLongpress }, // 加载中的图标,或者小图片 loadingIcon: { type: String, default: props$i.image.loadingIcon }, // 加载失败的图标,或者小图片 errorIcon: { type: String, default: props$i.image.errorIcon }, // 是否显示加载中的图标或者自定义的slot showLoading: { type: Boolean, default: props$i.image.showLoading }, // 是否显示加载错误的图标或者自定义的slot showError: { type: Boolean, default: props$i.image.showError }, // 是否需要淡入效果 fade: { type: Boolean, default: props$i.image.fade }, // 只支持网络资源,只对微信小程序有效 webp: { type: Boolean, default: props$i.image.webp }, // 过渡时间,单位ms duration: { type: [String, Number], default: props$i.image.duration }, // 背景颜色,用于深色页面加载图片时,为了和背景色融合 bgColor: { type: String, default: props$i.image.bgColor } } }; const _sfc_main$1i = { name: "u-image", mixins: [mpMixin, mixin, props$f], data() { return { // 图片是否加载错误,如果是,则显示错误占位图 isError: false, // 初始化组件时,默认为加载中状态 loading: true, // 不透明度,为了实现淡入淡出的效果 opacity: 1, // 过渡时间,因为props的值无法修改,故需要一个中间值 durationTime: this.duration, // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景 backgroundStyle: {}, // 用于fade模式的控制组件显示与否 show: false }; }, watch: { src: { immediate: true, handler(n2) { if (!n2) { this.isError = true; } else { this.isError = false; this.loading = true; } } } }, computed: { wrapStyle() { let style = {}; style.width = this.$u.addUnit(this.width); style.height = this.$u.addUnit(this.height); style.borderRadius = this.shape == "circle" ? "10000px" : uni.$u.addUnit(this.radius); style.overflow = this.radius > 0 ? "hidden" : "visible"; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } }, mounted() { this.show = true; }, emits: ["click", "error", "load"], methods: { // 点击图片 onClick() { this.$emit("click"); }, // 图片加载失败 onErrorHandler(err) { this.loading = false; this.isError = true; this.$emit("error", err); }, // 图片加载完成,标记loading结束 onLoadHandler(event) { this.loading = false; this.isError = false; this.$emit("load", event); this.removeBgColor(); }, // 移除图片的背景色 removeBgColor() { this.backgroundStyle = { backgroundColor: "transparent" }; } } }; function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_4$1); return vue.openBlock(), vue.createBlock(_component_u_transition, { mode: "fade", show: $data.show, duration: _ctx.fade ? 1e3 : 0 }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "u-image", onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)), style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle]) }, [ !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _ctx.src, mode: _ctx.mode, onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)), onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)), "show-menu-by-longpress": _ctx.showMenuByLongpress, "lazy-load": _ctx.lazyLoad, class: "u-image__image", style: vue.normalizeStyle({ borderRadius: _ctx.shape == "circle" ? "10000px" : _ctx.$u.addUnit(_ctx.radius), width: _ctx.$u.addUnit(_ctx.width), height: _ctx.$u.addUnit(_ctx.height) }) }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true), _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-image__loading", style: vue.normalizeStyle({ borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius), backgroundColor: this.bgColor, width: _ctx.$u.addUnit(_ctx.width), height: _ctx.$u.addUnit(_ctx.height) }) }, [ vue.renderSlot(_ctx.$slots, "loading", {}, () => [ vue.createVNode(_component_u_icon, { name: _ctx.loadingIcon, width: _ctx.width, height: _ctx.height }, null, 8, ["name", "width", "height"]) ], true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "u-image__error", style: vue.normalizeStyle({ borderRadius: _ctx.shape == "circle" ? "50%" : _ctx.$u.addUnit(_ctx.radius), width: _ctx.$u.addUnit(_ctx.width), height: _ctx.$u.addUnit(_ctx.height) }) }, [ vue.renderSlot(_ctx.$slots, "error", {}, () => [ vue.createVNode(_component_u_icon, { name: _ctx.errorIcon, width: _ctx.width, height: _ctx.height }, null, 8, ["name", "width", "height"]) ], true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["show", "duration"]); } const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$x], ["__scopeId", "data-v-9d58ba7c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-image/u-image.vue"]]); let BASE_URL; { BASE_URL = "http://ceshi-suyuan.lihaink.cn/"; } let config = { HTTP_REQUEST_URL: BASE_URL, HEADER: { "content-type": "application/json", "Form-type": "app", "TOKEN": uni.getStorageSync("SY_TOKEN") || "" } }; function baseRequest(url2, method, data, { noAuth = false, noVerify = false, onReLogin = false }) { let Url = config.HTTP_REQUEST_URL, header = config.HEADER; return new Promise((reslove, reject) => { uni.request({ url: Url + "api" + url2, method: method || "GET", header: { ...header }, data: method != "GET" ? data || {} : {}, params: method == "GET" ? data : {}, success: (res) => { if (noVerify) reslove(res.data); else if (res.data.code == -1) { if (onReLogin) { return reject(); } } else if (res.data.code == 0) { if (res.data.msg != "无登录信息") { uni.showToast({ title: res.data.msg || "请检查网络", icon: "none" }); } reject(res.data); } else if (res.data.code == 1) { reslove(res.data); } else if (res.data.code == 200) { reslove(res.data.data); } else if ([41e4, 410001, 410002, 4e4].indexOf(res.data.code) !== -1) { reject(res.data); } else if (res.data.code == 501) { reject(res.data); } else { uni.showToast({ title: res.data.msg || "请检查网络", icon: "none" }); reject(res.data.msg || "请检查网络"); } }, fail: (message) => { uni.showToast({ title: "网络错误", icon: "none" }); reject("请求失败"); } }); }); } const syhttp = {}; ["options", "get", "post", "put", "head", "delete", "trace", "connect"].forEach((method) => { syhttp[method] = (api, data, opt) => baseRequest(api, method, data, opt || {}); }); const userInfoAPI = (data) => syhttp.get("/user/userInfo", data); const landInfoAPI = (data) => syhttp.get("/LandPlant/landInfo", data); const AddlandInfoAPI = (data) => syhttp.post("/LandPlant/addLandCrop", data); const addLandCropPicAPI = (data) => syhttp.post("/LandPlant/addLandCropPic", data); const landEnvDataCurrAPI = (data) => syhttp.get("/LandPlant/landEnvDataCurr", data); const setLandCropRipeAPI = (data) => syhttp.get("/LandPlant/setLandCropRipe", data); const landCropPicListAPI = (data) => syhttp.get("/LandPlant/landCropPicList", data); const actionsListAPI = (data) => syhttp.get("/user/actions", data); const actionsDetailAPI = (data) => syhttp.get("/user/actionsDetail", data); const landEnvDataChartAPI = (data) => syhttp.get("/LandPlant/landEnvDataChart", data); const _sfc_main$1h = { name: "uniTh", options: { virtualHost: true }, components: {}, emits: ["sort-change", "filter-change"], props: { width: { type: [String, Number], default: "" }, align: { type: String, default: "left" }, rowspan: { type: [Number, String], default: 1 }, colspan: { type: [Number, String], default: 1 }, sortable: { type: Boolean, default: false }, filterType: { type: String, default: "" }, filterData: { type: Array, default() { return []; } }, filterDefaultValue: { type: [Array, String], default() { return ""; } } }, data() { return { border: false, ascending: false, descending: false }; }, computed: { // 根据props中的width属性 自动匹配当前th的宽度(px) customWidth() { if (typeof this.width === "number") { return this.width; } else if (typeof this.width === "string") { let regexHaveUnitPx = new RegExp(/^[1-9][0-9]*px$/g); let regexHaveUnitRpx = new RegExp(/^[1-9][0-9]*rpx$/g); let regexHaveNotUnit = new RegExp(/^[1-9][0-9]*$/g); if (this.width.match(regexHaveUnitPx) !== null) { return this.width.replace("px", ""); } else if (this.width.match(regexHaveUnitRpx) !== null) { let numberRpx = Number(this.width.replace("rpx", "")); let widthCoe = uni.getSystemInfoSync().screenWidth / 750; return Math.round(numberRpx * widthCoe); } else if (this.width.match(regexHaveNotUnit) !== null) { return this.width; } else { return ""; } } else { return ""; } }, contentAlign() { let align = "left"; switch (this.align) { case "left": align = "flex-start"; break; case "center": align = "center"; break; case "right": align = "flex-end"; break; } return align; } }, created() { this.root = this.getTable("uniTable"); this.rootTr = this.getTable("uniTr"); this.rootTr.minWidthUpdate(this.customWidth ? this.customWidth : 140); this.border = this.root.border; this.root.thChildren.push(this); }, methods: { sort() { if (!this.sortable) return; this.clearOther(); if (!this.ascending && !this.descending) { this.ascending = true; this.$emit("sort-change", { order: "ascending" }); return; } if (this.ascending && !this.descending) { this.ascending = false; this.descending = true; this.$emit("sort-change", { order: "descending" }); return; } if (!this.ascending && this.descending) { this.ascending = false; this.descending = false; this.$emit("sort-change", { order: null }); } }, ascendingFn() { this.clearOther(); this.ascending = !this.ascending; this.descending = false; this.$emit("sort-change", { order: this.ascending ? "ascending" : null }); }, descendingFn() { this.clearOther(); this.descending = !this.descending; this.ascending = false; this.$emit("sort-change", { order: this.descending ? "descending" : null }); }, clearOther() { this.root.thChildren.map((item) => { if (item !== this) { item.ascending = false; item.descending = false; } return item; }); }, ondropdown(e2) { this.$emit("filter-change", e2); }, /** * 获取父元素实例 */ getTable(name) { let parent = this.$parent; let parentName = parent.$options.name; while (parentName !== name) { parent = parent.$parent; if (!parent) return false; parentName = parent.$options.name; } return parent; } } }; function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uni-table-th", { "table--border": $data.border }]), style: vue.normalizeStyle({ width: $options.customWidth + "px", "text-align": $props.align }) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$w], ["__scopeId", "data-v-bf970acd"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-th/uni-th.vue"]]); const _sfc_main$1g = { name: "TableCheckbox", emits: ["checkboxSelected"], props: { indeterminate: { type: Boolean, default: false }, checked: { type: [Boolean, String], default: false }, disabled: { type: Boolean, default: false }, index: { type: Number, default: -1 }, cellData: { type: Object, default() { return {}; } } }, watch: { checked(newVal) { if (typeof this.checked === "boolean") { this.isChecked = newVal; } else { this.isChecked = true; } }, indeterminate(newVal) { this.isIndeterminate = newVal; } }, data() { return { isChecked: false, isDisabled: false, isIndeterminate: false }; }, created() { if (typeof this.checked === "boolean") { this.isChecked = this.checked; } this.isDisabled = this.disabled; }, methods: { selected() { if (this.isDisabled) return; this.isIndeterminate = false; this.isChecked = !this.isChecked; this.$emit("checkboxSelected", { checked: this.isChecked, data: this.cellData }); } } }; function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "uni-table-checkbox", onClick: _cache[0] || (_cache[0] = (...args) => $options.selected && $options.selected(...args)) }, [ !$props.indeterminate ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["checkbox__inner", { "is-checked": $data.isChecked, "is-disable": $data.isDisabled }]) }, [ vue.createElementVNode("view", { class: "checkbox__inner-icon" }) ], 2 /* CLASS */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "checkbox__inner checkbox--indeterminate" }, [ vue.createElementVNode("view", { class: "checkbox__inner-icon" }) ])) ]); } const tableCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$v], ["__scopeId", "data-v-25e435b1"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-tr/table-checkbox.vue"]]); const _sfc_main$1f = { name: "uniTr", components: { tableCheckbox }, props: { disabled: { type: Boolean, default: false }, keyValue: { type: [String, Number], default: "" } }, options: { virtualHost: true }, data() { return { value: false, border: false, selection: false, widthThArr: [], ishead: true, checked: false, indeterminate: false }; }, created() { this.root = this.getTable(); this.head = this.getTable("uniThead"); if (this.head) { this.ishead = false; this.head.init(this); } this.border = this.root.border; this.selection = this.root.type; this.root.trChildren.push(this); const rowData = this.root.data.find((v2) => v2[this.root.rowKey] === this.keyValue); if (rowData) { this.rowData = rowData; } this.root.isNodata(); }, mounted() { if (this.widthThArr.length > 0) { const selectionWidth = this.selection === "selection" ? 50 : 0; this.root.minWidth = this.widthThArr.reduce((a2, b2) => Number(a2) + Number(b2)) + selectionWidth; } }, unmounted() { const index2 = this.root.trChildren.findIndex((i2) => i2 === this); this.root.trChildren.splice(index2, 1); this.root.isNodata(); }, methods: { minWidthUpdate(width) { this.widthThArr.push(width); }, // 选中 checkboxSelected(e2) { let rootData = this.root.data.find((v2) => v2[this.root.rowKey] === this.keyValue); this.checked = e2.checked; this.root.check(rootData || this, e2.checked, rootData ? this.keyValue : null); }, change(e2) { this.root.trChildren.forEach((item) => { if (item === this) { this.root.check(this, e2.detail.value.length > 0 ? true : false); } }); }, /** * 获取父元素实例 */ getTable(name = "uniTable") { let parent = this.$parent; let parentName = parent.$options.name; while (parentName !== name) { parent = parent.$parent; if (!parent) return false; parentName = parent.$options.name; } return parent; } } }; function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) { const _component_table_checkbox = vue.resolveComponent("table-checkbox"); return vue.openBlock(), vue.createElementBlock("view", { class: "uni-table-tr" }, [ $data.selection === "selection" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["checkbox", { "tr-table--border": $data.border }]) }, [ vue.createVNode(_component_table_checkbox, { checked: $data.checked, indeterminate: $data.indeterminate, disabled: $props.disabled, onCheckboxSelected: $options.checkboxSelected }, null, 8, ["checked", "indeterminate", "disabled", "onCheckboxSelected"]) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]); } const __easycom_1$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$u], ["__scopeId", "data-v-b48b3e32"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-tr/uni-tr.vue"]]); const _sfc_main$1e = { name: "uniTd", options: { virtualHost: true }, props: { width: { type: [String, Number], default: "" }, align: { type: String, default: "left" }, rowspan: { type: [Number, String], default: 1 }, colspan: { type: [Number, String], default: 1 } }, data() { return { border: false }; }, created() { this.root = this.getTable(); this.border = this.root.border; }, methods: { /** * 获取父元素实例 */ getTable() { let parent = this.$parent; let parentName = parent.$options.name; while (parentName !== "uniTable") { parent = parent.$parent; if (!parent) return false; parentName = parent.$options.name; } return parent; } } }; function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(` :class="{'table--border':border}" `), vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-table-td", { "table--border": $data.border }]), style: vue.normalizeStyle({ width: $props.width + "px", "text-align": $props.align }) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); } const __easycom_2$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$t], ["__scopeId", "data-v-edae4802"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-td/uni-td.vue"]]); const _sfc_main$1d = { name: "uniTable", options: { virtualHost: true }, emits: ["selection-change"], props: { data: { type: Array, default() { return []; } }, // 是否有竖线 border: { type: Boolean, default: false }, // 是否显示斑马线 stripe: { type: Boolean, default: false }, // 多选 type: { type: String, default: "" }, // 没有更多数据 emptyText: { type: String, default: "没有更多数据" }, loading: { type: Boolean, default: false }, rowKey: { type: String, default: "" } }, data() { return { noData: true, minWidth: 0, multiTableHeads: [] }; }, watch: { loading(val) { }, data(newVal) { this.theadChildren; if (this.theadChildren) { this.theadChildren.rowspan; } this.noData = false; } }, created() { this.trChildren = []; this.thChildren = []; this.theadChildren = null; this.backData = []; this.backIndexData = []; }, methods: { isNodata() { this.theadChildren; let rowspan = 1; if (this.theadChildren) { rowspan = this.theadChildren.rowspan; } this.noData = this.trChildren.length - rowspan <= 0; }, /** * 选中所有 */ selectionAll() { let startIndex = 1; let theadChildren = this.theadChildren; if (!this.theadChildren) { theadChildren = this.trChildren[0]; } else { startIndex = theadChildren.rowspan - 1; } let isHaveData = this.data && this.data.length > 0; theadChildren.checked = true; theadChildren.indeterminate = false; this.trChildren.forEach((item, index2) => { if (!item.disabled) { item.checked = true; if (isHaveData && item.keyValue) { const row = this.data.find((v2) => v2[this.rowKey] === item.keyValue); if (!this.backData.find((v2) => v2[this.rowKey] === row[this.rowKey])) { this.backData.push(row); } } if (index2 > startIndex - 1 && this.backIndexData.indexOf(index2 - startIndex) === -1) { this.backIndexData.push(index2 - startIndex); } } }); this.$emit("selection-change", { detail: { value: this.backData, index: this.backIndexData } }); }, /** * 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中) */ toggleRowSelection(row, selected) { row = [].concat(row); this.trChildren.forEach((item, index2) => { const select = row.findIndex((v2) => { if (typeof v2 === "number") { return v2 === index2 - 1; } else { return v2[this.rowKey] === item.keyValue; } }); let ischeck = item.checked; if (select !== -1) { if (typeof selected === "boolean") { item.checked = selected; } else { item.checked = !item.checked; } if (ischeck !== item.checked) { this.check(item.rowData || item, item.checked, item.rowData ? item.keyValue : null, true); } } }); this.$emit("selection-change", { detail: { value: this.backData, index: this.backIndexData } }); }, /** * 用于多选表格,清空用户的选择 */ clearSelection() { let theadChildren = this.theadChildren; if (!this.theadChildren) { theadChildren = this.trChildren[0]; } theadChildren.checked = false; theadChildren.indeterminate = false; this.trChildren.forEach((item) => { item.checked = false; }); this.backData = []; this.backIndexData = []; this.$emit("selection-change", { detail: { value: [], index: [] } }); }, /** * 用于多选表格,切换所有行的选中状态 */ toggleAllSelection() { let list = []; let startIndex = 1; let theadChildren = this.theadChildren; if (!this.theadChildren) { theadChildren = this.trChildren[0]; } else { startIndex = theadChildren.rowspan - 1; } this.trChildren.forEach((item, index2) => { if (!item.disabled) { if (index2 > startIndex - 1) { list.push(index2 - startIndex); } } }); this.toggleRowSelection(list); }, /** * 选中\取消选中 * @param {Object} child * @param {Object} check * @param {Object} rowValue */ check(child, check, keyValue, emit) { let theadChildren = this.theadChildren; if (!this.theadChildren) { theadChildren = this.trChildren[0]; } let childDomIndex = this.trChildren.findIndex((item, index2) => child === item); if (childDomIndex < 0) { childDomIndex = this.data.findIndex((v2) => v2[this.rowKey] === keyValue) + 1; } this.trChildren.filter((v2) => !v2.disabled && v2.keyValue).length; if (childDomIndex === 0) { check ? this.selectionAll() : this.clearSelection(); return; } if (check) { if (keyValue) { this.backData.push(child); } this.backIndexData.push(childDomIndex - 1); } else { const index2 = this.backData.findIndex((v2) => v2[this.rowKey] === keyValue); const idx = this.backIndexData.findIndex((item) => item === childDomIndex - 1); if (keyValue) { this.backData.splice(index2, 1); } this.backIndexData.splice(idx, 1); } const domCheckAll = this.trChildren.find((item, index2) => index2 > 0 && !item.checked && !item.disabled); if (!domCheckAll) { theadChildren.indeterminate = false; theadChildren.checked = true; } else { theadChildren.indeterminate = true; theadChildren.checked = false; } if (this.backIndexData.length === 0) { theadChildren.indeterminate = false; } if (!emit) { this.$emit("selection-change", { detail: { value: this.backData, index: this.backIndexData } }); } } } }; function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uni-table-scroll", { "table--border": $props.border, "border-none": !$data.noData }]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-table", { "table--stripe": $props.stripe }]), style: vue.normalizeStyle({ "min-width": $data.minWidth + "px" }) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), $data.noData ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "uni-table-loading" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["uni-table-text", { "empty-border": $props.border }]) }, vue.toDisplayString($props.emptyText), 3 /* TEXT, CLASS */ ) ])) : vue.createCommentVNode("v-if", true), $props.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["uni-table-mask", { "empty-border": $props.border }]) }, [ vue.createElementVNode("div", { class: "uni-table--loader" }) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ) ], 2 /* CLASS */ ); } const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$s], ["__scopeId", "data-v-c1ea9b5d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-table/uni-table.vue"]]); const _sfc_main$1c = { __name: "index", props: { dataList: Object, tit: String, route: String }, setup(__props) { const props2 = __props; const tit_b = vue.ref(props2.tit); const navgo = () => { uni.navigateTo({ url: props2.route }); }; const objFn = (obj) => { if (typeof obj == "object") { for (const [key, value] of Object.entries(obj)) { return `${key}: ${value}`; } } else { for (const [key, value] of Object.entries(JSON.parse(obj))) { return `${key}: ${value}`; } } }; return (_ctx, _cache) => { const _component_uni_th = resolveEasycom(vue.resolveDynamicComponent("uni-th"), __easycom_0$5); const _component_uni_tr = resolveEasycom(vue.resolveDynamicComponent("uni-tr"), __easycom_1$8); const _component_uni_td = resolveEasycom(vue.resolveDynamicComponent("uni-td"), __easycom_2$2); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_uni_table = resolveEasycom(vue.resolveDynamicComponent("uni-table"), __easycom_4); return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [ vue.createVNode(_component_uni_table, { border: "", emptyText: "暂无更多数据", width: "600rpx" }, { default: vue.withCtx(() => [ vue.createCommentVNode(" 表头行 "), vue.createVNode(_component_uni_tr, null, { default: vue.withCtx(() => [ vue.createVNode(_component_uni_th, { width: "120rpx", align: "center" }, { default: vue.withCtx(() => [ vue.createTextVNode("日期") ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_th, { width: "200rpx", align: "center" }, { default: vue.withCtx(() => [ vue.createTextVNode("操作") ]), _: 1 /* STABLE */ }), vue.createVNode(_component_uni_th, { width: "300.22rpx", align: "center" }, { default: vue.withCtx(() => [ vue.createTextVNode("相关信息") ]), _: 1 /* STABLE */ }) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(" 表格数据行 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(props2.dataList, (item, index2) => { return vue.openBlock(), vue.createBlock( _component_uni_tr, { key: index2 }, { default: vue.withCtx(() => [ vue.createCommentVNode(" {(item.create_time).slice(5,11)}} "), vue.createVNode(_component_uni_td, null, { default: vue.withCtx(() => [ vue.createTextVNode("5,11") ]), _: 1 /* STABLE */ }), vue.createVNode( _component_uni_td, { style: { "text-align": "center" } }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(item.action_name), 1 /* TEXT */ ) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ), item.img ? (vue.openBlock(), vue.createBlock(_component_uni_td, { key: 0 }, { default: vue.withCtx(() => [ vue.createVNode(_component_u__image, { src: "/static/img/GJ.jpg", width: "100%", height: "210.28rpx", alt: "" }) ]), _: 1 /* STABLE */ })) : (vue.openBlock(), vue.createBlock( _component_uni_td, { key: 1 }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString(objFn(item.action_content)), 1 /* TEXT */ ) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ )) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }), vue.withDirectives(vue.createElementVNode( "view", { class: "tit_b", onClick: navgo }, [ vue.createTextVNode( vue.toDisplayString(tit_b.value) + " ", 1 /* TEXT */ ), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, tit_b.value] ]) ]); }; } }; const myTable = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-90822214"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/myTable/index.vue"]]); const animalListAPI$1 = (data) => syhttp.get("/AnimalBreed/animalList", data); const animalEnvDataAPI$1 = (data) => syhttp.get("/AnimalBreed/animalEnvData", data); const actionsAPI$1 = (data) => syhttp.get("/user/actions", data); const animalInfoAPI$1 = (data) => syhttp.get("/AnimalBreed/animalInfo", data); const animalPicListAPI$1 = (data) => syhttp.get("/AnimalBreed/animalPicList", data); const addAnimalPicAPI$1 = (data) => syhttp.post("/AnimalBreed/addAnimalPic", data); const animalStatusAPI = (data) => syhttp.post("/AnimalBreed/animalStatus", data); const animalChangeListAPI = (data) => syhttp.get("/AnimalBreed/animalChangeList", data); const animalSellAPI = (data) => syhttp.post("/AnimalBreed/animalSell", data); var isVue2 = false; function set(target, key, val) { if (Array.isArray(target)) { target.length = Math.max(target.length, key); target.splice(key, 1, val); return val; } target[key] = val; return val; } function del(target, key) { if (Array.isArray(target)) { target.splice(key, 1); return; } delete target[key]; } function getDevtoolsGlobalHook() { return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__; } function getTarget() { return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; } const isProxyAvailable = typeof Proxy === "function"; const HOOK_SETUP = "devtools-plugin:setup"; const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set"; let supported; let perf; function isPerformanceSupported() { var _a; if (supported !== void 0) { return supported; } if (typeof window !== "undefined" && window.performance) { supported = true; perf = window.performance; } else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) { supported = true; perf = global.perf_hooks.performance; } else { supported = false; } return supported; } function now() { return isPerformanceSupported() ? perf.now() : Date.now(); } class ApiProxy { constructor(plugin, hook) { this.target = null; this.targetQueue = []; this.onQueue = []; this.plugin = plugin; this.hook = hook; const defaultSettings = {}; if (plugin.settings) { for (const id in plugin.settings) { const item = plugin.settings[id]; defaultSettings[id] = item.defaultValue; } } const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`; let currentSettings = Object.assign({}, defaultSettings); try { const raw = localStorage.getItem(localSettingsSaveId); const data = JSON.parse(raw); Object.assign(currentSettings, data); } catch (e2) { } this.fallbacks = { getSettings() { return currentSettings; }, setSettings(value) { try { localStorage.setItem(localSettingsSaveId, JSON.stringify(value)); } catch (e2) { } currentSettings = value; }, now() { return now(); } }; if (hook) { hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => { if (pluginId === this.plugin.id) { this.fallbacks.setSettings(value); } }); } this.proxiedOn = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target.on[prop]; } else { return (...args) => { this.onQueue.push({ method: prop, args }); }; } } }); this.proxiedTarget = new Proxy({}, { get: (_target, prop) => { if (this.target) { return this.target[prop]; } else if (prop === "on") { return this.proxiedOn; } else if (Object.keys(this.fallbacks).includes(prop)) { return (...args) => { this.targetQueue.push({ method: prop, args, resolve: () => { } }); return this.fallbacks[prop](...args); }; } else { return (...args) => { return new Promise((resolve) => { this.targetQueue.push({ method: prop, args, resolve }); }); }; } } }); } async setRealTarget(target) { this.target = target; for (const item of this.onQueue) { this.target.on[item.method](...item.args); } for (const item of this.targetQueue) { item.resolve(await this.target[item.method](...item.args)); } } } function setupDevtoolsPlugin(pluginDescriptor, setupFn) { const descriptor = pluginDescriptor; const target = getTarget(); const hook = getDevtoolsGlobalHook(); const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy; if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) { hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); } else { const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null; const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; list.push({ pluginDescriptor: descriptor, setupFn, proxy }); if (proxy) setupFn(proxy.proxiedTarget); } } /*! * pinia v2.0.33 * (c) 2023 Eduardo San Martin Morote * @license MIT */ let activePinia; const setActivePinia = (pinia) => activePinia = pinia; const piniaSymbol = Symbol("pinia"); function isPlainObject$1(o2) { return o2 && typeof o2 === "object" && Object.prototype.toString.call(o2) === "[object Object]" && typeof o2.toJSON !== "function"; } var MutationType; (function(MutationType2) { MutationType2["direct"] = "direct"; MutationType2["patchObject"] = "patch object"; MutationType2["patchFunction"] = "patch function"; })(MutationType || (MutationType = {})); const IS_CLIENT = typeof window !== "undefined"; const USE_DEVTOOLS = IS_CLIENT; const _global = /* @__PURE__ */ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })(); function bom(blob, { autoBom = false } = {}) { if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { return new Blob([String.fromCharCode(65279), blob], { type: blob.type }); } return blob; } function download(url2, name, opts) { const xhr = new XMLHttpRequest(); xhr.open("GET", url2); xhr.responseType = "blob"; xhr.onload = function() { saveAs(xhr.response, name, opts); }; xhr.onerror = function() { console.error("could not download file"); }; xhr.send(); } function corsEnabled(url2) { const xhr = new XMLHttpRequest(); xhr.open("HEAD", url2, false); try { xhr.send(); } catch (e2) { } return xhr.status >= 200 && xhr.status <= 299; } function click(node) { try { node.dispatchEvent(new MouseEvent("click")); } catch (e2) { const evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null); node.dispatchEvent(evt); } } const _navigator = typeof navigator === "object" ? navigator : { userAgent: "" }; const isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))(); const saveAs = !IS_CLIENT ? () => { } : ( // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : ( // Use msSaveOrOpenBlob as a second approach "msSaveOrOpenBlob" in _navigator ? msSaveAs : ( // Fallback to using FileReader and a popup fileSaverSaveAs ) ) ); function downloadSaveAs(blob, name = "download", opts) { const a2 = document.createElement("a"); a2.download = name; a2.rel = "noopener"; if (typeof blob === "string") { a2.href = blob; if (a2.origin !== location.origin) { if (corsEnabled(a2.href)) { download(blob, name, opts); } else { a2.target = "_blank"; click(a2); } } else { click(a2); } } else { a2.href = URL.createObjectURL(blob); setTimeout(function() { URL.revokeObjectURL(a2.href); }, 4e4); setTimeout(function() { click(a2); }, 0); } } function msSaveAs(blob, name = "download", opts) { if (typeof blob === "string") { if (corsEnabled(blob)) { download(blob, name, opts); } else { const a2 = document.createElement("a"); a2.href = blob; a2.target = "_blank"; setTimeout(function() { click(a2); }); } } else { navigator.msSaveOrOpenBlob(bom(blob, opts), name); } } function fileSaverSaveAs(blob, name, opts, popup) { popup = popup || open("", "_blank"); if (popup) { popup.document.title = popup.document.body.innerText = "downloading..."; } if (typeof blob === "string") return download(blob, name, opts); const force = blob.type === "application/octet-stream"; const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global; const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent); if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") { const reader = new FileReader(); reader.onloadend = function() { let url2 = reader.result; if (typeof url2 !== "string") { popup = null; throw new Error("Wrong reader.result type"); } url2 = isChromeIOS ? url2 : url2.replace(/^data:[^;]*;/, "data:attachment/file;"); if (popup) { popup.location.href = url2; } else { location.assign(url2); } popup = null; }; reader.readAsDataURL(blob); } else { const url2 = URL.createObjectURL(blob); if (popup) popup.location.assign(url2); else location.href = url2; popup = null; setTimeout(function() { URL.revokeObjectURL(url2); }, 4e4); } } function toastMessage(message, type) { const piniaMessage = "🍍 " + message; if (typeof __VUE_DEVTOOLS_TOAST__ === "function") { __VUE_DEVTOOLS_TOAST__(piniaMessage, type); } else if (type === "error") { console.error(piniaMessage); } else if (type === "warn") { console.warn(piniaMessage); } else { console.log(piniaMessage); } } function isPinia(o2) { return "_a" in o2 && "install" in o2; } function checkClipboardAccess() { if (!("clipboard" in navigator)) { toastMessage(`Your browser doesn't support the Clipboard API`, "error"); return true; } } function checkNotFocusedError(error2) { if (error2 instanceof Error && error2.message.toLowerCase().includes("document is not focused")) { toastMessage('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"); return true; } return false; } async function actionGlobalCopyState(pinia) { if (checkClipboardAccess()) return; try { await navigator.clipboard.writeText(JSON.stringify(pinia.state.value)); toastMessage("Global state copied to clipboard."); } catch (error2) { if (checkNotFocusedError(error2)) return; toastMessage(`Failed to serialize the state. Check the console for more details.`, "error"); console.error(error2); } } async function actionGlobalPasteState(pinia) { if (checkClipboardAccess()) return; try { pinia.state.value = JSON.parse(await navigator.clipboard.readText()); toastMessage("Global state pasted from clipboard."); } catch (error2) { if (checkNotFocusedError(error2)) return; toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error"); console.error(error2); } } async function actionGlobalSaveState(pinia) { try { saveAs(new Blob([JSON.stringify(pinia.state.value)], { type: "text/plain;charset=utf-8" }), "pinia-state.json"); } catch (error2) { toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error"); console.error(error2); } } let fileInput; function getFileOpener() { if (!fileInput) { fileInput = document.createElement("input"); fileInput.type = "file"; fileInput.accept = ".json"; } function openFile() { return new Promise((resolve, reject) => { fileInput.onchange = async () => { const files = fileInput.files; if (!files) return resolve(null); const file = files.item(0); if (!file) return resolve(null); return resolve({ text: await file.text(), file }); }; fileInput.oncancel = () => resolve(null); fileInput.onerror = reject; fileInput.click(); }); } return openFile; } async function actionGlobalOpenStateFile(pinia) { try { const open2 = await getFileOpener(); const result = await open2(); if (!result) return; const { text, file } = result; pinia.state.value = JSON.parse(text); toastMessage(`Global state imported from "${file.name}".`); } catch (error2) { toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error"); console.error(error2); } } function formatDisplay(display) { return { _custom: { display } }; } const PINIA_ROOT_LABEL = "🍍 Pinia (root)"; const PINIA_ROOT_ID = "_root"; function formatStoreForInspectorTree(store) { return isPinia(store) ? { id: PINIA_ROOT_ID, label: PINIA_ROOT_LABEL } : { id: store.$id, label: store.$id }; } function formatStoreForInspectorState(store) { if (isPinia(store)) { const storeNames = Array.from(store._s.keys()); const storeMap = store._s; const state2 = { state: storeNames.map((storeId) => ({ editable: true, key: storeId, value: store.state.value[storeId] })), getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => { const store2 = storeMap.get(id); return { editable: false, key: id, value: store2._getters.reduce((getters, key) => { getters[key] = store2[key]; return getters; }, {}) }; }) }; return state2; } const state = { state: Object.keys(store.$state).map((key) => ({ editable: true, key, value: store.$state[key] })) }; if (store._getters && store._getters.length) { state.getters = store._getters.map((getterName) => ({ editable: false, key: getterName, value: store[getterName] })); } if (store._customProperties.size) { state.customProperties = Array.from(store._customProperties).map((key) => ({ editable: true, key, value: store[key] })); } return state; } function formatEventData(events) { if (!events) return {}; if (Array.isArray(events)) { return events.reduce((data, event) => { data.keys.push(event.key); data.operations.push(event.type); data.oldValue[event.key] = event.oldValue; data.newValue[event.key] = event.newValue; return data; }, { oldValue: {}, keys: [], operations: [], newValue: {} }); } else { return { operation: formatDisplay(events.type), key: formatDisplay(events.key), oldValue: events.oldValue, newValue: events.newValue }; } } function formatMutationType(type) { switch (type) { case MutationType.direct: return "mutation"; case MutationType.patchFunction: return "$patch"; case MutationType.patchObject: return "$patch"; default: return "unknown"; } } let isTimelineActive = true; const componentStateTypes = []; const MUTATIONS_LAYER_ID = "pinia:mutations"; const INSPECTOR_ID = "pinia"; const { assign: assign$1 } = Object; const getStoreType = (id) => "🍍 " + id; function registerPiniaDevtools(app, pinia) { setupDevtoolsPlugin({ id: "dev.esm.pinia", label: "Pinia 🍍", logo: "https://pinia.vuejs.org/logo.svg", packageName: "pinia", homepage: "https://pinia.vuejs.org", componentStateTypes, app }, (api) => { if (typeof api.now !== "function") { toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."); } api.addTimelineLayer({ id: MUTATIONS_LAYER_ID, label: `Pinia 🍍`, color: 15064968 }); api.addInspector({ id: INSPECTOR_ID, label: "Pinia 🍍", icon: "storage", treeFilterPlaceholder: "Search stores", actions: [ { icon: "content_copy", action: () => { actionGlobalCopyState(pinia); }, tooltip: "Serialize and copy the state" }, { icon: "content_paste", action: async () => { await actionGlobalPasteState(pinia); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); }, tooltip: "Replace the state with the content of your clipboard" }, { icon: "save", action: () => { actionGlobalSaveState(pinia); }, tooltip: "Save the state as a JSON file" }, { icon: "folder_open", action: async () => { await actionGlobalOpenStateFile(pinia); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); }, tooltip: "Import the state from a JSON file" } ], nodeActions: [ { icon: "restore", tooltip: "Reset the state (option store only)", action: (nodeId) => { const store = pinia._s.get(nodeId); if (!store) { toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn"); } else if (!store._isOptionsAPI) { toastMessage(`Cannot reset "${nodeId}" store because it's a setup store.`, "warn"); } else { store.$reset(); toastMessage(`Store "${nodeId}" reset.`); } } } ] }); api.on.inspectComponent((payload, ctx) => { const proxy = payload.componentInstance && payload.componentInstance.proxy; if (proxy && proxy._pStores) { const piniaStores = payload.componentInstance.proxy._pStores; Object.values(piniaStores).forEach((store) => { payload.instanceData.state.push({ type: getStoreType(store.$id), key: "state", editable: true, value: store._isOptionsAPI ? { _custom: { value: vue.toRaw(store.$state), actions: [ { icon: "restore", tooltip: "Reset the state of this store", action: () => store.$reset() } ] } } : ( // NOTE: workaround to unwrap transferred refs Object.keys(store.$state).reduce((state, key) => { state[key] = store.$state[key]; return state; }, {}) ) }); if (store._getters && store._getters.length) { payload.instanceData.state.push({ type: getStoreType(store.$id), key: "getters", editable: false, value: store._getters.reduce((getters, key) => { try { getters[key] = store[key]; } catch (error2) { getters[key] = error2; } return getters; }, {}) }); } }); } }); api.on.getInspectorTree((payload) => { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { let stores = [pinia]; stores = stores.concat(Array.from(pinia._s.values())); payload.rootNodes = (payload.filter ? stores.filter((store) => "$id" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree); } }); api.on.getInspectorState((payload) => { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId); if (!inspectedStore) { return; } if (inspectedStore) { payload.state = formatStoreForInspectorState(inspectedStore); } } }); api.on.editInspectorState((payload, ctx) => { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId); if (!inspectedStore) { return toastMessage(`store "${payload.nodeId}" not found`, "error"); } const { path } = payload; if (!isPinia(inspectedStore)) { if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) { path.unshift("$state"); } } else { path.unshift("state"); } isTimelineActive = false; payload.set(inspectedStore, path, payload.state.value); isTimelineActive = true; } }); api.on.editComponentState((payload) => { if (payload.type.startsWith("🍍")) { const storeId = payload.type.replace(/^🍍\s*/, ""); const store = pinia._s.get(storeId); if (!store) { return toastMessage(`store "${storeId}" not found`, "error"); } const { path } = payload; if (path[0] !== "state") { return toastMessage(`Invalid path for store "${storeId}": ${path} Only state can be modified.`); } path[0] = "$state"; isTimelineActive = false; payload.set(store, path, payload.state.value); isTimelineActive = true; } }); }); } function addStoreToDevtools(app, store) { if (!componentStateTypes.includes(getStoreType(store.$id))) { componentStateTypes.push(getStoreType(store.$id)); } setupDevtoolsPlugin({ id: "dev.esm.pinia", label: "Pinia 🍍", logo: "https://pinia.vuejs.org/logo.svg", packageName: "pinia", homepage: "https://pinia.vuejs.org", componentStateTypes, app, settings: { logStoreChanges: { label: "Notify about new/deleted stores", type: "boolean", defaultValue: true } // useEmojis: { // label: 'Use emojis in messages ⚡️', // type: 'boolean', // defaultValue: true, // }, } }, (api) => { const now2 = typeof api.now === "function" ? api.now.bind(api) : Date.now; store.$onAction(({ after, onError, name, args }) => { const groupId = runningActionId++; api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🛫 " + name, subtitle: "start", data: { store: formatDisplay(store.$id), action: formatDisplay(name), args }, groupId } }); after((result) => { activeAction = void 0; api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🛬 " + name, subtitle: "end", data: { store: formatDisplay(store.$id), action: formatDisplay(name), args, result }, groupId } }); }); onError((error2) => { activeAction = void 0; api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), logType: "error", title: "💥 " + name, subtitle: "end", data: { store: formatDisplay(store.$id), action: formatDisplay(name), args, error: error2 }, groupId } }); }); }, true); store._customProperties.forEach((name) => { vue.watch(() => vue.unref(store[name]), (newValue, oldValue) => { api.notifyComponentUpdate(); api.sendInspectorState(INSPECTOR_ID); if (isTimelineActive) { api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "Change", subtitle: name, data: { newValue, oldValue }, groupId: activeAction } }); } }, { deep: true }); }); store.$subscribe(({ events, type }, state) => { api.notifyComponentUpdate(); api.sendInspectorState(INSPECTOR_ID); if (!isTimelineActive) return; const eventData = { time: now2(), title: formatMutationType(type), data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)), groupId: activeAction }; activeAction = void 0; if (type === MutationType.patchFunction) { eventData.subtitle = "⤵️"; } else if (type === MutationType.patchObject) { eventData.subtitle = "🧩"; } else if (events && !Array.isArray(events)) { eventData.subtitle = events.type; } if (events) { eventData.data["rawEvent(s)"] = { _custom: { display: "DebuggerEvent", type: "object", tooltip: "raw DebuggerEvent[]", value: events } }; } api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: eventData }); }, { detached: true, flush: "sync" }); const hotUpdate = store._hotUpdate; store._hotUpdate = vue.markRaw((newStore) => { hotUpdate(newStore); api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: now2(), title: "🔥 " + store.$id, subtitle: "HMR update", data: { store: formatDisplay(store.$id), info: formatDisplay(`HMR update`) } } }); api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); }); const { $dispose } = store; store.$dispose = () => { $dispose(); api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); api.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`); }; api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); api.getSettings().logStoreChanges && toastMessage(`"${store.$id}" store installed 🆕`); }); } let runningActionId = 0; let activeAction; function patchActionForGrouping(store, actionNames) { const actions = actionNames.reduce((storeActions, actionName) => { storeActions[actionName] = vue.toRaw(store)[actionName]; return storeActions; }, {}); for (const actionName in actions) { store[actionName] = function() { const _actionId = runningActionId; const trackedStore = new Proxy(store, { get(...args) { activeAction = _actionId; return Reflect.get(...args); }, set(...args) { activeAction = _actionId; return Reflect.set(...args); } }); return actions[actionName].apply(trackedStore, arguments); }; } } function devtoolsPlugin({ app, store, options }) { if (store.$id.startsWith("__hot:")) { return; } if (options.state) { store._isOptionsAPI = true; } if (typeof options.state === "function") { patchActionForGrouping( // @ts-expect-error: can cast the store... store, Object.keys(options.actions) ); const originalHotUpdate = store._hotUpdate; vue.toRaw(store)._hotUpdate = function(newStore) { originalHotUpdate.apply(this, arguments); patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions)); }; } addStoreToDevtools( app, // FIXME: is there a way to allow the assignment from Store to StoreGeneric? store ); } function createPinia() { const scope = vue.effectScope(true); const state = scope.run(() => vue.ref({})); let _p = []; let toBeInstalled = []; const pinia = vue.markRaw({ install(app) { setActivePinia(pinia); { pinia._a = app; app.provide(piniaSymbol, pinia); app.config.globalProperties.$pinia = pinia; if (USE_DEVTOOLS) { registerPiniaDevtools(app, pinia); } toBeInstalled.forEach((plugin) => _p.push(plugin)); toBeInstalled = []; } }, use(plugin) { if (!this._a && !isVue2) { toBeInstalled.push(plugin); } else { _p.push(plugin); } return this; }, _p, // it's actually undefined here // @ts-expect-error _a: null, _e: scope, _s: /* @__PURE__ */ new Map(), state }); if (USE_DEVTOOLS && typeof Proxy !== "undefined") { pinia.use(devtoolsPlugin); } return pinia; } function patchObject(newState, oldState) { for (const key in oldState) { const subPatch = oldState[key]; if (!(key in newState)) { continue; } const targetValue = newState[key]; if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { newState[key] = patchObject(targetValue, subPatch); } else { { newState[key] = subPatch; } } } return newState; } const noop = () => { }; function addSubscription(subscriptions, callback, detached, onCleanup = noop) { subscriptions.push(callback); const removeSubscription = () => { const idx = subscriptions.indexOf(callback); if (idx > -1) { subscriptions.splice(idx, 1); onCleanup(); } }; if (!detached && vue.getCurrentScope()) { vue.onScopeDispose(removeSubscription); } return removeSubscription; } function triggerSubscriptions(subscriptions, ...args) { subscriptions.slice().forEach((callback) => { callback(...args); }); } function mergeReactiveObjects(target, patchToApply) { if (target instanceof Map && patchToApply instanceof Map) { patchToApply.forEach((value, key) => target.set(key, value)); } if (target instanceof Set && patchToApply instanceof Set) { patchToApply.forEach(target.add, target); } for (const key in patchToApply) { if (!patchToApply.hasOwnProperty(key)) continue; const subPatch = patchToApply[key]; const targetValue = target[key]; if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !vue.isRef(subPatch) && !vue.isReactive(subPatch)) { target[key] = mergeReactiveObjects(targetValue, subPatch); } else { target[key] = subPatch; } } return target; } const skipHydrateSymbol = Symbol("pinia:skipHydration"); function shouldHydrate(obj) { return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol); } const { assign } = Object; function isComputed(o2) { return !!(vue.isRef(o2) && o2.effect); } function createOptionsStore(id, options, pinia, hot) { const { state, actions, getters } = options; const initialState = pinia.state.value[id]; let store; function setup() { if (!initialState && !hot) { { pinia.state.value[id] = state ? state() : {}; } } const localState = hot ? ( // use ref() to unwrap refs inside state TODO: check if this is still necessary vue.toRefs(vue.ref(state ? state() : {}).value) ) : vue.toRefs(pinia.state.value[id]); return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => { if (name in localState) { console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`); } computedGetters[name] = vue.markRaw(vue.computed(() => { setActivePinia(pinia); const store2 = pinia._s.get(id); return getters[name].call(store2, store2); })); return computedGetters; }, {})); } store = createSetupStore(id, setup, options, pinia, hot, true); return store; } function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) { let scope; const optionsForPlugin = assign({ actions: {} }, options); if (!pinia._e.active) { throw new Error("Pinia destroyed"); } const $subscribeOptions = { deep: true // flush: 'post', }; { $subscribeOptions.onTrigger = (event) => { if (isListening) { debuggerEvents = event; } else if (isListening == false && !store._hotUpdating) { if (Array.isArray(debuggerEvents)) { debuggerEvents.push(event); } else { console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."); } } }; } let isListening; let isSyncListening; let subscriptions = vue.markRaw([]); let actionSubscriptions = vue.markRaw([]); let debuggerEvents; const initialState = pinia.state.value[$id]; if (!isOptionsStore && !initialState && !hot) { { pinia.state.value[$id] = {}; } } const hotState = vue.ref({}); let activeListener; function $patch(partialStateOrMutator) { let subscriptionMutation; isListening = isSyncListening = false; { debuggerEvents = []; } if (typeof partialStateOrMutator === "function") { partialStateOrMutator(pinia.state.value[$id]); subscriptionMutation = { type: MutationType.patchFunction, storeId: $id, events: debuggerEvents }; } else { mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator); subscriptionMutation = { type: MutationType.patchObject, payload: partialStateOrMutator, storeId: $id, events: debuggerEvents }; } const myListenerId = activeListener = Symbol(); vue.nextTick().then(() => { if (activeListener === myListenerId) { isListening = true; } }); isSyncListening = true; triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]); } const $reset = isOptionsStore ? function $reset2() { const { state } = options; const newState = state ? state() : {}; this.$patch(($state) => { assign($state, newState); }); } : ( /* istanbul ignore next */ () => { throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`); } ); function $dispose() { scope.stop(); subscriptions = []; actionSubscriptions = []; pinia._s.delete($id); } function wrapAction(name, action) { return function() { setActivePinia(pinia); const args = Array.from(arguments); const afterCallbackList = []; const onErrorCallbackList = []; function after(callback) { afterCallbackList.push(callback); } function onError(callback) { onErrorCallbackList.push(callback); } triggerSubscriptions(actionSubscriptions, { args, name, store, after, onError }); let ret; try { ret = action.apply(this && this.$id === $id ? this : store, args); } catch (error2) { triggerSubscriptions(onErrorCallbackList, error2); throw error2; } if (ret instanceof Promise) { return ret.then((value) => { triggerSubscriptions(afterCallbackList, value); return value; }).catch((error2) => { triggerSubscriptions(onErrorCallbackList, error2); return Promise.reject(error2); }); } triggerSubscriptions(afterCallbackList, ret); return ret; }; } const _hmrPayload = /* @__PURE__ */ vue.markRaw({ actions: {}, getters: {}, state: [], hotState }); const partialStore = { _p: pinia, // _s: scope, $id, $onAction: addSubscription.bind(null, actionSubscriptions), $patch, $reset, $subscribe(callback, options2 = {}) { const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher()); const stopWatcher = scope.run(() => vue.watch(() => pinia.state.value[$id], (state) => { if (options2.flush === "sync" ? isSyncListening : isListening) { callback({ storeId: $id, type: MutationType.direct, events: debuggerEvents }, state); } }, assign({}, $subscribeOptions, options2))); return removeSubscription; }, $dispose }; const store = vue.reactive( assign( { _hmrPayload, _customProperties: vue.markRaw(/* @__PURE__ */ new Set()) // devtools custom properties }, partialStore // must be added later // setupStore ) ); pinia._s.set($id, store); const setupStore = pinia._e.run(() => { scope = vue.effectScope(); return scope.run(() => setup()); }); for (const key in setupStore) { const prop = setupStore[key]; if (vue.isRef(prop) && !isComputed(prop) || vue.isReactive(prop)) { if (hot) { set(hotState.value, key, vue.toRef(setupStore, key)); } else if (!isOptionsStore) { if (initialState && shouldHydrate(prop)) { if (vue.isRef(prop)) { prop.value = initialState[key]; } else { mergeReactiveObjects(prop, initialState[key]); } } { pinia.state.value[$id][key] = prop; } } { _hmrPayload.state.push(key); } } else if (typeof prop === "function") { const actionValue = hot ? prop : wrapAction(key, prop); { setupStore[key] = actionValue; } { _hmrPayload.actions[key] = prop; } optionsForPlugin.actions[key] = prop; } else { if (isComputed(prop)) { _hmrPayload.getters[key] = isOptionsStore ? ( // @ts-expect-error options.getters[key] ) : prop; if (IS_CLIENT) { const getters = setupStore._getters || // @ts-expect-error: same (setupStore._getters = vue.markRaw([])); getters.push(key); } } } } { assign(store, setupStore); assign(vue.toRaw(store), setupStore); } Object.defineProperty(store, "$state", { get: () => hot ? hotState.value : pinia.state.value[$id], set: (state) => { if (hot) { throw new Error("cannot set hotState"); } $patch(($state) => { assign($state, state); }); } }); { store._hotUpdate = vue.markRaw((newStore) => { store._hotUpdating = true; newStore._hmrPayload.state.forEach((stateKey) => { if (stateKey in store.$state) { const newStateTarget = newStore.$state[stateKey]; const oldStateSource = store.$state[stateKey]; if (typeof newStateTarget === "object" && isPlainObject$1(newStateTarget) && isPlainObject$1(oldStateSource)) { patchObject(newStateTarget, oldStateSource); } else { newStore.$state[stateKey] = oldStateSource; } } set(store, stateKey, vue.toRef(newStore.$state, stateKey)); }); Object.keys(store.$state).forEach((stateKey) => { if (!(stateKey in newStore.$state)) { del(store, stateKey); } }); isListening = false; isSyncListening = false; pinia.state.value[$id] = vue.toRef(newStore._hmrPayload, "hotState"); isSyncListening = true; vue.nextTick().then(() => { isListening = true; }); for (const actionName in newStore._hmrPayload.actions) { const action = newStore[actionName]; set(store, actionName, wrapAction(actionName, action)); } for (const getterName in newStore._hmrPayload.getters) { const getter = newStore._hmrPayload.getters[getterName]; const getterValue = isOptionsStore ? ( // special handling of options api vue.computed(() => { setActivePinia(pinia); return getter.call(store, store); }) ) : getter; set(store, getterName, getterValue); } Object.keys(store._hmrPayload.getters).forEach((key) => { if (!(key in newStore._hmrPayload.getters)) { del(store, key); } }); Object.keys(store._hmrPayload.actions).forEach((key) => { if (!(key in newStore._hmrPayload.actions)) { del(store, key); } }); store._hmrPayload = newStore._hmrPayload; store._getters = newStore._getters; store._hotUpdating = false; }); } if (USE_DEVTOOLS) { const nonEnumerable = { writable: true, configurable: true, // avoid warning on devtools trying to display this property enumerable: false }; ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p2) => { Object.defineProperty(store, p2, assign({ value: store[p2] }, nonEnumerable)); }); } pinia._p.forEach((extender) => { if (USE_DEVTOOLS) { const extensions = scope.run(() => extender({ store, app: pinia._a, pinia, options: optionsForPlugin })); Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key)); assign(store, extensions); } else { assign(store, scope.run(() => extender({ store, app: pinia._a, pinia, options: optionsForPlugin }))); } }); if (store.$state && typeof store.$state === "object" && typeof store.$state.constructor === "function" && !store.$state.constructor.toString().includes("[native code]")) { console.warn(`[🍍]: The "state" must be a plain object. It cannot be state: () => new MyClass() Found in store "${store.$id}".`); } if (initialState && isOptionsStore && options.hydrate) { options.hydrate(store.$state, initialState); } isListening = true; isSyncListening = true; return store; } function defineStore(idOrOptions, setup, setupOptions) { let id; let options; const isSetupStore = typeof setup === "function"; if (typeof idOrOptions === "string") { id = idOrOptions; options = isSetupStore ? setupOptions : setup; } else { options = idOrOptions; id = idOrOptions.id; } function useStore(pinia, hot) { const currentInstance = vue.getCurrentInstance(); pinia = // in test mode, ignore the argument provided as we can always retrieve a // pinia instance with getActivePinia() pinia || currentInstance && vue.inject(piniaSymbol, null); if (pinia) setActivePinia(pinia); if (!activePinia) { throw new Error(`[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia? const pinia = createPinia() app.use(pinia) This will fail in production.`); } pinia = activePinia; if (!pinia._s.has(id)) { if (isSetupStore) { createSetupStore(id, setup, options, pinia); } else { createOptionsStore(id, options, pinia); } { useStore._pinia = pinia; } } const store = pinia._s.get(id); if (hot) { const hotId = "__hot:" + id; const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia, true) : createOptionsStore(hotId, assign({}, options), pinia, true); hot._hotUpdate(newStore); delete pinia.state.value[hotId]; pinia._s.delete(hotId); } if (IS_CLIENT && currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement !hot) { const vm = currentInstance.proxy; const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {}; cache[id] = store; } return store; } useStore.$id = id; return useStore; } const userInfoStore = defineStore("counter", { state: () => ({ userInfo: {} }), getters: {}, actions: { saveUserInfo(userInfo) { this.userInfo = userInfo; } } }); const _sfc_main$1b = { __name: "farmersCard", setup(__props) { const userInfoStores = userInfoStore(); const userInfo = vue.reactive({}); const objFn = (res, data) => { for (let key in res) { data[key] = res[key]; } }; objFn(userInfoStores.userInfo, userInfo); return (_ctx, _cache) => { return userInfo.animal_detail ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card" }, [ vue.createCommentVNode(" {{userInfo.animal_detail.total_count}} "), vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode( "view", { class: "" }, " 农户名称: " + vue.toDisplayString(userInfo.name), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种养殖类型: 养殖户 "), vue.createElementVNode( "view", { class: "" }, " 养殖头数: " + vue.toDisplayString(userInfo.animal_detail.total_count) + "头 ", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 土地面积:" + vue.toDisplayString(userInfo.total_land_area) + "亩 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 公: " + vue.toDisplayString(userInfo.animal_detail.male_count) + "头 ", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖种类: " + vue.toDisplayString(userInfo.animal_detail.kind[0]) + "," + vue.toDisplayString(userInfo.animal_detail.kind[1]), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 母: " + vue.toDisplayString(userInfo.animal_detail.maternal_count) + "头 ", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 具体种类: " + vue.toDisplayString(userInfo.animal_detail.breed[0]), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true); }; } }; const farmersCard$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["__scopeId", "data-v-853f8e7d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/animal/farmersCard.vue"]]); const _sfc_main$1a = { __name: "cultivation", props: { userInfo: Object }, setup(__props) { const props2 = __props; vue.reactive(props2.userInfo); const data = vue.reactive([ { tit: "环境温度", icon: "WD", dw: "℃", cont: "hj_temp", flag: false }, { tit: "环境湿度", icon: "JYL", dw: "%RH", cont: "hj_humi" }, { tit: "氧气浓度", icon: "FX", cont: "o_content", dw: "%" }, { tit: "二氧化碳含量", icon: "FS", dw: "mg/L", cont: "c_content" }, { tit: "光照强度", icon: "JYL", dw: "lux", cont: "light" }, { tit: "大气压强", icon: "GZ", dw: "hpa", cont: "dqy" }, { tit: "有害气体", icon: "EYHT", cont: "yhqt" } ]); const baseData = vue.reactive({}); const urlFn = (name) => { return `/static/img/${name}.png`; }; const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const animalList = vue.reactive([]); animalListAPI$1({ user_id: 307, page_no: 1, page_size: 3 }).then((res) => { res.data.forEach((item) => { animalList.push(item); }); }); animalEnvDataAPI$1({ user_id: 307 }).then((res) => { for (let key in res.data) { baseData[key] = res.data[key]; } }); const actionList = vue.reactive({}); actionsAPI$1({ type: 3 }).then((res) => { for (let key in res.data) { actionList[key] = res.data[key]; } }); return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n \r\n 农户名称: {{userInfo.name}}\r\n \r\n \r\n \r\n \r\n 种养殖类型: 养殖户\r\n \r\n \r\n 养殖头数: {{userInfo.animal_detail.total_count}}头\r\n \r\n \r\n \r\n \r\n 土地面积:{{userInfo.total_land_area}}亩\r\n \r\n \r\n 公: {{userInfo.animal_detail.male_count}}头\r\n \r\n \r\n \r\n \r\n 养殖种类: {{userInfo.animal_detail.kind[0]}},{{userInfo.animal_detail.kind[1]}}\r\n \r\n \r\n 母: {{userInfo.animal_detail.maternal_count}}头\r\n \r\n \r\n \r\n \r\n 具体种类: {{userInfo.animal_detail.breed[0]}}\r\n \r\n\r\n \r\n '), vue.createVNode(farmersCard$1), vue.createElementVNode("view", { class: "circumstance" }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode("view", { class: "" }, " 养殖情况 ") ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(animalList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card", key: index2, onClick: ($event) => navgo(`/pages/feedIng/feedDetail?id=${item.id}`) }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode( "view", { class: "" }, " 编号: " + vue.toDisplayString(item.animal_code), 1 /* TEXT */ ), item.animal_status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 健康 ")) : vue.createCommentVNode("v-if", true), item.animal_status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "", style: { "color": "#FFD736" } }, " 怀孕中 ")) : vue.createCommentVNode("v-if", true), item.animal_status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "", style: { "color": "#3274F9" } }, " 可出栏 ")) : vue.createCommentVNode("v-if", true), item.animal_status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "", style: { "color": "#F84221" } }, " 生病隔离中 ")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖类型: " + vue.toDisplayString(item.animal_kind), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 年龄: " + vue.toDisplayString(item.animal_age) + "年 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 体重: " + vue.toDisplayString(item.animal_weight) + "kg ", 1 /* TEXT */ ) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "check", onClick: _cache[0] || (_cache[0] = ($event) => navgo("/pages/feedIng/feedList")) }, [ vue.createTextVNode(" 查看全部养殖动物"), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ]) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(actionList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "circumstance", key: index2 }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(index2), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "updata-btn", onClick: _cache[1] || (_cache[1] = ($event) => navgo("/pages/growRecord/index?type=3")) }, " 更新" + vue.toDisplayString(index2.slice(0, -2)), 1 /* TEXT */ ) ]), vue.createVNode(myTable, { tit: `查看${index2.slice(0, -2)}`, dataList: item.action_record, route: "/pages/feedIng/allRecordTable" }, { default: vue.withCtx(() => [ vue.createTextVNode("> ") ]), _: 2 /* DYNAMIC */ }, 1032, ["tit", "dataList"]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "data" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "justify-content": "space-between", "font-size": "29.79rpx" } }, [ vue.createElementVNode("view", { class: "" }, " 环境监测数据 ") ]), vue.createElementVNode("view", { class: "tit-b" }, [ vue.createVNode(_component_u__image, { src: urlFn("sj"), style: { "margin": "0 5rpx" }, width: "28.04rpx", height: "28.04rpx" }, null, 8, ["src"]), vue.createElementVNode("text", null, "刷新时间: 2022-3-3") ]) ]), vue.createElementVNode("view", { class: "data-cont" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(data, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "data-cont-li center", key: index2 }, [ vue.createElementVNode("view", { style: { "margin": "0 20rpx" } }, [ vue.createElementVNode("view", { class: "center" }, [ vue.createVNode(_component_u__image, { src: urlFn(item.icon), style: { "margin": "0 5rpx" }, width: "38.55rpx", height: "38.54rpx" }, null, 8, ["src"]), vue.createTextVNode( " " + vue.toDisplayString(item.tit), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "b-cls" }, [ vue.createElementVNode( "view", { class: "", style: vue.normalizeStyle({ color: item.flag ? "#0095FF" : "" }) }, [ vue.createElementVNode( "text", { style: { "font-size": "70.09rpx" } }, vue.toDisplayString(baseData[item.cont]), 1 /* TEXT */ ), vue.createTextVNode( vue.toDisplayString(item.dw), 1 /* TEXT */ ) ], 4 /* STYLE */ ), item.flag ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: urlFn("D"), style: { "margin": "0 5rpx" }, width: "31.54rpx", height: "31.54rpx" }, null, 8, ["src"]), vue.createElementVNode("text", { style: { "color": "#0095FF" } }, "5") ])) : vue.createCommentVNode("v-if", true) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]); }; } }; const cultivation = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-91fd8d70"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/cultivation.vue"]]); const _sfc_main$19 = { __name: "planting", props: { userInfo: Object }, setup(__props) { const props2 = __props; const userInfo = vue.reactive(props2.userInfo); const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const navgoFn = (is_cropped, land_id) => { if (!is_cropped) { navgo(`/pages/InformationAdd/index?land_id=${land_id}`); } else if (is_cropped) { navgo(`/pages/detail/plant?land_id=${land_id}`); } if (is_cropped == 2) { navgo("/pages/detail/plant"); } }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "border-bgc" }), vue.createElementVNode("view", { class: "", style: { "height": "30rpx" } }), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode( "view", { class: "card-li" }, " 农户名称: " + vue.toDisplayString(userInfo.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "card-li" }, " 种养殖类型: 种植户 "), vue.createElementVNode( "view", { class: "card-li" }, " 土地面积: " + vue.toDisplayString(userInfo.total_land_area) + "亩 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "card-li" }, " 地址: " + vue.toDisplayString(userInfo.area_name) + vue.toDisplayString(userInfo.street_name) + vue.toDisplayString(userInfo.village_name) + vue.toDisplayString(userInfo.brigade_name), 1 /* TEXT */ ) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(userInfo.land_detail, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card", key: index2, onClick: ($event) => navgoFn(item.is_cropped, item.land_id) }, [ vue.createElementVNode("view", { class: "tit card-li" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.land_notes), 1 /* TEXT */ ), item.is_cropped ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 已种植 ")) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "", style: { "color": "#00A15E" } }, " 未种植 ")) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 面积: " + vue.toDisplayString(item.land_area) + "亩 ", 1 /* TEXT */ ) ]), item.crop_name ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card-li tit" }, [ vue.createElementVNode( "view", { class: "", style: { "font-weight": "normal" } }, " 农作物: " + vue.toDisplayString(item.crop_name), 1 /* TEXT */ ), item.ripe_time ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#FF9B66" } }, " 已成熟 ")) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.withDirectives(vue.createElementVNode( "view", { class: "card-li tit", style: { "font-weight": "normal" } }, [ vue.createElementVNode( "view", { class: "" }, " 预计产量: " + vue.toDisplayString(item.crop_yield) + "kg ", 1 /* TEXT */ ), vue.createCommentVNode("v-if", true) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, item.crop_yield] ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { style: { "height": "170rpx" } }) ]), vue.createElementVNode("view", { class: "bottom" }, [ vue.createElementVNode("view", { class: "add-btn", onClick: _cache[0] || (_cache[0] = ($event) => navgo("/pages/growRecord/index")) }, " 批量处理 "), vue.createCommentVNode(` \r 增加种植\r `) ]) ]); }; } }; const planting = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-093aaff7"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/planting.vue"]]); const _sfc_main$18 = { __name: "fishing", props: { userInfo: Object }, setup(__props) { const props2 = __props; const userInfo = vue.reactive(props2.userInfo); const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const navgoFn = (is_cropped, pond_id) => { if (!is_cropped) { navgo(`/pages/aquatic/addPond?pond_id=${pond_id}`); } else if (is_cropped) { navgo(`/pages/aquatic/detail?pond_id=${pond_id}`); } }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "border-bgc" }), vue.createElementVNode("view", { class: "", style: { "height": "30rpx" } }), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode( "view", { class: "card-li" }, " 农户名称: " + vue.toDisplayString(userInfo.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "card-li" }, " 种养殖类型: 养殖户 "), vue.createElementVNode("view", { class: "card-li" }, [ vue.createCommentVNode(" 养殖种类: {{userInfo.}} ") ]), vue.createElementVNode( "view", { class: "card-li" }, " 土地面积: " + vue.toDisplayString(userInfo.total_land_area) + "亩 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "card-li" }, " 地址: " + vue.toDisplayString(userInfo.area_name) + vue.toDisplayString(userInfo.street_name) + vue.toDisplayString(userInfo.village_name) + vue.toDisplayString(userInfo.brigade_name), 1 /* TEXT */ ) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(userInfo.pond_detail, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card", key: index2, onClick: ($event) => navgoFn(item.is_culture, item.pond_id) }, [ vue.createElementVNode("view", { class: "tit card-li" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.pond_notes), 1 /* TEXT */ ), item.is_culture ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 已养殖 ")) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "", style: { "color": "#00A15E" } }, " 未养殖 ")) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 面积: " + vue.toDisplayString(item.pond_area) + "亩 ", 1 /* TEXT */ ) ]), item.is_culture ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖品种: " + vue.toDisplayString(item.pond_area) + "亩 ", 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), item.is_culture ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖数量: " + vue.toDisplayString(item.total_num), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { style: { "height": "170rpx" } }) ]), vue.createElementVNode("view", { class: "bottom" }, [ vue.createElementVNode("view", { class: "add-btn", onClick: _cache[0] || (_cache[0] = ($event) => navgo("/pages/growRecord/index")) }, " 批量处理 "), vue.createCommentVNode(` \r 增加种植\r `) ]) ]); }; } }; const fishing = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["__scopeId", "data-v-bdc223d1"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/fishing.vue"]]); const _sfc_main$17 = { __name: "farmersCard", setup(__props) { const userInfoStores = userInfoStore(); const userInfo = vue.reactive({}); const objFn = (res, data) => { for (let key in res) { data[key] = res[key]; } }; objFn(userInfoStores.userInfo, userInfo); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createCommentVNode(" {{userInfo.poultry_detail}} "), userInfo.poultry_detail ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card" }, [ vue.createCommentVNode(" {{userInfo.animal_detail.total_count}} "), vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode( "view", { class: "" }, " 农户名称: " + vue.toDisplayString(userInfo.name), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种养殖类型: 养殖户 "), vue.createElementVNode( "view", { class: "" }, " 养殖头数: " + vue.toDisplayString(userInfo.poultry_detail.total_count) + "头 ", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 土地面积:" + vue.toDisplayString(userInfo.total_land_area) + "亩 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 公: " + vue.toDisplayString(userInfo.poultry_detail.male_count) + "头 ", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖种类: " + vue.toDisplayString(userInfo.poultry_detail.kind[0]) + "," + vue.toDisplayString(userInfo.poultry_detail.kind[1]), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 母: " + vue.toDisplayString(userInfo.poultry_detail.maternal_count) + "头 ", 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 具体种类: " + vue.toDisplayString(userInfo.poultry_detail.breed[0]), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ ); }; } }; const farmersCard = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-7a12289e"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/poultry/farmersCard.vue"]]); const animalListAPI = (data) => syhttp.get("/PoultryBreed/poultryList", data); const animalEnvDataAPI = (data) => syhttp.get("/PoultryBreed/poultryEnvData", data); const addAnimalAPI = (data) => syhttp.post("/PoultryBreed/addPoultry", data); const actionsAPI = (data) => syhttp.get("/user/actions", data); const animalInfoAPI = (data) => syhttp.get("/PoultryBreed/poultryInfo", data); const animalPicListAPI = (data) => syhttp.get("/PoultryBreed/poultryPicList", data); const addAnimalPicAPI = (data) => syhttp.post("/PoultryBreed/addPoultryPic", data); const poultryInfoAPI = (data) => syhttp.get("/PoultryBreed/poultryInfo", data); const poultryStatusAPI = (data) => syhttp.post("/PoultryBreed/poultryStatus", data); const _sfc_main$16 = { __name: "chick", props: { userInfo: Object }, setup(__props) { const props2 = __props; vue.reactive(props2.userInfo); const data = vue.reactive([ { tit: "环境温度", icon: "WD", dw: "℃", cont: "hj_temp", flag: false }, { tit: "环境湿度", icon: "JYL", dw: "%RH", cont: "hj_humi" }, { tit: "氧气浓度", icon: "FX", cont: "o_content", dw: "%" }, { tit: "二氧化碳含量", icon: "FS", dw: "mg/L", cont: "c_content" }, { tit: "光照强度", icon: "JYL", dw: "lux", cont: "light" }, { tit: "大气压强", icon: "GZ", dw: "hpa", cont: "dqy" }, { tit: "有害气体", icon: "EYHT", cont: "yhqt" } ]); const baseData = vue.reactive({}); const urlFn = (name) => { return `/static/img/${name}.png`; }; const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const animalList = vue.reactive([]); animalListAPI({ user_id: 307, page_no: 1, page_size: 3 }).then((res) => { res.data.forEach((item) => { animalList.push(item); }); formatAppLog("log", "at components/index/chick.vue:237", animalList); }); animalEnvDataAPI({ user_id: 307 }).then((res) => { for (let key in res.data) { baseData[key] = res.data[key]; } }); const actionList = vue.reactive({}); actionsAPI({ type: 2 }).then((res) => { for (let key in res.data) { actionList[key] = res.data[key]; } }); return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n \r\n 农户名称: {{userInfo.name}}\r\n \r\n \r\n \r\n \r\n 种养殖类型: 养殖户\r\n \r\n \r\n 养殖头数: {{userInfo.poultry_detail.total_count}}头\r\n \r\n \r\n \r\n \r\n 土地面积:{{userInfo.total_land_area}}亩\r\n \r\n \r\n 公: {{userInfo.poultry_detail.male_count}}头\r\n \r\n \r\n \r\n \r\n 养殖种类: {{userInfo.poultry_detail.kind[0]}},{{userInfo.poultry_detail.kind[1]}}\r\n \r\n \r\n 母: {{userInfo.poultry_detail.maternal_count}}头\r\n \r\n \r\n \r\n \r\n 具体种类: {{userInfo.poultry_detail.breed[0]}}\r\n \r\n\r\n \r\n '), vue.createVNode(farmersCard), vue.createElementVNode("view", { class: "circumstance" }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode("view", { class: "" }, " 养殖情况 ") ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(animalList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card", key: index2, onClick: ($event) => navgo(`/pages/poultry/feedDetail?id=${item.id}`) }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode( "view", { class: "" }, " 编号: " + vue.toDisplayString(item.code), 1 /* TEXT */ ), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 健康 ")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "", style: { "color": "#FFD736" } }, " 产蛋期 ")) : vue.createCommentVNode("v-if", true), item.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "", style: { "color": "#3274F9" } }, " 可出栏 ")) : vue.createCommentVNode("v-if", true), item.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "", style: { "color": "#F84221" } }, " 生病隔离中 ")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖类型: " + vue.toDisplayString(item.kind), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 年龄: " + vue.toDisplayString(item.age) + "年 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 体重: " + vue.toDisplayString(item.weight) + "kg ", 1 /* TEXT */ ) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "check", onClick: _cache[0] || (_cache[0] = ($event) => navgo("/pages/poultry/feedList")) }, [ vue.createTextVNode(" 查看全部养殖动物"), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ]) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(actionList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "circumstance", key: index2 }, [ vue.createCommentVNode(" {{item.action_record}} "), vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(index2), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "updata-btn", onClick: _cache[1] || (_cache[1] = ($event) => navgo("/pages/growRecord/index?type=2")) }, " 更新" + vue.toDisplayString(index2.slice(0, -2)), 1 /* TEXT */ ) ]), vue.createVNode(myTable, { tit: `查看${index2.slice(0, -2)}`, dataList: item.action_record, route: "/pages/poultry/allRecording" }, null, 8, ["tit", "dataList"]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(` \r \r \r 消毒情况\r \r \r 更新消毒情况\r \r \r \r `), vue.createElementVNode("view", { class: "data" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "justify-content": "space-between", "font-size": "29.79rpx" } }, [ vue.createElementVNode("view", { class: "" }, " 环境监测数据 ") ]), vue.createElementVNode("view", { class: "tit-b" }, [ vue.createVNode(_component_u__image, { src: urlFn("sj"), style: { "margin": "0 5rpx" }, width: "28.04rpx", height: "28.04rpx" }, null, 8, ["src"]), vue.createElementVNode("text", null, "刷新时间: 2022-3-3") ]) ]), vue.createElementVNode("view", { class: "data-cont" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(data, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "data-cont-li center", key: index2 }, [ vue.createElementVNode("view", { style: { "margin": "0 20rpx" } }, [ vue.createElementVNode("view", { class: "center" }, [ vue.createVNode(_component_u__image, { src: urlFn(item.icon), style: { "margin": "0 5rpx" }, width: "38.55rpx", height: "38.54rpx" }, null, 8, ["src"]), vue.createTextVNode( " " + vue.toDisplayString(item.tit), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "b-cls" }, [ vue.createElementVNode( "view", { class: "", style: vue.normalizeStyle({ color: item.flag ? "#0095FF" : "" }) }, [ vue.createElementVNode( "text", { style: { "font-size": "70.09rpx" } }, vue.toDisplayString(baseData[item.cont]), 1 /* TEXT */ ), vue.createTextVNode( vue.toDisplayString(item.dw), 1 /* TEXT */ ) ], 4 /* STYLE */ ), item.flag ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: urlFn("D"), style: { "margin": "0 5rpx" }, width: "31.54rpx", height: "31.54rpx" }, null, 8, ["src"]), vue.createElementVNode("text", { style: { "color": "#0095FF" } }, "5") ])) : vue.createCommentVNode("v-if", true) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]); }; } }; const chick = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-c4e0dba5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/chick.vue"]]); const _sfc_main$15 = { __name: "index", setup(__props) { const userInfoStores = userInfoStore(); const flag2 = vue.ref(1); const scollChangeFn = (index2) => { flag2.value = index2; }; const list = vue.reactive([]); const userInfo = vue.reactive({}); const initUserinfoFn = () => { for (const key in userInfoStores.userInfo) { userInfo[key] = userInfoStores.userInfo[key]; if (key == "land_detail") { list.push({ tit: "土地种植管理", id: 1 }); } else if (key == "animal_detail") { list.push({ tit: "家畜养殖管理", id: 2 }); } else if (key == "poultry_detail") { list.push({ tit: "家禽养殖管理", id: 3 }); } else if (key == "pond_detail") { list.push({ tit: "水产养殖管理", id: 4 }); } } list.sort(function(a2, b2) { return a2.id - b2.id; }); }; initUserinfoFn(); return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode("view", { class: "tabbar" }, [ vue.createElementVNode("view", { class: "", style: { "padding-top": "var(--status-bar-height)" } }), vue.createElementVNode("view", { class: "", style: { "display": "flex" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/FH.png", width: "50.82rpx", height: "50.82rpx", alt: "" }), vue.createElementVNode("view", { class: "scoll-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "scoll-list-li", style: vue.normalizeStyle({ color: flag2.value == item.id ? "white" : "" }), onClick: ($event) => scollChangeFn(item.id) }, vue.toDisplayString(item.tit), 13, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]), vue.createElementVNode("view", { style: { "background-color": "#34D190" } }, [ vue.createElementVNode("view", { class: "", style: { "padding-top": "var(--status-bar-height)" } }), vue.createElementVNode("view", { class: "", style: { "height": "100rpx" } }) ]), vue.createCommentVNode(" 种植户首页 "), flag2.value == 1 ? (vue.openBlock(), vue.createBlock(planting, { key: 0, userInfo }, null, 8, ["userInfo"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 养猪的 "), flag2.value == 2 ? (vue.openBlock(), vue.createBlock(cultivation, { key: 1, userInfo }, null, 8, ["userInfo"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 养鸡的 "), flag2.value == 3 ? (vue.openBlock(), vue.createBlock(chick, { key: 2, userInfo }, null, 8, ["userInfo"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 卖鱼的首页 "), flag2.value == 4 ? (vue.openBlock(), vue.createBlock(fishing, { key: 3, userInfo }, null, 8, ["userInfo"])) : vue.createCommentVNode("v-if", true) ]); }; } }; const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/index/index.vue"]]); const props$e = { props: { // 绑定的值 modelValue: { type: [String, Number], default: props$i.input.value }, // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数 // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序 // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序 // text-文本输入键盘 type: { type: String, default: props$i.input.type }, // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true, // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 fixed: { type: Boolean, default: props$i.input.fixed }, // 是否禁用输入框 disabled: { type: Boolean, default: props$i.input.disabled }, // 禁用状态时的背景色 disabledColor: { type: String, default: props$i.input.disabledColor }, // 是否显示清除控件 clearable: { type: Boolean, default: props$i.input.clearable }, // 是否密码类型 password: { type: Boolean, default: props$i.input.password }, // 最大输入长度,设置为 -1 的时候不限制最大长度 maxlength: { type: [String, Number], default: props$i.input.maxlength }, // 输入框为空时的占位符 placeholder: { type: String, default: props$i.input.placeholder }, // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ placeholderClass: { type: String, default: props$i.input.placeholderClass }, // 指定placeholder的样式 placeholderStyle: { type: [String, Object], default: props$i.input.placeholderStyle }, // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效 showWordLimit: { type: Boolean, default: props$i.input.showWordLimit }, // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档 // https://uniapp.dcloud.io/component/input // https://uniapp.dcloud.io/component/textarea confirmType: { type: String, default: props$i.input.confirmType }, // 点击键盘右下角按钮时是否保持键盘不收起,H5无效 confirmHold: { type: Boolean, default: props$i.input.confirmHold }, // focus时,点击页面的时候不收起键盘,微信小程序有效 holdKeyboard: { type: Boolean, default: props$i.input.holdKeyboard }, // 自动获取焦点 // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 focus: { type: Boolean, default: props$i.input.focus }, // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效 autoBlur: { type: Boolean, default: props$i.input.autoBlur }, // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效 disableDefaultPadding: { type: Boolean, default: props$i.input.disableDefaultPadding }, // 指定focus时光标的位置 cursor: { type: [String, Number], default: props$i.input.cursor }, // 输入框聚焦时底部与键盘的距离 cursorSpacing: { type: [String, Number], default: props$i.input.cursorSpacing }, // 光标起始位置,自动聚集时有效,需与selection-end搭配使用 selectionStart: { type: [String, Number], default: props$i.input.selectionStart }, // 光标结束位置,自动聚集时有效,需与selection-start搭配使用 selectionEnd: { type: [String, Number], default: props$i.input.selectionEnd }, // 键盘弹起时,是否自动上推页面 adjustPosition: { type: Boolean, default: props$i.input.adjustPosition }, // 输入框内容对齐方式,可选值为:left|center|right inputAlign: { type: String, default: props$i.input.inputAlign }, // 输入框字体的大小 fontSize: { type: [String, Number], default: props$i.input.fontSize }, // 输入框字体颜色 color: { type: String, default: props$i.input.color }, // 输入框前置图标 prefixIcon: { type: String, default: props$i.input.prefixIcon }, // 前置图标样式,对象或字符串 prefixIconStyle: { type: [String, Object], default: props$i.input.prefixIconStyle }, // 输入框后置图标 suffixIcon: { type: String, default: props$i.input.suffixIcon }, // 后置图标样式,对象或字符串 suffixIconStyle: { type: [String, Object], default: props$i.input.suffixIconStyle }, // 边框类型,surround-四周边框,bottom-底部边框,none-无边框 border: { type: String, default: props$i.input.border }, // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 readonly: { type: Boolean, default: props$i.input.readonly }, // 输入框形状,circle-圆形,square-方形 shape: { type: String, default: props$i.input.shape }, // 用于处理或者过滤输入框内容的方法 formatter: { type: [Function, null], default: props$i.input.formatter }, // 是否忽略组件内对文本合成系统事件的处理 ignoreCompositionEvent: { type: Boolean, default: true } } }; const _sfc_main$14 = { name: "u-input", mixins: [mpMixin, mixin, props$e], data() { return { // 输入框的值 innerValue: "", // 是否处于获得焦点状态 focused: false, // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化 firstChange: true, // value绑定值的变化是由内部还是外部引起的 changeFromInner: false, // 过滤处理方法 innerFormatter: (value) => value }; }, watch: { modelValue: { immediate: true, handler(newVal, oldVal) { this.innerValue = newVal; this.firstChange = false; this.changeFromInner = false; } } }, computed: { // 是否显示清除控件 isShowClear() { const { clearable, readonly, focused, innerValue } = this; return !!clearable && !readonly && !!focused && innerValue !== ""; }, // 组件的类名 inputClass() { let classes = [], { border, disabled, shape } = this; border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"])); classes.push(`u-input--${shape}`); border === "bottom" && (classes = classes.concat([ "u-border-bottom", "u-input--no-radius" ])); return classes.join(" "); }, // 组件的样式 wrapperStyle() { const style = {}; if (this.disabled) { style.backgroundColor = this.disabledColor; } if (this.border === "none") { style.padding = "0"; } else { style.paddingTop = "6px"; style.paddingBottom = "6px"; style.paddingLeft = "9px"; style.paddingRight = "9px"; } return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); }, // 输入框的样式 inputStyle() { const style = { color: this.color, fontSize: uni.$u.addUnit(this.fontSize), textAlign: this.inputAlign }; return style; } }, emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"], methods: { // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 setFormatter(e2) { this.innerFormatter = e2; }, // 当键盘输入时,触发input事件 onInput(e2) { let { value = "" } = e2.detail || {}; const formatter = this.formatter || this.innerFormatter; const formatValue = formatter(value); this.innerValue = value; this.$nextTick(() => { this.innerValue = formatValue; this.valueChange(); }); }, // 输入框失去焦点时触发 onBlur(event) { this.$emit("blur", event.detail.value); uni.$u.sleep(50).then(() => { this.focused = false; }); uni.$u.formValidate(this, "blur"); }, // 输入框聚焦时触发 onFocus(event) { this.focused = true; this.$emit("focus"); }, // 点击完成按钮时触发 onConfirm(event) { this.$emit("confirm", this.innerValue); }, // 键盘高度发生变化的时候触发此事件 // 兼容性:微信小程序2.7.0+、App 3.1.0+ onkeyboardheightchange(event) { this.$emit("keyboardheightchange", event); }, // 内容发生变化,进行处理 valueChange() { const value = this.innerValue; this.$nextTick(() => { this.$emit("update:modelValue", value); this.changeFromInner = true; this.$emit("change", value); uni.$u.formValidate(this, "change"); }); }, // 点击清除控件 onClear() { this.innerValue = ""; this.$nextTick(() => { this.valueChange(); this.$emit("clear"); }); }, /** * 在安卓nvue上,事件无法冒泡 * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后 * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发 */ clickHandler() { } } }; function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-input", $options.inputClass]), style: vue.normalizeStyle([$options.wrapperStyle]) }, [ vue.createElementVNode("view", { class: "u-input__content" }, [ _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-input__content__prefix-icon" }, [ vue.renderSlot(_ctx.$slots, "prefix", {}, () => [ vue.createVNode(_component_u_icon, { name: _ctx.prefixIcon, size: "18", customStyle: _ctx.prefixIconStyle }, null, 8, ["name", "customStyle"]) ], true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-input__content__field-wrapper", onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\n "), vue.createElementVNode("input", { class: "u-input__content__field-wrapper__field", style: vue.normalizeStyle([$options.inputStyle]), type: _ctx.type, focus: _ctx.focus, cursor: _ctx.cursor, value: $data.innerValue, "auto-blur": _ctx.autoBlur, disabled: _ctx.disabled || _ctx.readonly, maxlength: _ctx.maxlength, placeholder: _ctx.placeholder, "placeholder-style": _ctx.placeholderStyle, "placeholder-class": _ctx.placeholderClass, "confirm-type": _ctx.confirmType, "confirm-hold": _ctx.confirmHold, "hold-keyboard": _ctx.holdKeyboard, "cursor-spacing": _ctx.cursorSpacing, "adjust-position": _ctx.adjustPosition, "selection-end": _ctx.selectionEnd, "selection-start": _ctx.selectionStart, password: _ctx.password || _ctx.type === "password" || void 0, ignoreCompositionEvent: _ctx.ignoreCompositionEvent, onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)), onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)), onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)), onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)), onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args)) }, null, 44, ["type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent"]) ]), $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-input__content__clear", onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args)) }, [ vue.createVNode(_component_u_icon, { name: "close", size: "11", color: "#ffffff", customStyle: "line-height: 12px" }) ])) : vue.createCommentVNode("v-if", true), _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-input__content__subfix-icon" }, [ vue.renderSlot(_ctx.$slots, "suffix", {}, () => [ vue.createVNode(_component_u_icon, { name: _ctx.suffixIcon, size: "18", customStyle: _ctx.suffixIconStyle }, null, 8, ["name", "customStyle"]) ], true) ])) : vue.createCommentVNode("v-if", true) ]) ], 6 /* CLASS, STYLE */ ); } const __easycom_1$7 = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$r], ["__scopeId", "data-v-5904192e"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-input/u-input.vue"]]); const props$d = { props: { // 是否显示组件 show: { type: Boolean, default: props$i.loadingIcon.show }, // 颜色 color: { type: String, default: props$i.loadingIcon.color }, // 提示文字颜色 textColor: { type: String, default: props$i.loadingIcon.textColor }, // 文字和图标是否垂直排列 vertical: { type: Boolean, default: props$i.loadingIcon.vertical }, // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 mode: { type: String, default: props$i.loadingIcon.mode }, // 图标大小,单位默认px size: { type: [String, Number], default: props$i.loadingIcon.size }, // 文字大小 textSize: { type: [String, Number], default: props$i.loadingIcon.textSize }, // 文字内容 text: { type: [String, Number], default: props$i.loadingIcon.text }, // 动画模式 timingFunction: { type: String, default: props$i.loadingIcon.timingFunction }, // 动画执行周期时间 duration: { type: [String, Number], default: props$i.loadingIcon.duration }, // mode=circle时的暗边颜色 inactiveColor: { type: String, default: props$i.loadingIcon.inactiveColor } } }; const _sfc_main$13 = { name: "u-loading-icon", mixins: [mpMixin, mixin, props$d], data() { return { // Array.form可以通过一个伪数组对象创建指定长度的数组 // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from array12: Array.from({ length: 12 }), // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行 // 在iOS nvue上,则会一开始默认执行两个周期的动画 aniAngel: 360, // 动画旋转角度 webviewHide: false, // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗 loading: false // 是否运行中,针对nvue使用 }; }, computed: { // 当为circle类型时,给其另外三边设置一个更轻一些的颜色 // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色 // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好) otherBorderColor() { const lightColor = uni.$u.colorGradient(this.color, "#ffffff", 100)[80]; if (this.mode === "circle") { return this.inactiveColor ? this.inactiveColor : lightColor; } else { return "transparent"; } } }, watch: { show(n2) { } }, mounted() { this.init(); }, methods: { init() { setTimeout(() => { this.show && this.addEventListenerToWebview(); }, 20); }, // 监听webview的显示与隐藏 addEventListenerToWebview() { const pages2 = getCurrentPages(); const page2 = pages2[pages2.length - 1]; const currentWebview = page2.$getAppWebview(); currentWebview.addEventListener("hide", () => { this.webviewHide = true; }); currentWebview.addEventListener("show", () => { this.webviewHide = false; }); } } }; function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]), style: vue.normalizeStyle([_ctx.$u.addStyle(_ctx.customStyle)]) }, [ !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]), ref: "ani", style: vue.normalizeStyle({ color: _ctx.color, width: _ctx.$u.addUnit(_ctx.size), height: _ctx.$u.addUnit(_ctx.size), borderTopColor: _ctx.color, borderBottomColor: $options.otherBorderColor, borderLeftColor: $options.otherBorderColor, borderRightColor: $options.otherBorderColor, "animation-duration": `${_ctx.duration}ms`, "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : "" }) }, [ _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.array12, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "u-loading-icon__dot" }); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-loading-icon__text", style: vue.normalizeStyle({ fontSize: _ctx.$u.addUnit(_ctx.textSize), color: _ctx.textColor }) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_1$6 = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$q], ["__scopeId", "data-v-00752c6d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]); const props$c = { props: { // 是否细边框 hairline: { type: Boolean, default: props$i.button.hairline }, // 按钮的预置样式,info,primary,error,warning,success type: { type: String, default: props$i.button.type }, // 按钮尺寸,large,normal,small,mini size: { type: String, default: props$i.button.size }, // 按钮形状,circle(两边为半圆),square(带圆角) shape: { type: String, default: props$i.button.shape }, // 按钮是否镂空 plain: { type: Boolean, default: props$i.button.plain }, // 是否禁止状态 disabled: { type: Boolean, default: props$i.button.disabled }, // 是否加载中 loading: { type: Boolean, default: props$i.button.loading }, // 加载中提示文字 loadingText: { type: [String, Number], default: props$i.button.loadingText }, // 加载状态图标类型 loadingMode: { type: String, default: props$i.button.loadingMode }, // 加载图标大小 loadingSize: { type: [String, Number], default: props$i.button.loadingSize }, // 开放能力,具体请看uniapp稳定关于button组件部分说明 // https://uniapp.dcloud.io/component/button openType: { type: String, default: props$i.button.openType }, // 用于
组件,点击分别会触发 组件的 submit/reset 事件 // 取值为submit(提交表单),reset(重置表单) formType: { type: String, default: props$i.button.formType }, // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 // 只微信小程序、QQ小程序有效 appParameter: { type: String, default: props$i.button.appParameter }, // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效 hoverStopPropagation: { type: Boolean, default: props$i.button.hoverStopPropagation }, // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效 lang: { type: String, default: props$i.button.lang }, // 会话来源,open-type="contact"时有效。只微信小程序有效 sessionFrom: { type: String, default: props$i.button.sessionFrom }, // 会话内消息卡片标题,open-type="contact"时有效 // 默认当前标题,只微信小程序有效 sendMessageTitle: { type: String, default: props$i.button.sendMessageTitle }, // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 // 默认当前分享路径,只微信小程序有效 sendMessagePath: { type: String, default: props$i.button.sendMessagePath }, // 会话内消息卡片图片,open-type="contact"时有效 // 默认当前页面截图,只微信小程序有效 sendMessageImg: { type: String, default: props$i.button.sendMessageImg }, // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示, // 用户点击后可以快速发送小程序消息,open-type="contact"时有效 showMessageCard: { type: Boolean, default: props$i.button.showMessageCard }, // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取 dataName: { type: String, default: props$i.button.dataName }, // 节流,一定时间内只能触发一次 throttleTime: { type: [String, Number], default: props$i.button.throttleTime }, // 按住后多久出现点击态,单位毫秒 hoverStartTime: { type: [String, Number], default: props$i.button.hoverStartTime }, // 手指松开后点击态保留时间,单位毫秒 hoverStayTime: { type: [String, Number], default: props$i.button.hoverStayTime }, // 按钮文字,之所以通过props传入,是因为slot传入的话 // nvue中无法控制文字的样式 text: { type: [String, Number], default: props$i.button.text }, // 按钮图标 icon: { type: String, default: props$i.button.icon }, // 按钮图标 iconColor: { type: String, default: props$i.button.icon }, // 按钮颜色,支持传入linear-gradient渐变色 color: { type: String, default: props$i.button.color } } }; const _sfc_main$12 = { name: "u-button", mixins: [mpMixin, mixin, props$c], data() { return {}; }, computed: { // 生成bem风格的类名 bemClass() { if (!this.color) { return this.bem( "button", ["type", "shape", "size"], ["disabled", "plain", "hairline"] ); } else { return this.bem( "button", ["shape", "size"], ["disabled", "plain", "hairline"] ); } }, loadingColor() { if (this.plain) { return this.color ? this.color : uni.$u.config.color[`u-${this.type}`]; } if (this.type === "info") { return "#c9c9c9"; } return "rgb(200, 200, 200)"; }, iconColorCom() { if (this.iconColor) return this.iconColor; if (this.plain) { return this.color ? this.color : this.type; } else { return this.type === "info" ? "#000000" : "#ffffff"; } }, baseColor() { let style = {}; if (this.color) { style.color = this.plain ? this.color : "white"; if (!this.plain) { style["background-color"] = this.color; } if (this.color.indexOf("gradient") !== -1) { style.borderTopWidth = 0; style.borderRightWidth = 0; style.borderBottomWidth = 0; style.borderLeftWidth = 0; if (!this.plain) { style.backgroundImage = this.color; } } else { style.borderColor = this.color; style.borderWidth = "1px"; style.borderStyle = "solid"; } } return style; }, // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置 nvueTextStyle() { let style = {}; if (this.type === "info") { style.color = "#323233"; } if (this.color) { style.color = this.plain ? this.color : "white"; } style.fontSize = this.textSize + "px"; return style; }, // 字体大小 textSize() { let fontSize = 14, { size } = this; if (size === "large") fontSize = 16; if (size === "normal") fontSize = 14; if (size === "small") fontSize = 12; if (size === "mini") fontSize = 10; return fontSize; } }, emits: [ "click", "getphonenumber", "getuserinfo", "error", "opensetting", "launchapp" ], methods: { clickHandler() { if (!this.disabled && !this.loading) { uni.$u.throttle(() => { this.$emit("click"); }, this.throttleTime); } }, // 下面为对接uniapp官方按钮开放能力事件回调的对接 getphonenumber(res) { this.$emit("getphonenumber", res); }, getuserinfo(res) { this.$emit("getuserinfo", res); }, error(res) { this.$emit("error", res); }, opensetting(res) { this.$emit("opensetting", res); }, launchapp(res) { this.$emit("launchapp", res); } } }; function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_1$6); const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7); return vue.openBlock(), vue.createElementBlock("button", { "hover-start-time": Number(_ctx.hoverStartTime), "hover-stay-time": Number(_ctx.hoverStayTime), "form-type": _ctx.formType, "open-type": _ctx.openType, "app-parameter": _ctx.appParameter, "hover-stop-propagation": _ctx.hoverStopPropagation, "send-message-title": _ctx.sendMessageTitle, "send-message-path": _ctx.sendMessagePath, lang: _ctx.lang, "data-name": _ctx.dataName, "session-from": _ctx.sessionFrom, "send-message-img": _ctx.sendMessageImg, "show-message-card": _ctx.showMessageCard, onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.getphonenumber && $options.getphonenumber(...args)), onGetuserinfo: _cache[1] || (_cache[1] = (...args) => $options.getuserinfo && $options.getuserinfo(...args)), onError: _cache[2] || (_cache[2] = (...args) => $options.error && $options.error(...args)), onOpensetting: _cache[3] || (_cache[3] = (...args) => $options.opensetting && $options.opensetting(...args)), onLaunchapp: _cache[4] || (_cache[4] = (...args) => $options.launchapp && $options.launchapp(...args)), "hover-class": !_ctx.disabled && !_ctx.loading ? "u-button--active" : "", class: vue.normalizeClass(["u-button u-reset-button", $options.bemClass]), style: vue.normalizeStyle([$options.baseColor, _ctx.$u.addStyle(_ctx.customStyle)]), onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ _ctx.loading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createVNode(_component_u_loading_icon, { mode: _ctx.loadingMode, size: _ctx.loadingSize * 1.15, color: $options.loadingColor }, null, 8, ["mode", "size", "color"]), vue.createElementVNode( "text", { class: "u-button__loading-text", style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }]) }, vue.toDisplayString(_ctx.loadingText || _ctx.text), 5 /* TEXT, STYLE */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: _ctx.icon, color: $options.iconColorCom, size: $options.textSize * 1.35, customStyle: { marginRight: "2px" } }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: "u-button__text", style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }]) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ ) ], true) ], 64 /* STABLE_FRAGMENT */ )) ], 46, ["hover-start-time", "hover-stay-time", "form-type", "open-type", "app-parameter", "hover-stop-propagation", "send-message-title", "send-message-path", "lang", "data-name", "session-from", "send-message-img", "show-message-card", "hover-class"]); } const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$p], ["__scopeId", "data-v-461e713c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-button/u-button.vue"]]); const props$b = { props: { // 是否显示遮罩 show: { type: Boolean, default: props$i.overlay.show }, // 层级z-index zIndex: { type: [String, Number], default: props$i.overlay.zIndex }, // 遮罩的过渡时间,单位为ms duration: { type: [String, Number], default: props$i.overlay.duration }, // 不透明度值,当做rgba的第四个参数 opacity: { type: [String, Number], default: props$i.overlay.opacity } } }; const _sfc_main$11 = { name: "u-overlay", mixins: [mpMixin, mixin, props$b], computed: { overlayStyle() { const style = { position: "fixed", top: 0, left: 0, right: 0, zIndex: this.zIndex, bottom: 0, "background-color": `rgba(0, 0, 0, ${this.opacity})` }; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } }, emits: ["click"], methods: { clickHandler() { this.$emit("click"); } } }; function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_4$1); return vue.openBlock(), vue.createBlock(_component_u_transition, { show: _ctx.show, "custom-class": "u-overlay", duration: _ctx.duration, "custom-style": $options.overlayStyle, onClick: $options.clickHandler }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), _: 3 /* FORWARDED */ }, 8, ["show", "duration", "custom-style", "onClick"]); } const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$o], ["__scopeId", "data-v-35f7c3e5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-overlay/u-overlay.vue"]]); const props$a = { props: { bgColor: { type: String, default: props$i.statusBar.bgColor } } }; const _sfc_main$10 = { name: "u-status-bar", mixins: [mpMixin, mixin, props$a], data() { return {}; }, computed: { style() { const style = {}; style.height = uni.$u.addUnit(uni.$u.sys().statusBarHeight, "px"); style.backgroundColor = this.bgColor; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } } }; function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle([$options.style]), class: "u-status-bar" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ); } const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$n], ["__scopeId", "data-v-c0b45a48"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]); const props$9 = { props: {} }; const _sfc_main$$ = { name: "u-safe-bottom", mixins: [mpMixin, mixin, props$9], data() { return { safeAreaBottomHeight: 0, isNvue: false }; }, computed: { style() { const style = {}; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } }, mounted() { } }; function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]), style: vue.normalizeStyle([$options.style]) }, null, 6 /* CLASS, STYLE */ ); } const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$m], ["__scopeId", "data-v-3ec581de"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]); const props$8 = { props: { // 是否展示弹窗 show: { type: Boolean, default: props$i.popup.show }, // 是否显示遮罩 overlay: { type: Boolean, default: props$i.popup.overlay }, // 弹出的方向,可选值为 top bottom right left center mode: { type: String, default: props$i.popup.mode }, // 动画时长,单位ms duration: { type: [String, Number], default: props$i.popup.duration }, // 是否显示关闭图标 closeable: { type: Boolean, default: props$i.popup.closeable }, // 自定义遮罩的样式 overlayStyle: { type: [Object, String], default: props$i.popup.overlayStyle }, // 点击遮罩是否关闭弹窗 closeOnClickOverlay: { type: Boolean, default: props$i.popup.closeOnClickOverlay }, // 层级 zIndex: { type: [String, Number], default: props$i.popup.zIndex }, // 是否为iPhoneX留出底部安全距离 safeAreaInsetBottom: { type: Boolean, default: props$i.popup.safeAreaInsetBottom }, // 是否留出顶部安全距离(状态栏高度) safeAreaInsetTop: { type: Boolean, default: props$i.popup.safeAreaInsetTop }, // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角 closeIconPos: { type: String, default: props$i.popup.closeIconPos }, // 是否显示圆角 round: { type: [Boolean, String, Number], default: props$i.popup.round }, // mode=center,也即中部弹出时,是否使用缩放模式 zoom: { type: Boolean, default: props$i.popup.zoom }, // 弹窗背景色,设置为transparent可去除白色背景 bgColor: { type: String, default: props$i.popup.bgColor }, // 遮罩的透明度,0-1之间 overlayOpacity: { type: [Number, String], default: props$i.popup.overlayOpacity } } }; const _sfc_main$_ = { name: "u-popup", mixins: [mpMixin, mixin, props$8], data() { return { overlayDuration: this.duration + 50 }; }, watch: { show(newValue, oldValue) { } }, computed: { transitionStyle() { const style = { zIndex: this.zIndex, position: "fixed", display: "flex" }; style[this.mode] = 0; if (this.mode === "left") { return uni.$u.deepMerge(style, { bottom: 0, top: 0 }); } else if (this.mode === "right") { return uni.$u.deepMerge(style, { bottom: 0, top: 0 }); } else if (this.mode === "top") { return uni.$u.deepMerge(style, { left: 0, right: 0 }); } else if (this.mode === "bottom") { return uni.$u.deepMerge(style, { left: 0, right: 0 }); } else if (this.mode === "center") { return uni.$u.deepMerge(style, { alignItems: "center", "justify-content": "center", top: 0, left: 0, right: 0, bottom: 0 }); } }, contentStyle() { const style = {}; uni.$u.sys(); if (this.mode !== "center") { style.flex = 1; } if (this.bgColor) { style.backgroundColor = this.bgColor; } if (this.round) { const value = uni.$u.addUnit(this.round); if (this.mode === "top") { style.borderBottomLeftRadius = value; style.borderBottomRightRadius = value; } else if (this.mode === "bottom") { style.borderTopLeftRadius = value; style.borderTopRightRadius = value; } else if (this.mode === "center") { style.borderRadius = value; } } return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); }, position() { if (this.mode === "center") { return this.zoom ? "fade-zoom" : "fade"; } if (this.mode === "left") { return "slide-left"; } if (this.mode === "right") { return "slide-right"; } if (this.mode === "bottom") { return "slide-up"; } if (this.mode === "top") { return "slide-down"; } } }, emits: ["open", "close", "click"], methods: { // 点击遮罩 overlayClick() { if (this.closeOnClickOverlay) { this.$emit("close"); } }, close(e2) { this.$emit("close"); }, afterEnter() { this.$emit("open"); }, clickHandler() { if (this.mode === "center") { this.overlayClick(); } this.$emit("click"); } } }; function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$3); const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_1$5); const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7); const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_3$1); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_4$1); return vue.openBlock(), vue.createElementBlock("view", { class: "u-popup" }, [ _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, { key: 0, show: _ctx.show, onClick: $options.overlayClick, duration: $data.overlayDuration, customStyle: _ctx.overlayStyle, opacity: _ctx.overlayOpacity }, null, 8, ["show", "onClick", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_transition, { show: _ctx.show, customStyle: $options.transitionStyle, mode: $options.position, duration: _ctx.duration, onAfterEnter: $options.afterEnter, onClick: $options.clickHandler }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "u-popup__content", style: vue.normalizeStyle([$options.contentStyle]), onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"])) }, [ _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), _ctx.closeable ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])), class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]), "hover-class": "u-popup__content__close--hover", "hover-stay-time": "150" }, [ vue.createVNode(_component_u_icon, { name: "close", color: "#909399", size: "18", bold: "" }) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"]) ]); } const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$l], ["__scopeId", "data-v-74921bef"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-popup/u-popup.vue"]]); const _sfc_main$Z = { name: "u-calendar-header", mixins: [mpMixin, mixin], props: { // 标题 title: { type: String, default: "" }, // 副标题 subtitle: { type: String, default: "" }, // 是否显示标题 showTitle: { type: Boolean, default: true }, // 是否显示副标题 showSubtitle: { type: Boolean, default: true } }, data() { return {}; }, methods: { name() { } } }; function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-calendar-header u-border-bottom" }, [ $props.showTitle ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-calendar-header__title" }, vue.toDisplayString($props.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $props.showSubtitle ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-calendar-header__subtitle" }, vue.toDisplayString($props.subtitle), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-calendar-header__weekdays" }, [ vue.createElementVNode("text", { class: "u-calendar-header__weekdays__weekday" }, "一"), vue.createElementVNode("text", { class: "u-calendar-header__weekdays__weekday" }, "二"), vue.createElementVNode("text", { class: "u-calendar-header__weekdays__weekday" }, "三"), vue.createElementVNode("text", { class: "u-calendar-header__weekdays__weekday" }, "四"), vue.createElementVNode("text", { class: "u-calendar-header__weekdays__weekday" }, "五"), vue.createElementVNode("text", { class: "u-calendar-header__weekdays__weekday" }, "六"), vue.createElementVNode("text", { class: "u-calendar-header__weekdays__weekday" }, "日") ]) ]); } const uHeader = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$k], ["__scopeId", "data-v-31c8bd61"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-calendar/header.vue"]]); var SECONDS_A_MINUTE = 60; var SECONDS_A_HOUR = SECONDS_A_MINUTE * 60; var SECONDS_A_DAY = SECONDS_A_HOUR * 24; var SECONDS_A_WEEK = SECONDS_A_DAY * 7; var MILLISECONDS_A_SECOND = 1e3; var MILLISECONDS_A_MINUTE = SECONDS_A_MINUTE * MILLISECONDS_A_SECOND; var MILLISECONDS_A_HOUR = SECONDS_A_HOUR * MILLISECONDS_A_SECOND; var MILLISECONDS_A_DAY = SECONDS_A_DAY * MILLISECONDS_A_SECOND; var MILLISECONDS_A_WEEK = SECONDS_A_WEEK * MILLISECONDS_A_SECOND; var MS = "millisecond"; var S$1 = "second"; var MIN = "minute"; var H$1 = "hour"; var D$1 = "day"; var W$1 = "week"; var M$1 = "month"; var Q$1 = "quarter"; var Y$1 = "year"; var DATE = "date"; var FORMAT_DEFAULT = "YYYY-MM-DDTHH:mm:ssZ"; var INVALID_DATE_STRING = "Invalid Date"; var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/; var REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g; const en = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function ordinal(n2) { var s2 = ["th", "st", "nd", "rd"]; var v2 = n2 % 100; return "[" + n2 + (s2[(v2 - 20) % 10] || s2[v2] || s2[0]) + "]"; } }; var padStart = function padStart2(string2, length, pad) { var s2 = String(string2); if (!s2 || s2.length >= length) return string2; return "" + Array(length + 1 - s2.length).join(pad) + string2; }; var padZoneStr = function padZoneStr2(instance) { var negMinutes = -instance.utcOffset(); var minutes = Math.abs(negMinutes); var hourOffset = Math.floor(minutes / 60); var minuteOffset = minutes % 60; return (negMinutes <= 0 ? "+" : "-") + padStart(hourOffset, 2, "0") + ":" + padStart(minuteOffset, 2, "0"); }; var monthDiff = function monthDiff2(a2, b2) { if (a2.date() < b2.date()) return -monthDiff2(b2, a2); var wholeMonthDiff = (b2.year() - a2.year()) * 12 + (b2.month() - a2.month()); var anchor = a2.clone().add(wholeMonthDiff, M$1); var c2 = b2 - anchor < 0; var anchor2 = a2.clone().add(wholeMonthDiff + (c2 ? -1 : 1), M$1); return +(-(wholeMonthDiff + (b2 - anchor) / (c2 ? anchor - anchor2 : anchor2 - anchor)) || 0); }; var absFloor = function absFloor2(n2) { return n2 < 0 ? Math.ceil(n2) || 0 : Math.floor(n2); }; var prettyUnit = function prettyUnit2(u2) { var special = { M: M$1, y: Y$1, w: W$1, d: D$1, D: DATE, h: H$1, m: MIN, s: S$1, ms: MS, Q: Q$1 }; return special[u2] || String(u2 || "").toLowerCase().replace(/s$/, ""); }; var isUndefined$1 = function isUndefined2(s2) { return s2 === void 0; }; const U$1 = { s: padStart, z: padZoneStr, m: monthDiff, a: absFloor, p: prettyUnit, u: isUndefined$1 }; var L$1 = "en"; var Ls$1 = {}; Ls$1[L$1] = en; var IS_DAYJS = "$isDayjsObject"; var isDayjs = function isDayjs2(d2) { return d2 instanceof Dayjs || !!(d2 && d2[IS_DAYJS]); }; var parseLocale = function parseLocale2(preset, object2, isLocal) { var l2; if (!preset) return L$1; if (typeof preset === "string") { var presetLower = preset.toLowerCase(); if (Ls$1[presetLower]) { l2 = presetLower; } if (object2) { Ls$1[presetLower] = object2; l2 = presetLower; } var presetSplit = preset.split("-"); if (!l2 && presetSplit.length > 1) { return parseLocale2(presetSplit[0]); } } else { var name = preset.name; Ls$1[name] = preset; l2 = name; } if (!isLocal && l2) L$1 = l2; return l2 || !isLocal && L$1; }; var dayjs = function dayjs2(date2, c2) { if (isDayjs(date2)) { return date2.clone(); } var cfg = typeof c2 === "object" ? c2 : {}; cfg.date = date2; cfg.args = arguments; return new Dayjs(cfg); }; var wrapper = function wrapper2(date2, instance) { return dayjs(date2, { locale: instance.$L, utc: instance.$u, x: instance.$x, $offset: instance.$offset // todo: refactor; do not use this.$offset in you code }); }; var Utils = U$1; Utils.l = parseLocale; Utils.i = isDayjs; Utils.w = wrapper; var parseDate = function parseDate2(cfg) { var date2 = cfg.date, utc = cfg.utc; if (date2 === null) return /* @__PURE__ */ new Date(NaN); if (Utils.u(date2)) return /* @__PURE__ */ new Date(); if (date2 instanceof Date) return new Date(date2); if (typeof date2 === "string" && !/Z$/i.test(date2)) { var d2 = date2.match(REGEX_PARSE); if (d2) { var m2 = d2[2] - 1 || 0; var ms2 = (d2[7] || "0").substring(0, 3); if (utc) { return new Date(Date.UTC(d2[1], m2, d2[3] || 1, d2[4] || 0, d2[5] || 0, d2[6] || 0, ms2)); } return new Date(d2[1], m2, d2[3] || 1, d2[4] || 0, d2[5] || 0, d2[6] || 0, ms2); } } return new Date(date2); }; var Dayjs = /* @__PURE__ */ function() { function Dayjs2(cfg) { this.$L = parseLocale(cfg.locale, null, true); this.parse(cfg); this.$x = this.$x || cfg.x || {}; this[IS_DAYJS] = true; } var _proto = Dayjs2.prototype; _proto.parse = function parse(cfg) { this.$d = parseDate(cfg); this.init(); }; _proto.init = function init() { var $d = this.$d; this.$y = $d.getFullYear(); this.$M = $d.getMonth(); this.$D = $d.getDate(); this.$W = $d.getDay(); this.$H = $d.getHours(); this.$m = $d.getMinutes(); this.$s = $d.getSeconds(); this.$ms = $d.getMilliseconds(); }; _proto.$utils = function $utils() { return Utils; }; _proto.isValid = function isValid() { return !(this.$d.toString() === INVALID_DATE_STRING); }; _proto.isSame = function isSame(that, units) { var other = dayjs(that); return this.startOf(units) <= other && other <= this.endOf(units); }; _proto.isAfter = function isAfter(that, units) { return dayjs(that) < this.startOf(units); }; _proto.isBefore = function isBefore(that, units) { return this.endOf(units) < dayjs(that); }; _proto.$g = function $g(input, get, set2) { if (Utils.u(input)) return this[get]; return this.set(set2, input); }; _proto.unix = function unix() { return Math.floor(this.valueOf() / 1e3); }; _proto.valueOf = function valueOf() { return this.$d.getTime(); }; _proto.startOf = function startOf(units, _startOf) { var _this = this; var isStartOf = !Utils.u(_startOf) ? _startOf : true; var unit = Utils.p(units); var instanceFactory = function instanceFactory2(d2, m2) { var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m2, d2) : new Date(_this.$y, m2, d2), _this); return isStartOf ? ins : ins.endOf(D$1); }; var instanceFactorySet = function instanceFactorySet2(method, slice) { var argumentStart = [0, 0, 0, 0]; var argumentEnd = [23, 59, 59, 999]; return Utils.w(_this.toDate()[method].apply( // eslint-disable-line prefer-spread _this.toDate("s"), (isStartOf ? argumentStart : argumentEnd).slice(slice) ), _this); }; var $W = this.$W, $M = this.$M, $D = this.$D; var utcPad = "set" + (this.$u ? "UTC" : ""); switch (unit) { case Y$1: return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11); case M$1: return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1); case W$1: { var weekStart = this.$locale().weekStart || 0; var gap = ($W < weekStart ? $W + 7 : $W) - weekStart; return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M); } case D$1: case DATE: return instanceFactorySet(utcPad + "Hours", 0); case H$1: return instanceFactorySet(utcPad + "Minutes", 1); case MIN: return instanceFactorySet(utcPad + "Seconds", 2); case S$1: return instanceFactorySet(utcPad + "Milliseconds", 3); default: return this.clone(); } }; _proto.endOf = function endOf(arg) { return this.startOf(arg, false); }; _proto.$set = function $set(units, _int) { var _C$D$C$DATE$C$M$C$Y$C; var unit = Utils.p(units); var utcPad = "set" + (this.$u ? "UTC" : ""); var name = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C[D$1] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[M$1] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[Y$1] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[H$1] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[S$1] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit]; var arg = unit === D$1 ? this.$D + (_int - this.$W) : _int; if (unit === M$1 || unit === Y$1) { var date2 = this.clone().set(DATE, 1); date2.$d[name](arg); date2.init(); this.$d = date2.set(DATE, Math.min(this.$D, date2.daysInMonth())).$d; } else if (name) this.$d[name](arg); this.init(); return this; }; _proto.set = function set2(string2, _int2) { return this.clone().$set(string2, _int2); }; _proto.get = function get(unit) { return this[Utils.p(unit)](); }; _proto.add = function add(number2, units) { var _this2 = this, _C$MIN$C$H$C$S$unit; number2 = Number(number2); var unit = Utils.p(units); var instanceFactorySet = function instanceFactorySet2(n2) { var d2 = dayjs(_this2); return Utils.w(d2.date(d2.date() + Math.round(n2 * number2)), _this2); }; if (unit === M$1) { return this.set(M$1, this.$M + number2); } if (unit === Y$1) { return this.set(Y$1, this.$y + number2); } if (unit === D$1) { return instanceFactorySet(1); } if (unit === W$1) { return instanceFactorySet(7); } var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit[MIN] = MILLISECONDS_A_MINUTE, _C$MIN$C$H$C$S$unit[H$1] = MILLISECONDS_A_HOUR, _C$MIN$C$H$C$S$unit[S$1] = MILLISECONDS_A_SECOND, _C$MIN$C$H$C$S$unit)[unit] || 1; var nextTimeStamp = this.$d.getTime() + number2 * step; return Utils.w(nextTimeStamp, this); }; _proto.subtract = function subtract(number2, string2) { return this.add(number2 * -1, string2); }; _proto.format = function format(formatStr) { var _this3 = this; var locale = this.$locale(); if (!this.isValid()) return locale.invalidDate || INVALID_DATE_STRING; var str = formatStr || FORMAT_DEFAULT; var zoneStr = Utils.z(this); var $H = this.$H, $m = this.$m, $M = this.$M; var weekdays = locale.weekdays, months = locale.months, meridiem = locale.meridiem; var getShort = function getShort2(arr, index2, full, length) { return arr && (arr[index2] || arr(_this3, str)) || full[index2].slice(0, length); }; var get$H = function get$H2(num) { return Utils.s($H % 12 || 12, num, "0"); }; var meridiemFunc = meridiem || function(hour, minute, isLowercase) { var m2 = hour < 12 ? "AM" : "PM"; return isLowercase ? m2.toLowerCase() : m2; }; var matches = function matches2(match) { switch (match) { case "YY": return String(_this3.$y).slice(-2); case "YYYY": return Utils.s(_this3.$y, 4, "0"); case "M": return $M + 1; case "MM": return Utils.s($M + 1, 2, "0"); case "MMM": return getShort(locale.monthsShort, $M, months, 3); case "MMMM": return getShort(months, $M); case "D": return _this3.$D; case "DD": return Utils.s(_this3.$D, 2, "0"); case "d": return String(_this3.$W); case "dd": return getShort(locale.weekdaysMin, _this3.$W, weekdays, 2); case "ddd": return getShort(locale.weekdaysShort, _this3.$W, weekdays, 3); case "dddd": return weekdays[_this3.$W]; case "H": return String($H); case "HH": return Utils.s($H, 2, "0"); case "h": return get$H(1); case "hh": return get$H(2); case "a": return meridiemFunc($H, $m, true); case "A": return meridiemFunc($H, $m, false); case "m": return String($m); case "mm": return Utils.s($m, 2, "0"); case "s": return String(_this3.$s); case "ss": return Utils.s(_this3.$s, 2, "0"); case "SSS": return Utils.s(_this3.$ms, 3, "0"); case "Z": return zoneStr; } return null; }; return str.replace(REGEX_FORMAT, function(match, $1) { return $1 || matches(match) || zoneStr.replace(":", ""); }); }; _proto.utcOffset = function utcOffset() { return -Math.round(this.$d.getTimezoneOffset() / 15) * 15; }; _proto.diff = function diff(input, units, _float) { var _this4 = this; var unit = Utils.p(units); var that = dayjs(input); var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE; var diff2 = this - that; var getMonth = function getMonth2() { return Utils.m(_this4, that); }; var result; switch (unit) { case Y$1: result = getMonth() / 12; break; case M$1: result = getMonth(); break; case Q$1: result = getMonth() / 3; break; case W$1: result = (diff2 - zoneDelta) / MILLISECONDS_A_WEEK; break; case D$1: result = (diff2 - zoneDelta) / MILLISECONDS_A_DAY; break; case H$1: result = diff2 / MILLISECONDS_A_HOUR; break; case MIN: result = diff2 / MILLISECONDS_A_MINUTE; break; case S$1: result = diff2 / MILLISECONDS_A_SECOND; break; default: result = diff2; break; } return _float ? result : Utils.a(result); }; _proto.daysInMonth = function daysInMonth() { return this.endOf(M$1).$D; }; _proto.$locale = function $locale() { return Ls$1[this.$L]; }; _proto.locale = function locale(preset, object2) { if (!preset) return this.$L; var that = this.clone(); var nextLocaleName = parseLocale(preset, object2, true); if (nextLocaleName) that.$L = nextLocaleName; return that; }; _proto.clone = function clone2() { return Utils.w(this.$d, this); }; _proto.toDate = function toDate() { return new Date(this.valueOf()); }; _proto.toJSON = function toJSON() { return this.isValid() ? this.toISOString() : null; }; _proto.toISOString = function toISOString() { return this.$d.toISOString(); }; _proto.toString = function toString2() { return this.$d.toUTCString(); }; return Dayjs2; }(); var proto = Dayjs.prototype; dayjs.prototype = proto; [["$ms", MS], ["$s", S$1], ["$m", MIN], ["$H", H$1], ["$W", D$1], ["$M", M$1], ["$y", Y$1], ["$D", DATE]].forEach(function(g2) { proto[g2[1]] = function(input) { return this.$g(input, g2[0], g2[1]); }; }); dayjs.extend = function(plugin, option) { if (!plugin.$i) { plugin(option, Dayjs, dayjs); plugin.$i = true; } return dayjs; }; dayjs.locale = parseLocale; dayjs.isDayjs = isDayjs; dayjs.unix = function(timestamp) { return dayjs(timestamp * 1e3); }; dayjs.en = Ls$1[L$1]; dayjs.Ls = Ls$1; dayjs.p = {}; const _sfc_main$Y = { name: "u-calendar-month", mixins: [mpMixin, mixin], props: { // 是否显示月份背景色 showMark: { type: Boolean, default: true }, // 主题色,对底部按钮和选中日期有效 color: { type: String, default: "#3c9cff" }, // 月份数据 months: { type: Array, default: () => [] }, // 日期选择类型 mode: { type: String, default: "single" }, // 日期行高 rowHeight: { type: [String, Number], default: 58 }, // mode=multiple时,最多可选多少个日期 maxCount: { type: [String, Number], default: Infinity }, // mode=range时,第一个日期底部的提示文字 startText: { type: String, default: "开始" }, // mode=range时,最后一个日期底部的提示文字 endText: { type: String, default: "结束" }, // 默认选中的日期,mode为multiple或range是必须为数组格式 defaultDate: { type: [Array, String, Date], default: null }, // 最小的可选日期 minDate: { type: [String, Number], default: 0 }, // 最大可选日期 maxDate: { type: [String, Number], default: 0 }, // 如果没有设置maxDate,则往后推多少个月 maxMonth: { type: [String, Number], default: 2 }, // 是否为只读状态,只读状态下禁止选择日期 readonly: { type: Boolean, default: props$i.calendar.readonly }, // 日期区间最多可选天数,默认无限制,mode = range时有效 maxRange: { type: [Number, String], default: Infinity }, // 范围选择超过最多可选天数时的提示文案,mode = range时有效 rangePrompt: { type: String, default: "" }, // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效 showRangePrompt: { type: Boolean, default: true }, // 是否允许日期范围的起止时间为同一天,mode = range时有效 allowSameDay: { type: Boolean, default: false } }, data() { return { // 每个日期的宽度 width: 0, // 当前选中的日期item item: {}, selected: [] }; }, watch: { selectedChange: { immediate: true, handler(n2) { this.setDefaultDate(); } } }, computed: { // 多个条件的变化,会引起选中日期的变化,这里统一管理监听 selectedChange() { return [this.minDate, this.maxDate, this.defaultDate]; }, dayStyle(index1, index2, item) { return (index12, index22, item2) => { const style = {}; let week = item2.week; const dayWidth = Number(parseFloat(this.width / 7).toFixed(3).slice(0, -1)); style.height = uni.$u.addUnit(this.rowHeight); if (index22 === 0) { week = (week === 0 ? 7 : week) - 1; style.marginLeft = uni.$u.addUnit(week * dayWidth); } if (this.mode === "range") { style.paddingLeft = 0; style.paddingRight = 0; style.paddingBottom = 0; style.paddingTop = 0; } return style; }; }, daySelectStyle() { return (index1, index2, item) => { let date2 = dayjs(item.date).format("YYYY-MM-DD"), style = {}; if (this.selected.some((item2) => this.dateSame(item2, date2))) { style.backgroundColor = this.color; } if (this.mode === "single") { if (date2 === this.selected[0]) { style.borderTopLeftRadius = "3px"; style.borderBottomLeftRadius = "3px"; style.borderTopRightRadius = "3px"; style.borderBottomRightRadius = "3px"; } } else if (this.mode === "range") { if (this.selected.length >= 2) { const len = this.selected.length - 1; if (this.dateSame(date2, this.selected[0])) { style.borderTopLeftRadius = "3px"; style.borderBottomLeftRadius = "3px"; } if (this.dateSame(date2, this.selected[len])) { style.borderTopRightRadius = "3px"; style.borderBottomRightRadius = "3px"; } if (dayjs(date2).isAfter(dayjs(this.selected[0])) && dayjs(date2).isBefore(dayjs(this.selected[len]))) { style.backgroundColor = uni.$u.colorGradient(this.color, "#ffffff", 100)[90]; style.opacity = 0.7; } } else if (this.selected.length === 1) { style.borderTopLeftRadius = "3px"; style.borderBottomLeftRadius = "3px"; } } else { if (this.selected.some((item2) => this.dateSame(item2, date2))) { style.borderTopLeftRadius = "3px"; style.borderBottomLeftRadius = "3px"; style.borderTopRightRadius = "3px"; style.borderBottomRightRadius = "3px"; } } return style; }; }, // 某个日期是否被选中 textStyle() { return (item) => { const date2 = dayjs(item.date).format("YYYY-MM-DD"), style = {}; if (this.selected.some((item2) => this.dateSame(item2, date2))) { style.color = "#ffffff"; } if (this.mode === "range") { const len = this.selected.length - 1; if (dayjs(date2).isAfter(dayjs(this.selected[0])) && dayjs(date2).isBefore(dayjs(this.selected[len]))) { style.color = this.color; } } return style; }; }, // 获取底部的提示文字 getBottomInfo() { return (index1, index2, item) => { const date2 = dayjs(item.date).format("YYYY-MM-DD"); const bottomInfo = item.bottomInfo; if (this.mode === "range" && this.selected.length > 0) { if (this.selected.length === 1) { if (this.dateSame(date2, this.selected[0])) return this.startText; else return bottomInfo; } else { const len = this.selected.length - 1; if (this.dateSame(date2, this.selected[0]) && this.dateSame(date2, this.selected[1]) && len === 1) { return `${this.startText}/${this.endText}`; } else if (this.dateSame(date2, this.selected[0])) { return this.startText; } else if (this.dateSame(date2, this.selected[len])) { return this.endText; } else { return bottomInfo; } } } else { return bottomInfo; } }; } }, mounted() { this.init(); }, methods: { init() { this.$emit("monthSelected", this.selected); this.$nextTick(() => { uni.$u.sleep(10).then(() => { this.getWrapperWidth(); this.getMonthRect(); }); }); }, // 判断两个日期是否相等 dateSame(date1, date2) { return dayjs(date1).isSame(dayjs(date2)); }, // 获取月份数据区域的宽度,因为nvue不支持百分比,所以无法通过css设置每个日期item的宽度 getWrapperWidth() { this.$uGetRect(".u-calendar-month-wrapper").then((size) => { this.width = size.width; }); }, getMonthRect() { const promiseAllArr = this.months.map((item, index2) => this.getMonthRectByPromise( `u-calendar-month-${index2}` )); Promise.all(promiseAllArr).then( (sizes) => { let height = 1; const topArr = []; for (let i2 = 0; i2 < this.months.length; i2++) { topArr[i2] = height; height += sizes[i2].height; } this.$emit("updateMonthTop", topArr); } ); }, // 获取每个月份区域的尺寸 getMonthRectByPromise(el) { return new Promise((resolve) => { this.$uGetRect(`.${el}`).then((size) => { resolve(size); }); }); }, // 点击某一个日期 clickHandler(index1, index2, item) { if (this.readonly) { return; } this.item = item; const date2 = dayjs(item.date).format("YYYY-MM-DD"); if (item.disabled) return; let selected = uni.$u.deepClone(this.selected); if (this.mode === "single") { selected = [date2]; } else if (this.mode === "multiple") { if (selected.some((item2) => this.dateSame(item2, date2))) { const itemIndex = selected.findIndex((item2) => item2 === date2); selected.splice(itemIndex, 1); } else { if (selected.length < this.maxCount) selected.push(date2); } } else { if (selected.length === 0 || selected.length >= 2) { selected = [date2]; } else if (selected.length === 1) { const existsDate = selected[0]; if (dayjs(date2).isBefore(existsDate)) { selected = [date2]; } else if (dayjs(date2).isAfter(existsDate)) { if (dayjs(dayjs(date2).subtract(this.maxRange, "day")).isAfter(dayjs(selected[0])) && this.showRangePrompt) { if (this.rangePrompt) { uni.$u.toast(this.rangePrompt); } else { uni.$u.toast(`选择天数不能超过 ${this.maxRange} 天`); } return; } selected.push(date2); const startDate = selected[0]; const endDate = selected[1]; const arr = []; let i2 = 0; do { arr.push(dayjs(startDate).add(i2, "day").format("YYYY-MM-DD")); i2++; } while (dayjs(startDate).add(i2, "day").isBefore(dayjs(endDate))); arr.push(endDate); selected = arr; } else { if (selected[0] === date2 && !this.allowSameDay) return; selected.push(date2); } } } this.setSelected(selected); }, // 设置默认日期 setDefaultDate() { if (!this.defaultDate) { const selected = [dayjs().format("YYYY-MM-DD")]; return this.setSelected(selected, false); } let defaultDate = []; const minDate = this.minDate || dayjs().format("YYYY-MM-DD"); const maxDate = this.maxDate || dayjs(minDate).add(this.maxMonth - 1, "month").format("YYYY-MM-DD"); if (this.mode === "single") { if (!uni.$u.test.array(this.defaultDate)) { defaultDate = [dayjs(this.defaultDate).format("YYYY-MM-DD")]; } else { defaultDate = [this.defaultDate[0]]; } } else { if (!uni.$u.test.array(this.defaultDate)) return; defaultDate = this.defaultDate; } defaultDate = defaultDate.filter((item) => { return dayjs(item).isAfter(dayjs(minDate).subtract(1, "day")) && dayjs(item).isBefore(dayjs( maxDate ).add(1, "day")); }); this.setSelected(defaultDate, false); }, setSelected(selected, event = true) { this.selected = selected; event && this.$emit("monthSelected", this.selected); } } }; function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-calendar-month-wrapper", ref: "u-calendar-month-wrapper" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.months, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass([`u-calendar-month-${index2}`]), ref_for: true, ref: `u-calendar-month-${index2}`, id: `month-${index2}` }, [ index2 !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-calendar-month__title" }, vue.toDisplayString(item.year) + "年" + vue.toDisplayString(item.month) + "月", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-calendar-month__days" }, [ $props.showMark ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-calendar-month__days__month-mark-wrapper" }, [ vue.createElementVNode( "text", { class: "u-calendar-month__days__month-mark-wrapper__text" }, vue.toDisplayString(item.month), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.date, (item1, index1) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-calendar-month__days__day", [item1.selected && "u-calendar-month__days__day__select--selected"]]), key: index1, style: vue.normalizeStyle([$options.dayStyle(index2, index1, item1)]), onClick: ($event) => $options.clickHandler(index2, index1, item1) }, [ vue.createElementVNode( "view", { class: "u-calendar-month__days__day__select", style: vue.normalizeStyle([$options.daySelectStyle(index2, index1, item1)]) }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["u-calendar-month__days__day__select__info", [item1.disabled && "u-calendar-month__days__day__select__info--disabled"]]), style: vue.normalizeStyle([$options.textStyle(item1)]) }, vue.toDisplayString(item1.day), 7 /* TEXT, CLASS, STYLE */ ), $options.getBottomInfo(index2, index1, item1) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["u-calendar-month__days__day__select__buttom-info", [item1.disabled && "u-calendar-month__days__day__select__buttom-info--disabled"]]), style: vue.normalizeStyle([$options.textStyle(item1)]) }, vue.toDisplayString($options.getBottomInfo(index2, index1, item1)), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), item1.dot ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "u-calendar-month__days__day__select__dot" })) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 10, ["id"]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ); } const uMonth = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$j], ["__scopeId", "data-v-9b76ab7e"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-calendar/month.vue"]]); const props$7 = { props: { // 日历顶部标题 title: { type: String, default: props$i.calendar.title }, // 是否显示标题 showTitle: { type: Boolean, default: props$i.calendar.showTitle }, // 是否显示副标题 showSubtitle: { type: Boolean, default: props$i.calendar.showSubtitle }, // 日期类型选择,single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围 mode: { type: String, default: props$i.calendar.mode }, // mode=range时,第一个日期底部的提示文字 startText: { type: String, default: props$i.calendar.startText }, // mode=range时,最后一个日期底部的提示文字 endText: { type: String, default: props$i.calendar.endText }, // 自定义列表 customList: { type: Array, default: props$i.calendar.customList }, // 主题色,对底部按钮和选中日期有效 color: { type: String, default: props$i.calendar.color }, // 最小的可选日期 minDate: { type: [String, Number], default: props$i.calendar.minDate }, // 最大可选日期 maxDate: { type: [String, Number], default: props$i.calendar.maxDate }, // 默认选中的日期,mode为multiple或range是必须为数组格式 defaultDate: { type: [Array, String, Date, null], default: props$i.calendar.defaultDate }, // mode=multiple时,最多可选多少个日期 maxCount: { type: [String, Number], default: props$i.calendar.maxCount }, // 日期行高 rowHeight: { type: [String, Number], default: props$i.calendar.rowHeight }, // 日期格式化函数 formatter: { type: [Function, null], default: props$i.calendar.formatter }, // 是否显示农历 showLunar: { type: Boolean, default: props$i.calendar.showLunar }, // 是否显示月份背景色 showMark: { type: Boolean, default: props$i.calendar.showMark }, // 确定按钮的文字 confirmText: { type: String, default: props$i.calendar.confirmText }, // 确认按钮处于禁用状态时的文字 confirmDisabledText: { type: String, default: props$i.calendar.confirmDisabledText }, // 是否显示日历弹窗 show: { type: Boolean, default: props$i.calendar.show }, // 是否允许点击遮罩关闭日历 closeOnClickOverlay: { type: Boolean, default: props$i.calendar.closeOnClickOverlay }, // 是否为只读状态,只读状态下禁止选择日期 readonly: { type: Boolean, default: props$i.calendar.readonly }, // 是否展示确认按钮 showConfirm: { type: Boolean, default: props$i.calendar.showConfirm }, // 日期区间最多可选天数,默认无限制,mode = range时有效 maxRange: { type: [Number, String], default: props$i.calendar.maxRange }, // 范围选择超过最多可选天数时的提示文案,mode = range时有效 rangePrompt: { type: String, default: props$i.calendar.rangePrompt }, // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效 showRangePrompt: { type: Boolean, default: props$i.calendar.showRangePrompt }, // 是否允许日期范围的起止时间为同一天,mode = range时有效 allowSameDay: { type: Boolean, default: props$i.calendar.allowSameDay }, // 圆角值 round: { type: [Boolean, String, Number], default: props$i.calendar.round }, // 最多展示月份数量 monthNum: { type: [Number, String], default: 3 } } }; var Calendar = { /** * 农历1900-2100的润大小信息表 * @Array Of Property * @return Hex */ lunarInfo: [ 19416, 19168, 42352, 21717, 53856, 55632, 91476, 22176, 39632, 21970, // 1900-1909 19168, 42422, 42192, 53840, 119381, 46400, 54944, 44450, 38320, 84343, // 1910-1919 18800, 42160, 46261, 27216, 27968, 109396, 11104, 38256, 21234, 18800, // 1920-1929 25958, 54432, 59984, 28309, 23248, 11104, 100067, 37600, 116951, 51536, // 1930-1939 54432, 120998, 46416, 22176, 107956, 9680, 37584, 53938, 43344, 46423, // 1940-1949 27808, 46416, 86869, 19872, 42416, 83315, 21168, 43432, 59728, 27296, // 1950-1959 44710, 43856, 19296, 43748, 42352, 21088, 62051, 55632, 23383, 22176, // 1960-1969 38608, 19925, 19152, 42192, 54484, 53840, 54616, 46400, 46752, 103846, // 1970-1979 38320, 18864, 43380, 42160, 45690, 27216, 27968, 44870, 43872, 38256, // 1980-1989 19189, 18800, 25776, 29859, 59984, 27480, 23232, 43872, 38613, 37600, // 1990-1999 51552, 55636, 54432, 55888, 30034, 22176, 43959, 9680, 37584, 51893, // 2000-2009 43344, 46240, 47780, 44368, 21977, 19360, 42416, 86390, 21168, 43312, // 2010-2019 31060, 27296, 44368, 23378, 19296, 42726, 42208, 53856, 60005, 54576, // 2020-2029 23200, 30371, 38608, 19195, 19152, 42192, 118966, 53840, 54560, 56645, // 2030-2039 46496, 22224, 21938, 18864, 42359, 42160, 43600, 111189, 27936, 44448, // 2040-2049 /** Add By JJonline@JJonline.Cn**/ 84835, 37744, 18936, 18800, 25776, 92326, 59984, 27424, 108228, 43744, // 2050-2059 41696, 53987, 51552, 54615, 54432, 55888, 23893, 22176, 42704, 21972, // 2060-2069 21200, 43448, 43344, 46240, 46758, 44368, 21920, 43940, 42416, 21168, // 2070-2079 45683, 26928, 29495, 27296, 44368, 84821, 19296, 42352, 21732, 53600, // 2080-2089 59752, 54560, 55968, 92838, 22224, 19168, 43476, 41680, 53584, 62034, // 2090-2099 54560 ], // 2100 /** * 公历每个月份的天数普通表 * @Array Of Property * @return Number */ solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], /** * 天干地支之天干速查表 * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"] * @return Cn string */ Gan: ["甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"], /** * 天干地支之地支速查表 * @Array Of Property * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"] * @return Cn string */ Zhi: ["子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"], /** * 天干地支之地支速查表<=>生肖 * @Array Of Property * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"] * @return Cn string */ Animals: ["鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗", "猪"], /** * 24节气速查表 * @Array Of Property * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"] * @return Cn string */ solarTerm: ["小寒", "大寒", "立春", "雨水", "惊蛰", "春分", "清明", "谷雨", "立夏", "小满", "芒种", "夏至", "小暑", "大暑", "立秋", "处暑", "白露", "秋分", "寒露", "霜降", "立冬", "小雪", "大雪", "冬至"], /** * 1900-2100各年的24节气日期速查表 * @Array Of Property * @return 0x string For splice */ sTermInfo: [ "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c3598082c95f8c965cc920f", "97bd0b06bdb0722c965ce1cfcc920f", "b027097bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd0b06bdb0722c965ce1cfcc920f", "b027097bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd0b06bdb0722c965ce1cfcc920f", "b027097bd097c36b0b6fc9274c91aa", "9778397bd19801ec9210c965cc920e", "97b6b97bd19801ec95f8c965cc920f", "97bd09801d98082c95f8e1cfcc920f", "97bd097bd097c36b0b6fc9210c8dc2", "9778397bd197c36c9210c9274c91aa", "97b6b97bd19801ec95f8c965cc920e", "97bd09801d98082c95f8e1cfcc920f", "97bd097bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c91aa", "97b6b97bd19801ec95f8c965cc920e", "97bcf97c3598082c95f8e1cfcc920f", "97bd097bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c3598082c95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c3598082c95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd097bd07f595b0b6fc920fb0722", "9778397bd097c36b0b6fc9210c8dc2", "9778397bd19801ec9210c9274c920e", "97b6b97bd19801ec95f8c965cc920f", "97bd07f5307f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c920e", "97b6b97bd19801ec95f8c965cc920f", "97bd07f5307f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bd07f1487f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c9274c920e", "97bcf7f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c91aa", "97b6b97bd197c36c9210c9274c920e", "97bcf7f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c920e", "97b6b7f0e47f531b0723b0b6fb0722", "7f0e37f5307f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36b0b70c9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e37f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc9210c8dc2", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0787b0721", "7f0e27f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c91aa", "97b6b7f0e47f149b0723b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c8dc2", "977837f0e37f149b0723b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e37f5307f595b0b0bc920fb0722", "7f0e397bd097c35b0b6fc9210c8dc2", "977837f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e37f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc9210c8dc2", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f149b0723b0787b0721", "7f0e27f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14998082b0723b06bd", "7f07e7f0e37f149b0723b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e37f1487f595b0b0bb0b6fb0722", "7f0e37f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e37f1487f531b0b0bb0b6fb0722", "7f0e37f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e37f1487f531b0b0bb0b6fb0722", "7f0e37f0e37f14898082b072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e37f0e37f14898082b072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f149b0723b0787b0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14998082b0723b06bd", "7f07e7f0e47f149b0723b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14998082b0723b06bd", "7f07e7f0e37f14998083b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14898082b0723b02d5", "7f07e7f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e36665b66aa89801e9808297c35", "665f67f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e36665b66a449801e9808297c35", "665f67f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e36665b66a449801e9808297c35", "665f67f0e37f14898082b072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e26665b66a449801e9808297c35", "665f67f0e37f1489801eb072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722" ], /** * 数字转中文速查表 * @Array Of Property * @trans ['日','一','二','三','四','五','六','七','八','九','十'] * @return Cn string */ nStr1: ["日", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"], /** * 日期转农历称呼速查表 * @Array Of Property * @trans ['初','十','廿','卅'] * @return Cn string */ nStr2: ["初", "十", "廿", "卅"], /** * 月份转农历称呼速查表 * @Array Of Property * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊'] * @return Cn string */ nStr3: ["正", "二", "三", "四", "五", "六", "七", "八", "九", "十", "冬", "腊"], /** * 返回农历y年一整年的总天数 * @param lunar Year * @return Number * @eg:var count = calendar.lYearDays(1987) ;//count=387 */ lYearDays: function(y2) { var i2; var sum = 348; for (i2 = 32768; i2 > 8; i2 >>= 1) { sum += this.lunarInfo[y2 - 1900] & i2 ? 1 : 0; } return sum + this.leapDays(y2); }, /** * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0 * @param lunar Year * @return Number (0-12) * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6 */ leapMonth: function(y2) { return this.lunarInfo[y2 - 1900] & 15; }, /** * 返回农历y年闰月的天数 若该年没有闰月则返回0 * @param lunar Year * @return Number (0、29、30) * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29 */ leapDays: function(y2) { if (this.leapMonth(y2)) { return this.lunarInfo[y2 - 1900] & 65536 ? 30 : 29; } return 0; }, /** * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法 * @param lunar Year * @return Number (-1、29、30) * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29 */ monthDays: function(y2, m2) { if (m2 > 12 || m2 < 1) { return -1; } return this.lunarInfo[y2 - 1900] & 65536 >> m2 ? 30 : 29; }, /** * 返回公历(!)y年m月的天数 * @param solar Year * @return Number (-1、28、29、30、31) * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30 */ solarDays: function(y2, m2) { if (m2 > 12 || m2 < 1) { return -1; } var ms2 = m2 - 1; if (ms2 == 1) { return y2 % 4 == 0 && y2 % 100 != 0 || y2 % 400 == 0 ? 29 : 28; } else { return this.solarMonth[ms2]; } }, /** * 农历年份转换为干支纪年 * @param lYear 农历年的年份数 * @return Cn string */ toGanZhiYear: function(lYear) { var ganKey = (lYear - 3) % 10; var zhiKey = (lYear - 3) % 12; if (ganKey == 0) ganKey = 10; if (zhiKey == 0) zhiKey = 12; return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]; }, /** * 公历月、日判断所属星座 * @param cMonth [description] * @param cDay [description] * @return Cn string */ toAstro: function(cMonth, cDay) { var s2 = "魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯"; var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]; return s2.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + "座"; }, /** * 传入offset偏移量返回干支 * @param offset 相对甲子的偏移量 * @return Cn string */ toGanZhi: function(offset) { return this.Gan[offset % 10] + this.Zhi[offset % 12]; }, /** * 传入公历(!)y年获得该年第n个节气的公历日期 * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起 * @return day Number * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春 */ getTerm: function(y2, n2) { if (y2 < 1900 || y2 > 2100) { return -1; } if (n2 < 1 || n2 > 24) { return -1; } var _table = this.sTermInfo[y2 - 1900]; var _info = [ parseInt("0x" + _table.substr(0, 5)).toString(), parseInt("0x" + _table.substr(5, 5)).toString(), parseInt("0x" + _table.substr(10, 5)).toString(), parseInt("0x" + _table.substr(15, 5)).toString(), parseInt("0x" + _table.substr(20, 5)).toString(), parseInt("0x" + _table.substr(25, 5)).toString() ]; var _calday = [ _info[0].substr(0, 1), _info[0].substr(1, 2), _info[0].substr(3, 1), _info[0].substr(4, 2), _info[1].substr(0, 1), _info[1].substr(1, 2), _info[1].substr(3, 1), _info[1].substr(4, 2), _info[2].substr(0, 1), _info[2].substr(1, 2), _info[2].substr(3, 1), _info[2].substr(4, 2), _info[3].substr(0, 1), _info[3].substr(1, 2), _info[3].substr(3, 1), _info[3].substr(4, 2), _info[4].substr(0, 1), _info[4].substr(1, 2), _info[4].substr(3, 1), _info[4].substr(4, 2), _info[5].substr(0, 1), _info[5].substr(1, 2), _info[5].substr(3, 1), _info[5].substr(4, 2) ]; return parseInt(_calday[n2 - 1]); }, /** * 传入农历数字月份返回汉语通俗表示法 * @param lunar month * @return Cn string * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月' */ toChinaMonth: function(m2) { if (m2 > 12 || m2 < 1) { return -1; } var s2 = this.nStr3[m2 - 1]; s2 += "月"; return s2; }, /** * 传入农历日期数字返回汉字表示法 * @param lunar day * @return Cn string * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一' */ toChinaDay: function(d2) { var s2; switch (d2) { case 10: s2 = "初十"; break; case 20: s2 = "二十"; break; case 30: s2 = "三十"; break; default: s2 = this.nStr2[Math.floor(d2 / 10)]; s2 += this.nStr1[d2 % 10]; } return s2; }, /** * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春” * @param y year * @return Cn string * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔' */ getAnimal: function(y2) { return this.Animals[(y2 - 4) % 12]; }, /** * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON * @param y solar year * @param m solar month * @param d solar day * @return JSON object * @eg:__f__('log','at node_modules/uview-plus/libs/util/calendar.js:381',calendar.solar2lunar(1987,11,01)); */ solar2lunar: function(y2, m2, d2) { if (y2 < 1900 || y2 > 2100) { return -1; } if (y2 == 1900 && m2 == 1 && d2 < 31) { return -1; } if (!y2) { var objDate = /* @__PURE__ */ new Date(); } else { var objDate = new Date(y2, parseInt(m2) - 1, d2); } var i2; var leap = 0; var temp = 0; var y2 = objDate.getFullYear(); var m2 = objDate.getMonth() + 1; var d2 = objDate.getDate(); var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 864e5; for (i2 = 1900; i2 < 2101 && offset > 0; i2++) { temp = this.lYearDays(i2); offset -= temp; } if (offset < 0) { offset += temp; i2--; } var isTodayObj = /* @__PURE__ */ new Date(); var isToday = false; if (isTodayObj.getFullYear() == y2 && isTodayObj.getMonth() + 1 == m2 && isTodayObj.getDate() == d2) { isToday = true; } var nWeek = objDate.getDay(); var cWeek = this.nStr1[nWeek]; if (nWeek == 0) { nWeek = 7; } var year = i2; var leap = this.leapMonth(i2); var isLeap = false; for (i2 = 1; i2 < 13 && offset > 0; i2++) { if (leap > 0 && i2 == leap + 1 && isLeap == false) { --i2; isLeap = true; temp = this.leapDays(year); } else { temp = this.monthDays(year, i2); } if (isLeap == true && i2 == leap + 1) { isLeap = false; } offset -= temp; } if (offset == 0 && leap > 0 && i2 == leap + 1) { if (isLeap) { isLeap = false; } else { isLeap = true; --i2; } } if (offset < 0) { offset += temp; --i2; } var month = i2; var day = offset + 1; var sm = m2 - 1; var gzY = this.toGanZhiYear(year); var firstNode = this.getTerm(y2, m2 * 2 - 1); var secondNode = this.getTerm(y2, m2 * 2); var gzM = this.toGanZhi((y2 - 1900) * 12 + m2 + 11); if (d2 >= firstNode) { gzM = this.toGanZhi((y2 - 1900) * 12 + m2 + 12); } var isTerm = false; var Term = null; if (firstNode == d2) { isTerm = true; Term = this.solarTerm[m2 * 2 - 2]; } if (secondNode == d2) { isTerm = true; Term = this.solarTerm[m2 * 2 - 1]; } var dayCyclical = Date.UTC(y2, sm, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10; var gzD = this.toGanZhi(dayCyclical + d2 - 1); var astro = this.toAstro(m2, d2); return { "lYear": year, "lMonth": month, "lDay": day, "Animal": this.getAnimal(year), "IMonthCn": (isLeap ? "闰" : "") + this.toChinaMonth(month), "IDayCn": this.toChinaDay(day), "cYear": y2, "cMonth": m2, "cDay": d2, "gzYear": gzY, "gzMonth": gzM, "gzDay": gzD, "isToday": isToday, "isLeap": isLeap, "nWeek": nWeek, "ncWeek": "星期" + cWeek, "isTerm": isTerm, "Term": Term, "astro": astro }; }, /** * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON * @param y lunar year * @param m lunar month * @param d lunar day * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可] * @return JSON object * @eg:__f__('log','at node_modules/uview-plus/libs/util/calendar.js:500',calendar.lunar2solar(1987,9,10)); */ lunar2solar: function(y2, m2, d2, isLeapMonth) { var isLeapMonth = !!isLeapMonth; var leapMonth = this.leapMonth(y2); this.leapDays(y2); if (isLeapMonth && leapMonth != m2) { return -1; } if (y2 == 2100 && m2 == 12 && d2 > 1 || y2 == 1900 && m2 == 1 && d2 < 31) { return -1; } var day = this.monthDays(y2, m2); var _day = day; if (isLeapMonth) { _day = this.leapDays(y2, m2); } if (y2 < 1900 || y2 > 2100 || d2 > _day) { return -1; } var offset = 0; for (var i2 = 1900; i2 < y2; i2++) { offset += this.lYearDays(i2); } var leap = 0; var isAdd = false; for (var i2 = 1; i2 < m2; i2++) { leap = this.leapMonth(y2); if (!isAdd) { if (leap <= i2 && leap > 0) { offset += this.leapDays(y2); isAdd = true; } } offset += this.monthDays(y2, i2); } if (isLeapMonth) { offset += day; } var stmap = Date.UTC(1900, 1, 30, 0, 0, 0); var calObj = new Date((offset + d2 - 31) * 864e5 + stmap); var cY = calObj.getUTCFullYear(); var cM = calObj.getUTCMonth() + 1; var cD = calObj.getUTCDate(); return this.solar2lunar(cY, cM, cD); } }; const _sfc_main$X = { name: "u-calendar", mixins: [mpMixin, mixin, props$7], components: { uHeader, uMonth }, data() { return { // 需要显示的月份的数组 months: [], // 在月份滚动区域中,当前视图中月份的index索引 monthIndex: 0, // 月份滚动区域的高度 listHeight: 0, // month组件中选择的日期数组 selected: [], scrollIntoView: "", scrollTop: 0, // 过滤处理方法 innerFormatter: (value) => value }; }, watch: { selectedChange: { immediate: true, handler(n2) { this.setMonth(); } }, // 打开弹窗时,设置月份数据 show: { immediate: true, handler(n2) { this.setMonth(); } } }, computed: { // 由于maxDate和minDate可以为字符串(2021-10-10),或者数值(时间戳),但是dayjs如果接受字符串形式的时间戳会有问题,这里进行处理 innerMaxDate() { return uni.$u.test.number(this.maxDate) ? Number(this.maxDate) : this.maxDate; }, innerMinDate() { return uni.$u.test.number(this.minDate) ? Number(this.minDate) : this.minDate; }, // 多个条件的变化,会引起选中日期的变化,这里统一管理监听 selectedChange() { return [this.innerMinDate, this.innerMaxDate, this.defaultDate]; }, subtitle() { if (this.months.length) { return `${this.months[this.monthIndex].year}年${this.months[this.monthIndex].month}月`; } else { return ""; } }, buttonDisabled() { if (this.mode === "range") { if (this.selected.length <= 1) { return true; } else { return false; } } else { return false; } } }, mounted() { this.start = Date.now(); this.init(); }, emits: ["confirm", "close"], methods: { // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 setFormatter(e2) { this.innerFormatter = e2; }, // month组件内部选择日期后,通过事件通知给父组件 monthSelected(e2) { this.selected = e2; if (!this.showConfirm) { if (this.mode === "multiple" || this.mode === "single" || this.mode === "range" && this.selected.length >= 2) { this.$emit("confirm", this.selected); } } }, init() { if (this.innerMaxDate && new Date(this.innerMaxDate).getTime() <= Date.now()) { return uni.$u.error("maxDate不能小于当前时间"); } this.listHeight = this.rowHeight * 5 + 30; this.setMonth(); }, close() { this.$emit("close"); }, // 点击确定按钮 confirm() { if (!this.buttonDisabled) { this.$emit("confirm", this.selected); } }, // 获得两个日期之间的月份数 getMonths(minDate, maxDate) { const minYear = dayjs(minDate).year(); const minMonth = dayjs(minDate).month() + 1; const maxYear = dayjs(maxDate).year(); const maxMonth = dayjs(maxDate).month() + 1; return (maxYear - minYear) * 12 + (maxMonth - minMonth) + 1; }, // 设置月份数据 setMonth() { const minDate = this.innerMinDate || dayjs().valueOf(); const maxDate = this.innerMaxDate || dayjs(minDate).add(this.monthNum - 1, "month").valueOf(); const months = uni.$u.range( 1, this.monthNum, this.getMonths(minDate, maxDate) ); this.months = []; for (let i2 = 0; i2 < months; i2++) { this.months.push({ date: new Array( dayjs(minDate).add(i2, "month").daysInMonth() ).fill(1).map((item, index2) => { let day = index2 + 1; const week = dayjs(minDate).add(i2, "month").date(day).day(); const date2 = dayjs(minDate).add(i2, "month").date(day).format("YYYY-MM-DD"); let bottomInfo = ""; if (this.showLunar) { const lunar = Calendar.solar2lunar( dayjs(date2).year(), dayjs(date2).month() + 1, dayjs(date2).date() ); bottomInfo = lunar.IDayCn; } let config2 = { day, week, // 小于最小允许的日期,或者大于最大的日期,则设置为disabled状态 disabled: dayjs(date2).isBefore( dayjs(minDate).format("YYYY-MM-DD") ) || dayjs(date2).isAfter( dayjs(maxDate).format("YYYY-MM-DD") ), // 返回一个日期对象,供外部的formatter获取当前日期的年月日等信息,进行加工处理 date: new Date(date2), bottomInfo, dot: false, month: dayjs(minDate).add(i2, "month").month() + 1 }; const formatter = this.formatter || this.innerFormatter; return formatter(config2); }), // 当前所属的月份 month: dayjs(minDate).add(i2, "month").month() + 1, // 当前年份 year: dayjs(minDate).add(i2, "month").year() }); } }, // 滚动到默认设置的月份 scrollIntoDefaultMonth(selected) { const _index = this.months.findIndex(({ year, month }) => { month = uni.$u.padZero(month); return `${year}-${month}` === selected; }); if (_index !== -1) { this.$nextTick(() => { this.scrollIntoView = `month-${_index}`; }); } }, // scroll-view滚动监听 onScroll(event) { const scrollTop = Math.max(0, event.detail.scrollTop); for (let i2 = 0; i2 < this.months.length; i2++) { if (scrollTop >= (this.months[i2].top || this.listHeight)) { this.monthIndex = i2; } } }, // 更新月份的top值 updateMonthTop(topArr = []) { topArr.map((item, index2) => { this.months[index2].top = item; }); if (!this.defaultDate) { const selected2 = dayjs().format("YYYY-MM"); this.scrollIntoDefaultMonth(selected2); return; } let selected = dayjs().format("YYYY-MM"); if (!uni.$u.test.array(this.defaultDate)) { selected = dayjs(this.defaultDate).format("YYYY-MM"); } else { selected = dayjs(this.defaultDate[0]).format("YYYY-MM"); } this.scrollIntoDefaultMonth(selected); } } }; function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) { const _component_uHeader = vue.resolveComponent("uHeader"); const _component_uMonth = vue.resolveComponent("uMonth"); const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_0$4); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_1$4); return vue.openBlock(), vue.createBlock(_component_u_popup, { show: _ctx.show, mode: "bottom", closeable: "", onClose: $options.close, round: _ctx.round, closeOnClickOverlay: _ctx.closeOnClickOverlay }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-calendar" }, [ vue.createVNode(_component_uHeader, { title: _ctx.title, subtitle: $options.subtitle, showSubtitle: _ctx.showSubtitle, showTitle: _ctx.showTitle }, null, 8, ["title", "subtitle", "showSubtitle", "showTitle"]), vue.createElementVNode("scroll-view", { style: vue.normalizeStyle({ height: _ctx.$u.addUnit($data.listHeight) }), "scroll-y": "", onScroll: _cache[0] || (_cache[0] = (...args) => $options.onScroll && $options.onScroll(...args)), "scroll-top": $data.scrollTop, scrollIntoView: $data.scrollIntoView }, [ vue.createVNode(_component_uMonth, { color: _ctx.color, rowHeight: _ctx.rowHeight, showMark: _ctx.showMark, months: $data.months, mode: _ctx.mode, maxCount: _ctx.maxCount, startText: _ctx.startText, endText: _ctx.endText, defaultDate: _ctx.defaultDate, minDate: $options.innerMinDate, maxDate: $options.innerMaxDate, maxMonth: _ctx.monthNum, readonly: _ctx.readonly, maxRange: _ctx.maxRange, rangePrompt: _ctx.rangePrompt, showRangePrompt: _ctx.showRangePrompt, allowSameDay: _ctx.allowSameDay, ref: "month", onMonthSelected: $options.monthSelected, onUpdateMonthTop: $options.updateMonthTop }, null, 8, ["color", "rowHeight", "showMark", "months", "mode", "maxCount", "startText", "endText", "defaultDate", "minDate", "maxDate", "maxMonth", "readonly", "maxRange", "rangePrompt", "showRangePrompt", "allowSameDay", "onMonthSelected", "onUpdateMonthTop"]) ], 44, ["scroll-top", "scrollIntoView"]), _ctx.showConfirm ? vue.renderSlot(_ctx.$slots, "footer", { key: 0 }, () => [ vue.createElementVNode("view", { class: "u-calendar__confirm" }, [ vue.createVNode(_component_u_button, { shape: "circle", text: $options.buttonDisabled ? _ctx.confirmDisabledText : _ctx.confirmText, color: _ctx.color, onClick: $options.confirm, disabled: $options.buttonDisabled }, null, 8, ["text", "color", "onClick", "disabled"]) ]) ], true) : vue.createCommentVNode("v-if", true) ]) ]), _: 3 /* FORWARDED */ }, 8, ["show", "onClose", "round", "closeOnClickOverlay"]); } const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$i], ["__scopeId", "data-v-4d01889e"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-calendar/u-calendar.vue"]]); let uplodeImg = () => { return new Promise((reslove, reject) => { uni.chooseImage({ count: 1, sizeType: ["compressed"], sourceType: ["album"], success: (res) => { var imageSrc = res.tempFilePaths[0]; uni.showLoading({ title: "上传中", duration: 1e3 }); uni.uploadFile({ url: "http://ceshi-suyuan.lihaink.cn/api/user/imageUpload", filePath: imageSrc, name: "file", // formData: { // 'user': 'test' // }, success: (res2) => { uni.showToast({ title: "上传成功", icon: "success", duration: 1e3 }); reslove(JSON.parse(res2.data)); }, fail: (err) => { reject(err); uni.showToast({ title: "检查网络", duration: 1e3 }); } }); } }); }); }; const _sfc_main$W = { __name: "plant", setup(__props) { const userInfo = userInfoStore(); const uNotify = vue.ref(); vue.ref(false); const showDatePicker = vue.ref(false); const formData = vue.reactive({ user_id: userInfo.user_id, land_id: "", crop_name: "", crop_variety: "", crop_brand: "", crop_buy_time: "", pic: "" }); const confirm = (e2) => { formatAppLog("log", "at components/InformationAdd/plant.vue:123", e2[0]); formData.crop_buy_time = e2[0]; showDatePicker.value = false; }; const updateImgFn = async () => { let res = await uplodeImg(); formData.pic = res.data.image; }; const sowFn = async () => { await AddlandInfoAPI({ ...formData }); setTimeout(() => { uni.navigateTo({ url: "/pages/index/index" }); }, 2e3); }; onLoad((options) => { formData.land_id = options.land_id; }); return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_up_calendar = resolveEasycom(vue.resolveDynamicComponent("up-calendar"), __easycom_2$1); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li tit" }, [ vue.createElementVNode("view", { class: "" }, " 土地 "), vue.createElementVNode("view", { style: { "color": "#00A15E", "font-weight": "bold" } }, " 未种植 ") ]), vue.createElementVNode("view", { class: "card-li tit" }, [ vue.createElementVNode("view", { class: "" }, " 面积: 10亩 ") ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 种植品牌 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.crop_name, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.crop_name = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 具体品种 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.crop_variety, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.crop_variety = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 种子品牌 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.crop_brand, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.crop_brand = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 种子收购时间 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "点击输入时间", border: "surround", modelValue: formData.crop_buy_time, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => formData.crop_buy_time = $event), onFocus: _cache[4] || (_cache[4] = ($event) => showDatePicker.value = true) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 上传播种图片 "), vue.createElementVNode("view", { class: "code-img" }, [ vue.createElementVNode("view", { class: "", onClick: updateImgFn }, [ formData.pic ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ vue.createVNode(_component_u__image, { src: formData.pic, width: "637.85rpx", height: "350.47rpx" }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "carime-icon" }, [ vue.createVNode(_component_u__image, { src: "/static/img/DJSC.png", width: "91.12rpx", height: "91.12rpx" }), vue.createElementVNode("view", { class: "" }, " 点击上传图片 ") ])) ]) ]) ]) ]), vue.createCommentVNode(' \r\n +上传播种图片\r\n '), vue.createElementVNode("view", { class: "today-btn confim-btn", onClick: sowFn }, " 今日播种 "), vue.createCommentVNode(" 组件 "), vue.createVNode( vue.unref(uNotify), { ref_key: "uNotify", ref: uNotify, message: "Hi uview-plus" }, null, 512 /* NEED_PATCH */ ), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_calendar, { closeOnClickOverlay: true, show: showDatePicker.value, onConfirm: confirm, onClose: _cache[5] || (_cache[5] = ($event) => showDatePicker.value = false) }, null, 8, ["show"]) ]) ], 64 /* STABLE_FRAGMENT */ ); }; } }; const plantadd = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-0a2913e2"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/InformationAdd/plant.vue"]]); const _sfc_main$V = { __name: "index", setup(__props) { return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createVNode(plantadd) ]); }; } }; const PagesInformationAddIndex = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-2fddea55"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/InformationAdd/index.vue"]]); const MIN_DISTANCE = 10; function getDirection(x, y2) { if (x > y2 && x > MIN_DISTANCE) { return "horizontal"; } if (y2 > x && y2 > MIN_DISTANCE) { return "vertical"; } return ""; } const touch = { methods: { getTouchPoint(e2) { if (!e2) { return { x: 0, y: 0 }; } if (e2.touches && e2.touches[0]) { return { x: e2.touches[0].pageX, y: e2.touches[0].pageY }; } if (e2.changedTouches && e2.changedTouches[0]) { return { x: e2.changedTouches[0].pageX, y: e2.changedTouches[0].pageY }; } return { x: e2.clientX || 0, y: e2.clientY || 0 }; }, resetTouchStatus() { this.direction = ""; this.deltaX = 0; this.deltaY = 0; this.offsetX = 0; this.offsetY = 0; }, touchStart(event) { this.resetTouchStatus(); const touch2 = this.getTouchPoint(event); this.startX = touch2.x; this.startY = touch2.y; }, touchMove(event) { const touch2 = this.getTouchPoint(event); this.deltaX = touch2.x - this.startX; this.deltaY = touch2.y - this.startY; this.offsetX = Math.abs(this.deltaX); this.offsetY = Math.abs(this.deltaY); this.direction = this.direction || getDirection(this.offsetX, this.offsetY); } } }; const props$6 = { props: { // 控制打开或者关闭 show: { type: Boolean, default: props$i.swipeActionItem.show }, // 标识符,如果是v-for,可用index索引值 name: { type: [String, Number], default: props$i.swipeActionItem.name }, // 是否禁用 disabled: { type: Boolean, default: props$i.swipeActionItem.disabled }, // 是否自动关闭其他swipe按钮组 autoClose: { type: Boolean, default: props$i.swipeActionItem.autoClose }, // 滑动距离阈值,只有大于此值,才被认为是要打开菜单 threshold: { type: Number, default: props$i.swipeActionItem.threshold }, // 右侧按钮内容 options: { type: Array, default() { return uni.$u.props.swipeActionItem.rightOptions; } }, // 动画过渡时间,单位ms duration: { type: [String, Number], default: props$i.swipeActionItem.duration } } }; const wxs = { methods: { // 关闭时执行 closeHandler() { this.status = "close"; }, setState(status) { this.status = status; }, closeOther() { this.parent && this.parent.closeOther(this); } } }; const block0$1 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("wxs"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "229ea0d2"; }; const _sfc_main$U = { name: "u-swipe-action-item", emits: ["click"], mixins: [mpMixin, mixin, props$6, touch], mixins: [mpMixin, mixin, props$6, touch, wxs], data() { return { // 按钮的尺寸信息 size: {}, // 父组件u-swipe-action的参数 parentData: { autoClose: true }, // 当前状态,open-打开,close-关闭 status: "close" }; }, watch: { // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑 wxsInit(newValue, oldValue) { this.queryRect(); } }, computed: { wxsInit() { return [this.disabled, this.autoClose, this.threshold, this.options, this.duration]; } }, mounted() { this.init(); }, methods: { init() { this.updateParentData(); uni.$u.sleep().then(() => { this.queryRect(); }); }, updateParentData() { this.getParentData("u-swipe-action"); }, // 查询节点 queryRect() { this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => { this.size = { buttons, show: this.show, disabled: this.disabled, threshold: this.threshold, duration: this.duration }; }); }, // 按钮被点击 buttonClickHandler(item, index2) { this.$emit("click", { index: index2, name: this.name }); } } }; function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-swipe-action-item", ref: "u-swipe-action-item" }, [ vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [ vue.renderSlot(_ctx.$slots, "button", {}, () => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.options, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "u-swipe-action-item__right__button", ref_for: true, ref: `u-swipe-action-item__right__button-${index2}`, style: vue.normalizeStyle([{ alignItems: item.style && item.style.borderRadius ? "center" : "stretch" }]), onClick: ($event) => $options.buttonClickHandler(item, index2) }, [ vue.createElementVNode( "view", { class: "u-swipe-action-item__right__button__wrapper", style: vue.normalizeStyle([{ backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD", borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0", padding: item.style && item.style.borderRadius ? "0" : "0 15px" }, item.style]) }, [ item.icon ? (vue.openBlock(), vue.createBlock(_component_u_icon, { key: 0, name: item.icon, color: item.style && item.style.color ? item.style.color : "#ffffff", size: item.iconSize ? _ctx.$u.addUnit(item.iconSize) : item.style && item.style.fontSize ? _ctx.$u.getPx(item.style.fontSize) * 1.2 : 17, customStyle: { marginRight: item.text ? "2px" : 0 } }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true), item.text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-swipe-action-item__right__button__wrapper__text u-line-1", style: vue.normalizeStyle([{ color: item.style && item.style.color ? item.style.color : "#ffffff", fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px", lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px" }]) }, vue.toDisplayString(item.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], true) ]), vue.createElementVNode("view", { class: "u-swipe-action-item__content", onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)), onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)), onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)), status: vue.wp($data.status), "change:status": _ctx.wxs.statusChange, size: vue.wp($data.size), "change:size": _ctx.wxs.sizeChange }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 40, ["status", "change:status", "size", "change:size"]) ], 512 /* NEED_PATCH */ ); } if (typeof block0$1 === "function") block0$1(_sfc_main$U); const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$h], ["__scopeId", "data-v-8b5d76c2"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue"]]); const props$5 = { props: { // 是否自动关闭其他swipe按钮组 autoClose: { type: Boolean, default: props$i.swipeAction.autoClose } } }; const _sfc_main$T = { name: "u-swipe-action", mixins: [mpMixin, mixin, props$5], data() { return {}; }, provide() { return { swipeAction: this }; }, computed: { // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化 // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item) // 拉取父组件新的变化后的参数 parentData() { return [this.autoClose]; } }, watch: { // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件 parentData() { if (this.children.length) { this.children.map((child) => { typeof child.updateParentData === "function" && child.updateParentData(); }); } } }, created() { this.children = []; }, methods: { closeOther(child) { if (this.autoClose) { this.children.map((item, index2) => { if (child !== item) { item.closeHandler(); } }); } } } }; function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [ vue.renderSlot(_ctx.$slots, "default") ]); } const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$g], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]); const props$4 = { props: { // 是否展示工具条 show: { type: Boolean, default: props$i.toolbar.show }, // 取消按钮的文字 cancelText: { type: String, default: props$i.toolbar.cancelText }, // 确认按钮的文字 confirmText: { type: String, default: props$i.toolbar.confirmText }, // 取消按钮的颜色 cancelColor: { type: String, default: props$i.toolbar.cancelColor }, // 确认按钮的颜色 confirmColor: { type: String, default: props$i.toolbar.confirmColor }, // 标题文字 title: { type: String, default: props$i.toolbar.title } } }; const _sfc_main$S = { name: "u-toolbar", mixins: [mpMixin, mixin, props$4], emits: ["confirm", "cancel"], methods: { // 点击取消按钮 cancel() { this.$emit("cancel"); }, // 点击确定按钮 confirm() { this.$emit("confirm"); } } }; function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-toolbar", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "u-toolbar__cancel__wrapper", "hover-class": "u-hover-class" }, [ vue.createElementVNode( "text", { class: "u-toolbar__wrapper__cancel", onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)), style: vue.normalizeStyle({ color: _ctx.cancelColor }) }, vue.toDisplayString(_ctx.cancelText), 5 /* TEXT, STYLE */ ) ]), _ctx.title ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-toolbar__title u-line-1" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-toolbar__confirm__wrapper", "hover-class": "u-hover-class" }, [ vue.createElementVNode( "text", { class: "u-toolbar__wrapper__confirm", onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)), style: vue.normalizeStyle({ color: _ctx.confirmColor }) }, vue.toDisplayString(_ctx.confirmText), 5 /* TEXT, STYLE */ ) ]) ], 32 /* HYDRATE_EVENTS */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$f], ["__scopeId", "data-v-3fd495d6"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]); const props$3 = { props: { // 是否展示picker弹窗 show: { type: Boolean, default: props$i.picker.show }, // 是否展示顶部的操作栏 showToolbar: { type: Boolean, default: props$i.picker.showToolbar }, // 顶部标题 title: { type: String, default: props$i.picker.title }, // 对象数组,设置每一列的数据 columns: { type: Array, default: props$i.picker.columns }, // 是否显示加载中状态 loading: { type: Boolean, default: props$i.picker.loading }, // 各列中,单个选项的高度 itemHeight: { type: [String, Number], default: props$i.picker.itemHeight }, // 取消按钮的文字 cancelText: { type: String, default: props$i.picker.cancelText }, // 确认按钮的文字 confirmText: { type: String, default: props$i.picker.confirmText }, // 取消按钮的颜色 cancelColor: { type: String, default: props$i.picker.cancelColor }, // 确认按钮的颜色 confirmColor: { type: String, default: props$i.picker.confirmColor }, // 每列中可见选项的数量 visibleItemCount: { type: [String, Number], default: props$i.picker.visibleItemCount }, // 选项对象中,需要展示的属性键名 keyName: { type: String, default: props$i.picker.keyName }, // 是否允许点击遮罩关闭选择器 closeOnClickOverlay: { type: Boolean, default: props$i.picker.closeOnClickOverlay }, // 各列的默认索引 defaultIndex: { type: Array, default: props$i.picker.defaultIndex }, // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效 immediateChange: { type: Boolean, default: props$i.picker.immediateChange } } }; const _sfc_main$R = { name: "u-picker", mixins: [mpMixin, mixin, props$3], data() { return { // 上一次选择的列索引 lastIndex: [], // 索引值 ,对应picker-view的value innerIndex: [], // 各列的值 innerColumns: [], // 上一次的变化列索引 columnIndex: 0 }; }, watch: { // 监听默认索引的变化,重新设置对应的值 defaultIndex: { immediate: true, handler(n2) { this.setIndexs(n2, true); } }, // 监听columns参数的变化 columns: { immediate: true, deep: true, handler(n2) { this.setColumns(n2); } } }, emits: ["close", "cancel", "confirm", "change"], methods: { // 获取item需要显示的文字,判别为对象还是文本 getItemText(item) { if (uni.$u.test.object(item)) { return item[this.keyName]; } else { return item; } }, // 关闭选择器 closeHandler() { if (this.closeOnClickOverlay) { this.$emit("close"); } }, // 点击工具栏的取消按钮 cancel() { this.$emit("cancel"); }, // 点击工具栏的确定按钮 confirm() { this.$emit("confirm", { indexs: this.innerIndex, value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]), values: this.innerColumns }); }, // 选择器某一列的数据发生变化时触发 changeHandler(e2) { const { value } = e2.detail; let index2 = 0, columnIndex = 0; for (let i2 = 0; i2 < value.length; i2++) { let item = value[i2]; if (item !== (this.lastIndex[i2] || 0)) { columnIndex = i2; index2 = item; break; } } this.columnIndex = columnIndex; const values = this.innerColumns; this.setLastIndex(value); this.setIndexs(value); this.$emit("change", { // 微信小程序不能传递this,会因为循环引用而报错 picker: this, value: this.innerColumns.map((item, index3) => item[value[index3]]), index: index2, indexs: value, // values为当前变化列的数组内容 values, columnIndex }); }, // 设置index索引,此方法可被外部调用设置 setIndexs(index2, setLastIndex) { this.innerIndex = uni.$u.deepClone(index2); if (setLastIndex) { this.setLastIndex(index2); } }, // 记录上一次的各列索引位置 setLastIndex(index2) { this.lastIndex = uni.$u.deepClone(index2); }, // 设置对应列选项的所有值 setColumnValues(columnIndex, values) { this.innerColumns.splice(columnIndex, 1, values); let tmpIndex = uni.$u.deepClone(this.innerIndex); for (let i2 = 0; i2 < this.innerColumns.length; i2++) { if (i2 > this.columnIndex) { tmpIndex[i2] = 0; } } this.setIndexs(tmpIndex); }, // 获取对应列的所有选项 getColumnValues(columnIndex) { (async () => { await uni.$u.sleep(); })(); return this.innerColumns[columnIndex]; }, // 设置整体各列的columns的值 setColumns(columns) { this.innerColumns = uni.$u.deepClone(columns); if (this.innerIndex.length === 0) { this.innerIndex = new Array(columns.length).fill(0); } }, // 获取各列选中值对应的索引 getIndexs() { return this.innerIndex; }, // 获取各列选中的值 getValues() { (async () => { await uni.$u.sleep(); })(); return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]); } } }; function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$2); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_1$6); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_1$4); return vue.openBlock(), vue.createBlock(_component_u_popup, { show: _ctx.show, onClose: $options.closeHandler }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-picker" }, [ _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, { key: 0, cancelColor: _ctx.cancelColor, confirmColor: _ctx.confirmColor, cancelText: _ctx.cancelText, confirmText: _ctx.confirmText, title: _ctx.title, onCancel: $options.cancel, onConfirm: $options.confirm }, null, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("picker-view", { class: "u-picker__view", indicatorStyle: `height: ${_ctx.$u.addUnit(_ctx.itemHeight)}`, value: $data.innerIndex, immediateChange: _ctx.immediateChange, style: vue.normalizeStyle({ height: `${_ctx.$u.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}` }), onChange: _cache[0] || (_cache[0] = (...args) => $options.changeHandler && $options.changeHandler(...args)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.innerColumns, (item, index2) => { return vue.openBlock(), vue.createElementBlock("picker-view-column", { key: index2, class: "u-picker__view__column" }, [ _ctx.$u.test.array(item) ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(item, (item1, index1) => { return vue.openBlock(), vue.createElementBlock( "text", { class: "u-picker__view__column__item u-line-1", key: index1, style: vue.normalizeStyle({ height: _ctx.$u.addUnit(_ctx.itemHeight), lineHeight: _ctx.$u.addUnit(_ctx.itemHeight), fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal" }) }, vue.toDisplayString($options.getItemText(item1)), 5 /* TEXT, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 44, ["indicatorStyle", "value", "immediateChange"]), _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-picker--loading" }, [ vue.createVNode(_component_u_loading_icon, { mode: "circle" }) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 1 /* STABLE */ }, 8, ["show", "onClose"]); } const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$e], ["__scopeId", "data-v-1500ce68"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-picker/u-picker.vue"]]); const props$2 = { props: { color: { type: String, default: props$i.line.color }, // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 length: { type: [String, Number], default: props$i.line.length }, // 线条方向,col-竖向,row-横向 direction: { type: String, default: props$i.line.direction }, // 是否显示细边框 hairline: { type: Boolean, default: props$i.line.hairline }, // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px" margin: { type: [String, Number], default: props$i.line.margin }, // 是否虚线,true-虚线,false-实线 dashed: { type: Boolean, default: props$i.line.dashed } } }; const _sfc_main$Q = { name: "u-line", mixins: [mpMixin, mixin, props$2], computed: { lineStyle() { const style = {}; style.margin = this.margin; if (this.direction === "row") { style.borderBottomWidth = "1px"; style.borderBottomStyle = this.dashed ? "dashed" : "solid"; style.width = uni.$u.addUnit(this.length); if (this.hairline) style.transform = "scaleY(0.5)"; } else { style.borderLeftWidth = "1px"; style.borderLeftStyle = this.dashed ? "dashed" : "solid"; style.height = uni.$u.addUnit(this.length); if (this.hairline) style.transform = "scaleX(0.5)"; } style.borderColor = this.color; return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); } } }; function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-line", style: vue.normalizeStyle([$options.lineStyle]) }, null, 4 /* STYLE */ ); } const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$d], ["__scopeId", "data-v-bbd9963c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-line/u-line.vue"]]); const props$1 = { props: { // 是否展示modal show: { type: Boolean, default: props$i.modal.show }, // 标题 title: { type: [String], default: props$i.modal.title }, // 弹窗内容 content: { type: String, default: props$i.modal.content }, // 确认文案 confirmText: { type: String, default: props$i.modal.confirmText }, // 取消文案 cancelText: { type: String, default: props$i.modal.cancelText }, // 是否显示确认按钮 showConfirmButton: { type: Boolean, default: props$i.modal.showConfirmButton }, // 是否显示取消按钮 showCancelButton: { type: Boolean, default: props$i.modal.showCancelButton }, // 确认按钮颜色 confirmColor: { type: String, default: props$i.modal.confirmColor }, // 取消文字颜色 cancelColor: { type: String, default: props$i.modal.cancelColor }, // 对调确认和取消的位置 buttonReverse: { type: Boolean, default: props$i.modal.buttonReverse }, // 是否开启缩放效果 zoom: { type: Boolean, default: props$i.modal.zoom }, // 是否异步关闭,只对确定按钮有效 asyncClose: { type: Boolean, default: props$i.modal.asyncClose }, // 是否允许点击遮罩关闭modal closeOnClickOverlay: { type: Boolean, default: props$i.modal.closeOnClickOverlay }, // 给一个负的margin-top,往上偏移,避免和键盘重合的情况 negativeTop: { type: [String, Number], default: props$i.modal.negativeTop }, // modal宽度,不支持百分比,可以数值,px,rpx单位 width: { type: [String, Number], default: props$i.modal.width }, // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮 confirmButtonShape: { type: String, default: props$i.modal.confirmButtonShape } } }; const _sfc_main$P = { name: "u-modal", mixins: [mpMixin, mixin, props$1], data() { return { loading: false }; }, watch: { show(n2) { if (n2 && this.loading) this.loading = false; } }, emits: ["confirm", "cancel", "close"], methods: { // 点击确定按钮 confirmHandler() { if (this.asyncClose) { this.loading = true; } this.$emit("confirm"); }, // 点击取消按钮 cancelHandler() { this.$emit("cancel"); }, // 点击遮罩 // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩 // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中 // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在 // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发 clickHandler() { if (this.closeOnClickOverlay) { this.$emit("close"); } } } }; function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$1); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_1$6); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_1$4); return vue.openBlock(), vue.createBlock(_component_u_popup, { mode: "center", zoom: _ctx.zoom, show: _ctx.show, customStyle: { borderRadius: "6px", overflow: "hidden", marginTop: `-${_ctx.$u.addUnit(_ctx.negativeTop)}` }, closeOnClickOverlay: _ctx.closeOnClickOverlay, safeAreaInsetBottom: false, duration: 400, onClick: $options.clickHandler }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "u-modal", style: vue.normalizeStyle({ width: _ctx.$u.addUnit(_ctx.width) }) }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-modal__title" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-modal__content", style: vue.normalizeStyle({ paddingTop: `${_ctx.title ? 12 : 25}px` }) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: "u-modal__content__text" }, vue.toDisplayString(_ctx.content), 1 /* TEXT */ ) ], true) ], 4 /* STYLE */ ), _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-modal__button-group--confirm-button" }, [ vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true) ])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createVNode(_component_u_line), vue.createElementVNode( "view", { class: "u-modal__button-group", style: vue.normalizeStyle({ flexDirection: _ctx.buttonReverse ? "row-reverse" : "row" }) }, [ _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel", [_ctx.showCancelButton && !_ctx.showConfirmButton && "u-modal__button-group__wrapper--only-cancel"]]), "hover-stay-time": 150, "hover-class": "u-modal__button-group__wrapper--hover", onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args)) }, [ vue.createElementVNode( "text", { class: "u-modal__button-group__wrapper__text", style: vue.normalizeStyle({ color: _ctx.cancelColor }) }, vue.toDisplayString(_ctx.cancelText), 5 /* TEXT, STYLE */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 1, direction: "column" })) : vue.createCommentVNode("v-if", true), _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm", [!_ctx.showCancelButton && _ctx.showConfirmButton && "u-modal__button-group__wrapper--only-confirm"]]), "hover-stay-time": 150, "hover-class": "u-modal__button-group__wrapper--hover", onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args)) }, [ $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-modal__button-group__wrapper__text", style: vue.normalizeStyle({ color: _ctx.confirmColor }) }, vue.toDisplayString(_ctx.confirmText), 5 /* TEXT, STYLE */ )) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 64 /* STABLE_FRAGMENT */ )) ], 4 /* STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["zoom", "show", "customStyle", "closeOnClickOverlay", "onClick"]); } const __easycom_6 = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$c], ["__scopeId", "data-v-12b77a26"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-modal/u-modal.vue"]]); const _sfc_main$O = { __name: "landInfo", props: { land_id: String, is_cropped: Boolean }, setup(__props) { const props2 = __props; const land = vue.reactive({}); const objFn = (res, data) => { for (let key in res) { data[key] = res[key]; } }; vue.watch(props2, (newValue, oldVlaue) => { if (props2 == null ? void 0 : props2.land_id) { landInfoAPI({ land_id: props2.land_id, user_id: 307 }).then((res) => { objFn(res.data, land); }); } }, { immediate: true }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(land.crop_id) + "号土地 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 溯源码: " + vue.toDisplayString(land.source_code), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 当前种植: " + vue.toDisplayString(land.crop_name), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 种植品牌: " + vue.toDisplayString(land.crop_brand), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 土地面积: " + vue.toDisplayString(land.land_area) + "亩 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 种子品牌: " + vue.toDisplayString(land.crop_variety), 1 /* TEXT */ ) ]), land.crop_yield ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 预计产量: " + vue.toDisplayString(land.crop_yield) + "亩 ", 1 /* TEXT */ ), vue.createCommentVNode(' \r\n 已出售: ???\r\n ') ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 播种时间: " + vue.toDisplayString(land.seed_time), 1 /* TEXT */ ) ]) ]); }; } }; const landInfo = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-5f103973"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/plant/landInfo.vue"]]); const addFishAPI = (data) => syhttp.post("/FishBreed/addFish", data); const pondInfoAPI = (data) => syhttp.get("/FishBreed/pondInfo", data); const addFishPicAPI = (data) => syhttp.post("/FishBreed/addFishPic", data); const pondEnvDataAPI = (data) => syhttp.get("/FishBreed/pondEnvData", data); const fishPicListAPI = (data) => syhttp.get("/FishBreed/fishPicList", data); const _sfc_main$N = { __name: "index", setup(__props) { const options1 = vue.reactive([{ text: "删除" }]); const showPicker = vue.ref(false); const columns = vue.reactive([ ["中国", "美国", "日本"] ]); const confirmFn = (e2) => { showPicker.value = false; formData.select = e2.value[0]; }; const land_id = vue.ref(0); const pond_id = vue.ref(0); vue.ref(0); const actionData = vue.reactive({}); onLoad((options) => { land_id.value = options.land_id; pond_id.value = options.pond_id; actionsListAPI({ type: options.type }).then((res) => { for (let key in res.data) { actionData[key] = res.data[key]; } }); }); const showPop = vue.ref(false); const formData = vue.reactive({ text: "", select: "", pic: "", serch: "" }); const confirm = () => { showPop.value = false; formatAppLog("log", "at pages/growRecord/index.vue:275", formData); for (let key in formData) { formData[key] = ""; } }; const showModal = vue.ref(false); const delFn = () => { showModal.value = false; uni.showToast({ title: "删除成功", icon: "success", duration: 1e3 }); }; const popList = vue.reactive([]); const showPopFn = (id) => { popList.splice(0, popList.length); showPop.value = true; columns[0].splice(0, columns[0].length); actionsDetailAPI({ action_id: id }).then((res) => { res.data.forEach((item) => { popList.push(item); if (item.type == 4) { columns[0] = Array.from(item.options); formatAppLog("log", "at pages/growRecord/index.vue:312", columns[0]); } }); }); }; const updateImgFn = () => { uplodeImg().then((res) => { formData.pic = res.data.image; }); }; return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_2); const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_3); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_1$4); const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$3); const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_6); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ popupShow: showPop.value }) }, [ vue.createElementVNode("view", { class: "cont" }, [ vue.createCommentVNode(' \r\n \r\n \r\n 1号土地\r\n \r\n \r\n 溯源码: 12302\r\n \r\n \r\n \r\n \r\n 当前种植: 土豆\r\n \r\n \r\n 种植品牌: 的划分等级\r\n \r\n \r\n \r\n \r\n 土地面积: 20亩\r\n \r\n \r\n 种子品牌: 的划分等级\r\n \r\n \r\n \r\n \r\n 播种时间: 2020.12.01\r\n \r\n \r\n \r\n '), vue.createVNode(landInfo, { land_id: land_id.value }, null, 8, ["land_id"]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(actionData, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "operate", key: index2 }, [ vue.createElementVNode( "view", { class: "tit" }, vue.toDisplayString(index2), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "card" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.actions, (items, indexs) => { return vue.openBlock(), vue.createElementBlock("view", { class: "operate-li", style: { "margin": "20rpx 0", "margin-right": "20rpx" }, onClick: ($event) => showPopFn(items.id), key: indexs }, vue.toDisplayString(items.name), 9, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(` \r 喂食\r \r \r 注射疫苗\r \r \r 胶水dassdd\r \r \r 胶水\r \r \r 胶水\r `) ]), vue.createElementVNode("view", { class: "" }) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "fertilize" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "fertilize-tit" }, [ vue.createElementVNode("view", { class: "" }, " 施肥 "), vue.createElementVNode("view", { class: "fertilize-tit-r" }, [ vue.createElementVNode("view", { class: "", style: { "color": "red" }, onClick: _cache[0] || (_cache[0] = ($event) => showModal.value = true) }, " 删除 "), vue.createElementVNode("view", { style: { "margin-left": "40rpx", "color": "#00A15E" } }, " 编辑 ") ]) ]), vue.createElementVNode("view", { class: "fertilize-li" }, [ vue.createElementVNode("view", { class: "" }, " 肥料类型: 地生上的飞机 "), vue.createElementVNode("view", { class: "" }, " 肥料品牌: 地生上的 ") ]), vue.createElementVNode("view", { class: "fertilize-li" }, [ vue.createElementVNode("view", { class: "" }, " 兑水浓度: 地生上的飞机 "), vue.createElementVNode("view", { class: "" }, " 备注: 地生上的 ") ]) ]) ]) ]), vue.createElementVNode("view", { class: "ripe-btn" }, " 完成今日操作 "), vue.createCommentVNode(" 组件 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_u_popup, { show: showPop.value, round: 10, closeable: true, onClose: _cache[5] || (_cache[5] = ($event) => showPop.value = false), onOpen: _cache[6] || (_cache[6] = ($event) => showPop.value = true) }, { default: vue.withCtx(() => [ vue.createElementVNode("scroll-view", { "scroll-y": "", style: { "max-height": "90vh" } }, [ vue.createCommentVNode(" 滚动内容 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(popList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "pop-content", key: index2 }, [ vue.createCommentVNode(" 文本框 "), item.type == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "pop-li" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入", border: "surround", modelValue: formData.text, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.text = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 下拉框 "), item.type == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "pop-li" }, [ vue.createVNode(_component_up_input, { placeholder: "点击选择", border: "surround", modelValue: formData.select, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.select = $event), onClick: _cache[3] || (_cache[3] = ($event) => showPicker.value = true) }, null, 8, ["modelValue"]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 上传图片 "), item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "pop-li", onClick: updateImgFn }, [ formData.pic ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createVNode(_component_u__image, { src: formData.pic, width: "100%", height: "196.26rpx" }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "code-img" }, [ vue.createElementVNode("view", { class: "carime-icon" }, [ vue.createVNode(_component_u__image, { src: "/static/img/DJSC.png", width: "91.12rpx", height: "91.12rpx" }), vue.createElementVNode("view", { class: "" }, " 点击上传图片 ") ]) ])) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 搜索框 "), item.type == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "pop-li" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.serch, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => formData.serch = $event) }, null, 8, ["modelValue"]) ]), (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList([1], (item2) => { return vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" }, key: item2 }, [ vue.createVNode(_component_u_swipe_action, null, { default: vue.withCtx(() => [ vue.createVNode(_component_u_swipe_action_item, { options: options1, style: { "border-radius": "20rpx", "border": "1px solid #C7C6CD" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "", style: { "padding": "20rpx 30rpx" } }, [ vue.createElementVNode("view", { class: "swipe-action-tit" }, [ vue.createElementVNode("view", { class: "" }, " 编号: 123456 "), (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 健康 ")), vue.createCommentVNode("v-if", true), vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "swipe-action-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖品种:黑山猪 "), vue.createElementVNode("view", { class: "" }, " 年龄: 5年 "), vue.createElementVNode("view", { class: "" }, " 体重: 150kg ") ]) ]) ]), _: 1 /* STABLE */ }, 8, ["options"]) ]), _: 1 /* STABLE */ }) ]); }), 64 /* STABLE_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "pop-confirm", onClick: confirm }, " 确认 ") ]) ]), _: 1 /* STABLE */ }, 8, ["show"]) ]), vue.createCommentVNode(" 组件 "), vue.createVNode(_component_u_picker, { show: showPicker.value, columns, onConfirm: confirmFn, onClose: _cache[7] || (_cache[7] = ($event) => showPicker.value = false), onCancel: _cache[8] || (_cache[8] = ($event) => showPicker.value = false) }, null, 8, ["show", "columns"]), vue.createVNode(_component_u_modal, { show: showModal.value, showCancelButton: true, closeOnClickOverlay: true, onClose: _cache[9] || (_cache[9] = ($event) => showModal.value = false), content: "确认删除吗?", onConfirm: delFn, onCancel: _cache[10] || (_cache[10] = ($event) => showModal.value = false) }, null, 8, ["show"]) ], 2 /* CLASS */ ); }; } }; const PagesGrowRecordIndex = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-c4917c49"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/growRecord/index.vue"]]); const _sfc_main$M = { __name: "imgCard", props: { imgUrl: String, text: String }, setup(__props) { const props2 = __props; const userInfoStores = userInfoStore(); const address = vue.ref(""); let userInfo = userInfoStores.userInfo; address.value = userInfo.area_name + userInfo.street_name + userInfo.village_name + userInfo.brigade_name; return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode("view", { class: "head-img" }, [ vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_u__image, { src: props2.imgUrl, width: "693.93rpx", height: " 394.28rpx", alt: "" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "poisition" }, [ vue.createCommentVNode(" {{props.text}} "), vue.createTextVNode( " " + vue.toDisplayString(address.value), 1 /* TEXT */ ) ]) ]) ]); }; } }; const imgCard = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-7e7d0af4"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/imgCard.vue"]]); const _sfc_main$L = { __name: "plant", setup(__props) { const crop_yield = vue.ref(""); const showPop = vue.ref(false); const tableDate = vue.reactive({}); const landDeatil = vue.reactive({}); const data = vue.reactive([ { tit: "土壤温度", icon: "TRWD", dw: "℃", cont: "soil_temp", flag: false }, { tit: "土壤湿度", icon: "TRSD", dw: "%RH", cont: "soil_mois" }, { tit: "磷含量", icon: "FX", cont: "k_content", dw: "%" }, { tit: "氮含量", icon: "FS", dw: "mg/l", cont: "n_content" }, { tit: "钾含量", icon: "JYL", dw: "%", cont: "p_content" } ]); const baseData = vue.reactive({}); onLoad(async (options) => { let res = await landInfoAPI({ user_id: 307, land_id: options.land_id }); objFn(res.data, landDeatil); let res2 = await actionsAPI$1({ type: 1 }); objFn(res2.data, tableDate); let res3 = await landEnvDataCurrAPI({ user_id: 307 }); objFn(res3.data, baseData); }); const updateImgFn = () => { let image2 = ""; uplodeImg().then((res) => { image2 = res.data.image; landDeatil.pic = image2; addLandCropPicAPI({ crop_id: landDeatil.crop_id, pic: image2 }).then((res2) => { formatAppLog("log", "at pages/detail/plant.vue:252", res2); }); }); }; const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const dateFn = () => { var today = /* @__PURE__ */ new Date(); var year = today.getFullYear(); var month = today.getMonth() + 1; var day = today.getDate(); var dateStr = year + "-" + month + "-" + day; return dateStr; }; const urlFn = (name) => { return `/static/img/${name}.png`; }; const markFn = () => { setLandCropRipeAPI({ crop_id: landDeatil.crop_id, crop_yield: Number(crop_yield.value) }); }; const objFn = (res, data2) => { for (let key in res) { data2[key] = res[key]; } }; return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createVNode(imgCard, { imgUrl: landDeatil.pic, text: "地址" }, null, 8, ["imgUrl"]), vue.createElementVNode("view", { class: "bad-info" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: urlFn("sj"), style: { "margin": "0 5rpx" }, width: "28.04rpx", height: "28.04rpx" }, null, 8, ["src"]), vue.createElementVNode( "text", null, "刷新时间:" + vue.toDisplayString(dateFn()), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { style: { "display": "flex" }, onClick: _cache[0] || (_cache[0] = ($event) => navgo(`/pages/allPlant/index?crop_id=${landDeatil.crop_id}&land_id=${landDeatil.land_id}`)) }, [ vue.createTextVNode(" 查看历史记录 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ]) ]), vue.createElementVNode("view", { class: "up-plant-btn", onClick: updateImgFn }, " 上传新的种植情况 "), vue.createVNode(landInfo, { land_id: landDeatil.land_id }, null, 8, ["land_id"]), vue.createCommentVNode(" 生长记录 "), vue.createCommentVNode(' \r\n \r\n 生长记录操作\r\n \r\n \r\n 更新生长记录\r\n \r\n \r\n \r\n '), vue.createCommentVNode(" dsfdsf\r\n {{tableDate}} "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(tableDate, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "circumstance", key: index2 }, [ vue.createCommentVNode(" {{index}} "), vue.createCommentVNode(" {{tableDate}}\r\n dsfdsf "), vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(index2), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "updata-btn", onClick: _cache[1] || (_cache[1] = ($event) => navgo("/pages/growRecord/index?type=1")) }, " 更新" + vue.toDisplayString(index2.slice(0, -2)), 1 /* TEXT */ ) ]), vue.createVNode(myTable, { tit: `查看${index2.slice(0, -2)}`, dataList: item.action_record, route: `/pages/records/index?land_id=${landDeatil.land_id}` }, null, 8, ["tit", "dataList", "route"]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "data" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "justify-content": "space-between", "font-size": "29.79rpx" } }, [ vue.createElementVNode("view", { class: "" }, " 土地监测数据 "), vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" }, onClick: _cache[2] || (_cache[2] = ($event) => navgo("/pages/profile/index")) }, [ vue.createTextVNode(" 查看全部检测记录 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ]) ]), vue.createElementVNode("view", { class: "tit-b" }, [ vue.createVNode(_component_u__image, { src: urlFn("sj"), style: { "margin": "0 5rpx" }, width: "28.04rpx", height: "28.04rpx" }, null, 8, ["src"]), vue.createElementVNode( "text", null, "刷新时间:" + vue.toDisplayString(dateFn()), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "data-cont" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(data, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "data-cont-li center", key: index2 }, [ vue.createElementVNode("view", { style: { "margin": "0 20rpx" } }, [ vue.createElementVNode("view", { class: "center" }, [ vue.createCommentVNode(` `), vue.createVNode(_component_u__image, { src: urlFn(item.icon), style: { "margin": "0 5rpx" }, width: "38.55rpx", height: "38.54rpx" }, null, 8, ["src"]), vue.createTextVNode( " " + vue.toDisplayString(item.tit), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "b-cls" }, [ vue.createElementVNode( "view", { class: "", style: vue.normalizeStyle({ color: item.flag ? "#0095FF" : "" }) }, [ vue.createElementVNode( "text", { style: { "font-size": "70.09rpx" } }, vue.toDisplayString(baseData[item.cont]), 1 /* TEXT */ ), vue.createTextVNode( vue.toDisplayString(item.dw), 1 /* TEXT */ ) ], 4 /* STYLE */ ), item.flag ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: urlFn("D"), style: { "margin": "0 5rpx" }, width: "31.54rpx", height: "31.54rpx" }, null, 8, ["src"]), vue.createElementVNode("text", { style: { "color": "#0095FF" } }, "5") ])) : vue.createCommentVNode("v-if", true) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]), vue.createElementVNode("view", { class: "ripe-btn", onClick: _cache[3] || (_cache[3] = ($event) => showPop.value = true) }, " 标记为成熟 "), vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 组件 "), vue.createCommentVNode(" navgo('/pages/index/index' "), vue.createVNode(_component_u_popup, { show: showPop.value, round: 20, mode: "bottom", onClose: _cache[7] || (_cache[7] = ($event) => showPop.value = false), onOpen: _cache[8] || (_cache[8] = ($event) => showPop.value = true) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "mark" }, [ vue.createElementVNode("view", { class: "head" }, [ vue.createElementVNode("view", { class: "" }, " 农作物成熟标记 "), vue.createElementVNode("view", { class: "", onClick: _cache[5] || (_cache[5] = ($event) => showPop.value = false) }, [ vue.createVNode(_component_u__image, { src: urlFn("GBAN"), style: { "margin": "0 5rpx" }, width: "49.07rpx", height: "49.07rpx" }, null, 8, ["src"]) ]) ]), vue.createElementVNode("view", { class: "mark-li" }, [ vue.createElementVNode("view", { class: "" }, " 种植类型: "), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(landDeatil.crop_name), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "mark-li" }, [ vue.createElementVNode("view", { class: "" }, " 种植品牌: "), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(landDeatil.crop_brand), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "mark-li" }, [ vue.createElementVNode("view", { class: "" }, " 本期溯源码: "), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(landDeatil.source_code), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "mark-li" }, [ vue.createElementVNode("view", { class: "" }, " 成熟日期: "), vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(dateFn()), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "mark-li", style: { "display": "block", "border": "0" } }, [ vue.createElementVNode("view", { class: "" }, " 预计产量: "), vue.createElementVNode("view", { class: "", style: { "margin-top": "20rpx" } }, [ vue.createVNode(_component_up_input, { placeholder: "请输入内容", border: "surround", modelValue: crop_yield.value, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => crop_yield.value = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "ripe-btn", onClick: markFn }, " 确认 ") ]) ]), _: 1 /* STABLE */ }, 8, ["show"]) ]); }; } }; const PagesDetailPlant = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-3bac3d0d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/detail/plant.vue"]]); const _sfc_main$K = { __name: "index", setup(__props) { const imgList = vue.reactive([]); const crop_id = vue.ref(0); const land_id = vue.ref(0); onLoad((options) => { crop_id.value = options.crop_id; land_id.value = options.land_id; landCropPicListAPI({ crop_id: options.crop_id }).then((res) => { res.data.forEach((item) => { imgList.push(item.pic); }); }); }); const updateImgFn = () => { let image2 = ""; uplodeImg().then((res) => { image2 = res.data.image; addLandCropPicAPI({ crop_id: crop_id.value, pic: image2 }).then((res2) => { imgList.unshift(image2); }); }); }; const previewImage = (index2) => { uni.previewImage({ urls: imgList, current: index2 }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n \r\n 1号土地\r\n \r\n \r\n 溯源码: 12302\r\n \r\n \r\n \r\n \r\n 当前种植: 土豆\r\n \r\n \r\n 种植品牌: 的划分等级\r\n \r\n \r\n \r\n \r\n 土地面积: 20亩\r\n \r\n \r\n 种子品牌: 的划分等级\r\n \r\n \r\n \r\n \r\n 预计产量: 20亩\r\n \r\n \r\n 已出售: 的划分等级\r\n \r\n \r\n\r\n\r\n \r\n \r\n 播种时间: 2020.12.01\r\n \r\n\r\n \r\n\r\n '), vue.createVNode(landInfo, { land_id: land_id.value }, null, 8, ["land_id"]), vue.createCommentVNode(` \r \r 今日种植状态\r \r \r \r \r \r \r 播种图片\r \r \r \r `), vue.createElementVNode("view", { class: "status" }, [ vue.createElementVNode("view", { class: "", style: { "margin-bottom": "30rpx" } }, " 生长情况 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(imgList, (item, index2) => { return vue.openBlock(), vue.createBlock(imgCard, { text: "地址", imgUrl: item, key: index2, onClick: ($event) => previewImage(index2) }, null, 8, ["imgUrl", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "up-btn", onClick: updateImgFn }, " 上传新的种植情况 ") ]); }; } }; const PagesAllPlantIndex = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-8f7dbbd5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/allPlant/index.vue"]]); const _sfc_main$J = { __name: "index", setup(__props) { const land_id = vue.ref(0); onLoad((option) => { land_id.value = option.land_id; }); actionsDetailAPI({ action_id: 2 }).then((res) => { formatAppLog("log", "at pages/records/index.vue:84", res); }); const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n \r\n 1号土地\r\n \r\n \r\n 溯源码: 12302\r\n \r\n \r\n \r\n \r\n 当前种植: 土豆\r\n \r\n \r\n 种植品牌: 的划分等级\r\n \r\n \r\n \r\n \r\n 土地面积: 20亩\r\n \r\n \r\n 种子品牌: 的划分等级\r\n \r\n \r\n \r\n \r\n 预计产量: 20亩\r\n \r\n \r\n 已出售: 的划分等级\r\n \r\n \r\n\r\n\r\n \r\n \r\n 播种时间: 2020.12.01\r\n \r\n\r\n \r\n\r\n '), vue.createVNode(landInfo, { land_id: land_id.value }, null, 8, ["land_id"]), vue.createElementVNode("view", { class: "histroy" }, [ vue.createElementVNode("view", { class: "tit", style: { "margin-bottom": "40rpx" } }, " 历史操作记录 "), vue.createVNode(myTable) ]), vue.createElementVNode("view", { class: "btn", onClick: _cache[0] || (_cache[0] = ($event) => navgo(`/pages/growRecord/index?land_id=${land_id.value}`)) }, " 记录今日操作 ") ]); }; } }; const PagesRecordsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-f1512143"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/records/index.vue"]]); const easycom = { custom: { "^u--(.*)": "uview-plus/components/u-$1/u-$1.vue", "^up-(.*)": "uview-plus/components/u-$1/u-$1.vue", "^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue" } }; const pages$1 = [ { path: "pages/index/index", style: { navigationStyle: "custom" } }, { path: "pages/InformationAdd/index", style: { navigationBarTitleText: "信息添加", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/growRecord/index", style: { navigationBarTitleText: "生长记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/detail/plant", style: { navigationBarTitleText: "详情", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/allPlant/index", style: { navigationBarTitleText: "全部种植", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/records/index", style: { navigationBarTitleText: "生长记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/profile/index", style: { navigationBarTitleText: "生长概况", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/feedList", style: { navigationBarTitleText: "养殖列表", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/feedDetail", style: { navigationBarTitleText: "养殖详情", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/histroyFeed", style: { navigationBarTitleText: "历史养殖记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/updateFeed", style: { navigationBarTitleText: "更新饲养状态", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/vaccineInfo", style: { navigationBarTitleText: "疫苗信息", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/addPoultry", style: { navigationBarTitleText: "添加饲养动物", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/allRecordTable", style: { navigationBarTitleText: "记录列表", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/allFeed", style: { navigationBarTitleText: "全部养殖记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/SingleDetail", style: { navigationBarTitleText: "单个详情", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/feedIng/allRecording", style: { navigationBarTitleText: "全部记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/poultry/feedList", style: { navigationBarTitleText: "养殖列表", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/poultry/feedDetail", style: { navigationBarTitleText: "养殖详情", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/poultry/histroyFeed", style: { navigationBarTitleText: "历史养殖记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/poultry/updateFeed", style: { navigationBarTitleText: "更新饲养状态", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/poultry/vaccineInfo", style: { navigationBarTitleText: "疫苗信息", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/poultry/addPoultry", style: { navigationBarTitleText: "添加饲养动物", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/poultry/allFeed", style: { navigationBarTitleText: "全部养殖记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/poultry/SingleDetail", style: { navigationBarTitleText: "单个详情", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/poultry/allRecording", style: { navigationBarTitleText: "全部记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/aquatic/addAquatic", style: { navigationBarTitleText: "添加养殖", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/aquatic/addPond", style: { navigationBarTitleText: "养殖信息", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/aquatic/updateGrow", style: { navigationBarTitleText: "更新生长记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/aquatic/imgList", style: { navigationBarTitleText: "生长记录", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/aquatic/detail", style: { navigationBarTitleText: "详情", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/supervision/group", style: { navigationBarTitleText: "小组公司监管", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/supervision/captain", style: { navigationBarTitleText: "生产队长监管", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/supervision/farmerDeatil", style: { navigationBarTitleText: "农户详情", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/supervision/detail", style: { navigationBarTitleText: "土地详情", enablePullDownRefresh: false, navigationBarBackgroundColor: "#F4F4F4", navigationBarTextStyle: "black" } }, { path: "pages/test/index", style: { navigationBarTitleText: "uni-app", enablePullDownRefresh: true } }, { path: "pages/test/index1", style: { navigationBarTitleText: "uni-app", enablePullDownRefresh: true } } ]; const globalStyle = { navigationBarTextStyle: "black", navigationBarTitleText: "uni-app", navigationBarBackgroundColor: "#F8F8F8", backgroundColor: "#F8F8F8" }; const uniIdRouter = {}; const e = { easycom, pages: pages$1, globalStyle, uniIdRouter }; function t(e2) { return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2; } function n(e2, t2, n2) { return e2(n2 = { path: t2, exports: {}, require: function(e3, t3) { return function() { throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs"); }(null == t3 && n2.path); } }, n2.exports), n2.exports; } var s = n(function(e2, t2) { var n2; e2.exports = (n2 = n2 || function(e3, t3) { var n3 = Object.create || function() { function e4() { } return function(t4) { var n4; return e4.prototype = t4, n4 = new e4(), e4.prototype = null, n4; }; }(), s2 = {}, r2 = s2.lib = {}, i2 = r2.Base = { extend: function(e4) { var t4 = n3(this); return e4 && t4.mixIn(e4), t4.hasOwnProperty("init") && this.init !== t4.init || (t4.init = function() { t4.$super.init.apply(this, arguments); }), t4.init.prototype = t4, t4.$super = this, t4; }, create: function() { var e4 = this.extend(); return e4.init.apply(e4, arguments), e4; }, init: function() { }, mixIn: function(e4) { for (var t4 in e4) e4.hasOwnProperty(t4) && (this[t4] = e4[t4]); e4.hasOwnProperty("toString") && (this.toString = e4.toString); }, clone: function() { return this.init.prototype.extend(this); } }, o2 = r2.WordArray = i2.extend({ init: function(e4, n4) { e4 = this.words = e4 || [], this.sigBytes = n4 != t3 ? n4 : 4 * e4.length; }, toString: function(e4) { return (e4 || c2).stringify(this); }, concat: function(e4) { var t4 = this.words, n4 = e4.words, s3 = this.sigBytes, r3 = e4.sigBytes; if (this.clamp(), s3 % 4) for (var i3 = 0; i3 < r3; i3++) { var o3 = n4[i3 >>> 2] >>> 24 - i3 % 4 * 8 & 255; t4[s3 + i3 >>> 2] |= o3 << 24 - (s3 + i3) % 4 * 8; } else for (i3 = 0; i3 < r3; i3 += 4) t4[s3 + i3 >>> 2] = n4[i3 >>> 2]; return this.sigBytes += r3, this; }, clamp: function() { var t4 = this.words, n4 = this.sigBytes; t4[n4 >>> 2] &= 4294967295 << 32 - n4 % 4 * 8, t4.length = e3.ceil(n4 / 4); }, clone: function() { var e4 = i2.clone.call(this); return e4.words = this.words.slice(0), e4; }, random: function(t4) { for (var n4, s3 = [], r3 = function(t5) { t5 = t5; var n5 = 987654321, s4 = 4294967295; return function() { var r4 = ((n5 = 36969 * (65535 & n5) + (n5 >> 16) & s4) << 16) + (t5 = 18e3 * (65535 & t5) + (t5 >> 16) & s4) & s4; return r4 /= 4294967296, (r4 += 0.5) * (e3.random() > 0.5 ? 1 : -1); }; }, i3 = 0; i3 < t4; i3 += 4) { var a3 = r3(4294967296 * (n4 || e3.random())); n4 = 987654071 * a3(), s3.push(4294967296 * a3() | 0); } return new o2.init(s3, t4); } }), a2 = s2.enc = {}, c2 = a2.Hex = { stringify: function(e4) { for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) { var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255; s3.push((i3 >>> 4).toString(16)), s3.push((15 & i3).toString(16)); } return s3.join(""); }, parse: function(e4) { for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3 += 2) n4[s3 >>> 3] |= parseInt(e4.substr(s3, 2), 16) << 24 - s3 % 8 * 4; return new o2.init(n4, t4 / 2); } }, u2 = a2.Latin1 = { stringify: function(e4) { for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) { var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255; s3.push(String.fromCharCode(i3)); } return s3.join(""); }, parse: function(e4) { for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3++) n4[s3 >>> 2] |= (255 & e4.charCodeAt(s3)) << 24 - s3 % 4 * 8; return new o2.init(n4, t4); } }, l2 = a2.Utf8 = { stringify: function(e4) { try { return decodeURIComponent(escape(u2.stringify(e4))); } catch (e5) { throw new Error("Malformed UTF-8 data"); } }, parse: function(e4) { return u2.parse(unescape(encodeURIComponent(e4))); } }, h2 = r2.BufferedBlockAlgorithm = i2.extend({ reset: function() { this._data = new o2.init(), this._nDataBytes = 0; }, _append: function(e4) { "string" == typeof e4 && (e4 = l2.parse(e4)), this._data.concat(e4), this._nDataBytes += e4.sigBytes; }, _process: function(t4) { var n4 = this._data, s3 = n4.words, r3 = n4.sigBytes, i3 = this.blockSize, a3 = r3 / (4 * i3), c3 = (a3 = t4 ? e3.ceil(a3) : e3.max((0 | a3) - this._minBufferSize, 0)) * i3, u3 = e3.min(4 * c3, r3); if (c3) { for (var l3 = 0; l3 < c3; l3 += i3) this._doProcessBlock(s3, l3); var h3 = s3.splice(0, c3); n4.sigBytes -= u3; } return new o2.init(h3, u3); }, clone: function() { var e4 = i2.clone.call(this); return e4._data = this._data.clone(), e4; }, _minBufferSize: 0 }); r2.Hasher = h2.extend({ cfg: i2.extend(), init: function(e4) { this.cfg = this.cfg.extend(e4), this.reset(); }, reset: function() { h2.reset.call(this), this._doReset(); }, update: function(e4) { return this._append(e4), this._process(), this; }, finalize: function(e4) { return e4 && this._append(e4), this._doFinalize(); }, blockSize: 16, _createHelper: function(e4) { return function(t4, n4) { return new e4.init(n4).finalize(t4); }; }, _createHmacHelper: function(e4) { return function(t4, n4) { return new d2.HMAC.init(e4, n4).finalize(t4); }; } }); var d2 = s2.algo = {}; return s2; }(Math), n2); }), r = s, i = (n(function(e2, t2) { var n2; e2.exports = (n2 = r, function(e3) { var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = []; !function() { for (var t4 = 0; t4 < 64; t4++) a2[t4] = 4294967296 * e3.abs(e3.sin(t4 + 1)) | 0; }(); var c2 = o2.MD5 = i2.extend({ _doReset: function() { this._hash = new r2.init([1732584193, 4023233417, 2562383102, 271733878]); }, _doProcessBlock: function(e4, t4) { for (var n3 = 0; n3 < 16; n3++) { var s3 = t4 + n3, r3 = e4[s3]; e4[s3] = 16711935 & (r3 << 8 | r3 >>> 24) | 4278255360 & (r3 << 24 | r3 >>> 8); } var i3 = this._hash.words, o3 = e4[t4 + 0], c3 = e4[t4 + 1], p2 = e4[t4 + 2], f2 = e4[t4 + 3], g2 = e4[t4 + 4], m2 = e4[t4 + 5], y2 = e4[t4 + 6], _2 = e4[t4 + 7], w2 = e4[t4 + 8], v2 = e4[t4 + 9], I2 = e4[t4 + 10], S2 = e4[t4 + 11], b2 = e4[t4 + 12], k = e4[t4 + 13], A2 = e4[t4 + 14], P2 = e4[t4 + 15], T2 = i3[0], C2 = i3[1], x = i3[2], O2 = i3[3]; T2 = u2(T2, C2, x, O2, o3, 7, a2[0]), O2 = u2(O2, T2, C2, x, c3, 12, a2[1]), x = u2(x, O2, T2, C2, p2, 17, a2[2]), C2 = u2(C2, x, O2, T2, f2, 22, a2[3]), T2 = u2(T2, C2, x, O2, g2, 7, a2[4]), O2 = u2(O2, T2, C2, x, m2, 12, a2[5]), x = u2(x, O2, T2, C2, y2, 17, a2[6]), C2 = u2(C2, x, O2, T2, _2, 22, a2[7]), T2 = u2(T2, C2, x, O2, w2, 7, a2[8]), O2 = u2(O2, T2, C2, x, v2, 12, a2[9]), x = u2(x, O2, T2, C2, I2, 17, a2[10]), C2 = u2(C2, x, O2, T2, S2, 22, a2[11]), T2 = u2(T2, C2, x, O2, b2, 7, a2[12]), O2 = u2(O2, T2, C2, x, k, 12, a2[13]), x = u2(x, O2, T2, C2, A2, 17, a2[14]), T2 = l2(T2, C2 = u2(C2, x, O2, T2, P2, 22, a2[15]), x, O2, c3, 5, a2[16]), O2 = l2(O2, T2, C2, x, y2, 9, a2[17]), x = l2(x, O2, T2, C2, S2, 14, a2[18]), C2 = l2(C2, x, O2, T2, o3, 20, a2[19]), T2 = l2(T2, C2, x, O2, m2, 5, a2[20]), O2 = l2(O2, T2, C2, x, I2, 9, a2[21]), x = l2(x, O2, T2, C2, P2, 14, a2[22]), C2 = l2(C2, x, O2, T2, g2, 20, a2[23]), T2 = l2(T2, C2, x, O2, v2, 5, a2[24]), O2 = l2(O2, T2, C2, x, A2, 9, a2[25]), x = l2(x, O2, T2, C2, f2, 14, a2[26]), C2 = l2(C2, x, O2, T2, w2, 20, a2[27]), T2 = l2(T2, C2, x, O2, k, 5, a2[28]), O2 = l2(O2, T2, C2, x, p2, 9, a2[29]), x = l2(x, O2, T2, C2, _2, 14, a2[30]), T2 = h2(T2, C2 = l2(C2, x, O2, T2, b2, 20, a2[31]), x, O2, m2, 4, a2[32]), O2 = h2(O2, T2, C2, x, w2, 11, a2[33]), x = h2(x, O2, T2, C2, S2, 16, a2[34]), C2 = h2(C2, x, O2, T2, A2, 23, a2[35]), T2 = h2(T2, C2, x, O2, c3, 4, a2[36]), O2 = h2(O2, T2, C2, x, g2, 11, a2[37]), x = h2(x, O2, T2, C2, _2, 16, a2[38]), C2 = h2(C2, x, O2, T2, I2, 23, a2[39]), T2 = h2(T2, C2, x, O2, k, 4, a2[40]), O2 = h2(O2, T2, C2, x, o3, 11, a2[41]), x = h2(x, O2, T2, C2, f2, 16, a2[42]), C2 = h2(C2, x, O2, T2, y2, 23, a2[43]), T2 = h2(T2, C2, x, O2, v2, 4, a2[44]), O2 = h2(O2, T2, C2, x, b2, 11, a2[45]), x = h2(x, O2, T2, C2, P2, 16, a2[46]), T2 = d2(T2, C2 = h2(C2, x, O2, T2, p2, 23, a2[47]), x, O2, o3, 6, a2[48]), O2 = d2(O2, T2, C2, x, _2, 10, a2[49]), x = d2(x, O2, T2, C2, A2, 15, a2[50]), C2 = d2(C2, x, O2, T2, m2, 21, a2[51]), T2 = d2(T2, C2, x, O2, b2, 6, a2[52]), O2 = d2(O2, T2, C2, x, f2, 10, a2[53]), x = d2(x, O2, T2, C2, I2, 15, a2[54]), C2 = d2(C2, x, O2, T2, c3, 21, a2[55]), T2 = d2(T2, C2, x, O2, w2, 6, a2[56]), O2 = d2(O2, T2, C2, x, P2, 10, a2[57]), x = d2(x, O2, T2, C2, y2, 15, a2[58]), C2 = d2(C2, x, O2, T2, k, 21, a2[59]), T2 = d2(T2, C2, x, O2, g2, 6, a2[60]), O2 = d2(O2, T2, C2, x, S2, 10, a2[61]), x = d2(x, O2, T2, C2, p2, 15, a2[62]), C2 = d2(C2, x, O2, T2, v2, 21, a2[63]), i3[0] = i3[0] + T2 | 0, i3[1] = i3[1] + C2 | 0, i3[2] = i3[2] + x | 0, i3[3] = i3[3] + O2 | 0; }, _doFinalize: function() { var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes; n3[r3 >>> 5] |= 128 << 24 - r3 % 32; var i3 = e3.floor(s3 / 4294967296), o3 = s3; n3[15 + (r3 + 64 >>> 9 << 4)] = 16711935 & (i3 << 8 | i3 >>> 24) | 4278255360 & (i3 << 24 | i3 >>> 8), n3[14 + (r3 + 64 >>> 9 << 4)] = 16711935 & (o3 << 8 | o3 >>> 24) | 4278255360 & (o3 << 24 | o3 >>> 8), t4.sigBytes = 4 * (n3.length + 1), this._process(); for (var a3 = this._hash, c3 = a3.words, u3 = 0; u3 < 4; u3++) { var l3 = c3[u3]; c3[u3] = 16711935 & (l3 << 8 | l3 >>> 24) | 4278255360 & (l3 << 24 | l3 >>> 8); } return a3; }, clone: function() { var e4 = i2.clone.call(this); return e4._hash = this._hash.clone(), e4; } }); function u2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (t4 & n3 | ~t4 & s3) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } function l2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (t4 & s3 | n3 & ~s3) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } function h2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (t4 ^ n3 ^ s3) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } function d2(e4, t4, n3, s3, r3, i3, o3) { var a3 = e4 + (n3 ^ (t4 | ~s3)) + r3 + o3; return (a3 << i3 | a3 >>> 32 - i3) + t4; } t3.MD5 = i2._createHelper(c2), t3.HmacMD5 = i2._createHmacHelper(c2); }(Math), n2.MD5); }), n(function(e2, t2) { var n2; e2.exports = (n2 = r, void function() { var e3 = n2, t3 = e3.lib.Base, s2 = e3.enc.Utf8; e3.algo.HMAC = t3.extend({ init: function(e4, t4) { e4 = this._hasher = new e4.init(), "string" == typeof t4 && (t4 = s2.parse(t4)); var n3 = e4.blockSize, r2 = 4 * n3; t4.sigBytes > r2 && (t4 = e4.finalize(t4)), t4.clamp(); for (var i2 = this._oKey = t4.clone(), o2 = this._iKey = t4.clone(), a2 = i2.words, c2 = o2.words, u2 = 0; u2 < n3; u2++) a2[u2] ^= 1549556828, c2[u2] ^= 909522486; i2.sigBytes = o2.sigBytes = r2, this.reset(); }, reset: function() { var e4 = this._hasher; e4.reset(), e4.update(this._iKey); }, update: function(e4) { return this._hasher.update(e4), this; }, finalize: function(e4) { var t4 = this._hasher, n3 = t4.finalize(e4); return t4.reset(), t4.finalize(this._oKey.clone().concat(n3)); } }); }()); }), n(function(e2, t2) { e2.exports = r.HmacMD5; })), o = n(function(e2, t2) { e2.exports = r.enc.Utf8; }), a = n(function(e2, t2) { var n2; e2.exports = (n2 = r, function() { var e3 = n2, t3 = e3.lib.WordArray; function s2(e4, n3, s3) { for (var r2 = [], i2 = 0, o2 = 0; o2 < n3; o2++) if (o2 % 4) { var a2 = s3[e4.charCodeAt(o2 - 1)] << o2 % 4 * 2, c2 = s3[e4.charCodeAt(o2)] >>> 6 - o2 % 4 * 2; r2[i2 >>> 2] |= (a2 | c2) << 24 - i2 % 4 * 8, i2++; } return t3.create(r2, i2); } e3.enc.Base64 = { stringify: function(e4) { var t4 = e4.words, n3 = e4.sigBytes, s3 = this._map; e4.clamp(); for (var r2 = [], i2 = 0; i2 < n3; i2 += 3) for (var o2 = (t4[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255) << 16 | (t4[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255) << 8 | t4[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255, a2 = 0; a2 < 4 && i2 + 0.75 * a2 < n3; a2++) r2.push(s3.charAt(o2 >>> 6 * (3 - a2) & 63)); var c2 = s3.charAt(64); if (c2) for (; r2.length % 4; ) r2.push(c2); return r2.join(""); }, parse: function(e4) { var t4 = e4.length, n3 = this._map, r2 = this._reverseMap; if (!r2) { r2 = this._reverseMap = []; for (var i2 = 0; i2 < n3.length; i2++) r2[n3.charCodeAt(i2)] = i2; } var o2 = n3.charAt(64); if (o2) { var a2 = e4.indexOf(o2); -1 !== a2 && (t4 = a2); } return s2(e4, t4, r2); }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" }; }(), n2.enc.Base64); }); const c = "FUNCTION", u = "OBJECT", l = "CLIENT_DB", h = "pending", d = "fulfilled", p = "rejected"; function f(e2) { return Object.prototype.toString.call(e2).slice(8, -1).toLowerCase(); } function g(e2) { return "object" === f(e2); } function m(e2) { return "function" == typeof e2; } function y(e2) { return function() { try { return e2.apply(e2, arguments); } catch (e3) { console.error(e3); } }; } const _ = "REJECTED", w = "NOT_PENDING"; class v { constructor({ createPromise: e2, retryRule: t2 = _ } = {}) { this.createPromise = e2, this.status = null, this.promise = null, this.retryRule = t2; } get needRetry() { if (!this.status) return true; switch (this.retryRule) { case _: return this.status === p; case w: return this.status !== h; } } exec() { return this.needRetry ? (this.status = h, this.promise = this.createPromise().then((e2) => (this.status = d, Promise.resolve(e2)), (e2) => (this.status = p, Promise.reject(e2))), this.promise) : this.promise; } } function I(e2) { return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2; } const S = true, b = "app", A = I([]), P = b, T = I(""), C = I("[]") || []; let O = ""; try { O = "__UNI__B1D7CFE"; } catch (e2) { } let E = {}; function L(e2, t2 = {}) { var n2, s2; return n2 = E, s2 = e2, Object.prototype.hasOwnProperty.call(n2, s2) || (E[e2] = t2), E[e2]; } E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {}; const R = ["invoke", "success", "fail", "complete"], U = L("_globalUniCloudInterceptor"); function N(e2, t2) { U[e2] || (U[e2] = {}), g(t2) && Object.keys(t2).forEach((n2) => { R.indexOf(n2) > -1 && function(e3, t3, n3) { let s2 = U[e3][t3]; s2 || (s2 = U[e3][t3] = []), -1 === s2.indexOf(n3) && m(n3) && s2.push(n3); }(e2, n2, t2[n2]); }); } function D(e2, t2) { U[e2] || (U[e2] = {}), g(t2) ? Object.keys(t2).forEach((n2) => { R.indexOf(n2) > -1 && function(e3, t3, n3) { const s2 = U[e3][t3]; if (!s2) return; const r2 = s2.indexOf(n3); r2 > -1 && s2.splice(r2, 1); }(e2, n2, t2[n2]); }) : delete U[e2]; } function M(e2, t2) { return e2 && 0 !== e2.length ? e2.reduce((e3, n2) => e3.then(() => n2(t2)), Promise.resolve()) : Promise.resolve(); } function q(e2, t2) { return U[e2] && U[e2][t2] || []; } function F(e2) { N("callObject", e2); } const K = L("_globalUniCloudListener"), j = "response", B = "needLogin", $ = "refreshToken", W = "clientdb", H = "cloudfunction", z = "cloudobject"; function J(e2) { return K[e2] || (K[e2] = []), K[e2]; } function V(e2, t2) { const n2 = J(e2); n2.includes(t2) || n2.push(t2); } function G(e2, t2) { const n2 = J(e2), s2 = n2.indexOf(t2); -1 !== s2 && n2.splice(s2, 1); } function Y(e2, t2) { const n2 = J(e2); for (let e3 = 0; e3 < n2.length; e3++) { (0, n2[e3])(t2); } } let Q, X = false; function Z() { return Q || (Q = new Promise((e2) => { X && e2(), function t2() { if ("function" == typeof getCurrentPages) { const t3 = getCurrentPages(); t3 && t3[0] && (X = true, e2()); } X || setTimeout(() => { t2(); }, 30); }(); }), Q); } function ee(e2) { const t2 = {}; for (const n2 in e2) { const s2 = e2[n2]; m(s2) && (t2[n2] = y(s2)); } return t2; } class te extends Error { constructor(e2) { super(e2.message), this.errMsg = e2.message || e2.errMsg || "unknown system error", this.code = this.errCode = e2.code || e2.errCode || "SYSTEM_ERROR", this.errSubject = this.subject = e2.subject || e2.errSubject, this.cause = e2.cause, this.requestId = e2.requestId; } toJson(e2 = 0) { if (!(e2 >= 10)) return e2++, { errCode: this.errCode, errMsg: this.errMsg, errSubject: this.errSubject, cause: this.cause && this.cause.toJson ? this.cause.toJson(e2) : this.cause }; } } var ne = { request: (e2) => uni.request(e2), uploadFile: (e2) => uni.uploadFile(e2), setStorageSync: (e2, t2) => uni.setStorageSync(e2, t2), getStorageSync: (e2) => uni.getStorageSync(e2), removeStorageSync: (e2) => uni.removeStorageSync(e2), clearStorageSync: () => uni.clearStorageSync() }; function se(e2) { return e2 && se(e2.__v_raw) || e2; } function re() { return { token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"), tokenExpired: ne.getStorageSync("uni_id_token_expired") }; } function ie({ token: e2, tokenExpired: t2 } = {}) { e2 && ne.setStorageSync("uni_id_token", e2), t2 && ne.setStorageSync("uni_id_token_expired", t2); } let oe, ae; function ce() { return oe || (oe = uni.getSystemInfoSync()), oe; } function ue() { let e2, t2; try { if (uni.getLaunchOptionsSync) { if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return; const { scene: n2, channel: s2 } = uni.getLaunchOptionsSync(); e2 = s2, t2 = n2; } } catch (e3) { } return { channel: e2, scene: t2 }; } function le() { const e2 = uni.getLocale && uni.getLocale() || "en"; if (ae) return { ...ae, locale: e2, LOCALE: e2 }; const t2 = ce(), { deviceId: n2, osName: s2, uniPlatform: r2, appId: i2 } = t2, o2 = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"]; for (let e3 = 0; e3 < o2.length; e3++) { delete t2[o2[e3]]; } return ae = { PLATFORM: r2, OS: s2, APPID: i2, DEVICEID: n2, ...ue(), ...t2 }, { ...ae, locale: e2, LOCALE: e2 }; } var he = { sign: function(e2, t2) { let n2 = ""; return Object.keys(e2).sort().forEach(function(t3) { e2[t3] && (n2 = n2 + "&" + t3 + "=" + e2[t3]); }), n2 = n2.slice(1), i(n2, t2).toString(); }, wrappedRequest: function(e2, t2) { return new Promise((n2, s2) => { t2(Object.assign(e2, { complete(e3) { e3 || (e3 = {}); const t3 = e3.data && e3.data.header && e3.data.header["x-serverless-request-id"] || e3.header && e3.header["request-id"]; if (!e3.statusCode || e3.statusCode >= 400) return s2(new te({ code: "SYS_ERR", message: e3.errMsg || "request:fail", requestId: t3 })); const r2 = e3.data; if (r2.error) return s2(new te({ code: r2.error.code, message: r2.error.message, requestId: t3 })); r2.result = r2.data, r2.requestId = t3, delete r2.data, n2(r2); } })); }); }, toBase64: function(e2) { return a.stringify(o.parse(e2)); } }; var de = class { constructor(e2) { ["spaceId", "clientSecret"].forEach((t2) => { if (!Object.prototype.hasOwnProperty.call(e2, t2)) throw new Error(`${t2} required`); }), this.config = Object.assign({}, { endpoint: 0 === e2.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com" }, e2), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = ne, this._getAccessTokenPromiseHub = new v({ createPromise: () => this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then((e3) => { if (!e3.result || !e3.result.accessToken) throw new te({ code: "AUTH_FAILED", message: "获取accessToken失败" }); this.setAccessToken(e3.result.accessToken); }), retryRule: w }); } get hasAccessToken() { return !!this.accessToken; } setAccessToken(e2) { this.accessToken = e2; } requestWrapped(e2) { return he.wrappedRequest(e2, this.adapter.request); } requestAuth(e2) { return this.requestWrapped(e2); } request(e2, t2) { return Promise.resolve().then(() => this.hasAccessToken ? t2 ? this.requestWrapped(e2) : this.requestWrapped(e2).catch((t3) => new Promise((e3, n2) => { !t3 || "GATEWAY_INVALID_TOKEN" !== t3.code && "InvalidParameter.InvalidToken" !== t3.code ? n2(t3) : e3(); }).then(() => this.getAccessToken()).then(() => { const t4 = this.rebuildRequest(e2); return this.request(t4, true); })) : this.getAccessToken().then(() => { const t3 = this.rebuildRequest(e2); return this.request(t3, true); })); } rebuildRequest(e2) { const t2 = Object.assign({}, e2); return t2.data.token = this.accessToken, t2.header["x-basement-token"] = this.accessToken, t2.header["x-serverless-sign"] = he.sign(t2.data, this.config.clientSecret), t2; } setupRequest(e2, t2) { const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" }; return "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = he.sign(n2, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: s2 }; } getAccessToken() { return this._getAccessTokenPromiseHub.exec(); } async authorize() { await this.getAccessToken(); } callFunction(e2) { const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) }; return this.request(this.setupRequest(t2)); } getOSSUploadOptionsFromPath(e2) { const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) }; return this.request(this.setupRequest(t2)); } uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) { return new Promise((o2, a2) => { const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, header: { "X-OSS-server-side-encrpytion": "AES256" }, success(e3) { e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); }, fail(e3) { a2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" })); } }); "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => { i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend }); }); }); } reportOSSUpload(e2) { const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) }; return this.request(this.setupRequest(t2)); } async uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", cloudPathAsRealPath: s2 = false, onUploadProgress: r2, config: i2 }) { if ("string" !== f(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" }); if (!(t2 = t2.trim())) throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" }); if (/:\/\//.test(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" }); const o2 = i2 && i2.envType || this.config.envType; if (s2 && ("/" !== t2[0] && (t2 = "/" + t2), t2.indexOf("\\") > -1)) throw new te({ code: "INVALID_PARAM", message: "使用cloudPath作为路径时,cloudPath不可包含“\\”" }); const a2 = (await this.getOSSUploadOptionsFromPath({ env: o2, filename: s2 ? t2.split("/").pop() : t2, fileId: s2 ? t2 : void 0 })).result, c2 = "https://" + a2.cdnDomain + "/" + a2.ossPath, { securityToken: u2, accessKeyId: l2, signature: h2, host: d2, ossPath: p2, id: g2, policy: m2, ossCallbackUrl: y2 } = a2, _2 = { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: l2, Signature: h2, host: d2, id: g2, key: p2, policy: m2, success_action_status: 200 }; if (u2 && (_2["x-oss-security-token"] = u2), y2) { const e3 = JSON.stringify({ callbackUrl: y2, callbackBody: JSON.stringify({ fileId: g2, spaceId: this.config.spaceId }), callbackBodyType: "application/json" }); _2.callback = he.toBase64(e3); } const w2 = { url: "https://" + a2.host, formData: _2, fileName: "file", name: "file", filePath: e2, fileType: n2 }; if (await this.uploadFileToOSS(Object.assign({}, w2, { onUploadProgress: r2 })), y2) return { success: true, filePath: e2, fileID: c2 }; if ((await this.reportOSSUpload({ id: g2 })).success) return { success: true, filePath: e2, fileID: c2 }; throw new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }); } getTempFileURL({ fileList: e2 } = {}) { return new Promise((t2, n2) => { Array.isArray(e2) && 0 !== e2.length || n2(new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t2({ fileList: e2.map((e3) => ({ fileID: e3, tempFileURL: e3 })) }); }); } async getFileInfo({ fileList: e2 } = {}) { if (!Array.isArray(e2) || 0 === e2.length) throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" }); const t2 = { method: "serverless.file.resource.info", params: JSON.stringify({ id: e2.map((e3) => e3.split("?")[0]).join(",") }) }; return { fileList: (await this.request(this.setupRequest(t2))).result }; } }; var pe = { init(e2) { const t2 = new de(e2), n2 = { signInAnonymously: function() { return t2.authorize(); }, getLoginState: function() { return Promise.resolve(false); } }; return t2.auth = function() { return n2; }, t2.customAuth = t2.auth, t2; } }; const fe = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:"; var ge; !function(e2) { e2.local = "local", e2.none = "none", e2.session = "session"; }(ge || (ge = {})); var me = function() { }, ye = n(function(e2, t2) { var n2; e2.exports = (n2 = r, function(e3) { var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [], c2 = []; !function() { function t4(t5) { for (var n4 = e3.sqrt(t5), s4 = 2; s4 <= n4; s4++) if (!(t5 % s4)) return false; return true; } function n3(e4) { return 4294967296 * (e4 - (0 | e4)) | 0; } for (var s3 = 2, r3 = 0; r3 < 64; ) t4(s3) && (r3 < 8 && (a2[r3] = n3(e3.pow(s3, 0.5))), c2[r3] = n3(e3.pow(s3, 1 / 3)), r3++), s3++; }(); var u2 = [], l2 = o2.SHA256 = i2.extend({ _doReset: function() { this._hash = new r2.init(a2.slice(0)); }, _doProcessBlock: function(e4, t4) { for (var n3 = this._hash.words, s3 = n3[0], r3 = n3[1], i3 = n3[2], o3 = n3[3], a3 = n3[4], l3 = n3[5], h2 = n3[6], d2 = n3[7], p2 = 0; p2 < 64; p2++) { if (p2 < 16) u2[p2] = 0 | e4[t4 + p2]; else { var f2 = u2[p2 - 15], g2 = (f2 << 25 | f2 >>> 7) ^ (f2 << 14 | f2 >>> 18) ^ f2 >>> 3, m2 = u2[p2 - 2], y2 = (m2 << 15 | m2 >>> 17) ^ (m2 << 13 | m2 >>> 19) ^ m2 >>> 10; u2[p2] = g2 + u2[p2 - 7] + y2 + u2[p2 - 16]; } var _2 = s3 & r3 ^ s3 & i3 ^ r3 & i3, w2 = (s3 << 30 | s3 >>> 2) ^ (s3 << 19 | s3 >>> 13) ^ (s3 << 10 | s3 >>> 22), v2 = d2 + ((a3 << 26 | a3 >>> 6) ^ (a3 << 21 | a3 >>> 11) ^ (a3 << 7 | a3 >>> 25)) + (a3 & l3 ^ ~a3 & h2) + c2[p2] + u2[p2]; d2 = h2, h2 = l3, l3 = a3, a3 = o3 + v2 | 0, o3 = i3, i3 = r3, r3 = s3, s3 = v2 + (w2 + _2) | 0; } n3[0] = n3[0] + s3 | 0, n3[1] = n3[1] + r3 | 0, n3[2] = n3[2] + i3 | 0, n3[3] = n3[3] + o3 | 0, n3[4] = n3[4] + a3 | 0, n3[5] = n3[5] + l3 | 0, n3[6] = n3[6] + h2 | 0, n3[7] = n3[7] + d2 | 0; }, _doFinalize: function() { var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes; return n3[r3 >>> 5] |= 128 << 24 - r3 % 32, n3[14 + (r3 + 64 >>> 9 << 4)] = e3.floor(s3 / 4294967296), n3[15 + (r3 + 64 >>> 9 << 4)] = s3, t4.sigBytes = 4 * n3.length, this._process(), this._hash; }, clone: function() { var e4 = i2.clone.call(this); return e4._hash = this._hash.clone(), e4; } }); t3.SHA256 = i2._createHelper(l2), t3.HmacSHA256 = i2._createHmacHelper(l2); }(Math), n2.SHA256); }), _e = ye, we = n(function(e2, t2) { e2.exports = r.HmacSHA256; }); const ve = () => { let e2; if (!Promise) { e2 = () => { }, e2.promise = {}; const t3 = () => { throw new te({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' }); }; return Object.defineProperty(e2.promise, "then", { get: t3 }), Object.defineProperty(e2.promise, "catch", { get: t3 }), e2; } const t2 = new Promise((t3, n2) => { e2 = (e3, s2) => e3 ? n2(e3) : t3(s2); }); return e2.promise = t2, e2; }; function Ie(e2) { return void 0 === e2; } function Se(e2) { return "[object Null]" === Object.prototype.toString.call(e2); } var be; function ke(e2) { const t2 = (n2 = e2, "[object Array]" === Object.prototype.toString.call(n2) ? e2 : [e2]); var n2; for (const e3 of t2) { const { isMatch: t3, genAdapter: n3, runtime: s2 } = e3; if (t3()) return { adapter: n3(), runtime: s2 }; } } !function(e2) { e2.WEB = "web", e2.WX_MP = "wx_mp"; }(be || (be = {})); const Ae = { adapter: null, runtime: void 0 }, Pe = ["anonymousUuidKey"]; class Te extends me { constructor() { super(), Ae.adapter.root.tcbObject || (Ae.adapter.root.tcbObject = {}); } setItem(e2, t2) { Ae.adapter.root.tcbObject[e2] = t2; } getItem(e2) { return Ae.adapter.root.tcbObject[e2]; } removeItem(e2) { delete Ae.adapter.root.tcbObject[e2]; } clear() { delete Ae.adapter.root.tcbObject; } } function Ce(e2, t2) { switch (e2) { case "local": return t2.localStorage || new Te(); case "none": return new Te(); default: return t2.sessionStorage || new Te(); } } class xe { constructor(e2) { if (!this._storage) { this._persistence = Ae.adapter.primaryStorage || e2.persistence, this._storage = Ce(this._persistence, Ae.adapter); const t2 = `access_token_${e2.env}`, n2 = `access_token_expire_${e2.env}`, s2 = `refresh_token_${e2.env}`, r2 = `anonymous_uuid_${e2.env}`, i2 = `login_type_${e2.env}`, o2 = `user_info_${e2.env}`; this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: r2, loginTypeKey: i2, userInfoKey: o2 }; } } updatePersistence(e2) { if (e2 === this._persistence) return; const t2 = "local" === this._persistence; this._persistence = e2; const n2 = Ce(e2, Ae.adapter); for (const e3 in this.keys) { const s2 = this.keys[e3]; if (t2 && Pe.includes(e3)) continue; const r2 = this._storage.getItem(s2); Ie(r2) || Se(r2) || (n2.setItem(s2, r2), this._storage.removeItem(s2)); } this._storage = n2; } setStore(e2, t2, n2) { if (!this._storage) return; const s2 = { version: n2 || "localCachev1", content: t2 }, r2 = JSON.stringify(s2); try { this._storage.setItem(e2, r2); } catch (e3) { throw e3; } } getStore(e2, t2) { try { if (!this._storage) return; } catch (e3) { return ""; } t2 = t2 || "localCachev1"; const n2 = this._storage.getItem(e2); if (!n2) return ""; if (n2.indexOf(t2) >= 0) { return JSON.parse(n2).content; } return ""; } removeStore(e2) { this._storage.removeItem(e2); } } const Oe = {}, Ee = {}; function Le(e2) { return Oe[e2]; } class Re { constructor(e2, t2) { this.data = t2 || null, this.name = e2; } } class Ue extends Re { constructor(e2, t2) { super("error", { error: e2, data: t2 }), this.error = e2; } } const Ne = new class { constructor() { this._listeners = {}; } on(e2, t2) { return function(e3, t3, n2) { n2[e3] = n2[e3] || [], n2[e3].push(t3); }(e2, t2, this._listeners), this; } off(e2, t2) { return function(e3, t3, n2) { if (n2 && n2[e3]) { const s2 = n2[e3].indexOf(t3); -1 !== s2 && n2[e3].splice(s2, 1); } }(e2, t2, this._listeners), this; } fire(e2, t2) { if (e2 instanceof Ue) return console.error(e2.error), this; const n2 = "string" == typeof e2 ? new Re(e2, t2 || {}) : e2; const s2 = n2.name; if (this._listens(s2)) { n2.target = this; const e3 = this._listeners[s2] ? [...this._listeners[s2]] : []; for (const t3 of e3) t3.call(this, n2); } return this; } _listens(e2) { return this._listeners[e2] && this._listeners[e2].length > 0; } }(); function De(e2, t2) { Ne.on(e2, t2); } function Me(e2, t2 = {}) { Ne.fire(e2, t2); } function qe(e2, t2) { Ne.off(e2, t2); } const Fe = "loginStateChanged", Ke = "loginStateExpire", je = "loginTypeChanged", Be = "anonymousConverted", $e = "refreshAccessToken"; var We; !function(e2) { e2.ANONYMOUS = "ANONYMOUS", e2.WECHAT = "WECHAT", e2.WECHAT_PUBLIC = "WECHAT-PUBLIC", e2.WECHAT_OPEN = "WECHAT-OPEN", e2.CUSTOM = "CUSTOM", e2.EMAIL = "EMAIL", e2.USERNAME = "USERNAME", e2.NULL = "NULL"; }(We || (We = {})); const He = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], ze = { "X-SDK-Version": "1.3.5" }; function Je(e2, t2, n2) { const s2 = e2[t2]; e2[t2] = function(t3) { const r2 = {}, i2 = {}; n2.forEach((n3) => { const { data: s3, headers: o3 } = n3.call(e2, t3); Object.assign(r2, s3), Object.assign(i2, o3); }); const o2 = t3.data; return o2 && (() => { var e3; if (e3 = o2, "[object FormData]" !== Object.prototype.toString.call(e3)) t3.data = { ...o2, ...r2 }; else for (const e4 in r2) o2.append(e4, r2[e4]); })(), t3.headers = { ...t3.headers || {}, ...i2 }, s2.call(e2, t3); }; } function Ve() { const e2 = Math.random().toString(16).slice(2); return { data: { seqId: e2 }, headers: { ...ze, "x-seqid": e2 } }; } class Ge { constructor(e2 = {}) { var t2; this.config = e2, this._reqClass = new Ae.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `请求在${this.config.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] }), this._cache = Le(this.config.env), this._localCache = (t2 = this.config.env, Ee[t2]), Je(this._reqClass, "post", [Ve]), Je(this._reqClass, "upload", [Ve]), Je(this._reqClass, "download", [Ve]); } async post(e2) { return await this._reqClass.post(e2); } async upload(e2) { return await this._reqClass.upload(e2); } async download(e2) { return await this._reqClass.download(e2); } async refreshAccessToken() { let e2, t2; this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken()); try { e2 = await this._refreshAccessTokenPromise; } catch (e3) { t2 = e3; } if (this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t2) throw t2; return e2; } async _refreshAccessToken() { const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2, loginTypeKey: s2, anonymousUuidKey: r2 } = this._cache.keys; this._cache.removeStore(e2), this._cache.removeStore(t2); let i2 = this._cache.getStore(n2); if (!i2) throw new te({ message: "未登录CloudBase" }); const o2 = { refresh_token: i2 }, a2 = await this.request("auth.fetchAccessTokenWithRefreshToken", o2); if (a2.data.code) { const { code: e3 } = a2.data; if ("SIGN_PARAM_INVALID" === e3 || "REFRESH_TOKEN_EXPIRED" === e3 || "INVALID_REFRESH_TOKEN" === e3) { if (this._cache.getStore(s2) === We.ANONYMOUS && "INVALID_REFRESH_TOKEN" === e3) { const e4 = this._cache.getStore(r2), t3 = this._cache.getStore(n2), s3 = await this.send("auth.signInAnonymously", { anonymous_uuid: e4, refresh_token: t3 }); return this.setRefreshToken(s3.refresh_token), this._refreshAccessToken(); } Me(Ke), this._cache.removeStore(n2); } throw new te({ code: a2.data.code, message: `刷新access token失败:${a2.data.code}` }); } if (a2.data.access_token) return Me($e), this._cache.setStore(e2, a2.data.access_token), this._cache.setStore(t2, a2.data.access_token_expire + Date.now()), { accessToken: a2.data.access_token, accessTokenExpire: a2.data.access_token_expire }; a2.data.refresh_token && (this._cache.removeStore(n2), this._cache.setStore(n2, a2.data.refresh_token), this._refreshAccessToken()); } async getAccessToken() { const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2 } = this._cache.keys; if (!this._cache.getStore(n2)) throw new te({ message: "refresh token不存在,登录状态异常" }); let s2 = this._cache.getStore(e2), r2 = this._cache.getStore(t2), i2 = true; return this._shouldRefreshAccessTokenHook && !await this._shouldRefreshAccessTokenHook(s2, r2) && (i2 = false), (!s2 || !r2 || r2 < Date.now()) && i2 ? this.refreshAccessToken() : { accessToken: s2, accessTokenExpire: r2 }; } async request(e2, t2, n2) { const s2 = `x-tcb-trace_${this.config.env}`; let r2 = "application/x-www-form-urlencoded"; const i2 = { action: e2, env: this.config.env, dataVersion: "2019-08-16", ...t2 }; if (-1 === He.indexOf(e2)) { const { refreshTokenKey: e3 } = this._cache.keys; this._cache.getStore(e3) && (i2.access_token = (await this.getAccessToken()).accessToken); } let o2; if ("storage.uploadFile" === e2) { o2 = new FormData(); for (let e3 in o2) o2.hasOwnProperty(e3) && void 0 !== o2[e3] && o2.append(e3, i2[e3]); r2 = "multipart/form-data"; } else { r2 = "application/json", o2 = {}; for (let e3 in i2) void 0 !== i2[e3] && (o2[e3] = i2[e3]); } let a2 = { headers: { "content-type": r2 } }; n2 && n2.onUploadProgress && (a2.onUploadProgress = n2.onUploadProgress); const c2 = this._localCache.getStore(s2); c2 && (a2.headers["X-TCB-Trace"] = c2); const { parse: u2, inQuery: l2, search: h2 } = t2; let d2 = { env: this.config.env }; u2 && (d2.parse = true), l2 && (d2 = { ...l2, ...d2 }); let p2 = function(e3, t3, n3 = {}) { const s3 = /\?/.test(t3); let r3 = ""; for (let e4 in n3) "" === r3 ? !s3 && (t3 += "?") : r3 += "&", r3 += `${e4}=${encodeURIComponent(n3[e4])}`; return /^http(s)?\:\/\//.test(t3 += r3) ? t3 : `${e3}${t3}`; }(fe, "//tcb-api.tencentcloudapi.com/web", d2); h2 && (p2 += h2); const f2 = await this.post({ url: p2, data: o2, ...a2 }), g2 = f2.header && f2.header["x-tcb-trace"]; if (g2 && this._localCache.setStore(s2, g2), 200 !== Number(f2.status) && 200 !== Number(f2.statusCode) || !f2.data) throw new te({ code: "NETWORK_ERROR", message: "network request error" }); return f2; } async send(e2, t2 = {}) { const n2 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress }); if ("ACCESS_TOKEN_EXPIRED" === n2.data.code && -1 === He.indexOf(e2)) { await this.refreshAccessToken(); const n3 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress }); if (n3.data.code) throw new te({ code: n3.data.code, message: n3.data.message }); return n3.data; } if (n2.data.code) throw new te({ code: n2.data.code, message: n2.data.message }); return n2.data; } setRefreshToken(e2) { const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys; this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2); } } const Ye = {}; function Qe(e2) { return Ye[e2]; } class Xe { constructor(e2) { this.config = e2, this._cache = Le(e2.env), this._request = Qe(e2.env); } setRefreshToken(e2) { const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys; this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2); } setAccessToken(e2, t2) { const { accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys; this._cache.setStore(n2, e2), this._cache.setStore(s2, t2); } async refreshUserInfo() { const { data: e2 } = await this._request.send("auth.getUserInfo", {}); return this.setLocalUserInfo(e2), e2; } setLocalUserInfo(e2) { const { userInfoKey: t2 } = this._cache.keys; this._cache.setStore(t2, e2); } } class Ze { constructor(e2) { if (!e2) throw new te({ code: "PARAM_ERROR", message: "envId is not defined" }); this._envId = e2, this._cache = Le(this._envId), this._request = Qe(this._envId), this.setUserInfo(); } linkWithTicket(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "ticket must be string" }); return this._request.send("auth.linkWithTicket", { ticket: e2 }); } linkWithRedirect(e2) { e2.signInWithRedirect(); } updatePassword(e2, t2) { return this._request.send("auth.updatePassword", { oldPassword: t2, newPassword: e2 }); } updateEmail(e2) { return this._request.send("auth.updateEmail", { newEmail: e2 }); } updateUsername(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "username must be a string" }); return this._request.send("auth.updateUsername", { username: e2 }); } async getLinkedUidList() { const { data: e2 } = await this._request.send("auth.getLinkedUidList", {}); let t2 = false; const { users: n2 } = e2; return n2.forEach((e3) => { e3.wxOpenId && e3.wxPublicId && (t2 = true); }), { users: n2, hasPrimaryUid: t2 }; } setPrimaryUid(e2) { return this._request.send("auth.setPrimaryUid", { uid: e2 }); } unlink(e2) { return this._request.send("auth.unlink", { platform: e2 }); } async update(e2) { const { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 } = e2, { data: a2 } = await this._request.send("auth.updateUserInfo", { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 }); this.setLocalUserInfo(a2); } async refresh() { const { data: e2 } = await this._request.send("auth.getUserInfo", {}); return this.setLocalUserInfo(e2), e2; } setUserInfo() { const { userInfoKey: e2 } = this._cache.keys, t2 = this._cache.getStore(e2); ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach((e3) => { this[e3] = t2[e3]; }), this.location = { country: t2.country, province: t2.province, city: t2.city }; } setLocalUserInfo(e2) { const { userInfoKey: t2 } = this._cache.keys; this._cache.setStore(t2, e2), this.setUserInfo(); } } class et { constructor(e2) { if (!e2) throw new te({ code: "PARAM_ERROR", message: "envId is not defined" }); this._cache = Le(e2); const { refreshTokenKey: t2, accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys, r2 = this._cache.getStore(t2), i2 = this._cache.getStore(n2), o2 = this._cache.getStore(s2); this.credential = { refreshToken: r2, accessToken: i2, accessTokenExpire: o2 }, this.user = new Ze(e2); } get isAnonymousAuth() { return this.loginType === We.ANONYMOUS; } get isCustomAuth() { return this.loginType === We.CUSTOM; } get isWeixinAuth() { return this.loginType === We.WECHAT || this.loginType === We.WECHAT_OPEN || this.loginType === We.WECHAT_PUBLIC; } get loginType() { return this._cache.getStore(this._cache.keys.loginTypeKey); } } class tt extends Xe { async signIn() { this._cache.updatePersistence("local"); const { anonymousUuidKey: e2, refreshTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2) || void 0, s2 = this._cache.getStore(t2) || void 0, r2 = await this._request.send("auth.signInAnonymously", { anonymous_uuid: n2, refresh_token: s2 }); if (r2.uuid && r2.refresh_token) { this._setAnonymousUUID(r2.uuid), this.setRefreshToken(r2.refresh_token), await this._request.refreshAccessToken(), Me(Fe), Me(je, { env: this.config.env, loginType: We.ANONYMOUS, persistence: "local" }); const e3 = new et(this.config.env); return await e3.user.refresh(), e3; } throw new te({ message: "匿名登录失败" }); } async linkAndRetrieveDataWithTicket(e2) { const { anonymousUuidKey: t2, refreshTokenKey: n2 } = this._cache.keys, s2 = this._cache.getStore(t2), r2 = this._cache.getStore(n2), i2 = await this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s2, refresh_token: r2, ticket: e2 }); if (i2.refresh_token) return this._clearAnonymousUUID(), this.setRefreshToken(i2.refresh_token), await this._request.refreshAccessToken(), Me(Be, { env: this.config.env }), Me(je, { loginType: We.CUSTOM, persistence: "local" }), { credential: { refreshToken: i2.refresh_token } }; throw new te({ message: "匿名转化失败" }); } _setAnonymousUUID(e2) { const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys; this._cache.removeStore(t2), this._cache.setStore(t2, e2), this._cache.setStore(n2, We.ANONYMOUS); } _clearAnonymousUUID() { this._cache.removeStore(this._cache.keys.anonymousUuidKey); } } class nt extends Xe { async signIn(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "ticket must be a string" }); const { refreshTokenKey: t2 } = this._cache.keys, n2 = await this._request.send("auth.signInWithTicket", { ticket: e2, refresh_token: this._cache.getStore(t2) || "" }); if (n2.refresh_token) return this.setRefreshToken(n2.refresh_token), await this._request.refreshAccessToken(), Me(Fe), Me(je, { env: this.config.env, loginType: We.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new et(this.config.env); throw new te({ message: "自定义登录失败" }); } } class st extends Xe { async signIn(e2, t2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "email must be a string" }); const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: "EMAIL", email: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token: i2, access_token_expire: o2 } = s2; if (r2) return this.setRefreshToken(r2), i2 && o2 ? this.setAccessToken(i2, o2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), Me(Fe), Me(je, { env: this.config.env, loginType: We.EMAIL, persistence: this.config.persistence }), new et(this.config.env); throw s2.code ? new te({ code: s2.code, message: `邮箱登录失败: ${s2.message}` }) : new te({ message: "邮箱登录失败" }); } async activate(e2) { return this._request.send("auth.activateEndUserMail", { token: e2 }); } async resetPasswordWithToken(e2, t2) { return this._request.send("auth.resetPasswordWithToken", { token: e2, newPassword: t2 }); } } class rt extends Xe { async signIn(e2, t2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "username must be a string" }); "string" != typeof t2 && (t2 = "", console.warn("password is empty")); const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: We.USERNAME, username: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token_expire: i2, access_token: o2 } = s2; if (r2) return this.setRefreshToken(r2), o2 && i2 ? this.setAccessToken(o2, i2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), Me(Fe), Me(je, { env: this.config.env, loginType: We.USERNAME, persistence: this.config.persistence }), new et(this.config.env); throw s2.code ? new te({ code: s2.code, message: `用户名密码登录失败: ${s2.message}` }) : new te({ message: "用户名密码登录失败" }); } } class it { constructor(e2) { this.config = e2, this._cache = Le(e2.env), this._request = Qe(e2.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), De(je, this._onLoginTypeChanged); } get currentUser() { const e2 = this.hasLoginState(); return e2 && e2.user || null; } get loginType() { return this._cache.getStore(this._cache.keys.loginTypeKey); } anonymousAuthProvider() { return new tt(this.config); } customAuthProvider() { return new nt(this.config); } emailAuthProvider() { return new st(this.config); } usernameAuthProvider() { return new rt(this.config); } async signInAnonymously() { return new tt(this.config).signIn(); } async signInWithEmailAndPassword(e2, t2) { return new st(this.config).signIn(e2, t2); } signInWithUsernameAndPassword(e2, t2) { return new rt(this.config).signIn(e2, t2); } async linkAndRetrieveDataWithTicket(e2) { this._anonymousAuthProvider || (this._anonymousAuthProvider = new tt(this.config)), De(Be, this._onAnonymousConverted); return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e2); } async signOut() { if (this.loginType === We.ANONYMOUS) throw new te({ message: "匿名用户不支持登出操作" }); const { refreshTokenKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2 } = this._cache.keys, s2 = this._cache.getStore(e2); if (!s2) return; const r2 = await this._request.send("auth.logout", { refresh_token: s2 }); return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.removeStore(n2), Me(Fe), Me(je, { env: this.config.env, loginType: We.NULL, persistence: this.config.persistence }), r2; } async signUpWithEmailAndPassword(e2, t2) { return this._request.send("auth.signUpWithEmailAndPassword", { email: e2, password: t2 }); } async sendPasswordResetEmail(e2) { return this._request.send("auth.sendPasswordResetEmail", { email: e2 }); } onLoginStateChanged(e2) { De(Fe, () => { const t3 = this.hasLoginState(); e2.call(this, t3); }); const t2 = this.hasLoginState(); e2.call(this, t2); } onLoginStateExpired(e2) { De(Ke, e2.bind(this)); } onAccessTokenRefreshed(e2) { De($e, e2.bind(this)); } onAnonymousConverted(e2) { De(Be, e2.bind(this)); } onLoginTypeChanged(e2) { De(je, () => { const t2 = this.hasLoginState(); e2.call(this, t2); }); } async getAccessToken() { return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env }; } hasLoginState() { const { refreshTokenKey: e2 } = this._cache.keys; return this._cache.getStore(e2) ? new et(this.config.env) : null; } async isUsernameRegistered(e2) { if ("string" != typeof e2) throw new te({ code: "PARAM_ERROR", message: "username must be a string" }); const { data: t2 } = await this._request.send("auth.isUsernameRegistered", { username: e2 }); return t2 && t2.isRegistered; } getLoginState() { return Promise.resolve(this.hasLoginState()); } async signInWithTicket(e2) { return new nt(this.config).signIn(e2); } shouldRefreshAccessToken(e2) { this._request._shouldRefreshAccessTokenHook = e2.bind(this); } getUserInfo() { return this._request.send("auth.getUserInfo", {}).then((e2) => e2.code ? e2 : { ...e2.data, requestId: e2.seqId }); } getAuthHeader() { const { refreshTokenKey: e2, accessTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2); return { "x-cloudbase-credentials": this._cache.getStore(t2) + "/@@/" + n2 }; } _onAnonymousConverted(e2) { const { env: t2 } = e2.data; t2 === this.config.env && this._cache.updatePersistence(this.config.persistence); } _onLoginTypeChanged(e2) { const { loginType: t2, persistence: n2, env: s2 } = e2.data; s2 === this.config.env && (this._cache.updatePersistence(n2), this._cache.setStore(this._cache.keys.loginTypeKey, t2)); } } const ot = function(e2, t2) { t2 = t2 || ve(); const n2 = Qe(this.config.env), { cloudPath: s2, filePath: r2, onUploadProgress: i2, fileType: o2 = "image" } = e2; return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => { const { data: { url: a2, authorization: c2, token: u2, fileId: l2, cosFileId: h2 }, requestId: d2 } = e3, p2 = { key: s2, signature: c2, "x-cos-meta-fileid": h2, success_action_status: "201", "x-cos-security-token": u2 }; n2.upload({ url: a2, data: p2, file: r2, name: s2, fileType: o2, onUploadProgress: i2 }).then((e4) => { 201 === e4.statusCode ? t2(null, { fileID: l2, requestId: d2 }) : t2(new te({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e4.data}` })); }).catch((e4) => { t2(e4); }); }).catch((e3) => { t2(e3); }), t2.promise; }, at = function(e2, t2) { t2 = t2 || ve(); const n2 = Qe(this.config.env), { cloudPath: s2 } = e2; return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => { t2(null, e3); }).catch((e3) => { t2(e3); }), t2.promise; }, ct = function({ fileList: e2 }, t2) { if (t2 = t2 || ve(), !e2 || !Array.isArray(e2)) return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" }; for (let t3 of e2) if (!t3 || "string" != typeof t3) return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" }; const n2 = { fileid_list: e2 }; return Qe(this.config.env).send("storage.batchDeleteFile", n2).then((e3) => { e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.delete_list, requestId: e3.requestId }); }).catch((e3) => { t2(e3); }), t2.promise; }, ut = function({ fileList: e2 }, t2) { t2 = t2 || ve(), e2 && Array.isArray(e2) || t2(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" }); let n2 = []; for (let s3 of e2) "object" == typeof s3 ? (s3.hasOwnProperty("fileID") && s3.hasOwnProperty("maxAge") || t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是包含fileID和maxAge的对象" }), n2.push({ fileid: s3.fileID, max_age: s3.maxAge })) : "string" == typeof s3 ? n2.push({ fileid: s3 }) : t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是字符串" }); const s2 = { file_list: n2 }; return Qe(this.config.env).send("storage.batchGetDownloadUrl", s2).then((e3) => { e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.download_list, requestId: e3.requestId }); }).catch((e3) => { t2(e3); }), t2.promise; }, lt = async function({ fileID: e2 }, t2) { const n2 = (await ut.call(this, { fileList: [{ fileID: e2, maxAge: 600 }] })).fileList[0]; if ("SUCCESS" !== n2.code) return t2 ? t2(n2) : new Promise((e3) => { e3(n2); }); const s2 = Qe(this.config.env); let r2 = n2.download_url; if (r2 = encodeURI(r2), !t2) return s2.download({ url: r2 }); t2(await s2.download({ url: r2 })); }, ht = function({ name: e2, data: t2, query: n2, parse: s2, search: r2 }, i2) { const o2 = i2 || ve(); let a2; try { a2 = t2 ? JSON.stringify(t2) : ""; } catch (e3) { return Promise.reject(e3); } if (!e2) return Promise.reject(new te({ code: "PARAM_ERROR", message: "函数名不能为空" })); const c2 = { inQuery: n2, parse: s2, search: r2, function_name: e2, request_data: a2 }; return Qe(this.config.env).send("functions.invokeFunction", c2).then((e3) => { if (e3.code) o2(null, e3); else { let t3 = e3.data.response_data; if (s2) o2(null, { result: t3, requestId: e3.requestId }); else try { t3 = JSON.parse(e3.data.response_data), o2(null, { result: t3, requestId: e3.requestId }); } catch (e4) { o2(new te({ message: "response data must be json" })); } } return o2.promise; }).catch((e3) => { o2(e3); }), o2.promise; }, dt = { timeout: 15e3, persistence: "session" }, pt = {}; class ft { constructor(e2) { this.config = e2 || this.config, this.authObj = void 0; } init(e2) { switch (Ae.adapter || (this.requestClient = new Ae.adapter.reqClass({ timeout: e2.timeout || 5e3, timeoutMsg: `请求在${(e2.timeout || 5e3) / 1e3}s内未完成,已中断` })), this.config = { ...dt, ...e2 }, true) { case this.config.timeout > 6e5: console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5; break; case this.config.timeout < 100: console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100; } return new ft(this.config); } auth({ persistence: e2 } = {}) { if (this.authObj) return this.authObj; const t2 = e2 || Ae.adapter.primaryStorage || dt.persistence; var n2; return t2 !== this.config.persistence && (this.config.persistence = t2), function(e3) { const { env: t3 } = e3; Oe[t3] = new xe(e3), Ee[t3] = new xe({ ...e3, persistence: "local" }); }(this.config), n2 = this.config, Ye[n2.env] = new Ge(n2), this.authObj = new it(this.config), this.authObj; } on(e2, t2) { return De.apply(this, [e2, t2]); } off(e2, t2) { return qe.apply(this, [e2, t2]); } callFunction(e2, t2) { return ht.apply(this, [e2, t2]); } deleteFile(e2, t2) { return ct.apply(this, [e2, t2]); } getTempFileURL(e2, t2) { return ut.apply(this, [e2, t2]); } downloadFile(e2, t2) { return lt.apply(this, [e2, t2]); } uploadFile(e2, t2) { return ot.apply(this, [e2, t2]); } getUploadMetadata(e2, t2) { return at.apply(this, [e2, t2]); } registerExtension(e2) { pt[e2.name] = e2; } async invokeExtension(e2, t2) { const n2 = pt[e2]; if (!n2) throw new te({ message: `扩展${e2} 必须先注册` }); return await n2.invoke(t2, this); } useAdapters(e2) { const { adapter: t2, runtime: n2 } = ke(e2) || {}; t2 && (Ae.adapter = t2), n2 && (Ae.runtime = n2); } } var gt = new ft(); function mt(e2, t2, n2) { void 0 === n2 && (n2 = {}); var s2 = /\?/.test(t2), r2 = ""; for (var i2 in n2) "" === r2 ? !s2 && (t2 += "?") : r2 += "&", r2 += i2 + "=" + encodeURIComponent(n2[i2]); return /^http(s)?:\/\//.test(t2 += r2) ? t2 : "" + e2 + t2; } class yt { post(e2) { const { url: t2, data: n2, headers: s2 } = e2; return new Promise((e3, r2) => { ne.request({ url: mt("https:", t2), data: n2, method: "POST", header: s2, success(t3) { e3(t3); }, fail(e4) { r2(e4); } }); }); } upload(e2) { return new Promise((t2, n2) => { const { url: s2, file: r2, data: i2, headers: o2, fileType: a2 } = e2, c2 = ne.uploadFile({ url: mt("https:", s2), name: "file", formData: Object.assign({}, i2), filePath: r2, fileType: a2, header: o2, success(e3) { const n3 = { statusCode: e3.statusCode, data: e3.data || {} }; 200 === e3.statusCode && i2.success_action_status && (n3.statusCode = parseInt(i2.success_action_status, 10)), t2(n3); }, fail(e3) { n2(new Error(e3.errMsg || "uploadFile:fail")); } }); "function" == typeof e2.onUploadProgress && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((t3) => { e2.onUploadProgress({ loaded: t3.totalBytesSent, total: t3.totalBytesExpectedToSend }); }); }); } } const _t = { setItem(e2, t2) { ne.setStorageSync(e2, t2); }, getItem: (e2) => ne.getStorageSync(e2), removeItem(e2) { ne.removeStorageSync(e2); }, clear() { ne.clearStorageSync(); } }; var wt = { genAdapter: function() { return { root: {}, reqClass: yt, localStorage: _t, primaryStorage: "local" }; }, isMatch: function() { return true; }, runtime: "uni_app" }; gt.useAdapters(wt); const vt = gt, It = vt.init; vt.init = function(e2) { e2.env = e2.spaceId; const t2 = It.call(this, e2); t2.config.provider = "tencent", t2.config.spaceId = e2.spaceId; const n2 = t2.auth; return t2.auth = function(e3) { const t3 = n2.call(this, e3); return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach((e4) => { var n3; t3[e4] = (n3 = t3[e4], function(e5) { e5 = e5 || {}; const { success: t4, fail: s2, complete: r2 } = ee(e5); if (!(t4 || s2 || r2)) return n3.call(this, e5); n3.call(this, e5).then((e6) => { t4 && t4(e6), r2 && r2(e6); }, (e6) => { s2 && s2(e6), r2 && r2(e6); }); }).bind(t3); }), t3; }, t2.customAuth = t2.auth, t2; }; var St = vt; var bt = class extends de { getAccessToken() { return new Promise((e2, t2) => { const n2 = "Anonymous_Access_token"; this.setAccessToken(n2), e2(n2); }); } setupRequest(e2, t2) { const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" }; "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = he.sign(n2, this.config.clientSecret); const r2 = le(); s2["x-client-info"] = encodeURIComponent(JSON.stringify(r2)); const { token: i2 } = re(); return s2["x-client-token"] = i2, { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: JSON.parse(JSON.stringify(s2)) }; } uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) { return new Promise((o2, a2) => { const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, success(e3) { e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); }, fail(e3) { a2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" })); } }); "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => { i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend }); }); }); } uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) { if (!t2) throw new te({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" }); let r2; return this.getOSSUploadOptionsFromPath({ cloudPath: t2 }).then((t3) => { const { url: i2, formData: o2, name: a2 } = t3.result; r2 = t3.result.fileUrl; const c2 = { url: i2, formData: o2, name: a2, filePath: e2, fileType: n2 }; return this.uploadFileToOSS(Object.assign({}, c2, { onUploadProgress: s2 })); }).then(() => this.reportOSSUpload({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => { t3.success ? n3({ success: true, filePath: e2, fileID: r2 }) : s3(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); })); } deleteFile({ fileList: e2 }) { const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e2 }) }; return this.request(this.setupRequest(t2)).then((e3) => { if (e3.success) return e3.result; throw new te({ code: "DELETE_FILE_FAILED", message: "删除文件失败" }); }); } getTempFileURL({ fileList: e2, maxAge: t2 } = {}) { if (!Array.isArray(e2) || 0 === e2.length) throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" }); const n2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e2, maxAge: t2 }) }; return this.request(this.setupRequest(n2)).then((e3) => { if (e3.success) return { fileList: e3.result.fileList.map((e4) => ({ fileID: e4.fileID, tempFileURL: e4.tempFileURL })) }; throw new te({ code: "GET_TEMP_FILE_URL_FAILED", message: "获取临时文件链接失败" }); }); } }; var kt = { init(e2) { const t2 = new bt(e2), n2 = { signInAnonymously: function() { return t2.authorize(); }, getLoginState: function() { return Promise.resolve(false); } }; return t2.auth = function() { return n2; }, t2.customAuth = t2.auth, t2; } }, At = n(function(e2, t2) { e2.exports = r.enc.Hex; }); function Pt(e2 = "", t2 = {}) { const { data: n2, functionName: s2, method: r2, headers: i2, signHeaderKeys: o2 = [], config: a2 } = t2, c2 = Date.now(), u2 = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e3) { var t3 = 16 * Math.random() | 0; return ("x" === e3 ? t3 : 3 & t3 | 8).toString(16); }), l2 = Object.assign({}, i2, { "x-from-app-id": a2.appId, "x-from-env-id": a2.envId, "x-to-env-id": a2.envId, "x-from-instance-id": c2, "x-from-function-name": s2, "x-client-timestamp": c2, "x-alipay-source": "client", "x-request-id": u2, "x-alipay-callid": u2 }), h2 = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o2), [d2 = "", p2 = ""] = e2.split("?") || [], f2 = function(e3) { const t3 = e3.signedHeaders.join(";"), n3 = e3.signedHeaders.map((t4) => `${t4.toLowerCase()}:${e3.headers[t4]} `).join(""), s3 = _e(e3.body).toString(At), r3 = `${e3.method.toUpperCase()} ${e3.path} ${e3.query} ${n3} ${t3} ${s3} `, i3 = _e(r3).toString(At), o3 = `HMAC-SHA256 ${e3.timestamp} ${i3} `, a3 = we(o3, e3.secretKey).toString(At); return `HMAC-SHA256 Credential=${e3.secretId}, SignedHeaders=${t3}, Signature=${a3}`; }({ path: d2, query: p2, method: r2, headers: l2, timestamp: c2, body: JSON.stringify(n2), secretId: a2.secretId, secretKey: a2.secretKey, signedHeaders: h2.sort() }); return { url: `${a2.endpoint}${e2.replace(/^\//, "")}`, headers: Object.assign({}, l2, { Authorization: f2 }) }; } function Tt({ url: e2, data: t2, method: n2 = "POST", headers: s2 = {} }) { return new Promise((r2, i2) => { ne.request({ url: e2, method: n2, data: t2, header: s2, dataType: "json", complete: (e3 = {}) => { if (!e3.statusCode || e3.statusCode >= 400) { const { errMsg: t3 } = e3.data || {}; return i2(new te({ code: "SYS_ERR", message: t3 || e3.errMsg || "request:fail" })); } r2({ status: e3.statusCode, data: e3.data, headers: e3.header }); } }); }); } function Ct(e2, t2) { const { path: n2, data: s2, method: r2 = "GET" } = e2, { url: i2, headers: o2 } = Pt(n2, { functionName: "", data: s2, method: r2, headers: { "x-alipay-cloud-mode": "oss", "x-data-api-type": "oss", "x-expire-timestamp": Date.now() + 6e4 }, signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"], config: t2 }); return Tt({ url: i2, data: s2, method: r2, headers: o2 }).then((e3) => { const t3 = e3.data || {}; if (!t3.success) throw new te({ code: e3.code, message: e3.message, requestId: e3.trace_id }); return t3.data || {}; }).catch((e3) => { throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId }); }); } function xt(e2 = "") { const t2 = e2.trim().replace(/^cloud:\/\//, ""), n2 = t2.indexOf("/"); if (n2 <= 0) throw new te({ code: "INVALID_PARAM", message: "fileID不合法" }); const s2 = t2.substring(0, n2), r2 = t2.substring(n2 + 1); return s2 !== this.config.envId && console.warn("file ".concat(e2, " does not belong to env ").concat(this.config.envId)), r2; } var Ot = class { constructor(e2) { ["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach((t3) => { if (!Object.prototype.hasOwnProperty.call(e2, t3)) throw new Error(`${t3} required`); }); const { spaceAppId: t2, accessKey: n2, ...s2 } = e2; this.config = Object.assign({}, { endpoint: e2.endpoint || `https://${e2.envId}.api-hz.cloudbasefunction.cn/`, envId: e2.spaceId, appId: t2, secretId: n2 }, s2); } callFunction(e2) { return function(e3, t2) { const { name: n2, data: s2 } = e3, r2 = "POST", { url: i2, headers: o2 } = Pt("/functions/invokeFunction", { functionName: n2, data: s2, method: r2, headers: { "x-to-function-name": n2 }, signHeaderKeys: ["x-to-function-name"], config: t2 }); return Tt({ url: i2, data: s2, method: r2, headers: o2 }).then((e4) => (e4.errCode = 0, e4.success = true, e4.requestId = e4.requestID || e4.requestId, e4.result = e4.data, delete e4.requestID, delete e4.data, e4)).catch((e4) => { throw new te({ code: e4.errCode, message: e4.errMsg, requestId: e4.requestId }); }); }(e2, this.config); } uploadFileToOSS({ url: e2, filePath: t2, fileType: n2, formData: s2, onUploadProgress: r2 }) { return new Promise((i2, o2) => { const a2 = ne.uploadFile({ url: e2, filePath: t2, fileType: n2, formData: s2, success(e3) { e3 && e3.statusCode < 400 ? i2(e3) : o2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" })); }, fail(e3) { o2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" })); } }); "function" == typeof r2 && a2 && "function" == typeof a2.onProgressUpdate && a2.onProgressUpdate((e3) => { r2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend }); }); }); } async uploadFile({ filePath: e2, cloudPath: t2 = "", fileType: n2 = "image", onUploadProgress: s2 }) { if ("string" !== f(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" }); if (!(t2 = t2.trim())) throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" }); if (/:\/\//.test(t2)) throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" }); const r2 = await Ct({ path: "/".concat(t2.replace(/^\//, ""), "?post_url") }, this.config), { file_id: i2, upload_url: o2, form_data: a2 } = r2, c2 = a2 && a2.reduce((e3, t3) => (e3[t3.key] = t3.value, e3), {}); return this.uploadFileToOSS({ url: o2, filePath: e2, fileType: n2, formData: c2, onUploadProgress: s2 }).then(() => ({ fileID: i2 })); } async getTempFileURL({ fileList: e2 }) { return new Promise((t2, n2) => { (!e2 || e2.length < 0) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList不能为空数组" })), e2.length > 50 && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList数组长度不能超过50" })); const s2 = []; for (const t3 of e2) { "string" !== f(t3) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList的元素必须是非空的字符串" })); const e3 = xt.call(this, t3); s2.push({ file_id: e3, expire: 600 }); } Ct({ path: "/?download_url", data: { file_list: s2 }, method: "POST" }, this.config).then((e3) => { const { file_list: n3 = [] } = e3; t2({ fileList: n3.map((e4) => ({ fileID: e4.file_id, tempFileURL: e4.download_url })) }); }).catch((e3) => n2(e3)); }); } async deleteFile({ fileList: e2 }) { return new Promise((t2, n2) => { (!e2 || e2.length < 0) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList不能为空数组" })), e2.length > 50 && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList数组长度不能超过50" })); const s2 = []; for (const t3 of e2) "string" !== f(t3) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList的元素必须是非空的字符串" })), s2.push(xt.call(this, t3)); Ct({ path: "/?delete", data: { file_list: s2 }, method: "POST" }, this.config).then((e3) => { const { file_list: n3 = [] } = e3; t2({ fileList: n3.map((e4) => ({ fileID: e4.file_id, tempFileURL: e4.download_url })) }); }).catch((e3) => n2(e3)); }); } }; var Et = { init: (e2) => { e2.envId = e2.spaceId, e2.provider = "alipay"; const t2 = new Ot(e2); return t2.auth = function() { return { signInAnonymously: function() { return Promise.resolve(); }, getLoginState: function() { return Promise.resolve(true); } }; }, t2; } }; function Lt({ data: e2 }) { let t2; t2 = le(); const n2 = JSON.parse(JSON.stringify(e2 || {})); if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) { const { token: e3 } = re(); e3 && (n2.uniIdToken = e3); } return n2; } async function Rt({ name: e2, data: t2 } = {}) { await this.__dev__.initLocalNetwork(); const { localAddress: n2, localPort: s2 } = this.__dev__, r2 = { aliyun: "aliyun", tencent: "tcb", alipay: "alipay" }[this.config.provider], i2 = this.config.spaceId, o2 = `http://${n2}:${s2}/system/check-function`, a2 = `http://${n2}:${s2}/cloudfunctions/${e2}`; return new Promise((t3, n3) => { ne.request({ method: "POST", url: o2, data: { name: e2, platform: P, provider: r2, spaceId: i2 }, timeout: 3e3, success(e3) { t3(e3); }, fail() { t3({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } }); } }); }).then(({ data: e3 } = {}) => { const { code: t3, message: n3 } = e3 || {}; return { code: 0 === t3 ? 0 : t3 || "SYS_ERR", message: n3 || "SYS_ERR" }; }).then(({ code: n3, message: s3 }) => { if (0 !== n3) { switch (n3) { case "MODULE_ENCRYPTED": console.error(`此云函数(${e2})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`); break; case "FUNCTION_ENCRYPTED": console.error(`此云函数(${e2})已加密不可本地调试,自动切换为云端已部署的云函数`); break; case "ACTION_ENCRYPTED": console.error(s3 || "需要访问加密的uni-clientDB-action,自动切换为云端环境"); break; case "NETWORK_ERROR": { const e3 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下"; throw console.error(e3), new Error(e3); } case "SWITCH_TO_CLOUD": break; default: { const e3 = `检测本地调试服务出现错误:${s3},请检查网络环境或重启客户端再试`; throw console.error(e3), new Error(e3); } } return this._callCloudFunction({ name: e2, data: t2 }); } return new Promise((e3, n4) => { const s4 = Lt.call(this, { data: t2 }); ne.request({ method: "POST", url: a2, data: { provider: r2, platform: P, param: s4 }, success: ({ statusCode: t3, data: s5 } = {}) => !t3 || t3 >= 400 ? n4(new te({ code: s5.code || "SYS_ERR", message: s5.message || "request:fail" })) : e3({ result: s5 }), fail(e4) { n4(new te({ code: e4.code || e4.errCode || "SYS_ERR", message: e4.message || e4.errMsg || "request:fail" })); } }); }); }); } const Ut = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }]; var Nt = /[\\^$.*+?()[\]{}|]/g, Dt = RegExp(Nt.source); function Mt(e2, t2, n2) { return e2.replace(new RegExp((s2 = t2) && Dt.test(s2) ? s2.replace(Nt, "\\$&") : s2, "g"), n2); var s2; } const Ft = "request", Kt = "response", jt = "both"; const kn = { code: 2e4, message: "System error" }, An = { code: 20101, message: "Invalid client" }; function Cn(e2) { const { errSubject: t2, subject: n2, errCode: s2, errMsg: r2, code: i2, message: o2, cause: a2 } = e2 || {}; return new te({ subject: t2 || n2 || "uni-secure-network", code: s2 || i2 || kn.code, message: r2 || o2, cause: a2 }); } let On; function Nn({ secretType: e2 } = {}) { return e2 === Ft || e2 === Kt || e2 === jt; } function Dn({ name: e2, data: t2 = {} } = {}) { return "DCloud-clientDB" === e2 && "encryption" === t2.redirectTo && "getAppClientKey" === t2.action; } function Mn({ provider: e2, spaceId: t2, functionName: n2 } = {}) { const { appId: s2, uniPlatform: r2, osName: i2 } = ce(); let o2 = r2; "app" === r2 && (o2 = i2); const a2 = function({ provider: e3, spaceId: t3 } = {}) { const n3 = A; if (!n3) return {}; e3 = function(e4) { return "tencent" === e4 ? "tcb" : e4; }(e3); const s3 = n3.find((n4) => n4.provider === e3 && n4.spaceId === t3); return s3 && s3.config; }({ provider: e2, spaceId: t2 }); if (!a2 || !a2.accessControl || !a2.accessControl.enable) return false; const c2 = a2.accessControl.function || {}, u2 = Object.keys(c2); if (0 === u2.length) return true; const l2 = function(e3, t3) { let n3, s3, r3; for (let i3 = 0; i3 < e3.length; i3++) { const o3 = e3[i3]; o3 !== t3 ? "*" !== o3 ? o3.split(",").map((e4) => e4.trim()).indexOf(t3) > -1 && (s3 = o3) : r3 = o3 : n3 = o3; } return n3 || s3 || r3; }(u2, n2); if (!l2) return false; if ((c2[l2] || []).find((e3 = {}) => e3.appId === s2 && (e3.platform || "").toLowerCase() === o2.toLowerCase())) return true; throw console.error(`此应用[appId: ${s2}, platform: ${o2}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`), Cn(An); } function qn({ functionName: e2, result: t2, logPvd: n2 }) { if (this.__dev__.debugLog && t2 && t2.requestId) { const s2 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e2, requestId: t2.requestId }); console.log(`[${n2}-request]${s2}[/${n2}-request]`); } } function Fn(e2) { const t2 = e2.callFunction, n2 = function(n3) { const s2 = n3.name; n3.data = Lt.call(e2, { data: n3.data }); const r2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb", alipay: "alipay" }[this.config.provider], i2 = Nn(n3), o2 = Dn(n3), a2 = i2 || o2; return t2.call(this, n3).then((e3) => (e3.errCode = 0, !a2 && qn.call(this, { functionName: s2, result: e3, logPvd: r2 }), Promise.resolve(e3)), (e3) => (!a2 && qn.call(this, { functionName: s2, result: e3, logPvd: r2 }), e3 && e3.message && (e3.message = function({ message: e4 = "", extraInfo: t3 = {}, formatter: n4 = [] } = {}) { for (let s3 = 0; s3 < n4.length; s3++) { const { rule: r3, content: i3, mode: o3 } = n4[s3], a3 = e4.match(r3); if (!a3) continue; let c2 = i3; for (let e5 = 1; e5 < a3.length; e5++) c2 = Mt(c2, `{$${e5}}`, a3[e5]); for (const e5 in t3) c2 = Mt(c2, `{${e5}}`, t3[e5]); return "replace" === o3 ? c2 : e4 + c2; } return e4; }({ message: `[${n3.name}]: ${e3.message}`, formatter: Ut, extraInfo: { functionName: s2 } })), Promise.reject(e3))); }; e2.callFunction = function(t3) { const { provider: s2, spaceId: r2 } = e2.config, i2 = t3.name; let o2, a2; if (t3.data = t3.data || {}, e2.__dev__.debugInfo && !e2.__dev__.debugInfo.forceRemote && C ? (e2._callCloudFunction || (e2._callCloudFunction = n2, e2._callLocalFunction = Rt), o2 = Rt) : o2 = n2, o2 = o2.bind(e2), Dn(t3)) a2 = n2.call(e2, t3); else if (Nn(t3)) { a2 = new On({ secretType: t3.secretType, uniCloudIns: e2 }).wrapEncryptDataCallFunction(n2.bind(e2))(t3); } else if (Mn({ provider: s2, spaceId: r2, functionName: i2 })) { a2 = new On({ secretType: t3.secretType, uniCloudIns: e2 }).wrapVerifyClientCallFunction(n2.bind(e2))(t3); } else a2 = o2(t3); return Object.defineProperty(a2, "result", { get: () => (console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {}) }), a2; }; } On = class { constructor() { throw Cn({ message: `Platform ${P} is not enabled, please check whether secure network module is enabled in your manifest.json` }); } }; const Kn = Symbol("CLIENT_DB_INTERNAL"); function jn(e2, t2) { return e2.then = "DoNotReturnProxyWithAFunctionNamedThen", e2._internalType = Kn, e2.inspect = null, e2.__v_raw = void 0, new Proxy(e2, { get(e3, n2, s2) { if ("_uniClient" === n2) return null; if ("symbol" == typeof n2) return e3[n2]; if (n2 in e3 || "string" != typeof n2) { const t3 = e3[n2]; return "function" == typeof t3 ? t3.bind(e3) : t3; } return t2.get(e3, n2, s2); } }); } function Bn(e2) { return { on: (t2, n2) => { e2[t2] = e2[t2] || [], e2[t2].indexOf(n2) > -1 || e2[t2].push(n2); }, off: (t2, n2) => { e2[t2] = e2[t2] || []; const s2 = e2[t2].indexOf(n2); -1 !== s2 && e2[t2].splice(s2, 1); } }; } const $n = ["db.Geo", "db.command", "command.aggregate"]; function Wn(e2, t2) { return $n.indexOf(`${e2}.${t2}`) > -1; } function Hn(e2) { switch (f(e2 = se(e2))) { case "array": return e2.map((e3) => Hn(e3)); case "object": return e2._internalType === Kn || Object.keys(e2).forEach((t2) => { e2[t2] = Hn(e2[t2]); }), e2; case "regexp": return { $regexp: { source: e2.source, flags: e2.flags } }; case "date": return { $date: e2.toISOString() }; default: return e2; } } function zn(e2) { return e2 && e2.content && e2.content.$method; } class Jn { constructor(e2, t2, n2) { this.content = e2, this.prevStage = t2 || null, this.udb = null, this._database = n2; } toJSON() { let e2 = this; const t2 = [e2.content]; for (; e2.prevStage; ) e2 = e2.prevStage, t2.push(e2.content); return { $db: t2.reverse().map((e3) => ({ $method: e3.$method, $param: Hn(e3.$param) })) }; } toString() { return JSON.stringify(this.toJSON()); } getAction() { const e2 = this.toJSON().$db.find((e3) => "action" === e3.$method); return e2 && e2.$param && e2.$param[0]; } getCommand() { return { $db: this.toJSON().$db.filter((e2) => "action" !== e2.$method) }; } get isAggregate() { let e2 = this; for (; e2; ) { const t2 = zn(e2), n2 = zn(e2.prevStage); if ("aggregate" === t2 && "collection" === n2 || "pipeline" === t2) return true; e2 = e2.prevStage; } return false; } get isCommand() { let e2 = this; for (; e2; ) { if ("command" === zn(e2)) return true; e2 = e2.prevStage; } return false; } get isAggregateCommand() { let e2 = this; for (; e2; ) { const t2 = zn(e2), n2 = zn(e2.prevStage); if ("aggregate" === t2 && "command" === n2) return true; e2 = e2.prevStage; } return false; } getNextStageFn(e2) { const t2 = this; return function() { return Vn({ $method: e2, $param: Hn(Array.from(arguments)) }, t2, t2._database); }; } get count() { return this.isAggregate ? this.getNextStageFn("count") : function() { return this._send("count", Array.from(arguments)); }; } get remove() { return this.isCommand ? this.getNextStageFn("remove") : function() { return this._send("remove", Array.from(arguments)); }; } get() { return this._send("get", Array.from(arguments)); } get add() { return this.isCommand ? this.getNextStageFn("add") : function() { return this._send("add", Array.from(arguments)); }; } update() { return this._send("update", Array.from(arguments)); } end() { return this._send("end", Array.from(arguments)); } get set() { return this.isCommand ? this.getNextStageFn("set") : function() { throw new Error("JQL禁止使用set方法"); }; } _send(e2, t2) { const n2 = this.getAction(), s2 = this.getCommand(); if (s2.$db.push({ $method: e2, $param: Hn(t2) }), S) { const e3 = s2.$db.find((e4) => "collection" === e4.$method), t3 = e3 && e3.$param; t3 && 1 === t3.length && "string" == typeof e3.$param[0] && e3.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。"); } return this._database._callCloudFunction({ action: n2, command: s2 }); } } function Vn(e2, t2, n2) { return jn(new Jn(e2, t2, n2), { get(e3, t3) { let s2 = "db"; return e3 && e3.content && (s2 = e3.content.$method), Wn(s2, t3) ? Vn({ $method: t3 }, e3, n2) : function() { return Vn({ $method: t3, $param: Hn(Array.from(arguments)) }, e3, n2); }; } }); } function Gn({ path: e2, method: t2 }) { return class { constructor() { this.param = Array.from(arguments); } toJSON() { return { $newDb: [...e2.map((e3) => ({ $method: e3 })), { $method: t2, $param: this.param }] }; } toString() { return JSON.stringify(this.toJSON()); } }; } function Yn(e2, t2 = {}) { return jn(new e2(t2), { get: (e3, t3) => Wn("db", t3) ? Vn({ $method: t3 }, null, e3) : function() { return Vn({ $method: t3, $param: Hn(Array.from(arguments)) }, null, e3); } }); } class Qn extends class { constructor({ uniClient: e2 = {}, isJQL: t2 = false } = {}) { this._uniClient = e2, this._authCallBacks = {}, this._dbCallBacks = {}, e2._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t2 || (this.auth = Bn(this._authCallBacks)), this._isJQL = t2, Object.assign(this, Bn(this._dbCallBacks)), this.env = jn({}, { get: (e3, t3) => ({ $env: t3 }) }), this.Geo = jn({}, { get: (e3, t3) => Gn({ path: ["Geo"], method: t3 }) }), this.serverDate = Gn({ path: [], method: "serverDate" }), this.RegExp = Gn({ path: [], method: "RegExp" }); } getCloudEnv(e2) { if ("string" != typeof e2 || !e2.trim()) throw new Error("getCloudEnv参数错误"); return { $env: e2.replace("$cloudEnv_", "") }; } _callback(e2, t2) { const n2 = this._dbCallBacks; n2[e2] && n2[e2].forEach((e3) => { e3(...t2); }); } _callbackAuth(e2, t2) { const n2 = this._authCallBacks; n2[e2] && n2[e2].forEach((e3) => { e3(...t2); }); } multiSend() { const e2 = Array.from(arguments), t2 = e2.map((e3) => { const t3 = e3.getAction(), n2 = e3.getCommand(); if ("getTemp" !== n2.$db[n2.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp"); return { action: t3, command: n2 }; }); return this._callCloudFunction({ multiCommand: t2, queryList: e2 }); } } { _parseResult(e2) { return this._isJQL ? e2.result : e2; } _callCloudFunction({ action: e2, command: t2, multiCommand: n2, queryList: s2 }) { function r2(e3, t3) { if (n2 && s2) for (let n3 = 0; n3 < s2.length; n3++) { const r3 = s2[n3]; r3.udb && "function" == typeof r3.udb.setResult && (t3 ? r3.udb.setResult(t3) : r3.udb.setResult(e3.result.dataList[n3])); } } const i2 = this, o2 = this._isJQL ? "databaseForJQL" : "database"; function a2(e3) { return i2._callback("error", [e3]), M(q(o2, "fail"), e3).then(() => M(q(o2, "complete"), e3)).then(() => (r2(null, e3), Y(j, { type: W, content: e3 }), Promise.reject(e3))); } const c2 = M(q(o2, "invoke")), u2 = this._uniClient; return c2.then(() => u2.callFunction({ name: "DCloud-clientDB", type: l, data: { action: e2, command: t2, multiCommand: n2 } })).then((e3) => { const { code: t3, message: n3, token: s3, tokenExpired: c3, systemInfo: u3 = [] } = e3.result; if (u3) for (let e4 = 0; e4 < u3.length; e4++) { const { level: t4, message: n4, detail: s4 } = u3[e4], r3 = console["warn" === t4 ? "error" : t4] || console.log; let i3 = "[System Info]" + n4; s4 && (i3 = `${i3} 详细信息:${s4}`), r3(i3); } if (t3) { return a2(new te({ code: t3, message: n3, requestId: e3.requestId })); } e3.result.errCode = e3.result.errCode || e3.result.code, e3.result.errMsg = e3.result.errMsg || e3.result.message, s3 && c3 && (ie({ token: s3, tokenExpired: c3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: c3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: c3 }]), Y($, { token: s3, tokenExpired: c3 })); const l2 = [{ prop: "affectedDocs", tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代" }, { prop: "code", tips: "code不再推荐使用,请使用errCode替代" }, { prop: "message", tips: "message不再推荐使用,请使用errMsg替代" }]; for (let t4 = 0; t4 < l2.length; t4++) { const { prop: n4, tips: s4 } = l2[t4]; if (n4 in e3.result) { const t5 = e3.result[n4]; Object.defineProperty(e3.result, n4, { get: () => (console.warn(s4), t5) }); } } return function(e4) { return M(q(o2, "success"), e4).then(() => M(q(o2, "complete"), e4)).then(() => { r2(e4, null); const t4 = i2._parseResult(e4); return Y(j, { type: W, content: t4 }), Promise.resolve(t4); }); }(e3); }, (e3) => { /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e3.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"); return a2(new te({ code: e3.code || "SYSTEM_ERROR", message: e3.message, requestId: e3.requestId })); }); } } const Xn = "token无效,跳转登录页面", Zn = "token过期,跳转登录页面", es = { TOKEN_INVALID_TOKEN_EXPIRED: Zn, TOKEN_INVALID_INVALID_CLIENTID: Xn, TOKEN_INVALID: Xn, TOKEN_INVALID_WRONG_TOKEN: Xn, TOKEN_INVALID_ANONYMOUS_USER: Xn }, ts = { "uni-id-token-expired": Zn, "uni-id-check-token-failed": Xn, "uni-id-token-not-exist": Xn, "uni-id-check-device-feature-failed": Xn }; function ns(e2, t2) { let n2 = ""; return n2 = e2 ? `${e2}/${t2}` : t2, n2.replace(/^\//, ""); } function ss(e2 = [], t2 = "") { const n2 = [], s2 = []; return e2.forEach((e3) => { true === e3.needLogin ? n2.push(ns(t2, e3.path)) : false === e3.needLogin && s2.push(ns(t2, e3.path)); }), { needLoginPage: n2, notNeedLoginPage: s2 }; } function rs(e2) { return e2.split("?")[0].replace(/^\//, ""); } function is() { return function(e2) { let t2 = e2 && e2.$page && e2.$page.fullPath || ""; return t2 ? ("/" !== t2.charAt(0) && (t2 = "/" + t2), t2) : t2; }(function() { const e2 = getCurrentPages(); return e2[e2.length - 1]; }()); } function os$1() { return rs(is()); } function as(e2 = "", t2 = {}) { if (!e2) return false; if (!(t2 && t2.list && t2.list.length)) return false; const n2 = t2.list, s2 = rs(e2); return n2.some((e3) => e3.pagePath === s2); } const cs = !!e.uniIdRouter; const { loginPage: us, routerNeedLogin: ls, resToLogin: hs, needLoginPage: ds, notNeedLoginPage: ps, loginPageInTabBar: fs } = function({ pages: t2 = [], subPackages: n2 = [], uniIdRouter: s2 = {}, tabBar: r2 = {} } = e) { const { loginPage: i2, needLogin: o2 = [], resToLogin: a2 = true } = s2, { needLoginPage: c2, notNeedLoginPage: u2 } = ss(t2), { needLoginPage: l2, notNeedLoginPage: h2 } = function(e2 = []) { const t3 = [], n3 = []; return e2.forEach((e3) => { const { root: s3, pages: r3 = [] } = e3, { needLoginPage: i3, notNeedLoginPage: o3 } = ss(r3, s3); t3.push(...i3), n3.push(...o3); }), { needLoginPage: t3, notNeedLoginPage: n3 }; }(n2); return { loginPage: i2, routerNeedLogin: o2, resToLogin: a2, needLoginPage: [...c2, ...l2], notNeedLoginPage: [...u2, ...h2], loginPageInTabBar: as(i2, r2) }; }(); if (ds.indexOf(us) > -1) throw new Error(`Login page [${us}] should not be "needLogin", please check your pages.json`); function gs(e2) { const t2 = os$1(); if ("/" === e2.charAt(0)) return e2; const [n2, s2] = e2.split("?"), r2 = n2.replace(/^\//, "").split("/"), i2 = t2.split("/"); i2.pop(); for (let e3 = 0; e3 < r2.length; e3++) { const t3 = r2[e3]; ".." === t3 ? i2.pop() : "." !== t3 && i2.push(t3); } return "" === i2[0] && i2.shift(), "/" + i2.join("/") + (s2 ? "?" + s2 : ""); } function ms(e2) { const t2 = rs(gs(e2)); return !(ps.indexOf(t2) > -1) && (ds.indexOf(t2) > -1 || ls.some((t3) => function(e3, t4) { return new RegExp(t4).test(e3); }(e2, t3))); } function ys({ redirect: e2 }) { const t2 = rs(e2), n2 = rs(us); return os$1() !== n2 && t2 !== n2; } function _s({ api: e2, redirect: t2 } = {}) { if (!t2 || !ys({ redirect: t2 })) return; const n2 = function(e3, t3) { return "/" !== e3.charAt(0) && (e3 = "/" + e3), t3 ? e3.indexOf("?") > -1 ? e3 + `&uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3 + `?uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3; }(us, t2); fs ? "navigateTo" !== e2 && "redirectTo" !== e2 || (e2 = "switchTab") : "switchTab" === e2 && (e2 = "navigateTo"); const s2 = { navigateTo: uni.navigateTo, redirectTo: uni.redirectTo, switchTab: uni.switchTab, reLaunch: uni.reLaunch }; setTimeout(() => { s2[e2]({ url: n2 }); }); } function ws({ url: e2 } = {}) { const t2 = { abortLoginPageJump: false, autoToLoginPage: false }, n2 = function() { const { token: e3, tokenExpired: t3 } = re(); let n3; if (e3) { if (t3 < Date.now()) { const e4 = "uni-id-token-expired"; n3 = { errCode: e4, errMsg: ts[e4] }; } } else { const e4 = "uni-id-check-token-failed"; n3 = { errCode: e4, errMsg: ts[e4] }; } return n3; }(); if (ms(e2) && n2) { n2.uniIdRedirectUrl = e2; if (J(B).length > 0) return setTimeout(() => { Y(B, n2); }, 0), t2.abortLoginPageJump = true, t2; t2.autoToLoginPage = true; } return t2; } function vs() { !function() { const e3 = is(), { abortLoginPageJump: t2, autoToLoginPage: n2 } = ws({ url: e3 }); t2 || n2 && _s({ api: "redirectTo", redirect: e3 }); }(); const e2 = ["navigateTo", "redirectTo", "reLaunch", "switchTab"]; for (let t2 = 0; t2 < e2.length; t2++) { const n2 = e2[t2]; uni.addInterceptor(n2, { invoke(e3) { const { abortLoginPageJump: t3, autoToLoginPage: s2 } = ws({ url: e3.url }); return t3 ? e3 : s2 ? (_s({ api: n2, redirect: gs(e3.url) }), false) : e3; } }); } } function Is() { this.onResponse((e2) => { const { type: t2, content: n2 } = e2; let s2 = false; switch (t2) { case "cloudobject": s2 = function(e3) { if ("object" != typeof e3) return false; const { errCode: t3 } = e3 || {}; return t3 in ts; }(n2); break; case "clientdb": s2 = function(e3) { if ("object" != typeof e3) return false; const { errCode: t3 } = e3 || {}; return t3 in es; }(n2); } s2 && function(e3 = {}) { const t3 = J(B); Z().then(() => { const n3 = is(); if (n3 && ys({ redirect: n3 })) return t3.length > 0 ? Y(B, Object.assign({ uniIdRedirectUrl: n3 }, e3)) : void (us && _s({ api: "navigateTo", redirect: n3 })); }); }(n2); }); } function Ss(e2) { !function(e3) { e3.onResponse = function(e4) { V(j, e4); }, e3.offResponse = function(e4) { G(j, e4); }; }(e2), function(e3) { e3.onNeedLogin = function(e4) { V(B, e4); }, e3.offNeedLogin = function(e4) { G(B, e4); }, cs && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = true, Z().then(() => { vs.call(e3); }), hs && Is.call(e3))); }(e2), function(e3) { e3.onRefreshToken = function(e4) { V($, e4); }, e3.offRefreshToken = function(e4) { G($, e4); }; }(e2); } let bs; const ks = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", As = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/; function Ps() { const e2 = re().token || "", t2 = e2.split("."); if (!e2 || 3 !== t2.length) return { uid: null, role: [], permission: [], tokenExpired: 0 }; let n2; try { n2 = JSON.parse((s2 = t2[1], decodeURIComponent(bs(s2).split("").map(function(e3) { return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2); }).join("")))); } catch (e3) { throw new Error("获取当前用户信息出错,详细错误信息为:" + e3.message); } var s2; return n2.tokenExpired = 1e3 * n2.exp, delete n2.exp, delete n2.iat, n2; } bs = "function" != typeof atob ? function(e2) { if (e2 = String(e2).replace(/[\t\n\f\r ]+/g, ""), !As.test(e2)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."); var t2; e2 += "==".slice(2 - (3 & e2.length)); for (var n2, s2, r2 = "", i2 = 0; i2 < e2.length; ) t2 = ks.indexOf(e2.charAt(i2++)) << 18 | ks.indexOf(e2.charAt(i2++)) << 12 | (n2 = ks.indexOf(e2.charAt(i2++))) << 6 | (s2 = ks.indexOf(e2.charAt(i2++))), r2 += 64 === n2 ? String.fromCharCode(t2 >> 16 & 255) : 64 === s2 ? String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255) : String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255, 255 & t2); return r2; } : atob; var Ts = n(function(e2, t2) { Object.defineProperty(t2, "__esModule", { value: true }); const n2 = "chooseAndUploadFile:ok", s2 = "chooseAndUploadFile:fail"; function r2(e3, t3) { return e3.tempFiles.forEach((e4, n3) => { e4.name || (e4.name = e4.path.substring(e4.path.lastIndexOf("/") + 1)), t3 && (e4.fileType = t3), e4.cloudPath = Date.now() + "_" + n3 + e4.name.substring(e4.name.lastIndexOf(".")); }), e3.tempFilePaths || (e3.tempFilePaths = e3.tempFiles.map((e4) => e4.path)), e3; } function i2(e3, t3, { onChooseFile: s3, onUploadProgress: r3 }) { return t3.then((e4) => { if (s3) { const t4 = s3(e4); if (void 0 !== t4) return Promise.resolve(t4).then((t5) => void 0 === t5 ? e4 : t5); } return e4; }).then((t4) => false === t4 ? { errMsg: n2, tempFilePaths: [], tempFiles: [] } : function(e4, t5, s4 = 5, r4) { (t5 = Object.assign({}, t5)).errMsg = n2; const i3 = t5.tempFiles, o2 = i3.length; let a2 = 0; return new Promise((n3) => { for (; a2 < s4; ) c2(); function c2() { const s5 = a2++; if (s5 >= o2) return void (!i3.find((e5) => !e5.url && !e5.errMsg) && n3(t5)); const u2 = i3[s5]; e4.uploadFile({ filePath: u2.path, cloudPath: u2.cloudPath, fileType: u2.fileType, cloudPathAsRealPath: u2.cloudPathAsRealPath, onUploadProgress(e5) { e5.index = s5, e5.tempFile = u2, e5.tempFilePath = u2.path, r4 && r4(e5); } }).then((e5) => { u2.url = e5.fileID, s5 < o2 && c2(); }).catch((e5) => { u2.errMsg = e5.errMsg || e5.message, s5 < o2 && c2(); }); } }); }(e3, t4, 5, r3)); } t2.initChooseAndUploadFile = function(e3) { return function(t3 = { type: "all" }) { return "image" === t3.type ? i2(e3, function(e4) { const { count: t4, sizeType: n3, sourceType: i3 = ["album", "camera"], extension: o2 } = e4; return new Promise((e5, a2) => { uni.chooseImage({ count: t4, sizeType: n3, sourceType: i3, extension: o2, success(t5) { e5(r2(t5, "image")); }, fail(e6) { a2({ errMsg: e6.errMsg.replace("chooseImage:fail", s2) }); } }); }); }(t3), t3) : "video" === t3.type ? i2(e3, function(e4) { const { camera: t4, compressed: n3, maxDuration: i3, sourceType: o2 = ["album", "camera"], extension: a2 } = e4; return new Promise((e5, c2) => { uni.chooseVideo({ camera: t4, compressed: n3, maxDuration: i3, sourceType: o2, extension: a2, success(t5) { const { tempFilePath: n4, duration: s3, size: i4, height: o3, width: a3 } = t5; e5(r2({ errMsg: "chooseVideo:ok", tempFilePaths: [n4], tempFiles: [{ name: t5.tempFile && t5.tempFile.name || "", path: n4, size: i4, type: t5.tempFile && t5.tempFile.type || "", width: a3, height: o3, duration: s3, fileType: "video", cloudPath: "" }] }, "video")); }, fail(e6) { c2({ errMsg: e6.errMsg.replace("chooseVideo:fail", s2) }); } }); }); }(t3), t3) : i2(e3, function(e4) { const { count: t4, extension: n3 } = e4; return new Promise((e5, i3) => { let o2 = uni.chooseFile; if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o2 = wx.chooseMessageFile), "function" != typeof o2) return i3({ errMsg: s2 + " 请指定 type 类型,该平台仅支持选择 image 或 video。" }); o2({ type: "all", count: t4, extension: n3, success(t5) { e5(r2(t5)); }, fail(e6) { i3({ errMsg: e6.errMsg.replace("chooseFile:fail", s2) }); } }); }); }(t3), t3); }; }; }), Cs = t(Ts); const xs = "manual"; function Os(e2) { return { props: { localdata: { type: Array, default: () => [] }, options: { type: [Object, Array], default: () => ({}) }, spaceInfo: { type: Object, default: () => ({}) }, collection: { type: [String, Array], default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 20 }, getcount: { type: [Boolean, String], default: false }, gettree: { type: [Boolean, String], default: false }, gettreepath: { type: [Boolean, String], default: false }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: false }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: false } }, data: () => ({ mixinDatacomLoading: false, mixinDatacomHasMore: false, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {} }), created() { this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(() => { var e3 = []; return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach((t2) => { e3.push(this[t2]); }), e3; }, (e3, t2) => { if (this.loadtime === xs) return; let n2 = false; const s2 = []; for (let r2 = 2; r2 < e3.length; r2++) e3[r2] !== t2[r2] && (s2.push(e3[r2]), n2 = true); e3[0] !== t2[0] && (this.mixinDatacomPage.current = this.pageCurrent), this.mixinDatacomPage.size = this.pageSize, this.onMixinDatacomPropsChange(n2, s2); }); }, methods: { onMixinDatacomPropsChange(e3, t2) { }, mixinDatacomEasyGet({ getone: e3 = false, success: t2, fail: n2 } = {}) { this.mixinDatacomLoading || (this.mixinDatacomLoading = true, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then((n3) => { this.mixinDatacomLoading = false; const { data: s2, count: r2 } = n3.result; this.getcount && (this.mixinDatacomPage.count = r2), this.mixinDatacomHasMore = s2.length < this.pageSize; const i2 = e3 ? s2.length ? s2[0] : void 0 : s2; this.mixinDatacomResData = i2, t2 && t2(i2); }).catch((e4) => { this.mixinDatacomLoading = false, this.mixinDatacomErrorMessage = e4, n2 && n2(e4); })); }, mixinDatacomGet(t2 = {}) { let n2 = e2.database(this.spaceInfo); const s2 = t2.action || this.action; s2 && (n2 = n2.action(s2)); const r2 = t2.collection || this.collection; n2 = Array.isArray(r2) ? n2.collection(...r2) : n2.collection(r2); const i2 = t2.where || this.where; i2 && Object.keys(i2).length && (n2 = n2.where(i2)); const o2 = t2.field || this.field; o2 && (n2 = n2.field(o2)); const a2 = t2.foreignKey || this.foreignKey; a2 && (n2 = n2.foreignKey(a2)); const c2 = t2.groupby || this.groupby; c2 && (n2 = n2.groupBy(c2)); const u2 = t2.groupField || this.groupField; u2 && (n2 = n2.groupField(u2)); true === (void 0 !== t2.distinct ? t2.distinct : this.distinct) && (n2 = n2.distinct()); const l2 = t2.orderby || this.orderby; l2 && (n2 = n2.orderBy(l2)); const h2 = void 0 !== t2.pageCurrent ? t2.pageCurrent : this.mixinDatacomPage.current, d2 = void 0 !== t2.pageSize ? t2.pageSize : this.mixinDatacomPage.size, p2 = void 0 !== t2.getcount ? t2.getcount : this.getcount, f2 = void 0 !== t2.gettree ? t2.gettree : this.gettree, g2 = void 0 !== t2.gettreepath ? t2.gettreepath : this.gettreepath, m2 = { getCount: p2 }, y2 = { limitLevel: void 0 !== t2.limitlevel ? t2.limitlevel : this.limitlevel, startWith: void 0 !== t2.startwith ? t2.startwith : this.startwith }; return f2 && (m2.getTree = y2), g2 && (m2.getTreePath = y2), n2 = n2.skip(d2 * (h2 - 1)).limit(d2).get(m2), n2; } } }; } function Es(e2) { return function(t2, n2 = {}) { n2 = function(e3, t3 = {}) { return e3.customUI = t3.customUI || e3.customUI, e3.parseSystemError = t3.parseSystemError || e3.parseSystemError, Object.assign(e3.loadingOptions, t3.loadingOptions), Object.assign(e3.errorOptions, t3.errorOptions), "object" == typeof t3.secretMethods && (e3.secretMethods = t3.secretMethods), e3; }({ customUI: false, loadingOptions: { title: "加载中...", mask: true }, errorOptions: { type: "modal", retry: false } }, n2); const { customUI: s2, loadingOptions: r2, errorOptions: i2, parseSystemError: o2 } = n2, a2 = !s2; return new Proxy({}, { get: (s3, c2) => function({ fn: e3, interceptorName: t3, getCallbackArgs: n3 } = {}) { return async function(...s4) { const r3 = n3 ? n3({ params: s4 }) : {}; let i3, o3; try { return await M(q(t3, "invoke"), { ...r3 }), i3 = await e3(...s4), await M(q(t3, "success"), { ...r3, result: i3 }), i3; } catch (e4) { throw o3 = e4, await M(q(t3, "fail"), { ...r3, error: o3 }), o3; } finally { await M(q(t3, "complete"), o3 ? { ...r3, error: o3 } : { ...r3, result: i3 }); } }; }({ fn: async function s4(...l2) { let h2; a2 && uni.showLoading({ title: r2.title, mask: r2.mask }); const d2 = { name: t2, type: u, data: { method: c2, params: l2 } }; "object" == typeof n2.secretMethods && function(e3, t3) { const n3 = t3.data.method, s5 = e3.secretMethods || {}, r3 = s5[n3] || s5["*"]; r3 && (t3.secretType = r3); }(n2, d2); let p2 = false; try { h2 = await e2.callFunction(d2); } catch (e3) { p2 = true, h2 = { result: new te(e3) }; } const { errSubject: f2, errCode: g2, errMsg: m2, newToken: y2 } = h2.result || {}; if (a2 && uni.hideLoading(), y2 && y2.token && y2.tokenExpired && (ie(y2), Y($, { ...y2 })), g2) { let e3 = m2; if (p2 && o2) { e3 = (await o2({ objectName: t2, methodName: c2, params: l2, errSubject: f2, errCode: g2, errMsg: m2 })).errMsg || m2; } if (a2) if ("toast" === i2.type) uni.showToast({ title: e3, icon: "none" }); else { if ("modal" !== i2.type) throw new Error(`Invalid errorOptions.type: ${i2.type}`); { const { confirm: t3 } = await async function({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3 } = {}) { return new Promise((i3, o3) => { uni.showModal({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3, success(e5) { i3(e5); }, fail() { i3({ confirm: false, cancel: true }); } }); }); }({ title: "提示", content: e3, showCancel: i2.retry, cancelText: "取消", confirmText: i2.retry ? "重试" : "确定" }); if (i2.retry && t3) return s4(...l2); } } const n3 = new te({ subject: f2, code: g2, message: m2, requestId: h2.requestId }); throw n3.detail = h2.result, Y(j, { type: z, content: n3 }), n3; } return Y(j, { type: z, content: h2.result }), h2.result; }, interceptorName: "callObject", getCallbackArgs: function({ params: e3 } = {}) { return { objectName: t2, methodName: c2, params: e3 }; } }) }); }; } function Ls(e2) { return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e2.config.spaceId)); } async function Rs({ openid: e2, callLoginByWeixin: t2 = false } = {}) { Ls(this); throw new Error(`[SecureNetwork] API \`initSecureNetworkByWeixin\` is not supported on platform \`${P}\``); } async function Us(e2) { const t2 = Ls(this); return t2.initPromise || (t2.initPromise = Rs.call(this, e2)), t2.initPromise; } function Ns(e2) { return function({ openid: t2, callLoginByWeixin: n2 = false } = {}) { return Us.call(e2, { openid: t2, callLoginByWeixin: n2 }); }; } function Ds(e2) { const t2 = { getSystemInfo: uni.getSystemInfo, getPushClientId: uni.getPushClientId }; return function(n2) { return new Promise((s2, r2) => { t2[e2]({ ...n2, success(e3) { s2(e3); }, fail(e3) { r2(e3); } }); }); }; } class Ms extends class { constructor() { this._callback = {}; } addListener(e2, t2) { this._callback[e2] || (this._callback[e2] = []), this._callback[e2].push(t2); } on(e2, t2) { return this.addListener(e2, t2); } removeListener(e2, t2) { if (!t2) throw new Error('The "listener" argument must be of type function. Received undefined'); const n2 = this._callback[e2]; if (!n2) return; const s2 = function(e3, t3) { for (let n3 = e3.length - 1; n3 >= 0; n3--) if (e3[n3] === t3) return n3; return -1; }(n2, t2); n2.splice(s2, 1); } off(e2, t2) { return this.removeListener(e2, t2); } removeAllListener(e2) { delete this._callback[e2]; } emit(e2, ...t2) { const n2 = this._callback[e2]; if (n2) for (let e3 = 0; e3 < n2.length; e3++) n2[e3](...t2); } } { constructor() { super(), this._uniPushMessageCallback = this._receivePushMessage.bind(this), this._currentMessageId = -1, this._payloadQueue = []; } init() { return Promise.all([Ds("getSystemInfo")(), Ds("getPushClientId")()]).then(([{ appId: e2 } = {}, { cid: t2 } = {}] = []) => { if (!e2) throw new Error("Invalid appId, please check the manifest.json file"); if (!t2) throw new Error("Invalid push client id"); this._appId = e2, this._pushClientId = t2, this._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), this.emit("open"), this._initMessageListener(); }, (e2) => { throw this.emit("error", e2), this.close(), e2; }); } async open() { return this.init(); } _isUniCloudSSE(e2) { if ("receive" !== e2.type) return false; const t2 = e2 && e2.data && e2.data.payload; return !(!t2 || "UNI_CLOUD_SSE" !== t2.channel || t2.seqId !== this._seqId); } _receivePushMessage(e2) { if (!this._isUniCloudSSE(e2)) return; const t2 = e2 && e2.data && e2.data.payload, { action: n2, messageId: s2, message: r2 } = t2; this._payloadQueue.push({ action: n2, messageId: s2, message: r2 }), this._consumMessage(); } _consumMessage() { for (; ; ) { const e2 = this._payloadQueue.find((e3) => e3.messageId === this._currentMessageId + 1); if (!e2) break; this._currentMessageId++, this._parseMessagePayload(e2); } } _parseMessagePayload(e2) { const { action: t2, messageId: n2, message: s2 } = e2; "end" === t2 ? this._end({ messageId: n2, message: s2 }) : "message" === t2 && this._appendMessage({ messageId: n2, message: s2 }); } _appendMessage({ messageId: e2, message: t2 } = {}) { this.emit("message", t2); } _end({ messageId: e2, message: t2 } = {}) { this.emit("end", t2), this.close(); } _initMessageListener() { uni.onPushMessage(this._uniPushMessageCallback); } _destroy() { uni.offPushMessage(this._uniPushMessageCallback); } toJSON() { return { appId: this._appId, pushClientId: this._pushClientId, seqId: this._seqId }; } close() { this._destroy(), this.emit("close"); } } async function qs(e2, t2) { const n2 = `http://${e2}:${t2}/system/ping`; try { const e3 = await (s2 = { url: n2, timeout: 500 }, new Promise((e4, t3) => { ne.request({ ...s2, success(t4) { e4(t4); }, fail(e5) { t3(e5); } }); })); return !(!e3.data || 0 !== e3.data.code); } catch (e3) { return false; } var s2; } async function Fs(e2) { { const { osName: e3, osVersion: t3 } = ce(); "ios" === e3 && function(e4) { if (!e4 || "string" != typeof e4) return 0; const t4 = e4.match(/^(\d+)./); return t4 && t4[1] ? parseInt(t4[1]) : 0; }(t3) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)"); } const t2 = e2.__dev__; if (!t2.debugInfo) return; const { address: n2, servePort: s2 } = t2.debugInfo, { address: r2 } = await async function(e3, t3) { let n3; for (let s3 = 0; s3 < e3.length; s3++) { const r3 = e3[s3]; if (await qs(r3, t3)) { n3 = r3; break; } } return { address: n3, port: t3 }; }(n2, s2); if (r2) return t2.localAddress = r2, void (t2.localPort = s2); const i2 = console["error"]; let o2 = ""; if ("remote" === t2.debugInfo.initialLaunchType ? (t2.debugInfo.forceRemote = true, o2 = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o2 = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o2 += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", 0 === P.indexOf("mp-") && (o2 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t2.debugInfo.forceRemote) throw new Error(o2); i2(o2); } function Ks(e2) { e2._initPromiseHub || (e2._initPromiseHub = new v({ createPromise: function() { let t2 = Promise.resolve(); var n2; n2 = 1, t2 = new Promise((e3) => { setTimeout(() => { e3(); }, n2); }); const s2 = e2.auth(); return t2.then(() => s2.getLoginState()).then((e3) => e3 ? Promise.resolve() : s2.signInAnonymously()); } })); } const js = { tcb: St, tencent: St, aliyun: pe, private: kt, alipay: Et }; let Bs = new class { init(e2) { let t2 = {}; const n2 = js[e2.provider]; if (!n2) throw new Error("未提供正确的provider参数"); t2 = n2.init(e2), function(e3) { const t3 = {}; e3.__dev__ = t3, t3.debugLog = "app" === P; const n3 = T; n3 && !n3.code && (t3.debugInfo = n3); const s2 = new v({ createPromise: function() { return Fs(e3); } }); t3.initLocalNetwork = function() { return s2.exec(); }; }(t2), Ks(t2), Fn(t2), function(e3) { const t3 = e3.uploadFile; e3.uploadFile = function(e4) { return t3.call(this, e4); }; }(t2), function(e3) { e3.database = function(t3) { if (t3 && Object.keys(t3).length > 0) return e3.init(t3).database(); if (this._database) return this._database; const n3 = Yn(Qn, { uniClient: e3 }); return this._database = n3, n3; }, e3.databaseForJQL = function(t3) { if (t3 && Object.keys(t3).length > 0) return e3.init(t3).databaseForJQL(); if (this._databaseForJQL) return this._databaseForJQL; const n3 = Yn(Qn, { uniClient: e3, isJQL: true }); return this._databaseForJQL = n3, n3; }; }(t2), function(e3) { e3.getCurrentUserInfo = Ps, e3.chooseAndUploadFile = Cs.initChooseAndUploadFile(e3), Object.assign(e3, { get mixinDatacom() { return Os(e3); } }), e3.SSEChannel = Ms, e3.initSecureNetworkByWeixin = Ns(e3), e3.importObject = Es(e3); }(t2); return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach((e3) => { if (!t2[e3]) return; const n3 = t2[e3]; t2[e3] = function() { return n3.apply(t2, Array.from(arguments)); }, t2[e3] = function(e4, t3) { return function(n4) { let s2 = false; if ("callFunction" === t3) { const e5 = n4 && n4.type || c; s2 = e5 !== c; } const r2 = "callFunction" === t3 && !s2, i2 = this._initPromiseHub.exec(); n4 = n4 || {}; const { success: o2, fail: a2, complete: u2 } = ee(n4), l2 = i2.then(() => s2 ? Promise.resolve() : M(q(t3, "invoke"), n4)).then(() => e4.call(this, n4)).then((e5) => s2 ? Promise.resolve(e5) : M(q(t3, "success"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (r2 && Y(j, { type: H, content: e5 }), Promise.resolve(e5))), (e5) => s2 ? Promise.reject(e5) : M(q(t3, "fail"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (Y(j, { type: H, content: e5 }), Promise.reject(e5)))); if (!(o2 || a2 || u2)) return l2; l2.then((e5) => { o2 && o2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 }); }, (e5) => { a2 && a2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 }); }); }; }(t2[e3], e3).bind(t2); }), t2.init = this.init, t2; } }(); (() => { const e2 = C; let t2 = {}; if (e2 && 1 === e2.length) t2 = e2[0], Bs = Bs.init(t2), Bs._isDefault = true; else { const t3 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"]; let n2; n2 = e2 && e2.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : "应用未关联服务空间,请在uniCloud目录右键关联服务空间", t3.forEach((e3) => { Bs[e3] = function() { return console.error(n2), Promise.reject(new te({ code: "SYS_ERR", message: n2 })); }; }); } Object.assign(Bs, { get mixinDatacom() { return Os(Bs); } }), Ss(Bs), Bs.addInterceptor = N, Bs.removeInterceptor = D, Bs.interceptObject = F; })(); var $s = Bs; const _sfc_main$I = { name: "loading1", data() { return {}; } }; function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "container loading1" }, [ vue.createElementVNode("view", { class: "shape shape1" }), vue.createElementVNode("view", { class: "shape shape2" }), vue.createElementVNode("view", { class: "shape shape3" }), vue.createElementVNode("view", { class: "shape shape4" }) ]); } const Loading1 = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$b], ["__scopeId", "data-v-0e645258"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading1.vue"]]); const _sfc_main$H = { name: "loading2", data() { return {}; } }; function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "container loading2" }, [ vue.createElementVNode("view", { class: "shape shape1" }), vue.createElementVNode("view", { class: "shape shape2" }), vue.createElementVNode("view", { class: "shape shape3" }), vue.createElementVNode("view", { class: "shape shape4" }) ]); } const Loading2 = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$a], ["__scopeId", "data-v-3df48dc2"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading2.vue"]]); const _sfc_main$G = { name: "loading3", data() { return {}; } }; function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "container loading3" }, [ vue.createElementVNode("view", { class: "shape shape1" }), vue.createElementVNode("view", { class: "shape shape2" }), vue.createElementVNode("view", { class: "shape shape3" }), vue.createElementVNode("view", { class: "shape shape4" }) ]); } const Loading3 = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$9], ["__scopeId", "data-v-27a8293c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading3.vue"]]); const _sfc_main$F = { name: "loading5", data() { return {}; } }; function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "container loading5" }, [ vue.createElementVNode("view", { class: "shape shape1" }), vue.createElementVNode("view", { class: "shape shape2" }), vue.createElementVNode("view", { class: "shape shape3" }), vue.createElementVNode("view", { class: "shape shape4" }) ]); } const Loading4 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$8], ["__scopeId", "data-v-2e7deb83"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading4.vue"]]); const _sfc_main$E = { name: "loading6", data() { return {}; } }; function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "container loading6" }, [ vue.createElementVNode("view", { class: "shape shape1" }), vue.createElementVNode("view", { class: "shape shape2" }), vue.createElementVNode("view", { class: "shape shape3" }), vue.createElementVNode("view", { class: "shape shape4" }) ]); } const Loading5 = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$7], ["__scopeId", "data-v-ef674bbb"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading5.vue"]]); const _sfc_main$D = { components: { Loading1, Loading2, Loading3, Loading4, Loading5 }, name: "qiun-loading", props: { loadingType: { type: Number, default: 2 } }, data() { return {}; } }; function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { const _component_Loading1 = vue.resolveComponent("Loading1"); const _component_Loading2 = vue.resolveComponent("Loading2"); const _component_Loading3 = vue.resolveComponent("Loading3"); const _component_Loading4 = vue.resolveComponent("Loading4"); const _component_Loading5 = vue.resolveComponent("Loading5"); return vue.openBlock(), vue.createElementBlock("view", null, [ $props.loadingType == 1 ? (vue.openBlock(), vue.createBlock(_component_Loading1, { key: 0 })) : vue.createCommentVNode("v-if", true), $props.loadingType == 2 ? (vue.openBlock(), vue.createBlock(_component_Loading2, { key: 1 })) : vue.createCommentVNode("v-if", true), $props.loadingType == 3 ? (vue.openBlock(), vue.createBlock(_component_Loading3, { key: 2 })) : vue.createCommentVNode("v-if", true), $props.loadingType == 4 ? (vue.openBlock(), vue.createBlock(_component_Loading4, { key: 3 })) : vue.createCommentVNode("v-if", true), $props.loadingType == 5 ? (vue.openBlock(), vue.createBlock(_component_Loading5, { key: 4 })) : vue.createCommentVNode("v-if", true) ]); } const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$6], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/qiun-loading.vue"]]); const _sfc_main$C = { name: "qiun-error", props: { errorMessage: { type: String, default: null } }, data() { return {}; } }; function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "chartsview" }, [ vue.createElementVNode("view", { class: "charts-error" }), vue.createElementVNode( "view", { class: "charts-font" }, vue.toDisplayString($props.errorMessage == null ? "请点击重试" : $props.errorMessage), 1 /* TEXT */ ) ]); } const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$5], ["__scopeId", "data-v-a99d579b"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-error/qiun-error.vue"]]); const color$1 = ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"]; const formatDateTime = (timeStamp, returnType) => { var date2 = /* @__PURE__ */ new Date(); date2.setTime(timeStamp * 1e3); var y2 = date2.getFullYear(); var m2 = date2.getMonth() + 1; m2 = m2 < 10 ? "0" + m2 : m2; var d2 = date2.getDate(); d2 = d2 < 10 ? "0" + d2 : d2; var h2 = date2.getHours(); h2 = h2 < 10 ? "0" + h2 : h2; var minute = date2.getMinutes(); var second = date2.getSeconds(); minute = minute < 10 ? "0" + minute : minute; second = second < 10 ? "0" + second : second; if (returnType == "full") { return y2 + "-" + m2 + "-" + d2 + " " + h2 + ":" + minute + ":" + second; } if (returnType == "y-m-d") { return y2 + "-" + m2 + "-" + d2; } if (returnType == "h:m") { return h2 + ":" + minute; } if (returnType == "h:m:s") { return h2 + ":" + minute + ":" + second; } return [y2, m2, d2, h2, minute, second]; }; const cfu = { //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可 "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "mount", "bar", "area", "radar", "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"], "range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "山峰图", "条状图", "区域图", "雷达图", "仪表盘", "K线图", "混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"], //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype" //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories "categories": ["line", "column", "mount", "bar", "area", "radar", "gauge", "candle", "mix", "demotype"], //instance为实例变量承载属性,不要删除 "instance": {}, //option为opts及eopts承载属性,不要删除 "option": {}, //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换 "formatter": { "yAxisDemo1": function(val, index2, opts) { return val + "元"; }, "yAxisDemo2": function(val, index2, opts) { return val.toFixed(2); }, "xAxisDemo1": function(val, index2, opts) { return val + "年"; }, "xAxisDemo2": function(val, index2, opts) { return formatDateTime(val, "h:m"); }, "seriesDemo1": function(val, index2, series, opts) { return val + "元"; }, "tooltipDemo1": function(item, category, index2, opts) { if (index2 == 0) { return "随便用" + item.data + "年"; } else { return "其他我没改" + item.data + "天"; } }, "pieDemo": function(val, index2, series, opts) { if (index2 !== void 0) { return series[index2].name + ":" + series[index2].data + "元"; } } }, //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。 "demotype": { //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置 "type": "line", "color": color$1, "padding": [15, 10, 0, 15], "xAxis": { "disableGrid": true }, "yAxis": { "gridType": "dash", "dashLength": 2 }, "legend": {}, "extra": { "line": { "type": "curve", "width": 2 } } }, //下面是自定义配置,请添加项目所需的通用配置 "pie": { "type": "pie", "color": color$1, "padding": [5, 5, 5, 5], "extra": { "pie": { "activeOpacity": 0.5, "activeRadius": 10, "offsetAngle": 0, "labelWidth": 15, "border": true, "borderWidth": 3, "borderColor": "#FFFFFF" } } }, "ring": { "type": "ring", "color": color$1, "padding": [5, 5, 5, 5], "rotate": false, "dataLabel": true, "legend": { "show": true, "position": "right", "lineHeight": 25 }, "title": { "name": "收益率", "fontSize": 15, "color": "#666666" }, "subtitle": { "name": "70%", "fontSize": 25, "color": "#7cb5ec" }, "extra": { "ring": { "ringWidth": 30, "activeOpacity": 0.5, "activeRadius": 10, "offsetAngle": 0, "labelWidth": 15, "border": true, "borderWidth": 3, "borderColor": "#FFFFFF" } } }, "rose": { "type": "rose", "color": color$1, "padding": [5, 5, 5, 5], "legend": { "show": true, "position": "left", "lineHeight": 25 }, "extra": { "rose": { "type": "area", "minRadius": 50, "activeOpacity": 0.5, "activeRadius": 10, "offsetAngle": 0, "labelWidth": 15, "border": false, "borderWidth": 2, "borderColor": "#FFFFFF" } } }, "word": { "type": "word", "color": color$1, "extra": { "word": { "type": "normal", "autoColors": false } } }, "funnel": { "type": "funnel", "color": color$1, "padding": [15, 15, 0, 15], "extra": { "funnel": { "activeOpacity": 0.3, "activeWidth": 10, "border": true, "borderWidth": 2, "borderColor": "#FFFFFF", "fillOpacity": 1, "labelAlign": "right" } } }, "map": { "type": "map", "color": color$1, "padding": [0, 0, 0, 0], "dataLabel": true, "extra": { "map": { "border": true, "borderWidth": 1, "borderColor": "#666666", "fillOpacity": 0.6, "activeBorderColor": "#F04864", "activeFillColor": "#FACC14", "activeFillOpacity": 1 } } }, "arcbar": { "type": "arcbar", "color": color$1, "title": { "name": "百分比", "fontSize": 25, "color": "#00FF00" }, "subtitle": { "name": "默认标题", "fontSize": 15, "color": "#666666" }, "extra": { "arcbar": { "type": "default", "width": 12, "backgroundColor": "#E9E9E9", "startAngle": 0.75, "endAngle": 0.25, "gap": 2 } } }, "line": { "type": "line", "color": color$1, "padding": [15, 10, 0, 15], "xAxis": { "disableGrid": true }, "yAxis": { "gridType": "dash", "dashLength": 2 }, "legend": {}, "extra": { "line": { "type": "straight", "width": 2, "activeType": "hollow" } } }, "tline": { "type": "line", "color": color$1, "padding": [15, 10, 0, 15], "xAxis": { "disableGrid": false, "boundaryGap": "justify" }, "yAxis": { "gridType": "dash", "dashLength": 2, "data": [ { "min": 0, "max": 80 } ] }, "legend": {}, "extra": { "line": { "type": "curve", "width": 2, "activeType": "hollow" } } }, "tarea": { "type": "area", "color": color$1, "padding": [15, 10, 0, 15], "xAxis": { "disableGrid": true, "boundaryGap": "justify" }, "yAxis": { "gridType": "dash", "dashLength": 2, "data": [ { "min": 0, "max": 80 } ] }, "legend": {}, "extra": { "area": { "type": "curve", "opacity": 0.2, "addLine": true, "width": 2, "gradient": true, "activeType": "hollow" } } }, "column": { "type": "column", "color": color$1, "padding": [15, 15, 0, 5], "xAxis": { "disableGrid": true }, "yAxis": { "data": [{ "min": 0 }] }, "legend": {}, "extra": { "column": { "type": "group", "width": 30, "activeBgColor": "#000000", "activeBgOpacity": 0.08 } } }, "mount": { "type": "mount", "color": color$1, "padding": [15, 15, 0, 5], "xAxis": { "disableGrid": true }, "yAxis": { "data": [{ "min": 0 }] }, "legend": {}, "extra": { "mount": { "type": "mount", "widthRatio": 1.5 } } }, "bar": { "type": "bar", "color": color$1, "padding": [15, 30, 0, 5], "xAxis": { "boundaryGap": "justify", "disableGrid": false, "min": 0, "axisLine": false }, "yAxis": {}, "legend": {}, "extra": { "bar": { "type": "group", "width": 30, "meterBorde": 1, "meterFillColor": "#FFFFFF", "activeBgColor": "#000000", "activeBgOpacity": 0.08 } } }, "area": { "type": "area", "color": color$1, "padding": [15, 15, 0, 15], "xAxis": { "disableGrid": true }, "yAxis": { "gridType": "dash", "dashLength": 2 }, "legend": {}, "extra": { "area": { "type": "straight", "opacity": 0.2, "addLine": true, "width": 2, "gradient": false, "activeType": "hollow" } } }, "radar": { "type": "radar", "color": color$1, "padding": [5, 5, 5, 5], "dataLabel": false, "legend": { "show": true, "position": "right", "lineHeight": 25 }, "extra": { "radar": { "gridType": "radar", "gridColor": "#CCCCCC", "gridCount": 3, "opacity": 0.2, "max": 200, "labelShow": true } } }, "gauge": { "type": "gauge", "color": color$1, "title": { "name": "66Km/H", "fontSize": 25, "color": "#2fc25b", "offsetY": 50 }, "subtitle": { "name": "实时速度", "fontSize": 15, "color": "#1890ff", "offsetY": -50 }, "extra": { "gauge": { "type": "default", "width": 30, "labelColor": "#666666", "startAngle": 0.75, "endAngle": 0.25, "startNumber": 0, "endNumber": 100, "labelFormat": "", "splitLine": { "fixRadius": 0, "splitNumber": 10, "width": 30, "color": "#FFFFFF", "childNumber": 5, "childWidth": 12 }, "pointer": { "width": 24, "color": "auto" } } } }, "candle": { "type": "candle", "color": color$1, "padding": [15, 15, 0, 15], "enableScroll": true, "enableMarkLine": true, "dataLabel": false, "xAxis": { "labelCount": 4, "itemCount": 40, "disableGrid": true, "gridColor": "#CCCCCC", "gridType": "solid", "dashLength": 4, "scrollShow": true, "scrollAlign": "left", "scrollColor": "#A6A6A6", "scrollBackgroundColor": "#EFEBEF" }, "yAxis": {}, "legend": {}, "extra": { "candle": { "color": { "upLine": "#f04864", "upFill": "#f04864", "downLine": "#2fc25b", "downFill": "#2fc25b" }, "average": { "show": true, "name": ["MA5", "MA10", "MA30"], "day": [5, 10, 20], "color": ["#1890ff", "#2fc25b", "#facc14"] } }, "markLine": { "type": "dash", "dashLength": 5, "data": [ { "value": 2150, "lineColor": "#f04864", "showLabel": true }, { "value": 2350, "lineColor": "#f04864", "showLabel": true } ] } } }, "mix": { "type": "mix", "color": color$1, "padding": [15, 15, 0, 15], "xAxis": { "disableGrid": true }, "yAxis": { "disabled": false, "disableGrid": false, "splitNumber": 5, "gridType": "dash", "dashLength": 4, "gridColor": "#CCCCCC", "padding": 10, "showTitle": true, "data": [] }, "legend": {}, "extra": { "mix": { "column": { "width": 20 } } } }, "scatter": { "type": "scatter", "color": color$1, "padding": [15, 15, 0, 15], "dataLabel": false, "xAxis": { "disableGrid": false, "gridType": "dash", "splitNumber": 5, "boundaryGap": "justify", "min": 0 }, "yAxis": { "disableGrid": false, "gridType": "dash" }, "legend": {}, "extra": { "scatter": {} } }, "bubble": { "type": "bubble", "color": color$1, "padding": [15, 15, 0, 15], "xAxis": { "disableGrid": false, "gridType": "dash", "splitNumber": 5, "boundaryGap": "justify", "min": 0, "max": 250 }, "yAxis": { "disableGrid": false, "gridType": "dash", "data": [{ "min": 0, "max": 150 }] }, "legend": {}, "extra": { "bubble": { "border": 2, "opacity": 0.5 } } } }; const color = ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"]; const cfe = { //demotype为自定义图表类型 "type": ["pie", "ring", "rose", "funnel", "line", "column", "area", "radar", "gauge", "candle", "demotype"], //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型例如最后的"demotype" "categories": ["line", "column", "area", "radar", "gauge", "candle", "demotype"], //instance为实例变量承载属性,option为eopts承载属性,不要删除 "instance": {}, "option": {}, //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换 "formatter": { "tooltipDemo1": function(res) { let result = ""; for (let i2 in res) { if (i2 == 0) { result += res[i2].axisValueLabel + "年销售额"; } let value = "--"; if (res[i2].data !== null) { value = res[i2].data; } result += "
" + res[i2].marker + res[i2].seriesName + ":" + value + " 万元"; } return result; }, legendFormat: function(name) { return "自定义图例+" + name; }, yAxisFormatDemo: function(value, index2) { return value + "元"; }, seriesFormatDemo: function(res) { return res.name + "年" + res.value + "元"; } }, //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在eopts参数,会将demotype与eopts中option合并后渲染图表。 "demotype": { "color": color //在这里填写echarts的option即可 }, //下面是自定义配置,请添加项目所需的通用配置 "column": { "color": color, "title": { "text": "" }, "tooltip": { "trigger": "axis" }, "grid": { "top": 30, "bottom": 50, "right": 15, "left": 40 }, "legend": { "bottom": "left" }, "toolbox": { "show": false }, "xAxis": { "type": "category", "axisLabel": { "color": "#666666" }, "axisLine": { "lineStyle": { "color": "#CCCCCC" } }, "boundaryGap": true, "data": [] }, "yAxis": { "type": "value", "axisTick": { "show": false }, "axisLabel": { "color": "#666666" }, "axisLine": { "lineStyle": { "color": "#CCCCCC" } } }, "seriesTemplate": { "name": "", "type": "bar", "data": [], "barwidth": 20, "label": { "show": true, "color": "#666666", "position": "top" } } }, "line": { "color": color, "title": { "text": "" }, "tooltip": { "trigger": "axis" }, "grid": { "top": 30, "bottom": 50, "right": 15, "left": 40 }, "legend": { "bottom": "left" }, "toolbox": { "show": false }, "xAxis": { "type": "category", "axisLabel": { "color": "#666666" }, "axisLine": { "lineStyle": { "color": "#CCCCCC" } }, "boundaryGap": true, "data": [] }, "yAxis": { "type": "value", "axisTick": { "show": false }, "axisLabel": { "color": "#666666" }, "axisLine": { "lineStyle": { "color": "#CCCCCC" } } }, "seriesTemplate": { "name": "", "type": "line", "data": [], "barwidth": 20, "label": { "show": true, "color": "#666666", "position": "top" } } }, "area": { "color": color, "title": { "text": "" }, "tooltip": { "trigger": "axis" }, "grid": { "top": 30, "bottom": 50, "right": 15, "left": 40 }, "legend": { "bottom": "left" }, "toolbox": { "show": false }, "xAxis": { "type": "category", "axisLabel": { "color": "#666666" }, "axisLine": { "lineStyle": { "color": "#CCCCCC" } }, "boundaryGap": true, "data": [] }, "yAxis": { "type": "value", "axisTick": { "show": false }, "axisLabel": { "color": "#666666" }, "axisLine": { "lineStyle": { "color": "#CCCCCC" } } }, "seriesTemplate": { "name": "", "type": "line", "data": [], "areaStyle": {}, "label": { "show": true, "color": "#666666", "position": "top" } } }, "pie": { "color": color, "title": { "text": "" }, "tooltip": { "trigger": "item" }, "grid": { "top": 40, "bottom": 30, "right": 15, "left": 15 }, "legend": { "bottom": "left" }, "seriesTemplate": { "name": "", "type": "pie", "data": [], "radius": "50%", "label": { "show": true, "color": "#666666", "position": "top" } } }, "ring": { "color": color, "title": { "text": "" }, "tooltip": { "trigger": "item" }, "grid": { "top": 40, "bottom": 30, "right": 15, "left": 15 }, "legend": { "bottom": "left" }, "seriesTemplate": { "name": "", "type": "pie", "data": [], "radius": ["40%", "70%"], "avoidLabelOverlap": false, "label": { "show": true, "color": "#666666", "position": "top" }, "labelLine": { "show": true } } }, "rose": { "color": color, "title": { "text": "" }, "tooltip": { "trigger": "item" }, "legend": { "top": "bottom" }, "seriesTemplate": { "name": "", "type": "pie", "data": [], "radius": "55%", "center": ["50%", "50%"], "roseType": "area" } }, "funnel": { "color": color, "title": { "text": "" }, "tooltip": { "trigger": "item", "formatter": "{b} : {c}%" }, "legend": { "top": "bottom" }, "seriesTemplate": { "name": "", "type": "funnel", "left": "10%", "top": 60, "bottom": 60, "width": "80%", "min": 0, "max": 100, "minSize": "0%", "maxSize": "100%", "sort": "descending", "gap": 2, "label": { "show": true, "position": "inside" }, "labelLine": { "length": 10, "lineStyle": { "width": 1, "type": "solid" } }, "itemStyle": { "bordercolor": "#fff", "borderwidth": 1 }, "emphasis": { "label": { "fontSize": 20 } }, "data": [] } }, "gauge": { "color": color, "tooltip": { "formatter": "{a}
{b} : {c}%" }, "seriesTemplate": { "name": "业务指标", "type": "gauge", "detail": { "formatter": "{value}%" }, "data": [{ "value": 50, "name": "完成率" }] } }, "candle": { "xAxis": { "data": [] }, "yAxis": {}, "color": color, "title": { "text": "" }, "dataZoom": [ { "type": "inside", "xAxisIndex": [0, 1], "start": 10, "end": 100 }, { "show": true, "xAxisIndex": [0, 1], "type": "slider", "bottom": 10, "start": 10, "end": 100 } ], "seriesTemplate": { "name": "", "type": "k", "data": [] } } }; const block0 = (Comp) => { (Comp.$renderjs || (Comp.$renderjs = [])).push("rdcharts"); (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["rdcharts"] = "f9cb76fc"; }; function deepCloneAssign(origin = {}, ...args) { for (let i2 in args) { for (let key in args[i2]) { if (args[i2].hasOwnProperty(key)) { origin[key] = args[i2][key] && typeof args[i2][key] === "object" ? deepCloneAssign(Array.isArray(args[i2][key]) ? [] : {}, origin[key], args[i2][key]) : args[i2][key]; } } } return origin; } function formatterAssign(args, formatter) { for (let key in args) { if (args.hasOwnProperty(key) && args[key] !== null && typeof args[key] === "object") { formatterAssign(args[key], formatter); } else if (key === "format" && typeof args[key] === "string") { args["formatter"] = formatter[args[key]] ? formatter[args[key]] : void 0; } } return args; } function getFormatDate(date2) { var seperator = "-"; var year = date2.getFullYear(); var month = date2.getMonth() + 1; var strDate = date2.getDate(); if (month >= 1 && month <= 9) { month = "0" + month; } if (strDate >= 0 && strDate <= 9) { strDate = "0" + strDate; } var currentdate = year + seperator + month + seperator + strDate; return currentdate; } const _sfc_main$B = { name: "qiun-data-charts", mixins: [$s.mixinDatacom], props: { type: { type: String, default: null }, canvasId: { type: String, default: "uchartsid" }, canvas2d: { type: Boolean, default: false }, background: { type: String, default: "rgba(0,0,0,0)" }, animation: { type: Boolean, default: true }, chartData: { type: Object, default() { return { categories: [], series: [] }; } }, opts: { type: Object, default() { return {}; } }, eopts: { type: Object, default() { return {}; } }, loadingType: { type: Number, default: 2 }, errorShow: { type: Boolean, default: true }, errorReload: { type: Boolean, default: true }, errorMessage: { type: String, default: null }, inScrollView: { type: Boolean, default: false }, reshow: { type: Boolean, default: false }, reload: { type: Boolean, default: false }, disableScroll: { type: Boolean, default: false }, optsWatch: { type: Boolean, default: true }, onzoom: { type: Boolean, default: false }, ontap: { type: Boolean, default: true }, ontouch: { type: Boolean, default: false }, onmouse: { type: Boolean, default: true }, onmovetip: { type: Boolean, default: false }, echartsH5: { type: Boolean, default: false }, echartsApp: { type: Boolean, default: false }, tooltipShow: { type: Boolean, default: true }, tooltipFormat: { type: String, default: void 0 }, tooltipCustom: { type: Object, default: void 0 }, startDate: { type: String, default: void 0 }, endDate: { type: String, default: void 0 }, textEnum: { type: Array, default() { return []; } }, groupEnum: { type: Array, default() { return []; } }, pageScrollTop: { type: Number, default: 0 }, directory: { type: String, default: "/" }, tapLegend: { type: Boolean, default: true }, menus: { type: Array, default() { return []; } } }, data() { return { cid: "uchartsid", inWx: false, inAli: false, inTt: false, inBd: false, inH5: false, inApp: false, inWin: false, type2d: true, disScroll: false, openmouse: false, pixel: 1, cWidth: 375, cHeight: 250, showchart: false, echarts: false, echartsResize: { state: false }, uchartsOpts: {}, echartsOpts: {}, drawData: {}, lastDrawTime: null }; }, created() { this.cid = this.canvasId; if (this.canvasId == "uchartsid" || this.canvasId == "") { let t2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; let len = t2.length; let id = ""; for (let i2 = 0; i2 < 32; i2++) { id += t2.charAt(Math.floor(Math.random() * len)); } this.cid = id; } const systemInfo = uni.getSystemInfoSync(); if (systemInfo.platform === "windows" || systemInfo.platform === "mac") { this.inWin = true; } this.type2d = false; this.disScroll = this.disableScroll; }, mounted() { this.inApp = true; if (this.echartsApp === true) { this.echarts = true; this.openmouse = false; } this.$nextTick(() => { this.beforeInit(); }); }, destroyed() { if (this.echarts === true) { delete cfe.option[this.cid]; delete cfe.instance[this.cid]; } else { delete cfu.option[this.cid]; delete cfu.instance[this.cid]; } uni.offWindowResize(() => { }); }, watch: { chartDataProps: { handler(val, oldval) { if (typeof val === "object") { if (JSON.stringify(val) !== JSON.stringify(oldval)) { this._clearChart(); if (val.series && val.series.length > 0) { this.beforeInit(); } else { this.mixinDatacomLoading = true; this.showchart = false; this.mixinDatacomErrorMessage = null; } } } else { this.mixinDatacomLoading = false; this._clearChart(); this.showchart = false; this.mixinDatacomErrorMessage = "参数错误:chartData数据类型错误"; } }, immediate: false, deep: true }, localdata: { handler(val, oldval) { if (JSON.stringify(val) !== JSON.stringify(oldval)) { if (val.length > 0) { this.beforeInit(); } else { this.mixinDatacomLoading = true; this._clearChart(); this.showchart = false; this.mixinDatacomErrorMessage = null; } } }, immediate: false, deep: true }, optsProps: { handler(val, oldval) { if (typeof val === "object") { if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === false && this.optsWatch == true) { this.checkData(this.drawData); } } else { this.mixinDatacomLoading = false; this._clearChart(); this.showchart = false; this.mixinDatacomErrorMessage = "参数错误:opts数据类型错误"; } }, immediate: false, deep: true }, eoptsProps: { handler(val, oldval) { if (typeof val === "object") { if (JSON.stringify(val) !== JSON.stringify(oldval) && this.echarts === true) { this.checkData(this.drawData); } } else { this.mixinDatacomLoading = false; this.showchart = false; this.mixinDatacomErrorMessage = "参数错误:eopts数据类型错误"; } }, immediate: false, deep: true }, reshow(val, oldval) { if (val === true && this.mixinDatacomLoading === false) { setTimeout(() => { this.mixinDatacomErrorMessage = null; this.echartsResize.state = !this.echartsResize.state; this.checkData(this.drawData); }, 200); } }, reload(val, oldval) { if (val === true) { this.showchart = false; this.mixinDatacomErrorMessage = null; this.reloading(); } }, mixinDatacomErrorMessage(val, oldval) { if (val) { this.emitMsg({ name: "error", params: { type: "error", errorShow: this.errorShow, msg: val, id: this.cid } }); if (this.errorShow) { formatAppLog("log", "at uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue:611", "[秋云图表组件]" + val); } } }, errorMessage(val, oldval) { if (val && this.errorShow && val !== null && val !== "null" && val !== "") { this.showchart = false; this.mixinDatacomLoading = false; this.mixinDatacomErrorMessage = val; } else { this.showchart = false; this.mixinDatacomErrorMessage = null; this.reloading(); } } }, computed: { optsProps() { return JSON.parse(JSON.stringify(this.opts)); }, eoptsProps() { return JSON.parse(JSON.stringify(this.eopts)); }, chartDataProps() { return JSON.parse(JSON.stringify(this.chartData)); } }, methods: { beforeInit() { this.mixinDatacomErrorMessage = null; if (typeof this.chartData === "object" && this.chartData != null && this.chartData.series !== void 0 && this.chartData.series.length > 0) { this.drawData = deepCloneAssign({}, this.chartData); this.mixinDatacomLoading = false; this.showchart = true; this.checkData(this.chartData); } else if (this.localdata.length > 0) { this.mixinDatacomLoading = false; this.showchart = true; this.localdataInit(this.localdata); } else if (this.collection !== "") { this.mixinDatacomLoading = false; this.getCloudData(); } else { this.mixinDatacomLoading = true; } }, localdataInit(resdata) { if (this.groupEnum.length > 0) { for (let i2 = 0; i2 < resdata.length; i2++) { for (let j2 = 0; j2 < this.groupEnum.length; j2++) { if (resdata[i2].group === this.groupEnum[j2].value) { resdata[i2].group = this.groupEnum[j2].text; } } } } if (this.textEnum.length > 0) { for (let i2 = 0; i2 < resdata.length; i2++) { for (let j2 = 0; j2 < this.textEnum.length; j2++) { if (resdata[i2].text === this.textEnum[j2].value) { resdata[i2].text = this.textEnum[j2].text; } } } } let needCategories = false; let tmpData = { categories: [], series: [] }; let tmpcategories = []; let tmpseries = []; if (this.echarts === true) { needCategories = cfe.categories.includes(this.type); } else { needCategories = cfu.categories.includes(this.type); } if (needCategories === true) { if (this.chartData && this.chartData.categories && this.chartData.categories.length > 0) { tmpcategories = this.chartData.categories; } else { if (this.startDate && this.endDate) { let idate = new Date(this.startDate); let edate = new Date(this.endDate); while (idate <= edate) { tmpcategories.push(getFormatDate(idate)); idate = idate.setDate(idate.getDate() + 1); idate = new Date(idate); } } else { let tempckey = {}; resdata.map(function(item, index2) { if (item.text != void 0 && !tempckey[item.text]) { tmpcategories.push(item.text); tempckey[item.text] = true; } }); } } tmpData.categories = tmpcategories; } let tempskey = {}; resdata.map(function(item, index2) { if (item.group != void 0 && !tempskey[item.group]) { tmpseries.push({ name: item.group, data: [] }); tempskey[item.group] = true; } }); if (tmpseries.length == 0) { tmpseries = [{ name: "默认分组", data: [] }]; if (needCategories === true) { for (let j2 = 0; j2 < tmpcategories.length; j2++) { let seriesdata = 0; for (let i2 = 0; i2 < resdata.length; i2++) { if (resdata[i2].text == tmpcategories[j2]) { seriesdata = resdata[i2].value; } } tmpseries[0].data.push(seriesdata); } } else { for (let i2 = 0; i2 < resdata.length; i2++) { tmpseries[0].data.push({ "name": resdata[i2].text, "value": resdata[i2].value }); } } } else { for (let k = 0; k < tmpseries.length; k++) { if (tmpcategories.length > 0) { for (let j2 = 0; j2 < tmpcategories.length; j2++) { let seriesdata = 0; for (let i2 = 0; i2 < resdata.length; i2++) { if (tmpseries[k].name == resdata[i2].group && resdata[i2].text == tmpcategories[j2]) { seriesdata = resdata[i2].value; } } tmpseries[k].data.push(seriesdata); } } else { for (let i2 = 0; i2 < resdata.length; i2++) { if (tmpseries[k].name == resdata[i2].group) { tmpseries[k].data.push(resdata[i2].value); } } } } } tmpData.series = tmpseries; this.drawData = deepCloneAssign({}, tmpData); this.checkData(tmpData); }, reloading() { if (this.errorReload === false) { return; } this.showchart = false; this.mixinDatacomErrorMessage = null; if (this.collection !== "") { this.mixinDatacomLoading = false; this.onMixinDatacomPropsChange(true); } else { this.beforeInit(); } }, checkData(anyData) { let cid = this.cid; if (this.echarts === true) { cfe.option[cid] = deepCloneAssign({}, this.eopts); cfe.option[cid].id = cid; cfe.option[cid].type = this.type; } else { if (this.type && cfu.type.includes(this.type)) { cfu.option[cid] = deepCloneAssign({}, cfu[this.type], this.opts); cfu.option[cid].canvasId = cid; } else { this.mixinDatacomLoading = false; this.showchart = false; this.mixinDatacomErrorMessage = "参数错误:props参数中type类型不正确"; } } let newData = deepCloneAssign({}, anyData); if (newData.series !== void 0 && newData.series.length > 0) { this.mixinDatacomErrorMessage = null; if (this.echarts === true) { cfe.option[cid].chartData = newData; this.$nextTick(() => { this.init(); }); } else { cfu.option[cid].categories = newData.categories; cfu.option[cid].series = newData.series; this.$nextTick(() => { this.init(); }); } } }, resizeHandler() { let currTime = Date.now(); let lastDrawTime = this.lastDrawTime ? this.lastDrawTime : currTime - 3e3; let duration = currTime - lastDrawTime; if (duration < 1e3) return; uni.createSelectorQuery().in(this).select("#ChartBoxId" + this.cid).boundingClientRect((data) => { this.showchart = true; if (data.width > 0 && data.height > 0) { if (data.width !== this.cWidth || data.height !== this.cHeight) { this.checkData(this.drawData); } } }).exec(); }, getCloudData() { if (this.mixinDatacomLoading == true) { return; } this.mixinDatacomLoading = true; this.mixinDatacomGet().then((res) => { this.mixinDatacomResData = res.result.data; this.localdataInit(this.mixinDatacomResData); }).catch((err) => { this.mixinDatacomLoading = false; this.showchart = false; this.mixinDatacomErrorMessage = "请求错误:" + err; }); }, onMixinDatacomPropsChange(needReset, changed) { if (needReset == true && this.collection !== "") { this.showchart = false; this.mixinDatacomErrorMessage = null; this._clearChart(); this.getCloudData(); } }, _clearChart() { let cid = this.cid; if (this.echarts !== true && cfu.option[cid] && cfu.option[cid].context) { const ctx = cfu.option[cid].context; if (typeof ctx === "object" && !!!cfu.option[cid].update) { ctx.clearRect(0, 0, this.cWidth * this.pixel, this.cHeight * this.pixel); ctx.draw(); } } }, init() { let cid = this.cid; uni.createSelectorQuery().in(this).select("#ChartBoxId" + cid).boundingClientRect((data) => { if (data.width > 0 && data.height > 0) { this.mixinDatacomLoading = false; this.showchart = true; this.lastDrawTime = Date.now(); this.cWidth = data.width; this.cHeight = data.height; if (this.echarts !== true) { cfu.option[cid].background = this.background == "rgba(0,0,0,0)" ? "#FFFFFF" : this.background; cfu.option[cid].canvas2d = this.type2d; cfu.option[cid].pixelRatio = this.pixel; cfu.option[cid].animation = this.animation; cfu.option[cid].width = data.width * this.pixel; cfu.option[cid].height = data.height * this.pixel; cfu.option[cid].onzoom = this.onzoom; cfu.option[cid].ontap = this.ontap; cfu.option[cid].ontouch = this.ontouch; cfu.option[cid].onmouse = this.openmouse; cfu.option[cid].onmovetip = this.onmovetip; cfu.option[cid].tooltipShow = this.tooltipShow; cfu.option[cid].tooltipFormat = this.tooltipFormat; cfu.option[cid].tooltipCustom = this.tooltipCustom; cfu.option[cid].inScrollView = this.inScrollView; cfu.option[cid].lastDrawTime = this.lastDrawTime; cfu.option[cid].tapLegend = this.tapLegend; } if (this.inH5 || this.inApp) { if (this.echarts == true) { cfe.option[cid].ontap = this.ontap; cfe.option[cid].onmouse = this.openmouse; cfe.option[cid].tooltipShow = this.tooltipShow; cfe.option[cid].tooltipFormat = this.tooltipFormat; cfe.option[cid].tooltipCustom = this.tooltipCustom; cfe.option[cid].lastDrawTime = this.lastDrawTime; this.echartsOpts = deepCloneAssign({}, cfe.option[cid]); } else { cfu.option[cid].rotateLock = cfu.option[cid].rotate; this.uchartsOpts = deepCloneAssign({}, cfu.option[cid]); } } else { cfu.option[cid] = formatterAssign(cfu.option[cid], cfu.formatter); this.mixinDatacomErrorMessage = null; this.mixinDatacomLoading = false; this.showchart = true; this.$nextTick(() => { if (this.type2d === true) { const query = uni.createSelectorQuery().in(this); query.select("#" + cid).fields({ node: true, size: true }).exec((res) => { if (res[0]) { const canvas = res[0].node; const ctx = canvas.getContext("2d"); cfu.option[cid].context = ctx; cfu.option[cid].rotateLock = cfu.option[cid].rotate; if (cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true) { this._updataUChart(cid); } else { canvas.width = data.width * this.pixel; canvas.height = data.height * this.pixel; canvas._width = data.width * this.pixel; canvas._height = data.height * this.pixel; setTimeout(() => { cfu.option[cid].context.restore(); cfu.option[cid].context.save(); this._newChart(cid); }, 100); } } else { this.showchart = false; this.mixinDatacomErrorMessage = "参数错误:开启2d模式后,未获取到dom节点,canvas-id:" + cid; } }); } else { if (this.inAli) { cfu.option[cid].rotateLock = cfu.option[cid].rotate; } cfu.option[cid].context = uni.createCanvasContext(cid, this); if (cfu.instance[cid] && cfu.option[cid] && cfu.option[cid].update === true) { this._updataUChart(cid); } else { setTimeout(() => { cfu.option[cid].context.restore(); cfu.option[cid].context.save(); this._newChart(cid); }, 100); } } }); } } else { this.mixinDatacomLoading = false; this.showchart = false; if (this.reshow == true) { this.mixinDatacomErrorMessage = "布局错误:未获取到父元素宽高尺寸!canvas-id:" + cid; } } }).exec(); }, saveImage() { uni.canvasToTempFilePath({ canvasId: this.cid, success: (res) => { uni.saveImageToPhotosAlbum({ filePath: res.tempFilePath, success: function() { uni.showToast({ title: "保存成功", duration: 2e3 }); } }); } }, this); }, getImage() { if (this.type2d == false) { uni.canvasToTempFilePath({ canvasId: this.cid, success: (res) => { this.emitMsg({ name: "getImage", params: { type: "getImage", base64: res.tempFilePath } }); } }, this); } else { const query = uni.createSelectorQuery().in(this); query.select("#" + this.cid).fields({ node: true, size: true }).exec((res) => { if (res[0]) { const canvas = res[0].node; this.emitMsg({ name: "getImage", params: { type: "getImage", base64: canvas.toDataURL("image/png") } }); } }); } }, _error(e2) { this.mixinDatacomErrorMessage = e2.detail.errMsg; }, emitMsg(msg) { this.$emit(msg.name, msg.params); }, getRenderType() { if (this.echarts === true && this.mixinDatacomLoading === false) { this.beforeInit(); } }, toJSON() { return this; } } }; function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { const _component_qiun_loading = resolveEasycom(vue.resolveDynamicComponent("qiun-loading"), __easycom_0); const _component_qiun_error = resolveEasycom(vue.resolveDynamicComponent("qiun-error"), __easycom_1$2); return vue.openBlock(), vue.createElementBlock("view", { class: "chartsview", id: "ChartBoxId" + $data.cid }, [ _ctx.mixinDatacomLoading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createCommentVNode(" 自定义加载状态,请改这里 "), vue.createVNode(_component_qiun_loading, { loadingType: $props.loadingType }, null, 8, ["loadingType"]) ])) : vue.createCommentVNode("v-if", true), _ctx.mixinDatacomErrorMessage && $props.errorShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, onClick: _cache[0] || (_cache[0] = (...args) => $options.reloading && $options.reloading(...args)) }, [ vue.createCommentVNode(" 自定义错误提示,请改这里 "), vue.createVNode(_component_qiun_error, { errorMessage: $props.errorMessage }, null, 8, ["errorMessage"]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" APP和H5采用renderjs渲染图表 "), $data.echarts ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", { key: 2, style: vue.normalizeStyle([{ background: $props.background }, { "width": "100%", "height": "100%" }]), "data-directory": $props.directory, id: "EC" + $data.cid, prop: vue.wp($data.echartsOpts), "change:prop": _ctx.rdcharts.ecinit, resize: vue.wp($data.echartsResize), "change:resize": _ctx.rdcharts.ecresize }, null, 12, ["data-directory", "id", "prop", "change:prop", "resize", "change:resize"])), [ [vue.vShow, $data.showchart] ]) : (vue.openBlock(), vue.createElementBlock("view", { key: 3, onClick: _cache[2] || (_cache[2] = (...args) => _ctx.rdcharts.tap && _ctx.rdcharts.tap(...args)), onMousemove: _cache[3] || (_cache[3] = (...args) => _ctx.rdcharts.mouseMove && _ctx.rdcharts.mouseMove(...args)), onMousedown: _cache[4] || (_cache[4] = (...args) => _ctx.rdcharts.mouseDown && _ctx.rdcharts.mouseDown(...args)), onMouseup: _cache[5] || (_cache[5] = (...args) => _ctx.rdcharts.mouseUp && _ctx.rdcharts.mouseUp(...args)), onTouchstart: _cache[6] || (_cache[6] = (...args) => _ctx.rdcharts.touchStart && _ctx.rdcharts.touchStart(...args)), onTouchmove: _cache[7] || (_cache[7] = (...args) => _ctx.rdcharts.touchMove && _ctx.rdcharts.touchMove(...args)), onTouchend: _cache[8] || (_cache[8] = (...args) => _ctx.rdcharts.touchEnd && _ctx.rdcharts.touchEnd(...args)), id: "UC" + $data.cid, prop: vue.wp($data.uchartsOpts), "change:prop": _ctx.rdcharts.ucinit }, [ vue.withDirectives(vue.createElementVNode("canvas", { id: $data.cid, canvasId: $data.cid, style: vue.normalizeStyle({ width: $data.cWidth + "px", height: $data.cHeight + "px", background: $props.background }), "disable-scroll": $props.disableScroll, onError: _cache[1] || (_cache[1] = (...args) => $options._error && $options._error(...args)) }, null, 44, ["id", "canvasId", "disable-scroll"]), [ [vue.vShow, $data.showchart] ]) ], 40, ["id", "prop", "change:prop"])), vue.createCommentVNode(" 支付宝小程序 "), vue.createCommentVNode(" 其他小程序通过vue渲染图表 ") ], 8, ["id"]); } if (typeof block0 === "function") block0(_sfc_main$B); const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$4], ["__scopeId", "data-v-0ca34aee"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue"]]); const _sfc_main$A = { data() { return { aaa: [ { "soil_temp": [ 1 ], "create_time": [ "10-23" ] }, { "soil_mois": [ 1 ], "create_time": [ "10-23" ] }, { "p_content": [ 1 ], "create_time": [ "10-23" ] }, { "n_content": [ 1 ], "create_time": [ "10-23" ] }, { "k_content": [ 1 ], "create_time": [ "10-23" ] }, { "soil_temp": [ 1 ], "create_time": [ "10-23" ] }, { "soil_mois": [ 1 ], "create_time": [ "10-23" ] }, { "p_content": [ 1 ], "create_time": [ "10-23" ] }, { "n_content": [ 1 ], "create_time": [ "10-23" ] }, { "k_content": [ 1 ], "create_time": [ "10-23" ] }, { "soil_temp": [ 1 ], "create_time": [ "10-23" ] }, { "soil_mois": [ 1 ], "create_time": [ "10-23" ] }, { "p_content": [ 1 ], "create_time": [ "10-23" ] }, { "n_content": [ 1 ], "create_time": [ "10-23" ] }, { "k_content": [ 1 ], "create_time": [ "10-23" ] }, { "soil_temp": [ 1 ], "create_time": [ "10-23" ] }, { "soil_mois": [ 1 ], "create_time": [ "10-23" ] }, { "p_content": [ 1 ], "create_time": [ "10-23" ] }, { "n_content": [ 1 ], "create_time": [ "10-23" ] }, { "k_content": [ 1 ], "create_time": [ "10-23" ] }, { "soil_temp": [ 1 ], "create_time": [ "10-23" ] }, { "soil_mois": [ 1 ], "create_time": [ "10-23" ] }, { "p_content": [ 1 ], "create_time": [ "10-23" ] }, { "n_content": [ 1 ], "create_time": [ "10-23" ] }, { "k_content": [ 1 ], "create_time": [ "10-23" ] }, { "soil_temp": [ 1 ], "create_time": [ "10-23" ] }, { "soil_mois": [ 1 ], "create_time": [ "10-23" ] }, { "p_content": [ 1 ], "create_time": [ "10-23" ] }, { "n_content": [ 1 ], "create_time": [ "10-23" ] }, { "k_content": [ 1 ], "create_time": [ "10-23" ] }, { "soil_temp": [ 1 ], "create_time": [ "10-23" ] }, { "soil_mois": [ 1 ], "create_time": [ "10-23" ] }, { "p_content": [ 1 ], "create_time": [ "10-23" ] }, { "n_content": [ 1 ], "create_time": [ "10-23" ] }, { "k_content": [ 1 ], "create_time": [ "10-23" ] }, { "soil_temp": [ 1 ], "create_time": [ "10-23" ] }, { "soil_mois": [ 1 ], "create_time": [ "10-23" ] }, { "p_content": [ 1 ], "create_time": [ "10-23" ] }, { "n_content": [ 1 ], "create_time": [ "10-23" ] }, { "k_content": [ 1 ], "create_time": [ "10-23" ] } ], leftNum: 10, baseData: [], xInfo: [ { name: "土壤温度(℃)", data: "soil_temp" }, { name: "土壤湿度(%RH)", data: "soil_mois" }, { name: "磷含量%)", data: "p_content" }, { name: "氮含量(mg/l)", data: "n_content" }, { name: "钾含量(%)", data: "k_content" } ], chartData: [], //您可以通过修改 config-ucharts.js 文件中下标为 ['mix'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。 opts: { color: ["#1890FF"], padding: [15, 15, 0, 15], yAxis: { gridType: "dash", dashLength: 4, gridColor: "#CCCCCC", padding: 10, data: [ { position: "left", title: "", min: 0, max: 10 }, { position: "right", min: 0, max: 10, title: "", textAlign: "left" } ] } } }; }, onReady() { this.initCharts("2023-10-20", "2023-10-27"); }, methods: { changeDate(num) { }, navgo() { uni.navigateTo({ url: "/pages/index3/index" }); }, backFn() { uni.navigateBack(); }, initCharts(start_time, end_time) { landEnvDataChartAPI({ user_id: 307, start_time, end_time }).then((res) => { this.baseData = res.data; this.baseData; this.baseData.forEach((item, index2) => { this.getServerData(item, index2); }); }); }, getServerData(datas, index2) { setTimeout(() => { let res = { categories: datas["create_time"], series: [{ name: this.xInfo[index2].name, index: 1, type: "column", data: datas[this.xInfo[index2].data] }] }; this.chartData[index2] = JSON.parse(JSON.stringify(res)); }, 500); } } }; function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7); const _component_qiun_data_charts = resolveEasycom(vue.resolveDynamicComponent("qiun-data-charts"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock("view", { class: "", style: { "padding": "30rpx" } }, [ vue.createElementVNode("view", { class: "", style: { "padding": "20rpx", "box-sizing": "border-box" } }, [ vue.createElementVNode("view", { class: "head" }, [ vue.createElementVNode("view", { class: "subsection" }, [ vue.createElementVNode("view", { class: "subsection-li", onClick: _cache[0] || (_cache[0] = ($event) => $options.changeDate(10)) }, " 天 "), vue.createElementVNode("view", { class: "subsection-li", onClick: _cache[1] || (_cache[1] = ($event) => $options.changeDate(160.7)) }, " 月 "), vue.createElementVNode( "view", { class: "act", style: vue.normalizeStyle({ left: $data.leftNum + "rpx" }) }, null, 4 /* STYLE */ ) ]), vue.createElementVNode("view", { class: "set", onClick: _cache[2] || (_cache[2] = (...args) => $options.navgo && $options.navgo(...args)) }, [ vue.createElementVNode("view", { class: "", style: { "margin": "0 10rpx" } }, [ vue.createVNode(_component_u_icon, { name: "setting", color: "white", size: "15" }) ]), vue.createTextVNode(" 自定义 ") ]) ]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "tit" }, " 土地检测数据 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.baseData, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "charts-box", key: index2 }, [ vue.createVNode(_component_qiun_data_charts, { type: "column", opts: $data.opts, chartData: $data.chartData[index2] }, null, 8, ["opts", "chartData"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]); } const PagesProfileIndex = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$3], ["__scopeId", "data-v-201c0da5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/profile/index.vue"]]); const props = { props: { // 搜索框形状,round-圆形,square-方形 shape: { type: String, default: props$i.search.shape }, // 搜索框背景色,默认值#f2f2f2 bgColor: { type: String, default: props$i.search.bgColor }, // 占位提示文字 placeholder: { type: String, default: props$i.search.placeholder }, // 是否启用清除控件 clearabled: { type: Boolean, default: props$i.search.clearabled }, // 是否自动聚焦 focus: { type: Boolean, default: props$i.search.focus }, // 是否在搜索框右侧显示取消按钮 showAction: { type: Boolean, default: props$i.search.showAction }, // 右边控件的样式 actionStyle: { type: Object, default: props$i.search.actionStyle }, // 取消按钮文字 actionText: { type: String, default: props$i.search.actionText }, // 输入框内容对齐方式,可选值为 left|center|right inputAlign: { type: String, default: props$i.search.inputAlign }, // input输入框的样式,可以定义文字颜色,大小等,对象形式 inputStyle: { type: Object, default: props$i.search.inputStyle }, // 是否启用输入框 disabled: { type: Boolean, default: props$i.search.disabled }, // 边框颜色 borderColor: { type: String, default: props$i.search.borderColor }, // 搜索图标的颜色,默认同输入框字体颜色 searchIconColor: { type: String, default: props$i.search.searchIconColor }, // 输入框字体颜色 color: { type: String, default: props$i.search.color }, // placeholder的颜色 placeholderColor: { type: String, default: props$i.search.placeholderColor }, // 左边输入框的图标,可以为uView图标名称或图片路径 searchIcon: { type: String, default: props$i.search.searchIcon }, searchIconSize: { type: [Number, String], default: props$i.search.searchIconSize }, // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法 margin: { type: String, default: props$i.search.margin }, // 开启showAction时,是否在input获取焦点时才显示 animation: { type: Boolean, default: props$i.search.animation }, // 输入框的初始化内容 modelValue: { type: String, default: props$i.search.value }, value: { type: String, default: props$i.search.value }, // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档) maxlength: { type: [String, Number], default: props$i.search.maxlength }, // 搜索框高度,单位px height: { type: [String, Number], default: props$i.search.height }, // 搜索框左侧文本 label: { type: [String, Number, null], default: props$i.search.label } } }; const _sfc_main$z = { name: "u-search", mixins: [mpMixin, mixin, props], data() { return { keyword: "", showClear: false, // 是否显示右边的清除图标 show: false, // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件 focused: this.focus // 绑定输入框的值 // inputValue: this.value }; }, watch: { keyword(nVal) { this.$emit("update:modelValue", nVal); this.$emit("change", nVal); }, modelValue: { immediate: true, handler(nVal) { this.keyword = nVal; } } }, computed: { showActionBtn() { return !this.animation && this.showAction; } }, emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"], methods: { // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化 inputChange(e2) { this.keyword = e2.detail.value; }, // 清空输入 // 也可以作为用户通过this.$refs形式调用清空输入框内容 clear() { this.keyword = ""; this.$nextTick(() => { this.$emit("clear"); }); }, // 确定搜索 search(e2) { this.$emit("search", e2.detail.value); try { uni.hideKeyboard(); } catch (e3) { } }, // 点击右边自定义按钮的事件 custom() { this.$emit("custom", this.keyword); try { uni.hideKeyboard(); } catch (e2) { } }, // 获取焦点 getFocus() { this.focused = true; if (this.animation && this.showAction) this.show = true; this.$emit("focus", this.keyword); }, // 失去焦点 blur() { setTimeout(() => { this.focused = false; }, 100); this.show = false; this.$emit("blur", this.keyword); }, // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页 clickHandler() { if (this.disabled) this.$emit("click"); }, // 点击左边图标 clickIcon(e2) { this.$emit("clickIcon", this.keyword); try { uni.hideKeyboard(); } catch (e3) { } } } }; function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-search", onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)), style: vue.normalizeStyle([{ margin: _ctx.margin }, _ctx.$u.addStyle(_ctx.customStyle)]) }, [ vue.createElementVNode( "view", { class: "u-search__content", style: vue.normalizeStyle({ backgroundColor: _ctx.bgColor, borderRadius: _ctx.shape == "round" ? "100px" : "4px", borderColor: _ctx.borderColor }) }, [ _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [ vue.createElementVNode( "text", { class: "u-search__content__label" }, vue.toDisplayString(_ctx.label), 1 /* TEXT */ ) ], true) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-search__content__icon" }, [ vue.createVNode(_component_u_icon, { onClick: $options.clickIcon, size: _ctx.searchIconSize, name: _ctx.searchIcon, color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color }, null, 8, ["onClick", "size", "name", "color"]) ]), vue.createElementVNode("input", { "confirm-type": "search", onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)), value: $data.keyword, onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)), onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)), disabled: _ctx.disabled, onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)), focus: _ctx.focus, maxlength: _ctx.maxlength, "placeholder-class": "u-search__content__input--placeholder", placeholder: _ctx.placeholder, "placeholder-style": `color: ${_ctx.placeholderColor}`, class: "u-search__content__input", type: "text", style: vue.normalizeStyle([{ textAlign: _ctx.inputAlign, color: _ctx.color, backgroundColor: _ctx.bgColor, height: _ctx.$u.addUnit(_ctx.height) }, _ctx.inputStyle]) }, null, 44, ["value", "disabled", "focus", "maxlength", "placeholder", "placeholder-style"]), $data.keyword && _ctx.clearabled && $data.focused ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-search__content__icon u-search__content__close", onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args)) }, [ vue.createVNode(_component_u_icon, { name: "close", size: "11", color: "#ffffff", customStyle: "line-height: 12px" }) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createElementVNode( "text", { style: vue.normalizeStyle([_ctx.actionStyle]), class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]), onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"])) }, vue.toDisplayString(_ctx.actionText), 7 /* TEXT, CLASS, STYLE */ ) ], 4 /* STYLE */ ); } const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$2], ["__scopeId", "data-v-ed789780"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-search/u-search.vue"]]); const _sfc_main$y = { __name: "feedList", setup(__props) { const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const animalList = vue.reactive([]); animalListAPI$1({ user_id: 307, page_no: 1, page_size: 3e6 }).then((res) => { res.data.forEach((item) => { animalList.push(item); }); }); const query = vue.ref(""); const queryFn = () => { animalList.splice(0, 999999999); animalListAPI$1({ user_id: 307, keyword: query.value }).then((res) => { res.data.forEach((item) => { animalList.push(item); }); }); }; return (_ctx, _cache) => { const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_1); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n \r\n 农户名称: 1号土地\r\n \r\n \r\n \r\n \r\n 种养殖类型: 土豆\r\n \r\n \r\n 养殖头数: 的划分等级\r\n \r\n \r\n \r\n \r\n 土地面积: 20亩\r\n \r\n \r\n 公猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 养殖种类: 20亩\r\n \r\n \r\n 母猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 具体种类: 20亩\r\n \r\n \r\n 幼崽: 的划分等级\r\n \r\n \r\n \r\n '), vue.createVNode(farmersCard$1), vue.createElementVNode("view", { class: "serch" }, [ vue.createVNode(_component_u_search, { bgColor: "white", modelValue: query.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => query.value = $event), height: "63.08rpx", "show-action": false, actionText: "搜索", animation: true }, null, 8, ["modelValue"]), vue.createElementVNode("view", { class: "serch-btn", onClick: queryFn }, " 搜索 ") ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(animalList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card", key: index2, onClick: ($event) => navgo(`/pages/feedIng/feedDetail?id=${item.id}`) }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode( "view", { class: "" }, " 编号: " + vue.toDisplayString(item.animal_code), 1 /* TEXT */ ), item.animal_status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 健康 ")) : vue.createCommentVNode("v-if", true), item.animal_status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "", style: { "color": "#FFD736" } }, " 怀孕中 ")) : vue.createCommentVNode("v-if", true), item.animal_status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "", style: { "color": "#3274F9" } }, " 可出栏 ")) : vue.createCommentVNode("v-if", true), item.animal_status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "", style: { "color": "#F84221" } }, " 生病隔离中 ")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖类型: " + vue.toDisplayString(item.animal_kind), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 年龄: " + vue.toDisplayString(item.animal_age) + "年 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 体重: " + vue.toDisplayString(item.animal_weight) + "kg ", 1 /* TEXT */ ) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "ripe-btn", onClick: _cache[1] || (_cache[1] = ($event) => navgo("/pages/feedIng/addPoultry")) }, " 添加新动物 ") ]); }; } }; const PagesFeedIngFeedList = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-369a728b"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/feedList.vue"]]); const _sfc_main$x = { __name: "feedDetail", setup(__props) { const selectList = vue.reactive([ "健康", "怀孕中", "生病隔离中", "可出栏" ]); const actionList = vue.reactive({}); const value = vue.ref(""); const selectAct = vue.ref(false); const selectFoucsFn = (e2) => { selectAct.value = true; }; const indexs = vue.ref(0); const changSelectfn = (index2) => { indexs.value = index2; value.value = selectList[index2]; formData.status = index2 + 1; }; const animal_id2 = vue.ref(0); const baseData = vue.reactive({}); onLoad((options) => { animal_id2.value = options.id; formData.animal_id = options.id; animalInfoAPI$1({ animal_id: options.id }).then((res) => { for (let key in res.data) { baseData[key] = res.data[key]; } formData.animal_weight = baseData.animal_weight; value.value = selectList[baseData.animal_status - 1]; indexs.value = baseData.animal_status - 1; }); animalChangeListAPI({ animal_id: animal_id2.value }).then((res) => { formatAppLog("log", "at pages/feedIng/feedDetail.vue:174", res.data); return; }); }); const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const formData = vue.reactive({ status: "", animal_id: "", animal_weight: "" }); const updataStatusFn = () => { animalStatusAPI({ ...formData }).then((res) => { uni.showToast({ title: res.msg, icon: "none" }); }); }; const outBar = () => { animalSellAPI({ animal_id: animal_id2.value }).then((res) => { uni.showToast({ title: res.msg, icon: "none" }); setTimeout(() => { uni.navigateTo({ url: "/pages/index/index" }); }, 2e3); }); }; return (_ctx, _cache) => { var _a; const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); return vue.openBlock(), vue.createElementBlock( "view", { class: "content", onClickCapture: _cache[4] || (_cache[4] = ($event) => selectAct.value = false) }, [ vue.createCommentVNode(' \r\n \r\n \r\n 农户名称: 1号土地\r\n \r\n \r\n \r\n \r\n 种养殖类型: 土豆\r\n \r\n \r\n 养殖头数: 的划分等级\r\n \r\n \r\n \r\n \r\n 土地面积: 20亩\r\n \r\n \r\n 公猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 养殖种类: 20亩\r\n \r\n \r\n 母猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 具体种类: 20亩\r\n \r\n \r\n 幼崽: 的划分等级\r\n \r\n \r\n '), vue.createVNode(farmersCard$1), vue.createCommentVNode(` \r \r \r 搜索\r \r `), vue.createElementVNode("view", { class: "title" }, [ vue.createElementVNode( "view", { class: "" }, " 编号: " + vue.toDisplayString(baseData.animal_code), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "more-jt", onClick: _cache[0] || (_cache[0] = ($event) => navgo(`/pages/feedIng/SingleDetail?id=${animal_id2.value}`)) }, [ vue.createTextVNode(" 查看养殖详情 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "", onClickCapture: selectFoucsFn }, " 养殖类型: " + vue.toDisplayString(baseData.animal_kind), 33 /* TEXT, HYDRATE_EVENTS */ ), vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode(" 体重: "), vue.createVNode(_component_up_input, { style: { "height": "49.07rpx", "width": "215.54rpx", "margin-left": "20rpx" }, placeholder: "请输入内容", border: "surround", modelValue: formData.animal_weight, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.animal_weight = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li", style: { "align-items": "center" } }, [ vue.createElementVNode( "view", { class: "" }, " 年龄: " + vue.toDisplayString(baseData.animal_age) + "年 ", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "select" }, [ vue.createTextVNode(" 状态: "), vue.createVNode(_component_up_input, { readonly: "", style: { "height": "49.07rpx", "width": "215.54rpx", "margin-left": "20rpx" }, placeholder: "请选择", border: "surround", onClickCapture: selectFoucsFn, modelValue: value.value, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event) }, null, 8, ["modelValue"]), vue.createElementVNode( "view", { class: vue.normalizeClass(["JT", { actJT: selectAct.value }]) }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLJT.png", width: "24.53rpx", height: "24.53rpx" }) ], 2 /* CLASS */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "selectvalue" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(selectList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "select-li", key: index2, onClick: ($event) => changSelectfn(index2), style: vue.normalizeStyle({ color: indexs.value == index2 ? "black" : "#B3B3B3" }) }, [ vue.createTextVNode( vue.toDisplayString(item) + " ", 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "" }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLZZ.png", width: "24.53rpx", height: "24.53rpx" }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, indexs.value == index2] ]) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, selectAct.value] ]) ]) ]), vue.createVNode(imgCard, { imgUrl: (_a = baseData == null ? void 0 : baseData.pic_detail) == null ? void 0 : _a.pic }, null, 8, ["imgUrl"]), vue.createElementVNode("view", { class: "up-plant-btn", onClick: updataStatusFn }, " 确认更新 ") ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(actionList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "circumstance", key: index2 }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(index2), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "updata-btn", onClick: _cache[3] || (_cache[3] = ($event) => navgo("/pages/growRecord/index")) }, " 更新" + vue.toDisplayString(index2.slice(0, -2)), 1 /* TEXT */ ) ]), vue.createVNode(myTable, { tit: `查看${index2.slice(0, -2)}`, dataList: item.action_record, route: `/pages/feedIng/allRecording?id=${animal_id2.value}` }, null, 8, ["tit", "dataList", "route"]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "ripe-btn", onClick: outBar }, " 标记状态为出栏 ") ], 32 /* HYDRATE_EVENTS */ ); }; } }; const PagesFeedIngFeedDetail = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-693c046c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/feedDetail.vue"]]); const _sfc_main$w = { __name: "detailCard", props: { id: String, showImg: Boolean }, setup(__props) { const props2 = __props; const dateFn = () => { var today = /* @__PURE__ */ new Date(); var year = today.getFullYear(); var month = today.getMonth() + 1; var day = today.getDate(); var dateStr = year + "-" + month + "-" + day; return dateStr; }; const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const objFn = (res, data) => { for (let key in res) { data[key] = res[key]; } }; const animal_detail = vue.reactive({}); vue.watch(props2, (newValue, oldVlaue) => { if (props2 == null ? void 0 : props2.id) { animalInfoAPI$1({ animal_id: Number(props2.id) }).then((res) => { objFn(res.data, animal_detail); }); } }, { // 页面加载会先执行一次 immediate: true }); const updateImgFn = () => { uplodeImg().then((res) => { animal_detail.pic_detail.pic = res.data.image; addAnimalPicAPI$1({ animal_id: Number(props2.id), pic: res.data.image }); }); }; return (_ctx, _cache) => { var _a; const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ props2.showImg ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ ((_a = animal_detail == null ? void 0 : animal_detail.pic_detail) == null ? void 0 : _a.pic) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ vue.createVNode(imgCard, { imgUrl: animal_detail.pic_detail.pic }, null, 8, ["imgUrl"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "bad-info" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/sj.png')", style: { "margin": "0 5rpx" }, width: "28.04rpx", height: "28.04rpx" }), vue.createElementVNode( "text", null, "刷新时间:" + vue.toDisplayString(dateFn()), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { style: { "display": "flex" }, onClick: _cache[0] || (_cache[0] = ($event) => navgo(`/pages/feedIng/histroyFeed?id=${props2.id}`)) }, [ vue.createTextVNode(" 查看历史条件 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ]) ]), vue.createElementVNode("view", { class: "up-plant-btn", onClick: updateImgFn }, " 上传新的种植情况 ") ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode( "view", { class: "" }, " 溯源码: " + vue.toDisplayString(animal_detail.animal_code), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖品种: " + vue.toDisplayString(animal_detail.animal_kind), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 年龄: " + vue.toDisplayString(animal_detail.animal_age), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖类型: " + vue.toDisplayString(animal_detail.animal_breed), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 体重:" + vue.toDisplayString(animal_detail.animal_weight), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/GG.png", style: { "margin": "0 21rpx" }, width: "80rpx", height: "80rpx" }), vue.createTextVNode(" 当前养殖状态 ") ]), animal_detail.animal_status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 健康 ")) : vue.createCommentVNode("v-if", true), animal_detail.animal_status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "", style: { "color": "#FFD736" } }, " 怀孕中 ")) : vue.createCommentVNode("v-if", true), animal_detail.animal_status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "", style: { "color": "#3274F9" } }, " 可出栏 ")) : vue.createCommentVNode("v-if", true), animal_detail.animal_status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "", style: { "color": "#F84221" } }, " 生病隔离中 ")) : vue.createCommentVNode("v-if", true) ]) ]) ], 64 /* STABLE_FRAGMENT */ ); }; } }; const detailCard$1 = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-ee959ecb"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/animal/detailCard.vue"]]); const _sfc_main$v = { __name: "histroyFeed", setup(__props) { const img = vue.ref(""); const updateImgFn = () => { uplodeImg().then((res) => { img.value = res.data.image; addAnimalPicAPI$1({ animal_id: Number(animal_id2.value), pic: res.data.image }).then((res2) => { imgList.unshift(img.value); }); }); }; const imgList = vue.reactive([]); const animal_id2 = vue.ref(""); onLoad((option) => { animal_id2.value = option.id; animalPicListAPI$1({ animal_id: option.id }).then((res) => { res.data.forEach((item) => { imgList.push(item.pic); }); }); }); const previewImage = (index2) => { uni.previewImage({ urls: imgList, current: index2 }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(` \r \r \r \r 溯源码: {{animal_detail.animal_code}}\r \r \r \r \r 养殖品种: {{animal_detail.animal_kind}}\r \r \r 年龄: {{animal_detail.animal_age}}\r \r \r \r \r 养殖类型: {{animal_detail.animal_breed}}\r \r \r 体重:{{animal_detail.animal_weight}}\r \r \r \r \r \r \r \r \r 当前养殖状态\r \r \r 健康\r \r \r 怀孕中\r \r \r 可出栏\r \r \r 生病隔离中\r \r \r \r `), vue.createVNode(detailCard$1, { id: animal_id2.value }, null, 8, ["id"]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "" }, " 养殖情况 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(imgList, (item, index2) => { return vue.openBlock(), vue.createBlock(imgCard, { imgUrl: item, key: index2, onClick: ($event) => previewImage(index2) }, null, 8, ["imgUrl", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "up-plant-btn", onClick: updateImgFn }, " 上传新的种植情况 ") ]); }; } }; const PagesFeedIngHistroyFeed = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-7de95975"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/histroyFeed.vue"]]); const _sfc_main$u = { __name: "updateFeed", setup(__props) { const showPop = vue.ref(false); const formData = vue.reactive({ value: "" }); return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 农户名称: 1号土地 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种养殖类型: 土豆 "), vue.createElementVNode("view", { class: "" }, " 养殖头数: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 土地面积: 20亩 "), vue.createElementVNode("view", { class: "" }, " 公猪: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖种类: 20亩 "), vue.createElementVNode("view", { class: "" }, " 母猪: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 具体种类: 20亩 "), vue.createElementVNode("view", { class: "" }, " 幼崽: 的划分等级 ") ]) ]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, " 今日操作 "), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 喂食 "), vue.createElementVNode("view", { class: "", style: { "color": "#00A15E" }, onClick: _cache[0] || (_cache[0] = ($event) => showPop.value = true) }, " +添加喂食记录 ") ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 注射疫苗 "), vue.createElementVNode("view", { class: "", style: { "color": "#00A15E" } }, " +添加喂食记录 ") ]) ]) ]), vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, " 具体操作内容 "), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 喂食 "), vue.createElementVNode("view", { class: "", style: { "display": "flex" } }, [ vue.createElementVNode("view", { class: "", style: { "margin-right": "40rpx" } }, " 删除 "), vue.createElementVNode("view", { class: "", style: { "color": "#00A15E" } }, " 编辑 ") ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 饲料类型: 无机盐饲料 "), vue.createElementVNode("view", { class: "" }, " 饲料品牌: 双胞胎 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 喂食记录: 200kg "), vue.createElementVNode("view", { class: "" }, " 备注: 双胞胎 ") ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 疫苗注射对象 "), vue.createElementVNode("view", { class: "", style: { "display": "flex" } }, [ vue.createElementVNode("view", { class: "", style: { "margin-right": "40rpx" } }, " 删除 "), vue.createElementVNode("view", { class: "", style: { "color": "#00A15E" } }, " 编辑 ") ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 疫苗名称: 无机盐饲料 "), vue.createElementVNode("view", { class: "" }, " 疫苗品牌: 双胞胎 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 操作人员: 200kg "), vue.createElementVNode("view", { class: "" }, " 注射数量: 双胞胎 ") ]), vue.createElementVNode("view", { class: "" }, [ vue.createTextVNode(" 疫苗条形码 "), vue.createElementVNode("view", { class: "code-img" }) ]) ]), vue.createElementVNode("view", { class: "ripe-btn" }, " 完成今日统计 "), vue.createCommentVNode(" 组件 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_u_popup, { show: showPop.value, round: 10, closeable: true, onClose: _cache[4] || (_cache[4] = ($event) => showPop.value = false), onOpen: _cache[5] || (_cache[5] = ($event) => showPop.value = true) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "pop-content" }, [ vue.createElementVNode("view", { class: "pop-tit" }, " 添加喂食记录 "), vue.createElementVNode("view", { class: "" }, " 饲料类型 "), vue.createElementVNode("view", { class: "pop-li" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), vue.createElementVNode("view", { class: "" }, " 饲料品牌 "), vue.createElementVNode("view", { class: "pop-li" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.value, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), vue.createElementVNode("view", { class: "pop-confirm", onClick: _cache[3] || (_cache[3] = (...args) => _ctx.confirm && _ctx.confirm(...args)) }, " 确认 ") ]) ]), _: 1 /* STABLE */ }, 8, ["show"]) ]) ]); }; } }; const PagesFeedIngUpdateFeed = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-d1a9a218"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/updateFeed.vue"]]); const _sfc_main$t = { __name: "vaccineInfo", setup(__props) { const options1 = vue.reactive([{ text: "删除" }]); const updateImgFn = () => { uni.chooseImage({ count: 1, sizeType: ["compressed"], sourceType: ["album"], success: (res) => { formatAppLog("log", "at pages/feedIng/vaccineInfo.vue:112", "chooseImage success, temp path is", res.tempFilePaths[0]); var imageSrc = res.tempFilePaths[0]; uni.showLoading({ title: "上传中" }); this.task = uni.uploadFile({ url: "https://unidemo.dcloud.net.cn/upload", //仅为示例,非真实的接口地址 filePath: imageSrc, name: "file", formData: { "user": "test" }, success: (res2) => { if (this.pageVisible) { formatAppLog("log", "at pages/feedIng/vaccineInfo.vue:126", "uploadImage success, res is:", res2); uni.hideLoading(); uni.showToast({ title: "上传成功", icon: "success", duration: 1e3 }); this.imageSrc = imageSrc; } }, fail: (err) => { if (this.pageVisible) { formatAppLog("log", "at pages/feedIng/vaccineInfo.vue:138", "uploadImage fail", err); uni.hideLoading(); uni.showModal({ content: err.errMsg, showCancel: false }); } } }); }, fail: (err) => { formatAppLog("log", "at pages/feedIng/vaccineInfo.vue:149", "chooseImage fail", err); } }); }; return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_2); const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_3); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "title" }, " 疫苗相关信息 "), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 疫苗名称 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: _ctx.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 疫苗品牌 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: _ctx.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 操作人员 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: _ctx.value, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 疫苗条形码 "), vue.createElementVNode("view", { class: "code-img" }, [ vue.createElementVNode("view", { class: "carime-icon", onClick: updateImgFn }, [ vue.createVNode(_component_u__image, { src: "/static/img/DJSC.png", width: "91.12rpx", height: "91.12rpx" }), vue.createElementVNode("view", { class: "" }, " 点击上传图片 ") ]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 注射对象 "), vue.createElementVNode("view", { class: "scan" }, " 扫描动物耳标/脚标 ") ]) ]), (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList([1, 1, 1, 1, 1], (item) => { return vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, [ vue.createVNode(_component_u_swipe_action, null, { default: vue.withCtx(() => [ vue.createVNode(_component_u_swipe_action_item, { options: options1, style: { "border-radius": "20rpx" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "", style: { "padding": "20rpx 30rpx" } }, [ vue.createElementVNode("view", { class: "swipe-action-tit" }, [ vue.createElementVNode("view", { class: "" }, " 编号: 123456 "), (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 健康 ")), vue.createCommentVNode("v-if", true), vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "swipe-action-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖品种:黑山猪 "), vue.createElementVNode("view", { class: "" }, " 年龄: 5年 "), vue.createElementVNode("view", { class: "" }, " 体重: 150kg ") ]) ]) ]), _: 1 /* STABLE */ }, 8, ["options"]) ]), _: 1 /* STABLE */ }) ]); }), 64 /* STABLE_FRAGMENT */ )), vue.createElementVNode("view", { class: "ripe-btn" }, " 确认 ") ]); }; } }; const PagesFeedIngVaccineInfo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-b7c58360"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/vaccineInfo.vue"]]); const _sfc_main$s = { __name: "addPoultry", setup(__props) { const navgo = () => { uni.navigateTo({ url: "/pages/index/index" }); }; const updateImgFn = () => { uplodeImg().then((res) => { formData.pic = res.data.image; }); }; const selectList = vue.reactive([ "公猪", "母猪" ]); const gender = vue.ref(""); const status = vue.ref(""); const selectList1 = vue.reactive([ "健康", "怀孕中", "生病隔离中", "可出栏" ]); const value = vue.ref(""); const value1 = vue.ref(""); const selectAct = vue.ref(false); const selectAct1 = vue.ref(false); const selectFoucsFn = (e2) => { selectAct.value = true; selectAct1.value = false; }; const selectFoucsFn1 = (e2) => { selectAct1.value = true; selectAct.value = false; }; const indexs = vue.ref(0); const indexs1 = vue.ref(0); const changSelectfn = (index2) => { indexs.value = index2; value.value = selectList[index2]; formData.gender = index2 + 1; gender.value = selectList[index2]; selectAct.value = false; selectAct1.value = false; }; const changSelectfn1 = (index2) => { indexs1.value = index2; value1.value = selectList[index2]; formData.status = index2 + 1; status.value = selectList1[index2]; selectAct.value = false; selectAct1.value = false; }; const baseFormData = vue.reactive({ user_id: 307, kind: "", breed: "", gender: 1, age: "", status: 1, weight: "", pic: "" }); const objFn = (res, obj) => { for (let key in res) { obj[key] = res[key]; } }; const formData = vue.reactive({}); objFn(baseFormData, formData); const nextFn = () => { addAnimalAPI({ ...formData }).then((res) => { status.value = ""; gender.value = ""; addList.push(1); objFn(baseFormData, formData); uni.showToast({ title: "添加成功", icon: "success", duration: 1e3 }); }); }; const addList = vue.reactive([]); return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ addList.length ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "head" }, " 已添加" + vue.toDisplayString(addList.length) + "条畜生 ", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 养殖品种 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.kind, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.kind = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 具体品类 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.breed, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.breed = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 年龄 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入年龄", border: "surround", modelValue: formData.age, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.age = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "select" }, [ vue.createTextVNode(" 养殖类型: "), vue.createVNode(_component_up_input, { onClick: selectFoucsFn, readonly: "", placeholder: "请选择", style: { "margin-top": "20rpx" }, border: "surround", modelValue: gender.value, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => gender.value = $event) }, null, 8, ["modelValue"]), vue.createElementVNode( "view", { class: vue.normalizeClass(["JT", { actJT: selectAct.value }]) }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLJT.png", width: "24.53rpx", height: "24.53rpx" }) ], 2 /* CLASS */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "selectvalue" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(selectList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "select-li", key: index2, onClick: ($event) => changSelectfn(index2), style: vue.normalizeStyle({ color: indexs.value == index2 ? "black" : "#B3B3B3" }) }, [ vue.createTextVNode( vue.toDisplayString(item) + " ", 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "" }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLZZ.png", width: "24.53rpx", height: "24.53rpx" }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, indexs.value == index2] ]) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, selectAct.value] ]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "select" }, [ vue.createTextVNode(" 状态: "), vue.createVNode(_component_up_input, { placeholder: "请选择", style: { "margin-top": "20rpx" }, border: "surround", onClick: selectFoucsFn1, modelValue: status.value, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => status.value = $event) }, null, 8, ["modelValue"]), vue.createElementVNode( "view", { class: vue.normalizeClass(["JT", { actJT: selectAct1.value }]) }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLJT.png", width: "24.53rpx", height: "24.53rpx" }) ], 2 /* CLASS */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "selectvalue", style: { "bottom": "-250rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(selectList1, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "select-li", key: index2, onClick: ($event) => changSelectfn1(index2), style: vue.normalizeStyle({ color: indexs1.value == index2 ? "black" : "#B3B3B3" }) }, [ vue.createTextVNode( vue.toDisplayString(item) + " ", 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "" }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLZZ.png", width: "24.53rpx", height: "24.53rpx" }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, indexs1.value == index2] ]) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, selectAct1.value] ]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 体重 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.weight, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => formData.weight = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "code-img" }, [ vue.createElementVNode("view", { class: "carime-icon", onClick: updateImgFn }, [ formData.pic ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ vue.createVNode(_component_u__image, { src: formData.pic, width: "637.85rpx", height: "196.26rpx" }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "carime-icon" }, [ vue.createVNode(_component_u__image, { src: "/static/img/DJSC.png", width: "91.12rpx", height: "91.12rpx" }), vue.createElementVNode("view", { class: "" }, " 上传 ") ])) ]) ]) ]), vue.createElementVNode("view", { class: "next-btn", onClick: nextFn }, " 下一个 "), vue.createElementVNode("view", { class: "ripe-btn", onClick: navgo }, " 完成添加 ") ]); }; } }; const PagesFeedIngAddPoultry = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/addPoultry.vue"]]); const _sfc_main$r = { __name: "allRecordTable", setup(__props) { const actionList = vue.reactive({}); actionsAPI$1({ type: 3 }).then((res) => { for (let key in res.data) { actionList[key] = res.data[key]; } }); const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createVNode(farmersCard$1), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(actionList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "circumstance", key: index2 }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(index2), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "updata-btn", onClick: _cache[0] || (_cache[0] = ($event) => navgo("/pages/growRecord/index")) }, " 更新" + vue.toDisplayString(index2.slice(0, -2)), 1 /* TEXT */ ) ]), vue.createVNode(myTable, { dataList: item.action_record }, { default: vue.withCtx(() => [ vue.createTextVNode("> ") ]), _: 2 /* DYNAMIC */ }, 1032, ["dataList"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]); }; } }; const PagesFeedIngAllRecordTable = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-ccbc2811"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/allRecordTable.vue"]]); const _sfc_main$q = { __name: "allFeed", setup(__props) { return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 编号: 52656 "), vue.createElementVNode("view", { class: "" }, " 溯源码: 52656 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖品种: 土豆 "), vue.createElementVNode("view", { class: "" }, " 年龄: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖类型: 20亩 "), vue.createElementVNode("view", { class: "" }, " 体重: 45kg ") ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/GG.png", style: { "margin": "0 21rpx" }, width: "80rpx", height: "80rpx" }), vue.createTextVNode(" 当前养殖状态 ") ]), vue.createElementVNode("view", { class: "", style: { "color": "green" } }, " 健康 ") ]) ]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 饲养记录 "), vue.createVNode(myTable) ]) ]); }; } }; const PagesFeedIngAllFeed = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-394b45fc"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/allFeed.vue"]]); const _sfc_main$p = { __name: "SingleDetail", setup(__props) { const animal_id2 = vue.ref(0); onLoad((option) => { animal_id2.value = option.id; }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n\r\n \r\n \r\n \r\n 刷新时间:{{dateFn()}}\r\n \r\n \r\n 查看历史条件 \r\n \r\n \r\n \r\n 上传新的种植情况\r\n '), vue.createCommentVNode(' \r\n \r\n \r\n 编号: 52656\r\n \r\n \r\n 溯源码: 52656\r\n \r\n \r\n \r\n \r\n 养殖品种: 土豆\r\n \r\n \r\n 年龄: 的划分等级\r\n \r\n \r\n \r\n \r\n 养殖类型: 20亩\r\n \r\n \r\n 体重: 45kg\r\n \r\n \r\n '), vue.createCommentVNode(' \r\n \r\n \r\n \r\n 当前养殖状态\r\n \r\n \r\n 健康\r\n \r\n \r\n\r\n '), vue.createVNode(detailCard$1, { id: animal_id2.value, showImg: true }, null, 8, ["id"]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 饲养记录 "), vue.createVNode(myTable) ]) ]); }; } }; const PagesFeedIngSingleDetail = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-7f8847a9"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/SingleDetail.vue"]]); const _sfc_main$o = { __name: "allRecording", setup(__props) { const id = vue.ref(0); onLoad((option) => { id.value = option.id; }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n \r\n 农户名称: 1号土地\r\n \r\n \r\n \r\n \r\n 种养殖类型: 土豆\r\n \r\n \r\n 养殖头数: 的划分等级\r\n \r\n \r\n \r\n \r\n 土地面积: 20亩\r\n \r\n \r\n 公猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 养殖种类: 20亩\r\n \r\n \r\n 母猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 具体种类: 20亩\r\n \r\n \r\n 幼崽: 的划分等级\r\n \r\n \r\n '), vue.createVNode(detailCard$1, { id: id.value }, null, 8, ["id"]), vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 饲养记录 "), vue.createVNode(myTable) ]); }; } }; const PagesFeedIngAllRecording = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-b5c84cbe"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/allRecording.vue"]]); const _sfc_main$n = { __name: "feedList", setup(__props) { const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const animalList = vue.reactive([]); animalListAPI({ user_id: 307, page_no: 1, page_size: 3e6 }).then((res) => { res.data.forEach((item) => { animalList.push(item); }); }); const query = vue.ref(""); const queryFn = () => { formatAppLog("log", "at pages/poultry/feedList.vue:114", 444454); animalList.splice(0, 999999999); animalListAPI({ user_id: 307, keyword: query.value }).then((res) => { res.data.forEach((item) => { animalList.push(item); }); }); }; return (_ctx, _cache) => { const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_1); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n \r\n 农户名称: 1号土地\r\n \r\n \r\n \r\n \r\n 种养殖类型: 土豆\r\n \r\n \r\n 养殖头数: 的划分等级\r\n \r\n \r\n \r\n \r\n 土地面积: 20亩\r\n \r\n \r\n 公猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 养殖种类: 20亩\r\n \r\n \r\n 母猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 具体种类: 20亩\r\n \r\n \r\n 幼崽: 的划分等级\r\n \r\n \r\n '), vue.createVNode(farmersCard), vue.createElementVNode("view", { class: "serch" }, [ vue.createVNode(_component_u_search, { bgColor: "white", modelValue: query.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => query.value = $event), onChange: queryFn, height: "63.08rpx", "show-action": false, actionText: "搜索", animation: true }, null, 8, ["modelValue"]), vue.createElementVNode("view", { class: "serch-btn" }, " 搜索 ") ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(animalList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card", key: index2, onClick: ($event) => navgo(`/pages/poultry/feedDetail?id=${item.id}`) }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode( "view", { class: "" }, " 编号: " + vue.toDisplayString(item.code), 1 /* TEXT */ ), item.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 健康 ")) : vue.createCommentVNode("v-if", true), item.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "", style: { "color": "#FFD736" } }, " 产蛋期 ")) : vue.createCommentVNode("v-if", true), item.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "", style: { "color": "#3274F9" } }, " 可出栏 ")) : vue.createCommentVNode("v-if", true), item.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "", style: { "color": "#F84221" } }, " 生病隔离中 ")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖类型: " + vue.toDisplayString(item.kind), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 年龄: " + vue.toDisplayString(item.age) + "年 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 体重: " + vue.toDisplayString(item.weight) + "kg ", 1 /* TEXT */ ) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "ripe-btn", onClick: _cache[1] || (_cache[1] = ($event) => navgo("/pages/feedIng/addPoultry")) }, " 添加新动物 ") ]); }; } }; const PagesPoultryFeedList = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-6276b7e4"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/poultry/feedList.vue"]]); const _sfc_main$m = { __name: "feedDetail", setup(__props) { const selectList = vue.reactive([ "健康", "产蛋中", "生病隔离中", "可出栏" ]); const value = vue.ref(""); const selectAct = vue.ref(false); const selectFoucsFn = (e2) => { selectAct.value = true; }; const indexs = vue.ref(0); const changSelectfn = (index2) => { indexs.value = index2; value.value = selectList[index2]; formData.status = index2 + 1; }; const poultry_id = vue.ref(0); const baseData = vue.reactive({}); onLoad((options) => { poultry_id.value = options.id; formData.poultry_id = options.id; poultryInfoAPI({ poultry_id: options.id }).then((res) => { for (let key in res.data) { baseData[key] = res.data[key]; } formData.weight = baseData.weight; formData.status = baseData.status; value.value = selectList[baseData.status - 1]; indexs.value = baseData.status - 1; }); }); const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const formData = vue.reactive({ status: "", poultry_id: "", weight: "" }); const updataStatusFn = () => { poultryStatusAPI({ ...formData }).then((res) => { uni.showToast({ title: res.msg, icon: "none" }); }); }; const outBar = () => { poultryStatusAPI({ status: 4, animal_id: animal_id.value }).then((res) => { uni.showToast({ title: res.msg, icon: "none" }); setTimeout(() => { uni.navigateTo({ url: "/pages/index/index" }); }, 2e3); }); }; const actionList = vue.reactive({}); actionsAPI$1({ type: 3 }).then((res) => { for (let key in res.data) { actionList[key] = res.data[key]; } }); return (_ctx, _cache) => { var _a; const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); return vue.openBlock(), vue.createElementBlock( "view", { class: "content", onClickCapture: _cache[4] || (_cache[4] = ($event) => selectAct.value = false) }, [ vue.createCommentVNode(' \r\n \r\n \r\n 农户名称: 1号土地\r\n \r\n \r\n \r\n \r\n 种养殖类型: 土豆\r\n \r\n \r\n 养殖头数: 的划分等级\r\n \r\n \r\n \r\n \r\n 土地面积: 20亩\r\n \r\n \r\n 公猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 养殖种类: 20亩\r\n \r\n \r\n 母猪: 的划分等级\r\n \r\n \r\n \r\n \r\n 具体种类: 20亩\r\n \r\n \r\n 幼崽: 的划分等级\r\n \r\n \r\n '), vue.createCommentVNode(` \r \r \r 搜索\r \r `), vue.createVNode(farmersCard), vue.createElementVNode("view", { class: "title" }, [ vue.createElementVNode( "view", { class: "" }, " 编号: " + vue.toDisplayString(baseData.code), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "more-jt", onClick: _cache[0] || (_cache[0] = ($event) => navgo(`/pages/poultry/SingleDetail?id=${poultry_id.value}`)) }, [ vue.createTextVNode(" 查看养殖详情 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "", onClickCapture: selectFoucsFn }, " 养殖类型: " + vue.toDisplayString(baseData.kind), 33 /* TEXT, HYDRATE_EVENTS */ ), vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode(" 体重: "), vue.createVNode(_component_up_input, { style: { "height": "49.07rpx", "width": "215.54rpx", "margin-left": "20rpx" }, placeholder: "请输入内容", border: "surround", modelValue: formData.weight, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.weight = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li", style: { "align-items": "center" } }, [ vue.createElementVNode( "view", { class: "" }, " 年龄: " + vue.toDisplayString(baseData.age) + "年 ", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "select" }, [ vue.createTextVNode(" 状态: "), vue.createVNode(_component_up_input, { readonly: "", style: { "height": "49.07rpx", "width": "215.54rpx", "margin-left": "20rpx" }, placeholder: "请选择", border: "surround", onClickCapture: selectFoucsFn, modelValue: value.value, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event) }, null, 8, ["modelValue"]), vue.createElementVNode( "view", { class: vue.normalizeClass(["JT", { actJT: selectAct.value }]) }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLJT.png", width: "24.53rpx", height: "24.53rpx" }) ], 2 /* CLASS */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "selectvalue" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(selectList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "select-li", key: index2, onClick: ($event) => changSelectfn(index2), style: vue.normalizeStyle({ color: indexs.value == index2 ? "black" : "#B3B3B3" }) }, [ vue.createTextVNode( vue.toDisplayString(item) + " ", 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "" }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLZZ.png", width: "24.53rpx", height: "24.53rpx" }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, indexs.value == index2] ]) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, selectAct.value] ]) ]) ]), vue.createCommentVNode(" "), vue.createVNode(imgCard, { imgUrl: (_a = baseData == null ? void 0 : baseData.pic_detail) == null ? void 0 : _a.pic }, null, 8, ["imgUrl"]), vue.createElementVNode("view", { class: "up-plant-btn", onClick: updataStatusFn }, " 确认更新 ") ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(actionList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "circumstance", key: index2 }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(index2), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "updata-btn", onClick: _cache[3] || (_cache[3] = ($event) => navgo("/pages/growRecord/index")) }, " 更新" + vue.toDisplayString(index2.slice(0, -2)), 1 /* TEXT */ ) ]), vue.createVNode(myTable, { tit: `查看${index2.slice(0, -2)}`, dataList: item.action_record, route: "/pages/feedIng/allRecording" }, null, 8, ["tit", "dataList"]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "ripe-btn", onClick: outBar }, " 标记状态为出栏 ") ], 32 /* HYDRATE_EVENTS */ ); }; } }; const PagesPoultryFeedDetail = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-678b841d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/poultry/feedDetail.vue"]]); const _sfc_main$l = { __name: "histroyFeed", setup(__props) { const img = vue.ref(""); const updateImgFn = () => { uplodeImg().then((res) => { img.value = res.data.image; addAnimalPicAPI({ poultry_id: Number(animal_id2.value), pic: res.data.image }).then((res2) => { imgList.unshift(img.value); }); }); }; const imgList = vue.reactive([]); const animal_id2 = vue.ref(""); onLoad((option) => { animal_id2.value = option.id; animalPicListAPI({ poultry_id: option.id }).then((res) => { res.data.forEach((item) => { imgList.push(item.pic); }); }); }); const previewImage = (index2) => { uni.previewImage({ urls: imgList, current: index2 }); }; return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 编号: 52656 "), vue.createElementVNode("view", { class: "" }, " 溯源码: 52656 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖品种: 土豆 "), vue.createElementVNode("view", { class: "" }, " 年龄: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖类型: 20亩 "), vue.createElementVNode("view", { class: "" }, " 体重: 45kg ") ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/GG.png", style: { "margin": "0 21rpx" }, width: "80rpx", height: "80rpx" }), vue.createTextVNode(" 当前养殖状态 ") ]), vue.createElementVNode("view", { class: "", style: { "color": "green" } }, " 健康 ") ]) ]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "" }, " 养殖情况 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(imgList, (item, index2) => { return vue.openBlock(), vue.createBlock(imgCard, { imgUrl: item, key: index2, onClick: ($event) => previewImage(index2) }, null, 8, ["imgUrl", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "up-plant-btn", onClick: updateImgFn }, " 上传新的种植情况 ") ]); }; } }; const PagesPoultryHistroyFeed = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-9cbb8652"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/poultry/histroyFeed.vue"]]); const _sfc_main$k = { __name: "updateFeed", setup(__props) { const showPop = vue.ref(false); const formData = vue.reactive({ value: "" }); return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 农户名称: 1号土地 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种养殖类型: 土豆 "), vue.createElementVNode("view", { class: "" }, " 养殖头数: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 土地面积: 20亩 "), vue.createElementVNode("view", { class: "" }, " 公猪: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖种类: 20亩 "), vue.createElementVNode("view", { class: "" }, " 母猪: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 具体种类: 20亩 "), vue.createElementVNode("view", { class: "" }, " 幼崽: 的划分等级 ") ]) ]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, " 今日操作 "), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 喂食 "), vue.createElementVNode("view", { class: "", style: { "color": "#00A15E" }, onClick: _cache[0] || (_cache[0] = ($event) => showPop.value = true) }, " +添加喂食记录 ") ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 注射疫苗 "), vue.createElementVNode("view", { class: "", style: { "color": "#00A15E" } }, " +添加喂食记录 ") ]) ]) ]), vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, " 具体操作内容 "), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 喂食 "), vue.createElementVNode("view", { class: "", style: { "display": "flex" } }, [ vue.createElementVNode("view", { class: "", style: { "margin-right": "40rpx" } }, " 删除 "), vue.createElementVNode("view", { class: "", style: { "color": "#00A15E" } }, " 编辑 ") ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 饲料类型: 无机盐饲料 "), vue.createElementVNode("view", { class: "" }, " 饲料品牌: 双胞胎 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 喂食记录: 200kg "), vue.createElementVNode("view", { class: "" }, " 备注: 双胞胎 ") ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 疫苗注射对象 "), vue.createElementVNode("view", { class: "", style: { "display": "flex" } }, [ vue.createElementVNode("view", { class: "", style: { "margin-right": "40rpx" } }, " 删除 "), vue.createElementVNode("view", { class: "", style: { "color": "#00A15E" } }, " 编辑 ") ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 疫苗名称: 无机盐饲料 "), vue.createElementVNode("view", { class: "" }, " 疫苗品牌: 双胞胎 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 操作人员: 200kg "), vue.createElementVNode("view", { class: "" }, " 注射数量: 双胞胎 ") ]), vue.createElementVNode("view", { class: "" }, [ vue.createTextVNode(" 疫苗条形码 "), vue.createElementVNode("view", { class: "code-img" }) ]) ]), vue.createElementVNode("view", { class: "ripe-btn" }, " 完成今日统计 "), vue.createCommentVNode(" 组件 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_u_popup, { show: showPop.value, round: 10, closeable: true, onClose: _cache[4] || (_cache[4] = ($event) => showPop.value = false), onOpen: _cache[5] || (_cache[5] = ($event) => showPop.value = true) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "pop-content" }, [ vue.createElementVNode("view", { class: "pop-tit" }, " 添加喂食记录 "), vue.createElementVNode("view", { class: "" }, " 饲料类型 "), vue.createElementVNode("view", { class: "pop-li" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), vue.createElementVNode("view", { class: "" }, " 饲料品牌 "), vue.createElementVNode("view", { class: "pop-li" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.value, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), vue.createElementVNode("view", { class: "pop-confirm", onClick: _cache[3] || (_cache[3] = (...args) => _ctx.confirm && _ctx.confirm(...args)) }, " 确认 ") ]) ]), _: 1 /* STABLE */ }, 8, ["show"]) ]) ]); }; } }; const PagesPoultryUpdateFeed = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-bd22b757"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/poultry/updateFeed.vue"]]); const _sfc_main$j = { __name: "vaccineInfo", setup(__props) { const options1 = vue.reactive([{ text: "删除" }]); const updateImgFn = () => { uni.chooseImage({ count: 1, sizeType: ["compressed"], sourceType: ["album"], success: (res) => { formatAppLog("log", "at pages/poultry/vaccineInfo.vue:113", "chooseImage success, temp path is", res.tempFilePaths[0]); var imageSrc = res.tempFilePaths[0]; uni.showLoading({ title: "上传中" }); this.task = uni.uploadFile({ url: "https://unidemo.dcloud.net.cn/upload", //仅为示例,非真实的接口地址 filePath: imageSrc, name: "file", formData: { "user": "test" }, success: (res2) => { if (this.pageVisible) { formatAppLog("log", "at pages/poultry/vaccineInfo.vue:127", "uploadImage success, res is:", res2); uni.hideLoading(); uni.showToast({ title: "上传成功", icon: "success", duration: 1e3 }); this.imageSrc = imageSrc; } }, fail: (err) => { if (this.pageVisible) { formatAppLog("log", "at pages/poultry/vaccineInfo.vue:139", "uploadImage fail", err); uni.hideLoading(); uni.showModal({ content: err.errMsg, showCancel: false }); } } }); }, fail: (err) => { formatAppLog("log", "at pages/poultry/vaccineInfo.vue:150", "chooseImage fail", err); } }); }; return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_2); const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_3); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "title" }, " 疫苗相关信息 "), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 疫苗名称 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: _ctx.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 疫苗品牌 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: _ctx.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 操作人员 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: _ctx.value, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 疫苗条形码 "), vue.createElementVNode("view", { class: "code-img" }, [ vue.createElementVNode("view", { class: "carime-icon", onClick: updateImgFn }, [ vue.createVNode(_component_u__image, { src: "/static/img/DJSC.png", width: "91.12rpx", height: "91.12rpx" }), vue.createElementVNode("view", { class: "" }, " 点击上传图片 ") ]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 注射对象 "), vue.createElementVNode("view", { class: "scan" }, " 扫描动物耳标/脚标 ") ]) ]), (vue.openBlock(), vue.createElementBlock( vue.Fragment, null, vue.renderList([1, 1, 1, 1, 1], (item) => { return vue.createElementVNode("view", { style: { "margin-bottom": "20rpx" } }, [ vue.createVNode(_component_u_swipe_action, null, { default: vue.withCtx(() => [ vue.createVNode(_component_u_swipe_action_item, { options: options1, style: { "border-radius": "20rpx" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "", style: { "padding": "20rpx 30rpx" } }, [ vue.createElementVNode("view", { class: "swipe-action-tit" }, [ vue.createElementVNode("view", { class: "" }, " 编号: 123456 "), (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 健康 ")), vue.createCommentVNode("v-if", true), vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "swipe-action-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖品种:黑山猪 "), vue.createElementVNode("view", { class: "" }, " 年龄: 5年 "), vue.createElementVNode("view", { class: "" }, " 体重: 150kg ") ]) ]) ]), _: 1 /* STABLE */ }, 8, ["options"]) ]), _: 1 /* STABLE */ }) ]); }), 64 /* STABLE_FRAGMENT */ )), vue.createElementVNode("view", { class: "ripe-btn" }, " 确认 ") ]); }; } }; const PagesPoultryVaccineInfo = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-09314aba"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/poultry/vaccineInfo.vue"]]); const _sfc_main$i = { __name: "addPoultry", setup(__props) { const navgo = () => { uni.navigateTo({ url: "/pages/index/index" }); }; const updateImgFn = () => { uplodeImg().then((res) => { formData.pic = res.data.image; }); }; const selectList = vue.reactive([ "公猪", "母猪" ]); const gender = vue.ref(""); const status = vue.ref(""); const selectList1 = vue.reactive([ "健康", "怀孕中", "生病隔离中", "可出栏" ]); const value = vue.ref(""); const value1 = vue.ref(""); const selectAct = vue.ref(false); const selectAct1 = vue.ref(false); const selectFoucsFn = (e2) => { selectAct.value = true; selectAct1.value = false; }; const selectFoucsFn1 = (e2) => { selectAct1.value = true; selectAct.value = false; }; const indexs = vue.ref(0); const indexs1 = vue.ref(0); const changSelectfn = (index2) => { indexs.value = index2; value.value = selectList[index2]; formData.gender = index2 + 1; gender.value = selectList[index2]; selectAct.value = false; selectAct1.value = false; }; const changSelectfn1 = (index2) => { indexs1.value = index2; value1.value = selectList[index2]; formData.status = index2 + 1; status.value = selectList1[index2]; selectAct.value = false; selectAct1.value = false; }; const baseFormData = vue.reactive({ user_id: 307, kind: "", breed: "", gender: 1, age: "", status: 1, weight: "", pic: "" }); const objFn = (res, obj) => { for (let key in res) { obj[key] = res[key]; } }; const formData = vue.reactive({}); objFn(baseFormData, formData); const nextFn = () => { addAnimalAPI({ ...formData }).then((res) => { status.value = ""; gender.value = ""; addList.push(1); objFn(baseFormData, formData); uni.showToast({ title: "添加成功", icon: "success", duration: 1e3 }); }); }; const addList = vue.reactive([]); return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ addList.length ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "head" }, " 已添加" + vue.toDisplayString(addList.length) + "条畜生 ", 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 养殖品种 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.kind, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.kind = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 具体品类 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.breed, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.breed = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 年龄 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入年龄", border: "surround", modelValue: formData.age, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.age = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "select" }, [ vue.createTextVNode(" 养殖类型: "), vue.createVNode(_component_up_input, { onClick: selectFoucsFn, readonly: "", placeholder: "请选择", style: { "margin-top": "20rpx" }, border: "surround", modelValue: gender.value, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => gender.value = $event) }, null, 8, ["modelValue"]), vue.createElementVNode( "view", { class: vue.normalizeClass(["JT", { actJT: selectAct.value }]) }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLJT.png", width: "24.53rpx", height: "24.53rpx" }) ], 2 /* CLASS */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "selectvalue" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(selectList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "select-li", key: index2, onClick: ($event) => changSelectfn(index2), style: vue.normalizeStyle({ color: indexs.value == index2 ? "black" : "#B3B3B3" }) }, [ vue.createTextVNode( vue.toDisplayString(item) + " ", 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "" }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLZZ.png", width: "24.53rpx", height: "24.53rpx" }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, indexs.value == index2] ]) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, selectAct.value] ]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "select" }, [ vue.createTextVNode(" 状态: "), vue.createVNode(_component_up_input, { placeholder: "请选择", style: { "margin-top": "20rpx" }, border: "surround", onClick: selectFoucsFn1, modelValue: status.value, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => status.value = $event) }, null, 8, ["modelValue"]), vue.createElementVNode( "view", { class: vue.normalizeClass(["JT", { actJT: selectAct1.value }]) }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLJT.png", width: "24.53rpx", height: "24.53rpx" }) ], 2 /* CLASS */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "selectvalue", style: { "bottom": "-250rpx" } }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(selectList1, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "select-li", key: index2, onClick: ($event) => changSelectfn1(index2), style: vue.normalizeStyle({ color: indexs1.value == index2 ? "black" : "#B3B3B3" }) }, [ vue.createTextVNode( vue.toDisplayString(item) + " ", 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "" }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLZZ.png", width: "24.53rpx", height: "24.53rpx" }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, indexs1.value == index2] ]) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, selectAct1.value] ]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 体重 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.weight, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => formData.weight = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "code-img" }, [ vue.createElementVNode("view", { class: "carime-icon", onClick: updateImgFn }, [ formData.pic ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ vue.createVNode(_component_u__image, { src: formData.pic, width: "637.85rpx", height: "196.26rpx" }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "carime-icon" }, [ vue.createVNode(_component_u__image, { src: "/static/img/DJSC.png", width: "91.12rpx", height: "91.12rpx" }), vue.createElementVNode("view", { class: "" }, " 上传 ") ])) ]) ]) ]), vue.createElementVNode("view", { class: "next-btn", onClick: nextFn }, " 下一个 "), vue.createElementVNode("view", { class: "ripe-btn", onClick: navgo }, " 完成添加 ") ]); }; } }; const PagesPoultryAddPoultry = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/poultry/addPoultry.vue"]]); const _sfc_main$h = { __name: "allFeed", setup(__props) { return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 编号: 52656 "), vue.createElementVNode("view", { class: "" }, " 溯源码: 52656 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖品种: 土豆 "), vue.createElementVNode("view", { class: "" }, " 年龄: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖类型: 20亩 "), vue.createElementVNode("view", { class: "" }, " 体重: 45kg ") ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/GG.png", style: { "margin": "0 21rpx" }, width: "80rpx", height: "80rpx" }), vue.createTextVNode(" 当前养殖状态 ") ]), vue.createElementVNode("view", { class: "", style: { "color": "green" } }, " 健康 ") ]) ]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 饲养记录 "), vue.createVNode(myTable) ]) ]); }; } }; const PagesPoultryAllFeed = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-9888630f"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/poultry/allFeed.vue"]]); const _sfc_main$g = { __name: "detailCard", props: { id: String, showImg: Boolean }, setup(__props) { const props2 = __props; const dateFn = () => { var today = /* @__PURE__ */ new Date(); var year = today.getFullYear(); var month = today.getMonth() + 1; var day = today.getDate(); var dateStr = year + "-" + month + "-" + day; return dateStr; }; const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const objFn = (res, data) => { for (let key in res) { data[key] = res[key]; } }; const animal_detail = vue.reactive({}); vue.watch(props2, (newValue, oldVlaue) => { formatAppLog("log", "at components/poultry/detailCard.vue:112", "dfhsdfgsdjk"); if (props2 == null ? void 0 : props2.id) { animalInfoAPI({ poultry_id: Number(props2.id) }).then((res) => { objFn(res.data, animal_detail); }); } }, { // 页面加载会先执行一次 immediate: true }); const updateImgFn = () => { uplodeImg().then((res) => { animal_detail.pic_detail.pic = res.data.image; addAnimalPicAPI({ poultry_id: Number(props2.id), pic: res.data.image }); }); }; return (_ctx, _cache) => { var _a; const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ props2.showImg ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ ((_a = animal_detail == null ? void 0 : animal_detail.pic_detail) == null ? void 0 : _a.pic) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ vue.createVNode(imgCard, { imgUrl: animal_detail.pic_detail.pic }, null, 8, ["imgUrl"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "bad-info" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/sj.png')", style: { "margin": "0 5rpx" }, width: "28.04rpx", height: "28.04rpx" }), vue.createElementVNode( "text", null, "刷新时间:" + vue.toDisplayString(dateFn()), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { style: { "display": "flex" }, onClick: _cache[0] || (_cache[0] = ($event) => navgo(`/pages/feedIng/histroyFeed?id=${props2.id}`)) }, [ vue.createTextVNode(" 查看历史条件 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ]) ]), vue.createElementVNode("view", { class: "up-plant-btn", onClick: updateImgFn }, " 上传新的种植情况 ") ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode( "view", { class: "" }, " 溯源码: " + vue.toDisplayString(animal_detail.code), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖品种: " + vue.toDisplayString(animal_detail.kind), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 年龄: " + vue.toDisplayString(animal_detail.age), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖类型: " + vue.toDisplayString(animal_detail.breed), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "" }, " 体重:" + vue.toDisplayString(animal_detail.weight), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/GG.png", style: { "margin": "0 21rpx" }, width: "80rpx", height: "80rpx" }), vue.createTextVNode(" 当前养殖状态 ") ]), animal_detail.status == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 健康 ")) : vue.createCommentVNode("v-if", true), animal_detail.status == 2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "", style: { "color": "#FFD736" } }, " 怀孕中 ")) : vue.createCommentVNode("v-if", true), animal_detail.status == 4 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "", style: { "color": "#3274F9" } }, " 可出栏 ")) : vue.createCommentVNode("v-if", true), animal_detail.status == 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "", style: { "color": "#F84221" } }, " 生病隔离中 ")) : vue.createCommentVNode("v-if", true) ]) ]) ], 64 /* STABLE_FRAGMENT */ ); }; } }; const detailCard = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-dbe58a37"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/poultry/detailCard.vue"]]); const _sfc_main$f = { __name: "SingleDetail", setup(__props) { const id = vue.ref(0); onLoad((option) => { id.value = option.id; }); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n\r\n \r\n \r\n \r\n 刷新时间:{{dateFn()}}\r\n \r\n \r\n 查看史条件 \r\n \r\n \r\n \r\n\r\n 上传新的种植情况\r\n \r\n \r\n \r\n \r\n 编号: 52656\r\n \r\n \r\n 溯源码: 52656\r\n \r\n \r\n \r\n \r\n 养殖品种: 土豆\r\n \r\n \r\n 年龄: 的划分等级\r\n \r\n \r\n \r\n \r\n 养殖类型: 20亩\r\n \r\n \r\n 体重: 45kg\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n 当前养殖状态\r\n \r\n \r\n 健康\r\n \r\n \r\n\r\n '), vue.createVNode(detailCard, { id: id.value }, null, 8, ["id"]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 饲养记录 "), vue.createVNode(myTable) ]) ]); }; } }; const PagesPoultrySingleDetail = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-15fbaaca"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/poultry/SingleDetail.vue"]]); const _sfc_main$e = { __name: "allRecording", setup(__props) { return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 农户名称: 1号土地 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种养殖类型: 土豆 "), vue.createElementVNode("view", { class: "" }, " 养殖头数: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 土地面积: 20亩 "), vue.createElementVNode("view", { class: "" }, " 公猪: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖种类: 20亩 "), vue.createElementVNode("view", { class: "" }, " 母猪: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 具体种类: 20亩 "), vue.createElementVNode("view", { class: "" }, " 幼崽: 的划分等级 ") ]) ]), vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 饲养记录 "), vue.createVNode(myTable) ]); }; } }; const PagesPoultryAllRecording = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-6a1bc5a4"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/poultry/allRecording.vue"]]); const _sfc_main$d = { __name: "addAquatic", setup(__props) { const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const updateImgFn = () => { uni.chooseImage({ count: 1, sizeType: ["compressed"], sourceType: ["album"], success: (res) => { formatAppLog("log", "at pages/aquatic/addAquatic.vue:87", "chooseImage success, temp path is", res.tempFilePaths[0]); var imageSrc = res.tempFilePaths[0]; uni.showLoading({ title: "上传中" }); this.task = uni.uploadFile({ url: "https://unidemo.dcloud.net.cn/upload", //仅为示例,非真实的接口地址 filePath: imageSrc, name: "file", formData: { "user": "test" }, success: (res2) => { if (this.pageVisible) { formatAppLog("log", "at pages/aquatic/addAquatic.vue:101", "uploadImage success, res is:", res2); uni.hideLoading(); uni.showToast({ title: "上传成功", icon: "success", duration: 1e3 }); this.imageSrc = imageSrc; } }, fail: (err) => { if (this.pageVisible) { formatAppLog("log", "at pages/aquatic/addAquatic.vue:113", "uploadImage fail", err); uni.hideLoading(); uni.showModal({ content: err.errMsg, showCancel: false }); } } }); }, fail: (err) => { formatAppLog("log", "at pages/aquatic/addAquatic.vue:124", "chooseImage fail", err); } }); }; return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock( "view", { class: "content", onClickCapture: _cache[4] || (_cache[4] = (...args) => _ctx.off && _ctx.off(...args)) }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 养殖品种: 白鲢 "), vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 养殖数量: 白鲢 "), vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 鱼苗购入点: 白鲢 "), vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 购入凭证 "), vue.createElementVNode("view", { class: "code-img" }, [ vue.createElementVNode("view", { class: "carime-icon" }) ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 养殖品种 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: _ctx.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 鱼苗数量 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: _ctx.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 鱼苗购入点 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: _ctx.value, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]), vue.createElementVNode("view", { class: "card-li-tit" }, " 购入凭证 "), vue.createElementVNode("view", { class: "code-img" }, [ vue.createElementVNode("view", { class: "carime-icon", onClick: updateImgFn }, [ vue.createVNode(_component_u__image, { src: "/static/img/DJSC.png", width: "91.12rpx", height: "91.12rpx" }), vue.createElementVNode("view", { class: "" }, " 点击上传图片 ") ]) ]) ]), vue.createElementVNode("view", { class: "next-btn" }, " 下一个 "), vue.createElementVNode("view", { class: "ripe-btn", onClick: _cache[3] || (_cache[3] = ($event) => navgo("/pages/index/index")) }, " 完成添加 ") ], 32 /* HYDRATE_EVENTS */ ); }; } }; const PagesAquaticAddAquatic = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/aquatic/addAquatic.vue"]]); const _sfc_main$c = { __name: "addPond", setup(__props) { const userInfo = userInfoStore(); const formData = vue.reactive({}); const baseData = vue.reactive({ user_id: userInfo.user_id, pond_id: "", kind: "", breed: "", number: "", buy_info: "", buy_cert: "" }); const objFn = (res, obj) => { for (let key in res) { obj[key] = res[key]; } }; const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const nextFn = async () => { let res = await addFishAPI({ ...formData }); uni.showToast({ title: res.msg, icon: "none" }); objFn(baseData, formData); }; const updateImgFn = async () => { let res = await uplodeImg(); formData.buy_cert = res.data.image; }; onLoad((options) => { baseData.pond_id = options.pond_id; objFn(baseData, formData); }); return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 养殖种类 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.kind, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.kind = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 具体品种 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.breed, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.breed = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 具体数量 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.number, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.number = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 鱼苗购入点 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: formData.buy_info, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => formData.buy_info = $event) }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 导入凭证 "), vue.createElementVNode("view", { class: "code-img" }, [ vue.createElementVNode("view", { class: "", onClick: updateImgFn }, [ formData.buy_cert ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "" }, [ vue.createVNode(_component_u__image, { src: formData.buy_cert, width: "637.85rpx", height: "350.47rpx" }, null, 8, ["src"]) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "carime-icon" }, [ vue.createVNode(_component_u__image, { src: "/static/img/DJSC.png", width: "91.12rpx", height: "91.12rpx" }), vue.createElementVNode("view", { class: "" }, " 点击上传图片 ") ])) ]) ]) ]) ]), vue.createCommentVNode(' \r\n +上传播种图片\r\n '), vue.createElementVNode("view", { class: "confirm" }, [ vue.createElementVNode("view", { class: "confirm-btn", style: { "color": "white", "background-color": "#0AA565" }, onClick: _cache[4] || (_cache[4] = ($event) => navgo("/pages/index/index")) }, " 完成添加 "), vue.createElementVNode("view", { class: "confirm-btn", style: { "color": "#0AA565" }, onClick: nextFn }, " 下一个 ") ]), vue.createCommentVNode(' \r\n 今日播种\r\n '), vue.createCommentVNode(" 组件 ") ]); }; } }; const PagesAquaticAddPond = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-13b22cf5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/aquatic/addPond.vue"]]); const _sfc_main$b = { __name: "updateGrow", setup(__props) { const value = vue.ref(""); return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 农户名称: 1号土地 "), vue.createElementVNode("view", { class: "" }, " 溯源码: 1号土地 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种养殖类型: 土豆 "), vue.createElementVNode("view", { class: "" }, " 养殖数量: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 土地面积: 20亩 "), vue.createElementVNode("view", { class: "" }, " 草鱼鱼苗: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖种类: 20亩 "), vue.createElementVNode("view", { class: "" }, " 鲫鱼鱼苗: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 具体种类: 20亩 ") ]) ]), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "", style: { "margin-bottom": "20rpx" } }, " 网兜计数 "), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-tit" }, " 网兜面积 "), vue.createElementVNode("view", { class: "" }, [ vue.createVNode(_component_up_input, { placeholder: "请输入品种", border: "surround", modelValue: value.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), vue.createElementVNode("view", { class: "card-tit" }, " 网兜内数量 "), vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center", "margin-bottom": "20rpx" } }, [ vue.createTextVNode(" 草鱼数量 "), vue.createVNode(_component_up_input, { style: { "margin-left": "20rpx" }, placeholder: "请输入品种", border: "surround", modelValue: value.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode(" 鲫鱼数量 "), vue.createVNode(_component_up_input, { style: { "margin-left": "20rpx" }, placeholder: "请输入品种", border: "surround", modelValue: value.value, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), vue.createElementVNode("view", { class: "card-tit" }, " 平均重量 "), vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center", "margin-bottom": "20rpx" } }, [ vue.createTextVNode(" 草鱼重量 "), vue.createVNode(_component_up_input, { style: { "margin-left": "20rpx" }, placeholder: "请输入品种", border: "surround", modelValue: value.value, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => value.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createTextVNode(" 鲫鱼重量 "), vue.createVNode(_component_up_input, { style: { "margin-left": "20rpx" }, placeholder: "请输入品种", border: "surround", modelValue: value.value, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => value.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) ]) ]), vue.createElementVNode("view", { class: "ripe-btn" }, " 确认 ") ]); }; } }; const PagesAquaticUpdateGrow = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-eb84358f"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/aquatic/updateGrow.vue"]]); const _sfc_main$a = { __name: "pondCard", props: { id: String, showBtn: Boolean }, setup(__props) { const props2 = __props; const headData = vue.reactive({}); vue.watch(props2, (newValue, oldVlaue) => { if (props2 == null ? void 0 : props2.id) { pondInfoAPI({ user_id: 307, pond_id: props2.id }).then((res) => { for (let key in res.data) { headData[key] = res.data[key]; } }); } }, { immediate: true }); const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 农户名称: ??? "), vue.createElementVNode("view", { class: "" }, [ vue.createCommentVNode(" {{headData}} "), vue.createTextVNode( " 溯源码: " + vue.toDisplayString(headData.source_code), 1 /* TEXT */ ) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种养殖类型: 养殖户 "), vue.createElementVNode( "view", { class: "" }, " 养殖数量: " + vue.toDisplayString(headData.total_num), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 土地面积: 20亩 "), vue.createElementVNode("view", { class: "" }, " 草鱼鱼苗: 的划分等级 ") ]), headData.kind ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 养殖种类: " + vue.toDisplayString(headData.kind[0]) + "," + vue.toDisplayString(headData.kind[1]) + "," + vue.toDisplayString(headData.kind[2]), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "" }, " 鲫鱼鱼苗: 的划分等级 ") ])) : vue.createCommentVNode("v-if", true), headData.breed ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, [ vue.createCommentVNode(" {{}} "), vue.createTextVNode( " 具体种类: " + vue.toDisplayString(headData.breed[0]) + "," + vue.toDisplayString(headData.breed[1]) + "," + vue.toDisplayString(headData.breed[2]), 1 /* TEXT */ ) ]) ])) : vue.createCommentVNode("v-if", true), props2.showBtn ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "add-btn", onClick: _cache[0] || (_cache[0] = ($event) => navgo(`/pages/aquatic/addPond?pond_id=${props2.id}`)) }, " 添加水产养殖 ")) : vue.createCommentVNode("v-if", true) ]); }; } }; const pondCard = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-57b166d4"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/aquatic/pondCard.vue"]]); const _sfc_main$9 = { __name: "imgList", setup(__props) { const imgList = vue.reactive([]); const pond_id = vue.ref(0); onLoad((options) => { pond_id.value = options.pond_id; fishPicListAPI({ pond_id: options.pond_id }).then((res) => { res.data.forEach((item) => { imgList.push(item.pic); }); }); }); const updateImgFn = () => { let image2 = ""; uplodeImg().then((res) => { image2 = res.data.image; addFishPicAPI({ pond_id: pond_id.value, pic: image2 }).then((res2) => { imgList.unshift(image2); }); }); }; const previewImage = (index2) => { uni.previewImage({ urls: imgList, current: index2 }); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createCommentVNode(' \r\n \r\n \r\n 1号土地\r\n \r\n \r\n 溯源码: 12302\r\n \r\n \r\n \r\n \r\n 当前种植: 土豆\r\n \r\n \r\n 种植品牌: 的划分等级\r\n \r\n \r\n \r\n \r\n 土地面积: 20亩\r\n \r\n \r\n 种子品牌: 的划分等级\r\n \r\n \r\n \r\n \r\n 预计产量: 20亩\r\n \r\n \r\n 已出售: 的划分等级\r\n \r\n \r\n\r\n\r\n \r\n \r\n 播种时间: 2020.12.01\r\n \r\n\r\n \r\n\r\n '), vue.createCommentVNode(" "), vue.createVNode(pondCard, { id: pond_id.value }, null, 8, ["id"]), vue.createCommentVNode(` \r \r 今日种植状态\r \r \r \r \r \r \r 播种图片\r \r \r \r `), vue.createElementVNode("view", { class: "status" }, [ vue.createElementVNode("view", { class: "", style: { "margin-bottom": "30rpx" } }, " 生长情况 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(imgList, (item, index2) => { return vue.openBlock(), vue.createBlock(imgCard, { text: "地址", imgUrl: item, key: index2, onClick: ($event) => previewImage(index2) }, null, 8, ["imgUrl", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "up-btn", onClick: updateImgFn }, " 上传新的种植情况 ") ]); }; } }; const PagesAquaticImgList = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-8780f959"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/aquatic/imgList.vue"]]); const _sfc_main$8 = { __name: "detail", setup(__props) { const data = vue.reactive([ { tit: "水温", icon: "TRWD", dw: "℃", cont: "water_temp", flag: false }, { tit: "PH值", icon: "TRSD", cont: "ph_content" }, { tit: "溶解氧", icon: "FX", cont: "dissolved_oxygen", dw: "%" }, { tit: "电导率", icon: "FS", dw: "mg/l", cont: "electric_conductivity" }, { tit: "TDS", icon: "JYL", dw: "lux", cont: "tds" } ]); const baseData = vue.reactive({}); const urlFn = (name) => { return `/static/img/${name}.png`; }; const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const dateFn = () => { var today = /* @__PURE__ */ new Date(); var year = today.getFullYear(); var month = today.getMonth() + 1; var day = today.getDate(); var dateStr = year + "-" + month + "-" + day; return dateStr; }; const updateImgFn = () => { let image2 = ""; uplodeImg().then((res) => { image2 = res.data.image; headData.pic_detail.pic = image2; addFishPicAPI({ pond_id: pond_id.value, pic: image2 }); }); }; const pond_id = vue.ref(0); const headData = vue.reactive({}); onLoad((option) => { pondEnvDataAPI({ user_id: 307 }).then((res) => { for (let key in res.data) { baseData[key] = res.data[key]; } }); pond_id.value = option.pond_id; pondInfoAPI({ user_id: 307, pond_id: pond_id.value }).then((res) => { for (let key in res.data) { headData[key] = res.data[key]; } }); }); const actionList = vue.reactive({}); actionsAPI$1({ type: 4 }).then((res) => { for (let key in res.data) { actionList[key] = res.data[key]; } }); return (_ctx, _cache) => { var _a; const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createVNode(imgCard, { imgUrl: (_a = headData == null ? void 0 : headData.pic_detail) == null ? void 0 : _a.pic }, null, 8, ["imgUrl"]), vue.createElementVNode("view", { class: "bad-info" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: urlFn("sj"), style: { "margin": "0 5rpx" }, width: "28.04rpx", height: "28.04rpx" }, null, 8, ["src"]), vue.createElementVNode( "text", null, "刷新时间:" + vue.toDisplayString(dateFn()), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { style: { "display": "flex" }, onClick: _cache[0] || (_cache[0] = ($event) => navgo(`/pages/aquatic/imgList?pond_id=${pond_id.value}`)) }, [ vue.createTextVNode(" 查看历史条件 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "31.54rpx", height: "31.54rpx" }) ]) ]), vue.createElementVNode("view", { class: "up-plant-btn", onClick: updateImgFn }, " 上传新的种植情况 "), vue.createVNode(pondCard, { id: pond_id.value, showBtn: true }, null, 8, ["id"]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(actionList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "circumstance", key: index2 }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(index2), 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "updata-btn", onClick: _cache[1] || (_cache[1] = ($event) => navgo(`/pages/growRecord/index?type=4&pond_id=${pond_id.value}`)) }, " 更新" + vue.toDisplayString(index2.slice(0, -2)), 1 /* TEXT */ ) ]), vue.createVNode(myTable, { tit: `查看${index2.slice(0, -2)}`, dataList: item.action_record, route: "/pages/feedIng/allRecording" }, null, 8, ["tit", "dataList"]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(` \r \r \r 生长密度记录\r \r \r 更新生长记录\r \r \r \r \r \r \r \r \r \r 饲养记录\r \r \r 更新饲养记录\r \r \r \r \r `), vue.createElementVNode("view", { class: "data" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "justify-content": "space-between", "font-size": "29.79rpx" } }, [ vue.createElementVNode("view", { class: "" }, " 环境监测数据 ") ]), vue.createElementVNode("view", { class: "tit-b" }, [ vue.createVNode(_component_u__image, { src: urlFn("sj"), style: { "margin": "0 5rpx" }, width: "28.04rpx", height: "28.04rpx" }, null, 8, ["src"]), vue.createElementVNode( "text", null, "刷新时间: " + vue.toDisplayString(dateFn()), 1 /* TEXT */ ) ]) ]), vue.createCommentVNode(" 你这不是 "), vue.createElementVNode("view", { class: "data-cont" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(data, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "data-cont-li center", key: index2 }, [ vue.createElementVNode("view", { style: { "margin": "0 20rpx" } }, [ vue.createElementVNode("view", { class: "center" }, [ vue.createVNode(_component_u__image, { src: urlFn(item.icon), style: { "margin": "0 5rpx" }, width: "38.55rpx", height: "38.54rpx" }, null, 8, ["src"]), vue.createTextVNode( " " + vue.toDisplayString(item.tit), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "b-cls" }, [ vue.createElementVNode( "view", { class: "", style: vue.normalizeStyle({ color: item.flag ? "#0095FF" : "" }) }, [ vue.createElementVNode( "text", { style: { "font-size": "70.09rpx" } }, vue.toDisplayString(baseData[item.cont]), 1 /* TEXT */ ), vue.createTextVNode( vue.toDisplayString(item.dw), 1 /* TEXT */ ) ], 4 /* STYLE */ ), item.flag ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: urlFn("D"), style: { "margin": "0 5rpx" }, width: "31.54rpx", height: "31.54rpx" }, null, 8, ["src"]), vue.createElementVNode("text", { style: { "color": "#0095FF" } }, "5") ])) : vue.createCommentVNode("v-if", true) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ]); }; } }; const PagesAquaticDetail = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-cd3205a6"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/aquatic/detail.vue"]]); const _sfc_main$7 = { __name: "group", setup(__props) { const showMore = vue.ref(true); return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_1); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-herd" }, [ vue.createVNode(_component_u__image, { src: "/static/img/bg1.png", shape: "circle", style: { "margin": "0 5rpx" }, width: "84.11rpx", height: "84.11rpx" }), vue.createElementVNode("view", { class: "" }, " 1号小组 "), vue.createElementVNode("view", { class: "" }, " 通滩指导养殖合作服务公司 ") ]) ]), vue.createElementVNode("view", { class: "serch" }, [ vue.createElementVNode("view", { class: "", style: { "margin-right": "61rpx" } }, " 监管土地 "), vue.createVNode(_component_u_search, { placeholder: "搜索基地名称", "show-action": false, bgColor: "white", modelValue: _ctx.keyword, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.keyword = $event) }, null, 8, ["modelValue"]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/bg1.png", shape: "circle", style: { "margin": "0 5rpx" }, width: "84.11rpx", height: "84.11rpx" }), vue.createElementVNode("view", { class: "", style: { "margin-left": "20rpx" } }, " 张队长 ") ]), vue.createElementVNode("view", { class: "" }, " 管辖: 会发生肯德基回复 ") ]), !showMore.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 监管农户: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 涉及土地面积: 100hu1 ") ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "border" }), showMore.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 监管农户: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 涉及土地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种植户: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 占地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖户-大型动物: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 占地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖户-禽类: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 占地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖户-水产: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 占地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "border" }), vue.createElementVNode("view", { class: "detail", onClick: _cache[1] || (_cache[1] = ($event) => showMore.value = !showMore.value) }, [ vue.createTextVNode(" 收起 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx", "transform": "rotate(270deg)" }, width: "28.04rpx", height: "28.04rpx" }) ]) ])) : vue.createCommentVNode("v-if", true), !showMore.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "detail", onClick: _cache[2] || (_cache[2] = ($event) => showMore.value = !showMore.value) }, [ vue.createTextVNode(" 查看监管详情 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx", "transform": "rotate(90deg)" }, width: "28.04rpx", height: "28.04rpx" }) ])) : vue.createCommentVNode("v-if", true) ]) ]); }; } }; const PagesSupervisionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-7b328f77"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/supervision/group.vue"]]); const _sfc_main$6 = { __name: "captain", setup(__props) { const showMore = vue.ref(false); const showPicker = vue.ref(false); const columns = vue.reactive([ ["全部 ", "1队农户", "2队农户", "3队农户", "4队农户", "5队农户", "6队农户"] ]); const pickerConfirmFn = (e2) => { query.value = e2.value[0]; showPicker.value = false; }; const query = vue.ref("全部"); return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_1$3); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/bg1.png", shape: "circle", style: { "margin": "0 5rpx" }, width: "84.11rpx", height: "84.11rpx" }), vue.createElementVNode("view", { class: "", style: { "margin-left": "20rpx" } }, " 张队长 ") ]), vue.createElementVNode("view", { class: "" }, " 管辖: 会发生肯德基回复 ") ]), !showMore.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 监管农户: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 涉及土地面积: 100hu1 ") ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "border" }), showMore.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "" }, [ vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 监管农户: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 涉及土地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种植户: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 占地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖户-大型动物: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 占地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖户-禽类: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 占地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 养殖户-水产: 100hu1 "), vue.createElementVNode("view", { class: "" }, " 占地面积: 100hu1 ") ]), vue.createElementVNode("view", { class: "border" }), vue.createElementVNode("view", { class: "detail", onClick: _cache[0] || (_cache[0] = ($event) => showMore.value = !showMore.value) }, [ vue.createTextVNode(" 收起 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx", "transform": "rotate(270deg)" }, width: "28.04rpx", height: "28.04rpx" }) ]) ])) : vue.createCommentVNode("v-if", true), !showMore.value ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "detail", onClick: _cache[1] || (_cache[1] = ($event) => showMore.value = !showMore.value) }, [ vue.createTextVNode(" 查看监管详情 "), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx", "transform": "rotate(90deg)" }, width: "28.04rpx", height: "28.04rpx" }) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "query", onClick: _cache[2] || (_cache[2] = ($event) => showPicker.value = true) }, [ vue.createElementVNode( "view", { class: "", style: { "margin-right": "10rpx" } }, vue.toDisplayString(query.value) + " (100户) ", 1 /* TEXT */ ), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", width: "35.04rpx", height: "35.04rpx" }) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode("view", { class: "", style: { "display": "flex", "align-items": "center" } }, [ vue.createVNode(_component_u__image, { src: "/static/img/bg1.png", shape: "circle", style: { "margin": "0 5rpx" }, width: "84.11rpx", height: "84.11rpx" }), vue.createElementVNode("view", { class: "", style: { "margin-left": "20rpx" } }, " 张队长 ") ]), vue.createElementVNode("view", { class: "" }, " 地址: 会发生肯德基回复 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种养殖类别: 100户 "), vue.createElementVNode("view", { class: "" }, " 土地面积: 100户 ") ]), vue.createElementVNode("view", { class: "border" }), vue.createElementVNode("view", { class: "" }, " 更新时间: 2023-10-11 ") ]) ]), vue.createCommentVNode(" 组件 "), vue.createVNode(_component_u_picker, { show: showPicker.value, onClose: _cache[3] || (_cache[3] = ($event) => showPicker.value = false), columns, onConfirm: pickerConfirmFn, onCancel: _cache[4] || (_cache[4] = ($event) => showPicker.value = false), closeOnClickOverlay: true }, null, 8, ["show", "columns"]) ], 64 /* STABLE_FRAGMENT */ ); }; } }; const PagesSupervisionCaptain = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-fae7d9cf"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/supervision/captain.vue"]]); const _sfc_main$5 = { __name: "farmerDeatil", setup(__props) { const userInfo = vue.reactive({ "id": 307, "create_user_id": 33, "company_id": 17, "name": "王五", "phone": "18148000562", "area_name": "纳溪区", "street_name": "安富街道", "village_name": "上坝街", "brigade_name": "1队", "is_zz_user": true, "is_sc_user": true, "is_jq_user": true, "is_dw_user": true, "total_land_area": 5e3, "total_pond_area": 32, "total_henhouse_area": 0, "total_pasture_area": 0, "pond_detail": [ { "pond_id": 74, "pond_area": "32", "pond_notes": "好看" }, { "pond_id": 73, "pond_area": "", "pond_notes": "过好几个" } ], "land_detail": [ { "land_id": 69, "land_area": "3000", "land_notes": "土地二", "is_cropped": true, "source_code": "NO1698027424", "crop_name": "葡萄", "crop_variety": "阳光玫瑰", "crop_brand": "不知道啥品牌", "crop_yield": 1e3, "seed_time": "2023-10-23 10:17:04", "ripe_time": "2023-10-23 16:40:01" }, { "land_id": 68, "land_area": "2000", "land_notes": "土地一", "is_cropped": false } ] }); const navgo = (url2) => { uni.navigateTo({ url: url2 }); }; const navgoFn = (type, id) => { if (!type) { navgo("/pages/InformationAdd/index"); } else if (type) { navgo(`/pages/detail/plant?land_id=${id}`); } if (type == 2) { navgo("/pages/detail/plant"); } }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "border-bgc" }), vue.createElementVNode("view", { class: "", style: { "height": "30rpx" } }), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode( "view", { class: "card-li" }, " 农户名称: " + vue.toDisplayString(userInfo.name), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "card-li" }, " 种养殖类型: 种植户 "), vue.createElementVNode( "view", { class: "card-li" }, " 土地面积: " + vue.toDisplayString(userInfo.total_land_area) + "亩 ", 1 /* TEXT */ ), vue.createElementVNode( "view", { class: "card-li" }, " 地址: " + vue.toDisplayString(userInfo.area_name) + vue.toDisplayString(userInfo.street_name) + vue.toDisplayString(userInfo.village_name) + vue.toDisplayString(userInfo.brigade_name), 1 /* TEXT */ ) ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(userInfo.land_detail, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card", key: index2, onClick: ($event) => navgoFn(item.is_cropped, item.land_id) }, [ vue.createElementVNode("view", { class: "tit card-li" }, [ vue.createElementVNode( "view", { class: "" }, vue.toDisplayString(item.land_notes), 1 /* TEXT */ ), item.is_cropped ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#00A15E" } }, " 已种植 ")) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "", style: { "color": "#00A15E" } }, " 未种植 ")) ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode( "view", { class: "" }, " 面积: " + vue.toDisplayString(item.land_area) + "亩 ", 1 /* TEXT */ ) ]), item.crop_name ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "card-li tit" }, [ vue.createElementVNode( "view", { class: "", style: { "font-weight": "normal" } }, " 农作物: " + vue.toDisplayString(item.crop_name), 1 /* TEXT */ ), item.ripe_time ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "", style: { "color": "#FF9B66" } }, " 已成熟 ")) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true), vue.withDirectives(vue.createElementVNode( "view", { class: "card-li tit", style: { "font-weight": "normal" } }, [ vue.createElementVNode( "view", { class: "" }, " 预计产量: " + vue.toDisplayString(item.crop_yield) + "kg ", 1 /* TEXT */ ), vue.createCommentVNode("v-if", true) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, item.crop_yield] ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { style: { "height": "170rpx" } }) ]), vue.createElementVNode("view", { class: "bottom" }, [ vue.createElementVNode("view", { class: "add-btn", onClick: _cache[0] || (_cache[0] = ($event) => navgo("/pages/growRecord/index")) }, " 批量处理 "), vue.createElementVNode("view", { class: "add-btn add", onClick: _cache[1] || (_cache[1] = ($event) => navgo("/pages/InformationAdd/index")) }, " 增加种植 ") ]) ]); }; } }; const PagesSupervisionFarmerDeatil = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/supervision/farmerDeatil.vue"]]); const _sfc_main$4 = { __name: "index", setup(__props) { const selectList = vue.reactive([ "正常", "未及时更新生产状况", "生产状况与实际不符" ]); const value = vue.ref(""); const selectAct = vue.ref(false); vue.ref(false); const selectFoucsFn = (e2) => { selectAct.value = true; }; const indexs = vue.ref(0); const changSelectfn = (index2) => { indexs.value = index2; value.value = selectList[index2]; selectAct.value = false; }; const updateImgFn = () => { uni.chooseImage({ count: 1, sizeType: ["compressed"], sourceType: ["album"], success: (res) => { formatAppLog("log", "at components/supervision/index.vue:97", "chooseImage success, temp path is", res.tempFilePaths[0]); var imageSrc = res.tempFilePaths[0]; uni.showLoading({ title: "上传中" }); this.task = uni.uploadFile({ url: "https://unidemo.dcloud.net.cn/upload", //仅为示例,非真实的接口地址 filePath: imageSrc, name: "file", formData: { "user": "test" }, success: (res2) => { if (this.pageVisible) { formatAppLog("log", "at components/supervision/index.vue:111", "uploadImage success, res is:", res2); uni.hideLoading(); uni.showToast({ title: "上传成功", icon: "success", duration: 1e3 }); this.imageSrc = imageSrc; } }, fail: (err) => { if (this.pageVisible) { formatAppLog("log", "at components/supervision/index.vue:123", "uploadImage fail", err); uni.hideLoading(); uni.showModal({ content: err.errMsg, showCancel: false }); } } }); }, fail: (err) => { formatAppLog("log", "at components/supervision/index.vue:134", "chooseImage fail", err); } }); }; return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7); return vue.openBlock(), vue.createElementBlock("view", { class: "" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 监管详情 "), vue.createElementVNode("view", { class: "" }, [ vue.createElementVNode("view", { class: "updata-btn" }, [ vue.createTextVNode(" 查看全部监管记录"), vue.createVNode(_component_u__image, { src: "/static/img/CKGD.png", style: { "margin-left": "5rpx" }, width: "28.04rpx", height: "28.04rpx" }) ]) ]) ]), vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "card-tit" }, [ vue.createElementVNode("view", { class: "" }, " 1号土地 "), vue.createElementVNode("view", { class: "" }, " 溯源码: 123148 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 当前种植: 土豆 "), vue.createElementVNode("view", { class: "" }, " 标志品种: 土豆大煞风景 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "select" }, [ vue.createTextVNode(" 监管状况: "), vue.createVNode(_component_up_input, { readonly: "", placeholder: "请选择", style: { "margin-top": "20rpx", "width": "600rpx" }, border: "surround", onClickCapture: selectFoucsFn, onBlur: _cache[0] || (_cache[0] = ($event) => selectAct.value = false), modelValue: value.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event) }, null, 8, ["modelValue"]), vue.createElementVNode( "view", { class: vue.normalizeClass(["JT", { actJT: selectAct.value }]) }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLJT.png", width: "24.53rpx", height: "24.53rpx" }) ], 2 /* CLASS */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "selectvalue" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(selectList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "select-li", key: index2, onClick: ($event) => changSelectfn(index2), style: vue.normalizeStyle({ color: indexs.value == index2 ? "black" : "#B3B3B3" }) }, [ vue.createTextVNode( vue.toDisplayString(item) + " ", 1 /* TEXT */ ), vue.withDirectives(vue.createElementVNode( "view", { class: "" }, [ vue.createVNode(_component_u__image, { src: "/static/img/XLZZ.png", width: "24.53rpx", height: "24.53rpx" }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, indexs.value == index2] ]) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, selectAct.value] ]) ]) ]), vue.createElementVNode("view", null, [ vue.createElementVNode("view", { class: "" }, " 监管图片 "), vue.createElementVNode("view", { class: "code-img" }, [ vue.createElementVNode("view", { class: "carime-icon", onClick: updateImgFn }, [ vue.createVNode(_component_u__image, { src: "/static/img/DJSC.png", width: "91.12rpx", height: "91.12rpx" }), vue.createElementVNode("view", { class: "" }, " 点击上传图片 ") ]) ]) ]) ]) ]); }; } }; const supervision = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-5cca2260"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/supervision/index.vue"]]); const _sfc_main$3 = { __name: "detail", setup(__props) { vue.reactive([ "健康", "怀孕中", "生病隔离中", "可出栏" ]); vue.ref(""); const selectAct = vue.ref(false); vue.ref(0); return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "content", onClickCapture: _cache[0] || (_cache[0] = ($event) => selectAct.value = false) }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ vue.createElementVNode("view", { class: "" }, " 农户名称: 1号土地 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 种养殖类型: 土豆 "), vue.createElementVNode("view", { class: "" }, " 土地面积: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 联系方式: 20亩 "), vue.createElementVNode("view", { class: "" }, " 1号土地: 的划分等级 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 2号土地: 20亩 "), vue.createElementVNode("view", { class: "" }, " 3号土地: 计划G几乎是官方 ") ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "" }, " 地址: 四川省巴中市恩阳区三 ") ]) ]), vue.createVNode(supervision), vue.createElementVNode("view", { class: "title" }, [ vue.createElementVNode("view", { class: "" }, " 农户上传操作记录 ") ]), vue.createVNode(myTable, { route: "/pages/feedIng/allFeed" }), vue.createElementVNode("view", { class: "ripe-btn" }, " 确定 ") ], 32 /* HYDRATE_EVENTS */ ); }; } }; const PagesSupervisionDetail = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-c9ccc8e6"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/supervision/detail.vue"]]); const _sfc_main$2 = {}; function _sfc_render$1(_ctx, _cache) { return vue.openBlock(), vue.createElementBlock("view"); } const PagesTestIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/test/index.vue"]]); const _sfc_main$1 = {}; function _sfc_render(_ctx, _cache) { return vue.openBlock(), vue.createElementBlock("view", null, " dsfsd "); } const PagesTestIndex1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/test/index1.vue"]]); __definePage("pages/index/index", PagesIndexIndex); __definePage("pages/InformationAdd/index", PagesInformationAddIndex); __definePage("pages/growRecord/index", PagesGrowRecordIndex); __definePage("pages/detail/plant", PagesDetailPlant); __definePage("pages/allPlant/index", PagesAllPlantIndex); __definePage("pages/records/index", PagesRecordsIndex); __definePage("pages/profile/index", PagesProfileIndex); __definePage("pages/feedIng/feedList", PagesFeedIngFeedList); __definePage("pages/feedIng/feedDetail", PagesFeedIngFeedDetail); __definePage("pages/feedIng/histroyFeed", PagesFeedIngHistroyFeed); __definePage("pages/feedIng/updateFeed", PagesFeedIngUpdateFeed); __definePage("pages/feedIng/vaccineInfo", PagesFeedIngVaccineInfo); __definePage("pages/feedIng/addPoultry", PagesFeedIngAddPoultry); __definePage("pages/feedIng/allRecordTable", PagesFeedIngAllRecordTable); __definePage("pages/feedIng/allFeed", PagesFeedIngAllFeed); __definePage("pages/feedIng/SingleDetail", PagesFeedIngSingleDetail); __definePage("pages/feedIng/allRecording", PagesFeedIngAllRecording); __definePage("pages/poultry/feedList", PagesPoultryFeedList); __definePage("pages/poultry/feedDetail", PagesPoultryFeedDetail); __definePage("pages/poultry/histroyFeed", PagesPoultryHistroyFeed); __definePage("pages/poultry/updateFeed", PagesPoultryUpdateFeed); __definePage("pages/poultry/vaccineInfo", PagesPoultryVaccineInfo); __definePage("pages/poultry/addPoultry", PagesPoultryAddPoultry); __definePage("pages/poultry/allFeed", PagesPoultryAllFeed); __definePage("pages/poultry/SingleDetail", PagesPoultrySingleDetail); __definePage("pages/poultry/allRecording", PagesPoultryAllRecording); __definePage("pages/aquatic/addAquatic", PagesAquaticAddAquatic); __definePage("pages/aquatic/addPond", PagesAquaticAddPond); __definePage("pages/aquatic/updateGrow", PagesAquaticUpdateGrow); __definePage("pages/aquatic/imgList", PagesAquaticImgList); __definePage("pages/aquatic/detail", PagesAquaticDetail); __definePage("pages/supervision/group", PagesSupervisionGroup); __definePage("pages/supervision/captain", PagesSupervisionCaptain); __definePage("pages/supervision/farmerDeatil", PagesSupervisionFarmerDeatil); __definePage("pages/supervision/detail", PagesSupervisionDetail); __definePage("pages/test/index", PagesTestIndex); __definePage("pages/test/index1", PagesTestIndex1); const _sfc_main = { onLaunch: function() { const userInfo = userInfoStore(); userInfoAPI({ user_id: 307 }).then((res) => { userInfo.saveUserInfo(res.data); }); uni.setStorageSync("SY_TOKEN", "dfdf4564557445df4df"); }, onShow: function() { formatAppLog("log", "at App.vue:20", "App Show"); }, onHide: function() { formatAppLog("log", "at App.vue:23", "App Hide"); } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/zmj/uniapp/TraceabilityAPP/App.vue"]]); const { toString } = Object.prototype; function isArray(val) { return toString.call(val) === "[object Array]"; } function isObject(val) { return val !== null && typeof val === "object"; } function isDate(val) { return toString.call(val) === "[object Date]"; } function isURLSearchParams(val) { return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams; } function forEach(obj, fn) { if (obj === null || typeof obj === "undefined") { return; } if (typeof obj !== "object") { obj = [obj]; } if (isArray(obj)) { for (let i2 = 0, l2 = obj.length; i2 < l2; i2++) { fn.call(null, obj[i2], i2, obj); } } else { for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { fn.call(null, obj[key], key, obj); } } } } function isPlainObject(obj) { return Object.prototype.toString.call(obj) === "[object Object]"; } function deepMerge$1() { const result = {}; function assignValue(val, key) { if (typeof result[key] === "object" && typeof val === "object") { result[key] = deepMerge$1(result[key], val); } else if (typeof val === "object") { result[key] = deepMerge$1({}, val); } else { result[key] = val; } } for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) { forEach(arguments[i2], assignValue); } return result; } function isUndefined(val) { return typeof val === "undefined"; } function encode(val) { return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function buildURL(url2, params) { if (!params) { return url2; } let serializedParams; if (isURLSearchParams(params)) { serializedParams = params.toString(); } else { const parts = []; forEach(params, (val, key) => { if (val === null || typeof val === "undefined") { return; } if (isArray(val)) { key = `${key}[]`; } else { val = [val]; } forEach(val, (v2) => { if (isDate(v2)) { v2 = v2.toISOString(); } else if (isObject(v2)) { v2 = JSON.stringify(v2); } parts.push(`${encode(key)}=${encode(v2)}`); }); }); serializedParams = parts.join("&"); } if (serializedParams) { const hashmarkIndex = url2.indexOf("#"); if (hashmarkIndex !== -1) { url2 = url2.slice(0, hashmarkIndex); } url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; } return url2; } function isAbsoluteURL(url2) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); } function combineURLs(baseURL, relativeURL) { return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL; } function buildFullPath(baseURL, requestedURL) { if (baseURL && !isAbsoluteURL(requestedURL)) { return combineURLs(baseURL, requestedURL); } return requestedURL; } function settle(resolve, reject, response) { const { validateStatus } = response.config; const status = response.statusCode; if (status && (!validateStatus || validateStatus(status))) { resolve(response); } else { reject(response); } } const mergeKeys$1 = (keys, config2) => { const config3 = {}; keys.forEach((prop) => { if (!isUndefined(config2[prop])) { config3[prop] = config2[prop]; } }); return config3; }; const adapter = (config2) => new Promise((resolve, reject) => { const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params); const _config = { url: fullPath, header: config2.header, complete: (response) => { config2.fullPath = fullPath; response.config = config2; try { if (typeof response.data === "string") { response.data = JSON.parse(response.data); } } catch (e2) { } settle(resolve, reject, response); } }; let requestTask; if (config2.method === "UPLOAD") { delete _config.header["content-type"]; delete _config.header["Content-Type"]; const otherConfig = { filePath: config2.filePath, name: config2.name }; const optionalKeys = [ "files", "timeout", "formData" ]; requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) }); } else if (config2.method === "DOWNLOAD") { if (!isUndefined(config2.timeout)) { _config.timeout = config2.timeout; } requestTask = uni.downloadFile(_config); } else { const optionalKeys = [ "data", "method", "timeout", "dataType", "responseType", "sslVerify", "firstIpv4" ]; requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) }); } if (config2.getTask) { config2.getTask(requestTask, config2); } }); const dispatchRequest = (config2) => adapter(config2); function InterceptorManager() { this.handlers = []; } InterceptorManager.prototype.use = function use(fulfilled, rejected) { this.handlers.push({ fulfilled, rejected }); return this.handlers.length - 1; }; InterceptorManager.prototype.eject = function eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } }; InterceptorManager.prototype.forEach = function forEach2(fn) { this.handlers.forEach((h2) => { if (h2 !== null) { fn(h2); } }); }; const mergeKeys = (keys, globalsConfig, config2) => { const config3 = {}; keys.forEach((prop) => { if (!isUndefined(config2[prop])) { config3[prop] = config2[prop]; } else if (!isUndefined(globalsConfig[prop])) { config3[prop] = globalsConfig[prop]; } }); return config3; }; const mergeConfig = (globalsConfig, config2 = {}) => { const method = config2.method || globalsConfig.method || "GET"; let config3 = { baseURL: globalsConfig.baseURL || "", method, url: config2.url || "", params: config2.params || {}, custom: { ...globalsConfig.custom || {}, ...config2.custom || {} }, header: deepMerge$1(globalsConfig.header || {}, config2.header || {}) }; const defaultToConfig2Keys = ["getTask", "validateStatus"]; config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) }; if (method === "DOWNLOAD") { if (!isUndefined(config2.timeout)) { config3.timeout = config2.timeout; } else if (!isUndefined(globalsConfig.timeout)) { config3.timeout = globalsConfig.timeout; } } else if (method === "UPLOAD") { delete config3.header["content-type"]; delete config3.header["Content-Type"]; const uploadKeys = [ "files", "filePath", "name", "timeout", "formData" ]; uploadKeys.forEach((prop) => { if (!isUndefined(config2[prop])) { config3[prop] = config2[prop]; } }); if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) { config3.timeout = globalsConfig.timeout; } } else { const defaultsKeys = [ "data", "timeout", "dataType", "responseType", "sslVerify", "firstIpv4" ]; config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) }; } return config3; }; const defaults = { baseURL: "", header: {}, method: "GET", dataType: "json", responseType: "text", custom: {}, timeout: 6e4, sslVerify: true, firstIpv4: false, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; } }; var clone = function() { function _instanceof(obj, type) { return type != null && obj instanceof type; } var nativeMap; try { nativeMap = Map; } catch (_2) { nativeMap = function() { }; } var nativeSet; try { nativeSet = Set; } catch (_2) { nativeSet = function() { }; } var nativePromise; try { nativePromise = Promise; } catch (_2) { nativePromise = function() { }; } function clone2(parent, circular, depth, prototype, includeNonEnumerable) { if (typeof circular === "object") { depth = circular.depth; prototype = circular.prototype; includeNonEnumerable = circular.includeNonEnumerable; circular = circular.circular; } var allParents = []; var allChildren = []; var useBuffer = typeof Buffer != "undefined"; if (typeof circular == "undefined") circular = true; if (typeof depth == "undefined") depth = Infinity; function _clone(parent2, depth2) { if (parent2 === null) return null; if (depth2 === 0) return parent2; var child; var proto2; if (typeof parent2 != "object") { return parent2; } if (_instanceof(parent2, nativeMap)) { child = new nativeMap(); } else if (_instanceof(parent2, nativeSet)) { child = new nativeSet(); } else if (_instanceof(parent2, nativePromise)) { child = new nativePromise(function(resolve, reject) { parent2.then(function(value) { resolve(_clone(value, depth2 - 1)); }, function(err) { reject(_clone(err, depth2 - 1)); }); }); } else if (clone2.__isArray(parent2)) { child = []; } else if (clone2.__isRegExp(parent2)) { child = new RegExp(parent2.source, __getRegExpFlags(parent2)); if (parent2.lastIndex) child.lastIndex = parent2.lastIndex; } else if (clone2.__isDate(parent2)) { child = new Date(parent2.getTime()); } else if (useBuffer && Buffer.isBuffer(parent2)) { if (Buffer.from) { child = Buffer.from(parent2); } else { child = new Buffer(parent2.length); parent2.copy(child); } return child; } else if (_instanceof(parent2, Error)) { child = Object.create(parent2); } else { if (typeof prototype == "undefined") { proto2 = Object.getPrototypeOf(parent2); child = Object.create(proto2); } else { child = Object.create(prototype); proto2 = prototype; } } if (circular) { var index2 = allParents.indexOf(parent2); if (index2 != -1) { return allChildren[index2]; } allParents.push(parent2); allChildren.push(child); } if (_instanceof(parent2, nativeMap)) { parent2.forEach(function(value, key) { var keyChild = _clone(key, depth2 - 1); var valueChild = _clone(value, depth2 - 1); child.set(keyChild, valueChild); }); } if (_instanceof(parent2, nativeSet)) { parent2.forEach(function(value) { var entryChild = _clone(value, depth2 - 1); child.add(entryChild); }); } for (var i2 in parent2) { var attrs = Object.getOwnPropertyDescriptor(parent2, i2); if (attrs) { child[i2] = _clone(parent2[i2], depth2 - 1); } try { var objProperty = Object.getOwnPropertyDescriptor(parent2, i2); if (objProperty.set === "undefined") { continue; } child[i2] = _clone(parent2[i2], depth2 - 1); } catch (e2) { if (e2 instanceof TypeError) { continue; } else if (e2 instanceof ReferenceError) { continue; } } } if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(parent2); for (var i2 = 0; i2 < symbols.length; i2++) { var symbol = symbols[i2]; var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol); if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { continue; } child[symbol] = _clone(parent2[symbol], depth2 - 1); Object.defineProperty(child, symbol, descriptor); } } if (includeNonEnumerable) { var allPropertyNames = Object.getOwnPropertyNames(parent2); for (var i2 = 0; i2 < allPropertyNames.length; i2++) { var propertyName = allPropertyNames[i2]; var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName); if (descriptor && descriptor.enumerable) { continue; } child[propertyName] = _clone(parent2[propertyName], depth2 - 1); Object.defineProperty(child, propertyName, descriptor); } } return child; } return _clone(parent, depth); } clone2.clonePrototype = function clonePrototype(parent) { if (parent === null) return null; var c2 = function() { }; c2.prototype = parent; return new c2(); }; function __objToStr(o2) { return Object.prototype.toString.call(o2); } clone2.__objToStr = __objToStr; function __isDate(o2) { return typeof o2 === "object" && __objToStr(o2) === "[object Date]"; } clone2.__isDate = __isDate; function __isArray(o2) { return typeof o2 === "object" && __objToStr(o2) === "[object Array]"; } clone2.__isArray = __isArray; function __isRegExp(o2) { return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]"; } clone2.__isRegExp = __isRegExp; function __getRegExpFlags(re2) { var flags = ""; if (re2.global) flags += "g"; if (re2.ignoreCase) flags += "i"; if (re2.multiline) flags += "m"; return flags; } clone2.__getRegExpFlags = __getRegExpFlags; return clone2; }(); class Request { /** * @param {Object} arg - 全局配置 * @param {String} arg.baseURL - 全局根路径 * @param {Object} arg.header - 全局header * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式 * @param {String} arg.dataType = [json] - 全局默认的dataType * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持 * @param {Object} arg.custom - 全局默认的自定义参数 * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序 * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+) * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+) * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+) * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300 */ constructor(arg = {}) { if (!isPlainObject(arg)) { arg = {}; formatAppLog("warn", "at node_modules/uview-plus/libs/luch-request/core/Request.js:39", "设置全局参数必须接收一个Object"); } this.config = clone({ ...defaults, ...arg }); this.interceptors = { request: new InterceptorManager(), response: new InterceptorManager() }; } /** * @Function * @param {Request~setConfigCallback} f - 设置全局默认配置 */ setConfig(f2) { this.config = f2(this.config); } middleware(config2) { config2 = mergeConfig(this.config, config2); const chain = [dispatchRequest, void 0]; let promise2 = Promise.resolve(config2); this.interceptors.request.forEach((interceptor) => { chain.unshift(interceptor.fulfilled, interceptor.rejected); }); this.interceptors.response.forEach((interceptor) => { chain.push(interceptor.fulfilled, interceptor.rejected); }); while (chain.length) { promise2 = promise2.then(chain.shift(), chain.shift()); } return promise2; } /** * @Function * @param {Object} config - 请求配置项 * @prop {String} options.url - 请求路径 * @prop {Object} options.data - 请求参数 * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型 * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse * @prop {Object} [options.header = config.header] - 请求header * @prop {Object} [options.method = config.method] - 请求方法 * @returns {Promise} */ request(config2 = {}) { return this.middleware(config2); } get(url2, options = {}) { return this.middleware({ url: url2, method: "GET", ...options }); } post(url2, data, options = {}) { return this.middleware({ url: url2, data, method: "POST", ...options }); } put(url2, data, options = {}) { return this.middleware({ url: url2, data, method: "PUT", ...options }); } delete(url2, data, options = {}) { return this.middleware({ url: url2, data, method: "DELETE", ...options }); } options(url2, data, options = {}) { return this.middleware({ url: url2, data, method: "OPTIONS", ...options }); } upload(url2, config2 = {}) { config2.url = url2; config2.method = "UPLOAD"; return this.middleware(config2); } download(url2, config2 = {}) { config2.url = url2; config2.method = "DOWNLOAD"; return this.middleware(config2); } } class Router { constructor() { this.config = { type: "navigateTo", url: "", delta: 1, // navigateBack页面后退时,回退的层数 params: {}, // 传递的参数 animationType: "pop-in", // 窗口动画,只在APP有效 animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效 intercept: false // 是否需要拦截 }; this.route = this.route.bind(this); } // 判断url前面是否有"/",如果没有则加上,否则无法跳转 addRootPath(url2) { return url2[0] === "/" ? url2 : `/${url2}`; } // 整合路由参数 mixinParam(url2, params) { url2 = url2 && this.addRootPath(url2); let query = ""; if (/.*\/.*\?.*=.*/.test(url2)) { query = uni.$u.queryParams(params, false); return url2 += `&${query}`; } query = uni.$u.queryParams(params); return url2 += query; } // 对外的方法名称 async route(options = {}, params = {}) { let mergeConfig2 = {}; if (typeof options === "string") { mergeConfig2.url = this.mixinParam(options, params); mergeConfig2.type = "navigateTo"; } else { mergeConfig2 = uni.$u.deepMerge(this.config, options); mergeConfig2.url = this.mixinParam(options.url, options.params); } if (mergeConfig2.url === uni.$u.page()) return; if (params.intercept) { this.config.intercept = params.intercept; } mergeConfig2.params = params; mergeConfig2 = uni.$u.deepMerge(this.config, mergeConfig2); if (typeof uni.$u.routeIntercept === "function") { const isNext = await new Promise((resolve, reject) => { uni.$u.routeIntercept(mergeConfig2, resolve); }); isNext && this.openPage(mergeConfig2); } else { this.openPage(mergeConfig2); } } // 执行路由跳转 openPage(config2) { const { url: url2, type, delta, animationType, animationDuration } = config2; if (config2.type == "navigateTo" || config2.type == "to") { uni.navigateTo({ url: url2, animationType, animationDuration }); } if (config2.type == "redirectTo" || config2.type == "redirect") { uni.redirectTo({ url: url2 }); } if (config2.type == "switchTab" || config2.type == "tab") { uni.switchTab({ url: url2 }); } if (config2.type == "reLaunch" || config2.type == "launch") { uni.reLaunch({ url: url2 }); } if (config2.type == "navigateBack" || config2.type == "back") { uni.navigateBack({ delta }); } } } const route = new Router().route; function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) { const startRGB = hexToRgb(startColor, false); const startR = startRGB[0]; const startG = startRGB[1]; const startB = startRGB[2]; const endRGB = hexToRgb(endColor, false); const endR = endRGB[0]; const endG = endRGB[1]; const endB = endRGB[2]; const sR = (endR - startR) / step; const sG = (endG - startG) / step; const sB = (endB - startB) / step; const colorArr = []; for (let i2 = 0; i2 < step; i2++) { let hex = rgbToHex(`rgb(${Math.round(sR * i2 + startR)},${Math.round(sG * i2 + startG)},${Math.round(sB * i2 + startB)})`); if (i2 === 0) hex = rgbToHex(startColor); if (i2 === step - 1) hex = rgbToHex(endColor); colorArr.push(hex); } return colorArr; } function hexToRgb(sColor, str = true) { const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; sColor = String(sColor).toLowerCase(); if (sColor && reg.test(sColor)) { if (sColor.length === 4) { let sColorNew = "#"; for (let i2 = 1; i2 < 4; i2 += 1) { sColorNew += sColor.slice(i2, i2 + 1).concat(sColor.slice(i2, i2 + 1)); } sColor = sColorNew; } const sColorChange = []; for (let i2 = 1; i2 < 7; i2 += 2) { sColorChange.push(parseInt(`0x${sColor.slice(i2, i2 + 2)}`)); } if (!str) { return sColorChange; } return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`; } if (/^(rgb|RGB)/.test(sColor)) { const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); return arr.map((val) => Number(val)); } return sColor; } function rgbToHex(rgb) { const _this = rgb; const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; if (/^(rgb|RGB)/.test(_this)) { const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); let strHex = "#"; for (let i2 = 0; i2 < aColor.length; i2++) { let hex = Number(aColor[i2]).toString(16); hex = String(hex).length == 1 ? `${0}${hex}` : hex; if (hex === "0") { hex += hex; } strHex += hex; } if (strHex.length !== 7) { strHex = _this; } return strHex; } if (reg.test(_this)) { const aNum = _this.replace(/#/, "").split(""); if (aNum.length === 6) { return _this; } if (aNum.length === 3) { let numHex = "#"; for (let i2 = 0; i2 < aNum.length; i2 += 1) { numHex += aNum[i2] + aNum[i2]; } return numHex; } } else { return _this; } } function colorToRgba(color2, alpha) { color2 = rgbToHex(color2); const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; let sColor = String(color2).toLowerCase(); if (sColor && reg.test(sColor)) { if (sColor.length === 4) { let sColorNew = "#"; for (let i2 = 1; i2 < 4; i2 += 1) { sColorNew += sColor.slice(i2, i2 + 1).concat(sColor.slice(i2, i2 + 1)); } sColor = sColorNew; } const sColorChange = []; for (let i2 = 1; i2 < 7; i2 += 2) { sColorChange.push(parseInt(`0x${sColor.slice(i2, i2 + 2)}`)); } return `rgba(${sColorChange.join(",")},${alpha})`; } return sColor; } const colorGradient$1 = { colorGradient, hexToRgb, rgbToHex, colorToRgba }; function email(value) { return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value); } function mobile(value) { return /^1[23456789]\d{9}$/.test(value); } function url(value) { return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value); } function date(value) { if (!value) return false; if (number(value)) value = +value; return !/Invalid|NaN/.test(new Date(value).toString()); } function dateISO(value) { return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value); } function number(value) { return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value); } function string(value) { return typeof value === "string"; } function digits(value) { return /^\d+$/.test(value); } function idCard(value) { return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test( value ); } function carNo(value) { const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/; const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/; if (value.length === 7) { return creg.test(value); } if (value.length === 8) { return xreg.test(value); } return false; } function amount(value) { return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value); } function chinese(value) { const reg = /^[\u4e00-\u9fa5]+$/gi; return reg.test(value); } function letter(value) { return /^[a-zA-Z]*$/.test(value); } function enOrNum(value) { const reg = /^[0-9a-zA-Z]*$/g; return reg.test(value); } function contains(value, param) { return value.indexOf(param) >= 0; } function range$1(value, param) { return value >= param[0] && value <= param[1]; } function rangeLength(value, param) { return value.length >= param[0] && value.length <= param[1]; } function landline(value) { const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/; return reg.test(value); } function empty(value) { switch (typeof value) { case "undefined": return true; case "string": if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0) return true; break; case "boolean": if (!value) return true; break; case "number": if (value === 0 || isNaN(value)) return true; break; case "object": if (value === null || value.length === 0) return true; for (const i2 in value) { return false; } return true; } return false; } function jsonString(value) { if (typeof value === "string") { try { const obj = JSON.parse(value); if (typeof obj === "object" && obj) { return true; } return false; } catch (e2) { return false; } } return false; } function array(value) { if (typeof Array.isArray === "function") { return Array.isArray(value); } return Object.prototype.toString.call(value) === "[object Array]"; } function object(value) { return Object.prototype.toString.call(value) === "[object Object]"; } function code(value, len = 6) { return new RegExp(`^\\d{${len}}$`).test(value); } function func(value) { return typeof value === "function"; } function promise(value) { return object(value) && func(value.then) && func(value.catch); } function image(value) { const newValue = value.split("?")[0]; const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; return IMAGE_REGEXP.test(newValue); } function video(value) { const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i; return VIDEO_REGEXP.test(value); } function regExp(o2) { return o2 && Object.prototype.toString.call(o2) === "[object RegExp]"; } const test = { email, mobile, url, date, dateISO, number, digits, idCard, carNo, amount, chinese, letter, enOrNum, contains, range: range$1, rangeLength, empty, isEmpty: empty, jsonString, landline, object, array, code, func, promise, video, image, regExp, string }; let timeout = null; function debounce(func2, wait = 500, immediate = false) { if (timeout !== null) clearTimeout(timeout); if (immediate) { const callNow = !timeout; timeout = setTimeout(() => { timeout = null; }, wait); if (callNow) typeof func2 === "function" && func2(); } else { timeout = setTimeout(() => { typeof func2 === "function" && func2(); }, wait); } } let flag; function throttle(func2, wait = 500, immediate = true) { if (immediate) { if (!flag) { flag = true; typeof func2 === "function" && func2(); setTimeout(() => { flag = false; }, wait); } } else if (!flag) { flag = true; setTimeout(() => { flag = false; typeof func2 === "function" && func2(); }, wait); } } function strip(num, precision = 15) { return +parseFloat(Number(num).toPrecision(precision)); } function digitLength(num) { const eSplit = num.toString().split(/[eE]/); const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0); return len > 0 ? len : 0; } function float2Fixed(num) { if (num.toString().indexOf("e") === -1) { return Number(num.toString().replace(".", "")); } const dLen = digitLength(num); return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num); } function checkBoundary(num) { { if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) { formatAppLog("warn", "at node_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`); } } } function iteratorOperation(arr, operation) { const [num1, num2, ...others] = arr; let res = operation(num1, num2); others.forEach((num) => { res = operation(res, num); }); return res; } function times(...nums) { if (nums.length > 2) { return iteratorOperation(nums, times); } const [num1, num2] = nums; const num1Changed = float2Fixed(num1); const num2Changed = float2Fixed(num2); const baseNum = digitLength(num1) + digitLength(num2); const leftValue = num1Changed * num2Changed; checkBoundary(leftValue); return leftValue / Math.pow(10, baseNum); } function divide(...nums) { if (nums.length > 2) { return iteratorOperation(nums, divide); } const [num1, num2] = nums; const num1Changed = float2Fixed(num1); const num2Changed = float2Fixed(num2); checkBoundary(num1Changed); checkBoundary(num2Changed); return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1)))); } function round(num, ratio) { const base = Math.pow(10, ratio); let result = divide(Math.round(Math.abs(times(num, base))), base); if (num < 0 && result !== 0) { result = times(result, -1); } return result; } function range(min = 0, max = 0, value = 0) { return Math.max(min, Math.min(max, Number(value))); } function getPx(value, unit = false) { if (test.number(value)) { return unit ? `${value}px` : Number(value); } if (/(rpx|upx)$/.test(value)) { return unit ? `${uni.upx2px(parseInt(value))}px` : Number(uni.upx2px(parseInt(value))); } return unit ? `${parseInt(value)}px` : parseInt(value); } function sleep(value = 30) { return new Promise((resolve) => { setTimeout(() => { resolve(); }, value); }); } function os() { return uni.getSystemInfoSync().platform.toLowerCase(); } function sys() { return uni.getSystemInfoSync(); } function random(min, max) { if (min >= 0 && max > 0 && max >= min) { const gab = max - min + 1; return Math.floor(Math.random() * gab + min); } return 0; } function guid(len = 32, firstU = true, radix = null) { const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""); const uuid = []; radix = radix || chars.length; if (len) { for (let i2 = 0; i2 < len; i2++) uuid[i2] = chars[0 | Math.random() * radix]; } else { let r2; uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-"; uuid[14] = "4"; for (let i2 = 0; i2 < 36; i2++) { if (!uuid[i2]) { r2 = 0 | Math.random() * 16; uuid[i2] = chars[i2 == 19 ? r2 & 3 | 8 : r2]; } } } if (firstU) { uuid.shift(); return `u${uuid.join("")}`; } return uuid.join(""); } function $parent(name = void 0) { let parent = this.$parent; while (parent) { if (parent.$options && parent.$options.name !== name) { parent = parent.$parent; } else { return parent; } } return false; } function addStyle(customStyle, target = "object") { if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") { return customStyle; } if (target === "object") { customStyle = trim(customStyle); const styleArray = customStyle.split(";"); const style = {}; for (let i2 = 0; i2 < styleArray.length; i2++) { if (styleArray[i2]) { const item = styleArray[i2].split(":"); style[trim(item[0])] = trim(item[1]); } } return style; } let string2 = ""; for (const i2 in customStyle) { const key = i2.replace(/([A-Z])/g, "-$1").toLowerCase(); string2 += `${key}:${customStyle[i2]};`; } return trim(string2); } function addUnit(value = "auto", unit = "") { if (!unit) { unit = uni.$u.config.unit || "px"; } value = String(value); return test.number(value) ? `${value}${unit}` : value; } function deepClone(obj) { if ([null, void 0, NaN, false].includes(obj)) return obj; if (typeof obj !== "object" && typeof obj !== "function") { return obj; } const o2 = test.array(obj) ? [] : {}; for (const i2 in obj) { if (obj.hasOwnProperty(i2)) { o2[i2] = typeof obj[i2] === "object" ? deepClone(obj[i2]) : obj[i2]; } } return o2; } function deepMerge(target = {}, source = {}) { target = deepClone(target); if (typeof target !== "object" || typeof source !== "object") return false; for (const prop in source) { if (!source.hasOwnProperty(prop)) continue; if (prop in target) { if (source[prop] == null) { target[prop] = source[prop]; } else if (typeof target[prop] !== "object") { target[prop] = source[prop]; } else if (typeof source[prop] !== "object") { target[prop] = source[prop]; } else if (target[prop].concat && source[prop].concat) { target[prop] = target[prop].concat(source[prop]); } else { target[prop] = deepMerge(target[prop], source[prop]); } } else { target[prop] = source[prop]; } } return target; } function error(err) { { formatAppLog("error", "at node_modules/uview-plus/libs/function/index.js:240", `uView提示:${err}`); } } function randomArray(array2 = []) { return array2.sort(() => Math.random() - 0.5); } if (!String.prototype.padStart) { String.prototype.padStart = function(maxLength, fillString = " ") { if (Object.prototype.toString.call(fillString) !== "[object String]") { throw new TypeError( "fillString must be String" ); } const str = this; if (str.length >= maxLength) return String(str); const fillLength = maxLength - str.length; let times2 = Math.ceil(fillLength / fillString.length); while (times2 >>= 1) { fillString += fillString; if (times2 === 1) { fillString += fillString; } } return fillString.slice(0, fillLength) + str; }; } function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") { let date2; if (!dateTime) { date2 = /* @__PURE__ */ new Date(); } else if (/^\d{10}$/.test(dateTime.toString().trim())) { date2 = new Date(dateTime * 1e3); } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) { date2 = new Date(Number(dateTime)); } else { date2 = new Date( typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime ); } const timeSource = { "y": date2.getFullYear().toString(), // 年 "m": (date2.getMonth() + 1).toString().padStart(2, "0"), // 月 "d": date2.getDate().toString().padStart(2, "0"), // 日 "h": date2.getHours().toString().padStart(2, "0"), // 时 "M": date2.getMinutes().toString().padStart(2, "0"), // 分 "s": date2.getSeconds().toString().padStart(2, "0") // 秒 // 有其他格式化字符需求可以继续添加,必须转化成字符串 }; for (const key in timeSource) { const [ret] = new RegExp(`${key}+`).exec(formatStr) || []; if (ret) { const beginIndex = key === "y" && ret.length === 2 ? 2 : 0; formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex)); } } return formatStr; } function timeFrom(timestamp = null, format = "yyyy-mm-dd") { if (timestamp == null) timestamp = Number(/* @__PURE__ */ new Date()); timestamp = parseInt(timestamp); if (timestamp.toString().length == 10) timestamp *= 1e3; let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp; timer = parseInt(timer / 1e3); let tips = ""; switch (true) { case timer < 300: tips = "刚刚"; break; case (timer >= 300 && timer < 3600): tips = `${parseInt(timer / 60)}分钟前`; break; case (timer >= 3600 && timer < 86400): tips = `${parseInt(timer / 3600)}小时前`; break; case (timer >= 86400 && timer < 2592e3): tips = `${parseInt(timer / 86400)}天前`; break; default: if (format === false) { if (timer >= 2592e3 && timer < 365 * 86400) { tips = `${parseInt(timer / (86400 * 30))}个月前`; } else { tips = `${parseInt(timer / (86400 * 365))}年前`; } } else { tips = timeFormat(timestamp, format); } } return tips; } function trim(str, pos = "both") { str = String(str); if (pos == "both") { return str.replace(/^\s+|\s+$/g, ""); } if (pos == "left") { return str.replace(/^\s*/, ""); } if (pos == "right") { return str.replace(/(\s*$)/g, ""); } if (pos == "all") { return str.replace(/\s+/g, ""); } return str; } function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") { const prefix = isPrefix ? "?" : ""; const _result = []; if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1) arrayFormat = "brackets"; for (const key in data) { const value = data[key]; if (["", void 0, null].indexOf(value) >= 0) { continue; } if (value.constructor === Array) { switch (arrayFormat) { case "indices": for (let i2 = 0; i2 < value.length; i2++) { _result.push(`${key}[${i2}]=${value[i2]}`); } break; case "brackets": value.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); break; case "repeat": value.forEach((_value) => { _result.push(`${key}=${_value}`); }); break; case "comma": let commaStr = ""; value.forEach((_value) => { commaStr += (commaStr ? "," : "") + _value; }); _result.push(`${key}=${commaStr}`); break; default: value.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); } } else { _result.push(`${key}=${value}`); } } return _result.length ? prefix + _result.join("&") : ""; } function toast(title, duration = 2e3) { uni.showToast({ title: String(title), icon: "none", duration }); } function type2icon(type = "success", fill = false) { if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1) type = "success"; let iconName = ""; switch (type) { case "primary": iconName = "info-circle"; break; case "info": iconName = "info-circle"; break; case "error": iconName = "close-circle"; break; case "warning": iconName = "error-circle"; break; case "success": iconName = "checkmark-circle"; break; default: iconName = "checkmark-circle"; } if (fill) iconName += "-fill"; return iconName; } function priceFormat(number2, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") { number2 = `${number2}`.replace(/[^0-9+-Ee.]/g, ""); const n2 = !isFinite(+number2) ? 0 : +number2; const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals); const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator; const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint; let s2 = ""; s2 = (prec ? round(n2, prec) + "" : `${Math.round(n2)}`).split("."); const re2 = /(-?\d+)(\d{3})/; while (re2.test(s2[0])) { s2[0] = s2[0].replace(re2, `$1${sep}$2`); } if ((s2[1] || "").length < prec) { s2[1] = s2[1] || ""; s2[1] += new Array(prec - s2[1].length + 1).join("0"); } return s2.join(dec); } function getDuration(value, unit = true) { const valueNum = parseInt(value); if (unit) { if (/s$/.test(value)) return value; return value > 30 ? `${value}ms` : `${value}s`; } if (/ms$/.test(value)) return valueNum; if (/s$/.test(value)) return valueNum > 30 ? valueNum : valueNum * 1e3; return valueNum; } function padZero(value) { return `00${value}`.slice(-2); } function formValidate(instance, event) { const formItem = uni.$u.$parent.call(instance, "u-form-item"); const form = uni.$u.$parent.call(instance, "u-form"); if (formItem && form) { form.validateField(formItem.prop, () => { }, event); } } function getProperty(obj, key) { if (!obj) { return; } if (typeof key !== "string" || key === "") { return ""; } if (key.indexOf(".") !== -1) { const keys = key.split("."); let firstObj = obj[keys[0]] || {}; for (let i2 = 1; i2 < keys.length; i2++) { if (firstObj) { firstObj = firstObj[keys[i2]]; } } return firstObj; } return obj[key]; } function setProperty(obj, key, value) { if (!obj) { return; } const inFn = function(_obj, keys, v2) { if (keys.length === 1) { _obj[keys[0]] = v2; return; } while (keys.length > 1) { const k = keys[0]; if (!_obj[k] || typeof _obj[k] !== "object") { _obj[k] = {}; } keys.shift(); inFn(_obj[k], keys, v2); } }; if (typeof key !== "string" || key === "") ; else if (key.indexOf(".") !== -1) { const keys = key.split("."); inFn(obj, keys, value); } else { obj[key] = value; } } function page() { const pages2 = getCurrentPages(); return `/${pages2[pages2.length - 1].route || ""}`; } function pages() { const pages2 = getCurrentPages(); return pages2; } function setConfig({ props: props2 = {}, config: config2 = {}, color: color2 = {}, zIndex: zIndex2 = {} }) { const { deepMerge: deepMerge2 } = uni.$u; uni.$u.config = deepMerge2(uni.$u.config, config2); uni.$u.props = deepMerge2(uni.$u.props, props2); uni.$u.color = deepMerge2(uni.$u.color, color2); uni.$u.zIndex = deepMerge2(uni.$u.zIndex, zIndex2); } const index = { range, getPx, sleep, os, sys, random, guid, $parent, addStyle, addUnit, deepClone, deepMerge, error, randomArray, timeFormat, timeFrom, trim, queryParams, toast, type2icon, priceFormat, getDuration, padZero, formValidate, getProperty, setProperty, page, pages, setConfig }; const zIndex = { toast: 10090, noNetwork: 10080, // popup包含popup,actionsheet,keyboard,picker的值 popup: 10075, mask: 10070, navbar: 980, topTips: 975, sticky: 970, indexListSticky: 965 }; let platform = "none"; platform = "vue3"; platform = "plus"; const platform$1 = platform; const $u = { route, date: index.timeFormat, // 另名date colorGradient: colorGradient$1.colorGradient, hexToRgb: colorGradient$1.hexToRgb, rgbToHex: colorGradient$1.rgbToHex, colorToRgba: colorGradient$1.colorToRgba, test, type: ["primary", "success", "error", "warning", "info"], http: new Request(), config: config$1, // uView配置信息相关,比如版本号 zIndex, debounce, throttle, mixin, mpMixin, props: props$i, ...index, color: color$2, platform: platform$1 }; uni.$u = $u; const install = (Vue2) => { Vue2.config.globalProperties.$u = $u; Vue2.config.globalProperties.$nextTick = (cb) => { cb(); }; Vue2.mixin(mixin); }; const uviewPlus = { install }; function createApp() { const app = vue.createVueApp(App); const pinia = createPinia(); app.use(pinia); app.use(uviewPlus); return { app, pinia }; } const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp(); uni.Vuex = __Vuex__; uni.Pinia = __Pinia__; __app__.provide("__globalStyles", __uniConfig.styles); __app__._component.mpType = "app"; __app__._component.render = () => { }; __app__.mount("#app"); })(Vue, uni.VueShared);