Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
sample-form-platform
Commits
4fd9ebea
Commit
4fd9ebea
authored
Aug 02, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
a3a631aa
1d0ee3f6
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
168 additions
and
17 deletions
+168
-17
sample-form-client-ui/admin/.env.development
sample-form-client-ui/admin/.env.development
+1
-0
sample-form-client-ui/admin/.env.production
sample-form-client-ui/admin/.env.production
+1
-1
sample-form-client-ui/admin/src/App.vue
sample-form-client-ui/admin/src/App.vue
+26
-2
sample-form-client-ui/admin/src/api/index.js
sample-form-client-ui/admin/src/api/index.js
+23
-0
sample-form-client-ui/admin/src/assets/img/tingyong.png
sample-form-client-ui/admin/src/assets/img/tingyong.png
+0
-0
sample-form-client-ui/admin/src/components/EnabledDev.vue
sample-form-client-ui/admin/src/components/EnabledDev.vue
+44
-0
sample-form-client-ui/admin/src/components/Header.vue
sample-form-client-ui/admin/src/components/Header.vue
+17
-0
sample-form-client-ui/admin/src/pages/layouts/Layouts.vue
sample-form-client-ui/admin/src/pages/layouts/Layouts.vue
+14
-6
sample-form-client-ui/admin/src/pages/searchpage/SearchPage.vue
...-form-client-ui/admin/src/pages/searchpage/SearchPage.vue
+31
-8
sample-form-client-ui/admin/src/store/index.js
sample-form-client-ui/admin/src/store/index.js
+11
-0
No files found.
sample-form-client-ui/admin/.env.development
View file @
4fd9ebea
#开发环境
#开发环境
NODE_ENV = "development"
NODE_ENV = "development"
VUE_APP_API_BASE_URL=http://192.168.0.98:8090
VUE_APP_API_BASE_URL=http://192.168.0.98:8090
VUE_APP_API_PHP_URL=http://192.168.0.98:8090
#VUE_APP_API_BASE_URL=http://192.168.0.98:11071/zwfw
#VUE_APP_API_BASE_URL=http://192.168.0.98:11071/zwfw
#VUE_APP_API_BASE_URL=http://192.168.0.98:11023
#VUE_APP_API_BASE_URL=http://192.168.0.98:11023
#VUE_APP_API_BASE_URL=http://192.168.0.217:17311
#VUE_APP_API_BASE_URL=http://192.168.0.217:17311
\ No newline at end of file
sample-form-client-ui/admin/.env.production
View file @
4fd9ebea
#生产环境
#生产环境
NODE_ENV = "production"
NODE_ENV = "production"
VUE_APP_API_
BASE_URL=/basics_api
VUE_APP_API_
PHP_URL=/zwfw_api/
sample-form-client-ui/admin/src/App.vue
View file @
4fd9ebea
...
@@ -2,19 +2,22 @@
...
@@ -2,19 +2,22 @@
<div
class=
"app"
>
<div
class=
"app"
>
<router-view></router-view>
<router-view></router-view>
<NetworkError
:isShowError=
"isShowError"
></NetworkError>
<NetworkError
:isShowError=
"isShowError"
></NetworkError>
<EnabledDev
:enabled=
"enabled"
></EnabledDev>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
local
from
"
@/utils/local
"
;
import
local
from
"
@/utils/local
"
;
import
NetworkError
from
"
@/components/NetworkError.vue
"
;
import
NetworkError
from
"
@/components/NetworkError.vue
"
;
import
EnabledDev
from
"
@/components/EnabledDev.vue
"
;
import
mq
from
"
@/mixin/mq
"
;
import
mq
from
"
@/mixin/mq
"
;
import
{
getHomeInfo
,
getSkinList
}
from
"
@/api
"
;
import
{
getHomeInfo
,
getSkinList
,
getDeviceList
}
from
"
@/api
"
;
import
{
mapMutations
}
from
"
vuex
"
;
import
{
mapMutations
}
from
"
vuex
"
;
export
default
{
export
default
{
mixins
:
[
mq
],
mixins
:
[
mq
],
components
:
{
components
:
{
NetworkError
,
NetworkError
,
EnabledDev
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -22,10 +25,12 @@ export default {
...
@@ -22,10 +25,12 @@ export default {
devicenum
:
""
,
devicenum
:
""
,
linkDom
:
null
,
// 换皮
linkDom
:
null
,
// 换皮
isShowError
:
false
,
isShowError
:
false
,
enabled
:
1
,
};
};
},
},
watch
:
{
watch
:
{
"
$route.path
"
(
newVal
)
{
"
$route.path
"
(
newVal
)
{
this
.
getDeviceList
();
if
(
newVal
==
"
/
"
||
newVal
==
"
/home
"
)
{
if
(
newVal
==
"
/
"
||
newVal
==
"
/home
"
)
{
this
.
getHomeInfo
();
this
.
getHomeInfo
();
this
.
getSetinfo
();
this
.
getSetinfo
();
...
@@ -59,7 +64,7 @@ export default {
...
@@ -59,7 +64,7 @@ export default {
},
},
serviceInfo
:
{
serviceInfo
:
{
homeUrl
:
"
http://192.168.0.24:8080/#/
"
,
homeUrl
:
"
http://192.168.0.24:8080/#/
"
,
serverUrl
:
"
http://1
92.168.0.98
:11078/
"
,
serverUrl
:
"
http://1
12.19.80.237
:11078/
"
,
},
},
devicenum
:
"
18-93-7F-C0-AD-B5
"
,
devicenum
:
"
18-93-7F-C0-AD-B5
"
,
// devicenum: "B8-13-32-86-9F-04",
// devicenum: "B8-13-32-86-9F-04",
...
@@ -79,6 +84,7 @@ export default {
...
@@ -79,6 +84,7 @@ export default {
window
.
addEventListener
(
"
offline
"
,
()
=>
{
window
.
addEventListener
(
"
offline
"
,
()
=>
{
this
.
isShowError
=
true
;
this
.
isShowError
=
true
;
});
});
this
.
getDevInfo
();
},
},
methods
:
{
methods
:
{
...
mapMutations
([
...
mapMutations
([
...
@@ -148,6 +154,24 @@ export default {
...
@@ -148,6 +154,24 @@ export default {
}
}
}
}
},
},
async
getDeviceList
()
{
let
res
=
await
getDeviceList
({
page
:
1
,
size
:
-
1
,
});
if
(
res
.
data
.
code
==
1
)
{
let
{
data
}
=
res
.
data
.
data
;
if
(
!
data
.
length
)
return
;
let
{
enabled
}
=
data
[
0
];
this
.
enabled
=
enabled
;
}
},
// 轮询设备状态
getDevInfo
()
{
this
.
timer
=
setInterval
(()
=>
{
this
.
getDeviceList
();
},
1000
*
60
);
},
},
},
};
};
</
script
>
</
script
>
...
...
sample-form-client-ui/admin/src/api/index.js
View file @
4fd9ebea
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
local
from
"
@/utils/local
"
;
import
local
from
"
@/utils/local
"
;
import
request
from
"
@/utils/request
"
;
import
request
from
"
@/utils/request
"
;
import
store
from
"
@/store
"
;
import
store
from
"
@/store
"
;
let
PHP_URL
=
process
.
env
.
VUE_APP_API_PHP_URL
;
// 首页数据展示
// 首页数据展示
export
const
getHomeInfo
=
(
data
)
=>
{
export
const
getHomeInfo
=
(
data
)
=>
{
let
baseUrl
=
local
.
getLocal
(
"
serverUrl
"
);
let
baseUrl
=
local
.
getLocal
(
"
serverUrl
"
);
...
@@ -114,3 +115,25 @@ export const getSkinList = (data) => {
...
@@ -114,3 +115,25 @@ export const getSkinList = (data) => {
data
,
data
,
});
});
};
};
// 排队编号查询对应事项
export
const
getMatterForFlownum
=
(
params
)
=>
{
// let baseUrl = local.getLocal("serverUrl");
return
request
({
url
:
`
${
PHP_URL
}
api/matter/matterForFlownum`
,
method
:
"
get
"
,
params
,
});
};
//获取设备列表
export
const
getDeviceList
=
(
data
)
=>
{
let
baseUrl
=
local
.
getLocal
(
"
serverUrl
"
);
let
deviceCode
=
local
.
getLocal
(
"
devicenum
"
);
return
request
({
url
:
`
${
baseUrl
}
sampleform/device/list`
,
method
:
"
post
"
,
data
:
{
deviceCode
,
...
data
,
},
});
};
sample-form-client-ui/admin/src/assets/img/tingyong.png
0 → 100644
View file @
4fd9ebea
29 KB
sample-form-client-ui/admin/src/components/EnabledDev.vue
0 → 100644
View file @
4fd9ebea
<
template
>
<div
class=
"enabled"
v-show=
"!enabled"
>
<div
class=
"enabled_box"
>
<img
class=
"enabled_img"
src=
"../assets/img/tingyong.png"
/>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
enabled
:
{
type
:
Number
,
required
:
true
,
default
:
1
,
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.enabled {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.2);
position: fixed;
top: 0px;
left: 0px;
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
.enabled_box {
width: 400px;
height: 400px;
background-color: #fff;
border-radius: 4px;
.enabled_img {
width: 100%;
height: 100%;
}
}
}
</
style
>
\ No newline at end of file
sample-form-client-ui/admin/src/components/Header.vue
View file @
4fd9ebea
<
template
>
<
template
>
<div
class=
"header flex aic jcc main-title-bg-img"
>
<div
class=
"header flex aic jcc main-title-bg-img"
>
<div
class=
"count-down"
>
系统将在
<span>
{{
times
}}
</span>
秒后返回首页
</div>
<slot
name=
"title"
class=
"title"
>
<slot
name=
"title"
class=
"title"
>
<div></div>
<div></div>
</slot>
</slot>
...
@@ -13,10 +16,14 @@
...
@@ -13,10 +16,14 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapGetters
}
from
"
vuex
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{};
return
{};
},
},
computed
:
{
...
mapGetters
([
"
times
"
]),
},
created
()
{},
created
()
{},
methods
:
{
methods
:
{
handleBack
()
{
handleBack
()
{
...
@@ -37,6 +44,16 @@ export default {
...
@@ -37,6 +44,16 @@ export default {
background-size: 100% 100%;
background-size: 100% 100%;
// background: var(--main-theme-color);
// background: var(--main-theme-color);
box-shadow: 0px 2px 6px 6px #ccc;
box-shadow: 0px 2px 6px 6px #ccc;
.count-down {
position: absolute;
left: 40px;
// color: var(--main-h1-color);
color: #fff;
font-size: 24px;
// span {
// color: var(--main-theme-color);
// }
}
.right-box {
.right-box {
position: absolute;
position: absolute;
right: 40px;
right: 40px;
...
...
sample-form-client-ui/admin/src/pages/layouts/Layouts.vue
View file @
4fd9ebea
...
@@ -5,21 +5,29 @@
...
@@ -5,21 +5,29 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapMutations
,
mapGetters
}
from
"
vuex
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{};
return
{};
},
},
computed
:
{
...
mapGetters
([
"
times
"
,
"
defaultTimes
"
]),
},
created
()
{
created
()
{
this
.
isTimeOut
();
this
.
isTimeOut
();
},
},
methods
:
{
methods
:
{
...
mapMutations
([
"
SET_times
"
]),
// 返回首页
// 返回首页
startTimer
()
{
startTimer
()
{
let
that
=
this
;
clearInterval
(
this
.
timeOut
);
clearInterval
(
that
.
timeOut
);
this
.
SET_times
(
this
.
defaultTimes
);
this
.
timeOut
=
setTimeout
(
function
()
{
this
.
timeOut
=
setInterval
(()
=>
{
that
.
$router
.
push
({
path
:
"
/
"
});
if
(
this
.
times
==
0
)
{
},
1000
*
60
*
5
);
this
.
$router
.
push
({
path
:
"
/
"
});
}
this
.
SET_times
(
this
.
times
-
1
);
},
1000
);
},
},
// 无任何操作返回首页
// 无任何操作返回首页
isTimeOut
()
{
isTimeOut
()
{
...
@@ -40,7 +48,7 @@ export default {
...
@@ -40,7 +48,7 @@ export default {
document
.
body
.
removeEventListener
(
"
keyup
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
keyup
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
click
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
click
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
touchend
"
,
this
.
startTimer
);
document
.
body
.
removeEventListener
(
"
touchend
"
,
this
.
startTimer
);
clear
Timeout
(
this
.
timeOut
);
clear
Interval
(
this
.
timeOut
);
},
},
};
};
</
script
>
</
script
>
...
...
sample-form-client-ui/admin/src/pages/searchpage/SearchPage.vue
View file @
4fd9ebea
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
:
key
=
"
'list' + item
"
:
key
=
"
'list' + item
"
><
/div
>
><
/div
>
<
/div
>
<
/div
>
<
el
-
empty
class
=
"
empty
"
:
image
-
size
=
"
200
"
v
-
else
><
/el-e
mpty
>
<
YEmpty
v
-
else
width
=
"
400
"
><
/YE
mpty
>
<!--
分页
-->
<!--
分页
-->
<
div
class
=
"
tac
"
>
<
div
class
=
"
tac
"
>
<
el
-
pagination
<
el
-
pagination
...
@@ -104,13 +104,15 @@ import Header from "@/components/Header.vue";
...
@@ -104,13 +104,15 @@ import Header from "@/components/Header.vue";
import
PageTop
from
"
@/components/PageTop.vue
"
;
import
PageTop
from
"
@/components/PageTop.vue
"
;
import
SearchBox
from
"
@/components/SearchBox.vue
"
;
import
SearchBox
from
"
@/components/SearchBox.vue
"
;
import
MateralsList
from
"
@/components/MateralsList.vue
"
;
import
MateralsList
from
"
@/components/MateralsList.vue
"
;
import
{
getSampleformMatterList
}
from
"
@/api
"
;
import
YEmpty
from
"
@/components/YEmpty.vue
"
;
import
{
getSampleformMatterList
,
getMatterForFlownum
}
from
"
@/api
"
;
export
default
{
export
default
{
components
:
{
components
:
{
Header
,
Header
,
PageTop
,
PageTop
,
SearchBox
,
SearchBox
,
MateralsList
,
MateralsList
,
YEmpty
,
}
,
}
,
data
()
{
data
()
{
return
{
return
{
...
@@ -128,40 +130,61 @@ export default {
...
@@ -128,40 +130,61 @@ export default {
}
;
}
;
}
,
}
,
created
()
{
created
()
{
this
.
getSampleformMatterList
();
this
.
typeSearch
();
// this.getAllmaterials();
// this.getAllmaterials();
}
,
}
,
watch
:
{
watch
:
{
searchVal
(
newVal
)
{
searchVal
(
newVal
)
{
if
(
newVal
===
""
)
{
if
(
newVal
===
""
)
{
this
.
current
=
1
;
this
.
current
=
1
;
this
.
getSampleformMatterList
();
this
.
typeSearch
();
}
}
}
,
}
,
}
,
}
,
methods
:
{
methods
:
{
// 区分搜索
async
typeSearch
()
{
let
reg
=
/^
[\u
4e00-
\u
9fa5
]
+$/
;
if
(
reg
.
test
(
this
.
searchVal
)
||
this
.
searchVal
==
""
)
{
this
.
getSampleformMatterList
(
this
.
searchVal
);
}
else
{
await
this
.
getMatterForFlownum
(
this
.
searchVal
);
}
}
,
// 获取事项列表
// 获取事项列表
async
getSampleformMatterList
()
{
async
getSampleformMatterList
(
matterFullName
)
{
let
res
=
await
getSampleformMatterList
({
let
res
=
await
getSampleformMatterList
({
page
:
this
.
current
,
page
:
this
.
current
,
size
:
this
.
size
,
size
:
this
.
size
,
isTerminal
:
1
,
isTerminal
:
1
,
matterFullName
:
this
.
searchVal
,
matterFullName
,
}
);
}
);
let
{
total
,
matterDatumTotal
,
data
}
=
res
.
data
.
data
;
let
{
total
,
matterDatumTotal
,
data
}
=
res
.
data
.
data
;
this
.
matterList
=
data
;
this
.
matterList
=
data
;
this
.
total
=
total
;
this
.
total
=
total
;
this
.
matterDatumTotal
=
matterDatumTotal
;
this
.
matterDatumTotal
=
matterDatumTotal
;
}
,
}
,
// 排队编号获取事项
async
getMatterForFlownum
(
flownum
)
{
let
matterFullName
=
""
;
let
res
=
await
getMatterForFlownum
({
flownum
}
);
if
(
res
.
data
.
code
==
1
)
{
let
{
data
}
=
res
.
data
.
data
;
if
(
data
.
length
)
{
matterFullName
=
data
[
0
].
matterName
;
this
.
getSampleformMatterList
(
matterFullName
);
}
}
}
,
// 搜索
// 搜索
handleSearch
()
{
handleSearch
()
{
this
.
current
=
1
;
this
.
current
=
1
;
this
.
getSampleformMatterList
();
this
.
typeSearch
();
}
,
}
,
// 分页
// 分页
changePage
(
cur
)
{
changePage
(
cur
)
{
this
.
current
=
cur
;
this
.
current
=
cur
;
this
.
getSampleformMatterList
();
this
.
typeSearch
();
}
,
}
,
// 查看
// 查看
handleCheck
(
row
)
{
handleCheck
(
row
)
{
...
...
sample-form-client-ui/admin/src/store/index.js
View file @
4fd9ebea
...
@@ -12,11 +12,19 @@ export default new Vuex.Store({
...
@@ -12,11 +12,19 @@ export default new Vuex.Store({
datumList
:
[],
// 首页材料
datumList
:
[],
// 首页材料
matterList
:
[],
// 首页事项
matterList
:
[],
// 首页事项
deviceCode
:
""
,
// 设备编码
deviceCode
:
""
,
// 设备编码
times
:
300
,
// 倒计时时间
defaultTimes
:
300
,
// 倒计时时间
},
},
getters
:
{
getters
:
{
deviceCode
(
state
)
{
deviceCode
(
state
)
{
return
state
.
deviceCode
;
return
state
.
deviceCode
;
},
},
times
(
state
)
{
return
state
.
times
;
},
defaultTimes
(
state
)
{
return
state
.
defaultTimes
;
},
},
},
mutations
:
{
mutations
:
{
SET_devicenum
(
state
,
devicenum
)
{
SET_devicenum
(
state
,
devicenum
)
{
...
@@ -34,6 +42,9 @@ export default new Vuex.Store({
...
@@ -34,6 +42,9 @@ export default new Vuex.Store({
SET_deviceCode
(
state
,
deviceCode
)
{
SET_deviceCode
(
state
,
deviceCode
)
{
state
.
deviceCode
=
deviceCode
;
state
.
deviceCode
=
deviceCode
;
},
},
SET_times
(
state
,
times
)
{
state
.
times
=
times
;
},
},
},
actions
:
{},
actions
:
{},
modules
:
{},
modules
:
{},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment