Browse Source

代码合并

chenw 6 years ago
parent
commit
1bee9d91d2
32 changed files with 367 additions and 92 deletions
  1. 1 0
      applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/DeviceClientApplication.java
  2. 5 1
      applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/init/IcCardInitializer.java
  3. 3 3
      applications/device/device-client/src/main/resources/application.yml
  4. 1 11
      applications/device/device-client/src/main/resources/logback-spring.xml
  5. 1 1
      applications/device/device-core/src/main/java/com/usoftchina/smartschool/device/context/SpringContextHolder.java
  6. 0 0
      applications/device/device-core/src/main/resources/messages.properties
  7. 2 0
      applications/device/device-core/src/main/resources/messages_zh_CN.properties
  8. 3 1
      applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/mapper/IcCardMapper.java
  9. 20 12
      applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/service/impl/AccessControlServiceImpl.java
  10. 33 29
      applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/service/impl/IcCardServiceImpl.java
  11. 1 1
      applications/device/device-server/src/main/resources/mapper/IcCardMapper.xml
  12. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/ScoreServiceImpl.java
  13. 8 0
      applications/wechat/wechat-dto/src/main/java/com/usoftchina/smartschool/wechat/dto/TransferDTO.java
  14. 1 7
      base-servers/file/file-server-qcloud/src/main/resources/config/application-docker-cloud.yml
  15. 21 16
      frontend/pc-web/app/util/FormUtil.js
  16. 2 1
      frontend/pc-web/app/view/Interaction/homework/Release.js
  17. 5 1
      frontend/pc-web/app/view/basic/student/StudentDetail.js
  18. 201 0
      frontend/pc-web/app/view/core/form/field/RemoteImgField.js
  19. 37 0
      frontend/pc-web/app/view/core/form/field/RemoteImgField.scss
  20. 8 1
      frontend/pc-web/app/view/main/Navigation.js
  21. 1 0
      frontend/pc-web/app/view/setting/msgtemplate/PanelController.js
  22. BIN
      frontend/pc-web/packages/font-school/resources/fonts/iconfont.eot
  23. 0 0
      frontend/pc-web/packages/font-school/resources/fonts/iconfont.js
  24. 3 0
      frontend/pc-web/packages/font-school/resources/fonts/iconfont.svg
  25. BIN
      frontend/pc-web/packages/font-school/resources/fonts/iconfont.ttf
  26. BIN
      frontend/pc-web/packages/font-school/resources/fonts/iconfont.woff
  27. BIN
      frontend/pc-web/packages/font-school/resources/fonts/iconfont.woff2
  28. 4 0
      frontend/pc-web/packages/font-school/sass/etc/icons.scss
  29. 0 2
      frontend/pc-web/packages/font-school/sass/src/all.scss
  30. 3 2
      frontend/pc-web/resources/json/navigation.json
  31. 1 1
      frontend/wechat-web/src/modules/hiPages/accessnoticedetail/AccessNoticeDetail.jsx
  32. 1 1
      frontend/wechat-web/src/modules/home/HomePage.jsx

+ 1 - 0
applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/DeviceClientApplication.java

@@ -1,6 +1,7 @@
 package com.usoftchina.smartschool.device.client;
 
 import com.usoftchina.smartschool.device.client.config.DeviceServerProperties;
+import com.usoftchina.smartschool.device.context.SpringContextHolder;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;

+ 5 - 1
applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/init/IcCardInitializer.java

@@ -24,7 +24,11 @@ public class IcCardInitializer implements CommandLineRunner {
     public void run(String... args) throws Exception {
         IcCard card = icCardService.find();
         if (null != card) {
-            dynamicDataSourceRegister.createDataSource(card);
+            try {
+                dynamicDataSourceRegister.createDataSource(card);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         }
     }
 }

+ 3 - 3
applications/device/device-client/src/main/resources/application.yml

@@ -4,10 +4,10 @@ device:
     connect-time: 10000
   server:
   # 门禁事件的服务端接口
-    accessControlEvent: https://school-api.ubtob.com/api/device/accesscontrol/event
+    accessControlEvent: https://school-api.ydyhz.com/api/device/accesscontrol/event
   # IC卡传输的服务端接口
   icCard:
-    icCardUrl: https://school-api.ubtob.com/api/device/iccard/consume/record
+    icCardUrl: https://school-api.ydyhz.com/api/device/iccard/consume/record
 server:
   tomcat:
     uri-encoding: UTF-8
@@ -32,4 +32,4 @@ spring:
 logging:
   path: ${user.home}/.device-client/logs/
   level:
-    com.usoftchina.smartschool.device.client: debug
+    com.usoftchina.smartschool: debug

+ 1 - 11
applications/device/device-client/src/main/resources/logback-spring.xml

@@ -31,15 +31,6 @@
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 
-    <appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>${log.level.console}</level>
-        </filter>
-        <encoder>
-            <pattern>${common-pattern}</pattern>
-        </encoder>
-    </appender>
-
     <appender name="ROOT_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${log.path}/root.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
@@ -56,9 +47,8 @@
     <logger name="org.springframework" level="INFO"/>
     <logger name="com.usoftchina.smartschool" level="DEBUG"/>
 
-    <root level="WARN">
+    <root level="INFO">
         <appender-ref ref="ROOT_APPENDER"/>
-        <appender-ref ref="CONSOLE_APPENDER"/>
     </root>
 
 </configuration>

+ 1 - 1
applications/device/device-core/src/main/java/com/usoftchina/smartschool/device/context/SpringContextHolder.java

@@ -36,6 +36,6 @@ public class SpringContextHolder {
 
     public static String getMessage(String code, Object[] args, Locale locale) {
         Assert.notNull(context, "spring context not ready");
-        return context.getMessage(code, args, locale);
+        return context.getMessage(code, args, code, locale);
     }
 }

+ 0 - 0
applications/device/device-core/src/main/resources/message_zh_CN.properties → applications/device/device-core/src/main/resources/messages.properties


+ 2 - 0
applications/device/device-core/src/main/resources/messages_zh_CN.properties

@@ -0,0 +1,2 @@
+ERROR_UNKNOWN=\u672a\u77e5\u5f02\u5e38
+ERROR_IP_PORT_EXIST=IP\u548c\u7aef\u53e3\u5df2\u5b58\u5728

+ 3 - 1
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/mapper/IcCardMapper.java

@@ -4,6 +4,8 @@ import com.usoftchina.smartschool.school.dto.SysSchoolDTO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * @Author ChenWei
  * @Date 2019/03/12
@@ -11,7 +13,7 @@ import org.apache.ibatis.annotations.Param;
 @Mapper
 public interface IcCardMapper {
 
-    String SelectParentOpenId(@Param("code") String code, @Param("schoolId") Long schoolId);
+    List<String> SelectParentOpenId(@Param("code") String code, @Param("schoolId") Long schoolId);
 
     SysSchoolDTO getSchoolIdByName(@Param("name") String name);
 

+ 20 - 12
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/service/impl/AccessControlServiceImpl.java

@@ -12,18 +12,19 @@ import com.usoftchina.smartschool.device.service.AccessControlService;
 import com.usoftchina.smartschool.file.api.FileApi;
 import com.usoftchina.smartschool.file.api.util.ByteArrayMultipartFile;
 import com.usoftchina.smartschool.file.dto.FileInfoDTO;
-import com.usoftchina.smartschool.file.dto.ImageFile;
 import com.usoftchina.smartschool.school.enums.NoticeTemplate;
 import com.usoftchina.smartschool.utils.DateUtils;
 import com.usoftchina.smartschool.utils.StringUtils;
 import com.usoftchina.smartschool.wechat.api.WechatApi;
 import com.usoftchina.smartschool.wechat.dto.MessageInfoDTO;
+import com.usoftchina.smartschool.wechat.dto.TransferDTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -114,17 +115,24 @@ public class AccessControlServiceImpl implements AccessControlService{
             logger.error("模板未配置");
             return;
         }
-        MessageInfoDTO msg = new MessageInfoDTO();
-        msg.setUrl(wechatBaseUrl + "/accessnoticedetail/" + record.getRecord_id());
-        msg.setAppId(studentInfo.getAppId());
-        msg.setSecret(studentInfo.getSecret());
-        msg.setTouser(studentInfo.getOpenId());
-        msg.setTemplateId(schoolTemplate.getSt_templateid());
-        msg.setTitle((type == 1 ? "入" : "出") + "校提醒");
-        msg.setKeyword1(studentInfo.getStuName());
-        msg.setKeyword2(DateUtils.format());
-        msg.setRemark("您好! 你的孩子: " + studentInfo.getStuName() + (type == 1 ? " 进入" : " 离开") + "学校");
-        wechatApi.sendMsg(msg);
+        //支持发送多个人员
+        List<MessageInfoDTO> msgs = new ArrayList<>();
+        information.forEach(data -> {
+            MessageInfoDTO msg = new MessageInfoDTO();
+            msg.setUrl(wechatBaseUrl + "/accessnoticedetail/" + record.getRecord_id());
+            msg.setAppId(data.getAppId());
+            msg.setSecret(data.getSecret());
+            msg.setTouser(data.getOpenId());
+            msg.setTemplateId(schoolTemplate.getSt_templateid());
+            msg.setTitle((type == 1 ? "入" : "出") + "校提醒");
+            msg.setKeyword1(studentInfo.getStuName());
+            msg.setKeyword2(DateUtils.format());
+            msg.setRemark("您好! 你的孩子: " + data.getStuName() + (type == 1 ? " 进入" : " 离开") + "学校");
+            msgs.add(msg);
+        });
+        if (msgs.size() > 0) {
+            wechatApi.largeMessages(new TransferDTO(msgs));
+        }
     }
 
     /**

+ 33 - 29
applications/device/device-server/src/main/java/com/usoftchina/smartschool/device/service/impl/IcCardServiceImpl.java

@@ -8,6 +8,7 @@ import com.usoftchina.smartschool.device.po.Transaction;
 import com.usoftchina.smartschool.device.service.IcCardService;
 import com.usoftchina.smartschool.school.dto.SysSchoolDTO;
 import com.usoftchina.smartschool.school.enums.NoticeTemplate;
+import com.usoftchina.smartschool.utils.CollectionUtils;
 import com.usoftchina.smartschool.utils.ObjectUtils;
 import com.usoftchina.smartschool.utils.http.HmacUtils;
 import com.usoftchina.smartschool.wechat.api.WechatApi;
@@ -61,36 +62,39 @@ public class IcCardServiceImpl implements IcCardService {
                 String oldType = accTransDetail.getAccTransType();
                 accTransDetail.setAccTransType(Transaction.getName(accTransDetail.getAccTransType()));
                 //构造messageInfo对象
-                String openId = icCardMapper.SelectParentOpenId(accTransDetail.getEmpNo(), schoolId);
-                if(StringUtils.hasText(openId)){
-                    MessageInfoDTO messageInfo = new MessageInfoDTO();
-                    messageInfo.setMsgId(accTransDetail.getGuid());
-                    sb.append(accTransDetail.getGuid() + ",");
-                    messageInfo.setTouser(openId);
-                    messageInfo.setAppId(appId);
-                    messageInfo.setSecret(secret);
-                    messageInfo.setTemplateId(templateId);
-                    String accNo = accTransDetail.getAccNo();
-                    String cardNo = StringUtils.isEmpty(accNo) ? null : accNo.substring(accTransDetail.getAccNo().length() - 4);
-                    String header = "您好,您的小孩" + accTransDetail.getEmpName() + "在校的校园卡(卡号:*** " + cardNo + ")发生如下交易";
-                    messageInfo.setTitle(header);
-                    Date accTransDay = accTransDetail.getAccTransDay();
-                    if (null != accTransDay) {
-                        messageInfo.setKeyword1(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accTransDetail.getAccTransDay()));
-                    }
-                    if (Integer.parseInt(oldType) > 15) {
-                        messageInfo.setKeyword2(String.format("%.2f", accTransDetail.getoMoneyValue()));
-                    } else {
-                        messageInfo.setKeyword2(String.format("%.2f", accTransDetail.getiMoneyValue()));
-                    }
-                    messageInfo.setKeyword3(accTransDetail.getAccTransType());
-                    messageInfo.setKeyword4(String.format("%.2f", accTransDetail.getCardMoneyValue()));
-                    messageInfo.setRemark("感谢您使用!");
-                    messageInfoList.add(messageInfo);
-                }else {
-                    logger.info("GUID={}未找到对应的推送人", accTransDetail.getGuid());
+                List<String> openIds = icCardMapper.SelectParentOpenId(accTransDetail.getEmpNo(), schoolId);
+                if (!CollectionUtils.isEmpty(openIds)) {
+                    openIds.forEach(openId -> {
+                        if (StringUtils.hasText(openId)) {
+                            MessageInfoDTO messageInfo = new MessageInfoDTO();
+                            messageInfo.setMsgId(accTransDetail.getGuid());
+                            sb.append(accTransDetail.getGuid() + ",");
+                            messageInfo.setTouser(openId);
+                            messageInfo.setAppId(appId);
+                            messageInfo.setSecret(secret);
+                            messageInfo.setTemplateId(templateId);
+                            String accNo = accTransDetail.getAccNo();
+                            String cardNo = StringUtils.isEmpty(accNo) ? null : accNo.substring(accTransDetail.getAccNo().length() - 4);
+                            String header = "您好,您孩子" + accTransDetail.getEmpName() + "的校园卡(卡号:*** " + cardNo + ")发生如下交易";
+                            messageInfo.setTitle(header);
+                            Date accTransDay = accTransDetail.getAccTransDay();
+                            if (null != accTransDay) {
+                                messageInfo.setKeyword1(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accTransDetail.getAccTransDay()));
+                            }
+                            if (Integer.parseInt(oldType) > 15) {
+                                messageInfo.setKeyword2(String.format("%.2f", accTransDetail.getoMoneyValue()));
+                            } else {
+                                messageInfo.setKeyword2(String.format("%.2f", accTransDetail.getiMoneyValue()));
+                            }
+                            messageInfo.setKeyword3(accTransDetail.getAccTransType());
+                            messageInfo.setKeyword4(String.format("%.2f", accTransDetail.getCardMoneyValue()));
+                            messageInfo.setRemark("谢谢使用!");
+                            messageInfoList.add(messageInfo);
+                        } else {
+                            logger.info("GUID={}未找到对应的推送人", accTransDetail.getGuid());
+                        }
+                    });
                 }
-
             });
             //3.传输
             Result result = wechatApi.sendOutMessages(JSON.toJSONString(messageInfoList));

+ 1 - 1
applications/device/device-server/src/main/resources/mapper/IcCardMapper.xml

@@ -15,7 +15,7 @@
       (SELECT stu_id FROM sys_student WHERE stu_number = #{code} and school_id = #{schoolId})
     )
     and school_id=#{schoolId}
-    and   ifnull(openid,'')  != ''  limit 0,1
+    and   ifnull(openid,'')  != ''
   </select>
 
   <select id="selectTemplateId" resultType="string">

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/ScoreServiceImpl.java

@@ -262,7 +262,7 @@ public class ScoreServiceImpl implements ScoreService{
         }
         noticers.forEach(noticer -> {
             MessageInfoDTO msg = new MessageInfoDTO();
-            msg.setTitle("您好,请查收您孩" + noticer.getStuName() + "的成绩单");
+            msg.setTitle("您好,请查收您孩" + noticer.getStuName() + "的成绩单");
             msg.setKeyword1(noticer.getStuName());
             msg.setKeyword2(noticer.getStuNo());
             msg.setKeyword3(main.getSi_examtitle());

+ 8 - 0
applications/wechat/wechat-dto/src/main/java/com/usoftchina/smartschool/wechat/dto/TransferDTO.java

@@ -18,4 +18,12 @@ public class TransferDTO implements Serializable{
     public void setData(List<MessageInfoDTO> data) {
         this.data = data;
     }
+
+    public TransferDTO(List<MessageInfoDTO> data) {
+        this.data = data;
+    }
+    public TransferDTO() {
+    }
+
+
 }

+ 1 - 7
base-servers/file/file-server-qcloud/src/main/resources/config/application-docker-cloud.yml

@@ -20,10 +20,4 @@ spring:
       maximum-pool-size: 50
       idle-timeout: 30000
       max-lifetime: 1800000
-      connection-timeout: 30000
-rabbitmq:
-  host: 132.232.174.14
-  port: 5672
-  virtual-host: school
-  username: saas
-  password: select123***
+      connection-timeout: 30000

+ 21 - 16
frontend/pc-web/app/util/FormUtil.js

@@ -5,22 +5,27 @@ Ext.define('school.util.FormUtil', {
         setItems: function(form) {
             let me = this,
             defaultItems = form.defaultItems;
-
-            let items = [];
-
-            items = me.applyItemsGroup(defaultItems || []);
-            items = me.initItems(items);
-
-            form.configItems = items;
-
-            items = me.applyDefaultItems(form, items);
-
-            form.removeAll();
-            form.addItems(items);
-
-            form.fireEvent('afterSetItems', form, items);
-
-            me.loadData(form);
+            return new Ext.Promise(function (resolve, reject) {
+                let items = [];
+    
+                items = me.applyItemsGroup(defaultItems || []);
+                items = me.initItems(items);
+    
+                form.configItems = items;
+                items = me.applyDefaultItems(form, items);
+
+                return resolve(items);
+            }).then(function(items) {
+                form.removeAll();
+                form.addItems(items);
+                return items;
+            }).then(function(items) {
+                form.fireEvent('afterSetItems', form, items);
+            }).then(function() {
+                me.loadData(form);
+            }).catch(function(e) {
+                school.util.BaseUtil.showErrorToast(e.message);
+            });
         },
 
         applyItemsGroup: function(items) {

+ 2 - 1
frontend/pc-web/app/view/Interaction/homework/Release.js

@@ -89,7 +89,8 @@ Ext.define('school.view.interaction.homework.Release', {
             }, {
                 xtype: 'subjectcombo',
                 name: 'subject_id',
-                fieldLabel: '学科'
+                fieldLabel: '学科',
+                allowBlank: false
             }, {
                 xtype: 'datefield',
                 name: 'start_date',

+ 5 - 1
frontend/pc-web/app/view/basic/student/StudentDetail.js

@@ -13,7 +13,7 @@ Ext.define('school.view.basic.student.StudentDetail', {
     _statusCodeField: null,
     _auditmanField: null,
     _auditdateField: null,
-    // _readUrl: 'http://10.1.80.47:9520/api/shcool/student/read',
+    // _readUrl: 'http://10.1.80.36:9520/api/school/student/read',
     _readUrl: '/api/school/student/read',
     // _saveUrl: 'http://10.1.80.36:9520/api/school/student/save',
     _saveUrl: '/api/school/student/save',
@@ -27,6 +27,10 @@ Ext.define('school.view.basic.student.StudentDetail', {
                 xtype: 'hidden',
                 name: 'stu_id',
                 fieldLabel: 'id',
+            }, {
+                xtype: 'remoteimgfield',
+                name: 'stu_photo',
+                // fieldLabel: '头像',
             }, {
                 xtype: 'textfield',
                 name: 'stu_number',

+ 201 - 0
frontend/pc-web/app/view/core/form/field/RemoteImgField.js

@@ -0,0 +1,201 @@
+Ext.define('school.view.core.form.field.RemoteImgField', {
+    extend: 'Ext.form.FieldContainer',
+    alias: 'widget.remoteimgfield',
+
+    layout: "hbox",
+    defaults: {
+        hideLabel: true
+    },
+    isFormField: true,
+    defaultBindProperty: 'value',
+    cls: 'remoteimg-field',
+
+    initComponent: function () {
+        var me = this;
+
+        Ext.apply(me, {
+            items: [{
+                xtype: 'hidden',
+                name: 'imgPath'
+            }, {
+                xtype: 'image',
+                height: 170,
+                width: 135,
+                hidden: true,
+                src: '',
+                style: {
+                    'background-color': '#e6dede'
+                }
+            }, {
+                xtype: 'filefield',
+                name: 'file',
+                cls: 'upload-bth',
+                height: 170,
+                width: 135,
+                buttonText: '上传头像',
+                buttonOnly: true,
+                hideLabel: true,
+                // hidden: true,
+                buttonConfig: {
+                    cls: 'x-filefield-button'
+                },
+                listeners: {
+                    change: function (field) {
+                        if (!!field.value) {
+                            me.upload(field);
+                        }
+                    }
+                }
+            }, {
+                xtype: 'component',
+                cls: 'tool-bar',
+                hidden: true,
+                html: '<div class="tools"><span title="放大" class="tool enlarge x-fa fa-expand"></span><span title="删除" class="tool delete x-ss ss-delete1"></span></div>',
+                listeners: {
+                    boxready: function(component) {
+                        component.el.dom.onclick = function() {
+                            if(event.target.classList.contains('enlarge')) {
+                                me.enlargeImg();
+                            }else if(event.target.classList.contains('delete')) {
+                                me.deleteImg();
+                            }
+                        };
+                    }
+                }
+            }]
+        });
+
+        me.callParent(arguments);
+    },
+
+    listeners: {
+        boxready: function(container, width, height, e) {
+            container.el.dom.onmouseenter = function() {
+                if(container.getValue()) {
+                    container.items.items[3].setHidden(false);
+                }
+            };
+            container.el.dom.onmouseleave = function() {
+                if(container.getValue()) {
+                    container.items.items[3].setHidden(true);
+                }
+            }
+        }
+    },
+
+    setValue: function(v) {
+        var me = this,
+        items = me.items.items,
+        imgPath = items[0],
+        img = items[1],
+        fileField = items[2];
+
+        imgPath.setValue(v);
+        img.setSrc(v);
+        fileField.setHidden(true);
+        img.setHidden(false);
+
+        me.publishState('value', v);
+    },
+
+    getValue: function() {
+        return this.items.items[0].value;
+    },
+
+    getValueField: function () {
+        return this.items.items[0];
+    },
+
+    isValid: function () {
+        return this.getValueField().isValid();
+    },
+
+    isDirty: function () {
+        return this.getValueField().isDirty();
+    },
+
+    setReadOnly: function () {
+
+    },
+
+    /**
+     * 上传附件
+     */
+    upload: function (field) {
+        var me = this;
+        var fd = new FormData();
+        fd.append('file', field.fileInputEl.dom.files[0]);
+        fd.append('folderId', 0);
+        me.setLoading(true);
+        Ext.Ajax.request({
+            // url: 'http://10.1.80.36:9520/api/file/upload', //这里是填写需要跨域访问的URL
+            url: '/api/file/upload',//这里是填写需要跨域访问的URL
+            cors: true,
+            useDefaultXhrHeader: false,
+            method: 'post',
+            rawData: fd,
+            headers: {
+                'Access-Control-Allow-Origin': '*',
+                'Authorization': school.util.State.get('session').token,
+                //"Content-Type": 'multipart/form-data'  //文件上传的格式, 
+                "Content-Type": null
+            },
+            success: function (response, opts) {
+                me.setLoading(false);
+                var res = Ext.decode(response.responseText);
+                if (res.success) {
+                    school.util.BaseUtil.showSuccessToast('上传成功');
+                    var data = res.data,
+                    accessPath = data.accessPath;
+
+                    me.setValue(accessPath);
+                } else {
+                    school.util.BaseUtil.showErrorToast('上传失败: ' + res.message);
+                }
+            },
+            failure: function (response, opts) {
+                me.setLoading(false);
+                var res = Ext.decode(response.responseText);
+                school.util.BaseUtil.showErrorToast('上传失败: ' + res.message);
+            }
+        });
+    },
+
+    enlargeImg: function() {
+        var me = this;
+        var win = Ext.getCmp('enlarge-win');
+        if(!win) {
+            win = Ext.create('Ext.window.Window', {
+                width: 350,
+                height: 400,
+                layout: 'fit',
+                items: [{
+                    xtype: 'image',
+                    src: me.getValue()
+                }]
+            });
+        }
+        win.show();
+    },
+
+    deleteImg: function() {
+        var me = this,
+        items = me.items.items,
+        imgPath = items[0],
+        img = items[1],
+        fileField = items[2];
+
+        school.util.BaseUtil.showConfirm('确认删除', '是否确认删除该头像?')
+        .then(function(yes) {
+            if(yes == 'yes') {
+                imgPath.setValue(null);
+                img.setSrc(null);
+                fileField.setHidden(false);
+                img.setHidden(true);
+        
+                me.publishState('value', null);
+            }
+        });
+    }
+
+});

+ 37 - 0
frontend/pc-web/app/view/core/form/field/RemoteImgField.scss

@@ -0,0 +1,37 @@
+.remoteimg-field {
+    img, .upload-bth {
+        left: 50% !important;
+        margin-left: -67.5px !important;
+    }
+
+    .x-filefield-button {
+        margin-top: 50% !important;
+    }
+
+    .tool-bar {
+        width: 100% !important;
+        height: 24px !important;
+        top: 146px !important;
+        left: 0 !important;
+        .tools {
+            width: 135px;
+            height: 24px;
+            margin: 0 auto;
+            display: flex;
+            justify-content: flex-end;
+            background: white;
+            opacity: 0.3;
+
+            .tool {
+                width: 24px;
+                line-height: 24px;
+                text-align: center;
+                cursor: pointer;
+
+                &:hover {
+                    font-size: 16px;
+                }
+            }
+        }
+    }  
+}

+ 8 - 1
frontend/pc-web/app/view/main/Navigation.js

@@ -159,7 +159,14 @@ Ext.define('school.view.main.Navigation', {
         var tabId = record.get('id');
         var config = record.get('config') || [];
         var menu = view.up('menu');
-        school.util.BaseUtil.openTab(viewType, tabTitle, tabId, config);
+        var op = record.get('op') || 'tab';
+
+        if(op == 'tab') {
+            school.util.BaseUtil.openTab(viewType, tabTitle, tabId, config);
+        }else if(op == 'blank') {
+            window.open('http://localhost:8080');
+        }
+        
         menu.hide();
     }
 });

+ 1 - 0
frontend/pc-web/app/view/setting/msgtemplate/PanelController.js

@@ -102,6 +102,7 @@ Ext.define('school.view.setting.msgtemplate.PanelController', {
                 xtype: 'textfield',
                 fieldLabel: '模板ID',
                 name: 'templateId',
+                width: 450,
                 value: data.templateId
             }, {
                 xtype: 'button',

BIN
frontend/pc-web/packages/font-school/resources/fonts/iconfont.eot


File diff suppressed because it is too large
+ 0 - 0
frontend/pc-web/packages/font-school/resources/fonts/iconfont.js


+ 3 - 0
frontend/pc-web/packages/font-school/resources/fonts/iconfont.svg

@@ -44,6 +44,9 @@ Created by iconfont
     <glyph glyph-name="delete" unicode="&#59650;" d="M512 896C227.84 896 0 668.16 0 384s227.84-512 512-512 512 227.84 512 512S796.16 896 512 896zM726.016 169.98400000000004c-13.824-13.824-37.376-13.824-51.2 0L512 332.79999999999995l-162.816-162.816c-13.824-13.824-37.376-13.824-51.2 0s-13.824 37.376 0 51.2L460.8 384 297.984 546.816c-13.824 13.824-13.824 37.376 0 51.2s37.376 13.824 51.2 0L512 435.2l162.816 162.816c13.824 13.824 37.376 13.824 51.2 0s13.824-37.376 0-51.2L563.2 384l162.816-162.816c18.944-13.824 18.944-39.424 0-51.2z"  horiz-adv-x="1024" />
 
     
+    <glyph glyph-name="delete1" unicode="&#59665;" d="M519.440384 896c-104.681472 0-189.863936-82.92352-193.45408-186.834944H81.721344C54.528 709.165056 32.4608 687.1552 32.4608 660.025344s22.0672-49.139712 49.260544-49.139712h54.39488V60.108799999999974c0-103.399424 70.301696-187.858944 157.026304-187.858944H735.47776c86.718464 0 157.02016 83.94752 157.02016 187.858944V610.373632h49.268736c27.193344 0 49.260544 22.009856 49.260544 49.139712s-22.0672 49.139712-49.260544 49.139712h-229.376C709.30432 813.07648 624.121856 896 519.432192 896h0.008192z m-101.091328-186.834944c3.473408 53.426176 47.75936 94.912512 101.08928 94.697472 53.884928 0 97.503232-41.46176 100.583424-94.697472h-201.672704z m-125.206528-744.77568c-30.795776 0-64.657408 39.411712-64.657408 95.719424V610.373632h571.652096V59.59680000000003c0-56.307712-33.869824-95.721472-64.653312-95.721472h-442.34752v0.512h0.006144zM369.7664 111.12447999999995c21.000192 0 38.180864 20.856832 38.180864 46.936064V425.914368c0 26.07104-17.180672 46.936064-38.178816 46.936064-21.000192 0-38.180864-20.856832-38.180864-46.936064v-267.853824c0-26.07104 16.703488-46.936064 38.180864-46.936064z m138.401792 0c20.992 0 38.172672 20.856832 38.172672 46.936064V425.914368c0 26.07104-17.178624 46.936064-38.17472 46.936064-21.004288 0-38.176768-20.856832-38.176768-46.936064v-267.853824c0-26.07104 17.178624-46.936064 38.178816-46.936064z m145.55136 0c21.000192 0 38.180864 20.856832 38.180864 46.936064V425.914368c0 26.07104-17.180672 46.936064-38.180864 46.936064-20.998144 0-38.178816-20.856832-38.178816-46.936064v-267.853824c0-26.07104 16.703488-46.936064 38.178816-46.936064z"  horiz-adv-x="1024" />
+
+    
     <glyph glyph-name="add" unicode="&#59649;" d="M512 384m-512 0a512 512 0 1 1 1024 0 512 512 0 1 1-1024 0ZM585.142857 457.142857h219.428572v-146.285714H585.142857v-219.428572H438.857143V310.85714299999995H219.428571V457.142857h219.428572V676.571429h146.285714v-219.428572z"  horiz-adv-x="1024" />
 
     

BIN
frontend/pc-web/packages/font-school/resources/fonts/iconfont.ttf


BIN
frontend/pc-web/packages/font-school/resources/fonts/iconfont.woff


BIN
frontend/pc-web/packages/font-school/resources/fonts/iconfont.woff2


+ 4 - 0
frontend/pc-web/packages/font-school/sass/etc/icons.scss

@@ -30,6 +30,10 @@
   content: "\e902";
 }
 
+.ss-delete1:before {
+  content: "\e911";
+}
+
 .ss-add:before {
   content: "\e901";
 }

File diff suppressed because it is too large
+ 0 - 2
frontend/pc-web/packages/font-school/sass/src/all.scss


+ 3 - 2
frontend/pc-web/resources/json/navigation.json

@@ -59,8 +59,9 @@
         "view": "setting-msgtemplate-panel"
     }, {
         "id": "setting-device-list",
-        "text": "设备参数",
-        "view": "setting-device-list"
+        "text": "平台设备管理",
+        "view": "setting-device-list",
+        "op": "blank"
     }, {
         "id": "setting-operatelog-operatelog",
         "text": "操作日志",

+ 1 - 1
frontend/wechat-web/src/modules/hiPages/accessnoticedetail/AccessNoticeDetail.jsx

@@ -59,7 +59,7 @@ class AccessNoticeDetail extends Component {
 
                 <div className='access-notice-img-layout'>
                     <img className='access-notice-img'
-                         src={_host + '/api/file/download?path=' + pic}/>
+                         src={pic}/>
                 </div>
             </div>
         )

+ 1 - 1
frontend/wechat-web/src/modules/home/HomePage.jsx

@@ -552,7 +552,7 @@ class StuItem extends Component {
             <div onClick={this.onStuSwitch} className='home-top-stu-layout'>
                 {this.props.stuObj.stuPhoto ?
                     <img className={this.props.isSelect ? 'student_select_img' : 'student_noselect_img'}
-                         src={_baseURL + this.props.stuObj.stuPhoto}
+                         src={this.props.stuObj.stuPhoto}
                     /> :
                     this.props.isSelect ?
                         <Avatar className={this.props.isSelect ? 'border-radius-50-blue' : 'border-radius-50'}

Some files were not shown because too many files changed in this diff