index.vue 8.0 KB

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