Mr.Zhang
2023-09-13 52da0c6d7c0740b93189839449904d6f282c4ac7
小程序
已添加4个文件
已修改15个文件
15613 ■■■■ 文件已修改
h5_standard/.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/LogInAgain.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/common/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/common/css/lib.css 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/manifest.json 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages/login/login.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/store/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/uni.scss 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platform_web/.env.development 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platform_web/package-lock.json 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platform_web/package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
platform_web/src/api/business/companyLogin.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platform_web/src/api/business/workbench.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platform_web/src/views/business/companyLoginLog.vue 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platform_web/src/views/business/workbench.vue 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
platform_web/yarn.lock 15126 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen_standard/src/views/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web_standard/.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web_standard/src/views/ext/workorderRecordExt.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/.env.development
@@ -20,7 +20,7 @@
# VUE_APP_API = 'http://192.168.0.13:10012/'
# VUE_APP_API = 'http://192.168.0.15:10012/'
VUE_APP_API = 'http://192.168.0.15:10021/'
# åˆ˜ç£Šç£Š
# VUE_APP_API = 'http://192.168.0.18:10012/'
h5_standard/src/views/LogInAgain.vue
@@ -84,20 +84,20 @@
      //   uuid: '0000',
      //   code: '0000'
      // })
      // let res = await testLogin({  // å¤§æ “
      //   username: '18019924213',
      //   password: '123456',
      //   companyId: '8',
      //   uuid: '0000',
      //   code: '0000'
      // })
      let res = await testLogin({ // æ–‡æ­¦
        username: '18656077929',
      let res = await testLogin({  // å¤§æ “
        username: '18019924213',
        password: '123456',
        companyId: '111',
        companyId: '8',
        uuid: '0000',
        code: '0000'
      })
      // let res = await testLogin({ // æ–‡æ­¦
      //   username: '18656077929',
      //   password: '123456',
      //   companyId: '111',
      //   uuid: '0000',
      //   code: '0000'
      // })
      // let res = await testLogin({ // å¼ ç£Šé«˜
      //   username: '15256913207',
      //   password: '123456',
minipro_standard/common/config.js
@@ -1,7 +1,7 @@
module.exports = {
    // baseUrl: 'http://106.14.20.42/test_hfznzz/',
    // baseUrl: 'https://hefei.dtkey.cn/test_hfznzz/',
    // baseUrl: 'http://192.168.0.18:10021',
    // baseUrl: '/doumeeplant_api',
    baseUrl: 'https://dmtest.ahapp.net/doumeeplant_api',
    phoneRegular: /^1[3456789]\d{9}$/,
    mailboxRegular: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
minipro_standard/common/css/lib.css
@@ -95,7 +95,7 @@
.sbtn_black_rim{ color: #333; border-color:#eee; }
.sbtn_gray_rim{ color: #999; border-color:#ccc; }
/* flex */
.flex{ display: flex;}
.flex{ display: flex !important;}
.cXY{ display: flex;  align-items: center;justify-content: center;}
.cY{ display: flex; align-items: center;}
.cX{display: flex; justify-content: center}
minipro_standard/manifest.json
@@ -75,5 +75,30 @@
    "uniStatistics" : {
        "enable" : false
    },
    "vueVersion" : "2"
    "vueVersion": "2",
    "h5": {
        "router": {
            "mode": "hash",
            "base": "/h5/"
        },
        "template": "index.html",
        "title": "DM云工厂",
        "sdkConfigs": {
            "maps": {}
        },
        "devServer": {
            "port": 1801,
            "proxy": {
                "^/doumeeplant_api": {
                    "target": "https://dmtest.ahapp.net/doumeeplant_api",
                    "ws": true,
                    "changeOrigin": true,
                    "pathRewrite": {
                        "^/doumeeplant_api": ""
                    }
                }
            }
        }
    }
}
minipro_standard/pages/login/login.vue
@@ -7,7 +7,7 @@
        </view>
        <view class="bg_w rd8 ptb30 pl40 bbox com-input flex input-height">
            <image src="@/static/login_ic_code@2x.png" mode="" class="img40 mr25"></image>
            <u--input placeholder="企业代码" border="none" v-model="form.companyId"></u--input>
            <input placeholder="企业代码" border="none" v-model="form.companyId"/>
        </view>
        <view class="bg_w rd8 ptb30 pl40 bbox mt40 flex input-height">
            <image src="@/static/login_ic_phone@2x.png" mode="" class="img40 mr25"></image>
minipro_standard/store/index.js
@@ -87,6 +87,7 @@
        },
        // èŽ·å–çŠ¶æ€é«˜åº¦
        getHeight(context) {
            // #ifdef MP-WEIXIN
            let res = uni.getMenuButtonBoundingClientRect()
            let status = uni.getSystemInfoSync()
            let menuButtonWidth = res.width
@@ -99,6 +100,8 @@
                height,
                menuButtonWidth
            })
            // #endif
        },
        async getUpcomingNum(context) {
            let res = await pageCount({})
minipro_standard/uni.scss
@@ -98,3 +98,19 @@
.backred {
  background: $nav-stateColor4 !important;
}
/* #ifdef H5 */
img {
    width: 100%;
    height: 100%;
}
view {
    display: block;
}
image {
    display: block;
}
/* #endif */
platform_web/.env.development
@@ -21,6 +21,7 @@
#焦松
#VUE_APP_BASE_URL = 'http://192.168.0.36:10021/'
#刘磊磊本地
VUE_APP_BASE_URL = 'http://192.168.0.18:10021/'
#任康
本地
VUE_APP_BASE_URL = 'http://192.168.0.15:10021/'
# VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/'
platform_web/package-lock.json
@@ -18,7 +18,7 @@
        "@wangeditor/editor-for-vue": "^1.0.2",
        "axios": "^0.21.1",
        "core-js": "^3.6.5",
        "echarts": "^5.4.2",
        "echarts": "^5.4.3",
        "ele-calendar": "^2.0.0",
        "element-ui": "^2.15.13",
        "js-cookie": "^2.2.1",
@@ -6000,12 +6000,12 @@
      }
    },
    "node_modules/echarts": {
      "version": "5.4.2",
      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.2.tgz",
      "integrity": "sha512-2W3vw3oI2tWJdyAz+b8DuWS0nfXtSDqlDmqgin/lfzbkB01cuMEN66KWBlmur3YMp5nEDEEt5s23pllnAzB4EA==",
      "version": "5.4.3",
      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz",
      "integrity": "sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==",
      "dependencies": {
        "tslib": "2.3.0",
        "zrender": "5.4.3"
        "zrender": "5.4.4"
      }
    },
    "node_modules/echarts/node_modules/tslib": {
@@ -17367,9 +17367,9 @@
      "dev": true
    },
    "node_modules/zrender": {
      "version": "5.4.3",
      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.3.tgz",
      "integrity": "sha512-DRUM4ZLnoaT0PBVvGBDO9oWIDBKFdAVieNWxWwK0niYzJCMwGchRk21/hsE+RKkIveH3XHCyvXcJDkgLVvfizQ==",
      "version": "5.4.4",
      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz",
      "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==",
      "dependencies": {
        "tslib": "2.3.0"
      }
@@ -22320,12 +22320,12 @@
      }
    },
    "echarts": {
      "version": "5.4.2",
      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.2.tgz",
      "integrity": "sha512-2W3vw3oI2tWJdyAz+b8DuWS0nfXtSDqlDmqgin/lfzbkB01cuMEN66KWBlmur3YMp5nEDEEt5s23pllnAzB4EA==",
      "version": "5.4.3",
      "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz",
      "integrity": "sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==",
      "requires": {
        "tslib": "2.3.0",
        "zrender": "5.4.3"
        "zrender": "5.4.4"
      },
      "dependencies": {
        "tslib": {
@@ -31650,9 +31650,9 @@
      }
    },
    "zrender": {
      "version": "5.4.3",
      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.3.tgz",
      "integrity": "sha512-DRUM4ZLnoaT0PBVvGBDO9oWIDBKFdAVieNWxWwK0niYzJCMwGchRk21/hsE+RKkIveH3XHCyvXcJDkgLVvfizQ==",
      "version": "5.4.4",
      "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz",
      "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==",
      "requires": {
        "tslib": "2.3.0"
      },
platform_web/package.json
@@ -20,7 +20,7 @@
    "@wangeditor/editor-for-vue": "^1.0.2",
    "axios": "^0.21.1",
    "core-js": "^3.6.5",
    "echarts": "^5.4.2",
    "echarts": "^5.4.3",
    "ele-calendar": "^2.0.0",
    "element-ui": "^2.15.13",
    "js-cookie": "^2.2.1",
platform_web/src/api/business/companyLogin.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
import request from '../../utils/request'
// æŸ¥è¯¢
export function fetchList (data) {
  return request.post('/system/loginLog/companyLoginStatisticsPage', data, {
    trim: true
  })
}
// æŸ¥è¯¢
export function exportExcel (data) {
  return request.post('/system/loginLog/companyLoginStatisticsExport', data, {
    trim: true,
    download: true
  })
}
platform_web/src/api/business/workbench.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
import request from '../../utils/request'
// å·¥ä½œå°æ´»è·ƒæ•°æ®
export function getStagingLoginVO () {
  return request.get('/ext/stagingExt/getStagingLoginVO')
}
// å·¥ä½œå°æ´»è·ƒæ•°æ®è¶‹åŠ¿å›¾
export function getActivityLoginVOList (data) {
  return request.post('/ext/stagingExt/getActivityLoginVOList', data)
}
platform_web/src/views/business/companyLoginLog.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,138 @@
<template>
  <TableLayout :permissions="['system:loginLog:query']">
    <!-- æœç´¢è¡¨å• -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-form-item label="年月" prop="queryMonth">
        <el-date-picker
          v-model="searchForm.queryMonth"
          type="month"
          value-format="yyyy-MM"
          placeholder="选择年月"
          @change="handleSearchTimeChange"
        ></el-date-picker>
      </el-form-item>
      <el-form-item label="企业名称" prop="companyName">
        <el-input v-model="searchForm.companyName" placeholder="请输入企业名称" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="来源" prop="orgin">
        <el-select v-model="searchForm.orgin" placeholder="请选择登录来源" clearable @change="search">
          <el-option value="0" label="PC登陆"/>
          <el-option value="1" label="钉钉平台"/>
          <el-option value="2" label="羚羊平台"/>
          <el-option value="3" label="EDGP平台"/>
          <el-option value="4" label="微信小程序"/>
        </el-select>
      </el-form-item>
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
        <el-button @click="reset">重置</el-button>
      </section>
    </el-form>
    <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
    <template v-slot:table-wrap>
      <ul class="toolbar">
        <el-button :loading="isWorking.export" type="primary" @click="exportExcel">导出</el-button>
      </ul>
      <el-table
        v-loading="isWorking.search"
        :data="tableData.list"
        stripe
        border
        @sort-change="handleSortChange"
      >
        <el-table-column prop="dataDate" label="登录时间" align="center" min-width="100px"></el-table-column>
        <el-table-column prop="companyName" label="企业名称" align="center" min-width="100px"></el-table-column>
        <el-table-column prop="orgin" label="渠道" align="center" min-width="100px">
           <template slot-scope="{row}">
            {{row.orgin | orginText}}
          </template>
        </el-table-column>
        <el-table-column prop="loginNum" label="登录次数" align="center" min-width="100px"></el-table-column>
      </el-table>
      <pagination
          @size-change="handleSizeChange"
          @current-change="handlePageChange"
          :pagination="tableData.pagination"
      ></pagination>
    </template>
  </TableLayout>
</template>
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
export default {
  name: 'SystemLoginLog',
  extends: BaseTable,
  components: { TableLayout, Pagination },
  data () {
    return {
      // æœç´¢æ—¶é—´èŒƒå›´
      searchDateRange: [],
      // æœç´¢
      searchForm: {
        companyName: '',
        queryMonth: '',
        orgin: ''
      }
    }
  },
  filters: {
    // ç™»å½•状态
    statusText (value) {
      if (value) {
        return '登录成功'
      }
      return '登录失败'
    },
    orginText (value) {
      if (value ==0) {
        return 'pc平台'
      }else  if (value == 1) {
        return '钉钉平台'
      }else  if (value == 2) {
       return '羚羊平台'
      }else  if (value == 3) {
       return 'EDGP平台'
      }else{
        return 'pc-平台';
      }
    }
  },
  methods: {
    // æ—¶é—´æœç´¢èŒƒå›´å˜åŒ–
  },
  created () {
    this.config({
      module: '登录日志',
      api: '/business/companyLogin',
      'field.id': 'id',
      'field.main': 'id',
      sorts: [{
        property: 'LOGIN_TIME',
        direction: 'DESC'
      }]
    })
    this.search()
  },
  methods: {
    handleSearchTimeChange (value) {
      this.search()
    },
    // reset() {
    //   this.$refs.searchForm.resetFields()
    //   this.searchDateRange = []
    //   this.searchForm.startTime = ''
    //   this.searchForm.endTime = ''
    //   this.search()
    // }
  }
}
</script>
platform_web/src/views/business/workbench.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,196 @@
<template>
  <div class="content">
    <div class="top-num">
      <div class="title">数据统计</div>
      <div class="num-content">
        <div class="num-item" v-for="(item, index) in statistics" :key="index">
          <div class="num-title">{{ item.title }}</div>
          <div class="num-value">{{ item.num }}</div>
        </div>
      </div>
    </div>
    <div class="table">
      <div class="tool">
        <div class="title">用户登录次数趋势图</div>
        <div class="right-option">
          <el-date-picker
            v-model="value"
            type="daterange"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :default-time="['00:00:00', '23:59:59']">
          </el-date-picker>
          <div style="width: 5px;"></div>
          <el-select v-model="searchForm.orgin" placeholder="请选择登录来源" clearable @change="getList">
            <el-option value="0" label="PC登陆"/>
            <el-option value="1" label="钉钉平台"/>
            <el-option value="2" label="羚羊平台"/>
            <el-option value="3" label="EDGP平台"/>
            <el-option value="4" label="微信小程序"/>
          </el-select>
        </div>
      </div>
      <div id="chart"></div>
    </div>
  </div>
</template>
<script>
import { getStagingLoginVO, getActivityLoginVOList } from "@/api/business/workbench.js"
import * as eCharts from 'echarts'
export default {
  data() {
    return {
      statistics: [
        {
          title: '今日活跃用户',
          num: ''
        },
        {
          title: '今日活跃企业',
          num: ''
        },
        {
          title: '本月登录企业数',
          num: ''
        },
        {
          title: '本月登录2次及以上企业数',
          num: ''
        },
        {
          title: '本月登录2次及以上企业数(羚羊)',
          num: ''
        }
      ],
      value: [],
      searchForm: {
        orgin: '',
        startDate: '',
        endDate: ''
      },
      list: []
    }
  },
  created() {
    let temp = new Date()
    let startTemp = new Date()
    this.searchForm.endDate = `${temp.getFullYear()}-${temp.getMonth() + 1}-${temp.getDate()}`
    startTemp.setTime(startTemp.getTime() - 3600 * 1000 * 24 * 15)
    this.searchForm.startDate = `${startTemp.getFullYear()}-${startTemp.getMonth() + 1}-${startTemp.getDate()}`
    this.value = [this.searchForm.startDate, this.searchForm.endDate]
    this.getList()
    getStagingLoginVO()
      .then(res => {
        this.statistics[0].num = res.dayActiveUserNum
        this.statistics[1].num = res.dayActiveCompanyNum
        this.statistics[2].num = res.monthActiveCompanyNum
        this.statistics[3].num = res.monthTwoCompanyNum
        this.statistics[4].num = res.monthTwoCompanyLYNum
      })
  },
  methods: {
    getList() {
      getActivityLoginVOList(this.searchForm)
        .then(res => {
          this.list = res
          this.renderChart()
        })
    },
    renderChart() {
      let chart = eCharts.init(document.getElementById('chart'))
      let name = []
      let num = []
      this.list.forEach(item => {
        name.push(item.dataDate)
        num.push(item.dayActiveUserNum)
      })
      chart.setOption({
        tooltip: {},
        grid: {
          top: 40,
          bottom: 30,
          left: 60,
          rigth: 30
        },
        xAxis: {
          type: 'category',
          boundaryGap: false,
          data: name
        },
        yAxis: {},
        series: [
          {
            name: '销量',
            type: 'line',
            data: num
          }
        ]
      })
    },
  },
}
</script>
<style lang="scss" scoped>
.content {
  background-color: #f7f7f7;
  padding: 0 10px;
  height: 100%;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  .title {
    font-weight: 500;
    font-size: 18px;
  }
  .top-num {
    padding: 20px;
    background-color: #fff;
    .num-content {
      margin-top: 20px;
      display: flex;
      .num-item {
        margin-right: 20px;
        flex: 1;
        box-shadow: 0px 0px 10px rgba(170, 170, 170, 0.349019607843137);
        padding: 20px;
        &:last-child {
          flex: 2;
          margin-right: 0;
        }
        .num-title {
          font-size: 16px;
        }
        .num-value {
          margin-top: 5px;
          font-size: 20px;
          font-weight: 600;
          color: #02a7f0;
        }
      }
    }
  }
  .table {
    flex: 1;
    margin-top: 10px;
    background-color: #fff;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    .tool {
      display: flex;
      justify-content: space-between;
      .right-option {
        display: flex;
      }
    }
    #chart {
      flex: 1;
    }
  }
}
</style>
platform_web/yarn.lock
ÎļþÌ«´ó
screen_standard/src/views/index.vue
@@ -410,7 +410,8 @@
    grid: {
      top: 40,
      bottom: 30,
      left: 60
      left: 60,
      right: 10
    },
    xAxis: {
      type: 'category',
web_standard/.env.development
@@ -18,11 +18,11 @@
# VUE_APP_BASE_URL = 'http://192.168.0.134:10021/'
# ä»»åº·æœ¬åœ°
# VUE_APP_BASE_URL = 'http://192.168.0.15:10021/'
VUE_APP_BASE_URL = 'http://192.168.0.15:10021/'
# æ±Ÿè
# VUE_APP_BASE_URL = 'http://192.168.0.35:10021/'
# æµ‹è¯•服务器
VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/'
# VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/'
web_standard/src/views/ext/workorderRecordExt.vue
@@ -151,10 +151,10 @@
                    {{ row.salaryType == 0 ? '计件' : (row.salaryType == 1 ? '计时' : '-') }}
        </template>
        </el-table-column>
        <el-table-column prop="salary" label="计价工资(元)" min-width="100px">
          <template slot-scope="{row}">
            <span>{{accDiv(Math.round(row.salary),1) }}</span>
          </template>
        <el-table-column prop="salaryYuan" label="计价工资(元)" min-width="100px">
          <!-- <template slot-scope="{row}">
            <span>{{accDiv(Math.round(row.salaryyuan),100) }}</span>
          </template> -->
        </el-table-column>
        <el-table-column prop="deviceCode" label="设备" show-overflow-tooltip min-width="100px">
          <template slot-scope="{row}">