no message
This commit is contained in:
parent
c141062797
commit
00e3c5302b
@ -562,6 +562,8 @@ body {
|
||||
flex-wrap: wrap;
|
||||
width: 860px;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
}
|
||||
.my-project .my-box .manage-box .list .item {
|
||||
width: 420px;
|
||||
@ -569,6 +571,8 @@ body {
|
||||
border: 1px solid #f2f2f2;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 20px;
|
||||
position: absolute;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.my-project .my-box .manage-box .list .item .top {
|
||||
padding: 16px 10px 14px;
|
||||
@ -595,7 +599,6 @@ body {
|
||||
color: #333333;
|
||||
}
|
||||
.my-project .my-box .manage-box .list .item .top .info .school .icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ body {
|
||||
height: 575px;
|
||||
overflow: auto;
|
||||
margin-right: 5px;
|
||||
|
||||
|
||||
&::-webkit-scrollbar-track-piece {
|
||||
background-color: transparent;
|
||||
}
|
||||
@ -332,7 +332,7 @@ body {
|
||||
&.pitch {
|
||||
background-color: rgba(246, 246, 246, 1);
|
||||
}
|
||||
|
||||
|
||||
// &:hover {
|
||||
// background-color: rgba(246, 246, 246, 1);
|
||||
// }
|
||||
@ -636,6 +636,8 @@ body {
|
||||
flex-wrap: wrap;
|
||||
width: 860px;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
}
|
||||
.item {
|
||||
width: 420px;
|
||||
@ -644,6 +646,8 @@ body {
|
||||
border: 1px solid rgba(242, 242, 242, 1);
|
||||
border-radius: 12px;
|
||||
margin-bottom: 20px;
|
||||
position: absolute;
|
||||
transition: all .3s;
|
||||
|
||||
.top {
|
||||
padding: 16px 10px 14px;
|
||||
@ -670,7 +674,7 @@ body {
|
||||
|
||||
.school {
|
||||
.icon {
|
||||
width: 18px;
|
||||
// width: 18px;
|
||||
height: 18px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
@ -704,7 +708,6 @@ body {
|
||||
height: 100vh;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
}
|
||||
.state-list-box {
|
||||
background-color: #ffffff;
|
||||
|
115
html/1.html
115
html/1.html
File diff suppressed because one or more lines are too long
@ -216,7 +216,7 @@
|
||||
<!-- 底部 -->
|
||||
<base-bottom ref="baseRef"></base-bottom>
|
||||
|
||||
<div class="my-project flexacenter" v-if="false">
|
||||
<div class="my-project flexacenter">
|
||||
<div class="my-box">
|
||||
<div class="head flexacenter">
|
||||
<div class="item flexcenter" :class="{'pitch': classify == 'vs'}" @click="cutClassify('vs')">
|
||||
@ -307,7 +307,7 @@
|
||||
</div>
|
||||
<div class="list-box flexflex" ref="manageListRef">
|
||||
<template v-for="(item,index) in manageList">
|
||||
<div class="item" v-if="item.ismanage == 1" :class="'item' + index">
|
||||
<div class="item" v-if="item.ismanage == 1" :class="'item' + index" :data-index="index" :style="{'top':item.top,'left': item.left}" :draggable="draggableIndex(index)" @dragstart="dragStart(index)" @dragenter.prevent="dragEnter(index)" @dragend="dragEnd">
|
||||
<div class="top flexacenter">
|
||||
<div class="info flex1">
|
||||
<div class="name">{{ item.name_zh }}</div>
|
||||
@ -587,7 +587,6 @@
|
||||
|
||||
// 我的项目的初始化
|
||||
const getMyInit = () => {
|
||||
console.log(localStorage.getItem("PMState"))
|
||||
manageHintState.value = localStorage.getItem("PMState") || false
|
||||
|
||||
getList().then(res => {
|
||||
@ -653,15 +652,89 @@
|
||||
|
||||
nextTick(() => {
|
||||
manageList.value.forEach((element, index) => {
|
||||
if (element.ismanage == 1) {
|
||||
if (element.ismanage == 1 && element.remarks) {
|
||||
const textarea = manageListRef.value.querySelector(`.item${index} textarea`)
|
||||
textarea.style.height = "auto"
|
||||
textarea.style.height = textarea.scrollHeight + "px"
|
||||
}
|
||||
})
|
||||
|
||||
nextTick(() => {
|
||||
if (manageList.value.length != 0) getAllHeight()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const getAllHeight = () => {
|
||||
const all = manageListRef.value.querySelectorAll(".item") || []
|
||||
let obj = {}
|
||||
all.forEach(element => {
|
||||
obj[element.getAttribute("data-index")] = element.offsetHeight + 20
|
||||
})
|
||||
|
||||
calculateWaterfall(obj)
|
||||
}
|
||||
|
||||
const calculateWaterfall = obj => {
|
||||
let list = manageList.value || []
|
||||
let topLeft = 0
|
||||
let topRigth = 0
|
||||
list.forEach((element, index) => {
|
||||
if (element.ismanage == 1) {
|
||||
const height = obj[index]
|
||||
let top = 0
|
||||
let side = topLeft <= topRigth ? "left" : "right"
|
||||
let left = 0
|
||||
if (side == "left") {
|
||||
top = topLeft
|
||||
topLeft += height
|
||||
} else {
|
||||
top = topRigth
|
||||
topRigth += height
|
||||
left = 440
|
||||
}
|
||||
|
||||
element["top"] = top + "px"
|
||||
element["left"] = left + "px"
|
||||
element["height"] = height
|
||||
}
|
||||
})
|
||||
manageList.value = list
|
||||
}
|
||||
let draggedIndex = ref(null)
|
||||
|
||||
const dragStart = index => {
|
||||
draggedIndex.value = index
|
||||
}
|
||||
|
||||
let timer = null
|
||||
const dragEnter = index => {
|
||||
// console.log("dragEnter", e, index)
|
||||
console.log(Date.now() )
|
||||
if (Date.now() - timer < 200) return
|
||||
if (index == draggedIndex.value) return
|
||||
timer = Date.now()
|
||||
let list = JSON.parse(JSON.stringify(manageList.value))
|
||||
const targetItem = list[draggedIndex.value]
|
||||
// console.log("targetItem", targetItem)
|
||||
const item = list[index]
|
||||
list[index] = targetItem
|
||||
list[draggedIndex.value] = item
|
||||
manageList.value = list
|
||||
|
||||
getAllHeight()
|
||||
}
|
||||
|
||||
const dragEnd = () => {
|
||||
draggedIndex.value = null
|
||||
}
|
||||
|
||||
const draggableIndex = index => {
|
||||
if (draggedIndex.value === null) return true
|
||||
else if (draggedIndex.value >= 0 && draggedIndex.value === index) return true
|
||||
else return false
|
||||
}
|
||||
|
||||
const manageEmpty = computed(() => {
|
||||
return typeList.value[typeIndex.value]["count"] == 0
|
||||
})
|
||||
@ -770,6 +843,8 @@
|
||||
remarks: target.remarks,
|
||||
}).then(res => {
|
||||
console.log("message", res.message)
|
||||
|
||||
getAllHeight()
|
||||
})
|
||||
}
|
||||
|
||||
@ -867,6 +942,11 @@
|
||||
cutTypeid,
|
||||
cutManageStateShow,
|
||||
cutManageState,
|
||||
dragStart,
|
||||
dragEnter,
|
||||
dragEnd,
|
||||
draggedIndex,
|
||||
draggableIndex,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
@ -1,9 +1,8 @@
|
||||
const projectBaseURL = "https://project.gter.net"
|
||||
|
||||
if (["localhost", "127.0.0.1"].includes(location.hostname)) {
|
||||
console.log(111)
|
||||
axios.defaults.headers = {
|
||||
// "Authorization": "e0ebd36621dc8578fdd6f177b00a8e7b",
|
||||
"Authorization": "97d1c7b2fe6dec05aaf52c0f3b9130e8",
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +10,7 @@ function $ajax(url) {
|
||||
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}
|
||||
url = url.indexOf("https://") > -1 ? url : projectBaseURL + url
|
||||
|
||||
// data["authorization"] = "e0ebd36621dc8578fdd6f177b00a8e7b"
|
||||
if (["localhost", "127.0.0.1"].includes(location.hostname)) data["authorization"] = "97d1c7b2fe6dec05aaf52c0f3b9130e8"
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
axios
|
||||
@ -37,7 +36,8 @@ function $ajax(url) {
|
||||
function $ajaxget(url, data) {
|
||||
if (!data) data = {}
|
||||
|
||||
// data["authorization"] = "e0ebd36621dc8578fdd6f177b00a8e7b"
|
||||
// data["authorization"] = "97d1c7b2fe6dec05aaf52c0f3b9130e8"
|
||||
if (["localhost", "127.0.0.1"].includes(location.hostname)) data["authorization"] = "97d1c7b2fe6dec05aaf52c0f3b9130e8"
|
||||
|
||||
url = url.indexOf("https://") > -1 ? url : projectBaseURL + url
|
||||
url += objectToQueryString(data)
|
||||
|
3
js/vue-grid-layout.umd.min.js
vendored
Normal file
3
js/vue-grid-layout.umd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user