Ver código fonte

Merge branch 'master' of ssh://10.10.100.21/source/uas-office-integration

RaoMeng 6 anos atrás
pai
commit
92ae55bb47

+ 2 - 2
uas-office-qywx/src/main/java/com/usoftchina/uas/office/qywx/manage/controller/QywxAddrBookController.java

@@ -39,9 +39,9 @@ public class QywxAddrBookController {
         }
         try {
             DataSourceHolder.set(dataCenter);
-//            orgService.sync();
+            orgService.sync();
             employeeService.sync();
-//            orgService.clearUseless();
+            orgService.clearUseless();
             return Result.success();
         } finally {
             DataSourceHolder.clear();

+ 1 - 0
uas-office-qywx/src/main/java/com/usoftchina/uas/office/qywx/service/UasEmployeeService.java

@@ -214,6 +214,7 @@ public class UasEmployeeService extends AbstractService {
         req.department(departmentList);
 
         if (changed || 0 == user.getEnable()) {
+            logger.debug("update qywx user " + JSON.toJSONString(req.userId(user.getUserid()).enable(true).build()));
             addrBookSdk.updateUser(req.userId(user.getUserid()).enable(true));
         }
     }

+ 23 - 18
uas-office-web/wxuasapproval/src/pages/useStatus/UseStatus.jsx

@@ -15,18 +15,18 @@ import {
     isObjEmpty
 } from '@/utils/common'
 
-let DEPART, USERCOUNT,dataLength;
+let DEPART, USERCOUNT, dataLength;
 let DURATIONLIST = [];
 let DAILYCOUNT = [];
 let columnWidth = 300;
-let mBaseUrl =  window.location.origin+'/office';
+let mBaseUrl = window.location.origin + '/office';
 
 
 export default class Basic extends Component {
     constructor() {
         super()
 
-        this.state = { 
+        this.state = {
             loading: true    //更改
         }
     }
@@ -51,7 +51,7 @@ export default class Basic extends Component {
         }
 
     }
-
+    
     getData = (instanceId) => {
         fetchPost(mBaseUrl+'/api/analysis/getAnalysisByWeek', {
             'instanceid': instanceId,
@@ -59,16 +59,16 @@ export default class Basic extends Component {
             // 'Cookie': 'JSESSIONID=' + mSessionId,
             // "Content-Type": "application/json; charset=UTF-8"
         }).then((response) => {
-            if(response.success){
+            if (response.success) {
                 let dataSource = response.data[0];
                 DEPART = dataSource.DEPART;
                 USERCOUNT = dataSource.USERCOUNT;
                 DURATIONLIST = dataSource.DURATIONLIST;
                 DAILYCOUNT = dataSource.DAILYCOUNT;
                 dataLength = DURATIONLIST.length;
-                if(dataLength>0){
-                    columnWidth = dataLength*55;
-                }else{
+                if (dataLength > 0) {
+                    columnWidth = dataLength * 55;
+                } else {
                     columnWidth = 300
                 }
                 this.setState({
@@ -120,25 +120,27 @@ export default class Basic extends Component {
                 </Spin>
                 <div style={{ display: loading ? 'none' : 'flex' }} className='content'>
                     <div className='branch'>{DEPART}</div>
+                    <div className='useNum'>使用人数{USERCOUNT}人</div>
                     <div className='lineCharts'>
-                        <div className='useNum'>使用人数{USERCOUNT}人</div>
-                        <Chart padding={['12%','10%','12%','auto']} height={300} data={DAILYCOUNT} scale={cols} forceFit>
+                        <div className='useAnaly'>成员使用分析</div>
+                        <Chart padding={['12%', '10%', '12%', '8%']} height={200} data={DAILYCOUNT} scale={cols} forceFit>
                             <Axis
                                 name="DATE_TIME"
                                 label={{
-                                    offset: 12,
+                                    offset: 18,
                                     textStyle: {
-                                        fontSize: '16',
+                                        fontSize: '14',
                                         fill: '#959595'
                                     }
                                 }} />
                             <Axis
                                 name="EMCOUNT"
                                 position="right"
+                                grid={null}
                                 label={{
                                     offset: 10,
                                     textStyle: {
-                                        fontSize: '16',
+                                        fontSize: '14',
                                         fill: '#959595'
                                     }
                                 }}
@@ -148,7 +150,10 @@ export default class Basic extends Component {
                                     type: "y"
                                 }}
                             />
-                            <Geom type="line" position="DATE_TIME*EMCOUNT" size={2} />
+                            <Geom
+                                color="l (270) 0:rgba(100,149,237,1) .5:rgba(135,206,250, 1) 1:rgba(0,191,255, 1)"
+                                shape="smooth" type="line" position="DATE_TIME*EMCOUNT" size={2}
+                            />
                             <Geom
                                 type="point"
                                 position="DATE_TIME*EMCOUNT"
@@ -165,7 +170,7 @@ export default class Basic extends Component {
                         <div className='useTime'>成员使用时间(分钟)</div>
                         <Chart
                             onPlotClick={this.handleClick}
-                            padding={['auto','12%','auto','auto']}
+                            padding={['auto', '12%', 'auto', '20%']}
                             height={columnWidth}
                             data={dv}
                             forceFit
@@ -176,12 +181,12 @@ export default class Basic extends Component {
                                 label={{
                                     offset: 10,
                                     textStyle: {
-                                        fontSize: '16',
+                                        fontSize: '14',
                                         fill: '#000'
                                     }
                                 }}
                             />
-                            <Axis name="DURATION" label={null} />
+                            <Axis grid={null} name="DURATION" label={null} />
                             <Tooltip />
                             <Geom type="interval" position="EMNAME*DURATION" >
                                 <Label
@@ -189,7 +194,7 @@ export default class Basic extends Component {
                                     content="DURATION"
                                     textStyle={{
                                         fill: '#000', // 文本的颜色
-                                        fontSize: '16', // 文本大小
+                                        fontSize: '14', // 文本大小
                                     }} />
                             </Geom>
                         </Chart>

+ 14 - 7
uas-office-web/wxuasapproval/src/pages/useStatus/useStatus.css

@@ -16,27 +16,34 @@
 }
 .useStatusRoot .content .branch{
     padding:4%;
-    padding-bottom: 1%;
+    padding-bottom: 0;
     color:#000;
-    font-size:17px;
-    font-weight:bold;
+    font-size:18px;
     background:#fff;
+    text-align:center;
 }
 .useStatusRoot .content .lineCharts{
     background:#fff;
+    margin:3% 0 0 0;
 }
 .useStatusRoot .content .columnCharts{
     background:#fff;
     margin:3% 0 0 0;
 }
-.useStatusRoot .content .lineCharts .useNum{
-    font-size:21px;
+.useStatusRoot .content .useNum{
+    background:#fff;
+    font-size:16px;
     padding-left:4%;
     color:#000;
-    font-weight:bold;
+}
+.useStatusRoot .content .lineCharts .useAnaly{
+    margin:0 !important;
+    padding:4%;
+    padding-bottom:0%;
+    font-size:14px;
 }
 .useStatusRoot .content .columnCharts .useTime{
     margin:0 !important;
     padding:4%;
-    font-size:16px;
+    font-size:14px;
 }

+ 12 - 6
uas-office-web/wxuasapproval/src/pages/workSummary/WorkSummary.jsx

@@ -20,7 +20,7 @@ const Item = List.Item;
 let EMCODE, EMNAME, RANGETIME, DURATION, ADDCOUNT, COMMITCOUNT, AUDITCOUNT, dataLength;
 let MODELLIST = [];
 let columnWidth = 300;
-let mBaseUrl =  window.location.origin+'/office';
+let mBaseUrl = window.location.origin + '/office';
 
 export default class Basic extends Component {
     constructor() {
@@ -52,8 +52,9 @@ export default class Basic extends Component {
     }
 
     getUrlData() {
-        let url = window.location.search;  //url中?之后的部分
-        url = url.substring(1);    //去掉?
+        let url = window.location.href;  //url中?之后的部分
+        url = decodeURIComponent(url)
+        url = this.getCaption(url);
         let dataObj = {};
         if (url.indexOf('&') > -1) {
             url = url.split('&');
@@ -68,6 +69,11 @@ export default class Basic extends Component {
         return dataObj;
     }
 
+    getCaption(obj) {     //拿到?后的值
+        var index = obj.lastIndexOf("\?");
+        obj = obj.substring(index + 1, obj.length);
+        return obj;
+    }
     getData = (emCode, instanceId) => {
         fetchPost(mBaseUrl+'/api/analysis/getAnalysisByPerson', {
             'emCode': emCode,
@@ -146,17 +152,17 @@ export default class Basic extends Component {
                                     textStyle: {
                                         textAlign: 'end', // 文本对齐方向,可取值为: start center end
                                         fill: '#000',
-                                        fontSize: '16'
+                                        fontSize: '14'
                                     }
                                 }}
                             />
-                            <Axis name="DURATION" label={null} />
+                            <Axis grid={null} name="DURATION" label={null} />
                             <Tooltip />
                             <Geom type="interval" position="MODELNAME*DURATION" >
                                 <Label label={{
                                     textStyle: {
                                         fill: '#000',
-                                        fontSize: '16'
+                                        fontSize: '14'
                                     }
                                 }} offset={5} content="DURATION" />
                             </Geom>

+ 7 - 4
uas-office-web/wxuasapproval/src/pages/workSummary/workSummary.css

@@ -37,7 +37,7 @@
 }
 .workSummaryRoot .content .selfMess .self .summary{
     margin-left:5%;
-    font-size:16px;
+    font-size:14px;
     color:#333333;
 }
 .workSummaryRoot .content .workSummary {
@@ -48,15 +48,18 @@
     padding:2%;
     padding-left:5%;
     color: rgba(0, 0, 0, 0.65);
-    font-size:16px;
+    font-size:14px;
     background:#fff;
 }
+.am-list-item .am-list-line .am-list-content{
+    font-size: 16px !important;
+}
 .workSummaryRoot .content .columnCharts{
     margin:3% 0 0 0;
     background:#fff;
 }
 .workSummaryRoot .content .columnCharts .useTime{
     margin:0 !important;
-    padding:4% 4% 0 4%;
-    font-size: 16px;
+    padding:4% 4% 0 5%;
+    font-size: 14px;
 }