index.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208
  1. <template>
  2. <div class="container">
  3. <el-row :gutter="20">
  4. <el-col :span="12">
  5. <div class="accuracy">
  6. <div class="accuracy_t">
  7. <div class="accuracy_t_l">
  8. <h4><span class="title"></span>准确性分析</h4>
  9. <el-select v-model="accuracy.value1" style="width:150px;margin-right: 5px;" class="filter-item" @change="changecattle('1')">
  10. <el-option v-for="item in accuracy.cattleTpyeList" :key="item.value" :label="item.label"
  11. :value="item.value"> </el-option>
  12. </el-select>
  13. <el-select v-model="accuracy.value2" style="width:150px;margin-right: 5px;" class="filter-item" @change="changeformula('1')">
  14. <el-option v-for="item in accuracy.formulaList" :key="item.value" :label="item.label"
  15. :value="item.value"> </el-option>
  16. </el-select>
  17. <el-date-picker v-model="accuracy.inputDatetime" :clearable="false" class="inputDatetime filter-item"
  18. type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
  19. style="width: 250px;" :picker-options="pickerOptions" @change="changeDate('1')" />
  20. </div>
  21. <div class="accuracy_t_r">
  22. <div class="exportTable button" @click="handleChart('accuracy')">切换图表</div>
  23. <div class="exportTable button" @click="handleExport('accuracy')">导出</div>
  24. </div>
  25. </div>
  26. <div class="accuracy_b">
  27. <el-tabs v-model="accuracy.activeName" @tab-click="handleTabClick">
  28. <el-tab-pane label="混料准确率" name="first" />
  29. <el-tab-pane label="混料正确率" name="second" />
  30. <el-tab-pane label="撒料准确率" name="third" />
  31. <el-tab-pane label="撒料正确率" name="fourth" />
  32. </el-tabs>
  33. <el-row :gutter="20">
  34. <el-col :span="6">
  35. <div class="maxdiv">
  36. <div class="title-t">最高</div>
  37. <div class="title-c">{{accuracy.chart1.lineData1.max_value}}%</div>
  38. <div class="title-b">NO.1 {{accuracy.chart1.lineData1.top_one_name}}</div>
  39. </div>
  40. </el-col>
  41. <el-col :span="6">
  42. <div class="mediandiv">
  43. <div class="title-t">中位值</div>
  44. <div class="title-c">{{accuracy.chart1.lineData1.middle_value}}%</div>
  45. <a class="title-b" @click="handleSeeRanking">查看排名</a>
  46. </div>
  47. </el-col>
  48. <el-col :span="6">
  49. <div class="mindiv">
  50. <div class="title-t">最低</div>
  51. <div class="title-c">{{accuracy.chart1.lineData1.min_value}}%</div>
  52. </div>
  53. </el-col>
  54. </el-row>
  55. <div v-if="accuracy.chart1.isChart">
  56. <div id="chartLine1" v-loading="accuracy.chart1.listLoading" style="height:310px;" />
  57. <a class="more" @click="handleMore">更多&gt;</a>
  58. </div>
  59. <div v-else>
  60. <el-table style="width: 100%" :max-height="320" :row-style="rowStyle" :cell-style="cellStyle" border
  61. :data="accuracy.chart1.tableDataList1">
  62. <template v-for="(item,key) in accuracy.chart1.tableTitleList1">
  63. <template>
  64. <el-table-column min-width="30" :key="item.value" :label="item.value" align="center">
  65. <template slot-scope="scope">
  66. <span v-if="key == 0">{{ scope.row[item.name] }}</span>
  67. <span v-else>{{ scope.row[item.name] }}%</span>
  68. </template>
  69. </el-table-column>
  70. </template>
  71. </template>
  72. </el-table>
  73. </div>
  74. </div>
  75. </div>
  76. </el-col>
  77. <el-col :span="12">
  78. <div class="time">
  79. <div class="time_t">
  80. <div class="time_t_l">
  81. <h4><span class="title"></span>执行时间</h4>
  82. <el-select v-model="time.value1" style="width:150px;margin-right: 5px;" class="filter-item" @change="changecattle('2')">
  83. <el-option v-for="item in time.cattleTpyeList" :key="item.value" :label="item.label"
  84. :value="item.value"> </el-option>
  85. </el-select>
  86. <!-- <el-select v-model="time.value2" style="width:150px;margin-right: 5px;" class="filter-item" @change="changeformula('2')">
  87. <el-option v-for="item in time.formulaList" :key="item.value" :label="item.label" :value="item.value">
  88. </el-option>
  89. </el-select> -->
  90. <el-date-picker v-model="time.inputDatetime" :clearable="false" class="inputDatetime filter-item"
  91. type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
  92. style="width: 250px;" :picker-options="pickerOptions" @change="changeDate('2')"/>
  93. </div>
  94. <div class="time_t_r">
  95. <div class="exportTable button" @click="handleChart('time')">切换图表</div>
  96. <div class="exportTable button" @click="handleExport('time')">导出</div>
  97. </div>
  98. </div>
  99. <div v-if="time.chart1.isChart">
  100. <div id="chartLine2" v-loading="time.chart1.listLoading" style="height:420px;" />
  101. </div>
  102. <div v-else style="margin: 10px 10px;">
  103. <el-table :data="time.chart1.tableDataList1" border style="width: 100%;" :max-height="410"
  104. :row-style="rowStyle" :cell-style="cellStyle" class="elTable">
  105. <el-table-column label="类型" min-width="80px" align="center">
  106. <el-table-column label="牧场" min-width="80px" align="center" prop="title" />
  107. </el-table-column>
  108. <el-table-column label="加料时间(分钟)" min-width="80px" align="center">
  109. <el-table-column label="最大值" min-width="80px" align="center" prop="add_feed_time_max_value" />
  110. <el-table-column label="上四分位数" min-width="80px" align="center" prop="add_feed_time_up_middle_value" />
  111. <el-table-column label="中位数" min-width="80px" align="center" prop="add_feed_time_middle_value" />
  112. <el-table-column label="下四分位数" min-width="80px" align="center" prop="add_feed_time_down_middle_value" />
  113. <el-table-column label="最小值" min-width="80px" align="center" prop="add_feed_time_min_value" />
  114. </el-table-column>
  115. <!-- <el-table-column label="搅拌延时(分钟)" min-width="80px" align="center">
  116. <el-table-column label="最大值" min-width="80px" align="center" prop="stir_time_max_value" />
  117. <el-table-column label="上四分位数" min-width="80px" align="center" prop="stir_time_up_middle_value" />
  118. <el-table-column label="中位数" min-width="80px" align="center" prop="stir_time_middle_value" />
  119. <el-table-column label="下四分位数" min-width="80px" align="center" prop="stir_time_down_middle_value" />
  120. <el-table-column label="最小值" min-width="80px" align="center" prop="stir_time_min_value" />
  121. </el-table-column> -->
  122. <el-table-column label="撒料时间(分钟)" min-width="80px" align="center">
  123. <el-table-column label="最大值" min-width="80px" align="center" prop="sprinkle_time_max_value" />
  124. <el-table-column label="上四分位数" min-width="80px" align="center" prop="sprinkle_time_up_middle_value" />
  125. <el-table-column label="中位数" min-width="80px" align="center" prop="sprinkle_time_middle_value" />
  126. <el-table-column label="下四分位数" min-width="80px" align="center" prop="sprinkle_time_down_middle_value" />
  127. <el-table-column label="最小值" min-width="80px" align="center" prop="sprinkle_time_min_value" />
  128. </el-table-column>
  129. </el-table>
  130. </div>
  131. </div>
  132. </el-col>
  133. </el-row>
  134. <el-row :gutter="20">
  135. <el-col :span="24">
  136. <div class="abnormal">
  137. <div class="abnormal_t">
  138. <div class="abnormal_t_l">
  139. <h4>
  140. <span class="title"></span>
  141. 撒料时间统计分析
  142. <el-tooltip class="item" effect="dark" placement="top-start">
  143. <div slot="content">
  144. 按时间段统计各牧场配方的撒料正常次数和异常次数,<br />
  145. 切换图表可查看详细数据
  146. </div>
  147. <span class="el-icon-question"></span>
  148. </el-tooltip>
  149. </h4>
  150. <el-select v-model="abnormal.value2" style="width:150px;margin-right: 5px;" class="filter-item" @change="changeformula('3')">
  151. <el-option v-for="item in abnormal.formulaList" :key="item.value" :label="item.label" :value="item.value">
  152. </el-option>
  153. </el-select>
  154. <el-date-picker v-model="abnormal.inputDatetime" :clearable="false" class="inputDatetime filter-item"
  155. type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
  156. style="width: 250px;" @change="changeDate('3')" />
  157. </div>
  158. <div class="abnormal_t_r">
  159. <div class="exportTable button" @click="handleChart('abnormal')">切换图表</div>
  160. <div class="exportTable button" @click="handleExport('abnormal')">导出</div>
  161. </div>
  162. </div>
  163. <div v-if="abnormal.chart1.isChart">
  164. <div id="chartLine3" v-loading="abnormal.chart1.listLoading" style="height:420px;" />
  165. </div>
  166. <div v-else style="margin: 10px 10px;">
  167. <el-select v-model="abnormal.value3" style="width:150px;margin-right: 5px;margin-bottom:10px;" class="filter-item" @change="changepasture('3')">
  168. <el-option v-for="item in abnormal.pastureList" :key="item.id" :label="item.name" :value="item.id" />
  169. </el-select>
  170. <el-select v-model="abnormal.value4" style="width:150px;margin-right: 5px;margin-bottom:10px;" class="filter-item" @change="changestate('3')">
  171. <el-option v-for="item in abnormal.stateList" :key="item.value" :label="item.label" :value="item.value">
  172. </el-option>
  173. </el-select>
  174. <span style="float: right;">共{{abnormal.chart1.tableDataList1.length}}次</span>
  175. <el-table :data="abnormal.chart1.tableDataList1" border style="width: 100%;" :max-height="310"
  176. :row-style="rowStyle" :cell-style="cellStyle" class="elTable">
  177. <el-table-column label="牧场" min-width="130px" align="center" prop="pasture_name" />
  178. <el-table-column label="栏舍" min-width="130px" align="center" prop="barn_name" />
  179. <el-table-column label="班次" min-width="130px" align="center" prop="class_number" />
  180. <el-table-column label="实际撒料时间" min-width="130px" align="center" prop="reality_sprinkle_feed_time" />
  181. </el-table>
  182. </div>
  183. </div>
  184. </el-col>
  185. </el-row>
  186. <el-dialog :title="textMap[accuracy.dialogStatus]" :visible.sync="accuracy.dialogFormVisible"
  187. :close-on-click-modal="false" width="50%">
  188. <div class="accuracy-content">
  189. <div v-if="accuracy.dialogStatus == 'more'" class="dialogmore" style="min-height: 100px;">
  190. <el-checkbox-group v-model="accuracy.more.checkedPasture">
  191. <el-checkbox border v-for="(item,index) in accuracy.more.pastureList" :label="item.id"
  192. :key="index">{{item.name}}</el-checkbox>
  193. </el-checkbox-group>
  194. </div>
  195. <div v-else class="seeRanking" style="min-height: 300px;">
  196. <el-tabs v-model="accuracy.seeRanking.activeName" @tab-click="handleSeeTabClick">
  197. <el-tab-pane label="混料准确率" name="first" />
  198. <el-tab-pane label="混料正确率" name="second" />
  199. <el-tab-pane label="撒料准确率" name="third" />
  200. <el-tab-pane label="撒料正确率" name="fourth" />
  201. </el-tabs>
  202. <div class="search">
  203. <el-input v-model="accuracy.seeRanking.top_rand_start" placeholder="准确率" style="width: 180px;" class="filter-item"
  204. type="number" clearable />
  205. <span style="margin-right: 5px;">-</span>
  206. <el-input v-model="accuracy.seeRanking.top_rand_end" placeholder="准确率" style="width: 180px;" class="filter-item"
  207. type="number" clearable />
  208. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  209. </div>
  210. <el-table :key="accuracy.seeRanking.tableKey" v-loading="accuracy.seeRanking.listLoading"
  211. element-loading-text="给我一点时间" :data="accuracy.seeRanking.list" border fit highlight-current-row
  212. style="width: 100%;margin-bottom: 50px;" :row-style="rowStyle" :cell-style="cellStyle" class="elTable" height="500">
  213. <el-table-column type="selection" align="center" width="50" />
  214. <el-table-column label="排名" min-width="130px" align="center" type="index"/>
  215. <el-table-column label="牧场名称" min-width="130px" align="center" prop="pasture_name" />
  216. <el-table-column label="准确率" min-width="130px" align="center" prop="ratio" />
  217. </el-table>
  218. </div>
  219. <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom: 40px;">
  220. <el-button v-if="accuracy.dialogStatus == 'more'" class="cancelClose cancelClose"
  221. @click="accuracy.dialogFormVisible = false; ">关闭</el-button>
  222. <el-button v-else class="cancelClose1"
  223. @click="accuracy.dialogFormVisible = false; ">关闭</el-button>
  224. <el-button class="save" :disabled="isokDisable" v-if="accuracy.dialogStatus == 'more'"
  225. @click="createData()">确认</el-button>
  226. </div>
  227. </div>
  228. </el-dialog>
  229. </div>
  230. </template>
  231. <script>
  232. import { postJson, getJson } from '@/api/common'
  233. import { mapGetters } from 'vuex'
  234. import { parseTime,json2excel } from '@/utils/index.js'
  235. // import echarts from 'echarts'
  236. import * as echarts from 'echarts';
  237. require('echarts/theme/macarons')
  238. import Cookies from 'js-cookie'
  239. export default {
  240. name: 'Dashboard',
  241. data() {
  242. return {
  243. pickerMinDate: '',
  244. pickerOptions: {
  245. onPick: ({
  246. maxDate,
  247. minDate
  248. }) => {
  249. this.pickerMinDate = minDate.getTime()
  250. if (maxDate) {
  251. this.pickerMinDate = ''
  252. }
  253. },
  254. // 限制不能选择明天之后的日期
  255. disabledDate: (time) => {
  256. if (this.pickerMinDate !== '') {
  257. const one = 31 * 24 * 3600 * 1000
  258. const minTime = this.pickerMinDate - one
  259. let maxTime = this.pickerMinDate + one
  260. if (maxTime > new Date()) {
  261. // maxTime = Date.now() + 8.64e7
  262. maxTime = Date.now()
  263. }
  264. return time.getTime() < minTime || time.getTime() > maxTime
  265. }
  266. return time.getTime() > Date.now()
  267. // return time.getTime() > Date.now() + 8.64e7
  268. }
  269. },
  270. pastureList: JSON.parse(sessionStorage.pastureList),
  271. accuracy: {
  272. value1: '',
  273. value2: '',
  274. inputDatetime: [new Date(), new Date()],
  275. cattleTpyeList: JSON.parse(sessionStorage.downlist).cattle_parent_category,
  276. formulaList: JSON.parse(sessionStorage.downlist).formula_list,
  277. activeName: 'first',
  278. chart1: {
  279. isChart: true,
  280. listLoading: false,
  281. chartLine: null,
  282. allChart1Data: {},
  283. allTable1Data: [],
  284. tableTitleList1: [],
  285. tableDataList1: [],
  286. lineData1: {},
  287. },
  288. dialogStatus: '',
  289. dialogFormVisible: false,
  290. more: {
  291. checkedPasture: [],
  292. pastureList: JSON.parse(sessionStorage.pastureList),
  293. },
  294. seeRanking: {
  295. activeName: 'first',
  296. tableKey: 0,
  297. listLoading: false,
  298. list: [],
  299. allData: {}
  300. },
  301. },
  302. time: {
  303. value1: '',
  304. value2: '',
  305. inputDatetime: [new Date(), new Date()],
  306. cattleTpyeList: JSON.parse(sessionStorage.downlist).cattle_parent_category,
  307. formulaList: JSON.parse(sessionStorage.downlist).formula_list,
  308. chart1: {
  309. isChart: true,
  310. listLoading: false,
  311. chartLine: null,
  312. lineData1: {},
  313. tableDataList1: [],
  314. },
  315. },
  316. abnormal: {
  317. value1: '',
  318. value2: '',
  319. value3:0,
  320. value4:0,
  321. inputDatetime: [new Date(), new Date()],
  322. cattleTpyeList: JSON.parse(sessionStorage.downlist).cattle_parent_category,
  323. formulaList: JSON.parse(sessionStorage.downlist).formula_list,
  324. pastureList:JSON.parse(sessionStorage.pastureList), //牧场
  325. stateList:[{label:'数据状态',value:0},{label:'正常撒料',value:1},{label:'异常撒料',value:2}],
  326. chart1: {
  327. isChart: true,
  328. listLoading: false,
  329. chartLine: null,
  330. lineData1: {},
  331. tableDataList1: [],
  332. },
  333. },
  334. textMap: {
  335. seeRanking: '查看排名',
  336. more: '更多'
  337. },
  338. isokDisable: false,
  339. rowStyle: {
  340. maxHeight: 30 + 'px',
  341. height: 30 + 'px'
  342. },
  343. cellStyle: {
  344. padding: 0 + 'px'
  345. },
  346. initData:[],seriesData:[]
  347. }
  348. },
  349. created() {
  350. // accuracy.inputDatetime
  351. this.abnormal.pastureList.unshift({id:0,name:'所有牧场'})
  352. this.accuracy.value1 = this.accuracy.cattleTpyeList[0].value
  353. this.time.value1 = this.time.cattleTpyeList[0].value
  354. this.abnormal.value1 = this.abnormal.cattleTpyeList[0].value
  355. this.accuracy.value2 = this.accuracy.formulaList[0].value
  356. this.time.value2 = this.time.formulaList[0].value
  357. this.abnormal.value2 = this.abnormal.formulaList[0].value
  358. this.getTimeFn()
  359. },
  360. methods: {
  361. getTimeFn() {
  362. const that = this
  363. const start1 = new Date()
  364. const end1 = new Date()
  365. start1.setTime(start1.getTime() - 3600 * 1000 * 24 * 6)
  366. end1.setTime(end1.getTime() - 3600 * 1000 * 24 * 0)
  367. that.accuracy.inputDatetime = [start1, end1]
  368. const start3 = new Date()
  369. const end3 = new Date()
  370. start3.setTime(start3.getTime() - 3600 * 1000 * 24 * 6)
  371. end3.setTime(end3.getTime() - 3600 * 1000 * 24 * 0)
  372. that.time.inputDatetime = [start3, end3]
  373. const start2 = new Date()
  374. const end2 = new Date()
  375. start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 6)
  376. end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 0)
  377. that.abnormal.inputDatetime = [start2, end2]
  378. that.getChart1List()
  379. that.getChart2List()
  380. that.getChart3List()
  381. },
  382. // getFormulaList() {
  383. // let page = 1
  384. // let page_size = 0
  385. // let url = '/api/v1/ops/feed_formula/list' + '?page=' + page + '&page_size=' + page_size
  386. // let data = {}
  387. // postJson(url, data).then(response => {
  388. // if (response.code == 200) {
  389. // this.accuracy.formulaList = response.data.list
  390. // this.time.formulaList = response.data.list
  391. // this.abnormal.formulaList = response.data.list
  392. // } else {
  393. // this.accuracy.formulaList = []
  394. // this.time.formulaList = []
  395. // this.abnormal.formulaList = []
  396. // }
  397. // this.getChart1List()
  398. // this.getChart2List()
  399. // this.getChart3List()
  400. // })
  401. // },
  402. getChart1List() {
  403. let url = '/api/v1/ops/dashboard/accuracy'
  404. let pasture_ids = []
  405. if(this.accuracy.more.checkedPasture.length > 0){
  406. pasture_ids = this.accuracy.more.checkedPasture
  407. }else{
  408. this.pastureList.forEach((item) => {
  409. pasture_ids.push(item.id)
  410. })
  411. }
  412. let data = {
  413. 'cattle_parent_category_id': this.accuracy.value1,
  414. 'start_date': parseTime(this.accuracy.inputDatetime[0], '{y}-{m}-{d}'),
  415. 'end_date': parseTime(this.accuracy.inputDatetime[1], '{y}-{m}-{d}'),
  416. 'pasture_ids': pasture_ids,
  417. 'feed_formula_id':this.accuracy.value2,
  418. }
  419. if (this.accuracy.value2 == '') {
  420. data.feed_formula_id = 0
  421. }
  422. postJson(url, data).then(response => {
  423. if (response.code == 200) {
  424. this.accuracy.chart1.allChart1Data = response.data.chart
  425. this.accuracy.chart1.allTable1Data = response.data.table.data_list
  426. if (this.accuracy.activeName == 'first') {
  427. this.accuracy.chart1.lineData1 = response.data.chart.mixed_fodder_accurate_ratio
  428. this.accuracy.chart1.tableDataList1 = response.data.table.data_list.mixed_fodder_accurate_ratio
  429. } else if (this.accuracy.activeName == 'second') {
  430. this.accuracy.chart1.lineData1 = response.data.chart.mixed_fodder_correct_ratio
  431. this.accuracy.chart1.tableDataList1 = response.data.table.data_list.mixed_fodder_correct_ratio
  432. } else if (this.accuracy.activeName == 'third') {
  433. this.accuracy.chart1.lineData1 = response.data.chart.sprinkle_fodder_accurate_ratio
  434. this.accuracy.chart1.tableDataList1 = response.data.table.data_list.sprinkle_fodder_accurate_ratio
  435. } else if (this.accuracy.activeName == 'fourth') {
  436. this.accuracy.chart1.lineData1 = response.data.chart.sprinkle_fodder_correct_ratio
  437. this.accuracy.chart1.tableDataList1 = response.data.table.data_list.sprinkle_fodder_correct_ratio
  438. }
  439. this.accuracy.chart1.tableTitleList1 = response.data.table.title_list
  440. console.log(this.accuracy.chart1.allChart1Data, 'allChart1Data')
  441. if (this.accuracy.chart1.isChart) {
  442. this.roadChartLine1(this.accuracy.chart1.lineData1)
  443. }
  444. console.log(this.accuracy.chart1.lineData1, '===')
  445. }
  446. })
  447. },
  448. handleTabClick(tab, event) {
  449. console.log(tab);
  450. if (tab.name == 'first') {
  451. this.accuracy.chart1.lineData1 = this.accuracy.chart1.allChart1Data.mixed_fodder_accurate_ratio
  452. this.accuracy.chart1.tableDataList1 = this.accuracy.chart1.allTable1Data.mixed_fodder_accurate_ratio
  453. } else if (tab.name == 'second') {
  454. this.accuracy.chart1.lineData1 = this.accuracy.chart1.allChart1Data.mixed_fodder_correct_ratio
  455. this.accuracy.chart1.tableDataList1 = this.accuracy.chart1.allTable1Data.mixed_fodder_correct_ratio
  456. } else if (tab.name == 'third') {
  457. this.accuracy.chart1.lineData1 = this.accuracy.chart1.allChart1Data.sprinkle_fodder_accurate_ratio
  458. this.accuracy.chart1.tableDataList1 = this.accuracy.chart1.allTable1Data.sprinkle_fodder_accurate_ratio
  459. } else if (tab.name == 'fourth') {
  460. this.accuracy.chart1.lineData1 = this.accuracy.chart1.allChart1Data.sprinkle_fodder_correct_ratio
  461. this.accuracy.chart1.tableDataList1 = this.accuracy.chart1.allTable1Data.sprinkle_fodder_correct_ratio
  462. }
  463. this.accuracy.chart1.isChart = true
  464. this.roadChartLine1(this.accuracy.chart1.lineData1)
  465. },
  466. handleChart(item) {
  467. if (item == 'accuracy') {
  468. this.accuracy.chart1.isChart = !this.accuracy.chart1.isChart
  469. this.$nextTick(() => {
  470. if (this.accuracy.chart1.isChart) {
  471. this.roadChartLine1(this.accuracy.chart1.lineData1)
  472. }
  473. });
  474. } else if (item == 'time') {
  475. this.time.chart1.isChart = !this.time.chart1.isChart
  476. this.$nextTick(() => {
  477. if (this.time.chart1.isChart) {
  478. this.roadChartLine2(this.time.chart1.lineData1)
  479. }
  480. });
  481. } else {
  482. this.abnormal.chart1.isChart = !this.abnormal.chart1.isChart
  483. this.abnormal.value3 = 0
  484. this.abnormal.value4 = 0
  485. this.getChart3List()
  486. this.$nextTick(() => {
  487. if (this.abnormal.chart1.isChart) {
  488. this.roadChartLine3(this.abnormal.chart1.lineData1)
  489. }
  490. });
  491. }
  492. },
  493. handleExport(item) {
  494. if(item == 'accuracy'){
  495. var list1 = this.accuracy.chart1.allTable1Data.mixed_fodder_accurate_ratio
  496. var list2 = this.accuracy.chart1.allTable1Data.mixed_fodder_correct_ratio
  497. var list3 = this.accuracy.chart1.allTable1Data.sprinkle_fodder_accurate_ratio
  498. var list4 = this.accuracy.chart1.allTable1Data.sprinkle_fodder_correct_ratio
  499. var titles = []
  500. var values = []
  501. for(let i =0;i<this.accuracy.chart1.tableTitleList1.length;i++){
  502. titles.push(this.accuracy.chart1.tableTitleList1[i].value)
  503. values.push(this.accuracy.chart1.tableTitleList1[i].name)
  504. }
  505. var excelDatasTabChart1 = [
  506. {
  507. tHeader: titles,
  508. filterVal: values,
  509. tableDatas: list1,
  510. sheetName: '混料准确率'
  511. },{
  512. tHeader: titles,
  513. filterVal: values,
  514. tableDatas: list2,
  515. sheetName: '混料正确率'
  516. },{
  517. tHeader: titles,
  518. filterVal: values,
  519. tableDatas: list3,
  520. sheetName: '撒料准确率'
  521. },{
  522. tHeader: titles,
  523. filterVal: values,
  524. tableDatas: list4,
  525. sheetName: '撒料正确率'
  526. }
  527. ]
  528. json2excel(excelDatasTabChart1, '准确性分析', true, 'xlsx')
  529. }else if(item == 'time'){
  530. import('@/vendor/Export5Excel').then(excel => {
  531. const multiHeader = [
  532. [
  533. '类型', '加料时间(分钟)', '', '', '', '', '撒料时间(分钟)', '', '', '', ''
  534. ]
  535. ]
  536. const multiHeader2 = [
  537. [
  538. '牧场', '最大值', '上四分位数', '中位数', '下四分位数', '最小值', '最大值', '上四分位数', '中位数', '下四分位数', '最小值'
  539. ]
  540. ]
  541. const filterVal = [
  542. 'title','add_feed_time_max_value','add_feed_time_up_middle_value','add_feed_time_middle_value','add_feed_time_down_middle_value','add_feed_time_min_value','sprinkle_time_max_value','sprinkle_time_up_middle_value','sprinkle_time_middle_value','sprinkle_time_down_middle_value','sprinkle_time_min_value'
  543. ]
  544. const data = this.time.chart1.tableDataList1.map((v) => filterVal.map((j) => v[j]))
  545. const merges = ['A1', 'B1:F1', 'G1:K1']
  546. excel.export_json_to_excel({ multiHeader, multiHeader2, data, filename: '执行时间', merges })
  547. })
  548. }else if(item == 'abnormal'){
  549. var excelDatasTabChart3 = [
  550. {
  551. tHeader: ['牧场','栏舍','班次','实际撒料时间'],
  552. filterVal: ['pasture_name','barn_name','class_number','reality_sprinkle_feed_time'],
  553. tableDatas: this.abnormal.chart1.tableDataList1,
  554. sheetName: ' 撒料时间统计分析'
  555. }
  556. ]
  557. json2excel(excelDatasTabChart3, ' 撒料时间统计分析', true, 'xlsx')
  558. }
  559. },
  560. handleSeeRanking() {
  561. this.accuracy.dialogStatus = 'seeRanking'
  562. this.accuracy.dialogFormVisible = true
  563. this.getSeeRankingList()
  564. },
  565. getSeeRankingList(item) {
  566. let url = '/api/v1/ops/dashboard/top_pasture'
  567. let pasture_ids = []
  568. this.pastureList.forEach((item) => {
  569. pasture_ids.push(item.id)
  570. })
  571. let dashboard_top_type = 0
  572. if(item){
  573. dashboard_top_type = item
  574. }else{
  575. dashboard_top_type = 0
  576. }
  577. let data = {
  578. 'cattle_parent_category_id': this.accuracy.value1,
  579. 'start_date':parseTime(this.accuracy.inputDatetime[0], '{y}-{m}-{d}'),
  580. 'end_date':parseTime(this.accuracy.inputDatetime[1], '{y}-{m}-{d}'),
  581. 'pasture_ids':pasture_ids,
  582. 'feed_formula_id':this.accuracy.value2,
  583. 'dashboard_top_type':dashboard_top_type
  584. }
  585. if (this.accuracy.value2 == '') {
  586. data.feed_formula_id = 0
  587. }
  588. if (this.accuracy.seeRanking.top_rand_start !== '') {
  589. data.top_rand_start = this.accuracy.seeRanking.top_rand_start
  590. }
  591. if (this.accuracy.seeRanking.top_rand_end !== '') {
  592. data.top_rand_end = this.accuracy.seeRanking.top_rand_end
  593. }
  594. postJson(url, data).then(response => {
  595. if (response.code == 200) {
  596. this.accuracy.seeRanking.allData = response.data
  597. if (this.accuracy.seeRanking.activeName == 'first') {
  598. this.accuracy.seeRanking.list = response.data.mixed_fodder_accurate_ratio
  599. } else if (this.accuracy.seeRanking.activeName == 'second') {
  600. this.accuracy.seeRanking.list = response.data.mixed_fodder_correct_ratio
  601. } else if (this.accuracy.seeRanking.activeName == 'third') {
  602. this.accuracy.seeRanking.list = response.data.sprinkle_fodder_accurate_ratio
  603. } else if (this.accuracy.seeRanking.activeName == 'fourth') {
  604. this.accuracy.seeRanking.list = response.data.sprinkle_fodder_correct_ratio
  605. }
  606. } else {
  607. this.accuracy.seeRanking.list = []
  608. }
  609. })
  610. },
  611. handleSeeTabClick(tab, ) {
  612. console.log(tab);
  613. if (tab.name == 'first') {
  614. this.accuracy.seeRanking.list = this.accuracy.seeRanking.allData.mixed_fodder_accurate_ratio
  615. } else if (tab.name == 'second') {
  616. this.accuracy.seeRanking.list = this.accuracy.seeRanking.allData.mixed_fodder_correct_ratio
  617. } else if (tab.name == 'third') {
  618. this.accuracy.seeRanking.list = this.accuracy.seeRanking.allData.sprinkle_fodder_accurate_ratio
  619. } else if (tab.name == 'fourth') {
  620. this.accuracy.seeRanking.list = this.accuracy.seeRanking.allData.sprinkle_fodder_correct_ratio
  621. }
  622. },
  623. handleSearch() {
  624. let dashboard_top_type = 0
  625. if(this.accuracy.seeRanking.activeName == 'first'){
  626. dashboard_top_type = 1
  627. }else if(this.accuracy.seeRanking.activeName == 'second'){
  628. dashboard_top_type = 2
  629. }else if(this.accuracy.seeRanking.activeName == 'third'){
  630. dashboard_top_type = 3
  631. }else{
  632. dashboard_top_type = 4
  633. }
  634. this.getSeeRankingList(dashboard_top_type)
  635. },
  636. handleMore() {
  637. this.accuracy.dialogStatus = 'more'
  638. this.getPastureList()
  639. },
  640. getPastureList() {
  641. let page = 1
  642. let page_size = 100
  643. let url = 'api/v1/ops/pasture/list' + '?page=' + page + '&page_size=' + page_size
  644. let data = {}
  645. postJson(url, data).then(response => {
  646. if (response.code == 200) {
  647. // this.accuracy.more.pastureList = response.data.list
  648. } else {
  649. // this.accuracy.more.pastureList = []
  650. }
  651. this.accuracy.dialogFormVisible = true
  652. })
  653. },
  654. getChart2List() {
  655. let url = '/api/v1/ops/dashboard/exec_time'
  656. let pasture_ids = []
  657. this.pastureList.forEach((item) => {
  658. pasture_ids.push(item.id)
  659. })
  660. let data = {
  661. 'cattle_parent_category_id': this.time.value1,
  662. // 'feed_formula_id':this.time.value2,
  663. 'start_date': parseTime(this.time.inputDatetime[0], '{y}-{m}-{d}'),
  664. 'end_date': parseTime(this.time.inputDatetime[1], '{y}-{m}-{d}'),
  665. 'pasture_ids': pasture_ids,
  666. }
  667. // if (this.time.value2 == '') {
  668. // data.feed_formula_id = 0
  669. // }
  670. postJson(url, data).then(response => {
  671. if (response.code == 200) {
  672. this.time.chart1.lineData1 = response.data.chart
  673. this.time.chart1.tableDataList1 = response.data.table_list
  674. if (this.time.chart1.isChart) {
  675. this.roadChartLine2(this.time.chart1.lineData1)
  676. }
  677. console.log(response.data, '===')
  678. }
  679. })
  680. },
  681. changecattle(item){
  682. if(item == '1'){
  683. this.getChart1List()
  684. }else if(item == '2'){
  685. this.getChart2List()
  686. }else if(item == '3'){
  687. this.getChart3List()
  688. }
  689. },
  690. changeformula(item){
  691. if(item == '1'){
  692. this.getChart1List()
  693. }else if(item == '2'){
  694. this.getChart2List()
  695. }else if(item == '3'){
  696. this.getChart3List()
  697. }
  698. },
  699. changeDate (item){
  700. if(item == '1'){
  701. this.getChart1List()
  702. }else if(item == '2'){
  703. this.getChart2List()
  704. }else if(item == '3'){
  705. if (this.abnormal.inputDatetime) {
  706. const startDate = this.abnormal.inputDatetime[0];
  707. const endDate = this.abnormal.inputDatetime[1];
  708. const days = Math.floor((endDate - startDate) / (1000 * 60 * 60 * 24)) + 1;
  709. console.log('所选天数:', days);
  710. if(days < 7){
  711. this.$message({type: 'error',message: '最少选择7天时间', duration: 2000})
  712. }else if(days > 365){
  713. this.$message({type: 'error',message: '最多选择365天时间', duration: 2000})
  714. }else{
  715. this.getChart3List()
  716. }
  717. }
  718. }
  719. },
  720. changepasture(){
  721. this.getChart3List()
  722. },
  723. changestate(){
  724. this.getChart3List()
  725. },
  726. getChart3List() {
  727. let pasture_ids = []
  728. if(this.abnormal.chart1.isChart){
  729. this.abnormal.value3 == 0
  730. this.abnormal.value4 == 0
  731. }
  732. if(this.abnormal.value3 == 0){
  733. this.pastureList.forEach((item) => {
  734. pasture_ids.push(item.id)
  735. })
  736. }else{
  737. pasture_ids.push(this.abnormal.value3)
  738. }
  739. let url = '/api/v1/ops/dashboard/sprinkle_time'
  740. let data = {
  741. 'start_date': parseTime(this.abnormal.inputDatetime[0], '{y}-{m}-{d}'),
  742. 'end_date': parseTime(this.abnormal.inputDatetime[1], '{y}-{m}-{d}'),
  743. 'pasture_ids': pasture_ids,
  744. 'feed_formula_id':this.abnormal.value2
  745. }
  746. data.state = this.abnormal.value4
  747. console.log(this.abnormal.value2,'====000')
  748. if (this.abnormal.value2 == '') {
  749. data.feed_formula_id = 0
  750. }
  751. postJson(url, data).then(response => {
  752. if (response.code == 200) {
  753. this.abnormal.chart1.lineData1 = response.data.chart
  754. this.abnormal.chart1.tableDataList1 = response.data.table_list
  755. if (this.abnormal.chart1.isChart) {
  756. this.roadChartLine3(this.abnormal.chart1.lineData1)
  757. }
  758. console.log(response.data, '===')
  759. }
  760. })
  761. },
  762. roadChartLine1(chartLine_data) {
  763. console.log(chartLine_data,'chartLine_data')
  764. console.log(this.accuracy.chart1.lineData1.max_value,'max')
  765. console.log(this.accuracy.chart1.lineData1.min_value,'min')
  766. if (this.accuracy.chart1.chartLine != null) {
  767. this.accuracy.chart1.chartLine.dispose()
  768. }
  769. this.accuracy.chart1.chartLine = echarts.init(document.getElementById('chartLine1'))
  770. var option = {
  771. animation: false,
  772. tooltip: {
  773. trigger: 'axis'
  774. },
  775. legend: {
  776. data: chartLine_data.pasture_name,
  777. left: 14,
  778. bottom: 0,
  779. },
  780. grid: {
  781. left: '3%',
  782. right: '14%',
  783. // top: '3%',
  784. containLabel: true
  785. },
  786. xAxis: [{
  787. data: chartLine_data.title,
  788. type: 'category',
  789. }],
  790. yAxis: [{
  791. type: 'value',
  792. min:0, //取0为最小刻度
  793. max: 100, //取100为最大刻度
  794. min:'min', //取最小值为最小刻度
  795. max: 'max', //取最大值为最大刻度
  796. min: function(value) {//取最小值向下取整为最小刻度
  797. return Math.floor(value.min)
  798. },
  799. max: function(value) {//取最大值向上取整为最大刻度
  800. return Math.ceil(value.max)
  801. },
  802. scale: true, //自适应
  803. minInterval: 2, //分割刻度
  804. axisLine: {
  805. lineStyle: {
  806. color: "#666", //最左侧Y轴颜色
  807. }
  808. },
  809. name: '(%)'
  810. }],
  811. color: ['#4b07fa', '#0f96fc', '#ff42a9', '#ff724c', '#05fbf0', '#ffae00', '#b705fa', '#9a60b4', '#3cff00'],
  812. series: [{
  813. name: '撒料正确率',
  814. type: 'bar',
  815. barWidth:10,
  816. data: chartLine_data.ratio
  817. }
  818. ]
  819. // series: function(e) {
  820. // var serie = [];
  821. // for (var i = 0; i < chartLine_data.pasture_name.length; i++) {
  822. // var item = {
  823. // name: chartLine_data.pasture_name[i],
  824. // data: chartLine_data.data_list[i],
  825. // type: 'bar',
  826. // barMaxWidth: 20, // 每一个都要设置
  827. // barMinWidth: 5
  828. // }
  829. // serie.push(item);
  830. // }
  831. // console.log(serie)
  832. // return serie;
  833. // }()
  834. };
  835. this.accuracy.chart1.chartLine.setOption(option)
  836. if (this.accuracy.chart1.chartLine !== null) {
  837. window.onresize = function() {
  838. this.accuracy.chart1.chartLine.resize()
  839. }
  840. }
  841. },
  842. roadChartLine2(chartLine_data) {
  843. if (this.time.chart1.chartLine != null) {
  844. this.time.chart1.chartLine.dispose()
  845. }
  846. this.time.chart1.chartLine = echarts.init(document.getElementById('chartLine2'))
  847. var option = {
  848. tooltip: {
  849. trigger: `item`,
  850. formatter: this.formatter
  851. }, // formatter可不设置
  852. color: `#8d8d8d`, // 箱线图线框的颜色
  853. grid: {
  854. left: '3%',
  855. right: 10,
  856. bottom: 10,
  857. // top: 20,
  858. containLabel: true,
  859. },
  860. legend: {
  861. // data: ['加料时间', '搅拌时间','撒料时间'],
  862. data: ['加料时间','撒料时间'],
  863. right: 14,
  864. top: 0,
  865. bottom: 10
  866. },
  867. // color: ['#42C7FF', '#20DB7C','#FCC858'],
  868. color: ['#42C7FF', '#FCC858'],
  869. xAxis: { // 此处设置与其他图表类似
  870. type: `category`,
  871. data:chartLine_data.title,
  872. axisLine: {
  873. //坐标轴轴线相关设置
  874. show: false,
  875. },
  876. axisLabel: {
  877. // 坐标轴刻度标签的相关设置
  878. show: true,
  879. showMaxLabel: true,
  880. },
  881. axisTick: {
  882. //刻度相关设置
  883. show: false, //让刻度隐藏
  884. },
  885. },
  886. yAxis: { // 此处设置与其他图表类似
  887. type: `value`,
  888. name:'(分钟)',
  889. splitArea: { show: false },
  890. axisLine: { lineStyle: { color: `#8d8d8d` } },
  891. },
  892. series: [
  893. {
  894. name:'加料时间',
  895. type: `boxplot`,
  896. itemStyle: { color: `#42C7FF` },
  897. data:chartLine_data.add_feed_time
  898. },
  899. // {
  900. // name:'搅拌时间',
  901. // type: `boxplot`,
  902. // itemStyle: { color: `#20DB7C` },
  903. // data:chartLine_data.stir_time
  904. // },
  905. {
  906. name:'撒料时间',
  907. type: `boxplot`,
  908. itemStyle: { color: `#FCC858` },
  909. data:chartLine_data.sprinkle_time
  910. }
  911. ],
  912. }
  913. this.time.chart1.chartLine.setOption(option)
  914. if (this.time.chart1.chartLine !== null) {
  915. window.onresize = function() {
  916. this.time.chart1.chartLine.resize()
  917. }
  918. }
  919. },
  920. formatter(param) {
  921. // console.log(param,'param')
  922. return [
  923. '执行时间/分钟<br/>'+
  924. '牧场: '+ param.name,
  925. '最大值: ' + param.data[1],
  926. '上四分位数: ' + param.data[2],
  927. '中位数: ' + param.data[3],
  928. '下四分位数: ' + param.data[4],
  929. '最小值: ' + param.data[5]
  930. ].join('<br/>')
  931. },
  932. roadChartLine3(chartLine_data) {
  933. console.log(chartLine_data,'===999')
  934. if (this.abnormal.chart1.chartLine != null) {
  935. this.abnormal.chart1.chartLine.dispose()
  936. }
  937. this.abnormal.chart1.chartLine = echarts.init(document.getElementById('chartLine3'))
  938. var option = {
  939. animation: false,
  940. tooltip: {
  941. trigger: 'axis',
  942. formatter: function (data) {
  943. console.log(data,'====')
  944. let a = parseFloat(data[0].data)
  945. let b = parseFloat(data[0].data) + parseFloat(data[1].data)
  946. let rate1 = 0
  947. let rate2 = 0
  948. if(data[0].data !== 0 && data[1].data !== 0){
  949. rate1 = (a/b * 100).toFixed(2)
  950. rate2 = 100 - (parseFloat(rate1))
  951. }else if(data[0].data == 100){
  952. rate1 = 100
  953. rate2 = 0
  954. }else if(data[1].data == 100){
  955. rate1 = 0
  956. rate2 = 100
  957. }else{
  958. rate1 = 0
  959. rate2 = 0
  960. }
  961. var res = "撒料时间"+ '<br/>' +"牧场:" + data[0].name + '<br/>' + data[0].marker + data[0].seriesName + '<br/>' + "总占比"+rate1+"%"+ '<span style="margin-left:10px;color:#ccc;">'+ a + '次'+'</span>'+ '<br/>' + data[1].marker + data[1].seriesName+':'+'<br/>' + "总占比"+rate2+"%"+ "<span style='margin-left:10px;color:#ccc;'>"+ data[1].data + '次' + "</span>"
  962. return res
  963. }
  964. },
  965. legend: {
  966. data: ['正常撒料次数', '异常撒料次数'],
  967. right: 14,
  968. top: 0,
  969. },
  970. grid: {
  971. // top: '20%',
  972. left: '3%',
  973. right: '14%',
  974. bottom: '13%',
  975. containLabel: true
  976. },
  977. xAxis: [{
  978. type: 'category',
  979. data: chartLine_data.title,
  980. }],
  981. yAxis: [{
  982. type: 'value',
  983. name:'(次)',
  984. axisLine: {
  985. lineStyle: {
  986. color: '#666'
  987. }
  988. },
  989. }],
  990. series: [{
  991. name: '正常撒料次数',
  992. type: 'bar',
  993. barWidth:25,
  994. stack: 'Ad',
  995. data: chartLine_data.sprinkle_number_list[0]
  996. },
  997. {
  998. name: '异常撒料次数',
  999. type: 'bar',
  1000. stack: 'Ad',
  1001. barWidth:25,
  1002. data: chartLine_data.sprinkle_number_list[1]
  1003. },
  1004. ]
  1005. };
  1006. this.abnormal.chart1.chartLine.setOption(option)
  1007. if (this.abnormal.chart1.chartLine !== null) {
  1008. window.onresize = function() {
  1009. this.abnormal.chart1.chartLine.resize()
  1010. }
  1011. }
  1012. },
  1013. createData(){
  1014. console.log(this.accuracy.more.checkedPasture)
  1015. console.log(this.accuracy.more.pastureList)
  1016. this.getChart1List()
  1017. this.accuracy.dialogFormVisible = false
  1018. }
  1019. }
  1020. }
  1021. </script>
  1022. <style lang="scss" scoped>
  1023. .container {
  1024. margin: 10px 10px;
  1025. }
  1026. .accuracy,
  1027. .time,
  1028. .abnormal {
  1029. background: #fff;
  1030. height: 550px;
  1031. border-radius: 5px;
  1032. border: 2px solid #ededed;
  1033. }
  1034. .accuracy_t {
  1035. margin-left: 10px;
  1036. position: relative;
  1037. .accuracy_t_l {
  1038. h3 {
  1039. line-height: 15px;
  1040. }
  1041. .title {
  1042. width: 3px;
  1043. height: 15px;
  1044. background: red;
  1045. display: inline-block;
  1046. margin-right: 10px;
  1047. }
  1048. }
  1049. .accuracy_t_r {
  1050. position: absolute;
  1051. top: 0;
  1052. right: 0;
  1053. .button {
  1054. display: inline-block;
  1055. margin-right: 10px;
  1056. }
  1057. }
  1058. }
  1059. .accuracy_b {
  1060. margin: 0 10px;
  1061. /deep/ .el-tabs__item {
  1062. font-size: 12px
  1063. }
  1064. position: relative;
  1065. }
  1066. .more {
  1067. position: absolute;
  1068. bottom: -14px;
  1069. right: -8px;
  1070. color: blue;
  1071. font-size: 12px;
  1072. }
  1073. .maxdiv,
  1074. .mediandiv,
  1075. .mindiv {
  1076. text-align: center;
  1077. .title-t {
  1078. font-size: 12px;
  1079. }
  1080. .title-c {
  1081. font-size: 14px;
  1082. font-weight: bold;
  1083. }
  1084. .title-b {
  1085. font-size: 14px;
  1086. color: red;
  1087. font-weight: bold;
  1088. }
  1089. }
  1090. .maxdiv,
  1091. .mediandiv {
  1092. border-right: 2px solid #eee;
  1093. }
  1094. .mediandiv {
  1095. .title-b {
  1096. color: blue;
  1097. }
  1098. }
  1099. .accuracy-content {
  1100. /deep/ .el-checkbox {
  1101. margin: 5px 5px;
  1102. }
  1103. /deep/ .is-bordered {
  1104. margin-left: 5px;
  1105. }
  1106. }
  1107. .time {
  1108. .time_t {
  1109. margin-left: 10px;
  1110. position: relative;
  1111. .time_t_l {
  1112. h3 {
  1113. line-height: 15px;
  1114. }
  1115. .title {
  1116. width: 3px;
  1117. height: 15px;
  1118. background: red;
  1119. display: inline-block;
  1120. margin-right: 10px;
  1121. }
  1122. }
  1123. .time_t_r {
  1124. position: absolute;
  1125. top: 0;
  1126. right: 0;
  1127. .button {
  1128. display: inline-block;
  1129. margin-right: 10px;
  1130. }
  1131. }
  1132. }
  1133. }
  1134. .abnormal {
  1135. background: #fff;
  1136. margin-top: 10px;
  1137. .abnormal_t {
  1138. margin-left: 10px;
  1139. position: relative;
  1140. .abnormal_t_l {
  1141. h3 {
  1142. line-height: 15px;
  1143. }
  1144. .title {
  1145. width: 3px;
  1146. height: 15px;
  1147. background: red;
  1148. display: inline-block;
  1149. margin-right: 10px;
  1150. }
  1151. }
  1152. .abnormal_t_r {
  1153. position: absolute;
  1154. top: 0;
  1155. right: 0;
  1156. .button {
  1157. display: inline-block;
  1158. margin-right: 10px;
  1159. }
  1160. }
  1161. }
  1162. }
  1163. .container {
  1164. background: #fff;
  1165. }
  1166. </style>