Commit 88ab6f69 by peijy

8.25 测试服务器打包

parent b3123e62
...@@ -22,3 +22,10 @@ npm run lint ...@@ -22,3 +22,10 @@ npm run lint
### Customize configuration ### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/). See [Configuration Reference](https://cli.vuejs.org/config/).
//打包更改地方
1.appId
2.登录页图片
3.axios.js中改成 axios.defaults.baseURL = "/school";
4.vue.config.js
...@@ -32,7 +32,6 @@ declare module '@vue/runtime-core' { ...@@ -32,7 +32,6 @@ 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']
......
...@@ -602,10 +602,31 @@ const routes = [ ...@@ -602,10 +602,31 @@ const routes = [
name:'equipmentInfo', name:'equipmentInfo',
component: () => import("../views/teacher/schoolProperty/equipmentInfo"), component: () => import("../views/teacher/schoolProperty/equipmentInfo"),
},
/** 实验室管理 laboratoryManagement 管理员权限 教师权限 领导权限 级部权限 **/
{
path:"/laboratoryManagement",
name:'laboratoryManagement',
component: () => import("../views/teacher/laboratoryManagement/index.vue"),
},
//领导-实验室记录
{
path:"/laboratoryManagement/laboratoryRecord",
name:'laboratoryRecord',
component: () => import("../views/teacher/laboratoryManagement/laboratoryRecord"),
},
//领导-实验室完成情况统计
{
path:"/laboratoryManagement/laboratoryCompleteStatistics",
name: 'laboratoryCompleteStatistics',
component: () => import("../views/teacher/laboratoryManagement/laboratoryCompleteStatistics"),
},
{
path:'/laboratoryManagement/laboratoryCompleteStatistics/checkComplete',
name:'checkComplete',
component: () => import("../views/teacher/laboratoryManagement/checkComplete"),
} }
]; ];
const router = createRouter({ const router = createRouter({
......
...@@ -23,7 +23,7 @@ export function getCodeApi() { ...@@ -23,7 +23,7 @@ export function getCodeApi() {
//appId测试:wx765a55464b308d13 appId正式:wx977825b5a132b74d //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=" +
"wx765a55464b308d13" + "wx977825b5a132b74d" +
"&redirect_uri=" + "&redirect_uri=" +
urlNow + urlNow +
"&response_type=code&scope=snsapi_base&state=de992d7087bb4ac1bfca11fb7082985d&connect_redirect=1#wechat_redirect"; "&response_type=code&scope=snsapi_base&state=de992d7087bb4ac1bfca11fb7082985d&connect_redirect=1#wechat_redirect";
......
...@@ -2,8 +2,8 @@ import { createStore } from "vuex"; ...@@ -2,8 +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 正式的 appid : "wx977825b5a132b74d", // 公众号的AppID 正式的
imgUrl: "http://43.143.63.140", imgUrl: "http://43.143.63.140",
studentId: "", //学生Id studentId: "", //学生Id
studentName: "", //学生姓名 studentName: "", //学生姓名
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<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> <!--/* <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 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">
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</div> </div>
</van-form> </van-form>
</div> </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')"
...@@ -197,21 +197,13 @@ export default { ...@@ -197,21 +197,13 @@ export default {
onMounted( () => { onMounted( () => {
console.log('displayStyle',displayStyle.value) console.log('displayStyle',displayStyle.value)
getToken() getToken()
// if (process.env.NODE_ENV != "development") { if (process.env.NODE_ENV != "development") {
//获取openId
let code = getUrlKey("code"); let code = getUrlKey("code");
console.log('code',code) console.log('code',code)
if (isEmpty(code)) getCodeApi() ; if (isEmpty(code)) getCodeApi() ;
else checkOpenIdOrWxCookie(); else checkOpenIdOrWxCookie();
}
// }
// loadData();
// const res = await getCode();
// res && (window.location.href = res.replace('redirect:', ''));
}); });
// const loadData = async () => { // const loadData = async () => {
......
...@@ -419,6 +419,13 @@ ...@@ -419,6 +419,13 @@
</van-grid-item> </van-grid-item>
<!-- 2023-08-08 新增校产管理模块 --> <!-- 2023-08-08 新增校产管理模块 -->
<!--2023-08-24 新增实验室管理模块-->
<van-grid-item icon="photo-o" text="实验室管理" url="#/laboratoryManagement">
<van-image style="width: 48px" :src="require('@/assets/index/dcwj.png')"/>
<span class="item_text">实验室管理</span>
</van-grid-item>
<!--2023-08-24 新增实验室管理模块-->
<!-- <van-grid-item icon="photo-o" text="我的领用" url=" #/myUse"> <!-- <van-grid-item icon="photo-o" text="我的领用" url=" #/myUse">
<van-image <van-image
style="width: 24px" style="width: 24px"
......
<template>
<van-nav-bar title="实验室完成情况统计" left-text="返回" left-arrow @click-left="goback" ></van-nav-bar>
</template>
<script setup>
</script>
<style scoped>
</style>
<template>
<van-nav-bar title="实验室管理" left-text="返回" left-arrow @click-left="goback" ></van-nav-bar>
<!--领导 -->
<div class="recordBlock" @click="toPage(1)">
<van-image class="leftImg" :src="require('../../../assets/icon/record.png')"/>
<div>实验室记录</div>
</div>
<div class="statisticsBlock" @click="toPage(2)">
<van-image class="leftImg" :src="require('../../../assets/icon/statistics.png')"/>
<div>实验室完成情况统计</div>
</div>
<!--实验室管理员 -->
<div class="orderBlock" @click="toPage(3)">
<van-image class="leftImg" :src="require('../../../assets/icon/order.png')"/>
<div>年级实验室预约</div>
</div>
<div class="techerOrderBlock" @click="toPage(4)">
<van-image class="leftImg" :src="require('../../../assets/icon/teacherOrder.png')"/>
<div>教师实验室预约</div>
</div>
<div class="planBlock" @click="toPage(5)">
<van-image class="leftImg" :src="require('../../../assets/icon/plan.png')"/>
<div>实验室计划完成统计</div>
</div>
<div class="personalBlock" @click="toPage(6)">
<van-image class="leftImg" :src="require('../../../assets/icon/personal.png')"/>
<div>个人实验审批</div>
</div>
<div class="competitionBlock" @click="toPage(7)">
<van-image class="leftImg" :src="require('../../../assets/icon/competition.png')"/>
<div>实验室竞赛</div>
</div>
<!--级部申请-->
<div class="levelOrderBlock" @click="toPage(8)">
<van-image class="leftImg" :src="require('../../../assets/icon/level.png')"/>
<div>年级实验室预约</div>
</div>
<div class="classFinishBlock" @click="toPage(9)">
<van-image class="leftImg" :src="require('../../../assets/icon/classFinish.png')"/>
<div>班级完成情况明细</div>
</div>
<div class="levelFinishBlock" @click="toPage(10)">
<van-image class="leftImg" :src="require('../../../assets/icon/levelFinish.png')"/>
<div>实验室完成情况统计</div>
</div>
<!--教师申请-->
<div class="laboratoryBlock" @click="toPage(11)">
<van-image class="leftImg" :src="require('../../../assets/icon/laboratoryArrangement.png')"/>
<div>实验室安排</div>
</div>
<div class="laboratoryRecordBlock" @click="toPage(12)">
<van-image class="leftImg" :src="require('../../../assets/icon/laboratoryRecord.png')"/>
<div>实验室申请记录</div>
</div>
<div class="personalApplicationBlock" @click="toPage(13)">
<van-image class="leftImg" :src="require('../../../assets/icon/personalApplication.png')"/>
<div>个人实验室申请</div>
</div>
</template>
<script setup>
import { reactive, onMounted, toRefs, ref } from "vue";
import { useStore } from "vuex";
import { useRouter, useRoute } from "vue-router";
import { formatDate } from "@/utils/time";
import {Toast} from "vant";
const store = useStore()
const router = useRouter()
//权限字段
const rolesArr = store.state.userInfo.roles
// 领导权限
const leaderRole = ref()
//实验室管理员
const managerRole = ref()
//级部
const levelPartRole = ref()
//教师
const teacherRole = ref()
//查找角色
// rolesArr.find(item => {
// if(item == ''){
// return leaderRole.value = true
// }else{
// leaderRole.value = false
// }
// })
const toPage = (type) => {
if(type == 1){
//领导-实验室记录
router.push({
path:"/laboratoryManagement/laboratoryRecord"
})
}
if(type == 2){
//领导-实验室记录
router.push({
path:"/laboratoryManagement/laboratoryCompleteStatistics"
})
}
}
//返回上一页
const goback = () => {
router.back();
}
</script>
<style scoped>
.recordBlock,.statisticsBlock,.orderBlock,.techerOrderBlock,
.planBlock,.personalBlock,.competitionBlock,.levelOrderBlock,
.levelFinishBlock,.classFinishBlock,.laboratoryBlock,.laboratoryRecordBlock,.personalApplicationBlock{
padding: 20px 25px;
border-radius: 12px;
color: #FFFFFF;
margin: 15px;
display: flex;
flex-direction: row;
align-items: center;
font-size: 23px;
font-weight: bold;
}
.recordBlock{
background: linear-gradient(to right, #b8f484, #89C7CB);
}
.statisticsBlock{
background: linear-gradient(to right, #89C7CB, #be5ec4);
}
.orderBlock{
background: linear-gradient(to right, #F4F484, #d5983d);
}
.techerOrderBlock{
background: linear-gradient(to right, #FDAE86, #ea4a9d);
}
.planBlock{
background: linear-gradient(to right, #D0A5ECE2, #e281e5);
}
.personalBlock{
background: linear-gradient(to right, #c8bbde, #4ec8cd);
}
.competitionBlock{
background: linear-gradient(to right, #72dee2,#4a81e0 );
}
.levelOrderBlock{
background: linear-gradient(to right, #cde294, #6fcadb);
}
.classFinishBlock{
background: linear-gradient(to right, #b0e7e2, #c497db);
}
.levelFinishBlock{
background: linear-gradient(to right, #d6dc9c, #e5c35d);
}
.laboratoryBlock{
background: linear-gradient(to right, #b5dc9c, #5ab185);
}
.laboratoryRecordBlock{
background: linear-gradient(to right, #9cd5dc, #49a0ce);
}
.personalApplicationBlock{
background: linear-gradient(to right, #d1b3de, #a265d7);
}
.leftImg {
width: 56px;
height: 56px;
margin-right: 10%;
}
</style>
<!--领导-->
<template>
<van-nav-bar title="实验室完成情况" left-text="返回" left-arrow @click-left="goback" ></van-nav-bar>
<div>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<form action="/">
<van-search
v-model="searchValue"
show-action
placeholder="请输入搜索关键词"
@search="onSearch"
@cancel="onCancel"
/>
</form>
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div v-for="(item,index) in list" :key="index">
<div class="card" @click="toCheckComplete(item.id)">
<div class="topContent">
<div class="topLeft">
<van-image :src="require('../../../assets/icon/laboratory.png')"></van-image>
<span style="font-size: 16px;font-weight: bold;padding-left: 5px">生物研究</span>
</div>
<div class="topRight">
<div style="font-size: 14px;color: #FFFFFF">2023下学期</div>
</div>
</div>
<div class="bottomContent">
<div class="experimentType">
<div>级部</div>
<div style="color:#4ea0fc;">2022级</div>
</div>
<div class="experimentType">
<div>总班级数</div>
<div style="color:#4ea0fc;">20个</div>
</div>
<div class="experimentType">
<div>已完成班级数</div>
<div style="color:#4ea0fc;">10个</div>
</div>
<div class="experimentType">
<div>未完成班级数</div>
<div style="color:#4ea0fc;">20个</div>
</div>
</div>
</div>
</div>
</van-list>
</van-pull-refresh>
</div>
</template>
<script setup>
import { reactive, onMounted, toRefs, ref } from "vue";
import { useStore } from "vuex";
import { useRouter, useRoute } from "vue-router";
import { formatDate } from "@/utils/time";
import {Toast} from "vant";
const store = useStore()
const router = useRouter()
//列表数据
const list = ref([1,2,3]);
//loading 和 finished 两个变量控制加载状态
//当组件滚动到底部时,会触发 load 事件并将 loading 设置成 true。
//此时可以发起异步操作并更新数据,数据更新完毕后,将 loading 设置成 false 即可。
// 若数据已全部加载完毕,则直接将 finished 设置成 true 即可。
const loading = ref(false);
const finished = ref(false);
const refreshing = ref(false);
const searchValue = ref('');
//权限字段
const rolesArr = store.state.userInfo.roles
// 领导权限
const leaderRole = ref()
//实验室管理员
const managerRole = ref()
//级部
const levelPartRole = ref()
//教师
const teacherRole = ref()
//查找角色
// rolesArr.find(item => {
// if(item == ''){
// return leaderRole.value = true
// }else{
// leaderRole.value = false
// }
// })
//列表加载事件
const onLoad = () => {
if (refreshing.value) {
list.value = [];
refreshing.value = false;
}
//接口
// let result = await getBorrowList(id,equipmentName.value)
// console.log('result',result)
// if(result.code == 200){
// loading.value = false;
// list.value = result.data
// finished.value = true
// }else{
// Toast("获取信息失败!");
// finished.value = true;
// loading.value = false;
// return;
// }
}
//点击事件
const toCheckComplete = (id) => {
console.log('111')
router.push({
path:'/laboratoryManagement/laboratoryCompleteStatistics/checkComplete',
query:{
id:id
}
})
}
//下拉刷新
const onRefresh = () => {
//// 清空列表数据
finished.value = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
loading.value = true;
onLoad()
};
//搜索
const onSearch = (val) => {
};
//取消
const onCancel = () => {
onLoad()
};
//返回上一页
const goback = () => {
router.back();
}
</script>
<style scoped>
.card{
background: #FFFFFF;
margin: 10px;
}
.topContent{
display: flex;
flex-direction: row;
justify-content: space-between;
padding-top: 15px;
padding-bottom: 10px;
border-bottom:1px solid #6f787d ;
}
.topLeft{
display: flex;
align-items: center;
justify-content: center;
}
.topRight{
margin-top: -5px;
text-align: center;
width: 50px;
height: 20px;
line-height: 20px;
border-radius: 10px;
background: #4ea0fc;
}
.bottomContent{
margin-top: 10px;
padding-bottom: 10px;
display: flex;
flex-direction: row;
justify-content: space-around;
}
.experimentType{
justify-content: center;
align-items: center;
font-size: 14px;
display: flex;
flex-direction: column;
}
</style>
<!--领导-->
<template>
<van-nav-bar title="实验室记录" left-text="返回" left-arrow @click-left="goback" ></van-nav-bar>
<div>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<form action="/">
<van-search
v-model="searchValue"
show-action
placeholder="请输入搜索关键词"
@search="onSearch"
@cancel="onCancel"
/>
</form>
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div v-for="(item,index) in list" :key="index">
<div class="card">
<div class="topContent">
<div class="topLeft">
<van-image :src="require('../../../assets/icon/laboratory.png')"></van-image>
<span style="font-size: 16px;font-weight: bold;padding-left: 5px">张三</span>
</div>
<div class="topRight">
<div style="font-size: 14px;color: #FFFFFF">2022</div>
</div>
</div>
<div class="bottomContent">
<div class="experimentType">
<div>分组实验</div>
<div style="color:#4ea0fc;">6</div>
</div>
<div class="experimentType">
<div>演示实验</div>
<div style="color:#4ea0fc;">6</div>
</div>
<div class="experimentType">
<div>探究实验</div>
<div style="color:#4ea0fc;">6</div>
</div>
<div class="experimentType">
<div>已完成实验数</div>
<div style="color:#4ea0fc;">6</div>
</div>
</div>
</div>
</div>
</van-list>
</van-pull-refresh>
</div>
</template>
<script setup>
import { reactive, onMounted, toRefs, ref } from "vue";
import { useStore } from "vuex";
import { useRouter, useRoute } from "vue-router";
import { formatDate } from "@/utils/time";
import {Toast} from "vant";
const store = useStore();
const router = useRouter()
//列表数据
const list = ref([1,2,3]);
//loading 和 finished 两个变量控制加载状态
//当组件滚动到底部时,会触发 load 事件并将 loading 设置成 true。
//此时可以发起异步操作并更新数据,数据更新完毕后,将 loading 设置成 false 即可。
// 若数据已全部加载完毕,则直接将 finished 设置成 true 即可。
const loading = ref(false);
const finished = ref(false);
const refreshing = ref(false);
const searchValue = ref('');
//权限字段
const rolesArr = store.state.userInfo.roles
// 领导权限
const leaderRole = ref()
//实验室管理员
const managerRole = ref()
//级部
const levelPartRole = ref()
//教师
const teacherRole = ref()
//查找角色
// rolesArr.find(item => {
// if(item == ''){
// return leaderRole.value = true
// }else{
// leaderRole.value = false
// }
// })
//列表加载事件
const onLoad = () => {
if (refreshing.value) {
list.value = [];
refreshing.value = false;
}
//接口
// let result = await getBorrowList(id,equipmentName.value)
// console.log('result',result)
// if(result.code == 200){
// loading.value = false;
// list.value = result.data
// finished.value = true
// }else{
// Toast("获取信息失败!");
// finished.value = true;
// loading.value = false;
// return;
// }
}
//下拉刷新
const onRefresh = () => {
//// 清空列表数据
finished.value = false;
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
loading.value = true;
onLoad()
};
//搜索
const onSearch = (val) => {
};
//取消
const onCancel = () => {
onLoad()
};
//返回上一页
const goback = () => {
router.back();
}
</script>
<style scoped>
.card{
background: #FFFFFF;
margin: 10px;
}
.topContent{
display: flex;
flex-direction: row;
justify-content: space-between;
padding-top: 15px;
padding-bottom: 10px;
border-bottom:1px solid #6f787d ;
}
.topLeft{
display: flex;
align-items: center;
justify-content: center;
}
.topRight{
margin-top: -5px;
text-align: center;
width: 50px;
height: 20px;
line-height: 20px;
border-radius: 10px;
background: #4ea0fc;
}
.bottomContent{
margin-top: 10px;
padding-bottom: 10px;
display: flex;
flex-direction: row;
justify-content: space-around;
}
.experimentType{
justify-content: center;
align-items: center;
font-size: 14px;
display: flex;
flex-direction: column;
}
</style>
<template> <template>
<van-nav-bar :title=title left-text="返回" left-arrow @click-left="goback"></van-nav-bar> <van-nav-bar :title=title left-text="返回" left-arrow @click-left="goback"></van-nav-bar>
<van-form @submit="onSubmit" class="formBlock" label-align="right" label-width="110px"> <van-form @submit="onSubmit" class="formBlock" label-align="right" label-width="130px">
<van-cell-group inset> <van-cell-group inset>
<van-field readonly v-model="borrowForm.encode" label="自编码" placeholder="请输入自编码"/> <van-field readonly v-model="borrowForm.encode" label="自编码" placeholder="请输入自编码"/>
<van-field readonly v-model="borrowForm.equipmentName" label="设备名称" <van-field readonly v-model="borrowForm.equipmentName" label="设备名称"
......
...@@ -55,6 +55,7 @@ const rolesArr = store.state.userInfo.roles ...@@ -55,6 +55,7 @@ const rolesArr = store.state.userInfo.roles
const roleAdmin = ref() const roleAdmin = ref()
const roleRepair = ref() const roleRepair = ref()
onMounted( () => { onMounted( () => {
//用户权限
rolesArr.find(item => { rolesArr.find(item => {
if(item == "productCategoryAdmin"){ if(item == "productCategoryAdmin"){
return roleAdmin.value = true return roleAdmin.value = true
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment