Forráskód Böngészése

会山流程引擎一版

xianwait 2 éve
szülő
commit
8e7554fd62
26 módosított fájl, 204 hozzáadás és 1762 törlés
  1. 18 15
      willalp-admin/src/main/java/com/willalp/WillalpApplication.java
  2. 2 0
      willalp-admin/src/main/java/com/willalp/web/controller/api/ApiOneController.java
  3. 1 1
      willalp-admin/src/main/java/com/willalp/web/controller/app/AppController.java
  4. 5 2
      willalp-admin/src/main/java/com/willalp/web/controller/app/CustomController.java
  5. 1 0
      willalp-admin/src/main/java/com/willalp/web/controller/system/SysUserOrganizationController.java
  6. 4 1
      willalp-admin/src/main/resources/application-dev.yml
  7. 4 0
      willalp-admin/src/main/resources/application-prod.yml
  8. 10 1
      willalp-clocking-in/src/main/java/com/willalp/files/mapper/HsOrgPersonnelFilesMapper.java
  9. 102 113
      willalp-common/src/main/java/com/willalp/common/utils/http/HttpUtils.java
  10. 14 18
      willalp-common/src/main/java/com/willalp/common/utils/ip/AddressUtils.java
  11. 6 5
      willalp-framework/src/main/java/com/willalp/framework/manager/factory/AsyncFactory.java
  12. 1 1
      willalp-framework/src/main/java/com/willalp/framework/web/service/TokenService.java
  13. 6 0
      willalp-integral/src/main/java/com/willalp/integral/domain/excelVo/IntegralVo.java
  14. 17 2
      willalp-integral/src/main/java/com/willalp/integral/service/impl/IntegralServiceImpl.java
  15. 13 1
      willalp-system/src/main/java/com/willalp/system/service/impl/SysUserServiceImpl.java
  16. 0 53
      willalp-ui/src/api/example/demo.js
  17. 0 435
      willalp-ui/src/components/Activiti/ApplyAfter/index.vue
  18. 0 74
      willalp-ui/src/components/Activiti/ApplyBefore/index.vue
  19. 0 96
      willalp-ui/src/components/Activiti/ViewVerify/index.vue
  20. 0 79
      willalp-ui/src/views/example/demo/demoForm.vue
  21. 0 396
      willalp-ui/src/views/example/demo/index.vue
  22. 0 4
      willalp-ui/src/views/leave/leave/index.vue
  23. 0 4
      willalp-ui/src/views/leave/leave/indexPre.vue
  24. 0 2
      willalp-ui/src/views/leave/leave/leaveForm.vue
  25. 0 229
      willalp-ui/src/views/todoItem/done/index.vue
  26. 0 230
      willalp-ui/src/views/todoItem/todo/index.vue

+ 18 - 15
willalp-admin/src/main/java/com/willalp/WillalpApplication.java

@@ -1,6 +1,7 @@
 package com.willalp;
 
 import com.willalp.control.netty.NettyServer;
+import org.apache.catalina.connector.Connector;
 import org.mybatis.spring.annotation.MapperScan;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -9,6 +10,8 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
+import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Primary;
@@ -54,23 +57,23 @@ public class WillalpApplication extends SpringBootServletInitializer implements
 
     @Override
     public void run(String... args) {
-//        logger.info("----Netty 启动----");
-//        nettyServer.start();
+        logger.info("----Netty 启动----");
+        nettyServer.start();
     }
 
-//    @Bean
-//    public ServletWebServerFactory servletContainer() {
-//        TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
-//        tomcat.addAdditionalTomcatConnectors(createStandardConnector());
-//        return tomcat;
-//    }
-//
-//    private Connector createStandardConnector() {
-//        Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
-//        int httpPort = 8080;
-//        connector.setPort(httpPort);
-//        return connector;
-//    }
+    @Bean
+    public ServletWebServerFactory servletContainer() {
+        TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
+        tomcat.addAdditionalTomcatConnectors(createStandardConnector());
+        return tomcat;
+    }
+
+    private Connector createStandardConnector() {
+        Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
+        int httpPort = 8080;
+        connector.setPort(httpPort);
+        return connector;
+    }
 
 //
 //    /**

+ 2 - 0
willalp-admin/src/main/java/com/willalp/web/controller/api/ApiOneController.java

@@ -8,6 +8,7 @@ import com.willalp.files.domain.HsOrgPersonnelFiles;
 import com.willalp.files.service.IHsOrgPersonnelFilesService;
 import com.willalp.system.service.ISysUserService;
 import io.swagger.annotations.Api;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -27,6 +28,7 @@ public class ApiOneController {
     @Resource
     private IHsOrgPersonnelFilesService orgPersonnelFilesService;
 
+    @Transactional(rollbackFor = Exception.class)
     @RequestMapping("/add")
     public AjaxResult add(@RequestBody SysUser user) {
         try {

+ 1 - 1
willalp-admin/src/main/java/com/willalp/web/controller/app/AppController.java

@@ -383,7 +383,7 @@ public class AppController extends BaseController {
         user.setOrganizationCode(sys.getOrganizationCode());
         AppUserResp userResp = sysUserService.selectAppUserList(user);
         if (userResp == null) {
-            return AjaxResult.error("用户信息不存在或已到期");
+            return AjaxResult.error("暂未绑定机构或绑定已到期");
         }
 //        if (StrUtil.isNotBlank(user.getAvatar())) {
 //            user.setAvatar("http://" + getIp() + user.getAvatar());

+ 5 - 2
willalp-admin/src/main/java/com/willalp/web/controller/app/CustomController.java

@@ -477,7 +477,7 @@ public class CustomController extends BaseController {
             SysUser sysUser = sysUserService.selectUserByUserName(usableOrderResp.getUserNumber());
             if (null != sysUser) {
                 usableOrderResp.setNickName(sysUser.getNickName());
-            }else{
+            } else {
                 usableOrderResp.setNickName(usableOrderResp.getUserNumber());
             }
             return AjaxResult.success(usableOrderResp);
@@ -525,13 +525,16 @@ public class CustomController extends BaseController {
         String morningStr = sysConfigService.selectConfigByKey("morning");
         String noonStr = sysConfigService.selectConfigByKey("noon");
         String nightStr = sysConfigService.selectConfigByKey("night");
-        Integer periodId = PeriodUtil.judgmentPeriod(date, morningStr.split(","), noonStr.split(","), nightStr.split(","));
+        Integer periodId = PeriodUtil.judgmentPeriod(date, morningStr.split(","),
+                noonStr.split(","),
+                nightStr.split(","));
 
         String dateStr = DateUtil.formatDate(date);
         CustomGetOrderVo customGetOrderVo = new CustomGetOrderVo();
         customGetOrderVo.setPeriodId(periodId);
         customGetOrderVo.setUseDate(dateStr);
         customGetOrderVo.setJgid(req.getJgid());
+        customGetOrderVo.setPlaceNumber(req.getPlaceNumber());
         //查询订单信息
         List<CustomGetOrderResp> orders = hsCanteenOrderService.getOrderNow(customGetOrderVo);
         Map<Integer, List<CustomGetOrderResp>> groupMap = orders.stream().collect(Collectors.groupingBy(CustomGetOrderResp::getZfbz));

+ 1 - 0
willalp-admin/src/main/java/com/willalp/web/controller/system/SysUserOrganizationController.java

@@ -29,6 +29,7 @@ public class SysUserOrganizationController extends BaseController {
     @Resource
     private ISysDeptService deptService;
 
+
     /**
      * 获取用户机构绑定列表
      */

+ 4 - 1
willalp-admin/src/main/resources/application-dev.yml

@@ -136,4 +136,7 @@ uniapp:
     appKey: sBes656vJL961JWc9eozW
     appSecret: GN6B3BE15X8s2iErm80WN
     masterSecret: 8iu6ynCqg986pZXwkefeS6
-
+masterServer:
+  host: localhost
+  port: 3010
+  path: /api

+ 4 - 0
willalp-admin/src/main/resources/application-prod.yml

@@ -134,3 +134,7 @@ uniapp:
     appKey: sBes656vJL961JWc9eozW
     appSecret: GN6B3BE15X8s2iErm80WN
     masterSecret: 8iu6ynCqg986pZXwkefeS6
+masterServer:
+  host: 114.115.142.166
+  port: 3010
+  path: /api

+ 10 - 1
willalp-clocking-in/src/main/java/com/willalp/files/mapper/HsOrgPersonnelFilesMapper.java

@@ -22,6 +22,15 @@ public interface HsOrgPersonnelFilesMapper extends BaseMapper<HsOrgPersonnelFile
     List<HsOrgPersonnelFiles> selectHsOrgPersonnelFilesList(HsOrgPersonnelFiles hsOrgPersonnelFiles);
 
 
-    @Select("select user_code,user_name,phone from hs_org_personnel_files")
+    @Select("SELECT\n" +
+            "\tuser_code,\n" +
+            "\thopf.user_name,\n" +
+            "\thopf.phone,\n" +
+            "\tsuo.user_type\n" +
+            "FROM\n" +
+            "\ths_org_personnel_files hopf\n" +
+            "\tleft JOIN sys_user_organization suo on hopf.user_code = suo.login_name\n" +
+            "\tWHERE suo.organization_code = 'G00000007'" +
+            "\tGROUP BY hopf.user_code")
     List<HsOrgPersonnelFiles> templateHsOrgPersonnelFilesList();
 }

+ 102 - 113
willalp-common/src/main/java/com/willalp/common/utils/http/HttpUtils.java

@@ -1,8 +1,11 @@
 package com.willalp.common.utils.http;
 
 import com.willalp.common.constant.Constants;
+import com.willalp.common.utils.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
 
 import javax.net.ssl.*;
 import java.io.*;
@@ -10,6 +13,7 @@ import java.net.ConnectException;
 import java.net.SocketTimeoutException;
 import java.net.URL;
 import java.net.URLConnection;
+import java.nio.charset.StandardCharsets;
 import java.security.cert.X509Certificate;
 
 /**
@@ -17,79 +21,101 @@ import java.security.cert.X509Certificate;
  *
  * @author willalp
  */
-public class HttpUtils
-{
-    private static final Logger log = LoggerFactory.getLogger(HttpUtils.class);
+@Component
+public class HttpUtils {
+    private final Logger log = LoggerFactory.getLogger(HttpUtils.class);
+
+    public final String HTTP = "http://";
+    public final String HTTPS = "https://";
+
+    @Value("${masterServer.host}")
+    public String host;
+
+    @Value("${masterServer.port}")
+    public String port;
+
+    @Value("${masterServer.path}")
+    public String path;
+
+
+    public String getHttpsMasterUrl(String requestUrl) {
+        return HTTPS + host + ":" + port + path + requestUrl;
+    }
+
+    public String getHttpMasterUrl(String requestUrl) {
+        return HTTP + host + ":" + port + path + requestUrl;
+    }
+
 
     /**
      * 向指定 URL 发送GET方法的请求
      *
      * @param url 发送请求的 URL
+     * @return 所代表远程资源的响应结果
+     */
+    public String sendGet(String url) {
+        return sendGet(url, StringUtils.EMPTY);
+    }
+
+    /**
+     * 向指定 URL 发送GET方法的请求
+     *
+     * @param url   发送请求的 URL
      * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
      * @return 所代表远程资源的响应结果
      */
-    public static String sendGet(String url, String param)
-    {
+    public String sendGet(String url, String param) {
         return sendGet(url, param, Constants.UTF8);
     }
 
     /**
      * 向指定 URL 发送GET方法的请求
      *
-     * @param url 发送请求的 URL
-     * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
+     * @param url         发送请求的 URL
+     * @param param       请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
      * @param contentType 编码类型
      * @return 所代表远程资源的响应结果
      */
-    public static String sendGet(String url, String param, String contentType)
-    {
+    public String sendGet(String url, String param, String contentType) {
         StringBuilder result = new StringBuilder();
         BufferedReader in = null;
-        try
-        {
-            String urlNameString = url + "?" + param;
+        try {
+            String urlNameString = StringUtils.isNotBlank(param) ? url + "?" + param : url;
             log.info("sendGet - {}", urlNameString);
+            SSLContext sc = SSLContext.getInstance("SSL");
+            sc.init(null, new TrustManager[]{new TrustAnyTrustManager()}, new java.security.SecureRandom());
             URL realUrl = new URL(urlNameString);
-            URLConnection connection = realUrl.openConnection();
-            connection.setRequestProperty("accept", "*/*");
-            connection.setRequestProperty("connection", "Keep-Alive");
-            connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
-            connection.connect();
-            in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType));
+            HttpsURLConnection conn = (HttpsURLConnection) realUrl.openConnection();
+            conn.setRequestProperty("accept", "*/*");
+            conn.setRequestProperty("connection", "Keep-Alive");
+            conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
+            conn.setRequestProperty("Accept-Charset", "utf-8");
+            conn.setRequestProperty("contentType", "utf-8");
+            conn.setDoOutput(true);
+            conn.setDoInput(true);
+            conn.setSSLSocketFactory(sc.getSocketFactory());
+            conn.setHostnameVerifier(new TrustAnyHostnameVerifier());
+            conn.connect();
+            in = new BufferedReader(new InputStreamReader(conn.getInputStream(), contentType));
             String line;
-            while ((line = in.readLine()) != null)
-            {
+            while ((line = in.readLine()) != null) {
                 result.append(line);
             }
             log.info("recv - {}", result);
-        }
-        catch (ConnectException e)
-        {
+        } catch (ConnectException e) {
             log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e);
-        }
-        catch (SocketTimeoutException e)
-        {
+        } catch (SocketTimeoutException e) {
             log.error("调用HttpUtils.sendGet SocketTimeoutException, url=" + url + ",param=" + param, e);
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             log.error("调用HttpUtils.sendGet IOException, url=" + url + ",param=" + param, e);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             log.error("调用HttpsUtil.sendGet Exception, url=" + url + ",param=" + param, e);
-        }
-        finally
-        {
-            try
-            {
-                if (in != null)
-                {
+        } finally {
+            try {
+                if (in != null) {
                     in.close();
                 }
-            }
-            catch (Exception ex)
-            {
+            } catch (Exception ex) {
                 log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
             }
         }
@@ -99,20 +125,17 @@ public class HttpUtils
     /**
      * 向指定 URL 发送POST方法的请求
      *
-     * @param url 发送请求的 URL
+     * @param url   发送请求的 URL
      * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
      * @return 所代表远程资源的响应结果
      */
-    public static String sendPost(String url, String param)
-    {
+    public String sendPost(String url, String param) {
         PrintWriter out = null;
         BufferedReader in = null;
         StringBuilder result = new StringBuilder();
-        try
-        {
-            String urlNameString = url;
-            log.info("sendPost - {}", urlNameString);
-            URL realUrl = new URL(urlNameString);
+        try {
+            log.info("sendPost - {}", url);
+            URL realUrl = new URL(url);
             URLConnection conn = realUrl.openConnection();
             conn.setRequestProperty("accept", "*/*");
             conn.setRequestProperty("connection", "Keep-Alive");
@@ -124,60 +147,42 @@ public class HttpUtils
             out = new PrintWriter(conn.getOutputStream());
             out.print(param);
             out.flush();
-            in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
+            in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
             String line;
-            while ((line = in.readLine()) != null)
-            {
+            while ((line = in.readLine()) != null) {
                 result.append(line);
             }
             log.info("recv - {}", result);
-        }
-        catch (ConnectException e)
-        {
+        } catch (ConnectException e) {
             log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e);
-        }
-        catch (SocketTimeoutException e)
-        {
+        } catch (SocketTimeoutException e) {
             log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e);
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e);
-        }
-        finally
-        {
-            try
-            {
-                if (out != null)
-                {
+        } finally {
+            try {
+                if (out != null) {
                     out.close();
                 }
-                if (in != null)
-                {
+                if (in != null) {
                     in.close();
                 }
-            }
-            catch (IOException ex)
-            {
+            } catch (IOException ex) {
                 log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
             }
         }
         return result.toString();
     }
 
-    public static String sendSSLPost(String url, String param)
-    {
+    public String sendSSLPost(String url, String param) {
         StringBuilder result = new StringBuilder();
         String urlNameString = url + "?" + param;
-        try
-        {
+        try {
             log.info("sendSSLPost - {}", urlNameString);
             SSLContext sc = SSLContext.getInstance("SSL");
-            sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, new java.security.SecureRandom());
+            sc.init(null, new TrustManager[]{new TrustAnyTrustManager()}, new java.security.SecureRandom());
             URL console = new URL(urlNameString);
             HttpsURLConnection conn = (HttpsURLConnection) console.openConnection();
             conn.setRequestProperty("accept", "*/*");
@@ -194,61 +199,45 @@ public class HttpUtils
             InputStream is = conn.getInputStream();
             BufferedReader br = new BufferedReader(new InputStreamReader(is));
             String ret = "";
-            while ((ret = br.readLine()) != null)
-            {
-                if (ret != null && !"".equals(ret.trim()))
-                {
-                    result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8"));
+            while ((ret = br.readLine()) != null) {
+                if (ret != null && !"".equals(ret.trim())) {
+                    result.append(new String(ret.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8));
                 }
             }
             log.info("recv - {}", result);
             conn.disconnect();
             br.close();
-        }
-        catch (ConnectException e)
-        {
+        } catch (ConnectException e) {
             log.error("调用HttpUtils.sendSSLPost ConnectException, url=" + url + ",param=" + param, e);
-        }
-        catch (SocketTimeoutException e)
-        {
+        } catch (SocketTimeoutException e) {
             log.error("调用HttpUtils.sendSSLPost SocketTimeoutException, url=" + url + ",param=" + param, e);
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             log.error("调用HttpUtils.sendSSLPost IOException, url=" + url + ",param=" + param, e);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             log.error("调用HttpsUtil.sendSSLPost Exception, url=" + url + ",param=" + param, e);
         }
         return result.toString();
     }
 
-    private static class TrustAnyTrustManager implements X509TrustManager
-    {
+    private class TrustAnyTrustManager implements X509TrustManager {
         @Override
-        public void checkClientTrusted(X509Certificate[] chain, String authType)
-        {
+        public void checkClientTrusted(X509Certificate[] chain, String authType) {
         }
 
         @Override
-        public void checkServerTrusted(X509Certificate[] chain, String authType)
-        {
+        public void checkServerTrusted(X509Certificate[] chain, String authType) {
         }
 
         @Override
-        public X509Certificate[] getAcceptedIssuers()
-        {
-            return new X509Certificate[] {};
+        public X509Certificate[] getAcceptedIssuers() {
+            return new X509Certificate[]{};
         }
     }
 
-    private static class TrustAnyHostnameVerifier implements HostnameVerifier
-    {
+    private class TrustAnyHostnameVerifier implements HostnameVerifier {
         @Override
-        public boolean verify(String hostname, SSLSession session)
-        {
+        public boolean verify(String hostname, SSLSession session) {
             return true;
         }
     }
-}
+}

+ 14 - 18
willalp-common/src/main/java/com/willalp/common/utils/ip/AddressUtils.java

@@ -1,43 +1,41 @@
 package com.willalp.common.utils.ip;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import com.alibaba.fastjson.JSONObject;
 import com.willalp.common.config.WillalpConfig;
 import com.willalp.common.constant.Constants;
 import com.willalp.common.utils.StringUtils;
 import com.willalp.common.utils.http.HttpUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Resource;
 
 /**
  * 获取地址类
  *
  * @author willalp
  */
-public class AddressUtils
-{
+public class AddressUtils {
     private static final Logger log = LoggerFactory.getLogger(AddressUtils.class);
 
+    @Resource
+    private HttpUtils httpUtils;
     // IP地址查询
     public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp";
 
     // 未知地址
     public static final String UNKNOWN = "XX XX";
 
-    public static String getRealAddressByIP(String ip)
-    {
+    public String getRealAddressByIP(String ip) {
         String address = UNKNOWN;
         // 内网不查询
-        if (IpUtils.internalIp(ip))
-        {
+        if (IpUtils.internalIp(ip)) {
             return "内网IP";
         }
-        if (WillalpConfig.isAddressEnabled())
-        {
-            try
-            {
-                String rspStr = HttpUtils.sendGet(IP_URL, "ip=" + ip + "&json=true", Constants.GBK);
-                if (StringUtils.isEmpty(rspStr))
-                {
+        if (WillalpConfig.isAddressEnabled()) {
+            try {
+                String rspStr = httpUtils.sendGet(IP_URL, "ip=" + ip + "&json=true", Constants.GBK);
+                if (StringUtils.isEmpty(rspStr)) {
                     log.error("获取地理位置异常 {}", ip);
                     return UNKNOWN;
                 }
@@ -45,9 +43,7 @@ public class AddressUtils
                 String region = obj.getString("pro");
                 String city = obj.getString("city");
                 return String.format("%s %s", region, city);
-            }
-            catch (Exception e)
-            {
+            } catch (Exception e) {
                 log.error("获取地理位置异常 {}", ip);
             }
         }

+ 6 - 5
willalp-framework/src/main/java/com/willalp/framework/manager/factory/AsyncFactory.java

@@ -1,8 +1,5 @@
 package com.willalp.framework.manager.factory;
 
-import java.util.TimerTask;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import com.willalp.common.constant.Constants;
 import com.willalp.common.utils.LogUtils;
 import com.willalp.common.utils.ServletUtils;
@@ -15,6 +12,10 @@ import com.willalp.system.domain.SysOperLog;
 import com.willalp.system.service.ISysLogininforService;
 import com.willalp.system.service.ISysOperLogService;
 import eu.bitwalker.useragentutils.UserAgent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.TimerTask;
 
 /**
  * 异步工厂(产生任务用)
@@ -44,7 +45,7 @@ public class AsyncFactory
             @Override
             public void run()
             {
-                String address = AddressUtils.getRealAddressByIP(ip);
+                String address = new AddressUtils().getRealAddressByIP(ip);
                 StringBuilder s = new StringBuilder();
                 s.append(LogUtils.getBlock(ip));
                 s.append(address);
@@ -94,7 +95,7 @@ public class AsyncFactory
             public void run()
             {
                 // 远程查询操作地点
-                operLog.setOperLocation(AddressUtils.getRealAddressByIP(operLog.getOperIp()));
+                operLog.setOperLocation(new AddressUtils().getRealAddressByIP(operLog.getOperIp()));
                 SpringUtils.getBean(ISysOperLogService.class).insertOperlog(operLog);
             }
         };

+ 1 - 1
willalp-framework/src/main/java/com/willalp/framework/web/service/TokenService.java

@@ -200,7 +200,7 @@ public class TokenService
         UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent"));
         String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
         loginUser.setIpaddr(ip);
-        loginUser.setLoginLocation(AddressUtils.getRealAddressByIP(ip));
+        loginUser.setLoginLocation(new AddressUtils().getRealAddressByIP(ip));
         loginUser.setBrowser(userAgent.getBrowser().getName());
         loginUser.setOs(userAgent.getOperatingSystem().getName());
     }

+ 6 - 0
willalp-integral/src/main/java/com/willalp/integral/domain/excelVo/IntegralVo.java

@@ -22,6 +22,12 @@ public class IntegralVo {
     @Excel(name = "账户名称")
     private String nickName;
 
+    /**
+     * 用户类型
+     */
+    @Excel(name = "用户类型")
+    private String userType;
+
 
     @TableField(exist = false)
     @Excel(name = "手机号")

+ 17 - 2
willalp-integral/src/main/java/com/willalp/integral/service/impl/IntegralServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.willalp.common.core.domain.ReturnEntity;
+import com.willalp.common.core.domain.entity.SysDictData;
 import com.willalp.common.core.domain.entity.SysUser;
 import com.willalp.common.enums.RechargeEnum;
 import com.willalp.common.enums.RechargeTypeEnum;
@@ -12,18 +13,20 @@ import com.willalp.common.exception.base.BaseException;
 import com.willalp.common.utils.DateUtils;
 import com.willalp.common.utils.ObjectToTypes;
 import com.willalp.common.utils.SecurityUtils;
+import com.willalp.common.utils.StringUtils;
+import com.willalp.files.domain.HsOrgPersonnelFiles;
+import com.willalp.files.mapper.HsOrgPersonnelFilesMapper;
 import com.willalp.integral.domain.Integral;
 import com.willalp.integral.domain.excelVo.IntegralVo;
 import com.willalp.integral.mapper.IntegralMapper;
 import com.willalp.integral.request.IntegralGroupQuery;
 import com.willalp.integral.service.IIntegralService;
-import com.willalp.files.domain.HsOrgPersonnelFiles;
-import com.willalp.files.mapper.HsOrgPersonnelFilesMapper;
 import com.willalp.system.domain.SysCardInfo;
 import com.willalp.system.domain.SysUserOrganization;
 import com.willalp.system.mapper.SysCardInfoMapper;
 import com.willalp.system.mapper.SysUserMapper;
 import com.willalp.system.mapper.SysUserOrganizationMapper;
+import com.willalp.system.service.ISysDictTypeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -245,14 +248,26 @@ public class IntegralServiceImpl extends ServiceImpl<IntegralMapper, Integral> i
         return integralMapper.getIntegralReportList(req);
     }
 
+    @Resource
+    private ISysDictTypeService dictTypeService;
+
     @Override
     public List<IntegralVo> rechargeTemplate() {
         List<HsOrgPersonnelFiles> hsOrgPersonnelFiles = opFilesMapper.templateHsOrgPersonnelFilesList();
+        List<SysDictData> userTypes = dictTypeService.selectDictDataByType("user_type");
         List<IntegralVo> list = new ArrayList<>();
         if (0 != hsOrgPersonnelFiles.size()) {
             hsOrgPersonnelFiles.forEach(item -> {
                 IntegralVo integral = new IntegralVo();
                 integral.setNickName(item.getUserName());
+                if (StringUtils.isNotBlank(item.getUserType())) {
+                    SysDictData sysDictData = userTypes.get(Integer.parseInt(item.getUserType()) - 1);
+                    if (sysDictData != null) {
+                        integral.setUserType(sysDictData.getDictLabel());
+                    } else {
+                        integral.setUserType("未设置");
+                    }
+                }
                 integral.setPhonenumber(item.getPhone());
                 list.add(integral);
             });

+ 13 - 1
willalp-system/src/main/java/com/willalp/system/service/impl/SysUserServiceImpl.java

@@ -3,10 +3,12 @@ package com.willalp.system.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.willalp.common.annotation.DataScope;
 import com.willalp.common.constant.UserConstants;
+import com.willalp.common.core.domain.AjaxResult;
 import com.willalp.common.core.domain.entity.SysDept;
 import com.willalp.common.core.domain.entity.SysRole;
 import com.willalp.common.core.domain.entity.SysUser;
@@ -18,6 +20,7 @@ import com.willalp.common.exception.base.BaseException;
 import com.willalp.common.utils.DateUtils;
 import com.willalp.common.utils.SecurityUtils;
 import com.willalp.common.utils.StringUtils;
+import com.willalp.common.utils.http.HttpUtils;
 import com.willalp.common.utils.spring.SpringUtils;
 import com.willalp.number.domain.req.NumberRuleReq;
 import com.willalp.number.service.IHsSysNumberRuleService;
@@ -33,6 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -81,6 +85,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     @Autowired
     private SysDeptMapper sysDeptMapper;
 
+    @Resource
+    private HttpUtils httpUtils;
+
     /**
      * 根据条件分页查询用户列表
      *
@@ -730,7 +737,13 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
             temp.setLoginName(loginNameList[i]);
             organs.add(temp);
         }
+
         organs.forEach(t -> {
+            String sslPost = httpUtils.sendGet(httpUtils.getHttpsMasterUrl("/org/binding"), "uc=" + t.getLoginName());
+            AjaxResult ajaxResult = JSON.parseObject(sslPost, AjaxResult.class);
+            if (((int) ajaxResult.get(AjaxResult.CODE_TAG)) == 500) {
+                log.error("绑定失败 - 无法同步主服务数据");
+            }
             //判断是否已有机构
             SysUserOrganization exist = new SysUserOrganization();
             exist.setLoginName(t.getLoginName());
@@ -773,7 +786,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
                 }
             }
         });
-
     }
 
     @Override

+ 0 - 53
willalp-ui/src/api/example/demo.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询示例Demo列表
-export function listDemo(query) {
-  return request({
-    url: '/example/demo/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询示例Demo详细
-export function getDemo(id) {
-  return request({
-    url: '/example/demo/' + id,
-    method: 'get'
-  })
-}
-
-// 新增示例Demo
-export function addDemo(data) {
-  return request({
-    url: '/example/demo',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改示例Demo
-export function updateDemo(data) {
-  return request({
-    url: '/example/demo',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除示例Demo
-export function delDemo(id) {
-  return request({
-    url: '/example/demo/' + id,
-    method: 'delete'
-  })
-}
-
-// 导出示例Demo
-export function exportDemo(query) {
-  return request({
-    url: '/example/demo/export',
-    method: 'get',
-    params: query
-  })
-}

+ 0 - 435
willalp-ui/src/components/Activiti/ApplyAfter/index.vue

@@ -1,435 +0,0 @@
-<template>
-  <div>
-    <el-button
-      size="mini"
-      type="text"
-      :icon="icon"
-      @click="_handleView"
-    >{{ type === 'todo' ? '办理' : '表单数据' }}</el-button>
-    <el-button
-      size="mini"
-      type="text"
-      icon="el-icon-user"
-      @click="handleViewUserList"
-      v-show="type === 'todo'"
-    >转办</el-button>
-    <el-button
-      size="mini"
-      type="text"
-      icon="el-icon-time"
-      @click="handleViewHistoryList"
-      v-show="row.taskId !== '-2'"
-    >审批历史</el-button>
-    <el-button
-      size="mini"
-      type="text"
-      icon="el-icon-search"
-      @click="handleViewProcessImg"
-      v-show="row.taskId !== '-2'"
-    >进度查看</el-button>
-    <el-button
-      size="mini"
-      type="text"
-      icon="el-icon-back"
-      @click="handleCancel"
-      v-show="row.taskId !== '-1' && row.taskId !== '-2' && type === 'none'"
-    >撤销</el-button>
-    <el-button
-      size="mini"
-      type="text"
-      icon="el-icon-sort"
-      @click="handleState"
-      v-show="row.taskId !== '-1' && row.taskId !== '-2' && type === 'none'"
-    >{{ row.suspendState === '2' ? '激活' : '挂起' }}</el-button>
-
-    <!--业务表单子组件-->
-    <demo-form
-      v-if="row.processKey === 'exampleDemo'"
-      :row="row"
-      :taskId="taskId"
-      :taskName="taskName"
-      :type="type"
-      ref="demoForm"
-    ></demo-form>
-    <leave-form
-      v-if="row.processKey === 'leave'"
-      :row="row"
-      :taskId="taskId"
-      :taskName="taskName"
-      :type="type"
-      ref="leaveForm"
-    ></leave-form>
-
-    <!--进度查看对话框-->
-    <el-dialog title="进度查看" :visible.sync="open" width="1000px" append-to-body>
-      <div style="width: 100%; text-align: center;">
-        <el-image
-          :src="src"
-          :preview-src-list="srcList">
-        </el-image>
-      </div>
-      <div slot="footer" class="dialog-footer" style="text-align: right;">
-        <el-button @click="close">关闭</el-button>
-      </div>
-    </el-dialog>
-
-    <!--审批历史对话框-->
-    <el-dialog title="审批历史" :visible.sync="showHistoryTable" width="1000px" append-to-body>
-      <!--审批历史表格-->
-      <div>
-        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="70px">
-          <el-form-item label="任务名称" prop="activityName">
-            <el-input
-              v-model="queryParams.activityName"
-              placeholder="请输入任务名称"
-              clearable
-              size="small"
-              @keyup.enter.native="handleQuery"
-            />
-          </el-form-item>
-          <el-form-item label="办理人ID" prop="assignee">
-            <el-input
-              v-model="queryParams.assignee"
-              placeholder="请输入办理人ID"
-              clearable
-              size="small"
-              @keyup.enter.native="handleQuery"
-            />
-          </el-form-item>
-          <el-form-item>
-            <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-          </el-form-item>
-        </el-form>
-
-        <el-row :gutter="10" class="mb8">
-          <right-toolbar :showSearch.sync="showSearch" @queryTable="getHistoryList"></right-toolbar>
-        </el-row>
-
-        <el-table v-loading="loading" :data="historyList">
-          <el-table-column v-if="false" label="活动ID" align="center" prop="activityId" width="60" />
-          <el-table-column label="活动名称" align="center" prop="activityName" width="140" />
-          <el-table-column label="办理人ID" align="center" prop="assignee" width="90" />
-          <el-table-column label="办理人" align="center" prop="assigneeName" width="80" />
-          <el-table-column label="审批意见" align="center" prop="comment" />
-          <el-table-column label="开始时间" align="center" prop="startTime" width="160" />
-          <el-table-column label="结束时间" align="center" prop="endTime" width="160" />
-          <el-table-column label="耗时" align="center" prop="durationInMillis" width="150" />
-        </el-table>
-
-        <!--v-show="total>0"-->
-        <pagination
-          v-show="false"
-          :total="total"
-          :page.sync="queryParams.pageNum"
-          :limit.sync="queryParams.pageSize"
-          @pagination="getHistoryList"
-        />
-      </div>
-      <div slot="footer" class="dialog-footer" style="text-align: right;">
-        <el-button @click="showHistoryTable=false">关闭</el-button>
-      </div>
-    </el-dialog>
-
-    <!--用户列表对话框-->
-    <el-dialog title="选择用户" :visible.sync="showUserTable" width="900px" append-to-body>
-      <!--用户列表表格-->
-      <div>
-        <el-form :model="queryUserParams" ref="queryUserForm" :inline="true" v-show="showUserSearch" label-width="68px">
-          <el-form-item label="用户名称" prop="userName">
-            <el-input
-              v-model="queryUserParams.userName"
-              placeholder="请输入用户名称"
-              clearable
-              size="small"
-              style="width: 240px"
-              @keyup.enter.native="handleUserQuery"
-            />
-          </el-form-item>
-          <el-form-item label="手机号码" prop="phonenumber">
-            <el-input
-              v-model="queryUserParams.phonenumber"
-              placeholder="请输入手机号码"
-              clearable
-              size="small"
-              style="width: 240px"
-              @keyup.enter.native="handleUserQuery"
-            />
-          </el-form-item>
-          <el-form-item>
-            <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleUserQuery">搜索</el-button>
-            <el-button icon="el-icon-refresh" size="mini" @click="resetUserQuery">重置</el-button>
-          </el-form-item>
-        </el-form>
-
-        <el-row :gutter="10" class="mb8">
-          <right-toolbar :showSearch.sync="showUserSearch" @queryTable="getUserList"></right-toolbar>
-        </el-row>
-
-        <el-table v-loading="userLoading" :data="userList" @selection-change="handleUserSelectionChange">
-          <el-table-column type="selection" width="50" align="center" />
-          <el-table-column label="用户编号" align="center" prop="userId" />
-          <el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" />
-          <el-table-column label="用户昵称" align="center" prop="nickName" :show-overflow-tooltip="true" />
-          <el-table-column label="部门" align="center" prop="dept.deptName" :show-overflow-tooltip="true" />
-          <el-table-column label="手机号码" align="center" prop="phonenumber" width="120" />
-          <el-table-column label="创建时间" align="center" prop="createTime" width="160">
-            <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime) }}</span>
-            </template>
-          </el-table-column>
-        </el-table>
-
-        <pagination
-          v-show="userTotal>0"
-          :total="userTotal"
-          :page.sync="queryUserParams.pageNum"
-          :limit.sync="queryUserParams.pageSize"
-          @pagination="getUserList"
-        />
-      </div>
-      <div slot="footer" class="dialog-footer" style="text-align: right;">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="showUserTable=false">关闭</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-  import request from '@/utils/request'
-  import { format, formatTotalDateSub } from "@/utils/activiti/myUtil.js"
-  import { listUser } from "@/api/system/user";
-  import DemoForm from "@/views/example/demo/demoForm";
-  import LeaveForm from "@/views/leave/leave/leaveForm";
-
-  export default {
-    name: "ApplyAfter",
-    components: {DemoForm, LeaveForm},
-    props: {
-      /* 表格行数据 */
-      row: {
-        type: Object,
-      },
-      taskId: {
-        type: String,
-      },
-      taskName: {
-        type: String,
-      },
-      type: {
-        type: String,
-        default: 'none',
-      },
-    },
-    data() {
-      return {
-        open: false,
-        src: '',
-        srcList: [],
-
-        showHistoryTable: false,
-        // 遮罩层
-        loading: false,
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 999,
-          processInstanceId: null,
-          activityName: null,
-          assignee: null,
-        },
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        historyList: [],
-        icon: this.type === 'todo' ? 'el-icon-check' : 'el-icon-document',
-        // 选中行
-        selectedRow: null,
-        // 状态数据字典
-        statusOptions: [],
-        showUserTable: false,
-        // 遮罩层
-        userLoading: false,
-        // 查询参数
-        queryUserParams: {
-          pageNum: 1,
-          pageSize: 10,
-          userName: undefined,
-          phonenumber: undefined,
-          status: undefined,
-        },
-        // 显示搜索条件
-        showUserSearch: true,
-        // 总条数
-        userTotal: 0,
-        userList: [],
-      }
-    },
-    create() {
-      this.getDicts("sys_normal_disable").then(response => {
-        this.statusOptions = response.data;
-      });
-    },
-    methods: {
-      _handleView: function () {
-        switch (this.row.processKey) {
-          case 'exampleDemo':
-            this.$refs.demoForm.form = this.row;
-            this.$refs.demoForm.open = true;
-            break;
-          case 'leave':
-            this.$refs.leaveForm.form = this.row;
-            this.$refs.leaveForm.open = true;
-            break;
-          default:
-            break;
-        }
-      },
-      handleState: function () {
-        const instanceId = this.row.instanceId;
-        const suspendState = this.row.suspendState;
-        const opt = this.row.suspendState === '2' ? '激活': '挂起';
-        this.$confirm('是否确认' + opt + 'ID为"' + instanceId + '"的流程实例?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function () {
-          const data = { "instanceId": instanceId, "suspendState": suspendState };
-          return request({
-            url: '/activiti/process/suspendOrActiveApply',
-            method: 'post',
-            params: data
-          });
-        }).then(response => {
-          this.$emit('getList');
-          this.msgSuccess("操作成功");
-        }).catch(function () {
-        });
-      },
-      handleCancel: function () {
-        const instanceId = this.row.instanceId;
-        this.$confirm('是否确认撤销ID为"' + instanceId + '"的流程实例?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function () {
-          const data = { "instanceId": instanceId };
-          return request({
-            url: '/activiti/process/cancelApply',
-            method: 'post',
-            params: data
-          });
-        }).then(response => {
-          this.$emit('getList');
-          this.msgSuccess("操作成功");
-        }).catch(function () {
-        });
-      },
-      handleViewProcessImg: function() {
-        const baseURL = process.env.VUE_APP_BASE_API;
-        this.src = baseURL + '/activiti/process/read-resource?pProcessInstanceId=' + this.row.instanceId + '&_=' + new Date().getTime();
-        this.srcList = [];
-        this.srcList.push(this.src);
-        this.open = true;
-      },
-      close: function () {
-        this.open = false;
-      },
-      handleViewHistoryList() {
-        this.queryParams.processInstanceId = this.row.instanceId;
-        this.showHistoryTable = true;
-        this.getHistoryList();
-      },
-      getHistoryList: function () {
-        this.loading = true;
-        return request({
-          url: '/activiti/process/listHistory',
-          method: 'post',
-          data: this.queryParams
-        }).then(response => {
-          this.historyList = response.rows;
-          this.historyList.forEach(row => {
-            row.startTime = format(row.startTime, 'yyyy-MM-dd HH:mm:ss');
-            row.endTime = format(row.endTime, 'yyyy-MM-dd HH:mm:ss');
-            row.durationInMillis = formatTotalDateSub(row.durationInMillis / 1000);
-          });
-          this.total = response.total;
-          this.loading = false;
-        }).then(() => {
-        });
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getHistoryList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.resetForm("queryForm");
-        this.handleQuery();
-      },
-      handleViewUserList() {
-        this.showUserTable = true;
-        this.getUserList();
-      },
-      /** 查询用户列表 */
-      getUserList() {
-        this.loading = true;
-        listUser(this.queryUserParams).then(response => {
-            this.userList = response.rows;
-            this.userTotal = response.total;
-            this.userLoading = false;
-          }
-        );
-      },
-      /** 搜索按钮操作 */
-      handleUserQuery() {
-        this.queryUserParams.page = 1;
-        this.getUserList();
-      },
-      /** 重置按钮操作 */
-      resetUserQuery() {
-        this.resetForm("queryUserForm");
-        this.handleUserQuery();
-      },
-      // 多选框选中数据
-      handleUserSelectionChange(selection) {
-        this.selectedRow = selection[0];
-      },
-      /** 提交按钮 */
-      submitForm() {
-        const taskId = this.taskId;
-        const selectedRow = this.selectedRow;
-        if (!selectedRow) {
-          this.msgError('请先选择要转办的用户');
-          return;
-        }
-        if (selectedRow.userName === this.$store.state.user.name) {
-          this.msgError('不能转办给自己');
-          return;
-        }
-        this.$confirm('是否确认转办给' + selectedRow.nickName + '?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return request({
-            url: '/activiti/process/delegate',
-            method: 'post',
-            params: { "taskId": taskId, "delegateToUser": selectedRow.userName },
-          });
-        }).then(() => {
-          this.$emit('getList');
-          this.msgSuccess("操作成功");
-          this.showUserTable = false;
-        })
-      },
-    },
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 74
willalp-ui/src/components/Activiti/ApplyBefore/index.vue

@@ -1,74 +0,0 @@
-<template>
-  <div>
-    <el-button
-      size="mini"
-      type="text"
-      icon="el-icon-check"
-      @click="handleApply"
-    >提交申请</el-button>
-    <el-button
-      size="mini"
-      type="text"
-      icon="el-icon-edit"
-      @click="_handleUpdate"
-    >修改</el-button>
-    <el-button
-      size="mini"
-      type="text"
-      icon="el-icon-delete"
-      @click="_handleDelete"
-    >删除</el-button>
-  </div>
-</template>
-
-<script>
-  import request from '@/utils/request'
-
-  export default {
-    name: "ApplyBefore",
-    props: {
-      /* 表格行数据 */
-      row: {
-        type: Object,
-      },
-      handleUpdate: {
-        type: Function,
-      },
-      handleDelete: {
-        type: Function,
-      },
-      requestMapping: {
-        type: String,
-      },
-    },
-    methods: {
-      handleApply: function () {
-        const id = this.row.id;
-        const requestMapping = this.requestMapping;
-        this.$confirm('是否提交ID为"' + id + '"的申请单据?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return request({
-            url: requestMapping + '/submitApply/' + id,
-            method: 'post',
-          });
-        }).then(() => {
-          this.$emit('getList');
-          this.msgSuccess("申请成功");
-        })
-      },
-      _handleUpdate: function () {
-        this.handleUpdate(this.row);
-      },
-      _handleDelete: function () {
-        this.handleDelete(this.row);
-      },
-    },
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 96
willalp-ui/src/components/Activiti/ViewVerify/index.vue

@@ -1,96 +0,0 @@
-<template>
-  <div>
-    <!--以下是审批字段-->
-    <div v-show="type === 'todo'">
-      <el-form label-width="100px">
-        <el-divider></el-divider>
-        <el-form-item label="审批意见">
-          <el-radio-group v-model="pass">
-            <el-radio label="true">同意</el-radio>
-            <el-radio label="false">驳回</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="批注" prop="remark">
-          <el-input v-model="comment" type="textarea" :value="comment"/>
-        </el-form-item>
-      </el-form>
-    </div>
-    <div slot="footer" class="dialog-footer" style="text-align: right;">
-      <el-button v-show="type === 'todo'" type="primary" @click="complete">确 定</el-button>
-      <el-button @click="close">关 闭</el-button>
-    </div>
-  </div>
-</template>
-
-<script>
-import request from '@/utils/request'
-
-export default {
-  name: "ViewVerify",
-  props: {
-    row: {
-      type: Object,
-    },
-    taskId: {
-      type: String,
-    },
-    type: {
-      type: String,
-    },
-  },
-  data() {
-    return {
-      pass: 'true',
-      comment: '同意',
-    }
-  },
-  methods: {
-    close: function () {
-      this.$emit('update:open', false);
-    },
-    complete() {
-      this.$parent.$children[0].validate(valid => {
-        if (valid) {
-          const data = {
-            "taskId": this.taskId,
-            "instanceId": this.row.instanceId,
-            "variables": JSON.stringify({
-              "comment": this.comment,
-              "pass": this.pass,
-              "formData": this.row,
-            }),
-          };
-          return request({
-            url: '/activiti/process/complete',
-            method: 'post',
-            params: data
-          }).then(response => {
-            this.close();
-            // 刷新待办事项列表(丑陋的代码 👇)
-            this.$emit('getList');
-            console.log("----this.$parent---");
-            console.log(this.$parent);
-            console.log("----this.$parent.$parent---");
-            console.log(this.$parent.$parent);
-            console.log("----this.$parent.$parent.$parent---");
-            console.log(this.$parent.$parent.$parent);
-            console.log("----this.$parent.$parent.$parent.$parent---");
-            console.log(this.$parent.$parent.$parent.$parent);
-            this.$parent.$parent.$parent.$parent.$parent.$parent.getList();
-            this.msgSuccess("操作成功");
-          });
-        }
-      });
-    },
-  },
-  watch: {
-    pass: function (val) {
-      this.comment = val === 'true' ? '同意' : '驳回';
-    },
-  },
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 79
willalp-ui/src/views/example/demo/demoForm.vue

@@ -1,79 +0,0 @@
-<template>
-  <div>
-    <!--查看和审批对话框-->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" label-width="100px">
-        <el-form-item label="申请编号" prop="applyNum">
-          <el-input v-model="form.applyNum" :readonly="taskName!=='调整申请'" />
-        </el-form-item>
-        <el-form-item label="是否高压停电">
-          <el-radio-group v-model="form.highVoltage" :disabled="taskName!=='调整申请'">
-            <el-radio label="0">否</el-radio>
-            <el-radio label="1">是</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="申请人" prop="applyUserName">
-          <el-input v-model="form.applyUserName" :readonly="taskName!=='调整申请'" />
-        </el-form-item>
-        <el-form-item label="申请时间" prop="applyTime">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.applyTime"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          placeholder="选择申请时间"
-                          :readonly="taskName!=='调整申请'">
-          </el-date-picker>
-        </el-form-item>
-        <!--<el-form-item label="流程实例ID" prop="instanceId">
-          <el-input v-model="form.instanceId" readonly />
-        </el-form-item>-->
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" :readonly="taskName!=='调整申请'" />
-        </el-form-item>
-      </el-form>
-      <view-verify
-        :open.sync="open"
-        :row="row"
-        :taskId="taskId"
-        :type="type"
-      />
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-  import ViewVerify from "@/components/Activiti/ViewVerify/index";
-
-  export default {
-    name: "DemoForm",
-    components: {
-      ViewVerify,
-    },
-    props: {
-      row: {
-        type: Object,
-      },
-      taskId: {
-        type: String,
-      },
-      taskName: {
-        type: String,
-      },
-      type: {
-        type: String,
-        default: 'none',
-      },
-    },
-    data() {
-      return {
-        title: '查看示例Demo',
-        form: this.row,
-        open: false,
-      }
-    },
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 396
willalp-ui/src/views/example/demo/index.vue

@@ -1,396 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="申请编号" prop="applyNum">
-        <el-input
-          v-model="queryParams.applyNum"
-          placeholder="请输入申请编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="高压停电" prop="highVoltage">
-        <el-select v-model="queryParams.highVoltage" placeholder="请选择是否高压停电" clearable size="small">
-          <el-option label="否" value="0" />
-          <el-option label="是" value="1" />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="申请人" prop="applyUserName">
-        <el-input
-          v-model="queryParams.applyUserName"
-          placeholder="请输入申请人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="申请时间" prop="applyTime">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.applyTime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择申请时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="流程实例" prop="instanceId">
-        <el-input
-          v-model="queryParams.instanceId"
-          placeholder="请输入流程实例ID"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['example:demo:add']"
-        >新增</el-button>
-      </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="demoList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="ID" align="center" prop="id" width="60" />
-      <el-table-column label="申请编号" align="center" prop="applyNum" width="120" />
-      <el-table-column label="是否高压停电" align="center" prop="highVoltage" width="100">
-        <template slot-scope="scope">
-          <span>{{ scope.row.highVoltage === '0' ? '否' : '是' }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="申请人" align="center" prop="applyUserName" width="90" />
-      <el-table-column label="申请时间" align="center" prop="applyTime" width="180" />
-      <el-table-column label="流程实例ID" align="center" prop="instanceId" width="100" />
-      <el-table-column label="备注" align="center" prop="remark" width="180" />
-      <el-table-column label="当前任务名称" align="center" prop="taskName" width="150" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <!--本案例提交申请前有做会签参与人选择的操作,因此不引入 ApplyBefore 子组件-->
-          <el-button
-            v-show="!scope.row.instanceId"
-            size="mini"
-            type="text"
-            icon="el-icon-check"
-            @click="handleApplyView(scope.row)"
-          >提交申请</el-button>
-          <el-button
-            v-show="!scope.row.instanceId"
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-          >修改</el-button>
-          <el-button
-            v-show="!scope.row.instanceId"
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-          >删除</el-button>
-          <apply-after
-            v-show="scope.row.instanceId"
-            :row="scope.row"
-            :taskId="scope.row.taskId"
-            :type="scope.row.type"
-            @getList="getList"
-          ></apply-after>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改示例Demo对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-form-item label="申请编号" prop="applyNum">
-          <el-input v-model="form.applyNum" placeholder="请输入申请编号" />
-        </el-form-item>
-        <el-form-item label="是否高压停电">
-          <el-radio-group v-model="form.highVoltage">
-            <el-radio label="0">否</el-radio>
-            <el-radio label="1">是</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-
-    <!--选择会签参与人对话框-->
-    <el-dialog title="选择调度会会签参与人" :visible.sync="showSelectUser" width="400px" append-to-body>
-      <el-form ref="selectUserForm" :rules="selectUserRules" label-width="80px">
-        <el-form-item label="参与人">
-          <el-select v-model="userNames" multiple placeholder="请选择">
-            <el-option
-              v-for="item in userOptions"
-              :key="item.userId"
-              :label="item.nickName"
-              :value="item.userName"
-              :disabled="item.status === 1"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handleApply">确 定</el-button>
-        <el-button @click="userNames=[];showSelectUser=false">取 消</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { listDemo, getDemo, delDemo, addDemo, updateDemo, exportDemo } from "@/api/example/demo";
-import ApplyBefore from "@/components/Activiti/ApplyBefore/index";
-import ApplyAfter from "@/components/Activiti/ApplyAfter/index";
-import { listUser } from "@/api/system/user";
-import request from '@/utils/request'
-
-export default {
-  name: "Demo",
-  components: {
-    ApplyBefore,
-    ApplyAfter,
-  },
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 示例Demo表格数据
-      demoList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        applyNum: null,
-        highVoltage: null,
-        attachment: null,
-        applyUserId: null,
-        applyUserName: null,
-        applyTime: null,
-        instanceId: null,
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        applyNum: [
-          { required: true, message: "申请编号不能为空", trigger: "blur" }
-        ],
-        highVoltage: [
-          { required: true, message: "是否高压停电不能为空", trigger: "blur" }
-        ],
-      },
-      requestMapping: '/example/demo',
-
-      selectedRow: {},
-      selectUserForm: {},
-      showSelectUser: false,
-      selectUserRules: {
-        userOptions: [
-          { required: true, message: '参与人不能为空', trigger: 'blur' },
-        ],
-      },
-      userOptions: [],
-      userNames: [],
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询示例Demo列表 */
-    getList() {
-      this.loading = true;
-      listDemo(this.queryParams).then(response => {
-        this.demoList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      }).then(() => {
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        applyNum: null,
-        highVoltage: "0",
-        attachment: null,
-        applyUserId: null,
-        applyUserName: null,
-        applyTime: null,
-        instanceId: null,
-        delFlag: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        remark: null
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加示例Demo";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getDemo(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改示例Demo";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateDemo(this.form).then(response => {
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addDemo(this.form).then(response => {
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除示例Demo编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delDemo(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有示例Demo数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportDemo(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
-    },
-    handleApply: function () {
-      if (this.userNames.length === 0) {
-        this.msgError('请先选择会签参与人');
-        return;
-      }
-      const selectedRow = this.selectedRow;
-      const requestMapping = this.requestMapping;
-      const userNames = this.userNames.toString();
-      this.$confirm('是否提交ID为"' + selectedRow.id + '"的申请单据?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(function() {
-        return request({
-          url: requestMapping + '/submitApply/' + selectedRow.id,
-          method: 'post',
-          params: { "variablesStr": { "gytd": selectedRow.highVoltage, "users": userNames } },
-        });
-      }).then(() => {
-        this.getList();
-        this.msgSuccess("申请成功");
-        this.userNames = [];
-        this.showSelectUser = false;
-      })
-    },
-
-    handleApplyView(row) {
-      this.selectedRow = row;
-      this.showSelectUser = true;
-      this.getUserList();
-    },
-
-    /** 查询用户列表 */
-    getUserList() {
-      listUser().then(response => {
-          this.userOptions = response.rows;
-        }
-      );
-    },
-
-  }
-};
-</script>

+ 0 - 4
willalp-ui/src/views/leave/leave/index.vue

@@ -156,14 +156,10 @@
 
 <script>
 import {listLeave, getLeave, delLeave, addLeave, updateLeave, exportLeave} from "@/api/leave/leave";
-import ApplyBefore from "@/components/Activiti/ApplyBefore/index";
-import ApplyAfter from "@/components/Activiti/ApplyAfter/index";
 
 export default {
   name: "Leave",
   components: {
-    ApplyBefore,
-    ApplyAfter,
   },
   dicts: ['app_vacate_type'],
   data() {

+ 0 - 4
willalp-ui/src/views/leave/leave/indexPre.vue

@@ -105,14 +105,10 @@
 
 <script>
 import {listLeave, getLeave, delLeave, addLeave, updateLeave, exportLeave} from "@/api/leave/leave";
-import ApplyBefore from "@/components/Activiti/ApplyBefore/index";
-import ApplyAfter from "@/components/Activiti/ApplyAfter/index";
 
 export default {
   name: "Leave",
   components: {
-    ApplyBefore,
-    ApplyAfter,
   },
   dicts: ['app_vacate_type'],
   data() {

+ 0 - 2
willalp-ui/src/views/leave/leave/leaveForm.vue

@@ -85,12 +85,10 @@
 </template>
 
 <script>
-  import ViewVerify from "@/components/Activiti/ViewVerify/index";
 
   export default {
     name: "LeaveForm",
     components: {
-      ViewVerify,
     },
     props: {
       row: {

+ 0 - 229
willalp-ui/src/views/todoItem/done/index.vue

@@ -1,229 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="任务ID" prop="taskId">
-        <el-input
-          v-model="queryParams.taskId"
-          placeholder="请输入任务ID"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="任务名称" prop="taskName">
-        <el-input
-          v-model="queryParams.taskName"
-          placeholder="任务名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="流程实例" prop="instanceId">
-        <el-input
-          v-model="queryParams.instanceId"
-          placeholder="请输入流程实例ID"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="taskList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="任务ID" align="center" prop="taskId" width="150" />
-      <el-table-column label="任务名称" align="center" prop="taskName" width="150" />
-      <el-table-column label="流程实例ID" align="center" prop="instanceId" width="150" />
-      <el-table-column label="办理人" align="center" prop="assigneeName" width="150" />
-      <el-table-column label="开始时间" align="center" prop="startTime" width="150" />
-      <el-table-column label="结束时间" align="center" prop="endTime" width="180" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <apply-after
-            v-if="scope.row.instanceId"
-            :row="scope.row.formData"
-            :taskId="scope.row.taskId"
-            :type="scope.row.type"
-            @getList="getList"
-          ></apply-after>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-  </div>
-</template>
-
-<script>
-  import request from '@/utils/request'
-  import ApplyAfter from "@/components/Activiti/ApplyAfter/index";
-
-  export default {
-    name: "Done",
-    components: {
-      ApplyAfter,
-    },
-    data() {
-      return {
-        // 遮罩层
-        loading: true,
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        // 已办表格数据
-        taskList: [],
-        // 弹出层标题
-        title: "",
-        // 是否显示弹出层
-        open: false,
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          taskId: null,
-          taskName: null,
-        },
-        // 表单参数
-        form: {},
-        // 表单校验
-        rules: {
-        },
-      };
-    },
-    created() {
-      this.getList();
-    },
-    methods: {
-      /** 查询已办列表 */
-      getList() {
-        this.loading = true;
-        return request({
-          url: '/activiti/process/taskDoneList',
-          method: 'get',
-          params: this.queryParams
-        }).then(response => {
-          this.taskList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }).then(() => {
-        });
-      },
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          id: null,
-          taskId: null,
-          taskName: null,
-        };
-        this.resetForm("form");
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.resetForm("queryForm");
-        this.handleQuery();
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length!==1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
-        this.open = true;
-        this.title = "添加已办";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        const id = row.id || this.ids
-        getDemo(id).then(response => {
-          this.form = response.data;
-          this.open = true;
-          this.title = "修改已办";
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            if (this.form.id != null) {
-              updateDemo(this.form).then(response => {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addDemo(this.form).then(response => {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
-          }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids;
-        this.$confirm('是否确认删除已办编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delDemo(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
-      },
-      /** 导出按钮操作 */
-      handleExport() {
-        const queryParams = this.queryParams;
-        this.$confirm('是否确认导出所有已办数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportDemo(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
-      },
-    }
-  };
-</script>

+ 0 - 230
willalp-ui/src/views/todoItem/todo/index.vue

@@ -1,230 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="任务ID" prop="taskId">
-        <el-input
-          v-model="queryParams.taskId"
-          placeholder="请输入任务ID"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="任务名称" prop="taskName">
-        <el-input
-          v-model="queryParams.taskName"
-          placeholder="任务名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="流程实例" prop="instanceId">
-        <el-input
-          v-model="queryParams.instanceId"
-          placeholder="请输入流程实例ID"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="taskList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="任务ID" align="center" prop="taskId" width="150" />
-      <el-table-column label="任务名称" align="center" prop="taskName" width="150" />
-      <el-table-column label="流程实例ID" align="center" prop="instanceId" width="150" />
-      <el-table-column label="待办人" align="center" prop="assigneeName" width="150" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="180" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <apply-after
-            v-if="scope.row.instanceId"
-            :row="scope.row.formData"
-            :taskId="scope.row.taskId"
-            :taskName="scope.row.taskName"
-            :type="scope.row.type"
-            @getList="getList"
-          ></apply-after>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-  </div>
-</template>
-
-<script>
-  import request from '@/utils/request'
-  import ApplyAfter from "@/components/Activiti/ApplyAfter/index";
-
-  export default {
-    name: "Todo",
-    components: {
-      ApplyAfter,
-    },
-    data() {
-      return {
-        // 遮罩层
-        loading: true,
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        // 待办表格数据
-        taskList: [],
-        // 弹出层标题
-        title: "",
-        // 是否显示弹出层
-        open: false,
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          taskId: null,
-          taskName: null,
-        },
-        // 表单参数
-        form: {},
-        // 表单校验
-        rules: {
-        },
-      };
-    },
-    created() {
-      this.getList();
-    },
-    methods: {
-      /** 查询待办列表 */
-      getList() {
-        console.log("getList-----");
-        this.loading = true;
-        return request({
-          url: '/activiti/process/taskList',
-          method: 'get',
-          params: this.queryParams
-        }).then(response => {
-          this.taskList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }).then(() => {
-        });
-      },
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          id: null,
-          taskId: null,
-          taskName: null,
-        };
-        this.resetForm("form");
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.resetForm("queryForm");
-        this.handleQuery();
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length!==1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
-        this.open = true;
-        this.title = "添加待办";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        const id = row.id || this.ids
-        getDemo(id).then(response => {
-          this.form = response.data;
-          this.open = true;
-          this.title = "修改待办";
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            if (this.form.id != null) {
-              updateDemo(this.form).then(response => {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addDemo(this.form).then(response => {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
-          }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids;
-        this.$confirm('是否确认删除待办编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delDemo(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
-      },
-      /** 导出按钮操作 */
-      handleExport() {
-        const queryParams = this.queryParams;
-        this.$confirm('是否确认导出所有待办数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportDemo(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
-      },
-    }
-  };
-</script>