index.vue 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670
  1. <template>
  2. <div class="app-container">
  3. <div class="operation">
  4. <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float:left;" @click="handleCreate">新增车次
  5. </el-button>
  6. <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" style="float:left;" @click="handleReduceTrains">减少车次</el-button>
  7. <el-button v-if="isRoleEdit" class="success" style="float: left;" @click="handleCheck">校验</el-button>
  8. <el-button v-if="isRoleEdit" class="success" icon="el-icon-download" style="float:left;" @click="handleAutomaticGeneration">自动生成</el-button>
  9. <el-button v-if="isOrder && isRoleEdit" icon="el-icon-sort" style="float: left;" class="success" @click="handleChangeOrder">更改顺序</el-button>
  10. <div v-else style="float: left;margin-left: 10px;">
  11. <el-button v-if="isRoleEdit" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存 </el-button>
  12. <el-button v-if="isRoleEdit" icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">取消</el-button>
  13. </div>
  14. <el-button v-if="isRoleEdit" class="success" icon="el-icon-open" style="float: left;" @click="handleTakeEffect"> 生效</el-button>
  15. <el-button v-if="isRoleEdit" class="danger" icon="el-icon-turn-off" style="float: left;" @click="handleDisable"> 禁用</el-button>
  16. <el-button class="success" icon="el-icon-time" style="float:right;" @click="handleHistoryRecord">历史记录 </el-button>
  17. </div>
  18. <div class="search">
  19. <el-select v-model="table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;" @change="changeFrequency">
  20. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  21. </el-select>
  22. </div>
  23. <div class="table">
  24. <el-table
  25. id="table"
  26. :key="table.tableKey"
  27. ref="table"
  28. v-loading="table.listLoading"
  29. element-loading-text="给我一点时间"
  30. :data="table.list"
  31. border
  32. highlight-current-row
  33. style="width: 100%;"
  34. :height="height"
  35. :row-style="rowStyle"
  36. :cell-style="cellStyle"
  37. class="elTable"
  38. row-key="id"
  39. @selection-change="handleSelect"
  40. >
  41. <el-table-column type="selection" width="50" />
  42. <el-table-column label="车次" width="50px" align="center" class-name="small-padding fixed-width" fixed="">
  43. <template slot-scope="scope">
  44. <span>{{ scope.row.sort }}</span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="TMR编号" width="110px" align="center" class-name="small-padding fixed-width" fixed="left">
  48. <template slot-scope="scope">
  49. <span>{{ scope.row.tmrname }}</span>
  50. </template>
  51. </el-table-column>
  52. <el-table-column label="描述" width="110px" align="center">
  53. <template slot-scope="scope">
  54. <span>{{ scope.row.display }}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="生效" width="70px" align="center">
  58. <template slot-scope="scope">
  59. <el-switch v-model="scope.row.sel" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="班次" width="65px" align="center">
  63. <template slot-scope="scope">
  64. <span>{{ scope.row.timesstr }}</span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="时间" width="55px" align="center">
  68. <template slot-scope="scope">
  69. <span>{{ scope.row.begintime }}</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column label="最大重量" width="75px" align="center">
  73. <template slot-scope="scope">
  74. <span>{{ scope.row.maxweight }}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="合计重量" width="80px" align="center">
  78. <template slot-scope="scope">
  79. <span>{{ scope.row.sumweight }}</span>
  80. </template>
  81. </el-table-column>
  82. <el-table-column label="模板配方" width="90px" align="center">
  83. <template slot-scope="scope">
  84. <span>{{ scope.row.ftname }}</span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column v-show="isInforvalue" label="是否提前小料拆分" width="70px" align="center">
  88. <template slot-scope="scope">
  89. <el-switch v-model="scope.row.issplit" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
  90. </template>
  91. </el-table-column>
  92. <el-table-column label="撒料" min-width="250px" align="left" header-align="center">
  93. <template slot-scope="scope">
  94. <div v-for="element in scope.row.arrList" :key="element.name" class="list">
  95. <el-tooltip placement="top" :open-delay="1000">
  96. <div slot="content">
  97. <div> 栏舍全称:{{ element.barname }} </div>
  98. <div> 饲料重量:{{ element.weight }} </div>
  99. <div> 撒料车:{{ element.tmrname }} </div>
  100. </div>
  101. <div :style="{'background':element.background}" class="tmrname">{{ element.barname }}</div>
  102. </el-tooltip>
  103. </div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="操作" align="center" width="70" class-name="small-padding fixed-width" fixed="right">
  107. <template slot-scope="{row}">
  108. <el-button v-if="isRoleEdit" class="miniSuccess" icon="el-icon-edit-outline" @click="handleUpdate(row)" />
  109. <span v-if="isRoleEdit" class="centerSpan">|</span>
  110. <el-button v-if="isRoleEdit" class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" />
  111. </template>
  112. </el-table-column>
  113. </el-table>
  114. <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ table.total }}条</span>
  115. </div>
  116. <!-- 自动生成 -->
  117. <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="automaticGeneration.dialogFormVisible" :close-on-click-modal="false" width="30%">
  118. <template slot="title">
  119. <div class="avue-crud__dialog__header">
  120. <span class="el-dialog__title">
  121. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  122. {{ textMap[automaticGeneration.dialogStatus] }}
  123. </span>
  124. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  125. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  126. <svg-icon v-else icon-class="fullscreen" />
  127. </div>
  128. </div>
  129. </template>
  130. <div class="app-automaticGeneration" style="margin: 0 auto;">
  131. <div style="width: 210px;margin:60px auto 120px;font-weight: 16px;">
  132. 请选择自动生成方式:<br>
  133. 清空计划并生成新计划;<br>
  134. 当前计划基础上继续生成计划;<br>
  135. </div>
  136. <div slot="footer" class="dialog-footer">
  137. <el-button style="right:240px;" class="cancelClose" @click="automaticGeneration.dialogFormVisible = false;">关闭</el-button>
  138. <el-button style="right:130px;" class="save" :disabled="isokDisable" @click="continueData(0)">继续生成 </el-button>
  139. <el-button style="right:20px;" class="save" :disabled="isokDisable" @click="continueData(1)">重新生成 </el-button>
  140. </div>
  141. </div>
  142. </el-dialog>
  143. <!-- 历史记录 -->
  144. <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="historyRecord.dialogFormVisible" :close-on-click-modal="false" width="90%">
  145. <template slot="title">
  146. <div class="avue-crud__dialog__header">
  147. <span class="el-dialog__title">
  148. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  149. {{ textMap[historyRecord.dialogStatus] }}
  150. </span>
  151. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  152. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  153. <svg-icon v-else icon-class="fullscreen" />
  154. </div>
  155. </div>
  156. </template>
  157. <div class="historyRecord">
  158. <keep-alive>
  159. <component :is="historyRecord.myComponent" ref="historyRecord" />
  160. </keep-alive>
  161. </div>
  162. <div slot="footer" class="dialog-footer">
  163. <el-button class="cancelClose cancelClose1" @click="historyRecord.dialogFormVisible = false; ">关闭</el-button>
  164. </div>
  165. </el-dialog>
  166. <!-- 新增、编辑 -->
  167. <el-dialog :fullscreen="dialogFull" :destroy-on-close="true" :visible.sync="create.dialogFormVisible" :before-close="close" :close-on-click-modal="false" width="90%">
  168. <template slot="title">
  169. <div class="avue-crud__dialog__header">
  170. <span class="el-dialog__title">
  171. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px" />
  172. {{ textMap[create.dialogStatus] }}
  173. </span>
  174. <div class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
  175. <svg-icon v-if="dialogFull" icon-class="exit-fullscreen" />
  176. <svg-icon v-else icon-class="fullscreen" />
  177. </div>
  178. </div>
  179. </template>
  180. <div class="create">
  181. <el-form ref="temp" :rules="create.rules" :model="create.temp" label-position="right" label-width="135px" style="width: 100%;margin:0 auto 10px;">
  182. <el-row>
  183. <el-col :span="8">
  184. <el-form-item label="生效:" prop="sel">
  185. <el-switch v-model="create.temp.sel" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
  186. </el-form-item>
  187. </el-col>
  188. <el-col :span="8">
  189. <el-form-item label="TMR编号:" prop="tmrid2">
  190. <el-select v-model="create.temp.tmrid2" style="width: 100%;" placeholder="TMR编号" @change="changeTMRNumber">
  191. <!-- <el-option v-for="item in equipmentList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" /> -->
  192. <el-option v-for="item in equipmentList" :key="item.id" :label="`${item.tclassname}/${item.eqcode}`" :value="item.id" />
  193. </el-select>
  194. </el-form-item>
  195. </el-col>
  196. <el-col :span="8">
  197. <el-form-item label="班次:" prop="times">
  198. <el-select v-model="create.temp.times" :disabled="create.list2.length>0" placeholder="班次" style="width:100%;" @change="changeTimes">
  199. <el-option v-for="item in frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  200. </el-select>
  201. </el-form-item>
  202. </el-col>
  203. </el-row>
  204. <el-row>
  205. <el-col :span="8">
  206. <el-form-item label="提前小料拆分:" prop="issplit">
  207. <el-switch v-model="create.temp.issplit" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="8">
  211. <el-form-item label="时间:" prop="begintime">
  212. <el-time-picker v-model="create.temp.begintime" style="width: 100%;" :clearable="false" type="datetime" placeholder="时间" format="HH:mm" value-format="HH:mm" />
  213. </el-form-item>
  214. </el-col>
  215. <el-col :span="8">
  216. <el-form-item label="模板配方:" prop="ftid">
  217. <el-select v-model="create.temp.ftid" :disabled="create.list2.length>0" placeholder="模板配方" style="width:100%;" @change="changeTemplateFormulation">
  218. <el-option v-for="item in templateFormulationList" :key="item.id" :label="item.tname" :value="item.id" />
  219. </el-select>
  220. </el-form-item>
  221. </el-col>
  222. </el-row>
  223. <el-row>
  224. <el-col :span="8">
  225. <el-form-item label="描述:" prop="display">
  226. <el-input v-model="create.temp.display" type="textarea" :autosize="{ minRows: 1.3, maxRows: 4}" placeholder="描述" maxlength="255" style="width: 100%;" />
  227. </el-form-item>
  228. </el-col>
  229. </el-row>
  230. </el-form>
  231. <div v-if="create.dialogStatus !=='update' && !isDispaly" slot="footer" class="dialog-footer">
  232. <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">关闭</el-button>
  233. <el-button v-if="create.dialogStatus==='create'" class="save" :disabled="isokDisable" @click="distributionAndSpreading()">分配撒料</el-button>
  234. </div>
  235. <!-- 栏舍 -->
  236. <div v-if="create.dialogStatus =='update' || isDispaly" class="bottom" style="border-top: 1px solid #009C69;">
  237. <el-row>
  238. <el-col :span="20">
  239. <div class="fenceHouse">
  240. <ul v-loading="create.listLoadingTimes" class="fenceHouseList">
  241. <li v-for="element in create.list1" :key="element.arrid">
  242. <span v-if="element.isShowTitle" class="fenceHouseTitle">{{ element.ftname }}:</span>
  243. <div v-for="item in element.arrList" :key="item.id" class="colorBlock">
  244. <div style="position: relative;">
  245. <el-tooltip placement="top" style="height: 18px;line-height: 18px;" :style="{'background':item.background}">
  246. <div slot="content">{{ item.barname }}</div>
  247. <div class="barname">
  248. <span style="float: left;width: 70px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ item.barname }}</span>
  249. <button style="background: red;float: right;color: #fff;width: 18px;font-size: 18px;border: none;text-align: center;" :disabled="isokDisable" @click="clickBar(item)">√</button>
  250. </div>
  251. </el-tooltip>
  252. <div class="barWeight" :style="{ background: 'rgba('+item.background2+ ',0.1)' }"> {{ item.weight }} </div>
  253. </div>
  254. </div>
  255. </li>
  256. </ul>
  257. </div>
  258. </el-col>
  259. <el-col :span="4">
  260. <div style="text-align: center;height: 100px;margin-top: 40px;">
  261. <div class="maxweight" style="line-height:20px;"><b>最大重量:</b>{{ create.temp.maxweight }} (KG)</div>
  262. <div class="sumweight" style="line-height:20px;margin-top: 10px;"><b>合计重量:</b>{{ create.temp.sumweight }} (KG) </div>
  263. </div>
  264. </el-col>
  265. </el-row>
  266. <!-- 撒料 -->
  267. <div class="spreadingMaterial">
  268. <div>撒料:</div>
  269. <div class="spreadingMaterialList">
  270. <!-- 注释内容后续版本更 -->
  271. <draggable
  272. :disabled="isDropState"
  273. id="1"
  274. data-source="juju"
  275. :list="create.list2"
  276. class="list-group1"
  277. draggable=".item"
  278. group="a"
  279. animation="500"
  280. force-fallback="true"
  281. :move="move1"
  282. @change="changeLog1"
  283. @start="start1"
  284. @end="end1(create.temp)"
  285. >
  286. <!-- 注释内容后续版本更 -->
  287. <div v-for="element in create.list2" :key="element.name" class="list-group-item2 item">
  288. <div class="arr-l" :style="{'background':element.tbackground}">
  289. <div class="arr-l-t">
  290. <div class="arr-l-t-t" />
  291. <el-select
  292. v-model="element.tmrid"
  293. placeholder="撒料设备"
  294. class="arr-l-t-b el-icon-arrow-down"
  295. @change="(value)=> {changeEquipment(value, element.fttype,element.id)}"
  296. >
  297. <el-option
  298. v-for="item in equipmentList"
  299. :key="item.id"
  300. :label="item.tname"
  301. :value="item.id"
  302. />
  303. </el-select>
  304. </div>
  305. <div class="arr-l-b">
  306. <el-tooltip placement="top" class="list-group-item1 item" style="height: 18px;line-height: 18px;">
  307. <div slot="content">{{ element.tmrname }}</div>
  308. <div class="tmrname">{{ element.tmrname }}</div>
  309. </el-tooltip>
  310. </div>
  311. <div v-if="element.fttype==0" style="background: #009C69;position:absolute;bottom: 0;left: 0;">补</div>
  312. </div>
  313. <div class="arr-r">
  314. <div class="arr-r-l">
  315. <el-tooltip placement="top">
  316. <div slot="content">{{ element.barname }}</div>
  317. <div class="barname">{{ element.barname }}</div>
  318. </el-tooltip>
  319. </div>
  320. <div class="arr-r-c">-</div>
  321. <div class="arr-r-r">
  322. <el-tooltip placement="top">
  323. <div slot="content">{{ element.weight }}</div>
  324. <input
  325. ref="weight"
  326. v-model="element.weight"
  327. :autofocus="element.focusState"
  328. type="number"
  329. placeholder="重量"
  330. step="0.01"
  331. class="filter-item2"
  332. style="display: inline-block;height:25px;padding:4px 4px 4px 0;text-align:right;font-size:12px;width: 95%;border: 1px solid #e6e6e6;"
  333. @keyup.enter="$event.target.blur"
  334. @focus="focusWeight"
  335. @blur="blurWeight(element)"
  336. >
  337. </el-tooltip>
  338. </div>
  339. </div>
  340. <div class="arr-t" :style="{'background':element.background}">
  341. <i class="el-icon-close" style="position: absolute;right: 0;" @click="handleFLDelete(element)" />
  342. </div>
  343. </div>
  344. <!-- 注释内容后续版本更 -->
  345. </draggable>
  346. <!-- 注释内容后续版本更 -->
  347. </div>
  348. </div>
  349. <div slot="footer" class="dialog-footer" style="height: 55px;">
  350. <el-button class="cancelClose" :disabled="isokDisable" @click="close()" style="top:40px;">关闭</el-button>
  351. <el-button class="save" :disabled="isokDisable" @click="updateData()" style="top:40px;">确认</el-button>
  352. </div>
  353. </div>
  354. </div>
  355. </el-dialog>
  356. <!-- 校验 -->
  357. <el-dialog :title="textMap[check.dialogStatus]" :destroy-on-close="true" :visible.sync="check.dialogFormVisible" :close-on-click-modal="false" width="30%">
  358. <div class="check">
  359. <p v-if="check.temp.isDistribution == 0">当前有未分配栏舍,未分配栏舍如下:</p>
  360. <p v-else>已分配完:当前栏舍已分配完善</p>
  361. <!-- {{ check.temp }} -->
  362. <div v-for="(item,index) in check.temp.ftlist" :key="index">
  363. <b v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">{{item.ftname}}:</b>
  364. <span v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">
  365. <span v-for="(item2,index2) in item.arrList" :key="index2">
  366. {{item2.barname}}
  367. </span>
  368. </span>
  369. </div>
  370. </div>
  371. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  372. <el-button class="save" @click="check.dialogFormVisible=false;">确认</el-button>
  373. </div>
  374. </el-dialog>
  375. </div>
  376. </template>
  377. <script>
  378. import Cookies from 'js-cookie'
  379. import draggable from 'vuedraggable'
  380. import Sortable from 'sortablejs'
  381. import { checkButtons, ExecDataByConfig, postJson } from '@/api/common'
  382. import { MessageBox } from 'element-ui'
  383. export default {
  384. components: {
  385. draggable
  386. },
  387. data() {
  388. return {
  389. isRoleEdit: [],
  390. rowStyle: { maxHeight: 25 + 'px', height: 25 + 'px' },
  391. cellStyle: { padding: 0 + 'px' },
  392. height: document.body.clientHeight - 220, // table高度
  393. table: {
  394. getdataListParm: {
  395. page: 1,
  396. offset: 1,
  397. pagecount: 0,
  398. returntype: 'Map',
  399. parammaps: {
  400. pastureid: Cookies.get('pastureid'),
  401. times: 1,
  402. refresh: 1
  403. }
  404. },
  405. tableKey: 0,
  406. list: [],
  407. total: 0,
  408. listLoading: false
  409. },
  410. frequencyList: [], // 班次
  411. maxTime: {
  412. getMaxTimesParm: {
  413. name: 'getSysoptEnable',
  414. page: 1,
  415. offset: 1,
  416. pagecount: 1,
  417. returntype: 'Map',
  418. parammaps: {
  419. pastureid: Cookies.get('pastureid'),
  420. inforname: 'times'
  421. }
  422. }
  423. },
  424. // 是否显示小料拆分
  425. isInforvalue: false,
  426. selectList: [],
  427. historyRecord: {
  428. dialogFormVisible: false,
  429. dialogStatus: '',
  430. myComponent: null
  431. },
  432. // 自动生成
  433. automaticGeneration: {
  434. dialogFormVisible: false,
  435. dialogStatus: ''
  436. },
  437. textMap: {
  438. automaticGeneration: '提示',
  439. historyRecord: '历史记录',
  440. create: '新增',
  441. update: '编辑',
  442. check: '提示'
  443. },
  444. check: {
  445. dialogFormVisible: false,
  446. dialogStatus: '',
  447. temp: {
  448. ftlist:[],
  449. isDistribution: ''
  450. }
  451. },
  452. dialogFull: false,
  453. isOrder: true,
  454. requestParam: {},
  455. isokDisable: false,
  456. create: {
  457. dialogFormVisible: false,
  458. dialogStatus: '',
  459. temp: { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' },
  460. rules: {
  461. tmrid2: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
  462. times: [{ type: 'number', required: true, message: '必填', trigger: 'blur' }],
  463. ftid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }]
  464. },
  465. listLoadingTimes: false,
  466. list1: [],
  467. list2: [],
  468. checkBarList: []
  469. },
  470. TMRNumberList: [], // TMR编号
  471. equipmentList: [], // 撒料设备
  472. templateFormulationList: [], // 模板配方
  473. isDispaly: false,
  474. dropState: false,
  475. isDropState:false
  476. }
  477. },
  478. created() {
  479. this.getButtons()
  480. this.getIsDisplay()
  481. this.getList()
  482. },
  483. methods: {
  484. getButtons() {
  485. const Edit = 'MaterialIssuancePlan'
  486. const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
  487. this.isRoleEdit = isRoleEdit
  488. },
  489. // 下拉列表
  490. getDownList() {
  491. const url = 'authdata/GetDataByName'
  492. const data1 = {
  493. name: 'getTMRListEnableType',
  494. offset: 0,
  495. parammaps: {
  496. pastureid: Cookies.get('pastureid'),
  497. eqtype: '1'
  498. }
  499. }
  500. postJson(url, data1).then(response => {
  501. if (response.data !== null) {
  502. this.TMRNumberList = response.data.list
  503. } else {
  504. this.TMRNumberList = []
  505. }
  506. })
  507. const data2 = {
  508. name: 'getTMRListEnableTypeAll',
  509. offset: 0,
  510. parammaps: {
  511. pastureid: Cookies.get('pastureid'),
  512. eqtype: '1'
  513. }
  514. }
  515. postJson(url, data2).then(response => {
  516. if (response.data !== null) {
  517. this.equipmentList = response.data.list
  518. if(this.create.dialogStatus == 'update'){
  519. this.create.temp.tclassname = this.equipmentList.find(obj => obj.id == this.create.temp.tmrid).tclassname
  520. }
  521. } else {
  522. this.equipmentList = []
  523. }
  524. })
  525. const data3 = {
  526. name: 'getFTSWList',
  527. offset: 0,
  528. parammaps: {
  529. pastureid: Cookies.get('pastureid')
  530. }
  531. }
  532. postJson(url, data3).then(response => {
  533. if (response.data !== null) {
  534. this.templateFormulationList = response.data.list
  535. } else {
  536. this.templateFormulationList = []
  537. }
  538. })
  539. const data4 = {
  540. name: 'getSysoptEnable',
  541. offset: 0,
  542. parammaps: {
  543. pastureid: Cookies.get('pastureid'),
  544. inforname: 'isSmallMaterial'
  545. }
  546. }
  547. postJson(url, data4).then(response => {
  548. if (response.data !== null) {
  549. if (response.data.list[0].inforvalue == 0) {
  550. this.isInforvalue = false
  551. } else {
  552. this.isInforvalue = true
  553. }
  554. } else {
  555. this.isInforvalue = false
  556. }
  557. })
  558. },
  559. getIsDisplay() {
  560. const url = 'authdata/GetDataByName'
  561. const data = this.maxTime.getMaxTimesParm
  562. postJson(url, data).then(response => {
  563. console.log(response.data.list[0].inforvalue)
  564. if (response.data.list[0].inforvalue == 1) {
  565. this.frequencyList = [{ id: 1, name: '第一班' }]
  566. } else if (response.data.list[0].inforvalue == 2) {
  567. this.frequencyList = [
  568. { id: 1, name: '第一班' },
  569. { id: 2, name: '第二班' }
  570. ]
  571. } else if (response.data.list[0].inforvalue == 3) {
  572. this.frequencyList = [
  573. { id: 1, name: '第一班' },
  574. { id: 2, name: '第二班' },
  575. { id: 3, name: '第三班' }
  576. ]
  577. } else if (response.data.list[0].inforvalue == 4) {
  578. this.frequencyList = [
  579. { id: 1, name: '第一班' },
  580. { id: 2, name: '第二班' },
  581. { id: 3, name: '第三班' },
  582. { id: 4, name: '第四班' }
  583. ]
  584. }
  585. })
  586. },
  587. getList() {
  588. this.table.listLoading = true
  589. const url = 'authdata/spillage'
  590. const data = this.table.getdataListParm
  591. postJson(url, data).then(response => {
  592. if (response.data.list !== undefined) {
  593. if (response.data.list !== null) {
  594. console.log('table数据', response.data.list)
  595. for (let i = 0; i < response.data.list.length; i++) {
  596. if (response.data.list[i].arrList == null) {
  597. this.$set(response.data.list[i], 'arrList', [])
  598. }
  599. }
  600. this.table.list = response.data.list
  601. this.table.total = response.data.list.length
  602. setTimeout(() => {
  603. this.$refs.table.doLayout()
  604. }, 100)
  605. } else {
  606. this.table.list = []
  607. }
  608. }
  609. this.table.listLoading = false
  610. })
  611. },
  612. changeFrequency(val) {
  613. console.log('选择了班次', val)
  614. this.getList()
  615. },
  616. // 行内删除
  617. handleRowDelete(row) {
  618. console.log(row, '点击了行删除')
  619. if (row.arrList.length == 0) {
  620. MessageBox.confirm('是否确认删除此信息?', {
  621. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  622. }).then(() => {
  623. this.selectList = []
  624. this.requestParam = {}
  625. this.requestParam.name = 'deleteLpp'
  626. this.requestParam.parammaps = {}
  627. this.requestParam.parammaps.pastureid = row.pastureid
  628. this.requestParam.parammaps.id = row.id
  629. const url = 'authdata/PostDataByName'
  630. const data = this.requestParam
  631. postJson(url, data).then(response => {
  632. if (response.msg === 'fail') {
  633. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  634. } else {
  635. this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
  636. this.table.getdataListParm.parammaps.refresh = 1
  637. this.getList()
  638. }
  639. })
  640. }).catch(() => {
  641. this.$message({ type: 'info', message: '已取消删除' })
  642. })
  643. } else {
  644. this.$message({ type: 'error', message: '本车次已添加栏舍不可删除', duration: 2000 })
  645. return false
  646. }
  647. },
  648. handleSelect(val) {
  649. console.log('勾选数据', val)
  650. this.selectList = val
  651. },
  652. changeTemplateFormulation(item) {
  653. this.create.temp.ftname = this.templateFormulationList.find(obj => obj.id === item).tname
  654. this.getCreateList1()
  655. },
  656. changeTimes(item) {
  657. this.getCreateList1()
  658. },
  659. // TMR编号
  660. changeTMRNumber(item) {
  661. if (this.create.list2.length > 0) {
  662. MessageBox.confirm('更换TMR撒料设备,会清空撒料车,是否更换?', {
  663. confirmButtonText: '是', cancelButtonText: '否', type: 'warning'
  664. }).then(() => {
  665. this.create.temp.tmrid = this.create.temp.tmrid2
  666. this.create.temp.tmrname = this.equipmentList.find(obj => obj.id === item).eqcode
  667. this.create.temp.maxweight = this.equipmentList.find(obj => obj.id === item).maxstirfeed
  668. this.create.temp.tclassname = this.equipmentList.find(obj => obj.id === item).tclassname
  669. this.create.temp.mytmrid = this.create.temp.tmrid
  670. this.create.temp.mytmrname = this.create.temp.tmrname
  671. console.log('tmrname==>', this.create.temp)
  672. if (this.isDispaly || this.create.dialogStatus == 'update') {
  673. this.getClearList()
  674. }
  675. }).catch(() => {
  676. this.create.temp.tmrid2 = this.create.temp.tmrid
  677. this.create.temp.tmrname = this.equipmentList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
  678. this.create.temp.maxweight = this.equipmentList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
  679. this.create.temp.tclassname = this.equipmentList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
  680. this.create.temp.mytmrid = this.create.temp.tmrid2
  681. this.create.temp.mytmrname = this.create.temp.tmrname
  682. console.log(this.create.temp)
  683. this.$message({ type: 'info', message: '已取消' })
  684. })
  685. } else {
  686. this.create.temp.tmrid = this.create.temp.tmrid2
  687. this.create.temp.tmrname = this.equipmentList.find(obj => obj.id === item).eqcode
  688. this.create.temp.maxweight = this.equipmentList.find(obj => obj.id === item).maxstirfeed
  689. this.create.temp.tclassname = this.equipmentList.find(obj => obj.id === item).tclassname
  690. this.create.temp.mytmrid = this.create.temp.tmrid
  691. this.create.temp.mytmrname = this.create.temp.tmrname
  692. console.log('TMR编号item==>', item)
  693. }
  694. console.log('tmrname==>', this.create.temp)
  695. },
  696. getClearList() {
  697. const url = 'authdata/lpplandtl/del'
  698. const data = []
  699. this.create.list2.forEach((item, i) => {
  700. const obj = {}
  701. obj.pastureid = item.pastureid
  702. obj.lpplandtlid = item.id
  703. obj.fttype = item.fttype
  704. obj.lweight = item.lweight
  705. obj.fpdid = item.fpdid
  706. data.push(obj)
  707. })
  708. postJson(url, data).then(response => {
  709. if (response.msg === 'fail') {
  710. this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
  711. } else {
  712. this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
  713. this.getCreateList1()
  714. }
  715. })
  716. },
  717. colorRgb(sColor) {
  718. sColor = sColor.toLowerCase()
  719. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
  720. // 如果是16进制颜色
  721. if (sColor && reg.test(sColor)) {
  722. if (sColor.length === 4) {
  723. var sColorNew = '#'
  724. for (var i = 1; i < 4; i += 1) {
  725. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
  726. }
  727. sColor = sColorNew
  728. }
  729. // 处理六位的颜色值
  730. var sColorChange = []
  731. for (var i = 1; i < 7; i += 2) {
  732. sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
  733. }
  734. return sColorChange.join(',')
  735. }
  736. return 'rgba(' + sColorChange.join(',') + ')'
  737. },
  738. dbclickWeight(item) {
  739. console.log('item==>', item)
  740. console.log('isRoleEdit==>', this.isRoleEdit)
  741. this.$set(item, 'isWeight', true)
  742. this.$set(item, 'focusState', true)
  743. },
  744. focusWeight(){
  745. this.isDropState = true
  746. },
  747. blurWeight(item) {
  748. this.isDropState = false
  749. if (parseFloat(item.weight) <= 0) {
  750. this.$message({ type: 'error', message: '重量不可输入小于0的数据', duration: 2000 })
  751. return false
  752. }
  753. if (item.weight == '') {
  754. item.weight = 0
  755. }
  756. const lweight = String(parseFloat(item.weight) - parseFloat(item.lweight))
  757. let sum = 0
  758. this.create.list2.forEach((item, i) => {
  759. console.log('item==>', item)
  760. sum += parseFloat(item.weight)
  761. })
  762. if (sum > this.create.temp.maxweight) {
  763. this.$message({ type: 'error', message: '撒料车总重量大于最大重量', duration: 2000 })
  764. return false
  765. }
  766. this.requestParam = {}
  767. this.requestParam.common = { 'returnmap': '0' }
  768. this.requestParam.data = []
  769. this.requestParam.data[0] = {
  770. 'name': 'checkFPdLeftW', 'type': 'v',
  771. 'parammaps': {
  772. pastureid: item.pastureid, fpdid: item.fpdid, fttype: item.fttype,
  773. lweight: lweight
  774. }
  775. }
  776. this.requestParam.data[1] = {
  777. 'name': 'updateLppd', 'type': 'e',
  778. 'parammaps': {
  779. pastureid: this.create.temp.pastureid, lppid: this.create.temp.id, barid: item.barid,
  780. barname: item.barname, fpdid: item.fpdid, fttype: item.fttype,
  781. lweight: item.weight, sort: item.sort, tmrid: item.tmrid,
  782. tmrname: item.tmrname, background: item.background, id: item.id
  783. }
  784. }
  785. this.requestParam.data[2] = {
  786. 'name': 'updateFpdetailUse', 'type': 'e',
  787. 'parammaps': {
  788. pastureid: item.pastureid, id: item.fpdid,
  789. fttype: item.fttype, lweight: lweight
  790. }
  791. }
  792. ExecDataByConfig(this.requestParam).then(response => {
  793. if (response.msg === 'fail') {
  794. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  795. } else {
  796. // this.isDropState = false
  797. // this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  798. }
  799. this.getCreateList1()
  800. })
  801. },
  802. handleFLDelete(ele) {
  803. console.log(ele, '点击了撒料删除')
  804. this.requestParam = {}
  805. this.requestParam.common = { 'returnmap': '0' }
  806. this.requestParam.data = []
  807. this.requestParam.data[0] = {
  808. 'name': 'deleteLppd', 'type': 'e',
  809. 'parammaps': { pastureid: ele.pastureid, id: ele.id }
  810. }
  811. this.requestParam.data[1] = {
  812. 'name': 'updateFpdetailUse', 'type': 'e',
  813. 'parammaps': { pastureid: ele.pastureid, id: ele.fpdid, fttype: ele.fttype, lweight: '-' + parseFloat(ele.weight) }
  814. }
  815. const url = 'authdata/ExecDataByConfig'
  816. const data = this.requestParam
  817. postJson(url, data).then(response => {
  818. if (response.msg === 'fail') {
  819. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  820. } else {
  821. this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
  822. this.getCreateList1()
  823. }
  824. })
  825. },
  826. handleCreate() {
  827. console.log('新增车次')
  828. this.create.temp = { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' }
  829. // 注释内容后续版本更
  830. this.create.temp.times = this.table.getdataListParm.parammaps.times
  831. // 注释内容后续版本更
  832. this.getDownList()
  833. this.isDispaly = false
  834. this.dialogFull = false
  835. this.create.dialogStatus = 'create'
  836. this.create.dialogFormVisible = true
  837. this.create.list1 = []
  838. this.create.list2 = []
  839. this.create.checkBarList = []
  840. },
  841. distributionAndSpreading() {
  842. console.log('点击了分配撒料')
  843. this.$refs['temp'].validate(valid => {
  844. if (valid) {
  845. this.isokDisable = true
  846. setTimeout(() => {
  847. this.isokDisable = false
  848. }, 1000)
  849. const url = 'authdata/lpplan/add'
  850. const data = {}
  851. this.create.temp.pastureid = Cookies.get('pastureid')
  852. this.create.temp.times = parseInt(this.create.temp.times)
  853. data.parammaps = this.create.temp
  854. postJson(url, data).then(response => {
  855. console.log('新增保存发送参数', this.requestParam)
  856. if (response.msg !== 'fail') {
  857. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  858. this.create.temp.id = response.data.Id
  859. this.isDispaly = true
  860. } else {
  861. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  862. }
  863. })
  864. this.getCreateList1()
  865. }
  866. })
  867. },
  868. getCreateList1() {
  869. this.create.listLoadingTimes = true
  870. const url = 'authdata/spillage'
  871. const data = {
  872. page: 1,
  873. offset: 1,
  874. pagecount: 0,
  875. returntype: 'Map',
  876. parammaps: {
  877. pastureid: Cookies.get('pastureid'),
  878. times: this.create.temp.times,
  879. refresh: 2,
  880. ftid: this.create.temp.ftid
  881. }
  882. }
  883. postJson(url, data).then(response => {
  884. if (response.data.ftlist !== null) {
  885. for (let i = 0; i < response.data.ftlist.length; i++) {
  886. this.$set(response.data.ftlist[i], 'isShowTitle', true)
  887. if (response.data.ftlist[i].arrList == null) {
  888. this.$set(response.data.ftlist[i], 'isShowTitle', false)
  889. } else {
  890. for (let j = 0; j < response.data.ftlist[i].arrList.length; j++) {
  891. this.$set(response.data.ftlist[i].arrList[j], 'background2', this.colorRgb(response.data.ftlist[i].arrList[j].background))
  892. }
  893. }
  894. }
  895. this.create.list1 = response.data.ftlist
  896. } else {
  897. this.create.list1 = []
  898. }
  899. this.create.listLoadingTimes = false
  900. })
  901. this.getCreateList2()
  902. },
  903. getCreateList2() {
  904. const url = 'authdata/lpplandtl'
  905. const data = {}
  906. data.parammaps = {}
  907. data.parammaps.pastureid = Cookies.get('pastureid'),
  908. data.parammaps.id = this.create.temp.id
  909. postJson(url, data).then(response => {
  910. if (response.data !== null) {
  911. this.create.list2 = response.data
  912. this.create.temp.sort = response.data.length + 1
  913. var sumweight = 0
  914. for (let i = 0; i < this.create.list2.length; i++) {
  915. sumweight += parseFloat(this.create.list2[i].weight)
  916. this.$set(this.create.list2[i], 'isWeight', false)
  917. this.$set(this.create.list2[i], 'focusState', false)
  918. }
  919. console.log('sumweight==>', sumweight)
  920. this.create.temp.sumweight = (sumweight).toFixed(2)
  921. } else {
  922. this.create.list2 = []
  923. this.create.temp.sort = 0
  924. this.create.temp.sumweight = 0
  925. }
  926. })
  927. },
  928. clickBar(item) {
  929. this.isokDisable = true
  930. setTimeout(() => {
  931. this.isokDisable = false
  932. }, 1000)
  933. console.log('点击了栏舍item==>', item)
  934. this.create.temp.sumweight = parseFloat(this.create.temp.sumweight)
  935. console.log('temp==>',this.create.temp)
  936. console.log('this.equipmentList==>',this.equipmentList)
  937. // if(this.create.temp.tclassname == '固定式'){
  938. // if(this.equipmentList.find(obj => obj.tclassname == '撒料设备') !== undefined){
  939. // this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '撒料设备').eqcode
  940. // this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '撒料设备').id
  941. // }else if(this.equipmentList.find(obj => obj.tclassname == '自走式') !== undefined){
  942. // this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '自走式').eqcode
  943. // this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '自走式').id
  944. // }else{
  945. // this.$message({ type: 'error', message: '请先在TMR设备中创建撒料设备', duration: 2000 })
  946. // return
  947. // }
  948. // }
  949. if(this.create.temp.tclassname == '固定式'){
  950. if(this.equipmentList.find(obj => obj.tclassname == '任意车') !== undefined){
  951. this.create.temp.tmrname = this.equipmentList.find(obj => obj.tclassname == '任意车').eqcode
  952. this.create.temp.tmrid = this.equipmentList.find(obj => obj.tclassname == '任意车').id
  953. }
  954. }
  955. var evt = this.create.temp
  956. if (parseFloat(evt.maxweight) - parseFloat(evt.sumweight) < parseFloat(item.weight)) {
  957. if (parseFloat(evt.sumweight) + parseFloat(item.weight) > parseFloat(evt.maxweight)) {
  958. this.$set(item, 'weight', (parseFloat(evt.maxweight) - parseFloat(evt.sumweight)).toFixed(2))
  959. }
  960. }
  961. if (parseFloat(evt.maxweight) == parseFloat(evt.sumweight) || parseFloat(evt.maxweight) < parseFloat(evt.sumweight)) {
  962. this.$message({ type: 'error', message: '计划配方已经是最大容量', duration: 2000 })
  963. this.getCreateList1()
  964. return
  965. }
  966. console.log('item.weight===>', item.weight)
  967. const url = 'authdata/lpplandtl/add'
  968. const data = {}
  969. data.parammaps = {}
  970. data.parammaps.id = item.id
  971. data.parammaps.pastureid = evt.pastureid
  972. data.parammaps.lppid = evt.id
  973. data.parammaps.barid = item.barid
  974. data.parammaps.barname = item.barname
  975. data.parammaps.fpdid = item.id
  976. data.parammaps.lweight = item.weight
  977. data.parammaps.tmrid = evt.tmrid
  978. data.parammaps.tmrname = evt.tmrname
  979. data.parammaps.fttype = item.fttype
  980. data.parammaps.background = item.background
  981. data.parammaps.cowcount = item.cowcount
  982. data.parammaps.ccountradio = item.ccountradio
  983. postJson(url, data).then(response => {
  984. this.requestParam = {}
  985. this.requestParam.common = { 'returnmap': '0' }
  986. this.requestParam.data = []
  987. // this.requestParam.data[0] = { 'name': 'updateLpplandtlSorts', 'type': 'e',
  988. // 'parammaps': { pastureid: evt.pastureid, sort: evt.sort, lppid: evt.id }
  989. // }
  990. // this.requestParam.data[1] = { 'name': 'insertLppd', 'type': 'e',
  991. // 'parammaps': {
  992. // pastureid: evt.pastureid, lppid: evt.id, barid: item.barid, barname: item.barname, fpdid: item.id, fttype: item.fttype,
  993. // lweight: item.weight, sort: evt.sort, tmrid: evt.tmrid, tmrname: evt.tmrname,
  994. // background: item.background, ccountradio: item.ccountradio, cowcount: item.cowcount
  995. // }
  996. // }
  997. this.requestParam.data[0] = { 'name': 'updateFpdetailUse', 'type': 'e',
  998. 'parammaps': { pastureid: item.pastureid, id: item.id, fttype: item.fttype, lweight: item.weight }
  999. }
  1000. const url2 = 'authdata/ExecDataByConfig'
  1001. const data2 = this.requestParam
  1002. postJson(url2, data2).then(response => {
  1003. if (response.msg === 'fail') {
  1004. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1005. } else {
  1006. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1007. }
  1008. this.getCreateList1()
  1009. })
  1010. })
  1011. },
  1012. handleUpdate(row) {
  1013. console.log(row)
  1014. console.log("equipmentList",this.equipmentList)
  1015. this.getDownList()
  1016. this.dialogFull = false
  1017. this.create.dialogStatus = 'update'
  1018. this.create.dialogFormVisible = true
  1019. row.tmrid2 = row.tmrid
  1020. this.create.temp = Object.assign({}, row)
  1021. this.create.temp.mytmrname = row.tmrname
  1022. this.create.temp.mytmrid = row.tmrid
  1023. this.create.checkBarList = []
  1024. console.log(this.create.temp,'this.create.temp')
  1025. this.getCreateList1()
  1026. },
  1027. updateData() {
  1028. this.$refs['temp'].validate(valid => {
  1029. if (valid) {
  1030. this.isokDisable = true
  1031. setTimeout(() => {
  1032. this.isokDisable = false
  1033. }, 1000)
  1034. const url = 'authdata/lpplan/edit'
  1035. const data = {}
  1036. this.create.temp.pastureid = Cookies.get('pastureid')
  1037. this.create.temp.times = parseInt(this.create.temp.times)
  1038. data.parammaps = this.create.temp
  1039. data.parammaps.tmrid = this.create.temp.mytmrid
  1040. data.parammaps.tmrname = this.create.temp.mytmrname
  1041. postJson(url, data).then(response => {
  1042. console.log('新增保存发送参数', this.requestParam)
  1043. if (response.msg !== 'fail') {
  1044. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1045. this.isDispaly = false
  1046. this.dialogFull = false
  1047. this.create.dialogFormVisible = false
  1048. this.getList()
  1049. } else {
  1050. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1051. }
  1052. })
  1053. }
  1054. })
  1055. },
  1056. close() {
  1057. if (this.create.dialogStatus == 'create') {
  1058. console.log('新增关闭')
  1059. this.isokDisable = true
  1060. setTimeout(() => {
  1061. this.isokDisable = false
  1062. }, 1000)
  1063. const url = 'authdata/lpplandtl/restore'
  1064. const data = {}
  1065. data.old = []
  1066. data.new = this.create.list2
  1067. postJson(url, data).then(response => {
  1068. console.log('新增保存发送参数', this.requestParam)
  1069. if (response.msg !== 'fail') {
  1070. this.isDispaly = false
  1071. this.dialogFull = false
  1072. this.create.dialogFormVisible = false
  1073. this.getList()
  1074. }
  1075. })
  1076. } else {
  1077. console.log('编辑关闭')
  1078. this.isokDisable = true
  1079. setTimeout(() => {
  1080. this.isokDisable = false
  1081. }, 1000)
  1082. const url = 'authdata/lpplandtl/restore'
  1083. const data = {}
  1084. data.old = this.create.temp.arrList
  1085. data.new = this.create.list2
  1086. postJson(url, data).then(response => {
  1087. console.log('新增保存发送参数', this.requestParam)
  1088. if (response.msg !== 'fail') {
  1089. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1090. this.isDispaly = false
  1091. this.dialogFull = false
  1092. this.create.dialogFormVisible = false
  1093. this.getList()
  1094. } else {
  1095. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1096. }
  1097. })
  1098. }
  1099. },
  1100. changeEquipment(item, fttype, myid) {
  1101. console.log('item==>',item)
  1102. console.log('fttype==>',fttype)
  1103. console.log('myid==>',myid)
  1104. let tclassname = this.equipmentList.find(obj => obj.id == item).tclassname
  1105. let maxstirfeed = this.equipmentList.find(obj => obj.id == item).maxstirfeed
  1106. if(tclassname == '固定式'){
  1107. this.$message({ type: 'error', message: '固定式设备无法撒料,请选择撒料设备', duration: 2000 })
  1108. this.getCreateList2()
  1109. return
  1110. }
  1111. var objList = {}
  1112. for (let i = 0; i < this.create.list2.length; i++) {
  1113. if (this.create.list2[i].fttype == fttype && this.create.list2[i].id == myid) {
  1114. this.create.list2[i].tmrname = this.equipmentList.find(obj => obj.id === item).tname
  1115. objList = this.create.list2[i]
  1116. if(parseFloat(this.create.list2[i].weight) > parseFloat(maxstirfeed)){
  1117. objList.weight = maxstirfeed
  1118. }
  1119. }
  1120. }
  1121. const url = 'authdata/lpplandtl/add'
  1122. const data = {}
  1123. data.parammaps = {}
  1124. data.parammaps.id = objList.id
  1125. data.parammaps.pastureid = this.create.temp.pastureid
  1126. data.parammaps.lppid = this.create.temp.id
  1127. data.parammaps.tmrid = objList.tmrid
  1128. data.parammaps.tmrname = objList.tmrname
  1129. postJson(url, data).then(response => {
  1130. console.log('新增保存发送参数', this.requestParam)
  1131. if (response.msg === 'fail') {
  1132. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1133. } else {
  1134. this.getCreateList2()
  1135. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1136. }
  1137. })
  1138. // this.requestParam = {}
  1139. // this.requestParam.common = {
  1140. // 'returnmap': '0'
  1141. // }
  1142. // this.requestParam.data = []
  1143. // this.requestParam.data[0] = {
  1144. // 'name': 'updateLppd',
  1145. // 'type': 'e',
  1146. // 'parammaps': {
  1147. // pastureid: this.create.temp.pastureid,
  1148. // lppid: this.create.temp.id,
  1149. // barid: objList.barid,
  1150. // barname: objList.barname,
  1151. // fpdid: objList.fpdid,
  1152. // fttype: objList.fttype,
  1153. // lweight: objList.weight,
  1154. // sort: objList.sort,
  1155. // tmrid: objList.tmrid,
  1156. // tmrname: objList.tmrname,
  1157. // background: objList.background,
  1158. // id: objList.id
  1159. // }
  1160. // }
  1161. // ExecDataByConfig(this.requestParam).then(response => {
  1162. // console.log('编辑保存发送参数', this.requestParam)
  1163. // if (response.msg === 'fail') {
  1164. // this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1165. // } else {
  1166. // this.getCreateList2()
  1167. // this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1168. // }
  1169. // })
  1170. },
  1171. move1(evt, originalEvent){
  1172. console.log('move1===>evt', evt)
  1173. console.log('move1===>originalEvent', originalEvent)
  1174. },
  1175. changeLog1(evt){
  1176. const url = 'authdata/lpplandtl/edit/sort'
  1177. const data = {}
  1178. var obj = evt.moved.element
  1179. data.parammaps = {}
  1180. data.parammaps.tmrid = obj.tmrid
  1181. data.parammaps.pastureid = obj.pastureid
  1182. data.parammaps.lppid = obj.lppid
  1183. data.parammaps.sort = evt.moved.newIndex +1
  1184. postJson(url, data).then(response => {
  1185. console.log('拖动保存发送参数', this.requestParam)
  1186. if (response.msg === 'fail') {
  1187. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1188. } else {
  1189. this.getCreateList2()
  1190. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1191. }
  1192. })
  1193. },
  1194. start1(evt){
  1195. console.log('start1===>', evt)
  1196. // this.$set(this.table.startObj, 'from', evt.from.className)
  1197. // this.$set(this.table.startObj, 'to', evt.from.className)
  1198. },
  1199. end1(evt){
  1200. console.log('end1===>', evt)
  1201. },
  1202. // 减少车次
  1203. handleReduceTrains() {
  1204. if (this.selectList.length == 0) {
  1205. this.$message({ type: 'error', message: '请选择车次', duration: 2000 })
  1206. return false
  1207. } else {
  1208. // 减少对应车次
  1209. for (let i = 0; i < this.selectList.length; i++) {
  1210. if (this.selectList[i].arrList.length > 0) {
  1211. this.$message({ type: 'error', message: '本车次已添加栏舍不可删除', duration: 2000 })
  1212. return false
  1213. }
  1214. }
  1215. MessageBox.confirm('是否确认删除此信息?', {
  1216. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1217. }).then(() => {
  1218. console.log(this.selectList)
  1219. this.requestParam = {}
  1220. this.requestParam.common = { 'returnmap': '0' }
  1221. this.requestParam.data = []
  1222. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1223. this.requestParam.data[0].children = []
  1224. this.requestParam.data[0].children[0] = {
  1225. 'name': 'deleteLpp', 'type': 'e', 'parammaps': { id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
  1226. }
  1227. ExecDataByConfig(this.requestParam).then(response => {
  1228. console.log('删除保存发送参数', this.requestParam)
  1229. if (response.msg === 'fail') {
  1230. this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
  1231. } else {
  1232. this.$notify({ title: '', message: '删除成功', type: 'success', duration: 2000 })
  1233. this.table.getdataListParm.parammaps.refresh = 1
  1234. this.getList()
  1235. }
  1236. })
  1237. })
  1238. }
  1239. },
  1240. // 自动生成
  1241. handleAutomaticGeneration() {
  1242. this.dialogFull = false
  1243. this.automaticGeneration.dialogStatus = 'automaticGeneration'
  1244. this.automaticGeneration.dialogFormVisible = true
  1245. },
  1246. continueData(item) {
  1247. if (item == 0) {
  1248. console.log('点击继续生成')
  1249. this.requestParam = {}
  1250. this.requestParam.pastureid = Cookies.get('pastureid')
  1251. this.requestParam.type = 0
  1252. const url = 'authdata/autogeneration'
  1253. const data = this.requestParam
  1254. postJson(url, data).then(response => {
  1255. console.log('新增保存发送参数', this.requestParam)
  1256. if (response.msg !== 'fail') {
  1257. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1258. this.automaticGeneration.dialogFormVisible = false
  1259. this.getIsDisplay()
  1260. } else {
  1261. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1262. }
  1263. })
  1264. } else {
  1265. console.log('点击重新生成')
  1266. MessageBox.confirm('重新生成计划会将原有计划清空再生成,是否确认重新生成?', {
  1267. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1268. }).then(() => {
  1269. this.automaticGeneration.dialogFormVisible = false
  1270. this.requestParam = {}
  1271. this.requestParam.pastureid = Cookies.get('pastureid')
  1272. this.requestParam.type = 1
  1273. const url = 'authdata/autogeneration'
  1274. const data = this.requestParam
  1275. postJson(url, data).then(response => {
  1276. console.log('新增保存发送参数', this.requestParam)
  1277. if (response.msg !== 'fail') {
  1278. this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
  1279. this.automaticGeneration.dialogFormVisible = false
  1280. this.getIsDisplay()
  1281. } else {
  1282. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1283. }
  1284. })
  1285. }).catch(() => {
  1286. this.$message({ type: 'info', message: '已取消重新生成' })
  1287. })
  1288. }
  1289. },
  1290. handleChangeOrder() {
  1291. console.log('更改顺序')
  1292. this.isOrder = false
  1293. this.rowDrop()
  1294. },
  1295. // 行拖拽
  1296. rowDrop() {
  1297. console.log(document.querySelector('#table .el-table__body-wrapper tbody'))
  1298. const tbody = document.querySelector('#table .el-table__body-wrapper tbody')
  1299. const that = this
  1300. var sortable = Sortable.create(tbody, {
  1301. disabled: that.dropState,
  1302. onChoose({ newIndex, oldIndex }) {
  1303. console.log(that.isOrder, 'that.isOrder == false')
  1304. console.log(that.dropState, 'that.dropState')
  1305. if (that.dropState == true || that.isOrder == true) {
  1306. sortable.destroy()
  1307. }
  1308. },
  1309. onEnd({ newIndex, oldIndex }) {
  1310. const currRow = that.table.list.splice(oldIndex, 1)[0]
  1311. that.table.list.splice(newIndex, 0, currRow)
  1312. console.log('索引', newIndex)
  1313. console.log('拖动数据', currRow)
  1314. console.log('上', that.table.list[newIndex - 1])
  1315. console.log('下', that.table.list[newIndex + 1])
  1316. }
  1317. })
  1318. },
  1319. saveChangeOrder() {
  1320. // 保存顺序
  1321. var sortArr = []
  1322. for (let i = 0; i < this.table.list.length; i++) {
  1323. var obj = {}
  1324. obj.sort = i + 1
  1325. obj.id = this.table.list[i].id
  1326. obj.pastureid = this.table.list[i].pastureid
  1327. sortArr.push(obj)
  1328. }
  1329. const url = 'authdata/trains'
  1330. const data = sortArr
  1331. postJson(url, data).then(response => {
  1332. if (response.msg === 'fail') {
  1333. this.$notify({ title: '顺序切换失败', message: response.data, type: 'warning', duration: 2000 })
  1334. } else {
  1335. this.$notify({ title: '', message: '顺序切换成功', type: 'success', duration: 2000 })
  1336. this.table.getdataListParm.parammaps.refresh = 1
  1337. this.getList()
  1338. this.isOrder = true
  1339. }
  1340. })
  1341. },
  1342. cancelChangeOrder() {
  1343. console.log('取消顺序')
  1344. this.table.getdataListParm.parammaps.refresh = 1
  1345. this.getList()
  1346. this.isOrder = true
  1347. },
  1348. handleTakeEffect() {
  1349. if (this.selectList.length == 0) {
  1350. this.$message({ type: 'error', message: '请选择车次信息', duration: 2000 })
  1351. } else {
  1352. MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否生效?', {
  1353. confirmButtonText: '确认',
  1354. cancelButtonText: '取消',
  1355. type: 'warning'
  1356. }).then(() => {
  1357. for (let i = 0; i < this.selectList.length; i++) {
  1358. this.selectList[i].sel = 1
  1359. }
  1360. console.log('生效', this.selectList)
  1361. this.requestParam.common = { 'returnmap': '0' }
  1362. this.requestParam.data = []
  1363. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1364. this.requestParam.data[0].children = []
  1365. this.requestParam.data[0].children[0] = {
  1366. 'name': 'updatelpplanEnable', 'type': 'e', 'parammaps': { sel: '@insertSpotList.sel', id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
  1367. }
  1368. ExecDataByConfig(this.requestParam).then(response => {
  1369. console.log('生效保存发送参数', this.requestParam)
  1370. if (response.msg === 'fail') {
  1371. this.$notify({ title: '生效失败', message: response.data, type: 'warning', duration: 2000 })
  1372. } else {
  1373. this.$notify({ title: '', message: '生效成功', type: 'success', duration: 2000 })
  1374. this.table.getdataListParm.parammaps.refresh = 1
  1375. this.getList()
  1376. }
  1377. })
  1378. })
  1379. }
  1380. },
  1381. handleDisable() {
  1382. if (this.selectList.length == 0) {
  1383. this.$message({ type: 'error', message: '请选择车次信息', duration: 2000 })
  1384. } else {
  1385. MessageBox.confirm('当前选中' + this.selectList.length + '条信息,是否禁用?', {
  1386. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1387. }).then(() => {
  1388. for (let i = 0; i < this.selectList.length; i++) {
  1389. this.selectList[i].sel = 0
  1390. }
  1391. console.log('禁用', this.selectList)
  1392. this.requestParam.common = { 'returnmap': '0' }
  1393. this.requestParam.data = []
  1394. this.requestParam.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.selectList }}
  1395. this.requestParam.data[0].children = []
  1396. this.requestParam.data[0].children[0] = {
  1397. 'name': 'updatelpplanEnable',
  1398. 'type': 'e',
  1399. 'parammaps': { sel: '@insertSpotList.sel', id: '@insertSpotList.id', pastureid: '@insertSpotList.pastureid' }
  1400. }
  1401. ExecDataByConfig(this.requestParam).then(response => {
  1402. console.log('禁用保存发送参数', this.requestParam)
  1403. if (response.msg === 'fail') {
  1404. this.$notify({ title: '禁用失败', message: response.data, type: 'warning', duration: 2000 })
  1405. } else {
  1406. this.$notify({ title: '禁用成功', message: '禁用成功', type: 'success', duration: 2000 })
  1407. this.table.getdataListParm.parammaps.refresh = 1
  1408. this.getList()
  1409. }
  1410. })
  1411. })
  1412. }
  1413. },
  1414. // 历史记录
  1415. handleHistoryRecord() {
  1416. console.log('点击历史记录')
  1417. this.dialogFull = false
  1418. this.historyRecord.dialogStatus = 'historyRecord'
  1419. this.historyRecord.dialogFormVisible = true
  1420. const vue = this
  1421. var myComponent = () => import('./historyRecord.vue')
  1422. return vue.historyRecord.myComponent = myComponent
  1423. },
  1424. handleCheck() {
  1425. console.log('点击了校验')
  1426. this.check.dialogStatus = 'check'
  1427. this.check.dialogFormVisible = true
  1428. this.getCheckList()
  1429. },
  1430. getCheckList() {
  1431. const url = 'authdata/spillage'
  1432. const data = {
  1433. page: 1,
  1434. offset: 1,
  1435. pagecount: 0,
  1436. returntype: 'Map',
  1437. parammaps: {
  1438. pastureid: Cookies.get('pastureid'),
  1439. times: this.table.getdataListParm.parammaps.times,
  1440. refresh: 2
  1441. }
  1442. }
  1443. postJson(url, data).then(response => {
  1444. if (response.data.ftlist !== undefined && response.data.ftlist !== null) {
  1445. this.$set(this.check.temp,'isDistribution',0)
  1446. this.check.temp.ftlist = response.data.ftlist
  1447. } else {
  1448. this.check.temp = {}
  1449. this.$set(this.check.temp,'isDistribution',1)
  1450. }
  1451. })
  1452. },
  1453. }
  1454. }
  1455. </script>
  1456. <style lang="scss" scoped>
  1457. .list{width: 60px;display: inline-block;margin: 5px 5px;text-align: center;
  1458. .tmrname{
  1459. width:100%;padding: 5px 5px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  1460. }
  1461. }
  1462. .fenceHouse {
  1463. height: 130px;
  1464. background: #fff;
  1465. position: relative;
  1466. ::-webkit-scrollbar {
  1467. width: 7px;
  1468. height: 7px;
  1469. background-color: #F5F5F5;
  1470. }
  1471. ::-webkit-scrollbar-track {
  1472. box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1473. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1474. border-radius: 10px;
  1475. background-color: #F5F5F5;
  1476. }
  1477. ::-webkit-scrollbar-thumb {
  1478. border-radius: 10px;
  1479. box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1480. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1481. background-color: #c8c8c8;
  1482. }
  1483. .fenceHouseList {
  1484. position: absolute;
  1485. width: 100%;
  1486. margin: 0 0;
  1487. height: 130px;
  1488. list-style: none;
  1489. padding: 0 0;
  1490. overflow: auto;
  1491. font-size: 12px;
  1492. .fenceHouseTitle {
  1493. float: left;
  1494. width: 105px;
  1495. white-space: nowrap;
  1496. overflow: hidden;
  1497. text-overflow: ellipsis;
  1498. margin: 5px 5px;
  1499. border-radius: 7px;
  1500. text-align: center;
  1501. color: #000;
  1502. height: 36px;
  1503. line-height: 36px;
  1504. }
  1505. li {
  1506. text-align: center;
  1507. color: #fff;
  1508. .barname {
  1509. display: block;
  1510. width: 100%;
  1511. overflow: hidden;
  1512. text-overflow: ellipsis;
  1513. white-space: nowrap;
  1514. }
  1515. .barWeight{
  1516. display: block;
  1517. line-height: 18px;
  1518. height: 18px;
  1519. color: #000;
  1520. width: 100%;
  1521. margin: 0 auto;
  1522. }
  1523. .colorBlock{
  1524. width: 88px;float: left;margin:5px 5px;height: 36px;
  1525. }
  1526. }
  1527. }
  1528. }
  1529. </style>
  1530. <style lang="scss" >
  1531. .spreadingMaterial {
  1532. height: 200px;
  1533. ::-webkit-scrollbar {
  1534. width: 7px;
  1535. height: 7px;
  1536. background-color: #F5F5F5;
  1537. }
  1538. ::-webkit-scrollbar-track {
  1539. box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1540. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  1541. border-radius: 10px;
  1542. background-color: #F5F5F5;
  1543. }
  1544. ::-webkit-scrollbar-thumb {
  1545. border-radius: 10px;
  1546. box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1547. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
  1548. background-color: #c8c8c8;
  1549. }
  1550. .spreadingMaterialList{height: 100%;overflow: auto;}
  1551. .list-group-item2 {
  1552. width: 220px;
  1553. height: 50px;
  1554. overflow: hidden;
  1555. float: left;
  1556. margin: 5px 5px;
  1557. position: relative;
  1558. color: #fff;
  1559. .arr-t {
  1560. height: 50px;
  1561. border-radius: 5px 5px;
  1562. }
  1563. .arr-l {
  1564. float: left;
  1565. width: 60px;
  1566. height: 50px;
  1567. overflow: hidden;
  1568. border-radius: 5px 50% 50% 5px;
  1569. .arr-l-t {
  1570. position: relative;
  1571. .arr-l-t-t {
  1572. width: 0;
  1573. height: 0;
  1574. border-top: 26px solid #3479f2;
  1575. border-right: 26px solid transparent;
  1576. }
  1577. .arr-l-t-b {
  1578. position: absolute;
  1579. top: 4px;
  1580. left: 1px;
  1581. color: #fff;
  1582. width: 10px;
  1583. height: 10px;
  1584. .el-input--suffix {
  1585. opacity: 0;
  1586. .el-input__inner {
  1587. height: 10px;
  1588. }
  1589. }
  1590. }
  1591. }
  1592. .arr-l-b {
  1593. width: 45px;
  1594. position: absolute;
  1595. top: 15px;
  1596. left: 10px;
  1597. color: #fff !important;
  1598. font-size: 12px;
  1599. .tmrname {
  1600. width: 100%;
  1601. overflow: hidden;
  1602. text-overflow: ellipsis;
  1603. white-space: nowrap;
  1604. }
  1605. }
  1606. }
  1607. .arr-c {
  1608. position: absolute;
  1609. top: 0px;
  1610. left: 0;
  1611. }
  1612. .arr-r {
  1613. float: right;
  1614. width: 160px;
  1615. height: 50px;
  1616. overflow: hidden;
  1617. line-height: 50px;
  1618. .arr-r-l {
  1619. float: left;
  1620. width: 70px;
  1621. .barname {
  1622. width: 95%;
  1623. overflow: hidden;
  1624. text-overflow: ellipsis;
  1625. white-space: nowrap;
  1626. font-size: 14px;
  1627. text-align: center;
  1628. }
  1629. }
  1630. .arr-r-c {
  1631. float: left;
  1632. width: 10px;
  1633. }
  1634. .arr-r-r {
  1635. float: left;
  1636. width: 65px;
  1637. .weight {
  1638. width: 100%;
  1639. overflow: hidden;
  1640. text-overflow: ellipsis;
  1641. white-space: nowrap;
  1642. font-size: 14px;
  1643. }
  1644. }
  1645. }
  1646. }
  1647. }
  1648. </style>