index.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  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/administration/phoneApply"
  171. },
  172. {
  173. text: '信访件',
  174. imgPath: '../../static/img/app/xfj.png',
  175. link: "../../pageApp/administration/xfj"
  176. }
  177. // , {
  178. // text: '合同管理',
  179. // imgPath: '../../static/img/app/htgl.png',
  180. // link: "../../pageApp/other/contract"
  181. // }
  182. ],
  183. workerAssociationAppData: [{
  184. text: '福利领取',
  185. imgPath: '../../static/img/app/fulilingqu.png',
  186. link: "../../pageA/club/welfareList",
  187. count: 0
  188. }, {
  189. text: '社团预约',
  190. imgPath: '../../static/img/app/shetuanyuyue.png',
  191. link: "../../pageA/club/index"
  192. }, {
  193. text: '关心关爱',
  194. imgPath: '../../static/img/app/gxga.png',
  195. link: "../../pageA/club/careAndLove"
  196. }],
  197. elseAppData: [{
  198. text: '采购申请',
  199. imgPath: '../../static/img/app/cgsq.png',
  200. link: "../../pageApp/other/purchase"
  201. },
  202. // {
  203. // text: '设备报废',
  204. // imgPath: '../../static/img/app/devicebaofei.png',
  205. // link: "../../pageApp/other/scrap"
  206. // },
  207. {
  208. text: '报修申请',
  209. imgPath: '../../static/img/app/devicebaoxiu.png',
  210. link: "../../pageApp/other/repairs"
  211. }],
  212. user: {}
  213. }
  214. },
  215. mounted() {
  216. this.$wsConnection.reconnect()
  217. this.type = uni.getStorageSync("tabType")
  218. this.user = uni.getStorageSync("userInfo")
  219. let orgInfo = uni.getStorageSync("orgInfo");
  220. uni.setStorageSync('refreshStart', 1)
  221. let baseUrlSocket = this.$BASE_URL_SOCKET
  222. if (!uni.getStorageSync('deptData')) {
  223. this.$httpRequest({
  224. url: '/app/deptInfo?id=' + uni.getStorageSync('org_dept_parent_id'),
  225. urlType: this.$getUrlType()
  226. }).then(res => {
  227. if (res.data.code === 200) {
  228. uni.setStorageSync('deptData', res.data.data)
  229. }
  230. })
  231. }
  232. if (!uni.getStorageSync('postsData')) {
  233. this.$httpRequest({
  234. url: '/app/posts',
  235. urlType: this.$getUrlType()
  236. }).then(res => {
  237. if (res.data.code === 200) {
  238. uni.setStorageSync('postsData', res.data.data)
  239. }
  240. })
  241. }
  242. let that = this
  243. that.updateMsg()
  244. setInterval(() => {
  245. that.updateMsg()
  246. }, 1000);
  247. },
  248. onShow() {
  249. uni.reLaunch({
  250. url: '/pages/tabbar/wpTabbar'
  251. })
  252. // uni.switchTab({
  253. // url: 'pages/integral/index'
  254. // })
  255. this.user = {}
  256. // this.getHomeConfigData()
  257. this.user = uni.getStorageSync("userInfo")
  258. let orgInfo = uni.getStorageSync("orgInfo");
  259. // let pinf = plus.push.getClientInfo();
  260. // let cid = pinf && pinf.clientid || ''; //客户端标识
  261. },
  262. onHide() {},
  263. methods: {
  264. updateMsg() {
  265. //初始化
  266. this.me[1].count = 0
  267. this.me[2].count = 0
  268. this.me[3].count = 0
  269. this.personnel[3].count = 0
  270. let data = uni.getStorageSync("msgData")
  271. if (!data) {
  272. this.me[1].count = 0
  273. this.me[2].count = 0
  274. this.me[3].count = 0
  275. this.personnel[3].count = 0
  276. return
  277. }
  278. data = JSON.parse(data)
  279. //参数赋值
  280. this.me[1].count = data.m4
  281. this.me[2].count = data.m1 + data.m5
  282. this.me[3].count = data.m7
  283. this.personnel[3].count = data.m3
  284. this.workerAssociationAppData[0].count = data.m8
  285. },
  286. toTXLPage() {
  287. this.$goto("../../pageA/msg/index")
  288. },
  289. async getHomeConfigData() {
  290. const {
  291. data: res
  292. } = await this.$httpRequest({
  293. url: '/config/getHomeConfigData?orgCode=' + uni.getStorageSync("orgInfo")
  294. .organizationCode,
  295. method: 'get',
  296. })
  297. if (res.code == 200) {
  298. this.indexConfig = res.data
  299. } else {
  300. this.indexConfig = []
  301. uni.showToast({
  302. icon: 'none',
  303. title: res.msg
  304. })
  305. }
  306. }
  307. }
  308. }
  309. </script>
  310. <style lang="scss" scoped>
  311. .view {
  312. background-color: #ffffff;
  313. border: 1px solid #e0e0e0;
  314. color: #616161;
  315. margin-bottom: 5px;
  316. margin-left: 15rpx;
  317. margin-right: 15rpx;
  318. padding: 5px 10px;
  319. border-radius: 25rpx;
  320. font-size: 15px;
  321. padding: 5px 15px;
  322. }
  323. .view1 {
  324. margin-top: 5px;
  325. }
  326. .topTools {
  327. color: #5a5a5a;
  328. text-align: center;
  329. flex-direction: row;
  330. justify-content: center;
  331. width: 25%;
  332. font-size: 14px;
  333. }
  334. .topTools image {
  335. width: 50px;
  336. height: 50px;
  337. }
  338. .uni-tabbar__icon {
  339. width: 48px;
  340. height: 24px;
  341. }
  342. </style>