From ccb19f88b2583c7dadb18b6b2e9571ec120c6c61 Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期三, 24 四月 2024 22:34:38 +0800 Subject: [PATCH] 1 --- src/pages/character/detail.vue | 1100 ++++++++++++++++++ src/pages.json | 39 src/pages/character/index.vue | 585 +++++++++ src/pages/territory/territory.vue | 2 src/utils/request/req1.js | 87 src/pages/inherit/list.vue | 2 src/pages/index/index.vue | 4 src/pages/shiyiHome/shiyiHome.vue | 4 src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue | 232 ++- src/uni_modules/uni-ui/package.json | 11 src/components/advancedSearch/advancedSearch.vue | 386 +++-- /dev/null | 594 --------- src/api/index.js | 372 +++-- src/pages/repository/repository.vue | 2 src/uni_modules/uni-list/readme.md | 6 src/components/headNav/headNav.vue | 9 src/pages/inherit/index.vue | 190 +-- src/pages/Login/Login.vue | 4 src/pages/forgetPass/forgetPass.vue | 4 src/pages/TcmSystem/TcmSystem.vue | 4 20 files changed, 2,372 insertions(+), 1,265 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index e77eeec..eb5ef3c 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,222 +1,266 @@ -import req from '@/utils/request/req1.js' -import req1 from '@/utils/request/req1.js' -import qs from 'querystring' +import req from "@/utils/request/req1.js"; +import req1 from "@/utils/request/req1.js"; +import qs from "querystring"; // 娉ㄥ唽鐧诲綍 export const getaddLogin = (Obj) => { - return req1({ - url: '/account/register', - method: 'post', - data: Obj - }) -} + return req1({ + url: "/account/register", + method: "post", + data: Obj + }); +}; // 楠岃瘉鐮� /account/verifyCode export const getverifyCode = (req) => { - console.log(req, qs.encode(req), 'rrr'); - return req1({ - url: "/account/verifyCode", - method: "post", - data: req, - headers: { - 'Content-Type': 'multipart/form-data' - } - }) -} + console.log(req, qs.encode(req), "rrr"); + return req1({ + url: "/account/verifyCode", + method: "post", + data: req, + headers: { + "Content-Type": "multipart/form-data" + } + }); +}; // login 鐧诲綍 export const getLogin = (req) => { - console.log(req, qs.encode(req), 'rrr'); - return req1({ - url: "/account/verification", - method: "post", - data: req, - }) -} + console.log(req, qs.encode(req), "rrr"); + return req1({ + url: "/account/verification", + method: "post", + data: req + }); +}; // 鑾峰彇鐢ㄦ埛淇℃伅 export const getUserInfo = () => { - return req1({ - url: "/account/getUserInfo", - method: "post", - }) -} + return req1({ + url: "/account/getUserInfo", + method: "post" + }); +}; // 閲嶇疆瀵嗙爜 export const getRestPassword = (Obj) => { - return req1({ - url: '/account/resetPassword', - method: 'post', - data: Obj - }) -} + return req1({ + url: "/account/resetPassword", + method: "post", + data: Obj + }); +}; // 閫�鍑虹櫥褰� export const getlogout = () => { - return req1({ - url: "/account/logout", - method: "post", - }) -} + return req1({ + url: "/account/logout", + method: "post" + }); +}; // 淇敼瀵嗙爜 export const getchangePassword = (obj) => { - return req1({ - url: "/account/changePassword", - method: "post", - data: obj - }) -} + return req1({ + url: "/account/changePassword", + method: "post", + data: obj + }); +}; -// +// // 浜虹墿鐩稿叧鎺ュ彛鐨勬暟鎹緭鍑� export const getdataOutput = () => { - return req1({ - url: "/person/dataOutput", - method: "post", - }) -} + return req1({ + url: "/person/dataOutput", + method: "post" + }); +}; // 浜虹墿鐩稿叧鐨� 鐑棬鎼滅储 export const getHotSearch = () => { - return req1({ - url: '/person/hotSearch', - method: 'post' - }) -} + return req1({ + url: "/person/hotSearch", + method: "post" + }); +}; // 浜虹墿鐩稿叧鐨� 鏉ユ簮 -export const getSource = (id) => { - return req1({ - url: '/person/source', - method: 'post', - data: id - }) -} -// 浜虹墿鐩稿叧鐨� 涓汉鏃剁┖鍦板浘 -export const getSpaceTime = (id) => { - return req1({ - url: '/person/spaceTime', - method: 'post', - data: id - }) -} +export const getSource = (data) => { + return req1({ + url: "/person/source", + method: "post", + data: data + }); +}; +// 浜虹墿鐩稿叧鐨� 涓汉鏃剁┖鍦板浘 +export const getSpaceTime = (data) => { + return req1({ + url: "/person/spaceTime", + method: "post", + data: data + }); +}; // 鍖诲浜虹墿鐭ヨ瘑搴撶殑鐩稿叧鍥捐〃 -export const getImages = (id) => { - return req1({ - url: '/person/images', - method: 'post', - data: id - }) -} +export const getPersonImages = (data) => { + return req1({ + url: "/person/images", + method: "post", + data: data + }); +}; +// 鍖诲浜虹墿鐭ヨ瘑搴� 涓汉浜嬭抗 +export const getPersonBiog = (data) => { + return req1({ + url: "/person/biog", + method: "post", + data: data + }); +}; +// 鍖诲浜虹墿鐭ヨ瘑搴� 浜虹墿鍏崇郴 +export const getPersonRelationAtSchool = (data) => { + return req1({ + url: "/person/personRelationAtSchool", + method: "post", + data: data + }); +}; + // 鍖诲浜虹墿鐭ヨ瘑搴� 钁楄堪 -export const getWritings = (id) => { - return req1({ - url: '/person/writings', - method: 'post', - data: id - }) -} +export const getPersonWritings = (data) => { + return req1({ + url: "/person/writings", + method: "post", + data: data + }); +}; // 鍖诲浜虹墿鐭ヨ瘑搴� 浜虹墿璇︽儏 export const getPersonInfo = (Obj) => { - return req1({ - url: '/person/getPersonInfo', - method: 'post', - data: Obj - }) -} -// 鍖诲浜虹墿鐭ヨ瘑搴� 鍩虹妫�绱� -export const getFuzzySearch = (Obj) => { - console.log(Obj, 'sss'); - return req1({ - url: '/person/fuzzySearch?keyword=' + Obj, - method: 'post', - // data:Obj - }) -} + return req1({ + url: "/person/getPersonInfo", + method: "post", + data: Obj + }); +}; +// 鍖诲浜虹墿鐭ヨ瘑搴� 鍩虹妫�绱� +export const getFuzzySearch = (requestData) => { + return req1({ + url: "/person/fuzzySearch?keyword="+requestData?.keyword, + method: "post", + }); +}; -// 鍖诲浜虹墿鐭ヨ瘑搴� 楂樼骇妫�绱� +// 鍖诲浜虹墿鐭ヨ瘑搴� 楂樼骇妫�绱� export const getAdvanceSearch = (Obj) => { - return req1({ - url: '/person/advanceSearch', - method: 'post', - data: Obj - }) -} + return req1({ + url: "/person/advanceSearch", + method: "post", + data: Obj + }); +}; // 涓浗鍦板煙鍦拌氨妫�绱汉鐗� -export const getRetrieval = (dynastyNumber, name) => { - return req1({ - url: '/person/retrieval', - method: 'post', - data: { - dynasty: dynastyNumber, - keyword: name - } - }) -} +export const getRetrieval = (requestData) => { + return req1({ + url: "/person/retrieval", + method: "post", + data: { + keyword: requestData?.keyword || "", + dynasty: requestData?.dynasty || "" + } + }); +}; // 鍖诲浜虹墿鐭ヨ瘑搴� + +// 涓栧尰浼犳壙 +export const inheritMedicalList = (requestData) => { + return req1({ + url: "/inheritMedical/list", + method: "post", + data: requestData + }); +}; +export const inheritMedicalSataStatistics = (requestData) => { + return req1({ + url: "/inheritMedical/dataStatistics", + method: "post", + data: requestData + }); +}; +export const inheritMedicalCultureList = (requestData) => { + return req1({ + url: "/inheritMedical/cultureList", + method: "post", + data: requestData + }); +}; +export const inheritMedicalRelationList = (requestData) => { + return req1({ + url: "/inheritMedical/relationList", + method: "post", + data: requestData + }); +}; // 妫�绱㈤〉 // 鍩虹銆侀珮绾ф绱� ------------------------------ -export const getPList = (person) => { - return req1({ - url: '/person/list', - method: 'post', - data: person - }) -} +export const getPersonList = (data) => { + return req1({ + url: "/person/list", + method: "post", + data: data + }); +}; // 妫�绱㈡暟鎹埌鍑� export const getPDownload = () => { - return req1({ - url: '/person/download', - method: 'post' - }) -} + return req1({ + url: "/person/download", + method: "post" + }); +}; // -------------------------P - - - // 鍖讳簨鍒跺害 // 鏁版嵁缁熻 export const getDataStatistics = () => { - return req1({ - url: '/medical/dataStatistics', - method: 'post' - }) -} + return req1({ + url: "/medical/dataStatistics", + method: "post" + }); +}; // 鏌ヨ export const getMedicalList = (data) => { - return req1({ - url: '/medical/list', - method: 'post', - data: data - }) -} + return req1({ + url: "/medical/list", + method: "post", + data: data + }); +}; // 璇︽儏 export const getMedicalDetails = (Obj) => { - return req1({ - url: '/medical/details', - method: 'post', - data: Obj - }) -} + return req1({ + url: "/medical/details", + method: "post", + data: Obj + }); +}; // 鍙栧�硷細RDF銆丯T銆乆ML銆丣SON export const getMedicalDataOutput = (Obj) => { - return req1({ - url: '/medical/dataOutput', - method: 'post', - data: Obj - }) -} + return req1({ + url: "/medical/dataOutput", + method: "post", + data: Obj + }); +}; // ----------- + + // 涓浗鍖诲浜虹墿鐭ヨ瘑搴� // 鏁版嵁缁熻 export const getPDataStatistics = () => { - return req1({ - url: '/person/dataStatistics', - method: 'post' - }) -} -// ---------------- \ No newline at end of file + return req1({ + url: "/person/dataStatistics", + method: "post" + }); +}; +// ---------------- diff --git a/src/components/advancedSearch/advancedSearch.vue b/src/components/advancedSearch/advancedSearch.vue index 047158e..666ae59 100644 --- a/src/components/advancedSearch/advancedSearch.vue +++ b/src/components/advancedSearch/advancedSearch.vue @@ -1,198 +1,220 @@ <template> - <view style="height: 100% ;"> - <view class="flex flex-center" style="margin: 20rpx 0;"> - <luanqing-search class="search_bar" @onSearch="onSearch" :buttonText="buttonText" - :isSearchTrue="isSearchTrue" :placehold="placehold"></luanqing-search> - <view class="advancedSea" v-if="isAvancedTrue" @click="isAvancedClick" - style="color:#244A7B ;font-size: .12rem;margin-left: .31rem;cursor: pointer;">楂樼骇鎼滅储 锕�</view> - </view> - <!-- 楂樼骇鎼滅储 --> - <view class="advancedSeaTrue" v-if="isAdvancedSearch" style="padding: 0 1.24rem; margin-bottom: .18rem;"> - <view style="background-color: #fff;padding: .29rem;" class=""> - <h3>楂樼骇鎼滅储</h3> - <MyForm @submit="onSubmit" :from="from" /> - </view> - </view> - </view> + <view style="height: 100%"> + <view class="flex flex-center" style="margin: 20rpx 0"> + <luanqing-search + class="search_bar" + @onSearch="onSearch" + :buttonText="buttonText" + :isSearchTrue="isSearchTrue" + :placehold="placehold" + :keyword="keyword" + ></luanqing-search> + <view + class="advancedSea" + v-if="isAvancedTrue" + @click="isAvancedClick" + style=" + color: #244a7b; + font-size: 0.12rem; + margin-left: 0.31rem; + cursor: pointer; + " + >楂樼骇鎼滅储 锕�</view + > + </view> + <!-- 楂樼骇鎼滅储 --> + <view + class="advancedSeaTrue" + v-if="isAdvancedSearch" + style="padding: 0 1.24rem; margin-bottom: 0.18rem" + > + <view style="background-color: #fff; padding: 0.29rem" class=""> + <h3>楂樼骇鎼滅储</h3> + <MyForm @submit="onSubmit" :from="from" /> + </view> + </view> + </view> </template> <script> - import MyForm from '@/components/form/form.vue' - export default { - props: { - isAvancedTrue: { - type: Boolean, - default () { - return true - } - }, - isSearchTrue: { - type: Boolean, - default () { - return true - } - }, - buttonText: { - type: String, - default () { - return '鎼滅储' - } - }, - placehold: { - type: String - }, - from: { - type: Object, - default () { - return { - from: [{ - type: 'input', - label: '濮撳悕', - name: 'name', - value: '' - }, - { - type: 'select', - label: '鎬у埆', - value: '', - name: 'sex', - options: [{ - label: '鐢�', - value: '鐢�' - }, - { - label: '濂�', - value: '濂�' - } - ] - }, - { - type: 'input', - label: '鑱旂郴', - name: 'phone', - value: '' - }, - { - type: 'input', - label: '璇佷欢', - name: 'idNumber', - value: '' - }, - { - type: 'select', - label: '鐘舵��', - name: 'state', - value: '', - options: [{ - label: '鏈敵璇�', - value: '鏈敵璇�' - }, - { - label: '宸茬敵璇�', - value: '宸茬敵璇�' - }, - { - label: '宸插垹闄�', - value: '宸插垹闄�' - } - ] - } - ] - } - } - } - }, - components: { - MyForm - }, - name: "advancedSearch", - data() { - return { - // 楂樼骇鎼滅储鏄剧ず - isAdvancedSearch: false, - // 楂樼骇鎼滅储 - +import MyForm from "@/components/form/form.vue"; +export default { + props: { + isAvancedTrue: { + type: Boolean, + default() { + return true; + } + }, + isSearchTrue: { + type: Boolean, + default() { + return true; + } + }, + buttonText: { + type: String, + default() { + return "鎼滅储"; + } + }, + placehold: { + type: String + }, + keyword: { + type: String + }, + from: { + type: Object, + default() { + return { + from: [ + { + type: "input", + label: "濮撳悕", + name: "name", + value: "" + }, + { + type: "select", + label: "鎬у埆", + value: "", + name: "sex", + options: [ + { + label: "鐢�", + value: "鐢�" + }, + { + label: "濂�", + value: "濂�" + } + ] + }, + { + type: "input", + label: "鑱旂郴", + name: "phone", + value: "" + }, + { + type: "input", + label: "璇佷欢", + name: "idNumber", + value: "" + }, + { + type: "select", + label: "鐘舵��", + name: "state", + value: "", + options: [ + { + label: "鏈敵璇�", + value: "鏈敵璇�" + }, + { + label: "宸茬敵璇�", + value: "宸茬敵璇�" + }, + { + label: "宸插垹闄�", + value: "宸插垹闄�" + } + ] + } + ] + }; + } + } + }, + components: { + MyForm + }, + name: "advancedSearch", + data() { + return { + // 楂樼骇鎼滅储鏄剧ず + isAdvancedSearch: false + // 楂樼骇鎼滅储 + }; + }, + methods: { + isAvancedClick() { + this.isAdvancedSearch = !this.isAdvancedSearch; + // this.$nextTick(() => { - }; - }, - methods: { - 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'; - // } - // }) - }, - onSearch(val) { - this.$emit('onSearch', val) - // console.log(val); - }, - onSubmit(val) { - this.$emit('onSubmit', val) - // console.log(val); - }, - } - } + // 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'; + // } + // }) + }, + onSearch(val) { + this.$emit("onSearch", val); + }, + onSubmit(val) { + this.$emit("onSubmit", val); + // console.log(val); + } + } +}; </script> <style> - .advancedSeaTrue, - .zhushuju { - padding: 0 1.24rem !important; - } +.advancedSeaTrue, +.zhushuju { + padding: 0 1.24rem !important; +} - .advancedSeaTrue1 { - padding: .08rem .19rem !important; - font-size: .14rem !important; - } +.advancedSeaTrue1 { + padding: 0.08rem 0.19rem !important; + font-size: 0.14rem !important; +} - /* Form缁勪欢閲岄潰鐨勬牱寮� */ - ::v-deep .el-row { - display: flex; - flex-wrap: wrap; - margin-top: .1rem !important; - } +/* 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: .18rem !important; - } +::v-deep .el-form-item { + display: flex !important; + flex-wrap: wrap !important; + margin-bottom: 0.18rem !important; +} - ::v-deep .el-form-item__label { - font-size: .14rem !important; - height: .3rem !important; - display: flex !important; - align-items: center !important; - } +::v-deep .el-form-item__label { + font-size: 0.14rem !important; + height: 0.3rem !important; + display: flex !important; + align-items: center !important; +} - ::v-deep .el-input__inner { - font-size: .14rem !important; - height: .3rem !important; - } +::v-deep .el-input__inner { + font-size: 0.14rem !important; + height: 0.3rem !important; +} - ::v-deep .Formbtn { - width: 100% !important; - display: flex; - justify-content: center; - align-items: center; +::v-deep .Formbtn { + width: 100% !important; + display: flex; + justify-content: center; + align-items: center; - .el-button { - width: .7rem !important; - height: .3rem !important; - font-size: .12rem; + .el-button { + width: 0.7rem !important; + height: 0.3rem !important; + font-size: 0.12rem; + } +} - } - } - - .search_bar { - width: 5rem; - height: .36rem; - } -</style> \ No newline at end of file +.search_bar { + width: 5rem; + height: 0.36rem; +} +</style> diff --git a/src/components/headNav/headNav.vue b/src/components/headNav/headNav.vue index 65c390f..7dd5039 100644 --- a/src/components/headNav/headNav.vue +++ b/src/components/headNav/headNav.vue @@ -1,6 +1,6 @@ <template> <view class="headNav"> - <view class="NavTop flex" :style="{ backgroundImage: 'url(' + bg + ')' }"> + <view class="NavTop flex" :style="{ backgroundImage: 'url(' + bg + ')' }" > <view class="santiaogang" style="width: 0.34rem; height: 0.34rem; margin-right: 3rem;cursor: pointer;" @@ -163,7 +163,7 @@ bg1: { type: String, default() { - return "/static/image/line.png"; + return "@/static/image/line.png"; } }, idIndex: { @@ -284,7 +284,7 @@ }); } else if (index === "1") { uni.navigateTo({ - url: "/pages/characterRelation/characterRelation?id=" + 1 + url: "/pages/character/index?id=" + 1 }); } else if (index === "2") { uni.navigateTo({ @@ -377,8 +377,7 @@ } .NavTop { - /* background: url(@/static/image/topBg.png); */ - + /* background-image: url("../../static/image/topBg.png"); */ background-size: 100% 100%; padding: 0.16rem 0.24rem; color: #fff !important; diff --git a/src/pages.json b/src/pages.json index b113c29..7df4635 100644 --- a/src/pages.json +++ b/src/pages.json @@ -2,11 +2,28 @@ "pages": [{ "path": "pages/index/index", "style": { - // "navigationBarTitleText": "uni-app", + // "navigationBarTitleText": "涓浗鍖诲浜虹墿鏁版嵁搴�", "navigationStyle": "custom" } }, { "path": "pages/Login/Login", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + // 浜虹墿鏁版嵁搴� + { + "path": "pages/character/index", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/character/detail", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, @@ -53,14 +70,7 @@ "navigationStyle": "custom" } }, - { - "path": "pages/repository/repository", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, + { "path": "pages/inherit/index", "style": { @@ -85,14 +95,7 @@ "navigationStyle": "custom" } }, - { - "path": "pages/characterRelation/characterRelation", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, + { "path": "pages/characterMap/characterMap", "style": { @@ -165,7 +168,7 @@ ], "globalStyle": { "navigationBarTextStyle": "black", - "navigationBarTitleText": "uni-app", + "navigationBarTitleText": "涓浗鍖诲浜虹墿鏁版嵁搴�", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" } diff --git a/src/pages/Login/Login.vue b/src/pages/Login/Login.vue index 51a8490..721fba7 100644 --- a/src/pages/Login/Login.vue +++ b/src/pages/Login/Login.vue @@ -222,12 +222,12 @@ // uni.setStorageSync('globalData', { id: 123, name: 'example' }); if (item.id == 1) { uni.navigateTo({ - url: '/pages/repository/repository?id=' + item.id + url: '/pages/character/detail?id=' + item.id }) } else if (item.id == 2) { console.log(item.name); // uni.navigateTo({ - // url:'/pages/repository/repository?id='+item.id + // url:'/pages/character/detail?id='+item.id // }) } else if (item.id == 3) { uni.navigateTo({ diff --git a/src/pages/TcmSystem/TcmSystem.vue b/src/pages/TcmSystem/TcmSystem.vue index 266ad30..e8cdc92 100644 --- a/src/pages/TcmSystem/TcmSystem.vue +++ b/src/pages/TcmSystem/TcmSystem.vue @@ -236,7 +236,7 @@ // 鏈烘瀯鍜岃亴瀹樼殑绫诲瀷 鍙栧�硷細OFFICIAL->鑱屽畼 INSTITUTION->鏈烘瀯 ALL->鑱屽畼銆佹満鏋� classifyType: 'ALL', // 鏈烘瀯鍜岃亴瀹樼殑id - classifyId: 0, + classifyId: "", // 鑱屽畼缁熻 officials: { title: '鑱屽畼缁熻', @@ -357,8 +357,8 @@ // 鍙充晶鐨刲ist鏁版嵁 async getMList(obj) { let Obj = { + medicalSearchType: "ALL", "type": this.classifyType, //鏌ヨ绫诲瀷 鍙栧�硷細OFFICIAL->鑱屽畼 INSTITUTION->鏈烘瀯 ALL->鑱屽畼銆佹満鏋� - "bookId": this.source.index, // 鐐瑰嚮鏉ユ簮鏌ヨ鏁版嵁鏃讹紝甯︿笂姝ゅ弬鏁� "name": this.SearchValue, //鎼滅储妗嗘绱� "dynastyId": this.classifyId, //鐐瑰嚮鏈濅唬鏌ヨ鏁版嵁鏃讹紝甯︿笂姝ゅ弬鏁� "sort": this.rankVal, //鎺掑簭鏂瑰紡 鍙栧�硷細CREATE鍒涘缓鏃堕棿锛孨AME鍚嶇О diff --git a/src/pages/character/detail.vue b/src/pages/character/detail.vue new file mode 100644 index 0000000..3fa9ea9 --- /dev/null +++ b/src/pages/character/detail.vue @@ -0,0 +1,1100 @@ +<template> + <view class="relative"> + <headNav :idIndex="1" text="涓尰浜虹墿鏁版嵁搴�" /> + <view class="Midde flex"> + <el-button class="MiddeBack flex flex-center" @click="goBack" + >杩斿洖</el-button + > + <view style="width: 70%" class="flex flex-center flex-column"> + <view style="font-weight: bold; font-size: 0.2rem">鏉庢椂鐝�</view> + <ul class="flex" style="line-height: 1.2; margin: 0.15rem 0"> + <li + v-for="item in 4" + style=" + background-color: #fff; + padding: 0 0.08rem; + border: 0.01rem solid #000; + border-radius: 0.1rem; + font-size: 0.12rem; + text-align: center; + margin-right: 0.15rem; + " + > + VSDS + </li> + </ul> + <view + class="fz font-family" + style=" + font-size: 0.13rem; + font-weight: normal; + line-height: 0.2rem; + letter-spacing: 0.03rem; + " + > + 鏉庢椂鐝�(1518骞�-1593骞�)锛屽瓧: + 涓滅挧锛屾椂浜鸿皳涔�:鏉庝笢鐠с�傚彿婵掓箹锛屾櫄骞磋嚜鍙锋繏婀栧北浜猴紝婀栧寳钖窞(浠婃箹鍖楃渷榛勫唸甯傝柂鏄ュ幙钖窞闀�)浜猴紝姹夋棌锛岀敓浜庢槑姝﹀畻姝e痉鍗佷笁骞�(鍏厓1518骞�)锛屽崚浜庣瀹椾竾鍘嗕簩鍗佷簩骞�(鍏厓1593骞�)銆傛槸涓浗鏄庝唬涓庝竾瀵嗘枊榻愬悕鐨勫尰瀛﹀銆佽嵂鐗╁瀹躲�佸崥鐗╁瀹躲�佽憲杩板銆傛潕鏃剁弽瀵归亾瀹跺尰瀛︾殑缁ф壙鏄鏂归潰鐨勶紝鏇惧弬鑰冨巻浠f湁鍏冲尰鑽強鍏跺鏈功绫嶅叓鐧句綑绉嶏紝缁撳悎鑷韩缁忛獙鍜岃皟鏌ョ爺绌讹紝鍘嗘椂27骞寸紪鎴愩�婃湰鑽夌翰鐩�嬩竴涔︼紝鏄垜鍥藉彜浠h嵂鐗╁鐨勬�荤粨鎬у法钁楋紝鍦ㄥ浗鍐呭鍧囨湁寰堥珮鐨勮瘎浠凤紝宸叉湁鍑犵鏂囧瓧鐨勮瘧鏈垨鑺傝瘧鏈紝鍏惰憲鏈夈�婃繏婀栬剦瀛︺�� + </view> + <view class="flex" style="width: 100%; margin: 0.25rem 0 0.15rem 0"> + <view> + <!-- <el-button style="padding: 10rpx;" size="mini" icon="el-icon-folder-add">鏀惰棌</el-button> --> + <el-button style="padding: 0.05rem 0.085rem" class="yinyong flex"> + <img src="@/static/image/yinyong.png" alt="" />寮曠敤</el-button + > + </view> + <view + style="font-size: 0.12rem; color: #244a7b; cursor: pointer" + @click="ProfileClick" + >闃呰鏇村></view + > + </view> + </view> + <view style="width: 5%"></view> + </view> + <el-row style="padding: 0 1.2rem 0; padding-top: 0.24rem"> + <!-- 宸︿晶 --> + <el-col + :span="5" + class="BoxLeft" + style="padding-right: 0.2rem; width: 2.8rem" + > + <div class="grid-content bg-purple-dark flex flex-column"> + <el-card class="box-card" style="width: 100%; height: 2.06rem"> + <div + class="clearfix flex" + style=" + font-weight: 900; + font-size: 0.14rem; + padding-bottom: 0.1rem; + " + > + <span + style=" + margin-left: 0.12rem; + font-size: 0.14rem; + font-weight: 900; + " + >鍏崇郴鍥捐氨</span + > + <!-- <el-button icon="el-icon-rank" style="float: right; padding: 3px 0;" type="text"></el-button> --> + <img + src="@/static/image/fangda.png" + @click="fangdaClick(1)" + style="width: 0.18rem; height: 0.18rem" + alt="" + /> + </div> + <view id="relation" style="height: 1.51rem; width: 100%"></view> + </el-card> + <el-card + class="box-card" + style="width: 100%; height: 2.06rem; margin: 0.26rem 0" + > + <div + class="clearfix flex" + style=" + font-weight: 900; + font-size: 0.14rem; + padding-bottom: 0.1rem; + " + > + <span>鏃剁┖鍦板浘</span> + <!-- <el-button icon="el-icon-rank" style="float: right; padding: 3px 0" type="text"></el-button> --> + <img + src="@/static/image/fangda.png" + @click="fangdaClick(2)" + style="width: 0.18rem; height: 0.18rem" + alt="" + /> + </div> + <view + id="spaceTime" + style="height: 1.51rem; width: 100%; position: relative" + ></view> + </el-card> + <el-card style="width: 100%; height: 2.06rem"> + <div + class="clearfix" + style=" + font-weight: 900; + font-size: 0.14rem; + padding-bottom: 0.1rem; + " + > + <span>鏉ユ簮</span> + </div> + <ul + class="font-family" + style="height: 300rpx; font-size: 0.12rem; line-height: 0.3rem" + > + <li>1.銆婃槑鍙猜峰嵎浜岀櫨涔濆崄涔澛峰垪浣滃搧. p52</li> + <li>2.銆婅繘(鏈崏绾茬洰)鐤忋�� p52</li> + </ul> + </el-card> + </div> + </el-col> + <!-- 鍙充晶 --> + <el-col :span="18" class="BoxRight"> + <div class="grid-content bg-purple-dark" style="width: 100%"> + <el-card class="box-card" style="padding: 0"> + <div + class="clearfix" + style=" + font-weight: 900; + font-size: 0.14rem; + padding-bottom: 0.1rem; + " + > + <span>鍩虹淇℃伅</span> + </div> + <!-- 鍩虹淇℃伅 --> + <cc-defineTable :tableData="tableArr"></cc-defineTable> + </el-card> + <el-card + class="box-card" + style="min-height: 1.91rem; margin: 0.2rem 0" + > + <el-tabs ref="tabs" v-model="activeName" @tab-click="handleClick"> + <el-tab-pane label="浠h〃钁椾綔" data-id="1" name="representative"> + <Table1 :data="tableData" :columns="tableColumns" /> + </el-tab-pane> + <el-tab-pane label="浜插睘鍏崇郴" data-id="2" name="family "> + 浜插睘鍏崇郴 + </el-tab-pane> + <el-tab-pane label="甯堟壙鍏崇郴" data-id="3" name="mentoring " + >甯堟壙鍏崇郴</el-tab-pane + > + <el-tab-pane label="绀句細鍏崇郴" data-id="4" name="society" + >绀句細鍏崇郴</el-tab-pane + > + <el-tab-pane label="娲诲姩骞磋氨" data-id="5" name="activity" + >娲诲姩骞磋氨</el-tab-pane + > + </el-tabs> + </el-card> + <el-card style="margin-bottom: 0.2rem"> + <div + class="clearfix" + style=" + font-weight: 900; + font-size: 0.14rem; + padding-bottom: 0.1rem; + " + > + <span>鐩稿叧闄勮〃/鍥惧儚</span> + </div> + <view class="flex"> + <el-image + v-for="item in 4" + :key="item" + style="width: 2.05rem; height: 1.4rem" + src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" + fit="fill" + ></el-image> + </view> + </el-card> + <el-card class="box-card"> + <div + class="clearfix" + style=" + font-weight: 900; + font-size: 0.14rem; + padding-bottom: 0.1rem; + " + > + <span>鐩稿叧闄勮〃/鍥惧儚</span> + </div> + <ul class="font-family" style="font-size: 0.13rem; line-height: 2"> + <li> + [1|鍒樼倻,璋㈣搲,寮犵,绛�.鍚戜汉鏂囩爺绌剁殑鍥藉鏁版嵁鍩虹璁炬柦寤鸿[J|.涓浗鍥句功棣嗗鎶�,2016,42(5):29-39. + </li> + <li> + [2|鍛ㄦ櫒.鍥介檯鏁板瓧浜烘枃鐮旂┒鐗瑰緛涓庣煡璇嗙粨鏋剕J鍥句功棣嗚鍧�2017.37(4):1-8. + </li> + <li> + [3]鍌呭痉鍗�,浜庣繝鑹�,鏉庢槬鍗�,鍏充簬鍒涘缓鈥�20 + 涓栫邯涓浗浜虹墿浼犺璧勬枡鍏ㄦ枃鏁版嵁搴撴不鐨勬瀯鎯砙宸�,涓浗鑰呭紩,2009,714):24-26. + </li> + <li> + [4|浜庣繝鑹�,鍌呭痉鍗�,鏉庢槬鍗�,鍏充簬鈥�20涓栫邯涓浗浜虹墿浼犺璧勬枡鍏ㄦ枃鏁版嵁搴撴不鐨勮繘灞曚笌鍥版儜[J1.涓浗甯稿紩,2012.10111:20-22 + </li> + <li> + [5]璐炬銆傘�婃箹鍗楄繎浠d汉鐗╂暟鎹巼銆嬭祫婧愭敹褰曡寖鍥寸爺绌秥J娌冲崡鍥句功棣嗗鍒�,2015,35(7):126.127.140. + </li> + </ul> + </el-card> + </div> + </el-col> + </el-row> + + <!-- 杩斿洖椤堕儴 --> + <el-col style="position: absolute; bottom: 1rem; left: 1.2rem"> + <el-button + style="width: 0.5rem; height: 0.5rem; font-size: 0.3rem" + icon="el-icon-top" + circle + @click="scrollToTop" + ></el-button> + </el-col> + <!-- 涓汉灏忎紶 --> + <el-dialog :visible.sync="isProfile" :modal-append-to-body="false"> + <view class="ProfileNav flex flex-center"> 涓汉灏忎紶 </view> + <view style="padding: 0.44rem 0.3rem; min-height: 7.32rem"> + <view + style=" + margin-bottom: 0.2rem; + background-color: #f0f0f0; + padding: 0.18rem 0.1rem 0.1rem 0.27rem; + font-size: 0.12rem; + line-height: 0.24rem; + font-weight: 400; + " + > + <view style="color: #2c2c2c"> + 钑欏睍涓佷笐鍚岄噷鏃ュ博棰濆簭鍏堣�冩湀姹犵縼钁椼�婂洓褰吀鏄庛�嬪叓鍗凤紝鐨嗙簿鎸囧ゥ瀹わ紝鑼傜妧鏈兘鐤�狅紝鐝嶅洜鎾补鎯宠彍锛屽兊鎾版鍞愶紝浠ヤ究鏅虹潧锛屾湇鎸囧崡銆備笘涔嬮浄鐥呴洦瀹讹紝鍜镐互鏈嶇剦棣栧姟锛屼笉鐭ユ淳涔冨洓鑳戒箣鏈紝璋撲箣宸ц�呴洦銆備笂澹鑸嶅叾鍏紝闈炲洓涓嶅彲銆� + </view> + <view class="flex"> + <view></view> + <view style="font-weight: 700; color: #2c2c2c" + >鈥斺�斻�婂鍏湇鑰冦�婸 3</view + > + </view> + </view> + </view> + </el-dialog> + </view> +</template> + +<script> +import * as echarts from "echarts"; +import "echarts/extension/bmap/bmap"; +import { loadBMap } from "@/static/map.js"; +import Table1 from "@/components/table1/table1.vue"; +import { + getPersonInfo, + getSource, + getPersonImages, + getPersonBiog, + getPersonWritings, + getPersonRelationAtSchool, + getSpaceTime +} from "@/api/index.js"; +export default { + components: { + Table1 + }, + data() { + return { + // 鏍囬椤堕儴鏍忛渶瑕佺殑涓滆タ + detailId: "", + detailInfo: {}, + sourceDataList: [], + imageList: [], + biogData: "", + writingsList: [], + relationshipData: [], + // ------- + // 灏忎紶 + isProfile: false, + // 鍏崇郴鍥捐氨 + activeName: "representative", + // 鍩虹淇℃伅 + tableArr: [ + { + list: [ + { + name: "鍒悕", + value: "鏉庝笢鐠с�佽嵂鍦c�佹潕涓変竷" + }, + { + name: "瀛�", + value: "涓滅挧" + }, + { + name: "鍙�", + value: "棰戞箹灞变汉" + }, + { + name: "鎵�澶勬椂鏈�", + value: "鏄庢湞" + }, + { + name: "姘戞棌", + value: "166g" + } + ] + }, + { + list: [ + { + name: "绫嶈疮", + value: "榛勫窞搴滆柂宸� (浠婃箹鍖楃渷钖槬鍘�)" + }, + { + name: "鎬у埆", + value: "鐢�" + }, + { + name: "鑱屽畼", + value: "澶尰闄㈠垽" + }, + { + name: "娴佹淳", + value: "鍖荤粡瀛︽淳" + }, + { + name: "瀛︽湳鐗圭偣", + value: "鑰冨彜璇佷粖銆佺┓绌剁墿鐞�" + } + ] + } + ], + // 浠h〃钁椾綔 + tableColumns: [ + { + prop: "worksName", + label: "浣滃搧鍚�" + }, + { + prop: "works", + label: "浣滃搧" + }, + { + prop: "literature", + label: "鏂囩尞鍏崇郴" + }, + { + prop: "epoch", + label: "钁椾綔鏃朵唬" + }, + { + prop: "category", + label: "绫诲埆" + } + // { type: 'button', action: 'edit', label: 'Edit' } + ], + tableData: [ + { + worksName: "鏈崏绾茬洰", + works: "鏉庝簩鐗�", + literature: "浣滆��", + epoch: "鐜颁唬", + category: "涓尰瀛�", + id: 1 + }, + { + worksName: "鏈崏绾茬洰", + works: "鏉庝簩鐗�", + literature: "浣滆��", + epoch: "鐜颁唬", + category: "涓尰瀛�", + id: 1 + } + ] + }; + }, + onLoad(options) { + this.detailId = options.id; + }, + mounted() { + // 鑾峰彇浜虹墿璇︽儏 + // this.getData(); + // 鑾峰彇鏉ユ簮 + // this.getSourceData(); + // 鑾峰彇鐩稿叧鍥捐〃 + // this.getImages(); + // 鑾峰彇涓汉浜嬭抗 + // this.getBiog(); + // 鑾峰彇钁椾綔 + // this.getWritings(); + // 鑾峰彇浜虹墿鍏崇郴 + // this.getRelationship(); + // 鑾峰彇鏃剁┖鍦板浘 + // this.getMapInfo(); + // 鍏崇郴鍥捐氨 + this.relation(); + // 鏃剁┖鍦板浘 + loadBMap("5USVDAhhS4ssz44HLq3gNPZai7naXf4Q").then(() => { + this.spaceTime(); + }); + this.$nextTick(() => { + // 鑾峰彇绗竴涓�夐」鍗$殑 DOM 鍏冪礌 + const firstTab = this.$refs.tabs.$el.querySelector( + ".el-tabs__active-bar" + ); + firstTab.style.transform = "translateX(" + "-.2rem" + ")"; + }); + + // 鐩戝惉绐楀彛澶у皬鍙樺寲 + window.addEventListener("resize", this.relation); + }, + methods: { + getData() { + getPersonInfo({ + id: this.detailId + }).then((res) => { + console.log(res); + this.detailInfo = res; + }); + }, + getSourceData() { + getSource({ + personId: this.detailId + }).then((res) => { + console.log(res); + this.sourceDataList = res; + }); + }, + getImages() { + getPersonImages({ + personId: this.detailId + }).then((res) => { + console.log(res); + this.imageList = res; + }); + }, + getBiog() { + getPersonBiog({ + personId: this.detailId + }).then((res) => { + console.log(res); + this.biogData = res; + }); + }, + getWritings() { + getPersonWritings({ + personId: this.detailId + }).then((res) => { + console.log(res); + this.writingsList = res; + }); + }, + getRelationship() { + getPersonRelationAtSchool({ + personId: this.detailId + }).then((res) => { + console.log(res); + this.relationshipData = res; + }); + }, + getMapInfo() { + getSpaceTime({ + personId: this.detailId + }).then((res) => { + console.log(res); + }); + }, + + // 鏀惧ぇ鍦板浘璺宠浆 + fangdaClick(index) { + if (index == 1) { + uni.navigateTo({ + url: "/pages/character/index" + }); + } else if (index == 2) { + uni.navigateTo({ + url: "/pages/characterMap/characterMap" + }); + } + }, + // 灏忎紶 + ProfileClick() { + this.isProfile = !this.isProfile; + }, + // 杩斿洖涓婁竴椤� + goBack() { + this.$router.go(-1); + }, + // 杩斿洖椤堕儴 + scrollToTop() { + window.scrollTo({ + top: 0, + behavior: "smooth" // 浣跨敤骞虫粦婊氬姩 + }); + }, + handleClick(tab) { + let index = tab.$attrs["data-id"] - 1; + this.$nextTick(() => { + let firstTab = this.$refs.tabs.$el.querySelector( + ".el-tabs__active-bar" + ); + if (index == 0) { + firstTab.style.transform = "translateX(-" + 0.2 + "rem)"; + } else if (index == 1) { + firstTab.style.transform = "translateX(" + 0.85 * index + "rem)"; + } else if (index == 2) { + firstTab.style.transform = "translateX(" + 0.93 * index + "rem)"; + } else if (index == 3) { + firstTab.style.transform = "translateX(" + 0.95 * index + "rem)"; + } else if (index == 4) { + firstTab.style.transform = "translateX(" + 0.97 * index + "rem)"; + } else { + let firstTab = this.$refs.tabs.$el.querySelector( + ".el-tabs__active-bar" + ); + firstTab.style.transform = "translateX(" + "-.2" + "rem)"; + } + }); + }, + // 鍏崇郴鍥捐氨 + relation() { + var chartDom = document.getElementById("relation"); + var myChart = echarts.init(chartDom); + + // 鍋囪鎮ㄦ湁鑺傜偣鍚嶇О鍜屽畠浠箣闂寸殑鍏崇郴鏁版嵁 + var nodes = ["鏉庢椂鐝�", "鎴愬氨", "浼犳壙", "浜插弸", "钁椾綔"]; + var relationships = [ + { + source: "鏉庢椂鐝�", + target: "鎴愬氨" + }, + { + source: "鏉庢椂鐝�", + target: "浼犳壙" + }, + { + source: "鏉庢椂鐝�", + target: "浜插弸" + }, + { + source: "鏉庢椂鐝�", + target: "钁椾綔" + } + // 鍏朵粬鍏崇郴... + ]; + + // 鏍规嵁鍏崇郴鏁版嵁鐢熸垚杩炴帴绾� + var links = []; + relationships.forEach(function (relationship) { + var sourceIndex = nodes.indexOf(relationship.source); + var targetIndex = nodes.indexOf(relationship.target); + if (sourceIndex !== -1 && targetIndex !== -1) { + links.push({ + source: sourceIndex, + target: targetIndex + }); + } + }); + let FontSize = 12; // 瀛椾綋澶у皬 + let BorderWidth = 2; // 杈规澶у皬 + let SymbolSize = 80; // 灏哄璺濈 + // 涓嶅悓灏哄涓嬩慨鏀筫charts鐨勫瓧浣� + if (window.innerWidth > 2560 && window.innerWidth <= 3840) { + FontSize = 28; + BorderWidth = 5; + SymbolSize = 100; + } else if (window.innerWidth > 1920 && window.innerWidth <= 2560) { + FontSize = 28; + BorderWidth = 4; + SymbolSize = 90; + } else if (window.innerWidth >= 1366 && window.innerWidth <= 1920) { + FontSize = 18; + BorderWidth = 4; + SymbolSize = 70; + } + // 鏍规嵁nodes鍔ㄦ�佺敓鎴愯妭鐐规暟鎹� + var nodeData = nodes.map(function (node, index) { + return { + name: node, + x: Math.random() * 1000, // 璁剧疆闅忔満x鍧愭爣浣嶇疆 + y: Math.random() * 600, // 璁剧疆闅忔満y鍧愭爣浣嶇疆 + itemStyle: { + color: getColorByIndex(index), // 鍙互鏍规嵁绱㈠紩璁剧疆涓嶅悓鐨勯鑹� + borderWidth: BorderWidth, + borderColor: getColorByIndex(index + 1) + } + }; + }); + // 璁剧疆棰滆壊 + function getColorByIndex(index) { + var colors = ["#ecf4ff", "#dd9795", "#f1edbe", "#ecf4ff", "#c5dbd8"]; // 鍙互鏍规嵁瀹為檯鎯呭喌璁剧疆棰滆壊鏁扮粍 + return colors[index % colors.length]; + } + + var option; + option = { + tooltip: {}, + animationDurationUpdate: 1500, + animationEasingUpdate: "quinticInOut", + series: [ + { + type: "graph", + layout: "none", + symbolSize: SymbolSize, // 璋冩暣鑺傜偣澶у皬 + label: { + show: true, + color: "black", // 璁剧疆鑺傜偣鏂囧瓧棰滆壊涓洪粦鑹� + fontSize: FontSize // 璁剧疆鏂囧瓧澶у皬 + }, + edgeSymbol: ["circle"], + edgeSymbolSize: [4, 10], + edgeLabel: { + fontSize: 40 + }, + data: nodeData, + links: [ + { + source: 0, + target: 1, + symbolSize: [5, 20] + }, + { + source: "Node 2", + target: "Node 1" + }, + { + source: "Node 1", + target: "Node 3" + }, + { + source: "Node 2", + target: "Node 3" + }, + { + source: "Node 2", + target: "Node 4" + }, + { + source: "Node 1", + target: "Node 4" + } + ], + lineStyle: { + opacity: 0.9, + width: 2, + curveness: 0 + } + } + ] + }; + + // 灏嗙敓鎴愮殑杩炴帴绾挎坊鍔犲埌echarts鍥捐〃鐨刼ption涓� + option.series[0].links = links; + option && myChart.setOption(option); + }, + // 鏃剁┖鍦板浘 + spaceTime() { + var chartDom = document.getElementById("spaceTime"); + var myChart = echarts.init(chartDom); + var option; + + const data = [ + { + name: "娴烽棬", + value: 9 + }, + { + name: "閲戞槍", + value: 19 + }, + { + name: "娉夊窞", + value: 21 + }, + { + name: "琛㈠窞", + value: 177 + }, + { + name: "寤婂潑", + value: 193 + }, + { + name: "鑿忔辰", + value: 194 + }, + { + name: "鍚堣偉", + value: 229 + }, + { + name: "姝︽眽", + value: 273 + }, + { + name: "澶у簡", + value: 279 + } + ]; + const geoCoordMap = { + 娴烽棬: [121.15, 31.89], + 閯傚皵澶氭柉: [109.781327, 39.608266], + 鎷涜繙: [120.38, 37.35], + 骞抽《灞�: [113.29, 33.75], + 閭㈠彴: [114.48, 37.05], + 寰峰窞: [116.29, 37.45], + 娴庡畞: [116.59, 35.38], + 鑽嗗窞: [112.239741, 30.335165], + 瀹滄槍: [111.3, 30.7], + 涔変箤: [120.06, 29.32], + 涓芥按: [119.92, 28.45], + 娲涢槼: [112.44, 34.7], + 绉︾殗宀�: [119.57, 39.95], + 鏍床: [113.16, 27.83], + 鐭冲搴�: [114.48, 38.03], + 鑾辫姕: [117.67, 36.19], + 甯稿痉: [111.69, 29.05], + 淇濆畾: [115.48, 38.85], + 婀樻江: [112.91, 27.87], + 閲戝崕: [119.64, 29.12], + 宀抽槼: [113.09, 29.37], + 闀挎矙: [113, 28.21], + 琛㈠窞: [118.88, 28.97], + 寤婂潑: [116.7, 39.53], + 鑿忔辰: [115.480656, 35.23375], + 鍚堣偉: [117.27, 31.86], + 姝︽眽: [114.31, 30.52], + 澶у簡: [125.03, 46.58] + }; + const convertData = function (data) { + var res = []; + for (var i = 0; i < data.length; i++) { + var geoCoord = geoCoordMap[data[i].name]; + if (geoCoord) { + res.push({ + name: data[i].name, + value: geoCoord.concat(data[i].value) + }); + } + } + return res; + }; + option = { + tooltip: { + trigger: "item" + }, + bmap: { + center: [104.114129, 37.550339], + zoom: 1, + roam: true, + mapStyle: { + styleJson: [ + { + featureType: "water", + elementType: "all", + stylers: { + color: "#d1d1d1" + } + }, + { + featureType: "land", + elementType: "all", + stylers: { + color: "#f3f3f3" + } + }, + { + featureType: "manmade", + elementType: "all", + stylers: { + color: "#d1d1d1" + } + }, + { + featureType: "local", + elementType: "all", + stylers: { + color: "#d1d1d1" + } + }, + { + featureType: "arterial", + elementType: "labels", + stylers: { + visibility: "off" + } + }, + { + featureType: "boundary", + elementType: "all", + stylers: { + color: "#fefefe" + } + }, + { + featureType: "building", + elementType: "all", + stylers: { + color: "#d1d1d1" + } + }, + { + featureType: "label", + elementType: "labels.text.fill", + stylers: { + color: "#999999" + } + } + ] + } + }, + series: [ + { + name: "pm2.5", + type: "scatter", + coordinateSystem: "bmap", + data: convertData(data), + symbolSize: function (val) { + return val[2] / 10; + }, + encode: { + value: 2 + }, + credits: { + enabled: false + }, + label: { + formatter: "{b}", + position: "right", + show: false + }, + emphasis: { + label: { + show: true + } + } + }, + { + name: "Top 5", + type: "effectScatter", + coordinateSystem: "bmap", + data: convertData( + data + .sort(function (a, b) { + return b.value - a.value; + }) + .slice(0, 6) + ), + symbolSize: function (val) { + return val[2] / 10; + }, + encode: { + value: 2 + }, + showEffectOn: "render", + rippleEffect: { + brushType: "stroke" + }, + label: { + formatter: "{b}", + position: "right", + show: true + }, + itemStyle: { + shadowBlur: 10, + shadowColor: "#333" + }, + emphasis: { + scale: true + }, + zlevel: 1 + } + ] + }; + + option && myChart.setOption(option); + } + } +}; +</script> + +<style> +/* Table1琛ㄦ牸閲岄潰鐨勬暟鎹� */ +::v-deep .is-leaf { + .cell { + font-size: 0.14rem !important; + height: 0.4rem !important; + line-height: 0.4rem !important; + } +} + +::v-deep .el-table__body { + .cell { + font-size: 0.14rem !important; + height: 0.4rem !important; + line-height: 0.4rem !important; + } +} + +/* --------------- */ +@media screen and (min-width: 2560px) and (max-width: 3840px) { +} + +.BoxLeft ::v-deep.el-card__body { + padding: 0.1rem 0.11rem !important; +} + +::v-deep .el-tabs__content { + line-height: 1; +} + +/* 涓汉灏忎紶 ------------------*/ +::v-deep .el-dialog__header { + display: none; +} + +::v-deep .el-dialog__body { + padding: 0; +} + +::v-deep .el-dialog__wrapper { + z-index: 999999999999999 !important; +} + +.ProfileNav { + width: 100%; + height: 0.7rem; + background: url(@/static/image/ProfileBg.png); + background-size: 100% 100%; + font-size: 0.24rem; + color: #2c2c2c; + font-weight: bold; +} + +/* ------------------- */ + +img { + width: 100%; + height: 100%; +} + +* { + box-sizing: border-box; +} + +.NavTop { + background-color: #0c274c; + padding: 15rpx 25rpx; + color: #fff !important; + + img { + width: 30rpx; + height: 30rpx; + vertical-align: middle; + } + + .NavTopr { + img { + margin-right: 10rpx; + } + } +} + +.mImage { + width: 100%; + height: 30rpx; + + img { + vertical-align: top; + } +} + +.Midde { + /* background-color: #dbeafd; */ + background-image: url(@/static/image/yongBg.png); + background-size: 100% 100%; + color: #000; + align-items: flex-start; + padding: 0.18rem 0.24rem; + + view { + color: #000; + } + + .MiddeBack { + width: 0.6rem; + height: 0.24rem; + font-size: 0.12rem; + padding: 0; + border: 1px solid #9e9e9e; + } +} + +.yinyong { + font-size: 0.12rem; + + img { + width: 0.12rem; + height: 0.1rem; + vertical-align: top; + margin-right: 0.03rem; + } +} + +.el-dialog__wrapper { + background: rgba(0, 0, 0, 0.3); +} + +.fz { + /* line-height: 1.3; + height: 100rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 4; + -webkit-box-orient: vertical; */ + color: #2c2c2c; +} + +::v-deep .el-card__body { + padding: 0.1rem !important; +} + +/* echart鍦板浘姘村嵃 */ +::v-deep .BMap_cpyCtrl { + display: none; +} + +::v-deep .anchorBL { + display: none; +} + +::v-deep .el-tabs__nav-wrap::after { + background-color: transparent; +} + +::v-deep .el-tabs__nav { + margin-bottom: 0.1rem !important; +} + +::v-deep .el-tabs__nav-scroll { + display: flex; + justify-content: center; +} + +::v-deep .el-tabs__item { + width: 1rem; + font-size: 0.14rem; + line-height: 0.4rem; + height: 0.4rem; +} + +::v-deep .el-tabs__header { + margin: 0 0 10rpx; +} + +::v-deep .el-tabs__active-bar { + /* 璁剧疆婊氬姩鏉″搴� */ + width: 1rem !important; + height: 0.03rem !important; + background-color: #597aa5; + transform: translateX(-20px); + /* margin-top: .09rem; */ +} + +::v-deep .el-tabs__active-bar { + top: 0.37rem !important; +} + +::v-deep .el-table::before { + background-color: #fff !important; +} + +.BoxRight ::v-deep.el-card__body { + padding: 0.2rem 0.14rem !important; +} + +.BoxRight .box-card { + margin-bottom: 0.2rem !important; +} +</style> diff --git a/src/pages/character/index.vue b/src/pages/character/index.vue new file mode 100644 index 0000000..0dca248 --- /dev/null +++ b/src/pages/character/index.vue @@ -0,0 +1,585 @@ +<template> + <view> + <headNav idIndex="1" text="涓尰浜虹墿鏁版嵁搴�" /> + <!-- 楂樼骇鎼滅储 --> + <view style="margin: 0.35rem 0 0.16rem 0"> + <advancedSearch + @onSearch="onSearch" + @onSubmit="onSubmit" + :from="From" + placehold="璇疯緭鍏ュ叧閿瓧" + :keyword="searchKey" + /> + </view> + <!-- 鐑棬鎼滅储 --> + <view class="flex flex-center hotSearch"> + 鐑棬鎼滅储锛� + <ul class="flex" style="margin-right: 10rpx"> + <li + @click="onSearch({ text: item })" + class="cursor" + v-for="item in hotKeyList" + :key="item" + > + {{ item }} + </li> + </ul> + </view> + <view class="" style="margin-left: 0.2rem">涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�</view> + <!-- 鍏崇郴琛ㄥ湴鍥� --> + <view + id="relation" + style="margin-top: 0.2rem; height: 70vh; width: 100%" + ></view> + <!-- 鏈濅唬 --> + <view + class="flex flex-center" + style="width: 100%; position: fixed; bottom: 0.33rem; left: 0" + > + <ul class="flex"> + <li + @click="dynastyBottomClick(item)" + v-for="(item, index) in dynasty" + :key="item.id" + > + <view + class="flex flex-center" + style="height: 0.35rem; background-color: #fff; color: #244a7b" + > + {{ item.coord }} + </view> + <view + class="flex flex-center font-family" + style=" + padding: 0.05rem 0.19rem; + height: 0.3rem; + line-height: 0.3rem; + color: #fff; + font-size: 0.14rem; + margin-top: 0.03rem; + margin-right: 0.03rem; + background-color: #597aa5; + " + :style="{ + marginRight: index === dynasty.length - 1 ? '0' : '0.03rem', + background: dynastyColor == item.id ? '#244A7B' : '#597AA5' + }" + > + {{ item.name }} + </view> + </li> + </ul> + </view> + </view> +</template> + +<script> +import { + getPersonList, + getDataStatistics, + getHotSearch, + getFuzzySearch, + getAdvanceSearch, + getPDataStatistics +} from "@/api/index.js"; +import * as echarts from "echarts"; +export default { + data() { + return { + // echarts鏁版嵁 + nodes: [], + // echarts涓よ�呯殑鍏崇郴 + relationships: [], + // 楂樼骇鎼滅储 + From: { + from: [ + { + type: "input", + label: "濮撳悕", + name: "name", + value: "" + }, + { + type: "input", + label: "鍒悕", + name: "alias", + value: "" + }, + { + type: "input", + label: "绫嶈疮", + name: "location", + value: "" + }, + { + type: "select", + label: "鑱屼笟", + name: "sdId", + value: "", + options: [ + { + label: "鏈寚鏄�", + value: "UNKNOWN" + } + ] + }, + { + type: "input", + label: "瀹樿亴", + name: "office", + value: "" + }, + { + type: "select", + label: "鎬у埆", + value: "", + name: "genderTypeEO", + options: [ + { + label: "鏈寚鏄�", + value: "UNKNOWN" + }, + { + label: "鐢�", + value: "MALE" + }, + { + label: "濂�", + value: "WOMAN" + } + ] + }, + { + type: "input", + label: "鏃堕棿", + name: "period", + value: "" + }, + { + type: "input", + label: "鏈烘瀯", + name: "inst", + value: "" + }, + { + type: "number", + label: "椤电爜", + name: "page", + value: "" + }, + { + type: "number", + label: "椤靛ぇ灏�", + name: "pageSize", + value: "" + } + ] + }, + // 涓嬮潰鐨勬湞浠�1 + dynastyColor: 1, + // 鏈濅唬 + dynasty: [ + { + name: "澶忔湞", + coord: "2070BC", + id: 1 + }, + { + name: "鍟嗘湞", + id: 2, + coord: "1600BC" + }, + { + name: "瑗垮懆", + id: 3, + coord: "1600BC" + }, + { + name: "鏄ョ鎴樺浗", + id: 4, + coord: "770BC" + }, + { + name: "绉︽湞", + id: 5, + coord: "221BC" + }, + { + name: "姹夋湞", + id: 6, + coord: "202BC" + }, + { + name: "涓夊浗涓ゆ檵鍗楀寳鏈�", + id: 7, + coord: "184" + }, + { + name: "闅嬫湞", + id: 8, + coord: "581" + }, + { + name: "鍞愭湞", + id: 9, + coord: "618" + }, + { + name: "浜斾唬鍗佸浗", + id: 10, + coord: "907" + }, + { + name: "杈藉閲�", + id: 11, + coord: "907" + }, + { + name: "瀹嬫湞", + id: 12, + coord: "960" + }, + { + name: "鍏冩湞", + id: 13, + coord: "1271" + }, + + { + name: "鏄庢湞", + id: 14, + coord: "1368" + }, + { + name: "娓呮湞", + id: 15, + coord: "1636" + } + ], + // 鐑棬鎼滅储 + hotKeyList: [], + searchKey: "" + }; + }, + mounted() { + this.getData(); + this.echartsArr(); + this.hotSearch(); + // 鐩戝惉绐楀彛澶у皬鍙樺寲 + // window.addEventListener("resize", this.relation); + this.innt(); + }, + methods: { + getData() { + getPersonList({ + keywords: "妤�", //鎼滅储妗嗘绱� + name: "", //濮撳悕 + alias: "", //鍒悕 + nativePlace: "", //鏈哄叧 + tagId: null, //鑱屼笟id + official: "", //鑱屽畼 + genderType: null, //鎬у埆 + dynasty: null, //鏈濅唬鍚� + dynastyId: null, //鏈濅唬id + institution: "", //鏈烘瀯 + bookId: null, //鏉ユ簮id + page: 1, + pageSize: 100 + }).then((res) => { + console.log(res); + }); + }, + // 鍏崇郴鍥捐氨 + relation() { + var chartDom = document.getElementById("relation"); + var myChart = echarts.init(chartDom); + // 鍋囪鎮ㄦ湁鑺傜偣鍚嶇О鍜屽畠浠箣闂寸殑鍏崇郴鏁版嵁 + var nodes = this.nodes; + var relationships = this.relationships; + + let FontSize = 12; // 瀛椾綋澶у皬 + let BorderWidth = 2; // 杈规澶у皬 + let SymbolSize = 80; // 灏哄璺濈 + let Distance = 10; + // 涓嶅悓灏哄涓嬩慨鏀筫charts鐨勫瓧浣� + if (window.innerWidth > 2560 && window.innerWidth <= 3840) { + FontSize = 28; + BorderWidth = 5; + SymbolSize = 100; + Distance = 33; + } else if (window.innerWidth > 1920 && window.innerWidth <= 2560) { + FontSize = 28; + BorderWidth = 4; + SymbolSize = 90; + Distance = 22; + } else if (window.innerWidth >= 1366 && window.innerWidth <= 1920) { + FontSize = 18; + BorderWidth = 4; + SymbolSize = 70; + Distance = 22; + } + // 鏍规嵁鍏崇郴鏁版嵁鐢熸垚杩炴帴绾� + var links = []; + relationships.forEach((relationship, i) => { + var sourceIndex = nodes.findIndex( + (node) => node.name === relationship.source + ); + var targetIndex = nodes.findIndex( + (node) => node.name === relationship.target + ); + if (relationship.relation) { + if (sourceIndex !== -1 && targetIndex !== -1) { + links.push({ + source: sourceIndex, + target: targetIndex, + label: { + show: true, + formatter: function (params) { + // 浣跨敤鍑芥暟鍔ㄦ�佺敓鎴愭爣绛惧唴瀹� + // return relationships.find(rel => rel.source === nodes[params.data + // .source] && rel.target === nodes[params.data.target]) + // .relation; + return relationship.relation; + }, // 璁剧疆鍏崇郴鏍囩鍐呭涓�"Child-Parent" + color: "#2C2C2C", + fontSize: FontSize - 2, + backgroundColor: "rgba(255, 255, 255, 1)", + padding: [3, 8], + borderRadius: 30, + position: "middle", // 璁剧疆鏍囩鏂囨湰鍦ㄧ嚎鐨勪腑闂翠綅缃笂灞呬腑鏄剧ず + // bottom: -(FontSize+10), + z: 10, // 璁剧疆鏍囩鐨剒杞撮珮搴︼紝浣垮叾姣旇繛鎺ョ嚎鏇撮珮 + // offset: [0, 15] ,// 寰�涓嬬Щ鍔� 10 鍍忕礌 + distance: -(Distance + 1) // 灏嗘爣绛炬斁缃湪杩炴帴绾夸笂 + } + }); + } + } + }); + // 鏍规嵁nodes鍔ㄦ�佺敓鎴愯妭鐐规暟鎹� + var nodeData = nodes.map(function (node, index) { + return { + name: node.name, + id: node.id, + x: Math.random() * 2000, // 璁剧疆闅忔満x鍧愭爣浣嶇疆 + y: Math.random() * 600, // 璁剧疆闅忔満y鍧愭爣浣嶇疆 + itemStyle: { + color: getColorByIndex(), // 鍙互鏍规嵁绱㈠紩璁剧疆涓嶅悓鐨勯鑹� + borderWidth: BorderWidth, + borderColor: getColorByIndex() + } + }; + }); + // 璁剧疆棰滆壊 + function getColorByIndex() { + // 鐢熸垚闅忔満鐨� R銆丟銆丅 鍒嗛噺鍊硷紝闄愬埗鍦ㄦ洿楂樼殑鑼冨洿鍐� + var r = Math.floor(Math.random() * 106) + 150; // 150 鍒� 255 涔嬮棿鐨勯殢鏈烘暟 + var g = Math.floor(Math.random() * 106) + 150; // 150 鍒� 255 涔嬮棿鐨勯殢鏈烘暟 + var b = Math.floor(Math.random() * 106) + 150; // 150 鍒� 255 涔嬮棿鐨勯殢鏈烘暟 + // 灏� R銆丟銆丅 鍒嗛噺鍊艰浆鎹负鍗佸叚杩涘埗锛屽苟纭繚姣忎釜鍒嗛噺鍊奸兘鏄袱浣嶆暟 + var hexR = r.toString(16).padStart(2, "0"); // 浣跨敤 padStart 鏂规硶纭繚鐢熸垚鐨勫崄鍏繘鍒舵暟涓轰袱浣� + var hexG = g.toString(16).padStart(2, "0"); + var hexB = b.toString(16).padStart(2, "0"); + // 鎷兼帴鍗佸叚杩涘埗棰滆壊鍊� + var color = "#" + hexR + hexG + hexB; + return color; + } + console.log(links); + console.log(nodeData); + var option; + option = { + title: { + // text: '涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�', + // subtext: '', + left: "center", + top: FontSize + 10, + // textStyle: { + // fontSize: FontSize // 璁剧疆鏍囬鏂囧瓧澶у皬涓� 18px + // }, + subtextStyle: { + fontSize: FontSize, // 璁剧疆鍓爣棰樻枃瀛楀ぇ灏忎负 14px + color: "#2C2C2C" + } + }, + backgroundColor: { + type: "image", + image: "/static/image/characterRelationBg.png", + // repeat: 'repeat-x', // 鏄惁骞抽摵锛屽彲浠ユ槸 'repeat-x', 'repeat-y', 'no-repeat' + size: "100% 100%", // 鑳屾櫙鍥剧墖鐨勫昂瀵革紝鍙互鏄櫨鍒嗘瘮鎴栬�呭儚绱� + position: "center center" // 鑳屾櫙鍥剧墖鐨勪綅缃紝鍙互鏄� top, bottom, middle 鎴栬�呯櫨鍒嗘瘮 + }, + tooltip: {}, + animationDurationUpdate: 1500, + animationEasingUpdate: "quinticInOut", + series: [ + { + type: "graph", + layout: "none", + roam: true, + symbolSize: SymbolSize, // 璋冩暣鑺傜偣澶у皬 + label: { + show: true, + color: "black", // 璁剧疆鑺傜偣鏂囧瓧棰滆壊涓洪粦鑹� + fontSize: FontSize // 璁剧疆鏂囧瓧澶у皬 + }, + edgeSymbol: ["circle"], + edgeSymbolSize: [4, 10], + data: nodeData, + links: links, + lineStyle: { + opacity: 0.9, + width: 2, + curveness: 0.3 + } + } + ] + }; + // 灏嗙敓鎴愮殑杩炴帴绾挎坊鍔犲埌echarts鍥捐〃鐨刼ption涓� + option.series[0].links = links; + // 璁剧疆鐐瑰嚮浜嬩欢鐩戝惉 + myChart.on("click", (params) => { + // menuNav2 = !menuNav1 + if (params.componentType === "series") { + this.spaceTimeArr(params.data.id); + } + }); + option && myChart.setOption(option); + }, + // 鍩虹鎼滅储 + onSearch(val) { + this.searchKey = val.text; + getFuzzySearch({ keyword: val.text }).then((res) => { + if (res.list) { + this.nodes = []; + this.relationships = []; + res.list.forEach((item, index) => { + let exists1 = this.nodes.some( + (node) => node.id === item.identifier1 && node.name === item.name1 + ); + let exists2 = this.nodes.some( + (node) => node.id === item.identifier2 && node.name === item.name2 + ); + // 璇佹槑涓嶅瓨鍦� + if (exists1 !== true) { + this.nodes.push({ + name: item.name1, + id: item.identifier1 + }); + } + if (exists2 !== true) { + this.nodes.push({ + name: item.name2, + id: item.identifier2 + }); + } + let obj = { + source: item.name1, + target: item.name2, + relation: item.relationName || "" // 濡傛灉瀛樺湪 relationName 瀛楁鍒欎娇鐢紝鍚﹀垯涓虹┖瀛楃涓� + }; + this.relationships.push(obj); + }); + } + this.relation(); + }); + }, + // 楂樼骇鎼滅储 + onSubmit(val) { + getAdvanceSearch(val).then((res) => { + console.log(res, "鎺ュ彛璋冪敤鎴愬姛"); + }); + }, + // 鐐瑰嚮涓嬮潰鐨勬湞浠f寜閽� + dynastyBottomClick(item) { + this.dynastyColor = item.id; + this.onSearch({ + text: item.name + }); + }, + // 鍏崇郴鍥� 鐐瑰嚮閲岄潰鐨勫厓绱� + spaceTimeArr(id) { + // 鍏崇郴鍥剧殑鏁版嵁 + uni.navigateTo({ + url: "/pages/character/detail?id=" + id + }); + }, + // 鑾峰彇鏈濅唬echarts鐨勬暟鎹� + echartsArr() { + getDataStatistics().then((res) => { + res.object.dynastyStatistic.details.map((item, index) => { + // this.dynasty.id = item.dynastyId + // this.dynasty.name = item.dynastyName + // this.dynasty.coord = item.count + this.dynasty[index].id = item.dynastyId; + this.dynasty[index].name = item.dynastyName; + this.dynasty[index].coord = item.count; + }); + }); + }, + // 鐑棬鎼滅储 + hotSearch() { + getHotSearch().then((res) => { + const indexList = Object.keys(res.object); + indexList.sort((a, b) => parseInt(b) - parseInt(a)); + this.hotKeyList = indexList.map((item) => { + return res.object[item]; + }); + }); + }, + + // 楂樼骇鎼滅储閲岄潰鑱屼笟鐨勪笅鎷夎彍鍗� + innt() { + getPDataStatistics().then((res) => { + const professionIndex = this.From.from.findIndex( + (field) => field.label === "鑱屼笟" + ); + // 濡傛灉鎵惧埌浜嗚亴涓氬瓧娈� + if (professionIndex !== -1) { + // 灏� profession.list 杞崲涓� options 鏍煎紡 + const options = res.object.occupationStatistic.details.map( + (item) => ({ + label: item.tagName, + value: item.tagId.toString() // 灏� id 杞崲涓哄瓧绗︿覆锛岀‘淇濅笌 value 绫诲瀷涓�鑷� + }) + ); + // 鏇存柊鑱屼笟瀛楁鐨� options 灞炴�� + this.$set(this.From.from[professionIndex], "options", options); + } + }); + } + } +}; +</script> + +<style> +@media screen and (min-width: 2560px) and (max-width: 3840px) { +} + +@media screen and (min-width: 1366px) and (max-width: 1920px) { +} + +::v-deep .uni-input-placeholder { + line-height: 1; + font-size: 0.12rem; +} + +::v-deep .ffff { + border-radius: 0.5rem; +} + +::v-deep .widget_button { + border-radius: 0.5rem; + margin: 0.02rem; +} + +.hotSearch { + font-size: 0.12rem; + color: #2c2c2c; + + li { + color: #244a7b; + margin: 0 0.1rem; + color: #244a7b; + } +} +</style> diff --git a/src/pages/characterRelation/characterRelation.vue b/src/pages/characterRelation/characterRelation.vue deleted file mode 100644 index daf5abe..0000000 --- a/src/pages/characterRelation/characterRelation.vue +++ /dev/null @@ -1,594 +0,0 @@ -<template> - <view> - <headNav idIndex="1" text="涓尰浜虹墿鏁版嵁搴�" /> - <!-- 楂樼骇鎼滅储 --> - <view style="margin: .35rem 0 .16rem 0; "> - <advancedSearch @onSearch="onSearch" @onSubmit="onSubmit" :from="From" placehold="杈撳叆濮撳悕/鍒悕/鏈濅唬/浼犱富鑱屼笟鎼滅储" /> - </view> - <!-- 鐑棬鎼滅储 --> - <view class="flex flex-center hotSearch"> - 鐑棬鎼滅储锛� - <ul class="flex" style="margin-right: 10rpx;"> - <li @click="dynastyBottomClick(item)" class="cursor" v-for="item in hot" :key="item.id" style=""> - {{item.name}} - </li> - </ul> - </view> - <view class="" style="margin-left: .2rem;">涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�</view> - <!-- 鍏崇郴琛ㄥ湴鍥� --> - <view id="relation" style="margin-top: .2rem; height: 70vh;width: 100%;"></view> - <!-- 鏈濅唬 --> - <view class="flex flex-center" style="width: 100%; position: fixed;bottom: .33rem;left: 0;"> - <ul class="flex"> - <li @click="dynastyBottomClick(item)" v-for="(item,index) in dynasty" :key="item.id"> - <view class="flex flex-center" style="height: .35rem; background-color: #fff; color:#244A7B ;"> - {{item.coord}} - </view> - <view class="flex flex-center font-family" - style="padding: .05rem .19rem; height: .3rem;line-height: .3rem; color: #fff; font-size: .14rem; margin-top: .03rem;margin-right: .03rem;background-color: #597AA5;" - :style="{'marginRight': index === dynasty.length - 1 ? '0' : '0.03rem','background':dynastyColor==item.id?'#244A7B':'#597AA5'}"> - {{item.name}} - </view> - </li> - </ul> - </view> - </view> -</template> - -<script> - import { - getDataStatistics, - getHotSearch, - getFuzzySearch, - getAdvanceSearch, - getPDataStatistics - } from '@/api/index.js' - import * as echarts from 'echarts'; - export default { - data() { - return { - // echarts鏁版嵁 - nodes: [{ - name: '鏉庢椂鐝�', - id: 23 - }], - // echarts涓よ�呯殑鍏崇郴 - relationships: [{ - source: '鏉庢椂鐝�', - target: '鎴愬氨', - relation: '濂藉弸' - }, - { - source: '鏉庢椂鐝�', - target: '浼犳壙', - relation: '濂�1鍙�' - }, - { - source: '鏉庢椂鐝�', - target: '浜插弸', - relation: '濂�2鍙�' - }, - { - source: '鏉庢椂鐝�', - target: '钁椾綔', - relation: '濂�2鍙�' - }, - // 鍏朵粬鍏崇郴... - ], - // 楂樼骇鎼滅储 - From: { - from: [{ - type: 'input', - label: '濮撳悕', - name: 'name', - value: '' - }, { - type: 'input', - label: '鍒悕', - name: 'alias', - value: '' - }, { - type: 'input', - label: '绫嶈疮', - name: 'location', - value: '' - }, { - type: 'select', - label: '鑱屼笟', - name: 'sdId', - value: '', - options: [{ - label: '鏈寚鏄�', - value: 'UNKNOWN' - }, ] - }, { - type: 'input', - label: '瀹樿亴', - name: 'office', - value: '' - }, { - type: 'select', - label: '鎬у埆', - value: '', - name: 'genderTypeEO', - options: [{ - label: '鏈寚鏄�', - value: 'UNKNOWN' - }, { - label: '鐢�', - value: 'MALE' - }, - { - label: '濂�', - value: 'WOMAN' - } - ] - }, { - type: 'input', - label: '鏃堕棿', - name: 'period', - value: '' - }, { - type: 'input', - label: '鏈烘瀯', - name: 'inst', - value: '' - }, { - type: 'number', - label: '椤电爜', - name: 'page', - value: '' - }, { - type: 'number', - label: '椤靛ぇ灏�', - name: 'pageSize', - value: '' - }, ] - }, - // 涓嬮潰鐨勬湞浠�1 - dynastyColor: 1, - // 鏈濅唬 - dynasty: [{ - name: '澶忔湞', - coord: '2070BC', - id: 1 - }, - { - name: '鍟嗘湞', - id: 2, - coord: '1600BC', - }, - { - name: '瑗垮懆', - id: 3, - coord: '1600BC' - }, - { - name: '鏄ョ鎴樺浗', - id: 4, - coord: '770BC' - }, - { - name: '绉︽湞', - id: 5, - coord: '221BC' - }, - { - name: '姹夋湞', - id: 6, - coord: '202BC' - }, - { - name: '涓夊浗涓ゆ檵鍗楀寳鏈�', - id: 7, - coord: '184' - }, - { - name: '闅嬫湞', - id: 8, - coord: '581' - }, - { - name: '鍞愭湞', - id: 9, - coord: '618' - }, - { - name: '浜斾唬鍗佸浗', - id: 10, - coord: '907' - }, - { - name: '杈藉閲�', - id: 11, - coord: '907' - }, - { - name: '瀹嬫湞', - id: 12, - coord: '960' - }, - { - name: '鍏冩湞', - id: 13, - coord: '1271' - }, - - { - name: '鏄庢湞', - id: 14, - coord: '1368' - }, - { - name: '娓呮湞', - id: 15, - coord: '1636' - } - ], - // 鐑棬鎼滅储 - hot: [{ - id: 1, - name: '鏉庢椂鐝�', - bgColor: false - }, - { - id: 2, - name: '鏉庢椂鐝�2', - bgColor: false - }, - { - id: 3, - name: '鏉庢椂鐝�3', - bgColor: false - }, - ], - } - }, - - methods: { - // 鍏崇郴鍥捐氨 - relation() { - var chartDom = document.getElementById('relation'); - var myChart = echarts.init(chartDom); - // 鍋囪鎮ㄦ湁鑺傜偣鍚嶇О鍜屽畠浠箣闂寸殑鍏崇郴鏁版嵁 - var nodes = this.nodes; - var relationships = this.relationships - - let FontSize = 12; // 瀛椾綋澶у皬 - let BorderWidth = 2; // 杈规澶у皬 - let SymbolSize = 80; // 灏哄璺濈 - let Distance = 10 - // 涓嶅悓灏哄涓嬩慨鏀筫charts鐨勫瓧浣� - if (window.innerWidth > 2560 && window.innerWidth <= 3840) { - FontSize = 28 - BorderWidth = 5 - SymbolSize = 100 - Distance = 33 - } else if (window.innerWidth > 1920 && window.innerWidth <= 2560) { - FontSize = 28 - BorderWidth = 4 - SymbolSize = 90 - Distance = 22 - } else if (window.innerWidth >= 1366 && window.innerWidth <= 1920) { - FontSize = 18 - BorderWidth = 4 - SymbolSize = 70 - Distance = 22 - } - // 鏍规嵁鍏崇郴鏁版嵁鐢熸垚杩炴帴绾� - var links = []; - relationships.forEach((relationship, i) => { - // 闈� - var sourceIndex = nodes.findIndex((node) => node.name === relationship.source); - var targetIndex = nodes.findIndex((node) => node.name === relationship.target); - if (relationship.relation) { - if (sourceIndex !== -1 && targetIndex !== -1) { - console.log(relationship.source, relationship.target); - links.push({ - source: sourceIndex, - target: targetIndex, - label: { - show: true, - formatter: function(params) { // 浣跨敤鍑芥暟鍔ㄦ�佺敓鎴愭爣绛惧唴瀹� - // console.log(params, 'paramsparamsparamsparamsparams'); - // return relationships.find(rel => rel.source === nodes[params.data - // .source] && rel.target === nodes[params.data.target]) - // .relation; - return relationship.relation; - }, // 璁剧疆鍏崇郴鏍囩鍐呭涓�"Child-Parent" - color: '#2C2C2C', - fontSize: FontSize - 2, - backgroundColor: 'rgba(255, 255, 255, 1)', - padding: [3, 8], - borderRadius: 30, - position: 'middle', // 璁剧疆鏍囩鏂囨湰鍦ㄧ嚎鐨勪腑闂翠綅缃笂灞呬腑鏄剧ず - // bottom: -(FontSize+10), - z: 10, // 璁剧疆鏍囩鐨剒杞撮珮搴︼紝浣垮叾姣旇繛鎺ョ嚎鏇撮珮 - // offset: [0, 15] ,// 寰�涓嬬Щ鍔� 10 鍍忕礌 - distance: -(Distance + 1), // 灏嗘爣绛炬斁缃湪杩炴帴绾夸笂 - } - }); - } - } - }); - // 鏍规嵁nodes鍔ㄦ�佺敓鎴愯妭鐐规暟鎹� - var nodeData = nodes.map(function(node, index) { - return { - name: node.name, - id: node.id, - x: Math.random() * 2000, // 璁剧疆闅忔満x鍧愭爣浣嶇疆 - y: Math.random() * 600, // 璁剧疆闅忔満y鍧愭爣浣嶇疆 - itemStyle: { - color: getColorByIndex(), // 鍙互鏍规嵁绱㈠紩璁剧疆涓嶅悓鐨勯鑹� - borderWidth: BorderWidth, - borderColor: getColorByIndex() - } - }; - }); - // 璁剧疆棰滆壊 - function getColorByIndex() { - // 鐢熸垚闅忔満鐨� R銆丟銆丅 鍒嗛噺鍊硷紝闄愬埗鍦ㄦ洿楂樼殑鑼冨洿鍐� - var r = Math.floor(Math.random() * 106) + 150; // 150 鍒� 255 涔嬮棿鐨勯殢鏈烘暟 - var g = Math.floor(Math.random() * 106) + 150; // 150 鍒� 255 涔嬮棿鐨勯殢鏈烘暟 - var b = Math.floor(Math.random() * 106) + 150; // 150 鍒� 255 涔嬮棿鐨勯殢鏈烘暟 - // 灏� R銆丟銆丅 鍒嗛噺鍊艰浆鎹负鍗佸叚杩涘埗锛屽苟纭繚姣忎釜鍒嗛噺鍊奸兘鏄袱浣嶆暟 - var hexR = r.toString(16).padStart(2, '0'); // 浣跨敤 padStart 鏂规硶纭繚鐢熸垚鐨勫崄鍏繘鍒舵暟涓轰袱浣� - var hexG = g.toString(16).padStart(2, '0'); - var hexB = b.toString(16).padStart(2, '0'); - // 鎷兼帴鍗佸叚杩涘埗棰滆壊鍊� - var color = '#' + hexR + hexG + hexB; - return color; - } - var option; - option = { - title: { - // text: '涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�', - // subtext: '', - left: 'center', - top: FontSize + 10, - // textStyle: { - // fontSize: FontSize // 璁剧疆鏍囬鏂囧瓧澶у皬涓� 18px - // }, - subtextStyle: { - fontSize: FontSize, // 璁剧疆鍓爣棰樻枃瀛楀ぇ灏忎负 14px - color: '#2C2C2C' - } - }, - backgroundColor: { - type: 'image', - image: '/static/image/characterRelationBg.png', - // repeat: 'repeat-x', // 鏄惁骞抽摵锛屽彲浠ユ槸 'repeat-x', 'repeat-y', 'no-repeat' - size: '100% 100%', // 鑳屾櫙鍥剧墖鐨勫昂瀵革紝鍙互鏄櫨鍒嗘瘮鎴栬�呭儚绱� - position: 'center center' // 鑳屾櫙鍥剧墖鐨勪綅缃紝鍙互鏄� top, bottom, middle 鎴栬�呯櫨鍒嗘瘮 - }, - tooltip: {}, - animationDurationUpdate: 1500, - animationEasingUpdate: 'quinticInOut', - series: [{ - type: 'graph', - layout: 'none', - symbolSize: SymbolSize, // 璋冩暣鑺傜偣澶у皬 - label: { - show: true, - color: 'black', // 璁剧疆鑺傜偣鏂囧瓧棰滆壊涓洪粦鑹� - fontSize: FontSize, // 璁剧疆鏂囧瓧澶у皬 - }, - edgeSymbol: ['circle'], - edgeSymbolSize: [4, 10], - data: nodeData, - links: links, - lineStyle: { - opacity: 0.9, - width: 2, - curveness: 0.3 - } - }] - }; - // 灏嗙敓鎴愮殑杩炴帴绾挎坊鍔犲埌echarts鍥捐〃鐨刼ption涓� - option.series[0].links = links; - // 璁剧疆鐐瑰嚮浜嬩欢鐩戝惉 - myChart.on('click', (params) => { - // menuNav2 = !menuNav1 - // console.log(params); - if (params.componentType === 'series') { - var dataName = params.data.name; // 鑾峰彇鐐瑰嚮鐨勬暟鎹悕绉� - var dataValue = params.data.value; // 鑾峰彇鐐瑰嚮鐨勬暟鎹�� - // 鍦ㄨ繖閲屽彲浠ユ牴鎹渶瑕佸鐞嗙偣鍑讳簨浠讹紝姣斿寮瑰嚭瀵瑰簲鏁版嵁鐨勮缁嗕俊鎭瓑鎿嶄綔 - // console.log('鐐瑰嚮浜�', dataName, '鏁版嵁锛屾暟鍊间负', dataValue); - // 杩欓噷鍙互缂栧啓瑙﹀彂鏃堕棿鑾峰彇瀵瑰簲鏁版嵁淇℃伅鐨勯�昏緫 - this.spaceTimeArr(params) - } - }) - option && myChart.setOption(option); - }, - // 鍏崇郴鍥� 鐐瑰嚮閲岄潰鐨勫厓绱� - spaceTimeArr(Arr) { - // 鍏崇郴鍥剧殑鏁版嵁 - console.log(Arr); - uni.navigateTo({ - url: '/pages/repository/repository' - }) - }, - // 鑾峰彇鏈濅唬echarts鐨勬暟鎹� - async echartsArr() { - await getDataStatistics().then((res) => { - console.log(res.object); - res.object.dynastyStatistic.details.map((item, index) => { - // this.dynasty.id = item.dynastyId - // this.dynasty.name = item.dynastyName - // this.dynasty.coord = item.count - this.dynasty[index].id = item.dynastyId; - this.dynasty[index].name = item.dynastyName; - this.dynasty[index].coord = item.count; - }) - console.log(this.dynasty, 'sdfsfd'); - }) - - }, - // 鐑棬鎼滅储 - async hotSearch() { - await getHotSearch().then(res => { - console.log(res, 'saaadfds'); - this.hot = Object.keys(res.object).map(key => { - return { - id: parseInt(key), - name: res.object[key] - }; - }) - // this.hot = res.list - }) - }, - // 鍩虹鎼滅储 - async onSearch(val) { - console.log(val); - await getFuzzySearch(val.text).then(res => { - console.log(res, 'jieko'); - if (res.list) { - this.nodes = [] - this.relationships = [] - res.list.forEach((item, index) => { - let exists1 = this.nodes.some(node => (node.id === item.identifier1 && node - .name === item.name1)); - let exists2 = this.nodes.some(node => (node.id === item.identifier2 && node - .name === item.name2)); - // 璇佹槑涓嶅瓨鍦� - if (exists1 !== true) { - this.nodes.push({ - name: item.name1, - id: item.identifier1 - }) - } - if (exists2 !== true) { - this.nodes.push({ - name: item.name2, - id: item.identifier2 - }) - } - let obj = { - source: item.name1, - target: item.name2, - relation: item.relationName || - '' // 濡傛灉瀛樺湪 relationName 瀛楁鍒欎娇鐢紝鍚﹀垯涓虹┖瀛楃涓� - } - // 鍙湁褰� item.relationName 瀛樺湪鏃讹紝鎵嶅悜 obj 瀵硅薄涓坊鍔� relation 瀛楁 - if (item.relationName) { - obj.relation = item.relationName; - } - this.relationships.push(obj) - - }); - // this.nodes = [] - // this.nodes[0] = { - // name: res.list[0].name1, - // id: res.list[0].identifier1 - // } - // this.nodes[1] = { - // name: res.list[1].name1, - // id: res.list[1].identifier1 - // } - // for (let i = 1; i < res.list.length; i++) { - // let node1 = { - // name: res.list[i].name1, - // id: res.list[i].identifier1 - // } - // this.nodes.push(node1); - // // console.log(i); - // } - // this.nodes = [...new Set(this.nodes.map(node => JSON.stringify(node)))].map(node => - // JSON.parse(node)); - // console.log(this.nodes,'nodesnodesnodesnodes'); - // this.relationships = this.nodes.slice(1).map((item, index) => { - // console.log(item,res.list[index].relationName, 'iiiiiiiiiiiiisdfdsf'); - // return { - // source: this.nodes[0].name, - // target: item.name, - // relation: res.list[index].relationName - // }; - // }); - } else { - // alert('娌℃湁鎼滅储鍒版暟鎹�') - } - this.relation() - console.log(res); - - }) - - }, - // 楂樼骇鎼滅储 - async onSubmit(val) { - console.log(val); - await getAdvanceSearch(val).then(res => { - console.log(res, '鎺ュ彛璋冪敤鎴愬姛'); - }) - }, - // 鐐瑰嚮涓嬮潰鐨勬湞浠f寜閽� - dynastyBottomClick(item) { - - this.dynastyColor = item.id - this.onSearch({ - text: item.name - }) - }, - // 楂樼骇鎼滅储閲岄潰鑱屼笟鐨勪笅鎷夎彍鍗� - async innt() { - await getPDataStatistics().then(res => { - const professionIndex = this.From.from.findIndex(field => field.label === '鑱屼笟'); - // 濡傛灉鎵惧埌浜嗚亴涓氬瓧娈� - if (professionIndex !== -1) { - // 灏� profession.list 杞崲涓� options 鏍煎紡 - const options = res.object.occupationStatistic.details.map(item => ({ - label: item.tagName, - value: item.tagId.toString() // 灏� id 杞崲涓哄瓧绗︿覆锛岀‘淇濅笌 value 绫诲瀷涓�鑷� - })); - // 鏇存柊鑱屼笟瀛楁鐨� options 灞炴�� - this.$set(this.From.from[professionIndex], 'options', options); - } - }) - } - }, - mounted() { - this.relation() - this.echartsArr() - this.hotSearch() - this.onSearch({ - text: '' - }) - // 鐩戝惉绐楀彛澶у皬鍙樺寲 - window.addEventListener('resize', this.relation); - - - this.innt() - } - } -</script> - -<style> - @media screen and (min-width:2560px)and (max-width:3840px) {} - - @media screen and (min-width:1366px) and (max-width:1920px) {} - - ::v-deep .uni-input-placeholder { - line-height: 1; - font-size: .12rem; - } - - ::v-deep .ffff { - border-radius: .5rem; - } - - ::v-deep .widget_button { - border-radius: .5rem; - margin: .02rem; - } - - .hotSearch { - font-size: .12rem; - color: #2C2C2C; - - li { - color: #244A7B; - margin: 0 .1rem; - color: #244A7B; - } - } -</style> \ No newline at end of file diff --git a/src/pages/forgetPass/forgetPass.vue b/src/pages/forgetPass/forgetPass.vue index 313040f..b642bd0 100644 --- a/src/pages/forgetPass/forgetPass.vue +++ b/src/pages/forgetPass/forgetPass.vue @@ -198,12 +198,12 @@ // uni.setStorageSync('globalData', { id: 123, name: 'example' }); if (item.id == 1) { uni.navigateTo({ - url: '/pages/repository/repository?id=' + item.id + url: '/pages/character/detail?id=' + item.id }) } else if (item.id == 2) { console.log(item.name); // uni.navigateTo({ - // url:'/pages/repository/repository?id='+item.id + // url:'/pages/character/detail?id='+item.id // }) } else if (item.id == 3) { uni.navigateTo({ diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 86f3869..4cc380d 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -182,8 +182,8 @@ // uni.setStorageSync('globalData', { id: 123, name: 'example' }); if (item.id == 1) { uni.navigateTo({ - // url: '/pages/repository/repository?id=' + item.id - url: '/pages/characterRelation/characterRelation?id=' + item.id + // url: '/pages/character/detail?id=' + item.id + url: '/pages/character/index?id=' + item.id }) } else if (item.id == 2) { console.log(item.name); diff --git a/src/pages/inherit/index.vue b/src/pages/inherit/index.vue index 84f4708..4302770 100644 --- a/src/pages/inherit/index.vue +++ b/src/pages/inherit/index.vue @@ -54,6 +54,12 @@ </template> <script> import * as echarts from "echarts"; +import { + inheritMedicalList, + inheritMedicalSataStatistics, + inheritMedicalCultureList, + inheritMedicalRelationList +} from "@/api/index.js"; export default { data() { return { @@ -64,44 +70,45 @@ { 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: [] }; }, onLoad(options) { @@ -109,10 +116,31 @@ console.log("optionsoptionsoptions", options.id); }, mounted() { - // 鍒濆鍖� echarts - this.initBarChart(); + this.getData(); }, methods: { + getData() { + inheritMedicalList({ + keywords: "", + dynastyId: "", + searchType: "KEYWORD", + path: "" + }).then((res) => { + console.log(res); + this.nodeData = res.object.nodeList.map((item) => { + return { + ...item, + itemStyle: { + color: "#F8E2D7", + borderColor: "#F3AA78", + borderWidth: "3" + } + }; + }); + // 鍒濆鍖� echarts + this.initBarChart(); + }); + }, initBarChart() { // WMBg //閫氳繃 $ref 杩涜鎸傝浇 @@ -140,16 +168,17 @@ Distance = 22; } + console.log(this.nodeData, "this.nodeData"); 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, @@ -157,18 +186,17 @@ series: [ { type: "graph", - layout: "none", - symbolSize: SymbolSize + 20, + layout: "force", + symbolSize: 120, //鏄惁鍏佽鐢ㄦ埛鎷栧姩鍥剧墖 - roam: false, + roam: true, label: { show: true, color: "black", // 璁剧疆鑺傜偣鏂囧瓧棰滆壊涓洪粦鑹� - fontSize: FontSize, // 璁剧疆鏂囧瓧澶у皬 + fontSize: FontSize // 璁剧疆鏂囧瓧澶у皬 }, edgeSymbol: ["circle", "arrow"], edgeSymbolSize: [4, 10], - edgeLabel: { show: true, fontSize: FontSize, //鏇存敼涓よ�呭叧绯荤殑瀛椾綋 @@ -179,132 +207,40 @@ formatter: function (params) { // params.data 鏄竟鐨勬暟鎹璞★紝浣犲彲浠ュ湪杩欓噷瀹氫箟鍏崇郴鍚� // 渚嬪锛屼綘鍙互鏍规嵁 source 鍜� target 鐨勫悕绉版潵瀹氫箟鍏崇郴鍚� - return params.data.relationName || "鐖跺瓙"; // 濡傛灉瀹氫箟浜� relationName 鍒欐樉绀哄畠锛屽惁鍒欐樉绀衡�滅埗瀛愨�� - }, + return params.data.relationName; // 濡傛灉瀹氫箟浜� relationName 鍒欐樉绀哄畠锛屽惁鍒欐樉绀衡�滅埗瀛愨�� + } }, //鍚勪釜鑺傜偣 - data: [ - { - name: "钖涢洩", - itemStyle: { - color: "#F8E2D7", - borderColor: "#F3AA78", - borderWidth: "3", - }, - }, - { - name: "閭电櫥鐎�", - x: 400, - y: 300, - itemStyle: { - color: "#F8E2D7", - borderColor: "#F3AA78", - borderWidth: "3", - }, - }, - { - name: "閭甸瞾鐬�", - x: 500, - y: 300, - itemStyle: { - color: "#F8E2D7", - borderColor: "#F3AA78", - borderWidth: "3", - }, - }, - { - name: "閭垫槬娉�", - x: 600, - y: 300, - itemStyle: { - color: "#F8E2D7", - borderColor: "#F3AA78", - borderWidth: "3", - }, - }, - { - name: "寰愰敠", - x: 650, - y: 400, - itemStyle: { - color: "#DCE7EB", - borderColor: "#5F81A4", - borderWidth: "3", - }, - }, - { - name: "閭典笝鎵�", - x: 700, - y: 300, - itemStyle: { - color: "#F8E2D7", - borderColor: "#F3AA78", - borderWidth: "3", - }, - }, - { - name: "鍐鑺�", - x: 720, - y: 400, - itemStyle: { - color: "#DCE7EB", - borderColor: "#5F81A4", - borderWidth: "3", - }, - }, - { - name: "鏉庨缚绔�", - x: 740, - y: 500, - itemStyle: { - color: "#E1E1E1", - borderColor: "#888888", - borderWidth: "3", - }, - }, - { - name: "閭垫櫙灏�", - x: 800, - y: 200, - itemStyle: { - color: "#F8E2D7", - borderColor: "#F3AA78", - borderWidth: "3", - }, - }, - { - name: "閭垫櫙搴�", - x: 800, - y: 400, - itemStyle: { - color: "#F8E2D7", - borderColor: "#F3AA78", - borderWidth: "3", - }, - }, - ], + data: this.nodeData, lineStyle: { color: "#000000", opacity: 0.9, width: 2, - curveness: 0, + curveness: 0 }, - }, - ], + force: { + // initLayout: 'circular', + // gravity: 0 + friction: 0.1, + repulsion: 500, + edgeLength: 6 + } + } + ] }; //杩涜娓叉煋 myChart.setOption(option); myChart.on("click", (params) => { uni.navigateTo({ - url: "/pages/inherit/list" - }); + url: "/pages/inherit/list" + }); }); }, // 杩斿洖鎸夐挳 goBack() { this.$router.go(-1); - }, - }, + } + } }; </script> <style scoped> diff --git a/src/pages/inherit/list.vue b/src/pages/inherit/list.vue index dd96d03..3093d4b 100644 --- a/src/pages/inherit/list.vue +++ b/src/pages/inherit/list.vue @@ -653,7 +653,7 @@ }, backgroundColor: { type: "image", - image: "/static/image/WMBg.png", + image: "./static/image/WMBg.png", repeat: "repeat-x", // 鏄惁骞抽摵锛屽彲浠ユ槸 'repeat-x', 'repeat-y', 'no-repeat' size: "100% 100%", // 鑳屾櫙鍥剧墖鐨勫昂瀵革紝鍙互鏄櫨鍒嗘瘮鎴栬�呭儚绱� position: "center center" // 鑳屾櫙鍥剧墖鐨勪綅缃紝鍙互鏄� top, bottom, middle 鎴栬�呯櫨鍒嗘瘮 diff --git a/src/pages/repository/repository.vue b/src/pages/repository/repository.vue index 6d005e9..e889f83 100644 --- a/src/pages/repository/repository.vue +++ b/src/pages/repository/repository.vue @@ -286,7 +286,7 @@ if (index == 1) { console.log('璺宠浆鍏崇郴鍦板浘'); uni.navigateTo({ - url: '/pages/characterRelation/characterRelation' + url: '/pages/character/index' }) } else if (index == 2) { uni.navigateTo({ diff --git a/src/pages/shiyiHome/shiyiHome.vue b/src/pages/shiyiHome/shiyiHome.vue index 687b31b..2a12b6c 100644 --- a/src/pages/shiyiHome/shiyiHome.vue +++ b/src/pages/shiyiHome/shiyiHome.vue @@ -1,7 +1,7 @@ <template> <view> - <headNav :idIndex="idIndex" :searchBg="false" text="涓尰涓栧尰浼犳壙鏁版嵁搴�" bg="@/static/image/topBg1.png" - bg1="@/static/image/line1.png" /> + <headNav :idIndex="idIndex" :searchBg="false" text="涓尰涓栧尰浼犳壙鏁版嵁搴�" bg="/static/image/topBg1.png" + bg1="/static/image/line1.png" /> </view> </template> diff --git a/src/pages/territory/territory.vue b/src/pages/territory/territory.vue index 53352f1..ab643e3 100644 --- a/src/pages/territory/territory.vue +++ b/src/pages/territory/territory.vue @@ -1466,7 +1466,7 @@ // 鏌ョ湅鏇村>> viewMoreClick() { uni.navigateTo({ - url: '/pages/repository/repository' + url: '/pages/character/detail' }) }, } diff --git a/src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue b/src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue index 179a355..e12b198 100644 --- a/src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue +++ b/src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue @@ -1,118 +1,134 @@ <template> - <view class="widget_style" > - <view class="ffff" style="display: flex;height: 100%;"> - <input placeholder-class="widget_input_placehold" @confirm="onClickSearch" v-model="content" class="widget_input" :style="style1" :placeholder="placehold" /> - <view class="widget_button" v-if="isSearchTrue" @click="onClickSearch">{{buttonText}}</view> - <view class="widget_button searchBg" v-else @click="onClickSearch"></view> - </view> - - </view> + <view class="widget_style"> + <view class="ffff" style="display: flex; height: 100%"> + <input + placeholder-class="widget_input_placehold" + @confirm="onClickSearch" + v-model="content" + class="widget_input" + :style="style1" + :placeholder="placehold" + /> + <view class="widget_button" v-if="isSearchTrue" @click="onClickSearch">{{ + buttonText + }}</view> + <view class="widget_button searchBg" v-else @click="onClickSearch"></view> + </view> + </view> </template> <script setup> - export default{ - data(){ - return{ - content:'', - style1:'', - style2:'', - } - }, - props:{ - width:{ - type:Number, - default:50 - }, - placehold:{ - type:String, - default:'璇疯緭鍏ュ唴瀹�' - }, - buttonText:{ - type:String, - default(){ - return '鎼滅储' - } - },isSearchTrue:{ - type:Boolean, - default(){ - return true - } - }, - }, - created() { - // 缂栫粐璁剧疆鍔ㄦ�佸搴� - // this.style1 = 'min-width:calc('+this.width+'vw);'; - // this.style2 = 'min-width:calc('+(this.width / 5)+'vw);'; - this.style1= 'width:4.5rem' - this.style2= 'width:.5rem' - }, - destroyed() { - - }, - methods:{ - onClickSearch(){ - this.$emit('onSearch',{text:this.content}); - } +export default { + data() { + return { + content: "", + style1: "", + style2: "" + }; + }, + props: { + width: { + type: Number, + default: 50 + }, + placehold: { + type: String, + default: "璇疯緭鍏ュ唴瀹�" + }, + keyword: { + type: String + }, + buttonText: { + type: String, + default() { + return "鎼滅储"; + } + }, + isSearchTrue: { + type: Boolean, + default() { + return true; + } + } + }, + created() { + // 缂栫粐璁剧疆鍔ㄦ�佸搴� + // this.style1 = 'min-width:calc('+this.width+'vw);'; + // this.style2 = 'min-width:calc('+(this.width / 5)+'vw);'; + this.style1 = "width:4.5rem"; + this.style2 = "width:.5rem"; + this.content = this.keyword || ""; + }, + destroyed() {}, + methods: { + onClickSearch() { + this.$emit("onSearch", { text: this.content }); + } + }, + watch: { + keyword(value) { + this.content = value } } +}; </script> <style> - .widget_style{ - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - border-radius: 30px; - height: 100% !important; - } - .ffff{ - border: 2px solid #597AA5; - border-radius: 30px; - overflow: hidden; - padding-left: 10px; - background-color: #fff; - align-items: center; - } - .widget_input{ - min-width: 320rpx; - height: 100%; - background-color: #fff; - /* border: 2rpx solid #FF6600; */ - /* border-radius: 10rpx; */ - padding-left: 12rpx; - padding-right: 12rpx; - font-size: 24rpx; - } - .widget_input_placehold{ - color: #BBB; - } - .widget_button{ - color: #fff; - width: .74rem; - height: .3rem; - font-size: .14rem; - padding: 5rpx 20rpx; - display: flex; - align-items: center; - justify-content: center; - border-top-right-radius: 10rpx; - border-top-left-radius: 0rpx; - border-bottom-left-radius: 0rpx; - border-bottom-right-radius: 10rpx; - background-color: #244A7B; - border-radius: 30px; - margin: 2rpx; - } - .searchBg{ - width: .46rem; - height: 0.46rem; - background-image:url(@/static/image/鎼滅储.png) ; - background-size: 100% 100%; - } - ::v-deep .uni-input-input{ - height: 100% !important; - color: #000; - font-size: .16rem; - } +.widget_style { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + border-radius: 30px; + height: 100% !important; +} +.ffff { + border: 2px solid #597aa5; + border-radius: 30px; + overflow: hidden; + padding-left: 10px; + background-color: #fff; + align-items: center; +} +.widget_input { + min-width: 320rpx; + height: 100%; + background-color: #fff; + /* border: 2rpx solid #FF6600; */ + /* border-radius: 10rpx; */ + padding-left: 12rpx; + padding-right: 12rpx; + font-size: 24rpx; +} +.widget_input_placehold { + color: #bbb; +} +.widget_button { + color: #fff; + width: 0.74rem; + height: 0.3rem; + font-size: 0.14rem; + padding: 5rpx 20rpx; + display: flex; + align-items: center; + justify-content: center; + border-top-right-radius: 10rpx; + border-top-left-radius: 0rpx; + border-bottom-left-radius: 0rpx; + border-bottom-right-radius: 10rpx; + background-color: #244a7b; + border-radius: 30px; + margin: 2rpx; +} +.searchBg { + width: 0.46rem; + height: 0.46rem; + background-image: url(@/static/image/鎼滅储.png); + background-size: 100% 100%; +} +::v-deep .uni-input-input { + height: 100% !important; + color: #000; + font-size: 0.16rem; +} </style> diff --git a/src/uni_modules/uni-list/readme.md b/src/uni_modules/uni-list/readme.md index 32c2865..89ea5e9 100644 --- a/src/uni_modules/uni-list/readme.md +++ b/src/uni_modules/uni-list/readme.md @@ -259,17 +259,17 @@ <uni-list> <uni-list-item title="鑷畾涔夊彸渚ф彃妲�" note="鍒楄〃鎻忚堪淇℃伅" link> <template slot="header"> - <image class="slot-image" src="/static/logo.png" mode="widthFix"></image> + <image class="slot-image" src="@/static/logo.png" mode="widthFix"></image> </template> </uni-list-item> <uni-list-item> <!-- 鑷畾涔� header --> - <view slot="header" class="slot-box"><image class="slot-image" src="/static/logo.png" mode="widthFix"></image></view> + <view slot="header" class="slot-box"><image class="slot-image" src="@/static/logo.png" mode="widthFix"></image></view> <!-- 鑷畾涔� body --> <text slot="body" class="slot-box slot-text">鑷畾涔夋彃妲�</text> <!-- 鑷畾涔� footer--> <template slot="footer"> - <image class="slot-image" src="/static/logo.png" mode="widthFix"></image> + <image class="slot-image" src="@/static/logo.png" mode="widthFix"></image> </template> </uni-list-item> </uni-list> diff --git a/src/uni_modules/uni-ui/package.json b/src/uni_modules/uni-ui/package.json index 857ed51..1a59fe0 100644 --- a/src/uni_modules/uni-ui/package.json +++ b/src/uni_modules/uni-ui/package.json @@ -1,15 +1,6 @@ { - "id": "uni-ui", - "displayName": "uni-ui", + "displayName": "zhongguoyixuerenwushujuku", "version": "1.4.27", - "description": "uni-ui 鏄熀浜巙ni-app鐨勩�佸叏绔吋瀹圭殑銆侀珮鎬ц兘UI妗嗘灦", - "keywords": [ - "uni-ui", - "uniui", - "UI缁勪欢搴�", - "ui妗嗘灦", - "ui搴�" -], "repository": "https://github.com/dcloudio/uni-ui", "engines": { "HBuilderX": "^3.2.10" diff --git a/src/utils/request/req1.js b/src/utils/request/req1.js index 6ab88dc..c6551d3 100644 --- a/src/utils/request/req1.js +++ b/src/utils/request/req1.js @@ -1,50 +1,55 @@ // 灏佽缃戠粶璇锋眰 -import axios from 'axios' -import { Message } from 'element-ui' +import axios from "axios"; +import { Message } from "element-ui"; // 鍒涘缓璇锋眰瀹炰緥 const req = axios.create({ - // baseURL: '/api' - // baseURL: '/account/verification' - baseURL: 'http://icmm.test.xyinde.com/api', - timeout: 10000 -}) + // baseURL: '/api' + // baseURL: '/account/verification' + baseURL: "http://icmm.test.xyinde.com/api", + timeout: 10000 +}); // 璇锋眰鎷︽埅 -req.interceptors.request.use((config) => { - // 鎼哄甫token鍙傛暟锛屼竴鑸細鍔犺浇header Authorization - config.headers.Authorization = localStorage.getItem('access_token') - return config -}, (error) => { - return Promise.reject(error) -}) +req.interceptors.request.use( + (config) => { + // 鎼哄甫token鍙傛暟锛屼竴鑸細鍔犺浇header Authorization + config.headers.Authorization = localStorage.getItem("access_token"); + return config; + }, + (error) => { + return Promise.reject(error); + } +); // 鍝嶅簲鎷︽埅 req.interceptors.response.use( - (res) => { - // 鍒ゆ柇token杩囨湡鏃剁殑涓�浜涘鐞� - if (res.data.success== false&& res.data.errorText=='闇�瑕侀獙璇佽韩浠�'&&res.data.errorCode == '11') { - console.log('token杩囨湡浜�'); - Message.error(res.data.errorText || '') - // 娓呮token - uni.getStorageSync('access_token'); - uni.clearStorageSync(); - uni.showToast({ - title: '璇烽噸鏂扮櫥褰�', - icon: 'none' - }); - uni.reLaunch({ - url: "/pages/Login/Login" - }); - } - console.log(res, '鐩稿簲鎷︽埅1') - return res.data - }, - (error) => { - // state 400 500 - // 閿欒澶勭悊 - console.log(error, '鐩稿簲鎷︽埅2') - // 璺崇櫥闄嗛〉闈� - } -) + (res) => { + // 鍒ゆ柇token杩囨湡鏃剁殑涓�浜涘鐞� + if ( + res.data.success == false && + res.data.errorText == "闇�瑕侀獙璇佽韩浠�" && + res.data.errorCode == "11" + ) { + console.log("token杩囨湡浜�"); + Message.error(res.data.errorText || ""); + // 娓呮token + uni.getStorageSync("access_token"); + uni.clearStorageSync(); + uni.showToast({ + title: "璇烽噸鏂扮櫥褰�", + icon: "none" + }); + uni.reLaunch({ + url: "/pages/Login/Login" + }); + } + return res.data; + }, + (error) => { + // state 400 500 + // 閿欒澶勭悊 + // 璺崇櫥闄嗛〉闈� + } +); -export default req \ No newline at end of file +export default req; -- Gitblit v1.9.1