From 2df27fd1fa604fc6b2e5876b1b5e073f9a7f39ab Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期六, 11 五月 2024 19:24:08 +0800 Subject: [PATCH] 登录注册 --- src/pages/Register/Register.vue | 1423 +++++++++-------- src/static/initialize.css | 4 src/pages/inherit/index.vue | 71 src/pages/forgetPass/forgetPass.vue | 1256 ++++++++------- src/pages/knowledgeBase/knowledgeBase.vue | 2155 ++++++++++++++------------ 5 files changed, 2,622 insertions(+), 2,287 deletions(-) diff --git a/src/pages/Register/Register.vue b/src/pages/Register/Register.vue index 91d5e5d..e6907b1 100644 --- a/src/pages/Register/Register.vue +++ b/src/pages/Register/Register.vue @@ -1,366 +1,465 @@ <template> - <view class="container flex flex-center" style="align-items: flex-start;"> - <view class="repository relative"> - <view class="Ttop flex flex-center flex-wrap" style="flex-direction: column;"> - <view class=""></view> - <view class="" ref="Rtop"> - <text class="login"></text> - <text - style="font-size: .36rem;letter-spacing: 4rpx;vertical-align: middle;font-family: cursive;font-weight: bold;">涓浗鍖诲浜虹墿鐭ヨ瘑搴�</text> - </view> - <view></view> - </view> - <!-- 娉ㄥ唽鐢ㄦ埛 v-if="isRegister"--> - <el-card> - <view class="LoginTop" - style="display: flex; justify-content: space-between;margin-bottom: .47rem;align-items: center;"> - <!-- <view class="" style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">鐢ㄦ埛娉ㄥ唽</view> --> - <view class="LoginBg"></view> - <view class="" @click="BacktoLogin" - style="cursor: pointer;font-size: .14rem;color: #244A7B;font-weight: normal;"> - 宸叉湁璐﹀彿锛熻繑鍥炵櫥褰� - </view> - </view> - <el-form :hide-required-asterisk="true" ref="formLogin" label-position="right" :rules="rules" - :model="registerData"> - <el-form-item label="鐧诲綍璐﹀彿" prop="loginID"> - <el-input v-model="registerData.loginID" placeholder="鐢卞瓧姣嶆垨鏁板瓧缁勫悎3-15涓瓧绗︾粍鎴�"></el-input> - </el-form-item> - <el-form-item label="鐧诲綍瀵嗙爜" prop="pass"> - <el-input type="password" v-model="registerData.pass" - placeholder="瀛楁瘝銆佹暟瀛楁垨鐗规畩绗﹀彿缁勬垚(6-10)涓瓧绗�"></el-input> - </el-form-item> - <el-form-item label="纭瀵嗙爜" prop="checkPass"> - <el-input type="password" v-model="registerData.checkPass" placeholder="蹇呴』涓庡瘑鐮佷竴鑷�"></el-input> - </el-form-item> - <el-form-item label="鎵嬫満/閭" prop="cellphoneORmailbox"> - <el-input v-model="registerData.cellphoneORmailbox" placeholder="璇峰~鍐欐纭殑鎵嬫満鎴栫數瀛愰偖绠卞湴鍧�"></el-input> - </el-form-item> - <el-form-item label="楠岃瘉鐮�" prop="verifyCode"> - <view class="verifyCode relative"> - <el-input v-model="registerData.verifyCode" placeholder="璇疯緭鍏ラ獙璇佺爜"></el-input> - <view @click="verifyCodeClick" class="yzm" - style="position: absolute;right: 0%;top: 0%;color: #244A7B;font-size: .14rem;font-weight: 500;"> - 鑾峰彇楠岃瘉鐮�</view> - </view> - </el-form-item> - <el-form-item class="btn" style="margin-bottom: .09rem;"> - <el-button class="font-family" - style="margin-top: .22rem; font-weight:900;font-size: .3rem; width: 100%;background-color:#244A7B;color: #fff;padding: .16rem;" - size="medium" @click="Login('formLogin')">娉ㄥ唽</el-button> - </el-form-item> - <view class="asdf" - style="font-size: .12rem;color: #9E9E9E;font-weight: 500; text-align: center;line-height: normal;margin-bottom: .19rem;"> - 鐢ㄦ埛娉ㄥ唽鍗充唬琛ㄥ悓鎰� <span class="cursor" @click="termOfServiceClick(1)">銆婃湇鍔℃潯娆俱��</span> 鍜�<span - class="cursor" @click="termOfServiceClick(2)">銆婄敤鎴烽殣绉佷繚鎶ゅ拰涓汉淇℃伅鏉℃銆�</span> - </view> - </el-form> - </el-card> - </view> - <view class="hua"></view> - <!-- 搴曢儴浜虹墿鑳屾櫙鍥惧乏渚� --> - <view class="fff"></view> - <!-- 搴曢儴鑺辩殑鑳屾櫙鍥惧彸渚� --> - <view class="rrr"></view> - <Footer1 /> - </view> + <view class="container flex flex-center" style="align-items: flex-start"> + <view class="repository relative"> + <view + class="Ttop flex flex-center flex-wrap" + style="flex-direction: column" + > + <view class=""></view> + <view class="" ref="Rtop"> + <text class="login"></text> + <text + style=" + font-size: 0.36rem; + letter-spacing: 4rpx; + vertical-align: middle; + font-family: cursive; + font-weight: bold; + " + >涓浗鍖诲浜虹墿鐭ヨ瘑搴�</text + > + </view> + <view></view> + </view> + <!-- 娉ㄥ唽鐢ㄦ埛 v-if="isRegister"--> + <el-card> + <view + class="LoginTop" + style=" + display: flex; + justify-content: space-between; + margin-bottom: 0.47rem; + align-items: center; + " + > + <!-- <view class="" style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">鐢ㄦ埛娉ㄥ唽</view> --> + <view class="LoginBg"></view> + <view + class="" + @click="BacktoLogin" + style=" + cursor: pointer; + font-size: 0.14rem; + color: #244a7b; + font-weight: normal; + " + > + 宸叉湁璐﹀彿锛熻繑鍥炵櫥褰� + </view> + </view> + <el-form + :hide-required-asterisk="true" + ref="formLogin" + label-position="right" + :rules="rules" + :model="registerData" + > + <el-form-item label="鐧诲綍璐﹀彿" prop="loginID"> + <el-input + v-model="registerData.loginID" + placeholder="鐢卞瓧姣嶆垨鏁板瓧缁勫悎3-15涓瓧绗︾粍鎴�" + ></el-input> + </el-form-item> + <el-form-item label="鐧诲綍瀵嗙爜" prop="pass"> + <el-input + type="password" + v-model="registerData.pass" + placeholder="瀛楁瘝銆佹暟瀛楁垨鐗规畩绗﹀彿缁勬垚(6-10)涓瓧绗�" + ></el-input> + </el-form-item> + <el-form-item label="纭瀵嗙爜" prop="checkPass"> + <el-input + type="password" + v-model="registerData.checkPass" + placeholder="蹇呴』涓庡瘑鐮佷竴鑷�" + ></el-input> + </el-form-item> + <el-form-item label="鎵嬫満鍙�" prop="cellphoneORmailbox"> + <el-input + v-model="registerData.cellphoneORmailbox" + placeholder="璇峰~鍐欐纭殑鎵嬫満" + ></el-input> + </el-form-item> + <el-form-item label="楠岃瘉鐮�" prop="verifyCode"> + <view class="verifyCode relative"> + <el-input + v-model="registerData.verifyCode" + placeholder="璇疯緭鍏ラ獙璇佺爜" + ></el-input> + <view + @click="verifyCodeClick" + class="yzm" + style=" + position: absolute; + right: 0%; + top: 0%; + color: #244a7b; + font-size: 0.14rem; + font-weight: 500; + " + > + {{ + countdown > 0 ? `${countdown}绉掑悗閲嶆柊鑾峰彇` : "鑾峰彇楠岃瘉鐮�" + }}</view + > + </view> + </el-form-item> + <el-form-item class="btn" style="margin-bottom: 0.09rem"> + <el-button + class="font-family" + style=" + margin-top: 0.22rem; + font-weight: 900; + font-size: 0.3rem; + width: 100%; + background-color: #244a7b; + color: #fff; + padding: 0.16rem; + " + size="medium" + @click="Login('formLogin')" + >娉ㄥ唽</el-button + > + </el-form-item> + <view + class="asdf" + style=" + font-size: 0.12rem; + color: #9e9e9e; + font-weight: 500; + text-align: center; + line-height: normal; + margin-bottom: 0.19rem; + " + > + 鐢ㄦ埛娉ㄥ唽鍗充唬琛ㄥ悓鎰� + <span class="cursor" @click="termOfServiceClick(1)" + >銆婃湇鍔℃潯娆俱��</span + > + 鍜�<span class="cursor" @click="termOfServiceClick(2)" + >銆婄敤鎴烽殣绉佷繚鎶ゅ拰涓汉淇℃伅鏉℃銆�</span + > + </view> + </el-form> + </el-card> + </view> + <view class="hua"></view> + <!-- 搴曢儴浜虹墿鑳屾櫙鍥惧乏渚� --> + <view class="fff"></view> + <!-- 搴曢儴鑺辩殑鑳屾櫙鍥惧彸渚� --> + <view class="rrr"></view> + <Footer1 /> + </view> </template> <script> - import { - getaddLogin, - getverifyCode - } from '@/api/index.js' - import { - encryptAES - } from '@/utils/Crypto.js' - import { - nextTick - } from "vue"; - import Footer1 from '@/components/footer/footer.vue' - export default { - components: { - Footer1 - }, - data() { - // 瀵嗙爜 - var validatePass = (rule, value, callback) => { - if (value === '') { - callback(new Error('璇疯緭鍏ュ瘑鐮�')); - } else { - if (this.registerData.checkPass !== '') { - this.$nextTick(() => { - this.$refs.formLogin.validateField('checkPass'); - }); - } - callback(); - } - }; - // 纭瀵嗙爜 - var validatePass2 = (rule, value, callback) => { - if (value === '') { - callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�')); - } else if (value !== this.registerData.pass) { - callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!')); - } else { - callback(); - } - }; - return { - // 鐢ㄦ埛娉ㄥ唽 - isRegister: false, - // 鐢ㄦ埛鐧诲綍 - isLogin: true, - // 淇敼瀵嗙爜 - isAmendPass: false, - // 閲嶇疆瀵嗙爜 - isResetPass: false, - // 娉ㄥ唽鐢ㄦ埛璐﹀彿鐨勬牎楠� - rules: { - loginID: [{ - required: true, - message: '璇疯緭鍏ョ櫥褰曡处鍙�', - trigger: 'blur' - }, - { - pattern: /^[a-zA-Z0-9]{3,15}$/, - message: '璇疯緭鍏�3-15涓瓧绗︾殑瀛楁瘝鎴栨暟瀛�', - trigger: 'blur' - } // 鑷畾涔夋牎楠岃鍒欙紝浣跨敤姝e垯琛ㄨ揪寮� - ], - pass: [{ - required: true, - message: '璇疯緭鍏ュ瘑鐮�', - trigger: 'blur' - }, - { - min: 6, - max: 10, - message: '瀵嗙爜闀垮害鍦� 6 鍒� 12 涓瓧绗�', - trigger: 'blur' - }, - { - validator: validatePass, - trigger: 'blur' - } - ], - checkPass: [{ - validator: validatePass2, - trigger: 'blur' - }], - cellphoneORmailbox: [{ - required: true, - message: '璇疯緭鍏ユ墜鏈哄彿鎴栭偖绠�', - trigger: 'blur' - }, - { - validator: this.validateContact, - trigger: 'blur' - } - ], - verifyCode: [{ - required: true, - message: '璇疯緭鍏ラ獙璇佺爜', - trigger: 'blur' - }] - }, - // 鐧诲綍娉ㄥ唽妗� - loginTrue: true, - Rtop1: 0, - value: 'sdfdsf', - // 娉ㄥ唽鐢ㄦ埛瀵瑰簲鐨勬暟鎹� - registerData: { - loginID: '', - pass: '', - checkPass: '', - cellphoneORmailbox: '', - verifyCode: '' - }, - // 鐧诲綍鐢ㄦ埛璐﹀彿 - loginData: { - // 璐﹀彿 - loginID: '', - pass: '' - }, - // 閲嶇疆瀵嗙爜 - resetDataPass: { - cellphoneORmailbox: '', - verifyCode: "", - newPass: "", - checkPass: "" - }, - // 淇敼瀵嗙爜 - amendDataPass: { - loginID: '', - originalPass: "", - newPass: "", - checkPass: "" - }, - // 涔︾睄鏁版嵁 - listData: [{ - name: '涓尰浜虹墿鏁版嵁搴�', - id: 1, - }, { - name: '涓栧尰鍖诲鏁版嵁搴�', - id: 2, - }, { - name: '涓尰瀛︽湳娴佹淳', - id: 3, - }, { - name: '涓尰鍦板煙鍖昏氨', - id: 4, - }, { - name: '涓尰鍖讳簨鍒跺害', - id: 5, - }, +import { getaddLogin, getverifyCode } from "@/api/index.js"; +import { encryptAES } from "@/utils/Crypto.js"; +import { nextTick } from "vue"; +import Footer1 from "@/components/footer/footer.vue"; +export default { + components: { + Footer1, + }, + data() { + // 瀵嗙爜 + var validatePass = (rule, value, callback) => { + if (value === "") { + callback(new Error("璇疯緭鍏ュ瘑鐮�")); + } else { + if (this.registerData.checkPass !== "") { + this.$nextTick(() => { + this.$refs.formLogin.validateField("checkPass"); + }); + } + callback(); + } + }; + // 纭瀵嗙爜 + var validatePass2 = (rule, value, callback) => { + if (value === "") { + callback(new Error("璇峰啀娆¤緭鍏ュ瘑鐮�")); + } else if (value !== this.registerData.pass) { + callback(new Error("涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!")); + } else { + callback(); + } + }; + return { + //楠岃瘉鐮佸�掕鏃� + countdown: 0, + // 鐢ㄦ埛娉ㄥ唽 + isRegister: false, + // 鐢ㄦ埛鐧诲綍 + isLogin: true, + // 淇敼瀵嗙爜 + isAmendPass: false, + // 閲嶇疆瀵嗙爜 + isResetPass: false, + // 娉ㄥ唽鐢ㄦ埛璐﹀彿鐨勬牎楠� + rules: { + loginID: [ + { + required: true, + message: "璇疯緭鍏ョ櫥褰曡处鍙�", + trigger: "blur", + }, + { + pattern: /^[a-zA-Z0-9]{3,15}$/, + message: "璇疯緭鍏�3-15涓瓧绗︾殑瀛楁瘝鎴栨暟瀛�", + trigger: "blur", + }, // 鑷畾涔夋牎楠岃鍒欙紝浣跨敤姝e垯琛ㄨ揪寮� + ], + pass: [ + { + required: true, + message: "璇疯緭鍏ュ瘑鐮�", + trigger: "blur", + }, + { + min: 6, + max: 10, + message: "瀵嗙爜闀垮害鍦� 6 鍒� 12 涓瓧绗�", + trigger: "blur", + }, + { + validator: validatePass, + trigger: "blur", + }, + ], + checkPass: [ + { + validator: validatePass2, + trigger: "blur", + }, + ], + cellphoneORmailbox: [ + { + required: true, + message: "璇疯緭鍏ユ墜鏈�", + trigger: "blur", + }, + { + validator: this.validateContact, + trigger: "blur", + }, + ], + verifyCode: [ + { + required: true, + message: "璇疯緭鍏ラ獙璇佺爜", + trigger: "blur", + }, + ], + }, + // 鐧诲綍娉ㄥ唽妗� + loginTrue: true, + Rtop1: 0, + value: "sdfdsf", + // 娉ㄥ唽鐢ㄦ埛瀵瑰簲鐨勬暟鎹� + registerData: { + loginID: "", + pass: "", + checkPass: "", + cellphoneORmailbox: null, + verifyCode: "", + }, + // 鐧诲綍鐢ㄦ埛璐﹀彿 + loginData: { + // 璐﹀彿 + loginID: "", + pass: "", + }, + // 閲嶇疆瀵嗙爜 + resetDataPass: { + cellphoneORmailbox: null, + verifyCode: "", + newPass: "", + checkPass: "", + }, + // 淇敼瀵嗙爜 + amendDataPass: { + loginID: "", + originalPass: "", + newPass: "", + checkPass: "", + }, + // 涔︾睄鏁版嵁 + listData: [ + { + name: "涓尰浜虹墿鏁版嵁搴�", + id: 1, + }, + { + name: "涓栧尰鍖诲鏁版嵁搴�", + id: 2, + }, + { + name: "涓尰瀛︽湳娴佹淳", + id: 3, + }, + { + name: "涓尰鍦板煙鍖昏氨", + id: 4, + }, + { + name: "涓尰鍖讳簨鍒跺害", + id: 5, + }, + ], + }; + }, + onLoad() { + uni.getSystemInfo({ + success: function (info) { + // console.log('灞忓箷鐨勫搴︼細' + info.windowWidth); + // console.log('灞忓箷鐨勯珮搴︼細' + info.windowHeight); + }, + }); + }, + mounted() { + this.getElementWidth(); + }, + methods: { + // 鏈嶅姟鏉℃ + termOfServiceClick(number) { + // console.log(number); + if (number == 1) { + console.log("鏈嶅姟鏉℃"); + window.open(`#/pages/userAgreement/userAgreement`); + // uni.navigateTo({ + // url: '/pages/userAgreement/userAgreement' + // }) + } else if (number == 2) { + window.open(`#/pages/userAgreement/userAgreement`); + console.log("鐢ㄦ埛闅愮淇濇姢鍜屼釜浜轰俊鎭潯娆�"); + } + }, + // 宸叉湁璐﹀彿锛熻繑鍥炵櫥褰� + BacktoLogin() { + uni.redirectTo({ + url: "/pages/Login/Login", + }); + }, + // 鑾峰彇楠岃瘉鐮� + async verifyCodeClick() { + console.log(this.registerData.cellphoneORmailbo, "registerData"); + if (!this.registerData.cellphoneORmailbox) { + this.$message({ + message: "璇疯緭鍏ユ墜鏈猴紒", + type: "warning", + }); - ] - } - }, - onLoad() { - uni.getSystemInfo({ - success: function(info) { - // console.log('灞忓箷鐨勫搴︼細' + info.windowWidth); - // console.log('灞忓箷鐨勯珮搴︼細' + info.windowHeight); - } - }); - }, - mounted() { - this.getElementWidth(); - }, - methods: { - // 鏈嶅姟鏉℃ - termOfServiceClick(number) { - // console.log(number); - if (number == 1) { - console.log('鏈嶅姟鏉℃'); - window.open(`#/pages/userAgreement/userAgreement`) - // uni.navigateTo({ - // url: '/pages/userAgreement/userAgreement' - // }) - } else if (number == 2) { - window.open(`#/pages/userAgreement/userAgreement`) - console.log('鐢ㄦ埛闅愮淇濇姢鍜屼釜浜轰俊鎭潯娆�'); - } - }, - // 宸叉湁璐﹀彿锛熻繑鍥炵櫥褰� - BacktoLogin() { - uni.redirectTo({ - url: '/pages/Login/Login' - }) - }, - // 鑾峰彇楠岃瘉鐮� - async verifyCodeClick() { - let Obj = { - communicateParam: this.registerData.cellphoneORmailbox, - } - console.log(Obj); - let code = await getverifyCode(Obj) - console.log(code, '鑾峰彇楠岃瘉鐮�'); - // console.log('鑾峰彇楠岃瘉鐮�'); - }, - // 楠岃瘉鐮佹牎楠� - validateVerificationCode(rule, value, callback) { - if (value !== '123456') { - // callback(new Error('楠岃瘉鐮侀敊璇�')); - callback() - } else { - callback(); - } - }, - // 鎵嬫満鍙�/鎴栬�呴偖绠� - validateContact(rule, value, callback) { - const regPhone = /^1[0-9]{10}$/; - const regEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; - console.log(value, regPhone.test(value), regEmail.test(value)); - if (regPhone.test(value) || regEmail.test(value)) { - callback(); // 鏍¢獙閫氳繃 - } else { - callback(new Error('璇疯緭鍏ユ纭殑鎵嬫満鍙锋垨閭')); // 鏍¢獙澶辫触 - } - }, - getElementWidth() { - this.$nextTick(() => { - var width = this.$refs.Rtop.$el.clientWidth; - this.Rtop1 = width + 50; - console.log('Element width:', width); - }) - }, - // 鐢ㄦ埛娉ㄥ唽 - async Login(formName) { - console.log(formName); - let Obj = { - username: this.registerData.loginID, - password: encryptAES(this.registerData.pass), - communicateParam: this.registerData.cellphoneORmailbox, - verifyCode: this.registerData.verifyCode, - } - this.$refs[formName].validate(async (valid) => { - if (valid) { - // alert('submit!'); - console.log('sdfds'); - await getaddLogin(Obj).then(res => { - console.log(res, '娉ㄥ唽鎴愬姛'); - if(res.success==true){ - uni.showToast({ - title: res.errorText, - icon: 'success' - }); - uni.navigateTo({ - url: '/pages/Login/Login' - }) - }else{ - uni.showToast({ - title: res.errorText, - icon: 'error' - }); - } - }) - // encryptAES - // uni.navigateTo({ - // url: '/pages/Login/Login' - // }) - } else { - console.log('error submit!!'); - return false; - } - }); + return false; + } + if (this.countdown > 0) { + return; + } + let Obj = { + communicateParam: this.registerData.cellphoneORmailbox, + }; + this.countdown = 60; + const intervalId = setInterval(() => { + if (this.countdown > 0) { + this.countdown -= 1; + } else { + clearInterval(intervalId); + } + }, 1000); + let code = await getverifyCode(Obj); - // console.log(Obj, '鐢ㄦ埛鐧诲綍鐨勭櫥褰曟寜閽�'); + }, + // 鎵嬫満鍙�/鎴栬�呴偖绠� + validateContact(rule, value, callback) { + const regPhone = /^1[0-9]{10}$/; + const regEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; + console.log(value, regPhone.test(value), regEmail.test(value)); + if (regPhone.test(value) || regEmail.test(value)) { + callback(); // 鏍¢獙閫氳繃 + } else { + callback(new Error("璇疯緭鍏ユ纭殑鎵嬫満鍙�")); // 鏍¢獙澶辫触 + } + }, + getElementWidth() { + this.$nextTick(() => { + var width = this.$refs.Rtop.$el.clientWidth; + this.Rtop1 = width + 50; + console.log("Element width:", width); + }); + }, + // 鐢ㄦ埛娉ㄥ唽 + async Login(formName) { + console.log(formName); + let Obj = { + username: this.registerData.loginID, + password: encryptAES(this.registerData.pass), + communicateParam: this.registerData.cellphoneORmailbox, + verifyCode: this.registerData.verifyCode, + }; + this.$refs[formName].validate(async (valid) => { + if (valid) { + // alert('submit!'); + console.log("sdfds"); + await getaddLogin(Obj).then((res) => { + console.log(res, "娉ㄥ唽鎴愬姛"); + if (res.success == true) { + uni.showToast({ + title: res.errorText, + icon: "success", + }); + uni.navigateTo({ + url: "/pages/Login/Login", + }); + } else { + uni.showToast({ + title: res.errorText, + icon: "error", + }); + } + }); + // encryptAES + // uni.navigateTo({ + // url: '/pages/Login/Login' + // }) + } else { + console.log("error submit!!"); + return false; + } + }); - // let res = await getaddLogin(Obj) - // console.log('sdfdsfs', res); + // console.log(Obj, '鐢ㄦ埛鐧诲綍鐨勭櫥褰曟寜閽�'); - }, - } - } + // let res = await getaddLogin(Obj) + // console.log('sdfdsfs', res); + }, + }, +}; </script> <style scoped> - @media screen and (max-width:1366px) { - ::v-deep .el-card { - top: 50% !important; - } +@media screen and (max-width: 1366px) { + ::v-deep .el-card { + top: 50% !important; + } - ::v-deep .el-input__inner { - height: .44rem; - } + ::v-deep .el-input__inner { + height: 0.44rem; + } - ::v-deep .el-card { - padding: .2rem 0 !important; - } + ::v-deep .el-card { + padding: 0.2rem 0 !important; + } - .LoginBg { - margin: 0 !important; - } + .LoginBg { + margin: 0 !important; + } - .hua { - height: 5rem !important; - } - } + .hua { + height: 5rem !important; + } +} - @media screen and (min-width:1366px) and (max-width:1920px) { - - /* ::v-deep .el-card__body { +@media screen and (min-width: 1366px) and (max-width: 1920px) { + /* ::v-deep .el-card__body { padding: 0 .58rem !important; } @@ -383,69 +482,68 @@ .hua { height: 5rem !important; } */ - .LoginBg { - margin: 0 !important; - height: .3rem !important; - } + .LoginBg { + margin: 0 !important; + height: 0.3rem !important; + } - ::v-deep .el-card { - top: 70% !important; - padding: 0 !important; - } + ::v-deep .el-card { + top: 70% !important; + padding: 0 !important; + } - ::v-deep .el-card__body { - padding: .25rem .5rem !important; - } + ::v-deep .el-card__body { + padding: 0.25rem 0.5rem !important; + } - ::v-deep .el-form { - padding-left: .1rem !important; - } + ::v-deep .el-form { + padding-left: 0.1rem !important; + } - ::v-deep .el-form-item__error { - font-size: .13rem !important; - } + ::v-deep .el-form-item__error { + font-size: 0.13rem !important; + } - ::v-deep .el-input__inner { - height: .35rem !important; - } + ::v-deep .el-input__inner { + height: 0.35rem !important; + } - .hua { - height: 5rem !important; - } + .hua { + height: 5rem !important; + } - .LoginTop { - margin-bottom: .25rem !important; - } + .LoginTop { + margin-bottom: 0.25rem !important; + } - .yzm { - top: 15% !important; - } + .yzm { + top: 15% !important; + } - .fff { - width: 2.4rem !important; - height: 4rem !important; - } + .fff { + width: 2.4rem !important; + height: 4rem !important; + } - .rrr { - width: 2rem !important; - height: 2.5rem !important; - } + .rrr { + width: 2rem !important; + height: 2.5rem !important; + } - .btn ::v-deep .el-button { - margin-top: 0.2rem !important; - /* font-size: 0.2rem !important; + .btn ::v-deep .el-button { + margin-top: 0.2rem !important; + /* font-size: 0.2rem !important; width: 100%; padding: 0.12rem !important; */ - } + } - .asdf { - margin-bottom: .1rem !important; - } - } + .asdf { + margin-bottom: 0.1rem !important; + } +} - @media screen and (min-width: 1920px) and (max-width:2560px) { - - /* ::v-deep .el-card { +@media screen and (min-width: 1920px) and (max-width: 2560px) { + /* ::v-deep .el-card { top: 80% !important; } @@ -522,129 +620,128 @@ ::v-deep .el-input__inner { height: .35rem !important; } */ - .LoginBg { - margin: 0 !important; - height: .3rem !important; - } + .LoginBg { + margin: 0 !important; + height: 0.3rem !important; + } - ::v-deep .el-card { - top: 70% !important; - padding: 0 !important; - } + ::v-deep .el-card { + top: 70% !important; + padding: 0 !important; + } - ::v-deep .el-card__body { - padding: .25rem .5rem !important; - } + ::v-deep .el-card__body { + padding: 0.25rem 0.5rem !important; + } - ::v-deep .el-form { - padding-left: .1rem !important; - } + ::v-deep .el-form { + padding-left: 0.1rem !important; + } - ::v-deep .el-form-item__error { - font-size: .13rem !important; - } + ::v-deep .el-form-item__error { + font-size: 0.13rem !important; + } - ::v-deep .el-input__inner { - height: .35rem !important; - } + ::v-deep .el-input__inner { + height: 0.35rem !important; + } - .hua { - height: 5rem !important; - } + .hua { + height: 5rem !important; + } - .LoginTop { - margin-bottom: .25rem !important; - } + .LoginTop { + margin-bottom: 0.25rem !important; + } - .yzm { - top: 15% !important; - } + .yzm { + top: 15% !important; + } - .fff { - width: 2.4rem !important; - height: 4rem !important; - } + .fff { + width: 2.4rem !important; + height: 4rem !important; + } - .rrr { - width: 2rem !important; - height: 2.5rem !important; - } + .rrr { + width: 2rem !important; + height: 2.5rem !important; + } - .btn ::v-deep .el-button { - margin-top: 0.2rem !important; - /* font-size: 0.2rem !important; + .btn ::v-deep .el-button { + margin-top: 0.2rem !important; + /* font-size: 0.2rem !important; width: 100%; padding: 0.12rem !important; */ - } + } - .asdf { - margin-bottom: .1rem !important; - } - } + .asdf { + margin-bottom: 0.1rem !important; + } +} - @media screen and (min-width:2560px)and (max-width:3840px) { - .LoginBg { - margin: 0 !important; - height: .3rem !important; - } +@media screen and (min-width: 2560px) and (max-width: 3840px) { + .LoginBg { + margin: 0 !important; + height: 0.3rem !important; + } - ::v-deep .el-card { - top: 70% !important; - padding: 0 !important; - } + ::v-deep .el-card { + top: 70% !important; + padding: 0 !important; + } - ::v-deep .el-card__body { - padding: .25rem .5rem !important; - } + ::v-deep .el-card__body { + padding: 0.25rem 0.5rem !important; + } - ::v-deep .el-form { - padding-left: .1rem !important; - } + ::v-deep .el-form { + padding-left: 0.1rem !important; + } - ::v-deep .el-form-item__error { - font-size: .13rem !important; - } + ::v-deep .el-form-item__error { + font-size: 0.13rem !important; + } - ::v-deep .el-input__inner { - height: .35rem !important; - } + ::v-deep .el-input__inner { + height: 0.35rem !important; + } - .hua { - height: 5rem !important; - } + .hua { + height: 5rem !important; + } - .LoginTop { - margin-bottom: .25rem !important; - } + .LoginTop { + margin-bottom: 0.25rem !important; + } - .yzm { - top: 15% !important; - } + .yzm { + top: 15% !important; + } - .fff { - width: 2.4rem !important; - height: 4rem !important; - } + .fff { + width: 2.4rem !important; + height: 4rem !important; + } - .rrr { - width: 2rem !important; - height: 2.5rem !important; - } + .rrr { + width: 2rem !important; + height: 2.5rem !important; + } - .btn ::v-deep .el-button { - margin-top: 0.2rem !important; - /* font-size: 0.2rem !important; + .btn ::v-deep .el-button { + margin-top: 0.2rem !important; + /* font-size: 0.2rem !important; width: 100%; padding: 0.12rem !important; */ - } + } - .asdf { - margin-bottom: .1rem !important; - } + .asdf { + margin-bottom: 0.1rem !important; + } +} - } - - /* @media screen and (max-width: 1366px){ +/* @media screen and (max-width: 1366px){ ::v-deep .el-card{ top: 60% !important; } @@ -659,9 +756,9 @@ } */ - /* +/* 鍦ㄥ睆骞曞搴﹁秴杩� 1440px 鏃剁殑鏍峰紡璁剧疆 */ - /* @media screen and (min-width: 1441px) { +/* @media screen and (min-width: 1441px) { ::v-deep .el-card { top: 80% !important; } @@ -689,209 +786,195 @@ } } */ +.LoginBg { + width: 1.2rem; + height: 0.37rem; + background: url(@/static/image/鐢ㄦ埛娉ㄥ唽.png) no-repeat 0 0; + background-size: 100% 100%; + /* border: 10px solid red; */ +} - .LoginBg { - width: 1.2rem; - height: .37rem; - background: url(@/static/image/鐢ㄦ埛娉ㄥ唽.png) no-repeat 0 0; - background-size: 100% 100%; - /* border: 10px solid red; */ +::v-deep .el-card { + border-radius: 0; + width: 5.42rem; + /* height: 5.65rem; */ + position: absolute; + top: 80%; +} - } +::v-deep .el-card__body { + padding: 0.175rem 0.58rem; +} +.btn >>> .el-form-item__content { + margin-left: 0 !important; +} - ::v-deep .el-card { - border-radius: 0; - width: 5.42rem; - /* height: 5.65rem; */ - position: absolute; - top: 80%; - } +::v-deep .el-form-item__content { + margin-left: 0 !important; + flex: 1; +} - ::v-deep .el-card__body { - padding: .175rem .58rem; - } +::v-deep .el-input__inner { + border: none; + border-bottom: 1px solid #2d476a; + border-radius: 0; + padding: 0; + height: 0.4rem; + line-height: 0.4rem; + font-size: 0.14rem; +} - .btn>>>.el-form-item__content { - margin-left: 0 !important; +::v-deep .el-form-item__error { + /* display: none; */ + font-size: 0.12rem; +} - } +::v-deep .input.invalid:focus { + border-color: #2d476a !important; +} - ::v-deep .el-form-item__content { - margin-left: 0 !important; - flex: 1; - } +::v-deep .el-input__inner:invalid { + border-color: #2d476a !important; +} - ::v-deep .el-input__inner { - border: none; - border-bottom: 1px solid #2d476a; - border-radius: 0; - padding: 0; - height: .4rem; - line-height: .4rem; - font-size: .14rem; - } +::v-deep .el-form-item__label { + min-width: 0.6rem; + padding: 0; + color: #244a7b; + font-size: 0.14rem; + font-weight: 500; + margin-right: 0.29rem; + display: flex; + align-items: center; + text-align: right; +} - ::v-deep .el-form-item__error { - /* display: none; */ - font-size: .12rem; - } +::v-deep .el-form-item { + margin-bottom: 0.22rem; + display: flex; +} - ::v-deep .input.invalid:focus { - border-color: #2d476a !important; - } +.ss1 { + background-repeat: no-repeat; + background-size: 100% 100%; + width: 40rpx; + height: 40rpx; + background-size: 100% 100%; +} - ::v-deep .el-input__inner:invalid { - border-color: #2d476a !important; - } +.s1 { + background-image: url(@/static/image/search.png); +} +.s2 { + background-image: url(@/static/image/question.png); +} - ::v-deep .el-form-item__label { - min-width: .6rem; - padding: 0; - color: #244A7B; - font-size: .14rem; - font-weight: 500; - margin-right: .29rem; - display: flex; - align-items: center; - text-align: right; - } +.s3 { + background-image: url(@/static/image/question.png); +} - ::v-deep .el-form-item { - margin-bottom: .22rem; - display: flex; - } +.container { + background: url(@/static/image/bg1.png); + width: 100vw; + height: 100vh; - .ss1 { - background-repeat: no-repeat; - background-size: 100% 100%; - width: 40rpx; - height: 40rpx; - background-size: 100% 100%; - } + color: #fff; - .s1 { - background-image: url(@/static/image/search.png); + .repository { + width: 100% !important; + /* margin-top: 19px; */ + /* height: 68%; */ + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; - } + .Ttop { + margin-top: 0.38rem; + margin-bottom: 1.22rem; + } - .s2 { - background-image: url(@/static/image/question.png); - } + .r-top { + font-size: 40rpx !important; + margin: 10rpx 0; + } + } +} - .s3 { - background-image: url(@/static/image/question.png); - } +.login { + width: 0.52rem; + height: 0.52rem; + display: inline-block; + vertical-align: middle; + margin-right: 0.19rem; + background: url(@/static/image/logo.png) no-repeat 0 0; + background-size: 100% 100%; +} - .container { - background: url(@/static/image/bg1.png); - width: 100vw; - height: 100vh; +.rrr { + position: absolute; + right: 0.53rem; + bottom: 0.36rem; + width: 2.5rem; + height: 3.07rem; + opacity: 1; + background: url(@/static/image/bg4.png); + background-size: 100% 100%; +} - color: #fff; +.hua { + width: 13.81rem; + height: 5.965rem; + position: absolute; + background: url(@/static/image/bg3.png) no-repeat 0 0; + background-size: 100% 100%; +} - .repository { - width: 100% !important; - /* margin-top: 19px; */ - /* height: 68%; */ - display: flex; - flex-direction: column; - justify-content: space-around; - align-items: center; +/* 搴曢儴浜虹墿鑳屾櫙鍥� */ +.fff { + background: url(@/static/image/bg2.png) no-repeat 0 0; + background-size: 100% 100%; + width: 2.74rem; + height: 4.52rem; + position: fixed; + bottom: 0; + z-index: 9999999999999; + left: 0; +} - .Ttop { - margin-top: .38rem; - margin-bottom: 1.22rem; - } +::v-deep .uni-easyinput__content { + border-radius: 30rpx !important; + /* height: 52rpx; */ +} - .r-top { - font-size: 40rpx !important; - margin: 10rpx 0; - } - } +.secretary { + width: 1300rpx !important; + height: 50rpx; + /* height: 80%; */ + /* flex-wrap: wrap; */ + padding: 0 20px; + text-align: center; - } + li { + background-color: #fff; + color: black; + height: 600rpx; + display: flex; + justify-content: space-between; + flex-direction: column; + align-items: center; + border: 1rpx solid #fff; + padding: 50rpx 65rpx; + /* padding: 58rpx 128rpx 88rpx; */ + text-align: center; + background: #ebf4ff; + } +} - .login { - width: .52rem; - height: .52rem; - display: inline-block; - vertical-align: middle; - margin-right: .19rem; - background: url(@/static/image/logo.png) no-repeat 0 0; - background-size: 100% 100%; - } - - .rrr { - position: absolute; - right: .53rem; - bottom: .36rem; - width: 2.5rem; - height: 3.07rem; - opacity: 1; - background: url(@/static/image/bg4.png); - background-size: 100% 100%; - } - - .hua { - width: 13.81rem; - height: 5.965rem; - position: absolute; - background: url(@/static/image/bg3.png) no-repeat 0 0; - background-size: 100% 100%; - } - - /* 搴曢儴浜虹墿鑳屾櫙鍥� */ - .fff { - background: url(@/static/image/bg2.png) no-repeat 0 0; - background-size: 100% 100%; - width: 2.74rem; - height: 4.52rem; - position: fixed; - bottom: 0; - z-index: 9999999999999; - left: 0; - } - - ::v-deep .uni-easyinput__content { - border-radius: 30rpx !important; - /* height: 52rpx; */ - } - - - .secretary { - width: 1300rpx !important; - height: 50rpx; - /* height: 80%; */ - /* flex-wrap: wrap; */ - padding: 0 20px; - text-align: center; - - - - - li { - background-color: #fff; - color: black; - height: 600rpx; - display: flex; - justify-content: space-between; - flex-direction: column; - align-items: center; - border: 1rpx solid #fff; - padding: 50rpx 65rpx; - /* padding: 58rpx 128rpx 88rpx; */ - text-align: center; - background: #EBF4FF; - } - } - - - - .Bbottom { - display: flex; - justify-content: center; - - } -</style> \ No newline at end of file +.Bbottom { + display: flex; + justify-content: center; +} +</style> diff --git a/src/pages/forgetPass/forgetPass.vue b/src/pages/forgetPass/forgetPass.vue index c613901..b6067b8 100644 --- a/src/pages/forgetPass/forgetPass.vue +++ b/src/pages/forgetPass/forgetPass.vue @@ -1,281 +1,365 @@ <template> - <view class="container flex flex-center" style="align-items: flex-start;"> - <view class="repository relative"> - <view class="Ttop flex flex-center flex-wrap" style="flex-direction: column;"> - <view class=""></view> - <view class="" ref="Rtop"> - <text class="login"></text> - <text - style="font-size: .36rem;letter-spacing: 4rpx;vertical-align: middle;font-family: cursive;font-weight: bold;">涓浗鍖诲浜虹墿鐭ヨ瘑搴�</text> - </view> - <view></view> - </view> - <!-- 閲嶇疆瀵嗙爜 --> - <el-card> - <view class="LoginTop" - style="display: flex; justify-content: space-between;margin-bottom: .47rem;align-items: center;"> - <!-- <view class="" style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">鐢ㄦ埛娉ㄥ唽</view> --> - <view class="LoginBg"></view> - <view class="" @click="BacktoLogin" - style="cursor: pointer;font-size: .14rem;color: #244A7B;font-weight: normal;"> - 杩斿洖鐧诲綍 - </view> - </view> - <el-form :hide-required-asterisk="true" ref="formLogin2" label-position="right" :rules="rules" - :model="resetDataPass"> - <el-form-item label="鎵嬫満/閭" prop="cellphoneORmailbox"> - <el-input v-model="resetDataPass.cellphoneORmailbox"></el-input> - </el-form-item> - <el-form-item label="楠岃瘉鐮�" prop="verifyCode"> - <view class="verifyCode relative"> - <el-input v-model="resetDataPass.verifyCode"></el-input> - <view @click="verifyCodeClick" class="yzm" - style="position: absolute;right: 0%;top: 0%;color: #244A7B;font-size: .14rem;font-weight: 500;"> - 鑾峰彇楠岃瘉鐮�</view> - </view> - </el-form-item> - <el-form-item label="鏂板瘑鐮�" prop="newPass"> - <el-input type="password" v-model="resetDataPass.newPass"></el-input> - </el-form-item> - <el-form-item label="纭鏂板瘑鐮�" prop="checkPass"> - <el-input type="password" v-model="resetDataPass.checkPass"></el-input> - </el-form-item> - <el-form-item class="btn"> - <el-button class="font-family" - style="margin-top: 30rpx; font-weight:900;font-size: 30rpx; width: 100%;background-color: #244a7b;color: #fff;padding: 30rpx;" - size="medium" @click="Login2('formLogin2')">閲嶇疆瀵嗙爜</el-button> - </el-form-item> - </el-form> - </el-card> + <view class="container flex flex-center" style="align-items: flex-start"> + <view class="repository relative"> + <view + class="Ttop flex flex-center flex-wrap" + style="flex-direction: column" + > + <view class=""></view> + <view class="" ref="Rtop"> + <text class="login"></text> + <text + style=" + font-size: 0.36rem; + letter-spacing: 4rpx; + vertical-align: middle; + font-family: cursive; + font-weight: bold; + " + >涓浗鍖诲浜虹墿鐭ヨ瘑搴�</text + > + </view> + <view></view> + </view> + <!-- 閲嶇疆瀵嗙爜 --> + <el-card> + <view + class="LoginTop" + style=" + display: flex; + justify-content: space-between; + margin-bottom: 0.47rem; + align-items: center; + " + > + <!-- <view class="" style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">鐢ㄦ埛娉ㄥ唽</view> --> + <view class="LoginBg"></view> + <view + class="" + @click="BacktoLogin" + style=" + cursor: pointer; + font-size: 0.14rem; + color: #244a7b; + font-weight: normal; + " + > + 杩斿洖鐧诲綍 + </view> + </view> + <el-form + :hide-required-asterisk="true" + ref="formLogin2" + label-position="right" + :rules="rules" + :model="resetDataPass" + > + <el-form-item label="鎵嬫満" prop="cellphoneORmailbox"> + <el-input v-model="resetDataPass.cellphoneORmailbox"></el-input> + </el-form-item> + <el-form-item label="楠岃瘉鐮�" prop="verifyCode"> + <view class="verifyCode relative"> + <el-input v-model="resetDataPass.verifyCode"></el-input> + <view + @click="verifyCodeClick" + class="yzm" + style=" + position: absolute; + right: 0%; + top: 0%; + color: #244a7b; + font-size: 0.14rem; + font-weight: 500; + " + > + {{ + countdown > 0 ? `${countdown}绉掑悗閲嶆柊鑾峰彇` : "鑾峰彇楠岃瘉鐮�" + }}</view + > + </view> + </el-form-item> + <el-form-item label="鏂板瘑鐮�" prop="newPass"> + <el-input + type="password" + v-model="resetDataPass.newPass" + ></el-input> + </el-form-item> + <el-form-item label="纭鏂板瘑鐮�" prop="checkPass"> + <el-input + type="password" + v-model="resetDataPass.checkPass" + ></el-input> + </el-form-item> + <el-form-item class="btn"> + <el-button + class="font-family" + style=" + margin-top: 30rpx; + font-weight: 900; + font-size: 30rpx; + width: 100%; + background-color: #244a7b; + color: #fff; + padding: 30rpx; + " + size="medium" + @click="Login2('formLogin2')" + >閲嶇疆瀵嗙爜</el-button + > + </el-form-item> + </el-form> + </el-card> + </view> + <view class="hua"></view> + <!-- 搴曢儴浜虹墿鑳屾櫙鍥惧乏渚� --> + <view class="fff"></view> + <!-- 搴曢儴鑺辩殑鑳屾櫙鍥惧彸渚� --> + <view class="rrr"></view> - </view> - <view class="hua"></view> - <!-- 搴曢儴浜虹墿鑳屾櫙鍥惧乏渚� --> - <view class="fff"></view> - <!-- 搴曢儴鑺辩殑鑳屾櫙鍥惧彸渚� --> - <view class="rrr"></view> - - <Footer1 /> - </view> + <Footer1 /> + </view> </template> <script> - import { - getRestPassword, - getverifyCode - } from '@/api/index.js' - import { - encryptAES - } from '@/utils/Crypto.js' - import { - nextTick - } from "vue"; - import Footer1 from '@/components/footer/footer.vue' - import { - Message - } from 'element-ui' - export default { - components: { - Footer1 - }, - data() { - // 瀵嗙爜 - var validatePass = (rule, value, callback) => { - if (value === '') { - callback(new Error('璇疯緭鍏ュ瘑鐮�')); - } else { - if (this.resetDataPass.checkPass !== '') { - this.$nextTick(() => { - this.$refs.formLogin.validateField('checkPass'); - }); - } - callback(); - } - }; - // 纭瀵嗙爜 - var validatePass2 = (rule, value, callback) => { - if (value === '') { - callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�')); - } else if (value !== this.resetDataPass.newPass) { - callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!')); - } else { - callback(); - } - }; - return { - // 鐢ㄦ埛娉ㄥ唽 - isRegister: false, - // 鐢ㄦ埛鐧诲綍 - isLogin: true, - // 淇敼瀵嗙爜 - isAmendPass: false, - // 閲嶇疆瀵嗙爜 - isResetPass: false, - // 娉ㄥ唽鐢ㄦ埛璐﹀彿鐨勬牎楠� - rules: { - loginID: [{ - required: true, - message: '璇疯緭鍏ョ櫥褰曡处鍙�', - trigger: 'blur' - }], - newPass: [{ - required: true, - message: '璇疯緭鍏ュ瘑鐮�', - trigger: 'blur' - }, - { - min: 6, - max: 10, - message: '瀵嗙爜闀垮害鍦� 6 鍒� 12 涓瓧绗�', - trigger: 'blur' - }, - { - validator: validatePass, - trigger: 'blur' - } - ], - checkPass: [{ - validator: validatePass2, - trigger: 'blur' - }], - cellphoneORmailbox: [{ - required: true, - message: '璇疯緭鍏ユ墜鏈哄彿鎴栭偖绠�', - trigger: 'blur' - }, - { - validator: this.validateContact, - trigger: 'blur' - } - ], - verifyCode: [{ - required: true, - message: '璇疯緭鍏ラ獙璇佺爜', - trigger: 'blur' - }] - }, - // 閲嶇疆瀵嗙爜 - resetDataPass: { - cellphoneORmailbox: '', - verifyCode: "", - newPass: "", - checkPass: "" - }, - } - }, - onLoad() { - uni.getSystemInfo({ - success: function(info) { - // console.log('灞忓箷鐨勫搴︼細' + info.windowWidth); - // console.log('灞忓箷鐨勯珮搴︼細' + info.windowHeight); - } - }); - }, - mounted() { - this.getElementWidth(); - }, - methods: { - // 宸叉湁璐﹀彿锛熻繑鍥炵櫥褰� - BacktoLogin() { - uni.redirectTo({ - url: '/pages/Login/Login' - }) - }, - // 鑾峰彇楠岃瘉鐮� - async verifyCodeClick() { - console.log('鑾峰彇楠岃瘉鐮�'); - let Obj = { - communicateParam: this.resetDataPass.cellphoneORmailbox, - } - await getverifyCode(Obj).then(res => { - console.log(res, '楠岃瘉鐮佽幏鍙栨垚鍔�'); - }) - }, - // 鍒楄〃椤硅烦杞� - listDataClick(item) { - console.log(item); - // 鍦ㄥ綋鍓嶉〉闈㈣缃叏灞�鍙橀噺 - // uni.setStorageSync('globalData', { id: 123, name: 'example' }); - if (item.id == 1) { - uni.navigateTo({ - url: '/pages/character/detail?id=' + item.id - }) - } else if (item.id == 2) { - console.log(item.name); - // uni.navigateTo({ - // url:'/pages/character/detail?id='+item.id - // }) - } else if (item.id == 3) { - uni.navigateTo({ - url: '/pages/academicGenres/index?id=' + item.id - }) - } else if (item.id == 4) { - uni.navigateTo({ - url: '/pages/territory/territory?id=' + item.id - }) - } else if (item.id == 5) { - uni.navigateTo({ - url: '/pages/TcmSystem/TcmSystem?id=' + item.id - }) - } - }, +import { getRestPassword, getverifyCode } from "@/api/index.js"; +import { encryptAES } from "@/utils/Crypto.js"; +import { nextTick } from "vue"; +import Footer1 from "@/components/footer/footer.vue"; +import { Message } from "element-ui"; +export default { + components: { + Footer1, + }, + data() { + // 瀵嗙爜 + var validatePass = (rule, value, callback) => { + if (value === "") { + callback(new Error("璇疯緭鍏ュ瘑鐮�")); + } else { + if (this.resetDataPass.checkPass !== "") { + this.$nextTick(() => { + this.$refs.formLogin.validateField("checkPass"); + }); + } + callback(); + } + }; + // 纭瀵嗙爜 + var validatePass2 = (rule, value, callback) => { + if (value === "") { + callback(new Error("璇峰啀娆¤緭鍏ュ瘑鐮�")); + } else if (value !== this.resetDataPass.newPass) { + callback(new Error("涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!")); + } else { + callback(); + } + }; + return { + //楠岃瘉鐮佸�掕鏃� + countdown: 0, + // 鐢ㄦ埛娉ㄥ唽 + isRegister: false, + // 鐢ㄦ埛鐧诲綍 + isLogin: true, + // 淇敼瀵嗙爜 + isAmendPass: false, + // 閲嶇疆瀵嗙爜 + isResetPass: false, + // 娉ㄥ唽鐢ㄦ埛璐﹀彿鐨勬牎楠� + rules: { + loginID: [ + { + required: true, + message: "璇疯緭鍏ョ櫥褰曡处鍙�", + trigger: "blur", + }, + ], + newPass: [ + { + required: true, + message: "璇疯緭鍏ュ瘑鐮�", + trigger: "blur", + }, + { + min: 6, + max: 10, + message: "瀵嗙爜闀垮害鍦� 6 鍒� 12 涓瓧绗�", + trigger: "blur", + }, + { + validator: validatePass, + trigger: "blur", + }, + ], + checkPass: [ + { + validator: validatePass2, + trigger: "blur", + }, + ], + cellphoneORmailbox: [ + { + required: true, + message: "璇疯緭鍏ユ墜鏈哄彿", + trigger: "blur", + }, + { + validator: this.validateContact, + trigger: "blur", + }, + ], + verifyCode: [ + { + required: true, + message: "璇疯緭鍏ラ獙璇佺爜", + trigger: "blur", + }, + ], + }, + // 閲嶇疆瀵嗙爜 + resetDataPass: { + cellphoneORmailbox: "", + verifyCode: "", + newPass: "", + checkPass: "", + }, + }; + }, + onLoad() { + uni.getSystemInfo({ + success: function (info) { + // console.log('灞忓箷鐨勫搴︼細' + info.windowWidth); + // console.log('灞忓箷鐨勯珮搴︼細' + info.windowHeight); + }, + }); + }, + mounted() { + this.getElementWidth(); + }, + methods: { + // 宸叉湁璐﹀彿锛熻繑鍥炵櫥褰� + BacktoLogin() { + uni.redirectTo({ + url: "/pages/Login/Login", + }); + }, + // 鑾峰彇楠岃瘉鐮� + async verifyCodeClick() { + if (!this.resetDataPass.cellphoneORmailbox) { + this.$message({ + message: "璇疯緭鍏ユ墜鏈猴紒", + type: "warning", + }); - // 鎵嬫満鍙�/鎴栬�呴偖绠� - validateContact(rule, value, callback) { - const regPhone = /^1[0-9]{10}$/; - const regEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; - console.log(value, regPhone.test(value), regEmail.test(value)); - if (regPhone.test(value) || regEmail.test(value)) { - callback(); // 鏍¢獙閫氳繃 - } else { - callback(new Error('璇疯緭鍏ユ纭殑鎵嬫満鍙锋垨閭')); // 鏍¢獙澶辫触 - } - }, - getElementWidth() { - this.$nextTick(() => { - var width = this.$refs.Rtop.$el.clientWidth; - this.Rtop1 = width + 50; - console.log('Element width:', width); - }) - }, - // 蹇樿瀵嗙爜 - Login2(formName) { - let Obj = { - "communicateParam": this.resetDataPass.cellphoneORmailbox, //鎵嬫満鎴栭偖绠� - "verifyCode": this.resetDataPass.verifyCode, //楠岃瘉鐮� - "newPassword": encryptAES(this.resetDataPass.newPass) //鏂板瘑鐮� - } - console.log(Obj); - this.$refs[formName].validate(async (valid) => { - if (valid) { - await getRestPassword(Obj).then(res => { - console.log(res, '鎺ュ彛'); - if (res.success) { - console.log('蹇樿瀵嗙爜鐨勬帴鍙f嬁鍒版暟鎹簡'); - uni.navigateTo({ - url: '/pages/Login/Login' - }) - } else { - Message.error(res.errorText || '') - } - }) - // alert('submit!鎴愬姛'); - // uni.redirectTo({ - // url: '/pages/Login/Login' - // }) - } else { - console.log('error submit!!澶辫触'); - return false; - } - }); - } - } - } + return false; + } + if (this.countdown > 0) { + return; + } + let Obj = { + communicateParam: this.resetDataPass.cellphoneORmailbox, + }; + this.countdown = 60; + const intervalId = setInterval(() => { + if (this.countdown > 0) { + this.countdown -= 1; + } else { + clearInterval(intervalId); + } + }, 1000); + await getverifyCode(Obj).then((res) => { + console.log(res, "楠岃瘉鐮佽幏鍙栨垚鍔�"); + }); + }, + // 鍒楄〃椤硅烦杞� + listDataClick(item) { + console.log(item); + // 鍦ㄥ綋鍓嶉〉闈㈣缃叏灞�鍙橀噺 + // uni.setStorageSync('globalData', { id: 123, name: 'example' }); + if (item.id == 1) { + uni.navigateTo({ + url: "/pages/character/detail?id=" + item.id, + }); + } else if (item.id == 2) { + console.log(item.name); + // uni.navigateTo({ + // url:'/pages/character/detail?id='+item.id + // }) + } else if (item.id == 3) { + uni.navigateTo({ + url: "/pages/academicGenres/index?id=" + item.id, + }); + } else if (item.id == 4) { + uni.navigateTo({ + url: "/pages/territory/territory?id=" + item.id, + }); + } else if (item.id == 5) { + uni.navigateTo({ + url: "/pages/TcmSystem/TcmSystem?id=" + item.id, + }); + } + }, + + // 鎵嬫満鍙�/鎴栬�呴偖绠� + validateContact(rule, value, callback) { + const regPhone = /^1[0-9]{10}$/; + const regEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; + console.log(value, regPhone.test(value), regEmail.test(value)); + if (regPhone.test(value) || regEmail.test(value)) { + callback(); // 鏍¢獙閫氳繃 + } else { + callback(new Error("璇疯緭鍏ユ纭殑鎵嬫満鍙�")); // 鏍¢獙澶辫触 + } + }, + getElementWidth() { + this.$nextTick(() => { + var width = this.$refs.Rtop.$el.clientWidth; + this.Rtop1 = width + 50; + console.log("Element width:", width); + }); + }, + // 蹇樿瀵嗙爜 + Login2(formName) { + let Obj = { + communicateParam: this.resetDataPass.cellphoneORmailbox, //鎵嬫満鎴栭偖绠� + verifyCode: this.resetDataPass.verifyCode, //楠岃瘉鐮� + newPassword: encryptAES(this.resetDataPass.newPass), //鏂板瘑鐮� + }; + console.log(Obj); + this.$refs[formName].validate(async (valid) => { + if (valid) { + await getRestPassword(Obj).then((res) => { + console.log(res, "鎺ュ彛"); + if (res.success) { + console.log("蹇樿瀵嗙爜鐨勬帴鍙f嬁鍒版暟鎹簡"); + uni.navigateTo({ + url: "/pages/Login/Login", + }); + } else { + Message.error(res.errorText || ""); + } + }); + // alert('submit!鎴愬姛'); + // uni.redirectTo({ + // url: '/pages/Login/Login' + // }) + this.$message({ + message: "瀵嗙爜閲嶇疆鎴愬姛", + type: "success", + }); + } else { + console.log("error submit!!澶辫触"); + return false; + } + }); + }, + }, +}; </script> <style scoped> - /* +/* 鍦ㄥ睆骞曞搴﹁秴杩� 1440px 鏃剁殑鏍峰紡璁剧疆 */ - /* @media screen and (min-width: 1441px) { +/* @media screen and (min-width: 1441px) { ::v-deep .el-card { top: 60% !important; } @@ -303,400 +387,386 @@ } } */ - @media screen and (min-width:2560px)and (max-width:3840px) { - .LoginBg { - margin: 0 !important; - height: .3rem !important; - } +@media screen and (min-width: 2560px) and (max-width: 3840px) { + .LoginBg { + margin: 0 !important; + height: 0.3rem !important; + } - ::v-deep .el-card { - top: 90% !important; - padding: 0 !important; - } + ::v-deep .el-card { + top: 90% !important; + padding: 0 !important; + } - ::v-deep .el-card__body { - padding: .25rem .5rem !important; - } + ::v-deep .el-card__body { + padding: 0.25rem 0.5rem !important; + } - ::v-deep .el-form { - padding-left: .1rem !important; - } + ::v-deep .el-form { + padding-left: 0.1rem !important; + } - ::v-deep .el-form-item__error { - font-size: .13rem !important; - } + ::v-deep .el-form-item__error { + font-size: 0.13rem !important; + } - ::v-deep .el-input__inner { - height: .35rem !important; - font-size: .14rem; - } + ::v-deep .el-input__inner { + height: 0.35rem !important; + font-size: 0.14rem; + } - ::v-deep .el-form-item__label { - display: flex; - align-items: center; - justify-content: flex-end; - margin-right: .2rem !important; - width: .7rem; - } + ::v-deep .el-form-item__label { + display: flex; + align-items: center; + justify-content: flex-end; + margin-right: 0.2rem !important; + width: 0.7rem; + } - .hua { - height: 4rem !important; - } + .hua { + height: 4rem !important; + } - .LoginTop { - margin-bottom: .4rem !important; - } + .LoginTop { + margin-bottom: 0.4rem !important; + } - .yzm { - top: 15% !important; - } + .yzm { + top: 15% !important; + } - .fff { - width: 2.4rem !important; - height: 4rem !important; - } + .fff { + width: 2.4rem !important; + height: 4rem !important; + } - .rrr { - width: 2rem !important; - } + .rrr { + width: 2rem !important; + } - .btn { - margin-bottom: .1rem !important; - } + .btn { + margin-bottom: 0.1rem !important; + } - .btn ::v-deep .el-button { - margin-top: 0.2rem !important; - font-size: 0.2rem !important; - width: 100%; - padding: 0.12rem !important; + .btn ::v-deep .el-button { + margin-top: 0.2rem !important; + font-size: 0.2rem !important; + width: 100%; + padding: 0.12rem !important; - span { - font-weight: bold !important; - } - } + span { + font-weight: bold !important; + } + } - .asdf { - margin-bottom: .1rem !important; - } + .asdf { + margin-bottom: 0.1rem !important; + } - .LoginBg { - margin: 0 !important; - height: .3rem !important; - } + .LoginBg { + margin: 0 !important; + height: 0.3rem !important; + } - ::v-deep .el-card { - top: 80% !important; - padding: 0 !important; - } + ::v-deep .el-card { + top: 80% !important; + padding: 0 !important; + } - ::v-deep .el-card__body { - padding: .25rem .5rem !important; - } + ::v-deep .el-card__body { + padding: 0.25rem 0.5rem !important; + } - ::v-deep .el-form { - padding-left: .1rem !important; - } + ::v-deep .el-form { + padding-left: 0.1rem !important; + } - ::v-deep .el-form-item__error { - font-size: .13rem !important; - } + ::v-deep .el-form-item__error { + font-size: 0.13rem !important; + } - ::v-deep .el-input__inner { - height: .35rem !important; - } + ::v-deep .el-input__inner { + height: 0.35rem !important; + } - .hua { - height: 5rem !important; - } + .hua { + height: 5rem !important; + } - .LoginTop { - margin-bottom: .25rem !important; - } + .LoginTop { + margin-bottom: 0.25rem !important; + } - .yzm { - top: 15% !important; - } + .yzm { + top: 15% !important; + } - .fff { - width: 2.4rem !important; - height: 4rem !important; - } + .fff { + width: 2.4rem !important; + height: 4rem !important; + } - .rrr { - width: 2rem !important; - height: 2.5rem !important; - } + .rrr { + width: 2rem !important; + height: 2.5rem !important; + } - .btn ::v-deep .el-button { - margin-top: 0.2rem !important; - /* font-size: 0.2rem !important; + .btn ::v-deep .el-button { + margin-top: 0.2rem !important; + /* font-size: 0.2rem !important; width: 100%; padding: 0.12rem !important; */ - } + } - .asdf { - margin-bottom: .1rem !important; - } + .asdf { + margin-bottom: 0.1rem !important; + } +} - } +@media screen and (min-width: 1920px) and (max-width: 2560px) { + .LoginBg { + margin: 0 !important; + height: 0.3rem !important; + } - @media screen and (min-width: 1920px) and (max-width:2560px) { - .LoginBg { - margin: 0 !important; - height: .3rem !important; - } + ::v-deep .el-card { + top: 80% !important; + padding: 0 !important; + } - ::v-deep .el-card { - top: 80% !important; - padding: 0 !important; - } + ::v-deep .el-card__body { + padding: 0.25rem 0.5rem !important; + } - ::v-deep .el-card__body { - padding: .25rem .5rem !important; - } + ::v-deep .el-form { + padding-left: 0.1rem !important; + } - ::v-deep .el-form { - padding-left: .1rem !important; - } + ::v-deep .el-form-item__error { + font-size: 0.13rem !important; + } - ::v-deep .el-form-item__error { - font-size: .13rem !important; - } + ::v-deep .el-input__inner { + height: 0.35rem !important; + } - ::v-deep .el-input__inner { - height: .35rem !important; - } + .hua { + height: 5rem !important; + } - .hua { - height: 5rem !important; - } + .LoginTop { + margin-bottom: 0.25rem !important; + } - .LoginTop { - margin-bottom: .25rem !important; - } + .yzm { + top: 15% !important; + } - .yzm { - top: 15% !important; - } + .fff { + width: 2.4rem !important; + height: 4rem !important; + } - .fff { - width: 2.4rem !important; - height: 4rem !important; - } + .rrr { + width: 2rem !important; + height: 2.5rem !important; + } - .rrr { - width: 2rem !important; - height: 2.5rem !important; - } - - .btn ::v-deep .el-button { - margin-top: 0.2rem !important; - /* font-size: 0.2rem !important; + .btn ::v-deep .el-button { + margin-top: 0.2rem !important; + /* font-size: 0.2rem !important; width: 100%; padding: 0.12rem !important; */ - } + } - .asdf { - margin-bottom: .1rem !important; - } - } + .asdf { + margin-bottom: 0.1rem !important; + } +} - .LoginBg { - width: 1.2rem; - height: .37rem; - background: url(@/static/image/閲嶇疆瀵嗙爜.png) no-repeat 0 0; - background-size: 100% 100%; +.LoginBg { + width: 1.2rem; + height: 0.37rem; + background: url(@/static/image/閲嶇疆瀵嗙爜.png) no-repeat 0 0; + background-size: 100% 100%; +} - } +::v-deep .el-card { + border-radius: 0; + width: 5.42rem; + /* height: 5.65rem; */ + position: absolute; + top: 80%; +} +::v-deep .el-card__body { + padding: 0.26rem 0.58rem; +} - ::v-deep .el-card { - border-radius: 0; - width: 5.42rem; - /* height: 5.65rem; */ - position: absolute; - top: 80%; - } +.btn >>> .el-form-item__content { + margin-left: 0 !important; +} - ::v-deep .el-card__body { - padding: .26rem .58rem; - } +::v-deep .el-form-item__content { + margin-left: 0 !important; + flex: 1; +} - .btn>>>.el-form-item__content { - margin-left: 0 !important; +::v-deep .el-input__inner { + border: none; + border-bottom: 1px solid #2d476a; + border-radius: 0; + padding: 0; + height: 0.4rem; + line-height: 0.4rem; +} - } +::v-deep .el-form-item__error { + /* display: none; */ +} - ::v-deep .el-form-item__content { - margin-left: 0 !important; - flex: 1; - } +::v-deep .input.invalid:focus { + border-color: #2d476a !important; +} - ::v-deep .el-input__inner { - border: none; - border-bottom: 1px solid #2d476a; - border-radius: 0; - padding: 0; - height: .4rem; - line-height: .4rem; - } +::v-deep .el-input__inner:invalid { + border-color: #2d476a !important; +} - ::v-deep .el-form-item__error { - /* display: none; */ - } +::v-deep .el-form-item__label { + min-width: 0.6rem; + padding: 0; + color: #244a7b; + font-size: 0.14rem; + font-weight: 500; + margin-right: 0.29rem; +} - ::v-deep .input.invalid:focus { - border-color: #2d476a !important; - } +::v-deep .el-form-item { + margin-bottom: 0.22rem; + display: flex; +} - ::v-deep .el-input__inner:invalid { - border-color: #2d476a !important; - } +.ss1 { + background-repeat: no-repeat; + background-size: 100% 100%; + width: 40rpx; + height: 40rpx; + background-size: 100% 100%; +} +.s1 { + background-image: url(@/static/image/search.png); +} - ::v-deep .el-form-item__label { - min-width: .6rem; - padding: 0; - color: #244A7B; - font-size: .14rem; - font-weight: 500; - margin-right: .29rem; - } +.s2 { + background-image: url(@/static/image/question.png); +} - ::v-deep .el-form-item { - margin-bottom: .22rem; - display: flex; - } +.s3 { + background-image: url(@/static/image/question.png); +} - .ss1 { - background-repeat: no-repeat; - background-size: 100% 100%; - width: 40rpx; - height: 40rpx; - background-size: 100% 100%; - } +.container { + background: url(@/static/image/bg1.png); + width: 100vw; + height: 100vh; - .s1 { - background-image: url(@/static/image/search.png); + color: #fff; - } + .repository { + width: 100% !important; + /* margin-top: 19px; */ + /* height: 68%; */ + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; - .s2 { - background-image: url(@/static/image/question.png); - } + .Ttop { + margin-top: 0.38rem; + margin-bottom: 1.22rem; + } - .s3 { - background-image: url(@/static/image/question.png); - } + .r-top { + font-size: 40rpx !important; + margin: 10rpx 0; + } + } +} - .container { - background: url(@/static/image/bg1.png); - width: 100vw; - height: 100vh; +.login { + width: 0.52rem; + height: 0.52rem; + display: inline-block; + vertical-align: middle; + margin-right: 0.19rem; + background: url(@/static/image/logo.png) no-repeat 0 0; + background-size: 100% 100%; +} - color: #fff; +.rrr { + position: absolute; + right: 0.53rem; + bottom: 0.36rem; + width: 2.5rem; + height: 3.07rem; + opacity: 1; + background: url(@/static/image/bg4.png); + background-size: 100% 100%; +} - .repository { - width: 100% !important; - /* margin-top: 19px; */ - /* height: 68%; */ - display: flex; - flex-direction: column; - justify-content: space-around; - align-items: center; +.hua { + width: 13.81rem; + height: 5.965rem; + position: absolute; + background: url(@/static/image/bg3.png) no-repeat 0 0; + background-size: 100% 100%; +} - .Ttop { - margin-top: .38rem; - margin-bottom: 1.22rem; - } +/* 搴曢儴浜虹墿鑳屾櫙鍥� */ +.fff { + background: url(@/static/image/bg2.png) no-repeat 0 0; + background-size: 100% 100%; + width: 2.74rem; + height: 4.52rem; + position: fixed; + bottom: 0; + z-index: 9999999999999; + left: 0; +} - .r-top { - font-size: 40rpx !important; - margin: 10rpx 0; - } - } +::v-deep .uni-easyinput__content { + border-radius: 30rpx !important; + /* height: 52rpx; */ +} - } +.secretary { + width: 1300rpx !important; + height: 50rpx; + /* height: 80%; */ + /* flex-wrap: wrap; */ + padding: 0 20px; + text-align: center; - .login { - width: .52rem; - height: .52rem; - display: inline-block; - vertical-align: middle; - margin-right: .19rem; - background: url(@/static/image/logo.png) no-repeat 0 0; - background-size: 100% 100%; - } + li { + background-color: #fff; + color: black; + height: 600rpx; + display: flex; + justify-content: space-between; + flex-direction: column; + align-items: center; + border: 1rpx solid #fff; + padding: 50rpx 65rpx; + /* padding: 58rpx 128rpx 88rpx; */ + text-align: center; + background: #ebf4ff; + } +} - .rrr { - position: absolute; - right: .53rem; - bottom: .36rem; - width: 2.5rem; - height: 3.07rem; - opacity: 1; - background: url(@/static/image/bg4.png); - background-size: 100% 100%; - } - - .hua { - width: 13.81rem; - height: 5.965rem; - position: absolute; - background: url(@/static/image/bg3.png) no-repeat 0 0; - background-size: 100% 100%; - } - - /* 搴曢儴浜虹墿鑳屾櫙鍥� */ - .fff { - background: url(@/static/image/bg2.png) no-repeat 0 0; - background-size: 100% 100%; - width: 2.74rem; - height: 4.52rem; - position: fixed; - bottom: 0; - z-index: 9999999999999; - left: 0; - } - - ::v-deep .uni-easyinput__content { - border-radius: 30rpx !important; - /* height: 52rpx; */ - } - - - .secretary { - width: 1300rpx !important; - height: 50rpx; - /* height: 80%; */ - /* flex-wrap: wrap; */ - padding: 0 20px; - text-align: center; - - - - - li { - background-color: #fff; - color: black; - height: 600rpx; - display: flex; - justify-content: space-between; - flex-direction: column; - align-items: center; - border: 1rpx solid #fff; - padding: 50rpx 65rpx; - /* padding: 58rpx 128rpx 88rpx; */ - text-align: center; - background: #EBF4FF; - } - } - - - - .Bbottom { - display: flex; - justify-content: center; - - } -</style> \ No newline at end of file +.Bbottom { + display: flex; + justify-content: center; +} +</style> diff --git a/src/pages/inherit/index.vue b/src/pages/inherit/index.vue index 325dcfe..610ec9c 100644 --- a/src/pages/inherit/index.vue +++ b/src/pages/inherit/index.vue @@ -10,8 +10,12 @@ <div class="filterBox font-family"> <div class="searchBox"> - <input type="text" placeholder="杈撳叆濮撳悕/鍒悕/鏈濅唬" /> - <button>鎼滅储</button> + <input + v-model="keywords" + type="text" + placeholder="杈撳叆濮撳悕/鍒悕/鏈濅唬" + /> + <button @click="getData">鎼滅储</button> </div> <div class="dynasty"> <div style="font-weight: 700; line-height: 0.25rem">绛涢�夋湞浠�</div> @@ -54,7 +58,7 @@ </template> <script> import * as echarts from "echarts"; -import { inheritMedicalList } from "@/api/index.js"; +import { inheritMedicalList, getDynastyAll } from "@/api/index.js"; export default { data() { return { @@ -65,61 +69,70 @@ { name: "鍞�", number: "4910", - isColor: false + isColor: false, }, { name: "浜斾唬", number: "494", - isColor: true + isColor: true, }, { name: "瀹�", number: "51273", - isColor: false + isColor: false, }, { name: "鍖楀畫", number: "15", - isColor: true + isColor: true, }, { name: "鍗楀畫", number: "4910", - isColor: false + isColor: false, }, { name: "鍏�", number: "299", - isColor: true + isColor: true, }, { name: "鏄�", number: "1830", - isColor: false + isColor: false, }, { name: "娓�", number: "1000", - isColor: true - } + isColor: true, + }, ], - nodeData: [] + nodeData: [], + keywords: "", }; }, onLoad(options) { this.idIndex = options.id; console.log("optionsoptionsoptions", options.id); + getDynasty() }, mounted() { this.getData(); + this.getDynasty() + }, methods: { + getDynasty() { + getDynastyAll().then((res) => { + console.log(res, "getDynastyAll"); + }); + }, getData() { inheritMedicalList({ - keywords: "", + keywords: this.keywords, dynastyId: "", searchType: "KEYWORD", - path: "" + path: "", }).then((res) => { console.log(res); this.nodeData = res.object.nodeList.map((item) => { @@ -128,8 +141,8 @@ itemStyle: { color: "#F8E2D7", borderColor: "#F3AA78", - borderWidth: "3" - } + borderWidth: "3", + }, }; }); // 鍒濆鍖� echarts @@ -165,14 +178,14 @@ let option = { title: { - text: [""] + text: [""], }, backgroundColor: { type: "image", image: "/static/image/WMBg.png", repeat: "repeat-x", // 鏄惁骞抽摵锛屽彲浠ユ槸 'repeat-x', 'repeat-y', 'no-repeat' size: "100% 100%", // 鑳屾櫙鍥剧墖鐨勫昂瀵革紝鍙互鏄櫨鍒嗘瘮鎴栬�呭儚绱� - position: "center center" // 鑳屾櫙鍥剧墖鐨勪綅缃紝鍙互鏄� top, bottom, middle 鎴栬�呯櫨鍒嗘瘮 + position: "center center", // 鑳屾櫙鍥剧墖鐨勪綅缃紝鍙互鏄� top, bottom, middle 鎴栬�呯櫨鍒嗘瘮 }, tooltip: {}, animationDurationUpdate: 1500, @@ -187,7 +200,7 @@ label: { show: true, color: "black", // 璁剧疆鑺傜偣鏂囧瓧棰滆壊涓洪粦鑹� - fontSize: FontSize // 璁剧疆鏂囧瓧澶у皬 + fontSize: FontSize, // 璁剧疆鏂囧瓧澶у皬 }, edgeSymbol: ["circle", "arrow"], edgeSymbolSize: [4, 10], @@ -202,7 +215,7 @@ // params.data 鏄竟鐨勬暟鎹璞★紝浣犲彲浠ュ湪杩欓噷瀹氫箟鍏崇郴鍚� // 渚嬪锛屼綘鍙互鏍规嵁 source 鍜� target 鐨勫悕绉版潵瀹氫箟鍏崇郴鍚� return params.data.relationName; // 濡傛灉瀹氫箟浜� relationName 鍒欐樉绀哄畠锛屽惁鍒欐樉绀衡�滅埗瀛愨�� - } + }, }, //鍚勪釜鑺傜偣 data: this.nodeData, @@ -210,17 +223,17 @@ color: "#000000", opacity: 0.9, width: 2, - curveness: 0 + curveness: 0, }, force: { // initLayout: 'circular', // gravity: 0 friction: 0.1, repulsion: 500, - edgeLength: 6 - } - } - ] + edgeLength: 6, + }, + }, + ], }; //杩涜娓叉煋 myChart.setOption(option); @@ -230,15 +243,15 @@ "/pages/inherit/list?id=" + params.data.identifier + "&name=" + - encodeURIComponent(params.data.name) + encodeURIComponent(params.data.name), }); }); }, // 杩斿洖鎸夐挳 goBack() { this.$router.go(-1); - } - } + }, + }, }; </script> <style scoped> diff --git a/src/pages/knowledgeBase/knowledgeBase.vue b/src/pages/knowledgeBase/knowledgeBase.vue index 2581ee6..227ad41 100644 --- a/src/pages/knowledgeBase/knowledgeBase.vue +++ b/src/pages/knowledgeBase/knowledgeBase.vue @@ -1,1056 +1,1226 @@ <template> - <view> - <!-- 椤堕儴 --> - <headNav idIndex="0" text="涓浗鍖诲浜虹墿鐭ヨ瘑搴�" /> - <!-- 鎼滅储 --> - <view class="flex flex-center Search"> - <!-- <luanqing-search class="search_bar" @onSearch="onSearch"></luanqing-search> --> - <advancedSearch @onSearch="onSearch" placehold="杈撳叆濮撳悕/鍒悕/鏃舵湡/浼犱富鑱屼笟鎼滅储" :isAvancedTrue="false" /> - <view class="advancedSea" @click="isAvancedClick" style="color:#244A7B ;cursor: pointer;">楂樼骇鎼滅储 锕�</view> - </view> - <!-- 鐑棬鎼滅储 --> - <view class="flex flex-center hotSearch" style="font-size: 20rpx;margin: 10rpx 0;"> - 鐑棬鎼滅储锛� - <ul class="flex" style="margin-right: 10rpx;"> - <!-- - <li v-for="item in hot" :key="item.id" @tap="HotClick(item.id)" style="margin: 0 10rpx;" - :style="{color:item.bgColor==true?'#5879a4':'#000'}"> - {{item.name}} - </li>--> - <li v-for="item in hot" @click="hotSearchClick(item)" :key="item.id" class="cursor" - style="color: #5879a4;"> - {{item.name}} - </li> - </ul> - </view> - <!-- 楂樼骇鎼滅储 --> - <view class="advancedSeaTrue" v-if="isAdvancedSearch" style="padding: 0 230rpx; margin-bottom: .18rem;"> - <view style="background-color: #fff;padding: 20rpx;" class="advancedSeaTrue1"> - <h3>楂樼骇鎼滅储</h3> - <MyForm @submit="onSubmit" :from="from" /> - </view> - </view> - <uni-row class="demo-uni-row zhushuju flex flex-items-start" style="padding: 0 230rpx; "> - <!-- 宸︿晶 --> - <view class="fbox2" style="width: 2.6rem;"> - <!-- 鑱屼笟 --> - <view class="demo-uni-col zhiye dark box boox" - style="width: 2.6rem; margin-bottom: 40rpx;background-color: #fff; border: 2rpx solid #e0e0e0;min-height: 2rem;"> - <h3>{{profession.title}}</h3> - <ul style="margin-top: 10rpx;" :class="{ 'a': activeBox === 'a'?'a':'' }"> - <!-- background-color: #d6e3f4;border-radius: 60rpx; --> - <li class="flex" - :style="{'background':profession.index === item.tagId ? '#d6e3f4' :'','borderRadius': profession.index === item.tagId ? '60rpx' :'',display:index+1>professionIndex?'none':'flex'}" - v-for="(item,index) in profession.list" :key="index" - style="padding:0 20rpx;line-height: .3rem;height: .3rem;" - @click="handInstitCLick(item,'a')"> - <view class="">{{item.tagName}}</view> - <view class="">{{item.count}}</view> - </li> - </ul> - <view v-if="profession.list.length-1 >3" class="flex flex-center "> - <view class="toggleButton" style="color: #C1D3EA;" @click="shrinkClick('a','鑱屼笟')"> - {{ activeBox !== 'a' ? '鏇村 锕�' : '鏀惰捣 锔�' }} - </view> - </view> - </view> - <!-- 鏃舵湡 --> - <view class="demo-uni-col dark box boox zhongjianleft" - style="background-color: #fff;border: 2rpx solid #e0e0e0;" - :style="{'marginBottom': isAdvancedSearch ===true ? '0': '40rpx'}"> - <h3>{{dynasty.title}}</h3> - <ul style="margin-top: 10rpx;" :class="{ 'b': activeBox === 'b'?'b':'' }"> - <!-- background-color: #d6e3f4;border-radius: 60rpx; --> - <li class="flex" - :style="{'background':dynasty.index === item.dynastyId ? '#d6e3f4' :'','borderRadius': dynasty.index === item.dynastyId ? '60rpx' :'',display:index+1>dynastyIndex?'none':'flex'}" - v-for="(item,index) in dynasty.list" :key="index" style="padding:0 20rpx;" - @click="handInstitCLick(item,'b')"> - <view class="">{{item.dynastyName}}</view> - <view class="">{{item.count}}</view> - </li> - </ul> - <view v-if="dynasty.list.length-1 >3" class="flex flex-center "> - <view class="toggleButton" style="color: #C1D3EA;" @click="shrinkClick('b','鏃舵湡')"> - {{ activeBox !== 'b' ? '鏇村 锕�' : '鏀惰捣 锔�' }} - </view> - </view> - </view> - <!-- 鏉ユ簮 --> - <view v-if="!isAdvancedSearch" class="demo-uni-col dark box boox" - style="height: 250rpx;background-color: #fff;border: 2rpx solid #e0e0e0;"> - <h3>{{source.title}}</h3> - <ul class="laiyuan" style="margin-top: 10rpx;" :class="{ 'b': activeBox === 'b'?'b':'' }"> - <!-- background-color: #d6e3f4;border-radius: 60rpx; --> - <li class="flex liClick" v-for="(item,index) in source.list" :key="index" - style="padding:0 20rpx;color: #244A7B;" @click="handInstitCLick(item,'c')"> - <view class="">{{ index+1 + '. ' +item.source}}</view> - </li> - </ul> - <!-- <view class="flex flex-center"> + <view> + <!-- 椤堕儴 --> + <headNav idIndex="0" text="涓浗鍖诲浜虹墿鐭ヨ瘑搴�" /> + <!-- 鎼滅储 --> + <view class="flex flex-center Search"> + <!-- <luanqing-search class="search_bar" @onSearch="onSearch"></luanqing-search> --> + <advancedSearch + @onSearch="onSearch" + placehold="杈撳叆濮撳悕/鍒悕/鏃舵湡/浼犱富鑱屼笟鎼滅储" + :isAvancedTrue="false" + :keyword="keywords" + /> + <view + class="advancedSea" + @click="isAvancedClick" + style="color: #244a7b; cursor: pointer" + >楂樼骇鎼滅储 锕�</view + > + </view> + <!-- 鐑棬鎼滅储 --> + <view + class="flex flex-center hotSearch" + style="font-size: 20rpx; margin: 10rpx 0" + > + 鐑棬鎼滅储锛� + <ul class="flex" style="margin-right: 10rpx"> + <li + v-for="item in hot" + @click="hotSearchClick(item)" + :key="item.id" + class="cursor" + style="color: #5879a4" + > + {{ item.name }} + </li> + </ul> + </view> + <!-- 楂樼骇鎼滅储 --> + <view + class="advancedSeaTrue" + v-if="isAdvancedSearch" + style="padding: 0 230rpx; margin-bottom: 0.18rem" + > + <view + style="background-color: #fff; padding: 20rpx" + class="advancedSeaTrue1" + > + <h3>楂樼骇鎼滅储</h3> + <MyForm @submit="onSubmit" :from="from" /> + </view> + </view> + <uni-row + class="demo-uni-row zhushuju flex flex-items-start" + style="padding: 0 230rpx" + > + <!-- 宸︿晶 --> + <view class="fbox2" style="width: 2.6rem"> + <!-- 鑱屼笟 --> + <view + class="demo-uni-col zhiye dark box boox" + style=" + width: 2.6rem; + margin-bottom: 40rpx; + background-color: #fff; + border: 2rpx solid #e0e0e0; + min-height: 2rem; + " + > + <h3>{{ profession.title }}</h3> + <ul + style="margin-top: 10rpx" + :class="{ a: activeBox === 'a' ? 'a' : '' }" + > + <li + class="flex" + :style="{ + background: profession.index === item.tagId ? '#d6e3f4' : '', + borderRadius: profession.index === item.tagId ? '60rpx' : '', + display: index + 1 > professionIndex ? 'none' : 'flex', + }" + v-for="(item, index) in profession.list" + :key="index" + style="padding: 0 20rpx; line-height: 0.3rem; height: 0.3rem" + @click="handInstitCLick(item, 'a')" + > + <view class="">{{ item.tagName }}</view> + <view class="">{{ item.count }}</view> + </li> + </ul> + <view v-if="profession.list.length - 1 > 3" class="flex flex-center"> + <view + class="toggleButton" + style="color: #c1d3ea" + @click="shrinkClick('a', '鑱屼笟')" + > + {{ activeBox !== "a" ? "鏇村 锕�" : "鏀惰捣 锔�" }} + </view> + </view> + </view> + <!-- 鏃舵湡 --> + <view + class="demo-uni-col dark box boox zhongjianleft" + style="background-color: #fff; border: 2rpx solid #e0e0e0" + :style="{ marginBottom: isAdvancedSearch === true ? '0' : '40rpx' }" + > + <h3>{{ dynasty.title }}</h3> + <ul + style="margin-top: 10rpx" + :class="{ b: activeBox === 'b' ? 'b' : '' }" + > + <!-- background-color: #d6e3f4;border-radius: 60rpx; --> + <li + class="flex" + :style="{ + background: dynasty.index === item.dynastyId ? '#d6e3f4' : '', + borderRadius: dynasty.index === item.dynastyId ? '60rpx' : '', + display: index + 1 > dynastyIndex ? 'none' : 'flex', + }" + v-for="(item, index) in dynasty.list" + :key="index" + style="padding: 0 20rpx" + @click="handInstitCLick(item, 'b')" + > + <view class="">{{ item.dynastyName }}</view> + <view class="">{{ item.count }}</view> + </li> + </ul> + <view v-if="dynasty.list.length - 1 > 3" class="flex flex-center"> + <view + class="toggleButton" + style="color: #c1d3ea" + @click="shrinkClick('b', '鏃舵湡')" + > + {{ activeBox !== "b" ? "鏇村 锕�" : "鏀惰捣 锔�" }} + </view> + </view> + </view> + <!-- 鏉ユ簮 --> + <view + v-if="!isAdvancedSearch" + class="demo-uni-col dark box boox" + style=" + /* height: 250rpx; */ + background-color: #fff; + border: 2rpx solid #e0e0e0; + " + > + <h3>{{ source.title }}</h3> + <ul + class="laiyuan" + style="margin-top: 10rpx" + :class="{ b: activeBox === 'b' ? 'b' : '' }" + > + <!-- background-color: #d6e3f4;border-radius: 60rpx; --> + <li + class="flex liClick" + v-for="(item, index) in source.list" + :key="index" + style="padding: 0 20rpx; color: #244a7b" + @click="handInstitCLick(item, 'c')" + > + <view class="">{{ index + 1 + ". " + item.source }}</view> + </li> + </ul> + <!-- <view class="flex flex-center"> <view class="toggleButton" style="font-size: 25rpx;color: #C1D3EA;" @click="shrinkClick('b')"> {{ activeBox !== 'b' ? '鏇村 锕�' : '鏀惰捣 锔�' }} </view> </view> --> - </view> - </view> - <!-- 鍙充晶 --> - <view class="rightList demo-uni-col light fbox3 relative flex flex-column flex-grow: 1;" - style="width: 100%; margin-left: .2rem; background-color: #fff;border: 1px solid #C1D3EA;padding: 10rpx 20rpx;"> - <view class="flex lightTop" style="width: 100%; margin:.1rem 0"> - <view class="" style="color: #2C2C2C;">鍏�1374鏉�</view> - <el-button size="small" @click="exportClick">涓嬭浇</el-button> - </view> - <el-table :data="tableData" class="lightBo" style="width: 100%"> - <el-table-column prop="id" label="搴忓彿" width="110"></el-table-column> - <el-table-column prop="personName" label="濮撳悕"></el-table-column> - <el-table-column prop="personAlias" label="鍒悕"></el-table-column> - <el-table-column prop="gender" label="鎬у埆" width="70"></el-table-column> - <el-table-column prop="period" label="鏃舵湡"></el-table-column> - <el-table-column prop="birthYear" label="鐢熷勾" width="130"></el-table-column> - <el-table-column prop="deathYear" label="鍗掑勾" width="130"></el-table-column> - <el-table-column prop="nativePlace" label="绫嶈疮"></el-table-column> - <el-table-column prop="socialDistinction" label="绀句細韬唤"></el-table-column> - <el-table-column prop="official" label="瀹樿亴"></el-table-column> - </el-table> - <!-- 鍒嗛〉 --> - <el-row class="fenye" style="position: absolute;bottom: .1rem;"> - <el-pagination class="paging flex" :current-page="CurrentPage" :total="total" :page-size="pageSize" - @current-change="CurrentChange" @prev-click="PrevClick" @next-click="NextClick" prev-text="涓婁竴椤�" - next-text="涓嬩竴椤�" background layout="prev, pager, next"> - </el-pagination> - </el-row> - </view> - - </uni-row> - <div class="abox"></div> - <Footer1 /> - </view> + </view> + </view> + <!-- 鍙充晶 --> + <view + class="rightList demo-uni-col light fbox3 relative flex flex-column flex-grow: 1;" + style=" + width: 100%; + margin-left: 0.2rem; + background-color: #fff; + border: 1px solid #c1d3ea; + padding: 10rpx 20rpx; + " + > + <view class="flex lightTop" style="width: 100%; margin: 0.1rem 0"> + <view class="" style="color: #2c2c2c">鍏眥{ total }}鏉�</view> + <el-button size="small" @click="exportClick">涓嬭浇</el-button> + </view> + <el-table :data="tableData" class="lightBo" style="width: 100%"> + <el-table-column prop="id" label="搴忓彿" width="110"></el-table-column> + <el-table-column prop="personName" label="濮撳悕"></el-table-column> + <el-table-column prop="personAlias" label="鍒悕"></el-table-column> + <el-table-column + prop="gender" + label="鎬у埆" + width="70" + ></el-table-column> + <el-table-column prop="period" label="鏃舵湡"></el-table-column> + <el-table-column + prop="birthYear" + label="鐢熷勾" + width="130" + ></el-table-column> + <el-table-column + prop="deathYear" + label="鍗掑勾" + width="130" + ></el-table-column> + <el-table-column prop="nativePlace" label="绫嶈疮"></el-table-column> + <el-table-column + prop="socialDistinction" + label="绀句細韬唤" + ></el-table-column> + <el-table-column prop="official" label="瀹樿亴"></el-table-column> + </el-table> + <!-- 鍒嗛〉 --> + <el-row class="fenye" style="position: absolute; bottom: 0.1rem"> + <el-pagination + class="paging flex" + :current-page="CurrentPage" + :total="total" + :page-size="pageSize" + @current-change="CurrentChange" + @prev-click="PrevClick" + @next-click="NextClick" + prev-text="涓婁竴椤�" + next-text="涓嬩竴椤�" + background + layout="prev, pager, next" + > + </el-pagination> + </el-row> + </view> + </uni-row> + <div class="abox"></div> + <Footer1 /> + </view> </template> <script> - import Footer1 from '@/components/footer/footer' - import MyForm from '@/components/form/form.vue' - // 涓嬭浇闇�瑕佸鍏ョ殑渚濊禆 - import ExportJsonExcel from "js-export-excel"; - import { - getPDataStatistics, - getPDownload, - getPList, - getHotSearch - } from '@/api/index.js' - export default { - components: { - Footer1, - MyForm - }, - data() { - return { - // 楂樼骇鎼滅储鏄剧ず - isAdvancedSearch: false, - // 楂樼骇鎼滅储 - from: { - from: [{ - type: 'input', - label: '濮撳悕', - name: 'name', - value: '' - }, - { - type: 'input', - label: '鍒悕', - name: 'alias', - value: '' - }, - { - type: 'input', - label: '绫嶈疮', - name: 'nativePlace', - value: '' - }, - { - type: 'select', - label: '鑱屼笟', - value: '', - name: 'tagId', - options: [{ - label: '鍖诲', - value: '1' - }, - { - label: '涓栧', - value: '2' - } - ] - }, - { - type: 'input', - label: '鑱屽畼', - name: 'official', - value: '' - }, - { - type: 'select', - label: '鎬у埆', - value: '', - name: 'genderType', - options: [{ - label: '鏈寚鏄�', - value: 'UNKNOWN' - }, { - label: '鐢�', - value: 'MALE' - }, - { - label: '濂�', - value: 'WOMAN' - } - ] - }, - { - type: 'input', - label: '鏃舵湡', - name: 'dynasty', - value: '' - }, - { - type: 'input', - label: '鏈烘瀯', - name: 'institution', - value: '' - } - ] - }, +import Footer1 from "@/components/footer/footer"; +import MyForm from "@/components/form/form.vue"; +// 涓嬭浇闇�瑕佸鍏ョ殑渚濊禆 +import ExportJsonExcel from "js-export-excel"; +import { + getPDataStatistics, + getPDownload, + getPList, + getHotSearch, + getPersonList, +} from "@/api/index.js"; +export default { + components: { + Footer1, + MyForm, + }, + data() { + return { + // 楂樼骇鎼滅储鏄剧ず + isAdvancedSearch: false, + // 楂樼骇鎼滅储 + from: { + from: [ + { + type: "input", + label: "濮撳悕", + name: "name", + value: "", + }, + { + type: "input", + label: "鍒悕", + name: "alias", + value: "", + }, + { + type: "input", + label: "绫嶈疮", + name: "nativePlace", + value: "", + }, + { + type: "select", + label: "鑱屼笟", + value: "", + name: "tagId", + options: [ + { + label: "鍖诲", + value: "1", + }, + { + label: "涓栧", + value: "2", + }, + ], + }, + { + type: "input", + label: "鑱屽畼", + name: "official", + value: "", + }, + { + type: "select", + label: "鎬у埆", + value: "", + name: "genderType", + options: [ + { + label: "鏈寚鏄�", + value: "UNKNOWN", + }, + { + label: "鐢�", + value: "MALE", + }, + { + label: "濂�", + value: "WOMAN", + }, + ], + }, + { + type: "input", + label: "鏃舵湡", + name: "dynasty", + value: "", + }, + { + type: "input", + label: "鏈烘瀯", + name: "institution", + value: "", + }, + ], + }, - // 鐑棬鎼滅储 - hot: [], - // 鑱屼笟 - profession: { - title: '鑱屼笟', - index: 0, - id: 0, - list: [] - }, - // 鐜板湪澶氬皯鏉¤亴涓氭暟鎹� - professionIndex: 4, - // 灞曞紑鍜屾敹缂╃殑鎸夐挳闇�瑕� - activeBox: null, - // 鏃舵湡 - dynasty: { - title: '鏃舵湡', - id: 0, - index: 0, - list: [] - }, - // 鐜板湪澶氬皯鏉℃椂鏈熸暟鎹� - dynastyIndex: 4, - // 鏉ユ簮 - source: { - title: '鏉ユ簮', - index: 0, - id: 0, - list: [] - }, - // 琛ㄦ牸鐨勬暟缁� - tableData: [], - // 鍒嗛〉鐨勬�绘暟 - total: 100, - // 褰撳墠椤� - CurrentPage: 1, - // 涓�椤垫樉绀哄灏戞潯鏁版嵁 - pageSize: 6, - dataTable: [], - option: {} - } - }, - onLoad(options) { - this.onSearch({text:options.name}) - }, - mounted() { - // 淇敼涓ゆ鐨勯珮搴︿繚鎸佷竴鑷� - var box1Height = document.querySelector('.fbox2').offsetHeight; - document.querySelector('.fbox3').style.height = box1Height + (box1Height / 18) + 'px'; - console.log(box1Height, 'box1Height'); - this.getStatistics() - // 榛樿鍏堣皟鐢ㄦ悳绱竴娆� - this.onSearch('') - }, - methods: { - // ExportJsonExcel瀹炰緥 - Ture() { - // 鍒涘缓ExportJsonExcel瀹炰緥瀵硅薄 - let toExcel = new ExportJsonExcel(this.option); - // 璋冪敤淇濆瓨鏂规硶 - toExcel.saveExcel(); - }, - // 涓嬭浇鎸夐挳 - exportClick() { - const dataList = this.tableData; - let dataTable = []; // dataTable浠h〃excel鏂囦欢涓殑鏁版嵁鍐呭 - if (dataList) { - for (let i in dataList) { - let obj = { - 搴忓彿: dataList[i].id, - 濮撳悕: dataList[i].personName, - 鍒悕: dataList[i].personAlias, - 鎬у埆: dataList[i].gender, - 鏃舵湡: dataList[i].period, - 鐢熷勾: dataList[i].birthYear, - 鍗掑勾: dataList[i].deathYear, - 绫嶈疮: dataList[i].nativePlace, - 绀句細韬唤: dataList[i].socialDistinction, - 瀹樿亴: dataList[i].official, - }; + // 鐑棬鎼滅储 + hot: [], + // 鑱屼笟 + profession: { + title: "鑱屼笟", + index: 0, + id: 0, + list: [], + }, + // 鐜板湪澶氬皯鏉¤亴涓氭暟鎹� + professionIndex: 4, + // 灞曞紑鍜屾敹缂╃殑鎸夐挳闇�瑕� + activeBox: null, + // 鏃舵湡 + dynasty: { + title: "鏃舵湡", + id: "", + index: "", + list: [], + }, + // 鐜板湪澶氬皯鏉℃椂鏈熸暟鎹� + dynastyIndex: 4, + // 鏉ユ簮 + source: { + title: "鏉ユ簮", + index: 0, + id: 0, + list: [], + }, + // 琛ㄦ牸鐨勬暟缁� + tableData: [], + // 鍒嗛〉鐨勬�绘暟 + total: 100, + // 褰撳墠椤� + CurrentPage: 1, + // 涓�椤垫樉绀哄灏戞潯鏁版嵁 + pageSize: 10, + dataTable: [], + option: {}, + keywords: "", + }; + }, + onLoad(options) { + this.onSearch({ text: options.name }); + this.keywords = options.name; + }, + mounted() { + // 淇敼涓ゆ鐨勯珮搴︿繚鎸佷竴鑷� + var box1Height = document.querySelector(".fbox2").offsetHeight; + document.querySelector(".fbox3").style.height = + box1Height + box1Height / 18 + "px"; + console.log(box1Height, "box1Height"); + this.getStatistics(); + // 榛樿鍏堣皟鐢ㄦ悳绱竴娆� + this.onSearch(""); + }, + methods: { + // ExportJsonExcel瀹炰緥 + Ture() { + // 鍒涘缓ExportJsonExcel瀹炰緥瀵硅薄 + let toExcel = new ExportJsonExcel(this.option); + // 璋冪敤淇濆瓨鏂规硶 + toExcel.saveExcel(); + }, + // 涓嬭浇鎸夐挳 + async exportClick() { + const dataList = this.tableData; + let Obj = { + keywords: "", //鎼滅储妗嗘绱� + name: "", //濮撳悕 + alias: "", //鍒悕 + nativePlace: "", //鏈哄叧 + tagId: null, //鑱屼笟id + official: null, //鑱屽畼 + genderType: null, //鎬у埆 + dynasty: null, //鏈濅唬id + dynastyId: null, //鏈濅唬id + institution: null, //鏈烘瀯 + bookId: null, //鏉ユ簮id + page: 1, + pageSize: 9999, + }; + // // 鎼滅储 + await getPersonList(Obj).then((res) => { + console.log(res); + // if (res.success) { + // console.log(res, "鎼滅储鎺ュ彛"); + // this.tableData = res.list; + // // 鎬绘暟閲� + // this.total = res.npage.totalCount; + // } + }); + let dataTable = []; // dataTable浠h〃excel鏂囦欢涓殑鏁版嵁鍐呭 + if (dataList) { + for (let i in dataList) { + let obj = { + 搴忓彿: dataList[i].id, + 濮撳悕: dataList[i].personName, + 鍒悕: dataList[i].personAlias, + 鎬у埆: dataList[i].gender, + 鏃舵湡: dataList[i].period, + 鐢熷勾: dataList[i].birthYear, + 鍗掑勾: dataList[i].deathYear, + 绫嶈疮: dataList[i].nativePlace, + 绀句細韬唤: dataList[i].socialDistinction, + 瀹樿亴: dataList[i].official, + }; - dataTable.push(obj); // 璁剧疆excel姣忓垪鑾峰彇鐨勬暟鎹簮 - } - } - this.option.fileName = "涓尰鍖诲浜虹墿鐭ヨ瘑搴�"; //excel鏂囦欢鍚� - //excel鏂囦欢鏁版嵁 - this.option.datas = [{ - // excel鏂囦欢鐨勬暟鎹簮 - sheetData: dataTable, - // excel鏂囦欢sheet鐨勮〃鍚� - sheetName: "sheet", - // excel鏂囦欢琛ㄥご鍚� - sheetHeader: ["搴忓彿", "濮撳悕", "鍒悕", "鎬у埆", "鍒悕", "鏃舵湡", "鐢熷勾", "鍗掑勾", "绫嶈疮", "绀句細韬唤", "瀹樿亴"], - // excel鏂囦欢鍒楀悕 - sheetFilter: ["搴忓彿", "濮撳悕", "鍒悕", "鎬у埆", "鍒悕", "鏃舵湡", "鐢熷勾", "鍗掑勾", "绫嶈疮", "绀句細韬唤", "瀹樿亴"], - // columnWidths: ['10', '10', '20'] //excel鍒楀搴﹁缃� - }, ]; - this.Ture(); - }, - // 鎺ュ彛 - async getStatistics() { - // 鐑棬鎼滅储 - await getHotSearch().then(res => { - console.log(res, '鐑棬鎼滅储'); - this.hot = Object.keys(res.object).map(key => { - return { - id: parseInt(key), - name: res.object[key] - }; - }) - }) - // 鍙充晶鑱屼笟銆佹椂鏈熴�佹潵婧愮殑鏁版嵁 - await getPDataStatistics().then(res => { - console.log(res, '鎺ュ彛鎴愬姛sdsdfsdsfs'); - let totalCount1 = res.object.occupationStatistic.details.reduce((total, item) => total + - item.count, 0); - let totalCount2 = res.object.dynastyStatistic.details.reduce((total, item) => total + item - .count, 0); - // 鑱屼笟 - this.profession.list = [ - ...res.object.occupationStatistic.details, - ] - // 楂樼骇鎼滅储閲岄潰鐨勮亴涓�-------------------------------------------------- - // 鎵惧埌鑱屼笟瀛楁鍦� from 瀵硅薄涓殑绱㈠紩 - const professionIndex = this.from.from.findIndex(field => field.label === '鑱屼笟'); - // 濡傛灉鎵惧埌浜嗚亴涓氬瓧娈� - if (professionIndex !== -1) { - // 灏� profession.list 杞崲涓� options 鏍煎紡 - const options = this.profession.list.map(item => ({ - label: item.tagName, - value: item.tagId.toString() // 灏� id 杞崲涓哄瓧绗︿覆锛岀‘淇濅笌 value 绫诲瀷涓�鑷� - })); + dataTable.push(obj); // 璁剧疆excel姣忓垪鑾峰彇鐨勬暟鎹簮 + } + } + this.option.fileName = "涓尰鍖诲浜虹墿鐭ヨ瘑搴�"; //excel鏂囦欢鍚� + //excel鏂囦欢鏁版嵁 + this.option.datas = [ + { + // excel鏂囦欢鐨勬暟鎹簮 + sheetData: dataTable, + // excel鏂囦欢sheet鐨勮〃鍚� + sheetName: "sheet", + // excel鏂囦欢琛ㄥご鍚� + sheetHeader: [ + "搴忓彿", + "濮撳悕", + "鍒悕", + "鎬у埆", + "鍒悕", + "鏃舵湡", + "鐢熷勾", + "鍗掑勾", + "绫嶈疮", + "绀句細韬唤", + "瀹樿亴", + ], + // excel鏂囦欢鍒楀悕 + sheetFilter: [ + "搴忓彿", + "濮撳悕", + "鍒悕", + "鎬у埆", + "鍒悕", + "鏃舵湡", + "鐢熷勾", + "鍗掑勾", + "绫嶈疮", + "绀句細韬唤", + "瀹樿亴", + ], + // columnWidths: ['10', '10', '20'] //excel鍒楀搴﹁缃� + }, + ]; + this.Ture(); + }, + // 鎺ュ彛 + async getStatistics() { + // 鐑棬鎼滅储 + await getHotSearch().then((res) => { + console.log(res, "鐑棬鎼滅储"); + this.hot = Object.keys(res.object).map((key) => { + return { + id: parseInt(key), + name: res.object[key], + }; + }); + }); + // 鍙充晶鑱屼笟銆佹椂鏈熴�佹潵婧愮殑鏁版嵁 + await getPDataStatistics().then((res) => { + console.log(res, "鎺ュ彛鎴愬姛sdsdfsdsfs"); + let totalCount1 = res.object.occupationStatistic.details.reduce( + (total, item) => total + item.count, + 0 + ); + let totalCount2 = res.object.dynastyStatistic.details.reduce( + (total, item) => total + item.count, + 0 + ); + // 鑱屼笟 + this.profession.list = [ + { count: totalCount1, tagName: "鍏ㄩ儴", tagId: 0 }, + ...res.object.occupationStatistic.details, + ]; + // 楂樼骇鎼滅储閲岄潰鐨勮亴涓�-------------------------------------------------- + // 鎵惧埌鑱屼笟瀛楁鍦� from 瀵硅薄涓殑绱㈠紩 + const professionIndex = this.from.from.findIndex( + (field) => field.label === "鑱屼笟" + ); + // 濡傛灉鎵惧埌浜嗚亴涓氬瓧娈� + if (professionIndex !== -1) { + // 灏� profession.list 杞崲涓� options 鏍煎紡 + const options = this.profession.list.map((item) => ({ + label: item.tagName, + value: item.tagId.toString(), // 灏� id 杞崲涓哄瓧绗︿覆锛岀‘淇濅笌 value 绫诲瀷涓�鑷� + })); - // 鏇存柊鑱屼笟瀛楁鐨� options 灞炴�� - this.$set(this.from.from[professionIndex], 'options', options); - } - // -------------------------------------------------- - this.profession.index = this.profession.list[0].tagId - // 鏃舵湡 - this.dynasty.list = [ - ...res.object.dynastyStatistic.details - ] - // 鏉ユ簮 - this.source.list = res.object.sourceStatistic.details - this.source.index = this.source.list[0].bookId - }) - }, - // 鐑棬鎼滅储 - hotSearchClick(item) { - this.onSearch({text:item.name}) - console.log(item, '鐑棬鎼滅储'); - }, - // 宸︿晶鐨勬満鏋勭粺璁$瓑绛夋寜閽� - handInstitCLick(item, name) { - this.dynasty.id = 0 - this.source.id = 0 - this.profession.id = 0 - this.CurrentPage = 1 - if (name == 'a') { - this.profession.index = item.tagId - this.profession.id = item.tagId - this.CurrentPage = 1 + // 鏇存柊鑱屼笟瀛楁鐨� options 灞炴�� + this.$set(this.from.from[professionIndex], "options", options); + } + // -------------------------------------------------- + this.profession.index = this.profession.list[0].tagId; + // 鏃舵湡 + this.dynasty.list = [ + { count: totalCount2, dynastyName: "鍏ㄩ儴", dynastyId: "" }, + ...res.object.dynastyStatistic.details, + ]; + // 鏉ユ簮 + this.source.list = res.object.sourceStatistic.details; + this.source.index = this.source.list[0].bookId; + }); + }, + // 鐑棬鎼滅储 + hotSearchClick(item) { + this.onSearch({ text: item.name }); + console.log(item, "鐑棬鎼滅储"); + }, + // 宸︿晶鐨勬満鏋勭粺璁$瓑绛夋寜閽� + handInstitCLick(item, name) { + // this.dynasty.id = 0; + // this.source.id = 0; + // this.profession.id = 0; + // this.CurrentPage = 1; + if (name == "a") { + this.profession.index = item.tagId; + this.profession.id = item.tagId; + this.CurrentPage = 1; + } else if (name == "b") { + this.dynasty.index = item.dynastyId; + this.dynasty.id = item.dynastyId; + this.CurrentPage = 1; + console.log(item); + } else if (name == "c") { + this.source.index = item.bookId; + this.source.id = item.bookId; + this.CurrentPage = 1; + console.log("鏉ユ簮"); + } + this.onSearch(""); - } else if (name == 'b') { - this.dynasty.index = item.dynastyId - this.dynasty.id = item.dynastyId - this.CurrentPage = 1 - console.log(item); + console.log(item, name); + }, + isAvancedClick() { + this.isAdvancedSearch = !this.isAdvancedSearch; + this.$nextTick(() => { + var box1Height = document.querySelector(".fbox").offsetHeight; + // let box2Height= document.querySelector('.fbox1').style.height = box1Height + 'px'; + let box2Height = document.querySelector(".fbox1").offsetHeight; + console.log(box1Height, box2Height); + if (box1Height <= box2Height) { + document.querySelector(".fbox1").style.height = box1Height + "px"; + } + }); + }, + // 楂樼骇鎼滅储 + async onSubmit(val) { + console.log(val); + this.profession.index = Number(val.tagId); + this.profession.id = Number(val.tagId); + const currentDynasty = this.dynasty.list.find( + (f) => f.dynastyName == val.dynasty + ); + if (currentDynasty) { + this.dynasty.index = currentDynasty.dynastyId; + this.dynasty.id = currentDynasty.dynastyId; + } - } else if (name == 'c') { - this.source.index = item.bookId - this.source.id = item.bookId - this.CurrentPage = 1 - console.log('鏉ユ簮'); + this.CurrentPage = 1; + let Obj = { + keywords: "", //鎼滅储妗嗘绱� + name: val.name, //濮撳悕 + alias: val.alias, //鍒悕 + nativePlace: val.nativePlace, //鏈哄叧 + tagId: val.tagId !== "" ? Number(val.tagId) : null, //鑱屼笟id + official: val.official, //鑱屽畼 + genderType: val.genderType !== "" ? val.genderType : null, //鎬у埆 + dynasty: val.dynasty, //鏈濅唬id + dynastyId: this.dynasty.id, //鏈濅唬id + institution: val.institution, //鏈烘瀯 + bookId: null, //鏉ユ簮id + page: this.CurrentPage, + pageSize: this.pageSize, + }; + // // 鎼滅储 + await getPersonList(Obj).then((res) => { + console.log(res); + if (res.success) { + console.log(res, "鎼滅储鎺ュ彛"); + this.tableData = res.list; + // 鎬绘暟閲� + this.total = res.npage.totalCount; + } + }); + console.log(val); + }, + // 鍩虹鎼滅储 + async onSearch(val) { + let Obj = { + keywords: val.text, //鎼滅储妗嗘绱� + name: "", //濮撳悕 + alias: "", //鍒悕 + nativePlace: "", //鏈哄叧 + tagId: this.profession.id, //鑱屼笟id + official: "", //鑱屽畼 + genderType: null, //鎬у埆 + dynasty: null, //鏈濅唬id + dynastyId: this.dynasty.id, //鏈濅唬id + institution: "", //鏈烘瀯 + bookId: this.source.id, //鏉ユ簮id + page: this.CurrentPage, + pageSize: this.pageSize, + }; + // // 鎼滅储 + await getPersonList(Obj).then((res) => { + if (res.success) { + console.log(res, "鎼滅储鎺ュ彛"); + this.tableData = res.list; + // 鎬绘暟閲� + this.total = res.npage.totalCount; + } + }); + // console.log(val, '澹ぇ澶絾鏄�'); + }, + // 鐑棬鎼滅储 + HotClick(id) { + this.hot.forEach((item) => { + if (item.id === id) { + console.log(item.id === id); + item.bgColor = true; + } else { + console.log(item.id === id); + item.bgColor = false; + } + }); + }, + // 灞曞紑鏀剁缉 + shrinkClick(box, name) { + console.log(box); + console.log(this.dynasty.list); - } - this.onSearch('') - - - console.log(item, name); - }, - isAvancedClick() { - this.isAdvancedSearch = !this.isAdvancedSearch - this.$nextTick(() => { - var box1Height = document.querySelector('.fbox').offsetHeight; - // let box2Height= document.querySelector('.fbox1').style.height = box1Height + 'px'; - let box2Height = document.querySelector('.fbox1').offsetHeight - console.log(box1Height, box2Height); - if (box1Height <= box2Height) { - document.querySelector('.fbox1').style.height = box1Height + 'px'; - } - }) - }, - // 楂樼骇鎼滅储 - async onSubmit(val) { - console.log(val); - this.CurrentPage = 1 - let Obj = { - "keywords": '', //鎼滅储妗嗘绱� - "name": val.name, //濮撳悕 - "alias": val.alias, //鍒悕 - "nativePlace": val.nativePlace, //鏈哄叧 - "tagId": val.tagId !== '' ? val.tagId : null, //鑱屼笟id - "official": val.official, //鑱屽畼 - "genderType": val.genderType !== '' ? val.genderType : null, //鎬у埆 - "dynasty": val.dynasty, //鏈濅唬id - "dynastyId": null, //鏈濅唬id - "institution": val.institution, //鏈烘瀯 - "bookId": null, //鏉ユ簮id - "page": this.CurrentPage, - "pageSize": this.pageSize - } - // // 鎼滅储 - await getPList(Obj).then(res => { - console.log(res); - if (res.success) { - console.log(res, '鎼滅储鎺ュ彛'); - this.tableData = res.list - // 鎬绘暟閲� - this.total = res.npage.totalCount - } - }) - console.log(val); - }, - // 鍩虹鎼滅储 - async onSearch(val) { - let Obj = { - "keywords": val.text, //鎼滅储妗嗘绱� - "name": "", //濮撳悕 - "alias": "", //鍒悕 - "nativePlace": "", //鏈哄叧 - "tagId": this.profession.id, //鑱屼笟id - "official": "", //鑱屽畼 - "genderType": null, //鎬у埆 - "dynasty": null, //鏈濅唬id - "dynastyId": this.dynasty.id, //鏈濅唬id - "institution": "", //鏈烘瀯 - "bookId": this.source.id, //鏉ユ簮id - "page": this.CurrentPage, - "pageSize": this.pageSize - } - // // 鎼滅储 - await getPList(Obj).then(res => { - if (res.success) { - console.log(res, '鎼滅储鎺ュ彛'); - this.tableData = res.list - // 鎬绘暟閲� - this.total = res.npage.totalCount - } - }) - // console.log(val, '澹ぇ澶絾鏄�'); - }, - // 鐑棬鎼滅储 - HotClick(id) { - this.hot.forEach(item => { - if (item.id === id) { - console.log(item.id === id); - item.bgColor = true - } else { - console.log(item.id === id); - item.bgColor = false - } - }) - - }, - // 灞曞紑鏀剁缉 - shrinkClick(box, name) { - console.log(box); - console.log(this.dynasty.list); - - // this.activeBox = this.activeBox === 'a' ? null : 'a'; - if (name == '鑱屼笟') { - console.log('鑱屼笟'); - this.professionIndex = this.professionIndex < this.profession.list.length ? this.profession.list - .length : 4; - this.dynastyIndex = 4 - this.activeBox = this.activeBox === 'a' ? null : 'a'; - } else { - console.log('鏃舵湡'); - this.dynastyIndex = this.dynastyIndex < this.dynasty.list.length ? this.dynasty.list.length : 4; - this.professionIndex = 4 - this.activeBox = this.activeBox === 'b' ? null : 'b'; - } - }, - // 鍒嗛〉褰撳墠椤佃Е鍙戜簨浠� - CurrentChange(val) { - if (this.CurrentPage != val) { - this.CurrentPage = val - console.log('褰撳墠椤�', val); - this.onSearch('') - } - }, - // 涓婁竴椤� - PrevClick(val) { - if (this.CurrentPage != val) { - this.CurrentPage = val - // console.log('涓婁竴椤�', val); - // console.log(this.CurrentPage); - this.onSearch('') - } - }, - // 涓嬩竴椤� - NextClick(val) { - if (this.CurrentPage != val) { - // console.log('涓嬩竴椤�',val); - this.CurrentPage = val - // console.log(this.CurrentPage); - this.onSearch('') - } - } - } - } + // this.activeBox = this.activeBox === 'a' ? null : 'a'; + if (name == "鑱屼笟") { + console.log("鑱屼笟"); + this.professionIndex = + this.professionIndex < this.profession.list.length + ? this.profession.list.length + : 4; + this.dynastyIndex = 4; + this.activeBox = this.activeBox === "a" ? null : "a"; + } else { + console.log("鏃舵湡"); + this.dynastyIndex = + this.dynastyIndex < this.dynasty.list.length + ? this.dynasty.list.length + : 4; + this.professionIndex = 4; + this.activeBox = this.activeBox === "b" ? null : "b"; + } + }, + // 鍒嗛〉褰撳墠椤佃Е鍙戜簨浠� + CurrentChange(val) { + if (this.CurrentPage != val) { + this.CurrentPage = val; + console.log("褰撳墠椤�", val); + this.onSearch(""); + } + }, + // 涓婁竴椤� + PrevClick(val) { + if (this.CurrentPage != val) { + this.CurrentPage = val; + // console.log('涓婁竴椤�', val); + // console.log(this.CurrentPage); + this.onSearch(""); + } + }, + // 涓嬩竴椤� + NextClick(val) { + if (this.CurrentPage != val) { + // console.log('涓嬩竴椤�',val); + this.CurrentPage = val; + // console.log(this.CurrentPage); + this.onSearch(""); + } + }, + }, +}; </script> <style scoped> - /* 琛ㄥご */ - ::v-deep .el-table__header { - margin-bottom: .02rem; - } +/* 琛ㄥご */ +::v-deep .el-table__header { + margin-bottom: 0.02rem; +} - ::v-deep .has-gutter tr>th { - background-color: #DDE8F6 !important; - font-weight: normal; +::v-deep .has-gutter tr > th { + background-color: #dde8f6 !important; + font-weight: normal; +} - } +::v-deep .el-table__header th { + height: 0.3rem; + line-height: 0.3rem; + font-size: 0.14rem; + color: #2c2c2c; + /* 琛ㄥご鏂囧瓧棰滆壊涓虹櫧鑹诧紝澧炲姞瀵规瘮搴� */ + margin-bottom: 0.02rem !important; +} - ::v-deep .el-table__header th { - height: .3rem; - line-height: .3rem; - font-size: .14rem; - color: #2C2C2C; - /* 琛ㄥご鏂囧瓧棰滆壊涓虹櫧鑹诧紝澧炲姞瀵规瘮搴� */ - margin-bottom: .02rem !important; - } +::v-deep .el-table::before { + border: 0; + background-color: #fff; +} - ::v-deep .el-table::before { - border: 0; - background-color: #fff; - } +/* 琛ㄦ牸 */ +::v-deep .el-table__body td { + height: 0.3rem; + line-height: 0.3rem; + font-size: 0.14rem; + color: #2c2c2c !important; + font-weight: normal; +} - /* 琛ㄦ牸 */ - ::v-deep .el-table__body td { - height: .3rem; - line-height: .3rem; - font-size: .14rem; - color: #2C2C2C !important; - font-weight: normal; - } +.abox { + height: 1rem; +} - .abox { - height: 1rem; - } +/* 鍒嗛〉 */ +.paging ::v-deep .btn-prev, +.paging ::v-deep .btn-next { + border: 0; +} - /* 鍒嗛〉 */ - .paging ::v-deep .btn-prev, - .paging ::v-deep .btn-next { - border: 0; - } +.paging ::v-deep .btn-prev span, +.paging ::v-deep .btn-next span { + font-size: 0.12rem; + height: 0.3rem; + line-height: 0.3rem; + background-color: #fff; + color: #9e9e9e; + text-align: center; + border: 1px solid #9e9e9e; + padding: 0 0.1rem; +} - .paging ::v-deep .btn-prev span, - .paging ::v-deep .btn-next span { - font-size: .12rem; - height: .3rem; - line-height: .3rem; - background-color: #fff; - color: #9E9E9E; - text-align: center; - border: 1px solid #9E9E9E; - padding: 0 .1rem; - } +.paging ::v-deep .el-pager li { + font-size: 0.1rem; + width: 0.28rem; + height: 0.3rem; + line-height: 0.3rem; + background-color: #fff; + color: #9e9e9e; + text-align: center; + border: 1px solid #9e9e9e; +} - .paging ::v-deep .el-pager li { - font-size: .1rem; - width: .28rem; - height: .3rem; - line-height: .3rem; - background-color: #fff; - color: #9E9E9E; - text-align: center; - border: 1px solid #9E9E9E; - } +/* -------------- */ +/* 鍙充晶 */ +.rightList { + padding-left: 0.2rem !important; - /* -------------- */ - /* 鍙充晶 */ - .rightList { - padding-left: .2rem !important; + .light { + padding: 0.1rem 0.2rem !important; + } - .light { - padding: .1rem .2rem !important; - } + .lightTop { + font-size: 0.14rem !important; + } - .lightTop { - font-size: .14rem !important; - } + .el-button { + font-size: 0.12rem !important; + padding: 0.05rem 0.18rem !important; + } - .el-button { - font-size: .12rem !important; - padding: .05rem .18rem !important; - } + .lightBo { + font-size: 0.14rem !important; - .lightBo { - font-size: .14rem !important; + .is-leaf { + background-color: #c1d3ea !important; + color: #2c2c2c !important; + font-weight: 400; - .is-leaf { - background-color: #C1D3EA !important; - color: #2C2C2C !important; - font-weight: 400; + .cell { + height: 0.3rem !important; + line-height: 0.3rem !important; + } + } + } - .cell { + .el-table__body-wrapper { + .el-table__row { + height: 0.46rem !important; + line-height: 0.46rem !important; - height: .3rem !important; - line-height: .3rem !important; - } - } - } + .cell { + height: 0.3rem !important; + line-height: 0.3rem !important; + } + } + } +} - .el-table__body-wrapper { - .el-table__row { - height: .46rem !important; - line-height: .46rem !important; +@media screen and (min-width: 2560px) and (max-width: 3840px) { + /* 鎼滅储 */ + .Search { + margin: 0.35rem 0 0.16rem !important; + font-size: 0.12rem !important; + } - .cell { + .Search ::v-deep .advancedSea { + font-size: 0.12rem !important; + margin-left: 0.35rem; + } - height: .3rem !important; - line-height: .3rem !important; - } - } + .Search ::v-deep .flex-center { + height: 80% !important; + } - } - } + .hotSearch { + font-size: 0.12rem !important; + margin-bottom: 0.19rem !important; - @media screen and (min-width:2560px)and (max-width:3840px) { + li { + font-size: 0.12rem !important; + margin: 0 0.1rem; + } + } - /* 鎼滅储 */ - .Search { - margin: .35rem 0 .16rem !important; - font-size: .12rem !important; - } + .advancedSeaTrue, + .zhushuju { + padding: 0 1.24rem !important; + } - .Search ::v-deep .advancedSea { - font-size: .12rem !important; - margin-left: .35rem; - } + .advancedSeaTrue1 { + padding: 0.08rem 0.19rem !important; + font-size: 0.14rem !important; + } - .Search ::v-deep .flex-center { - height: 80% !important; - } + /* Form缁勪欢閲岄潰鐨勬牱寮� */ + ::v-deep .el-row { + display: flex; + flex-wrap: wrap; + margin-top: 0.1rem !important; + } - .hotSearch { - font-size: .12rem !important; - margin-bottom: .19rem !important; + ::v-deep .el-form-item { + display: flex !important; + flex-wrap: wrap !important; + margin-bottom: 0.18rem !important; + } - li { - font-size: .12rem !important; - margin: 0 .1rem; - } - } + ::v-deep .el-form-item__label { + font-size: 0.14rem !important; + height: 0.3rem !important; + display: flex !important; + align-items: center !important; + } - .advancedSeaTrue, - .zhushuju { - padding: 0 1.24rem !important; - } + ::v-deep .el-input__inner { + font-size: 0.14rem !important; + height: 0.3rem !important; + } - .advancedSeaTrue1 { - padding: .08rem .19rem !important; - font-size: .14rem !important; - } + ::v-deep .Formbtn { + width: 100% !important; + display: flex; + justify-content: center; + align-items: center; - /* Form缁勪欢閲岄潰鐨勬牱寮� */ - ::v-deep .el-row { - display: flex; - flex-wrap: wrap; - margin-top: .1rem !important; - } + .el-button { + width: 0.7rem !important; + height: 0.3rem !important; + font-size: 0.12rem; + } + } - ::v-deep .el-form-item { - display: flex !important; - flex-wrap: wrap !important; - margin-bottom: .18rem !important; - } + /* 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� */ + /* 宸﹁竟鐨� */ + .boox { + padding: 0.1rem 0.09rem; + min-height: 2rem !important; + position: relative; - ::v-deep .el-form-item__label { - font-size: .14rem !important; - height: .3rem !important; - display: flex !important; - align-items: center !important; - } + ul { + margin-top: 0.16rem !important; + } - ::v-deep .el-input__inner { - font-size: .14rem !important; - height: .3rem !important; - } + h3 { + font-size: 0.14rem; + margin-left: 0.1rem; + } - ::v-deep .Formbtn { - width: 100% !important; - display: flex; - justify-content: center; - align-items: center; + li { + height: 0.3rem; + line-height: 0.3rem; + padding: 0 0.2rem !important; + margin: 0.05rem 0 !important; + border-radius: 0.3rem !important; + } - .el-button { - width: .7rem !important; - height: .3rem !important; - font-size: .12rem; + .toggleButton1 { + position: absolute; + bottom: 0.1rem !important; + left: 40% !important; + } - } - } + .toggleButton { + font-size: 0.14rem !important; + } + } - /* 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� */ - /* 宸﹁竟鐨� */ - .boox { - padding: .1rem .09rem; - min-height: 2rem !important; - position: relative; + .zhongjianleft { + margin: 0.27rem 0 !important; + } - ul { - margin-top: .16rem !important; - } + .laiyuan { + min-height: 2rem !important; + overflow: auto; + } - h3 { - font-size: .14rem; - margin-left: .1rem; - } + /* 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� */ + ::v-deep .uni-input-placeholder { + font-size: 0.14rem; + height: 100%; + display: flex; + align-content: center; + align-items: center; + } - li { - height: .3rem; - line-height: .3rem; - padding: 0 .2rem !important; - margin: .05rem 0 !important; - border-radius: .3rem !important; + ::v-deep .ffff { + border-radius: 0.3rem !important; + height: 0.36rem !important; + } - } + ::v-deep .widget_button { + border-radius: inherit !important; + margin-right: 0.02rem !important; + background-color: #597aa5; + } - .toggleButton1 { - position: absolute; - bottom: .1rem !important; - left: 40% !important; - } + /* 鍙充晶 */ + .rightList { + padding-left: 0.2rem !important; - .toggleButton { - font-size: .14rem !important; - } - } + .light { + padding: 0.1rem 0.2rem !important; + } - .zhongjianleft { - margin: .27rem 0 !important; - } + .lightTop { + font-size: 0.14rem !important; + } - .laiyuan { - min-height: 2rem !important; - } + .el-button { + font-size: 0.12rem !important; + padding: 0.05rem 0.18rem !important; + } - /* 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� */ - ::v-deep .uni-input-placeholder { - font-size: .14rem; - height: 100%; - display: flex; - align-content: center; - align-items: center; - } + .lightBo { + font-size: 0.14rem !important; - ::v-deep .ffff { - border-radius: .3rem !important; - height: .36rem !important; - } - - ::v-deep .widget_button { - border-radius: inherit !important; - margin-right: .02rem !important; - background-color: #597AA5; - } - - - - /* 鍙充晶 */ - .rightList { - padding-left: .2rem !important; - - .light { - padding: .1rem .2rem !important; - } - - .lightTop { - font-size: .14rem !important; - } - - .el-button { - font-size: .12rem !important; - padding: .05rem .18rem !important; - } - - .lightBo { - font-size: .14rem !important; - - .is-leaf { - background-color: #C1D3EA !important; - color: #2C2C2C !important; - font-weight: 400; - - .cell { - - height: .3rem !important; - line-height: .3rem !important; - } - } - } - - .el-table__body-wrapper { - .el-table__row { - height: .46rem !important; - line-height: .46rem !important; - - .cell { - - height: .3rem !important; - line-height: .3rem !important; - } - } - - } - } - } - - @media screen and (min-width:1366px) and (max-width:1920px) { - - /* 鎼滅储 */ - .Search { - margin: .35rem 0 .16rem !important; - font-size: .12rem !important; - } - - .Search ::v-deep .advancedSea { - font-size: .12rem !important; - margin-left: .35rem; - } + .is-leaf { + background-color: #c1d3ea !important; + color: #2c2c2c !important; + font-weight: 400; - .Search ::v-deep .flex-center { - height: 80% !important; - } + .cell { + height: 0.3rem !important; + line-height: 0.3rem !important; + } + } + } - .hotSearch { - font-size: .12rem !important; - margin-bottom: .19rem !important; + .el-table__body-wrapper { + .el-table__row { + height: 0.46rem !important; + line-height: 0.46rem !important; - li { - font-size: .12rem !important; - margin: 0 .1rem; - } - } - .advancedSeaTrue1{ - border: 1px solid #C1D3EA; - } - .advancedSeaTrue, - .zhushuju { - padding: 0 1.24rem !important; - } + .cell { + height: 0.3rem !important; + line-height: 0.3rem !important; + } + } + } + } +} - .advancedSeaTrue1 { - padding: .08rem .19rem !important; - font-size: .14rem !important; - } +@media screen and (min-width: 1366px) and (max-width: 1920px) { + /* 鎼滅储 */ + .Search { + margin: 0.35rem 0 0.16rem !important; + font-size: 0.12rem !important; + } - /* Form缁勪欢閲岄潰鐨勬牱寮� */ - ::v-deep .el-row { - display: flex; - flex-wrap: wrap; - margin-top: .1rem !important; - } + .Search ::v-deep .advancedSea { + font-size: 0.12rem !important; + margin-left: 0.35rem; + } - ::v-deep .el-form-item { - display: flex !important; - flex-wrap: wrap !important; - margin-bottom: .18rem !important; - } + .Search ::v-deep .flex-center { + height: 80% !important; + } - ::v-deep .el-form-item__label { - font-size: .14rem !important; - height: .3rem !important; - display: flex !important; - align-items: center !important; - } + .hotSearch { + font-size: 0.12rem !important; + margin-bottom: 0.19rem !important; - ::v-deep .el-input__inner { - font-size: .14rem !important; - height: .3rem !important; - } + li { + font-size: 0.12rem !important; + margin: 0 0.1rem; + } + } + .advancedSeaTrue1 { + border: 1px solid #c1d3ea; + } + .advancedSeaTrue, + .zhushuju { + padding: 0 1.24rem !important; + } - ::v-deep .Formbtn { - width: 100% !important; - display: flex; - justify-content: center; - align-items: center; + .advancedSeaTrue1 { + padding: 0.08rem 0.19rem !important; + font-size: 0.14rem !important; + } - .el-button { - width: .7rem !important; - height: .3rem !important; - font-size: .12rem; + /* Form缁勪欢閲岄潰鐨勬牱寮� */ + ::v-deep .el-row { + display: flex; + flex-wrap: wrap; + margin-top: 0.1rem !important; + } - } - } + ::v-deep .el-form-item { + display: flex !important; + flex-wrap: wrap !important; + margin-bottom: 0.18rem !important; + } - /* 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� */ - /* 宸﹁竟鐨� */ - .boox { - padding: .1rem .09rem; - min-height: 2rem !important; - position: relative; + ::v-deep .el-form-item__label { + font-size: 0.14rem !important; + height: 0.3rem !important; + display: flex !important; + align-items: center !important; + } - ul { - margin-top: .16rem !important; - margin-bottom: .2rem !important; - } + ::v-deep .el-input__inner { + font-size: 0.14rem !important; + height: 0.3rem !important; + } - h3 { - font-size: .14rem; - margin-left: .1rem; - } + ::v-deep .Formbtn { + width: 100% !important; + display: flex; + justify-content: center; + align-items: center; - li { - height: .3rem; - line-height: .3rem; - padding: 0 .2rem !important; - margin: .05rem 0 !important; - border-radius: .3rem !important; + .el-button { + width: 0.7rem !important; + height: 0.3rem !important; + font-size: 0.12rem; + } + } - } + /* 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� */ + /* 宸﹁竟鐨� */ + .boox { + padding: 0.1rem 0.09rem; + min-height: 2rem !important; + position: relative; - .toggleButton1 { - position: absolute; - bottom: .1rem !important; - left: 40% !important; - } + ul { + margin-top: 0.16rem !important; + margin-bottom: 0.2rem !important; + } - .toggleButton { - font-size: .14rem !important; - } - } + h3 { + font-size: 0.14rem; + margin-left: 0.1rem; + } - .zhongjianleft { - margin: .27rem 0 !important; - } + li { + height: 0.3rem; + line-height: 0.3rem; + padding: 0 0.2rem !important; + margin: 0.05rem 0 !important; + border-radius: 0.3rem !important; + } - .laiyuan { - min-height: 2rem !important; - } + .toggleButton1 { + position: absolute; + bottom: 0.1rem !important; + left: 40% !important; + } - /* 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� */ - ::v-deep .uni-input-placeholder { - font-size: .14rem; - height: 100%; - display: flex; - align-content: center; - align-items: center; - } + .toggleButton { + font-size: 0.14rem !important; + } + } - ::v-deep .ffff { - border-radius: .3rem !important; - height: .36rem !important; - } + .zhongjianleft { + margin: 0.27rem 0 !important; + } - ::v-deep .widget_button { - border-radius: inherit !important; - margin-right: .02rem !important; - background-color: #597AA5; - } + .laiyuan { + min-height: 2rem !important; + overflow: auto; + } - /* -------------------- */ - /* 鍙充晶 */ - .rightList { - width: 100%; - padding-left: .2rem !important; + /* 鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� */ + ::v-deep .uni-input-placeholder { + font-size: 0.14rem; + height: 100%; + display: flex; + align-content: center; + align-items: center; + } - .light { - padding: .1rem .2rem !important; - } + ::v-deep .ffff { + border-radius: 0.3rem !important; + height: 0.36rem !important; + } - .lightTop { - font-size: .14rem !important; - } + ::v-deep .widget_button { + border-radius: inherit !important; + margin-right: 0.02rem !important; + background-color: #597aa5; + } - .el-button { - font-size: .12rem !important; - padding: .05rem .18rem !important; - } + /* -------------------- */ + /* 鍙充晶 */ + .rightList { + width: 100%; + padding-left: 0.2rem !important; - .lightBo { - font-size: .14rem !important; + .light { + padding: 0.1rem 0.2rem !important; + } - .is-leaf { - background-color: #C1D3EA !important; - color: #2C2C2C !important; - font-weight: 400; + .lightTop { + font-size: 0.14rem !important; + } - .cell { + .el-button { + font-size: 0.12rem !important; + padding: 0.05rem 0.18rem !important; + } - height: .3rem !important; - line-height: .3rem !important; - } - } - } + .lightBo { + font-size: 0.14rem !important; - .el-table__body-wrapper { - .el-table__row { - height: .46rem !important; - line-height: .46rem !important; + .is-leaf { + background-color: #c1d3ea !important; + color: #2c2c2c !important; + font-weight: 400; - .cell { + .cell { + height: 0.3rem !important; + line-height: 0.3rem !important; + } + } + } - height: .3rem !important; - line-height: .3rem !important; - } - } + .el-table__body-wrapper { + .el-table__row { + height: 0.46rem !important; + line-height: 0.46rem !important; - } - } - } + .cell { + height: 0.3rem !important; + line-height: 0.3rem !important; + } + } + } + } +} - * { - box-sizing: border-box; - } +* { + box-sizing: border-box; +} - .hotSearch { - font-size: .12rem; - margin-bottom: .19rem; +.hotSearch { + font-size: 0.12rem; + margin-bottom: 0.19rem; - li { - font-size: .12rem; - margin: 0 .1rem; - } - } + li { + font-size: 0.12rem; + margin: 0 0.1rem; + } +} - /* .a { +/* .a { height: 2rem; } @@ -1058,53 +1228,52 @@ height: 100px; } */ - .box { - transition: height 0.3s; - /* 娣诲姞杩囨浮鏁堟灉 */ - overflow: hidden; - /* 閬垮厤鍐呭婧㈠嚭 */ +.box { + transition: height 0.3s; + /* 娣诲姞杩囨浮鏁堟灉 */ + overflow: hidden; + /* 閬垮厤鍐呭婧㈠嚭 */ +} - } +/* 宸﹁竟鐨� */ +.boox { + width: 100%; + padding: 0.1rem 0.09rem; + min-height: 2rem !important; + position: relative; + border: 1px solid #c1d3ea !important; - /* 宸﹁竟鐨� */ - .boox { - width: 100%; - padding: .1rem .09rem; - min-height: 2rem !important; - position: relative; - border: 1px solid #c1d3ea !important; + ul { + margin-top: 0.16rem !important; + } - ul { - margin-top: .16rem !important; - } + h3 { + font-size: 0.14rem; + margin-left: 0.1rem; + } - h3 { - font-size: .14rem; - margin-left: .1rem; - } + li { + height: 0.3rem; + line-height: 0.3rem; + padding: 0 0.2rem !important; + margin: 0.05rem 0 !important; + border-radius: 0.3rem !important; + font-size: 0.14rem; + } - li { - height: .3rem; - line-height: .3rem; - padding: 0 .2rem !important; - margin: .05rem 0 !important; - border-radius: .3rem !important; - font-size: .14rem; - } + .toggleButton1 { + position: absolute; + bottom: 0.1rem !important; + left: 40% !important; + } - .toggleButton1 { - position: absolute; - bottom: .1rem !important; - left: 40% !important; - } + .toggleButton { + font-size: 0.14rem !important; + } +} - .toggleButton { - font-size: .14rem !important; - } - } - - ::v-deep .el-table th, - ::v-deep .el-table td { - text-align: center; - } -</style> \ No newline at end of file +::v-deep .el-table th, +::v-deep .el-table td { + text-align: center; +} +</style> diff --git a/src/static/initialize.css b/src/static/initialize.css index febb8bb..177fef8 100644 --- a/src/static/initialize.css +++ b/src/static/initialize.css @@ -5,8 +5,8 @@ } html { - font-size: calc(100vw / 1440 * 96) !important; - /* font-size: 10px; */ + /* font-size: calc(100vw / 1440 * 96) !important; */ + font-size: 126px; } body { -- Gitblit v1.9.1