|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 494 KiB After Width: | Height: | Size: 494 KiB |
|
After Width: | Height: | Size: 5.5 MiB |
@ -0,0 +1,3 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@ -0,0 +1,31 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="E302" />
|
||||
<option value="E261" />
|
||||
<option value="E262" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="N803" />
|
||||
<option value="N813" />
|
||||
<option value="N802" />
|
||||
<option value="N806" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyStubPackagesAdvertiser" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredPackages">
|
||||
<list>
|
||||
<option value="PyQt5-stubs==5.15.6.0" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/HTML.iml" filepath="$PROJECT_DIR$/.idea/HTML.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,39 @@
|
||||
module GO
|
||||
|
||||
go 1.21.3
|
||||
|
||||
require gorm.io/gorm v1.25.5
|
||||
|
||||
require (
|
||||
github.com/bytedance/sonic v1.10.2 // indirect
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
||||
github.com/chenzhuoyu/iasm v0.9.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
||||
github.com/gin-contrib/cors v1.4.0 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/gin-gonic/gin v1.9.1 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.15.5 // indirect
|
||||
github.com/go-sql-driver/mysql v1.7.1 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // indirect
|
||||
github.com/jinzhu/gorm v1.9.16 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
||||
github.com/leodido/go-urn v1.2.4 // indirect
|
||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.11 // indirect
|
||||
golang.org/x/arch v0.5.0 // indirect
|
||||
golang.org/x/crypto v0.14.0 // indirect
|
||||
golang.org/x/net v0.17.0 // indirect
|
||||
golang.org/x/sys v0.13.0 // indirect
|
||||
golang.org/x/text v0.13.0 // indirect
|
||||
google.golang.org/protobuf v1.31.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
@ -0,0 +1,154 @@
|
||||
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
|
||||
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
|
||||
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
||||
github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM=
|
||||
github.com/bytedance/sonic v1.10.2 h1:GQebETVBxYB7JGWJtLBi07OVzWwt+8dWA00gEVW2ZFE=
|
||||
github.com/bytedance/sonic v1.10.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA=
|
||||
github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo=
|
||||
github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
||||
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
|
||||
github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g=
|
||||
github.com/gin-contrib/cors v1.4.0/go.mod h1:bs9pNM0x/UsmHPBWT2xZz9ROh8xYjYkiURUfmBoMlcs=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
|
||||
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
|
||||
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
|
||||
github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24=
|
||||
github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
|
||||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
|
||||
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
|
||||
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o=
|
||||
github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
|
||||
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
|
||||
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
|
||||
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
|
||||
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
|
||||
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
||||
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/arch v0.5.0 h1:jpGode6huXQxcskEIpOCvrU+tzo81b6+oFLUYXWtH/Y=
|
||||
golang.org/x/arch v0.5.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
|
||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls=
|
||||
gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
@ -0,0 +1,66 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
admin "GO/pkg/AdminPackage" // 导入 admin 包
|
||||
merchant "GO/pkg/MerchantPackage" // 导入 merchant 包
|
||||
order "GO/pkg/OrderPackage" // 导入 user 包
|
||||
rider "GO/pkg/RiderPackage" // 导入 rider 包
|
||||
user "GO/pkg/UserPackage" // 导入 user 包
|
||||
"fmt"
|
||||
|
||||
"github.com/gin-contrib/cors"
|
||||
"github.com/gin-gonic/gin"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
func main() {
|
||||
db := InitDB()
|
||||
defer db.Close()
|
||||
|
||||
r := gin.Default()
|
||||
|
||||
// 使用CORS中间件
|
||||
config := cors.DefaultConfig()
|
||||
config.AllowOrigins = []string{"*"}
|
||||
r.Use(cors.New(config))
|
||||
|
||||
// 初始化 Rider 路由
|
||||
rider.InitializeRouter(r, db)
|
||||
|
||||
// 初始化 admin 路由
|
||||
admin.InitializeRouter(r, db)
|
||||
|
||||
// 初始化 merchant 路由
|
||||
merchant.InitializeRouter(r, db)
|
||||
|
||||
// 初始化 user 路由
|
||||
user.InitializeRouter(r, db)
|
||||
|
||||
// 初始化 order 路由
|
||||
order.InitializeRouter(r, db)
|
||||
|
||||
panic(r.Run(":8080"))
|
||||
}
|
||||
|
||||
func InitDB() *gorm.DB {
|
||||
driverName := "mysql"
|
||||
host := "localhost"
|
||||
port := "3306"
|
||||
database := "elm"
|
||||
username := "root"
|
||||
password := "12345"
|
||||
args := fmt.Sprintf("%s:%s@(%s:%s)/%s?charset=utf8mb4&parseTime=true",
|
||||
username,
|
||||
password,
|
||||
host,
|
||||
port,
|
||||
database)
|
||||
|
||||
db, err := gorm.Open(driverName, args)
|
||||
if err != nil {
|
||||
panic("failed to connect database, err:" + err.Error())
|
||||
}
|
||||
|
||||
return db
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
// Rider 结构体定义
|
||||
type Admin struct {
|
||||
gorm.Model
|
||||
Account string `gorm:"varchar(6)"`
|
||||
Password string `gorm:"varchar(6)"`
|
||||
}
|
||||
|
||||
// InitializeRouter 初始化 admin 相关的路由
|
||||
func InitializeRouter(r *gin.Engine, db *gorm.DB) {
|
||||
r.POST("/admin/login", adminLogin(db))
|
||||
}
|
||||
|
||||
// adminLogin 处理管理员登录请求
|
||||
func adminLogin(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
var admin Admin
|
||||
if err := c.ShouldBindJSON(&admin); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{
|
||||
"error": "无效的请求数据",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
var storedAdmin Admin
|
||||
if err := db.Where("account = ?", admin.Account).First(&storedAdmin).Error; err != nil {
|
||||
c.JSON(http.StatusUnauthorized, gin.H{
|
||||
"error": "用户不存在",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if admin.Password != storedAdmin.Password {
|
||||
c.JSON(http.StatusUnauthorized, gin.H{
|
||||
"error": "密码不正确",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "登录成功",
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
package merchant
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
// Rider 结构体定义
|
||||
type merchants struct {
|
||||
gorm.Model
|
||||
Name string `gorm:"varchar(100)"`
|
||||
Owner string `gorm:"varchar(3)"`
|
||||
Phone string `gorm:"varchar(20)"`
|
||||
Account string `gorm:"varchar(6)"`
|
||||
Password string `gorm:"varchar(6)"`
|
||||
Address string `gorm:"varchar(100)"`
|
||||
AddressLon string `gorm:"varchar(20)"`
|
||||
AddressLat string `gorm:"varchar(20)"`
|
||||
}
|
||||
|
||||
// InitializeRouter 初始化 merchant 相关的路由
|
||||
func InitializeRouter(r *gin.Engine, db *gorm.DB) {
|
||||
r.GET("/merchant/get", GetMerchant(db)) // 获取骑手信息
|
||||
r.POST("/merchant/create", CreateMerchant(db)) // 新增骑手信息
|
||||
r.PUT("/merchant/update/:id", UpdateMerchant(db)) // 修改骑手信息
|
||||
r.DELETE("/merchant/delete/:id", DeleteMerchant(db)) // 删除骑手信息
|
||||
}
|
||||
|
||||
// 获取信息
|
||||
func GetMerchant(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
var GetMerchant []merchants
|
||||
if err := db.Find(&GetMerchant).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法获取",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": 200,
|
||||
"message": "获取成功",
|
||||
"info": GetMerchant,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 更新信息
|
||||
func UpdateMerchant(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
merchantID := ctx.Param("id")
|
||||
var UpdataMerchant merchants
|
||||
|
||||
if err := db.First(&UpdataMerchant, merchantID).Error; err != nil {
|
||||
ctx.JSON(http.StatusNotFound, gin.H{
|
||||
"code": http.StatusNotFound,
|
||||
"message": "商家信息不存在",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if err := ctx.ShouldBindJSON(&UpdataMerchant); err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "无效的请求数据",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if err := db.Model(&UpdataMerchant).Updates(UpdataMerchant).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法更新商家信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "商家信息已更新",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 新增信息
|
||||
func CreateMerchant(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
var CreateMerchant merchants
|
||||
if err := ctx.ShouldBindJSON(&CreateMerchant); err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "无效的请求数据",
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := db.Create(&CreateMerchant).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法创建商家信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "商家信息已创建",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 删除信息
|
||||
func DeleteMerchant(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
merchantID := ctx.Param("id")
|
||||
var DeleteMerchant merchants
|
||||
if err := db.First(&DeleteMerchant, merchantID).Error; err != nil {
|
||||
ctx.JSON(http.StatusNotFound, gin.H{
|
||||
"code": http.StatusNotFound,
|
||||
"message": "商家信息不存在",
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := db.Delete(&DeleteMerchant).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法删除商家信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "商家信息已删除",
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,157 @@
|
||||
package order
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
// order 结构体定义
|
||||
type orders struct {
|
||||
gorm.Model
|
||||
Name string `gorm:"varchar(10)"`
|
||||
Rider string `gorm:"varchar(3)"`
|
||||
Merchant string `gorm:"varchar(3)"`
|
||||
OrderStatus string `gorm:"varchar(10)"`
|
||||
MerchantStatus string `gorm:"varchar(10)"`
|
||||
RiderStatus string `gorm:"varchar(10)"`
|
||||
PickupLoc string `gorm:"varchar(20)"`
|
||||
DeliveryLoc string `gorm:"varchar(20)"`
|
||||
}
|
||||
|
||||
// InitializeRouter 初始化 order 相关的路由
|
||||
func InitializeRouter(r *gin.Engine, db *gorm.DB) {
|
||||
r.GET("/order/get", GetOrder(db)) // 获取信息
|
||||
r.GET("/order/getdel", GetDeletedOrder(db)) // 获取信息
|
||||
r.POST("/order/create", CreateOrder(db)) // 新增信息
|
||||
r.PUT("/order/update/:id", UpdateOrder(db)) // 修改信息
|
||||
r.DELETE("/order/delete/:id", DeleteOrder(db)) // 删除信息
|
||||
}
|
||||
|
||||
// 获取信息
|
||||
func GetOrder(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
var GetOrder []orders
|
||||
if err := db.Find(&GetOrder).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法获取",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": 200,
|
||||
"message": "获取成功",
|
||||
"info": GetOrder,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 获取软删除的记录
|
||||
func GetDeletedOrder(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
var GetDeletedOrder []orders
|
||||
if err := db.Unscoped().Where("deleted_at IS NOT NULL").Find(&GetDeletedOrder).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法获取",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": 200,
|
||||
"message": "获取成功",
|
||||
"info": GetDeletedOrder,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 更新信息
|
||||
func UpdateOrder(db *gorm.DB) gin.HandlerFunc {
|
||||
|
||||
return func(ctx *gin.Context) {
|
||||
orderID := ctx.Param("id")
|
||||
var UpdataOrder orders
|
||||
|
||||
if err := db.First(&UpdataOrder, orderID).Error; err != nil {
|
||||
ctx.JSON(http.StatusNotFound, gin.H{
|
||||
"code": http.StatusNotFound,
|
||||
"message": "信息不存在",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if err := ctx.ShouldBindJSON(&UpdataOrder); err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "无效的请求数据",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if err := db.Model(&UpdataOrder).Updates(UpdataOrder).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法更新信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "信息已更新",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 新增信息
|
||||
func CreateOrder(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
var CreateOrder orders
|
||||
if err := ctx.ShouldBindJSON(&CreateOrder); err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "无效的请求数据",
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := db.Create(&CreateOrder).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法创建信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "信息已创建",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 删除信息
|
||||
func DeleteOrder(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
orderID := ctx.Param("id")
|
||||
var DeleteOrder orders
|
||||
if err := db.First(&DeleteOrder, orderID).Error; err != nil {
|
||||
ctx.JSON(http.StatusNotFound, gin.H{
|
||||
"code": http.StatusNotFound,
|
||||
"message": "信息不存在",
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := db.Delete(&DeleteOrder).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法删除信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "信息已删除",
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
package rider
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
// Rider 结构体定义
|
||||
type riders struct {
|
||||
gorm.Model
|
||||
Name string `gorm:"varchar(4)"`
|
||||
Phone string `gorm:"varchar(11)"`
|
||||
Account string `gorm:"varchar(6)"`
|
||||
Password string `gorm:"varchar(6)"`
|
||||
Address string `gorm:"varchar(100)"`
|
||||
AddressLon string `gorm:"varchar(100)"`
|
||||
AddressLat string `gorm:"varchar(100)"`
|
||||
}
|
||||
|
||||
// InitializeRouter 初始化 Rider 相关的路由
|
||||
func InitializeRouter(r *gin.Engine, db *gorm.DB) {
|
||||
r.GET("/rider/getinfo", GetRiderInfo(db)) // 获取骑手信息
|
||||
r.POST("/rider/create", CreateRider(db)) // 新增骑手信息
|
||||
r.PUT("/rider/update/:id", UpdateRiderInfo(db)) // 修改骑手信息
|
||||
r.DELETE("/rider/delete/:id", DeleteRider(db)) // 删除骑手信息
|
||||
}
|
||||
|
||||
// 获取骑手信息
|
||||
func GetRiderInfo(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
var Rider []riders
|
||||
if err := db.Find(&Rider).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法获取",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": 200,
|
||||
"message": "获取成功",
|
||||
"info": Rider,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 更新骑手信息
|
||||
func UpdateRiderInfo(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
riderID := ctx.Param("id")
|
||||
var Rider riders
|
||||
|
||||
if err := db.First(&Rider, riderID).Error; err != nil {
|
||||
ctx.JSON(http.StatusNotFound, gin.H{
|
||||
"code": http.StatusNotFound,
|
||||
"message": "骑手信息不存在",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if err := ctx.ShouldBindJSON(&Rider); err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "无效的请求数据",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if err := db.Model(&Rider).Updates(Rider).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法更新骑手信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "骑手信息已更新",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 新增骑手信息
|
||||
func CreateRider(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
var newRider riders
|
||||
if err := ctx.ShouldBindJSON(&newRider); err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "无效的请求数据",
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := db.Create(&newRider).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法创建骑手信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "骑手信息已创建",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 删除骑手信息
|
||||
func DeleteRider(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
riderID := ctx.Param("id")
|
||||
var Rider riders
|
||||
if err := db.First(&Rider, riderID).Error; err != nil {
|
||||
ctx.JSON(http.StatusNotFound, gin.H{
|
||||
"code": http.StatusNotFound,
|
||||
"message": "骑手信息不存在",
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := db.Delete(&Rider).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法删除骑手信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "骑手信息已删除",
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,133 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
// Rider 结构体定义
|
||||
type users struct {
|
||||
gorm.Model
|
||||
Name string `gorm:"varchar(4)"`
|
||||
NickName string `gorm:"varchar(10)"`
|
||||
Phone string `gorm:"varchar(11)"`
|
||||
Account string `gorm:"varchar(6)"`
|
||||
Password string `gorm:"varchar(6)"`
|
||||
}
|
||||
|
||||
// InitializeRouter 初始化 user 相关的路由
|
||||
func InitializeRouter(r *gin.Engine, db *gorm.DB) {
|
||||
r.GET("/user/get", GetUser(db)) // 获取信息
|
||||
r.PUT("/user/update/:id", UpdateUser(db)) // 修改信息
|
||||
r.POST("/user/create", CreateUser(db)) // 新增信息
|
||||
r.DELETE("/usert/delete/:id", DeleteUser(db)) // 删除信息
|
||||
}
|
||||
|
||||
// 获取信息
|
||||
func GetUser(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
var GetUser []users
|
||||
if err := db.Find(&GetUser).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法获取",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": 200,
|
||||
"message": "获取成功",
|
||||
"info": GetUser,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 修改信息
|
||||
func UpdateUser(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
userID := ctx.Param("id")
|
||||
var UpdataUser users
|
||||
|
||||
if err := db.First(&UpdataUser, userID).Error; err != nil {
|
||||
ctx.JSON(http.StatusNotFound, gin.H{
|
||||
"code": http.StatusNotFound,
|
||||
"message": "商家信息不存在",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if err := ctx.ShouldBindJSON(&UpdataUser); err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "无效的请求数据",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if err := db.Model(&UpdataUser).Updates(UpdataUser).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法更新商家信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "商家信息已更新",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 新增信息
|
||||
func CreateUser(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
var CreateUser users
|
||||
if err := ctx.ShouldBindJSON(&CreateUser); err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": http.StatusBadRequest,
|
||||
"message": "无效的请求数据",
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := db.Create(&CreateUser).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法创建商家信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "商家信息已创建",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 删除信息
|
||||
func DeleteUser(db *gorm.DB) gin.HandlerFunc {
|
||||
return func(ctx *gin.Context) {
|
||||
userID := ctx.Param("id")
|
||||
var DeleteUser users
|
||||
if err := db.First(&DeleteUser, userID).Error; err != nil {
|
||||
ctx.JSON(http.StatusNotFound, gin.H{
|
||||
"code": http.StatusNotFound,
|
||||
"message": "信息不存在",
|
||||
})
|
||||
return
|
||||
}
|
||||
if err := db.Delete(&DeleteUser).Error; err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": http.StatusInternalServerError,
|
||||
"message": "无法删除信息",
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"message": "信息已删除",
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
frame{
|
||||
height: 2000px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<frameset frameborder="0" rows="60,*">
|
||||
<frame src="AdministrateTop.html" noresize="noresize" scrolling="no" />
|
||||
<frameset frameborder="0" cols="150,*">
|
||||
<frame src="AdministrateLeft.html" noresize="noresize" scrolling="no" />
|
||||
<frame src="MainScreen.html" noresize="noresize" scrolling="yes" name="main" />
|
||||
</frameset>
|
||||
</frameset>
|
||||
</html>
|
||||
@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="css/StudentLeft.css">
|
||||
<script src="js/jquery-1.9.1.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav">
|
||||
<div class="nav-list">
|
||||
<div class="nav-tit" id="personal">
|
||||
<a href="MainScreen.html" target="main">
|
||||
<img src="images/personal-msg.png" style="height: 30px" alt="">
|
||||
<span>主页面</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-tit" id="personal">
|
||||
<a href="OrderDistributionScreen.html" target="main">
|
||||
<img src="images/personal-msg.png" style="height: 30px" alt="">
|
||||
<span>订单分配</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-tit">
|
||||
<a href="ManageWorkingTimeScreen.html" target="main">
|
||||
<img src="images/archives-msg.png" alt="">
|
||||
<span>排班管理</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-tit">
|
||||
<a href="RiderMessageScreen.html" target="main">
|
||||
<img src="images/job-change.png" alt="">
|
||||
<span>骑手信息</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-tit">
|
||||
<a href="MerchantMessageScreen.html" target="main">
|
||||
<img src="images/job-change.png" alt="">
|
||||
<span>商家信息</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-tit">
|
||||
<a href="CommodityMessageScreen.html" target="main">
|
||||
<img src="images/job-change.png" alt="">
|
||||
<span>商品信息</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-tit">
|
||||
<a href="OrderMessageScreen.html" target="main">
|
||||
<img src="images/job-change.png" alt="">
|
||||
<span>订单汇总</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- <div class="nav-tit">
|
||||
<a href="Login.html" target="main">
|
||||
<img src="images/job-msg.png" alt="">
|
||||
<span>退出登录</span>
|
||||
</a>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#personal').on('click',function(){
|
||||
$('#personal-child').fadeToggle(300);
|
||||
});
|
||||
let aLi = $('#personal-child li');
|
||||
aLi.on('click',function(){
|
||||
$(this).addClass('active').siblings('li').removeClass('active');
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.bx{
|
||||
height: 60px;
|
||||
width: 100%;
|
||||
background: #177ec1;
|
||||
}
|
||||
.bx .container{
|
||||
margin: 0 60px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.bx .container .left{
|
||||
width: 300px;
|
||||
height: 43px;
|
||||
padding-top: 19px;
|
||||
color: #FFFFFF;
|
||||
font-size: 24px;
|
||||
float: left;
|
||||
}
|
||||
.bx .container .right{
|
||||
overflow: hidden;
|
||||
width: 124px;
|
||||
padding-top: 19px;
|
||||
float: right;
|
||||
}
|
||||
.bx .container .right span{
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
}
|
||||
.bx .container .right .l{
|
||||
float: left;
|
||||
}
|
||||
.bx .container .right .r{
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="bx">
|
||||
<div class="container">
|
||||
<h2 class="left">“饿了美”外卖管理系统</h2>
|
||||
<div class="right">
|
||||
<span class="l">XX管理员</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="css/common.css">
|
||||
<link rel="stylesheet" href="css/MessageScreen.css">
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
tr:nth-child(even){background-color: #f2f2f2}
|
||||
|
||||
th {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="EmInformation container">
|
||||
<div class="information-content content">
|
||||
<div class="information-title">
|
||||
<span>当前位置>商品信息</span>
|
||||
</div>
|
||||
|
||||
<div class="unit-information">
|
||||
<div class="unit">
|
||||
<p class="unit-content">商品信息</p>
|
||||
</div>
|
||||
<div class="unit-list clearfix">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商家ID</td>
|
||||
<th>商家名称</th>
|
||||
<th>商品ID</th>
|
||||
<th>商品名称</th>
|
||||
<th>商品价格/元</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>张亮麻辣烫</td>
|
||||
<td>1</td>
|
||||
<td>新品小酥肉欢享套餐</td>
|
||||
<td>22</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>2</td>
|
||||
<td>张亮经典套餐</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>3</td>
|
||||
<td>元气满满套餐套餐</td>
|
||||
<td>28</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>4</td>
|
||||
<td>⑦荤⑧素套餐</td>
|
||||
<td>25</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="css/login.css"/>
|
||||
<script src="js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="login">
|
||||
<div class="content clearfix">
|
||||
<div class="content-left">
|
||||
<div class="logo">
|
||||
<img src="images/logo.png" alt=""/>
|
||||
<p>“饿了美”外卖管理系统</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shu"></div>
|
||||
<div class="content-right">
|
||||
<div class="login-form">
|
||||
<h2>管理员登录/LOGIN</h2>
|
||||
<div class="account clearfix">
|
||||
<span>账 号:</span>
|
||||
<input type="text" name="username" value="ELM1"/>
|
||||
</div>
|
||||
<div class="password clearfix">
|
||||
<span>密 码:</span>
|
||||
<input type="text" name="password" value="12345"/>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<span id="login" onclick="verifyLogin()">登录</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
function verifyLogin() {
|
||||
var username = document.getElementsByName('username')[0].value;
|
||||
var password = document.getElementsByName('password')[0].value;
|
||||
var requestData = {
|
||||
"Account": username,
|
||||
"Password": password
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: "http://localhost:8080/admin/login", // 后端登录接口的URL
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: JSON.stringify(requestData),
|
||||
contentType: "application/json",
|
||||
success: function(response) {
|
||||
// 登录成功,跳转到管理员首页
|
||||
window.location.href = 'AdministrateIndex.html';
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
// 登录失败,弹出错误提示
|
||||
alert('账号或密码错误');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="css/common.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/OrderDistributionScreen.css"/>
|
||||
<link rel="stylesheet" href="css/OrderDistributionScreen.css">
|
||||
<link rel="stylesheet" href="css/MessageScreen.css">
|
||||
<!-- <link rel="stylesheet" type="text/css" href="css/login.css"/> -->
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
tr:nth-child(even){background-color: #f2f2f2}
|
||||
|
||||
th {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="EmInformation container">
|
||||
<div class="information-content content">
|
||||
<div class="information-title">
|
||||
<span>当前位置>订单信息</span>
|
||||
</div>
|
||||
<div class="unit-information">
|
||||
<div class="unit">
|
||||
<p class="unit-content">订单信息</p>
|
||||
</div>
|
||||
<div class="unit-list clearfix">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>骑手ID</th>
|
||||
<th>骑手姓名</th>
|
||||
<th>周一上班时间</th>
|
||||
<th>周一下班时间</th>
|
||||
<th>周二上班时间</th>
|
||||
<th>周二下班时间</th>
|
||||
<th>周三上班时间</th>
|
||||
<th>周三下班时间</th>
|
||||
<th>周四上班时间</th>
|
||||
<th>周四下班时间</th>
|
||||
<th>周五上班时间</th>
|
||||
<th>周五下班时间</th>
|
||||
<th>周六上班时间</th>
|
||||
<th>周六下班时间</th>
|
||||
<th>周日上班时间</th>
|
||||
<th>周日下班时间</th>
|
||||
<th>工作状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="ridersTable">
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>骑手1</td>
|
||||
<td><input type="time" id="rider1-start-time-1" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-1" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-2" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-2" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-3" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-3" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-4" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-4" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-5" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-5" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-6" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-6" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-7" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-7" value="17:30"></td>
|
||||
<td>上线</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>骑手2</td>
|
||||
<td><input type="time" id="rider1-start-time-1" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-1" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-2" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-2" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-3" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-3" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-4" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-4" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-5" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-5" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-6" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-6" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-7" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-7" value="17:30"></td>
|
||||
<td>上线</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>骑手3</td>
|
||||
<td><input type="time" id="rider1-start-time-1" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-1" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-2" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-2" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-3" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-3" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-4" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-4" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-5" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-5" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-6" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-6" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-7" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-7" value="17:30"></td>
|
||||
<td>下线</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>骑手4</td>
|
||||
<td><input type="time" id="rider1-start-time-1" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-1" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-2" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-2" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-3" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-3" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-4" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-4" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-5" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-5" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-6" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-6" value="17:30"></td>
|
||||
<td><input type="time" id="rider1-start-time-7" value="08:30"></td>
|
||||
<td><input type="time" id="rider1-end-time-7" value="17:30"></td>
|
||||
<td>忙碌</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,94 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>ChangeForm</title>
|
||||
<meta name="change">
|
||||
</head>
|
||||
<body>
|
||||
<h2>请输入你要修改的商家ID</h2>
|
||||
<label for="id">ID:</label>
|
||||
<input type="int" id="id"><br><br>
|
||||
|
||||
<h2>请输入数据</h2>
|
||||
<label for="name">店铺:</label>
|
||||
<input type="text" id="name" value="重庆鸡公面-宽面"><br><br>
|
||||
|
||||
<label for="owner">店主姓名:</label>
|
||||
<input type="text" id="owner" value="李四"><br><br>
|
||||
|
||||
<label for="phone">联系方式:</label>
|
||||
<input type="text" id="phone" value="13120230202"><br><br>
|
||||
|
||||
<label for="account">账号:</label>
|
||||
<input type="text" id="account" value="202302"><br><br>
|
||||
|
||||
<label for="password">密码:</label>
|
||||
<input type="text" id="password" value="202302"><br><br>
|
||||
|
||||
<label for="address">地址:</label>
|
||||
<input type="text" id="address" value="中国民航大学北教二十五旁"><br><br>
|
||||
|
||||
<label for="addresslon">经度:</label>
|
||||
<input type="int" id="addresslon" value="117.350191"><br><br>
|
||||
|
||||
<label for="addresslat">纬度:</label>
|
||||
<input type="int" id="addresslat" value="39.116203"><br><br>
|
||||
|
||||
<button id="changeButton">确认更改</button>
|
||||
</body>
|
||||
<script>
|
||||
const changeButton = document.getElementById('changeButton');
|
||||
|
||||
changeButton.addEventListener('click', function() {
|
||||
|
||||
const newName = document.getElementById('name').value;
|
||||
const newOwner = document.getElementById('owner').value;
|
||||
const newPhone = document.getElementById('phone').value;
|
||||
const newAccount = document.getElementById('account').value;
|
||||
const newPassword = document.getElementById('password').value;
|
||||
const newAddress = document.getElementById('address').value;
|
||||
const newAddressLon = document.getElementById('addresslon').value;
|
||||
const newAddressLat = document.getElementById('addresslat').value;
|
||||
|
||||
const ID = document.getElementById('id').value;
|
||||
|
||||
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newMerchant = {
|
||||
Name: newName,
|
||||
Owner: newOwner,
|
||||
Phone: newPhone,
|
||||
Address: newAddress,
|
||||
AddressLon: newAddressLon,
|
||||
AddressLat: newAddressLat,
|
||||
Account: newAccount,
|
||||
Password: newPassword
|
||||
};
|
||||
|
||||
if(newMerchant!=null){
|
||||
fetch(`http://localhost:8080/merchant/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newMerchant)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
document.body.innerHTML = '<h2>修改成功</h2>';
|
||||
console.log(data);
|
||||
close();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,84 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>CreateForm</title>
|
||||
<meta name="create">
|
||||
</head>
|
||||
<body>
|
||||
<h2>请输入数据</h2>
|
||||
<label for="name">店铺:</label>
|
||||
<input type="text" id="name" value="重庆鸡公面-宽面"><br><br>
|
||||
|
||||
<label for="owner">店主姓名:</label>
|
||||
<input type="text" id="owner" value="李四"><br><br>
|
||||
|
||||
<label for="phone">联系方式:</label>
|
||||
<input type="text" id="phone" value="13120230202"><br><br>
|
||||
|
||||
<label for="account">账号:</label>
|
||||
<input type="text" id="account" value="202302"><br><br>
|
||||
|
||||
<label for="password">密码:</label>
|
||||
<input type="text" id="password" value="202302"><br><br>
|
||||
|
||||
<label for="address">地址:</label>
|
||||
<input type="text" id="address" value="中国民航大学北教二十五旁"><br><br>
|
||||
|
||||
<label for="address">经度:</label>
|
||||
<input type="int" id="addresslon" value="117.350191"><br><br>
|
||||
|
||||
<label for="addresslat">纬度:</label>
|
||||
<input type="int" id="addresslat" value="39.116203"><br><br>
|
||||
|
||||
<button id="saveButton">确认新建</button>
|
||||
</body>
|
||||
<script>
|
||||
const createButton = document.getElementById('saveButton');
|
||||
|
||||
createButton.addEventListener('click', function() {
|
||||
|
||||
const newName = document.getElementById('name').value;
|
||||
const newOwner = document.getElementById('owner').value;
|
||||
const newPhone = document.getElementById('phone').value;
|
||||
const newAccount = document.getElementById('account').value;
|
||||
const newPassword = document.getElementById('password').value;
|
||||
const newAddress = document.getElementById('address').value;
|
||||
const newAddressLon = document.getElementById('addresslon').value;
|
||||
const newAddressLat = document.getElementById('addresslat').value;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newMerchant = {
|
||||
Name: newName,
|
||||
Owner: newOwner,
|
||||
Phone: newPhone,
|
||||
Address: newAddress,
|
||||
AddressLon: newAddressLon,
|
||||
AddressLat: newAddressLat,
|
||||
Account: newAccount,
|
||||
Password: newPassword
|
||||
};
|
||||
|
||||
if(newMerchant!=null){
|
||||
// 使用Fetch API发送POST请求到后端API
|
||||
fetch('http://localhost:8080/merchant/create', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newMerchant)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(result => {
|
||||
// 根据API响应处理结果
|
||||
document.body.innerHTML = '<h2>数据已成功保存到数据库!</h2>';
|
||||
close(); // 关闭新窗口
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('发生错误:', error);
|
||||
document.body.innerHTML = '<h2>发生错误,请重试。</h2>';
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,35 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>DeleteForm</title>
|
||||
<meta name="delete">
|
||||
</head>
|
||||
<body>
|
||||
<h2>请输入要删除的骑手ID</h2>
|
||||
<label for="id">ID:</label>
|
||||
<input type="int" id="id" name="id"><br><br>
|
||||
|
||||
<button id="deleteButton">确认删除</button>
|
||||
</body>
|
||||
<script>
|
||||
// 在新窗口中添加事件处理程序
|
||||
document.getElementById('deleteButton').addEventListener('click', function() {
|
||||
const merchantID = document.getElementById('id').value;
|
||||
|
||||
// 发送删除请求到API
|
||||
fetch(`http://localhost:8080/merchant/delete/${merchantID}`, {
|
||||
method: "DELETE"
|
||||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
document.body.innerHTML = '<h2>删除成功</h2>';
|
||||
close();
|
||||
} else {
|
||||
document.body.innerHTML = '<h2>删除失败</h2>';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("发生错误:" + error);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="css/common.css">
|
||||
<link rel="stylesheet" href="css/MessageScreen.css">
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
tr:nth-child(even){background-color: #f2f2f2}
|
||||
|
||||
th {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="EmInformation container">
|
||||
<div class="information-content content">
|
||||
<div class="information-title">
|
||||
<span>当前位置>商家信息</span>
|
||||
</div>
|
||||
<div class="unit-information">
|
||||
<div class="unit">
|
||||
<p class="unit-content">商家信息</p>
|
||||
</div>
|
||||
<div class="unit-list clearfix">
|
||||
<div>
|
||||
<button id="Create">新建商家</button>
|
||||
<button id="Delete">删除商家</button>
|
||||
<button id="Change">修改信息</button>
|
||||
</div>
|
||||
<div id="merchantData">
|
||||
<!-- 表格将在此处动态生成 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
// 按钮定义
|
||||
const createButton = document.getElementById('Create');
|
||||
const deleteButton = document.getElementById('Delete');
|
||||
const changeButton = document.getElementById('Change');
|
||||
|
||||
// 刷新
|
||||
setInterval(populateTable, 1000);
|
||||
|
||||
// 获取数据并填充表格的函数
|
||||
function populateTable() {
|
||||
fetch('http://localhost:8080/merchant/get')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.code === 200) {
|
||||
const Merchant = data.info;
|
||||
const merchantDataElement = document.getElementById('merchantData');
|
||||
|
||||
// 创建新的表格
|
||||
const table = document.createElement('table');
|
||||
const thead = table.createTHead();
|
||||
const tbody = table.createTBody();
|
||||
|
||||
const headerRow = thead.insertRow();
|
||||
headerRow.innerHTML = "<th>商家ID</th><th>店铺</th><th>店主姓名</th><th>联系方式</th><th>账号</th><th>密码</th><th>地址</th><th>经度</th><th>纬度</th>";
|
||||
|
||||
for (const merchant of Merchant) {
|
||||
const row = tbody.insertRow();
|
||||
row.innerHTML = `
|
||||
<td>${merchant.ID}</td>
|
||||
<td>${merchant.Name}</td>
|
||||
<td>${merchant.Owner}</td>
|
||||
<td>${merchant.Phone}</td>
|
||||
<td>${merchant.Account}</td>
|
||||
<td>${merchant.Password}</td>
|
||||
<td>${merchant.Address}</td>
|
||||
<td>${merchant.AddressLon}</td>
|
||||
<td>${merchant.AddressLat}</td>
|
||||
`;
|
||||
}
|
||||
|
||||
// 清空原始表格内容并添加新表格
|
||||
merchantDataElement.innerHTML = '';
|
||||
merchantDataElement.appendChild(table);
|
||||
} else {
|
||||
const merchantDataElement = document.getElementById('merchantData');
|
||||
merchantDataElement.innerText = '无法获取商家信息';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化页面时填充表格
|
||||
populateTable();
|
||||
|
||||
// 新增商家
|
||||
createButton.addEventListener('click', function() {
|
||||
// 打开新窗口
|
||||
window.open('Merchant/createForm.html', 'CreateMerchant', 'width=500, height=500');
|
||||
populateTable();
|
||||
});
|
||||
|
||||
// 删除商家
|
||||
deleteButton.addEventListener('click', function () {
|
||||
// 打开新窗口
|
||||
window.open('Merchant/deleteForm.html', 'DeleteMerchant', 'width=500, height=500');
|
||||
populateTable();
|
||||
});
|
||||
|
||||
// 修改商家信息
|
||||
changeButton.addEventListener('click', function () {
|
||||
// 打开新窗口
|
||||
window.open('Merchant/changeForm.html', 'ChangeMerchant', 'width=500, height=500');
|
||||
populateTable();
|
||||
});
|
||||
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,429 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>Form</title>
|
||||
<meta name="form">
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<button id="User1">用户 下单</button>
|
||||
<button id="Order">订单 派送</button>
|
||||
<button id="User2">用户 取餐</button>
|
||||
</div>
|
||||
<div>
|
||||
<button id="Rider1">骑手 接单</button>
|
||||
<button id="Rider2">骑手 到店</button>
|
||||
<button id="Rider3">骑手 取餐</button>
|
||||
<button id="Rider4">骑手 送达</button>
|
||||
</div>
|
||||
<div>
|
||||
<button id="Merchant1">商家 接单</button>
|
||||
<button id="Merchant2">商家 出餐</button>
|
||||
<button id="Merchant3">商家 完成</button>
|
||||
</div>
|
||||
|
||||
<h2>请输入要修改的订单ID</h2>
|
||||
<label for="id">ID:</label>
|
||||
<input type="int" id="id"><br><br>
|
||||
|
||||
<h2>请输入数据</h2>
|
||||
|
||||
<label for="Name">订单简介:</label>
|
||||
<input type="text" id="Name" value="张亮麻辣烫"><br><br>
|
||||
|
||||
<label for="RiderID">骑手ID:</label>
|
||||
<input type="text" id="RiderID"><br><br>
|
||||
|
||||
<label for="MerchantID">商家ID:</label>
|
||||
<input type="text" id="MerchantID"><br><br>
|
||||
|
||||
<label for="OrderStatus">订单状态:</label>
|
||||
<select type="text" id="OrderStatus">
|
||||
<option value="订单信息已发送">订单信息已发送</option>
|
||||
<option value="待取餐">待取餐</option>
|
||||
<option value="配送中">配送中</option>
|
||||
<option value="配送完成">配送完成</option>
|
||||
</select><br><br>
|
||||
|
||||
<label for="MerchantStatus">商家状态:</label>
|
||||
<select type="text" id="MerchantStatus">
|
||||
<option value="未派发">未派发</option>
|
||||
<option value="未接单">未接单</option>
|
||||
<option value="已接单">已接单</option>
|
||||
<option value="待取餐">待取餐</option>
|
||||
<option value="已取餐">已取餐</option>
|
||||
</select><br><br>
|
||||
|
||||
<label for="RiderStatus">骑手状态:</label>
|
||||
<select type="text" id="RiderStatus">
|
||||
<option value="未派发">未派发</option>
|
||||
<option value="未接单">未接单</option>
|
||||
<option value="已接单">已接单</option>
|
||||
<option value="已到店">已到店</option>
|
||||
<option value="配送中">配送中</option>
|
||||
<option value="配送完成">配送完成</option>
|
||||
</select><br><br>
|
||||
|
||||
<label for="Delivery">送餐地点:</label>
|
||||
<input type="text" id="Delivery" value="中国民航大学北21"><br><br>
|
||||
|
||||
<label for="Pickup">取餐地点:</label>
|
||||
<input type="text" id="Pickup" value="中国民航大学肯德基店"><br><br>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
const Rider1 = document.getElementById('Rider1');
|
||||
const Rider2 = document.getElementById('Rider2');
|
||||
const Rider3 = document.getElementById('Rider3');
|
||||
const Rider4 = document.getElementById('Rider4');
|
||||
|
||||
const Merchant1 = document.getElementById('Merchant1');
|
||||
const Merchant2 = document.getElementById('Merchant2');
|
||||
const Merchant3 = document.getElementById('Merchant3');
|
||||
|
||||
const User1= document.getElementById('User1');
|
||||
const Order= document.getElementById('Order');
|
||||
const User2= document.getElementById('User2');
|
||||
|
||||
//用户下单,订单 已创建,商家 未派发,骑手 未派发
|
||||
User1.addEventListener('click', function() {
|
||||
const newName = document.getElementById('Name').value;
|
||||
const newRider = document.getElementById('RiderID').value;
|
||||
const newMerchant = document.getElementById('MerchantID').value;
|
||||
const newOrderStatus = "订单已创建";
|
||||
const newMerchantStatus = "商家未派发";
|
||||
const newRiderStatus = "骑手未派发";
|
||||
const newDeliveryLoc = document.getElementById('Delivery').value;
|
||||
const newPickupLoc = document.getElementById('Pickup').value;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
Name: newName,
|
||||
Rider: newRider,
|
||||
Merchant: newMerchant,
|
||||
OrderStatus: newOrderStatus,
|
||||
MerchantStatus: newMerchantStatus,
|
||||
RiderStatus: newRiderStatus,
|
||||
PickupLoc: newPickupLoc,
|
||||
DeliveryLoc: newDeliveryLoc,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
// 使用Fetch API发送POST请求到后端API
|
||||
fetch('http://localhost:8080/order/create', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(result => {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('发生错误:', error);
|
||||
document.body.innerHTML = '<h2>发生错误,请重试。</h2>';
|
||||
});
|
||||
}
|
||||
});
|
||||
//派发接单,订单 已派发,商家 未接单,骑手 未接单,随机骑手ID、商家ID
|
||||
Order.addEventListener('click', function() {
|
||||
const newOrderStatus = "订单已派发";
|
||||
const newMerchantStatus = "商家未接单";
|
||||
const newRiderStatus = "骑手未接单";
|
||||
const newMerchant = Math.floor(Math.random() * 10) + 1;
|
||||
const newRider = Math.floor(Math.random() * 10) + 1;
|
||||
const ID = document.getElementById('id').value;;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
Rider: newRider.toString(),
|
||||
Merchant: newMerchant.toString(),
|
||||
MerchantStatus: newMerchantStatus,
|
||||
OrderStatus: newOrderStatus,
|
||||
RiderStatus: newRiderStatus,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
fetch(`http://localhost:8080/order/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//商家接单,商家 已接单
|
||||
Merchant1.addEventListener('click', function() {
|
||||
const newMerchantStatus = "商家已接单";
|
||||
const newOrderStatus = "待出餐";
|
||||
const ID = document.getElementById('id').value;;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
MerchantStatus: newMerchantStatus,
|
||||
OrderStatus: newOrderStatus,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
fetch(`http://localhost:8080/order/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
//商家出餐,商家 待取餐
|
||||
Merchant2.addEventListener('click', function() {
|
||||
const newMerchantStatus = "商家已出餐";
|
||||
const newOrderStatus = "待取餐";
|
||||
const ID = document.getElementById('id').value;;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
MerchantStatus: newMerchantStatus,
|
||||
OrderStatus: newOrderStatus,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
fetch(`http://localhost:8080/order/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
//商家完成订单,商家 完成订单
|
||||
Merchant3.addEventListener('click', function() {
|
||||
const newMerchantStatus = "商家已完成订单";
|
||||
const ID = document.getElementById('id').value;;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
MerchantStatus: newMerchantStatus,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
fetch(`http://localhost:8080/order/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//骑手接单,骑手 已接单/
|
||||
Rider1.addEventListener('click', function() {
|
||||
const newRiderStatus = "骑手已接单";
|
||||
const ID = document.getElementById('id').value;;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
RiderStatus: newRiderStatus,
|
||||
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
fetch(`http://localhost:8080/order/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
//骑手到店,骑手 已到店
|
||||
Rider2.addEventListener('click', function() {
|
||||
const newRiderStatus = "骑手已到店";
|
||||
const ID = document.getElementById('id').value;;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
RiderStatus: newRiderStatus,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
fetch(`http://localhost:8080/order/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
//骑手取餐,骑手 配送中
|
||||
Rider3.addEventListener('click', function() {
|
||||
const newRiderStatus = "骑手配送中";
|
||||
const newOrderStatus = "配送中";
|
||||
const ID = document.getElementById('id').value;;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
RiderStatus: newRiderStatus,
|
||||
OrderStatus: newOrderStatus,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
fetch(`http://localhost:8080/order/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
//骑手送到,骑手 配送完成
|
||||
Rider4.addEventListener('click', function() {
|
||||
const newRiderStatus = "骑手配送完成";
|
||||
const newOrderStatus = "配送完成";
|
||||
const ID = document.getElementById('id').value;;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
RiderStatus: newRiderStatus,
|
||||
OrderStatus: newOrderStatus,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
fetch(`http://localhost:8080/order/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//用户取餐,订单 已完成
|
||||
User2.addEventListener('click', function() {
|
||||
const orderID = document.getElementById('id').value;
|
||||
|
||||
// 发送删除请求到API
|
||||
fetch(`http://localhost:8080/order/delete/${orderID}`, {
|
||||
method: "DELETE"
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("发生错误:" + error);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,109 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>ChangeForm</title>
|
||||
<meta name="change">
|
||||
</head>
|
||||
<body>
|
||||
<h2>请输入你要修改的订单ID</h2>
|
||||
<label for="id">订单ID:</label>
|
||||
<input type="int" id="id"><br><br>
|
||||
|
||||
<h2>请输入数据</h2>
|
||||
|
||||
<label for="Name">订单简介:</label>
|
||||
<input type="text" id="Name" value="肯德基套餐A"><br><br>
|
||||
|
||||
<label for="RiderID">骑手ID:</label>
|
||||
<input type="text" id="RiderID" value="2"><br><br>
|
||||
|
||||
<label for="MerchantID">商家ID:</label>
|
||||
<input type="text" id="MerchantID" value="2"><br><br>
|
||||
|
||||
<label for="OrderStatus">订单状态:</label>
|
||||
<select type="text" id="OrderStatus">
|
||||
<option value="订单信息已发送">订单信息已发送</option>
|
||||
<option value="待取餐">待取餐</option>
|
||||
<option value="配送中">配送中</option>
|
||||
<option value="配送完成">配送完成</option>
|
||||
</select><br><br>
|
||||
|
||||
<label for="MerchantStatus">商家状态:</label>
|
||||
<select type="text" id="MerchantStatus">
|
||||
<option value="已接单">已接单</option>
|
||||
<option value="已出餐">已出餐</option>
|
||||
<option value="骑手已取餐">骑手已取餐</option>
|
||||
<option value="订单完成">订单完成</option>
|
||||
</select><br><br>
|
||||
|
||||
<label for="RiderStatus">骑手状态:</label>
|
||||
<select type="text" id="RiderStatus">
|
||||
<option value="未接单">未接单</option>
|
||||
<option value="已接单">已接单</option>
|
||||
<option value="等待取餐">等待取餐</option>
|
||||
<option value="配送中">配送中</option>
|
||||
<option value="配送完成">配送完成</option>
|
||||
</select><br><br>
|
||||
|
||||
<label for="Delivery">送餐地点:</label>
|
||||
<input type="text" id="Delivery" value="中国民航大学北21"><br><br>
|
||||
|
||||
<label for="Pickup">取餐地点:</label>
|
||||
<input type="text" id="Pickup" value="中国民航大学肯德基店"><br><br>
|
||||
|
||||
<button id="changeButton">确认修改</button>
|
||||
</body>
|
||||
<script>
|
||||
const changeButton = document.getElementById('changeButton');
|
||||
|
||||
changeButton.addEventListener('click', function() {
|
||||
|
||||
const newName = document.getElementById('Name').value;
|
||||
const newRider = document.getElementById('RiderID').value;
|
||||
const newMerchant = document.getElementById('MerchantID').value;
|
||||
const newOrderStatus = document.getElementById('OrderStatus').value;
|
||||
const newMerchantStatus = document.getElementById('MerchantStatus').value;
|
||||
const newRiderStatus = document.getElementById('RiderStatus').value;
|
||||
const newDeliveryLoc = document.getElementById('Delivery').value;
|
||||
const newPickupLoc = document.getElementById('Pickup').value;
|
||||
|
||||
const ID = document.getElementById('id').value;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
//Name: newName,
|
||||
Rider: newRider,
|
||||
Merchant: newMerchant,
|
||||
OrderStatus: newOrderStatus,
|
||||
MerchantStatus: newMerchantStatus,
|
||||
RiderStatus: newRiderStatus,
|
||||
PickupLoc: newPickupLoc,
|
||||
DeliveryLoc: newDeliveryLoc,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
fetch(`http://localhost:8080/order/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
document.body.innerHTML = '<h2>修改成功</h2>';
|
||||
console.log(data);
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,97 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>CreateForm</title>
|
||||
<meta name="create">
|
||||
</head>
|
||||
<body>
|
||||
<h2>请输入数据</h2>
|
||||
|
||||
<label for="Name">订单简介:</label>
|
||||
<input type="text" id="Name" value="肯德基套餐A"><br><br>
|
||||
|
||||
<label for="RiderID">骑手ID:</label>
|
||||
<input type="text" id="RiderID" value="1"><br><br>
|
||||
|
||||
<label for="MerchantID">商家ID:</label>
|
||||
<input type="text" id="MerchantID" value="1"><br><br>
|
||||
|
||||
<label for="OrderStatus">订单状态:</label>
|
||||
<select type="text" id="OrderStatus">
|
||||
<option value="订单信息已发送">订单信息已发送</option>
|
||||
<option value="待取餐">待取餐</option>
|
||||
<option value="配送中">配送中</option>
|
||||
<option value="配送完成">配送完成</option>
|
||||
</select><br><br>
|
||||
|
||||
<label for="MerchantStatus">商家状态:</label>
|
||||
<select type="text" id="MerchantStatus">
|
||||
<option value="已接单">已接单</option>
|
||||
<option value="已出餐">已出餐</option>
|
||||
<option value="骑手已取餐">骑手已取餐</option>
|
||||
<option value="订单完成">订单完成</option>
|
||||
</select><br><br>
|
||||
|
||||
<label for="RiderStatus">骑手状态:</label>
|
||||
<select type="text" id="RiderStatus">
|
||||
<option value="未接单">未接单</option>
|
||||
<option value="已接单">已接单</option>
|
||||
<option value="等待取餐">等待取餐</option>
|
||||
<option value="配送中">配送中</option>
|
||||
<option value="配送完成">配送完成</option>
|
||||
</select><br><br>
|
||||
|
||||
<label for="Delivery">送餐地点:</label>
|
||||
<input type="text" id="Delivery" value="中国民航大学北21"><br><br>
|
||||
|
||||
<label for="Pickup">取餐地点:</label>
|
||||
<input type="text" id="Pickup" value="中国民航大学肯德基店"><br><br>
|
||||
<button id="saveButton">确认新建</button>
|
||||
</body>
|
||||
<script>
|
||||
const createButton = document.getElementById('saveButton');
|
||||
|
||||
createButton.addEventListener('click', function() {
|
||||
|
||||
const newName = document.getElementById('Name').value;
|
||||
const newRider = document.getElementById('RiderID').value;
|
||||
const newMerchant = document.getElementById('MerchantID').value;
|
||||
const newOrderStatus = document.getElementById('OrderStatus').value;
|
||||
const newMerchantStatus = document.getElementById('MerchantStatus').value;
|
||||
const newRiderStatus = document.getElementById('RiderStatus').value;
|
||||
const newDeliveryLoc = document.getElementById('Delivery').value;
|
||||
const newPickupLoc = document.getElementById('Pickup').value;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newOrder = {
|
||||
Name: newName,
|
||||
Rider: newRider,
|
||||
Merchant: newMerchant,
|
||||
OrderStatus: newOrderStatus,
|
||||
MerchantStatus: newMerchantStatus,
|
||||
RiderStatus: newRiderStatus,
|
||||
PickupLoc: newPickupLoc,
|
||||
DeliveryLoc: newDeliveryLoc,
|
||||
};
|
||||
|
||||
if(newOrder!=null){
|
||||
// 使用Fetch API发送POST请求到后端API
|
||||
fetch('http://localhost:8080/order/create', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newOrder)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(result => {
|
||||
// 根据API响应处理结果
|
||||
document.body.innerHTML = '<h2>数据已成功保存到数据库!</h2>';
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('发生错误:', error);
|
||||
document.body.innerHTML = '<h2>发生错误,请重试。</h2>';
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,35 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>DeleteForm</title>
|
||||
<meta name="delete">
|
||||
</head>
|
||||
<body>
|
||||
<h2>请输入要删除的订单ID</h2>
|
||||
<label for="id">ID:</label>
|
||||
<input type="int" id="id" name="id"><br><br>
|
||||
|
||||
<button id="deleteButton">确认删除</button>
|
||||
</body>
|
||||
<script>
|
||||
// 在新窗口中添加事件处理程序
|
||||
document.getElementById('deleteButton').addEventListener('click', function() {
|
||||
const orderID = document.getElementById('id').value;
|
||||
|
||||
// 发送删除请求到API
|
||||
fetch(`http://localhost:8080/order/delete/${orderID}`, {
|
||||
method: "DELETE"
|
||||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
document.body.innerHTML = '<h2>删除成功</h2>';
|
||||
|
||||
} else {
|
||||
document.body.innerHTML = '<h2>删除失败</h2>';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("发生错误:" + error);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="css/common.css">
|
||||
<link rel="stylesheet" href="css/OrderDistributionScreen.css">
|
||||
<link rel="stylesheet" href="css/MessageScreen.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/login.css"/>
|
||||
<script src="js/jquery-1.9.1.min.js"></script>
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
tr:nth-child(even){background-color: #f2f2f2}
|
||||
|
||||
th {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="EmInformation container">
|
||||
<div class="information-content content">
|
||||
<div class="information-title">
|
||||
<span>当前位置>订单信息</span>
|
||||
</div>
|
||||
<div class="unit-information">
|
||||
<div class="unit">
|
||||
<p class="unit-content">订单信息</p>
|
||||
</div>
|
||||
<div class="unit-list clearfix">
|
||||
<div>
|
||||
<button id="Create">新建订单</button>
|
||||
<button id="Delete">删除订单</button>
|
||||
<button id="Change">修改信息</button>
|
||||
</div>
|
||||
<div id="orderData">
|
||||
<!-- 表格将在此处动态生成 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 按钮定义
|
||||
const createButton = document.getElementById('Create');
|
||||
const deleteButton = document.getElementById('Delete');
|
||||
const changeButton = document.getElementById('Change');
|
||||
|
||||
setInterval(populateTable, 1000);
|
||||
|
||||
// 获取数据并填充表格的函数
|
||||
function populateTable() {
|
||||
fetch('http://localhost:8080/order/get')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.code === 200) {
|
||||
const Order = data.info;
|
||||
const orderDataElement = document.getElementById('orderData');
|
||||
// 创建新的表格
|
||||
const table = document.createElement('table');
|
||||
const thead = table.createTHead();
|
||||
const tbody = table.createTBody();
|
||||
|
||||
const headerRow = thead.insertRow();
|
||||
headerRow.innerHTML = `
|
||||
<th>订单简介</th>
|
||||
<th>订单ID</th>
|
||||
<th>骑手ID</th>
|
||||
<th>商家ID</th>
|
||||
<th>订单状态</th>
|
||||
<th>商家状态</th>
|
||||
<th>骑手状态</th>
|
||||
<th>送餐地点</th>
|
||||
<th>取餐地点</th>
|
||||
`;
|
||||
for (const order of Order) {
|
||||
const row = tbody.insertRow();
|
||||
row.innerHTML = `
|
||||
<td>${order.Name}</td>
|
||||
<td>${order.ID}</td>
|
||||
<td>${order.Rider}</td>
|
||||
<td>${order.Merchant}</td>
|
||||
<td>${order.OrderStatus}</td>
|
||||
<td>${order.MerchantStatus}</td>
|
||||
<td>${order.RiderStatus}</td>
|
||||
<td>${order.PickupLoc}</td>
|
||||
<td>${order.DeliveryLoc}</td>
|
||||
`;
|
||||
}
|
||||
// 清空原始表格内容并添加新表格
|
||||
orderDataElement.innerHTML = '';
|
||||
orderDataElement.appendChild(table);
|
||||
} else {
|
||||
const orderDataElement = document.getElementById('orderData');
|
||||
orderDataElement.innerText = '无法获取订单信息';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化页面时填充表格
|
||||
populateTable();
|
||||
|
||||
// 新增订单
|
||||
createButton.addEventListener('click', function() {
|
||||
// 打开新窗口
|
||||
window.open('Order/createForm.html', 'CreateOrder', 'width=500, height=500');
|
||||
});
|
||||
|
||||
// 删除订单
|
||||
deleteButton.addEventListener('click', function () {
|
||||
// 打开新窗口
|
||||
window.open('Order/deleteForm.html', 'DeleteOrder', 'width=500, height=500');
|
||||
});
|
||||
|
||||
// 修改订单信息
|
||||
changeButton.addEventListener('click', function () {
|
||||
// 打开新窗口
|
||||
window.open('Order/changeForm.html', 'ChangeOrder', 'width=500, height=500');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="css/common.css">
|
||||
<link rel="stylesheet" href="css/MessageScreen.css">
|
||||
<link rel="stylesheet" href="css/OrderDistributionScreen.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/login.css"/>
|
||||
<script src="js/jquery-1.9.1.min.js"></script>
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
tr:nth-child(even){background-color: #f2f2f2}
|
||||
|
||||
th {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="EmInformation container">
|
||||
<div class="information-content content">
|
||||
<div class="information-title">
|
||||
<span>当前位置>订单汇总</span>
|
||||
</div>
|
||||
<div class="unit-information">
|
||||
<div class="unit">
|
||||
<p class="unit-content">订单汇总信息</p>
|
||||
</div>
|
||||
<div class="unit-list clearfix">
|
||||
<div>
|
||||
<button id="Delete">删除订单</button>
|
||||
</div>
|
||||
<div id="orderData">
|
||||
<!-- 表格将在此处动态生成 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 按钮定义
|
||||
const deleteButton = document.getElementById('Delete');
|
||||
|
||||
setInterval(populateTable, 1000);
|
||||
|
||||
// 获取数据并填充表格的函数
|
||||
function populateTable() {
|
||||
fetch('http://localhost:8080/order/getdel')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.code === 200) {
|
||||
const Order = data.info;
|
||||
const orderDataElement = document.getElementById('orderData');
|
||||
// 创建新的表格
|
||||
const table = document.createElement('table');
|
||||
const thead = table.createTHead();
|
||||
const tbody = table.createTBody();
|
||||
|
||||
const headerRow = thead.insertRow();
|
||||
headerRow.innerHTML = `
|
||||
<th>订单简介</th>
|
||||
<th>订单ID</th>
|
||||
<th>骑手ID</th>
|
||||
<th>商家ID</th>
|
||||
<th>订单状态</th>
|
||||
<th>商家状态</th>
|
||||
<th>骑手状态</th>
|
||||
<th>送餐地点</th>
|
||||
<th>取餐地点</th>
|
||||
`;
|
||||
for (const order of Order) {
|
||||
const row = tbody.insertRow();
|
||||
row.innerHTML = `
|
||||
<td>${order.Name}</td>
|
||||
<td>${order.ID}</td>
|
||||
<td>${order.Rider}</td>
|
||||
<td>${order.Merchant}</td>
|
||||
<td>${order.OrderStatus}</td>
|
||||
<td>${order.MerchantStatus}</td>
|
||||
<td>${order.RiderStatus}</td>
|
||||
<td>${order.PickupLoc}</td>
|
||||
<td>${order.DeliveryLoc}</td>
|
||||
`;
|
||||
}
|
||||
// 清空原始表格内容并添加新表格
|
||||
orderDataElement.innerHTML = '';
|
||||
orderDataElement.appendChild(table);
|
||||
} else {
|
||||
const orderDataElement = document.getElementById('orderData');
|
||||
orderDataElement.innerText = '无法获取订单信息';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
// 初始化页面时填充表格
|
||||
populateTable();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,89 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>ChangeForm</title>
|
||||
<meta name="change">
|
||||
</head>
|
||||
<body>
|
||||
<h2>请输入你要修改的骑手ID</h2>
|
||||
<label for="id">ID:</label>
|
||||
<input type="int" id="id" name="id"><br><br>
|
||||
|
||||
<h2>请输入数据</h2>
|
||||
<label for="name">姓名:</label>
|
||||
<input type="text" id="name" value="赵六"><br><br>
|
||||
|
||||
<label for="phone">电话:</label>
|
||||
<input type="text" id="phone" value="13120232222"><br><br>
|
||||
|
||||
<label for="account">账号:</label>
|
||||
<input type="text" id="account" value="202322"><br><br>
|
||||
|
||||
<label for="password">密码:</label>
|
||||
<input type="text" id="password" value="202322"><br><br>
|
||||
|
||||
<label for="address">地址:</label>
|
||||
<input type="text" id="address" value="中国民航大学北二十一公寓"><br><br>
|
||||
|
||||
<label for="addresslon">经度:</label>
|
||||
<input type="int" id="addresslon" value="117.352943"><br><br>
|
||||
|
||||
<label for="addresslat">纬度:</label>
|
||||
<input type="int" id="addresslat" value="39.1118"><br><br>
|
||||
|
||||
<button id="changeButton">确认更改</button>
|
||||
</body>
|
||||
<script>
|
||||
const changeButton = document.getElementById('changeButton');
|
||||
|
||||
changeButton.addEventListener('click', function() {
|
||||
|
||||
const newName = document.getElementById('name').value;
|
||||
const newPhone = document.getElementById('phone').value;
|
||||
const newAccount = document.getElementById('account').value;
|
||||
const newPassword = document.getElementById('password').value;
|
||||
const newAddress = document.getElementById('address').value;
|
||||
const newAddressLon = document.getElementById('addressLon').value;
|
||||
const newAddressLat = document.getElementById('addressLat').value;
|
||||
|
||||
const ID = document.getElementById('id').value;
|
||||
|
||||
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newRider = {
|
||||
Name: newName,
|
||||
Phone: newPhone,
|
||||
Account: newAccount,
|
||||
Password: newPassword,
|
||||
Address: newAddress,
|
||||
AddressLon: newAddressLon,
|
||||
AddressLat: newAddressLat,
|
||||
};
|
||||
|
||||
if(newRider!=null){
|
||||
fetch(`http://localhost:8080/rider/update/${ID}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newRider)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
} else {
|
||||
return response.text();
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
document.body.innerHTML = '<h2>修改成功</h2>';
|
||||
console.log(data);
|
||||
close();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,79 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>CreateForm</title>
|
||||
<meta name="create">
|
||||
</head>
|
||||
<body>
|
||||
<h2>请输入数据</h2>
|
||||
<label for="name">姓名:</label>
|
||||
<input type="text" id="name" value="赵六"><br><br>
|
||||
|
||||
<label for="phone">电话:</label>
|
||||
<input type="text" id="phone" value="13120232222"><br><br>
|
||||
|
||||
<label for="account">账号:</label>
|
||||
<input type="text" id="account" value="202322"><br><br>
|
||||
|
||||
<label for="password">密码:</label>
|
||||
<input type="text" id="password" value="202322"><br><br>
|
||||
|
||||
<label for="address">地址:</label>
|
||||
<input type="text" id="address" value="中国民航大学北二十一公寓"><br><br>
|
||||
|
||||
<label for="addresslon">经度:</label>
|
||||
<input type="int" id="addresslon" value="117.352943"><br><br>
|
||||
|
||||
<label for="addresslat">纬度:</label>
|
||||
<input type="int" id="addresslat" value="39.1118"><br><br>
|
||||
|
||||
<button id="saveButton">确认新建</button>
|
||||
</body>
|
||||
<script>
|
||||
const createButton = document.getElementById('saveButton');
|
||||
|
||||
createButton.addEventListener('click', function() {
|
||||
|
||||
const newName = document.getElementById('name').value;
|
||||
const newPhone = document.getElementById('phone').value;
|
||||
const newAccount = document.getElementById('account').value;
|
||||
const newPassword = document.getElementById('password').value;
|
||||
const newAddress = document.getElementById('address').value;
|
||||
const newAddressLon = document.getElementById('addressLon').value;
|
||||
const newAddressLat = document.getElementById('addressLat').value;
|
||||
|
||||
// 构建要发送到API的数据对象
|
||||
const newRider = {
|
||||
Name: newName,
|
||||
Phone: newPhone,
|
||||
Account: newAccount,
|
||||
Password: newPassword,
|
||||
Address: newAddress,
|
||||
AddressLon: newAddressLon,
|
||||
AddressLat: newAddressLat,
|
||||
};
|
||||
|
||||
if(newRider!=null){
|
||||
// 使用Fetch API发送POST请求到后端API
|
||||
fetch('http://localhost:8080/rider/create', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(newRider)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(result => {
|
||||
// 根据API响应处理结果
|
||||
document.body.innerHTML = '<h2>数据已成功保存到数据库!</h2>';
|
||||
close(); // 关闭新窗口
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('发生错误:', error);
|
||||
document.body.innerHTML = '<h2>发生错误,请重试。</h2>';
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,35 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>DeleteForm</title>
|
||||
<meta name="delete">
|
||||
</head>
|
||||
<body>
|
||||
<h2>请输入要删除的骑手ID</h2>
|
||||
<label for="id">ID:</label>
|
||||
<input type="int" id="id"><br><br>
|
||||
|
||||
<button id="deleteButton">确认删除</button>
|
||||
</body>
|
||||
<script>
|
||||
// 在新窗口中添加事件处理程序
|
||||
document.getElementById('deleteButton').addEventListener('click', function() {
|
||||
const riderID = document.getElementById('id').value;
|
||||
|
||||
// 发送删除请求到API
|
||||
fetch(`http://localhost:8080/rider/delete/${riderID}`, {
|
||||
method: "DELETE"
|
||||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
document.body.innerHTML = '<h2>删除成功</h2>';
|
||||
close();
|
||||
} else {
|
||||
document.body.innerHTML = '<h2>删除失败</h2>';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("发生错误:" + error);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="css/common.css">
|
||||
<link rel="stylesheet" href="css/MessageScreen.css">
|
||||
<link rel="stylesheet" href="css/Login.css">
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
tr:nth-child(even){background-color: #f2f2f2}
|
||||
|
||||
th {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="EmInformation container">
|
||||
<div class="information-content content">
|
||||
<div class="information-title">
|
||||
<span>当前位置>骑手信息</span>
|
||||
</div>
|
||||
<div class="unit-information">
|
||||
<div class="unit">
|
||||
<p class="unit-content">骑手信息</p>
|
||||
</div>
|
||||
<div class="unit-list clearfix">
|
||||
<div>
|
||||
<button id="Create">新建骑手</button>
|
||||
<button id="Delete">删除骑手</button>
|
||||
<button id="Change">修改信息</button>
|
||||
</div>
|
||||
<div id="riderData">
|
||||
<!-- 表格将在此处动态生成 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 按钮定义
|
||||
const createButton = document.getElementById('Create');
|
||||
const deleteButton = document.getElementById('Delete');
|
||||
const changeButton = document.getElementById('Change');
|
||||
|
||||
// 刷新
|
||||
setInterval(populateTable, 1000);
|
||||
|
||||
// 获取数据并填充表格的函数
|
||||
function populateTable() {
|
||||
fetch('http://localhost:8080/rider/getinfo')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.code === 200) {
|
||||
const Rider = data.info;
|
||||
const riderDataElement = document.getElementById('riderData');
|
||||
|
||||
// 创建新的表格
|
||||
const table = document.createElement('table');
|
||||
const thead = table.createTHead();
|
||||
const tbody = table.createTBody();
|
||||
|
||||
const headerRow = thead.insertRow();
|
||||
headerRow.innerHTML = "<th>骑手ID</th><th>姓名</th><th>电话</th><th>账号</th><th>密码</th><th>地址</th><th>经度</th><th>纬度</th>";
|
||||
|
||||
for (const rider of Rider) {
|
||||
const row = tbody.insertRow();
|
||||
row.innerHTML = `<td>${rider.ID}</td>
|
||||
<td>${rider.Name}</td>
|
||||
<td>${rider.Phone}</td>
|
||||
<td>${rider.Account}</td>
|
||||
<td>${rider.Password}</td>
|
||||
<td>${rider.Address}</td>
|
||||
<td>${rider.AddressLon}</td>
|
||||
<td>${rider.AddressLat}</td>
|
||||
`;
|
||||
}
|
||||
|
||||
// 清空原始表格内容并添加新表格
|
||||
riderDataElement.innerHTML = '';
|
||||
riderDataElement.appendChild(table);
|
||||
} else {
|
||||
const riderDataElement = document.getElementById('riderData');
|
||||
riderDataElement.innerText = '无法获取骑手信息';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化页面时填充表格
|
||||
populateTable();
|
||||
|
||||
// 新增骑手
|
||||
createButton.addEventListener('click', function() {
|
||||
// 打开新窗口
|
||||
window.open('Rider/createForm.html', 'CreateRider', 'width=500, height=500');
|
||||
populateTable();
|
||||
});
|
||||
|
||||
// 删除骑手
|
||||
deleteButton.addEventListener('click', function () {
|
||||
// 打开新窗口
|
||||
window.open('Rider/deleteForm.html', 'DeleteRider', 'width=500, height=500');
|
||||
populateTable();
|
||||
});
|
||||
|
||||
// 修改骑手信息
|
||||
changeButton.addEventListener('click', function () {
|
||||
// 打开新窗口
|
||||
window.open('Rider/changeForm.html', 'ChangeRider', 'width=500, height=500');
|
||||
populateTable();
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1 @@
|
||||
{"code":"success","data":[{"dataName":"fail.html","dataSrc":"fail.html"},{"dataName":"FamilyInformation.html","dataSrc":"FamilyInformation.html"},{"dataName":"index.html","dataSrc":"index.html"},{"dataName":"investigation.html","dataSrc":"investigation.html"},{"dataName":"Login.html","dataSrc":"Login.html"},{"dataName":"password.html","dataSrc":"password.html"},{"dataName":"punishment.html","dataSrc":"punishment.html"},{"dataName":"school-msg.html","dataSrc":"school-msg.html"},{"dataName":"search.html","dataSrc":"search.html"},{"dataName":"search404.html","dataSrc":"search404.html"},{"dataName":"searchNo.html","dataSrc":"searchNo.html"},{"dataName":"SearchNow.html","dataSrc":"SearchNow.html"},{"dataName":"StatisticalFigure.html","dataSrc":"StatisticalFigure.html"},{"dataName":"student.html","dataSrc":"student.html"},{"dataName":"StudentEmInformation.html","dataSrc":"StudentEmInformation.html"},{"dataName":"StudentIndex.html","dataSrc":"StudentIndex.html"},{"dataName":"StudentInfo.html","dataSrc":"StudentInfo.html"},{"dataName":"StudentInformation.html","dataSrc":"StudentInformation.html"},{"dataName":"StudentLeft.html","dataSrc":"StudentLeft.html"},{"dataName":"StudentPubMed.html","dataSrc":"StudentPubMed.html"},{"dataName":"StudentRevise.html","dataSrc":"StudentRevise.html"},{"dataName":"StudentRight.html","dataSrc":"StudentRight.html"},{"dataName":"StudentScInformation.html","dataSrc":"StudentScInformation.html"},{"dataName":"StudentTop.html","dataSrc":"StudentTop.html"},{"dataName":"successful.html","dataSrc":"successful.html"},{"dataName":"TeacherEmInformation.html","dataSrc":"TeacherEmInformation.html"},{"dataName":"TeacherIndex.html","dataSrc":"TeacherIndex.html"},{"dataName":"TeacherInfo.html","dataSrc":"TeacherInfo.html"},{"dataName":"Teacherinvestigation.html","dataSrc":"Teacherinvestigation.html"},{"dataName":"TeacherLeft.html","dataSrc":"TeacherLeft.html"},{"dataName":"TeacherPersonalInfo.html","dataSrc":"TeacherPersonalInfo.html"},{"dataName":"TeacherPubMed.html","dataSrc":"TeacherPubMed.html"},{"dataName":"TeacherRight.html","dataSrc":"TeacherRight.html"},{"dataName":"TeacherTop.html","dataSrc":"TeacherTop.html"}]}
|
||||
@ -0,0 +1,111 @@
|
||||
.header{
|
||||
padding:30px 20px 10px 30px;
|
||||
color:#646464;
|
||||
font-size: 15px;
|
||||
}
|
||||
.header a{
|
||||
color:#646464;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.header .top{
|
||||
width:100%;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.header .bottom {
|
||||
width: 130px;
|
||||
}
|
||||
.main{
|
||||
color:#686868;
|
||||
padding-bottom: 94px;
|
||||
}
|
||||
.main .title{
|
||||
padding:5px 0 5px 30px;
|
||||
height:30px;
|
||||
background: url("../images/border.png") no-repeat 0 5px;
|
||||
background-color: #e7f3f3;
|
||||
color:#333436;
|
||||
font-size:18px;
|
||||
line-height: 30px;
|
||||
/*margin-bottom: 30px;*/
|
||||
}
|
||||
.main .content{
|
||||
padding: 0 0 0 30px;
|
||||
width:750px;
|
||||
}
|
||||
.main .content .left,.main .content .right{
|
||||
width:50%;
|
||||
}
|
||||
.main a{
|
||||
display:inline-block;
|
||||
width:108px;
|
||||
height:17px;
|
||||
background: #eeeeee;
|
||||
color:#646464;
|
||||
padding:4px 0 4px 7px;
|
||||
font-size: 17px;
|
||||
line-height: 17px;
|
||||
}
|
||||
.main i{
|
||||
display:inline-block;
|
||||
width:25px;
|
||||
height:23px;
|
||||
background: url("../images/option.jpg") no-repeat 8px 8px;
|
||||
}
|
||||
.main label{
|
||||
font-size: 17px;
|
||||
}
|
||||
.main input{
|
||||
color:#686868;
|
||||
border:1px solid #cccccc;
|
||||
width:140px;
|
||||
height:15px;
|
||||
padding: 7px 0 6px 10px;
|
||||
outline: none;
|
||||
}
|
||||
.main .content div{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.main .content div.label{
|
||||
height:30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.main .content div.label label{
|
||||
display: inline-block;
|
||||
height:30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.main .content div.none{
|
||||
opacity: 0;
|
||||
}
|
||||
.main .content div.address{
|
||||
margin-top: -30px;
|
||||
}
|
||||
.main .content div.address input{
|
||||
width:410px;
|
||||
}
|
||||
.main .content div .option{
|
||||
position: relative;
|
||||
display:inline-block;
|
||||
margin-bottom: -8px;
|
||||
width:144px;
|
||||
height:24px;
|
||||
border:1px solid #cccccc;
|
||||
padding: 2px;
|
||||
}
|
||||
.main .content div .option ul{
|
||||
display:none;
|
||||
position: absolute;
|
||||
top:29px;
|
||||
left:-1px;
|
||||
width:150px;
|
||||
background: #d7e3e3;
|
||||
font-size: 17px;
|
||||
color:#333333;
|
||||
z-index: 999;
|
||||
}
|
||||
.main .content div .option ul li{
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
.main .content div .option ul li:hover{
|
||||
background: #0e8384;
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
.Main{
|
||||
width: auto;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.Main .Map{
|
||||
margin-top: 10px;
|
||||
margin-left: 300px;
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
|
||||
.bx{
|
||||
width: 870px;
|
||||
height: 890px;
|
||||
background: #eeeeee;
|
||||
position: relative;
|
||||
}
|
||||
.bx .box{
|
||||
width: 780px;
|
||||
height: 798px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.bx .box .top{
|
||||
height: 75px;
|
||||
width: 780px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.bx .box .top .left{
|
||||
float: left;
|
||||
width: 140px;
|
||||
font-size: 16px;
|
||||
color: #686868;
|
||||
margin-left: 30px;
|
||||
height: 75px;
|
||||
line-height: 75px;
|
||||
text-align: center;
|
||||
}
|
||||
.bx .box .top .right{
|
||||
float: right;
|
||||
width: 94px;
|
||||
height: 15px;
|
||||
margin-top: 50px;
|
||||
margin-right: 20px;
|
||||
font-size: 15px;
|
||||
color: #686868;
|
||||
}
|
||||
.bx .box .content{
|
||||
width: 780px;
|
||||
height: 40px;
|
||||
background: #e7f3f3;
|
||||
margin-top: 10px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.bx .box .content .left{
|
||||
width: 102px;
|
||||
height: 30px;
|
||||
|
||||
}
|
||||
.bx .box .content .left .column{
|
||||
background: url(../images/column.png) no-repeat ;
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 30px;
|
||||
margin-top: 5px;
|
||||
float: left;
|
||||
}
|
||||
.bx .box .content .left .tit{
|
||||
float: right;
|
||||
font-size: 17px;
|
||||
color: #353034;
|
||||
display: inline-block;
|
||||
}
|
||||
.bx .box .bottom{
|
||||
margin-top: 27px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.bx .box .bottom .one{
|
||||
overflow: hidden;
|
||||
height: 40px;
|
||||
width: 645px ;
|
||||
margin-bottom: 33px;
|
||||
}
|
||||
.bx .box .bottom .one .left{
|
||||
float: left;
|
||||
}
|
||||
.bx .box .bottom .one .right{
|
||||
float: right;
|
||||
}
|
||||
.bx .box .bottom .one span{
|
||||
font-size: 18px;
|
||||
color: #666666;
|
||||
}
|
||||
.bx .box .bottom input{
|
||||
width: 148px;
|
||||
height: 28px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
|
||||
.container .information-content{
|
||||
font-size: 17px;
|
||||
color: #666;
|
||||
}
|
||||
.container .content .information-title{
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
height: 75px;
|
||||
line-height: 75px;
|
||||
margin-left:30px;
|
||||
position: relative;
|
||||
}
|
||||
.container .content .information-title .fac-information{
|
||||
position: absolute;
|
||||
left:636px ;
|
||||
top:20px;
|
||||
}
|
||||
.container .content .unit-information{
|
||||
width: 100%;
|
||||
}
|
||||
.container .content .unit-information .unit{
|
||||
background: #e6f2f2;
|
||||
height:35px;
|
||||
font-size: 16px;
|
||||
margin-bottom: 30px;
|
||||
line-height: 40px;
|
||||
padding-top: 5px;
|
||||
|
||||
}
|
||||
.container .content .unit-information .unit .unit-content{
|
||||
height: 30px;
|
||||
border-left:4px solid #0e8384;
|
||||
color: #333;
|
||||
line-height: 30px;
|
||||
padding-left: 26px;
|
||||
}
|
||||
.container .content .unit-information .unit-list{
|
||||
padding-left: 30px;
|
||||
color: #666;
|
||||
}
|
||||
.container .content .unit-information .unit-list .ml{
|
||||
margin-left: 46px;
|
||||
}
|
||||
.container .content .unit-information .unit-list .list{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.container .content .unit-information .unit-list .list input{
|
||||
outline: none;
|
||||
height: 28px;
|
||||
width: 200px;
|
||||
border:1px solid #ccc;
|
||||
}
|
||||
.container .content .unit-information .unit-list .list1 input{
|
||||
width: 140px;
|
||||
}
|
||||
.information-title .bottom{
|
||||
margin-top: 20px;
|
||||
width:130px;
|
||||
padding-bottom: 94px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.information-title .bottom a{
|
||||
color:#646464;
|
||||
font-size: 15px;
|
||||
}
|
||||
.information-title .bottom .l{
|
||||
margin-right: 30px;
|
||||
|
||||
}
|
||||
.mr{
|
||||
margin-left: 87px;
|
||||
}
|
||||
.mr1{
|
||||
margin-left: -25px;
|
||||
}
|
||||
.save{
|
||||
margin-left: 30px ;
|
||||
/*color: #e6f2f2;*/
|
||||
/*font-size: 14px;*/
|
||||
}
|
||||
input{
|
||||
color: #666;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,108 @@
|
||||
.header{
|
||||
padding:30px 20px 10px 30px;
|
||||
color:#646464;
|
||||
font-size: 15px;
|
||||
}
|
||||
.header a{
|
||||
color:#646464;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.header .top{
|
||||
width:100%;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.header .bottom{
|
||||
width:130px;
|
||||
}
|
||||
.main{
|
||||
color:#686868;
|
||||
padding-bottom: 94px;
|
||||
}
|
||||
.main .title{
|
||||
padding:5px 0 5px 30px;
|
||||
height:30px;
|
||||
background: url("../images/border.png") no-repeat 0 5px;
|
||||
background-color: #e7f3f3;
|
||||
color:#333436;
|
||||
font-size:18px;
|
||||
line-height: 30px;
|
||||
/*margin-bottom: 30px;*/
|
||||
}
|
||||
.main .content{
|
||||
padding: 0 0 0 30px;
|
||||
width: 1000px;
|
||||
}
|
||||
.main .content .left,.main .content .right{
|
||||
width:50%;
|
||||
}
|
||||
.main a{
|
||||
display:inline-block;
|
||||
width:108px;
|
||||
height:17px;
|
||||
background: #eeeeee;
|
||||
color:#646464;
|
||||
padding:4px 0 4px 7px;
|
||||
font-size: 17px;
|
||||
line-height: 17px;
|
||||
}
|
||||
.main i{
|
||||
display:inline-block;
|
||||
width:25px;
|
||||
height:23px;
|
||||
background: url("../images/option.jpg") no-repeat 8px 8px;
|
||||
}
|
||||
.main label{
|
||||
font-size: 17px;
|
||||
}
|
||||
.main input{
|
||||
color:#686868;
|
||||
border:1px solid #cccccc;
|
||||
width:140px;
|
||||
height:15px;
|
||||
padding: 7px 0 6px 8px;
|
||||
outline: none;
|
||||
}
|
||||
.main input.mailbox{
|
||||
width:200px;
|
||||
}
|
||||
.main input.id{
|
||||
width:200px;
|
||||
}
|
||||
.main .content div{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.main .content div.label{
|
||||
height:30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.main .content div.label label{
|
||||
display: inline-block;
|
||||
height:30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.main .content div .option{
|
||||
position: relative;
|
||||
display:inline-block;
|
||||
margin-bottom: -8px;
|
||||
width:144px;
|
||||
height:24px;
|
||||
border:1px solid #cccccc;
|
||||
padding: 2px;
|
||||
}
|
||||
.main .content div .option ul{
|
||||
display:none;
|
||||
position: absolute;
|
||||
top:29px;
|
||||
left:-1px;
|
||||
width:150px;
|
||||
background: #d7e3e3;
|
||||
font-size: 17px;
|
||||
color:#333333;
|
||||
z-index: 999;
|
||||
}
|
||||
.main .content div .option ul li{
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
.main .content div .option ul li:hover{
|
||||
background: #0e8384;
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
.header{
|
||||
padding:30px 20px 10px 30px;
|
||||
color:#646464;
|
||||
font-size: 15px;
|
||||
}
|
||||
.header a{
|
||||
color:#646464;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.header .top{
|
||||
width:100%;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.header .bottom{
|
||||
width:130px;
|
||||
}
|
||||
.main{
|
||||
color:#686868;
|
||||
padding-bottom: 94px;
|
||||
}
|
||||
.main .title{
|
||||
padding:5px 0 5px 30px;
|
||||
height:30px;
|
||||
background: url("../images/border.png") no-repeat 0 5px;
|
||||
background-color: #e7f3f3;
|
||||
color:#333436;
|
||||
font-size:18px;
|
||||
line-height: 30px;
|
||||
/*margin-bottom: 30px;*/
|
||||
}
|
||||
.main .content{
|
||||
padding: 0 0 0 30px;
|
||||
width:750px;
|
||||
}
|
||||
.main .content .left,.main .content .right{
|
||||
width:50%;
|
||||
}
|
||||
.main label{
|
||||
font-size: 17px;
|
||||
}
|
||||
.main input{
|
||||
color:#686868;
|
||||
border:1px solid #cccccc;
|
||||
width:140px;
|
||||
height:15px;
|
||||
padding: 7px 0 6px 8px;
|
||||
outline: none;
|
||||
}
|
||||
.main input.mailbox{
|
||||
width:200px;
|
||||
}
|
||||
.main input.id{
|
||||
width:200px;
|
||||
}
|
||||
.main .content div{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.main .content div.reason{
|
||||
margin-top: -30px;
|
||||
margin-bottom: 180px;
|
||||
width:100%;
|
||||
}
|
||||
.main .content div.reason p{
|
||||
height:30px;
|
||||
line-height: 30px;
|
||||
font-size: 17px;
|
||||
}
|
||||
.main .content div.reason div{
|
||||
position: relative;
|
||||
left:90px;
|
||||
top:-30px;
|
||||
width:535px;
|
||||
height:185px;
|
||||
}
|
||||
.main .content div.reason div textarea{
|
||||
width:100%;
|
||||
height:100%;
|
||||
outline: none;
|
||||
border:1px solid #cccccc;
|
||||
resize: none;
|
||||
}
|
||||
.main .content div.statistics{
|
||||
margin-top: -30px;
|
||||
margin-bottom: 180px;
|
||||
width:100%;
|
||||
}
|
||||
.main .content div.statistics p{
|
||||
height:30px;
|
||||
line-height: 30px;
|
||||
font-size: 17px;
|
||||
}
|
||||
.main .content div.statistics div{
|
||||
position: relative;
|
||||
left:90px;
|
||||
top:-30px;
|
||||
width:535px;
|
||||
height:185px;
|
||||
}
|
||||
.main .content div.statistics div textarea{
|
||||
width:100%;
|
||||
height:100%;
|
||||
outline: none;
|
||||
border:1px solid #cccccc;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
@ -0,0 +1,134 @@
|
||||
.flgure .info{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -40px;
|
||||
}
|
||||
.content {
|
||||
position: relative;
|
||||
top:40px;
|
||||
}
|
||||
.flgure .info li {
|
||||
float: left;
|
||||
width: 150px;
|
||||
height: 38px;
|
||||
border: 1px solid #cccccc;
|
||||
background: #fff;
|
||||
color: #2f2f2f;
|
||||
border-radius: 10px 10px 0 0;
|
||||
font-size: 15px;
|
||||
line-height: 38px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.flgure ul li.active {
|
||||
background: #0f8383;
|
||||
border: 1px solid #0f8383;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.basic {
|
||||
width: 780px;
|
||||
height: 884px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.basic .basicInfo {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.basic .basicInfo #leave-statistical {
|
||||
padding-top: 20px;
|
||||
width: 335px;
|
||||
height: 265px;
|
||||
}
|
||||
|
||||
.basic .basicInfo #gender-statistical {
|
||||
width: 335px;
|
||||
height: 265px;
|
||||
}
|
||||
|
||||
.basic .basicInfo #province-statistical {
|
||||
width: 335px;
|
||||
height: 265px;
|
||||
}
|
||||
|
||||
.basic .select {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.basic .select.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.basic .basicInfo ul {
|
||||
height: 105px;
|
||||
width: 266px;
|
||||
}
|
||||
|
||||
.basic .basicInfo ul li {
|
||||
margin: 10px 0;
|
||||
font-size: 16px;
|
||||
color: #676767;
|
||||
}
|
||||
|
||||
.basic .basicInfo .leave {
|
||||
position: absolute;
|
||||
left: 55%;
|
||||
top: 105px;
|
||||
}
|
||||
|
||||
.basic .basicInfo .gender {
|
||||
position: absolute;
|
||||
left: 55%;
|
||||
top: 380px;
|
||||
}
|
||||
|
||||
.basic .basicInfo .province {
|
||||
position: absolute;
|
||||
left: 55%;
|
||||
top: 630px;
|
||||
}
|
||||
|
||||
.basic .basicInfo .province li {
|
||||
float: left;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.basic .payInfo {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.basic .payInfo #payInfo {
|
||||
width: 578px;
|
||||
height: 398px;
|
||||
left: 50%;
|
||||
margin-left: -289px;
|
||||
}
|
||||
|
||||
.basic .payInfo #payInfo1 {
|
||||
width: 578px;
|
||||
height: 398px;
|
||||
left: 50%;
|
||||
margin-left: -289px;
|
||||
}
|
||||
|
||||
#employment_industry,
|
||||
#unit_properties,
|
||||
#postgraduate_employment {
|
||||
padding-top: 20px;
|
||||
width: 700px;
|
||||
height: 265px;
|
||||
}
|
||||
|
||||
.provinceInfo span {
|
||||
position: absolute;
|
||||
top: 80%;
|
||||
left: 500px;
|
||||
color: rgb(30, 129, 193);
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
#map {
|
||||
width: 780px;
|
||||
height: 800px;
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
.flgure .info{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -40px;
|
||||
}
|
||||
.content {
|
||||
position: relative;
|
||||
top:40px;
|
||||
}
|
||||
.flgure .info li {
|
||||
float: left;
|
||||
width: 150px;
|
||||
height: 38px;
|
||||
border: 1px solid #cccccc;
|
||||
background: #fff;
|
||||
color: #2f2f2f;
|
||||
border-radius: 10px 10px 0 0;
|
||||
font-size: 15px;
|
||||
line-height: 38px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.flgure ul li.active {
|
||||
background: #0f8383;
|
||||
border: 1px solid #0f8383;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.basic {
|
||||
width: 780px;
|
||||
height: 884px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.basic .basicInfo {
|
||||
margin-left: 40px;
|
||||
padding-top: 120px;
|
||||
}
|
||||
.basic .basicInfo table{
|
||||
width: 520px;
|
||||
height: 121px;
|
||||
border: 1px solid #bac4cb;
|
||||
background: #e7f2f9;
|
||||
margin: 9px auto;
|
||||
}
|
||||
table,table tr th,table tr td{
|
||||
border: 1px solid #bac4cb;
|
||||
color: #5e686f;
|
||||
}
|
||||
.basic .basicInfo table th{
|
||||
height: 40px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.basic .basicInfo .thead{
|
||||
width: 520px;
|
||||
height: 76px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.basic .basicInfo .thead span{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
font-size: 18px;
|
||||
color: #5ca4d3;
|
||||
}
|
||||
.basic .basicInfo div p{
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #5ca4d3;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.basic .basicInfo table tr td{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.basic .basicInfo #leave-statistical {
|
||||
padding-top: 20px;
|
||||
width: 335px;
|
||||
height: 265px;
|
||||
}
|
||||
|
||||
.basic .basicInfo #gender-statistical {
|
||||
width: 335px;
|
||||
height: 265px;
|
||||
}
|
||||
|
||||
.basic .basicInfo #province-statistical {
|
||||
width: 335px;
|
||||
height: 265px;
|
||||
}
|
||||
|
||||
.basic .select {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.basic .select.active {
|
||||
display: block;
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
body,html{
|
||||
height: 100%;
|
||||
}
|
||||
.nav{
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
background: #3b3b3b;
|
||||
color: #c1c1c1;
|
||||
}
|
||||
.nav .nav-list{
|
||||
width: 100%;
|
||||
padding-top: 30px;
|
||||
}
|
||||
.nav .nav-list .nav-tit{
|
||||
width: 100%;
|
||||
line-height: 30px;
|
||||
margin-bottom: 40px;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.nav .nav-list .nav-tit:hover{
|
||||
background: #0e8384;
|
||||
}
|
||||
.nav .nav-list .nav-tit a{
|
||||
text-decoration: none;
|
||||
color: #c1c1c1;
|
||||
}
|
||||
.nav .nav-list .nav-tit img{
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.nav .nav-list .nav-tit span{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.nav .nav-list .personal-list{
|
||||
width: 90px;
|
||||
height: 80px;
|
||||
margin-left: 30px;
|
||||
margin-bottom: 40px;
|
||||
font-size: 14px;
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 55px;
|
||||
top: -35px;
|
||||
}
|
||||
.nav .nav-list .personal-list li{
|
||||
width: 100%;
|
||||
margin-bottom: 15px;
|
||||
text-align: center;
|
||||
line-height: 25px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.nav .nav-list .personal-list li a{
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
}
|
||||
.nav .nav-list .personal-list li.active{
|
||||
background: #0e8384;
|
||||
}
|
||||
.nav .nav-list .personal-list li:hover{
|
||||
background: #0e8384;
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
|
||||
.bx{
|
||||
width: 870px;
|
||||
height: 890px;
|
||||
background: #eeeeee;
|
||||
position: relative;
|
||||
}
|
||||
.bx .box{
|
||||
width: 780px;
|
||||
height: 798px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.bx .box .top{
|
||||
height: 75px;
|
||||
width: 780px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.bx .box .top .left{
|
||||
float: left;
|
||||
width: 240px;
|
||||
font-size: 16px;
|
||||
color: #686868;
|
||||
margin-left: 30px;
|
||||
height: 75px;
|
||||
line-height: 75px;
|
||||
text-align: left;
|
||||
}
|
||||
.bx .box .top .right .l,.r {
|
||||
cursor: pointer;
|
||||
}
|
||||
.bx .box .top .right{
|
||||
float: right;
|
||||
width: 94px;
|
||||
height: 15px;
|
||||
margin-top: 50px;
|
||||
margin-right: 20px;
|
||||
font-size: 15px;
|
||||
color: #686868;
|
||||
}
|
||||
.bx .box .content{
|
||||
width: 780px;
|
||||
height: 40px;
|
||||
background: #e7f3f3;
|
||||
margin-top: 10px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.bx .box .content .left{
|
||||
width: 102px;
|
||||
height: 30px;
|
||||
|
||||
}
|
||||
.bx .box .content .left .column{
|
||||
background: url(../images/column.png) no-repeat ;
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 30px;
|
||||
margin-top: 5px;
|
||||
float: left;
|
||||
}
|
||||
.bx .box .content .left .tit{
|
||||
float: right;
|
||||
font-size: 17px;
|
||||
color: #353034;
|
||||
display: inline-block;
|
||||
}
|
||||
.bx .box .bottom{
|
||||
margin-top: 27px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.bx .box .bottom .one{
|
||||
list-style: none;
|
||||
height: 40px;
|
||||
}
|
||||
.bx .box .bottom .one li{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.bx .box .bottom .one span{
|
||||
font-size: 18px;
|
||||
color: #636363;
|
||||
}
|
||||
.bx .box .bottom input{
|
||||
width: 148px;
|
||||
height: 28px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.bx .box .bottom .two{
|
||||
list-style: none;
|
||||
height: 40px;
|
||||
margin-left: 368px;
|
||||
margin-top: -40px;
|
||||
}
|
||||
.bx .box .bottom .two li{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.bx .box .bottom .two span{
|
||||
font-size: 18px;
|
||||
color: #636363;
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
|
||||
.container .information-content{
|
||||
font-size: 17px;
|
||||
color: #666;
|
||||
}
|
||||
.container .content .information-title{
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
height: 75px;
|
||||
line-height: 75px;
|
||||
margin-left:30px;
|
||||
position: relative;
|
||||
color:#666;
|
||||
}
|
||||
.container .content .information-title .fac-information{
|
||||
position: absolute;
|
||||
left:636px ;
|
||||
top:20px;
|
||||
}
|
||||
.container .content .revise-content{
|
||||
width:244px;
|
||||
margin: 0 auto;
|
||||
margin-top: 102px;
|
||||
|
||||
}
|
||||
.container .content .revise-content .list{
|
||||
color: #666;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.container .content .revise-content .list input{
|
||||
width:140px ;
|
||||
height:28px;
|
||||
border:1px solid #ccc;
|
||||
color: #666;
|
||||
outline: none;
|
||||
padding-left: 8px;
|
||||
}
|
||||
.container .content .list1{
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
border-radius: 6px;
|
||||
margin-left: 362px;
|
||||
padding-bottom: 418px;
|
||||
|
||||
}
|
||||
.container .content .list1 input{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
line-height: 30px;
|
||||
background: #177ec1;
|
||||
outline: none;
|
||||
border:none;
|
||||
color: #fff;
|
||||
font-size: 17px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-ms-border-radius:3px;
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
|
||||
.bx{
|
||||
width: 870px;
|
||||
height: 890px;
|
||||
background: #eeeeee;
|
||||
position: relative;
|
||||
}
|
||||
.bx .box{
|
||||
/*position: absolute;*/
|
||||
/*top: 30px;*/
|
||||
/*left: 30px;*/
|
||||
width: 780px;
|
||||
height: 798px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.bx .box .top{
|
||||
height: 75px;
|
||||
width: 780px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.bx .box .top .left{
|
||||
float: left;
|
||||
width: 140px;
|
||||
font-size: 16px;
|
||||
color: #686868;
|
||||
margin-left: 30px;
|
||||
height: 75px;
|
||||
line-height: 75px;
|
||||
text-align: center;
|
||||
}
|
||||
.bx .box .top .right{
|
||||
float: right;
|
||||
width: 94px;
|
||||
height: 15px;
|
||||
margin-top: 50px;
|
||||
margin-right: 20px;
|
||||
font-size: 15px;
|
||||
color: #686868;
|
||||
}
|
||||
.bx .box .content{
|
||||
width: 780px;
|
||||
height: 40px;
|
||||
background: #e7f3f3;
|
||||
margin-top: 10px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.bx .box .content .left{
|
||||
width: 102px;
|
||||
height: 30px;
|
||||
|
||||
}
|
||||
.bx .box .content .left .column{
|
||||
background: url(../images/column.png) no-repeat ;
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 30px;
|
||||
margin-top: 5px;
|
||||
float: left;
|
||||
}
|
||||
.bx .box .content .left .tit{
|
||||
float: right;
|
||||
font-size: 17px;
|
||||
color: #353034;
|
||||
display: inline-block;
|
||||
}
|
||||
.bx .box .bottom{
|
||||
margin-top: 27px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.bx .box .bottom .one{
|
||||
list-style: none;
|
||||
height: 40px;
|
||||
}
|
||||
.bx .box .bottom .one li{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.bx .box .bottom .one span{
|
||||
font-size: 18px;
|
||||
color: #636363;
|
||||
}
|
||||
.bx .box .bottom input{
|
||||
width: 148px;
|
||||
height: 28px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.bx .box .bottom .two{
|
||||
list-style: none;
|
||||
height: 40px;
|
||||
margin-left: 368px;
|
||||
margin-top: -40px;
|
||||
}
|
||||
.bx .box .bottom .two li{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.bx .box .bottom .two span{
|
||||
font-size: 18px;
|
||||
color: #636363;
|
||||
}
|
||||
@ -0,0 +1,173 @@
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
.clearfix{
|
||||
clear: both;
|
||||
display: block;
|
||||
content: '';
|
||||
}
|
||||
.clearfix:after{
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.login{
|
||||
background: url(../images/login-bg.jpg) no-repeat;
|
||||
width: 1080px;
|
||||
height: 750px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
box-shadow: 0 0 10px #ccc;
|
||||
/*behavior: url(js/pie.htc);
|
||||
-moz-border-radius:50px;
|
||||
-webkit-border-radius:50px;
|
||||
border-radius: 50px;*/
|
||||
}
|
||||
.login .content{
|
||||
width: 780px;
|
||||
height: 442px;
|
||||
/*behavior: url(js/pie.htc);*/
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius: 10px;
|
||||
background: rgba(69,152,205,0.8);
|
||||
/*filter: alpha(opacity=80);
|
||||
opacity: 0.8;
|
||||
zoom: 1;*/
|
||||
margin: 80px auto;
|
||||
padding: 148px 90px 0;
|
||||
}
|
||||
.login .content .content-left{
|
||||
width: 379px;
|
||||
float: left;
|
||||
}
|
||||
.login .content .content-left .logo{
|
||||
text-align: center;
|
||||
width: 312px;
|
||||
margin-left: 10px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
.login .content .content-left .logo img{
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
}
|
||||
.login .content .content-left .logo p{
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.login .content .shu{
|
||||
width: 2px;
|
||||
height: 100px;
|
||||
background: #fff;
|
||||
margin-top: 86px;
|
||||
float: left;
|
||||
}
|
||||
.login .content .content-right{
|
||||
width: 399px;
|
||||
float: right;
|
||||
}
|
||||
.login .content .content-right .login-form{
|
||||
margin-left: 65px;
|
||||
}
|
||||
.login .content .content-right .login-form h2{
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
}
|
||||
.login .content .content-right .login-form span{
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
}
|
||||
.login .content .content-right .login-form div select{
|
||||
width: 240px;
|
||||
height: 35px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
.login .content .content-right .login-form div select option{
|
||||
background: #eee;
|
||||
}
|
||||
.login .content .content-right .login-form div select option:hover{
|
||||
background: #0e8384;
|
||||
color: #000;
|
||||
}
|
||||
.login .content .content-right .login-form div.code input{
|
||||
width: 110px;
|
||||
height: 35px;
|
||||
}
|
||||
.login .content .content-right .login-form .identifire{
|
||||
margin-top: 29px;
|
||||
}
|
||||
.login .content .content-right .login-form .account,
|
||||
.login .content .content-right .login-form .password,
|
||||
.login .content .content-right .login-form .code{
|
||||
margin-top: 20px;
|
||||
height: 35px;
|
||||
}
|
||||
.login .content .content-right .login-form .identifire span,
|
||||
.login .content .content-right .login-form .account span,
|
||||
.login .content .content-right .login-form .password span,
|
||||
.login .content .content-right .login-form .code span{
|
||||
display: inline-block;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
float: left;
|
||||
}
|
||||
.login .content .content-right .login-form div input{
|
||||
width: 240px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
float: left;
|
||||
outline: none;
|
||||
border: none;
|
||||
/*behavior: url(js/pie.htc);*/
|
||||
-moz-border-radius:5px;
|
||||
-webkit-border-radius:5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.login .content .content-right .login-form .code em{
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: 125px;
|
||||
height: 35px;
|
||||
background: #fff;
|
||||
margin-left: 5px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
}
|
||||
.login .content .content-right .login-form .btn{
|
||||
width: 240px;
|
||||
height: 30px;
|
||||
margin-top: 29px;
|
||||
margin-left: 80px;
|
||||
}
|
||||
.login .content .content-right .login-form .btn span{
|
||||
display: block;
|
||||
width: 110px;
|
||||
height: 100%;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
background: #4fadeb;
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
/*behavior: url(js/pie.htc);*/
|
||||
-moz-border-radius:5px;
|
||||
-webkit-border-radius:5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.login .content .content-right .login-form .btn span a{
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
}
|
||||
.login .content .content-right .login-form .btn span.forget{
|
||||
margin-left: 20px;
|
||||
}
|
||||
@ -0,0 +1,156 @@
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
.clearfix{
|
||||
clear: both;
|
||||
display: block;
|
||||
content: '';
|
||||
}
|
||||
.clearfix:after{
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.login{
|
||||
background: url(../images/login-bg.jpg) no-repeat;
|
||||
width: 1080px;
|
||||
height: 750px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
box-shadow: 0 0 10px #ccc;
|
||||
/*behavior: url(js/pie.htc);
|
||||
-moz-border-radius:50px;
|
||||
-webkit-border-radius:50px;
|
||||
border-radius: 50px;*/
|
||||
}
|
||||
.login .content{
|
||||
width: 780px;
|
||||
height: 442px;
|
||||
/*behavior: url(js/pie.htc);*/
|
||||
-moz-border-radius:10px;
|
||||
-webkit-border-radius:10px;
|
||||
border-radius: 10px;
|
||||
background: rgba(69,152,205,0.8);
|
||||
/*filter: alpha(opacity=80);
|
||||
opacity: 0.8;
|
||||
zoom: 1;*/
|
||||
margin: 80px auto;
|
||||
padding: 148px 90px 0;
|
||||
}
|
||||
.login .content .content-left{
|
||||
width: 379px;
|
||||
float: left;
|
||||
}
|
||||
.login .content .content-left .logo{
|
||||
text-align: center;
|
||||
width: 312px;
|
||||
margin-left: 10px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
.login .content .content-left .logo img{
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
}
|
||||
.login .content .content-left .logo p{
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.login .content .shu{
|
||||
width: 2px;
|
||||
height: 100px;
|
||||
background: #fff;
|
||||
margin-top: 86px;
|
||||
float: left;
|
||||
}
|
||||
.login .content .content-right{
|
||||
width: 399px;
|
||||
float: right;
|
||||
}
|
||||
.login .content .content-right .login-form{
|
||||
width: 380px;
|
||||
margin-left: 65px;
|
||||
}
|
||||
.login .content .content-right .login-form h2{
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
}
|
||||
.login .content .content-right .login-form span{
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
}
|
||||
.login .content .content-right .login-form div.code input{
|
||||
width: 110px;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.login .content .content-right .login-form .identifire,
|
||||
.login .content .content-right .login-form .account,
|
||||
.login .content .content-right .login-form .password,
|
||||
.login .content .content-right .login-form .code{
|
||||
margin-top: 20px;
|
||||
height: 35px;
|
||||
}
|
||||
.login .content .content-right .login-form .identifire span,
|
||||
.login .content .content-right .login-form .account span,
|
||||
.login .content .content-right .login-form .password span,
|
||||
.login .content .content-right .login-form .code span{
|
||||
display: inline-block;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
float: left;
|
||||
}
|
||||
.login .content .content-right .login-form div input{
|
||||
width: 240px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
float: left;
|
||||
outline: none;
|
||||
border: none;
|
||||
/*behavior: url(js/pie.htc);*/
|
||||
-moz-border-radius:5px;
|
||||
-webkit-border-radius:5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.login .content .content-right .login-form .code em{
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: 125px;
|
||||
height: 35px;
|
||||
background: #fff;
|
||||
margin-left: 5px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
}
|
||||
.login .content .content-right .login-form .btn{
|
||||
width: 240px;
|
||||
height: 30px;
|
||||
margin-top: 29px;
|
||||
margin-left: 150px;
|
||||
}
|
||||
.login .content .content-right .login-form .btn span{
|
||||
display: block;
|
||||
width: 150px;
|
||||
height: 100%;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
background: #4fadeb;
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
/*behavior: url(js/pie.htc);*/
|
||||
-moz-border-radius:5px;
|
||||
-webkit-border-radius:5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.login .content .content-right .login-form .btn span a{
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
|
||||
.wrap{
|
||||
width: 730px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.school-msg{
|
||||
width: 780px;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
margin: 30px auto;
|
||||
padding: 30px 0;
|
||||
}
|
||||
.school-msg .pos-set{
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
.school-msg .pos-set p{
|
||||
text-align: right;
|
||||
}
|
||||
.school-msg .pos-set p span{
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
}
|
||||
.school-msg .basics-msg{
|
||||
height: 40px;
|
||||
background: #e6f2f2;
|
||||
margin-top: 10px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.school-msg .basics-msg p{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
border-left: 4px solid #0e8384;
|
||||
padding-left: 22px;
|
||||
display: inline-block;
|
||||
}
|
||||
.school-msg .basics-list{
|
||||
padding-top: 30px;
|
||||
padding-left: 22px;
|
||||
}
|
||||
.school-msg .basics-list li{
|
||||
width: 365px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
color: #666;
|
||||
color: 16px;
|
||||
list-style: none;
|
||||
margin-bottom: 30px;
|
||||
float: left;
|
||||
}
|
||||
.school-msg .basics-list li input{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.school-msg .basics-list li .inp-border{
|
||||
width: 178px;
|
||||
height: 28px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
.search-box{
|
||||
width: 680px;
|
||||
height: 38px;
|
||||
position: relative;
|
||||
left: 50%;
|
||||
top: 60px;
|
||||
margin-left: -340px;
|
||||
}
|
||||
.search-box .search-inp{
|
||||
width: 578px;
|
||||
height: 100%;
|
||||
border: 1px solid #333;
|
||||
padding-left: 20px;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
.search-box .search-inp input{
|
||||
border: none;
|
||||
outline: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
.search-box .search-btn{
|
||||
width: 60px;
|
||||
height: 40px;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
float: right;
|
||||
}
|
||||
.search-box .search-btn button{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #82b6d7;
|
||||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
.search-box .search-res{
|
||||
width: 578px;
|
||||
background: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-top: none;
|
||||
padding-left: 20px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 40px;
|
||||
display: none;
|
||||
}
|
||||
.search-box .search-res li{
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
line-height: 40px;
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
.search-bar{
|
||||
width: 682px;
|
||||
height:42px;
|
||||
line-height: 42px;
|
||||
margin: 60px 0 0 76px;
|
||||
}
|
||||
.content{
|
||||
background: none;
|
||||
}
|
||||
.search-bar .bar-content{
|
||||
width: 599px;
|
||||
height: 40px;
|
||||
border:1px solid #333;
|
||||
background: url("../images/sousuo.png") no-repeat 18px center;
|
||||
background-color: #fff;
|
||||
}
|
||||
.search-bar .bar-content input{
|
||||
height: 40px;
|
||||
width: 540px;
|
||||
outline: none;
|
||||
border: none;
|
||||
line-height: 40px;
|
||||
}
|
||||
.search-bar .search-font{
|
||||
display: block;
|
||||
width: 60px;
|
||||
height: 42px;
|
||||
background: #82b6d7;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
line-height: 42px;
|
||||
text-align: center;
|
||||
}
|
||||
.search-bar .word{
|
||||
font-size: 18px;
|
||||
color: #666;
|
||||
height: 53px;
|
||||
line-height: 53px;
|
||||
}
|
||||
.search-bar .list{
|
||||
width: 100%;
|
||||
}
|
||||
.search-bar .list ul{
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
|
||||
}
|
||||
.search-bar .list ul li{
|
||||
float: left;
|
||||
width: 80px;
|
||||
height: 100%;
|
||||
background: #d8e3e9;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
font-size: 16px;
|
||||
color:#666;
|
||||
border-radius: 15px;
|
||||
margin-right: 30px;
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
.search-content{
|
||||
position: absolute;
|
||||
top:50%;
|
||||
left: 50%;
|
||||
width: 234px;
|
||||
height:140px;
|
||||
margin-left: -117px;
|
||||
margin-top: -70px;
|
||||
text-align: center;
|
||||
}
|
||||
.search-content img{
|
||||
width: 172px;
|
||||
height:84px;
|
||||
}
|
||||
.search-content p{
|
||||
font-size: 18px;
|
||||
color: #177ec1;
|
||||
margin-top: 22px;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
.search-content{
|
||||
position: absolute;
|
||||
top:50%;
|
||||
left: 50%;
|
||||
width: 234px;
|
||||
height:140px;
|
||||
margin-left: -117px;
|
||||
margin-top: -70px;
|
||||
text-align: center;
|
||||
}
|
||||
.search-content img{
|
||||
width: 128px;
|
||||
height:92px;
|
||||
}
|
||||
.search-content p{
|
||||
font-size: 18px;
|
||||
color: #177ec1;
|
||||
margin-top: 22px;
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
.fail{
|
||||
width:870px;
|
||||
position: relative;
|
||||
height:860px;
|
||||
background: #eeeeee;
|
||||
}
|
||||
.submit{
|
||||
width: 400px;
|
||||
height: 270px;
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
top:270px;
|
||||
left:234px;
|
||||
text-align: center;
|
||||
/*overflow: hidden;*/
|
||||
}
|
||||
.submit .submit-box{
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 70px;
|
||||
}
|
||||
.submit .submit-pic{
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
border-radius: 50%;
|
||||
background: #177ec1;
|
||||
color: #fff;
|
||||
font-size: 40px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
line-height: 90px;
|
||||
display: inline-block;
|
||||
}
|
||||
.submit p{
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #177ec1;
|
||||
font-weight: bold;
|
||||
letter-spacing: 5px;
|
||||
margin-top: 20px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.1 MiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 404 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 344 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,355 @@
|
||||
function data(id,text,data) { //学生基本信息饼图
|
||||
var dom = document.getElementById(id);
|
||||
var myChart = echarts.init(dom);
|
||||
var app = {};
|
||||
var color = ['#784feb', '#88d3ce'];
|
||||
if(id=='gender-statistical'){
|
||||
color = ['#5272ed', '#be8fdd'];
|
||||
}else if(id=='province-statistical'){
|
||||
color = ['#5188ec', '#de8f94','#dc8fd3', '#c28fdc','#8fdddd']
|
||||
}
|
||||
option = null;
|
||||
option = {
|
||||
title : {
|
||||
text: text,
|
||||
// subtext: '纯属虚构',
|
||||
x:'center',
|
||||
y:'bottom',
|
||||
textStyle: {
|
||||
fontSize: 15,
|
||||
fontWeight: 'normal',
|
||||
color:'#343434'
|
||||
}
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
color:color,
|
||||
series : [
|
||||
{
|
||||
name: text,
|
||||
type: 'pie',
|
||||
radius: ['40%', '65%'],
|
||||
center: ['50%', '50%'],
|
||||
data:data,
|
||||
itemStyle: {
|
||||
normal:{
|
||||
label:{
|
||||
show:true,
|
||||
formatter: '{b} : {c} \n ({d}%)'
|
||||
},
|
||||
labelLine:{
|
||||
show:true
|
||||
}
|
||||
},
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
;
|
||||
if (option && typeof option === "object") {
|
||||
myChart.setOption(option, true);
|
||||
}
|
||||
}
|
||||
function payInfoData(id,text,payData,Yname,Xname,data) { //薪资基本信息柱状图
|
||||
var dom = document.getElementById(id);
|
||||
var myChart = echarts.init(dom);
|
||||
var app = {};
|
||||
var color = '#774fea';
|
||||
if(id=='payInfo'){
|
||||
color = '#774fea';
|
||||
}else {
|
||||
color = '#5171ec';
|
||||
}
|
||||
|
||||
option = null;
|
||||
app.title = '坐标轴刻度与标签对齐';
|
||||
option = {
|
||||
color: [color],
|
||||
title : {
|
||||
text:text,
|
||||
// subtext: '纯属虚构',
|
||||
x:'center',
|
||||
y:'bottom',
|
||||
textStyle: {
|
||||
fontSize: 15,
|
||||
fontStyle: 'normal',
|
||||
fontWeight: 'normal',
|
||||
color:'#343434'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
tooltip : {
|
||||
},
|
||||
grid: {
|
||||
bottom: '10%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis : [
|
||||
{
|
||||
splitLine:{show: false},
|
||||
type : 'category',
|
||||
name:Xname,
|
||||
|
||||
nameLocation:'end',
|
||||
data :payData,
|
||||
axisLabel: {
|
||||
color:'#000'
|
||||
},
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
},
|
||||
nameTextStyle:{
|
||||
color:'#000'
|
||||
},
|
||||
axisLine:{
|
||||
lineStyle:{
|
||||
color:color,
|
||||
width:4
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
splitLine:{show: false},
|
||||
type : 'value',
|
||||
name:Yname,
|
||||
nameTextStyle:{
|
||||
color:'#000'
|
||||
},
|
||||
axisLabel: {
|
||||
color:'#000'
|
||||
},
|
||||
axisLine:{
|
||||
lineStyle:{
|
||||
color:color,
|
||||
width:4
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
series:{
|
||||
name:Yname,
|
||||
type:'bar',
|
||||
barWidth: '50%',
|
||||
color:color,
|
||||
data:data,
|
||||
label:{
|
||||
normal:{
|
||||
show:true, //显示数字
|
||||
position: 'top',
|
||||
color:'#000'//这里可以自己选择位置
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
;
|
||||
if (option && typeof option === "object") {
|
||||
myChart.setOption(option, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getEcharts(id, title, adata, acolor, sname, aDirect, sX, sTitleLeft) { //就业信息饼图
|
||||
var myChart = echarts.init(document.getElementById(id));
|
||||
option = {
|
||||
title: {
|
||||
text: title,
|
||||
bottom: '-2%',
|
||||
left: sTitleLeft,
|
||||
textStyle: {
|
||||
color: '#333',
|
||||
fontSize: 15,
|
||||
fontWeight: 'normal'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b}: {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
x: sX,
|
||||
y: '70%',
|
||||
align: 'left',
|
||||
top: '20%',
|
||||
itemGap: 30,
|
||||
itemWidth: 30,
|
||||
itemHeight: 16,
|
||||
textStyle: {
|
||||
fontSize: 15,
|
||||
color: '#666'
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: sname,
|
||||
type: 'pie',
|
||||
center: aDirect,
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
normal: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
fontSize: '16',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
normal: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
data: adata,
|
||||
color: acolor
|
||||
}]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
}
|
||||
|
||||
function getEchartsMap() { //工作省份地图
|
||||
var myChart = echarts.init(document.getElementById('map'));
|
||||
var app = {};
|
||||
option = null;
|
||||
var data = [
|
||||
{ name: '北京', value: 30 },
|
||||
{ name: '郑州', value: 38 },
|
||||
{ name: '石家庄', value: 43 },
|
||||
{ name: '重庆', value: 54 },
|
||||
{ name: '西安', value: 54 },
|
||||
{ name: '上海', value: 54 }
|
||||
];
|
||||
|
||||
var geoCoordMap = {
|
||||
'北京': [116.46, 39.92],
|
||||
'郑州': [113.65, 34.76],
|
||||
'石家庄': [114.48, 38.03],
|
||||
'重庆': [106.54, 29.59],
|
||||
'西安': [108.95, 34.27],
|
||||
'上海': [121.48, 31.22]
|
||||
};
|
||||
|
||||
function convertData(data) {
|
||||
var res = [];
|
||||
for(var i = 0; i < data.length; i++) {
|
||||
var geoCoord = geoCoordMap[data[i].name];
|
||||
if(geoCoord) {
|
||||
res.push({
|
||||
name: data[i].name,
|
||||
value: geoCoord.concat(data[i].value)
|
||||
});
|
||||
}
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
option = {
|
||||
tooltip: {},
|
||||
visualMap: {
|
||||
show: false,
|
||||
inRange: {
|
||||
color: '#fff'
|
||||
}
|
||||
},
|
||||
geo: {
|
||||
map: 'china',
|
||||
roam: true,
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: '#929292',
|
||||
fontSize: 8
|
||||
}
|
||||
}
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
borderColor: 'rgba(0, 0, 0, 0.2)'
|
||||
},
|
||||
emphasis: {
|
||||
areaColor: null,
|
||||
shadowOffsetX: 0,
|
||||
shadowOffsetY: 0,
|
||||
shadowBlur: 20,
|
||||
borderWidth: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'scatter',
|
||||
coordinateSystem: 'geo',
|
||||
data: convertData(data),
|
||||
symbolSize: 15,
|
||||
symbol: 'image://images/pin_2.svg',
|
||||
symbolRotate: 0,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: 'red'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '就业地区',
|
||||
type: 'map',
|
||||
geoIndex: 0,
|
||||
data: [
|
||||
{ name: '北京', value: 120 },
|
||||
{ name: '天津', value: 58 },
|
||||
{ name: '上海', value: 78 },
|
||||
{ name: '重庆', value: 53 },
|
||||
{ name: '河北', value: 27 },
|
||||
{ name: '河南', value: 58 },
|
||||
{ name: '云南', value: 58 },
|
||||
{ name: '辽宁', value: 58 },
|
||||
{ name: '黑龙江', value: 58 },
|
||||
{ name: '湖南', value: 58 },
|
||||
{ name: '安徽', value: 58 },
|
||||
{ name: '山东', value: 58 },
|
||||
{ name: '新疆', value: 58 },
|
||||
{ name: '江苏', value: 58 },
|
||||
{ name: '浙江', value: 58 },
|
||||
{ name: '江西', value: 58 },
|
||||
{ name: '湖北', value: 58 },
|
||||
{ name: '广西', value: 58 },
|
||||
{ name: '甘肃', value: 58 },
|
||||
{ name: '山西', value: 58 },
|
||||
{ name: '内蒙古', value: 58 },
|
||||
{ name: '陕西', value: 58 },
|
||||
{ name: '吉林', value: 58 },
|
||||
{ name: '福建', value: 58 },
|
||||
{ name: '贵州', value: 58 },
|
||||
{ name: '广东', value: 58 },
|
||||
{ name: '青海', value: 58 },
|
||||
{ name: '西藏', value: 58 },
|
||||
{ name: '四川', value: 58 },
|
||||
{ name: '宁夏', value: 58 },
|
||||
{ name: '海南', value: 58 },
|
||||
{ name: '台湾', value: 58 },
|
||||
{ name: '香港', value: 58 },
|
||||
{ name: '澳门', value: 58 }
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
if(option && typeof option === "object") {
|
||||
myChart.setOption(option, true);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
app.title = '环形图';
|
||||
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b}: {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
x: 'left',
|
||||
data:['农林业','互联网','金融','建筑','服务行业','事业机关单位','教育科研','其他']
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name:'访问来源',
|
||||
type:'pie',
|
||||
radius: ['50%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
normal: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
fontSize: '30',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
normal: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
data:[
|
||||
{value:75, name:'农林业'},
|
||||
{value:25, name:'互联网'},
|
||||
{value:25, name:'金融'},
|
||||
{value:75, name:'建筑'},
|
||||
{value:75, name:'服务行业'},
|
||||
{value:75, name:'事业机关单位'},
|
||||
{value:25, name:'教育科研'},
|
||||
{value:25, name:'其他'}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -0,0 +1,11 @@
|
||||
/node_modules
|
||||
/oh_modules
|
||||
/local.properties
|
||||
/.idea
|
||||
**/build
|
||||
/.hvigor
|
||||
.cxx
|
||||
/.clangd
|
||||
/.clang-format
|
||||
/.clang-tidy
|
||||
**/.test
|
||||
@ -0,0 +1,10 @@
|
||||
{
|
||||
"app": {
|
||||
"bundleName": "com.example.takeaway",
|
||||
"vendor": "example",
|
||||
"versionCode": 1000000,
|
||||
"versionName": "1.0.0",
|
||||
"icon": "$media:app_icon",
|
||||
"label": "$string:app_name"
|
||||
}
|
||||
}
|
||||