This commit is contained in:
bb_pan 2025-08-04 16:02:36 +08:00
parent 4e65fff14b
commit 93d1aebcea
3 changed files with 16 additions and 3 deletions

View File

@ -22,7 +22,7 @@
<div class="card top-content" :class="{ 'is-expanded': isExpanded }"> <div class="card top-content" :class="{ 'is-expanded': isExpanded }">
<div class="card-header"> <div class="card-header">
<div class="title"> <div class="title">
任务信息 <span style="color: #8c8c8c">已选{{ selectCodeList.length }}</span> <span class="title-line"></span> 任务信息 <span style="color: #8c8c8c">已选{{ selectCodeList.length }}</span>
</div> </div>
<button class="submit-btn" @click="submitCode"> </button> <button class="submit-btn" @click="submitCode"> </button>
<uni-icons <uni-icons
@ -1003,7 +1003,7 @@ onLoad((options) => {
position: relative; position: relative;
padding-left: 24rpx; padding-left: 24rpx;
&::before { .title-line {
content: ''; content: '';
position: absolute; position: absolute;
left: 0; left: 0;
@ -1183,7 +1183,8 @@ onLoad((options) => {
transition: max-height 0.5s ease-out; transition: max-height 0.5s ease-out;
&.is-expanded { &.is-expanded {
height: auto !important; height: 700px !important;
overflow: visible !important;
} }
} }
</style> </style>

View File

@ -174,8 +174,10 @@ const delRow = (item) => {
"maId":item.maId, "maId":item.maId,
} }
console.log(param) console.log(param)
uni.showLoading({ title: '加载中', mask: true })
deleteMaCode(param).then(res => { deleteMaCode(param).then(res => {
console.log(res) console.log(res)
uni.hideLoading()
if(res.code==200){ if(res.code==200){
uni.showToast({ title: '删除成功', icon: 'none' }) uni.showToast({ title: '删除成功', icon: 'none' })
getCodeList() getCodeList()
@ -184,6 +186,7 @@ const delRow = (item) => {
} }
}).catch(error => { }).catch(error => {
console.log(error) console.log(error)
uni.hideLoading()
}) })
} }

View File

@ -155,6 +155,7 @@ const dateArray = ref([
new Date().toISOString().split('T')[0] new Date().toISOString().split('T')[0]
]) // ]) //
const swipeRef = ref() const swipeRef = ref()
const isDel = ref(false)
// //
const signOptions = ref([ const signOptions = ref([
{ value: 0, text: "全部" }, { value: 0, text: "全部" },
@ -229,6 +230,7 @@ const options2 = ref([
// //
const onClick=(e,item,itemIndex)=> { const onClick=(e,item,itemIndex)=> {
console.log('🚀 ~ onClick ~ item:', item) console.log('🚀 ~ onClick ~ item:', item)
isDel.value = true
const { index } = e const { index } = e
console.log(index) console.log(index)
// if (index === 0) { // if (index === 0) {
@ -280,8 +282,14 @@ const onClick=(e,item,itemIndex)=> {
}else{ }else{
uni.showToast({ title: '删除失败', icon: 'none' }) uni.showToast({ title: '删除失败', icon: 'none' })
} }
setTimeout(() => {
isDel.value = false
}, 500);
}).catch(error => { }).catch(error => {
console.log(error) console.log(error)
setTimeout(() => {
isDel.value = false
}, 500);
}) })
} }
swipeRef.value[itemIndex].closeAll() swipeRef.value[itemIndex].closeAll()
@ -345,6 +353,7 @@ const goAdd = () => {
// //
const handleItem = (item) => { const handleItem = (item) => {
console.log('🚀 ~ handleItem ~ item:', item) console.log('🚀 ~ handleItem ~ item:', item)
if (isDel.value) return
uni.navigateTo({ url: `/pages/back/detail?id=${item.id}&taskId=${item.taskId}&appTaskStatus=${queryParams.value.appTaskStatus}&proId=${item.proId}&unitId=${item.unitId}` }) uni.navigateTo({ url: `/pages/back/detail?id=${item.id}&taskId=${item.taskId}&appTaskStatus=${queryParams.value.appTaskStatus}&proId=${item.proId}&unitId=${item.unitId}` })
} }
// //