d1780782635eef071e208c890c52ef668103c03a.svn-base 68 KB

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