From d4211fd96865e58217d63efaf4d8f6609fb24ae6 Mon Sep 17 00:00:00 2001 From: mh-two-thousand-and-two <17391232786@163.com> Date: 星期二, 16 四月 2024 17:43:33 +0800 Subject: [PATCH] 更新数据 --- src/pages/TcmSystem/TcmSystem.vue | 196 +++++++++++++----------------------------------- 1 files changed, 54 insertions(+), 142 deletions(-) diff --git a/src/pages/TcmSystem/TcmSystem.vue b/src/pages/TcmSystem/TcmSystem.vue index f72f1f5..266ad30 100644 --- a/src/pages/TcmSystem/TcmSystem.vue +++ b/src/pages/TcmSystem/TcmSystem.vue @@ -26,15 +26,15 @@ <ul style="margin-top: 10rpx;"> <!-- background-color: #d6e3f4;border-radius: 60rpx; --> <li class="flex" - :style="{'background':institution.index === item.dynastyId ? '#DDE8F6' :'','borderRadius': institution.index === item.dynastyId ? '60rpx' :''}" + :style="{'background':institution.index === item.dynastyId ? '#DDE8F6' :'','borderRadius': institution.index === item.dynastyId ? '60rpx' :'',display:index+1>institutionIndex?'none':'flex'}" v-for="(item,index) in institution.list" :key="index" style="padding:0 20rpx;color: #2C2C2C;" @click="handInstitCLick(item,'a')"> <view class="">{{item.dynastyName}}</view> <view class="">{{item.count}}</view> </li> </ul> - <view class="flex flex-center toggleButton1"> - <view class="toggleButton" style="color: #244A7B;" @click="shrinkClick('a')"> + <view v-if="institution.list.length-1 >3" class="flex flex-center "> + <view class="toggleButton" style="color: #244A7B;" @click="shrinkClick('a','鏈烘瀯')"> {{ activeBox !== 'a' ? '鏇村 锕�' : '鏀惰捣 锔�' }} </view> </view> @@ -46,15 +46,15 @@ <ul style="margin-top: 10rpx;"> <!-- background-color: #d6e3f4;border-radius: 60rpx; --> <li class="flex" - :style="{'background':officials.index === item.dynastyId ? '#DDE8F6' :'','borderRadius': officials.index == item.dynastyId ? '10rem' :''}" + :style="{'background':officials.index === item.dynastyId ? '#DDE8F6' :'','borderRadius': officials.index == item.dynastyId ? '10rem' :'',display:index+1>officialsIndex?'none':'flex'}" v-for="(item,index) in officials.list" :key="index" style="padding:0 20rpx;" @click="handInstitCLick(item,'b')"> <view class="">{{item.dynastyName}}</view> <view class="">{{item.count}}</view> </li> </ul> - <view class="flex flex-center toggleButton1"> - <view class="toggleButton" style="color: #244A7B;" @click="shrinkClick('b')"> + <view v-if="officials.list.length-1 >3" class="flex flex-center "> + <view class="toggleButton" style="color: #244A7B;" @click="shrinkClick('b','鑱屽畼')"> {{ activeBox !== 'b' ? '鏇村 锕�' : '鏀惰捣 锔�' }} </view> </view> @@ -132,7 +132,6 @@ @current-change="CurrentChange" @prev-click="PrevClick" @next-click="NextClick" prev-text="涓婁竴椤�" next-text="涓嬩竴椤�" background layout="prev, pager, next"> </el-pagination> - </el-pagination> </el-row> </view> </view> @@ -155,9 +154,9 @@ </view> <ul class="flex creatureXinxi3"> <li @click="PDFClick(ListDetails,1)">RDF</li> - <li @click="PDFClick(2)">NT</li> - <li @click="PDFClick(3)">XML</li> - <li @click="PDFClick(4)">JSON</li> + <li @click="PDFClick(ListDetails,2)">NT</li> + <li @click="PDFClick(ListDetails,3)">XML</li> + <li @click="PDFClick(ListDetails,4)">JSON</li> </ul> </view> </view> @@ -230,26 +229,10 @@ institution: { title: '鏈烘瀯缁熻', index: 0, - list: [{ - dynastyName: '鍏ㄩ儴', - id: 1, - count: 829 - }, - { - dynastyName: '鍖诲', - id: 2, - count: 90 - }, { - dynastyName: '涓栧尰', - id: 3, - count: 81 - }, { - dynastyName: '瀹环鍖�', - id: 4, - count: 83 - }, - ] + list: [ ] }, + // 鏄剧ず澶氬皯鏉¤亴瀹樻暟鎹� + institutionIndex:4, // 鏈烘瀯鍜岃亴瀹樼殑绫诲瀷 鍙栧�硷細OFFICIAL->鑱屽畼 INSTITUTION->鏈烘瀯 ALL->鑱屽畼銆佹満鏋� classifyType: 'ALL', // 鏈烘瀯鍜岃亴瀹樼殑id @@ -258,42 +241,15 @@ officials: { title: '鑱屽畼缁熻', index: 0, - list: [{ - dynastyName: '鍏ㄩ儴', - id: 1, - count: 829 - }, - { - dynastyName: '鍖诲', - id: 2, - count: 90 - }, { - dynastyName: '涓栧尰', - id: 3, - count: 81 - }, { - dynastyName: '瀹环鍖�', - id: 4, - count: 83 - }, - ] + list: [ ] }, + // 鏄剧ず澶氬皯鏉¤亴瀹樻暟鎹� + officialsIndex:4, // 鏉ユ簮 source: { title: '鏉ユ簮', index: 0, - list: [{ - source: '涓浗鍖讳簨鍒跺害杈炲吀', - id: 1, - }, - { - source: '涓尰鍖讳簨澶у叏', - id: 2, - }, { - source: '涓浗鍖讳簨鍒跺害鐮旂┒', - id: 3, - } - ] + list: [ ] }, // 灞曞紑鍜屾敹缂╃殑鎸夐挳闇�瑕� activeBox: null, @@ -314,19 +270,7 @@ }], // 鐑棬鎼滅储 - hot: [{ - id: 1, - name: '鏉庢椂鐝�', - bgColor: false - }, { - id: 2, - name: '鏉庢椂鐝�2', - bgColor: false - }, { - id: 3, - name: '鏉庢椂鐝�3', - bgColor: false - }, ], + hot: [], // 鐐瑰嚮鐨勬悳绱㈤」 HotBg: false, // 鎺掑簭涓嬫媺鑿滃崟 @@ -339,65 +283,11 @@ }], rankVal: 'NAME', // 鍒楄〃椤� - CommodityList: [{ - id: 1, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍙や唬鍖荤枟鏈烘瀯鍚嶇О锛屽お鍖婚櫌鍚嶇О濮嬩簬閲戜唬锛屾壙琚簬鍞愬畫鐨勫お鍖荤讲銆佸お鍖诲眬锛屼互鍚庡巻浠e潎绔嬫湁澶尰闄㈡満鏋勫巻浠e潎绔嬫湁澶尰闄㈡満鏋�' - }, - { - id: 2, - post: '鑱屽畼', - name: '澶尰闄�', - dynasty: '鍞愭湞', - color: '#DA7A2B', - anotherNamer: '鍒О----------', - content: '鍙や唬鍖荤枟鏈烘瀯鍚嶇О锛屽お鍖婚櫌鍚嶇О濮嬩簬閲戜唬锛屽彜浠e尰鐤楁満鏋勫悕绉帮紝澶尰闄㈠悕绉板浜庨噾浠o紝鍙や唬鍖荤枟鏈烘瀯鍚嶇О锛屽お鍖婚櫌鍚嶇О濮嬩簬閲戜唬锛屽彜浠e尰鐤楁満鏋勫悕绉帮紝澶尰闄㈠悕绉板浜庨噾浠o紝鍙や唬鍖荤枟鏈烘瀯鍚嶇О锛屽お鍖婚櫌鍚嶇О濮嬩簬閲戜唬锛�' - }, - { - id: 3, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍐呭++++++++++++++++++++++++++++++' - }, - { - id: 3, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍐呭++++++++++++++++++++++++++++++' - }, - { - id: 3, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍐呭++++++++++++++++++++++++++++++' - }, - { - id: 3, - post: '鏈烘瀯', - name: '澶尰闄�', - color: '#597AA5', - dynasty: '鍞愭湞', - anotherNamer: '鍒О----------', - content: '鍐呭++++++++++++++++++++++++++++++' - } - ], + CommodityList: [ ], // 鍒楄〃鐨勮鎯呮暟鎹� ListDetails: {}, // 鍒嗛〉鐨勬�绘暟 - total: 100, + total: 0, // 褰撳墠椤� CurrentPage: 1, // 涓�椤垫樉绀哄灏戞潯鏁版嵁 @@ -462,6 +352,7 @@ // [{name:'sdf',number}] console.log(res, '鎺ュ彛鎴愬姛sdsdfsdsfs'); }) + }, // 鍙充晶鐨刲ist鏁版嵁 async getMList(obj) { @@ -512,16 +403,19 @@ // 宸︿晶鐨勬満鏋勭粺璁$瓑绛夋寜閽� handInstitCLick(item, name) { if (name == 'a') { + this.CurrentPage = 1 this.institution.index = item.dynastyId this.classifyId = item.dynastyId this.classifyType = 'INSTITUTION' this.getMList() } else if (name == 'b') { + this.CurrentPage = 1 this.officials.index = item.dynastyId this.classifyId = item.dynastyId this.classifyType = 'OFFICIAL' this.getMList() } else if (name == 'c') { + this.CurrentPage = 1 this.source.index = item.bookId this.getMList() console.log(); @@ -529,14 +423,23 @@ console.log(item, name); }, // 灞曞紑鏀剁缉 - shrinkClick(box) { + shrinkClick(box,name) { console.log(box); - if (this.activeBox === box) { - console.log('sdfs'); - this.activeBox = null; - } else { - this.activeBox = box; + if(name=='鏈烘瀯'){ + this.institutionIndex = this.institutionIndex < this.institution.list.length ? this.institution.list.length : 4; + this.officialsIndex=4 + this.activeBox = this.activeBox === 'a' ? null : 'a'; + }else if(name=='鑱屽畼'){ + this.officialsIndex = this.officialsIndex < this.officials.list.length ? this.officials.list.length : 4; + this.institutionIndex=4 + this.activeBox = this.activeBox === 'b' ? null : 'b'; } + // if (this.activeBox === box) { + // console.log('sdfs'); + // this.activeBox = null; + // } else { + // this.activeBox = box; + // } }, //鍙栧�硷細RDF銆丯T銆乆ML銆丣SON async PDFClick(item,index) { @@ -553,9 +456,22 @@ // url:`/pages/RDF/RDF?${queryString}` // }) window.open(`#/pages/RDF/RDF?${queryString}`) - // await getMedicalDataOutput(Obj).then(res=>{ - // console.log(res,'ressres'); - // }) + }else if(index ==2){ + Obj.outputType='NT' + let queryString = Object.keys(Obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(Obj[key])}`).join('&'); + window.open(`#/pages/NT/NT?${queryString}`) + }else if(index==3){ + Obj.outputType='XML' + console.log('XML'); + await getMedicalDataOutput(Obj).then(res=>{ + console.log(res,'鎺ュ彛XML'); + }) + }else if(index ==4){ + Obj.outputType='JSON' + console.log('JSON'); + await getMedicalDataOutput(Obj).then(res=>{ + console.log(res,'鎺ュ彛JSON'); + }) } // console.log(Obj.id,); }, @@ -1039,10 +955,6 @@ } } - .a, - .b { - min-height: 3rem !important; - } .paixu { /* margin-right: .3rem; -- Gitblit v1.9.1