|
@@ -55,45 +55,64 @@
|
|
|
|
|
|
<q-card-section class="q-pt-none">
|
|
|
<div class="flex">
|
|
|
- <div class="flex-1">
|
|
|
- <q-card-section class="q-pt-none">
|
|
|
+ <div class="grid flex-1 grid-cols-2">
|
|
|
+ <q-card-section class="q-pt-none col-span-1">
|
|
|
+ <q-input outlined v-model="infoCpt.name" label="姓名" readonly />
|
|
|
+ </q-card-section>
|
|
|
+ <q-card-section class="q-pt-none col-span-1">
|
|
|
+ <q-input outlined v-model="infoCpt.grade" label="年級" readonly />
|
|
|
+ </q-card-section>
|
|
|
+ <q-card-section class="q-pt-none col-span-1">
|
|
|
<q-input
|
|
|
outlined
|
|
|
- v-model="state.info.phone"
|
|
|
- label="联系方式"
|
|
|
- type="tel"
|
|
|
+ v-model="infoCpt.studentDistrict"
|
|
|
+ label="所在区"
|
|
|
+ readonly
|
|
|
/>
|
|
|
</q-card-section>
|
|
|
- <q-card-section class="q-pt-none">
|
|
|
+ <q-card-section class="q-pt-none col-span-1">
|
|
|
<q-input
|
|
|
outlined
|
|
|
- v-model="state.info.email"
|
|
|
- label="邮箱"
|
|
|
- type="email"
|
|
|
+ v-model="infoCpt.studentClass"
|
|
|
+ label="所属届"
|
|
|
+ readonly
|
|
|
/>
|
|
|
</q-card-section>
|
|
|
- <q-card-section class="q-pt-none">
|
|
|
- <q-input outlined v-model="state.info.name" label="姓名" />
|
|
|
+ <q-card-section class="q-pt-none col-span-1">
|
|
|
+ <q-input
|
|
|
+ outlined
|
|
|
+ v-model="infoCpt.studentSchool"
|
|
|
+ label="所在学校"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
+ </q-card-section>
|
|
|
+ <q-card-section class="q-pt-none col-span-1">
|
|
|
+ <q-input
|
|
|
+ outlined
|
|
|
+ v-model="infoCpt.storeName"
|
|
|
+ label="所属店面"
|
|
|
+ readonly
|
|
|
+ />
|
|
|
</q-card-section>
|
|
|
</div>
|
|
|
- <div class="">
|
|
|
- <el-upload
|
|
|
- class="avatar-uploader"
|
|
|
- action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
|
|
|
- :show-file-list="false"
|
|
|
- accept=".png,.jpg,.jpeg"
|
|
|
- :on-success="handleAvatarSuccess"
|
|
|
- :before-upload="beforeAvatarUpload"
|
|
|
- >
|
|
|
- <img v-if="state.avatar" :src="state.avatar" class="avatar" />
|
|
|
- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
|
|
- </el-upload>
|
|
|
- </div>
|
|
|
+ <!-- <div class="">-->
|
|
|
+ <!-- <el-upload-->
|
|
|
+ <!-- class="avatar-uploader"-->
|
|
|
+ <!-- action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"-->
|
|
|
+ <!-- :show-file-list="false"-->
|
|
|
+ <!-- accept=".png,.jpg,.jpeg"-->
|
|
|
+ <!-- :on-success="handleAvatarSuccess"-->
|
|
|
+ <!-- :before-upload="beforeAvatarUpload"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- <img v-if="state.avatar" :src="state.avatar" class="avatar" />-->
|
|
|
+ <!-- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>-->
|
|
|
+ <!-- </el-upload>-->
|
|
|
+ <!-- </div>-->
|
|
|
</div>
|
|
|
</q-card-section>
|
|
|
|
|
|
<q-card-actions align="right" class="text-teal bg-white">
|
|
|
- <q-btn flat label="确定" v-close-popup />
|
|
|
+ <!-- <q-btn flat label="确定" v-close-popup />-->
|
|
|
<q-btn flat label="取消" v-close-popup />
|
|
|
</q-card-actions>
|
|
|
</q-card>
|
|
@@ -101,23 +120,32 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { computed, reactive } from 'vue'
|
|
|
+import { computed, onMounted, reactive } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { Plus } from '@element-plus/icons-vue'
|
|
|
import { Notify } from 'quasar'
|
|
|
import { ElMessageBox } from 'element-plus'
|
|
|
-import { authLogout } from '@/api/modules/global/login'
|
|
|
+import { authLogout } from '@/api/modules/global'
|
|
|
+import { useAppStore, useDictionaryStore } from '@/stores'
|
|
|
|
|
|
+const AppStore = useAppStore()
|
|
|
+const DictionaryStore = useDictionaryStore()
|
|
|
const router = useRouter()
|
|
|
const state: any = reactive({
|
|
|
showInfo: false,
|
|
|
- info: {
|
|
|
- name: '张三',
|
|
|
- phone: '13112345678',
|
|
|
- email: 'email@qq.com',
|
|
|
- },
|
|
|
avatar: '',
|
|
|
})
|
|
|
+const infoCpt = computed(() => {
|
|
|
+ const obj = {
|
|
|
+ name: AppStore.userInfo?.nickName,
|
|
|
+ grade: DictionaryStore.tcGradeMap.get(AppStore.studentInfo?.grade),
|
|
|
+ studentDistrict: AppStore.studentInfo?.studentDistrict,
|
|
|
+ studentClass: AppStore.studentInfo?.studentClass,
|
|
|
+ studentSchool: AppStore.studentInfo?.studentSchool,
|
|
|
+ storeName: AppStore.studentInfo?.storeName,
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+})
|
|
|
const menusCpt = computed(() => {
|
|
|
return router.getRoutes().filter((v) => v.meta?.isMenu)
|
|
|
})
|
|
@@ -188,6 +216,9 @@ const onLogout = () => {
|
|
|
})
|
|
|
.catch(() => {})
|
|
|
}
|
|
|
+onMounted(() => {
|
|
|
+ DictionaryStore.initDict('tc_grade')
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|