You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
26 KiB
1 lines
26 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/Administrator/Desktop/sports/pages/index/add.vue?7d92","webpack:///C:/Users/Administrator/Desktop/sports/pages/index/add.vue?6ead","webpack:///C:/Users/Administrator/Desktop/sports/pages/index/add.vue?2ad2","webpack:///C:/Users/Administrator/Desktop/sports/pages/index/add.vue?d3bf","uni-app:///pages/index/add.vue","webpack:///C:/Users/Administrator/Desktop/sports/pages/index/add.vue?f05a","webpack:///C:/Users/Administrator/Desktop/sports/pages/index/add.vue?32b1"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","type","endDate","sexIndex","sexList","strainsList","strainsIndex","geneList","geneIndex","fatherList","fatherIndex","motherList","motherIndex","info","id","cid","onLoad","uni","title","methods","toCreate","icon","sex","birthday","strains_id","father","mother","gene","hair_color","cage","remark","uid","count","strains","errorcode","message","setTimeout","delta","get_api_squirrel_detail","get_api_squirrel_getparents","get_api_basicinfo_strains","get_api_basicinfo_gene","bindDateChange","bindDateChange1","bindDateChange2","bindDateChange3","bindDateChange4","bindDateChange5"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,YAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAA4H;AAC5H;AACuD;AACL;AACsC;;;AAGxF;AACuM;AACvM,gBAAgB,iNAAU;AAC1B,EAAE,yEAAM;AACR,EAAE,0FAAM;AACR,EAAE,mGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,8FAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;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A;gBAAAN;gBAAAlC;gBACA;kBACA;kBACA;oBACAM;oBACA;sBACA;wBACA;0BACAA;wBACA;sBACA;sBACA;oBACA;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACAmC;MAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OACA;cAAA;gBAAA;gBAAAP;gBAAAlC;gBACA;kBACA;kBACA;oBACAQ;oBACA;sBACA;wBACA;0BACAA;wBACA;sBACA;sBACA;oBACA;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IAEA;IACAkC;MACA;MACA;IACA;IACAC;MACA;MACA;IACA;IACAC;MACA;MACA;IACA;IACAC;MACA;MACA;IACA;IACAC;MACA;MACA;IACA;IACAC;MACA;MACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;;AC/UA;AAAA;AAAA;AAAA;AAAu+C,CAAgB,w7CAAG,EAAC,C;;;;;;;;;;;ACA3/C;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/index/add.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/index/add.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./add.vue?vue&type=template&id=d86df08a&scoped=true&\"\nvar renderjs\nimport script from \"./add.vue?vue&type=script&lang=js&\"\nexport * from \"./add.vue?vue&type=script&lang=js&\"\nimport style0 from \"./add.vue?vue&type=style&index=0&id=d86df08a&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d86df08a\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/index/add.vue\"\nexport default component.exports","export * from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./add.vue?vue&type=template&id=d86df08a&scoped=true&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./add.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./add.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"add\">\r\n\t\t<view class=\"add-bd\">\r\n\t\t\t<view class=\"item\" v-if=\"info.id\">\r\n\t\t\t\t<view class=\"l\">编号:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<input type=\"text\" v-model=\"info.number\" />\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\" v-if=\"type == 3 || type == 4\">\r\n\t\t\t\t<view class=\"l\">数量:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<input type=\"number\" v-model=\"info.count\" />\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\" v-else>\r\n\t\t\t\t<view class=\"l\">性别:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<picker mode=\"selector\" :range=\"sexList\" :value=\"sexIndex\" @change=\"bindDateChange\">\r\n\t\t\t\t\t\t{{sexIndex>= 0?sexList[sexIndex]:\"\"}}\r\n\t\t\t\t\t\t<image class=\"arrow\" src=\"@/static/jiantouxia@2x.png\"></image>\r\n\t\t\t\t\t</picker>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"l\">生日:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<picker mode=\"date\" :value=\"info.birthday\" :end=\"endDate\" @change=\"bindDateChange1\">\r\n\t\t\t\t\t\t{{info.birthday?info.birthday:\"\"}}\r\n\t\t\t\t\t\t<image class=\"date\" src=\"@/static/rili@2x.png\"></image>\r\n\t\t\t\t\t</picker>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"l\">父亲:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<picker mode=\"selector\" :range=\"fatherList\" :value=\"fatherIndex\" @change=\"bindDateChange4\" range-key=\"number\">\r\n\t\t\t\t\t\t{{fatherIndex >=0 ? fatherList[fatherIndex].number:\"\"}}\r\n\t\t\t\t\t\t<image class=\"arrow\" src=\"@/static/jiantouxia@2x.png\"></image>\r\n\t\t\t\t\t</picker>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"l\">母亲:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<picker mode=\"selector\" :range=\"motherList\" :value=\"motherIndex\" @change=\"bindDateChange5\" range-key=\"number\">\r\n\t\t\t\t\t\t{{motherIndex >=0 ? motherList[motherIndex].number:\"\"}}\r\n\t\t\t\t\t\t<image class=\"arrow\" src=\"@/static/jiantouxia@2x.png\"></image>\r\n\t\t\t\t\t</picker>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"l\">品系:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<picker mode=\"selector\" :range=\"strainsList\" :value=\"strainsIndex\" @change=\"bindDateChange2\" range-key=\"title\">\r\n\t\t\t\t\t\t{{strainsIndex >= 0?strainsList[strainsIndex].title:\"\"}}\r\n\t\t\t\t\t\t<image class=\"arrow\" src=\"@/static/jiantouxia@2x.png\"></image>\r\n\t\t\t\t\t</picker>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"l\">基因:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<picker mode=\"selector\" :range=\"geneList\" :value=\"geneIndex\" @change=\"bindDateChange3\" range-key=\"title\">\r\n\t\t\t\t\t\t{{geneIndex >=0 ? geneList[geneIndex].title:\"\"}}\r\n\t\t\t\t\t\t<image class=\"arrow\" src=\"@/static/jiantouxia@2x.png\"></image>\r\n\t\t\t\t\t</picker>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\" v-if=\"type == 1 || type == 2\">\r\n\t\t\t\t<view class=\"l\">毛色:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<input type=\"text\" v-model=\"info.hair_color\" />\r\n\t\t\t\t\t<image class=\"arrow\" src=\"@/static/jiantouxia@2x.png\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"item\">\r\n\t\t\t\t<view class=\"l\">备注:</view>\r\n\t\t\t\t<view class=\"r\">\r\n\t\t\t\t\t<input type=\"text\" v-model=\"info.remark\" />\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<view class=\"add-fd\">\r\n\t\t\t<view class=\"btn\" @click=\"toCreate\">完成</view>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\ttype: 4,\r\n\t\t\t\tendDate: new Date().getFullYear()+\"-\"+((new Date().getMonth()+1)>10?new Date().getMonth()+1:\"0\"+(new Date().getMonth()+1))+\"-\"+((new Date().getDate())>10?new Date().getDate():\"0\"+(new Date().getDate())),\r\n\t\t\t\tsexIndex: -1,\r\n\t\t\t\tsexList: ['公','母'],\r\n\t\t\t\tstrainsList: [],\r\n\t\t\t\tstrainsIndex: -1,\r\n\t\t\t\tgeneList: [],\r\n\t\t\t\tgeneIndex: -1,\r\n\t\t\t\tfatherList: [],\r\n\t\t\t\tfatherIndex: -1,\r\n\t\t\t\tmotherList: [],\r\n\t\t\t\tmotherIndex: -1,\r\n\t\t\t\tinfo: {},\r\n\t\t\t\tid: \"\",\r\n\t\t\t\tcid: \"\",\r\n\t\t\t};\r\n\t\t},\r\n\t\tonLoad(o) {\r\n\t\t\tthis.cid = o.cid;\r\n\t\t\tthis.type = o.type;\r\n\t\t\tthis.id = o.id;\r\n\t\t\tuni.setNavigationBarTitle({\r\n\t\t\t\ttitle: o.type == 1?\"新增小鼠\":o.type == 2?\"编辑小鼠\":o.type == 3?\"添加新生小鼠\":\"编辑新生小鼠\"\r\n\t\t\t})\r\n\t\t\tif(this.cid){\r\n\t\t\t\tthis.get_api_squirrel_detail();\r\n\t\t\t}\r\n\t\t\tthis.get_api_basicinfo_gene();\r\n\t\t\tthis.get_api_basicinfo_strains();\r\n\t\t\tthis.get_api_squirrel_getparents();\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tasync toCreate() {\r\n\t\t\t\tif(this.type == 1 || this.type == 2){\r\n\t\t\t\t\tif(this.sexIndex == -1){\r\n\t\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\t\ttitle: \"请选择性别\",\r\n\t\t\t\t\t\t\ticon: \"none\"\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\treturn ;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(!this.info.count){\r\n\t\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\t\ttitle: \"数量不能为空\",\r\n\t\t\t\t\t\t\ticon: \"none\"\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\treturn ;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!this.info.birthday){\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: \"请选择生日\",\r\n\t\t\t\t\t\ticon: \"none\"\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn ;\r\n\t\t\t\t}\r\n\t\t\t\tif(this.fatherIndex == -1){\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: \"请选择父亲\",\r\n\t\t\t\t\t\ticon: \"none\"\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn ;\r\n\t\t\t\t}\r\n\t\t\t\tif(this.motherIndex == -1){\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: \"请选择母亲\",\r\n\t\t\t\t\t\ticon: \"none\"\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn ;\r\n\t\t\t\t}\r\n\t\t\t\tif(this.strainsIndex == -1){\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: \"请选择品系\",\r\n\t\t\t\t\t\ticon: \"none\"\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn ;\r\n\t\t\t\t}\r\n\t\t\t\tif(this.geneIndex == -1){\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: \"请选择基因\",\r\n\t\t\t\t\t\ticon: \"none\"\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn ;\r\n\t\t\t\t}\r\n\t\t\t\tif(this.type != 3){\r\n\t\t\t\t\tif(!this.info.hair_color){\r\n\t\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\t\ttitle: \"请输入毛色\",\r\n\t\t\t\t\t\t\ticon: \"none\"\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\treturn ;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tconst { errorcode, message } = this.type == 1? await this.$api.api_squirrel_add({\r\n\t\t\t\t\tsex: this.info.sex,\r\n\t\t\t\t\tbirthday: this.info.birthday,\r\n\t\t\t\t\tstrains_id: this.info.strains_id,\r\n\t\t\t\t\tfather: this.info.father,\r\n\t\t\t\t\tmother: this.info.mother,\r\n\t\t\t\t\tgene: this.info.gene,\r\n\t\t\t\t\thair_color: this.info.hair_color,\r\n\t\t\t\t\tcage: this.id,\r\n\t\t\t\t\tremark: this.info.remark?this.info.remark:'',\r\n\t\t\t\t\ttype: this.type,\r\n\t\t\t\t\tuid: uni.getStorageSync(\"userInfo\").uid,\r\n\t\t\t\t}): this.type == 2? await this.$api.api_squirrel_edit({\r\n\t\t\t\t\tid: this.info.id,\r\n\t\t\t\t\tsex: this.info.sex,\r\n\t\t\t\t\tbirthday: this.info.birthday,\r\n\t\t\t\t\tstrains_id: this.info.strains_id,\r\n\t\t\t\t\tfather: this.info.father,\r\n\t\t\t\t\tmother: this.info.mother,\r\n\t\t\t\t\tgene: this.info.gene,\r\n\t\t\t\t\thair_color: this.info.hair_color,\r\n\t\t\t\t\tcage: this.id,\r\n\t\t\t\t\tremark: this.info.remark?this.info.remark:'',\r\n\t\t\t\t\tuid: uni.getStorageSync(\"userInfo\").uid,\r\n\t\t\t\t}): await this.$api.api_squirrel_addNewSquirrel({\r\n\t\t\t\t\tcount: this.info.count,\r\n\t\t\t\t\tbirthday: this.info.birthday,\r\n\t\t\t\t\tstrains: this.info.strains_id,\r\n\t\t\t\t\tfather: this.info.father,\r\n\t\t\t\t\tmother: this.info.mother,\r\n\t\t\t\t\tgene: this.info.gene,\r\n\t\t\t\t\tcage: this.id,\r\n\t\t\t\t\tremark: this.info.remark?this.info.remark:'',\r\n\t\t\t\t\tuid: uni.getStorageSync(\"userInfo\").uid,\r\n\t\t\t\t})\r\n\t\t\t\tif( errorcode == 200 ){\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: this.type == 1?\"新增成功\":'修改成功'\r\n\t\t\t\t\t})\r\n\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\tuni.navigateBack({\r\n\t\t\t\t\t\t\tdelta: 1\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t},2000)\r\n\t\t\t\t}else{\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ticon: \"none\",\r\n\t\t\t\t\t\ttitle: message\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tasync get_api_squirrel_detail() {\r\n\t\t\t\tconst { errorcode, data } = await this.$api.api_squirrel_detail({id: this.cid});\r\n\t\t\t\tif(errorcode == 200){\r\n\t\t\t\t\tthis.info = data\r\n\t\t\t\t\tthis.info.strains_id = data.strains\r\n\t\t\t\t\tthis.sexIndex = data.sex\r\n\t\t\t\t\tthis.info.sex = data.sex == 0?\"公\":\"母\"\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tasync get_api_squirrel_getparents() {\r\n\t\t\t\tconst { errorcode, data } = await this.$api.api_squirrel_getparents({sex: \"\"});\r\n\t\t\t\tif(errorcode == 200){\r\n\t\t\t\t\tif(data && data.length> 0){\r\n\t\t\t\t\t\tthis.fatherList = data.filter(a=>a.sex == 1)\r\n\t\t\t\t\t\tthis.motherList = data.filter(a=>a.sex == 2)\r\n\t\t\t\t\t\tif(this.type == 0){\r\n\t\t\t\t\t\t\tlet fatherIndex = 0, motherIndex = 0, father = this.info.father, mother = this.info.mother;\r\n\t\t\t\t\t\t\tif(this.fatherList && this.fatherList.length >0){\r\n\t\t\t\t\t\t\t\tthis.fatherList.map((a,idx)=>{\r\n\t\t\t\t\t\t\t\t\tif(a.number == father){\r\n\t\t\t\t\t\t\t\t\t\tfatherIndex = idx\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(this.motherList && this.motherList.length >0){\r\n\t\t\t\t\t\t\t\tthis.motherList.map((a,idx)=>{\r\n\t\t\t\t\t\t\t\t\tif(a.number == mother){\r\n\t\t\t\t\t\t\t\t\t\tmotherIndex = idx\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.fatherIndex= fatherIndex;\r\n\t\t\t\t\t\t\tthis.motherIndex = motherIndex\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tasync get_api_basicinfo_strains() {\r\n\t\t\t\tconst { errorcode, data } = await this.$api.api_basicinfo_strains({});\r\n\t\t\t\tif(errorcode == 200){\r\n\t\t\t\t\tthis.strainsList = data;\r\n\t\t\t\t\tif(this.type == 0){\r\n\t\t\t\t\t\tlet strainsIndex = 0,strains = this.info.strains;\r\n\t\t\t\t\t\tif(this.strainsList && this.strainsList.length >0){\r\n\t\t\t\t\t\t\tthis.strainsList.map((a,idx)=>{\r\n\t\t\t\t\t\t\t\tif(a.title == strains){\r\n\t\t\t\t\t\t\t\t\tstrainsIndex = idx\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tthis.strainsIndex = strainsIndex\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tasync get_api_basicinfo_gene() {\r\n\t\t\t\tconst { errorcode, data } = await this.$api.api_basicinfo_gene({});\r\n\t\t\t\tif(errorcode == 200){\r\n\t\t\t\t\tthis.geneList = data;\r\n\t\t\t\t\tif(this.type == 0){\r\n\t\t\t\t\t\tlet geneIndex = 0,gene = this.info.gene;\r\n\t\t\t\t\t\tif(this.geneList && this.geneList.length >0){\r\n\t\t\t\t\t\t\tthis.geneList.map((a,idx)=>{\r\n\t\t\t\t\t\t\t\tif(a.title == gene){\r\n\t\t\t\t\t\t\t\t\tgeneIndex = idx\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tthis.geneIndex = geneIndex\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\tbindDateChange(e){\r\n\t\t\t\tthis.sexIndex = e.detail.value;\r\n\t\t\t\tthis.info.sex = Number(e.detail.value)+1\r\n\t\t\t},\r\n\t\t\tbindDateChange1(e){\r\n\t\t\t\tthis.info.birthday = e.detail.value\r\n\t\t\t\tthis.$forceUpdate();\r\n\t\t\t},\r\n\t\t\tbindDateChange2(e){\r\n\t\t\t\tthis.strainsIndex = e.detail.value\r\n\t\t\t\tthis.info.strains_id = this.strainsList[e.detail.value].title\r\n\t\t\t},\r\n\t\t\tbindDateChange3(e){\r\n\t\t\t\tthis.geneIndex = e.detail.value\r\n\t\t\t\tthis.info.gene = this.geneList[e.detail.value].title\r\n\t\t\t},\r\n\t\t\tbindDateChange4(e){\r\n\t\t\t\tthis.fatherIndex = e.detail.value\r\n\t\t\t\tthis.info.father = this.fatherList[e.detail.value].number\r\n\t\t\t},\r\n\t\t\tbindDateChange5(e){\r\n\t\t\t\tthis.motherIndex = e.detail.value\r\n\t\t\t\tthis.info.mother = this.motherList[e.detail.value].number\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.add{\r\n\tpadding-bottom: calc(env(safe-area-inset-bottom)+140rpx);\r\n\toverflow: hidden;\r\n\t&-bd{\r\n\t\tpadding: 0 35rpx;\r\n\t\toverflow: hidden;\r\n\t\t.item{\r\n\t\t\twidth: 100%;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items: center;\r\n\t\t\tjustify-content: space-between;\r\n\t\t\tpadding: 40rpx 0;\r\n\t\t\tborder-bottom: 1px solid #c0c2c2;\r\n\t\t\t.l{\r\n\t\t\t\twidth: 100rpx;\r\n\t\t\t\tfont-size: 28rpx;\r\n\t\t\t\tcolor: #000;\r\n\t\t\t}\r\n\t\t\t.r{\r\n\t\t\t\tflex: 1;\r\n\t\t\t\tdisplay: flex;\r\n\t\t\t\talign-items: center;\r\n\t\t\t\tinput,picker{\r\n\t\t\t\t\tflex: 1;\r\n\t\t\t\t\tfont-size: 28rpx;\r\n\t\t\t\t\tcolor: #000;\r\n\t\t\t\t\theight: 50rpx;\r\n\t\t\t\t\tline-height: 50rpx;\r\n\t\t\t\t\ttext-align: right;\r\n\t\t\t\t}\r\n\t\t\t\t.arrow{\r\n\t\t\t\t\twidth: 32rpx;\r\n\t\t\t\t\theight: 19rpx;\r\n\t\t\t\t\tmargin-left: 20rpx;\r\n\t\t\t\t\tvertical-align: middle;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t.date{\r\n\t\t\t\t\twidth: 45rpx;\r\n\t\t\t\t\theight: 45rpx;\r\n\t\t\t\t\tmargin-left: 20rpx;\r\n\t\t\t\t\tvertical-align: middle;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t&-fd{\r\n\t\twidth: 100%;\r\n\t\tpadding: 20rpx 35rpx;\r\n\t\tbox-sizing: border-box;\r\n\t\tbackground-color: #f3f5f6;\r\n\t\tposition: fixed;\r\n\t\tleft: 0;\r\n\t\tbottom: 0;\r\n\t\tz-index: 22;\r\n\t\tpadding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */\r\n\t\tpadding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */\r\n\t\t.btn{\r\n\t\t\twidth: 100%;\r\n\t\t\tline-height: 90rpx;\r\n\t\t\ttext-align: center;\r\n\t\t\tbackground-color: #009944;\r\n\t\t\tfont-size: 32rpx;\r\n\t\t\tcolor: #ffffff;\r\n\t\t\tborder-radius: 10rpx;\r\n\t\t}\r\n\t}\r\n}\r\n</style>\r\n","import mod from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./add.vue?vue&type=style&index=0&id=d86df08a&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./add.vue?vue&type=style&index=0&id=d86df08a&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1716440910273\n var cssReload = require(\"C:/Users/Administrator/Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""} |