一单四制优化及加入工作流
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
</view>
|
||||
<view class="flex margin-bottom">
|
||||
<view class="text-gray">创建时间:</view>
|
||||
|
||||
<view class="text-black">{{item.createdAt}}</view>
|
||||
</view>
|
||||
<view class="flex justify-between">
|
||||
@@ -27,306 +26,32 @@
|
||||
<view><button class="bg-blue round cu-btn lg" @click="editor(item)">查看详情</button></view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="cuIcon-add bg-blue round margin-top" @click="openAddPopup">新增</button>
|
||||
<!-- 弹出框 -->
|
||||
<u-popup :show="showAddPopup" mode="center" round="20" :safeAreaInsetBottom="false" @close="showAddPopup = false">
|
||||
<view class="popup-content">
|
||||
<view class="popup-header">
|
||||
<view class="popup-title text-bold">新增销号申请</view>
|
||||
<view class="popup-close" @click="showAddPopup = false">×</view>
|
||||
</view>
|
||||
<scroll-view class="popup-body" scroll-y :style="{ height: '60vh' }">
|
||||
<view class="flex margin-bottom">
|
||||
<view>隐患</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<view class="picker-input" @click="showHazardPicker = true">
|
||||
<text :class="selectedHazard ? '' : 'text-gray'">{{ selectedHazard || '请选择隐患' }}</text>
|
||||
</view>
|
||||
<up-picker
|
||||
v-if="false" :show="showHazardPicker"
|
||||
:columns="hazardColumns"
|
||||
@confirm="onHazardConfirm"
|
||||
@cancel="showHazardPicker = false"
|
||||
@close="showHazardPicker = false"
|
||||
></up-picker>
|
||||
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view>整改时限</view>
|
||||
</view>
|
||||
<view class="picker-input readonly">
|
||||
<text :class="formData.rectifyDeadline ? '' : 'text-gray'">{{ formData.rectifyDeadline || '请先选择隐患' }}</text>
|
||||
</view>
|
||||
<view class="margin-bottom margin-top">隐患治理责任单位</view>
|
||||
<view class="picker-input readonly">
|
||||
<text :class="selectedDeptName ? '' : 'text-gray'">{{ selectedDeptName || '请先选择隐患' }}</text>
|
||||
</view>
|
||||
<view class="margin-bottom margin-top">主要负责人</view>
|
||||
<view class="picker-input readonly">
|
||||
<text :class="formData.responsiblePerson ? '' : 'text-gray'">{{ formData.responsiblePerson || '请先选择隐患' }}</text>
|
||||
</view>
|
||||
<view class="ai-btn-wrapper margin-top margin-bottom">
|
||||
<button class="ai-analyze-btn" :loading="aiGenerating" :disabled="aiGenerating" @click="handleAiGenerate">
|
||||
<text v-if="!aiGenerating" class="cuIcon-magic ai-btn-icon"></text>
|
||||
{{ aiGenerating ? 'AI生成中...' : 'AI 生成销号方案' }}
|
||||
</button>
|
||||
</view>
|
||||
<view class="margin-bottom margin-top">主要治理内容</view>
|
||||
<up-textarea v-model="formData.mainTreatmentContent" placeholder="请输入主要治理内容"></up-textarea>
|
||||
<view class="margin-bottom margin-top">隐患治理完成内容</view>
|
||||
<up-textarea v-model="formData.treatmentResult" placeholder="请输入隐患治理完成情况"></up-textarea>
|
||||
<view class="margin-bottom margin-top">隐患治理责任单位自行验收的情况</view>
|
||||
<up-textarea v-model="formData.selfVerifyContent" placeholder="请输入隐患治理责任单位自行验收的情况"></up-textarea>
|
||||
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">下一步流程</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<view class="static-field">隐患销号审批</view>
|
||||
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">下一步处理人</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<view class="static-field">部门、企业管理员</view>
|
||||
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">短信提醒</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<up-radio-group v-model="sendMsgFlagRadio" placement="row" activeColor="#2667e9">
|
||||
<up-radio
|
||||
label="是"
|
||||
name="yes"
|
||||
:customStyle="{ marginRight: '48rpx' }"
|
||||
></up-radio>
|
||||
<up-radio label="否" name="no"></up-radio>
|
||||
</up-radio-group>
|
||||
</scroll-view>
|
||||
<view class="popup-footer">
|
||||
<button class="btn-cancel" @click="showAddPopup = false">取消</button>
|
||||
<button class="btn-confirm bg-blue" @click="handleAdd">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 移出到外层的选择器组件,防止其定位样式被 scroll-view 剪裁并导致暗色遮罩溢出异常 -->
|
||||
<up-picker
|
||||
:show="showHazardPicker"
|
||||
:columns="hazardColumns"
|
||||
@confirm="onHazardConfirm"
|
||||
@cancel="showHazardPicker = false"
|
||||
@close="showHazardPicker = false"
|
||||
></up-picker>
|
||||
|
||||
<button class="cuIcon-add bg-blue round margin-top" @click="goAddApply">新增</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { getMyWriteOffList, applyDelete, getAcceptanceList, getHiddenDangerDetail, getRectifyDetail, generateWriteoffContent } from '@/request/api.js';
|
||||
import { ref } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { getMyWriteOffList } from '@/request/api.js';
|
||||
|
||||
// 弹窗控制
|
||||
const showAddPopup = ref(false);
|
||||
const showHazardPicker = ref(false);
|
||||
|
||||
// 隐患选择
|
||||
const selectedHazard = ref('');
|
||||
const selectedHazardId = ref('');
|
||||
const hazardColumns = ref([['暂无数据']]);
|
||||
const acceptanceHazardList = ref([]); // 存储可申请销号的隐患数据
|
||||
const hazardList = ref([]); // 存储销号申请列表
|
||||
|
||||
// 隐患关联的只读展示字段
|
||||
const selectedDeptName = ref('');
|
||||
|
||||
// AI生成状态
|
||||
const aiGenerating = ref(false);
|
||||
const hazardList = ref([]);
|
||||
|
||||
// 短信提醒
|
||||
const sendMsgFlagRadio = ref('yes');
|
||||
const sendMsgFlag = computed(() => sendMsgFlagRadio.value === 'yes');
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
rectifyDeadline: '', // 整改时限
|
||||
responsibleDeptId: '', // 隐患治理责任单位ID
|
||||
responsiblePerson: '', // 主要负责人
|
||||
mainTreatmentContent: '', // 主要治理内容
|
||||
treatmentResult: '', // 隐患治理完成内容
|
||||
selfVerifyContent: '' // 责任单位自行验收情况
|
||||
});
|
||||
|
||||
// 获取销号申请列表(页面显示用)
|
||||
const fetchWriteOffList = async () => {
|
||||
try {
|
||||
const res = await getMyWriteOffList();
|
||||
if (res.code === 0 && res.data) {
|
||||
hazardList.value = res.data;
|
||||
console.log('销号申请列表:', res.data);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取销号申请列表失败:', error);
|
||||
}
|
||||
};
|
||||
|
||||
// 获取可申请销号的隐患列表(弹窗选择用)
|
||||
const fetchAcceptanceList = async () => {
|
||||
try {
|
||||
const res = await getAcceptanceList();
|
||||
if (res.code === 0 && res.data) {
|
||||
const list = res.data.records || res.data || [];
|
||||
acceptanceHazardList.value = list;
|
||||
// 转换为 picker 需要的格式
|
||||
if (list.length > 0) {
|
||||
hazardColumns.value = [list.map(item => item.title || item.hazardTitle || `隐患${item.hazardId}`)];
|
||||
} else {
|
||||
hazardColumns.value = [['暂无可申请销号的隐患']];
|
||||
}
|
||||
console.log('可申请销号的隐患列表:', list);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取可申请销号隐患列表失败:', error);
|
||||
}
|
||||
|
||||
const goAddApply = () => {
|
||||
uni.navigateTo({ url: '/pages/closeout/apply' });
|
||||
};
|
||||
|
||||
// 打开新增弹窗
|
||||
const openAddPopup = () => {
|
||||
resetForm();
|
||||
fetchAcceptanceList(); // 获取可申请销号的隐患列表
|
||||
showAddPopup.value = true;
|
||||
};
|
||||
|
||||
// 根据选中的隐患回显只读字段
|
||||
const fillHazardRelatedFields = (hazard) => {
|
||||
formData.rectifyDeadline = hazard.deadline || '';
|
||||
selectedDeptName.value = hazard.deptName || '';
|
||||
formData.responsiblePerson = hazard.rectifierName || '';
|
||||
formData.responsibleDeptId = hazard.deptId || '';
|
||||
};
|
||||
|
||||
// 隐患选择确认
|
||||
const onHazardConfirm = (e) => {
|
||||
console.log('选择的隐患:', e);
|
||||
if (e.value && e.value.length > 0) {
|
||||
selectedHazard.value = e.value[0];
|
||||
const index = e.indexs[0];
|
||||
const hazard = acceptanceHazardList.value[index];
|
||||
if (hazard) {
|
||||
selectedHazardId.value = hazard.hazardId;
|
||||
fillHazardRelatedFields(hazard);
|
||||
}
|
||||
}
|
||||
showHazardPicker.value = false;
|
||||
};
|
||||
|
||||
// 重置表单
|
||||
const resetForm = () => {
|
||||
selectedHazard.value = '';
|
||||
selectedHazardId.value = '';
|
||||
selectedDeptName.value = '';
|
||||
formData.rectifyDeadline = '';
|
||||
formData.responsibleDeptId = '';
|
||||
formData.responsiblePerson = '';
|
||||
formData.mainTreatmentContent = '';
|
||||
formData.treatmentResult = '';
|
||||
formData.selfVerifyContent = '';
|
||||
sendMsgFlagRadio.value = 'yes';
|
||||
};
|
||||
|
||||
// AI生成销号方案
|
||||
const handleAiGenerate = async () => {
|
||||
if (!selectedHazardId.value) {
|
||||
uni.showToast({ title: '请先选择隐患', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
aiGenerating.value = true;
|
||||
try {
|
||||
// 1. 获取隐患详情
|
||||
const hazardRes = await getHiddenDangerDetail({ hazardId: selectedHazardId.value });
|
||||
if (hazardRes.code !== 0 || !hazardRes.data) {
|
||||
uni.showToast({ title: '获取隐患详情失败', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 从 assigns 中获取 rectifyId
|
||||
const assigns = hazardRes.data.assigns;
|
||||
if (!assigns || assigns.length === 0 || !assigns[0].rectify) {
|
||||
uni.showToast({ title: '该隐患暂无整改记录', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
const rectifyId = assigns[0].rectify.rectifyId;
|
||||
|
||||
// 3. 获取整改详情
|
||||
const rectifyRes = await getRectifyDetail({ rectifyId });
|
||||
if (rectifyRes.code !== 0 || !rectifyRes.data) {
|
||||
uni.showToast({ title: '获取整改详情失败', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const rectifyPlan = rectifyRes.data.rectifyPlan;
|
||||
if (!rectifyPlan) {
|
||||
uni.showToast({ title: '整改方案内容为空', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
// 4. 调用AI生成销号方案
|
||||
const aiRes = await generateWriteoffContent({ rectifyContent: rectifyPlan });
|
||||
if (aiRes.code === 0 && aiRes.data) {
|
||||
formData.mainTreatmentContent = aiRes.data.mainContent || '';
|
||||
formData.treatmentResult = aiRes.data.completionContent || '';
|
||||
formData.selfVerifyContent = aiRes.data.selfInspection || '';
|
||||
uni.showToast({ title: 'AI生成成功', icon: 'success' });
|
||||
} else {
|
||||
uni.showToast({ title: aiRes.msg || 'AI生成失败', icon: 'none' });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('AI生成销号方案失败:', error);
|
||||
uni.showToast({ title: 'AI生成失败,请重试', icon: 'none' });
|
||||
} finally {
|
||||
aiGenerating.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 确定新增
|
||||
const handleAdd = async () => {
|
||||
if (!selectedHazardId.value) {
|
||||
uni.showToast({ title: '请选择隐患', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
// 构建请求参数(与接口文档对应)
|
||||
const params = {
|
||||
hazardId: Number(selectedHazardId.value), // 隐患ID(必需)
|
||||
rectifyDeadline: formData.rectifyDeadline || '', // 整改时限
|
||||
responsibleDeptId: Number(formData.responsibleDeptId) || 0, // 隐患治理责任单位ID
|
||||
responsiblePerson: formData.responsiblePerson || '', // 主要负责人
|
||||
mainTreatmentContent: formData.mainTreatmentContent || '', // 主要治理内容
|
||||
treatmentResult: formData.treatmentResult || '', // 隐患治理完成内容
|
||||
selfVerifyContent: formData.selfVerifyContent || '', // 责任单位自行验收情况
|
||||
sendMsgFlag: sendMsgFlag.value // 是否短信提醒
|
||||
};
|
||||
|
||||
console.log('提交数据:', params);
|
||||
|
||||
try {
|
||||
const res = await applyDelete(params);
|
||||
if (res.code === 0) {
|
||||
uni.showToast({ title: '申请成功', icon: 'success' });
|
||||
showAddPopup.value = false;
|
||||
resetForm();
|
||||
// 刷新销号申请列表
|
||||
fetchWriteOffList();
|
||||
} else {
|
||||
uni.showToast({ title: res.msg || '申请失败', icon: 'none' });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('申请失败:', error);
|
||||
uni.showToast({ title: '请求失败', icon: 'none' });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const editor = (item) => {
|
||||
if (!item?.id) {
|
||||
uni.showToast({ title: '缺少申请ID', icon: 'none' });
|
||||
@@ -336,8 +61,7 @@
|
||||
url: `/pages/closeout/editor?applyId=${item.id}`
|
||||
});
|
||||
};
|
||||
|
||||
// 根据审核状态返回对应样式类
|
||||
|
||||
const getStatusClass = (item) => {
|
||||
const statusName = item?.verifyResultName || '';
|
||||
if (statusName === '待审核') return 'status-pending';
|
||||
@@ -348,9 +72,8 @@
|
||||
if (item?.verifyResult === 2) return 'status-rejected';
|
||||
return 'status-default';
|
||||
};
|
||||
|
||||
// 页面加载时获取销号申请列表
|
||||
onMounted(() => {
|
||||
|
||||
onShow(() => {
|
||||
fetchWriteOffList();
|
||||
});
|
||||
</script>
|
||||
@@ -397,120 +120,4 @@
|
||||
background: #F5F5F5;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
width: 600rpx;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
|
||||
.popup-title {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.popup-close {
|
||||
font-size: 40rpx;
|
||||
color: #999;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-body {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.popup-footer {
|
||||
display: flex;
|
||||
border-top: 1rpx solid #eee;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 0;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
font-size: 30rpx;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-cancel {
|
||||
background: #fff;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.btn-confirm {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.ai-btn-wrapper {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.ai-analyze-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 72rpx;
|
||||
padding: 0 32rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, #4facfe 0%, #2668EA 100%);
|
||||
border-radius: 36rpx;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ai-btn-icon {
|
||||
margin-right: 8rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.picker-input {
|
||||
background: #fff;
|
||||
border-radius: 8rpx;
|
||||
padding: 24rpx 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border: 1rpx solid #eee;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
&.readonly {
|
||||
background: #f5f5f5;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.static-field {
|
||||
background: #fff;
|
||||
border: 1rpx solid #dcdfe6;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
778
pages/closeout/apply.vue
Normal file
778
pages/closeout/apply.vue
Normal file
@@ -0,0 +1,778 @@
|
||||
<template>
|
||||
<view class="padding page">
|
||||
<view class="padding bg-white radius">
|
||||
<view class="flex margin-bottom">
|
||||
<view>隐患</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<view class="picker-input readonly" v-if="hazardLocked">
|
||||
<text :class="selectedHazard ? '' : 'text-gray'">{{ selectedHazard || '加载中...' }}</text>
|
||||
</view>
|
||||
<view class="picker-input" v-else @click="showHazardPicker = true">
|
||||
<text :class="selectedHazard ? '' : 'text-gray'">{{ selectedHazard || '请选择隐患' }}</text>
|
||||
</view>
|
||||
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view>整改时限</view>
|
||||
</view>
|
||||
<view class="picker-input readonly">
|
||||
<text :class="formData.rectifyDeadline ? '' : 'text-gray'">{{ formData.rectifyDeadline || '请先选择隐患' }}</text>
|
||||
</view>
|
||||
|
||||
<view class="margin-bottom margin-top">隐患治理责任单位</view>
|
||||
<view class="picker-input readonly">
|
||||
<text :class="selectedDeptName ? '' : 'text-gray'">{{ selectedDeptName || '请先选择隐患' }}</text>
|
||||
</view>
|
||||
|
||||
<view class="margin-bottom margin-top">主要负责人</view>
|
||||
<view class="picker-input readonly">
|
||||
<text :class="formData.responsiblePerson ? '' : 'text-gray'">{{ formData.responsiblePerson || '请先选择隐患' }}</text>
|
||||
</view>
|
||||
|
||||
<view class="ai-btn-wrapper margin-top margin-bottom">
|
||||
<button class="ai-analyze-btn" :loading="aiGenerating" :disabled="aiGenerating" @click="handleAiGenerate">
|
||||
<text v-if="!aiGenerating" class="cuIcon-magic ai-btn-icon"></text>
|
||||
{{ aiGenerating ? 'AI生成中...' : 'AI 生成销号方案' }}
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="margin-bottom margin-top">主要治理内容</view>
|
||||
<up-textarea v-model="formData.mainTreatmentContent" placeholder="请输入主要治理内容"></up-textarea>
|
||||
|
||||
<view class="margin-bottom margin-top">隐患治理完成内容</view>
|
||||
<up-textarea v-model="formData.treatmentResult" placeholder="请输入隐患治理完成情况"></up-textarea>
|
||||
|
||||
<view class="margin-bottom margin-top">隐患治理责任单位自行验收的情况</view>
|
||||
<up-textarea v-model="formData.selfVerifyContent" placeholder="请输入隐患治理责任单位自行验收的情况"></up-textarea>
|
||||
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">下一步流程</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<view class="static-field">{{ nextStepDisplay }}</view>
|
||||
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">下一步处理人</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<view class="select-trigger" @click="openAssigneePopup">
|
||||
<view class="select-content" :class="{ 'text-gray': !selectedAssigneeName }">
|
||||
{{ selectedAssigneeName || '请选择下一步处理人' }}
|
||||
</view>
|
||||
<text class="cuIcon-unfold"></text>
|
||||
</view>
|
||||
|
||||
<view class="flex margin-bottom margin-top">
|
||||
<view class="text-gray">短信提醒</view>
|
||||
<view class="text-red">*</view>
|
||||
</view>
|
||||
<up-radio-group v-model="sendMsgFlagRadio" placement="row" activeColor="#2667e9">
|
||||
<up-radio
|
||||
label="是"
|
||||
name="yes"
|
||||
:customStyle="{ marginRight: '48rpx' }"
|
||||
></up-radio>
|
||||
<up-radio label="否" name="no"></up-radio>
|
||||
</up-radio-group>
|
||||
|
||||
<view class="flex margin-top-xl" style="gap: 20rpx;">
|
||||
<button class="round flex-sub" @click="handleCancel">取消</button>
|
||||
<button class="bg-blue round flex-sub" @click="handleSubmit">提交申请</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<up-picker
|
||||
v-if="!hazardLocked"
|
||||
:show="showHazardPicker"
|
||||
:columns="hazardColumns"
|
||||
@confirm="onHazardConfirm"
|
||||
@cancel="showHazardPicker = false"
|
||||
@close="showHazardPicker = false"
|
||||
></up-picker>
|
||||
|
||||
<u-popup :show="showAssigneePopup" mode="bottom" round="20" @close="cancelAssigneeSelect">
|
||||
<view class="user-popup">
|
||||
<view class="popup-header">
|
||||
<view class="popup-title text-bold">选择下一步处理人</view>
|
||||
<view class="popup-close" @click="cancelAssigneeSelect">×</view>
|
||||
</view>
|
||||
<scroll-view class="user-list-scroll" scroll-y>
|
||||
<view v-if="assigneeLoading" class="empty-tip">加载中...</view>
|
||||
<view v-else-if="assigneeList.length === 0" class="empty-tip">暂无人员数据</view>
|
||||
<template v-else>
|
||||
<view
|
||||
v-for="user in assigneeList"
|
||||
:key="getAssigneeItemKey(user)"
|
||||
class="user-item"
|
||||
:class="{ active: String(pickerAssigneeIdentityId) === String(resolveAssigneeIdentityId(user)) }"
|
||||
@click="onAssigneeItemClick(user)"
|
||||
>
|
||||
<text class="user-item-text">{{ formatAssigneeDisplayName(user) }}</text>
|
||||
<text v-if="String(pickerAssigneeIdentityId) === String(resolveAssigneeIdentityId(user))" class="cuIcon-check text-blue"></text>
|
||||
</view>
|
||||
</template>
|
||||
</scroll-view>
|
||||
<view class="popup-footer">
|
||||
<button class="btn-cancel" @click="cancelAssigneeSelect">取消</button>
|
||||
<button class="btn-confirm bg-blue" @click="confirmAssigneeSelect">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import {
|
||||
applyDelete,
|
||||
getHiddenDangerDetail,
|
||||
getHiddenDangerList,
|
||||
getRectifyDetail,
|
||||
generateWriteoffContent,
|
||||
getFlowNextNodes,
|
||||
getDeptUsers
|
||||
} from '@/request/api.js';
|
||||
import { buildWriteoffHazardFromOptions } from '@/utils/hazardNav.js';
|
||||
|
||||
const showHazardPicker = ref(false);
|
||||
const hazardLocked = ref(false);
|
||||
const selectedHazard = ref('');
|
||||
const selectedHazardId = ref('');
|
||||
const assignId = ref('');
|
||||
const taskId = ref('');
|
||||
const hazardColumns = ref([['暂无数据']]);
|
||||
const selectableHazardList = ref([]);
|
||||
const selectedDeptName = ref('');
|
||||
const aiGenerating = ref(false);
|
||||
const sendMsgFlagRadio = ref('yes');
|
||||
const sendMsgFlag = computed(() => sendMsgFlagRadio.value === 'yes');
|
||||
|
||||
const nextStepName = ref('');
|
||||
const nextStepLoading = ref(false);
|
||||
const nextStepDisplay = computed(() => {
|
||||
if (nextStepLoading.value) return '加载中...';
|
||||
return nextStepName.value || '暂无下一步流程';
|
||||
});
|
||||
|
||||
const selectedAssigneeIdentityId = ref('');
|
||||
const selectedAssigneeName = ref('');
|
||||
const pickerAssigneeIdentityId = ref('');
|
||||
const pickerAssigneeName = ref('');
|
||||
const showAssigneePopup = ref(false);
|
||||
const assigneeList = ref([]);
|
||||
const assigneeLoading = ref(false);
|
||||
|
||||
const formData = reactive({
|
||||
rectifyDeadline: '',
|
||||
responsibleDeptId: '',
|
||||
responsiblePerson: '',
|
||||
mainTreatmentContent: '',
|
||||
treatmentResult: '',
|
||||
selfVerifyContent: ''
|
||||
});
|
||||
|
||||
const findHazardInList = (hazardId) => {
|
||||
return selectableHazardList.value.find(
|
||||
(item) => String(item.hazardId) === String(hazardId) || String(item.id) === String(hazardId)
|
||||
);
|
||||
};
|
||||
|
||||
const fillHazardRelatedFields = (hazard) => {
|
||||
formData.rectifyDeadline = hazard.deadline || '';
|
||||
selectedDeptName.value = hazard.deptName || '';
|
||||
formData.responsiblePerson = hazard.rectifierName || '';
|
||||
formData.responsibleDeptId = hazard.deptId || '';
|
||||
};
|
||||
|
||||
const resolveTaskIdFromHazard = (hazard) => {
|
||||
if (!hazard) return '';
|
||||
const candidates = [
|
||||
hazard.taskId,
|
||||
hazard.flowTaskId,
|
||||
hazard.currentTaskId,
|
||||
hazard.flowTask?.taskId,
|
||||
hazard.currentTask?.taskId
|
||||
];
|
||||
for (const id of candidates) {
|
||||
if (id != null && id !== '') return String(id);
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
const resolveTaskIdFromAssign = (assign) => {
|
||||
if (!assign) return '';
|
||||
const candidates = [
|
||||
assign.taskId,
|
||||
assign.flowTaskId,
|
||||
assign.currentTaskId,
|
||||
assign.rectify?.taskId,
|
||||
assign.rectify?.flowTaskId,
|
||||
assign.rectify?.currentTaskId,
|
||||
assign.flow?.taskId,
|
||||
assign.currentTask?.taskId
|
||||
];
|
||||
for (const id of candidates) {
|
||||
if (id != null && id !== '') return String(id);
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
const resolveAssignWithRectify = (assigns, currentAssignId) => {
|
||||
if (!assigns?.length) return null;
|
||||
if (currentAssignId) {
|
||||
const byAssignId = assigns.find(
|
||||
(item) => String(item.assignId) === String(currentAssignId) && item.rectify
|
||||
);
|
||||
if (byAssignId) return byAssignId;
|
||||
}
|
||||
return assigns.find((item) => item.rectify) || assigns[0] || null;
|
||||
};
|
||||
|
||||
const resolveTaskIdFromDetail = (data) => {
|
||||
if (!data) return '';
|
||||
if (data.taskId) return String(data.taskId);
|
||||
if (data.flowTaskId) return String(data.flowTaskId);
|
||||
if (data.currentTaskId) return String(data.currentTaskId);
|
||||
|
||||
const assigns = data.assigns || [];
|
||||
const matchedAssign = resolveAssignWithRectify(assigns, assignId.value);
|
||||
const fromMatched = resolveTaskIdFromAssign(matchedAssign);
|
||||
if (fromMatched) return fromMatched;
|
||||
|
||||
for (const assign of assigns) {
|
||||
const id = resolveTaskIdFromAssign(assign);
|
||||
if (id) return id;
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
const resolveNextTaskName = (data) => {
|
||||
if (!data) return '';
|
||||
const branches = data.branches || [];
|
||||
const matchedBranch = branches.find((item) => item.matched) || branches[0];
|
||||
return matchedBranch?.nextNode?.taskName || '';
|
||||
};
|
||||
|
||||
const buildPreviewVariables = () => ({
|
||||
quickApprove: true
|
||||
});
|
||||
|
||||
const getStoredUserInfo = () => {
|
||||
try {
|
||||
const stored = uni.getStorageSync('userInfo');
|
||||
if (!stored) return {};
|
||||
return typeof stored === 'string' ? JSON.parse(stored) : stored;
|
||||
} catch (error) {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
const getCurrentDeptId = () => {
|
||||
const userInfo = getStoredUserInfo();
|
||||
const identity = userInfo.userIdentity;
|
||||
if (identity?.deptId != null && identity.deptId !== '') {
|
||||
return String(identity.deptId);
|
||||
}
|
||||
if (userInfo.deptId != null && userInfo.deptId !== '') {
|
||||
return String(userInfo.deptId);
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
const resolveAssigneeIdentityId = (user) => {
|
||||
if (!user) return '';
|
||||
const id = user.identityId ?? user.userIdentityId ?? user.userId ?? '';
|
||||
return id === '' || id == null ? '' : String(id);
|
||||
};
|
||||
|
||||
const getAssigneeItemKey = (user) => {
|
||||
const identityId = resolveAssigneeIdentityId(user);
|
||||
if (identityId) return `identity-${identityId}`;
|
||||
return `user-${user.userId || user.nickName || ''}`;
|
||||
};
|
||||
|
||||
const formatAssigneeDisplayName = (user) => {
|
||||
if (!user) return '';
|
||||
const name = user.nickName || user.userName || user.name || '';
|
||||
const identityName = user.identityName || '';
|
||||
if (name && identityName) return `${name}(${identityName})`;
|
||||
return name || identityName || '未知人员';
|
||||
};
|
||||
|
||||
const resolveAssigneeDeptUserType = () => 2;
|
||||
|
||||
const fetchAssigneeList = async () => {
|
||||
const deptId = getCurrentDeptId();
|
||||
if (!deptId) {
|
||||
assigneeList.value = [];
|
||||
return;
|
||||
}
|
||||
assigneeLoading.value = true;
|
||||
try {
|
||||
const res = await getDeptUsers(deptId, { type: resolveAssigneeDeptUserType() });
|
||||
if (res.code === 0) {
|
||||
assigneeList.value = res.data || [];
|
||||
} else {
|
||||
assigneeList.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取部门人员失败:', error);
|
||||
assigneeList.value = [];
|
||||
} finally {
|
||||
assigneeLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const openAssigneePopup = async () => {
|
||||
pickerAssigneeIdentityId.value = selectedAssigneeIdentityId.value;
|
||||
pickerAssigneeName.value = selectedAssigneeName.value;
|
||||
showAssigneePopup.value = true;
|
||||
await fetchAssigneeList();
|
||||
};
|
||||
|
||||
const onAssigneeItemClick = (user) => {
|
||||
const identityId = resolveAssigneeIdentityId(user);
|
||||
if (!identityId) return;
|
||||
pickerAssigneeIdentityId.value = String(identityId);
|
||||
pickerAssigneeName.value = formatAssigneeDisplayName(user);
|
||||
};
|
||||
|
||||
const confirmAssigneeSelect = () => {
|
||||
if (!pickerAssigneeIdentityId.value) {
|
||||
uni.showToast({ title: '请选择下一步处理人', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
selectedAssigneeIdentityId.value = pickerAssigneeIdentityId.value;
|
||||
selectedAssigneeName.value = pickerAssigneeName.value;
|
||||
showAssigneePopup.value = false;
|
||||
};
|
||||
|
||||
const cancelAssigneeSelect = () => {
|
||||
showAssigneePopup.value = false;
|
||||
};
|
||||
|
||||
const fetchNextStep = async () => {
|
||||
nextStepLoading.value = true;
|
||||
try {
|
||||
const currentTaskId = taskId.value;
|
||||
if (!currentTaskId) {
|
||||
nextStepName.value = '';
|
||||
return;
|
||||
}
|
||||
const res = await getFlowNextNodes({
|
||||
taskId: currentTaskId,
|
||||
previewVariables: buildPreviewVariables(),
|
||||
includeSubProcess: true
|
||||
});
|
||||
if (res.code === 0) {
|
||||
const payload = res.data && typeof res.data === 'object' ? res.data : res;
|
||||
nextStepName.value = resolveNextTaskName(payload);
|
||||
} else {
|
||||
nextStepName.value = '';
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取下一步流程失败:', error);
|
||||
nextStepName.value = '';
|
||||
} finally {
|
||||
nextStepLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const resolveTaskIdForHazard = async (hazard) => {
|
||||
const presetTaskId = taskId.value;
|
||||
const fromHazard = resolveTaskIdFromHazard(hazard);
|
||||
if (fromHazard) {
|
||||
taskId.value = fromHazard;
|
||||
}
|
||||
|
||||
if (!hazard?.hazardId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!assignId.value && hazard.assignId) {
|
||||
assignId.value = String(hazard.assignId);
|
||||
}
|
||||
|
||||
if (taskId.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const params = { hazardId: hazard.hazardId };
|
||||
if (assignId.value) {
|
||||
params.assignId = assignId.value;
|
||||
}
|
||||
const res = await getHiddenDangerDetail(params);
|
||||
if (res.code === 0 && res.data) {
|
||||
taskId.value = resolveTaskIdFromDetail(res.data) || presetTaskId;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取隐患任务信息失败:', error);
|
||||
}
|
||||
|
||||
if (!taskId.value && presetTaskId) {
|
||||
taskId.value = presetTaskId;
|
||||
}
|
||||
};
|
||||
|
||||
const resetFlowSelection = () => {
|
||||
selectedAssigneeIdentityId.value = '';
|
||||
selectedAssigneeName.value = '';
|
||||
nextStepName.value = '';
|
||||
};
|
||||
|
||||
const applySelectedHazard = async (hazard) => {
|
||||
if (!hazard) return;
|
||||
selectedHazard.value = hazard.title || hazard.hazardTitle || `隐患${hazard.hazardId}`;
|
||||
selectedHazardId.value = hazard.hazardId;
|
||||
assignId.value = hazard.assignId ? String(hazard.assignId) : '';
|
||||
if (hazard.taskId) {
|
||||
taskId.value = String(hazard.taskId);
|
||||
}
|
||||
fillHazardRelatedFields(hazard);
|
||||
resetFlowSelection();
|
||||
await resolveTaskIdForHazard(hazard);
|
||||
await fetchNextStep();
|
||||
};
|
||||
|
||||
const resolveSelectableRecords = (data) => {
|
||||
if (!data) return [];
|
||||
if (Array.isArray(data)) return data;
|
||||
if (Array.isArray(data.records)) return data.records;
|
||||
return [];
|
||||
};
|
||||
|
||||
const canApplyWriteoff = (item) => (
|
||||
item?.statusName === '待销号' && (item?.applyFlag === true || item?.applyFlag === 1 || item?.applyFlag === '1')
|
||||
);
|
||||
|
||||
/** 非锁定入口:从隐患列表拉取可申请销号的隐患(替代 verified/list) */
|
||||
const fetchSelectableHazardList = async () => {
|
||||
try {
|
||||
const res = await getHiddenDangerList({ pageNum: 1, pageSize: 100, status: 4 });
|
||||
if (res.code === 0 && res.data) {
|
||||
const list = resolveSelectableRecords(res.data).filter(canApplyWriteoff);
|
||||
selectableHazardList.value = list;
|
||||
if (list.length > 0) {
|
||||
hazardColumns.value = [list.map((item) => item.title || item.hazardTitle || `隐患${item.hazardId}`)];
|
||||
} else {
|
||||
hazardColumns.value = [['暂无可申请销号的隐患']];
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取可申请销号隐患列表失败:', error);
|
||||
}
|
||||
};
|
||||
|
||||
const preselectHazardById = async (hazardId) => {
|
||||
const hazard = findHazardInList(hazardId);
|
||||
if (!hazard) return false;
|
||||
await applySelectedHazard(hazard);
|
||||
return true;
|
||||
};
|
||||
|
||||
const onHazardConfirm = async (e) => {
|
||||
if (e.value && e.value.length > 0) {
|
||||
const index = e.indexs[0];
|
||||
const hazard = selectableHazardList.value[index];
|
||||
if (hazard) {
|
||||
await applySelectedHazard(hazard);
|
||||
}
|
||||
}
|
||||
showHazardPicker.value = false;
|
||||
};
|
||||
|
||||
const handleAiGenerate = async () => {
|
||||
if (!selectedHazardId.value) {
|
||||
uni.showToast({ title: '请先选择隐患', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
aiGenerating.value = true;
|
||||
try {
|
||||
const hazardRes = await getHiddenDangerDetail({ hazardId: selectedHazardId.value });
|
||||
if (hazardRes.code !== 0 || !hazardRes.data) {
|
||||
uni.showToast({ title: '获取隐患详情失败', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const assigns = hazardRes.data.assigns;
|
||||
if (!assigns || assigns.length === 0 || !assigns[0].rectify) {
|
||||
uni.showToast({ title: '该隐患暂无整改记录', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
const rectifyId = assigns[0].rectify.rectifyId;
|
||||
|
||||
const rectifyRes = await getRectifyDetail({ rectifyId });
|
||||
if (rectifyRes.code !== 0 || !rectifyRes.data) {
|
||||
uni.showToast({ title: '获取整改详情失败', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const rectifyPlan = rectifyRes.data.rectifyPlan;
|
||||
if (!rectifyPlan) {
|
||||
uni.showToast({ title: '整改方案内容为空', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const aiRes = await generateWriteoffContent({ rectifyContent: rectifyPlan });
|
||||
if (aiRes.code === 0 && aiRes.data) {
|
||||
formData.mainTreatmentContent = aiRes.data.mainContent || '';
|
||||
formData.treatmentResult = aiRes.data.completionContent || '';
|
||||
formData.selfVerifyContent = aiRes.data.selfInspection || '';
|
||||
uni.showToast({ title: 'AI生成成功', icon: 'success' });
|
||||
} else {
|
||||
uni.showToast({ title: aiRes.msg || 'AI生成失败', icon: 'none' });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('AI生成销号方案失败:', error);
|
||||
uni.showToast({ title: 'AI生成失败,请重试', icon: 'none' });
|
||||
} finally {
|
||||
aiGenerating.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
const handleSubmit = async () => {
|
||||
if (!selectedHazardId.value) {
|
||||
uni.showToast({ title: '请选择隐患', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!selectedAssigneeIdentityId.value) {
|
||||
uni.showToast({ title: '请选择下一步处理人', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
const params = {
|
||||
hazardId: Number(selectedHazardId.value),
|
||||
rectifyDeadline: formData.rectifyDeadline || '',
|
||||
responsibleDeptId: Number(formData.responsibleDeptId) || 0,
|
||||
responsiblePerson: formData.responsiblePerson || '',
|
||||
mainTreatmentContent: formData.mainTreatmentContent || '',
|
||||
treatmentResult: formData.treatmentResult || '',
|
||||
selfVerifyContent: formData.selfVerifyContent || '',
|
||||
assigneeIdentityId: selectedAssigneeIdentityId.value,
|
||||
sendMsgFlag: sendMsgFlag.value
|
||||
};
|
||||
|
||||
try {
|
||||
const res = await applyDelete(params);
|
||||
if (res.code === 0) {
|
||||
uni.showToast({ title: '申请成功', icon: 'success' });
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
} else {
|
||||
uni.showToast({ title: res.msg || '申请失败', icon: 'none' });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('申请失败:', error);
|
||||
uni.showToast({ title: '请求失败', icon: 'none' });
|
||||
}
|
||||
};
|
||||
|
||||
onLoad(async (options) => {
|
||||
hazardLocked.value = options?.locked === '1';
|
||||
if (options?.assignId) {
|
||||
assignId.value = String(options.assignId);
|
||||
}
|
||||
if (options?.taskId) {
|
||||
taskId.value = String(options.taskId);
|
||||
}
|
||||
|
||||
const hazardFromOptions = buildWriteoffHazardFromOptions(options);
|
||||
if (hazardFromOptions?.hazardId) {
|
||||
await applySelectedHazard(hazardFromOptions);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hazardLocked.value) {
|
||||
await fetchSelectableHazardList();
|
||||
}
|
||||
|
||||
if (taskId.value) {
|
||||
await fetchNextStep();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
background: #EBF2FC;
|
||||
}
|
||||
|
||||
.ai-btn-wrapper {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.ai-analyze-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 72rpx;
|
||||
padding: 0 32rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, #4facfe 0%, #2668EA 100%);
|
||||
border-radius: 36rpx;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ai-btn-icon {
|
||||
margin-right: 8rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.picker-input {
|
||||
background: #fff;
|
||||
border-radius: 8rpx;
|
||||
padding: 24rpx 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border: 1rpx solid #eee;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
&.readonly {
|
||||
background: #f5f5f5;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.static-field {
|
||||
background: #fff;
|
||||
border: 1rpx solid #dcdfe6;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.select-trigger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
border: 1rpx solid #dcdfe6;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.select-content {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.user-popup {
|
||||
background: #fff;
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
|
||||
.popup-title {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.popup-close {
|
||||
font-size: 40rpx;
|
||||
color: #999;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.user-list-scroll {
|
||||
max-height: 600rpx;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.empty-tip {
|
||||
padding: 80rpx 20rpx;
|
||||
text-align: center;
|
||||
color: #909399;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.user-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&.active {
|
||||
.user-item-text {
|
||||
color: #2667E9;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.user-item-text {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-footer {
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
padding: 24rpx 30rpx;
|
||||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
|
||||
background: #fff;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 30rpx;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-cancel {
|
||||
background: #fff;
|
||||
color: #2667E9;
|
||||
border: 2rpx solid #2667E9;
|
||||
}
|
||||
|
||||
.btn-confirm {
|
||||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
1232
pages/closeout/approval.vue
Normal file
1232
pages/closeout/approval.vue
Normal file
File diff suppressed because it is too large
Load Diff
1218
pages/closeout/leader-approval.vue
Normal file
1218
pages/closeout/leader-approval.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user