Browse Source

增加说明

master
xyiege 5 months ago
parent
commit
37650d4085
  1. 54
      vue/afvue/src/views/Sfilecompare.vue

54
vue/afvue/src/views/Sfilecompare.vue

@ -12,10 +12,14 @@
<button @click="getFlist">Go</button> <button @click="getFlist">Go</button>
</div> </div>
<div class="sflist"> <div class="sflist">
<ul v-for="item in fsclist" :key="item"> <ul >
<li >{{item.path}}</li> <li v-for="item in fsclist" :key="item">{{item.path}}</li>
</ul> </ul>
</div> </div>
<div class="tips" v-if="fsclist.length > 0">
<span>当前路径{{fspath}} ,文件数量{{ fsclist.length }}</span>
</div>
</div> </div>
<!-- 第二个服务器的文件列表 --> <!-- 第二个服务器的文件列表 -->
<div class="sfcon"> <div class="sfcon">
@ -30,16 +34,21 @@
</div> </div>
<div class="sflist"> <div class="sflist">
<ul v-for="item in ssclist" :key="item"> <ul >
<li >{{item.path}}</li> <li v-for="item in ssclist" :key="item">{{item.path}}</li>
</ul> </ul>
</div> </div>
<div class="tips" v-if="ssclist.length > 0">
<span>当前路径{{fspath}} ,文件数量{{ fsclist.length }}</span>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { GetFileList,SerlistInUsing } from '@/api/scinfo' import { GetFileList,SerlistInUsing } from '@/api/scinfo'
import { isLength } from 'lodash';
export default { export default {
name: 'Sfilecompare', name: 'Sfilecompare',
@ -69,31 +78,23 @@ export default {
let sstr = fsip.split(":") let sstr = fsip.split(":")
let sport = sstr[1] let sport = sstr[1]
let scip = btoa(sstr[0]) let scip = btoa(sstr[0])
//
let rt = this.FileList(scip,sport,this.fspath) GetFileList({srcip: scip,path: this.fspath,sport: sport}).then(res => {
console.log(rt,"rt") this.fsclist = res.data.list
})
}, },
// //
getSflist() { getSflist() {
let sstr = this.ssip.split(":") let ssip = this.$refs.ssip.value
let sstr = ssip.split(":")
let sport = sstr[1] let sport = sstr[1]
let scip = btoa(sstr[0]) let scip = btoa(sstr[0])
// //
this.ssclist = this.FileList(scip,sport,this.sspath) GetFileList({srcip: scip,path: this.sspath,sport: sport}).then(res => {
this.ssclist = res.data.list
})
}, },
//
FileList(ip,port,path){
let retlist=[]
GetFileList({
srcip: ip,
path: path,
sport: port
}).then(res => {
retlist= res.data
})
return retlist
}
} }
} }
</script> </script>
@ -119,6 +120,9 @@ export default {
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
margin-top: 22px; margin-top: 22px;
} }
.sfcon:nth-child(2) .sflist{
background-color: #c3c3c3;
}
.sfind{ .sfind{
width: 100%; width: 100%;
height: 40px; height: 40px;
@ -133,6 +137,7 @@ export default {
margin-top: 20px; margin-top: 20px;
display: block; display: block;
width: 100%; width: 100%;
min-height: 500px;
} }
.sfcon .sflist ul li{ .sfcon .sflist ul li{
list-style: none; list-style: none;
@ -142,4 +147,9 @@ export default {
line-height: 40px; line-height: 40px;
border-bottom: 1px dashed #ccc; border-bottom: 1px dashed #ccc;
} }
.sfcon .sflist .tips{
width: 100%;
float: left;
margin-top: 12px;
}
</style> </style>
Loading…
Cancel
Save