index.vue 68 KB

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