index.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <template>
  2. <view>
  3. <view v-if="user.userType != '3'" style="padding: 15px 30rpx 5rpx 30rpx;">
  4. <view class="" style="display: flex;flex-flow: row wrap;">
  5. <view class="topTools" @click="toTXLPage()">
  6. <view>
  7. <image src="../../static/img/app/txl.png"></image>
  8. 通讯录
  9. </view>
  10. </view>
  11. <view class="topTools">
  12. <view>
  13. <image src="../../static/img/app/zzgl.png"></image>
  14. 组织
  15. </view>
  16. </view>
  17. <view class="topTools" @click="$goto('../../pageApp/my/MyApproval')">
  18. <view>
  19. <image src="../../static/img/app/wddb.png"></image>
  20. 待办
  21. </view>
  22. </view>
  23. <view class="topTools">
  24. <view>
  25. <image src="../../static/img/app/rc.png"></image>
  26. 日程
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <view v-if="user.userType != '3'" class="view view1">
  32. <view>
  33. 我的
  34. </view>
  35. <classify1 :list="me"></classify1>
  36. </view>
  37. <view v-if="type === 3">
  38. <view v-if="user.userType != '3'" class="view">
  39. <view>
  40. 人事管理
  41. </view>
  42. <classify1 :list="personnel"></classify1>
  43. </view>
  44. <view v-if="user.userType != '3'" class="view">
  45. <view>
  46. 行政管理
  47. </view>
  48. <classify1 :list="administrative"></classify1>
  49. </view>
  50. <view v-if="user.userType != '3'" class="view">
  51. <view>
  52. 工会服务
  53. </view>
  54. <classify1 :list="workerAssociationAppData"></classify1>
  55. </view>
  56. <view v-if="user.userType != '3'" class="view">
  57. <view>
  58. 其他
  59. </view>
  60. <classify1 :list="elseAppData"></classify1>
  61. </view>
  62. </view>
  63. <view v-if="type === 4">
  64. <view v-for="item in hsjkAppPageData" class="view">
  65. <view>
  66. {{item.modelName}}
  67. </view>
  68. <classify1 :list="item.data"></classify1>
  69. </view>
  70. </view>
  71. <view class="view">
  72. <view>
  73. 平台应用
  74. </view>
  75. <classify1 :list="indexConfig.middleIcon" :url="baseURL"></classify1>
  76. </view>
  77. </view>
  78. </template>
  79. <script>
  80. import Classify1 from '@/components/classify-1/classify-1.vue'
  81. import {
  82. hsjkAppPageData
  83. } from './hskj.js'
  84. export default {
  85. components: {
  86. Classify1
  87. },
  88. data() {
  89. return {
  90. hsjkAppPageData: hsjkAppPageData,
  91. type: undefined,
  92. baseURL: this.$BASE_URL,
  93. indexConfig: [{
  94. name: 'classify-1',
  95. data: []
  96. }],
  97. me: [{
  98. text: '我的已办',
  99. imgPath: '../../static/img/app/yiwancheng.png',
  100. link: "../../pageApp/my/myAll",
  101. }, {
  102. text: '我的发起',
  103. imgPath: '../../static/img/app/wdfq.png',
  104. link: "../../pageApp/my/myLaunch",
  105. count: 0
  106. }, {
  107. text: '我的审批',
  108. imgPath: '../../static/img/app/dengdaishenpi.png',
  109. link: "../../pageApp/my/MyApproval",
  110. count: 0
  111. }, {
  112. text: '抄送记录',
  113. imgPath: '../../static/img/app/qjjl.png',
  114. link: "../../pageApp/my/myCc",
  115. count: 0
  116. }, {
  117. text: '我的档案',
  118. imgPath: '../../static/img/app/wdda.png',
  119. link: "../../pages/user/profile"
  120. }],
  121. personnel: [{
  122. text: '请假申请',
  123. imgPath: '../../static/img/app/qingjia.png',
  124. link: "../../pageApp/hr/leave"
  125. },
  126. {
  127. text: '入职办理',
  128. imgPath: '../../static/img/app/rzsq.png',
  129. link: "../../pageApp/hr/entry",
  130. },
  131. {
  132. text: '离职申请',
  133. imgPath: '../../static/img/app/lzsq.png',
  134. link: "../../pageApp/hr/dimission",
  135. }, {
  136. text: '工资条',
  137. imgPath: '../../static/img/app/gzt.png',
  138. link: "../../pageA/salary/salary",
  139. count: 0
  140. },
  141. // {
  142. // text: '面试记录',
  143. // imgPath: '../../static/img/app/gzt.png',
  144. // link: "../../pageApp/hr/interview",
  145. // count: 0
  146. // }
  147. ],
  148. administrative: [{
  149. text: '物资登记',
  150. imgPath: '../../static/img/app/wuzidengji.png',
  151. link: "../../pageApp/administration/reserve?pageType=dj"
  152. }, {
  153. text: '物资领用',
  154. imgPath: '../../static/img/app/wupinglinyong.png',
  155. link: "../../pageApp/administration/reserve?pageType=ly"
  156. },
  157. // {
  158. // text: '物资归还',
  159. // imgPath: '../../static/img/app/wpgh.png',
  160. // link: "../../pageApp/administration/reserve?pageType=gh"
  161. // },
  162. {
  163. text: '用章申请',
  164. imgPath: '../../static/img/app/yzsq.png',
  165. link: "../../pageApp/administration/useSeal"
  166. }
  167. // , {
  168. // text: '合同管理',
  169. // imgPath: '../../static/img/app/htgl.png',
  170. // link: "../../pageApp/other/contract"
  171. // }
  172. ],
  173. workerAssociationAppData: [{
  174. text: '福利领取',
  175. imgPath: '../../static/img/app/fulilingqu.png',
  176. link: "../../pageA/club/welfareList",
  177. count: 0
  178. }, {
  179. text: '社团预约',
  180. imgPath: '../../static/img/app/shetuanyuyue.png',
  181. link: "../../pageA/club/index"
  182. }, {
  183. text: '关心关爱',
  184. imgPath: '../../static/img/app/gxga.png',
  185. link: "../../pageA/club/careAndLove"
  186. }],
  187. elseAppData: [{
  188. text: '采购申请',
  189. imgPath: '../../static/img/app/cgsq.png',
  190. link: "../../pageApp/other/purchase"
  191. },
  192. // {
  193. // text: '设备报废',
  194. // imgPath: '../../static/img/app/devicebaofei.png',
  195. // link: "../../pageApp/other/scrap"
  196. // },
  197. {
  198. text: '报修申请',
  199. imgPath: '../../static/img/app/devicebaoxiu.png',
  200. link: "../../pageApp/other/repairs"
  201. }],
  202. user: {}
  203. }
  204. },
  205. mounted() {
  206. this.$wsConnection.reconnect()
  207. this.type = uni.getStorageSync("tabType")
  208. this.user = uni.getStorageSync("userInfo")
  209. let orgInfo = uni.getStorageSync("orgInfo");
  210. uni.setStorageSync('refreshStart', 1)
  211. let baseUrlSocket = this.$BASE_URL_SOCKET
  212. if (!uni.getStorageSync('deptData')) {
  213. this.$httpRequest({
  214. url: '/app/deptInfo?id=' + uni.getStorageSync('org_dept_parent_id'),
  215. urlType: this.$getUrlType()
  216. }).then(res => {
  217. if (res.data.code === 200) {
  218. uni.setStorageSync('deptData', res.data.data)
  219. }
  220. })
  221. }
  222. if (!uni.getStorageSync('postsData')) {
  223. this.$httpRequest({
  224. url: '/app/posts',
  225. urlType: this.$getUrlType()
  226. }).then(res => {
  227. if (res.data.code === 200) {
  228. uni.setStorageSync('postsData', res.data.data)
  229. }
  230. })
  231. }
  232. let that = this
  233. that.updateMsg()
  234. setInterval(() => {
  235. that.updateMsg()
  236. }, 1000);
  237. },
  238. onShow() {
  239. uni.reLaunch({
  240. url: '/pages/tabbar/wpTabbar'
  241. })
  242. // uni.switchTab({
  243. // url: 'pages/integral/index'
  244. // })
  245. this.user = {}
  246. // this.getHomeConfigData()
  247. this.user = uni.getStorageSync("userInfo")
  248. let orgInfo = uni.getStorageSync("orgInfo");
  249. // let pinf = plus.push.getClientInfo();
  250. // let cid = pinf && pinf.clientid || ''; //客户端标识
  251. },
  252. onHide() {},
  253. methods: {
  254. updateMsg() {
  255. //初始化
  256. this.me[1].count = 0
  257. this.me[2].count = 0
  258. this.me[3].count = 0
  259. this.personnel[3].count = 0
  260. let data = uni.getStorageSync("msgData")
  261. if (!data) {
  262. this.me[1].count = 0
  263. this.me[2].count = 0
  264. this.me[3].count = 0
  265. this.personnel[3].count = 0
  266. return
  267. }
  268. data = JSON.parse(data)
  269. //参数赋值
  270. this.me[1].count = data.m4
  271. this.me[2].count = data.m1 + data.m5
  272. this.me[3].count = data.m7
  273. this.personnel[3].count = data.m3
  274. this.workerAssociationAppData[0].count = data.m8
  275. },
  276. toTXLPage() {
  277. this.$goto("../../pageA/msg/index")
  278. },
  279. async getHomeConfigData() {
  280. const {
  281. data: res
  282. } = await this.$httpRequest({
  283. url: '/config/getHomeConfigData?orgCode=' + uni.getStorageSync("orgInfo")
  284. .organizationCode,
  285. method: 'get',
  286. })
  287. if (res.code == 200) {
  288. this.indexConfig = res.data
  289. } else {
  290. this.indexConfig = []
  291. uni.showToast({
  292. icon: 'none',
  293. title: res.msg
  294. })
  295. }
  296. }
  297. }
  298. }
  299. </script>
  300. <style lang="scss" scoped>
  301. .view {
  302. background-color: #ffffff;
  303. border: 1px solid #e0e0e0;
  304. color: #616161;
  305. margin-bottom: 5px;
  306. margin-left: 15rpx;
  307. margin-right: 15rpx;
  308. padding: 5px 10px;
  309. border-radius: 25rpx;
  310. font-size: 15px;
  311. padding: 5px 15px;
  312. }
  313. .view1 {
  314. margin-top: 5px;
  315. }
  316. .topTools {
  317. color: #5a5a5a;
  318. text-align: center;
  319. flex-direction: row;
  320. justify-content: center;
  321. width: 25%;
  322. font-size: 14px;
  323. }
  324. .topTools image {
  325. width: 50px;
  326. height: 50px;
  327. }
  328. .uni-tabbar__icon {
  329. width: 48px;
  330. height: 24px;
  331. }
  332. </style>