index.vue 8.1 KB

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