Browse Source

first commit

baishaojie 1 year ago
parent
commit
1169f9636e
100 changed files with 561 additions and 0 deletions
  1. 8 0
      .idea/calf.iml
  2. 4 0
      .idea/encodings.xml
  3. 8 0
      .idea/modules.xml
  4. 6 0
      .idea/vcs.xml
  5. 38 0
      .idea/workspace.xml
  6. 15 0
      .vscode/launch.json
  7. 21 0
      LICENSE
  8. 7 0
      TeamViewer.ini
  9. 3 0
      arm.bat
  10. BIN
      calf
  11. 304 0
      comm/comm.go
  12. 99 0
      conf/app.ini
  13. 18 0
      conf/rbac_model.conf
  14. BIN
      dist.zip
  15. BIN
      dist/favicon.ico
  16. 0 0
      dist/index.html
  17. 0 0
      dist/static/css/app.954b587f.css
  18. 0 0
      dist/static/css/chunk-elementUI.f92cd1c5.css
  19. 0 0
      dist/static/css/chunk-libs.1664ae71.css
  20. BIN
      dist/static/fonts/element-icons.535877f5.woff
  21. BIN
      dist/static/fonts/element-icons.732389de.ttf
  22. BIN
      dist/static/img/404.a57b6f31.png
  23. BIN
      dist/static/img/404_cloud.0f4bc32b.png
  24. 28 0
      dist/static/img/iconfont.0ddaba12.svg
  25. BIN
      dist/static/img/login-bg.dfe7c90f.jpg
  26. BIN
      dist/static/img/logo.afed751a.png
  27. BIN
      dist/static/img/logo1.0121925c.png
  28. BIN
      dist/static/img/logo_u3.3c77f543.png
  29. BIN
      dist/static/img/nlogin-bg1.77301f56.jpg
  30. BIN
      dist/static/img/row-bg3.b3be7548.png
  31. BIN
      dist/static/img/topBg.69ecd1e1.png
  32. 0 0
      dist/static/js/app.782925a4.js
  33. 0 0
      dist/static/js/chunk-2d0cc0b6.cff3716e.js
  34. 0 0
      dist/static/js/chunk-34900b22.1d5a2cd1.js
  35. 0 0
      dist/static/js/chunk-elementUI.738326d9.js
  36. 0 0
      dist/static/js/chunk-libs.41f61acc.js
  37. 0 0
      dist0624/datas/myMap.json
  38. BIN
      dist0624/favicon.ico
  39. 0 0
      dist0624/index.html
  40. 0 0
      dist0624/static/css/app.1c97fb9d.css
  41. 0 0
      dist0624/static/css/chunk-elementUI.45ab9bc1.css
  42. 0 0
      dist0624/static/css/chunk-libs.2e418612.css
  43. BIN
      dist0624/static/fonts/element-icons.535877f5.woff
  44. BIN
      dist0624/static/fonts/element-icons.732389de.ttf
  45. BIN
      dist0624/static/img/1.1ddf085a.png
  46. BIN
      dist0624/static/img/404.a57b6f31.png
  47. BIN
      dist0624/static/img/404_cloud.0f4bc32b.png
  48. BIN
      dist0624/static/img/cow.3495de2a.jpg
  49. BIN
      dist0624/static/img/login-bg.dfe7c90f.jpg
  50. BIN
      dist0624/static/img/login-bg1.1f1602f0.jpg
  51. BIN
      dist0624/static/img/login-bujian.8695940d.png
  52. BIN
      dist0624/static/img/logo.4a74cb8a.png
  53. BIN
      dist0624/static/img/logo1.d2343c0f.png
  54. BIN
      dist0624/static/img/logo_u3.34a9ffae.png
  55. 0 0
      dist0624/static/js/app.1f5f7ce2.js
  56. 0 0
      dist0624/static/js/chunk-581b2547.35f5db31.js
  57. 0 0
      dist0624/static/js/chunk-d17f893e.ab3f161f.js
  58. 0 0
      dist0624/static/js/chunk-elementUI.e7d11236.js
  59. 0 0
      dist0624/static/js/chunk-fb16bab8.723f5a84.js
  60. 0 0
      dist0624/static/js/chunk-libs.c3a708df.js
  61. 0 0
      dist_web/datas/myMap.json
  62. BIN
      dist_web/favicon.ico
  63. 0 0
      dist_web/index.html
  64. 0 0
      dist_web/static/css/app.4a7b580a.css
  65. 0 0
      dist_web/static/css/chunk-elementUI.45ab9bc1.css
  66. 0 0
      dist_web/static/css/chunk-libs.2e418612.css
  67. BIN
      dist_web/static/fonts/element-icons.535877f5.woff
  68. BIN
      dist_web/static/fonts/element-icons.732389de.ttf
  69. BIN
      dist_web/static/img/1.1ddf085a.png
  70. BIN
      dist_web/static/img/404.a57b6f31.png
  71. BIN
      dist_web/static/img/404_cloud.0f4bc32b.png
  72. BIN
      dist_web/static/img/cow.3495de2a.jpg
  73. BIN
      dist_web/static/img/login-bg.dfe7c90f.jpg
  74. BIN
      dist_web/static/img/login-bg1.1f1602f0.jpg
  75. BIN
      dist_web/static/img/login-bujian.8695940d.png
  76. BIN
      dist_web/static/img/logo.4a74cb8a.png
  77. BIN
      dist_web/static/img/logo1.d2343c0f.png
  78. BIN
      dist_web/static/img/logo_u3.34a9ffae.png
  79. 0 0
      dist_web/static/js/app.71e5607f.js
  80. 0 0
      dist_web/static/js/chunk-581b2547.35f5db31.js
  81. 0 0
      dist_web/static/js/chunk-d159a5f0.96c2e24d.js
  82. 0 0
      dist_web/static/js/chunk-d17f893e.ab3f161f.js
  83. 0 0
      dist_web/static/js/chunk-elementUI.e7d11236.js
  84. 0 0
      dist_web/static/js/chunk-libs.c3a708df.js
  85. 0 0
      distapp/datas/myMap.json
  86. BIN
      distapp/favicon.ico
  87. 2 0
      distapp/index.html
  88. BIN
      distapp/static/144logo.png
  89. BIN
      distapp/static/192logo.png
  90. BIN
      distapp/static/72logo.png
  91. BIN
      distapp/static/96logo.png
  92. 0 0
      distapp/static/css/app.1c97fb9d.css
  93. 0 0
      distapp/static/css/chunk-elementUI.45ab9bc1.css
  94. 0 0
      distapp/static/css/chunk-libs.2e418612.css
  95. BIN
      distapp/static/fonts/element-icons.535877f5.woff
  96. BIN
      distapp/static/fonts/element-icons.732389de.ttf
  97. BIN
      distapp/static/img/1.1ddf085a.png
  98. BIN
      distapp/static/img/404.a57b6f31.png
  99. BIN
      distapp/static/img/404_cloud.0f4bc32b.png
  100. BIN
      distapp/static/img/72logo.0137a448.png

+ 8 - 0
.idea/calf.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 4 - 0
.idea/encodings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" addBOMForNewFiles="with NO BOM" />
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/calf.iml" filepath="$PROJECT_DIR$/.idea/calf.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 38 - 0
.idea/workspace.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="98a99b46-1590-4c48-a9e0-08ac414c96d5" name="变更" comment="" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="MarkdownSettingsMigration">
+    <option name="stateVersion" value="1" />
+  </component>
+  <component name="ProjectId" id="2G1R6G7R3fQpBeGTaY068JNU8hl" />
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectViewState">
+    <option name="autoscrollFromSource" value="true" />
+    <option name="autoscrollToSource" value="true" />
+    <option name="hideEmptyMiddlePackages" value="true" />
+    <option name="showLibraryContents" value="true" />
+  </component>
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "RunOnceActivity.OpenProjectViewOnStart": "true",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "RunOnceActivity.go.migrated.go.modules.settings": "true",
+    "WebServerToolWindowFactoryState": "false",
+    "last_opened_file_path": "C:/Users/zsyy",
+    "nodejs_package_manager_path": "npm"
+  }
+}]]></component>
+  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
+  <component name="VgoProject">
+    <settings-migrated>true</settings-migrated>
+  </component>
+</project>

+ 15 - 0
.vscode/launch.json

@@ -0,0 +1,15 @@
+{
+    // 使用 IntelliSense 了解相关属性。 
+    // 悬停以查看现有属性的描述。
+    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Launch Package",
+            "type": "go",
+            "request": "launch",
+            "mode": "auto",
+            "program": "${fileDirname}"
+        }
+    ]
+}

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) The go-admin Authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 7 - 0
TeamViewer.ini

@@ -0,0 +1,7 @@
+[Settings]
+nosave=1
+importsettings=1
+LogIncomingConnections=0
+LogOutgoingConnections=0
+[License]
+code=00-00000-000000-000000

+ 3 - 0
arm.bat

@@ -0,0 +1,3 @@
+set GOARCH=arm
+set GOOS=linux
+go build -o KPTAdminARM

BIN
calf


+ 304 - 0
comm/comm.go

@@ -0,0 +1,304 @@
+package comm
+
+import (
+	"encoding/hex"
+	"fmt"
+	"github.com/gin-gonic/gin"
+	"github.com/jacobsa/go-serial/serial"
+	"../pkg/app"
+	"../pkg/e"
+	"../pkg/setting"
+	"../routers/restful"
+	"log"
+	"net/http"
+	"time"
+	"unsafe"
+)
+
+//一个已经被关闭的channel不会阻塞,已经被关闭的channel会实时返回
+//goroutine退出,关闭done来进行广播
+var done = make(chan struct{})
+var Id = make(chan int)
+var timeout = make(chan int)
+var ReturnString = make(chan string)
+//判断done是否关闭,即是否执行goroutine退出
+func cancelled() bool {
+	select {
+	case <-done:
+		return true
+	default:
+		return false
+	}
+}
+
+func Int2Byte(data int)(ret []byte){
+	var len uintptr = unsafe.Sizeof(data)
+	ret = make([]byte, len)
+	var tmp int = 0xff
+	var index uint = 0
+	for index=0; index<uint(len); index++{
+		ret[index] = byte((tmp<<(index*8) & data)>>(index*8))
+	}
+	return ret
+}
+
+func OpenComm() {
+	var sum byte
+	var recLength,dataLength, state int
+    comtimeout := 0
+	buf := make([]byte, 32)
+	recbuf := make([]byte, 1)
+	//s_params := make([]interface{}, 1)
+	openSerial:
+	f, err := serial.Open(*setting.CommSetting)
+
+	if err != nil {
+		fmt.Println("Error opening serial port: ", err)
+		time.Sleep(1 * time.Second)
+		goto openSerial
+	}else {
+		log.Printf("[info] Serial %s is Started", setting.CommSetting.PortName)
+		if comtimeout==0 {
+			defer f.Close()
+		}
+		for {
+			sum = (0x55 + 0xAA + 0x06 + 0x01 + 0x03 + 0x01) & 0xFF
+            v := 0
+			if comtimeout==0 {
+				v, _ = <- Id
+			}
+
+			comtimeout = 0
+			cowidByte := Int2Byte(v)[:3]
+			sum = (sum + cowidByte[0] + cowidByte[1] + cowidByte[2]) & 0xFF
+			cowidByte = append(cowidByte, sum)
+			requestCowid := "55AA06010301" + hex.EncodeToString(cowidByte)
+
+			txData_, err := hex.DecodeString(requestCowid)
+			recLength = 0
+			state = 0
+			_, err = f.Write(txData_)
+
+			fmt.Println(hex.EncodeToString(txData_))
+			if err != nil {
+				fmt.Println("Error writing to serial port: ", err)
+				time.Sleep(1 * time.Second)
+				comtimeout = 1
+				goto openSerial
+			}
+			loop:
+				for {
+					select {
+					case <-timeout:
+						break loop
+					default:
+						n, err := f.Read(buf)
+						if err != nil {
+							//if err != io.EOF {
+								fmt.Println("Error reading from serial port: ", err)
+								time.Sleep(1 * time.Second)
+								comtimeout = 1
+								goto openSerial
+							//}
+							//break loop
+						} else if n > 0 {
+							buf = buf[:n]
+							for _, value := range buf {
+								switch state {
+								case 0: //头判断
+									if value == 0x55 {
+										state = 1
+										recLength = 1
+										recbuf = recbuf[:0]
+										recbuf = append(recbuf, (byte)(value&0xFF))
+									}
+								case 1: //头判断中
+									if value == 0xAA {
+										state = 2
+										recLength = 2
+										recbuf = append(recbuf, (byte)(value&0xFF))
+									} else {
+										state = 0
+										recLength = 0
+									}
+								case 2: //接收数据长度
+									state = 3
+									recLength = 3
+									dataLength = (int)(value + 4)
+									recbuf = append(recbuf, (byte)(value&0xFF))
+								case 3: //接收数据中
+									recbuf = append(recbuf, (byte)(value&0xFF))
+									recLength++
+									if recLength == dataLength {
+                                       fmt.Println(hex.EncodeToString(recbuf))
+										ReturnString <- hex.EncodeToString(recbuf)
+										state = 0
+										recLength = 0
+										break loop
+									}
+								}
+							}
+						} else {
+							time.Sleep(10 * time.Millisecond)
+						}
+					}
+				}
+			}
+	}
+}
+
+func saveData(ReceStr string,x int,y int) (string, error){
+	s_params := make([]interface{}, 0)
+	//bytelist, err := hex.DecodeString(ReturnS)
+	s_params = append(s_params, 1)
+	s_params = append(s_params, x)
+	s_params = append(s_params, y)
+	s_params = append(s_params, 1)
+	_, err := restful.ExecQuery("INSERT INTO `cps_m` (`barid`, `x`, `y`) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE barid = ?", s_params)
+	if err != nil {
+		return "", err
+	} else {
+		bytelist, err := hex.DecodeString(ReceStr)
+		rodecount := (int)((bytelist[2]-5)>>1)
+		s_params = s_params[1:3]
+		if rodecount>0{
+			for i := 0; i < rodecount; i++{
+				beaconname := (int)(bytelist[8+2*i])
+				rssi := (int)(bytelist[9+2*i])
+				s_params = s_params[:2]
+				s_params = append(s_params, beaconname)
+				s_params = append(s_params, rssi)
+				s_params = append(s_params, rssi)
+				_, err = restful.ExecQuery("INSERT INTO `cps_d`(`pid`,`beaconid`,`rssi`) "+
+					"SELECT (SELECT `id` FROM `cps_m` WHERE `x`=? AND `y`=?),?,?  ON DUPLICATE KEY UPDATE rssi = ?", s_params)
+
+				if err != nil {
+					return "", err
+				}
+			}
+			if err == nil{
+				return "成功保存", nil
+			}
+		}else {
+			return "没有收到数据", nil
+		}
+	}
+	return "没有收到数据", nil
+}
+
+func savePointData(ReceStr string,limit int) (interface{}, error){
+	s_params := make([]interface{}, 1)
+	//bytelist, err := hex.DecodeString(ReturnS)
+	bytelist, err := hex.DecodeString(ReceStr)
+	rodecount := (int)((bytelist[2]-5)>>1)
+	low := (int)(bytelist[5])
+	mid := (int)(bytelist[6])
+	mid = mid<<8
+	high := (int)(bytelist[7])
+	high = high<<16
+	tagid := (int)(low|mid|high)
+	s_params[0] = tagid
+	if rodecount>0{
+		for i := 0; i < rodecount; i++{
+			beaconname := (int)(bytelist[8+2*i])
+			rssi := (int)(bytelist[9+2*i])
+			s_params = s_params[:1]
+			s_params = append(s_params, beaconname)
+			s_params = append(s_params, rssi)
+			s_params = append(s_params, rssi)
+			_, err = restful.ExecQuery(" INSERT INTO `cps_point`(`tagid`,`beaconid`,`rssi`) "+
+				                              " Values( ?, ?, ?)  ON DUPLICATE KEY UPDATE rssi = ?", s_params)
+			if err != nil {
+				return "", err
+			}
+		}
+		if err == nil{
+			s_params = s_params[:2]
+			s_params[0] = tagid
+			s_params[1] = limit
+			resultdata, err := restful.QueryByMap(" SELECT AVG(X) X,AVG(Y) Y FROM  ( "+
+			"SELECT `cps_m`.x,`cps_m`.y, SUM(ABS(`cps_d`.`rssi`-`cps_point`.`rssi`)) absrssi "+
+			"FROM `cps_d` JOIN `cps_point` ON `cps_d`.`beaconid`=`cps_point`.`beaconid` "+
+			"JOIN `cps_m` ON `cps_m`.`id`=`cps_d`.`pid` WHERE  `cps_point`.`tagid`= ? "+
+			"GROUP BY `cps_m`.x,`cps_m`.y "+
+			"ORDER BY SUM(ABS(`cps_d`.`rssi`-`cps_point`.`rssi`)) "+
+			"LIMIT ?) AS d "		, 0,0,s_params)
+			if err != nil {
+				return "", err
+			} else {
+				return resultdata, nil
+			}
+		}
+	}else {
+		return "没有收到数据", nil
+	}
+	return "没有收到数据", nil
+}
+
+
+func ProcessHttp(c *gin.Context) {
+	var (
+		appG = app.Gin{C: c}
+	)
+
+	id := 0//com.StrTo(c.Param("id")).MustInt()
+	x := 0//com.StrTo(c.Param("x")).MustInt()
+	y := 0//com.StrTo(c.Param("y")).MustInt()
+	Id <- id
+	select {
+	case ReturnS := <- ReturnString: //拿到锁
+		if x>=0 && y>=0{
+			returnData, err := saveData(ReturnS,x,y)
+			if err  != nil{
+				appG.Response(http.StatusOK, e.ERROR, err.Error())
+			}else {
+				appG.Response(http.StatusOK, e.SUCCESS, returnData)
+			}
+		}else {
+			returnData, err := savePointData(ReturnS,1)
+			if err  != nil{
+				appG.Response(http.StatusOK, e.ERROR, err.Error())
+			}else {
+				appG.Response(http.StatusOK, e.SUCCESS, returnData)
+			}
+		}
+	case <-time.After(10 * time.Second): //超时5s
+		timeout <- 1
+		appG.Response(http.StatusOK, e.ERROR, "超时")
+	}
+}
+
+func ProcessHttpCPS(c *gin.Context) {
+	var (
+		appG = app.Gin{C: c}
+	)
+
+	id := 0//com.StrTo(c.Param("id")).MustInt()
+	limit := 0//com.StrTo(c.Param("limit")).MustInt()
+	Id <- id
+	select {
+	case ReturnS := <- ReturnString: //拿到锁
+		{
+
+			returnData, err := savePointData(ReturnS, limit)
+			if err  != nil{
+				appG.Response(http.StatusOK, e.ERROR, err.Error())
+			}else {
+				appG.Response(http.StatusOK, e.SUCCESS, returnData)
+			}
+		}
+	case <-time.After(10 * time.Second): //超时5s
+		timeout <- 1
+		appG.Response(http.StatusOK, e.ERROR, "超时")
+	}
+}
+
+
+
+// 用于判断每年月份的天数
+func MonthDay(date string)(month string ,sumday string){
+	//date :=
+	return month,sumday
+}
+
+

+ 99 - 0
conf/app.ini

@@ -0,0 +1,99 @@
+[app]
+PageSize = 10
+JwtSecret = 111111
+
+FileSavePath=uploads/files/
+FileMaxSize = 104857600
+FileAllowType = .jpg, .jpeg, .png, .ico, .svg, .bmp, .gif, .doc, .docx, .ppt, .pptx, .xls, .xlsx, .pdf, .mp3, .txt
+ImageSavePath=uploads/image/
+ExportSavePath=uploads/exportfiles/
+ImageMaxSize = 10
+ThumbnailSavePath=uploads/thumbnail/
+ThumbnailMaxWidth=800
+ThumbnailMaxHeight=800
+
+LogSavePath = logs/
+LogSaveName = log
+LogFileExt = log
+TimeFormat = 20060102-150405
+
+[server]
+#debug or release
+#RunMode = debug
+RunMode = release
+HttpPort = 8086
+ReadTimeout = 60
+WriteTimeout = 60
+NoAuth = 1
+; Mdns_servicename = kptadmin
+; Mdns_serviceport = 53552
+# 0 http 1 https 2 http & https 不填 http
+Https = 0
+HttpsPort = 443
+CrtPath = conf/ssl.crt
+KeyPath = conf/ssl.key
+MailStart = 0  
+CronFormula = 0 10 * * *
+WXworkStart = 0
+#WXworkAgentid = 1000022
+WXworkAgentid = 1000005   #测试线
+#WXworkSecret  = RV9z-XTVrVj-BsSQ_6F6nhsX3YpeBE0oH2vzZZPG2qg  # 正式环境
+WXworkSecret  = o0IOfLkXidUjc5X2aHgByNemFaG69gQz-FgHaBxztXE  #测试线
+#WXworkCorpid  = wx93ee6ef7d7810920   #正式线
+WXworkCorpid  = ww70edaf8db8d78cfc   #测试线
+
+
+
+
+# 服务
+ServerName = eq
+DisplayName = eq
+Description = eq
+
+# eas 信息
+
+EasName = 田欣宇
+#EasPassword = xdmy@1234
+EasPassword = xdmy@1234
+EasUrl = http://60.174.151.11:6888
+#EasUrl = 192.168.61.26
+
+
+[database]
+Type = mysql
+User = root
+#Password = root
+#Host = 127.0.0.1:3326
+#Host = 210.16.186.252:3326
+#Password = root
+#Host = 192.168.1.50:3326
+
+#####本地
+#Password = root
+#Password = keep
+#Host = 192.168.1.93:3326
+#Host = 127.0.0.1:3306
+#Host = 210.16.186.252
+#Name = equipment
+Password = kepaiteng!QAZ
+Host = 222.73.129.15:31306
+Name = calf
+#Name = crm
+#Name = eq0422
+#Name = eq
+#Name = test
+TablePrefix =
+
+ShowXormlog = false
+ShowGetSqllog = false
+CacheApiSql = false
+[comm]
+PortName =
+BaudRate = 9600
+DataBits = 8
+StopBits = 1
+ParityMode = 0    #PARITY_NONE  0	PARITY_ODD  1	PARITY_EVEN  2
+InterCharacterTimeout = 100
+MinimumReadSize = 0
+
+

+ 18 - 0
conf/rbac_model.conf

@@ -0,0 +1,18 @@
+[request_definition]
+r = sub, obj, act
+
+[policy_definition]
+p = sub, obj, act
+
+[role_definition]
+g = _, _
+
+[policy_effect]
+e = some(where (p.eft == allow))
+
+[matchers]
+m = g(r.sub, p.sub) == true \
+    && keyMatch2(r.obj, p.obj) == true \
+    && regexMatch(r.act, p.act) == true \
+    || r.sub == "admin" \
+    || keyMatch2(r.obj, "/auth") == true \

BIN
dist.zip


BIN
dist/favicon.ico


File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.954b587f.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-elementUI.f92cd1c5.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-libs.1664ae71.css


BIN
dist/static/fonts/element-icons.535877f5.woff


BIN
dist/static/fonts/element-icons.732389de.ttf


BIN
dist/static/img/404.a57b6f31.png


BIN
dist/static/img/404_cloud.0f4bc32b.png


File diff suppressed because it is too large
+ 28 - 0
dist/static/img/iconfont.0ddaba12.svg


BIN
dist/static/img/login-bg.dfe7c90f.jpg


BIN
dist/static/img/logo.afed751a.png


BIN
dist/static/img/logo1.0121925c.png


BIN
dist/static/img/logo_u3.3c77f543.png


BIN
dist/static/img/nlogin-bg1.77301f56.jpg


BIN
dist/static/img/row-bg3.b3be7548.png


BIN
dist/static/img/topBg.69ecd1e1.png


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.782925a4.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-2d0cc0b6.cff3716e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-34900b22.1d5a2cd1.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-elementUI.738326d9.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-libs.41f61acc.js


File diff suppressed because it is too large
+ 0 - 0
dist0624/datas/myMap.json


BIN
dist0624/favicon.ico


File diff suppressed because it is too large
+ 0 - 0
dist0624/index.html


File diff suppressed because it is too large
+ 0 - 0
dist0624/static/css/app.1c97fb9d.css


File diff suppressed because it is too large
+ 0 - 0
dist0624/static/css/chunk-elementUI.45ab9bc1.css


File diff suppressed because it is too large
+ 0 - 0
dist0624/static/css/chunk-libs.2e418612.css


BIN
dist0624/static/fonts/element-icons.535877f5.woff


BIN
dist0624/static/fonts/element-icons.732389de.ttf


BIN
dist0624/static/img/1.1ddf085a.png


BIN
dist0624/static/img/404.a57b6f31.png


BIN
dist0624/static/img/404_cloud.0f4bc32b.png


BIN
dist0624/static/img/cow.3495de2a.jpg


BIN
dist0624/static/img/login-bg.dfe7c90f.jpg


BIN
dist0624/static/img/login-bg1.1f1602f0.jpg


BIN
dist0624/static/img/login-bujian.8695940d.png


BIN
dist0624/static/img/logo.4a74cb8a.png


BIN
dist0624/static/img/logo1.d2343c0f.png


BIN
dist0624/static/img/logo_u3.34a9ffae.png


File diff suppressed because it is too large
+ 0 - 0
dist0624/static/js/app.1f5f7ce2.js


File diff suppressed because it is too large
+ 0 - 0
dist0624/static/js/chunk-581b2547.35f5db31.js


File diff suppressed because it is too large
+ 0 - 0
dist0624/static/js/chunk-d17f893e.ab3f161f.js


File diff suppressed because it is too large
+ 0 - 0
dist0624/static/js/chunk-elementUI.e7d11236.js


File diff suppressed because it is too large
+ 0 - 0
dist0624/static/js/chunk-fb16bab8.723f5a84.js


File diff suppressed because it is too large
+ 0 - 0
dist0624/static/js/chunk-libs.c3a708df.js


File diff suppressed because it is too large
+ 0 - 0
dist_web/datas/myMap.json


BIN
dist_web/favicon.ico


File diff suppressed because it is too large
+ 0 - 0
dist_web/index.html


File diff suppressed because it is too large
+ 0 - 0
dist_web/static/css/app.4a7b580a.css


File diff suppressed because it is too large
+ 0 - 0
dist_web/static/css/chunk-elementUI.45ab9bc1.css


File diff suppressed because it is too large
+ 0 - 0
dist_web/static/css/chunk-libs.2e418612.css


BIN
dist_web/static/fonts/element-icons.535877f5.woff


BIN
dist_web/static/fonts/element-icons.732389de.ttf


BIN
dist_web/static/img/1.1ddf085a.png


BIN
dist_web/static/img/404.a57b6f31.png


BIN
dist_web/static/img/404_cloud.0f4bc32b.png


BIN
dist_web/static/img/cow.3495de2a.jpg


BIN
dist_web/static/img/login-bg.dfe7c90f.jpg


BIN
dist_web/static/img/login-bg1.1f1602f0.jpg


BIN
dist_web/static/img/login-bujian.8695940d.png


BIN
dist_web/static/img/logo.4a74cb8a.png


BIN
dist_web/static/img/logo1.d2343c0f.png


BIN
dist_web/static/img/logo_u3.34a9ffae.png


File diff suppressed because it is too large
+ 0 - 0
dist_web/static/js/app.71e5607f.js


File diff suppressed because it is too large
+ 0 - 0
dist_web/static/js/chunk-581b2547.35f5db31.js


File diff suppressed because it is too large
+ 0 - 0
dist_web/static/js/chunk-d159a5f0.96c2e24d.js


File diff suppressed because it is too large
+ 0 - 0
dist_web/static/js/chunk-d17f893e.ab3f161f.js


File diff suppressed because it is too large
+ 0 - 0
dist_web/static/js/chunk-elementUI.e7d11236.js


File diff suppressed because it is too large
+ 0 - 0
dist_web/static/js/chunk-libs.c3a708df.js


File diff suppressed because it is too large
+ 0 - 0
distapp/datas/myMap.json


BIN
distapp/favicon.ico


+ 2 - 0
distapp/index.html

@@ -0,0 +1,2 @@
+<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>ModernDairyAPP</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.58d5e7ce.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.1dd7dcd3.js></script><script src=/static/js/index.e3dd6a04.js></script></body></html>

BIN
distapp/static/144logo.png


BIN
distapp/static/192logo.png


BIN
distapp/static/72logo.png


BIN
distapp/static/96logo.png


File diff suppressed because it is too large
+ 0 - 0
distapp/static/css/app.1c97fb9d.css


File diff suppressed because it is too large
+ 0 - 0
distapp/static/css/chunk-elementUI.45ab9bc1.css


File diff suppressed because it is too large
+ 0 - 0
distapp/static/css/chunk-libs.2e418612.css


BIN
distapp/static/fonts/element-icons.535877f5.woff


BIN
distapp/static/fonts/element-icons.732389de.ttf


BIN
distapp/static/img/1.1ddf085a.png


BIN
distapp/static/img/404.a57b6f31.png


BIN
distapp/static/img/404_cloud.0f4bc32b.png


BIN
distapp/static/img/72logo.0137a448.png


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