index.vue 7.9 KB

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