|
@@ -1,5 +1,5 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import {computed, onMounted, ref} from "vue";
|
|
|
|
|
|
+import {computed, ref} from "vue";
|
|
import {DataCenter} from "../DataCenter.ts";
|
|
import {DataCenter} from "../DataCenter.ts";
|
|
import {Tools} from "../Tools.ts";
|
|
import {Tools} from "../Tools.ts";
|
|
import {LocalModels} from "../LocalModels.ts";
|
|
import {LocalModels} from "../LocalModels.ts";
|
|
@@ -23,6 +23,10 @@ let diquOptions = ref([])
|
|
let userName = ref("")
|
|
let userName = ref("")
|
|
let isMan = ref(true)
|
|
let isMan = ref(true)
|
|
let userNameCompt = ref()
|
|
let userNameCompt = ref()
|
|
|
|
+let disablePage = ref(false)
|
|
|
|
+let lastMsg = ref("")
|
|
|
|
+let subButtonDisabled = ref(false)
|
|
|
|
+let tipType = ref("danger")
|
|
|
|
|
|
function range(min: number, max: number) {
|
|
function range(min: number, max: number) {
|
|
let result = []
|
|
let result = []
|
|
@@ -90,150 +94,151 @@ function applyInfo() {
|
|
request.born_sheng = shengfen.value
|
|
request.born_sheng = shengfen.value
|
|
request.born_shi = chengshi.value
|
|
request.born_shi = chengshi.value
|
|
request.born_qu = diqu.value
|
|
request.born_qu = diqu.value
|
|
- Network.applyUserInfo(request, function () {
|
|
|
|
- console.log("over")
|
|
|
|
|
|
+ subButtonDisabled.value = true
|
|
|
|
+ Network.applyUserInfo(request, function (rsp: LocalModels.BaseResponse) {
|
|
|
|
+ Tools.showMessage(rsp.msg)
|
|
|
|
+ lastMsg.value = rsp.msg
|
|
|
|
+ if (rsp.isSuccess()) {
|
|
|
|
+ tipType.value = "success"
|
|
|
|
+ disablePage.value = true
|
|
|
|
+ } else {
|
|
|
|
+ tipType.value = "danger"
|
|
|
|
+ disablePage.value = true
|
|
|
|
+ }
|
|
|
|
+ subButtonDisabled.value = false
|
|
})
|
|
})
|
|
//todo
|
|
//todo
|
|
}
|
|
}
|
|
|
|
|
|
-function checkWxOpenId() {
|
|
|
|
- if (DataCenter.wxOpenId == null) {
|
|
|
|
- let uri = encodeURI("https://yixuefrp.cxhy.cn/test")
|
|
|
|
- Tools.showMessage(uri)
|
|
|
|
- let url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf01ec97b45a4bc49&redirect_uri=" + uri + "&response_type=code&scope=snsapi_base&state=999#wechat_redirect"
|
|
|
|
- window.location.href = url
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-onMounted(function () {
|
|
|
|
- checkWxOpenId()
|
|
|
|
-})
|
|
|
|
-
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
- <!--姓名、性别-->
|
|
|
|
- <el-row style="width: 100%">
|
|
|
|
- <el-row align="middle" style="margin-top: 10px;">
|
|
|
|
- <el-col :span="4">姓名</el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-input ref="userNameCompt" v-model="userName"></el-input>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row align="middle" style="margin-top: 10px;">
|
|
|
|
- <el-col :span="4"></el-col>
|
|
|
|
- <el-col :span="18" align="left">
|
|
|
|
- <el-switch
|
|
|
|
- v-model="isMan"
|
|
|
|
- class="ml-2"
|
|
|
|
- inline-prompt
|
|
|
|
- size="large"
|
|
|
|
- style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949; margin-right: 20px"
|
|
|
|
- active-text="男"
|
|
|
|
- inactive-text="女"
|
|
|
|
- />
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
- <el-row align="middle" style="margin-top: 10px">
|
|
|
|
- <el-col :span="4"></el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-space style="width: 100%">
|
|
|
|
- <el-radio-group v-model="dateMode">
|
|
|
|
- <el-radio v-for="(txt,index) in dateModeTexts" :value="index">{{ txt }}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-space>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
-
|
|
|
|
- <!--新历-->
|
|
|
|
- <el-row v-if="dateMode == 0" style="width: 100%;">
|
|
|
|
- <el-row align="middle" style="margin-top: 10px;">
|
|
|
|
- <el-col :span="4">年</el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-select v-model="curYear" @change="resetMaxDay" style="">
|
|
|
|
- <el-option v-for="opt in range(1900,2100)" :value="opt">{{ opt }}</el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row align="middle" style="margin-top: 10px">
|
|
|
|
- <el-col :span="4">月</el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-select v-model="curMonth" @change="resetMaxDay">
|
|
|
|
- <el-option v-for="opt in range(1,12)" :value="opt">{{ opt }}</el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row align="middle" style="margin-top: 10px">
|
|
|
|
- <el-col :span="4">日</el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-select v-model="curDay">
|
|
|
|
- <el-option v-for="opt in range(1,maxDay)" :value="opt">{{ opt }}</el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ <div v-if="!disablePage">
|
|
|
|
+ <!--姓名、性别-->
|
|
|
|
+ <el-row style="width: 100%">
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px;">
|
|
|
|
+ <el-col :span="4">姓名</el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-input ref="userNameCompt" v-model="userName"></el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px;">
|
|
|
|
+ <el-col :span="4"></el-col>
|
|
|
|
+ <el-col :span="18" align="left">
|
|
|
|
+ <el-switch
|
|
|
|
+ v-model="isMan"
|
|
|
|
+ class="ml-2"
|
|
|
|
+ inline-prompt
|
|
|
|
+ size="large"
|
|
|
|
+ style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949; margin-right: 20px"
|
|
|
|
+ active-text="男"
|
|
|
|
+ inactive-text="女"
|
|
|
|
+ />
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row align="middle" style="margin-top: 10px">
|
|
<el-row align="middle" style="margin-top: 10px">
|
|
<el-col :span="4"></el-col>
|
|
<el-col :span="4"></el-col>
|
|
<el-col :span="18">
|
|
<el-col :span="18">
|
|
<el-space style="width: 100%">
|
|
<el-space style="width: 100%">
|
|
- <el-radio-group v-model="knowTimeValue">
|
|
|
|
- <el-radio v-for="(txt,index) in knowTimeTexts" :value="index">{{ txt }}</el-radio>
|
|
|
|
|
|
+ <el-radio-group v-model="dateMode">
|
|
|
|
+ <el-radio v-for="(txt,index) in dateModeTexts" :value="index">{{ txt }}</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-space>
|
|
</el-space>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row align="middle" style="margin-top: 10px" v-if="knowTimeValue==0">
|
|
|
|
- <el-col :span="4">时</el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-select v-model="curHour">
|
|
|
|
- <el-option v-for="opt in range(0,23)" :value="opt">{{ opt }}</el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row align="middle" style="margin-top: 10px" v-if="knowTimeValue==0">
|
|
|
|
- <el-col :span="4">分</el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-select v-model="curMin">
|
|
|
|
- <el-option v-for="opt in range(0,59)" :value="opt">{{ opt }}</el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </el-row>
|
|
|
|
|
|
|
|
- <!--出生地-->
|
|
|
|
- <el-row style="width: 100%; margin-top: 20px">
|
|
|
|
- <el-row align="middle" style="margin-top: 10px">
|
|
|
|
- <el-col :span="4">省份</el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-select v-model="shengfen" @change="onShengFenSelected">
|
|
|
|
- <el-option v-for="sheng in getShengFens" :value="sheng">{{ sheng }}</el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ <!--新历-->
|
|
|
|
+ <el-row v-if="dateMode == 0" style="width: 100%;">
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px;">
|
|
|
|
+ <el-col :span="4">年</el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-select v-model="curYear" @change="resetMaxDay" style="">
|
|
|
|
+ <el-option v-for="opt in range(1900,2100)" :value="opt">{{ opt }}</el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px">
|
|
|
|
+ <el-col :span="4">月</el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-select v-model="curMonth" @change="resetMaxDay">
|
|
|
|
+ <el-option v-for="opt in range(1,12)" :value="opt">{{ opt }}</el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px">
|
|
|
|
+ <el-col :span="4">日</el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-select v-model="curDay">
|
|
|
|
+ <el-option v-for="opt in range(1,maxDay)" :value="opt">{{ opt }}</el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px">
|
|
|
|
+ <el-col :span="4"></el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-space style="width: 100%">
|
|
|
|
+ <el-radio-group v-model="knowTimeValue">
|
|
|
|
+ <el-radio v-for="(txt,index) in knowTimeTexts" :value="index">{{ txt }}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-space>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px" v-if="knowTimeValue==0">
|
|
|
|
+ <el-col :span="4">时</el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-select v-model="curHour">
|
|
|
|
+ <el-option v-for="opt in range(0,23)" :value="opt">{{ opt }}</el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px" v-if="knowTimeValue==0">
|
|
|
|
+ <el-col :span="4">分</el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-select v-model="curMin">
|
|
|
|
+ <el-option v-for="opt in range(0,59)" :value="opt">{{ opt }}</el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row align="middle" style="margin-top: 10px">
|
|
|
|
- <el-col :span="4">城市</el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-select v-model="chengshi" @change="onChengShiSelected">
|
|
|
|
- <el-option v-for="cs in chengshiOptions" :value="cs">{{ cs }}</el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ <!--出生地-->
|
|
|
|
+ <el-row style="width: 100%; margin-top: 20px">
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px">
|
|
|
|
+ <el-col :span="4">省份</el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-select v-model="shengfen" @change="onShengFenSelected">
|
|
|
|
+ <el-option v-for="sheng in getShengFens" :value="sheng">{{ sheng }}</el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px">
|
|
|
|
+ <el-col :span="4">城市</el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-select v-model="chengshi" @change="onChengShiSelected">
|
|
|
|
+ <el-option v-for="cs in chengshiOptions" :value="cs">{{ cs }}</el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row align="middle" style="margin-top: 10px">
|
|
|
|
+ <el-col :span="4">地区</el-col>
|
|
|
|
+ <el-col :span="18">
|
|
|
|
+ <el-select v-model="diqu">
|
|
|
|
+ <el-option v-for="dq in diquOptions" :value="dq">{{ dq }}</el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row align="middle" style="margin-top: 10px">
|
|
|
|
- <el-col :span="4">地区</el-col>
|
|
|
|
- <el-col :span="18">
|
|
|
|
- <el-select v-model="diqu">
|
|
|
|
- <el-option v-for="dq in diquOptions" :value="dq">{{ dq }}</el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+
|
|
|
|
+ <el-row align="middle" style="margin-top: 20px">
|
|
|
|
+ <el-col :span="4"></el-col>
|
|
|
|
+ <el-col :span="18" align="left">
|
|
|
|
+ <el-button :disabled="subButtonDisabled" @click="applyInfo" type="primary">提交信息</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- </el-row>
|
|
|
|
|
|
+ </div>
|
|
|
|
|
|
- <el-row align="middle" style="margin-top: 20px">
|
|
|
|
- <el-col :span="4"></el-col>
|
|
|
|
- <el-col :span="18" align="left">
|
|
|
|
- <el-button @click="applyInfo" type="primary">提交信息</el-button>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ <el-row v-if="disablePage">
|
|
|
|
+ <el-text :type="tipType" style="font-size: 24px">{{ lastMsg }}</el-text>
|
|
</el-row>
|
|
</el-row>
|
|
</template>
|
|
</template>
|
|
|
|
|