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
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
304 additions
and
114 deletions
+304
-114
components.d.ts
+1
-0
src/App.vue
+1
-1
src/service/home.js
+0
-0
src/service/schoolProperty.js
+9
-9
src/service/utils.js
+8
-4
src/store/index.js
+3
-2
src/utils/axios.js
+5
-0
src/utils/scanCode.js
+34
-9
src/views/login/login.vue
+32
-12
src/views/parent/studentCourseSelection/index.vue
+50
-34
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
+7
-5
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' {
...
@@ -32,6 +32,7 @@ declare module '@vue/runtime-core' {
VanIcon
:
typeof
import
(
'vant/es'
)[
'Icon'
]
VanIcon
:
typeof
import
(
'vant/es'
)[
'Icon'
]
VanImage
:
typeof
import
(
'vant/es'
)[
'Image'
]
VanImage
:
typeof
import
(
'vant/es'
)[
'Image'
]
VanList
:
typeof
import
(
'vant/es'
)[
'List'
]
VanList
:
typeof
import
(
'vant/es'
)[
'List'
]
VanLoading
:
typeof
import
(
'vant/es'
)[
'Loading'
]
VanNavBar
:
typeof
import
(
'vant/es'
)[
'NavBar'
]
VanNavBar
:
typeof
import
(
'vant/es'
)[
'NavBar'
]
VanPicker
:
typeof
import
(
'vant/es'
)[
'Picker'
]
VanPicker
:
typeof
import
(
'vant/es'
)[
'Picker'
]
VanPopover
:
typeof
import
(
'vant/es'
)[
'Popover'
]
VanPopover
:
typeof
import
(
'vant/es'
)[
'Popover'
]
...
...
src/App.vue
View file @
b3123e62
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<router-view>
</router-view>
<router-view>
</router-view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
//
var vConsole = new VConsole();
var
vConsole
=
new
VConsole
();
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
html
{
html
{
...
...
src/service/home.js
View file @
b3123e62
src/service/schoolProperty.js
View file @
b3123e62
...
@@ -6,15 +6,15 @@ import axios from "../utils/axios";
...
@@ -6,15 +6,15 @@ import axios from "../utils/axios";
/********** 获取wx.config 所需参数 ***********/
/********** 获取wx.config 所需参数 ***********/
export
function
getWxConfig
(
url
)
{
export
function
getWxConfig
(
url
)
{
return
axios
.
get
(
`wx/getsignature
/
?url=
${
url
}
`
);
return
axios
.
get
(
`wx/getsignature?url=
${
url
}
`
);
}
}
/********** 物品借用 ***********/
/********** 物品借用 ***********/
//个人借用记录列表
//个人借用记录列表
export
function
getBorrowList
(
borrowById
)
{
export
function
getBorrowList
(
borrowById
,
equipmentName
)
{
return
axios
.
get
(
`
wx/equipment/getMyBorrowList/
${
borrowById
}
`
);
return
axios
.
get
(
`
/wx/equipment/getMyBorrowList/?borrowById=
${
borrowById
}
&equipmentName=
${
equipmentName
}
`
);
}
}
//扫码借用获取设备基本信息
//扫码借用获取设备基本信息
...
@@ -37,8 +37,8 @@ export function checkBorrowDetail(id) {
...
@@ -37,8 +37,8 @@ export function checkBorrowDetail(id) {
/********** 物品归还(管理员) ***********/
/********** 物品归还(管理员) ***********/
//管理员物品列表查看
//管理员物品列表查看
export
function
getEquipmentList
(
managerId
)
{
export
function
getEquipmentList
(
userId
,
equipmentName
)
{
return
axios
.
get
(
`wx/equipment/getMyBorrowList/
${
managerId
}
`
);
return
axios
.
get
(
`wx/equipment/getMyBorrowList/
?userId=
${
userId
}
&equipmentName=
${
equipmentName
}
`
);
}
}
//借用物品记录详情查看-克隆
//借用物品记录详情查看-克隆
...
@@ -81,8 +81,8 @@ export function getRepairName() {
...
@@ -81,8 +81,8 @@ export function getRepairName() {
}
}
//报修个人记录列表
//报修个人记录列表
export
function
getDeviceList
(
reportRepairid
)
{
export
function
getDeviceList
(
reportRepairid
,
equipmentName
)
{
return
axios
.
get
(
`wx/equipment/getMaintenanceList/
${
reportRepairid
}
`
);
return
axios
.
get
(
`wx/equipment/getMaintenanceList/
?reportRepairid=
${
reportRepairid
}
&equipmentName=
${
equipmentName
}
`
);
}
}
//新增报修
//新增报修
...
@@ -127,8 +127,8 @@ export function deletEuipemnt(id) {
...
@@ -127,8 +127,8 @@ export function deletEuipemnt(id) {
/********** 设备维修 ***********/
/********** 设备维修 ***********/
//维修工作列表
//维修工作列表
export
function
getMaintenanceList
()
{
export
function
getMaintenanceList
(
equipmentName
)
{
return
axios
.
get
(
'wx/equipment/getMaintenanceUserList'
);
return
axios
.
get
(
`wx/equipment/getMaintenanceUserList/?equipmentName=
${
equipmentName
}
`
);
}
}
//报修记录详情-克隆
//报修记录详情-克隆
...
...
src/service/utils.js
View file @
b3123e62
import
axios
from
"../utils/axios"
;
import
axios
from
"../utils/axios"
;
export
function
getUrlKey
(
name
)
{
export
function
getUrlKey
(
name
)
{
console
.
log
(
location
.
href
);
console
.
log
(
'location.href'
,
location
.
href
);
return
(
return
(
decodeURIComponent
(
decodeURIComponent
(
(
new
RegExp
(
"[?|&]"
+
name
+
"="
+
"([^&;]+?)(&|#|;|$)"
).
exec
(
(
new
RegExp
(
"[?|&]"
+
name
+
"="
+
"([^&;]+?)(&|#|;|$)"
).
exec
(
...
@@ -14,17 +14,21 @@ export function getUrlKey(name) {
...
@@ -14,17 +14,21 @@ export function getUrlKey(name) {
export
function
getCodeApi
()
{
export
function
getCodeApi
()
{
//获取code
//获取code
console
.
log
(
window
)
console
.
log
(
'window'
,
window
)
let
urlNow
=
encodeURIComponent
(
window
.
location
.
href
);
let
urlNow
=
encodeURIComponent
(
window
.
location
.
href
);
// let urlNow = encodeURIComponent(window.location.origin);
console
.
log
(
'urlNow'
,
urlNow
)
// let urlNow = encodeURIComponent("https://muyecunios.top");
// let urlNow = encodeURIComponent("https://muyecunios.top");
// let scope='snsapi_userinfo'; //snsapi_userinfo snsapi_base //静默授权 用户无感知
// let scope='snsapi_userinfo'; //snsapi_userinfo snsapi_base //静默授权 用户无感知
//appId测试:wx765a55464b308d13 appId正式:wx977825b5a132b74d
let
url
=
let
url
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid="
+
"https://open.weixin.qq.com/connect/oauth2/authorize?appid="
+
"wx977825b5a132b74d
"
+
"wx765a55464b308d13
"
+
"&redirect_uri="
+
"&redirect_uri="
+
urlNow
+
urlNow
+
"&response_type=code&scope=snsapi_base
#wechat_redirect"
;
"&response_type=code&scope=snsapi_base&state=de992d7087bb4ac1bfca11fb7082985d&connect_redirect=1
#wechat_redirect"
;
window
.
location
.
href
=
url
;
window
.
location
.
href
=
url
;
console
.
log
(
'url'
,
url
)
}
}
export
function
getopid
(
code
)
{
export
function
getopid
(
code
)
{
...
...
src/store/index.js
View file @
b3123e62
...
@@ -2,7 +2,8 @@ import { createStore } from "vuex";
...
@@ -2,7 +2,8 @@ import { createStore } from "vuex";
export
default
createStore
({
export
default
createStore
({
state
:
{
state
:
{
appid
:
"wx765a55464b308d13"
,
// 公众号的AppID 2023-08-14
appid
:
"wx765a55464b308d13"
,
// 公众号的AppID 2023-08-14 测试的
// appid : "wx977825b5a132b74d", // 公众号的AppID 正式的
imgUrl
:
"http://43.143.63.140"
,
imgUrl
:
"http://43.143.63.140"
,
studentId
:
""
,
//学生Id
studentId
:
""
,
//学生Id
studentName
:
""
,
//学生姓名
studentName
:
""
,
//学生姓名
...
@@ -329,7 +330,7 @@ export default createStore({
...
@@ -329,7 +330,7 @@ export default createStore({
},
},
editopenId
(
state
,
payload
)
{
editopenId
(
state
,
payload
)
{
//修改首页顶部图片轮播
//修改首页顶部图片轮播
console
.
log
(
payload
);
console
.
log
(
'payload'
,
payload
);
state
.
openId
=
payload
;
state
.
openId
=
payload
;
},
},
editTerm
(
state
,
payload
)
{
editTerm
(
state
,
payload
)
{
...
...
src/utils/axios.js
View file @
b3123e62
...
@@ -13,6 +13,8 @@ import {getToken} from "@/utils/auth";
...
@@ -13,6 +13,8 @@ import {getToken} from "@/utils/auth";
import
{
tansParams
}
from
"@/utils/common"
;
import
{
tansParams
}
from
"@/utils/common"
;
axios
.
defaults
.
baseURL
=
"/school"
;
axios
.
defaults
.
baseURL
=
"/school"
;
// axios.defaults.baseURL = "/houduan";
// axios.defaults.baseURL = "/schoolnw";
// axios.defaults.baseURL = "/schoolnw";
// process.env.NODE_ENV == "development" ? "https://y32025c600.goho.co" : "//43.143.63.140:8095";
// process.env.NODE_ENV == "development" ? "https://y32025c600.goho.co" : "//43.143.63.140:8095";
// process.env.NODE_ENV == "development"
// process.env.NODE_ENV == "development"
...
@@ -114,6 +116,9 @@ axios.interceptors.response.use(
...
@@ -114,6 +116,9 @@ axios.interceptors.response.use(
}
}
if
(
res
.
data
.
code
!=
200
)
{
if
(
res
.
data
.
code
!=
200
)
{
console
.
log
(
res
.
data
);
console
.
log
(
res
.
data
);
if
(
res
.
data
.
code
==
2000
){
return
res
.
data
}
// if (res.data.message) Toast.fail(res.data.message);
// if (res.data.message) Toast.fail(res.data.message);
if
(
res
.
data
.
code
==
401
)
{
if
(
res
.
data
.
code
==
401
)
{
router
.
push
({
path
:
"/"
});
router
.
push
({
path
:
"/"
});
...
...
src/utils/scanCode.js
View file @
b3123e62
import
{
getWxConfig
,
scanEquipmentInfo
}
from
"../service/schoolProperty"
;
import
{
getWxConfig
,
scanEquipmentInfo
}
from
"../service/schoolProperty"
;
import
wx
from
"weixin-js-sdk"
;
//调用微信相关
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
* Date:2023-08-14
* Describe:用于调取微信扫码
* Describe:用于调取微信扫码
* */
* */
export
function
scanCodeFun
(
appId
,
type
){
export
function
scanCodeFun
(
appId
,
type
){
console
.
log
(
'appId'
,
appId
)
let
url
=
location
.
href
.
split
(
'#'
)[
0
]
//获取当前域名
let
url
=
location
.
href
.
split
(
'#'
)[
0
]
//获取当前域名
let
encode
=
''
let
encode
=
''
console
.
log
(
'location'
,
location
)
getWxConfig
(
url
).
then
(
res
=>
{
getWxConfig
(
url
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
const
data
=
res
.
data
const
data
=
res
.
data
...
@@ -24,15 +28,27 @@ export function scanCodeFun(appId,type){
...
@@ -24,15 +28,27 @@ export function scanCodeFun(appId,type){
// 必填,签名,见附录1
// 必填,签名,见附录1
signature
:
data
.
signature
,
signature
:
data
.
signature
,
// 必填,需要使用的JS接口列表,所有JS接口列表见附录2
// 必填,需要使用的JS接口列表,所有JS接口列表见附录2
jsApiList
:
[
'scanQRCode'
]
jsApiList
:
[
'scanQRCode'
],
});
});
// setTimeout(()=>{
wx
.
ready
(
function
()
{
console
.
log
(
666
)
wx
.
checkJsApi
({
jsApiList
:
[
// 所有要调用的 API 都要加到这个列表中
'scanQRCode'
],
success
:
function
(
res
){
wx
.
scanQRCode
({
wx
.
scanQRCode
({
needResult
:
0
,
// 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
needResult
:
1
,
// 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
scanType
:
[
"qrCode"
,
"barCode"
],
// 可以指定扫二维码还是一维码,默认二者都有
scanType
:
[
"qrCode"
,
"barCode"
],
// 可以指定扫二维码还是一维码,默认二者都有
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
777
)
encode
=
res
.
resultStr
;
// 当needResult 为 1 时,扫码返回的结果
encode
=
res
.
resultStr
;
// 当needResult 为 1 时,扫码返回的结果
if
(
type
=
0
){
if
(
type
=
=
0
){
//
校产管理页面扫码显示设备信息
//
校产管理页面扫码显示设备信息
router
.
push
({
router
.
push
({
path
:
"/schoolProperty/equipmentInfo"
,
path
:
"/schoolProperty/equipmentInfo"
,
query
:
{
query
:
{
...
@@ -40,7 +56,7 @@ export function scanCodeFun(appId,type){
...
@@ -40,7 +56,7 @@ export function scanCodeFun(appId,type){
}
}
})
})
}
}
if
(
type
=
1
){
if
(
type
=
=
1
){
// 物品借用
// 物品借用
router
.
push
({
router
.
push
({
path
:
"/schoolProperty/borrow/detail"
,
path
:
"/schoolProperty/borrow/detail"
,
...
@@ -49,7 +65,7 @@ export function scanCodeFun(appId,type){
...
@@ -49,7 +65,7 @@ export function scanCodeFun(appId,type){
}
}
});
});
};
};
if
(
type
=
2
){
if
(
type
=
=
2
){
// 归还管理
// 归还管理
router
.
push
({
router
.
push
({
path
:
"/schoolProperty/return/detail"
,
path
:
"/schoolProperty/return/detail"
,
...
@@ -58,7 +74,7 @@ export function scanCodeFun(appId,type){
...
@@ -58,7 +74,7 @@ export function scanCodeFun(appId,type){
}
}
});
});
};
};
if
(
type
=
3
){
if
(
type
=
=
3
){
// 物品领用
// 物品领用
router
.
push
({
router
.
push
({
path
:
"/schoolProperty/use/add"
,
path
:
"/schoolProperty/use/add"
,
...
@@ -67,7 +83,7 @@ export function scanCodeFun(appId,type){
...
@@ -67,7 +83,7 @@ export function scanCodeFun(appId,type){
}
}
});
});
};
};
if
(
type
=
4
){
if
(
type
=
=
4
){
// 设备报修
// 设备报修
router
.
push
({
router
.
push
({
path
:
"/schoolProperty/device/info"
,
path
:
"/schoolProperty/device/info"
,
...
@@ -77,8 +93,17 @@ export function scanCodeFun(appId,type){
...
@@ -77,8 +93,17 @@ export function scanCodeFun(appId,type){
}
}
});
});
}
}
},
fail
:
function
(
res
){
console
.
log
(
'fail'
,
res
)
}
}
})
})
}
}
})
})
});
// },3000)
}
})
// return encode
}
}
src/views/login/login.vue
View file @
b3123e62
<
template
>
<
template
>
<div
class=
"bg_color"
>
<div
class=
"bg_color"
>
<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"
>
<div
class=
"bg_top_til"
>
智慧校园云平台
</div>
<div
class=
"bg_top_til"
>
智慧校园云平台
</div>
<div
class=
"bg_top_bla"
>
<div
class=
"bg_top_bla"
>
<text
class=
"bg_top_text"
>
家校互动
</text>
<text
class=
"bg_top_text"
>
家校互动
</text>
<div
class=
"bg_top_bt"
></div>
<div
class=
"bg_top_bt"
></div>
...
@@ -112,6 +116,7 @@
...
@@ -112,6 +116,7 @@
</div>
</div>
</van-form>
</van-form>
</div>
</div>
</div>
<van-image
<van-image
style=
"background: #e7f4fb; position: absolute; bottom: 0; height: auto"
style=
"background: #e7f4fb; position: absolute; bottom: 0; height: auto"
:src=
"require('@/assets/login/loginback.png')"
:src=
"require('@/assets/login/loginback.png')"
...
@@ -123,9 +128,10 @@
...
@@ -123,9 +128,10 @@
</
template
>
</
template
>
<
script
>
<
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
{
ref
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useRoute
,
useRouter
}
from
"vue-router"
;
import
{
useStore
}
from
"vuex"
;
import
{
useStore
}
from
"vuex"
;
import
{
formatDatetime
,
formatDate
,
isEmpty
}
from
"@/utils/time.js"
;
import
{
formatDatetime
,
formatDate
,
isEmpty
}
from
"@/utils/time.js"
;
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-unused-vars
...
@@ -186,14 +192,22 @@ export default {
...
@@ -186,14 +192,22 @@ export default {
];
];
const
router
=
useRouter
();
const
router
=
useRouter
();
const
store
=
useStore
();
const
store
=
useStore
();
const
route
=
useRoute
();
onMounted
(
async
()
=>
{
let
displayStyle
=
ref
(
'0'
)
getToken
();
onMounted
(
()
=>
{
if
(
process
.
env
.
NODE_ENV
!=
"development"
)
{
console
.
log
(
'displayStyle'
,
displayStyle
.
value
)
getToken
()
// if (process.env.NODE_ENV != "development") {
let
code
=
getUrlKey
(
"code"
);
let
code
=
getUrlKey
(
"code"
);
if
(
isEmpty
(
code
))
getCodeApi
();
console
.
log
(
'code'
,
code
)
if
(
isEmpty
(
code
))
getCodeApi
()
;
else
checkOpenIdOrWxCookie
();
else
checkOpenIdOrWxCookie
();
}
// }
// loadData();
// loadData();
// const res = await getCode();
// const res = await getCode();
...
@@ -312,7 +326,7 @@ export default {
...
@@ -312,7 +326,7 @@ export default {
type
:
state
.
loginType
,
type
:
state
.
loginType
,
});
});
if
(
result
.
code
==
=
200
)
{
if
(
result
.
code
==
200
)
{
setToken
(
result
.
token
);
setToken
(
result
.
token
);
setParentTelephone
(
state
.
parentTelephone
);
setParentTelephone
(
state
.
parentTelephone
);
...
@@ -363,12 +377,17 @@ export default {
...
@@ -363,12 +377,17 @@ export default {
let
appid
=
"wx977825b5a132b74d"
;
let
appid
=
"wx977825b5a132b74d"
;
let
openId
;
let
openId
;
let
code
=
getUrlKey
(
"code"
);
let
code
=
getUrlKey
(
"code"
);
console
.
log
(
code
);
console
.
log
(
'code'
,
code
);
let
result
=
await
getopid
(
code
);
let
result
=
await
getopid
(
code
);
console
.
log
(
result
);
console
.
log
(
result
);
openId
=
result
.
openId
;
openId
=
result
.
openId
;
store
.
commit
(
"openId"
,
openId
);
store
.
commit
(
"
edit
openId"
,
openId
);
state
.
openId
=
openId
;
state
.
openId
=
openId
;
nextTick
(()
=>
{
displayStyle
.
value
=
'1'
console
.
log
(
'displayStyle.value'
,
displayStyle
.
value
)
})
// 接收到openId 进行判断 如果与本地 localStorage 中存储的 userInfo 中的openId 一致,表示登陆过,直接进入主页
// 接收到openId 进行判断 如果与本地 localStorage 中存储的 userInfo 中的openId 一致,表示登陆过,直接进入主页
// var getUserInfo = JSON.parse(localStorage.getItem("userInfo"));
// var getUserInfo = JSON.parse(localStorage.getItem("userInfo"));
// if (
// if (
...
@@ -410,6 +429,7 @@ export default {
...
@@ -410,6 +429,7 @@ export default {
onConfirmGradeClass
,
onConfirmGradeClass
,
checked
,
checked
,
gocj
,
gocj
,
displayStyle
};
};
}
/* end setup */
,
}
/* end setup */
,
};
};
...
...
src/views/parent/studentCourseSelection/index.vue
View file @
b3123e62
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
<van-field
name=
"radio1"
label=
"选课方式"
>
<van-field
name=
"radio1"
label=
"选课方式"
>
<template
#
input
>
<template
#
input
>
<van-radio-group
:disabled=
"flag == true"
v-for=
"(item,index) in typeColumn"
:key=
"item.dictValue"
v-model=
"checkedType"
<van-radio-group
:disabled=
"flag == true"
v-for=
"(item,index) in typeColumn"
:key=
"item.dictValue"
v-model=
"checkedType"
direction=
"horizontal"
>
direction=
"horizontal"
>
<van-radio
icon-size=
"18px"
:name=
"item.dictValue"
>
{{
item
.
dictLabel
}}
</van-radio>
<van-radio
icon-size=
"18px"
:name=
"item.dictValue"
>
{{
item
.
dictLabel
}}
</van-radio>
</van-radio-group>
</van-radio-group>
...
@@ -42,7 +43,8 @@
...
@@ -42,7 +43,8 @@
<!-- 夏季 -->
<!-- 夏季 -->
<van-field
v-if=
"checkedType == 2"
name=
"radio"
label=
" "
>
<van-field
v-if=
"checkedType == 2"
name=
"radio"
label=
" "
>
<
template
#
input
>
<
template
#
input
>
<van-radio-group
:disabled=
"flag == true"
style=
"display: flex;flex-wrap: wrap"
v-model=
"checkedSub"
direction=
"horizontal"
>
<van-radio-group
:disabled=
"flag == true"
style=
"display: flex;flex-wrap: wrap"
v-model=
"checkedSub"
direction=
"horizontal"
>
<van-radio
v-for=
"(item) in selectionColumn"
:key=
"item.dictValue"
icon-size=
"18px"
:name=
"item.dictValue"
<van-radio
v-for=
"(item) in selectionColumn"
:key=
"item.dictValue"
icon-size=
"18px"
:name=
"item.dictValue"
shape=
"square"
@
click=
"toSubjectGrade(item.dictLabel,item.dictValue)"
>
{{
item
.
dictLabel
}}
shape=
"square"
@
click=
"toSubjectGrade(item.dictLabel,item.dictValue)"
>
{{
item
.
dictLabel
}}
</van-radio>
</van-radio>
...
@@ -158,7 +160,8 @@
...
@@ -158,7 +160,8 @@
<div
v-if=
"checkedType == 3"
>
<div
v-if=
"checkedType == 3"
>
<van-field
class=
"art"
name=
"radio"
label=
" "
>
<van-field
class=
"art"
name=
"radio"
label=
" "
>
<
template
#
input
>
<
template
#
input
>
<van-radio-group
:disabled=
"flag == true"
v-for=
"(item,index) in artColumn"
:key=
"item.dictValue"
v-model=
"checkedArt"
<van-radio-group
:disabled=
"flag == true"
v-for=
"(item,index) in artColumn"
:key=
"item.dictValue"
v-model=
"checkedArt"
direction=
"horizontal"
>
direction=
"horizontal"
>
<van-radio
icon-size=
"18px"
:name=
"item.dictValue"
shape=
"square"
>
{{
item
.
dictLabel
}}
</van-radio>
<van-radio
icon-size=
"18px"
:name=
"item.dictValue"
shape=
"square"
>
{{
item
.
dictLabel
}}
</van-radio>
</van-radio-group>
</van-radio-group>
...
@@ -168,7 +171,8 @@
...
@@ -168,7 +171,8 @@
<
template
#
input
>
<
template
#
input
>
<van-radio-group
:disabled=
"flag == true"
v-model=
"checkedArtSub"
direction=
"horizontal"
>
<van-radio-group
:disabled=
"flag == true"
v-model=
"checkedArtSub"
direction=
"horizontal"
>
<van-radio
v-for=
"(item,index) in selectionColumn"
:key=
"item.dictValue"
icon-size=
"18px"
<van-radio
v-for=
"(item,index) in selectionColumn"
:key=
"item.dictValue"
icon-size=
"18px"
:name=
"item.dictValue"
shape=
"square"
@
click=
"toSubjectGrade(item.dictLabel,item.dictValue)"
>
{{
item
.
dictLabel
}}
:name=
"item.dictValue"
shape=
"square"
@
click=
"toSubjectGrade(item.dictLabel,item.dictValue)"
>
{{
item
.
dictLabel
}}
</van-radio>
</van-radio>
</van-radio-group>
</van-radio-group>
</
template
>
</
template
>
...
@@ -737,7 +741,7 @@
...
@@ -737,7 +741,7 @@
<
script
setup
>
<
script
setup
>
import
{
onMounted
,
ref
,
onUpdated
,
reactive
,
toRefs
,
nextTick
,
markRaw
,
toRaw
}
from
"vue"
;
import
{
onMounted
,
ref
,
onUpdated
,
reactive
,
toRefs
,
nextTick
,
markRaw
,
toRaw
}
from
"vue"
;
import
{
Dialog
,
Toast
}
from
"vant"
;
import
{
Dialog
,
Toast
}
from
"vant"
;
import
{
formatDatetime
,
formatDate
}
from
"@/utils/time.js"
;
import
{
formatDatetime
,
formatDate
}
from
"@/utils/time.js"
;
const
VanDialog
=
Dialog
.
Component
;
//这句是重点
const
VanDialog
=
Dialog
.
Component
;
//这句是重点
import
{
useRoute
,
useRouter
}
from
"vue-router"
;
import
{
useRoute
,
useRouter
}
from
"vue-router"
;
...
@@ -772,6 +776,7 @@ const isShowDialog = reactive({
...
@@ -772,6 +776,7 @@ const isShowDialog = reactive({
const
typeColumn
=
ref
([]);
const
typeColumn
=
ref
([]);
//已选课程 物理化。。
//已选课程 物理化。。
const
selectionColumn
=
ref
([]);
const
selectionColumn
=
ref
([]);
//艺体所选科目
//艺体所选科目
const
artColumn
=
ref
([]);
const
artColumn
=
ref
([]);
//志愿下拉框
//志愿下拉框
...
@@ -784,8 +789,11 @@ const choiceArr = ref([]);
...
@@ -784,8 +789,11 @@ const choiceArr = ref([]);
const
paramsArr
=
ref
([]);
const
paramsArr
=
ref
([]);
const
flag
=
ref
();
const
flag
=
ref
();
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
checkedSub
.
value
=
''
;
checkedArt
.
value
=
''
;
checkedArtSub
.
value
=
''
;
console
.
log
(
'isShowDialog'
,
isShowDialog
.
show
)
console
.
log
(
'isShowDialog'
,
isShowDialog
.
show
)
console
.
log
(
'route
666
'
,
route
.
query
)
console
.
log
(
'route
.query
'
,
route
.
query
)
console
.
log
(
'store'
,
store
.
state
.
userInfo
.
studentId
)
console
.
log
(
'store'
,
store
.
state
.
userInfo
.
studentId
)
if
(
route
.
query
.
type
==
'2'
)
{
if
(
route
.
query
.
type
==
'2'
)
{
checkedType
.
value
=
'2'
;
checkedType
.
value
=
'2'
;
...
@@ -851,15 +859,17 @@ onMounted(async () => {
...
@@ -851,15 +859,17 @@ onMounted(async () => {
state
.
selectionTime
=
result
.
data
.
startTime
+
'-'
+
result
.
data
.
endTime
state
.
selectionTime
=
result
.
data
.
startTime
+
'-'
+
result
.
data
.
endTime
id
.
value
=
result
.
data
.
id
id
.
value
=
result
.
data
.
id
checkedType
.
value
=
result
.
data
.
courseType
checkedType
.
value
=
result
.
data
.
courseType
if
(
result
.
data
.
courseType
==
'2'
){
checkedSub
.
value
=
result
.
data
.
selectedCourse
checkedSub
.
value
=
result
.
data
.
selectedCourse
if
(
result
.
data
.
selectedMajor
.
length
!=
0
){
}
if
(
result
.
data
.
selectedMajor
.
length
!=
0
)
{
const
newArr
=
result
.
data
.
selectedMajor
.
split
(
","
)
const
newArr
=
result
.
data
.
selectedMajor
.
split
(
","
)
console
.
log
(
'newArr'
,
newArr
)
console
.
log
(
'newArr'
,
newArr
)
console
.
log
(
'1224'
,
volunteerColumn
.
value
)
console
.
log
(
'1224'
,
volunteerColumn
.
value
)
state
.
firstChoice
=
volunteerColumn
.
value
.
find
(
item
=>
state
.
firstChoice
=
volunteerColumn
.
value
.
find
(
item
=>
item
.
value
==
newArr
[
0
]
item
.
value
==
newArr
[
0
]
).
text
).
text
console
.
log
(
'state.firstChoice66'
,
state
.
firstChoice
)
console
.
log
(
'state.firstChoice66'
,
state
.
firstChoice
)
selectArr
.
value
[
0
]
=
state
.
firstChoice
selectArr
.
value
[
0
]
=
state
.
firstChoice
state
.
secondChoice
=
volunteerColumn
.
value
.
find
(
item
=>
state
.
secondChoice
=
volunteerColumn
.
value
.
find
(
item
=>
item
.
value
==
newArr
[
1
]
item
.
value
==
newArr
[
1
]
...
@@ -882,13 +892,16 @@ onMounted(async () => {
...
@@ -882,13 +892,16 @@ onMounted(async () => {
).
text
).
text
selectArr
.
value
[
5
]
=
state
.
sixChoice
selectArr
.
value
[
5
]
=
state
.
sixChoice
volunteerIndex
.
value
=
newArr
volunteerIndex
.
value
=
newArr
console
.
log
(
'volunteerIndex.value'
,
volunteerIndex
.
value
)
console
.
log
(
'volunteerIndex.value'
,
volunteerIndex
.
value
)
console
.
log
(
'choiceArr.value'
,
choiceArr
.
value
)
console
.
log
(
'choiceArr.value'
,
choiceArr
.
value
)
}
}
if
(
result
.
data
.
courseType
==
'3'
){
checkedArt
.
value
=
result
.
data
.
selectedCourse
checkedArt
.
value
=
result
.
data
.
selectedCourse
checkedArtSub
.
value
=
result
.
data
.
selectedSubject
checkedArtSub
.
value
=
result
.
data
.
selectedSubject
}
}
}
});
});
//成绩查看按钮
//成绩查看按钮
const
checkGrade
=
()
=>
{
const
checkGrade
=
()
=>
{
...
@@ -934,7 +947,7 @@ const toSubjectGrade = async (name, value) => {
...
@@ -934,7 +947,7 @@ const toSubjectGrade = async (name, value) => {
const
scrollDiv
=
ref
(
null
)
const
scrollDiv
=
ref
(
null
)
//确认弹框事件
//确认弹框事件
const
confirmDialog
=
()
=>
{
const
confirmDialog
=
()
=>
{
console
.
log
(
'scrollDiv'
,
scrollDiv
.
value
)
console
.
log
(
'scrollDiv'
,
scrollDiv
.
value
)
scrollDiv
.
value
.
scrollTop
=
0
scrollDiv
.
value
.
scrollTop
=
0
}
}
// 提交表单
// 提交表单
...
@@ -961,7 +974,7 @@ const showPickerFirst = ref(false);
...
@@ -961,7 +974,7 @@ const showPickerFirst = ref(false);
//第一志愿点击下拉框事件
//第一志愿点击下拉框事件
const
showFirst
=
()
=>
{
const
showFirst
=
()
=>
{
console
.
log
(
'choiceArr'
,
choiceArr
.
value
)
console
.
log
(
'choiceArr'
,
choiceArr
.
value
)
// firstDropDown.value = columns.filter(item => {
// firstDropDown.value = columns.filter(item => {
// return item != state.secondChoice && item != state.thirdChoice && item != state.forthChoice
// return item != state.secondChoice && item != state.thirdChoice && item != state.forthChoice
// })
// })
...
@@ -972,7 +985,7 @@ const showFirst = () => {
...
@@ -972,7 +985,7 @@ const showFirst = () => {
return
item
return
item
}
}
})
})
console
.
log
(
'paramsArr.value'
,
paramsArr
.
value
)
console
.
log
(
'paramsArr.value'
,
paramsArr
.
value
)
console
.
log
(
'state.secondChoice'
,
state
.
secondChoice
)
console
.
log
(
'state.secondChoice'
,
state
.
secondChoice
)
console
.
log
(
'firstDropDown.value'
,
firstDropDown
.
value
)
console
.
log
(
'firstDropDown.value'
,
firstDropDown
.
value
)
showPickerFirst
.
value
=
true
;
showPickerFirst
.
value
=
true
;
...
@@ -984,7 +997,7 @@ const onConfirmFirst = (value, index) => {
...
@@ -984,7 +997,7 @@ const onConfirmFirst = (value, index) => {
showPickerFirst
.
value
=
false
;
showPickerFirst
.
value
=
false
;
selectArr
.
value
[
0
]
=
value
.
text
;
selectArr
.
value
[
0
]
=
value
.
text
;
volunteerIndex
.
value
[
0
]
=
value
.
value
;
volunteerIndex
.
value
[
0
]
=
value
.
value
;
console
.
log
(
'volunteerIndex.value'
,
volunteerIndex
.
value
)
console
.
log
(
'volunteerIndex.value'
,
volunteerIndex
.
value
)
console
.
log
(
'selectArr.value'
,
selectArr
.
value
)
console
.
log
(
'selectArr.value'
,
selectArr
.
value
)
};
};
...
@@ -1102,7 +1115,7 @@ const showSix = () => {
...
@@ -1102,7 +1115,7 @@ const showSix = () => {
// })
// })
//把其他下拉框已选择的过滤出去
//把其他下拉框已选择的过滤出去
sixDropDown
.
value
=
volunteerColumn
.
value
.
filter
(
item
=>
{
sixDropDown
.
value
=
volunteerColumn
.
value
.
filter
(
item
=>
{
if
(
!
selectArr
.
value
.
includes
(
item
.
text
)
)
{
if
(
!
selectArr
.
value
.
includes
(
item
.
text
))
{
return
item
return
item
}
}
})
})
...
@@ -1132,13 +1145,13 @@ const onSubmit = async () => {
...
@@ -1132,13 +1145,13 @@ const onSubmit = async () => {
studentId
:
store
.
state
.
userInfo
.
studentId
,
studentId
:
store
.
state
.
userInfo
.
studentId
,
// curriculaId: id.value,
// curriculaId: id.value,
courseType
:
checkedType
.
value
,
courseType
:
checkedType
.
value
,
curriculaTime
:
formatDatetime
(
new
Date
()),
curriculaTime
:
formatDatetime
(
new
Date
()),
curriculaState
:
'2'
,
curriculaState
:
'2'
,
selectedCourse
:
''
,
selectedCourse
:
''
,
//志愿
//志愿
selectedMajor
:
volunteerString
,
selectedMajor
:
volunteerString
,
selectedSubject
:
''
,
selectedSubject
:
''
,
id
:
id
.
value
,
id
:
id
.
value
,
}
}
console
.
log
(
'data'
,
data
)
console
.
log
(
'data'
,
data
)
...
@@ -1161,13 +1174,13 @@ const onSubmit = async () => {
...
@@ -1161,13 +1174,13 @@ const onSubmit = async () => {
studentId
:
store
.
state
.
userInfo
.
studentId
,
studentId
:
store
.
state
.
userInfo
.
studentId
,
// curriculaId: id.value,
// curriculaId: id.value,
courseType
:
checkedType
.
value
,
courseType
:
checkedType
.
value
,
curriculaTime
:
formatDatetime
(
new
Date
()),
curriculaTime
:
formatDatetime
(
new
Date
()),
curriculaState
:
'2'
,
curriculaState
:
'2'
,
//物理化学科
//物理化学科
selectedCourse
:
checkedSub
.
value
,
selectedCourse
:
checkedSub
.
value
,
selectedMajor
:
''
,
selectedMajor
:
''
,
selectedSubject
:
''
,
selectedSubject
:
''
,
id
:
id
.
value
id
:
id
.
value
}
}
console
.
log
(
'data'
,
data
)
console
.
log
(
'data'
,
data
)
...
@@ -1187,27 +1200,29 @@ const onSubmit = async () => {
...
@@ -1187,27 +1200,29 @@ const onSubmit = async () => {
studentId
:
store
.
state
.
userInfo
.
studentId
,
studentId
:
store
.
state
.
userInfo
.
studentId
,
// curriculaId: id.value,
// curriculaId: id.value,
courseType
:
checkedType
.
value
,
courseType
:
checkedType
.
value
,
curriculaTime
:
formatDatetime
(
new
Date
()),
curriculaTime
:
formatDatetime
(
new
Date
()),
curriculaState
:
'2'
,
curriculaState
:
'2'
,
//物理化学科
//物理化学科
selectedCourse
:
checkedArtSub
.
value
,
selectedCourse
:
checkedArtSub
.
value
,
selectedMajor
:
''
,
selectedMajor
:
''
,
// 艺考
// 艺考
selectedSubject
:
checkedArt
.
value
,
selectedSubject
:
checkedArt
.
value
,
id
:
id
.
value
id
:
id
.
value
}
}
console
.
log
(
'data'
,
data
)
if
(
data
.
selectedCourse
==
''
||
data
.
selectedSubject
==
''
){
Toast
(
"艺体选课未完成"
);
}
else
{
let
result
=
await
saveSelectInfo
(
data
)
let
result
=
await
saveSelectInfo
(
data
)
console
.
log
(
'result'
,
result
)
console
.
log
(
'result'
,
result
)
if
(
result
.
code
==
200
)
{
if
(
result
.
code
==
200
)
{
Toast
(
"选课成功"
);
Toast
(
"选课成功"
);
router
.
back
()
router
.
back
()
// router.replace({
// path: "/main"
// });
}
}
}
}
console
.
log
(
'data'
,
data
)
}
//saveSelectInfo
//saveSelectInfo
// console.log(ryFk.value);
// console.log(ryFk.value);
...
@@ -1389,7 +1404,8 @@ const goback = (g) => {
...
@@ -1389,7 +1404,8 @@ const goback = (g) => {
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
::v-deep
.van-radio__label--disabled
{
::v-deep
.van-radio__label--disabled
{
color
:
#323233
;
color
:
#323233
;
}
}
</
style
>
</
style
>
src/views/public/questionnaire/questionnairedetail.vue
View file @
b3123e62
...
@@ -195,7 +195,7 @@
...
@@ -195,7 +195,7 @@
>
>
<div
class=
"van-image van-uploader__preview-image"
>
<div
class=
"van-image van-uploader__preview-image"
>
<img
<img
:src=
"item.
picData
"
:src=
"item.
userAnswer
"
class=
"van-image__img"
class=
"van-image__img"
style=
"object-fit: cover"
style=
"object-fit: cover"
/>
<!----><!---->
/>
<!----><!---->
...
@@ -303,6 +303,7 @@ const finished = ref(false);
...
@@ -303,6 +303,7 @@ const finished = ref(false);
const
refreshing
=
ref
(
false
);
const
refreshing
=
ref
(
false
);
const
pageNum
=
ref
(
0
);
const
pageNum
=
ref
(
0
);
const
detail
=
JSON
.
parse
(
decodeURIComponent
(
route
.
query
.
detail
));
const
detail
=
JSON
.
parse
(
decodeURIComponent
(
route
.
query
.
detail
));
console
.
log
(
'detail'
,
detail
)
const
id
=
detail
.
id
;
const
id
=
detail
.
id
;
const
examName
=
detail
.
examName
;
const
examName
=
detail
.
examName
;
const
getdisplay
=
()
=>
{
const
getdisplay
=
()
=>
{
...
@@ -349,6 +350,7 @@ const onLoad = async () => {
...
@@ -349,6 +350,7 @@ const onLoad = async () => {
pageSize
:
10
,
pageSize
:
10
,
});
});
if
(
result
.
code
==
200
)
{
if
(
result
.
code
==
200
)
{
console
.
log
(
'调查'
,
result
)
for
(
let
index
=
0
;
index
<
result
.
rows
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
result
.
rows
.
length
;
index
++
)
{
if
(
detail
.
ryZdzt
==
"1"
&&
result
.
rows
[
index
].
userAnswer
)
{
if
(
detail
.
ryZdzt
==
"1"
&&
result
.
rows
[
index
].
userAnswer
)
{
result
.
rows
[
index
].
nrLx
==
"1"
result
.
rows
[
index
].
nrLx
==
"1"
...
@@ -357,8 +359,27 @@ const onLoad = async () => {
...
@@ -357,8 +359,27 @@ const onLoad = async () => {
])
])
:
""
;
:
""
;
// result.rows[index].nrLx == "3"
// 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
);
list
.
value
.
push
(...
result
.
rows
);
...
@@ -409,7 +430,7 @@ function getFileURL(file) {
...
@@ -409,7 +430,7 @@ function getFileURL(file) {
const
afterRead
=
async
(
file
)
=>
{
const
afterRead
=
async
(
file
)
=>
{
file
.
status
=
"uploading"
;
file
.
status
=
"uploading"
;
file
.
message
=
"上传中..."
;
file
.
message
=
"上传中..."
;
// console.log(
file);
console
.
log
(
'file'
,
file
);
Toast
.
loading
({
Toast
.
loading
({
duration
:
50000
,
duration
:
50000
,
message
:
"上传中..."
,
message
:
"上传中..."
,
...
@@ -424,7 +445,7 @@ const afterRead = async (file) => {
...
@@ -424,7 +445,7 @@ const afterRead = async (file) => {
if
(
result
.
code
==
200
)
{
if
(
result
.
code
==
200
)
{
// state.imgUrl = file.content;
// 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
;
list
.
value
[
Number
(
file
.
target
.
name
)].
picData
=
url
;
Toast
.
clear
();
Toast
.
clear
();
}
else
{
}
else
{
...
...
src/views/tabbar/GardenIntr.vue
View file @
b3123e62
...
@@ -35,8 +35,8 @@ font-size: 14px;border-radius:16px;border:0"
...
@@ -35,8 +35,8 @@ font-size: 14px;border-radius:16px;border:0"
<van-grid
:border=
"true"
:column-num=
"2"
>
<van-grid
:border=
"true"
:column-num=
"2"
>
<!--
<div
v-for=
"item in picListNoTop"
:key=
"item.id"
>
-->
<!--
<div
v-for=
"item in picListNoTop"
:key=
"item.id"
>
-->
<van-grid-item
<van-grid-item
v-for=
"
item
in state.picList"
v-for=
"
(item,index)
in state.picList"
:key=
"i
tem.id
"
:key=
"i
ndex
"
icon=
"photo-o"
icon=
"photo-o"
text=
"教学楼"
text=
"教学楼"
class=
"main_tab_1_item"
class=
"main_tab_1_item"
...
@@ -44,8 +44,8 @@ font-size: 14px;border-radius:16px;border:0"
...
@@ -44,8 +44,8 @@ font-size: 14px;border-radius:16px;border:0"
<van-image
<van-image
width=
"100%"
width=
"100%"
class=
"main_tab_item_imag"
class=
"main_tab_item_imag"
v-bind:src=
"item
.picUrl
"
v-bind:src=
"item"
@
click=
"ImagePreviewclick(item
.picUrl
)"
@
click=
"ImagePreviewclick(item)"
ref=
"root"
ref=
"root"
/>
/>
<span
class=
"main_tab_item_span"
>
{{
item
.
picName
}}
</span>
<span
class=
"main_tab_item_span"
>
{{
item
.
picName
}}
</span>
...
@@ -337,7 +337,14 @@ const onGetPics = async () => {
...
@@ -337,7 +337,14 @@ const onGetPics = async () => {
let
result
=
await
schoolPiclist
();
let
result
=
await
schoolPiclist
();
if
(
result
.
code
==
200
)
{
if
(
result
.
code
==
200
)
{
let
getData
=
result
.
data
;
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
)
{
}
else
if
(
result
.
code
==
500
)
{
Toast
(
"获取信息失败!"
);
Toast
(
"获取信息失败!"
);
return
;
return
;
...
...
src/views/tabbar/TeacherInfo.vue
View file @
b3123e62
...
@@ -271,6 +271,7 @@ export default {
...
@@ -271,6 +271,7 @@ export default {
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
console
.
log
(
"加载数据"
);
console
.
log
(
"加载数据"
);
state
.
imgUrl
=
store
.
state
.
userInfo
.
avatar
;
state
.
imgUrl
=
store
.
state
.
userInfo
.
avatar
;
console
.
log
(
'userInfo'
,
store
.
state
.
userInfo
)
};
};
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
loadData
();
loadData
();
...
@@ -317,10 +318,18 @@ export default {
...
@@ -317,10 +318,18 @@ export default {
//删除所有
//删除所有
//localStorage.clear();
//localStorage.clear();
Toast
.
success
(
"退出成功"
);
Toast
.
success
(
"退出成功"
);
router
.
push
({
console
.
log
(
'openId'
,
store
)
path
:
"/login"
,
// window.open('http://www.dyzmxx.com/zhxygzh')
query
:
{},
//测试服务器
});
console
.
log
(
'window'
,
window
)
window
.
location
.
href
=
window
.
location
.
origin
// router.replace({
// path: "/login",
// query: {
// isLogout:1
// },
// });
})
})
.
catch
(()
=>
{});
.
catch
(()
=>
{});
})
})
...
...
src/views/tabbar/main/index.vue
View file @
b3123e62
...
@@ -4,12 +4,12 @@
...
@@ -4,12 +4,12 @@
<van-swipe
:autoplay=
"5000"
lazy-render
>
<van-swipe
:autoplay=
"5000"
lazy-render
>
<van-swipe-item
<van-swipe-item
class=
"m_top"
class=
"m_top"
v-for=
"
item
in state.picList"
v-for=
"
(item,index)
in state.picList"
:key=
"i
tem.picUrl
"
:key=
"i
ndex
"
>
>
<van-image
<van-image
class=
"m_top_image"
class=
"m_top_image"
:src=
"item
.picUrl
"
:src=
"item"
fit=
"cover"
fit=
"cover"
width=
"100%"
width=
"100%"
height=
"100%"
height=
"100%"
...
@@ -490,6 +490,9 @@ import { Toast } from "vant";
...
@@ -490,6 +490,9 @@ import { Toast } from "vant";
import
{
useRouter
}
from
"vue-router"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
formatDate
}
from
"@/utils/time"
;
import
{
formatDate
}
from
"@/utils/time"
;
// import Tabbar from "@/components/tabbar";
// import Tabbar from "@/components/tabbar";
import
image1
from
"@/assets/swiper1.jpeg"
import
image2
from
"@/assets/swiper2.jpeg"
import
axios
from
"axios"
;
import
axios
from
"axios"
;
import
{
import
{
schoolPiclist
,
schoolPiclist
,
...
@@ -541,8 +544,11 @@ export default {
...
@@ -541,8 +544,11 @@ export default {
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
console
.
log
(
"加载数据"
,
store
);
console
.
log
(
"加载数据"
,
store
);
goCalendar
();
goCalendar
();
state
.
picList
=
store
.
state
.
schoolPiclist
||
(
await
getSchoolPiclist
());
getCalendarId
();
getCalendarId
();
// state.picList = store.state.schoolPiclist || (await getSchoolPiclist());
state
.
picList
=
[
image1
,
image2
]
if
(
!
store
.
state
.
userLoginType
)
{
if
(
!
store
.
state
.
userLoginType
)
{
getuserInfo
();
getuserInfo
();
}
else
{
}
else
{
...
@@ -606,12 +612,15 @@ export default {
...
@@ -606,12 +612,15 @@ export default {
courseStartTime
.
value
=
result
.
data
.
startTime
;
courseStartTime
.
value
=
result
.
data
.
startTime
;
courseEndTime
.
value
=
result
.
data
.
endTime
;
courseEndTime
.
value
=
result
.
data
.
endTime
;
flag
.
value
=
result
.
data
.
flag
flag
.
value
=
result
.
data
.
flag
}
if
(
result
.
code
==
2000
){
}
if
(
result
.
code
==
2000
){
noCourse
.
value
=
true
noCourse
.
value
=
true
console
.
log
(
'noCourse.value'
,
noCourse
.
value
)
}
}
}
}
//点击学生选课
//点击学生选课
const
toCourseSelect
=
()
=>
{
const
toCourseSelect
=
()
=>
{
console
.
log
(
'noCourse.value '
,
noCourse
.
value
)
// console.log('flag.value',flag.value)
// console.log('flag.value',flag.value)
if
(
noCourse
.
value
==
true
){
if
(
noCourse
.
value
==
true
){
Toast
(
"当前没有选课任务!"
);
Toast
(
"当前没有选课任务!"
);
...
@@ -632,6 +641,8 @@ export default {
...
@@ -632,6 +641,8 @@ export default {
}
else
{
}
else
{
teacherShow
.
value
=
true
;
teacherShow
.
value
=
true
;
}
}
const
avatar
=
userInfo
.
avatar
userInfo
.
avatar
=
window
.
location
.
origin
+
'/csimges/'
+
avatar
store
.
commit
(
"editUserLoginType"
,
userInfo
.
type
);
store
.
commit
(
"editUserLoginType"
,
userInfo
.
type
);
store
.
commit
(
"editUserOpenId"
,
userInfo
.
userOpenId
);
store
.
commit
(
"editUserOpenId"
,
userInfo
.
userOpenId
);
store
.
commit
(
"editStudentId"
,
userInfo
.
studentId
);
store
.
commit
(
"editStudentId"
,
userInfo
.
studentId
);
...
@@ -641,6 +652,7 @@ export default {
...
@@ -641,6 +652,7 @@ export default {
store
.
commit
(
"editTeacherId"
,
userInfo
.
teacherId
);
store
.
commit
(
"editTeacherId"
,
userInfo
.
teacherId
);
store
.
commit
(
"editTeacherName"
,
userInfo
.
teacherName
);
store
.
commit
(
"editTeacherName"
,
userInfo
.
teacherName
);
store
.
commit
(
"edituserInfo"
,
userInfo
);
store
.
commit
(
"edituserInfo"
,
userInfo
);
console
.
log
(
'userInfo'
,
userInfo
)
onInitData
();
onInitData
();
}
}
};
};
...
...
src/views/teacher/schoolProperty/borrowList.vue
View file @
b3123e62
<
template
>
<
template
>
<van-nav-bar
title=
"物品借用"
left-text=
"返回"
left-arrow
@
click-left=
"goback"
></van-nav-bar>
<van-nav-bar
title=
"物品借用"
left-text=
"返回"
left-arrow
@
click-left=
"goback"
></van-nav-bar>
<div
class=
"flexBLock searchBlock"
>
<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"
/>
<van-icon
name=
"scan"
@
click=
"getCode"
/>
</div>
</div>
<van-pull-refresh
v-model=
"pullLoading"
@
refresh=
"onRefresh"
>
<van-pull-refresh
v-model=
"pullLoading"
@
refresh=
"onRefresh"
>
...
@@ -45,11 +45,11 @@ const list = ref([]);
...
@@ -45,11 +45,11 @@ const list = ref([]);
const
pullLoading
=
ref
(
false
);
const
pullLoading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
pageNum
=
ref
(
0
);
const
pageNum
=
ref
(
0
);
const
equipmentName
=
ref
(
''
)
//扫码获取
//扫码获取
const
getCode
=
()
=>
{
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
1
)
//获取到的设备自编码
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
1
)
//获取到的设备自编码
// let enCode = scanCodeFun(store.state.appid,1) //获取到的设备自编码
//测试
//测试
// router.push({
// router.push({
// path: "/schoolProperty/borrow/detail",
// path: "/schoolProperty/borrow/detail",
...
@@ -66,7 +66,7 @@ const getList = async() => {
...
@@ -66,7 +66,7 @@ const getList = async() => {
pageNum
.
value
=
0
;
pageNum
.
value
=
0
;
pullLoading
.
value
=
false
;
pullLoading
.
value
=
false
;
}
}
let
result
=
await
getBorrowList
(
id
)
let
result
=
await
getBorrowList
(
id
,
equipmentName
.
value
)
console
.
log
(
'result'
,
result
)
console
.
log
(
'result'
,
result
)
if
(
result
.
code
==
200
){
if
(
result
.
code
==
200
){
loading
.
value
=
false
;
loading
.
value
=
false
;
...
@@ -79,7 +79,18 @@ const getList = async() => {
...
@@ -79,7 +79,18 @@ const getList = async() => {
return
;
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
)
=>
{
const
toDetailPage
=
(
id
)
=>
{
console
.
log
(
'id'
,
id
)
console
.
log
(
'id'
,
id
)
...
...
src/views/teacher/schoolProperty/deviceList.vue
View file @
b3123e62
...
@@ -51,6 +51,8 @@ const loading = ref(false)
...
@@ -51,6 +51,8 @@ const loading = ref(false)
const
list
=
ref
([]);
const
list
=
ref
([]);
const
pullLoading
=
ref
(
false
);
const
pullLoading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
equipmentName
=
ref
(
''
)
onMounted
(
()
=>
{
onMounted
(
()
=>
{
});
});
...
@@ -61,7 +63,7 @@ const getList = async () => {
...
@@ -61,7 +63,7 @@ const getList = async () => {
pageNum
.
value
=
0
;
pageNum
.
value
=
0
;
pullLoading
.
value
=
false
;
pullLoading
.
value
=
false
;
}
}
let
result
=
await
getDeviceList
(
id
)
let
result
=
await
getDeviceList
(
id
,
equipmentName
.
value
)
console
.
log
(
'result'
,
result
)
console
.
log
(
'result'
,
result
)
if
(
result
.
code
==
200
){
if
(
result
.
code
==
200
){
loading
.
value
=
false
;
loading
.
value
=
false
;
...
@@ -75,19 +77,29 @@ const getList = async () => {
...
@@ -75,19 +77,29 @@ const getList = async () => {
}
}
}
}
//搜索
//搜索
const
onSearch
=
(
val
)
=>
{
const
onSearch
=
async
(
val
)
=>
{
console
.
log
(
'搜索val'
,
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
=
()
=>
{
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
4
)
//获取到的设备自编码
//
let enCode = scanCodeFun(store.state.appid,4) //获取到的设备自编码
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
4
)
//获取到的设备自编码
//测试
//测试
// router.push({
// router.push({
// path: "/schoolProperty/device/info",
// path: "/schoolProperty/device/info",
// query: {
// query: {
// encode:'100
101202300003
',
// encode:'100
201202300001
',
// name:'新增'
// name:'新增'
// }
// }
// })
// })
...
...
src/views/teacher/schoolProperty/deviceListInfo.vue
View file @
b3123e62
...
@@ -267,6 +267,7 @@ onMounted(async () => {
...
@@ -267,6 +267,7 @@ onMounted(async () => {
console
.
log
(
'feedBack'
,
feedBack
)
console
.
log
(
'feedBack'
,
feedBack
)
if
(
feedBack
.
code
==
200
){
if
(
feedBack
.
code
==
200
){
Object
.
assign
(
fixForm
,
feedBack
.
data
)
Object
.
assign
(
fixForm
,
feedBack
.
data
)
fixForm
.
repairTime
=
formatDatetime
(
new
Date
())
// fixForm.repairState = stateColumns[feedBack.data.repairState]
// fixForm.repairState = stateColumns[feedBack.data.repairState]
stateColumns
.
find
(
item
=>
{
stateColumns
.
find
(
item
=>
{
if
(
item
.
id
==
feedBack
.
data
.
repairState
){
if
(
item
.
id
==
feedBack
.
data
.
repairState
){
...
...
src/views/teacher/schoolProperty/equipmentFix.vue
View file @
b3123e62
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<van-list
v-model:loading=
"loading"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getList"
>
<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
style=
"position:relative;"
v-for=
"(item,index) in list"
:key=
"index"
class=
"listBlock"
@
click=
"toDetail(item)"
>
<div>
自编码:{{ item.encode }}
</div>
<div>
自编码:{{ item.encode }}
</div>
<div>
设备名称:{{ item.equipmentName }}
</div>
<div>
修理人:{{ item.repairName }}
</div>
<div>
修理人:{{ item.repairName }}
</div>
<div>
修理时间:{{ item.repairTime }}
</div>
<div>
修理时间:{{ item.repairTime }}
</div>
<div>
修理状态:{{ item. disposeState}}
</div>
<div>
修理状态:{{ item. disposeState}}
</div>
...
@@ -42,13 +43,42 @@ const loading = ref(false)
...
@@ -42,13 +43,42 @@ const loading = ref(false)
const
list
=
ref
([]);
const
list
=
ref
([]);
const
pullLoading
=
ref
(
false
);
const
pullLoading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
equipmentName
=
ref
(
''
);
onMounted
(
()
=>
{
onMounted
(
()
=>
{
});
});
//搜索按钮
//搜索按钮
const
onClickSearch
=
()
=>
{
const
onClickSearch
=
async
()
=>
{
list
.
value
=
[];
loading
.
value
=
true
;
finished
.
value
=
false
;
console
.
log
(
'searchKey.value'
,
searchKey
.
value
)
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 () => {
...
@@ -58,7 +88,7 @@ const getList = async () => {
pageNum
.
value
=
0
;
pageNum
.
value
=
0
;
pullLoading
.
value
=
false
;
pullLoading
.
value
=
false
;
}
}
let
result
=
await
getMaintenanceList
()
let
result
=
await
getMaintenanceList
(
equipmentName
.
value
)
console
.
log
(
'result'
,
result
)
console
.
log
(
'result'
,
result
)
if
(
result
.
code
==
200
){
if
(
result
.
code
==
200
){
loading
.
value
=
false
;
loading
.
value
=
false
;
...
...
src/views/teacher/schoolProperty/equipmentFixDetail.vue
View file @
b3123e62
...
@@ -156,6 +156,7 @@ const repairState = (value) => {
...
@@ -156,6 +156,7 @@ const repairState = (value) => {
const
showPicker
=
ref
(
false
);
const
showPicker
=
ref
(
false
);
const
columns
=
ref
([]);
const
columns
=
ref
([]);
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
let
repairResult
=
await
getMaintenanceDetail
(
id
)
let
repairResult
=
await
getMaintenanceDetail
(
id
)
if
(
repairResult
.
code
==
200
){
if
(
repairResult
.
code
==
200
){
console
.
log
(
'repairResult'
,
repairResult
)
console
.
log
(
'repairResult'
,
repairResult
)
...
...
src/views/teacher/schoolProperty/index.vue
View file @
b3123e62
...
@@ -76,16 +76,18 @@ onMounted( () => {
...
@@ -76,16 +76,18 @@ onMounted( () => {
})
})
//扫码获取
//扫码获取
const
getCode
=
()
=>
{
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
0
)
//获取到的设备自编码
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
0
)
//获取到的设备自编码
// alert(enCode)
//
let enCode = scanCodeFun(store.state.appid,0) //获取到的设备自编码
//
if(enCode){
//测试
//
//
测试
// router.push({
// router.push({
// path: "/schoolProperty/equipmentInfo",
// path: "/schoolProperty/equipmentInfo",
// query: {
// query: {
//
encode:'100101202300003'
//
encode:enCode
// }
// }
// })
// })
// }
}
}
const
toPage
=
(
type
)
=>
{
const
toPage
=
(
type
)
=>
{
if
(
type
==
0
){
if
(
type
==
0
){
...
...
src/views/teacher/schoolProperty/returnList.vue
View file @
b3123e62
<
template
>
<
template
>
<van-nav-bar
title=
"归还管理"
left-text=
"返回"
left-arrow
@
click-left=
"goback"
></van-nav-bar>
<van-nav-bar
title=
"归还管理"
left-text=
"返回"
left-arrow
@
click-left=
"goback"
></van-nav-bar>
<div
class=
"flexBLock searchBlock"
>
<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"
/>
<van-icon
name=
"scan"
@
click=
"getCode"
/>
</div>
</div>
<van-pull-refresh
v-model=
"pullLoading"
@
refresh=
"onRefresh"
>
<van-pull-refresh
v-model=
"pullLoading"
@
refresh=
"onRefresh"
>
...
@@ -47,6 +47,8 @@ const list = ref([]);
...
@@ -47,6 +47,8 @@ const list = ref([]);
const
pullLoading
=
ref
(
false
);
const
pullLoading
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
finished
=
ref
(
false
);
const
pageNum
=
ref
(
0
);
const
pageNum
=
ref
(
0
);
const
equipmentName
=
ref
(
''
)
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
})
})
...
@@ -70,11 +72,23 @@ const getList = async () => {
...
@@ -70,11 +72,23 @@ const getList = async () => {
return
;
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
=
()
=>
{
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
2
)
//获取到的设备自编码
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
2
)
//获取到的设备自编码
// let enCode = scanCodeFun(store.state.appid,2) //获取到的设备自编码
// console.log(1)
// console.log(1)
//测试
//测试
// router.push({
// router.push({
...
...
src/views/teacher/schoolProperty/useList.vue
View file @
b3123e62
...
@@ -78,9 +78,7 @@ const onSearch = async (val) =>{
...
@@ -78,9 +78,7 @@ const onSearch = async (val) =>{
}
}
//扫码获取
//扫码获取
const
getCode
=
()
=>
{
const
getCode
=
()
=>
{
scanCodeFun
(
store
.
state
.
appid
,
3
)
//获取到的设备自编码
let
enCode
=
scanCodeFun
(
store
.
state
.
appid
,
3
)
//获取到的设备自编码
// let enCode = scanCodeFun(store.state.appid,3) //获取到的设备自编码
// console.log(1)
// console.log(1)
//测试
//测试
// router.push({
// 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