28953d0c2643683c06a71cd6d77f77c96b4fa512.svn-base 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106
  1. <template>
  2. <div class="app-container">
  3. <!-- 配方模板表 -->
  4. <div ref="template" class="template">
  5. <div class="recipeTemplate">
  6. <p>日执行计划</p>
  7. </div>
  8. <div class="operation">
  9. <el-button class="success" @click="handleCreate">新生成</el-button>
  10. <el-button class="success" @click="handleRevisePlan">修改计划</el-button>
  11. <el-button class="export" style="float: right;margin-right: 80px;" @click="handleHistoryRecord">历史记录</el-button>
  12. <el-button class="export" style="float: right;margin-right: 10px;" @click="handleMaterialPlan">撒料计划</el-button>
  13. <el-button class="export" style="float: right;margin-right: 10px;" @click="handlePremixedPlan">预混计划</el-button>
  14. <el-button class="export" style="float: right;margin-right: 10px;" @click="handleShedFormula">栏舍配方</el-button>
  15. <el-button class="export" style="float: right;margin-right: 10px;" @click="handleRecipeemplate">配方模板</el-button>
  16. </div>
  17. <div class="search">
  18. <el-date-picker v-model="table.getdataListParm.parammaps.mydate" type="date" placeholder="选择日期" style="width: 150px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :clearable="false" @change="changeDate" />
  19. <el-button class="el-icon-arrow-left elIconArrowLeft" @click="handleBefore" />
  20. <el-button class="el-icon-arrow-right elIconArrowRight" @click="handleNext" />
  21. <el-select v-model="table.getdataListParm.parammaps.lpplantype" filterable placeholder="计划类型" class="filter-item" clearable style="width: 120px;" @change="changePlanType">
  22. <el-option v-for="item in planTypeList" :key="item.value" :label="item.lable" :value="item.value" />
  23. </el-select>
  24. <el-select v-model="table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;" clearable @change="changeFrequency">
  25. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  26. </el-select>
  27. <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="打印类型" class="filter-item" clearable style="width: 120px;">
  28. <el-option v-for="item in printingTypeList" :key="item.value" :label="item.label" :value="item.value" />
  29. </el-select>
  30. <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="计划维度" class="filter-item" style="width: 120px;" clearable>
  31. <el-option v-for="item in planningDimensionList" :key="item.value" :label="item.label" :value="item.value" />
  32. </el-select>
  33. <el-select v-model="table.getdataListParm.parammaps.enable" filterable placeholder="导出类型" class="filter-item" style="width: 120px;" clearable>
  34. <el-option v-for="item in exportTypeList" :key="item.value" :label="item.label" :value="item.value" />
  35. </el-select>
  36. <el-button class="export" @click="handleExport">导出</el-button>
  37. </div>
  38. <!-- 日执行计划 -->
  39. <div class="table">
  40. <el-table
  41. :key="table.tableKey"
  42. v-loading="table.listLoading"
  43. element-loading-text="给我一点时间"
  44. :data="table.list"
  45. border
  46. fit
  47. highlight-current-row
  48. style="width: 98%;"
  49. :row-style="rowStyle"
  50. :cell-style="cellStyle"
  51. class="elTable table-fixed"
  52. @row-click="tableRowClick"
  53. >
  54. <el-table-column label="序号" align="center" type="index" width="50px" />
  55. <el-table-column label="计划名称" min-width="130px" align="center">
  56. <template slot-scope="scope">
  57. <span>{{ scope.row.projname }}</span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="计划类型" prop="weight" min-width="130px" align="center" :formatter="lpplantype" />
  61. <el-table-column label="TMR编号" min-width="130px" align="center">
  62. <template slot-scope="scope">
  63. <span>{{ scope.row.tmrtname }}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="驾驶员" min-width="130px" align="center">
  67. <template slot-scope="scope">
  68. <span>{{ scope.row.driver }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="已执行" min-width="130px" align="center">
  72. <template slot-scope="scope">
  73. <span>{{ scope.row.havebutton }}</span>
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="班次" min-width="180px" align="center">
  77. <template slot-scope="scope">
  78. <span>{{ scope.row.times }}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="理论量" min-width="180px" align="center">
  82. <template slot-scope="scope">
  83. <span>{{ scope.row.lweight }}</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="时间" min-width="180px" align="center">
  87. <template slot-scope="scope">
  88. <span>{{ scope.row.plantime }}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="发料位" min-width="180px" align="left">
  92. <template slot-scope="scope">
  93. <span>{{ scope.row.barnames }}</span>
  94. </template>
  95. </el-table-column>
  96. </el-table>
  97. </div>
  98. </div>
  99. <!-- 预混料 -->
  100. <div v-if="table3.getdataListParm.parammaps.lpplantype == 4" class="content">
  101. <div class="table2">
  102. <div class="contentOperation">
  103. <p>计划内容<br>操作详情</p>
  104. </div>
  105. <div class="content-table">
  106. <el-table
  107. :key="table2.tableKey"
  108. v-loading="table2.listLoading"
  109. element-loading-text="给我一点时间"
  110. :data="table2.list"
  111. fit
  112. highlight-current-row
  113. style="width: 100%;"
  114. height="450"
  115. :row-style="rowStyle"
  116. :cell-style="cellStyle"
  117. class="elTable table-fixed"
  118. >
  119. <el-table-column label="操作序号" min-width="130px" align="center">
  120. <template slot-scope="scope">
  121. <span>{{ scope.row.sort }}</span>
  122. </template>
  123. </el-table-column>
  124. <el-table-column label="饲料名称" prop="fname" min-width="130px" align="center">
  125. <template slot-scope="scope">
  126. <span>{{ scope.row.fname }}</span>
  127. </template>
  128. </el-table-column>
  129. <el-table-column label="设计重量(KG)" prop="weight" min-width="130px" align="center">
  130. <template slot-scope="scope">
  131. <span>{{ scope.row.weight }}</span>
  132. </template>
  133. </el-table-column>
  134. </el-table>
  135. </div>
  136. </div>
  137. </div>
  138. <!-- 撒料 -->
  139. <div v-if="table3.getdataListParm.parammaps.lpplantype == 0" class="content">
  140. <div class="table2">
  141. <div class="contentOperation">
  142. <p>计划内容<br>操作详情</p>
  143. </div>
  144. <div class="content-table">
  145. <el-table
  146. :key="table2.tableKey"
  147. v-loading="table2.listLoading"
  148. element-loading-text="给我一点时间"
  149. :data="table2.list"
  150. fit
  151. highlight-current-row
  152. style="width: 100%;"
  153. height="450"
  154. :row-style="rowStyle"
  155. :cell-style="cellStyle"
  156. class="elTable table-fixed"
  157. >
  158. <el-table-column label="操作序号" min-width="130px" align="center">
  159. <template slot-scope="scope">
  160. <span>{{ scope.row.sort }}</span>
  161. </template>
  162. </el-table-column>
  163. <el-table-column label="饲料名称" prop="fname" min-width="130px" align="center">
  164. <template slot-scope="scope">
  165. <span>{{ scope.row.fname }}</span>
  166. </template>
  167. </el-table-column>
  168. <el-table-column label="设计重量(KG)" prop="weight" min-width="130px" align="center">
  169. <template slot-scope="scope">
  170. <span>{{ scope.row.weight }}</span>
  171. </template>
  172. </el-table-column>
  173. </el-table>
  174. </div>
  175. </div>
  176. <div class="table3">
  177. <div class="contentOperation">
  178. <p>计划内容<br>栏舍详情</p>
  179. </div>
  180. <div class="content-table">
  181. <el-table
  182. :key="table3.tableKey"
  183. v-loading="table3.listLoading"
  184. element-loading-text="给我一点时间"
  185. :data="table3.list"
  186. height="450"
  187. fit
  188. highlight-current-row
  189. style="width: 100%;"
  190. :row-style="rowStyle"
  191. :cell-style="cellStyle"
  192. class="elTable table-fixed"
  193. >
  194. <el-table-column label=" 操作序号" min-width="130px" align="center">
  195. <template slot-scope="scope">
  196. <span>{{ scope.row.sort }}</span>
  197. </template>
  198. </el-table-column>
  199. <el-table-column label="栏舍" min-width="130px" align="center">
  200. <template slot-scope="scope">
  201. <span>{{ scope.row.fname }}</span>
  202. </template>
  203. </el-table-column>
  204. <el-table-column label="设计重量(KG)" prop="weight" min-width="130px" align="center">
  205. <template slot-scope="scope">
  206. <span>{{ scope.row.weight }}</span>
  207. </template>
  208. </el-table-column>
  209. </el-table>
  210. </div>
  211. </div>
  212. </div>
  213. <!-- 剩料 -->
  214. <div v-if="table3.getdataListParm.parammaps.lpplantype == 3" class="content">
  215. <div class="table2">
  216. <div class="contentOperation">
  217. <p>计划内容<br>操作详情</p>
  218. </div>
  219. <div class="content-table">
  220. <el-table
  221. :key="table2.tableKey"
  222. v-loading="table2.listLoading"
  223. element-loading-text="给我一点时间"
  224. :data="table2.list"
  225. fit
  226. highlight-current-row
  227. style="width: 100%;"
  228. height="450"
  229. :row-style="rowStyle"
  230. :cell-style="cellStyle"
  231. class="elTable table-fixed"
  232. >
  233. <el-table-column label="操作序号" min-width="130px" align="center">
  234. <template slot-scope="scope">
  235. <span>{{ scope.row.sort }}</span>
  236. </template>
  237. </el-table-column>
  238. <el-table-column label="取料栏舍" prop="fname" min-width="130px" align="center">
  239. <template slot-scope="scope">
  240. <span>{{ scope.row.fname }}</span>
  241. </template>
  242. </el-table-column>
  243. <el-table-column label="处理方式" prop="useinbar" min-width="130px" align="center">
  244. <template slot-scope="scope">
  245. <span>{{ scope.row.useinbar }}</span>
  246. </template>
  247. </el-table-column>
  248. </el-table>
  249. </div>
  250. </div>
  251. <div class="table3">
  252. <div class="contentOperation">
  253. <p>计划内容<br>栏舍详情</p>
  254. </div>
  255. <div class="content-table">
  256. <el-table
  257. :key="table3.tableKey"
  258. v-loading="table3.listLoading"
  259. element-loading-text="给我一点时间"
  260. :data="table3.list"
  261. height="450"
  262. fit
  263. highlight-current-row
  264. style="width: 100%;"
  265. :row-style="rowStyle"
  266. :cell-style="cellStyle"
  267. class="elTable table-fixed"
  268. >
  269. <el-table-column label="操作序号" min-width="130px" align="center">
  270. <template slot-scope="scope">
  271. <span>{{ scope.row.sort }}</span>
  272. </template>
  273. </el-table-column>
  274. <el-table-column label="转投栏舍" min-width="130px" align="center">
  275. <template slot-scope="scope">
  276. <span>{{ scope.row.fname }}</span>
  277. </template>
  278. </el-table-column>
  279. </el-table>
  280. </div>
  281. </div>
  282. </div>
  283. <!-- 撒料计划-混料 -->
  284. <div v-if="table3.getdataListParm.parammaps.lpplantype == 1 || table3.getdataListParm.parammaps.lpplantype == 5" class="content">
  285. <div class="table2">
  286. <div class="contentOperation">
  287. <p>计划内容<br>操作详情</p>
  288. </div>
  289. <div class="content-table">
  290. <el-table
  291. :key="table2.tableKey"
  292. v-loading="table2.listLoading"
  293. element-loading-text="给我一点时间"
  294. :data="table2.list"
  295. fit
  296. highlight-current-row
  297. style="width: 100%;"
  298. height="450"
  299. :row-style="rowStyle"
  300. :cell-style="cellStyle"
  301. class="elTable table-fixed"
  302. >
  303. <el-table-column label="操作序号" min-width="130px" align="center">
  304. <template slot-scope="scope">
  305. <span>{{ scope.row.sort }}</span>
  306. </template>
  307. </el-table-column>
  308. <el-table-column label="饲料名称" prop="fname" min-width="130px" align="center">
  309. <template slot-scope="scope">
  310. <span>{{ scope.row.fname }}</span>
  311. </template>
  312. </el-table-column>
  313. <el-table-column label="设计重量(KG)" prop="weight" min-width="130px" align="center">
  314. <template slot-scope="scope">
  315. <span>{{ scope.row.weight }}</span>
  316. </template>
  317. </el-table-column>
  318. </el-table>
  319. </div>
  320. </div>
  321. <div class="table3">
  322. <div class="contentOperation">
  323. <p>计划内容<br>栏舍详情</p>
  324. </div>
  325. <div class="content-table">
  326. <el-table
  327. :key="table3.tableKey"
  328. v-loading="table3.listLoading"
  329. element-loading-text="给我一点时间"
  330. :data="table3.list"
  331. height="450"
  332. fit
  333. highlight-current-row
  334. style="width: 100%;"
  335. :row-style="rowStyle"
  336. :cell-style="cellStyle"
  337. class="elTable table-fixed"
  338. >
  339. <el-table-column label=" 操作序号" min-width="130px" align="center">
  340. <template slot-scope="scope">
  341. <span>{{ scope.row.sort }}</span>
  342. </template>
  343. </el-table-column>
  344. <el-table-column label="撒料车辆" min-width="130px" align="center">
  345. <template slot-scope="scope">
  346. <span>{{ scope.row.fname }}</span>
  347. </template>
  348. </el-table-column>
  349. <el-table-column label="设计重量(KG)" min-width="130px" align="center">
  350. <template slot-scope="scope">
  351. <span>{{ scope.row.weight }}</span>
  352. </template>
  353. </el-table-column>
  354. </el-table>
  355. </div>
  356. </div>
  357. </div>
  358. <!-- 撒料计划-撒料 -->
  359. <div v-if="table3.getdataListParm.parammaps.lpplantype == 2" class="content">
  360. <div class="table3">
  361. <div class="contentOperation">
  362. <p>计划内容<br>栏舍详情</p>
  363. </div>
  364. <div class="content-table">
  365. <el-table
  366. :key="table3.tableKey"
  367. v-loading="table3.listLoading"
  368. element-loading-text="给我一点时间"
  369. :data="table3.list"
  370. height="450"
  371. fit
  372. highlight-current-row
  373. style="width: 100%;"
  374. :row-style="rowStyle"
  375. :cell-style="cellStyle"
  376. class="elTable table-fixed"
  377. >
  378. <el-table-column label=" 操作序号" min-width="130px" align="center">
  379. <template slot-scope="scope">
  380. <span>{{ scope.row.sort }}</span>
  381. </template>
  382. </el-table-column>
  383. <el-table-column label="撒料车辆" min-width="130px" align="center">
  384. <template slot-scope="scope">
  385. <span>{{ scope.row.fname }}</span>
  386. </template>
  387. </el-table-column>
  388. <el-table-column label="设计重量(KG)" min-width="130px" align="center">
  389. <template slot-scope="scope">
  390. <span>{{ scope.row.weight }}</span>
  391. </template>
  392. </el-table-column>
  393. </el-table>
  394. </div>
  395. </div>
  396. <div class="table2">
  397. <div class="contentOperation">
  398. <p>计划内容<br>操作详情</p>
  399. </div>
  400. <div class="content-table">
  401. <el-table
  402. :key="table2.tableKey"
  403. v-loading="table2.listLoading"
  404. element-loading-text="给我一点时间"
  405. :data="table2.list"
  406. fit
  407. highlight-current-row
  408. style="width: 100%;"
  409. height="450"
  410. :row-style="rowStyle"
  411. :cell-style="cellStyle"
  412. class="elTable table-fixed"
  413. >
  414. <el-table-column label="操作序号" min-width="130px" align="center">
  415. <template slot-scope="scope">
  416. <span>{{ scope.row.sort }}</span>
  417. </template>
  418. </el-table-column>
  419. <el-table-column label="栏舍名称" prop="fname" min-width="130px" align="center">
  420. <template slot-scope="scope">
  421. <span>{{ scope.row.fname }}</span>
  422. </template>
  423. </el-table-column>
  424. <el-table-column label="设计重量(KG)" prop="weight" min-width="130px" align="center">
  425. <template slot-scope="scope">
  426. <span>{{ scope.row.weight }}</span>
  427. </template>
  428. </el-table-column>
  429. </el-table>
  430. </div>
  431. </div>
  432. </div>
  433. <!-- 新生成 -->
  434. <el-dialog :title="textMap[newGeneration.dialogStatus]" :destroy-on-close="true" :visible.sync="newGeneration.dialogFormVisible" :close-on-click-modal="false" width="50%">
  435. <div class="newGeneration">
  436. <el-form ref="temp" :rules="newGeneration.rules" :model="newGeneration.temp" label-position="right" label-width="155px" style="width: 100%;margin:0 auto 50px">
  437. <el-row>
  438. <el-col :span="16">
  439. <el-form-item label="时间范围:" prop="inputDatetime">
  440. <el-date-picker v-model="newGeneration.temp.inputDatetime" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 100%;" :clearable="false" />
  441. </el-form-item>
  442. </el-col>
  443. </el-row>
  444. </el-form>
  445. <div slot="footer" class="dialog-footer" style="bottom:10px">
  446. <el-button class="cancelClose" @click="newGeneration.dialogFormVisible = false;getList()">取消</el-button>
  447. <el-button class="success" :disabled="isokDisable" @click="newGenerationData()">确认</el-button>
  448. </div>
  449. </div>
  450. </el-dialog>
  451. <!-- 历史记录 -->
  452. <el-dialog :title="textMap[historyRecord.dialogStatus]" :destroy-on-close="true" :visible.sync="historyRecord.dialogFormVisible" :close-on-click-modal="false" width="90%">
  453. <div class="historyRecord">
  454. <keep-alive>
  455. <component :is="historyRecord.myComponent" ref="historyRecord" />
  456. </keep-alive>
  457. </div>
  458. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  459. <el-button class="cancelClose" @click="historyRecord.dialogFormVisible = false; ">关闭</el-button>
  460. </div>
  461. </el-dialog>
  462. <!-- 修改计划 -->
  463. <RevisePlan :show.sync="isShowDialog" :parent-active-name="activeName" :parent-date="parentDate" />
  464. </div>
  465. </template>
  466. <script>
  467. import { GetDataByName, GetDataByNames, ExecDataByConfig } from '@/api/common'
  468. import RevisePlan from './revisePlan.vue'
  469. import { parseTime } from '@/utils/index.js'
  470. import Cookies from 'js-cookie'
  471. export default {
  472. name: 'DailyExecutionPlan',
  473. components: {
  474. RevisePlan
  475. },
  476. data() {
  477. return {
  478. requestParams: [
  479. // { name: 'getDictByName', offset: 0, pagecount: 0, params: ['牲畜父类'] }
  480. ],
  481. planTypeList: [{ lable: '预混计划', value: '4' }, { lable: '撒料计划', value: '0' }, { lable: '剩料计划', value: '3' }, { lable: '撒料计划-混料', value: '1' }, { lable: '撒料计划-撒料', value: '2' }], // 计划类型
  482. printingTypeList: [{ lable: '所有', value: '0' }, { lable: '精料', value: '1' }, { lable: '铲车', value: '2' }], // 打印类型
  483. frequencyList: [], // 班次
  484. planningDimensionList: [{ lable: '发料顺序', value: '0' }, { lable: 'TMR', value: '1' }], // 发料顺序
  485. exportTypeList: [{ lable: '投料简打', value: '0' }, { lable: '投料简打', value: '1' }], // 导出类型
  486. // 班次
  487. maxTime: {
  488. getMaxTimesParm: {
  489. name: 'getSysoptEnable',
  490. page: 1,
  491. offset: 1,
  492. pagecount: 1,
  493. returntype: 'Map',
  494. parammaps: {
  495. pastureid: Cookies.get('pastureid'),
  496. inforname: 'times'
  497. }
  498. }
  499. },
  500. table: {
  501. getdataListParm: {
  502. name: 'getDownloadedplanList',
  503. page: 1,
  504. offset: 1,
  505. pagecount: '',
  506. returntype: 'Map',
  507. parammaps: {
  508. pastureid: Cookies.get('pastureid'),
  509. barid: '',
  510. mydate: parseTime(new Date(), '{y}-{m}-{d}'),
  511. times: '',
  512. lpplantype: ''
  513. }
  514. },
  515. tableKey: 0,
  516. list: [],
  517. total: 0,
  518. listLoading: false
  519. },
  520. // 计划内容操作详情
  521. table2: {
  522. getdataListParm: {
  523. name: 'getDownloadplandtl1ListV2',
  524. page: 1,
  525. offset: 1,
  526. returntype: 'Map',
  527. parammaps: {
  528. pastureid: Cookies.get('pastureid'),
  529. date: '',
  530. id: ''
  531. }
  532. },
  533. tableKey: 0,
  534. list: [],
  535. total: 0,
  536. listLoading: false
  537. },
  538. // 计划内容 舍栏详情
  539. table3: {
  540. getdataListParm: {
  541. name: 'getDownloadplandt2ListV2',
  542. page: 1,
  543. offset: 1,
  544. returntype: 'Map',
  545. parammaps: {
  546. pastureid: Cookies.get('pastureid'),
  547. date: '',
  548. id: ''
  549. }
  550. },
  551. tableKey: 0,
  552. list: [],
  553. total: 0,
  554. listLoading: false
  555. },
  556. // 新生成
  557. newGeneration: {
  558. dialogFormVisible: false,
  559. dialogStatus: '',
  560. getdataListParm: {
  561. name: 'checkLLPIsDistribution',
  562. page: 1,
  563. offset: 1,
  564. pagecount: 1,
  565. returntype: 'Map',
  566. parammaps: {
  567. pastureid: Cookies.get('pastureid')
  568. }
  569. },
  570. temp: {},
  571. rules: {
  572. inputDatetime: [{ type: 'array', required: true, message: '必填', trigger: 'blur' }]
  573. }
  574. },
  575. historyRecord: {
  576. dialogFormVisible: false,
  577. dialogStatus: '',
  578. myComponent: null
  579. },
  580. textMap: {
  581. newGeneration: '新生成',
  582. historyRecord: '历史记录',
  583. revisePlan: '修改计划'
  584. },
  585. isokDisable: false,
  586. requestParam: {},
  587. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  588. cellStyle: { padding: 0 + 'px' },
  589. isShowDialog: false,
  590. activeName: '栏舍配方',
  591. parentDate: ''
  592. }
  593. },
  594. created() {
  595. this.parentDate = this.table.getdataListParm.parammaps.mydate
  596. this.getList()
  597. this.getDownList()
  598. this.getIsDisplay()
  599. },
  600. mounted() {
  601. this.table.getdataListParm.parammaps.mydate = parseTime(new Date(), '{y}-{m}-{d}')
  602. },
  603. methods: {
  604. getIsDisplay() {
  605. GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
  606. console.log(response.data.list[0].inforvalue)
  607. if (response.data.list[0].inforvalue == 1) {
  608. this.frequencyList = [{ id: '1', name: '第一班' }]
  609. } else if (response.data.list[0].inforvalue == 2) {
  610. this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }]
  611. } else if (response.data.list[0].inforvalue == 3) {
  612. this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }]
  613. } else if (response.data.list[0].inforvalue == 4) {
  614. this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }, { id: '4', name: '第四班' }]
  615. }
  616. })
  617. },
  618. getDownList() {
  619. GetDataByNames(this.requestParams).then(response => {
  620. // this.livestockTypeList = response.data.getDictByName.list
  621. })
  622. },
  623. // -------------------日执行计划-----------------------------
  624. handleBefore() {
  625. if (this.table.getdataListParm.parammaps.mydate !== '' && this.table.getdataListParm.parammaps.mydate !== null) {
  626. this.table.getdataListParm.parammaps.mydate = new Date(this.table.getdataListParm.parammaps.mydate)
  627. var start = new Date(this.table.getdataListParm.parammaps.mydate.setDate(this.table.getdataListParm.parammaps.mydate.getDate() - 1))
  628. // var start = this.table.getdataListParm.parammaps.mydate - 1
  629. this.table.getdataListParm.parammaps.mydate = parseTime(start, '{y}-{m}-{d}')
  630. // this.$forceUpdate()
  631. this.getList()
  632. }
  633. },
  634. handleNext() {
  635. if (this.table.getdataListParm.parammaps.mydate !== '' && this.table.getdataListParm.parammaps.mydate !== null) {
  636. this.table.getdataListParm.parammaps.mydate = new Date(this.table.getdataListParm.parammaps.mydate)
  637. var stop = new Date(this.table.getdataListParm.parammaps.mydate.setDate(this.table.getdataListParm.parammaps.mydate.getDate() + 1))
  638. this.table.getdataListParm.parammaps.mydate = parseTime(stop, '{y}-{m}-{d}')
  639. this.getList()
  640. }
  641. },
  642. getList() {
  643. this.table.listLoading = true
  644. GetDataByName(this.table.getdataListParm).then(response => {
  645. console.log('table数据', response.data.list)
  646. if (response.data.list !== null) {
  647. this.table.list = response.data.list
  648. this.table.pageNum = response.data.pageNum
  649. this.table.pageSize = response.data.pageSize
  650. this.table.total = response.data.total
  651. console.log('计划类型', response.data.list[0].lpplantype)
  652. if (response.data.list[0].lpplantype == 0) {
  653. // 撒料
  654. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  655. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  656. this.table2.getdataListParm.parammaps.useinbartype = ''
  657. this.table3.getdataListParm.parammaps.useinbartype = ''
  658. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  659. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  660. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  661. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  662. this.table3.getdataListParm.parammaps.lpplantype = response.data.list[0].lpplantype
  663. this.getList2()
  664. this.getList3()
  665. } else if (response.data.list[0].lpplantype == 1) {
  666. // 撒料计划-混料
  667. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  668. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  669. this.table2.getdataListParm.parammaps.useinbartype = ''
  670. this.table3.getdataListParm.parammaps.useinbartype = ''
  671. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  672. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  673. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  674. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  675. this.table3.getdataListParm.parammaps.lpplantype = response.data.list[0].lpplantype
  676. this.getList2()
  677. this.getList3()
  678. } else if (response.data.list[0].lpplantype == 2) {
  679. // 撒料计划-撒料
  680. this.table2.getdataListParm.name = 'getDownloadplandt2ListV2'
  681. this.table3.getdataListParm.name = 'getDownloadplandtl1ListV2'
  682. this.table2.getdataListParm.parammaps.useinbartype = ''
  683. this.table3.getdataListParm.parammaps.useinbartype = ''
  684. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  685. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  686. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  687. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  688. this.table3.getdataListParm.parammaps.lpplantype = response.data.list[0].lpplantype
  689. this.getList2()
  690. this.getList3()
  691. } else if (response.data.list[0].lpplantype == 3) {
  692. // 剩料
  693. this.table2.getdataListParm.name = 'getDownloadplandt2ListV2'
  694. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  695. this.table2.getdataListParm.parammaps.useinbartype = 0
  696. this.table3.getdataListParm.parammaps.useinbartype = 1
  697. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  698. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  699. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  700. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  701. this.table3.getdataListParm.parammaps.lpplantype = response.data.list[0].lpplantype
  702. this.getList2()
  703. this.getList3()
  704. } else if (response.data.list[0].lpplantype == 4) {
  705. // 预混
  706. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  707. this.table2.getdataListParm.parammaps.useinbartype = ''
  708. this.table3.getdataListParm.parammaps.useinbartype = ''
  709. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  710. this.table3.getdataListParm.parammaps.lpplantype = response.data.list[0].lpplantype
  711. this.getList2()
  712. } else if (response.data.list[0].lpplantype == 5) {
  713. // 预称重计划
  714. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  715. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  716. this.table2.getdataListParm.parammaps.useinbartype = ''
  717. this.table3.getdataListParm.parammaps.useinbartype = ''
  718. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  719. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  720. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  721. this.table3.getdataListParm.parammaps.id = response.data.list[0].id
  722. this.table3.getdataListParm.parammaps.lpplantype = response.data.list[0].lpplantype
  723. this.getList2()
  724. this.getList3()
  725. }
  726. } else {
  727. this.table.list = []
  728. this.table3.getdataListParm.parammaps.lpplantype = ''
  729. this.table2.getdataListParm.parammaps.id = ''
  730. this.table3.getdataListParm.parammaps.id = ''
  731. // this.getList2()
  732. // this.getList3()
  733. this.table2.list = []
  734. this.table3.list = []
  735. }
  736. setTimeout(() => {
  737. this.table.listLoading = false
  738. }, 100)
  739. })
  740. },
  741. lpplantype: function(cellValue) {
  742. if (cellValue.lpplantype == 0) {
  743. return '撒料计划'
  744. } else if (cellValue.lpplantype == 1) {
  745. return '撒料计划-混料'
  746. } else if (cellValue.lpplantype == 2) {
  747. return '撒料计划-撒料'
  748. } else if (cellValue.lpplantype == 3) {
  749. return '剩料计划'
  750. } else if (cellValue.lpplantype == 4) {
  751. return '预混计划'
  752. } else if (cellValue.lpplantype == 5) {
  753. return '预称重计划'
  754. }
  755. },
  756. changeDate(val) {
  757. console.log('选择了日期', val)
  758. this.getList()
  759. this.getList2()
  760. this.getList3()
  761. },
  762. changePlanType(val) {
  763. console.log('选择了计划类型', val)
  764. this.getList()
  765. this.getList2()
  766. this.getList3()
  767. },
  768. changeFrequency(val) {
  769. console.log('选择了班次', val)
  770. this.getList()
  771. this.getList2()
  772. this.getList3()
  773. },
  774. // 日执行计划行点击
  775. tableRowClick(row, column, event) {
  776. console.log(row, column, event)
  777. console.log('点击计划类型', row.lpplantype)
  778. // 撒料计划0/撒料计划-混料1/撒料计划-撒料2/剩料计划3/预混计划4/预称重计划5
  779. if (row.lpplantype == 0) {
  780. // 撒料
  781. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  782. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  783. this.table2.getdataListParm.parammaps.useinbartype = ''
  784. this.table3.getdataListParm.parammaps.useinbartype = ''
  785. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  786. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  787. this.table2.getdataListParm.parammaps.id = row.id
  788. this.table3.getdataListParm.parammaps.id = row.id
  789. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  790. this.getList2()
  791. this.getList3()
  792. } else if (row.lpplantype == 1) {
  793. // 撒料计划-混料
  794. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  795. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  796. this.table2.getdataListParm.parammaps.useinbartype = ''
  797. this.table3.getdataListParm.parammaps.useinbartype = ''
  798. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  799. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  800. this.table2.getdataListParm.parammaps.id = row.id
  801. this.table3.getdataListParm.parammaps.id = row.id
  802. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  803. this.getList2()
  804. this.getList3()
  805. } else if (row.lpplantype == 2) {
  806. // 撒料计划-撒料
  807. this.table2.getdataListParm.name = 'getDownloadplandt2ListV2'
  808. this.table3.getdataListParm.name = 'getDownloadplandtl1ListV2'
  809. this.table2.getdataListParm.parammaps.useinbartype = ''
  810. this.table3.getdataListParm.parammaps.useinbartype = ''
  811. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  812. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  813. this.table2.getdataListParm.parammaps.id = row.id
  814. this.table3.getdataListParm.parammaps.id = row.id
  815. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  816. this.getList2()
  817. this.getList3()
  818. console.log(this.table3.getdataListParm.parammaps.lpplantype)
  819. } else if (row.lpplantype == 3) {
  820. // 剩料
  821. this.table2.getdataListParm.name = 'getDownloadplandt2ListV2'
  822. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  823. this.table2.getdataListParm.parammaps.useinbartype = 0
  824. this.table3.getdataListParm.parammaps.useinbartype = 1
  825. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  826. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  827. this.table2.getdataListParm.parammaps.id = row.id
  828. this.table3.getdataListParm.parammaps.id = row.id
  829. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  830. this.getList2()
  831. this.getList3()
  832. } else if (row.lpplantype == 4) {
  833. // 预混
  834. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  835. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  836. this.table2.getdataListParm.parammaps.useinbartype = ''
  837. this.table3.getdataListParm.parammaps.useinbartype = ''
  838. this.table2.getdataListParm.parammaps.id = row.id
  839. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  840. this.getList2()
  841. } else if (row.lpplantype == 5) {
  842. // 预称重计划
  843. this.table2.getdataListParm.name = 'getDownloadplandtl1ListV2'
  844. this.table3.getdataListParm.name = 'getDownloadplandt2ListV2'
  845. this.table2.getdataListParm.parammaps.useinbartype = ''
  846. this.table3.getdataListParm.parammaps.useinbartype = ''
  847. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  848. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  849. this.table2.getdataListParm.parammaps.id = row.id
  850. this.table3.getdataListParm.parammaps.id = row.id
  851. this.table3.getdataListParm.parammaps.lpplantype = row.lpplantype
  852. this.getList2()
  853. this.getList3()
  854. }
  855. this.$forceUpdate()
  856. },
  857. // 计划内容操作详情
  858. getList2() {
  859. this.table2.listLoading = true
  860. this.table2.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  861. GetDataByName(this.table2.getdataListParm).then(response => {
  862. console.log('table数据', response.data.list)
  863. if (response.data.list !== null) {
  864. this.table2.list = response.data.list
  865. // 撒料计划0/撒料计划-混料1/撒料计划-撒料2/剩料计划3/预混计划4
  866. if (this.table3.getdataListParm.parammaps.lpplantype == 0 || this.table3.getdataListParm.parammaps.lpplantype == 1 || this.table3.getdataListParm.parammaps.lpplantype == 4) {
  867. const arr = []
  868. var a = 0
  869. let b = this.table2.list[0].sort
  870. let c = 0
  871. for (let i = 0; i < this.table2.list.length; i++) {
  872. if (b !== parseInt(this.table2.list[i].sort)) {
  873. b = this.table2.list[i].sort
  874. arr.push({ 'sort': '小计', 'weight': a.toFixed(2) })
  875. a = 0
  876. }
  877. a = a + parseFloat(this.table2.list[i].weight)
  878. c = c + parseFloat(this.table2.list[i].weight)
  879. arr.push(this.table2.list[i])
  880. }
  881. arr.push({ 'sort': '小计', 'weight': a })
  882. arr.push({ 'sort': '总计', 'weight': c.toFixed(2) })
  883. this.table2.list = arr
  884. }
  885. if (this.table3.getdataListParm.parammaps.lpplantype == 2) {
  886. const arr = []
  887. var aa = 0
  888. let bb = this.table2.list[0].sort
  889. let cc = 0
  890. for (let i = 0; i < this.table2.list.length; i++) {
  891. if (bb !== parseInt(this.table2.list[i].sort)) {
  892. bb = this.table2.list[i].sort
  893. aa = 0
  894. }
  895. aa = aa + parseFloat(this.table2.list[i].weight)
  896. cc = cc + parseFloat(this.table2.list[i].weight)
  897. arr.push(this.table2.list[i])
  898. }
  899. arr.push({ 'sort': '总计', 'weight': cc.toFixed(2) })
  900. this.table2.list = arr
  901. console.log('this.table2.list', this.table2.list)
  902. console.log(this.table3.getdataListParm.parammaps.lpplantype)
  903. }
  904. console.log(this.table2.list)
  905. this.table2.pageNum = response.data.pageNum
  906. this.table2.pageSize = response.data.pageSize
  907. this.table2.total = response.data.total
  908. } else {
  909. this.table2.list = []
  910. }
  911. setTimeout(() => {
  912. this.table2.listLoading = false
  913. }, 100)
  914. })
  915. },
  916. // 计划内容栏舍详情
  917. getList3() {
  918. this.table3.listLoading = true
  919. this.table3.getdataListParm.parammaps.date = this.table.getdataListParm.parammaps.mydate
  920. GetDataByName(this.table3.getdataListParm).then(response => {
  921. console.log('table数据', response.data.list)
  922. if (response.data.list !== null) {
  923. this.table3.list = response.data.list
  924. if (this.table3.getdataListParm.parammaps.lpplantype == 0) {
  925. const arr = []
  926. var a = 0
  927. let b = this.table3.list[0].sort
  928. let c = 0
  929. for (let i = 0; i < this.table3.list.length; i++) {
  930. if (b !== parseInt(this.table3.list[i].sort)) {
  931. b = this.table3.list[i].sort
  932. a = 0
  933. }
  934. a = a + parseFloat(this.table3.list[i].weight)
  935. c = c + parseFloat(this.table3.list[i].weight)
  936. arr.push(this.table3.list[i])
  937. }
  938. arr.push({ 'sort': '总计', 'weight': c.toFixed(2) })
  939. this.table3.list = arr
  940. }
  941. this.table3.pageNum = response.data.pageNum
  942. this.table3.pageSize = response.data.pageSize
  943. this.table3.total = response.data.total
  944. } else {
  945. this.table3.list = []
  946. }
  947. setTimeout(() => {
  948. this.table3.listLoading = false
  949. }, 100)
  950. })
  951. },
  952. // 新生成
  953. handleCreate() {
  954. console.log('点击了新生成')
  955. this.newGeneration.temp = {}
  956. this.newGeneration.dialogStatus = 'newGeneration'
  957. this.newGeneration.dialogFormVisible = true
  958. GetDataByName(this.newGeneration.getdataListParm).then(response => {
  959. console.log('table数据', response.data.list)
  960. if (response.data.list !== null) {
  961. if (response.data.list[0].vmsg == '存在未分配') {
  962. this.$message({ type: 'warning', message: '撒料计划中存在未分配完栏舍,建议及时进行分配', duration: 2000 })
  963. }
  964. }
  965. })
  966. },
  967. DateDiff(sDate1, sDate2) {
  968. console.log(sDate1, sDate2)
  969. var aDate, oDate1, oDate2, iDays
  970. aDate = sDate1.split('-')
  971. oDate1 = new Date(aDate[0], aDate[1], aDate[2]) // 转换为12-18-2006格式
  972. aDate = sDate2.split('-')
  973. oDate2 = new Date(aDate[0], aDate[1], aDate[2])
  974. iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) // 把相差的毫秒数转换为天数
  975. this.newGeneration.temp.days = parseInt(iDays) + 1
  976. return iDays
  977. },
  978. newGenerationData() {
  979. console.log('点击了新生成保存', this.newGeneration.temp)
  980. this.isokDisable = true
  981. setTimeout(() => {
  982. this.isokDisable = false
  983. }, 5000)
  984. this.$refs['temp'].validate(valid => {
  985. if (valid) {
  986. this.newGeneration.temp.startTime = parseTime(this.newGeneration.temp.inputDatetime[0], '{y}-{m}-{d}')
  987. this.newGeneration.temp.stopTime = parseTime(this.newGeneration.temp.inputDatetime[1], '{y}-{m}-{d}')
  988. this.DateDiff(this.newGeneration.temp.stopTime, this.newGeneration.temp.startTime)
  989. this.requestParam = {}
  990. this.requestParam.common = { 'returnmap': '0' }
  991. this.requestParam.data = []
  992. this.requestParam.data[0] = { 'name': 'checkDLPIsStart', 'type': 'v', 'parammaps': {
  993. pastureid: Cookies.get('pastureid'),
  994. startTime: this.newGeneration.temp.startTime
  995. }}
  996. this.requestParam.data[1] = { 'name': 'checkPreMixStorage', 'type': 'e', 'parammaps': {
  997. pastureid: Cookies.get('pastureid'),
  998. days: this.newGeneration.temp.days
  999. }}
  1000. this.requestParam.data[2] = { 'name': 'createdownloadedplan', 'type': 'e', 'parammaps': {
  1001. pastureid: Cookies.get('pastureid'),
  1002. startTime: this.newGeneration.temp.startTime,
  1003. stopTime: this.newGeneration.temp.stopTime
  1004. }}
  1005. ExecDataByConfig(this.requestParam).then(response => {
  1006. console.log('新生成保存发送参数', this.requestParam)
  1007. if (response.msg === 'fail') {
  1008. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1009. } else {
  1010. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1011. this.newGeneration.dialogFormVisible = false
  1012. this.getList()
  1013. }
  1014. })
  1015. }
  1016. })
  1017. },
  1018. // 配方模板
  1019. handleRecipeemplate() {
  1020. console.log('点击了配方模板,页面待画')
  1021. },
  1022. handleShedFormula() {
  1023. console.log('点击了栏舍配方,页面待画')
  1024. },
  1025. handlePremixedPlan() {
  1026. console.log('点击了预混计划,页面待画')
  1027. },
  1028. handleMaterialPlan() {
  1029. console.log('点击了撒料计划,页面待画')
  1030. },
  1031. handleRevisePlan(data) {
  1032. console.log('点击了修改计划1', this.activeName)
  1033. this.isShowDialog = true
  1034. this.activeName = '栏舍配方'
  1035. console.log('点击了修改计划2', this.activeName)
  1036. },
  1037. createNewDomain(domainForm) {
  1038. // createDomain(domainForm).then(res => {
  1039. // // do something
  1040. // }).catch(err => {
  1041. // // do something
  1042. // console.log('err', err)
  1043. // })
  1044. this.isShowDialog = false
  1045. },
  1046. handleHistoryRecord() {
  1047. console.log('点击了历史记录,页面待画')
  1048. this.historyRecord.dialogStatus = 'historyRecord'
  1049. this.historyRecord.dialogFormVisible = true
  1050. const vue = this
  1051. var myComponent = () => import('./historyRecord.vue')
  1052. return vue.historyRecord.myComponent = myComponent
  1053. },
  1054. handleExport() {
  1055. console.log('点击了导出')
  1056. }
  1057. }
  1058. }
  1059. </script>
  1060. <style lang="scss" scoped>
  1061. .operation{margin-bottom:10px;}
  1062. .search{margin-top:10px;}
  1063. .table{margin-top:10px;}
  1064. .template{
  1065. background: #fff;
  1066. position: relative;
  1067. }
  1068. .table2{
  1069. float: left;width: 49%;margin-right: 1%;background: red;
  1070. background: #fff;
  1071. position: relative;
  1072. .content-table{margin-top: 70px;}
  1073. }
  1074. .table3{
  1075. float: left;
  1076. width: 49%;
  1077. background: #fff;
  1078. position: relative;
  1079. .content-table{margin-top: 70px;}
  1080. }
  1081. </style>