12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- // pages/qiye/qiye.js
- import http from '../../base/httputil'
- const app = getApp()
- Page({
- /**
- * 组件的初始数据
- */
- onLoad() {
-
- },
- onShow(){
- this.initQiyePage()
- },
- data: {
- host: app.globalData.host,
- weekCount: 0,
- monthCount: 0,
- totalCount: 0,
- enterpriseList: [],
- menulist: [{
- "id": "1",
- "url": "icon-anquanxuncha",
- "title": "巡查",
- },
- {
- "id": "2",
- "url": "icon-xunjian",
- "title": "巡检",
- },
- ],
- mainmodel: {
- }
- },
- // 搜索结果跳页
- bindViewSearchEnd() {
- wx.navigateTo({
- url: '../search/search'
- })
- },
- // 企业详细页
- bindViewDetails(e) {
- let busEnterpriseId = e.currentTarget.dataset.enterpriseid
- let delFlag = e.currentTarget.dataset.delflag
- if(delFlag==1){
- wx.showToast({
- title: '该企业已废弃',
- icon:'none'
- })
- }else{
- wx.navigateTo({
- url: '../details/details?busEnterpriseId=' + busEnterpriseId
- })
- }
- },
- //企业表单详细
- bindViewQiYeMore() {
- wx.navigateTo({
- url: '../qiyemore/qiyemore',
- })
- },
- initQiyePage() {
- http.send_post("/system/AppEnterpriseController/getInitEnterpriseData", null, this.getQiyePageSuccess)
- http.send_post("/system/AppEnterpriseController/getInitEnterpriseList", null, this.getQiyeEnterpriseListSuccess)
- },
- getQiyePageSuccess(res) {
- if(res.code==200){
- let enterpriseCount = res.data.enterpriseCount;
- this.setData({
- weekCount: enterpriseCount.weekCount,
- monthCount: enterpriseCount.monthCount,
- totalCount: enterpriseCount.totalCount,
- })
- }
-
- },
- getQiyeEnterpriseListSuccess(res) {
- if(res.code==200){
- this.setData({
- enterpriseList: res.rows
- })}
- },
- changeSearch(e) {
- }
- })
|