quick-launch.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <div class="home-container">
  3. <el-card class="home-container__card">
  4. <div class="title">
  5. <span>
  6. 快速发起
  7. </span>
  8. </div>
  9. <div class="content">
  10. <div v-if="entrust" class="content-icon" @click="inPage('wt')">
  11. <i class="tradingIcon icon-purchase" style="color:#75CD28"></i>
  12. <span>委托</span>
  13. </div>
  14. <div v-if="dispatch" class="content-icon" @click="inPage('dd')">
  15. <i class="tradingIcon icon-receipt" style="color:#409EFF"></i>
  16. <span>调度</span>
  17. </div>
  18. <div v-if="sendACar" class="content-icon" @click="inPage('pc')">
  19. <i class="tradingIcon icon-ship" style="color:#921939"></i>
  20. <span>派车</span>
  21. </div>
  22. <div v-if="track" class="content-icon" @click="inPage('gz')">
  23. <i class="tradingIcon icon-ship" style="color:#7db4ff"></i>
  24. <span>跟踪</span>
  25. </div>
  26. <div v-if="sBook" class="content-icon" @click="inPage('lytz')">
  27. <i class="tradingIcon icon-sales" style="color:#143056"></i>
  28. <span>台账</span>
  29. </div>
  30. <div v-if="reminder" class="content-icon" @click="inPage('dqtx')">
  31. <div style="width: 36px;height: 36px;background-color: #3a8ee6;border-radius: 5px;line-height: 36px;text-align: center;padding-top: 4px">
  32. <i class="el-icon-bell" style="color:#fff;font-size: 28px;"></i>
  33. </div>
  34. <span>到期提醒</span>
  35. </div>
  36. </div>
  37. </el-card>
  38. <el-dialog
  39. title="消息提醒"
  40. :visible.sync="enclosure"
  41. append-to-body
  42. width="70%">
  43. <avue-crud :data="data" @on-load="onLoad" :option="option" :page.sync="page"></avue-crud>
  44. <span slot="footer" class="dialog-footer">
  45. <el-button @click="enclosure = false" size="small">取 消</el-button>
  46. </span>
  47. </el-dialog>
  48. </div>
  49. </template>
  50. <script>
  51. import {driverRemind} from "@/api/landTransportation/driver";
  52. export default {
  53. name: "basicContainer",
  54. data() {
  55. return {
  56. enclosure:false,
  57. data:[],
  58. roleName: localStorage.getItem("roleName").split(','),
  59. option:{
  60. align:'center',
  61. dialogWidth:'85%',
  62. index: true,
  63. searchIcon: true,
  64. addBtn:false,
  65. searchIndex: 2,
  66. menu:false,
  67. refreshBtn:false,
  68. searchLabelWidth:100,
  69. searchSpan:8,
  70. column:[{
  71. label: '车队',
  72. prop: 'fleetName',
  73. },{
  74. label: '车号',
  75. prop: 'plateNo',
  76. },{
  77. label: '司机',
  78. prop: 'driverName',
  79. },{
  80. label: '电话',
  81. prop: 'tel',
  82. },{
  83. label: '年审日期',
  84. prop: 'inspectExpired',
  85. },{
  86. label: '保险日期',
  87. prop: 'insuranceExpired',
  88. }]
  89. },
  90. entrust:false,
  91. dispatch:false,
  92. sBook:false,
  93. reminder:false,
  94. sendACar:false,
  95. track:false,
  96. };
  97. },
  98. props: {
  99. sysType: Number
  100. },
  101. mounted() {
  102. if (this.roleName.indexOf('平台') !== -1){
  103. if (this.roleName.indexOf('总调度') !== -1 || this.roleName.indexOf('分管调度') !== -1){
  104. // 调度、台账、到期提醒
  105. this.dispatch = true //调度
  106. this.sBook = true //台账
  107. this.reminder = true //到期提醒
  108. }
  109. }
  110. if (this.roleName.indexOf('admin') !== -1){
  111. this.entrust = true
  112. this.dispatch = true
  113. this.sBook = true
  114. this.reminder = true
  115. this.sendACar = true
  116. this.track = true
  117. }
  118. if (this.roleName.indexOf('客户') !== -1){
  119. if (this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('业务员') !== -1){
  120. // 委托、台账
  121. this.entrust = true //委托
  122. this.sBook = true //台账
  123. }else {
  124. this.entrust = true
  125. this.dispatch = false
  126. this.sBook = false
  127. this.reminder = false
  128. this.sendACar = false
  129. this.track = false
  130. }
  131. }
  132. if (this.roleName.indexOf('车队') !== -1){
  133. this.entrust = false
  134. this.dispatch = false
  135. this.sBook = false
  136. this.reminder = false
  137. this.sendACar = true
  138. this.track = false
  139. }
  140. },
  141. methods: {
  142. inPage(type) {
  143. switch (type) {
  144. case "wt":
  145. this.$router.push("/landTransportation/placeAnOrder/index");
  146. break;
  147. case "dd":
  148. this.$router.push("/landTransportation/dispatchingCars/index");
  149. break;
  150. case "pc":
  151. this.$router.push("/landTransportation/motorcadeDriver/index");
  152. break;
  153. case "gz":
  154. this.$router.push("/landTransportation/driver/index");
  155. break;
  156. case "lytz":
  157. this.$router.push("/landTransportation/reportAnalysis/index");
  158. break;
  159. case "dqtx":
  160. this.enclosure = true
  161. break;
  162. }
  163. },
  164. //查询
  165. onLoad() {
  166. driverRemind().then(res=>{
  167. this.data = res.data.data
  168. })
  169. }
  170. }
  171. };
  172. </script>
  173. <style lang="scss" scoped>
  174. .home-container {
  175. padding: 5px;
  176. box-sizing: border-box;
  177. height: 100%;
  178. ::v-deep .el-card__body {
  179. padding: 10px 15px;
  180. font-size: 14px;
  181. }
  182. &__card {
  183. width: 100%;
  184. height: 100%;
  185. }
  186. .title {
  187. display: flex;
  188. justify-content: space-between;
  189. }
  190. }
  191. .tradingIcon {
  192. font-size: 36px;
  193. }
  194. .content {
  195. display: flex;
  196. &-icon {
  197. display: flex;
  198. flex-direction: column;
  199. align-items: center;
  200. margin: 1.5vh 1vw 0vh 1vw;
  201. span {
  202. margin-top: 1vh;
  203. }
  204. }
  205. }
  206. </style>