Commit 9bb8279a by zhaopanyu

zpy

parent f7c54e66
<template>
<van-nav-bar
title="场地申请"
left-text="返回"
left-arrow
@click-left="goback"
/>
<van-nav-bar title="场地申请" left-text="返回" left-arrow @click-left="goback" />
<div class="main_search">
<div class="main_search_2">
<van-config-provider :theme-vars="themeVars">
<van-dropdown-menu
class="main_search_2_cd"
active-color="#1989fa"
overlay="false"
>
<van-dropdown-item
v-model="state.optionId"
:options="option"
@change="changeGradeId()"
/>
<van-dropdown-menu class="main_search_2_cd" active-color="#1989fa" overlay="false">
<van-dropdown-item v-model="state.optionId" :options="option" @change="changeGradeId()" />
</van-dropdown-menu>
</van-config-provider>
</div>
<div class="main_search_1">
<van-search
v-model="areaNum"
@search="onGetGradeList"
shape="round"
background="#ffffff"
placeholder="搜索"
/>
<van-search v-model="areaNum" @search="onGetGradeList" shape="round" background="#ffffff" placeholder="搜索" />
</div>
</div>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div
@click="goDetails(item)"
class="c_main_list"
v-for="item in list"
:key="item"
>
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
<div @click="goDetails(item)" class="c_main_list" v-for="item in list" :key="item">
<div>
<div style="font-size: medium; text-align: start; margin-top: 10px">
申请时间:{{ item.applyTime }}
......@@ -68,20 +39,14 @@
</div>
</van-list>
</van-pull-refresh>
<van-icon
style="position: fixed; bottom: 40px; right: 0px"
@click="goApply"
class="icon"
color="#1989fa"
name="add"
size="20vw"
/>
<van-icon style="position: fixed; bottom: 40px; right: 0px" @click="goApply" class="icon" color="#1989fa" name="add"
size="20vw" />
</template>
<script setup>
// import {useStore} from "vuex";
import {useRouter} from "vue-router/dist/vue-router";
import { reactive, ref} from "vue";
import { useRouter } from "vue-router/dist/vue-router";
import { reactive, ref } from "vue";
import { useStore } from "vuex";
const store = useStore();
const router = useRouter();
......@@ -95,24 +60,24 @@ const state = reactive({
// });
const refreshing = ref(true);
const areaNum = ref('')
const option = [{ text: "开始时间", value: 0 },{text:"结束时间",value:1}];
const option = [{ text: "开始时间", value: 0 }, { text: "结束时间", value: 1 }];
const loading = ref();
const list = ref([
{
area:'校内一食堂',
areaDetail:'505',
area: '校内一食堂',
areaDetail: '505',
applyTime: "2020-12-10",
startTime:'2021-11-10 8:00',
endTime:'2021-11-10 11:00',
handuserName:'我',
startTime: '2021-11-10 8:00',
endTime: '2021-11-10 11:00',
handuserName: '我',
state: "驳回", //状态(0通过,1驳回)
},{
area:'四教',
areaDetail:'303',
}, {
area: '四教',
areaDetail: '303',
applyTime: "2020-12-10",
startTime:'2021-11-10 8:00',
endTime:'2021-11-10 11:00',
handuserName:'我',
startTime: '2021-11-10 8:00',
endTime: '2021-11-10 11:00',
handuserName: '我',
state: "通过", //状态(0通过,1驳回)
}
]);
......@@ -141,6 +106,7 @@ const goApply = () => {
::v-deep .van-dropdown-menu__bar {
box-shadow: none !important;
}
.main_search {
width: 100vw;
height: 15vw;
......@@ -154,9 +120,11 @@ const goApply = () => {
display: inline-block;
vertical-align: top;
}
.van-dropdown-menu:root {
--van-dropdown-menu-box-shadow: none;
}
.main_search_2 {
height: 15vw;
display: flex;
......
<template>
<!-- <div>钉钉内跳转</div>-->
<!-- <div>钉钉内跳转</div>-->
<van-dialog v-model:show="showDialog" title="请选择角色" show-cancel-button @confirm="confirmDialog">
<van-radio-group style="justify-content: space-around;margin: 20px 0" v-model="checked" direction="horizontal">
<div v-for="(item,index) in typeResult" :key="index">
<van-radio :name="item.userLoginType" >{{item.userLoginType == "0" ? '教师' : '家长' }}
<div v-for="(item, index) in typeResult" :key="index">
<van-radio :name="item.userLoginType">{{ item.userLoginType == "0" ? '教师' : '家长' }}
<span v-if="item.userLoginType == '1'">({{ item.studentName }})</span>
</van-radio>
</div>
......@@ -12,12 +12,12 @@
</template>
<script setup>
import {Dialog, Toast} from 'vant';
import {getRole, getToken} from "@/service/dd";
import {onMounted, ref} from "vue";
import { Dialog, Toast } from 'vant';
import { getRole, getToken } from "@/service/dd";
import { onMounted, ref } from "vue";
import * as dd from "dingtalk-jsapi";
import { setToken, setParentTelephone, setTotyp } from "@/utils/auth";
import {useRoute, useRouter} from "vue-router";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const VanDialog = Dialog.Component;
const showDialog = ref(false);
......@@ -44,7 +44,6 @@ const getCode = () => {
// console.log('this.authCodeTimestamp', this.authCodeTimestamp);
console.log('code', code);
getRoleType(code)
// console.log('loginResponse', loginResponse);
},
fail: (res) => {
......@@ -69,7 +68,7 @@ const getRoleType = async (code) => {
const code = res.code
console.log('code', code);
const typeNew = type.data[0].userLoginType
console.log('666',typeNew)
console.log('666', typeNew)
getgetToken(code, typeNew)
},
fail: (res) => {
......@@ -89,8 +88,8 @@ const getRoleType = async (code) => {
}
// 获取token登录
const getgetToken = async (code, roleType) => {
console.log('token code',code)
console.log('token roleType',roleType)
console.log('token code', code)
console.log('token roleType', roleType)
const result = await getToken(code, roleType);
console.log("asdasd", result);
if (result.code == 200) {
......@@ -99,11 +98,11 @@ const getgetToken = async (code, roleType) => {
console.log(router);
router.replace({
path: "/main",
query:{
roleType:roleType
query: {
roleType: roleType
},
});
}else if (result.code == 500) {
} else if (result.code == 500) {
Toast("获取信息失败,请重新进入");
return;
}
......@@ -111,7 +110,7 @@ const getgetToken = async (code, roleType) => {
//确认弹框,再次获取code码
const confirmDialog = () => {
console.log('确认',checked.value)
console.log('确认', checked.value)
dd.getAuthCode({
// corpId: 'dingaa3937ff8b7dd267f2c783f7214b6d69',
corpId: 'dingccea40788226c988f2c783f7214b6d69',
......@@ -130,7 +129,4 @@ const confirmDialog = () => {
}
</script>
<style scoped lang="less">
</style>
<style scoped lang="less"></style>
......@@ -10,18 +10,9 @@
:src="require('../../assets/person_info_5.png')"
fit="contain"
></van-image> -->
<van-uploader
class="m_top_info_img_div"
:after-read="afterCard"
accept="image/*"
:max-size="10240 * 1024"
>
<img
style="border-radius: 50px; width: 100%; height: 100%"
:src="
imgUrl ? imgUrl : require('../../assets/person_info_5.png')
"
/>
<van-uploader class="m_top_info_img_div" :after-read="afterCard" accept="image/*" :max-size="10240 * 1024">
<img style="border-radius: 50px; width: 100%; height: 100%" :src="imgUrl ? imgUrl : require('../../assets/person_info_5.png')
" />
<!-- <van-image :src="imgUrl ? imgUrl : require('../../assets/person_info_5.png')" />s -->
<!-- <van-tag type="danger" class="vip" size="medium">VIP</van-tag> -->
</van-uploader>
......@@ -29,26 +20,18 @@
<div class="m_top_info_div">
<div class="row_top">
<span class="m_top_info_one">
{{ state.teacherInfo.teacherName }}</span
>
<!-- <span @click="onLoginOut" class="m_top_info_rtun">-->
<!-- 退出登录</span-->
<!-- >-->
{{ state.teacherInfo.teacherName }}</span>
<span @click="onLoginOut" class="m_top_info_rtun">
退出登录</span>
</div>
<div class="m_top_info_bot2">
<span class="m_top_info_two">
{{ state.teacherInfo.teacherCode }}</span
>
{{ state.teacherInfo.teacherCode }}</span>
<span class="" style="display: flex">
<span class="m_top_info_two">联系方式</span>
<a
class="m_top_info_two"
f="'tel:' + state.teacherInfo.teacherTel"
>
{{ state.teacherInfo.teacherTel }}</a
></span
>
<a class="m_top_info_two" f="'tel:' + state.teacherInfo.teacherTel">
{{ state.teacherInfo.teacherTel }}</a></span>
</div>
</div>
</div>
......@@ -57,113 +40,80 @@
</div>
<div class="main">
<div class="">
<van-cell-group
inset
style="
<van-cell-group inset style="
background: #ffffff;
border-radius: 6px;
box-shadow: 0px 0px 10px rgba(2, 21, 99, 0.1);
"
>
">
<van-cell>
<template #title
><span
style="
<template #title><span style="
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #6f787d;
font-size: 14px;
"
>生日</span
></template
>
<a
style="
">生日</span></template>
<a style="
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #6f787d;
font-size: 14px;
"
>
{{ state.teacherInfo.birthday }}</a
>
">
{{ state.teacherInfo.birthday }}</a>
</van-cell>
<van-cell>
<template #title
><span
style="
<template #title><span style="
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #6f787d;
font-size: 14px;
"
>民族</span
></template
>
<a
style="
">民族</span></template>
<a style="
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #6f787d;
font-size: 14px;
"
>
{{ state.teacherInfo.nation }}</a
>
">
{{ state.teacherInfo.nation }}</a>
</van-cell>
<van-cell>
<template #title
><span
style="
<template #title><span style="
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #6f787d;
font-size: 14px;
"
>地址</span
></template
>
<a
style="
">地址</span></template>
<a style="
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #6f787d;
font-size: 14px;
"
>
{{ state.teacherInfo.homeAddress }}</a
>
">
{{ state.teacherInfo.homeAddress }}</a>
</van-cell>
<van-cell>
<template #title>
<span
style="
<span style="
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #6f787d;
font-size: 14px;
"
>性别</span
>
">性别</span>
</template>
<span
style="
<span style="
height: 20px;
font-family: PingFang SC;
font-weight: 700;
color: #6f787d;
font-size: 14px;
"
>{{ state.teacherInfo.sex === "0" ? "男" : "女" }}</span
>
">{{ state.teacherInfo.sex === "0" ? "男" : "女" }}</span>
</van-cell>
<!--<van-cell>-->
<!-- <template #title><span>工龄</span></template>-->
......@@ -174,54 +124,34 @@
<!-- <a> 10</a>-->
<!--</van-cell>-->
</van-cell-group>
<van-cell
style="
<van-cell style="
margin: 15px;
background: #ffffff;
border-radius: 6px;
box-shadow: 0px 0px 10px rgba(2, 21, 99, 0.1);
width: auto;
"
to="SchoolTeacherAward"
title="我的荣誉"
is-link
/>
<van-cell
style="
" to="SchoolTeacherAward" title="我的荣誉" is-link />
<van-cell style="
margin: 15px;
background: #ffffff;
border-radius: 6px;
box-shadow: 0px 0px 10px rgba(2, 21, 99, 0.1);
width: auto;
"
to="teacherResume"
title="我的履历"
is-link
/>
<van-cell
style="
" to="teacherResume" title="我的履历" is-link />
<van-cell style="
margin: 15px;
background: #ffffff;
border-radius: 6px;
box-shadow: 0px 0px 10px rgba(2, 21, 99, 0.1);
width: auto;
"
title="我的领用"
is-link
to="myUse"
/>
<van-cell
style="
" title="我的领用" is-link to="myUse" />
<van-cell style="
margin: 15px;
background: #ffffff;
border-radius: 6px;
box-shadow: 0px 0px 10px rgba(2, 21, 99, 0.1);
width: auto;
"
title="修改密码"
is-link
to="changePassword"
/>
" title="修改密码" is-link to="changePassword" />
</div>
</div>
</div>
......@@ -271,7 +201,7 @@ export default {
const loadData = async () => {
console.log("加载数据");
state.imgUrl = store.state.userInfo.avatar;
console.log('userInfo',store.state.userInfo)
console.log('userInfo', store.state.userInfo)
};
onMounted(async () => {
loadData();
......@@ -279,7 +209,7 @@ export default {
});
const initUserInfo = async () => {
console.log('store',store)
console.log('store', store)
//访问后台接口
let result = await getteacherInfo();
if (result.code == 200) {
......@@ -318,18 +248,18 @@ export default {
//删除所有
//localStorage.clear();
Toast.success("退出成功");
console.log('openId',store)
console.log('openId', store)
//测试服务器
// console.log('window',window)
// window.location.href = window.location.href.split('?')[0]
router.replace({
path: "/login",
query: {
isLogout:1
isLogout: 1
},
});
})
.catch(() => {});
.catch(() => { });
})
.catch(() => {
// on cancel
......@@ -416,11 +346,9 @@ export default {
.m_top_info {
height: 141px;
background: linear-gradient(
180deg,
background: linear-gradient(180deg,
#39befe 0%,
rgba(255, 255, 255, 0) 100%
);
rgba(255, 255, 255, 0) 100%);
.m_top_info_top {
width: 100vw;
......
......@@ -4,19 +4,22 @@
<van-cell-group inset>
<van-field readonly v-model="equipmentForm.encode" label="自编码" />
<van-field readonly v-model="equipmentForm.equipmentName" label="设备名称" />
<van-field readonly v-model="equipmentForm.model" label="型号"/>
<!-- <van-field readonly v-model="equipmentForm.specification" label="规格"/>-->
<van-field readonly v-model="equipmentForm.classificationCode" label="分类编码"/>
<van-field readonly v-model="equipmentForm.unit" label="单位"/>
<van-field readonly v-model="affiliationType" label="归属类型"/>
<van-field readonly v-model="equipmentState" label="设备状态"/>
<van-field readonly v-model="isAllowLend" label="是否允许借出"/>
<van-field readonly v-model="isLend" label="是否借出"/>
<van-field readonly v-model="equipmentForm.dateOfProduction" label="安装时间"/>
<van-field readonly v-model="equipmentForm.price" label="价格(元)"/>
<van-field readonly v-model="equipmentForm.lifeOfUtility" label="效用年限(年)"/>
<van-field readonly v-model="equipmentForm.place" label="地点"/>
<van-field readonly v-model="equipmentForm.model" label="型号" />
<!-- <van-field readonly v-model="equipmentForm.specification" label="规格"/>-->
<van-field readonly v-model="equipmentForm.classificationCode" label="分类编码" />
<van-field readonly v-model="equipmentForm.unit" label="单位" />
<van-field readonly v-model="affiliationType" label="归属类型" />
<!-- <van-field readonly v-model="equipmentState" label="设备状态"/> -->
<!-- <van-field readonly v-model="isAllowLend" label="是否允许借出" /> -->
<!-- <van-field readonly v-model="isLend" label="是否借出" /> -->
<van-field readonly v-model="equipmentForm.dateOfProduction" label="安装时间" />
<van-field readonly v-model="equipmentForm.price" label="价格(元)" />
<van-field readonly v-model="equipmentForm.lifeOfUtility" label="效用年限(年)" />
<van-field readonly v-model="equipmentForm.place" label="地点" />
<van-field readonly v-model="equipmentForm.useName" label="使用人" />
<!-- 新加两个字段 出厂编号、批号 -->
<van-field readonly v-model="equipmentForm.unit" label="出厂编号" />
<van-field readonly v-model="equipmentForm.ph" label="批号" />
<van-field readonly v-model="equipmentForm.remark" label="备注" />
</van-cell-group>
<van-button round block type="primary" size="small" style="width: 80px;margin:0 auto" @click="goback">
......@@ -26,24 +29,27 @@
</template>
<script setup>
import {reactive, ref, onMounted} from "vue";
import { scanEquipmentInfo} from "@/service/schoolProperty"
import {useRoute, useRouter} from "vue-router";
import {Dialog, Toast} from "vant";
import {useStore} from "vuex";
import { reactive, ref, onMounted } from "vue";
import { scanEquipmentInfo } from "@/service/schoolProperty"
import { useRoute, useRouter } from "vue-router";
import { Dialog, Toast } from "vant";
import { useStore } from "vuex";
const equipmentForm = reactive({
encode:'',
equipmentName:'',
model:'',
encode: '',
equipmentName: '',
model: '',
// specification:'',
classificationCode:'',
unit:'',
dateOfProduction:'',
price:'',
lifeOfUtility:'',
place:'',
useName:'',
remark:''
classificationCode: '',
unit: '',
dateOfProduction: '',
price: '',
lifeOfUtility: '',
place: '',
useName: '',
remark: '',
unit: '',
ph: '',
// 需要新加两个字段出厂编号、批号
})
const affiliationType = ref('')
const equipmentState = ref('')
......@@ -54,10 +60,10 @@ const router = useRouter();
const route = useRoute();
const store = useStore();
const queryEncode = route.query.encode
onMounted( async () => {
onMounted(async () => {
let result = await scanEquipmentInfo(queryEncode)
console.log('result',result)
if(result.code == 3000){
console.log('result', result)
if (result.code == 3000) {
Dialog.alert({
title: '提示',
message: result.msg,
......@@ -65,31 +71,31 @@ onMounted( async () => {
router.back();
});
}
if(result.code == 200){
Object.assign(equipmentForm,result.data)
if(result.data.affiliationType == '1'){
if (result.code == 200) {
Object.assign(equipmentForm, result.data)
if (result.data.affiliationType == '1') {
affiliationType.value = '公共区域'
}else if(result.data.affiliationType == '2'){
} else if (result.data.affiliationType == '2') {
affiliationType.value = '信息中心'
}else{
} else {
affiliationType.value = '个人'
}
if(result.data.equipmentState == '1'){
if (result.data.equipmentState == '1') {
equipmentState.value = '完好'
}else if(result.data.equipmentState == '2'){
} else if (result.data.equipmentState == '2') {
equipmentState.value = '损坏'
}else{
} else {
equipmentState.value = '报废'
}
if(result.data.isAllowLend == '1'){
if (result.data.isAllowLend == '1') {
isAllowLend.value = '是'
}else{
} else {
isAllowLend.value = '否'
}
if(result.data.isLend == '1'){
isLend.value ='是'
}else{
isLend.value ='否'
if (result.data.isLend == '1') {
isLend.value = '是'
} else {
isLend.value = '否'
}
}
......@@ -102,6 +108,4 @@ const goback = () => {
</script>
<style scoped>
</style>
<style scoped></style>
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