diff --git a/pages/Login/login.vue b/pages/Login/login.vue index a02ed94..7984329 100644 --- a/pages/Login/login.vue +++ b/pages/Login/login.vue @@ -452,8 +452,8 @@ const tips = ref('获取验证码') const countDown = ref(0); // 倒计时秒数 const formData = reactive({ - account: "15680975703", - password: "123456", + account: "", + password: "", code: '', scene: "2", terminal: '' @@ -590,7 +590,6 @@ num ? loginType.value = 1 : loginType.value = 2 formData.scene = loginType.value - console.log(formData.scene) lineX.value = num } const u = (name) => { diff --git a/pages/Login/resgier.vue b/pages/Login/resgier.vue index 00711dc..c127c9b 100644 --- a/pages/Login/resgier.vue +++ b/pages/Login/resgier.vue @@ -94,7 +94,7 @@ const pwdShow = ref(false) const pwdShow1 = ref(false) const formData = reactive({ - mobile: "19130550023", + mobile: "", verify_code: "", password: "", password_confirm: "", diff --git a/pages/addPlant/addPlant.vue b/pages/addPlant/addPlant.vue index d286586..737b365 100644 --- a/pages/addPlant/addPlant.vue +++ b/pages/addPlant/addPlant.vue @@ -22,7 +22,7 @@ --> - + @@ -58,15 +58,15 @@ suffix-icon-style="color: #b6b6b6;" border="none" v-model="area_name" readonly style="pointer-events: none;"> - + - + - + @@ -188,10 +188,10 @@ village: '', bridge: '', address: '', - lat: "", - lon: "", + latitude: "", + longitude: "", master_name: '', - image: [] + pic: [] }, rules: { farm_name: [{ @@ -546,8 +546,8 @@ e = JSON.parse(e||'{}'); console.log('选择地址', e); data.formData.address = e.address; - data.formData.lat = e.lat; - data.formData.lon = e.lon; + data.formData.latitude = e.lat; + data.formData.longitude = e.lon; }) } }) @@ -566,13 +566,22 @@ const submit = async () => { try { const valid = await form1.value.validate(); + if(!data.formData.latitude||!data.formData.longitude) { + uni.showToast({ + title: '检测到您还没有获取具体位置信息, 正在跳转获取位置', + icon: 'none' + }) + setTimeout(()=>{ + location(); + }, 800) + } if (valid) { // console.log('表单通过', data.formData); if (pic.length == 0) { uni.$u.toast('请上传图片') return } - data.formData.image = JSON.stringify(pic) + data.formData.pic = JSON.stringify(pic) // 表单验证通过,执行提交操作 farmAdd(data.formData).then((res) => { diff --git a/pages/plantAdmin/breedDetail.vue b/pages/plantAdmin/breedDetail.vue index 4cf5689..9a12003 100644 --- a/pages/plantAdmin/breedDetail.vue +++ b/pages/plantAdmin/breedDetail.vue @@ -148,7 +148,8 @@ item = { ...item.detail, create_time: item.create_time, - type_text: item.type_text + type_text: item.type_text, + type: item.type }; if(item) item.pic = JSON.parse(item.pic||'[]'); return item ?? null; @@ -238,31 +239,31 @@ }) } const navFeed = (item, index)=>{ - if(index==2) uni.navigateTo({ + if(item.type==3) uni.navigateTo({ url: `/pages/feedDetail/feedDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); } }) - if(index==4) uni.navigateTo({ + if(item.type==5) uni.navigateTo({ url: `/pages/feedDetail/waterDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); } }) - if(index==1) uni.navigateTo({ + if(item.type==1) uni.navigateTo({ url: `/pages/feedDetail/sterilizeDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); } }) - if(index==3) uni.navigateTo({ + if(item.type==4) uni.navigateTo({ url: `/pages/feedDetail/vaccineDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); } }) - if(index==0) uni.navigateTo({ + if(item.type==2) uni.navigateTo({ url: `/pages/feedDetail/expellingDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); diff --git a/pages/plantAdmin/houseDetail.vue b/pages/plantAdmin/houseDetail.vue index c6b44a6..0f576f6 100644 --- a/pages/plantAdmin/houseDetail.vue +++ b/pages/plantAdmin/houseDetail.vue @@ -91,8 +91,8 @@ - - + + 操作类型: {{item.type_text}} @@ -242,7 +242,8 @@ item = { ...item.detail, create_time: item.create_time, - type_text: item.type_text + type_text: item.type_text, + type: item.type }; if(item!=null) item.pic = JSON.parse(item.pic||'[]'); return item; @@ -345,31 +346,31 @@ }) } const navFeed = (item, index)=>{ - if(index==2) uni.navigateTo({ + if(item.type==3) uni.navigateTo({ url: `/pages/feedDetail/feedDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); } }) - if(index==4) uni.navigateTo({ + if(item.type==5) uni.navigateTo({ url: `/pages/feedDetail/waterDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); } }) - if(index==1) uni.navigateTo({ + if(item.type==1) uni.navigateTo({ url: `/pages/feedDetail/sterilizeDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); } }) - if(index==3) uni.navigateTo({ + if(item.type==4) uni.navigateTo({ url: `/pages/feedDetail/vaccineDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); } }) - if(index==0) uni.navigateTo({ + if(item.type==2) uni.navigateTo({ url: `/pages/feedDetail/expellingDetail`, success: (res) => { res.eventChannel.emit('setDatasItem', item); diff --git a/unpackage/dist/build/app-plus/app-service.js b/unpackage/dist/build/app-plus/app-service.js index 3c2ac27..133ee54 100644 --- a/unpackage/dist/build/app-plus/app-service.js +++ b/unpackage/dist/build/app-plus/app-service.js @@ -3,4 +3,4 @@ if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.fi * vuex v4.1.0 * (c) 2022 Evan You * @license MIT - */var Wo="store";function Jo(e,t){Object.keys(e).forEach((function(a){return t(e[a],a)}))}function Ko(e,t,a){return t.indexOf(e)<0&&(a&&a.prepend?t.unshift(e):t.push(e)),function(){var a=t.indexOf(e);a>-1&&t.splice(a,1)}}function Go(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var a=e.state;Xo(e,a,[],e._modules.root,!0),Yo(e,a,t)}function Yo(t,a,o){var n=t._state,i=t._scope;t.getters={},t._makeLocalGettersCache=Object.create(null);var r=t._wrappedGetters,l={},s={},c=e.effectScope(!0);c.run((function(){Jo(r,(function(a,o){l[o]=function(e,t){return function(){return e(t)}}(a,t),s[o]=e.computed((function(){return l[o]()})),Object.defineProperty(t.getters,o,{get:function(){return s[o].value},enumerable:!0})}))})),t._state=e.reactive({data:a}),t._scope=c,t.strict&&function(t){e.watch((function(){return t._state.data}),(function(){}),{deep:!0,flush:"sync"})}(t),n&&o&&t._withCommit((function(){n.data=null})),i&&i.stop()}function Xo(e,t,a,o,n){var i=!a.length,r=e._modules.getNamespace(a);if(o.namespaced&&(e._modulesNamespaceMap[r],e._modulesNamespaceMap[r]=o),!i&&!n){var l=en(t,a.slice(0,-1)),s=a[a.length-1];e._withCommit((function(){l[s]=o.state}))}var c=o.context=function(e,t,a){var o=""===t,n={dispatch:o?e.dispatch:function(a,o,n){var i=tn(a,o,n),r=i.payload,l=i.options,s=i.type;return l&&l.root||(s=t+s),e.dispatch(s,r)},commit:o?e.commit:function(a,o,n){var i=tn(a,o,n),r=i.payload,l=i.options,s=i.type;l&&l.root||(s=t+s),e.commit(s,r,l)}};return Object.defineProperties(n,{getters:{get:o?function(){return e.getters}:function(){return Zo(e,t)}},state:{get:function(){return en(e.state,a)}}}),n}(e,r,a);o.forEachMutation((function(t,a){!function(e,t,a,o){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){a.call(e,o.state,t)}))}(e,r+a,t,c)})),o.forEachAction((function(t,a){var o=t.root?a:r+a,n=t.handler||t;!function(e,t,a,o){(e._actions[t]||(e._actions[t]=[])).push((function(t){var n,i=a.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return(n=i)&&"function"==typeof n.then||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}(e,o,n,c)})),o.forEachGetter((function(t,a){!function(e,t,a,o){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return a(o.state,o.getters,e.state,e.getters)}}(e,r+a,t,c)})),o.forEachChild((function(o,i){Xo(e,t,a.concat(i),o,n)}))}function Zo(e,t){if(!e._makeLocalGettersCache[t]){var a={},o=t.length;Object.keys(e.getters).forEach((function(n){if(n.slice(0,o)===t){var i=n.slice(o);Object.defineProperty(a,i,{get:function(){return e.getters[n]},enumerable:!0})}})),e._makeLocalGettersCache[t]=a}return e._makeLocalGettersCache[t]}function en(e,t){return t.reduce((function(e,t){return e[t]}),e)}function tn(e,t,a){var o;return null!==(o=e)&&"object"==typeof o&&e.type&&(a=t,t=e,e=e.type),{type:e,payload:t,options:a}}var an="vuex:mutations",on="vuex:actions",nn="vuex",rn=0;function ln(e,t){Qo({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(a){a.addTimelineLayer({id:an,label:"Vuex Mutations",color:sn}),a.addTimelineLayer({id:on,label:"Vuex Actions",color:sn}),a.addInspector({id:nn,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),a.on.getInspectorTree((function(a){if(a.app===e&&a.inspectorId===nn)if(a.filter){var o=[];mn(o,t._modules.root,a.filter,""),a.rootNodes=o}else a.rootNodes=[un(t._modules.root,"")]})),a.on.getInspectorState((function(a){if(a.app===e&&a.inspectorId===nn){var o=a.nodeId;Zo(t,o),a.state=function(e,t,a){t="root"===a?t:t[a];var o=Object.keys(t),n={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var i=function(e){var t={};return Object.keys(e).forEach((function(a){var o=a.split("/");if(o.length>1){var n=t,i=o.pop();o.forEach((function(e){n[e]||(n[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),n=n[e]._custom.value})),n[i]=pn((function(){return e[a]}))}else t[a]=pn((function(){return e[a]}))})),t}(t);n.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?dn(e):e,editable:!1,value:pn((function(){return i[e]}))}}))}return n}((n=t._modules,(r=(i=o).split("/").filter((function(e){return e}))).reduce((function(e,t,a){var o=e[t];if(!o)throw new Error('Missing module "'+t+'" for path "'+i+'".');return a===r.length-1?o:o._children}),"root"===i?n:n.root._children)),"root"===o?t.getters:t._makeLocalGettersCache,o)}var n,i,r})),a.on.editInspectorState((function(a){if(a.app===e&&a.inspectorId===nn){var o=a.nodeId,n=a.path;"root"!==o&&(n=o.split("/").filter(Boolean).concat(n)),t._withCommit((function(){a.set(t._state.data,n,a.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,a.notifyComponentUpdate(),a.sendInspectorTree(nn),a.sendInspectorState(nn),a.addTimelineEvent({layerId:an,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=rn++,e._time=Date.now(),o.state=t,a.addTimelineEvent({layerId:on,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},n=Date.now()-e._time;o.duration={_custom:{type:"duration",display:n+"ms",tooltip:"Action duration",value:n}},e.payload&&(o.payload=e.payload),o.state=t,a.addTimelineEvent({layerId:on,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var sn=8702998,cn={label:"namespaced",textColor:16777215,backgroundColor:6710886};function dn(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function un(e,t){return{id:t||"root",label:dn(t),tags:e.namespaced?[cn]:[],children:Object.keys(e._children).map((function(a){return un(e._children[a],t+a+"/")}))}}function mn(e,t,a,o){o.includes(a)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[cn]:[]}),Object.keys(t._children).forEach((function(n){mn(e,t._children[n],a,o+n+"/")}))}function pn(e){try{return e()}catch(it){return it}}var hn=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var a=e.state;this.state=("function"==typeof a?a():a)||{}},fn={namespaced:{configurable:!0}};fn.namespaced.get=function(){return!!this._rawModule.namespaced},hn.prototype.addChild=function(e,t){this._children[e]=t},hn.prototype.removeChild=function(e){delete this._children[e]},hn.prototype.getChild=function(e){return this._children[e]},hn.prototype.hasChild=function(e){return e in this._children},hn.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},hn.prototype.forEachChild=function(e){Jo(this._children,e)},hn.prototype.forEachGetter=function(e){this._rawModule.getters&&Jo(this._rawModule.getters,e)},hn.prototype.forEachAction=function(e){this._rawModule.actions&&Jo(this._rawModule.actions,e)},hn.prototype.forEachMutation=function(e){this._rawModule.mutations&&Jo(this._rawModule.mutations,e)},Object.defineProperties(hn.prototype,fn);var gn=function(e){this.register([],e,!1)};function vn(e,t,a){if(t.update(a),a.modules)for(var o in a.modules){if(!t.getChild(o))return;vn(e.concat(o),t.getChild(o),a.modules[o])}}gn.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},gn.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,a){return e+((t=t.getChild(a)).namespaced?a+"/":"")}),"")},gn.prototype.update=function(e){vn([],this.root,e)},gn.prototype.register=function(e,t,a){var o=this;void 0===a&&(a=!0);var n=new hn(t,a);0===e.length?this.root=n:this.get(e.slice(0,-1)).addChild(e[e.length-1],n);t.modules&&Jo(t.modules,(function(t,n){o.register(e.concat(n),t,a)}))},gn.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),a=e[e.length-1],o=t.getChild(a);o&&o.runtime&&t.removeChild(a)},gn.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),a=e[e.length-1];return!!t&&t.hasChild(a)};var yn=function(e){var t=this;void 0===e&&(e={});var a=e.plugins;void 0===a&&(a=[]);var o=e.strict;void 0===o&&(o=!1);var n=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new gn(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=n;var i=this,r=this.dispatch,l=this.commit;this.dispatch=function(e,t){return r.call(i,e,t)},this.commit=function(e,t,a){return l.call(i,e,t,a)},this.strict=o;var s=this._modules.root.state;Xo(this,s,[],this._modules.root),Yo(this,s),a.forEach((function(e){return e(t)}))},bn={state:{configurable:!0}};yn.prototype.install=function(e,t){e.provide(t||Wo,this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&ln(e,this)},bn.state.get=function(){return this._state.data},bn.state.set=function(e){},yn.prototype.commit=function(e,t,a){var o=this,n=tn(e,t,a),i=n.type,r=n.payload,l={type:i,payload:r},s=this._mutations[i];s&&(this._withCommit((function(){s.forEach((function(e){e(r)}))})),this._subscribers.slice().forEach((function(e){return e(l,o.state)})))},yn.prototype.dispatch=function(e,t){var a=this,o=tn(e,t),n=o.type,i=o.payload,r={type:n,payload:i},l=this._actions[n];if(l){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(r,a.state)}))}catch(it){}var s=l.length>1?Promise.all(l.map((function(e){return e(i)}))):l[0](i);return new Promise((function(e,t){s.then((function(t){try{a._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(r,a.state)}))}catch(it){}e(t)}),(function(e){try{a._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(r,a.state,e)}))}catch(it){}t(e)}))}))}},yn.prototype.subscribe=function(e,t){return Ko(e,this._subscribers,t)},yn.prototype.subscribeAction=function(e,t){return Ko("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},yn.prototype.watch=function(t,a,o){var n=this;return e.watch((function(){return t(n.state,n.getters)}),a,Object.assign({},o))},yn.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},yn.prototype.registerModule=function(e,t,a){void 0===a&&(a={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),Xo(this,this.state,e,this._modules.get(e),a.preserveState),Yo(this,this.state)},yn.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete en(t.state,e.slice(0,-1))[e[e.length-1]]})),Go(this)},yn.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},yn.prototype.hotUpdate=function(e){this._modules.update(e),Go(this,!0)},yn.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(yn.prototype,bn);const wn=(_n={state:{userInfo:uni.getStorageSync("SY_USER")||null,farm:JSON.parse(uni.getStorageSync("farm")||"{}"),house:JSON.parse(uni.getStorageSync("house")||"{}"),tabbrIndex:0},mutations:{saveUserInfo(e,t){e.userInfo=t,uni.setStorageSync("SY_USER",t)},setFarm(e,t){e.farm=t,uni.setStorageSync("farm",JSON.stringify(t))},setHouse(e,t){e.house=t,uni.setStorageSync("house",JSON.stringify(t))},changeTabbar(e,t){e.tabbrIndex=+t}},actions:{saveUserInfo({commit:e},t){e("saveUserInfo",t)},setFarm({commit:e},t){e("setFarm",t)},setHouse({commit:e},t){e("setHouse",t)},changeTabbar({commit:e},t){e("changeTabbar",t)}}},new yn(_n));var _n;const Vn={__name:"tabbar",setup(t){const a=e.ref(wn.state.tabbrIndex),n=e=>{wn.dispatch("changeTabbar",e),0==e&&uni.switchTab({url:"/pages/index/massif"}),1==e&&uni.switchTab({url:"/pages/index/manager"}),2==e&&uni.switchTab({url:"/pages/index/personal"})};return(t,i)=>{const r=o(e.resolveDynamicComponent("u-tabbar-item"),Lo),l=o(e.resolveDynamicComponent("u-tabbar"),jo);return e.openBlock(),e.createBlock(l,{value:a.value,fixed:!0,placeholder:!1,safeAreaInsetBottom:!0},{default:e.withCtx((()=>[e.createVNode(r,{onClick:n},{"active-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/sydj.png",style:{width:"60rpx",height:"60rpx"}})])),"inactive-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/sy.png",style:{width:"60rpx",height:"60rpx"}})])),_:1}),e.createVNode(r,{onClick:n},{"active-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/dkdj.png",style:{width:"60rpx",height:"60rpx"}})])),"inactive-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/dk.png",style:{width:"60rpx",height:"60rpx"}})])),_:1}),e.createVNode(r,{onClick:n},{"active-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/wddj.png",style:{width:"60rpx",height:"60rpx"}})])),"inactive-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/wd.png",style:{width:"60rpx",height:"60rpx"}})])),_:1})])),_:1},8,["value"])}}};const kn=x({name:"uniTransition",props:{show:{type:Boolean,default:!1},modeClass:{type:Array,default:()=>[]},duration:{type:Number,default:300},styles:{type:Object,default:()=>({})}},data:()=>({isShow:!1,transform:"",ani:{in:"",active:""}}),watch:{show:{handler(e){e?this.open():this.close()},immediate:!0}},computed:{stylesObject(){let e={...this.styles,"transition-duration":this.duration/1e3+"s"},t="";for(let a in e){t+=this.toLine(a)+":"+e[a]+";"}return t}},created(){},methods:{change(){this.$emit("click",{detail:this.isShow})},open(){this.isShow=!0,this.transform="",this.ani.in="";for(let e in this.getTranfrom(!1))"opacity"===e?this.ani.in="fade-in":this.transform+=`${this.getTranfrom(!1)[e]} `;this.$nextTick((()=>{setTimeout((()=>{this._animation(!0)}),50)}))},close(e){this._animation(!1)},_animation(e){let t=this.getTranfrom(e);this.transform="";for(let a in t)"opacity"===a?this.ani.in="fade-"+(e?"out":"in"):this.transform+=`${t[a]} `;clearTimeout(this.timer),this.timer=setTimeout((()=>{e||(this.isShow=!1),this.$emit("change",{detail:this.isShow})}),this.duration)},getTranfrom(e){let t={transform:""};return this.modeClass.forEach((a=>{switch(a){case"fade":t.opacity=e?1:0;break;case"slide-top":t.transform+=`translateY(${e?"0":"-100%"}) `;break;case"slide-right":t.transform+=`translateX(${e?"0":"100%"}) `;break;case"slide-bottom":t.transform+=`translateY(${e?"0":"100%"}) `;break;case"slide-left":t.transform+=`translateX(${e?"0":"-100%"}) `;break;case"zoom-in":t.transform+=`scale(${e?1:.8}) `;break;case"zoom-out":t.transform+=`scale(${e?1:1.2}) `}})),t},_modeClassArr(e){let t=this.modeClass;if("string"!=typeof t){let a="";return t.forEach((t=>{a+=t+"-"+e+","})),a.substr(0,a.length-1)}return t+"-"+e},toLine:e=>e.replace(/([A-Z])/g,"-$1").toLowerCase()}},[["render",function(t,a,o,n,i,r){return i.isShow?(e.openBlock(),e.createElementBlock("view",{key:0,ref:"ani",class:e.normalizeClass(["uni-transition",[i.ani.in]]),style:e.normalizeStyle("transform:"+i.transform+";"+r.stylesObject),onClick:a[0]||(a[0]=(...e)=>r.change&&r.change(...e))},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6)):e.createCommentVNode("",!0)}],["__scopeId","data-v-f427c8e9"]]),xn={name:"UniPopup",components:{uniTransition:kn},props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},maskClick:{type:Boolean,default:!0}},data:()=>({duration:300,ani:[],showPopup:!1,showTrans:!1,maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{position:"fixed",left:0,right:0}}),watch:{type:{handler:function(e){switch(this.type){case"top":this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0};break;case"bottom":this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0};break;case"center":this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center"}}},immediate:!0}},created(){this.animation?this.duration=300:this.duration=0},methods:{clear(e){e.stopPropagation()},open(){this.showPopup=!0,this.$nextTick((()=>{clearTimeout(this.timer),this.timer=setTimeout((()=>{this.showTrans=!0}),50)})),this.$emit("change",{show:!0})},close(e){this.showTrans=!1,this.$nextTick((()=>{clearTimeout(this.timer),this.timer=setTimeout((()=>{this.$emit("change",{show:!1}),this.showPopup=!1}),300)}))},onTap(){this.maskClick&&this.close()}}};const Nn=x(xn,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("uni-transition"),kn);return r.showPopup?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-popup",onTouchmove:a[1]||(a[1]=e.withModifiers(((...e)=>l.clear&&l.clear(...e)),["stop","prevent"]))},[e.createVNode(s,{"mode-class":["fade"],styles:r.maskClass,duration:r.duration,show:r.showTrans,onClick:l.onTap},null,8,["styles","duration","show","onClick"]),e.createVNode(s,{"mode-class":r.ani,styles:r.transClass,duration:r.duration,show:r.showTrans,onClick:l.onTap},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"uni-popup__wrapper-box",onClick:a[0]||(a[0]=e.withModifiers(((...e)=>l.clear&&l.clear(...e)),["stop"]))},[e.renderSlot(t.$slots,"default",{},void 0,!0)])])),_:3},8,["mode-class","styles","duration","show","onClick"])],32)):e.createCommentVNode("",!0)}],["__scopeId","data-v-a8219944"]]);const Cn=x({props:{shareurl:{type:String,default:""}},components:{uniPopup:Nn},data:()=>({bottomData:[{text:"刷新",icon:"/static/img/miniProgram.png",name:"miniProgram"}]}),mounted(){},methods:{open(){this.$nextTick((()=>{this.$refs.showshare.open()}))},change(e){},shareItems(e){switch(e){case"miniProgram":uni.reLaunch({url:this.shareurl,success:e=>{this.$nextTick((()=>{this.$refs.showshare.close}))},fail:e=>{a("log","at components/own-share/own-share.vue:70",e)}});break;case"more":plus.share.sendWithSystem({type:"web",title:shareOPtions.shareTitle,thumbs:[shareOPtions.shareImage],href:shareOPtions.shareHref,content:shareOPtions.summary})}},cancel(){this.$refs.showshare.close()}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("uni-popup"),Nn);return e.openBlock(),e.createBlock(s,{ref:"showshare",type:"bottom",onChange:l.change},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"uni-share"},[e.createElementVNode("view",{class:"uni-share-content"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.bottomData,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,onClick:e=>l.shareItems(t.name),class:"uni-share-content-box"},[e.createElementVNode("view",{class:"uni-share-content-image"},[e.createElementVNode("image",{src:t.icon,class:"content-image",mode:"widthFix"},null,8,["src"])]),e.createElementVNode("text",{class:"uni-share-content-text"},e.toDisplayString(t.text),1)],8,["onClick"])))),128))]),e.createElementVNode("text",{class:"uni-share-btn",onClick:a[0]||(a[0]=e=>l.cancel("share"))},"取消")])])),_:1},8,["onChange"])}],["__scopeId","data-v-ed2d7766"]]);const En=x({name:"retuntop",comments:{ownShare:Cn},props:{isshow:{type:Boolean},name:{type:String},url:{type:String}},data:()=>({}),mounted(){},methods:{close(){this.$nextTick((()=>{this.$refs.share.open()}))},returnbom(){uni.sendHostEvent("closeApp",(e=>{}))}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("own-share"),Cn);return e.openBlock(),e.createElementBlock("view",{class:""},[e.createElementVNode("view",{class:"contentgb"},[n.isshow?(e.openBlock(),e.createElementBlock("view",{key:0,class:"iconfont icon-xiangzuo",style:{"margin-top":"10rpx",color:"#fff","margin-left":"30rpx"},onClick:a[0]||(a[0]=(...e)=>l.close&&l.close(...e))})):e.createCommentVNode("",!0),n.isshow?(e.openBlock(),e.createElementBlock("view",{key:1,class:"name"},e.toDisplayString(n.name),1)):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"return_top"},[e.createElementVNode("view",{class:"z-bootm-img1",onClick:a[1]||(a[1]=e=>l.close())},[e.createElementVNode("image",{src:"/static/img/fb1.png",mode:"aspectFit"})]),e.createElementVNode("view",{class:"z-bootm-l"}),e.createElementVNode("view",{class:"z-bootm-img2",onClick:a[2]||(a[2]=e=>l.returnbom())},[e.createElementVNode("image",{src:"/static/img/fb2.png",mode:"aspectFit"})])])]),e.createVNode(s,{ref:"share",shareurl:n.url},null,8,["shareurl"]),e.createElementVNode("strong")])}],["__scopeId","data-v-c790fda6"]]);let Bn;Bn="https://ceshi-suyuan-breed.lihaink.cn/";let Sn="https://ceshi-suyuan-breed.lihaink.cn/",Dn={"content-type":"application/json","Form-type":"app",TOKEN:""};const An={};["options","get","post","put","head","delete","trace","connect"].forEach((e=>{An[e]=(t,o,n)=>function(e,t,o,{noAuth:n=!1,noVerify:i=!1,onReLogin:r=!1}){let l=Sn,s=Dn;return wn.state.userInfo&&(s.TOKEN=wn.state.userInfo.token),new Promise(((n,r)=>{uni.request({url:l+"api"+e,method:t||"GET",header:{...s},data:"GET"!=t&&o||{},params:"GET"==t?o:{},success:e=>{e.data.show&&uni.showToast({title:e.data.msg||"操作成功",icon:"success"}),i?n(e.data):-1==e.data.code?"登录超时,请重新登录"==e.data.msg&&(uni.showToast({title:e.data.msg,icon:"none"}),uni.reLaunch({url:"/pages/Login/login"})):0==e.data.code?("用户信息不存在"!=e.data.msg&&uni.showToast({title:e.data.msg||"请检查网络",icon:"none"}),n(e.data)):1==e.data.code?n(e.data):200==e.data.code?n(e.data.data):-1!==[41e4,410001,410002,4e4].indexOf(e.data.code)||501==e.data.code?r(e.data):(uni.showToast({title:e.data.msg||"请检查网络",icon:"none"}),r(e.data.msg||"请检查网络"))},fail:e=>{a("log","at utils/syhttp.js:79",e,"错误"),uni.showToast({title:"网络错误",icon:"none"}),r("请求失败")}})}))}(t,e,o,n||{})}));const In={};["options","get","post","put","head","delete","trace","connect"].forEach((e=>{In[e]=(t,o,n)=>function(e,t,o,{noAuth:n=!1,noVerify:i=!1,onReLogin:r=!1}){let l=Sn,s=Dn;return wn.state.userInfo&&(s.TOKEN=wn.state.userInfo.token),new Promise(((n,r)=>{uni.request({url:l+e,method:t||"GET",header:{...s},data:"GET"!=t&&o||{},params:"GET"==t?o:{},success:e=>{e.data.show&&uni.showToast({title:e.data.msg||"操作成功",icon:"success"}),i?n(e.data):-1==e.data.code?"登录超时,请重新登录"==e.data.msg&&uni.reLaunch({url:"/pages/Login/login"}):0==e.data.code?("用户信息不存在"!=e.data.msg&&uni.showToast({title:e.data.msg||"请检查网络",icon:"none"}),n(e.data)):1==e.data.code?n(e.data):200==e.data.code?n(e.data.data):-1!==[41e4,410001,410002,4e4].indexOf(e.data.code)||501==e.data.code?r(e.data):(uni.showToast({title:e.data.msg||"请检查网络",icon:"none"}),r(e.data.msg||"请检查网络"))},fail:e=>{a("log","at utils/http.js:82",e,"错误"),uni.showToast({title:"网络错误",icon:"none"}),r("请求失败")}})}))}(t,e,o,n||{})}));const Tn=e=>An.get("/land/detail",e),Pn=e=>An.get("/plant/detail",e),Fn=e=>An.post("/action/add",e),Un=e=>In.get("/common/geo/province",e),On=e=>In.get("/common/geo/city",e),qn=e=>In.get("/common/geo/county",e),$n=e=>In.get("/common/geo/towns",e),Ln=e=>In.get("/common/geo/villages",e),zn=e=>In.get("/common/geo/groups",e),jn=e=>An.post("/farm/add",e),Mn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"farm_type"}),Rn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"breed_type"}),Hn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"animal_type"}),Qn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"feeding_type"}),Wn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"leave_fence_house_type"}),Jn={__name:"massif",setup(t){const n=e.ref(!1),l=e.ref(!1),s=e.ref(!1),c=e.reactive([]),d=e.reactive([]),u=(e,t)=>{try{return(e-t).toFixed(2)}catch(it){return"0.00"}},m=e.ref({});r((()=>{uni.hideTabBar(),wn.state.userInfo?m.value=wn.state.userInfo:uni.redirectTo({url:"/pages/Login/login"})}));const p=e.ref({}),h=e.ref(""),f=e.ref(""),g=e.ref(""),v=()=>{z(),s.value=!1},y=()=>{uni.scanCode({success:function(e){a("log","at pages/index/massif.vue:307","条码内容:"+e.result.split("d_")[1]),uni.navigateTo({url:"/pages/landDetail/results?sn="+e.result.split("d_")[1]})}})},b=()=>{let e=uni.getSystemInfoSync().platform;uni.navigateTo({url:`/pages/live/${"ios"==e?"liveIos":"live"}?url=${w.value}`})},w=e.ref(),_=e.ref(""),V=e.ref(!1),k=e.ref(!1),x=e.reactive([]),N=e.reactive([]),E=e.ref({});i((()=>{S(),U()}));const B=e=>`/static/main/index/${e}.png`,S=()=>{var e;An.get("/land/product",e).then((e=>{1==e.code&&d.splice(0,d.length,...e.data.map(((e,t)=>({text:e.name,value:e.product_id}))))}))},D=()=>{s.value=!1,g.value=""},I=e.ref([]),T=e.ref([]),P=e.ref([]),U=()=>{var e;Rn().then((e=>{P.value=e.data})),An.get("/farm/list",e).then((e=>{I.value=e.data,x.splice(0,x.length,...e.data.map(((e,t)=>({name:e.farm_name,id:e.id})))),e.data.length>0?p.value=e.data[0]:p.value={},wn.commit("setFarm",p.value)})).catch((e=>{a("log","at pages/index/massif.vue:403",e)})),(e=>An.get("/fence_house/datas",e))().then((e=>{T.value=e.data,N.splice(0,N.length,...e.data.map(((e,t)=>({name:e.fence_house_name,id:e.id})))),E.value.id||(e.data.length>0?E.value=e.data[0]:E.value={},wn.commit("setHouse",E.value),L())})).catch((e=>{a("log","at pages/index/massif.vue:419",e)}))},O=e.computed((()=>{var e;return(null==(e=P.value.find((e=>e.value==p.value.farm_type)))?void 0:e.name)||""})),q=e.ref({}),$=e.ref({}),L=()=>{var e;(e={fence_house_id:E.value.id},An.get("/index/index",e)).then((e=>{var t,a;w.value=e.data.video_url,q.value=(null==(t=e.data.monitor)?void 0:t.datas)||{},$.value=(null==(a=e.data.monitor)?void 0:a.threshold)||{}}))},z=()=>{var e;g.value?(e={land_id:p.id,product_id:g.value},An.post("/land/bind",e)).then((e=>{1==e.code&&(uni.$u.toast(e.msg),g.value=""),a("log","at pages/index/massif.vue:455",e)})):uni.$u.toast("请选择产品编号")},j=e=>{f.value=e.value[0].id,l.value=!1,2==e.value[0].status?uni.$u.toast("该土地已经收获,不能进行操作"):n.value=!0},M=e=>{h.value=e.id,E.value=T.value.find((t=>t.id==e.id)),wn.commit("setHouse",E.value),V.value=!1,k.value=!0,L(),setTimeout((()=>{k.value=!1}),1e3)},R=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)};R();const H=e=>`/static/main/index/${e}.png`,W=()=>{uni.navigateTo({url:"/pages/plant/plant",success:e=>{e.eventChannel.emit("setDatasItem",p.value)}})};return(t,a)=>{const n=o(e.resolveDynamicComponent("u--image"),A),i=o(e.resolveDynamicComponent("u-icon"),C),r=o(e.resolveDynamicComponent("u-loading-page"),F),m=o(e.resolveDynamicComponent("u-action-sheet"),G),h=o(e.resolveDynamicComponent("uni-data-select"),Io),f=o(e.resolveDynamicComponent("u-popup"),Q),E=o(e.resolveDynamicComponent("u-picker"),Oo);return e.openBlock(),e.createElementBlock("view",{class:"",style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con",style:{"justify-content":"space-between"}},[x.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{"padding-left":"20rpx",display:"flex",color:"white"},onClick:a[0]||(a[0]=e=>V.value=!0)},[e.createVNode(n,{src:H("qhtd"),width:"38.55rpx",height:"38.55rpx",style:{"margin-right":"20rpx"}},null,8,["src"])])):(e.openBlock(),e.createElementBlock("view",{key:1})),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createElementVNode("view",{class:"nav"},[e.createElementVNode("view",{class:"",style:{"margin-right":"20rpx"}},[e.createVNode(n,{src:H("sys"),width:"38.55rpx",onClick:y,height:"38.55rpx"},null,8,["src"])]),e.createElementVNode("view",{class:"",style:{"margin-left":"20rpx"}},[e.createVNode(n,{src:H("sbbd"),width:"38.55rpx",onClick:a[1]||(a[1]=e=>s.value=!0),height:"38.55rpx"},null,8,["src"])]),e.createElementVNode("view",{class:"",style:{"margin-left":"20rpx"}})]),e.createElementVNode("view",{class:"",style:{"margin-top":"-5rpx"}},[e.createVNode(En,{url:"/pages/index/massif"})])])])]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"})]),(e.openBlock(),e.createElementBlock("view",{key:0,class:"content"},[e.createElementVNode("view",{class:""},[x.length<=0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"empty-land"},[e.createElementVNode("text",null,"没有养殖基地信息?"),e.createElementVNode("text",{onClick:a[2]||(a[2]=e=>{return t="/pages/addPlant/addPlant",void uni.navigateTo({url:t});var t})},"去新增》")])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"land-info",onClick:W},[e.createElementVNode("view",{class:"land-area"},[e.createElementVNode("view",{class:"land-title"},"养殖基地规模"),e.createElementVNode("view",{class:""},e.toDisplayString(p.value.form_scale||"--")+"亩 ",1)]),e.createElementVNode("view",{class:"plant-area"},[e.createElementVNode("view",{class:"land-title"},"养殖种类"),e.createElementVNode("view",{class:""},e.toDisplayString(e.unref(O)||"--"),1)])]),e.createElementVNode("view",{class:"live-tit",style:{color:"#1A1A1A"}},[e.createElementVNode("view",{class:"tit",style:{}}," 养殖基地监控数据 "),e.createElementVNode("view",{class:"",style:{"font-size":"24rpx",color:"#ACACAC",display:"flex","align-items":"center"}},[e.createVNode(i,{name:"clock",style:{"margin-right":"5rpx"}}),e.createTextVNode(" 刷新时间:"+e.toDisplayString(R()),1)])]),e.createElementVNode("view",{class:"live"},[w.value?(e.openBlock(),e.createBlock(n,{key:0,src:_.value,width:"100%",height:"450rpx"},null,8,["src"])):(e.openBlock(),e.createBlock(n,{key:1,src:H("K"),width:"100%"},null,8,["src"])),w.value?(e.openBlock(),e.createElementBlock("view",{key:2,class:"",style:{width:"100%",height:"450rpx","background-color":"rgba(0, 0, 0, .5)",position:"absolute",top:"1px"},onClick:b},[w.value?(e.openBlock(),e.createBlock(i,{key:0,name:"play-circle",size:"40",color:"white",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)"}})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit"}," 智能监测数据 "),e.createElementVNode("view",{class:"area-check"},[e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("huan_jing_wen_du")})`})},[e.createElementVNode("view",{class:""}," 空气温度 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.ambient_temperature>$.value.air_temp_max||q.value.ambient_temperature<$.value.air_temp_min}])},e.toDisplayString(q.value.ambient_temperature||0===q.value.ambient_temperature?q.value.ambient_temperature+"℃":"--"),3),q.value.ambient_temperature>$.value.air_temp_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.ambient_temperature,$.value.air_temp_max))+e.toDisplayString("℃"),1)):e.createCommentVNode("",!0),q.value.ambient_temperature<$.value.air_temp_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.air_temp_min,q.value.ambient_temperature))+e.toDisplayString("℃"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("huan_jing_shi_du")})`})},[e.createElementVNode("view",{class:""}," 空气湿度 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.ambient_humidity>$.value.air_mois_max||q.value.ambient_humidity<$.value.air_mois_min}])},e.toDisplayString(q.value.ambient_humidity||0===q.value.ambient_humidity?q.value.ambient_humidity+"%":"--"),3),q.value.ambient_humidity>$.value.air_mois_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.ambient_humidity,$.value.air_mois_max))+e.toDisplayString("%"),1)):e.createCommentVNode("",!0),q.value.ambient_humidity<$.value.air_mois_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.air_mois_min,q.value.ambient_humidity))+e.toDisplayString("%"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("dan_qi")})`})},[e.createElementVNode("view",{class:""}," 氮气 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.nitrogen>$.value.nitrogen_max||q.value.nitrogen<$.value.nitrogen_min}])},e.toDisplayString(q.value.nitrogen||0===q.value.nitrogen?q.value.nitrogen+"ppm":"--"),3),q.value.nitrogen>$.value.nitrogen_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.nitrogen,$.value.nitrogen_max))+e.toDisplayString("ppm"),1)):e.createCommentVNode("",!0),q.value.nitrogen<$.value.nitrogen_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.nitrogen_min,q.value.nitrogen))+e.toDisplayString("ppm"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("jia_wan")})`})},[e.createElementVNode("view",{class:""}," 甲烷 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.methane>$.value.methane_max||q.value.methane<$.value.methane_min}])},e.toDisplayString(q.value.methane||0===q.value.methane?q.value.methane+"ppm":"--"),3),q.value.methane>$.value.methane_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.methane,$.value.methane_max))+e.toDisplayString("ppm"),1)):e.createCommentVNode("",!0),q.value.methane<$.value.methane_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.methane_min,q.value.methane))+e.toDisplayString("ppm"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("zao_yin")})`})},[e.createElementVNode("view",{class:""}," 噪音 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.noise>$.value.noise_max||q.value.noise<$.value.noise_min}])},e.toDisplayString(q.value.noise||0===q.value.noise?q.value.noise+"db":"--"),3),q.value.noise>$.value.noise_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.noise,$.value.noise_max))+e.toDisplayString("db"),1)):e.createCommentVNode("",!0),q.value.noise<$.value.noise_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.noise_min,q.value.noise))+e.toDisplayString("db"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("fang_huo")})`})},[e.createElementVNode("view",{class:""}," 防火 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.fireproof>$.value.fireproof_max||q.value.fireproof<$.value.fireproof_min}])},e.toDisplayString(q.value.fireproof||0===q.value.fireproof?q.value.fireproof:"--"),3),q.value.fireproof>$.value.fireproof_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.fireproof,$.value.fireproof_max)),1)):e.createCommentVNode("",!0),q.value.fireproof<$.value.fireproof_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.fireproof_min,q.value.fireproof)),1)):e.createCommentVNode("",!0)],4)])])]),e.createVNode(r,{loading:k.value},null,8,["loading"]),e.createVNode(m,{show:V.value,keyName:"name",closeOnClickOverlay:"",actions:N,title:"请选择",onClose:a[3]||(a[3]=e=>V.value=!1),onSelect:M},null,8,["show","actions"])])),e.createElementVNode("view",{class:"Modal"},[e.createVNode(f,{show:s.value,mode:"center",onClose:D,round:10},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"Modal"},[e.createElementVNode("text",null," 产品编号:"),e.createVNode(h,{modelValue:g.value,"onUpdate:modelValue":a[5]||(a[5]=e=>g.value=e),style:{width:"300rpx","margin-left":"30rpx"},localdata:d},null,8,["modelValue","localdata"])]),e.createElementVNode("view",{class:"Modal-btn"},[e.createElementVNode("view",{class:"Modal-btna",onClick:D}," 取消 "),e.createElementVNode("view",{class:"Modal-btnb",onClick:v}," 确定 ")])])),_:1},8,["show"])]),e.createVNode(E,{keyName:"name",show:l.value,onCancel:a[6]||(a[6]=e=>l.value=!1),onConfirm:j,columns:c},null,8,["show","columns"]),e.createVNode(Vn)])}}},Kn="/static/img/zw.png",Gn=x({__name:"landInfo",props:{info:Object,isDetail:Boolean},setup(t){const a=e.ref([]);Hn().then((e=>{a.value=e.data}));return(n,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-top":"10rpx"}},[e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center",height:"60rpx"}},[e.createVNode(r,{name:"map"}),e.createTextVNode(" "+e.toDisplayString(t.info.fence_house_name),1)]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dong_wu_ming_cheng.png')"}},[e.createTextVNode(" 动物名称 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.animal_name),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dong_wu_lei_xing.png')"}},[e.createTextVNode(" 动物类型 "),e.createElementVNode("view",{class:""},e.toDisplayString((l=t.info.animal_type,(null==(s=a.value.find((e=>e.value==l)))?void 0:s.name)||"")),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/lan_she_rong_liang.png')"}},[e.createTextVNode(" 栏舍容量 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.capacity),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/lan_she_fu_ze_ren.png')"}},[e.createTextVNode(" 栏舍负责人 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.master),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dian_hua.png')"}},[e.createTextVNode(" 负责人电话 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.master_phone),1)]),e.createElementVNode("view",{class:"info-li-d"})])]);var l,s}}},[["__scopeId","data-v-bc232b8c"]]),Yn=x({__name:"index",setup(t){e.reactive([{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"}]);const n=e.reactive([]);e.reactive([]);const l=e.reactive({}),s=e.ref("");e.reactive([[{label:"种植",route:"/pages/husbandryForm/sow"},{label:"施肥",route:"/pages/husbandryForm/fertilize"},{label:"除草",route:"/pages/husbandryForm/weeding"},{label:"灌溉",route:"/pages/husbandryForm/irrigate"},{label:"除虫",route:"/pages/husbandryForm/Pest"},{label:"收获",route:"/pages/husbandryForm/harvest"}]]),r((e=>{s.value=e.id})),i((()=>{d(),c()}));const c=()=>{Tn({land_id:s.value}).then((e=>{1==e.code&&Object.assign(l,e.data)}))},d=()=>{var e;(e={land_id:s.value},An.get("/plant/list",e)).then((e=>{1==e.code&&(n.splice(0,n.length,...e.data),n.forEach((e=>{e.showCode=!1})),a("log","at pages/landDetail/index.vue:220",n))}))},u=()=>{uni.navigateTo({url:"/pages/husbandryForm/sow?id="+s.value})},m=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)};return(t,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C),s=o(e.resolveDynamicComponent("u--image"),A);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between"}},[e.createElementVNode("view",{class:"tit"}," 苗情监测数据 "),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createVNode(r,{name:"clock",style:{"margin-right":"10rpx"}}),e.createElementVNode("text",{style:{color:"#ACACAC","font-size":"25rpx"}},"刷新时间: "+e.toDisplayString(m()),1)])]),e.createElementVNode("view",{class:"video",onClick:i[0]||(i[0]=e=>{return t="/pages/live/live",void uni.navigateTo({url:t});var t})},[e.createVNode(s,{src:t.url,width:"100%",height:"300rpx"},null,8,["src"])]),e.createVNode(Gn,{info:l},null,8,["info"]),e.createElementVNode("view",{class:"add-thing",onClick:u}," 新增种植 "),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit",style:{"font-size":"33.29rpx",margin:"20rpx 0"}}," 种植信息 "),n.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,((o,i)=>(e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:i},[e.createElementVNode("view",{class:"card_body"},[o.pic.length>0&&!o.showCode?(e.openBlock(),e.createElementBlock("view",{key:0,class:"left"},[e.createVNode(s,{onClick:e=>{return t=o.pic,void uni.previewImage({urls:t});var t},radius:"10",src:o.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"])])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"left"},[e.createVNode(s,{onClick:e=>{return t=o.qr_code,void uni.previewImage({urls:[t]});var t},radius:"10",src:o.qr_code,width:"200rpx",height:"200rpx"},null,8,["onClick","src"])])),e.createVNode(s,{src:"/static/main/index/xyj.png",class:"next",width:"38rpx",height:"38rpx"}),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>((e,t)=>{uni.navigateTo({url:"/pages/landDetail/tudi?data="+e.id})})(o,t.i)},[e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"种植种类:"),e.createTextVNode(" "+e.toDisplayString(o.kind),1)]),e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"种植面积:"),e.createTextVNode(" "+e.toDisplayString(o.area)+"亩 ",1)]),e.createElementVNode("view",{class:"te"},[e.createElementVNode("text",{style:{color:"black","white-space":"nowrap"}},"参与人:"),e.createTextVNode(" "+e.toDisplayString(o.user),1)]),e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"种植日期:"),e.createTextVNode(" "+e.toDisplayString(o.plant_date),1)]),e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between"}},[e.createElementVNode("view",{class:"te"},[e.createElementVNode("text",{style:{color:"black","white-space":"nowrap","margin-top":"10rpx"}},"备注:"),e.createTextVNode(" "+e.toDisplayString(o.remark),1)]),2==o.status?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createElementVNode("view",{class:e.normalizeClass(["code-btn",{actBtn:o.showCode}]),onClick:e.withModifiers((e=>{return n[t=i].showCode=!n[t].showCode,void a("log","at pages/landDetail/index.vue:278",n[t].showCode);var t}),["stop"])}," 溯源码",10,["onClick"])])):e.createCommentVNode("",!0)])],8,["onClick"])])])))),128))])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])])])}}},[["__scopeId","data-v-b2c1abd1"]]),Xn={__name:"tudi",setup(t){e.reactive([{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"}]);const a=e.reactive([]),n=e.reactive({}),l=e.ref(""),s=e.ref(!1),c=e.ref(!0),d=e.reactive([[{label:"施肥",route:"/pages/husbandryForm/fertilize"},{label:"除草",route:"/pages/husbandryForm/weeding"},{label:"灌溉",route:"/pages/husbandryForm/irrigate"},{label:"除虫",route:"/pages/husbandryForm/Pest"},{label:"收获",route:"/pages/husbandryForm/harvest"}]]);r((e=>{e.data,l.value=e.data})),i((()=>{u(),m()}));const u=()=>{Pn({plant_id:l.value}).then((e=>{1==e.code&&(2==e.data.status&&(c.value=!1),((e,t,a,o,i)=>{Tn({land_id:e}).then((e=>{1==e.code&&(e.data.kind=t,e.data.datapic=a,e.data.kindarea=o,e.data.breed=i,Object.assign(n,e.data))}))})(e.data.land_id,e.data.kind,e.data.pic,e.data.area,e.data.breed))}))},m=()=>{var e;(e={plant_id:l.value},An.get("/action/list",e)).then((e=>{1==e.code&&a.splice(0,a.length,...e.data)}))},p=e=>{s.value=!1,uni.navigateTo({url:e.value[0].route+"?id="+l.value})},h=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)},f=e=>3==e?"喷灌方式":4==e?"除虫剂种类":2==e?"除草剂种类":1==e?"肥料种类":5==e?"收获":void 0;return(t,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C),c=o(e.resolveDynamicComponent("u--image"),A),u=o(e.resolveDynamicComponent("u-picker"),Oo);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between"}},[e.createElementVNode("view",{class:"tit"}," 苗情监测数据 "),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createVNode(r,{name:"clock",style:{"margin-right":"10rpx"}}),e.createElementVNode("text",{style:{color:"#ACACAC","font-size":"25rpx"}},"刷新时间: "+e.toDisplayString(h()),1)])]),e.createElementVNode("view",{class:"video",onClick:i[0]||(i[0]=e=>{return t="/pages/live/live",void uni.navigateTo({url:t});var t})},[e.createVNode(c,{src:t.url,width:"100%",height:"300rpx"},null,8,["src"])]),e.createVNode(Gn,{info:n,isDetail:!0},null,8,["info"]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit",style:{"font-size":"33.29rpx",margin:"20rpx 0"}}," 操作信息 "),a.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,((t,a)=>{return e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a,onClick:e=>{return a=t.type,void uni.navigateTo({url:"/pages/husbandryForm/detail?land_id="+n.id+"&plant_id="+l.value+"&type="+a});var a}},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left",style:{position:"relative"}},[e.createVNode(c,{onClick:e=>{return a=t.detail.pic,void uni.previewImage({urls:a});var a},radius:"10",src:t.detail.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"]),e.createElementVNode("view",{class:"stick-img",style:{"background-color":"red"}},[e.createVNode(c,{src:(o=t.type,3==o?"/static/main/index/guan_gai.png":4==o?"/static/main/index/chu_chong.png":2==o?"/static/main/index/chu_cao.png":1==o?"/static/main/index/shi_fei.png":5==o?"/static/main/index/shou_huo.png":void 0),class:"stick-img",width:"100rpx",height:"100rpx"},null,8,["src"])])]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"}},[5!=t.type?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createElementVNode("text",{style:{color:"black"}},e.toDisplayString(f(t.type))+": ",1),3==t.type?(e.openBlock(),e.createElementBlock("text",{key:0},e.toDisplayString(1==t.detail.type?"喷灌":2==t.detail.type?"滴灌":"沟灌"),1)):(e.openBlock(),e.createElementBlock("text",{key:1},e.toDisplayString(t.detail.kind),1))])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"参与人员"),e.createTextVNode(":"+e.toDisplayString(t.detail.user)+" ",1),5==t.type?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createElementVNode("text",{style:{color:"black"}},"收获日期:"),e.createTextVNode(" "+e.toDisplayString(t.update_time.slice(0,10)),1)])):e.createCommentVNode("",!0)]),5!=t.type?(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"开始日期"),e.createTextVNode(":"+e.toDisplayString(t.detail.start_date),1)]),e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"结束日期"),e.createTextVNode(":"+e.toDisplayString(t.detail.end_date),1)])])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"te"},[e.createElementVNode("text",{style:{color:"black","white-space":"nowrap"}},"备注"),e.createTextVNode(":"+e.toDisplayString(t.detail.remark),1)])])])],8,["onClick"]);var o})),128))])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])]),e.createElementVNode("view",{class:""},[e.createVNode(u,{keyName:"label",show:s.value,onCancel:i[1]||(i[1]=e=>s.value=!1),onConfirm:p,columns:d},null,8,["show","columns"])])])}}},Zn=x(Xn,[["__scopeId","data-v-50e7cbe8"]]),ei={props:{modelValue:{type:[String,Number],default:w.input.value},type:{type:String,default:w.input.type},fixed:{type:Boolean,default:w.input.fixed},disabled:{type:Boolean,default:w.input.disabled},disabledColor:{type:String,default:w.input.disabledColor},clearable:{type:Boolean,default:w.input.clearable},password:{type:Boolean,default:w.input.password},maxlength:{type:[String,Number],default:w.input.maxlength},placeholder:{type:String,default:w.input.placeholder},placeholderClass:{type:String,default:w.input.placeholderClass},placeholderStyle:{type:[String,Object],default:w.input.placeholderStyle},showWordLimit:{type:Boolean,default:w.input.showWordLimit},confirmType:{type:String,default:w.input.confirmType},confirmHold:{type:Boolean,default:w.input.confirmHold},holdKeyboard:{type:Boolean,default:w.input.holdKeyboard},focus:{type:Boolean,default:w.input.focus},autoBlur:{type:Boolean,default:w.input.autoBlur},disableDefaultPadding:{type:Boolean,default:w.input.disableDefaultPadding},cursor:{type:[String,Number],default:w.input.cursor},cursorSpacing:{type:[String,Number],default:w.input.cursorSpacing},selectionStart:{type:[String,Number],default:w.input.selectionStart},selectionEnd:{type:[String,Number],default:w.input.selectionEnd},adjustPosition:{type:Boolean,default:w.input.adjustPosition},inputAlign:{type:String,default:w.input.inputAlign},fontSize:{type:[String,Number],default:w.input.fontSize},color:{type:String,default:w.input.color},prefixIcon:{type:String,default:w.input.prefixIcon},prefixIconStyle:{type:[String,Object],default:w.input.prefixIconStyle},suffixIcon:{type:String,default:w.input.suffixIcon},suffixIconStyle:{type:[String,Object],default:w.input.suffixIconStyle},border:{type:String,default:w.input.border},readonly:{type:Boolean,default:w.input.readonly},shape:{type:String,default:w.input.shape},formatter:{type:[Function,null],default:w.input.formatter},ignoreCompositionEvent:{type:Boolean,default:!0}}},ti={name:"u-input",mixins:[V,k,ei],data:()=>({innerValue:"",focused:!1,firstChange:!0,changeFromInner:!1,innerFormatter:e=>e}),watch:{modelValue:{immediate:!0,handler(e,t){this.innerValue=e,this.firstChange=!1,this.changeFromInner=!1}}},computed:{isShowClear(){const{clearable:e,readonly:t,focused:a,innerValue:o}=this;return!!e&&!t&&!!a&&""!==o},inputClass(){let e=[],{border:t,disabled:a,shape:o}=this;return"surround"===t&&(e=e.concat(["u-border","u-input--radius"])),e.push(`u-input--${o}`),"bottom"===t&&(e=e.concat(["u-border-bottom","u-input--no-radius"])),e.join(" ")},wrapperStyle(){const e={};return this.disabled&&(e.backgroundColor=this.disabledColor),"none"===this.border?e.padding="0":(e.paddingTop="6px",e.paddingBottom="6px",e.paddingLeft="9px",e.paddingRight="9px"),uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))},inputStyle(){return{color:this.color,fontSize:uni.$u.addUnit(this.fontSize),textAlign:this.inputAlign}}},emits:["update:modelValue","focus","blur","change","confirm","clear","keyboardheightchange"],methods:{setFormatter(e){this.innerFormatter=e},onInput(e){let{value:t=""}=e.detail||{};const a=(this.formatter||this.innerFormatter)(t);this.innerValue=t,this.$nextTick((()=>{this.innerValue=a,this.valueChange()}))},onBlur(e){this.$emit("blur",e.detail.value),uni.$u.sleep(50).then((()=>{this.focused=!1})),uni.$u.formValidate(this,"blur")},onFocus(e){this.focused=!0,this.$emit("focus")},onConfirm(e){this.$emit("confirm",this.innerValue)},onkeyboardheightchange(e){this.$emit("keyboardheightchange",e)},valueChange(){const e=this.innerValue;this.$nextTick((()=>{this.$emit("update:modelValue",e),this.changeFromInner=!0,this.$emit("change",e),uni.$u.formValidate(this,"change")}))},onClear(){this.innerValue="",this.$nextTick((()=>{this.valueChange(),this.$emit("clear")}))},clickHandler(){}}};const ai=x(ti,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["u-input",l.inputClass]),style:e.normalizeStyle([l.wrapperStyle])},[e.createElementVNode("view",{class:"u-input__content"},[t.prefixIcon||t.$slots.prefix?(e.openBlock(),e.createElementBlock("view",{key:0,class:"u-input__content__prefix-icon"},[e.renderSlot(t.$slots,"prefix",{},(()=>[e.createVNode(s,{name:t.prefixIcon,size:"18",customStyle:t.prefixIconStyle},null,8,["name","customStyle"])]),!0)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"u-input__content__field-wrapper",onClick:a[5]||(a[5]=(...e)=>l.clickHandler&&l.clickHandler(...e))},[e.createElementVNode("input",{class:"u-input__content__field-wrapper__field",style:e.normalizeStyle([l.inputStyle]),type:t.type,focus:t.focus,cursor:t.cursor,value:r.innerValue,"auto-blur":t.autoBlur,disabled:t.disabled||t.readonly,maxlength:t.maxlength,placeholder:t.placeholder,"placeholder-style":t.placeholderStyle,"placeholder-class":t.placeholderClass,"confirm-type":t.confirmType,"confirm-hold":t.confirmHold,"hold-keyboard":t.holdKeyboard,"cursor-spacing":t.cursorSpacing,"adjust-position":t.adjustPosition,"selection-end":t.selectionEnd,"selection-start":t.selectionStart,password:t.password||"password"===t.type||void 0,ignoreCompositionEvent:t.ignoreCompositionEvent,onInput:a[0]||(a[0]=(...e)=>l.onInput&&l.onInput(...e)),onBlur:a[1]||(a[1]=(...e)=>l.onBlur&&l.onBlur(...e)),onFocus:a[2]||(a[2]=(...e)=>l.onFocus&&l.onFocus(...e)),onConfirm:a[3]||(a[3]=(...e)=>l.onConfirm&&l.onConfirm(...e)),onKeyboardheightchange:a[4]||(a[4]=(...e)=>l.onkeyboardheightchange&&l.onkeyboardheightchange(...e))},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"])]),l.isShowClear?(e.openBlock(),e.createElementBlock("view",{key:1,class:"u-input__content__clear",onClick:a[6]||(a[6]=(...e)=>l.onClear&&l.onClear(...e))},[e.createVNode(s,{name:"close",size:"11",color:"#ffffff",customStyle:"line-height: 12px"})])):e.createCommentVNode("",!0),t.suffixIcon||t.$slots.suffix?(e.openBlock(),e.createElementBlock("view",{key:2,class:"u-input__content__subfix-icon"},[e.renderSlot(t.$slots,"suffix",{},(()=>[e.createVNode(s,{name:t.suffixIcon,size:"18",customStyle:t.suffixIconStyle},null,8,["name","customStyle"])]),!0)])):e.createCommentVNode("",!0)])],6)}],["__scopeId","data-v-356ef207"]]),oi={props:{label:{type:String,default:w.formItem.label},prop:{type:String,default:w.formItem.prop},borderBottom:{type:[String,Boolean],default:w.formItem.borderBottom},labelWidth:{type:[String,Number],default:w.formItem.labelWidth},rightIcon:{type:String,default:w.formItem.rightIcon},leftIcon:{type:String,default:w.formItem.leftIcon},required:{type:Boolean,default:w.formItem.required},leftIconStyle:{type:[String,Object],default:w.formItem.leftIconStyle}}};const ni=x({name:"u-form-item",mixins:[V,k,oi],data:()=>({message:"",parentData:{labelPosition:"left",labelAlign:"left",labelStyle:{},labelWidth:45,errorType:"message"}}),computed:{propsLine:()=>uni.$u.props.line},mounted(){this.init()},emits:["click"],methods:{init(){this.updateParentData(),this.parent||uni.$u.error("u-form-item需要结合u-form组件使用")},updateParentData(){this.getParentData("u-form")},clearValidate(){this.message=null},resetField(){const e=uni.$u.getProperty(this.parent.originalModel,this.prop);uni.$u.setProperty(this.parent.model,this.prop,e),this.message=null},clickHandler(){this.$emit("click")}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-icon"),C),c=o(e.resolveDynamicComponent("u-line"),O);return e.openBlock(),e.createElementBlock("view",{class:"u-form-item"},[e.createElementVNode("view",{class:"u-form-item__body",onClick:a[0]||(a[0]=(...e)=>l.clickHandler&&l.clickHandler(...e)),style:e.normalizeStyle([t.$u.addStyle(t.customStyle),{flexDirection:"left"===r.parentData.labelPosition?"row":"column"}])},[e.renderSlot(t.$slots,"label",{},(()=>[t.required||t.leftIcon||t.label?(e.openBlock(),e.createElementBlock("view",{key:0,class:"u-form-item__body__left",style:e.normalizeStyle({width:t.$u.addUnit(t.labelWidth||r.parentData.labelWidth),marginBottom:"left"===r.parentData.labelPosition?0:"5px"})},[e.createElementVNode("view",{class:"u-form-item__body__left__content"},[t.required?(e.openBlock(),e.createElementBlock("text",{key:0,class:"u-form-item__body__left__content__required"},"*")):e.createCommentVNode("",!0),t.leftIcon?(e.openBlock(),e.createElementBlock("view",{key:1,class:"u-form-item__body__left__content__icon"},[e.createVNode(s,{name:t.leftIcon,"custom-style":t.leftIconStyle},null,8,["name","custom-style"])])):e.createCommentVNode("",!0),e.createElementVNode("text",{class:"u-form-item__body__left__content__label",style:e.normalizeStyle([r.parentData.labelStyle,{justifyContent:"left"===r.parentData.labelAlign?"flex-start":"center"===r.parentData.labelAlign?"center":"flex-end"}])},e.toDisplayString(t.label),5)])],4)):e.createCommentVNode("",!0)]),!0),e.createElementVNode("view",{class:"u-form-item__body__right"},[e.createElementVNode("view",{class:"u-form-item__body__right__content"},[e.createElementVNode("view",{class:"u-form-item__body__right__content__slot"},[e.renderSlot(t.$slots,"default",{},void 0,!0)]),t.$slots.right?(e.openBlock(),e.createElementBlock("view",{key:0,class:"item__body__right__content__icon"},[e.renderSlot(t.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)])])],4),e.renderSlot(t.$slots,"error",{},(()=>[r.message&&"message"===r.parentData.errorType?(e.openBlock(),e.createElementBlock("text",{key:0,class:"u-form-item__body__right__message",style:e.normalizeStyle({marginLeft:t.$u.addUnit("top"===r.parentData.labelPosition?0:t.labelWidth||r.parentData.labelWidth)})},e.toDisplayString(r.message),5)):e.createCommentVNode("",!0)]),!0),t.borderBottom?(e.openBlock(),e.createBlock(c,{key:0,color:r.message&&"border-bottom"===r.parentData.errorType?t.$u.color.error:l.propsLine.color,customStyle:`margin-top: ${r.message&&"message"===r.parentData.errorType?"5px":0}`},null,8,["color","customStyle"])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-d55abdea"]]),ii={props:{value:{type:[String,Number],default:w.textarea.value},modelValue:{type:[String,Number],default:w.textarea.value},placeholder:{type:[String,Number],default:w.textarea.placeholder},placeholderClass:{type:String,default:w.input.placeholderClass},placeholderStyle:{type:[String,Object],default:w.input.placeholderStyle},height:{type:[String,Number],default:w.textarea.height},confirmType:{type:String,default:w.textarea.confirmType},disabled:{type:Boolean,default:w.textarea.disabled},count:{type:Boolean,default:w.textarea.count},focus:{type:Boolean,default:w.textarea.focus},autoHeight:{type:Boolean,default:w.textarea.autoHeight},fixed:{type:Boolean,default:w.textarea.fixed},cursorSpacing:{type:Number,default:w.textarea.cursorSpacing},cursor:{type:[String,Number],default:w.textarea.cursor},showConfirmBar:{type:Boolean,default:w.textarea.showConfirmBar},selectionStart:{type:Number,default:w.textarea.selectionStart},selectionEnd:{type:Number,default:w.textarea.selectionEnd},adjustPosition:{type:Boolean,default:w.textarea.adjustPosition},disableDefaultPadding:{type:Boolean,default:w.textarea.disableDefaultPadding},holdKeyboard:{type:Boolean,default:w.textarea.holdKeyboard},maxlength:{type:[String,Number],default:w.textarea.maxlength},border:{type:String,default:w.textarea.border},formatter:{type:[Function,null],default:w.textarea.formatter},ignoreCompositionEvent:{type:Boolean,default:!0}}},ri={name:"u-textarea",mixins:[V,k,ii],data:()=>({innerValue:"",focused:!1,firstChange:!0,changeFromInner:!1,innerFormatter:e=>e}),created(){},watch:{modelValue:{immediate:!0,handler(e,t){this.innerValue=e,this.firstChange=!1,this.changeFromInner=!1}}},computed:{textareaClass(){let e=[],{border:t,disabled:a}=this;return"surround"===t&&(e=e.concat(["u-border","u-textarea--radius"])),"bottom"===t&&(e=e.concat(["u-border-bottom","u-textarea--no-radius"])),a&&e.push("u-textarea--disabled"),e.join(" ")},textareaStyle(){return uni.$u.deepMerge({},uni.$u.addStyle(this.customStyle))}},emits:["update:modelValue","linechange","focus","blur","change","confirm","keyboardheightchange"],methods:{setFormatter(e){this.innerFormatter=e},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e),uni.$u.formValidate(this,"blur")},onLinechange(e){this.$emit("linechange",e)},onInput(e){let{value:t=""}=e.detail||{};const a=(this.formatter||this.innerFormatter)(t);this.innerValue=t,this.$nextTick((()=>{this.innerValue=a,this.valueChange()}))},valueChange(){const e=this.innerValue;this.$nextTick((()=>{this.$emit("update:modelValue",e),this.changeFromInner=!0,this.$emit("change",e),uni.$u.formValidate(this,"change")}))},onConfirm(e){this.$emit("confirm",e)},onKeyboardheightchange(e){this.$emit("keyboardheightchange",e)}}};const li=x(ri,[["render",function(t,a,o,n,i,r){return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["u-textarea",r.textareaClass]),style:e.normalizeStyle([r.textareaStyle])},[e.createElementVNode("textarea",{class:"u-textarea__field",value:i.innerValue,style:e.normalizeStyle({height:t.$u.addUnit(t.height)}),placeholder:t.placeholder,"placeholder-style":t.$u.addStyle(t.placeholderStyle,"string"),"placeholder-class":t.placeholderClass,disabled:t.disabled,focus:t.focus,autoHeight:t.autoHeight,fixed:t.fixed,cursorSpacing:t.cursorSpacing,cursor:t.cursor,showConfirmBar:t.showConfirmBar,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd,adjustPosition:t.adjustPosition,disableDefaultPadding:t.disableDefaultPadding,holdKeyboard:t.holdKeyboard,maxlength:t.maxlength,"confirm-type":t.confirmType,ignoreCompositionEvent:t.ignoreCompositionEvent,onFocus:a[0]||(a[0]=(...e)=>r.onFocus&&r.onFocus(...e)),onBlur:a[1]||(a[1]=(...e)=>r.onBlur&&r.onBlur(...e)),onLinechange:a[2]||(a[2]=(...e)=>r.onLinechange&&r.onLinechange(...e)),onInput:a[3]||(a[3]=(...e)=>r.onInput&&r.onInput(...e)),onConfirm:a[4]||(a[4]=(...e)=>r.onConfirm&&r.onConfirm(...e)),onKeyboardheightchange:a[5]||(a[5]=(...e)=>r.onKeyboardheightchange&&r.onKeyboardheightchange(...e))},null,44,["value","placeholder","placeholder-style","placeholder-class","disabled","focus","autoHeight","fixed","cursorSpacing","cursor","showConfirmBar","selectionStart","selectionEnd","adjustPosition","disableDefaultPadding","holdKeyboard","maxlength","confirm-type","ignoreCompositionEvent"]),t.count?(e.openBlock(),e.createElementBlock("text",{key:0,class:"u-textarea__count",style:e.normalizeStyle({"background-color":t.disabled?"transparent":"#fff"})},e.toDisplayString(i.innerValue.length)+"/"+e.toDisplayString(t.maxlength),5)):e.createCommentVNode("",!0)],6)}],["__scopeId","data-v-7ae8b562"]]),si={props:{model:{type:Object,default:w.form.model},rules:{type:[Object,Function,Array],default:w.form.rules},errorType:{type:String,default:w.form.errorType},borderBottom:{type:Boolean,default:w.form.borderBottom},labelPosition:{type:String,default:w.form.labelPosition},labelWidth:{type:[String,Number],default:w.form.labelWidth},labelAlign:{type:String,default:w.form.labelAlign},labelStyle:{type:Object,default:w.form.labelStyle}}},ci=/%[sdj%]/g;let di=function(){};function ui(e){if(!e||!e.length)return null;const t={};return e.forEach((e=>{const{field:a}=e;t[a]=t[a]||[],t[a].push(e)})),t}function mi(){for(var e=arguments.length,t=new Array(e),a=0;a{if("%%"===e)return"%";if(o>=i)return e;switch(e){case"%s":return String(t[o++]);case"%d":return Number(t[o++]);case"%j":try{return JSON.stringify(t[o++])}catch(a){return"[Circular]"}break;default:return e}}));for(let a=t[o];o{const i=function(e){const t=[];return Object.keys(e).forEach((a=>{t.push.apply(t,e[a])})),t}(e);hi(i,a,(function(e){return o(e),e.length?n({errors:e,fields:ui(e)}):t()}))}));return t.catch((e=>e)),t}let n=t.firstFields||[];!0===n&&(n=Object.keys(e));const i=Object.keys(e),r=i.length;let l=0;const s=[],c=new Promise(((t,c)=>{const d=function(e){if(s.push.apply(s,e),l++,l===r)return o(s),s.length?c({errors:s,fields:ui(s)}):t()};i.length||(o(s),t()),i.forEach((t=>{const o=e[t];-1!==n.indexOf(t)?hi(o,a,d):function(e,t,a){const o=[];let n=0;const i=e.length;function r(e){o.push.apply(o,e),n++,n===i&&a(o)}e.forEach((e=>{t(e,r)}))}(o,a,d)}))}));return c.catch((e=>e)),c}function gi(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:"function"==typeof t?t():t,field:t.field||e.fullField}}}function vi(e,t){if(t)for(const a in t)if(t.hasOwnProperty(a)){const o=t[a];"object"==typeof o&&"object"==typeof e[a]?e[a]={...e[a],...o}:e[a]=o}return e}function yi(e,t,a,o,n,i){!e.required||a.hasOwnProperty(e.field)&&!pi(t,i||e.type)||o.push(mi(n.messages.required,e.fullField))}"undefined"!=typeof process&&process.env;const bi={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i};var wi={integer:function(e){return/^(-)?\d+$/.test(e)},float:function(e){return/^(-)?\d+(\.\d+)?$/.test(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(it){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear},number:function(e){return!isNaN(e)&&"number"==typeof+e},object:function(e){return"object"==typeof e&&!wi.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&!!e.match(bi.email)&&e.length<255},url:function(e){return"string"==typeof e&&!!e.match(bi.url)},hex:function(e){return"string"==typeof e&&!!e.match(bi.hex)}};const _i={required:yi,whitespace:function(e,t,a,o,n){(/^\s+$/.test(t)||""===t)&&o.push(mi(n.messages.whitespace,e.fullField))},type:function(e,t,a,o,n){if(e.required&&void 0===t)return void yi(e,t,a,o,n);const i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?wi[i](t)||o.push(mi(n.messages.types[i],e.fullField,e.type)):i&&typeof t!==e.type&&o.push(mi(n.messages.types[i],e.fullField,e.type))},range:function(e,t,a,o,n){const i="number"==typeof e.len,r="number"==typeof e.min,l="number"==typeof e.max,s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let c=t,d=null;const u="number"==typeof t,m="string"==typeof t,p=Array.isArray(t);if(u?d="number":m?d="string":p&&(d="array"),!d)return!1;p&&(c=t.length),m&&(c=t.replace(s,"_").length),i?c!==e.len&&o.push(mi(n.messages[d].len,e.fullField,e.len)):r&&!l&&ce.max?o.push(mi(n.messages[d].max,e.fullField,e.max)):r&&l&&(ce.max)&&o.push(mi(n.messages[d].range,e.fullField,e.min,e.max))},enum:function(e,t,a,o,n){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&o.push(mi(n.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,a,o,n){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||o.push(mi(n.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||o.push(mi(n.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};function Vi(e,t,a,o,n){const i=e.type,r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t,i)&&!e.required)return a();_i.required(e,t,o,r,n,i),pi(t,i)||_i.type(e,t,o,r,n)}a(r)}const ki={string:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t,"string")&&!e.required)return a();_i.required(e,t,o,i,n,"string"),pi(t,"string")||(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n),_i.pattern(e,t,o,i,n),!0===e.whitespace&&_i.whitespace(e,t,o,i,n))}a(i)},method:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&_i.type(e,t,o,i,n)}a(i)},number:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(""===t&&(t=void 0),pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n))}a(i)},boolean:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&_i.type(e,t,o,i,n)}a(i)},regexp:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),pi(t)||_i.type(e,t,o,i,n)}a(i)},integer:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n))}a(i)},float:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n))}a(i)},array:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t,"array")&&!e.required)return a();_i.required(e,t,o,i,n,"array"),pi(t,"array")||(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n))}a(i)},object:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&_i.type(e,t,o,i,n)}a(i)},enum:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&_i.enum(e,t,o,i,n)}a(i)},pattern:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t,"string")&&!e.required)return a();_i.required(e,t,o,i,n),pi(t,"string")||_i.pattern(e,t,o,i,n)}a(i)},date:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();if(_i.required(e,t,o,i,n),!pi(t)){let a;a="number"==typeof t?new Date(t):t,_i.type(e,a,o,i,n),a&&_i.range(e,a.getTime(),o,i,n)}}a(i)},url:Vi,hex:Vi,email:Vi,required:function(e,t,a,o,n){const i=[],r=Array.isArray(t)?"array":typeof t;_i.required(e,t,o,i,n,r),a(i)},any:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n)}a(i)}};function xi(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){const e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}const Ni=xi();function Ci(e){this.rules=null,this._messages=Ni,this.define(e)}Ci.prototype={messages:function(e){return e&&(this._messages=vi(xi(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");let t,a;for(t in this.rules={},e)e.hasOwnProperty(t)&&(a=e[t],this.rules[t]=Array.isArray(a)?a:[a])},validate:function(e,t,a){const o=this;void 0===t&&(t={}),void 0===a&&(a=function(){});let n,i,r=e,l=t,s=a;if("function"==typeof l&&(s=l,l={}),!this.rules||0===Object.keys(this.rules).length)return s&&s(),Promise.resolve();if(l.messages){let e=this.messages();e===Ni&&(e=xi()),vi(e,l.messages),l.messages=e}else l.messages=this.messages();const c={};(l.keys||Object.keys(this.rules)).forEach((t=>{n=o.rules[t],i=r[t],n.forEach((a=>{let n=a;"function"==typeof n.transform&&(r===e&&(r={...r}),i=r[t]=n.transform(i)),n="function"==typeof n?{validator:n}:{...n},n.validator=o.getValidationMethod(n),n.field=t,n.fullField=n.fullField||t,n.type=o.getType(n),n.validator&&(c[t]=c[t]||[],c[t].push({rule:n,value:i,source:r,field:t}))}))}));const d={};return fi(c,l,((e,t)=>{const{rule:a}=e;let o,n=!("object"!==a.type&&"array"!==a.type||"object"!=typeof a.fields&&"object"!=typeof a.defaultField);function i(e,t){return{...t,fullField:`${a.fullField}.${e}`}}function r(o){void 0===o&&(o=[]);let r=o;if(Array.isArray(r)||(r=[r]),!l.suppressWarning&&r.length&&Ci.warning("async-validator:",r),r.length&&a.message&&(r=[].concat(a.message)),r=r.map(gi(a)),l.first&&r.length)return d[a.field]=1,t(r);if(n){if(a.required&&!e.value)return r=a.message?[].concat(a.message).map(gi(a)):l.error?[l.error(a,mi(l.messages.required,a.field))]:[],t(r);let o={};if(a.defaultField)for(const t in e.value)e.value.hasOwnProperty(t)&&(o[t]=a.defaultField);o={...o,...e.rule.fields};for(const e in o)if(o.hasOwnProperty(e)){const t=Array.isArray(o[e])?o[e]:[o[e]];o[e]=t.map(i.bind(null,e))}const n=new Ci(o);n.messages(l.messages),e.rule.options&&(e.rule.options.messages=l.messages,e.rule.options.error=l.error),n.validate(e.value,e.rule.options||l,(e=>{const a=[];r&&r.length&&a.push.apply(a,r),e&&e.length&&a.push.apply(a,e),t(a.length?a:null)}))}else t(r)}n=n&&(a.required||!a.required&&e.value),a.field=e.field,a.asyncValidator?o=a.asyncValidator(a,e.value,r,e.source,l):a.validator&&(o=a.validator(a,e.value,r,e.source,l),!0===o?r():!1===o?r(a.message||`${a.field} fails`):o instanceof Array?r(o):o instanceof Error&&r(o.message)),o&&o.then&&o.then((()=>r()),(e=>r(e)))}),(e=>{!function(e){let t,a=[],o={};function n(e){if(Array.isArray(e)){let t;a=(t=a).concat.apply(t,e)}else a.push(e)}for(t=0;t({formRules:{},validator:{},originalModel:null}),watch:{rules:{immediate:!0,handler(e){this.setRules(e)}},propsChange(e){var t;(null==(t=this.children)?void 0:t.length)&&this.children.map((e=>{"function"==typeof e.updateParentData&&e.updateParentData()}))},model:{immediate:!0,handler(e){this.originalModel||(this.originalModel=uni.$u.deepClone(e))}}},computed:{propsChange(){return[this.errorType,this.borderBottom,this.labelPosition,this.labelWidth,this.labelAlign,this.labelStyle]}},created(){this.children=[]},methods:{setRules(e){0!==Object.keys(e).length&&(this.formRules=e,this.validator=new Ci(e))},resetFields(){this.resetModel()},resetModel(e){this.children.map((e=>{const t=null==e?void 0:e.prop,a=uni.$u.getProperty(this.originalModel,t);uni.$u.setProperty(this.model,t,a)}))},clearValidate(e){e=[].concat(e),this.children.map((t=>{(void 0===e[0]||e.includes(t.prop))&&(t.message=null)}))},async validateField(e,t,a=null){this.$nextTick((()=>{const o=[];e=[].concat(e),this.children.map((t=>{const n=[];if(e.includes(t.prop)){const e=uni.$u.getProperty(this.model,t.prop),i=t.prop.split("."),r=i[i.length-1],l=this.formRules[t.prop];if(!l)return;const s=[].concat(l);for(let c=0;c{var i;uni.$u.test.array(e)&&(o.push(...e),n.push(...e)),t.message=(null==(i=n[0])?void 0:i.message)?n[0].message:null}))}}})),"function"==typeof t&&t(o)}))},validate(e){return new Promise(((e,t)=>{this.$nextTick((()=>{const a=this.children.map((e=>e.prop));this.validateField(a,(a=>{a.length?("toast"===this.errorType&&uni.$u.toast(a[0].message),t(a)):e(!0)}))}))}))}}},[["render",function(t,a,o,n,i,r){return e.openBlock(),e.createElementBlock("view",{class:"u-form"},[e.renderSlot(t.$slots,"default")])}]]),Bi={props:{hairline:{type:Boolean,default:w.button.hairline},type:{type:String,default:w.button.type},size:{type:String,default:w.button.size},shape:{type:String,default:w.button.shape},plain:{type:Boolean,default:w.button.plain},disabled:{type:Boolean,default:w.button.disabled},loading:{type:Boolean,default:w.button.loading},loadingText:{type:[String,Number],default:w.button.loadingText},loadingMode:{type:String,default:w.button.loadingMode},loadingSize:{type:[String,Number],default:w.button.loadingSize},openType:{type:String,default:w.button.openType},formType:{type:String,default:w.button.formType},appParameter:{type:String,default:w.button.appParameter},hoverStopPropagation:{type:Boolean,default:w.button.hoverStopPropagation},lang:{type:String,default:w.button.lang},sessionFrom:{type:String,default:w.button.sessionFrom},sendMessageTitle:{type:String,default:w.button.sendMessageTitle},sendMessagePath:{type:String,default:w.button.sendMessagePath},sendMessageImg:{type:String,default:w.button.sendMessageImg},showMessageCard:{type:Boolean,default:w.button.showMessageCard},dataName:{type:String,default:w.button.dataName},throttleTime:{type:[String,Number],default:w.button.throttleTime},hoverStartTime:{type:[String,Number],default:w.button.hoverStartTime},hoverStayTime:{type:[String,Number],default:w.button.hoverStayTime},text:{type:[String,Number],default:w.button.text},icon:{type:String,default:w.button.icon},iconColor:{type:String,default:w.button.icon},color:{type:String,default:w.button.color}}};const Si=x({name:"u-button",mixins:[V,k,Bi],data:()=>({}),computed:{bemClass(){return this.color?this.bem("button",["shape","size"],["disabled","plain","hairline"]):this.bem("button",["type","shape","size"],["disabled","plain","hairline"])},loadingColor(){return this.plain?this.color?this.color:uni.$u.config.color[`u-${this.type}`]:"info"===this.type?"#c9c9c9":"rgb(200, 200, 200)"},iconColorCom(){return this.iconColor?this.iconColor:this.plain?this.color?this.color:this.type:"info"===this.type?"#000000":"#ffffff"},baseColor(){let e={};return this.color&&(e.color=this.plain?this.color:"white",this.plain||(e["background-color"]=this.color),-1!==this.color.indexOf("gradient")?(e.borderTopWidth=0,e.borderRightWidth=0,e.borderBottomWidth=0,e.borderLeftWidth=0,this.plain||(e.backgroundImage=this.color)):(e.borderColor=this.color,e.borderWidth="1px",e.borderStyle="solid")),e},nvueTextStyle(){let e={};return"info"===this.type&&(e.color="#323233"),this.color&&(e.color=this.plain?this.color:"white"),e.fontSize=this.textSize+"px",e},textSize(){let e=14,{size:t}=this;return"large"===t&&(e=16),"normal"===t&&(e=14),"small"===t&&(e=12),"mini"===t&&(e=10),e}},emits:["click","getphonenumber","getuserinfo","error","opensetting","launchapp"],methods:{clickHandler(){this.disabled||this.loading||uni.$u.throttle((()=>{this.$emit("click")}),this.throttleTime)},getphonenumber(e){this.$emit("getphonenumber",e)},getuserinfo(e){this.$emit("getuserinfo",e)},error(e){this.$emit("error",e)},opensetting(e){this.$emit("opensetting",e)},launchapp(e){this.$emit("launchapp",e)}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-loading-icon"),T),c=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("button",{"hover-start-time":Number(t.hoverStartTime),"hover-stay-time":Number(t.hoverStayTime),"form-type":t.formType,"open-type":t.openType,"app-parameter":t.appParameter,"hover-stop-propagation":t.hoverStopPropagation,"send-message-title":t.sendMessageTitle,"send-message-path":t.sendMessagePath,lang:t.lang,"data-name":t.dataName,"session-from":t.sessionFrom,"send-message-img":t.sendMessageImg,"show-message-card":t.showMessageCard,onGetphonenumber:a[0]||(a[0]=(...e)=>l.getphonenumber&&l.getphonenumber(...e)),onGetuserinfo:a[1]||(a[1]=(...e)=>l.getuserinfo&&l.getuserinfo(...e)),onError:a[2]||(a[2]=(...e)=>l.error&&l.error(...e)),onOpensetting:a[3]||(a[3]=(...e)=>l.opensetting&&l.opensetting(...e)),onLaunchapp:a[4]||(a[4]=(...e)=>l.launchapp&&l.launchapp(...e)),"hover-class":t.disabled||t.loading?"":"u-button--active",class:e.normalizeClass(["u-button u-reset-button",l.bemClass]),style:e.normalizeStyle([l.baseColor,t.$u.addStyle(t.customStyle)]),onClick:a[5]||(a[5]=(...e)=>l.clickHandler&&l.clickHandler(...e))},[t.loading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{mode:t.loadingMode,size:1.15*t.loadingSize,color:l.loadingColor},null,8,["mode","size","color"]),e.createElementVNode("text",{class:"u-button__loading-text",style:e.normalizeStyle([{fontSize:l.textSize+"px"}])},e.toDisplayString(t.loadingText||t.text),5)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.icon?(e.openBlock(),e.createBlock(c,{key:0,name:t.icon,color:l.iconColorCom,size:1.35*l.textSize,customStyle:{marginRight:"2px"}},null,8,["name","color","size"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("text",{class:"u-button__text",style:e.normalizeStyle([{fontSize:l.textSize+"px"}])},e.toDisplayString(t.text),5)]),!0)],64))],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"])}],["__scopeId","data-v-e1d8b758"]]),Di={props:{show:{type:Boolean,default:w.datetimePicker.show},showToolbar:{type:Boolean,default:w.datetimePicker.showToolbar},modelValue:{type:[String,Number],default:w.datetimePicker.value},title:{type:String,default:w.datetimePicker.title},mode:{type:String,default:w.datetimePicker.mode},maxDate:{type:Number,default:w.datetimePicker.maxDate},minDate:{type:Number,default:w.datetimePicker.minDate},minHour:{type:Number,default:w.datetimePicker.minHour},maxHour:{type:Number,default:w.datetimePicker.maxHour},minMinute:{type:Number,default:w.datetimePicker.minMinute},maxMinute:{type:Number,default:w.datetimePicker.maxMinute},filter:{type:[Function,null],default:w.datetimePicker.filter},formatter:{type:[Function,null],default:w.datetimePicker.formatter},loading:{type:Boolean,default:w.datetimePicker.loading},itemHeight:{type:[String,Number],default:w.datetimePicker.itemHeight},cancelText:{type:String,default:w.datetimePicker.cancelText},confirmText:{type:String,default:w.datetimePicker.confirmText},cancelColor:{type:String,default:w.datetimePicker.cancelColor},confirmColor:{type:String,default:w.datetimePicker.confirmColor},visibleItemCount:{type:[String,Number],default:w.datetimePicker.visibleItemCount},closeOnClickOverlay:{type:Boolean,default:w.datetimePicker.closeOnClickOverlay},defaultIndex:{type:Array,default:w.datetimePicker.defaultIndex}}};var Ai=1e3,Ii=6e4,Ti=36e5,Pi="millisecond",Fi="second",Ui="minute",Oi="hour",qi="day",$i="week",Li="month",zi="quarter",ji="year",Mi="date",Ri="Invalid Date",Hi=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Qi=/\[([^\]]+)]|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 Wi={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(e){var t=["th","st","nd","rd"],a=e%100;return"["+e+(t[(a-20)%10]||t[a]||t[0])+"]"}};var Ji=function(e,t,a){var o=String(e);return!o||o.length>=t?e:""+Array(t+1-o.length).join(a)+e};const Ki={s:Ji,z:function(e){var t=-e.utcOffset(),a=Math.abs(t),o=Math.floor(a/60),n=a%60;return(t<=0?"+":"-")+Ji(o,2,"0")+":"+Ji(n,2,"0")},m:function e(t,a){if(t.date()1)return e(r[0])}else{var l=t.name;Yi[l]=t,n=l}return!o&&n&&(Gi=n),n||!o&&Gi},tr=function(e,t){if(Zi(e))return e.clone();var a="object"==typeof t?t:{};return a.date=e,a.args=arguments,new or(a)},ar=Ki;ar.l=er,ar.i=Zi,ar.w=function(e,t){return tr(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var or=function(){function e(e){this.$L=er(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[Xi]=!0}var t=e.prototype;return t.parse=function(e){this.$d=function(e){var t=e.date,a=e.utc;if(null===t)return new Date(NaN);if(ar.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var o=t.match(Hi);if(o){var n=o[2]-1||0,i=(o[7]||"0").substring(0,3);return a?new Date(Date.UTC(o[1],n,o[3]||1,o[4]||0,o[5]||0,o[6]||0,i)):new Date(o[1],n,o[3]||1,o[4]||0,o[5]||0,o[6]||0,i)}}return new Date(t)}(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return ar},t.isValid=function(){return!(this.$d.toString()===Ri)},t.isSame=function(e,t){var a=tr(e);return this.startOf(t)<=a&&a<=this.endOf(t)},t.isAfter=function(e,t){return tr(e)({columns:[],innerDefaultIndex:[],innerFormatter:(e,t)=>t}),watch:{show(e,t){e&&this.updateColumnValue(this.innerValue)},propsChange(){this.init()}},computed:{propsChange(){return[this.mode,this.maxDate,this.minDate,this.minHour,this.maxHour,this.minMinute,this.maxMinute,this.filter]}},mounted(){this.init()},emits:["close","cancel","confirm","change","update:modelValue"],methods:{init(){this.innerValue=this.correctValue(this.modelValue),this.updateColumnValue(this.innerValue)},setFormatter(e){this.innerFormatter=e},close(){this.closeOnClickOverlay&&this.$emit("close")},cancel(){this.$emit("cancel")},confirm(){this.$emit("confirm",{value:this.innerValue,mode:this.mode}),this.$emit("update:modelValue",this.innerValue)},intercept(e,t){let a=e.match(/\d+/g);return a.length>1?(uni.$u.error("请勿在过滤或格式化函数时添加数字"),0):t&&4==a[0].length?a[0]:a[0].length>2?(uni.$u.error("请勿在过滤或格式化函数时添加数字"),0):a[0]},change(e){const{indexs:t,values:a}=e;let o="";if("time"===this.mode)o=`${this.intercept(a[0][t[0]])}:${this.intercept(a[1][t[1]])}`;else{const e=parseInt(this.intercept(a[0][t[0]],"year")),n=parseInt(this.intercept(a[1][t[1]]));let i=parseInt(a[2]?this.intercept(a[2][t[2]]):1),r=0,l=0;const s=tr(`${e}-${n}`).daysInMonth();"year-month"===this.mode&&(i=1),i=Math.min(s,i),"datetime"===this.mode&&(r=parseInt(this.intercept(a[3][t[3]])),l=parseInt(this.intercept(a[4][t[4]]))),o=Number(new Date(e,n-1,i,r,l))}o=this.correctValue(o),this.innerValue=o,this.updateColumnValue(o),this.$emit("change",{value:o,picker:this.$refs.picker,mode:this.mode})},updateColumnValue(e){this.innerValue=e,this.updateColumns(),this.updateIndexs(e)},updateIndexs(e){let t=[];const a=this.formatter||this.innerFormatter,o=uni.$u.padZero;if("time"===this.mode){const o=e.split(":");t=[a("hour",o[0]),a("minute",o[1])]}else t=[a("year",`${tr(e).year()}`),a("month",o(tr(e).month()+1))],"date"===this.mode&&t.push(a("day",o(tr(e).date()))),"datetime"===this.mode&&t.push(a("day",o(tr(e).date())),a("hour",o(tr(e).hour())),a("minute",o(tr(e).minute())));const n=this.columns.map(((e,a)=>Math.max(0,e.findIndex((e=>e===t[a])))));this.innerDefaultIndex=n},updateColumns(){const e=this.formatter||this.innerFormatter,t=this.getOriginColumns().map((t=>t.values.map((a=>e(t.type,a)))));this.columns=t},getOriginColumns(){return this.getRanges().map((({type:e,range:t})=>{let a=function(e,t){let a=-1;const o=Array(e<0?0:e);for(;++a{let o=t[0]+a;return o="year"===e?`${o}`:uni.$u.padZero(o),o}));return this.filter&&(a=this.filter(e,a)),{type:e,values:a}}))},generateArray:(e,t)=>Array.from(new Array(t+1).keys()).slice(e),correctValue(e){const t="time"!==this.mode;if(t&&!uni.$u.test.date(e)?e=this.minDate:t||e||(e=`${uni.$u.padZero(this.minHour)}:${uni.$u.padZero(this.minMinute)}`),t)return e=tr(e).isBefore(tr(this.minDate))?this.minDate:e,e=tr(e).isAfter(tr(this.maxDate))?this.maxDate:e;{if(-1===String(e).indexOf(":"))return uni.$u.error("时间错误,请传递如12:24的格式");let[t,a]=e.split(":");return t=uni.$u.padZero(uni.$u.range(this.minHour,this.maxHour,Number(t))),a=uni.$u.padZero(uni.$u.range(this.minMinute,this.maxMinute,Number(a))),`${t}:${a}`}},getRanges(){if("time"===this.mode)return[{type:"hour",range:[this.minHour,this.maxHour]},{type:"minute",range:[this.minMinute,this.maxMinute]}];const{maxYear:e,maxDate:t,maxMonth:a,maxHour:o,maxMinute:n}=this.getBoundary("max",this.innerValue),{minYear:i,minDate:r,minMonth:l,minHour:s,minMinute:c}=this.getBoundary("min",this.innerValue),d=[{type:"year",range:[i,e]},{type:"month",range:[l,a]},{type:"day",range:[r,t]},{type:"hour",range:[s,o]},{type:"minute",range:[c,n]}];return"date"===this.mode&&d.splice(3,2),"year-month"===this.mode&&d.splice(2,3),d},getBoundary(e,t){const a=new Date(t),o=new Date(this[`${e}Date`]),n=tr(o).year();let i=1,r=1,l=0,s=0;return"max"===e&&(i=12,r=tr(a).daysInMonth(),l=23,s=59),tr(a).year()===n&&(i=tr(o).month()+1,tr(a).month()+1===i&&(r=tr(o).date(),tr(a).date()===r&&(l=tr(o).hour(),tr(a).hour()===l&&(s=tr(o).minute())))),{[`${e}Year`]:n,[`${e}Month`]:i,[`${e}Date`]:r,[`${e}Hour`]:l,[`${e}Minute`]:s}}}};const rr=x(ir,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-picker"),Oo);return e.openBlock(),e.createBlock(s,{ref:"picker",show:t.show,closeOnClickOverlay:t.closeOnClickOverlay,columns:r.columns,title:t.title,itemHeight:t.itemHeight,showToolbar:t.showToolbar,visibleItemCount:t.visibleItemCount,defaultIndex:r.innerDefaultIndex,cancelText:t.cancelText,confirmText:t.confirmText,cancelColor:t.cancelColor,confirmColor:t.confirmColor,onClose:l.close,onCancel:l.cancel,onConfirm:l.confirm,onChange:l.change},null,8,["show","closeOnClickOverlay","columns","title","itemHeight","showToolbar","visibleItemCount","defaultIndex","cancelText","confirmText","cancelColor","confirmColor","onClose","onCancel","onConfirm","onChange"])}],["__scopeId","data-v-b38ad07b"]]);let lr={};function sr(e,t){return wn.state.userInfo&&(lr.TOKEN=wn.state.userInfo.token),new Promise(((t,a)=>{uni.uploadFile({url:Sn+"api/upload/image",filePath:e,name:"file",header:lr,success:e=>{let a=JSON.parse(e.data);if(1!=a.code)return uni.$u.toast(a.msg),!1;t(a)},fail:e=>{a(e)}})}))}const cr={__name:"harvest",setup(t){const n=e.ref(null),i=e.ref(""),s=e.reactive([]),c=e.ref(!1),d=e.reactive({user:"",remark:"",pic:[],start_date:""}),u=e=>{d.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),c.value=!1},m=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,p={user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}};l((()=>{n.value.setRules(p)}));const h=()=>{c.value=!0},f=e.ref(Date.now()),g=()=>{n.value.validate().then((e=>{if(a("log","at pages/husbandryForm/harvest.vue:162",e),e){d.pic=s;let e={plant_id:i.value,type:5,detail:JSON.stringify(d)};if(0==d.pic.length)return void uni.$u.toast("请上传图片");a("log","at pages/husbandryForm/harvest.vue:180","表单通过"),Fn(e).then((e=>{a("log","at pages/husbandryForm/harvest.vue:185",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/husbandryForm/harvest.vue:198",e)}))},v=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/harvest.vue:224",e),1==e.code&&(s.push(e.data.url),a("log","at pages/husbandryForm/harvest.vue:227",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},y=e.ref("add");return r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;Object.assign(d,t.detail),s.splice(0,s.length,...t.detail.pic),y.value="detail",uni.setNavigationBarTitle({title:"收获详情"})}else i.value=e.id})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u-icon"),C),b=o(e.resolveDynamicComponent("u-image"),A),w=o(e.resolveDynamicComponent("u--textarea"),li),_=o(e.resolveDynamicComponent("u--form"),Ei),V=o(e.resolveDynamicComponent("u-button"),Si),k=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(_,{labelWidth:"100",model:d,rules:p,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"收获信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==y.value,type:"txt",border:"none",modelValue:d.user,"onUpdate:modelValue":a[0]||(a[0]=e=>d.user=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(r,{label:"作业面积",prop:"formData.breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==y.value,type:"number",border:"none",modelValue:d.breed,"onUpdate:modelValue":a[1]||(a[1]=e=>d.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(r,{label:"收获日期",prop:"start_date",onClick:h,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:d.start_date,"onUpdate:modelValue":a[2]||(a[2]=e=>d.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"收获图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(l,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==y.value]]),e.createVNode(b,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==y.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:v},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(b,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(r,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(w,{modelValue:d.remark,"onUpdate:modelValue":a[3]||(a[3]=e=>d.remark=e),disabled:"detail"==y.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==y.value?(e.openBlock(),e.createBlock(V,{key:0,class:"btn",onClick:g},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(k,{show:c.value,"max-date":(new Date).getTime(),modelValue:f.value,"onUpdate:modelValue":a[4]||(a[4]=e=>f.value=e),mode:"datetime",onConfirm:u,formatter:m,onCancel:a[5]||(a[5]=e=>c.value=!1)},null,8,["show","max-date","modelValue"])])}}},dr=x(cr,[["__scopeId","data-v-4a3e633a"]]),ur={__name:"Pest",setup(t){const n=e.reactive([]);e.ref(null),e.ref(null);const i=e.ref(null),s=e.ref(""),c=e.ref(Date.now()),d=e.ref(!1),u=e.ref(!1),m=()=>{d.value=!0},p=e.reactive({}),h=()=>{u.value=!0},f=e.reactive({kind:"",breed:"",dosage:"",start_date:"",dosage:"",end_date:""}),g=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,v=e=>{f.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),d.value=!1},y=e=>{f.end_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),u.value=!1},b=e.ref({kind:{type:"string",required:!0,message:"请填写除虫剂品牌",trigger:["blur","change"]},breed:{type:"string",required:!0,message:"请填写除虫剂品牌",trigger:["blur","change"]},dosage:{type:"string",required:!0,message:"请填写除虫剂用量",trigger:["blur","change"]},start_date:{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]},end_date:{type:"string",required:!0,message:"请填写结束日期",trigger:["blur","change"]},area:{type:"string",required:!0,message:"请填写作业面积",trigger:["blur","change"]},user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}});l((()=>{i.value.setRules(b)}));const w=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/Pest.vue:252",e),1==e.code&&(n.push(e.data.url),a("log","at pages/husbandryForm/Pest.vue:255",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},_=()=>{i.value.validate().then((e=>{if(a("log","at pages/husbandryForm/Pest.vue:287",e),e){if(f.area>p.area)return void uni.$u.toast("作业面积不能超过种植面积");f.pic=n;let e={plant_id:s.value,type:4,detail:JSON.stringify(f)};if(0==f.pic.length)return void uni.$u.toast("请上传图片");let t=new Date(f.end_date),o=new Date(f.start_date),i=new Date(p.plant_date);if(ot)return void uni.$u.toast("开始时间不能大于结束时间");a("log","at pages/husbandryForm/Pest.vue:327","开始时间和结束时间合法"),a("log","at pages/husbandryForm/Pest.vue:330","表单通过"),Fn(e).then((e=>{a("log","at pages/husbandryForm/Pest.vue:335",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/husbandryForm/Pest.vue:348",e)}))},V=e.ref("add");r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;a("log","at pages/husbandryForm/Pest.vue:369",t,t.detail),Object.assign(f,t.detail),n.splice(0,n.length,...t.detail.pic),V.value="detail",uni.setNavigationBarTitle({title:"虫害防治信息详情"})}else s.value=e.id;Pn({plant_id:s.value}).then((e=>{1==e.code&&Object.assign(p,e.data)}))}));const k=()=>(new Date).getTime();return(t,r)=>{const l=o(e.resolveDynamicComponent("up-input"),ai),s=o(e.resolveDynamicComponent("u-form-item"),ni),p=o(e.resolveDynamicComponent("u-icon"),C),x=o(e.resolveDynamicComponent("u-image"),A),N=o(e.resolveDynamicComponent("u--textarea"),li),E=o(e.resolveDynamicComponent("u--form"),Ei),B=o(e.resolveDynamicComponent("u-datetime-picker"),rr),S=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(E,{labelWidth:"130",model:f,rules:b.value,ref_key:"form",ref:i},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"除虫信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"除虫剂种类",prop:"kind",borderBottom:"",ref:"item1",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入除虫剂种类",disabled:"detail"==V.value,border:"none",modelValue:f.kind,"onUpdate:modelValue":r[0]||(r[0]=e=>f.kind=e)},null,8,["disabled","modelValue"])])),_:1},512),e.createVNode(s,{label:"除虫剂品牌",prop:"breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入除虫剂品牌",disabled:"detail"==V.value,border:"none",modelValue:f.breed,"onUpdate:modelValue":r[1]||(r[1]=e=>f.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(s,{label:"除虫剂用量(升)",prop:"dosage",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入除虫剂用量",type:"number",border:"none",disabled:"detail"==V.value,modelValue:f.dosage,"onUpdate:modelValue":r[2]||(r[2]=e=>f.dosage=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(s,{label:"作业面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==V.value,type:"number",border:"none",modelValue:f.area,"onUpdate:modelValue":r[3]||(r[3]=e=>f.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(s,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==V.value,type:"txt",border:"none",modelValue:f.user,"onUpdate:modelValue":r[4]||(r[4]=e=>f.user=e)},null,8,["disabled","modelValue"])])),_:1}),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createVNode(s,{label:"开始日期",onClick:m,prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.start_date,"onUpdate:modelValue":r[5]||(r[5]=e=>f.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(s,{label:"结束日期",prop:"end_date",onClick:h,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.end_date,"onUpdate:modelValue":r[6]||(r[6]=e=>f.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createVNode(s,{label:"开始日期",prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.start_date,"onUpdate:modelValue":r[7]||(r[7]=e=>f.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(s,{label:"结束日期",prop:"end_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.end_date,"onUpdate:modelValue":r[8]||(r[8]=e=>f.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"除虫图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[n.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,((t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(p,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{n.splice(e,1)})(o)},null,8,["onClick"]),[[e.vShow,"add"==V.value]]),e.createVNode(x,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a("log","at pages/husbandryForm/Pest.vue:234",o=t),void uni.previewImage({urls:[o]});var o}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:w},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(x,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(s,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(N,{modelValue:f.remark,"onUpdate:modelValue":r[9]||(r[9]=e=>f.remark=e),disabled:"detail"==V.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model","rules"]),e.createElementVNode("view",null,[e.createVNode(B,{show:d.value,"max-date":k(),modelValue:c.value,"onUpdate:modelValue":r[10]||(r[10]=e=>c.value=e),mode:"datetime",onConfirm:v,formatter:g,onCancel:r[11]||(r[11]=e=>d.value=!1)},null,8,["show","max-date","modelValue"]),e.createVNode(B,{show:u.value,"max-date":k(),modelValue:c.value,"onUpdate:modelValue":r[12]||(r[12]=e=>c.value=e),mode:"datetime",onConfirm:y,formatter:g,onCancel:r[13]||(r[13]=e=>u.value=!1)},null,8,["show","max-date","modelValue"])]),"add"==V.value?(e.openBlock(),e.createBlock(S,{key:0,class:"btn",onClick:_},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},mr=x(ur,[["__scopeId","data-v-831bb10d"]]),pr={__name:"irrigate",setup(t){const n=e.reactive([{value:1,name:"喷灌"},{value:2,name:"滴灌"},{value:3,name:"沟灌"}]),i=e.ref(""),s=e.reactive([]);e.ref(null),e.ref(null);const c=e.ref(""),d=e.ref(!1),u=e.ref(null),m=e.ref(Date.now()),p=e.ref(!1),h=e.ref(!1),f=e.reactive({}),g=()=>{p.value=!0},v=()=>{h.value=!0},y=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,b=e.reactive({type:""}),w=e=>{c.value=e.name,b.type=e.value},_=()=>{d.value=!0},V=e=>{b.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),p.value=!1},k=e=>{b.end_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),h.value=!1},x={type:{type:"number",required:!0,message:"请选择灌溉方式",trigger:["change"]},start_date:{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]},end_date:{type:"string",required:!0,message:"请填写结束日期",trigger:["blur","change"]},area:{type:"string",required:!0,message:"请填写土地面积",trigger:["blur","change"]},user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}};l((()=>{u.value.setRules(x)}));const N=()=>{u.value.validate().then((e=>{if(e){if(b.area>f.area)return void uni.$u.toast("灌溉面积不能超过种植面积");b.pic=s;let e={plant_id:i.value,type:3,detail:JSON.stringify(b)};if(0==b.pic.length)return void uni.$u.toast("请上传图片");let t=new Date(b.end_date),o=new Date(b.start_date),n=new Date(f.plant_date);if(ot)return void uni.$u.toast("开始时间不能大于结束时间");a("log","at pages/husbandryForm/irrigate.vue:284","开始时间和结束时间合法"),Fn(e).then((e=>{a("log","at pages/husbandryForm/irrigate.vue:291",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/husbandryForm/irrigate.vue:303",e)}))},E=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/irrigate.vue:328",e),1==e.code&&(s.push(e.data.url),a("log","at pages/husbandryForm/irrigate.vue:331",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},B=e.ref("add");r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;a("log","at pages/husbandryForm/irrigate.vue:367",t,t.detail),Object.assign(b,t.detail),s.splice(0,s.length,...t.detail.pic),c.value=n.find((e=>e.value===b.type)).name,B.value="detail",uni.setNavigationBarTitle({title:"灌溉详情"})}else i.value=e.id;Pn({plant_id:i.value}).then((e=>{1==e.code&&Object.assign(f,e.data)}))}));const S=()=>(new Date).getTime();return(t,i)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),f=o(e.resolveDynamicComponent("u-icon"),C),D=o(e.resolveDynamicComponent("u-image"),A),I=o(e.resolveDynamicComponent("u--textarea"),li),T=o(e.resolveDynamicComponent("u--form"),Ei),P=o(e.resolveDynamicComponent("u-datetime-picker"),rr),F=o(e.resolveDynamicComponent("u-action-sheet"),G),U=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(T,{labelWidth:"100",model:b,rules:x,ref_key:"form",ref:u},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"灌溉信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"灌溉方式",prop:"type",borderBottom:"",required:"",onClick:_},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择灌溉方式",readonly:"",border:"none",modelValue:c.value,"onUpdate:modelValue":i[0]||(i[0]=e=>c.value=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"灌溉面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==B.value,type:"number",border:"none",modelValue:b.area,"onUpdate:modelValue":i[1]||(i[1]=e=>b.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==B.value,type:"txt",border:"none",modelValue:b.user,"onUpdate:modelValue":i[2]||(i[2]=e=>b.user=e)},null,8,["disabled","modelValue"])])),_:1}),"add"==B.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createVNode(l,{label:"开始日期",onClick:g,prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:b.start_date,"onUpdate:modelValue":i[3]||(i[3]=e=>b.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",onClick:v,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:b.end_date,"onUpdate:modelValue":i[4]||(i[4]=e=>b.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createVNode(l,{label:"开始日期",prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:b.start_date,"onUpdate:modelValue":i[5]||(i[5]=e=>b.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:b.end_date,"onUpdate:modelValue":i[6]||(i[6]=e=>b.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"灌溉图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(f,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(o)},null,8,["onClick"]),[[e.vShow,"add"==B.value]]),e.createVNode(D,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a("log","at pages/husbandryForm/irrigate.vue:310",o=t),void uni.previewImage({urls:[o]});var o}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==B.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:E},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(D,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(I,{modelValue:b.remark,"onUpdate:modelValue":i[7]||(i[7]=e=>b.remark=e),disabled:"detail"==B.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),e.createElementVNode("view",null,[e.createVNode(P,{show:p.value,modelValue:m.value,"onUpdate:modelValue":i[8]||(i[8]=e=>m.value=e),"max-date":S(),mode:"datetime",onConfirm:V,formatter:y,onCancel:i[9]||(i[9]=e=>p.value=!1)},null,8,["show","modelValue","max-date"]),e.createVNode(P,{show:h.value,"max-date":S(),modelValue:m.value,"onUpdate:modelValue":i[10]||(i[10]=e=>m.value=e),mode:"datetime",onConfirm:k,formatter:y,onCancel:i[11]||(i[11]=e=>h.value=!1)},null,8,["show","max-date","modelValue"]),e.createVNode(F,{show:d.value,actions:n,title:"请选择灌溉方式",onClose:i[12]||(i[12]=e=>d.value=!1),onSelect:w},null,8,["show","actions"])]),"add"==B.value?(e.openBlock(),e.createBlock(U,{key:0,class:"btn",onClick:N},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},hr=x(pr,[["__scopeId","data-v-e6c57826"]]),fr={__name:"weeding",setup(t){const n=e.reactive([]);e.ref(null),e.ref(null);const i=e.ref(null),s=e.ref(""),c=e.ref(Date.now()),d=e.ref(!1),u=e.ref(!1),m=()=>{d.value=!0},p=e.reactive({}),h=()=>{u.value=!0},f=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,g=e.reactive({kind:"",breed:"",dosage:"",start_date:"",dosage:"",end_date:""}),v=e=>{g.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),d.value=!1},y=e=>{g.end_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),u.value=!1},b=e.ref({kind:{type:"string",required:!0,message:"请填写除草剂种类",trigger:["blur","change"]},breed:{type:"string",required:!0,message:"请填写除草剂品牌",trigger:["blur","change"]},dosage:{type:"string",required:!0,message:"请填写除草剂用量",trigger:["blur","change"]},start_date:{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]},end_date:{type:"string",required:!0,message:"请填写结束日期",trigger:["blur","change"]},area:{type:"string",required:!0,message:"请填写作业面积",trigger:["blur","change"]},user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}});l((()=>{i.value.setRules(b)}));const w=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/weeding.vue:246",e),1==e.code&&(n.push(e.data.url),a("log","at pages/husbandryForm/weeding.vue:249",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},_=()=>{i.value.validate().then((e=>{if(e){if(g.area>p.area)return void uni.$u.toast("作业面积不能超过种植面积");g.pic=n;let e={plant_id:s.value,type:2,detail:JSON.stringify(g)};if(0==g.pic.length)return void uni.$u.toast("请上传图片");let t=new Date(g.end_date),o=new Date(g.start_date),i=new Date(p.plant_date);if(ot)return void uni.$u.toast("开始时间不能大于结束时间");a("log","at pages/husbandryForm/weeding.vue:324","开始时间和结束时间合法"),a("log","at pages/husbandryForm/weeding.vue:327","表单通过"),Fn(e).then((e=>{a("log","at pages/husbandryForm/weeding.vue:332",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/husbandryForm/weeding.vue:345",e)}))},V=e.ref("add");r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;Object.assign(g,t.detail),n.splice(0,n.length,...t.detail.pic),V.value="detail",uni.setNavigationBarTitle({title:"除草详情"})}else s.value=e.id;Pn({plant_id:s.value}).then((e=>{1==e.code&&Object.assign(p,e.data)}))}));const k=()=>(new Date).getTime();return(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),s=o(e.resolveDynamicComponent("u-icon"),C),p=o(e.resolveDynamicComponent("u-image"),A),x=o(e.resolveDynamicComponent("u--textarea"),li),N=o(e.resolveDynamicComponent("u--form"),Ei),E=o(e.resolveDynamicComponent("u-datetime-picker"),rr),B=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(N,{labelWidth:"120",model:g,rules:b.value,ref_key:"form",ref:i},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"除草信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"除草剂种类",prop:"kind",borderBottom:"",ref:"item1",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入除草剂种类",disabled:"detail"==V.value,border:"none",modelValue:g.kind,"onUpdate:modelValue":a[0]||(a[0]=e=>g.kind=e)},null,8,["disabled","modelValue"])])),_:1},512),e.createVNode(l,{label:"除草剂品牌",prop:"breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入除草剂品牌",disabled:"detail"==V.value,border:"none",modelValue:g.breed,"onUpdate:modelValue":a[1]||(a[1]=e=>g.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"除草剂用量(斤)",prop:"dosage",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入除草剂用量",border:"none",type:"number",disabled:"detail"==V.value,modelValue:g.dosage,"onUpdate:modelValue":a[2]||(a[2]=e=>g.dosage=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"作业面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==V.value,type:"number",border:"none",modelValue:g.area,"onUpdate:modelValue":a[3]||(a[3]=e=>g.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==V.value,type:"txt",border:"none",modelValue:g.user,"onUpdate:modelValue":a[4]||(a[4]=e=>g.user=e)},null,8,["disabled","modelValue"])])),_:1}),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createVNode(l,{label:"开始日期",onClick:m,prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:g.start_date,"onUpdate:modelValue":a[5]||(a[5]=e=>g.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",onClick:h,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:g.end_date,"onUpdate:modelValue":a[6]||(a[6]=e=>g.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createVNode(l,{label:"开始日期",prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:g.start_date,"onUpdate:modelValue":a[7]||(a[7]=e=>g.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:g.end_date,"onUpdate:modelValue":a[8]||(a[8]=e=>g.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"除草图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[n.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(s,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{n.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==V.value]]),e.createVNode(p,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:w},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(p,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(x,{modelValue:g.remark,"onUpdate:modelValue":a[9]||(a[9]=e=>g.remark=e),disabled:"detail"==V.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model","rules"]),e.createElementVNode("view",null,[e.createVNode(E,{show:d.value,modelValue:c.value,"onUpdate:modelValue":a[10]||(a[10]=e=>c.value=e),"max-date":k(),mode:"datetime",onConfirm:v,formatter:f,onCancel:a[11]||(a[11]=e=>d.value=!1)},null,8,["show","modelValue","max-date"]),e.createVNode(E,{show:u.value,modelValue:c.value,"onUpdate:modelValue":a[12]||(a[12]=e=>c.value=e),"max-date":k(),mode:"datetime",onConfirm:y,formatter:f,onCancel:a[13]||(a[13]=e=>u.value=!1)},null,8,["show","modelValue","max-date"])]),"add"==V.value?(e.openBlock(),e.createBlock(B,{key:0,class:"btn",onClick:_},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},gr=x(fr,[["__scopeId","data-v-d8d3a6ad"]]),vr={__name:"fertilize",setup(t){const n=e.reactive([]);e.ref(null),e.ref(null);const i=e.ref(null),s=e.ref(""),c=e.ref(Date.now()),d=e.ref(!1),u=e.ref(!1),m=e.reactive({}),p=()=>{d.value=!0},h=()=>{u.value=!0},f=e.reactive({kind:"",breed:"",dosage:"",start_date:"",dosage:"",end_date:""}),g=e=>{f.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),d.value=!1},v=e=>{f.end_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),u.value=!1},y=e.ref({kind:{type:"string",required:!0,message:"请填写肥料种类",trigger:["blur","change"]},breed:{type:"string",required:!0,message:"请填写肥料品牌",trigger:["blur","change"]},dosage:{type:"string",required:!0,message:"请填写肥料用量",trigger:["blur","change"]},start_date:{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]},end_date:{type:"string",required:!0,message:"请填写结束日期",trigger:["blur","change"]},area:{type:"string",required:!0,message:"请填写作业面积",trigger:["blur","change"]},user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}});l((()=>{i.value.setRules(y)}));const b=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,w=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/fertilize.vue:248",e),1==e.code&&(n.push(e.data.url),a("log","at pages/husbandryForm/fertilize.vue:253",n),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},_=()=>{i.value.validate().then((e=>{if(e){if(f.area>m.area)return void uni.$u.toast("作业面积不能超过种植面积");f.pic=n;let e={plant_id:s.value,type:1,detail:JSON.stringify(f)};if(0==f.pic.length)return void uni.$u.toast("请上传图片");let t=new Date(f.end_date),o=new Date(f.start_date),i=new Date(m.plant_date);if(a("log","at pages/husbandryForm/fertilize.vue:307",ot)return void uni.$u.toast("开始时间不能大于结束时间");a("log","at pages/husbandryForm/fertilize.vue:323","开始时间和结束时间合法"),a("log","at pages/husbandryForm/fertilize.vue:329","表单通过"),Fn(e).then((e=>{1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{a("log","at pages/husbandryForm/fertilize.vue:347",e)}))},V=e.ref("add");r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;Object.assign(f,t.detail),n.splice(0,n.length,...t.detail.pic),V.value="detail",uni.setNavigationBarTitle({title:"施肥详情"})}else s.value=e.id;Pn({plant_id:s.value}).then((e=>{1==e.code&&Object.assign(m,e.data)}))}));const k=()=>(new Date).getTime();return(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),s=o(e.resolveDynamicComponent("u-icon"),C),m=o(e.resolveDynamicComponent("u-image"),A),x=o(e.resolveDynamicComponent("u--textarea"),li),N=o(e.resolveDynamicComponent("u--form"),Ei),E=o(e.resolveDynamicComponent("u-datetime-picker"),rr),B=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(N,{labelWidth:"100",model:f,rules:y.value,ref_key:"form",ref:i},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"施肥信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"肥料种类",prop:"kind",borderBottom:"",ref:"item1",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入肥料种类",disabled:"detail"==V.value,border:"none",modelValue:f.kind,"onUpdate:modelValue":a[0]||(a[0]=e=>f.kind=e)},null,8,["disabled","modelValue"])])),_:1},512),e.createVNode(l,{label:"肥料品牌",prop:"breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入肥料品牌",disabled:"detail"==V.value,border:"none",modelValue:f.breed,"onUpdate:modelValue":a[1]||(a[1]=e=>f.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"肥料用量(斤)",prop:"dosage",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入肥料用量",border:"none",type:"number",disabled:"detail"==V.value,modelValue:f.dosage,"onUpdate:modelValue":a[2]||(a[2]=e=>f.dosage=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"作业面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==V.value,type:"number",border:"none",modelValue:f.area,"onUpdate:modelValue":a[3]||(a[3]=e=>f.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==V.value,type:"txt",border:"none",modelValue:f.user,"onUpdate:modelValue":a[4]||(a[4]=e=>f.user=e)},null,8,["disabled","modelValue"])])),_:1}),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createVNode(l,{label:"开始日期",onClick:p,prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.start_date,"onUpdate:modelValue":a[5]||(a[5]=e=>f.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",onClick:h,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.end_date,"onUpdate:modelValue":a[6]||(a[6]=e=>f.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createVNode(l,{label:"开始日期",prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.start_date,"onUpdate:modelValue":a[7]||(a[7]=e=>f.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.end_date,"onUpdate:modelValue":a[8]||(a[8]=e=>f.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"施肥图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[n.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(s,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{n.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==V.value]]),e.createVNode(m,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:w},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(m,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(x,{modelValue:f.remark,"onUpdate:modelValue":a[9]||(a[9]=e=>f.remark=e),disabled:"detail"==V.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model","rules"]),e.createElementVNode("view",null,[e.createVNode(E,{show:d.value,"max-date":k(),modelValue:c.value,"onUpdate:modelValue":a[10]||(a[10]=e=>c.value=e),mode:"datetime",onConfirm:g,formatter:b,onCancel:a[11]||(a[11]=e=>d.value=!1)},null,8,["show","max-date","modelValue"]),e.createVNode(E,{show:u.value,"max-date":k(),modelValue:c.value,"onUpdate:modelValue":a[12]||(a[12]=e=>c.value=e),mode:"datetime",onConfirm:v,formatter:b,onCancel:a[13]||(a[13]=e=>u.value=!1)},null,8,["show","max-date","modelValue"])]),"add"==V.value?(e.openBlock(),e.createBlock(B,{key:0,class:"btn",onClick:_},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},yr=x(vr,[["__scopeId","data-v-65eb2c4d"]]),br={__name:"sow",setup(t){e.ref(null);const n=e.ref(null),i=e.ref(""),s=e.reactive([]),c=e.ref(Date.now()),d=e.ref(!1),u=e.reactive({formData:{kind:"",breed:"",area:"",user:"",date:"",remark:"",pic:[]},rules:{kind:[{type:"string",required:!0,message:"请填写种植种类",trigger:["blur","change"]}],breed:[{type:"string",required:!0,message:"请填写种植品种",trigger:["blur","change"]}],area:[{type:"string",required:!0,message:"请填写种植面积",trigger:["blur","change"]}],user:[{type:"string",required:!0,message:"请填写参与人员",trigger:["blur","change"]}],date:[{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]}]}});l((()=>{n.value.setRules(u.rules)}));const m=()=>{d.value=!0},p=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,h=e=>{u.formData.date=uni.$u.timeFormat(e.value,"yyyy-mm-dd"),d.value=!1},f=async()=>{a("log","at pages/husbandryForm/sow.vue:199",n.value);try{if(await n.value.validate()){if(u.formData.land_id=i.value,a("log","at pages/husbandryForm/sow.vue:207","表单通过"),0==s.length)return void uni.$u.toast("请上传图片");u.formData.pic=JSON.stringify(s),(e=>An.post("/plant/add",e))(u.formData).then((e=>{1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/husbandryForm/sow.vue:227","表单验证未通过")}catch(e){a("error","at pages/husbandryForm/sow.vue:231",e)}},g=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/sow.vue:253",e),1==e.code&&(s.push(e.data.url),a("log","at pages/husbandryForm/sow.vue:258",s),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},v=e.ref("add"),y=()=>{const e=new Date;e.setHours(0,0,0,0);return e.getTime()};return r((e=>{i.value=e.id})),(t,i)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),b=o(e.resolveDynamicComponent("u-icon"),C),w=o(e.resolveDynamicComponent("u-image"),A),_=o(e.resolveDynamicComponent("u--textarea"),li),V=o(e.resolveDynamicComponent("u-form"),Ei),k=o(e.resolveDynamicComponent("u-datetime-picker"),rr),x=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(V,{labelWidth:"100",model:u.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"种植信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"种植种类",prop:"kind",borderBottom:"",ref:"item1",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入种类",disabled:"detail"==v.value,border:"none",modelValue:u.formData.kind,"onUpdate:modelValue":i[0]||(i[0]=e=>u.formData.kind=e)},null,8,["disabled","modelValue"])])),_:1},512),e.createVNode(l,{label:"种植品种",prop:"breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入品种",disabled:"detail"==v.value,border:"none",modelValue:u.formData.breed,"onUpdate:modelValue":i[1]||(i[1]=e=>u.formData.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"种植面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入种植面积",disabled:"detail"==v.value,type:"number",border:"none",modelValue:u.formData.area,"onUpdate:modelValue":i[2]||(i[2]=e=>u.formData.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==v.value,type:"txt",border:"none",modelValue:u.formData.user,"onUpdate:modelValue":i[3]||(i[3]=e=>u.formData.user=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"种植开始日期",prop:"date",borderBottom:"",required:"",onClick:m},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:u.formData.date,"onUpdate:modelValue":i[4]||(i[4]=e=>u.formData.date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"种植图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(b,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(o)},null,8,["onClick"]),[[e.vShow,"add"==v.value]]),e.createVNode(w,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a("log","at pages/husbandryForm/sow.vue:193",o=t),void uni.previewImage({urls:[o]});var o}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"code-img"},[e.createElementVNode("view",{class:"",onClick:g},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(w,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{borderBottom:""},{default:e.withCtx((()=>[e.createVNode(_,{modelValue:u.formData.remark,"onUpdate:modelValue":i[5]||(i[5]=e=>u.formData.remark=e),disabled:"detail"==v.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),e.createElementVNode("view",null,[e.createVNode(k,{show:d.value,modelValue:c.value,"onUpdate:modelValue":i[6]||(i[6]=e=>c.value=e),maxDate:y(),mode:"date",onConfirm:h,formatter:p,onCancel:i[7]||(i[7]=e=>d.value=!1)},null,8,["show","modelValue","maxDate"])]),"add"==v.value?(e.openBlock(),e.createBlock(x,{key:0,class:"btn",onClick:f},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},wr=x(br,[["__scopeId","data-v-ad0e10d5"]]),_r=e=>{(e.$renderjs||(e.$renderjs=[])).push("renderScript"),(e.$renderjsModules||(e.$renderjsModules={})).renderScript="087b82ce"},Vr={data:()=>({vsrc:{},imgSrc:"",subNvue:"",videoUrl:"",boxStyle:{height:0,width:0},object_fit:"contain",windowWidth:"",deviceId:"",shwovideo:!0,initFailTimer:"",flag:!0,SocketTask:""}),onLoad(e){this.deviceId=e.device,this.videoUrl=e.url,this.videoUrl=this.replaceLastThreeChars(this.videoUrl,"mp4"),this.subNvue=uni.getSubNVueById("subNvue"),this.subNvue.show();let t={username:e.user,device:"lihai_lot_walnutpi_dev_"+e.device,scene:"app"};this.openScoket(t),this.platform=uni.getSystemInfoSync().platform},methods:{replaceLastThreeChars:(e,t)=>e.length<3?t+e:e.slice(0,-3)+t,receiveImg(e){this.imgSrc=e.test,(e=>In.post("api/upload/uploadVideoCover",e))({device_id:this.deviceId,image:this.imgSrc}).then((e=>{a("log","at pages/live/live.vue:77",e)})).catch((e=>{a("log","at pages/live/live.vue:79",e)}))},setUrl(e){let t={width:400,height:280};t.src=e,this.vsrc=t},openScoket(e){let t=this;this.SocketTask=uni.connectSocket({url:"wss://iot.lihaink.cn/test",complete:()=>{a("log","at pages/live/live.vue:95",t.socket,"socketTASK")}}),this.SocketTask.onOpen((function(o){t.SocketTask.send({data:JSON.stringify(e)}),t.SocketTask.onMessage((function(e){a("log","at pages/live/live.vue:103",e,"收到消息"),200==JSON.parse(e.data).code&&(t.shwovideo=!0)}))})),this.SocketTask.onError((function(e){a("log","at pages/live/live.vue:110","WebSocket连接打开失败,请检查!")})),this.SocketTask.onClose((function(e){a("log","at pages/live/live.vue:113","WebSocket 已关闭!")}))},playVedio(){this.subNvue.hide(),uni.createVideoContext("video",this).requestFullScreen(),this.flag=!1,setTimeout((()=>{this.setUrl(this.videoUrl)}),2e3)},fullscreenchange(e){e.detail.fullScreen||plus.screen.lockOrientation("portrait-primary")}},onUnload(){this.SocketTask.close(),this.SocketTask=null,a("log","at pages/live/live.vue:136",this.socket,"sosddsdsd")}};_r(Vr);const kr=x(Vr,[["render",function(t,a,o,n,i,r){return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("view",{vsrc:e.wp(i.vsrc),"change:vsrc":t.renderScript.getVideoImg},[(e.openBlock(),e.createElementBlock("video",{key:0,onPlay:a[0]||(a[0]=(...e)=>r.playVedio&&r.playVedio(...e)),onFullscreenchange:a[1]||(a[1]=(...e)=>r.fullscreenchange&&r.fullscreenchange(...e)),controls:!0,autoplay:!0,style:{width:"100vw",height:"100vh"},src:i.videoUrl,id:"video"},null,40,["src"]))],8,["vsrc","change:vsrc"])])}]]),xr={__name:"addPlant",setup(t){const n=e.ref(null),i=e.reactive({formData:{farm_name:"",farm_type:"",breed_type:"",form_scale:"",master:"",master_contact:"",province:"",city:"",area:"",street:"",village:"",bridge:"",address:"",lat:"",lon:"",master_name:"",image:[]},rules:{farm_name:[{type:"string",required:!0,message:"请填写养殖基地名称",trigger:["blur","change"]}],farm_type:[{type:"string",required:!0,message:"请填写养殖基地类型",trigger:["blur","change"]}],breed_type:[{type:"string",required:!0,message:"请填写养殖基地种类",trigger:["blur","change"]}],form_scale:[{type:"string",required:!0,message:"请填写养殖基地规模",trigger:["blur","change"]}],province:[{type:"string",required:!0,message:"请请选择所在省份",trigger:"change"}],city:[{type:"string",required:!0,message:"请选择所在城市",trigger:"change"}],area:[{type:"string",required:!0,message:"请选择所在区县",trigger:"change"}],street:{type:"string",required:!0,message:"请选择所在镇街",trigger:["blur","change"]},village:{type:"string",required:!0,message:"请选择所在乡村",trigger:["blur","change"]},bridge:{type:"string",required:!0,message:"请选择小队",trigger:["blur","change"]},address:[{type:"string",required:!0,message:"请输入养殖基地详细地址",trigger:["blur","change"]}],master:[{type:"string",required:!0,message:"请输入养殖基地负责人姓名",trigger:["blur","change"]}],master_contact:[{required:!0,message:"请输入手机号",trigger:["change","blur"]},{validator:(e,t,a)=>uni.$u.test.mobile(t),message:"手机号码不正确",trigger:["change","blur"]}]}}),s=e.reactive([]),c=e.ref(null),d=e.ref(null),u=e.ref(null),m=e.ref(null),p=e.ref(null),h=e.ref(null),f=e.ref(null),g=e.ref(null),v=e.ref(!1),y=e.ref(!1),b=e.ref(!1),w=e.ref(!1),_=e.ref(!1),V=e.ref(!1),k=e.ref(!1),x=e.ref(!1),N=e.reactive([]),E=e.reactive([]),B=e.reactive([]),S=e.reactive([]),D=e.reactive([]),I=e.reactive([]),T=e.reactive([]),P=e.reactive([]),F=e=>{f.value=e.name,i.formData.farm_type=e.value},U=e=>{g.value=e.name,i.formData.breed_type=e.value},O=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{1==e.code&&(s.push(e.data.url),a("log","at pages/addPlant/addPlant.vue:450",i.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},q=()=>{v.value=!0},$=()=>{y.value=!0},L=()=>{b.value=!0},z=()=>{w.value=!0},j=()=>{_.value=!0},M=()=>{V.value=!0},R=()=>{k.value=!0},H=()=>{x.value=!0},Q=e=>{var t;a("log","at pages/addPlant/addPlant.vue:505",e),c.value=e.name,i.formData.province=e.id,t=e.id,On({province_code:t}).then((e=>{E.splice(0,E.length,...e.data.map(((e,t)=>({name:e.city_name,id:e.city_code}))))}))},W=e=>{var t;d.value=e.name,i.formData.city=e.id,t=e.id,qn({city_code:t}).then((e=>{B.splice(0,B.length,...e.data.map(((e,t)=>({name:e.county_name,id:e.county_code}))))}))},J=e=>{var t;u.value=e.name,i.formData.area=e.id,t=e.id,$n({county_code:t}).then((e=>{S.splice(0,N.length,...e.data.map(((e,t)=>({name:e.town_name,id:e.town_code}))))}))},K=e=>{var t;m.value=e.name,i.formData.street=e.id,t=e.id,Ln({town_code:t}).then((e=>{D.splice(0,N.length,...e.data.map(((e,t)=>({name:e.village_name,id:e.village_code}))))}))},Y=e=>{p.value=e.name,i.formData.village=e.id,zn().then((e=>{I.splice(0,N.length,...e.data.map(((e,t)=>({name:e.group_name,id:e.group_code}))))}))},X=e=>{h.value=e.name,i.formData.bridge=e.id},Z=()=>{uni.navigateTo({url:"/pages/addPlant/select_address_n",success:e=>{uni.$once("setData",(e=>{a("log","at pages/addPlant/addPlant.vue:547","选择地址",e=JSON.parse(e||"{}")),i.formData.address=e.address,i.formData.lat=e.lat,i.formData.lon=e.lon}))}})};l((()=>{n.value.setRules(i.rules)}));const ee=async()=>{try{if(await n.value.validate()){if(0==s.length)return void uni.$u.toast("请上传图片");i.formData.image=JSON.stringify(s),jn(i.formData).then((e=>{a("log","at pages/addPlant/addPlant.vue:579",e),1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/addPlant/addPlant.vue:590","表单验证未通过")}catch(e){a("error","at pages/addPlant/addPlant.vue:594",e)}};return r((e=>{Un().then((e=>{N.splice(0,N.length,...e.data.map(((e,t)=>({name:e.province_name,id:e.province_code}))))})),Mn().then((e=>{T.splice(0,T.length,...e.data.map(((e,t)=>({name:e.name,value:e.value,id:e.id}))))})),Rn().then((e=>{P.splice(0,P.length,...e.data.map(((e,t)=>({name:e.name,value:e.value,id:e.id}))))}))})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("up-form-item"),ni),te=o(e.resolveDynamicComponent("u-icon"),C),ae=o(e.resolveDynamicComponent("u-image"),A),oe=o(e.resolveDynamicComponent("up-form"),Ei),ne=o(e.resolveDynamicComponent("u-action-sheet"),G),ie=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(oe,{labelWidth:"130",model:i.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"养殖基地信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"养殖基地名称",prop:"farm_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地名称",border:"none",modelValue:i.formData.farm_name,"onUpdate:modelValue":a[0]||(a[0]=e=>i.formData.farm_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地类型",prop:"farm_type",borderBottom:"",required:"",onClick:R},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择养殖基地类型",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:f.value,"onUpdate:modelValue":a[1]||(a[1]=e=>f.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖种类",prop:"farm_type",borderBottom:"",required:"",onClick:H},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择养殖种类",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:g.value,"onUpdate:modelValue":a[2]||(a[2]=e=>g.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地规模(亩)",prop:"form_scale",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地规模",type:"number",border:"none",modelValue:i.formData.form_scale,"onUpdate:modelValue":a[3]||(a[3]=e=>i.formData.form_scale=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"负责人",prop:"master",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人姓名",border:"none",modelValue:i.formData.master,"onUpdate:modelValue":a[4]||(a[4]=e=>i.formData.master=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"负责人电话",prop:"master_contact",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人电话",type:"number",border:"none",modelValue:i.formData.master_contact,"onUpdate:modelValue":a[5]||(a[5]=e=>i.formData.master_contact=e)},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"c-title"},"地址信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"所在省份",prop:"province",borderBottom:"",required:"",onClick:q},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在省份",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:c.value,"onUpdate:modelValue":a[6]||(a[6]=e=>c.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在城市",prop:"city",borderBottom:"",required:"",onClick:$},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在城市",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:d.value,"onUpdate:modelValue":a[7]||(a[7]=e=>d.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在区县",prop:"area",borderBottom:"",required:"",onClick:L},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在区县",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:u.value,"onUpdate:modelValue":a[8]||(a[8]=e=>u.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在镇街",prop:"formData.street",borderBottom:"",required:"",onClick:z},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在镇街",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:m.value,"onUpdate:modelValue":a[9]||(a[9]=e=>m.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在乡村",prop:"formData.village",borderBottom:"",required:"",onClick:j},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在乡村",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:p.value,"onUpdate:modelValue":a[10]||(a[10]=e=>p.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在小队",prop:"formData.bridge",borderBottom:"",required:"",onClick:M},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在小队",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:h.value,"onUpdate:modelValue":a[11]||(a[11]=e=>h.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地详细地址",prop:"address",style:{position:"relative"},borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地详细地址",suffixIcon:"map","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:i.formData.address,"onUpdate:modelValue":a[12]||(a[12]=e=>i.formData.address=e)},null,8,["modelValue"]),e.createElementVNode("view",{style:{position:"absolute",right:"0",width:"50rpx",height:"100%"},onClick:Z})])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"养殖基地图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.createVNode(te,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"]),e.createVNode(ae,{src:t,width:"150.85rpx",height:"150.85rpx"},null,8,["src"])])])))),256))])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"code-img"},[e.createElementVNode("view",{class:"",onClick:O},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(ae,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])])])])),_:1},8,["model"]),e.createVNode(ne,{show:v.value,keyName:"name",closeOnClickOverlay:"",actions:N,title:"请选择",onClose:a[13]||(a[13]=e=>v.value=!1),onSelect:Q},null,8,["show","actions"]),e.createVNode(ne,{show:y.value,keyName:"name",actions:E,title:"请选择",onClose:a[14]||(a[14]=e=>y.value=!1),onSelect:W},null,8,["show","actions"]),e.createVNode(ne,{show:b.value,keyName:"name",actions:B,title:"请选择",onClose:a[15]||(a[15]=e=>b.value=!1),onSelect:J},null,8,["show","actions"]),e.createVNode(ne,{show:w.value,keyName:"name",actions:S,title:"请选择",onClose:a[16]||(a[16]=e=>w.value=!1),onSelect:K},null,8,["show","actions"]),e.createVNode(ne,{show:_.value,keyName:"name",actions:D,title:"请选择",onClose:a[17]||(a[17]=e=>_.value=!1),onSelect:Y},null,8,["show","actions"]),e.createVNode(ne,{show:V.value,keyName:"name",actions:I,title:"请选择",onClose:a[18]||(a[18]=e=>V.value=!1),onSelect:X},null,8,["show","actions"]),e.createVNode(ne,{show:k.value,keyName:"name",actions:T,title:"请选择",onClose:a[19]||(a[19]=e=>k.value=!1),onSelect:F},null,8,["show","actions"]),e.createVNode(ne,{show:x.value,keyName:"name",actions:P,title:"请选择",onClose:a[20]||(a[20]=e=>x.value=!1),onSelect:U},null,8,["show","actions"]),e.createVNode(ie,{class:"btn",onClick:ee},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1})])])}}};const Nr=x({},[["render",function(t,a){return e.openBlock(),e.createElementBlock("view",{class:""}," 设备列表 ")}]]),Cr={props:{length:{type:[String,Number],default:w.swiperIndicator.length},current:{type:[String,Number],default:w.swiperIndicator.current},indicatorActiveColor:{type:String,default:w.swiperIndicator.indicatorActiveColor},indicatorInactiveColor:{type:String,default:w.swiperIndicator.indicatorInactiveColor},indicatorMode:{type:String,default:w.swiperIndicator.indicatorMode}}};const Er=x({name:"u-swiper-indicator",mixins:[V,k,Cr],data:()=>({lineWidth:22}),computed:{lineStyle(){let e={};return e.width=uni.$u.addUnit(this.lineWidth),e.transform=`translateX(${uni.$u.addUnit(this.current*this.lineWidth)})`,e.backgroundColor=this.indicatorActiveColor,e},dotStyle(){return e=>{let t={};return t.backgroundColor=e===this.current?this.indicatorActiveColor:this.indicatorInactiveColor,t}}}},[["render",function(t,a,o,n,i,r){return e.openBlock(),e.createElementBlock("view",{class:"u-swiper-indicator"},["line"===t.indicatorMode?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["u-swiper-indicator__wrapper",[`u-swiper-indicator__wrapper--${t.indicatorMode}`]]),style:e.normalizeStyle({width:t.$u.addUnit(i.lineWidth*t.length),backgroundColor:t.indicatorInactiveColor})},[e.createElementVNode("view",{class:"u-swiper-indicator__wrapper--line__bar",style:e.normalizeStyle([r.lineStyle])},null,4)],6)):e.createCommentVNode("",!0),"dot"===t.indicatorMode?(e.openBlock(),e.createElementBlock("view",{key:1,class:"u-swiper-indicator__wrapper"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.length,((a,o)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["u-swiper-indicator__wrapper__dot",[o===t.current&&"u-swiper-indicator__wrapper__dot--active"]]),key:o,style:e.normalizeStyle([r.dotStyle(o)])},null,6)))),128))])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-aecd6c92"]]),Br={props:{list:{type:Array,default:w.swiper.list},indicator:{type:Boolean,default:w.swiper.indicator},indicatorActiveColor:{type:String,default:w.swiper.indicatorActiveColor},indicatorInactiveColor:{type:String,default:w.swiper.indicatorInactiveColor},indicatorStyle:{type:[String,Object],default:w.swiper.indicatorStyle},indicatorMode:{type:String,default:w.swiper.indicatorMode},autoplay:{type:Boolean,default:w.swiper.autoplay},current:{type:[String,Number],default:w.swiper.current},currentItemId:{type:String,default:w.swiper.currentItemId},interval:{type:[String,Number],default:w.swiper.interval},duration:{type:[String,Number],default:w.swiper.duration},circular:{type:Boolean,default:w.swiper.circular},previousMargin:{type:[String,Number],default:w.swiper.previousMargin},nextMargin:{type:[String,Number],default:w.swiper.nextMargin},acceleration:{type:Boolean,default:w.swiper.acceleration},displayMultipleItems:{type:Number,default:w.swiper.displayMultipleItems},easingFunction:{type:String,default:w.swiper.easingFunction},keyName:{type:String,default:w.swiper.keyName},imgMode:{type:String,default:w.swiper.imgMode},height:{type:[String,Number],default:w.swiper.height},bgColor:{type:String,default:w.swiper.bgColor},radius:{type:[String,Number],default:w.swiper.radius},loading:{type:Boolean,default:w.swiper.loading},showTitle:{type:Boolean,default:w.swiper.showTitle}}},Sr={name:"u-swiper",mixins:[V,k,Br],data:()=>({currentIndex:0}),watch:{current(e,t){e!==t&&(this.currentIndex=e)}},emits:["click","change"],computed:{itemStyle(){return e=>{const t={};return this.nextMargin&&this.previousMargin&&(t.borderRadius=uni.$u.addUnit(this.radius),e!==this.currentIndex&&(t.transform="scale(0.92)")),t}}},methods:{getItemType(e){return"string"==typeof e?uni.$u.test.video(this.getSource(e))?"video":"image":"object"==typeof e&&this.keyName?e.type?"image"===e.type?"image":"video"===e.type?"video":"image":uni.$u.test.video(this.getSource(e))?"video":"image":void 0},getSource(e){return"string"==typeof e?e:"object"==typeof e&&this.keyName?e[this.keyName]:(uni.$u.error("请按格式传递列表参数"),"")},change(e){const{current:t}=e.detail;this.pauseVideo(this.currentIndex),this.currentIndex=t,this.$emit("change",e.detail)},pauseVideo(e){const t=this.getSource(this.list[e]);if(uni.$u.test.video(t)){uni.createVideoContext(`video-${e}`,this).pause()}},getPoster:e=>"object"==typeof e&&e.poster?e.poster:"",clickHandler(e){this.$emit("click",e)}}};const Dr=x(Sr,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-loading-icon"),T),c=o(e.resolveDynamicComponent("u-swiper-indicator"),Er);return e.openBlock(),e.createElementBlock("view",{class:"u-swiper",style:e.normalizeStyle({backgroundColor:t.bgColor,height:t.$u.addUnit(t.height),borderRadius:t.$u.addUnit(t.radius)})},[t.loading?(e.openBlock(),e.createElementBlock("view",{key:0,class:"u-swiper__loading"},[e.createVNode(s,{mode:"circle"})])):(e.openBlock(),e.createElementBlock("swiper",{key:1,class:"u-swiper__wrapper",style:e.normalizeStyle({height:t.$u.addUnit(t.height)}),onChange:a[0]||(a[0]=(...e)=>l.change&&l.change(...e)),circular:t.circular,interval:t.interval,duration:t.duration,autoplay:t.autoplay,current:t.current,currentItemId:t.currentItemId,previousMargin:t.$u.addUnit(t.previousMargin),nextMargin:t.$u.addUnit(t.nextMargin),acceleration:t.acceleration,displayMultipleItems:t.displayMultipleItems,easingFunction:t.easingFunction},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,((a,o)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"u-swiper__wrapper__item",key:o},[e.createElementVNode("view",{class:"u-swiper__wrapper__item__wrapper",style:e.normalizeStyle([l.itemStyle(o)])},["image"===l.getItemType(a)?(e.openBlock(),e.createElementBlock("image",{key:0,class:"u-swiper__wrapper__item__wrapper__image",src:l.getSource(a),mode:t.imgMode,onClick:e=>l.clickHandler(o),style:e.normalizeStyle({height:t.$u.addUnit(t.height),borderRadius:t.$u.addUnit(t.radius)})},null,12,["src","mode","onClick"])):e.createCommentVNode("",!0),"video"===l.getItemType(a)?(e.openBlock(),e.createElementBlock("video",{key:1,class:"u-swiper__wrapper__item__wrapper__video",id:`video-${o}`,"enable-progress-gesture":!1,src:l.getSource(a),poster:l.getPoster(a),title:t.showTitle&&t.$u.test.object(a)&&a.title?a.title:"",style:e.normalizeStyle({height:t.$u.addUnit(t.height)}),controls:"",onClick:e=>l.clickHandler(o)},null,12,["id","src","poster","title","onClick"])):e.createCommentVNode("",!0),t.showTitle&&t.$u.test.object(a)&&a.title&&t.$u.test.image(l.getSource(a))?(e.openBlock(),e.createElementBlock("text",{key:2,class:"u-swiper__wrapper__item__wrapper__title u-line-1"},e.toDisplayString(a.title),1)):e.createCommentVNode("",!0)],4)])))),128))],44,["circular","interval","duration","autoplay","current","currentItemId","previousMargin","nextMargin","acceleration","displayMultipleItems","easingFunction"])),e.createElementVNode("view",{class:"u-swiper__indicator",style:e.normalizeStyle([t.$u.addStyle(t.indicatorStyle)])},[e.renderSlot(t.$slots,"indicator",{},(()=>[t.loading||!t.indicator||t.showTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:0,indicatorActiveColor:t.indicatorActiveColor,indicatorInactiveColor:t.indicatorInactiveColor,length:t.list.length,current:r.currentIndex,indicatorMode:t.indicatorMode},null,8,["indicatorActiveColor","indicatorInactiveColor","length","current","indicatorMode"]))]),!0)],4)],4)}],["__scopeId","data-v-d129bdab"]]),Ar=e=>An.get("/fence_house/list",e),Ir=e=>An.get("/animal_info/detail",e),Tr=e=>An.get("/animal_info/lists",e),Pr=e=>An.get("/operation_log/index",e),Fr={__name:"results",setup(t){e.ref("");const a=e.ref(""),n=e.reactive({});e.ref(""),r((e=>{a.value=8,i(),u()})),s((()=>{c.value.page_no++,u()}));const i=()=>{Ir({id:a.value}).then((e=>{1==e.code&&(e.data.pic=JSON.parse(e.data.pic||"[]"),Object.assign(n,e.data))}))},l=e.ref([]);Qn().then((e=>{l.value=e.data}));const c=e.ref({animal_sn:"6655",page_no:1,page_size:10}),d=e.ref([]),u=()=>{var e;(e=c.value,An.get("/index/suYuan",e)).then((e=>{e.data.lists.length<=0||(e.data.lists=e.data.lists.map((e=>((e={...e,...e.detail}).pic&&(e.pic=JSON.parse(e.pic)),e))),d.value=[...d.value,...e.data.lists])}))};return(t,a)=>{const i=o(e.resolveDynamicComponent("u-swiper"),Dr),r=o(e.resolveDynamicComponent("up-input"),ai),s=o(e.resolveDynamicComponent("u-form-item"),ni),c=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"banner"},[e.createVNode(i,{list:n.pic,width:"100%",height:"484rpx"},null,8,["list"])]),Object.keys(n).length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"content-con-a"},[e.createElementVNode("view",{class:"shop_detail"},[e.createElementVNode("view",{class:"tit"}," 动物信息 "),e.createElementVNode("view",{class:"shop_detail-botm"},[e.createElementVNode("view",{class:"detail"},[e.createElementVNode("view",{class:"detaila"}," 耳号: "),e.createElementVNode("view",{class:"detailb"},e.toDisplayString(n.sn),1)]),e.createElementVNode("view",{class:"detail"},[e.createElementVNode("view",{class:"detaila"}," 品种: "),e.createElementVNode("view",{class:"detailb"},e.toDisplayString(n.brand),1)]),e.createElementVNode("view",{class:"detail"},[e.createElementVNode("view",{class:"detaila"}," 性别: "),e.createElementVNode("view",{class:"detailb"},e.toDisplayString(1==n.gender?"公":"母"),1)])])]),e.createElementVNode("view",{class:"shop_action"})])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"card-d",key:a},[2==t.type?(e.openBlock(),e.createBlock(c,{key:0,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"驱虫信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"驱虫药名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",type:"txt",border:"none",modelValue:t.vermifuge_name,"onUpdate:modelValue":e=>t.vermifuge_name=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"驱虫方式",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.deworming_method,"onUpdate:modelValue":e=>t.deworming_method=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"驱虫时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0),3==t.type?(e.openBlock(),e.createBlock(c,{key:1,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂食信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"饲料种类",borderBottom:""},{default:e.withCtx((()=>{return[e.createElementVNode("view",{style:{"font-weight":"600"}},e.toDisplayString((a=t.feed_type,(null==(o=l.value.find((e=>e.value==a)))?void 0:o.name)||"")),1)];var a,o})),_:2},1024),e.createVNode(s,{label:"饲料品牌",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.feed_brand,"onUpdate:modelValue":e=>t.feed_brand=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"饲料消耗量(kg)",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",type:"number",border:"none",modelValue:t.feed_consumption,"onUpdate:modelValue":e=>t.feed_consumption=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"喂食时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0),1==t.type?(e.openBlock(),e.createBlock(c,{key:2,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"消毒信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"消毒剂名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.disinfectant_name,"onUpdate:modelValue":e=>t.disinfectant_name=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒剂浓度",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.concentration,"onUpdate:modelValue":e=>t.concentration=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒方法",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.disinfectant_method,"onUpdate:modelValue":e=>t.disinfectant_method=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒区域",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.disinfectant_area,"onUpdate:modelValue":e=>t.disinfectant_area=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.operator,"onUpdate:modelValue":e=>t.operator=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0),4==t.type?(e.openBlock(),e.createBlock(c,{key:3,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"疫苗信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"疫苗名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccine_name,"onUpdate:modelValue":e=>t.vaccine_name=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"疫苗厂家",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccine_manufacturers,"onUpdate:modelValue":e=>t.vaccine_manufacturers=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"疫苗批次号",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccine_batch,"onUpdate:modelValue":e=>t.vaccine_batch=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"接种方式",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccination_method,"onUpdate:modelValue":e=>t.vaccination_method=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"接种部位",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccination_site,"onUpdate:modelValue":e=>t.vaccination_site=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"免疫有限期",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.immune_validity_period,"onUpdate:modelValue":e=>t.immune_validity_period=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"注射人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.operator,"onUpdate:modelValue":e=>t.operator=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"接种时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0),5==t.type?(e.openBlock(),e.createBlock(c,{key:4,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂水信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"喂水量(L)",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.water_consumption,"onUpdate:modelValue":e=>t.water_consumption=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"喂水人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.operator,"onUpdate:modelValue":e=>t.operator=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"喂水时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0)])))),128))])}}},Ur={__name:"detail",setup(t){const n=e.ref(""),i=e.reactive([]);e.ref(""),r((e=>{n.value=e.id,l(e.plant_id,e.type)}));const l=(e,t)=>{var a;(a={plant_id:e,type:t},An.get("/action/listForType",a)).then((e=>{1==e.code&&(i.splice(0,i.length,...e.data),e.data.detai)}))},s=e=>{uni.previewImage({urls:e})},c=e=>{a("log","at pages/husbandryForm/detail.vue:248",e)};return(t,a)=>{const n=o(e.resolveDynamicComponent("u-swiper"),Dr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"content-con-a"},[e.createElementVNode("view",{class:"shop_action"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:""},[e.createElementVNode("view",{class:"tit"},e.toDisplayString(t.type_text),1),3!=t.type&&5!=t.type?(e.openBlock(),e.createElementBlock("view",{key:0,class:"shop_action-detail"},[e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 施肥面积: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.area)+"亩 ",1)]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"},[e.createTextVNode(e.toDisplayString(t.type_text.slice(0,-2)),1),2==t.type||4==t.type?(e.openBlock(),e.createElementBlock("text",{key:0,class:""},"剂")):e.createCommentVNode("",!0),e.createTextVNode("品种: ")]),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.kind),1)]),t.detail.breed?(e.openBlock(),e.createElementBlock("view",{key:0,class:"action-detail"},[e.createElementVNode("view",{class:"title"},[e.createTextVNode(e.toDisplayString(t.type_text.slice(0,-2)),1),2==t.type||4==t.type?(e.openBlock(),e.createElementBlock("text",{key:0,class:""},"剂")):e.createCommentVNode("",!0),e.createTextVNode("品牌: ")]),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.breed),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"},[e.createTextVNode(e.toDisplayString(t.type_text.slice(0,-2)),1),2==t.type||4==t.type?(e.openBlock(),e.createElementBlock("text",{key:0,class:""},"剂")):e.createCommentVNode("",!0),e.createTextVNode("用量: ")]),e.createElementVNode("view",{class:"detail"},[e.createTextVNode(e.toDisplayString(t.detail.dosage)+" ",1),4==t.type?(e.openBlock(),e.createElementBlock("text",{key:0},"升")):e.createCommentVNode("",!0),4!=t.type&&5!=t.type?(e.openBlock(),e.createElementBlock("text",{key:1},"斤")):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 参与人: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.user),1)]),t.detail.start_date?(e.openBlock(),e.createElementBlock("view",{key:1,class:"action-detail"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"开始时间: ",1),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.start_date),1)])):e.createCommentVNode("",!0),t.detail.end_date?(e.openBlock(),e.createElementBlock("view",{key:2,class:"action-detail"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"结束时间: ",1),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.end_date),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"action-detail-img"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"图片: ",1),t.detail&&t.detail.pic&&t.detail.pic.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"detail-img"},[e.createVNode(n,{list:t.detail.pic,onClick:c,indicator:"",indicatorMode:"dot",circular:""},null,8,["list"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),3==t.type?(e.openBlock(),e.createElementBlock("view",{key:1,class:"shop_action-detail"},[e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 灌溉面积: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.area)+"亩 ",1)]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 灌溉方式: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(1==t.detail.type?"喷灌":2==t.detail.type?"滴灌":"沟灌"),1)]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 参与人: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.user),1)]),t.detail.start_date?(e.openBlock(),e.createElementBlock("view",{key:0,class:"action-detail"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"开始时间: ",1),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.start_date),1)])):e.createCommentVNode("",!0),t.detail.end_date?(e.openBlock(),e.createElementBlock("view",{key:1,class:"action-detail"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"结束时间: ",1),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.end_date),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"action-detail-img"},[e.createElementVNode("view",{class:"title"}," 灌溉图片: "),t.detail&&t.detail.pic&&t.detail.pic.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"detail-img"},[e.createElementVNode("image",{onClick:e=>s(t.detail.pic),src:t.detail.pic[0],mode:"aspectFit"},null,8,["onClick","src"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),5==t.type?(e.openBlock(),e.createElementBlock("view",{key:2,class:"shop_action-detail"},[e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title",style:{width:"200rpx"}}," 收获时间: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.create_time),1)]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title",style:{width:"200rpx"}}," 参与人: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.user),1)]),e.createElementVNode("view",{class:"action-detail-img"},[e.createElementVNode("view",{class:"title"}," 收获图片: "),t.detail&&t.detail.pic&&t.detail.pic.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"detail-img"},[e.createElementVNode("image",{onClick:e=>s(t.detail.pic),src:t.detail.pic[0],mode:"aspectFit"},null,8,["onClick","src"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])))),256))])])):e.createCommentVNode("",!0)])}}},Or={data:()=>({pwdShow:{old_password:!1,password:!1,password_confirm:!1},formData:{old_password:"",password:"",password_confirm:""},rules:{old_password:{type:"string",required:!0,min:6,max:18,message:"请输入6-18位密码",trigger:["change","blur"]},password:{type:"string",required:!0,min:6,max:18,message:"请输入6-18位密码",trigger:["change","blur"]},password_confirm:{type:"string",required:!0,min:6,max:18,message:"请输入6-18位密码",trigger:["change","blur"]}}}),methods:{submit(){this.$refs.formRef.validate().then((async e=>{if(e){if(this.formData.password==this.formData.old_password)return uni.$u.toast("新密码不能与原密码一致");if(this.formData.password!==this.formData.password_confirm)return uni.$u.toast("两次新密码不一致");(t=this.formData,An.post("/user/changePassword",t)).then((e=>{1==e.code&&(uni.$u.toast("修改成功"),uni.switchTab({url:"/pages/index/personal"}))}))}var t}))}}};const qr=x(Or,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-input"),ai),c=o(e.resolveDynamicComponent("u-form-item"),ni),d=o(e.resolveDynamicComponent("u-button"),Si),u=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"reset-password"},[e.createVNode(u,{ref:"formRef",rules:r.rules,model:r.formData,labelPosition:"top"},{default:e.withCtx((()=>[e.createVNode(c,{label:"原密码",labelWidth:"140rpx",borderBottom:"",prop:"old_password","left-icon":"lock"},{default:e.withCtx((()=>[e.createVNode(s,{placeholder:"请输入原密码",border:"surround",modelValue:r.formData.old_password,"onUpdate:modelValue":a[0]||(a[0]=e=>r.formData.old_password=e),password:!r.pwdShow.old_password,class:"ipt",customStyle:"padding:20rpx 10rpx"},null,8,["modelValue","password"])])),_:1}),e.createVNode(c,{label:"新密码",labelWidth:"140rpx",borderBottom:"",prop:"password","left-icon":"lock"},{default:e.withCtx((()=>[e.createVNode(s,{border:"surround",class:"ipt",customStyle:"padding:20rpx 10rpx",modelValue:r.formData.password,"onUpdate:modelValue":a[1]||(a[1]=e=>r.formData.password=e),password:!r.pwdShow.password,placeholder:"请输入新密码"},null,8,["modelValue","password"])])),_:1}),e.createVNode(c,{label:"确认密码",labelWidth:"180rpx",borderBottom:"",prop:"password_confirm","left-icon":"lock"},{default:e.withCtx((()=>[e.createVNode(s,{border:"surround",modelValue:r.formData.password_confirm,"onUpdate:modelValue":a[2]||(a[2]=e=>r.formData.password_confirm=e),password:!r.pwdShow.password_confirm,placeholder:"请确认新密码",class:"ipt",customStyle:"padding:20rpx 10rpx"},null,8,["modelValue","password"])])),_:1}),e.createVNode(d,{style:{"margin-top":"28rpx","background-color":"#feb048",color:"#fff"},customStyle:"border-radius: 50rpx;height:100rpx",onClick:l.submit},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1},8,["onClick"])])),_:1},8,["rules","model"])])])}],["__scopeId","data-v-6f5542e2"]]),$r={__name:"personal",setup(t){r((()=>{uni.hideTabBar()}));const a=e.reactive({});i((()=>{null!=wn.state.userInfo&&Object.assign(a,wn.state.userInfo)}));const n=()=>{uni.previewImage({urls:[a.avatar]})},l=e.reactive([{text:"安全设置",nav:"/pages/updatePassword/updatePassword"}]),s=()=>{var e;wn.state.userInfo?An.get("/login/logout",e).then((e=>{1==e.code&&(uni.$u.toast("退出登录"),uni.navigateTo({url:"/pages/Login/login"}),uni.clearStorageSync())})):uni.navigateTo({url:"/pages/Login/login"})};return(t,i)=>{const r=o(e.resolveDynamicComponent("u--image"),A),c=o(e.resolveDynamicComponent("u-icon"),C),d=o(e.resolveDynamicComponent("up-button"),Si);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"head"},[e.createElementVNode("view",{class:"head-return"},[e.createVNode(En,{url:"/pages/index/personal"})]),e.createElementVNode("view",{class:"head-con"},[e.createElementVNode("view",{class:"avater"},[e.createVNode(r,{onClick:n,src:a.avatar,width:"130.28rpx",height:"130.28rpx",shape:"circle"},null,8,["src"])]),Object.keys(a).length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createElementVNode("view",{class:"head-li"},e.toDisplayString(a.nickname),1),e.createElementVNode("view",{class:"head-li"}," 电话: "+e.toDisplayString(a.mobile),1)])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"",onClick:i[0]||(i[0]=e=>{return t="/pages/Login/login",void uni.redirectTo({url:t});var t})}," 请登录 "))])]),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"card",style:{"border-radius":"10rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"card-li",key:a,onClick:e=>{return a=t.nav,void uni.navigateTo({url:a});var a}},[e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createElementVNode("view",{class:"",style:{"margin-right":"20rpx"}},[e.createVNode(c,{size:"20",name:"lock"})]),e.createElementVNode("view",{class:""},e.toDisplayString(t.text),1)]),e.createElementVNode("view",{class:""},[e.createVNode(c,{name:"arrow-right",size:"16"})])],8,["onClick"])))),128))]),e.createElementVNode("view",{class:"out-btn"},[Object.keys(a).length>0?(e.openBlock(),e.createBlock(d,{key:0,onClick:s,type:"primary",customStyle:"border:none;height:90rpx;border-radius: 500rpx;",color:"#EC6857",text:"退出登录"})):e.createCommentVNode("",!0)]),e.createVNode(Vn)])],64)}}},Lr=x({__name:"login",setup(t){const n=(void 0===i&&(i=null),e.inject(null!==i?i:Wo));var i;e.ref(0);const r=e.ref(!1),l=e.ref(!1);e.ref("获取验证码");const s=e.ref(0),c=e.reactive({account:"15680975703",password:"123456",code:"",scene:"2",terminal:""});e.reactive({list:[{name:"验证码登录",id:1},{name:"账号登录",id:2}]});const d=()=>{if(s.value)return;if(!c.account)return uni.$u.toast("账号不能为空");(e=>An.post("/index/code",e))({phone:c.account,scene:101}).then((e=>{1==e.code&&(r.value=!0,uni.$u.toast("验证码已发送"),(()=>{s.value=60;const e=setInterval((()=>{s.value-=1,s.value<=0&&(clearInterval(e),r.value=!1)}),1e3)})())}))},u=()=>{uni.navigateTo({url:"/pages/Login/resgier"})},m=()=>{return c.account?c.password||1!=c.scene?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(c.account)?c.code||2!=c.scene?(uni.showLoading({title:"登陆中"}),void(e=c,An.post("/login/account",e)).then((e=>{1==e.code&&(n.dispatch("saveUserInfo",e.data),uni.hideLoading(),wn.dispatch("changeTabbar",0),uni.switchTab({url:"/pages/index/massif"}),uni.$u.toast("登录成功"))}))):uni.$u.toast("验证码不能为空"):uni.$u.toast("请输入正确的手机号码"):uni.$u.toast("密码不能为空"):uni.$u.toast("账号不能为空");var e},p=e.ref(0),h=e.ref(2),f=e=>{h.value=e?1:2,c.scene=h.value,a("log","at pages/Login/login.vue:593",c.scene),p.value=e},g=e=>`/static/main/login/${e}.png`;return e.onMounted((()=>{uni.getSystemInfo({success:e=>{const t=e.platform.toLowerCase();"ios"===t?c.terminal=5:"android"===t?c.terminal=6:("windows"===t||"mac"===t)&&(c.terminal=4)}})})),(t,a)=>{const n=o(e.resolveDynamicComponent("up-image"),A),i=o(e.resolveDynamicComponent("u-input"),ai),r=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createVNode(En,{style:{float:"right"}}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"tit"}," 您好! "),e.createElementVNode("view",{class:"tit",style:{"margin-bottom":"60rpx"}}," 欢迎进入吟龙养殖测溯系统! "),e.createElementVNode("view",{class:"input-card"},[e.createElementVNode("view",{class:"card-head"},[e.createElementVNode("view",{class:e.normalizeClass(["code-login",{act_code:2==h.value}]),onClick:a[0]||(a[0]=e=>f(0))},[e.createElementVNode("span",null,"验证码登录")],2),e.createElementVNode("view",{class:e.normalizeClass(["password-login",{act_password:1==h.value}]),onClick:a[1]||(a[1]=e=>f(320))}," 密码登录 ",2),e.createElementVNode("view",{class:"line",style:e.normalizeStyle({transform:"translateX("+p.value+"rpx)"})},null,4)]),e.createElementVNode("view",{class:"login-content",style:{position:"absolute",width:"680rpx",height:"900rpx","background-color":"white",top:"85rpx","z-index":"99999"}},[e.createElementVNode("view",{class:"code"},[1==h.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{"margin-bottom":"20rpx"}},[e.createElementVNode("view",{class:"",style:{display:"flex","margin-bottom":"10rpx"}},[e.createVNode(n,{src:g("sj"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("账号 ")]),e.createVNode(i,{placeholder:"请输入用户账号",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none",shape:"circle",border:"surround",modelValue:c.account,"onUpdate:modelValue":a[2]||(a[2]=e=>c.account=e)},null,8,["modelValue"]),e.createElementVNode("view",{class:"",style:{display:"flex","margin-top":"30rpx","margin-bottom":"10rpx"}},[e.createVNode(n,{src:g("mm"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("密码 ")]),e.createVNode(i,{password:!l.value,shape:"circle",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none",placeholder:"请输入密码",border:"surround",modelValue:c.password,"onUpdate:modelValue":a[3]||(a[3]=e=>c.password=e)},null,8,["password","modelValue"])])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createElementVNode("view",{class:"",style:{display:"flex","margin-bottom":"10rpx"}},[e.createVNode(n,{src:g("sj"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("手机号 ")]),e.createVNode(i,{placeholder:"请输入账号",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none",shape:"circle",border:"surround",modelValue:c.account,"onUpdate:modelValue":a[4]||(a[4]=e=>c.account=e)},null,8,["modelValue"]),e.createElementVNode("view",{class:"",style:{display:"flex","margin-top":"30rpx","margin-bottom":"10rpx"}},[e.createVNode(n,{src:g("yzm"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("验证码 ")]),e.createElementVNode("view",{class:"",style:{position:"relative"}},[e.createVNode(i,{type:"number",shape:"circle",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none;margin-bottom:15rpx",placeholder:"请输入验证码",border:"surround",modelValue:c.code,"onUpdate:modelValue":a[5]||(a[5]=e=>c.code=e)},null,8,["modelValue"]),e.createElementVNode("view",{class:"get-code",style:e.normalizeStyle({color:s.value?"#ADADAD":""}),onClick:d},[e.createElementVNode("text",{class:"lineY"}),e.createTextVNode(" 获取验证码 "),s.value?(e.openBlock(),e.createElementBlock("text",{key:0},e.toDisplayString(s.value)+"s",1)):e.createCommentVNode("",!0)],4)])])),e.createElementVNode("view",{class:"",style:{"font-size":"26rpx"}},[e.createElementVNode("text",null,"还没有账号?点击"),e.createTextVNode(),e.createElementVNode("text",{onClick:u,style:{color:"#feb048","text-decoration":"underline"}},"注册")]),e.createElementVNode("view",{class:"sub-btn"},[e.createVNode(r,{onClick:m,type:"primary",customStyle:"border:none;height:90rpx;border-radius: 50rpx;",color:"#feb048",text:"登录"})])])])])])])}}},[["__scopeId","data-v-b1a2f6d9"]]),zr=x({__name:"resgier",setup(t){const a=e.ref(!1);e.ref(!1);const n=e.reactive({mobile:"19130550023",verify_code:"",password:"",password_confirm:""}),i=e.ref(0),r=e=>`/static/main/login/${e}.png`,l=()=>{if(i.value)return;if(!n.mobile)return uni.$u.toast("账号不能为空");(e=>An.post("/sms/sendCode",e))({mobile:n.mobile,scene:"YZMDL"}).then((e=>{1==e.code&&(uni.$u.toast("验证码已发送"),(()=>{i.value=60;const e=setInterval((()=>{i.value-=1,i.value<=0&&clearInterval(e)}),1e3)})())}))},s=()=>{var e;return n.mobile?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(n.mobile)?n.password?n.password.length<6?uni.$u.toast("密码长度至少在6-25位之间"):/^(?=.*[a-zA-Z])(?=.*\d).+$/.test(n.password)?(n.password_confirm=n.password,void(e=n,An.post("/login/register",e)).then((e=>{1==e.code?(uni.navigateBack({delta:1}),uni.$u.toast("注册成功")):e.data&&1==e.data.has_register&&uni.redirectTo({url:"/pages/Login/login"})}))):uni.$u.toast("密码要包含数字与英文"):uni.$u.toast("密码不能为空"):uni.$u.toast("请输入正确的手机号码"):uni.$u.toast("账号不能为空")},c=()=>{uni.navigateBack()};return(t,d)=>{const u=o(e.resolveDynamicComponent("u-icon"),C),m=o(e.resolveDynamicComponent("up-image"),A),p=o(e.resolveDynamicComponent("u-input"),ai),h=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"",style:{"margin-left":"20rpx",float:"left"},onClick:c},[e.createVNode(u,{name:"arrow-left",color:"white",size:"20"})]),e.createVNode(En,{style:{float:"right"}}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"tit",style:{"margin-bottom":"10rpx"}}," 您好! "),e.createElementVNode("view",{class:"tit"}," 欢迎进入吟龙养殖测溯系统! "),e.createElementVNode("view",{class:"input-card",style:{color:"#7A7A7A"}},[e.createElementVNode("view",{class:"login-type",style:{color:"black","font-weight":"bold"}},[e.createTextVNode(" 注册 "),e.createElementVNode("view",{class:"line"})]),e.createElementVNode("view",{class:"",style:{margin:"30rpx 0"}},[e.createElementVNode("view",{class:"",style:{display:"flex","margin-bottom":"10rpx"}},[e.createVNode(m,{src:r("sj"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("手机号 ")]),e.createVNode(p,{placeholder:"请输入账号",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none",shape:"circle",border:"surround",modelValue:n.mobile,"onUpdate:modelValue":d[0]||(d[0]=e=>n.mobile=e)},null,8,["modelValue"])]),e.createElementVNode("view",{class:"",style:{display:"flex","margin-top":"30rpx","margin-bottom":"10rpx"}},[e.createVNode(m,{src:r("yzm"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("验证码 ")]),e.createElementVNode("view",{class:"",style:{position:"relative"}},[e.createVNode(p,{type:"number",shape:"circle",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none;margin-bottom:15rpx",placeholder:"请输入验证码",border:"surround",modelValue:n.verify_code,"onUpdate:modelValue":d[1]||(d[1]=e=>n.verify_code=e)},null,8,["modelValue"]),e.createElementVNode("view",{class:"get-code",style:e.normalizeStyle({color:i.value?"#ADADAD":""}),onClick:l},[e.createElementVNode("text",{class:"lineY"}),e.createTextVNode(" 验证码 "),i.value?(e.openBlock(),e.createElementBlock("text",{key:0},e.toDisplayString(i.value)+"s",1)):e.createCommentVNode("",!0)],4)]),e.createElementVNode("view",{class:"",style:{margin:"30rpx 0"}},[e.createElementVNode("view",{class:"",style:{display:"flex","margin-top":"30rpx","margin-bottom":"10rpx"}},[e.createVNode(m,{src:r("mm"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("密码 ")]),e.createVNode(p,{password:!a.value,shape:"circle",customStyle:"background:#F5F5F5;height:80rpx;;padding-left:40rpx;border:none",placeholder:"请输入密码",border:"surround",modelValue:n.password,"onUpdate:modelValue":d[2]||(d[2]=e=>n.password=e)},null,8,["password","modelValue"])]),e.createElementVNode("view",{class:"sub-btn"},[e.createVNode(h,{onClick:s,type:"primary",customStyle:"border:none;height:90rpx;border-radius: 100rpx;",color:"#feb048",text:"注册"})])])])])}}},[["__scopeId","data-v-066a14d0"]]),jr={__name:"manager",setup(t){r((()=>{uni.hideTabBar()}));const a=e.reactive([{name:"栏舍设置",tips:"栏舍新增/详情喂养、记录",bg:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/be364202312191601547849.png",color:"#cc841f",url:"/pages/plantAdmin/house"},{name:"档案管理",tips:"档案新增、档案详情/编辑",bg:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/8d37b202312251151062137.png",color:"#1f84cc",url:"/pages/record/record"},{name:"转栏记录",tips:"转入/转出舍栏、转栏时间",bg:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/cee51202312191634095436.png",color:"#c36136",url:"/pages/jump/jump"},{name:"离栏记录",tips:"离舍类型/原因、离舍时间",bg:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/3246c202312191633441356.png",color:"#366ecf",url:"/pages/leave/leave"}]);return(t,o)=>(e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title"}," 牲畜管理 "),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"card-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,class:"card-box",onClick:e=>{var a;(a=t.url)?uni.navigateTo({url:a}):uni.showToast({title:"暂未开放",icon:"none"})},style:e.normalizeStyle({backgroundImage:`url(${t.bg})`,color:t.color})},[e.createElementVNode("view",{class:"box-top"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"btn",style:e.normalizeStyle({border:`2rpx solid ${t.color}`})},"点击进入",4)]),e.createElementVNode("view",{class:"box-bottom"},e.toDisplayString(t.tips),1)],12,["onClick"])))),128))]),e.createVNode(Vn)]))}},Mr={props:{shape:{type:String,default:w.search.shape},bgColor:{type:String,default:w.search.bgColor},placeholder:{type:String,default:w.search.placeholder},clearabled:{type:Boolean,default:w.search.clearabled},focus:{type:Boolean,default:w.search.focus},showAction:{type:Boolean,default:w.search.showAction},actionStyle:{type:Object,default:w.search.actionStyle},actionText:{type:String,default:w.search.actionText},inputAlign:{type:String,default:w.search.inputAlign},inputStyle:{type:Object,default:w.search.inputStyle},disabled:{type:Boolean,default:w.search.disabled},borderColor:{type:String,default:w.search.borderColor},searchIconColor:{type:String,default:w.search.searchIconColor},color:{type:String,default:w.search.color},placeholderColor:{type:String,default:w.search.placeholderColor},searchIcon:{type:String,default:w.search.searchIcon},searchIconSize:{type:[Number,String],default:w.search.searchIconSize},margin:{type:String,default:w.search.margin},animation:{type:Boolean,default:w.search.animation},modelValue:{type:String,default:w.search.value},value:{type:String,default:w.search.value},maxlength:{type:[String,Number],default:w.search.maxlength},height:{type:[String,Number],default:w.search.height},label:{type:[String,Number,null],default:w.search.label}}},Rr={name:"u-search",mixins:[V,k,Mr],data(){return{keyword:"",showClear:!1,show:!1,focused:this.focus}},watch:{keyword(e){this.$emit("update:modelValue",e),this.$emit("change",e)},modelValue:{immediate:!0,handler(e){this.keyword=e}}},computed:{showActionBtn(){return!this.animation&&this.showAction}},emits:["clear","search","custom","focus","blur","click","clickIcon","update:modelValue","change"],methods:{inputChange(e){this.keyword=e.detail.value},clear(){this.keyword="",this.$nextTick((()=>{this.$emit("clear")}))},search(e){this.$emit("search",e.detail.value);try{uni.hideKeyboard()}catch(t){}},custom(){this.$emit("custom",this.keyword);try{uni.hideKeyboard()}catch(it){}},getFocus(){this.focused=!0,this.animation&&this.showAction&&(this.show=!0),this.$emit("focus",this.keyword)},blur(){setTimeout((()=>{this.focused=!1}),100),this.show=!1,this.$emit("blur",this.keyword)},clickHandler(){this.disabled&&this.$emit("click")},clickIcon(e){this.$emit("clickIcon",this.keyword);try{uni.hideKeyboard()}catch(t){}}}};const Hr=x(Rr,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("view",{class:"u-search",onClick:a[6]||(a[6]=(...e)=>l.clickHandler&&l.clickHandler(...e)),style:e.normalizeStyle([{margin:t.margin},t.$u.addStyle(t.customStyle)])},[e.createElementVNode("view",{class:"u-search__content",style:e.normalizeStyle({backgroundColor:t.bgColor,borderRadius:"round"==t.shape?"100px":"4px",borderColor:t.borderColor})},[t.$slots.label||null!==t.label?e.renderSlot(t.$slots,"label",{key:0},(()=>[e.createElementVNode("text",{class:"u-search__content__label"},e.toDisplayString(t.label),1)]),!0):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"u-search__content__icon"},[e.createVNode(s,{onClick:l.clickIcon,size:t.searchIconSize,name:t.searchIcon,color:t.searchIconColor?t.searchIconColor:t.color},null,8,["onClick","size","name","color"])]),e.createElementVNode("input",{"confirm-type":"search",onBlur:a[0]||(a[0]=(...e)=>l.blur&&l.blur(...e)),value:r.keyword,onConfirm:a[1]||(a[1]=(...e)=>l.search&&l.search(...e)),onInput:a[2]||(a[2]=(...e)=>l.inputChange&&l.inputChange(...e)),disabled:t.disabled,onFocus:a[3]||(a[3]=(...e)=>l.getFocus&&l.getFocus(...e)),focus:t.focus,maxlength:t.maxlength,"placeholder-class":"u-search__content__input--placeholder",placeholder:t.placeholder,"placeholder-style":`color: ${t.placeholderColor}`,class:"u-search__content__input",type:"text",style:e.normalizeStyle([{textAlign:t.inputAlign,color:t.color,backgroundColor:t.bgColor,height:t.$u.addUnit(t.height)},t.inputStyle])},null,44,["value","disabled","focus","maxlength","placeholder","placeholder-style"]),r.keyword&&t.clearabled&&r.focused?(e.openBlock(),e.createElementBlock("view",{key:1,class:"u-search__content__icon u-search__content__close",onClick:a[4]||(a[4]=(...e)=>l.clear&&l.clear(...e))},[e.createVNode(s,{name:"close",size:"11",color:"#ffffff",customStyle:"line-height: 12px"})])):e.createCommentVNode("",!0)],4),e.createElementVNode("text",{style:e.normalizeStyle([t.actionStyle]),class:e.normalizeClass(["u-search__action",[(l.showActionBtn||r.show)&&"u-search__action--active"]]),onClick:a[5]||(a[5]=e.withModifiers(((...e)=>l.custom&&l.custom(...e)),["stop","prevent"]))},e.toDisplayString(t.actionText),7)],4)}],["__scopeId","data-v-c20cd503"]]),Qr={__name:"house",setup(t){r((()=>{wn.state.userInfo||uni.redirectTo({url:"/pages/Login/login"})})),i((()=>{u()})),c((()=>{u(),uni.stopPullDownRefresh()})),s((()=>{m()}));const n=e.ref([]),l=e.reactive({page_no:1,page_size:15,fence_house_name:""}),d=e.ref([]);Hn().then((e=>{d.value=e.data}));const u=()=>{n.value.splice(0),l.page_no=1,m()},m=()=>{Ar(l).then((e=>{a("log","at pages/plantAdmin/house.vue:142",e),n.value=[...n.value,...e.data.lists],a("log","at pages/plantAdmin/house.vue:144",n.value)}))},p=e=>{try{return"string"==typeof e&&(e=JSON.parse(e||"[]")),e[0]}catch(it){return""}},h=e=>{0==e.length&&u()},f=()=>{u()},g=e=>{e?uni.navigateTo({url:e}):uni.showToast({title:"暂未开放",icon:"none"})},v=()=>{uni.navigateBack()};return e.onMounted((()=>{})),(t,a)=>{const i=o(e.resolveDynamicComponent("u-icon"),C),r=o(e.resolveDynamicComponent("u-search"),Hr);return e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title",onClick:v},[e.createVNode(i,{name:"arrow-left",color:"#fff",size:"40rpx",style:{"margin-right":"10rpx"}}),e.createTextVNode(),e.createElementVNode("text",{style:{"padding-bottom":"5rpx"}},"栏舍设置")]),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(i,{name:"plus",color:"#fff",size:"40rpx",style:{"margin-right":"20rpx"},onClick:a[0]||(a[0]=e=>g("/pages/plantAdmin/addHouse"))}),e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"serch"},[e.createVNode(r,{bgColor:"white","show-action":!1,placeholder:"请输入栏舍名称",modelValue:l.fence_house_name,"onUpdate:modelValue":a[1]||(a[1]=e=>l.fence_house_name=e),shape:"round",clearabled:!1,onChange:h},null,8,["modelValue"]),e.createElementVNode("view",{class:"ser-text",onClick:f}," 搜索 ")]),e.createElementVNode("view",{class:"tits"}," 栏舍信息 "),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,((t,a)=>{return e.openBlock(),e.createElementBlock("view",{class:"card",key:a,onClick:e=>g(`/pages/plantAdmin/houseDetail?id=${t.id}`)},[e.createElementVNode("image",{class:"img",src:p(t.pic)},null,8,["src"]),e.createElementVNode("view",{class:"tips"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.fence_house_name),1),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"动物名称: "),e.createElementVNode("view",null,e.toDisplayString(t.animal_name),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"动物类型: "),e.createElementVNode("view",null,e.toDisplayString((o=t.animal_type,(null==(n=d.value.find((e=>e.value==o)))?void 0:n.name)||"")),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"容量: "),e.createElementVNode("view",null,e.toDisplayString(t.capacity),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"负责人: "),e.createElementVNode("view",null,e.toDisplayString(t.master),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"创建时间: "),e.createElementVNode("view",null,e.toDisplayString(t.create_time),1)])])],8,["onClick"]);var o,n})),128)),0==n.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])])):e.createCommentVNode("",!0)])])}}},Wr={__name:"addHouse",setup(t){const n=e.ref(null),i=e.reactive({formData:{fence_house_name:"",fence_house_type:"",animal_name:"",animal_type:"",capacity:"",master:"",master_phone:"",pic:["https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80","https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80"]},rules:{fence_house_name:[{type:"string",required:!0,message:"请填写栏舍名称",trigger:["blur","change"]}],fence_house_type:[{type:"string",required:!0,message:"请选择栏舍类型",trigger:["blur","change"]}],animal_name:[{type:"string",required:!0,message:"请输入动物名称",trigger:["blur","change"]}],animal_type:[{type:"string",required:!0,message:"请输入动物类型",trigger:["blur","change"]}],capacity:[{type:"string",required:!0,message:"请输入栏舍容量",trigger:["blur","change"]}],master:[{type:"string",required:!0,message:"请输入负责人姓名",trigger:["blur","change"]}],master_phone:[{required:!0,message:"请输入手机号",trigger:["change","blur"]},{validator:(e,t,a)=>uni.$u.test.mobile(t),message:"手机号码不正确",trigger:["change","blur"]}]}}),s=e.reactive([]),c=e.ref(!1),d=e.ref(!1),u=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{1==e.code&&(s.push(e.data.url),a("log","at pages/plantAdmin/addHouse.vue:201",i.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},m=()=>{c.value=!0},p=()=>{d.value=!0},h=e.ref(""),f=e.ref(""),g=e=>{h.value=e.name,i.formData.fence_house_type=e.value},v=e=>{f.value=e.name,i.formData.animal_type=e.value};l((()=>{n.value.setRules(i.rules)}));const y=e.ref([]);Hn().then((e=>{y.value=e.data}));const b=e.ref([]);An.get("/common/dict_data_lists_by_type_value",{type_value:"fence_house_type"}).then((e=>{b.value=e.data}));const w=async()=>{try{if(await n.value.validate()){if(0==s.length)return void uni.$u.toast("请上传图片");i.formData.pic=JSON.stringify(s),i.formData.farm_id=wn.state.farm.id,(e=>An.post("/fence_house/add",e))(i.formData).then((e=>{a("log","at pages/plantAdmin/addHouse.vue:276",e),1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/plantAdmin/addHouse.vue:287","表单验证未通过")}catch(e){a("error","at pages/plantAdmin/addHouse.vue:291",e)}};return r((e=>{})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("up-form-item"),ni),_=o(e.resolveDynamicComponent("u-icon"),C),V=o(e.resolveDynamicComponent("u-image"),A),k=o(e.resolveDynamicComponent("up-form"),Ei),x=o(e.resolveDynamicComponent("u-action-sheet"),G),N=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"cards"},[e.createVNode(k,{labelWidth:"130",model:i.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"栏舍信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"栏舍名称",prop:"fence_house_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入栏舍名称",border:"none",modelValue:i.formData.fence_house_name,"onUpdate:modelValue":a[0]||(a[0]=e=>i.formData.fence_house_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"栏舍类型",prop:"fence_house_type",borderBottom:"",required:"",onClick:m},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择栏舍类型",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:h.value,"onUpdate:modelValue":a[1]||(a[1]=e=>h.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"动物名称",prop:"animal_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入动物名称",border:"none",modelValue:i.formData.animal_name,"onUpdate:modelValue":a[2]||(a[2]=e=>i.formData.animal_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"动物类型",prop:"animal_type",borderBottom:"",required:"",onClick:p},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择动物类型",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:f.value,"onUpdate:modelValue":a[3]||(a[3]=e=>f.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"容量",prop:"capacity",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入栏舍容量",border:"none",modelValue:i.formData.capacity,"onUpdate:modelValue":a[4]||(a[4]=e=>i.formData.capacity=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"负责人",prop:"master",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人姓名",border:"none",modelValue:i.formData.master,"onUpdate:modelValue":a[5]||(a[5]=e=>i.formData.master=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"负责人电话",prop:"master_phone",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人电话",type:"number",border:"none",modelValue:i.formData.master_phone,"onUpdate:modelValue":a[6]||(a[6]=e=>i.formData.master_phone=e)},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"栏舍图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.createVNode(_,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"]),e.createVNode(V,{src:t,width:"150.85rpx",height:"150.85rpx"},null,8,["src"])])])))),256))])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"code-img"},[e.createElementVNode("view",{class:"",onClick:u},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(V,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])])])])),_:1},8,["model"]),e.createVNode(x,{show:c.value,keyName:"name",closeOnClickOverlay:"",actions:b.value,title:"请选择",onClose:a[7]||(a[7]=e=>c.value=!1),onSelect:g},null,8,["show","actions"]),e.createVNode(x,{show:d.value,keyName:"name",actions:y.value,title:"请选择",onClose:a[8]||(a[8]=e=>d.value=!1),onSelect:v},null,8,["show","actions"]),e.createVNode(N,{class:"btn",onClick:w},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1})])])}}};const Jr=x({name:"u--image",mixins:[V,D,k],components:{uvImage:A},emits:["click","error","load"]},[["render",function(t,a,o,n,i,r){const l=e.resolveComponent("uvImage");return e.openBlock(),e.createBlock(l,{src:t.src,mode:t.mode,width:t.width,height:t.height,shape:t.shape,radius:t.radius,lazyLoad:t.lazyLoad,showMenuByLongpress:t.showMenuByLongpress,loadingIcon:t.loadingIcon,errorIcon:t.errorIcon,showLoading:t.showLoading,showError:t.showError,fade:t.fade,webp:t.webp,duration:t.duration,bgColor:t.bgColor,customStyle:t.customStyle,onClick:a[0]||(a[0]=e=>t.$emit("click")),onError:a[1]||(a[1]=e=>t.$emit("error")),onLoad:a[2]||(a[2]=e=>t.$emit("load"))},{loading:e.withCtx((()=>[e.renderSlot(t.$slots,"loading")])),error:e.withCtx((()=>[e.renderSlot(t.$slots,"error")])),_:3},8,["src","mode","width","height","shape","radius","lazyLoad","showMenuByLongpress","loadingIcon","errorIcon","showLoading","showError","fade","webp","duration","bgColor","customStyle"])}]]);var Kr=function(){return(Kr=Object.assign||function(e){for(var t,a=1,o=arguments.length;a>=1,this.framask[a+=e]=1},e.prototype.getWidth=function(){return this.width},e.prototype.putalign=function(e,t){this.qrframe[e+this.width*t]=1;for(var a=-2;a<2;a++)this.qrframe[e+a+this.width*(t-2)]=1,this.qrframe[e-2+this.width*(t+a+1)]=1,this.qrframe[e+2+this.width*(t+a)]=1,this.qrframe[e+a+1+this.width*(t+2)]=1;for(a=0;a<2;a++)this.setmask(e-1,t+a),this.setmask(e+1,t-a),this.setmask(e-a,t-1),this.setmask(e+a,t+1)},e.prototype.modnn=function(e){for(;255<=e;)e=((e-=255)>>8)+(255&e);return e},e.prototype.appendrs=function(e,t,a,o){for(var n,i=0;i>=1,this.framask[a+=e]},e.prototype.badruns=function(e){for(var t=0,a=0;a<=e;a++)5<=this.rlens[a]&&(t+=this.N1+this.rlens[a]-5);for(a=3;a=4*this.rlens[a]||3*this.rlens[a+3]>=4*this.rlens[a])&&(t+=this.N3);return t},e.prototype.toNum=function(e){return 0===e?1:0},e.prototype.applymask=function(e){switch(e){case 0:for(var t=0;t>1&1,a=0;a>n-12:t>>n)?(this.qrframe[5-d+this.width*(2-u+this.width-11)]=1,this.qrframe[2-u+this.width-11+this.width*(5-d)]=1):(this.setmask(5-d,2-u+this.width-11),this.setmask(2-u+this.width-11,5-d));for(u=0;u>4;this.strinbuf[2]|=255&r<<4,this.strinbuf[1]=r>>4,this.strinbuf[0]=64|r>>12}else{for(this.strinbuf[s+1]=0,this.strinbuf[s+2]=0;s--;)t=this.strinbuf[s],this.strinbuf[s+2]|=255&t<<4,this.strinbuf[s+1]=t>>4;this.strinbuf[1]|=255&r<<4,this.strinbuf[0]=64|r>>4}for(s=r+3-(l<10?1:0);s>=1)1&i&&(this.qrframe[this.width-1-f+8*this.width]=1,f<6?this.qrframe[8+this.width*f]=1:this.qrframe[8+this.width*(f+1)]=1);for(f=0;f<7;f++,i>>=1)1&i&&(this.qrframe[8+this.width*(this.width-7+f)]=1,f?this.qrframe[6-f+8*this.width]=1:this.qrframe[7+8*this.width]=1);return this.qrframe},e.prototype.badcheck=function(){for(var e=0,t=0,a=0,o=0,n=0,i=0,r=0,l=0;lthis.width*this.width;)c-=this.width*this.width,d++;for(e+=d*this.N4,s=0;sn[0]&&r[1]>12&15),o+=String.fromCharCode(128|t>>6&63)):o+=String.fromCharCode(192|t>>6&31),o+=String.fromCharCode(128|t>>0&63));return o}(e.code))?(i=r.Genframe(i),r=r.getWidth(),"[object String]"==Object.prototype.toString.call(e.id)?(o=uni.createCanvasContext(e.id,e.ctx||null),cl(n,e,o,i,r,t)):"[object Object]"==Object.prototype.toString.call(e.id)&&(o=e.id,cl(n,e,o,i,r,t))):a("warn","at uni_modules/wmf-code/js_sdk/index.js:1","二维码code转换错误")):a("warn","at uni_modules/wmf-code/js_sdk/index.js:1","没有找到二维码canvas id或者实列!"):a("warn","at uni_modules/wmf-code/js_sdk/index.js:1","没有找到二维码code")},vl=rl,yl=ol,bl=al;function wl(e){if([null,void 0,NaN,!1].includes(e))return e;if("object"!=typeof e&&"function"!=typeof e)return e;var t,a=(t=e,"[object Array]"===Object.prototype.toString.call(t)?[]:{});for(let o in e)e.hasOwnProperty(o)&&(a[o]="object"==typeof e[o]?wl(e[o]):e[o]);return a}function _l(e=32,t=!0,a=null){let o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[];if(a=a||o.length,e)for(let i=0;i({})}},emits:["generate","press","error"],setup(t,{expose:o,emit:n}){const i=t,r=i.options,l=e.getCurrentInstance(),s=bl(r.size);let c=e.reactive({destHeight:s*yl()+"px",destWidth:s*yl()+"px",width:s+"px",height:s+"px",listCode:[],id:_l()});e.onMounted((()=>{d(r),e.nextTick((()=>{u(r)}))})),e.watch((()=>i.options),(e=>{d(e);const t=bl(e.size);c.destWidth=yl()*t+"px",c.destHeight=yl()*t+"px",c.width=t+"px",c.height=t+"px",setTimeout((()=>{u(e)}),50)}),{deep:!0});const d=e=>{let t=wl(e);t.id=c.id,c.listCode=[t]},u=e=>{try{const t={...e,source:Vl(),id:c.id,ctx:l};gl(t,(e=>{n("generate",e)}))}catch(t){a("warn","at uni_modules/wmf-code/components/w-qrcode/w-qrcode.vue:69",t)}},m=e=>{n("press",e)},p=e=>{n("error",e.detail)};return o({GetCodeImg:async()=>{try{return await vl({id:c.id,source:Vl(),width:r.width,height:r.height,ctx:l})}catch(it){a("warn","at uni_modules/wmf-code/components/w-qrcode/w-qrcode.vue:74",it)}}}),(t,a)=>(e.openBlock(),e.createElementBlock("view",{onLongtap:e.withModifiers(m,["stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).listCode,(t=>(e.openBlock(),e.createElementBlock("canvas",{width:e.unref(c).destWidth,height:e.unref(c).destHeight,"canvas-id":t.id,id:t.id,style:e.normalizeStyle({width:e.unref(c).width,height:e.unref(c).height}),key:t.id,onError:p},null,44,["width","height","canvas-id","id"])))),128))],40,["onLongtap"]))}},xl={__name:"houseDetail",setup(t){const a=e.ref({code:"",size:460}),n=e.ref(""),l=async()=>{const e=await n.value.GetCodeImg();uni.saveImageToPhotosAlbum({filePath:e.tempFilePath,success(e){uni.showToast({title:"保存成功",icon:"success",duration:2e3})},fail(e){uni.showToast({title:"保存失败",icon:"none",duration:2e3})}})},s=e.ref(null),c=e.reactive([]),d=e.reactive({}),u=e.ref("");e.reactive([[{label:"种植",route:"/pages/husbandryForm/sow"},{label:"施肥",route:"/pages/husbandryForm/fertilize"},{label:"除草",route:"/pages/husbandryForm/weeding"},{label:"灌溉",route:"/pages/husbandryForm/irrigate"},{label:"除虫",route:"/pages/husbandryForm/Pest"},{label:"收获",route:"/pages/husbandryForm/harvest"}]]);const m=e.ref([]);Hn().then((e=>{m.value=e.data}));const p=e.ref([]);r((e=>{u.value=e.id,f()})),i((()=>{g(),Pr({fence_house_id:u.value}).then((e=>{e.data=e.data.map((e=>(null!=(e={...e.detail,create_time:e.create_time,type_text:e.type_text})&&(e.pic=JSON.parse(e.pic||"[]")),e))),p.value=e.data}))}));const h=e.ref(""),f=()=>{var e;(e={id:u.value},An.get("/fence_house/detail",e)).then((e=>{1==e.code&&(h.value=e.data.video_url,e.data.pic&&(e.data.pic=JSON.parse(e.data.pic||"[]")),Object.assign(d,e.data))}))},g=()=>{Tr({fence_house_id:u.value,page_no:1,page_size:3}).then((e=>{1==e.code&&(e.data.lists=e.data.lists.map((e=>(e.showCode=!1,e.pic=JSON.parse(e.pic||"[]"),e))),c.splice(0,c.length,...e.data.lists))}))},v=e.ref(!1),y=e.ref([]),b=e.ref(1),w=(e=1)=>{y.value=1==e?[{name:"购买"},{name:"自繁"}]:[{name:"喂食"},{name:"喂水"},{name:"消毒"},{name:"疫苗"},{name:"驱虫"}],b.value=e,v.value=!0},_=e=>{if(1==b.value)V(`/pages/plantAdmin/addBreed?name=${e.name}&type=${"购买"==e.name?1:2}&id=${d.id}&fence_house_name=${d.fence_house_name}`);else{if("喂食"==e.name)return V(`/pages/feed/feed?house_id=${d.id}`);if("喂水"==e.name)return V(`/pages/feed/water?house_id=${d.id}`);if("消毒"==e.name)return V(`/pages/feed/sterilize?house_id=${d.id}`);if("疫苗"==e.name)return V(`/pages/feed/vaccine?house_id=${d.id}`);if("驱虫"==e.name)return V(`/pages/feed/expelling?house_id=${d.id}`)}},V=e=>{uni.navigateTo({url:e})},k=(e,t)=>{2==t&&uni.navigateTo({url:"/pages/feedDetail/feedDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),4==t&&uni.navigateTo({url:"/pages/feedDetail/waterDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),1==t&&uni.navigateTo({url:"/pages/feedDetail/sterilizeDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),3==t&&uni.navigateTo({url:"/pages/feedDetail/vaccineDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),0==t&&uni.navigateTo({url:"/pages/feedDetail/expellingDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}})},x=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)},N=e=>{uni.previewImage({urls:[e]})};return(t,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C),f=o(e.resolveDynamicComponent("u--image"),A),g=o(e.resolveDynamicComponent("u---image"),Jr),b=o(e.resolveDynamicComponent("u-action-sheet"),G),E=o(e.resolveDynamicComponent("w-qrcode"),kl),B=o(e.resolveDynamicComponent("uni-popup"),Nn);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between","margin-bottom":"20rpx"}},[e.createElementVNode("view",{class:"tit",style:{"margin-bottom":"0"}}," 栏舍监控数据 "),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createVNode(r,{name:"clock",style:{"margin-right":"10rpx"}}),e.createElementVNode("text",{style:{color:"#ACACAC","font-size":"25rpx"}},"刷新时间: "+e.toDisplayString(x()),1)])]),e.createElementVNode("view",{class:"video",onClick:i[0]||(i[0]=e=>(()=>{if(!h.value)return uni.showToast({icon:"none",title:"该栏舍暂无监控"});let e=uni.getSystemInfoSync().platform;uni.navigateTo({url:`/pages/live/${"ios"==e?"liveIos":"live"}?url=${h.value}`})})())},[d&&d.pic?(e.openBlock(),e.createBlock(f,{key:0,src:d.pic[0],width:"100%",height:"300rpx"},null,8,["src"])):e.createCommentVNode("",!0)]),e.createVNode(Gn,{info:d},null,8,["info"]),e.createElementVNode("view",{class:"add-btn"},[e.createElementVNode("view",{class:"add-thing",onClick:i[1]||(i[1]=e=>w(1))}," 新增养殖 "),e.createElementVNode("view",{class:"add-thing",onClick:i[2]||(i[2]=e=>w(2))}," 新增喂养 ")]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit tit-more",style:{margin:"20rpx 0"}},[e.createElementVNode("view",null,"养殖信息"),e.createElementVNode("view",{class:"more",onClick:i[3]||(i[3]=e=>V(`/pages/plantAdmin/moreBreed?id=${u.value}`))},[e.createTextVNode("查看更多 "),e.createVNode(r,{name:"arrow-right"})])]),c.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c,((t,o)=>{return e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:o},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left"},[e.createVNode(f,{onClick:e=>N(t.pic),radius:"10",src:t.pic[0],width:"250rpx",height:"250rpx"},null,8,["onClick","src"]),e.createVNode(g,{class:"qr-code",onClick:e=>(e=>{a.value.code="d_"+e.sn,s.value.open()})(t),src:"/static/main/house/su_yuan_ma_btn.png",width:"60rpx",height:"60rpx"},null,8,["onClick"])]),e.createVNode(f,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>V(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>V(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},[e.createElementVNode("view",{class:"name"},e.toDisplayString(t.sn),1),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品类:"),e.createElementVNode("view",null,e.toDisplayString((n=t.animal_type,(null==(i=m.value.find((e=>e.value==n)))?void 0:i.name)||"")),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品种:"),e.createElementVNode("view",null,e.toDisplayString(t.brand),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"性别:"),e.createElementVNode("view",null,e.toDisplayString(t.gender?"公":"母"),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"栏舍:"),t.fenceHouseAttr?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString(t.fenceHouseAttr.fence_house_name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"来源:"),e.createElementVNode("view",null,e.toDisplayString(1==t.animal_source?"购买":"自繁"),1)])],8,["onClick"])])]);var n,i})),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit tit-more",style:{margin:"20rpx 0"}},[e.createElementVNode("view",null,"喂养信息"),e.createElementVNode("view",{class:"more",onClick:i[4]||(i[4]=e=>V("/pages/plantAdmin/moreFeed?house_id="+u.value))},[e.createTextVNode("查看更多 "),e.createVNode(r,{name:"arrow-right"})])]),p.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p.value,((t,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a},[t?(e.openBlock(),e.createElementBlock("view",{key:0,class:"card_body"},[e.createElementVNode("view",{class:"left"},[e.createVNode(f,{onClick:e=>N(t.pic[0]),radius:"10",src:t.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"])]),e.createVNode(f,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>k(t,a)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>k(t,a)},[e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作类型:"),e.createElementVNode("view",null,e.toDisplayString(t.type_text),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作人员:"),e.createElementVNode("view",null,e.toDisplayString(t.operator),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作日期:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time),1)]),e.createElementVNode("view",{class:"r-item",style:{height:"80rpx"}},[e.createElementVNode("view",{class:"item-title"},"备注:"),e.createElementVNode("view",{class:"row2"},e.toDisplayString(t.remark),1)])],8,["onClick"])])):e.createCommentVNode("",!0)])),[[e.vShow,t]]))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))]),e.createVNode(b,{show:v.value,keyName:"name",closeOnClickOverlay:"",actions:y.value,title:"请选择",onClose:i[5]||(i[5]=e=>v.value=!1),onSelect:_},null,8,["show","actions"]),e.createVNode(B,{ref_key:"codeRef",ref:s},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"bar-code"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(a.value.code.split("d_")[1]),1),e.createVNode(E,{ref_key:"qrCode",ref:n,options:a.value},null,8,["options"]),e.createElementVNode("view",{onClick:l,class:"btn"},"保存图片")])])),_:1},512)])])}}},Nl=x(xl,[["__scopeId","data-v-c539bb1b"]]),Cl=x({__name:"breedInfo",props:{info:Object,isDetail:Boolean},setup(t){const a=e.ref([]);Hn().then((e=>{a.value=e.data}));return(n,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-top":"10rpx"}},[t.info.fenceHouseAttr?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","align-items":"center",height:"60rpx"}},[e.createVNode(r,{name:"map"}),e.createTextVNode(" "+e.toDisplayString(t.info.fenceHouseAttr.fence_house_name),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dong_wu_ming_cheng.png')"}},[e.createTextVNode(" 耳号 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.sn),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dong_wu_lei_xing.png')"}},[e.createTextVNode(" 品类 "),e.createElementVNode("view",{class:""},e.toDisplayString((l=t.info.animal_type,(null==(s=a.value.find((e=>e.value==l)))?void 0:s.name)||"")),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/lan_she_rong_liang.png')"}},[e.createTextVNode(" 品种 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.brand),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/lan_she_fu_ze_ren.png')"}},[e.createTextVNode(" 生理阶段 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.physi_stage),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dian_hua.png')"}},[e.createTextVNode(" 体重 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.current_estimation)+"kg ",1)]),e.createElementVNode("view",{class:"info-li-d"})])]);var l,s}}},[["__scopeId","data-v-1d7151b6"]]),El={__name:"breedDetail",setup(t){const a=e.reactive([]),n=e.reactive({}),l=e.ref("");e.reactive([[{label:"种植",route:"/pages/husbandryForm/sow"},{label:"施肥",route:"/pages/husbandryForm/fertilize"},{label:"除草",route:"/pages/husbandryForm/weeding"},{label:"灌溉",route:"/pages/husbandryForm/irrigate"},{label:"除虫",route:"/pages/husbandryForm/Pest"},{label:"收获",route:"/pages/husbandryForm/harvest"}]]);const s=e.ref([]);Hn().then((e=>{s.value=e.data}));const c=e.ref([]),d=e.ref("");r((e=>{l.value=e.id,d.value=e.house_id,u()})),i((()=>{m(),Pr({fence_house_id:d.value,animal_info_id:l.value}).then((e=>{e.data=e.data.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text})&&(e.pic=JSON.parse(e.pic||"[]")),e??null))),c.value=e.data}))}));const u=()=>{Ir({id:l.value}).then((e=>{1==e.code&&(e.data.pic=JSON.parse(e.data.pic||"[]"),Object.assign(n,e.data))}))},m=()=>{Tr({fence_house_id:l.value,page_no:1,page_size:3}).then((e=>{1==e.code&&(a.splice(0,a.length,...e.data.lists),a.forEach((e=>{e.showCode=!1})))}))},p=e.ref(!1),h=e.ref([]),f=e.ref(1),g=e=>{if(1==f.value)v(`/pages/plantAdmin/addBreed?name=${e.name}&type=${"购买"==e.name?1:2}&id=${n.id}&fence_house_name=${n.fence_house_name}`);else{if("喂食"==e.name)return v(`/pages/feed/feed?id=${l.value}&house_id=${d.value}`);if("喂水"==e.name)return v(`/pages/feed/water?id=${l.value}&house_id=${d.value}`);if("消毒"==e.name)return v(`/pages/feed/sterilize?id=${l.value}&house_id=${d.value}`);if("疫苗"==e.name)return v(`/pages/feed/vaccine?id=${l.value}&house_id=${d.value}`);if("驱虫"==e.name)return v(`/pages/feed/expelling?id=${l.value}&house_id=${d.value}`)}},v=e=>{uni.navigateTo({url:e})},y=(e,t)=>{2==t&&uni.navigateTo({url:"/pages/feedDetail/feedDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),4==t&&uni.navigateTo({url:"/pages/feedDetail/waterDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),1==t&&uni.navigateTo({url:"/pages/feedDetail/sterilizeDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),3==t&&uni.navigateTo({url:"/pages/feedDetail/vaccineDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),0==t&&uni.navigateTo({url:"/pages/feedDetail/expellingDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}})},b=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)},w=e=>{uni.previewImage({urls:[e]})};return(t,a)=>{const i=o(e.resolveDynamicComponent("u-icon"),C),r=o(e.resolveDynamicComponent("u--image"),A),s=o(e.resolveDynamicComponent("u-action-sheet"),G);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between","margin-bottom":"20rpx"}},[e.createElementVNode("view",{class:"tit",style:{"margin-bottom":"0"}}," 动物数据 "),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createVNode(i,{name:"clock",style:{"margin-right":"10rpx"}}),e.createElementVNode("text",{style:{color:"#ACACAC","font-size":"25rpx"}},"刷新时间: "+e.toDisplayString(b()),1)])]),e.createElementVNode("view",{class:"video",onClick:a[0]||(a[0]=e=>w(n.pic[0]))},[n&&n.pic?(e.openBlock(),e.createBlock(r,{key:0,src:n.pic[0],width:"100%",height:"300rpx"},null,8,["src"])):e.createCommentVNode("",!0)]),e.createVNode(Cl,{info:n},null,8,["info"]),e.createElementVNode("view",{class:"add-btn"},[e.createElementVNode("view",{class:"add-thing",style:{width:"694rpx"},onClick:a[1]||(a[1]=e=>((e=1)=>{h.value=1==e?[{name:"购买"},{name:"自繁"}]:[{name:"喂食"},{name:"喂水"},{name:"消毒"},{name:"疫苗"},{name:"驱虫"}],f.value=e,p.value=!0})(2))}," 新增喂养 ")]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit tit-more",style:{margin:"20rpx 0"}},[e.createElementVNode("view",null,"喂养信息"),e.createElementVNode("view",{class:"more",onClick:a[2]||(a[2]=e=>v(`/pages/plantAdmin/moreFeed?id=${l.value}&house_id=${d.value}`))},[e.createTextVNode("查看更多 "),e.createVNode(i,{name:"arrow-right"})])]),c.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,((t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[null!=t?(e.openBlock(),e.createElementBlock("view",{key:0,class:"thing-card"},[t?(e.openBlock(),e.createElementBlock("view",{key:0,class:"card_body"},[e.createElementVNode("view",{class:"left"},[t&&t.pic?(e.openBlock(),e.createBlock(r,{key:0,onClick:e=>w(t.pic[0]),radius:"10",src:t.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"])):e.createCommentVNode("",!0)]),e.createVNode(r,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>y(t,a)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>y(t,a)},[e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作类型:"),e.createElementVNode("view",null,e.toDisplayString(t.type_text),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作人员:"),e.createElementVNode("view",null,e.toDisplayString(t.operator),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作日期:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time),1)]),e.createElementVNode("view",{class:"r-item",style:{height:"80rpx"}},[e.createElementVNode("view",{class:"item-title"},"备注:"),e.createElementVNode("view",{class:"row2"},e.toDisplayString(t.remark),1)])],8,["onClick"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64)))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))]),e.createVNode(s,{show:p.value,keyName:"name",closeOnClickOverlay:"",actions:h.value,title:"请选择",onClose:a[3]||(a[3]=e=>p.value=!1),onSelect:g},null,8,["show","actions"])])])}}},Bl=x(El,[["__scopeId","data-v-7950fd5d"]]),Sl={__name:"addBreed",setup(t){const n=e.ref(null),i=e.reactive({formData:{fence_house_id:"",sn:"",animal_type:"",brand:"",physi_stage:"",gender:"",blood_purity:"",current_estimation:"",algebra:"",birth:"",entry_date:"",birth_estimation:"",health_condition:"",type:1,animal_source:"2",master_name:"",master_phone:"",pic:["https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80","https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80"]},rules:{fence_house_id:[{type:"string",required:!0,message:"请选择栏舍",trigger:["blur","change"]}],sn:[{type:"string",required:!0,message:"请输入耳号",trigger:["blur","change"]}],animal_type:[{type:"string",required:!0,message:"请选择品类",trigger:["blur","change"]}],brand:[{type:"string",required:!0,message:"请选择品种",trigger:["blur","change"]}],gender:[{type:"number",required:!0,message:"请选择性别",trigger:["blur","change"]}],physi_stage:[{type:"string",required:!0,message:"请输入生理阶段",trigger:["blur","change"]}],blood_purity:[{type:"string",required:!0,message:"请输入血统纯度",trigger:["blur","change"]}],current_estimation:[{type:"string",required:!0,message:"请输入现估重",trigger:["blur","change"]}],birth_estimation:[{type:"string",required:!0,message:"请输入出生体重",trigger:["blur","change"]}],brith_date:[{type:"string",required:!0,message:"请选择出生日期",trigger:["blur","change"]}],entry_date:[{type:"string",required:!0,message:"请选择入场日期",trigger:["blur","change"]}]}}),s=e.reactive([]),c=e.ref(!1),d=e.ref(!1),u=e.ref(!1),m=e.ref(!1),p=()=>{m.value=!0},h=e.ref(!1),f=()=>{h.value=!0},g=e.ref([]);Hn().then((e=>{g.value=e.data}));const v=e.ref(""),y=e=>{v.value=e.name,i.formData.animal_type=e.value},b=e.ref([]);Ar().then((e=>{b.value=e.data.lists.map((e=>({value:e.id,name:e.fence_house_name})))}));const w=e=>{i.formData.fence_house_name=e.name,i.formData.fence_house_id=e.value},_=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{1==e.code&&(s.push(e.data.url),a("log","at pages/plantAdmin/addBreed.vue:297",i.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},V=e.ref(""),k=e=>{"公"==e.name?i.formData.gender=1:i.formData.gender=0,V.value=e.name},x=e.ref(Date.now()),N=e=>{new Date(e.value),i.formData.type>1?i.formData.brith_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd"):i.formData.entry_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd"),d.value=!1};l((()=>{n.value.setRules(i.rules)}));const E=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,B=async()=>{try{if(await n.value.validate()){if(0==s.length)return void uni.$u.toast("请上传图片");i.formData.pic=JSON.stringify(s),(e=>An.post("/animal_info/add",e))(i.formData).then((e=>{a("log","at pages/plantAdmin/addBreed.vue:364",e),1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/plantAdmin/addBreed.vue:375","表单验证未通过")}catch(e){a("error","at pages/plantAdmin/addBreed.vue:379",e)}},S=e.ref("");return r((e=>{e.type>1?(i.formData.animal_source=+e.type,S.value=e.name):(i.formData.animal_source=1,S.value="购买"),e.id?(i.formData.fence_house_id=e.id,i.formData.fence_house_name=e.fence_house_name,u.value=!1):u.value=!0})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("up-form-item"),ni),u=o(e.resolveDynamicComponent("u-icon"),C),D=o(e.resolveDynamicComponent("u-image"),A),I=o(e.resolveDynamicComponent("up-form"),Ei),T=o(e.resolveDynamicComponent("u-action-sheet"),G),P=o(e.resolveDynamicComponent("u-datetime-picker"),rr),F=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"cards"},[e.createVNode(I,{labelWidth:"130",model:i.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"养殖信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"耳号",prop:"sn",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入耳号",border:"none",modelValue:i.formData.sn,"onUpdate:modelValue":a[0]||(a[0]=e=>i.formData.sn=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"品类",prop:"animal_type",borderBottom:"",required:"",onClick:p},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入品类名称",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:v.value,"onUpdate:modelValue":a[1]||(a[1]=e=>v.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"品种",prop:"brand",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入品种名称",border:"none",modelValue:i.formData.brand,"onUpdate:modelValue":a[2]||(a[2]=e=>i.formData.brand=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"性别",prop:"gender",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>c.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择性别",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:V.value,"onUpdate:modelValue":a[3]||(a[3]=e=>V.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"生理阶段",prop:"physi_stage",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入生理阶段",border:"none",modelValue:i.formData.physi_stage,"onUpdate:modelValue":a[5]||(a[5]=e=>i.formData.physi_stage=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"血统纯度",prop:"blood_purity",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入血统纯度",border:"none",modelValue:i.formData.blood_purity,"onUpdate:modelValue":a[6]||(a[6]=e=>i.formData.blood_purity=e)},null,8,["modelValue"])])),_:1}),1==i.formData.type?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{label:"来源",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",border:"none",modelValue:S.value,"onUpdate:modelValue":a[7]||(a[7]=e=>S.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"栏舍",prop:"fence_house_name",borderBottom:"",required:"",onClick:f},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:i.formData.fence_house_name,"onUpdate:modelValue":a[8]||(a[8]=e=>i.formData.fence_house_name=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"现估重(kg)",prop:"current_estimation",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入现估重",type:"number",border:"none",modelValue:i.formData.current_estimation,"onUpdate:modelValue":a[9]||(a[9]=e=>i.formData.current_estimation=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"入场日期",prop:"entry_date",borderBottom:"",required:"",onClick:a[11]||(a[11]=e=>d.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择入场日期",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:i.formData.entry_date,"onUpdate:modelValue":a[10]||(a[10]=e=>i.formData.entry_date=e),readonly:""},null,8,["modelValue"])])),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{label:"来源",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",border:"none",modelValue:S.value,"onUpdate:modelValue":a[12]||(a[12]=e=>S.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"栏舍",prop:"fence_house_name",borderBottom:"",required:"",onClick:f},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:i.formData.fence_house_name,"onUpdate:modelValue":a[13]||(a[13]=e=>i.formData.fence_house_name=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"代数",prop:"algebra",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入代数",type:"number",border:"none",modelValue:i.formData.algebra,"onUpdate:modelValue":a[14]||(a[14]=e=>i.formData.algebra=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"现估重(kg)",prop:"current_estimation",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入现估重",type:"number",border:"none",modelValue:i.formData.current_estimation,"onUpdate:modelValue":a[15]||(a[15]=e=>i.formData.current_estimation=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"出生体重(kg)",prop:"birth_estimation",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入出生体重",type:"number",border:"none",modelValue:i.formData.birth_estimation,"onUpdate:modelValue":a[16]||(a[16]=e=>i.formData.birth_estimation=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"出生日期",borderBottom:"",required:"",onClick:a[18]||(a[18]=e=>d.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择出生日期",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:i.formData.brith_date,"onUpdate:modelValue":a[17]||(a[17]=e=>i.formData.brith_date=e),readonly:""},null,8,["modelValue"])])),_:1})],64))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"养殖基地图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.createVNode(u,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"]),e.createVNode(D,{src:t,width:"150.85rpx",height:"150.85rpx"},null,8,["src"])])])))),256))])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"code-img"},[e.createElementVNode("view",{class:"",onClick:_},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(D,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])])])])),_:1},8,["model"]),e.createVNode(T,{show:c.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"公"},{name:"母"}],title:"请选择",onClose:a[19]||(a[19]=e=>c.value=!1),onSelect:k},null,8,["show"]),e.createVNode(P,{show:d.value,"max-date":Date.now(),mode:"date",modelValue:x.value,"onUpdate:modelValue":a[20]||(a[20]=e=>x.value=e),onConfirm:N,formatter:E,onCancel:a[21]||(a[21]=e=>d.value=!1)},null,8,["show","max-date","modelValue"]),e.createVNode(T,{show:m.value,keyName:"name",actions:g.value,title:"请选择",onClose:a[22]||(a[22]=e=>m.value=!1),onSelect:y},null,8,["show","actions"]),e.createVNode(T,{show:h.value,keyName:"name",actions:b.value,title:"请选择栏舍",onClose:a[23]||(a[23]=e=>h.value=!1),onSelect:w},null,8,["show","actions"]),e.createVNode(F,{class:"btn",onClick:B},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1})])])}}},Dl={__name:"feed",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({feed_type:"",feed_brand:"",feed_consumption:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={feed_type:{type:"string",required:!0,message:"请选择饲料种类",trigger:["blur","change"]},feed_brand:{type:"string",required:!0,message:"请输入饲料品牌",trigger:["blur","change"]},feed_consumption:{type:"string",required:!0,message:"请输入饲料消耗量",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请输入饲养人员",trigger:["blur","change"]}};l((()=>{n.value.setRules(m)}));const p=e.ref(Date.now()),h=e.ref(!1),f=()=>{h.value=!0},g=e.ref([]);Qn().then((e=>{g.value=e.data}));const v=e.ref(""),y=e=>{v.value=e.name,c.feed_type=e.value},b=()=>{n.value.validate().then((e=>{if(a("log","at pages/feed/feed.vue:214",e),e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_feeding_log/add",t)).then((e=>{1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/feed.vue:240",e)}))},w=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/feed.vue:266",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/feed.vue:269",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},_=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),V=o(e.resolveDynamicComponent("u-icon"),C),k=o(e.resolveDynamicComponent("u-image"),A),x=o(e.resolveDynamicComponent("u--textarea"),li),N=o(e.resolveDynamicComponent("u--form"),Ei),E=o(e.resolveDynamicComponent("u-button"),Si),B=o(e.resolveDynamicComponent("u-action-sheet"),G),S=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(N,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂食信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"饲料种类",prop:"feed_type",borderBottom:"",required:"",onClick:f},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入饲料种类",disabled:"detail"==_.value,suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:v.value,"onUpdate:modelValue":a[0]||(a[0]=e=>v.value=e),readonly:""},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"饲料品牌",prop:"feed_brand",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入饲料品牌",disabled:"detail"==_.value,border:"none",modelValue:c.feed_brand,"onUpdate:modelValue":a[1]||(a[1]=e=>c.feed_brand=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"饲料消耗量(kg)",prop:"feed_consumption",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入饲料消耗量",disabled:"detail"==_.value,type:"number",border:"none",modelValue:c.feed_consumption,"onUpdate:modelValue":a[2]||(a[2]=e=>c.feed_consumption=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"喂养人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入喂养人员",disabled:"detail"==_.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[3]||(a[3]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"喂食图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(V,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==_.value]]),e.createVNode(k,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==_.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:w},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(k,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(x,{modelValue:c.remark,"onUpdate:modelValue":a[4]||(a[4]=e=>c.remark=e),disabled:"detail"==_.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==_.value?(e.openBlock(),e.createBlock(E,{key:0,class:"btn",onClick:b},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(B,{show:h.value,keyName:"name",actions:g.value,title:"请选择",onClose:a[5]||(a[5]=e=>h.value=!1),onSelect:y},null,8,["show","actions"]),e.createVNode(S,{show:s.value,"max-date":(new Date).getTime(),modelValue:p.value,"onUpdate:modelValue":a[6]||(a[6]=e=>p.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[7]||(a[7]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},Al=x(Dl,[["__scopeId","data-v-d551485b"]]),Il={__name:"water",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({water_consumption:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={water_consumption:{type:"string",required:!0,message:"请输入喂水量",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请输入喂水人",trigger:["blur","change"]}};l((()=>{n.value.setRules(m)}));const p=e.ref(Date.now()),h=()=>{n.value.validate().then((e=>{if(a("log","at pages/feed/water.vue:166",e),e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_water_log/add",t)).then((e=>{a("log","at pages/feed/water.vue:178",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/water.vue:191",e)}))},f=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/water.vue:217",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/water.vue:220",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},g=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),v=o(e.resolveDynamicComponent("u-icon"),C),y=o(e.resolveDynamicComponent("u-image"),A),b=o(e.resolveDynamicComponent("u--textarea"),li),w=o(e.resolveDynamicComponent("u--form"),Ei),_=o(e.resolveDynamicComponent("u-button"),Si),V=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(w,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂水信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"喂水量(L)",prop:"water_consumption",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入喂水量",disabled:"detail"==g.value,type:"number",border:"none",modelValue:c.water_consumption,"onUpdate:modelValue":a[0]||(a[0]=e=>c.water_consumption=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"喂水人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入喂水人员",disabled:"detail"==g.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[1]||(a[1]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"喂水图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(v,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==g.value]]),e.createVNode(y,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==g.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:f},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(y,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(b,{modelValue:c.remark,"onUpdate:modelValue":a[2]||(a[2]=e=>c.remark=e),disabled:"detail"==g.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==g.value?(e.openBlock(),e.createBlock(_,{key:0,class:"btn",onClick:h},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(V,{show:s.value,"max-date":(new Date).getTime(),modelValue:p.value,"onUpdate:modelValue":a[3]||(a[3]=e=>p.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[4]||(a[4]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},Tl=x(Il,[["__scopeId","data-v-30d5917e"]]),Pl={__name:"sterilize",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({disinfectant_name:"",concentration:"",disinfectant_method:"",disinfectant_area:"",disinfectant_date:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.disinfectant_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={disinfectant_name:{type:"string",required:!0,message:"请输入消毒剂名称",trigger:["blur","change"]},concentration:{type:"string",required:!0,message:"请输入消毒剂浓度",trigger:["blur","change"]},disinfectant_method:{type:"string",required:!0,message:"请输入消毒方法",trigger:["blur","change"]},disinfectant_area:{type:"string",required:!0,message:"请选择消毒区域",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请输入消毒人员",trigger:["blur","change"]}},p=e.ref(!1),h=e=>{c.disinfectant_area=e.name};l((()=>{n.value.setRules(m)}));const f=e.ref(Date.now()),g=()=>{n.value.validate().then((e=>{if(a("log","at pages/feed/sterilize.vue:205",e),e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_disinfect_log/add",t)).then((e=>{a("log","at pages/feed/sterilize.vue:217",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/sterilize.vue:230",e)}))},v=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/sterilize.vue:252",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/sterilize.vue:255",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},y=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),b=o(e.resolveDynamicComponent("up-form-item"),ni),w=o(e.resolveDynamicComponent("u-icon"),C),_=o(e.resolveDynamicComponent("u-image"),A),V=o(e.resolveDynamicComponent("u--textarea"),li),k=o(e.resolveDynamicComponent("u--form"),Ei),x=o(e.resolveDynamicComponent("u-button"),Si),N=o(e.resolveDynamicComponent("u-action-sheet"),G),E=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(k,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"消毒信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"消毒剂名称",prop:"disinfectant_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入消毒剂名称",disabled:"detail"==y.value,border:"none",modelValue:c.disinfectant_name,"onUpdate:modelValue":a[0]||(a[0]=e=>c.disinfectant_name=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"消毒剂浓度",prop:"concentration",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入消毒剂浓度",disabled:"detail"==y.value,type:"number",border:"none",modelValue:c.concentration,"onUpdate:modelValue":a[1]||(a[1]=e=>c.concentration=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"消毒方法",prop:"disinfectant_method",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入消毒方法",disabled:"detail"==y.value,border:"none",modelValue:c.disinfectant_method,"onUpdate:modelValue":a[2]||(a[2]=e=>c.disinfectant_method=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(b,{label:"消毒区域",prop:"disinfectant_area",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>p.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择区域",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:c.disinfectant_area,"onUpdate:modelValue":a[3]||(a[3]=e=>c.disinfectant_area=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"消毒人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入消毒人员姓名",disabled:"detail"==y.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[5]||(a[5]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"消毒图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(w,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==y.value]]),e.createVNode(_,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==y.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:v},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(_,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(V,{modelValue:c.remark,"onUpdate:modelValue":a[6]||(a[6]=e=>c.remark=e),disabled:"detail"==y.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==y.value?(e.openBlock(),e.createBlock(x,{key:0,class:"btn",onClick:g},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(N,{show:p.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"栏舍"},{name:"饲料槽"},{name:"饮水设备"}],title:"请选择",onClose:a[7]||(a[7]=e=>p.value=!1),onSelect:h},null,8,["show"]),e.createVNode(E,{show:s.value,"max-date":(new Date).getTime(),modelValue:f.value,"onUpdate:modelValue":a[8]||(a[8]=e=>f.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[9]||(a[9]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},Fl=x(Pl,[["__scopeId","data-v-04d4570c"]]),Ul={__name:"vaccine",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({vaccine_name:"",vaccine_manufacturers:"",vaccine_batch:"",vaccination_method:"",vaccination_site:"",immune_validity_period:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={vaccine_name:{type:"string",required:!0,message:"请输入疫苗名称",trigger:["blur","change"]},vaccine_manufacturers:{type:"string",required:!0,message:"请输入疫苗厂家",trigger:["blur","change"]},vaccine_batch:{type:"string",required:!0,message:"请输入疫苗批次号",trigger:["blur","change"]},vaccination_method:{type:"string",required:!0,message:"请选择疫苗接种方式",trigger:["blur","change"]},vaccination_site:{type:"string",required:!0,message:"请输入疫苗接种部位",trigger:["blur","change"]},immune_validity_period:{type:"string",required:!0,message:"请输入疫苗有限期",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请输入疫苗注射人员",trigger:["blur","change"]}},p=e.ref(!1),h=e.ref(""),f=e=>{h.value=e.name,"肌肉注射"==e.name&&(c.vaccination_method="1"),"皮下注射"==e.name&&(c.vaccination_method="2")},g=e.ref(!1),v=e.ref(""),y=e=>{v.value=e.name,"颈部"==e.name&&(c.vaccination_site="1"),"大腿"==e.name&&(c.vaccination_site="2")},b=e.ref(!1),w=e=>{c.name=e.name};l((()=>{n.value.setRules(m)}));const _=e.ref(Date.now()),V=()=>{n.value.validate().then((e=>{if(a("log","at pages/feed/vaccine.vue:247",e),e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_vaccinum_log/add",t)).then((e=>{a("log","at pages/feed/vaccine.vue:260",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/vaccine.vue:273",e)}))},k=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/vaccine.vue:295",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/vaccine.vue:298",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},x=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),N=o(e.resolveDynamicComponent("up-form-item"),ni),E=o(e.resolveDynamicComponent("u-icon"),C),B=o(e.resolveDynamicComponent("u-image"),A),S=o(e.resolveDynamicComponent("u--textarea"),li),D=o(e.resolveDynamicComponent("u--form"),Ei),I=o(e.resolveDynamicComponent("u-button"),Si),T=o(e.resolveDynamicComponent("u-action-sheet"),G),P=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(D,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"疫苗信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"疫苗名称",prop:"vaccine_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入疫苗名称",disabled:"detail"==x.value,border:"none",modelValue:c.vaccine_name,"onUpdate:modelValue":a[0]||(a[0]=e=>c.vaccine_name=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"疫苗厂家",prop:"vaccine_manufacturers",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入疫苗厂家",disabled:"detail"==x.value,border:"none",modelValue:c.vaccine_manufacturers,"onUpdate:modelValue":a[1]||(a[1]=e=>c.vaccine_manufacturers=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"疫苗批次号",prop:"vaccine_batch",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入批次号",disabled:"detail"==x.value,border:"none",modelValue:c.vaccine_batch,"onUpdate:modelValue":a[2]||(a[2]=e=>c.vaccine_batch=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(N,{label:"疫苗接种方式",prop:"vaccination_method",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>p.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择方式",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:h.value,"onUpdate:modelValue":a[3]||(a[3]=e=>h.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(N,{label:"疫苗接种部位",prop:"vaccination_site",borderBottom:"",required:"",onClick:a[6]||(a[6]=e=>g.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择接种部位",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:v.value,"onUpdate:modelValue":a[5]||(a[5]=e=>v.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"免疫有限期",prop:"immune_validity_period",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入免疫有限期",disabled:"detail"==x.value,border:"none",modelValue:c.immune_validity_period,"onUpdate:modelValue":a[7]||(a[7]=e=>c.immune_validity_period=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"疫苗注射人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入操作人员姓名",disabled:"detail"==x.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[8]||(a[8]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"接种图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(E,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==x.value]]),e.createVNode(B,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==x.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:k},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(B,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(S,{modelValue:c.remark,"onUpdate:modelValue":a[9]||(a[9]=e=>c.remark=e),disabled:"detail"==x.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==x.value?(e.openBlock(),e.createBlock(I,{key:0,class:"btn",onClick:V},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(T,{show:b.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"禽流感疫苗"},{name:"弓形虫病疫苗"},{name:"其他疫苗"}],title:"请选择疫苗名称",onClose:a[10]||(a[10]=e=>b.value=!1),onSelect:w},null,8,["show"]),e.createVNode(T,{show:p.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"肌肉注射"},{name:"皮下注射"}],title:"请选择接种方式",onClose:a[11]||(a[11]=e=>p.value=!1),onSelect:f},null,8,["show"]),e.createVNode(T,{show:g.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"颈部"},{name:"大腿"}],title:"请选择接种部位",onClose:a[12]||(a[12]=e=>g.value=!1),onSelect:y},null,8,["show"]),e.createVNode(P,{show:s.value,"max-date":(new Date).getTime(),modelValue:_.value,"onUpdate:modelValue":a[13]||(a[13]=e=>_.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[14]||(a[14]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},Ol=x(Ul,[["__scopeId","data-v-994918dd"]]),ql={__name:"expelling",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({vermifuge_name:"",deworming_method:"",deworming_date:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.deworming_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={vermifuge_name:{type:"string",required:!0,message:"请输入驱虫药名称",trigger:["blur","change"]},deworming_method:{type:"string",required:!0,message:"请选择驱虫方式",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请选择驱虫人员",trigger:["blur","change"]},deworming_date:{type:"string",required:!0,message:"请选择驱虫时间",trigger:["blur","change"]}},p=e.ref(!1),h=e=>{c.deworming_method=e.name};l((()=>{n.value.setRules(m)}));const f=()=>{s.value=!0},g=e.ref(Date.now()),v=()=>{n.value.validate().then((e=>{if(e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_deworming_log/add",t)).then((e=>{1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/expelling.vue:215",e)}))},y=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/expelling.vue:237",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/expelling.vue:240",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},b=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),w=o(e.resolveDynamicComponent("up-form-item"),ni),_=o(e.resolveDynamicComponent("u-icon"),C),V=o(e.resolveDynamicComponent("u-image"),A),k=o(e.resolveDynamicComponent("u--textarea"),li),x=o(e.resolveDynamicComponent("u--form"),Ei),N=o(e.resolveDynamicComponent("u-button"),Si),E=o(e.resolveDynamicComponent("u-action-sheet"),G),B=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(x,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"驱虫信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"驱虫药名称",prop:"vermifuge_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入驱虫药名称",disabled:"detail"==b.value,border:"none",modelValue:c.vermifuge_name,"onUpdate:modelValue":a[0]||(a[0]=e=>c.vermifuge_name=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(w,{label:"驱虫方式",prop:"deworming_method",borderBottom:"",required:"",onClick:a[2]||(a[2]=e=>p.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入驱虫方式",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:c.deworming_method,"onUpdate:modelValue":a[1]||(a[1]=e=>c.deworming_method=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"驱虫人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入驱虫人员姓名",disabled:"detail"==b.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[3]||(a[3]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"驱虫时间",prop:"deworming_date",onClick:f,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择时间",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:c.deworming_date,"onUpdate:modelValue":a[4]||(a[4]=e=>c.deworming_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"驱虫图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(_,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==b.value]]),e.createVNode(V,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==b.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:y},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(V,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(k,{modelValue:c.remark,"onUpdate:modelValue":a[5]||(a[5]=e=>c.remark=e),disabled:"detail"==b.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==b.value?(e.openBlock(),e.createBlock(N,{key:0,class:"btn",onClick:v},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(E,{show:p.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"栏舍"},{name:"饲料槽"},{name:"饮水设备"}],title:"请选择",onClose:a[6]||(a[6]=e=>p.value=!1),onSelect:h},null,8,["show"]),e.createVNode(B,{show:s.value,"max-date":(new Date).getTime(),modelValue:g.value,"onUpdate:modelValue":a[7]||(a[7]=e=>g.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[8]||(a[8]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},$l=x(ql,[["__scopeId","data-v-dff8090e"]]),Ll=x({__name:"feedDetail",setup(t){const n=e.ref([]),i=e=>{var t;return(null==(t=n.value.find((t=>t.value==e)))?void 0:t.name)||""},l=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/feedDetail.vue:74",e),Object.assign(l,e),Qn().then((e=>{n.value=e.data,l.feed_type_name=i(l.feed_type)}))}))})),(t,a)=>{const n=o(e.resolveDynamicComponent("up-input"),ai),i=o(e.resolveDynamicComponent("u-form-item"),ni),r=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(r,{labelWidth:"130",model:l,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂食信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(i,{label:"饲料种类",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(n,{readonly:"",border:"none",modelValue:l.feed_type_name,"onUpdate:modelValue":a[0]||(a[0]=e=>l.feed_type_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(i,{label:"饲料品牌",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(n,{readonly:"",border:"none",modelValue:l.feed_brand,"onUpdate:modelValue":a[1]||(a[1]=e=>l.feed_brand=e)},null,8,["modelValue"])])),_:1}),e.createVNode(i,{label:"饲料消耗量(kg)",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(n,{readonly:"",type:"number",border:"none",modelValue:l.feed_consumption,"onUpdate:modelValue":a[2]||(a[2]=e=>l.feed_consumption=e)},null,8,["modelValue"])])),_:1}),e.createVNode(i,{label:"喂食时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(n,{readonly:"",border:"none",modelValue:l.create_time,"onUpdate:modelValue":a[3]||(a[3]=e=>l.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(i,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(l.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-dd07f434"]]),zl=x({__name:"expellingDetail",setup(t){const n=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/expellingDetail.vue:56",e),Object.assign(n,e)}))})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:n,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"驱虫信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"驱虫药名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",type:"txt",border:"none",modelValue:n.vermifuge_name,"onUpdate:modelValue":a[0]||(a[0]=e=>n.vermifuge_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"驱虫方式",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.deworming_method,"onUpdate:modelValue":a[1]||(a[1]=e=>n.deworming_method=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"驱虫时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.create_time,"onUpdate:modelValue":a[2]||(a[2]=e=>n.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(n.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-6855eb98"]]),jl=x({__name:"sterilizeDetail",setup(t){const n=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/sterilizeDetail.vue:64",e),Object.assign(n,e)}))})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:n,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"消毒信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"消毒剂名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.disinfectant_name,"onUpdate:modelValue":a[0]||(a[0]=e=>n.disinfectant_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒剂浓度",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.concentration,"onUpdate:modelValue":a[1]||(a[1]=e=>n.concentration=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒方法",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.disinfectant_method,"onUpdate:modelValue":a[2]||(a[2]=e=>n.disinfectant_method=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒区域",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.disinfectant_area,"onUpdate:modelValue":a[3]||(a[3]=e=>n.disinfectant_area=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.operator,"onUpdate:modelValue":a[4]||(a[4]=e=>n.operator=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.create_time,"onUpdate:modelValue":a[5]||(a[5]=e=>n.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(n.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-9cae65ca"]]),Ml=x({__name:"vaccineDetail",setup(t){const n=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/vaccineDetail.vue:72",e),Object.assign(n,e),"1"==n.vaccination_method&&(n.vaccination_method="肌肉注射"),"2"==n.vaccination_method&&(n.vaccination_method="皮下注射"),"1"==n.vaccination_site&&(n.vaccination_site="颈部"),"2"==n.vaccination_site&&(n.vaccination_site="大腿")}))})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:n,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"疫苗信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"疫苗名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccine_name,"onUpdate:modelValue":a[0]||(a[0]=e=>n.vaccine_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"疫苗厂家",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccine_manufacturers,"onUpdate:modelValue":a[1]||(a[1]=e=>n.vaccine_manufacturers=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"疫苗批次号",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccine_batch,"onUpdate:modelValue":a[2]||(a[2]=e=>n.vaccine_batch=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"接种方式",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccination_method,"onUpdate:modelValue":a[3]||(a[3]=e=>n.vaccination_method=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"接种部位",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccination_site,"onUpdate:modelValue":a[4]||(a[4]=e=>n.vaccination_site=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"免疫有限期",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.immune_validity_period,"onUpdate:modelValue":a[5]||(a[5]=e=>n.immune_validity_period=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"注射人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.operator,"onUpdate:modelValue":a[6]||(a[6]=e=>n.operator=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"接种时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.create_time,"onUpdate:modelValue":a[7]||(a[7]=e=>n.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(n.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-8e49a3d9"]]),Rl=x({__name:"waterDetail",setup(t){const n=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/waterDetail.vue:52",e),Object.assign(n,e)}))})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:n,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂水信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"喂水量(L)",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.water_consumption,"onUpdate:modelValue":a[0]||(a[0]=e=>n.water_consumption=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"喂水人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.operator,"onUpdate:modelValue":a[1]||(a[1]=e=>n.operator=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"喂水时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.create_time,"onUpdate:modelValue":a[2]||(a[2]=e=>n.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(n.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-5448395f"]]),Hl={__name:"moreBreed",setup(t){const a=e.reactive([]),n=e.ref(""),i=e=>{uni.navigateTo({url:e})},l=e.ref({code:"",size:460}),c=e.ref(""),d=async()=>{const e=await c.value.GetCodeImg();uni.saveImageToPhotosAlbum({filePath:e.tempFilePath,success(e){uni.showToast({title:"保存成功",icon:"success",duration:2e3})},fail(e){uni.showToast({title:"保存失败",icon:"none",duration:2e3})}})},u=e.ref(null),m=e.ref({page_no:1,page_size:10}),p=()=>{Tr({fence_house_id:n.value,page_no:m.value.page_no,page_size:m.value.page_size}).then((e=>{1==e.code&&(e.data.lists=e.data.lists.map((e=>(e.showCode=!1,e.pic=JSON.parse(e.pic||"[]"),e))),a.splice(0,a,...e.data.lists))}))},h=e.ref([]);Hn().then((e=>{h.value=e.data}));return r((e=>{n.value=e.id,p()})),s((()=>{m.value.page_no++,p()})),(t,n)=>{const r=o(e.resolveDynamicComponent("u--image"),A),s=o(e.resolveDynamicComponent("u---image"),Jr),m=o(e.resolveDynamicComponent("w-qrcode"),kl),p=o(e.resolveDynamicComponent("uni-popup"),Nn);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:""},[a.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a,((t,a)=>{return e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left"},[e.createVNode(r,{onClick:e=>{return a=t.pic[0],void uni.previewImage({urls:[a]});var a},radius:"10",src:t.pic[0],width:"250rpx",height:"250rpx"},null,8,["onClick","src"]),e.createVNode(s,{class:"qr-code",onClick:e=>(e=>{l.value.code="d_"+e.sn,u.value.open()})(t),src:"/static/main/house/su_yuan_ma_btn.png",width:"60rpx",height:"60rpx"},null,8,["onClick"])]),e.createVNode(r,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>i(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>i(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},[e.createElementVNode("view",{class:"name"},e.toDisplayString(t.sn),1),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品类:"),e.createElementVNode("view",null,e.toDisplayString((o=t.animal_type,(null==(n=h.value.find((e=>e.value==o)))?void 0:n.name)||"")),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品种:"),e.createElementVNode("view",null,e.toDisplayString(t.brand),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"性别:"),e.createElementVNode("view",null,e.toDisplayString(t.gender?"公":"母"),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"栏舍:"),t.fenceHouseAttr?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString(t.fenceHouseAttr.fence_house_name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"来源:"),e.createElementVNode("view",null,e.toDisplayString(1==t.animal_source?"购买":"自繁"),1)])],8,["onClick"])])]);var o,n})),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))]),e.createVNode(p,{ref_key:"codeRef",ref:u},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"bar-code"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(l.value.code.split("d_")[1]),1),e.createVNode(m,{ref_key:"qrCode",ref:c,options:l.value},null,8,["options"]),e.createElementVNode("view",{onClick:d,class:"btn"},"保存图片")])])),_:1},512)])])}}},Ql=x(Hl,[["__scopeId","data-v-c340723f"]]),Wl={props:{duration:{type:Number,default:w.tabs.duration},list:{type:Array,default:w.tabs.list},lineColor:{type:String,default:w.tabs.lineColor},activeStyle:{type:[String,Object],default:w.tabs.activeStyle},inactiveStyle:{type:[String,Object],default:w.tabs.inactiveStyle},lineWidth:{type:[String,Number],default:w.tabs.lineWidth},lineHeight:{type:[String,Number],default:w.tabs.lineHeight},lineBgSize:{type:String,default:w.tabs.lineBgSize},itemStyle:{type:[String,Object],default:w.tabs.itemStyle},scrollable:{type:Boolean,default:w.tabs.scrollable},current:{type:[Number,String],default:w.tabs.current},keyName:{type:String,default:w.tabs.keyName}}};const Jl=x({name:"u-tabs",mixins:[V,k,Wl],data:()=>({firstTime:!0,scrollLeft:0,scrollViewWidth:0,lineOffsetLeft:0,tabsRect:{left:0},innerCurrent:0,moving:!1}),watch:{current:{immediate:!0,handler(e,t){e!==this.innerCurrent&&(this.innerCurrent=e,this.$nextTick((()=>{this.resize()})))}},list(){this.$nextTick((()=>{this.resize()}))}},computed:{textStyle(){return e=>{const t={},a=e===this.innerCurrent?uni.$u.addStyle(this.activeStyle):uni.$u.addStyle(this.inactiveStyle);return this.list[e].disabled&&(t.color="#c8c9cc"),uni.$u.deepMerge(a,t)}},propsBadge:()=>uni.$u.props.badge},async mounted(){this.init()},emits:["click","change"],methods:{setLineLeft(){const e=this.list[this.innerCurrent];if(!e)return;let t=this.list.slice(0,this.innerCurrent).reduce(((e,t)=>e+t.rect.width),0);const a=uni.$u.getPx(this.lineWidth);this.lineOffsetLeft=t+(e.rect.width-a)/2,this.firstTime&&setTimeout((()=>{this.firstTime=!1}),10)},animation(e,t=0){},clickHandler(e,t){this.$emit("click",{...e,index:t}),e.disabled||(this.innerCurrent=t,this.resize(),this.$emit("change",{...e,index:t}))},init(){uni.$u.sleep().then((()=>{this.resize()}))},setScrollLeft(){const e=this.list[this.innerCurrent],t=this.list.slice(0,this.innerCurrent).reduce(((e,t)=>e+t.rect.width),0),a=uni.$u.sys().windowWidth;let o=t-(this.tabsRect.width-e.rect.width)/2-(a-this.tabsRect.right)/2+this.tabsRect.left/2;o=Math.min(o,this.scrollViewWidth-this.tabsRect.width),this.scrollLeft=Math.max(0,o)},resize(){0!==this.list.length&&Promise.all([this.getTabsRect(),this.getAllItemRect()]).then((([e,t=[]])=>{this.tabsRect=e,this.scrollViewWidth=0,t.map(((e,t)=>{this.scrollViewWidth+=e.width,this.list[t].rect=e})),this.setLineLeft(),this.setScrollLeft()}))},getTabsRect(){return new Promise((e=>{this.queryRect("u-tabs__wrapper__scroll-view").then((t=>e(t)))}))},getAllItemRect(){return new Promise((e=>{const t=this.list.map(((e,t)=>this.queryRect(`u-tabs__wrapper__nav__item-${t}`,!0)));Promise.all(t).then((t=>e(t)))}))},queryRect(e,t){return new Promise((t=>{this.$uGetRect(`.${e}`).then((e=>{t(e)}))}))}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-badge"),qo);return e.openBlock(),e.createElementBlock("view",{class:"u-tabs"},[e.createElementVNode("view",{class:"u-tabs__wrapper"},[e.renderSlot(t.$slots,"left",{},void 0,!0),e.createElementVNode("view",{class:"u-tabs__wrapper__scroll-view-wrapper"},[e.createElementVNode("scroll-view",{"scroll-x":t.scrollable,"scroll-left":r.scrollLeft,"scroll-with-animation":"",class:"u-tabs__wrapper__scroll-view","show-scrollbar":!1,ref:"u-tabs__wrapper__scroll-view"},[e.createElementVNode("view",{class:"u-tabs__wrapper__nav",ref:"u-tabs__wrapper__nav"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,((a,o)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["u-tabs__wrapper__nav__item",[`u-tabs__wrapper__nav__item-${o}`,a.disabled&&"u-tabs__wrapper__nav__item--disabled"]]),key:o,onClick:e=>l.clickHandler(a,o),ref_for:!0,ref:`u-tabs__wrapper__nav__item-${o}`,style:e.normalizeStyle([t.$u.addStyle(t.itemStyle),{flex:t.scrollable?"":1}])},[e.createElementVNode("text",{class:e.normalizeClass([[a.disabled&&"u-tabs__wrapper__nav__item__text--disabled"],"u-tabs__wrapper__nav__item__text"]),style:e.normalizeStyle([l.textStyle(o)])},e.toDisplayString(a[t.keyName]),7),e.createVNode(s,{show:!(!a.badge||!(a.badge.show||a.badge.isDot||a.badge.value)),isDot:a.badge&&a.badge.isDot||l.propsBadge.isDot,value:a.badge&&a.badge.value||l.propsBadge.value,max:a.badge&&a.badge.max||l.propsBadge.max,type:a.badge&&a.badge.type||l.propsBadge.type,showZero:a.badge&&a.badge.showZero||l.propsBadge.showZero,bgColor:a.badge&&a.badge.bgColor||l.propsBadge.bgColor,color:a.badge&&a.badge.color||l.propsBadge.color,shape:a.badge&&a.badge.shape||l.propsBadge.shape,numberType:a.badge&&a.badge.numberType||l.propsBadge.numberType,inverted:a.badge&&a.badge.inverted||l.propsBadge.inverted,customStyle:"margin-left: 4px;"},null,8,["show","isDot","value","max","type","showZero","bgColor","color","shape","numberType","inverted"])],14,["onClick"])))),128)),e.createElementVNode("view",{class:"u-tabs__wrapper__nav__line",ref:"u-tabs__wrapper__nav__line",style:e.normalizeStyle([{width:t.$u.addUnit(t.lineWidth),transform:`translate(${r.lineOffsetLeft}px)`,transitionDuration:`${r.firstTime?0:t.duration}ms`,height:t.$u.addUnit(t.lineHeight),background:t.lineColor,backgroundSize:t.lineBgSize}])},null,4)],512)],8,["scroll-x","scroll-left"])]),e.renderSlot(t.$slots,"right",{},void 0,!0)])])}],["__scopeId","data-v-9c4752c4"]]),Kl={__name:"moreFeed",setup(t){const a=e.ref([]),n=e.ref(0),i=e.reactive([{name:"喂食"},{name:"喂水"},{name:"消毒"},{name:"疫苗"},{name:"驱虫"}]),l=(e,t)=>{0==t&&uni.navigateTo({url:"/pages/feedDetail/feedDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),1==t&&uni.navigateTo({url:"/pages/feedDetail/waterDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),2==t&&uni.navigateTo({url:"/pages/feedDetail/sterilizeDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),3==t&&uni.navigateTo({url:"/pages/feedDetail/vaccineDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),4==t&&uni.navigateTo({url:"/pages/feedDetail/expellingDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}})},c=e.ref({page_no:1,page_size:15,fence_house_id:"",animal_info_id:""}),d=e=>{n.value=e.index,c.value.page_no=1,a.value=[],"喂食"==e.name&&u(),"喂水"==e.name&&m(),"消毒"==e.name&&p(),"疫苗"==e.name&&h(),"驱虫"==e.name&&f()},u=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_feeding_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))},m=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_water_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))},p=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_disinfect_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))},h=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_vaccinum_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))},f=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_deworming_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))};return r((e=>{c.value.animal_info_id=e.id,c.value.fence_house_id=e.house_id,u()})),s((()=>{c.value.page_no++,0==n.value&&u(),1==n.value&&m(),2==n.value&&p(),3==n.value&&h(),4==n.value&&f()})),(t,r)=>{const s=o(e.resolveDynamicComponent("u-tabs"),Jl),c=o(e.resolveDynamicComponent("u--image"),A);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createVNode(s,{list:i,lineColor:"#feb048",current:n.value,scrollable:!1,onChange:d},null,8,["list","current"]),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:""},[a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left"},[t.pic?(e.openBlock(),e.createBlock(c,{key:0,onClick:e=>{return a=t.pic[0],void uni.previewImage({urls:[a]});var a},radius:"10",src:t.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"])):e.createCommentVNode("",!0)]),e.createVNode(c,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>l(t,n.value)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>l(t,n.value)},[e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作类型:"),0==n.value?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString("喂食"))):1==n.value?(e.openBlock(),e.createElementBlock("view",{key:1},e.toDisplayString("喂水"))):2==n.value?(e.openBlock(),e.createElementBlock("view",{key:2},e.toDisplayString("消毒"))):3==n.value?(e.openBlock(),e.createElementBlock("view",{key:3},e.toDisplayString("疫苗"))):4==n.value?(e.openBlock(),e.createElementBlock("view",{key:4},e.toDisplayString("驱虫"))):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作人员:"),e.createElementVNode("view",null,e.toDisplayString(t.operator),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作日期:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time),1)]),e.createElementVNode("view",{class:"r-item",style:{height:"80rpx"}},[e.createElementVNode("view",{class:"item-title"},"备注:"),e.createElementVNode("view",{class:"row2"},e.toDisplayString(t.remark),1)])],8,["onClick"])])])))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])])])}}},Gl=x(Kl,[["__scopeId","data-v-0ee4f6cb"]]),Yl={__name:"record",setup(t){const a=e.ref({code:"",size:460}),n=e.ref(""),i=async()=>{const e=await n.value.GetCodeImg();uni.saveImageToPhotosAlbum({filePath:e.tempFilePath,success(e){uni.showToast({title:"保存成功",icon:"success",duration:2e3})},fail(e){uni.showToast({title:"保存失败",icon:"none",duration:2e3})}})},l=e.ref(null),c=e.ref(""),d=e.reactive([]),u=e.ref(!1),m=e.ref([{name:"购买"},{name:"自繁"}]),p=e=>{h(`/pages/plantAdmin/addBreed?name=${e.name}&type=${"购买"==e.name?1:2}`)},h=e=>{uni.navigateTo({url:e})},f=()=>{uni.navigateBack()},g=e.ref({page_no:1,page_size:10}),v=()=>{Tr({keyword:c.value,page_no:g.value.page_no,page_size:g.value.page_size}).then((e=>{1==e.code&&(e.data.lists=e.data.lists.map((e=>(e.showCode=!1,e.pic=JSON.parse(e.pic||"[]"),e))),d.splice(0,d,...e.data.lists))}))},y=e.ref([]);Hn().then((e=>{y.value=e.data}));const b=()=>{g.value.page_no=1,d.value=[],v()};return r((()=>{v()})),s((()=>{g.value.page_no++,v()})),(t,r)=>{const s=o(e.resolveDynamicComponent("u-icon"),C),g=o(e.resolveDynamicComponent("u-search"),Hr),v=o(e.resolveDynamicComponent("u--image"),A),w=o(e.resolveDynamicComponent("u---image"),Jr),_=o(e.resolveDynamicComponent("u-action-sheet"),G),V=o(e.resolveDynamicComponent("w-qrcode"),kl),k=o(e.resolveDynamicComponent("uni-popup"),Nn);return e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title",onClick:f},[e.createVNode(s,{name:"arrow-left",color:"#fff",size:"40rpx",style:{"margin-right":"10rpx"}}),e.createTextVNode(),e.createElementVNode("text",{style:{"padding-bottom":"5rpx"}},"档案管理")]),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(s,{name:"plus",color:"#fff",size:"40rpx",style:{"margin-right":"20rpx"},onClick:r[0]||(r[0]=e=>u.value=!0)}),e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"serch"},[e.createVNode(g,{bgColor:"white","show-action":!1,placeholder:"请输入耳号",modelValue:c.value,"onUpdate:modelValue":r[1]||(r[1]=e=>c.value=e),shape:"round",clearabled:!1},null,8,["modelValue"]),e.createElementVNode("view",{class:"ser-text",onClick:b}," 搜索 ")]),e.createElementVNode("view",{class:"tits"}," 档案信息 "),e.createElementVNode("view",{class:""},[d.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d,((t,o)=>{return e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:o},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left"},[e.createVNode(v,{onClick:e=>{return a=t.pic[0],void uni.previewImage({urls:[a]});var a},radius:"10",src:t.pic[0],width:"250rpx",height:"250rpx"},null,8,["onClick","src"]),e.createVNode(w,{class:"qr-code",onClick:e=>(e=>{a.value.code="d_"+e.sn,l.value.open()})(t),src:"/static/main/house/su_yuan_ma_btn.png",width:"60rpx",height:"60rpx"},null,8,["onClick"])]),e.createVNode(v,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>h(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>h(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},[e.createElementVNode("view",{class:"name"},e.toDisplayString(t.sn),1),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品类:"),e.createElementVNode("view",null,e.toDisplayString((n=t.animal_type,(null==(i=y.value.find((e=>e.value==n)))?void 0:i.name)||"")),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品种:"),e.createElementVNode("view",null,e.toDisplayString(t.brand),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"性别:"),e.createElementVNode("view",null,e.toDisplayString(t.gender?"公":"母"),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"栏舍:"),t.fenceHouseAttr?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString(t.fenceHouseAttr.fence_house_name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"来源:"),e.createElementVNode("view",null,e.toDisplayString(1==t.animal_source?"购买":"自繁"),1)])],8,["onClick"])])]);var n,i})),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])]),e.createVNode(_,{show:u.value,keyName:"name",closeOnClickOverlay:"",actions:m.value,title:"请选择",onClose:r[2]||(r[2]=e=>u.value=!1),onSelect:p},null,8,["show","actions"]),e.createVNode(k,{ref_key:"codeRef",ref:l},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"bar-code"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(a.value.code.split("d_")[1]),1),e.createVNode(V,{ref_key:"qrCode",ref:n,options:a.value},null,8,["options"]),e.createElementVNode("view",{onClick:i,class:"btn"},"保存图片")])])),_:1},512)])}}},Xl={__name:"jump",setup(t){const a=e.ref(""),n=e.ref([]),i=e.ref({page_no:1,page_size:15}),r=(e=!1)=>{var t;(t={keyword:a.value,page_no:i.value.page_no,page_size:i.value.page_size},An.get("/fence_house/exchangeList",t)).then((t=>{n.value=e?[...n.value,...t.data.lists]:t.data.lists}))};r();const l=()=>{i.value.page_no=1,r()},s=()=>{uni.navigateBack()};return(t,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C),c=o(e.resolveDynamicComponent("u-search"),Hr);return e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title",onClick:s},[e.createVNode(r,{name:"arrow-left",size:"40rpx",color:"#fff",style:{"margin-right":"10rpx"}}),e.createTextVNode(),e.createElementVNode("text",{style:{"padding-bottom":"5rpx"}},"转栏记录")]),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(r,{name:"plus",color:"#fff",size:"40rpx",style:{"margin-right":"20rpx"},onClick:i[0]||(i[0]=e=>{return t="/pages/jump/addJump",void uni.navigateTo({url:t});var t})}),e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"serch"},[e.createVNode(c,{bgColor:"white","show-action":!1,placeholder:"请输入耳号",modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=e=>a.value=e),shape:"round",clearabled:!1},null,8,["modelValue"]),e.createElementVNode("view",{class:"ser-text",onClick:l}," 搜索 ")]),e.createElementVNode("view",{class:"tits"}," 转栏信息 "),e.createElementVNode("view",{class:""},[n.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a,onClick:e=>(e=>{uni.navigateTo({url:"/pages/jump/jumpDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}})})(t)},[e.createElementVNode("view",{class:"c-title"},e.toDisplayString(t.animal_sn),1),e.createElementVNode("view",{class:"c-body"},[e.createElementVNode("view",{class:"c-item"},[e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"转出栏舍:"),e.createElementVNode("view",null,e.toDisplayString(t.old_fence_house_name),1)]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"转入栏舍:"),e.createElementVNode("view",null,e.toDisplayString(t.new_fence_house_name),1)])]),e.createElementVNode("view",{class:"c-item"},[e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"转舍时间:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time.split(" ")[0]),1)]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"备注:"),e.createElementVNode("view",null,e.toDisplayString(t.remark),1)])])])],8,["onClick"])))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])])])}}},Zl={__name:"addJump",setup(t){const n=e.ref(null);e.ref(""),e.reactive([]);const i=e.ref(!1),s=e.reactive({animal_sn:"",old_fence_house_id:"",new_fence_house_id:"",remark:""}),c=e=>{s.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),i.value=!1},d=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,u={animal_sn:{type:"string",required:!0,message:"请输入耳号",trigger:["blur","change"]},old_fence_house_id:{type:"number",required:!0,message:"请选择转出栏舍",trigger:["blur","change"]},new_fence_house_id:{type:"number",required:!0,message:"请选择转入栏舍",trigger:["blur","change"]}},m=e.ref(!1),p=e.ref(""),h=e=>{p.value=e.name,s.old_fence_house_id=e.id,s.old_fence_house_id==s.new_fence_house_id&&s.new_fence_house_id&&(uni.showToast({title:"转出栏舍不可与转入栏舍一致",icon:"none"}),g.value="",s.new_fence_house_id="")},f=e.ref(!1),g=e.ref(""),v=e=>{g.value=e.name,s.new_fence_house_id=e.id,s.old_fence_house_id==s.new_fence_house_id&&s.old_fence_house_id&&(uni.showToast({title:"转出栏舍不可与转入栏舍一致",icon:"none"}),p.value="",s.old_fence_house_id="")},y=e.ref([]);Ar({page_no:1,page_size:1e3}).then((e=>{e.data.lists=e.data.lists.map((e=>({id:e.id,name:e.fence_house_name}))),y.value=e.data.lists||[]})),l((()=>{n.value.setRules(u)}));const b=e.ref(Date.now()),w=()=>{n.value.validate().then((e=>{var t;e&&(t=s,An.post("/fence_house/exchange",t)).then((e=>{a("log","at pages/jump/addJump.vue:199",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/jump/addJump.vue:212",e)}))},_=e.ref("add");return r((e=>{})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),V=o(e.resolveDynamicComponent("up-form-item"),ni),k=o(e.resolveDynamicComponent("u--textarea"),li),x=o(e.resolveDynamicComponent("u--form"),Ei),N=o(e.resolveDynamicComponent("u-button"),Si),C=o(e.resolveDynamicComponent("u-action-sheet"),G),E=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(x,{labelWidth:"130",model:s,rules:u,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"转栏信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"耳号",prop:"animal_sn",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入耳号",disabled:"detail"==_.value,border:"none",modelValue:s.animal_sn,"onUpdate:modelValue":a[0]||(a[0]=e=>s.animal_sn=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(V,{label:"转出栏舍",prop:"old_fence_house_id",borderBottom:"",required:"",onClick:a[2]||(a[2]=e=>m.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择转出栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:p.value,"onUpdate:modelValue":a[1]||(a[1]=e=>p.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(V,{label:"转入栏舍",prop:"new_fence_house_id",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>f.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择转入栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:g.value,"onUpdate:modelValue":a[3]||(a[3]=e=>g.value=e),readonly:""},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(k,{modelValue:s.remark,"onUpdate:modelValue":a[5]||(a[5]=e=>s.remark=e),disabled:"detail"==_.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==_.value?(e.openBlock(),e.createBlock(N,{key:0,class:"btn",onClick:w},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(C,{show:m.value,keyName:"name",closeOnClickOverlay:"",actions:y.value,title:"请选择转出栏舍",onClose:a[6]||(a[6]=e=>m.value=!1),onSelect:h},null,8,["show","actions"]),e.createVNode(C,{show:f.value,keyName:"name",closeOnClickOverlay:"",actions:y.value,title:"请选择转入栏舍",onClose:a[7]||(a[7]=e=>f.value=!1),onSelect:v},null,8,["show","actions"]),e.createVNode(E,{show:i.value,"max-date":(new Date).getTime(),modelValue:b.value,"onUpdate:modelValue":a[8]||(a[8]=e=>b.value=e),mode:"datetime",onConfirm:c,formatter:d,onCancel:a[9]||(a[9]=e=>i.value=!1)},null,8,["show","max-date","modelValue"])])}}},es=x(Zl,[["__scopeId","data-v-86a7281b"]]),ts=x({__name:"jumpDetail",setup(t){const a=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){Object.assign(a,e)}))})),(t,n)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:a,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"操作信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"耳号",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",type:"txt",border:"none",modelValue:a.animal_sn,"onUpdate:modelValue":n[0]||(n[0]=e=>a.animal_sn=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"转出栏舍",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.old_fence_house_name,"onUpdate:modelValue":n[1]||(n[1]=e=>a.old_fence_house_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"转入类型",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.new_fence_house_name,"onUpdate:modelValue":n[2]||(n[2]=e=>a.new_fence_house_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"转舍时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.create_time,"onUpdate:modelValue":n[3]||(n[3]=e=>a.create_time=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.remark,"onUpdate:modelValue":n[4]||(n[4]=e=>a.remark=e)},null,8,["modelValue"])])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-51ef4072"]]),as={__name:"leave",setup(t){const a=e.ref([]);Wn().then((e=>{a.value=e.data}));const n=e=>{var t;return(null==(t=a.value.find((t=>t.id==e)))?void 0:t.name)||""},i=e.ref(""),r=e.ref([]),l=e.ref({page_no:1,page_size:15}),s=()=>{var e;(e={keyword:i.value,page_no:l.value.page_no,page_size:l.value.page_size},An.get("/fence_house/leaveList",e)).then((e=>{r.value=e.data.lists}))};s();const c=()=>{l.value.page_no=1,s()},d=()=>{uni.navigateBack()};return(t,a)=>{const l=o(e.resolveDynamicComponent("u-icon"),C),s=o(e.resolveDynamicComponent("u-search"),Hr);return e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title",onClick:d},[e.createVNode(l,{name:"arrow-left",color:"#fff",size:"40rpx",style:{"margin-right":"10rpx"}}),e.createTextVNode(),e.createElementVNode("text",{style:{"padding-bottom":"5rpx"}},"离栏记录")]),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(l,{name:"plus",color:"#fff",size:"40rpx",style:{"margin-right":"20rpx"},onClick:a[0]||(a[0]=e=>{return t="/pages/leave/addLeave",void uni.navigateTo({url:t});var t})}),e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"serch"},[e.createVNode(s,{bgColor:"white","show-action":!1,placeholder:"请输入耳号",modelValue:i.value,"onUpdate:modelValue":a[1]||(a[1]=e=>i.value=e),shape:"round",clearabled:!1},null,8,["modelValue"]),e.createElementVNode("view",{class:"ser-text",onClick:c}," 搜索 ")]),e.createElementVNode("view",{class:"tits"}," 离栏记录 "),e.createElementVNode("view",{class:""},[r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a,onClick:e=>(e=>{uni.navigateTo({url:"/pages/leave/leaveDetail",success:t=>{e.leave_type_name=n(e.leave_type),t.eventChannel.emit("setDatasItem",e)}})})(t)},[e.createElementVNode("view",{class:"c-title"},e.toDisplayString(t.animal_sn),1),e.createElementVNode("view",{class:"c-body"},[e.createElementVNode("view",{class:"c-item"},[e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"所在栏舍:"),e.createElementVNode("view",null,e.toDisplayString(t.fence_house_name),1)]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"离舍原因:"),e.createElementVNode("view",null,e.toDisplayString(t.reason),1)])]),e.createElementVNode("view",{class:"c-item"},[e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"离舍类型:"),e.createElementVNode("view",null,e.toDisplayString(n(t.leave_type)),1)]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"离舍时间:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time.split(" ")[0]),1)])])]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"备注:"),e.createElementVNode("view",null,e.toDisplayString(t.remark),1)])],8,["onClick"])))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])])])}}},os={__name:"addLeave",setup(t){const n=e.ref(null),i=e.ref(""),s=e.reactive([]),c=e.ref(!1),d=e.reactive({animal_sn:"",leave_type:"",reason:"",remark:"",fence_house_id:""}),u=e=>{d.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),c.value=!1},m=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,p={animal_sn:{type:"string",required:!0,message:"请输入耳号",trigger:["blur","change"]},fence_house_id:{type:"number",required:!0,message:"请选择所在栏舍",trigger:["blur","change"]},leave_type:{type:"number",required:!0,message:"请输入离舍类型",trigger:["blur","change"]},reason:{type:"string",required:!0,message:"请输入离舍原因",trigger:["blur","change"]}},h=e.ref(!1),f=e.ref(""),g=e=>{f.value=e.name,d.fence_house_id=e.id},v=e.ref(!1),y=e.ref(""),b=e=>{y.value=e.name,d.leave_type=e.id},w=e.ref([]);Wn().then((e=>{w.value=e.data})),l((()=>{n.value.setRules(p)}));const _=e.ref(Date.now()),V=()=>{n.value.validate().then((e=>{var t;a("log","at pages/leave/addLeave.vue:185",e),e&&(t=d,An.post("/fence_house/leave",t)).then((e=>{a("log","at pages/leave/addLeave.vue:191",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/leave/addLeave.vue:204",e)}))},k=e.ref([]);Ar({page_no:1,page_size:1e3}).then((e=>{e.data.lists=e.data.lists.map((e=>({id:e.id,name:e.fence_house_name}))),k.value=e.data.lists||[]}));const x=e.ref("add");return r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;Object.assign(d,t.detail),s.splice(0,s.length,...t.detail.pic),x.value="detail",uni.setNavigationBarTitle({title:"收获详情"})}else i.value=e.id})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("up-form-item"),ni),s=o(e.resolveDynamicComponent("u--textarea"),li),N=o(e.resolveDynamicComponent("u--form"),Ei),C=o(e.resolveDynamicComponent("u-button"),Si),E=o(e.resolveDynamicComponent("u-action-sheet"),G),B=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(N,{labelWidth:"130",model:d,rules:p,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"转栏信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"耳号",prop:"animal_sn",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请输入耳号",disabled:"detail"==x.value,border:"none",modelValue:d.animal_sn,"onUpdate:modelValue":a[0]||(a[0]=e=>d.animal_sn=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"所在栏舍",prop:"fence_house_id",borderBottom:"",required:"",onClick:a[2]||(a[2]=e=>h.value=!0)},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请选择所在栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:f.value,"onUpdate:modelValue":a[1]||(a[1]=e=>f.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"离舍类型",prop:"leave_type",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>v.value=!0)},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请选择类型",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:y.value,"onUpdate:modelValue":a[3]||(a[3]=e=>y.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"离舍原因",prop:"reason",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请输入离舍原因",disabled:"detail"==x.value,border:"none",modelValue:d.reason,"onUpdate:modelValue":a[5]||(a[5]=e=>d.reason=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(r,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(s,{modelValue:d.remark,"onUpdate:modelValue":a[6]||(a[6]=e=>d.remark=e),disabled:"detail"==x.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==x.value?(e.openBlock(),e.createBlock(C,{key:0,class:"btn",onClick:V},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(E,{show:h.value,keyName:"fence_house_name",closeOnClickOverlay:"",actions:k.value,title:"请选择所在栏舍",onClose:a[7]||(a[7]=e=>h.value=!1),onSelect:g},null,8,["show","actions"]),e.createVNode(E,{show:v.value,keyName:"name",closeOnClickOverlay:"",actions:w.value,title:"请选择离舍类型",onClose:a[8]||(a[8]=e=>v.value=!1),onSelect:b},null,8,["show","actions"]),e.createVNode(B,{show:c.value,"max-date":(new Date).getTime(),modelValue:_.value,"onUpdate:modelValue":a[9]||(a[9]=e=>_.value=e),mode:"datetime",onConfirm:u,formatter:m,onCancel:a[10]||(a[10]=e=>c.value=!1)},null,8,["show","max-date","modelValue"])])}}},ns=x(os,[["__scopeId","data-v-068b85ad"]]),is=x({__name:"leaveDetail",setup(t){const a=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){Object.assign(a,e)}))})),(t,n)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:a,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"操作信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"耳号",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",type:"txt",border:"none",modelValue:a.animal_sn,"onUpdate:modelValue":n[0]||(n[0]=e=>a.animal_sn=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"所在栏舍",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.fence_house_name,"onUpdate:modelValue":n[1]||(n[1]=e=>a.fence_house_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"离舍类型",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.leave_type_name,"onUpdate:modelValue":n[2]||(n[2]=e=>a.leave_type_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"离舍原因",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.reason,"onUpdate:modelValue":n[3]||(n[3]=e=>a.reason=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"离舍时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.create_time,"onUpdate:modelValue":n[4]||(n[4]=e=>a.create_time=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.remark,"onUpdate:modelValue":n[5]||(n[5]=e=>a.remark=e)},null,8,["modelValue"])])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-90468592"]]),rs={__name:"plant",setup(t){const n=e.ref(null),i=e.reactive({formData:{farm_name:"",farm_type:"",breed_type:"",form_scale:"",master:"",master_contact:"",province:"",city:"",area:"",street:"",village:"",bridge:"",address:"",lat:"",lon:"",master_name:"",image:[]},rules:{farm_name:[{type:"string",required:!0,message:"请填写养殖基地名称",trigger:["blur","change"]}],farm_type:[{type:"string",required:!0,message:"请填写养殖基地类型",trigger:["blur","change"]}],breed_type:[{type:"string",required:!0,message:"请填写养殖基地种类",trigger:["blur","change"]}],form_scale:[{type:"string",required:!0,message:"请填写养殖基地规模",trigger:["blur","change"]}],province:[{type:"string",required:!0,message:"请请选择所在省份",trigger:"change"}],city:[{type:"string",required:!0,message:"请选择所在城市",trigger:"change"}],area:[{type:"string",required:!0,message:"请选择所在区县",trigger:"change"}],street:{type:"string",required:!0,message:"请选择所在镇街",trigger:["blur","change"]},village:{type:"string",required:!0,message:"请选择所在乡村",trigger:["blur","change"]},bridge:{type:"string",required:!0,message:"请选择小队",trigger:["blur","change"]},address:[{type:"string",required:!0,message:"请输入养殖基地详细地址",trigger:["blur","change"]}],master:[{type:"string",required:!0,message:"请输入养殖基地负责人姓名",trigger:["blur","change"]}],master_contact:[{required:!0,message:"请输入手机号",trigger:["change","blur"]},{validator:(e,t,a)=>uni.$u.test.mobile(t),message:"手机号码不正确",trigger:["change","blur"]}]}}),s=e.reactive([]),c=e.ref(null),d=e.ref(null),u=e.ref(null),m=e.ref(null),p=e.ref(null),h=e.ref(null),f=e.ref(null),g=e.ref(null),v=e.ref(!1),y=e.ref(!1),b=e.ref(!1),w=e.ref(!1),_=e.ref(!1),V=e.ref(!1),k=e.ref(!1),x=e.ref(!1),N=e.reactive([]),E=e.reactive([]),B=e.reactive([]),S=e.reactive([]),D=e.reactive([]),I=e.reactive([]),T=e.reactive([]),P=e.reactive([]),F=e=>{On({province_code:e}).then((e=>{if(E.splice(0,E.length,...e.data.map(((e,t)=>({name:e.city_name,id:e.city_code})))),i.formData.city){let e=E.find((e=>e.id==i.formData.city));if(!e)return;d.value=(null==e?void 0:e.name)||"",U(e.id)}}))},U=e=>{qn({city_code:e}).then((e=>{if(B.splice(0,B.length,...e.data.map(((e,t)=>({name:e.county_name,id:e.county_code})))),i.formData.area){let e=B.find((e=>e.id==i.formData.area));if(!e)return;u.value=(null==e?void 0:e.name)||"",O(e.id)}}))},O=e=>{$n({county_code:e}).then((e=>{if(S.splice(0,N.length,...e.data.map(((e,t)=>({name:e.town_name,id:e.town_code})))),i.formData.street){let e=S.find((e=>e.id==i.formData.street));if(!e)return;m.value=(null==e?void 0:e.name)||"",q(e.id)}}))},q=e=>{Ln({town_code:e}).then((e=>{if(D.splice(0,N.length,...e.data.map(((e,t)=>({name:e.village_name,id:e.village_code})))),i.formData.village){let e=D.find((e=>e.id==i.formData.village));if(!e)return;p.value=(null==e?void 0:e.name)||"",$()}}))},$=()=>{zn().then((e=>{if(I.splice(0,N.length,...e.data.map(((e,t)=>({name:e.group_name,id:e.group_code})))),i.formData.bridge){let e=I.find((e=>e.id==i.formData.bridge));if(!e)return;h.value=(null==e?void 0:e.name)||""}}))},L=e=>{f.value=e.name,i.formData.farm_type=e.value},z=e=>{g.value=e.name,i.formData.breed_type=e.value},j=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{1==e.code&&(s.push(e.data.url),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},M=()=>{le.value||(v.value=!0)},R=()=>{le.value||(y.value=!0)},H=()=>{le.value||(b.value=!0)},Q=()=>{le.value||(w.value=!0)},W=()=>{le.value||(_.value=!0)},J=()=>{le.value||(V.value=!0)},K=()=>{le.value||(k.value=!0)},Y=()=>{le.value||(x.value=!0)},X=e=>{a("log","at pages/plant/plant.vue:548",e),c.value=e.name,i.formData.province=e.id,F(e.id)},Z=e=>{d.value=e.name,i.formData.city=e.id,U(e.id)},ee=e=>{u.value=e.name,i.formData.area=e.id,O(e.id)},te=e=>{m.value=e.name,i.formData.street=e.id,q(e.id)},ae=e=>{p.value=e.name,i.formData.village=e.id,$()},oe=e=>{h.value=e.name,i.formData.bridge=e.id},ne=()=>{le.value||uni.navigateTo({url:"/pages/addPlant/select_address_n",success:e=>{uni.$once("setData",(e=>{a("log","at pages/plant/plant.vue:591","选择地址",e=JSON.parse(e||"{}")),i.formData.address=e.address,i.formData.lat=e.lat,i.formData.lon=e.lon}))}})};l((()=>{n.value.setRules(i.rules)}));const ie=async()=>{try{if(await n.value.validate()){if(0==s.length)return void uni.$u.toast("请上传图片");i.formData.image=JSON.stringify(s),jn(i.formData).then((e=>{a("log","at pages/plant/plant.vue:623",e),1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/plant/plant.vue:634","表单验证未通过")}catch(e){a("error","at pages/plant/plant.vue:638",e)}};function re(e){for(let t in e)"object"==typeof e[t]?re(e[t]):"number"==typeof e[t]&&(e[t]=e[t].toString())}const le=e.ref(!1);return r((t=>{e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(e=>{re(e),a("log","at pages/plant/plant.vue:657",e),le.value=!0,e.pic=JSON.parse(e.pic||"[]"),e.image=JSON.parse(e.image||"[]"),e.pic.length>0?Object.assign(s,e.pic):Object.assign(s,e.image),Object.assign(i.formData,e),Un().then((e=>{if(N.splice(0,N.length,...e.data.map(((e,t)=>({name:e.province_name,id:e.province_code})))),i.formData.province){let e=N.find((e=>e.id==i.formData.province));if(!e)return;c.value=(null==e?void 0:e.name)||"",F(e.id)}})),Mn().then((e=>{if(T.splice(0,T.length,...e.data.map(((e,t)=>({name:e.name,value:e.value,id:e.id})))),i.formData.farm_type){let e=T.find((e=>e.value==i.formData.farm_type));f.value=(null==e?void 0:e.name)||""}})),Rn().then((e=>{if(P.splice(0,P.length,...e.data.map(((e,t)=>({name:e.name,value:e.value,id:e.id})))),i.formData.breed_type){let e=P.find((e=>e.value==i.formData.breed_type));g.value=(null==e?void 0:e.name)||""}}))}))})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("up-form-item"),ni),F=o(e.resolveDynamicComponent("u-icon"),C),U=o(e.resolveDynamicComponent("u-image"),A),O=o(e.resolveDynamicComponent("up-form"),Ei),q=o(e.resolveDynamicComponent("u-action-sheet"),G),$=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(O,{labelWidth:"130",model:i.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"养殖基地信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"养殖基地名称",prop:"farm_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地名称",border:"none",modelValue:i.formData.farm_name,"onUpdate:modelValue":a[0]||(a[0]=e=>i.formData.farm_name=e),readonly:le.value},null,8,["modelValue","readonly"])])),_:1}),e.createVNode(l,{label:"养殖基地类型",prop:"farm_type",borderBottom:"",required:"",onClick:K},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择养殖基地类型",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:f.value,"onUpdate:modelValue":a[1]||(a[1]=e=>f.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖种类",prop:"farm_type",borderBottom:"",required:"",onClick:Y},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择养殖种类",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:g.value,"onUpdate:modelValue":a[2]||(a[2]=e=>g.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地规模(亩)",prop:"form_scale",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地规模",type:"number",border:"none",modelValue:i.formData.form_scale,"onUpdate:modelValue":a[3]||(a[3]=e=>i.formData.form_scale=e),readonly:le.value},null,8,["modelValue","readonly"])])),_:1}),e.createVNode(l,{label:"负责人",prop:"master",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人姓名",border:"none",modelValue:i.formData.master,"onUpdate:modelValue":a[4]||(a[4]=e=>i.formData.master=e),readonly:le.value},null,8,["modelValue","readonly"])])),_:1}),e.createVNode(l,{label:"负责人电话",prop:"master_contact",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人电话",type:"number",border:"none",modelValue:i.formData.master_contact,"onUpdate:modelValue":a[5]||(a[5]=e=>i.formData.master_contact=e),readonly:le.value},null,8,["modelValue","readonly"])])),_:1})]),e.createElementVNode("view",{class:"c-title"},"地址信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"所在省份",prop:"province",borderBottom:"",required:"",onClick:M},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在省份",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:c.value,"onUpdate:modelValue":a[6]||(a[6]=e=>c.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在城市",prop:"city",borderBottom:"",required:"",onClick:R},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在城市",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:d.value,"onUpdate:modelValue":a[7]||(a[7]=e=>d.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在区县",prop:"area",borderBottom:"",required:"",onClick:H},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在区县",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:u.value,"onUpdate:modelValue":a[8]||(a[8]=e=>u.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在镇街",prop:"formData.street",borderBottom:"",required:"",onClick:Q},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在镇街",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:m.value,"onUpdate:modelValue":a[9]||(a[9]=e=>m.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在乡村",prop:"formData.village",borderBottom:"",required:"",onClick:W},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在乡村",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:p.value,"onUpdate:modelValue":a[10]||(a[10]=e=>p.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在小队",prop:"formData.bridge",borderBottom:"",required:"",onClick:J},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在小队",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:h.value,"onUpdate:modelValue":a[11]||(a[11]=e=>h.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地详细地址",prop:"address",style:{position:"relative"},borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地详细地址",suffixIcon:"map","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:i.formData.address,"onUpdate:modelValue":a[12]||(a[12]=e=>i.formData.address=e)},null,8,["modelValue"]),e.createElementVNode("view",{style:{position:"absolute",right:"0",width:"50rpx",height:"100%"},onClick:ne})])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"养殖基地图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[le.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F,{key:0,name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"])),e.createVNode(U,{src:t,width:"150.85rpx",height:"150.85rpx"},null,8,["src"])])])))),256))])):e.createCommentVNode("",!0)]),le.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:j},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(U,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])]))])])])),_:1},8,["model"]),e.createVNode(q,{show:v.value,keyName:"name",closeOnClickOverlay:"",actions:N,title:"请选择",onClose:a[13]||(a[13]=e=>v.value=!1),onSelect:X},null,8,["show","actions"]),e.createVNode(q,{show:y.value,keyName:"name",actions:E,title:"请选择",onClose:a[14]||(a[14]=e=>y.value=!1),onSelect:Z},null,8,["show","actions"]),e.createVNode(q,{show:b.value,keyName:"name",actions:B,title:"请选择",onClose:a[15]||(a[15]=e=>b.value=!1),onSelect:ee},null,8,["show","actions"]),e.createVNode(q,{show:w.value,keyName:"name",actions:S,title:"请选择",onClose:a[16]||(a[16]=e=>w.value=!1),onSelect:te},null,8,["show","actions"]),e.createVNode(q,{show:_.value,keyName:"name",actions:D,title:"请选择",onClose:a[17]||(a[17]=e=>_.value=!1),onSelect:ae},null,8,["show","actions"]),e.createVNode(q,{show:V.value,keyName:"name",actions:I,title:"请选择",onClose:a[18]||(a[18]=e=>V.value=!1),onSelect:oe},null,8,["show","actions"]),e.createVNode(q,{show:k.value,keyName:"name",actions:T,title:"请选择",onClose:a[19]||(a[19]=e=>k.value=!1),onSelect:L},null,8,["show","actions"]),e.createVNode(q,{show:x.value,keyName:"name",actions:P,title:"请选择",onClose:a[20]||(a[20]=e=>x.value=!1),onSelect:z},null,8,["show","actions"]),le.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:0,class:"btn",onClick:ie},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1}))])])}}};__definePage("pages/index/massif",Jn),__definePage("pages/landDetail/index",Yn),__definePage("pages/landDetail/tudi",Zn),__definePage("pages/husbandryForm/harvest",dr),__definePage("pages/husbandryForm/Pest",mr),__definePage("pages/husbandryForm/irrigate",hr),__definePage("pages/husbandryForm/weeding",gr),__definePage("pages/husbandryForm/fertilize",yr),__definePage("pages/husbandryForm/sow",wr),__definePage("pages/live/live",kr),__definePage("pages/addPlant/addPlant",xr),__definePage("pages/equipment/index",Nr),__definePage("pages/landDetail/results",Fr),__definePage("pages/husbandryForm/detail",Ur),__definePage("pages/updatePassword/updatePassword",qr),__definePage("pages/index/personal",$r),__definePage("pages/Login/login",Lr),__definePage("pages/Login/resgier",zr),__definePage("pages/index/manager",jr),__definePage("pages/plantAdmin/house",Qr),__definePage("pages/plantAdmin/addHouse",Wr),__definePage("pages/plantAdmin/houseDetail",Nl),__definePage("pages/plantAdmin/breedDetail",Bl),__definePage("pages/plantAdmin/addBreed",Sl),__definePage("pages/feed/feed",Al),__definePage("pages/feed/water",Tl),__definePage("pages/feed/sterilize",Fl),__definePage("pages/feed/vaccine",Ol),__definePage("pages/feed/expelling",$l),__definePage("pages/feedDetail/feedDetail",Ll),__definePage("pages/feedDetail/expellingDetail",zl),__definePage("pages/feedDetail/sterilizeDetail",jl),__definePage("pages/feedDetail/vaccineDetail",Ml),__definePage("pages/feedDetail/waterDetail",Rl),__definePage("pages/plantAdmin/moreBreed",Ql),__definePage("pages/plantAdmin/moreFeed",Gl),__definePage("pages/record/record",Yl),__definePage("pages/jump/jump",Xl),__definePage("pages/jump/addJump",es),__definePage("pages/jump/jumpDetail",ts),__definePage("pages/leave/leave",as),__definePage("pages/leave/addLeave",ns),__definePage("pages/leave/leaveDetail",is),__definePage("pages/plant/plant",rs);const ls={onLaunch:function(){uni.hideTabBar()},onShow:function(){a("log","at App.vue:8","App Show")},onHide:function(){a("log","at App.vue:12","App Hide")}},{toString:ss}=Object.prototype;function cs(e){return"[object Array]"===ss.call(e)}function ds(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),cs(e))for(let a=0,o=e.length;a{null!=t&&(cs(t)?a=`${a}[]`:t=[t],ds(t,(t=>{!function(e){return"[object Date]"===ss.call(e)}(t)?function(e){return null!==e&&"object"==typeof e}(t)&&(t=JSON.stringify(t)):t=t.toISOString(),e.push(`${ps(a)}=${ps(t)}`)})))})),a=e.join("&")}var o;if(a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const fs=(e,t)=>{const a={};return e.forEach((e=>{ms(t[e])||(a[e]=t[e])})),a},gs=e=>(e=>new Promise(((t,a)=>{const o=hs((n=e.baseURL,i=e.url,n&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)?function(e,t){return t?`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`:e}(n,i):i),e.params);var n,i;const r={url:o,header:e.header,complete:n=>{e.fullPath=o,n.config=e;try{"string"==typeof n.data&&(n.data=JSON.parse(n.data))}catch(it){}!function(e,t,a){const{validateStatus:o}=a.config,n=a.statusCode;!n||o&&!o(n)?t(a):e(a)}(t,a,n)}};let l;if("UPLOAD"===e.method){delete r.header["content-type"],delete r.header["Content-Type"];const t={filePath:e.filePath,name:e.name},a=["files","timeout","formData"];l=uni.uploadFile({...r,...t,...fs(a,e)})}else if("DOWNLOAD"===e.method)ms(e.timeout)||(r.timeout=e.timeout),l=uni.downloadFile(r);else{const t=["data","method","timeout","dataType","responseType","sslVerify","firstIpv4"];l=uni.request({...r,...fs(t,e)})}e.getTask&&e.getTask(l,e)})))(e);function vs(){this.handlers=[]}vs.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},vs.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},vs.prototype.forEach=function(e){this.handlers.forEach((t=>{null!==t&&e(t)}))};const ys=(e,t,a)=>{const o={};return e.forEach((e=>{ms(a[e])?ms(t[e])||(o[e]=t[e]):o[e]=a[e]})),o},bs={baseURL:"",header:{},method:"GET",dataType:"json",responseType:"text",custom:{},timeout:6e4,sslVerify:!0,firstIpv4:!1,validateStatus:function(e){return e>=200&&e<300}};var ws=function(){function e(e,t){return null!=t&&e instanceof t}var t,a,o;try{t=Map}catch(l){t=function(){}}try{a=Set}catch(l){a=function(){}}try{o=Promise}catch(l){o=function(){}}function n(i,l,s,c,d){"object"==typeof l&&(s=l.depth,c=l.prototype,d=l.includeNonEnumerable,l=l.circular);var u=[],m=[],p="undefined"!=typeof Buffer;return void 0===l&&(l=!0),void 0===s&&(s=1/0),function i(s,h){if(null===s)return null;if(0===h)return s;var f,g;if("object"!=typeof s)return s;if(e(s,t))f=new t;else if(e(s,a))f=new a;else if(e(s,o))f=new o((function(e,t){s.then((function(t){e(i(t,h-1))}),(function(e){t(i(e,h-1))}))}));else if(n.__isArray(s))f=[];else if(n.__isRegExp(s))f=new RegExp(s.source,r(s)),s.lastIndex&&(f.lastIndex=s.lastIndex);else if(n.__isDate(s))f=new Date(s.getTime());else{if(p&&Buffer.isBuffer(s))return Buffer.from?f=Buffer.from(s):(f=new Buffer(s.length),s.copy(f)),f;e(s,Error)?f=Object.create(s):void 0===c?(g=Object.getPrototypeOf(s),f=Object.create(g)):(f=Object.create(c),g=c)}if(l){var v=u.indexOf(s);if(-1!=v)return m[v];u.push(s),m.push(f)}for(var y in e(s,t)&&s.forEach((function(e,t){var a=i(t,h-1),o=i(e,h-1);f.set(a,o)})),e(s,a)&&s.forEach((function(e){var t=i(e,h-1);f.add(t)})),s){Object.getOwnPropertyDescriptor(s,y)&&(f[y]=i(s[y],h-1));try{if("undefined"===Object.getOwnPropertyDescriptor(s,y).set)continue;f[y]=i(s[y],h-1)}catch(it){if(it instanceof TypeError)continue;if(it instanceof ReferenceError)continue}}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(s);for(y=0;y{uni.$u.routeIntercept(a,e)}))&&this.openPage(a)}else this.openPage(a)}openPage(e){const{url:t,type:a,delta:o,animationType:n,animationDuration:i}=e;"navigateTo"!=e.type&&"to"!=e.type||uni.navigateTo({url:t,animationType:n,animationDuration:i}),"redirectTo"!=e.type&&"redirect"!=e.type||uni.redirectTo({url:t}),"switchTab"!=e.type&&"tab"!=e.type||uni.switchTab({url:t}),"reLaunch"!=e.type&&"launch"!=e.type||uni.reLaunch({url:t}),"navigateBack"!=e.type&&"back"!=e.type||uni.navigateBack({delta:o})}}).route;function Vs(e,t=!0){if((e=String(e).toLowerCase())&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(e)){if(4===e.length){let t="#";for(let a=1;a<4;a+=1)t+=e.slice(a,a+1).concat(e.slice(a,a+1));e=t}const a=[];for(let t=1;t<7;t+=2)a.push(parseInt(`0x${e.slice(t,t+2)}`));return t?`rgb(${a[0]},${a[1]},${a[2]})`:a}if(/^(rgb|RGB)/.test(e)){return e.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map((e=>Number(e)))}return e}function ks(e){const t=e;if(/^(rgb|RGB)/.test(t)){const e=t.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",");let a="#";for(let t=0;t=0},range:function(e,t){return e>=t[0]&&e<=t[1]},rangeLength:function(e,t){return e.length>=t[0]&&e.length<=t[1]},empty:Cs,isEmpty:Cs,jsonString:function(e){if("string"==typeof e)try{const t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(it){return!1}return!1},landline:function(e){return/^\d{3,4}-\d{7,8}(-\d{3,4})?$/.test(e)},object:Es,array:function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},code:function(e,t=6){return new RegExp(`^\\d{${t}}$`).test(e)},func:Bs,promise:function(e){return Es(e)&&Bs(e.then)&&Bs(e.catch)},video:function(e){return/\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i.test(e)},image:function(e){const t=e.split("?")[0];return/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i.test(t)},regExp:function(e){return e&&"[object RegExp]"===Object.prototype.toString.call(e)},string:function(e){return"string"==typeof e}};let Ds,As=null;function Is(e,t=15){return+parseFloat(Number(e).toPrecision(t))}function Ts(e){const t=e.toString().split(/[eE]/),a=(t[0].split(".")[1]||"").length-+(t[1]||0);return a>0?a:0}function Ps(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));const t=Ts(e);return t>0?Is(Number(e)*Math.pow(10,t)):Number(e)}function Fs(e){(e>Number.MAX_SAFE_INTEGER||e{i=t(i,e)})),i}function Os(...e){if(e.length>2)return Us(e,Os);const[t,a]=e,o=Ps(t),n=Ps(a),i=Ts(t)+Ts(a),r=o*n;return Fs(r),r/Math.pow(10,i)}function qs(...e){if(e.length>2)return Us(e,qs);const[t,a]=e,o=Ps(t),n=Ps(a);return Fs(o),Fs(n),Os(o/n,Is(Math.pow(10,Ts(a)-Ts(t))))}function $s(e){if([null,void 0,NaN,!1].includes(e))return e;if("object"!=typeof e&&"function"!=typeof e)return e;const t=Ss.array(e)?[]:{};for(const a in e)e.hasOwnProperty(a)&&(t[a]="object"==typeof e[a]?$s(e[a]):e[a]);return t}function Ls(e=null,t="yyyy-mm-dd"){let a;a=e?/^\d{10}$/.test(e.toString().trim())?new Date(1e3*e):"string"==typeof e&&/^\d+$/.test(e.trim())?new Date(Number(e)):new Date("string"==typeof e?e.replace(/-/g,"/"):e):new Date;const o={y:a.getFullYear().toString(),m:(a.getMonth()+1).toString().padStart(2,"0"),d:a.getDate().toString().padStart(2,"0"),h:a.getHours().toString().padStart(2,"0"),M:a.getMinutes().toString().padStart(2,"0"),s:a.getSeconds().toString().padStart(2,"0")};for(const n in o){const[e]=new RegExp(`${n}+`).exec(t)||[];if(e){const a="y"===n&&2===e.length?2:0;t=t.replace(e,o[n].slice(a))}}return t}function zs(e,t="both"){return e=String(e),"both"==t?e.replace(/^\s+|\s+$/g,""):"left"==t?e.replace(/^\s*/,""):"right"==t?e.replace(/(\s*$)/g,""):"all"==t?e.replace(/\s+/g,""):e}String.prototype.padStart||(String.prototype.padStart=function(e,t=" "){if("[object String]"!==Object.prototype.toString.call(t))throw new TypeError("fillString must be String");const a=this;if(a.length>=e)return String(a);const o=e-a.length;let n=Math.ceil(o/t.length);for(;n>>=1;)t+=t,1===n&&(t+=t);return t.slice(0,o)+a});const js={range:function(e=0,t=0,a=0){return Math.max(e,Math.min(t,Number(a)))},getPx:function(e,t=!1){return Ss.number(e)?t?`${e}px`:Number(e):/(rpx|upx)$/.test(e)?t?`${uni.upx2px(parseInt(e))}px`:Number(uni.upx2px(parseInt(e))):t?`${parseInt(e)}px`:parseInt(e)},sleep:function(e=30){return new Promise((t=>{setTimeout((()=>{t()}),e)}))},os:function(){return uni.getSystemInfoSync().platform.toLowerCase()},sys:function(){return uni.getSystemInfoSync()},random:function(e,t){if(e>=0&&t>0&&t>=e){const a=t-e+1;return Math.floor(Math.random()*a+e)}return 0},guid:function(e=32,t=!0,a=null){const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[];if(a=a||o.length,e)for(let i=0;iMath.random()-.5))},timeFormat:Ls,timeFrom:function(e=null,t="yyyy-mm-dd"){null==e&&(e=Number(new Date)),10==(e=parseInt(e)).toString().length&&(e*=1e3);let a=(new Date).getTime()-e;a=parseInt(a/1e3);let o="";switch(!0){case a<300:o="刚刚";break;case a>=300&&a<3600:o=`${parseInt(a/60)}分钟前`;break;case a>=3600&&a<86400:o=`${parseInt(a/3600)}小时前`;break;case a>=86400&&a<2592e3:o=`${parseInt(a/86400)}天前`;break;default:o=!1===t?a>=2592e3&&a<31536e3?`${parseInt(a/2592e3)}个月前`:`${parseInt(a/31536e3)}年前`:Ls(e,t)}return o},trim:zs,queryParams:function(e={},t=!0,a="brackets"){const o=t?"?":"",n=[];-1==["indices","brackets","repeat","comma"].indexOf(a)&&(a="brackets");for(const i in e){const t=e[i];if(!(["",void 0,null].indexOf(t)>=0))if(t.constructor===Array)switch(a){case"indices":for(let a=0;a{n.push(`${i}[]=${e}`)}));break;case"repeat":t.forEach((e=>{n.push(`${i}=${e}`)}));break;case"comma":let e="";t.forEach((t=>{e+=(e?",":"")+t})),n.push(`${i}=${e}`)}else n.push(`${i}=${t}`)}return n.length?o+n.join("&"):""},toast:function(e,t=2e3){uni.showToast({title:String(e),icon:"none",duration:t})},type2icon:function(e="success",t=!1){-1==["primary","info","error","warning","success"].indexOf(e)&&(e="success");let a="";switch(e){case"primary":case"info":a="info-circle";break;case"error":a="close-circle";break;case"warning":a="error-circle";break;default:a="checkmark-circle"}return t&&(a+="-fill"),a},priceFormat:function(e,t=0,a=".",o=","){e=`${e}`.replace(/[^0-9+-Ee.]/g,"");const n=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,r=void 0===o?",":o,l=void 0===a?".":a;let s="";s=(i?function(e,t){const a=Math.pow(10,t);let o=qs(Math.round(Math.abs(Os(e,a))),a);return e<0&&0!==o&&(o=Os(o,-1)),o}(n,i)+"":`${Math.round(n)}`).split(".");const c=/(-?\d+)(\d{3})/;for(;c.test(s[0]);)s[0]=s[0].replace(c,`$1${r}$2`);return(s[1]||"").length30?`${e}ms`:`${e}s`:/ms$/.test(e)?a:/s$/.test(e)?a>30?a:1e3*a:a},padZero:function(e){return`00${e}`.slice(-2)},formValidate:function(e,t){const a=uni.$u.$parent.call(e,"u-form-item"),o=uni.$u.$parent.call(e,"u-form");a&&o&&o.validateField(a.prop,(()=>{}),t)},getProperty:function(e,t){if(e){if("string"!=typeof t||""===t)return"";if(-1!==t.indexOf(".")){const a=t.split(".");let o=e[a[0]]||{};for(let e=1;e1;){const n=t[0];e[n]&&"object"==typeof e[n]||(e[n]={}),t.shift(),o(e[n],t,a)}else e[t[0]]=a};if("string"!=typeof t||""===t);else if(-1!==t.indexOf(".")){const n=t.split(".");o(e,n,a)}else e[t]=a},page:function(){const e=getCurrentPages();return`/${e[e.length-1].route||""}`},pages:function(){return getCurrentPages()},setConfig:function({props:e={},config:t={},color:a={},zIndex:o={}}){const{deepMerge:n}=uni.$u;uni.$u.config=n(uni.$u.config,t),uni.$u.props=n(uni.$u.props,e),uni.$u.color=n(uni.$u.color,a),uni.$u.zIndex=n(uni.$u.zIndex,o)}};let Ms="none";Ms="vue3",Ms="plus";const Rs={route:_s,date:js.timeFormat,colorGradient:xs.colorGradient,hexToRgb:xs.hexToRgb,rgbToHex:xs.rgbToHex,colorToRgba:xs.colorToRgba,test:Ss,type:["primary","success","error","warning","info"],http:new class{constructor(e={}){var t;t=e,"[object Object]"!==Object.prototype.toString.call(t)&&(e={},a("warn","at node_modules/uview-plus/libs/luch-request/core/Request.js:39","设置全局参数必须接收一个Object")),this.config=ws({...bs,...e}),this.interceptors={request:new vs,response:new vs}}setConfig(e){this.config=e(this.config)}middleware(e){e=((e,t={})=>{const a=t.method||e.method||"GET";let o={baseURL:e.baseURL||"",method:a,url:t.url||"",params:t.params||{},custom:{...e.custom||{},...t.custom||{}},header:us(e.header||{},t.header||{})};if(o={...o,...ys(["getTask","validateStatus"],e,t)},"DOWNLOAD"===a)ms(t.timeout)?ms(e.timeout)||(o.timeout=e.timeout):o.timeout=t.timeout;else if("UPLOAD"===a)delete o.header["content-type"],delete o.header["Content-Type"],["files","filePath","name","timeout","formData"].forEach((e=>{ms(t[e])||(o[e]=t[e])})),ms(o.timeout)&&!ms(e.timeout)&&(o.timeout=e.timeout);else{const a=["data","timeout","dataType","responseType","sslVerify","firstIpv4"];o={...o,...ys(a,e,t)}}return o})(this.config,e);const t=[gs,void 0];let a=Promise.resolve(e);for(this.interceptors.request.forEach((e=>{t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((e=>{t.push(e.fulfilled,e.rejected)}));t.length;)a=a.then(t.shift(),t.shift());return a}request(e={}){return this.middleware(e)}get(e,t={}){return this.middleware({url:e,method:"GET",...t})}post(e,t,a={}){return this.middleware({url:e,data:t,method:"POST",...a})}put(e,t,a={}){return this.middleware({url:e,data:t,method:"PUT",...a})}delete(e,t,a={}){return this.middleware({url:e,data:t,method:"DELETE",...a})}options(e,t,a={}){return this.middleware({url:e,data:t,method:"OPTIONS",...a})}upload(e,t={}){return t.url=e,t.method="UPLOAD",this.middleware(t)}download(e,t={}){return t.url=e,t.method="DOWNLOAD",this.middleware(t)}},config:u,zIndex:{toast:10090,noNetwork:10080,popup:10075,mask:10070,navbar:980,topTips:975,sticky:970,indexListSticky:965},debounce:function(e,t=500,a=!1){if(null!==As&&clearTimeout(As),a){const a=!As;As=setTimeout((()=>{As=null}),t),a&&"function"==typeof e&&e()}else As=setTimeout((()=>{"function"==typeof e&&e()}),t)},throttle:function(e,t=500,a=!0){a?Ds||(Ds=!0,"function"==typeof e&&e(),setTimeout((()=>{Ds=!1}),t)):Ds||(Ds=!0,setTimeout((()=>{Ds=!1,"function"==typeof e&&e()}),t))},mixin:k,mpMixin:V,props:w,...js,color:b,platform:"plus"};uni.$u=Rs;const Hs={install:e=>{e.config.globalProperties.$u=Rs,e.config.globalProperties.$nextTick=e=>{e()},e.mixin(k)}};const{app:Qs,Vuex:Ws,Pinia:Js}=function(){const t=e.createVueApp(ls);return t.use(Hs),t.use(wn),{app:t}}();uni.Vuex=Ws,uni.Pinia=Js,Qs.provide("__globalStyles",__uniConfig.styles),Qs._component.mpType="app",Qs._component.render=()=>{},Qs.mount("#app")}(Vue,uni.VueShared); + */var Wo="store";function Jo(e,t){Object.keys(e).forEach((function(a){return t(e[a],a)}))}function Ko(e,t,a){return t.indexOf(e)<0&&(a&&a.prepend?t.unshift(e):t.push(e)),function(){var a=t.indexOf(e);a>-1&&t.splice(a,1)}}function Go(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var a=e.state;Xo(e,a,[],e._modules.root,!0),Yo(e,a,t)}function Yo(t,a,o){var n=t._state,i=t._scope;t.getters={},t._makeLocalGettersCache=Object.create(null);var r=t._wrappedGetters,l={},s={},c=e.effectScope(!0);c.run((function(){Jo(r,(function(a,o){l[o]=function(e,t){return function(){return e(t)}}(a,t),s[o]=e.computed((function(){return l[o]()})),Object.defineProperty(t.getters,o,{get:function(){return s[o].value},enumerable:!0})}))})),t._state=e.reactive({data:a}),t._scope=c,t.strict&&function(t){e.watch((function(){return t._state.data}),(function(){}),{deep:!0,flush:"sync"})}(t),n&&o&&t._withCommit((function(){n.data=null})),i&&i.stop()}function Xo(e,t,a,o,n){var i=!a.length,r=e._modules.getNamespace(a);if(o.namespaced&&(e._modulesNamespaceMap[r],e._modulesNamespaceMap[r]=o),!i&&!n){var l=en(t,a.slice(0,-1)),s=a[a.length-1];e._withCommit((function(){l[s]=o.state}))}var c=o.context=function(e,t,a){var o=""===t,n={dispatch:o?e.dispatch:function(a,o,n){var i=tn(a,o,n),r=i.payload,l=i.options,s=i.type;return l&&l.root||(s=t+s),e.dispatch(s,r)},commit:o?e.commit:function(a,o,n){var i=tn(a,o,n),r=i.payload,l=i.options,s=i.type;l&&l.root||(s=t+s),e.commit(s,r,l)}};return Object.defineProperties(n,{getters:{get:o?function(){return e.getters}:function(){return Zo(e,t)}},state:{get:function(){return en(e.state,a)}}}),n}(e,r,a);o.forEachMutation((function(t,a){!function(e,t,a,o){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){a.call(e,o.state,t)}))}(e,r+a,t,c)})),o.forEachAction((function(t,a){var o=t.root?a:r+a,n=t.handler||t;!function(e,t,a,o){(e._actions[t]||(e._actions[t]=[])).push((function(t){var n,i=a.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return(n=i)&&"function"==typeof n.then||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}(e,o,n,c)})),o.forEachGetter((function(t,a){!function(e,t,a,o){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return a(o.state,o.getters,e.state,e.getters)}}(e,r+a,t,c)})),o.forEachChild((function(o,i){Xo(e,t,a.concat(i),o,n)}))}function Zo(e,t){if(!e._makeLocalGettersCache[t]){var a={},o=t.length;Object.keys(e.getters).forEach((function(n){if(n.slice(0,o)===t){var i=n.slice(o);Object.defineProperty(a,i,{get:function(){return e.getters[n]},enumerable:!0})}})),e._makeLocalGettersCache[t]=a}return e._makeLocalGettersCache[t]}function en(e,t){return t.reduce((function(e,t){return e[t]}),e)}function tn(e,t,a){var o;return null!==(o=e)&&"object"==typeof o&&e.type&&(a=t,t=e,e=e.type),{type:e,payload:t,options:a}}var an="vuex:mutations",on="vuex:actions",nn="vuex",rn=0;function ln(e,t){Qo({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(a){a.addTimelineLayer({id:an,label:"Vuex Mutations",color:sn}),a.addTimelineLayer({id:on,label:"Vuex Actions",color:sn}),a.addInspector({id:nn,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),a.on.getInspectorTree((function(a){if(a.app===e&&a.inspectorId===nn)if(a.filter){var o=[];mn(o,t._modules.root,a.filter,""),a.rootNodes=o}else a.rootNodes=[un(t._modules.root,"")]})),a.on.getInspectorState((function(a){if(a.app===e&&a.inspectorId===nn){var o=a.nodeId;Zo(t,o),a.state=function(e,t,a){t="root"===a?t:t[a];var o=Object.keys(t),n={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var i=function(e){var t={};return Object.keys(e).forEach((function(a){var o=a.split("/");if(o.length>1){var n=t,i=o.pop();o.forEach((function(e){n[e]||(n[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),n=n[e]._custom.value})),n[i]=pn((function(){return e[a]}))}else t[a]=pn((function(){return e[a]}))})),t}(t);n.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?dn(e):e,editable:!1,value:pn((function(){return i[e]}))}}))}return n}((n=t._modules,(r=(i=o).split("/").filter((function(e){return e}))).reduce((function(e,t,a){var o=e[t];if(!o)throw new Error('Missing module "'+t+'" for path "'+i+'".');return a===r.length-1?o:o._children}),"root"===i?n:n.root._children)),"root"===o?t.getters:t._makeLocalGettersCache,o)}var n,i,r})),a.on.editInspectorState((function(a){if(a.app===e&&a.inspectorId===nn){var o=a.nodeId,n=a.path;"root"!==o&&(n=o.split("/").filter(Boolean).concat(n)),t._withCommit((function(){a.set(t._state.data,n,a.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,a.notifyComponentUpdate(),a.sendInspectorTree(nn),a.sendInspectorState(nn),a.addTimelineEvent({layerId:an,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=rn++,e._time=Date.now(),o.state=t,a.addTimelineEvent({layerId:on,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},n=Date.now()-e._time;o.duration={_custom:{type:"duration",display:n+"ms",tooltip:"Action duration",value:n}},e.payload&&(o.payload=e.payload),o.state=t,a.addTimelineEvent({layerId:on,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var sn=8702998,cn={label:"namespaced",textColor:16777215,backgroundColor:6710886};function dn(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function un(e,t){return{id:t||"root",label:dn(t),tags:e.namespaced?[cn]:[],children:Object.keys(e._children).map((function(a){return un(e._children[a],t+a+"/")}))}}function mn(e,t,a,o){o.includes(a)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[cn]:[]}),Object.keys(t._children).forEach((function(n){mn(e,t._children[n],a,o+n+"/")}))}function pn(e){try{return e()}catch(it){return it}}var hn=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var a=e.state;this.state=("function"==typeof a?a():a)||{}},fn={namespaced:{configurable:!0}};fn.namespaced.get=function(){return!!this._rawModule.namespaced},hn.prototype.addChild=function(e,t){this._children[e]=t},hn.prototype.removeChild=function(e){delete this._children[e]},hn.prototype.getChild=function(e){return this._children[e]},hn.prototype.hasChild=function(e){return e in this._children},hn.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},hn.prototype.forEachChild=function(e){Jo(this._children,e)},hn.prototype.forEachGetter=function(e){this._rawModule.getters&&Jo(this._rawModule.getters,e)},hn.prototype.forEachAction=function(e){this._rawModule.actions&&Jo(this._rawModule.actions,e)},hn.prototype.forEachMutation=function(e){this._rawModule.mutations&&Jo(this._rawModule.mutations,e)},Object.defineProperties(hn.prototype,fn);var gn=function(e){this.register([],e,!1)};function vn(e,t,a){if(t.update(a),a.modules)for(var o in a.modules){if(!t.getChild(o))return;vn(e.concat(o),t.getChild(o),a.modules[o])}}gn.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},gn.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,a){return e+((t=t.getChild(a)).namespaced?a+"/":"")}),"")},gn.prototype.update=function(e){vn([],this.root,e)},gn.prototype.register=function(e,t,a){var o=this;void 0===a&&(a=!0);var n=new hn(t,a);0===e.length?this.root=n:this.get(e.slice(0,-1)).addChild(e[e.length-1],n);t.modules&&Jo(t.modules,(function(t,n){o.register(e.concat(n),t,a)}))},gn.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),a=e[e.length-1],o=t.getChild(a);o&&o.runtime&&t.removeChild(a)},gn.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),a=e[e.length-1];return!!t&&t.hasChild(a)};var yn=function(e){var t=this;void 0===e&&(e={});var a=e.plugins;void 0===a&&(a=[]);var o=e.strict;void 0===o&&(o=!1);var n=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new gn(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=n;var i=this,r=this.dispatch,l=this.commit;this.dispatch=function(e,t){return r.call(i,e,t)},this.commit=function(e,t,a){return l.call(i,e,t,a)},this.strict=o;var s=this._modules.root.state;Xo(this,s,[],this._modules.root),Yo(this,s),a.forEach((function(e){return e(t)}))},bn={state:{configurable:!0}};yn.prototype.install=function(e,t){e.provide(t||Wo,this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&ln(e,this)},bn.state.get=function(){return this._state.data},bn.state.set=function(e){},yn.prototype.commit=function(e,t,a){var o=this,n=tn(e,t,a),i=n.type,r=n.payload,l={type:i,payload:r},s=this._mutations[i];s&&(this._withCommit((function(){s.forEach((function(e){e(r)}))})),this._subscribers.slice().forEach((function(e){return e(l,o.state)})))},yn.prototype.dispatch=function(e,t){var a=this,o=tn(e,t),n=o.type,i=o.payload,r={type:n,payload:i},l=this._actions[n];if(l){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(r,a.state)}))}catch(it){}var s=l.length>1?Promise.all(l.map((function(e){return e(i)}))):l[0](i);return new Promise((function(e,t){s.then((function(t){try{a._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(r,a.state)}))}catch(it){}e(t)}),(function(e){try{a._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(r,a.state,e)}))}catch(it){}t(e)}))}))}},yn.prototype.subscribe=function(e,t){return Ko(e,this._subscribers,t)},yn.prototype.subscribeAction=function(e,t){return Ko("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},yn.prototype.watch=function(t,a,o){var n=this;return e.watch((function(){return t(n.state,n.getters)}),a,Object.assign({},o))},yn.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},yn.prototype.registerModule=function(e,t,a){void 0===a&&(a={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),Xo(this,this.state,e,this._modules.get(e),a.preserveState),Yo(this,this.state)},yn.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete en(t.state,e.slice(0,-1))[e[e.length-1]]})),Go(this)},yn.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},yn.prototype.hotUpdate=function(e){this._modules.update(e),Go(this,!0)},yn.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(yn.prototype,bn);const wn=(_n={state:{userInfo:uni.getStorageSync("SY_USER")||null,farm:JSON.parse(uni.getStorageSync("farm")||"{}"),house:JSON.parse(uni.getStorageSync("house")||"{}"),tabbrIndex:0},mutations:{saveUserInfo(e,t){e.userInfo=t,uni.setStorageSync("SY_USER",t)},setFarm(e,t){e.farm=t,uni.setStorageSync("farm",JSON.stringify(t))},setHouse(e,t){e.house=t,uni.setStorageSync("house",JSON.stringify(t))},changeTabbar(e,t){e.tabbrIndex=+t}},actions:{saveUserInfo({commit:e},t){e("saveUserInfo",t)},setFarm({commit:e},t){e("setFarm",t)},setHouse({commit:e},t){e("setHouse",t)},changeTabbar({commit:e},t){e("changeTabbar",t)}}},new yn(_n));var _n;const Vn={__name:"tabbar",setup(t){const a=e.ref(wn.state.tabbrIndex),n=e=>{wn.dispatch("changeTabbar",e),0==e&&uni.switchTab({url:"/pages/index/massif"}),1==e&&uni.switchTab({url:"/pages/index/manager"}),2==e&&uni.switchTab({url:"/pages/index/personal"})};return(t,i)=>{const r=o(e.resolveDynamicComponent("u-tabbar-item"),Lo),l=o(e.resolveDynamicComponent("u-tabbar"),jo);return e.openBlock(),e.createBlock(l,{value:a.value,fixed:!0,placeholder:!1,safeAreaInsetBottom:!0},{default:e.withCtx((()=>[e.createVNode(r,{onClick:n},{"active-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/sydj.png",style:{width:"60rpx",height:"60rpx"}})])),"inactive-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/sy.png",style:{width:"60rpx",height:"60rpx"}})])),_:1}),e.createVNode(r,{onClick:n},{"active-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/dkdj.png",style:{width:"60rpx",height:"60rpx"}})])),"inactive-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/dk.png",style:{width:"60rpx",height:"60rpx"}})])),_:1}),e.createVNode(r,{onClick:n},{"active-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/wddj.png",style:{width:"60rpx",height:"60rpx"}})])),"inactive-icon":e.withCtx((()=>[e.createElementVNode("image",{class:"u-page__item__slot-icon",src:"/static/main/index/wd.png",style:{width:"60rpx",height:"60rpx"}})])),_:1})])),_:1},8,["value"])}}};const kn=x({name:"uniTransition",props:{show:{type:Boolean,default:!1},modeClass:{type:Array,default:()=>[]},duration:{type:Number,default:300},styles:{type:Object,default:()=>({})}},data:()=>({isShow:!1,transform:"",ani:{in:"",active:""}}),watch:{show:{handler(e){e?this.open():this.close()},immediate:!0}},computed:{stylesObject(){let e={...this.styles,"transition-duration":this.duration/1e3+"s"},t="";for(let a in e){t+=this.toLine(a)+":"+e[a]+";"}return t}},created(){},methods:{change(){this.$emit("click",{detail:this.isShow})},open(){this.isShow=!0,this.transform="",this.ani.in="";for(let e in this.getTranfrom(!1))"opacity"===e?this.ani.in="fade-in":this.transform+=`${this.getTranfrom(!1)[e]} `;this.$nextTick((()=>{setTimeout((()=>{this._animation(!0)}),50)}))},close(e){this._animation(!1)},_animation(e){let t=this.getTranfrom(e);this.transform="";for(let a in t)"opacity"===a?this.ani.in="fade-"+(e?"out":"in"):this.transform+=`${t[a]} `;clearTimeout(this.timer),this.timer=setTimeout((()=>{e||(this.isShow=!1),this.$emit("change",{detail:this.isShow})}),this.duration)},getTranfrom(e){let t={transform:""};return this.modeClass.forEach((a=>{switch(a){case"fade":t.opacity=e?1:0;break;case"slide-top":t.transform+=`translateY(${e?"0":"-100%"}) `;break;case"slide-right":t.transform+=`translateX(${e?"0":"100%"}) `;break;case"slide-bottom":t.transform+=`translateY(${e?"0":"100%"}) `;break;case"slide-left":t.transform+=`translateX(${e?"0":"-100%"}) `;break;case"zoom-in":t.transform+=`scale(${e?1:.8}) `;break;case"zoom-out":t.transform+=`scale(${e?1:1.2}) `}})),t},_modeClassArr(e){let t=this.modeClass;if("string"!=typeof t){let a="";return t.forEach((t=>{a+=t+"-"+e+","})),a.substr(0,a.length-1)}return t+"-"+e},toLine:e=>e.replace(/([A-Z])/g,"-$1").toLowerCase()}},[["render",function(t,a,o,n,i,r){return i.isShow?(e.openBlock(),e.createElementBlock("view",{key:0,ref:"ani",class:e.normalizeClass(["uni-transition",[i.ani.in]]),style:e.normalizeStyle("transform:"+i.transform+";"+r.stylesObject),onClick:a[0]||(a[0]=(...e)=>r.change&&r.change(...e))},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6)):e.createCommentVNode("",!0)}],["__scopeId","data-v-f427c8e9"]]),xn={name:"UniPopup",components:{uniTransition:kn},props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},maskClick:{type:Boolean,default:!0}},data:()=>({duration:300,ani:[],showPopup:!1,showTrans:!1,maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{position:"fixed",left:0,right:0}}),watch:{type:{handler:function(e){switch(this.type){case"top":this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0};break;case"bottom":this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0};break;case"center":this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center"}}},immediate:!0}},created(){this.animation?this.duration=300:this.duration=0},methods:{clear(e){e.stopPropagation()},open(){this.showPopup=!0,this.$nextTick((()=>{clearTimeout(this.timer),this.timer=setTimeout((()=>{this.showTrans=!0}),50)})),this.$emit("change",{show:!0})},close(e){this.showTrans=!1,this.$nextTick((()=>{clearTimeout(this.timer),this.timer=setTimeout((()=>{this.$emit("change",{show:!1}),this.showPopup=!1}),300)}))},onTap(){this.maskClick&&this.close()}}};const Nn=x(xn,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("uni-transition"),kn);return r.showPopup?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-popup",onTouchmove:a[1]||(a[1]=e.withModifiers(((...e)=>l.clear&&l.clear(...e)),["stop","prevent"]))},[e.createVNode(s,{"mode-class":["fade"],styles:r.maskClass,duration:r.duration,show:r.showTrans,onClick:l.onTap},null,8,["styles","duration","show","onClick"]),e.createVNode(s,{"mode-class":r.ani,styles:r.transClass,duration:r.duration,show:r.showTrans,onClick:l.onTap},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"uni-popup__wrapper-box",onClick:a[0]||(a[0]=e.withModifiers(((...e)=>l.clear&&l.clear(...e)),["stop"]))},[e.renderSlot(t.$slots,"default",{},void 0,!0)])])),_:3},8,["mode-class","styles","duration","show","onClick"])],32)):e.createCommentVNode("",!0)}],["__scopeId","data-v-a8219944"]]);const Cn=x({props:{shareurl:{type:String,default:""}},components:{uniPopup:Nn},data:()=>({bottomData:[{text:"刷新",icon:"/static/img/miniProgram.png",name:"miniProgram"}]}),mounted(){},methods:{open(){this.$nextTick((()=>{this.$refs.showshare.open()}))},change(e){},shareItems(e){switch(e){case"miniProgram":uni.reLaunch({url:this.shareurl,success:e=>{this.$nextTick((()=>{this.$refs.showshare.close}))},fail:e=>{a("log","at components/own-share/own-share.vue:70",e)}});break;case"more":plus.share.sendWithSystem({type:"web",title:shareOPtions.shareTitle,thumbs:[shareOPtions.shareImage],href:shareOPtions.shareHref,content:shareOPtions.summary})}},cancel(){this.$refs.showshare.close()}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("uni-popup"),Nn);return e.openBlock(),e.createBlock(s,{ref:"showshare",type:"bottom",onChange:l.change},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"uni-share"},[e.createElementVNode("view",{class:"uni-share-content"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.bottomData,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,onClick:e=>l.shareItems(t.name),class:"uni-share-content-box"},[e.createElementVNode("view",{class:"uni-share-content-image"},[e.createElementVNode("image",{src:t.icon,class:"content-image",mode:"widthFix"},null,8,["src"])]),e.createElementVNode("text",{class:"uni-share-content-text"},e.toDisplayString(t.text),1)],8,["onClick"])))),128))]),e.createElementVNode("text",{class:"uni-share-btn",onClick:a[0]||(a[0]=e=>l.cancel("share"))},"取消")])])),_:1},8,["onChange"])}],["__scopeId","data-v-ed2d7766"]]);const En=x({name:"retuntop",comments:{ownShare:Cn},props:{isshow:{type:Boolean},name:{type:String},url:{type:String}},data:()=>({}),mounted(){},methods:{close(){this.$nextTick((()=>{this.$refs.share.open()}))},returnbom(){uni.sendHostEvent("closeApp",(e=>{}))}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("own-share"),Cn);return e.openBlock(),e.createElementBlock("view",{class:""},[e.createElementVNode("view",{class:"contentgb"},[n.isshow?(e.openBlock(),e.createElementBlock("view",{key:0,class:"iconfont icon-xiangzuo",style:{"margin-top":"10rpx",color:"#fff","margin-left":"30rpx"},onClick:a[0]||(a[0]=(...e)=>l.close&&l.close(...e))})):e.createCommentVNode("",!0),n.isshow?(e.openBlock(),e.createElementBlock("view",{key:1,class:"name"},e.toDisplayString(n.name),1)):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"return_top"},[e.createElementVNode("view",{class:"z-bootm-img1",onClick:a[1]||(a[1]=e=>l.close())},[e.createElementVNode("image",{src:"/static/img/fb1.png",mode:"aspectFit"})]),e.createElementVNode("view",{class:"z-bootm-l"}),e.createElementVNode("view",{class:"z-bootm-img2",onClick:a[2]||(a[2]=e=>l.returnbom())},[e.createElementVNode("image",{src:"/static/img/fb2.png",mode:"aspectFit"})])])]),e.createVNode(s,{ref:"share",shareurl:n.url},null,8,["shareurl"]),e.createElementVNode("strong")])}],["__scopeId","data-v-c790fda6"]]);let Bn;Bn="https://ceshi-suyuan-breed.lihaink.cn/";let Sn="https://ceshi-suyuan-breed.lihaink.cn/",Dn={"content-type":"application/json","Form-type":"app",TOKEN:""};const An={};["options","get","post","put","head","delete","trace","connect"].forEach((e=>{An[e]=(t,o,n)=>function(e,t,o,{noAuth:n=!1,noVerify:i=!1,onReLogin:r=!1}){let l=Sn,s=Dn;return wn.state.userInfo&&(s.TOKEN=wn.state.userInfo.token),new Promise(((n,r)=>{uni.request({url:l+"api"+e,method:t||"GET",header:{...s},data:"GET"!=t&&o||{},params:"GET"==t?o:{},success:e=>{e.data.show&&uni.showToast({title:e.data.msg||"操作成功",icon:"success"}),i?n(e.data):-1==e.data.code?"登录超时,请重新登录"==e.data.msg&&(uni.showToast({title:e.data.msg,icon:"none"}),uni.reLaunch({url:"/pages/Login/login"})):0==e.data.code?("用户信息不存在"!=e.data.msg&&uni.showToast({title:e.data.msg||"请检查网络",icon:"none"}),n(e.data)):1==e.data.code?n(e.data):200==e.data.code?n(e.data.data):-1!==[41e4,410001,410002,4e4].indexOf(e.data.code)||501==e.data.code?r(e.data):(uni.showToast({title:e.data.msg||"请检查网络",icon:"none"}),r(e.data.msg||"请检查网络"))},fail:e=>{a("log","at utils/syhttp.js:79",e,"错误"),uni.showToast({title:"网络错误",icon:"none"}),r("请求失败")}})}))}(t,e,o,n||{})}));const In={};["options","get","post","put","head","delete","trace","connect"].forEach((e=>{In[e]=(t,o,n)=>function(e,t,o,{noAuth:n=!1,noVerify:i=!1,onReLogin:r=!1}){let l=Sn,s=Dn;return wn.state.userInfo&&(s.TOKEN=wn.state.userInfo.token),new Promise(((n,r)=>{uni.request({url:l+e,method:t||"GET",header:{...s},data:"GET"!=t&&o||{},params:"GET"==t?o:{},success:e=>{e.data.show&&uni.showToast({title:e.data.msg||"操作成功",icon:"success"}),i?n(e.data):-1==e.data.code?"登录超时,请重新登录"==e.data.msg&&uni.reLaunch({url:"/pages/Login/login"}):0==e.data.code?("用户信息不存在"!=e.data.msg&&uni.showToast({title:e.data.msg||"请检查网络",icon:"none"}),n(e.data)):1==e.data.code?n(e.data):200==e.data.code?n(e.data.data):-1!==[41e4,410001,410002,4e4].indexOf(e.data.code)||501==e.data.code?r(e.data):(uni.showToast({title:e.data.msg||"请检查网络",icon:"none"}),r(e.data.msg||"请检查网络"))},fail:e=>{a("log","at utils/http.js:82",e,"错误"),uni.showToast({title:"网络错误",icon:"none"}),r("请求失败")}})}))}(t,e,o,n||{})}));const Tn=e=>An.get("/land/detail",e),Pn=e=>An.get("/plant/detail",e),Fn=e=>An.post("/action/add",e),Un=e=>In.get("/common/geo/province",e),On=e=>In.get("/common/geo/city",e),qn=e=>In.get("/common/geo/county",e),$n=e=>In.get("/common/geo/towns",e),Ln=e=>In.get("/common/geo/villages",e),zn=e=>In.get("/common/geo/groups",e),jn=e=>An.post("/farm/add",e),Mn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"farm_type"}),Rn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"breed_type"}),Hn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"animal_type"}),Qn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"feeding_type"}),Wn=()=>An.get("/common/dict_data_lists_by_type_value",{type_value:"leave_fence_house_type"}),Jn={__name:"massif",setup(t){const n=e.ref(!1),l=e.ref(!1),s=e.ref(!1),c=e.reactive([]),d=e.reactive([]),u=(e,t)=>{try{return(e-t).toFixed(2)}catch(it){return"0.00"}},m=e.ref({});r((()=>{uni.hideTabBar(),wn.state.userInfo?m.value=wn.state.userInfo:uni.redirectTo({url:"/pages/Login/login"})}));const p=e.ref({}),h=e.ref(""),f=e.ref(""),g=e.ref(""),v=()=>{z(),s.value=!1},y=()=>{uni.scanCode({success:function(e){a("log","at pages/index/massif.vue:307","条码内容:"+e.result.split("d_")[1]),uni.navigateTo({url:"/pages/landDetail/results?sn="+e.result.split("d_")[1]})}})},b=()=>{let e=uni.getSystemInfoSync().platform;uni.navigateTo({url:`/pages/live/${"ios"==e?"liveIos":"live"}?url=${w.value}`})},w=e.ref(),_=e.ref(""),V=e.ref(!1),k=e.ref(!1),x=e.reactive([]),N=e.reactive([]),E=e.ref({});i((()=>{S(),U()}));const B=e=>`/static/main/index/${e}.png`,S=()=>{var e;An.get("/land/product",e).then((e=>{1==e.code&&d.splice(0,d.length,...e.data.map(((e,t)=>({text:e.name,value:e.product_id}))))}))},D=()=>{s.value=!1,g.value=""},I=e.ref([]),T=e.ref([]),P=e.ref([]),U=()=>{var e;Rn().then((e=>{P.value=e.data})),An.get("/farm/list",e).then((e=>{I.value=e.data,x.splice(0,x.length,...e.data.map(((e,t)=>({name:e.farm_name,id:e.id})))),e.data.length>0?p.value=e.data[0]:p.value={},wn.commit("setFarm",p.value)})).catch((e=>{a("log","at pages/index/massif.vue:403",e)})),(e=>An.get("/fence_house/datas",e))().then((e=>{T.value=e.data,N.splice(0,N.length,...e.data.map(((e,t)=>({name:e.fence_house_name,id:e.id})))),E.value.id||(e.data.length>0?E.value=e.data[0]:E.value={},wn.commit("setHouse",E.value),L())})).catch((e=>{a("log","at pages/index/massif.vue:419",e)}))},O=e.computed((()=>{var e;return(null==(e=P.value.find((e=>e.value==p.value.farm_type)))?void 0:e.name)||""})),q=e.ref({}),$=e.ref({}),L=()=>{var e;(e={fence_house_id:E.value.id},An.get("/index/index",e)).then((e=>{var t,a;w.value=e.data.video_url,q.value=(null==(t=e.data.monitor)?void 0:t.datas)||{},$.value=(null==(a=e.data.monitor)?void 0:a.threshold)||{}}))},z=()=>{var e;g.value?(e={land_id:p.id,product_id:g.value},An.post("/land/bind",e)).then((e=>{1==e.code&&(uni.$u.toast(e.msg),g.value=""),a("log","at pages/index/massif.vue:455",e)})):uni.$u.toast("请选择产品编号")},j=e=>{f.value=e.value[0].id,l.value=!1,2==e.value[0].status?uni.$u.toast("该土地已经收获,不能进行操作"):n.value=!0},M=e=>{h.value=e.id,E.value=T.value.find((t=>t.id==e.id)),wn.commit("setHouse",E.value),V.value=!1,k.value=!0,L(),setTimeout((()=>{k.value=!1}),1e3)},R=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)};R();const H=e=>`/static/main/index/${e}.png`,W=()=>{uni.navigateTo({url:"/pages/plant/plant",success:e=>{e.eventChannel.emit("setDatasItem",p.value)}})};return(t,a)=>{const n=o(e.resolveDynamicComponent("u--image"),A),i=o(e.resolveDynamicComponent("u-icon"),C),r=o(e.resolveDynamicComponent("u-loading-page"),F),m=o(e.resolveDynamicComponent("u-action-sheet"),G),h=o(e.resolveDynamicComponent("uni-data-select"),Io),f=o(e.resolveDynamicComponent("u-popup"),Q),E=o(e.resolveDynamicComponent("u-picker"),Oo);return e.openBlock(),e.createElementBlock("view",{class:"",style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con",style:{"justify-content":"space-between"}},[x.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{"padding-left":"20rpx",display:"flex",color:"white"},onClick:a[0]||(a[0]=e=>V.value=!0)},[e.createVNode(n,{src:H("qhtd"),width:"38.55rpx",height:"38.55rpx",style:{"margin-right":"20rpx"}},null,8,["src"])])):(e.openBlock(),e.createElementBlock("view",{key:1})),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createElementVNode("view",{class:"nav"},[e.createElementVNode("view",{class:"",style:{"margin-right":"20rpx"}},[e.createVNode(n,{src:H("sys"),width:"38.55rpx",onClick:y,height:"38.55rpx"},null,8,["src"])]),e.createElementVNode("view",{class:"",style:{"margin-left":"20rpx"}},[e.createVNode(n,{src:H("sbbd"),width:"38.55rpx",onClick:a[1]||(a[1]=e=>s.value=!0),height:"38.55rpx"},null,8,["src"])]),e.createElementVNode("view",{class:"",style:{"margin-left":"20rpx"}})]),e.createElementVNode("view",{class:"",style:{"margin-top":"-5rpx"}},[e.createVNode(En,{url:"/pages/index/massif"})])])])]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"})]),(e.openBlock(),e.createElementBlock("view",{key:0,class:"content"},[e.createElementVNode("view",{class:""},[x.length<=0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"empty-land"},[e.createElementVNode("text",null,"没有养殖基地信息?"),e.createElementVNode("text",{onClick:a[2]||(a[2]=e=>{return t="/pages/addPlant/addPlant",void uni.navigateTo({url:t});var t})},"去新增》")])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"land-info",onClick:W},[e.createElementVNode("view",{class:"land-area"},[e.createElementVNode("view",{class:"land-title"},"养殖基地规模"),e.createElementVNode("view",{class:""},e.toDisplayString(p.value.form_scale||"--")+"亩 ",1)]),e.createElementVNode("view",{class:"plant-area"},[e.createElementVNode("view",{class:"land-title"},"养殖种类"),e.createElementVNode("view",{class:""},e.toDisplayString(e.unref(O)||"--"),1)])]),e.createElementVNode("view",{class:"live-tit",style:{color:"#1A1A1A"}},[e.createElementVNode("view",{class:"tit",style:{}}," 养殖基地监控数据 "),e.createElementVNode("view",{class:"",style:{"font-size":"24rpx",color:"#ACACAC",display:"flex","align-items":"center"}},[e.createVNode(i,{name:"clock",style:{"margin-right":"5rpx"}}),e.createTextVNode(" 刷新时间:"+e.toDisplayString(R()),1)])]),e.createElementVNode("view",{class:"live"},[w.value?(e.openBlock(),e.createBlock(n,{key:0,src:_.value,width:"100%",height:"450rpx"},null,8,["src"])):(e.openBlock(),e.createBlock(n,{key:1,src:H("K"),width:"100%"},null,8,["src"])),w.value?(e.openBlock(),e.createElementBlock("view",{key:2,class:"",style:{width:"100%",height:"450rpx","background-color":"rgba(0, 0, 0, .5)",position:"absolute",top:"1px"},onClick:b},[w.value?(e.openBlock(),e.createBlock(i,{key:0,name:"play-circle",size:"40",color:"white",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)"}})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit"}," 智能监测数据 "),e.createElementVNode("view",{class:"area-check"},[e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("huan_jing_wen_du")})`})},[e.createElementVNode("view",{class:""}," 空气温度 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.ambient_temperature>$.value.air_temp_max||q.value.ambient_temperature<$.value.air_temp_min}])},e.toDisplayString(q.value.ambient_temperature||0===q.value.ambient_temperature?q.value.ambient_temperature+"℃":"--"),3),q.value.ambient_temperature>$.value.air_temp_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.ambient_temperature,$.value.air_temp_max))+e.toDisplayString("℃"),1)):e.createCommentVNode("",!0),q.value.ambient_temperature<$.value.air_temp_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.air_temp_min,q.value.ambient_temperature))+e.toDisplayString("℃"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("huan_jing_shi_du")})`})},[e.createElementVNode("view",{class:""}," 空气湿度 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.ambient_humidity>$.value.air_mois_max||q.value.ambient_humidity<$.value.air_mois_min}])},e.toDisplayString(q.value.ambient_humidity||0===q.value.ambient_humidity?q.value.ambient_humidity+"%":"--"),3),q.value.ambient_humidity>$.value.air_mois_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.ambient_humidity,$.value.air_mois_max))+e.toDisplayString("%"),1)):e.createCommentVNode("",!0),q.value.ambient_humidity<$.value.air_mois_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.air_mois_min,q.value.ambient_humidity))+e.toDisplayString("%"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("dan_qi")})`})},[e.createElementVNode("view",{class:""}," 氮气 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.nitrogen>$.value.nitrogen_max||q.value.nitrogen<$.value.nitrogen_min}])},e.toDisplayString(q.value.nitrogen||0===q.value.nitrogen?q.value.nitrogen+"ppm":"--"),3),q.value.nitrogen>$.value.nitrogen_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.nitrogen,$.value.nitrogen_max))+e.toDisplayString("ppm"),1)):e.createCommentVNode("",!0),q.value.nitrogen<$.value.nitrogen_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.nitrogen_min,q.value.nitrogen))+e.toDisplayString("ppm"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("jia_wan")})`})},[e.createElementVNode("view",{class:""}," 甲烷 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.methane>$.value.methane_max||q.value.methane<$.value.methane_min}])},e.toDisplayString(q.value.methane||0===q.value.methane?q.value.methane+"ppm":"--"),3),q.value.methane>$.value.methane_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.methane,$.value.methane_max))+e.toDisplayString("ppm"),1)):e.createCommentVNode("",!0),q.value.methane<$.value.methane_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.methane_min,q.value.methane))+e.toDisplayString("ppm"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("zao_yin")})`})},[e.createElementVNode("view",{class:""}," 噪音 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.noise>$.value.noise_max||q.value.noise<$.value.noise_min}])},e.toDisplayString(q.value.noise||0===q.value.noise?q.value.noise+"db":"--"),3),q.value.noise>$.value.noise_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.noise,$.value.noise_max))+e.toDisplayString("db"),1)):e.createCommentVNode("",!0),q.value.noise<$.value.noise_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.noise_min,q.value.noise))+e.toDisplayString("db"),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("view",{class:"area-li",key:"index",style:e.normalizeStyle({backgroundImage:`url(${B("fang_huo")})`})},[e.createElementVNode("view",{class:""}," 防火 "),e.createElementVNode("view",{class:e.normalizeClass(["standard",{red:q.value.fireproof>$.value.fireproof_max||q.value.fireproof<$.value.fireproof_min}])},e.toDisplayString(q.value.fireproof||0===q.value.fireproof?q.value.fireproof:"--"),3),q.value.fireproof>$.value.fireproof_max?(e.openBlock(),e.createElementBlock("view",{key:0,class:"a-tips red"}," ↑ "+e.toDisplayString(u(q.value.fireproof,$.value.fireproof_max)),1)):e.createCommentVNode("",!0),q.value.fireproof<$.value.fireproof_min?(e.openBlock(),e.createElementBlock("view",{key:1,class:"a-tips blue"}," ↓ "+e.toDisplayString(u($.value.fireproof_min,q.value.fireproof)),1)):e.createCommentVNode("",!0)],4)])])]),e.createVNode(r,{loading:k.value},null,8,["loading"]),e.createVNode(m,{show:V.value,keyName:"name",closeOnClickOverlay:"",actions:N,title:"请选择",onClose:a[3]||(a[3]=e=>V.value=!1),onSelect:M},null,8,["show","actions"])])),e.createElementVNode("view",{class:"Modal"},[e.createVNode(f,{show:s.value,mode:"center",onClose:D,round:10},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"Modal"},[e.createElementVNode("text",null," 产品编号:"),e.createVNode(h,{modelValue:g.value,"onUpdate:modelValue":a[5]||(a[5]=e=>g.value=e),style:{width:"300rpx","margin-left":"30rpx"},localdata:d},null,8,["modelValue","localdata"])]),e.createElementVNode("view",{class:"Modal-btn"},[e.createElementVNode("view",{class:"Modal-btna",onClick:D}," 取消 "),e.createElementVNode("view",{class:"Modal-btnb",onClick:v}," 确定 ")])])),_:1},8,["show"])]),e.createVNode(E,{keyName:"name",show:l.value,onCancel:a[6]||(a[6]=e=>l.value=!1),onConfirm:j,columns:c},null,8,["show","columns"]),e.createVNode(Vn)])}}},Kn="/static/img/zw.png",Gn=x({__name:"landInfo",props:{info:Object,isDetail:Boolean},setup(t){const a=e.ref([]);Hn().then((e=>{a.value=e.data}));return(n,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-top":"10rpx"}},[e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center",height:"60rpx"}},[e.createVNode(r,{name:"map"}),e.createTextVNode(" "+e.toDisplayString(t.info.fence_house_name),1)]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dong_wu_ming_cheng.png')"}},[e.createTextVNode(" 动物名称 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.animal_name),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dong_wu_lei_xing.png')"}},[e.createTextVNode(" 动物类型 "),e.createElementVNode("view",{class:""},e.toDisplayString((l=t.info.animal_type,(null==(s=a.value.find((e=>e.value==l)))?void 0:s.name)||"")),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/lan_she_rong_liang.png')"}},[e.createTextVNode(" 栏舍容量 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.capacity),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/lan_she_fu_ze_ren.png')"}},[e.createTextVNode(" 栏舍负责人 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.master),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dian_hua.png')"}},[e.createTextVNode(" 负责人电话 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.master_phone),1)]),e.createElementVNode("view",{class:"info-li-d"})])]);var l,s}}},[["__scopeId","data-v-bc232b8c"]]),Yn=x({__name:"index",setup(t){e.reactive([{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"}]);const n=e.reactive([]);e.reactive([]);const l=e.reactive({}),s=e.ref("");e.reactive([[{label:"种植",route:"/pages/husbandryForm/sow"},{label:"施肥",route:"/pages/husbandryForm/fertilize"},{label:"除草",route:"/pages/husbandryForm/weeding"},{label:"灌溉",route:"/pages/husbandryForm/irrigate"},{label:"除虫",route:"/pages/husbandryForm/Pest"},{label:"收获",route:"/pages/husbandryForm/harvest"}]]),r((e=>{s.value=e.id})),i((()=>{d(),c()}));const c=()=>{Tn({land_id:s.value}).then((e=>{1==e.code&&Object.assign(l,e.data)}))},d=()=>{var e;(e={land_id:s.value},An.get("/plant/list",e)).then((e=>{1==e.code&&(n.splice(0,n.length,...e.data),n.forEach((e=>{e.showCode=!1})),a("log","at pages/landDetail/index.vue:220",n))}))},u=()=>{uni.navigateTo({url:"/pages/husbandryForm/sow?id="+s.value})},m=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)};return(t,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C),s=o(e.resolveDynamicComponent("u--image"),A);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between"}},[e.createElementVNode("view",{class:"tit"}," 苗情监测数据 "),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createVNode(r,{name:"clock",style:{"margin-right":"10rpx"}}),e.createElementVNode("text",{style:{color:"#ACACAC","font-size":"25rpx"}},"刷新时间: "+e.toDisplayString(m()),1)])]),e.createElementVNode("view",{class:"video",onClick:i[0]||(i[0]=e=>{return t="/pages/live/live",void uni.navigateTo({url:t});var t})},[e.createVNode(s,{src:t.url,width:"100%",height:"300rpx"},null,8,["src"])]),e.createVNode(Gn,{info:l},null,8,["info"]),e.createElementVNode("view",{class:"add-thing",onClick:u}," 新增种植 "),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit",style:{"font-size":"33.29rpx",margin:"20rpx 0"}}," 种植信息 "),n.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,((o,i)=>(e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:i},[e.createElementVNode("view",{class:"card_body"},[o.pic.length>0&&!o.showCode?(e.openBlock(),e.createElementBlock("view",{key:0,class:"left"},[e.createVNode(s,{onClick:e=>{return t=o.pic,void uni.previewImage({urls:t});var t},radius:"10",src:o.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"])])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"left"},[e.createVNode(s,{onClick:e=>{return t=o.qr_code,void uni.previewImage({urls:[t]});var t},radius:"10",src:o.qr_code,width:"200rpx",height:"200rpx"},null,8,["onClick","src"])])),e.createVNode(s,{src:"/static/main/index/xyj.png",class:"next",width:"38rpx",height:"38rpx"}),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>((e,t)=>{uni.navigateTo({url:"/pages/landDetail/tudi?data="+e.id})})(o,t.i)},[e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"种植种类:"),e.createTextVNode(" "+e.toDisplayString(o.kind),1)]),e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"种植面积:"),e.createTextVNode(" "+e.toDisplayString(o.area)+"亩 ",1)]),e.createElementVNode("view",{class:"te"},[e.createElementVNode("text",{style:{color:"black","white-space":"nowrap"}},"参与人:"),e.createTextVNode(" "+e.toDisplayString(o.user),1)]),e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"种植日期:"),e.createTextVNode(" "+e.toDisplayString(o.plant_date),1)]),e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between"}},[e.createElementVNode("view",{class:"te"},[e.createElementVNode("text",{style:{color:"black","white-space":"nowrap","margin-top":"10rpx"}},"备注:"),e.createTextVNode(" "+e.toDisplayString(o.remark),1)]),2==o.status?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createElementVNode("view",{class:e.normalizeClass(["code-btn",{actBtn:o.showCode}]),onClick:e.withModifiers((e=>{return n[t=i].showCode=!n[t].showCode,void a("log","at pages/landDetail/index.vue:278",n[t].showCode);var t}),["stop"])}," 溯源码",10,["onClick"])])):e.createCommentVNode("",!0)])],8,["onClick"])])])))),128))])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])])])}}},[["__scopeId","data-v-b2c1abd1"]]),Xn={__name:"tudi",setup(t){e.reactive([{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"},{id:1,url:"https://ceshi-worker-task.lihaink.cn//uploads//images//20231121//202311211336582b7920656.jpg"}]);const a=e.reactive([]),n=e.reactive({}),l=e.ref(""),s=e.ref(!1),c=e.ref(!0),d=e.reactive([[{label:"施肥",route:"/pages/husbandryForm/fertilize"},{label:"除草",route:"/pages/husbandryForm/weeding"},{label:"灌溉",route:"/pages/husbandryForm/irrigate"},{label:"除虫",route:"/pages/husbandryForm/Pest"},{label:"收获",route:"/pages/husbandryForm/harvest"}]]);r((e=>{e.data,l.value=e.data})),i((()=>{u(),m()}));const u=()=>{Pn({plant_id:l.value}).then((e=>{1==e.code&&(2==e.data.status&&(c.value=!1),((e,t,a,o,i)=>{Tn({land_id:e}).then((e=>{1==e.code&&(e.data.kind=t,e.data.datapic=a,e.data.kindarea=o,e.data.breed=i,Object.assign(n,e.data))}))})(e.data.land_id,e.data.kind,e.data.pic,e.data.area,e.data.breed))}))},m=()=>{var e;(e={plant_id:l.value},An.get("/action/list",e)).then((e=>{1==e.code&&a.splice(0,a.length,...e.data)}))},p=e=>{s.value=!1,uni.navigateTo({url:e.value[0].route+"?id="+l.value})},h=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)},f=e=>3==e?"喷灌方式":4==e?"除虫剂种类":2==e?"除草剂种类":1==e?"肥料种类":5==e?"收获":void 0;return(t,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C),c=o(e.resolveDynamicComponent("u--image"),A),u=o(e.resolveDynamicComponent("u-picker"),Oo);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between"}},[e.createElementVNode("view",{class:"tit"}," 苗情监测数据 "),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createVNode(r,{name:"clock",style:{"margin-right":"10rpx"}}),e.createElementVNode("text",{style:{color:"#ACACAC","font-size":"25rpx"}},"刷新时间: "+e.toDisplayString(h()),1)])]),e.createElementVNode("view",{class:"video",onClick:i[0]||(i[0]=e=>{return t="/pages/live/live",void uni.navigateTo({url:t});var t})},[e.createVNode(c,{src:t.url,width:"100%",height:"300rpx"},null,8,["src"])]),e.createVNode(Gn,{info:n,isDetail:!0},null,8,["info"]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit",style:{"font-size":"33.29rpx",margin:"20rpx 0"}}," 操作信息 "),a.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,((t,a)=>{return e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a,onClick:e=>{return a=t.type,void uni.navigateTo({url:"/pages/husbandryForm/detail?land_id="+n.id+"&plant_id="+l.value+"&type="+a});var a}},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left",style:{position:"relative"}},[e.createVNode(c,{onClick:e=>{return a=t.detail.pic,void uni.previewImage({urls:a});var a},radius:"10",src:t.detail.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"]),e.createElementVNode("view",{class:"stick-img",style:{"background-color":"red"}},[e.createVNode(c,{src:(o=t.type,3==o?"/static/main/index/guan_gai.png":4==o?"/static/main/index/chu_chong.png":2==o?"/static/main/index/chu_cao.png":1==o?"/static/main/index/shi_fei.png":5==o?"/static/main/index/shou_huo.png":void 0),class:"stick-img",width:"100rpx",height:"100rpx"},null,8,["src"])])]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"}},[5!=t.type?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createElementVNode("text",{style:{color:"black"}},e.toDisplayString(f(t.type))+": ",1),3==t.type?(e.openBlock(),e.createElementBlock("text",{key:0},e.toDisplayString(1==t.detail.type?"喷灌":2==t.detail.type?"滴灌":"沟灌"),1)):(e.openBlock(),e.createElementBlock("text",{key:1},e.toDisplayString(t.detail.kind),1))])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"参与人员"),e.createTextVNode(":"+e.toDisplayString(t.detail.user)+" ",1),5==t.type?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createElementVNode("text",{style:{color:"black"}},"收获日期:"),e.createTextVNode(" "+e.toDisplayString(t.update_time.slice(0,10)),1)])):e.createCommentVNode("",!0)]),5!=t.type?(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"开始日期"),e.createTextVNode(":"+e.toDisplayString(t.detail.start_date),1)]),e.createElementVNode("view",{class:""},[e.createElementVNode("text",{style:{color:"black"}},"结束日期"),e.createTextVNode(":"+e.toDisplayString(t.detail.end_date),1)])])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"te"},[e.createElementVNode("text",{style:{color:"black","white-space":"nowrap"}},"备注"),e.createTextVNode(":"+e.toDisplayString(t.detail.remark),1)])])])],8,["onClick"]);var o})),128))])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])]),e.createElementVNode("view",{class:""},[e.createVNode(u,{keyName:"label",show:s.value,onCancel:i[1]||(i[1]=e=>s.value=!1),onConfirm:p,columns:d},null,8,["show","columns"])])])}}},Zn=x(Xn,[["__scopeId","data-v-50e7cbe8"]]),ei={props:{modelValue:{type:[String,Number],default:w.input.value},type:{type:String,default:w.input.type},fixed:{type:Boolean,default:w.input.fixed},disabled:{type:Boolean,default:w.input.disabled},disabledColor:{type:String,default:w.input.disabledColor},clearable:{type:Boolean,default:w.input.clearable},password:{type:Boolean,default:w.input.password},maxlength:{type:[String,Number],default:w.input.maxlength},placeholder:{type:String,default:w.input.placeholder},placeholderClass:{type:String,default:w.input.placeholderClass},placeholderStyle:{type:[String,Object],default:w.input.placeholderStyle},showWordLimit:{type:Boolean,default:w.input.showWordLimit},confirmType:{type:String,default:w.input.confirmType},confirmHold:{type:Boolean,default:w.input.confirmHold},holdKeyboard:{type:Boolean,default:w.input.holdKeyboard},focus:{type:Boolean,default:w.input.focus},autoBlur:{type:Boolean,default:w.input.autoBlur},disableDefaultPadding:{type:Boolean,default:w.input.disableDefaultPadding},cursor:{type:[String,Number],default:w.input.cursor},cursorSpacing:{type:[String,Number],default:w.input.cursorSpacing},selectionStart:{type:[String,Number],default:w.input.selectionStart},selectionEnd:{type:[String,Number],default:w.input.selectionEnd},adjustPosition:{type:Boolean,default:w.input.adjustPosition},inputAlign:{type:String,default:w.input.inputAlign},fontSize:{type:[String,Number],default:w.input.fontSize},color:{type:String,default:w.input.color},prefixIcon:{type:String,default:w.input.prefixIcon},prefixIconStyle:{type:[String,Object],default:w.input.prefixIconStyle},suffixIcon:{type:String,default:w.input.suffixIcon},suffixIconStyle:{type:[String,Object],default:w.input.suffixIconStyle},border:{type:String,default:w.input.border},readonly:{type:Boolean,default:w.input.readonly},shape:{type:String,default:w.input.shape},formatter:{type:[Function,null],default:w.input.formatter},ignoreCompositionEvent:{type:Boolean,default:!0}}},ti={name:"u-input",mixins:[V,k,ei],data:()=>({innerValue:"",focused:!1,firstChange:!0,changeFromInner:!1,innerFormatter:e=>e}),watch:{modelValue:{immediate:!0,handler(e,t){this.innerValue=e,this.firstChange=!1,this.changeFromInner=!1}}},computed:{isShowClear(){const{clearable:e,readonly:t,focused:a,innerValue:o}=this;return!!e&&!t&&!!a&&""!==o},inputClass(){let e=[],{border:t,disabled:a,shape:o}=this;return"surround"===t&&(e=e.concat(["u-border","u-input--radius"])),e.push(`u-input--${o}`),"bottom"===t&&(e=e.concat(["u-border-bottom","u-input--no-radius"])),e.join(" ")},wrapperStyle(){const e={};return this.disabled&&(e.backgroundColor=this.disabledColor),"none"===this.border?e.padding="0":(e.paddingTop="6px",e.paddingBottom="6px",e.paddingLeft="9px",e.paddingRight="9px"),uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))},inputStyle(){return{color:this.color,fontSize:uni.$u.addUnit(this.fontSize),textAlign:this.inputAlign}}},emits:["update:modelValue","focus","blur","change","confirm","clear","keyboardheightchange"],methods:{setFormatter(e){this.innerFormatter=e},onInput(e){let{value:t=""}=e.detail||{};const a=(this.formatter||this.innerFormatter)(t);this.innerValue=t,this.$nextTick((()=>{this.innerValue=a,this.valueChange()}))},onBlur(e){this.$emit("blur",e.detail.value),uni.$u.sleep(50).then((()=>{this.focused=!1})),uni.$u.formValidate(this,"blur")},onFocus(e){this.focused=!0,this.$emit("focus")},onConfirm(e){this.$emit("confirm",this.innerValue)},onkeyboardheightchange(e){this.$emit("keyboardheightchange",e)},valueChange(){const e=this.innerValue;this.$nextTick((()=>{this.$emit("update:modelValue",e),this.changeFromInner=!0,this.$emit("change",e),uni.$u.formValidate(this,"change")}))},onClear(){this.innerValue="",this.$nextTick((()=>{this.valueChange(),this.$emit("clear")}))},clickHandler(){}}};const ai=x(ti,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["u-input",l.inputClass]),style:e.normalizeStyle([l.wrapperStyle])},[e.createElementVNode("view",{class:"u-input__content"},[t.prefixIcon||t.$slots.prefix?(e.openBlock(),e.createElementBlock("view",{key:0,class:"u-input__content__prefix-icon"},[e.renderSlot(t.$slots,"prefix",{},(()=>[e.createVNode(s,{name:t.prefixIcon,size:"18",customStyle:t.prefixIconStyle},null,8,["name","customStyle"])]),!0)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"u-input__content__field-wrapper",onClick:a[5]||(a[5]=(...e)=>l.clickHandler&&l.clickHandler(...e))},[e.createElementVNode("input",{class:"u-input__content__field-wrapper__field",style:e.normalizeStyle([l.inputStyle]),type:t.type,focus:t.focus,cursor:t.cursor,value:r.innerValue,"auto-blur":t.autoBlur,disabled:t.disabled||t.readonly,maxlength:t.maxlength,placeholder:t.placeholder,"placeholder-style":t.placeholderStyle,"placeholder-class":t.placeholderClass,"confirm-type":t.confirmType,"confirm-hold":t.confirmHold,"hold-keyboard":t.holdKeyboard,"cursor-spacing":t.cursorSpacing,"adjust-position":t.adjustPosition,"selection-end":t.selectionEnd,"selection-start":t.selectionStart,password:t.password||"password"===t.type||void 0,ignoreCompositionEvent:t.ignoreCompositionEvent,onInput:a[0]||(a[0]=(...e)=>l.onInput&&l.onInput(...e)),onBlur:a[1]||(a[1]=(...e)=>l.onBlur&&l.onBlur(...e)),onFocus:a[2]||(a[2]=(...e)=>l.onFocus&&l.onFocus(...e)),onConfirm:a[3]||(a[3]=(...e)=>l.onConfirm&&l.onConfirm(...e)),onKeyboardheightchange:a[4]||(a[4]=(...e)=>l.onkeyboardheightchange&&l.onkeyboardheightchange(...e))},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"])]),l.isShowClear?(e.openBlock(),e.createElementBlock("view",{key:1,class:"u-input__content__clear",onClick:a[6]||(a[6]=(...e)=>l.onClear&&l.onClear(...e))},[e.createVNode(s,{name:"close",size:"11",color:"#ffffff",customStyle:"line-height: 12px"})])):e.createCommentVNode("",!0),t.suffixIcon||t.$slots.suffix?(e.openBlock(),e.createElementBlock("view",{key:2,class:"u-input__content__subfix-icon"},[e.renderSlot(t.$slots,"suffix",{},(()=>[e.createVNode(s,{name:t.suffixIcon,size:"18",customStyle:t.suffixIconStyle},null,8,["name","customStyle"])]),!0)])):e.createCommentVNode("",!0)])],6)}],["__scopeId","data-v-356ef207"]]),oi={props:{label:{type:String,default:w.formItem.label},prop:{type:String,default:w.formItem.prop},borderBottom:{type:[String,Boolean],default:w.formItem.borderBottom},labelWidth:{type:[String,Number],default:w.formItem.labelWidth},rightIcon:{type:String,default:w.formItem.rightIcon},leftIcon:{type:String,default:w.formItem.leftIcon},required:{type:Boolean,default:w.formItem.required},leftIconStyle:{type:[String,Object],default:w.formItem.leftIconStyle}}};const ni=x({name:"u-form-item",mixins:[V,k,oi],data:()=>({message:"",parentData:{labelPosition:"left",labelAlign:"left",labelStyle:{},labelWidth:45,errorType:"message"}}),computed:{propsLine:()=>uni.$u.props.line},mounted(){this.init()},emits:["click"],methods:{init(){this.updateParentData(),this.parent||uni.$u.error("u-form-item需要结合u-form组件使用")},updateParentData(){this.getParentData("u-form")},clearValidate(){this.message=null},resetField(){const e=uni.$u.getProperty(this.parent.originalModel,this.prop);uni.$u.setProperty(this.parent.model,this.prop,e),this.message=null},clickHandler(){this.$emit("click")}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-icon"),C),c=o(e.resolveDynamicComponent("u-line"),O);return e.openBlock(),e.createElementBlock("view",{class:"u-form-item"},[e.createElementVNode("view",{class:"u-form-item__body",onClick:a[0]||(a[0]=(...e)=>l.clickHandler&&l.clickHandler(...e)),style:e.normalizeStyle([t.$u.addStyle(t.customStyle),{flexDirection:"left"===r.parentData.labelPosition?"row":"column"}])},[e.renderSlot(t.$slots,"label",{},(()=>[t.required||t.leftIcon||t.label?(e.openBlock(),e.createElementBlock("view",{key:0,class:"u-form-item__body__left",style:e.normalizeStyle({width:t.$u.addUnit(t.labelWidth||r.parentData.labelWidth),marginBottom:"left"===r.parentData.labelPosition?0:"5px"})},[e.createElementVNode("view",{class:"u-form-item__body__left__content"},[t.required?(e.openBlock(),e.createElementBlock("text",{key:0,class:"u-form-item__body__left__content__required"},"*")):e.createCommentVNode("",!0),t.leftIcon?(e.openBlock(),e.createElementBlock("view",{key:1,class:"u-form-item__body__left__content__icon"},[e.createVNode(s,{name:t.leftIcon,"custom-style":t.leftIconStyle},null,8,["name","custom-style"])])):e.createCommentVNode("",!0),e.createElementVNode("text",{class:"u-form-item__body__left__content__label",style:e.normalizeStyle([r.parentData.labelStyle,{justifyContent:"left"===r.parentData.labelAlign?"flex-start":"center"===r.parentData.labelAlign?"center":"flex-end"}])},e.toDisplayString(t.label),5)])],4)):e.createCommentVNode("",!0)]),!0),e.createElementVNode("view",{class:"u-form-item__body__right"},[e.createElementVNode("view",{class:"u-form-item__body__right__content"},[e.createElementVNode("view",{class:"u-form-item__body__right__content__slot"},[e.renderSlot(t.$slots,"default",{},void 0,!0)]),t.$slots.right?(e.openBlock(),e.createElementBlock("view",{key:0,class:"item__body__right__content__icon"},[e.renderSlot(t.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)])])],4),e.renderSlot(t.$slots,"error",{},(()=>[r.message&&"message"===r.parentData.errorType?(e.openBlock(),e.createElementBlock("text",{key:0,class:"u-form-item__body__right__message",style:e.normalizeStyle({marginLeft:t.$u.addUnit("top"===r.parentData.labelPosition?0:t.labelWidth||r.parentData.labelWidth)})},e.toDisplayString(r.message),5)):e.createCommentVNode("",!0)]),!0),t.borderBottom?(e.openBlock(),e.createBlock(c,{key:0,color:r.message&&"border-bottom"===r.parentData.errorType?t.$u.color.error:l.propsLine.color,customStyle:`margin-top: ${r.message&&"message"===r.parentData.errorType?"5px":0}`},null,8,["color","customStyle"])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-d55abdea"]]),ii={props:{value:{type:[String,Number],default:w.textarea.value},modelValue:{type:[String,Number],default:w.textarea.value},placeholder:{type:[String,Number],default:w.textarea.placeholder},placeholderClass:{type:String,default:w.input.placeholderClass},placeholderStyle:{type:[String,Object],default:w.input.placeholderStyle},height:{type:[String,Number],default:w.textarea.height},confirmType:{type:String,default:w.textarea.confirmType},disabled:{type:Boolean,default:w.textarea.disabled},count:{type:Boolean,default:w.textarea.count},focus:{type:Boolean,default:w.textarea.focus},autoHeight:{type:Boolean,default:w.textarea.autoHeight},fixed:{type:Boolean,default:w.textarea.fixed},cursorSpacing:{type:Number,default:w.textarea.cursorSpacing},cursor:{type:[String,Number],default:w.textarea.cursor},showConfirmBar:{type:Boolean,default:w.textarea.showConfirmBar},selectionStart:{type:Number,default:w.textarea.selectionStart},selectionEnd:{type:Number,default:w.textarea.selectionEnd},adjustPosition:{type:Boolean,default:w.textarea.adjustPosition},disableDefaultPadding:{type:Boolean,default:w.textarea.disableDefaultPadding},holdKeyboard:{type:Boolean,default:w.textarea.holdKeyboard},maxlength:{type:[String,Number],default:w.textarea.maxlength},border:{type:String,default:w.textarea.border},formatter:{type:[Function,null],default:w.textarea.formatter},ignoreCompositionEvent:{type:Boolean,default:!0}}},ri={name:"u-textarea",mixins:[V,k,ii],data:()=>({innerValue:"",focused:!1,firstChange:!0,changeFromInner:!1,innerFormatter:e=>e}),created(){},watch:{modelValue:{immediate:!0,handler(e,t){this.innerValue=e,this.firstChange=!1,this.changeFromInner=!1}}},computed:{textareaClass(){let e=[],{border:t,disabled:a}=this;return"surround"===t&&(e=e.concat(["u-border","u-textarea--radius"])),"bottom"===t&&(e=e.concat(["u-border-bottom","u-textarea--no-radius"])),a&&e.push("u-textarea--disabled"),e.join(" ")},textareaStyle(){return uni.$u.deepMerge({},uni.$u.addStyle(this.customStyle))}},emits:["update:modelValue","linechange","focus","blur","change","confirm","keyboardheightchange"],methods:{setFormatter(e){this.innerFormatter=e},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e),uni.$u.formValidate(this,"blur")},onLinechange(e){this.$emit("linechange",e)},onInput(e){let{value:t=""}=e.detail||{};const a=(this.formatter||this.innerFormatter)(t);this.innerValue=t,this.$nextTick((()=>{this.innerValue=a,this.valueChange()}))},valueChange(){const e=this.innerValue;this.$nextTick((()=>{this.$emit("update:modelValue",e),this.changeFromInner=!0,this.$emit("change",e),uni.$u.formValidate(this,"change")}))},onConfirm(e){this.$emit("confirm",e)},onKeyboardheightchange(e){this.$emit("keyboardheightchange",e)}}};const li=x(ri,[["render",function(t,a,o,n,i,r){return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["u-textarea",r.textareaClass]),style:e.normalizeStyle([r.textareaStyle])},[e.createElementVNode("textarea",{class:"u-textarea__field",value:i.innerValue,style:e.normalizeStyle({height:t.$u.addUnit(t.height)}),placeholder:t.placeholder,"placeholder-style":t.$u.addStyle(t.placeholderStyle,"string"),"placeholder-class":t.placeholderClass,disabled:t.disabled,focus:t.focus,autoHeight:t.autoHeight,fixed:t.fixed,cursorSpacing:t.cursorSpacing,cursor:t.cursor,showConfirmBar:t.showConfirmBar,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd,adjustPosition:t.adjustPosition,disableDefaultPadding:t.disableDefaultPadding,holdKeyboard:t.holdKeyboard,maxlength:t.maxlength,"confirm-type":t.confirmType,ignoreCompositionEvent:t.ignoreCompositionEvent,onFocus:a[0]||(a[0]=(...e)=>r.onFocus&&r.onFocus(...e)),onBlur:a[1]||(a[1]=(...e)=>r.onBlur&&r.onBlur(...e)),onLinechange:a[2]||(a[2]=(...e)=>r.onLinechange&&r.onLinechange(...e)),onInput:a[3]||(a[3]=(...e)=>r.onInput&&r.onInput(...e)),onConfirm:a[4]||(a[4]=(...e)=>r.onConfirm&&r.onConfirm(...e)),onKeyboardheightchange:a[5]||(a[5]=(...e)=>r.onKeyboardheightchange&&r.onKeyboardheightchange(...e))},null,44,["value","placeholder","placeholder-style","placeholder-class","disabled","focus","autoHeight","fixed","cursorSpacing","cursor","showConfirmBar","selectionStart","selectionEnd","adjustPosition","disableDefaultPadding","holdKeyboard","maxlength","confirm-type","ignoreCompositionEvent"]),t.count?(e.openBlock(),e.createElementBlock("text",{key:0,class:"u-textarea__count",style:e.normalizeStyle({"background-color":t.disabled?"transparent":"#fff"})},e.toDisplayString(i.innerValue.length)+"/"+e.toDisplayString(t.maxlength),5)):e.createCommentVNode("",!0)],6)}],["__scopeId","data-v-7ae8b562"]]),si={props:{model:{type:Object,default:w.form.model},rules:{type:[Object,Function,Array],default:w.form.rules},errorType:{type:String,default:w.form.errorType},borderBottom:{type:Boolean,default:w.form.borderBottom},labelPosition:{type:String,default:w.form.labelPosition},labelWidth:{type:[String,Number],default:w.form.labelWidth},labelAlign:{type:String,default:w.form.labelAlign},labelStyle:{type:Object,default:w.form.labelStyle}}},ci=/%[sdj%]/g;let di=function(){};function ui(e){if(!e||!e.length)return null;const t={};return e.forEach((e=>{const{field:a}=e;t[a]=t[a]||[],t[a].push(e)})),t}function mi(){for(var e=arguments.length,t=new Array(e),a=0;a{if("%%"===e)return"%";if(o>=i)return e;switch(e){case"%s":return String(t[o++]);case"%d":return Number(t[o++]);case"%j":try{return JSON.stringify(t[o++])}catch(a){return"[Circular]"}break;default:return e}}));for(let a=t[o];o{const i=function(e){const t=[];return Object.keys(e).forEach((a=>{t.push.apply(t,e[a])})),t}(e);hi(i,a,(function(e){return o(e),e.length?n({errors:e,fields:ui(e)}):t()}))}));return t.catch((e=>e)),t}let n=t.firstFields||[];!0===n&&(n=Object.keys(e));const i=Object.keys(e),r=i.length;let l=0;const s=[],c=new Promise(((t,c)=>{const d=function(e){if(s.push.apply(s,e),l++,l===r)return o(s),s.length?c({errors:s,fields:ui(s)}):t()};i.length||(o(s),t()),i.forEach((t=>{const o=e[t];-1!==n.indexOf(t)?hi(o,a,d):function(e,t,a){const o=[];let n=0;const i=e.length;function r(e){o.push.apply(o,e),n++,n===i&&a(o)}e.forEach((e=>{t(e,r)}))}(o,a,d)}))}));return c.catch((e=>e)),c}function gi(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:"function"==typeof t?t():t,field:t.field||e.fullField}}}function vi(e,t){if(t)for(const a in t)if(t.hasOwnProperty(a)){const o=t[a];"object"==typeof o&&"object"==typeof e[a]?e[a]={...e[a],...o}:e[a]=o}return e}function yi(e,t,a,o,n,i){!e.required||a.hasOwnProperty(e.field)&&!pi(t,i||e.type)||o.push(mi(n.messages.required,e.fullField))}"undefined"!=typeof process&&process.env;const bi={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i};var wi={integer:function(e){return/^(-)?\d+$/.test(e)},float:function(e){return/^(-)?\d+(\.\d+)?$/.test(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(it){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear},number:function(e){return!isNaN(e)&&"number"==typeof+e},object:function(e){return"object"==typeof e&&!wi.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&!!e.match(bi.email)&&e.length<255},url:function(e){return"string"==typeof e&&!!e.match(bi.url)},hex:function(e){return"string"==typeof e&&!!e.match(bi.hex)}};const _i={required:yi,whitespace:function(e,t,a,o,n){(/^\s+$/.test(t)||""===t)&&o.push(mi(n.messages.whitespace,e.fullField))},type:function(e,t,a,o,n){if(e.required&&void 0===t)return void yi(e,t,a,o,n);const i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?wi[i](t)||o.push(mi(n.messages.types[i],e.fullField,e.type)):i&&typeof t!==e.type&&o.push(mi(n.messages.types[i],e.fullField,e.type))},range:function(e,t,a,o,n){const i="number"==typeof e.len,r="number"==typeof e.min,l="number"==typeof e.max,s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let c=t,d=null;const u="number"==typeof t,m="string"==typeof t,p=Array.isArray(t);if(u?d="number":m?d="string":p&&(d="array"),!d)return!1;p&&(c=t.length),m&&(c=t.replace(s,"_").length),i?c!==e.len&&o.push(mi(n.messages[d].len,e.fullField,e.len)):r&&!l&&ce.max?o.push(mi(n.messages[d].max,e.fullField,e.max)):r&&l&&(ce.max)&&o.push(mi(n.messages[d].range,e.fullField,e.min,e.max))},enum:function(e,t,a,o,n){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&o.push(mi(n.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,a,o,n){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||o.push(mi(n.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||o.push(mi(n.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};function Vi(e,t,a,o,n){const i=e.type,r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t,i)&&!e.required)return a();_i.required(e,t,o,r,n,i),pi(t,i)||_i.type(e,t,o,r,n)}a(r)}const ki={string:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t,"string")&&!e.required)return a();_i.required(e,t,o,i,n,"string"),pi(t,"string")||(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n),_i.pattern(e,t,o,i,n),!0===e.whitespace&&_i.whitespace(e,t,o,i,n))}a(i)},method:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&_i.type(e,t,o,i,n)}a(i)},number:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(""===t&&(t=void 0),pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n))}a(i)},boolean:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&_i.type(e,t,o,i,n)}a(i)},regexp:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),pi(t)||_i.type(e,t,o,i,n)}a(i)},integer:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n))}a(i)},float:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n))}a(i)},array:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t,"array")&&!e.required)return a();_i.required(e,t,o,i,n,"array"),pi(t,"array")||(_i.type(e,t,o,i,n),_i.range(e,t,o,i,n))}a(i)},object:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&_i.type(e,t,o,i,n)}a(i)},enum:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n),void 0!==t&&_i.enum(e,t,o,i,n)}a(i)},pattern:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t,"string")&&!e.required)return a();_i.required(e,t,o,i,n),pi(t,"string")||_i.pattern(e,t,o,i,n)}a(i)},date:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();if(_i.required(e,t,o,i,n),!pi(t)){let a;a="number"==typeof t?new Date(t):t,_i.type(e,a,o,i,n),a&&_i.range(e,a.getTime(),o,i,n)}}a(i)},url:Vi,hex:Vi,email:Vi,required:function(e,t,a,o,n){const i=[],r=Array.isArray(t)?"array":typeof t;_i.required(e,t,o,i,n,r),a(i)},any:function(e,t,a,o,n){const i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(pi(t)&&!e.required)return a();_i.required(e,t,o,i,n)}a(i)}};function xi(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){const e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}const Ni=xi();function Ci(e){this.rules=null,this._messages=Ni,this.define(e)}Ci.prototype={messages:function(e){return e&&(this._messages=vi(xi(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");let t,a;for(t in this.rules={},e)e.hasOwnProperty(t)&&(a=e[t],this.rules[t]=Array.isArray(a)?a:[a])},validate:function(e,t,a){const o=this;void 0===t&&(t={}),void 0===a&&(a=function(){});let n,i,r=e,l=t,s=a;if("function"==typeof l&&(s=l,l={}),!this.rules||0===Object.keys(this.rules).length)return s&&s(),Promise.resolve();if(l.messages){let e=this.messages();e===Ni&&(e=xi()),vi(e,l.messages),l.messages=e}else l.messages=this.messages();const c={};(l.keys||Object.keys(this.rules)).forEach((t=>{n=o.rules[t],i=r[t],n.forEach((a=>{let n=a;"function"==typeof n.transform&&(r===e&&(r={...r}),i=r[t]=n.transform(i)),n="function"==typeof n?{validator:n}:{...n},n.validator=o.getValidationMethod(n),n.field=t,n.fullField=n.fullField||t,n.type=o.getType(n),n.validator&&(c[t]=c[t]||[],c[t].push({rule:n,value:i,source:r,field:t}))}))}));const d={};return fi(c,l,((e,t)=>{const{rule:a}=e;let o,n=!("object"!==a.type&&"array"!==a.type||"object"!=typeof a.fields&&"object"!=typeof a.defaultField);function i(e,t){return{...t,fullField:`${a.fullField}.${e}`}}function r(o){void 0===o&&(o=[]);let r=o;if(Array.isArray(r)||(r=[r]),!l.suppressWarning&&r.length&&Ci.warning("async-validator:",r),r.length&&a.message&&(r=[].concat(a.message)),r=r.map(gi(a)),l.first&&r.length)return d[a.field]=1,t(r);if(n){if(a.required&&!e.value)return r=a.message?[].concat(a.message).map(gi(a)):l.error?[l.error(a,mi(l.messages.required,a.field))]:[],t(r);let o={};if(a.defaultField)for(const t in e.value)e.value.hasOwnProperty(t)&&(o[t]=a.defaultField);o={...o,...e.rule.fields};for(const e in o)if(o.hasOwnProperty(e)){const t=Array.isArray(o[e])?o[e]:[o[e]];o[e]=t.map(i.bind(null,e))}const n=new Ci(o);n.messages(l.messages),e.rule.options&&(e.rule.options.messages=l.messages,e.rule.options.error=l.error),n.validate(e.value,e.rule.options||l,(e=>{const a=[];r&&r.length&&a.push.apply(a,r),e&&e.length&&a.push.apply(a,e),t(a.length?a:null)}))}else t(r)}n=n&&(a.required||!a.required&&e.value),a.field=e.field,a.asyncValidator?o=a.asyncValidator(a,e.value,r,e.source,l):a.validator&&(o=a.validator(a,e.value,r,e.source,l),!0===o?r():!1===o?r(a.message||`${a.field} fails`):o instanceof Array?r(o):o instanceof Error&&r(o.message)),o&&o.then&&o.then((()=>r()),(e=>r(e)))}),(e=>{!function(e){let t,a=[],o={};function n(e){if(Array.isArray(e)){let t;a=(t=a).concat.apply(t,e)}else a.push(e)}for(t=0;t({formRules:{},validator:{},originalModel:null}),watch:{rules:{immediate:!0,handler(e){this.setRules(e)}},propsChange(e){var t;(null==(t=this.children)?void 0:t.length)&&this.children.map((e=>{"function"==typeof e.updateParentData&&e.updateParentData()}))},model:{immediate:!0,handler(e){this.originalModel||(this.originalModel=uni.$u.deepClone(e))}}},computed:{propsChange(){return[this.errorType,this.borderBottom,this.labelPosition,this.labelWidth,this.labelAlign,this.labelStyle]}},created(){this.children=[]},methods:{setRules(e){0!==Object.keys(e).length&&(this.formRules=e,this.validator=new Ci(e))},resetFields(){this.resetModel()},resetModel(e){this.children.map((e=>{const t=null==e?void 0:e.prop,a=uni.$u.getProperty(this.originalModel,t);uni.$u.setProperty(this.model,t,a)}))},clearValidate(e){e=[].concat(e),this.children.map((t=>{(void 0===e[0]||e.includes(t.prop))&&(t.message=null)}))},async validateField(e,t,a=null){this.$nextTick((()=>{const o=[];e=[].concat(e),this.children.map((t=>{const n=[];if(e.includes(t.prop)){const e=uni.$u.getProperty(this.model,t.prop),i=t.prop.split("."),r=i[i.length-1],l=this.formRules[t.prop];if(!l)return;const s=[].concat(l);for(let c=0;c{var i;uni.$u.test.array(e)&&(o.push(...e),n.push(...e)),t.message=(null==(i=n[0])?void 0:i.message)?n[0].message:null}))}}})),"function"==typeof t&&t(o)}))},validate(e){return new Promise(((e,t)=>{this.$nextTick((()=>{const a=this.children.map((e=>e.prop));this.validateField(a,(a=>{a.length?("toast"===this.errorType&&uni.$u.toast(a[0].message),t(a)):e(!0)}))}))}))}}},[["render",function(t,a,o,n,i,r){return e.openBlock(),e.createElementBlock("view",{class:"u-form"},[e.renderSlot(t.$slots,"default")])}]]),Bi={props:{hairline:{type:Boolean,default:w.button.hairline},type:{type:String,default:w.button.type},size:{type:String,default:w.button.size},shape:{type:String,default:w.button.shape},plain:{type:Boolean,default:w.button.plain},disabled:{type:Boolean,default:w.button.disabled},loading:{type:Boolean,default:w.button.loading},loadingText:{type:[String,Number],default:w.button.loadingText},loadingMode:{type:String,default:w.button.loadingMode},loadingSize:{type:[String,Number],default:w.button.loadingSize},openType:{type:String,default:w.button.openType},formType:{type:String,default:w.button.formType},appParameter:{type:String,default:w.button.appParameter},hoverStopPropagation:{type:Boolean,default:w.button.hoverStopPropagation},lang:{type:String,default:w.button.lang},sessionFrom:{type:String,default:w.button.sessionFrom},sendMessageTitle:{type:String,default:w.button.sendMessageTitle},sendMessagePath:{type:String,default:w.button.sendMessagePath},sendMessageImg:{type:String,default:w.button.sendMessageImg},showMessageCard:{type:Boolean,default:w.button.showMessageCard},dataName:{type:String,default:w.button.dataName},throttleTime:{type:[String,Number],default:w.button.throttleTime},hoverStartTime:{type:[String,Number],default:w.button.hoverStartTime},hoverStayTime:{type:[String,Number],default:w.button.hoverStayTime},text:{type:[String,Number],default:w.button.text},icon:{type:String,default:w.button.icon},iconColor:{type:String,default:w.button.icon},color:{type:String,default:w.button.color}}};const Si=x({name:"u-button",mixins:[V,k,Bi],data:()=>({}),computed:{bemClass(){return this.color?this.bem("button",["shape","size"],["disabled","plain","hairline"]):this.bem("button",["type","shape","size"],["disabled","plain","hairline"])},loadingColor(){return this.plain?this.color?this.color:uni.$u.config.color[`u-${this.type}`]:"info"===this.type?"#c9c9c9":"rgb(200, 200, 200)"},iconColorCom(){return this.iconColor?this.iconColor:this.plain?this.color?this.color:this.type:"info"===this.type?"#000000":"#ffffff"},baseColor(){let e={};return this.color&&(e.color=this.plain?this.color:"white",this.plain||(e["background-color"]=this.color),-1!==this.color.indexOf("gradient")?(e.borderTopWidth=0,e.borderRightWidth=0,e.borderBottomWidth=0,e.borderLeftWidth=0,this.plain||(e.backgroundImage=this.color)):(e.borderColor=this.color,e.borderWidth="1px",e.borderStyle="solid")),e},nvueTextStyle(){let e={};return"info"===this.type&&(e.color="#323233"),this.color&&(e.color=this.plain?this.color:"white"),e.fontSize=this.textSize+"px",e},textSize(){let e=14,{size:t}=this;return"large"===t&&(e=16),"normal"===t&&(e=14),"small"===t&&(e=12),"mini"===t&&(e=10),e}},emits:["click","getphonenumber","getuserinfo","error","opensetting","launchapp"],methods:{clickHandler(){this.disabled||this.loading||uni.$u.throttle((()=>{this.$emit("click")}),this.throttleTime)},getphonenumber(e){this.$emit("getphonenumber",e)},getuserinfo(e){this.$emit("getuserinfo",e)},error(e){this.$emit("error",e)},opensetting(e){this.$emit("opensetting",e)},launchapp(e){this.$emit("launchapp",e)}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-loading-icon"),T),c=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("button",{"hover-start-time":Number(t.hoverStartTime),"hover-stay-time":Number(t.hoverStayTime),"form-type":t.formType,"open-type":t.openType,"app-parameter":t.appParameter,"hover-stop-propagation":t.hoverStopPropagation,"send-message-title":t.sendMessageTitle,"send-message-path":t.sendMessagePath,lang:t.lang,"data-name":t.dataName,"session-from":t.sessionFrom,"send-message-img":t.sendMessageImg,"show-message-card":t.showMessageCard,onGetphonenumber:a[0]||(a[0]=(...e)=>l.getphonenumber&&l.getphonenumber(...e)),onGetuserinfo:a[1]||(a[1]=(...e)=>l.getuserinfo&&l.getuserinfo(...e)),onError:a[2]||(a[2]=(...e)=>l.error&&l.error(...e)),onOpensetting:a[3]||(a[3]=(...e)=>l.opensetting&&l.opensetting(...e)),onLaunchapp:a[4]||(a[4]=(...e)=>l.launchapp&&l.launchapp(...e)),"hover-class":t.disabled||t.loading?"":"u-button--active",class:e.normalizeClass(["u-button u-reset-button",l.bemClass]),style:e.normalizeStyle([l.baseColor,t.$u.addStyle(t.customStyle)]),onClick:a[5]||(a[5]=(...e)=>l.clickHandler&&l.clickHandler(...e))},[t.loading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{mode:t.loadingMode,size:1.15*t.loadingSize,color:l.loadingColor},null,8,["mode","size","color"]),e.createElementVNode("text",{class:"u-button__loading-text",style:e.normalizeStyle([{fontSize:l.textSize+"px"}])},e.toDisplayString(t.loadingText||t.text),5)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.icon?(e.openBlock(),e.createBlock(c,{key:0,name:t.icon,color:l.iconColorCom,size:1.35*l.textSize,customStyle:{marginRight:"2px"}},null,8,["name","color","size"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("text",{class:"u-button__text",style:e.normalizeStyle([{fontSize:l.textSize+"px"}])},e.toDisplayString(t.text),5)]),!0)],64))],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"])}],["__scopeId","data-v-e1d8b758"]]),Di={props:{show:{type:Boolean,default:w.datetimePicker.show},showToolbar:{type:Boolean,default:w.datetimePicker.showToolbar},modelValue:{type:[String,Number],default:w.datetimePicker.value},title:{type:String,default:w.datetimePicker.title},mode:{type:String,default:w.datetimePicker.mode},maxDate:{type:Number,default:w.datetimePicker.maxDate},minDate:{type:Number,default:w.datetimePicker.minDate},minHour:{type:Number,default:w.datetimePicker.minHour},maxHour:{type:Number,default:w.datetimePicker.maxHour},minMinute:{type:Number,default:w.datetimePicker.minMinute},maxMinute:{type:Number,default:w.datetimePicker.maxMinute},filter:{type:[Function,null],default:w.datetimePicker.filter},formatter:{type:[Function,null],default:w.datetimePicker.formatter},loading:{type:Boolean,default:w.datetimePicker.loading},itemHeight:{type:[String,Number],default:w.datetimePicker.itemHeight},cancelText:{type:String,default:w.datetimePicker.cancelText},confirmText:{type:String,default:w.datetimePicker.confirmText},cancelColor:{type:String,default:w.datetimePicker.cancelColor},confirmColor:{type:String,default:w.datetimePicker.confirmColor},visibleItemCount:{type:[String,Number],default:w.datetimePicker.visibleItemCount},closeOnClickOverlay:{type:Boolean,default:w.datetimePicker.closeOnClickOverlay},defaultIndex:{type:Array,default:w.datetimePicker.defaultIndex}}};var Ai=1e3,Ii=6e4,Ti=36e5,Pi="millisecond",Fi="second",Ui="minute",Oi="hour",qi="day",$i="week",Li="month",zi="quarter",ji="year",Mi="date",Ri="Invalid Date",Hi=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Qi=/\[([^\]]+)]|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 Wi={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(e){var t=["th","st","nd","rd"],a=e%100;return"["+e+(t[(a-20)%10]||t[a]||t[0])+"]"}};var Ji=function(e,t,a){var o=String(e);return!o||o.length>=t?e:""+Array(t+1-o.length).join(a)+e};const Ki={s:Ji,z:function(e){var t=-e.utcOffset(),a=Math.abs(t),o=Math.floor(a/60),n=a%60;return(t<=0?"+":"-")+Ji(o,2,"0")+":"+Ji(n,2,"0")},m:function e(t,a){if(t.date()1)return e(r[0])}else{var l=t.name;Yi[l]=t,n=l}return!o&&n&&(Gi=n),n||!o&&Gi},tr=function(e,t){if(Zi(e))return e.clone();var a="object"==typeof t?t:{};return a.date=e,a.args=arguments,new or(a)},ar=Ki;ar.l=er,ar.i=Zi,ar.w=function(e,t){return tr(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var or=function(){function e(e){this.$L=er(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[Xi]=!0}var t=e.prototype;return t.parse=function(e){this.$d=function(e){var t=e.date,a=e.utc;if(null===t)return new Date(NaN);if(ar.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var o=t.match(Hi);if(o){var n=o[2]-1||0,i=(o[7]||"0").substring(0,3);return a?new Date(Date.UTC(o[1],n,o[3]||1,o[4]||0,o[5]||0,o[6]||0,i)):new Date(o[1],n,o[3]||1,o[4]||0,o[5]||0,o[6]||0,i)}}return new Date(t)}(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return ar},t.isValid=function(){return!(this.$d.toString()===Ri)},t.isSame=function(e,t){var a=tr(e);return this.startOf(t)<=a&&a<=this.endOf(t)},t.isAfter=function(e,t){return tr(e)({columns:[],innerDefaultIndex:[],innerFormatter:(e,t)=>t}),watch:{show(e,t){e&&this.updateColumnValue(this.innerValue)},propsChange(){this.init()}},computed:{propsChange(){return[this.mode,this.maxDate,this.minDate,this.minHour,this.maxHour,this.minMinute,this.maxMinute,this.filter]}},mounted(){this.init()},emits:["close","cancel","confirm","change","update:modelValue"],methods:{init(){this.innerValue=this.correctValue(this.modelValue),this.updateColumnValue(this.innerValue)},setFormatter(e){this.innerFormatter=e},close(){this.closeOnClickOverlay&&this.$emit("close")},cancel(){this.$emit("cancel")},confirm(){this.$emit("confirm",{value:this.innerValue,mode:this.mode}),this.$emit("update:modelValue",this.innerValue)},intercept(e,t){let a=e.match(/\d+/g);return a.length>1?(uni.$u.error("请勿在过滤或格式化函数时添加数字"),0):t&&4==a[0].length?a[0]:a[0].length>2?(uni.$u.error("请勿在过滤或格式化函数时添加数字"),0):a[0]},change(e){const{indexs:t,values:a}=e;let o="";if("time"===this.mode)o=`${this.intercept(a[0][t[0]])}:${this.intercept(a[1][t[1]])}`;else{const e=parseInt(this.intercept(a[0][t[0]],"year")),n=parseInt(this.intercept(a[1][t[1]]));let i=parseInt(a[2]?this.intercept(a[2][t[2]]):1),r=0,l=0;const s=tr(`${e}-${n}`).daysInMonth();"year-month"===this.mode&&(i=1),i=Math.min(s,i),"datetime"===this.mode&&(r=parseInt(this.intercept(a[3][t[3]])),l=parseInt(this.intercept(a[4][t[4]]))),o=Number(new Date(e,n-1,i,r,l))}o=this.correctValue(o),this.innerValue=o,this.updateColumnValue(o),this.$emit("change",{value:o,picker:this.$refs.picker,mode:this.mode})},updateColumnValue(e){this.innerValue=e,this.updateColumns(),this.updateIndexs(e)},updateIndexs(e){let t=[];const a=this.formatter||this.innerFormatter,o=uni.$u.padZero;if("time"===this.mode){const o=e.split(":");t=[a("hour",o[0]),a("minute",o[1])]}else t=[a("year",`${tr(e).year()}`),a("month",o(tr(e).month()+1))],"date"===this.mode&&t.push(a("day",o(tr(e).date()))),"datetime"===this.mode&&t.push(a("day",o(tr(e).date())),a("hour",o(tr(e).hour())),a("minute",o(tr(e).minute())));const n=this.columns.map(((e,a)=>Math.max(0,e.findIndex((e=>e===t[a])))));this.innerDefaultIndex=n},updateColumns(){const e=this.formatter||this.innerFormatter,t=this.getOriginColumns().map((t=>t.values.map((a=>e(t.type,a)))));this.columns=t},getOriginColumns(){return this.getRanges().map((({type:e,range:t})=>{let a=function(e,t){let a=-1;const o=Array(e<0?0:e);for(;++a{let o=t[0]+a;return o="year"===e?`${o}`:uni.$u.padZero(o),o}));return this.filter&&(a=this.filter(e,a)),{type:e,values:a}}))},generateArray:(e,t)=>Array.from(new Array(t+1).keys()).slice(e),correctValue(e){const t="time"!==this.mode;if(t&&!uni.$u.test.date(e)?e=this.minDate:t||e||(e=`${uni.$u.padZero(this.minHour)}:${uni.$u.padZero(this.minMinute)}`),t)return e=tr(e).isBefore(tr(this.minDate))?this.minDate:e,e=tr(e).isAfter(tr(this.maxDate))?this.maxDate:e;{if(-1===String(e).indexOf(":"))return uni.$u.error("时间错误,请传递如12:24的格式");let[t,a]=e.split(":");return t=uni.$u.padZero(uni.$u.range(this.minHour,this.maxHour,Number(t))),a=uni.$u.padZero(uni.$u.range(this.minMinute,this.maxMinute,Number(a))),`${t}:${a}`}},getRanges(){if("time"===this.mode)return[{type:"hour",range:[this.minHour,this.maxHour]},{type:"minute",range:[this.minMinute,this.maxMinute]}];const{maxYear:e,maxDate:t,maxMonth:a,maxHour:o,maxMinute:n}=this.getBoundary("max",this.innerValue),{minYear:i,minDate:r,minMonth:l,minHour:s,minMinute:c}=this.getBoundary("min",this.innerValue),d=[{type:"year",range:[i,e]},{type:"month",range:[l,a]},{type:"day",range:[r,t]},{type:"hour",range:[s,o]},{type:"minute",range:[c,n]}];return"date"===this.mode&&d.splice(3,2),"year-month"===this.mode&&d.splice(2,3),d},getBoundary(e,t){const a=new Date(t),o=new Date(this[`${e}Date`]),n=tr(o).year();let i=1,r=1,l=0,s=0;return"max"===e&&(i=12,r=tr(a).daysInMonth(),l=23,s=59),tr(a).year()===n&&(i=tr(o).month()+1,tr(a).month()+1===i&&(r=tr(o).date(),tr(a).date()===r&&(l=tr(o).hour(),tr(a).hour()===l&&(s=tr(o).minute())))),{[`${e}Year`]:n,[`${e}Month`]:i,[`${e}Date`]:r,[`${e}Hour`]:l,[`${e}Minute`]:s}}}};const rr=x(ir,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-picker"),Oo);return e.openBlock(),e.createBlock(s,{ref:"picker",show:t.show,closeOnClickOverlay:t.closeOnClickOverlay,columns:r.columns,title:t.title,itemHeight:t.itemHeight,showToolbar:t.showToolbar,visibleItemCount:t.visibleItemCount,defaultIndex:r.innerDefaultIndex,cancelText:t.cancelText,confirmText:t.confirmText,cancelColor:t.cancelColor,confirmColor:t.confirmColor,onClose:l.close,onCancel:l.cancel,onConfirm:l.confirm,onChange:l.change},null,8,["show","closeOnClickOverlay","columns","title","itemHeight","showToolbar","visibleItemCount","defaultIndex","cancelText","confirmText","cancelColor","confirmColor","onClose","onCancel","onConfirm","onChange"])}],["__scopeId","data-v-b38ad07b"]]);let lr={};function sr(e,t){return wn.state.userInfo&&(lr.TOKEN=wn.state.userInfo.token),new Promise(((t,a)=>{uni.uploadFile({url:Sn+"api/upload/image",filePath:e,name:"file",header:lr,success:e=>{let a=JSON.parse(e.data);if(1!=a.code)return uni.$u.toast(a.msg),!1;t(a)},fail:e=>{a(e)}})}))}const cr={__name:"harvest",setup(t){const n=e.ref(null),i=e.ref(""),s=e.reactive([]),c=e.ref(!1),d=e.reactive({user:"",remark:"",pic:[],start_date:""}),u=e=>{d.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),c.value=!1},m=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,p={user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}};l((()=>{n.value.setRules(p)}));const h=()=>{c.value=!0},f=e.ref(Date.now()),g=()=>{n.value.validate().then((e=>{if(a("log","at pages/husbandryForm/harvest.vue:162",e),e){d.pic=s;let e={plant_id:i.value,type:5,detail:JSON.stringify(d)};if(0==d.pic.length)return void uni.$u.toast("请上传图片");a("log","at pages/husbandryForm/harvest.vue:180","表单通过"),Fn(e).then((e=>{a("log","at pages/husbandryForm/harvest.vue:185",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/husbandryForm/harvest.vue:198",e)}))},v=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/harvest.vue:224",e),1==e.code&&(s.push(e.data.url),a("log","at pages/husbandryForm/harvest.vue:227",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},y=e.ref("add");return r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;Object.assign(d,t.detail),s.splice(0,s.length,...t.detail.pic),y.value="detail",uni.setNavigationBarTitle({title:"收获详情"})}else i.value=e.id})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u-icon"),C),b=o(e.resolveDynamicComponent("u-image"),A),w=o(e.resolveDynamicComponent("u--textarea"),li),_=o(e.resolveDynamicComponent("u--form"),Ei),V=o(e.resolveDynamicComponent("u-button"),Si),k=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(_,{labelWidth:"100",model:d,rules:p,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"收获信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==y.value,type:"txt",border:"none",modelValue:d.user,"onUpdate:modelValue":a[0]||(a[0]=e=>d.user=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(r,{label:"作业面积",prop:"formData.breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==y.value,type:"number",border:"none",modelValue:d.breed,"onUpdate:modelValue":a[1]||(a[1]=e=>d.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(r,{label:"收获日期",prop:"start_date",onClick:h,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:d.start_date,"onUpdate:modelValue":a[2]||(a[2]=e=>d.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"收获图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(l,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==y.value]]),e.createVNode(b,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==y.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:v},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(b,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(r,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(w,{modelValue:d.remark,"onUpdate:modelValue":a[3]||(a[3]=e=>d.remark=e),disabled:"detail"==y.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==y.value?(e.openBlock(),e.createBlock(V,{key:0,class:"btn",onClick:g},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(k,{show:c.value,"max-date":(new Date).getTime(),modelValue:f.value,"onUpdate:modelValue":a[4]||(a[4]=e=>f.value=e),mode:"datetime",onConfirm:u,formatter:m,onCancel:a[5]||(a[5]=e=>c.value=!1)},null,8,["show","max-date","modelValue"])])}}},dr=x(cr,[["__scopeId","data-v-4a3e633a"]]),ur={__name:"Pest",setup(t){const n=e.reactive([]);e.ref(null),e.ref(null);const i=e.ref(null),s=e.ref(""),c=e.ref(Date.now()),d=e.ref(!1),u=e.ref(!1),m=()=>{d.value=!0},p=e.reactive({}),h=()=>{u.value=!0},f=e.reactive({kind:"",breed:"",dosage:"",start_date:"",dosage:"",end_date:""}),g=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,v=e=>{f.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),d.value=!1},y=e=>{f.end_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),u.value=!1},b=e.ref({kind:{type:"string",required:!0,message:"请填写除虫剂品牌",trigger:["blur","change"]},breed:{type:"string",required:!0,message:"请填写除虫剂品牌",trigger:["blur","change"]},dosage:{type:"string",required:!0,message:"请填写除虫剂用量",trigger:["blur","change"]},start_date:{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]},end_date:{type:"string",required:!0,message:"请填写结束日期",trigger:["blur","change"]},area:{type:"string",required:!0,message:"请填写作业面积",trigger:["blur","change"]},user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}});l((()=>{i.value.setRules(b)}));const w=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/Pest.vue:252",e),1==e.code&&(n.push(e.data.url),a("log","at pages/husbandryForm/Pest.vue:255",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},_=()=>{i.value.validate().then((e=>{if(a("log","at pages/husbandryForm/Pest.vue:287",e),e){if(f.area>p.area)return void uni.$u.toast("作业面积不能超过种植面积");f.pic=n;let e={plant_id:s.value,type:4,detail:JSON.stringify(f)};if(0==f.pic.length)return void uni.$u.toast("请上传图片");let t=new Date(f.end_date),o=new Date(f.start_date),i=new Date(p.plant_date);if(ot)return void uni.$u.toast("开始时间不能大于结束时间");a("log","at pages/husbandryForm/Pest.vue:327","开始时间和结束时间合法"),a("log","at pages/husbandryForm/Pest.vue:330","表单通过"),Fn(e).then((e=>{a("log","at pages/husbandryForm/Pest.vue:335",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/husbandryForm/Pest.vue:348",e)}))},V=e.ref("add");r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;a("log","at pages/husbandryForm/Pest.vue:369",t,t.detail),Object.assign(f,t.detail),n.splice(0,n.length,...t.detail.pic),V.value="detail",uni.setNavigationBarTitle({title:"虫害防治信息详情"})}else s.value=e.id;Pn({plant_id:s.value}).then((e=>{1==e.code&&Object.assign(p,e.data)}))}));const k=()=>(new Date).getTime();return(t,r)=>{const l=o(e.resolveDynamicComponent("up-input"),ai),s=o(e.resolveDynamicComponent("u-form-item"),ni),p=o(e.resolveDynamicComponent("u-icon"),C),x=o(e.resolveDynamicComponent("u-image"),A),N=o(e.resolveDynamicComponent("u--textarea"),li),E=o(e.resolveDynamicComponent("u--form"),Ei),B=o(e.resolveDynamicComponent("u-datetime-picker"),rr),S=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(E,{labelWidth:"130",model:f,rules:b.value,ref_key:"form",ref:i},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"除虫信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"除虫剂种类",prop:"kind",borderBottom:"",ref:"item1",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入除虫剂种类",disabled:"detail"==V.value,border:"none",modelValue:f.kind,"onUpdate:modelValue":r[0]||(r[0]=e=>f.kind=e)},null,8,["disabled","modelValue"])])),_:1},512),e.createVNode(s,{label:"除虫剂品牌",prop:"breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入除虫剂品牌",disabled:"detail"==V.value,border:"none",modelValue:f.breed,"onUpdate:modelValue":r[1]||(r[1]=e=>f.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(s,{label:"除虫剂用量(升)",prop:"dosage",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入除虫剂用量",type:"number",border:"none",disabled:"detail"==V.value,modelValue:f.dosage,"onUpdate:modelValue":r[2]||(r[2]=e=>f.dosage=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(s,{label:"作业面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==V.value,type:"number",border:"none",modelValue:f.area,"onUpdate:modelValue":r[3]||(r[3]=e=>f.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(s,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==V.value,type:"txt",border:"none",modelValue:f.user,"onUpdate:modelValue":r[4]||(r[4]=e=>f.user=e)},null,8,["disabled","modelValue"])])),_:1}),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createVNode(s,{label:"开始日期",onClick:m,prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.start_date,"onUpdate:modelValue":r[5]||(r[5]=e=>f.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(s,{label:"结束日期",prop:"end_date",onClick:h,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.end_date,"onUpdate:modelValue":r[6]||(r[6]=e=>f.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createVNode(s,{label:"开始日期",prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.start_date,"onUpdate:modelValue":r[7]||(r[7]=e=>f.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(s,{label:"结束日期",prop:"end_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(l,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.end_date,"onUpdate:modelValue":r[8]||(r[8]=e=>f.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"除虫图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[n.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,((t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(p,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{n.splice(e,1)})(o)},null,8,["onClick"]),[[e.vShow,"add"==V.value]]),e.createVNode(x,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a("log","at pages/husbandryForm/Pest.vue:234",o=t),void uni.previewImage({urls:[o]});var o}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:w},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(x,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(s,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(N,{modelValue:f.remark,"onUpdate:modelValue":r[9]||(r[9]=e=>f.remark=e),disabled:"detail"==V.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model","rules"]),e.createElementVNode("view",null,[e.createVNode(B,{show:d.value,"max-date":k(),modelValue:c.value,"onUpdate:modelValue":r[10]||(r[10]=e=>c.value=e),mode:"datetime",onConfirm:v,formatter:g,onCancel:r[11]||(r[11]=e=>d.value=!1)},null,8,["show","max-date","modelValue"]),e.createVNode(B,{show:u.value,"max-date":k(),modelValue:c.value,"onUpdate:modelValue":r[12]||(r[12]=e=>c.value=e),mode:"datetime",onConfirm:y,formatter:g,onCancel:r[13]||(r[13]=e=>u.value=!1)},null,8,["show","max-date","modelValue"])]),"add"==V.value?(e.openBlock(),e.createBlock(S,{key:0,class:"btn",onClick:_},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},mr=x(ur,[["__scopeId","data-v-831bb10d"]]),pr={__name:"irrigate",setup(t){const n=e.reactive([{value:1,name:"喷灌"},{value:2,name:"滴灌"},{value:3,name:"沟灌"}]),i=e.ref(""),s=e.reactive([]);e.ref(null),e.ref(null);const c=e.ref(""),d=e.ref(!1),u=e.ref(null),m=e.ref(Date.now()),p=e.ref(!1),h=e.ref(!1),f=e.reactive({}),g=()=>{p.value=!0},v=()=>{h.value=!0},y=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,b=e.reactive({type:""}),w=e=>{c.value=e.name,b.type=e.value},_=()=>{d.value=!0},V=e=>{b.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),p.value=!1},k=e=>{b.end_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),h.value=!1},x={type:{type:"number",required:!0,message:"请选择灌溉方式",trigger:["change"]},start_date:{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]},end_date:{type:"string",required:!0,message:"请填写结束日期",trigger:["blur","change"]},area:{type:"string",required:!0,message:"请填写土地面积",trigger:["blur","change"]},user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}};l((()=>{u.value.setRules(x)}));const N=()=>{u.value.validate().then((e=>{if(e){if(b.area>f.area)return void uni.$u.toast("灌溉面积不能超过种植面积");b.pic=s;let e={plant_id:i.value,type:3,detail:JSON.stringify(b)};if(0==b.pic.length)return void uni.$u.toast("请上传图片");let t=new Date(b.end_date),o=new Date(b.start_date),n=new Date(f.plant_date);if(ot)return void uni.$u.toast("开始时间不能大于结束时间");a("log","at pages/husbandryForm/irrigate.vue:284","开始时间和结束时间合法"),Fn(e).then((e=>{a("log","at pages/husbandryForm/irrigate.vue:291",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/husbandryForm/irrigate.vue:303",e)}))},E=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/irrigate.vue:328",e),1==e.code&&(s.push(e.data.url),a("log","at pages/husbandryForm/irrigate.vue:331",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},B=e.ref("add");r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;a("log","at pages/husbandryForm/irrigate.vue:367",t,t.detail),Object.assign(b,t.detail),s.splice(0,s.length,...t.detail.pic),c.value=n.find((e=>e.value===b.type)).name,B.value="detail",uni.setNavigationBarTitle({title:"灌溉详情"})}else i.value=e.id;Pn({plant_id:i.value}).then((e=>{1==e.code&&Object.assign(f,e.data)}))}));const S=()=>(new Date).getTime();return(t,i)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),f=o(e.resolveDynamicComponent("u-icon"),C),D=o(e.resolveDynamicComponent("u-image"),A),I=o(e.resolveDynamicComponent("u--textarea"),li),T=o(e.resolveDynamicComponent("u--form"),Ei),P=o(e.resolveDynamicComponent("u-datetime-picker"),rr),F=o(e.resolveDynamicComponent("u-action-sheet"),G),U=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(T,{labelWidth:"100",model:b,rules:x,ref_key:"form",ref:u},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"灌溉信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"灌溉方式",prop:"type",borderBottom:"",required:"",onClick:_},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择灌溉方式",readonly:"",border:"none",modelValue:c.value,"onUpdate:modelValue":i[0]||(i[0]=e=>c.value=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"灌溉面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==B.value,type:"number",border:"none",modelValue:b.area,"onUpdate:modelValue":i[1]||(i[1]=e=>b.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==B.value,type:"txt",border:"none",modelValue:b.user,"onUpdate:modelValue":i[2]||(i[2]=e=>b.user=e)},null,8,["disabled","modelValue"])])),_:1}),"add"==B.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createVNode(l,{label:"开始日期",onClick:g,prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:b.start_date,"onUpdate:modelValue":i[3]||(i[3]=e=>b.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",onClick:v,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:b.end_date,"onUpdate:modelValue":i[4]||(i[4]=e=>b.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createVNode(l,{label:"开始日期",prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:b.start_date,"onUpdate:modelValue":i[5]||(i[5]=e=>b.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:b.end_date,"onUpdate:modelValue":i[6]||(i[6]=e=>b.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"灌溉图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(f,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(o)},null,8,["onClick"]),[[e.vShow,"add"==B.value]]),e.createVNode(D,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a("log","at pages/husbandryForm/irrigate.vue:310",o=t),void uni.previewImage({urls:[o]});var o}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==B.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:E},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(D,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(I,{modelValue:b.remark,"onUpdate:modelValue":i[7]||(i[7]=e=>b.remark=e),disabled:"detail"==B.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),e.createElementVNode("view",null,[e.createVNode(P,{show:p.value,modelValue:m.value,"onUpdate:modelValue":i[8]||(i[8]=e=>m.value=e),"max-date":S(),mode:"datetime",onConfirm:V,formatter:y,onCancel:i[9]||(i[9]=e=>p.value=!1)},null,8,["show","modelValue","max-date"]),e.createVNode(P,{show:h.value,"max-date":S(),modelValue:m.value,"onUpdate:modelValue":i[10]||(i[10]=e=>m.value=e),mode:"datetime",onConfirm:k,formatter:y,onCancel:i[11]||(i[11]=e=>h.value=!1)},null,8,["show","max-date","modelValue"]),e.createVNode(F,{show:d.value,actions:n,title:"请选择灌溉方式",onClose:i[12]||(i[12]=e=>d.value=!1),onSelect:w},null,8,["show","actions"])]),"add"==B.value?(e.openBlock(),e.createBlock(U,{key:0,class:"btn",onClick:N},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},hr=x(pr,[["__scopeId","data-v-e6c57826"]]),fr={__name:"weeding",setup(t){const n=e.reactive([]);e.ref(null),e.ref(null);const i=e.ref(null),s=e.ref(""),c=e.ref(Date.now()),d=e.ref(!1),u=e.ref(!1),m=()=>{d.value=!0},p=e.reactive({}),h=()=>{u.value=!0},f=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,g=e.reactive({kind:"",breed:"",dosage:"",start_date:"",dosage:"",end_date:""}),v=e=>{g.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),d.value=!1},y=e=>{g.end_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),u.value=!1},b=e.ref({kind:{type:"string",required:!0,message:"请填写除草剂种类",trigger:["blur","change"]},breed:{type:"string",required:!0,message:"请填写除草剂品牌",trigger:["blur","change"]},dosage:{type:"string",required:!0,message:"请填写除草剂用量",trigger:["blur","change"]},start_date:{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]},end_date:{type:"string",required:!0,message:"请填写结束日期",trigger:["blur","change"]},area:{type:"string",required:!0,message:"请填写作业面积",trigger:["blur","change"]},user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}});l((()=>{i.value.setRules(b)}));const w=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/weeding.vue:246",e),1==e.code&&(n.push(e.data.url),a("log","at pages/husbandryForm/weeding.vue:249",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},_=()=>{i.value.validate().then((e=>{if(e){if(g.area>p.area)return void uni.$u.toast("作业面积不能超过种植面积");g.pic=n;let e={plant_id:s.value,type:2,detail:JSON.stringify(g)};if(0==g.pic.length)return void uni.$u.toast("请上传图片");let t=new Date(g.end_date),o=new Date(g.start_date),i=new Date(p.plant_date);if(ot)return void uni.$u.toast("开始时间不能大于结束时间");a("log","at pages/husbandryForm/weeding.vue:324","开始时间和结束时间合法"),a("log","at pages/husbandryForm/weeding.vue:327","表单通过"),Fn(e).then((e=>{a("log","at pages/husbandryForm/weeding.vue:332",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/husbandryForm/weeding.vue:345",e)}))},V=e.ref("add");r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;Object.assign(g,t.detail),n.splice(0,n.length,...t.detail.pic),V.value="detail",uni.setNavigationBarTitle({title:"除草详情"})}else s.value=e.id;Pn({plant_id:s.value}).then((e=>{1==e.code&&Object.assign(p,e.data)}))}));const k=()=>(new Date).getTime();return(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),s=o(e.resolveDynamicComponent("u-icon"),C),p=o(e.resolveDynamicComponent("u-image"),A),x=o(e.resolveDynamicComponent("u--textarea"),li),N=o(e.resolveDynamicComponent("u--form"),Ei),E=o(e.resolveDynamicComponent("u-datetime-picker"),rr),B=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(N,{labelWidth:"120",model:g,rules:b.value,ref_key:"form",ref:i},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"除草信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"除草剂种类",prop:"kind",borderBottom:"",ref:"item1",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入除草剂种类",disabled:"detail"==V.value,border:"none",modelValue:g.kind,"onUpdate:modelValue":a[0]||(a[0]=e=>g.kind=e)},null,8,["disabled","modelValue"])])),_:1},512),e.createVNode(l,{label:"除草剂品牌",prop:"breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入除草剂品牌",disabled:"detail"==V.value,border:"none",modelValue:g.breed,"onUpdate:modelValue":a[1]||(a[1]=e=>g.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"除草剂用量(斤)",prop:"dosage",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入除草剂用量",border:"none",type:"number",disabled:"detail"==V.value,modelValue:g.dosage,"onUpdate:modelValue":a[2]||(a[2]=e=>g.dosage=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"作业面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==V.value,type:"number",border:"none",modelValue:g.area,"onUpdate:modelValue":a[3]||(a[3]=e=>g.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==V.value,type:"txt",border:"none",modelValue:g.user,"onUpdate:modelValue":a[4]||(a[4]=e=>g.user=e)},null,8,["disabled","modelValue"])])),_:1}),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createVNode(l,{label:"开始日期",onClick:m,prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:g.start_date,"onUpdate:modelValue":a[5]||(a[5]=e=>g.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",onClick:h,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:g.end_date,"onUpdate:modelValue":a[6]||(a[6]=e=>g.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createVNode(l,{label:"开始日期",prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:g.start_date,"onUpdate:modelValue":a[7]||(a[7]=e=>g.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:g.end_date,"onUpdate:modelValue":a[8]||(a[8]=e=>g.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"除草图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[n.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(s,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{n.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==V.value]]),e.createVNode(p,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:w},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(p,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(x,{modelValue:g.remark,"onUpdate:modelValue":a[9]||(a[9]=e=>g.remark=e),disabled:"detail"==V.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model","rules"]),e.createElementVNode("view",null,[e.createVNode(E,{show:d.value,modelValue:c.value,"onUpdate:modelValue":a[10]||(a[10]=e=>c.value=e),"max-date":k(),mode:"datetime",onConfirm:v,formatter:f,onCancel:a[11]||(a[11]=e=>d.value=!1)},null,8,["show","modelValue","max-date"]),e.createVNode(E,{show:u.value,modelValue:c.value,"onUpdate:modelValue":a[12]||(a[12]=e=>c.value=e),"max-date":k(),mode:"datetime",onConfirm:y,formatter:f,onCancel:a[13]||(a[13]=e=>u.value=!1)},null,8,["show","modelValue","max-date"])]),"add"==V.value?(e.openBlock(),e.createBlock(B,{key:0,class:"btn",onClick:_},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},gr=x(fr,[["__scopeId","data-v-d8d3a6ad"]]),vr={__name:"fertilize",setup(t){const n=e.reactive([]);e.ref(null),e.ref(null);const i=e.ref(null),s=e.ref(""),c=e.ref(Date.now()),d=e.ref(!1),u=e.ref(!1),m=e.reactive({}),p=()=>{d.value=!0},h=()=>{u.value=!0},f=e.reactive({kind:"",breed:"",dosage:"",start_date:"",dosage:"",end_date:""}),g=e=>{f.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),d.value=!1},v=e=>{f.end_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),u.value=!1},y=e.ref({kind:{type:"string",required:!0,message:"请填写肥料种类",trigger:["blur","change"]},breed:{type:"string",required:!0,message:"请填写肥料品牌",trigger:["blur","change"]},dosage:{type:"string",required:!0,message:"请填写肥料用量",trigger:["blur","change"]},start_date:{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]},end_date:{type:"string",required:!0,message:"请填写结束日期",trigger:["blur","change"]},area:{type:"string",required:!0,message:"请填写作业面积",trigger:["blur","change"]},user:{type:"string",required:!0,message:"请填写参与人",trigger:["blur","change"]}});l((()=>{i.value.setRules(y)}));const b=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,w=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/fertilize.vue:248",e),1==e.code&&(n.push(e.data.url),a("log","at pages/husbandryForm/fertilize.vue:253",n),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},_=()=>{i.value.validate().then((e=>{if(e){if(f.area>m.area)return void uni.$u.toast("作业面积不能超过种植面积");f.pic=n;let e={plant_id:s.value,type:1,detail:JSON.stringify(f)};if(0==f.pic.length)return void uni.$u.toast("请上传图片");let t=new Date(f.end_date),o=new Date(f.start_date),i=new Date(m.plant_date);if(a("log","at pages/husbandryForm/fertilize.vue:307",ot)return void uni.$u.toast("开始时间不能大于结束时间");a("log","at pages/husbandryForm/fertilize.vue:323","开始时间和结束时间合法"),a("log","at pages/husbandryForm/fertilize.vue:329","表单通过"),Fn(e).then((e=>{1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}})).catch((e=>{a("log","at pages/husbandryForm/fertilize.vue:347",e)}))},V=e.ref("add");r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;Object.assign(f,t.detail),n.splice(0,n.length,...t.detail.pic),V.value="detail",uni.setNavigationBarTitle({title:"施肥详情"})}else s.value=e.id;Pn({plant_id:s.value}).then((e=>{1==e.code&&Object.assign(m,e.data)}))}));const k=()=>(new Date).getTime();return(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),s=o(e.resolveDynamicComponent("u-icon"),C),m=o(e.resolveDynamicComponent("u-image"),A),x=o(e.resolveDynamicComponent("u--textarea"),li),N=o(e.resolveDynamicComponent("u--form"),Ei),E=o(e.resolveDynamicComponent("u-datetime-picker"),rr),B=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(N,{labelWidth:"100",model:f,rules:y.value,ref_key:"form",ref:i},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"施肥信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"肥料种类",prop:"kind",borderBottom:"",ref:"item1",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入肥料种类",disabled:"detail"==V.value,border:"none",modelValue:f.kind,"onUpdate:modelValue":a[0]||(a[0]=e=>f.kind=e)},null,8,["disabled","modelValue"])])),_:1},512),e.createVNode(l,{label:"肥料品牌",prop:"breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入肥料品牌",disabled:"detail"==V.value,border:"none",modelValue:f.breed,"onUpdate:modelValue":a[1]||(a[1]=e=>f.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"肥料用量(斤)",prop:"dosage",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入肥料用量",border:"none",type:"number",disabled:"detail"==V.value,modelValue:f.dosage,"onUpdate:modelValue":a[2]||(a[2]=e=>f.dosage=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"作业面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入作业面积",disabled:"detail"==V.value,type:"number",border:"none",modelValue:f.area,"onUpdate:modelValue":a[3]||(a[3]=e=>f.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==V.value,type:"txt",border:"none",modelValue:f.user,"onUpdate:modelValue":a[4]||(a[4]=e=>f.user=e)},null,8,["disabled","modelValue"])])),_:1}),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createVNode(l,{label:"开始日期",onClick:p,prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.start_date,"onUpdate:modelValue":a[5]||(a[5]=e=>f.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",onClick:h,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.end_date,"onUpdate:modelValue":a[6]||(a[6]=e=>f.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createVNode(l,{label:"开始日期",prop:"start_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.start_date,"onUpdate:modelValue":a[7]||(a[7]=e=>f.start_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"结束日期",prop:"end_date",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:f.end_date,"onUpdate:modelValue":a[8]||(a[8]=e=>f.end_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"施肥图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[n.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(s,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{n.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==V.value]]),e.createVNode(m,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==V.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:w},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(m,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(x,{modelValue:f.remark,"onUpdate:modelValue":a[9]||(a[9]=e=>f.remark=e),disabled:"detail"==V.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model","rules"]),e.createElementVNode("view",null,[e.createVNode(E,{show:d.value,"max-date":k(),modelValue:c.value,"onUpdate:modelValue":a[10]||(a[10]=e=>c.value=e),mode:"datetime",onConfirm:g,formatter:b,onCancel:a[11]||(a[11]=e=>d.value=!1)},null,8,["show","max-date","modelValue"]),e.createVNode(E,{show:u.value,"max-date":k(),modelValue:c.value,"onUpdate:modelValue":a[12]||(a[12]=e=>c.value=e),mode:"datetime",onConfirm:v,formatter:b,onCancel:a[13]||(a[13]=e=>u.value=!1)},null,8,["show","max-date","modelValue"])]),"add"==V.value?(e.openBlock(),e.createBlock(B,{key:0,class:"btn",onClick:_},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},yr=x(vr,[["__scopeId","data-v-65eb2c4d"]]),br={__name:"sow",setup(t){e.ref(null);const n=e.ref(null),i=e.ref(""),s=e.reactive([]),c=e.ref(Date.now()),d=e.ref(!1),u=e.reactive({formData:{kind:"",breed:"",area:"",user:"",date:"",remark:"",pic:[]},rules:{kind:[{type:"string",required:!0,message:"请填写种植种类",trigger:["blur","change"]}],breed:[{type:"string",required:!0,message:"请填写种植品种",trigger:["blur","change"]}],area:[{type:"string",required:!0,message:"请填写种植面积",trigger:["blur","change"]}],user:[{type:"string",required:!0,message:"请填写参与人员",trigger:["blur","change"]}],date:[{type:"string",required:!0,message:"请填写开始日期",trigger:["blur","change"]}]}});l((()=>{n.value.setRules(u.rules)}));const m=()=>{d.value=!0},p=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,h=e=>{u.formData.date=uni.$u.timeFormat(e.value,"yyyy-mm-dd"),d.value=!1},f=async()=>{a("log","at pages/husbandryForm/sow.vue:199",n.value);try{if(await n.value.validate()){if(u.formData.land_id=i.value,a("log","at pages/husbandryForm/sow.vue:207","表单通过"),0==s.length)return void uni.$u.toast("请上传图片");u.formData.pic=JSON.stringify(s),(e=>An.post("/plant/add",e))(u.formData).then((e=>{1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/husbandryForm/sow.vue:227","表单验证未通过")}catch(e){a("error","at pages/husbandryForm/sow.vue:231",e)}},g=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/husbandryForm/sow.vue:253",e),1==e.code&&(s.push(e.data.url),a("log","at pages/husbandryForm/sow.vue:258",s),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},v=e.ref("add"),y=()=>{const e=new Date;e.setHours(0,0,0,0);return e.getTime()};return r((e=>{i.value=e.id})),(t,i)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),b=o(e.resolveDynamicComponent("u-icon"),C),w=o(e.resolveDynamicComponent("u-image"),A),_=o(e.resolveDynamicComponent("u--textarea"),li),V=o(e.resolveDynamicComponent("u-form"),Ei),k=o(e.resolveDynamicComponent("u-datetime-picker"),rr),x=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(V,{labelWidth:"100",model:u.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"种植信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"种植种类",prop:"kind",borderBottom:"",ref:"item1",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入种类",disabled:"detail"==v.value,border:"none",modelValue:u.formData.kind,"onUpdate:modelValue":i[0]||(i[0]=e=>u.formData.kind=e)},null,8,["disabled","modelValue"])])),_:1},512),e.createVNode(l,{label:"种植品种",prop:"breed",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入品种",disabled:"detail"==v.value,border:"none",modelValue:u.formData.breed,"onUpdate:modelValue":i[1]||(i[1]=e=>u.formData.breed=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"种植面积(亩)",prop:"area",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入种植面积",disabled:"detail"==v.value,type:"number",border:"none",modelValue:u.formData.area,"onUpdate:modelValue":i[2]||(i[2]=e=>u.formData.area=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"参与人员",prop:"user",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入参与人姓名",disabled:"detail"==v.value,type:"txt",border:"none",modelValue:u.formData.user,"onUpdate:modelValue":i[3]||(i[3]=e=>u.formData.user=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"种植开始日期",prop:"date",borderBottom:"",required:"",onClick:m},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择日期",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:u.formData.date,"onUpdate:modelValue":i[4]||(i[4]=e=>u.formData.date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"种植图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,o)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(b,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(o)},null,8,["onClick"]),[[e.vShow,"add"==v.value]]),e.createVNode(w,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a("log","at pages/husbandryForm/sow.vue:193",o=t),void uni.previewImage({urls:[o]});var o}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"code-img"},[e.createElementVNode("view",{class:"",onClick:g},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(w,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{borderBottom:""},{default:e.withCtx((()=>[e.createVNode(_,{modelValue:u.formData.remark,"onUpdate:modelValue":i[5]||(i[5]=e=>u.formData.remark=e),disabled:"detail"==v.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),e.createElementVNode("view",null,[e.createVNode(k,{show:d.value,modelValue:c.value,"onUpdate:modelValue":i[6]||(i[6]=e=>c.value=e),maxDate:y(),mode:"date",onConfirm:h,formatter:p,onCancel:i[7]||(i[7]=e=>d.value=!1)},null,8,["show","modelValue","maxDate"])]),"add"==v.value?(e.openBlock(),e.createBlock(x,{key:0,class:"btn",onClick:f},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)])])}}},wr=x(br,[["__scopeId","data-v-ad0e10d5"]]),_r=e=>{(e.$renderjs||(e.$renderjs=[])).push("renderScript"),(e.$renderjsModules||(e.$renderjsModules={})).renderScript="087b82ce"},Vr={data:()=>({vsrc:{},imgSrc:"",subNvue:"",videoUrl:"",boxStyle:{height:0,width:0},object_fit:"contain",windowWidth:"",deviceId:"",shwovideo:!0,initFailTimer:"",flag:!0,SocketTask:""}),onLoad(e){this.deviceId=e.device,this.videoUrl=e.url,this.videoUrl=this.replaceLastThreeChars(this.videoUrl,"mp4"),this.subNvue=uni.getSubNVueById("subNvue"),this.subNvue.show();let t={username:e.user,device:"lihai_lot_walnutpi_dev_"+e.device,scene:"app"};this.openScoket(t),this.platform=uni.getSystemInfoSync().platform},methods:{replaceLastThreeChars:(e,t)=>e.length<3?t+e:e.slice(0,-3)+t,receiveImg(e){this.imgSrc=e.test,(e=>In.post("api/upload/uploadVideoCover",e))({device_id:this.deviceId,image:this.imgSrc}).then((e=>{a("log","at pages/live/live.vue:77",e)})).catch((e=>{a("log","at pages/live/live.vue:79",e)}))},setUrl(e){let t={width:400,height:280};t.src=e,this.vsrc=t},openScoket(e){let t=this;this.SocketTask=uni.connectSocket({url:"wss://iot.lihaink.cn/test",complete:()=>{a("log","at pages/live/live.vue:95",t.socket,"socketTASK")}}),this.SocketTask.onOpen((function(o){t.SocketTask.send({data:JSON.stringify(e)}),t.SocketTask.onMessage((function(e){a("log","at pages/live/live.vue:103",e,"收到消息"),200==JSON.parse(e.data).code&&(t.shwovideo=!0)}))})),this.SocketTask.onError((function(e){a("log","at pages/live/live.vue:110","WebSocket连接打开失败,请检查!")})),this.SocketTask.onClose((function(e){a("log","at pages/live/live.vue:113","WebSocket 已关闭!")}))},playVedio(){this.subNvue.hide(),uni.createVideoContext("video",this).requestFullScreen(),this.flag=!1,setTimeout((()=>{this.setUrl(this.videoUrl)}),2e3)},fullscreenchange(e){e.detail.fullScreen||plus.screen.lockOrientation("portrait-primary")}},onUnload(){this.SocketTask.close(),this.SocketTask=null,a("log","at pages/live/live.vue:136",this.socket,"sosddsdsd")}};_r(Vr);const kr=x(Vr,[["render",function(t,a,o,n,i,r){return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("view",{vsrc:e.wp(i.vsrc),"change:vsrc":t.renderScript.getVideoImg},[(e.openBlock(),e.createElementBlock("video",{key:0,onPlay:a[0]||(a[0]=(...e)=>r.playVedio&&r.playVedio(...e)),onFullscreenchange:a[1]||(a[1]=(...e)=>r.fullscreenchange&&r.fullscreenchange(...e)),controls:!0,autoplay:!0,style:{width:"100vw",height:"100vh"},src:i.videoUrl,id:"video"},null,40,["src"]))],8,["vsrc","change:vsrc"])])}]]),xr={__name:"addPlant",setup(t){const n=e.ref(null),i=e.reactive({formData:{farm_name:"",farm_type:"",breed_type:"",form_scale:"",master:"",master_contact:"",province:"",city:"",area:"",street:"",village:"",bridge:"",address:"",latitude:"",longitude:"",master_name:"",pic:[]},rules:{farm_name:[{type:"string",required:!0,message:"请填写养殖基地名称",trigger:["blur","change"]}],farm_type:[{type:"string",required:!0,message:"请填写养殖基地类型",trigger:["blur","change"]}],breed_type:[{type:"string",required:!0,message:"请填写养殖基地种类",trigger:["blur","change"]}],form_scale:[{type:"string",required:!0,message:"请填写养殖基地规模",trigger:["blur","change"]}],province:[{type:"string",required:!0,message:"请请选择所在省份",trigger:"change"}],city:[{type:"string",required:!0,message:"请选择所在城市",trigger:"change"}],area:[{type:"string",required:!0,message:"请选择所在区县",trigger:"change"}],street:{type:"string",required:!0,message:"请选择所在镇街",trigger:["blur","change"]},village:{type:"string",required:!0,message:"请选择所在乡村",trigger:["blur","change"]},bridge:{type:"string",required:!0,message:"请选择小队",trigger:["blur","change"]},address:[{type:"string",required:!0,message:"请输入养殖基地详细地址",trigger:["blur","change"]}],master:[{type:"string",required:!0,message:"请输入养殖基地负责人姓名",trigger:["blur","change"]}],master_contact:[{required:!0,message:"请输入手机号",trigger:["change","blur"]},{validator:(e,t,a)=>uni.$u.test.mobile(t),message:"手机号码不正确",trigger:["change","blur"]}]}}),s=e.reactive([]),c=e.ref(null),d=e.ref(null),u=e.ref(null),m=e.ref(null),p=e.ref(null),h=e.ref(null),f=e.ref(null),g=e.ref(null),v=e.ref(!1),y=e.ref(!1),b=e.ref(!1),w=e.ref(!1),_=e.ref(!1),V=e.ref(!1),k=e.ref(!1),x=e.ref(!1),N=e.reactive([]),E=e.reactive([]),B=e.reactive([]),S=e.reactive([]),D=e.reactive([]),I=e.reactive([]),T=e.reactive([]),P=e.reactive([]),F=e=>{f.value=e.name,i.formData.farm_type=e.value},U=e=>{g.value=e.name,i.formData.breed_type=e.value},O=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{1==e.code&&(s.push(e.data.url),a("log","at pages/addPlant/addPlant.vue:450",i.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},q=()=>{v.value=!0},$=()=>{y.value=!0},L=()=>{b.value=!0},z=()=>{w.value=!0},j=()=>{_.value=!0},M=()=>{V.value=!0},R=()=>{k.value=!0},H=()=>{x.value=!0},Q=e=>{var t;a("log","at pages/addPlant/addPlant.vue:505",e),c.value=e.name,i.formData.province=e.id,t=e.id,On({province_code:t}).then((e=>{E.splice(0,E.length,...e.data.map(((e,t)=>({name:e.city_name,id:e.city_code}))))}))},W=e=>{var t;d.value=e.name,i.formData.city=e.id,t=e.id,qn({city_code:t}).then((e=>{B.splice(0,B.length,...e.data.map(((e,t)=>({name:e.county_name,id:e.county_code}))))}))},J=e=>{var t;u.value=e.name,i.formData.area=e.id,t=e.id,$n({county_code:t}).then((e=>{S.splice(0,N.length,...e.data.map(((e,t)=>({name:e.town_name,id:e.town_code}))))}))},K=e=>{var t;m.value=e.name,i.formData.street=e.id,t=e.id,Ln({town_code:t}).then((e=>{D.splice(0,N.length,...e.data.map(((e,t)=>({name:e.village_name,id:e.village_code}))))}))},Y=e=>{p.value=e.name,i.formData.village=e.id,zn().then((e=>{I.splice(0,N.length,...e.data.map(((e,t)=>({name:e.group_name,id:e.group_code}))))}))},X=e=>{h.value=e.name,i.formData.bridge=e.id},Z=()=>{uni.navigateTo({url:"/pages/addPlant/select_address_n",success:e=>{uni.$once("setData",(e=>{a("log","at pages/addPlant/addPlant.vue:547","选择地址",e=JSON.parse(e||"{}")),i.formData.address=e.address,i.formData.latitude=e.lat,i.formData.longitude=e.lon}))}})};l((()=>{n.value.setRules(i.rules)}));const ee=async()=>{try{const e=await n.value.validate();if(i.formData.latitude&&i.formData.longitude||(uni.showToast({title:"检测到您还没有获取具体位置信息, 正在跳转获取位置",icon:"none"}),setTimeout((()=>{Z()}),800)),e){if(0==s.length)return void uni.$u.toast("请上传图片");i.formData.pic=JSON.stringify(s),jn(i.formData).then((e=>{a("log","at pages/addPlant/addPlant.vue:588",e),1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/addPlant/addPlant.vue:599","表单验证未通过")}catch(e){a("error","at pages/addPlant/addPlant.vue:603",e)}};return r((e=>{Un().then((e=>{N.splice(0,N.length,...e.data.map(((e,t)=>({name:e.province_name,id:e.province_code}))))})),Mn().then((e=>{T.splice(0,T.length,...e.data.map(((e,t)=>({name:e.name,value:e.value,id:e.id}))))})),Rn().then((e=>{P.splice(0,P.length,...e.data.map(((e,t)=>({name:e.name,value:e.value,id:e.id}))))}))})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("up-form-item"),ni),te=o(e.resolveDynamicComponent("u-icon"),C),ae=o(e.resolveDynamicComponent("u-image"),A),oe=o(e.resolveDynamicComponent("up-form"),Ei),ne=o(e.resolveDynamicComponent("u-action-sheet"),G),ie=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(oe,{labelWidth:"130",model:i.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"养殖基地信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"养殖基地名称",prop:"farm_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地名称",border:"none",modelValue:i.formData.farm_name,"onUpdate:modelValue":a[0]||(a[0]=e=>i.formData.farm_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地类型",prop:"farm_type",borderBottom:"",required:"",onClick:R},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择养殖基地类型",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:f.value,"onUpdate:modelValue":a[1]||(a[1]=e=>f.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖种类",prop:"breed_type",borderBottom:"",required:"",onClick:H},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择养殖种类",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:g.value,"onUpdate:modelValue":a[2]||(a[2]=e=>g.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地规模(亩)",prop:"form_scale",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地规模",type:"number",border:"none",modelValue:i.formData.form_scale,"onUpdate:modelValue":a[3]||(a[3]=e=>i.formData.form_scale=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"负责人",prop:"master",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人姓名",border:"none",modelValue:i.formData.master,"onUpdate:modelValue":a[4]||(a[4]=e=>i.formData.master=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"负责人电话",prop:"master_contact",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人电话",type:"number",border:"none",modelValue:i.formData.master_contact,"onUpdate:modelValue":a[5]||(a[5]=e=>i.formData.master_contact=e)},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"c-title"},"地址信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"所在省份",prop:"province",borderBottom:"",required:"",onClick:q},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在省份",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:c.value,"onUpdate:modelValue":a[6]||(a[6]=e=>c.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在城市",prop:"city",borderBottom:"",required:"",onClick:$},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在城市",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:d.value,"onUpdate:modelValue":a[7]||(a[7]=e=>d.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在区县",prop:"area",borderBottom:"",required:"",onClick:L},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在区县",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:u.value,"onUpdate:modelValue":a[8]||(a[8]=e=>u.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在镇街",prop:"street",borderBottom:"",required:"",onClick:z},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在镇街",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:m.value,"onUpdate:modelValue":a[9]||(a[9]=e=>m.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在乡村",prop:"village",borderBottom:"",required:"",onClick:j},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在乡村",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:p.value,"onUpdate:modelValue":a[10]||(a[10]=e=>p.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在小队",prop:"bridge",borderBottom:"",required:"",onClick:M},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在小队",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:h.value,"onUpdate:modelValue":a[11]||(a[11]=e=>h.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地详细地址",prop:"address",style:{position:"relative"},borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地详细地址",suffixIcon:"map","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:i.formData.address,"onUpdate:modelValue":a[12]||(a[12]=e=>i.formData.address=e)},null,8,["modelValue"]),e.createElementVNode("view",{style:{position:"absolute",right:"0",width:"50rpx",height:"100%"},onClick:Z})])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"养殖基地图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.createVNode(te,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"]),e.createVNode(ae,{src:t,width:"150.85rpx",height:"150.85rpx"},null,8,["src"])])])))),256))])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"code-img"},[e.createElementVNode("view",{class:"",onClick:O},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(ae,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])])])])),_:1},8,["model"]),e.createVNode(ne,{show:v.value,keyName:"name",closeOnClickOverlay:"",actions:N,title:"请选择",onClose:a[13]||(a[13]=e=>v.value=!1),onSelect:Q},null,8,["show","actions"]),e.createVNode(ne,{show:y.value,keyName:"name",actions:E,title:"请选择",onClose:a[14]||(a[14]=e=>y.value=!1),onSelect:W},null,8,["show","actions"]),e.createVNode(ne,{show:b.value,keyName:"name",actions:B,title:"请选择",onClose:a[15]||(a[15]=e=>b.value=!1),onSelect:J},null,8,["show","actions"]),e.createVNode(ne,{show:w.value,keyName:"name",actions:S,title:"请选择",onClose:a[16]||(a[16]=e=>w.value=!1),onSelect:K},null,8,["show","actions"]),e.createVNode(ne,{show:_.value,keyName:"name",actions:D,title:"请选择",onClose:a[17]||(a[17]=e=>_.value=!1),onSelect:Y},null,8,["show","actions"]),e.createVNode(ne,{show:V.value,keyName:"name",actions:I,title:"请选择",onClose:a[18]||(a[18]=e=>V.value=!1),onSelect:X},null,8,["show","actions"]),e.createVNode(ne,{show:k.value,keyName:"name",actions:T,title:"请选择",onClose:a[19]||(a[19]=e=>k.value=!1),onSelect:F},null,8,["show","actions"]),e.createVNode(ne,{show:x.value,keyName:"name",actions:P,title:"请选择",onClose:a[20]||(a[20]=e=>x.value=!1),onSelect:U},null,8,["show","actions"]),e.createVNode(ie,{class:"btn",onClick:ee},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1})])])}}};const Nr=x({},[["render",function(t,a){return e.openBlock(),e.createElementBlock("view",{class:""}," 设备列表 ")}]]),Cr={props:{length:{type:[String,Number],default:w.swiperIndicator.length},current:{type:[String,Number],default:w.swiperIndicator.current},indicatorActiveColor:{type:String,default:w.swiperIndicator.indicatorActiveColor},indicatorInactiveColor:{type:String,default:w.swiperIndicator.indicatorInactiveColor},indicatorMode:{type:String,default:w.swiperIndicator.indicatorMode}}};const Er=x({name:"u-swiper-indicator",mixins:[V,k,Cr],data:()=>({lineWidth:22}),computed:{lineStyle(){let e={};return e.width=uni.$u.addUnit(this.lineWidth),e.transform=`translateX(${uni.$u.addUnit(this.current*this.lineWidth)})`,e.backgroundColor=this.indicatorActiveColor,e},dotStyle(){return e=>{let t={};return t.backgroundColor=e===this.current?this.indicatorActiveColor:this.indicatorInactiveColor,t}}}},[["render",function(t,a,o,n,i,r){return e.openBlock(),e.createElementBlock("view",{class:"u-swiper-indicator"},["line"===t.indicatorMode?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["u-swiper-indicator__wrapper",[`u-swiper-indicator__wrapper--${t.indicatorMode}`]]),style:e.normalizeStyle({width:t.$u.addUnit(i.lineWidth*t.length),backgroundColor:t.indicatorInactiveColor})},[e.createElementVNode("view",{class:"u-swiper-indicator__wrapper--line__bar",style:e.normalizeStyle([r.lineStyle])},null,4)],6)):e.createCommentVNode("",!0),"dot"===t.indicatorMode?(e.openBlock(),e.createElementBlock("view",{key:1,class:"u-swiper-indicator__wrapper"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.length,((a,o)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["u-swiper-indicator__wrapper__dot",[o===t.current&&"u-swiper-indicator__wrapper__dot--active"]]),key:o,style:e.normalizeStyle([r.dotStyle(o)])},null,6)))),128))])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-aecd6c92"]]),Br={props:{list:{type:Array,default:w.swiper.list},indicator:{type:Boolean,default:w.swiper.indicator},indicatorActiveColor:{type:String,default:w.swiper.indicatorActiveColor},indicatorInactiveColor:{type:String,default:w.swiper.indicatorInactiveColor},indicatorStyle:{type:[String,Object],default:w.swiper.indicatorStyle},indicatorMode:{type:String,default:w.swiper.indicatorMode},autoplay:{type:Boolean,default:w.swiper.autoplay},current:{type:[String,Number],default:w.swiper.current},currentItemId:{type:String,default:w.swiper.currentItemId},interval:{type:[String,Number],default:w.swiper.interval},duration:{type:[String,Number],default:w.swiper.duration},circular:{type:Boolean,default:w.swiper.circular},previousMargin:{type:[String,Number],default:w.swiper.previousMargin},nextMargin:{type:[String,Number],default:w.swiper.nextMargin},acceleration:{type:Boolean,default:w.swiper.acceleration},displayMultipleItems:{type:Number,default:w.swiper.displayMultipleItems},easingFunction:{type:String,default:w.swiper.easingFunction},keyName:{type:String,default:w.swiper.keyName},imgMode:{type:String,default:w.swiper.imgMode},height:{type:[String,Number],default:w.swiper.height},bgColor:{type:String,default:w.swiper.bgColor},radius:{type:[String,Number],default:w.swiper.radius},loading:{type:Boolean,default:w.swiper.loading},showTitle:{type:Boolean,default:w.swiper.showTitle}}},Sr={name:"u-swiper",mixins:[V,k,Br],data:()=>({currentIndex:0}),watch:{current(e,t){e!==t&&(this.currentIndex=e)}},emits:["click","change"],computed:{itemStyle(){return e=>{const t={};return this.nextMargin&&this.previousMargin&&(t.borderRadius=uni.$u.addUnit(this.radius),e!==this.currentIndex&&(t.transform="scale(0.92)")),t}}},methods:{getItemType(e){return"string"==typeof e?uni.$u.test.video(this.getSource(e))?"video":"image":"object"==typeof e&&this.keyName?e.type?"image"===e.type?"image":"video"===e.type?"video":"image":uni.$u.test.video(this.getSource(e))?"video":"image":void 0},getSource(e){return"string"==typeof e?e:"object"==typeof e&&this.keyName?e[this.keyName]:(uni.$u.error("请按格式传递列表参数"),"")},change(e){const{current:t}=e.detail;this.pauseVideo(this.currentIndex),this.currentIndex=t,this.$emit("change",e.detail)},pauseVideo(e){const t=this.getSource(this.list[e]);if(uni.$u.test.video(t)){uni.createVideoContext(`video-${e}`,this).pause()}},getPoster:e=>"object"==typeof e&&e.poster?e.poster:"",clickHandler(e){this.$emit("click",e)}}};const Dr=x(Sr,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-loading-icon"),T),c=o(e.resolveDynamicComponent("u-swiper-indicator"),Er);return e.openBlock(),e.createElementBlock("view",{class:"u-swiper",style:e.normalizeStyle({backgroundColor:t.bgColor,height:t.$u.addUnit(t.height),borderRadius:t.$u.addUnit(t.radius)})},[t.loading?(e.openBlock(),e.createElementBlock("view",{key:0,class:"u-swiper__loading"},[e.createVNode(s,{mode:"circle"})])):(e.openBlock(),e.createElementBlock("swiper",{key:1,class:"u-swiper__wrapper",style:e.normalizeStyle({height:t.$u.addUnit(t.height)}),onChange:a[0]||(a[0]=(...e)=>l.change&&l.change(...e)),circular:t.circular,interval:t.interval,duration:t.duration,autoplay:t.autoplay,current:t.current,currentItemId:t.currentItemId,previousMargin:t.$u.addUnit(t.previousMargin),nextMargin:t.$u.addUnit(t.nextMargin),acceleration:t.acceleration,displayMultipleItems:t.displayMultipleItems,easingFunction:t.easingFunction},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,((a,o)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"u-swiper__wrapper__item",key:o},[e.createElementVNode("view",{class:"u-swiper__wrapper__item__wrapper",style:e.normalizeStyle([l.itemStyle(o)])},["image"===l.getItemType(a)?(e.openBlock(),e.createElementBlock("image",{key:0,class:"u-swiper__wrapper__item__wrapper__image",src:l.getSource(a),mode:t.imgMode,onClick:e=>l.clickHandler(o),style:e.normalizeStyle({height:t.$u.addUnit(t.height),borderRadius:t.$u.addUnit(t.radius)})},null,12,["src","mode","onClick"])):e.createCommentVNode("",!0),"video"===l.getItemType(a)?(e.openBlock(),e.createElementBlock("video",{key:1,class:"u-swiper__wrapper__item__wrapper__video",id:`video-${o}`,"enable-progress-gesture":!1,src:l.getSource(a),poster:l.getPoster(a),title:t.showTitle&&t.$u.test.object(a)&&a.title?a.title:"",style:e.normalizeStyle({height:t.$u.addUnit(t.height)}),controls:"",onClick:e=>l.clickHandler(o)},null,12,["id","src","poster","title","onClick"])):e.createCommentVNode("",!0),t.showTitle&&t.$u.test.object(a)&&a.title&&t.$u.test.image(l.getSource(a))?(e.openBlock(),e.createElementBlock("text",{key:2,class:"u-swiper__wrapper__item__wrapper__title u-line-1"},e.toDisplayString(a.title),1)):e.createCommentVNode("",!0)],4)])))),128))],44,["circular","interval","duration","autoplay","current","currentItemId","previousMargin","nextMargin","acceleration","displayMultipleItems","easingFunction"])),e.createElementVNode("view",{class:"u-swiper__indicator",style:e.normalizeStyle([t.$u.addStyle(t.indicatorStyle)])},[e.renderSlot(t.$slots,"indicator",{},(()=>[t.loading||!t.indicator||t.showTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:0,indicatorActiveColor:t.indicatorActiveColor,indicatorInactiveColor:t.indicatorInactiveColor,length:t.list.length,current:r.currentIndex,indicatorMode:t.indicatorMode},null,8,["indicatorActiveColor","indicatorInactiveColor","length","current","indicatorMode"]))]),!0)],4)],4)}],["__scopeId","data-v-d129bdab"]]),Ar=e=>An.get("/fence_house/list",e),Ir=e=>An.get("/animal_info/detail",e),Tr=e=>An.get("/animal_info/lists",e),Pr=e=>An.get("/operation_log/index",e),Fr={__name:"results",setup(t){e.ref("");const a=e.ref(""),n=e.reactive({});e.ref(""),r((e=>{a.value=e.sn,i(),u()})),s((()=>{c.value.page_no++,u()}));const i=()=>{Ir({sn:a.value}).then((e=>{1==e.code&&(e.data.pic=JSON.parse(e.data.pic||"[]"),Object.assign(n,e.data))}))},l=e.ref([]);Qn().then((e=>{l.value=e.data}));const c=e.ref({animal_sn:"6655",page_no:1,page_size:10}),d=e.ref([]),u=()=>{var e;(e=c.value,An.get("/index/suYuan",e)).then((e=>{e.data.lists.length<=0||(e.data.lists=e.data.lists.map((e=>((e={...e,...e.detail}).pic&&(e.pic=JSON.parse(e.pic)),e))),d.value=[...d.value,...e.data.lists])}))};return(t,a)=>{const i=o(e.resolveDynamicComponent("u-swiper"),Dr),r=o(e.resolveDynamicComponent("up-input"),ai),s=o(e.resolveDynamicComponent("u-form-item"),ni),c=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"banner"},[e.createVNode(i,{list:n.pic,width:"100%",height:"484rpx"},null,8,["list"])]),Object.keys(n).length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"content-con-a"},[e.createElementVNode("view",{class:"shop_detail"},[e.createElementVNode("view",{class:"tit"}," 动物信息 "),e.createElementVNode("view",{class:"shop_detail-botm"},[e.createElementVNode("view",{class:"detail"},[e.createElementVNode("view",{class:"detaila"}," 耳号: "),e.createElementVNode("view",{class:"detailb"},e.toDisplayString(n.sn),1)]),e.createElementVNode("view",{class:"detail"},[e.createElementVNode("view",{class:"detaila"}," 品种: "),e.createElementVNode("view",{class:"detailb"},e.toDisplayString(n.brand),1)]),e.createElementVNode("view",{class:"detail"},[e.createElementVNode("view",{class:"detaila"}," 性别: "),e.createElementVNode("view",{class:"detailb"},e.toDisplayString(1==n.gender?"公":"母"),1)])])]),e.createElementVNode("view",{class:"shop_action"})])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"card-d",key:a},[2==t.type?(e.openBlock(),e.createBlock(c,{key:0,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"驱虫信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"驱虫药名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",type:"txt",border:"none",modelValue:t.vermifuge_name,"onUpdate:modelValue":e=>t.vermifuge_name=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"驱虫方式",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.deworming_method,"onUpdate:modelValue":e=>t.deworming_method=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"驱虫时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0),3==t.type?(e.openBlock(),e.createBlock(c,{key:1,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂食信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"饲料种类",borderBottom:""},{default:e.withCtx((()=>{return[e.createElementVNode("view",{style:{"font-weight":"600"}},e.toDisplayString((a=t.feed_type,(null==(o=l.value.find((e=>e.value==a)))?void 0:o.name)||"")),1)];var a,o})),_:2},1024),e.createVNode(s,{label:"饲料品牌",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.feed_brand,"onUpdate:modelValue":e=>t.feed_brand=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"饲料消耗量(kg)",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",type:"number",border:"none",modelValue:t.feed_consumption,"onUpdate:modelValue":e=>t.feed_consumption=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"喂食时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0),1==t.type?(e.openBlock(),e.createBlock(c,{key:2,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"消毒信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"消毒剂名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.disinfectant_name,"onUpdate:modelValue":e=>t.disinfectant_name=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒剂浓度",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.concentration,"onUpdate:modelValue":e=>t.concentration=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒方法",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.disinfectant_method,"onUpdate:modelValue":e=>t.disinfectant_method=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒区域",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.disinfectant_area,"onUpdate:modelValue":e=>t.disinfectant_area=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.operator,"onUpdate:modelValue":e=>t.operator=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"消毒时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0),4==t.type?(e.openBlock(),e.createBlock(c,{key:3,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"疫苗信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"疫苗名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccine_name,"onUpdate:modelValue":e=>t.vaccine_name=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"疫苗厂家",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccine_manufacturers,"onUpdate:modelValue":e=>t.vaccine_manufacturers=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"疫苗批次号",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccine_batch,"onUpdate:modelValue":e=>t.vaccine_batch=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"接种方式",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccination_method,"onUpdate:modelValue":e=>t.vaccination_method=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"接种部位",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.vaccination_site,"onUpdate:modelValue":e=>t.vaccination_site=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"免疫有限期",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.immune_validity_period,"onUpdate:modelValue":e=>t.immune_validity_period=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"注射人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.operator,"onUpdate:modelValue":e=>t.operator=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"接种时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0),5==t.type?(e.openBlock(),e.createBlock(c,{key:4,labelWidth:"130",model:t,ref_for:!0,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂水信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(s,{label:"喂水量(L)",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.water_consumption,"onUpdate:modelValue":e=>t.water_consumption=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"喂水人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.operator,"onUpdate:modelValue":e=>t.operator=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createVNode(s,{label:"喂水时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{readonly:"",border:"none",modelValue:t.create_time,"onUpdate:modelValue":e=>t.create_time=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(s,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(t.remark),1)])),_:2},1024)])])),_:2},1032,["model"])):e.createCommentVNode("",!0)])))),128))])}}},Ur={__name:"detail",setup(t){const n=e.ref(""),i=e.reactive([]);e.ref(""),r((e=>{n.value=e.id,l(e.plant_id,e.type)}));const l=(e,t)=>{var a;(a={plant_id:e,type:t},An.get("/action/listForType",a)).then((e=>{1==e.code&&(i.splice(0,i.length,...e.data),e.data.detai)}))},s=e=>{uni.previewImage({urls:e})},c=e=>{a("log","at pages/husbandryForm/detail.vue:248",e)};return(t,a)=>{const n=o(e.resolveDynamicComponent("u-swiper"),Dr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"content-con-a"},[e.createElementVNode("view",{class:"shop_action"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:""},[e.createElementVNode("view",{class:"tit"},e.toDisplayString(t.type_text),1),3!=t.type&&5!=t.type?(e.openBlock(),e.createElementBlock("view",{key:0,class:"shop_action-detail"},[e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 施肥面积: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.area)+"亩 ",1)]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"},[e.createTextVNode(e.toDisplayString(t.type_text.slice(0,-2)),1),2==t.type||4==t.type?(e.openBlock(),e.createElementBlock("text",{key:0,class:""},"剂")):e.createCommentVNode("",!0),e.createTextVNode("品种: ")]),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.kind),1)]),t.detail.breed?(e.openBlock(),e.createElementBlock("view",{key:0,class:"action-detail"},[e.createElementVNode("view",{class:"title"},[e.createTextVNode(e.toDisplayString(t.type_text.slice(0,-2)),1),2==t.type||4==t.type?(e.openBlock(),e.createElementBlock("text",{key:0,class:""},"剂")):e.createCommentVNode("",!0),e.createTextVNode("品牌: ")]),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.breed),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"},[e.createTextVNode(e.toDisplayString(t.type_text.slice(0,-2)),1),2==t.type||4==t.type?(e.openBlock(),e.createElementBlock("text",{key:0,class:""},"剂")):e.createCommentVNode("",!0),e.createTextVNode("用量: ")]),e.createElementVNode("view",{class:"detail"},[e.createTextVNode(e.toDisplayString(t.detail.dosage)+" ",1),4==t.type?(e.openBlock(),e.createElementBlock("text",{key:0},"升")):e.createCommentVNode("",!0),4!=t.type&&5!=t.type?(e.openBlock(),e.createElementBlock("text",{key:1},"斤")):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 参与人: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.user),1)]),t.detail.start_date?(e.openBlock(),e.createElementBlock("view",{key:1,class:"action-detail"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"开始时间: ",1),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.start_date),1)])):e.createCommentVNode("",!0),t.detail.end_date?(e.openBlock(),e.createElementBlock("view",{key:2,class:"action-detail"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"结束时间: ",1),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.end_date),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"action-detail-img"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"图片: ",1),t.detail&&t.detail.pic&&t.detail.pic.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"detail-img"},[e.createVNode(n,{list:t.detail.pic,onClick:c,indicator:"",indicatorMode:"dot",circular:""},null,8,["list"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),3==t.type?(e.openBlock(),e.createElementBlock("view",{key:1,class:"shop_action-detail"},[e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 灌溉面积: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.area)+"亩 ",1)]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 灌溉方式: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(1==t.detail.type?"喷灌":2==t.detail.type?"滴灌":"沟灌"),1)]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title"}," 参与人: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.user),1)]),t.detail.start_date?(e.openBlock(),e.createElementBlock("view",{key:0,class:"action-detail"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"开始时间: ",1),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.start_date),1)])):e.createCommentVNode("",!0),t.detail.end_date?(e.openBlock(),e.createElementBlock("view",{key:1,class:"action-detail"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.type_text.slice(0,-2))+"结束时间: ",1),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.end_date),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"action-detail-img"},[e.createElementVNode("view",{class:"title"}," 灌溉图片: "),t.detail&&t.detail.pic&&t.detail.pic.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"detail-img"},[e.createElementVNode("image",{onClick:e=>s(t.detail.pic),src:t.detail.pic[0],mode:"aspectFit"},null,8,["onClick","src"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),5==t.type?(e.openBlock(),e.createElementBlock("view",{key:2,class:"shop_action-detail"},[e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title",style:{width:"200rpx"}}," 收获时间: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.create_time),1)]),e.createElementVNode("view",{class:"action-detail"},[e.createElementVNode("view",{class:"title",style:{width:"200rpx"}}," 参与人: "),e.createElementVNode("view",{class:"detail"},e.toDisplayString(t.detail.user),1)]),e.createElementVNode("view",{class:"action-detail-img"},[e.createElementVNode("view",{class:"title"}," 收获图片: "),t.detail&&t.detail.pic&&t.detail.pic.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"detail-img"},[e.createElementVNode("image",{onClick:e=>s(t.detail.pic),src:t.detail.pic[0],mode:"aspectFit"},null,8,["onClick","src"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])))),256))])])):e.createCommentVNode("",!0)])}}},Or={data:()=>({pwdShow:{old_password:!1,password:!1,password_confirm:!1},formData:{old_password:"",password:"",password_confirm:""},rules:{old_password:{type:"string",required:!0,min:6,max:18,message:"请输入6-18位密码",trigger:["change","blur"]},password:{type:"string",required:!0,min:6,max:18,message:"请输入6-18位密码",trigger:["change","blur"]},password_confirm:{type:"string",required:!0,min:6,max:18,message:"请输入6-18位密码",trigger:["change","blur"]}}}),methods:{submit(){this.$refs.formRef.validate().then((async e=>{if(e){if(this.formData.password==this.formData.old_password)return uni.$u.toast("新密码不能与原密码一致");if(this.formData.password!==this.formData.password_confirm)return uni.$u.toast("两次新密码不一致");(t=this.formData,An.post("/user/changePassword",t)).then((e=>{1==e.code&&(uni.$u.toast("修改成功"),uni.switchTab({url:"/pages/index/personal"}))}))}var t}))}}};const qr=x(Or,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-input"),ai),c=o(e.resolveDynamicComponent("u-form-item"),ni),d=o(e.resolveDynamicComponent("u-button"),Si),u=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"reset-password"},[e.createVNode(u,{ref:"formRef",rules:r.rules,model:r.formData,labelPosition:"top"},{default:e.withCtx((()=>[e.createVNode(c,{label:"原密码",labelWidth:"140rpx",borderBottom:"",prop:"old_password","left-icon":"lock"},{default:e.withCtx((()=>[e.createVNode(s,{placeholder:"请输入原密码",border:"surround",modelValue:r.formData.old_password,"onUpdate:modelValue":a[0]||(a[0]=e=>r.formData.old_password=e),password:!r.pwdShow.old_password,class:"ipt",customStyle:"padding:20rpx 10rpx"},null,8,["modelValue","password"])])),_:1}),e.createVNode(c,{label:"新密码",labelWidth:"140rpx",borderBottom:"",prop:"password","left-icon":"lock"},{default:e.withCtx((()=>[e.createVNode(s,{border:"surround",class:"ipt",customStyle:"padding:20rpx 10rpx",modelValue:r.formData.password,"onUpdate:modelValue":a[1]||(a[1]=e=>r.formData.password=e),password:!r.pwdShow.password,placeholder:"请输入新密码"},null,8,["modelValue","password"])])),_:1}),e.createVNode(c,{label:"确认密码",labelWidth:"180rpx",borderBottom:"",prop:"password_confirm","left-icon":"lock"},{default:e.withCtx((()=>[e.createVNode(s,{border:"surround",modelValue:r.formData.password_confirm,"onUpdate:modelValue":a[2]||(a[2]=e=>r.formData.password_confirm=e),password:!r.pwdShow.password_confirm,placeholder:"请确认新密码",class:"ipt",customStyle:"padding:20rpx 10rpx"},null,8,["modelValue","password"])])),_:1}),e.createVNode(d,{style:{"margin-top":"28rpx","background-color":"#feb048",color:"#fff"},customStyle:"border-radius: 50rpx;height:100rpx",onClick:l.submit},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1},8,["onClick"])])),_:1},8,["rules","model"])])])}],["__scopeId","data-v-6f5542e2"]]),$r={__name:"personal",setup(t){r((()=>{uni.hideTabBar()}));const a=e.reactive({});i((()=>{null!=wn.state.userInfo&&Object.assign(a,wn.state.userInfo)}));const n=()=>{uni.previewImage({urls:[a.avatar]})},l=e.reactive([{text:"安全设置",nav:"/pages/updatePassword/updatePassword"}]),s=()=>{var e;wn.state.userInfo?An.get("/login/logout",e).then((e=>{1==e.code&&(uni.$u.toast("退出登录"),uni.navigateTo({url:"/pages/Login/login"}),uni.clearStorageSync())})):uni.navigateTo({url:"/pages/Login/login"})};return(t,i)=>{const r=o(e.resolveDynamicComponent("u--image"),A),c=o(e.resolveDynamicComponent("u-icon"),C),d=o(e.resolveDynamicComponent("up-button"),Si);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"head"},[e.createElementVNode("view",{class:"head-return"},[e.createVNode(En,{url:"/pages/index/personal"})]),e.createElementVNode("view",{class:"head-con"},[e.createElementVNode("view",{class:"avater"},[e.createVNode(r,{onClick:n,src:a.avatar,width:"130.28rpx",height:"130.28rpx",shape:"circle"},null,8,["src"])]),Object.keys(a).length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:""},[e.createElementVNode("view",{class:"head-li"},e.toDisplayString(a.nickname),1),e.createElementVNode("view",{class:"head-li"}," 电话: "+e.toDisplayString(a.mobile),1)])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"",onClick:i[0]||(i[0]=e=>{return t="/pages/Login/login",void uni.redirectTo({url:t});var t})}," 请登录 "))])]),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"card",style:{"border-radius":"10rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"card-li",key:a,onClick:e=>{return a=t.nav,void uni.navigateTo({url:a});var a}},[e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createElementVNode("view",{class:"",style:{"margin-right":"20rpx"}},[e.createVNode(c,{size:"20",name:"lock"})]),e.createElementVNode("view",{class:""},e.toDisplayString(t.text),1)]),e.createElementVNode("view",{class:""},[e.createVNode(c,{name:"arrow-right",size:"16"})])],8,["onClick"])))),128))]),e.createElementVNode("view",{class:"out-btn"},[Object.keys(a).length>0?(e.openBlock(),e.createBlock(d,{key:0,onClick:s,type:"primary",customStyle:"border:none;height:90rpx;border-radius: 500rpx;",color:"#EC6857",text:"退出登录"})):e.createCommentVNode("",!0)]),e.createVNode(Vn)])],64)}}},Lr=x({__name:"login",setup(t){const a=(void 0===n&&(n=null),e.inject(null!==n?n:Wo));var n;e.ref(0);const i=e.ref(!1),r=e.ref(!1);e.ref("获取验证码");const l=e.ref(0),s=e.reactive({account:"",password:"",code:"",scene:"2",terminal:""});e.reactive({list:[{name:"验证码登录",id:1},{name:"账号登录",id:2}]});const c=()=>{if(l.value)return;if(!s.account)return uni.$u.toast("账号不能为空");(e=>An.post("/index/code",e))({phone:s.account,scene:101}).then((e=>{1==e.code&&(i.value=!0,uni.$u.toast("验证码已发送"),(()=>{l.value=60;const e=setInterval((()=>{l.value-=1,l.value<=0&&(clearInterval(e),i.value=!1)}),1e3)})())}))},d=()=>{uni.navigateTo({url:"/pages/Login/resgier"})},u=()=>{return s.account?s.password||1!=s.scene?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(s.account)?s.code||2!=s.scene?(uni.showLoading({title:"登陆中"}),void(e=s,An.post("/login/account",e)).then((e=>{1==e.code&&(a.dispatch("saveUserInfo",e.data),uni.hideLoading(),wn.dispatch("changeTabbar",0),uni.switchTab({url:"/pages/index/massif"}),uni.$u.toast("登录成功"))}))):uni.$u.toast("验证码不能为空"):uni.$u.toast("请输入正确的手机号码"):uni.$u.toast("密码不能为空"):uni.$u.toast("账号不能为空");var e},m=e.ref(0),p=e.ref(2),h=e=>{p.value=e?1:2,s.scene=p.value,m.value=e},f=e=>`/static/main/login/${e}.png`;return e.onMounted((()=>{uni.getSystemInfo({success:e=>{const t=e.platform.toLowerCase();"ios"===t?s.terminal=5:"android"===t?s.terminal=6:("windows"===t||"mac"===t)&&(s.terminal=4)}})})),(t,a)=>{const n=o(e.resolveDynamicComponent("up-image"),A),i=o(e.resolveDynamicComponent("u-input"),ai),g=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createVNode(En,{style:{float:"right"}}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"tit"}," 您好! "),e.createElementVNode("view",{class:"tit",style:{"margin-bottom":"60rpx"}}," 欢迎进入吟龙养殖测溯系统! "),e.createElementVNode("view",{class:"input-card"},[e.createElementVNode("view",{class:"card-head"},[e.createElementVNode("view",{class:e.normalizeClass(["code-login",{act_code:2==p.value}]),onClick:a[0]||(a[0]=e=>h(0))},[e.createElementVNode("span",null,"验证码登录")],2),e.createElementVNode("view",{class:e.normalizeClass(["password-login",{act_password:1==p.value}]),onClick:a[1]||(a[1]=e=>h(320))}," 密码登录 ",2),e.createElementVNode("view",{class:"line",style:e.normalizeStyle({transform:"translateX("+m.value+"rpx)"})},null,4)]),e.createElementVNode("view",{class:"login-content",style:{position:"absolute",width:"680rpx",height:"900rpx","background-color":"white",top:"85rpx","z-index":"99999"}},[e.createElementVNode("view",{class:"code"},[1==p.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{"margin-bottom":"20rpx"}},[e.createElementVNode("view",{class:"",style:{display:"flex","margin-bottom":"10rpx"}},[e.createVNode(n,{src:f("sj"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("账号 ")]),e.createVNode(i,{placeholder:"请输入用户账号",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none",shape:"circle",border:"surround",modelValue:s.account,"onUpdate:modelValue":a[2]||(a[2]=e=>s.account=e)},null,8,["modelValue"]),e.createElementVNode("view",{class:"",style:{display:"flex","margin-top":"30rpx","margin-bottom":"10rpx"}},[e.createVNode(n,{src:f("mm"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("密码 ")]),e.createVNode(i,{password:!r.value,shape:"circle",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none",placeholder:"请输入密码",border:"surround",modelValue:s.password,"onUpdate:modelValue":a[3]||(a[3]=e=>s.password=e)},null,8,["password","modelValue"])])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createElementVNode("view",{class:"",style:{display:"flex","margin-bottom":"10rpx"}},[e.createVNode(n,{src:f("sj"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("手机号 ")]),e.createVNode(i,{placeholder:"请输入账号",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none",shape:"circle",border:"surround",modelValue:s.account,"onUpdate:modelValue":a[4]||(a[4]=e=>s.account=e)},null,8,["modelValue"]),e.createElementVNode("view",{class:"",style:{display:"flex","margin-top":"30rpx","margin-bottom":"10rpx"}},[e.createVNode(n,{src:f("yzm"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("验证码 ")]),e.createElementVNode("view",{class:"",style:{position:"relative"}},[e.createVNode(i,{type:"number",shape:"circle",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none;margin-bottom:15rpx",placeholder:"请输入验证码",border:"surround",modelValue:s.code,"onUpdate:modelValue":a[5]||(a[5]=e=>s.code=e)},null,8,["modelValue"]),e.createElementVNode("view",{class:"get-code",style:e.normalizeStyle({color:l.value?"#ADADAD":""}),onClick:c},[e.createElementVNode("text",{class:"lineY"}),e.createTextVNode(" 获取验证码 "),l.value?(e.openBlock(),e.createElementBlock("text",{key:0},e.toDisplayString(l.value)+"s",1)):e.createCommentVNode("",!0)],4)])])),e.createElementVNode("view",{class:"",style:{"font-size":"26rpx"}},[e.createElementVNode("text",null,"还没有账号?点击"),e.createTextVNode(),e.createElementVNode("text",{onClick:d,style:{color:"#feb048","text-decoration":"underline"}},"注册")]),e.createElementVNode("view",{class:"sub-btn"},[e.createVNode(g,{onClick:u,type:"primary",customStyle:"border:none;height:90rpx;border-radius: 50rpx;",color:"#feb048",text:"登录"})])])])])])])}}},[["__scopeId","data-v-58b452e7"]]),zr=x({__name:"resgier",setup(t){const a=e.ref(!1);e.ref(!1);const n=e.reactive({mobile:"",verify_code:"",password:"",password_confirm:""}),i=e.ref(0),r=e=>`/static/main/login/${e}.png`,l=()=>{if(i.value)return;if(!n.mobile)return uni.$u.toast("账号不能为空");(e=>An.post("/sms/sendCode",e))({mobile:n.mobile,scene:"YZMDL"}).then((e=>{1==e.code&&(uni.$u.toast("验证码已发送"),(()=>{i.value=60;const e=setInterval((()=>{i.value-=1,i.value<=0&&clearInterval(e)}),1e3)})())}))},s=()=>{var e;return n.mobile?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(n.mobile)?n.password?n.password.length<6?uni.$u.toast("密码长度至少在6-25位之间"):/^(?=.*[a-zA-Z])(?=.*\d).+$/.test(n.password)?(n.password_confirm=n.password,void(e=n,An.post("/login/register",e)).then((e=>{1==e.code?(uni.navigateBack({delta:1}),uni.$u.toast("注册成功")):e.data&&1==e.data.has_register&&uni.redirectTo({url:"/pages/Login/login"})}))):uni.$u.toast("密码要包含数字与英文"):uni.$u.toast("密码不能为空"):uni.$u.toast("请输入正确的手机号码"):uni.$u.toast("账号不能为空")},c=()=>{uni.navigateBack()};return(t,d)=>{const u=o(e.resolveDynamicComponent("u-icon"),C),m=o(e.resolveDynamicComponent("up-image"),A),p=o(e.resolveDynamicComponent("u-input"),ai),h=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"",style:{"margin-left":"20rpx",float:"left"},onClick:c},[e.createVNode(u,{name:"arrow-left",color:"white",size:"20"})]),e.createVNode(En,{style:{float:"right"}}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"tit",style:{"margin-bottom":"10rpx"}}," 您好! "),e.createElementVNode("view",{class:"tit"}," 欢迎进入吟龙养殖测溯系统! "),e.createElementVNode("view",{class:"input-card",style:{color:"#7A7A7A"}},[e.createElementVNode("view",{class:"login-type",style:{color:"black","font-weight":"bold"}},[e.createTextVNode(" 注册 "),e.createElementVNode("view",{class:"line"})]),e.createElementVNode("view",{class:"",style:{margin:"30rpx 0"}},[e.createElementVNode("view",{class:"",style:{display:"flex","margin-bottom":"10rpx"}},[e.createVNode(m,{src:r("sj"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("手机号 ")]),e.createVNode(p,{placeholder:"请输入账号",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none",shape:"circle",border:"surround",modelValue:n.mobile,"onUpdate:modelValue":d[0]||(d[0]=e=>n.mobile=e)},null,8,["modelValue"])]),e.createElementVNode("view",{class:"",style:{display:"flex","margin-top":"30rpx","margin-bottom":"10rpx"}},[e.createVNode(m,{src:r("yzm"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("验证码 ")]),e.createElementVNode("view",{class:"",style:{position:"relative"}},[e.createVNode(p,{type:"number",shape:"circle",customStyle:"background:#F5F5F5;height:80rpx;padding-left:40rpx;border:none;margin-bottom:15rpx",placeholder:"请输入验证码",border:"surround",modelValue:n.verify_code,"onUpdate:modelValue":d[1]||(d[1]=e=>n.verify_code=e)},null,8,["modelValue"]),e.createElementVNode("view",{class:"get-code",style:e.normalizeStyle({color:i.value?"#ADADAD":""}),onClick:l},[e.createElementVNode("text",{class:"lineY"}),e.createTextVNode(" 验证码 "),i.value?(e.openBlock(),e.createElementBlock("text",{key:0},e.toDisplayString(i.value)+"s",1)):e.createCommentVNode("",!0)],4)]),e.createElementVNode("view",{class:"",style:{margin:"30rpx 0"}},[e.createElementVNode("view",{class:"",style:{display:"flex","margin-top":"30rpx","margin-bottom":"10rpx"}},[e.createVNode(m,{src:r("mm"),width:"30rpx",height:"44rpx",style:{"margin-right":"20rpx"}},null,8,["src"]),e.createTextVNode("密码 ")]),e.createVNode(p,{password:!a.value,shape:"circle",customStyle:"background:#F5F5F5;height:80rpx;;padding-left:40rpx;border:none",placeholder:"请输入密码",border:"surround",modelValue:n.password,"onUpdate:modelValue":d[2]||(d[2]=e=>n.password=e)},null,8,["password","modelValue"])]),e.createElementVNode("view",{class:"sub-btn"},[e.createVNode(h,{onClick:s,type:"primary",customStyle:"border:none;height:90rpx;border-radius: 100rpx;",color:"#feb048",text:"注册"})])])])])}}},[["__scopeId","data-v-c1be9e40"]]),jr={__name:"manager",setup(t){r((()=>{uni.hideTabBar()}));const a=e.reactive([{name:"栏舍设置",tips:"栏舍新增/详情喂养、记录",bg:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/be364202312191601547849.png",color:"#cc841f",url:"/pages/plantAdmin/house"},{name:"档案管理",tips:"档案新增、档案详情/编辑",bg:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/8d37b202312251151062137.png",color:"#1f84cc",url:"/pages/record/record"},{name:"转栏记录",tips:"转入/转出舍栏、转栏时间",bg:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/cee51202312191634095436.png",color:"#c36136",url:"/pages/jump/jump"},{name:"离栏记录",tips:"离舍类型/原因、离舍时间",bg:"https://lihai001.oss-cn-chengdu.aliyuncs.com/def/3246c202312191633441356.png",color:"#366ecf",url:"/pages/leave/leave"}]);return(t,o)=>(e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title"}," 牲畜管理 "),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"card-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,class:"card-box",onClick:e=>{var a;(a=t.url)?uni.navigateTo({url:a}):uni.showToast({title:"暂未开放",icon:"none"})},style:e.normalizeStyle({backgroundImage:`url(${t.bg})`,color:t.color})},[e.createElementVNode("view",{class:"box-top"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:"btn",style:e.normalizeStyle({border:`2rpx solid ${t.color}`})},"点击进入",4)]),e.createElementVNode("view",{class:"box-bottom"},e.toDisplayString(t.tips),1)],12,["onClick"])))),128))]),e.createVNode(Vn)]))}},Mr={props:{shape:{type:String,default:w.search.shape},bgColor:{type:String,default:w.search.bgColor},placeholder:{type:String,default:w.search.placeholder},clearabled:{type:Boolean,default:w.search.clearabled},focus:{type:Boolean,default:w.search.focus},showAction:{type:Boolean,default:w.search.showAction},actionStyle:{type:Object,default:w.search.actionStyle},actionText:{type:String,default:w.search.actionText},inputAlign:{type:String,default:w.search.inputAlign},inputStyle:{type:Object,default:w.search.inputStyle},disabled:{type:Boolean,default:w.search.disabled},borderColor:{type:String,default:w.search.borderColor},searchIconColor:{type:String,default:w.search.searchIconColor},color:{type:String,default:w.search.color},placeholderColor:{type:String,default:w.search.placeholderColor},searchIcon:{type:String,default:w.search.searchIcon},searchIconSize:{type:[Number,String],default:w.search.searchIconSize},margin:{type:String,default:w.search.margin},animation:{type:Boolean,default:w.search.animation},modelValue:{type:String,default:w.search.value},value:{type:String,default:w.search.value},maxlength:{type:[String,Number],default:w.search.maxlength},height:{type:[String,Number],default:w.search.height},label:{type:[String,Number,null],default:w.search.label}}},Rr={name:"u-search",mixins:[V,k,Mr],data(){return{keyword:"",showClear:!1,show:!1,focused:this.focus}},watch:{keyword(e){this.$emit("update:modelValue",e),this.$emit("change",e)},modelValue:{immediate:!0,handler(e){this.keyword=e}}},computed:{showActionBtn(){return!this.animation&&this.showAction}},emits:["clear","search","custom","focus","blur","click","clickIcon","update:modelValue","change"],methods:{inputChange(e){this.keyword=e.detail.value},clear(){this.keyword="",this.$nextTick((()=>{this.$emit("clear")}))},search(e){this.$emit("search",e.detail.value);try{uni.hideKeyboard()}catch(t){}},custom(){this.$emit("custom",this.keyword);try{uni.hideKeyboard()}catch(it){}},getFocus(){this.focused=!0,this.animation&&this.showAction&&(this.show=!0),this.$emit("focus",this.keyword)},blur(){setTimeout((()=>{this.focused=!1}),100),this.show=!1,this.$emit("blur",this.keyword)},clickHandler(){this.disabled&&this.$emit("click")},clickIcon(e){this.$emit("clickIcon",this.keyword);try{uni.hideKeyboard()}catch(t){}}}};const Hr=x(Rr,[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("view",{class:"u-search",onClick:a[6]||(a[6]=(...e)=>l.clickHandler&&l.clickHandler(...e)),style:e.normalizeStyle([{margin:t.margin},t.$u.addStyle(t.customStyle)])},[e.createElementVNode("view",{class:"u-search__content",style:e.normalizeStyle({backgroundColor:t.bgColor,borderRadius:"round"==t.shape?"100px":"4px",borderColor:t.borderColor})},[t.$slots.label||null!==t.label?e.renderSlot(t.$slots,"label",{key:0},(()=>[e.createElementVNode("text",{class:"u-search__content__label"},e.toDisplayString(t.label),1)]),!0):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"u-search__content__icon"},[e.createVNode(s,{onClick:l.clickIcon,size:t.searchIconSize,name:t.searchIcon,color:t.searchIconColor?t.searchIconColor:t.color},null,8,["onClick","size","name","color"])]),e.createElementVNode("input",{"confirm-type":"search",onBlur:a[0]||(a[0]=(...e)=>l.blur&&l.blur(...e)),value:r.keyword,onConfirm:a[1]||(a[1]=(...e)=>l.search&&l.search(...e)),onInput:a[2]||(a[2]=(...e)=>l.inputChange&&l.inputChange(...e)),disabled:t.disabled,onFocus:a[3]||(a[3]=(...e)=>l.getFocus&&l.getFocus(...e)),focus:t.focus,maxlength:t.maxlength,"placeholder-class":"u-search__content__input--placeholder",placeholder:t.placeholder,"placeholder-style":`color: ${t.placeholderColor}`,class:"u-search__content__input",type:"text",style:e.normalizeStyle([{textAlign:t.inputAlign,color:t.color,backgroundColor:t.bgColor,height:t.$u.addUnit(t.height)},t.inputStyle])},null,44,["value","disabled","focus","maxlength","placeholder","placeholder-style"]),r.keyword&&t.clearabled&&r.focused?(e.openBlock(),e.createElementBlock("view",{key:1,class:"u-search__content__icon u-search__content__close",onClick:a[4]||(a[4]=(...e)=>l.clear&&l.clear(...e))},[e.createVNode(s,{name:"close",size:"11",color:"#ffffff",customStyle:"line-height: 12px"})])):e.createCommentVNode("",!0)],4),e.createElementVNode("text",{style:e.normalizeStyle([t.actionStyle]),class:e.normalizeClass(["u-search__action",[(l.showActionBtn||r.show)&&"u-search__action--active"]]),onClick:a[5]||(a[5]=e.withModifiers(((...e)=>l.custom&&l.custom(...e)),["stop","prevent"]))},e.toDisplayString(t.actionText),7)],4)}],["__scopeId","data-v-c20cd503"]]),Qr={__name:"house",setup(t){r((()=>{wn.state.userInfo||uni.redirectTo({url:"/pages/Login/login"})})),i((()=>{u()})),c((()=>{u(),uni.stopPullDownRefresh()})),s((()=>{m()}));const n=e.ref([]),l=e.reactive({page_no:1,page_size:15,fence_house_name:""}),d=e.ref([]);Hn().then((e=>{d.value=e.data}));const u=()=>{n.value.splice(0),l.page_no=1,m()},m=()=>{Ar(l).then((e=>{a("log","at pages/plantAdmin/house.vue:142",e),n.value=[...n.value,...e.data.lists],a("log","at pages/plantAdmin/house.vue:144",n.value)}))},p=e=>{try{return"string"==typeof e&&(e=JSON.parse(e||"[]")),e[0]}catch(it){return""}},h=e=>{0==e.length&&u()},f=()=>{u()},g=e=>{e?uni.navigateTo({url:e}):uni.showToast({title:"暂未开放",icon:"none"})},v=()=>{uni.navigateBack()};return e.onMounted((()=>{})),(t,a)=>{const i=o(e.resolveDynamicComponent("u-icon"),C),r=o(e.resolveDynamicComponent("u-search"),Hr);return e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title",onClick:v},[e.createVNode(i,{name:"arrow-left",color:"#fff",size:"40rpx",style:{"margin-right":"10rpx"}}),e.createTextVNode(),e.createElementVNode("text",{style:{"padding-bottom":"5rpx"}},"栏舍设置")]),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(i,{name:"plus",color:"#fff",size:"40rpx",style:{"margin-right":"20rpx"},onClick:a[0]||(a[0]=e=>g("/pages/plantAdmin/addHouse"))}),e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"serch"},[e.createVNode(r,{bgColor:"white","show-action":!1,placeholder:"请输入栏舍名称",modelValue:l.fence_house_name,"onUpdate:modelValue":a[1]||(a[1]=e=>l.fence_house_name=e),shape:"round",clearabled:!1,onChange:h},null,8,["modelValue"]),e.createElementVNode("view",{class:"ser-text",onClick:f}," 搜索 ")]),e.createElementVNode("view",{class:"tits"}," 栏舍信息 "),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,((t,a)=>{return e.openBlock(),e.createElementBlock("view",{class:"card",key:a,onClick:e=>g(`/pages/plantAdmin/houseDetail?id=${t.id}`)},[e.createElementVNode("image",{class:"img",src:p(t.pic)},null,8,["src"]),e.createElementVNode("view",{class:"tips"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.fence_house_name),1),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"动物名称: "),e.createElementVNode("view",null,e.toDisplayString(t.animal_name),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"动物类型: "),e.createElementVNode("view",null,e.toDisplayString((o=t.animal_type,(null==(n=d.value.find((e=>e.value==o)))?void 0:n.name)||"")),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"容量: "),e.createElementVNode("view",null,e.toDisplayString(t.capacity),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"负责人: "),e.createElementVNode("view",null,e.toDisplayString(t.master),1)]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"tip-name"},"创建时间: "),e.createElementVNode("view",null,e.toDisplayString(t.create_time),1)])])],8,["onClick"]);var o,n})),128)),0==n.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])])):e.createCommentVNode("",!0)])])}}},Wr={__name:"addHouse",setup(t){const n=e.ref(null),i=e.reactive({formData:{fence_house_name:"",fence_house_type:"",animal_name:"",animal_type:"",capacity:"",master:"",master_phone:"",pic:["https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80","https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80"]},rules:{fence_house_name:[{type:"string",required:!0,message:"请填写栏舍名称",trigger:["blur","change"]}],fence_house_type:[{type:"string",required:!0,message:"请选择栏舍类型",trigger:["blur","change"]}],animal_name:[{type:"string",required:!0,message:"请输入动物名称",trigger:["blur","change"]}],animal_type:[{type:"string",required:!0,message:"请输入动物类型",trigger:["blur","change"]}],capacity:[{type:"string",required:!0,message:"请输入栏舍容量",trigger:["blur","change"]}],master:[{type:"string",required:!0,message:"请输入负责人姓名",trigger:["blur","change"]}],master_phone:[{required:!0,message:"请输入手机号",trigger:["change","blur"]},{validator:(e,t,a)=>uni.$u.test.mobile(t),message:"手机号码不正确",trigger:["change","blur"]}]}}),s=e.reactive([]),c=e.ref(!1),d=e.ref(!1),u=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{1==e.code&&(s.push(e.data.url),a("log","at pages/plantAdmin/addHouse.vue:201",i.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},m=()=>{c.value=!0},p=()=>{d.value=!0},h=e.ref(""),f=e.ref(""),g=e=>{h.value=e.name,i.formData.fence_house_type=e.value},v=e=>{f.value=e.name,i.formData.animal_type=e.value};l((()=>{n.value.setRules(i.rules)}));const y=e.ref([]);Hn().then((e=>{y.value=e.data}));const b=e.ref([]);An.get("/common/dict_data_lists_by_type_value",{type_value:"fence_house_type"}).then((e=>{b.value=e.data}));const w=async()=>{try{if(await n.value.validate()){if(0==s.length)return void uni.$u.toast("请上传图片");i.formData.pic=JSON.stringify(s),i.formData.farm_id=wn.state.farm.id,(e=>An.post("/fence_house/add",e))(i.formData).then((e=>{a("log","at pages/plantAdmin/addHouse.vue:276",e),1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/plantAdmin/addHouse.vue:287","表单验证未通过")}catch(e){a("error","at pages/plantAdmin/addHouse.vue:291",e)}};return r((e=>{})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("up-form-item"),ni),_=o(e.resolveDynamicComponent("u-icon"),C),V=o(e.resolveDynamicComponent("u-image"),A),k=o(e.resolveDynamicComponent("up-form"),Ei),x=o(e.resolveDynamicComponent("u-action-sheet"),G),N=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"cards"},[e.createVNode(k,{labelWidth:"130",model:i.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"栏舍信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"栏舍名称",prop:"fence_house_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入栏舍名称",border:"none",modelValue:i.formData.fence_house_name,"onUpdate:modelValue":a[0]||(a[0]=e=>i.formData.fence_house_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"栏舍类型",prop:"fence_house_type",borderBottom:"",required:"",onClick:m},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择栏舍类型",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:h.value,"onUpdate:modelValue":a[1]||(a[1]=e=>h.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"动物名称",prop:"animal_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入动物名称",border:"none",modelValue:i.formData.animal_name,"onUpdate:modelValue":a[2]||(a[2]=e=>i.formData.animal_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"动物类型",prop:"animal_type",borderBottom:"",required:"",onClick:p},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择动物类型",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:f.value,"onUpdate:modelValue":a[3]||(a[3]=e=>f.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"容量",prop:"capacity",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入栏舍容量",border:"none",modelValue:i.formData.capacity,"onUpdate:modelValue":a[4]||(a[4]=e=>i.formData.capacity=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"负责人",prop:"master",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人姓名",border:"none",modelValue:i.formData.master,"onUpdate:modelValue":a[5]||(a[5]=e=>i.formData.master=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"负责人电话",prop:"master_phone",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人电话",type:"number",border:"none",modelValue:i.formData.master_phone,"onUpdate:modelValue":a[6]||(a[6]=e=>i.formData.master_phone=e)},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"栏舍图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.createVNode(_,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"]),e.createVNode(V,{src:t,width:"150.85rpx",height:"150.85rpx"},null,8,["src"])])])))),256))])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"code-img"},[e.createElementVNode("view",{class:"",onClick:u},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(V,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])])])])),_:1},8,["model"]),e.createVNode(x,{show:c.value,keyName:"name",closeOnClickOverlay:"",actions:b.value,title:"请选择",onClose:a[7]||(a[7]=e=>c.value=!1),onSelect:g},null,8,["show","actions"]),e.createVNode(x,{show:d.value,keyName:"name",actions:y.value,title:"请选择",onClose:a[8]||(a[8]=e=>d.value=!1),onSelect:v},null,8,["show","actions"]),e.createVNode(N,{class:"btn",onClick:w},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1})])])}}};const Jr=x({name:"u--image",mixins:[V,D,k],components:{uvImage:A},emits:["click","error","load"]},[["render",function(t,a,o,n,i,r){const l=e.resolveComponent("uvImage");return e.openBlock(),e.createBlock(l,{src:t.src,mode:t.mode,width:t.width,height:t.height,shape:t.shape,radius:t.radius,lazyLoad:t.lazyLoad,showMenuByLongpress:t.showMenuByLongpress,loadingIcon:t.loadingIcon,errorIcon:t.errorIcon,showLoading:t.showLoading,showError:t.showError,fade:t.fade,webp:t.webp,duration:t.duration,bgColor:t.bgColor,customStyle:t.customStyle,onClick:a[0]||(a[0]=e=>t.$emit("click")),onError:a[1]||(a[1]=e=>t.$emit("error")),onLoad:a[2]||(a[2]=e=>t.$emit("load"))},{loading:e.withCtx((()=>[e.renderSlot(t.$slots,"loading")])),error:e.withCtx((()=>[e.renderSlot(t.$slots,"error")])),_:3},8,["src","mode","width","height","shape","radius","lazyLoad","showMenuByLongpress","loadingIcon","errorIcon","showLoading","showError","fade","webp","duration","bgColor","customStyle"])}]]);var Kr=function(){return(Kr=Object.assign||function(e){for(var t,a=1,o=arguments.length;a>=1,this.framask[a+=e]=1},e.prototype.getWidth=function(){return this.width},e.prototype.putalign=function(e,t){this.qrframe[e+this.width*t]=1;for(var a=-2;a<2;a++)this.qrframe[e+a+this.width*(t-2)]=1,this.qrframe[e-2+this.width*(t+a+1)]=1,this.qrframe[e+2+this.width*(t+a)]=1,this.qrframe[e+a+1+this.width*(t+2)]=1;for(a=0;a<2;a++)this.setmask(e-1,t+a),this.setmask(e+1,t-a),this.setmask(e-a,t-1),this.setmask(e+a,t+1)},e.prototype.modnn=function(e){for(;255<=e;)e=((e-=255)>>8)+(255&e);return e},e.prototype.appendrs=function(e,t,a,o){for(var n,i=0;i>=1,this.framask[a+=e]},e.prototype.badruns=function(e){for(var t=0,a=0;a<=e;a++)5<=this.rlens[a]&&(t+=this.N1+this.rlens[a]-5);for(a=3;a=4*this.rlens[a]||3*this.rlens[a+3]>=4*this.rlens[a])&&(t+=this.N3);return t},e.prototype.toNum=function(e){return 0===e?1:0},e.prototype.applymask=function(e){switch(e){case 0:for(var t=0;t>1&1,a=0;a>n-12:t>>n)?(this.qrframe[5-d+this.width*(2-u+this.width-11)]=1,this.qrframe[2-u+this.width-11+this.width*(5-d)]=1):(this.setmask(5-d,2-u+this.width-11),this.setmask(2-u+this.width-11,5-d));for(u=0;u>4;this.strinbuf[2]|=255&r<<4,this.strinbuf[1]=r>>4,this.strinbuf[0]=64|r>>12}else{for(this.strinbuf[s+1]=0,this.strinbuf[s+2]=0;s--;)t=this.strinbuf[s],this.strinbuf[s+2]|=255&t<<4,this.strinbuf[s+1]=t>>4;this.strinbuf[1]|=255&r<<4,this.strinbuf[0]=64|r>>4}for(s=r+3-(l<10?1:0);s>=1)1&i&&(this.qrframe[this.width-1-f+8*this.width]=1,f<6?this.qrframe[8+this.width*f]=1:this.qrframe[8+this.width*(f+1)]=1);for(f=0;f<7;f++,i>>=1)1&i&&(this.qrframe[8+this.width*(this.width-7+f)]=1,f?this.qrframe[6-f+8*this.width]=1:this.qrframe[7+8*this.width]=1);return this.qrframe},e.prototype.badcheck=function(){for(var e=0,t=0,a=0,o=0,n=0,i=0,r=0,l=0;lthis.width*this.width;)c-=this.width*this.width,d++;for(e+=d*this.N4,s=0;sn[0]&&r[1]>12&15),o+=String.fromCharCode(128|t>>6&63)):o+=String.fromCharCode(192|t>>6&31),o+=String.fromCharCode(128|t>>0&63));return o}(e.code))?(i=r.Genframe(i),r=r.getWidth(),"[object String]"==Object.prototype.toString.call(e.id)?(o=uni.createCanvasContext(e.id,e.ctx||null),cl(n,e,o,i,r,t)):"[object Object]"==Object.prototype.toString.call(e.id)&&(o=e.id,cl(n,e,o,i,r,t))):a("warn","at uni_modules/wmf-code/js_sdk/index.js:1","二维码code转换错误")):a("warn","at uni_modules/wmf-code/js_sdk/index.js:1","没有找到二维码canvas id或者实列!"):a("warn","at uni_modules/wmf-code/js_sdk/index.js:1","没有找到二维码code")},vl=rl,yl=ol,bl=al;function wl(e){if([null,void 0,NaN,!1].includes(e))return e;if("object"!=typeof e&&"function"!=typeof e)return e;var t,a=(t=e,"[object Array]"===Object.prototype.toString.call(t)?[]:{});for(let o in e)e.hasOwnProperty(o)&&(a[o]="object"==typeof e[o]?wl(e[o]):e[o]);return a}function _l(e=32,t=!0,a=null){let o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[];if(a=a||o.length,e)for(let i=0;i({})}},emits:["generate","press","error"],setup(t,{expose:o,emit:n}){const i=t,r=i.options,l=e.getCurrentInstance(),s=bl(r.size);let c=e.reactive({destHeight:s*yl()+"px",destWidth:s*yl()+"px",width:s+"px",height:s+"px",listCode:[],id:_l()});e.onMounted((()=>{d(r),e.nextTick((()=>{u(r)}))})),e.watch((()=>i.options),(e=>{d(e);const t=bl(e.size);c.destWidth=yl()*t+"px",c.destHeight=yl()*t+"px",c.width=t+"px",c.height=t+"px",setTimeout((()=>{u(e)}),50)}),{deep:!0});const d=e=>{let t=wl(e);t.id=c.id,c.listCode=[t]},u=e=>{try{const t={...e,source:Vl(),id:c.id,ctx:l};gl(t,(e=>{n("generate",e)}))}catch(t){a("warn","at uni_modules/wmf-code/components/w-qrcode/w-qrcode.vue:69",t)}},m=e=>{n("press",e)},p=e=>{n("error",e.detail)};return o({GetCodeImg:async()=>{try{return await vl({id:c.id,source:Vl(),width:r.width,height:r.height,ctx:l})}catch(it){a("warn","at uni_modules/wmf-code/components/w-qrcode/w-qrcode.vue:74",it)}}}),(t,a)=>(e.openBlock(),e.createElementBlock("view",{onLongtap:e.withModifiers(m,["stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).listCode,(t=>(e.openBlock(),e.createElementBlock("canvas",{width:e.unref(c).destWidth,height:e.unref(c).destHeight,"canvas-id":t.id,id:t.id,style:e.normalizeStyle({width:e.unref(c).width,height:e.unref(c).height}),key:t.id,onError:p},null,44,["width","height","canvas-id","id"])))),128))],40,["onLongtap"]))}},xl={__name:"houseDetail",setup(t){const a=e.ref({code:"",size:460}),n=e.ref(""),l=async()=>{const e=await n.value.GetCodeImg();uni.saveImageToPhotosAlbum({filePath:e.tempFilePath,success(e){uni.showToast({title:"保存成功",icon:"success",duration:2e3})},fail(e){uni.showToast({title:"保存失败",icon:"none",duration:2e3})}})},s=e.ref(null),c=e.reactive([]),d=e.reactive({}),u=e.ref("");e.reactive([[{label:"种植",route:"/pages/husbandryForm/sow"},{label:"施肥",route:"/pages/husbandryForm/fertilize"},{label:"除草",route:"/pages/husbandryForm/weeding"},{label:"灌溉",route:"/pages/husbandryForm/irrigate"},{label:"除虫",route:"/pages/husbandryForm/Pest"},{label:"收获",route:"/pages/husbandryForm/harvest"}]]);const m=e.ref([]);Hn().then((e=>{m.value=e.data}));const p=e.ref([]);r((e=>{u.value=e.id,f()})),i((()=>{g(),Pr({fence_house_id:u.value}).then((e=>{e.data=e.data.map((e=>(null!=(e={...e.detail,create_time:e.create_time,type_text:e.type_text,type:e.type})&&(e.pic=JSON.parse(e.pic||"[]")),e))),p.value=e.data}))}));const h=e.ref(""),f=()=>{var e;(e={id:u.value},An.get("/fence_house/detail",e)).then((e=>{1==e.code&&(h.value=e.data.video_url,e.data.pic&&(e.data.pic=JSON.parse(e.data.pic||"[]")),Object.assign(d,e.data))}))},g=()=>{Tr({fence_house_id:u.value,page_no:1,page_size:3}).then((e=>{1==e.code&&(e.data.lists=e.data.lists.map((e=>(e.showCode=!1,e.pic=JSON.parse(e.pic||"[]"),e))),c.splice(0,c.length,...e.data.lists))}))},v=e.ref(!1),y=e.ref([]),b=e.ref(1),w=(e=1)=>{y.value=1==e?[{name:"购买"},{name:"自繁"}]:[{name:"喂食"},{name:"喂水"},{name:"消毒"},{name:"疫苗"},{name:"驱虫"}],b.value=e,v.value=!0},_=e=>{if(1==b.value)V(`/pages/plantAdmin/addBreed?name=${e.name}&type=${"购买"==e.name?1:2}&id=${d.id}&fence_house_name=${d.fence_house_name}`);else{if("喂食"==e.name)return V(`/pages/feed/feed?house_id=${d.id}`);if("喂水"==e.name)return V(`/pages/feed/water?house_id=${d.id}`);if("消毒"==e.name)return V(`/pages/feed/sterilize?house_id=${d.id}`);if("疫苗"==e.name)return V(`/pages/feed/vaccine?house_id=${d.id}`);if("驱虫"==e.name)return V(`/pages/feed/expelling?house_id=${d.id}`)}},V=e=>{uni.navigateTo({url:e})},k=(e,t)=>{3==e.type&&uni.navigateTo({url:"/pages/feedDetail/feedDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),5==e.type&&uni.navigateTo({url:"/pages/feedDetail/waterDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),1==e.type&&uni.navigateTo({url:"/pages/feedDetail/sterilizeDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),4==e.type&&uni.navigateTo({url:"/pages/feedDetail/vaccineDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),2==e.type&&uni.navigateTo({url:"/pages/feedDetail/expellingDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}})},x=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)},N=e=>{uni.previewImage({urls:[e]})};return(t,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C),f=o(e.resolveDynamicComponent("u--image"),A),g=o(e.resolveDynamicComponent("u---image"),Jr),b=o(e.resolveDynamicComponent("u-action-sheet"),G),E=o(e.resolveDynamicComponent("w-qrcode"),kl),B=o(e.resolveDynamicComponent("uni-popup"),Nn);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between","margin-bottom":"20rpx"}},[e.createElementVNode("view",{class:"tit",style:{"margin-bottom":"0"}}," 栏舍监控数据 "),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createVNode(r,{name:"clock",style:{"margin-right":"10rpx"}}),e.createElementVNode("text",{style:{color:"#ACACAC","font-size":"25rpx"}},"刷新时间: "+e.toDisplayString(x()),1)])]),e.createElementVNode("view",{class:"video",onClick:i[0]||(i[0]=e=>(()=>{if(!h.value)return uni.showToast({icon:"none",title:"该栏舍暂无监控"});let e=uni.getSystemInfoSync().platform;uni.navigateTo({url:`/pages/live/${"ios"==e?"liveIos":"live"}?url=${h.value}`})})())},[d&&d.pic?(e.openBlock(),e.createBlock(f,{key:0,src:d.pic[0],width:"100%",height:"300rpx"},null,8,["src"])):e.createCommentVNode("",!0)]),e.createVNode(Gn,{info:d},null,8,["info"]),e.createElementVNode("view",{class:"add-btn"},[e.createElementVNode("view",{class:"add-thing",onClick:i[1]||(i[1]=e=>w(1))}," 新增养殖 "),e.createElementVNode("view",{class:"add-thing",onClick:i[2]||(i[2]=e=>w(2))}," 新增喂养 ")]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit tit-more",style:{margin:"20rpx 0"}},[e.createElementVNode("view",null,"养殖信息"),e.createElementVNode("view",{class:"more",onClick:i[3]||(i[3]=e=>V(`/pages/plantAdmin/moreBreed?id=${u.value}`))},[e.createTextVNode("查看更多 "),e.createVNode(r,{name:"arrow-right"})])]),c.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c,((t,o)=>{return e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:o},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left"},[e.createVNode(f,{onClick:e=>N(t.pic),radius:"10",src:t.pic[0],width:"250rpx",height:"250rpx"},null,8,["onClick","src"]),e.createVNode(g,{class:"qr-code",onClick:e=>(e=>{a.value.code="d_"+e.sn,s.value.open()})(t),src:"/static/main/house/su_yuan_ma_btn.png",width:"60rpx",height:"60rpx"},null,8,["onClick"])]),e.createVNode(f,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>V(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>V(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},[e.createElementVNode("view",{class:"name"},e.toDisplayString(t.sn),1),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品类:"),e.createElementVNode("view",null,e.toDisplayString((n=t.animal_type,(null==(i=m.value.find((e=>e.value==n)))?void 0:i.name)||"")),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品种:"),e.createElementVNode("view",null,e.toDisplayString(t.brand),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"性别:"),e.createElementVNode("view",null,e.toDisplayString(t.gender?"公":"母"),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"栏舍:"),t.fenceHouseAttr?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString(t.fenceHouseAttr.fence_house_name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"来源:"),e.createElementVNode("view",null,e.toDisplayString(1==t.animal_source?"购买":"自繁"),1)])],8,["onClick"])])]);var n,i})),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit tit-more",style:{margin:"20rpx 0"}},[e.createElementVNode("view",null,"喂养信息"),e.createElementVNode("view",{class:"more",onClick:i[4]||(i[4]=e=>V("/pages/plantAdmin/moreFeed?house_id="+u.value))},[e.createTextVNode("查看更多 "),e.createVNode(r,{name:"arrow-right"})])]),p.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p.value,((t,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a},[t?(e.openBlock(),e.createElementBlock("view",{key:0,class:"card_body"},[e.createElementVNode("view",{class:"left"},[e.createVNode(f,{onClick:e=>N(t.pic[0]),radius:"10",src:t.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"])]),e.createVNode(f,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>k(t)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>k(t)},[e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作类型:"),e.createElementVNode("view",null,e.toDisplayString(t.type_text),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作人员:"),e.createElementVNode("view",null,e.toDisplayString(t.operator),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作日期:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time),1)]),e.createElementVNode("view",{class:"r-item",style:{height:"80rpx"}},[e.createElementVNode("view",{class:"item-title"},"备注:"),e.createElementVNode("view",{class:"row2"},e.toDisplayString(t.remark),1)])],8,["onClick"])])):e.createCommentVNode("",!0)])),[[e.vShow,t]]))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))]),e.createVNode(b,{show:v.value,keyName:"name",closeOnClickOverlay:"",actions:y.value,title:"请选择",onClose:i[5]||(i[5]=e=>v.value=!1),onSelect:_},null,8,["show","actions"]),e.createVNode(B,{ref_key:"codeRef",ref:s},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"bar-code"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(a.value.code.split("d_")[1]),1),e.createVNode(E,{ref_key:"qrCode",ref:n,options:a.value},null,8,["options"]),e.createElementVNode("view",{onClick:l,class:"btn"},"保存图片")])])),_:1},512)])])}}},Nl=x(xl,[["__scopeId","data-v-817877d9"]]),Cl=x({__name:"breedInfo",props:{info:Object,isDetail:Boolean},setup(t){const a=e.ref([]);Hn().then((e=>{a.value=e.data}));return(n,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C);return e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-top":"10rpx"}},[t.info.fenceHouseAttr?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","align-items":"center",height:"60rpx"}},[e.createVNode(r,{name:"map"}),e.createTextVNode(" "+e.toDisplayString(t.info.fenceHouseAttr.fence_house_name),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dong_wu_ming_cheng.png')"}},[e.createTextVNode(" 耳号 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.sn),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dong_wu_lei_xing.png')"}},[e.createTextVNode(" 品类 "),e.createElementVNode("view",{class:""},e.toDisplayString((l=t.info.animal_type,(null==(s=a.value.find((e=>e.value==l)))?void 0:s.name)||"")),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/lan_she_rong_liang.png')"}},[e.createTextVNode(" 品种 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.brand),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/lan_she_fu_ze_ren.png')"}},[e.createTextVNode(" 生理阶段 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.physi_stage),1)]),e.createElementVNode("view",{class:"info-li",style:{"background-image":"url('/static/main/house/dian_hua.png')"}},[e.createTextVNode(" 体重 "),e.createElementVNode("view",{class:""},e.toDisplayString(t.info.current_estimation)+"kg ",1)]),e.createElementVNode("view",{class:"info-li-d"})])]);var l,s}}},[["__scopeId","data-v-1d7151b6"]]),El={__name:"breedDetail",setup(t){const a=e.reactive([]),n=e.reactive({}),l=e.ref("");e.reactive([[{label:"种植",route:"/pages/husbandryForm/sow"},{label:"施肥",route:"/pages/husbandryForm/fertilize"},{label:"除草",route:"/pages/husbandryForm/weeding"},{label:"灌溉",route:"/pages/husbandryForm/irrigate"},{label:"除虫",route:"/pages/husbandryForm/Pest"},{label:"收获",route:"/pages/husbandryForm/harvest"}]]);const s=e.ref([]);Hn().then((e=>{s.value=e.data}));const c=e.ref([]),d=e.ref("");r((e=>{l.value=e.id,d.value=e.house_id,u()})),i((()=>{m(),Pr({fence_house_id:d.value,animal_info_id:l.value}).then((e=>{e.data=e.data.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text,type:e.type})&&(e.pic=JSON.parse(e.pic||"[]")),e??null))),c.value=e.data}))}));const u=()=>{Ir({id:l.value}).then((e=>{1==e.code&&(e.data.pic=JSON.parse(e.data.pic||"[]"),Object.assign(n,e.data))}))},m=()=>{Tr({fence_house_id:l.value,page_no:1,page_size:3}).then((e=>{1==e.code&&(a.splice(0,a.length,...e.data.lists),a.forEach((e=>{e.showCode=!1})))}))},p=e.ref(!1),h=e.ref([]),f=e.ref(1),g=e=>{if(1==f.value)v(`/pages/plantAdmin/addBreed?name=${e.name}&type=${"购买"==e.name?1:2}&id=${n.id}&fence_house_name=${n.fence_house_name}`);else{if("喂食"==e.name)return v(`/pages/feed/feed?id=${l.value}&house_id=${d.value}`);if("喂水"==e.name)return v(`/pages/feed/water?id=${l.value}&house_id=${d.value}`);if("消毒"==e.name)return v(`/pages/feed/sterilize?id=${l.value}&house_id=${d.value}`);if("疫苗"==e.name)return v(`/pages/feed/vaccine?id=${l.value}&house_id=${d.value}`);if("驱虫"==e.name)return v(`/pages/feed/expelling?id=${l.value}&house_id=${d.value}`)}},v=e=>{uni.navigateTo({url:e})},y=(e,t)=>{3==e.type&&uni.navigateTo({url:"/pages/feedDetail/feedDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),5==e.type&&uni.navigateTo({url:"/pages/feedDetail/waterDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),1==e.type&&uni.navigateTo({url:"/pages/feedDetail/sterilizeDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),4==e.type&&uni.navigateTo({url:"/pages/feedDetail/vaccineDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),2==e.type&&uni.navigateTo({url:"/pages/feedDetail/expellingDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}})},b=()=>{const e=new Date,t=e.getHours(),a=e.getMinutes();return(t<10?"0"+t:t)+":"+(a<10?"0"+a:a)},w=e=>{uni.previewImage({urls:[e]})};return(t,a)=>{const i=o(e.resolveDynamicComponent("u-icon"),C),r=o(e.resolveDynamicComponent("u--image"),A),s=o(e.resolveDynamicComponent("u-action-sheet"),G);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"",style:{display:"flex","justify-content":"space-between","margin-bottom":"20rpx"}},[e.createElementVNode("view",{class:"tit",style:{"margin-bottom":"0"}}," 动物数据 "),e.createElementVNode("view",{class:"",style:{display:"flex","align-items":"center"}},[e.createVNode(i,{name:"clock",style:{"margin-right":"10rpx"}}),e.createElementVNode("text",{style:{color:"#ACACAC","font-size":"25rpx"}},"刷新时间: "+e.toDisplayString(b()),1)])]),e.createElementVNode("view",{class:"video",onClick:a[0]||(a[0]=e=>w(n.pic[0]))},[n&&n.pic?(e.openBlock(),e.createBlock(r,{key:0,src:n.pic[0],width:"100%",height:"300rpx"},null,8,["src"])):e.createCommentVNode("",!0)]),e.createVNode(Cl,{info:n},null,8,["info"]),e.createElementVNode("view",{class:"add-btn"},[e.createElementVNode("view",{class:"add-thing",style:{width:"694rpx"},onClick:a[1]||(a[1]=e=>((e=1)=>{h.value=1==e?[{name:"购买"},{name:"自繁"}]:[{name:"喂食"},{name:"喂水"},{name:"消毒"},{name:"疫苗"},{name:"驱虫"}],f.value=e,p.value=!0})(2))}," 新增喂养 ")]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"tit tit-more",style:{margin:"20rpx 0"}},[e.createElementVNode("view",null,"喂养信息"),e.createElementVNode("view",{class:"more",onClick:a[2]||(a[2]=e=>v(`/pages/plantAdmin/moreFeed?id=${l.value}&house_id=${d.value}`))},[e.createTextVNode("查看更多 "),e.createVNode(i,{name:"arrow-right"})])]),c.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,((t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[null!=t?(e.openBlock(),e.createElementBlock("view",{key:0,class:"thing-card"},[t?(e.openBlock(),e.createElementBlock("view",{key:0,class:"card_body"},[e.createElementVNode("view",{class:"left"},[t&&t.pic?(e.openBlock(),e.createBlock(r,{key:0,onClick:e=>w(t.pic[0]),radius:"10",src:t.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"])):e.createCommentVNode("",!0)]),e.createVNode(r,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>y(t)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>y(t)},[e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作类型:"),e.createElementVNode("view",null,e.toDisplayString(t.type_text),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作人员:"),e.createElementVNode("view",null,e.toDisplayString(t.operator),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作日期:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time),1)]),e.createElementVNode("view",{class:"r-item",style:{height:"80rpx"}},[e.createElementVNode("view",{class:"item-title"},"备注:"),e.createElementVNode("view",{class:"row2"},e.toDisplayString(t.remark),1)])],8,["onClick"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64)))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))]),e.createVNode(s,{show:p.value,keyName:"name",closeOnClickOverlay:"",actions:h.value,title:"请选择",onClose:a[3]||(a[3]=e=>p.value=!1),onSelect:g},null,8,["show","actions"])])])}}},Bl=x(El,[["__scopeId","data-v-0ff976e4"]]),Sl={__name:"addBreed",setup(t){const n=e.ref(null),i=e.reactive({formData:{fence_house_id:"",sn:"",animal_type:"",brand:"",physi_stage:"",gender:"",blood_purity:"",current_estimation:"",algebra:"",birth:"",entry_date:"",birth_estimation:"",health_condition:"",type:1,animal_source:"2",master_name:"",master_phone:"",pic:["https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80","https://img0.baidu.com/it/u=1717510975,3258230326&fm=253&fmt=auto?w=120&h=80"]},rules:{fence_house_id:[{type:"string",required:!0,message:"请选择栏舍",trigger:["blur","change"]}],sn:[{type:"string",required:!0,message:"请输入耳号",trigger:["blur","change"]}],animal_type:[{type:"string",required:!0,message:"请选择品类",trigger:["blur","change"]}],brand:[{type:"string",required:!0,message:"请选择品种",trigger:["blur","change"]}],gender:[{type:"number",required:!0,message:"请选择性别",trigger:["blur","change"]}],physi_stage:[{type:"string",required:!0,message:"请输入生理阶段",trigger:["blur","change"]}],blood_purity:[{type:"string",required:!0,message:"请输入血统纯度",trigger:["blur","change"]}],current_estimation:[{type:"string",required:!0,message:"请输入现估重",trigger:["blur","change"]}],birth_estimation:[{type:"string",required:!0,message:"请输入出生体重",trigger:["blur","change"]}],brith_date:[{type:"string",required:!0,message:"请选择出生日期",trigger:["blur","change"]}],entry_date:[{type:"string",required:!0,message:"请选择入场日期",trigger:["blur","change"]}]}}),s=e.reactive([]),c=e.ref(!1),d=e.ref(!1),u=e.ref(!1),m=e.ref(!1),p=()=>{m.value=!0},h=e.ref(!1),f=()=>{h.value=!0},g=e.ref([]);Hn().then((e=>{g.value=e.data}));const v=e.ref(""),y=e=>{v.value=e.name,i.formData.animal_type=e.value},b=e.ref([]);Ar().then((e=>{b.value=e.data.lists.map((e=>({value:e.id,name:e.fence_house_name})))}));const w=e=>{i.formData.fence_house_name=e.name,i.formData.fence_house_id=e.value},_=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{1==e.code&&(s.push(e.data.url),a("log","at pages/plantAdmin/addBreed.vue:297",i.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},V=e.ref(""),k=e=>{"公"==e.name?i.formData.gender=1:i.formData.gender=0,V.value=e.name},x=e.ref(Date.now()),N=e=>{new Date(e.value),i.formData.type>1?i.formData.brith_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd"):i.formData.entry_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd"),d.value=!1};l((()=>{n.value.setRules(i.rules)}));const E=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,B=async()=>{try{if(await n.value.validate()){if(0==s.length)return void uni.$u.toast("请上传图片");i.formData.pic=JSON.stringify(s),(e=>An.post("/animal_info/add",e))(i.formData).then((e=>{a("log","at pages/plantAdmin/addBreed.vue:364",e),1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/plantAdmin/addBreed.vue:375","表单验证未通过")}catch(e){a("error","at pages/plantAdmin/addBreed.vue:379",e)}},S=e.ref("");return r((e=>{e.type>1?(i.formData.animal_source=+e.type,S.value=e.name):(i.formData.animal_source=1,S.value="购买"),e.id?(i.formData.fence_house_id=e.id,i.formData.fence_house_name=e.fence_house_name,u.value=!1):u.value=!0})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("up-form-item"),ni),u=o(e.resolveDynamicComponent("u-icon"),C),D=o(e.resolveDynamicComponent("u-image"),A),I=o(e.resolveDynamicComponent("up-form"),Ei),T=o(e.resolveDynamicComponent("u-action-sheet"),G),P=o(e.resolveDynamicComponent("u-datetime-picker"),rr),F=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"cards"},[e.createVNode(I,{labelWidth:"130",model:i.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"养殖信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"耳号",prop:"sn",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入耳号",border:"none",modelValue:i.formData.sn,"onUpdate:modelValue":a[0]||(a[0]=e=>i.formData.sn=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"品类",prop:"animal_type",borderBottom:"",required:"",onClick:p},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入品类名称",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:v.value,"onUpdate:modelValue":a[1]||(a[1]=e=>v.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"品种",prop:"brand",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入品种名称",border:"none",modelValue:i.formData.brand,"onUpdate:modelValue":a[2]||(a[2]=e=>i.formData.brand=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"性别",prop:"gender",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>c.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择性别",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:V.value,"onUpdate:modelValue":a[3]||(a[3]=e=>V.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"生理阶段",prop:"physi_stage",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入生理阶段",border:"none",modelValue:i.formData.physi_stage,"onUpdate:modelValue":a[5]||(a[5]=e=>i.formData.physi_stage=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"血统纯度",prop:"blood_purity",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入血统纯度",border:"none",modelValue:i.formData.blood_purity,"onUpdate:modelValue":a[6]||(a[6]=e=>i.formData.blood_purity=e)},null,8,["modelValue"])])),_:1}),1==i.formData.type?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{label:"来源",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",border:"none",modelValue:S.value,"onUpdate:modelValue":a[7]||(a[7]=e=>S.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"栏舍",prop:"fence_house_name",borderBottom:"",required:"",onClick:f},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:i.formData.fence_house_name,"onUpdate:modelValue":a[8]||(a[8]=e=>i.formData.fence_house_name=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"现估重(kg)",prop:"current_estimation",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入现估重",type:"number",border:"none",modelValue:i.formData.current_estimation,"onUpdate:modelValue":a[9]||(a[9]=e=>i.formData.current_estimation=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"入场日期",prop:"entry_date",borderBottom:"",required:"",onClick:a[11]||(a[11]=e=>d.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择入场日期",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:i.formData.entry_date,"onUpdate:modelValue":a[10]||(a[10]=e=>i.formData.entry_date=e),readonly:""},null,8,["modelValue"])])),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{label:"来源",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",border:"none",modelValue:S.value,"onUpdate:modelValue":a[12]||(a[12]=e=>S.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"栏舍",prop:"fence_house_name",borderBottom:"",required:"",onClick:f},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:i.formData.fence_house_name,"onUpdate:modelValue":a[13]||(a[13]=e=>i.formData.fence_house_name=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"代数",prop:"algebra",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入代数",type:"number",border:"none",modelValue:i.formData.algebra,"onUpdate:modelValue":a[14]||(a[14]=e=>i.formData.algebra=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"现估重(kg)",prop:"current_estimation",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入现估重",type:"number",border:"none",modelValue:i.formData.current_estimation,"onUpdate:modelValue":a[15]||(a[15]=e=>i.formData.current_estimation=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"出生体重(kg)",prop:"birth_estimation",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入出生体重",type:"number",border:"none",modelValue:i.formData.birth_estimation,"onUpdate:modelValue":a[16]||(a[16]=e=>i.formData.birth_estimation=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"出生日期",borderBottom:"",required:"",onClick:a[18]||(a[18]=e=>d.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择出生日期",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:i.formData.brith_date,"onUpdate:modelValue":a[17]||(a[17]=e=>i.formData.brith_date=e),readonly:""},null,8,["modelValue"])])),_:1})],64))]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"养殖基地图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.createVNode(u,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"]),e.createVNode(D,{src:t,width:"150.85rpx",height:"150.85rpx"},null,8,["src"])])])))),256))])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"code-img"},[e.createElementVNode("view",{class:"",onClick:_},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(D,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])])])])),_:1},8,["model"]),e.createVNode(T,{show:c.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"公"},{name:"母"}],title:"请选择",onClose:a[19]||(a[19]=e=>c.value=!1),onSelect:k},null,8,["show"]),e.createVNode(P,{show:d.value,"max-date":Date.now(),mode:"date",modelValue:x.value,"onUpdate:modelValue":a[20]||(a[20]=e=>x.value=e),onConfirm:N,formatter:E,onCancel:a[21]||(a[21]=e=>d.value=!1)},null,8,["show","max-date","modelValue"]),e.createVNode(T,{show:m.value,keyName:"name",actions:g.value,title:"请选择",onClose:a[22]||(a[22]=e=>m.value=!1),onSelect:y},null,8,["show","actions"]),e.createVNode(T,{show:h.value,keyName:"name",actions:b.value,title:"请选择栏舍",onClose:a[23]||(a[23]=e=>h.value=!1),onSelect:w},null,8,["show","actions"]),e.createVNode(F,{class:"btn",onClick:B},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1})])])}}},Dl={__name:"feed",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({feed_type:"",feed_brand:"",feed_consumption:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={feed_type:{type:"string",required:!0,message:"请选择饲料种类",trigger:["blur","change"]},feed_brand:{type:"string",required:!0,message:"请输入饲料品牌",trigger:["blur","change"]},feed_consumption:{type:"string",required:!0,message:"请输入饲料消耗量",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请输入饲养人员",trigger:["blur","change"]}};l((()=>{n.value.setRules(m)}));const p=e.ref(Date.now()),h=e.ref(!1),f=()=>{h.value=!0},g=e.ref([]);Qn().then((e=>{g.value=e.data}));const v=e.ref(""),y=e=>{v.value=e.name,c.feed_type=e.value},b=()=>{n.value.validate().then((e=>{if(a("log","at pages/feed/feed.vue:214",e),e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_feeding_log/add",t)).then((e=>{1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/feed.vue:240",e)}))},w=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/feed.vue:266",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/feed.vue:269",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},_=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),V=o(e.resolveDynamicComponent("u-icon"),C),k=o(e.resolveDynamicComponent("u-image"),A),x=o(e.resolveDynamicComponent("u--textarea"),li),N=o(e.resolveDynamicComponent("u--form"),Ei),E=o(e.resolveDynamicComponent("u-button"),Si),B=o(e.resolveDynamicComponent("u-action-sheet"),G),S=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(N,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂食信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"饲料种类",prop:"feed_type",borderBottom:"",required:"",onClick:f},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入饲料种类",disabled:"detail"==_.value,suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:v.value,"onUpdate:modelValue":a[0]||(a[0]=e=>v.value=e),readonly:""},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"饲料品牌",prop:"feed_brand",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入饲料品牌",disabled:"detail"==_.value,border:"none",modelValue:c.feed_brand,"onUpdate:modelValue":a[1]||(a[1]=e=>c.feed_brand=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"饲料消耗量(kg)",prop:"feed_consumption",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入饲料消耗量",disabled:"detail"==_.value,type:"number",border:"none",modelValue:c.feed_consumption,"onUpdate:modelValue":a[2]||(a[2]=e=>c.feed_consumption=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"喂养人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入喂养人员",disabled:"detail"==_.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[3]||(a[3]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"喂食图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(V,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==_.value]]),e.createVNode(k,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==_.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:w},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(k,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(x,{modelValue:c.remark,"onUpdate:modelValue":a[4]||(a[4]=e=>c.remark=e),disabled:"detail"==_.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==_.value?(e.openBlock(),e.createBlock(E,{key:0,class:"btn",onClick:b},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(B,{show:h.value,keyName:"name",actions:g.value,title:"请选择",onClose:a[5]||(a[5]=e=>h.value=!1),onSelect:y},null,8,["show","actions"]),e.createVNode(S,{show:s.value,"max-date":(new Date).getTime(),modelValue:p.value,"onUpdate:modelValue":a[6]||(a[6]=e=>p.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[7]||(a[7]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},Al=x(Dl,[["__scopeId","data-v-d551485b"]]),Il={__name:"water",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({water_consumption:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={water_consumption:{type:"string",required:!0,message:"请输入喂水量",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请输入喂水人",trigger:["blur","change"]}};l((()=>{n.value.setRules(m)}));const p=e.ref(Date.now()),h=()=>{n.value.validate().then((e=>{if(a("log","at pages/feed/water.vue:166",e),e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_water_log/add",t)).then((e=>{a("log","at pages/feed/water.vue:178",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/water.vue:191",e)}))},f=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/water.vue:217",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/water.vue:220",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},g=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),v=o(e.resolveDynamicComponent("u-icon"),C),y=o(e.resolveDynamicComponent("u-image"),A),b=o(e.resolveDynamicComponent("u--textarea"),li),w=o(e.resolveDynamicComponent("u--form"),Ei),_=o(e.resolveDynamicComponent("u-button"),Si),V=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(w,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂水信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"喂水量(L)",prop:"water_consumption",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入喂水量",disabled:"detail"==g.value,type:"number",border:"none",modelValue:c.water_consumption,"onUpdate:modelValue":a[0]||(a[0]=e=>c.water_consumption=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"喂水人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入喂水人员",disabled:"detail"==g.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[1]||(a[1]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"喂水图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(v,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==g.value]]),e.createVNode(y,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==g.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:f},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(y,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(b,{modelValue:c.remark,"onUpdate:modelValue":a[2]||(a[2]=e=>c.remark=e),disabled:"detail"==g.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==g.value?(e.openBlock(),e.createBlock(_,{key:0,class:"btn",onClick:h},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(V,{show:s.value,"max-date":(new Date).getTime(),modelValue:p.value,"onUpdate:modelValue":a[3]||(a[3]=e=>p.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[4]||(a[4]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},Tl=x(Il,[["__scopeId","data-v-30d5917e"]]),Pl={__name:"sterilize",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({disinfectant_name:"",concentration:"",disinfectant_method:"",disinfectant_area:"",disinfectant_date:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.disinfectant_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={disinfectant_name:{type:"string",required:!0,message:"请输入消毒剂名称",trigger:["blur","change"]},concentration:{type:"string",required:!0,message:"请输入消毒剂浓度",trigger:["blur","change"]},disinfectant_method:{type:"string",required:!0,message:"请输入消毒方法",trigger:["blur","change"]},disinfectant_area:{type:"string",required:!0,message:"请选择消毒区域",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请输入消毒人员",trigger:["blur","change"]}},p=e.ref(!1),h=e=>{c.disinfectant_area=e.name};l((()=>{n.value.setRules(m)}));const f=e.ref(Date.now()),g=()=>{n.value.validate().then((e=>{if(a("log","at pages/feed/sterilize.vue:205",e),e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_disinfect_log/add",t)).then((e=>{a("log","at pages/feed/sterilize.vue:217",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/sterilize.vue:230",e)}))},v=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/sterilize.vue:252",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/sterilize.vue:255",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},y=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),b=o(e.resolveDynamicComponent("up-form-item"),ni),w=o(e.resolveDynamicComponent("u-icon"),C),_=o(e.resolveDynamicComponent("u-image"),A),V=o(e.resolveDynamicComponent("u--textarea"),li),k=o(e.resolveDynamicComponent("u--form"),Ei),x=o(e.resolveDynamicComponent("u-button"),Si),N=o(e.resolveDynamicComponent("u-action-sheet"),G),E=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(k,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"消毒信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"消毒剂名称",prop:"disinfectant_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入消毒剂名称",disabled:"detail"==y.value,border:"none",modelValue:c.disinfectant_name,"onUpdate:modelValue":a[0]||(a[0]=e=>c.disinfectant_name=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"消毒剂浓度",prop:"concentration",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入消毒剂浓度",disabled:"detail"==y.value,type:"number",border:"none",modelValue:c.concentration,"onUpdate:modelValue":a[1]||(a[1]=e=>c.concentration=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"消毒方法",prop:"disinfectant_method",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入消毒方法",disabled:"detail"==y.value,border:"none",modelValue:c.disinfectant_method,"onUpdate:modelValue":a[2]||(a[2]=e=>c.disinfectant_method=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(b,{label:"消毒区域",prop:"disinfectant_area",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>p.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择区域",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:c.disinfectant_area,"onUpdate:modelValue":a[3]||(a[3]=e=>c.disinfectant_area=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"消毒人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入消毒人员姓名",disabled:"detail"==y.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[5]||(a[5]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"消毒图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(w,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==y.value]]),e.createVNode(_,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==y.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:v},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(_,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(V,{modelValue:c.remark,"onUpdate:modelValue":a[6]||(a[6]=e=>c.remark=e),disabled:"detail"==y.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==y.value?(e.openBlock(),e.createBlock(x,{key:0,class:"btn",onClick:g},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(N,{show:p.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"栏舍"},{name:"饲料槽"},{name:"饮水设备"}],title:"请选择",onClose:a[7]||(a[7]=e=>p.value=!1),onSelect:h},null,8,["show"]),e.createVNode(E,{show:s.value,"max-date":(new Date).getTime(),modelValue:f.value,"onUpdate:modelValue":a[8]||(a[8]=e=>f.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[9]||(a[9]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},Fl=x(Pl,[["__scopeId","data-v-04d4570c"]]),Ul={__name:"vaccine",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({vaccine_name:"",vaccine_manufacturers:"",vaccine_batch:"",vaccination_method:"",vaccination_site:"",immune_validity_period:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={vaccine_name:{type:"string",required:!0,message:"请输入疫苗名称",trigger:["blur","change"]},vaccine_manufacturers:{type:"string",required:!0,message:"请输入疫苗厂家",trigger:["blur","change"]},vaccine_batch:{type:"string",required:!0,message:"请输入疫苗批次号",trigger:["blur","change"]},vaccination_method:{type:"string",required:!0,message:"请选择疫苗接种方式",trigger:["blur","change"]},vaccination_site:{type:"string",required:!0,message:"请输入疫苗接种部位",trigger:["blur","change"]},immune_validity_period:{type:"string",required:!0,message:"请输入疫苗有限期",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请输入疫苗注射人员",trigger:["blur","change"]}},p=e.ref(!1),h=e.ref(""),f=e=>{h.value=e.name,"肌肉注射"==e.name&&(c.vaccination_method="1"),"皮下注射"==e.name&&(c.vaccination_method="2")},g=e.ref(!1),v=e.ref(""),y=e=>{v.value=e.name,"颈部"==e.name&&(c.vaccination_site="1"),"大腿"==e.name&&(c.vaccination_site="2")},b=e.ref(!1),w=e=>{c.name=e.name};l((()=>{n.value.setRules(m)}));const _=e.ref(Date.now()),V=()=>{n.value.validate().then((e=>{if(a("log","at pages/feed/vaccine.vue:247",e),e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_vaccinum_log/add",t)).then((e=>{a("log","at pages/feed/vaccine.vue:260",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/vaccine.vue:273",e)}))},k=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/vaccine.vue:295",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/vaccine.vue:298",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},x=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),N=o(e.resolveDynamicComponent("up-form-item"),ni),E=o(e.resolveDynamicComponent("u-icon"),C),B=o(e.resolveDynamicComponent("u-image"),A),S=o(e.resolveDynamicComponent("u--textarea"),li),D=o(e.resolveDynamicComponent("u--form"),Ei),I=o(e.resolveDynamicComponent("u-button"),Si),T=o(e.resolveDynamicComponent("u-action-sheet"),G),P=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(D,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"疫苗信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"疫苗名称",prop:"vaccine_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入疫苗名称",disabled:"detail"==x.value,border:"none",modelValue:c.vaccine_name,"onUpdate:modelValue":a[0]||(a[0]=e=>c.vaccine_name=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"疫苗厂家",prop:"vaccine_manufacturers",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入疫苗厂家",disabled:"detail"==x.value,border:"none",modelValue:c.vaccine_manufacturers,"onUpdate:modelValue":a[1]||(a[1]=e=>c.vaccine_manufacturers=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"疫苗批次号",prop:"vaccine_batch",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入批次号",disabled:"detail"==x.value,border:"none",modelValue:c.vaccine_batch,"onUpdate:modelValue":a[2]||(a[2]=e=>c.vaccine_batch=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(N,{label:"疫苗接种方式",prop:"vaccination_method",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>p.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择方式",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:h.value,"onUpdate:modelValue":a[3]||(a[3]=e=>h.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(N,{label:"疫苗接种部位",prop:"vaccination_site",borderBottom:"",required:"",onClick:a[6]||(a[6]=e=>g.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择接种部位",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:v.value,"onUpdate:modelValue":a[5]||(a[5]=e=>v.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"免疫有限期",prop:"immune_validity_period",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入免疫有限期",disabled:"detail"==x.value,border:"none",modelValue:c.immune_validity_period,"onUpdate:modelValue":a[7]||(a[7]=e=>c.immune_validity_period=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"疫苗注射人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入操作人员姓名",disabled:"detail"==x.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[8]||(a[8]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"接种图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(E,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==x.value]]),e.createVNode(B,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==x.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:k},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(B,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(S,{modelValue:c.remark,"onUpdate:modelValue":a[9]||(a[9]=e=>c.remark=e),disabled:"detail"==x.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==x.value?(e.openBlock(),e.createBlock(I,{key:0,class:"btn",onClick:V},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(T,{show:b.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"禽流感疫苗"},{name:"弓形虫病疫苗"},{name:"其他疫苗"}],title:"请选择疫苗名称",onClose:a[10]||(a[10]=e=>b.value=!1),onSelect:w},null,8,["show"]),e.createVNode(T,{show:p.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"肌肉注射"},{name:"皮下注射"}],title:"请选择接种方式",onClose:a[11]||(a[11]=e=>p.value=!1),onSelect:f},null,8,["show"]),e.createVNode(T,{show:g.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"颈部"},{name:"大腿"}],title:"请选择接种部位",onClose:a[12]||(a[12]=e=>g.value=!1),onSelect:y},null,8,["show"]),e.createVNode(P,{show:s.value,"max-date":(new Date).getTime(),modelValue:_.value,"onUpdate:modelValue":a[13]||(a[13]=e=>_.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[14]||(a[14]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},Ol=x(Ul,[["__scopeId","data-v-994918dd"]]),ql={__name:"expelling",setup(t){const n=e.ref(null);e.ref("");const i=e.reactive([]),s=e.ref(!1),c=e.reactive({vermifuge_name:"",deworming_method:"",deworming_date:"",operator:"",remark:"",pic:[],fence_house_id:"",animal_info_id:""}),d=e=>{c.deworming_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),s.value=!1},u=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,m={vermifuge_name:{type:"string",required:!0,message:"请输入驱虫药名称",trigger:["blur","change"]},deworming_method:{type:"string",required:!0,message:"请选择驱虫方式",trigger:["blur","change"]},operator:{type:"string",required:!0,message:"请选择驱虫人员",trigger:["blur","change"]},deworming_date:{type:"string",required:!0,message:"请选择驱虫时间",trigger:["blur","change"]}},p=e.ref(!1),h=e=>{c.deworming_method=e.name};l((()=>{n.value.setRules(m)}));const f=()=>{s.value=!0},g=e.ref(Date.now()),v=()=>{n.value.validate().then((e=>{if(e){if(0==i.length)return void uni.$u.toast("请上传图片");c.pic=JSON.stringify(i),(t=c,An.post("/suyuan_operation.operation_deworming_log/add",t)).then((e=>{1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))}var t})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/feed/expelling.vue:215",e)}))},y=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{a("log","at pages/feed/expelling.vue:237",e),1==e.code&&(i.push(e.data.url),a("log","at pages/feed/expelling.vue:240",data.formData),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},b=e.ref("add");return r((e=>{c.fence_house_id=e.house_id,c.animal_info_id=e.id})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),w=o(e.resolveDynamicComponent("up-form-item"),ni),_=o(e.resolveDynamicComponent("u-icon"),C),V=o(e.resolveDynamicComponent("u-image"),A),k=o(e.resolveDynamicComponent("u--textarea"),li),x=o(e.resolveDynamicComponent("u--form"),Ei),N=o(e.resolveDynamicComponent("u-button"),Si),E=o(e.resolveDynamicComponent("u-action-sheet"),G),B=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(x,{labelWidth:"130",model:c,rules:m,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"驱虫信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"驱虫药名称",prop:"vermifuge_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入驱虫药名称",disabled:"detail"==b.value,border:"none",modelValue:c.vermifuge_name,"onUpdate:modelValue":a[0]||(a[0]=e=>c.vermifuge_name=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(w,{label:"驱虫方式",prop:"deworming_method",borderBottom:"",required:"",onClick:a[2]||(a[2]=e=>p.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入驱虫方式",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:c.deworming_method,"onUpdate:modelValue":a[1]||(a[1]=e=>c.deworming_method=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"驱虫人员",prop:"operator",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入驱虫人员姓名",disabled:"detail"==b.value,border:"none",modelValue:c.operator,"onUpdate:modelValue":a[3]||(a[3]=e=>c.operator=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"驱虫时间",prop:"deworming_date",onClick:f,borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择时间",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",readonly:"",border:"none",modelValue:c.deworming_date,"onUpdate:modelValue":a[4]||(a[4]=e=>c.deworming_date=e),style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"驱虫图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[i.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[e.withDirectives(e.createVNode(_,{name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{i.splice(e,1)})(a)},null,8,["onClick"]),[[e.vShow,"add"==b.value]]),e.createVNode(V,{src:t,width:"150.85rpx",height:"150.85rpx",onClick:e=>{return a=t,void uni.previewImage({urls:[a]});var a}},null,8,["src","onClick"])])])))),256))])):e.createCommentVNode("",!0)]),"add"==b.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:y},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(V,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])])):e.createCommentVNode("",!0)])]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(k,{modelValue:c.remark,"onUpdate:modelValue":a[5]||(a[5]=e=>c.remark=e),disabled:"detail"==b.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==b.value?(e.openBlock(),e.createBlock(N,{key:0,class:"btn",onClick:v},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(E,{show:p.value,keyName:"name",closeOnClickOverlay:"",actions:[{name:"内驱"},{name:"外驱"}],title:"请选择",onClose:a[6]||(a[6]=e=>p.value=!1),onSelect:h},null,8,["show"]),e.createVNode(B,{show:s.value,"max-date":(new Date).getTime(),modelValue:g.value,"onUpdate:modelValue":a[7]||(a[7]=e=>g.value=e),mode:"datetime",onConfirm:d,formatter:u,onCancel:a[8]||(a[8]=e=>s.value=!1)},null,8,["show","max-date","modelValue"])])}}},$l=x(ql,[["__scopeId","data-v-fbec8d9a"]]),Ll=x({__name:"feedDetail",setup(t){const n=e.ref([]),i=e=>{var t;return(null==(t=n.value.find((t=>t.value==e)))?void 0:t.name)||""},l=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/feedDetail.vue:74",e),Object.assign(l,e),Qn().then((e=>{n.value=e.data,l.feed_type_name=i(l.feed_type)}))}))})),(t,a)=>{const n=o(e.resolveDynamicComponent("up-input"),ai),i=o(e.resolveDynamicComponent("u-form-item"),ni),r=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(r,{labelWidth:"130",model:l,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂食信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(i,{label:"饲料种类",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(n,{readonly:"",border:"none",modelValue:l.feed_type_name,"onUpdate:modelValue":a[0]||(a[0]=e=>l.feed_type_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(i,{label:"饲料品牌",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(n,{readonly:"",border:"none",modelValue:l.feed_brand,"onUpdate:modelValue":a[1]||(a[1]=e=>l.feed_brand=e)},null,8,["modelValue"])])),_:1}),e.createVNode(i,{label:"饲料消耗量(kg)",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(n,{readonly:"",type:"number",border:"none",modelValue:l.feed_consumption,"onUpdate:modelValue":a[2]||(a[2]=e=>l.feed_consumption=e)},null,8,["modelValue"])])),_:1}),e.createVNode(i,{label:"喂食时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(n,{readonly:"",border:"none",modelValue:l.create_time,"onUpdate:modelValue":a[3]||(a[3]=e=>l.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(i,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(l.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-dd07f434"]]),zl=x({__name:"expellingDetail",setup(t){const n=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/expellingDetail.vue:56",e),Object.assign(n,e)}))})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:n,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"驱虫信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"驱虫药名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",type:"txt",border:"none",modelValue:n.vermifuge_name,"onUpdate:modelValue":a[0]||(a[0]=e=>n.vermifuge_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"驱虫方式",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.deworming_method,"onUpdate:modelValue":a[1]||(a[1]=e=>n.deworming_method=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"驱虫时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.create_time,"onUpdate:modelValue":a[2]||(a[2]=e=>n.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(n.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-6855eb98"]]),jl=x({__name:"sterilizeDetail",setup(t){const n=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/sterilizeDetail.vue:64",e),Object.assign(n,e)}))})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:n,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"消毒信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"消毒剂名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.disinfectant_name,"onUpdate:modelValue":a[0]||(a[0]=e=>n.disinfectant_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒剂浓度",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.concentration,"onUpdate:modelValue":a[1]||(a[1]=e=>n.concentration=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒方法",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.disinfectant_method,"onUpdate:modelValue":a[2]||(a[2]=e=>n.disinfectant_method=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒区域",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.disinfectant_area,"onUpdate:modelValue":a[3]||(a[3]=e=>n.disinfectant_area=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.operator,"onUpdate:modelValue":a[4]||(a[4]=e=>n.operator=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"消毒时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.create_time,"onUpdate:modelValue":a[5]||(a[5]=e=>n.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(n.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-9cae65ca"]]),Ml=x({__name:"vaccineDetail",setup(t){const n=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/vaccineDetail.vue:72",e),Object.assign(n,e),"1"==n.vaccination_method&&(n.vaccination_method="肌肉注射"),"2"==n.vaccination_method&&(n.vaccination_method="皮下注射"),"1"==n.vaccination_site&&(n.vaccination_site="颈部"),"2"==n.vaccination_site&&(n.vaccination_site="大腿")}))})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:n,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"疫苗信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"疫苗名称",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccine_name,"onUpdate:modelValue":a[0]||(a[0]=e=>n.vaccine_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"疫苗厂家",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccine_manufacturers,"onUpdate:modelValue":a[1]||(a[1]=e=>n.vaccine_manufacturers=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"疫苗批次号",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccine_batch,"onUpdate:modelValue":a[2]||(a[2]=e=>n.vaccine_batch=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"接种方式",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccination_method,"onUpdate:modelValue":a[3]||(a[3]=e=>n.vaccination_method=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"接种部位",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.vaccination_site,"onUpdate:modelValue":a[4]||(a[4]=e=>n.vaccination_site=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"免疫有限期",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.immune_validity_period,"onUpdate:modelValue":a[5]||(a[5]=e=>n.immune_validity_period=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"注射人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.operator,"onUpdate:modelValue":a[6]||(a[6]=e=>n.operator=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"接种时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.create_time,"onUpdate:modelValue":a[7]||(a[7]=e=>n.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(n.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-8e49a3d9"]]),Rl=x({__name:"waterDetail",setup(t){const n=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){a("log","at pages/feedDetail/waterDetail.vue:52",e),Object.assign(n,e)}))})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:n,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"喂水信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"喂水量(L)",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.water_consumption,"onUpdate:modelValue":a[0]||(a[0]=e=>n.water_consumption=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"喂水人员",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.operator,"onUpdate:modelValue":a[1]||(a[1]=e=>n.operator=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"喂水时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:n.create_time,"onUpdate:modelValue":a[2]||(a[2]=e=>n.create_time=e)},null,8,["modelValue"])])),_:1}),e.createElementVNode("swiper",{class:"swiper",autoplay:"","indicator-dots":"","indicator-active-color":"#ffb049","indicator-color":"rgba(255,255,255,0.4)"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.pic,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{class:"swiper-item",key:a},[e.createElementVNode("image",{class:"img",src:t},null,8,["src"])])))),128))]),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createElementVNode("view",{class:""},e.toDisplayString(n.remark),1)])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-5448395f"]]),Hl={__name:"moreBreed",setup(t){const a=e.reactive([]),n=e.ref(""),i=e=>{uni.navigateTo({url:e})},l=e.ref({code:"",size:460}),c=e.ref(""),d=async()=>{const e=await c.value.GetCodeImg();uni.saveImageToPhotosAlbum({filePath:e.tempFilePath,success(e){uni.showToast({title:"保存成功",icon:"success",duration:2e3})},fail(e){uni.showToast({title:"保存失败",icon:"none",duration:2e3})}})},u=e.ref(null),m=e.ref({page_no:1,page_size:10}),p=()=>{Tr({fence_house_id:n.value,page_no:m.value.page_no,page_size:m.value.page_size}).then((e=>{1==e.code&&(e.data.lists=e.data.lists.map((e=>(e.showCode=!1,e.pic=JSON.parse(e.pic||"[]"),e))),a.splice(0,a,...e.data.lists))}))},h=e.ref([]);Hn().then((e=>{h.value=e.data}));return r((e=>{n.value=e.id,p()})),s((()=>{m.value.page_no++,p()})),(t,n)=>{const r=o(e.resolveDynamicComponent("u--image"),A),s=o(e.resolveDynamicComponent("u---image"),Jr),m=o(e.resolveDynamicComponent("w-qrcode"),kl),p=o(e.resolveDynamicComponent("uni-popup"),Nn);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:""},[a.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a,((t,a)=>{return e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left"},[e.createVNode(r,{onClick:e=>{return a=t.pic[0],void uni.previewImage({urls:[a]});var a},radius:"10",src:t.pic[0],width:"250rpx",height:"250rpx"},null,8,["onClick","src"]),e.createVNode(s,{class:"qr-code",onClick:e=>(e=>{l.value.code="d_"+e.sn,u.value.open()})(t),src:"/static/main/house/su_yuan_ma_btn.png",width:"60rpx",height:"60rpx"},null,8,["onClick"])]),e.createVNode(r,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>i(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>i(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},[e.createElementVNode("view",{class:"name"},e.toDisplayString(t.sn),1),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品类:"),e.createElementVNode("view",null,e.toDisplayString((o=t.animal_type,(null==(n=h.value.find((e=>e.value==o)))?void 0:n.name)||"")),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品种:"),e.createElementVNode("view",null,e.toDisplayString(t.brand),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"性别:"),e.createElementVNode("view",null,e.toDisplayString(t.gender?"公":"母"),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"栏舍:"),t.fenceHouseAttr?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString(t.fenceHouseAttr.fence_house_name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"来源:"),e.createElementVNode("view",null,e.toDisplayString(1==t.animal_source?"购买":"自繁"),1)])],8,["onClick"])])]);var o,n})),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))]),e.createVNode(p,{ref_key:"codeRef",ref:u},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"bar-code"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(l.value.code.split("d_")[1]),1),e.createVNode(m,{ref_key:"qrCode",ref:c,options:l.value},null,8,["options"]),e.createElementVNode("view",{onClick:d,class:"btn"},"保存图片")])])),_:1},512)])])}}},Ql=x(Hl,[["__scopeId","data-v-c340723f"]]),Wl={props:{duration:{type:Number,default:w.tabs.duration},list:{type:Array,default:w.tabs.list},lineColor:{type:String,default:w.tabs.lineColor},activeStyle:{type:[String,Object],default:w.tabs.activeStyle},inactiveStyle:{type:[String,Object],default:w.tabs.inactiveStyle},lineWidth:{type:[String,Number],default:w.tabs.lineWidth},lineHeight:{type:[String,Number],default:w.tabs.lineHeight},lineBgSize:{type:String,default:w.tabs.lineBgSize},itemStyle:{type:[String,Object],default:w.tabs.itemStyle},scrollable:{type:Boolean,default:w.tabs.scrollable},current:{type:[Number,String],default:w.tabs.current},keyName:{type:String,default:w.tabs.keyName}}};const Jl=x({name:"u-tabs",mixins:[V,k,Wl],data:()=>({firstTime:!0,scrollLeft:0,scrollViewWidth:0,lineOffsetLeft:0,tabsRect:{left:0},innerCurrent:0,moving:!1}),watch:{current:{immediate:!0,handler(e,t){e!==this.innerCurrent&&(this.innerCurrent=e,this.$nextTick((()=>{this.resize()})))}},list(){this.$nextTick((()=>{this.resize()}))}},computed:{textStyle(){return e=>{const t={},a=e===this.innerCurrent?uni.$u.addStyle(this.activeStyle):uni.$u.addStyle(this.inactiveStyle);return this.list[e].disabled&&(t.color="#c8c9cc"),uni.$u.deepMerge(a,t)}},propsBadge:()=>uni.$u.props.badge},async mounted(){this.init()},emits:["click","change"],methods:{setLineLeft(){const e=this.list[this.innerCurrent];if(!e)return;let t=this.list.slice(0,this.innerCurrent).reduce(((e,t)=>e+t.rect.width),0);const a=uni.$u.getPx(this.lineWidth);this.lineOffsetLeft=t+(e.rect.width-a)/2,this.firstTime&&setTimeout((()=>{this.firstTime=!1}),10)},animation(e,t=0){},clickHandler(e,t){this.$emit("click",{...e,index:t}),e.disabled||(this.innerCurrent=t,this.resize(),this.$emit("change",{...e,index:t}))},init(){uni.$u.sleep().then((()=>{this.resize()}))},setScrollLeft(){const e=this.list[this.innerCurrent],t=this.list.slice(0,this.innerCurrent).reduce(((e,t)=>e+t.rect.width),0),a=uni.$u.sys().windowWidth;let o=t-(this.tabsRect.width-e.rect.width)/2-(a-this.tabsRect.right)/2+this.tabsRect.left/2;o=Math.min(o,this.scrollViewWidth-this.tabsRect.width),this.scrollLeft=Math.max(0,o)},resize(){0!==this.list.length&&Promise.all([this.getTabsRect(),this.getAllItemRect()]).then((([e,t=[]])=>{this.tabsRect=e,this.scrollViewWidth=0,t.map(((e,t)=>{this.scrollViewWidth+=e.width,this.list[t].rect=e})),this.setLineLeft(),this.setScrollLeft()}))},getTabsRect(){return new Promise((e=>{this.queryRect("u-tabs__wrapper__scroll-view").then((t=>e(t)))}))},getAllItemRect(){return new Promise((e=>{const t=this.list.map(((e,t)=>this.queryRect(`u-tabs__wrapper__nav__item-${t}`,!0)));Promise.all(t).then((t=>e(t)))}))},queryRect(e,t){return new Promise((t=>{this.$uGetRect(`.${e}`).then((e=>{t(e)}))}))}}},[["render",function(t,a,n,i,r,l){const s=o(e.resolveDynamicComponent("u-badge"),qo);return e.openBlock(),e.createElementBlock("view",{class:"u-tabs"},[e.createElementVNode("view",{class:"u-tabs__wrapper"},[e.renderSlot(t.$slots,"left",{},void 0,!0),e.createElementVNode("view",{class:"u-tabs__wrapper__scroll-view-wrapper"},[e.createElementVNode("scroll-view",{"scroll-x":t.scrollable,"scroll-left":r.scrollLeft,"scroll-with-animation":"",class:"u-tabs__wrapper__scroll-view","show-scrollbar":!1,ref:"u-tabs__wrapper__scroll-view"},[e.createElementVNode("view",{class:"u-tabs__wrapper__nav",ref:"u-tabs__wrapper__nav"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,((a,o)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["u-tabs__wrapper__nav__item",[`u-tabs__wrapper__nav__item-${o}`,a.disabled&&"u-tabs__wrapper__nav__item--disabled"]]),key:o,onClick:e=>l.clickHandler(a,o),ref_for:!0,ref:`u-tabs__wrapper__nav__item-${o}`,style:e.normalizeStyle([t.$u.addStyle(t.itemStyle),{flex:t.scrollable?"":1}])},[e.createElementVNode("text",{class:e.normalizeClass([[a.disabled&&"u-tabs__wrapper__nav__item__text--disabled"],"u-tabs__wrapper__nav__item__text"]),style:e.normalizeStyle([l.textStyle(o)])},e.toDisplayString(a[t.keyName]),7),e.createVNode(s,{show:!(!a.badge||!(a.badge.show||a.badge.isDot||a.badge.value)),isDot:a.badge&&a.badge.isDot||l.propsBadge.isDot,value:a.badge&&a.badge.value||l.propsBadge.value,max:a.badge&&a.badge.max||l.propsBadge.max,type:a.badge&&a.badge.type||l.propsBadge.type,showZero:a.badge&&a.badge.showZero||l.propsBadge.showZero,bgColor:a.badge&&a.badge.bgColor||l.propsBadge.bgColor,color:a.badge&&a.badge.color||l.propsBadge.color,shape:a.badge&&a.badge.shape||l.propsBadge.shape,numberType:a.badge&&a.badge.numberType||l.propsBadge.numberType,inverted:a.badge&&a.badge.inverted||l.propsBadge.inverted,customStyle:"margin-left: 4px;"},null,8,["show","isDot","value","max","type","showZero","bgColor","color","shape","numberType","inverted"])],14,["onClick"])))),128)),e.createElementVNode("view",{class:"u-tabs__wrapper__nav__line",ref:"u-tabs__wrapper__nav__line",style:e.normalizeStyle([{width:t.$u.addUnit(t.lineWidth),transform:`translate(${r.lineOffsetLeft}px)`,transitionDuration:`${r.firstTime?0:t.duration}ms`,height:t.$u.addUnit(t.lineHeight),background:t.lineColor,backgroundSize:t.lineBgSize}])},null,4)],512)],8,["scroll-x","scroll-left"])]),e.renderSlot(t.$slots,"right",{},void 0,!0)])])}],["__scopeId","data-v-9c4752c4"]]),Kl={__name:"moreFeed",setup(t){const a=e.ref([]),n=e.ref(0),i=e.reactive([{name:"喂食"},{name:"喂水"},{name:"消毒"},{name:"疫苗"},{name:"驱虫"}]),l=(e,t)=>{0==t&&uni.navigateTo({url:"/pages/feedDetail/feedDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),1==t&&uni.navigateTo({url:"/pages/feedDetail/waterDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),2==t&&uni.navigateTo({url:"/pages/feedDetail/sterilizeDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),3==t&&uni.navigateTo({url:"/pages/feedDetail/vaccineDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}}),4==t&&uni.navigateTo({url:"/pages/feedDetail/expellingDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}})},c=e.ref({page_no:1,page_size:15,fence_house_id:"",animal_info_id:""}),d=e=>{n.value=e.index,c.value.page_no=1,a.value=[],"喂食"==e.name&&u(),"喂水"==e.name&&m(),"消毒"==e.name&&p(),"疫苗"==e.name&&h(),"驱虫"==e.name&&f()},u=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_feeding_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))},m=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_water_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))},p=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_disinfect_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))},h=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_vaccinum_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))},f=()=>{var e;(e=c.value,An.get("/suyuan_operation.operation_deworming_log/lists",e)).then((e=>{e.data.lists=e.data.lists.map((e=>((e={...e.detail,create_time:e.create_time,type_text:e.type_text}).pic=JSON.parse(e.pic||"[]"),e))),a.value=[...a.value,...e.data.lists]}))};return r((e=>{c.value.animal_info_id=e.id,c.value.fence_house_id=e.house_id,u()})),s((()=>{c.value.page_no++,0==n.value&&u(),1==n.value&&m(),2==n.value&&p(),3==n.value&&h(),4==n.value&&f()})),(t,r)=>{const s=o(e.resolveDynamicComponent("u-tabs"),Jl),c=o(e.resolveDynamicComponent("u--image"),A);return e.openBlock(),e.createElementBlock("view",{class:"box"},[e.createVNode(s,{list:i,lineColor:"#feb048",current:n.value,scrollable:!1,onChange:d},null,8,["list","current"]),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:""},[a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left"},[t.pic?(e.openBlock(),e.createBlock(c,{key:0,onClick:e=>{return a=t.pic[0],void uni.previewImage({urls:[a]});var a},radius:"10",src:t.pic[0],width:"200rpx",height:"200rpx"},null,8,["onClick","src"])):e.createCommentVNode("",!0)]),e.createVNode(c,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>l(t,n.value)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>l(t,n.value)},[e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作类型:"),0==n.value?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString("喂食"))):1==n.value?(e.openBlock(),e.createElementBlock("view",{key:1},e.toDisplayString("喂水"))):2==n.value?(e.openBlock(),e.createElementBlock("view",{key:2},e.toDisplayString("消毒"))):3==n.value?(e.openBlock(),e.createElementBlock("view",{key:3},e.toDisplayString("疫苗"))):4==n.value?(e.openBlock(),e.createElementBlock("view",{key:4},e.toDisplayString("驱虫"))):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作人员:"),e.createElementVNode("view",null,e.toDisplayString(t.operator),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"操作日期:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time),1)]),e.createElementVNode("view",{class:"r-item",style:{height:"80rpx"}},[e.createElementVNode("view",{class:"item-title"},"备注:"),e.createElementVNode("view",{class:"row2"},e.toDisplayString(t.remark),1)])],8,["onClick"])])])))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])])])}}},Gl=x(Kl,[["__scopeId","data-v-0ee4f6cb"]]),Yl={__name:"record",setup(t){const a=e.ref({code:"",size:460}),n=e.ref(""),i=async()=>{const e=await n.value.GetCodeImg();uni.saveImageToPhotosAlbum({filePath:e.tempFilePath,success(e){uni.showToast({title:"保存成功",icon:"success",duration:2e3})},fail(e){uni.showToast({title:"保存失败",icon:"none",duration:2e3})}})},l=e.ref(null),c=e.ref(""),d=e.reactive([]),u=e.ref(!1),m=e.ref([{name:"购买"},{name:"自繁"}]),p=e=>{h(`/pages/plantAdmin/addBreed?name=${e.name}&type=${"购买"==e.name?1:2}`)},h=e=>{uni.navigateTo({url:e})},f=()=>{uni.navigateBack()},g=e.ref({page_no:1,page_size:10}),v=()=>{Tr({keyword:c.value,page_no:g.value.page_no,page_size:g.value.page_size}).then((e=>{1==e.code&&(e.data.lists=e.data.lists.map((e=>(e.showCode=!1,e.pic=JSON.parse(e.pic||"[]"),e))),d.splice(0,d,...e.data.lists))}))},y=e.ref([]);Hn().then((e=>{y.value=e.data}));const b=()=>{g.value.page_no=1,d.value=[],v()};return r((()=>{v()})),s((()=>{g.value.page_no++,v()})),(t,r)=>{const s=o(e.resolveDynamicComponent("u-icon"),C),g=o(e.resolveDynamicComponent("u-search"),Hr),v=o(e.resolveDynamicComponent("u--image"),A),w=o(e.resolveDynamicComponent("u---image"),Jr),_=o(e.resolveDynamicComponent("u-action-sheet"),G),V=o(e.resolveDynamicComponent("w-qrcode"),kl),k=o(e.resolveDynamicComponent("uni-popup"),Nn);return e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title",onClick:f},[e.createVNode(s,{name:"arrow-left",color:"#fff",size:"40rpx",style:{"margin-right":"10rpx"}}),e.createTextVNode(),e.createElementVNode("text",{style:{"padding-bottom":"5rpx"}},"档案管理")]),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(s,{name:"plus",color:"#fff",size:"40rpx",style:{"margin-right":"20rpx"},onClick:r[0]||(r[0]=e=>u.value=!0)}),e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"serch"},[e.createVNode(g,{bgColor:"white","show-action":!1,placeholder:"请输入耳号",modelValue:c.value,"onUpdate:modelValue":r[1]||(r[1]=e=>c.value=e),shape:"round",clearabled:!1},null,8,["modelValue"]),e.createElementVNode("view",{class:"ser-text",onClick:b}," 搜索 ")]),e.createElementVNode("view",{class:"tits"}," 档案信息 "),e.createElementVNode("view",{class:""},[d.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d,((t,o)=>{return e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:o},[e.createElementVNode("view",{class:"card_body"},[e.createElementVNode("view",{class:"left"},[e.createVNode(v,{onClick:e=>{return a=t.pic[0],void uni.previewImage({urls:[a]});var a},radius:"10",src:t.pic[0],width:"250rpx",height:"250rpx"},null,8,["onClick","src"]),e.createVNode(w,{class:"qr-code",onClick:e=>(e=>{a.value.code="d_"+e.sn,l.value.open()})(t),src:"/static/main/house/su_yuan_ma_btn.png",width:"60rpx",height:"60rpx"},null,8,["onClick"])]),e.createVNode(v,{src:"/static/main/house/xia_yi_ji_btn.png",class:"next",width:"38rpx",height:"38rpx",onClick:e=>h(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},null,8,["onClick"]),e.createElementVNode("view",{class:"right",style:{color:"#7B7B7B"},onClick:e=>h(`/pages/plantAdmin/breedDetail?id=${t.id}&house_id=${t.fence_house_id}`)},[e.createElementVNode("view",{class:"name"},e.toDisplayString(t.sn),1),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品类:"),e.createElementVNode("view",null,e.toDisplayString((n=t.animal_type,(null==(i=y.value.find((e=>e.value==n)))?void 0:i.name)||"")),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"品种:"),e.createElementVNode("view",null,e.toDisplayString(t.brand),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"性别:"),e.createElementVNode("view",null,e.toDisplayString(t.gender?"公":"母"),1)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"栏舍:"),t.fenceHouseAttr?(e.openBlock(),e.createElementBlock("view",{key:0},e.toDisplayString(t.fenceHouseAttr.fence_house_name),1)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"r-item"},[e.createElementVNode("view",{class:"item-title"},"来源:"),e.createElementVNode("view",null,e.toDisplayString(1==t.animal_source?"购买":"自繁"),1)])],8,["onClick"])])]);var n,i})),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])]),e.createVNode(_,{show:u.value,keyName:"name",closeOnClickOverlay:"",actions:m.value,title:"请选择",onClose:r[2]||(r[2]=e=>u.value=!1),onSelect:p},null,8,["show","actions"]),e.createVNode(k,{ref_key:"codeRef",ref:l},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"bar-code"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(a.value.code.split("d_")[1]),1),e.createVNode(V,{ref_key:"qrCode",ref:n,options:a.value},null,8,["options"]),e.createElementVNode("view",{onClick:i,class:"btn"},"保存图片")])])),_:1},512)])}}},Xl={__name:"jump",setup(t){const a=e.ref(""),n=e.ref([]),i=e.ref({page_no:1,page_size:15}),r=(e=!1)=>{var t;(t={keyword:a.value,page_no:i.value.page_no,page_size:i.value.page_size},An.get("/fence_house/exchangeList",t)).then((t=>{n.value=e?[...n.value,...t.data.lists]:t.data.lists}))};r();const l=()=>{i.value.page_no=1,r()},s=()=>{uni.navigateBack()};return(t,i)=>{const r=o(e.resolveDynamicComponent("u-icon"),C),c=o(e.resolveDynamicComponent("u-search"),Hr);return e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title",onClick:s},[e.createVNode(r,{name:"arrow-left",size:"40rpx",color:"#fff",style:{"margin-right":"10rpx"}}),e.createTextVNode(),e.createElementVNode("text",{style:{"padding-bottom":"5rpx"}},"转栏记录")]),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(r,{name:"plus",color:"#fff",size:"40rpx",style:{"margin-right":"20rpx"},onClick:i[0]||(i[0]=e=>{return t="/pages/jump/addJump",void uni.navigateTo({url:t});var t})}),e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"serch"},[e.createVNode(c,{bgColor:"white","show-action":!1,placeholder:"请输入耳号",modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=e=>a.value=e),shape:"round",clearabled:!1},null,8,["modelValue"]),e.createElementVNode("view",{class:"ser-text",onClick:l}," 搜索 ")]),e.createElementVNode("view",{class:"tits"}," 转栏信息 "),e.createElementVNode("view",{class:""},[n.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a,onClick:e=>(e=>{uni.navigateTo({url:"/pages/jump/jumpDetail",success:t=>{t.eventChannel.emit("setDatasItem",e)}})})(t)},[e.createElementVNode("view",{class:"c-title"},e.toDisplayString(t.animal_sn),1),e.createElementVNode("view",{class:"c-body"},[e.createElementVNode("view",{class:"c-item"},[e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"转出栏舍:"),e.createElementVNode("view",null,e.toDisplayString(t.old_fence_house_name),1)]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"转入栏舍:"),e.createElementVNode("view",null,e.toDisplayString(t.new_fence_house_name),1)])]),e.createElementVNode("view",{class:"c-item"},[e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"转舍时间:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time.split(" ")[0]),1)]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"备注:"),e.createElementVNode("view",null,e.toDisplayString(t.remark),1)])])])],8,["onClick"])))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])])])}}},Zl={__name:"addJump",setup(t){const n=e.ref(null);e.ref(""),e.reactive([]);const i=e.ref(!1),s=e.reactive({animal_sn:"",old_fence_house_id:"",new_fence_house_id:"",remark:""}),c=e=>{s.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),i.value=!1},d=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,u={animal_sn:{type:"string",required:!0,message:"请输入耳号",trigger:["blur","change"]},old_fence_house_id:{type:"number",required:!0,message:"请选择转出栏舍",trigger:["blur","change"]},new_fence_house_id:{type:"number",required:!0,message:"请选择转入栏舍",trigger:["blur","change"]}},m=e.ref(!1),p=e.ref(""),h=e=>{p.value=e.name,s.old_fence_house_id=e.id,s.old_fence_house_id==s.new_fence_house_id&&s.new_fence_house_id&&(uni.showToast({title:"转出栏舍不可与转入栏舍一致",icon:"none"}),g.value="",s.new_fence_house_id="")},f=e.ref(!1),g=e.ref(""),v=e=>{g.value=e.name,s.new_fence_house_id=e.id,s.old_fence_house_id==s.new_fence_house_id&&s.old_fence_house_id&&(uni.showToast({title:"转出栏舍不可与转入栏舍一致",icon:"none"}),p.value="",s.old_fence_house_id="")},y=e.ref([]);Ar({page_no:1,page_size:1e3}).then((e=>{e.data.lists=e.data.lists.map((e=>({id:e.id,name:e.fence_house_name}))),y.value=e.data.lists||[]})),l((()=>{n.value.setRules(u)}));const b=e.ref(Date.now()),w=()=>{n.value.validate().then((e=>{var t;e&&(t=s,An.post("/fence_house/exchange",t)).then((e=>{a("log","at pages/jump/addJump.vue:199",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/jump/addJump.vue:212",e)}))},_=e.ref("add");return r((e=>{})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("u-form-item"),ni),V=o(e.resolveDynamicComponent("up-form-item"),ni),k=o(e.resolveDynamicComponent("u--textarea"),li),x=o(e.resolveDynamicComponent("u--form"),Ei),N=o(e.resolveDynamicComponent("u-button"),Si),C=o(e.resolveDynamicComponent("u-action-sheet"),G),E=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(x,{labelWidth:"130",model:s,rules:u,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"转栏信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"耳号",prop:"animal_sn",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入耳号",disabled:"detail"==_.value,border:"none",modelValue:s.animal_sn,"onUpdate:modelValue":a[0]||(a[0]=e=>s.animal_sn=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(V,{label:"转出栏舍",prop:"old_fence_house_id",borderBottom:"",required:"",onClick:a[2]||(a[2]=e=>m.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择转出栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:p.value,"onUpdate:modelValue":a[1]||(a[1]=e=>p.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(V,{label:"转入栏舍",prop:"new_fence_house_id",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>f.value=!0)},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择转入栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:g.value,"onUpdate:modelValue":a[3]||(a[3]=e=>g.value=e),readonly:""},null,8,["modelValue"])])),_:1})]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(l,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(k,{modelValue:s.remark,"onUpdate:modelValue":a[5]||(a[5]=e=>s.remark=e),disabled:"detail"==_.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==_.value?(e.openBlock(),e.createBlock(N,{key:0,class:"btn",onClick:w},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(C,{show:m.value,keyName:"name",closeOnClickOverlay:"",actions:y.value,title:"请选择转出栏舍",onClose:a[6]||(a[6]=e=>m.value=!1),onSelect:h},null,8,["show","actions"]),e.createVNode(C,{show:f.value,keyName:"name",closeOnClickOverlay:"",actions:y.value,title:"请选择转入栏舍",onClose:a[7]||(a[7]=e=>f.value=!1),onSelect:v},null,8,["show","actions"]),e.createVNode(E,{show:i.value,"max-date":(new Date).getTime(),modelValue:b.value,"onUpdate:modelValue":a[8]||(a[8]=e=>b.value=e),mode:"datetime",onConfirm:c,formatter:d,onCancel:a[9]||(a[9]=e=>i.value=!1)},null,8,["show","max-date","modelValue"])])}}},es=x(Zl,[["__scopeId","data-v-86a7281b"]]),ts=x({__name:"jumpDetail",setup(t){const a=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){Object.assign(a,e)}))})),(t,n)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:a,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"操作信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"耳号",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",type:"txt",border:"none",modelValue:a.animal_sn,"onUpdate:modelValue":n[0]||(n[0]=e=>a.animal_sn=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"转出栏舍",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.old_fence_house_name,"onUpdate:modelValue":n[1]||(n[1]=e=>a.old_fence_house_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"转入类型",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.new_fence_house_name,"onUpdate:modelValue":n[2]||(n[2]=e=>a.new_fence_house_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"转舍时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.create_time,"onUpdate:modelValue":n[3]||(n[3]=e=>a.create_time=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.remark,"onUpdate:modelValue":n[4]||(n[4]=e=>a.remark=e)},null,8,["modelValue"])])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-51ef4072"]]),as={__name:"leave",setup(t){const a=e.ref([]);Wn().then((e=>{a.value=e.data}));const n=e=>{var t;return(null==(t=a.value.find((t=>t.id==e)))?void 0:t.name)||""},i=e.ref(""),r=e.ref([]),l=e.ref({page_no:1,page_size:15}),s=()=>{var e;(e={keyword:i.value,page_no:l.value.page_no,page_size:l.value.page_size},An.get("/fence_house/leaveList",e)).then((e=>{r.value=e.data.lists}))};s();const c=()=>{l.value.page_no=1,s()},d=()=>{uni.navigateBack()};return(t,a)=>{const l=o(e.resolveDynamicComponent("u-icon"),C),s=o(e.resolveDynamicComponent("u-search"),Hr);return e.openBlock(),e.createElementBlock("view",{style:{position:"relative"}},[e.createElementVNode("view",{class:"top"},[e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"},[e.createElementVNode("view",{class:"left"}),e.createElementVNode("view",{class:"title",onClick:d},[e.createVNode(l,{name:"arrow-left",color:"#fff",size:"40rpx",style:{"margin-right":"10rpx"}}),e.createTextVNode(),e.createElementVNode("text",{style:{"padding-bottom":"5rpx"}},"离栏记录")]),e.createElementVNode("view",{class:"btn",style:{"margin-top":"-5rpx"}},[e.createVNode(l,{name:"plus",color:"#fff",size:"40rpx",style:{"margin-right":"20rpx"},onClick:a[0]||(a[0]=e=>{return t="/pages/leave/addLeave",void uni.navigateTo({url:t});var t})}),e.createVNode(En,{url:"/pages/index/massif"})])])]),e.createElementVNode("view",{class:"",style:{height:"var(--status-bar-height)"}}),e.createElementVNode("view",{class:"nav-con"}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"serch"},[e.createVNode(s,{bgColor:"white","show-action":!1,placeholder:"请输入耳号",modelValue:i.value,"onUpdate:modelValue":a[1]||(a[1]=e=>i.value=e),shape:"round",clearabled:!1},null,8,["modelValue"]),e.createElementVNode("view",{class:"ser-text",onClick:c}," 搜索 ")]),e.createElementVNode("view",{class:"tits"}," 离栏记录 "),e.createElementVNode("view",{class:""},[r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"thing-card",key:a,onClick:e=>(e=>{uni.navigateTo({url:"/pages/leave/leaveDetail",success:t=>{e.leave_type_name=n(e.leave_type),t.eventChannel.emit("setDatasItem",e)}})})(t)},[e.createElementVNode("view",{class:"c-title"},e.toDisplayString(t.animal_sn),1),e.createElementVNode("view",{class:"c-body"},[e.createElementVNode("view",{class:"c-item"},[e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"所在栏舍:"),e.createElementVNode("view",null,e.toDisplayString(t.fence_house_name),1)]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"离舍原因:"),e.createElementVNode("view",null,e.toDisplayString(t.reason),1)])]),e.createElementVNode("view",{class:"c-item"},[e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"离舍类型:"),e.createElementVNode("view",null,e.toDisplayString(n(t.leave_type)),1)]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"离舍时间:"),e.createElementVNode("view",null,e.toDisplayString(t.create_time.split(" ")[0]),1)])])]),e.createElementVNode("view",{class:"flex"},[e.createElementVNode("view",{class:"f-title"},"备注:"),e.createElementVNode("view",null,e.toDisplayString(t.remark),1)])],8,["onClick"])))),128)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"coneng-detail"},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:Kn,mode:"aspectFit"}),e.createElementVNode("view",{class:""}," 暂无数据 ")])]))])])])}}},os={__name:"addLeave",setup(t){const n=e.ref(null),i=e.ref(""),s=e.reactive([]),c=e.ref(!1),d=e.reactive({animal_sn:"",leave_type:"",reason:"",remark:"",fence_house_id:""}),u=e=>{d.start_date=uni.$u.timeFormat(e.value,"yyyy-mm-dd hh:MM "),c.value=!1},m=(e,t)=>"year"===e?`${t}年`:"month"===e?`${t}月`:"day"===e?`${t}日`:t,p={animal_sn:{type:"string",required:!0,message:"请输入耳号",trigger:["blur","change"]},fence_house_id:{type:"number",required:!0,message:"请选择所在栏舍",trigger:["blur","change"]},leave_type:{type:"number",required:!0,message:"请输入离舍类型",trigger:["blur","change"]},reason:{type:"string",required:!0,message:"请输入离舍原因",trigger:["blur","change"]}},h=e.ref(!1),f=e.ref(""),g=e=>{f.value=e.name,d.fence_house_id=e.id},v=e.ref(!1),y=e.ref(""),b=e=>{y.value=e.name,d.leave_type=e.id},w=e.ref([]);Wn().then((e=>{w.value=e.data})),l((()=>{n.value.setRules(p)}));const _=e.ref(Date.now()),V=()=>{n.value.validate().then((e=>{var t;a("log","at pages/leave/addLeave.vue:185",e),e&&(t=d,An.post("/fence_house/leave",t)).then((e=>{a("log","at pages/leave/addLeave.vue:191",e),1==e.code&&(uni.$u.toast(e.msg),uni.navigateBack({delta:1}))}))})).catch((e=>{uni.$u.toast(e[0].message),a("log","at pages/leave/addLeave.vue:204",e)}))},k=e.ref([]);Ar({page_no:1,page_size:1e3}).then((e=>{e.data.lists=e.data.lists.map((e=>({id:e.id,name:e.fence_house_name}))),k.value=e.data.lists||[]}));const x=e.ref("add");return r((e=>{if(e.task){let t=e.task?JSON.parse(decodeURIComponent(e.task)):null;Object.assign(d,t.detail),s.splice(0,s.length,...t.detail.pic),x.value="detail",uni.setNavigationBarTitle({title:"收获详情"})}else i.value=e.id})),(t,a)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("up-form-item"),ni),s=o(e.resolveDynamicComponent("u--textarea"),li),N=o(e.resolveDynamicComponent("u--form"),Ei),C=o(e.resolveDynamicComponent("u-button"),Si),E=o(e.resolveDynamicComponent("u-action-sheet"),G),B=o(e.resolveDynamicComponent("u-datetime-picker"),rr);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(N,{labelWidth:"130",model:d,rules:p,ref_key:"form",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"转栏信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"耳号",prop:"animal_sn",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请输入耳号",disabled:"detail"==x.value,border:"none",modelValue:d.animal_sn,"onUpdate:modelValue":a[0]||(a[0]=e=>d.animal_sn=e)},null,8,["disabled","modelValue"])])),_:1}),e.createVNode(l,{label:"所在栏舍",prop:"fence_house_id",borderBottom:"",required:"",onClick:a[2]||(a[2]=e=>h.value=!0)},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请选择所在栏舍",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:f.value,"onUpdate:modelValue":a[1]||(a[1]=e=>f.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"离舍类型",prop:"leave_type",borderBottom:"",required:"",onClick:a[4]||(a[4]=e=>v.value=!0)},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请选择类型",border:"none",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",modelValue:y.value,"onUpdate:modelValue":a[3]||(a[3]=e=>y.value=e),readonly:""},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"离舍原因",prop:"reason",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(i,{"input-align":"right",placeholder:"请输入离舍原因",disabled:"detail"==x.value,border:"none",modelValue:d.reason,"onUpdate:modelValue":a[5]||(a[5]=e=>d.reason=e)},null,8,["disabled","modelValue"])])),_:1})]),e.createElementVNode("view",{class:"c-title"},"备注信息"),e.createElementVNode("view",{class:"c-box",style:{padding:"0 20rpx"}},[e.createVNode(r,{prop:"remark",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(s,{modelValue:d.remark,"onUpdate:modelValue":a[6]||(a[6]=e=>d.remark=e),disabled:"detail"==x.value,placeholder:"请输入内容"},null,8,["modelValue","disabled"])])),_:1})])])),_:1},8,["model"]),"add"==x.value?(e.openBlock(),e.createBlock(C,{key:0,class:"btn",onClick:V},{default:e.withCtx((()=>[e.createTextVNode("完成添加")])),_:1})):e.createCommentVNode("",!0)]),e.createVNode(E,{show:h.value,keyName:"fence_house_name",closeOnClickOverlay:"",actions:k.value,title:"请选择所在栏舍",onClose:a[7]||(a[7]=e=>h.value=!1),onSelect:g},null,8,["show","actions"]),e.createVNode(E,{show:v.value,keyName:"name",closeOnClickOverlay:"",actions:w.value,title:"请选择离舍类型",onClose:a[8]||(a[8]=e=>v.value=!1),onSelect:b},null,8,["show","actions"]),e.createVNode(B,{show:c.value,"max-date":(new Date).getTime(),modelValue:_.value,"onUpdate:modelValue":a[9]||(a[9]=e=>_.value=e),mode:"datetime",onConfirm:u,formatter:m,onCancel:a[10]||(a[10]=e=>c.value=!1)},null,8,["show","max-date","modelValue"])])}}},ns=x(os,[["__scopeId","data-v-068b85ad"]]),is=x({__name:"leaveDetail",setup(t){const a=e.reactive({});return r((function(t){e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(function(e){Object.assign(a,e)}))})),(t,n)=>{const i=o(e.resolveDynamicComponent("up-input"),ai),r=o(e.resolveDynamicComponent("u-form-item"),ni),l=o(e.resolveDynamicComponent("u--form"),Ei);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card-d"},[e.createVNode(l,{labelWidth:"130",model:a,ref:"form"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"操作信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(r,{label:"耳号",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",type:"txt",border:"none",modelValue:a.animal_sn,"onUpdate:modelValue":n[0]||(n[0]=e=>a.animal_sn=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"所在栏舍",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.fence_house_name,"onUpdate:modelValue":n[1]||(n[1]=e=>a.fence_house_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"离舍类型",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.leave_type_name,"onUpdate:modelValue":n[2]||(n[2]=e=>a.leave_type_name=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"离舍原因",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.reason,"onUpdate:modelValue":n[3]||(n[3]=e=>a.reason=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"离舍时间",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.create_time,"onUpdate:modelValue":n[4]||(n[4]=e=>a.create_time=e)},null,8,["modelValue"])])),_:1}),e.createVNode(r,{label:"备注",borderBottom:""},{default:e.withCtx((()=>[e.createVNode(i,{readonly:"",border:"none",modelValue:a.remark,"onUpdate:modelValue":n[5]||(n[5]=e=>a.remark=e)},null,8,["modelValue"])])),_:1})])])),_:1},8,["model"])])])}}},[["__scopeId","data-v-90468592"]]),rs={__name:"plant",setup(t){const n=e.ref(null),i=e.reactive({formData:{farm_name:"",farm_type:"",breed_type:"",form_scale:"",master:"",master_contact:"",province:"",city:"",area:"",street:"",village:"",bridge:"",address:"",lat:"",lon:"",master_name:"",image:[]},rules:{farm_name:[{type:"string",required:!0,message:"请填写养殖基地名称",trigger:["blur","change"]}],farm_type:[{type:"string",required:!0,message:"请填写养殖基地类型",trigger:["blur","change"]}],breed_type:[{type:"string",required:!0,message:"请填写养殖基地种类",trigger:["blur","change"]}],form_scale:[{type:"string",required:!0,message:"请填写养殖基地规模",trigger:["blur","change"]}],province:[{type:"string",required:!0,message:"请请选择所在省份",trigger:"change"}],city:[{type:"string",required:!0,message:"请选择所在城市",trigger:"change"}],area:[{type:"string",required:!0,message:"请选择所在区县",trigger:"change"}],street:{type:"string",required:!0,message:"请选择所在镇街",trigger:["blur","change"]},village:{type:"string",required:!0,message:"请选择所在乡村",trigger:["blur","change"]},bridge:{type:"string",required:!0,message:"请选择小队",trigger:["blur","change"]},address:[{type:"string",required:!0,message:"请输入养殖基地详细地址",trigger:["blur","change"]}],master:[{type:"string",required:!0,message:"请输入养殖基地负责人姓名",trigger:["blur","change"]}],master_contact:[{required:!0,message:"请输入手机号",trigger:["change","blur"]},{validator:(e,t,a)=>uni.$u.test.mobile(t),message:"手机号码不正确",trigger:["change","blur"]}]}}),s=e.reactive([]),c=e.ref(null),d=e.ref(null),u=e.ref(null),m=e.ref(null),p=e.ref(null),h=e.ref(null),f=e.ref(null),g=e.ref(null),v=e.ref(!1),y=e.ref(!1),b=e.ref(!1),w=e.ref(!1),_=e.ref(!1),V=e.ref(!1),k=e.ref(!1),x=e.ref(!1),N=e.reactive([]),E=e.reactive([]),B=e.reactive([]),S=e.reactive([]),D=e.reactive([]),I=e.reactive([]),T=e.reactive([]),P=e.reactive([]),F=e=>{On({province_code:e}).then((e=>{if(E.splice(0,E.length,...e.data.map(((e,t)=>({name:e.city_name,id:e.city_code})))),i.formData.city){let e=E.find((e=>e.id==i.formData.city));if(!e)return;d.value=(null==e?void 0:e.name)||"",U(e.id)}}))},U=e=>{qn({city_code:e}).then((e=>{if(B.splice(0,B.length,...e.data.map(((e,t)=>({name:e.county_name,id:e.county_code})))),i.formData.area){let e=B.find((e=>e.id==i.formData.area));if(!e)return;u.value=(null==e?void 0:e.name)||"",O(e.id)}}))},O=e=>{$n({county_code:e}).then((e=>{if(S.splice(0,N.length,...e.data.map(((e,t)=>({name:e.town_name,id:e.town_code})))),i.formData.street){let e=S.find((e=>e.id==i.formData.street));if(!e)return;m.value=(null==e?void 0:e.name)||"",q(e.id)}}))},q=e=>{Ln({town_code:e}).then((e=>{if(D.splice(0,N.length,...e.data.map(((e,t)=>({name:e.village_name,id:e.village_code})))),i.formData.village){let e=D.find((e=>e.id==i.formData.village));if(!e)return;p.value=(null==e?void 0:e.name)||"",$()}}))},$=()=>{zn().then((e=>{if(I.splice(0,N.length,...e.data.map(((e,t)=>({name:e.group_name,id:e.group_code})))),i.formData.bridge){let e=I.find((e=>e.id==i.formData.bridge));if(!e)return;h.value=(null==e?void 0:e.name)||""}}))},L=e=>{f.value=e.name,i.formData.farm_type=e.value},z=e=>{g.value=e.name,i.formData.breed_type=e.value},j=async()=>{uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:e=>{sr(e.tempFilePaths[0]).then((e=>{1==e.code&&(s.push(e.data.url),uni.$u.toast("上传成功"))})).catch((e=>{}))},fail:function(e){uni.$u.toast("添加失败")}})},M=()=>{le.value||(v.value=!0)},R=()=>{le.value||(y.value=!0)},H=()=>{le.value||(b.value=!0)},Q=()=>{le.value||(w.value=!0)},W=()=>{le.value||(_.value=!0)},J=()=>{le.value||(V.value=!0)},K=()=>{le.value||(k.value=!0)},Y=()=>{le.value||(x.value=!0)},X=e=>{a("log","at pages/plant/plant.vue:548",e),c.value=e.name,i.formData.province=e.id,F(e.id)},Z=e=>{d.value=e.name,i.formData.city=e.id,U(e.id)},ee=e=>{u.value=e.name,i.formData.area=e.id,O(e.id)},te=e=>{m.value=e.name,i.formData.street=e.id,q(e.id)},ae=e=>{p.value=e.name,i.formData.village=e.id,$()},oe=e=>{h.value=e.name,i.formData.bridge=e.id},ne=()=>{le.value||uni.navigateTo({url:"/pages/addPlant/select_address_n",success:e=>{uni.$once("setData",(e=>{a("log","at pages/plant/plant.vue:591","选择地址",e=JSON.parse(e||"{}")),i.formData.address=e.address,i.formData.lat=e.lat,i.formData.lon=e.lon}))}})};l((()=>{n.value.setRules(i.rules)}));const ie=async()=>{try{if(await n.value.validate()){if(0==s.length)return void uni.$u.toast("请上传图片");i.formData.image=JSON.stringify(s),jn(i.formData).then((e=>{a("log","at pages/plant/plant.vue:623",e),1==e.code&&(uni.navigateBack({delta:1}),uni.$u.toast(e.msg))}))}else a("log","at pages/plant/plant.vue:634","表单验证未通过")}catch(e){a("error","at pages/plant/plant.vue:638",e)}};function re(e){for(let t in e)"object"==typeof e[t]?re(e[t]):"number"==typeof e[t]&&(e[t]=e[t].toString())}const le=e.ref(!1);return r((t=>{e.getCurrentInstance().proxy.getOpenerEventChannel().on("setDatasItem",(e=>{re(e),a("log","at pages/plant/plant.vue:657",e),le.value=!0,e.pic=JSON.parse(e.pic||"[]"),e.image=JSON.parse(e.image||"[]"),e.pic.length>0?Object.assign(s,e.pic):Object.assign(s,e.image),Object.assign(i.formData,e),Un().then((e=>{if(N.splice(0,N.length,...e.data.map(((e,t)=>({name:e.province_name,id:e.province_code})))),i.formData.province){let e=N.find((e=>e.id==i.formData.province));if(!e)return;c.value=(null==e?void 0:e.name)||"",F(e.id)}})),Mn().then((e=>{if(T.splice(0,T.length,...e.data.map(((e,t)=>({name:e.name,value:e.value,id:e.id})))),i.formData.farm_type){let e=T.find((e=>e.value==i.formData.farm_type));f.value=(null==e?void 0:e.name)||""}})),Rn().then((e=>{if(P.splice(0,P.length,...e.data.map(((e,t)=>({name:e.name,value:e.value,id:e.id})))),i.formData.breed_type){let e=P.find((e=>e.value==i.formData.breed_type));g.value=(null==e?void 0:e.name)||""}}))}))})),(t,a)=>{const r=o(e.resolveDynamicComponent("up-input"),ai),l=o(e.resolveDynamicComponent("up-form-item"),ni),F=o(e.resolveDynamicComponent("u-icon"),C),U=o(e.resolveDynamicComponent("u-image"),A),O=o(e.resolveDynamicComponent("up-form"),Ei),q=o(e.resolveDynamicComponent("u-action-sheet"),G),$=o(e.resolveDynamicComponent("u-button"),Si);return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"card"},[e.createVNode(O,{labelWidth:"130",model:i.formData,ref_key:"form1",ref:n},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"c-title"},"养殖基地信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"养殖基地名称",prop:"farm_name",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地名称",border:"none",modelValue:i.formData.farm_name,"onUpdate:modelValue":a[0]||(a[0]=e=>i.formData.farm_name=e),readonly:le.value},null,8,["modelValue","readonly"])])),_:1}),e.createVNode(l,{label:"养殖基地类型",prop:"farm_type",borderBottom:"",required:"",onClick:K},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择养殖基地类型",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:f.value,"onUpdate:modelValue":a[1]||(a[1]=e=>f.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖种类",prop:"farm_type",borderBottom:"",required:"",onClick:Y},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择养殖种类",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:g.value,"onUpdate:modelValue":a[2]||(a[2]=e=>g.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地规模(亩)",prop:"form_scale",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地规模",type:"number",border:"none",modelValue:i.formData.form_scale,"onUpdate:modelValue":a[3]||(a[3]=e=>i.formData.form_scale=e),readonly:le.value},null,8,["modelValue","readonly"])])),_:1}),e.createVNode(l,{label:"负责人",prop:"master",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人姓名",border:"none",modelValue:i.formData.master,"onUpdate:modelValue":a[4]||(a[4]=e=>i.formData.master=e),readonly:le.value},null,8,["modelValue","readonly"])])),_:1}),e.createVNode(l,{label:"负责人电话",prop:"master_contact",borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入负责人电话",type:"number",border:"none",modelValue:i.formData.master_contact,"onUpdate:modelValue":a[5]||(a[5]=e=>i.formData.master_contact=e),readonly:le.value},null,8,["modelValue","readonly"])])),_:1})]),e.createElementVNode("view",{class:"c-title"},"地址信息"),e.createElementVNode("view",{class:"c-box"},[e.createVNode(l,{label:"所在省份",prop:"province",borderBottom:"",required:"",onClick:M},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在省份",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:c.value,"onUpdate:modelValue":a[6]||(a[6]=e=>c.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在城市",prop:"city",borderBottom:"",required:"",onClick:R},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在城市",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:d.value,"onUpdate:modelValue":a[7]||(a[7]=e=>d.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在区县",prop:"area",borderBottom:"",required:"",onClick:H},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在区县",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:u.value,"onUpdate:modelValue":a[8]||(a[8]=e=>u.value=e),readonly:"",style:{"pointer-events":"none"}},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在镇街",prop:"formData.street",borderBottom:"",required:"",onClick:Q},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在镇街",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:m.value,"onUpdate:modelValue":a[9]||(a[9]=e=>m.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在乡村",prop:"formData.village",borderBottom:"",required:"",onClick:W},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在乡村",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:p.value,"onUpdate:modelValue":a[10]||(a[10]=e=>p.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"所在小队",prop:"formData.bridge",borderBottom:"",required:"",onClick:J},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请选择所在小队",suffixIcon:"arrow-down","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:h.value,"onUpdate:modelValue":a[11]||(a[11]=e=>h.value=e)},null,8,["modelValue"])])),_:1}),e.createVNode(l,{label:"养殖基地详细地址",prop:"address",style:{position:"relative"},borderBottom:"",required:""},{default:e.withCtx((()=>[e.createVNode(r,{"input-align":"right",placeholder:"请输入养殖基地详细地址",suffixIcon:"map","suffix-icon-style":"color: #b6b6b6;",border:"none",modelValue:i.formData.address,"onUpdate:modelValue":a[12]||(a[12]=e=>i.formData.address=e)},null,8,["modelValue"]),e.createElementVNode("view",{style:{position:"absolute",right:"0",width:"50rpx",height:"100%"},onClick:ne})])),_:1})]),e.createElementVNode("view",{class:"card-li"},[e.createElementVNode("view",{class:"c-title"},"养殖基地图片"),e.createElementVNode("view",{class:"c-box c-box-p"},[e.createElementVNode("view",{class:"code-img1"},[s.length>0?(e.openBlock(),e.createElementBlock("view",{key:0,class:"",style:{display:"flex","flex-direction":"row","flex-wrap":"wrap","margin-bottom":"30rpx"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{"margin-right":"30rpx"}},[e.createElementVNode("view",{class:""},[le.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F,{key:0,name:"close",size:"15",style:{"margin-left":"120.85rpx"},onClick:e=>(e=>{s.splice(e,1)})(a)},null,8,["onClick"])),e.createVNode(U,{src:t,width:"150.85rpx",height:"150.85rpx"},null,8,["src"])])])))),256))])):e.createCommentVNode("",!0)]),le.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"code-img"},[e.createElementVNode("view",{class:"",onClick:j},[e.createElementVNode("view",{class:"carime-icon"},[e.createVNode(U,{src:"/static/img/DJSC.png",width:"91.12rpx",height:"91.12rpx"}),e.createElementVNode("view",{class:""}," 点击上传图片 ")])])]))])])])),_:1},8,["model"]),e.createVNode(q,{show:v.value,keyName:"name",closeOnClickOverlay:"",actions:N,title:"请选择",onClose:a[13]||(a[13]=e=>v.value=!1),onSelect:X},null,8,["show","actions"]),e.createVNode(q,{show:y.value,keyName:"name",actions:E,title:"请选择",onClose:a[14]||(a[14]=e=>y.value=!1),onSelect:Z},null,8,["show","actions"]),e.createVNode(q,{show:b.value,keyName:"name",actions:B,title:"请选择",onClose:a[15]||(a[15]=e=>b.value=!1),onSelect:ee},null,8,["show","actions"]),e.createVNode(q,{show:w.value,keyName:"name",actions:S,title:"请选择",onClose:a[16]||(a[16]=e=>w.value=!1),onSelect:te},null,8,["show","actions"]),e.createVNode(q,{show:_.value,keyName:"name",actions:D,title:"请选择",onClose:a[17]||(a[17]=e=>_.value=!1),onSelect:ae},null,8,["show","actions"]),e.createVNode(q,{show:V.value,keyName:"name",actions:I,title:"请选择",onClose:a[18]||(a[18]=e=>V.value=!1),onSelect:oe},null,8,["show","actions"]),e.createVNode(q,{show:k.value,keyName:"name",actions:T,title:"请选择",onClose:a[19]||(a[19]=e=>k.value=!1),onSelect:L},null,8,["show","actions"]),e.createVNode(q,{show:x.value,keyName:"name",actions:P,title:"请选择",onClose:a[20]||(a[20]=e=>x.value=!1),onSelect:z},null,8,["show","actions"]),le.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:0,class:"btn",onClick:ie},{default:e.withCtx((()=>[e.createTextVNode("提交")])),_:1}))])])}}};__definePage("pages/index/massif",Jn),__definePage("pages/landDetail/index",Yn),__definePage("pages/landDetail/tudi",Zn),__definePage("pages/husbandryForm/harvest",dr),__definePage("pages/husbandryForm/Pest",mr),__definePage("pages/husbandryForm/irrigate",hr),__definePage("pages/husbandryForm/weeding",gr),__definePage("pages/husbandryForm/fertilize",yr),__definePage("pages/husbandryForm/sow",wr),__definePage("pages/live/live",kr),__definePage("pages/addPlant/addPlant",xr),__definePage("pages/equipment/index",Nr),__definePage("pages/landDetail/results",Fr),__definePage("pages/husbandryForm/detail",Ur),__definePage("pages/updatePassword/updatePassword",qr),__definePage("pages/index/personal",$r),__definePage("pages/Login/login",Lr),__definePage("pages/Login/resgier",zr),__definePage("pages/index/manager",jr),__definePage("pages/plantAdmin/house",Qr),__definePage("pages/plantAdmin/addHouse",Wr),__definePage("pages/plantAdmin/houseDetail",Nl),__definePage("pages/plantAdmin/breedDetail",Bl),__definePage("pages/plantAdmin/addBreed",Sl),__definePage("pages/feed/feed",Al),__definePage("pages/feed/water",Tl),__definePage("pages/feed/sterilize",Fl),__definePage("pages/feed/vaccine",Ol),__definePage("pages/feed/expelling",$l),__definePage("pages/feedDetail/feedDetail",Ll),__definePage("pages/feedDetail/expellingDetail",zl),__definePage("pages/feedDetail/sterilizeDetail",jl),__definePage("pages/feedDetail/vaccineDetail",Ml),__definePage("pages/feedDetail/waterDetail",Rl),__definePage("pages/plantAdmin/moreBreed",Ql),__definePage("pages/plantAdmin/moreFeed",Gl),__definePage("pages/record/record",Yl),__definePage("pages/jump/jump",Xl),__definePage("pages/jump/addJump",es),__definePage("pages/jump/jumpDetail",ts),__definePage("pages/leave/leave",as),__definePage("pages/leave/addLeave",ns),__definePage("pages/leave/leaveDetail",is),__definePage("pages/plant/plant",rs);const ls={onLaunch:function(){uni.hideTabBar()},onShow:function(){a("log","at App.vue:8","App Show")},onHide:function(){a("log","at App.vue:12","App Hide")}},{toString:ss}=Object.prototype;function cs(e){return"[object Array]"===ss.call(e)}function ds(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),cs(e))for(let a=0,o=e.length;a{null!=t&&(cs(t)?a=`${a}[]`:t=[t],ds(t,(t=>{!function(e){return"[object Date]"===ss.call(e)}(t)?function(e){return null!==e&&"object"==typeof e}(t)&&(t=JSON.stringify(t)):t=t.toISOString(),e.push(`${ps(a)}=${ps(t)}`)})))})),a=e.join("&")}var o;if(a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const fs=(e,t)=>{const a={};return e.forEach((e=>{ms(t[e])||(a[e]=t[e])})),a},gs=e=>(e=>new Promise(((t,a)=>{const o=hs((n=e.baseURL,i=e.url,n&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)?function(e,t){return t?`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`:e}(n,i):i),e.params);var n,i;const r={url:o,header:e.header,complete:n=>{e.fullPath=o,n.config=e;try{"string"==typeof n.data&&(n.data=JSON.parse(n.data))}catch(it){}!function(e,t,a){const{validateStatus:o}=a.config,n=a.statusCode;!n||o&&!o(n)?t(a):e(a)}(t,a,n)}};let l;if("UPLOAD"===e.method){delete r.header["content-type"],delete r.header["Content-Type"];const t={filePath:e.filePath,name:e.name},a=["files","timeout","formData"];l=uni.uploadFile({...r,...t,...fs(a,e)})}else if("DOWNLOAD"===e.method)ms(e.timeout)||(r.timeout=e.timeout),l=uni.downloadFile(r);else{const t=["data","method","timeout","dataType","responseType","sslVerify","firstIpv4"];l=uni.request({...r,...fs(t,e)})}e.getTask&&e.getTask(l,e)})))(e);function vs(){this.handlers=[]}vs.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},vs.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},vs.prototype.forEach=function(e){this.handlers.forEach((t=>{null!==t&&e(t)}))};const ys=(e,t,a)=>{const o={};return e.forEach((e=>{ms(a[e])?ms(t[e])||(o[e]=t[e]):o[e]=a[e]})),o},bs={baseURL:"",header:{},method:"GET",dataType:"json",responseType:"text",custom:{},timeout:6e4,sslVerify:!0,firstIpv4:!1,validateStatus:function(e){return e>=200&&e<300}};var ws=function(){function e(e,t){return null!=t&&e instanceof t}var t,a,o;try{t=Map}catch(l){t=function(){}}try{a=Set}catch(l){a=function(){}}try{o=Promise}catch(l){o=function(){}}function n(i,l,s,c,d){"object"==typeof l&&(s=l.depth,c=l.prototype,d=l.includeNonEnumerable,l=l.circular);var u=[],m=[],p="undefined"!=typeof Buffer;return void 0===l&&(l=!0),void 0===s&&(s=1/0),function i(s,h){if(null===s)return null;if(0===h)return s;var f,g;if("object"!=typeof s)return s;if(e(s,t))f=new t;else if(e(s,a))f=new a;else if(e(s,o))f=new o((function(e,t){s.then((function(t){e(i(t,h-1))}),(function(e){t(i(e,h-1))}))}));else if(n.__isArray(s))f=[];else if(n.__isRegExp(s))f=new RegExp(s.source,r(s)),s.lastIndex&&(f.lastIndex=s.lastIndex);else if(n.__isDate(s))f=new Date(s.getTime());else{if(p&&Buffer.isBuffer(s))return Buffer.from?f=Buffer.from(s):(f=new Buffer(s.length),s.copy(f)),f;e(s,Error)?f=Object.create(s):void 0===c?(g=Object.getPrototypeOf(s),f=Object.create(g)):(f=Object.create(c),g=c)}if(l){var v=u.indexOf(s);if(-1!=v)return m[v];u.push(s),m.push(f)}for(var y in e(s,t)&&s.forEach((function(e,t){var a=i(t,h-1),o=i(e,h-1);f.set(a,o)})),e(s,a)&&s.forEach((function(e){var t=i(e,h-1);f.add(t)})),s){Object.getOwnPropertyDescriptor(s,y)&&(f[y]=i(s[y],h-1));try{if("undefined"===Object.getOwnPropertyDescriptor(s,y).set)continue;f[y]=i(s[y],h-1)}catch(it){if(it instanceof TypeError)continue;if(it instanceof ReferenceError)continue}}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(s);for(y=0;y{uni.$u.routeIntercept(a,e)}))&&this.openPage(a)}else this.openPage(a)}openPage(e){const{url:t,type:a,delta:o,animationType:n,animationDuration:i}=e;"navigateTo"!=e.type&&"to"!=e.type||uni.navigateTo({url:t,animationType:n,animationDuration:i}),"redirectTo"!=e.type&&"redirect"!=e.type||uni.redirectTo({url:t}),"switchTab"!=e.type&&"tab"!=e.type||uni.switchTab({url:t}),"reLaunch"!=e.type&&"launch"!=e.type||uni.reLaunch({url:t}),"navigateBack"!=e.type&&"back"!=e.type||uni.navigateBack({delta:o})}}).route;function Vs(e,t=!0){if((e=String(e).toLowerCase())&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(e)){if(4===e.length){let t="#";for(let a=1;a<4;a+=1)t+=e.slice(a,a+1).concat(e.slice(a,a+1));e=t}const a=[];for(let t=1;t<7;t+=2)a.push(parseInt(`0x${e.slice(t,t+2)}`));return t?`rgb(${a[0]},${a[1]},${a[2]})`:a}if(/^(rgb|RGB)/.test(e)){return e.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map((e=>Number(e)))}return e}function ks(e){const t=e;if(/^(rgb|RGB)/.test(t)){const e=t.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",");let a="#";for(let t=0;t=0},range:function(e,t){return e>=t[0]&&e<=t[1]},rangeLength:function(e,t){return e.length>=t[0]&&e.length<=t[1]},empty:Cs,isEmpty:Cs,jsonString:function(e){if("string"==typeof e)try{const t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(it){return!1}return!1},landline:function(e){return/^\d{3,4}-\d{7,8}(-\d{3,4})?$/.test(e)},object:Es,array:function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},code:function(e,t=6){return new RegExp(`^\\d{${t}}$`).test(e)},func:Bs,promise:function(e){return Es(e)&&Bs(e.then)&&Bs(e.catch)},video:function(e){return/\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i.test(e)},image:function(e){const t=e.split("?")[0];return/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i.test(t)},regExp:function(e){return e&&"[object RegExp]"===Object.prototype.toString.call(e)},string:function(e){return"string"==typeof e}};let Ds,As=null;function Is(e,t=15){return+parseFloat(Number(e).toPrecision(t))}function Ts(e){const t=e.toString().split(/[eE]/),a=(t[0].split(".")[1]||"").length-+(t[1]||0);return a>0?a:0}function Ps(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));const t=Ts(e);return t>0?Is(Number(e)*Math.pow(10,t)):Number(e)}function Fs(e){(e>Number.MAX_SAFE_INTEGER||e{i=t(i,e)})),i}function Os(...e){if(e.length>2)return Us(e,Os);const[t,a]=e,o=Ps(t),n=Ps(a),i=Ts(t)+Ts(a),r=o*n;return Fs(r),r/Math.pow(10,i)}function qs(...e){if(e.length>2)return Us(e,qs);const[t,a]=e,o=Ps(t),n=Ps(a);return Fs(o),Fs(n),Os(o/n,Is(Math.pow(10,Ts(a)-Ts(t))))}function $s(e){if([null,void 0,NaN,!1].includes(e))return e;if("object"!=typeof e&&"function"!=typeof e)return e;const t=Ss.array(e)?[]:{};for(const a in e)e.hasOwnProperty(a)&&(t[a]="object"==typeof e[a]?$s(e[a]):e[a]);return t}function Ls(e=null,t="yyyy-mm-dd"){let a;a=e?/^\d{10}$/.test(e.toString().trim())?new Date(1e3*e):"string"==typeof e&&/^\d+$/.test(e.trim())?new Date(Number(e)):new Date("string"==typeof e?e.replace(/-/g,"/"):e):new Date;const o={y:a.getFullYear().toString(),m:(a.getMonth()+1).toString().padStart(2,"0"),d:a.getDate().toString().padStart(2,"0"),h:a.getHours().toString().padStart(2,"0"),M:a.getMinutes().toString().padStart(2,"0"),s:a.getSeconds().toString().padStart(2,"0")};for(const n in o){const[e]=new RegExp(`${n}+`).exec(t)||[];if(e){const a="y"===n&&2===e.length?2:0;t=t.replace(e,o[n].slice(a))}}return t}function zs(e,t="both"){return e=String(e),"both"==t?e.replace(/^\s+|\s+$/g,""):"left"==t?e.replace(/^\s*/,""):"right"==t?e.replace(/(\s*$)/g,""):"all"==t?e.replace(/\s+/g,""):e}String.prototype.padStart||(String.prototype.padStart=function(e,t=" "){if("[object String]"!==Object.prototype.toString.call(t))throw new TypeError("fillString must be String");const a=this;if(a.length>=e)return String(a);const o=e-a.length;let n=Math.ceil(o/t.length);for(;n>>=1;)t+=t,1===n&&(t+=t);return t.slice(0,o)+a});const js={range:function(e=0,t=0,a=0){return Math.max(e,Math.min(t,Number(a)))},getPx:function(e,t=!1){return Ss.number(e)?t?`${e}px`:Number(e):/(rpx|upx)$/.test(e)?t?`${uni.upx2px(parseInt(e))}px`:Number(uni.upx2px(parseInt(e))):t?`${parseInt(e)}px`:parseInt(e)},sleep:function(e=30){return new Promise((t=>{setTimeout((()=>{t()}),e)}))},os:function(){return uni.getSystemInfoSync().platform.toLowerCase()},sys:function(){return uni.getSystemInfoSync()},random:function(e,t){if(e>=0&&t>0&&t>=e){const a=t-e+1;return Math.floor(Math.random()*a+e)}return 0},guid:function(e=32,t=!0,a=null){const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[];if(a=a||o.length,e)for(let i=0;iMath.random()-.5))},timeFormat:Ls,timeFrom:function(e=null,t="yyyy-mm-dd"){null==e&&(e=Number(new Date)),10==(e=parseInt(e)).toString().length&&(e*=1e3);let a=(new Date).getTime()-e;a=parseInt(a/1e3);let o="";switch(!0){case a<300:o="刚刚";break;case a>=300&&a<3600:o=`${parseInt(a/60)}分钟前`;break;case a>=3600&&a<86400:o=`${parseInt(a/3600)}小时前`;break;case a>=86400&&a<2592e3:o=`${parseInt(a/86400)}天前`;break;default:o=!1===t?a>=2592e3&&a<31536e3?`${parseInt(a/2592e3)}个月前`:`${parseInt(a/31536e3)}年前`:Ls(e,t)}return o},trim:zs,queryParams:function(e={},t=!0,a="brackets"){const o=t?"?":"",n=[];-1==["indices","brackets","repeat","comma"].indexOf(a)&&(a="brackets");for(const i in e){const t=e[i];if(!(["",void 0,null].indexOf(t)>=0))if(t.constructor===Array)switch(a){case"indices":for(let a=0;a{n.push(`${i}[]=${e}`)}));break;case"repeat":t.forEach((e=>{n.push(`${i}=${e}`)}));break;case"comma":let e="";t.forEach((t=>{e+=(e?",":"")+t})),n.push(`${i}=${e}`)}else n.push(`${i}=${t}`)}return n.length?o+n.join("&"):""},toast:function(e,t=2e3){uni.showToast({title:String(e),icon:"none",duration:t})},type2icon:function(e="success",t=!1){-1==["primary","info","error","warning","success"].indexOf(e)&&(e="success");let a="";switch(e){case"primary":case"info":a="info-circle";break;case"error":a="close-circle";break;case"warning":a="error-circle";break;default:a="checkmark-circle"}return t&&(a+="-fill"),a},priceFormat:function(e,t=0,a=".",o=","){e=`${e}`.replace(/[^0-9+-Ee.]/g,"");const n=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):0,r=void 0===o?",":o,l=void 0===a?".":a;let s="";s=(i?function(e,t){const a=Math.pow(10,t);let o=qs(Math.round(Math.abs(Os(e,a))),a);return e<0&&0!==o&&(o=Os(o,-1)),o}(n,i)+"":`${Math.round(n)}`).split(".");const c=/(-?\d+)(\d{3})/;for(;c.test(s[0]);)s[0]=s[0].replace(c,`$1${r}$2`);return(s[1]||"").length30?`${e}ms`:`${e}s`:/ms$/.test(e)?a:/s$/.test(e)?a>30?a:1e3*a:a},padZero:function(e){return`00${e}`.slice(-2)},formValidate:function(e,t){const a=uni.$u.$parent.call(e,"u-form-item"),o=uni.$u.$parent.call(e,"u-form");a&&o&&o.validateField(a.prop,(()=>{}),t)},getProperty:function(e,t){if(e){if("string"!=typeof t||""===t)return"";if(-1!==t.indexOf(".")){const a=t.split(".");let o=e[a[0]]||{};for(let e=1;e1;){const n=t[0];e[n]&&"object"==typeof e[n]||(e[n]={}),t.shift(),o(e[n],t,a)}else e[t[0]]=a};if("string"!=typeof t||""===t);else if(-1!==t.indexOf(".")){const n=t.split(".");o(e,n,a)}else e[t]=a},page:function(){const e=getCurrentPages();return`/${e[e.length-1].route||""}`},pages:function(){return getCurrentPages()},setConfig:function({props:e={},config:t={},color:a={},zIndex:o={}}){const{deepMerge:n}=uni.$u;uni.$u.config=n(uni.$u.config,t),uni.$u.props=n(uni.$u.props,e),uni.$u.color=n(uni.$u.color,a),uni.$u.zIndex=n(uni.$u.zIndex,o)}};let Ms="none";Ms="vue3",Ms="plus";const Rs={route:_s,date:js.timeFormat,colorGradient:xs.colorGradient,hexToRgb:xs.hexToRgb,rgbToHex:xs.rgbToHex,colorToRgba:xs.colorToRgba,test:Ss,type:["primary","success","error","warning","info"],http:new class{constructor(e={}){var t;t=e,"[object Object]"!==Object.prototype.toString.call(t)&&(e={},a("warn","at node_modules/uview-plus/libs/luch-request/core/Request.js:39","设置全局参数必须接收一个Object")),this.config=ws({...bs,...e}),this.interceptors={request:new vs,response:new vs}}setConfig(e){this.config=e(this.config)}middleware(e){e=((e,t={})=>{const a=t.method||e.method||"GET";let o={baseURL:e.baseURL||"",method:a,url:t.url||"",params:t.params||{},custom:{...e.custom||{},...t.custom||{}},header:us(e.header||{},t.header||{})};if(o={...o,...ys(["getTask","validateStatus"],e,t)},"DOWNLOAD"===a)ms(t.timeout)?ms(e.timeout)||(o.timeout=e.timeout):o.timeout=t.timeout;else if("UPLOAD"===a)delete o.header["content-type"],delete o.header["Content-Type"],["files","filePath","name","timeout","formData"].forEach((e=>{ms(t[e])||(o[e]=t[e])})),ms(o.timeout)&&!ms(e.timeout)&&(o.timeout=e.timeout);else{const a=["data","timeout","dataType","responseType","sslVerify","firstIpv4"];o={...o,...ys(a,e,t)}}return o})(this.config,e);const t=[gs,void 0];let a=Promise.resolve(e);for(this.interceptors.request.forEach((e=>{t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((e=>{t.push(e.fulfilled,e.rejected)}));t.length;)a=a.then(t.shift(),t.shift());return a}request(e={}){return this.middleware(e)}get(e,t={}){return this.middleware({url:e,method:"GET",...t})}post(e,t,a={}){return this.middleware({url:e,data:t,method:"POST",...a})}put(e,t,a={}){return this.middleware({url:e,data:t,method:"PUT",...a})}delete(e,t,a={}){return this.middleware({url:e,data:t,method:"DELETE",...a})}options(e,t,a={}){return this.middleware({url:e,data:t,method:"OPTIONS",...a})}upload(e,t={}){return t.url=e,t.method="UPLOAD",this.middleware(t)}download(e,t={}){return t.url=e,t.method="DOWNLOAD",this.middleware(t)}},config:u,zIndex:{toast:10090,noNetwork:10080,popup:10075,mask:10070,navbar:980,topTips:975,sticky:970,indexListSticky:965},debounce:function(e,t=500,a=!1){if(null!==As&&clearTimeout(As),a){const a=!As;As=setTimeout((()=>{As=null}),t),a&&"function"==typeof e&&e()}else As=setTimeout((()=>{"function"==typeof e&&e()}),t)},throttle:function(e,t=500,a=!0){a?Ds||(Ds=!0,"function"==typeof e&&e(),setTimeout((()=>{Ds=!1}),t)):Ds||(Ds=!0,setTimeout((()=>{Ds=!1,"function"==typeof e&&e()}),t))},mixin:k,mpMixin:V,props:w,...js,color:b,platform:"plus"};uni.$u=Rs;const Hs={install:e=>{e.config.globalProperties.$u=Rs,e.config.globalProperties.$nextTick=e=>{e()},e.mixin(k)}};const{app:Qs,Vuex:Ws,Pinia:Js}=function(){const t=e.createVueApp(ls);return t.use(Hs),t.use(wn),{app:t}}();uni.Vuex=Ws,uni.Pinia=Js,Qs.provide("__globalStyles",__uniConfig.styles),Qs._component.mpType="app",Qs._component.render=()=>{},Qs.mount("#app")}(Vue,uni.VueShared);