diff --git a/App.vue b/App.vue index 502747f..0d16aa3 100644 --- a/App.vue +++ b/App.vue @@ -1,8 +1,13 @@ \ No newline at end of file diff --git a/components/imgCard.vue b/components/imgCard.vue index 6d9802b..99bc1cb 100644 --- a/components/imgCard.vue +++ b/components/imgCard.vue @@ -1,17 +1,28 @@ - \ No newline at end of file diff --git a/components/supervision/index.vue b/components/supervision/index.vue new file mode 100644 index 0000000..83c3a8a --- /dev/null +++ b/components/supervision/index.vue @@ -0,0 +1,223 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 70fdd71..2a93ac6 100644 --- a/pages.json +++ b/pages.json @@ -129,7 +129,80 @@ "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/allRecording", + "style": { + "navigationBarTitleText": "全部记录", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#F4F4F4", + "navigationBarTextStyle": "black" + } + }, + { "path": "pages/aquatic/addAquatic", "style": { "navigationBarTitleText": "添加养殖", @@ -153,9 +226,42 @@ "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": { diff --git a/pages/allPlant/index.vue b/pages/allPlant/index.vue index 5e745e1..b25aef0 100644 --- a/pages/allPlant/index.vue +++ b/pages/allPlant/index.vue @@ -50,56 +50,23 @@ 今日种植状态 - - - - - - - 更新时间: 2023-11-16 - - - + + 播种图片 - - - - - - - 更新时间: 2023-11-16 - - - + + 生长情况 - - - - - - - 更新时间: 2023-11-16 - - - - - - - - - - 更新时间: 2023-11-16 - - - + @@ -108,7 +75,30 @@ - \ No newline at end of file diff --git a/pages/feedIng/addPoultry.vue b/pages/feedIng/addPoultry.vue index 3a508bf..d328997 100644 --- a/pages/feedIng/addPoultry.vue +++ b/pages/feedIng/addPoultry.vue @@ -1,34 +1,8 @@ + + \ No newline at end of file diff --git a/pages/supervision/detail.vue b/pages/supervision/detail.vue new file mode 100644 index 0000000..84d435d --- /dev/null +++ b/pages/supervision/detail.vue @@ -0,0 +1,227 @@ + + + + + \ No newline at end of file diff --git a/pages/supervision/farmerDeatil.vue b/pages/supervision/farmerDeatil.vue new file mode 100644 index 0000000..5895b42 --- /dev/null +++ b/pages/supervision/farmerDeatil.vue @@ -0,0 +1,210 @@ + + + + + \ No newline at end of file diff --git a/pages/supervision/group.vue b/pages/supervision/group.vue new file mode 100644 index 0000000..b5a2414 --- /dev/null +++ b/pages/supervision/group.vue @@ -0,0 +1,159 @@ + + + + + \ No newline at end of file diff --git a/pages/test/index.vue b/pages/test/index.vue index 20032ec..e66b7ee 100644 --- a/pages/test/index.vue +++ b/pages/test/index.vue @@ -1,11 +1,8 @@ \ No newline at end of file diff --git a/store/counter.js b/store/counter.js deleted file mode 100644 index 8402069..0000000 --- a/store/counter.js +++ /dev/null @@ -1,15 +0,0 @@ -import { - defineStore -} from 'pinia' - -export const counterStore = defineStore('counter', { - state: () => ({ - count: 0 - }), - getters: {}, - actions: { - increment() { - this.count++ - } - } -}) \ No newline at end of file diff --git a/store/userInfo.js b/store/userInfo.js new file mode 100644 index 0000000..dfcf38c --- /dev/null +++ b/store/userInfo.js @@ -0,0 +1,15 @@ +import { + defineStore +} from 'pinia' + +export const userInfoStore = defineStore('counter', { + state: () => ({ + user_id: "" + }), + getters: {}, + actions: { + saveUserInfo(userInfo) { + this.user_id = userInfo + } + } +}) \ No newline at end of file diff --git a/unpackage/dist/dev/app-plus/app-config-service.js b/unpackage/dist/dev/app-plus/app-config-service.js index b983d43..c0c8441 100644 --- a/unpackage/dist/dev/app-plus/app-config-service.js +++ b/unpackage/dist/dev/app-plus/app-config-service.js @@ -2,7 +2,7 @@ ;(function(){ let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[]; const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"test","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"3.8.12","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}}; - const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"style":"custom","type":"default"},"isNVue":false}},{"path":"pages/InformationAdd/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"信息添加","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/growRecord/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/detail/plant","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/allPlant/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部种植","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/records/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/profile/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长概况","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/feedList","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"养殖列表","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/feedDetail","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"养殖详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/histroyFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"历史养殖记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/updateFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"更新饲养状态","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/vaccineInfo","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"疫苗信息","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/addPoultry","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"添加饲养动物","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/allFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部养殖记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/allRecording","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/test/index","meta":{"enablePullDownRefresh":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}},{"path":"pages/test/index1","meta":{"enablePullDownRefresh":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)); + const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"style":"custom","type":"default"},"isNVue":false}},{"path":"pages/InformationAdd/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"信息添加","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/growRecord/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/detail/plant","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/allPlant/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部种植","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/records/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/profile/index","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生长概况","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/feedList","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"养殖列表","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/feedDetail","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"养殖详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/histroyFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"历史养殖记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/updateFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"更新饲养状态","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/vaccineInfo","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"疫苗信息","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/addPoultry","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"添加饲养动物","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/allFeed","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部养殖记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/feedIng/allRecording","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"全部记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/aquatic/addAquatic","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"添加养殖","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/aquatic/updateGrow","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"更新生长记录","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/aquatic/detail","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/supervision/group","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"小组公司监管","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/supervision/captain","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"生产队长监管","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/supervision/farmerDeatil","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"农户详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/supervision/detail","meta":{"enablePullDownRefresh":false,"navigationBar":{"backgroundColor":"#F4F4F4","titleText":"土地详情","type":"default","titleColor":"#000000"},"isNVue":false}},{"path":"pages/test/index","meta":{"enablePullDownRefresh":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}},{"path":"pages/test/index1","meta":{"enablePullDownRefresh":true,"navigationBar":{"titleText":"uni-app","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)); __uniConfig.styles=[];//styles __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); diff --git a/unpackage/dist/dev/app-plus/app-service.js b/unpackage/dist/dev/app-plus/app-service.js index 5da0da5..cdb93d0 100644 --- a/unpackage/dist/dev/app-plus/app-service.js +++ b/unpackage/dist/dev/app-plus/app-service.js @@ -245,6 +245,7 @@ if (uni.restoreGlobal) { "uicon-zh": "", "uicon-en": "" }; + const ON_LOAD = "onLoad"; function formatAppLog(type, filename, ...args) { if (uni.__log__) { uni.__log__(type, filename, ...args); @@ -255,6 +256,10 @@ if (uni.restoreGlobal) { 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", ` @@ -1706,7 +1711,7 @@ if (uni.restoreGlobal) { previewImage: true } }; - const props$e = { + const props$i = { ...ActionSheet, ...Album, ...Alert, @@ -1796,92 +1801,92 @@ if (uni.restoreGlobal) { ...Transition, ...Upload }; - const props$d = { + const props$h = { props: { // 图标类名 name: { type: String, - default: props$e.icon.name + default: props$i.icon.name }, // 图标颜色,可接受主题色 color: { type: String, - default: props$e.icon.color + default: props$i.icon.color }, // 字体大小,单位px size: { type: [String, Number], - default: props$e.icon.size + default: props$i.icon.size }, // 是否显示粗体 bold: { type: Boolean, - default: props$e.icon.bold + default: props$i.icon.bold }, // 点击图标的时候传递事件出去的index(用于区分点击了哪一个) index: { type: [String, Number], - default: props$e.icon.index + default: props$i.icon.index }, // 触摸图标时的类名 hoverClass: { type: String, - default: props$e.icon.hoverClass + default: props$i.icon.hoverClass }, // 自定义扩展前缀,方便用户扩展自己的图标库 customPrefix: { type: String, - default: props$e.icon.customPrefix + default: props$i.icon.customPrefix }, // 图标右边或者下面的文字 label: { type: [String, Number], - default: props$e.icon.label + default: props$i.icon.label }, // label的位置,只能右边或者下边 labelPos: { type: String, - default: props$e.icon.labelPos + default: props$i.icon.labelPos }, // label的大小 labelSize: { type: [String, Number], - default: props$e.icon.labelSize + default: props$i.icon.labelSize }, // label的颜色 labelColor: { type: String, - default: props$e.icon.labelColor + default: props$i.icon.labelColor }, // label与图标的距离 space: { type: [String, Number], - default: props$e.icon.space + default: props$i.icon.space }, // 图片的mode imgMode: { type: String, - default: props$e.icon.imgMode + default: props$i.icon.imgMode }, // 用于显示图片小图标时,图片的宽度 width: { type: [String, Number], - default: props$e.icon.width + default: props$i.icon.width }, // 用于显示图片小图标时,图片的高度 height: { type: [String, Number], - default: props$e.icon.height + default: props$i.icon.height }, // 用于解决某些情况下,让图标垂直居中的用途 top: { type: [String, Number], - default: props$e.icon.top + default: props$i.icon.top }, // 是否阻止事件传播 stop: { type: Boolean, - default: props$e.icon.stop + default: props$i.icon.stop } } }; @@ -2022,13 +2027,13 @@ if (uni.restoreGlobal) { } return target; }; - const _sfc_main$R = { + const _sfc_main$12 = { name: "u-icon", data() { return {}; }, emits: ["click"], - mixins: [mpMixin, mixin, props$d], + mixins: [mpMixin, mixin, props$h], computed: { uClasses() { let classes = []; @@ -2072,7 +2077,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { @@ -2116,28 +2121,28 @@ if (uni.restoreGlobal) { /* CLASS */ ); } - const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$B], ["__scopeId", "data-v-1c933a9a"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-icon/u-icon.vue"]]); - const props$c = { + const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["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$e.transition.show + default: props$i.transition.show }, // 使用的动画模式 mode: { type: String, - default: props$e.transition.mode + default: props$i.transition.mode }, // 动画的执行时间,单位ms duration: { type: [String, Number], - default: props$e.transition.duration + default: props$i.transition.duration }, // 使用的动画过渡函数 timingFunction: { type: String, - default: props$e.transition.timingFunction + default: props$i.transition.timingFunction } } }; @@ -2198,7 +2203,7 @@ if (uni.restoreGlobal) { } } }; - const _sfc_main$Q = { + const _sfc_main$11 = { name: "u-transition", data() { return { @@ -2231,7 +2236,7 @@ if (uni.restoreGlobal) { } }, // 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象 - mixins: [mpMixin, mixin, transition, props$c], + mixins: [mpMixin, mixin, transition, props$g], watch: { show: { handler(newVal) { @@ -2242,7 +2247,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) { return $data.inited ? (vue.openBlock(), vue.createElementBlock( "view", { @@ -2260,94 +2265,94 @@ if (uni.restoreGlobal) { /* CLASS, STYLE, HYDRATE_EVENTS */ )) : vue.createCommentVNode("v-if", true); } - const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$A], ["__scopeId", "data-v-0573594d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-transition/u-transition.vue"]]); - const props$b = { + const __easycom_4$1 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["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$e.image.src + default: props$i.image.src }, // 裁剪模式 mode: { type: String, - default: props$e.image.mode + default: props$i.image.mode }, // 宽度,单位任意 width: { type: [String, Number], - default: props$e.image.width + default: props$i.image.width }, // 高度,单位任意 height: { type: [String, Number], - default: props$e.image.height + default: props$i.image.height }, // 图片形状,circle-圆形,square-方形 shape: { type: String, - default: props$e.image.shape + default: props$i.image.shape }, // 圆角,单位任意 radius: { type: [String, Number], - default: props$e.image.radius + default: props$i.image.radius }, // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序 lazyLoad: { type: Boolean, - default: props$e.image.lazyLoad + default: props$i.image.lazyLoad }, // 开启长按图片显示识别微信小程序码菜单 showMenuByLongpress: { type: Boolean, - default: props$e.image.showMenuByLongpress + default: props$i.image.showMenuByLongpress }, // 加载中的图标,或者小图片 loadingIcon: { type: String, - default: props$e.image.loadingIcon + default: props$i.image.loadingIcon }, // 加载失败的图标,或者小图片 errorIcon: { type: String, - default: props$e.image.errorIcon + default: props$i.image.errorIcon }, // 是否显示加载中的图标或者自定义的slot showLoading: { type: Boolean, - default: props$e.image.showLoading + default: props$i.image.showLoading }, // 是否显示加载错误的图标或者自定义的slot showError: { type: Boolean, - default: props$e.image.showError + default: props$i.image.showError }, // 是否需要淡入效果 fade: { type: Boolean, - default: props$e.image.fade + default: props$i.image.fade }, // 只支持网络资源,只对微信小程序有效 webp: { type: Boolean, - default: props$e.image.webp + default: props$i.image.webp }, // 过渡时间,单位ms duration: { type: [String, Number], - default: props$e.image.duration + default: props$i.image.duration }, // 背景颜色,用于深色页面加载图片时,为了和背景色融合 bgColor: { type: String, - default: props$e.image.bgColor + default: props$i.image.bgColor } } }; - const _sfc_main$P = { + const _sfc_main$10 = { name: "u-image", - mixins: [mpMixin, mixin, props$b], + mixins: [mpMixin, mixin, props$f], data() { return { // 图片是否加载错误,如果是,则显示错误占位图 @@ -2417,7 +2422,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) { + 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, { @@ -2505,7 +2510,7 @@ if (uni.restoreGlobal) { /* FORWARDED */ }, 8, ["show", "duration"]); } - const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$z], ["__scopeId", "data-v-9d58ba7c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-image/u-image.vue"]]); + const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["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/"; @@ -2518,7 +2523,6 @@ if (uni.restoreGlobal) { "TOKEN": uni.getStorageSync("SY_TOKEN") || "" } }; - formatAppLog("log", "at utils/syhttp.js:4", "指定"); function baseRequest(url2, method, data, { noAuth = false, noVerify = false, @@ -2527,7 +2531,7 @@ if (uni.restoreGlobal) { let Url = config.HTTP_REQUEST_URL, header = config.HEADER; return new Promise((reslove, reject) => { uni.request({ - url: Url + "adminapi" + url2, + url: Url + "api" + url2, method: method || "GET", header: { ...header @@ -2579,7 +2583,5761 @@ if (uni.restoreGlobal) { ["options", "get", "post", "put", "head", "delete", "trace", "connect"].forEach((method) => { syhttp[method] = (api, data, opt) => baseRequest(api, method, data, opt || {}); }); - const companyMine = (data) => syhttp.post("/SuYuan/monitorDetail", data); + 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 landCropRecordListAPI = (data) => syhttp.get("/LandPlant/landCropRecordList", 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 _sfc_main$$ = { + 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(e) { + this.$emit("filter-change", e); + }, + /** + * 获取父元素实例 + */ + 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$$, [["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$_ = { + 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$_, [["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$Z = { + 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(e) { + let rootData = this.root.data.find((v2) => v2[this.root.rowKey] === this.keyValue); + this.checked = e.checked; + this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null); + }, + change(e) { + this.root.trChildren.forEach((item) => { + if (item === this) { + this.root.check(this, e.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$7 = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["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$Y = { + 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$4 = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["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$X = { + 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$X, [["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$W = { + __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) => { + 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$7); + const _component_uni_td = resolveEasycom(vue.resolveDynamicComponent("uni-td"), __easycom_2$4); + 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$W, [["__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 addAnimalAPI = (data) => syhttp.post("/AnimalBreed/addAnimal", data); + const actionsAPI = (data) => syhttp.get("/user/actions", data); + const animalPicListAPI = (data) => syhttp.get("/AnimalBreed/animalPicList", data); + const addAnimalPicAPI = (data) => syhttp.post("/AnimalBreed/addAnimalPic", data); + const _sfc_main$V = { + __name: "cultivation", + props: { + userInfo: Object + }, + setup(__props) { + const props2 = __props; + const userInfo = 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({ + type: 3 + }).then((res) => { + for (let key in res.data) { + actionList[key] = res.data[key]; + } + formatAppLog("log", "at components/index/cultivation.vue:250", actionList); + }); + 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: "" }, + " 农户名称: " + 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.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.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")) + }, + " 更新" + 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 + `), + 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$V, [["__scopeId", "data-v-91fd8d70"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/cultivation.vue"]]); + const _sfc_main$U = { + __name: "planting", + props: { + userInfo: Object + }, + setup(__props) { + const props2 = __props; + const userInfo = vue.reactive(props2.userInfo); + vue.reactive([{ + tit: "土地种植管理", + type: 1 + }, { + tit: "土地种植管理", + type: 0 + }, { + tit: "土地种植管理", + type: 2 + }, { + tit: "土地种植管理", + type: 1 + }, { + tit: "土地种植管理", + type: 0 + }, { + tit: "土地种植管理", + type: 2 + }, { + tit: "土地种植管理" + }, { + tit: "土地种植管理" + }, { + tit: "土地种植管理" + }, { + tit: "土地种植管理" + }]); + const navgo = (url2) => { + uni.navigateTo({ + url: url2 + }); + }; + const navgoFn = (type, id) => { + if (!type) { + navgo(`/pages/InformationAdd/index?land_id=${id}`); + } 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.createCommentVNode(` \r + 增加种植\r + `) + ]) + ]); + }; + } + }; + const planting = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-093aaff7"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/planting.vue"]]); + const _sfc_main$T = { + __name: "fishing", + props: { + userInfo: Object + }, + setup(__props) { + const props2 = __props; + const userInfo = vue.reactive(props2.userInfo); + const list = vue.reactive([{ + tit: "土地种植管理", + type: 1 + }, { + tit: "土地种植管理", + type: 0 + }, { + tit: "土地种植管理", + type: 2 + }, { + tit: "土地种植管理", + type: 1 + }, { + tit: "土地种植管理", + type: 0 + }, { + tit: "土地种植管理", + type: 2 + }, { + tit: "土地种植管理" + }, { + tit: "土地种植管理" + }, { + tit: "土地种植管理" + }, { + tit: "土地种植管理" + }]); + const navgo = (url2) => { + uni.navigateTo({ + url: url2 + }); + }; + const navgoFn = (type) => { + if (type == 0) { + navgo("/pages/InformationAdd/index"); + } + if (type == 1) { + navgo("/pages/detail/plant"); + } + 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.createElementVNode("view", { class: "card-li" }, " 土地面积: 00 "), + vue.createElementVNode("view", { class: "card-li" }, " 地址: 对话方式打开就会发生的空间和 ") + ]), + (vue.openBlock(true), vue.createElementBlock( + vue.Fragment, + null, + vue.renderList(list, (item, index2) => { + return vue.openBlock(), vue.createElementBlock("view", { + class: "card", + key: index2, + onClick: ($event) => navgoFn(item.type) + }, [ + vue.createElementVNode("view", { class: "tit card-li" }, [ + vue.createElementVNode("view", { class: "" }, " 池塘1 "), + item.type == 1 || item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", { + key: 0, + class: "", + style: { "color": "#00A15E" } + }, " 已养殖 ")) : vue.createCommentVNode("v-if", true), + item.type == 0 ? (vue.openBlock(), vue.createElementBlock("view", { + key: 1, + class: "", + style: { "color": "#00A15E" } + }, " 未养殖 ")) : vue.createCommentVNode("v-if", true) + ]), + vue.createElementVNode("view", { class: "card-li" }, [ + vue.createElementVNode("view", { class: "" }, " 面积: 10亩 ") + ]), + vue.createElementVNode("view", { class: "card-li tit" }, [ + vue.createElementVNode("view", { + class: "", + style: { "font-weight": "normal" } + }, " 养殖品种: 10亩 ") + ]), + vue.createElementVNode("view", { + class: "card-li tit", + style: { "font-weight": "normal" } + }, [ + vue.createElementVNode("view", { class: "" }, " 养殖数量: 100kg ") + ]) + ], 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 fishing = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-bdc223d1"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/fishing.vue"]]); + const animalListAPI = (data) => syhttp.get("/PoultryBreed/poultryList", data); + const animalEnvDataAPI = (data) => syhttp.get("/PoultryBreed/poultryEnvData", data); + const _sfc_main$S = { + __name: "chick", + props: { + userInfo: Object + }, + setup(__props) { + const props2 = __props; + const userInfo = 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:235", animalList); + }); + animalEnvDataAPI({ + user_id: 307 + }).then((res) => { + for (let key in res.data) { + baseData[key] = res.data[key]; + } + }); + const actionList = vue.reactive({}); + 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: "" }, + " 农户名称: " + 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.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")) + }, + " 更新" + 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$S, [["__scopeId", "data-v-c4e0dba5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/chick.vue"]]); + const _sfc_main$R = { + __name: "index", + setup(__props) { + const flag2 = vue.ref(1); + const scollChangeFn = (index2) => { + flag2.value = index2; + }; + const list = vue.reactive([]); + const userInfo = vue.reactive({}); + const initUserinfoFn = () => { + userInfoAPI({ + user_id: 307 + }).then((res) => { + for (const key in res.data) { + userInfo[key] = res.data[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$R, [["__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$Q = { + 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(e) { + this.innerFormatter = e; + }, + // 当键盘输入时,触发input事件 + onInput(e) { + let { value = "" } = e.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$6 = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["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$P = { + 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$5 = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["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$O = { + 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$5); + 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$O, [["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$N = { + 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$N, [["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$M = { + 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$4 = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["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$L = { + 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$L, [["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$K = { + 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(e) { + 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$4); + 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_2$3 = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["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$J = { + 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$J, [["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 parse2(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$I = { + 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$I, [["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$H = { + 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(e) { + this.innerFormatter = e; + }, + // month组件内部选择日期后,通过事件通知给父组件 + monthSelected(e) { + this.selected = e; + 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_2$3); + 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$2 = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["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 + }); + } + }); + } + }); + }); + }; var isVue2 = false; function set(target, key, val) { if (Array.isArray(target)) { @@ -4016,5496 +9774,59 @@ This will fail in production.`); useStore.$id = id; return useStore; } - const counterStore = defineStore("counter", { + const userInfoStore = defineStore("counter", { state: () => ({ - count: 0 + user_id: "" }), getters: {}, actions: { - increment() { - this.count++; + saveUserInfo(userInfo) { + this.user_id = userInfo; } } }); - const _sfc_main$O = { - 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(e) { - this.$emit("filter-change", e); - }, - /** - * 获取父元素实例 - */ - 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$y(_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$O, [["render", _sfc_render$y], ["__scopeId", "data-v-bf970acd"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-th/uni-th.vue"]]); - const _sfc_main$N = { - 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$x(_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$N, [["render", _sfc_render$x], ["__scopeId", "data-v-25e435b1"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-tr/table-checkbox.vue"]]); - const _sfc_main$M = { - 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(e) { - let rootData = this.root.data.find((v2) => v2[this.root.rowKey] === this.keyValue); - this.checked = e.checked; - this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null); - }, - change(e) { - this.root.trChildren.forEach((item) => { - if (item === this) { - this.root.check(this, e.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$w(_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$7 = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$w], ["__scopeId", "data-v-b48b3e32"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-tr/uni-tr.vue"]]); - const _sfc_main$L = { - 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$v(_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$1 = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$v], ["__scopeId", "data-v-edae4802"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-td/uni-td.vue"]]); - const _sfc_main$K = { - 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$u(_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$K, [["render", _sfc_render$u], ["__scopeId", "data-v-c1ea9b5d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/uni-table/components/uni-table/uni-table.vue"]]); - const _sfc_main$J = { - __name: "index", - props: { - dataList: Object, - tit: String - }, - setup(__props) { - const props2 = __props; - const tit_b = vue.ref(props2.tit); - formatAppLog("log", "at components/myTable/index.vue:37", props2, "数据"); - const dataList = vue.reactive([ - { - time: "9.10", - text: "东京核辐射的接口返回", - caozuo: "的结果是否及时赶赴" - }, - { - time: "9.10", - text: "东京核辐射的接口返回", - caozuo: "的结果是否及时赶赴" - } - ]); - 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$7); - const _component_uni_td = resolveEasycom(vue.resolveDynamicComponent("uni-td"), __easycom_2$1); - 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: "100rpx", - 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(dataList, (item, index2) => { - return vue.openBlock(), vue.createBlock( - _component_uni_tr, - null, - { - default: vue.withCtx(() => [ - vue.createVNode( - _component_uni_td, - null, - { - default: vue.withCtx(() => [ - vue.createTextVNode( - vue.toDisplayString(item.time), - 1 - /* TEXT */ - ) - ]), - _: 2 - /* DYNAMIC */ - }, - 1024 - /* DYNAMIC_SLOTS */ - ), - vue.createVNode( - _component_uni_td, - null, - { - default: vue.withCtx(() => [ - vue.createTextVNode( - vue.toDisplayString(item.text), - 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(item.caozuo), - 1 - /* TEXT */ - ) - ]), - _: 2 - /* DYNAMIC */ - }, - 1024 - /* DYNAMIC_SLOTS */ - )) - ]), - _: 2 - /* DYNAMIC */ - }, - 1024 - /* DYNAMIC_SLOTS */ - ); - }), - 256 - /* UNKEYED_FRAGMENT */ - )) - ]), - _: 1 - /* STABLE */ - }), - vue.createElementVNode("view", { class: "tit_b" }, [ - 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" - }) - ]) - ]); - }; - } - }; - const myTable = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-90822214"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/myTable/index.vue"]]); - const _sfc_main$I = { - __name: "cultivation", - setup(__props) { - const data = vue.reactive([ - { - tit: "环境温度", - icon: "TRWD", - dw: "℃", - cont: "soil_temperature", - flag: false - }, - { - tit: "环境湿度", - icon: "TRSD", - dw: "%RH", - cont: "soil_moisture" - }, - { - tit: "氧气浓度", - icon: "FX", - cont: "wind_direction" - }, - { - tit: "二氧化碳含量", - icon: "FS", - dw: "m/s", - cont: "wind_speed" - }, - { - tit: "光照强度", - icon: "JYL", - dw: "mm", - cont: "rainfall" - }, - { - tit: "大气压强", - icon: "GZ", - dw: "Wlux", - cont: "illumination" - }, - { - tit: "有害气体", - icon: "EYHT", - dw: "ppm", - cont: "carbon_dioxide_content" - } - ]); - vue.reactive([{ - cont: "气象多要素百叶箱", - cont2: "1天/1次" - }, { - cont: "多功能控制器", - cont2: "3个小时/次" - }]); - const baseData = vue.reactive({ - "id": 27, - "production_base_id": 1, - "soil_temperature": 20, - "soil_moisture": 50, - "room_temperature": 0, - "air_humidity": 0, - "air_quality_index": 0, - "pond_temperature": 0, - "pond_ph_value": 0, - "wind_direction": "北", - "wind_speed": 3.4, - "illumination": 2, - "rainfall": 20, - "carbon_dioxide_content": 450, - "nitrogen_content": 0, - "methane_content": 0, - "ammonia_nitrogen_content": 0, - "nitrite_content": 0, - "dissolved_oxygen": 0, - "temperature_threshold": 0, - "humidity_threshold": 0, - "flag": 1 - }); - const urlFn = (name) => { - return `/static/img/${name}.png`; - }; - const navgo = (url2) => { - uni.navigateTo({ - url: url2 - }); - }; - 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: "" }, " 农户名称: 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: "circumstance" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 养殖情况 "), - vue.createElementVNode("view", { class: "updata-btn" }, " 更新养殖情况 ") - ]), - (vue.openBlock(), vue.createElementBlock( - vue.Fragment, - null, - vue.renderList([1, 1, 1], (item) => { - return vue.createElementVNode("view", { class: "card" }, [ - vue.createElementVNode("view", { class: "tit" }, [ - vue.createElementVNode("view", { class: "" }, " 编号: 56565 "), - vue.createElementVNode("view", { - class: "", - style: { "color": "#00A15E" } - }, " 健康 ") - ]), - vue.createElementVNode("view", { class: "card-li" }, [ - vue.createElementVNode("view", { class: "" }, " 养殖类型: 土豆 "), - vue.createElementVNode("view", { class: "" }, " 年龄: 2年 "), - vue.createElementVNode("view", { class: "" }, " 体重: 100kg ") - ]) - ]); - }), - 64 - /* STABLE_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.createElementVNode("view", { class: "circumstance" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 饲养情况 "), - vue.createElementVNode("view", { class: "updata-btn" }, " 更新饲养情况 ") - ]), - vue.createVNode(myTable, { tit: "查看历史清点记录" }) - ]), - vue.createElementVNode("view", { class: "circumstance" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 消毒情况 "), - vue.createElementVNode("view", { class: "updata-btn" }, " 更新消毒情况 ") - ]), - vue.createVNode(myTable, { tit: "查看历史消毒记录" }) - ]), - 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$I, [["__scopeId", "data-v-91fd8d70"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/cultivation.vue"]]); - const _sfc_main$H = { - __name: "planting", - setup(__props) { - const list = vue.reactive([{ - tit: "土地种植管理", - type: 1 - }, { - tit: "土地种植管理", - type: 0 - }, { - tit: "土地种植管理", - type: 2 - }, { - tit: "土地种植管理", - type: 1 - }, { - tit: "土地种植管理", - type: 0 - }, { - tit: "土地种植管理", - type: 2 - }, { - tit: "土地种植管理" - }, { - tit: "土地种植管理" - }, { - tit: "土地种植管理" - }, { - tit: "土地种植管理" - }]); - const navgo = (url2) => { - uni.navigateTo({ - url: url2 - }); - }; - const navgoFn = (type) => { - if (type == 0) { - navgo("/pages/InformationAdd/index"); - } - if (type == 1) { - navgo("/pages/detail/plant"); - } - 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.createElementVNode("view", { class: "card-li" }, " 种养殖类型: 种植户 "), - vue.createElementVNode("view", { class: "card-li" }, " 土地面积: 00 "), - vue.createElementVNode("view", { class: "card-li" }, " 地址: 对话方式打开就会发生的空间和 ") - ]), - (vue.openBlock(true), vue.createElementBlock( - vue.Fragment, - null, - vue.renderList(list, (item, index2) => { - return vue.openBlock(), vue.createElementBlock("view", { - class: "card", - key: index2, - onClick: ($event) => navgoFn(item.type) - }, [ - vue.createElementVNode("view", { class: "tit card-li" }, [ - vue.createElementVNode("view", { class: "" }, " 土地1 "), - item.type == 1 || item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", { - key: 0, - class: "", - style: { "color": "#00A15E" } - }, " 已种植 ")) : vue.createCommentVNode("v-if", true), - item.type == 0 ? (vue.openBlock(), vue.createElementBlock("view", { - key: 1, - class: "", - style: { "color": "#00A15E" } - }, " 未种植 ")) : vue.createCommentVNode("v-if", true) - ]), - vue.createElementVNode("view", { class: "card-li" }, [ - vue.createElementVNode("view", { class: "" }, " 面积: 10亩 ") - ]), - vue.createElementVNode("view", { class: "card-li tit" }, [ - vue.createElementVNode("view", { - class: "", - style: { "font-weight": "normal" } - }, " 农作物: 10亩 "), - item.type == 2 ? (vue.openBlock(), vue.createElementBlock("view", { - key: 0, - class: "", - style: { "color": "#FF9B66" } - }, " 已成熟 ")) : vue.createCommentVNode("v-if", true) - ]), - vue.createElementVNode("view", { - class: "card-li tit", - style: { "font-weight": "normal" } - }, [ - vue.createElementVNode("view", { class: "" }, " 预计产量: 100kg "), - vue.createElementVNode("view", { class: "" }, " 已出售: 500kg ") - ]) - ], 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" }, " 增加种植 ") - ]) - ]); - }; - } - }; - const planting = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-093aaff7"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/planting.vue"]]); const _sfc_main$G = { - __name: "fishing", - setup(__props) { - const data = vue.reactive([ - { - tit: "水温", - icon: "TRWD", - dw: "℃", - cont: "soil_temperature", - flag: false - }, - { - tit: "PH值", - icon: "TRSD", - dw: "%RH", - cont: "soil_moisture" - }, - { - tit: "溶解氧", - icon: "FX", - cont: "wind_direction" - }, - { - tit: "电导率", - icon: "FS", - dw: "m/s", - cont: "wind_speed" - }, - { - tit: "TDS", - icon: "JYL", - dw: "mm", - cont: "rainfall" - } - ]); - vue.reactive([{ - cont: "气象多要素百叶箱", - cont2: "1天/1次" - }, { - cont: "多功能控制器", - cont2: "3个小时/次" - }]); - const baseData = vue.reactive({ - "id": 27, - "production_base_id": 1, - "soil_temperature": 20, - "soil_moisture": 50, - "room_temperature": 0, - "air_humidity": 0, - "air_quality_index": 0, - "pond_temperature": 0, - "pond_ph_value": 0, - "wind_direction": "北", - "wind_speed": 3.4, - "illumination": 2, - "rainfall": 20, - "carbon_dioxide_content": 450, - "nitrogen_content": 0, - "methane_content": 0, - "ammonia_nitrogen_content": 0, - "nitrite_content": 0, - "dissolved_oxygen": 0, - "temperature_threshold": 0, - "humidity_threshold": 0, - "flag": 1 - }); - const urlFn = (name) => { - return `/static/img/${name}.png`; - }; - 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: "" }, " 农户名称: 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: "card-li" }, [ - vue.createElementVNode("view", { class: "" }, " 具体种类: 20亩 ") - ]), - vue.createElementVNode("view", { class: "add-btn" }, " 添加水产养殖 ") - ]), - vue.createElementVNode("view", { class: "circumstance" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 生长密度记录 "), - vue.createElementVNode("view", { class: "updata-btn" }, " 更新生长记录 ") - ]), - vue.createVNode(myTable, { tit: "查看历史清点记录" }) - ]), - vue.createElementVNode("view", { class: "circumstance" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 饲养记录 "), - vue.createElementVNode("view", { - class: "updata-btn", - style: { "width": "300rpx" } - }, " 更新饲养记录 ") - ]), - vue.createVNode(myTable, { tit: "查看历史消毒记录" }) - ]), - 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 fishing = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-bdc223d1"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/fishing.vue"]]); - const _sfc_main$F = { - __name: "chick", - setup(__props) { - const data = vue.reactive([ - { - tit: "环境温度", - icon: "TRWD", - dw: "℃", - cont: "soil_temperature", - flag: false - }, - { - tit: "环境湿度", - icon: "TRSD", - dw: "%RH", - cont: "soil_moisture" - }, - { - tit: "氧气浓度", - icon: "FX", - cont: "wind_direction" - }, - { - tit: "二氧化碳含量", - icon: "FS", - dw: "m/s", - cont: "wind_speed" - }, - { - tit: "光照强度", - icon: "JYL", - dw: "mm", - cont: "rainfall" - }, - { - tit: "大气压强", - icon: "GZ", - dw: "Wlux", - cont: "illumination" - }, - { - tit: "有害气体", - icon: "EYHT", - dw: "ppm", - cont: "carbon_dioxide_content" - } - ]); - vue.reactive([{ - cont: "气象多要素百叶箱", - cont2: "1天/1次" - }, { - cont: "多功能控制器", - cont2: "3个小时/次" - }]); - const baseData = vue.reactive({ - "id": 27, - "production_base_id": 1, - "soil_temperature": 20, - "soil_moisture": 50, - "room_temperature": 0, - "air_humidity": 0, - "air_quality_index": 0, - "pond_temperature": 0, - "pond_ph_value": 0, - "wind_direction": "北", - "wind_speed": 3.4, - "illumination": 2, - "rainfall": 20, - "carbon_dioxide_content": 450, - "nitrogen_content": 0, - "methane_content": 0, - "ammonia_nitrogen_content": 0, - "nitrite_content": 0, - "dissolved_oxygen": 0, - "temperature_threshold": 0, - "humidity_threshold": 0, - "flag": 1 - }); - const urlFn = (name) => { - return `/static/img/${name}.png`; - }; - const navgo = (url2) => { - uni.navigateTo({ - url: url2 - }); - }; - 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: "" }, " 农户名称: 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: "circumstance" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 养殖情况 "), - vue.createElementVNode("view", { class: "updata-btn" }, " 更新养殖情况 ") - ]), - (vue.openBlock(), vue.createElementBlock( - vue.Fragment, - null, - vue.renderList([1, 1, 1], (item) => { - return vue.createElementVNode("view", { class: "card" }, [ - vue.createElementVNode("view", { class: "tit" }, [ - vue.createElementVNode("view", { class: "" }, " 编号: 56565 "), - vue.createElementVNode("view", { - class: "", - style: { "color": "#00A15E" } - }, " 健康 ") - ]), - vue.createElementVNode("view", { class: "card-li" }, [ - vue.createElementVNode("view", { class: "" }, " 养殖类型: 土豆 "), - vue.createElementVNode("view", { class: "" }, " 年龄: 2年 "), - vue.createElementVNode("view", { class: "" }, " 体重: 100kg ") - ]) - ]); - }), - 64 - /* STABLE_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.createElementVNode("view", { class: "circumstance" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 饲养记录 "), - vue.createElementVNode("view", { class: "updata-btn" }, " 更新饲养记录 ") - ]), - vue.createVNode(myTable, { tit: "查看历史清点记录" }) - ]), - vue.createElementVNode("view", { class: "circumstance" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 副产品记录 "), - vue.createElementVNode("view", { - class: "updata-btn", - style: { "width": "300rpx" } - }, " 更新副产品记录 ") - ]), - vue.createVNode(myTable, { tit: "查看历史消毒记录" }) - ]), - vue.createElementVNode("view", { class: "circumstance" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 消毒情况 "), - vue.createElementVNode("view", { class: "updata-btn" }, " 更新消毒情况 ") - ]), - vue.createVNode(myTable, { tit: "查看历史消毒记录" }) - ]), - 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$F, [["__scopeId", "data-v-c4e0dba5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/index/chick.vue"]]); - const _sfc_main$E = { - __name: "index", - setup(__props) { - const flag2 = vue.ref(1); - const scollChangeFn = (index2) => { - flag2.value = index2; - }; - const list = vue.reactive([{ - tit: "土地种植管理", - id: 1 - }, { - tit: "家畜养殖管理", - id: 2 - }, { - tit: "家禽养殖管理", - id: 3 - }, { - tit: "水产养殖管理", - id: 4 - }]); - 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 })) : vue.createCommentVNode("v-if", true), - vue.createCommentVNode(" 养猪的 "), - flag2.value == 2 ? (vue.openBlock(), vue.createBlock(cultivation, { key: 1 })) : vue.createCommentVNode("v-if", true), - vue.createCommentVNode(" 养鸡的 "), - flag2.value == 3 ? (vue.openBlock(), vue.createBlock(chick, { key: 2 })) : vue.createCommentVNode("v-if", true), - vue.createCommentVNode(" 卖鱼的首页 "), - flag2.value == 4 ? (vue.openBlock(), vue.createBlock(fishing, { key: 3 })) : vue.createCommentVNode("v-if", true) - ]); - }; - } - }; - const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/index/index.vue"]]); - const props$a = { - props: { - // 绑定的值 - modelValue: { - type: [String, Number], - default: props$e.input.value - }, - // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数 - // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序 - // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序 - // text-文本输入键盘 - type: { - type: String, - default: props$e.input.type - }, - // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true, - // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 - fixed: { - type: Boolean, - default: props$e.input.fixed - }, - // 是否禁用输入框 - disabled: { - type: Boolean, - default: props$e.input.disabled - }, - // 禁用状态时的背景色 - disabledColor: { - type: String, - default: props$e.input.disabledColor - }, - // 是否显示清除控件 - clearable: { - type: Boolean, - default: props$e.input.clearable - }, - // 是否密码类型 - password: { - type: Boolean, - default: props$e.input.password - }, - // 最大输入长度,设置为 -1 的时候不限制最大长度 - maxlength: { - type: [String, Number], - default: props$e.input.maxlength - }, - // 输入框为空时的占位符 - placeholder: { - type: String, - default: props$e.input.placeholder - }, - // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ - placeholderClass: { - type: String, - default: props$e.input.placeholderClass - }, - // 指定placeholder的样式 - placeholderStyle: { - type: [String, Object], - default: props$e.input.placeholderStyle - }, - // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效 - showWordLimit: { - type: Boolean, - default: props$e.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$e.input.confirmType - }, - // 点击键盘右下角按钮时是否保持键盘不收起,H5无效 - confirmHold: { - type: Boolean, - default: props$e.input.confirmHold - }, - // focus时,点击页面的时候不收起键盘,微信小程序有效 - holdKeyboard: { - type: Boolean, - default: props$e.input.holdKeyboard - }, - // 自动获取焦点 - // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 - focus: { - type: Boolean, - default: props$e.input.focus - }, - // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效 - autoBlur: { - type: Boolean, - default: props$e.input.autoBlur - }, - // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效 - disableDefaultPadding: { - type: Boolean, - default: props$e.input.disableDefaultPadding - }, - // 指定focus时光标的位置 - cursor: { - type: [String, Number], - default: props$e.input.cursor - }, - // 输入框聚焦时底部与键盘的距离 - cursorSpacing: { - type: [String, Number], - default: props$e.input.cursorSpacing - }, - // 光标起始位置,自动聚集时有效,需与selection-end搭配使用 - selectionStart: { - type: [String, Number], - default: props$e.input.selectionStart - }, - // 光标结束位置,自动聚集时有效,需与selection-start搭配使用 - selectionEnd: { - type: [String, Number], - default: props$e.input.selectionEnd - }, - // 键盘弹起时,是否自动上推页面 - adjustPosition: { - type: Boolean, - default: props$e.input.adjustPosition - }, - // 输入框内容对齐方式,可选值为:left|center|right - inputAlign: { - type: String, - default: props$e.input.inputAlign - }, - // 输入框字体的大小 - fontSize: { - type: [String, Number], - default: props$e.input.fontSize - }, - // 输入框字体颜色 - color: { - type: String, - default: props$e.input.color - }, - // 输入框前置图标 - prefixIcon: { - type: String, - default: props$e.input.prefixIcon - }, - // 前置图标样式,对象或字符串 - prefixIconStyle: { - type: [String, Object], - default: props$e.input.prefixIconStyle - }, - // 输入框后置图标 - suffixIcon: { - type: String, - default: props$e.input.suffixIcon - }, - // 后置图标样式,对象或字符串 - suffixIconStyle: { - type: [String, Object], - default: props$e.input.suffixIconStyle - }, - // 边框类型,surround-四周边框,bottom-底部边框,none-无边框 - border: { - type: String, - default: props$e.input.border - }, - // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 - readonly: { - type: Boolean, - default: props$e.input.readonly - }, - // 输入框形状,circle-圆形,square-方形 - shape: { - type: String, - default: props$e.input.shape - }, - // 用于处理或者过滤输入框内容的方法 - formatter: { - type: [Function, null], - default: props$e.input.formatter - }, - // 是否忽略组件内对文本合成系统事件的处理 - ignoreCompositionEvent: { - type: Boolean, - default: true - } - } - }; - const _sfc_main$D = { - name: "u-input", - mixins: [mpMixin, mixin, props$a], - 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(e) { - this.innerFormatter = e; - }, - // 当键盘输入时,触发input事件 - onInput(e) { - let { value = "" } = e.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$t(_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$6 = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$t], ["__scopeId", "data-v-5904192e"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-input/u-input.vue"]]); - const props$9 = { - props: { - // 是否显示组件 - show: { - type: Boolean, - default: props$e.loadingIcon.show - }, - // 颜色 - color: { - type: String, - default: props$e.loadingIcon.color - }, - // 提示文字颜色 - textColor: { - type: String, - default: props$e.loadingIcon.textColor - }, - // 文字和图标是否垂直排列 - vertical: { - type: Boolean, - default: props$e.loadingIcon.vertical - }, - // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 - mode: { - type: String, - default: props$e.loadingIcon.mode - }, - // 图标大小,单位默认px - size: { - type: [String, Number], - default: props$e.loadingIcon.size - }, - // 文字大小 - textSize: { - type: [String, Number], - default: props$e.loadingIcon.textSize - }, - // 文字内容 - text: { - type: [String, Number], - default: props$e.loadingIcon.text - }, - // 动画模式 - timingFunction: { - type: String, - default: props$e.loadingIcon.timingFunction - }, - // 动画执行周期时间 - duration: { - type: [String, Number], - default: props$e.loadingIcon.duration - }, - // mode=circle时的暗边颜色 - inactiveColor: { - type: String, - default: props$e.loadingIcon.inactiveColor - } - } - }; - const _sfc_main$C = { - name: "u-loading-icon", - mixins: [mpMixin, mixin, props$9], - 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$s(_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_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$s], ["__scopeId", "data-v-00752c6d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]); - const props$8 = { - props: { - // 是否细边框 - hairline: { - type: Boolean, - default: props$e.button.hairline - }, - // 按钮的预置样式,info,primary,error,warning,success - type: { - type: String, - default: props$e.button.type - }, - // 按钮尺寸,large,normal,small,mini - size: { - type: String, - default: props$e.button.size - }, - // 按钮形状,circle(两边为半圆),square(带圆角) - shape: { - type: String, - default: props$e.button.shape - }, - // 按钮是否镂空 - plain: { - type: Boolean, - default: props$e.button.plain - }, - // 是否禁止状态 - disabled: { - type: Boolean, - default: props$e.button.disabled - }, - // 是否加载中 - loading: { - type: Boolean, - default: props$e.button.loading - }, - // 加载中提示文字 - loadingText: { - type: [String, Number], - default: props$e.button.loadingText - }, - // 加载状态图标类型 - loadingMode: { - type: String, - default: props$e.button.loadingMode - }, - // 加载图标大小 - loadingSize: { - type: [String, Number], - default: props$e.button.loadingSize - }, - // 开放能力,具体请看uniapp稳定关于button组件部分说明 - // https://uniapp.dcloud.io/component/button - openType: { - type: String, - default: props$e.button.openType - }, - // 用于 组件,点击分别会触发 组件的 submit/reset 事件 - // 取值为submit(提交表单),reset(重置表单) - formType: { - type: String, - default: props$e.button.formType - }, - // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 - // 只微信小程序、QQ小程序有效 - appParameter: { - type: String, - default: props$e.button.appParameter - }, - // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效 - hoverStopPropagation: { - type: Boolean, - default: props$e.button.hoverStopPropagation - }, - // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效 - lang: { - type: String, - default: props$e.button.lang - }, - // 会话来源,open-type="contact"时有效。只微信小程序有效 - sessionFrom: { - type: String, - default: props$e.button.sessionFrom - }, - // 会话内消息卡片标题,open-type="contact"时有效 - // 默认当前标题,只微信小程序有效 - sendMessageTitle: { - type: String, - default: props$e.button.sendMessageTitle - }, - // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 - // 默认当前分享路径,只微信小程序有效 - sendMessagePath: { - type: String, - default: props$e.button.sendMessagePath - }, - // 会话内消息卡片图片,open-type="contact"时有效 - // 默认当前页面截图,只微信小程序有效 - sendMessageImg: { - type: String, - default: props$e.button.sendMessageImg - }, - // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示, - // 用户点击后可以快速发送小程序消息,open-type="contact"时有效 - showMessageCard: { - type: Boolean, - default: props$e.button.showMessageCard - }, - // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取 - dataName: { - type: String, - default: props$e.button.dataName - }, - // 节流,一定时间内只能触发一次 - throttleTime: { - type: [String, Number], - default: props$e.button.throttleTime - }, - // 按住后多久出现点击态,单位毫秒 - hoverStartTime: { - type: [String, Number], - default: props$e.button.hoverStartTime - }, - // 手指松开后点击态保留时间,单位毫秒 - hoverStayTime: { - type: [String, Number], - default: props$e.button.hoverStayTime - }, - // 按钮文字,之所以通过props传入,是因为slot传入的话 - // nvue中无法控制文字的样式 - text: { - type: [String, Number], - default: props$e.button.text - }, - // 按钮图标 - icon: { - type: String, - default: props$e.button.icon - }, - // 按钮图标 - iconColor: { - type: String, - default: props$e.button.icon - }, - // 按钮颜色,支持传入linear-gradient渐变色 - color: { - type: String, - default: props$e.button.color - } - } - }; - const _sfc_main$B = { - name: "u-button", - mixins: [mpMixin, mixin, props$8], - 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$r(_ctx, _cache, $props, $setup, $data, $options) { - const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$4); - 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$3 = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$r], ["__scopeId", "data-v-461e713c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-button/u-button.vue"]]); - const props$7 = { - props: { - // 是否显示遮罩 - show: { - type: Boolean, - default: props$e.overlay.show - }, - // 层级z-index - zIndex: { - type: [String, Number], - default: props$e.overlay.zIndex - }, - // 遮罩的过渡时间,单位为ms - duration: { - type: [String, Number], - default: props$e.overlay.duration - }, - // 不透明度值,当做rgba的第四个参数 - opacity: { - type: [String, Number], - default: props$e.overlay.opacity - } - } - }; - const _sfc_main$A = { - name: "u-overlay", - mixins: [mpMixin, mixin, props$7], - 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$q(_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$2 = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$q], ["__scopeId", "data-v-35f7c3e5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-overlay/u-overlay.vue"]]); - const props$6 = { - props: { - bgColor: { - type: String, - default: props$e.statusBar.bgColor - } - } - }; - const _sfc_main$z = { - name: "u-status-bar", - mixins: [mpMixin, mixin, props$6], - 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$p(_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$z, [["render", _sfc_render$p], ["__scopeId", "data-v-c0b45a48"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]); - const props$5 = { - props: {} - }; - const _sfc_main$y = { - name: "u-safe-bottom", - mixins: [mpMixin, mixin, props$5], - data() { - return { - safeAreaBottomHeight: 0, - isNvue: false - }; - }, - computed: { - style() { - const style = {}; - return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle)); - } - }, - mounted() { - } - }; - function _sfc_render$o(_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 = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$o], ["__scopeId", "data-v-3ec581de"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]); - const props$4 = { - props: { - // 是否展示弹窗 - show: { - type: Boolean, - default: props$e.popup.show - }, - // 是否显示遮罩 - overlay: { - type: Boolean, - default: props$e.popup.overlay - }, - // 弹出的方向,可选值为 top bottom right left center - mode: { - type: String, - default: props$e.popup.mode - }, - // 动画时长,单位ms - duration: { - type: [String, Number], - default: props$e.popup.duration - }, - // 是否显示关闭图标 - closeable: { - type: Boolean, - default: props$e.popup.closeable - }, - // 自定义遮罩的样式 - overlayStyle: { - type: [Object, String], - default: props$e.popup.overlayStyle - }, - // 点击遮罩是否关闭弹窗 - closeOnClickOverlay: { - type: Boolean, - default: props$e.popup.closeOnClickOverlay - }, - // 层级 - zIndex: { - type: [String, Number], - default: props$e.popup.zIndex - }, - // 是否为iPhoneX留出底部安全距离 - safeAreaInsetBottom: { - type: Boolean, - default: props$e.popup.safeAreaInsetBottom - }, - // 是否留出顶部安全距离(状态栏高度) - safeAreaInsetTop: { - type: Boolean, - default: props$e.popup.safeAreaInsetTop - }, - // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角 - closeIconPos: { - type: String, - default: props$e.popup.closeIconPos - }, - // 是否显示圆角 - round: { - type: [Boolean, String, Number], - default: props$e.popup.round - }, - // mode=center,也即中部弹出时,是否使用缩放模式 - zoom: { - type: Boolean, - default: props$e.popup.zoom - }, - // 弹窗背景色,设置为transparent可去除白色背景 - bgColor: { - type: String, - default: props$e.popup.bgColor - }, - // 遮罩的透明度,0-1之间 - overlayOpacity: { - type: [Number, String], - default: props$e.popup.overlayOpacity - } - } - }; - const _sfc_main$x = { - name: "u-popup", - mixins: [mpMixin, mixin, props$4], - 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(e) { - this.$emit("close"); - }, - afterEnter() { - this.$emit("open"); - }, - clickHandler() { - if (this.mode === "center") { - this.overlayClick(); - } - this.$emit("click"); - } - } - }; - function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { - const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$2); - 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); - 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$x, [["render", _sfc_render$n], ["__scopeId", "data-v-74921bef"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-popup/u-popup.vue"]]); - const _sfc_main$w = { - 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$m(_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$w, [["render", _sfc_render$m], ["__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 parse2(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$v = { - 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$e.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$l(_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$v, [["render", _sfc_render$l], ["__scopeId", "data-v-9b76ab7e"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-calendar/month.vue"]]); - const props$3 = { - props: { - // 日历顶部标题 - title: { - type: String, - default: props$e.calendar.title - }, - // 是否显示标题 - showTitle: { - type: Boolean, - default: props$e.calendar.showTitle - }, - // 是否显示副标题 - showSubtitle: { - type: Boolean, - default: props$e.calendar.showSubtitle - }, - // 日期类型选择,single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围 - mode: { - type: String, - default: props$e.calendar.mode - }, - // mode=range时,第一个日期底部的提示文字 - startText: { - type: String, - default: props$e.calendar.startText - }, - // mode=range时,最后一个日期底部的提示文字 - endText: { - type: String, - default: props$e.calendar.endText - }, - // 自定义列表 - customList: { - type: Array, - default: props$e.calendar.customList - }, - // 主题色,对底部按钮和选中日期有效 - color: { - type: String, - default: props$e.calendar.color - }, - // 最小的可选日期 - minDate: { - type: [String, Number], - default: props$e.calendar.minDate - }, - // 最大可选日期 - maxDate: { - type: [String, Number], - default: props$e.calendar.maxDate - }, - // 默认选中的日期,mode为multiple或range是必须为数组格式 - defaultDate: { - type: [Array, String, Date, null], - default: props$e.calendar.defaultDate - }, - // mode=multiple时,最多可选多少个日期 - maxCount: { - type: [String, Number], - default: props$e.calendar.maxCount - }, - // 日期行高 - rowHeight: { - type: [String, Number], - default: props$e.calendar.rowHeight - }, - // 日期格式化函数 - formatter: { - type: [Function, null], - default: props$e.calendar.formatter - }, - // 是否显示农历 - showLunar: { - type: Boolean, - default: props$e.calendar.showLunar - }, - // 是否显示月份背景色 - showMark: { - type: Boolean, - default: props$e.calendar.showMark - }, - // 确定按钮的文字 - confirmText: { - type: String, - default: props$e.calendar.confirmText - }, - // 确认按钮处于禁用状态时的文字 - confirmDisabledText: { - type: String, - default: props$e.calendar.confirmDisabledText - }, - // 是否显示日历弹窗 - show: { - type: Boolean, - default: props$e.calendar.show - }, - // 是否允许点击遮罩关闭日历 - closeOnClickOverlay: { - type: Boolean, - default: props$e.calendar.closeOnClickOverlay - }, - // 是否为只读状态,只读状态下禁止选择日期 - readonly: { - type: Boolean, - default: props$e.calendar.readonly - }, - // 是否展示确认按钮 - showConfirm: { - type: Boolean, - default: props$e.calendar.showConfirm - }, - // 日期区间最多可选天数,默认无限制,mode = range时有效 - maxRange: { - type: [Number, String], - default: props$e.calendar.maxRange - }, - // 范围选择超过最多可选天数时的提示文案,mode = range时有效 - rangePrompt: { - type: String, - default: props$e.calendar.rangePrompt - }, - // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效 - showRangePrompt: { - type: Boolean, - default: props$e.calendar.showRangePrompt - }, - // 是否允许日期范围的起止时间为同一天,mode = range时有效 - allowSameDay: { - type: Boolean, - default: props$e.calendar.allowSameDay - }, - // 圆角值 - round: { - type: [Boolean, String, Number], - default: props$e.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$u = { - name: "u-calendar", - mixins: [mpMixin, mixin, props$3], - 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(e) { - this.innerFormatter = e; - }, - // month组件内部选择日期后,通过事件通知给父组件 - monthSelected(e) { - this.selected = e; - 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$k(_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$3); - 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_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$k], ["__scopeId", "data-v-4d01889e"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-calendar/u-calendar.vue"]]); - const _sfc_main$t = { __name: "plant", setup(__props) { + const userInfo = userInfoStore(); + const uNotify = vue.ref(); + vue.ref(false); const showDatePicker = vue.ref(false); - vue.reactive({ - brand: "", - variety: "" + const formData = vue.reactive({ + user_id: userInfo.user_id, + land_id: "", + crop_name: "", + crop_variety: "", + crop_brand: "", + crop_buy_time: "", + pic: "" }); const confirm = (e) => { - formatAppLog("log", "at components/InformationAdd/plant.vue:85", e); + formatAppLog("log", "at components/InformationAdd/plant.vue:123", e[0]); + formData.crop_buy_time = e[0]; showDatePicker.value = false; }; - const navgo = (url2) => { - uni.navigateTo({ - url: url2 - }); + 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$6); - const _component_up_calendar = resolveEasycom(vue.resolveDynamicComponent("up-calendar"), __easycom_1$3); + const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); + const _component_up_calendar = resolveEasycom(vue.resolveDynamicComponent("up-calendar"), __easycom_2$2); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, @@ -9526,10 +9847,9 @@ This will fail in production.`); 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"]) + modelValue: formData.crop_name, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.crop_name = $event) + }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ @@ -9538,10 +9858,9 @@ This will fail in production.`); 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"]) + modelValue: formData.crop_variety, + "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.crop_variety = $event) + }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ @@ -9550,10 +9869,9 @@ This will fail in production.`); 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"]) + modelValue: formData.crop_brand, + "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.crop_brand = $event) + }, null, 8, ["modelValue"]) ]) ]), vue.createElementVNode("view", { class: "card-li" }, [ @@ -9562,26 +9880,66 @@ This will fail in production.`); vue.createVNode(_component_up_input, { placeholder: "点击输入时间", border: "surround", - modelValue: _ctx.value, - "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.value = $event), + 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: "confim-btn" }, " 确认 ") + 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.createElementVNode("view", { class: "up-img confim-btn" }, " +上传播种图片 "), + vue.createCommentVNode(' \r\n +上传播种图片\r\n '), vue.createElementVNode("view", { class: "today-btn confim-btn", - onClick: _cache[5] || (_cache[5] = ($event) => navgo("/pages/detail/plant")) + 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[6] || (_cache[6] = ($event) => showDatePicker.value = false) + onClose: _cache[5] || (_cache[5] = ($event) => showDatePicker.value = false) }, null, 8, ["show"]) ]) ], @@ -9591,8 +9949,8 @@ This will fail in production.`); }; } }; - const plantadd = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-0a2913e2"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/InformationAdd/plant.vue"]]); - const _sfc_main$s = { + const plantadd = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-0a2913e2"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/InformationAdd/plant.vue"]]); + const _sfc_main$F = { __name: "index", setup(__props) { return (_ctx, _cache) => { @@ -9602,8 +9960,356 @@ This will fail in production.`); }; } }; - const PagesInformationAddIndex = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-2fddea55"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/InformationAdd/index.vue"]]); - const _sfc_main$r = { + const PagesInformationAddIndex = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-2fddea55"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/InformationAdd/index.vue"]]); + const props$6 = { + 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$E = { + name: "u-line", + mixins: [mpMixin, mixin, props$6], + 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$h(_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$2 = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$h], ["__scopeId", "data-v-bbd9963c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-line/u-line.vue"]]); + const props$5 = { + 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$D = { + name: "u-modal", + mixins: [mpMixin, mixin, props$5], + 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$g(_ctx, _cache, $props, $setup, $data, $options) { + const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_0$2); + const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_1$5); + const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); + 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_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$g], ["__scopeId", "data-v-12b77a26"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-modal/u-modal.vue"]]); + const _sfc_main$C = { __name: "index", setup(__props) { const showPop = vue.ref(false); @@ -9613,9 +10319,24 @@ This will fail in production.`); const confirm = () => { showPop.value = false; }; + const navgo = (url2) => { + uni.navigateTo({ + url: url2 + }); + }; + const showModal = vue.ref(false); + const delFn = () => { + showModal.value = false; + uni.showToast({ + title: "删除成功", + icon: "success", + duration: 1e3 + }); + }; return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$6); - const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_1$4); + const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); + const _component_u_modal = resolveEasycom(vue.resolveDynamicComponent("u-modal"), __easycom_2$1); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, @@ -9645,8 +10366,14 @@ This will fail in production.`); class: "operate-li", onClick: _cache[0] || (_cache[0] = ($event) => showPop.value = true) }, " 胶水 "), - vue.createElementVNode("view", { class: "operate-li" }, " 胶水 "), - vue.createElementVNode("view", { class: "operate-li" }, " 胶水 "), + vue.createElementVNode("view", { + class: "operate-li", + onClick: _cache[1] || (_cache[1] = ($event) => navgo("")) + }, " 喂食 "), + vue.createElementVNode("view", { + class: "operate-li", + onClick: _cache[2] || (_cache[2] = ($event) => navgo("/pages/feedIng/vaccineInfo")) + }, " 注射疫苗 "), vue.createElementVNode("view", { class: "operate-li" }, " 胶水dassdd "), vue.createElementVNode("view", { class: "operate-li" }, " 胶水 "), vue.createElementVNode("view", { class: "operate-li" }, " 胶水 ") @@ -9657,7 +10384,11 @@ This will fail in production.`); vue.createElementVNode("view", { class: "fertilize-tit" }, [ vue.createElementVNode("view", { class: "" }, " 施肥 "), vue.createElementVNode("view", { class: "fertilize-tit-r" }, [ - vue.createElementVNode("view", { class: "" }, " 删除 "), + vue.createElementVNode("view", { + class: "", + style: { "color": "red" }, + onClick: _cache[3] || (_cache[3] = ($event) => showModal.value = true) + }, " 删除 "), vue.createElementVNode("view", { style: { "margin-left": "40rpx", "color": "#00A15E" } }, " 编辑 ") ]) ]), @@ -9679,8 +10410,8 @@ This will fail in production.`); show: showPop.value, round: 10, closeable: true, - onClose: _cache[3] || (_cache[3] = ($event) => showPop.value = false), - onOpen: _cache[4] || (_cache[4] = ($event) => showPop.value = true) + onClose: _cache[6] || (_cache[6] = ($event) => showPop.value = false), + onOpen: _cache[7] || (_cache[7] = ($event) => showPop.value = true) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "pop-content" }, [ @@ -9691,7 +10422,7 @@ This will fail in production.`); placeholder: "请输入品种", border: "surround", modelValue: formData.value, - "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.value = $event), + "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => formData.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), @@ -9701,7 +10432,7 @@ This will fail in production.`); placeholder: "请输入品种", border: "surround", modelValue: formData.value, - "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.value = $event), + "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => formData.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]), @@ -9714,7 +10445,17 @@ This will fail in production.`); _: 1 /* STABLE */ }, 8, ["show"]) - ]) + ]), + vue.createCommentVNode(" 组件 "), + vue.createVNode(_component_u_modal, { + show: showModal.value, + showCancelButton: true, + closeOnClickOverlay: true, + onClose: _cache[8] || (_cache[8] = ($event) => showModal.value = false), + content: "确认删除吗?", + onConfirm: delFn, + onCancel: _cache[9] || (_cache[9] = ($event) => showModal.value = false) + }, null, 8, ["show"]) ], 64 /* STABLE_FRAGMENT */ @@ -9722,444 +10463,613 @@ This will fail in production.`); }; } }; - const PagesGrowRecordIndex = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-c4917c49"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/growRecord/index.vue"]]); - const _sfc_main$q = { - components: { - myTable + const PagesGrowRecordIndex = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-c4917c49"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/growRecord/index.vue"]]); + const _sfc_main$B = { + __name: "imgCard", + props: { + imgUrl: String, + text: String }, - data() { - return { - dataList: [ - { - time: "9.10", - text: "东京核辐射的接口返回", - caozuo: "的结果是否及时赶赴" - }, - { - time: "9.10", - text: "东京核辐射的接口返回", - caozuo: "的结果是否及时赶赴" - } - ], - // title: 'Hello' - data: [ - { - tit: "土壤温度", - icon: "TRWD", - dw: "℃", - cont: "soil_temperature", - flag: false - }, - { - tit: "土壤湿度", - icon: "TRSD", - dw: "%RH", - cont: "soil_moisture" - }, - { - tit: "风向", - icon: "FX", - cont: "wind_direction" - }, - { - tit: "风速", - icon: "FS", - dw: "m/s", - cont: "wind_speed" - }, - { - tit: "降雨量", - icon: "JYL", - dw: "mm", - cont: "rainfall" - }, - { - tit: "光照", - icon: "GZ", - dw: "Wlux", - cont: "illumination" - }, - { - tit: "二氧化碳", - icon: "EYHT", - dw: "ppm", - cont: "carbon_dioxide_content" - } - ], - data2: [{ - cont: "气象多要素百叶箱", - cont2: "1天/1次" - }, { - cont: "多功能控制器", - cont2: "3个小时/次" - }], - baseData: {} + setup(__props) { + const props2 = __props; + 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.toDisplayString(props2.text), + 1 + /* TEXT */ + ) + ]) + ]); }; + } + }; + const imgCard = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-7e7d0af4"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/imgCard.vue"]]); + const _sfc_main$A = { + __name: "landInfo", + props: { + land_id: String }, - onShow() { - companyMine({ - id: 1, - flag: 1 - }).then((res) => { - this.baseData = res.data; - }); - }, - onPullDownRefresh() { + setup(__props) { + const props2 = __props; + const land = vue.reactive({}); + const objFn = (res, data) => { + for (let key in res) { + data[key] = res[key]; + } + }; setTimeout(() => { - uni.stopPullDownRefresh(); - }, 500); - }, - methods: { - navgo(url2) { + landInfoAPI({ + land_id: props2.land_id, + user_id: 307 + }).then((res) => { + objFn(res.data, land); + }); + }, 300); + 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 */ + ) + ]), + 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$A, [["__scopeId", "data-v-5f103973"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/plant/landInfo.vue"]]); + const _sfc_main$z = { + __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 landCropRecordListAPI({ + crop_id: landDeatil.crop_id + }); + 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:232", res2); + }); + }); + }; + const navgo = (url2) => { uni.navigateTo({ url: url2 }); - }, - dateFn() { + }; + 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; - }, - backFn() { - uni.navigateBack(); - }, - test() { - companyMine(); - }, - urlFn(name) { + }; + const urlFn = (name) => { return `/static/img/${name}.png`; - }, - img(w2, h2, m2) { - return `width:${w2}rpx;height:${h2};margin:0 ${m2}rpx `; - }, - navto() { - uni.navigateTo({ - url: "/pages/index2/index" + }; + const markFn = () => { + setLandCropRipeAPI({ + crop_id: landDeatil.crop_id, + crop_yield: Number(crop_yield.value) }); - } - } - }; - function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) { - const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); - const _component_myTable = vue.resolveComponent("myTable"); - return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ - vue.createElementVNode("view", { class: "head-img" }, [ - vue.createElementVNode("view", { class: "" }, [ - vue.createVNode(_component_u__image, { - src: "/static/img/GJ.jpg", - width: "693.93rpx", - height: " 394.28rpx", - alt: "" - }) - ]), - vue.createElementVNode("view", { class: "poisition" }, [ - vue.createElementVNode("view", { style: { "display": "flex" } }, [ - vue.createVNode(_component_u__image, { - src: "/static/img/dw.png", - style: { "margin": "0 5rpx" }, - width: "35.05rpx", - height: "35.05rpx" - }), - vue.createTextVNode(" 分水岭大南山北326米 ") - ]) - ]) - ]), - vue.createElementVNode("view", { class: "bad-info" }, [ - vue.createElementVNode("view", { - class: "", - style: { "display": "flex", "align-items": "center" } - }, [ - vue.createVNode(_component_u__image, { - src: $options.urlFn("sj"), - style: { "margin": "0 5rpx" }, - width: "28.04rpx", - height: "28.04rpx" - }, null, 8, ["src"]), - vue.createElementVNode( - "text", - null, - "刷新时间:" + vue.toDisplayString($options.dateFn()), - 1 - /* TEXT */ - ) - ]), - vue.createElementVNode("view", { - class: "", - onClick: _cache[0] || (_cache[0] = ($event) => $options.navgo("/pages/allPlant/index")) - }, " 查看历史条件> ") - ]), - vue.createElementVNode("view", { class: "up-plant-btn" }, " 上传新的种植情况 "), - vue.createElementVNode("view", { class: "card" }, [ - vue.createElementVNode("view", { class: "tit" }, [ - vue.createElementVNode("view", { class: "" }, " 1号土地 "), - vue.createElementVNode("view", { class: "" }, " 溯源码: 12302 ") - ]), - 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: "" }, " 播种时间: 2020.12.01 ") - ]) - ]), - vue.createCommentVNode(" 生长记录 "), - vue.createElementVNode("view", { class: "grow-record" }, [ - vue.createElementVNode("view", { class: "grow-record-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 生长记录操作 "), - vue.createElementVNode("view", { - class: "updata-btn", - onClick: _cache[1] || (_cache[1] = ($event) => $options.navgo("/pages/growRecord/index")) - }, " 更新生长记录 ") - ]), - vue.createElementVNode("view", { - class: "card", - onClick: _cache[2] || (_cache[2] = ($event) => $options.navgo("/pages/growRecord/index")) - }, [ - vue.createVNode(_component_myTable, { dataList: $data.dataList }, null, 8, ["dataList"]) - ]) - ]), - 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: "" }, " 土地监测数据 "), + }; + 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$6); + const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); + 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: "", - onClick: _cache[3] || (_cache[3] = ($event) => $options.navgo("/pages/profile/index")) - }, " 查看全部检测记录> ") + 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}`)) + }, [ + 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: $options.urlFn("sj"), - style: { "margin": "0 5rpx" }, - width: "28.04rpx", - height: "28.04rpx" - }, null, 8, ["src"]), - vue.createElementVNode( - "text", - null, - "刷新时间:" + vue.toDisplayString($options.dateFn()), - 1 - /* TEXT */ - ) - ]) - ]), - vue.createElementVNode("view", { class: "data-cont" }, [ - (vue.openBlock(true), vue.createElementBlock( - vue.Fragment, - null, - vue.renderList($data.data, (item, index2) => { - return vue.openBlock(), vue.createElementBlock("view", { - class: "data-cont-li center", - key: index2 + vue.createElementVNode("view", { + class: "up-plant-btn", + onClick: updateImgFn + }, " 上传新的种植情况 "), + vue.createVNode(landInfo, { + land_id: landDeatil.land_id + }, null, 8, ["land_id"]), + vue.createCommentVNode(" 生长记录 "), + vue.createElementVNode("view", { class: "grow-record-tit" }, [ + vue.createElementVNode("view", { class: "" }, " 生长记录操作 "), + vue.createElementVNode("view", { + class: "updata-btn", + onClick: _cache[1] || (_cache[1] = ($event) => navgo("/pages/growRecord/index")) + }, " 更新生长记录 ") + ]), + vue.createCommentVNode(` `), + vue.createVNode(myTable, { + tit: "查看历史记录", + dataList: tableDate, + route: "/pages/records/index" + }, null, 8, ["dataList"]), + 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", { style: { "margin": "0 20rpx" } }, [ - vue.createElementVNode("view", { class: "center" }, [ - vue.createCommentVNode(` `), - vue.createVNode(_component_u__image, { - src: $options.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($data.baseData[item.cont]), - 1 - /* TEXT */ - ), + 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.dw), + " " + vue.toDisplayString(item.tit), 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: $options.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) + ]), + 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) + }, " X ") + ]), + 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.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"]) ]) - ]) - ]); - }), - 128 - /* KEYED_FRAGMENT */ - )) - ]) - ]), - vue.createElementVNode("view", { - class: "ripe-btn", - onClick: _cache[4] || (_cache[4] = ($event) => $options.navgo("/pages/index/index")) - }, " 标记为成熟 ") - ]); - } - const PagesDetailPlant = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$j], ["__scopeId", "data-v-3bac3d0d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/detail/plant.vue"]]); - const _sfc_main$p = {}; - function _sfc_render$i(_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: "" }, " 1号土地 "), - vue.createElementVNode("view", { class: "" }, " 溯源码: 12302 ") - ]), - 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: "" }, " 播种时间: 2020.12.01 ") - ]) - ]), - vue.createElementVNode("view", { class: "status" }, [ - vue.createElementVNode("view", { - class: "", - style: { "margin-bottom": "30rpx" } - }, " 今日种植状态 "), - vue.createElementVNode("view", { class: "head-img" }, [ - vue.createElementVNode("view", { class: "" }, [ - vue.createVNode(_component_u__image, { - src: "/static/img/GJ.jpg", - width: "693.93rpx", - height: " 394.28rpx", - alt: "" + ]), + vue.createElementVNode("view", { + class: "ripe-btn", + onClick: markFn + }, " 确认 ") + ]) + ]), + _: 1 + /* STABLE */ + }, 8, ["show"]) + ]); + }; + } + }; + const PagesDetailPlant = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-3bac3d0d"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/detail/plant.vue"]]); + const _sfc_main$y = { + __name: "index", + setup(__props) { + const imgList = vue.reactive([]); + onLoad((options) => { + landCropPicListAPI({ + crop_id: options.crop_id + }).then((res) => { + formatAppLog("log", "at pages/allPlant/index.vue:95", res); + res.data.forEach((item) => { + imgList.push(item); + }); + formatAppLog("log", "at pages/allPlant/index.vue:99", imgList); + }); + }); + 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: "" }, " 溯源码: 12302 ") + ]), + 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: "" }, " 播种时间: 2020.12.01 ") + ]) + ]), + vue.createElementVNode("view", { class: "status" }, [ + vue.createElementVNode("view", { + class: "", + style: { "margin-bottom": "30rpx" } + }, " 今日种植状态 "), + vue.createVNode(imgCard, { + text: "地址", + imgUrl: "http://ceshi-suyuan.lihaink.cn/uploads/20231025/3048b734cff7d9adfb00aaf6ab7290e5.jpeg" }) ]), - vue.createCommentVNode(' '), - vue.createElementVNode("view", { class: "poisition" }, " 更新时间: 2023-11-16 ") - ]) - ]), - vue.createElementVNode("view", { class: "status" }, [ - vue.createElementVNode("view", { - class: "", - style: { "margin-bottom": "30rpx" } - }, " 播种图片 "), - vue.createElementVNode("view", { class: "head-img" }, [ - vue.createElementVNode("view", { class: "" }, [ - vue.createVNode(_component_u__image, { - src: "/static/img/GJ.jpg", - width: "693.93rpx", - height: " 394.28rpx", - alt: "" + vue.createElementVNode("view", { class: "status" }, [ + vue.createElementVNode("view", { + class: "", + style: { "margin-bottom": "30rpx" } + }, " 播种图片 "), + vue.createVNode(imgCard, { + text: "地址", + imgUrl: "http://ceshi-suyuan.lihaink.cn/uploads/20231025/3048b734cff7d9adfb00aaf6ab7290e5.jpeg" }) ]), - vue.createCommentVNode(' '), - vue.createElementVNode("view", { class: "poisition" }, " 更新时间: 2023-11-16 ") - ]) - ]), - vue.createElementVNode("view", { class: "status" }, [ - vue.createElementVNode("view", { - class: "", - style: { "margin-bottom": "30rpx" } - }, " 生长情况 "), - vue.createElementVNode("view", { class: "head-img" }, [ - vue.createElementVNode("view", { class: "" }, [ - vue.createVNode(_component_u__image, { - src: "/static/img/GJ.jpg", - width: "693.93rpx", - height: " 394.28rpx", - alt: "" - }) + 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.pic, + key: index2 + }, null, 8, ["imgUrl"]); + }), + 128 + /* KEYED_FRAGMENT */ + )) ]), - vue.createCommentVNode(' '), - vue.createElementVNode("view", { class: "poisition" }, " 更新时间: 2023-11-16 ") - ]), - vue.createElementVNode("view", { class: "head-img" }, [ - vue.createElementVNode("view", { class: "" }, [ - vue.createVNode(_component_u__image, { - src: "/static/img/GJ.jpg", - width: "693.93rpx", - height: " 394.28rpx", - alt: "" - }) + vue.createElementVNode("view", { class: "up-btn" }, " 上传新的种植情况 ") + ]); + }; + } + }; + const PagesAllPlantIndex = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-8f7dbbd5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/allPlant/index.vue"]]); + const _sfc_main$x = { + __name: "index", + setup(__props) { + actionsListAPI({ + type: 1 + }).then((res) => { + formatAppLog("log", "at pages/records/index.vue:67", res); + }); + const navgo = (url2) => { + uni.navigateTo({ + url: url2 + }); + }; + 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: "" }, " 溯源码: 12302 ") + ]), + 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: "" }, " 播种时间: 2020.12.01 ") + ]) ]), - vue.createCommentVNode(' '), - vue.createElementVNode("view", { class: "poisition" }, " 更新时间: 2023-11-16 ") - ]) - ]), - vue.createElementVNode("view", { class: "up-btn" }, " 上传新的种植情况 ") - ]); - } - const PagesAllPlantIndex = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$i], ["__scopeId", "data-v-8f7dbbd5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/allPlant/index.vue"]]); - const _sfc_main$o = {}; - function _sfc_render$h(_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: "" }, " 溯源码: 12302 ") - ]), - 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: "" }, " 播种时间: 2020.12.01 ") - ]) - ]), - vue.createElementVNode("view", { class: "histroy" }, [ - vue.createElementVNode("view", { - class: "tit", - style: { "margin-bottom": "40rpx" } - }, " 历史操作记录 "), - vue.createElementVNode("view", { class: "table" }) - ]), - vue.createElementVNode("view", { class: "btn" }, " 记录今日操作 ") - ]); - } - const PagesRecordsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$h], ["__scopeId", "data-v-f1512143"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/records/index.vue"]]); + 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")) + }, " 记录今日操作 ") + ]); + }; + } + }; + const PagesRecordsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-f1512143"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/records/index.vue"]]); const isObject$1 = (val) => val !== null && typeof val === "object"; const defaultDelimiters = ["{", "}"]; class BaseFormatter { @@ -10584,6 +11494,69 @@ This will fail in production.`); navigationBarTextStyle: "black" } }, + { + path: "pages/aquatic/addAquatic", + style: { + navigationBarTitleText: "添加养殖", + enablePullDownRefresh: false, + navigationBarBackgroundColor: "#F4F4F4", + navigationBarTextStyle: "black" + } + }, + { + path: "pages/aquatic/updateGrow", + 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: { @@ -13120,13 +14093,13 @@ This will fail in production.`); } }), gs(Ns), Ns.addInterceptor = D, Ns.removeInterceptor = F, Ns.interceptObject = K; })(); var Ds = Ns; - const _sfc_main$n = { + const _sfc_main$w = { name: "loading1", data() { return {}; } }; - function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$f(_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" }), @@ -13134,14 +14107,14 @@ This will fail in production.`); vue.createElementVNode("view", { class: "shape shape4" }) ]); } - const Loading1 = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$g], ["__scopeId", "data-v-0e645258"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading1.vue"]]); - const _sfc_main$m = { + const Loading1 = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$f], ["__scopeId", "data-v-0e645258"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading1.vue"]]); + const _sfc_main$v = { name: "loading2", data() { return {}; } }; - function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$e(_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" }), @@ -13149,14 +14122,14 @@ This will fail in production.`); vue.createElementVNode("view", { class: "shape shape4" }) ]); } - const Loading2 = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$f], ["__scopeId", "data-v-3df48dc2"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading2.vue"]]); - const _sfc_main$l = { + const Loading2 = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$e], ["__scopeId", "data-v-3df48dc2"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading2.vue"]]); + const _sfc_main$u = { name: "loading3", data() { return {}; } }; - function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$d(_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" }), @@ -13164,14 +14137,14 @@ This will fail in production.`); vue.createElementVNode("view", { class: "shape shape4" }) ]); } - const Loading3 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$e], ["__scopeId", "data-v-27a8293c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading3.vue"]]); - const _sfc_main$k = { + const Loading3 = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$d], ["__scopeId", "data-v-27a8293c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading3.vue"]]); + const _sfc_main$t = { name: "loading5", data() { return {}; } }; - function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$c(_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" }), @@ -13179,14 +14152,14 @@ This will fail in production.`); vue.createElementVNode("view", { class: "shape shape4" }) ]); } - const Loading4 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$d], ["__scopeId", "data-v-2e7deb83"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading4.vue"]]); - const _sfc_main$j = { + const Loading4 = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$c], ["__scopeId", "data-v-2e7deb83"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading4.vue"]]); + const _sfc_main$s = { name: "loading6", data() { return {}; } }; - function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$b(_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" }), @@ -13194,8 +14167,8 @@ This will fail in production.`); vue.createElementVNode("view", { class: "shape shape4" }) ]); } - const Loading5 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c], ["__scopeId", "data-v-ef674bbb"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading5.vue"]]); - const _sfc_main$i = { + const Loading5 = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$b], ["__scopeId", "data-v-ef674bbb"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/loading5.vue"]]); + const _sfc_main$r = { components: { Loading1, Loading2, Loading3, Loading4, Loading5 }, name: "qiun-loading", props: { @@ -13208,7 +14181,7 @@ This will fail in production.`); return {}; } }; - function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { const _component_Loading1 = vue.resolveComponent("Loading1"); const _component_Loading2 = vue.resolveComponent("Loading2"); const _component_Loading3 = vue.resolveComponent("Loading3"); @@ -13222,8 +14195,8 @@ This will fail in production.`); $props.loadingType == 5 ? (vue.openBlock(), vue.createBlock(_component_Loading5, { key: 4 })) : vue.createCommentVNode("v-if", true) ]); } - const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$b], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/qiun-loading.vue"]]); - const _sfc_main$h = { + const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$a], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-loading/qiun-loading.vue"]]); + const _sfc_main$q = { name: "qiun-error", props: { errorMessage: { @@ -13235,7 +14208,7 @@ This will fail in production.`); return {}; } }; - function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "chartsview" }, [ vue.createElementVNode("view", { class: "charts-error" }), vue.createElementVNode( @@ -13247,7 +14220,7 @@ This will fail in production.`); ) ]); } - const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$a], ["__scopeId", "data-v-a99d579b"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/uni_modules/qiun-data-charts/components/qiun-error/qiun-error.vue"]]); + const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$9], ["__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(); @@ -14263,7 +15236,7 @@ This will fail in production.`); var currentdate = year + seperator + month + seperator + strDate; return currentdate; } - const _sfc_main$g = { + const _sfc_main$p = { name: "qiun-data-charts", mixins: [Ds.mixinDatacom], props: { @@ -14969,9 +15942,9 @@ This will fail in production.`); } } }; - function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { const _component_qiun_loading = resolveEasycom(vue.resolveDynamicComponent("qiun-loading"), __easycom_0$1); - const _component_qiun_error = resolveEasycom(vue.resolveDynamicComponent("qiun-error"), __easycom_1$2); + const _component_qiun_error = resolveEasycom(vue.resolveDynamicComponent("qiun-error"), __easycom_1$3); return vue.openBlock(), vue.createElementBlock("view", { class: "chartsview", id: "ChartBoxId" + $data.cid @@ -15027,9 +16000,9 @@ This will fail in production.`); ], 8, ["id"]); } if (typeof block0$1 === "function") - block0$1(_sfc_main$g); - const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$9], ["__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$f = { + block0$1(_sfc_main$p); + const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$8], ["__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$o = { data() { return { leftNum: 10, @@ -15134,7 +16107,7 @@ This will fail in production.`); id: 1, flag: 1 }).then((res) => { - formatAppLog("log", "at pages/profile/index.vue:162", res.data); + formatAppLog("log", "at pages/profile/index.vue:158", res.data); }); }, methods: { @@ -15142,17 +16115,6 @@ This will fail in production.`); let datas = []; this.leftNum = num; if (num == 10) { - datas = [ - [20, 23, 25, 19, 23, 24], - [30, 25, 27, 28, 24, 25], - [40, 41, 32, 30, 32, 30], - [20, 23, 25, 19, 23, 24], - [100, 79, 89, 93, 98, 82], - [18, 20, 25, 26, 30, 31], - ["12:00", "13:00", "14:00", "15:00", "16:00", "17:00"], - ["12:00", "13:00", "14:00", "15:00", "16:00", "17:00"] - ]; - } else if (num == 160.7) { datas = [ [25, 22, 24, 19, 21, 22], [38, 27, 21, 30, 32, 24], @@ -15163,7 +16125,7 @@ This will fail in production.`); ["10-12", "10-13", "10-14", "10-15", "10-16", "10-17"], ["10-12", "10-13", "10-14", "10-15", "10-16", "10-17"] ]; - } else if (num == 311.4) { + } else if (num == 160.7) { datas = [ [29, 32, 38, 31, 23, 24], [36, 34, 30, 29, 27, 27], @@ -15233,9 +16195,9 @@ This will fail in production.`); } } }; - function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$7(_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); + const _component_qiun_data_charts = resolveEasycom(vue.resolveDynamicComponent("qiun-data-charts"), __easycom_1$2); return vue.openBlock(), vue.createElementBlock("view", { class: "", style: { "padding": "30rpx" } @@ -15250,14 +16212,10 @@ This will fail in production.`); 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: "subsection-li sct", - onClick: _cache[2] || (_cache[2] = ($event) => $options.changeDate(311.4)) }, " 月 "), vue.createElementVNode( "view", @@ -15272,7 +16230,7 @@ This will fail in production.`); ]), vue.createElementVNode("view", { class: "set", - onClick: _cache[3] || (_cache[3] = (...args) => $options.navgo && $options.navgo(...args)) + onClick: _cache[2] || (_cache[2] = (...args) => $options.navgo && $options.navgo(...args)) }, [ vue.createElementVNode("view", { class: "", @@ -15307,132 +16265,132 @@ This will fail in production.`); ]) ]); } - const PagesProfileIndex = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$8], ["__scopeId", "data-v-201c0da5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/profile/index.vue"]]); - const props$2 = { + const PagesProfileIndex = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$7], ["__scopeId", "data-v-201c0da5"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/profile/index.vue"]]); + const props$4 = { props: { // 搜索框形状,round-圆形,square-方形 shape: { type: String, - default: props$e.search.shape + default: props$i.search.shape }, // 搜索框背景色,默认值#f2f2f2 bgColor: { type: String, - default: props$e.search.bgColor + default: props$i.search.bgColor }, // 占位提示文字 placeholder: { type: String, - default: props$e.search.placeholder + default: props$i.search.placeholder }, // 是否启用清除控件 clearabled: { type: Boolean, - default: props$e.search.clearabled + default: props$i.search.clearabled }, // 是否自动聚焦 focus: { type: Boolean, - default: props$e.search.focus + default: props$i.search.focus }, // 是否在搜索框右侧显示取消按钮 showAction: { type: Boolean, - default: props$e.search.showAction + default: props$i.search.showAction }, // 右边控件的样式 actionStyle: { type: Object, - default: props$e.search.actionStyle + default: props$i.search.actionStyle }, // 取消按钮文字 actionText: { type: String, - default: props$e.search.actionText + default: props$i.search.actionText }, // 输入框内容对齐方式,可选值为 left|center|right inputAlign: { type: String, - default: props$e.search.inputAlign + default: props$i.search.inputAlign }, // input输入框的样式,可以定义文字颜色,大小等,对象形式 inputStyle: { type: Object, - default: props$e.search.inputStyle + default: props$i.search.inputStyle }, // 是否启用输入框 disabled: { type: Boolean, - default: props$e.search.disabled + default: props$i.search.disabled }, // 边框颜色 borderColor: { type: String, - default: props$e.search.borderColor + default: props$i.search.borderColor }, // 搜索图标的颜色,默认同输入框字体颜色 searchIconColor: { type: String, - default: props$e.search.searchIconColor + default: props$i.search.searchIconColor }, // 输入框字体颜色 color: { type: String, - default: props$e.search.color + default: props$i.search.color }, // placeholder的颜色 placeholderColor: { type: String, - default: props$e.search.placeholderColor + default: props$i.search.placeholderColor }, // 左边输入框的图标,可以为uView图标名称或图片路径 searchIcon: { type: String, - default: props$e.search.searchIcon + default: props$i.search.searchIcon }, searchIconSize: { type: [Number, String], - default: props$e.search.searchIconSize + default: props$i.search.searchIconSize }, // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法 margin: { type: String, - default: props$e.search.margin + default: props$i.search.margin }, // 开启showAction时,是否在input获取焦点时才显示 animation: { type: Boolean, - default: props$e.search.animation + default: props$i.search.animation }, // 输入框的初始化内容 modelValue: { type: String, - default: props$e.search.value + default: props$i.search.value }, value: { type: String, - default: props$e.search.value + default: props$i.search.value }, // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档) maxlength: { type: [String, Number], - default: props$e.search.maxlength + default: props$i.search.maxlength }, // 搜索框高度,单位px height: { type: [String, Number], - default: props$e.search.height + default: props$i.search.height }, // 搜索框左侧文本 label: { type: [String, Number, null], - default: props$e.search.label + default: props$i.search.label } } }; - const _sfc_main$e = { + const _sfc_main$n = { name: "u-search", - mixins: [mpMixin, mixin, props$2], + mixins: [mpMixin, mixin, props$4], data() { return { keyword: "", @@ -15522,7 +16480,7 @@ This will fail in production.`); } } }; - function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_icon = resolveEasycom(vue.resolveDynamicComponent("u-icon"), __easycom_0$7); return vue.openBlock(), vue.createElementBlock( "view", @@ -15616,8 +16574,8 @@ This will fail in production.`); /* STYLE */ ); } - const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$7], ["__scopeId", "data-v-ed789780"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-search/u-search.vue"]]); - const _sfc_main$d = { + const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$6], ["__scopeId", "data-v-ed789780"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-search/u-search.vue"]]); + const _sfc_main$m = { __name: "feedList", setup(__props) { const navgo = (url2) => { @@ -15625,13 +16583,30 @@ This will fail in production.`); url: url2 }); }; - const list = vue.reactive([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); - const dataList = vue.reactive(list.splice(0, 3)); - const showMoreFn = () => { + 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_0); - const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); + const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_1$1); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ @@ -15657,88 +16632,94 @@ This will fail in production.`); 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 - }), - vue.createElementVNode("view", { class: "serch-btn" }, " 搜索 ") + }, null, 8, ["modelValue"]), + vue.createElementVNode("view", { + class: "serch-btn", + onClick: queryFn + }, " 搜索 ") ]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, - vue.renderList(dataList, (item, index2) => { + vue.renderList(animalList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "card", - onClick: _cache[0] || (_cache[0] = ($event) => navgo("/pages/feedIng/feedDetail")), - key: index2 + key: index2, + onClick: _cache[1] || (_cache[1] = ($event) => navgo("/pages/feedIng/feedDetail")) }, [ vue.createElementVNode("view", { class: "tit" }, [ - vue.createElementVNode("view", { class: "" }, " 编号: 12378 "), - (vue.openBlock(), vue.createElementBlock("view", { + 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), - vue.createCommentVNode("v-if", true), - vue.createCommentVNode("v-if", true) + }, " 健康 ")) : 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.createElementVNode("view", { class: "" }, " 年龄: 7月 "), - vue.createElementVNode("view", { class: "" }, " 体重: 70kg ") + 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 */ + ) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), - vue.withDirectives(vue.createElementVNode( - "view", - { - class: "showmore", - onClick: showMoreFn - }, - [ - vue.createTextVNode(" 展开更多"), - vue.createVNode(_component_u__image, { - src: "/static/img/XLJT.png", - style: { "margin-left": "5rpx" }, - width: "31.54rpx", - height: "31.54rpx" - }) - ], - 512 - /* NEED_PATCH */ - ), [ - [vue.vShow, dataList.length < 4] - ]), - vue.createElementVNode("view", { class: "ripe-btn" }, " 添加新动物 ") + vue.createElementVNode("view", { + class: "ripe-btn", + onClick: _cache[2] || (_cache[2] = ($event) => navgo("/pages/feedIng/addPoultry")) + }, " 添加新动物 ") ]); }; } }; - const PagesFeedIngFeedList = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-369a728b"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/feedList.vue"]]); - const _sfc_main$c = {}; - function _sfc_render$6(_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: "/static/img/GJ.jpg", - width: "693.93rpx", - height: " 394.28rpx", - alt: "" - }) - ]), - vue.createElementVNode("view", { class: "poisition" }, " 更新时间: 2023-11-16 ") - ]) - ]); - } - const imgCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$6], ["__scopeId", "data-v-7e7d0af4"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/imgCard.vue"]]); - const _sfc_main$b = { + const PagesFeedIngFeedList = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-369a728b"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/feedList.vue"]]); + const _sfc_main$l = { __name: "feedDetail", setup(__props) { const selectList = vue.reactive([ @@ -15757,15 +16738,25 @@ This will fail in production.`); indexs.value = index2; value.value = selectList[index2]; }; + const animal_id = vue.ref(""); + onLoad((options) => { + animal_id.value = options.id; + formatAppLog("log", "at pages/feedIng/feedDetail.vue:147", animal_id.value, 6666); + }); + const navgo = (url2) => { + uni.navigateTo({ + url: url2 + }); + }; return (_ctx, _cache) => { - const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_0); - const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$6); + const _component_u_search = resolveEasycom(vue.resolveDynamicComponent("u-search"), __easycom_1$1); const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); + const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$6); return vue.openBlock(), vue.createElementBlock( "view", { class: "content", - onClickCapture: _cache[3] || (_cache[3] = ($event) => selectAct.value = false) + onClickCapture: _cache[4] || (_cache[4] = ($event) => selectAct.value = false) }, [ vue.createElementVNode("view", { class: "card" }, [ @@ -15801,7 +16792,18 @@ This will fail in production.`); ]), vue.createElementVNode("view", { class: "title" }, [ vue.createElementVNode("view", { class: "" }, " 编号: 13645 "), - vue.createElementVNode("view", { class: "" }, " 查看养殖详情> ") + vue.createElementVNode("view", { + class: "more-jt", + onClick: _cache[0] || (_cache[0] = ($event) => navgo(`/pages/feedIng/histroyFeed?id=${animal_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" }, [ @@ -15816,7 +16818,7 @@ This will fail in production.`); placeholder: "请输入内容", border: "surround", modelValue: value.value, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event), + "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event), onChange: _ctx.change }, null, 8, ["modelValue", "onChange"]) ]) @@ -15834,9 +16836,9 @@ This will fail in production.`); placeholder: "请选择", border: "surround", onClickCapture: selectFoucsFn, - onBlur: _cache[1] || (_cache[1] = ($event) => selectAct.value = false), + onBlur: _cache[2] || (_cache[2] = ($event) => selectAct.value = false), modelValue: value.value, - "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event) + "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => value.value = $event) }, null, 8, ["modelValue"]), vue.createElementVNode( "view", @@ -15907,7 +16909,10 @@ This will fail in production.`); vue.createElementVNode("view", { class: "" }, " 饲养记录 "), vue.createElementVNode("view", { class: "updata-btn" }, " 更新生长记录 ") ]), - vue.createVNode(myTable, { tit: "查看历史饲养记录" }), + vue.createVNode(myTable, { + tit: "查看历史饲养记录", + route: "/pages/feedIng/allFeed" + }), vue.createElementVNode("view", { class: "ripe-btn" }, " 标记状态为出栏 ") ], 32 @@ -15916,10 +16921,32 @@ This will fail in production.`); }; } }; - const PagesFeedIngFeedDetail = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-693c046c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/feedDetail.vue"]]); - const _sfc_main$a = { + const PagesFeedIngFeedDetail = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-693c046c"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/feedDetail.vue"]]); + const _sfc_main$k = { __name: "histroyFeed", setup(__props) { + const updateImgFn = () => { + uplodeImg().then((res) => { + addAnimalPicAPI({ + animal_id: Number(animal_id.value), + pic: res.data.image + }).then((res2) => { + formatAppLog("log", "at pages/feedIng/histroyFeed.vue:82", res2); + }); + }); + }; + const imgList = vue.reactive([]); + const animal_id = vue.ref(""); + onLoad((option) => { + animal_id.value = option.id; + animalPicListAPI({ + animal_id: option.id + }).then((res) => { + res.data.forEach((item) => { + imgList.push(item); + }); + }); + }); return (_ctx, _cache) => { const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ @@ -15961,16 +16988,29 @@ This will fail in production.`); vue.createElementVNode("view", { class: "" }, " 今日养殖状态 "), vue.createVNode(imgCard), vue.createElementVNode("view", { class: "" }, " 养殖情况 "), - vue.createVNode(imgCard), - vue.createVNode(imgCard) + (vue.openBlock(true), vue.createElementBlock( + vue.Fragment, + null, + vue.renderList(imgList, (item, index2) => { + return vue.openBlock(), vue.createBlock(imgCard, { + imgUrl: item.pic, + key: index2 + }, null, 8, ["imgUrl"]); + }), + 128 + /* KEYED_FRAGMENT */ + )) ]), - vue.createElementVNode("view", { class: "up-plant-btn" }, " 上传新的种植情况 ") + vue.createElementVNode("view", { + class: "up-plant-btn", + onClick: updateImgFn + }, " 上传新的种植情况 ") ]); }; } }; - const PagesFeedIngHistroyFeed = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-7de95975"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/histroyFeed.vue"]]); - const _sfc_main$9 = { + const PagesFeedIngHistroyFeed = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-7de95975"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/histroyFeed.vue"]]); + const _sfc_main$j = { __name: "updateFeed", setup(__props) { const showPop = vue.ref(false); @@ -15979,7 +17019,7 @@ This will fail in production.`); }); return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$6); - const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_1$4); + const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "card" }, [ vue.createElementVNode("view", { class: "tit" }, [ @@ -16128,7 +17168,7 @@ This will fail in production.`); }; } }; - const PagesFeedIngUpdateFeed = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-d1a9a218"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/updateFeed.vue"]]); + const PagesFeedIngUpdateFeed = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-d1a9a218"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/updateFeed.vue"]]); const MIN_DISTANCE = 10; function getDirection(x2, y2) { if (x2 > y2 && x2 > MIN_DISTANCE) { @@ -16188,32 +17228,32 @@ This will fail in production.`); } } }; - const props$1 = { + const props$3 = { props: { // 控制打开或者关闭 show: { type: Boolean, - default: props$e.swipeActionItem.show + default: props$i.swipeActionItem.show }, // 标识符,如果是v-for,可用index索引值 name: { type: [String, Number], - default: props$e.swipeActionItem.name + default: props$i.swipeActionItem.name }, // 是否禁用 disabled: { type: Boolean, - default: props$e.swipeActionItem.disabled + default: props$i.swipeActionItem.disabled }, // 是否自动关闭其他swipe按钮组 autoClose: { type: Boolean, - default: props$e.swipeActionItem.autoClose + default: props$i.swipeActionItem.autoClose }, // 滑动距离阈值,只有大于此值,才被认为是要打开菜单 threshold: { type: Number, - default: props$e.swipeActionItem.threshold + default: props$i.swipeActionItem.threshold }, // 右侧按钮内容 options: { @@ -16225,7 +17265,7 @@ This will fail in production.`); // 动画过渡时间,单位ms duration: { type: [String, Number], - default: props$e.swipeActionItem.duration + default: props$i.swipeActionItem.duration } } }; @@ -16247,11 +17287,11 @@ This will fail in production.`); (Comp.$wxs || (Comp.$wxs = [])).push("wxs"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "229ea0d2"; }; - const _sfc_main$8 = { + const _sfc_main$i = { name: "u-swipe-action-item", emits: ["click"], - mixins: [mpMixin, mixin, props$1, touch], - mixins: [mpMixin, mixin, props$1, touch, wxs], + mixins: [mpMixin, mixin, props$3, touch], + mixins: [mpMixin, mixin, props$3, touch, wxs], data() { return { // 按钮的尺寸信息 @@ -16398,20 +17438,20 @@ This will fail in production.`); ); } if (typeof block0 === "function") - block0(_sfc_main$8); - const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$5], ["__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 = { + block0(_sfc_main$i); + const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$5], ["__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$2 = { props: { // 是否自动关闭其他swipe按钮组 autoClose: { type: Boolean, - default: props$e.swipeAction.autoClose + default: props$i.swipeAction.autoClose } } }; - const _sfc_main$7 = { + const _sfc_main$h = { name: "u-swipe-action", - mixins: [mpMixin, mixin, props], + mixins: [mpMixin, mixin, props$2], data() { return {}; }, @@ -16458,17 +17498,66 @@ This will fail in production.`); vue.renderSlot(_ctx.$slots, "default") ]); } - const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$4], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]); - const _sfc_main$6 = { + const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$4], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]); + const _sfc_main$g = { __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: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/feedIng/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/feedIng/vaccineInfo.vue:139", "uploadImage fail", err); + uni.hideLoading(); + uni.showModal({ + content: err.errMsg, + showCancel: false + }); + } + } + }); + }, + fail: (err) => { + formatAppLog("log", "at pages/feedIng/vaccineInfo.vue:150", "chooseImage fail", err); + } + }); + }; return (_ctx, _cache) => { const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$6); - const _component_u_swipe_action_item = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action-item"), __easycom_1); - const _component_u_swipe_action = resolveEasycom(vue.resolveDynamicComponent("u-swipe-action"), __easycom_2); + 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" }, [ @@ -16510,7 +17599,19 @@ This will fail in production.`); ]), vue.createElementVNode("view", { class: "card-li" }, [ vue.createElementVNode("view", { class: "card-li-tit" }, " 疫苗条形码 "), - vue.createElementVNode("view", { class: "code-img" }) + 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" }, " 注射对象 "), @@ -16567,195 +17668,2109 @@ This will fail in production.`); }; } }; - const PagesFeedIngVaccineInfo = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-b7c58360"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/vaccineInfo.vue"]]); - const _sfc_main$5 = {}; - function _sfc_render$3(_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$6); - return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ - vue.createElementVNode("view", { class: "card" }, [ - vue.createElementVNode("view", { class: "card-tit" }, [ - vue.createElementVNode("view", { class: "" }, " 编号: 13254 "), - vue.createElementVNode("view", { - class: "", - style: { "color": "green" } - }, " 健康 ") - ]), - vue.createElementVNode("view", { class: "card-cont" }, [ - vue.createElementVNode("view", { class: "card-l" }, [ - vue.createElementVNode("view", { class: "" }, " 养殖品种: 黑山🐖 "), - vue.createElementVNode("view", { class: "" }, " 养殖类型: 黑山🐖 "), - vue.createElementVNode("view", { class: "" }, " 年龄: 黑山🐖 "), - vue.createElementVNode("view", { class: "" }, " 体重: 黑山🐖 ") - ]), - vue.createElementVNode("view", { class: "card-r" }, [ - vue.createVNode(_component_u__image, { - src: "/static/img/GJ.jpg", - width: "353.97rpx", - height: "210.28rpx", - alt: "" - }) - ]) - ]) - ]), - 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: "" }, [ - vue.createVNode(_component_up_input, { - placeholder: "请输入品种", - border: "surround", - modelValue: _ctx.value, - "onUpdate:modelValue": _cache[3] || (_cache[3] = ($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[4] || (_cache[4] = ($event) => _ctx.value = $event), - onChange: _ctx.change - }, null, 8, ["modelValue", "onChange"]) - ]) - ]), - vue.createElementVNode("view", { class: "uplode" }) - ]), - vue.createElementVNode("view", { class: "next-btn" }, " 下一个 "), - vue.createElementVNode("view", { class: "ripe-btn" }, " 完成添加 ") - ]); - } - const PagesFeedIngAddPoultry = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$3], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/addPoultry.vue"]]); - const _sfc_main$4 = {}; - function _sfc_render$2(_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.createTextVNode(" 历史养殖状态 "), - vue.createElementVNode("view", { class: "table" }) - ]) - ]); - } - const PagesFeedIngAllFeed = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$2], ["__scopeId", "data-v-394b45fc"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/allFeed.vue"]]); - const _sfc_main$3 = {}; - function _sfc_render$1(_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: "" }, " 饲养记录 "), - vue.createElementVNode("view", { class: "table" }) - ]); - } - const PagesFeedIngAllRecording = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$1], ["__scopeId", "data-v-b5c84cbe"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/allRecording.vue"]]); - const _sfc_main$2 = { - __name: "index", + const PagesFeedIngVaccineInfo = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-b7c58360"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/vaccineInfo.vue"]]); + const _sfc_main$f = { + __name: "addPoultry", setup(__props) { - const counter = counterStore(); + 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 = (e) => { + selectAct.value = true; + selectAct1.value = false; + }; + const selectFoucsFn1 = (e) => { + 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$6); + 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$f, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/addPoultry.vue"]]); + const _sfc_main$e = { + __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$e, [["__scopeId", "data-v-394b45fc"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/allFeed.vue"]]); + const _sfc_main$d = { + __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 PagesFeedIngAllRecording = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-b5c84cbe"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/feedIng/allRecording.vue"]]); + const _sfc_main$c = { + __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$6); + const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); return vue.openBlock(), vue.createElementBlock( "view", - null, - vue.toDisplayString(vue.unref(counter).count), - 1 - /* TEXT */ + { + 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 PagesTestIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/test/index.vue"]]); + const PagesAquaticAddAquatic = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/aquatic/addAquatic.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$6); + 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: "detail", + setup(__props) { + const data = vue.reactive([ + { + tit: "水温", + icon: "TRWD", + dw: "℃", + cont: "soil_temperature", + flag: false + }, + { + tit: "PH值", + icon: "TRSD", + dw: "%RH", + cont: "soil_moisture" + }, + { + tit: "溶解氧", + icon: "FX", + cont: "wind_direction" + }, + { + tit: "电导率", + icon: "FS", + dw: "m/s", + cont: "wind_speed" + }, + { + tit: "TDS", + icon: "JYL", + dw: "mm", + cont: "rainfall" + } + ]); + vue.reactive([{ + cont: "气象多要素百叶箱", + cont2: "1天/1次" + }, { + cont: "多功能控制器", + cont2: "3个小时/次" + }]); + const baseData = vue.reactive({ + "id": 27, + "production_base_id": 1, + "soil_temperature": 20, + "soil_moisture": 50, + "room_temperature": 0, + "air_humidity": 0, + "air_quality_index": 0, + "pond_temperature": 0, + "pond_ph_value": 0, + "wind_direction": "北", + "wind_speed": 3.4, + "illumination": 2, + "rainfall": 20, + "carbon_dioxide_content": 450, + "nitrogen_content": 0, + "methane_content": 0, + "ammonia_nitrogen_content": 0, + "nitrite_content": 0, + "dissolved_oxygen": 0, + "temperature_threshold": 0, + "humidity_threshold": 0, + "flag": 1 + }); + 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; + }; + return (_ctx, _cache) => { + const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6); + return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ + vue.createVNode(imgCard), + 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")) + }, [ + 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: _cache[1] || (_cache[1] = (...args) => _ctx.updateImgFn && _ctx.updateImgFn(...args)) + }, " 上传新的种植情况 "), + 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: "card-li" }, [ + vue.createElementVNode("view", { class: "" }, " 具体种类: 20亩 ") + ]), + vue.createElementVNode("view", { + class: "add-btn", + onClick: _cache[2] || (_cache[2] = ($event) => navgo("/pages/aquatic/addAquatic")) + }, " 添加水产养殖 ") + ]), + vue.createElementVNode("view", { class: "circumstance" }, [ + vue.createElementVNode("view", { class: "card-tit" }, [ + vue.createElementVNode("view", { class: "" }, " 生长密度记录 "), + vue.createElementVNode("view", { + class: "updata-btn", + onClick: _cache[3] || (_cache[3] = ($event) => navgo("/pages/aquatic/updateGrow")) + }, " 更新生长记录 ") + ]), + vue.createVNode(myTable, { + tit: "查看历史清点记录", + route: "/pages/feedIng/allRecording" + }) + ]), + vue.createElementVNode("view", { class: "circumstance" }, [ + vue.createElementVNode("view", { class: "card-tit" }, [ + vue.createElementVNode("view", { class: "" }, " 饲养记录 "), + vue.createElementVNode("view", { + class: "updata-btn", + style: { "width": "300rpx" }, + onClick: _cache[4] || (_cache[4] = ($event) => navgo("/pages/growRecord/index")) + }, " 更新饲养记录 ") + ]), + vue.createVNode(myTable, { + tit: "查看历史消毒记录", + route: "/pages/feedIng/allRecording" + }) + ]), + 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 PagesAquaticDetail = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-cd3205a6"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/aquatic/detail.vue"]]); + const _sfc_main$9 = { + __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$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$9, [["__scopeId", "data-v-7b328f77"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/supervision/group.vue"]]); + const props$1 = { + 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$8 = { + name: "u-toolbar", + mixins: [mpMixin, mixin, props$1], + emits: ["confirm", "cancel"], + methods: { + // 点击取消按钮 + cancel() { + this.$emit("cancel"); + }, + // 点击确定按钮 + confirm() { + this.$emit("confirm"); + } + } + }; + function _sfc_render$3(_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 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$3], ["__scopeId", "data-v-3fd495d6"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]); + const props = { + 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$7 = { + name: "u-picker", + mixins: [mpMixin, mixin, props], + 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(e) { + const { + value + } = e.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$2(_ctx, _cache, $props, $setup, $data, $options) { + const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0); + const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_1$5); + const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2$3); + 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 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$2], ["__scopeId", "data-v-1500ce68"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/node_modules/uview-plus/components/u-picker/u-picker.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 = (e) => { + query.value = e.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); + 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 = (e) => { + 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$6); + 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 "); @@ -16776,18 +19791,26 @@ This will fail in production.`); __definePage("pages/feedIng/addPoultry", PagesFeedIngAddPoultry); __definePage("pages/feedIng/allFeed", PagesFeedIngAllFeed); __definePage("pages/feedIng/allRecording", PagesFeedIngAllRecording); + __definePage("pages/aquatic/addAquatic", PagesAquaticAddAquatic); + __definePage("pages/aquatic/updateGrow", PagesAquaticUpdateGrow); + __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() { - formatAppLog("log", "at App.vue:4", "App Launch"); + const userInfo = userInfoStore(); + userInfo.saveUserInfo(307); uni.setStorageSync("SY_TOKEN", "dfdf4564557445df4df"); }, onShow: function() { - formatAppLog("log", "at App.vue:8", "App Show"); + formatAppLog("log", "at App.vue:13", "App Show"); }, onHide: function() { - formatAppLog("log", "at App.vue:11", "App Hide"); + formatAppLog("log", "at App.vue:16", "App Hide"); } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/zmj/uniapp/TraceabilityAPP/App.vue"]]); @@ -18352,7 +21375,7 @@ This will fail in production.`); throttle, mixin, mpMixin, - props: props$e, + props: props$i, ...index, color: color$2, platform: platform$1 diff --git a/unpackage/dist/dev/app-plus/app.css b/unpackage/dist/dev/app-plus/app.css index 89076b5..be759a4 100644 --- a/unpackage/dist/dev/app-plus/app.css +++ b/unpackage/dist/dev/app-plus/app.css @@ -3106,4 +3106,8 @@ background-color: #F4F4F4; min-height: 100vh; } +.more-jt { + display: flex; + align-items: center; +} /*每个页面公共css */ \ No newline at end of file diff --git a/unpackage/dist/dev/app-plus/pages/index/index.css b/unpackage/dist/dev/app-plus/pages/index/index.css index 1d2ce9a..2369212 100644 --- a/unpackage/dist/dev/app-plus/pages/index/index.css +++ b/unpackage/dist/dev/app-plus/pages/index/index.css @@ -742,7 +742,7 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat } .circumstance .updata-btn[data-v-91fd8d70] { font-size: 0.82156rem; - width: 6.02375rem; + padding: 0 0.9375rem; height: 1.80719rem; border: 1px solid #00A15E; color: #00A15E; @@ -852,13 +852,9 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat margin: auto; background-color: #fff; box-sizing: border-box; - padding: 0.625rem; border-radius: 0.65719rem 0.65719rem 0.65719rem 0.65719rem; margin-bottom: 1.25rem; } -.content .card .card-li[data-v-093aaff7] { - margin-bottom: 0.53125rem; -} .content .card .tit[data-v-093aaff7] { display: flex; font-size: 1.04031rem; @@ -917,95 +913,64 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat /* 垂直间距 */ /* 透明度 */ /* 文章场景相关 */ -.circumstance[data-v-bdc223d1] { +.content[data-v-bdc223d1] { + min-height: 90vh; + position: relative; + background-color: #EAF2EF; + padding: 0; +} +.content .border-bgc[data-v-bdc223d1] { + height: 6.25rem; + background-color: #34D190; + border-radius: 0 0 1.25rem 1.25rem; + position: absolute; + width: 23.4375rem; +} +.content .card[data-v-bdc223d1] { + position: relative; width: 21.68531rem; - margin: 0 auto; - margin-bottom: 1.34375rem; -} -.circumstance .card-tit[data-v-bdc223d1] { - display: flex; - justify-content: space-between; - margin-bottom: 0.875rem; -} -.circumstance .updata-btn[data-v-bdc223d1] { - font-size: 0.82156rem; - width: 6.02375rem; - height: 1.80719rem; - border: 1px solid #00A15E; - color: #00A15E; - display: flex; - justify-content: center; - align-items: center; - border-radius: 0.98563rem 0.98563rem 0.98563rem 0.98563rem; -} -.circumstance .check[data-v-bdc223d1] { - font-size: 0.93094rem; - text-align: center; - display: flex; - justify-content: center; - align-items: center; -} -.circumstance .tab[data-v-bdc223d1] { - height: 15.625rem; - background-color: red; -} -.card .tit[data-v-bdc223d1] { - display: flex; - justify-content: space-between; - padding-bottom: 0.625rem; - border-bottom: 1px solid #EBF1EF; -} -.card .card-li[data-v-bdc223d1] { - margin-top: 0.625rem; - display: flex; - justify-content: space-between; -} -.data .tit .tit-b[data-v-bdc223d1] { - color: #B3B3B3; - font-size: 0.82156rem; - display: flex; - align-items: center; -} -.data .data-alanys[data-v-bdc223d1] { - float: right; - color: white; -} -.data .data-cont[data-v-bdc223d1] { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - margin-top: 0.9375rem; + margin: auto; + background-color: #fff; box-sizing: border-box; -} -.data .data-cont .data-cont-li[data-v-bdc223d1] { + padding: 0.625rem; border-radius: 0.65719rem 0.65719rem 0.65719rem 0.65719rem; - width: 9.71688rem; - height: 6.62594rem; - background-color: white; - margin-bottom: 0.625rem; + margin-bottom: 1.25rem; } -.center[data-v-bdc223d1] { +.content .card .card-li[data-v-bdc223d1] { + margin-bottom: 0.53125rem; +} +.content .card .tit[data-v-bdc223d1] { + display: flex; + font-size: 1.04031rem; + font-weight: bold; + justify-content: space-between; +} +.bottom[data-v-bdc223d1] { + width: 23.4375rem; + height: 4.6875rem; + background-color: #EAF2EF; + position: fixed; + bottom: 0; display: flex; align-items: center; -} -.b-cls[data-v-bdc223d1] { - display: flex; - align-items: flex-end; - width: 7.8125rem; - justify-content: space-between; - color: #4CC593; -} -.add-btn[data-v-bdc223d1] { - margin: 0 auto; - width: 6.89969rem; - height: 1.80719rem; - color: #00A15E; - border: 1px solid #00A15E; - border-radius: 1.5625rem; - display: flex; justify-content: center; - line-height: 1.78125rem; - font-size: 0.8125rem; +} +.bottom .add-btn[data-v-bdc223d1] { + width: 7.4475rem; + height: 2.62844rem; + border: #34D190 1px solid; + border-radius: 1.31438rem 1.31438rem 1.31438rem 1.31438rem; + display: flex; + align-items: center; + color: #00A15E; + font-size: 1.04031rem; + font-weight: bold; + justify-content: center; + margin-right: 0.625rem; +} +.bottom .add[data-v-bdc223d1] { + background-color: #00A15E; + color: white; } /** * 这里是uni-app内置的常用样式变量 @@ -1044,7 +1009,7 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat } .circumstance .updata-btn[data-v-c4e0dba5] { font-size: 0.82156rem; - width: 6.02375rem; + padding: 0 0.9375rem; height: 1.80719rem; border: 1px solid #00A15E; color: #00A15E; @@ -1145,7 +1110,7 @@ uni-view[data-v-9d58ba7c], uni-scroll-view[data-v-9d58ba7c], uni-swiper-item[dat white-space: nowrap; overflow-x: scroll; overflow-y: hidden; - width: 100%; + min-width: 95vw; } .tabbar .scoll-list .scoll-list-li { display: inline-block; diff --git a/utils/syhttp.js b/utils/syhttp.js index c604ae2..8d85f91 100644 --- a/utils/syhttp.js +++ b/utils/syhttp.js @@ -1,7 +1,7 @@ import { config } from '@/config/app'; -console.log('指定') + function baseRequest(url, method, data, { noAuth = false, @@ -14,7 +14,7 @@ function baseRequest(url, method, data, { return new Promise((reslove, reject) => { uni.request({ - url: Url + 'adminapi' + url, + url: Url + 'api' + url, method: method || 'GET', header: { ...header diff --git a/utils/uplodeImg.js b/utils/uplodeImg.js new file mode 100644 index 0000000..1add82c --- /dev/null +++ b/utils/uplodeImg.js @@ -0,0 +1,43 @@ +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: 1000 + }) + let that = this + uni.uploadFile({ + url: 'http://ceshi-suyuan.lihaink.cn/api/user/imageUpload', + filePath: imageSrc, + name: 'file', + // formData: { + // 'user': 'test' + // }, + success: (res) => { + uni.showToast({ + title: '上传成功', + icon: 'success', + duration: 1000, + }) + reslove(JSON.parse(res.data)) + + }, + fail: (err) => { + reject(err) + uni.showToast({ + title: '检查网络', + duration: 1000, + }) + + }, + }); + } + }) + }) +} +export default uplodeImg \ No newline at end of file