Commit ee340c25 by 李君

优化

1 parent 4c6832e2
...@@ -8,20 +8,20 @@ let baseURL = ['localhost', '192.168.1.28'].includes(window.location.hostname) ...@@ -8,20 +8,20 @@ let baseURL = ['localhost', '192.168.1.28'].includes(window.location.hostname)
const axiosInstance = axios.create( const axiosInstance = axios.create(
{ {
baseURL: baseURL, baseURL: baseURL,
timeout:10000 // timeout:10000
} }
) )
// 请求拦截器 // 请求拦截器
axiosInstance.interceptors.request.use( axiosInstance.interceptors.request.use(
config => { config => {
Cookies.set('atoken','9b478c52-37e2-451e-8b71-5338f0b0f0e3') // Cookies.set('atoken','c2f52c71-8736-47c7-9eaf-2a3f6a7cc631')
if(!Cookies.get('atoken')){ if(!Cookies.get('atoken')){
ElMessage({ ElMessage({
message: `登录过期,请重新登录`, message: `登录过期,请重新登录`,
type: 'warning' type: 'warning'
}) })
setTimeout(()=>{ setTimeout(()=>{
let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'http://36.112.68.214:33333/' : window.location.origin let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://store.keliuyun.com/' : window.location.origin
// if(url.includes('36.112.68.214')){ // if(url.includes('36.112.68.214')){
// url = 'http://36.112.68.214:33333/' // url = 'http://36.112.68.214:33333/'
// } // }
...@@ -45,7 +45,7 @@ axiosInstance.interceptors.response.use( ...@@ -45,7 +45,7 @@ axiosInstance.interceptors.response.use(
type: 'warning' type: 'warning'
}) })
setTimeout(()=>{ setTimeout(()=>{
let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'http://36.112.68.214:33333/' : window.location.origin let url = ['localhost', '192.168.1.28'].includes(window.location.hostname) ? 'https://store.keliuyun.com/' : window.location.origin
// if(url.includes('36.112.68.214')){ // if(url.includes('36.112.68.214')){
// url = 'http://36.112.68.214:33333/' // url = 'http://36.112.68.214:33333/'
// } // }
......
...@@ -113,10 +113,16 @@ ...@@ -113,10 +113,16 @@
<div v-loading="isLoading"> <div v-loading="isLoading">
<div class="resultContent" :style="{'height':contentHeight+'px'}"> <div class="resultContent" :style="{'height':contentHeight+'px'}">
<template v-for="person in dataList"> <template v-for="person in dataList">
<div style="margin: 10px 0;border: solid 1px black" :class="person.checked?'checked':''"> <div class="classBox" :class="person.expand?'expand':''">
<div :class="person.checked?'checked':''">
<div class="boxInfo">
<span class="iconExpand" v-show="!person.expand"></span>
<span class="iconExpand" v-show="person.expand"></span>
<span class="expandWord" @click='expandChange(person)'>{{person.expand?'收起':'展开'}}</span>
<el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox> <el-checkbox class="checkBox" v-model="person.checked" @change='checkChange(person)'></el-checkbox>
人id:{{ ' ' + person.person_unid }} 人id:{{ ' ' + person.person_unid }}
图片数量:{{ person.perrsonList.length }} 图片数量:{{ person.perrsonList.length }}
</div>
<el-row v-for="row in getPagedList(person.perrsonList, 8)"> <el-row v-for="row in getPagedList(person.perrsonList, 8)">
<el-col :span="3" v-for="item in row"> <el-col :span="3" v-for="item in row">
<div style="margin: 0 5px" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''"> <div style="margin: 0 5px" @click="handleClick(item)" :class="currentItemId==item.id?'actived':''">
...@@ -143,6 +149,7 @@ ...@@ -143,6 +149,7 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</div>
</template> </template>
</div> </div>
<a-pagination <a-pagination
...@@ -446,6 +453,7 @@ export default { ...@@ -446,6 +453,7 @@ export default {
sortDataList(r.data.persons) sortDataList(r.data.persons)
r.data.persons.forEach((itemPerson)=>{ r.data.persons.forEach((itemPerson)=>{
itemPerson.checked = false itemPerson.checked = false
itemPerson.expand = false
itemPerson.perrsonList.forEach((item)=>{ itemPerson.perrsonList.forEach((item)=>{
if (item.features_url) { if (item.features_url) {
item.features_url = window._baseImgUrl + item.features_url item.features_url = window._baseImgUrl + item.features_url
...@@ -534,6 +542,14 @@ export default { ...@@ -534,6 +542,14 @@ export default {
const checkChange = function(data){ const checkChange = function(data){
console.log(data) console.log(data)
} }
const expandChange = function(data){
console.log(data)
dataList.value.forEach(item=>{
if (data.person_unid == item.person_unid) {
item.expand = !item.expand
}
})
}
// 特征对比 // 特征对比
const comparativeFun = function(){ const comparativeFun = function(){
const rawData = toRaw(queryForm) const rawData = toRaw(queryForm)
...@@ -679,6 +695,7 @@ export default { ...@@ -679,6 +695,7 @@ export default {
handleClick, handleClick,
comparativeFun, comparativeFun,
checkChange, checkChange,
expandChange,
clerkComparativeFun, clerkComparativeFun,
singleComparativeFun, singleComparativeFun,
formatGender, formatGender,
...@@ -702,6 +719,32 @@ export default { ...@@ -702,6 +719,32 @@ export default {
.checkBox{ .checkBox{
margin-left: 10px; margin-left: 10px;
} }
.boxInfo{
line-height: 28px;
margin-bottom: 10px;
}
.classBox{
margin: 10px 0;
border: solid 1px black;
height: 485px;
overflow-y: hidden;
}
.expand{
height: auto;
overflow: auto;
}
.expandWord{
color: #1890ff;
margin-right: 5px;
cursor: pointer;
float: right;
}
.iconExpand{
cursor: pointer;
float: right;
color: #1890ff;
margin-right: 20px;
}
.checked{ .checked{
background-color: #bbb; background-color: #bbb;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!