23c1b61110c25a439815df161ff4d190cb785b45.svn-base 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. <template>
  2. <div class="app-container">
  3. <el-tabs v-model="activeName" @tab-click="handleTabClick">
  4. <el-tab-pane label="体况、粪便评分标准" name="first">
  5. <div class="operation">
  6. <el-button class="import" style="float: right;" @click="handleImport">导入</el-button>
  7. <el-button class="export" style="float: right;margin-right: 10px;" @click="handleExport">导出</el-button>
  8. </div>
  9. <div class="table1">
  10. <el-table
  11. :key="table1.tableKey"
  12. v-loading="table1.listLoading"
  13. element-loading-text="给我一点时间"
  14. :data="table1.list"
  15. border
  16. fit
  17. highlight-current-row
  18. style="width: 100%;"
  19. :row-style="rowStyle"
  20. :cell-style="cellStyle"
  21. class="elTable table-fixed"
  22. >
  23. <el-table-column label="序号" align="center" type="index" width="50px">
  24. <template slot-scope="scope">
  25. <span>{{ scope.$index + (table1.pageNum-1) * table1.pageSize + 1 }}</span>
  26. </template>
  27. </el-table-column>
  28. <el-table-column label="配方名称" min-width="130px" align="center">
  29. <template slot-scope="scope">
  30. <span>{{ scope.row.ftname }}</span>
  31. </template>
  32. </el-table-column>
  33. <el-table-column label="体况评分标准" align="center" min-width="300px">
  34. <el-table-column label="体况评分标准(分)" min-width="80px" align="center">
  35. <template slot-scope="scope">
  36. <span>{{ scope.row.bodystandard }}</span>
  37. </template>
  38. </el-table-column>
  39. <el-table-column label="数据来源" min-width="80px" align="center">
  40. <template slot-scope="scope">
  41. <span>{{ scope.row.bodysource }}</span>
  42. </template>
  43. </el-table-column>
  44. </el-table-column>
  45. <el-table-column label="粪便评分标准" align="center" min-width="300px">
  46. <el-table-column label="粪便评分标准(分)" min-width="80px" align="center">
  47. <template slot-scope="scope">
  48. <span>{{ scope.row.dungstandard }}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="数据来源" min-width="80px" align="center">
  52. <template slot-scope="scope">
  53. <span>{{ scope.row.dungsource }}</span>
  54. </template>
  55. </el-table-column>
  56. </el-table-column>
  57. <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
  58. <template slot-scope="{row}">
  59. <el-button class="miniSuccess" @click="handleUpdate(row)">编辑</el-button>
  60. </template>
  61. </el-table-column>
  62. </el-table>
  63. </div>
  64. </el-tab-pane>
  65. <el-tab-pane label="宾州筛、粪便筛标准范围" name="second">
  66. <div class="operation">
  67. <el-button class="import" style="float: right;" @click="handleImport">导入</el-button>
  68. <el-button class="export" style="float: right;margin-right: 10px;" @click="handleExport">导出</el-button>
  69. </div>
  70. <div class="table2">
  71. <el-table
  72. :key="table2.tableKey"
  73. v-loading="table2.listLoading"
  74. element-loading-text="给我一点时间"
  75. :data="table2.list"
  76. border
  77. fit
  78. highlight-current-row
  79. style="width: 100%;"
  80. :row-style="rowStyle"
  81. :cell-style="cellStyle"
  82. class="elTable table-fixed"
  83. >
  84. <el-table-column label="序号" align="center" type="index" width="50px">
  85. <template slot-scope="scope">
  86. <span>{{ scope.$index + (table2.pageNum-1) * table2.pageSize + 1 }}</span>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="牲畜类别" align="center" min-width="200px">
  90. <el-table-column label="牲畜父类" min-width="80px" align="center">
  91. <template slot-scope="scope">
  92. <span>{{ scope.row.parentname }}</span>
  93. </template>
  94. </el-table-column>
  95. <el-table-column label="牲畜子类" min-width="80px" align="center">
  96. <template slot-scope="scope">
  97. <span>{{ scope.row.cowname }}</span>
  98. </template>
  99. </el-table-column>
  100. </el-table-column>
  101. <el-table-column label="宾州筛" align="center" min-width="200px">
  102. <el-table-column label="宾州筛一层(%)" min-width="80px" align="center">
  103. <template slot-scope="scope">
  104. <span>{{ scope.row.bzonemin }} - {{ scope.row.bzonemax }}</span>
  105. </template>
  106. </el-table-column>
  107. <el-table-column label="宾州筛二层(%)" min-width="80px" align="center">
  108. <template slot-scope="scope">
  109. <span>{{ scope.row.bztwomin }} - {{ scope.row.bztwomax }}</span>
  110. </template>
  111. </el-table-column>
  112. <el-table-column label="宾州筛三层(%)" min-width="80px" align="center">
  113. <template slot-scope="scope">
  114. <span>{{ scope.row.bzthreemin }} - {{ scope.row.bzthreemax }}</span>
  115. </template>
  116. </el-table-column>
  117. <el-table-column label="宾州筛四层(%)" min-width="80px" align="center">
  118. <template slot-scope="scope">
  119. <span>{{ scope.row.bzfourmin }} - {{ scope.row.bzfourmax }}</span>
  120. </template>
  121. </el-table-column>
  122. <el-table-column label="数据来源" min-width="80px" align="center">
  123. <template slot-scope="scope">
  124. <span>{{ scope.row.bzsource }}</span>
  125. </template>
  126. </el-table-column>
  127. </el-table-column>
  128. <el-table-column label="粪便筛" align="center" min-width="300px">
  129. <el-table-column label="粪便筛一层(%)" min-width="80px" align="center">
  130. <template slot-scope="scope">
  131. <span>{{ scope.row.fbonemin }} - {{ scope.row.fbonemax }}</span>
  132. </template>
  133. </el-table-column>
  134. <el-table-column label="粪便筛二层(%)" min-width="80px" align="center">
  135. <template slot-scope="scope">
  136. <span>{{ scope.row.fbtwomin }} - {{ scope.row.fbtwomax }}</span>
  137. </template>
  138. </el-table-column>
  139. <el-table-column label="粪便筛三层(%)" min-width="80px" align="center">
  140. <template slot-scope="scope">
  141. <span>{{ scope.row.fbthreemin }} - {{ scope.row.fbthreemax }}</span>
  142. </template>
  143. </el-table-column>
  144. <el-table-column label="数据来源" min-width="80px" align="center">
  145. <template slot-scope="scope">
  146. <span>{{ scope.row.fbsource }}</span>
  147. </template>
  148. </el-table-column>
  149. </el-table-column>
  150. <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
  151. <template slot-scope="{row}">
  152. <el-button class="miniSuccess" @click="handleUpdate(row)">编辑</el-button>
  153. </template>
  154. </el-table-column>
  155. </el-table>
  156. </div>
  157. </el-tab-pane>
  158. </el-tabs>
  159. <!-- 体况、粪便评分标准 -->
  160. <el-dialog :title="textMap[table1.dialogStatus]" :visible.sync="table1.dialogFormVisible" :close-on-click-modal="false" width="80%">
  161. <div class="app-add">
  162. <el-form ref="temp" :rules="table1.rules" :model="table1.temp" label-position="right" label-width="160px" style="width: 90%;margin:0 auto 50px">
  163. <el-row>
  164. <el-col :span="12">
  165. <h3 style="width: 160px;float: left;">配方</h3>
  166. </el-col>
  167. </el-row>
  168. <el-row>
  169. <el-col :span="12">
  170. <el-form-item label="配方名称:" prop="ftname">
  171. <span>{{ table1.temp.ftname }}</span>
  172. </el-form-item>
  173. </el-col>
  174. </el-row>
  175. <el-row>
  176. <el-col :span="12">
  177. <h3 style="width: 160px;float: left;">体况评分标准</h3>
  178. </el-col>
  179. </el-row>
  180. <el-row>
  181. <el-col :span="12">
  182. <el-form-item label="体况评分标准(分):" prop="bodystandard">
  183. <el-select v-model="table1.temp.bodystandard" filterable placeholder="评分标准" class="filter-item" style="width: 100%;">
  184. <el-option v-for="item in physicalList" :key="item.value" :label="item.label" :value="item.label" />
  185. </el-select>
  186. </el-form-item>
  187. </el-col>
  188. <el-col :span="12">
  189. <el-form-item label="数据来源:" prop="bodysource">
  190. <el-input v-model="table1.temp.bodysource" type="textarea" placeholder="1-255字符":autosize="{ minRows: 1, maxRows: 4}" style="width:100%;" maxlength="255" />
  191. </el-form-item>
  192. </el-col>
  193. </el-row>
  194. <el-row>
  195. <el-col :span="12">
  196. <h3 style="width: 160px;float: left;">粪便评分标准</h3>
  197. </el-col>
  198. </el-row>
  199. <el-row>
  200. <el-col :span="12">
  201. <el-form-item label="粪便评分标准(分):" prop="dungstandard">
  202. <el-select v-model="table1.temp.dungstandard" filterable placeholder="评分标准" class="filter-item" style="width: 100%;">
  203. <el-option v-for="item in physicalList" :key="item.value" :label="item.label" :value="item.value" />
  204. </el-select>
  205. </el-form-item>
  206. </el-col>
  207. <el-col :span="12">
  208. <el-form-item label="数据来源:" prop="dungsource">
  209. <el-input v-model="table1.temp.dungsource" type="textarea" placeholder="1-255字符" :autosize="{ minRows: 1, maxRows: 4}" style="width:100%;" maxlength="255" />
  210. </el-form-item>
  211. </el-col>
  212. </el-row>
  213. </el-form>
  214. <div slot="footer" class="dialog-footer">
  215. <el-button class="cancel" @click="table1.dialogFormVisible = false;getList() ">关闭</el-button>
  216. <el-button class="success" :disabled="isokDisable" @click="updateData()">确认</el-button>
  217. </div>
  218. </div>
  219. </el-dialog>
  220. <!-- 宾州筛、粪便筛标准范围 -->
  221. <el-dialog :title="textMap[table2.dialogStatus]" :visible.sync="table2.dialogFormVisible" :close-on-click-modal="false" width="80%">
  222. <div class="app-add">
  223. <el-form ref="temp" :rules="table2.rules" :model="table2.temp" label-position="right" label-width="160px" style="width: 90%;margin:0 auto 50px">
  224. <el-row>
  225. <el-col :span="10">
  226. <h3 style="width: 160px;float: left;">牲畜类别</h3>
  227. </el-col>
  228. </el-row>
  229. <el-row>
  230. <el-col :span="10">
  231. <el-form-item label="牲畜父类:" prop="parentname">
  232. <span>{{ table2.temp.parentname }}</span>
  233. </el-form-item>
  234. </el-col>
  235. <el-col :span="10">
  236. <el-form-item label="牲畜子类:" prop="cowname">
  237. <span>{{ table2.temp.cowname }}</span>
  238. </el-form-item>
  239. </el-col>
  240. </el-row>
  241. <el-row>
  242. <el-col :span="10">
  243. <h3 style="width: 160px;float: left;">宾州筛</h3>
  244. </el-col>
  245. </el-row>
  246. <el-row>
  247. <el-col :span="10">
  248. <el-form-item label="宾州筛第一层(%):">
  249. <el-input-number v-model="table2.temp.bzonemin" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最小值" />
  250. <span style="width: 1%;">-</span>
  251. <el-input-number v-model="table2.temp.bzonemax" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最大值" />
  252. </el-form-item>
  253. </el-col>
  254. <el-col :span="10">
  255. <el-form-item label="宾州筛第二层(%):">
  256. <el-input-number v-model="table2.temp.bztwomin" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最小值" />
  257. <span style="width: 1%;">-</span>
  258. <el-input-number v-model="table2.temp.bztwomax" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最大值" />
  259. </el-form-item>
  260. </el-col>
  261. </el-row>
  262. <el-row>
  263. <el-col :span="10">
  264. <el-form-item label="宾州筛第三层(%):">
  265. <el-input-number v-model="table2.temp.bzthreemin" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最小值" />
  266. <span style="width: 1%;">-</span>
  267. <el-input-number v-model="table2.temp.bzthreemax" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最大值" />
  268. </el-form-item>
  269. </el-col>
  270. <el-col :span="10">
  271. <el-form-item label="宾州筛第四层(%):">
  272. <el-input-number v-model="table2.temp.bzfourmin" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最小值" />
  273. <span style="width: 1%;">-</span>
  274. <el-input-number v-model="table2.temp.bzfourmax" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最大值" />
  275. </el-form-item>
  276. </el-col>
  277. </el-row>
  278. <el-row>
  279. <el-col :span="10">
  280. <el-form-item label="数据来源:" prop="bzsource">
  281. <el-input v-model="table2.temp.bzsource" type="textarea" placeholder="1-255字符" :autosize="{ minRows: 1, maxRows: 4}" style="width:100%;" maxlength="255" />
  282. </el-form-item>
  283. </el-col>
  284. </el-row>
  285. <el-row>
  286. <el-col :span="10">
  287. <h3 style="width: 160px;float: left;">粪便筛</h3>
  288. </el-col>
  289. </el-row>
  290. <el-row>
  291. <el-col :span="10">
  292. <el-form-item label="粪便筛第一层(%):">
  293. <el-input-number v-model="table2.temp.fbonemin" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最小值" />
  294. <span style="width: 1%;">-</span>
  295. <el-input-number v-model="table2.temp.fbonemax" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最大值" />
  296. </el-form-item>
  297. </el-col>
  298. <el-col :span="10">
  299. <el-form-item label="粪便筛第二层(%):">
  300. <el-input-number v-model="table2.temp.fbtwomin" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最小值" />
  301. <span style="width: 1%;">-</span>
  302. <el-input-number v-model="table2.temp.fbtwomax" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最大值" />
  303. </el-form-item>
  304. </el-col>
  305. </el-row>
  306. <el-row>
  307. <el-col :span="10">
  308. <el-form-item label="粪便筛第三层(%):">
  309. <el-input-number v-model="table2.temp.fbthreemin" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最小值" />
  310. <span style="width: 1%;">-</span>
  311. <el-input-number v-model="table2.temp.fbthreemax" :min="0" :max="100" :controls="false" style="width:44%;" placeholder="最大值" />
  312. </el-form-item>
  313. </el-col>
  314. <el-col :span="10">
  315. <el-form-item label="数据来源:" prop="fbsource">
  316. <el-input v-model="table2.temp.fbsource" type="textarea" placeholder="1-255字符" :autosize="{ minRows: 1, maxRows: 4}" style="width:100%;" maxlength="255" />
  317. </el-form-item>
  318. </el-col>
  319. </el-row>
  320. </el-form>
  321. <div slot="footer" class="dialog-footer">
  322. <el-button class="cancel" @click="table2.dialogFormVisible = false; getList2()">关闭</el-button>
  323. <el-button class="success" :disabled="isokDisable" @click="updateData()">确认</el-button>
  324. </div>
  325. </div>
  326. </el-dialog>
  327. </div>
  328. </template>
  329. <script>
  330. import { GetDataByName, PostDataByName, failproccess, GetDataByNames } from '@/api/common'
  331. import Cookies from 'js-cookie'
  332. export default {
  333. name: 'StandardParameters',
  334. data() {
  335. return {
  336. activeName: 'first',
  337. requestParams: [
  338. { name: 'getDictByName', offset: 0, pagecount: 0, params: ['评分标准'] }
  339. ],
  340. physicalList: [], // 标准体况评分
  341. faecesList: [{ id: 0, name: '1' }, { id: 1, name: '2' }, { id: 2, name: '3' }, { id: 3, name: '4' }, { id: 4, name: '5' }], // 标准粪便评分
  342. table1: {
  343. getdataListParm: {
  344. name: 'getOptscoreList',
  345. page: 1,
  346. offset: 1,
  347. pagecount: 10,
  348. returntype: 'Map',
  349. parammaps: {
  350. pastureid: Cookies.get('pastureid'),
  351. enable: ''
  352. }
  353. },
  354. tableKey: 0,
  355. list: [],
  356. total: 0,
  357. listLoading: true,
  358. // 编辑
  359. dialogFormVisible: false,
  360. dialogStatus: '',
  361. temp: {},
  362. rules: {
  363. bodystandard: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
  364. dungstandard: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
  365. }
  366. },
  367. table2: {
  368. getdataListParm: {
  369. name: 'getOptrangeList',
  370. page: 1,
  371. offset: 1,
  372. pagecount: 10,
  373. returntype: 'Map',
  374. parammaps: {
  375. pastureid: Cookies.get('pastureid')
  376. }
  377. },
  378. tableKey: 0,
  379. list: [],
  380. total: 0,
  381. listLoading: true,
  382. // 编辑
  383. dialogFormVisible: false,
  384. dialogStatus: '',
  385. temp: {},
  386. rules: {}
  387. },
  388. textMap: {
  389. update: '编辑'
  390. },
  391. requestParam: {},
  392. isokDisable: false,
  393. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  394. cellStyle: { padding: 0 + 'px' }
  395. }
  396. },
  397. created() {
  398. this.getList()
  399. this.getDownList()
  400. },
  401. methods: {
  402. getDownList() {
  403. GetDataByNames(this.requestParams).then(response => {
  404. this.physicalList = response.data.getDictByName.list
  405. })
  406. },
  407. handleTabClick(tab, event) {
  408. console.log(tab, event)
  409. if (tab.name === 'first') {
  410. this.getList()
  411. } else if (tab.name === 'second') {
  412. this.getList2()
  413. }
  414. },
  415. getList() {
  416. this.table1.listLoading = true
  417. GetDataByName(this.table1.getdataListParm).then(response => {
  418. console.log('table1数据', response.data.list)
  419. if (response.data.list !== null) {
  420. this.table1.list = response.data.list
  421. this.table1.pageNum = response.data.pageNum
  422. this.table1.pageSize = response.data.pageSize
  423. this.table1.total = response.data.total
  424. } else {
  425. this.table1.list = []
  426. }
  427. setTimeout(() => {
  428. this.table1.listLoading = false
  429. }, 100)
  430. })
  431. },
  432. getList2() {
  433. this.table2.listLoading = true
  434. GetDataByName(this.table2.getdataListParm).then(response => {
  435. console.log('table1数据', response.data.list)
  436. if (response.data.list !== null) {
  437. this.table2.list = response.data.list
  438. this.table2.pageNum = response.data.pageNum
  439. this.table2.pageSize = response.data.pageSize
  440. if (response.data.total) {
  441. this.table2.total = response.data.total
  442. }
  443. } else {
  444. this.table2.list = []
  445. }
  446. setTimeout(() => {
  447. this.table2.listLoading = false
  448. }, 100)
  449. })
  450. },
  451. // 编辑
  452. handleUpdate(row) {
  453. if (this.activeName === 'first') {
  454. console.log('点击了体况、粪便评分标准编辑')
  455. this.table1.dialogStatus = 'update'
  456. this.table1.dialogFormVisible = true
  457. this.table1.temp = Object.assign({}, row)
  458. } else if (this.activeName === 'second') {
  459. console.log('点击了宾州筛、粪便筛标准范围编辑')
  460. this.table2.dialogStatus = 'update'
  461. this.table2.dialogFormVisible = true
  462. this.table2.temp = Object.assign({}, row)
  463. }
  464. },
  465. updateData() {
  466. if (this.activeName === 'first') {
  467. console.log('点击了体况、粪便评分标准编辑保存')
  468. this.isokDisable = true
  469. setTimeout(() => {
  470. this.isokDisable = false
  471. }, 1000)
  472. this.requestParam.name = 'updateOptscore'
  473. this.requestParam.parammaps = this.table1.temp
  474. PostDataByName(this.requestParam).then(response => {
  475. console.log('新增保存发送参数', this.requestParam)
  476. if (response.msg !== 'fail') {
  477. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  478. this.table1.dialogFormVisible = false
  479. this.getList()
  480. } else {
  481. failproccess(response, this.$notify)
  482. }
  483. })
  484. } else if (this.activeName === 'second') {
  485. console.log('点击了宾州筛、粪便筛标准范围编辑保存')
  486. this.isokDisable = true
  487. setTimeout(() => {
  488. this.isokDisable = false
  489. }, 1000)
  490. // 若最小值大于最大值
  491. if (parseFloat(this.table2.temp.bzonemin) >= parseFloat(this.table2.temp.bzonemax)) {
  492. this.$message({ type: 'error', message: '宾州筛第一层最大值不可小于等于最小值', duration: 2000 })
  493. return false
  494. }
  495. if (parseFloat(this.table2.temp.bztwomin) >= parseFloat(this.table2.temp.bztwomax)) {
  496. this.$message({ type: 'error', message: '宾州筛第二层最大值不可小于等于最小值', duration: 2000 })
  497. return false
  498. }
  499. if (parseFloat(this.table2.temp.bzthreemin) >= parseFloat(this.table2.temp.bzthreemax)) {
  500. this.$message({ type: 'error', message: '宾州筛第三层最大值不可小于等于最小值', duration: 2000 })
  501. return false
  502. }
  503. if (parseFloat(this.table2.temp.bzfourmin) >= parseFloat(this.table2.temp.bzfourmax)) {
  504. this.$message({ type: 'error', message: '宾州筛第四层最大值不可小于等于最小值', duration: 2000 })
  505. return false
  506. }
  507. if (parseFloat(this.table2.temp.fbonemin) >= parseFloat(this.table2.temp.fbonemax)) {
  508. this.$message({ type: 'error', message: '粪便筛第一层最大值不可小于等于最小值', duration: 2000 })
  509. return false
  510. }
  511. if (parseFloat(this.table2.temp.fbtwomin) >= parseFloat(this.table2.temp.fbtwomax)) {
  512. this.$message({ type: 'error', message: '粪便筛第二层最大值不可小于等于最小值', duration: 2000 })
  513. return false
  514. }
  515. if (parseFloat(this.table2.temp.fbthreemin) >= parseFloat(this.table2.temp.fbthreemax)) {
  516. this.$message({ type: 'error', message: '粪便筛第三层最大值不可小于等于最小值', duration: 2000 })
  517. return false
  518. }
  519. // 若最大值最小值为空
  520. if (this.table2.temp.bzonemin == '' || this.table2.temp.bzonemin == undefined) { this.table2.temp.bzonemin = '0' }
  521. if (this.table2.temp.bzonemax == '' || this.table2.temp.bzonemax == undefined) { this.table2.temp.bzonemax = '0' }
  522. if (this.table2.temp.bztwomin == '' || this.table2.temp.bztwomin == undefined) { this.table2.temp.bztwomin = '0' }
  523. if (this.table2.temp.bztwomax == '' || this.table2.temp.bztwomax == undefined) { this.table2.temp.bztwomax = '0' }
  524. if (this.table2.temp.bzthreemin == '' || this.table2.temp.bzthreemin == undefined) { this.table2.temp.bzthreemin = '0' }
  525. if (this.table2.temp.bzthreemax == '' || this.table2.temp.bzthreemax == undefined) { this.table2.temp.bzthreemax = '0' }
  526. if (this.table2.temp.bzfourmin == '' || this.table2.temp.bzfourmin == undefined) { this.table2.temp.bzfourmin = '0' }
  527. if (this.table2.temp.bzfourmax == '' || this.table2.temp.bzfourmax == undefined) { this.table2.temp.bzfourmax = '0' }
  528. if (this.table2.temp.fbonemin == '' || this.table2.temp.fbonemin == undefined) { this.table2.temp.fbonemin = '0' }
  529. if (this.table2.temp.fbonemax == '' || this.table2.temp.fbonemax == undefined) { this.table2.temp.fbonemax = '0' }
  530. if (this.table2.temp.fbtwomin == '' || this.table2.temp.fbtwomin == undefined) { this.table2.temp.fbtwomin = '0' }
  531. if (this.table2.temp.fbtwomax == '' || this.table2.temp.fbtwomax == undefined) { this.table2.temp.fbtwomax = '0' }
  532. if (this.table2.temp.fbthreemin == '' || this.table2.temp.fbthreemin == undefined) { this.table2.temp.fbthreemin = '0' }
  533. if (this.table2.temp.fbthreemax == '' || this.table2.temp.fbthreemax == undefined) { this.table2.temp.fbthreemax = '0' }
  534. this.requestParam.name = 'insertOptrange'
  535. this.requestParam.parammaps = this.table2.temp
  536. PostDataByName(this.requestParam).then(response => {
  537. console.log('新增保存发送参数', this.requestParam)
  538. if (response.msg !== 'fail') {
  539. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  540. this.table2.dialogFormVisible = false
  541. this.getList2()
  542. this.activeName = 'second'
  543. } else {
  544. failproccess(response, this.$notify)
  545. if (this.table2.temp.bzonemin == '0') { this.table2.temp.bzonemin = '' }
  546. if (this.table2.temp.bzonemax == '0') { this.table2.temp.bzonemax = '' }
  547. if (this.table2.temp.bztwomin == '0') { this.table2.temp.bztwomin = '' }
  548. if (this.table2.temp.bztwomax == '0') { this.table2.temp.bztwomax = '' }
  549. if (this.table2.temp.bzthreemin == '0') { this.table2.temp.bzthreemin = '' }
  550. if (this.table2.temp.bzthreemax == '0') { this.table2.temp.bzthreemax = '' }
  551. if (this.table2.temp.bzfourmin == '0') { this.table2.temp.bzfourmin = '' }
  552. if (this.table2.temp.bzfourmax == '0') { this.table2.temp.bzfourmax = '' }
  553. if (this.table2.temp.fbonemin == '0') { this.table2.temp.fbonemin = '' }
  554. if (this.table2.temp.fbonemax == '0') { this.table2.temp.fbonemax = '' }
  555. if (this.table2.temp.fbtwomin == '0') { this.table2.temp.fbtwomin = '' }
  556. if (this.table2.temp.fbtwomax == '0') { this.table2.temp.fbtwomax = '' }
  557. if (this.table2.temp.fbthreemin == '0') { this.table2.temp.fbthreemin = '' }
  558. if (this.table2.temp.fbthreemax == '0') { this.table2.temp.fbthreemax = '' }
  559. }
  560. })
  561. }
  562. },
  563. // 导出
  564. handleExport() {
  565. if (this.activeName === 'first') {
  566. console.log('体况、粪便评分标准/导出')
  567. } else if (this.activeName === 'second') {
  568. console.log('宾州筛、粪便筛标准范围/导出')
  569. }
  570. },
  571. // 导入
  572. handleImport() {
  573. if (this.activeName === 'first') {
  574. console.log('体况、粪便评分标准/导入')
  575. } else if (this.activeName === 'second') {
  576. console.log('宾州筛、粪便筛标准范围/导入')
  577. }
  578. }
  579. }
  580. }
  581. </script>
  582. <style lang="scss" scoped>
  583. .operation{
  584. position: relative;
  585. height: 50px;
  586. .export{position: absolute;right: 110px;bottom: 10px;}
  587. .import{position: absolute;right: 0;bottom: 10px;}
  588. }
  589. </style>