Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_zhxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_zhxy
Commits
b3123e62
Commit
b3123e62
authored
Aug 24, 2023
by
peijy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8.24 校产管理
parent
50341b1c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
416 additions
and
243 deletions
+416
-243
components.d.ts
+1
-0
src/App.vue
+1
-1
src/service/home.js
+1
-2
src/service/schoolProperty.js
+9
-9
src/service/utils.js
+11
-7
src/store/index.js
+3
-2
src/utils/axios.js
+5
-0
src/utils/scanCode.js
+77
-52
src/views/login/login.vue
+142
-122
src/views/parent/studentCourseSelection/index.vue
+0
-0
src/views/public/questionnaire/questionnairedetail.vue
+25
-4
src/views/tabbar/GardenIntr.vue
+12
-5
src/views/tabbar/TeacherInfo.vue
+13
-4
src/views/tabbar/main/index.vue
+17
-5
src/views/teacher/schoolProperty/borrowList.vue
+16
-5
src/views/teacher/schoolProperty/deviceList.vue
+18
-6
src/views/teacher/schoolProperty/deviceListInfo.vue
+1
-0
src/views/teacher/schoolProperty/equipmentFix.vue
+33
-3
src/views/teacher/schoolProperty/equipmentFixDetail.vue
+1
-0
src/views/teacher/schoolProperty/index.vue
+12
-10
src/views/teacher/schoolProperty/returnList.vue
+17
-3
src/views/teacher/schoolProperty/useList.vue
+1
-3
No files found.
components.d.ts
View file @
b3123e62
...
...
@@ -32,6 +32,7 @@ declare module '@vue/runtime-core' {
VanIcon
:
typeof
import
(
'vant/es'
)[
'Icon'
]
VanImage
:
typeof
import
(
'vant/es'
)[
'Image'
]
VanList
:
typeof
import
(
'vant/es'
)[
'List'
]
VanLoading
:
typeof
import
(
'vant/es'
)[
'Loading'
]
VanNavBar
:
typeof
import
(
'vant/es'
)[
'NavBar'
]
VanPicker
:
typeof
import
(
'vant/es'
)[
'Picker'
]
VanPopover
:
typeof
import
(
'vant/es'
)[
'Popover'
]
...
...
src/App.vue
View file @
b3123e62
...
...
@@ -2,7 +2,7 @@
<router-view>
</router-view>
</
template
>
<
script
setup
>
//
var vConsole = new VConsole();
var
vConsole
=
new
VConsole
();
</
script
>
<
style
lang=
"less"
>
html
{
...
...
src/service/home.js
View file @
b3123e62
...
...
@@ -1371,4 +1371,4 @@ export function getTotalDay(query) {
method
:
"get"
,
params
:
query
,
});
}
\ No newline at end of file
}
src/service/schoolProperty.js
View file @
b3123e62
...
...
@@ -6,15 +6,15 @@ import axios from "../utils/axios";
/********** 获取wx.config 所需参数 ***********/
export
function
getWxConfig
(
url
)
{
return
axios
.
get
(
`wx/getsignature
/
?url=
${
url
}
`
);
return
axios
.
get
(
`wx/getsignature?url=
${
url
}
`
);
}
/********** 物品借用 ***********/
//个人借用记录列表
export
function
getBorrowList
(
borrowById
)
{
return
axios
.
get
(
`
wx/equipment/getMyBorrowList/
${
borrowById
}
`
);
export
function
getBorrowList
(
borrowById
,
equipmentName
)
{
return
axios
.
get
(
`
/wx/equipment/getMyBorrowList/?borrowById=
${
borrowById
}
&equipmentName=
${
equipmentName
}
`
);
}
//扫码借用获取设备基本信息
...
...
@@ -37,8 +37,8 @@ export function checkBorrowDetail(id) {
/********** 物品归还(管理员) ***********/
//管理员物品列表查看
export
function
getEquipmentList
(
managerId
)
{
return
axios
.
get
(
`wx/equipment/getMyBorrowList/
${
managerId
}
`
);
export
function
getEquipmentList
(
userId
,
equipmentName
)
{
return
axios
.
get
(
`wx/equipment/getMyBorrowList/
?userId=
${
userId
}
&equipmentName=
${
equipmentName
}
`
);
}
//借用物品记录详情查看-克隆
...
...
@@ -81,8 +81,8 @@ export function getRepairName() {
}
//报修个人记录列表
export
function
getDeviceList
(
reportRepairid
)
{
return
axios
.
get
(
`wx/equipment/getMaintenanceList/
${
reportRepairid
}
`
);
export
function
getDeviceList
(
reportRepairid
,
equipmentName
)
{
return
axios
.
get
(
`wx/equipment/getMaintenanceList/
?reportRepairid=
${
reportRepairid
}
&equipmentName=
${
equipmentName
}
`
);
}
//新增报修
...
...
@@ -127,8 +127,8 @@ export function deletEuipemnt(id) {
/********** 设备维修 ***********/
//维修工作列表
export
function
getMaintenanceList
()
{
return
axios
.
get
(
'wx/equipment/getMaintenanceUserList'
);
export
function
getMaintenanceList
(
equipmentName
)
{
return
axios
.
get
(
`wx/equipment/getMaintenanceUserList/?equipmentName=
${
equipmentName
}
`
);
}
//报修记录详情-克隆
...
...
src/service/utils.js
View file @
b3123e62
import
axios
from
"../utils/axios"
;
export
function
getUrlKey
(
name
)
{
console
.
log
(
location
.
href
);
console
.
log
(
'location.href'
,
location
.
href
);
return
(
decodeURIComponent
(
(
new
RegExp
(
"[?|&]"
+
name
+
"="
+
"([^&;]+?)(&|#|;|$)"
).
exec
(
...
...
@@ -14,17 +14,21 @@ export function getUrlKey(name) {
export
function
getCodeApi
()
{
//获取code
console
.
log
(
window
)
console
.
log
(
'window'
,
window
)
let
urlNow
=
encodeURIComponent
(
window
.
location
.
href
);
// let urlNow = encodeURIComponent(window.location.origin);
console
.
log
(
'urlNow'
,
urlNow
)
// let urlNow = encodeURIComponent("https://muyecunios.top");
// let scope='snsapi_userinfo'; //snsapi_userinfo snsapi_base //静默授权 用户无感知
//appId测试:wx765a55464b308d13 appId正式:wx977825b5a132b74d
let
url
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid="
+
"wx977825b5a132b74d
"
+
"&redirect_uri="
+
urlNow
+
"&response_type=code&scope=snsapi_base
#wechat_redirect"
;
"https://open.weixin.qq.com/connect/oauth2/authorize?appid="
+
"wx765a55464b308d13
"
+
"&redirect_uri="
+
urlNow
+
"&response_type=code&scope=snsapi_base&state=de992d7087bb4ac1bfca11fb7082985d&connect_redirect=1
#wechat_redirect"
;
window
.
location
.
href
=
url
;
console
.
log
(
'url'
,
url
)
}
export
function
getopid
(
code
)
{
...
...
src/store/index.js
View file @
b3123e62
...
...
@@ -2,7 +2,8 @@ import { createStore } from "vuex";
export
default
createStore
({
state
:
{
appid
:
"wx765a55464b308d13"
,
// 公众号的AppID 2023-08-14
appid
:
"wx765a55464b308d13"
,
// 公众号的AppID 2023-08-14 测试的
// appid : "wx977825b5a132b74d", // 公众号的AppID 正式的
imgUrl
:
"http://43.143.63.140"
,
studentId
:
""
,
//学生Id
studentName
:
""
,
//学生姓名
...
...
@@ -329,7 +330,7 @@ export default createStore({
},
editopenId
(
state
,
payload
)
{
//修改首页顶部图片轮播
console
.
log
(
payload
);
console
.
log
(
'payload'
,
payload
);
state
.
openId
=
payload
;
},
editTerm
(
state
,
payload
)
{
...
...
src/utils/axios.js
View file @
b3123e62
...
...
@@ -13,6 +13,8 @@ import {getToken} from "@/utils/auth";
import
{
tansParams
}
from
"@/utils/common"
;
axios
.
defaults
.
baseURL
=
"/school"
;
// axios.defaults.baseURL = "/houduan";
// axios.defaults.baseURL = "/schoolnw";
// process.env.NODE_ENV == "development" ? "https://y32025c600.goho.co" : "//43.143.63.140:8095";
// process.env.NODE_ENV == "development"
...
...
@@ -114,6 +116,9 @@ axios.interceptors.response.use(
}
if
(
res
.
data
.
code
!=
200
)
{
console
.
log
(
res
.
data
);
if
(
res
.
data
.
code
==
2000
){
return
res
.
data
}
// if (res.data.message) Toast.fail(res.data.message);
if
(
res
.
data
.
code
==
401
)
{
router
.
push
({
path
:
"/"
});
...
...
src/utils/scanCode.js
View file @
b3123e62
import
{
getWxConfig
,
scanEquipmentInfo
}
from
"../service/schoolProperty"
;
import
wx
from
"weixin-js-sdk"
;
//调用微信相关
import
Vue
from
'vue'
;
import
{
useRouter
}
from
"vue-router"
;
import
router
from
"@/router/index.js"
/***
* Date:2023-08-14
* Describe:用于调取微信扫码
* */
export
function
scanCodeFun
(
appId
,
type
){
console
.
log
(
'appId'
,
appId
)
let
url
=
location
.
href
.
split
(
'#'
)[
0
]
//获取当前域名
let
encode
=
''
console
.
log
(
'location'
,
location
)
getWxConfig
(
url
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
const
data
=
res
.
data
...
...
@@ -24,61 +28,82 @@ export function scanCodeFun(appId,type){
// 必填,签名,见附录1
signature
:
data
.
signature
,
// 必填,需要使用的JS接口列表,所有JS接口列表见附录2
jsApiList
:
[
'scanQRCode'
]
jsApiList
:
[
'scanQRCode'
],
});
wx
.
scanQRCode
({
needResult
:
0
,
// 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
scanType
:
[
"qrCode"
,
"barCode"
],
// 可以指定扫二维码还是一维码,默认二者都有
success
:
function
(
res
)
{
encode
=
res
.
resultStr
;
// 当needResult 为 1 时,扫码返回的结果
if
(
type
=
0
){
//校产管理页面扫码显示设备信息
router
.
push
({
path
:
"/schoolProperty/equipmentInfo"
,
query
:
{
encode
:
encode
// setTimeout(()=>{
wx
.
ready
(
function
()
{
console
.
log
(
666
)
wx
.
checkJsApi
({
jsApiList
:
[
// 所有要调用的 API 都要加到这个列表中
'scanQRCode'
],
success
:
function
(
res
){
wx
.
scanQRCode
({
needResult
:
1
,
// 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
scanType
:
[
"qrCode"
,
"barCode"
],
// 可以指定扫二维码还是一维码,默认二者都有
success
:
function
(
res
)
{
console
.
log
(
777
)
encode
=
res
.
resultStr
;
// 当needResult 为 1 时,扫码返回的结果
if
(
type
==
0
){
// 校产管理页面扫码显示设备信息
router
.
push
({
path
:
"/schoolProperty/equipmentInfo"
,
query
:
{
encode
:
encode
}
})
}
if
(
type
==
1
){
// 物品借用
router
.
push
({
path
:
"/schoolProperty/borrow/detail"
,
query
:{
encode
:
encode
}
});
};
if
(
type
==
2
){
// 归还管理
router
.
push
({
path
:
"/schoolProperty/return/detail"
,
query
:{
encode
:
encode
}
});
};
if
(
type
==
3
){
// 物品领用
router
.
push
({
path
:
"/schoolProperty/use/add"
,
query
:{
encode
:
encode
}
});
};
if
(
type
==
4
){
// 设备报修
router
.
push
({
path
:
"/schoolProperty/device/info"
,
query
:{
encode
:
encode
,
name
:
'新增'
}
});
}
},
fail
:
function
(
res
){
console
.
log
(
'fail'
,
res
)
}
})
}
if
(
type
=
1
){
// 物品借用
router
.
push
({
path
:
"/schoolProperty/borrow/detail"
,
query
:{
encode
:
encode
}
});
};
if
(
type
=
2
){
// 归还管理
router
.
push
({
path
:
"/schoolProperty/return/detail"
,
query
:{
encode
:
encode
}
});
};
if
(
type
=
3
){
// 物品领用
router
.
push
({
path
:
"/schoolProperty/use/add"
,
query
:{
encode
:
encode
}
});
};
if
(
type
=
4
){
// 设备报修
router
.
push
({
path
:
"/schoolProperty/device/info"
,
query
:{
encode
:
encode
,
name
:
'新增'
}
});
}
}
})
})
});
// },3000)
}
})
// return encode
}
src/views/login/login.vue
View file @
b3123e62
<
template
>
<div
class=
"bg_color"
>
<div
class=
"bg_top"
>
<div
class=
"bg_top_til"
>
智慧校园云平台
</div>
<div
class=
"bg_top_bla"
>
<text
class=
"bg_top_text"
>
家校互动
</text>
<div
class=
"bg_top_bt"
></div>
<text
class=
"bg_top_text"
>
架起家校连接的桥梁
</text>
</div>
<!--
<div
class=
"bg_top_bla"
>
<text
class=
"bg_top_text"
>
信息采集
</text>
</div>
-->
</div>
<div
class=
"main"
>
<van-form
@
submit=
"onSubmit"
ref=
"loginForm"
>
<div
class=
"flex_center sw"
>
<text
class=
"sw_text_jz flex_center"
:class=
"
{ sw_true: checked }"
@click="changeTyoe"
>
家长
</text>
<text
class=
"sw_text_jzg flex_center"
:class=
"
{ sw_text_true: !checked }"
@click="changeTyoe"
>
教职工
</text>
</div>
<van-field
v-model=
"studentName"
v-show=
"parentShow"
name=
"studentName"
class=
"studentName"
left-icon=
"user-circle-o"
type=
"text"
placeholder=
"输入学生姓名"
:rules=
"[
{ required: true, message: '请填写学生姓名' }]"
/>
<van-field
v-model=
"studentIdCard"
v-show=
"parentShow"
name=
"idcard"
left-icon=
"idcard"
type=
"text"
placeholder=
"输入学生身份证号"
:rules=
"[
{
validator: validator,
// required: true,
// message: message,
},
]"
/>
<van-field
v-show=
"teacherShow"
v-model=
"phonenumber"
left-icon=
"phone-o"
name=
"phonenumber"
type=
"text"
placeholder=
"手机号码"
></van-field>
<van-field
v-model=
"parentName"
v-show=
"parentShow"
name=
"parentName"
left-icon=
"contact"
type=
"text"
placeholder=
"输入家长姓名"
:rules=
"[
{ required: true, message: '请填写家长姓名' }]"
/>
<van-field
v-model=
"password"
v-show=
"teacherShow"
name=
"password"
left-icon=
"contact"
type=
"password"
placeholder=
"请输入密码"
:rules=
"[
{ required: true, message: '请输入密码' }]"
/>
<van-field
v-show=
"parentShow"
v-model=
"state.parentTelephone"
name=
"parentTelephone"
left-icon=
"phone-o"
placeholder=
"输入手机号"
:rules=
"[
{ required: true, message: '请填写手机号' }]"
/>
<div
style=
"
margin: 16px 0;
display: flex;
position: relative;
justify-content: center;
align-items: center;
"
>
<van-button
style=
"margin: 0 45px"
round
block
color=
"linear-gradient(90deg, #80d6ff 0%, #14b2fe 100%)"
type=
"danger"
class=
"submit"
native-type=
"submit"
@
click=
"onSubmit"
>
账号绑定
</van-button>
</div>
</van-form>
<van-loading
style=
"margin:0 auto;height: 100vh;display:flex;align-items: center;justify-content: center"
v-if=
"displayStyle == '0'"
vertical
text-color=
"#0094ff"
color=
"#0094ff"
>
加载中...
</van-loading>
<div
v-else
>
<div
class=
"bg_top"
>
<div
class=
"bg_top_til"
>
智慧校园云平台
</div>
<div
class=
"bg_top_bla"
>
<text
class=
"bg_top_text"
>
家校互动
</text>
<div
class=
"bg_top_bt"
></div>
<text
class=
"bg_top_text"
>
架起家校连接的桥梁
</text>
</div>
<!--
<div
class=
"bg_top_bla"
>
<text
class=
"bg_top_text"
>
信息采集
</text>
</div>
-->
</div>
<div
class=
"main"
>
<van-form
@
submit=
"onSubmit"
ref=
"loginForm"
>
<div
class=
"flex_center sw"
>
<text
class=
"sw_text_jz flex_center"
:class=
"
{ sw_true: checked }"
@click="changeTyoe"
>
家长
</text>
<text
class=
"sw_text_jzg flex_center"
:class=
"
{ sw_text_true: !checked }"
@click="changeTyoe"
>
教职工
</text>
</div>
<van-field
v-model=
"studentName"
v-show=
"parentShow"
name=
"studentName"
class=
"studentName"
left-icon=
"user-circle-o"
type=
"text"
placeholder=
"输入学生姓名"
:rules=
"[
{ required: true, message: '请填写学生姓名' }]"
/>
<van-field
v-model=
"studentIdCard"
v-show=
"parentShow"
name=
"idcard"
left-icon=
"idcard"
type=
"text"
placeholder=
"输入学生身份证号"
:rules=
"[
{
validator: validator,
// required: true,
// message: message,
},
]"
/>
<van-field
v-show=
"teacherShow"
v-model=
"phonenumber"
left-icon=
"phone-o"
name=
"phonenumber"
type=
"text"
placeholder=
"手机号码"
></van-field>
<van-field
v-model=
"parentName"
v-show=
"parentShow"
name=
"parentName"
left-icon=
"contact"
type=
"text"
placeholder=
"输入家长姓名"
:rules=
"[
{ required: true, message: '请填写家长姓名' }]"
/>
<van-field
v-model=
"password"
v-show=
"teacherShow"
name=
"password"
left-icon=
"contact"
type=
"password"
placeholder=
"请输入密码"
:rules=
"[
{ required: true, message: '请输入密码' }]"
/>
<van-field
v-show=
"parentShow"
v-model=
"state.parentTelephone"
name=
"parentTelephone"
left-icon=
"phone-o"
placeholder=
"输入手机号"
:rules=
"[
{ required: true, message: '请填写手机号' }]"
/>
<div
style=
"
margin: 16px 0;
display: flex;
position: relative;
justify-content: center;
align-items: center;
"
>
<van-button
style=
"margin: 0 45px"
round
block
color=
"linear-gradient(90deg, #80d6ff 0%, #14b2fe 100%)"
type=
"danger"
class=
"submit"
native-type=
"submit"
@
click=
"onSubmit"
>
账号绑定
</van-button>
</div>
</van-form>
</div>
</div>
<van-image
style=
"background: #e7f4fb; position: absolute; bottom: 0; height: auto"
...
...
@@ -123,9 +128,10 @@
</
template
>
<
script
>
import
{
reactive
,
onMounted
,
toRefs
}
from
"vue"
;
import
{
handleCode
}
from
"@/service/home.js"
import
{
reactive
,
onMounted
,
toRefs
,
onBeforeMount
,
nextTick
}
from
"vue"
;
import
{
ref
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useRoute
,
useRouter
}
from
"vue-router"
;
import
{
useStore
}
from
"vuex"
;
import
{
formatDatetime
,
formatDate
,
isEmpty
}
from
"@/utils/time.js"
;
// eslint-disable-next-line no-unused-vars
...
...
@@ -186,14 +192,22 @@ export default {
];
const
router
=
useRouter
();
const
store
=
useStore
();
onMounted
(
async
()
=>
{
getToken
();
if
(
process
.
env
.
NODE_ENV
!=
"development"
)
{
const
route
=
useRoute
();
let
displayStyle
=
ref
(
'0'
)
onMounted
(
()
=>
{
console
.
log
(
'displayStyle'
,
displayStyle
.
value
)
getToken
()
// if (process.env.NODE_ENV != "development") {
let
code
=
getUrlKey
(
"code"
);
if
(
isEmpty
(
code
))
getCodeApi
();
console
.
log
(
'code'
,
code
)
if
(
isEmpty
(
code
))
getCodeApi
()
;
else
checkOpenIdOrWxCookie
();
}
// }
// loadData();
// const res = await getCode();
...
...
@@ -312,7 +326,7 @@ export default {
type
:
state
.
loginType
,
});
if
(
result
.
code
==
=
200
)
{
if
(
result
.
code
==
200
)
{
setToken
(
result
.
token
);
setParentTelephone
(
state
.
parentTelephone
);
...
...
@@ -363,12 +377,17 @@ export default {
let
appid
=
"wx977825b5a132b74d"
;
let
openId
;
let
code
=
getUrlKey
(
"code"
);
console
.
log
(
code
);
console
.
log
(
'code'
,
code
);
let
result
=
await
getopid
(
code
);
console
.
log
(
result
);
openId
=
result
.
openId
;
store
.
commit
(
"openId"
,
openId
);
store
.
commit
(
"
edit
openId"
,
openId
);
state
.
openId
=
openId
;
nextTick
(()
=>
{
displayStyle
.
value
=
'1'
console
.
log
(
'displayStyle.value'
,
displayStyle
.
value
)
})
// 接收到openId 进行判断 如果与本地 localStorage 中存储的 userInfo 中的openId 一致,表示登陆过,直接进入主页
// var getUserInfo = JSON.parse(localStorage.getItem("userInfo"));
// if (
...
...
@@ -410,6 +429,7 @@ export default {
onConfirmGradeClass
,
checked
,
gocj
,
displayStyle
};
}
/* end setup */
,
};
...
...
src/views/parent/studentCourseSelection/index.vue
View file @
b3123e62
This diff is collapsed.
Click to expand it.
src/views/public/questionnaire/questionnairedetail.vue
View file @
b3123e62
...
...
@@ -195,7 +195,7 @@
>
<div
class=
"van-image van-uploader__preview-image"
>
<img
:src=
"item.
picData
"
:src=
"item.
userAnswer
"
class=
"van-image__img"
style=
"object-fit: cover"
/>
<!----><!---->
...
...
@@ -303,6 +303,7 @@ const finished = ref(false);
const
refreshing
=
ref
(
false
);
const
pageNum
=
ref
(
0
);
const
detail
=
JSON
.
parse
(
decodeURIComponent
(
route
.
query
.
detail
));
console
.
log
(
'detail'
,
detail
)
const
id
=
detail
.
id
;
const
examName
=
detail
.
examName
;
const
getdisplay
=
()
=>
{
...
...
@@ -349,6 +350,7 @@ const onLoad = async () => {
pageSize
:
10
,
});
if
(
result
.
code
==
200
)
{
console
.
log
(
'调查'
,
result
)
for
(
let
index
=
0
;
index
<
result
.
rows
.
length
;
index
++
)
{
if
(
detail
.
ryZdzt
==
"1"
&&
result
.
rows
[
index
].
userAnswer
)
{
result
.
rows
[
index
].
nrLx
==
"1"
...
...
@@ -357,8 +359,27 @@ const onLoad = async () => {
])
:
""
;
// result.rows[index].nrLx == "3"
// ? (result.rows[index].userAnswer = result.rows[index].userAnswer)
// ? (result.rows[index].userAnswer =
window.location.origin + '/csimges/'+
result.rows[index].userAnswer)
// : "";
if
(
result
.
rows
[
index
].
nrLx
==
"3"
){
console
.
log
(
'result.rows[index].userAnswer '
,
result
.
rows
[
index
].
userAnswer
)
console
.
log
(
'111'
,
result
.
rows
[
index
].
userAnswer
.
indexOf
(
window
.
location
.
origin
)
==
0
)
if
(
result
.
rows
[
index
].
userAnswer
.
indexOf
(
window
.
location
.
origin
)
==
0
){
result
.
rows
[
index
].
userAnswer
=
result
.
rows
[
index
].
userAnswer
}
else
{
result
.
rows
[
index
].
userAnswer
=
window
.
location
.
origin
+
'/csimges/'
+
result
.
rows
[
index
].
userAnswer
}
}
// if(result.rows[index].nrLx == "3"){
// console.log('111',result.rows[index].userAnswer.indexOf(window.location.origin))
// if(result.rows[index].userAnswer.indexOf(window.location.origin)){
// result.rows[index].userAnswer = result.rows[index].userAnswer
// }else{
// result.rows[index].userAnswer = window.location.origin + '/csimges/'+result.rows[index].userAnswer
// }
// }else{
// result.rows[index].userAnswer = ""
// }
}
}
list
.
value
.
push
(...
result
.
rows
);
...
...
@@ -409,7 +430,7 @@ function getFileURL(file) {
const
afterRead
=
async
(
file
)
=>
{
file
.
status
=
"uploading"
;
file
.
message
=
"上传中..."
;
// console.log(
file);
console
.
log
(
'file'
,
file
);
Toast
.
loading
({
duration
:
50000
,
message
:
"上传中..."
,
...
...
@@ -424,7 +445,7 @@ const afterRead = async (file) => {
if
(
result
.
code
==
200
)
{
// state.imgUrl = file.content;
list
.
value
[
Number
(
file
.
target
.
name
)].
userAnswer
=
result
.
url
;
list
.
value
[
Number
(
file
.
target
.
name
)].
userAnswer
=
window
.
location
.
origin
+
'/csimges/'
+
result
.
url
;
list
.
value
[
Number
(
file
.
target
.
name
)].
picData
=
url
;
Toast
.
clear
();
}
else
{
...
...
src/views/tabbar/GardenIntr.vue
View file @
b3123e62
...
...
@@ -35,8 +35,8 @@ font-size: 14px;border-radius:16px;border:0"
<van-grid
:border=
"true"
:column-num=
"2"
>
<!--
<div
v-for=
"item in picListNoTop"
:key=
"item.id"
>
-->
<van-grid-item
v-for=
"
item
in state.picList"
:key=
"i
tem.id
"
v-for=
"
(item,index)
in state.picList"
:key=
"i
ndex
"
icon=
"photo-o"
text=
"教学楼"
class=
"main_tab_1_item"
...
...
@@ -44,8 +44,8 @@ font-size: 14px;border-radius:16px;border:0"
<van-image
width=
"100%"
class=
"main_tab_item_imag"
v-bind:src=
"item
.picUrl
"
@
click=
"ImagePreviewclick(item
.picUrl
)"
v-bind:src=
"item"
@
click=
"ImagePreviewclick(item)"
ref=
"root"
/>
<span
class=
"main_tab_item_span"
>
{{
item
.
picName
}}
</span>
...
...
@@ -337,7 +337,14 @@ const onGetPics = async () => {
let
result
=
await
schoolPiclist
();
if
(
result
.
code
==
200
)
{
let
getData
=
result
.
data
;
state
.
picList
=
getData
;
console
.
log
(
'href'
,
window
.
location
)
const
href
=
window
.
location
.
origin
const
url
=
getData
.
map
(
item
=>
{
return
href
+
'/csimges/'
+
item
})
console
.
log
(
'url'
,
url
)
state
.
picList
=
url
;
console
.
log
(
''
)
}
else
if
(
result
.
code
==
500
)
{
Toast
(
"获取信息失败!"
);
return
;
...
...
src/views/tabbar/TeacherInfo.vue
View file @
b3123e62
...
...
@@ -271,6 +271,7 @@ export default {
const
loadData
=
async
()
=>
{
console
.
log
(
"加载数据"
);
state
.
imgUrl
=
store
.
state
.
userInfo
.
avatar
;
console
.
log
(
'userInfo'
,
store
.
state
.
userInfo
)
};
onMounted
(
async
()
=>
{
loadData
();
...
...
@@ -317,10 +318,18 @@ export default {
//删除所有
//localStorage.clear();
Toast
.
success
(
"退出成功"
);
router
.
push
({
path
:
"/login"
,
query
:
{},
});
console
.
log
(
'openId'
,
store
)
// window.open('http://www.dyzmxx.com/zhxygzh')
//测试服务器
console
.
log
(
'window'
,
window
)
window
.
location
.
href
=
window
.
location
.
origin
// router.replace({
// path: "/login",
// query: {
// isLogout:1
// },
// });
})
.
catch
(()
=>
{});
})
...
...
src/views/tabbar/main/index.vue
View file @
b3123e62
...
...
@@ -4,12 +4,12 @@
<van-swipe
:autoplay=
"5000"
lazy-render
>
<van-swipe-item
class=
"m_top"
v-for=
"
item
in state.picList"
:key=
"i
tem.picUrl
"
v-for=
"
(item,index)
in state.picList"
:key=
"i
ndex
"
>
<van-image
class=
"m_top_image"
:src=
"item
.picUrl
"
:src=
"item"
fit=
"cover"
width=
"100%"
height=
"100%"
...
...
@@ -490,6 +490,9 @@ import { Toast } from "vant";
import
{
useRouter
}
from
"vue-router"
;
import
{
formatDate
}
from
"@/utils/time"
;
// import Tabbar from "@/components/tabbar";
import
image1
from
"@/assets/swiper1.jpeg"
import
image2
from
"@/assets/swiper2.jpeg"
import
axios
from
"axios"
;
import
{
schoolPiclist
,
...
...
@@ -541,8 +544,11 @@ export default {
const
loadData
=
async
()
=>
{
console
.
log
(
"加载数据"
,
store
);
goCalendar
();
state
.
picList
=
store
.
state
.
schoolPiclist
||
(
await
getSchoolPiclist
());
getCalendarId
();
// state.picList = store.state.schoolPiclist || (await getSchoolPiclist());
state
.
picList
=
[
image1
,
image2
]
if
(
!
store
.
state
.
userLoginType
)
{
getuserInfo
();
}
else
{
...
...
@@ -606,12 +612,15 @@ export default {
courseStartTime
.
value
=
result
.
data
.
startTime
;
courseEndTime
.
value
=
result
.
data
.
endTime
;
flag
.
value
=
result
.
data
.
flag
}
if
(
result
.
code
==
2000
){
}
if
(
result
.
code
==
2000
){
noCourse
.
value
=
true
console
.
log
(
'noCourse.value'
,
noCourse
.
value
)
}
}
//点击学生选课
const
toCourseSelect
=
()
=>
{
console
.
log
(
'noCourse.value '
,
noCourse
.
value
)
// console.log('flag.value',flag.value)
if
(
noCourse
.
value
==
true
){
Toast
(
"当前没有选课任务!"
);
...
...
@@ -632,6 +641,8 @@ export default {
}
else
{
teacherShow
.
value
=
true
;
}
const
avatar
=
userInfo
.
avatar
userInfo
.
avatar
=
window
.
location
.
origin
+
'/csimges/'
+
avatar
store
.
commit
(
"editUserLoginType"
,
userInfo
.
type
);
store
.
commit
(
"editUserOpenId"
,
userInfo
.
userOpenId
);
store
.
commit
(
"editStudentId"
,
userInfo
.
studentId
);
...
...
@@ -641,6 +652,7 @@ export default {
store
.
commit
(
"editTeacherId"
,
userInfo
.
teacherId
);
store
.
commit
(
"editTeacherName"
,
userInfo
.
teacherName
);
store
.
commit
(
"edituserInfo"
,
userInfo
);
console
.
log
(
'userInfo'
,
userInfo
)
onInitData
();
}
};
...
...
src/views/teacher/schoolProperty/borrowList.vue
View file @
b3123e62
<
template
>
<van-nav-bar
title=
"物品借用"
left-text=
"返回"
left-arrow
@
click-left=
"goback"
></van-nav-bar>
<div
class=
"flexBLock searchBlock"
>
<van-search
class=
"searchInput"
v-model=
"searchKey"
placeholder=
"请输入搜索关键词"
/>
<van-search
class=
"searchInput"
@
search=
"onSearch"
v-model=
"searchKey"
placeholder=
"请输入搜索关键词"
/>
<van-icon
name=
"scan"
@
click=
"getCode"
/>
</div>
<van-pull-refresh
v-model=
"pullLoading"
@
refresh=
"onRefresh"
>
...
...
@@ -45,11 +45,11 @@ const list = ref([]);
const
pullLoading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
pageNum
=
ref
(
0
);
const
equipmentName
=
ref
(
''
)
//扫码获取
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
1
)
//获取到的设备自编码
// let enCode = scanCodeFun(store.state.appid,1) //获取到的设备自编码
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
1
)
//获取到的设备自编码
//测试
// router.push({
// path: "/schoolProperty/borrow/detail",
...
...
@@ -66,7 +66,7 @@ const getList = async() => {
pageNum
.
value
=
0
;
pullLoading
.
value
=
false
;
}
let
result
=
await
getBorrowList
(
id
)
let
result
=
await
getBorrowList
(
id
,
equipmentName
.
value
)
console
.
log
(
'result'
,
result
)
if
(
result
.
code
==
200
){
loading
.
value
=
false
;
...
...
@@ -79,7 +79,18 @@ const getList = async() => {
return
;
}
}
const
onSearch
=
async
(
val
)
=>
{
list
.
value
=
[];
loading
.
value
=
true
;
equipmentName
.
value
=
val
let
searchResult
=
await
getBorrowList
(
id
,
equipmentName
.
value
);
console
.
log
(
'searchResult'
,
searchResult
)
if
(
searchResult
.
code
==
200
){
loading
.
value
=
false
;
list
.
value
=
searchResult
.
data
finished
.
value
=
true
}
}
//跳转详情页面
const
toDetailPage
=
(
id
)
=>
{
console
.
log
(
'id'
,
id
)
...
...
src/views/teacher/schoolProperty/deviceList.vue
View file @
b3123e62
...
...
@@ -51,6 +51,8 @@ const loading = ref(false)
const
list
=
ref
([]);
const
pullLoading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
equipmentName
=
ref
(
''
)
onMounted
(
()
=>
{
});
...
...
@@ -61,7 +63,7 @@ const getList = async () => {
pageNum
.
value
=
0
;
pullLoading
.
value
=
false
;
}
let
result
=
await
getDeviceList
(
id
)
let
result
=
await
getDeviceList
(
id
,
equipmentName
.
value
)
console
.
log
(
'result'
,
result
)
if
(
result
.
code
==
200
){
loading
.
value
=
false
;
...
...
@@ -75,19 +77,29 @@ const getList = async () => {
}
}
//搜索
const
onSearch
=
(
val
)
=>
{
console
.
log
(
'搜索val'
,
val
)
const
onSearch
=
async
(
val
)
=>
{
list
.
value
=
[];
loading
.
value
=
true
;
finished
.
value
=
false
;
equipmentName
.
value
=
val
let
searchResult
=
await
getDeviceList
(
id
,
equipmentName
.
value
);
console
.
log
(
'searchResult'
,
searchResult
)
if
(
searchResult
.
code
==
200
){
loading
.
value
=
false
;
list
.
value
=
searchResult
.
data
finished
.
value
=
true
}
}
//扫码获取
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
4
)
//获取到的设备自编码
//
let enCode = scanCodeFun(store.state.appid,4) //获取到的设备自编码
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
4
)
//获取到的设备自编码
//测试
// router.push({
// path: "/schoolProperty/device/info",
// query: {
// encode:'100
101202300003
',
// encode:'100
201202300001
',
// name:'新增'
// }
// })
...
...
src/views/teacher/schoolProperty/deviceListInfo.vue
View file @
b3123e62
...
...
@@ -267,6 +267,7 @@ onMounted(async () => {
console
.
log
(
'feedBack'
,
feedBack
)
if
(
feedBack
.
code
==
200
){
Object
.
assign
(
fixForm
,
feedBack
.
data
)
fixForm
.
repairTime
=
formatDatetime
(
new
Date
())
// fixForm.repairState = stateColumns[feedBack.data.repairState]
stateColumns
.
find
(
item
=>
{
if
(
item
.
id
==
feedBack
.
data
.
repairState
){
...
...
src/views/teacher/schoolProperty/equipmentFix.vue
View file @
b3123e62
...
...
@@ -11,6 +11,7 @@
<van-list
v-model:loading=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getList"
>
<div
style=
"position:relative;"
v-for=
"(item,index) in list"
:key=
"index"
class=
"listBlock"
@
click=
"toDetail(item)"
>
<div>
自编码:{{ item.encode }}
</div>
<div>
设备名称:{{ item.equipmentName }}
</div>
<div>
修理人:{{ item.repairName }}
</div>
<div>
修理时间:{{ item.repairTime }}
</div>
<div>
修理状态:{{ item. disposeState}}
</div>
...
...
@@ -42,13 +43,42 @@ const loading = ref(false)
const
list
=
ref
([]);
const
pullLoading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
equipmentName
=
ref
(
''
);
onMounted
(
()
=>
{
});
//搜索按钮
const
onClickSearch
=
()
=>
{
const
onClickSearch
=
async
()
=>
{
list
.
value
=
[];
loading
.
value
=
true
;
finished
.
value
=
false
;
console
.
log
(
'searchKey.value'
,
searchKey
.
value
)
let
searchResult
=
await
getMaintenanceList
(
equipmentName
.
value
)
if
(
searchResult
.
code
==
200
){
loading
.
value
=
false
;
list
.
value
=
searchResult
.
data
finished
.
value
=
true
list
.
value
.
map
(
item
=>
{
if
(
item
.
repairState
==
"1"
){
item
.
repairState
=
"已损坏"
}
if
(
item
.
repairState
==
"0"
){
item
.
repairState
=
"已维修"
}
if
(
item
.
disposeState
==
"1"
){
item
.
disposeState
=
"已处理"
}
if
(
item
.
disposeState
==
"0"
)
{
item
.
disposeState
=
"待处理"
}
})
}
else
{
Toast
(
"获取信息失败!"
);
finished
.
value
=
true
;
loading
.
value
=
false
;
return
;
}
}
//获取列表数据
...
...
@@ -58,7 +88,7 @@ const getList = async () => {
pageNum
.
value
=
0
;
pullLoading
.
value
=
false
;
}
let
result
=
await
getMaintenanceList
()
let
result
=
await
getMaintenanceList
(
equipmentName
.
value
)
console
.
log
(
'result'
,
result
)
if
(
result
.
code
==
200
){
loading
.
value
=
false
;
...
...
src/views/teacher/schoolProperty/equipmentFixDetail.vue
View file @
b3123e62
...
...
@@ -156,6 +156,7 @@ const repairState = (value) => {
const
showPicker
=
ref
(
false
);
const
columns
=
ref
([]);
onMounted
(
async
()
=>
{
let
repairResult
=
await
getMaintenanceDetail
(
id
)
if
(
repairResult
.
code
==
200
){
console
.
log
(
'repairResult'
,
repairResult
)
...
...
src/views/teacher/schoolProperty/index.vue
View file @
b3123e62
...
...
@@ -75,17 +75,19 @@ onMounted( () => {
})
//扫码获取
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
0
)
//获取到的设备自编码
const
getCode
=
()
=>
{
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
0
)
//获取到的设备自编码
// alert(enCode)
// if(enCode){
// //测试
// router.push({
// path: "/schoolProperty/equipmentInfo",
// query: {
// encode:enCode
// }
// })
// }
// let enCode = scanCodeFun(store.state.appid,0) //获取到的设备自编码
//测试
// router.push({
// path: "/schoolProperty/equipmentInfo",
// query: {
// encode:'100101202300003'
// }
// })
}
const
toPage
=
(
type
)
=>
{
if
(
type
==
0
){
...
...
src/views/teacher/schoolProperty/returnList.vue
View file @
b3123e62
<
template
>
<van-nav-bar
title=
"归还管理"
left-text=
"返回"
left-arrow
@
click-left=
"goback"
></van-nav-bar>
<div
class=
"flexBLock searchBlock"
>
<van-search
class=
"searchInput"
v-model=
"searchKey"
placeholder=
"请输入搜索关键词"
/>
<van-search
class=
"searchInput"
@
search=
"onSearch"
v-model=
"searchKey"
placeholder=
"请输入搜索关键词"
/>
<van-icon
name=
"scan"
@
click=
"getCode"
/>
</div>
<van-pull-refresh
v-model=
"pullLoading"
@
refresh=
"onRefresh"
>
...
...
@@ -47,6 +47,8 @@ const list = ref([]);
const
pullLoading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
pageNum
=
ref
(
0
);
const
equipmentName
=
ref
(
''
)
onMounted
(
async
()
=>
{
})
...
...
@@ -70,11 +72,23 @@ const getList = async () => {
return
;
}
}
//搜索
const
onSearch
=
async
(
val
)
=>
{
list
.
value
=
[];
loading
.
value
=
true
;
equipmentName
.
value
=
val
let
searchResult
=
await
getEquipmentList
(
id
,
equipmentName
.
value
);
console
.
log
(
'searchResult'
,
searchResult
)
if
(
searchResult
.
code
==
200
){
loading
.
value
=
false
;
list
.
value
=
searchResult
.
data
finished
.
value
=
true
}
}
//扫码获取
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
2
)
//获取到的设备自编码
// let enCode = scanCodeFun(store.state.appid,2) //获取到的设备自编码
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
2
)
//获取到的设备自编码
// console.log(1)
//测试
// router.push({
...
...
src/views/teacher/schoolProperty/useList.vue
View file @
b3123e62
...
...
@@ -78,9 +78,7 @@ const onSearch = async (val) =>{
}
//扫码获取
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
3
)
//获取到的设备自编码
// let enCode = scanCodeFun(store.state.appid,3) //获取到的设备自编码
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
3
)
//获取到的设备自编码
// console.log(1)
//测试
// router.push({
...
...
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