init
Showing
11 changed files
with
0 additions
and
585 deletions
src/views/index/city.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
src/views/index/club.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
| 1 | <template> | ||
| 2 | <div> | ||
| 3 | <h3 class="homeTitle">待办提醒<router-link class="fr" to="/messages">更多<el-icon><ArrowRight /></el-icon></router-link></h3> | ||
| 4 | <div class="wcard"> | ||
| 5 | <ul class="mesUl" :style="`height: ${mesHeight}px`"> | ||
| 6 | <li v-for="item in messageList" :key="item.id" :class="{'done':item.readFlag=='1'}" @click="readMessage(item)"> | ||
| 7 | <div>{{ item.name }}</div> | ||
| 8 | <span class="date">{{ parseTime(item.createTime,'{m}-{d} {h}:{i}') }}</span> | ||
| 9 | </li> | ||
| 10 | <li v-if="messageList?.length<=0" class="done"> | ||
| 11 | 暂无代办业务! | ||
| 12 | </li> | ||
| 13 | </ul> | ||
| 14 | </div> | ||
| 15 | </div> | ||
| 16 | </template> | ||
| 17 | |||
| 18 | <script setup> | ||
| 19 | import { onMounted, ref } from 'vue' | ||
| 20 | import { getMessage, reader } from '@/api/system/homePage' | ||
| 21 | import _ from 'lodash' | ||
| 22 | import { useRouter } from 'vue-router' | ||
| 23 | |||
| 24 | const router = useRouter() | ||
| 25 | const messageList = ref([]) | ||
| 26 | |||
| 27 | defineProps({ | ||
| 28 | mesHeight: { | ||
| 29 | type: Number, | ||
| 30 | default: 300 | ||
| 31 | } | ||
| 32 | }) | ||
| 33 | |||
| 34 | onMounted(() => { | ||
| 35 | getMessageList() | ||
| 36 | }) | ||
| 37 | |||
| 38 | async function getMessageList() { | ||
| 39 | const res = await getMessage({ | ||
| 40 | pageNum: 1, | ||
| 41 | pageSize: 10 | ||
| 42 | }) | ||
| 43 | |||
| 44 | _.each(res.rows, (d) => { | ||
| 45 | switch (d.type) { | ||
| 46 | case 30001: | ||
| 47 | d.name = '你有一条会员缴费等待审批,点击去处理!' | ||
| 48 | d.path = '/member/audit' | ||
| 49 | break | ||
| 50 | case 30002: | ||
| 51 | d.name = '你有一条级位考试等待审批,点击去处理!' | ||
| 52 | d.path = '/level/approval' | ||
| 53 | break | ||
| 54 | case 30003: | ||
| 55 | d.name = '你有一条段位考试等待审批,点击去处理!' | ||
| 56 | d.path = '/rank/approval' | ||
| 57 | break | ||
| 58 | case 30004: | ||
| 59 | d.name = '你有一条会员调动等待审批,点击去处理!' | ||
| 60 | d.path = '/member/mobillize' | ||
| 61 | break | ||
| 62 | case 30005: | ||
| 63 | d.name = '你有一条团体会员认证等待审批,点击去处理!' | ||
| 64 | d.path = '/group/authentication' | ||
| 65 | break | ||
| 66 | case 30006: | ||
| 67 | d.name = '你有一条段位成绩等待审批,点击去处理!' | ||
| 68 | d.path = '/rank/score/approval' | ||
| 69 | break | ||
| 70 | case 40001: | ||
| 71 | d.name = '你有一条级位申请待提交,点击去处理!' | ||
| 72 | d.path = '/level/apply/modify/' + d.eventId | ||
| 73 | break | ||
| 74 | case 40002: | ||
| 75 | d.name = '你有一条段位申请待提交,点击去处理!' | ||
| 76 | d.path = '/rank/apply/modify/' + d.eventId | ||
| 77 | break | ||
| 78 | case 40003: | ||
| 79 | d.name = '你有一条成绩维护的数据待提交,点击去处理!' | ||
| 80 | d.path = '/rank/score/modify/' + d.eventId | ||
| 81 | break | ||
| 82 | case 50001: | ||
| 83 | d.name = '你有一条新的个人会员申请,点击去处理!' | ||
| 84 | d.path = '/member/list' | ||
| 85 | break | ||
| 86 | } | ||
| 87 | }) | ||
| 88 | messageList.value = res.rows | ||
| 89 | } | ||
| 90 | |||
| 91 | async function readMessage(item) { | ||
| 92 | await router.push(item.path) | ||
| 93 | await reader({ id: item.id }) | ||
| 94 | item.readFlag = '1' | ||
| 95 | } | ||
| 96 | |||
| 97 | </script> | ||
| 98 | |||
| 99 | <style scoped lang="scss"> | ||
| 100 | .homeTitle{font-weight: 500;color: #2B3133;margin: 30px 0 15px;} | ||
| 101 | .wcard{background: #fff; padding:15px;overflow: hidden;position: relative; | ||
| 102 | .po-title{position: absolute; | ||
| 103 | h3{font-size: 18px;color: #2B3133;margin: 0;} | ||
| 104 | h2{color: #014A9F;font-size: 30px;margin: 6px 0;} | ||
| 105 | p{color: #7B7F83;font-size: 18px;margin: 0;} | ||
| 106 | } | ||
| 107 | } | ||
| 108 | .home { | ||
| 109 | background: RGBA(245, 247, 249, 1); | ||
| 110 | font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
| 111 | font-size: 13px; | ||
| 112 | color: #676a6c; | ||
| 113 | overflow-x: hidden; | ||
| 114 | ul { | ||
| 115 | padding: 0; | ||
| 116 | margin: 0;list-style-type: none; | ||
| 117 | } | ||
| 118 | } | ||
| 119 | .mesUl{ | ||
| 120 | overflow: auto; | ||
| 121 | li{ position: relative;line-height: 45px;padding-left: 40px;display: flex;justify-content: space-between; | ||
| 122 | color: #666;cursor: pointer; | ||
| 123 | &>div{width: 80%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap; font-size: 16px;} | ||
| 124 | &:before{width: 6px;content: ''; | ||
| 125 | height: 6px;position: absolute;left: 20px;top: 0;bottom: 0;margin: auto; | ||
| 126 | background: var(--el-color-primary); | ||
| 127 | border-radius: 50%;} | ||
| 128 | &:hover{background: #f4f4f4;} | ||
| 129 | .link{display: inline-block;} | ||
| 130 | .date{font-size: 12px;float: right;color: #999;width: 20%;text-align: right;padding-right: 15px; min-width: 80px} | ||
| 131 | } | ||
| 132 | li.done{&:before{background: #ddd;}} | ||
| 133 | } | ||
| 134 | </style> |
src/views/index/messages.vue
deleted
100644 → 0
| 1 | <template> | ||
| 2 | <div class="app-container"> | ||
| 3 | <div class="wcard"> | ||
| 4 | <ul class="mesUl"> | ||
| 5 | <li v-for="item in messageList" :key="item.id" :class="{'done':item.readFlag=='1'}" @click="readMessage(item)"> | ||
| 6 | <div>{{ item.name }}</div> | ||
| 7 | <span class="date">{{ item.createTime }}</span> | ||
| 8 | </li> | ||
| 9 | <li v-if="messageList.length<=0" class="done"> | ||
| 10 | 暂无代办业务! | ||
| 11 | </li> | ||
| 12 | </ul> | ||
| 13 | <pagination | ||
| 14 | v-show="total > 0" | ||
| 15 | v-model:page="queryParams.pageNum" | ||
| 16 | v-model:limit="queryParams.pageSize" | ||
| 17 | :page-sizes="[15,30,45,60]" | ||
| 18 | :total="total" | ||
| 19 | @pagination="getMessageList" | ||
| 20 | /> | ||
| 21 | </div> | ||
| 22 | </div> | ||
| 23 | </template> | ||
| 24 | |||
| 25 | <script setup name="Messages"> | ||
| 26 | import { onMounted, reactive, ref } from 'vue' | ||
| 27 | import { getMessage, reader } from '@/api/system/homePage' | ||
| 28 | import _ from 'lodash' | ||
| 29 | import { useRouter } from 'vue-router' | ||
| 30 | |||
| 31 | const router = useRouter() | ||
| 32 | const messageList = ref([]) | ||
| 33 | const queryParams = reactive({ | ||
| 34 | pageNum: 1, | ||
| 35 | pageSize: 10 | ||
| 36 | }) | ||
| 37 | const total = ref(0) | ||
| 38 | |||
| 39 | |||
| 40 | onMounted(() => { | ||
| 41 | getMessageList() | ||
| 42 | }) | ||
| 43 | |||
| 44 | async function getMessageList() { | ||
| 45 | const res = await getMessage(queryParams) | ||
| 46 | |||
| 47 | _.each(res.rows, (d) => { | ||
| 48 | switch (d.type) { | ||
| 49 | case 30001: | ||
| 50 | d.name = '你有一条会员缴费等待审批,点击去处理!' | ||
| 51 | d.path = '/member/audit' | ||
| 52 | break | ||
| 53 | case 30002: | ||
| 54 | d.name = '你有一条级位考试等待审批,点击去处理!' | ||
| 55 | d.path = '/level/approval' | ||
| 56 | break | ||
| 57 | case 30003: | ||
| 58 | d.name = '你有一条段位考试等待审批,点击去处理!' | ||
| 59 | d.path = '/rank/approval' | ||
| 60 | break | ||
| 61 | case 30004: | ||
| 62 | d.name = '你有一条会员调动等待审批,点击去处理!' | ||
| 63 | d.path = '/member/mobillize' | ||
| 64 | break | ||
| 65 | case 30005: | ||
| 66 | d.name = '你有一条团体会员认证等待审批,点击去处理!' | ||
| 67 | d.path = '/member/audit' | ||
| 68 | break | ||
| 69 | case 30006: | ||
| 70 | d.name = '你有一条段位成绩等待审批,点击去处理!' | ||
| 71 | d.path = '/rank/score/approval' | ||
| 72 | break | ||
| 73 | case 40001: | ||
| 74 | d.name = '你有一条级位申请待提交,点击去处理!' | ||
| 75 | d.path = '/level/apply/modify/:examId' | ||
| 76 | break | ||
| 77 | case 40002: | ||
| 78 | d.name = '你有一条段位位申请待提交,点击去处理!' | ||
| 79 | d.path = '/rank/apply/modify/:examId' | ||
| 80 | break | ||
| 81 | } | ||
| 82 | }) | ||
| 83 | messageList.value = res.rows | ||
| 84 | total.value = res.total | ||
| 85 | } | ||
| 86 | |||
| 87 | async function readMessage(item) { | ||
| 88 | await router.push(item.path) | ||
| 89 | await reader({ id: item.id }) | ||
| 90 | item.readFlag = '1' | ||
| 91 | } | ||
| 92 | |||
| 93 | </script> | ||
| 94 | |||
| 95 | <style scoped lang="scss"> | ||
| 96 | .wcard{background: #fff; padding:15px;overflow: hidden;position: relative; | ||
| 97 | .po-title{position: absolute; | ||
| 98 | h3{font-size: 18px;color: #2B3133;margin: 0;} | ||
| 99 | h2{color: #014A9F;font-size: 30px;margin: 6px 0;} | ||
| 100 | p{color: #7B7F83;font-size: 18px;margin: 0;} | ||
| 101 | } | ||
| 102 | } | ||
| 103 | .mesUl{ | ||
| 104 | li{ position: relative;line-height: 45px;padding-left: 40px;display: flex;justify-content: space-between; | ||
| 105 | color: #666;cursor: pointer; | ||
| 106 | &>div{width: 80%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap; font-size: 16px;} | ||
| 107 | &:before{width: 6px;content: ''; | ||
| 108 | height: 6px;position: absolute;left: 20px;top: 0;bottom: 0;margin: auto; | ||
| 109 | background: var(--el-color-primary); | ||
| 110 | border-radius: 50%;} | ||
| 111 | &:hover{background: #f4f4f4;} | ||
| 112 | .link{display: inline-block;} | ||
| 113 | .date{font-size: 12px;float: right;color: #999;width: 20%;text-align: right;padding-right: 15px;} | ||
| 114 | } | ||
| 115 | li.done{&:before{background: #f4f4f4;}} | ||
| 116 | } | ||
| 117 | </style> |
src/views/index/province.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
src/views/index/ztx.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
src/viewsPc/center/index.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
src/viewsPc/center/myInfo.vue
deleted
100644 → 0
| 1 | <template> | ||
| 2 | <div class="mb20"> | ||
| 3 | <el-card :body-style="{'padding':'0'}"> | ||
| 4 | <div class="indexTitle"> | ||
| 5 | <h3 class="leftboderTT" v-if="user.utype=='2'"> | ||
| 6 | {{ language == 0 ? '机构基础信息' : 'ORGANIZATION BASIC INFORMATION' }}</h3> | ||
| 7 | <h3 class="leftboderTT" v-if="user.utype=='1'">{{ | ||
| 8 | language == 0 ? '个人基础信息' : 'Personal Basic Information' | ||
| 9 | }}</h3> | ||
| 10 | </div> | ||
| 11 | <!-- uType字段 1 是个人 2是团体--> | ||
| 12 | <!-- {{user}}--> | ||
| 13 | <team-info :form="myform" v-if="user.utype=='2'"/> | ||
| 14 | <div class="pd20" v-else> | ||
| 15 | <div class="d-form-border" style="margin-top: 0"> | ||
| 16 | <el-form class="d-form" label-width="120" :rules="rules" ref="formref" | ||
| 17 | :label-position="language==0?'left':'top'" style="max-width: 500px;margin: auto"> | ||
| 18 | <el-form-item :label="language==0?'用户名':'Account'"> | ||
| 19 | {{ user.userName }} | ||
| 20 | </el-form-item> | ||
| 21 | <el-form-item :label="language==0?'姓名':'Real Name'" required prop="realName" v-if="user.utype=='1'"> | ||
| 22 | <el-input v-model="myform.realName" disabled/> | ||
| 23 | </el-form-item> | ||
| 24 | <el-form-item :label="language==0?'性别':'Gender'" required > | ||
| 25 | <el-radio-group v-model="myform.sex"> | ||
| 26 | <el-radio value="0">{{ language == 0 ? '女' : 'female' }}</el-radio> | ||
| 27 | <el-radio value="1">{{ language == 0 ? '男' : 'male' }}</el-radio> | ||
| 28 | </el-radio-group> | ||
| 29 | </el-form-item> | ||
| 30 | <el-form-item :label="language==0?'出生日期':'Date of Birth'"> | ||
| 31 | <el-date-picker | ||
| 32 | v-model="myform.birth" | ||
| 33 | style="width: 100%;" | ||
| 34 | type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" | ||
| 35 | /> | ||
| 36 | </el-form-item> | ||
| 37 | <el-form-item :label="language==0?'代表':'Representing'" required v-if="user.utype=='1'"> | ||
| 38 | <el-input v-model="myform.representing" disabled/> | ||
| 39 | </el-form-item> | ||
| 40 | <el-form-item :label="language==1?'Age group':'年龄组'" required v-if="user.utype=='1'"> | ||
| 41 | <el-input v-model="myform.ageGroup" disabled/> | ||
| 42 | </el-form-item> | ||
| 43 | <el-form-item :label="language==0?'舞种':'Division'" required v-if="user.utype=='1'"> | ||
| 44 | <el-input v-model="myform.division" disabled/> | ||
| 45 | </el-form-item> | ||
| 46 | <el-form-item :label="language==0?'状态':'Status'" required v-if="user.utype=='1'"> | ||
| 47 | <el-input v-model="myform.wdsfStatus" disabled/> | ||
| 48 | </el-form-item> | ||
| 49 | <el-form-item :label="language==0?'证件号':'Passport number'" required v-if="user.utype=='1'"> | ||
| 50 | <el-input v-model="myform.passportNumber" disabled/> | ||
| 51 | </el-form-item> | ||
| 52 | <el-form-item :label="language==0?'有效证件':'Valid Passport'" required v-if="user.utype=='1'"> | ||
| 53 | <image-upload v-model="myform.passportUrl" :limit="1" :is-show-tip="false" | ||
| 54 | :button-text="language==0?'上传':'Upload'"/> | ||
| 55 | </el-form-item> | ||
| 56 | <el-form-item :label="language==0?'WDSF会员号':'WDSF MIN'" prop="wdsfMin" v-if="user.utype=='1'"> | ||
| 57 | {{myform.wdsfMin}} | ||
| 58 | </el-form-item> | ||
| 59 | <!-- <el-form-item :label="language==0?'证件类型':'ID type'" required prop="idcType">--> | ||
| 60 | <!-- <el-select v-model="myform.idcType" style="width: 100%">--> | ||
| 61 | <!-- <el-option--> | ||
| 62 | <!-- v-for="item in certificates"--> | ||
| 63 | <!-- :key="item.value"--> | ||
| 64 | <!-- :label="item.label"--> | ||
| 65 | <!-- :value="item.value"--> | ||
| 66 | <!-- />--> | ||
| 67 | <!-- </el-select>--> | ||
| 68 | <!-- </el-form-item>--> | ||
| 69 | <!-- <el-form-item :label="language==0?'证件号码':'ID NO'" prop="idcCode">--> | ||
| 70 | <!-- <el-input v-model="myform.idcCode" @blur="checkCode"/>--> | ||
| 71 | <!-- </el-form-item>--> | ||
| 72 | <!-- <el-form-item :label="language==0?'类型':'Type'" required>--> | ||
| 73 | <!-- <el-select v-model="myform.type" style="width: 100%;">--> | ||
| 74 | <!-- <el-option :label="language==0?'业余':'amateur'" value="0"/>--> | ||
| 75 | <!-- <el-option :label="language==0?'专业':'Professional'" value="1"/>--> | ||
| 76 | <!-- <el-option :label="language==0?'大专院校':'Colleges and universities'" value="2"/>--> | ||
| 77 | <!-- <el-option :label="language==0?'其他':'Other'" value="3"/>--> | ||
| 78 | <!-- </el-select>--> | ||
| 79 | <!-- </el-form-item>--> | ||
| 80 | <!-- <el-form-item :label="language==0?'邮箱':'Email'" required prop="email">--> | ||
| 81 | <!-- <el-input v-model="myform.email" type="email" :placeholder="language==0?'请输入内容':''"/>--> | ||
| 82 | <!-- </el-form-item>--> | ||
| 83 | </el-form> | ||
| 84 | <div class="text-center" v-if="user.utype=='1'||user.utype=='2'"> | ||
| 85 | <el-button type="primary" class="btn-lineG" round @click="save"> | ||
| 86 | {{language == 0 ? '确定修改' : 'Save'}} | ||
| 87 | </el-button> | ||
| 88 | </div> | ||
| 89 | |||
| 90 | </div> | ||
| 91 | </div> | ||
| 92 | </el-card> | ||
| 93 | |||
| 94 | </div> | ||
| 95 | </template> | ||
| 96 | |||
| 97 | <script setup> | ||
| 98 | import {ref} from 'vue' | ||
| 99 | import {useRouter} from 'vue-router' | ||
| 100 | import {getCurrentInstance, onMounted} from '@vue/runtime-core' | ||
| 101 | import * as match from '@/apiPc/match' | ||
| 102 | import {ElMessage, ElMessageBox} from 'element-plus' | ||
| 103 | import useUserStore from "@/store/modules/user"; | ||
| 104 | import {useStorage} from "@vueuse/core/index"; | ||
| 105 | |||
| 106 | const language= useStorage('language',0) | ||
| 107 | const router = useRouter() | ||
| 108 | const {proxy} = getCurrentInstance() | ||
| 109 | const props = defineProps({ | ||
| 110 | user: { | ||
| 111 | type: Object, | ||
| 112 | required: true | ||
| 113 | } | ||
| 114 | }) | ||
| 115 | const rules = ref({ | ||
| 116 | realName: [{required: true, message: '必填', trigger: 'blur'}], | ||
| 117 | sex: [{required: true, message: '必填', trigger: 'change'}], | ||
| 118 | idcType: [{required: true, message: '必填', trigger: 'change'}], | ||
| 119 | type: [{required: true, message: '必填', trigger: 'change'}], | ||
| 120 | idcCode: [{required: true, message: '必填', trigger: 'blur'}], | ||
| 121 | email: [{required: true, message: '必填', trigger: 'blur'}], | ||
| 122 | |||
| 123 | }) | ||
| 124 | const activeName = ref('first') | ||
| 125 | const myform = ref({ | ||
| 126 | idcType: 0, | ||
| 127 | countryId: '', | ||
| 128 | realName: '' | ||
| 129 | }) | ||
| 130 | const labelArr = ref([]) | ||
| 131 | |||
| 132 | const certificates = ref([ | ||
| 133 | { | ||
| 134 | value: '0', | ||
| 135 | label: language.value == 0 ? '居民身份证' : 'Resident ID card' | ||
| 136 | }, | ||
| 137 | { | ||
| 138 | value: '1', | ||
| 139 | label: language.value == 0 ? '护照' : 'Passport' | ||
| 140 | }, | ||
| 141 | { | ||
| 142 | value: '2', | ||
| 143 | label: language.value == 0 ? '其他' : 'Other' | ||
| 144 | } | ||
| 145 | ]) | ||
| 146 | const user = useUserStore().user || {} | ||
| 147 | getData() | ||
| 148 | |||
| 149 | function getData() { | ||
| 150 | if (user.utype == '2') { | ||
| 151 | match.getGroupInfo().then(res => { | ||
| 152 | myform.value = res.data | ||
| 153 | }) | ||
| 154 | } | ||
| 155 | if (user.utype == '1') { | ||
| 156 | match.getMyPersonInfo().then(res => { | ||
| 157 | myform.value = res.data | ||
| 158 | if(language.value=='1'){ | ||
| 159 | myform.value.type = '1' | ||
| 160 | } | ||
| 161 | }) | ||
| 162 | } | ||
| 163 | |||
| 164 | } | ||
| 165 | |||
| 166 | function save() { | ||
| 167 | match.saveMyBaseInfo(myform.value).then(res => { | ||
| 168 | ElMessage.success(language.value==0?'保存成功':'Save successfully') | ||
| 169 | }) | ||
| 170 | } | ||
| 171 | |||
| 172 | function checkCode() { | ||
| 173 | if (myform.value.idcType == 0 && myform.value.idcCode) { | ||
| 174 | if (!(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(myform.value.idcCode))) { | ||
| 175 | ElMessage.warning('请输入正确的身份证号码') | ||
| 176 | } else { | ||
| 177 | let tmpStr = '' | ||
| 178 | if (myform.value.idcCode.length == 15) { | ||
| 179 | tmpStr = myform.value.idcCode.substring(6, 12) | ||
| 180 | tmpStr = '19' + tmpStr | ||
| 181 | tmpStr = tmpStr.substring(0, 4) + '-' + tmpStr.substring(4, 6) + '-' + tmpStr.substring(6) | ||
| 182 | } else { | ||
| 183 | tmpStr = myform.value.idcCode.substring(6, 14) | ||
| 184 | tmpStr = tmpStr.substring(0, 4) + '-' + tmpStr.substring(4, 6) + '-' + tmpStr.substring(6) | ||
| 185 | } | ||
| 186 | myform.value.birth = tmpStr | ||
| 187 | |||
| 188 | const res = /^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/ | ||
| 189 | if (myform.value.idcCode && res.test(myform.value.idcCode)) { | ||
| 190 | const genderCode = myform.value.idcCode.charAt(16) | ||
| 191 | if (parseInt(genderCode) % 2 == 0) { | ||
| 192 | myform.value.sex = '0' | ||
| 193 | } else { | ||
| 194 | myform.value.sex = '1' | ||
| 195 | } | ||
| 196 | } | ||
| 197 | } | ||
| 198 | } | ||
| 199 | } | ||
| 200 | |||
| 201 | |||
| 202 | </script> | ||
| 203 | |||
| 204 | <style scoped lang="scss"> | ||
| 205 | .indexTitle { | ||
| 206 | margin: 20px 0 12px; | ||
| 207 | padding: 0 20px 15px; | ||
| 208 | border-bottom: 1px solid #e5e5e5; | ||
| 209 | |||
| 210 | h3 { | ||
| 211 | font-size: 16px; | ||
| 212 | color: var(--el-color-primary); | ||
| 213 | } | ||
| 214 | } | ||
| 215 | |||
| 216 | |||
| 217 | </style> |
src/viewsPc/center/myPassword.vue
deleted
100644 → 0
| 1 | <template> | ||
| 2 | <div class="mb20"> | ||
| 3 | <el-card :body-style="{'padding':'0'}"> | ||
| 4 | <div class="indexTitle"><h3 class="leftboderTT">{{ language==0?'修改密码':'Change Password' }}</h3></div> | ||
| 5 | |||
| 6 | <div class="pd20"> | ||
| 7 | <div class="d-form-border" style="margin-top: 0"> | ||
| 8 | <el-form class="d-form" ref="pwdRef" :model="user" :rules="rules" | ||
| 9 | label-width="120px" :label-position="language==0?'left':'top'" | ||
| 10 | style="max-width: 500px;margin: auto"> | ||
| 11 | <el-form-item :label="language==0?'旧密码':'Old Password'" prop="oldPassword"> | ||
| 12 | <el-input v-model="user.oldPassword" :placeholder="language==0?'请输入旧密码':''" type="password" show-password/> | ||
| 13 | </el-form-item> | ||
| 14 | <el-form-item :label="language==0?'新密码':'New Password'" prop="newPassword"> | ||
| 15 | <el-input v-model="user.newPassword" :placeholder="language==0?'请设置8位以上大小写字母、数字、特殊符号':''" type="password" | ||
| 16 | show-password/> | ||
| 17 | </el-form-item> | ||
| 18 | <el-form-item :label="language==0?'确认密码':'Confirm Password'" prop="confirmPassword"> | ||
| 19 | <el-input v-model="user.confirmPassword" :placeholder="language==0?'请确认新密码':''" type="password" show-password/> | ||
| 20 | </el-form-item> | ||
| 21 | |||
| 22 | </el-form> | ||
| 23 | </div> | ||
| 24 | <el-row justify="center"> | ||
| 25 | <el-button type="primary" class="btn-lineG" round @click="submit">{{ language==0?'保存':'Save' }}</el-button> | ||
| 26 | </el-row> | ||
| 27 | </div> | ||
| 28 | </el-card> | ||
| 29 | </div> | ||
| 30 | </template> | ||
| 31 | |||
| 32 | <script setup> | ||
| 33 | import {updateUserPwd} from '@/api/system/user' | ||
| 34 | import useUserStore from '@/store/modules/user' | ||
| 35 | import {reactive, ref, getCurrentInstance} from 'vue' | ||
| 36 | import {validPassword} from '@/utils/validate' | ||
| 37 | import {useStorage} from "@vueuse/core/index"; | ||
| 38 | const language = useStorage('language', 0) | ||
| 39 | |||
| 40 | const show = ref(false) | ||
| 41 | const {proxy} = getCurrentInstance() | ||
| 42 | const userStore = useUserStore() | ||
| 43 | |||
| 44 | const user = reactive({ | ||
| 45 | oldPassword: undefined, | ||
| 46 | newPassword: undefined, | ||
| 47 | confirmPassword: undefined | ||
| 48 | }) | ||
| 49 | |||
| 50 | const equalToPassword = (rule, value, callback) => { | ||
| 51 | if (user.newPassword !== value) { | ||
| 52 | callback(new Error('两次输入的密码不一致')) | ||
| 53 | } else { | ||
| 54 | callback() | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 58 | const validPwd = (rule, value, callback) => { | ||
| 59 | if (import.meta.env.DEV) { | ||
| 60 | callback() | ||
| 61 | } else { | ||
| 62 | if (!validPassword(value)) { | ||
| 63 | callback(new Error('请设置8位以上大小写字母、数字、特殊符号组合的密码')) | ||
| 64 | } else { | ||
| 65 | callback() | ||
| 66 | } | ||
| 67 | } | ||
| 68 | } | ||
| 69 | |||
| 70 | const rules = ref({ | ||
| 71 | oldPassword: [{required: true, message: language.value==0?'旧密码不能为空':'required', trigger: 'blur'}], | ||
| 72 | newPassword: [ | ||
| 73 | {required: true, message: language.value==0?'新密码不能为空':'required', trigger: 'blur'}, | ||
| 74 | {validator: validPwd, trigger: 'blur'} | ||
| 75 | ], | ||
| 76 | confirmPassword: [ | ||
| 77 | {required: true, message: language.value==0?'确认密码不能为空':'required', trigger: 'blur'}, | ||
| 78 | {required: true, validator: equalToPassword, trigger: 'blur'} | ||
| 79 | ] | ||
| 80 | }) | ||
| 81 | |||
| 82 | /** 提交按钮 */ | ||
| 83 | function submit() { | ||
| 84 | proxy.$refs['pwdRef'].validate(valid => { | ||
| 85 | if (valid) { | ||
| 86 | updateUserPwd(user.oldPassword, user.newPassword).then(response => { | ||
| 87 | proxy.$modal.msgSuccess(language.value==0?'修改成功':'password is changed!') | ||
| 88 | |||
| 89 | userStore.logOut().then(() => { | ||
| 90 | setTimeout(() => { | ||
| 91 | location.reload() | ||
| 92 | }, 1000) | ||
| 93 | }) | ||
| 94 | }) | ||
| 95 | } | ||
| 96 | }) | ||
| 97 | } | ||
| 98 | |||
| 99 | </script> | ||
| 100 | |||
| 101 | <style scoped lang="scss"> | ||
| 102 | .indexTitle { | ||
| 103 | margin: 20px 0 12px; | ||
| 104 | padding: 0 20px 15px; | ||
| 105 | border-bottom: 1px solid #e5e5e5; | ||
| 106 | |||
| 107 | h3 { | ||
| 108 | font-size: 16px; | ||
| 109 | color: var(--el-color-primary); | ||
| 110 | } | ||
| 111 | } | ||
| 112 | |||
| 113 | |||
| 114 | </style> |
| ... | @@ -2,8 +2,6 @@ | ... | @@ -2,8 +2,6 @@ |
| 2 | 2 | ||
| 3 | <!-- --> | 3 | <!-- --> |
| 4 | <div class="partA"> | 4 | <div class="partA"> |
| 5 | <rotate-part> | ||
| 6 | </rotate-part> | ||
| 7 | 5 | ||
| 8 | <div class="gif_bg"> | 6 | <div class="gif_bg"> |
| 9 | <img src="@/assets/img/rote.png"> | 7 | <img src="@/assets/img/rote.png"> |
| ... | @@ -93,7 +91,6 @@ | ... | @@ -93,7 +91,6 @@ |
| 93 | </template> | 91 | </template> |
| 94 | 92 | ||
| 95 | <script setup> | 93 | <script setup> |
| 96 | import rotatePart from './rotatePart' | ||
| 97 | import {onMounted, ref, watch} from 'vue' | 94 | import {onMounted, ref, watch} from 'vue' |
| 98 | import {ArrowRight} from '@element-plus/icons-vue' | 95 | import {ArrowRight} from '@element-plus/icons-vue' |
| 99 | import {szToHz} from '@/utils/ruoyi' | 96 | import {szToHz} from '@/utils/ruoyi' | ... | ... |
src/viewsPc/vip/rotatePart.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment