diff --git a/supervise-report-ui/.env.development b/supervise-report-ui/.env.development index bc2bd356..bb727456 100644 --- a/supervise-report-ui/.env.development +++ b/supervise-report-ui/.env.development @@ -6,4 +6,4 @@ VUE_APP_BASE_API = '/api' ## 配置测试和本地开发时的 接口地址 ##VUE_APP_URL = "http://8.130.39.13:8112" -VUE_APP_URL = "http://192.168.0.108:7009" +VUE_APP_URL = "http://192.168.2.112:7009" diff --git a/supervise-report-ui/src/api/main/main.js b/supervise-report-ui/src/api/main/main.js index 715f30d3..09c9bef0 100644 --- a/supervise-report-ui/src/api/main/main.js +++ b/supervise-report-ui/src/api/main/main.js @@ -2,9 +2,35 @@ import request from '@/utils/request' // 主页 -// 列表 export default { + // 获取全部项目 + getProjectListAllNew(data) { + return request({ + url: '/v1/projectinformation/listAllNew', + method: 'get', + data: data + }) + }, + // 顶部数据 + getProjectDailySum(data) { + return request({ + url: '/projectdaily/getProjectDailySum', + method: 'post', + data: data + }) + }, + + // 分析图 + getProjectDailyZx(data) { + return request({ + url: '/projectdaily/getProjectDailyZx', + method: 'post', + data: data + }) + }, + + // 底部列表 getProjectDailys(data) { return request({ url: '/projectdaily/getProjectDailys', diff --git a/supervise-report-ui/src/main.js b/supervise-report-ui/src/main.js index 208eaf65..51ed9220 100644 --- a/supervise-report-ui/src/main.js +++ b/supervise-report-ui/src/main.js @@ -50,7 +50,7 @@ VueAMap.initAMapApiLoader({ Vue.config.productionTip = false let token = null -// let token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI4NWUwYWY0Yi1lMGJhLTQyM2UtOTIxMS1kYjI2MDg2NTgwM2YiLCJpc3MiOiJXQksiLCJleHAiOjE3MDA2NDM3OTN9.a9Zmp99E33LC4fCVSwD5rDpiivzQCXRShw8p8voL4OQ' +// let token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI4NWUwYWY0Yi1lMGJhLTQyM2UtOTIxMS1kYjI2MDg2NTgwM2YiLCJpc3MiOiJXQksiLCJleHAiOjE3MDA4Nzk3NjF9.2LvPpT8YheMSXVJN7B94LP0RCyx87XdNxTM9W2XDiEo' token = GetQueryString('token') if (token) { setStorage(token) diff --git a/supervise-report-ui/src/views/index.vue b/supervise-report-ui/src/views/index.vue index 02aafe29..49e86351 100644 --- a/supervise-report-ui/src/views/index.vue +++ b/supervise-report-ui/src/views/index.vue @@ -9,9 +9,9 @@
- - + @@ -34,10 +34,10 @@ 动产质押类项目
- 1 + {{info.dongChan}}
- 165161655元 + {{info.dcUseLimit}}元 @@ -48,10 +48,10 @@ 保证类项目
- 1 + {{info.baoZheng}}
- 165161655元 + {{info.bzUseLimit}}元 @@ -62,10 +62,10 @@ 应收帐款质押类项目
- 1 + {{info.yingShou}}
- 165161655元 + {{info.ysUseLimit}}元 @@ -77,9 +77,9 @@
账户余额 - ¥155651.15 - ↑ 15.66% - ↓ 12.21% + ¥{{info.accountsBalance}} + ↑ {{info.accountsBalanceBfb}}% + ↓ {{info.accountsBalanceBfb}}%
@@ -87,9 +87,9 @@
应收账款 - ¥155651.15 - ↑ 15.66% - ↓ 12.21% + ¥{{info.accountsReceivable}} + ↑ {{info.accountsReceivableBfb}}% + ↓ {{info.accountsReceivableBfb}}%
@@ -97,9 +97,9 @@
库存货值 - ¥155651.15 - ↑ 15.66% - ↓ 12.21% + ¥{{info.stockAmount}} + ↑ {{info.stockAmountBfb}}% + ↓ {{info.stockAmountBfb}}%
@@ -107,9 +107,9 @@
在途货值 - ¥155651.15 - ↑ 15.66% - ↓ 12.21% + ¥{{info.transitAmount}} + ↑ {{info.transitAmountBfb}}% + ↓ {{info.transitAmountBfb}}%
@@ -117,10 +117,9 @@
预付款 - ¥155651.15 - ↑ 15.66% - ↓ 12.21% - + ¥{{info.advancePayment}} + ↑ {{info.advancePaymentBfb}}% + ↓ {{info.advancePaymentBfb}}%
@@ -134,7 +133,13 @@ 库存分析图 -
+
+
+ + + + +
@@ -144,7 +149,8 @@
- + @@ -175,59 +181,114 @@ name: '', data() { return { + tableKey:0, tableLoading: false, times: getDateRang('yesterday'), projectValue: "全部项目", - projectList: [ - - { - label: "111111111", - value: "项目1" - }, - { - label: "222222", - value: "项目2" - }, - { - label: "333333", - value: "项目3" - } - ], - projectlistlData: [ - ], + projectSid: "", + projectList: [], + day: [{ + value: "7", + label: "7日", + }, { + value: "15", + label: "15日", + }], + dayValue: "15", + projectlistlData: [], + + info: {} } }, mounted() { - this.drawLine() + }, created() { + this.getProjectListAllNew() + this.getProjectDailySum() + this.getReportInventory() this.init() }, methods: { + getProjectListAllNew(){ + req.getProjectListAllNew().then(res => { + + console.log('getProjectListAllNew:', res) + + this.projectList = res.data + + }) + }, + + getProjectDailySum() { + + let params = { + orderDate: this.times, + projectSid: this.projectSid, + } + req.getProjectDailySum(params).then(res => { + console.log('getProjectDailySum:', res) + + this.info = res.data + + }) + }, init() { // 获取列表 let params = { orderDate: this.times, - projectSid: "", + projectSid: this.projectSid, } req.getProjectDailys(params).then(res => { console.log('getProjectDailys:', res) this.projectlistlData = res.data + + console.log('projectlistlData:', this.projectlistlData) }) }, + dayValueChange(val) { + + console.log('val:', val) + this.dayValue = val + this.getReportInventory() + }, + + getReportInventory() { + + let params = { + orderDate: this.times, + projectSid: this.projectSid, + intervalTime: this.dayValue + } + + req.getProjectDailyZx(params).then(res => { + + console.log('getProjectDailyZx:', res) + + // this.projectlistlData = res.data + + this.drawLine(res.data) + }) + }, + projectSelect(val) { console.log('projectSelect:', val) + this.projectSid = val + + this.getProjectDailySum() + this.getReportInventory() + this.init() }, selectTime(val) { @@ -238,7 +299,7 @@ }, // 折线图初始化 - drawLine() { + drawLine(obj) { // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('main')); // 绘制图表 @@ -250,7 +311,7 @@ trigger: 'axis' }, legend: { - data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine'] + data: ['账户余额', '应收账款', '库存货值', '在途货值', '预付款'] }, grid: { left: '3%', @@ -282,43 +343,38 @@ xAxis: { type: 'category', boundaryGap: false, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + data: obj.date }, yAxis: { type: 'value' }, series: [{ - name: 'Email', + name: '账户余额', type: 'line', - stack: 'Total', - data: [120, 132, 101, 134, 90, 230, 210] + data: obj.accountsBalance }, { - name: 'Union Ads', + name: '应收账款', type: 'line', - stack: 'Total', - data: [220, 182, 191, 234, 290, 330, 310] + data: obj.accountsReceivable }, { - name: 'Video Ads', + name: '库存货值', type: 'line', - stack: 'Total', - data: [150, 232, 201, 154, 190, 330, 410] + data: obj.stockAmount }, { - name: 'Direct', + name: '在途货值', type: 'line', - stack: 'Total', - data: [320, 332, 301, 334, 390, 330, 320] + data: obj.transitAmount }, { - name: 'Search Engine', + name: '预付款', type: 'line', - stack: 'Total', - data: [820, 932, 901, 934, 1290, 1330, 1320] + data: obj.advancePayment } ] - }) + }, true) }, @@ -434,7 +490,7 @@ } .top-right { - width: 55%; + width:60%; display: flex; flex-direction: row; align-items: center; @@ -508,10 +564,25 @@ .centre-title-view { margin-left: 10px; - margin-top: 10px; flex: 1; - height: 3px; - background: #efefef; + display: flex; + flex-direction: row; + border-bottom: solid 4px #dadada; + + ::v-deep .el-select { + width: 100px; + margin-bottom: -10px; + margin-top: -10px; + + .el-input { + .el-input__inner { + color: #999; + background: transparent; + border: none; + font-size: 15px; + } + } + } } } } diff --git a/supervise-report-ui/src/views/project/projectDaily.vue b/supervise-report-ui/src/views/project/projectDaily.vue index 189edc5d..8fe05f0d 100644 --- a/supervise-report-ui/src/views/project/projectDaily.vue +++ b/supervise-report-ui/src/views/project/projectDaily.vue @@ -52,8 +52,8 @@ @@ -192,7 +192,7 @@ - 备注 + 工作日报 - - - - - - 报表下载 - - @@ -48,7 +40,7 @@ --> - + @@ -124,12 +116,37 @@ - - + + + + + + + + + 工作日报 + + + + + {{info.userName}} + + + + + + + 报表下载 + + + + {{info.remarks}} - + @@ -140,11 +157,10 @@ - - - + + + @@ -277,10 +293,10 @@ }, confirmClick(date) { console.log('confirmClick', date) - console.log('date.value',date.value) - console.log('getTime',(new Date(date.value)).getTime()) - - + console.log('date.value', date.value) + console.log('getTime', (new Date(date.value)).getTime()) + + console.log('formatTimeTwo', formatTimeTwo((new Date(date.value)).getTime(), "Y-M-D")) this.params.orderDate = formatTimeTwo((new Date(date.value)).getTime(), "Y-M-D") @@ -449,6 +465,12 @@ }) + }, + makeCall(){ + wx.makePhoneCall({ + //仅为示例,并非真实的电话号码 + phoneNumber: this.info.userMobile + }) }, jump() { // 下载 @@ -544,7 +566,7 @@ justify-content: space-between; .top-name { - flex: 1; + flex: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; @@ -562,26 +584,55 @@ } .download { - - position: absolute; - top: 100px; - right: 5px; background-color: #fff; display: flex; align-items: center; flex-direction: row; + justify-content: space-between; + padding: 18px 18px 11px 18px; + border-bottom: 1px #eee solid; - .download-lift-view { - z-index: 2222; + .download-left { + margin-right: 20px; + flex: 1; + display: flex; + align-items: center; + flex-direction: row; + justify-content: space-between; + + .download-left-text { + font-size: 16px; + color: #191919; + + } + + .download-lift-view { + display: flex; + align-items: center; + flex-direction: row; + + .download-lift-view-text { + margin-left: 5px; + font-size: 14px; + color: #018AD2; + padding-bottom: 2px; + border-bottom: 1px #018AD2 solid; + } + } + } + + .download-right { display: flex; align-items: center; flex-direction: row; - .download-lift-view-text { - margin-left: 10px; + .download-right-text { + margin-left: 5px; font-size: 14px; color: #018AD2; + padding-bottom: 2px; + border-bottom: 1px #018AD2 solid; } } } diff --git a/supervise-uniapp/static/baseIcon/user.png b/supervise-uniapp/static/baseIcon/user.png new file mode 100644 index 00000000..e798e461 Binary files /dev/null and b/supervise-uniapp/static/baseIcon/user.png differ