index.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <template>
  2. <view>
  3. <uni-nav-bar fixed="true" statusBar="true" title="工作中心" right-icon="scan" @clickRight="HandlScanCode"></uni-nav-bar>
  4. <view>
  5. <CellTip title="生产管理" v-if="productionList.length > 0"></CellTip>
  6. <view class="nav">
  7. <view class="nav-content">
  8. <view class="nav-item" v-for="item in productionList" :key="item.link_url" @click="toNav(item.path)">
  9. <span :class="'iconfont ' + item.icon"></span>
  10. <label>{{ item.title }}</label>
  11. <label>{{ item.num }}</label>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <!-- <view>
  17. <CellTip title="生产执行"></CellTip>
  18. <view class="nav">
  19. <view class="nav-content">
  20. <view
  21. class="nav-item"
  22. v-for="(item, index) in executeList"
  23. @click="toNav(item.link_url)"
  24. >
  25. <span :class="item.class"></span>
  26. <label>{{ item.title }}</label>
  27. <label>{{ item.num }}</label>
  28. </view>
  29. </view>
  30. </view>
  31. </view> -->
  32. <view>
  33. <CellTip title="运维管理" v-if="operationsList.length > 0"></CellTip>
  34. <view class="nav">
  35. <view class="nav-content">
  36. <view class="nav-item" v-for="(item, index) in operationsList" @click="toNav(item.path)">
  37. <span :class="'iconfont ' + item.icon"></span>
  38. <label>{{ item.title }}</label>
  39. <label>{{ item.num }}</label>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view>
  45. <CellTip title="仓储管理" v-if="warehousingList.length > 0"></CellTip>
  46. <view class="nav">
  47. <view class="nav-content">
  48. <view class="nav-item" v-for="(item, index) in warehousingList" @click="toNav(item.link_url)">
  49. <span :class="item.class"></span>
  50. <label>{{ item.title }}</label>
  51. <label>{{ item.num }}</label>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <!-- <view>
  57. <CellTip title="生产类"></CellTip>
  58. <view class="nav">
  59. <view class="nav-content">
  60. <view
  61. class="nav-item"
  62. v-for="(item, index) in productionList"
  63. @click="toNav(item.link_url)"
  64. >
  65. <span :class="item.class"></span>
  66. <label>{{ item.title }}</label>
  67. <label>{{ item.num }}</label>
  68. </view>
  69. </view>
  70. </view>
  71. </view> -->
  72. </view>
  73. </template>
  74. <script>
  75. import CellTip from '@/components/CellTip.vue'
  76. export default {
  77. components: {
  78. CellTip
  79. },
  80. data() {
  81. return {
  82. src1: 'https://cdn.uviewui.com/uview/album/1.jpg',
  83. //生产类
  84. productionList: [
  85. // {
  86. // class: "iconfont icon-gongdanguanli",
  87. // title: "生产工单",
  88. // link_url: "/pages/pda/workOrder/index/index",
  89. // },
  90. // {
  91. // class: "iconfont icon-gongdanguanli",
  92. // title: "领料",
  93. // link_url: "/pages/pda/picking/index/index",
  94. // },
  95. // {
  96. // class: "iconfont icon-gongdanguanli",
  97. // title: "投料",
  98. // link_url: "/pages/pda/feeding/index/index",
  99. // },
  100. // {
  101. // class: "iconfont icon-gongdanguanli",
  102. // title: "退料",
  103. // link_url: "/pages/pda/material_return/index/index",
  104. // },
  105. // {
  106. // class: "iconfont icon-gongdanguanli",
  107. // title: "不合格品处置",
  108. // link_url: "/pages/pda/nonconforming/index/index",
  109. // },
  110. // {
  111. // class: "iconfont icon-gongdanguanli",
  112. // title: "副产品回收",
  113. // link_url: "/pages/pda/by_product_recovery/index/index",
  114. // },
  115. // {
  116. // class: "iconfont icon-gongdanguanli",
  117. // title: "工单交接",
  118. // link_url: "/pages/pda/work_order_handover/index/index",
  119. // },
  120. // {
  121. // class: "iconfont icon-gongdanguanli",
  122. // title: "工单详情",
  123. // link_url: "/pages/pda/work_order_details/index/index",
  124. // },
  125. // {
  126. // class: "iconfont icon-gongdanguanli",
  127. // title: "生产报工",
  128. // link_url: "/pages/production/report/index",
  129. // "num": 1
  130. // },
  131. // {
  132. // class: "iconfont icon-gongdanguanli",
  133. // title: "生产工单",
  134. // link_url: "/pages/production/order/index",
  135. // // "num": 1
  136. // x},
  137. ],
  138. // executeList: [
  139. // {
  140. // class: "iconfont icon-gongdanguanli",
  141. // title: "成型",
  142. // link_url: "/pages/production/execute/extrusion/index",
  143. // // "num": 1
  144. // },
  145. // {
  146. // class: "iconfont icon-gongdanguanli",
  147. // title: "自然干燥",
  148. // link_url: "/pages/production/execute/drying/index",
  149. // // "num": 1
  150. // },
  151. // {
  152. // class: "iconfont icon-gongdanguanli",
  153. // title: "升温干燥",
  154. // link_url: "/pages/production/execute/heating/index",
  155. // // "num": 1
  156. // },
  157. // {
  158. // class: "iconfont icon-gongdanguanli",
  159. // title: "半加定长",
  160. // link_url: "/pages/production/execute/halfAdded/index",
  161. // // "num": 1
  162. // },
  163. // // {
  164. // // class: "iconfont icon-gongdanguanli",
  165. // // title: "领料",
  166. // // link_url: "/pages/production/execute/picking/index",
  167. // // // "num": 1
  168. // // },
  169. // ],
  170. //仓储管理
  171. warehousingList: [
  172. /*
  173. {
  174. class: "iconfont icon-wuliaoruku",
  175. title: "入库管理",
  176. link_url: "/pages/warehouse/enterHouse/index",
  177. //"num": 34
  178. },
  179. {
  180. class: "iconfont icon-shebeichuku",
  181. title: "出库管理",
  182. link_url: "/pages/warehouse/outHouse/index",
  183. "num": 34
  184. },
  185. {
  186. "class": "iconfont icon-wuliaoruku",
  187. "title": "物料入库",
  188. "link_url": "/pages/warehouse/material/index",
  189. //"num": 34
  190. },
  191. {
  192. "class": "iconfont icon-shebeiruku",
  193. "title": "设备入库",
  194. "link_url": "/pages/warehouse/equipment/index",
  195. //"num": 23
  196. },
  197. {
  198. "class": "iconfont icon-shebeichuku",
  199. "title": "设备出库",
  200. "link_url": "/pages/warehouse/outbound/index",
  201. //"num": 23
  202. },
  203. {
  204. class: "iconfont icon-pandiangongdan",
  205. title: "盘点工单",
  206. link_url: "/pages/warehouse/workOrder/index",
  207. "num": 133
  208. },
  209. {
  210. class: "iconfont icon-shebeiruku",
  211. title: "库存调拨",
  212. link_url: "/pages/warehouse/inventoryAllocation/index",
  213. //"num": 133
  214. },
  215. {
  216. class: "iconfont icon-shebeikucuntongji",
  217. title: "报损报溢",
  218. link_url: "/pages/warehouse/reportLoss/index",
  219. //"num": 133
  220. },
  221. {
  222. class: "iconfont icon-shebeikucun",
  223. title: "库存管理",
  224. link_url: "/pages/warehouse/inventory/index",
  225. //"num": 1
  226. },
  227. {
  228. class: 'iconfont icon-shebeikucuntongji',
  229. title: '设备库存统计',
  230. link_url: '/pages/warehouse/inventory/stat',
  231. //"num": 1
  232. },
  233. */
  234. ],
  235. //运维类
  236. operationsList: [
  237. /* {
  238. class: "iconfont icon-xundianjian",
  239. title: "巡点检",
  240. link_url: "/pages/tour_tally/order/order",
  241. //"num": 34
  242. },
  243. {
  244. class: "iconfont icon-a-baoyangputong",
  245. title: "保养工单",
  246. link_url: "/pages/maintenance/order/order",
  247. //"num": 23
  248. },
  249. {
  250. class: "iconfont icon-weixiugongdan",
  251. title: "维修工单",
  252. link_url: "/pages/maintain_service/order/order",
  253. //"num": 23
  254. },
  255. /* {
  256. class: 'iconfont icon-beijian',
  257. title: '备品备件',
  258. link_url: '/pages/sparepart/order/order',
  259. //"num": 1
  260. },
  261. {
  262. class: "iconfont icon-baoxiu",
  263. title: "报修单",
  264. link_url: "/pages/repair/order/order",
  265. //"num": 1
  266. },*/
  267. /* {
  268. class: 'iconfont icon-wuliaoruku',
  269. title: '入库登记',
  270. link_url: '/pages/put_storage/order/index',
  271. //"num": 34
  272. },
  273. {
  274. class: 'iconfont icon-shebeichuku',
  275. title: '出库登记',
  276. link_url: '/pages/outbound/order/index',
  277. //"num": 34
  278. }, */
  279. ],
  280. treeList: []
  281. }
  282. },
  283. created() {
  284. this.getTree()
  285. },
  286. methods: {
  287. getTree() {
  288. let _list = uni.getStorageSync('treeList')
  289. let list = JSON.parse(_list) || []
  290. console.log('-----------list--------------')
  291. console.log(list)
  292. if (list[0] && list[0].children.length > 0) {
  293. list[0].children.forEach(f => {
  294. if (f.path == 'productionManage') {
  295. this.productionList = f.children
  296. } else if (f.path == 'operationsList') {
  297. this.operationsList = f.children
  298. console.log(this.operationsList)
  299. }
  300. })
  301. }
  302. },
  303. toNav(url) {
  304. console.log(url)
  305. uni.navigateTo({
  306. url: url
  307. })
  308. },
  309. HandlScanCode() {
  310. let _this = this
  311. uni.scanCode({
  312. success: function (res) {
  313. _this.scantoRouter(res.result)
  314. }
  315. })
  316. },
  317. scantoRouter(result) {
  318. uni.navigateTo({
  319. url: `/pages/pda/workOrder/extrusionMolding/index?id=${result}`
  320. })
  321. }
  322. }
  323. }
  324. </script>
  325. <style lang="scss" scoped>
  326. @import 'index.scss';
  327. </style>