修改样式

This commit is contained in:
xuli
2025-12-03 16:03:49 +08:00
parent e83c2bb29a
commit 804f1c6e18
15 changed files with 110 additions and 30 deletions

View File

@@ -43,8 +43,7 @@
</template>
<script setup>
import { onMounted, reactive, ref, defineExpose, watch} from "vue";
import { onMounted, reactive, ref, watch} from "vue";
const props = defineProps({
// 是否显示全部清空按钮
showClearIcon: {
@@ -178,14 +177,13 @@ const handleChange = (index, item) => {
// 失去焦点时关闭选项列表
const handleBlur = () => {
active.value = false;
active.value = false;
};
// 定义组件实例暴露的方法
defineExpose({
handleBlur
handleBlur
});
</script>
<style lang="scss" scoped>

View File

@@ -68,7 +68,7 @@
<script setup>
import { ref,onMounted } from 'vue'
import { onLoad,onHide } from '@dcloudio/uni-app';
import { onLoad,onShow,onHide } from '@dcloudio/uni-app';
import customHeader from '@/components/customHeader.vue';
import customSearch from '@/components/customSearch.vue'
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
@@ -80,6 +80,8 @@ import {querytodaytasknum} from '@/api/polling.js'
onLoad(async(opt) => {
// uni.setStorageSync('page_cache',true);
})
onShow(()=>{
try {
showLoading("加载中...")
getList();
@@ -162,6 +164,7 @@ const downOption = ref({
const downCallback = async (mescroll) => {
try {
setTimeout(async ()=>{
getTaskCount();
getList();
mescroll.resetUpScroll();
},500);

View File

@@ -23,7 +23,7 @@
:fixed="false" class="scroll-h"
>
<!-- 1 单选 2多选 3判断 4 问答 5 读卡 6 扫码 7 拍照 8 视频 9 定位暂时去掉了 -->
<view class="white-bg">
<view class="white-bg" @click="handleMulSelect">
<view class="blue-title">{{optionObj.groupName}}</view>
<view class="blue-sub-title" style="margin-bottom:20rpx;">
巡检日期<text>{{parseTime(optionObj.lastCheckTime,'{y}-{m}-{d} 星期{a}')}}</text>
@@ -49,7 +49,7 @@
<view>{{String(index+1).padStart(2, '0')+'.'}}</view>
<view>{{ item.pointName }}</view>
</view>
<multipleSelect :multiple="true" :value="item.chooseList" downInner
<multipleSelect ref="selectRef" :multiple="true" :value="item.chooseList" downInner
:options="item.optionList" @change="(...args) => changeCheck(...args, item)"
:slabel="'optionContent'" :svalue="'optionTitle'"
>
@@ -254,7 +254,6 @@ onLoad(option => {
minioObj = JSON.parse(uni.getStorageSync(MINIO_KEY) || "\{\}")
// console.log(minioObj)
})
@@ -336,17 +335,24 @@ const handleQuestion=()=>{
// radio 判断选择
const radioChange=(e,item)=>{
// console.log("radioChange=>",e,item)
let radioValue = e.detail.value;
item['resultContent']=radioValue;
console.log("222判断radioChange=>",item)
}
// 对 multipleSelect 组件的引用
const selectRef = ref(null);
// 多选组件失去焦点关闭
let handleMulSelect = () => {
if (selectRef.value){
selectRef.value.forEach(item=>{
item.handleBlur();
})
}
}
// 单选多选处理
const changeCheck = (param,param2,item) => {
// console.log("111多选changeCheck=>",param,param2)
item['resultContent'] = param2.join(",");//JSON.stringify(param);
console.log("222多选changeCheck=>",item)
item['resultContent'] = param2.join(",");
}
// 照片及拍照处理

View File

@@ -91,6 +91,20 @@
</mescroll-uni>
</view>
</view>
<!-- 弹窗提示 -->
<pollingShowModal :visible="visible"
:title="title"
:content="content"
:subContent="subContent"
:btnFlag2="btnFlag2"
:btnTxt="btnTxt"
:isGreen="isGreen"
:subTime="subTime"
@close="handleClose"
@confirm="submitConfirm"
ref="showModel"
></pollingShowModal>
</view>
</template>
<script setup>
@@ -98,11 +112,12 @@ import { ref,onMounted,nextTick,computed } from 'vue'
import { onLoad,onHide, onShow } from '@dcloudio/uni-app';
import customHeader from '@/components/customHeader.vue';
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import pollingShowModal from "@/components/pollingShowModal.vue";
import circleTemplate from '@/components/circleTemplate.vue';
import { parseTime } from '@/utils/datetime.js';
import { formatTaskStatus } from '@/utils/status.js';
import { taskDetail,submitTask } from '@/api/polling.js';
import {showAlert,showLoading,hideLoading} from '@/utils/message.js'
import {showAlert,showLoading,hideLoading} from '@/utils/message.js';
// '2025-12-29 星期五'
let taskId = ref(undefined);
@@ -351,19 +366,76 @@ const getList = (pageIndex, pageSize) => {
}
// 自定义弹窗
let title = ref('');
let content = ref('');
let visible = ref(false);
let subContent= ref('');
let subTime= ref(undefined);
let btnFlag2=ref(true)
let btnTxt=ref('')
let isGreen =ref(false);
const showModel=(str)=>{
visible.value = true;
content.value = str;
subContent.value='是否确认提交?';
btnTxt.value='提交'
btnFlag2.value=true;
isGreen.value = false;
subTime.value=undefined;
}
const showModel2=(str)=>{
content.value = str;
subContent.value='提交时间';
btnTxt.value='确定';
btnFlag2.value=false;
isGreen.value = true;
visible.value = true;
}
//关闭
const handleClose=()=>{
visible.value = false;
}
// 执行提交
const handleConfirm=()=>{
let taskItem = taskObj.value;
if(taskItem.groupFinishNum<taskItem.groupNum){
showModel('有未完成的巡检项');
}else{
let param = {
taskId:taskObj.value.taskId
}
showLoading("加载中...")
submitTask(param).then(async res=>{
showAlert("任务提交成功!");
let res2 = await getList(1, 10);
taskObj.value = res2;
}).finally(()=>{
hideLoading();
})
}
}
// 提交
const submitConfirm=()=>{
let param = {
taskId:taskObj.value.taskId
}
showLoading("加载中...")
submitTask(param).then(res=>{
submitTask(param).then( async res=>{
visible.value = false;
showAlert("任务提交成功!");
let res2 = await getList(1, 10);
taskObj.value = res2;
}).finally(()=>{
hideLoading();
})
}
// 查看详情 type 1-详情 2-问题详情
const handleDetail = (item,type) =>{
let url=''

View File

@@ -214,6 +214,7 @@ let todayCount =ref(0);
const getTaskCount= async()=>{
let res = await querytodaytasknum({});
todayCount.value = res || 0;
backBlogObj.value.count3 = res || 0;
}
// 下拉刷新